Page MenuHomeCode

No OneTemporary

This file is larger than 256 KB, so syntax highlighting was skipped.
diff --git a/js/dojo/dijit/ColorPalette.js b/js/dojo/dijit/ColorPalette.js
--- a/js/dojo/dijit/ColorPalette.js
+++ b/js/dojo/dijit/ColorPalette.js
@@ -1,262 +1,106 @@
-if(!dojo._hasResource["dijit.ColorPalette"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.ColorPalette"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit.ColorPalette"]){
+dojo._hasResource["dijit.ColorPalette"]=true;
dojo.provide("dijit.ColorPalette");
-
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dojo.colors");
dojo.require("dojo.i18n");
-dojo.requireLocalization("dojo", "colors", null, "ko,zh,ja,zh-tw,ru,it,hu,ROOT,fr,pt,pl,es,de,cs");
-
-dojo.declare(
- "dijit.ColorPalette",
- [dijit._Widget, dijit._Templated],
-{
- // summary
- // Grid showing various colors, so the user can pick a certain color
-
- // defaultTimeout: Number
- // number of milliseconds before a held key or button becomes typematic
- defaultTimeout: 500,
-
- // timeoutChangeRate: Number
- // fraction of time used to change the typematic timer between events
- // 1.0 means that each typematic event fires at defaultTimeout intervals
- // < 1.0 means that each typematic event fires at an increasing faster rate
- timeoutChangeRate: 0.90,
-
- // palette: String
- // Size of grid, either "7x10" or "3x4".
- palette: "7x10",
-
- //_value: String
- // The value of the selected color.
- value: null,
-
- //_currentFocus: Integer
- // Index of the currently focused color.
- _currentFocus: 0,
-
- // _xDim: Integer
- // This is the number of colors horizontally across.
- _xDim: null,
-
- // _yDim: Integer
- /// This is the number of colors vertically down.
- _yDim: null,
-
- // _palettes: Map
- // This represents the value of the colors.
- // The first level is a hashmap of the different arrays available
- // The next two dimensions represent the columns and rows of colors.
- _palettes: {
-
- "7x10": [["white", "seashell", "cornsilk", "lemonchiffon","lightyellow", "palegreen", "paleturquoise", "lightcyan", "lavender", "plum"],
- ["lightgray", "pink", "bisque", "moccasin", "khaki", "lightgreen", "lightseagreen", "lightskyblue", "cornflowerblue", "violet"],
- ["silver", "lightcoral", "sandybrown", "orange", "palegoldenrod", "chartreuse", "mediumturquoise", "skyblue", "mediumslateblue","orchid"],
- ["gray", "red", "orangered", "darkorange", "yellow", "limegreen", "darkseagreen", "royalblue", "slateblue", "mediumorchid"],
- ["dimgray", "crimson", "chocolate", "coral", "gold", "forestgreen", "seagreen", "blue", "blueviolet", "darkorchid"],
- ["darkslategray","firebrick","saddlebrown", "sienna", "olive", "green", "darkcyan", "mediumblue","darkslateblue", "darkmagenta" ],
- ["black", "darkred", "maroon", "brown", "darkolivegreen", "darkgreen", "midnightblue", "navy", "indigo", "purple"]],
-
- "3x4": [["white", "lime", "green", "blue"],
- ["silver", "yellow", "fuchsia", "navy"],
- ["gray", "red", "purple", "black"]]
-
- },
-
- // _imagePaths: Map
- // This is stores the path to the palette images
- _imagePaths: {
- "7x10": dojo.moduleUrl("dijit", "templates/colors7x10.png"),
- "3x4": dojo.moduleUrl("dijit", "templates/colors3x4.png")
- },
-
- // _paletteCoords: Map
- // This is a map that is used to calculate the coordinates of the
- // images that make up the palette.
- _paletteCoords: {
- "leftOffset": 4, "topOffset": 4,
- "cWidth": 20, "cHeight": 20
-
- },
-
- // templatePath: String
- // Path to the template of this widget.
- templateString:"<div class=\"dijitInline dijitColorPalette\">\n\t<div class=\"dijitColorPaletteInner\" dojoAttachPoint=\"divNode\" waiRole=\"grid\" tabIndex=\"-1\">\n\t\t<img class=\"dijitColorPaletteUnder\" dojoAttachPoint=\"imageNode\" waiRole=\"presentation\">\n\t</div>\t\n</div>\n",
-
- // _paletteDims: Object
- // Size of the supported palettes for alignment purposes.
- _paletteDims: {
- "7x10": {"width": "206px", "height": "145px"},
- "3x4": {"width": "86px", "height": "64px"}
- },
-
-
- postCreate: function(){
- // A name has to be given to the colorMap, this needs to be unique per Palette.
- dojo.mixin(this.divNode.style, this._paletteDims[this.palette]);
- this.imageNode.setAttribute("src", this._imagePaths[this.palette]);
- var choices = this._palettes[this.palette];
- this.domNode.style.position = "relative";
- this._highlightNodes = [];
- this.colorNames = dojo.i18n.getLocalization("dojo", "colors", this.lang);
- var url= dojo.moduleUrl("dijit", "templates/blank.gif");
- var colorObject = new dojo.Color(),
- coords = this._paletteCoords;
- for(var row=0; row < choices.length; row++){
- for(var col=0; col < choices[row].length; col++) {
- var highlightNode = document.createElement("img");
- highlightNode.src = url;
- dojo.addClass(highlightNode, "dijitPaletteImg");
- var color = choices[row][col],
- colorValue = colorObject.setColor(dojo.Color.named[color]);
- highlightNode.alt = this.colorNames[color];
- highlightNode.color = colorValue.toHex();
- var highlightStyle = highlightNode.style;
- highlightStyle.color = highlightStyle.backgroundColor = highlightNode.color;
- dojo.forEach(["Dijitclick", "MouseOut", "MouseOver", "Blur", "Focus"], function(handler) {
- this.connect(highlightNode, "on" + handler.toLowerCase(), "_onColor" + handler);
- }, this);
- this.divNode.appendChild(highlightNode);
- highlightStyle.top = coords.topOffset + (row * coords.cHeight) + "px";
- highlightStyle.left = coords.leftOffset + (col * coords.cWidth) + "px";
- highlightNode.setAttribute("tabIndex", "-1");
- highlightNode.title = this.colorNames[color];
- dijit.setWaiRole(highlightNode, "gridcell");
- highlightNode.index = this._highlightNodes.length;
- this._highlightNodes.push(highlightNode);
- }
- }
- this._highlightNodes[this._currentFocus].tabIndex = 0;
- this._xDim = choices[0].length;
- this._yDim = choices.length;
-
- // Now set all events
- // The palette itself is navigated to with the tab key on the keyboard
- // Keyboard navigation within the Palette is with the arrow keys
- // Spacebar selects the color.
- // For the up key the index is changed by negative the x dimension.
-
- var keyIncrementMap = {
- UP_ARROW: -this._xDim,
- // The down key the index is increase by the x dimension.
- DOWN_ARROW: this._xDim,
- // Right and left move the index by 1.
- RIGHT_ARROW: 1,
- LEFT_ARROW: -1
- };
- for(var key in keyIncrementMap){
- this._connects.push(dijit.typematic.addKeyListener(this.domNode,
- {keyCode:dojo.keys[key], ctrlKey:false, altKey:false, shiftKey:false},
- this,
- function(){
- var increment = keyIncrementMap[key];
- return function(count){ this._navigateByKey(increment, count); };
- }(),
- this.timeoutChangeRate, this.defaultTimeout));
- }
- },
-
- focus: function(){
- // summary:
- // Focus this ColorPalette.
- dijit.focus(this._highlightNodes[this._currentFocus]);
- },
-
- onChange: function(color){
- // summary:
- // Callback when a color is selected.
- // color: String
- // Hex value corresponding to color.
-// console.debug("Color selected is: "+color);
- },
-
- _onColorDijitclick: function(/*Event*/ evt){
- // summary:
- // Handler for click, enter key & space key. Selects the color.
- // evt:
- // The event.
- var target = evt.currentTarget;
- if (this._currentFocus != target.index){
- this._currentFocus = target.index;
- dijit.focus(target);
- }
- this._selectColor(target);
- dojo.stopEvent(evt);
- },
-
- _onColorMouseOut: function(/*Event*/ evt){
- // summary:
- // Handler for onMouseOut. Removes highlight.
- // evt:
- // The mouse event.
- dojo.removeClass(evt.currentTarget, "dijitPaletteImgHighlight");
- },
-
- _onColorMouseOver: function(/*Event*/ evt){
- // summary:
- // Handler for onMouseOver. Highlights the color.
- // evt:
- // The mouse event.
- var target = evt.currentTarget;
- target.tabIndex = 0;
- target.focus();
- },
-
- _onColorBlur: function(/*Event*/ evt){
- // summary:
- // Handler for onBlur. Removes highlight and sets
- // the first color as the palette's tab point.
- // evt:
- // The blur event.
- dojo.removeClass(evt.currentTarget, "dijitPaletteImgHighlight");
- evt.currentTarget.tabIndex = -1;
- this._currentFocus = 0;
- this._highlightNodes[0].tabIndex = 0;
- },
-
- _onColorFocus: function(/*Event*/ evt){
- // summary:
- // Handler for onFocus. Highlights the color.
- // evt:
- // The focus event.
- if(this._currentFocus != evt.currentTarget.index){
- this._highlightNodes[this._currentFocus].tabIndex = -1;
- }
- this._currentFocus = evt.currentTarget.index;
- dojo.addClass(evt.currentTarget, "dijitPaletteImgHighlight");
-
- },
-
- _selectColor: function(selectNode){
- // summary:
- // This selects a color. It triggers the onChange event
- // area:
- // The area node that covers the color being selected.
- this.onChange(this.value = selectNode.color);
- },
-
- _navigateByKey: function(increment, typeCount){
- // summary:we
- // This is the callback for typematic.
- // It changes the focus and the highlighed color.
- // increment:
- // How much the key is navigated.
- // typeCount:
- // How many times typematic has fired.
-
- // typecount == -1 means the key is released.
- if(typeCount == -1){ return; }
-
- var newFocusIndex = this._currentFocus + increment;
- if(newFocusIndex < this._highlightNodes.length && newFocusIndex > -1)
- {
- var focusNode = this._highlightNodes[newFocusIndex];
- focusNode.tabIndex = 0;
- focusNode.focus();
- }
- }
-});
-
+dojo.requireLocalization("dojo","colors",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-tw");
+dojo.declare("dijit.ColorPalette",[dijit._Widget,dijit._Templated],{defaultTimeout:500,timeoutChangeRate:0.9,palette:"7x10",value:null,_currentFocus:0,_xDim:null,_yDim:null,_palettes:{"7x10":[["white","seashell","cornsilk","lemonchiffon","lightyellow","palegreen","paleturquoise","lightcyan","lavender","plum"],["lightgray","pink","bisque","moccasin","khaki","lightgreen","lightseagreen","lightskyblue","cornflowerblue","violet"],["silver","lightcoral","sandybrown","orange","palegoldenrod","chartreuse","mediumturquoise","skyblue","mediumslateblue","orchid"],["gray","red","orangered","darkorange","yellow","limegreen","darkseagreen","royalblue","slateblue","mediumorchid"],["dimgray","crimson","chocolate","coral","gold","forestgreen","seagreen","blue","blueviolet","darkorchid"],["darkslategray","firebrick","saddlebrown","sienna","olive","green","darkcyan","mediumblue","darkslateblue","darkmagenta"],["black","darkred","maroon","brown","darkolivegreen","darkgreen","midnightblue","navy","indigo","purple"]],"3x4":[["white","lime","green","blue"],["silver","yellow","fuchsia","navy"],["gray","red","purple","black"]]},_imagePaths:{"7x10":dojo.moduleUrl("dijit.themes","a11y/colors7x10.png"),"3x4":dojo.moduleUrl("dijit.themes","a11y/colors3x4.png")},_paletteCoords:{"leftOffset":3,"topOffset":3,"cWidth":20,"cHeight":20},templateString:dojo.cache("dijit","templates/ColorPalette.html","<div class=\"dijitInline dijitColorPalette\">\n\t<div class=\"dijitColorPaletteInner\" dojoAttachPoint=\"divNode\" waiRole=\"grid\"\">\n\t\t<img class=\"dijitColorPaletteUnder\" dojoAttachPoint=\"imageNode\" waiRole=\"presentation\" alt=\"\">\n\t</div>\n</div>\n"),_paletteDims:{"7x10":{"width":"206px","height":"145px"},"3x4":{"width":"86px","height":"64px"}},tabIndex:"0",buildRendering:function(){
+this.inherited(arguments);
+dojo.mixin(this.divNode.style,this._paletteDims[this.palette]);
+this.imageNode.setAttribute("src",this._imagePaths[this.palette].toString());
+var _1=this._palettes[this.palette];
+this.domNode.style.position="relative";
+this._cellNodes=[];
+this.colorNames=dojo.i18n.getLocalization("dojo","colors",this.lang);
+var _2=this._blankGif,_3=new dojo.Color(),_4=this._paletteCoords;
+for(var _5=0;_5<_1.length;_5++){
+var _6=dojo.create("div",{role:"row"},this.divNode);
+for(var _7=0;_7<_1[_5].length;_7++){
+var _8=_1[_5][_7],_9=_3.setColor(dojo.Color.named[_8]);
+var _a=dojo.create("span",{"class":"dijitPaletteCell",tabIndex:"-1",title:this.colorNames[_8],style:{top:_4.topOffset+(_5*_4.cHeight)+"px",left:_4.leftOffset+(_7*_4.cWidth)+"px"}});
+var _b=dojo.create("img",{src:_2,"class":"dijitPaletteImg",alt:this.colorNames[_8]},_a);
+_b.color=_9.toHex();
+var _c=_b.style;
+_c.color=_c.backgroundColor=_b.color;
+dojo.forEach(["Dijitclick","MouseEnter","MouseLeave","Focus"],function(_d){
+this.connect(_a,"on"+_d.toLowerCase(),"_onCell"+_d);
+},this);
+dojo.place(_a,_6);
+dijit.setWaiRole(_a,"gridcell");
+_a.index=this._cellNodes.length;
+this._cellNodes.push(_a);
+}
+}
+this._xDim=_1[0].length;
+this._yDim=_1.length;
+var _e={UP_ARROW:-this._xDim,DOWN_ARROW:this._xDim,RIGHT_ARROW:1,LEFT_ARROW:-1};
+for(var _f in _e){
+this._connects.push(dijit.typematic.addKeyListener(this.domNode,{charOrCode:dojo.keys[_f],ctrlKey:false,altKey:false,shiftKey:false},this,function(){
+var _10=_e[_f];
+return function(_11){
+this._navigateByKey(_10,_11);
+};
+}(),this.timeoutChangeRate,this.defaultTimeout));
}
+},postCreate:function(){
+this.inherited(arguments);
+this._currentFocus=this._cellNodes[0];
+dojo.attr(this._currentFocus,"tabIndex",this.tabIndex);
+},focus:function(){
+dojo.addClass(this._currentFocus,"dijitPaletteCellHighlight");
+dijit.focus(this._currentFocus);
+},onChange:function(_12){
+},_onFocus:function(){
+dojo.addClass(this._currentFocus,"dijitPaletteCellHighlight");
+this.inherited(arguments);
+},_onBlur:function(){
+dojo.attr(this._currentFocus,"tabIndex","-1");
+dojo.removeClass(this._currentFocus,"dijitPaletteCellHighlight");
+this._currentFocus=this._cellNodes[0];
+dojo.attr(this._currentFocus,"tabIndex",this.tabIndex);
+this.inherited(arguments);
+},_onCellDijitclick:function(evt){
+var _13=evt.currentTarget;
+this._selectColor(_13);
+dojo.stopEvent(evt);
+},_onCellMouseEnter:function(evt){
+var _14=evt.currentTarget;
+this._setCurrent(_14);
+},_onCellMouseLeave:function(evt){
+dojo.removeClass(this._currentFocus,"dijitPaletteCellHighlight");
+},_onCellFocus:function(evt){
+this._setCurrent(evt.currentTarget);
+},_setCurrent:function(_15){
+if("_currentFocus" in this){
+dojo.attr(this._currentFocus,"tabIndex","-1");
+dojo.removeClass(this._currentFocus,"dijitPaletteCellHighlight");
+}
+this._currentFocus=_15;
+if(_15){
+dojo.attr(_15,"tabIndex",this.tabIndex);
+dojo.addClass(_15,"dijitPaletteCellHighlight");
+}
+},_selectColor:function(_16){
+var img=_16.getElementsByTagName("img")[0];
+this.onChange(this.value=img.color);
+},_navigateByKey:function(_17,_18){
+if(_18==-1){
+return;
+}
+var _19=this._currentFocus.index+_17;
+if(_19<this._cellNodes.length&&_19>-1){
+var _1a=this._cellNodes[_19];
+this._setCurrent(_1a);
+setTimeout(dojo.hitch(dijit,"focus",_1a),0);
+}
+}});
+}
diff --git a/js/dojo/dijit/Declaration.js b/js/dojo/dijit/Declaration.js
--- a/js/dojo/dijit/Declaration.js
+++ b/js/dojo/dijit/Declaration.js
@@ -1,76 +1,36 @@
-if(!dojo._hasResource["dijit.Declaration"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.Declaration"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit.Declaration"]){
+dojo._hasResource["dijit.Declaration"]=true;
dojo.provide("dijit.Declaration");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
-
-dojo.declare(
- "dijit.Declaration",
- dijit._Widget,
- {
- // summary:
- // The Declaration widget allows a user to declare new widget
- // classes directly from a snippet of markup.
-
- _noScript: true,
- widgetClass: "",
- replaceVars: true,
- defaults: null,
- mixins: [],
- buildRendering: function(){
- var src = this.srcNodeRef.parentNode.removeChild(this.srcNodeRef);
- var preambles = dojo.query("> script[type='dojo/method'][event='preamble']", src).orphan();
- var scripts = dojo.query("> script[type^='dojo/']", src).orphan();
- var srcType = src.nodeName;
-
- var propList = this.defaults||{};
-
- // map array of strings like [ "dijit.form.Button" ] to array of mixin objects
- // (note that dojo.map(this.mixins, dojo.getObject) doesn't work because it passes
- // a bogus third argument to getObject(), confusing it)
- this.mixins = this.mixins.length ?
- dojo.map(this.mixins, function(name){ return dojo.getObject(name); } ) :
- [ dijit._Widget, dijit._Templated ];
-
- if(preambles.length){
- // we only support one preamble. So be it.
- propList.preamble = dojo.parser._functionFromScript(preambles[0]);
- }
-
- var parsedScripts = dojo.map(scripts, function(s){
- var evt = s.getAttribute("event")||"postscript";
- return {
- event: evt,
- func: dojo.parser._functionFromScript(s)
- };
- });
-
- // do the connects for each <script type="dojo/connect" event="foo"> block and make
- // all <script type="dojo/method"> tags execute right after construction
- this.mixins.push(function(){
- dojo.forEach(parsedScripts, function(s){
- dojo.connect(this, s.event, this, s.func);
- }, this);
- });
-
- propList.widgetsInTemplate = true;
- propList._skipNodeCache = true;
- propList.templateString = "<"+srcType+" class='"+src.className+"' dojoAttachPoint='"+(src.getAttribute("dojoAttachPoint")||'')+"' dojoAttachEvent='"+(src.getAttribute("dojoAttachEvent")||'')+"' >"+src.innerHTML.replace(/\%7B/g,"{").replace(/\%7D/g,"}")+"</"+srcType+">";
- // console.debug(propList.templateString);
-
- // strip things so we don't create stuff under us in the initial setup phase
- dojo.query("[dojoType]", src).forEach(function(node){
- node.removeAttribute("dojoType");
- });
-
- // create the new widget class
- dojo.declare(
- this.widgetClass,
- this.mixins,
- propList
- );
- }
- }
-);
-
+dojo.declare("dijit.Declaration",dijit._Widget,{_noScript:true,widgetClass:"",defaults:null,mixins:[],buildRendering:function(){
+var _1=this.srcNodeRef.parentNode.removeChild(this.srcNodeRef),_2=dojo.query("> script[type^='dojo/method'][event]",_1).orphan(),_3=dojo.query("> script[type^='dojo/method']",_1).orphan(),_4=dojo.query("> script[type^='dojo/connect']",_1).orphan(),_5=_1.nodeName;
+var _6=this.defaults||{};
+dojo.forEach(_2,function(s){
+var _7=s.getAttribute("event"),_8=dojo.parser._functionFromScript(s);
+_6[_7]=_8;
+});
+this.mixins=this.mixins.length?dojo.map(this.mixins,function(_9){
+return dojo.getObject(_9);
+}):[dijit._Widget,dijit._Templated];
+_6.widgetsInTemplate=true;
+_6._skipNodeCache=true;
+_6.templateString="<"+_5+" class='"+_1.className+"' dojoAttachPoint='"+(_1.getAttribute("dojoAttachPoint")||"")+"' dojoAttachEvent='"+(_1.getAttribute("dojoAttachEvent")||"")+"' >"+_1.innerHTML.replace(/\%7B/g,"{").replace(/\%7D/g,"}")+"</"+_5+">";
+dojo.query("[dojoType]",_1).forEach(function(_a){
+_a.removeAttribute("dojoType");
+});
+var wc=dojo.declare(this.widgetClass,this.mixins,_6);
+var _b=_4.concat(_3);
+dojo.forEach(_b,function(s){
+var _c=s.getAttribute("event")||"postscript",_d=dojo.parser._functionFromScript(s);
+dojo.connect(wc.prototype,_c,_d);
+});
+}});
}
diff --git a/js/dojo/dijit/Dialog.js b/js/dojo/dijit/Dialog.js
--- a/js/dojo/dijit/Dialog.js
+++ b/js/dojo/dijit/Dialog.js
@@ -1,371 +1,252 @@
-if(!dojo._hasResource["dijit.Dialog"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.Dialog"] = true;
-dojo.provide("dijit.Dialog");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+if(!dojo._hasResource["dijit.Dialog"]){
+dojo._hasResource["dijit.Dialog"]=true;
+dojo.provide("dijit.Dialog");
dojo.require("dojo.dnd.move");
+dojo.require("dojo.dnd.TimedMoveable");
dojo.require("dojo.fx");
-
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
+dojo.require("dijit.form._FormMixin");
+dojo.require("dijit._DialogMixin");
+dojo.require("dijit.DialogUnderlay");
dojo.require("dijit.layout.ContentPane");
-dojo.require("dijit.form.Form");
-
-dojo.declare(
- "dijit.DialogUnderlay",
- [dijit._Widget, dijit._Templated],
- {
- // summary: the thing that grays out the screen behind the dialog
-
- // Template has two divs; outer div is used for fade-in/fade-out, and also to hold background iframe.
- // Inner div has opacity specified in CSS file.
- templateString: "<div class=dijitDialogUnderlayWrapper id='${id}_underlay'><div class=dijitDialogUnderlay dojoAttachPoint='node'></div></div>",
-
- postCreate: function(){
- dojo.body().appendChild(this.domNode);
- this.bgIframe = new dijit.BackgroundIframe(this.domNode);
- },
-
- layout: function(){
- // summary
- // Sets the background to the size of the viewport (rather than the size
- // of the document) since we need to cover the whole browser window, even
- // if the document is only a few lines long.
-
- var viewport = dijit.getViewport();
- var is = this.node.style,
- os = this.domNode.style;
-
- os.top = viewport.t + "px";
- os.left = viewport.l + "px";
- is.width = viewport.w + "px";
- is.height = viewport.h + "px";
-
- // process twice since the scroll bar may have been removed
- // by the previous resizing
- var viewport2 = dijit.getViewport();
- if(viewport.w != viewport2.w){ is.width = viewport2.w + "px"; }
- if(viewport.h != viewport2.h){ is.height = viewport2.h + "px"; }
- },
-
- show: function(){
- this.domNode.style.display = "block";
- this.layout();
- if(this.bgIframe.iframe){
- this.bgIframe.iframe.style.display = "block";
- }
- this._resizeHandler = this.connect(window, "onresize", "layout");
- },
-
- hide: function(){
- this.domNode.style.display = "none";
- if(this.bgIframe.iframe){
- this.bgIframe.iframe.style.display = "none";
- }
- this.disconnect(this._resizeHandler);
- },
-
- uninitialize: function(){
- if(this.bgIframe){
- this.bgIframe.destroy();
- }
- }
- }
-);
-
-dojo.declare(
- "dijit.Dialog",
- [dijit.layout.ContentPane, dijit._Templated, dijit.form._FormMixin],
- {
- // summary:
- // Pops up a modal dialog window, blocking access to the screen
- // and also graying out the screen Dialog is extended from
- // ContentPane so it supports all the same parameters (href, etc.)
-
- templateString: null,
- templateString:"<div class=\"dijitDialog\">\n\t<div dojoAttachPoint=\"titleBar\" class=\"dijitDialogTitleBar\" tabindex=\"0\" waiRole=\"dialog\">\n\t<span dojoAttachPoint=\"titleNode\" class=\"dijitDialogTitle\">${title}</span>\n\t<span dojoAttachPoint=\"closeButtonNode\" class=\"dijitDialogCloseIcon\" dojoAttachEvent=\"onclick: hide\">\n\t\t<span dojoAttachPoint=\"closeText\" class=\"closeText\">x</span>\n\t</span>\n\t</div>\n\t\t<div dojoAttachPoint=\"containerNode\" class=\"dijitDialogPaneContent\"></div>\n\t<span dojoAttachPoint=\"tabEnd\" dojoAttachEvent=\"onfocus:_cycleFocus\" tabindex=\"0\"></span>\n</div>\n",
-
- // open: Boolean
- // is True or False depending on state of dialog
- open: false,
-
- // duration: Integer
- // The time in milliseconds it takes the dialog to fade in and out
- duration: 400,
-
- _lastFocusItem:null,
-
- attributeMap: dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),
- {title: "titleBar"}),
-
- postCreate: function(){
- dojo.body().appendChild(this.domNode);
- this.inherited("postCreate",arguments);
- this.domNode.style.display="none";
- this.connect(this, "onExecute", "hide");
- this.connect(this, "onCancel", "hide");
- },
-
- onLoad: function(){
- // summary:
- // when href is specified we need to reposition the dialog after the data is loaded
- this._position();
- this.inherited("onLoad",arguments);
- },
-
- _setup: function(){
- // summary:
- // stuff we need to do before showing the Dialog for the first
- // time (but we defer it until right beforehand, for
- // performance reasons)
-
- this._modalconnects = [];
-
- if(this.titleBar){
- this._moveable = new dojo.dnd.Moveable(this.domNode, { handle: this.titleBar });
- }
-
- this._underlay = new dijit.DialogUnderlay();
-
- var node = this.domNode;
- this._fadeIn = dojo.fx.combine(
- [dojo.fadeIn({
- node: node,
- duration: this.duration
- }),
- dojo.fadeIn({
- node: this._underlay.domNode,
- duration: this.duration,
- onBegin: dojo.hitch(this._underlay, "show")
- })
- ]
- );
-
- this._fadeOut = dojo.fx.combine(
- [dojo.fadeOut({
- node: node,
- duration: this.duration,
- onEnd: function(){
- node.style.display="none";
- }
- }),
- dojo.fadeOut({
- node: this._underlay.domNode,
- duration: this.duration,
- onEnd: dojo.hitch(this._underlay, "hide")
- })
- ]
- );
- },
-
- uninitialize: function(){
- if(this._underlay){
- this._underlay.destroy();
- }
- },
-
- _position: function(){
- // summary: position modal dialog in center of screen
-
- if(dojo.hasClass(dojo.body(),"dojoMove")){ return; }
- var viewport = dijit.getViewport();
- var mb = dojo.marginBox(this.domNode);
-
- var style = this.domNode.style;
- style.left = Math.floor((viewport.l + (viewport.w - mb.w)/2)) + "px";
- style.top = Math.floor((viewport.t + (viewport.h - mb.h)/2)) + "px";
- },
-
- _findLastFocus: function(/*Event*/ evt){
- // summary: called from onblur of dialog container to determine the last focusable item
- this._lastFocused = evt.target;
- },
-
- _cycleFocus: function(/*Event*/ evt){
- // summary: when tabEnd receives focus, advance focus around to titleBar
-
- // on first focus to tabEnd, store the last focused item in dialog
- if(!this._lastFocusItem){
- this._lastFocusItem = this._lastFocused;
- }
- this.titleBar.focus();
- },
-
- _onKey: function(/*Event*/ evt){
- if(evt.keyCode){
- var node = evt.target;
- // see if we are shift-tabbing from titleBar
- if(node == this.titleBar && evt.shiftKey && evt.keyCode == dojo.keys.TAB){
- if(this._lastFocusItem){
- this._lastFocusItem.focus(); // send focus to last item in dialog if known
- }
- dojo.stopEvent(evt);
- }else{
- // see if the key is for the dialog
- while(node){
- if(node == this.domNode){
- if(evt.keyCode == dojo.keys.ESCAPE){
- this.hide();
- }else{
- return; // just let it go
- }
- }
- node = node.parentNode;
- }
- // this key is for the disabled document window
- if(evt.keyCode != dojo.keys.TAB){ // allow tabbing into the dialog for a11y
- dojo.stopEvent(evt);
- // opera won't tab to a div
- }else if (!dojo.isOpera){
- try{
- this.titleBar.focus();
- }catch(e){/*squelch*/}
- }
- }
- }
- },
-
- show: function(){
- // summary: display the dialog
-
- // first time we show the dialog, there's some initialization stuff to do
- if(!this._alreadyInitialized){
- this._setup();
- this._alreadyInitialized=true;
- }
-
- if(this._fadeOut.status() == "playing"){
- this._fadeOut.stop();
- }
-
- this._modalconnects.push(dojo.connect(window, "onscroll", this, "layout"));
- this._modalconnects.push(dojo.connect(document.documentElement, "onkeypress", this, "_onKey"));
-
- // IE doesn't bubble onblur events - use ondeactivate instead
- var ev = typeof(document.ondeactivate) == "object" ? "ondeactivate" : "onblur";
- this._modalconnects.push(dojo.connect(this.containerNode, ev, this, "_findLastFocus"));
-
- dojo.style(this.domNode, "opacity", 0);
- this.domNode.style.display="block";
- this.open = true;
- this._loadCheck(); // lazy load trigger
-
- this._position();
-
- this._fadeIn.play();
-
- this._savedFocus = dijit.getFocus(this);
-
- // set timeout to allow the browser to render dialog
- setTimeout(dojo.hitch(this, function(){
- dijit.focus(this.titleBar);
- }), 50);
- },
-
- hide: function(){
- // summary
- // Hide the dialog
-
- // if we haven't been initialized yet then we aren't showing and we can just return
- if(!this._alreadyInitialized){
- return;
- }
-
- if(this._fadeIn.status() == "playing"){
- this._fadeIn.stop();
- }
- this._fadeOut.play();
-
- if (this._scrollConnected){
- this._scrollConnected = false;
- }
- dojo.forEach(this._modalconnects, dojo.disconnect);
- this._modalconnects = [];
-
- this.connect(this._fadeOut,"onEnd",dojo.hitch(this,function(){
- dijit.focus(this._savedFocus);
- }));
- this.open = false;
- },
-
- layout: function() {
- // summary: position the Dialog and the underlay
- if(this.domNode.style.display == "block"){
- this._underlay.layout();
- this._position();
- }
- }
- }
-);
-
-dojo.declare(
- "dijit.TooltipDialog",
- [dijit.layout.ContentPane, dijit._Templated, dijit.form._FormMixin],
- {
- // summary:
- // Pops up a dialog that appears like a Tooltip
- // title: String
- // Description of tooltip dialog (required for a11Y)
- title: "",
-
- _lastFocusItem: null,
-
- templateString: null,
- templateString:"<div class=\"dijitTooltipDialog\" >\n\t<div class=\"dijitTooltipContainer\">\n\t\t<div class =\"dijitTooltipContents dijitTooltipFocusNode\" dojoAttachPoint=\"containerNode\" tabindex=\"0\" waiRole=\"dialog\"></div>\n\t</div>\n\t<span dojoAttachPoint=\"tabEnd\" tabindex=\"0\" dojoAttachEvent=\"focus:_cycleFocus\"></span>\n\t<div class=\"dijitTooltipConnector\" ></div>\n</div>\n",
-
- postCreate: function(){
- this.inherited("postCreate",arguments);
- this.connect(this.containerNode, "onkeypress", "_onKey");
-
- // IE doesn't bubble onblur events - use ondeactivate instead
- var ev = typeof(document.ondeactivate) == "object" ? "ondeactivate" : "onblur";
- this.connect(this.containerNode, ev, "_findLastFocus");
- this.containerNode.title=this.title;
- },
-
- orient: function(/*Object*/ corner){
- // summary: configure widget to be displayed in given position relative to the button
- this.domNode.className="dijitTooltipDialog " +" dijitTooltipAB"+(corner.charAt(1)=='L'?"Left":"Right")+" dijitTooltip"+(corner.charAt(0)=='T' ? "Below" : "Above");
- },
-
- onOpen: function(/*Object*/ pos){
- // summary: called when dialog is displayed
- this.orient(pos.corner);
- this._loadCheck(); // lazy load trigger
- this.containerNode.focus();
- },
-
- _onKey: function(/*Event*/ evt){
- // summary: keep keyboard focus in dialog; close dialog on escape key
- if(evt.keyCode == dojo.keys.ESCAPE){
- this.onCancel();
- }else if(evt.target == this.containerNode && evt.shiftKey && evt.keyCode == dojo.keys.TAB){
- if (this._lastFocusItem){
- this._lastFocusItem.focus();
- }
- dojo.stopEvent(evt);
- }else if(evt.keyCode == dojo.keys.TAB){
- // we want the browser's default tab handling to move focus
- // but we don't want the tab to propagate upwards
- evt.stopPropagation();
- }
- },
-
- _findLastFocus: function(/*Event*/ evt){
- // summary: called from onblur of dialog container to determine the last focusable item
- this._lastFocused = evt.target;
- },
-
- _cycleFocus: function(/*Event*/ evt){
- // summary: when tabEnd receives focus, advance focus around to containerNode
-
- // on first focus to tabEnd, store the last focused item in dialog
- if(!this._lastFocusItem){
- this._lastFocusItem = this._lastFocused;
- }
- this.containerNode.focus();
- }
- }
-);
-
-
+dojo.requireLocalization("dijit","common",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-tw");
+dojo.declare("dijit._DialogBase",[dijit._Templated,dijit.form._FormMixin,dijit._DialogMixin],{templateString:dojo.cache("dijit","templates/Dialog.html","<div class=\"dijitDialog\" tabindex=\"-1\" waiRole=\"dialog\" waiState=\"labelledby-${id}_title\">\n\t<div dojoAttachPoint=\"titleBar\" class=\"dijitDialogTitleBar\">\n\t<span dojoAttachPoint=\"titleNode\" class=\"dijitDialogTitle\" id=\"${id}_title\"></span>\n\t<span dojoAttachPoint=\"closeButtonNode\" class=\"dijitDialogCloseIcon\" dojoAttachEvent=\"onclick: onCancel, onmouseenter: _onCloseEnter, onmouseleave: _onCloseLeave\" title=\"${buttonCancel}\">\n\t\t<span dojoAttachPoint=\"closeText\" class=\"closeText\" title=\"${buttonCancel}\">x</span>\n\t</span>\n\t</div>\n\t\t<div dojoAttachPoint=\"containerNode\" class=\"dijitDialogPaneContent\"></div>\n</div>\n"),attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{title:[{node:"titleNode",type:"innerHTML"},{node:"titleBar",type:"attribute"}],"aria-describedby":""}),open:false,duration:dijit.defaultDuration,refocus:true,autofocus:true,_firstFocusItem:null,_lastFocusItem:null,doLayout:false,draggable:true,"aria-describedby":"",postMixInProperties:function(){
+var _1=dojo.i18n.getLocalization("dijit","common");
+dojo.mixin(this,_1);
+this.inherited(arguments);
+},postCreate:function(){
+dojo.style(this.domNode,{display:"none",position:"absolute"});
+dojo.body().appendChild(this.domNode);
+this.inherited(arguments);
+this.connect(this,"onExecute","hide");
+this.connect(this,"onCancel","hide");
+this._modalconnects=[];
+},onLoad:function(){
+this._position();
+this.inherited(arguments);
+},_endDrag:function(e){
+if(e&&e.node&&e.node===this.domNode){
+this._relativePosition=dojo.position(e.node);
+}
+},_setup:function(){
+var _2=this.domNode;
+if(this.titleBar&&this.draggable){
+this._moveable=(dojo.isIE==6)?new dojo.dnd.TimedMoveable(_2,{handle:this.titleBar}):new dojo.dnd.Moveable(_2,{handle:this.titleBar,timeout:0});
+dojo.subscribe("/dnd/move/stop",this,"_endDrag");
+}else{
+dojo.addClass(_2,"dijitDialogFixed");
+}
+this.underlayAttrs={dialogId:this.id,"class":dojo.map(this["class"].split(/\s/),function(s){
+return s+"_underlay";
+}).join(" ")};
+this._fadeIn=dojo.fadeIn({node:_2,duration:this.duration,beforeBegin:dojo.hitch(this,function(){
+var _3=dijit._underlay;
+if(!_3){
+_3=dijit._underlay=new dijit.DialogUnderlay(this.underlayAttrs);
+}else{
+_3.attr(this.underlayAttrs);
+}
+var _4=948+dijit._dialogStack.length*2;
+dojo.style(dijit._underlay.domNode,"zIndex",_4);
+dojo.style(this.domNode,"zIndex",_4+1);
+_3.show();
+}),onEnd:dojo.hitch(this,function(){
+if(this.autofocus){
+this._getFocusItems(this.domNode);
+dijit.focus(this._firstFocusItem);
+}
+})});
+this._fadeOut=dojo.fadeOut({node:_2,duration:this.duration,onEnd:dojo.hitch(this,function(){
+_2.style.display="none";
+var ds=dijit._dialogStack;
+if(ds.length==0){
+dijit._underlay.hide();
+}else{
+dojo.style(dijit._underlay.domNode,"zIndex",948+ds.length*2);
+dijit._underlay.attr(ds[ds.length-1].underlayAttrs);
+}
+if(this.refocus){
+var _5=this._savedFocus;
+if(ds.length>0){
+var pd=ds[ds.length-1];
+if(!dojo.isDescendant(_5.node,pd.domNode)){
+pd._getFocusItems(pd.domNode);
+_5=pd._firstFocusItem;
+}
+}
+dijit.focus(_5);
+}
+})});
+},uninitialize:function(){
+var _6=false;
+if(this._fadeIn&&this._fadeIn.status()=="playing"){
+_6=true;
+this._fadeIn.stop();
+}
+if(this._fadeOut&&this._fadeOut.status()=="playing"){
+_6=true;
+this._fadeOut.stop();
+}
+if((this.open||_6)&&!dijit._underlay._destroyed){
+dijit._underlay.hide();
+}
+if(this._moveable){
+this._moveable.destroy();
+}
+this.inherited(arguments);
+},_size:function(){
+this._checkIfSingleChild();
+if(this._singleChild){
+if(this._singleChildOriginalStyle){
+this._singleChild.domNode.style.cssText=this._singleChildOriginalStyle;
+}
+delete this._singleChildOriginalStyle;
+}else{
+dojo.style(this.containerNode,{width:"auto",height:"auto"});
+}
+var mb=dojo.marginBox(this.domNode);
+var _7=dijit.getViewport();
+if(mb.w>=_7.w||mb.h>=_7.h){
+var w=Math.min(mb.w,Math.floor(_7.w*0.75)),h=Math.min(mb.h,Math.floor(_7.h*0.75));
+if(this._singleChild&&this._singleChild.resize){
+this._singleChildOriginalStyle=this._singleChild.domNode.style.cssText;
+this._singleChild.resize({w:w,h:h});
+}else{
+dojo.style(this.containerNode,{width:w+"px",height:h+"px",overflow:"auto",position:"relative"});
+}
+}else{
+if(this._singleChild&&this._singleChild.resize){
+this._singleChild.resize();
+}
+}
+},_position:function(){
+if(!dojo.hasClass(dojo.body(),"dojoMove")){
+var _8=this.domNode,_9=dijit.getViewport(),p=this._relativePosition,bb=p?null:dojo._getBorderBox(_8),l=Math.floor(_9.l+(p?p.x:(_9.w-bb.w)/2)),t=Math.floor(_9.t+(p?p.y:(_9.h-bb.h)/2));
+dojo.style(_8,{left:l+"px",top:t+"px"});
}
+},_onKey:function(_a){
+var ds=dijit._dialogStack;
+if(ds[ds.length-1]!=this){
+return;
+}
+if(_a.charOrCode){
+var dk=dojo.keys;
+var _b=_a.target;
+if(_a.charOrCode===dk.TAB){
+this._getFocusItems(this.domNode);
+}
+var _c=(this._firstFocusItem==this._lastFocusItem);
+if(_b==this._firstFocusItem&&_a.shiftKey&&_a.charOrCode===dk.TAB){
+if(!_c){
+dijit.focus(this._lastFocusItem);
+}
+dojo.stopEvent(_a);
+}else{
+if(_b==this._lastFocusItem&&_a.charOrCode===dk.TAB&&!_a.shiftKey){
+if(!_c){
+dijit.focus(this._firstFocusItem);
+}
+dojo.stopEvent(_a);
+}else{
+while(_b){
+if(_b==this.domNode||dojo.hasClass(_b,"dijitPopup")){
+if(_a.charOrCode==dk.ESCAPE){
+this.onCancel();
+}else{
+return;
+}
+}
+_b=_b.parentNode;
+}
+if(_a.charOrCode!==dk.TAB){
+dojo.stopEvent(_a);
+}else{
+if(!dojo.isOpera){
+try{
+this._firstFocusItem.focus();
+}
+catch(e){
+}
+}
+}
+}
+}
+}
+},show:function(){
+if(this.open){
+return;
+}
+if(!this._alreadyInitialized){
+this._setup();
+this._alreadyInitialized=true;
+}
+if(this._fadeOut.status()=="playing"){
+this._fadeOut.stop();
+}
+this._modalconnects.push(dojo.connect(window,"onscroll",this,"layout"));
+this._modalconnects.push(dojo.connect(window,"onresize",this,function(){
+var _d=dijit.getViewport();
+if(!this._oldViewport||_d.h!=this._oldViewport.h||_d.w!=this._oldViewport.w){
+this.layout();
+this._oldViewport=_d;
+}
+}));
+this._modalconnects.push(dojo.connect(dojo.doc.documentElement,"onkeypress",this,"_onKey"));
+dojo.style(this.domNode,{opacity:0,display:""});
+this.open=true;
+this._onShow();
+this._size();
+this._position();
+dijit._dialogStack.push(this);
+this._fadeIn.play();
+this._savedFocus=dijit.getFocus(this);
+},hide:function(){
+var ds=dijit._dialogStack;
+if(!this._alreadyInitialized||this!=ds[ds.length-1]){
+return;
+}
+if(this._fadeIn.status()=="playing"){
+this._fadeIn.stop();
+}
+ds.pop();
+this._fadeOut.play();
+if(this._scrollConnected){
+this._scrollConnected=false;
+}
+dojo.forEach(this._modalconnects,dojo.disconnect);
+this._modalconnects=[];
+if(this._relativePosition){
+delete this._relativePosition;
+}
+this.open=false;
+this.onHide();
+},layout:function(){
+if(this.domNode.style.display!="none"){
+if(dijit._underlay){
+dijit._underlay.layout();
+}
+this._position();
+}
+},destroy:function(){
+dojo.forEach(this._modalconnects,dojo.disconnect);
+if(this.refocus&&this.open){
+setTimeout(dojo.hitch(dijit,"focus",this._savedFocus),25);
+}
+this.inherited(arguments);
+},_onCloseEnter:function(){
+dojo.addClass(this.closeButtonNode,"dijitDialogCloseIcon-hover");
+},_onCloseLeave:function(){
+dojo.removeClass(this.closeButtonNode,"dijitDialogCloseIcon-hover");
+}});
+dojo.declare("dijit.Dialog",[dijit.layout.ContentPane,dijit._DialogBase],{});
+dijit._dialogStack=[];
+dojo.require("dijit.TooltipDialog");
+}
diff --git a/js/dojo/dijit/Editor.js b/js/dojo/dijit/Editor.js
--- a/js/dojo/dijit/Editor.js
+++ b/js/dojo/dijit/Editor.js
@@ -1,379 +1,360 @@
-if(!dojo._hasResource["dijit.Editor"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.Editor"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit.Editor"]){
+dojo._hasResource["dijit.Editor"]=true;
dojo.provide("dijit.Editor");
dojo.require("dijit._editor.RichText");
dojo.require("dijit.Toolbar");
+dojo.require("dijit.ToolbarSeparator");
dojo.require("dijit._editor._Plugin");
+dojo.require("dijit._editor.plugins.EnterKeyHandling");
+dojo.require("dijit._editor.range");
dojo.require("dijit._Container");
dojo.require("dojo.i18n");
-dojo.requireLocalization("dijit._editor", "commands", null, "ko,zh,ja,zh-tw,ru,it,hu,fr,pt,pl,es,ROOT,de,cs");
-
-dojo.declare(
- "dijit.Editor",
- dijit._editor.RichText,
- {
- // summary: A rich-text Editing widget
-
- // plugins: Array
- // a list of plugin names (as strings) or instances (as objects)
- // for this widget.
- plugins: null,
-
- // extraPlugins: Array
- // a list of extra plugin names which will be appended to plugins array
- extraPlugins: null,
-
- constructor: function(){
- this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|",
- "insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull"/*"createLink"*/];
-
- this._plugins=[];
- this._editInterval = this.editActionInterval * 1000;
- },
-
- postCreate: function(){
- //for custom undo/redo
- if(this.customUndo){
- dojo['require']("dijit._editor.range");
- this._steps=this._steps.slice(0);
- this._undoedSteps=this._undoedSteps.slice(0);
-// this.addKeyHandler('z',this.KEY_CTRL,this.undo);
-// this.addKeyHandler('y',this.KEY_CTRL,this.redo);
- }
- if(dojo.isArray(this.extraPlugins)){
- this.plugins=this.plugins.concat(this.extraPlugins);
- }
-
-// try{
- dijit.Editor.superclass.postCreate.apply(this, arguments);
-
- this.commands = dojo.i18n.getLocalization("dijit._editor", "commands", this.lang);
-
- if(!this.toolbar){
- // if we haven't been assigned a toolbar, create one
- var toolbarNode = dojo.doc.createElement("div");
- dojo.place(toolbarNode, this.editingArea, "before");
- this.toolbar = new dijit.Toolbar({}, toolbarNode);
- }
-
- dojo.forEach(this.plugins, this.addPlugin, this);
- this.onNormalizedDisplayChanged(); //update toolbar button status
-// }catch(e){ console.debug(e); }
- },
- destroy: function(){
- dojo.forEach(this._plugins, function(p){
- if(p.destroy){
- p.destroy();
- }
- });
- this._plugins=[];
- this.toolbar.destroy(); delete this.toolbar;
- this.inherited('destroy',arguments);
- },
- addPlugin: function(/*String||Object*/plugin, /*Integer?*/index){
- // summary:
- // takes a plugin name as a string or a plugin instance and
- // adds it to the toolbar and associates it with this editor
- // instance. The resulting plugin is added to the Editor's
- // plugins array. If index is passed, it's placed in the plugins
- // array at that index. No big magic, but a nice helper for
- // passing in plugin names via markup.
- // plugin: String, args object or plugin instance. Required.
- // args: This object will be passed to the plugin constructor.
- // index:
- // Integer, optional. Used when creating an instance from
- // something already in this.plugins. Ensures that the new
- // instance is assigned to this.plugins at that index.
- var args=dojo.isString(plugin)?{name:plugin}:plugin;
- if(!args.setEditor){
- var o={"args":args,"plugin":null,"editor":this};
- dojo.publish("dijit.Editor.getPlugin",[o]);
- if(!o.plugin){
- var pc = dojo.getObject(args.name);
- if(pc){
- o.plugin=new pc(args);
- }
- }
- if(!o.plugin){
- console.debug('Cannot find plugin',plugin);
- return;
- }
- plugin=o.plugin;
- }
- if(arguments.length > 1){
- this._plugins[index] = plugin;
- }else{
- this._plugins.push(plugin);
- }
- plugin.setEditor(this);
- if(dojo.isFunction(plugin.setToolbar)){
- plugin.setToolbar(this.toolbar);
- }
- },
- /* beginning of custom undo/redo support */
-
- // customUndo: Boolean
- // Whether we shall use custom undo/redo support instead of the native
- // browser support. By default, we only enable customUndo for IE, as it
- // has broken native undo/redo support. Note: the implementation does
- // support other browsers which have W3C DOM2 Range API.
- customUndo: dojo.isIE,
-
- // editActionInterval: Integer
- // When using customUndo, not every keystroke will be saved as a step.
- // Instead typing (including delete) will be grouped together: after
- // a user stop typing for editActionInterval seconds, a step will be
- // saved; if a user resume typing within editActionInterval seconds,
- // the timeout will be restarted. By default, editActionInterval is 3
- // seconds.
- editActionInterval: 3,
- beginEditing: function(cmd){
- if(!this._inEditing){
- this._inEditing=true;
- this._beginEditing(cmd);
- }
- if(this.editActionInterval>0){
- if(this._editTimer){
- clearTimeout(this._editTimer);
- }
- this._editTimer = setTimeout(dojo.hitch(this, this.endEditing), this._editInterval);
- }
- },
- _steps:[],
- _undoedSteps:[],
- execCommand: function(cmd){
- if(this.customUndo && (cmd=='undo' || cmd=='redo')){
- return this[cmd]();
- }else{
- try{
- if(this.customUndo){
- this.endEditing();
- this._beginEditing();
- }
- var r = this.inherited('execCommand',arguments);
- if(this.customUndo){
- this._endEditing();
- }
- return r;
- }catch(e){
- if(dojo.isMoz && /copy|cut|paste/.test(cmd)){
- // Warn user of platform limitation. Cannot programmatically access keyboard. See ticket #4136
- var sub = dojo.string.substitute,
- accel = {cut:'X', copy:'C', paste:'V'},
- isMac = navigator.userAgent.indexOf("Macintosh") != -1;
- alert(sub(this.commands.systemShortcutFF,
- [this.commands[cmd], sub(this.commands[isMac ? 'appleKey' : 'ctrlKey'], [accel[cmd]])]));
- }
- return false;
- }
- }
- },
- queryCommandEnabled: function(cmd){
- if(this.customUndo && (cmd=='undo' || cmd=='redo')){
- return cmd=='undo'?(this._steps.length>1):(this._undoedSteps.length>0);
- }else{
- return this.inherited('queryCommandEnabled',arguments);
- }
- },
- _changeToStep: function(from,to){
- this.setValue(to.text);
- var b=to.bookmark;
- if(!b){ return; }
- if(dojo.isIE){
- if(dojo.isArray(b)){//IE CONTROL
- var tmp=[];
- dojo.forEach(b,function(n){
- tmp.push(dijit.range.getNode(n,this.editNode));
- },this);
- b=tmp;
- }
- }else{//w3c range
- var r=dijit.range.create();
- r.setStart(dijit.range.getNode(b.startContainer,this.editNode),b.startOffset);
- r.setEnd(dijit.range.getNode(b.endContainer,this.editNode),b.endOffset);
- b=r;
- }
- dojo.withGlobal(this.window,'moveToBookmark',dijit,[b]);
- },
- undo: function(){
-// console.log('undo');
- this.endEditing(true);
- var s=this._steps.pop();
- if(this._steps.length>0){
- this.focus();
- this._changeToStep(s,this._steps[this._steps.length-1]);
- this._undoedSteps.push(s);
- this.onDisplayChanged();
- return true;
- }
- return false;
- },
- redo: function(){
-// console.log('redo');
- this.endEditing(true);
- var s=this._undoedSteps.pop();
- if(s && this._steps.length>0){
- this.focus();
- this._changeToStep(this._steps[this._steps.length-1],s);
- this._steps.push(s);
- this.onDisplayChanged();
- return true;
- }
- return false;
- },
- endEditing: function(ignore_caret){
- if(this._editTimer){
- clearTimeout(this._editTimer);
- }
- if(this._inEditing){
- this._endEditing(ignore_caret);
- this._inEditing=false;
- }
- },
- _getBookmark: function(){
- var b=dojo.withGlobal(this.window,dijit.getBookmark);
- if(dojo.isIE){
- if(dojo.isArray(b)){//CONTROL
- var tmp=[];
- dojo.forEach(b,function(n){
- tmp.push(dijit.range.getIndex(n,this.editNode).o);
- },this);
- b=tmp;
- }
- }else{//w3c range
- var tmp=dijit.range.getIndex(b.startContainer,this.editNode).o
- b={startContainer:tmp,
- startOffset:b.startOffset,
- endContainer:b.endContainer===b.startContainer?tmp:dijit.range.getIndex(b.endContainer,this.editNode).o,
- endOffset:b.endOffset};
- }
- return b;
- },
- _beginEditing: function(cmd){
- if(this._steps.length===0){
- this._steps.push({'text':this.savedContent,'bookmark':this._getBookmark()});
- }
- },
- _endEditing: function(ignore_caret){
- var v=this.getValue(true);
-
- this._undoedSteps=[];//clear undoed steps
- this._steps.push({'text':v,'bookmark':this._getBookmark()});
- },
- onKeyDown: function(e){
- if(!this.customUndo){
- this.inherited('onKeyDown',arguments);
- return;
- }
- var k=e.keyCode,ks=dojo.keys;
- if(e.ctrlKey){
- if(k===90||k===122){ //z
- dojo.stopEvent(e);
- this.undo();
- return;
- }else if(k===89||k===121){ //y
- dojo.stopEvent(e);
- this.redo();
- return;
- }
- }
- this.inherited('onKeyDown',arguments);
-
- switch(k){
- case ks.ENTER:
- this.beginEditing();
- break;
- case ks.BACKSPACE:
- case ks.DELETE:
- this.beginEditing();
- break;
- case 88: //x
- case 86: //v
- if(e.ctrlKey && !e.altKey && !e.metaKey){
- this.endEditing();//end current typing step if any
- if(e.keyCode == 88){
- this.beginEditing('cut');
- //use timeout to trigger after the cut is complete
- setTimeout(dojo.hitch(this, this.endEditing), 1);
- }else{
- this.beginEditing('paste');
- //use timeout to trigger after the paste is complete
- setTimeout(dojo.hitch(this, this.endEditing), 1);
- }
- break;
- }
- //pass through
- default:
- if(!e.ctrlKey && !e.altKey && !e.metaKey && (e.keyCode<dojo.keys.F1 || e.keyCode>dojo.keys.F15)){
- this.beginEditing();
- break;
- }
- //pass through
- case ks.ALT:
- this.endEditing();
- break;
- case ks.UP_ARROW:
- case ks.DOWN_ARROW:
- case ks.LEFT_ARROW:
- case ks.RIGHT_ARROW:
- case ks.HOME:
- case ks.END:
- case ks.PAGE_UP:
- case ks.PAGE_DOWN:
- this.endEditing(true);
- break;
- //maybe ctrl+backspace/delete, so don't endEditing when ctrl is pressed
- case ks.CTRL:
- case ks.SHIFT:
- case ks.TAB:
- break;
- }
- },
- _onBlur: function(){
- this.inherited('_onBlur',arguments);
- this.endEditing(true);
- },
- onClick: function(){
- this.endEditing(true);
- this.inherited('onClick',arguments);
- }
- /* end of custom undo/redo support */
- }
-);
-
-/* the following code is to registered a handler to get default plugins */
-dojo.subscribe("dijit.Editor.getPlugin",null,function(o){
- if(o.plugin){ return; }
- var args=o.args, p;
- var _p = dijit._editor._Plugin;
- var name=args.name;
- switch(name){
- case "undo": case "redo": case "cut": case "copy": case "paste": case "insertOrderedList":
- case "insertUnorderedList": case "indent": case "outdent": case "justifyCenter":
- case "justifyFull": case "justifyLeft": case "justifyRight": case "delete":
- case "selectAll": case "removeFormat":
- p = new _p({ command: name });
- break;
-
- case "bold": case "italic": case "underline": case "strikethrough":
- case "subscript": case "superscript":
- p = new _p({ buttonClass: dijit.form.ToggleButton, command: name });
- break;
- case "|":
- p = new _p({ button: new dijit.ToolbarSeparator() });
- break;
- case "createLink":
-// dojo['require']('dijit._editor.plugins.LinkDialog');
- p = new dijit._editor.plugins.LinkDialog({ command: name });
- break;
- case "foreColor": case "hiliteColor":
- p = new dijit._editor.plugins.TextColor({ command: name });
- break;
- case "fontName": case "fontSize": case "formatBlock":
- p = new dijit._editor.plugins.FontChoice({ command: name });
- }
-// console.log('name',name,p);
- o.plugin=p;
+dojo.requireLocalization("dijit._editor","commands",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-tw");
+dojo.declare("dijit.Editor",dijit._editor.RichText,{plugins:null,extraPlugins:null,constructor:function(){
+if(!dojo.isArray(this.plugins)){
+this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|","insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull","dijit._editor.plugins.EnterKeyHandling"];
+}
+this._plugins=[];
+this._editInterval=this.editActionInterval*1000;
+if(dojo.isIE){
+this.events.push("onBeforeDeactivate");
+this.events.push("onBeforeActivate");
+}
+},postCreate:function(){
+if(this.customUndo){
+dojo["require"]("dijit._editor.range");
+this._steps=this._steps.slice(0);
+this._undoedSteps=this._undoedSteps.slice(0);
+}
+if(dojo.isArray(this.extraPlugins)){
+this.plugins=this.plugins.concat(this.extraPlugins);
+}
+this.inherited(arguments);
+this.commands=dojo.i18n.getLocalization("dijit._editor","commands",this.lang);
+if(!this.toolbar){
+this.toolbar=new dijit.Toolbar({});
+dojo.place(this.toolbar.domNode,this.editingArea,"before");
+}
+dojo.forEach(this.plugins,this.addPlugin,this);
+this.onNormalizedDisplayChanged();
+this.toolbar.startup();
+},destroy:function(){
+dojo.forEach(this._plugins,function(p){
+if(p&&p.destroy){
+p.destroy();
+}
});
-
+this._plugins=[];
+this.toolbar.destroyRecursive();
+delete this.toolbar;
+this.inherited(arguments);
+},addPlugin:function(_1,_2){
+var _3=dojo.isString(_1)?{name:_1}:_1;
+if(!_3.setEditor){
+var o={"args":_3,"plugin":null,"editor":this};
+dojo.publish(dijit._scopeName+".Editor.getPlugin",[o]);
+if(!o.plugin){
+var pc=dojo.getObject(_3.name);
+if(pc){
+o.plugin=new pc(_3);
+}
+}
+if(!o.plugin){
+console.warn("Cannot find plugin",_1);
+return;
+}
+_1=o.plugin;
+}
+if(arguments.length>1){
+this._plugins[_2]=_1;
+}else{
+this._plugins.push(_1);
+}
+_1.setEditor(this);
+if(dojo.isFunction(_1.setToolbar)){
+_1.setToolbar(this.toolbar);
+}
+},startup:function(){
+},resize:function(_4){
+if(_4){
+dijit.layout._LayoutWidget.prototype.resize.apply(this,arguments);
+}
+},layout:function(){
+this.editingArea.style.height=(this._contentBox.h-dojo.marginBox(this.toolbar.domNode).h)+"px";
+if(this.iframe){
+this.iframe.style.height="100%";
+}
+this._layoutMode=true;
+},_onIEMouseDown:function(e){
+var _5=this.document.body.componentFromPoint(e.x,e.y);
+if(!_5){
+delete this._savedSelection;
+if(e.target.tagName=="BODY"){
+setTimeout(dojo.hitch(this,"placeCursorAtEnd"),0);
+}
+this.inherited(arguments);
+}
+},onBeforeActivate:function(e){
+this._restoreSelection();
+},onBeforeDeactivate:function(e){
+if(this.customUndo){
+this.endEditing(true);
+}
+if(e.target.tagName!="BODY"){
+this._saveSelection();
+}
+},customUndo:dojo.isIE,editActionInterval:3,beginEditing:function(_6){
+if(!this._inEditing){
+this._inEditing=true;
+this._beginEditing(_6);
+}
+if(this.editActionInterval>0){
+if(this._editTimer){
+clearTimeout(this._editTimer);
+}
+this._editTimer=setTimeout(dojo.hitch(this,this.endEditing),this._editInterval);
+}
+},_steps:[],_undoedSteps:[],execCommand:function(_7){
+if(this.customUndo&&(_7=="undo"||_7=="redo")){
+return this[_7]();
+}else{
+if(this.customUndo){
+this.endEditing();
+this._beginEditing();
+}
+var r;
+try{
+r=this.inherited("execCommand",arguments);
+if(dojo.isWebKit&&_7=="paste"&&!r){
+throw {code:1011};
+}
+}
+catch(e){
+if(e.code==1011&&/copy|cut|paste/.test(_7)){
+var _8=dojo.string.substitute,_9={cut:"X",copy:"C",paste:"V"};
+alert(_8(this.commands.systemShortcut,[this.commands[_7],_8(this.commands[dojo.isMac?"appleKey":"ctrlKey"],[_9[_7]])]));
+}
+r=false;
+}
+if(this.customUndo){
+this._endEditing();
+}
+return r;
+}
+},queryCommandEnabled:function(_a){
+if(this.customUndo&&(_a=="undo"||_a=="redo")){
+return _a=="undo"?(this._steps.length>1):(this._undoedSteps.length>0);
+}else{
+return this.inherited("queryCommandEnabled",arguments);
+}
+},_moveToBookmark:function(b){
+var _b=b.mark;
+var _c=b.mark;
+var _d=b.isCollapsed;
+if(dojo.isIE){
+if(dojo.isArray(_c)){
+_b=[];
+dojo.forEach(_c,function(n){
+_b.push(dijit.range.getNode(n,this.editNode));
+},this);
+}
+}else{
+var r=dijit.range.create(this.window);
+r.setStart(dijit.range.getNode(b.startContainer,this.editNode),b.startOffset);
+r.setEnd(dijit.range.getNode(b.endContainer,this.editNode),b.endOffset);
+_b=r;
+}
+dojo.withGlobal(this.window,"moveToBookmark",dijit,[{mark:_b,isCollapsed:_d}]);
+},_changeToStep:function(_e,to){
+this.setValue(to.text);
+var b=to.bookmark;
+if(!b){
+return;
+}
+this._moveToBookmark(b);
+},undo:function(){
+this.endEditing(true);
+var s=this._steps.pop();
+if(this._steps.length>0){
+this.focus();
+this._changeToStep(s,this._steps[this._steps.length-1]);
+this._undoedSteps.push(s);
+this.onDisplayChanged();
+return true;
+}
+return false;
+},redo:function(){
+this.endEditing(true);
+var s=this._undoedSteps.pop();
+if(s&&this._steps.length>0){
+this.focus();
+this._changeToStep(this._steps[this._steps.length-1],s);
+this._steps.push(s);
+this.onDisplayChanged();
+return true;
+}
+return false;
+},endEditing:function(_f){
+if(this._editTimer){
+clearTimeout(this._editTimer);
}
+if(this._inEditing){
+this._endEditing(_f);
+this._inEditing=false;
+}
+},_getBookmark:function(){
+var b=dojo.withGlobal(this.window,dijit.getBookmark);
+var tmp=[];
+if(b.mark){
+var _10=b.mark;
+if(dojo.isIE){
+if(dojo.isArray(_10)){
+dojo.forEach(_10,function(n){
+tmp.push(dijit.range.getIndex(n,this.editNode).o);
+},this);
+b.mark=tmp;
+}
+}else{
+tmp=dijit.range.getIndex(_10.startContainer,this.editNode).o;
+b.mark={startContainer:tmp,startOffset:_10.startOffset,endContainer:_10.endContainer===_10.startContainer?tmp:dijit.range.getIndex(_10.endContainer,this.editNode).o,endOffset:_10.endOffset};
+}
+}
+return b;
+},_beginEditing:function(cmd){
+if(this._steps.length===0){
+this._steps.push({"text":this.savedContent,"bookmark":this._getBookmark()});
+}
+},_endEditing:function(_11){
+var v=this.getValue(true);
+this._undoedSteps=[];
+this._steps.push({text:v,bookmark:this._getBookmark()});
+},onKeyDown:function(e){
+if(!dojo.isIE&&!this.iframe&&e.keyCode==dojo.keys.TAB&&!this.tabIndent){
+this._saveSelection();
+}
+if(!this.customUndo){
+this.inherited(arguments);
+return;
+}
+var k=e.keyCode,ks=dojo.keys;
+if(e.ctrlKey&&!e.altKey){
+if(k==90||k==122){
+dojo.stopEvent(e);
+this.undo();
+return;
+}else{
+if(k==89||k==121){
+dojo.stopEvent(e);
+this.redo();
+return;
+}
+}
+}
+this.inherited(arguments);
+switch(k){
+case ks.ENTER:
+case ks.BACKSPACE:
+case ks.DELETE:
+this.beginEditing();
+break;
+case 88:
+case 86:
+if(e.ctrlKey&&!e.altKey&&!e.metaKey){
+this.endEditing();
+if(e.keyCode==88){
+this.beginEditing("cut");
+setTimeout(dojo.hitch(this,this.endEditing),1);
+}else{
+this.beginEditing("paste");
+setTimeout(dojo.hitch(this,this.endEditing),1);
+}
+break;
+}
+default:
+if(!e.ctrlKey&&!e.altKey&&!e.metaKey&&(e.keyCode<dojo.keys.F1||e.keyCode>dojo.keys.F15)){
+this.beginEditing();
+break;
+}
+case ks.ALT:
+this.endEditing();
+break;
+case ks.UP_ARROW:
+case ks.DOWN_ARROW:
+case ks.LEFT_ARROW:
+case ks.RIGHT_ARROW:
+case ks.HOME:
+case ks.END:
+case ks.PAGE_UP:
+case ks.PAGE_DOWN:
+this.endEditing(true);
+break;
+case ks.CTRL:
+case ks.SHIFT:
+case ks.TAB:
+break;
+}
+},_onBlur:function(){
+this.inherited("_onBlur",arguments);
+this.endEditing(true);
+},_saveSelection:function(){
+this._savedSelection=this._getBookmark();
+},_restoreSelection:function(){
+if(this._savedSelection){
+if(dojo.withGlobal(this.window,"isCollapsed",dijit)){
+this._moveToBookmark(this._savedSelection);
+}
+delete this._savedSelection;
+}
+},onClick:function(){
+this.endEditing(true);
+this.inherited(arguments);
+}});
+dojo.subscribe(dijit._scopeName+".Editor.getPlugin",null,function(o){
+if(o.plugin){
+return;
+}
+var _12=o.args,p;
+var _13=dijit._editor._Plugin;
+var _14=_12.name;
+switch(_14){
+case "undo":
+case "redo":
+case "cut":
+case "copy":
+case "paste":
+case "insertOrderedList":
+case "insertUnorderedList":
+case "indent":
+case "outdent":
+case "justifyCenter":
+case "justifyFull":
+case "justifyLeft":
+case "justifyRight":
+case "delete":
+case "selectAll":
+case "removeFormat":
+case "unlink":
+case "insertHorizontalRule":
+p=new _13({command:_14});
+break;
+case "bold":
+case "italic":
+case "underline":
+case "strikethrough":
+case "subscript":
+case "superscript":
+p=new _13({buttonClass:dijit.form.ToggleButton,command:_14});
+break;
+case "|":
+p=new _13({button:new dijit.ToolbarSeparator()});
+}
+o.plugin=p;
+});
+}
diff --git a/js/dojo/dijit/InlineEditBox.js b/js/dojo/dijit/InlineEditBox.js
--- a/js/dojo/dijit/InlineEditBox.js
+++ b/js/dojo/dijit/InlineEditBox.js
@@ -1,417 +1,220 @@
-if(!dojo._hasResource["dijit.InlineEditBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.InlineEditBox"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit.InlineEditBox"]){
+dojo._hasResource["dijit.InlineEditBox"]=true;
dojo.provide("dijit.InlineEditBox");
-
dojo.require("dojo.i18n");
-
dojo.require("dijit._Widget");
dojo.require("dijit._Container");
dojo.require("dijit.form.Button");
dojo.require("dijit.form.TextBox");
-
-dojo.requireLocalization("dijit", "common", null, "ko,zh,ja,zh-tw,ru,it,hu,fr,pt,ROOT,pl,es,de,cs");
-
-dojo.declare("dijit.InlineEditBox",
- dijit._Widget,
- {
- // summary: An element with in-line edit capabilitites
- //
- // description:
- // Behavior for an existing node (<p>, <div>, <span>, etc.) so that
- // when you click it, an editor shows up in place of the original
- // text. Optionally, Save and Cancel button are displayed below the edit widget.
- // When Save is clicked, the text is pulled from the edit
- // widget and redisplayed and the edit widget is again hidden.
- // By default a plain Textarea widget is used as the editor (or for
- // inline values a TextBox), but you can specify an editor such as
- // dijit.Editor (for editing HTML) or a Slider (for adjusting a number).
- // An edit widget must support the following API to be used:
- // String getDisplayedValue() OR String getValue()
- // void setDisplayedValue(String) OR void setValue(String)
- // void focus()
- //
- // editing: Boolean
- // Is the node currently in edit mode?
- editing: false,
-
- // autoSave: Boolean
- // Changing the value automatically saves it; don't have to push save button
- // (and save button isn't even displayed)
- autoSave: true,
-
- // buttonSave: String
- // Save button label
- buttonSave: "",
-
- // buttonCancel: String
- // Cancel button label
- buttonCancel: "",
-
- // renderAsHtml: Boolean
- // Set this to true if the specified Editor's value should be interpreted as HTML
- // rather than plain text (ie, dijit.Editor)
- renderAsHtml: false,
-
- // editor: String
- // Class name for Editor widget
- editor: "dijit.form.TextBox",
-
- // editorParams: Object
- // Set of parameters for editor, like {required: true}
- editorParams: {},
-
- onChange: function(value){
- // summary: User should set this handler to be notified of changes to value
- },
-
- // width: String
- // Width of editor. By default it's width=100% (ie, block mode)
- width: "100%",
-
- // value: String
- // The display value of the widget in read-only mode
- value: "",
-
- // noValueIndicator: String
- // The text that gets displayed when there is no value (so that the user has a place to click to edit)
- noValueIndicator: "<span style='font-family: wingdings; text-decoration: underline;'>&nbsp;&nbsp;&nbsp;&nbsp;&#x270d;&nbsp;&nbsp;&nbsp;&nbsp;</span>",
-
- postMixInProperties: function(){
- this.inherited('postMixInProperties', arguments);
-
- // save pointer to original source node, since Widget nulls-out srcNodeRef
- this.displayNode = this.srcNodeRef;
-
- // connect handlers to the display node
- var events = {
- ondijitclick: "_onClick",
- onmouseover: "_onMouseOver",
- onmouseout: "_onMouseOut",
- onfocus: "_onMouseOver",
- onblur: "_onMouseOut"
- };
- for(var name in events){
- this.connect(this.displayNode, name, events[name]);
- }
- dijit.setWaiRole(this.displayNode, "button");
- if(!this.displayNode.getAttribute("tabIndex")){
- this.displayNode.setAttribute("tabIndex", 0);
- }
-
- if(!this.value){
- this.value = this.displayNode.innerHTML;
- }
- this._setDisplayValue(this.value); // if blank, change to icon for "input needed"
- },
-
- _onMouseOver: function(){
- dojo.addClass(this.displayNode, this.disabled ? "dijitDisabledClickableRegion" : "dijitClickableRegion");
- },
-
- _onMouseOut: function(){
- dojo.removeClass(this.displayNode, this.disabled ? "dijitDisabledClickableRegion" : "dijitClickableRegion");
- },
-
- _onClick: function(/*Event*/ e){
- if(this.disabled){ return; }
- if(e){ dojo.stopEvent(e); }
- this._onMouseOut();
-
- // Since FF gets upset if you move a node while in an event handler for that node...
- setTimeout(dojo.hitch(this, "_edit"), 0);
- },
-
- _edit: function(){
- // summary: display the editor widget in place of the original (read only) markup
-
- this.editing = true;
-
- var editValue =
- (this.renderAsHtml ?
- this.value :
- this.value.replace(/\s*\r?\n\s*/g,"").replace(/<br\/?>/gi, "\n").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&"));
-
- // Placeholder for edit widget
- // Put place holder (and eventually editWidget) before the display node so that it's positioned correctly
- // when Calendar dropdown appears, which happens automatically on focus.
- var placeholder = document.createElement("span");
- dojo.place(placeholder, this.domNode, "before");
-
- var ew = this.editWidget = new dijit._InlineEditor({
- value: dojo.trim(editValue),
- autoSave: this.autoSave,
- buttonSave: this.buttonSave,
- buttonCancel: this.buttonCancel,
- renderAsHtml: this.renderAsHtml,
- editor: this.editor,
- editorParams: this.editorParams,
- style: dojo.getComputedStyle(this.displayNode),
- save: dojo.hitch(this, "save"),
- cancel: dojo.hitch(this, "cancel"),
- width: this.width
- }, placeholder);
-
- // to avoid screen jitter, we first create the editor with position:absolute, visibility:hidden,
- // and then when it's finished rendering, we switch from display mode to editor
- var ews = ew.domNode.style;
- this.displayNode.style.display="none";
- ews.position = "static";
- ews.visibility = "visible";
-
- // Replace the display widget with edit widget, leaving them both displayed for a brief time so that
- // focus can be shifted without incident. (browser may needs some time to render the editor.)
- this.domNode = ew.domNode;
- setTimeout(function(){
- ew.focus();
- }, 100);
- },
-
- _showText: function(/*Boolean*/ focus){
- // summary: revert to display mode, and optionally focus on display node
-
- // display the read-only text and then quickly hide the editor (to avoid screen jitter)
- this.displayNode.style.display="";
- var ews = this.editWidget.domNode.style;
- ews.position="absolute";
- ews.visibility="hidden";
-
- this.domNode = this.displayNode;
-
- // give the browser some time to render the display node and then shift focus to it
- // and hide the edit widget
- var _this = this;
- setTimeout(function(){
- if(focus){
- dijit.focus(_this.displayNode);
- }
- _this.editWidget.destroy();
- delete _this.editWidget;
- }, 100);
- },
-
- save: function(/*Boolean*/ focus){
- // summary:
- // Save the contents of the editor and revert to display mode.
- // focus: Boolean
- // Focus on the display mode text
- this.editing = false;
-
- this.value = this.editWidget.getValue() + "";
- if(this.renderAsHtml){
- this.value = this.value.replace(/&/gm, "&amp;").replace(/</gm, "&lt;").replace(/>/gm, "&gt;").replace(/"/gm, "&quot;")
- .replace("\n", "<br>");
- }
- this._setDisplayValue(this.value);
-
- // tell the world that we have changed
- this.onChange(this.value);
-
- this._showText(focus);
- },
-
- _setDisplayValue: function(/*String*/ val){
- // summary: inserts specified HTML value into this node, or an "input needed" character if node is blank
- this.displayNode.innerHTML = val || this.noValueIndicator;
- },
-
- cancel: function(/*Boolean*/ focus){
- // summary:
- // Revert to display mode, discarding any changes made in the editor
- this.editing = false;
- this._showText(focus);
- }
-});
-
-dojo.declare(
- "dijit._InlineEditor",
- [dijit._Widget, dijit._Templated],
-{
- // summary:
- // internal widget used by InlineEditBox, displayed when in editing mode
- // to display the editor and maybe save/cancel buttons. Calling code should
- // connect to save/cancel methods to detect when editing is finished
- //
- // Has mainly the same parameters as InlineEditBox, plus these values:
- //
- // style: Object
- // Set of CSS attributes of display node, to replicate in editor
- //
- // value: String
- // Value as an HTML string or plain text string, depending on renderAsHTML flag
-
- templateString:"<fieldset dojoAttachPoint=\"editNode\" waiRole=\"presentation\" style=\"position: absolute; visibility:hidden\" class=\"dijitReset dijitInline\"\n\tdojoAttachEvent=\"onkeypress: _onKeyPress\" \n\t><input dojoAttachPoint=\"editorPlaceholder\"\n\t/><span dojoAttachPoint=\"buttonContainer\"\n\t\t><button class='saveButton' dojoAttachPoint=\"saveButton\" dojoType=\"dijit.form.Button\" dojoAttachEvent=\"onClick:save\">${buttonSave}</button\n\t\t><button class='cancelButton' dojoAttachPoint=\"cancelButton\" dojoType=\"dijit.form.Button\" dojoAttachEvent=\"onClick:cancel\">${buttonCancel}</button\n\t></span\n></fieldset>\n",
- widgetsInTemplate: true,
-
- postMixInProperties: function(){
- this.inherited('postMixInProperties', arguments);
- this.messages = dojo.i18n.getLocalization("dijit", "common", this.lang);
- dojo.forEach(["buttonSave", "buttonCancel"], function(prop){
- if(!this[prop]){ this[prop] = this.messages[prop]; }
- }, this);
- },
-
- postCreate: function(){
- // Create edit widget in place in the template
- var cls = dojo.getObject(this.editor);
- var ew = this.editWidget = new cls(this.editorParams, this.editorPlaceholder);
-
- // Copy the style from the source
- // Don't copy ALL properties though, just the necessary/applicable ones
- var srcStyle = this.style;
- dojo.forEach(["fontWeight","fontFamily","fontSize","fontStyle"], function(prop){
- ew.focusNode.style[prop]=srcStyle[prop];
- }, this);
- dojo.forEach(["marginTop","marginBottom","marginLeft", "marginRight"], function(prop){
- this.domNode.style[prop]=srcStyle[prop];
- }, this);
- if(this.width=="100%"){
- // block mode
- ew.domNode.style.width = "100%"; // because display: block doesn't work for table widgets
- this.domNode.style.display="block";
- }else{
- // inline-block mode
- ew.domNode.style.width = this.width + (Number(this.width)==this.width ? "px" : "");
- }
-
- this.connect(this.editWidget, "onChange", "_onChange");
-
- // setting the value of the edit widget will cause a possibly asynchronous onChange() call.
- // we need to ignore it, since we are only interested in when the user changes the value.
- this._ignoreNextOnChange = true;
- (this.editWidget.setDisplayedValue||this.editWidget.setValue).call(this.editWidget, this.value);
-
- this._initialText = this.getValue();
-
- if(this.autoSave){
- this.buttonContainer.style.display="none";
- }
- },
-
- destroy: function(){
- this.editWidget.destroy();
- this.inherited(arguments);
- },
-
- getValue: function(){
- var ew = this.editWidget;
- return ew.getDisplayedValue ? ew.getDisplayedValue() : ew.getValue();
- },
-
- _onKeyPress: function(e){
- // summary: Callback when keypress in the edit box (see template).
- // description:
- // For autoSave widgets, if Esc/Enter, call cancel/save.
- // For non-autoSave widgets, enable save button if the text value is
- // different than the original value.
- if(this._exitInProgress){
- return;
- }
- if(this.autoSave){
- // If Enter/Esc pressed, treat as save/cancel.
- if(e.keyCode == dojo.keys.ESCAPE){
- dojo.stopEvent(e);
- this._exitInProgress = true;
- this.cancel(true);
- }else if(e.keyCode == dojo.keys.ENTER){
- dojo.stopEvent(e);
- this._exitInProgress = true;
- this.save(true);
- }
- }else{
- var _this = this;
- // Delay before calling getValue().
- // The delay gives the browser a chance to update the Textarea.
- setTimeout(
- function(){
- _this.saveButton.setDisabled(_this.getValue() == _this._initialText);
- }, 100);
- }
- },
-
- _onBlur: function(){
- // summary:
- // Called when focus moves outside the editor
- if(this._exitInProgress){
- // when user clicks the "save" button, focus is shifted back to display text, causing this
- // function to be called, but in that case don't do anything
- return;
- }
- if(this.autoSave){
- this._exitInProgress = true;
- if(this.getValue() == this._initialText){
- this.cancel(false);
- }else{
- this.save(false);
- }
- }
- },
-
- enableSave: function(){
- // summary: User replacable function returning a Boolean to indicate
- // if the Save button should be enabled or not - usually due to invalid conditions
- return this.editWidget.isValid ? this.editWidget.isValid() : true; // Boolean
- },
-
- _onChange: function(){
- // summary:
- // Called when the underlying widget fires an onChange event,
- // which means that the user has finished entering the value
-
- if(this._ignoreNextOnChange){
- delete this._ignoreNextOnChange;
- return;
- }
- if(this._exitInProgress){
- // TODO: the onChange event might happen after the return key for an async widget
- // like FilteringSelect. Shouldn't be deleting the edit widget on end-of-edit
- return;
- }
- if(this.autoSave){
- this._exitInProgress = true;
- this.save(true);
- }else{
- // in case the keypress event didn't get through (old problem with Textarea that has been fixed
- // in theory) or if the keypress event comes too quickly and the value inside the Textarea hasn't
- // been updated yet)
- this.saveButton.setDisabled((this.getValue() == this._initialText) || !this.enableSave());
- }
- },
-
- enableSave: function(){
- // summary: User replacable function returning a Boolean to indicate
- // if the Save button should be enabled or not - usually due to invalid conditions
- return this.editWidget.isValid ? this.editWidget.isValid() : true;
- },
-
- focus: function(){
- this.editWidget.focus();
- dijit.selectInputText(this.editWidget.focusNode);
- }
-});
-
-dijit.selectInputText = function(/*DomNode*/element){
- // summary: select all the text in an input element
-
- // TODO: use functions in _editor/selection.js?
- var _window = dojo.global;
- var _document = dojo.doc;
- element = dojo.byId(element);
- if(_document["selection"] && dojo.body()["createTextRange"]){ // IE
- if(element.createTextRange){
- var range = element.createTextRange();
- range.moveStart("character", 0);
- range.moveEnd("character", element.value.length);
- range.select();
- }
- }else if(_window["getSelection"]){
- var selection = _window.getSelection();
- // FIXME: does this work on Safari?
- if(element.setSelectionRange){
- element.setSelectionRange(0, element.value.length);
- }
- }
- element.focus();
-};
-
-
+dojo.requireLocalization("dijit","common",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-tw");
+dojo.declare("dijit.InlineEditBox",dijit._Widget,{editing:false,autoSave:true,buttonSave:"",buttonCancel:"",renderAsHtml:false,editor:"dijit.form.TextBox",editorWrapper:"dijit._InlineEditor",editorParams:{},onChange:function(_1){
+},onCancel:function(){
+},width:"100%",value:"",noValueIndicator:"<span style='font-family: wingdings; text-decoration: underline;'>&nbsp;&nbsp;&nbsp;&nbsp;&#x270d;&nbsp;&nbsp;&nbsp;&nbsp;</span>",constructor:function(){
+this.editorParams={};
+},postMixInProperties:function(){
+this.inherited(arguments);
+this.displayNode=this.srcNodeRef;
+var _2={ondijitclick:"_onClick",onmouseover:"_onMouseOver",onmouseout:"_onMouseOut",onfocus:"_onMouseOver",onblur:"_onMouseOut"};
+for(var _3 in _2){
+this.connect(this.displayNode,_3,_2[_3]);
+}
+dijit.setWaiRole(this.displayNode,"button");
+if(!this.displayNode.getAttribute("tabIndex")){
+this.displayNode.setAttribute("tabIndex",0);
+}
+this.attr("value",this.value||this.displayNode.innerHTML);
+},setDisabled:function(_4){
+dojo.deprecated("dijit.InlineEditBox.setDisabled() is deprecated. Use attr('disabled', bool) instead.","","2.0");
+this.attr("disabled",_4);
+},_setDisabledAttr:function(_5){
+this.disabled=_5;
+dijit.setWaiState(this.domNode,"disabled",_5);
+if(_5){
+this.displayNode.removeAttribute("tabIndex");
+}else{
+this.displayNode.setAttribute("tabIndex",0);
+}
+},_onMouseOver:function(){
+dojo.addClass(this.displayNode,this.disabled?"dijitDisabledClickableRegion":"dijitClickableRegion");
+},_onMouseOut:function(){
+dojo.removeClass(this.displayNode,this.disabled?"dijitDisabledClickableRegion":"dijitClickableRegion");
+},_onClick:function(e){
+if(this.disabled){
+return;
+}
+if(e){
+dojo.stopEvent(e);
+}
+this._onMouseOut();
+setTimeout(dojo.hitch(this,"edit"),0);
+},edit:function(){
+if(this.disabled||this.editing){
+return;
+}
+this.editing=true;
+this._savedPosition=dojo.style(this.displayNode,"position")||"static";
+this._savedOpacity=dojo.style(this.displayNode,"opacity")||"1";
+this._savedTabIndex=dojo.attr(this.displayNode,"tabIndex")||"0";
+if(this.wrapperWidget){
+this.wrapperWidget.editWidget.attr("displayedValue" in this.editorParams?"displayedValue":"value",this.value);
+}else{
+var _6=dojo.create("span",null,this.domNode,"before");
+var _7=dojo.getObject(this.editorWrapper);
+this.wrapperWidget=new _7({value:this.value,buttonSave:this.buttonSave,buttonCancel:this.buttonCancel,tabIndex:this._savedTabIndex,editor:this.editor,inlineEditBox:this,sourceStyle:dojo.getComputedStyle(this.displayNode),save:dojo.hitch(this,"save"),cancel:dojo.hitch(this,"cancel")},_6);
+}
+var ww=this.wrapperWidget;
+if(dojo.isIE){
+dijit.focus(dijit.getFocus());
+}
+dojo.style(this.displayNode,{position:"absolute",opacity:"0",display:"none"});
+dojo.style(ww.domNode,{position:this._savedPosition,visibility:"visible",opacity:"1"});
+dojo.attr(this.displayNode,"tabIndex","-1");
+setTimeout(dojo.hitch(this,function(){
+ww.focus();
+ww._resetValue=ww.getValue();
+}),0);
+},_onBlur:function(){
+this.inherited(arguments);
+if(!this.editing){
+setTimeout(dojo.hitch(this,function(){
+if(this.wrapperWidget){
+this.wrapperWidget.destroy();
+delete this.wrapperWidget;
+}
+}),0);
+}
+},_showText:function(_8){
+var ww=this.wrapperWidget;
+dojo.style(ww.domNode,{position:"absolute",visibility:"hidden",opacity:"0"});
+dojo.style(this.displayNode,{position:this._savedPosition,opacity:this._savedOpacity,display:""});
+dojo.attr(this.displayNode,"tabIndex",this._savedTabIndex);
+if(_8){
+dijit.focus(this.displayNode);
+}
+},save:function(_9){
+if(this.disabled||!this.editing){
+return;
+}
+this.editing=false;
+var ww=this.wrapperWidget;
+var _a=ww.getValue();
+this.attr("value",_a);
+setTimeout(dojo.hitch(this,"onChange",_a),0);
+this._showText(_9);
+},setValue:function(_b){
+dojo.deprecated("dijit.InlineEditBox.setValue() is deprecated. Use attr('value', ...) instead.","","2.0");
+return this.attr("value",_b);
+},_setValueAttr:function(_c){
+this.value=_c=dojo.trim(_c);
+if(!this.renderAsHtml){
+_c=_c.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;").replace(/\n/g,"<br>");
}
+this.displayNode.innerHTML=_c||this.noValueIndicator;
+},getValue:function(){
+dojo.deprecated("dijit.InlineEditBox.getValue() is deprecated. Use attr('value') instead.","","2.0");
+return this.attr("value");
+},cancel:function(_d){
+if(this.disabled||!this.editing){
+return;
+}
+this.editing=false;
+setTimeout(dojo.hitch(this,"onCancel"),0);
+this._showText(_d);
+}});
+dojo.declare("dijit._InlineEditor",[dijit._Widget,dijit._Templated],{templateString:dojo.cache("dijit","templates/InlineEditBox.html","<span dojoAttachPoint=\"editNode\" waiRole=\"presentation\" style=\"position: absolute; visibility:hidden\" class=\"dijitReset dijitInline\"\n\tdojoAttachEvent=\"onkeypress: _onKeyPress\"\n\t><span dojoAttachPoint=\"editorPlaceholder\"></span\n\t><span dojoAttachPoint=\"buttonContainer\"\n\t\t><button class='saveButton' dojoAttachPoint=\"saveButton\" dojoType=\"dijit.form.Button\" dojoAttachEvent=\"onClick:save\" label=\"${buttonSave}\"></button\n\t\t><button class='cancelButton' dojoAttachPoint=\"cancelButton\" dojoType=\"dijit.form.Button\" dojoAttachEvent=\"onClick:cancel\" label=\"${buttonCancel}\"></button\n\t></span\n></span>\n"),widgetsInTemplate:true,postMixInProperties:function(){
+this.inherited(arguments);
+this.messages=dojo.i18n.getLocalization("dijit","common",this.lang);
+dojo.forEach(["buttonSave","buttonCancel"],function(_e){
+if(!this[_e]){
+this[_e]=this.messages[_e];
+}
+},this);
+},postCreate:function(){
+var _f=dojo.getObject(this.editor);
+var _10=this.sourceStyle;
+var _11="line-height:"+_10.lineHeight+";";
+dojo.forEach(["Weight","Family","Size","Style"],function(_12){
+_11+="font-"+_12+":"+_10["font"+_12]+";";
+},this);
+dojo.forEach(["marginTop","marginBottom","marginLeft","marginRight"],function(_13){
+this.domNode.style[_13]=_10[_13];
+},this);
+var _14=this.inlineEditBox.width;
+if(_14=="100%"){
+_11+="width:100%;";
+this.domNode.style.display="block";
+}else{
+_11+="width:"+(_14+(Number(_14)==_14?"px":""))+";";
+}
+var _15=this.inlineEditBox.editorParams;
+_15.style=_11;
+_15["displayedValue" in _f.prototype?"displayedValue":"value"]=this.value;
+var ew=this.editWidget=new _f(_15,this.editorPlaceholder);
+if(this.inlineEditBox.autoSave){
+this.buttonContainer.style.display="none";
+this.connect(ew,"onChange","_onChange");
+this.connect(ew,"onKeyPress","_onKeyPress");
+}else{
+if("intermediateChanges" in _f.prototype){
+ew.attr("intermediateChanges",true);
+this.connect(ew,"onChange","_onIntermediateChange");
+this.saveButton.attr("disabled",true);
+}
+}
+},_onIntermediateChange:function(val){
+this.saveButton.attr("disabled",(this.getValue()==this._resetValue)||!this.enableSave());
+},destroy:function(){
+this.editWidget.destroy(true);
+this.inherited(arguments);
+},getValue:function(){
+var ew=this.editWidget;
+return String(ew.attr("displayedValue" in ew?"displayedValue":"value"));
+},_onKeyPress:function(e){
+if(this.inlineEditBox.autoSave&&this.inlineEditBox.editing){
+if(e.altKey||e.ctrlKey){
+return;
+}
+if(e.charOrCode==dojo.keys.ESCAPE){
+dojo.stopEvent(e);
+this.cancel(true);
+}else{
+if(e.charOrCode==dojo.keys.ENTER&&e.target.tagName=="INPUT"){
+dojo.stopEvent(e);
+this._onChange();
+}
+}
+}
+},_onBlur:function(){
+this.inherited(arguments);
+if(this.inlineEditBox.autoSave&&this.inlineEditBox.editing){
+if(this.getValue()==this._resetValue){
+this.cancel(false);
+}else{
+if(this.enableSave()){
+this.save(false);
+}
+}
+}
+},_onChange:function(){
+if(this.inlineEditBox.autoSave&&this.inlineEditBox.editing&&this.enableSave()){
+dojo.style(this.inlineEditBox.displayNode,{display:""});
+dijit.focus(this.inlineEditBox.displayNode);
+}
+},enableSave:function(){
+return (this.editWidget.isValid?this.editWidget.isValid():true);
+},focus:function(){
+this.editWidget.focus();
+setTimeout(dojo.hitch(this,function(){
+if(this.editWidget.focusNode.tagName=="INPUT"){
+dijit.selectInputText(this.editWidget.focusNode);
+}
+}),0);
+}});
+}
diff --git a/js/dojo/dijit/LICENSE b/js/dojo/dijit/LICENSE
--- a/js/dojo/dijit/LICENSE
+++ b/js/dojo/dijit/LICENSE
@@ -1,195 +1,195 @@
-Dojo is availble under *either* the terms of the modified BSD license *or* the
+Dojo is available under *either* the terms of the modified BSD license *or* the
Academic Free License version 2.1. As a recipient of Dojo, you may choose which
license to receive this code under (except as noted in per-module LICENSE
files). Some modules may not be the copyright of the Dojo Foundation. These
modules contain explicit declarations of copyright in both the LICENSE files in
the directories in which they reside and in the code itself. No external
contributions are allowed under licenses which are fundamentally incompatible
with the AFL or BSD licenses that Dojo is distributed under.
The text of the AFL and BSD licenses is reproduced below.
-------------------------------------------------------------------------------
The "New" BSD License:
**********************
-Copyright (c) 2005-2007, The Dojo Foundation
+Copyright (c) 2005-2009, The Dojo Foundation
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the Dojo Foundation nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-------------------------------------------------------------------------------
The Academic Free License, v. 2.1:
**********************************
This Academic Free License (the "License") applies to any original work of
authorship (the "Original Work") whose owner (the "Licensor") has placed the
following notice immediately following the copyright notice for the Original
Work:
Licensed under the Academic Free License version 2.1
1) Grant of Copyright License. Licensor hereby grants You a world-wide,
royalty-free, non-exclusive, perpetual, sublicenseable license to do the
following:
a) to reproduce the Original Work in copies;
b) to prepare derivative works ("Derivative Works") based upon the Original
Work;
c) to distribute copies of the Original Work and Derivative Works to the
public;
d) to perform the Original Work publicly; and
e) to display the Original Work publicly.
2) Grant of Patent License. Licensor hereby grants You a world-wide,
royalty-free, non-exclusive, perpetual, sublicenseable license, under patent
claims owned or controlled by the Licensor that are embodied in the Original
Work as furnished by the Licensor, to make, use, sell and offer for sale the
Original Work and Derivative Works.
3) Grant of Source Code License. The term "Source Code" means the preferred
form of the Original Work for making modifications to it and all available
documentation describing how to modify the Original Work. Licensor hereby
agrees to provide a machine-readable copy of the Source Code of the Original
Work along with each copy of the Original Work that Licensor distributes.
Licensor reserves the right to satisfy this obligation by placing a
machine-readable copy of the Source Code in an information repository
reasonably calculated to permit inexpensive and convenient access by You for as
long as Licensor continues to distribute the Original Work, and by publishing
the address of that information repository in a notice immediately following
the copyright notice that applies to the Original Work.
4) Exclusions From License Grant. Neither the names of Licensor, nor the names
of any contributors to the Original Work, nor any of their trademarks or
service marks, may be used to endorse or promote products derived from this
Original Work without express prior written permission of the Licensor. Nothing
in this License shall be deemed to grant any rights to trademarks, copyrights,
patents, trade secrets or any other intellectual property of Licensor except as
expressly stated herein. No patent license is granted to make, use, sell or
offer to sell embodiments of any patent claims other than the licensed claims
defined in Section 2. No right is granted to the trademarks of Licensor even if
such marks are included in the Original Work. Nothing in this License shall be
interpreted to prohibit Licensor from licensing under different terms from this
License any Original Work that Licensor otherwise would have a right to
license.
5) This section intentionally omitted.
6) Attribution Rights. You must retain, in the Source Code of any Derivative
Works that You create, all copyright, patent or trademark notices from the
Source Code of the Original Work, as well as any notices of licensing and any
descriptive text identified therein as an "Attribution Notice." You must cause
the Source Code for any Derivative Works that You create to carry a prominent
Attribution Notice reasonably calculated to inform recipients that You have
modified the Original Work.
7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that
the copyright in and to the Original Work and the patent rights granted herein
by Licensor are owned by the Licensor or are sublicensed to You under the terms
of this License with the permission of the contributor(s) of those copyrights
and patent rights. Except as expressly stated in the immediately proceeding
sentence, the Original Work is provided under this License on an "AS IS" BASIS
and WITHOUT WARRANTY, either express or implied, including, without limitation,
the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU.
This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No
license to Original Work is granted hereunder except under this disclaimer.
8) Limitation of Liability. Under no circumstances and under no legal theory,
whether in tort (including negligence), contract, or otherwise, shall the
Licensor be liable to any person for any direct, indirect, special, incidental,
or consequential damages of any character arising as a result of this License
or the use of the Original Work including, without limitation, damages for loss
of goodwill, work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses. This limitation of liability shall not
apply to liability for death or personal injury resulting from Licensor's
negligence to the extent applicable law prohibits such limitation. Some
jurisdictions do not allow the exclusion or limitation of incidental or
consequential damages, so this exclusion and limitation may not apply to You.
9) Acceptance and Termination. If You distribute copies of the Original Work or
a Derivative Work, You must make a reasonable effort under the circumstances to
obtain the express assent of recipients to the terms of this License. Nothing
else but this License (or another written agreement between Licensor and You)
grants You permission to create Derivative Works based upon the Original Work
or to exercise any of the rights granted in Section 1 herein, and any attempt
to do so except under the terms of this License (or another written agreement
between Licensor and You) is expressly prohibited by U.S. copyright law, the
equivalent laws of other countries, and by international treaty. Therefore, by
exercising any of the rights granted to You in Section 1 herein, You indicate
Your acceptance of this License and all of its terms and conditions.
10) Termination for Patent Action. This License shall terminate automatically
and You may no longer exercise any of the rights granted to You by this License
as of the date You commence an action, including a cross-claim or counterclaim,
against Licensor or any licensee alleging that the Original Work infringes a
patent. This termination provision shall not apply for an action alleging
patent infringement by combinations of the Original Work with other software or
hardware.
11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this
License may be brought only in the courts of a jurisdiction wherein the
Licensor resides or in which Licensor conducts its primary business, and under
the laws of that jurisdiction excluding its conflict-of-law provisions. The
application of the United Nations Convention on Contracts for the International
Sale of Goods is expressly excluded. Any use of the Original Work outside the
scope of this License or after its termination shall be subject to the
requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et
seq., the equivalent laws of other countries, and international treaty. This
section shall survive the termination of this License.
12) Attorneys Fees. In any action to enforce the terms of this License or
seeking damages relating thereto, the prevailing party shall be entitled to
recover its costs and expenses, including, without limitation, reasonable
attorneys' fees and costs incurred in connection with such action, including
any appeal of such action. This section shall survive the termination of this
License.
13) Miscellaneous. This License represents the complete agreement concerning
the subject matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent necessary to
make it enforceable.
14) Definition of "You" in This License. "You" throughout this License, whether
in upper or lower case, means an individual or a legal entity exercising rights
under, and complying with all of the terms of, this License. For legal
entities, "You" includes any entity that controls, is controlled by, or is
under common control with you. For purposes of this definition, "control" means
(i) the power, direct or indirect, to cause the direction or management of such
entity, whether by contract or otherwise, or (ii) ownership of fifty percent
(50%) or more of the outstanding shares, or (iii) beneficial ownership of such
entity.
15) Right to Use. You may use the Original Work in all ways not otherwise
restricted or conditioned by this License or by law, and Licensor promises not
to interfere with or be responsible for such uses by You.
This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved.
Permission is hereby granted to copy and distribute this license without
modification. This license may not be modified without the express written
permission of its copyright owner.
diff --git a/js/dojo/dijit/Menu.js b/js/dojo/dijit/Menu.js
--- a/js/dojo/dijit/Menu.js
+++ b/js/dojo/dijit/Menu.js
@@ -1,457 +1,332 @@
-if(!dojo._hasResource["dijit.Menu"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.Menu"] = true;
-dojo.provide("dijit.Menu");
-
-dojo.require("dijit._Widget");
-dojo.require("dijit._Container");
-dojo.require("dijit._Templated");
-
-dojo.declare(
- "dijit.Menu",
- [dijit._Widget, dijit._Templated, dijit._KeyNavContainer],
-{
- constructor: function() {
- this._bindings = [];
- },
-
- templateString:
- '<table class="dijit dijitMenu dijitReset dijitMenuTable" waiRole="menu" dojoAttachEvent="onkeypress:_onKeyPress">' +
- '<tbody class="dijitReset" dojoAttachPoint="containerNode"></tbody>'+
- '</table>',
-
- // targetNodeIds: String[]
- // Array of dom node ids of nodes to attach to.
- // Fill this with nodeIds upon widget creation and it becomes context menu for those nodes.
- targetNodeIds: [],
-
- // contextMenuForWindow: Boolean
- // if true, right clicking anywhere on the window will cause this context menu to open;
- // if false, must specify targetNodeIds
- contextMenuForWindow: false,
-
- // parentMenu: Widget
- // pointer to menu that displayed me
- parentMenu: null,
-
- // popupDelay: Integer
- // number of milliseconds before hovering (without clicking) causes the popup to automatically open
- popupDelay: 500,
-
- // _contextMenuWithMouse: Boolean
- // used to record mouse and keyboard events to determine if a context
- // menu is being opened with the keyboard or the mouse
- _contextMenuWithMouse: false,
-
- postCreate: function(){
- if(this.contextMenuForWindow){
- this.bindDomNode(dojo.body());
- }else{
- dojo.forEach(this.targetNodeIds, this.bindDomNode, this);
- }
- this.connectKeyNavHandlers([dojo.keys.UP_ARROW], [dojo.keys.DOWN_ARROW]);
- },
-
- startup: function(){
- dojo.forEach(this.getChildren(), function(child){ child.startup(); });
- this.startupKeyNavChildren();
- },
-
- onExecute: function(){
- // summary: attach point for notification about when a menu item has been executed
- },
-
- onCancel: function(/*Boolean*/ closeAll){
- // summary: attach point for notification about when the user cancels the current menu
- },
-
- _moveToPopup: function(/*Event*/ evt){
- if(this.focusedChild && this.focusedChild.popup && !this.focusedChild.disabled){
- this.focusedChild._onClick(evt);
- }
- },
-
- _onKeyPress: function(/*Event*/ evt){
- // summary
- // Handle keyboard based menu navigation.
- if(evt.ctrlKey || evt.altKey){ return; }
-
- switch(evt.keyCode){
- case dojo.keys.RIGHT_ARROW:
- this._moveToPopup(evt);
- dojo.stopEvent(evt);
- break;
- case dojo.keys.LEFT_ARROW:
- if(this.parentMenu){
- this.onCancel(false);
- }else{
- dojo.stopEvent(evt);
- }
- break;
- }
- },
-
- onItemHover: function(/*MenuItem*/ item){
- this.focusChild(item);
-
- if(this.focusedChild.popup && !this.focusedChild.disabled && !this.hover_timer){
- this.hover_timer = setTimeout(dojo.hitch(this, "_openPopup"), this.popupDelay);
- }
- },
-
- _onChildBlur: function(item){
- // Close all popups that are open and descendants of this menu
- dijit.popup.close(item.popup);
- item._blur();
- this._stopPopupTimer();
- },
-
- onItemUnhover: function(/*MenuItem*/ item){
- },
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- _stopPopupTimer: function(){
- if(this.hover_timer){
- clearTimeout(this.hover_timer);
- this.hover_timer = null;
- }
- },
-
- _getTopMenu: function(){
- for(var top=this; top.parentMenu; top=top.parentMenu);
- return top;
- },
-
- onItemClick: function(/*Widget*/ item){
- // summary: user defined function to handle clicks on an item
- // summary: internal function for clicks
- if(item.disabled){ return false; }
-
- if(item.popup){
- if(!this.is_open){
- this._openPopup();
- }
- }else{
- // before calling user defined handler, close hierarchy of menus
- // and restore focus to place it was when menu was opened
- this.onExecute();
-
- // user defined handler for click
- item.onClick();
- }
- },
-
- // thanks burstlib!
- _iframeContentWindow: function(/* HTMLIFrameElement */iframe_el) {
- // summary
- // returns the window reference of the passed iframe
- var win = dijit.getDocumentWindow(dijit.Menu._iframeContentDocument(iframe_el)) ||
- // Moz. TODO: is this available when defaultView isn't?
- dijit.Menu._iframeContentDocument(iframe_el)['__parent__'] ||
- (iframe_el.name && document.frames[iframe_el.name]) || null;
- return win; // Window
- },
-
- _iframeContentDocument: function(/* HTMLIFrameElement */iframe_el){
- // summary
- // returns a reference to the document object inside iframe_el
- var doc = iframe_el.contentDocument // W3
- || (iframe_el.contentWindow && iframe_el.contentWindow.document) // IE
- || (iframe_el.name && document.frames[iframe_el.name] && document.frames[iframe_el.name].document)
- || null;
- return doc; // HTMLDocument
- },
-
- bindDomNode: function(/*String|DomNode*/ node){
- // summary: attach menu to given node
- node = dojo.byId(node);
-
- //TODO: this is to support context popups in Editor. Maybe this shouldn't be in dijit.Menu
- var win = dijit.getDocumentWindow(node.ownerDocument);
- if(node.tagName.toLowerCase()=="iframe"){
- win = this._iframeContentWindow(node);
- node = dojo.withGlobal(win, dojo.body);
- }
-
- // to capture these events at the top level,
- // attach to document, not body
- var cn = (node == dojo.body() ? dojo.doc : node);
-
- node[this.id] = this._bindings.push([
- dojo.connect(cn, "oncontextmenu", this, "_openMyself"),
- dojo.connect(cn, "onkeydown", this, "_contextKey"),
- dojo.connect(cn, "onmousedown", this, "_contextMouse")
- ]);
- },
-
- unBindDomNode: function(/*String|DomNode*/ nodeName){
- // summary: detach menu from given node
- var node = dojo.byId(nodeName);
- var bid = node[this.id]-1, b = this._bindings[bid];
- dojo.forEach(b, dojo.disconnect);
- delete this._bindings[bid];
- },
-
- _contextKey: function(e){
- this._contextMenuWithMouse = false;
- if (e.keyCode == dojo.keys.F10) {
- dojo.stopEvent(e);
- if (e.shiftKey && e.type=="keydown") {
- // FF: copying the wrong property from e will cause the system
- // context menu to appear in spite of stopEvent. Don't know
- // exactly which properties cause this effect.
- var _e = { target: e.target, pageX: e.pageX, pageY: e.pageY };
- _e.preventDefault = _e.stopPropagation = function(){};
- // IE: without the delay, focus work in "open" causes the system
- // context menu to appear in spite of stopEvent.
- window.setTimeout(dojo.hitch(this, function(){ this._openMyself(_e); }), 1);
- }
- }
- },
-
- _contextMouse: function(e){
- this._contextMenuWithMouse = true;
- },
-
- _openMyself: function(/*Event*/ e){
- // summary:
- // Internal function for opening myself when the user
- // does a right-click or something similar
-
- dojo.stopEvent(e);
- // Get coordinates.
- // if we are opening the menu with the mouse or on safari open
- // the menu at the mouse cursor
- // (Safari does not have a keyboard command to open the context menu
- // and we don't currently have a reliable way to determine
- // _contextMenuWithMouse on Safari)
- var x,y;
- if(dojo.isSafari || this._contextMenuWithMouse){
- x=e.pageX;
- y=e.pageY;
- }else{
- // otherwise open near e.target
- var coords = dojo.coords(e.target, true);
- x = coords.x + 10;
- y = coords.y + 10;
- }
-
- var self=this;
- var savedFocus = dijit.getFocus(this);
- function closeAndRestoreFocus(){
- // user has clicked on a menu or popup
- dijit.focus(savedFocus);
- dijit.popup.close(self);
- }
- dijit.popup.open({
- popup: this,
- x: x,
- y: y,
- onExecute: closeAndRestoreFocus,
- onCancel: closeAndRestoreFocus,
- orient: this.isLeftToRight() ? 'L' : 'R'
- });
- this.focus();
-
- this._onBlur = function(){
- // Usually the parent closes the child widget but if this is a context
- // menu then there is no parent
- dijit.popup.close(this);
- // don't try to restore focus; user has clicked another part of the screen
- // and set focus there
- }
- },
-
- onOpen: function(/*Event*/ e){
- // summary
- // Open menu relative to the mouse
- this.isShowingNow = true;
- },
-
- onClose: function(){
- // summary: callback when this menu is closed
- this._stopPopupTimer();
- this.parentMenu = null;
- this.isShowingNow = false;
- this.currentPopup = null;
- if(this.focusedChild){
- this._onChildBlur(this.focusedChild);
- this.focusedChild = null;
- }
- },
-
- _openPopup: function(){
- // summary: open the popup to the side of the current menu item
- this._stopPopupTimer();
- var from_item = this.focusedChild;
- var popup = from_item.popup;
-
- if(popup.isShowingNow){ return; }
- popup.parentMenu = this;
- var self = this;
- dijit.popup.open({
- parent: this,
- popup: popup,
- around: from_item.arrowCell,
- orient: this.isLeftToRight() ? {'TR': 'TL', 'TL': 'TR'} : {'TL': 'TR', 'TR': 'TL'},
- onCancel: function(){
- // called when the child menu is canceled
- dijit.popup.close(popup);
- from_item.focus(); // put focus back on my node
- self.currentPopup = null;
- }
- });
-
- this.currentPopup = popup;
-
- if(popup.focus){
- popup.focus();
- }
- }
+if(!dojo._hasResource["dijit.Menu"]){
+dojo._hasResource["dijit.Menu"]=true;
+dojo.provide("dijit.Menu");
+dojo.require("dijit._Widget");
+dojo.require("dijit._KeyNavContainer");
+dojo.require("dijit._Templated");
+dojo.declare("dijit._MenuBase",[dijit._Widget,dijit._Templated,dijit._KeyNavContainer],{parentMenu:null,popupDelay:500,startup:function(){
+if(this._started){
+return;
+}
+dojo.forEach(this.getChildren(),function(_1){
+_1.startup();
+});
+this.startupKeyNavChildren();
+this.inherited(arguments);
+},onExecute:function(){
+},onCancel:function(_2){
+},_moveToPopup:function(_3){
+if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled){
+this.focusedChild._onClick(_3);
+}else{
+var _4=this._getTopMenu();
+if(_4&&_4._isMenuBar){
+_4.focusNext();
+}
+}
+},_onPopupHover:function(_5){
+if(this.currentPopup&&this.currentPopup._pendingClose_timer){
+var _6=this.currentPopup.parentMenu;
+if(_6.focusedChild){
+_6.focusedChild._setSelected(false);
+}
+_6.focusedChild=this.currentPopup.from_item;
+_6.focusedChild._setSelected(true);
+this._stopPendingCloseTimer(this.currentPopup);
+}
+},onItemHover:function(_7){
+if(this.isActive){
+this.focusChild(_7);
+if(this.focusedChild.popup&&!this.focusedChild.disabled&&!this.hover_timer){
+this.hover_timer=setTimeout(dojo.hitch(this,"_openPopup"),this.popupDelay);
+}
+}
+if(this.focusedChild){
+this.focusChild(_7);
+}
+this._hoveredChild=_7;
+},_onChildBlur:function(_8){
+this._stopPopupTimer();
+_8._setSelected(false);
+var _9=_8.popup;
+if(_9){
+this._stopPendingCloseTimer(_9);
+_9._pendingClose_timer=setTimeout(function(){
+_9._pendingClose_timer=null;
+if(_9.parentMenu){
+_9.parentMenu.currentPopup=null;
+}
+dijit.popup.close(_9);
+},this.popupDelay);
+}
+},onItemUnhover:function(_a){
+if(this.isActive){
+this._stopPopupTimer();
+}
+if(this._hoveredChild==_a){
+this._hoveredChild=null;
+}
+},_stopPopupTimer:function(){
+if(this.hover_timer){
+clearTimeout(this.hover_timer);
+this.hover_timer=null;
+}
+},_stopPendingCloseTimer:function(_b){
+if(_b._pendingClose_timer){
+clearTimeout(_b._pendingClose_timer);
+_b._pendingClose_timer=null;
+}
+},_stopFocusTimer:function(){
+if(this._focus_timer){
+clearTimeout(this._focus_timer);
+this._focus_timer=null;
+}
+},_getTopMenu:function(){
+for(var _c=this;_c.parentMenu;_c=_c.parentMenu){
+}
+return _c;
+},onItemClick:function(_d,_e){
+if(_d.disabled){
+return false;
+}
+if(typeof this.isShowingNow=="undefined"){
+this._markActive();
+}
+this.focusChild(_d);
+if(_d.popup){
+this._openPopup();
+}else{
+this.onExecute();
+_d.onClick(_e);
+}
+},_openPopup:function(){
+this._stopPopupTimer();
+var _f=this.focusedChild;
+if(!_f){
+return;
+}
+var _10=_f.popup;
+if(_10.isShowingNow){
+return;
+}
+if(this.currentPopup){
+this._stopPendingCloseTimer(this.currentPopup);
+dijit.popup.close(this.currentPopup);
+}
+_10.parentMenu=this;
+_10.from_item=_f;
+var _11=this;
+dijit.popup.open({parent:this,popup:_10,around:_f.domNode,orient:this._orient||(this.isLeftToRight()?{"TR":"TL","TL":"TR","BR":"BL","BL":"BR"}:{"TL":"TR","TR":"TL","BL":"BR","BR":"BL"}),onCancel:function(){
+_11.focusChild(_f);
+_11._cleanUp();
+_f._setSelected(true);
+_11.focusedChild=_f;
+},onExecute:dojo.hitch(this,"_cleanUp")});
+this.currentPopup=_10;
+_10.connect(_10.domNode,"onmouseenter",dojo.hitch(_11,"_onPopupHover"));
+if(_10.focus){
+_10._focus_timer=setTimeout(dojo.hitch(_10,function(){
+this._focus_timer=null;
+this.focus();
+}),0);
+}
+},_markActive:function(){
+this.isActive=true;
+dojo.addClass(this.domNode,"dijitMenuActive");
+dojo.removeClass(this.domNode,"dijitMenuPassive");
+},onOpen:function(e){
+this.isShowingNow=true;
+this._markActive();
+},_markInactive:function(){
+this.isActive=false;
+dojo.removeClass(this.domNode,"dijitMenuActive");
+dojo.addClass(this.domNode,"dijitMenuPassive");
+},onClose:function(){
+this._stopFocusTimer();
+this._markInactive();
+this.isShowingNow=false;
+this.parentMenu=null;
+},_closeChild:function(){
+this._stopPopupTimer();
+if(this.focusedChild){
+this.focusedChild._setSelected(false);
+this.focusedChild._onUnhover();
+this.focusedChild=null;
+}
+if(this.currentPopup){
+dijit.popup.close(this.currentPopup);
+this.currentPopup=null;
+}
+},_onItemFocus:function(_12){
+if(this._hoveredChild&&this._hoveredChild!=_12){
+this._hoveredChild._onUnhover();
}
-);
-
-dojo.declare(
- "dijit.MenuItem",
- [dijit._Widget, dijit._Templated, dijit._Contained],
-{
- // summary
- // A line item in a Menu2
-
- // Make 3 columns
- // icon, label, and expand arrow (BiDi-dependent) indicating sub-menu
- templateString:
- '<tr class="dijitReset dijitMenuItem"'
- +'dojoAttachEvent="onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick">'
- +'<td class="dijitReset"><div class="dijitMenuItemIcon ${iconClass}" dojoAttachPoint="iconNode" ></div></td>'
- +'<td tabIndex="-1" class="dijitReset dijitMenuItemLabel" dojoAttachPoint="containerNode" waiRole="menuitem"></td>'
- +'<td class="dijitReset" dojoAttachPoint="arrowCell">'
- +'<div class="dijitMenuExpand" dojoAttachPoint="expand" style="display:none">'
- +'<span class="dijitInline dijitArrowNode dijitMenuExpandInner">+</span>'
- +'</div>'
- +'</td>'
- +'</tr>',
-
- // label: String
- // menu text
- label: '',
-
- // iconClass: String
- // class to apply to div in button to make it display an icon
- iconClass: "",
-
- // disabled: Boolean
- // if true, the menu item is disabled
- // if false, the menu item is enabled
- disabled: false,
-
- postCreate: function(){
- dojo.setSelectable(this.domNode, false);
- this.setDisabled(this.disabled);
- if(this.label){
- this.containerNode.innerHTML=this.label;
- }
- },
-
- _onHover: function(){
- // summary: callback when mouse is moved onto menu item
- this.getParent().onItemHover(this);
- },
-
- _onUnhover: function(){
- // summary: callback when mouse is moved off of menu item
- // if we are unhovering the currently selected item
- // then unselect it
- this.getParent().onItemUnhover(this);
- },
-
- _onClick: function(evt){
- this.getParent().onItemClick(this);
- dojo.stopEvent(evt);
- },
-
- onClick: function() {
- // summary
- // User defined function to handle clicks
- },
-
- focus: function(){
- dojo.addClass(this.domNode, 'dijitMenuItemHover');
- try{
- dijit.focus(this.containerNode);
- }catch(e){
- // this throws on IE (at least) in some scenarios
- }
- },
-
- _blur: function(){
- dojo.removeClass(this.domNode, 'dijitMenuItemHover');
- },
-
- setDisabled: function(/*Boolean*/ value){
- // summary: enable or disable this menu item
- this.disabled = value;
- dojo[value ? "addClass" : "removeClass"](this.domNode, 'dijitMenuItemDisabled');
- dijit.setWaiState(this.containerNode, 'disabled', value ? 'true' : 'false');
- }
+},_onBlur:function(){
+this._cleanUp();
+this.inherited(arguments);
+},_cleanUp:function(){
+this._closeChild();
+if(typeof this.isShowingNow=="undefined"){
+this._markInactive();
+}
+}});
+dojo.declare("dijit.Menu",dijit._MenuBase,{constructor:function(){
+this._bindings=[];
+},templateString:dojo.cache("dijit","templates/Menu.html","<table class=\"dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable\" waiRole=\"menu\" tabIndex=\"${tabIndex}\" dojoAttachEvent=\"onkeypress:_onKeyPress\">\n\t<tbody class=\"dijitReset\" dojoAttachPoint=\"containerNode\"></tbody>\n</table>\n"),targetNodeIds:[],contextMenuForWindow:false,leftClickToOpen:false,refocus:true,_contextMenuWithMouse:false,postCreate:function(){
+if(this.contextMenuForWindow){
+this.bindDomNode(dojo.body());
+}else{
+dojo.forEach(this.targetNodeIds,this.bindDomNode,this);
+}
+var k=dojo.keys,l=this.isLeftToRight();
+this._openSubMenuKey=l?k.RIGHT_ARROW:k.LEFT_ARROW;
+this._closeSubMenuKey=l?k.LEFT_ARROW:k.RIGHT_ARROW;
+this.connectKeyNavHandlers([k.UP_ARROW],[k.DOWN_ARROW]);
+},_onKeyPress:function(evt){
+if(evt.ctrlKey||evt.altKey){
+return;
+}
+switch(evt.charOrCode){
+case this._openSubMenuKey:
+this._moveToPopup(evt);
+dojo.stopEvent(evt);
+break;
+case this._closeSubMenuKey:
+if(this.parentMenu){
+if(this.parentMenu._isMenuBar){
+this.parentMenu.focusPrev();
+}else{
+this.onCancel(false);
+}
+}else{
+dojo.stopEvent(evt);
+}
+break;
+}
+},_iframeContentWindow:function(_13){
+var win=dijit.getDocumentWindow(this._iframeContentDocument(_13))||this._iframeContentDocument(_13)["__parent__"]||(_13.name&&dojo.doc.frames[_13.name])||null;
+return win;
+},_iframeContentDocument:function(_14){
+var doc=_14.contentDocument||(_14.contentWindow&&_14.contentWindow.document)||(_14.name&&dojo.doc.frames[_14.name]&&dojo.doc.frames[_14.name].document)||null;
+return doc;
+},bindDomNode:function(_15){
+_15=dojo.byId(_15);
+var cn;
+if(_15.tagName.toLowerCase()=="iframe"){
+var _16=_15,win=this._iframeContentWindow(_16);
+cn=dojo.withGlobal(win,dojo.body);
+}else{
+cn=(_15==dojo.body()?dojo.doc.documentElement:_15);
+}
+var _17={node:_15,iframe:_16};
+dojo.attr(_15,"_dijitMenu"+this.id,this._bindings.push(_17));
+var _18=dojo.hitch(this,function(cn){
+return [dojo.connect(cn,(this.leftClickToOpen)?"onclick":"oncontextmenu",this,function(evt){
+this._openMyself(evt,cn,_16);
+}),dojo.connect(cn,"onkeydown",this,"_contextKey"),dojo.connect(cn,"onmousedown",this,"_contextMouse")];
+});
+_17.connects=cn?_18(cn):[];
+if(_16){
+_17.onloadHandler=dojo.hitch(this,function(){
+var win=this._iframeContentWindow(_16);
+cn=dojo.withGlobal(win,dojo.body);
+_17.connects=_18(cn);
});
-
-dojo.declare(
- "dijit.PopupMenuItem",
- dijit.MenuItem,
-{
- _fillContent: function(){
- // my inner HTML contains both the menu item text and a popup widget, like
- // <div dojoType="dijit.PopupMenuItem">
- // <span>pick me</span>
- // <popup> ... </popup>
- // </div>
- // the first part holds the menu item text and the second part is the popup
- if(this.srcNodeRef){
- var nodes = dojo.query("*", this.srcNodeRef);
- dijit.PopupMenuItem.superclass._fillContent.call(this, nodes[0]);
-
- // save pointer to srcNode so we can grab the drop down widget after it's instantiated
- this.dropDownContainer = this.srcNodeRef;
- }
- },
-
- startup: function(){
- // we didn't copy the dropdown widget from the this.srcNodeRef, so it's in no-man's
- // land now. move it to document.body.
- if(!this.popup){
- var node = dojo.query("[widgetId]", this.dropDownContainer)[0];
- this.popup = dijit.byNode(node);
- }
- dojo.body().appendChild(this.popup.domNode);
-
- this.popup.domNode.style.display="none";
- dojo.addClass(this.expand, "dijitMenuExpandEnabled");
- dojo.style(this.expand, "display", "");
- dijit.setWaiState(this.containerNode, "haspopup", "true");
- }
-});
-
-dojo.declare(
- "dijit.MenuSeparator",
- [dijit._Widget, dijit._Templated, dijit._Contained],
-{
- // summary
- // A line between two menu items
-
- templateString: '<tr class="dijitMenuSeparator"><td colspan=3>'
- +'<div class="dijitMenuSeparatorTop"></div>'
- +'<div class="dijitMenuSeparatorBottom"></div>'
- +'</td></tr>',
-
- postCreate: function(){
- dojo.setSelectable(this.domNode, false);
- },
-
- isFocusable: function(){
- // summary:
- // over ride to always return false
- return false;
- }
-});
-
+if(_16.addEventListener){
+_16.addEventListener("load",_17.onloadHandler,false);
+}else{
+_16.attachEvent("onload",_17.onloadHandler);
+}
+}
+},unBindDomNode:function(_19){
+var _1a;
+try{
+_1a=dojo.byId(_19);
+}
+catch(e){
+return;
+}
+var _1b="_dijitMenu"+this.id;
+if(_1a&&dojo.hasAttr(_1a,_1b)){
+var bid=dojo.attr(_1a,_1b)-1,b=this._bindings[bid];
+dojo.forEach(b.connects,dojo.disconnect);
+var _1c=b.iframe;
+if(_1c){
+if(_1c.removeEventListener){
+_1c.removeEventListener("load",b.onloadHandler,false);
+}else{
+_1c.detachEvent("onload",b.onloadHandler);
+}
+}
+dojo.removeAttr(_1a,_1b);
+delete this._bindings[bid];
+}
+},_contextKey:function(e){
+this._contextMenuWithMouse=false;
+if(e.keyCode==dojo.keys.F10){
+dojo.stopEvent(e);
+if(e.shiftKey&&e.type=="keydown"){
+var _1d={target:e.target,pageX:e.pageX,pageY:e.pageY};
+_1d.preventDefault=_1d.stopPropagation=function(){
+};
+window.setTimeout(dojo.hitch(this,function(){
+this._openMyself(_1d);
+}),1);
+}
}
+},_contextMouse:function(e){
+this._contextMenuWithMouse=true;
+},_openMyself:function(e,_1e,_1f){
+if(this.leftClickToOpen&&e.button>0){
+return;
+}
+dojo.stopEvent(e);
+var x,y;
+if(dojo.isSafari||this._contextMenuWithMouse){
+x=e.pageX;
+y=e.pageY;
+if(_1f){
+var od=e.target.ownerDocument,ifc=dojo.position(_1f,true),win=this._iframeContentWindow(_1f),_20=dojo.withGlobal(win,"_docScroll",dojo);
+var cs=dojo.getComputedStyle(_1f),tp=dojo._toPixelValue,_21=(dojo.isIE&&dojo.isQuirks?0:tp(_1f,cs.paddingLeft))+(dojo.isIE&&dojo.isQuirks?tp(_1f,cs.borderLeftWidth):0),top=(dojo.isIE&&dojo.isQuirks?0:tp(_1f,cs.paddingTop))+(dojo.isIE&&dojo.isQuirks?tp(_1f,cs.borderTopWidth):0);
+x+=ifc.x+_21-_20.x;
+y+=ifc.y+top-_20.y;
+}
+}else{
+var _22=dojo.position(e.target,true);
+x=_22.x+10;
+y=_22.y+10;
+}
+var _23=this;
+var _24=dijit.getFocus(this);
+function _25(){
+if(_23.refocus){
+dijit.focus(_24);
+}
+dijit.popup.close(_23);
+};
+dijit.popup.open({popup:this,x:x,y:y,onExecute:_25,onCancel:_25,orient:this.isLeftToRight()?"L":"R"});
+this.focus();
+this._onBlur=function(){
+this.inherited("_onBlur",arguments);
+dijit.popup.close(this);
+};
+},uninitialize:function(){
+dojo.forEach(this._bindings,function(b){
+if(b){
+this.unBindDomNode(b.node);
+}
+},this);
+this.inherited(arguments);
+}});
+dojo.require("dijit.MenuItem");
+dojo.require("dijit.PopupMenuItem");
+dojo.require("dijit.CheckedMenuItem");
+dojo.require("dijit.MenuSeparator");
+}
diff --git a/js/dojo/dijit/ProgressBar.js b/js/dojo/dijit/ProgressBar.js
--- a/js/dojo/dijit/ProgressBar.js
+++ b/js/dojo/dijit/ProgressBar.js
@@ -1,93 +1,59 @@
-if(!dojo._hasResource["dijit.ProgressBar"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.ProgressBar"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit.ProgressBar"]){
+dojo._hasResource["dijit.ProgressBar"]=true;
dojo.provide("dijit.ProgressBar");
-
dojo.require("dojo.fx");
dojo.require("dojo.number");
-
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
-
-dojo.declare("dijit.ProgressBar", [dijit._Widget, dijit._Templated], {
- // summary:
- // a progress widget
- //
- // usage:
- // <div dojoType="ProgressBar"
- // places="0"
- // progress="..." maximum="..."></div>
-
- // progress: String (Percentage or Number)
- // initial progress value.
- // with "%": percentage value, 0% <= progress <= 100%
- // or without "%": absolute value, 0 <= progress <= maximum
- progress: "0",
-
- // maximum: Float
- // max sample number
- maximum: 100,
-
- // places: Number
- // number of places to show in values; 0 by default
- places: 0,
-
- // indeterminate: Boolean
- // false: show progress
- // true: show that a process is underway but that the progress is unknown
- indeterminate: false,
-
- templateString:"<div class=\"dijitProgressBar dijitProgressBarEmpty\"\n\t><div waiRole=\"progressbar\" tabindex=\"0\" dojoAttachPoint=\"internalProgress\" class=\"dijitProgressBarFull\"\n\t\t><div class=\"dijitProgressBarTile\"></div\n\t\t><span style=\"visibility:hidden\">&nbsp;</span\n\t></div\n\t><div dojoAttachPoint=\"label\" class=\"dijitProgressBarLabel\" id=\"${id}_label\">&nbsp;</div\n\t><img dojoAttachPoint=\"inteterminateHighContrastImage\" class=\"dijitProgressBarIndeterminateHighContrastImage\"\n\t></img\n></div>\n",
-
- _indeterminateHighContrastImagePath:
- dojo.moduleUrl("dijit", "themes/a11y/indeterminate_progress.gif"),
-
- // public functions
- postCreate: function(){
- this.inherited("postCreate",arguments);
- this.inteterminateHighContrastImage.setAttribute("src",
- this._indeterminateHighContrastImagePath);
- this.update();
- },
-
- update: function(/*Object?*/attributes){
- // summary: update progress information
- //
- // attributes: may provide progress and/or maximum properties on this parameter,
- // see attribute specs for details.
- dojo.mixin(this, attributes||{});
- var percent = 1, classFunc;
- if(this.indeterminate){
- classFunc = "addClass";
- dijit.removeWaiState(this.internalProgress, "valuenow");
- dijit.removeWaiState(this.internalProgress, "valuemin");
- dijit.removeWaiState(this.internalProgress, "valuemax");
- }else{
- classFunc = "removeClass";
- if(String(this.progress).indexOf("%") != -1){
- percent = Math.min(parseFloat(this.progress)/100, 1);
- this.progress = percent * this.maximum;
- }else{
- this.progress = Math.min(this.progress, this.maximum);
- percent = this.progress / this.maximum;
- }
- var text = this.report(percent);
- this.label.firstChild.nodeValue = text;
- dijit.setWaiState(this.internalProgress, "describedby", this.label.id);
- dijit.setWaiState(this.internalProgress, "valuenow", this.progress);
- dijit.setWaiState(this.internalProgress, "valuemin", 0);
- dijit.setWaiState(this.internalProgress, "valuemax", this.maximum);
- }
- dojo[classFunc](this.domNode, "dijitProgressBarIndeterminate");
- this.internalProgress.style.width = (percent * 100) + "%";
- this.onChange();
- },
-
- report: function(/*float*/percent){
- // Generates message to show; may be overridden by user
- return dojo.number.format(percent, {type: "percent", places: this.places, locale: this.lang});
- },
-
- onChange: function(){}
-});
-
+dojo.declare("dijit.ProgressBar",[dijit._Widget,dijit._Templated],{progress:"0",maximum:100,places:0,indeterminate:false,name:"",templateString:dojo.cache("dijit","templates/ProgressBar.html","<div class=\"dijitProgressBar dijitProgressBarEmpty\"\n\t><div waiRole=\"progressbar\" dojoAttachPoint=\"internalProgress\" class=\"dijitProgressBarFull\"\n\t\t><div class=\"dijitProgressBarTile\"></div\n\t\t><span style=\"visibility:hidden\">&nbsp;</span\n\t></div\n\t><div dojoAttachPoint=\"label\" class=\"dijitProgressBarLabel\" id=\"${id}_label\">&nbsp;</div\n\t><img dojoAttachPoint=\"indeterminateHighContrastImage\" class=\"dijitProgressBarIndeterminateHighContrastImage\" alt=\"\"\n\t></img\n></div>\n"),_indeterminateHighContrastImagePath:dojo.moduleUrl("dijit","themes/a11y/indeterminate_progress.gif"),postCreate:function(){
+this.inherited(arguments);
+this.indeterminateHighContrastImage.setAttribute("src",this._indeterminateHighContrastImagePath.toString());
+this.update();
+},update:function(_1){
+dojo.mixin(this,_1||{});
+var _2=this.internalProgress;
+var _3=1,_4;
+if(this.indeterminate){
+_4="addClass";
+dijit.removeWaiState(_2,"valuenow");
+dijit.removeWaiState(_2,"valuemin");
+dijit.removeWaiState(_2,"valuemax");
+}else{
+_4="removeClass";
+if(String(this.progress).indexOf("%")!=-1){
+_3=Math.min(parseFloat(this.progress)/100,1);
+this.progress=_3*this.maximum;
+}else{
+this.progress=Math.min(this.progress,this.maximum);
+_3=this.progress/this.maximum;
}
+var _5=this.report(_3);
+this.label.firstChild.nodeValue=_5;
+dijit.setWaiState(_2,"describedby",this.label.id);
+dijit.setWaiState(_2,"valuenow",this.progress);
+dijit.setWaiState(_2,"valuemin",0);
+dijit.setWaiState(_2,"valuemax",this.maximum);
+}
+dojo[_4](this.domNode,"dijitProgressBarIndeterminate");
+_2.style.width=(_3*100)+"%";
+this.onChange();
+},_setValueAttr:function(v){
+if(v==Infinity){
+this.update({indeterminate:true});
+}else{
+this.update({indeterminate:false,progress:v});
+}
+},_getValueAttr:function(){
+return this.progress;
+},report:function(_6){
+return dojo.number.format(_6,{type:"percent",places:this.places,locale:this.lang});
+},onChange:function(){
+}});
+}
diff --git a/js/dojo/dijit/TitlePane.js b/js/dojo/dijit/TitlePane.js
--- a/js/dojo/dijit/TitlePane.js
+++ b/js/dojo/dijit/TitlePane.js
@@ -1,141 +1,116 @@
-if(!dojo._hasResource["dijit.TitlePane"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.TitlePane"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit.TitlePane"]){
+dojo._hasResource["dijit.TitlePane"]=true;
dojo.provide("dijit.TitlePane");
-
dojo.require("dojo.fx");
-
dojo.require("dijit._Templated");
dojo.require("dijit.layout.ContentPane");
-
-dojo.declare(
- "dijit.TitlePane",
- [dijit.layout.ContentPane, dijit._Templated],
-{
- // summary
- // A pane with a title on top, that can be opened or collapsed.
- //
- // title: String
- // Title of the pane
- title: "",
-
- // open: Boolean
- // Whether pane is opened or closed.
- open: true,
-
- // duration: Integer
- // Time in milliseconds to fade in/fade out
- duration: 250,
-
- // baseClass: String
- // the root className to use for the various states of this widget
- baseClass: "dijitTitlePane",
-
- templateString:"<div class=\"dijitTitlePane\">\n\t<div dojoAttachEvent=\"onclick:toggle,onkeypress: _onTitleKey,onfocus:_handleFocus,onblur:_handleFocus\" tabindex=\"0\"\n\t\t\twaiRole=\"button\" class=\"dijitTitlePaneTitle\" dojoAttachPoint=\"focusNode\">\n\t\t<div dojoAttachPoint=\"arrowNode\" class=\"dijitInline dijitArrowNode\"><span dojoAttachPoint=\"arrowNodeInner\" class=\"dijitArrowNodeInner\"></span></div>\n\t\t<div dojoAttachPoint=\"titleNode\" class=\"dijitTitlePaneTextNode\"></div>\n\t</div>\n\t<div class=\"dijitTitlePaneContentOuter\" dojoAttachPoint=\"hideNode\">\n\t\t<div class=\"dijitReset\" dojoAttachPoint=\"wipeNode\">\n\t\t\t<div class=\"dijitTitlePaneContentInner\" dojoAttachPoint=\"containerNode\" waiRole=\"region\" tabindex=\"-1\">\n\t\t\t\t<!-- nested divs because wipeIn()/wipeOut() doesn't work right on node w/padding etc. Put padding on inner div. -->\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n",
-
- postCreate: function(){
- this.setTitle(this.title);
- if(!this.open){
- this.hideNode.style.display = this.wipeNode.style.display = "none";
- }
- this._setCss();
- dojo.setSelectable(this.titleNode, false);
- this.inherited("postCreate",arguments);
- dijit.setWaiState(this.containerNode, "labelledby", this.titleNode.id);
- dijit.setWaiState(this.focusNode, "haspopup", "true");
-
- // setup open/close animations
- var hideNode = this.hideNode, wipeNode = this.wipeNode;
- this._wipeIn = dojo.fx.wipeIn({
- node: this.wipeNode,
- duration: this.duration,
- beforeBegin: function(){
- hideNode.style.display="";
- }
- });
- this._wipeOut = dojo.fx.wipeOut({
- node: this.wipeNode,
- duration: this.duration,
- onEnd: function(){
- hideNode.style.display="none";
- }
- });
- },
-
- setContent: function(content){
- // summary
- // Typically called when an href is loaded. Our job is to make the animation smooth
- if(this._wipeOut.status() == "playing"){
- // we are currently *closing* the pane, so just let that continue
- this.inherited("setContent",arguments);
- }else{
- if(this._wipeIn.status() == "playing"){
- this._wipeIn.stop();
- }
-
- // freeze container at current height so that adding new content doesn't make it jump
- dojo.marginBox(this.wipeNode, {h: dojo.marginBox(this.wipeNode).h});
-
- // add the new content (erasing the old content, if any)
- this.inherited("setContent",arguments);
-
- // call _wipeIn.play() to animate from current height to new height
- this._wipeIn.play();
- }
- },
-
- toggle: function(){
- // summary: switches between opened and closed state
- dojo.forEach([this._wipeIn, this._wipeOut], function(animation){
- if(animation.status() == "playing"){
- animation.stop();
- }
- });
-
- this[this.open ? "_wipeOut" : "_wipeIn"].play();
- this.open =! this.open;
-
- // load content (if this is the first time we are opening the TitlePane
- // and content is specified as an href, or we have setHref when hidden)
- this._loadCheck();
-
- this._setCss();
- },
-
- _setCss: function(){
- // summary: set the open/close css state for the TitlePane
- var classes = ["dijitClosed", "dijitOpen"];
- var boolIndex = this.open;
- dojo.removeClass(this.focusNode, classes[!boolIndex+0]);
- this.focusNode.className += " " + classes[boolIndex+0];
-
- // provide a character based indicator for images-off mode
- this.arrowNodeInner.innerHTML = this.open ? "-" : "+";
- },
-
- _onTitleKey: function(/*Event*/ e){
- // summary: callback when user hits a key
- if(e.keyCode == dojo.keys.ENTER || e.charCode == dojo.keys.SPACE){
- this.toggle();
- }
- else if(e.keyCode == dojo.keys.DOWN_ARROW){
- if(this.open){
- this.containerNode.focus();
- e.preventDefault();
- }
- }
- },
-
- _handleFocus: function(/*Event*/ e){
- // summary: handle blur and focus for this widget
-
- // add/removeClass is safe to call without hasClass in this case
- dojo[(e.type=="focus" ? "addClass" : "removeClass")](this.focusNode,this.baseClass+"Focused");
- },
-
- setTitle: function(/*String*/ title){
- // summary: sets the text of the title
- this.titleNode.innerHTML=title;
- }
+dojo.declare("dijit.TitlePane",[dijit.layout.ContentPane,dijit._Templated],{title:"",open:true,toggleable:true,tabIndex:"0",duration:dijit.defaultDuration,baseClass:"dijitTitlePane",templateString:dojo.cache("dijit","templates/TitlePane.html","<div class=\"${baseClass}\">\n\t<div dojoAttachEvent=\"onclick:_onTitleClick, onkeypress:_onTitleKey, onfocus:_handleFocus, onblur:_handleFocus, onmouseenter:_onTitleEnter, onmouseleave:_onTitleLeave\"\n\t\t\tclass=\"dijitTitlePaneTitle\" dojoAttachPoint=\"titleBarNode,focusNode\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" dojoAttachPoint=\"arrowNode\" class=\"dijitArrowNode\" waiRole=\"presentation\"\n\t\t><span dojoAttachPoint=\"arrowNodeInner\" class=\"dijitArrowNodeInner\"></span\n\t\t><span dojoAttachPoint=\"titleNode\" class=\"dijitTitlePaneTextNode\"></span>\n\t</div>\n\t<div class=\"dijitTitlePaneContentOuter\" dojoAttachPoint=\"hideNode\" waiRole=\"presentation\">\n\t\t<div class=\"dijitReset\" dojoAttachPoint=\"wipeNode\" waiRole=\"presentation\">\n\t\t\t<div class=\"dijitTitlePaneContentInner\" dojoAttachPoint=\"containerNode\" waiRole=\"region\" tabindex=\"-1\" id=\"${id}_pane\">\n\t\t\t\t<!-- nested divs because wipeIn()/wipeOut() doesn't work right on node w/padding etc. Put padding on inner div. -->\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n"),attributeMap:dojo.delegate(dijit.layout.ContentPane.prototype.attributeMap,{title:{node:"titleNode",type:"innerHTML"},tooltip:{node:"focusNode",type:"attribute",attribute:"title"},id:""}),postCreate:function(){
+if(!this.open){
+this.hideNode.style.display=this.wipeNode.style.display="none";
+}
+this._setCss();
+dojo.setSelectable(this.titleNode,false);
+dijit.setWaiState(this.containerNode,"hidden",this.open?"false":"true");
+dijit.setWaiState(this.focusNode,"pressed",this.open?"true":"false");
+var _1=this.hideNode,_2=this.wipeNode;
+this._wipeIn=dojo.fx.wipeIn({node:this.wipeNode,duration:this.duration,beforeBegin:function(){
+_1.style.display="";
+}});
+this._wipeOut=dojo.fx.wipeOut({node:this.wipeNode,duration:this.duration,onEnd:function(){
+_1.style.display="none";
+}});
+this.inherited(arguments);
+},_setOpenAttr:function(_3){
+if(this.open!==_3){
+this.toggle();
+}
+},_setToggleableAttr:function(_4){
+this.toggleable=_4;
+dijit.setWaiRole(this.focusNode,_4?"button":"heading");
+dojo.attr(this.focusNode,"tabIndex",_4?this.tabIndex:"-1");
+if(_4){
+dijit.setWaiState(this.focusNode,"controls",this.id+"_pane");
+}
+this._setCss();
+},_setContentAttr:function(_5){
+if(!this.open||!this._wipeOut||this._wipeOut.status()=="playing"){
+this.inherited(arguments);
+}else{
+if(this._wipeIn&&this._wipeIn.status()=="playing"){
+this._wipeIn.stop();
+}
+dojo.marginBox(this.wipeNode,{h:dojo.marginBox(this.wipeNode).h});
+this.inherited(arguments);
+if(this._wipeIn){
+this._wipeIn.play();
+}else{
+this.hideNode.style.display="";
+}
+}
+},toggle:function(){
+dojo.forEach([this._wipeIn,this._wipeOut],function(_6){
+if(_6&&_6.status()=="playing"){
+_6.stop();
+}
});
-
+var _7=this[this.open?"_wipeOut":"_wipeIn"];
+if(_7){
+_7.play();
+}else{
+this.hideNode.style.display=this.open?"":"none";
+}
+this.open=!this.open;
+dijit.setWaiState(this.containerNode,"hidden",this.open?"false":"true");
+dijit.setWaiState(this.focusNode,"pressed",this.open?"true":"false");
+if(this.open){
+this._onShow();
+}else{
+this.onHide();
+}
+this._setCss();
+},_setCss:function(){
+var _8=this.titleBarNode||this.focusNode;
+if(this._titleBarClass){
+dojo.removeClass(_8,this._titleBarClass);
}
+this._titleBarClass="dijit"+(this.toggleable?"":"Fixed")+(this.open?"Open":"Closed");
+dojo.addClass(_8,this._titleBarClass);
+this.arrowNodeInner.innerHTML=this.open?"-":"+";
+},_onTitleKey:function(e){
+if(e.charOrCode==dojo.keys.ENTER||e.charOrCode==" "){
+if(this.toggleable){
+this.toggle();
+}
+dojo.stopEvent(e);
+}else{
+if(e.charOrCode==dojo.keys.DOWN_ARROW&&this.open){
+this.containerNode.focus();
+e.preventDefault();
+}
+}
+},_onTitleEnter:function(){
+if(this.toggleable){
+dojo.addClass(this.focusNode,"dijitTitlePaneTitle-hover");
+}
+},_onTitleLeave:function(){
+if(this.toggleable){
+dojo.removeClass(this.focusNode,"dijitTitlePaneTitle-hover");
+}
+},_onTitleClick:function(){
+if(this.toggleable){
+this.toggle();
+}
+},_handleFocus:function(e){
+dojo.toggleClass(this.focusNode,this.baseClass+"Focused",e.type=="focus");
+},setTitle:function(_9){
+dojo.deprecated("dijit.TitlePane.setTitle() is deprecated. Use attr('title', ...) instead.","","2.0");
+this.attr("title",_9);
+}});
+}
diff --git a/js/dojo/dijit/Toolbar.js b/js/dojo/dijit/Toolbar.js
--- a/js/dojo/dijit/Toolbar.js
+++ b/js/dojo/dijit/Toolbar.js
@@ -1,47 +1,24 @@
-if(!dojo._hasResource["dijit.Toolbar"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.Toolbar"] = true;
-dojo.provide("dijit.Toolbar");
-
-dojo.require("dijit._Widget");
-dojo.require("dijit._Container");
-dojo.require("dijit._Templated");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.declare(
- "dijit.Toolbar",
- [dijit._Widget, dijit._Templated, dijit._KeyNavContainer],
-{
- templateString:
- '<div class="dijit dijitToolbar" waiRole="toolbar" tabIndex="${tabIndex}" dojoAttachPoint="containerNode">' +
-// '<table style="table-layout: fixed" class="dijitReset dijitToolbarTable">' + // factor out style
-// '<tr class="dijitReset" dojoAttachPoint="containerNode"></tr>'+
-// '</table>' +
- '</div>',
-
- tabIndex: "0",
- postCreate: function(){
- this.connectKeyNavHandlers(
- this.isLeftToRight() ? [dojo.keys.LEFT_ARROW] : [dojo.keys.RIGHT_ARROW],
- this.isLeftToRight() ? [dojo.keys.RIGHT_ARROW] : [dojo.keys.LEFT_ARROW]
- );
- },
-
- startup: function(){
- this.startupKeyNavChildren();
- }
+if(!dojo._hasResource["dijit.Toolbar"]){
+dojo._hasResource["dijit.Toolbar"]=true;
+dojo.provide("dijit.Toolbar");
+dojo.require("dijit._Widget");
+dojo.require("dijit._KeyNavContainer");
+dojo.require("dijit._Templated");
+dojo.declare("dijit.Toolbar",[dijit._Widget,dijit._Templated,dijit._KeyNavContainer],{templateString:"<div class=\"dijit dijitToolbar\" waiRole=\"toolbar\" tabIndex=\"${tabIndex}\" dojoAttachPoint=\"containerNode\">"+"</div>",postCreate:function(){
+this.connectKeyNavHandlers(this.isLeftToRight()?[dojo.keys.LEFT_ARROW]:[dojo.keys.RIGHT_ARROW],this.isLeftToRight()?[dojo.keys.RIGHT_ARROW]:[dojo.keys.LEFT_ARROW]);
+},startup:function(){
+if(this._started){
+return;
}
-);
-
-// Combine with dijit.MenuSeparator??
-dojo.declare(
- "dijit.ToolbarSeparator",
- [ dijit._Widget, dijit._Templated ],
-{
- // summary
- // A line between two menu items
- templateString: '<div class="dijitToolbarSeparator dijitInline"></div>',
- postCreate: function(){ dojo.setSelectable(this.domNode, false); },
- isFocusable: function(){ return false; }
-});
-
+this.startupKeyNavChildren();
+this.inherited(arguments);
+}});
+dojo.require("dijit.ToolbarSeparator");
}
diff --git a/js/dojo/dijit/Tooltip.js b/js/dojo/dijit/Tooltip.js
--- a/js/dojo/dijit/Tooltip.js
+++ b/js/dojo/dijit/Tooltip.js
@@ -1,230 +1,158 @@
-if(!dojo._hasResource["dijit.Tooltip"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.Tooltip"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit.Tooltip"]){
+dojo._hasResource["dijit.Tooltip"]=true;
dojo.provide("dijit.Tooltip");
-
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
-
-dojo.declare(
- "dijit._MasterTooltip",
- [dijit._Widget, dijit._Templated],
- {
- // summary
- // Internal widget that holds the actual tooltip markup,
- // which occurs once per page.
- // Called by Tooltip widgets which are just containers to hold
- // the markup
-
- // duration: Integer
- // Milliseconds to fade in/fade out
- duration: 200,
-
- templateString:"<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\">\n\t<div class=\"dijitTooltipContainer dijitTooltipContents\" dojoAttachPoint=\"containerNode\" waiRole='alert'></div>\n\t<div class=\"dijitTooltipConnector\"></div>\n</div>\n",
-
- postCreate: function(){
- dojo.body().appendChild(this.domNode);
-
- this.bgIframe = new dijit.BackgroundIframe(this.domNode);
-
- // Setup fade-in and fade-out functions.
- this.fadeIn = dojo.fadeIn({ node: this.domNode, duration: this.duration, onEnd: dojo.hitch(this, "_onShow") });
- this.fadeOut = dojo.fadeOut({ node: this.domNode, duration: this.duration, onEnd: dojo.hitch(this, "_onHide") });
-
- },
-
- show: function(/*String*/ innerHTML, /*DomNode*/ aroundNode){
- // summary:
- // Display tooltip w/specified contents to right specified node
- // (To left if there's no space on the right, or if LTR==right)
-
- if(this.aroundNode && this.aroundNode === aroundNode){
- return;
- }
-
- if(this.fadeOut.status() == "playing"){
- // previous tooltip is being hidden; wait until the hide completes then show new one
- this._onDeck=arguments;
- return;
- }
- this.containerNode.innerHTML=innerHTML;
-
- // Firefox bug. when innerHTML changes to be shorter than previous
- // one, the node size will not be updated until it moves.
- this.domNode.style.top = (this.domNode.offsetTop + 1) + "px";
-
- // position the element and change CSS according to position
- var align = this.isLeftToRight() ? {'BR': 'BL', 'BL': 'BR'} : {'BL': 'BR', 'BR': 'BL'};
- var pos = dijit.placeOnScreenAroundElement(this.domNode, aroundNode, align);
- this.domNode.className="dijitTooltip dijitTooltip" + (pos.corner=='BL' ? "Right" : "Left");//FIXME: might overwrite class
-
- // show it
- dojo.style(this.domNode, "opacity", 0);
- this.fadeIn.play();
- this.isShowingNow = true;
- this.aroundNode = aroundNode;
- },
-
- _onShow: function(){
- if(dojo.isIE){
- // the arrow won't show up on a node w/an opacity filter
- this.domNode.style.filter="";
- }
- },
-
- hide: function(aroundNode){
- // summary: hide the tooltip
- if(!this.aroundNode || this.aroundNode !== aroundNode){
- return;
- }
- if(this._onDeck){
- // this hide request is for a show() that hasn't even started yet;
- // just cancel the pending show()
- this._onDeck=null;
- return;
- }
- this.fadeIn.stop();
- this.isShowingNow = false;
- this.aroundNode = null;
- this.fadeOut.play();
- },
-
- _onHide: function(){
- this.domNode.style.cssText=""; // to position offscreen again
- if(this._onDeck){
- // a show request has been queued up; do it now
- this.show.apply(this, this._onDeck);
- this._onDeck=null;
- }
- }
-
- }
-);
-
-dijit.showTooltip = function(/*String*/ innerHTML, /*DomNode*/ aroundNode){
- // summary:
- // Display tooltip w/specified contents to right specified node
- // (To left if there's no space on the right, or if LTR==right)
- if(!dijit._masterTT){ dijit._masterTT = new dijit._MasterTooltip(); }
- return dijit._masterTT.show(innerHTML, aroundNode);
+dojo.declare("dijit._MasterTooltip",[dijit._Widget,dijit._Templated],{duration:dijit.defaultDuration,templateString:dojo.cache("dijit","templates/Tooltip.html","<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\">\n\t<div class=\"dijitTooltipContainer dijitTooltipContents\" dojoAttachPoint=\"containerNode\" waiRole='alert'></div>\n\t<div class=\"dijitTooltipConnector\"></div>\n</div>\n"),postCreate:function(){
+dojo.body().appendChild(this.domNode);
+this.bgIframe=new dijit.BackgroundIframe(this.domNode);
+this.fadeIn=dojo.fadeIn({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onShow")});
+this.fadeOut=dojo.fadeOut({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onHide")});
+},show:function(_1,_2,_3){
+if(this.aroundNode&&this.aroundNode===_2){
+return;
+}
+if(this.fadeOut.status()=="playing"){
+this._onDeck=arguments;
+return;
+}
+this.containerNode.innerHTML=_1;
+this.domNode.style.top=(this.domNode.offsetTop+1)+"px";
+var _4=dijit.placeOnScreenAroundElement(this.domNode,_2,dijit.getPopupAroundAlignment((_3&&_3.length)?_3:dijit.Tooltip.defaultPosition,this.isLeftToRight()),dojo.hitch(this,"orient"));
+dojo.style(this.domNode,"opacity",0);
+this.fadeIn.play();
+this.isShowingNow=true;
+this.aroundNode=_2;
+},orient:function(_5,_6,_7){
+_5.className="dijitTooltip "+{"BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[_6+"-"+_7];
+},_onShow:function(){
+if(dojo.isIE){
+this.domNode.style.filter="";
+}
+},hide:function(_8){
+if(this._onDeck&&this._onDeck[1]==_8){
+this._onDeck=null;
+}else{
+if(this.aroundNode===_8){
+this.fadeIn.stop();
+this.isShowingNow=false;
+this.aroundNode=null;
+this.fadeOut.play();
+}else{
+}
+}
+},_onHide:function(){
+this.domNode.style.cssText="";
+if(this._onDeck){
+this.show.apply(this,this._onDeck);
+this._onDeck=null;
+}
+}});
+dijit.showTooltip=function(_9,_a,_b){
+if(!dijit._masterTT){
+dijit._masterTT=new dijit._MasterTooltip();
+}
+return dijit._masterTT.show(_9,_a,_b);
};
-
-dijit.hideTooltip = function(aroundNode){
- // summary: hide the tooltip
- if(!dijit._masterTT){ dijit._masterTT = new dijit._MasterTooltip(); }
- return dijit._masterTT.hide(aroundNode);
+dijit.hideTooltip=function(_c){
+if(!dijit._masterTT){
+dijit._masterTT=new dijit._MasterTooltip();
+}
+return dijit._masterTT.hide(_c);
};
-
-dojo.declare(
- "dijit.Tooltip",
- dijit._Widget,
- {
- // summary
- // Pops up a tooltip (a help message) when you hover over a node.
-
- // label: String
- // Text to display in the tooltip.
- // Specified as innerHTML when creating the widget from markup.
- label: "",
-
- // showDelay: Integer
- // Number of milliseconds to wait after hovering over/focusing on the object, before
- // the tooltip is displayed.
- showDelay: 400,
-
- // connectId: String[]
- // Id(s) of domNodes to attach the tooltip to.
- // When user hovers over any of the specified dom nodes, the tooltip will appear.
- connectId: [],
-
- postCreate: function(){
- if(this.srcNodeRef){
- this.srcNodeRef.style.display = "none";
- }
-
- this._connectNodes = [];
-
- dojo.forEach(this.connectId, function(id) {
- var node = dojo.byId(id);
- if (node) {
- this._connectNodes.push(node);
- dojo.forEach(["onMouseOver", "onMouseOut", "onFocus", "onBlur", "onHover", "onUnHover"], function(event){
- this.connect(node, event.toLowerCase(), "_"+event);
- }, this);
- if(dojo.isIE){
- // BiDi workaround
- node.style.zoom = 1;
- }
- }
- }, this);
- },
-
- _onMouseOver: function(/*Event*/ e){
- this._onHover(e);
- },
-
- _onMouseOut: function(/*Event*/ e){
- if(dojo.isDescendant(e.relatedTarget, e.target)){
- // false event; just moved from target to target child; ignore.
- return;
- }
- this._onUnHover(e);
- },
-
- _onFocus: function(/*Event*/ e){
- this._focus = true;
- this._onHover(e);
- },
-
- _onBlur: function(/*Event*/ e){
- this._focus = false;
- this._onUnHover(e);
- },
-
- _onHover: function(/*Event*/ e){
- if(!this._showTimer){
- var target = e.target;
- this._showTimer = setTimeout(dojo.hitch(this, function(){this.open(target)}), this.showDelay);
- }
- },
-
- _onUnHover: function(/*Event*/ e){
- // keep a tooltip open if the associated element has focus
- if(this._focus){ return; }
- if(this._showTimer){
- clearTimeout(this._showTimer);
- delete this._showTimer;
- }
- this.close();
- },
-
- open: function(/*DomNode*/ target){
- // summary: display the tooltip; usually not called directly.
- target = target || this._connectNodes[0];
- if(!target){ return; }
-
- if(this._showTimer){
- clearTimeout(this._showTimer);
- delete this._showTimer;
- }
- dijit.showTooltip(this.label || this.domNode.innerHTML, target);
-
- this._connectNode = target;
- },
-
- close: function(){
- // summary: hide the tooltip; usually not called directly.
- dijit.hideTooltip(this._connectNode);
- delete this._connectNode;
- if(this._showTimer){
- clearTimeout(this._showTimer);
- delete this._showTimer;
- }
- },
-
- uninitialize: function(){
- this.close();
- }
- }
-);
-
+dojo.declare("dijit.Tooltip",dijit._Widget,{label:"",showDelay:400,connectId:[],position:[],constructor:function(){
+this._nodeConnectionsById={};
+},_setConnectIdAttr:function(_d){
+for(var _e in this._nodeConnectionsById){
+this.removeTarget(_e);
+}
+dojo.forEach(dojo.isArrayLike(_d)?_d:[_d],this.addTarget,this);
+},_getConnectIdAttr:function(){
+var _f=[];
+for(var id in this._nodeConnectionsById){
+_f.push(id);
+}
+return _f;
+},addTarget:function(id){
+var _10=dojo.byId(id);
+if(!_10){
+return;
+}
+if(_10.id in this._nodeConnectionsById){
+return;
+}
+this._nodeConnectionsById[_10.id]=[this.connect(_10,"onmouseenter","_onTargetMouseEnter"),this.connect(_10,"onmouseleave","_onTargetMouseLeave"),this.connect(_10,"onfocus","_onTargetFocus"),this.connect(_10,"onblur","_onTargetBlur")];
+if(dojo.isIE&&!_10.style.zoom){
+_10.style.zoom=1;
+}
+},removeTarget:function(_11){
+var id=_11.id||_11;
+if(id in this._nodeConnectionsById){
+dojo.forEach(this._nodeConnectionsById[id],this.disconnect,this);
+delete this._nodeConnectionsById[id];
}
+},postCreate:function(){
+dojo.addClass(this.domNode,"dijitTooltipData");
+},startup:function(){
+this.inherited(arguments);
+var ids=this.connectId;
+dojo.forEach(dojo.isArrayLike(ids)?ids:[ids],this.addTarget,this);
+},_onTargetMouseEnter:function(e){
+this._onHover(e);
+},_onTargetMouseLeave:function(e){
+this._onUnHover(e);
+},_onTargetFocus:function(e){
+this._focus=true;
+this._onHover(e);
+},_onTargetBlur:function(e){
+this._focus=false;
+this._onUnHover(e);
+},_onHover:function(e){
+if(!this._showTimer){
+var _12=e.target;
+this._showTimer=setTimeout(dojo.hitch(this,function(){
+this.open(_12);
+}),this.showDelay);
+}
+},_onUnHover:function(e){
+if(this._focus){
+return;
+}
+if(this._showTimer){
+clearTimeout(this._showTimer);
+delete this._showTimer;
+}
+this.close();
+},open:function(_13){
+if(this._showTimer){
+clearTimeout(this._showTimer);
+delete this._showTimer;
+}
+dijit.showTooltip(this.label||this.domNode.innerHTML,_13,this.position);
+this._connectNode=_13;
+this.onShow(_13,this.position);
+},close:function(){
+if(this._connectNode){
+dijit.hideTooltip(this._connectNode);
+delete this._connectNode;
+this.onHide();
+}
+if(this._showTimer){
+clearTimeout(this._showTimer);
+delete this._showTimer;
+}
+},onShow:function(_14,_15){
+},onHide:function(){
+},uninitialize:function(){
+this.close();
+this.inherited(arguments);
+}});
+dijit.Tooltip.defaultPosition=["after","before"];
+}
diff --git a/js/dojo/dijit/Tree.js b/js/dojo/dijit/Tree.js
--- a/js/dojo/dijit/Tree.js
+++ b/js/dojo/dijit/Tree.js
@@ -1,914 +1,665 @@
-if(!dojo._hasResource["dijit.Tree"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.Tree"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit.Tree"]){
+dojo._hasResource["dijit.Tree"]=true;
dojo.provide("dijit.Tree");
-
dojo.require("dojo.fx");
-
+dojo.require("dojo.DeferredList");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit._Container");
+dojo.require("dijit._Contained");
dojo.require("dojo.cookie");
-
-dojo.declare(
- "dijit._TreeNode",
- [dijit._Widget, dijit._Templated, dijit._Container, dijit._Contained],
-{
- // summary
- // Single node within a tree
-
- // item: dojo.data.Item
- // the dojo.data entry this tree represents
- item: null,
-
- isTreeNode: true,
-
- // label: String
- // Text of this tree node
- label: "",
-
- isExpandable: null, // show expando node
-
- isExpanded: false,
-
- // state: String
- // dynamic loading-related stuff.
- // When an empty folder node appears, it is "UNCHECKED" first,
- // then after dojo.data query it becomes "LOADING" and, finally "LOADED"
- state: "UNCHECKED",
-
- templateString:"<div class=\"dijitTreeNode dijitTreeExpandLeaf dijitTreeChildrenNo\" waiRole=\"presentation\"\n\t><span dojoAttachPoint=\"expandoNode\" class=\"dijitTreeExpando\" waiRole=\"presentation\"\n\t></span\n\t><span dojoAttachPoint=\"expandoNodeText\" class=\"dijitExpandoText\" waiRole=\"presentation\"\n\t></span\n\t>\n\t<div dojoAttachPoint=\"contentNode\" class=\"dijitTreeContent\" waiRole=\"presentation\">\n\t\t<div dojoAttachPoint=\"iconNode\" class=\"dijitInline dijitTreeIcon\" waiRole=\"presentation\"></div>\n\t\t<span dojoAttachPoint=\"labelNode\" class=\"dijitTreeLabel\" wairole=\"treeitem\" tabindex=\"-1\"></span>\n\t</div>\n</div>\n",
-
- postCreate: function(){
- // set label, escaping special characters
- this.setLabelNode(this.label);
-
- // set expand icon for leaf
- this._setExpando();
-
- // set icon and label class based on item
- this._updateItemClasses(this.item);
-
- if(this.isExpandable){
- dijit.setWaiState(this.labelNode, "expanded", this.isExpanded);
- }
- },
-
- markProcessing: function(){
- // summary: visually denote that tree is loading data, etc.
- this.state = "LOADING";
- this._setExpando(true);
- },
-
- unmarkProcessing: function(){
- // summary: clear markup from markProcessing() call
- this._setExpando(false);
- },
-
- _updateItemClasses: function(item){
- // summary: set appropriate CSS classes for item (used to allow for item updates to change respective CSS)
- this.iconNode.className = "dijitInline dijitTreeIcon " + this.tree.getIconClass(item);
- this.labelNode.className = "dijitTreeLabel " + this.tree.getLabelClass(item);
- },
-
- _updateLayout: function(){
- // summary: set appropriate CSS classes for this.domNode
- var parent = this.getParent();
- if(parent && parent.isTree && parent._hideRoot){
- /* if we are hiding the root node then make every first level child look like a root node */
- dojo.addClass(this.domNode, "dijitTreeIsRoot");
- }else{
- dojo.toggleClass(this.domNode, "dijitTreeIsLast", !this.getNextSibling());
- }
- },
-
- _setExpando: function(/*Boolean*/ processing){
- // summary: set the right image for the expando node
-
- // apply the appropriate class to the expando node
- var styles = ["dijitTreeExpandoLoading", "dijitTreeExpandoOpened",
- "dijitTreeExpandoClosed", "dijitTreeExpandoLeaf"];
- var idx = processing ? 0 : (this.isExpandable ? (this.isExpanded ? 1 : 2) : 3);
- dojo.forEach(styles,
- function(s){
- dojo.removeClass(this.expandoNode, s);
- }, this
- );
- dojo.addClass(this.expandoNode, styles[idx]);
-
- // provide a non-image based indicator for images-off mode
- this.expandoNodeText.innerHTML =
- processing ? "*" :
- (this.isExpandable ?
- (this.isExpanded ? "-" : "+") : "*");
- },
-
- expand: function(){
- // summary: show my children
- if(this.isExpanded){ return; }
- // cancel in progress collapse operation
- if(this._wipeOut.status() == "playing"){
- this._wipeOut.stop();
- }
-
- this.isExpanded = true;
- dijit.setWaiState(this.labelNode, "expanded", "true");
- dijit.setWaiRole(this.containerNode, "group");
-
- this._setExpando();
-
- this._wipeIn.play();
- },
-
- collapse: function(){
- if(!this.isExpanded){ return; }
-
- // cancel in progress expand operation
- if(this._wipeIn.status() == "playing"){
- this._wipeIn.stop();
- }
-
- this.isExpanded = false;
- dijit.setWaiState(this.labelNode, "expanded", "false");
- this._setExpando();
-
- this._wipeOut.play();
- },
-
- setLabelNode: function(label){
- this.labelNode.innerHTML="";
- this.labelNode.appendChild(document.createTextNode(label));
- },
-
- _setChildren: function(/* Object[] */ childrenArray){
- // summary:
- // Sets the children of this node.
- // Sets this.isExpandable based on whether or not there are children
- // Takes array of objects like: {label: ...} (_TreeNode options basically)
- // See parameters of _TreeNode for details.
-
- this.destroyDescendants();
-
- this.state = "LOADED";
- var nodeMap= {};
- if(childrenArray && childrenArray.length > 0){
- this.isExpandable = true;
- if(!this.containerNode){ // maybe this node was unfolderized and still has container
- this.containerNode = this.tree.containerNodeTemplate.cloneNode(true);
- this.domNode.appendChild(this.containerNode);
- }
-
- // Create _TreeNode widget for each specified tree node
- dojo.forEach(childrenArray, function(childParams){
- var child = new dijit._TreeNode(dojo.mixin({
- tree: this.tree,
- label: this.tree.getLabel(childParams.item)
- }, childParams));
- this.addChild(child);
- var identity = this.tree.store.getIdentity(childParams.item);
- nodeMap[identity] = child;
- if(this.tree.persist){
- if(this.tree._openedItemIds[identity]){
- this.tree._expandNode(child);
- }
- }
- }, this);
-
- // note that updateLayout() needs to be called on each child after
- // _all_ the children exist
- dojo.forEach(this.getChildren(), function(child, idx){
- child._updateLayout();
- });
- }else{
- this.isExpandable=false;
- }
-
- if(this._setExpando){
- // change expando to/form dot or + icon, as appropriate
- this._setExpando(false);
- }
-
- if(this.isTree && this._hideRoot){
- // put first child in tab index if one exists.
- var fc = this.getChildren()[0];
- var tabnode = fc ? fc.labelNode : this.domNode;
- tabnode.setAttribute("tabIndex", "0");
- }
-
- // create animations for showing/hiding the children (if children exist)
- if(this.containerNode && !this._wipeIn){
- this._wipeIn = dojo.fx.wipeIn({node: this.containerNode, duration: 150});
- this._wipeOut = dojo.fx.wipeOut({node: this.containerNode, duration: 150});
- }
-
- return nodeMap;
- },
-
- _addChildren: function(/* object[] */ childrenArray){
- // summary:
- // adds the children to this node.
- // Takes array of objects like: {label: ...} (_TreeNode options basically)
-
- // See parameters of _TreeNode for details.
- var nodeMap = {};
- if(childrenArray && childrenArray.length > 0){
- dojo.forEach(childrenArray, function(childParams){
- var child = new dijit._TreeNode(
- dojo.mixin({
- tree: this.tree,
- label: this.tree.getLabel(childParams.item)
- }, childParams)
- );
- this.addChild(child);
- nodeMap[this.tree.store.getIdentity(childParams.item)] = child;
- }, this);
-
- dojo.forEach(this.getChildren(), function(child, idx){
- child._updateLayout();
- });
- }
-
- return nodeMap;
- },
-
- deleteNode: function(/* treeNode */ node){
- node.destroy();
-
- var children = this.getChildren();
- if(children.length == 0){
- this.isExpandable = false;
- this.collapse();
- }
-
- dojo.forEach(children, function(child){
- child._updateLayout();
- });
- },
-
- makeExpandable: function(){
- //summary
- // if this node wasn't already showing the expando node,
- // turn it into one and call _setExpando()
- this.isExpandable = true;
- this._setExpando(false);
- }
+dojo.declare("dijit._TreeNode",[dijit._Widget,dijit._Templated,dijit._Container,dijit._Contained],{item:null,isTreeNode:true,label:"",isExpandable:null,isExpanded:false,state:"UNCHECKED",templateString:dojo.cache("dijit","templates/TreeNode.html","<div class=\"dijitTreeNode\" waiRole=\"presentation\"\n\t><div dojoAttachPoint=\"rowNode\" class=\"dijitTreeRow\" waiRole=\"presentation\" dojoAttachEvent=\"onmouseenter:_onMouseEnter, onmouseleave:_onMouseLeave, onclick:_onClick, ondblclick:_onDblClick\"\n\t\t><img src=\"${_blankGif}\" alt=\"\" dojoAttachPoint=\"expandoNode\" class=\"dijitTreeExpando\" waiRole=\"presentation\"\n\t\t><span dojoAttachPoint=\"expandoNodeText\" class=\"dijitExpandoText\" waiRole=\"presentation\"\n\t\t></span\n\t\t><span dojoAttachPoint=\"contentNode\"\n\t\t\tclass=\"dijitTreeContent\" waiRole=\"presentation\">\n\t\t\t<img src=\"${_blankGif}\" alt=\"\" dojoAttachPoint=\"iconNode\" class=\"dijitTreeIcon\" waiRole=\"presentation\"\n\t\t\t><span dojoAttachPoint=\"labelNode\" class=\"dijitTreeLabel\" wairole=\"treeitem\" tabindex=\"-1\" waiState=\"selected-false\" dojoAttachEvent=\"onfocus:_onLabelFocus, onblur:_onLabelBlur\"></span>\n\t\t</span\n\t></div>\n\t<div dojoAttachPoint=\"containerNode\" class=\"dijitTreeContainer\" waiRole=\"presentation\" style=\"display: none;\"></div>\n</div>\n"),attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{label:{node:"labelNode",type:"innerText"},tooltip:{node:"rowNode",type:"attribute",attribute:"title"}}),postCreate:function(){
+this._setExpando();
+this._updateItemClasses(this.item);
+if(this.isExpandable){
+dijit.setWaiState(this.labelNode,"expanded",this.isExpanded);
+}
+},_setIndentAttr:function(_1){
+this.indent=_1;
+var _2=(Math.max(_1,0)*this.tree._nodePixelIndent)+"px";
+dojo.style(this.domNode,"backgroundPosition",_2+" 0px");
+dojo.style(this.rowNode,dojo._isBodyLtr()?"paddingLeft":"paddingRight",_2);
+dojo.forEach(this.getChildren(),function(_3){
+_3.attr("indent",_1+1);
+});
+},markProcessing:function(){
+this.state="LOADING";
+this._setExpando(true);
+},unmarkProcessing:function(){
+this._setExpando(false);
+},_updateItemClasses:function(_4){
+var _5=this.tree,_6=_5.model;
+if(_5._v10Compat&&_4===_6.root){
+_4=null;
+}
+this._applyClassAndStyle(_4,"icon","Icon");
+this._applyClassAndStyle(_4,"label","Label");
+this._applyClassAndStyle(_4,"row","Row");
+},_applyClassAndStyle:function(_7,_8,_9){
+var _a="_"+_8+"Class";
+var _b=_8+"Node";
+if(this[_a]){
+dojo.removeClass(this[_b],this[_a]);
+}
+this[_a]=this.tree["get"+_9+"Class"](_7,this.isExpanded);
+if(this[_a]){
+dojo.addClass(this[_b],this[_a]);
+}
+dojo.style(this[_b],this.tree["get"+_9+"Style"](_7,this.isExpanded)||{});
+},_updateLayout:function(){
+var _c=this.getParent();
+if(!_c||_c.rowNode.style.display=="none"){
+dojo.addClass(this.domNode,"dijitTreeIsRoot");
+}else{
+dojo.toggleClass(this.domNode,"dijitTreeIsLast",!this.getNextSibling());
+}
+},_setExpando:function(_d){
+var _e=["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"],_f=["*","-","+","*"],idx=_d?0:(this.isExpandable?(this.isExpanded?1:2):3);
+dojo.removeClass(this.expandoNode,_e);
+dojo.addClass(this.expandoNode,_e[idx]);
+this.expandoNodeText.innerHTML=_f[idx];
+},expand:function(){
+if(this._expandDeferred){
+return this._expandDeferred;
+}
+this._wipeOut&&this._wipeOut.stop();
+this.isExpanded=true;
+dijit.setWaiState(this.labelNode,"expanded","true");
+dijit.setWaiRole(this.containerNode,"group");
+dojo.addClass(this.contentNode,"dijitTreeContentExpanded");
+this._setExpando();
+this._updateItemClasses(this.item);
+if(this==this.tree.rootNode){
+dijit.setWaiState(this.tree.domNode,"expanded","true");
+}
+var def,_10=dojo.fx.wipeIn({node:this.containerNode,duration:dijit.defaultDuration,onEnd:function(){
+def.callback(true);
+}});
+def=(this._expandDeferred=new dojo.Deferred(function(){
+_10.stop();
+}));
+_10.play();
+return def;
+},collapse:function(){
+if(!this.isExpanded){
+return;
+}
+if(this._expandDeferred){
+this._expandDeferred.cancel();
+delete this._expandDeferred;
+}
+this.isExpanded=false;
+dijit.setWaiState(this.labelNode,"expanded","false");
+if(this==this.tree.rootNode){
+dijit.setWaiState(this.tree.domNode,"expanded","false");
+}
+dojo.removeClass(this.contentNode,"dijitTreeContentExpanded");
+this._setExpando();
+this._updateItemClasses(this.item);
+if(!this._wipeOut){
+this._wipeOut=dojo.fx.wipeOut({node:this.containerNode,duration:dijit.defaultDuration});
+}
+this._wipeOut.play();
+},indent:0,setChildItems:function(_11){
+var _12=this.tree,_13=_12.model,_14=[];
+this.getChildren().forEach(function(_15){
+dijit._Container.prototype.removeChild.call(this,_15);
+},this);
+this.state="LOADED";
+if(_11&&_11.length>0){
+this.isExpandable=true;
+dojo.forEach(_11,function(_16){
+var id=_13.getIdentity(_16),_17=_12._itemNodesMap[id],_18;
+if(_17){
+for(var i=0;i<_17.length;i++){
+if(_17[i]&&!_17[i].getParent()){
+_18=_17[i];
+_18.attr("indent",this.indent+1);
+break;
+}
+}
+}
+if(!_18){
+_18=this.tree._createTreeNode({item:_16,tree:_12,isExpandable:_13.mayHaveChildren(_16),label:_12.getLabel(_16),tooltip:_12.getTooltip(_16),indent:this.indent+1});
+if(_17){
+_17.push(_18);
+}else{
+_12._itemNodesMap[id]=[_18];
+}
+}
+this.addChild(_18);
+if(this.tree.autoExpand||this.tree._state(_16)){
+_14.push(_12._expandNode(_18));
+}
+},this);
+dojo.forEach(this.getChildren(),function(_19,idx){
+_19._updateLayout();
+});
+}else{
+this.isExpandable=false;
+}
+if(this._setExpando){
+this._setExpando(false);
+}
+if(this==_12.rootNode){
+var fc=this.tree.showRoot?this:this.getChildren()[0];
+if(fc){
+fc.setSelected(true);
+_12.lastFocused=fc;
+}else{
+_12.domNode.setAttribute("tabIndex","0");
+}
+}
+return new dojo.DeferredList(_14);
+},removeChild:function(_1a){
+this.inherited(arguments);
+var _1b=this.getChildren();
+if(_1b.length==0){
+this.isExpandable=false;
+this.collapse();
+}
+dojo.forEach(_1b,function(_1c){
+_1c._updateLayout();
+});
+},makeExpandable:function(){
+this.isExpandable=true;
+this._setExpando(false);
+},_onLabelFocus:function(evt){
+dojo.addClass(this.labelNode,"dijitTreeLabelFocused");
+this.tree._onNodeFocus(this);
+},_onLabelBlur:function(evt){
+dojo.removeClass(this.labelNode,"dijitTreeLabelFocused");
+},setSelected:function(_1d){
+var _1e=this.labelNode;
+_1e.setAttribute("tabIndex",_1d?"0":"-1");
+dijit.setWaiState(_1e,"selected",_1d);
+dojo.toggleClass(this.rowNode,"dijitTreeNodeSelected",_1d);
+},_onClick:function(evt){
+this.tree._onClick(this,evt);
+},_onDblClick:function(evt){
+this.tree._onDblClick(this,evt);
+},_onMouseEnter:function(evt){
+dojo.addClass(this.rowNode,"dijitTreeNodeHover");
+this.tree._onNodeMouseEnter(this,evt);
+},_onMouseLeave:function(evt){
+dojo.removeClass(this.rowNode,"dijitTreeNodeHover");
+this.tree._onNodeMouseLeave(this,evt);
+}});
+dojo.declare("dijit.Tree",[dijit._Widget,dijit._Templated],{store:null,model:null,query:null,label:"",showRoot:true,childrenAttr:["children"],path:[],selectedItem:null,openOnClick:false,openOnDblClick:false,templateString:dojo.cache("dijit","templates/Tree.html","<div class=\"dijitTree dijitTreeContainer\" waiRole=\"tree\"\n\tdojoAttachEvent=\"onkeypress:_onKeyPress\">\n\t<div class=\"dijitInline dijitTreeIndent\" style=\"position: absolute; top: -9999px\" dojoAttachPoint=\"indentDetector\"></div>\n</div>\n"),persist:true,autoExpand:false,dndController:null,dndParams:["onDndDrop","itemCreator","onDndCancel","checkAcceptance","checkItemAcceptance","dragThreshold","betweenThreshold"],onDndDrop:null,itemCreator:null,onDndCancel:null,checkAcceptance:null,checkItemAcceptance:null,dragThreshold:5,betweenThreshold:0,_nodePixelIndent:19,_publish:function(_1f,_20){
+dojo.publish(this.id,[dojo.mixin({tree:this,event:_1f},_20||{})]);
+},postMixInProperties:function(){
+this.tree=this;
+this._itemNodesMap={};
+if(!this.cookieName){
+this.cookieName=this.id+"SaveStateCookie";
+}
+this._loadDeferred=new dojo.Deferred();
+this.inherited(arguments);
+},postCreate:function(){
+this._initState();
+if(!this.model){
+this._store2model();
+}
+this.connect(this.model,"onChange","_onItemChange");
+this.connect(this.model,"onChildrenChange","_onItemChildrenChange");
+this.connect(this.model,"onDelete","_onItemDelete");
+this._load();
+this.inherited(arguments);
+if(this.dndController){
+if(dojo.isString(this.dndController)){
+this.dndController=dojo.getObject(this.dndController);
+}
+var _21={};
+for(var i=0;i<this.dndParams.length;i++){
+if(this[this.dndParams[i]]){
+_21[this.dndParams[i]]=this[this.dndParams[i]];
+}
+}
+this.dndController=new this.dndController(this,_21);
+}
+},_store2model:function(){
+this._v10Compat=true;
+dojo.deprecated("Tree: from version 2.0, should specify a model object rather than a store/query");
+var _22={id:this.id+"_ForestStoreModel",store:this.store,query:this.query,childrenAttrs:this.childrenAttr};
+if(this.params.mayHaveChildren){
+_22.mayHaveChildren=dojo.hitch(this,"mayHaveChildren");
+}
+if(this.params.getItemChildren){
+_22.getChildren=dojo.hitch(this,function(_23,_24,_25){
+this.getItemChildren((this._v10Compat&&_23===this.model.root)?null:_23,_24,_25);
+});
+}
+this.model=new dijit.tree.ForestStoreModel(_22);
+this.showRoot=Boolean(this.label);
+},onLoad:function(){
+},_load:function(){
+this.model.getRoot(dojo.hitch(this,function(_26){
+var rn=(this.rootNode=this.tree._createTreeNode({item:_26,tree:this,isExpandable:true,label:this.label||this.getLabel(_26),indent:this.showRoot?0:-1}));
+if(!this.showRoot){
+rn.rowNode.style.display="none";
+}
+this.domNode.appendChild(rn.domNode);
+var _27=this.model.getIdentity(_26);
+if(this._itemNodesMap[_27]){
+this._itemNodesMap[_27].push(rn);
+}else{
+this._itemNodesMap[_27]=[rn];
+}
+rn._updateLayout();
+this._expandNode(rn).addCallback(dojo.hitch(this,function(){
+this._loadDeferred.callback(true);
+this.onLoad();
+}));
+}),function(err){
+console.error(this,": error loading root: ",err);
+});
+},getNodesByItem:function(_28){
+if(!_28){
+return [];
+}
+var _29=dojo.isString(_28)?_28:this.model.getIdentity(_28);
+return [].concat(this._itemNodesMap[_29]);
+},_setSelectedItemAttr:function(_2a){
+var _2b=this.attr("selectedItem");
+var _2c=(!_2a||dojo.isString(_2a))?_2a:this.model.getIdentity(_2a);
+if(_2c==_2b?this.model.getIdentity(_2b):null){
+return;
+}
+var _2d=this._itemNodesMap[_2c];
+if(_2d&&_2d.length){
+this.focusNode(_2d[0]);
+}else{
+if(this.lastFocused){
+this.lastFocused.setSelected(false);
+this.lastFocused=null;
+}
+}
+},_getSelectedItemAttr:function(){
+return this.lastFocused&&this.lastFocused.item;
+},_setPathAttr:function(_2e){
+if(!_2e||!_2e.length){
+return;
+}
+this._loadDeferred.addCallback(dojo.hitch(this,function(){
+if(!this.rootNode){
+return;
+}
+if(_2e[0]!==this.rootNode.item&&(dojo.isString(_2e[0])&&_2e[0]!=this.model.getIdentity(this.rootNode.item))){
+console.error(this,":path[0] doesn't match this.rootNode.item. Maybe you are using the wrong tree.");
+return;
+}
+_2e.shift();
+var _2f=this.rootNode;
+function _30(){
+var _31=_2e.shift(),_32=dojo.isString(_31)?_31:this.model.getIdentity(_31);
+dojo.some(this._itemNodesMap[_32],function(n){
+if(n.getParent()==_2f){
+_2f=n;
+return true;
+}
+return false;
});
-
-dojo.declare(
- "dijit.Tree",
- dijit._TreeNode,
-{
- // summary
- // This widget displays hierarchical data from a store. A query is specified
- // to get the "top level children" from a data store, and then those items are
- // queried for their children and so on (but lazily, as the user clicks the expand node).
- //
- // Thus in the default mode of operation this widget is technically a forest, not a tree,
- // in that there can be multiple "top level children". However, if you specify label,
- // then a special top level node (not corresponding to any item in the datastore) is
- // created, to father all the top level children.
-
- // store: String||dojo.data.Store
- // The store to get data to display in the tree
- store: null,
-
- // query: String
- // query to get top level node(s) of tree (ex: {type:'continent'})
- query: null,
-
- // childrenAttr: String
- // one ore more attributes that holds children of a tree node
- childrenAttr: ["children"],
-
- templateString:"<div class=\"dijitTreeContainer\" style=\"\" waiRole=\"tree\"\n\tdojoAttachEvent=\"onclick:_onClick,onkeypress:_onKeyPress\">\n\t<div class=\"dijitTreeNode dijitTreeIsRoot dijitTreeExpandLeaf dijitTreeChildrenNo\" waiRole=\"presentation\"\n\t\tdojoAttachPoint=\"rowNode\"\n\t\t><span dojoAttachPoint=\"expandoNode\" class=\"dijitTreeExpando\" waiRole=\"presentation\"\n\t\t></span\n\t\t><span dojoAttachPoint=\"expandoNodeText\" class=\"dijitExpandoText\" waiRole=\"presentation\"\n\t\t></span\n\t\t>\n\t\t<div dojoAttachPoint=\"contentNode\" class=\"dijitTreeContent\" waiRole=\"presentation\">\n\t\t\t<div dojoAttachPoint=\"iconNode\" class=\"dijitInline dijitTreeIcon\" waiRole=\"presentation\"></div>\n\t\t\t<span dojoAttachPoint=\"labelNode\" class=\"dijitTreeLabel\" wairole=\"treeitem\" tabindex=\"0\"></span>\n\t\t</div>\n\t</div>\n</div>\n",
-
- isExpandable: true,
-
- isTree: true,
-
- // persist: Boolean
- // enables/disables use of cookies for state saving.
- persist: true,
-
- // dndController: String
- // class name to use as as the dnd controller
- dndController: null,
-
- //parameters to pull off of the tree and pass on to the dndController as its params
- dndParams: ["onDndDrop","itemCreator","onDndCancel","checkAcceptance", "checkItemAcceptance"],
-
- //declare the above items so they can be pulled from the tree's markup
- onDndDrop:null,
- itemCreator:null,
- onDndCancel:null,
- checkAcceptance:null,
- checkItemAcceptance:null,
-
- _publish: function(/*String*/ topicName, /*Object*/ message){
- // summary:
- // Publish a message for this widget/topic
- dojo.publish(this.id, [dojo.mixin({tree: this, event: topicName}, message||{})]);
- },
-
- postMixInProperties: function(){
- this.tree = this;
- this.lastFocused = this.labelNode;
-
- this._itemNodeMap={};
-
- this._hideRoot = !this.label;
-
- if(!this.store.getFeatures()['dojo.data.api.Identity']){
- throw new Error("dijit.tree requires access to a store supporting the dojo.data Identity api");
- }
-
- if(!this.cookieName){
- this.cookieName = this.id + "SaveStateCookie";
- }
-
- // if the store supports Notification, subscribe to the notification events
- if(this.store.getFeatures()['dojo.data.api.Notification']){
- this.connect(this.store, "onNew", "_onNewItem");
- this.connect(this.store, "onDelete", "_onDeleteItem");
- this.connect(this.store, "onSet", "_onSetItem");
- }
- },
-
- postCreate: function(){
- // load in which nodes should be opened automatically
- if(this.persist){
- var cookie = dojo.cookie(this.cookieName);
- this._openedItemIds = {};
- if(cookie){
- dojo.forEach(cookie.split(','), function(item){
- this._openedItemIds[item] = true;
- }, this);
- }
- }
-
- // make template for container node (we will clone this and insert it into
- // any nodes that have children)
- var div = document.createElement('div');
- div.style.display = 'none';
- div.className = "dijitTreeContainer";
- dijit.setWaiRole(div, "presentation");
- this.containerNodeTemplate = div;
-
- if(this._hideRoot){
- this.rowNode.style.display="none";
- }
-
- this.inherited("postCreate", arguments);
-
- // load top level children
- this._expandNode(this);
-
- if(this.dndController){
- if(dojo.isString(this.dndController)){
- this.dndController= dojo.getObject(this.dndController);
- }
- var params={};
- for (var i=0; i<this.dndParams.length;i++){
- if(this[this.dndParams[i]]){
- params[this.dndParams[i]]=this[this.dndParams[i]];
- }
- }
- this.dndController= new this.dndController(this, params);
- }
-
- this.connect(this.domNode,
- dojo.isIE ? "onactivate" : "onfocus",
- "_onTreeFocus");
- },
-
- ////////////// Data store related functions //////////////////////
-
- mayHaveChildren: function(/*dojo.data.Item*/ item){
- // summary
- // User overridable function to tell if an item has or may have children.
- // Controls whether or not +/- expando icon is shown.
- // (For efficiency reasons we may not want to check if an element has
- // children until user clicks the expando node)
-
- return dojo.some(this.childrenAttr, function(attr){
- return this.store.hasAttribute(item, attr);
- }, this);
- },
-
- getItemChildren: function(/*dojo.data.Item*/ parentItem, /*function(items)*/ onComplete){
- // summary
- // User overridable function that return array of child items of given parent item,
- // or if parentItem==null then return top items in tree
- var store = this.store;
- if(parentItem == null){
- // get top level nodes
- store.fetch({ query: this.query, onComplete: onComplete});
- }else{
- // get children of specified node
- var childItems = [];
- for (var i=0; i<this.childrenAttr.length; i++){
- childItems= childItems.concat(store.getValues(parentItem, this.childrenAttr[i]));
- }
- // count how many items need to be loaded
- var _waitCount = 0;
- dojo.forEach(childItems, function(item){ if(!store.isItemLoaded(item)){ _waitCount++; } });
-
- if(_waitCount == 0){
- // all items are already loaded. proceed..
- onComplete(childItems);
- }else{
- // still waiting for some or all of the items to load
- function onItem(item){
- if(--_waitCount == 0){
- // all nodes have been loaded, send them to the tree
- onComplete(childItems);
- }
- }
- dojo.forEach(childItems, function(item){
- if(!store.isItemLoaded(item)){
- store.loadItem({item: item, onItem: onItem});
- }
- });
- }
- }
- },
-
- getItemParentIdentity: function(/*dojo.data.Item*/ item, /*Object*/ parentInfo){
- // summary
- // User overridable function, to return id of parent (or null if top level).
- // It's called with args from dojo.store.onNew
- return this.store.getIdentity(parentInfo.item); // String
- },
-
- getLabel: function(/*dojo.data.Item*/ item){
- // summary: user overridable function to get the label for a tree node (given the item)
- return this.store.getLabel(item); // String
- },
-
- getIconClass: function(/*dojo.data.Item*/ item){
- // summary: user overridable function to return CSS class name to display icon
- },
-
- getLabelClass: function(/*dojo.data.Item*/ item){
- // summary: user overridable function to return CSS class name to display label
- },
-
- _onLoadAllItems: function(/*_TreeNode*/ node, /*dojo.data.Item[]*/ items){
- // sumary: callback when all the children of a given node have been loaded
- var childParams=dojo.map(items, function(item){
- return {
- item: item,
- isExpandable: this.mayHaveChildren(item)
- };
- }, this);
-
- dojo.mixin(this._itemNodeMap,node._setChildren(childParams));
-
- this._expandNode(node);
- },
-
- /////////// Keyboard and Mouse handlers ////////////////////
-
- _onKeyPress: function(/*Event*/ e){
- // summary: translates keypress events into commands for the controller
- if(e.altKey){ return; }
- var treeNode = dijit.getEnclosingWidget(e.target);
- if(!treeNode){ return; }
-
- // Note: On IE e.keyCode is not 0 for printables so check e.charCode.
- // In dojo charCode is universally 0 for non-printables.
- if(e.charCode){ // handle printables (letter navigation)
- // Check for key navigation.
- var navKey = e.charCode;
- if(!e.altKey && !e.ctrlKey && !e.shiftKey && !e.metaKey){
- navKey = (String.fromCharCode(navKey)).toLowerCase();
- this._onLetterKeyNav( { node: treeNode, key: navKey } );
- dojo.stopEvent(e);
- }
- }else{ // handle non-printables (arrow keys)
- var map = this._keyHandlerMap;
- if(!map){
- // setup table mapping keys to events
- map = {};
- map[dojo.keys.ENTER]="_onEnterKey";
- map[dojo.keys.LEFT_ARROW]="_onLeftArrow";
- map[dojo.keys.RIGHT_ARROW]="_onRightArrow";
- map[dojo.keys.UP_ARROW]="_onUpArrow";
- map[dojo.keys.DOWN_ARROW]="_onDownArrow";
- map[dojo.keys.HOME]="_onHomeKey";
- map[dojo.keys.END]="_onEndKey";
- this._keyHandlerMap = map;
- }
- if(this._keyHandlerMap[e.keyCode]){
- this[this._keyHandlerMap[e.keyCode]]( { node: treeNode, item: treeNode.item } );
- dojo.stopEvent(e);
- }
- }
- },
-
- _onEnterKey: function(/*Object*/ message){
- this._publish("execute", { item: message.item, node: message.node} );
- this.onClick(message.item, message.node);
- },
-
- _onDownArrow: function(/*Object*/ message){
- // summary: down arrow pressed; get next visible node, set focus there
- var returnNode = this._navToNextNode(message.node);
- if(returnNode && returnNode.isTreeNode){
- returnNode.tree.focusNode(returnNode);
- return returnNode;
- }
- },
-
- _onUpArrow: function(/*Object*/ message){
- // summary: up arrow pressed; move to previous visible node
-
- var nodeWidget = message.node;
- var returnWidget = nodeWidget;
-
- // if younger siblings
- var previousSibling = nodeWidget.getPreviousSibling();
- if(previousSibling){
- nodeWidget = previousSibling;
- // if the previous nodeWidget is expanded, dive in deep
- while(nodeWidget.isExpandable && nodeWidget.isExpanded && nodeWidget.hasChildren()){
- returnWidget = nodeWidget;
- // move to the last child
- var children = nodeWidget.getChildren();
- nodeWidget = children[children.length-1];
- }
- }else{
- // if this is the first child, return the parent
- // unless the parent is the root of a tree with a hidden root
- var parent = nodeWidget.getParent();
- if(!(this._hideRoot && parent === this)){
- nodeWidget = parent;
- }
- }
-
- if(nodeWidget && nodeWidget.isTreeNode){
- returnWidget = nodeWidget;
- }
-
- if(returnWidget && returnWidget.isTreeNode){
- returnWidget.tree.focusNode(returnWidget);
- return returnWidget;
- }
- },
-
- _onRightArrow: function(/*Object*/ message){
- // summary: right arrow pressed; go to child node
- var nodeWidget = message.node;
- var returnWidget = nodeWidget;
-
- // if not expanded, expand, else move to 1st child
- if(nodeWidget.isExpandable && !nodeWidget.isExpanded){
- this._expandNode(nodeWidget);
- }else if(nodeWidget.hasChildren()){
- nodeWidget = nodeWidget.getChildren()[0];
- }
-
- if(nodeWidget && nodeWidget.isTreeNode){
- returnWidget = nodeWidget;
- }
-
- if(returnWidget && returnWidget.isTreeNode){
- returnWidget.tree.focusNode(returnWidget);
- return returnWidget;
- }
- },
-
- _onLeftArrow: function(/*Object*/ message){
- // summary: left arrow pressed; go to parent
-
- var node = message.node;
- var returnWidget = node;
-
- // if not collapsed, collapse, else move to parent
- if(node.isExpandable && node.isExpanded){
- this._collapseNode(node);
- }else{
- node = node.getParent();
- }
- if(node && node.isTreeNode){
- returnWidget = node;
- }
-
- if(returnWidget && returnWidget.isTreeNode){
- returnWidget.tree.focusNode(returnWidget);
- return returnWidget;
- }
- },
-
- _onHomeKey: function(){
- // summary: home pressed; get first visible node, set focus there
- var returnNode = this._navToRootOrFirstNode();
- if(returnNode){
- returnNode.tree.focusNode(returnNode);
- return returnNode;
- }
- },
-
- _onEndKey: function(/*Object*/ message){
- // summary: end pressed; go to last visible node
-
- var returnWidget = message.node.tree;
-
- var lastChild = returnWidget;
- while(lastChild.isExpanded){
- var c = lastChild.getChildren();
- lastChild = c[c.length - 1];
- if(lastChild.isTreeNode){
- returnWidget = lastChild;
- }
- }
-
- if(returnWidget && returnWidget.isTreeNode){
- returnWidget.tree.focusNode(returnWidget);
- return returnWidget;
- }
- },
-
- _onLetterKeyNav: function(message){
- // summary: letter key pressed; search for node starting with first char = key
- var node = startNode = message.node;
- var key = message.key;
- do{
- node = this._navToNextNode(node);
- //check for last node, jump to first node if necessary
- if(!node){
- node = this._navToRootOrFirstNode();
- }
- }while(node !== startNode && (node.label.charAt(0).toLowerCase() != key));
- if(node && node.isTreeNode){
- // no need to set focus if back where we started
- if(node !== startNode){
- node.tree.focusNode(node);
- }
- return node;
- }
- },
-
- _onClick: function(/*Event*/ e){
- // summary: translates click events into commands for the controller to process
- var domElement = e.target;
-
- // find node
- var nodeWidget = dijit.getEnclosingWidget(domElement);
- if(!nodeWidget || !nodeWidget.isTreeNode){
- return;
- }
-
- if(domElement == nodeWidget.expandoNode ||
- domElement == nodeWidget.expandoNodeText){
- // expando node was clicked
- if(nodeWidget.isExpandable){
- this._onExpandoClick({node:nodeWidget});
- }
- }else{
- this._publish("execute", { item: nodeWidget.item, node: nodeWidget} );
- this.onClick(nodeWidget.item, nodeWidget);
- this.focusNode(nodeWidget);
- }
- dojo.stopEvent(e);
- },
-
- _onExpandoClick: function(/*Object*/ message){
- // summary: user clicked the +/- icon; expand or collapse my children.
- var node = message.node;
- if(node.isExpanded){
- this._collapseNode(node);
- }else{
- this._expandNode(node);
- }
- },
-
- onClick: function(/* dojo.data */ item, /*TreeNode*/ node){
- // summary: user overridable function for executing a tree item
- },
-
- _navToNextNode: function(node){
- // summary: get next visible node
- var returnNode;
- // if this is an expanded node, get the first child
- if(node.isExpandable && node.isExpanded && node.hasChildren()){
- returnNode = node.getChildren()[0];
- }else{
- // find a parent node with a sibling
- while(node && node.isTreeNode){
- returnNode = node.getNextSibling();
- if(returnNode){
- break;
- }
- node = node.getParent();
- }
- }
- return returnNode;
- },
-
- _navToRootOrFirstNode: function(){
- // summary: get first visible node
- if(!this._hideRoot){
- return this;
- }else{
- var returnNode = this.getChildren()[0];
- if(returnNode && returnNode.isTreeNode){
- return returnNode;
- }
- }
- },
-
- _collapseNode: function(/*_TreeNode*/ node){
- // summary: called when the user has requested to collapse the node
-
- if(node.isExpandable){
- if(node.state == "LOADING"){
- // ignore clicks while we are in the process of loading data
- return;
- }
- if(this.lastFocused){
- // are we collapsing a descendant with focus?
- if(dojo.isDescendant(this.lastFocused.domNode, node.domNode)){
- this.focusNode(node);
- }else{
- // clicking the expando node might have erased focus from
- // the current item; restore it
- this.focusNode(this.lastFocused);
- }
- }
- node.collapse();
- if(this.persist && node.item){
- delete this._openedItemIds[this.store.getIdentity(node.item)];
- this._saveState();
- }
- }
- },
-
- _expandNode: function(/*_TreeNode*/ node){
- // summary: called when the user has requested to expand the node
-
- // clicking the expando node might have erased focus from the current item; restore it
- var t = node.tree;
- if(t.lastFocused){ t.focusNode(t.lastFocused); }
-
- if(!node.isExpandable){
- return;
- }
-
- var store = this.store;
- var getValue = this.store.getValue;
-
- switch(node.state){
- case "LOADING":
- // ignore clicks while we are in the process of loading data
- return;
-
- case "UNCHECKED":
- // need to load all the children, and then expand
- node.markProcessing();
- var _this = this;
- var onComplete = function(childItems){
- node.unmarkProcessing();
- _this._onLoadAllItems(node, childItems);
- };
- this.getItemChildren(node.item, onComplete);
- break;
-
- default:
- // data is already loaded; just proceed
- if(node.expand){ // top level Tree doesn't have expand() method
- node.expand();
- if(this.persist && node.item){
- this._openedItemIds[this.store.getIdentity(node.item)] = true;
- this._saveState();
- }
- }
- break;
- }
- },
-
- ////////////////// Miscellaneous functions ////////////////
-
- blurNode: function(){
- // summary
- // Removes focus from the currently focused node (which must be visible).
- // Usually not called directly (just call focusNode() on another node instead)
- var node = this.lastFocused;
- if(!node){ return; }
- var labelNode = node.labelNode;
- dojo.removeClass(labelNode, "dijitTreeLabelFocused");
- labelNode.setAttribute("tabIndex", "-1");
- this.lastFocused = null;
- },
-
- focusNode: function(/* _tree.Node */ node){
- // summary
- // Focus on the specified node (which must be visible)
-
- // set focus so that the label will be voiced using screen readers
- node.labelNode.focus();
- },
-
- _onBlur: function(){
- // summary:
- // We've moved away from the whole tree. The currently "focused" node
- // (see focusNode above) should remain as the lastFocused node so we can
- // tab back into the tree. Just change CSS to get rid of the dotted border
- // until that time
- if(this.lastFocused){
- var labelNode = this.lastFocused.labelNode;
- dojo.removeClass(labelNode, "dijitTreeLabelFocused");
- }
- },
-
- _onTreeFocus: function(evt){
- var node = dijit.getEnclosingWidget(evt.target);
- if(node != this.lastFocused){
- this.blurNode();
- }
- var labelNode = node.labelNode;
- // set tabIndex so that the tab key can find this node
- labelNode.setAttribute("tabIndex", "0");
- dojo.addClass(labelNode, "dijitTreeLabelFocused");
- this.lastFocused = node;
- },
-
- //////////////// Events from data store //////////////////////////
-
-
- _onNewItem: function(/*Object*/ item, parentInfo){
- //summary: callback when new item has been added to the store.
-
- var loadNewItem; // should new item be displayed in tree?
-
- if(parentInfo){
- var parent = this._itemNodeMap[this.getItemParentIdentity(item, parentInfo)];
-
- // If new item's parent item not in tree view yet, can safely ignore.
- // Also, if a query of specified parent wouldn't return this item, then ignore.
- if(!parent ||
- dojo.indexOf(this.childrenAttr, parentInfo.attribute) == -1){
- return;
- }
- }
-
- var childParams = {
- item: item,
- isExpandable: this.mayHaveChildren(item)
- };
- if(parent){
- if(!parent.isExpandable){
- parent.makeExpandable();
- }
- if(parent.state=="LOADED" || parent.isExpanded){
- var childrenMap=parent._addChildren([childParams]);
- }
- }else{
- // top level node
- var childrenMap=this._addChildren([childParams]);
- }
-
- if(childrenMap){
- dojo.mixin(this._itemNodeMap, childrenMap);
- //this._itemNodeMap[this.store.getIdentity(item)]=child;
- }
- },
-
- _onDeleteItem: function(/*Object*/ item){
- //summary: delete event from the store
- //since the object has just been deleted, we need to
- //use the name directly
- var identity = this.store.getIdentity(item);
- var node = this._itemNodeMap[identity];
-
- if(node){
- var parent = node.getParent();
- parent.deleteNode(node);
- this._itemNodeMap[identity]=null;
- }
- },
-
- _onSetItem: function(/*Object*/ item){
- //summary: set data event on an item in the store
- var identity = this.store.getIdentity(item);
- node = this._itemNodeMap[identity];
-
- if(node){
- node.setLabelNode(this.getLabel(item));
- node._updateItemClasses(item);
- }
- },
-
- _saveState: function(){
- //summary: create and save a cookie with the currently expanded nodes identifiers
- if(!this.persist){
- return;
- }
- var ary = [];
- for(var id in this._openedItemIds){
- ary.push(id);
- }
- dojo.cookie(this.cookieName, ary.join(","));
- }
+if(_2e.length){
+this._expandNode(_2f).addCallback(dojo.hitch(this,_30));
+}else{
+if(this.lastFocused!=_2f){
+this.focusNode(_2f);
+}
+}
+};
+this._expandNode(_2f).addCallback(dojo.hitch(this,_30));
+}));
+},_getPathAttr:function(){
+if(!this.lastFocused){
+return;
+}
+var res=[];
+var _33=this.lastFocused;
+while(_33&&_33!==this.rootNode){
+res.unshift(_33.item);
+_33=_33.getParent();
+}
+res.unshift(this.rootNode.item);
+return res;
+},mayHaveChildren:function(_34){
+},getItemChildren:function(_35,_36){
+},getLabel:function(_37){
+return this.model.getLabel(_37);
+},getIconClass:function(_38,_39){
+return (!_38||this.model.mayHaveChildren(_38))?(_39?"dijitFolderOpened":"dijitFolderClosed"):"dijitLeaf";
+},getLabelClass:function(_3a,_3b){
+},getRowClass:function(_3c,_3d){
+},getIconStyle:function(_3e,_3f){
+},getLabelStyle:function(_40,_41){
+},getRowStyle:function(_42,_43){
+},getTooltip:function(_44){
+return "";
+},_onKeyPress:function(e){
+if(e.altKey){
+return;
+}
+var dk=dojo.keys;
+var _45=dijit.getEnclosingWidget(e.target);
+if(!_45){
+return;
+}
+var key=e.charOrCode;
+if(typeof key=="string"){
+if(!e.altKey&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey){
+this._onLetterKeyNav({node:_45,key:key.toLowerCase()});
+dojo.stopEvent(e);
+}
+}else{
+if(this._curSearch){
+clearTimeout(this._curSearch.timer);
+delete this._curSearch;
+}
+var map=this._keyHandlerMap;
+if(!map){
+map={};
+map[dk.ENTER]="_onEnterKey";
+map[this.isLeftToRight()?dk.LEFT_ARROW:dk.RIGHT_ARROW]="_onLeftArrow";
+map[this.isLeftToRight()?dk.RIGHT_ARROW:dk.LEFT_ARROW]="_onRightArrow";
+map[dk.UP_ARROW]="_onUpArrow";
+map[dk.DOWN_ARROW]="_onDownArrow";
+map[dk.HOME]="_onHomeKey";
+map[dk.END]="_onEndKey";
+this._keyHandlerMap=map;
+}
+if(this._keyHandlerMap[key]){
+this[this._keyHandlerMap[key]]({node:_45,item:_45.item,evt:e});
+dojo.stopEvent(e);
+}
+}
+},_onEnterKey:function(_46,evt){
+this._publish("execute",{item:_46.item,node:_46.node});
+this.onClick(_46.item,_46.node,evt);
+},_onDownArrow:function(_47){
+var _48=this._getNextNode(_47.node);
+if(_48&&_48.isTreeNode){
+this.focusNode(_48);
+}
+},_onUpArrow:function(_49){
+var _4a=_49.node;
+var _4b=_4a.getPreviousSibling();
+if(_4b){
+_4a=_4b;
+while(_4a.isExpandable&&_4a.isExpanded&&_4a.hasChildren()){
+var _4c=_4a.getChildren();
+_4a=_4c[_4c.length-1];
+}
+}else{
+var _4d=_4a.getParent();
+if(!(!this.showRoot&&_4d===this.rootNode)){
+_4a=_4d;
+}
+}
+if(_4a&&_4a.isTreeNode){
+this.focusNode(_4a);
+}
+},_onRightArrow:function(_4e){
+var _4f=_4e.node;
+if(_4f.isExpandable&&!_4f.isExpanded){
+this._expandNode(_4f);
+}else{
+if(_4f.hasChildren()){
+_4f=_4f.getChildren()[0];
+if(_4f&&_4f.isTreeNode){
+this.focusNode(_4f);
+}
+}
+}
+},_onLeftArrow:function(_50){
+var _51=_50.node;
+if(_51.isExpandable&&_51.isExpanded){
+this._collapseNode(_51);
+}else{
+var _52=_51.getParent();
+if(_52&&_52.isTreeNode&&!(!this.showRoot&&_52===this.rootNode)){
+this.focusNode(_52);
+}
+}
+},_onHomeKey:function(){
+var _53=this._getRootOrFirstNode();
+if(_53){
+this.focusNode(_53);
+}
+},_onEndKey:function(_54){
+var _55=this.rootNode;
+while(_55.isExpanded){
+var c=_55.getChildren();
+_55=c[c.length-1];
+}
+if(_55&&_55.isTreeNode){
+this.focusNode(_55);
+}
+},multiCharSearchDuration:250,_onLetterKeyNav:function(_56){
+var cs=this._curSearch;
+if(cs){
+cs.pattern=cs.pattern+_56.key;
+clearTimeout(cs.timer);
+}else{
+cs=this._curSearch={pattern:_56.key,startNode:_56.node};
+}
+var _57=this;
+cs.timer=setTimeout(function(){
+delete _57._curSearch;
+},this.multiCharSearchDuration);
+var _58=cs.startNode;
+do{
+_58=this._getNextNode(_58);
+if(!_58){
+_58=this._getRootOrFirstNode();
+}
+}while(_58!==cs.startNode&&(_58.label.toLowerCase().substr(0,cs.pattern.length)!=cs.pattern));
+if(_58&&_58.isTreeNode){
+if(_58!==cs.startNode){
+this.focusNode(_58);
+}
+}
+},_onClick:function(_59,e){
+var _5a=e.target;
+if((this.openOnClick&&_59.isExpandable)||(_5a==_59.expandoNode||_5a==_59.expandoNodeText)){
+if(_59.isExpandable){
+this._onExpandoClick({node:_59});
+}
+}else{
+this._publish("execute",{item:_59.item,node:_59,evt:e});
+this.onClick(_59.item,_59,e);
+this.focusNode(_59);
+}
+dojo.stopEvent(e);
+},_onDblClick:function(_5b,e){
+var _5c=e.target;
+if((this.openOnDblClick&&_5b.isExpandable)||(_5c==_5b.expandoNode||_5c==_5b.expandoNodeText)){
+if(_5b.isExpandable){
+this._onExpandoClick({node:_5b});
+}
+}else{
+this._publish("execute",{item:_5b.item,node:_5b,evt:e});
+this.onDblClick(_5b.item,_5b,e);
+this.focusNode(_5b);
+}
+dojo.stopEvent(e);
+},_onExpandoClick:function(_5d){
+var _5e=_5d.node;
+this.focusNode(_5e);
+if(_5e.isExpanded){
+this._collapseNode(_5e);
+}else{
+this._expandNode(_5e);
+}
+},onClick:function(_5f,_60,evt){
+},onDblClick:function(_61,_62,evt){
+},onOpen:function(_63,_64){
+},onClose:function(_65,_66){
+},_getNextNode:function(_67){
+if(_67.isExpandable&&_67.isExpanded&&_67.hasChildren()){
+return _67.getChildren()[0];
+}else{
+while(_67&&_67.isTreeNode){
+var _68=_67.getNextSibling();
+if(_68){
+return _68;
+}
+_67=_67.getParent();
+}
+return null;
+}
+},_getRootOrFirstNode:function(){
+return this.showRoot?this.rootNode:this.rootNode.getChildren()[0];
+},_collapseNode:function(_69){
+if(_69._expandNodeDeferred){
+delete _69._expandNodeDeferred;
+}
+if(_69.isExpandable){
+if(_69.state=="LOADING"){
+return;
+}
+_69.collapse();
+this.onClose(_69.item,_69);
+if(_69.item){
+this._state(_69.item,false);
+this._saveState();
+}
+}
+},_expandNode:function(_6a,_6b){
+if(_6a._expandNodeDeferred&&!_6b){
+return _6a._expandNodeDeferred;
+}
+var _6c=this.model,_6d=_6a.item,_6e=this;
+switch(_6a.state){
+case "UNCHECKED":
+_6a.markProcessing();
+var def=(_6a._expandNodeDeferred=new dojo.Deferred());
+_6c.getChildren(_6d,function(_6f){
+_6a.unmarkProcessing();
+var _70=_6a.setChildItems(_6f);
+var ed=_6e._expandNode(_6a,true);
+_70.addCallback(function(){
+ed.addCallback(function(){
+def.callback();
});
-
+});
+},function(err){
+console.error(_6e,": error loading root children: ",err);
+});
+break;
+default:
+def=(_6a._expandNodeDeferred=_6a.expand());
+this.onOpen(_6a.item,_6a);
+if(_6d){
+this._state(_6d,true);
+this._saveState();
+}
+}
+return def;
+},focusNode:function(_71){
+dijit.focus(_71.labelNode);
+},_onNodeFocus:function(_72){
+if(_72){
+if(_72!=this.lastFocused&&this.lastFocused&&!this.lastFocused._destroyed){
+this.lastFocused.setSelected(false);
+}
+_72.setSelected(true);
+this.lastFocused=_72;
+}
+},_onNodeMouseEnter:function(_73){
+},_onNodeMouseLeave:function(_74){
+},_onItemChange:function(_75){
+var _76=this.model,_77=_76.getIdentity(_75),_78=this._itemNodesMap[_77];
+if(_78){
+var _79=this;
+dojo.forEach(_78,function(_7a){
+_7a.attr({label:_79.getLabel(_75),tooltip:_79.getTooltip(_75)});
+_7a._updateItemClasses(_75);
+});
+}
+},_onItemChildrenChange:function(_7b,_7c){
+var _7d=this.model,_7e=_7d.getIdentity(_7b),_7f=this._itemNodesMap[_7e];
+if(_7f){
+dojo.forEach(_7f,function(_80){
+_80.setChildItems(_7c);
+});
+}
+},_onItemDelete:function(_81){
+var _82=this.model,_83=_82.getIdentity(_81),_84=this._itemNodesMap[_83];
+if(_84){
+dojo.forEach(_84,function(_85){
+var _86=_85.getParent();
+if(_86){
+_86.removeChild(_85);
+}
+_85.destroyRecursive();
+});
+delete this._itemNodesMap[_83];
}
+},_initState:function(){
+if(this.persist){
+var _87=dojo.cookie(this.cookieName);
+this._openedItemIds={};
+if(_87){
+dojo.forEach(_87.split(","),function(_88){
+this._openedItemIds[_88]=true;
+},this);
+}
+}
+},_state:function(_89,_8a){
+if(!this.persist){
+return false;
+}
+var id=this.model.getIdentity(_89);
+if(arguments.length===1){
+return this._openedItemIds[id];
+}
+if(_8a){
+this._openedItemIds[id]=true;
+}else{
+delete this._openedItemIds[id];
+}
+},_saveState:function(){
+if(!this.persist){
+return;
+}
+var ary=[];
+for(var id in this._openedItemIds){
+ary.push(id);
+}
+dojo.cookie(this.cookieName,ary.join(","),{expires:365});
+},destroy:function(){
+if(this._curSearch){
+clearTimeout(this._curSearch.timer);
+delete this._curSearch;
+}
+if(this.rootNode){
+this.rootNode.destroyRecursive();
+}
+if(this.dndController&&!dojo.isString(this.dndController)){
+this.dndController.destroy();
+}
+this.rootNode=null;
+this.inherited(arguments);
+},destroyRecursive:function(){
+this.destroy();
+},resize:function(_8b){
+if(_8b){
+dojo.marginBox(this.domNode,_8b);
+dojo.style(this.domNode,"overflow","auto");
+}
+this._nodePixelIndent=dojo.marginBox(this.tree.indentDetector).w;
+if(this.tree.rootNode){
+this.tree.rootNode.attr("indent",this.showRoot?0:-1);
+}
+},_createTreeNode:function(_8c){
+return new dijit._TreeNode(_8c);
+}});
+dojo.require("dijit.tree.TreeStoreModel");
+dojo.require("dijit.tree.ForestStoreModel");
+}
diff --git a/js/dojo/dijit/_Calendar.js b/js/dojo/dijit/_Calendar.js
--- a/js/dojo/dijit/_Calendar.js
+++ b/js/dojo/dijit/_Calendar.js
@@ -1,214 +1,14 @@
-if(!dojo._hasResource["dijit._Calendar"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._Calendar"] = true;
-dojo.provide("dijit._Calendar");
-
-dojo.require("dojo.cldr.supplemental");
-dojo.require("dojo.date");
-dojo.require("dojo.date.locale");
-
-dojo.require("dijit._Widget");
-dojo.require("dijit._Templated");
-
-dojo.declare(
- "dijit._Calendar",
- [dijit._Widget, dijit._Templated],
- {
- /*
- summary:
- A simple GUI for choosing a date in the context of a monthly calendar.
-
- description:
- This widget is used internally by other widgets and is not accessible
- as a standalone widget.
- This widget can't be used in a form because it doesn't serialize the date to an
- <input> field. For a form element, use DateTextBox instead.
-
- Note that the parser takes all dates attributes passed in the `RFC 3339` format:
- http://www.faqs.org/rfcs/rfc3339.html (2005-06-30T08:05:00-07:00)
- so that they are serializable and locale-independent.
-
- usage:
- var calendar = new dijit._Calendar({}, dojo.byId("calendarNode"));
- -or-
- <div dojoType="dijit._Calendar"></div>
- */
- templateString:"<table cellspacing=\"0\" cellpadding=\"0\" class=\"dijitCalendarContainer\">\n\t<thead>\n\t\t<tr class=\"dijitReset dijitCalendarMonthContainer\" valign=\"top\">\n\t\t\t<th class='dijitReset' dojoAttachPoint=\"decrementMonth\">\n\t\t\t\t<span class=\"dijitInline dijitCalendarIncrementControl dijitCalendarDecrease\"><span dojoAttachPoint=\"decreaseArrowNode\" class=\"dijitA11ySideArrow dijitCalendarIncrementControl dijitCalendarDecreaseInner\">-</span></span>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' colspan=\"5\">\n\t\t\t\t<div dojoAttachPoint=\"monthLabelSpacer\" class=\"dijitCalendarMonthLabelSpacer\"></div>\n\t\t\t\t<div dojoAttachPoint=\"monthLabelNode\" class=\"dijitCalendarMonth\"></div>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' dojoAttachPoint=\"incrementMonth\">\n\t\t\t\t<div class=\"dijitInline dijitCalendarIncrementControl dijitCalendarIncrease\"><span dojoAttachPoint=\"increaseArrowNode\" class=\"dijitA11ySideArrow dijitCalendarIncrementControl dijitCalendarIncreaseInner\">+</span></div>\n\t\t\t</th>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th class=\"dijitReset dijitCalendarDayLabelTemplate\"><span class=\"dijitCalendarDayLabel\"></span></th>\n\t\t</tr>\n\t</thead>\n\t<tbody dojoAttachEvent=\"onclick: _onDayClick\" class=\"dijitReset dijitCalendarBodyContainer\">\n\t\t<tr class=\"dijitReset dijitCalendarWeekTemplate\">\n\t\t\t<td class=\"dijitReset dijitCalendarDateTemplate\"><span class=\"dijitCalendarDateLabel\"></span></td>\n\t\t</tr>\n\t</tbody>\n\t<tfoot class=\"dijitReset dijitCalendarYearContainer\">\n\t\t<tr>\n\t\t\t<td class='dijitReset' valign=\"top\" colspan=\"7\">\n\t\t\t\t<h3 class=\"dijitCalendarYearLabel\">\n\t\t\t\t\t<span dojoAttachPoint=\"previousYearLabelNode\" class=\"dijitInline dijitCalendarPreviousYear\"></span>\n\t\t\t\t\t<span dojoAttachPoint=\"currentYearLabelNode\" class=\"dijitInline dijitCalendarSelectedYear\"></span>\n\t\t\t\t\t<span dojoAttachPoint=\"nextYearLabelNode\" class=\"dijitInline dijitCalendarNextYear\"></span>\n\t\t\t\t</h3>\n\t\t\t</td>\n\t\t</tr>\n\t</tfoot>\n</table>\t\n",
-
- // value: Date
- // the currently selected Date
- value: new Date(),
-
- // dayWidth: String
- // How to represent the days of the week in the calendar header. See dojo.date.locale
- dayWidth: "narrow",
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- setValue: function(/*Date*/ value){
- // summary: set the current date and update the UI. If the date is disabled, the selection will
- // not change, but the display will change to the corresponding month.
- if(!this.value || dojo.date.compare(value, this.value)){
- value = new Date(value);
- this.displayMonth = new Date(value);
- if(!this.isDisabledDate(value, this.lang)){
- this.value = value;
- this.value.setHours(0,0,0,0);
- this.onChange(this.value);
- }
- this._populateGrid();
- }
- },
-
- _setText: function(node, text){
- while(node.firstChild){
- node.removeChild(node.firstChild);
- }
- node.appendChild(document.createTextNode(text));
- },
-
- _populateGrid: function(){
- var month = this.displayMonth;
- month.setDate(1);
- var firstDay = month.getDay();
- var daysInMonth = dojo.date.getDaysInMonth(month);
- var daysInPreviousMonth = dojo.date.getDaysInMonth(dojo.date.add(month, "month", -1));
- var today = new Date();
- var selected = this.value;
-
- var dayOffset = dojo.cldr.supplemental.getFirstDayOfWeek(this.lang);
- if(dayOffset > firstDay){ dayOffset -= 7; }
-
- // Iterate through dates in the calendar and fill in date numbers and style info
- dojo.query(".dijitCalendarDateTemplate", this.domNode).forEach(function(template, i){
- i += dayOffset;
- var date = new Date(month);
- var number, clazz = "dijitCalendar", adj = 0;
-
- if(i < firstDay){
- number = daysInPreviousMonth - firstDay + i + 1;
- adj = -1;
- clazz += "Previous";
- }else if(i >= (firstDay + daysInMonth)){
- number = i - firstDay - daysInMonth + 1;
- adj = 1;
- clazz += "Next";
- }else{
- number = i - firstDay + 1;
- clazz += "Current";
- }
-
- if(adj){
- date = dojo.date.add(date, "month", adj);
- }
- date.setDate(number);
-
- if(!dojo.date.compare(date, today, "date")){
- clazz = "dijitCalendarCurrentDate " + clazz;
- }
- if(!dojo.date.compare(date, selected, "date")){
- clazz = "dijitCalendarSelectedDate " + clazz;
- }
-
- if(this.isDisabledDate(date, this.lang)){
- clazz = "dijitCalendarDisabledDate " + clazz;
- }
-
- template.className = clazz + "Month dijitCalendarDateTemplate";
- template.dijitDateValue = date.valueOf();
- var label = dojo.query(".dijitCalendarDateLabel", template)[0];
- this._setText(label, date.getDate());
- }, this);
-
- // Fill in localized month name
- var monthNames = dojo.date.locale.getNames('months', 'wide', 'standAlone', this.lang);
- this._setText(this.monthLabelNode, monthNames[month.getMonth()]);
-
- // Fill in localized prev/current/next years
- var y = month.getFullYear() - 1;
- dojo.forEach(["previous", "current", "next"], function(name){
- this._setText(this[name+"YearLabelNode"],
- dojo.date.locale.format(new Date(y++, 0), {selector:'year', locale:this.lang}));
- }, this);
-
- // Set up repeating mouse behavior
- var _this = this;
- var typematic = function(nodeProp, dateProp, adj){
- dijit.typematic.addMouseListener(_this[nodeProp], _this, function(count){
- if(count >= 0){ _this._adjustDisplay(dateProp, adj); }
- }, 0.8, 500);
- };
- typematic("incrementMonth", "month", 1);
- typematic("decrementMonth", "month", -1);
- typematic("nextYearLabelNode", "year", 1);
- typematic("previousYearLabelNode", "year", -1);
- },
-
- postCreate: function(){
- dijit._Calendar.superclass.postCreate.apply(this);
-
- var cloneClass = dojo.hitch(this, function(clazz, n){
- var template = dojo.query(clazz, this.domNode)[0];
- for(var i=0; i<n; i++){
- template.parentNode.appendChild(template.cloneNode(true));
- }
- });
-
- // clone the day label and calendar day templates 6 times to make 7 columns
- cloneClass(".dijitCalendarDayLabelTemplate", 6);
- cloneClass(".dijitCalendarDateTemplate", 6);
-
- // now make 6 week rows
- cloneClass(".dijitCalendarWeekTemplate", 5);
-
- // insert localized day names in the header
- var dayNames = dojo.date.locale.getNames('days', this.dayWidth, 'standAlone', this.lang);
- var dayOffset = dojo.cldr.supplemental.getFirstDayOfWeek(this.lang);
- dojo.query(".dijitCalendarDayLabel", this.domNode).forEach(function(label, i){
- this._setText(label, dayNames[(i + dayOffset) % 7]);
- }, this);
-
- // Fill in spacer element with all the month names (invisible) so that the maximum width will affect layout
- var monthNames = dojo.date.locale.getNames('months', 'wide', 'standAlone', this.lang);
- dojo.forEach(monthNames, function(name){
- var monthSpacer = dojo.doc.createElement("div");
- this._setText(monthSpacer, name);
- this.monthLabelSpacer.appendChild(monthSpacer);
- }, this);
-
- this.value = null;
- this.setValue(new Date());
- },
-
- _adjustDisplay: function(/*String*/part, /*int*/amount){
- this.displayMonth = dojo.date.add(this.displayMonth, part, amount);
- this._populateGrid();
- },
-
- _onDayClick: function(/*Event*/evt){
- var node = evt.target;
- dojo.stopEvent(evt);
- while(!node.dijitDateValue){
- node = node.parentNode;
- }
- if(!dojo.hasClass(node, "dijitCalendarDisabledDate")){
- this.setValue(node.dijitDateValue);
- this.onValueSelected(this.value);
- }
- },
-
- onValueSelected: function(/*Date*/date){
- //summary: a date cell was selected. It may be the same as the previous value.
- },
-
- onChange: function(/*Date*/date){
- //summary: called only when the selected date has changed
- },
-
- isDisabledDate: function(/*Date*/dateObject, /*String?*/locale){
- // summary:
- // May be overridden to disable certain dates in the calendar e.g. isDisabledDate=dojo.date.locale.isWeekend
- return false; // Boolean
- }
- }
-);
-
+if(!dojo._hasResource["dijit._Calendar"]){
+dojo._hasResource["dijit._Calendar"]=true;
+dojo.provide("dijit._Calendar");
+dojo.require("dijit.Calendar");
+dojo.deprecated("dijit._Calendar is deprecated","dijit._Calendar moved to dijit.Calendar",1.5);
+dijit._Calendar=dijit.Calendar;
}
diff --git a/js/dojo/dijit/_Container.js b/js/dojo/dijit/_Container.js
--- a/js/dojo/dijit/_Container.js
+++ b/js/dojo/dijit/_Container.js
@@ -1,315 +1,62 @@
-if(!dojo._hasResource["dijit._Container"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._Container"] = true;
-dojo.provide("dijit._Container");
-
-dojo.declare("dijit._Contained",
- null,
- {
- // summary
- // Mixin for widgets that are children of a container widget
-
- getParent: function(){
- // summary:
- // returns the parent widget of this widget, assuming the parent
- // implements dijit._Container
- for(var p=this.domNode.parentNode; p; p=p.parentNode){
- var id = p.getAttribute && p.getAttribute("widgetId");
- if(id){
- var parent = dijit.byId(id);
- return parent.isContainer ? parent : null;
- }
- }
- return null;
- },
-
- _getSibling: function(which){
- var node = this.domNode;
- do{
- node = node[which+"Sibling"];
- }while(node && node.nodeType != 1);
- if(!node){ return null; } // null
- var id = node.getAttribute("widgetId");
- return dijit.byId(id);
- },
-
- getPreviousSibling: function(){
- // summary:
- // returns null if this is the first child of the parent,
- // otherwise returns the next element sibling to the "left".
-
- return this._getSibling("previous");
- },
-
- getNextSibling: function(){
- // summary:
- // returns null if this is the last child of the parent,
- // otherwise returns the next element sibling to the "right".
-
- return this._getSibling("next");
- }
- }
-);
-
-dojo.declare("dijit._Container",
- null,
- {
- // summary
- // Mixin for widgets that contain a list of children like SplitContainer
-
- isContainer: true,
-
- addChild: function(/*Widget*/ widget, /*int?*/ insertIndex){
- // summary:
- // Process the given child widget, inserting it's dom node as
- // a child of our dom node
-
- if(insertIndex === undefined){
- insertIndex = "last";
- }
- var refNode = this.containerNode || this.domNode;
- if(insertIndex && typeof insertIndex == "number"){
- var children = dojo.query("> [widgetid]", refNode);
- if(children && children.length >= insertIndex){
- refNode = children[insertIndex-1]; insertIndex = "after";
- }
- }
- dojo.place(widget.domNode, refNode, insertIndex);
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // If I've been started but the child widget hasn't been started,
- // start it now. Make sure to do this after widget has been
- // inserted into the DOM tree, so it can see that it's being controlled by me,
- // so it doesn't try to size itself.
- if(this._started && !widget._started){
- widget.startup();
- }
- },
-
- removeChild: function(/*Widget*/ widget){
- // summary:
- // removes the passed widget instance from this widget but does
- // not destroy it
- var node = widget.domNode;
- node.parentNode.removeChild(node); // detach but don't destroy
- },
-
- _nextElement: function(node){
- do{
- node = node.nextSibling;
- }while(node && node.nodeType != 1);
- return node;
- },
-
- _firstElement: function(node){
- node = node.firstChild;
- if(node && node.nodeType != 1){
- node = this._nextElement(node);
- }
- return node;
- },
-
- getChildren: function(){
- // summary:
- // Returns array of children widgets
- return dojo.query("> [widgetId]", this.containerNode || this.domNode).map(dijit.byNode); // Array
- },
-
- hasChildren: function(){
- // summary:
- // Returns true if widget has children
- var cn = this.containerNode || this.domNode;
- return !!this._firstElement(cn); // Boolean
- },
-
- _getSiblingOfChild: function(/*Widget*/ child, /*int*/ dir){
- // summary:
- // get the next or previous widget sibling of child
- // dir:
- // if 1, get the next sibling
- // if -1, get the previous sibling
- var node = child.domNode;
- var which = (dir>0 ? "nextSibling" : "previousSibling");
- do{
- node = node[which];
- }while(node && (node.nodeType != 1 || !dijit.byNode(node)));
- return node ? dijit.byNode(node) : null;
- }
- }
-);
-
-dojo.declare("dijit._KeyNavContainer",
- [dijit._Container],
- {
-
- // summary:
- // A _Container with keyboard navigation of its children.
- // To use this mixin, call connectKeyNavHandlers() in
- // postCreate() and call startupKeyNavChildren() in startup().
-
-/*=====
- // focusedChild: Widget
- // The currently focused child widget, or null if there isn't one
- focusedChild: null,
-=====*/
-
- _keyNavCodes: {},
- connectKeyNavHandlers: function(/*Array*/ prevKeyCodes, /*Array*/ nextKeyCodes){
- // summary:
- // Call in postCreate() to attach the keyboard handlers
- // to the container.
- // preKeyCodes: Array
- // Key codes for navigating to the previous child.
- // nextKeyCodes: Array
- // Key codes for navigating to the next child.
-
- var keyCodes = this._keyNavCodes = {};
- var prev = dojo.hitch(this, this.focusPrev);
- var next = dojo.hitch(this, this.focusNext);
- dojo.forEach(prevKeyCodes, function(code){ keyCodes[code] = prev });
- dojo.forEach(nextKeyCodes, function(code){ keyCodes[code] = next });
- this.connect(this.domNode, "onkeypress", "_onContainerKeypress");
- if(dojo.isIE){
- this.connect(this.domNode, "onactivate", "_onContainerFocus");
- this.connect(this.domNode, "ondeactivate", "_onContainerBlur");
- }else{
- this.connect(this.domNode, "onfocus", "_onContainerFocus");
- this.connect(this.domNode, "onblur", "_onContainerBlur");
- }
- },
-
- startupKeyNavChildren: function(){
- // summary:
- // Call in startup() to set child tabindexes to -1
- dojo.forEach(this.getChildren(), dojo.hitch(this, "_setTabIndexMinusOne"));
- },
-
- addChild: function(/*Widget*/ widget, /*int?*/ insertIndex){
- // summary: Add a child to our _Container
- dijit._KeyNavContainer.superclass.addChild.apply(this, arguments);
- this._setTabIndexMinusOne(widget);
- },
-
- focus: function(){
- // summary: Default focus() implementation: focus the first child.
- this.focusFirstChild();
- },
-
- focusFirstChild: function(){
- // summary: Focus the first focusable child in the container.
- this.focusChild(this._getFirstFocusableChild());
- },
-
- focusNext: function(){
- // summary: Focus the next widget or focal node (for widgets
- // with multiple focal nodes) within this container.
- if(this.focusedChild && this.focusedChild.hasNextFocalNode
- && this.focusedChild.hasNextFocalNode()){
- this.focusedChild.focusNext();
- return;
- }
- var child = this._getNextFocusableChild(this.focusedChild, 1);
- if(child.getFocalNodes){
- this.focusChild(child, child.getFocalNodes()[0]);
- }else{
- this.focusChild(child);
- }
- },
-
- focusPrev: function(){
- // summary: Focus the previous widget or focal node (for widgets
- // with multiple focal nodes) within this container.
- if(this.focusedChild && this.focusedChild.hasPrevFocalNode
- && this.focusedChild.hasPrevFocalNode()){
- this.focusedChild.focusPrev();
- return;
- }
- var child = this._getNextFocusableChild(this.focusedChild, -1);
- if(child.getFocalNodes){
- var nodes = child.getFocalNodes();
- this.focusChild(child, nodes[nodes.length-1]);
- }else{
- this.focusChild(child);
- }
- },
-
- focusChild: function(/*Widget*/ widget, /*Node?*/ node){
- // summary: Focus widget. Optionally focus 'node' within widget.
- if(widget){
- if(this.focusedChild && widget !== this.focusedChild){
- this._onChildBlur(this.focusedChild);
- }
- this.focusedChild = widget;
- if(node && widget.focusFocalNode){
- widget.focusFocalNode(node);
- }else{
- widget.focus();
- }
- }
- },
-
- _setTabIndexMinusOne: function(/*Widget*/ widget){
- if(widget.getFocalNodes){
- dojo.forEach(widget.getFocalNodes(), function(node){
- node.setAttribute("tabIndex", -1);
- });
- }else{
- (widget.focusNode || widget.domNode).setAttribute("tabIndex", -1);
- }
- },
-
- _onContainerFocus: function(evt){
- this.domNode.setAttribute("tabIndex", -1);
- if(evt.target === this.domNode){
- this.focusFirstChild();
- }else{
- var widget = dijit.getEnclosingWidget(evt.target);
- if(widget && widget.isFocusable()){
- this.focusedChild = widget;
- }
- }
- },
-
- _onContainerBlur: function(evt){
- if(this.tabIndex){
- this.domNode.setAttribute("tabIndex", this.tabIndex);
- }
- },
-
- _onContainerKeypress: function(evt){
- if(evt.ctrlKey || evt.altKey){ return; }
- var func = this._keyNavCodes[evt.keyCode];
- if(func){
- func();
- dojo.stopEvent(evt);
- }
- },
-
- _onChildBlur: function(/*Widget*/ widget){
- // summary:
- // Called when focus leaves a child widget to go
- // to a sibling widget.
- },
-
- _getFirstFocusableChild: function(){
- return this._getNextFocusableChild(null, 1);
- },
-
- _getNextFocusableChild: function(child, dir){
- if(child){
- child = this._getSiblingOfChild(child, dir);
- }
- var children = this.getChildren();
- for(var i=0; i < children.length; i++){
- if(!child){
- child = children[(dir>0) ? 0 : (children.length-1)];
- }
- if(child.isFocusable()){
- return child;
- }
- child = this._getSiblingOfChild(child, dir);
- }
- }
- }
-);
-
+if(!dojo._hasResource["dijit._Container"]){
+dojo._hasResource["dijit._Container"]=true;
+dojo.provide("dijit._Container");
+dojo.declare("dijit._Container",null,{isContainer:true,buildRendering:function(){
+this.inherited(arguments);
+if(!this.containerNode){
+this.containerNode=this.domNode;
+}
+},addChild:function(_1,_2){
+var _3=this.containerNode;
+if(_2&&typeof _2=="number"){
+var _4=this.getChildren();
+if(_4&&_4.length>=_2){
+_3=_4[_2-1].domNode;
+_2="after";
+}
+}
+dojo.place(_1.domNode,_3,_2);
+if(this._started&&!_1._started){
+_1.startup();
+}
+},removeChild:function(_5){
+if(typeof _5=="number"&&_5>0){
+_5=this.getChildren()[_5];
}
+if(_5&&_5.domNode){
+var _6=_5.domNode;
+_6.parentNode.removeChild(_6);
+}
+},getChildren:function(){
+return dojo.query("> [widgetId]",this.containerNode).map(dijit.byNode);
+},hasChildren:function(){
+return dojo.query("> [widgetId]",this.containerNode).length>0;
+},destroyDescendants:function(_7){
+dojo.forEach(this.getChildren(),function(_8){
+_8.destroyRecursive(_7);
+});
+},_getSiblingOfChild:function(_9,_a){
+var _b=_9.domNode,_c=(_a>0?"nextSibling":"previousSibling");
+do{
+_b=_b[_c];
+}while(_b&&(_b.nodeType!=1||!dijit.byNode(_b)));
+return _b&&dijit.byNode(_b);
+},getIndexOfChild:function(_d){
+return dojo.indexOf(this.getChildren(),_d);
+},startup:function(){
+if(this._started){
+return;
+}
+dojo.forEach(this.getChildren(),function(_e){
+_e.startup();
+});
+this.inherited(arguments);
+}});
+}
diff --git a/js/dojo/dijit/_Templated.js b/js/dojo/dijit/_Templated.js
--- a/js/dojo/dijit/_Templated.js
+++ b/js/dojo/dijit/_Templated.js
@@ -1,326 +1,184 @@
-if(!dojo._hasResource["dijit._Templated"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._Templated"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit._Templated"]){
+dojo._hasResource["dijit._Templated"]=true;
dojo.provide("dijit._Templated");
-
dojo.require("dijit._Widget");
-
dojo.require("dojo.string");
dojo.require("dojo.parser");
-
-dojo.declare("dijit._Templated",
- null,
- {
- // summary:
- // mixin for widgets that are instantiated from a template
-
- // templateNode: DomNode
- // a node that represents the widget template. Pre-empts both templateString and templatePath.
- templateNode: null,
-
- // templateString String:
- // a string that represents the widget template. Pre-empts the
- // templatePath. In builds that have their strings "interned", the
- // templatePath is converted to an inline templateString, thereby
- // preventing a synchronous network call.
- templateString: null,
-
- // templatePath: String
- // Path to template (HTML file) for this widget
- templatePath: null,
-
- // widgetsInTemplate Boolean:
- // should we parse the template to find widgets that might be
- // declared in markup inside it? false by default.
- widgetsInTemplate: false,
-
- // containerNode DomNode:
- // holds child elements. "containerNode" is generally set via a
- // dojoAttachPoint assignment and it designates where children of
- // the src dom node will be placed
- containerNode: null,
-
- // skipNodeCache Boolean:
- // if using a cached widget template node poses issues for a
- // particular widget class, it can set this property to ensure
- // that its template is always re-built from a string
- _skipNodeCache: false,
-
- // method over-ride
- buildRendering: function(){
- // summary:
- // Construct the UI for this widget from a template, setting this.domNode.
-
- // Lookup cached version of template, and download to cache if it
- // isn't there already. Returns either a DomNode or a string, depending on
- // whether or not the template contains ${foo} replacement parameters.
- var cached = dijit._Templated.getCachedTemplate(this.templatePath, this.templateString, this._skipNodeCache);
-
- var node;
- if(dojo.isString(cached)){
- var className = this.declaredClass, _this = this;
- // Cache contains a string because we need to do property replacement
- // do the property replacement
- var tstr = dojo.string.substitute(cached, this, function(value, key){
- if(key.charAt(0) == '!'){ value = _this[key.substr(1)]; }
- if(typeof value == "undefined"){ throw new Error(className+" template:"+key); } // a debugging aide
- if(!value){ return ""; }
-
- // Substitution keys beginning with ! will skip the transform step,
- // in case a user wishes to insert unescaped markup, e.g. ${!foo}
- return key.charAt(0) == "!" ? value :
- // Safer substitution, see heading "Attribute values" in
- // http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.3.2
- value.toString().replace(/"/g,"&quot;"); //TODO: add &amp? use encodeXML method?
- }, this);
-
- node = dijit._Templated._createNodesFromText(tstr)[0];
- }else{
- // if it's a node, all we have to do is clone it
- node = cached.cloneNode(true);
- }
-
- // recurse through the node, looking for, and attaching to, our
- // attachment points which should be defined on the template node.
- this._attachTemplateNodes(node);
-
- var source = this.srcNodeRef;
- if(source && source.parentNode){
- source.parentNode.replaceChild(node, source);
- }
-
- this.domNode = node;
- if(this.widgetsInTemplate){
- var childWidgets = dojo.parser.parse(node);
- this._attachTemplateNodes(childWidgets, function(n,p){
- return n[p];
- });
- }
-
- this._fillContent(source);
- },
-
- _fillContent: function(/*DomNode*/ source){
- // summary:
- // relocate source contents to templated container node
- // this.containerNode must be able to receive children, or exceptions will be thrown
- var dest = this.containerNode;
- if(source && dest){
- while(source.hasChildNodes()){
- dest.appendChild(source.firstChild);
- }
- }
- },
-
- _attachTemplateNodes: function(rootNode, getAttrFunc){
- // summary:
- // map widget properties and functions to the handlers specified in
- // the dom node and it's descendants. This function iterates over all
- // nodes and looks for these properties:
- // * dojoAttachPoint
- // * dojoAttachEvent
- // * waiRole
- // * waiState
- // rootNode: DomNode|Array[Widgets]
- // the node to search for properties. All children will be searched.
- // getAttrFunc: function?
- // a function which will be used to obtain property for a given
- // DomNode/Widget
-
- getAttrFunc = getAttrFunc || function(n,p){ return n.getAttribute(p); };
-
- var nodes = dojo.isArray(rootNode) ? rootNode : (rootNode.all || rootNode.getElementsByTagName("*"));
- var x=dojo.isArray(rootNode)?0:-1;
- for(; x<nodes.length; x++){
- var baseNode = (x == -1) ? rootNode : nodes[x];
- if(this.widgetsInTemplate && getAttrFunc(baseNode,'dojoType')){
- continue;
- }
- // Process dojoAttachPoint
- var attachPoint = getAttrFunc(baseNode, "dojoAttachPoint");
- if(attachPoint){
- var point, points = attachPoint.split(/\s*,\s*/);
- while(point=points.shift()){
- if(dojo.isArray(this[point])){
- this[point].push(baseNode);
- }else{
- this[point]=baseNode;
- }
- }
- }
-
- // Process dojoAttachEvent
- var attachEvent = getAttrFunc(baseNode, "dojoAttachEvent");
- if(attachEvent){
- // NOTE: we want to support attributes that have the form
- // "domEvent: nativeEvent; ..."
- var event, events = attachEvent.split(/\s*,\s*/);
- var trim = dojo.trim;
- while(event=events.shift()){
- if(event){
- var thisFunc = null;
- if(event.indexOf(":") != -1){
- // oh, if only JS had tuple assignment
- var funcNameArr = event.split(":");
- event = trim(funcNameArr[0]);
- thisFunc = trim(funcNameArr[1]);
- }else{
- event = trim(event);
- }
- if(!thisFunc){
- thisFunc = event;
- }
- this.connect(baseNode, event, thisFunc);
- }
- }
- }
-
- // waiRole, waiState
- var role = getAttrFunc(baseNode, "waiRole");
- if(role){
- dijit.setWaiRole(baseNode, role);
- }
- var values = getAttrFunc(baseNode, "waiState");
- if(values){
- dojo.forEach(values.split(/\s*,\s*/), function(stateValue){
- if(stateValue.indexOf('-') != -1){
- var pair = stateValue.split('-');
- dijit.setWaiState(baseNode, pair[0], pair[1]);
- }
- });
- }
-
- }
- }
- }
-);
-
-// key is either templatePath or templateString; object is either string or DOM tree
-dijit._Templated._templateCache = {};
-
-dijit._Templated.getCachedTemplate = function(templatePath, templateString, alwaysUseString){
- // summary:
- // static method to get a template based on the templatePath or
- // templateString key
- // templatePath: String
- // the URL to get the template from. dojo.uri.Uri is often passed as well.
- // templateString: String?
- // a string to use in lieu of fetching the template from a URL
- // Returns:
- // Either string (if there are ${} variables that need to be replaced) or just
- // a DOM tree (if the node can be cloned directly)
-
- // is it already cached?
- var tmplts = dijit._Templated._templateCache;
- var key = templateString || templatePath;
- var cached = tmplts[key];
- if(cached){
- return cached;
- }
-
- // If necessary, load template string from template path
- if(!templateString){
- templateString = dijit._Templated._sanitizeTemplateString(dojo._getText(templatePath));
- }
-
- templateString = dojo.string.trim(templateString);
-
- if(templateString.match(/\$\{([^\}]+)\}/g) || alwaysUseString){
- // there are variables in the template so all we can do is cache the string
- return (tmplts[key] = templateString); //String
- }else{
- // there are no variables in the template so we can cache the DOM tree
- return (tmplts[key] = dijit._Templated._createNodesFromText(templateString)[0]); //Node
- }
+dojo.require("dojo.cache");
+dojo.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_earlyTemplatedStartup:false,constructor:function(){
+this._attachPoints=[];
+},_stringRepl:function(_1){
+var _2=this.declaredClass,_3=this;
+return dojo.string.substitute(_1,this,function(_4,_5){
+if(_5.charAt(0)=="!"){
+_4=dojo.getObject(_5.substr(1),false,_3);
+}
+if(typeof _4=="undefined"){
+throw new Error(_2+" template:"+_5);
+}
+if(_4==null){
+return "";
+}
+return _5.charAt(0)=="!"?_4:_4.toString().replace(/"/g,"&quot;");
+},this);
+},buildRendering:function(){
+var _6=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);
+var _7;
+if(dojo.isString(_6)){
+_7=dojo._toDom(this._stringRepl(_6));
+if(_7.nodeType!=1){
+throw new Error("Invalid template: "+_6);
+}
+}else{
+_7=_6.cloneNode(true);
+}
+this.domNode=_7;
+this._attachTemplateNodes(_7);
+if(this.widgetsInTemplate){
+var _8=dojo.parser,_9,_a;
+if(_8._query!="[dojoType]"){
+_9=_8._query;
+_a=_8._attrName;
+_8._query="[dojoType]";
+_8._attrName="dojoType";
+}
+var cw=(this._startupWidgets=dojo.parser.parse(_7,{noStart:!this._earlyTemplatedStartup}));
+if(_9){
+_8._query=_9;
+_8._attrName=_a;
+}
+this._supportingWidgets=dijit.findWidgets(_7);
+this._attachTemplateNodes(cw,function(n,p){
+return n[p];
+});
+}
+this._fillContent(this.srcNodeRef);
+},_fillContent:function(_b){
+var _c=this.containerNode;
+if(_b&&_c){
+while(_b.hasChildNodes()){
+_c.appendChild(_b.firstChild);
+}
+}
+},_attachTemplateNodes:function(_d,_e){
+_e=_e||function(n,p){
+return n.getAttribute(p);
};
-
-dijit._Templated._sanitizeTemplateString = function(/*String*/tString){
- // summary:
- // Strips <?xml ...?> declarations so that external SVG and XML
- // documents can be added to a document without worry. Also, if the string
- // is an HTML document, only the part inside the body tag is returned.
- if(tString){
- tString = tString.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, "");
- var matches = tString.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
- if(matches){
- tString = matches[1];
- }
- }else{
- tString = "";
- }
- return tString; //String
-};
-
-
-if(dojo.isIE){
- dojo.addOnUnload(function(){
- var cache = dijit._Templated._templateCache;
- for(var key in cache){
- var value = cache[key];
- if(!isNaN(value.nodeType)){ // isNode equivalent
- dojo._destroyElement(value);
- }
- delete cache[key];
- }
- });
+var _f=dojo.isArray(_d)?_d:(_d.all||_d.getElementsByTagName("*"));
+var x=dojo.isArray(_d)?0:-1;
+for(;x<_f.length;x++){
+var _10=(x==-1)?_d:_f[x];
+if(this.widgetsInTemplate&&_e(_10,"dojoType")){
+continue;
+}
+var _11=_e(_10,"dojoAttachPoint");
+if(_11){
+var _12,_13=_11.split(/\s*,\s*/);
+while((_12=_13.shift())){
+if(dojo.isArray(this[_12])){
+this[_12].push(_10);
+}else{
+this[_12]=_10;
+}
+this._attachPoints.push(_12);
+}
+}
+var _14=_e(_10,"dojoAttachEvent");
+if(_14){
+var _15,_16=_14.split(/\s*,\s*/);
+var _17=dojo.trim;
+while((_15=_16.shift())){
+if(_15){
+var _18=null;
+if(_15.indexOf(":")!=-1){
+var _19=_15.split(":");
+_15=_17(_19[0]);
+_18=_17(_19[1]);
+}else{
+_15=_17(_15);
+}
+if(!_18){
+_18=_15;
+}
+this.connect(_10,_15,_18);
+}
+}
+}
+var _1a=_e(_10,"waiRole");
+if(_1a){
+dijit.setWaiRole(_10,_1a);
+}
+var _1b=_e(_10,"waiState");
+if(_1b){
+dojo.forEach(_1b.split(/\s*,\s*/),function(_1c){
+if(_1c.indexOf("-")!=-1){
+var _1d=_1c.split("-");
+dijit.setWaiState(_10,_1d[0],_1d[1]);
+}
+});
+}
}
-
-(function(){
- var tagMap = {
- cell: {re: /^<t[dh][\s\r\n>]/i, pre: "<table><tbody><tr>", post: "</tr></tbody></table>"},
- row: {re: /^<tr[\s\r\n>]/i, pre: "<table><tbody>", post: "</tbody></table>"},
- section: {re: /^<(thead|tbody|tfoot)[\s\r\n>]/i, pre: "<table>", post: "</table>"}
- };
-
- // dummy container node used temporarily to hold nodes being created
- var tn;
-
- dijit._Templated._createNodesFromText = function(/*String*/text){
- // summary:
- // Attempts to create a set of nodes based on the structure of the passed text.
-
- if(!tn){
- tn = dojo.doc.createElement("div");
- tn.style.display="none";
- dojo.body().appendChild(tn);
- }
- var tableType = "none";
- var rtext = text.replace(/^\s+/, "");
- for(var type in tagMap){
- var map = tagMap[type];
- if(map.re.test(rtext)){
- tableType = type;
- text = map.pre + text + map.post;
- break;
- }
- }
-
- tn.innerHTML = text;
- if(tn.normalize){
- tn.normalize();
- }
-
- var tag = { cell: "tr", row: "tbody", section: "table" }[tableType];
- var _parent = (typeof tag != "undefined") ?
- tn.getElementsByTagName(tag)[0] :
- tn;
-
- var nodes = [];
- while(_parent.firstChild){
- nodes.push(_parent.removeChild(_parent.firstChild));
- }
- tn.innerHTML="";
- return nodes; // Array
- }
-})();
-
-// These arguments can be specified for widgets which are used in templates.
-// Since any widget can be specified as sub widgets in template, mix it
-// into the base widget class. (This is a hack, but it's effective.)
-dojo.extend(dijit._Widget,{
- dojoAttachEvent: "",
- dojoAttachPoint: "",
- waiRole: "",
- waiState:""
-})
-
+},startup:function(){
+dojo.forEach(this._startupWidgets,function(w){
+if(w&&!w._started&&w.startup){
+w.startup();
+}
+});
+this.inherited(arguments);
+},destroyRendering:function(){
+dojo.forEach(this._attachPoints,function(_1e){
+delete this[_1e];
+},this);
+this._attachPoints=[];
+this.inherited(arguments);
+}});
+dijit._Templated._templateCache={};
+dijit._Templated.getCachedTemplate=function(_1f,_20,_21){
+var _22=dijit._Templated._templateCache;
+var key=_20||_1f;
+var _23=_22[key];
+if(_23){
+try{
+if(!_23.ownerDocument||_23.ownerDocument==dojo.doc){
+return _23;
+}
+}
+catch(e){
+}
+dojo.destroy(_23);
}
+if(!_20){
+_20=dojo.cache(_1f,{sanitize:true});
+}
+_20=dojo.string.trim(_20);
+if(_21||_20.match(/\$\{([^\}]+)\}/g)){
+return (_22[key]=_20);
+}else{
+var _24=dojo._toDom(_20);
+if(_24.nodeType!=1){
+throw new Error("Invalid template: "+_20);
+}
+return (_22[key]=_24);
+}
+};
+if(dojo.isIE){
+dojo.addOnWindowUnload(function(){
+var _25=dijit._Templated._templateCache;
+for(var key in _25){
+var _26=_25[key];
+if(typeof _26=="object"){
+dojo.destroy(_26);
+}
+delete _25[key];
+}
+});
+}
+dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});
+}
diff --git a/js/dojo/dijit/_TimePicker.js b/js/dojo/dijit/_TimePicker.js
--- a/js/dojo/dijit/_TimePicker.js
+++ b/js/dojo/dijit/_TimePicker.js
@@ -1,221 +1,265 @@
-if(!dojo._hasResource["dijit._TimePicker"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._TimePicker"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit._TimePicker"]){
+dojo._hasResource["dijit._TimePicker"]=true;
dojo.provide("dijit._TimePicker");
-
dojo.require("dijit.form._FormWidget");
dojo.require("dojo.date.locale");
-
-dojo.declare("dijit._TimePicker",
- [dijit._Widget, dijit._Templated],
- {
- // summary:
- // A graphical time picker that TimeTextBox pops up
- // It is functionally modeled after the Java applet at http://java.arcadevillage.com/applets/timepica.htm
- // See ticket #599
-
- templateString:"<div id=\"widget_${id}\" class=\"dijitMenu\"\n ><div dojoAttachPoint=\"upArrow\" class=\"dijitButtonNode\"><span class=\"dijitTimePickerA11yText\">&#9650;</span></div\n ><div dojoAttachPoint=\"timeMenu,focusNode\" dojoAttachEvent=\"onclick:_onOptionSelected,onmouseover,onmouseout\"></div\n ><div dojoAttachPoint=\"downArrow\" class=\"dijitButtonNode\"><span class=\"dijitTimePickerA11yText\">&#9660;</span></div\n></div>\n",
- baseClass: "dijitTimePicker",
-
- // clickableIncrement: String
- // ISO-8601 string representing the amount by which
- // every clickable element in the time picker increases
- // Set in non-Zulu time, without a time zone
- // Example: "T00:15:00" creates 15 minute increments
- // Must divide visibleIncrement evenly
- clickableIncrement: "T00:15:00",
-
- // visibleIncrement: String
- // ISO-8601 string representing the amount by which
- // every element with a visible time in the time picker increases
- // Set in non Zulu time, without a time zone
- // Example: "T01:00:00" creates text in every 1 hour increment
- visibleIncrement: "T01:00:00",
-
- // visibleRange: String
- // ISO-8601 string representing the range of this TimePicker
- // The TimePicker will only display times in this range
- // Example: "T05:00:00" displays 5 hours of options
- visibleRange: "T05:00:00",
-
- // value: String
- // Date to display.
- // Defaults to current time and date.
- // Can be a Date object or an ISO-8601 string
- // If you specify the GMT time zone ("-01:00"),
- // the time will be converted to the local time in the local time zone.
- // Otherwise, the time is considered to be in the local time zone.
- // If you specify the date and isDate is true, the date is used.
- // Example: if your local time zone is GMT -05:00,
- // "T10:00:00" becomes "T10:00:00-05:00" (considered to be local time),
- // "T10:00:00-01:00" becomes "T06:00:00-05:00" (4 hour difference),
- // "T10:00:00Z" becomes "T05:00:00-05:00" (5 hour difference between Zulu and local time)
- // "yyyy-mm-ddThh:mm:ss" is the format to set the date and time
- // Example: "2007-06-01T09:00:00"
- value: new Date(),
-
- _visibleIncrement:2,
- _clickableIncrement:1,
- _totalIncrements:10,
- constraints:{},
-
- serialize: dojo.date.stamp.toISOString,
-
- setValue:function(/*Date*/ date, /*Boolean*/ priority){
- // summary:
- // Set the value of the TimePicker
- // Redraws the TimePicker around the new date
-
- //dijit._TimePicker.superclass.setValue.apply(this, arguments);
- this.value=date;
- this._showText();
- },
-
- isDisabledDate: function(/*Date*/dateObject, /*String?*/locale){
- // summary:
- // May be overridden to disable certain dates in the TimePicker e.g. isDisabledDate=dojo.date.locale.isWeekend
- return false; // Boolean
- },
-
- _showText:function(){
- this.timeMenu.innerHTML="";
- var fromIso = dojo.date.stamp.fromISOString;
- this._clickableIncrementDate=fromIso(this.clickableIncrement);
- this._visibleIncrementDate=fromIso(this.visibleIncrement);
- this._visibleRangeDate=fromIso(this.visibleRange);
- // get the value of the increments and the range in seconds (since 00:00:00) to find out how many divs to create
- var sinceMidnight = function(/*Date*/ date){
- return date.getHours()*60*60+date.getMinutes()*60+date.getSeconds();
- };
-
- var clickableIncrementSeconds = sinceMidnight(this._clickableIncrementDate);
- var visibleIncrementSeconds = sinceMidnight(this._visibleIncrementDate);
- var visibleRangeSeconds = sinceMidnight(this._visibleRangeDate);
-
- // round reference date to previous visible increment
- var time = this.value.getTime();
- this._refDate = new Date(time - time % (visibleIncrementSeconds*1000));
-
- // assume clickable increment is the smallest unit
- this._clickableIncrement=1;
- // divide the visible range by the clickable increment to get the number of divs to create
- // example: 10:00:00/00:15:00 -> display 40 divs
- this._totalIncrements=visibleRangeSeconds/clickableIncrementSeconds;
- // divide the visible increments by the clickable increments to get how often to display the time inline
- // example: 01:00:00/00:15:00 -> display the time every 4 divs
- this._visibleIncrement=visibleIncrementSeconds/clickableIncrementSeconds;
- for(var i=-this._totalIncrements/2; i<=this._totalIncrements/2; i+=this._clickableIncrement){
- var div=this._createOption(i);
- this.timeMenu.appendChild(div);
- }
-
- // TODO:
- // I commented this out because it
- // causes problems for a TimeTextBox in a Dialog, or as the editor of an InlineEditBox,
- // because the timeMenu node isn't visible yet. -- Bill (Bug #????)
- // dijit.focus(this.timeMenu);
- },
-
- postCreate:function(){
- // instantiate constraints
- if(this.constraints===dijit._TimePicker.prototype.constraints){
- this.constraints={};
- }
- // dojo.date.locale needs the lang in the constraints as locale
- if(!this.constraints.locale){
- this.constraints.locale=this.lang;
- }
-
- // assign typematic mouse listeners to the arrow buttons
- this.connect(this.timeMenu, dojo.isIE ? "onmousewheel" : 'DOMMouseScroll', "_mouseWheeled");
- dijit.typematic.addMouseListener(this.upArrow,this,this._onArrowUp, 0.8, 500);
- dijit.typematic.addMouseListener(this.downArrow,this,this._onArrowDown, 0.8, 500);
- //dijit.typematic.addListener(this.upArrow,this.timeMenu, {keyCode:dojo.keys.UP_ARROW,ctrlKey:false,altKey:false,shiftKey:false}, this, "_onArrowUp", 0.8, 500);
- //dijit.typematic.addListener(this.downArrow, this.timeMenu, {keyCode:dojo.keys.DOWN_ARROW,ctrlKey:false,altKey:false,shiftKey:false}, this, "_onArrowDown", 0.8,500);
-
- this.inherited("postCreate", arguments);
- this.setValue(this.value);
- },
-
- _createOption:function(/*Number*/ index){
- // summary: creates a clickable time option
- var div=document.createElement("div");
- var date = (div.date = new Date(this._refDate));
- div.index=index;
- var incrementDate = this._clickableIncrementDate;
- date.setHours(date.getHours()+incrementDate.getHours()*index,
- date.getMinutes()+incrementDate.getMinutes()*index,
- date.getSeconds()+incrementDate.getSeconds()*index);
-
- var innerDiv = document.createElement('div');
- dojo.addClass(div,this.baseClass+"Item");
- dojo.addClass(innerDiv,this.baseClass+"ItemInner");
- innerDiv.innerHTML=dojo.date.locale.format(date, this.constraints);
- div.appendChild(innerDiv);
-
- if(index%this._visibleIncrement<1 && index%this._visibleIncrement>-1){
- dojo.addClass(div, this.baseClass+"Marker");
- }else if(index%this._clickableIncrement==0){
- dojo.addClass(div, this.baseClass+"Tick");
- }
-
- if(this.isDisabledDate(date)){
- // set disabled
- dojo.addClass(div, this.baseClass+"ItemDisabled");
- }
- if(dojo.date.compare(this.value, date, this.constraints.selector)==0){
- div.selected=true;
- dojo.addClass(div, this.baseClass+"ItemSelected");
- }
- return div;
- },
-
- _onOptionSelected:function(/*Object*/ tgt){
- var tdate = tgt.target.date || tgt.target.parentNode.date;
- if(!tdate||this.isDisabledDate(tdate)){return;}
- this.setValue(tdate);
- this.onValueSelected(tdate);
- },
-
- onValueSelected:function(value){
- },
-
- onmouseover:function(/*Event*/ e){
- var tgr = (e.target.parentNode === this.timeMenu) ? e.target : e.target.parentNode;
- this._highlighted_option=tgr;
- dojo.addClass(tgr, this.baseClass+"ItemHover");
- },
-
- onmouseout:function(/*Event*/ e){
- var tgr = (e.target.parentNode === this.timeMenu) ? e.target : e.target.parentNode;
- if(this._highlighted_option===tgr){
- dojo.removeClass(tgr, this.baseClass+"ItemHover");
- }
- },
-
- _mouseWheeled:function(/*Event*/e){
- // summary: handle the mouse wheel listener
- dojo.stopEvent(e);
- // we're not _measuring_ the scroll amount, just direction
- var scrollAmount = (dojo.isIE ? e.wheelDelta : -e.detail);
- this[(scrollAmount>0 ? "_onArrowUp" : "_onArrowDown")](); // yes, we're making a new dom node every time you mousewheel, or click
- },
-
- _onArrowUp:function(){
- // summary: remove the bottom time and add one to the top
- var index=this.timeMenu.childNodes[0].index-1;
- var div=this._createOption(index);
- this.timeMenu.removeChild(this.timeMenu.childNodes[this.timeMenu.childNodes.length-1]);
- this.timeMenu.insertBefore(div, this.timeMenu.childNodes[0]);
- },
-
- _onArrowDown:function(){
- // summary: remove the top time and add one to the bottom
- var index=this.timeMenu.childNodes[this.timeMenu.childNodes.length-1].index+1;
- var div=this._createOption(index);
- this.timeMenu.removeChild(this.timeMenu.childNodes[0]);
- this.timeMenu.appendChild(div);
- }
- }
-);
-
+dojo.declare("dijit._TimePicker",[dijit._Widget,dijit._Templated],{templateString:dojo.cache("dijit","templates/TimePicker.html","<div id=\"widget_${id}\" class=\"dijitMenu ${baseClass}\"\n ><div dojoAttachPoint=\"upArrow\" class=\"dijitButtonNode dijitUpArrowButton\" dojoAttachEvent=\"onmouseenter:_buttonMouse,onmouseleave:_buttonMouse\"\n\t\t><div class=\"dijitReset dijitInline dijitArrowButtonInner\" wairole=\"presentation\" role=\"presentation\">&nbsp;</div\n\t\t><div class=\"dijitArrowButtonChar\">&#9650;</div></div\n ><div dojoAttachPoint=\"timeMenu,focusNode\" dojoAttachEvent=\"onclick:_onOptionSelected,onmouseover,onmouseout\"></div\n ><div dojoAttachPoint=\"downArrow\" class=\"dijitButtonNode dijitDownArrowButton\" dojoAttachEvent=\"onmouseenter:_buttonMouse,onmouseleave:_buttonMouse\"\n\t\t><div class=\"dijitReset dijitInline dijitArrowButtonInner\" wairole=\"presentation\" role=\"presentation\">&nbsp;</div\n\t\t><div class=\"dijitArrowButtonChar\">&#9660;</div></div\n></div>\n"),baseClass:"dijitTimePicker",clickableIncrement:"T00:15:00",visibleIncrement:"T01:00:00",visibleRange:"T05:00:00",value:new Date(),_visibleIncrement:2,_clickableIncrement:1,_totalIncrements:10,constraints:{},serialize:dojo.date.stamp.toISOString,_filterString:"",setValue:function(_1){
+dojo.deprecated("dijit._TimePicker:setValue() is deprecated. Use attr('value') instead.","","2.0");
+this.attr("value",_1);
+},_setValueAttr:function(_2){
+this.value=_2;
+this._showText();
+},onOpen:function(_3){
+if(this._beenOpened&&this.domNode.parentNode){
+var p=dijit.byId(this.domNode.parentNode.dijitPopupParent);
+if(p){
+var _4=p.attr("displayedValue");
+if(_4&&!p.parse(_4,p.constraints)){
+this._filterString=_4;
+}else{
+this._filterString="";
+}
+this._showText();
+}
+}
+this._beenOpened=true;
+},isDisabledDate:function(_5,_6){
+return false;
+},_getFilteredNodes:function(_7,_8,_9){
+var _a=[],n,i=_7,_b=this._maxIncrement+Math.abs(i),_c=_9?-1:1,_d=_9?1:0,_e=_9?0:1;
+do{
+i=i-_d;
+n=this._createOption(i);
+if(n){
+_a.push(n);
+}
+i=i+_e;
+}while(_a.length<_8&&(i*_c)<_b);
+if(_9){
+_a.reverse();
+}
+return _a;
+},_showText:function(){
+this.timeMenu.innerHTML="";
+var _f=dojo.date.stamp.fromISOString;
+this._clickableIncrementDate=_f(this.clickableIncrement);
+this._visibleIncrementDate=_f(this.visibleIncrement);
+this._visibleRangeDate=_f(this.visibleRange);
+var _10=function(_11){
+return _11.getHours()*60*60+_11.getMinutes()*60+_11.getSeconds();
+};
+var _12=_10(this._clickableIncrementDate);
+var _13=_10(this._visibleIncrementDate);
+var _14=_10(this._visibleRangeDate);
+var _15=this.value.getTime();
+this._refDate=new Date(_15-_15%(_13*1000));
+this._refDate.setFullYear(1970,0,1);
+this._clickableIncrement=1;
+this._totalIncrements=_14/_12;
+this._visibleIncrement=_13/_12;
+this._maxIncrement=(60*60*24)/_12;
+var _16=this._getFilteredNodes(0,this._totalIncrements>>1,true);
+var _17=this._getFilteredNodes(0,this._totalIncrements>>1,false);
+if(_16.length<this._totalIncrements>>1){
+_16=_16.slice(_16.length/2);
+_17=_17.slice(0,_17.length/2);
+}
+dojo.forEach(_16.concat(_17),function(n){
+this.timeMenu.appendChild(n);
+},this);
+},postCreate:function(){
+if(this.constraints===dijit._TimePicker.prototype.constraints){
+this.constraints={};
+}
+dojo.mixin(this,this.constraints);
+if(!this.constraints.locale){
+this.constraints.locale=this.lang;
+}
+this.connect(this.timeMenu,dojo.isIE?"onmousewheel":"DOMMouseScroll","_mouseWheeled");
+var _18=this;
+var _19=function(){
+_18._connects.push(dijit.typematic.addMouseListener.apply(null,arguments));
+};
+_19(this.upArrow,this,this._onArrowUp,1,50);
+_19(this.downArrow,this,this._onArrowDown,1,50);
+var _1a=function(cb){
+return function(cnt){
+if(cnt>0){
+cb.call(this,arguments);
+}
+};
+};
+var _1b=function(_1c,cb){
+return function(e){
+dojo.stopEvent(e);
+dijit.typematic.trigger(e,this,_1c,_1a(cb),_1c,1,50);
+};
+};
+this.connect(this.upArrow,"onmouseover",_1b(this.upArrow,this._onArrowUp));
+this.connect(this.downArrow,"onmouseover",_1b(this.downArrow,this._onArrowDown));
+this.inherited(arguments);
+},_buttonMouse:function(e){
+dojo.toggleClass(e.currentTarget,"dijitButtonNodeHover",e.type=="mouseover");
+},_createOption:function(_1d){
+var _1e=new Date(this._refDate);
+var _1f=this._clickableIncrementDate;
+_1e.setHours(_1e.getHours()+_1f.getHours()*_1d,_1e.getMinutes()+_1f.getMinutes()*_1d,_1e.getSeconds()+_1f.getSeconds()*_1d);
+if(this.constraints.selector=="time"){
+_1e.setFullYear(1970,0,1);
+}
+var _20=dojo.date.locale.format(_1e,this.constraints);
+if(this._filterString&&_20.toLowerCase().indexOf(this._filterString)!==0){
+return null;
+}
+var div=dojo.create("div",{"class":this.baseClass+"Item"});
+div.date=_1e;
+div.index=_1d;
+dojo.create("div",{"class":this.baseClass+"ItemInner",innerHTML:_20},div);
+if(_1d%this._visibleIncrement<1&&_1d%this._visibleIncrement>-1){
+dojo.addClass(div,this.baseClass+"Marker");
+}else{
+if(!(_1d%this._clickableIncrement)){
+dojo.addClass(div,this.baseClass+"Tick");
+}
+}
+if(this.isDisabledDate(_1e)){
+dojo.addClass(div,this.baseClass+"ItemDisabled");
}
+if(!dojo.date.compare(this.value,_1e,this.constraints.selector)){
+div.selected=true;
+dojo.addClass(div,this.baseClass+"ItemSelected");
+if(dojo.hasClass(div,this.baseClass+"Marker")){
+dojo.addClass(div,this.baseClass+"MarkerSelected");
+}else{
+dojo.addClass(div,this.baseClass+"TickSelected");
+}
+}
+return div;
+},_onOptionSelected:function(tgt){
+var _21=tgt.target.date||tgt.target.parentNode.date;
+if(!_21||this.isDisabledDate(_21)){
+return;
+}
+this._highlighted_option=null;
+this.attr("value",_21);
+this.onValueSelected(_21);
+},onValueSelected:function(_22){
+},_highlightOption:function(_23,_24){
+if(!_23){
+return;
+}
+if(_24){
+if(this._highlighted_option){
+this._highlightOption(this._highlighted_option,false);
+}
+this._highlighted_option=_23;
+}else{
+if(this._highlighted_option!==_23){
+return;
+}else{
+this._highlighted_option=null;
+}
+}
+dojo.toggleClass(_23,this.baseClass+"ItemHover",_24);
+if(dojo.hasClass(_23,this.baseClass+"Marker")){
+dojo.toggleClass(_23,this.baseClass+"MarkerHover",_24);
+}else{
+dojo.toggleClass(_23,this.baseClass+"TickHover",_24);
+}
+},onmouseover:function(e){
+this._keyboardSelected=null;
+var tgr=(e.target.parentNode===this.timeMenu)?e.target:e.target.parentNode;
+if(!dojo.hasClass(tgr,this.baseClass+"Item")){
+return;
+}
+this._highlightOption(tgr,true);
+},onmouseout:function(e){
+this._keyboardSelected=null;
+var tgr=(e.target.parentNode===this.timeMenu)?e.target:e.target.parentNode;
+this._highlightOption(tgr,false);
+},_mouseWheeled:function(e){
+this._keyboardSelected=null;
+dojo.stopEvent(e);
+var _25=(dojo.isIE?e.wheelDelta:-e.detail);
+this[(_25>0?"_onArrowUp":"_onArrowDown")]();
+},_onArrowUp:function(_26){
+if(typeof _26=="number"&&_26==-1){
+return;
+}
+if(!this.timeMenu.childNodes.length){
+return;
+}
+var _27=this.timeMenu.childNodes[0].index;
+var _28=this._getFilteredNodes(_27,1,true);
+if(_28.length){
+this.timeMenu.removeChild(this.timeMenu.childNodes[this.timeMenu.childNodes.length-1]);
+this.timeMenu.insertBefore(_28[0],this.timeMenu.childNodes[0]);
+}
+},_onArrowDown:function(_29){
+if(typeof _29=="number"&&_29==-1){
+return;
+}
+if(!this.timeMenu.childNodes.length){
+return;
+}
+var _2a=this.timeMenu.childNodes[this.timeMenu.childNodes.length-1].index+1;
+var _2b=this._getFilteredNodes(_2a,1,false);
+if(_2b.length){
+this.timeMenu.removeChild(this.timeMenu.childNodes[0]);
+this.timeMenu.appendChild(_2b[0]);
+}
+},handleKey:function(e){
+var dk=dojo.keys;
+if(e.keyChar||e.charOrCode===dk.BACKSPACE||e.charOrCode==dk.DELETE){
+setTimeout(dojo.hitch(this,function(){
+this._filterString=e.target.value.toLowerCase();
+this._showText();
+}),1);
+}else{
+if(e.charOrCode==dk.DOWN_ARROW||e.charOrCode==dk.UP_ARROW){
+dojo.stopEvent(e);
+if(this._highlighted_option&&!this._highlighted_option.parentNode){
+this._highlighted_option=null;
+}
+var _2c=this.timeMenu,tgt=this._highlighted_option||dojo.query("."+this.baseClass+"ItemSelected",_2c)[0];
+if(!tgt){
+tgt=_2c.childNodes[0];
+}else{
+if(_2c.childNodes.length){
+if(e.charOrCode==dk.DOWN_ARROW&&!tgt.nextSibling){
+this._onArrowDown();
+}else{
+if(e.charOrCode==dk.UP_ARROW&&!tgt.previousSibling){
+this._onArrowUp();
+}
+}
+if(e.charOrCode==dk.DOWN_ARROW){
+tgt=tgt.nextSibling;
+}else{
+tgt=tgt.previousSibling;
+}
+}
+}
+this._highlightOption(tgt,true);
+this._keyboardSelected=tgt;
+}else{
+if(this._highlighted_option&&(e.charOrCode==dk.ENTER||e.charOrCode===dk.TAB)){
+if(!this._keyboardSelected&&e.charOrCode===dk.TAB){
+return;
+}
+if(e.charOrCode==dk.ENTER){
+dojo.stopEvent(e);
+}
+this._onOptionSelected({target:this._highlighted_option});
+}
+}
+}
+}});
+}
diff --git a/js/dojo/dijit/_Widget.js b/js/dojo/dijit/_Widget.js
--- a/js/dojo/dijit/_Widget.js
+++ b/js/dojo/dijit/_Widget.js
@@ -1,349 +1,322 @@
-if(!dojo._hasResource["dijit._Widget"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._Widget"] = true;
-dojo.provide("dijit._Widget");
-
-dojo.require("dijit._base");
-
-dojo.declare("dijit._Widget", null, {
- // summary:
- // The foundation of dijit widgets.
- //
- // id: String
- // a unique, opaque ID string that can be assigned by users or by the
- // system. If the developer passes an ID which is known not to be
- // unique, the specified ID is ignored and the system-generated ID is
- // used instead.
- id: "",
-
- // lang: String
- // Language to display this widget in (like en-us).
- // Defaults to brower's specified preferred language (typically the language of the OS)
- lang: "",
-
- // dir: String
- // Bi-directional support, as defined by the HTML DIR attribute. Either left-to-right "ltr" or right-to-left "rtl".
- dir: "",
-
- // class: String
- // HTML class attribute
- "class": "",
-
- // style: String
- // HTML style attribute
- style: "",
-
- // title: String
- // HTML title attribute
- title: "",
-
- // srcNodeRef: DomNode
- // pointer to original dom node
- srcNodeRef: null,
-
- // domNode: DomNode
- // this is our visible representation of the widget! Other DOM
- // Nodes may by assigned to other properties, usually through the
- // template system's dojoAttachPonit syntax, but the domNode
- // property is the canonical "top level" node in widget UI.
- domNode: null,
-
- // attributeMap: Object
- // A map of attributes and attachpoints -- typically standard HTML attributes -- to set
- // on the widget's dom, at the "domNode" attach point, by default.
- // Other node references can be specified as properties of 'this'
- attributeMap: {id:"", dir:"", lang:"", "class":"", style:"", title:""}, // TODO: add on* handlers?
-
- //////////// INITIALIZATION METHODS ///////////////////////////////////////
-
- postscript: function(params, srcNodeRef){
- this.create(params, srcNodeRef);
- },
-
- create: function(params, srcNodeRef){
- // summary:
- // To understand the process by which widgets are instantiated, it
- // is critical to understand what other methods create calls and
- // which of them you'll want to override. Of course, adventurous
- // developers could override create entirely, but this should
- // only be done as a last resort.
- //
- // Below is a list of the methods that are called, in the order
- // they are fired, along with notes about what they do and if/when
- // you should over-ride them in your widget:
- //
- // postMixInProperties:
- // a stub function that you can over-ride to modify
- // variables that may have been naively assigned by
- // mixInProperties
- // # widget is added to manager object here
- // buildRendering
- // Subclasses use this method to handle all UI initialization
- // Sets this.domNode. Templated widgets do this automatically
- // and otherwise it just uses the source dom node.
- // postCreate
- // a stub function that you can over-ride to modify take
- // actions once the widget has been placed in the UI
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // store pointer to original dom tree
- this.srcNodeRef = dojo.byId(srcNodeRef);
-
- // For garbage collection. An array of handles returned by Widget.connect()
- // Each handle returned from Widget.connect() is an array of handles from dojo.connect()
- this._connects=[];
-
- // _attaches: String[]
- // names of all our dojoAttachPoint variables
- this._attaches=[];
-
- //mixin our passed parameters
- if(this.srcNodeRef && (typeof this.srcNodeRef.id == "string")){ this.id = this.srcNodeRef.id; }
- if(params){
- dojo.mixin(this,params);
- }
- this.postMixInProperties();
-
- // generate an id for the widget if one wasn't specified
- // (be sure to do this before buildRendering() because that function might
- // expect the id to be there.
- if(!this.id){
- this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));
- }
- dijit.registry.add(this);
-
- this.buildRendering();
-
- // Copy attributes listed in attributeMap into the [newly created] DOM for the widget.
- // The placement of these attributes is according to the property mapping in attributeMap.
- // Note special handling for 'style' and 'class' attributes which are lists and can
- // have elements from both old and new structures, and some attributes like "type"
- // cannot be processed this way as they are not mutable.
- if(this.domNode){
- for(var attr in this.attributeMap){
- var mapNode = this[this.attributeMap[attr] || "domNode"];
- var value = this[attr];
- if(typeof value != "object" && (value !== "" || (params && params[attr]))){
- switch(attr){
- case "class":
- dojo.addClass(mapNode, value);
- break;
- case "style":
- if(mapNode.style.cssText){
- mapNode.style.cssText += "; " + value;// FIXME: Opera
- }else{
- mapNode.style.cssText = value;
- }
- break;
- default:
- mapNode.setAttribute(attr, value);
- }
- }
- }
- }
-
- if(this.domNode){
- this.domNode.setAttribute("widgetId", this.id);
- }
- this.postCreate();
-
- // If srcNodeRef has been processed and removed from the DOM (e.g. TemplatedWidget) then delete it to allow GC.
- if(this.srcNodeRef && !this.srcNodeRef.parentNode){
- delete this.srcNodeRef;
- }
- },
-
- postMixInProperties: function(){
- // summary
- // Called after the parameters to the widget have been read-in,
- // but before the widget template is instantiated.
- // Especially useful to set properties that are referenced in the widget template.
- },
-
- buildRendering: function(){
- // summary:
- // Construct the UI for this widget, setting this.domNode.
- // Most widgets will mixin TemplatedWidget, which overrides this method.
- this.domNode = this.srcNodeRef || dojo.doc.createElement('div');
- },
-
- postCreate: function(){
- // summary:
- // Called after a widget's dom has been setup
- },
- startup: function(){
- // summary:
- // Called after a widget's children, and other widgets on the page, have been created.
- // Provides an opportunity to manipulate any children before they are displayed
- // This is useful for composite widgets that need to control or layout sub-widgets
- // Many layout widgets can use this as a wiring phase
- },
-
- //////////// DESTROY FUNCTIONS ////////////////////////////////
-
- destroyRecursive: function(/*Boolean*/ finalize){
- // summary:
- // Destroy this widget and it's descendants. This is the generic
- // "destructor" function that all widget users should call to
- // cleanly discard with a widget. Once a widget is destroyed, it's
- // removed from the manager object.
- // finalize: Boolean
- // is this function being called part of global environment
- // tear-down?
-
- this.destroyDescendants();
- this.destroy();
- },
-
- destroy: function(/*Boolean*/ finalize){
- // summary:
- // Destroy this widget, but not its descendants
- // finalize: Boolean
- // is this function being called part of global environment
- // tear-down?
- this.uninitialize();
- dojo.forEach(this._connects, function(array){
- dojo.forEach(array, dojo.disconnect);
- });
- this.destroyRendering(finalize);
- dijit.registry.remove(this.id);
- },
-
- destroyRendering: function(/*Boolean*/ finalize){
- // summary:
- // Destroys the DOM nodes associated with this widget
- // finalize: Boolean
- // is this function being called part of global environment
- // tear-down?
-
- if(this.bgIframe){
- this.bgIframe.destroy();
- delete this.bgIframe;
- }
-
- if(this.domNode){
- dojo._destroyElement(this.domNode);
- delete this.domNode;
- }
-
- if(this.srcNodeRef){
- dojo._destroyElement(this.srcNodeRef);
- delete this.srcNodeRef;
- }
- },
-
- destroyDescendants: function(){
- // summary:
- // Recursively destroy the children of this widget and their
- // descendants.
-
- // TODO: should I destroy in the reverse order, to go bottom up?
- dojo.forEach(this.getDescendants(), function(widget){ widget.destroy(); });
- },
-
- uninitialize: function(){
- // summary:
- // stub function. Over-ride to implement custom widget tear-down
- // behavior.
- return false;
- },
-
- ////////////////// MISCELLANEOUS METHODS ///////////////////
-
- toString: function(){
- // summary:
- // returns a string that represents the widget. When a widget is
- // cast to a string, this method will be used to generate the
- // output. Currently, it does not implement any sort of reversable
- // serialization.
- return '[Widget ' + this.declaredClass + ', ' + (this.id || 'NO ID') + ']'; // String
- },
-
- getDescendants: function(){
- // summary:
- // return all the descendant widgets
- var list = dojo.query('[widgetId]', this.domNode);
- return list.map(dijit.byNode); // Array
- },
-
- nodesWithKeyClick : ["input", "button"],
-
- connect: function(
- /*Object|null*/ obj,
- /*String*/ event,
- /*String|Function*/ method){
-
- // summary:
- // Connects specified obj/event to specified method of this object
- // and registers for disconnect() on widget destroy.
- // Special event: "ondijitclick" triggers on a click or enter-down or space-up
- // Similar to dojo.connect() but takes three arguments rather than four.
- var handles =[];
- if(event == "ondijitclick"){
- var w = this;
- // add key based click activation for unsupported nodes.
- if(!this.nodesWithKeyClick[obj.nodeName]){
- handles.push(dojo.connect(obj, "onkeydown", this,
- function(e){
- if(e.keyCode == dojo.keys.ENTER){
- return (dojo.isString(method))?
- w[method](e) : method.call(w, e);
- }else if(e.keyCode == dojo.keys.SPACE){
- // stop space down as it causes IE to scroll
- // the browser window
- dojo.stopEvent(e);
- }
- }));
- handles.push(dojo.connect(obj, "onkeyup", this,
- function(e){
- if(e.keyCode == dojo.keys.SPACE){
- return dojo.isString(method) ?
- w[method](e) : method.call(w, e);
- }
- }));
- }
- event = "onclick";
- }
- handles.push(dojo.connect(obj, event, this, method));
-
- // return handles for FormElement and ComboBox
- this._connects.push(handles);
- return handles;
- },
-
- disconnect: function(/*Object*/ handles){
- // summary:
- // Disconnects handle created by this.connect.
- // Also removes handle from this widget's list of connects
- for(var i=0; i<this._connects.length; i++){
- if(this._connects[i]==handles){
- dojo.forEach(handles, dojo.disconnect);
- this._connects.splice(i, 1);
- return;
- }
- }
- },
-
- isLeftToRight: function(){
- // summary:
- // Checks the DOM to for the text direction for bi-directional support
- // description:
- // This method cannot be used during widget construction because the widget
- // must first be connected to the DOM tree. Parent nodes are searched for the
- // 'dir' attribute until one is found, otherwise left to right mode is assumed.
- // See HTML spec, DIR attribute for more information.
-
- if(typeof this._ltr == "undefined"){
- this._ltr = dojo.getComputedStyle(this.domNode).direction != "rtl";
- }
- return this._ltr; //Boolean
- },
-
- isFocusable: function(){
- // summary:
- // Return true if this widget can currently be focused
- // and false if not
- return this.focus && (dojo.style(this.domNode, "display") != "none");
- }
+if(!dojo._hasResource["dijit._Widget"]){
+dojo._hasResource["dijit._Widget"]=true;
+dojo.provide("dijit._Widget");
+dojo.require("dijit._base");
+dojo.connect(dojo,"_connect",function(_1,_2){
+if(_1&&dojo.isFunction(_1._onConnect)){
+_1._onConnect(_2);
+}
+});
+dijit._connectOnUseEventHandler=function(_3){
+};
+dijit._lastKeyDownNode=null;
+if(dojo.isIE){
+(function(){
+var _4=function(_5){
+dijit._lastKeyDownNode=_5.srcElement;
+};
+dojo.doc.attachEvent("onkeydown",_4);
+dojo.addOnWindowUnload(function(){
+dojo.doc.detachEvent("onkeydown",_4);
+});
+})();
+}else{
+dojo.doc.addEventListener("keydown",function(_6){
+dijit._lastKeyDownNode=_6.target;
+},true);
+}
+(function(){
+var _7={},_8=function(_9){
+var dc=_9.declaredClass;
+if(!_7[dc]){
+var r=[],_a,_b=_9.constructor.prototype;
+for(var _c in _b){
+if(dojo.isFunction(_b[_c])&&(_a=_c.match(/^_set([a-zA-Z]*)Attr$/))&&_a[1]){
+r.push(_a[1].charAt(0).toLowerCase()+_a[1].substr(1));
+}
+}
+_7[dc]=r;
+}
+return _7[dc]||[];
+};
+dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",tooltip:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:dijit._connectOnUseEventHandler,onDblClick:dijit._connectOnUseEventHandler,onKeyDown:dijit._connectOnUseEventHandler,onKeyPress:dijit._connectOnUseEventHandler,onKeyUp:dijit._connectOnUseEventHandler,onMouseDown:dijit._connectOnUseEventHandler,onMouseMove:dijit._connectOnUseEventHandler,onMouseOut:dijit._connectOnUseEventHandler,onMouseOver:dijit._connectOnUseEventHandler,onMouseLeave:dijit._connectOnUseEventHandler,onMouseEnter:dijit._connectOnUseEventHandler,onMouseUp:dijit._connectOnUseEventHandler,_blankGif:(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif")).toString(),postscript:function(_d,_e){
+this.create(_d,_e);
+},create:function(_f,_10){
+this.srcNodeRef=dojo.byId(_10);
+this._connects=[];
+this._subscribes=[];
+this._deferredConnects=dojo.clone(this._deferredConnects);
+for(var _11 in this.attributeMap){
+delete this._deferredConnects[_11];
+}
+for(_11 in this._deferredConnects){
+if(this[_11]!==dijit._connectOnUseEventHandler){
+delete this._deferredConnects[_11];
+}
+}
+if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){
+this.id=this.srcNodeRef.id;
+}
+if(_f){
+this.params=_f;
+dojo.mixin(this,_f);
+}
+this.postMixInProperties();
+if(!this.id){
+this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));
+}
+dijit.registry.add(this);
+this.buildRendering();
+if(this.domNode){
+this._applyAttributes();
+var _12=this.srcNodeRef;
+if(_12&&_12.parentNode){
+_12.parentNode.replaceChild(this.domNode,_12);
+}
+for(_11 in this.params){
+this._onConnect(_11);
+}
+}
+if(this.domNode){
+this.domNode.setAttribute("widgetId",this.id);
+}
+this.postCreate();
+if(this.srcNodeRef&&!this.srcNodeRef.parentNode){
+delete this.srcNodeRef;
+}
+this._created=true;
+},_applyAttributes:function(){
+var _13=function(_14,_15){
+if((_15.params&&_14 in _15.params)||_15[_14]){
+_15.attr(_14,_15[_14]);
+}
+};
+for(var _16 in this.attributeMap){
+_13(_16,this);
+}
+dojo.forEach(_8(this),function(a){
+if(!(a in this.attributeMap)){
+_13(a,this);
+}
+},this);
+},postMixInProperties:function(){
+},buildRendering:function(){
+this.domNode=this.srcNodeRef||dojo.create("div");
+},postCreate:function(){
+},startup:function(){
+this._started=true;
+},destroyRecursive:function(_17){
+this._beingDestroyed=true;
+this.destroyDescendants(_17);
+this.destroy(_17);
+},destroy:function(_18){
+this._beingDestroyed=true;
+this.uninitialize();
+var d=dojo,dfe=d.forEach,dun=d.unsubscribe;
+dfe(this._connects,function(_19){
+dfe(_19,d.disconnect);
+});
+dfe(this._subscribes,function(_1a){
+dun(_1a);
+});
+dfe(this._supportingWidgets||[],function(w){
+if(w.destroyRecursive){
+w.destroyRecursive();
+}else{
+if(w.destroy){
+w.destroy();
+}
+}
+});
+this.destroyRendering(_18);
+dijit.registry.remove(this.id);
+this._destroyed=true;
+},destroyRendering:function(_1b){
+if(this.bgIframe){
+this.bgIframe.destroy(_1b);
+delete this.bgIframe;
+}
+if(this.domNode){
+if(_1b){
+dojo.removeAttr(this.domNode,"widgetId");
+}else{
+dojo.destroy(this.domNode);
+}
+delete this.domNode;
+}
+if(this.srcNodeRef){
+if(!_1b){
+dojo.destroy(this.srcNodeRef);
+}
+delete this.srcNodeRef;
+}
+},destroyDescendants:function(_1c){
+dojo.forEach(this.getChildren(),function(_1d){
+if(_1d.destroyRecursive){
+_1d.destroyRecursive(_1c);
+}
});
-
+},uninitialize:function(){
+return false;
+},onFocus:function(){
+},onBlur:function(){
+},_onFocus:function(e){
+this.onFocus();
+},_onBlur:function(){
+this.onBlur();
+},_onConnect:function(_1e){
+if(_1e in this._deferredConnects){
+var _1f=this[this._deferredConnects[_1e]||"domNode"];
+this.connect(_1f,_1e.toLowerCase(),_1e);
+delete this._deferredConnects[_1e];
+}
+},_setClassAttr:function(_20){
+var _21=this[this.attributeMap["class"]||"domNode"];
+dojo.removeClass(_21,this["class"]);
+this["class"]=_20;
+dojo.addClass(_21,_20);
+},_setStyleAttr:function(_22){
+var _23=this[this.attributeMap.style||"domNode"];
+if(dojo.isObject(_22)){
+dojo.style(_23,_22);
+}else{
+if(_23.style.cssText){
+_23.style.cssText+="; "+_22;
+}else{
+_23.style.cssText=_22;
+}
+}
+this.style=_22;
+},setAttribute:function(_24,_25){
+dojo.deprecated(this.declaredClass+"::setAttribute() is deprecated. Use attr() instead.","","2.0");
+this.attr(_24,_25);
+},_attrToDom:function(_26,_27){
+var _28=this.attributeMap[_26];
+dojo.forEach(dojo.isArray(_28)?_28:[_28],function(_29){
+var _2a=this[_29.node||_29||"domNode"];
+var _2b=_29.type||"attribute";
+switch(_2b){
+case "attribute":
+if(dojo.isFunction(_27)){
+_27=dojo.hitch(this,_27);
+}
+var _2c=_29.attribute?_29.attribute:(/^on[A-Z][a-zA-Z]*$/.test(_26)?_26.toLowerCase():_26);
+dojo.attr(_2a,_2c,_27);
+break;
+case "innerText":
+_2a.innerHTML="";
+_2a.appendChild(dojo.doc.createTextNode(_27));
+break;
+case "innerHTML":
+_2a.innerHTML=_27;
+break;
+case "class":
+dojo.removeClass(_2a,this[_26]);
+dojo.addClass(_2a,_27);
+break;
+}
+},this);
+this[_26]=_27;
+},attr:function(_2d,_2e){
+var _2f=arguments.length;
+if(_2f==1&&!dojo.isString(_2d)){
+for(var x in _2d){
+this.attr(x,_2d[x]);
+}
+return this;
+}
+var _30=this._getAttrNames(_2d);
+if(_2f>=2){
+if(this[_30.s]){
+_2f=dojo._toArray(arguments,1);
+return this[_30.s].apply(this,_2f)||this;
+}else{
+if(_2d in this.attributeMap){
+this._attrToDom(_2d,_2e);
}
+this[_2d]=_2e;
+}
+return this;
+}else{
+return this[_30.g]?this[_30.g]():this[_2d];
+}
+},_attrPairNames:{},_getAttrNames:function(_31){
+var apn=this._attrPairNames;
+if(apn[_31]){
+return apn[_31];
+}
+var uc=_31.charAt(0).toUpperCase()+_31.substr(1);
+return (apn[_31]={n:_31+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"});
+},toString:function(){
+return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";
+},getDescendants:function(){
+return this.containerNode?dojo.query("[widgetId]",this.containerNode).map(dijit.byNode):[];
+},getChildren:function(){
+return this.containerNode?dijit.findWidgets(this.containerNode):[];
+},nodesWithKeyClick:["input","button"],connect:function(obj,_32,_33){
+var d=dojo,dc=d._connect,_34=[];
+if(_32=="ondijitclick"){
+if(!this.nodesWithKeyClick[obj.tagName.toLowerCase()]){
+var m=d.hitch(this,_33);
+_34.push(dc(obj,"onkeydown",this,function(e){
+if((e.keyCode==d.keys.ENTER||e.keyCode==d.keys.SPACE)&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){
+dijit._lastKeyDownNode=e.target;
+d.stopEvent(e);
+}
+}),dc(obj,"onkeyup",this,function(e){
+if((e.keyCode==d.keys.ENTER||e.keyCode==d.keys.SPACE)&&e.target===dijit._lastKeyDownNode&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){
+dijit._lastKeyDownNode=null;
+return m(e);
+}
+}));
+}
+_32="onclick";
+}
+_34.push(dc(obj,_32,this,_33));
+this._connects.push(_34);
+return _34;
+},disconnect:function(_35){
+for(var i=0;i<this._connects.length;i++){
+if(this._connects[i]==_35){
+dojo.forEach(_35,dojo.disconnect);
+this._connects.splice(i,1);
+return;
+}
+}
+},subscribe:function(_36,_37){
+var d=dojo,_38=d.subscribe(_36,this,_37);
+this._subscribes.push(_38);
+return _38;
+},unsubscribe:function(_39){
+for(var i=0;i<this._subscribes.length;i++){
+if(this._subscribes[i]==_39){
+dojo.unsubscribe(_39);
+this._subscribes.splice(i,1);
+return;
+}
+}
+},isLeftToRight:function(){
+return dojo._isBodyLtr();
+},isFocusable:function(){
+return this.focus&&(dojo.style(this.domNode,"display")!="none");
+},placeAt:function(_3a,_3b){
+if(_3a.declaredClass&&_3a.addChild){
+_3a.addChild(this,_3b);
+}else{
+dojo.place(this.domNode,_3a,_3b);
+}
+return this;
+},_onShow:function(){
+this.onShow();
+},onShow:function(){
+},onHide:function(){
+}});
+})();
+}
diff --git a/js/dojo/dijit/_base.js b/js/dojo/dijit/_base.js
--- a/js/dojo/dijit/_base.js
+++ b/js/dojo/dijit/_base.js
@@ -1,16 +1,20 @@
-if(!dojo._hasResource["dijit._base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._base"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit._base"]){
+dojo._hasResource["dijit._base"]=true;
dojo.provide("dijit._base");
-
dojo.require("dijit._base.focus");
dojo.require("dijit._base.manager");
dojo.require("dijit._base.place");
dojo.require("dijit._base.popup");
dojo.require("dijit._base.scroll");
dojo.require("dijit._base.sniff");
-dojo.require("dijit._base.bidi");
dojo.require("dijit._base.typematic");
dojo.require("dijit._base.wai");
dojo.require("dijit._base.window");
-
}
diff --git a/js/dojo/dijit/_base/focus.js b/js/dojo/dijit/_base/focus.js
--- a/js/dojo/dijit/_base/focus.js
+++ b/js/dojo/dijit/_base/focus.js
@@ -1,330 +1,301 @@
-if(!dojo._hasResource["dijit._base.focus"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._base.focus"] = true;
-dojo.provide("dijit._base.focus");
-
-// summary:
-// These functions are used to query or set the focus and selection.
-//
-// Also, they trace when widgets become actived/deactivated,
-// so that the widget can fire _onFocus/_onBlur events.
-// "Active" here means something similar to "focused", but
-// "focus" isn't quite the right word because we keep track of
-// a whole stack of "active" widgets. Example: Combobutton --> Menu -->
-// MenuItem. The onBlur event for Combobutton doesn't fire due to focusing
-// on the Menu or a MenuItem, since they are considered part of the
-// Combobutton widget. It only happens when focus is shifted
-// somewhere completely different.
-
-dojo.mixin(dijit,
-{
- // _curFocus: DomNode
- // Currently focused item on screen
- _curFocus: null,
-
- // _prevFocus: DomNode
- // Previously focused item on screen
- _prevFocus: null,
-
- isCollapsed: function(){
- // summary: tests whether the current selection is empty
- var _window = dojo.global;
- var _document = dojo.doc;
- if(_document.selection){ // IE
- return !_document.selection.createRange().text; // Boolean
- }else if(_window.getSelection){
- var selection = _window.getSelection();
- if(dojo.isString(selection)){ // Safari
- return !selection; // Boolean
- }else{ // Mozilla/W3
- return selection.isCollapsed || !selection.toString(); // Boolean
- }
- }
- },
-
- getBookmark: function(){
- // summary: Retrieves a bookmark that can be used with moveToBookmark to return to the same range
- var bookmark, selection = dojo.doc.selection;
- if(selection){ // IE
- var range = selection.createRange();
- if(selection.type.toUpperCase()=='CONTROL'){
- bookmark = range.length ? dojo._toArray(range) : null;
- }else{
- bookmark = range.getBookmark();
- }
- }else{
- if(dojo.global.getSelection){
- selection = dojo.global.getSelection();
- if(selection){
- var range = selection.getRangeAt(0);
- bookmark = range.cloneRange();
- }
- }else{
- console.debug("No idea how to store the current selection for this browser!");
- }
- }
- return bookmark; // Array
- },
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- moveToBookmark: function(/*Object*/bookmark){
- // summary: Moves current selection to a bookmark
- // bookmark: this should be a returned object from dojo.html.selection.getBookmark()
- var _document = dojo.doc;
- if(_document.selection){ // IE
- var range;
- if(dojo.isArray(bookmark)){
- range = _document.body.createControlRange();
- dojo.forEach(bookmark, range.addElement);
- }else{
- range = _document.selection.createRange();
- range.moveToBookmark(bookmark);
- }
- range.select();
- }else{ //Moz/W3C
- var selection = dojo.global.getSelection && dojo.global.getSelection();
- if(selection && selection.removeAllRanges){
- selection.removeAllRanges();
- selection.addRange(bookmark);
- }else{
- console.debug("No idea how to restore selection for this browser!");
- }
- }
- },
-
- getFocus: function(/*Widget*/menu, /*Window*/ openedForWindow){
- // summary:
- // Returns the current focus and selection.
- // Called when a popup appears (either a top level menu or a dialog),
- // or when a toolbar/menubar receives focus
- //
- // menu:
- // the menu that's being opened
- //
- // openedForWindow:
- // iframe in which menu was opened
- //
- // returns:
- // a handle to restore focus/selection
-
- return {
- // Node to return focus to
- node: menu && dojo.isDescendant(dijit._curFocus, menu.domNode) ? dijit._prevFocus : dijit._curFocus,
-
- // Previously selected text
- bookmark:
- !dojo.withGlobal(openedForWindow||dojo.global, dijit.isCollapsed) ?
- dojo.withGlobal(openedForWindow||dojo.global, dijit.getBookmark) :
- null,
-
- openedForWindow: openedForWindow
- }; // Object
- },
-
- focus: function(/*Object || DomNode */ handle){
- // summary:
- // Sets the focused node and the selection according to argument.
- // To set focus to an iframe's content, pass in the iframe itself.
- // handle:
- // object returned by get(), or a DomNode
-
- if(!handle){ return; }
-
- var node = "node" in handle ? handle.node : handle, // because handle is either DomNode or a composite object
- bookmark = handle.bookmark,
- openedForWindow = handle.openedForWindow;
-
- // Set the focus
- // Note that for iframe's we need to use the <iframe> to follow the parentNode chain,
- // but we need to set focus to iframe.contentWindow
- if(node){
- var focusNode = (node.tagName.toLowerCase()=="iframe") ? node.contentWindow : node;
- if(focusNode && focusNode.focus){
- try{
- // Gecko throws sometimes if setting focus is impossible,
- // node not displayed or something like that
- focusNode.focus();
- }catch(e){/*quiet*/}
- }
- dijit._onFocusNode(node);
- }
-
- // set the selection
- // do not need to restore if current selection is not empty
- // (use keyboard to select a menu item)
- if(bookmark && dojo.withGlobal(openedForWindow||dojo.global, dijit.isCollapsed)){
- if(openedForWindow){
- openedForWindow.focus();
- }
- try{
- dojo.withGlobal(openedForWindow||dojo.global, moveToBookmark, null, [bookmark]);
- }catch(e){
- /*squelch IE internal error, see http://trac.dojotoolkit.org/ticket/1984 */
- }
- }
- },
- // List of currently active widgets (focused widget and it's ancestors)
- _activeStack: [],
-
- registerWin: function(/*Window?*/targetWindow){
- // summary:
- // Registers listeners on the specified window (either the main
- // window or an iframe) to detect when the user has clicked somewhere.
- // Anyone that creates an iframe should call this function.
-
- if(!targetWindow){
- targetWindow = window;
- }
-
- dojo.connect(targetWindow.document, "onmousedown", null, function(evt){
- dijit._justMouseDowned = true;
- setTimeout(function(){ dijit._justMouseDowned = false; }, 0);
- dijit._onTouchNode(evt.target||evt.srcElement);
- });
- //dojo.connect(targetWindow, "onscroll", ???);
-
- // Listen for blur and focus events on targetWindow's body
- var body = targetWindow.document.body || targetWindow.document.getElementsByTagName("body")[0];
- if(body){
- if(dojo.isIE){
- body.attachEvent('onactivate', function(evt){
- if(evt.srcElement.tagName.toLowerCase() != "body"){
- dijit._onFocusNode(evt.srcElement);
- }
- });
- body.attachEvent('ondeactivate', function(evt){ dijit._onBlurNode(evt.srcElement); });
- }else{
- body.addEventListener('focus', function(evt){ dijit._onFocusNode(evt.target); }, true);
- body.addEventListener('blur', function(evt){ dijit._onBlurNode(evt.target); }, true);
- }
- }
- body = null; // prevent memory leak (apparent circular reference via closure)
- },
-
- _onBlurNode: function(/*DomNode*/ node){
- // summary:
- // Called when focus leaves a node.
- // Usually ignored, _unless_ it *isn't* follwed by touching another node,
- // which indicates that we tabbed off the last field on the page,
- // in which case every widget is marked inactive
- dijit._prevFocus = dijit._curFocus;
- dijit._curFocus = null;
-
- var w = dijit.getEnclosingWidget(node);
- if (w && w._setStateClass){
- w._focused = false;
- w._setStateClass();
- }
- if(dijit._justMouseDowned){
- // the mouse down caused a new widget to be marked as active; this blur event
- // is coming late, so ignore it.
- return;
- }
-
- // if the blur event isn't followed by a focus event then mark all widgets as inactive.
- if(dijit._clearActiveWidgetsTimer){
- clearTimeout(dijit._clearActiveWidgetsTimer);
- }
- dijit._clearActiveWidgetsTimer = setTimeout(function(){
- delete dijit._clearActiveWidgetsTimer; dijit._setStack([]); }, 100);
- },
-
- _onTouchNode: function(/*DomNode*/ node){
- // summary
- // Callback when node is focused or mouse-downed
-
- // ignore the recent blurNode event
- if(dijit._clearActiveWidgetsTimer){
- clearTimeout(dijit._clearActiveWidgetsTimer);
- delete dijit._clearActiveWidgetsTimer;
- }
-
- // compute stack of active widgets (ex: ComboButton --> Menu --> MenuItem)
- var newStack=[];
- try{
- while(node){
- if(node.dijitPopupParent){
- node=dijit.byId(node.dijitPopupParent).domNode;
- }else if(node.tagName && node.tagName.toLowerCase()=="body"){
- // is this the root of the document or just the root of an iframe?
- if(node===dojo.body()){
- // node is the root of the main document
- break;
- }
- // otherwise, find the iframe this node refers to (can't access it via parentNode,
- // need to do this trick instead) and continue tracing up the document
- node=dojo.query("iframe").filter(function(iframe){ return iframe.contentDocument.body===node; })[0];
- }else{
- var id = node.getAttribute && node.getAttribute("widgetId");
- if(id){
- newStack.unshift(id);
- }
- node=node.parentNode;
- }
- }
- }catch(e){ /* squelch */ }
-
- dijit._setStack(newStack);
- },
-
- _onFocusNode: function(/*DomNode*/ node){
- // summary
- // Callback when node is focused
- if(node && node.tagName && node.tagName.toLowerCase() == "body"){
- return;
- }
- dijit._onTouchNode(node);
- if(node==dijit._curFocus){ return; }
- dijit._prevFocus = dijit._curFocus;
- dijit._curFocus = node;
- dojo.publish("focusNode", [node]);
-
- // handle focus/blur styling
- var w = dijit.getEnclosingWidget(node);
- if (w && w._setStateClass){
- w._focused = true;
- w._setStateClass();
- }
- },
-
- _setStack: function(newStack){
- // summary
- // The stack of active widgets has changed. Send out appropriate events and record new stack
-
- var oldStack = dijit._activeStack;
- dijit._activeStack = newStack;
-
- // compare old stack to new stack to see how many elements they have in common
- for(var nCommon=0; nCommon<Math.min(oldStack.length, newStack.length); nCommon++){
- if(oldStack[nCommon] != newStack[nCommon]){
- break;
- }
- }
-
- // for all elements that have gone out of focus, send blur event
- for(var i=oldStack.length-1; i>=nCommon; i--){
- var widget = dijit.byId(oldStack[i]);
- if(widget){
- dojo.publish("widgetBlur", [widget]);
- if(widget._onBlur){
- widget._onBlur();
- }
- }
- }
-
- // for all element that have come into focus, send focus event
- for(var i=nCommon; i<newStack.length; i++){
- var widget = dijit.byId(newStack[i]);
- if(widget){
- dojo.publish("widgetFocus", [widget]);
- if(widget._onFocus){
- widget._onFocus();
- }
- }
- }
- }
+if(!dojo._hasResource["dijit._base.focus"]){
+dojo._hasResource["dijit._base.focus"]=true;
+dojo.provide("dijit._base.focus");
+dojo.require("dijit._base.manager");
+dojo.mixin(dijit,{_curFocus:null,_prevFocus:null,isCollapsed:function(){
+return dijit.getBookmark().isCollapsed;
+},getBookmark:function(){
+var bm,rg,tg,_1=dojo.doc.selection,cf=dijit._curFocus;
+if(dojo.global.getSelection){
+_1=dojo.global.getSelection();
+if(_1){
+if(_1.isCollapsed){
+tg=cf?cf.tagName:"";
+if(tg){
+tg=tg.toLowerCase();
+if(tg=="textarea"||(tg=="input"&&(!cf.type||cf.type.toLowerCase()=="text"))){
+_1={start:cf.selectionStart,end:cf.selectionEnd,node:cf,pRange:true};
+return {isCollapsed:(_1.end<=_1.start),mark:_1};
+}
+}
+bm={isCollapsed:true};
+}else{
+rg=_1.getRangeAt(0);
+bm={isCollapsed:false,mark:rg.cloneRange()};
+}
+}
+}else{
+if(_1){
+tg=cf?cf.tagName:"";
+tg=tg.toLowerCase();
+if(cf&&tg&&(tg=="button"||tg=="textarea"||tg=="input")){
+if(_1.type&&_1.type.toLowerCase()=="none"){
+return {isCollapsed:true,mark:null};
+}else{
+rg=_1.createRange();
+return {isCollapsed:rg.text&&rg.text.length?false:true,mark:{range:rg,pRange:true}};
+}
+}
+bm={};
+try{
+rg=_1.createRange();
+bm.isCollapsed=!(_1.type=="Text"?rg.htmlText.length:rg.length);
+}
+catch(e){
+bm.isCollapsed=true;
+return bm;
+}
+if(_1.type.toUpperCase()=="CONTROL"){
+if(rg.length){
+bm.mark=[];
+var i=0,_2=rg.length;
+while(i<_2){
+bm.mark.push(rg.item(i++));
+}
+}else{
+bm.isCollapsed=true;
+bm.mark=null;
+}
+}else{
+bm.mark=rg.getBookmark();
+}
+}else{
+console.warn("No idea how to store the current selection for this browser!");
+}
+}
+return bm;
+},moveToBookmark:function(_3){
+var _4=dojo.doc,_5=_3.mark;
+if(_5){
+if(dojo.global.getSelection){
+var _6=dojo.global.getSelection();
+if(_6&&_6.removeAllRanges){
+if(_5.pRange){
+var r=_5;
+var n=r.node;
+n.selectionStart=r.start;
+n.selectionEnd=r.end;
+}else{
+_6.removeAllRanges();
+_6.addRange(_5);
+}
+}else{
+console.warn("No idea how to restore selection for this browser!");
+}
+}else{
+if(_4.selection&&_5){
+var rg;
+if(_5.pRange){
+rg=_5.range;
+}else{
+if(dojo.isArray(_5)){
+rg=_4.body.createControlRange();
+dojo.forEach(_5,function(n){
+rg.addElement(n);
});
-
-// register top window and all the iframes it contains
-dojo.addOnLoad(dijit.registerWin);
-
+}else{
+rg=_4.body.createTextRange();
+rg.moveToBookmark(_5);
+}
+}
+rg.select();
+}
+}
+}
+},getFocus:function(_7,_8){
+var _9=!dijit._curFocus||(_7&&dojo.isDescendant(dijit._curFocus,_7.domNode))?dijit._prevFocus:dijit._curFocus;
+return {node:_9,bookmark:(_9==dijit._curFocus)&&dojo.withGlobal(_8||dojo.global,dijit.getBookmark),openedForWindow:_8};
+},focus:function(_a){
+if(!_a){
+return;
+}
+var _b="node" in _a?_a.node:_a,_c=_a.bookmark,_d=_a.openedForWindow,_e=_c?_c.isCollapsed:false;
+if(_b){
+var _f=(_b.tagName.toLowerCase()=="iframe")?_b.contentWindow:_b;
+if(_f&&_f.focus){
+try{
+_f.focus();
+}
+catch(e){
+}
+}
+dijit._onFocusNode(_b);
+}
+if(_c&&dojo.withGlobal(_d||dojo.global,dijit.isCollapsed)&&!_e){
+if(_d){
+_d.focus();
+}
+try{
+dojo.withGlobal(_d||dojo.global,dijit.moveToBookmark,null,[_c]);
+}
+catch(e2){
+}
+}
+},_activeStack:[],registerIframe:function(_10){
+return dijit.registerWin(_10.contentWindow,_10);
+},unregisterIframe:function(_11){
+dijit.unregisterWin(_11);
+},registerWin:function(_12,_13){
+var _14=function(evt){
+dijit._justMouseDowned=true;
+setTimeout(function(){
+dijit._justMouseDowned=false;
+},0);
+dijit._onTouchNode(_13||evt.target||evt.srcElement,"mouse");
+};
+var doc=dojo.isIE?_12.document.documentElement:_12.document;
+if(doc){
+if(dojo.isIE){
+doc.attachEvent("onmousedown",_14);
+var _15=function(evt){
+if(evt.srcElement.tagName.toLowerCase()!="#document"&&dijit.isTabNavigable(evt.srcElement)){
+dijit._onFocusNode(_13||evt.srcElement);
+}else{
+dijit._onTouchNode(_13||evt.srcElement);
+}
+};
+doc.attachEvent("onactivate",_15);
+var _16=function(evt){
+dijit._onBlurNode(_13||evt.srcElement);
+};
+doc.attachEvent("ondeactivate",_16);
+return function(){
+doc.detachEvent("onmousedown",_14);
+doc.detachEvent("onactivate",_15);
+doc.detachEvent("ondeactivate",_16);
+doc=null;
+};
+}else{
+doc.addEventListener("mousedown",_14,true);
+var _17=function(evt){
+dijit._onFocusNode(_13||evt.target);
+};
+doc.addEventListener("focus",_17,true);
+var _18=function(evt){
+dijit._onBlurNode(_13||evt.target);
+};
+doc.addEventListener("blur",_18,true);
+return function(){
+doc.removeEventListener("mousedown",_14,true);
+doc.removeEventListener("focus",_17,true);
+doc.removeEventListener("blur",_18,true);
+doc=null;
+};
+}
+}
+},unregisterWin:function(_19){
+_19&&_19();
+},_onBlurNode:function(_1a){
+dijit._prevFocus=dijit._curFocus;
+dijit._curFocus=null;
+if(dijit._justMouseDowned){
+return;
}
+if(dijit._clearActiveWidgetsTimer){
+clearTimeout(dijit._clearActiveWidgetsTimer);
+}
+dijit._clearActiveWidgetsTimer=setTimeout(function(){
+delete dijit._clearActiveWidgetsTimer;
+dijit._setStack([]);
+dijit._prevFocus=null;
+},100);
+},_onTouchNode:function(_1b,by){
+if(dijit._clearActiveWidgetsTimer){
+clearTimeout(dijit._clearActiveWidgetsTimer);
+delete dijit._clearActiveWidgetsTimer;
+}
+var _1c=[];
+try{
+while(_1b){
+var _1d=dojo.attr(_1b,"dijitPopupParent");
+if(_1d){
+_1b=dijit.byId(_1d).domNode;
+}else{
+if(_1b.tagName&&_1b.tagName.toLowerCase()=="body"){
+if(_1b===dojo.body()){
+break;
+}
+_1b=dijit.getDocumentWindow(_1b.ownerDocument).frameElement;
+}else{
+var id=_1b.getAttribute&&_1b.getAttribute("widgetId");
+if(id){
+_1c.unshift(id);
+}
+_1b=_1b.parentNode;
+}
+}
+}
+}
+catch(e){
+}
+dijit._setStack(_1c,by);
+},_onFocusNode:function(_1e){
+if(!_1e){
+return;
+}
+if(_1e.nodeType==9){
+return;
+}
+dijit._onTouchNode(_1e);
+if(_1e==dijit._curFocus){
+return;
+}
+if(dijit._curFocus){
+dijit._prevFocus=dijit._curFocus;
+}
+dijit._curFocus=_1e;
+dojo.publish("focusNode",[_1e]);
+},_setStack:function(_1f,by){
+var _20=dijit._activeStack;
+dijit._activeStack=_1f;
+for(var _21=0;_21<Math.min(_20.length,_1f.length);_21++){
+if(_20[_21]!=_1f[_21]){
+break;
+}
+}
+var _22;
+for(var i=_20.length-1;i>=_21;i--){
+_22=dijit.byId(_20[i]);
+if(_22){
+_22._focused=false;
+_22._hasBeenBlurred=true;
+if(_22._onBlur){
+_22._onBlur(by);
+}
+if(_22._setStateClass){
+_22._setStateClass();
+}
+dojo.publish("widgetBlur",[_22,by]);
+}
+}
+for(i=_21;i<_1f.length;i++){
+_22=dijit.byId(_1f[i]);
+if(_22){
+_22._focused=true;
+if(_22._onFocus){
+_22._onFocus(by);
+}
+if(_22._setStateClass){
+_22._setStateClass();
+}
+dojo.publish("widgetFocus",[_22,by]);
+}
+}
+}});
+dojo.addOnLoad(function(){
+var _23=dijit.registerWin(window);
+if(dojo.isIE){
+dojo.addOnWindowUnload(function(){
+dijit.unregisterWin(_23);
+_23=null;
+});
+}
+});
+}
diff --git a/js/dojo/dijit/_base/manager.js b/js/dojo/dijit/_base/manager.js
--- a/js/dojo/dijit/_base/manager.js
+++ b/js/dojo/dijit/_base/manager.js
@@ -1,98 +1,233 @@
-if(!dojo._hasResource["dijit._base.manager"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._base.manager"] = true;
-dojo.provide("dijit._base.manager");
-
-dojo.declare("dijit.WidgetSet", null, {
- constructor: function(){
- // summary:
- // A set of widgets indexed by id
- this._hash={};
- },
-
- add: function(/*Widget*/ widget){
- if(this._hash[widget.id]){
- throw new Error("Tried to register widget with id==" + widget.id + " but that id is already registered");
- }
- this._hash[widget.id]=widget;
- },
-
- remove: function(/*String*/ id){
- delete this._hash[id];
- },
-
- forEach: function(/*Function*/ func){
- for(var id in this._hash){
- func(this._hash[id]);
- }
- },
-
- filter: function(/*Function*/ filter){
- var res = new dijit.WidgetSet();
- this.forEach(function(widget){
- if(filter(widget)){ res.add(widget); }
- });
- return res; // dijit.WidgetSet
- },
-
- byId: function(/*String*/ id){
- return this._hash[id];
- },
-
- byClass: function(/*String*/ cls){
- return this.filter(function(widget){ return widget.declaredClass==cls; }); // dijit.WidgetSet
- }
- });
-
-// registry: list of all widgets on page
-dijit.registry = new dijit.WidgetSet();
-
-dijit._widgetTypeCtr = {};
-
-dijit.getUniqueId = function(/*String*/widgetType){
- // summary
- // Generates a unique id for a given widgetType
-
- var id;
- do{
- id = widgetType + "_" +
- (dijit._widgetTypeCtr[widgetType] !== undefined ?
- ++dijit._widgetTypeCtr[widgetType] : dijit._widgetTypeCtr[widgetType] = 0);
- }while(dijit.byId(id));
- return id; // String
-};
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-if(dojo.isIE){
- // Only run this for IE because we think it's only necessary in that case,
- // and because it causes problems on FF. See bug #3531 for details.
- dojo.addOnUnload(function(){
- dijit.registry.forEach(function(widget){ widget.destroy(); });
- });
+if(!dojo._hasResource["dijit._base.manager"]){
+dojo._hasResource["dijit._base.manager"]=true;
+dojo.provide("dijit._base.manager");
+dojo.declare("dijit.WidgetSet",null,{constructor:function(){
+this._hash={};
+this.length=0;
+},add:function(_1){
+if(this._hash[_1.id]){
+throw new Error("Tried to register widget with id=="+_1.id+" but that id is already registered");
+}
+this._hash[_1.id]=_1;
+this.length++;
+},remove:function(id){
+if(this._hash[id]){
+delete this._hash[id];
+this.length--;
+}
+},forEach:function(_2,_3){
+_3=_3||dojo.global;
+var i=0,id;
+for(id in this._hash){
+_2.call(_3,this._hash[id],i++,this._hash);
+}
+return this;
+},filter:function(_4,_5){
+_5=_5||dojo.global;
+var _6=new dijit.WidgetSet(),i=0,id;
+for(id in this._hash){
+var w=this._hash[id];
+if(_4.call(_5,w,i++,this._hash)){
+_6.add(w);
+}
+}
+return _6;
+},byId:function(id){
+return this._hash[id];
+},byClass:function(_7){
+var _8=new dijit.WidgetSet(),id,_9;
+for(id in this._hash){
+_9=this._hash[id];
+if(_9.declaredClass==_7){
+_8.add(_9);
+}
}
-
-dijit.byId = function(/*String|Widget*/id){
- // summary:
- // Returns a widget by its id, or if passed a widget, no-op (like dojo.byId())
- return (dojo.isString(id)) ? dijit.registry.byId(id) : id; // Widget
+return _8;
+},toArray:function(){
+var ar=[];
+for(var id in this._hash){
+ar.push(this._hash[id]);
+}
+return ar;
+},map:function(_a,_b){
+return dojo.map(this.toArray(),_a,_b);
+},every:function(_c,_d){
+_d=_d||dojo.global;
+var x=0,i;
+for(i in this._hash){
+if(!_c.call(_d,this._hash[i],x++,this._hash)){
+return false;
+}
+}
+return true;
+},some:function(_e,_f){
+_f=_f||dojo.global;
+var x=0,i;
+for(i in this._hash){
+if(_e.call(_f,this._hash[i],x++,this._hash)){
+return true;
+}
+}
+return false;
+}});
+dijit.registry=new dijit.WidgetSet();
+dijit._widgetTypeCtr={};
+dijit.getUniqueId=function(_10){
+var id;
+do{
+id=_10+"_"+(_10 in dijit._widgetTypeCtr?++dijit._widgetTypeCtr[_10]:dijit._widgetTypeCtr[_10]=0);
+}while(dijit.byId(id));
+return dijit._scopeName=="dijit"?id:dijit._scopeName+"_"+id;
+};
+dijit.findWidgets=function(_11){
+var _12=[];
+function _13(_14){
+for(var _15=_14.firstChild;_15;_15=_15.nextSibling){
+if(_15.nodeType==1){
+var _16=_15.getAttribute("widgetId");
+if(_16){
+var _17=dijit.byId(_16);
+_12.push(_17);
+}else{
+_13(_15);
+}
+}
+}
+};
+_13(_11);
+return _12;
};
-
-dijit.byNode = function(/* DOMNode */ node){
- // summary:
- // Returns the widget as referenced by node
- return dijit.registry.byId(node.getAttribute("widgetId")); // Widget
+dijit._destroyAll=function(){
+dijit._curFocus=null;
+dijit._prevFocus=null;
+dijit._activeStack=[];
+dojo.forEach(dijit.findWidgets(dojo.body()),function(_18){
+if(!_18._destroyed){
+if(_18.destroyRecursive){
+_18.destroyRecursive();
+}else{
+if(_18.destroy){
+_18.destroy();
+}
+}
+}
+});
+};
+if(dojo.isIE){
+dojo.addOnWindowUnload(function(){
+dijit._destroyAll();
+});
+}
+dijit.byId=function(id){
+return typeof id=="string"?dijit.registry._hash[id]:id;
+};
+dijit.byNode=function(_19){
+return dijit.registry.byId(_19.getAttribute("widgetId"));
+};
+dijit.getEnclosingWidget=function(_1a){
+while(_1a){
+var id=_1a.getAttribute&&_1a.getAttribute("widgetId");
+if(id){
+return dijit.byId(id);
+}
+_1a=_1a.parentNode;
+}
+return null;
+};
+dijit._isElementShown=function(_1b){
+var _1c=dojo.style(_1b);
+return (_1c.visibility!="hidden")&&(_1c.visibility!="collapsed")&&(_1c.display!="none")&&(dojo.attr(_1b,"type")!="hidden");
};
-
-dijit.getEnclosingWidget = function(/* DOMNode */ node){
- // summary:
- // Returns the widget whose dom tree contains node or null if
- // the node is not contained within the dom tree of any widget
- while(node){
- if(node.getAttribute && node.getAttribute("widgetId")){
- return dijit.registry.byId(node.getAttribute("widgetId"));
- }
- node = node.parentNode;
- }
- return null;
+dijit.isTabNavigable=function(_1d){
+if(dojo.attr(_1d,"disabled")){
+return false;
+}else{
+if(dojo.hasAttr(_1d,"tabIndex")){
+return dojo.attr(_1d,"tabIndex")>=0;
+}else{
+switch(_1d.nodeName.toLowerCase()){
+case "a":
+return dojo.hasAttr(_1d,"href");
+case "area":
+case "button":
+case "input":
+case "object":
+case "select":
+case "textarea":
+return true;
+case "iframe":
+if(dojo.isMoz){
+return _1d.contentDocument.designMode=="on";
+}else{
+if(dojo.isWebKit){
+var doc=_1d.contentDocument,_1e=doc&&doc.body;
+return _1e&&_1e.contentEditable=="true";
+}else{
+try{
+doc=_1d.contentWindow.document;
+_1e=doc&&doc.body;
+return _1e&&_1e.firstChild&&_1e.firstChild.contentEditable=="true";
+}
+catch(e){
+return false;
+}
+}
+}
+default:
+return _1d.contentEditable=="true";
+}
+}
+}
};
-
+dijit._getTabNavigable=function(_1f){
+var _20,_21,_22,_23,_24,_25;
+var _26=function(_27){
+dojo.query("> *",_27).forEach(function(_28){
+var _29=dijit._isElementShown(_28);
+if(_29&&dijit.isTabNavigable(_28)){
+var _2a=dojo.attr(_28,"tabIndex");
+if(!dojo.hasAttr(_28,"tabIndex")||_2a==0){
+if(!_20){
+_20=_28;
+}
+_21=_28;
+}else{
+if(_2a>0){
+if(!_22||_2a<_23){
+_23=_2a;
+_22=_28;
+}
+if(!_24||_2a>=_25){
+_25=_2a;
+_24=_28;
+}
}
+}
+}
+if(_29&&_28.nodeName.toUpperCase()!="SELECT"){
+_26(_28);
+}
+});
+};
+if(dijit._isElementShown(_1f)){
+_26(_1f);
+}
+return {first:_20,last:_21,lowest:_22,highest:_24};
+};
+dijit.getFirstInTabbingOrder=function(_2b){
+var _2c=dijit._getTabNavigable(dojo.byId(_2b));
+return _2c.lowest?_2c.lowest:_2c.first;
+};
+dijit.getLastInTabbingOrder=function(_2d){
+var _2e=dijit._getTabNavigable(dojo.byId(_2d));
+return _2e.last?_2e.last:_2e.highest;
+};
+dijit.defaultDuration=dojo.config["defaultDuration"]||200;
+}
diff --git a/js/dojo/dijit/_base/place.js b/js/dojo/dijit/_base/place.js
--- a/js/dojo/dijit/_base/place.js
+++ b/js/dojo/dijit/_base/place.js
@@ -1,207 +1,135 @@
-if(!dojo._hasResource["dijit._base.place"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._base.place"] = true;
-dojo.provide("dijit._base.place");
-
-// ported from dojo.html.util
-
-dijit.getViewport = function(){
- // summary
- // Returns the dimensions and scroll position of the viewable area of a browser window
-
- var _window = dojo.global;
- var _document = dojo.doc;
-
- // get viewport size
- var w = 0, h = 0;
- if(dojo.isMozilla){
- // mozilla
- // _window.innerHeight includes the height taken by the scroll bar
- // clientHeight is ideal but has DTD issues:
- // #4539: FF reverses the roles of body.clientHeight/Width and documentElement.clientHeight/Width based on the DTD!
- // check DTD to see whether body or documentElement returns the viewport dimensions using this algorithm:
- var minw, minh, maxw, maxh;
- if(_document.body.clientWidth>_document.documentElement.clientWidth){
- minw = _document.documentElement.clientWidth;
- maxw = _document.body.clientWidth;
- }else{
- maxw = _document.documentElement.clientWidth;
- minw = _document.body.clientWidth;
- }
- if(_document.body.clientHeight>_document.documentElement.clientHeight){
- minh = _document.documentElement.clientHeight;
- maxh = _document.body.clientHeight;
- }else{
- maxh = _document.documentElement.clientHeight;
- minh = _document.body.clientHeight;
- }
- w = (maxw > _window.innerWidth) ? minw : maxw;
- h = (maxh > _window.innerHeight) ? minh : maxh;
- }else if(!dojo.isOpera && _window.innerWidth){
- //in opera9, dojo.body().clientWidth should be used, instead
- //of window.innerWidth/document.documentElement.clientWidth
- //so we have to check whether it is opera
- w = _window.innerWidth;
- h = _window.innerHeight;
- }else if(dojo.isIE && _document.documentElement && _document.documentElement.clientHeight){
- w = _document.documentElement.clientWidth;
- h = _document.documentElement.clientHeight;
- }else if(dojo.body().clientWidth){
- // IE5, Opera
- w = dojo.body().clientWidth;
- h = dojo.body().clientHeight;
- }
-
- // get scroll position
- var scroll = dojo._docScroll();
-
- return { w: w, h: h, l: scroll.x, t: scroll.y }; // object
-};
-
-dijit.placeOnScreen = function(
- /* DomNode */ node,
- /* Object */ pos,
- /* Object */ corners,
- /* boolean? */ tryOnly){
- // summary:
- // Keeps 'node' in the visible area of the screen while trying to
- // place closest to pos.x, pos.y. The input coordinates are
- // expected to be the desired document position.
- //
- // Set which corner(s) you want to bind to, such as
- //
- // placeOnScreen(node, {x: 10, y: 20}, ["TR", "BL"])
- //
- // The desired x/y will be treated as the topleft(TL)/topright(TR) or
- // BottomLeft(BL)/BottomRight(BR) corner of the node. Each corner is tested
- // and if a perfect match is found, it will be used. Otherwise, it goes through
- // all of the specified corners, and choose the most appropriate one.
- //
- // NOTE: node is assumed to be absolutely or relatively positioned.
-
- var choices = dojo.map(corners, function(corner){ return { corner: corner, pos: pos }; });
-
- return dijit._place(node, choices);
-}
-
-dijit._place = function(/*DomNode*/ node, /* Array */ choices, /* Function */ layoutNode){
- // summary:
- // Given a list of spots to put node, put it at the first spot where it fits,
- // of if it doesn't fit anywhere then the place with the least overflow
- // choices: Array
- // Array of elements like: {corner: 'TL', pos: {x: 10, y: 20} }
- // Above example says to put the top-left corner of the node at (10,20)
- // layoutNode: Function(node, orient)
- // for things like tooltip, they are displayed differently (and have different dimensions)
- // based on their orientation relative to the parent. This adjusts the popup based on orientation.
-
- // get {x: 10, y: 10, w: 100, h:100} type obj representing position of
- // viewport over document
- var view = dijit.getViewport();
-
- // This won't work if the node is inside a <div style="position: relative">,
- // so reattach it to document.body. (Otherwise, the positioning will be wrong
- // and also it might get cutoff)
- if(!node.parentNode || String(node.parentNode.tagName).toLowerCase() != "body"){
- dojo.body().appendChild(node);
- }
-
- var best=null;
- for(var i=0; i<choices.length; i++){
- var corner = choices[i].corner;
- var pos = choices[i].pos;
-
- // configure node to be displayed in given position relative to button
- // (need to do this in order to get an accurate size for the node, because
- // a tooltips size changes based on position, due to triangle)
- if(layoutNode){
- layoutNode(corner);
- }
-
- // get node's size
- var oldDisplay = node.style.display;
- var oldVis = node.style.visibility;
- node.style.visibility = "hidden";
- node.style.display = "";
- var mb = dojo.marginBox(node);
- node.style.display = oldDisplay;
- node.style.visibility = oldVis;
-
- // coordinates and size of node with specified corner placed at pos,
- // and clipped by viewport
- var startX = (corner.charAt(1)=='L' ? pos.x : Math.max(view.l, pos.x - mb.w)),
- startY = (corner.charAt(0)=='T' ? pos.y : Math.max(view.t, pos.y - mb.h)),
- endX = (corner.charAt(1)=='L' ? Math.min(view.l+view.w, startX+mb.w) : pos.x),
- endY = (corner.charAt(0)=='T' ? Math.min(view.t+view.h, startY+mb.h) : pos.y),
- width = endX-startX,
- height = endY-startY,
- overflow = (mb.w-width) + (mb.h-height);
-
- if(best==null || overflow<best.overflow){
- best = {
- corner: corner,
- aroundCorner: choices[i].aroundCorner,
- x: startX,
- y: startY,
- w: width,
- h: height,
- overflow: overflow
- };
- }
- if(overflow==0){
- break;
- }
- }
-
- node.style.left = best.x + "px";
- node.style.top = best.y + "px";
- return best;
-}
-
-dijit.placeOnScreenAroundElement = function(
- /* DomNode */ node,
- /* DomNode */ aroundNode,
- /* Object */ aroundCorners,
- /* Function */ layoutNode){
-
- // summary
- // Like placeOnScreen, except it accepts aroundNode instead of x,y
- // and attempts to place node around it. Uses margin box dimensions.
- //
- // aroundCorners
- // specify Which corner of aroundNode should be
- // used to place the node => which corner(s) of node to use (see the
- // corners parameter in dijit.placeOnScreen)
- // e.g. {'TL': 'BL', 'BL': 'TL'}
- //
- // layoutNode: Function(node, orient)
- // for things like tooltip, they are displayed differently (and have different dimensions)
- // based on their orientation relative to the parent. This adjusts the popup based on orientation.
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // get coordinates of aroundNode
- aroundNode = dojo.byId(aroundNode);
- var oldDisplay = aroundNode.style.display;
- aroundNode.style.display="";
- // #3172: use the slightly tighter border box instead of marginBox
- var aroundNodeW = aroundNode.offsetWidth; //mb.w;
- var aroundNodeH = aroundNode.offsetHeight; //mb.h;
- var aroundNodePos = dojo.coords(aroundNode, true);
- aroundNode.style.display=oldDisplay;
-
- // Generate list of possible positions for node
- var choices = [];
- for(var nodeCorner in aroundCorners){
- choices.push( {
- aroundCorner: nodeCorner,
- corner: aroundCorners[nodeCorner],
- pos: {
- x: aroundNodePos.x + (nodeCorner.charAt(1)=='L' ? 0 : aroundNodeW),
- y: aroundNodePos.y + (nodeCorner.charAt(0)=='T' ? 0 : aroundNodeH)
- }
- });
- }
-
- return dijit._place(node, choices, layoutNode);
+if(!dojo._hasResource["dijit._base.place"]){
+dojo._hasResource["dijit._base.place"]=true;
+dojo.provide("dijit._base.place");
+dojo.require("dojo.AdapterRegistry");
+dijit.getViewport=function(){
+var _1=(dojo.doc.compatMode=="BackCompat")?dojo.body():dojo.doc.documentElement;
+var _2=dojo._docScroll();
+return {w:_1.clientWidth,h:_1.clientHeight,l:_2.x,t:_2.y};
+};
+dijit.placeOnScreen=function(_3,_4,_5,_6){
+var _7=dojo.map(_5,function(_8){
+var c={corner:_8,pos:{x:_4.x,y:_4.y}};
+if(_6){
+c.pos.x+=_8.charAt(1)=="L"?_6.x:-_6.x;
+c.pos.y+=_8.charAt(0)=="T"?_6.y:-_6.y;
+}
+return c;
+});
+return dijit._place(_3,_7);
+};
+dijit._place=function(_9,_a,_b){
+var _c=dijit.getViewport();
+if(!_9.parentNode||String(_9.parentNode.tagName).toLowerCase()!="body"){
+dojo.body().appendChild(_9);
+}
+var _d=null;
+dojo.some(_a,function(_e){
+var _f=_e.corner;
+var pos=_e.pos;
+if(_b){
+_b(_9,_e.aroundCorner,_f);
+}
+var _10=_9.style;
+var _11=_10.display;
+var _12=_10.visibility;
+_10.visibility="hidden";
+_10.display="";
+var mb=dojo.marginBox(_9);
+_10.display=_11;
+_10.visibility=_12;
+var _13=Math.max(_c.l,_f.charAt(1)=="L"?pos.x:(pos.x-mb.w)),_14=Math.max(_c.t,_f.charAt(0)=="T"?pos.y:(pos.y-mb.h)),_15=Math.min(_c.l+_c.w,_f.charAt(1)=="L"?(_13+mb.w):pos.x),_16=Math.min(_c.t+_c.h,_f.charAt(0)=="T"?(_14+mb.h):pos.y),_17=_15-_13,_18=_16-_14,_19=(mb.w-_17)+(mb.h-_18);
+if(_d==null||_19<_d.overflow){
+_d={corner:_f,aroundCorner:_e.aroundCorner,x:_13,y:_14,w:_17,h:_18,overflow:_19};
+}
+return !_19;
+});
+_9.style.left=_d.x+"px";
+_9.style.top=_d.y+"px";
+if(_d.overflow&&_b){
+_b(_9,_d.aroundCorner,_d.corner);
}
-
+return _d;
+};
+dijit.placeOnScreenAroundNode=function(_1a,_1b,_1c,_1d){
+_1b=dojo.byId(_1b);
+var _1e=_1b.style.display;
+_1b.style.display="";
+var _1f=dojo.position(_1b,true);
+_1b.style.display=_1e;
+return dijit._placeOnScreenAroundRect(_1a,_1f.x,_1f.y,_1f.w,_1f.h,_1c,_1d);
+};
+dijit.placeOnScreenAroundRectangle=function(_20,_21,_22,_23){
+return dijit._placeOnScreenAroundRect(_20,_21.x,_21.y,_21.width,_21.height,_22,_23);
+};
+dijit._placeOnScreenAroundRect=function(_24,x,y,_25,_26,_27,_28){
+var _29=[];
+for(var _2a in _27){
+_29.push({aroundCorner:_2a,corner:_27[_2a],pos:{x:x+(_2a.charAt(1)=="L"?0:_25),y:y+(_2a.charAt(0)=="T"?0:_26)}});
}
+return dijit._place(_24,_29,_28);
+};
+dijit.placementRegistry=new dojo.AdapterRegistry();
+dijit.placementRegistry.register("node",function(n,x){
+return typeof x=="object"&&typeof x.offsetWidth!="undefined"&&typeof x.offsetHeight!="undefined";
+},dijit.placeOnScreenAroundNode);
+dijit.placementRegistry.register("rect",function(n,x){
+return typeof x=="object"&&"x" in x&&"y" in x&&"width" in x&&"height" in x;
+},dijit.placeOnScreenAroundRectangle);
+dijit.placeOnScreenAroundElement=function(_2b,_2c,_2d,_2e){
+return dijit.placementRegistry.match.apply(dijit.placementRegistry,arguments);
+};
+dijit.getPopupAlignment=function(_2f,_30){
+var _31={};
+dojo.forEach(_2f,function(pos){
+switch(pos){
+case "after":
+_31[_30?"BR":"BL"]=_30?"BL":"BR";
+break;
+case "before":
+_31[_30?"BL":"BR"]=_30?"BR":"BL";
+break;
+case "below":
+_31[_30?"BL":"BR"]=_30?"TL":"TR";
+_31[_30?"BR":"BL"]=_30?"TR":"TL";
+break;
+case "above":
+default:
+_31[_30?"TL":"TR"]=_30?"BL":"BR";
+_31[_30?"TR":"TL"]=_30?"BR":"BL";
+break;
+}
+});
+return _31;
+};
+dijit.getPopupAroundAlignment=function(_32,_33){
+var _34={};
+dojo.forEach(_32,function(pos){
+switch(pos){
+case "after":
+_34[_33?"BR":"BL"]=_33?"BL":"BR";
+break;
+case "before":
+_34[_33?"BL":"BR"]=_33?"BR":"BL";
+break;
+case "below":
+_34[_33?"BL":"BR"]=_33?"TL":"TR";
+_34[_33?"BR":"BL"]=_33?"TR":"TL";
+break;
+case "above":
+default:
+_34[_33?"TL":"TR"]=_33?"BL":"BR";
+_34[_33?"TR":"TL"]=_33?"BR":"BL";
+break;
+}
+});
+return _34;
+};
+}
diff --git a/js/dojo/dijit/_base/popup.js b/js/dojo/dijit/_base/popup.js
--- a/js/dojo/dijit/_base/popup.js
+++ b/js/dojo/dijit/_base/popup.js
@@ -1,240 +1,166 @@
-if(!dojo._hasResource["dijit._base.popup"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._base.popup"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit._base.popup"]){
+dojo._hasResource["dijit._base.popup"]=true;
dojo.provide("dijit._base.popup");
-
dojo.require("dijit._base.focus");
dojo.require("dijit._base.place");
dojo.require("dijit._base.window");
-
-dijit.popup = new function(){
- // summary:
- // This class is used to show/hide widgets as popups.
- //
-
- var stack = [],
- beginZIndex=1000,
- idGen = 1;
-
- this.open = function(/*Object*/ args){
- // summary:
- // Popup the widget at the specified position
- //
- // args: Object
- // popup: Widget
- // widget to display,
- // parent: Widget
- // the button etc. that is displaying this popup
- // around: DomNode
- // DOM node (typically a button); place popup relative to this node
- // orient: Object
- // structure specifying possible positions of popup relative to "around" node
- // onCancel: Function
- // callback when user has canceled the popup by
- // 1. hitting ESC or
- // 2. by using the popup widget's proprietary cancel mechanism (like a cancel button in a dialog);
- // ie: whenever popupWidget.onCancel() is called, args.onCancel is called
- // onClose: Function
- // callback whenever this popup is closed
- // onExecute: Function
- // callback when user "executed" on the popup/sub-popup by selecting a menu choice, etc. (top menu only)
- //
- // examples:
- // 1. opening at the mouse position
- // dijit.popup.open({popup: menuWidget, x: evt.pageX, y: evt.pageY});
- // 2. opening the widget as a dropdown
- // dijit.popup.open({parent: this, popup: menuWidget, around: this.domNode, onClose: function(){...} });
- //
- // Note that whatever widget called dijit.popup.open() should also listen to it's own _onBlur callback
- // (fired from _base/focus.js) to know that focus has moved somewhere else and thus the popup should be closed.
-
- var widget = args.popup,
- orient = args.orient || {'BL':'TL', 'TL':'BL'},
- around = args.around,
- id = (args.around && args.around.id) ? (args.around.id+"_dropdown") : ("popup_"+idGen++);
-
- // make wrapper div to hold widget and possibly hold iframe behind it.
- // we can't attach the iframe as a child of the widget.domNode because
- // widget.domNode might be a <table>, <ul>, etc.
- var wrapper = dojo.doc.createElement("div");
- wrapper.id = id;
- wrapper.className="dijitPopup";
- wrapper.style.zIndex = beginZIndex + stack.length;
- wrapper.style.visibility = "hidden";
- if(args.parent){
- wrapper.dijitPopupParent=args.parent.id;
- }
- dojo.body().appendChild(wrapper);
-
- widget.domNode.style.display="";
- wrapper.appendChild(widget.domNode);
-
- var iframe = new dijit.BackgroundIframe(wrapper);
-
- // position the wrapper node
- var best = around ?
- dijit.placeOnScreenAroundElement(wrapper, around, orient, widget.orient ? dojo.hitch(widget, "orient") : null) :
- dijit.placeOnScreen(wrapper, args, orient == 'R' ? ['TR','BR','TL','BL'] : ['TL','BL','TR','BR']);
-
- wrapper.style.visibility = "visible";
- // TODO: use effects to fade in wrapper
-
- var handlers = [];
-
- // Compute the closest ancestor popup that's *not* a child of another popup.
- // Ex: For a TooltipDialog with a button that spawns a tree of menus, find the popup of the button.
- function getTopPopup(){
- for(var pi=stack.length-1; pi > 0 && stack[pi].parent === stack[pi-1].widget; pi--);
- return stack[pi];
- }
-
- // provide default escape and tab key handling
- // (this will work for any widget, not just menu)
- handlers.push(dojo.connect(wrapper, "onkeypress", this, function(evt){
- if(evt.keyCode == dojo.keys.ESCAPE && args.onCancel){
- args.onCancel();
- }else if(evt.keyCode == dojo.keys.TAB){
- dojo.stopEvent(evt);
- var topPopup = getTopPopup();
- if(topPopup && topPopup.onCancel){
- topPopup.onCancel();
- }
- }
- }));
-
- // watch for cancel/execute events on the popup and notify the caller
- // (for a menu, "execute" means clicking an item)
- if(widget.onCancel){
- handlers.push(dojo.connect(widget, "onCancel", null, args.onCancel));
- }
-
- handlers.push(dojo.connect(widget, widget.onExecute ? "onExecute" : "onChange", null, function(){
- var topPopup = getTopPopup();
- if(topPopup && topPopup.onExecute){
- topPopup.onExecute();
- }
- }));
-
- stack.push({
- wrapper: wrapper,
- iframe: iframe,
- widget: widget,
- parent: args.parent,
- onExecute: args.onExecute,
- onCancel: args.onCancel,
- onClose: args.onClose,
- handlers: handlers
- });
-
- if(widget.onOpen){
- widget.onOpen(best);
- }
-
- return best;
- };
-
- this.close = function(/*Widget*/ popup){
- // summary:
- // Close specified popup and any popups that it parented
- while(dojo.some(stack, function(elem){return elem.widget == popup;})){
- var top = stack.pop(),
- wrapper = top.wrapper,
- iframe = top.iframe,
- widget = top.widget,
- onClose = top.onClose;
-
- if(widget.onClose){
- widget.onClose();
- }
- dojo.forEach(top.handlers, dojo.disconnect);
-
- // #2685: check if the widget still has a domNode so ContentPane can change its URL without getting an error
- if(!widget||!widget.domNode){ return; }
- dojo.style(widget.domNode, "display", "none");
- dojo.body().appendChild(widget.domNode);
- iframe.destroy();
- dojo._destroyElement(wrapper);
-
- if(onClose){
- onClose();
- }
- }
- };
+dijit.popup=new function(){
+var _1=[],_2=1000,_3=1;
+this.moveOffScreen=function(_4){
+var s=_4.style;
+s.visibility="hidden";
+s.position="absolute";
+s.top="-9999px";
+if(s.display=="none"){
+s.display="";
+}
+dojo.body().appendChild(_4);
+};
+var _5=function(){
+for(var pi=_1.length-1;pi>0&&_1[pi].parent===_1[pi-1].widget;pi--){
+}
+return _1[pi];
+};
+var _6=[];
+this.open=function(_7){
+var _8=_7.popup,_9=_7.orient||(dojo._isBodyLtr()?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"}),_a=_7.around,id=(_7.around&&_7.around.id)?(_7.around.id+"_dropdown"):("popup_"+_3++);
+var _b=_6.pop(),_c,_d;
+if(!_b){
+_c=dojo.create("div",{"class":"dijitPopup"},dojo.body());
+dijit.setWaiRole(_c,"presentation");
+}else{
+_c=_b[0];
+_d=_b[1];
+}
+dojo.attr(_c,{id:id,style:{zIndex:_2+_1.length,visibility:"hidden",top:"-9999px"},dijitPopupParent:_7.parent?_7.parent.id:""});
+var s=_8.domNode.style;
+s.display="";
+s.visibility="";
+s.position="";
+s.top="0px";
+_c.appendChild(_8.domNode);
+if(!_d){
+_d=new dijit.BackgroundIframe(_c);
+}else{
+_d.resize(_c);
+}
+var _e=_a?dijit.placeOnScreenAroundElement(_c,_a,_9,_8.orient?dojo.hitch(_8,"orient"):null):dijit.placeOnScreen(_c,_7,_9=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],_7.padding);
+_c.style.visibility="visible";
+var _f=[];
+_f.push(dojo.connect(_c,"onkeypress",this,function(evt){
+if(evt.charOrCode==dojo.keys.ESCAPE&&_7.onCancel){
+dojo.stopEvent(evt);
+_7.onCancel();
+}else{
+if(evt.charOrCode===dojo.keys.TAB){
+dojo.stopEvent(evt);
+var _10=_5();
+if(_10&&_10.onCancel){
+_10.onCancel();
+}
+}
+}
+}));
+if(_8.onCancel){
+_f.push(dojo.connect(_8,"onCancel",_7.onCancel));
+}
+_f.push(dojo.connect(_8,_8.onExecute?"onExecute":"onChange",function(){
+var _11=_5();
+if(_11&&_11.onExecute){
+_11.onExecute();
+}
+}));
+_1.push({wrapper:_c,iframe:_d,widget:_8,parent:_7.parent,onExecute:_7.onExecute,onCancel:_7.onCancel,onClose:_7.onClose,handlers:_f});
+if(_8.onOpen){
+_8.onOpen(_e);
+}
+return _e;
+};
+this.close=function(_12){
+while(dojo.some(_1,function(_13){
+return _13.widget==_12;
+})){
+var top=_1.pop(),_14=top.wrapper,_15=top.iframe,_16=top.widget,_17=top.onClose;
+if(_16.onClose){
+_16.onClose();
+}
+dojo.forEach(top.handlers,dojo.disconnect);
+if(_16&&_16.domNode){
+this.moveOffScreen(_16.domNode);
+}
+_14.style.top="-9999px";
+_14.style.visibility="hidden";
+_6.push([_14,_15]);
+if(_17){
+_17();
+}
+}
+};
}();
-
-dijit._frames = new function(){
- // summary: cache of iframes
- var queue = [];
-
- this.pop = function(){
- var iframe;
- if(queue.length){
- iframe = queue.pop();
- iframe.style.display="";
- }else{
- if(dojo.isIE){
- var html="<iframe src='javascript:\"\"'"
- + " style='position: absolute; left: 0px; top: 0px;"
- + "z-index: -1; filter:Alpha(Opacity=\"0\");'>";
- iframe = dojo.doc.createElement(html);
- }else{
- var iframe = dojo.doc.createElement("iframe");
- iframe.src = 'javascript:""';
- iframe.className = "dijitBackgroundIframe";
- }
- iframe.tabIndex = -1; // Magic to prevent iframe from getting focus on tab keypress - as style didnt work.
- dojo.body().appendChild(iframe);
- }
- return iframe;
- };
-
- this.push = function(iframe){
- iframe.style.display="";
- if(dojo.isIE){
- iframe.style.removeExpression("width");
- iframe.style.removeExpression("height");
- }
- queue.push(iframe);
- }
+dijit._frames=new function(){
+var _18=[];
+this.pop=function(){
+var _19;
+if(_18.length){
+_19=_18.pop();
+_19.style.display="";
+}else{
+if(dojo.isIE){
+var _1a=dojo.config["dojoBlankHtmlUrl"]||(dojo.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\"";
+var _1b="<iframe src='"+_1a+"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";
+_19=dojo.doc.createElement(_1b);
+}else{
+_19=dojo.create("iframe");
+_19.src="javascript:\"\"";
+_19.className="dijitBackgroundIframe";
+dojo.style(_19,"opacity",0.1);
+}
+_19.tabIndex=-1;
+}
+return _19;
+};
+this.push=function(_1c){
+_1c.style.display="none";
+_18.push(_1c);
+};
}();
-
-// fill the queue
-if(dojo.isIE && dojo.isIE < 7){
- dojo.addOnLoad(function(){
- var f = dijit._frames;
- dojo.forEach([f.pop()], f.push);
- });
+dijit.BackgroundIframe=function(_1d){
+if(!_1d.id){
+throw new Error("no id");
+}
+if(dojo.isIE||dojo.isMoz){
+var _1e=dijit._frames.pop();
+_1d.appendChild(_1e);
+if(dojo.isIE<7){
+this.resize(_1d);
+this._conn=dojo.connect(_1d,"onresize",this,function(){
+this.resize(_1d);
+});
+}else{
+dojo.style(_1e,{width:"100%",height:"100%"});
+}
+this.iframe=_1e;
}
-
-
-dijit.BackgroundIframe = function(/* DomNode */node){
- // summary:
- // For IE z-index schenanigans. id attribute is required.
- //
- // description:
- // new dijit.BackgroundIframe(node)
- // Makes a background iframe as a child of node, that fills
- // area (and position) of node
-
- if(!node.id){ throw new Error("no id"); }
- if((dojo.isIE && dojo.isIE < 7) || (dojo.isFF && dojo.isFF < 3 && dojo.hasClass(dojo.body(), "dijit_a11y"))){
- var iframe = dijit._frames.pop();
- node.appendChild(iframe);
- if(dojo.isIE){
- iframe.style.setExpression("width", "document.getElementById('" + node.id + "').offsetWidth");
- iframe.style.setExpression("height", "document.getElementById('" + node.id + "').offsetHeight");
- }
- this.iframe = iframe;
- }
};
-
-dojo.extend(dijit.BackgroundIframe, {
- destroy: function(){
- // summary: destroy the iframe
- if(this.iframe){
- dijit._frames.push(this.iframe);
- delete this.iframe;
- }
- }
-});
-
+dojo.extend(dijit.BackgroundIframe,{resize:function(_1f){
+if(this.iframe&&dojo.isIE<7){
+dojo.style(this.iframe,{width:_1f.offsetWidth+"px",height:_1f.offsetHeight+"px"});
}
+},destroy:function(){
+if(this._conn){
+dojo.disconnect(this._conn);
+this._conn=null;
+}
+if(this.iframe){
+dijit._frames.push(this.iframe);
+delete this.iframe;
+}
+}});
+}
diff --git a/js/dojo/dijit/_base/scroll.js b/js/dojo/dijit/_base/scroll.js
--- a/js/dojo/dijit/_base/scroll.js
+++ b/js/dojo/dijit/_base/scroll.js
@@ -1,33 +1,100 @@
-if(!dojo._hasResource["dijit._base.scroll"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._base.scroll"] = true;
-dojo.provide("dijit._base.scroll");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dijit.scrollIntoView = function(/* DomNode */node){
- // summary
- // Scroll the passed node into view, if it is not.
- // don't rely on that node.scrollIntoView works just because the function is there
- // it doesnt work in Konqueror or Opera even though the function is there and probably
- // not safari either
- // dont like browser sniffs implementations but sometimes you have to use it
- if(dojo.isIE){
- //only call scrollIntoView if there is a scrollbar for this menu,
- //otherwise, scrollIntoView will scroll the window scrollbar
- if(dojo.marginBox(node.parentNode).h <= node.parentNode.scrollHeight){ //PORT was getBorderBox
- node.scrollIntoView(false);
- }
- }else if(dojo.isMozilla){
- node.scrollIntoView(false);
- }else{
- var parent = node.parentNode;
- var parentBottom = parent.scrollTop + dojo.marginBox(parent).h; //PORT was getBorderBox
- var nodeBottom = node.offsetTop + dojo.marginBox(node).h;
- if(parentBottom < nodeBottom){
- parent.scrollTop += (nodeBottom - parentBottom);
- }else if(parent.scrollTop > node.offsetTop){
- parent.scrollTop -= (parent.scrollTop - node.offsetTop);
- }
- }
+if(!dojo._hasResource["dijit._base.scroll"]){
+dojo._hasResource["dijit._base.scroll"]=true;
+dojo.provide("dijit._base.scroll");
+dijit.scrollIntoView=function(_1,_2){
+try{
+_1=dojo.byId(_1);
+var _3=_1.ownerDocument||dojo.doc,_4=_3.body||dojo.body(),_5=_3.documentElement||_4.parentNode,_6=dojo.isIE,_7=dojo.isWebKit;
+if((!(dojo.isMoz||_6||_7)||_1==_4||_1==_5)&&(typeof _1.scrollIntoView!="undefined")){
+_1.scrollIntoView(false);
+return;
+}
+var _8=_3.compatMode=="BackCompat",_9=_8?_4:_5,_a=_7?_4:_9,_b=_9.clientWidth,_c=_9.clientHeight,_d=!dojo._isBodyLtr(),_e=_2||dojo.position(_1),el=_1.parentNode,_f=function(el){
+return ((_6<=6||(_6&&_8))?false:(dojo.style(el,"position").toLowerCase()=="fixed"));
};
-
+if(_f(_1)){
+return;
+}
+while(el){
+if(el==_4){
+el=_a;
+}
+var _10=dojo.position(el),_11=_f(el);
+with(_10){
+if(el==_a){
+w=_b,h=_c;
+if(_a==_5&&_6&&_d){
+x+=_a.offsetWidth-w;
+}
+if(x<0||!_6){
+x=0;
+}
+if(y<0||!_6){
+y=0;
+}
+}else{
+var pb=dojo._getPadBorderExtents(el);
+w-=pb.w;
+h-=pb.h;
+x+=pb.l;
+y+=pb.t;
+}
+with(el){
+if(el!=_a){
+var _12=clientWidth,_13=w-_12;
+if(_12>0&&_13>0){
+w=_12;
+if(_6&&_d){
+x+=_13;
+}
}
+_12=clientHeight;
+_13=h-_12;
+if(_12>0&&_13>0){
+h=_12;
+}
+}
+if(_11){
+if(y<0){
+h+=y,y=0;
+}
+if(x<0){
+w+=x,x=0;
+}
+if(y+h>_c){
+h=_c-y;
+}
+if(x+w>_b){
+w=_b-x;
+}
+}
+var l=_e.x-x,t=_e.y-Math.max(y,0),r=l+_e.w-w,bot=t+_e.h-h;
+if(r*l>0){
+var s=Math[l<0?"max":"min"](l,r);
+_e.x+=scrollLeft;
+scrollLeft+=(_6>=8&&!_8&&_d)?-s:s;
+_e.x-=scrollLeft;
+}
+if(bot*t>0){
+_e.y+=scrollTop;
+scrollTop+=Math[t<0?"max":"min"](t,bot);
+_e.y-=scrollTop;
+}
+}
+}
+el=(el!=_a)&&!_11&&el.parentNode;
+}
+}
+catch(error){
+console.error("scrollIntoView: "+error);
+_1.scrollIntoView(false);
+}
+};
+}
diff --git a/js/dojo/dijit/_base/sniff.js b/js/dojo/dijit/_base/sniff.js
--- a/js/dojo/dijit/_base/sniff.js
+++ b/js/dojo/dijit/_base/sniff.js
@@ -1,43 +1,34 @@
-if(!dojo._hasResource["dijit._base.sniff"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._base.sniff"] = true;
-dojo.provide("dijit._base.sniff");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-// ported from dojo.html.applyBrowserClass (style.js)
-// summary:
-// Applies pre-set class names based on browser & version to the
-// top-level HTML node. Simply doing a require on this module will
-// establish this CSS. Modified version of Morris' CSS hack.
+if(!dojo._hasResource["dijit._base.sniff"]){
+dojo._hasResource["dijit._base.sniff"]=true;
+dojo.provide("dijit._base.sniff");
(function(){
- var d = dojo;
- var ie = d.isIE;
- var opera = d.isOpera;
- var maj = Math.floor;
- var classes = {
- dj_ie: ie,
-// dj_ie55: ie == 5.5,
- dj_ie6: maj(ie) == 6,
- dj_ie7: maj(ie) == 7,
- dj_iequirks: ie && d.isQuirks,
-// NOTE: Opera not supported by dijit
- dj_opera: opera,
- dj_opera8: maj(opera) == 8,
- dj_opera9: maj(opera) == 9,
- dj_khtml: d.isKhtml,
- dj_safari: d.isSafari,
- dj_gecko: d.isMozilla
- }; // no dojo unsupported browsers
-
- for(var p in classes){
- if(classes[p]){
- var html = dojo.doc.documentElement; //TODO browser-specific DOM magic needed?
- if(html.className){
- html.className += " " + p;
- }else{
- html.className = p;
- }
- }
- }
+var d=dojo,_1=d.doc.documentElement,ie=d.isIE,_2=d.isOpera,_3=Math.floor,ff=d.isFF,_4=d.boxModel.replace(/-/,""),_5={dj_ie:ie,dj_ie6:_3(ie)==6,dj_ie7:_3(ie)==7,dj_ie8:_3(ie)==8,dj_iequirks:ie&&d.isQuirks,dj_opera:_2,dj_khtml:d.isKhtml,dj_webkit:d.isWebKit,dj_safari:d.isSafari,dj_chrome:d.isChrome,dj_gecko:d.isMozilla,dj_ff3:_3(ff)==3};
+_5["dj_"+_4]=true;
+for(var p in _5){
+if(_5[p]){
+if(_1.className){
+_1.className+=" "+p;
+}else{
+_1.className=p;
+}
+}
+}
+dojo._loaders.unshift(function(){
+if(!dojo._isBodyLtr()){
+_1.className+=" dijitRtl";
+for(var p in _5){
+if(_5[p]){
+_1.className+=" "+p+"-rtl";
+}
+}
+}
+});
})();
-
}
diff --git a/js/dojo/dijit/_base/typematic.js b/js/dojo/dijit/_base/typematic.js
--- a/js/dojo/dijit/_base/typematic.js
+++ b/js/dojo/dijit/_base/typematic.js
@@ -1,139 +1,85 @@
-if(!dojo._hasResource["dijit._base.typematic"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._base.typematic"] = true;
-dojo.provide("dijit._base.typematic");
-
-dijit.typematic = {
- // summary:
- // These functions are used to repetitively call a user specified callback
- // method when a specific key or mouse click over a specific DOM node is
- // held down for a specific amount of time.
- // Only 1 such event is allowed to occur on the browser page at 1 time.
-
- _fireEventAndReload: function(){
- this._timer = null;
- this._callback(++this._count, this._node, this._evt);
- this._currentTimeout = (this._currentTimeout < 0) ? this._initialDelay : ((this._subsequentDelay > 1) ? this._subsequentDelay : Math.round(this._currentTimeout * this._subsequentDelay));
- this._timer = setTimeout(dojo.hitch(this, "_fireEventAndReload"), this._currentTimeout);
- },
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- trigger: function(/*Event*/ evt, /* Object */ _this, /*DOMNode*/ node, /* Function */ callback, /* Object */ obj, /* Number */ subsequentDelay, /* Number */ initialDelay){
- // summary:
- // Start a timed, repeating callback sequence.
- // If already started, the function call is ignored.
- // This method is not normally called by the user but can be
- // when the normal listener code is insufficient.
- // Parameters:
- // evt: key or mouse event object to pass to the user callback
- // _this: pointer to the user's widget space.
- // node: the DOM node object to pass the the callback function
- // callback: function to call until the sequence is stopped called with 3 parameters:
- // count: integer representing number of repeated calls (0..n) with -1 indicating the iteration has stopped
- // node: the DOM node object passed in
- // evt: key or mouse event object
- // obj: user space object used to uniquely identify each typematic sequence
- // subsequentDelay: if > 1, the number of milliseconds until the 3->n events occur
- // or else the fractional time multiplier for the next event's delay, default=0.9
- // initialDelay: the number of milliseconds until the 2nd event occurs, default=500ms
- if(obj != this._obj){
- this.stop();
- this._initialDelay = initialDelay || 500;
- this._subsequentDelay = subsequentDelay || 0.90;
- this._obj = obj;
- this._evt = evt;
- this._node = node;
- this._currentTimeout = -1;
- this._count = -1;
- this._callback = dojo.hitch(_this, callback);
- this._fireEventAndReload();
- }
- },
-
- stop: function(){
- // summary:
- // Stop an ongoing timed, repeating callback sequence.
- if(this._timer){
- clearTimeout(this._timer);
- this._timer = null;
- }
- if(this._obj){
- this._callback(-1, this._node, this._evt);
- this._obj = null;
- }
- },
- addKeyListener: function(/*DOMNode*/ node, /*Object*/ keyObject, /*Object*/ _this, /*Function*/ callback, /*Number*/ subsequentDelay, /*Number*/ initialDelay){
- // summary: Start listening for a specific typematic key.
- // keyObject: an object defining the key to listen for.
- // key: (mandatory) the keyCode (number) or character (string) to listen for.
- // ctrlKey: desired ctrl key state to initiate the calback sequence:
- // pressed (true)
- // released (false)
- // either (unspecified)
- // altKey: same as ctrlKey but for the alt key
- // shiftKey: same as ctrlKey but for the shift key
- // See the trigger method for other parameters.
- // Returns an array of dojo.connect handles
- return [
- dojo.connect(node, "onkeypress", this, function(evt){
- if(evt.keyCode == keyObject.keyCode && (!keyObject.charCode || keyObject.charCode == evt.charCode) &&
- (keyObject.ctrlKey === undefined || keyObject.ctrlKey == evt.ctrlKey) &&
- (keyObject.altKey === undefined || keyObject.altKey == evt.ctrlKey) &&
- (keyObject.shiftKey === undefined || keyObject.shiftKey == evt.ctrlKey)){
- dojo.stopEvent(evt);
- dijit.typematic.trigger(keyObject, _this, node, callback, keyObject, subsequentDelay, initialDelay);
- }else if(dijit.typematic._obj == keyObject){
- dijit.typematic.stop();
- }
- }),
- dojo.connect(node, "onkeyup", this, function(evt){
- if(dijit.typematic._obj == keyObject){
- dijit.typematic.stop();
- }
- })
- ];
- },
-
- addMouseListener: function(/*DOMNode*/ node, /*Object*/ _this, /*Function*/ callback, /*Number*/ subsequentDelay, /*Number*/ initialDelay){
- // summary: Start listening for a typematic mouse click.
- // See the trigger method for other parameters.
- // Returns an array of dojo.connect handles
- var dc = dojo.connect;
- return [
- dc(node, "mousedown", this, function(evt){
- dojo.stopEvent(evt);
- dijit.typematic.trigger(evt, _this, node, callback, node, subsequentDelay, initialDelay);
- }),
- dc(node, "mouseup", this, function(evt){
- dojo.stopEvent(evt);
- dijit.typematic.stop();
- }),
- dc(node, "mouseout", this, function(evt){
- dojo.stopEvent(evt);
- dijit.typematic.stop();
- }),
- dc(node, "mousemove", this, function(evt){
- dojo.stopEvent(evt);
- }),
- dc(node, "dblclick", this, function(evt){
- dojo.stopEvent(evt);
- if(dojo.isIE){
- dijit.typematic.trigger(evt, _this, node, callback, node, subsequentDelay, initialDelay);
- setTimeout(dijit.typematic.stop, 50);
- }
- })
- ];
- },
-
- addListener: function(/*Node*/ mouseNode, /*Node*/ keyNode, /*Object*/ keyObject, /*Object*/ _this, /*Function*/ callback, /*Number*/ subsequentDelay, /*Number*/ initialDelay){
- // summary: Start listening for a specific typematic key and mouseclick.
- // This is a thin wrapper to addKeyListener and addMouseListener.
- // mouseNode: the DOM node object to listen on for mouse events.
- // keyNode: the DOM node object to listen on for key events.
- // See the addMouseListener and addKeyListener methods for other parameters.
- // Returns an array of dojo.connect handles
- return this.addKeyListener(keyNode, keyObject, _this, callback, subsequentDelay, initialDelay).concat(
- this.addMouseListener(mouseNode, _this, callback, subsequentDelay, initialDelay));
- }
-};
-
+if(!dojo._hasResource["dijit._base.typematic"]){
+dojo._hasResource["dijit._base.typematic"]=true;
+dojo.provide("dijit._base.typematic");
+dijit.typematic={_fireEventAndReload:function(){
+this._timer=null;
+this._callback(++this._count,this._node,this._evt);
+this._currentTimeout=Math.max(this._currentTimeout<0?this._initialDelay:(this._subsequentDelay>1?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay)),10);
+this._timer=setTimeout(dojo.hitch(this,"_fireEventAndReload"),this._currentTimeout);
+},trigger:function(_1,_2,_3,_4,_5,_6,_7){
+if(_5!=this._obj){
+this.stop();
+this._initialDelay=_7||500;
+this._subsequentDelay=_6||0.9;
+this._obj=_5;
+this._evt=_1;
+this._node=_3;
+this._currentTimeout=-1;
+this._count=-1;
+this._callback=dojo.hitch(_2,_4);
+this._fireEventAndReload();
+}
+},stop:function(){
+if(this._timer){
+clearTimeout(this._timer);
+this._timer=null;
+}
+if(this._obj){
+this._callback(-1,this._node,this._evt);
+this._obj=null;
+}
+},addKeyListener:function(_8,_9,_a,_b,_c,_d){
+if(_9.keyCode){
+_9.charOrCode=_9.keyCode;
+dojo.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");
+}else{
+if(_9.charCode){
+_9.charOrCode=String.fromCharCode(_9.charCode);
+dojo.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");
}
+}
+return [dojo.connect(_8,"onkeypress",this,function(_e){
+if(_e.charOrCode==_9.charOrCode&&(_9.ctrlKey===undefined||_9.ctrlKey==_e.ctrlKey)&&(_9.altKey===undefined||_9.altKey==_e.altKey)&&(_9.metaKey===undefined||_9.metaKey==(_e.metaKey||false))&&(_9.shiftKey===undefined||_9.shiftKey==_e.shiftKey)){
+dojo.stopEvent(_e);
+dijit.typematic.trigger(_9,_a,_8,_b,_9,_c,_d);
+}else{
+if(dijit.typematic._obj==_9){
+dijit.typematic.stop();
+}
+}
+}),dojo.connect(_8,"onkeyup",this,function(_f){
+if(dijit.typematic._obj==_9){
+dijit.typematic.stop();
+}
+})];
+},addMouseListener:function(_10,_11,_12,_13,_14){
+var dc=dojo.connect;
+return [dc(_10,"mousedown",this,function(evt){
+dojo.stopEvent(evt);
+dijit.typematic.trigger(evt,_11,_10,_12,_10,_13,_14);
+}),dc(_10,"mouseup",this,function(evt){
+dojo.stopEvent(evt);
+dijit.typematic.stop();
+}),dc(_10,"mouseout",this,function(evt){
+dojo.stopEvent(evt);
+dijit.typematic.stop();
+}),dc(_10,"mousemove",this,function(evt){
+dojo.stopEvent(evt);
+}),dc(_10,"dblclick",this,function(evt){
+dojo.stopEvent(evt);
+if(dojo.isIE){
+dijit.typematic.trigger(evt,_11,_10,_12,_10,_13,_14);
+setTimeout(dojo.hitch(this,dijit.typematic.stop),50);
+}
+})];
+},addListener:function(_15,_16,_17,_18,_19,_1a,_1b){
+return this.addKeyListener(_16,_17,_18,_19,_1a,_1b).concat(this.addMouseListener(_15,_18,_19,_1a,_1b));
+}};
+}
diff --git a/js/dojo/dijit/_base/wai.js b/js/dojo/dijit/_base/wai.js
--- a/js/dojo/dijit/_base/wai.js
+++ b/js/dojo/dijit/_base/wai.js
@@ -1,150 +1,64 @@
-if(!dojo._hasResource["dijit._base.wai"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._base.wai"] = true;
-dojo.provide("dijit._base.wai");
-
-dijit.wai = {
- onload: function(){
- // summary:
- // Function that detects if we are in high-contrast mode or not,
- // and sets up a timer to periodically confirm the value.
- // figure out the background-image style property
- // and apply that to the image.src property.
- // description:
- // This must be a named function and not an anonymous
- // function, so that the widget parsing code can make sure it
- // registers its onload function after this function.
- // DO NOT USE "this" within this function.
-
- // create div for testing if high contrast mode is on or images are turned off
- var div = document.createElement("div");
- div.id = "a11yTestNode";
- div.style.cssText = 'border: 1px solid;'
- + 'border-color:red green;'
- + 'position: absolute;'
- + 'height: 5px;'
- + 'top: -999px;'
- + 'background-image: url("' + dojo.moduleUrl("dijit", "form/templates/blank.gif") + '");';
- dojo.body().appendChild(div);
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // test it
- function check(){
- var cs = dojo.getComputedStyle(div);
- if(cs){
- var bkImg = cs.backgroundImage;
- var needsA11y = (cs.borderTopColor==cs.borderRightColor) || (bkImg != null && (bkImg == "none" || bkImg == "url(invalid-url:)" ));
- dojo[needsA11y ? "addClass" : "removeClass"](dojo.body(), "dijit_a11y");
- }
- }
- check();
- if(dojo.isIE){
- setInterval(check, 4000);
- }
- }
-};
-
-// Test if computer is in high contrast mode.
-// Make sure the a11y test runs first, before widgets are instantiated.
-if(dojo.isIE || dojo.isMoz){ // NOTE: checking in Safari messes things up
- dojo._loaders.unshift(dijit.wai.onload);
-}
-
-dojo.mixin(dijit,
-{
- hasWaiRole: function(/*Element*/ elem){
- // Summary: Return true if elem has a role attribute and false if not.
- if(elem.hasAttribute){
- return elem.hasAttribute("role");
- }else{
- return elem.getAttribute("role") ? true : false;
- }
- },
-
- getWaiRole: function(/*Element*/ elem){
- // Summary: Return the role of elem or an empty string if
- // elem does not have a role.
- var value = elem.getAttribute("role");
- if(value){
- var prefixEnd = value.indexOf(":");
- return prefixEnd == -1 ? value : value.substring(prefixEnd+1);
- }else{
- return "";
- }
- },
- setWaiRole: function(/*Element*/ elem, /*String*/ role){
- // Summary: Set the role on elem. On Firefox 2 and below, "wairole:" is
- // prepended to the provided role value.
- if(dojo.isFF && dojo.isFF < 3){
- elem.setAttribute("role", "wairole:"+role);
- }else{
- elem.setAttribute("role", role);
- }
- },
-
- removeWaiRole: function(/*Element*/ elem){
- // Summary: Removes the role attribute from elem.
- elem.removeAttribute("role");
- },
-
- hasWaiState: function(/*Element*/ elem, /*String*/ state){
- // Summary: Return true if elem has a value for the given state and
- // false if it does not.
- // On Firefox 2 and below, we check for an attribute in namespace
- // "http://www.w3.org/2005/07/aaa" with a name of the given state.
- // On all other browsers, we check for an attribute called
- // "aria-"+state.
- if(dojo.isFF && dojo.isFF < 3){
- return elem.hasAttributeNS("http://www.w3.org/2005/07/aaa", state);
- }else{
- if(elem.hasAttribute){
- return elem.hasAttribute("aria-"+state);
- }else{
- return elem.getAttribute("aria-"+state) ? true : false;
- }
- }
- },
-
- getWaiState: function(/*Element*/ elem, /*String*/ state){
- // Summary: Return the value of the requested state on elem
- // or an empty string if elem has no value for state.
- // On Firefox 2 and below, we check for an attribute in namespace
- // "http://www.w3.org/2005/07/aaa" with a name of the given state.
- // On all other browsers, we check for an attribute called
- // "aria-"+state.
- if(dojo.isFF && dojo.isFF < 3){
- return elem.getAttributeNS("http://www.w3.org/2005/07/aaa", state);
- }else{
- var value = elem.getAttribute("aria-"+state);
- return value ? value : "";
- }
- },
-
- setWaiState: function(/*Element*/ elem, /*String*/ state, /*String*/ value){
- // Summary: Set state on elem to value.
- // On Firefox 2 and below, we set an attribute in namespace
- // "http://www.w3.org/2005/07/aaa" with a name of the given state.
- // On all other browsers, we set an attribute called
- // "aria-"+state.
- if(dojo.isFF && dojo.isFF < 3){
- elem.setAttributeNS("http://www.w3.org/2005/07/aaa",
- "aaa:"+state, value);
- }else{
- elem.setAttribute("aria-"+state, value);
- }
- },
-
- removeWaiState: function(/*Element*/ elem, /*String*/ state){
- // Summary: Removes the given state from elem.
- // On Firefox 2 and below, we remove the attribute in namespace
- // "http://www.w3.org/2005/07/aaa" with a name of the given state.
- // On all other browsers, we remove the attribute called
- // "aria-"+state.
- if(dojo.isFF && dojo.isFF < 3){
- elem.removeAttributeNS("http://www.w3.org/2005/07/aaa", state);
- }else{
- elem.removeAttribute("aria-"+state);
- }
- }
-});
-
+if(!dojo._hasResource["dijit._base.wai"]){
+dojo._hasResource["dijit._base.wai"]=true;
+dojo.provide("dijit._base.wai");
+dijit.wai={onload:function(){
+var _1=dojo.create("div",{id:"a11yTestNode",style:{cssText:"border: 1px solid;"+"border-color:red green;"+"position: absolute;"+"height: 5px;"+"top: -999px;"+"background-image: url(\""+(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif"))+"\");"}},dojo.body());
+var cs=dojo.getComputedStyle(_1);
+if(cs){
+var _2=cs.backgroundImage;
+var _3=(cs.borderTopColor==cs.borderRightColor)||(_2!=null&&(_2=="none"||_2=="url(invalid-url:)"));
+dojo[_3?"addClass":"removeClass"](dojo.body(),"dijit_a11y");
+if(dojo.isIE){
+_1.outerHTML="";
+}else{
+dojo.body().removeChild(_1);
+}
+}
+}};
+if(dojo.isIE||dojo.isMoz){
+dojo._loaders.unshift(dijit.wai.onload);
}
+dojo.mixin(dijit,{_XhtmlRoles:/banner|contentinfo|definition|main|navigation|search|note|secondary|seealso/,hasWaiRole:function(_4,_5){
+var _6=this.getWaiRole(_4);
+return _5?(_6.indexOf(_5)>-1):(_6.length>0);
+},getWaiRole:function(_7){
+return dojo.trim((dojo.attr(_7,"role")||"").replace(this._XhtmlRoles,"").replace("wairole:",""));
+},setWaiRole:function(_8,_9){
+var _a=dojo.attr(_8,"role")||"";
+if(!this._XhtmlRoles.test(_a)){
+dojo.attr(_8,"role",_9);
+}else{
+if((" "+_a+" ").indexOf(" "+_9+" ")<0){
+var _b=dojo.trim(_a.replace(this._XhtmlRoles,""));
+var _c=dojo.trim(_a.replace(_b,""));
+dojo.attr(_8,"role",_c+(_c?" ":"")+_9);
+}
+}
+},removeWaiRole:function(_d,_e){
+var _f=dojo.attr(_d,"role");
+if(!_f){
+return;
+}
+if(_e){
+var t=dojo.trim((" "+_f+" ").replace(" "+_e+" "," "));
+dojo.attr(_d,"role",t);
+}else{
+_d.removeAttribute("role");
+}
+},hasWaiState:function(_10,_11){
+return _10.hasAttribute?_10.hasAttribute("aria-"+_11):!!_10.getAttribute("aria-"+_11);
+},getWaiState:function(_12,_13){
+return _12.getAttribute("aria-"+_13)||"";
+},setWaiState:function(_14,_15,_16){
+_14.setAttribute("aria-"+_15,_16);
+},removeWaiState:function(_17,_18){
+_17.removeAttribute("aria-"+_18);
+}});
+}
diff --git a/js/dojo/dijit/_base/window.js b/js/dojo/dijit/_base/window.js
--- a/js/dojo/dijit/_base/window.js
+++ b/js/dojo/dijit/_base/window.js
@@ -1,44 +1,20 @@
-if(!dojo._hasResource["dijit._base.window"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._base.window"] = true;
-dojo.provide("dijit._base.window");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dijit.getDocumentWindow = function(doc){
- // summary
- // Get window object associated with document doc
- // With Safari, there is not way to retrieve the window from the document, so we must fix it.
- if(dojo.isSafari && !doc._parentWindow){
- /*
- This is a Safari specific function that fix the reference to the parent
- window from the document object.
- */
- var fix=function(win){
- win.document._parentWindow=win;
- for(var i=0; i<win.frames.length; i++){
- fix(win.frames[i]);
- }
- }
- fix(window.top);
- }
-
- //In some IE versions (at least 6.0), document.parentWindow does not return a
- //reference to the real window object (maybe a copy), so we must fix it as well
- //We use IE specific execScript to attach the real window reference to
- //document._parentWindow for later use
- if(dojo.isIE && window !== document.parentWindow && !doc._parentWindow){
- /*
- In IE 6, only the variable "window" can be used to connect events (others
- may be only copies).
- */
- doc.parentWindow.execScript("document._parentWindow = window;", "Javascript");
- //to prevent memory leak, unset it after use
- //another possibility is to add an onUnload handler which seems overkill to me (liucougar)
- var win = doc._parentWindow;
- doc._parentWindow = null;
- return win; // Window
- }
-
- return doc._parentWindow || doc.parentWindow || doc.defaultView; // Window
+if(!dojo._hasResource["dijit._base.window"]){
+dojo._hasResource["dijit._base.window"]=true;
+dojo.provide("dijit._base.window");
+dijit.getDocumentWindow=function(_1){
+if(dojo.isIE&&window!==document.parentWindow&&!_1._parentWindow){
+_1.parentWindow.execScript("document._parentWindow = window;","Javascript");
+var _2=_1._parentWindow;
+_1._parentWindow=null;
+return _2;
}
-
+return _1._parentWindow||_1.parentWindow||_1.defaultView;
+};
}
diff --git a/js/dojo/dijit/_editor/RichText.js b/js/dojo/dijit/_editor/RichText.js
--- a/js/dojo/dijit/_editor/RichText.js
+++ b/js/dojo/dijit/_editor/RichText.js
@@ -1,1446 +1,984 @@
-if(!dojo._hasResource["dijit._editor.RichText"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._editor.RichText"] = true;
-dojo.provide("dijit._editor.RichText");
-
-dojo.require("dijit._Widget");
-dojo.require("dijit._editor.selection");
-dojo.require("dojo.i18n");
-dojo.requireLocalization("dijit", "Textarea", null, "ROOT");
-
-// used to restore content when user leaves this page then comes back
-// but do not try doing document.write if we are using xd loading.
-// document.write will only work if RichText.js is included in the dojo.js
-// file. If it is included in dojo.js and you want to allow rich text saving
-// for back/forward actions, then set djConfig.allowXdRichTextSave = true.
-if(!djConfig["useXDomain"] || djConfig["allowXdRichTextSave"]){
- if(dojo._postLoad){
- (function(){
- var savetextarea = dojo.doc.createElement('textarea');
- savetextarea.id = "dijit._editor.RichText.savedContent";
- var s = savetextarea.style;
- s.display='none';
- s.position='absolute';
- s.top="-100px";
- s.left="-100px"
- s.height="3px";
- s.width="3px";
- dojo.body().appendChild(savetextarea);
- })();
- }else{
- //dojo.body() is not available before onLoad is fired
- try {
- dojo.doc.write('<textarea id="dijit._editor.RichText.savedContent" ' +
- 'style="display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;"></textarea>');
- }catch(e){ }
- }
-}
-dojo.declare("dijit._editor.RichText", [ dijit._Widget ], {
- constructor: function(){
- // summary:
- // dijit._editor.RichText is the core of the WYSIWYG editor in dojo, which
- // provides the basic editing features. It also encapsulates the differences
- // of different js engines for various browsers
- //
- // contentPreFilters: Array
- // pre content filter function register array.
- // these filters will be executed before the actual
- // editing area get the html content
- this.contentPreFilters = [];
-
- // contentPostFilters: Array
- // post content filter function register array.
- // these will be used on the resulting html
- // from contentDomPostFilters. The resuling
- // content is the final html (returned by getValue())
- this.contentPostFilters = [];
-
- // contentDomPreFilters: Array
- // pre content dom filter function register array.
- // these filters are applied after the result from
- // contentPreFilters are set to the editing area
- this.contentDomPreFilters = [];
-
- // contentDomPostFilters: Array
- // post content dom filter function register array.
- // these filters are executed on the editing area dom
- // the result from these will be passed to contentPostFilters
- this.contentDomPostFilters = [];
-
- // editingAreaStyleSheets: Array
- // array to store all the stylesheets applied to the editing area
- this.editingAreaStyleSheets=[];
-
- this._keyHandlers = {};
- this.contentPreFilters.push(dojo.hitch(this, "_preFixUrlAttributes"));
- if(dojo.isMoz){
- this.contentPreFilters.push(this._fixContentForMoz);
- }
- //this.contentDomPostFilters.push(this._postDomFixUrlAttributes);
-
- this.onLoadDeferred = new dojo.Deferred();
- },
-
- // inheritWidth: Boolean
- // whether to inherit the parent's width or simply use 100%
- inheritWidth: false,
-
- // focusOnLoad: Boolean
- // whether focusing into this instance of richtext when page onload
- focusOnLoad: false,
-
- // name: String
- // If a save name is specified the content is saved and restored when the user
- // leave this page can come back, or if the editor is not properly closed after
- // editing has started.
- name: "",
-
- // styleSheets: String
- // semicolon (";") separated list of css files for the editing area
- styleSheets: "",
-
- // _content: String
- // temporary content storage
- _content: "",
-
- // height: String
- // set height to fix the editor at a specific height, with scrolling.
- // By default, this is 300px. If you want to have the editor always
- // resizes to accommodate the content, use AlwaysShowToolbar plugin
- // and set height=""
- height: "300px",
-
- // minHeight: String
- // The minimum height that the editor should have
- minHeight: "1em",
-
- // isClosed: Boolean
- isClosed: true,
-
- // isLoaded: Boolean
- isLoaded: false,
-
- // _SEPARATOR: String
- // used to concat contents from multiple textareas into a single string
- _SEPARATOR: "@@**%%__RICHTEXTBOUNDRY__%%**@@",
-
- // onLoadDeferred: dojo.Deferred
- // deferred which is fired when the editor finishes loading
- onLoadDeferred: null,
-
- postCreate: function(){
- // summary: init
- dojo.publish("dijit._editor.RichText::init", [this]);
- this.open();
- this.setupDefaultShortcuts();
- },
-
- setupDefaultShortcuts: function(){
- // summary: add some default key handlers
- // description:
- // Overwrite this to setup your own handlers. The default
- // implementation does not use Editor commands, but directly
- // executes the builtin commands within the underlying browser
- // support.
- var ctrl = this.KEY_CTRL;
- var exec = function(cmd, arg){
- return arguments.length == 1 ? function(){ this.execCommand(cmd); } :
- function(){ this.execCommand(cmd, arg); }
- }
- this.addKeyHandler("b", ctrl, exec("bold"));
- this.addKeyHandler("i", ctrl, exec("italic"));
- this.addKeyHandler("u", ctrl, exec("underline"));
- this.addKeyHandler("a", ctrl, exec("selectall"));
- this.addKeyHandler("s", ctrl, function () { this.save(true); });
-
- this.addKeyHandler("1", ctrl, exec("formatblock", "h1"));
- this.addKeyHandler("2", ctrl, exec("formatblock", "h2"));
- this.addKeyHandler("3", ctrl, exec("formatblock", "h3"));
- this.addKeyHandler("4", ctrl, exec("formatblock", "h4"));
-
- this.addKeyHandler("\\", ctrl, exec("insertunorderedlist"));
- if(!dojo.isIE){
- this.addKeyHandler("Z", ctrl, exec("redo"));
- }
- },
-
- // events: Array
- // events which should be connected to the underlying editing area
- events: ["onKeyPress", "onKeyDown", "onKeyUp", "onClick"],
-
- // events: Array
- // events which should be connected to the underlying editing
- // area, events in this array will be addListener with
- // capture=true
- captureEvents: [],
-
- _editorCommandsLocalized: false,
- _localizeEditorCommands: function(){
- if(this._editorCommandsLocalized){
- return;
- }
- this._editorCommandsLocalized = true;
-
- //in IE, names for blockformat is locale dependent, so we cache the values here
-
- //if the normal way fails, we try the hard way to get the list
-
- //do not use _cacheLocalBlockFormatNames here, as it will
- //trigger security warning in IE7
-
- //in the array below, ul can not come directly after ol,
- //otherwise the queryCommandValue returns Normal for it
- var formats = ['p', 'pre', 'address', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ol', 'div', 'ul'];
- var localhtml = "", format, i=0;
- while((format=formats[i++])){
- if(format.charAt(1) != 'l'){
- localhtml += "<"+format+"><span>content</span></"+format+">";
- }else{
- localhtml += "<"+format+"><li>content</li></"+format+">";
- }
- }
- //queryCommandValue returns empty if we hide editNode, so move it out of screen temporary
- var div=document.createElement('div');
- div.style.position = "absolute";
- div.style.left = "-2000px";
- div.style.top = "-2000px";
- document.body.appendChild(div);
- div.innerHTML = localhtml;
- var node = div.firstChild;
- while(node){
- dijit._editor.selection.selectElement(node.firstChild);
- dojo.withGlobal(this.window, "selectElement", dijit._editor.selection, [node.firstChild]);
- var nativename = node.tagName.toLowerCase();
- this._local2NativeFormatNames[nativename] = document.queryCommandValue("formatblock");//this.queryCommandValue("formatblock");
- this._native2LocalFormatNames[this._local2NativeFormatNames[nativename]] = nativename;
- node = node.nextSibling;
- }
- document.body.removeChild(div);
- },
-
- open: function(/*DomNode?*/element){
- // summary:
- // Transforms the node referenced in this.domNode into a rich text editing
- // node. This will result in the creation and replacement with an <iframe>
- // if designMode(FF)/contentEditable(IE) is used.
-
- if((!this.onLoadDeferred)||(this.onLoadDeferred.fired >= 0)){
- this.onLoadDeferred = new dojo.Deferred();
- }
-
- if(!this.isClosed){ this.close(); }
- dojo.publish("dijit._editor.RichText::open", [ this ]);
-
- this._content = "";
- if((arguments.length == 1)&&(element["nodeName"])){ this.domNode = element; } // else unchanged
-
- if( (this.domNode["nodeName"])&&
- (this.domNode.nodeName.toLowerCase() == "textarea")){
- // if we were created from a textarea, then we need to create a
- // new editing harness node.
- this.textarea = this.domNode;
- this.name=this.textarea.name;
- var html = this._preFilterContent(this.textarea.value);
- this.domNode = dojo.doc.createElement("div");
- this.domNode.setAttribute('widgetId',this.id);
- this.textarea.removeAttribute('widgetId');
- this.domNode.cssText = this.textarea.cssText;
- this.domNode.className += " "+this.textarea.className;
- dojo.place(this.domNode, this.textarea, "before");
- var tmpFunc = dojo.hitch(this, function(){
- //some browsers refuse to submit display=none textarea, so
- //move the textarea out of screen instead
- with(this.textarea.style){
- display = "block";
- position = "absolute";
- left = top = "-1000px";
-
- if(dojo.isIE){ //nasty IE bug: abnormal formatting if overflow is not hidden
- this.__overflow = overflow;
- overflow = "hidden";
- }
- }
- });
- if(dojo.isIE){
- setTimeout(tmpFunc, 10);
- }else{
- tmpFunc();
- }
-
- // this.domNode.innerHTML = html;
-
-// if(this.textarea.form){
-// // FIXME: port: this used to be before advice!!!
-// dojo.connect(this.textarea.form, "onsubmit", this, function(){
-// // FIXME: should we be calling close() here instead?
-// this.textarea.value = this.getValue();
-// });
-// }
- }else{
- var html = this._preFilterContent(this.getNodeChildrenHtml(this.domNode));
- this.domNode.innerHTML = '';
- }
- if(html == ""){ html = "&nbsp;"; }
-
- var content = dojo.contentBox(this.domNode);
- // var content = dojo.contentBox(this.srcNodeRef);
- this._oldHeight = content.h;
- this._oldWidth = content.w;
-
- this.savedContent = html;
-
- // If we're a list item we have to put in a blank line to force the
- // bullet to nicely align at the top of text
- if( (this.domNode["nodeName"]) &&
- (this.domNode.nodeName == "LI") ){
- this.domNode.innerHTML = " <br>";
- }
-
- this.editingArea = dojo.doc.createElement("div");
- this.domNode.appendChild(this.editingArea);
-
- if(this.name != "" && (!djConfig["useXDomain"] || djConfig["allowXdRichTextSave"])){
- var saveTextarea = dojo.byId("dijit._editor.RichText.savedContent");
- if(saveTextarea.value != ""){
- var datas = saveTextarea.value.split(this._SEPARATOR), i=0, dat;
- while((dat=datas[i++])){
- var data = dat.split(":");
- if(data[0] == this.name){
- html = data[1];
- datas.splice(i, 1);
- break;
- }
- }
- }
-
- // FIXME: need to do something different for Opera/Safari
- dojo.connect(window, "onbeforeunload", this, "_saveContent");
- // dojo.connect(window, "onunload", this, "_saveContent");
- }
-
- this.isClosed = false;
- // Safari's selections go all out of whack if we do it inline,
- // so for now IE is our only hero
- //if (typeof document.body.contentEditable != "undefined") {
- if(dojo.isIE || dojo.isSafari || dojo.isOpera){ // contentEditable, easy
- var ifr = this.iframe = dojo.doc.createElement('iframe');
- ifr.src = 'javascript:void(0)';
- this.editorObject = ifr;
- ifr.style.border = "none";
- ifr.style.width = "100%";
- ifr.frameBorder = 0;
-// ifr.style.scrolling = this.height ? "auto" : "vertical";
- this.editingArea.appendChild(ifr);
- this.window = ifr.contentWindow;
- this.document = this.window.document;
- this.document.open();
- this.document.write(this._getIframeDocTxt(html));
- this.document.close();
-
- if(dojo.isIE >= 7){
- if(this.height){
- ifr.style.height = this.height;
- }
- if(this.minHeight){
- ifr.style.minHeight = this.minHeight;
- }
- }else{
- ifr.style.height = this.height ? this.height : this.minHeight;
- }
-
- if(dojo.isIE){
- this._localizeEditorCommands();
- }
-
- this.onLoad();
- }else{ // designMode in iframe
- this._drawIframe(html);
- }
-
- // TODO: this is a guess at the default line-height, kinda works
- if(this.domNode.nodeName == "LI"){ this.domNode.lastChild.style.marginTop = "-1.2em"; }
- this.domNode.className += " RichTextEditable";
- },
-
- //static cache variables shared among all instance of this class
- _local2NativeFormatNames: {},
- _native2LocalFormatNames: {},
- _localizedIframeTitles: null,
-
- _getIframeDocTxt: function(/* String */ html){
- var _cs = dojo.getComputedStyle(this.domNode);
- if(!this.height && !dojo.isMoz){
- html="<div>"+html+"</div>";
- }
- var font = [ _cs.fontWeight, _cs.fontSize, _cs.fontFamily ].join(" ");
-
- // line height is tricky - applying a units value will mess things up.
- // if we can't get a non-units value, bail out.
- var lineHeight = _cs.lineHeight;
- if(lineHeight.indexOf("px") >= 0){
- lineHeight = parseFloat(lineHeight)/parseFloat(_cs.fontSize);
- // console.debug(lineHeight);
- }else if(lineHeight.indexOf("em")>=0){
- lineHeight = parseFloat(lineHeight);
- }else{
- lineHeight = "1.0";
- }
- return [
- this.isLeftToRight() ? "<html><head>" : "<html dir='rtl'><head>",
- (dojo.isMoz ? "<title>" + this._localizedIframeTitles.iframeEditTitle + "</title>" : ""),
- "<style>",
- "body,html {",
- " background:transparent;",
- " padding: 0;",
- " margin: 0;",
- "}",
- // TODO: left positioning will cause contents to disappear out of view
- // if it gets too wide for the visible area
- "body{",
- " top:0px; left:0px; right:0px;",
- ((this.height||dojo.isOpera) ? "" : "position: fixed;"),
- " font:", font, ";",
- // FIXME: IE 6 won't understand min-height?
- " min-height:", this.minHeight, ";",
- " line-height:", lineHeight,
- "}",
- "p{ margin: 1em 0 !important; }",
- (this.height ?
- "" : "body,html{overflow-y:hidden;/*for IE*/} body > div {overflow-x:auto;/*for FF to show vertical scrollbar*/}"
- ),
- "li > ul:-moz-first-node, li > ol:-moz-first-node{ padding-top: 1.2em; } ",
- "li{ min-height:1.2em; }",
- "</style>",
- this._applyEditingAreaStyleSheets(),
- "</head><body>"+html+"</body></html>"
- ].join(""); // String
- },
-
- _drawIframe: function(/*String*/html){
- // summary:
- // Draws an iFrame using the existing one if one exists.
- // Used by Mozilla, Safari, and Opera
-
- if(!this.iframe){
- var ifr = this.iframe = dojo.doc.createElement("iframe");
- // this.iframe.src = "about:blank";
- // document.body.appendChild(this.iframe);
- // console.debug(this.iframe.contentDocument.open());
- // dojo.body().appendChild(this.iframe);
- var ifrs = ifr.style;
- // ifrs.border = "1px solid black";
- ifrs.border = "none";
- ifrs.lineHeight = "0"; // squash line height
- ifrs.verticalAlign = "bottom";
-// ifrs.scrolling = this.height ? "auto" : "vertical";
- this.editorObject = this.iframe;
- // get screen reader text for mozilla here, too
- this._localizedIframeTitles = dojo.i18n.getLocalization("dijit", "Textarea");
- // need to find any associated label element and update iframe document title
- var label=dojo.query('label[for="'+this.id+'"]');
- if(label.length){
- this._localizedIframeTitles.iframeEditTitle = label[0].innerHTML + " " + this._localizedIframeTitles.iframeEditTitle;
- }
- }
- // opera likes this to be outside the with block
- // this.iframe.src = "javascript:void(0)";//dojo.uri.dojoUri("src/widget/templates/richtextframe.html") + ((dojo.doc.domain != currentDomain) ? ("#"+dojo.doc.domain) : "");
- this.iframe.style.width = this.inheritWidth ? this._oldWidth : "100%";
-
- if(this.height){
- this.iframe.style.height = this.height;
- }else{
- this.iframe.height = this._oldHeight;
- }
-
- if(this.textarea){
- var tmpContent = this.srcNodeRef;
- }else{
- var tmpContent = dojo.doc.createElement('div');
- tmpContent.style.display="none";
- tmpContent.innerHTML = html;
- //append tmpContent to under the current domNode so that the margin
- //calculation below is correct
- this.editingArea.appendChild(tmpContent);
- }
-
- this.editingArea.appendChild(this.iframe);
-
- //do we want to show the content before the editing area finish loading here?
- //if external style sheets are used for the editing area, the appearance now
- //and after loading of the editing area won't be the same (and padding/margin
- //calculation above may not be accurate)
- // tmpContent.style.display = "none";
- // this.editingArea.appendChild(this.iframe);
-
- var _iframeInitialized = false;
- // console.debug(this.iframe);
- // var contentDoc = this.iframe.contentWindow.document;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // note that on Safari lower than 420+, we have to get the iframe
- // by ID in order to get something w/ a contentDocument property
-
- var contentDoc = this.iframe.contentDocument;
- contentDoc.open();
- contentDoc.write(this._getIframeDocTxt(html));
- contentDoc.close();
-
- // now we wait for onload. Janky hack!
- var ifrFunc = dojo.hitch(this, function(){
- if(!_iframeInitialized){
- _iframeInitialized = true;
- }else{ return; }
- if(!this.editNode){
- try{
- if(this.iframe.contentWindow){
- this.window = this.iframe.contentWindow;
- this.document = this.iframe.contentWindow.document
- }else if(this.iframe.contentDocument){
- // for opera
- this.window = this.iframe.contentDocument.window;
- this.document = this.iframe.contentDocument;
- }
- if(!this.document.body){
- throw 'Error';
- }
- }catch(e){
- setTimeout(ifrFunc,500);
- _iframeInitialized = false;
- return;
- }
-
- dojo._destroyElement(tmpContent);
- this.document.designMode = "on";
- // try{
- // this.document.designMode = "on";
- // }catch(e){
- // this._tryDesignModeOnClick=true;
- // }
-
- this.onLoad();
- }else{
- dojo._destroyElement(tmpContent);
- this.editNode.innerHTML = html;
- this.onDisplayChanged();
- }
- this._preDomFilterContent(this.editNode);
- });
-
- ifrFunc();
- },
-
- _applyEditingAreaStyleSheets: function(){
- // summary:
- // apply the specified css files in styleSheets
- var files = [];
- if(this.styleSheets){
- files = this.styleSheets.split(';');
- this.styleSheets = '';
- }
-
- //empty this.editingAreaStyleSheets here, as it will be filled in addStyleSheet
- files = files.concat(this.editingAreaStyleSheets);
- this.editingAreaStyleSheets = [];
-
- var text='', i=0, url;
- while((url=files[i++])){
- var abstring = (new dojo._Url(dojo.global.location, url)).toString();
- this.editingAreaStyleSheets.push(abstring);
- text += '<link rel="stylesheet" type="text/css" href="'+abstring+'"/>'
- }
- return text;
- },
-
- addStyleSheet: function(/*dojo._Url*/uri){
- // summary:
- // add an external stylesheet for the editing area
- // uri: a dojo.uri.Uri pointing to the url of the external css file
- var url=uri.toString();
-
- //if uri is relative, then convert it to absolute so that it can be resolved correctly in iframe
- if(url.charAt(0) == '.' || (url.charAt(0) != '/' && !uri.host)){
- url = (new dojo._Url(dojo.global.location, url)).toString();
- }
-
- if(dojo.indexOf(this.editingAreaStyleSheets, url) > -1){
- console.debug("dijit._editor.RichText.addStyleSheet: Style sheet "+url+" is already applied to the editing area!");
- return;
- }
-
- this.editingAreaStyleSheets.push(url);
- if(this.document.createStyleSheet){ //IE
- this.document.createStyleSheet(url);
- }else{ //other browser
- var head = this.document.getElementsByTagName("head")[0];
- var stylesheet = this.document.createElement("link");
- with(stylesheet){
- rel="stylesheet";
- type="text/css";
- href=url;
- }
- head.appendChild(stylesheet);
- }
- },
-
- removeStyleSheet: function(/*dojo._Url*/uri){
- // summary:
- // remove an external stylesheet for the editing area
- var url=uri.toString();
- //if uri is relative, then convert it to absolute so that it can be resolved correctly in iframe
- if(url.charAt(0) == '.' || (url.charAt(0) != '/' && !uri.host)){
- url = (new dojo._Url(dojo.global.location, url)).toString();
- }
- var index = dojo.indexOf(this.editingAreaStyleSheets, url);
- if(index == -1){
- console.debug("dijit._editor.RichText.removeStyleSheet: Style sheet "+url+" is not applied to the editing area so it can not be removed!");
- return;
- }
- delete this.editingAreaStyleSheets[index];
- dojo.withGlobal(this.window,'query', dojo, ['link:[href="'+url+'"]']).orphan()
- },
-
- disabled: false,
- _mozSettingProps: ['styleWithCSS','insertBrOnReturn'],
- setDisabled: function(/*Boolean*/ disabled){
- if(dojo.isIE || dojo.isSafari || dojo.isOpera){
- this.editNode.contentEditable=!disabled;
- }else{ //moz
- if(disabled){
- this._mozSettings=[false,this.blockNodeForEnter==='BR'];
- }
- this.document.designMode=(disabled?'off':'on');
- if(!disabled){
- dojo.forEach(this._mozSettingProps, function(s,i){
- this.document.execCommand(s,false,this._mozSettings[i]);
- },this);
- }
-// this.document.execCommand('contentReadOnly', false, disabled);
-// if(disabled){
-// this.blur(); //to remove the blinking caret
-// }
-//
- }
- this.disabled=disabled;
- },
-
-/* Event handlers
- *****************/
-
- _isResized: function(){ return false; },
-
- onLoad: function(/* Event */ e){
- // summary: handler after the content of the document finishes loading
- this.isLoaded = true;
- if(this.height || dojo.isMoz){
- this.editNode=this.document.body;
- }else{
- this.editNode=this.document.body.firstChild;
- }
- this.editNode.contentEditable = true; //should do no harm in FF
- this._preDomFilterContent(this.editNode);
-
- var events=this.events.concat(this.captureEvents),i=0,et;
- while((et=events[i++])){
- this.connect(this.document, et.toLowerCase(), et);
- }
- if(!dojo.isIE){
- try{ // sanity check for Mozilla
-// this.document.execCommand("useCSS", false, true); // old moz call
- this.document.execCommand("styleWithCSS", false, false); // new moz call
- //this.document.execCommand("insertBrOnReturn", false, false); // new moz call
- }catch(e2){ }
- // FIXME: when scrollbars appear/disappear this needs to be fired
- }else{ // IE contentEditable
- // give the node Layout on IE
- this.editNode.style.zoom = 1.0;
- }
-
- if(this.focusOnLoad){
- this.focus();
- }
-
- this.onDisplayChanged(e);
- if(this.onLoadDeferred){
- this.onLoadDeferred.callback(true);
- }
- },
-
- onKeyDown: function(/* Event */ e){
- // summary: Fired on keydown
-
-// console.info("onkeydown:", e.keyCode);
-
- // we need this event at the moment to get the events from control keys
- // such as the backspace. It might be possible to add this to Dojo, so that
- // keyPress events can be emulated by the keyDown and keyUp detection.
- if(dojo.isIE){
- if(e.keyCode === dojo.keys.BACKSPACE && this.document.selection.type === "Control"){
- // IE has a bug where if a non-text object is selected in the editor,
- // hitting backspace would act as if the browser's back button was
- // clicked instead of deleting the object. see #1069
- dojo.stopEvent(e);
- this.execCommand("delete");
- }else if( (65 <= e.keyCode&&e.keyCode <= 90) ||
- (e.keyCode>=37&&e.keyCode<=40) // FIXME: get this from connect() instead!
- ){ //arrow keys
- e.charCode = e.keyCode;
- this.onKeyPress(e);
- }
- }
- else if (dojo.isMoz){
- if(e.keyCode == dojo.keys.TAB && !e.shiftKey && !e.ctrlKey && !e.altKey && this.iframe){
- // update iframe document title for screen reader
- this.iframe.contentDocument.title = this._localizedIframeTitles.iframeFocusTitle;
-
- // Place focus on the iframe. A subsequent tab or shift tab will put focus
- // on the correct control.
- this.iframe.focus(); // this.focus(); won't work
- dojo.stopEvent(e);
- }else if (e.keyCode == dojo.keys.TAB && e.shiftKey){
- // if there is a toolbar, set focus to it, otherwise ignore
- if (this.toolbar){
- this.toolbar.focus();
- }
- dojo.stopEvent(e);
- }
- }
- },
-
- onKeyUp: function(e){
- // summary: Fired on keyup
- return;
- },
-
- KEY_CTRL: 1,
- KEY_SHIFT: 2,
-
- onKeyPress: function(e){
- // summary: Fired on keypress
-
-// console.info("onkeypress:", e.keyCode);
-
- // handle the various key events
- var modifiers = e.ctrlKey ? this.KEY_CTRL : 0 | e.shiftKey?this.KEY_SHIFT : 0;
-
- var key = e.keyChar||e.keyCode;
- if(this._keyHandlers[key]){
- // console.debug("char:", e.key);
- var handlers = this._keyHandlers[key], i = 0, h;
- while((h = handlers[i++])){
- if(modifiers == h.modifiers){
- if(!h.handler.apply(this,arguments)){
- e.preventDefault();
- }
- break;
- }
- }
- }
-
- // function call after the character has been inserted
- setTimeout(dojo.hitch(this, function(){
- this.onKeyPressed(e);
- }), 1);
- },
-
- addKeyHandler: function(/*String*/key, /*Int*/modifiers, /*Function*/handler){
- // summary: add a handler for a keyboard shortcut
- if(!dojo.isArray(this._keyHandlers[key])){ this._keyHandlers[key] = []; }
- this._keyHandlers[key].push({
- modifiers: modifiers || 0,
- handler: handler
- });
- },
-
- onKeyPressed: function(/*Event*/e){
- this.onDisplayChanged(/*e*/); // can't pass in e
- },
-
- onClick: function(/*Event*/e){
-// console.debug('onClick',this._tryDesignModeOnClick);
-// if(this._tryDesignModeOnClick){
-// try{
-// this.document.designMode='on';
-// this._tryDesignModeOnClick=false;
-// }catch(e){}
-// }
- this.onDisplayChanged(e); },
- _onBlur: function(e){
- var _c=this.getValue(true);
- if(_c!=this.savedContent){
- this.onChange(_c);
- this.savedContent=_c;
- }
- if (dojo.isMoz && this.iframe){
- this.iframe.contentDocument.title = this._localizedIframeTitles.iframeEditTitle;
- }
-// console.info('_onBlur')
- },
- _initialFocus: true,
- _onFocus: function(/*Event*/e){
-// console.info('_onFocus')
- // summary: Fired on focus
- if( (dojo.isMoz)&&(this._initialFocus) ){
- this._initialFocus = false;
- if(this.editNode.innerHTML.replace(/^\s+|\s+$/g, "") == "&nbsp;"){
- this.placeCursorAtStart();
-// this.execCommand("selectall");
-// this.window.getSelection().collapseToStart();
- }
- }
- },
-
- blur: function(){
- // summary: remove focus from this instance
- if(this.iframe){
- this.window.blur();
- }else if(this.editNode){
- this.editNode.blur();
- }
- },
-
- focus: function(){
- // summary: move focus to this instance
- if(this.iframe && !dojo.isIE){
- dijit.focus(this.iframe);
- }else if(this.editNode && this.editNode.focus){
- // editNode may be hidden in display:none div, lets just punt in this case
- dijit.focus(this.editNode);
- }else{
- console.debug("Have no idea how to focus into the editor!");
- }
- },
-
-// _lastUpdate: 0,
- updateInterval: 200,
- _updateTimer: null,
- onDisplayChanged: function(/*Event*/e){
- // summary:
- // This event will be fired everytime the display context
- // changes and the result needs to be reflected in the UI.
- // description:
- // If you don't want to have update too often,
- // onNormalizedDisplayChanged should be used instead
-
-// var _t=new Date();
- if(!this._updateTimer){
-// this._lastUpdate=_t;
- if(this._updateTimer){
- clearTimeout(this._updateTimer);
- }
- this._updateTimer=setTimeout(dojo.hitch(this,this.onNormalizedDisplayChanged),this.updateInterval);
- }
- },
- onNormalizedDisplayChanged: function(){
- // summary:
- // This event is fired every updateInterval ms or more
- // description:
- // If something needs to happen immidiately after a
- // user change, please use onDisplayChanged instead
- this._updateTimer=null;
- },
- onChange: function(newContent){
- // summary:
- // this is fired if and only if the editor loses focus and
- // the content is changed
-
-// console.log('onChange',newContent);
- },
- _normalizeCommand: function(/*String*/cmd){
- // summary:
- // Used as the advice function by dojo.connect to map our
- // normalized set of commands to those supported by the target
- // browser
-
- var command = cmd.toLowerCase();
- if(command == "formatblock"){
- if(dojo.isSafari){ command = "heading"; }
- }else if(command == "hilitecolor" && !dojo.isMoz){
- command = "backcolor";
- }
-
- return command;
- },
-
- queryCommandAvailable: function(/*String*/command){
- // summary:
- // Tests whether a command is supported by the host. Clients SHOULD check
- // whether a command is supported before attempting to use it, behaviour
- // for unsupported commands is undefined.
- // command: The command to test for
- var ie = 1;
- var mozilla = 1 << 1;
- var safari = 1 << 2;
- var opera = 1 << 3;
- var safari420 = 1 << 4;
-
- var gt420 = dojo.isSafari;
-
- function isSupportedBy(browsers){
- return {
- ie: Boolean(browsers & ie),
- mozilla: Boolean(browsers & mozilla),
- safari: Boolean(browsers & safari),
- safari420: Boolean(browsers & safari420),
- opera: Boolean(browsers & opera)
- }
- }
-
- var supportedBy = null;
-
- switch(command.toLowerCase()){
- case "bold": case "italic": case "underline":
- case "subscript": case "superscript":
- case "fontname": case "fontsize":
- case "forecolor": case "hilitecolor":
- case "justifycenter": case "justifyfull": case "justifyleft":
- case "justifyright": case "delete": case "selectall":
- supportedBy = isSupportedBy(mozilla | ie | safari | opera);
- break;
-
- case "createlink": case "unlink": case "removeformat":
- case "inserthorizontalrule": case "insertimage":
- case "insertorderedlist": case "insertunorderedlist":
- case "indent": case "outdent": case "formatblock":
- case "inserthtml": case "undo": case "redo": case "strikethrough":
- supportedBy = isSupportedBy(mozilla | ie | opera | safari420);
- break;
-
- case "blockdirltr": case "blockdirrtl":
- case "dirltr": case "dirrtl":
- case "inlinedirltr": case "inlinedirrtl":
- supportedBy = isSupportedBy(ie);
- break;
- case "cut": case "copy": case "paste":
- supportedBy = isSupportedBy( ie | mozilla | safari420);
- break;
-
- case "inserttable":
- supportedBy = isSupportedBy(mozilla | ie);
- break;
-
- case "insertcell": case "insertcol": case "insertrow":
- case "deletecells": case "deletecols": case "deleterows":
- case "mergecells": case "splitcell":
- supportedBy = isSupportedBy(ie | mozilla);
- break;
-
- default: return false;
- }
-
- return (dojo.isIE && supportedBy.ie) ||
- (dojo.isMoz && supportedBy.mozilla) ||
- (dojo.isSafari && supportedBy.safari) ||
- (gt420 && supportedBy.safari420) ||
- (dojo.isOpera && supportedBy.opera); // Boolean return true if the command is supported, false otherwise
- },
-
- execCommand: function(/*String*/command, argument){
- // summary: Executes a command in the Rich Text area
- // command: The command to execute
- // argument: An optional argument to the command
- var returnValue;
-
- //focus() is required for IE to work
- //In addition, focus() makes sure after the execution of
- //the command, the editor receives the focus as expected
- this.focus();
-
- command = this._normalizeCommand(command);
- if(argument != undefined){
- if(command == "heading"){
- throw new Error("unimplemented");
- }else if((command == "formatblock") && dojo.isIE){
- argument = '<'+argument+'>';
- }
- }
- if(command == "inserthtml"){
- //TODO: we shall probably call _preDomFilterContent here as well
- argument=this._preFilterContent(argument);
- if(dojo.isIE){
- var insertRange = this.document.selection.createRange();
- insertRange.pasteHTML(argument);
- insertRange.select();
- //insertRange.collapse(true);
- returnValue=true;
- }else if(dojo.isMoz && !argument.length){
- //mozilla can not inserthtml an empty html to delete current selection
- //so we delete the selection instead in this case
- dojo.withGlobal(this.window,'remove',dijit._editor.selection); // FIXME
- returnValue=true;
- }else{
- returnValue=this.document.execCommand(command, false, argument);
- }
- }else if(
- (command == "unlink")&&
- (this.queryCommandEnabled("unlink"))&&
- (dojo.isMoz || dojo.isSafari)
- ){
- // fix up unlink in Mozilla to unlink the link and not just the selection
-
- // grab selection
- // Mozilla gets upset if we just store the range so we have to
- // get the basic properties and recreate to save the selection
- var selection = this.window.getSelection();
- // var selectionRange = selection.getRangeAt(0);
- // var selectionStartContainer = selectionRange.startContainer;
- // var selectionStartOffset = selectionRange.startOffset;
- // var selectionEndContainer = selectionRange.endContainer;
- // var selectionEndOffset = selectionRange.endOffset;
-
- // select our link and unlink
- var a = dojo.withGlobal(this.window, "getAncestorElement",dijit._editor.selection, ['a']);
- dojo.withGlobal(this.window, "selectElement", dijit._editor.selection, [a]);
-
- returnValue=this.document.execCommand("unlink", false, null);
- }else if((command == "hilitecolor")&&(dojo.isMoz)){
-// // mozilla doesn't support hilitecolor properly when useCSS is
-// // set to false (bugzilla #279330)
-
- this.document.execCommand("styleWithCSS", false, true);
- returnValue = this.document.execCommand(command, false, argument);
- this.document.execCommand("styleWithCSS", false, false);
-
- }else if((dojo.isIE)&&( (command == "backcolor")||(command == "forecolor") )){
- // Tested under IE 6 XP2, no problem here, comment out
- // IE weirdly collapses ranges when we exec these commands, so prevent it
-// var tr = this.document.selection.createRange();
- argument = arguments.length > 1 ? argument : null;
- returnValue = this.document.execCommand(command, false, argument);
-
- // timeout is workaround for weird IE behavior were the text
- // selection gets correctly re-created, but subsequent input
- // apparently isn't bound to it
-// setTimeout(function(){tr.select();}, 1);
- }else{
- argument = arguments.length > 1 ? argument : null;
-// if(dojo.isMoz){
-// this.document = this.iframe.contentWindow.document
-// }
-
- if(argument || command!="createlink"){
- returnValue = this.document.execCommand(command, false, argument);
- }
- }
-
- this.onDisplayChanged();
- return returnValue;
- },
-
- queryCommandEnabled: function(/*String*/command){
- // summary: check whether a command is enabled or not
- command = this._normalizeCommand(command);
- if(dojo.isMoz || dojo.isSafari){
- if(command == "unlink"){ // mozilla returns true always
- // console.debug(dojo.withGlobal(this.window, "hasAncestorElement",dijit._editor.selection, ['a']));
- return dojo.withGlobal(this.window, "hasAncestorElement",dijit._editor.selection, ['a']);
- }else if (command == "inserttable"){
- return true;
- }
- }
- //see #4109
- if(dojo.isSafari)
- if(command == "copy"){
- command="cut";
- }else if(command == "paste"){
- return true;
- }
-
- // return this.document.queryCommandEnabled(command);
- var elem = (dojo.isIE) ? this.document.selection.createRange() : this.document;
- return elem.queryCommandEnabled(command);
- },
-
- queryCommandState: function(command){
- // summary: check the state of a given command
- command = this._normalizeCommand(command);
- return this.document.queryCommandState(command);
- },
-
- queryCommandValue: function(command){
- // summary: check the value of a given command
- command = this._normalizeCommand(command);
- if(dojo.isIE && command == "formatblock"){
- return this._local2NativeFormatNames[this.document.queryCommandValue(command)];
- }
- return this.document.queryCommandValue(command);
- },
-
- // Misc.
-
- placeCursorAtStart: function(){
- // summary:
- // place the cursor at the start of the editing area
- this.focus();
-
- //see comments in placeCursorAtEnd
- var isvalid=false;
- if(dojo.isMoz){
- var first=this.editNode.firstChild;
- while(first){
- if(first.nodeType == 3){
- if(first.nodeValue.replace(/^\s+|\s+$/g, "").length>0){
- isvalid=true;
- dojo.withGlobal(this.window, "selectElement", dijit._editor.selection, [first]);
- break;
- }
- }else if(first.nodeType == 1){
- isvalid=true;
- dojo.withGlobal(this.window, "selectElementChildren",dijit._editor.selection, [first]);
- break;
- }
- first = first.nextSibling;
- }
- }else{
- isvalid=true;
- dojo.withGlobal(this.window, "selectElementChildren",dijit._editor.selection, [this.editNode]);
- }
- if(isvalid){
- dojo.withGlobal(this.window, "collapse", dijit._editor.selection, [true]);
- }
- },
-
- placeCursorAtEnd: function(){
- // summary:
- // place the cursor at the end of the editing area
- this.focus();
-
- //In mozilla, if last child is not a text node, we have to use selectElementChildren on this.editNode.lastChild
- //otherwise the cursor would be placed at the end of the closing tag of this.editNode.lastChild
- var isvalid=false;
- if(dojo.isMoz){
- var last=this.editNode.lastChild;
- while(last){
- if(last.nodeType == 3){
- if(last.nodeValue.replace(/^\s+|\s+$/g, "").length>0){
- isvalid=true;
- dojo.withGlobal(this.window, "selectElement",dijit._editor.selection, [last]);
- break;
- }
- }else if(last.nodeType == 1){
- isvalid=true;
- if(last.lastChild){
- dojo.withGlobal(this.window, "selectElement",dijit._editor.selection, [last.lastChild]);
- }else{
- dojo.withGlobal(this.window, "selectElement",dijit._editor.selection, [last]);
- }
- break;
- }
- last = last.previousSibling;
- }
- }else{
- isvalid=true;
- dojo.withGlobal(this.window, "selectElementChildren",dijit._editor.selection, [this.editNode]);
- }
- if(isvalid){
- dojo.withGlobal(this.window, "collapse", dijit._editor.selection, [false]);
- }
- },
-
- getValue: function(/*Boolean?*/nonDestructive){
- // summary:
- // return the current content of the editing area (post filters are applied)
- if(this.textarea){
- if(this.isClosed || !this.isLoaded){
- return this.textarea.value;
- }
- }
-
- return this._postFilterContent(null, nonDestructive);
- },
-
- setValue: function(/*String*/html){
- // summary:
- // this function set the content. No undo history is preserved
- if(this.textarea && (this.isClosed || !this.isLoaded)){
- this.textarea.value=html;
- }else{
- html = this._preFilterContent(html);
- if(this.isClosed){
- this.domNode.innerHTML = html;
- this._preDomFilterContent(this.domNode);
- }else{
- this.editNode.innerHTML = html;
- this._preDomFilterContent(this.editNode);
- }
- }
- },
-
- replaceValue: function(/*String*/html){
- // summary:
- // this function set the content while trying to maintain the undo stack
- // (now only works fine with Moz, this is identical to setValue in all
- // other browsers)
- if(this.isClosed){
- this.setValue(html);
- }else if(this.window && this.window.getSelection && !dojo.isMoz){ // Safari
- // look ma! it's a totally f'd browser!
- this.setValue(html);
- }else if(this.window && this.window.getSelection){ // Moz
- html = this._preFilterContent(html);
- this.execCommand("selectall");
- if(dojo.isMoz && !html){ html = "&nbsp;" }
- this.execCommand("inserthtml", html);
- this._preDomFilterContent(this.editNode);
- }else if(this.document && this.document.selection){//IE
- //In IE, when the first element is not a text node, say
- //an <a> tag, when replacing the content of the editing
- //area, the <a> tag will be around all the content
- //so for now, use setValue for IE too
- this.setValue(html);
- }
- },
-
- _preFilterContent: function(/*String*/html){
- // summary:
- // filter the input before setting the content of the editing area
- var ec = html;
- dojo.forEach(this.contentPreFilters, function(ef){ if(ef){ ec = ef(ec); } });
- return ec;
- },
- _preDomFilterContent: function(/*DomNode*/dom){
- // summary:
- // filter the input
- dom = dom || this.editNode;
- dojo.forEach(this.contentDomPreFilters, function(ef){
- if(ef && dojo.isFunction(ef)){
- ef(dom);
- }
- }, this);
- },
-
- _postFilterContent: function(/*DomNode|DomNode[]?*/dom,/*Boolean?*/nonDestructive){
- // summary:
- // filter the output after getting the content of the editing area
- dom = dom || this.editNode;
- if(this.contentDomPostFilters.length){
- if(nonDestructive && dom['cloneNode']){
- dom = dom.cloneNode(true);
- }
- dojo.forEach(this.contentDomPostFilters, function(ef){
- dom = ef(dom);
- });
- }
- var ec = this.getNodeChildrenHtml(dom);
- if(!ec.replace(/^(?:\s|\xA0)+/g, "").replace(/(?:\s|\xA0)+$/g,"").length){ ec = ""; }
-
- // if(dojo.isIE){
- // //removing appended <P>&nbsp;</P> for IE
- // ec = ec.replace(/(?:<p>&nbsp;</p>[\n\r]*)+$/i,"");
- // }
- dojo.forEach(this.contentPostFilters, function(ef){
- ec = ef(ec);
- });
-
- return ec;
- },
-
- _saveContent: function(/*Event*/e){
- // summary:
- // Saves the content in an onunload event if the editor has not been closed
- var saveTextarea = dojo.byId("dijit._editor.RichText.savedContent");
- saveTextarea.value += this._SEPARATOR + this.name + ":" + this.getValue();
- },
-
-
- escapeXml: function(/*String*/str, /*Boolean*/noSingleQuotes){
- //summary:
- // Adds escape sequences for special characters in XML: &<>"'
- // Optionally skips escapes for single quotes
- str = str.replace(/&/gm, "&amp;").replace(/</gm, "&lt;").replace(/>/gm, "&gt;").replace(/"/gm, "&quot;");
- if(!noSingleQuotes){
- str = str.replace(/'/gm, "&#39;");
- }
- return str; // string
- },
-
- getNodeHtml: function(/* DomNode */node){
- switch(node.nodeType){
- case 1: //element node
- var output = '<'+node.tagName.toLowerCase();
- if(dojo.isMoz){
- if(node.getAttribute('type')=='_moz'){
- node.removeAttribute('type');
- }
- if(node.getAttribute('_moz_dirty') != undefined){
- node.removeAttribute('_moz_dirty');
- }
- }
- //store the list of attributes and sort it to have the
- //attributes appear in the dictionary order
- var attrarray = [];
- if(dojo.isIE){
- var s = node.outerHTML;
- s = s.substr(0,s.indexOf('>'));
- s = s.replace(/(?:['"])[^"']*\1/g, '');//to make the following regexp safe
- var reg = /([^\s=]+)=/g;
- var m, key;
- while((m = reg.exec(s)) != undefined){
- key=m[1];
- if(key.substr(0,3) != '_dj'){
- if(key == 'src' || key == 'href'){
- if(node.getAttribute('_djrealurl')){
- attrarray.push([key,node.getAttribute('_djrealurl')]);
- continue;
- }
- }
- if(key == 'class'){
- attrarray.push([key,node.className]);
- }else{
- attrarray.push([key,node.getAttribute(key)]);
- }
- }
- }
- }else{
- var attr, i=0, attrs = node.attributes;
- while((attr=attrs[i++])){
- //ignore all attributes starting with _dj which are
- //internal temporary attributes used by the editor
- if(attr.name.substr(0,3) != '_dj' /*&&
- (attr.specified == undefined || attr.specified)*/){
- var v = attr.value;
- if(attr.name == 'src' || attr.name == 'href'){
- if(node.getAttribute('_djrealurl')){
- v = node.getAttribute('_djrealurl');
- }
- }
- attrarray.push([attr.name,v]);
- }
- }
- }
- attrarray.sort(function(a,b){
- return a[0]<b[0]?-1:(a[0]==b[0]?0:1);
- });
- i=0;
- while((attr=attrarray[i++])){
- output += ' '+attr[0]+'="'+attr[1]+'"';
- }
- if(node.childNodes.length){
- output += '>' + this.getNodeChildrenHtml(node)+'</'+node.tagName.toLowerCase()+'>';
- }else{
- output += ' />';
- }
- break;
- case 3: //text
- // FIXME:
- var output = this.escapeXml(node.nodeValue,true);
- break;
- case 8: //comment
- // FIXME:
- var output = '<!--'+this.escapeXml(node.nodeValue,true)+'-->';
- break;
- default:
- var output = "Element not recognized - Type: " + node.nodeType + " Name: " + node.nodeName;
- }
- return output;
- },
-
- getNodeChildrenHtml: function(/* DomNode */dom){
- // summary: Returns the html content of a DomNode and children
- var out = "";
- if(!dom){ return out; }
- var nodes = dom["childNodes"]||dom;
- var i=0;
- var node;
- while((node=nodes[i++])){
- out += this.getNodeHtml(node);
- }
- return out; // String
- },
-
- close: function(/*Boolean*/save, /*Boolean*/force){
- // summary:
- // Kills the editor and optionally writes back the modified contents to the
- // element from which it originated.
- // save:
- // Whether or not to save the changes. If false, the changes are discarded.
- // force:
- if(this.isClosed){return false; }
-
- if(!arguments.length){ save = true; }
- this._content = this.getValue();
- var changed = (this.savedContent != this._content);
-
- // line height is squashed for iframes
- // FIXME: why was this here? if (this.iframe){ this.domNode.style.lineHeight = null; }
-
- if(this.interval){ clearInterval(this.interval); }
-
- if(this.textarea){
- with(this.textarea.style){
- position = "";
- left = top = "";
- if(dojo.isIE){
- overflow = this.__overflow;
- this.__overflow = null;
- }
- }
- if(save){
- this.textarea.value = this._content;
- }else{
- this.textarea.value = this.savedContent;
- }
- dojo._destroyElement(this.domNode);
- this.domNode = this.textarea;
- }else{
- if(save){
- //why we treat moz differently? comment out to fix #1061
-// if(dojo.isMoz){
-// var nc = dojo.doc.createElement("span");
-// this.domNode.appendChild(nc);
-// nc.innerHTML = this.editNode.innerHTML;
-// }else{
-// this.domNode.innerHTML = this._content;
-// }
- this.domNode.innerHTML = this._content;
- }else{
- this.domNode.innerHTML = this.savedContent;
- }
- }
-
- dojo.removeClass(this.domNode, "RichTextEditable");
- this.isClosed = true;
- this.isLoaded = false;
- // FIXME: is this always the right thing to do?
- delete this.editNode;
-
- if(this.window && this.window._frameElement){
- this.window._frameElement = null;
- }
-
- this.window = null;
- this.document = null;
- this.editingArea = null;
- this.editorObject = null;
-
- return changed; // Boolean: whether the content has been modified
- },
-
- destroyRendering: function(){
- // summary: stub
- },
-
- destroy: function(){
- this.destroyRendering();
- if(!this.isClosed){ this.close(false); }
- this.inherited("destroy",arguments);
- //dijit._editor.RichText.superclass.destroy.call(this);
- },
-
- _fixContentForMoz: function(/* String */ html){
- // summary:
- // Moz can not handle strong/em tags correctly, convert them to b/i
- html = html.replace(/<(\/)?strong([ \>])/gi, '<$1b$2' );
- html = html.replace(/<(\/)?em([ \>])/gi, '<$1i$2' );
- return html; // String
- },
-
- _srcInImgRegex : /(?:(<img(?=\s).*?\ssrc=)("|')(.*?)\2)|(?:(<img\s.*?src=)([^"'][^ >]+))/gi ,
- _hrefInARegex : /(?:(<a(?=\s).*?\shref=)("|')(.*?)\2)|(?:(<a\s.*?href=)([^"'][^ >]+))/gi ,
-
- _preFixUrlAttributes: function(/* String */ html){
- html = html.replace(this._hrefInARegex, '$1$4$2$3$5$2 _djrealurl=$2$3$5$2') ;
- html = html.replace(this._srcInImgRegex, '$1$4$2$3$5$2 _djrealurl=$2$3$5$2') ;
- return html; // String
- }
+if(!dojo._hasResource["dijit._editor.RichText"]){
+dojo._hasResource["dijit._editor.RichText"]=true;
+dojo.provide("dijit._editor.RichText");
+dojo.require("dijit._Widget");
+dojo.require("dijit._editor.selection");
+dojo.require("dijit._editor.range");
+dojo.require("dijit._editor.html");
+if(!dojo.config["useXDomain"]||dojo.config["allowXdRichTextSave"]){
+if(dojo._postLoad){
+(function(){
+var _1=dojo.doc.createElement("textarea");
+_1.id=dijit._scopeName+"._editor.RichText.savedContent";
+dojo.style(_1,{display:"none",position:"absolute",top:"-100px",height:"3px",width:"3px"});
+dojo.body().appendChild(_1);
+})();
+}else{
+try{
+dojo.doc.write("<textarea id=\""+dijit._scopeName+"._editor.RichText.savedContent\" "+"style=\"display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;\"></textarea>");
+}
+catch(e){
+}
+}
+}
+dojo.declare("dijit._editor.RichText",dijit._Widget,{constructor:function(_2){
+this.contentPreFilters=[];
+this.contentPostFilters=[];
+this.contentDomPreFilters=[];
+this.contentDomPostFilters=[];
+this.editingAreaStyleSheets=[];
+this.events=[].concat(this.events);
+this._keyHandlers={};
+this.contentPreFilters.push(dojo.hitch(this,"_preFixUrlAttributes"));
+if(dojo.isMoz){
+this.contentPreFilters.push(this._normalizeFontStyle);
+this.contentPostFilters.push(this._removeMozBogus);
+}
+if(dojo.isWebKit){
+this.contentPreFilters.push(this._removeWebkitBogus);
+this.contentPostFilters.push(this._removeWebkitBogus);
+}
+if(dojo.isIE){
+this.contentPostFilters.push(this._normalizeFontStyle);
+}
+this.onLoadDeferred=new dojo.Deferred();
+},inheritWidth:false,focusOnLoad:false,name:"",styleSheets:"",_content:"",height:"300px",minHeight:"1em",isClosed:true,isLoaded:false,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",onLoadDeferred:null,isTabIndent:false,disableSpellCheck:false,postCreate:function(){
+if("textarea"==this.domNode.tagName.toLowerCase()){
+console.warn("RichText should not be used with the TEXTAREA tag. See dijit._editor.RichText docs.");
+}
+dojo.publish(dijit._scopeName+"._editor.RichText::init",[this]);
+this.open();
+this.setupDefaultShortcuts();
+},setupDefaultShortcuts:function(){
+var _3=dojo.hitch(this,function(_4,_5){
+return function(){
+return !this.execCommand(_4,_5);
+};
+});
+var _6={b:_3("bold"),i:_3("italic"),u:_3("underline"),a:_3("selectall"),s:function(){
+this.save(true);
+},m:function(){
+this.isTabIndent=!this.isTabIndent;
+},"1":_3("formatblock","h1"),"2":_3("formatblock","h2"),"3":_3("formatblock","h3"),"4":_3("formatblock","h4"),"\\":_3("insertunorderedlist")};
+if(!dojo.isIE){
+_6.Z=_3("redo");
+}
+for(var _7 in _6){
+this.addKeyHandler(_7,true,false,_6[_7]);
+}
+},events:["onKeyPress","onKeyDown","onKeyUp","onClick"],captureEvents:[],_editorCommandsLocalized:false,_localizeEditorCommands:function(){
+if(this._editorCommandsLocalized){
+return;
+}
+this._editorCommandsLocalized=true;
+var _8=["div","p","pre","h1","h2","h3","h4","h5","h6","ol","ul","address"];
+var _9="",_a,i=0;
+while((_a=_8[i++])){
+if(_a.charAt(1)!="l"){
+_9+="<"+_a+"><span>content</span></"+_a+"><br/>";
+}else{
+_9+="<"+_a+"><li>content</li></"+_a+"><br/>";
+}
+}
+var _b=dojo.doc.createElement("div");
+dojo.style(_b,{position:"absolute",top:"-2000px"});
+dojo.doc.body.appendChild(_b);
+_b.innerHTML=_9;
+var _c=_b.firstChild;
+while(_c){
+dijit._editor.selection.selectElement(_c.firstChild);
+dojo.withGlobal(this.window,"selectElement",dijit._editor.selection,[_c.firstChild]);
+var _d=_c.tagName.toLowerCase();
+this._local2NativeFormatNames[_d]=document.queryCommandValue("formatblock");
+this._native2LocalFormatNames[this._local2NativeFormatNames[_d]]=_d;
+_c=_c.nextSibling.nextSibling;
+}
+dojo.body().removeChild(_b);
+},open:function(_e){
+if(!this.onLoadDeferred||this.onLoadDeferred.fired>=0){
+this.onLoadDeferred=new dojo.Deferred();
+}
+if(!this.isClosed){
+this.close();
+}
+dojo.publish(dijit._scopeName+"._editor.RichText::open",[this]);
+this._content="";
+if(arguments.length==1&&_e.nodeName){
+this.domNode=_e;
+}
+var dn=this.domNode;
+var _f;
+if(dn.nodeName&&dn.nodeName.toLowerCase()=="textarea"){
+var ta=(this.textarea=dn);
+this.name=ta.name;
+_f=ta.value;
+dn=this.domNode=dojo.doc.createElement("div");
+dn.setAttribute("widgetId",this.id);
+ta.removeAttribute("widgetId");
+dn.cssText=ta.cssText;
+dn.className+=" "+ta.className;
+dojo.place(dn,ta,"before");
+var _10=dojo.hitch(this,function(){
+dojo.style(ta,{display:"block",position:"absolute",top:"-1000px"});
+if(dojo.isIE){
+var s=ta.style;
+this.__overflow=s.overflow;
+s.overflow="hidden";
+}
+});
+if(dojo.isIE){
+setTimeout(_10,10);
+}else{
+_10();
+}
+if(ta.form){
+dojo.connect(ta.form,"onsubmit",this,function(){
+ta.value=this.getValue();
+});
+}
+}else{
+_f=dijit._editor.getChildrenHtml(dn);
+dn.innerHTML="";
+}
+var _11=dojo.contentBox(dn);
+this._oldHeight=_11.h;
+this._oldWidth=_11.w;
+this.savedContent=_f;
+if(dn.nodeName&&dn.nodeName=="LI"){
+dn.innerHTML=" <br>";
+}
+this.editingArea=dn.ownerDocument.createElement("div");
+dn.appendChild(this.editingArea);
+if(this.name!==""&&(!dojo.config["useXDomain"]||dojo.config["allowXdRichTextSave"])){
+var _12=dojo.byId(dijit._scopeName+"._editor.RichText.savedContent");
+if(_12.value!==""){
+var _13=_12.value.split(this._SEPARATOR),i=0,dat;
+while((dat=_13[i++])){
+var _14=dat.split(":");
+if(_14[0]==this.name){
+_f=_14[1];
+_13.splice(i,1);
+break;
+}
+}
+}
+dojo.addOnUnload(dojo.hitch(this,"_saveContent"));
+}
+this.isClosed=false;
+var ifr=(this.editorObject=this.iframe=dojo.doc.createElement("iframe"));
+ifr.id=this.id+"_iframe";
+this._iframeSrc=this._getIframeDocTxt();
+ifr.style.border="none";
+ifr.style.width="100%";
+if(this._layoutMode){
+ifr.style.height="100%";
+}else{
+if(dojo.isIE>=7){
+if(this.height){
+ifr.style.height=this.height;
+}
+if(this.minHeight){
+ifr.style.minHeight=this.minHeight;
+}
+}else{
+ifr.style.height=this.height?this.height:this.minHeight;
+}
+}
+ifr.frameBorder=0;
+ifr._loadFunc=dojo.hitch(this,function(win){
+this.window=win;
+this.document=this.window.document;
+if(dojo.isIE){
+this._localizeEditorCommands();
+}
+this.onLoad(_f);
+this.savedContent=this.getValue(true);
+});
+var s="javascript:parent."+dijit._scopeName+".byId(\""+this.id+"\")._iframeSrc";
+ifr.setAttribute("src",s);
+this.editingArea.appendChild(ifr);
+if(dojo.isSafari){
+setTimeout(function(){
+ifr.setAttribute("src",s);
+},0);
+}
+if(dn.nodeName=="LI"){
+dn.lastChild.style.marginTop="-1.2em";
+}
+dojo.addClass(this.domNode,"RichTextEditable");
+},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_getIframeDocTxt:function(){
+var _15=dojo.getComputedStyle(this.domNode);
+var _16="";
+if(dojo.isIE||(!this.height&&!dojo.isMoz)){
+_16="<div></div>";
+}else{
+if(dojo.isMoz){
+this._cursorToStart=true;
+_16="&nbsp;";
+}
+}
+var _17=[_15.fontWeight,_15.fontSize,_15.fontFamily].join(" ");
+var _18=_15.lineHeight;
+if(_18.indexOf("px")>=0){
+_18=parseFloat(_18)/parseFloat(_15.fontSize);
+}else{
+if(_18.indexOf("em")>=0){
+_18=parseFloat(_18);
+}else{
+_18="normal";
+}
+}
+var _19="";
+this.style.replace(/(^|;)(line-|font-?)[^;]+/g,function(_1a){
+_19+=_1a.replace(/^;/g,"")+";";
});
-
+var _1b=dojo.query("label[for=\""+this.id+"\"]");
+return [this.isLeftToRight()?"<html><head>":"<html dir='rtl'><head>",(dojo.isMoz&&_1b.length?"<title>"+_1b[0].innerHTML+"</title>":""),"<meta http-equiv='Content-Type' content='text/html'>","<style>","body,html {","\tbackground:transparent;","\tpadding: 1px 0 0 0;","\tmargin: -1px 0 0 0;",(dojo.isWebKit?"\twidth: 100%;":""),(dojo.isWebKit?"\theight: 100%;":""),"}","body{","\ttop:0px; left:0px; right:0px;","\tfont:",_17,";",((this.height||dojo.isOpera)?"":"position: fixed;"),"\tmin-height:",this.minHeight,";","\tline-height:",_18,"}","p{ margin: 1em 0; }",(this.height?"":"body,html{overflow-y:hidden;/*for IE*/} body > div {overflow-x:auto;/*FF:horizontal scrollbar*/ overflow-y:hidden;/*safari*/ min-height:"+this.minHeight+";/*safari*/}"),"li > ul:-moz-first-node, li > ol:-moz-first-node{ padding-top: 1.2em; } ","li{ min-height:1.2em; }","</style>",this._applyEditingAreaStyleSheets(),"</head><body onload='frameElement._loadFunc(window,document)' style='"+_19+"'>",_16,"</body></html>"].join("");
+},_applyEditingAreaStyleSheets:function(){
+var _1c=[];
+if(this.styleSheets){
+_1c=this.styleSheets.split(";");
+this.styleSheets="";
+}
+_1c=_1c.concat(this.editingAreaStyleSheets);
+this.editingAreaStyleSheets=[];
+var _1d="",i=0,url;
+while((url=_1c[i++])){
+var _1e=(new dojo._Url(dojo.global.location,url)).toString();
+this.editingAreaStyleSheets.push(_1e);
+_1d+="<link rel=\"stylesheet\" type=\"text/css\" href=\""+_1e+"\"/>";
+}
+return _1d;
+},addStyleSheet:function(uri){
+var url=uri.toString();
+if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){
+url=(new dojo._Url(dojo.global.location,url)).toString();
+}
+if(dojo.indexOf(this.editingAreaStyleSheets,url)>-1){
+return;
+}
+this.editingAreaStyleSheets.push(url);
+this.onLoadDeferred.addCallback(dojo.hitch(function(){
+if(this.document.createStyleSheet){
+this.document.createStyleSheet(url);
+}else{
+var _1f=this.document.getElementsByTagName("head")[0];
+var _20=this.document.createElement("link");
+_20.rel="stylesheet";
+_20.type="text/css";
+_20.href=url;
+_1f.appendChild(_20);
+}
+}));
+},removeStyleSheet:function(uri){
+var url=uri.toString();
+if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){
+url=(new dojo._Url(dojo.global.location,url)).toString();
+}
+var _21=dojo.indexOf(this.editingAreaStyleSheets,url);
+if(_21==-1){
+return;
+}
+delete this.editingAreaStyleSheets[_21];
+dojo.withGlobal(this.window,"query",dojo,["link:[href=\""+url+"\"]"]).orphan();
+},disabled:false,_mozSettingProps:{"styleWithCSS":false},_setDisabledAttr:function(_22){
+this.disabled=_22;
+if(!this.isLoaded){
+return;
+}
+_22=!!_22;
+if(dojo.isIE||dojo.isWebKit||dojo.isOpera){
+var _23=dojo.isIE&&(this.isLoaded||!this.focusOnLoad);
+if(_23){
+this.editNode.unselectable="on";
+}
+this.editNode.contentEditable=!_22;
+if(_23){
+var _24=this;
+setTimeout(function(){
+_24.editNode.unselectable="off";
+},0);
+}
+}else{
+try{
+this.document.designMode=(_22?"off":"on");
+}
+catch(e){
+return;
+}
+if(!_22&&this._mozSettingProps){
+var ps=this._mozSettingProps;
+for(var n in ps){
+if(ps.hasOwnProperty(n)){
+try{
+this.document.execCommand(n,false,ps[n]);
+}
+catch(e2){
+}
+}
+}
+}
+}
+this._disabledOK=true;
+},onLoad:function(_25){
+if(!this.window.__registeredWindow){
+this.window.__registeredWindow=true;
+this._iframeRegHandle=dijit.registerIframe(this.iframe);
+}
+if(!dojo.isIE&&(this.height||dojo.isMoz)){
+this.editNode=this.document.body;
+}else{
+this.editNode=this.document.body.firstChild;
+var _26=this;
+if(dojo.isIE){
+var _27=(this.tabStop=dojo.doc.createElement("<div tabIndex=-1>"));
+this.editingArea.appendChild(_27);
+this.iframe.onfocus=function(){
+_26.editNode.setActive();
+};
+}
+}
+this.focusNode=this.editNode;
+var _28=this.events.concat(this.captureEvents);
+var ap=this.iframe?this.document:this.editNode;
+dojo.forEach(_28,function(_29){
+this.connect(ap,_29.toLowerCase(),_29);
+},this);
+if(dojo.isIE){
+this.connect(this.document,"onmousedown","_onIEMouseDown");
+this.editNode.style.zoom=1;
+}
+if(dojo.isWebKit){
+this._webkitListener=this.connect(this.document,"onmouseup","onDisplayChanged");
+}
+if(dojo.isIE){
+try{
+this.document.execCommand("RespectVisibilityInDesign",true,null);
+}
+catch(e){
+}
+}
+this.isLoaded=true;
+this.attr("disabled",this.disabled);
+this.setValue(_25);
+if(this.onLoadDeferred){
+this.onLoadDeferred.callback(true);
+}
+this.onDisplayChanged();
+if(this.focusOnLoad){
+dojo.addOnLoad(dojo.hitch(this,function(){
+setTimeout(dojo.hitch(this,"focus"),this.updateInterval);
+}));
+}
+},onKeyDown:function(e){
+if(e.keyCode===dojo.keys.TAB&&this.isTabIndent){
+dojo.stopEvent(e);
+if(this.queryCommandEnabled((e.shiftKey?"outdent":"indent"))){
+this.execCommand((e.shiftKey?"outdent":"indent"));
+}
+}
+if(dojo.isIE){
+if(e.keyCode==dojo.keys.TAB&&!this.isTabIndent){
+if(e.shiftKey&&!e.ctrlKey&&!e.altKey){
+this.iframe.focus();
+}else{
+if(!e.shiftKey&&!e.ctrlKey&&!e.altKey){
+this.tabStop.focus();
+}
+}
+}else{
+if(e.keyCode===dojo.keys.BACKSPACE&&this.document.selection.type==="Control"){
+dojo.stopEvent(e);
+this.execCommand("delete");
+}else{
+if((65<=e.keyCode&&e.keyCode<=90)||(e.keyCode>=37&&e.keyCode<=40)){
+e.charCode=e.keyCode;
+this.onKeyPress(e);
+}
+}
+}
+}
+return true;
+},onKeyUp:function(e){
+return;
+},setDisabled:function(_2a){
+dojo.deprecated("dijit.Editor::setDisabled is deprecated","use dijit.Editor::attr(\"disabled\",boolean) instead",2);
+this.attr("disabled",_2a);
+},_setValueAttr:function(_2b){
+this.setValue(_2b);
+},_setDisableSpellCheckAttr:function(_2c){
+if(this.document){
+dojo.attr(this.document.body,"spellcheck",!_2c);
+}else{
+this.onLoadDeferred.addCallback(dojo.hitch(this,function(){
+dojo.attr(this.document.body,"spellcheck",!_2c);
+}));
+}
+this.disableSpellCheck=_2c;
+},onKeyPress:function(e){
+var c=(e.keyChar&&e.keyChar.toLowerCase())||e.keyCode,_2d=this._keyHandlers[c],_2e=arguments;
+if(_2d&&!e.altKey){
+dojo.some(_2d,function(h){
+if(!(h.shift^e.shiftKey)&&!(h.ctrl^e.ctrlKey)){
+if(!h.handler.apply(this,_2e)){
+e.preventDefault();
+}
+return true;
+}
+},this);
+}
+if(!this._onKeyHitch){
+this._onKeyHitch=dojo.hitch(this,"onKeyPressed");
+}
+setTimeout(this._onKeyHitch,1);
+return true;
+},addKeyHandler:function(key,_2f,_30,_31){
+if(!dojo.isArray(this._keyHandlers[key])){
+this._keyHandlers[key]=[];
+}
+this._keyHandlers[key].push({shift:_30||false,ctrl:_2f||false,handler:_31});
+},onKeyPressed:function(){
+this.onDisplayChanged();
+},onClick:function(e){
+this.onDisplayChanged(e);
+},_onIEMouseDown:function(e){
+if(!this._focused&&!this.disabled){
+this.focus();
+}
+},_onBlur:function(e){
+this.inherited(arguments);
+var _32=this.getValue(true);
+if(_32!=this.savedContent){
+this.onChange(_32);
+this.savedContent=_32;
+}
+},_onFocus:function(e){
+if(!this.disabled){
+if(!this._disabledOK){
+this.attr("disabled",false);
+}
+this.inherited(arguments);
+}
+},blur:function(){
+if(!dojo.isIE&&this.window.document.documentElement&&this.window.document.documentElement.focus){
+this.window.document.documentElement.focus();
+}else{
+if(dojo.doc.body.focus){
+dojo.doc.body.focus();
+}
+}
+},focus:function(){
+if(!dojo.isIE){
+dijit.focus(this.iframe);
+if(this._cursorToStart){
+delete this._cursorToStart;
+if(this.editNode.childNodes&&this.editNode.childNodes.length===1&&this.editNode.innerHTML==="&nbsp;"){
+this.placeCursorAtStart();
+}
+}
+}else{
+if(this.editNode&&this.editNode.focus){
+this.iframe.fireEvent("onfocus",document.createEventObject());
+}
+}
+},updateInterval:200,_updateTimer:null,onDisplayChanged:function(e){
+if(this._updateTimer){
+clearTimeout(this._updateTimer);
+}
+if(!this._updateHandler){
+this._updateHandler=dojo.hitch(this,"onNormalizedDisplayChanged");
+}
+this._updateTimer=setTimeout(this._updateHandler,this.updateInterval);
+},onNormalizedDisplayChanged:function(){
+delete this._updateTimer;
+},onChange:function(_33){
+},_normalizeCommand:function(cmd,_34){
+var _35=cmd.toLowerCase();
+if(_35=="formatblock"){
+if(dojo.isSafari&&_34===undefined){
+_35="heading";
+}
+}else{
+if(_35=="hilitecolor"&&!dojo.isMoz){
+_35="backcolor";
+}
+}
+return _35;
+},_qcaCache:{},queryCommandAvailable:function(_36){
+var ca=this._qcaCache[_36];
+if(ca!==undefined){
+return ca;
+}
+return (this._qcaCache[_36]=this._queryCommandAvailable(_36));
+},_queryCommandAvailable:function(_37){
+var ie=1;
+var _38=1<<1;
+var _39=1<<2;
+var _3a=1<<3;
+var _3b=1<<4;
+function _3c(_3d){
+return {ie:Boolean(_3d&ie),mozilla:Boolean(_3d&_38),webkit:Boolean(_3d&_39),webkit420:Boolean(_3d&_3b),opera:Boolean(_3d&_3a)};
+};
+var _3e=null;
+switch(_37.toLowerCase()){
+case "bold":
+case "italic":
+case "underline":
+case "subscript":
+case "superscript":
+case "fontname":
+case "fontsize":
+case "forecolor":
+case "hilitecolor":
+case "justifycenter":
+case "justifyfull":
+case "justifyleft":
+case "justifyright":
+case "delete":
+case "selectall":
+case "toggledir":
+_3e=_3c(_38|ie|_39|_3a);
+break;
+case "createlink":
+case "unlink":
+case "removeformat":
+case "inserthorizontalrule":
+case "insertimage":
+case "insertorderedlist":
+case "insertunorderedlist":
+case "indent":
+case "outdent":
+case "formatblock":
+case "inserthtml":
+case "undo":
+case "redo":
+case "strikethrough":
+case "tabindent":
+_3e=_3c(_38|ie|_3a|_3b);
+break;
+case "blockdirltr":
+case "blockdirrtl":
+case "dirltr":
+case "dirrtl":
+case "inlinedirltr":
+case "inlinedirrtl":
+_3e=_3c(ie);
+break;
+case "cut":
+case "copy":
+case "paste":
+_3e=_3c(ie|_38|_3b);
+break;
+case "inserttable":
+_3e=_3c(_38|ie);
+break;
+case "insertcell":
+case "insertcol":
+case "insertrow":
+case "deletecells":
+case "deletecols":
+case "deleterows":
+case "mergecells":
+case "splitcell":
+_3e=_3c(ie|_38);
+break;
+default:
+return false;
+}
+return (dojo.isIE&&_3e.ie)||(dojo.isMoz&&_3e.mozilla)||(dojo.isWebKit&&_3e.webkit)||(dojo.isWebKit>420&&_3e.webkit420)||(dojo.isOpera&&_3e.opera);
+},execCommand:function(_3f,_40){
+var _41;
+this.focus();
+_3f=this._normalizeCommand(_3f,_40);
+if(_40!==undefined){
+if(_3f=="heading"){
+throw new Error("unimplemented");
+}else{
+if((_3f=="formatblock")&&dojo.isIE){
+_40="<"+_40+">";
+}
+}
}
+var _42="_"+_3f+"Impl";
+if(this[_42]){
+_41=this[_42](_40);
+}else{
+_40=arguments.length>1?_40:null;
+if(_40||_3f!="createlink"){
+_41=this.document.execCommand(_3f,false,_40);
+}
+}
+this.onDisplayChanged();
+return _41;
+},queryCommandEnabled:function(_43){
+if(this.disabled||!this._disabledOK){
+return false;
+}
+_43=this._normalizeCommand(_43);
+if(dojo.isMoz||dojo.isWebKit){
+if(_43=="unlink"){
+return this._sCall("hasAncestorElement",["a"]);
+}else{
+if(_43=="inserttable"){
+return true;
+}
+}
+}
+if(dojo.isWebKit){
+if(_43=="copy"){
+_43="cut";
+}else{
+if(_43=="paste"){
+return true;
+}
+}
+}
+var _44=dojo.isIE?this.document.selection.createRange():this.document;
+try{
+return _44.queryCommandEnabled(_43);
+}
+catch(e){
+return false;
+}
+},queryCommandState:function(_45){
+if(this.disabled||!this._disabledOK){
+return false;
+}
+_45=this._normalizeCommand(_45);
+try{
+return this.document.queryCommandState(_45);
+}
+catch(e){
+return false;
+}
+},queryCommandValue:function(_46){
+if(this.disabled||!this._disabledOK){
+return false;
+}
+var r;
+_46=this._normalizeCommand(_46);
+if(dojo.isIE&&_46=="formatblock"){
+r=this._native2LocalFormatNames[this.document.queryCommandValue(_46)];
+}else{
+if(dojo.isMoz&&_46==="hilitecolor"){
+var _47;
+try{
+_47=this.document.queryCommandValue("styleWithCSS");
+}
+catch(e){
+_47=false;
+}
+this.document.execCommand("styleWithCSS",false,true);
+r=this.document.queryCommandValue(_46);
+this.document.execCommand("styleWithCSS",false,_47);
+}else{
+r=this.document.queryCommandValue(_46);
+}
+}
+return r;
+},_sCall:function(_48,_49){
+return dojo.withGlobal(this.window,_48,dijit._editor.selection,_49);
+},placeCursorAtStart:function(){
+this.focus();
+var _4a=false;
+if(dojo.isMoz){
+var _4b=this.editNode.firstChild;
+while(_4b){
+if(_4b.nodeType==3){
+if(_4b.nodeValue.replace(/^\s+|\s+$/g,"").length>0){
+_4a=true;
+this._sCall("selectElement",[_4b]);
+break;
+}
+}else{
+if(_4b.nodeType==1){
+_4a=true;
+var tg=_4b.tagName?_4b.tagName.toLowerCase():"";
+if(/br|input|img|base|meta|area|basefont|hr|link/.test(tg)){
+this._sCall("selectElement",[_4b]);
+}else{
+this._sCall("selectElementChildren",[_4b]);
+}
+break;
+}
+}
+_4b=_4b.nextSibling;
+}
+}else{
+_4a=true;
+this._sCall("selectElementChildren",[this.editNode]);
+}
+if(_4a){
+this._sCall("collapse",[true]);
+}
+},placeCursorAtEnd:function(){
+this.focus();
+var _4c=false;
+if(dojo.isMoz){
+var _4d=this.editNode.lastChild;
+while(_4d){
+if(_4d.nodeType==3){
+if(_4d.nodeValue.replace(/^\s+|\s+$/g,"").length>0){
+_4c=true;
+this._sCall("selectElement",[_4d]);
+break;
+}
+}else{
+if(_4d.nodeType==1){
+_4c=true;
+if(_4d.lastChild){
+this._sCall("selectElement",[_4d.lastChild]);
+}else{
+this._sCall("selectElement",[_4d]);
+}
+break;
+}
+}
+_4d=_4d.previousSibling;
+}
+}else{
+_4c=true;
+this._sCall("selectElementChildren",[this.editNode]);
+}
+if(_4c){
+this._sCall("collapse",[false]);
+}
+},getValue:function(_4e){
+if(this.textarea){
+if(this.isClosed||!this.isLoaded){
+return this.textarea.value;
+}
+}
+return this._postFilterContent(null,_4e);
+},_getValueAttr:function(){
+return this.getValue(true);
+},setValue:function(_4f){
+if(!this.isLoaded){
+this.onLoadDeferred.addCallback(dojo.hitch(this,function(){
+this.setValue(_4f);
+}));
+return;
+}
+if(this.textarea&&(this.isClosed||!this.isLoaded)){
+this.textarea.value=_4f;
+}else{
+_4f=this._preFilterContent(_4f);
+var _50=this.isClosed?this.domNode:this.editNode;
+if(!_4f&&dojo.isWebKit){
+this._cursorToStart=true;
+_4f="&nbsp;";
+}
+_50.innerHTML=_4f;
+this._preDomFilterContent(_50);
+}
+this.onDisplayChanged();
+},replaceValue:function(_51){
+if(this.isClosed){
+this.setValue(_51);
+}else{
+if(this.window&&this.window.getSelection&&!dojo.isMoz){
+this.setValue(_51);
+}else{
+if(this.window&&this.window.getSelection){
+_51=this._preFilterContent(_51);
+this.execCommand("selectall");
+if(!_51){
+this._cursorToStart=true;
+_51="&nbsp;";
+}
+this.execCommand("inserthtml",_51);
+this._preDomFilterContent(this.editNode);
+}else{
+if(this.document&&this.document.selection){
+this.setValue(_51);
+}
+}
+}
+}
+},_preFilterContent:function(_52){
+var ec=_52;
+dojo.forEach(this.contentPreFilters,function(ef){
+if(ef){
+ec=ef(ec);
+}
+});
+return ec;
+},_preDomFilterContent:function(dom){
+dom=dom||this.editNode;
+dojo.forEach(this.contentDomPreFilters,function(ef){
+if(ef&&dojo.isFunction(ef)){
+ef(dom);
+}
+},this);
+},_postFilterContent:function(dom,_53){
+var ec;
+if(!dojo.isString(dom)){
+dom=dom||this.editNode;
+if(this.contentDomPostFilters.length){
+if(_53){
+dom=dojo.clone(dom);
+}
+dojo.forEach(this.contentDomPostFilters,function(ef){
+dom=ef(dom);
+});
+}
+ec=dijit._editor.getChildrenHtml(dom);
+}else{
+ec=dom;
+}
+if(!dojo.trim(ec.replace(/^\xA0\xA0*/,"").replace(/\xA0\xA0*$/,"")).length){
+ec="";
+}
+dojo.forEach(this.contentPostFilters,function(ef){
+ec=ef(ec);
+});
+return ec;
+},_saveContent:function(e){
+var _54=dojo.byId(dijit._scopeName+"._editor.RichText.savedContent");
+if(_54.value){
+_54.value+=this._SEPARATOR;
+}
+_54.value+=this.name+":"+this.getValue(true);
+},escapeXml:function(str,_55){
+str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
+if(!_55){
+str=str.replace(/'/gm,"&#39;");
+}
+return str;
+},getNodeHtml:function(_56){
+dojo.deprecated("dijit.Editor::getNodeHtml is deprecated","use dijit._editor.getNodeHtml instead",2);
+return dijit._editor.getNodeHtml(_56);
+},getNodeChildrenHtml:function(dom){
+dojo.deprecated("dijit.Editor::getNodeChildrenHtml is deprecated","use dijit._editor.getChildrenHtml instead",2);
+return dijit._editor.getChildrenHtml(dom);
+},close:function(_57){
+if(this.isClosed){
+return false;
+}
+if(!arguments.length){
+_57=true;
+}
+this._content=this.getValue();
+var _58=(this.savedContent!=this._content);
+if(this.interval){
+clearInterval(this.interval);
+}
+if(this._webkitListener){
+this.disconnect(this._webkitListener);
+delete this._webkitListener;
+}
+if(dojo.isIE){
+this.iframe.onfocus=null;
+}
+this.iframe._loadFunc=null;
+if(this._iframeRegHandle){
+dijit.unregisterIframe(this._iframeRegHandle);
+delete this._iframeRegHandle;
+}
+if(this.textarea){
+var s=this.textarea.style;
+s.position="";
+s.left=s.top="";
+if(dojo.isIE){
+s.overflow=this.__overflow;
+this.__overflow=null;
+}
+this.textarea.value=_57?this._content:this.savedContent;
+dojo.destroy(this.domNode);
+this.domNode=this.textarea;
+}else{
+this.domNode.innerHTML=_57?this._content:this.savedContent;
+}
+delete this.iframe;
+dojo.removeClass(this.domNode,"RichTextEditable");
+this.isClosed=true;
+this.isLoaded=false;
+delete this.editNode;
+delete this.focusNode;
+if(this.window&&this.window._frameElement){
+this.window._frameElement=null;
+}
+this.window=null;
+this.document=null;
+this.editingArea=null;
+this.editorObject=null;
+return _58;
+},destroy:function(){
+if(!this.isClosed){
+this.close(false);
+}
+this.inherited(arguments);
+},_removeMozBogus:function(_59){
+return _59.replace(/\stype="_moz"/gi,"").replace(/\s_moz_dirty=""/gi,"").replace(/_moz_resizing="(true|false)"/gi,"");
+},_removeWebkitBogus:function(_5a){
+_5a=_5a.replace(/\sclass="webkit-block-placeholder"/gi,"");
+_5a=_5a.replace(/\sclass="apple-style-span"/gi,"");
+return _5a;
+},_normalizeFontStyle:function(_5b){
+return _5b.replace(/<(\/)?strong([ \>])/gi,"<$1b$2").replace(/<(\/)?em([ \>])/gi,"<$1i$2");
+},_preFixUrlAttributes:function(_5c){
+return _5c.replace(/(?:(<a(?=\s).*?\shref=)("|')(.*?)\2)|(?:(<a\s.*?href=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl=$2$3$5$2").replace(/(?:(<img(?=\s).*?\ssrc=)("|')(.*?)\2)|(?:(<img\s.*?src=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl=$2$3$5$2");
+},_inserthorizontalruleImpl:function(_5d){
+if(dojo.isIE){
+return this._inserthtmlImpl("<hr>");
+}
+return this.document.execCommand("inserthorizontalrule",false,_5d);
+},_unlinkImpl:function(_5e){
+if((this.queryCommandEnabled("unlink"))&&(dojo.isMoz||dojo.isWebKit)){
+var a=this._sCall("getAncestorElement",["a"]);
+this._sCall("selectElement",[a]);
+return this.document.execCommand("unlink",false,null);
+}
+return this.document.execCommand("unlink",false,_5e);
+},_hilitecolorImpl:function(_5f){
+var _60;
+if(dojo.isMoz){
+this.document.execCommand("styleWithCSS",false,true);
+_60=this.document.execCommand("hilitecolor",false,_5f);
+this.document.execCommand("styleWithCSS",false,false);
+}else{
+_60=this.document.execCommand("hilitecolor",false,_5f);
+}
+return _60;
+},_backcolorImpl:function(_61){
+if(dojo.isIE){
+_61=_61?_61:null;
+}
+return this.document.execCommand("backcolor",false,_61);
+},_forecolorImpl:function(_62){
+if(dojo.isIE){
+_62=_62?_62:null;
+}
+return this.document.execCommand("forecolor",false,_62);
+},_inserthtmlImpl:function(_63){
+_63=this._preFilterContent(_63);
+var rv=true;
+if(dojo.isIE){
+var _64=this.document.selection.createRange();
+if(this.document.selection.type.toUpperCase()=="CONTROL"){
+var n=_64.item(0);
+while(_64.length){
+_64.remove(_64.item(0));
+}
+n.outerHTML=_63;
+}else{
+_64.pasteHTML(_63);
+}
+_64.select();
+}else{
+if(dojo.isMoz&&!_63.length){
+this._sCall("remove");
+}else{
+rv=this.document.execCommand("inserthtml",false,_63);
+}
+}
+return rv;
+}});
+}
diff --git a/js/dojo/dijit/_editor/_Plugin.js b/js/dojo/dijit/_editor/_Plugin.js
--- a/js/dojo/dijit/_editor/_Plugin.js
+++ b/js/dojo/dijit/_editor/_Plugin.js
@@ -1,91 +1,76 @@
-if(!dojo._hasResource["dijit._editor._Plugin"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._editor._Plugin"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit._editor._Plugin"]){
+dojo._hasResource["dijit._editor._Plugin"]=true;
dojo.provide("dijit._editor._Plugin");
dojo.require("dijit._Widget");
dojo.require("dijit.Editor");
dojo.require("dijit.form.Button");
-
-dojo.declare("dijit._editor._Plugin", null, {
- // summary
- // This represents a "plugin" to the editor, which is basically
- // a single button on the Toolbar and some associated code
- constructor: function(/*Object?*/args, /*DomNode?*/node){
- if(args){
- dojo.mixin(this, args);
- }
- },
-
- editor: null,
- iconClassPrefix: "dijitEditorIcon",
- button: null,
- queryCommand: null,
- command: "",
- commandArg: null,
- useDefaultCommand: true,
- buttonClass: dijit.form.Button,
- updateInterval: 200, // only allow updates every two tenths of a second
- _initButton: function(){
- if(this.command.length){
- var label = this.editor.commands[this.command];
- var className = "dijitEditorIcon "+this.iconClassPrefix + this.command.charAt(0).toUpperCase() + this.command.substr(1);
- if(!this.button){
- var props = {
- label: label,
- showLabel: false,
- iconClass: className,
- dropDown: this.dropDown
- };
- this.button = new this.buttonClass(props);
- }
- }
- },
- updateState: function(){
- var _e = this.editor;
- var _c = this.command;
- if(!_e){ return; }
- if(!_e.isLoaded){ return; }
- if(!_c.length){ return; }
- if(this.button){
- try{
- var enabled = _e.queryCommandEnabled(_c);
- this.button.setDisabled(!enabled);
- if(this.button.setChecked){
- this.button.setChecked(_e.queryCommandState(_c));
- }
- }catch(e){
- console.debug(e);
- }
- }
- },
- setEditor: function(/*Widget*/editor){
- // FIXME: detatch from previous editor!!
- this.editor = editor;
-
- // FIXME: prevent creating this if we don't need to (i.e., editor can't handle our command)
- this._initButton();
-
- // FIXME: wire up editor to button here!
- if( (this.command.length) &&
- (!this.editor.queryCommandAvailable(this.command))
- ){
- // console.debug("hiding:", this.command);
- if(this.button){
- this.button.domNode.style.display = "none";
- }
- }
- if(this.button && this.useDefaultCommand){
- dojo.connect(this.button, "onClick",
- dojo.hitch(this.editor, "execCommand", this.command, this.commandArg)
- );
- }
- dojo.connect(this.editor, "onNormalizedDisplayChanged", this, "updateState");
- },
- setToolbar: function(/*Widget*/toolbar){
- if(this.button){
- toolbar.addChild(this.button);
- }
- // console.debug("adding", this.button, "to:", toolbar);
- }
-});
-
+dojo.declare("dijit._editor._Plugin",null,{constructor:function(_1,_2){
+this.params=_1||{};
+dojo.mixin(this,this.params);
+this._connects=[];
+},editor:null,iconClassPrefix:"dijitEditorIcon",button:null,command:"",useDefaultCommand:true,buttonClass:dijit.form.Button,getLabel:function(_3){
+return this.editor.commands[_3];
+},_initButton:function(){
+if(this.command.length){
+var _4=this.getLabel(this.command);
+var _5=this.iconClassPrefix+" "+this.iconClassPrefix+this.command.charAt(0).toUpperCase()+this.command.substr(1);
+if(!this.button){
+var _6=dojo.mixin({label:_4,showLabel:false,iconClass:_5,dropDown:this.dropDown,tabIndex:"-1"},this.params||{});
+this.button=new this.buttonClass(_6);
+}
+}
+},destroy:function(){
+dojo.forEach(this._connects,dojo.disconnect);
+if(this.dropDown){
+this.dropDown.destroyRecursive();
+}
+},connect:function(o,f,tf){
+this._connects.push(dojo.connect(o,f,this,tf));
+},updateState:function(){
+var e=this.editor,c=this.command,_7,_8;
+if(!e||!e.isLoaded||!c.length){
+return;
}
+if(this.button){
+try{
+_8=e.queryCommandEnabled(c);
+if(this.enabled!==_8){
+this.enabled=_8;
+this.button.attr("disabled",!_8);
+}
+if(typeof this.button.checked=="boolean"){
+_7=e.queryCommandState(c);
+if(this.checked!==_7){
+this.checked=_7;
+this.button.attr("checked",e.queryCommandState(c));
+}
+}
+}
+catch(e){
+}
+}
+},setEditor:function(_9){
+this.editor=_9;
+this._initButton();
+if(this.command.length&&!this.editor.queryCommandAvailable(this.command)){
+if(this.button){
+this.button.domNode.style.display="none";
+}
+}
+if(this.button&&this.useDefaultCommand){
+this.connect(this.button,"onClick",dojo.hitch(this.editor,"execCommand",this.command,this.commandArg));
+}
+this.connect(this.editor,"onNormalizedDisplayChanged","updateState");
+},setToolbar:function(_a){
+if(this.button){
+_a.addChild(this.button);
+}
+}});
+}
diff --git a/js/dojo/dijit/_editor/nls/FontChoice.js b/js/dojo/dijit/_editor/nls/FontChoice.js
--- a/js/dojo/dijit/_editor/nls/FontChoice.js
+++ b/js/dojo/dijit/_editor/nls/FontChoice.js
@@ -1,1 +1,1 @@
-({"1": "xx-small", "2": "x-small", "formatBlock": "Format", "monospaced": "monospaced", "3": "small", "4": "medium", "5": "large", "6": "x-large", "7": "xx-large", "fantasy": "fantasy", "serif": "serif", "p": "Paragraph", "pre": "Pre-formatted", "sans-serif": "sans-serif", "fontName": "Font", "h1": "Heading", "h2": "Subheading", "h3": "Sub-subheading", "fontSize": "Size", "cursive": "cursive"})
\ No newline at end of file
+({"1":"xx-small","2":"x-small","formatBlock":"Format","3":"small","4":"medium","5":"large","6":"x-large","7":"xx-large","fantasy":"fantasy","serif":"serif","p":"Paragraph","pre":"Pre-formatted","sans-serif":"sans-serif","fontName":"Font","h1":"Heading","h2":"Subheading","h3":"Sub-subheading","monospace":"monospace","fontSize":"Size","cursive":"cursive"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/LinkDialog.js b/js/dojo/dijit/_editor/nls/LinkDialog.js
--- a/js/dojo/dijit/_editor/nls/LinkDialog.js
+++ b/js/dojo/dijit/_editor/nls/LinkDialog.js
@@ -1,1 +1,1 @@
-({"set": "Set", "text": "Text:", "title": "Link URL", "url": "URL:", "urlInvalidMessage": "Invalid URL. Enter a full URL like 'http://www.dojotoolkit.org'"})
\ No newline at end of file
+({"text":"Description:","insertImageTitle":"Image Properties","set":"Set","newWindow":"New Window","topWindow":"Topmost Window","target":"Target:","createLinkTitle":"Link Properties","parentWindow":"Parent Window","currentWindow":"Current Window","url":"URL:"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/commands.js b/js/dojo/dijit/_editor/nls/commands.js
--- a/js/dojo/dijit/_editor/nls/commands.js
+++ b/js/dojo/dijit/_editor/nls/commands.js
@@ -1,1 +1,1 @@
-({"removeFormat": "Remove Format", "copy": "Copy", "paste": "Paste", "selectAll": "Select All", "insertOrderedList": "Numbered List", "insertTable": "Insert/Edit Table", "underline": "Underline", "foreColor": "Foreground Color", "htmlToggle": "HTML Source", "formatBlock": "Paragraph Style", "insertHorizontalRule": "Horizontal Rule", "delete": "Delete", "appleKey": "⌘${0}", "insertUnorderedList": "Bullet List", "tableProp": "Table Property", "insertImage": "Insert Image", "superscript": "Superscript", "subscript": "Subscript", "createLink": "Create Link", "undo": "Undo", "italic": "Italic", "fontName": "Font Name", "justifyLeft": "Align Left", "unlink": "Remove Link", "toggleTableBorder": "Toggle Table Border", "ctrlKey": "ctrl+${0}", "fontSize": "Font Size", "indent": "Indent", "redo": "Redo", "strikethrough": "Strikethrough", "justifyFull": "Justify", "justifyCenter": "Align Center", "hiliteColor": "Background Color", "deleteTable": "Delete Table", "outdent": "Outdent", "cut": "Cut", "plainFormatBlock": "Paragraph Style", "bold": "Bold", "systemShortcutFF": "The \"${0}\" action is only available in Mozilla Firefox using a keyboard shortcut. Use ${1}.", "justifyRight": "Align Right"})
\ No newline at end of file
+({"removeFormat":"Remove Format","copy":"Copy","paste":"Paste","selectAll":"Select All","insertOrderedList":"Numbered List","insertTable":"Insert/Edit Table","print":"Print","underline":"Underline","foreColor":"Foreground Color","htmlToggle":"HTML Source","formatBlock":"Paragraph Style","newPage":"New Page","insertHorizontalRule":"Horizontal Rule","delete":"Delete","appleKey":"⌘${0}","insertUnorderedList":"Bullet List","tableProp":"Table Property","insertImage":"Insert Image","superscript":"Superscript","subscript":"Subscript","createLink":"Create Link","undo":"Undo","fullScreen":"Toggle Full Screen","italic":"Italic","fontName":"Font Name","justifyLeft":"Align Left","unlink":"Remove Link","toggleTableBorder":"Toggle Table Border","viewSource":"View HTML Source","ctrlKey":"ctrl+${0}","fontSize":"Font Size","systemShortcut":"The \"${0}\" action is only available in your browser using a keyboard shortcut. Use ${1}.","indent":"Indent","redo":"Redo","strikethrough":"Strikethrough","justifyFull":"Justify","justifyCenter":"Align Center","hiliteColor":"Background Color","deleteTable":"Delete Table","outdent":"Outdent","cut":"Cut","plainFormatBlock":"Paragraph Style","toggleDir":"Toggle Direction","bold":"Bold","tabIndent":"Tab Indent","justifyRight":"Align Right"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/cs/LinkDialog.js b/js/dojo/dijit/_editor/nls/cs/LinkDialog.js
--- a/js/dojo/dijit/_editor/nls/cs/LinkDialog.js
+++ b/js/dojo/dijit/_editor/nls/cs/LinkDialog.js
@@ -1,1 +1,1 @@
-({"set": "Nastavit", "text": "Text:", "title": "Adresa URL odkazu", "url": "Adresa URL:", "urlInvalidMessage": "Neplatná adresa URL. Zadejte úplnou adresu URL ve tvaru 'http://www.dojotoolkit.org'"})
\ No newline at end of file
+({"text":"Popis:","insertImageTitle":"Vlastnosti obrázku","set":"Nastavit","newWindow":"Nové okno","topWindow":"Okno nejvyšší úrovně","target":"Cíl:","createLinkTitle":"Vlastnosti odkazu","parentWindow":"Nadřízené okno","currentWindow":"Aktuální okno","url":"Adresa URL:"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/cs/commands.js b/js/dojo/dijit/_editor/nls/cs/commands.js
--- a/js/dojo/dijit/_editor/nls/cs/commands.js
+++ b/js/dojo/dijit/_editor/nls/cs/commands.js
@@ -1,1 +1,1 @@
-({"removeFormat": "Odebrat formát", "copy": "Kopírovat", "paste": "Vložit", "selectAll": "Vybrat vše", "insertOrderedList": "Číslovaný seznam", "insertTable": "Vložit/upravit tabulku", "underline": "Podtržení", "foreColor": "Barva popředí", "htmlToggle": "Zdroj HTML", "formatBlock": "Styl odstavce", "insertHorizontalRule": "Vodorovné pravítko", "delete": "Odstranit", "insertUnorderedList": "Seznam s odrážkami", "tableProp": "Vlastnost tabulky", "insertImage": "Vložit obraz", "superscript": "Horní index", "subscript": "Dolní index", "createLink": "Vytvořit odkaz", "undo": "Zpět", "italic": "Kurzíva", "fontName": "Název písma", "justifyLeft": "Zarovnat vlevo", "unlink": "Odebrat odkaz", "toggleTableBorder": "Přepnout ohraničení tabulky", "fontSize": "Velikost písma", "indent": "Odsadit", "redo": "Opakovat", "strikethrough": "Přeškrtnutí", "justifyFull": "Do bloku", "justifyCenter": "Zarovnat na střed", "hiliteColor": "Barva pozadí", "deleteTable": "Odstranit tabulku", "outdent": "Předsadit", "cut": "Vyjmout", "plainFormatBlock": "Styl odstavce", "bold": "Tučné", "systemShortcutFF": "Akce \"${0}\" je v prohlížeči Mozilla Firefox dostupná pouze prostřednictvím klávesové zkratky. Použijte klávesy ${1}.", "justifyRight": "Zarovnat vpravo", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"})
\ No newline at end of file
+({"removeFormat":"Odebrat formát","copy":"Kopírovat","paste":"Vložit","selectAll":"Vybrat vše","insertOrderedList":"Číslovaný seznam","insertTable":"Vložit/upravit tabulku","print":"Tisk","underline":"Podtržení","foreColor":"Barva popředí","htmlToggle":"Zdroj HTML","formatBlock":"Styl odstavce","newPage":"Nová stránka","insertHorizontalRule":"Vodorovná čára","delete":"Odstranit","insertUnorderedList":"Seznam s odrážkami","tableProp":"Vlastnost tabulky","insertImage":"Vložit obrázek","superscript":"Horní index","subscript":"Dolní index","createLink":"Vytvořit odkaz","undo":"Zpět","fullScreen":"Přepnout režim celé obrazovky","italic":"Kurzíva","fontName":"Název písma","justifyLeft":"Zarovnat vlevo","unlink":"Odebrat odkaz","toggleTableBorder":"Přepnout ohraničení tabulky","viewSource":"Zobrazit zdroj ve formátu HTML","fontSize":"Velikost písma","systemShortcut":"Akce \"${0}\" je v prohlížeči dostupná pouze prostřednictvím klávesové zkratky. Použijte klávesovou zkratku ${1}.","indent":"Odsadit","redo":"Opakovat","strikethrough":"Přeškrtnutí","justifyFull":"Do bloku","justifyCenter":"Zarovnat na střed","hiliteColor":"Barva pozadí","deleteTable":"Odstranit tabulku","outdent":"Předsadit","cut":"Vyjmout","plainFormatBlock":"Styl odstavce","toggleDir":"Přepnout směr","bold":"Tučné","tabIndent":"Odsazení tabulátoru","justifyRight":"Zarovnat vpravo","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/de/LinkDialog.js b/js/dojo/dijit/_editor/nls/de/LinkDialog.js
--- a/js/dojo/dijit/_editor/nls/de/LinkDialog.js
+++ b/js/dojo/dijit/_editor/nls/de/LinkDialog.js
@@ -1,1 +1,1 @@
-({"set": "Festlegen", "text": "Text:", "title": "Link-URL", "url": "URL:", "urlInvalidMessage": "Ungültiger URL. Geben Sie einen vollständigen URL ein. Beispiel: 'http://www.dojotoolkit.org'"})
\ No newline at end of file
+({"text":"Beschreibung:","insertImageTitle":"Grafikeigenschaften","set":"Festlegen","newWindow":"Neues Fenster","topWindow":"Aktives Fenster","target":"Ziel:","createLinkTitle":"Linkeigenschaften","parentWindow":"Übergeordnetes Fenster","currentWindow":"Aktuelles Fenster","url":"URL:"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/de/commands.js b/js/dojo/dijit/_editor/nls/de/commands.js
--- a/js/dojo/dijit/_editor/nls/de/commands.js
+++ b/js/dojo/dijit/_editor/nls/de/commands.js
@@ -1,1 +1,1 @@
-({"removeFormat": "Formatierung entfernen", "copy": "Kopieren", "paste": "Einfügen", "selectAll": "Alles auswählen", "insertOrderedList": "Nummerierung", "insertTable": "Tabelle einfügen/bearbeiten", "underline": "Unterstrichen", "foreColor": "Vordergrundfarbe", "htmlToggle": "HTML-Quelltext", "formatBlock": "Absatzstil", "insertHorizontalRule": "Horizontaler Strich", "delete": "Löschen", "insertUnorderedList": "Aufzählungszeichen", "tableProp": "Tabelleneigenschaft", "insertImage": "Grafik einfügen", "superscript": "Hochgestellt", "subscript": "Tiefgestellt", "createLink": "Link erstellen", "undo": "Rückgängig", "italic": "Kursiv", "fontName": "Schriftartname", "justifyLeft": "Linksbündig", "unlink": "Link entfernen", "toggleTableBorder": "Tabellenumrandung ein-/ausschalten", "ctrlKey": "Strg+${0}", "fontSize": "Schriftgröße", "indent": "Einrücken", "redo": "Wiederherstellen", "strikethrough": "Durchgestrichen", "justifyFull": "Blocksatz", "justifyCenter": "Zentriert", "hiliteColor": "Hintergrundfarbe", "deleteTable": "Tabelle löschen", "outdent": "Ausrücken", "cut": "Ausschneiden", "plainFormatBlock": "Absatzstil", "bold": "Fett", "systemShortcutFF": "Die Aktion \"${0}\" ist in Mozilla Firefox nur über einen Tastaturkurzbefehl verfügbar. Verwenden Sie ${1}.", "justifyRight": "Rechtsbündig", "appleKey": "⌘${0}"})
\ No newline at end of file
+({"removeFormat":"Formatierung entfernen","copy":"Kopieren","paste":"Einfügen","selectAll":"Alles auswählen","insertOrderedList":"Nummerierung","insertTable":"Tabelle einfügen/bearbeiten","print":"Drucken","underline":"Unterstrichen","foreColor":"Vordergrundfarbe","htmlToggle":"HTML-Quelltext","formatBlock":"Absatzstil","newPage":"Neue Seite","insertHorizontalRule":"Horizontaler Strich","delete":"Löschen","insertUnorderedList":"Aufzählungszeichen","tableProp":"Tabelleneigenschaft","insertImage":"Grafik einfügen","superscript":"Hochgestellt","subscript":"Tiefgestellt","createLink":"Link erstellen","undo":"Rückgängig","fullScreen":"Gesamtanzeige","italic":"Kursiv","fontName":"Schriftartname","justifyLeft":"Linksbündig","unlink":"Link entfernen","toggleTableBorder":"Tabellenumrandung ein-/ausschalten","viewSource":"HTML-Quelle","ctrlKey":"Strg+${0}","fontSize":"Schriftgröße","systemShortcut":"Die Aktion \"${0}\" ist nur über einen Direktaufruf in Ihrem Browser verfügbar. Verwenden Sie ${1}.","indent":"Einrücken","redo":"Wiederherstellen","strikethrough":"Durchgestrichen","justifyFull":"Blocksatz","justifyCenter":"Zentriert","hiliteColor":"Hintergrundfarbe","deleteTable":"Tabelle löschen","outdent":"Ausrücken","cut":"Ausschneiden","plainFormatBlock":"Absatzstil","toggleDir":"Wechselrichtung","bold":"Fett","tabIndent":"Tabulatoreinrückung","justifyRight":"Rechtsbündig","appleKey":"⌘${0}"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/es/LinkDialog.js b/js/dojo/dijit/_editor/nls/es/LinkDialog.js
--- a/js/dojo/dijit/_editor/nls/es/LinkDialog.js
+++ b/js/dojo/dijit/_editor/nls/es/LinkDialog.js
@@ -1,1 +1,1 @@
-({"set": "Establecer", "text": "Texto:", "title": "Enlazar URL", "url": "URL:", "urlInvalidMessage": "URL no válido. Especifique un URL completo como 'http://www.dojotoolkit.org'"})
\ No newline at end of file
+({"text":"Descripción: ","insertImageTitle":"Propiedades de la imagen","set":"Establecer","newWindow":"Nueva ventana","topWindow":"Ventana superior","target":"Destino: ","createLinkTitle":"Propiedades del enlace","parentWindow":"Ventana padre","currentWindow":"Ventana actual","url":"URL:"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/es/commands.js b/js/dojo/dijit/_editor/nls/es/commands.js
--- a/js/dojo/dijit/_editor/nls/es/commands.js
+++ b/js/dojo/dijit/_editor/nls/es/commands.js
@@ -1,1 +1,1 @@
-({"removeFormat": "Eliminar formato", "copy": "Copiar", "paste": "Pegar", "selectAll": "Seleccionar todo", "insertOrderedList": "Lista numerada", "insertTable": "Insertar/Editar tabla", "underline": "Subrayado", "foreColor": "Color de primer plano", "htmlToggle": "Fuente HTML", "formatBlock": "Estilo de párrafo", "insertHorizontalRule": "Regla horizontal", "delete": "Suprimir", "insertUnorderedList": "Lista con viñetas", "tableProp": "Propiedad de tabla", "insertImage": "Insertar imagen", "superscript": "Superíndice", "subscript": "Subíndice", "createLink": "Crear enlace", "undo": "Deshacer", "italic": "Cursiva", "fontName": "Nombre de font", "justifyLeft": "Alinear izquierda", "unlink": "Eliminar enlace", "toggleTableBorder": "Conmutar borde de tabla", "ctrlKey": "Control+${0}", "fontSize": "Tamaño de font", "indent": "Sangría", "redo": "Rehacer", "strikethrough": "Tachado", "justifyFull": "Justificar", "justifyCenter": "Alinear centro", "hiliteColor": "Color de segundo plano", "deleteTable": "Suprimir tabla", "outdent": "Anular sangría", "cut": "Cortar", "plainFormatBlock": "Estilo de párrafo", "bold": "Negrita", "systemShortcutFF": "La acción \"${0}\" sólo está disponible en Mozilla Firefox mediante un atajo de teclado. Utilice ${1}.", "justifyRight": "Alinear derecha", "appleKey": "⌘${0}"})
\ No newline at end of file
+({"removeFormat":"Eliminar formato","copy":"Copiar","paste":"Pegar","selectAll":"Seleccionar todo","insertOrderedList":"Lista numerada","insertTable":"Insertar/Editar tabla","print":"Imprimir","underline":"Subrayado","foreColor":"Color de primer plano","htmlToggle":"Fuente HTML","formatBlock":"Estilo de párrafo","newPage":"Nueva página","insertHorizontalRule":"Regla horizontal","delete":"Suprimir","insertUnorderedList":"Lista con viñetas","tableProp":"Propiedad de tabla","insertImage":"Insertar imagen","superscript":"Superíndice","subscript":"Subíndice","createLink":"Crear enlace","undo":"Deshacer","fullScreen":"Conmutar pantalla completa","italic":"Cursiva","fontName":"Nombre de font","justifyLeft":"Alinear izquierda","unlink":"Eliminar enlace","toggleTableBorder":"Conmutar borde de tabla","viewSource":"Ver fuente HTML","ctrlKey":"control+${0}","fontSize":"Tamaño de font","systemShortcut":"La acción \"${0}\" sólo está disponible en su navegador mediante un atajo de teclado. Utilice ${1}.","indent":"Sangría","redo":"Rehacer","strikethrough":"Tachado","justifyFull":"Justificar","justifyCenter":"Alinear centro","hiliteColor":"Color de segundo plano","deleteTable":"Suprimir tabla","outdent":"Anular sangría","cut":"Cortar","plainFormatBlock":"Estilo de párrafo","toggleDir":"Conmutar dirección","bold":"Negrita","tabIndent":"Sangría de tabulador","justifyRight":"Alinear derecha","appleKey":"⌘${0}"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/fr/LinkDialog.js b/js/dojo/dijit/_editor/nls/fr/LinkDialog.js
--- a/js/dojo/dijit/_editor/nls/fr/LinkDialog.js
+++ b/js/dojo/dijit/_editor/nls/fr/LinkDialog.js
@@ -1,1 +1,1 @@
-({"set": "Définir", "text": "Texte :", "title": "URL du lien", "url": "URL :", "urlInvalidMessage": "Adresse URL non valide. Entrez une adresse URL complète de type 'http://www.dojotoolkit.org'"})
\ No newline at end of file
+({"text":"Description :","insertImageTitle":"Propriétés des images","set":"Définir","newWindow":"Nouvelle fenêtre","topWindow":"Première fenêtre","target":"Cible :","createLinkTitle":"Propriétés des liens","parentWindow":"Fenêtre parent","currentWindow":"Fenêtre en cours","url":"URL :"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/fr/commands.js b/js/dojo/dijit/_editor/nls/fr/commands.js
--- a/js/dojo/dijit/_editor/nls/fr/commands.js
+++ b/js/dojo/dijit/_editor/nls/fr/commands.js
@@ -1,1 +1,1 @@
-({"removeFormat": "Supprimer la mise en forme", "copy": "Copier", "paste": "Coller", "selectAll": "Sélectionner tout", "insertOrderedList": "Liste numérotée", "insertTable": "Insérer/Modifier un tableau", "underline": "Souligner", "foreColor": "Couleur d'avant-plan", "htmlToggle": "Source HTML", "formatBlock": "Style de paragraphe", "insertHorizontalRule": "Règle horizontale", "delete": "Supprimer", "insertUnorderedList": "Liste à puces", "tableProp": "Propriété du tableau", "insertImage": "Insérer une image", "superscript": "Exposant", "subscript": "Indice", "createLink": "Créer un lien", "undo": "Annuler", "italic": "Italique", "fontName": "Nom de police", "justifyLeft": "Aligner à gauche", "unlink": "Supprimer le lien", "toggleTableBorder": "Afficher/Masquer la bordure du tableau", "fontSize": "Taille de police", "indent": "Retrait", "redo": "Rétablir", "strikethrough": "Barrer", "justifyFull": "Justifier", "justifyCenter": "Aligner au centre", "hiliteColor": "Couleur d'arrière-plan", "deleteTable": "Supprimer le tableau", "outdent": "Retrait négatif", "cut": "Couper", "plainFormatBlock": "Style de paragraphe", "bold": "Gras", "systemShortcutFF": "L'action \"${0}\" est disponible dans Mozilla Firefox uniquement, par le biais d'un raccourci-clavier. Utilisez ${1}.", "justifyRight": "Aligner à droite", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"})
\ No newline at end of file
+({"removeFormat":"Supprimer la mise en forme","copy":"Copier","paste":"Coller","selectAll":"Sélectionner tout","insertOrderedList":"Liste numérotée","insertTable":"Insérer/Modifier un tableau","print":"Imprimer","underline":"Souligner","foreColor":"Couleur avant-plan","htmlToggle":"Source HTML","formatBlock":"Style de paragraphe","newPage":"Nouvelle page","insertHorizontalRule":"Règle horizontale","delete":"Supprimer","insertUnorderedList":"Liste à puces","tableProp":"Propriété du tableau","insertImage":"Insérer une image","superscript":"Exposant","subscript":"Indice","createLink":"Créer un lien","undo":"Annuler","fullScreen":"Basculer vers le mode plein écran","italic":"Italique","fontName":"Nom de police","justifyLeft":"Aligner à gauche","unlink":"Supprimer le lien","toggleTableBorder":"Afficher/Masquer la bordure du tableau","viewSource":"Afficher la source HTML","fontSize":"Taille de police","systemShortcut":"Action \"${0}\" uniquement disponible dans votre navigateur via un raccourci clavier. Utilisez ${1}.","indent":"Retrait","redo":"Rétablir","strikethrough":"Barrer","justifyFull":"Justifier","justifyCenter":"Aligner au centre","hiliteColor":"Couleur arrière-plan","deleteTable":"Supprimer le tableau","outdent":"Retrait négatif","cut":"Couper","plainFormatBlock":"Style de paragraphe","toggleDir":"Changer de sens","bold":"Gras","tabIndent":"Retrait de tabulation","justifyRight":"Aligner à droite","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/hu/LinkDialog.js b/js/dojo/dijit/_editor/nls/hu/LinkDialog.js
--- a/js/dojo/dijit/_editor/nls/hu/LinkDialog.js
+++ b/js/dojo/dijit/_editor/nls/hu/LinkDialog.js
@@ -1,1 +1,1 @@
-({"set": "Beállítás", "text": "Szöveg:", "title": "Hivatkozás URL címe", "url": "URL:", "urlInvalidMessage": "Érvénytelen URL cím. Adjon meg teljes URL címet, például: 'http://www.dojotoolkit.org'"})
\ No newline at end of file
+({"text":"Leírás:","insertImageTitle":"Kép tulajdonságai","set":"Beállítás","newWindow":"Új ablak","topWindow":"Legfelső szintű ablak","target":"Cél:","createLinkTitle":"Hivatkozás tulajdonságai","parentWindow":"Szülő ablak","currentWindow":"Aktuális ablak","url":"URL:"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/hu/commands.js b/js/dojo/dijit/_editor/nls/hu/commands.js
--- a/js/dojo/dijit/_editor/nls/hu/commands.js
+++ b/js/dojo/dijit/_editor/nls/hu/commands.js
@@ -1,1 +1,1 @@
-({"removeFormat": "Formázás eltávolítása", "copy": "Másolás", "paste": "Beillesztés", "selectAll": "Összes kijelölése", "insertOrderedList": "Számozott lista", "insertTable": "Táblázat beszúrása/szerkesztése", "underline": "Aláhúzott", "foreColor": "Előtérszín", "htmlToggle": "HTML forrás", "formatBlock": "Bekezdés stílusa", "insertHorizontalRule": "Vízszintes vonalzó", "delete": "Törlés", "insertUnorderedList": "Felsorolásjeles lista", "tableProp": "Táblázat tulajdonságai", "insertImage": "Kép beszúrása", "superscript": "Felső index", "subscript": "Alsó index", "createLink": "Hivatkozás létrehozása", "undo": "Visszavonás", "italic": "Dőlt", "fontName": "Betűtípus", "justifyLeft": "Balra igazítás", "unlink": "Hivatkozás eltávolítása", "toggleTableBorder": "Táblázatszegély ki-/bekapcsolása", "fontSize": "Betűméret", "indent": "Behúzás", "redo": "Újra", "strikethrough": "Áthúzott", "justifyFull": "Sorkizárás", "justifyCenter": "Középre igazítás", "hiliteColor": "Háttérszín", "deleteTable": "Táblázat törlése", "outdent": "Negatív behúzás", "cut": "Kivágás", "plainFormatBlock": "Bekezdés stílusa", "bold": "Félkövér", "systemShortcutFF": "A(z) \"${0}\" művelet csak Mozilla Firefox böngészőben érhető el billentyűparancs használatával. Használja a következőt: ${1}.", "justifyRight": "Jobbra igazítás", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"})
\ No newline at end of file
+({"removeFormat":"Formázás eltávolítása","copy":"Másolás","paste":"Beillesztés","selectAll":"Összes kijelölése","insertOrderedList":"Számozott lista","insertTable":"Táblázat beszúrása/szerkesztése","print":"Nyomtatás","underline":"Aláhúzott","foreColor":"Előtérszín","htmlToggle":"HTML forrás","formatBlock":"Bekezdés stílusa","newPage":"Új oldal","insertHorizontalRule":"Vízszintes vonalzó","delete":"Törlés","insertUnorderedList":"Felsorolásjeles lista","tableProp":"Táblázat tulajdonságai","insertImage":"Kép beszúrása","superscript":"Felső index","subscript":"Alsó index","createLink":"Hivatkozás létrehozása","undo":"Visszavonás","fullScreen":"Váltás teljes képernyőre","italic":"Dőlt","fontName":"Betűtípus","justifyLeft":"Balra igazítás","unlink":"Hivatkozás eltávolítása","toggleTableBorder":"Táblázatszegély ki-/bekapcsolása","viewSource":"HTML forrás megjelenítése","fontSize":"Betűméret","systemShortcut":"A(z) \"${0}\" művelet a böngészőben csak billentyűparancs használatával érhető el. Használja a következőt: ${1}.","indent":"Behúzás","redo":"Újra","strikethrough":"Áthúzott","justifyFull":"Sorkizárás","justifyCenter":"Középre igazítás","hiliteColor":"Háttérszín","deleteTable":"Táblázat törlése","outdent":"Negatív behúzás","cut":"Kivágás","plainFormatBlock":"Bekezdés stílusa","toggleDir":"Irány váltókapcsoló","bold":"Félkövér","tabIndent":"Tab behúzás","justifyRight":"Jobbra igazítás","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/it/LinkDialog.js b/js/dojo/dijit/_editor/nls/it/LinkDialog.js
--- a/js/dojo/dijit/_editor/nls/it/LinkDialog.js
+++ b/js/dojo/dijit/_editor/nls/it/LinkDialog.js
@@ -1,1 +1,1 @@
-({"set": "Imposta", "text": "Testo:", "title": "URL di collegamento", "url": "URL:", "urlInvalidMessage": "URL non valido. Immettere un URL completo come nel seguente esempio: 'http://www.dojotoolkit.org'"})
\ No newline at end of file
+({"text":"Descrizione:","insertImageTitle":"Proprietà immagine","set":"Imposta","newWindow":"Nuova finestra","topWindow":"Finestra superiore","target":"Destinazione:","createLinkTitle":"Proprietà collegamento","parentWindow":"Finestra padre","currentWindow":"Finestra corrente","url":"URL:"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/it/commands.js b/js/dojo/dijit/_editor/nls/it/commands.js
--- a/js/dojo/dijit/_editor/nls/it/commands.js
+++ b/js/dojo/dijit/_editor/nls/it/commands.js
@@ -1,1 +1,1 @@
-({"removeFormat": "Rimuovi formato", "copy": "Copia", "paste": "Incolla", "selectAll": "Seleziona tutto", "insertOrderedList": "Elenco numerato", "insertTable": "Inserisci/Modifica tabella", "underline": "Sottolineato", "foreColor": "Colore primo piano", "htmlToggle": "Origine HTML", "formatBlock": "Stile paragrafo", "insertHorizontalRule": "Righello orizzontale", "delete": "Elimina", "insertUnorderedList": "Elenco puntato", "tableProp": "Proprietà tabella", "insertImage": "Inserisci immagine", "superscript": "Apice", "subscript": "Pedice", "createLink": "Crea collegamento", "undo": "Annulla", "italic": "Corsivo", "fontName": "Nome carattere", "justifyLeft": "Allinea a sinistra", "unlink": "Rimuovi collegamento", "toggleTableBorder": "Mostra/Nascondi margine tabella", "fontSize": "Dimensione carattere", "indent": "Rientra", "redo": "Ripristina", "strikethrough": "Barrato", "justifyFull": "Giustifica", "justifyCenter": "Allinea al centro", "hiliteColor": "Colore sfondo", "deleteTable": "Elimina tabella", "outdent": "Rimuovi rientro", "cut": "Taglia", "plainFormatBlock": "Stile paragrafo", "bold": "Grassetto", "systemShortcutFF": "L'azione \"${0}\" è disponibile solo in Mozilla Firefox tramite tasti di scelta rapida. Utilizzare ${1}.", "justifyRight": "Allinea a destra", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"})
\ No newline at end of file
+({"removeFormat":"Rimuovi formato","copy":"Copia","paste":"Incolla","selectAll":"Seleziona tutto","insertOrderedList":"Elenco numerato","insertTable":"Inserisci/Modifica tabella","print":"Stampa","underline":"Sottolinea","foreColor":"Colore primo piano","htmlToggle":"Origine HTML","formatBlock":"Stile paragrafo","newPage":"Nuova pagina","insertHorizontalRule":"Righello orizzontale","delete":"Elimina","insertUnorderedList":"Elenco puntato","tableProp":"Proprietà tabella","insertImage":"Inserisci immagine","superscript":"Apice","subscript":"Pedice","createLink":"Crea collegamento","undo":"Annulla","fullScreen":"Attiva/Disattiva schermo intero","italic":"Corsivo","fontName":"Nome carattere","justifyLeft":"Allinea a sinistra","unlink":"Rimuovi collegamento","toggleTableBorder":"Attiva/Disattiva bordo tabella","viewSource":"Visualizza origine HTML","fontSize":"Dimensione carattere","systemShortcut":"La azione \"${0}\" è disponibile solo nel browser tramite un tasto di scelta rapida. Utilizzare ${1}.","indent":"Rientro","redo":"Ripristina","strikethrough":"Barrato","justifyFull":"Giustifica","justifyCenter":"Allinea al centro","hiliteColor":"Colore sfondo","deleteTable":"Elimina tabella","outdent":"Annulla rientro","cut":"Taglia","plainFormatBlock":"Stile paragrafo","toggleDir":"Attiva/Disattiva direzione","bold":"Grassetto","tabIndent":"Rientro tabulazione","justifyRight":"Allinea a destra","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/ja/LinkDialog.js b/js/dojo/dijit/_editor/nls/ja/LinkDialog.js
--- a/js/dojo/dijit/_editor/nls/ja/LinkDialog.js
+++ b/js/dojo/dijit/_editor/nls/ja/LinkDialog.js
@@ -1,1 +1,1 @@
-({"set": "設定", "text": "テキスト:", "title": "URL にリンク", "url": "URL:", "urlInvalidMessage": "無効な URL です。完全な URL (例えば、http://www.dojotoolkit.org) を入力してください。"})
\ No newline at end of file
+({"text":"説明:","insertImageTitle":"イメージ・プロパティー","set":"設定","newWindow":"新規ウィンドウ","topWindow":"最上位ウィンドウ","target":"ターゲット:","createLinkTitle":"リンク・プロパティー","parentWindow":"親ウィンドウ","currentWindow":"現行ウィンドウ","url":"URL:"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/ja/commands.js b/js/dojo/dijit/_editor/nls/ja/commands.js
--- a/js/dojo/dijit/_editor/nls/ja/commands.js
+++ b/js/dojo/dijit/_editor/nls/ja/commands.js
@@ -1,1 +1,1 @@
-({"removeFormat": "形式の除去", "copy": "コピー", "paste": "貼り付け", "selectAll": "すべて選択", "insertOrderedList": "番号付きリスト", "insertTable": "テーブルの挿入/編集", "underline": "下線", "foreColor": "前景色", "htmlToggle": "HTML ソース", "formatBlock": "段落スタイル", "insertHorizontalRule": "水平罫線", "delete": "削除", "insertUnorderedList": "黒丸付きリスト", "tableProp": "テーブル・プロパティー", "insertImage": "イメージの挿入", "superscript": "上付き文字", "subscript": "下付き文字", "createLink": "リンクの作成", "undo": "元に戻す", "italic": "イタリック", "fontName": "フォント名", "justifyLeft": "左揃え", "unlink": "リンクの除去", "toggleTableBorder": "テーブル・ボーダーの切り替え", "fontSize": "フォント・サイズ", "indent": "インデント", "redo": "やり直し", "strikethrough": "取り消し線", "justifyFull": "両端揃え", "justifyCenter": "中央揃え", "hiliteColor": "背景色", "deleteTable": "テーブルの削除", "outdent": "アウトデント", "cut": "切り取り", "plainFormatBlock": "段落スタイル", "bold": "太字", "systemShortcutFF": "\"${0}\" アクションは、キーボード・ショートカットを使用して Mozilla Firefox でのみ使用できます。${1} を使用してください。", "justifyRight": "右揃え", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"})
\ No newline at end of file
+({"removeFormat":"形式の除去","copy":"コピー","paste":"貼り付け","selectAll":"すべて選択","insertOrderedList":"番号付きリスト","insertTable":"テーブルの挿入/編集","print":"印刷","underline":"下線","foreColor":"前景色","htmlToggle":"HTML ソース","formatBlock":"段落スタイル","newPage":"改ページ","insertHorizontalRule":"水平罫線","delete":"削除","insertUnorderedList":"黒丸付きリスト","tableProp":"テーブル・プロパティー","insertImage":"イメージの挿入","superscript":"上付き文字","subscript":"下付き文字","createLink":"リンクの作成","undo":"元に戻す","fullScreen":"フルスクリーンの切り替え","italic":"イタリック","fontName":"フォント名","justifyLeft":"左揃え","unlink":"リンクの除去","toggleTableBorder":"テーブル・ボーダーの切り替え","viewSource":"HTML ソースの表示","fontSize":"フォント・サイズ","systemShortcut":"\"${0}\" アクションは、キーボード・ショートカットを使用して、ブラウザーでのみ使用できます。${1} を使用します。","indent":"インデント","redo":"やり直し","strikethrough":"取り消し線","justifyFull":"両端揃え","justifyCenter":"中央揃え","hiliteColor":"背景色","deleteTable":"テーブルの削除","outdent":"アウトデント","cut":"切り取り","plainFormatBlock":"段落スタイル","toggleDir":"方向の切り替え","bold":"太字","tabIndent":"タブ・インデント","justifyRight":"右揃え","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/ko/LinkDialog.js b/js/dojo/dijit/_editor/nls/ko/LinkDialog.js
--- a/js/dojo/dijit/_editor/nls/ko/LinkDialog.js
+++ b/js/dojo/dijit/_editor/nls/ko/LinkDialog.js
@@ -1,1 +1,1 @@
-({"set": "설정", "text": "텍스트:", "title": "URL 링크", "url": "URL:", "urlInvalidMessage": "유효하지 않은 URL입니다. 'http://www.dojotoolkit.org'와 같이 전체 URL을 입력하십시오. "})
\ No newline at end of file
+({"text":"설명:","insertImageTitle":"이미지 특성","set":"설정","newWindow":"새 창","topWindow":"최상위 창","target":"대상:","createLinkTitle":"링크 특성","parentWindow":"상위 창","currentWindow":"현재 창","url":"URL:"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/ko/commands.js b/js/dojo/dijit/_editor/nls/ko/commands.js
--- a/js/dojo/dijit/_editor/nls/ko/commands.js
+++ b/js/dojo/dijit/_editor/nls/ko/commands.js
@@ -1,1 +1,1 @@
-({"removeFormat": "형식 제거", "copy": "복사", "paste": "붙여넣기", "selectAll": "모두 선택", "insertOrderedList": "번호 목록", "insertTable": "테이블 삽입/편집", "underline": "밑줄", "foreColor": "전경색", "htmlToggle": "HTML 소스", "formatBlock": "단락 양식", "insertHorizontalRule": "수평 자", "delete": "삭제", "insertUnorderedList": "글머리표 목록", "tableProp": "테이블 특성", "insertImage": "이미지 삽입", "superscript": "위첨자", "subscript": "아래첨자", "createLink": "링크 작성", "undo": "실행 취소", "italic": "이탤릭체", "fontName": "글꼴 이름", "justifyLeft": "왼쪽 맞춤", "unlink": "링크 제거", "toggleTableBorder": "토글 테이블 경계", "fontSize": "글꼴 크기", "indent": "들여쓰기", "redo": "다시 실행", "strikethrough": "취소선", "justifyFull": "양쪽 맞춤", "justifyCenter": "가운데 맞춤", "hiliteColor": "배경색", "deleteTable": "테이블 삭제", "outdent": "내어쓰기", "cut": "잘라내기", "plainFormatBlock": "단락 양식", "bold": "굵은체", "systemShortcutFF": "\"${0}\" 조치는 키보드 바로 가기를 사용하는 Mozilla Firefox에서만 사용 가능합니다. ${1} 사용.", "justifyRight": "오른쪽 맞춤", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"})
\ No newline at end of file
+({"removeFormat":"형식 제거","copy":"복사","paste":"붙여넣기","selectAll":"모두 선택","insertOrderedList":"번호 목록","insertTable":"테이블 삽입/편집","print":"인쇄","underline":"밑줄","foreColor":"전경색","htmlToggle":"HTML 소스","formatBlock":"단락 스타일","newPage":"새 페이지","insertHorizontalRule":"수평 자","delete":"삭제","insertUnorderedList":"글머리표 목록","tableProp":"테이블 특성","insertImage":"이미지 삽입","superscript":"위첨자","subscript":"아래첨자","createLink":"링크 작성","undo":"실행 취소","fullScreen":"토글 전체 화면","italic":"기울임체","fontName":"글꼴 이름","justifyLeft":"왼쪽 맞춤","unlink":"링크 제거","toggleTableBorder":"토글 테이블 테두리","viewSource":"HTML 소스 보기","fontSize":"글꼴 크기","systemShortcut":"\"${0}\" 조치는 브라우저에서 키보드 단축키를 이용해서만 사용할 수 있습니다. ${1}을(를) 사용하십시오.","indent":"들여쓰기","redo":"다시 실행","strikethrough":"취소선","justifyFull":"양쪽 맞춤","justifyCenter":"가운데 맞춤","hiliteColor":"배경색","deleteTable":"테이블 삭제","outdent":"내어쓰기","cut":"잘라내기","plainFormatBlock":"단락 스타일","toggleDir":"토글 방향","bold":"굵은체","tabIndent":"탭 들여쓰기","justifyRight":"오른쪽 맞춤","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/pl/LinkDialog.js b/js/dojo/dijit/_editor/nls/pl/LinkDialog.js
--- a/js/dojo/dijit/_editor/nls/pl/LinkDialog.js
+++ b/js/dojo/dijit/_editor/nls/pl/LinkDialog.js
@@ -1,1 +1,1 @@
-({"set": "Ustaw", "text": "Tekst:", "title": "Adres URL odsyłacza", "url": "Adres URL:", "urlInvalidMessage": "Nieprawidłowy adres URL. Wprowadź pełny adres URL, na przykład http://www.dojotoolkit.org."})
\ No newline at end of file
+({"text":"Opis:","insertImageTitle":"Właściwości obrazu","set":"Ustaw","newWindow":"Nowe okno","topWindow":"Okno najwyższego poziomu","target":"Cel:","createLinkTitle":"Właściwości odsyłacza","parentWindow":"Okno macierzyste","currentWindow":"Bieżące okno","url":"Adres URL:"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/pl/commands.js b/js/dojo/dijit/_editor/nls/pl/commands.js
--- a/js/dojo/dijit/_editor/nls/pl/commands.js
+++ b/js/dojo/dijit/_editor/nls/pl/commands.js
@@ -1,1 +1,1 @@
-({"removeFormat": "Usuń formatowanie", "copy": "Kopiuj", "paste": "Wklej", "selectAll": "Wybierz wszystko", "insertOrderedList": "Lista numerowana", "insertTable": "Wstaw/edytuj tabelę", "underline": "Podkreślenie", "foreColor": "Kolor pierwszego planu", "htmlToggle": "Źródło HTML", "formatBlock": "Styl akapitu", "insertHorizontalRule": "Linia pozioma", "delete": "Usuń", "insertUnorderedList": "Lista wypunktowana", "tableProp": "Właściwość tabeli", "insertImage": "Wstaw obraz", "superscript": "Indeks górny", "subscript": "Indeks dolny", "createLink": "Utwórz odsyłacz", "undo": "Cofnij", "italic": "Kursywa", "fontName": "Nazwa czcionki", "justifyLeft": "Wyrównaj do lewej", "unlink": "Usuń odsyłacz", "toggleTableBorder": "Przełącz ramkę tabeli", "fontSize": "Wielkość czcionki", "indent": "Wcięcie", "redo": "Przywróć", "strikethrough": "Przekreślenie", "justifyFull": "Wyrównaj do lewej i prawej", "justifyCenter": "Wyrównaj do środka", "hiliteColor": "Kolor tła", "deleteTable": "Usuń tabelę", "outdent": "Usuń wcięcie", "cut": "Wytnij", "plainFormatBlock": "Styl akapitu", "bold": "Pogrubienie", "systemShortcutFF": "Działanie ${0} jest dostępne w przeglądarce Mozilla Firefox wyłącznie za pomocą skrótu klawiaturowego. Użyj ${1}.", "justifyRight": "Wyrównaj do prawej", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"})
\ No newline at end of file
+({"removeFormat":"Usuń formatowanie","copy":"Kopiuj","paste":"Wklej","selectAll":"Wybierz wszystko","insertOrderedList":"Lista numerowana","insertTable":"Wstaw/edytuj tabelę","print":"Drukuj","underline":"Podkreślenie","foreColor":"Kolor pierwszego planu","htmlToggle":"Źródło HTML","formatBlock":"Styl akapitu","newPage":"Nowa strona","insertHorizontalRule":"Linia pozioma","delete":"Usuń","insertUnorderedList":"Lista wypunktowana","tableProp":"Właściwość tabeli","insertImage":"Wstaw obraz","superscript":"Indeks górny","subscript":"Indeks dolny","createLink":"Utwórz odsyłacz","undo":"Cofnij","fullScreen":"Przełącz pełny ekran","italic":"Kursywa","fontName":"Nazwa czcionki","justifyLeft":"Wyrównaj do lewej","unlink":"Usuń odsyłacz","toggleTableBorder":"Przełącz ramkę tabeli","viewSource":"Wyświetl kod źródłowy HTML","ctrlKey":"Ctrl+${0}","fontSize":"Wielkość czcionki","systemShortcut":"Działanie ${0} jest dostępne w tej przeglądarce wyłącznie przy użyciu skrótu klawiaturowego. Należy użyć klawiszy ${1}.","indent":"Wcięcie","redo":"Ponów","strikethrough":"Przekreślenie","justifyFull":"Wyrównaj do lewej i prawej","justifyCenter":"Wyrównaj do środka","hiliteColor":"Kolor tła","deleteTable":"Usuń tabelę","outdent":"Usuń wcięcie","cut":"Wytnij","plainFormatBlock":"Styl akapitu","toggleDir":"Przełącz kierunek","bold":"Pogrubienie","tabIndent":"Wcięcie o tabulator","justifyRight":"Wyrównaj do prawej","appleKey":"⌘${0}"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/pt/LinkDialog.js b/js/dojo/dijit/_editor/nls/pt/LinkDialog.js
--- a/js/dojo/dijit/_editor/nls/pt/LinkDialog.js
+++ b/js/dojo/dijit/_editor/nls/pt/LinkDialog.js
@@ -1,1 +1,1 @@
-({"set": "Definir\n", "text": "Texto:\n", "title": "Vincular URL", "url": "URL:", "urlInvalidMessage": "URL inválida. Digite uma URL completa, como 'http://www.dojotoolkit.org'"})
\ No newline at end of file
+({"text":"Descrição:","insertImageTitle":"Propriedades de Imagem","set":"Definir","newWindow":"Nova Janela","topWindow":"Primeira Janela","target":"Destino:","createLinkTitle":"Propriedades de Link","parentWindow":"Janela Pai","currentWindow":"Janela Atual","url":"URL:"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/pt/commands.js b/js/dojo/dijit/_editor/nls/pt/commands.js
--- a/js/dojo/dijit/_editor/nls/pt/commands.js
+++ b/js/dojo/dijit/_editor/nls/pt/commands.js
@@ -1,1 +1,1 @@
-({"removeFormat": "Remover Formato", "copy": "Copiar", "paste": "Colar", "selectAll": "Selecionar Todos", "insertOrderedList": "Lista Numerada", "insertTable": "Inserir/Editar Tabela", "underline": "Sublinhado", "foreColor": "Cor do Primeiro Plano", "htmlToggle": "Origem HTML", "formatBlock": "Estilo de Parágrafo", "insertHorizontalRule": "Régua Horizontal", "delete": "Excluir ", "insertUnorderedList": "Lista com Marcadores", "tableProp": "Propriedade da Tabela", "insertImage": "Inserir Imagem", "superscript": "Sobrescrito", "subscript": "Subscrito", "createLink": "Criar Link", "undo": "Desfazer", "italic": "Itálico", "fontName": "Nome da Fonte", "justifyLeft": "Alinhar pela Esquerda", "unlink": "Remover Link", "toggleTableBorder": "Alternar Moldura da Tabela", "fontSize": "Tamanho da Fonte", "indent": "Recuar", "redo": "Refazer", "strikethrough": "Tachado", "justifyFull": "Justificar", "justifyCenter": "Alinhar pelo Centro", "hiliteColor": "Cor de segundo plano", "deleteTable": "Excluir Tabela", "outdent": "Avançar", "cut": "Recortar", "plainFormatBlock": "Estilo de Parágrafo", "bold": "Negrito", "systemShortcutFF": "A ação \"${0}\" está disponível apenas no Mozilla Firefox utilizando um atalho do teclado. Utilize ${1}.", "justifyRight": "Alinhar pela Direita", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"})
\ No newline at end of file
+({"removeFormat":"Remover Formato","copy":"Copiar","paste":"Colar","selectAll":"Selecionar Todos","insertOrderedList":"Lista Numerada","insertTable":"Inserir/Editar Tabela","print":"Impressão","underline":"Sublinhado","foreColor":"Cor do Primeiro Plano","htmlToggle":"Origem HTML","formatBlock":"Estilo de Parágrafo","newPage":"Nova Página","insertHorizontalRule":"Régua Horizontal","delete":"Excluir","insertUnorderedList":"Lista com Marcadores","tableProp":"Propriedade da Tabela","insertImage":"Inserir Imagem","superscript":"Sobrescrito","subscript":"Subscrito","createLink":"Criar Link","undo":"Desfazer","fullScreen":"Comutar Tela Cheia","italic":"Itálico","fontName":"Nome da Fonte","justifyLeft":"Alinhar pela Esquerda","unlink":"Remover Link","toggleTableBorder":"Alternar Moldura da Tabela","viewSource":"Visualizar Origem HTML","fontSize":"Tamanho da Fonte","systemShortcut":"A ação \"${0}\" está disponível em seu navegador apenas usando um atalho do teclado. Use ${1}.","indent":"Recuar","redo":"Refazer","strikethrough":"Tachado","justifyFull":"Justificar","justifyCenter":"Alinhar pelo Centro","hiliteColor":"Cor de segundo plano","deleteTable":"Excluir Tabela","outdent":"Não-chanfrado","cut":"Recortar","plainFormatBlock":"Estilo de Parágrafo","toggleDir":"Comutar Direção","bold":"Negrito","tabIndent":"Recuo de Guia","justifyRight":"Alinhar pela Direita","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/ru/LinkDialog.js b/js/dojo/dijit/_editor/nls/ru/LinkDialog.js
--- a/js/dojo/dijit/_editor/nls/ru/LinkDialog.js
+++ b/js/dojo/dijit/_editor/nls/ru/LinkDialog.js
@@ -1,1 +1,1 @@
-({"set": "Задать", "text": "Текст:", "title": "URL ссылки", "url": "URL:", "urlInvalidMessage": "Недопустимый адрес URL. Укажите полный URL, например: 'http://www.dojotoolkit.org'"})
\ No newline at end of file
+({"text":"Описание:","insertImageTitle":"Свойства изображения","set":"Задать","newWindow":"Новое окно","topWindow":"Окно верхнего уровня","target":"Целевой объект:","createLinkTitle":"Свойства ссылки","parentWindow":"Родительское окно","currentWindow":"Текущее окно","url":"URL:"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/ru/commands.js b/js/dojo/dijit/_editor/nls/ru/commands.js
--- a/js/dojo/dijit/_editor/nls/ru/commands.js
+++ b/js/dojo/dijit/_editor/nls/ru/commands.js
@@ -1,1 +1,1 @@
-({"removeFormat": "Удалить формат", "copy": "Копировать", "paste": "Вставить", "selectAll": "Выбрать все", "insertOrderedList": "Нумерованный список", "insertTable": "Вставить/изменить таблицу", "underline": "Подчеркивание", "foreColor": "Цвет текста", "htmlToggle": "Код HTML", "formatBlock": "Стиль абзаца", "insertHorizontalRule": "Горизонтальная линейка", "delete": "Удалить", "insertUnorderedList": "Список с маркерами", "tableProp": "Свойства таблицы", "insertImage": "Вставить изображение", "superscript": "Верхний индекс", "subscript": "Нижний индекс", "createLink": "Создать ссылку", "undo": "Отменить", "italic": "Курсив", "fontName": "Название шрифта", "justifyLeft": "По левому краю", "unlink": "Удалить ссылку", "toggleTableBorder": "Переключить рамку таблицы", "fontSize": "Размер шрифта", "indent": "Отступ", "redo": "Повторить", "strikethrough": "Перечеркивание", "justifyFull": "По ширине", "justifyCenter": "По центру", "hiliteColor": "Цвет фона", "deleteTable": "Удалить таблицу", "outdent": "Втяжка", "cut": "Вырезать", "plainFormatBlock": "Стиль абзаца", "bold": "Полужирный", "systemShortcutFF": "Действие \"${0}\" доступно в Mozilla Firefox только через сочетание клавиш. Используйте ${1}.", "justifyRight": "По правому краю", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"})
\ No newline at end of file
+({"removeFormat":"Удалить формат","copy":"Копировать","paste":"Вставить","selectAll":"Выбрать все","insertOrderedList":"Нумерованный список","insertTable":"Вставить/изменить таблицу","print":"Печать","underline":"Подчеркивание","foreColor":"Цвет текста","htmlToggle":"Код HTML","formatBlock":"Стиль абзаца","newPage":"Создать страницу","insertHorizontalRule":"Горизонтальная линейка","delete":"Удалить","insertUnorderedList":"Список с маркерами","tableProp":"Свойства таблицы","insertImage":"Вставить изображение","superscript":"Верхний индекс","subscript":"Нижний индекс","createLink":"Создать ссылку","undo":"Отменить","fullScreen":"Переключить полноэкранный режим","italic":"Курсив","fontName":"Название шрифта","justifyLeft":"По левому краю","unlink":"Удалить ссылку","toggleTableBorder":"Переключить рамку таблицы","viewSource":"Показать исходный код HTML","fontSize":"Размер шрифта","systemShortcut":"Действие \"${0}\" можно выполнить в браузере только путем нажатия клавиш ${1}.","indent":"Отступ","redo":"Повторить","strikethrough":"Перечеркивание","justifyFull":"По ширине","justifyCenter":"По центру","hiliteColor":"Цвет фона","deleteTable":"Удалить таблицу","outdent":"Втяжка","cut":"Вырезать","plainFormatBlock":"Стиль абзаца","toggleDir":"Изменить направление","bold":"Полужирный","tabIndent":"Табуляция","justifyRight":"По правому краю","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/zh-tw/LinkDialog.js b/js/dojo/dijit/_editor/nls/zh-tw/LinkDialog.js
--- a/js/dojo/dijit/_editor/nls/zh-tw/LinkDialog.js
+++ b/js/dojo/dijit/_editor/nls/zh-tw/LinkDialog.js
@@ -1,1 +1,1 @@
-({"set": "設定", "text": "文字:", "title": "鏈結 URL", "url": "URL:", "urlInvalidMessage": "URL 無效。請輸入完整的 URL,例如 'http://www.dojotoolkit.org'"})
\ No newline at end of file
+({"text":"說明:","insertImageTitle":"影像內容","set":"設定","newWindow":"新視窗","topWindow":"最上層視窗","target":"目標:","createLinkTitle":"鏈結內容","parentWindow":"上層視窗","currentWindow":"現行視窗","url":"URL:"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/zh-tw/commands.js b/js/dojo/dijit/_editor/nls/zh-tw/commands.js
--- a/js/dojo/dijit/_editor/nls/zh-tw/commands.js
+++ b/js/dojo/dijit/_editor/nls/zh-tw/commands.js
@@ -1,1 +1,1 @@
-({"removeFormat": "移除格式", "copy": "複製", "paste": "貼上", "selectAll": "全選", "insertOrderedList": "編號清單", "insertTable": "插入/編輯表格", "underline": "底線", "foreColor": "前景顏色", "htmlToggle": "HTML 原始檔", "formatBlock": "段落樣式", "insertHorizontalRule": "水平尺規", "delete": "刪除", "insertUnorderedList": "項目符號清單", "tableProp": "表格內容", "insertImage": "插入影像", "superscript": "上標", "subscript": "下標", "createLink": "建立鏈結", "undo": "復原", "italic": "斜體", "fontName": "字型名稱", "justifyLeft": "靠左對齊", "unlink": "移除鏈結", "toggleTableBorder": "切換表格邊框", "fontSize": "字型大小", "indent": "縮排", "redo": "重做", "strikethrough": "加刪除線", "justifyFull": "對齊", "justifyCenter": "置中對齊", "hiliteColor": "背景顏色", "deleteTable": "刪除表格", "outdent": "凸排", "cut": "剪下", "plainFormatBlock": "段落樣式", "bold": "粗體", "systemShortcutFF": "\"${0}\" 動作在 Mozilla Firefox 中,只能使用鍵盤快速鍵。請使用 ${1}。", "justifyRight": "靠右對齊", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"})
\ No newline at end of file
+({"removeFormat":"移除格式","copy":"複製","paste":"貼上","selectAll":"全選","insertOrderedList":"編號清單","insertTable":"插入/編輯表格","print":"列印","underline":"底線","foreColor":"前景顏色","htmlToggle":"HTML 原始檔","formatBlock":"段落樣式","newPage":"新建頁面","insertHorizontalRule":"水平尺規","delete":"刪除","insertUnorderedList":"項目符號清單","tableProp":"表格內容","insertImage":"插入影像","superscript":"上標","subscript":"下標","createLink":"建立鏈結","undo":"復原","fullScreen":"切換全螢幕","italic":"斜體","fontName":"字型名稱","justifyLeft":"靠左對齊","unlink":"移除鏈結","toggleTableBorder":"切換表格邊框","viewSource":"檢視 HTML 原始檔","fontSize":"字型大小","systemShortcut":"\"${0}\" 動作只能在瀏覽器中透過使用鍵盤快速鍵來使用。請使用 ${1}。","indent":"縮排","redo":"重做","strikethrough":"加刪除線","justifyFull":"對齊","justifyCenter":"置中對齊","hiliteColor":"背景顏色","deleteTable":"刪除表格","outdent":"凸排","cut":"剪下","plainFormatBlock":"段落樣式","toggleDir":"切換方向","bold":"粗體","tabIndent":"定位點縮排","justifyRight":"靠右對齊","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/zh/LinkDialog.js b/js/dojo/dijit/_editor/nls/zh/LinkDialog.js
--- a/js/dojo/dijit/_editor/nls/zh/LinkDialog.js
+++ b/js/dojo/dijit/_editor/nls/zh/LinkDialog.js
@@ -1,1 +1,1 @@
-({"set": "设定", "text": "文本:", "title": "链接 URL", "url": "URL:", "urlInvalidMessage": "URL 无效。请输入完整的 URL,如“http://www.dojotoolkit.org”"})
\ No newline at end of file
+({"text":"描述:","insertImageTitle":"图像属性","set":"设置","newWindow":"新窗口","topWindow":"最顶部窗口","target":"目标:","createLinkTitle":"链接属性","parentWindow":"父窗口","currentWindow":"当前窗口","url":"URL:"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/nls/zh/commands.js b/js/dojo/dijit/_editor/nls/zh/commands.js
--- a/js/dojo/dijit/_editor/nls/zh/commands.js
+++ b/js/dojo/dijit/_editor/nls/zh/commands.js
@@ -1,1 +1,1 @@
-({"removeFormat": "除去格式", "copy": "复制", "paste": "粘贴", "selectAll": "全选", "insertOrderedList": "编号列表", "insertTable": "插入/编辑表", "underline": "下划线", "foreColor": "前景色", "htmlToggle": "HTML 源代码", "formatBlock": "段落样式", "insertHorizontalRule": "水平线", "delete": "删除", "insertUnorderedList": "符号列表", "tableProp": "表属性", "insertImage": "插入图像", "superscript": "上标", "subscript": "下标", "createLink": "创建链接", "undo": "撤销", "italic": "斜体", "fontName": "字体名称", "justifyLeft": "左对齐", "unlink": "除去链接", "toggleTableBorder": "切换表边框", "fontSize": "字体大小", "indent": "增加缩进", "redo": "重做", "strikethrough": "删除线", "justifyFull": "对齐", "justifyCenter": "居中", "hiliteColor": "背景色", "deleteTable": "删除表", "outdent": "减少缩进", "cut": "剪切", "plainFormatBlock": "段落样式", "bold": "粗体", "systemShortcutFF": "只能在 Mozilla Firefox 中通过键盘快捷方式执行“${0}”操作。请使用 ${1}。", "justifyRight": "右对齐", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"})
\ No newline at end of file
+({"removeFormat":"除去格式","copy":"复制","paste":"粘贴","selectAll":"全选","insertOrderedList":"编号列表","insertTable":"插入/编辑表","print":"打印","underline":"下划线","foreColor":"前景色","htmlToggle":"HTML 源代码","formatBlock":"段落样式","newPage":"新建页面","insertHorizontalRule":"水平线","delete":"删除","insertUnorderedList":"符号列表","tableProp":"表属性","insertImage":"插入图像","superscript":"上标","subscript":"下标","createLink":"创建链接","undo":"撤销","fullScreen":"切换全屏","italic":"斜体","fontName":"字体名称","justifyLeft":"左对齐","unlink":"除去链接","toggleTableBorder":"切换表边框","viewSource":"查看 HTML 源代码","fontSize":"字体大小","systemShortcut":"只能通过使用键盘快捷键在浏览器中执行 \"${0}\" 操作。请使用 ${1}。","indent":"增加缩进","redo":"重做","strikethrough":"删除线","justifyFull":"对齐","justifyCenter":"居中","hiliteColor":"背景色","deleteTable":"删除表","outdent":"减少缩进","cut":"剪切","plainFormatBlock":"段落样式","toggleDir":"切换方向","bold":"粗体","tabIndent":"制表符缩进","justifyRight":"右对齐","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"})
\ No newline at end of file
diff --git a/js/dojo/dijit/_editor/plugins/AlwaysShowToolbar.js b/js/dojo/dijit/_editor/plugins/AlwaysShowToolbar.js
--- a/js/dojo/dijit/_editor/plugins/AlwaysShowToolbar.js
+++ b/js/dojo/dijit/_editor/plugins/AlwaysShowToolbar.js
@@ -1,147 +1,119 @@
-if(!dojo._hasResource["dijit._editor.plugins.AlwaysShowToolbar"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._editor.plugins.AlwaysShowToolbar"] = true;
-dojo.provide("dijit._editor.plugins.AlwaysShowToolbar");
-
-dojo.declare("dijit._editor.plugins.AlwaysShowToolbar", null,
- {
- _handleScroll: true,
- setEditor: function(e){
- this.editor=e;
-// setTimeout(dojo.hitch(this,this.enable),10000);
- e.onLoadDeferred.addCallback(dojo.hitch(this,this.enable));
-// this.scrollInterval = setInterval(dojo.hitch(this, "globalOnScrollHandler"), 100);
- },
- enable: function(d){
- this._updateHeight();
- this._connects=[dojo.connect(window,'onscroll',this,"globalOnScrollHandler"),
- dojo.connect(this.editor,'onNormalizedDisplayChanged',this,"_updateHeight")];
- return d;
- },
- _updateHeight: function(){
- // summary:
- // Updates the height of the editor area to fit the contents.
- var e=this.editor;
- if(!e.isLoaded){ return; }
- if(e.height){ return; }
-
- var height = dojo.marginBox(e.editNode).h;
- if(dojo.isOpera){
- height = e.editNode.scrollHeight;
- }
- // console.debug('height',height);
- // alert(this.editNode);
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- //height maybe zero in some cases even though the content is not empty,
- //we try the height of body instead
- if(!height){
- height = dojo.marginBox(e.document.body).h;
- }
-
- if(height == 0){
- console.debug("Can not figure out the height of the editing area!");
- return; //prevent setting height to 0
- }
- if(height != this._lastHeight){
- this._lastHeight = height;
- // this.editorObject.style.height = this._lastHeight + "px";
- dojo.marginBox(e.iframe, { h: this._lastHeight });
-// this.iframe.height=this._lastHeight+10+'px';
-// this.iframe.style.height=this._lastHeight+'px';
- }
- },
- _lastHeight: 0,
- globalOnScrollHandler: function(){
- var isIE = dojo.isIE && dojo.isIE<7;
- if(!this._handleScroll){ return; }
- var tdn = this.editor.toolbar.domNode;
- var db = dojo.body;
-
- if(!this._scrollSetUp){
- this._scrollSetUp = true;
- this._scrollThreshold = dojo._abs(tdn, true).y;
-// console.log("threshold:", this._scrollThreshold);
- //what's this for?? comment out for now
-// if((isIE)&&(db)&&(dojo.style(db, "backgroundIimage")=="none")){
-// db.style.backgroundImage = "url(" + dojo.uri.moduleUri("dijit", "templates/blank.gif") + ")";
-// db.style.backgroundAttachment = "fixed";
-// }
- }
-
- var scrollPos = dojo._docScroll().y;
- if(scrollPos > this._scrollThreshold && scrollPos < this._scrollThreshold+this._lastHeight){
- // dojo.debug(scrollPos);
- if(!this._fixEnabled){
- var tdnbox = dojo.marginBox(tdn);
- this.editor.iframe.style.marginTop = tdnbox.h+"px";
-
- if(isIE){
- tdn.style.left = dojo._abs(tdn).x;
- if(tdn.previousSibling){
- this._IEOriginalPos = ['after',tdn.previousSibling];
- }else if(tdn.nextSibling){
- this._IEOriginalPos = ['before',tdn.nextSibling];
- }else{
- this._IEOriginalPos = ['last',tdn.parentNode];
- }
- dojo.body().appendChild(tdn);
- dojo.addClass(tdn,'IEFixedToolbar');
- }else{
- with(tdn.style){
- position = "fixed";
- top = "0px";
- }
- }
-
- dojo.marginBox(tdn, { w: tdnbox.w });
- tdn.style.zIndex = 2000;
- this._fixEnabled = true;
- }
- // if we're showing the floating toolbar, make sure that if
- // we've scrolled past the bottom of the editor that we hide
- // the toolbar for this instance of the editor.
-
- // TODO: when we get multiple editor toolbar support working
- // correctly, ensure that we check this against the scroll
- // position of the bottom-most editor instance.
- var eHeight = (this.height) ? parseInt(this.editor.height) : this.editor._lastHeight;
- if(scrollPos > (this._scrollThreshold+eHeight)){
- tdn.style.display = "none";
- }else{
- tdn.style.display = "";
- }
- }else if(this._fixEnabled){
- this.editor.iframe.style.marginTop = '';
- with(tdn.style){
- position = "";
- top = "";
- zIndex = "";
- display = "";
- }
- if(isIE){
- tdn.style.left = "";
- dojo.removeClass(tdn,'IEFixedToolbar');
- if(this._IEOriginalPos){
- dojo.place(tdn, this._IEOriginalPos[1], this._IEOriginalPos[0]);
- this._IEOriginalPos = null;
- }else{
- dojo.place(tdn, this.editor.iframe,'before');
- }
- }
- tdn.style.width = "";
- this._fixEnabled = false;
- }
- },
- destroy: function(){
- this._IEOriginalPos = null;
- this._handleScroll = false;
- dojo.forEach(this._connects,dojo.disconnect);
-// clearInterval(this.scrollInterval);
-
- if(dojo.isIE && dojo.isIE<7){
- dojo.removeClass(this.editor.toolbar.domNode,'IEFixedToolbar');
- }
- }
-});
-
+if(!dojo._hasResource["dijit._editor.plugins.AlwaysShowToolbar"]){
+dojo._hasResource["dijit._editor.plugins.AlwaysShowToolbar"]=true;
+dojo.provide("dijit._editor.plugins.AlwaysShowToolbar");
+dojo.declare("dijit._editor.plugins.AlwaysShowToolbar",dijit._editor._Plugin,{_handleScroll:true,setEditor:function(e){
+if(!e.iframe){
+return;
+}
+this.editor=e;
+e.onLoadDeferred.addCallback(dojo.hitch(this,this.enable));
+},enable:function(d){
+this._updateHeight();
+this.connect(window,"onscroll","globalOnScrollHandler");
+this.connect(this.editor,"onNormalizedDisplayChanged","_updateHeight");
+return d;
+},_updateHeight:function(){
+var e=this.editor;
+if(!e.isLoaded){
+return;
+}
+if(e.height){
+return;
+}
+var _1=dojo.marginBox(e.editNode).h;
+if(dojo.isOpera){
+_1=e.editNode.scrollHeight;
+}
+if(!_1){
+_1=dojo.marginBox(e.document.body).h;
+}
+if(_1==0){
+return;
+}
+if(dojo.isIE<=7&&this.editor.minHeight){
+var _2=parseInt(this.editor.minHeight);
+if(_1<_2){
+_1=_2;
+}
+}
+if(_1!=this._lastHeight){
+this._lastHeight=_1;
+dojo.marginBox(e.iframe,{h:this._lastHeight});
+}
+},_lastHeight:0,globalOnScrollHandler:function(){
+var _3=dojo.isIE<7;
+if(!this._handleScroll){
+return;
+}
+var _4=this.editor.toolbar.domNode;
+var db=dojo.body;
+if(!this._scrollSetUp){
+this._scrollSetUp=true;
+this._scrollThreshold=dojo.position(_4,true).y;
}
+var _5=dojo._docScroll().y;
+var s=_4.style;
+if(_5>this._scrollThreshold&&_5<this._scrollThreshold+this._lastHeight){
+if(!this._fixEnabled){
+var _6=dojo.marginBox(_4);
+this.editor.iframe.style.marginTop=_6.h+"px";
+if(_3){
+s.left=dojo.position(_4).x;
+if(_4.previousSibling){
+this._IEOriginalPos=["after",_4.previousSibling];
+}else{
+if(_4.nextSibling){
+this._IEOriginalPos=["before",_4.nextSibling];
+}else{
+this._IEOriginalPos=["last",_4.parentNode];
+}
+}
+dojo.body().appendChild(_4);
+dojo.addClass(_4,"dijitIEFixedToolbar");
+}else{
+s.position="fixed";
+s.top="0px";
+}
+dojo.marginBox(_4,{w:_6.w});
+s.zIndex=2000;
+this._fixEnabled=true;
+}
+var _7=(this.height)?parseInt(this.editor.height):this.editor._lastHeight;
+s.display=(_5>this._scrollThreshold+_7)?"none":"";
+}else{
+if(this._fixEnabled){
+this.editor.iframe.style.marginTop="";
+s.position="";
+s.top="";
+s.zIndex="";
+s.display="";
+if(_3){
+s.left="";
+dojo.removeClass(_4,"dijitIEFixedToolbar");
+if(this._IEOriginalPos){
+dojo.place(_4,this._IEOriginalPos[1],this._IEOriginalPos[0]);
+this._IEOriginalPos=null;
+}else{
+dojo.place(_4,this.editor.iframe,"before");
+}
+}
+s.width="";
+this._fixEnabled=false;
+}
+}
+},destroy:function(){
+this._IEOriginalPos=null;
+this._handleScroll=false;
+dojo.forEach(this._connects,dojo.disconnect);
+if(dojo.isIE<7){
+dojo.removeClass(this.editor.toolbar.domNode,"dijitIEFixedToolbar");
+}
+}});
+}
diff --git a/js/dojo/dijit/_editor/plugins/EnterKeyHandling.js b/js/dojo/dijit/_editor/plugins/EnterKeyHandling.js
--- a/js/dojo/dijit/_editor/plugins/EnterKeyHandling.js
+++ b/js/dojo/dijit/_editor/plugins/EnterKeyHandling.js
@@ -1,422 +1,362 @@
-if(!dojo._hasResource["dijit._editor.plugins.EnterKeyHandling"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._editor.plugins.EnterKeyHandling"] = true;
-dojo.provide("dijit._editor.plugins.EnterKeyHandling");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.declare("dijit._editor.plugins.EnterKeyHandling",null,{
- // blockNodeForEnter: String
- // this property decides the behavior of Enter key. It can be either P,
- // DIV, BR, or empty (which means disable this feature). Anything else
- // will trigger errors.
- blockNodeForEnter: 'P',
- constructor: function(args){
- if(args){
- dojo.mixin(this,args);
- }
- },
- setEditor: function(editor){
- this.editor=editor;
- if(this.blockNodeForEnter=='BR'){
- if(dojo.isIE){
- editor.contentDomPreFilters.push(dojo.hitch(this, "regularPsToSingleLinePs"));
- editor.contentDomPostFilters.push(dojo.hitch(this, "singleLinePsToRegularPs"));
- editor.onLoadDeferred.addCallback(dojo.hitch(this, "_fixNewLineBehaviorForIE"));
- }else{
- editor.onLoadDeferred.addCallback(dojo.hitch(this,function(d){
- try{
- this.editor.document.execCommand("insertBrOnReturn", false, true);
- }catch(e){};
- return d;
- }));
- }
- }else if(this.blockNodeForEnter){
- //add enter key handler
- // FIXME: need to port to the new event code!!
- dojo['require']('dijit._editor.range');
- var h=dojo.hitch(this,this.handleEnterKey);
- editor.addKeyHandler(13, 0, h); //enter
- editor.addKeyHandler(13, 2, h); //shift+enter
- this.connect(this.editor,'onKeyPressed','onKeyPressed');
- }
- },
- connect: function(o,f,tf){
- if(!this._connects){
- this._connects=[];
- }
- this._connects.push(dojo.connect(o,f,this,tf));
- },
- destroy: function(){
- dojo.forEach(this._connects,dojo.disconnect);
- this._connects=[];
- },
- onKeyPressed: function(e){
- if(this._checkListLater){
- if(dojo.withGlobal(this.editor.window, 'isCollapsed', dijit._editor.selection)){
- if(!dojo.withGlobal(this.editor.window, 'hasAncestorElement', dijit._editor.selection, ['LI'])){
- //circulate the undo detection code by calling RichText::execCommand directly
- dijit._editor.RichText.prototype.execCommand.apply(this.editor, ['formatblock',this.blockNodeForEnter]);
- //set the innerHTML of the new block node
- var block = dojo.withGlobal(this.editor.window, 'getAncestorElement', dijit._editor.selection, [this.blockNodeForEnter])
- if(block){
- block.innerHTML=this.bogusHtmlContent;
- if(dojo.isIE){
- //the following won't work, it will move the caret to the last list item in the previous list
-// var newrange = dijit.range.create();
-// newrange.setStart(block.firstChild,0);
-// var selection = dijit.range.getSelection(this.editor.window)
-// selection.removeAllRanges();
-// selection.addRange(newrange);
- //move to the start by move backward one char
- var r = this.editor.document.selection.createRange();
- r.move('character',-1);
- r.select();
- }
- }else{
- alert('onKeyPressed: Can not find the new block node');
- }
- }
- }
- this._checkListLater = false;
- }else if(this._pressedEnterInBlock){
- //the new created is the original current P, so we have previousSibling below
- this.removeTrailingBr(this._pressedEnterInBlock.previousSibling);
- delete this._pressedEnterInBlock;
- }
- },
- bogusHtmlContent: '&nbsp;',
- blockNodes: /^(?:H1|H2|H3|H4|H5|H6|LI)$/,
- handleEnterKey: function(e){
- // summary: manually handle enter key event to make the behavior consistant across
- // all supported browsers. See property blockNodeForEnter for available options
- if(!this.blockNodeForEnter){ return true; } //let browser handle this
- if(e.shiftKey //shift+enter always generates <br>
- || this.blockNodeForEnter=='BR'){
- var parent = dojo.withGlobal(this.editor.window, "getParentElement", dijit._editor.selection);
- var header = dijit.range.getAncestor(parent,this.editor.blockNodes);
- if(header){
- if(header.tagName=='LI'){
- return true; //let brower handle
- }
- var selection = dijit.range.getSelection(this.editor.window);
- var range = selection.getRangeAt(0);
- if(!range.collapsed){
- range.deleteContents();
- }
- if(dijit.range.atBeginningOfContainer(header, range.startContainer, range.startOffset)){
- dojo.place(this.editor.document.createElement('br'), header, "before");
- }else if(dijit.range.atEndOfContainer(header, range.startContainer, range.startOffset)){
- dojo.place(this.editor.document.createElement('br'), header, "after");
- var newrange = dijit.range.create();
- newrange.setStartAfter(header);
-
- selection.removeAllRanges();
- selection.addRange(newrange);
- }else{
- return true; //let brower handle
- }
- }else{
- //don't change this: do not call this.execCommand, as that may have other logic in subclass
- // FIXME
- dijit._editor.RichText.prototype.execCommand.call(this.editor, 'inserthtml', '<br>');
- }
- return false;
- }
- var _letBrowserHandle = true;
- //blockNodeForEnter is either P or DIV
- //first remove selection
- var selection = dijit.range.getSelection(this.editor.window);
- var range = selection.getRangeAt(0);
- if(!range.collapsed){
- range.deleteContents();
- }
-
- var block = dijit.range.getBlockAncestor(range.endContainer, null, this.editor.editNode);
-
- if(block.blockNode && block.blockNode.tagName == 'LI'){
- this._checkListLater = true;
- return true;
- }else{
- this._checkListLater = false;
- }
-
- //text node directly under body, let's wrap them in a node
- if(!block.blockNode){
- this.editor.document.execCommand('formatblock',false, this.blockNodeForEnter);
- //get the newly created block node
- // FIXME
- block = {blockNode:dojo.withGlobal(this.editor.window, "getAncestorElement", dijit._editor.selection, [this.blockNodeForEnter]),
- blockContainer: this.editor.editNode};
- if(block.blockNode){
- if((block.blockNode.textContent||block.blockNode.innerHTML).replace(/^\s+|\s+$/g, "").length==0){
- this.removeTrailingBr(block.blockNode);
- return false;
- }
- }else{
- block.blockNode = this.editor.editNode;
- }
- selection = dijit.range.getSelection(this.editor.window);
- range = selection.getRangeAt(0);
- }
- var newblock = this.editor.document.createElement(this.blockNodeForEnter);
- newblock.innerHTML=this.bogusHtmlContent;
- this.removeTrailingBr(block.blockNode);
- if(dijit.range.atEndOfContainer(block.blockNode, range.endContainer, range.endOffset)){
- if(block.blockNode === block.blockContainer){
- block.blockNode.appendChild(newblock);
- }else{
- dojo.place(newblock, block.blockNode, "after");
- }
- _letBrowserHandle = false;
- //lets move caret to the newly created block
- var newrange = dijit.range.create();
- newrange.setStart(newblock,0);
- selection.removeAllRanges();
- selection.addRange(newrange);
- if(this.editor.height){
- newblock.scrollIntoView(false);
- }
- }else if(dijit.range.atBeginningOfContainer(block.blockNode,
- range.startContainer, range.startOffset)){
- if(block.blockNode === block.blockContainer){
- dojo.place(newblock, block.blockNode, "first");
- }else{
- dojo.place(newblock, block.blockNode, "before");
- }
- if(this.editor.height){
- //browser does not scroll the caret position into view, do it manually
- newblock.scrollIntoView(false);
- }
- _letBrowserHandle = false;
- }else{ //press enter in the middle of P
- if(dojo.isMoz){
- //press enter in middle of P may leave a trailing <br/>, let's remove it later
- this._pressedEnterInBlock = block.blockNode;
- }
- }
- return _letBrowserHandle;
- },
- removeTrailingBr: function(container){
- if(/P|DIV|LI/i .test(container.tagName)){
- var para = container;
- }else{
- var para = dijit._editor.selection.getParentOfType(container,['P','DIV','LI']);
- }
-
- if(!para){ return; }
- if(para.lastChild){
- if(para.childNodes.length>1 && para.lastChild.nodeType==3 && /^[\s\xAD]*$/ .test(para.lastChild.nodeValue)){
- dojo._destroyElement(para.lastChild);
- }
- if(para.lastChild && para.lastChild.tagName=='BR'){
- dojo._destroyElement(para.lastChild);
- }
- }
- if(para.childNodes.length==0){
- para.innerHTML=this.bogusHtmlContent;
- }
- },
- _fixNewLineBehaviorForIE: function(d){
- if(typeof this.editor.document.__INSERTED_EDITIOR_NEWLINE_CSS == "undefined"){
- var lineFixingStyles = "p{margin:0 !important;}";
- var insertCssText = function(
- /*String*/ cssStr,
- /*Document*/ doc,
- /*String*/ URI)
- {
- // summary:
- // Attempt to insert CSS rules into the document through inserting a
- // style element
-
- // DomNode Style = insertCssText(String ".dojoMenu {color: green;}"[, DomDoc document, dojo.uri.Uri Url ])
- if(!cssStr){
- return; // HTMLStyleElement
- }
- if(!doc){ doc = document; }
-// if(URI){// fix paths in cssStr
-// cssStr = dojo.html.fixPathsInCssText(cssStr, URI);
-// }
- var style = doc.createElement("style");
- style.setAttribute("type", "text/css");
- // IE is b0rken enough to require that we add the element to the doc
- // before changing it's properties
- var head = doc.getElementsByTagName("head")[0];
- if(!head){ // must have a head tag
- console.debug("No head tag in document, aborting styles");
- return; // HTMLStyleElement
- }else{
- head.appendChild(style);
- }
- if(style.styleSheet){// IE
- var setFunc = function(){
- try{
- style.styleSheet.cssText = cssStr;
- }catch(e){ dojo.debug(e); }
- };
- if(style.styleSheet.disabled){
- setTimeout(setFunc, 10);
- }else{
- setFunc();
- }
- }else{ // w3c
- var cssText = doc.createTextNode(cssStr);
- style.appendChild(cssText);
- }
- return style; // HTMLStyleElement
- }
- insertCssText(lineFixingStyles, this.editor.document);
- this.editor.document.__INSERTED_EDITIOR_NEWLINE_CSS = true;
- // this.regularPsToSingleLinePs(this.editNode);
- return d;
- }
- },
- regularPsToSingleLinePs: function(element, noWhiteSpaceInEmptyP){
- function wrapLinesInPs(el){
- // move "lines" of top-level text nodes into ps
- function wrapNodes(nodes){
- // nodes are assumed to all be siblings
- var newP = nodes[0].ownerDocument.createElement('p'); // FIXME: not very idiomatic
- nodes[0].parentNode.insertBefore(newP, nodes[0]);
- for(var i=0; i<nodes.length; i++){
- newP.appendChild(nodes[i]);
- }
- }
-
- var currentNodeIndex = 0;
- var nodesInLine = [];
- var currentNode;
- while(currentNodeIndex < el.childNodes.length){
- currentNode = el.childNodes[currentNodeIndex];
- if( (currentNode.nodeName!='BR') &&
- (currentNode.nodeType==1) &&
- (dojo.style(currentNode, "display")!="block")
- ){
- nodesInLine.push(currentNode);
- }else{
- // hit line delimiter; process nodesInLine if there are any
- var nextCurrentNode = currentNode.nextSibling;
- if(nodesInLine.length){
- wrapNodes(nodesInLine);
- currentNodeIndex = (currentNodeIndex+1)-nodesInLine.length;
- if(currentNode.nodeName=="BR"){
- dojo._destroyElement(currentNode);
- }
- }
- nodesInLine = [];
- }
- currentNodeIndex++;
- }
- if(nodesInLine.length){ wrapNodes(nodesInLine); }
- }
-
- function splitP(el){
- // split a paragraph into seperate paragraphs at BRs
- var currentNode = null;
- var trailingNodes = [];
- var lastNodeIndex = el.childNodes.length-1;
- for(var i=lastNodeIndex; i>=0; i--){
- currentNode = el.childNodes[i];
- if(currentNode.nodeName=="BR"){
- var newP = currentNode.ownerDocument.createElement('p');
- dojo.place(newP, el, "after");
- if (trailingNodes.length==0 && i != lastNodeIndex) {
- newP.innerHTML = "&nbsp;"
- }
- dojo.forEach(trailingNodes, function(node){
- newP.appendChild(node);
- });
- dojo._destroyElement(currentNode);
- trailingNodes = [];
- }else{
- trailingNodes.unshift(currentNode);
- }
- }
- }
-
- var pList = [];
- var ps = element.getElementsByTagName('p');
- dojo.forEach(ps, function(p){ pList.push(p); });
- dojo.forEach(pList, function(p){
- if( (p.previousSibling) &&
- (p.previousSibling.nodeName == 'P' || dojo.style(p.previousSibling, 'display') != 'block')
- ){
- var newP = p.parentNode.insertBefore(this.document.createElement('p'), p);
- // this is essential to prevent IE from losing the P.
- // if it's going to be innerHTML'd later we need
- // to add the &nbsp; to _really_ force the issue
- newP.innerHTML = noWhiteSpaceInEmptyP ? "" : "&nbsp;";
- }
- splitP(p);
- },this.editor);
- wrapLinesInPs(element);
- return element;
- },
-
- singleLinePsToRegularPs: function(element){
- function getParagraphParents(node){
- var ps = node.getElementsByTagName('p');
- var parents = [];
- for(var i=0; i<ps.length; i++){
- var p = ps[i];
- var knownParent = false;
- for(var k=0; k < parents.length; k++){
- if(parents[k] === p.parentNode){
- knownParent = true;
- break;
- }
- }
- if(!knownParent){
- parents.push(p.parentNode);
- }
- }
- return parents;
- }
-
- function isParagraphDelimiter(node){
- if(node.nodeType != 1 || node.tagName != 'P'){
- return (dojo.style(node, 'display') == 'block');
- }else{
- if(!node.childNodes.length || node.innerHTML=="&nbsp;"){ return true }
- //return node.innerHTML.match(/^(<br\ ?\/?>| |\&nbsp\;)$/i);
- }
- }
-
- var paragraphContainers = getParagraphParents(element);
- for(var i=0; i<paragraphContainers.length; i++){
- var container = paragraphContainers[i];
- var firstPInBlock = null;
- var node = container.firstChild;
- var deleteNode = null;
- while(node){
- if(node.nodeType != "1" || node.tagName != 'P'){
- firstPInBlock = null;
- }else if (isParagraphDelimiter(node)){
- deleteNode = node;
- firstPInBlock = null;
- }else{
- if(firstPInBlock == null){
- firstPInBlock = node;
- }else{
- if( (!firstPInBlock.lastChild || firstPInBlock.lastChild.nodeName != 'BR') &&
- (node.firstChild) &&
- (node.firstChild.nodeName != 'BR')
- ){
- firstPInBlock.appendChild(this.editor.document.createElement('br'));
- }
- while(node.firstChild){
- firstPInBlock.appendChild(node.firstChild);
- }
- deleteNode = node;
- }
- }
- node = node.nextSibling;
- if(deleteNode){
- dojo._destroyElement(deleteNode);
- deleteNode = null;
- }
- }
- }
- return element;
- }
+if(!dojo._hasResource["dijit._editor.plugins.EnterKeyHandling"]){
+dojo._hasResource["dijit._editor.plugins.EnterKeyHandling"]=true;
+dojo.provide("dijit._editor.plugins.EnterKeyHandling");
+dojo.require("dijit._base.scroll");
+dojo.declare("dijit._editor.plugins.EnterKeyHandling",dijit._editor._Plugin,{blockNodeForEnter:"BR",constructor:function(_1){
+if(_1){
+dojo.mixin(this,_1);
+}
+},setEditor:function(_2){
+this.editor=_2;
+if(this.blockNodeForEnter=="BR"){
+if(dojo.isIE){
+_2.contentDomPreFilters.push(dojo.hitch(this,"regularPsToSingleLinePs"));
+_2.contentDomPostFilters.push(dojo.hitch(this,"singleLinePsToRegularPs"));
+_2.onLoadDeferred.addCallback(dojo.hitch(this,"_fixNewLineBehaviorForIE"));
+}else{
+_2.onLoadDeferred.addCallback(dojo.hitch(this,function(d){
+try{
+this.editor.document.execCommand("insertBrOnReturn",false,true);
+}
+catch(e){
+}
+return d;
+}));
+}
+}else{
+if(this.blockNodeForEnter){
+dojo["require"]("dijit._editor.range");
+var h=dojo.hitch(this,this.handleEnterKey);
+_2.addKeyHandler(13,0,0,h);
+_2.addKeyHandler(13,0,1,h);
+this.connect(this.editor,"onKeyPressed","onKeyPressed");
+}
+}
+},onKeyPressed:function(e){
+if(this._checkListLater){
+if(dojo.withGlobal(this.editor.window,"isCollapsed",dijit)){
+var _3=dojo.withGlobal(this.editor.window,"getAncestorElement",dijit._editor.selection,["LI"]);
+if(!_3){
+dijit._editor.RichText.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter);
+var _4=dojo.withGlobal(this.editor.window,"getAncestorElement",dijit._editor.selection,[this.blockNodeForEnter]);
+if(_4){
+_4.innerHTML=this.bogusHtmlContent;
+if(dojo.isIE){
+var r=this.editor.document.selection.createRange();
+r.move("character",-1);
+r.select();
+}
+}else{
+console.error("onKeyPressed: Cannot find the new block node");
+}
+}else{
+if(dojo.isMoz){
+if(_3.parentNode.parentNode.nodeName=="LI"){
+_3=_3.parentNode.parentNode;
+}
+}
+var fc=_3.firstChild;
+if(fc&&fc.nodeType==1&&(fc.nodeName=="UL"||fc.nodeName=="OL")){
+_3.insertBefore(fc.ownerDocument.createTextNode(" "),fc);
+var _5=dijit.range.create(this.editor.window);
+_5.setStart(_3.firstChild,0);
+var _6=dijit.range.getSelection(this.editor.window,true);
+_6.removeAllRanges();
+_6.addRange(_5);
+}
+}
+}
+this._checkListLater=false;
+}
+if(this._pressedEnterInBlock){
+if(this._pressedEnterInBlock.previousSibling){
+this.removeTrailingBr(this._pressedEnterInBlock.previousSibling);
+}
+delete this._pressedEnterInBlock;
+}
+},bogusHtmlContent:"&nbsp;",blockNodes:/^(?:P|H1|H2|H3|H4|H5|H6|LI)$/,handleEnterKey:function(e){
+var _7,_8,_9,_a=this.editor.document,br;
+if(e.shiftKey){
+var _b=dojo.withGlobal(this.editor.window,"getParentElement",dijit._editor.selection);
+var _c=dijit.range.getAncestor(_b,this.blockNodes);
+if(_c){
+if(!e.shiftKey&&_c.tagName=="LI"){
+return true;
+}
+_7=dijit.range.getSelection(this.editor.window);
+_8=_7.getRangeAt(0);
+if(!_8.collapsed){
+_8.deleteContents();
+_7=dijit.range.getSelection(this.editor.window);
+_8=_7.getRangeAt(0);
+}
+if(dijit.range.atBeginningOfContainer(_c,_8.startContainer,_8.startOffset)){
+if(e.shiftKey){
+br=_a.createElement("br");
+_9=dijit.range.create(this.editor.window);
+_c.insertBefore(br,_c.firstChild);
+_9.setStartBefore(br.nextSibling);
+_7.removeAllRanges();
+_7.addRange(_9);
+}else{
+dojo.place(br,_c,"before");
+}
+}else{
+if(dijit.range.atEndOfContainer(_c,_8.startContainer,_8.startOffset)){
+_9=dijit.range.create(this.editor.window);
+br=_a.createElement("br");
+if(e.shiftKey){
+_c.appendChild(br);
+_c.appendChild(_a.createTextNode(" "));
+_9.setStart(_c.lastChild,0);
+}else{
+dojo.place(br,_c,"after");
+_9.setStartAfter(_c);
+}
+_7.removeAllRanges();
+_7.addRange(_9);
+}else{
+return true;
+}
+}
+}else{
+dijit._editor.RichText.prototype.execCommand.call(this.editor,"inserthtml","<br>");
+}
+return false;
+}
+var _d=true;
+_7=dijit.range.getSelection(this.editor.window);
+_8=_7.getRangeAt(0);
+if(!_8.collapsed){
+_8.deleteContents();
+_7=dijit.range.getSelection(this.editor.window);
+_8=_7.getRangeAt(0);
+}
+var _e=dijit.range.getBlockAncestor(_8.endContainer,null,this.editor.editNode);
+var _f=_e.blockNode;
+if((this._checkListLater=(_f&&(_f.nodeName=="LI"||_f.parentNode.nodeName=="LI")))){
+if(dojo.isMoz){
+this._pressedEnterInBlock=_f;
+}
+if(/^(\s|&nbsp;|\xA0|<span\b[^>]*\bclass=['"]Apple-style-span['"][^>]*>(\s|&nbsp;|\xA0)<\/span>)?(<br>)?$/.test(_f.innerHTML)){
+_f.innerHTML="";
+if(dojo.isWebKit){
+_9=dijit.range.create(this.editor.window);
+_9.setStart(_f,0);
+_7.removeAllRanges();
+_7.addRange(_9);
+}
+this._checkListLater=false;
+}
+return true;
+}
+if(!_e.blockNode||_e.blockNode===this.editor.editNode){
+try{
+dijit._editor.RichText.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter);
+}
+catch(e2){
+}
+_e={blockNode:dojo.withGlobal(this.editor.window,"getAncestorElement",dijit._editor.selection,[this.blockNodeForEnter]),blockContainer:this.editor.editNode};
+if(_e.blockNode){
+if(_e.blockNode!=this.editor.editNode&&(!(_e.blockNode.textContent||_e.blockNode.innerHTML).replace(/^\s+|\s+$/g,"").length)){
+this.removeTrailingBr(_e.blockNode);
+return false;
+}
+}else{
+_e.blockNode=this.editor.editNode;
+}
+_7=dijit.range.getSelection(this.editor.window);
+_8=_7.getRangeAt(0);
+}
+var _10=_a.createElement(this.blockNodeForEnter);
+_10.innerHTML=this.bogusHtmlContent;
+this.removeTrailingBr(_e.blockNode);
+if(dijit.range.atEndOfContainer(_e.blockNode,_8.endContainer,_8.endOffset)){
+if(_e.blockNode===_e.blockContainer){
+_e.blockNode.appendChild(_10);
+}else{
+dojo.place(_10,_e.blockNode,"after");
+}
+_d=false;
+_9=dijit.range.create(this.editor.window);
+_9.setStart(_10,0);
+_7.removeAllRanges();
+_7.addRange(_9);
+if(this.editor.height){
+dijit.scrollIntoView(_10);
+}
+}else{
+if(dijit.range.atBeginningOfContainer(_e.blockNode,_8.startContainer,_8.startOffset)){
+dojo.place(_10,_e.blockNode,_e.blockNode===_e.blockContainer?"first":"before");
+if(_10.nextSibling&&this.editor.height){
+_9=dijit.range.create(this.editor.window);
+_9.setStart(_10.nextSibling,0);
+_7.removeAllRanges();
+_7.addRange(_9);
+dijit.scrollIntoView(_10.nextSibling);
+}
+_d=false;
+}else{
+if(dojo.isMoz){
+this._pressedEnterInBlock=_e.blockNode;
+}
+}
+}
+return _d;
+},removeTrailingBr:function(_11){
+var _12=/P|DIV|LI/i.test(_11.tagName)?_11:dijit._editor.selection.getParentOfType(_11,["P","DIV","LI"]);
+if(!_12){
+return;
+}
+if(_12.lastChild){
+if((_12.childNodes.length>1&&_12.lastChild.nodeType==3&&/^[\s\xAD]*$/.test(_12.lastChild.nodeValue))||_12.lastChild.tagName=="BR"){
+dojo.destroy(_12.lastChild);
+}
+}
+if(!_12.childNodes.length){
+_12.innerHTML=this.bogusHtmlContent;
+}
+},_fixNewLineBehaviorForIE:function(d){
+var doc=this.editor.document;
+if(doc.__INSERTED_EDITIOR_NEWLINE_CSS===undefined){
+var _13=dojo.create("style",{type:"text/css"},doc.getElementsByTagName("head")[0]);
+_13.styleSheet.cssText="p{margin:0;}";
+this.editor.document.__INSERTED_EDITIOR_NEWLINE_CSS=true;
+}
+return d;
+},regularPsToSingleLinePs:function(_14,_15){
+function _16(el){
+function _17(_18){
+var _19=_18[0].ownerDocument.createElement("p");
+_18[0].parentNode.insertBefore(_19,_18[0]);
+dojo.forEach(_18,function(_1a){
+_19.appendChild(_1a);
});
-
+};
+var _1b=0;
+var _1c=[];
+var _1d;
+while(_1b<el.childNodes.length){
+_1d=el.childNodes[_1b];
+if(_1d.nodeType==3||(_1d.nodeType==1&&_1d.nodeName!="BR"&&dojo.style(_1d,"display")!="block")){
+_1c.push(_1d);
+}else{
+var _1e=_1d.nextSibling;
+if(_1c.length){
+_17(_1c);
+_1b=(_1b+1)-_1c.length;
+if(_1d.nodeName=="BR"){
+dojo.destroy(_1d);
+}
+}
+_1c=[];
+}
+_1b++;
+}
+if(_1c.length){
+_17(_1c);
+}
+};
+function _1f(el){
+var _20=null;
+var _21=[];
+var _22=el.childNodes.length-1;
+for(var i=_22;i>=0;i--){
+_20=el.childNodes[i];
+if(_20.nodeName=="BR"){
+var _23=_20.ownerDocument.createElement("p");
+dojo.place(_23,el,"after");
+if(_21.length==0&&i!=_22){
+_23.innerHTML="&nbsp;";
+}
+dojo.forEach(_21,function(_24){
+_23.appendChild(_24);
+});
+dojo.destroy(_20);
+_21=[];
+}else{
+_21.unshift(_20);
+}
+}
+};
+var _25=[];
+var ps=_14.getElementsByTagName("p");
+dojo.forEach(ps,function(p){
+_25.push(p);
+});
+dojo.forEach(_25,function(p){
+var _26=p.previousSibling;
+if((_26)&&(_26.nodeType==1)&&(_26.nodeName=="P"||dojo.style(_26,"display")!="block")){
+var _27=p.parentNode.insertBefore(this.document.createElement("p"),p);
+_27.innerHTML=_15?"":"&nbsp;";
}
+_1f(p);
+},this.editor);
+_16(_14);
+return _14;
+},singleLinePsToRegularPs:function(_28){
+function _29(_2a){
+var ps=_2a.getElementsByTagName("p");
+var _2b=[];
+for(var i=0;i<ps.length;i++){
+var p=ps[i];
+var _2c=false;
+for(var k=0;k<_2b.length;k++){
+if(_2b[k]===p.parentNode){
+_2c=true;
+break;
+}
+}
+if(!_2c){
+_2b.push(p.parentNode);
+}
+}
+return _2b;
+};
+function _2d(_2e){
+return (!_2e.childNodes.length||_2e.innerHTML=="&nbsp;");
+};
+var _2f=_29(_28);
+for(var i=0;i<_2f.length;i++){
+var _30=_2f[i];
+var _31=null;
+var _32=_30.firstChild;
+var _33=null;
+while(_32){
+if(_32.nodeType!=1||_32.tagName!="P"||(_32.getAttributeNode("style")||{}).specified){
+_31=null;
+}else{
+if(_2d(_32)){
+_33=_32;
+_31=null;
+}else{
+if(_31==null){
+_31=_32;
+}else{
+if((!_31.lastChild||_31.lastChild.nodeName!="BR")&&(_32.firstChild)&&(_32.firstChild.nodeName!="BR")){
+_31.appendChild(this.editor.document.createElement("br"));
+}
+while(_32.firstChild){
+_31.appendChild(_32.firstChild);
+}
+_33=_32;
+}
+}
+}
+_32=_32.nextSibling;
+if(_33){
+dojo.destroy(_33);
+_33=null;
+}
+}
+}
+return _28;
+}});
+}
diff --git a/js/dojo/dijit/_editor/plugins/FontChoice.js b/js/dojo/dijit/_editor/plugins/FontChoice.js
--- a/js/dojo/dijit/_editor/plugins/FontChoice.js
+++ b/js/dojo/dijit/_editor/plugins/FontChoice.js
@@ -1,66 +1,151 @@
-if(!dojo._hasResource["dijit._editor.plugins.FontChoice"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._editor.plugins.FontChoice"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit._editor.plugins.FontChoice"]){
+dojo._hasResource["dijit._editor.plugins.FontChoice"]=true;
dojo.provide("dijit._editor.plugins.FontChoice");
-
dojo.require("dijit._editor._Plugin");
+dojo.require("dijit._editor.range");
dojo.require("dijit.form.FilteringSelect");
dojo.require("dojo.data.ItemFileReadStore");
dojo.require("dojo.i18n");
-
-dojo.requireLocalization("dijit._editor", "FontChoice", null, "ROOT");
-
-dojo.declare("dijit._editor.plugins.FontChoice",
- dijit._editor._Plugin,
- {
- _uniqueId: 0,
-
- buttonClass: dijit.form.FilteringSelect,
-
- _initButton: function(){
- this.inherited("_initButton", arguments);
-
- //TODO: do we need nls for font names? provide css font lists? or otherwise make this more configurable?
- var names = {
- fontName: ["serif", "sans-serif", "monospaced", "cursive", "fantasy"],
- fontSize: [1,2,3,4,5,6,7],
- formatBlock: ["p", "h1", "h2", "h3", "pre"] }[this.command];
- var strings = dojo.i18n.getLocalization("dijit._editor", "FontChoice");
- var items = dojo.map(names, function(x){ return { name: strings[x], value: x }; });
- items.push({name:"", value:""}); // FilteringSelect doesn't like unmatched blank strings
- this.button.store = new dojo.data.ItemFileReadStore(
- { data: { identifier: "value",
- items: items }
- });
- this.button.setValue("");
-
- dojo.connect(this.button, "onChange", this, function(choice){
- this.editor.execCommand(this.command, choice);
- });
- },
-
- updateState: function(){
- this.inherited("updateState", arguments);
- var _e = this.editor;
- var _c = this.command;
- if(!_e || !_e.isLoaded || !_c.length){ return; }
- if(this.button){
- var value = _e.queryCommandValue(_c);
- this.button.setValue(value);
- }
- },
-
- setToolbar: function(){
- this.inherited("setToolbar", arguments);
-
- var forRef = this.button;
- if(!forRef.id){ forRef.id = "dijitEditorButton-"+this.command+(this._uniqueId++); } //TODO: is this necessary? FilteringSelects always seem to have an id?
- var label = dojo.doc.createElement("label");
- label.setAttribute("for", forRef.id);
- var strings = dojo.i18n.getLocalization("dijit._editor", "FontChoice");
- label.appendChild(dojo.doc.createTextNode(strings[this.command]));
- dojo.place(label, this.button.domNode, "before");
- }
- }
-);
-
+dojo.requireLocalization("dijit._editor","FontChoice",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-tw");
+dojo.declare("dijit._editor.plugins._FontDropDown",[dijit._Widget,dijit._Templated],{label:"",widgetsInTemplate:true,plainText:false,templateString:"<span style='white-space: nowrap' class='dijit dijitReset dijitInline'>"+"<label class='dijitLeft dijitInline' for='${selectId}'>${label}</label>"+"<input dojoType='dijit.form.FilteringSelect' required=false labelType=html labelAttr=label searchAttr=name "+"tabIndex='-1' id='${selectId}' dojoAttachPoint='select' value=''/>"+"</span>",postMixInProperties:function(){
+this.inherited(arguments);
+this.strings=dojo.i18n.getLocalization("dijit._editor","FontChoice");
+this.label=this.strings[this.command];
+this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));
+this.selectId=this.id+"_select";
+this.inherited(arguments);
+},postCreate:function(){
+var _1=dojo.map(this.values,function(_2){
+var _3=this.strings[_2]||_2;
+return {label:this.getLabel(_2,_3),name:_3,value:_2};
+},this);
+this.select.store=new dojo.data.ItemFileReadStore({data:{identifier:"value",items:_1}});
+this.select.attr("value","",false);
+this.disabled=this.select.attr("disabled");
+},_setValueAttr:function(_4,_5){
+_5=_5!==false?true:false;
+this.select.attr("value",dojo.indexOf(this.values,_4)<0?"":_4,_5);
+if(!_5){
+this.select._lastValueReported=null;
+}
+},_getValueAttr:function(){
+return this.select.attr("value");
+},focus:function(){
+this.select.focus();
+},_setDisabledAttr:function(_6){
+this.disabled=_6;
+this.select.attr("disabled",_6);
+}});
+dojo.declare("dijit._editor.plugins._FontNameDropDown",dijit._editor.plugins._FontDropDown,{generic:false,command:"fontName",postMixInProperties:function(){
+if(!this.values){
+this.values=this.generic?["serif","sans-serif","monospace","cursive","fantasy"]:["Arial","Times New Roman","Comic Sans MS","Courier New"];
+}
+this.inherited(arguments);
+},getLabel:function(_7,_8){
+if(this.plainText){
+return _8;
+}else{
+return "<div style='font-family: "+_7+"'>"+_8+"</div>";
+}
+},_setValueAttr:function(_9,_a){
+_a=_a!==false?true:false;
+if(this.generic){
+var _b={"Arial":"sans-serif","Helvetica":"sans-serif","Myriad":"sans-serif","Times":"serif","Times New Roman":"serif","Comic Sans MS":"cursive","Apple Chancery":"cursive","Courier":"monospace","Courier New":"monospace","Papyrus":"fantasy"};
+_9=_b[_9]||_9;
+}
+this.inherited(arguments,[_9,_a]);
+}});
+dojo.declare("dijit._editor.plugins._FontSizeDropDown",dijit._editor.plugins._FontDropDown,{command:"fontSize",values:[1,2,3,4,5,6,7],getLabel:function(_c,_d){
+if(this.plainText){
+return _d;
+}else{
+return "<font size="+_c+"'>"+_d+"</font>";
+}
+},_setValueAttr:function(_e,_f){
+_f=_f!==false?true:false;
+if(_e.indexOf&&_e.indexOf("px")!=-1){
+var _10=parseInt(_e,10);
+_e={10:1,13:2,16:3,18:4,24:5,32:6,48:7}[_10]||_e;
}
+this.inherited(arguments,[_e,_f]);
+}});
+dojo.declare("dijit._editor.plugins._FormatBlockDropDown",dijit._editor.plugins._FontDropDown,{command:"formatBlock",values:["p","h1","h2","h3","pre"],getLabel:function(_11,_12){
+if(this.plainText){
+return _12;
+}else{
+return "<"+_11+">"+_12+"</"+_11+">";
+}
+}});
+dojo.declare("dijit._editor.plugins.FontChoice",dijit._editor._Plugin,{useDefaultCommand:false,_initButton:function(){
+var _13={fontName:dijit._editor.plugins._FontNameDropDown,fontSize:dijit._editor.plugins._FontSizeDropDown,formatBlock:dijit._editor.plugins._FormatBlockDropDown}[this.command],_14=this.params;
+if(this.params.custom){
+_14.values=this.params.custom;
+}
+this.button=new _13(_14);
+this.connect(this.button.select,"onChange",function(_15){
+this.editor.focus();
+if(this.command=="fontName"&&_15.indexOf(" ")!=-1){
+_15="'"+_15+"'";
+}
+this.editor.execCommand(this.command,_15);
+});
+},updateState:function(){
+var _16=this.editor;
+var _17=this.command;
+if(!_16||!_16.isLoaded||!_17.length){
+return;
+}
+if(this.button){
+var _18;
+try{
+_18=_16.queryCommandValue(_17)||"";
+}
+catch(e){
+_18="";
+}
+var _19=dojo.isString(_18)&&_18.match(/'([^']*)'/);
+if(_19){
+_18=_19[1];
+}
+if(!_18&&_17==="formatBlock"){
+var _1a;
+var sel=dijit.range.getSelection(this.editor.window);
+if(sel&&sel.rangeCount>0){
+var _1b=sel.getRangeAt(0);
+if(_1b){
+_1a=_1b.endContainer;
+}
+}
+while(_1a&&_1a!==_16.editNode&&_1a!==_16.document){
+var tg=_1a.tagName?_1a.tagName.toLowerCase():"";
+if(tg&&dojo.indexOf(this.button.values,tg)>-1){
+_18=tg;
+break;
+}
+_1a=_1a.parentNode;
+}
+}
+if(_18!==this.button.attr("value")){
+this.button.attr("value",_18,false);
+}
+}
+}});
+dojo.subscribe(dijit._scopeName+".Editor.getPlugin",null,function(o){
+if(o.plugin){
+return;
+}
+switch(o.args.name){
+case "fontName":
+case "fontSize":
+case "formatBlock":
+o.plugin=new dijit._editor.plugins.FontChoice({command:o.args.name,plainText:o.args.plainText?o.args.plainText:false});
+}
+});
+}
diff --git a/js/dojo/dijit/_editor/plugins/LinkDialog.js b/js/dojo/dijit/_editor/plugins/LinkDialog.js
--- a/js/dojo/dijit/_editor/plugins/LinkDialog.js
+++ b/js/dojo/dijit/_editor/plugins/LinkDialog.js
@@ -1,150 +1,207 @@
-if(!dojo._hasResource["dijit._editor.plugins.LinkDialog"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._editor.plugins.LinkDialog"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit._editor.plugins.LinkDialog"]){
+dojo._hasResource["dijit._editor.plugins.LinkDialog"]=true;
dojo.provide("dijit._editor.plugins.LinkDialog");
-
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit._editor._Plugin");
-dojo.require("dijit.Dialog");
+dojo.require("dijit.TooltipDialog");
dojo.require("dijit.form.Button");
dojo.require("dijit.form.ValidationTextBox");
+dojo.require("dijit.form.Select");
+dojo.require("dijit._editor.range");
dojo.require("dojo.i18n");
dojo.require("dojo.string");
-dojo.requireLocalization("dijit._editor", "LinkDialog", null, "ko,zh,ja,zh-tw,ru,it,ROOT,hu,fr,pt,pl,es,de,cs");
-
-dojo.declare("dijit._editor.plugins.DualStateDropDownButton",
- dijit.form.DropDownButton,
- {
- // summary: a DropDownButton but button can be displayed in two states (checked or unchecked)
- setChecked: dijit.form.ToggleButton.prototype.setChecked
- }
-);
-
-dojo.declare("dijit._editor.plugins.UrlTextBox",
- dijit.form.ValidationTextBox,
- {
- // summary: the URL input box we use in our dialog
-
- // regular expression for URLs, generated from dojo.regexp.url()
- regExp: "((https?|ftps?)\\://|)(([0-9a-zA-Z]([-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?\\.)+(arpa|aero|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|xxx|jobs|mobi|post|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|eu|es|et|fi|fj|fk|fm|fo|fr|ga|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sk|sl|sm|sn|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)|(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])|(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]|(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]|(0|[1-9]\\d{0,8}|[1-3]\\d{9}|4[01]\\d{8}|42[0-8]\\d{7}|429[0-3]\\d{6}|4294[0-8]\\d{5}|42949[0-5]\\d{4}|429496[0-6]\\d{3}|4294967[01]\\d{2}|42949672[0-8]\\d|429496729[0-5])|0[xX]0*[\\da-fA-F]{1,8}|([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}|([\\da-fA-F]{1,4}\\:){6}((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])))(\\:(0|[1-9]\\d*))?(/([^?#\\s/]+/)*)?([^?#\\s/]+(\\?[^?#\\s/]*)?(#[A-Za-z][\\w.:-]*)?)?",
-
- required: true,
-
- postMixInProperties: function(){
- this.inherited("postMixInProperties", arguments);
- this.invalidMessage = dojo.i18n.getLocalization("dijit._editor", "LinkDialog", this.lang).urlInvalidMessage;
- },
-
- getValue: function(){
- if(!/^(https?|ftps?)/.test(this.textbox.value)){
- this.textbox.value="http://"+this.textbox.value;
- }
- return this.textbox.value;
- }
- }
-);
-
-dojo.declare("dijit._editor.plugins.LinkDialog",
- dijit._editor._Plugin,
- {
- buttonClass: dijit._editor.plugins.DualStateDropDownButton,
- useDefaultCommand: false,
- command: "createLink",
- linkDialogTemplate: [
- "<label for='urlInput'>${url}&nbsp;</label>",
- "<input dojoType=dijit._editor.plugins.UrlTextBox name='urlInput'><br>",
- "<label for='textInput'>${text}&nbsp;</label>",
- "<input dojoType=dijit.form.TextBox name='textInput'>",
- "<br>",
- "<button dojoType=dijit.form.Button type='submit'>${set}</button>"
- ].join(""),
-
- constructor: function(){
- var _this = this;
- var messages = dojo.i18n.getLocalization("dijit._editor", "LinkDialog", this.lang);
- this.dropDown = new dijit.TooltipDialog({
- title: messages.title,
- execute: dojo.hitch(this, "setValue"),
- onOpen: function(){
- _this._onOpenDialog();
- dijit.TooltipDialog.prototype.onOpen.apply(this, arguments);
- },
- onCancel: function(){
- setTimeout(dojo.hitch(_this, "_onCloseDialog"),0);
- },
- onClose: dojo.hitch(this, "_onCloseDialog")
- });
- this.dropDown.setContent(dojo.string.substitute(this.linkDialogTemplate, messages));
- this.dropDown.startup();
- },
-
- setValue: function(args){
- // summary: callback from the dialog when user hits "set" button
- //TODO: prevent closing popup if the text is empty
- this._onCloseDialog();
- if(dojo.isIE){ //see #4151
- var a = dojo.withGlobal(this.editor.window, "getAncestorElement",dijit._editor.selection, ['a']);
- if(a){
- dojo.withGlobal(this.editor.window, "selectElement",dijit._editor.selection, [a]);
- }
- }
- var attstr='href="'+args.urlInput+'" _djrealurl="'+args.urlInput+'"';
-// console.log(args,this.editor,'<a '+attstr+'>'+args.textInput+'</a>');
- this.editor.execCommand('inserthtml', '<a '+attstr+'>'+args.textInput+'</a>');
-// this.editor.execCommand(this.command, args.urlInput);
- },
-
-// _savedSelection: null,
- _onCloseDialog: function(){
- // FIXME: IE is really messed up here!!
- if(dojo.isIE){
- if(this._savedSelection){
- var b=this._savedSelection;
- this._savedSelection=null;
- this.editor.focus();
- var range = this.editor.document.selection.createRange();
- range.moveToBookmark(b);
- range.select();
- }
- }else{this.editor.focus();
- }
- },
- _onOpenDialog: function(){
- var a = dojo.withGlobal(this.editor.window, "getAncestorElement",dijit._editor.selection, ['a']);
- var url='',text='';
- if(a){
- url=a.getAttribute('_djrealurl');
- text=a.textContent||a.innerText;
- dojo.withGlobal(this.editor.window, "selectElement",dijit._editor.selection, [a,true]);
- }else{
- text=dojo.withGlobal(this.editor.window, dijit._editor.selection.getSelectedText);
- }
- // FIXME: IE is *really* b0rken
- if(dojo.isIE){
- var range = this.editor.document.selection.createRange();
- this._savedSelection = range.getBookmark();
- }
- this.dropDown.setValues({'urlInput':url,'textInput':text});
- //dijit.focus(this.urlInput);
- },
-
- updateState: function(){
- // summary: change shading on button if we are over a link (or not)
-
- var _e = this.editor;
- if(!_e){ return; }
- if(!_e.isLoaded){ return; }
- if(this.button){
- try{
- // display button differently if there is an existing link associated with the current selection
- var hasA = dojo.withGlobal(this.editor.window, "hasAncestorElement",dijit._editor.selection, ['a']);
- this.button.setChecked(hasA);
- }catch(e){
- console.debug(e); //FIXME: probably shouldn't squelch an exception here
- }
- }
- }
- }
-);
-
+dojo.requireLocalization("dijit","common",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-tw");
+dojo.requireLocalization("dijit._editor","LinkDialog",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-tw");
+dojo.declare("dijit._editor.plugins.LinkDialog",dijit._editor._Plugin,{buttonClass:dijit.form.DropDownButton,useDefaultCommand:false,urlRegExp:"((https?|ftps?|file)\\://|./|/|)(/[a-zA-Z]{1,1}:/|)(((?:(?:[\\da-zA-Z](?:[-\\da-zA-Z]{0,61}[\\da-zA-Z])?)\\.)*(?:[a-zA-Z](?:[-\\da-zA-Z]{0,80}[\\da-zA-Z])?)\\.?)|(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])|(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]|(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]|(0|[1-9]\\d{0,8}|[1-3]\\d{9}|4[01]\\d{8}|42[0-8]\\d{7}|429[0-3]\\d{6}|4294[0-8]\\d{5}|42949[0-5]\\d{4}|429496[0-6]\\d{3}|4294967[01]\\d{2}|42949672[0-8]\\d|429496729[0-5])|0[xX]0*[\\da-fA-F]{1,8}|([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}|([\\da-fA-F]{1,4}\\:){6}((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])))(\\:\\d+)?(/(?:[^?#\\s/]+/)*(?:[^?#\\s/]+(?:\\?[^?#\\s/]*)?(?:#.*)?)?)?",htmlTemplate:"<a href=\"${urlInput}\" _djrealurl=\"${urlInput}\""+" target=\"${targetSelect}\""+">${textInput}</a>",tag:"a",_hostRxp:new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$"),linkDialogTemplate:["<table><tr><td>","<label for='${id}_urlInput'>${url}</label>","</td><td>","<input dojoType='dijit.form.ValidationTextBox' regExp='${urlRegExp}' required='true' "+"id='${id}_urlInput' name='urlInput' intermediateChanges='true'>","</td></tr><tr><td>","<label for='${id}_textInput'>${text}</label>","</td><td>","<input dojoType='dijit.form.ValidationTextBox' required='true' id='${id}_textInput' "+"name='textInput' intermediateChanges='true'>","</td></tr><tr><td>","<label for='${id}_targetSelect'>${target}</label>","</td><td>","<select id='${id}_targetSelect' name='targetSelect' dojoType='dijit.form.Select'>","<option selected='selected' value='_self'>${currentWindow}</option>","<option value='_blank'>${newWindow}</option>","<option value='_top'>${topWindow}</option>","<option value='_parent'>${parentWindow}</option>","</select>","</td></tr><tr><td colspan='2'>","<button dojoType='dijit.form.Button' type='submit' id='${id}_setButton'>${set}</button>","<button dojoType='dijit.form.Button' type='button' id='${id}_cancelButton'>${buttonCancel}</button>","</td></tr></table>"].join(""),_initButton:function(){
+var _1=this;
+this.tag=this.command=="insertImage"?"img":"a";
+var _2=dojo.mixin(dojo.i18n.getLocalization("dijit","common",this.lang),dojo.i18n.getLocalization("dijit._editor","LinkDialog",this.lang));
+var _3=(this.dropDown=new dijit.TooltipDialog({title:_2[this.command+"Title"],execute:dojo.hitch(this,"setValue"),onOpen:function(){
+_1._onOpenDialog();
+dijit.TooltipDialog.prototype.onOpen.apply(this,arguments);
+},onCancel:function(){
+setTimeout(dojo.hitch(_1,"_onCloseDialog"),0);
+}}));
+_2.urlRegExp=this.urlRegExp;
+_2.id=dijit.getUniqueId(this.editor.id);
+this._uniqueId=_2.id;
+this._setContent(_3.title+"<div style='border-bottom: 1px black solid;padding-bottom:2pt;margin-bottom:4pt'></div>"+dojo.string.substitute(this.linkDialogTemplate,_2));
+_3.startup();
+this._urlInput=dijit.byId(this._uniqueId+"_urlInput");
+this._textInput=dijit.byId(this._uniqueId+"_textInput");
+this._setButton=dijit.byId(this._uniqueId+"_setButton");
+this.connect(dijit.byId(this._uniqueId+"_cancelButton"),"onClick",function(){
+this.dropDown.onCancel();
+});
+if(this._urlInput){
+this.connect(this._urlInput,"onChange","_checkAndFixInput");
+}
+if(this._textInput){
+this.connect(this._textInput,"onChange","_checkAndFixInput");
+}
+this._connectTagEvents();
+this.inherited(arguments);
+},_checkAndFixInput:function(){
+var _4=this;
+var _5=this._urlInput.attr("value");
+var _6=function(_7){
+var _8=false;
+if(_7&&_7.length>7){
+_7=dojo.trim(_7);
+if(_7.indexOf("/")>0){
+if(_7.indexOf("://")===-1){
+if(_7.charAt(0)!=="/"&&_7.indexOf("./")!==0){
+if(_4._hostRxp.test(_7)){
+_8=true;
+}
+}
+}
+}
+}
+if(_8){
+_4._urlInput.attr("value","http://"+_7);
+}
+_4._setButton.attr("disabled",!_4._isValid());
+};
+if(this._delayedCheck){
+clearTimeout(this._delayedCheck);
+this._delayedCheck=null;
+}
+this._delayedCheck=setTimeout(function(){
+_6(_5);
+},250);
+},_connectTagEvents:function(){
+this.editor.onLoadDeferred.addCallback(dojo.hitch(this,function(){
+this.connect(this.editor.editNode,"ondblclick",this._onDblClick);
+}));
+},_isValid:function(){
+return this._urlInput.isValid()&&this._textInput.isValid();
+},_setContent:function(_9){
+this.dropDown.attr("content",_9);
+},_checkValues:function(_a){
+if(_a&&_a.urlInput){
+_a.urlInput=_a.urlInput.replace(/"/g,"&quot;");
+}
+return _a;
+},setValue:function(_b){
+this._onCloseDialog();
+if(dojo.isIE){
+var _c=dijit.range.getSelection(this.editor.window);
+var _d=_c.getRangeAt(0);
+var a=_d.endContainer;
+if(a.nodeType===3){
+a=a.parentNode;
+}
+if(a&&(a.nodeName&&a.nodeName.toLowerCase()!==this.tag)){
+a=dojo.withGlobal(this.editor.window,"getSelectedElement",dijit._editor.selection,[this.tag]);
+}
+if(a&&(a.nodeName&&a.nodeName.toLowerCase()===this.tag)){
+if(this.editor.queryCommandEnabled("unlink")){
+dojo.withGlobal(this.editor.window,"selectElementChildren",dijit._editor.selection,[a]);
+this.editor.execCommand("unlink");
+}
+}
}
+_b=this._checkValues(_b);
+this.editor.execCommand("inserthtml",dojo.string.substitute(this.htmlTemplate,_b));
+},_onCloseDialog:function(){
+this.editor.focus();
+},_getCurrentValues:function(a){
+var _e,_f,_10;
+if(a&&a.tagName.toLowerCase()===this.tag){
+_e=a.getAttribute("_djrealurl");
+_10=a.getAttribute("target")||"_self";
+_f=a.textContent||a.innerText;
+dojo.withGlobal(this.editor.window,"selectElement",dijit._editor.selection,[a,true]);
+}else{
+_f=dojo.withGlobal(this.editor.window,dijit._editor.selection.getSelectedText);
+}
+return {urlInput:_e||"",textInput:_f||"",targetSelect:_10||""};
+},_onOpenDialog:function(){
+var a;
+if(dojo.isIE){
+var sel=dijit.range.getSelection(this.editor.window);
+var _11=sel.getRangeAt(0);
+a=_11.endContainer;
+if(a.nodeType===3){
+a=a.parentNode;
+}
+if(a&&(a.nodeName&&a.nodeName.toLowerCase()!==this.tag)){
+a=dojo.withGlobal(this.editor.window,"getSelectedElement",dijit._editor.selection,[this.tag]);
+}
+}else{
+a=dojo.withGlobal(this.editor.window,"getAncestorElement",dijit._editor.selection,[this.tag]);
+}
+this.dropDown.reset();
+this._setButton.attr("disabled",true);
+this.dropDown.attr("value",this._getCurrentValues(a));
+},_onDblClick:function(e){
+if(e&&e.target){
+var t=e.target;
+var tg=t.tagName?t.tagName.toLowerCase():"";
+if(tg===this.tag){
+this.editor.onDisplayChanged();
+dojo.withGlobal(this.editor.window,"selectElement",dijit._editor.selection,[t]);
+setTimeout(dojo.hitch(this,function(){
+this.button.attr("disabled",false);
+this.button.openDropDown();
+}),10);
+}
+}
+}});
+dojo.declare("dijit._editor.plugins.ImgLinkDialog",[dijit._editor.plugins.LinkDialog],{linkDialogTemplate:["<table><tr><td>","<label for='${id}_urlInput'>${url}</label>","</td><td>","<input dojoType='dijit.form.ValidationTextBox' regExp='${urlRegExp}' "+"required='true' id='${id}_urlInput' name='urlInput' intermediateChanges='true'>","</td></tr><tr><td>","<label for='${id}_textInput'>${text}</label>","</td><td>","<input dojoType='dijit.form.ValidationTextBox' required='false' id='${id}_textInput' "+"name='textInput' intermediateChanges='true'>","</td></tr><tr><td>","</td><td>","</td></tr><tr><td colspan='2'>","<button dojoType='dijit.form.Button' type='submit' id='${id}_setButton'>${set}</button>","<button dojoType='dijit.form.Button' type='button' id='${id}_cancelButton'>${buttonCancel}</button>","</td></tr></table>"].join(""),htmlTemplate:"<img src=\"${urlInput}\" _djrealurl=\"${urlInput}\" alt=\"${textInput}\" />",tag:"img",_getCurrentValues:function(img){
+var url,_12;
+if(img&&img.tagName.toLowerCase()===this.tag){
+url=img.getAttribute("_djrealurl");
+_12=img.getAttribute("alt");
+dojo.withGlobal(this.editor.window,"selectElement",dijit._editor.selection,[img,true]);
+}else{
+_12=dojo.withGlobal(this.editor.window,dijit._editor.selection.getSelectedText);
+}
+return {urlInput:url||"",textInput:_12||""};
+},_isValid:function(){
+return this._urlInput.isValid();
+},_connectTagEvents:function(){
+this.inherited(arguments);
+this.editor.onLoadDeferred.addCallback(dojo.hitch(this,function(){
+this.connect(this.editor.editNode,"onclick",this._selectTag);
+}));
+},_selectTag:function(e){
+if(e&&e.target){
+var t=e.target;
+var tg=t.tagName?t.tagName.toLowerCase():"";
+if(tg===this.tag){
+dojo.withGlobal(this.editor.window,"selectElement",dijit._editor.selection,[t]);
+}
+}
+},_checkValues:function(_13){
+if(_13&&_13.urlInput){
+_13.urlInput=_13.urlInput.replace(/"/g,"&quot;");
+}
+if(_13&&_13.textInput){
+_13.textInput=_13.textInput.replace(/"/g,"&quot;");
+}
+return _13;
+}});
+dojo.subscribe(dijit._scopeName+".Editor.getPlugin",null,function(o){
+if(o.plugin){
+return;
+}
+switch(o.args.name){
+case "createLink":
+o.plugin=new dijit._editor.plugins.LinkDialog({command:o.args.name});
+break;
+case "insertImage":
+o.plugin=new dijit._editor.plugins.ImgLinkDialog({command:o.args.name});
+break;
+}
+});
+}
diff --git a/js/dojo/dijit/_editor/plugins/TextColor.js b/js/dojo/dijit/_editor/plugins/TextColor.js
--- a/js/dojo/dijit/_editor/plugins/TextColor.js
+++ b/js/dojo/dijit/_editor/plugins/TextColor.js
@@ -1,24 +1,29 @@
-if(!dojo._hasResource["dijit._editor.plugins.TextColor"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._editor.plugins.TextColor"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit._editor.plugins.TextColor"]){
+dojo._hasResource["dijit._editor.plugins.TextColor"]=true;
dojo.provide("dijit._editor.plugins.TextColor");
-
dojo.require("dijit._editor._Plugin");
dojo.require("dijit.ColorPalette");
-
-dojo.declare("dijit._editor.plugins.TextColor",
- dijit._editor._Plugin,
- {
- buttonClass: dijit.form.DropDownButton,
-
-//TODO: set initial focus/selection state?
-
- constructor: function(){
- this.dropDown = new dijit.ColorPalette();
- dojo.connect(this.dropDown, "onChange", this, function(color){
- this.editor.execCommand(this.command, color);
- });
- }
- }
-);
-
+dojo.declare("dijit._editor.plugins.TextColor",dijit._editor._Plugin,{buttonClass:dijit.form.DropDownButton,constructor:function(){
+this.dropDown=new dijit.ColorPalette();
+this.connect(this.dropDown,"onChange",function(_1){
+this.editor.execCommand(this.command,_1);
+});
+}});
+dojo.subscribe(dijit._scopeName+".Editor.getPlugin",null,function(o){
+if(o.plugin){
+return;
}
+switch(o.args.name){
+case "foreColor":
+case "hiliteColor":
+o.plugin=new dijit._editor.plugins.TextColor({command:o.args.name});
+}
+});
+}
diff --git a/js/dojo/dijit/_editor/range.js b/js/dojo/dijit/_editor/range.js
--- a/js/dojo/dijit/_editor/range.js
+++ b/js/dojo/dijit/_editor/range.js
@@ -1,566 +1,453 @@
-if(!dojo._hasResource["dijit._editor.range"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._editor.range"] = true;
-dojo.provide("dijit._editor.range");
-
-dijit.range={};
-
-dijit.range.getIndex=function(/*DomNode*/node, /*DomNode*/parent){
-// dojo.profile.start("dijit.range.getIndex");
- var ret=[], retR=[];
- var stop = parent;
- var onode = node;
-
- while(node != stop){
- var i = 0;
- var pnode = node.parentNode, n;
- while(n=pnode.childNodes[i++]){
- if(n===node){
- --i;
- break;
- }
- }
- if(i>=pnode.childNodes.length){
- dojo.debug("Error finding index of a node in dijit.range.getIndex");
- }
- ret.unshift(i);
- retR.unshift(i-pnode.childNodes.length);
- node = pnode;
- }
-
- //normalized() can not be called so often to prevent
- //invalidating selection/range, so we have to detect
- //here that any text nodes in a row
- if(ret.length>0 && onode.nodeType==3){
- var n = onode.previousSibling;
- while(n && n.nodeType==3){
- ret[ret.length-1]--;
- n = n.previousSibling;
- }
- n = onode.nextSibling;
- while(n && n.nodeType==3){
- retR[retR.length-1]++;
- n = n.nextSibling;
- }
- }
-// dojo.profile.end("dijit.range.getIndex");
- return {o: ret, r:retR};
-}
-
-dijit.range.getNode = function(/*Array*/index, /*DomNode*/parent){
- if(!dojo.isArray(index) || index.length==0){
- return parent;
- }
- var node = parent;
-// if(!node)debugger
- dojo.every(index, function(i){
- if(i>=0&&i< node.childNodes.length){
- node = node.childNodes[i];
- }else{
- node = null;
- console.debug('Error: can not find node with index',index,'under parent node',parent );
- return false; //terminate dojo.every
- }
- return true; //carry on the every loop
- });
-
- return node;
-}
-
-dijit.range.getCommonAncestor = function(n1,n2,root){
- var getAncestors = function(n,root){
- var as=[];
- while(n){
- as.unshift(n);
- if(n!=root && n.tagName!='BODY'){
- n = n.parentNode;
- }else{
- break;
- }
- }
- return as;
- };
- var n1as = getAncestors(n1,root);
- var n2as = getAncestors(n2,root);
-
- var m = Math.min(n1as.length,n2as.length);
- var com = n1as[0]; //at least, one element should be in the array: the root (BODY by default)
- for(var i=1;i<m;i++){
- if(n1as[i]===n2as[i]){
- com = n1as[i]
- }else{
- break;
- }
- }
- return com;
-}
-
-dijit.range.getAncestor = function(/*DomNode*/node, /*RegEx?*/regex, /*DomNode?*/root){
- root = root || node.ownerDocument.body;
- while(node && node !== root){
- var name = node.nodeName.toUpperCase() ;
- if(regex.test(name)){
- return node;
- }
-
- node = node.parentNode;
- }
- return null;
-}
-
-dijit.range.BlockTagNames = /^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DT|DE)$/;
-dijit.range.getBlockAncestor = function(/*DomNode*/node, /*RegEx?*/regex, /*DomNode?*/root){
- root = root || node.ownerDocument.body;
- regex = regex || dijit.range.BlockTagNames;
- var block=null, blockContainer;
- while(node && node !== root){
- var name = node.nodeName.toUpperCase() ;
- if(!block && regex.test(name)){
- block = node;
- }
- if(!blockContainer && (/^(?:BODY|TD|TH|CAPTION)$/).test(name)){
- blockContainer = node;
- }
-
- node = node.parentNode;
- }
- return {blockNode:block, blockContainer:blockContainer || node.ownerDocument.body};
-}
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dijit.range.atBeginningOfContainer = function(/*DomNode*/container, /*DomNode*/node, /*Int*/offset){
- var atBeginning = false;
- var offsetAtBeginning = (offset == 0);
- if(!offsetAtBeginning && node.nodeType==3){ //if this is a text node, check whether the left part is all space
- if(dojo.trim(node.nodeValue.substr(0,offset))==0){
- offsetAtBeginning = true;
- }
- }
- if(offsetAtBeginning){
- var cnode = node;
- atBeginning = true;
- while(cnode && cnode !== container){
- if(cnode.previousSibling){
- atBeginning = false;
- break;
- }
- cnode = cnode.parentNode;
- }
- }
- return atBeginning;
-}
-
-dijit.range.atEndOfContainer = function(/*DomNode*/container, /*DomNode*/node, /*Int*/offset){
- var atEnd = false;
- var offsetAtEnd = (offset == (node.length || node.childNodes.length));
- if(!offsetAtEnd && node.nodeType==3){ //if this is a text node, check whether the right part is all space
- if(dojo.trim(node.nodeValue.substr(offset))==0){
- offsetAtEnd = true;
- }
- }
- if(offsetAtEnd){
- var cnode = node;
- atEnd = true;
- while(cnode && cnode !== container){
- if(cnode.nextSibling){
- atEnd = false;
- break;
- }
- cnode = cnode.parentNode;
- }
- }
- return atEnd;
-}
-
-dijit.range.adjacentNoneTextNode=function(startnode, next){
- var node = startnode;
- var len = (0-startnode.length) || 0;
- var prop = next?'nextSibling':'previousSibling';
- while(node){
- if(node.nodeType!=3){
- break;
- }
- len += node.length
- node = node[prop];
- }
- return [node,len];
-}
-
-dijit.range._w3c = Boolean(window['getSelection']);
-dijit.range.create = function(){
- if(dijit.range._w3c){
- return document.createRange();
- }else{//IE
- return new dijit.range.W3CRange;
- }
-}
-
-dijit.range.getSelection = function(win, /*Boolean?*/ignoreUpdate){
- if(dijit.range._w3c){
- return win.getSelection();
- }else{//IE
- var id=win.__W3CRange;
- if(!id || !dijit.range.ie.cachedSelection[id]){
- var s = new dijit.range.ie.selection(win);
- //use win as the key in an object is not reliable, which
- //can leads to quite odd behaviors. thus we generate a
- //string and use it as a key in the cache
- id=(new Date).getTime();
- while(id in dijit.range.ie.cachedSelection){
- id=id+1;
- }
- id=String(id);
- dijit.range.ie.cachedSelection[id] = s;
- }else{
- var s = dijit.range.ie.cachedSelection[id];
- }
- if(!ignoreUpdate){
- s._getCurrentSelection();
- }
- return s;
- }
-}
-
-if(!dijit.range._w3c){
- dijit.range.ie={
- cachedSelection: {},
- selection: function(win){
- this._ranges = [];
- this.addRange = function(r, /*boolean*/internal){
- this._ranges.push(r);
- if(!internal){
- r._select();
- }
- this.rangeCount = this._ranges.length;
- };
- this.removeAllRanges = function(){
- //don't detach, the range may be used later
-// for(var i=0;i<this._ranges.length;i++){
-// this._ranges[i].detach();
-// }
- this._ranges = [];
- this.rangeCount = 0;
- };
- var _initCurrentRange = function(){
- var r = win.document.selection.createRange();
- var type=win.document.selection.type.toUpperCase();
- if(type == "CONTROL"){
- //TODO: multiple range selection(?)
- return new dijit.range.W3CRange(dijit.range.ie.decomposeControlRange(r));
- }else{
- return new dijit.range.W3CRange(dijit.range.ie.decomposeTextRange(r));
- }
- };
- this.getRangeAt = function(i){
- return this._ranges[i];
- };
- this._getCurrentSelection = function(){
- this.removeAllRanges();
- var r=_initCurrentRange();
- if(r){
- this.addRange(r, true);
- }
- };
- },
- decomposeControlRange: function(range){
- var firstnode = range.item(0), lastnode = range.item(range.length-1)
- var startContainer = firstnode.parentNode, endContainer = lastnode.parentNode;
- var startOffset = dijit.range.getIndex(firstnode, startContainer).o;
- var endOffset = dijit.range.getIndex(lastnode, endContainer).o+1;
- return [[startContainer, startOffset],[endContainer, endOffset]];
- },
- getEndPoint: function(range, end){
- var atmrange = range.duplicate();
- atmrange.collapse(!end);
- var cmpstr = 'EndTo' + (end?'End':'Start');
- var parentNode = atmrange.parentElement();
-
- var startnode, startOffset, lastNode;
- if(parentNode.childNodes.length>0){
- dojo.every(parentNode.childNodes, function(node,i){
- var calOffset;
- if(node.nodeType != 3){
- atmrange.moveToElementText(node);
- if(atmrange.compareEndPoints(cmpstr,range) > 0){
- startnode = node.previousSibling;
- if(lastNode && lastNode.nodeType == 3){
- //where share we put the start? in the text node or after?
- startnode = lastNode;
- calOffset = true;
- }else{
- startnode = parentNode;
- startOffset = i;
- return false;
- }
- }else{
- if(i==parentNode.childNodes.length-1){
- startnode = parentNode;
- startOffset = parentNode.childNodes.length;
- return false;
- }
- }
- }else{
- if(i==parentNode.childNodes.length-1){//at the end of this node
- startnode = node;
- calOffset = true;
- }
- }
- // try{
- if(calOffset && startnode){
- var prevnode = dijit.range.adjacentNoneTextNode(startnode)[0];
- if(prevnode){
- startnode = prevnode.nextSibling;
- }else{
- startnode = parentNode.firstChild; //firstChild must be a text node
- }
- var prevnodeobj = dijit.range.adjacentNoneTextNode(startnode);
- prevnode = prevnodeobj[0];
- var lenoffset = prevnodeobj[1];
- if(prevnode){
- atmrange.moveToElementText(prevnode);
- atmrange.collapse(false);
- }else{
- atmrange.moveToElementText(parentNode);
- }
- atmrange.setEndPoint(cmpstr, range);
- startOffset = atmrange.text.length-lenoffset;
-
- return false;
- }
- // }catch(e){ debugger }
- lastNode = node;
- return true;
- });
- }else{
- startnode = parentNode;
- startOffset = 0;
- }
-
- //if at the end of startnode and we are dealing with start container, then
- //move the startnode to nextSibling if it is a text node
- //TODO: do this for end container?
- if(!end && startnode.nodeType!=3 && startOffset == startnode.childNodes.length){
- if(startnode.nextSibling && startnode.nextSibling.nodeType==3){
- startnode = startnode.nextSibling;
- startOffset = 0;
- }
- }
- return [startnode, startOffset];
- },
- setEndPoint: function(range, container, offset){
- //text node
- var atmrange = range.duplicate();
- if(container.nodeType!=3){ //normal node
- atmrange.moveToElementText(container);
- atmrange.collapse(true);
- if(offset == container.childNodes.length){
- if(offset > 0){
- //a simple atmrange.collapse(false); won't work here:
- //although moveToElementText(node) is supposed to encompass the content of the node,
- //but when collapse to end, it is in fact after the ending tag of node (collapse to start
- //is after the begining tag of node as expected)
- var node = container.lastChild;
- var len = 0;
- while(node && node.nodeType == 3){
- len += node.length;
- container = node; //pass through
- node = node.previousSibling;
- }
- if(node){
- atmrange.moveToElementText(node);
- }
- atmrange.collapse(false);
- offset = len; //pass through
- }else{ //no childNodes
- atmrange.moveToElementText(container);
- atmrange.collapse(true);
- }
- }else{
- if(offset > 0){
- var node = container.childNodes[offset-1];
- if(node.nodeType==3){
- container = node;
- offset = node.length;
- //pass through
- }else{
- atmrange.moveToElementText(node);
- atmrange.collapse(false);
- }
- }
- }
- }
- if(container.nodeType==3){
- var prevnodeobj = dijit.range.adjacentNoneTextNode(container);
- var prevnode = prevnodeobj[0], len = prevnodeobj[1];
- if(prevnode){
- atmrange.moveToElementText(prevnode);
- atmrange.collapse(false);
- //if contentEditable is not inherit, the above collapse won't make the end point
- //in the correctly position: it always has a -1 offset, so compensate it
- if(prevnode.contentEditable!='inherit'){
- len++;
- }
- }else{
- atmrange.moveToElementText(container.parentNode);
- atmrange.collapse(true);
- }
-
- offset += len;
- if(offset>0){
- if(atmrange.moveEnd('character',offset) != offset){
- alert('Error when moving!');
- }
- atmrange.collapse(false);
- }
- }
-
- return atmrange;
- },
- decomposeTextRange: function(range){
- var tmpary = dijit.range.ie.getEndPoint(range);
- var startContainter = tmpary[0], startOffset = tmpary[1];
- var endContainter = tmpary[0], endOffset = tmpary[1];
-
- if(range.htmlText.length){
- if(range.htmlText == range.text){ //in the same text node
- endOffset = startOffset+range.text.length;
- }else{
- tmpary = dijit.range.ie.getEndPoint(range,true);
- endContainter = tmpary[0], endOffset = tmpary[1];
- }
- }
- return [[startContainter, startOffset],[endContainter, endOffset], range.parentElement()];
- },
- setRange: function(range, startContainter,
- startOffset, endContainter, endOffset, check){
- var startrange = dijit.range.ie.setEndPoint(range, startContainter, startOffset);
- range.setEndPoint('StartToStart', startrange);
- if(!this.collapsed){
- var endrange = dijit.range.ie.setEndPoint(range, endContainter, endOffset);
- range.setEndPoint('EndToEnd', endrange);
- }
-
- return range;
- }
- }
-
-dojo.declare("dijit.range.W3CRange",null, {
- constructor: function(){
- if(arguments.length>0){
- this.setStart(arguments[0][0][0],arguments[0][0][1]);
- this.setEnd(arguments[0][1][0],arguments[0][1][1],arguments[0][2]);
- }else{
- this.commonAncestorContainer = null;
- this.startContainer = null;
- this.startOffset = 0;
- this.endContainer = null;
- this.endOffset = 0;
- this.collapsed = true;
- }
- },
- _simpleSetEndPoint: function(node, range, end){
- var r = (this._body||node.ownerDocument.body).createTextRange();
- if(node.nodeType!=1){
- r.moveToElementText(node.parentNode);
- }else{
- r.moveToElementText(node);
- }
- r.collapse(true);
- range.setEndPoint(end?'EndToEnd':'StartToStart',r);
- },
- _updateInternal: function(__internal_common){
- if(this.startContainer !== this.endContainer){
- if(!__internal_common){
- var r = (this._body||this.startContainer.ownerDocument.body).createTextRange();
- this._simpleSetEndPoint(this.startContainer,r);
- this._simpleSetEndPoint(this.endContainer,r,true);
- __internal_common = r.parentElement();
- }
- this.commonAncestorContainer = dijit.range.getCommonAncestor(this.startContainer, this.endContainer, __internal_common);
- }else{
- this.commonAncestorContainer = this.startContainer;
- }
- this.collapsed = (this.startContainer === this.endContainer) && (this.startOffset == this.endOffset);
- },
- setStart: function(node, offset, __internal_common){
- if(this.startContainer === node && this.startOffset == offset){
- return;
- }
- delete this._cachedBookmark;
-
- this.startContainer = node;
- this.startOffset = offset;
- if(!this.endContainer){
- this.setEnd(node, offset, __internal_common);
- }else{
- this._updateInternal(__internal_common);
- }
- },
- setEnd: function(node, offset, __internal_common){
- if(this.endContainer === node && this.endOffset == offset){
- return;
- }
- delete this._cachedBookmark;
-
- this.endContainer = node;
- this.endOffset = offset;
- if(!this.startContainer){
- this.setStart(node, offset, __internal_common);
- }else{
- this._updateInternal(__internal_common);
- }
- },
- setStartAfter: function(node, offset){
- this._setPoint('setStart', node, offset, 1);
- },
- setStartBefore: function(node, offset){
- this._setPoint('setStart', node, offset, 0);
- },
- setEndAfter: function(node, offset){
- this._setPoint('setEnd', node, offset, 1);
- },
- setEndBefore: function(node, offset){
- this._setPoint('setEnd', node, offset, 0);
- },
- _setPoint: function(what, node, offset, ext){
- var index = dijit.range.getIndex(node, node.parentNode).o;
- this[what](node.parentNode, index.pop()+ext);
- },
- _getIERange: function(){
- var r=(this._body||this.endContainer.ownerDocument.body).createTextRange();
- dijit.range.ie.setRange(r, this.startContainer, this.startOffset, this.endContainer, this.endOffset);
- return r;
- },
- getBookmark: function(body){
- this._getIERange();
- return this._cachedBookmark;
- },
- _select: function(){
- var r = this._getIERange();
- r.select();
- },
- deleteContents: function(){
- var r = this._getIERange();
- r.pasteHTML('');
- this.endContainer = this.startContainer;
- this.endOffset = this.startOffset;
- this.collapsed = true;
- },
- cloneRange: function(){
- var r = new dijit.range.W3CRange([[this.startContainer,this.startOffset],
- [this.endContainer,this.endOffset]]);
- r._body = this._body;
- return r;
- },
- detach: function(){
- this._body = null;
- this.commonAncestorContainer = null;
- this.startContainer = null;
- this.startOffset = 0;
- this.endContainer = null;
- this.endOffset = 0;
- this.collapsed = true;
+if(!dojo._hasResource["dijit._editor.range"]){
+dojo._hasResource["dijit._editor.range"]=true;
+dojo.provide("dijit._editor.range");
+dijit.range={};
+dijit.range.getIndex=function(_1,_2){
+var _3=[],_4=[];
+var _5=_2;
+var _6=_1;
+var _7,n;
+while(_1!=_5){
+var i=0;
+_7=_1.parentNode;
+while((n=_7.childNodes[i++])){
+if(n===_1){
+--i;
+break;
+}
+}
+if(i>=_7.childNodes.length){
+dojo.debug("Error finding index of a node in dijit.range.getIndex");
+}
+_3.unshift(i);
+_4.unshift(i-_7.childNodes.length);
+_1=_7;
+}
+if(_3.length>0&&_6.nodeType==3){
+n=_6.previousSibling;
+while(n&&n.nodeType==3){
+_3[_3.length-1]--;
+n=n.previousSibling;
+}
+n=_6.nextSibling;
+while(n&&n.nodeType==3){
+_4[_4.length-1]++;
+n=n.nextSibling;
+}
+}
+return {o:_3,r:_4};
+};
+dijit.range.getNode=function(_8,_9){
+if(!dojo.isArray(_8)||_8.length==0){
+return _9;
+}
+var _a=_9;
+dojo.every(_8,function(i){
+if(i>=0&&i<_a.childNodes.length){
+_a=_a.childNodes[i];
+}else{
+_a=null;
+return false;
+}
+return true;
+});
+return _a;
+};
+dijit.range.getCommonAncestor=function(n1,n2){
+var _b=function(n){
+var as=[];
+while(n){
+as.unshift(n);
+if(n.nodeName!="BODY"){
+n=n.parentNode;
+}else{
+break;
+}
+}
+return as;
+};
+var _c=_b(n1);
+var _d=_b(n2);
+var m=Math.min(_c.length,_d.length);
+var _e=_c[0];
+for(var i=1;i<m;i++){
+if(_c[i]===_d[i]){
+_e=_c[i];
+}else{
+break;
+}
+}
+return _e;
+};
+dijit.range.getAncestor=function(_f,_10,_11){
+_11=_11||_f.ownerDocument.body;
+while(_f&&_f!==_11){
+var _12=_f.nodeName.toUpperCase();
+if(_10.test(_12)){
+return _f;
+}
+_f=_f.parentNode;
+}
+return null;
+};
+dijit.range.BlockTagNames=/^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DT|DE)$/;
+dijit.range.getBlockAncestor=function(_13,_14,_15){
+_15=_15||_13.ownerDocument.body;
+_14=_14||dijit.range.BlockTagNames;
+var _16=null,_17;
+while(_13&&_13!==_15){
+var _18=_13.nodeName.toUpperCase();
+if(!_16&&_14.test(_18)){
+_16=_13;
+}
+if(!_17&&(/^(?:BODY|TD|TH|CAPTION)$/).test(_18)){
+_17=_13;
+}
+_13=_13.parentNode;
+}
+return {blockNode:_16,blockContainer:_17||_13.ownerDocument.body};
+};
+dijit.range.atBeginningOfContainer=function(_19,_1a,_1b){
+var _1c=false;
+var _1d=(_1b==0);
+if(!_1d&&_1a.nodeType==3){
+if(/^[\s\xA0]+$/.test(_1a.nodeValue.substr(0,_1b))){
+_1d=true;
+}
+}
+if(_1d){
+var _1e=_1a;
+_1c=true;
+while(_1e&&_1e!==_19){
+if(_1e.previousSibling){
+_1c=false;
+break;
+}
+_1e=_1e.parentNode;
+}
+}
+return _1c;
+};
+dijit.range.atEndOfContainer=function(_1f,_20,_21){
+var _22=false;
+var _23=(_21==(_20.length||_20.childNodes.length));
+if(!_23&&_20.nodeType==3){
+if(/^[\s\xA0]+$/.test(_20.nodeValue.substr(_21))){
+_23=true;
+}
+}
+if(_23){
+var _24=_20;
+_22=true;
+while(_24&&_24!==_1f){
+if(_24.nextSibling){
+_22=false;
+break;
+}
+_24=_24.parentNode;
+}
+}
+return _22;
+};
+dijit.range.adjacentNoneTextNode=function(_25,_26){
+var _27=_25;
+var len=(0-_25.length)||0;
+var _28=_26?"nextSibling":"previousSibling";
+while(_27){
+if(_27.nodeType!=3){
+break;
+}
+len+=_27.length;
+_27=_27[_28];
+}
+return [_27,len];
+};
+dijit.range._w3c=Boolean(window["getSelection"]);
+dijit.range.create=function(win){
+if(dijit.range._w3c){
+return (win||dojo.global).document.createRange();
+}else{
+return new dijit.range.W3CRange;
+}
+};
+dijit.range.getSelection=function(win,_29){
+if(dijit.range._w3c){
+return win.getSelection();
+}else{
+var s=new dijit.range.ie.selection(win);
+if(!_29){
+s._getCurrentSelection();
+}
+return s;
+}
+};
+if(!dijit.range._w3c){
+dijit.range.ie={cachedSelection:{},selection:function(win){
+this._ranges=[];
+this.addRange=function(r,_2a){
+this._ranges.push(r);
+if(!_2a){
+r._select();
+}
+this.rangeCount=this._ranges.length;
+};
+this.removeAllRanges=function(){
+this._ranges=[];
+this.rangeCount=0;
+};
+var _2b=function(){
+var r=win.document.selection.createRange();
+var _2c=win.document.selection.type.toUpperCase();
+if(_2c=="CONTROL"){
+return new dijit.range.W3CRange(dijit.range.ie.decomposeControlRange(r));
+}else{
+return new dijit.range.W3CRange(dijit.range.ie.decomposeTextRange(r));
+}
+};
+this.getRangeAt=function(i){
+return this._ranges[i];
+};
+this._getCurrentSelection=function(){
+this.removeAllRanges();
+var r=_2b();
+if(r){
+this.addRange(r,true);
}
+};
+},decomposeControlRange:function(_2d){
+var _2e=_2d.item(0),_2f=_2d.item(_2d.length-1);
+var _30=_2e.parentNode,_31=_2f.parentNode;
+var _32=dijit.range.getIndex(_2e,_30).o;
+var _33=dijit.range.getIndex(_2f,_31).o+1;
+return [_30,_32,_31,_33];
+},getEndPoint:function(_34,end){
+var _35=_34.duplicate();
+_35.collapse(!end);
+var _36="EndTo"+(end?"End":"Start");
+var _37=_35.parentElement();
+var _38,_39,_3a;
+if(_37.childNodes.length>0){
+dojo.every(_37.childNodes,function(_3b,i){
+var _3c;
+if(_3b.nodeType!=3){
+_35.moveToElementText(_3b);
+if(_35.compareEndPoints(_36,_34)>0){
+if(_3a&&_3a.nodeType==3){
+_38=_3a;
+_3c=true;
+}else{
+_38=_37;
+_39=i;
+return false;
+}
+}else{
+if(i==_37.childNodes.length-1){
+_38=_37;
+_39=_37.childNodes.length;
+return false;
+}
+}
+}else{
+if(i==_37.childNodes.length-1){
+_38=_3b;
+_3c=true;
+}
+}
+if(_3c&&_38){
+var _3d=dijit.range.adjacentNoneTextNode(_38)[0];
+if(_3d){
+_38=_3d.nextSibling;
+}else{
+_38=_37.firstChild;
+}
+var _3e=dijit.range.adjacentNoneTextNode(_38);
+_3d=_3e[0];
+var _3f=_3e[1];
+if(_3d){
+_35.moveToElementText(_3d);
+_35.collapse(false);
+}else{
+_35.moveToElementText(_37);
+}
+_35.setEndPoint(_36,_34);
+_39=_35.text.length-_3f;
+return false;
+}
+_3a=_3b;
+return true;
});
-} //if(!dijit.range._w3c)
-
+}else{
+_38=_37;
+_39=0;
+}
+if(!end&&_38.nodeType==1&&_39==_38.childNodes.length){
+var _40=_38.nextSibling;
+if(_40&&_40.nodeType==3){
+_38=_40;
+_39=0;
+}
+}
+return [_38,_39];
+},setEndPoint:function(_41,_42,_43){
+var _44=_41.duplicate(),_45,len;
+if(_42.nodeType!=3){
+if(_43>0){
+_45=_42.childNodes[_43-1];
+if(_45.nodeType==3){
+_42=_45;
+_43=_45.length;
+}else{
+if(_45.nextSibling&&_45.nextSibling.nodeType==3){
+_42=_45.nextSibling;
+_43=0;
+}else{
+_44.moveToElementText(_45.nextSibling?_45:_42);
+var _46=_45.parentNode;
+var _47=_46.insertBefore(_45.ownerDocument.createTextNode(" "),_45.nextSibling);
+_44.collapse(false);
+_46.removeChild(_47);
+}
+}
+}else{
+_44.moveToElementText(_42);
+_44.collapse(true);
+}
+}
+if(_42.nodeType==3){
+var _48=dijit.range.adjacentNoneTextNode(_42);
+var _49=_48[0];
+len=_48[1];
+if(_49){
+_44.moveToElementText(_49);
+_44.collapse(false);
+if(_49.contentEditable!="inherit"){
+len++;
+}
+}else{
+_44.moveToElementText(_42.parentNode);
+_44.collapse(true);
+}
+_43+=len;
+if(_43>0){
+if(_44.move("character",_43)!=_43){
+console.error("Error when moving!");
+}
+}
+}
+return _44;
+},decomposeTextRange:function(_4a){
+var _4b=dijit.range.ie.getEndPoint(_4a);
+var _4c=_4b[0],_4d=_4b[1];
+var _4e=_4b[0],_4f=_4b[1];
+if(_4a.htmlText.length){
+if(_4a.htmlText==_4a.text){
+_4f=_4d+_4a.text.length;
+}else{
+_4b=dijit.range.ie.getEndPoint(_4a,true);
+_4e=_4b[0],_4f=_4b[1];
+}
+}
+return [_4c,_4d,_4e,_4f];
+},setRange:function(_50,_51,_52,_53,_54,_55){
+var _56=dijit.range.ie.setEndPoint(_50,_51,_52);
+_50.setEndPoint("StartToStart",_56);
+if(!_55){
+var end=dijit.range.ie.setEndPoint(_50,_53,_54);
}
+_50.setEndPoint("EndToEnd",end||_56);
+return _50;
+}};
+dojo.declare("dijit.range.W3CRange",null,{constructor:function(){
+if(arguments.length>0){
+this.setStart(arguments[0][0],arguments[0][1]);
+this.setEnd(arguments[0][2],arguments[0][3]);
+}else{
+this.commonAncestorContainer=null;
+this.startContainer=null;
+this.startOffset=0;
+this.endContainer=null;
+this.endOffset=0;
+this.collapsed=true;
+}
+},_updateInternal:function(){
+if(this.startContainer!==this.endContainer){
+this.commonAncestorContainer=dijit.range.getCommonAncestor(this.startContainer,this.endContainer);
+}else{
+this.commonAncestorContainer=this.startContainer;
+}
+this.collapsed=(this.startContainer===this.endContainer)&&(this.startOffset==this.endOffset);
+},setStart:function(_57,_58){
+_58=parseInt(_58);
+if(this.startContainer===_57&&this.startOffset==_58){
+return;
+}
+delete this._cachedBookmark;
+this.startContainer=_57;
+this.startOffset=_58;
+if(!this.endContainer){
+this.setEnd(_57,_58);
+}else{
+this._updateInternal();
+}
+},setEnd:function(_59,_5a){
+_5a=parseInt(_5a);
+if(this.endContainer===_59&&this.endOffset==_5a){
+return;
+}
+delete this._cachedBookmark;
+this.endContainer=_59;
+this.endOffset=_5a;
+if(!this.startContainer){
+this.setStart(_59,_5a);
+}else{
+this._updateInternal();
+}
+},setStartAfter:function(_5b,_5c){
+this._setPoint("setStart",_5b,_5c,1);
+},setStartBefore:function(_5d,_5e){
+this._setPoint("setStart",_5d,_5e,0);
+},setEndAfter:function(_5f,_60){
+this._setPoint("setEnd",_5f,_60,1);
+},setEndBefore:function(_61,_62){
+this._setPoint("setEnd",_61,_62,0);
+},_setPoint:function(_63,_64,_65,ext){
+var _66=dijit.range.getIndex(_64,_64.parentNode).o;
+this[_63](_64.parentNode,_66.pop()+ext);
+},_getIERange:function(){
+var r=(this._body||this.endContainer.ownerDocument.body).createTextRange();
+dijit.range.ie.setRange(r,this.startContainer,this.startOffset,this.endContainer,this.endOffset,this.collapsed);
+return r;
+},getBookmark:function(_67){
+this._getIERange();
+return this._cachedBookmark;
+},_select:function(){
+var r=this._getIERange();
+r.select();
+},deleteContents:function(){
+var r=this._getIERange();
+r.pasteHTML("");
+this.endContainer=this.startContainer;
+this.endOffset=this.startOffset;
+this.collapsed=true;
+},cloneRange:function(){
+var r=new dijit.range.W3CRange([this.startContainer,this.startOffset,this.endContainer,this.endOffset]);
+r._body=this._body;
+return r;
+},detach:function(){
+this._body=null;
+this.commonAncestorContainer=null;
+this.startContainer=null;
+this.startOffset=0;
+this.endContainer=null;
+this.endOffset=0;
+this.collapsed=true;
+}});
+}
+}
diff --git a/js/dojo/dijit/_editor/selection.js b/js/dojo/dijit/_editor/selection.js
--- a/js/dojo/dijit/_editor/selection.js
+++ b/js/dojo/dijit/_editor/selection.js
@@ -1,220 +1,226 @@
-if(!dojo._hasResource["dijit._editor.selection"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._editor.selection"] = true;
-dojo.provide("dijit._editor.selection");
-
-// FIXME:
-// all of these methods branch internally for IE. This is probably
-// sub-optimal in terms of runtime performance. We should investigate the
-// size difference for differentiating at definition time.
-
-dojo.mixin(dijit._editor.selection, {
- getType: function(){
- // summary: Get the selection type (like document.select.type in IE).
- if(dojo.doc["selection"]){ //IE
- return dojo.doc.selection.type.toLowerCase();
- }else{
- var stype = "text";
-
- // Check if the actual selection is a CONTROL (IMG, TABLE, HR, etc...).
- var oSel;
- try{
- oSel = dojo.global.getSelection();
- }catch(e){ /*squelch*/ }
-
- if(oSel && oSel.rangeCount==1){
- var oRange = oSel.getRangeAt(0);
- if( (oRange.startContainer == oRange.endContainer) &&
- ((oRange.endOffset - oRange.startOffset) == 1) &&
- (oRange.startContainer.nodeType != 3 /* text node*/)
- ){
- stype = "control";
- }
- }
- return stype;
- }
- },
-
- getSelectedText: function(){
- // summary:
- // Return the text (no html tags) included in the current selection or null if no text is selected
- if(dojo.doc["selection"]){ //IE
- if(dijit._editor.selection.getType() == 'control'){
- return null;
- }
- return dojo.doc.selection.createRange().text;
- }else{
- var selection = dojo.global.getSelection();
- if(selection){
- return selection.toString();
- }
- }
- },
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- getSelectedHtml: function(){
- // summary:
- // Return the html of the current selection or null if unavailable
- if(dojo.doc["selection"]){ //IE
- if(dijit._editor.selection.getType() == 'control'){
- return null;
- }
- return dojo.doc.selection.createRange().htmlText;
- }else{
- var selection = dojo.global.getSelection();
- if(selection && selection.rangeCount){
- var frag = selection.getRangeAt(0).cloneContents();
- var div = document.createElement("div");
- div.appendChild(frag);
- return div.innerHTML;
- }
- return null;
- }
- },
-
- getSelectedElement: function(){
- // summary:
- // Retrieves the selected element (if any), just in the case that
- // a single element (object like and image or a table) is
- // selected.
- if(this.getType() == "control"){
- if(dojo.doc["selection"]){ //IE
- var range = dojo.doc.selection.createRange();
- if(range && range.item){
- return dojo.doc.selection.createRange().item(0);
- }
- }else{
- var selection = dojo.global.getSelection();
- return selection.anchorNode.childNodes[ selection.anchorOffset ];
- }
- }
- },
-
- getParentElement: function(){
- // summary:
- // Get the parent element of the current selection
- if(this.getType() == "control"){
- var p = this.getSelectedElement();
- if(p){ return p.parentNode; }
- }else{
- if(dojo.doc["selection"]){ //IE
- return dojo.doc.selection.createRange().parentElement();
- }else{
- var selection = dojo.global.getSelection();
- if(selection){
- var node = selection.anchorNode;
-
- while(node && (node.nodeType != 1)){ // not an element
- node = node.parentNode;
- }
- return node;
- }
- }
- }
- },
-
- hasAncestorElement: function(/*String*/tagName /* ... */){
- // summary:
- // Check whether current selection has a parent element which is
- // of type tagName (or one of the other specified tagName)
- return (this.getAncestorElement.apply(this, arguments) != null);
- },
-
- getAncestorElement: function(/*String*/tagName /* ... */){
- // summary:
- // Return the parent element of the current selection which is of
- // type tagName (or one of the other specified tagName)
-
- var node = this.getSelectedElement() || this.getParentElement();
- return this.getParentOfType(node, arguments);
- },
-
- isTag: function(/*DomNode*/node, /*Array*/tags){
- if(node && node.tagName){
- var _nlc = node.tagName.toLowerCase();
- for(var i=0; i<tags.length; i++){
- var _tlc = String(tags[i]).toLowerCase();
- if(_nlc == _tlc){
- return _tlc;
- }
- }
- }
- return "";
- },
-
- getParentOfType: function(/*DomNode*/node, /*Array*/tags){
- while(node){
- if(this.isTag(node, tags).length){
- return node;
- }
- node = node.parentNode;
- }
- return null;
- },
-
- remove: function(){
- // summary: delete current selection
- var _s = dojo.doc.selection;
- if(_s){ //IE
- if(_s.type.toLowerCase() != "none"){
- _s.clear();
- }
- return _s;
- }else{
- _s = dojo.global.getSelection();
- _s.deleteFromDocument();
- return _s;
- }
- },
-
- selectElementChildren: function(/*DomNode*/element,/*Boolean?*/nochangefocus){
- // summary:
- // clear previous selection and select the content of the node
- // (excluding the node itself)
- var _window = dojo.global;
- var _document = dojo.doc;
- element = dojo.byId(element);
- if(_document.selection && dojo.body().createTextRange){ // IE
- var range = element.ownerDocument.body.createTextRange();
- range.moveToElementText(element);
- if(!nochangefocus){
- range.select();
- }
- }else if(_window["getSelection"]){
- var selection = _window.getSelection();
- if(selection["setBaseAndExtent"]){ // Safari
- selection.setBaseAndExtent(element, 0, element, element.innerText.length - 1);
- }else if(selection["selectAllChildren"]){ // Mozilla
- selection.selectAllChildren(element);
- }
- }
- },
-
- selectElement: function(/*DomNode*/element,/*Boolean?*/nochangefocus){
- // summary:
- // clear previous selection and select element (including all its children)
- var _document = dojo.doc;
- element = dojo.byId(element);
- if(_document.selection && dojo.body().createTextRange){ // IE
- try{
- var range = dojo.body().createControlRange();
- range.addElement(element);
- if(!nochangefocus){
- range.select();
- }
- }catch(e){
- this.selectElementChildren(element,nochangefocus);
- }
- }else if(dojo.global["getSelection"]){
- var selection = dojo.global.getSelection();
- // FIXME: does this work on Safari?
- if(selection["removeAllRanges"]){ // Mozilla
- var range = _document.createRange() ;
- range.selectNode(element) ;
- selection.removeAllRanges() ;
- selection.addRange(range) ;
- }
- }
- }
-});
-
+if(!dojo._hasResource["dijit._editor.selection"]){
+dojo._hasResource["dijit._editor.selection"]=true;
+dojo.provide("dijit._editor.selection");
+dojo.mixin(dijit._editor.selection,{getType:function(){
+if(dojo.isIE){
+return dojo.doc.selection.type.toLowerCase();
+}else{
+var _1="text";
+var _2;
+try{
+_2=dojo.global.getSelection();
+}
+catch(e){
+}
+if(_2&&_2.rangeCount==1){
+var _3=_2.getRangeAt(0);
+if((_3.startContainer==_3.endContainer)&&((_3.endOffset-_3.startOffset)==1)&&(_3.startContainer.nodeType!=3)){
+_1="control";
+}
+}
+return _1;
+}
+},getSelectedText:function(){
+if(dojo.isIE){
+if(dijit._editor.selection.getType()=="control"){
+return null;
+}
+return dojo.doc.selection.createRange().text;
+}else{
+var _4=dojo.global.getSelection();
+if(_4){
+return _4.toString();
+}
+}
+return "";
+},getSelectedHtml:function(){
+if(dojo.isIE){
+if(dijit._editor.selection.getType()=="control"){
+return null;
+}
+return dojo.doc.selection.createRange().htmlText;
+}else{
+var _5=dojo.global.getSelection();
+if(_5&&_5.rangeCount){
+var i;
+var _6="";
+for(i=0;i<_5.rangeCount;i++){
+var _7=_5.getRangeAt(i).cloneContents();
+var _8=dojo.doc.createElement("div");
+_8.appendChild(_7);
+_6+=_8.innerHTML;
+}
+return _6;
+}
+return null;
+}
+},getSelectedElement:function(){
+if(dijit._editor.selection.getType()=="control"){
+if(dojo.isIE){
+var _9=dojo.doc.selection.createRange();
+if(_9&&_9.item){
+return dojo.doc.selection.createRange().item(0);
+}
+}else{
+var _a=dojo.global.getSelection();
+return _a.anchorNode.childNodes[_a.anchorOffset];
+}
+}
+return null;
+},getParentElement:function(){
+if(dijit._editor.selection.getType()=="control"){
+var p=this.getSelectedElement();
+if(p){
+return p.parentNode;
+}
+}else{
+if(dojo.isIE){
+var r=dojo.doc.selection.createRange();
+r.collapse(true);
+return r.parentElement();
+}else{
+var _b=dojo.global.getSelection();
+if(_b){
+var _c=_b.anchorNode;
+while(_c&&(_c.nodeType!=1)){
+_c=_c.parentNode;
+}
+return _c;
+}
+}
+}
+return null;
+},hasAncestorElement:function(_d){
+return this.getAncestorElement.apply(this,arguments)!=null;
+},getAncestorElement:function(_e){
+var _f=this.getSelectedElement()||this.getParentElement();
+return this.getParentOfType(_f,arguments);
+},isTag:function(_10,_11){
+if(_10&&_10.tagName){
+var _12=_10.tagName.toLowerCase();
+for(var i=0;i<_11.length;i++){
+var _13=String(_11[i]).toLowerCase();
+if(_12==_13){
+return _13;
+}
+}
}
+return "";
+},getParentOfType:function(_14,_15){
+while(_14){
+if(this.isTag(_14,_15).length){
+return _14;
+}
+_14=_14.parentNode;
+}
+return null;
+},collapse:function(_16){
+if(window.getSelection){
+var _17=dojo.global.getSelection();
+if(_17.removeAllRanges){
+if(_16){
+_17.collapseToStart();
+}else{
+_17.collapseToEnd();
+}
+}else{
+_17.collapse(_16);
+}
+}else{
+if(dojo.isIE){
+var _18=dojo.doc.selection.createRange();
+_18.collapse(_16);
+_18.select();
+}
+}
+},remove:function(){
+var sel=dojo.doc.selection;
+if(dojo.isIE){
+if(sel.type.toLowerCase()!="none"){
+sel.clear();
+}
+return sel;
+}else{
+sel=dojo.global.getSelection();
+sel.deleteFromDocument();
+return sel;
+}
+},selectElementChildren:function(_19,_1a){
+var win=dojo.global;
+var doc=dojo.doc;
+var _1b;
+_19=dojo.byId(_19);
+if(doc.selection&&dojo.isIE&&dojo.body().createTextRange){
+_1b=_19.ownerDocument.body.createTextRange();
+_1b.moveToElementText(_19);
+if(!_1a){
+try{
+_1b.select();
+}
+catch(e){
+}
+}
+}else{
+if(win.getSelection){
+var _1c=dojo.global.getSelection();
+if(_1c.setBaseAndExtent){
+_1c.setBaseAndExtent(_19,0,_19,_19.innerText.length-1);
+}else{
+if(dojo.isOpera){
+if(_1c.rangeCount){
+_1b=_1c.getRangeAt(0);
+}else{
+_1b=doc.createRange();
+}
+_1b.setStart(_19,0);
+_1b.setEnd(_19,(_19.nodeType==3)?_19.length:_19.childNodes.length);
+_1c.addRange(_1b);
+}else{
+if(_1c.selectAllChildren){
+_1c.selectAllChildren(_19);
+}
+}
+}
+}
+}
+},selectElement:function(_1d,_1e){
+var _1f;
+var doc=dojo.doc;
+var win=dojo.global;
+_1d=dojo.byId(_1d);
+if(dojo.isIE&&dojo.body().createTextRange){
+try{
+_1f=dojo.body().createControlRange();
+_1f.addElement(_1d);
+if(!_1e){
+_1f.select();
+}
+}
+catch(e){
+this.selectElementChildren(_1d,_1e);
+}
+}else{
+if(dojo.global.getSelection){
+var _20=win.getSelection();
+_1f=doc.createRange();
+if(_20.removeAllRanges){
+if(dojo.isOpera){
+if(_20.getRangeAt(0)){
+_1f=_20.getRangeAt(0);
+}
+}
+_1f.selectNode(_1d);
+_20.removeAllRanges();
+_20.addRange(_1f);
+}
+}
+}
+}});
+}
diff --git a/js/dojo/dijit/_tree/dndSource.js b/js/dojo/dijit/_tree/dndSource.js
--- a/js/dojo/dijit/_tree/dndSource.js
+++ b/js/dojo/dijit/_tree/dndSource.js
@@ -1,346 +1,14 @@
-if(!dojo._hasResource["dijit._tree.dndSource"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._tree.dndSource"] = true;
-dojo.provide("dijit._tree.dndSource");
-
-dojo.require("dijit._tree.dndSelector");
-dojo.require("dojo.dnd.Manager");
-
-dojo.declare("dijit._tree.dndSource", dijit._tree.dndSelector, {
- // summary: a Source object, which can be used as a DnD source, or a DnD target
-
- // object attributes (for markup)
- isSource: true,
- copyOnly: false,
- skipForm: false,
- accept: ["text"],
-
- constructor: function(node, params){
- // summary: a constructor of the Source
- // node: Node: node or node's id to build the source on
- // params: Object: a dict of parameters, recognized parameters are:
- // isSource: Boolean: can be used as a DnD source, if true; assumed to be "true" if omitted
- // accept: Array: list of accepted types (text strings) for a target; assumed to be ["text"] if omitted
- // horizontal: Boolean: a horizontal container, if true, vertical otherwise or when omitted
- // copyOnly: Boolean: always copy items, if true, use a state of Ctrl key otherwise
- // skipForm: Boolean: don't start the drag operation, if clicked on form elements
- // the rest of parameters are passed to the selector
- if(!params){ params = {}; }
- dojo.mixin(this, params);
- this.isSource = typeof params.isSource == "undefined" ? true : params.isSource;
- var type = params.accept instanceof Array ? params.accept : ["text"];
- this.accept = null;
- if(type.length){
- this.accept = {};
- for(var i = 0; i < type.length; ++i){
- this.accept[type[i]] = 1;
- }
- }
-
- // class-specific variables
- this.isDragging = false;
- this.mouseDown = false;
- this.targetAnchor = null;
- this.targetBox = null;
- this.before = true;
-
- // states
- this.sourceState = "";
- if(this.isSource){
- dojo.addClass(this.node, "dojoDndSource");
- }
- this.targetState = "";
- if(this.accept){
- dojo.addClass(this.node, "dojoDndTarget");
- }
- if(this.horizontal){
- dojo.addClass(this.node, "dojoDndHorizontal");
- }
- // set up events
- this.topics = [
- dojo.subscribe("/dnd/source/over", this, "onDndSourceOver"),
- dojo.subscribe("/dnd/start", this, "onDndStart"),
- dojo.subscribe("/dnd/drop", this, "onDndDrop"),
- dojo.subscribe("/dnd/cancel", this, "onDndCancel")
- ];
- },
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- startup: function(){
- },
-
- // methods
- checkAcceptance: function(source, nodes){
- // summary: checks, if the target can accept nodes from this source
- // source: Object: the source which provides items
- // nodes: Array: the list of transferred items
- return true; // Boolean
- },
- copyState: function(keyPressed){
- // summary: Returns true, if we need to copy items, false to move.
- // It is separated to be overwritten dynamically, if needed.
- // keyPressed: Boolean: the "copy" was pressed
- return this.copyOnly || keyPressed; // Boolean
- },
- destroy: function(){
- // summary: prepares the object to be garbage-collected
- this.inherited("destroy",arguments);
- dojo.forEach(this.topics, dojo.unsubscribe);
- this.targetAnchor = null;
- },
-
- // markup methods
- markupFactory: function(params, node){
- params._skipStartup = true;
- return new dijit._tree.dndSource(node, params);
- },
-
- // mouse event processors
- onMouseMove: function(e){
- // summary: event processor for onmousemove
- // e: Event: mouse event
- if(this.isDragging && this.targetState == "Disabled"){ return; }
- this.inherited("onMouseMove", arguments);
- var m = dojo.dnd.manager();
- if(this.isDragging){
- // calculate before/after
-
- if (this.allowBetween){ // not implemented yet for tree since it has no concept of order
- var before = false;
- if(this.current){
- if(!this.targetBox || this.targetAnchor != this.current){
- this.targetBox = {
- xy: dojo.coords(this.current, true),
- w: this.current.offsetWidth,
- h: this.current.offsetHeight
- };
- }
- if(this.horizontal){
- before = (e.pageX - this.targetBox.xy.x) < (this.targetBox.w / 2);
- }else{
- before = (e.pageY - this.targetBox.xy.y) < (this.targetBox.h / 2);
- }
- }
- if(this.current != this.targetAnchor || before != this.before){
- this._markTargetAnchor(before);
- m.canDrop(!this.current || m.source != this || !(this.current.id in this.selection));
- }
- }
- }else{
- if(this.mouseDown && this.isSource){
- var n = this.getSelectedNodes();
- var nodes=[];
- for (var i in n){
- nodes.push(n[i]);
- }
- if(nodes.length){
- m.startDrag(this, nodes, this.copyState(dojo.dnd.getCopyKeyState(e)));
- }
- }
- }
- },
-
- onMouseDown: function(e){
- // summary: event processor for onmousedown
- // e: Event: mouse event
- this.mouseDown = true;
- this.mouseButton = e.button;
- this.inherited("onMouseDown",arguments);
- },
-
- onMouseUp: function(e){
- // summary: event processor for onmouseup
- // e: Event: mouse event
- if(this.mouseDown){
- this.mouseDown = false;
- this.inherited("onMouseUp",arguments);
- }
- },
- onMouseOver: function(e){
- // summary: event processor for onmouseover
- // e: Event: mouse event
- var n = e.relatedTarget;
- while(n){
- if(n == this.node){ break; }
- try{
- n = n.parentNode;
- }catch(x){
- n = null;
- }
- }
- if(!n){
- this._changeState("Container", "Over");
- this.onOverEvent();
- }
- n = this._getChildByEvent(e);
- if(this.current == n){ return; }
- if(this.current){ this._removeItemClass(this.current, "Over"); }
- if(n){
- this._addItemClass(n, "Over");
- if(this.isDragging){
- var m = dojo.dnd.manager();
- if(this.checkItemAcceptance(n,m.source)){
- m.canDrop(this.targetState != "Disabled" && (!this.current || m.source != this || !(this.current.id in this.selection)));
- }else{
- m.canDrop(false);
- }
- }
- }else{
- if(this.isDragging){
- var m = dojo.dnd.manager();
- if (m.source && this.checkAcceptance(m.source,m.source.getSelectedNodes())){
- m.canDrop(this.targetState != "Disabled" && (!this.current || m.source != this || !(this.current.id in this.selection)));
- }else{
- m.canDrop(false);
- }
- }
- }
- this.current = n;
- },
-
- checkItemAcceptance: function(node, source){
- // summary: stub funciton to be overridden if one wants to check for the ability to drop at the node/item level
- return true;
- },
-
- // topic event processors
- onDndSourceOver: function(source){
- // summary: topic event processor for /dnd/source/over, called when detected a current source
- // source: Object: the source which has the mouse over it
- if(this != source){
- this.mouseDown = false;
- if(this.targetAnchor){
- this._unmarkTargetAnchor();
- }
- }else if(this.isDragging){
- var m = dojo.dnd.manager();
- m.canDrop(this.targetState != "Disabled" && (!this.current || m.source != this || !(this.current.id in this.selection)));
- }
- },
- onDndStart: function(source, nodes, copy){
- // summary: topic event processor for /dnd/start, called to initiate the DnD operation
- // source: Object: the source which provides items
- // nodes: Array: the list of transferred items
- // copy: Boolean: copy items, if true, move items otherwise
-
- if(this.isSource){
- this._changeState("Source", this == source ? (copy ? "Copied" : "Moved") : "");
- }
- var accepted = this.checkAcceptance(source, nodes);
-
- this._changeState("Target", accepted ? "" : "Disabled");
-
- if(accepted){
- dojo.dnd.manager().overSource(this);
- }
-
- this.isDragging = true;
- },
-
- itemCreator: function(nodes){
- var items = []
-
- for(var i=0;i<nodes.length;i++){
- items.push({
- "name":nodes[i].textContent,
- "id": nodes[i].id
- });
- }
-
- return items;
- },
-
- onDndDrop: function(source, nodes, copy){
- // summary: topic event processor for /dnd/drop, called to finish the DnD operation
- // source: Object: the source which provides items
- // nodes: Array: the list of transferred items
- // copy: Boolean: copy items, if true, move items otherwise
-
- if(this.containerState == "Over"){
- this.isDragging = false;
- var target = this.current;
- var items = this.itemCreator(nodes, target);
- if(!target || target == this.tree.domNode){
- for(var i = 0; i < items.length; i++){
- this.tree.store.newItem(items[i], null);
- }
- }else{
- for(var i = 0; i < items.length; i++){
- pInfo = {parent: dijit.getEnclosingWidget(target).item, attribute: "children"};
- var newItem = this.tree.store.newItem(items[i], pInfo);
- console.log("newItem:", newItem);
- }
- }
- }
- this.onDndCancel();
- },
- onDndCancel: function(){
- // summary: topic event processor for /dnd/cancel, called to cancel the DnD operation
- if(this.targetAnchor){
- this._unmarkTargetAnchor();
- this.targetAnchor = null;
- }
- this.before = true;
- this.isDragging = false;
- this.mouseDown = false;
- delete this.mouseButton;
- this._changeState("Source", "");
- this._changeState("Target", "");
- },
-
- // utilities
-
- onOverEvent: function(){
- // summary: this function is called once, when mouse is over our container
- this.inherited("onOverEvent",arguments);
- dojo.dnd.manager().overSource(this);
- },
- onOutEvent: function(){
- // summary: this function is called once, when mouse is out of our container
- this.inherited("onOutEvent",arguments);
- dojo.dnd.manager().outSource(this);
- },
- _markTargetAnchor: function(before){
- // summary: assigns a class to the current target anchor based on "before" status
- // before: Boolean: insert before, if true, after otherwise
- if(this.current == this.targetAnchor && this.before == before){ return; }
- if(this.targetAnchor){
- this._removeItemClass(this.targetAnchor, this.before ? "Before" : "After");
- }
- this.targetAnchor = this.current;
- this.targetBox = null;
- this.before = before;
- if(this.targetAnchor){
- this._addItemClass(this.targetAnchor, this.before ? "Before" : "After");
- }
- },
- _unmarkTargetAnchor: function(){
- // summary: removes a class of the current target anchor based on "before" status
- if(!this.targetAnchor){ return; }
- this._removeItemClass(this.targetAnchor, this.before ? "Before" : "After");
- this.targetAnchor = null;
- this.targetBox = null;
- this.before = true;
- },
- _markDndStatus: function(copy){
- // summary: changes source's state based on "copy" status
- this._changeState("Source", copy ? "Copied" : "Moved");
- }
-});
-
-dojo.declare("dijit._tree.dndTarget", dijit._tree.dndSource, {
- // summary: a Target object, which can be used as a DnD target
-
- constructor: function(node, params){
- // summary: a constructor of the Target --- see the Source constructor for details
- this.isSource = false;
- dojo.removeClass(this.node, "dojoDndSource");
- },
-
- // markup methods
- markupFactory: function(params, node){
- params._skipStartup = true;
- return new dijit._tree.dndTarget(node, params);
- }
-});
-
+if(!dojo._hasResource["dijit._tree.dndSource"]){
+dojo._hasResource["dijit._tree.dndSource"]=true;
+dojo.provide("dijit._tree.dndSource");
+dojo.require("dijit.tree.dndSource");
+dojo.deprecated("dijit._tree.dndSource has been moved to dijit.tree.dndSource, use that instead","","2.0");
+dijit._tree.dndSource=dijit.tree.dndSource;
}
diff --git a/js/dojo/dijit/dijit-all.js b/js/dojo/dijit/dijit-all.js
--- a/js/dojo/dijit/dijit-all.js
+++ b/js/dojo/dijit/dijit-all.js
@@ -1,20 +1,16 @@
/*
- Copyright (c) 2004-2007, The Dojo Foundation
- All Rights Reserved.
-
- Licensed under the Academic Free License version 2.1 or above OR the
- modified BSD license. For more information on Dojo licensing, see:
-
- http://dojotoolkit.org/book/dojo-book-0-9/introduction/licensing
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
*/
/*
This is a compiled version of Dojo, built for deployment and not for
development. To get an editable version, please visit:
http://dojotoolkit.org
for documentation and information on getting the source.
*/
-if(!dojo._hasResource["dojo.colors"]){dojo._hasResource["dojo.colors"]=true;dojo.provide("dojo.colors");(function(){var _1=function(m1,m2,h){if(h<0){++h;}if(h>1){--h;}var h6=6*h;if(h6<1){return m1+(m2-m1)*h6;}if(2*h<1){return m2;}if(3*h<2){return m1+(m2-m1)*(2/3-h)*6;}return m1;};dojo.colorFromRgb=function(_6,_7){var m=_6.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(m){var c=m[2].split(/\s*,\s*/),l=c.length,t=m[1];if((t=="rgb"&&l==3)||(t=="rgba"&&l==4)){var r=c[0];if(r.charAt(r.length-1)=="%"){var a=dojo.map(c,function(x){return parseFloat(x)*2.56;});if(l==4){a[3]=c[3];}return dojo.colorFromArray(a,_7);}return dojo.colorFromArray(c,_7);}if((t=="hsl"&&l==3)||(t=="hsla"&&l==4)){var H=((parseFloat(c[0])%360)+360)%360/360,S=parseFloat(c[1])/100,L=parseFloat(c[2])/100,m2=L<=0.5?L*(S+1):L+S-L*S,m1=2*L-m2,a=[_1(m1,m2,H+1/3)*256,_1(m1,m2,H)*256,_1(m1,m2,H-1/3)*256,1];if(l==4){a[3]=c[3];}return dojo.colorFromArray(a,_7);}}return null;};var _14=function(c,low,_17){c=Number(c);return isNaN(c)?_17:c<low?low:c>_17?_17:c;};dojo.Color.prototype.sanitize=function(){var t=this;t.r=Math.round(_14(t.r,0,255));t.g=Math.round(_14(t.g,0,255));t.b=Math.round(_14(t.b,0,255));t.a=_14(t.a,0,1);return this;};})();dojo.colors.makeGrey=function(g,a){return dojo.colorFromArray([g,g,g,a]);};dojo.Color.named=dojo.mixin({aliceblue:[240,248,255],antiquewhite:[250,235,215],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],blanchedalmond:[255,235,205],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],oldlace:[253,245,230],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],thistle:[216,191,216],tomato:[255,99,71],transparent:[0,0,0,0],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],whitesmoke:[245,245,245],yellowgreen:[154,205,50]},dojo.Color.named);}if(!dojo._hasResource["dojo.i18n"]){dojo._hasResource["dojo.i18n"]=true;dojo.provide("dojo.i18n");dojo.i18n.getLocalization=function(_1b,_1c,_1d){_1d=dojo.i18n.normalizeLocale(_1d);var _1e=_1d.split("-");var _1f=[_1b,"nls",_1c].join(".");var _20=dojo._loadedModules[_1f];if(_20){var _21;for(var i=_1e.length;i>0;i--){var loc=_1e.slice(0,i).join("_");if(_20[loc]){_21=_20[loc];break;}}if(!_21){_21=_20.ROOT;}if(_21){var _24=function(){};_24.prototype=_21;return new _24();}}throw new Error("Bundle not found: "+_1c+" in "+_1b+" , locale="+_1d);};dojo.i18n.normalizeLocale=function(_25){var _26=_25?_25.toLowerCase():dojo.locale;if(_26=="root"){_26="ROOT";}return _26;};dojo.i18n._requireLocalization=function(_27,_28,_29,_2a){var _2b=dojo.i18n.normalizeLocale(_29);var _2c=[_27,"nls",_28].join(".");var _2d="";if(_2a){var _2e=_2a.split(",");for(var i=0;i<_2e.length;i++){if(_2b.indexOf(_2e[i])==0){if(_2e[i].length>_2d.length){_2d=_2e[i];}}}if(!_2d){_2d="ROOT";}}var _30=_2a?_2d:_2b;var _31=dojo._loadedModules[_2c];var _32=null;if(_31){if(djConfig.localizationComplete&&_31._built){return;}var _33=_30.replace(/-/g,"_");var _34=_2c+"."+_33;_32=dojo._loadedModules[_34];}if(!_32){_31=dojo["provide"](_2c);var _35=dojo._getModuleSymbols(_27);var _36=_35.concat("nls").join("/");var _37;dojo.i18n._searchLocalePath(_30,_2a,function(loc){var _39=loc.replace(/-/g,"_");var _3a=_2c+"."+_39;var _3b=false;if(!dojo._loadedModules[_3a]){dojo["provide"](_3a);var _3c=[_36];if(loc!="ROOT"){_3c.push(loc);}_3c.push(_28);var _3d=_3c.join("/")+".js";_3b=dojo._loadPath(_3d,null,function(_3e){var _3f=function(){};_3f.prototype=_37;_31[_39]=new _3f();for(var j in _3e){_31[_39][j]=_3e[j];}});}else{_3b=true;}if(_3b&&_31[_39]){_37=_31[_39];}else{_31[_39]=_37;}if(_2a){return true;}});}if(_2a&&_2b!=_2d){_31[_2b.replace(/-/g,"_")]=_31[_2d.replace(/-/g,"_")];}};(function(){var _41=djConfig.extraLocale;if(_41){if(!_41 instanceof Array){_41=[_41];}var req=dojo.i18n._requireLocalization;dojo.i18n._requireLocalization=function(m,b,_45,_46){req(m,b,_45,_46);if(_45){return;}for(var i=0;i<_41.length;i++){req(m,b,_41[i],_46);}};}})();dojo.i18n._searchLocalePath=function(_48,_49,_4a){_48=dojo.i18n.normalizeLocale(_48);var _4b=_48.split("-");var _4c=[];for(var i=_4b.length;i>0;i--){_4c.push(_4b.slice(0,i).join("-"));}_4c.push(false);if(_49){_4c.reverse();}for(var j=_4c.length-1;j>=0;j--){var loc=_4c[j]||"ROOT";var _50=_4a(loc);if(_50){break;}}};dojo.i18n._preloadLocalizations=function(_51,_52){function preload(_53){_53=dojo.i18n.normalizeLocale(_53);dojo.i18n._searchLocalePath(_53,true,function(loc){for(var i=0;i<_52.length;i++){if(_52[i]==loc){dojo["require"](_51+"_"+loc);return true;}}return false;});};preload();var _56=djConfig.extraLocale||[];for(var i=0;i<_56.length;i++){preload(_56[i]);}};}if(!dojo._hasResource["dijit.ColorPalette"]){dojo._hasResource["dijit.ColorPalette"]=true;dojo.provide("dijit.ColorPalette");dojo.declare("dijit.ColorPalette",[dijit._Widget,dijit._Templated],{defaultTimeout:500,timeoutChangeRate:0.9,palette:"7x10",value:null,_currentFocus:0,_xDim:null,_yDim:null,_palettes:{"7x10":[["white","seashell","cornsilk","lemonchiffon","lightyellow","palegreen","paleturquoise","lightcyan","lavender","plum"],["lightgray","pink","bisque","moccasin","khaki","lightgreen","lightseagreen","lightskyblue","cornflowerblue","violet"],["silver","lightcoral","sandybrown","orange","palegoldenrod","chartreuse","mediumturquoise","skyblue","mediumslateblue","orchid"],["gray","red","orangered","darkorange","yellow","limegreen","darkseagreen","royalblue","slateblue","mediumorchid"],["dimgray","crimson","chocolate","coral","gold","forestgreen","seagreen","blue","blueviolet","darkorchid"],["darkslategray","firebrick","saddlebrown","sienna","olive","green","darkcyan","mediumblue","darkslateblue","darkmagenta"],["black","darkred","maroon","brown","darkolivegreen","darkgreen","midnightblue","navy","indigo","purple"]],"3x4":[["white","lime","green","blue"],["silver","yellow","fuchsia","navy"],["gray","red","purple","black"]]},_imagePaths:{"7x10":dojo.moduleUrl("dijit","templates/colors7x10.png"),"3x4":dojo.moduleUrl("dijit","templates/colors3x4.png")},_paletteCoords:{"leftOffset":4,"topOffset":4,"cWidth":20,"cHeight":20},templateString:"<div class=\"dijitInline dijitColorPalette\">\n\t<div class=\"dijitColorPaletteInner\" dojoAttachPoint=\"divNode\" waiRole=\"grid\" tabIndex=\"-1\">\n\t\t<img class=\"dijitColorPaletteUnder\" dojoAttachPoint=\"imageNode\" waiRole=\"presentation\">\n\t</div>\t\n</div>\n",_paletteDims:{"7x10":{"width":"206px","height":"145px"},"3x4":{"width":"86px","height":"64px"}},postCreate:function(){dojo.mixin(this.divNode.style,this._paletteDims[this.palette]);this.imageNode.setAttribute("src",this._imagePaths[this.palette]);var _58=this._palettes[this.palette];this.domNode.style.position="relative";this._highlightNodes=[];this.colorNames=dojo.i18n.getLocalization("dojo","colors",this.lang);var url=dojo.moduleUrl("dijit","templates/blank.gif");var _5a=new dojo.Color(),_5b=this._paletteCoords;for(var row=0;row<_58.length;row++){for(var col=0;col<_58[row].length;col++){var _5e=document.createElement("img");_5e.src=url;dojo.addClass(_5e,"dijitPaletteImg");var _5f=_58[row][col],_60=_5a.setColor(dojo.Color.named[_5f]);_5e.alt=this.colorNames[_5f];_5e.color=_60.toHex();var _61=_5e.style;_61.color=_61.backgroundColor=_5e.color;dojo.forEach(["Dijitclick","MouseOut","MouseOver","Blur","Focus"],function(_62){this.connect(_5e,"on"+_62.toLowerCase(),"_onColor"+_62);},this);this.divNode.appendChild(_5e);_61.top=_5b.topOffset+(row*_5b.cHeight)+"px";_61.left=_5b.leftOffset+(col*_5b.cWidth)+"px";_5e.setAttribute("tabIndex","-1");_5e.title=this.colorNames[_5f];dijit.setWaiRole(_5e,"gridcell");_5e.index=this._highlightNodes.length;this._highlightNodes.push(_5e);}}this._highlightNodes[this._currentFocus].tabIndex=0;this._xDim=_58[0].length;this._yDim=_58.length;var _63={UP_ARROW:-this._xDim,DOWN_ARROW:this._xDim,RIGHT_ARROW:1,LEFT_ARROW:-1};for(var key in _63){this._connects.push(dijit.typematic.addKeyListener(this.domNode,{keyCode:dojo.keys[key],ctrlKey:false,altKey:false,shiftKey:false},this,function(){var _65=_63[key];return function(_66){this._navigateByKey(_65,_66);};}(),this.timeoutChangeRate,this.defaultTimeout));}},focus:function(){dijit.focus(this._highlightNodes[this._currentFocus]);},onChange:function(_67){},_onColorDijitclick:function(evt){var _69=evt.currentTarget;if(this._currentFocus!=_69.index){this._currentFocus=_69.index;dijit.focus(_69);}this._selectColor(_69);dojo.stopEvent(evt);},_onColorMouseOut:function(evt){dojo.removeClass(evt.currentTarget,"dijitPaletteImgHighlight");},_onColorMouseOver:function(evt){var _6c=evt.currentTarget;_6c.tabIndex=0;_6c.focus();},_onColorBlur:function(evt){dojo.removeClass(evt.currentTarget,"dijitPaletteImgHighlight");evt.currentTarget.tabIndex=-1;this._currentFocus=0;this._highlightNodes[0].tabIndex=0;},_onColorFocus:function(evt){if(this._currentFocus!=evt.currentTarget.index){this._highlightNodes[this._currentFocus].tabIndex=-1;}this._currentFocus=evt.currentTarget.index;dojo.addClass(evt.currentTarget,"dijitPaletteImgHighlight");},_selectColor:function(_6f){this.onChange(this.value=_6f.color);},_navigateByKey:function(_70,_71){if(_71==-1){return;}var _72=this._currentFocus+_70;if(_72<this._highlightNodes.length&&_72>-1){var _73=this._highlightNodes[_72];_73.tabIndex=0;_73.focus();}}});}if(!dojo._hasResource["dijit.Declaration"]){dojo._hasResource["dijit.Declaration"]=true;dojo.provide("dijit.Declaration");dojo.declare("dijit.Declaration",dijit._Widget,{_noScript:true,widgetClass:"",replaceVars:true,defaults:null,mixins:[],buildRendering:function(){var src=this.srcNodeRef.parentNode.removeChild(this.srcNodeRef);var _75=dojo.query("> script[type='dojo/method'][event='preamble']",src).orphan();var _76=dojo.query("> script[type^='dojo/']",src).orphan();var _77=src.nodeName;var _78=this.defaults||{};this.mixins=this.mixins.length?dojo.map(this.mixins,function(_79){return dojo.getObject(_79);}):[dijit._Widget,dijit._Templated];if(_75.length){_78.preamble=dojo.parser._functionFromScript(_75[0]);}var _7a=dojo.map(_76,function(s){var evt=s.getAttribute("event")||"postscript";return {event:evt,func:dojo.parser._functionFromScript(s)};});this.mixins.push(function(){dojo.forEach(_7a,function(s){dojo.connect(this,s.event,this,s.func);},this);});_78.widgetsInTemplate=true;_78._skipNodeCache=true;_78.templateString="<"+_77+" class='"+src.className+"' dojoAttachPoint='"+(src.getAttribute("dojoAttachPoint")||"")+"' dojoAttachEvent='"+(src.getAttribute("dojoAttachEvent")||"")+"' >"+src.innerHTML.replace(/\%7B/g,"{").replace(/\%7D/g,"}")+"</"+_77+">";dojo.query("[dojoType]",src).forEach(function(_7e){_7e.removeAttribute("dojoType");});dojo.declare(this.widgetClass,this.mixins,_78);}});}if(!dojo._hasResource["dojo.dnd.common"]){dojo._hasResource["dojo.dnd.common"]=true;dojo.provide("dojo.dnd.common");dojo.dnd._copyKey=navigator.appVersion.indexOf("Macintosh")<0?"ctrlKey":"metaKey";dojo.dnd.getCopyKeyState=function(e){return e[dojo.dnd._copyKey];};dojo.dnd._uniqueId=0;dojo.dnd.getUniqueId=function(){var id;do{id="dojoUnique"+(++dojo.dnd._uniqueId);}while(dojo.byId(id));return id;};dojo.dnd._empty={};dojo.dnd.isFormElement=function(e){var t=e.target;if(t.nodeType==3){t=t.parentNode;}return " button textarea input select option ".indexOf(" "+t.tagName.toLowerCase()+" ")>=0;};}if(!dojo._hasResource["dojo.dnd.autoscroll"]){dojo._hasResource["dojo.dnd.autoscroll"]=true;dojo.provide("dojo.dnd.autoscroll");dojo.dnd.getViewport=function(){var d=dojo.doc,dd=d.documentElement,w=window,b=dojo.body();if(dojo.isMozilla){return {w:dd.clientWidth,h:w.innerHeight};}else{if(!dojo.isOpera&&w.innerWidth){return {w:w.innerWidth,h:w.innerHeight};}else{if(!dojo.isOpera&&dd&&dd.clientWidth){return {w:dd.clientWidth,h:dd.clientHeight};}else{if(b.clientWidth){return {w:b.clientWidth,h:b.clientHeight};}}}}return null;};dojo.dnd.V_TRIGGER_AUTOSCROLL=32;dojo.dnd.H_TRIGGER_AUTOSCROLL=32;dojo.dnd.V_AUTOSCROLL_VALUE=16;dojo.dnd.H_AUTOSCROLL_VALUE=16;dojo.dnd.autoScroll=function(e){var v=dojo.dnd.getViewport(),dx=0,dy=0;if(e.clientX<dojo.dnd.H_TRIGGER_AUTOSCROLL){dx=-dojo.dnd.H_AUTOSCROLL_VALUE;}else{if(e.clientX>v.w-dojo.dnd.H_TRIGGER_AUTOSCROLL){dx=dojo.dnd.H_AUTOSCROLL_VALUE;}}if(e.clientY<dojo.dnd.V_TRIGGER_AUTOSCROLL){dy=-dojo.dnd.V_AUTOSCROLL_VALUE;}else{if(e.clientY>v.h-dojo.dnd.V_TRIGGER_AUTOSCROLL){dy=dojo.dnd.V_AUTOSCROLL_VALUE;}}window.scrollBy(dx,dy);};dojo.dnd._validNodes={"div":1,"p":1,"td":1};dojo.dnd._validOverflow={"auto":1,"scroll":1};dojo.dnd.autoScrollNodes=function(e){for(var n=e.target;n;){if(n.nodeType==1&&(n.tagName.toLowerCase() in dojo.dnd._validNodes)){var s=dojo.getComputedStyle(n);if(s.overflow.toLowerCase() in dojo.dnd._validOverflow){var b=dojo._getContentBox(n,s),t=dojo._abs(n,true);b.l+=t.x+n.scrollLeft;b.t+=t.y+n.scrollTop;var w=Math.min(dojo.dnd.H_TRIGGER_AUTOSCROLL,b.w/2),h=Math.min(dojo.dnd.V_TRIGGER_AUTOSCROLL,b.h/2),rx=e.pageX-b.l,ry=e.pageY-b.t,dx=0,dy=0;if(rx>0&&rx<b.w){if(rx<w){dx=-dojo.dnd.H_AUTOSCROLL_VALUE;}else{if(rx>b.w-w){dx=dojo.dnd.H_AUTOSCROLL_VALUE;}}}if(ry>0&&ry<b.h){if(ry<h){dy=-dojo.dnd.V_AUTOSCROLL_VALUE;}else{if(ry>b.h-h){dy=dojo.dnd.V_AUTOSCROLL_VALUE;}}}var _96=n.scrollLeft,_97=n.scrollTop;n.scrollLeft=n.scrollLeft+dx;n.scrollTop=n.scrollTop+dy;if(_96!=n.scrollLeft||_97!=n.scrollTop){return;}}}try{n=n.parentNode;}catch(x){n=null;}}dojo.dnd.autoScroll(e);};}if(!dojo._hasResource["dojo.dnd.Mover"]){dojo._hasResource["dojo.dnd.Mover"]=true;dojo.provide("dojo.dnd.Mover");dojo.declare("dojo.dnd.Mover",null,{constructor:function(_98,e,_9a){this.node=dojo.byId(_98);this.marginBox={l:e.pageX,t:e.pageY};this.mouseButton=e.button;var h=this.host=_9a,d=_98.ownerDocument,_9d=dojo.connect(d,"onmousemove",this,"onFirstMove");this.events=[dojo.connect(d,"onmousemove",this,"onMouseMove"),dojo.connect(d,"onmouseup",this,"onMouseUp"),dojo.connect(d,"ondragstart",dojo,"stopEvent"),dojo.connect(d,"onselectstart",dojo,"stopEvent"),_9d];if(h&&h.onMoveStart){h.onMoveStart(this);}},onMouseMove:function(e){dojo.dnd.autoScroll(e);var m=this.marginBox;this.host.onMove(this,{l:m.l+e.pageX,t:m.t+e.pageY});},onMouseUp:function(e){if(this.mouseButton==e.button){this.destroy();}},onFirstMove:function(){this.node.style.position="absolute";var m=dojo.marginBox(this.node);m.l-=this.marginBox.l;m.t-=this.marginBox.t;this.marginBox=m;this.host.onFirstMove(this);dojo.disconnect(this.events.pop());},destroy:function(){dojo.forEach(this.events,dojo.disconnect);var h=this.host;if(h&&h.onMoveStop){h.onMoveStop(this);}this.events=this.node=null;}});}if(!dojo._hasResource["dojo.dnd.Moveable"]){dojo._hasResource["dojo.dnd.Moveable"]=true;dojo.provide("dojo.dnd.Moveable");dojo.declare("dojo.dnd.Moveable",null,{handle:"",delay:0,skip:false,constructor:function(_a3,_a4){this.node=dojo.byId(_a3);if(!_a4){_a4={};}this.handle=_a4.handle?dojo.byId(_a4.handle):null;if(!this.handle){this.handle=this.node;}this.delay=_a4.delay>0?_a4.delay:0;this.skip=_a4.skip;this.mover=_a4.mover?_a4.mover:dojo.dnd.Mover;this.events=[dojo.connect(this.handle,"onmousedown",this,"onMouseDown"),dojo.connect(this.handle,"ondragstart",this,"onSelectStart"),dojo.connect(this.handle,"onselectstart",this,"onSelectStart")];},markupFactory:function(_a5,_a6){return new dojo.dnd.Moveable(_a6,_a5);},destroy:function(){dojo.forEach(this.events,dojo.disconnect);this.events=this.node=this.handle=null;},onMouseDown:function(e){if(this.skip&&dojo.dnd.isFormElement(e)){return;}if(this.delay){this.events.push(dojo.connect(this.handle,"onmousemove",this,"onMouseMove"));this.events.push(dojo.connect(this.handle,"onmouseup",this,"onMouseUp"));this._lastX=e.pageX;this._lastY=e.pageY;}else{new this.mover(this.node,e,this);}dojo.stopEvent(e);},onMouseMove:function(e){if(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay){this.onMouseUp(e);new this.mover(this.node,e,this);}dojo.stopEvent(e);},onMouseUp:function(e){dojo.disconnect(this.events.pop());dojo.disconnect(this.events.pop());},onSelectStart:function(e){if(!this.skip||!dojo.dnd.isFormElement(e)){dojo.stopEvent(e);}},onMoveStart:function(_ab){dojo.publish("/dnd/move/start",[_ab]);dojo.addClass(dojo.body(),"dojoMove");dojo.addClass(this.node,"dojoMoveItem");},onMoveStop:function(_ac){dojo.publish("/dnd/move/stop",[_ac]);dojo.removeClass(dojo.body(),"dojoMove");dojo.removeClass(this.node,"dojoMoveItem");},onFirstMove:function(_ad){},onMove:function(_ae,_af){this.onMoving(_ae,_af);dojo.marginBox(_ae.node,_af);this.onMoved(_ae,_af);},onMoving:function(_b0,_b1){},onMoved:function(_b2,_b3){}});}if(!dojo._hasResource["dojo.dnd.move"]){dojo._hasResource["dojo.dnd.move"]=true;dojo.provide("dojo.dnd.move");dojo.declare("dojo.dnd.move.constrainedMoveable",dojo.dnd.Moveable,{constraints:function(){},within:false,markupFactory:function(_b4,_b5){return new dojo.dnd.move.constrainedMoveable(_b5,_b4);},constructor:function(_b6,_b7){if(!_b7){_b7={};}this.constraints=_b7.constraints;this.within=_b7.within;},onFirstMove:function(_b8){var c=this.constraintBox=this.constraints.call(this,_b8),m=_b8.marginBox;c.r=c.l+c.w-(this.within?m.w:0);c.b=c.t+c.h-(this.within?m.h:0);},onMove:function(_bb,_bc){var c=this.constraintBox;_bc.l=_bc.l<c.l?c.l:c.r<_bc.l?c.r:_bc.l;_bc.t=_bc.t<c.t?c.t:c.b<_bc.t?c.b:_bc.t;dojo.marginBox(_bb.node,_bc);}});dojo.declare("dojo.dnd.move.boxConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{box:{},markupFactory:function(_be,_bf){return new dojo.dnd.move.boxConstrainedMoveable(_bf,_be);},constructor:function(_c0,_c1){var box=_c1&&_c1.box;this.constraints=function(){return box;};}});dojo.declare("dojo.dnd.move.parentConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(_c3,_c4){return new dojo.dnd.move.parentConstrainedMoveable(_c4,_c3);},constructor:function(_c5,_c6){var _c7=_c6&&_c6.area;this.constraints=function(){var n=this.node.parentNode,s=dojo.getComputedStyle(n),mb=dojo._getMarginBox(n,s);if(_c7=="margin"){return mb;}var t=dojo._getMarginExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(_c7=="border"){return mb;}t=dojo._getBorderExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(_c7=="padding"){return mb;}t=dojo._getPadExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;return mb;};}});dojo.dnd.move.constrainedMover=function(fun,_cd){var _ce=function(_cf,e,_d1){dojo.dnd.Mover.call(this,_cf,e,_d1);};dojo.extend(_ce,dojo.dnd.Mover.prototype);dojo.extend(_ce,{onMouseMove:function(e){dojo.dnd.autoScroll(e);var m=this.marginBox,c=this.constraintBox,l=m.l+e.pageX,t=m.t+e.pageY;l=l<c.l?c.l:c.r<l?c.r:l;t=t<c.t?c.t:c.b<t?c.b:t;this.host.onMove(this,{l:l,t:t});},onFirstMove:function(){dojo.dnd.Mover.prototype.onFirstMove.call(this);var c=this.constraintBox=fun.call(this),m=this.marginBox;c.r=c.l+c.w-(_cd?m.w:0);c.b=c.t+c.h-(_cd?m.h:0);}});return _ce;};dojo.dnd.move.boxConstrainedMover=function(box,_da){return dojo.dnd.move.constrainedMover(function(){return box;},_da);};dojo.dnd.move.parentConstrainedMover=function(_db,_dc){var fun=function(){var n=this.node.parentNode,s=dojo.getComputedStyle(n),mb=dojo._getMarginBox(n,s);if(_db=="margin"){return mb;}var t=dojo._getMarginExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(_db=="border"){return mb;}t=dojo._getBorderExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(_db=="padding"){return mb;}t=dojo._getPadExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;return mb;};return dojo.dnd.move.constrainedMover(fun,_dc);};dojo.dnd.constrainedMover=dojo.dnd.move.constrainedMover;dojo.dnd.boxConstrainedMover=dojo.dnd.move.boxConstrainedMover;dojo.dnd.parentConstrainedMover=dojo.dnd.move.parentConstrainedMover;}if(!dojo._hasResource["dojo.fx"]){dojo._hasResource["dojo.fx"]=true;dojo.provide("dojo.fx");dojo.provide("dojo.fx.Toggler");dojo.fx.chain=function(_e2){var _e3=_e2.shift();var _e4=_e3;dojo.forEach(_e2,function(_e5){dojo.connect(_e4,"onEnd",_e5,"play");_e4=_e5;});return _e3;};dojo.fx.combine=function(_e6){var ctr=new dojo._Animation({curve:[0,1]});if(!_e6.length){return ctr;}ctr.duration=_e6[0].duration;dojo.forEach(_e6,function(_e8){dojo.forEach(["play","pause","stop"],function(e){if(_e8[e]){dojo.connect(ctr,e,_e8,e);}});});return ctr;};dojo.declare("dojo.fx.Toggler",null,{constructor:function(_ea){var _t=this;dojo.mixin(_t,_ea);_t.node=_ea.node;_t._showArgs=dojo.mixin({},_ea);_t._showArgs.node=_t.node;_t._showArgs.duration=_t.showDuration;_t.showAnim=_t.showFunc(_t._showArgs);_t._hideArgs=dojo.mixin({},_ea);_t._hideArgs.node=_t.node;_t._hideArgs.duration=_t.hideDuration;_t.hideAnim=_t.hideFunc(_t._hideArgs);dojo.connect(_t.showAnim,"beforeBegin",dojo.hitch(_t.hideAnim,"stop",true));dojo.connect(_t.hideAnim,"beforeBegin",dojo.hitch(_t.showAnim,"stop",true));},node:null,showFunc:dojo.fadeIn,hideFunc:dojo.fadeOut,showDuration:200,hideDuration:200,show:function(_ec){return this.showAnim.play(_ec||0);},hide:function(_ed){return this.hideAnim.play(_ed||0);}});dojo.fx.wipeIn=function(_ee){_ee.node=dojo.byId(_ee.node);var _ef=_ee.node,s=_ef.style;var _f1=dojo.animateProperty(dojo.mixin({properties:{height:{start:function(){s.overflow="hidden";if(s.visibility=="hidden"||s.display=="none"){s.height="1px";s.display="";s.visibility="";return 1;}else{var _f2=dojo.style(_ef,"height");return Math.max(_f2,1);}},end:function(){return _ef.scrollHeight;}}}},_ee));dojo.connect(_f1,"onEnd",function(){s.height="auto";});return _f1;};dojo.fx.wipeOut=function(_f3){var _f4=_f3.node=dojo.byId(_f3.node);var s=_f4.style;var _f6=dojo.animateProperty(dojo.mixin({properties:{height:{end:1}}},_f3));dojo.connect(_f6,"beforeBegin",function(){s.overflow="hidden";s.display="";});dojo.connect(_f6,"onEnd",function(){s.height="auto";s.display="none";});return _f6;};dojo.fx.slideTo=function(_f7){var _f8=(_f7.node=dojo.byId(_f7.node));var top=null;var _fa=null;var _fb=(function(n){return function(){var cs=dojo.getComputedStyle(n);var pos=cs.position;top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);_fa=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);if(pos!="absolute"&&pos!="relative"){var ret=dojo.coords(n,true);top=ret.y;_fa=ret.x;n.style.position="absolute";n.style.top=top+"px";n.style.left=_fa+"px";}};})(_f8);_fb();var anim=dojo.animateProperty(dojo.mixin({properties:{top:{end:_f7.top||0},left:{end:_f7.left||0}}},_f7));dojo.connect(anim,"beforeBegin",anim,_fb);return anim;};}if(!dojo._hasResource["dijit.layout.ContentPane"]){dojo._hasResource["dijit.layout.ContentPane"]=true;dojo.provide("dijit.layout.ContentPane");dojo.declare("dijit.layout.ContentPane",dijit._Widget,{href:"",extractContent:false,parseOnLoad:true,preventCache:false,preload:false,refreshOnShow:false,loadingMessage:"<span class='dijitContentPaneLoading'>${loadingState}</span>",errorMessage:"<span class='dijitContentPaneError'>${errorState}</span>",isLoaded:false,"class":"dijitContentPane",postCreate:function(){this.domNode.title="";if(this.preload){this._loadCheck();}var _101=dojo.i18n.getLocalization("dijit","loading",this.lang);this.loadingMessage=dojo.string.substitute(this.loadingMessage,_101);this.errorMessage=dojo.string.substitute(this.errorMessage,_101);dojo.addClass(this.domNode,this["class"]);},startup:function(){if(this._started){return;}this._checkIfSingleChild();if(this._singleChild){this._singleChild.startup();}this._loadCheck();this._started=true;},_checkIfSingleChild:function(){var _102=dojo.query(">",this.containerNode||this.domNode),_103=_102.filter("[widgetId]");if(_102.length==1&&_103.length==1){this.isContainer=true;this._singleChild=dijit.byNode(_103[0]);}else{delete this.isContainer;delete this._singleChild;}},refresh:function(){return this._prepareLoad(true);},setHref:function(href){this.href=href;return this._prepareLoad();},setContent:function(data){if(!this._isDownloaded){this.href="";this._onUnloadHandler();}this._setContent(data||"");this._isDownloaded=false;if(this.parseOnLoad){this._createSubWidgets();}this._checkIfSingleChild();if(this._singleChild&&this._singleChild.resize){this._singleChild.resize(this._contentBox);}this._onLoadHandler();},cancel:function(){if(this._xhrDfd&&(this._xhrDfd.fired==-1)){this._xhrDfd.cancel();}delete this._xhrDfd;},destroy:function(){if(this._beingDestroyed){return;}this._onUnloadHandler();this._beingDestroyed=true;this.inherited("destroy",arguments);},resize:function(size){dojo.marginBox(this.domNode,size);var node=this.containerNode||this.domNode,mb=dojo.mixin(dojo.marginBox(node),size||{});this._contentBox=dijit.layout.marginBox2contentBox(node,mb);if(this._singleChild&&this._singleChild.resize){this._singleChild.resize(this._contentBox);}},_prepareLoad:function(_109){this.cancel();this.isLoaded=false;this._loadCheck(_109);},_loadCheck:function(_10a){var _10b=((this.open!==false)&&(this.domNode.style.display!="none"));if(this.href&&(_10a||(this.preload&&!this._xhrDfd)||(this.refreshOnShow&&_10b&&!this._xhrDfd)||(!this.isLoaded&&_10b&&!this._xhrDfd))){this._downloadExternalContent();}},_downloadExternalContent:function(){this._onUnloadHandler();this._setContent(this.onDownloadStart.call(this));var self=this;var _10d={preventCache:(this.preventCache||this.refreshOnShow),url:this.href,handleAs:"text"};if(dojo.isObject(this.ioArgs)){dojo.mixin(_10d,this.ioArgs);}var hand=this._xhrDfd=(this.ioMethod||dojo.xhrGet)(_10d);hand.addCallback(function(html){try{self.onDownloadEnd.call(self);self._isDownloaded=true;self.setContent.call(self,html);}catch(err){self._onError.call(self,"Content",err);}delete self._xhrDfd;return html;});hand.addErrback(function(err){if(!hand.cancelled){self._onError.call(self,"Download",err);}delete self._xhrDfd;return err;});},_onLoadHandler:function(){this.isLoaded=true;try{this.onLoad.call(this);}catch(e){console.error("Error "+this.widgetId+" running custom onLoad code");}},_onUnloadHandler:function(){this.isLoaded=false;this.cancel();try{this.onUnload.call(this);}catch(e){console.error("Error "+this.widgetId+" running custom onUnload code");}},_setContent:function(cont){this.destroyDescendants();try{var node=this.containerNode||this.domNode;while(node.firstChild){dojo._destroyElement(node.firstChild);}if(typeof cont=="string"){if(this.extractContent){match=cont.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(match){cont=match[1];}}node.innerHTML=cont;}else{if(cont.nodeType){node.appendChild(cont);}else{dojo.forEach(cont,function(n){node.appendChild(n.cloneNode(true));});}}}catch(e){var _114=this.onContentError(e);try{node.innerHTML=_114;}catch(e){console.error("Fatal "+this.id+" could not change content due to "+e.message,e);}}},_onError:function(type,err,_117){var _118=this["on"+type+"Error"].call(this,err);if(_117){console.error(_117,err);}else{if(_118){this._setContent.call(this,_118);}}},_createSubWidgets:function(){var _119=this.containerNode||this.domNode;try{dojo.parser.parse(_119,true);}catch(e){this._onError("Content",e,"Couldn't create widgets in "+this.id+(this.href?" from "+this.href:""));}},onLoad:function(e){},onUnload:function(e){},onDownloadStart:function(){return this.loadingMessage;},onContentError:function(_11c){},onDownloadError:function(_11d){return this.errorMessage;},onDownloadEnd:function(){}});}if(!dojo._hasResource["dijit.form.Form"]){dojo._hasResource["dijit.form.Form"]=true;dojo.provide("dijit.form.Form");dojo.declare("dijit.form._FormMixin",null,{action:"",method:"",enctype:"",name:"","accept-charset":"",accept:"",target:"",attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{action:"",method:"",enctype:"","accept-charset":"",accept:"",target:""}),execute:function(_11e){},onCancel:function(){},onExecute:function(){},templateString:"<form dojoAttachPoint='containerNode' dojoAttachEvent='onsubmit:_onSubmit' name='${name}' enctype='multipart/form-data'></form>",_onSubmit:function(e){dojo.stopEvent(e);this.onExecute();this.execute(this.getValues());},submit:function(){this.containerNode.submit();},setValues:function(obj){var map={};dojo.forEach(this.getDescendants(),function(_122){if(!_122.name){return;}var _123=map[_122.name]||(map[_122.name]=[]);_123.push(_122);});for(var name in map){var _125=map[name],_126=dojo.getObject(name,false,obj);if(!dojo.isArray(_126)){_126=[_126];}if(_125[0].setChecked){dojo.forEach(_125,function(w,i){w.setChecked(dojo.indexOf(_126,w.value)!=-1);});}else{dojo.forEach(_125,function(w,i){w.setValue(_126[i]);});}}},getValues:function(){var obj={};dojo.forEach(this.getDescendants(),function(_12c){var _12d=_12c.getValue?_12c.getValue():_12c.value;var name=_12c.name;if(!name){return;}if(_12c.setChecked){if(/Radio/.test(_12c.declaredClass)){if(_12c.checked){dojo.setObject(name,_12d,obj);}}else{var ary=dojo.getObject(name,false,obj);if(!ary){ary=[];dojo.setObject(name,ary,obj);}if(_12c.checked){ary.push(_12d);}}}else{dojo.setObject(name,_12d,obj);}});return obj;},isValid:function(){return dojo.every(this.getDescendants(),function(_130){return !_130.isValid||_130.isValid();});}});dojo.declare("dijit.form.Form",[dijit._Widget,dijit._Templated,dijit.form._FormMixin],null);}if(!dojo._hasResource["dijit.Dialog"]){dojo._hasResource["dijit.Dialog"]=true;dojo.provide("dijit.Dialog");dojo.declare("dijit.DialogUnderlay",[dijit._Widget,dijit._Templated],{templateString:"<div class=dijitDialogUnderlayWrapper id='${id}_underlay'><div class=dijitDialogUnderlay dojoAttachPoint='node'></div></div>",postCreate:function(){dojo.body().appendChild(this.domNode);this.bgIframe=new dijit.BackgroundIframe(this.domNode);},layout:function(){var _131=dijit.getViewport();var is=this.node.style,os=this.domNode.style;os.top=_131.t+"px";os.left=_131.l+"px";is.width=_131.w+"px";is.height=_131.h+"px";var _134=dijit.getViewport();if(_131.w!=_134.w){is.width=_134.w+"px";}if(_131.h!=_134.h){is.height=_134.h+"px";}},show:function(){this.domNode.style.display="block";this.layout();if(this.bgIframe.iframe){this.bgIframe.iframe.style.display="block";}this._resizeHandler=this.connect(window,"onresize","layout");},hide:function(){this.domNode.style.display="none";if(this.bgIframe.iframe){this.bgIframe.iframe.style.display="none";}this.disconnect(this._resizeHandler);},uninitialize:function(){if(this.bgIframe){this.bgIframe.destroy();}}});dojo.declare("dijit.Dialog",[dijit.layout.ContentPane,dijit._Templated,dijit.form._FormMixin],{templateString:null,templateString:"<div class=\"dijitDialog\">\n\t<div dojoAttachPoint=\"titleBar\" class=\"dijitDialogTitleBar\" tabindex=\"0\" waiRole=\"dialog\">\n\t<span dojoAttachPoint=\"titleNode\" class=\"dijitDialogTitle\">${title}</span>\n\t<span dojoAttachPoint=\"closeButtonNode\" class=\"dijitDialogCloseIcon\" dojoAttachEvent=\"onclick: hide\">\n\t\t<span dojoAttachPoint=\"closeText\" class=\"closeText\">x</span>\n\t</span>\n\t</div>\n\t\t<div dojoAttachPoint=\"containerNode\" class=\"dijitDialogPaneContent\"></div>\n\t<span dojoAttachPoint=\"tabEnd\" dojoAttachEvent=\"onfocus:_cycleFocus\" tabindex=\"0\"></span>\n</div>\n",open:false,duration:400,_lastFocusItem:null,attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{title:"titleBar"}),postCreate:function(){dojo.body().appendChild(this.domNode);this.inherited("postCreate",arguments);this.domNode.style.display="none";this.connect(this,"onExecute","hide");this.connect(this,"onCancel","hide");},onLoad:function(){this._position();this.inherited("onLoad",arguments);},_setup:function(){this._modalconnects=[];if(this.titleBar){this._moveable=new dojo.dnd.Moveable(this.domNode,{handle:this.titleBar});}this._underlay=new dijit.DialogUnderlay();var node=this.domNode;this._fadeIn=dojo.fx.combine([dojo.fadeIn({node:node,duration:this.duration}),dojo.fadeIn({node:this._underlay.domNode,duration:this.duration,onBegin:dojo.hitch(this._underlay,"show")})]);this._fadeOut=dojo.fx.combine([dojo.fadeOut({node:node,duration:this.duration,onEnd:function(){node.style.display="none";}}),dojo.fadeOut({node:this._underlay.domNode,duration:this.duration,onEnd:dojo.hitch(this._underlay,"hide")})]);},uninitialize:function(){if(this._underlay){this._underlay.destroy();}},_position:function(){if(dojo.hasClass(dojo.body(),"dojoMove")){return;}var _136=dijit.getViewport();var mb=dojo.marginBox(this.domNode);var _138=this.domNode.style;_138.left=Math.floor((_136.l+(_136.w-mb.w)/2))+"px";_138.top=Math.floor((_136.t+(_136.h-mb.h)/2))+"px";},_findLastFocus:function(evt){this._lastFocused=evt.target;},_cycleFocus:function(evt){if(!this._lastFocusItem){this._lastFocusItem=this._lastFocused;}this.titleBar.focus();},_onKey:function(evt){if(evt.keyCode){var node=evt.target;if(node==this.titleBar&&evt.shiftKey&&evt.keyCode==dojo.keys.TAB){if(this._lastFocusItem){this._lastFocusItem.focus();}dojo.stopEvent(evt);}else{while(node){if(node==this.domNode){if(evt.keyCode==dojo.keys.ESCAPE){this.hide();}else{return;}}node=node.parentNode;}if(evt.keyCode!=dojo.keys.TAB){dojo.stopEvent(evt);}else{if(!dojo.isOpera){try{this.titleBar.focus();}catch(e){}}}}}},show:function(){if(!this._alreadyInitialized){this._setup();this._alreadyInitialized=true;}if(this._fadeOut.status()=="playing"){this._fadeOut.stop();}this._modalconnects.push(dojo.connect(window,"onscroll",this,"layout"));this._modalconnects.push(dojo.connect(document.documentElement,"onkeypress",this,"_onKey"));var ev=typeof (document.ondeactivate)=="object"?"ondeactivate":"onblur";this._modalconnects.push(dojo.connect(this.containerNode,ev,this,"_findLastFocus"));dojo.style(this.domNode,"opacity",0);this.domNode.style.display="block";this.open=true;this._loadCheck();this._position();this._fadeIn.play();this._savedFocus=dijit.getFocus(this);setTimeout(dojo.hitch(this,function(){dijit.focus(this.titleBar);}),50);},hide:function(){if(!this._alreadyInitialized){return;}if(this._fadeIn.status()=="playing"){this._fadeIn.stop();}this._fadeOut.play();if(this._scrollConnected){this._scrollConnected=false;}dojo.forEach(this._modalconnects,dojo.disconnect);this._modalconnects=[];this.connect(this._fadeOut,"onEnd",dojo.hitch(this,function(){dijit.focus(this._savedFocus);}));this.open=false;},layout:function(){if(this.domNode.style.display=="block"){this._underlay.layout();this._position();}}});dojo.declare("dijit.TooltipDialog",[dijit.layout.ContentPane,dijit._Templated,dijit.form._FormMixin],{title:"",_lastFocusItem:null,templateString:null,templateString:"<div class=\"dijitTooltipDialog\" >\n\t<div class=\"dijitTooltipContainer\">\n\t\t<div class =\"dijitTooltipContents dijitTooltipFocusNode\" dojoAttachPoint=\"containerNode\" tabindex=\"0\" waiRole=\"dialog\"></div>\n\t</div>\n\t<span dojoAttachPoint=\"tabEnd\" tabindex=\"0\" dojoAttachEvent=\"focus:_cycleFocus\"></span>\n\t<div class=\"dijitTooltipConnector\" ></div>\n</div>\n",postCreate:function(){this.inherited("postCreate",arguments);this.connect(this.containerNode,"onkeypress","_onKey");var ev=typeof (document.ondeactivate)=="object"?"ondeactivate":"onblur";this.connect(this.containerNode,ev,"_findLastFocus");this.containerNode.title=this.title;},orient:function(_13f){this.domNode.className="dijitTooltipDialog "+" dijitTooltipAB"+(_13f.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(_13f.charAt(0)=="T"?"Below":"Above");},onOpen:function(pos){this.orient(pos.corner);this._loadCheck();this.containerNode.focus();},_onKey:function(evt){if(evt.keyCode==dojo.keys.ESCAPE){this.onCancel();}else{if(evt.target==this.containerNode&&evt.shiftKey&&evt.keyCode==dojo.keys.TAB){if(this._lastFocusItem){this._lastFocusItem.focus();}dojo.stopEvent(evt);}else{if(evt.keyCode==dojo.keys.TAB){evt.stopPropagation();}}}},_findLastFocus:function(evt){this._lastFocused=evt.target;},_cycleFocus:function(evt){if(!this._lastFocusItem){this._lastFocusItem=this._lastFocused;}this.containerNode.focus();}});}if(!dojo._hasResource["dijit._editor.selection"]){dojo._hasResource["dijit._editor.selection"]=true;dojo.provide("dijit._editor.selection");dojo.mixin(dijit._editor.selection,{getType:function(){if(dojo.doc["selection"]){return dojo.doc.selection.type.toLowerCase();}else{var _144="text";var oSel;try{oSel=dojo.global.getSelection();}catch(e){}if(oSel&&oSel.rangeCount==1){var _146=oSel.getRangeAt(0);if((_146.startContainer==_146.endContainer)&&((_146.endOffset-_146.startOffset)==1)&&(_146.startContainer.nodeType!=3)){_144="control";}}return _144;}},getSelectedText:function(){if(dojo.doc["selection"]){if(dijit._editor.selection.getType()=="control"){return null;}return dojo.doc.selection.createRange().text;}else{var _147=dojo.global.getSelection();if(_147){return _147.toString();}}},getSelectedHtml:function(){if(dojo.doc["selection"]){if(dijit._editor.selection.getType()=="control"){return null;}return dojo.doc.selection.createRange().htmlText;}else{var _148=dojo.global.getSelection();if(_148&&_148.rangeCount){var frag=_148.getRangeAt(0).cloneContents();var div=document.createElement("div");div.appendChild(frag);return div.innerHTML;}return null;}},getSelectedElement:function(){if(this.getType()=="control"){if(dojo.doc["selection"]){var _14b=dojo.doc.selection.createRange();if(_14b&&_14b.item){return dojo.doc.selection.createRange().item(0);}}else{var _14c=dojo.global.getSelection();return _14c.anchorNode.childNodes[_14c.anchorOffset];}}},getParentElement:function(){if(this.getType()=="control"){var p=this.getSelectedElement();if(p){return p.parentNode;}}else{if(dojo.doc["selection"]){return dojo.doc.selection.createRange().parentElement();}else{var _14e=dojo.global.getSelection();if(_14e){var node=_14e.anchorNode;while(node&&(node.nodeType!=1)){node=node.parentNode;}return node;}}}},hasAncestorElement:function(_150){return (this.getAncestorElement.apply(this,arguments)!=null);},getAncestorElement:function(_151){var node=this.getSelectedElement()||this.getParentElement();return this.getParentOfType(node,arguments);},isTag:function(node,tags){if(node&&node.tagName){var _nlc=node.tagName.toLowerCase();for(var i=0;i<tags.length;i++){var _tlc=String(tags[i]).toLowerCase();if(_nlc==_tlc){return _tlc;}}}return "";},getParentOfType:function(node,tags){while(node){if(this.isTag(node,tags).length){return node;}node=node.parentNode;}return null;},remove:function(){var _s=dojo.doc.selection;if(_s){if(_s.type.toLowerCase()!="none"){_s.clear();}return _s;}else{_s=dojo.global.getSelection();_s.deleteFromDocument();return _s;}},selectElementChildren:function(_15b,_15c){var _15d=dojo.global;var _15e=dojo.doc;_15b=dojo.byId(_15b);if(_15e.selection&&dojo.body().createTextRange){var _15f=_15b.ownerDocument.body.createTextRange();_15f.moveToElementText(_15b);if(!_15c){_15f.select();}}else{if(_15d["getSelection"]){var _160=_15d.getSelection();if(_160["setBaseAndExtent"]){_160.setBaseAndExtent(_15b,0,_15b,_15b.innerText.length-1);}else{if(_160["selectAllChildren"]){_160.selectAllChildren(_15b);}}}}},selectElement:function(_161,_162){var _163=dojo.doc;_161=dojo.byId(_161);if(_163.selection&&dojo.body().createTextRange){try{var _164=dojo.body().createControlRange();_164.addElement(_161);if(!_162){_164.select();}}catch(e){this.selectElementChildren(_161,_162);}}else{if(dojo.global["getSelection"]){var _165=dojo.global.getSelection();if(_165["removeAllRanges"]){var _164=_163.createRange();_164.selectNode(_161);_165.removeAllRanges();_165.addRange(_164);}}}}});}if(!dojo._hasResource["dijit._editor.RichText"]){dojo._hasResource["dijit._editor.RichText"]=true;dojo.provide("dijit._editor.RichText");if(!djConfig["useXDomain"]||djConfig["allowXdRichTextSave"]){if(dojo._postLoad){(function(){var _166=dojo.doc.createElement("textarea");_166.id="dijit._editor.RichText.savedContent";var s=_166.style;s.display="none";s.position="absolute";s.top="-100px";s.left="-100px";s.height="3px";s.width="3px";dojo.body().appendChild(_166);})();}else{try{dojo.doc.write("<textarea id=\"dijit._editor.RichText.savedContent\" "+"style=\"display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;\"></textarea>");}catch(e){}}}dojo.declare("dijit._editor.RichText",[dijit._Widget],{constructor:function(){this.contentPreFilters=[];this.contentPostFilters=[];this.contentDomPreFilters=[];this.contentDomPostFilters=[];this.editingAreaStyleSheets=[];this._keyHandlers={};this.contentPreFilters.push(dojo.hitch(this,"_preFixUrlAttributes"));if(dojo.isMoz){this.contentPreFilters.push(this._fixContentForMoz);}this.onLoadDeferred=new dojo.Deferred();},inheritWidth:false,focusOnLoad:false,name:"",styleSheets:"",_content:"",height:"300px",minHeight:"1em",isClosed:true,isLoaded:false,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",onLoadDeferred:null,postCreate:function(){dojo.publish("dijit._editor.RichText::init",[this]);this.open();this.setupDefaultShortcuts();},setupDefaultShortcuts:function(){var ctrl=this.KEY_CTRL;var exec=function(cmd,arg){return arguments.length==1?function(){this.execCommand(cmd);}:function(){this.execCommand(cmd,arg);};};this.addKeyHandler("b",ctrl,exec("bold"));this.addKeyHandler("i",ctrl,exec("italic"));this.addKeyHandler("u",ctrl,exec("underline"));this.addKeyHandler("a",ctrl,exec("selectall"));this.addKeyHandler("s",ctrl,function(){this.save(true);});this.addKeyHandler("1",ctrl,exec("formatblock","h1"));this.addKeyHandler("2",ctrl,exec("formatblock","h2"));this.addKeyHandler("3",ctrl,exec("formatblock","h3"));this.addKeyHandler("4",ctrl,exec("formatblock","h4"));this.addKeyHandler("\\",ctrl,exec("insertunorderedlist"));if(!dojo.isIE){this.addKeyHandler("Z",ctrl,exec("redo"));}},events:["onKeyPress","onKeyDown","onKeyUp","onClick"],captureEvents:[],_editorCommandsLocalized:false,_localizeEditorCommands:function(){if(this._editorCommandsLocalized){return;}this._editorCommandsLocalized=true;var _16c=["p","pre","address","h1","h2","h3","h4","h5","h6","ol","div","ul"];var _16d="",_16e,i=0;while((_16e=_16c[i++])){if(_16e.charAt(1)!="l"){_16d+="<"+_16e+"><span>content</span></"+_16e+">";}else{_16d+="<"+_16e+"><li>content</li></"+_16e+">";}}var div=document.createElement("div");div.style.position="absolute";div.style.left="-2000px";div.style.top="-2000px";document.body.appendChild(div);div.innerHTML=_16d;var node=div.firstChild;while(node){dijit._editor.selection.selectElement(node.firstChild);dojo.withGlobal(this.window,"selectElement",dijit._editor.selection,[node.firstChild]);var _172=node.tagName.toLowerCase();this._local2NativeFormatNames[_172]=document.queryCommandValue("formatblock");this._native2LocalFormatNames[this._local2NativeFormatNames[_172]]=_172;node=node.nextSibling;}document.body.removeChild(div);},open:function(_173){if((!this.onLoadDeferred)||(this.onLoadDeferred.fired>=0)){this.onLoadDeferred=new dojo.Deferred();}if(!this.isClosed){this.close();}dojo.publish("dijit._editor.RichText::open",[this]);this._content="";if((arguments.length==1)&&(_173["nodeName"])){this.domNode=_173;}if((this.domNode["nodeName"])&&(this.domNode.nodeName.toLowerCase()=="textarea")){this.textarea=this.domNode;this.name=this.textarea.name;var html=this._preFilterContent(this.textarea.value);this.domNode=dojo.doc.createElement("div");this.domNode.setAttribute("widgetId",this.id);this.textarea.removeAttribute("widgetId");this.domNode.cssText=this.textarea.cssText;this.domNode.className+=" "+this.textarea.className;dojo.place(this.domNode,this.textarea,"before");var _175=dojo.hitch(this,function(){with(this.textarea.style){display="block";position="absolute";left=top="-1000px";if(dojo.isIE){this.__overflow=overflow;overflow="hidden";}}});if(dojo.isIE){setTimeout(_175,10);}else{_175();}}else{var html=this._preFilterContent(this.getNodeChildrenHtml(this.domNode));this.domNode.innerHTML="";}if(html==""){html="&nbsp;";}var _176=dojo.contentBox(this.domNode);this._oldHeight=_176.h;this._oldWidth=_176.w;this.savedContent=html;if((this.domNode["nodeName"])&&(this.domNode.nodeName=="LI")){this.domNode.innerHTML=" <br>";}this.editingArea=dojo.doc.createElement("div");this.domNode.appendChild(this.editingArea);if(this.name!=""&&(!djConfig["useXDomain"]||djConfig["allowXdRichTextSave"])){var _177=dojo.byId("dijit._editor.RichText.savedContent");if(_177.value!=""){var _178=_177.value.split(this._SEPARATOR),i=0,dat;while((dat=_178[i++])){var data=dat.split(":");if(data[0]==this.name){html=data[1];_178.splice(i,1);break;}}}dojo.connect(window,"onbeforeunload",this,"_saveContent");}this.isClosed=false;if(dojo.isIE||dojo.isSafari||dojo.isOpera){var ifr=this.iframe=dojo.doc.createElement("iframe");ifr.src="javascript:void(0)";this.editorObject=ifr;ifr.style.border="none";ifr.style.width="100%";ifr.frameBorder=0;this.editingArea.appendChild(ifr);this.window=ifr.contentWindow;this.document=this.window.document;this.document.open();this.document.write(this._getIframeDocTxt(html));this.document.close();if(dojo.isIE>=7){if(this.height){ifr.style.height=this.height;}if(this.minHeight){ifr.style.minHeight=this.minHeight;}}else{ifr.style.height=this.height?this.height:this.minHeight;}if(dojo.isIE){this._localizeEditorCommands();}this.onLoad();}else{this._drawIframe(html);}if(this.domNode.nodeName=="LI"){this.domNode.lastChild.style.marginTop="-1.2em";}this.domNode.className+=" RichTextEditable";},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_localizedIframeTitles:null,_getIframeDocTxt:function(html){var _cs=dojo.getComputedStyle(this.domNode);if(!this.height&&!dojo.isMoz){html="<div>"+html+"</div>";}var font=[_cs.fontWeight,_cs.fontSize,_cs.fontFamily].join(" ");var _180=_cs.lineHeight;if(_180.indexOf("px")>=0){_180=parseFloat(_180)/parseFloat(_cs.fontSize);}else{if(_180.indexOf("em")>=0){_180=parseFloat(_180);}else{_180="1.0";}}return [this.isLeftToRight()?"<html><head>":"<html dir='rtl'><head>",(dojo.isMoz?"<title>"+this._localizedIframeTitles.iframeEditTitle+"</title>":""),"<style>","body,html {","\tbackground:transparent;","\tpadding: 0;","\tmargin: 0;","}","body{","\ttop:0px; left:0px; right:0px;",((this.height||dojo.isOpera)?"":"position: fixed;"),"\tfont:",font,";","\tmin-height:",this.minHeight,";","\tline-height:",_180,"}","p{ margin: 1em 0 !important; }",(this.height?"":"body,html{overflow-y:hidden;/*for IE*/} body > div {overflow-x:auto;/*for FF to show vertical scrollbar*/}"),"li > ul:-moz-first-node, li > ol:-moz-first-node{ padding-top: 1.2em; } ","li{ min-height:1.2em; }","</style>",this._applyEditingAreaStyleSheets(),"</head><body>"+html+"</body></html>"].join("");},_drawIframe:function(html){if(!this.iframe){var ifr=this.iframe=dojo.doc.createElement("iframe");var ifrs=ifr.style;ifrs.border="none";ifrs.lineHeight="0";ifrs.verticalAlign="bottom";this.editorObject=this.iframe;this._localizedIframeTitles=dojo.i18n.getLocalization("dijit","Textarea");var _184=dojo.query("label[for=\""+this.id+"\"]");if(_184.length){this._localizedIframeTitles.iframeEditTitle=_184[0].innerHTML+" "+this._localizedIframeTitles.iframeEditTitle;}}this.iframe.style.width=this.inheritWidth?this._oldWidth:"100%";if(this.height){this.iframe.style.height=this.height;}else{this.iframe.height=this._oldHeight;}if(this.textarea){var _185=this.srcNodeRef;}else{var _185=dojo.doc.createElement("div");_185.style.display="none";_185.innerHTML=html;this.editingArea.appendChild(_185);}this.editingArea.appendChild(this.iframe);var _186=false;var _187=this.iframe.contentDocument;_187.open();_187.write(this._getIframeDocTxt(html));_187.close();var _188=dojo.hitch(this,function(){if(!_186){_186=true;}else{return;}if(!this.editNode){try{if(this.iframe.contentWindow){this.window=this.iframe.contentWindow;this.document=this.iframe.contentWindow.document;}else{if(this.iframe.contentDocument){this.window=this.iframe.contentDocument.window;this.document=this.iframe.contentDocument;}}if(!this.document.body){throw "Error";}}catch(e){setTimeout(_188,500);_186=false;return;}dojo._destroyElement(_185);this.document.designMode="on";this.onLoad();}else{dojo._destroyElement(_185);this.editNode.innerHTML=html;this.onDisplayChanged();}this._preDomFilterContent(this.editNode);});_188();},_applyEditingAreaStyleSheets:function(){var _189=[];if(this.styleSheets){_189=this.styleSheets.split(";");this.styleSheets="";}_189=_189.concat(this.editingAreaStyleSheets);this.editingAreaStyleSheets=[];var text="",i=0,url;while((url=_189[i++])){var _18d=(new dojo._Url(dojo.global.location,url)).toString();this.editingAreaStyleSheets.push(_18d);text+="<link rel=\"stylesheet\" type=\"text/css\" href=\""+_18d+"\"/>";}return text;},addStyleSheet:function(uri){var url=uri.toString();if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){url=(new dojo._Url(dojo.global.location,url)).toString();}if(dojo.indexOf(this.editingAreaStyleSheets,url)>-1){console.debug("dijit._editor.RichText.addStyleSheet: Style sheet "+url+" is already applied to the editing area!");return;}this.editingAreaStyleSheets.push(url);if(this.document.createStyleSheet){this.document.createStyleSheet(url);}else{var head=this.document.getElementsByTagName("head")[0];var _191=this.document.createElement("link");with(_191){rel="stylesheet";type="text/css";href=url;}head.appendChild(_191);}},removeStyleSheet:function(uri){var url=uri.toString();if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){url=(new dojo._Url(dojo.global.location,url)).toString();}var _194=dojo.indexOf(this.editingAreaStyleSheets,url);if(_194==-1){console.debug("dijit._editor.RichText.removeStyleSheet: Style sheet "+url+" is not applied to the editing area so it can not be removed!");return;}delete this.editingAreaStyleSheets[_194];dojo.withGlobal(this.window,"query",dojo,["link:[href=\""+url+"\"]"]).orphan();},disabled:false,_mozSettingProps:["styleWithCSS","insertBrOnReturn"],setDisabled:function(_195){if(dojo.isIE||dojo.isSafari||dojo.isOpera){this.editNode.contentEditable=!_195;}else{if(_195){this._mozSettings=[false,this.blockNodeForEnter==="BR"];}this.document.designMode=(_195?"off":"on");if(!_195){dojo.forEach(this._mozSettingProps,function(s,i){this.document.execCommand(s,false,this._mozSettings[i]);},this);}}this.disabled=_195;},_isResized:function(){return false;},onLoad:function(e){this.isLoaded=true;if(this.height||dojo.isMoz){this.editNode=this.document.body;}else{this.editNode=this.document.body.firstChild;}this.editNode.contentEditable=true;this._preDomFilterContent(this.editNode);var _199=this.events.concat(this.captureEvents),i=0,et;while((et=_199[i++])){this.connect(this.document,et.toLowerCase(),et);}if(!dojo.isIE){try{this.document.execCommand("styleWithCSS",false,false);}catch(e2){}}else{this.editNode.style.zoom=1;}if(this.focusOnLoad){this.focus();}this.onDisplayChanged(e);if(this.onLoadDeferred){this.onLoadDeferred.callback(true);}},onKeyDown:function(e){if(dojo.isIE){if(e.keyCode===dojo.keys.BACKSPACE&&this.document.selection.type==="Control"){dojo.stopEvent(e);this.execCommand("delete");}else{if((65<=e.keyCode&&e.keyCode<=90)||(e.keyCode>=37&&e.keyCode<=40)){e.charCode=e.keyCode;this.onKeyPress(e);}}}else{if(dojo.isMoz){if(e.keyCode==dojo.keys.TAB&&!e.shiftKey&&!e.ctrlKey&&!e.altKey&&this.iframe){this.iframe.contentDocument.title=this._localizedIframeTitles.iframeFocusTitle;this.iframe.focus();dojo.stopEvent(e);}else{if(e.keyCode==dojo.keys.TAB&&e.shiftKey){if(this.toolbar){this.toolbar.focus();}dojo.stopEvent(e);}}}}},onKeyUp:function(e){return;},KEY_CTRL:1,KEY_SHIFT:2,onKeyPress:function(e){var _19f=e.ctrlKey?this.KEY_CTRL:0|e.shiftKey?this.KEY_SHIFT:0;var key=e.keyChar||e.keyCode;if(this._keyHandlers[key]){var _1a1=this._keyHandlers[key],i=0,h;while((h=_1a1[i++])){if(_19f==h.modifiers){if(!h.handler.apply(this,arguments)){e.preventDefault();}break;}}}setTimeout(dojo.hitch(this,function(){this.onKeyPressed(e);}),1);},addKeyHandler:function(key,_1a5,_1a6){if(!dojo.isArray(this._keyHandlers[key])){this._keyHandlers[key]=[];}this._keyHandlers[key].push({modifiers:_1a5||0,handler:_1a6});},onKeyPressed:function(e){this.onDisplayChanged();},onClick:function(e){this.onDisplayChanged(e);},_onBlur:function(e){var _c=this.getValue(true);if(_c!=this.savedContent){this.onChange(_c);this.savedContent=_c;}if(dojo.isMoz&&this.iframe){this.iframe.contentDocument.title=this._localizedIframeTitles.iframeEditTitle;}},_initialFocus:true,_onFocus:function(e){if((dojo.isMoz)&&(this._initialFocus)){this._initialFocus=false;if(this.editNode.innerHTML.replace(/^\s+|\s+$/g,"")=="&nbsp;"){this.placeCursorAtStart();}}},blur:function(){if(this.iframe){this.window.blur();}else{if(this.editNode){this.editNode.blur();}}},focus:function(){if(this.iframe&&!dojo.isIE){dijit.focus(this.iframe);}else{if(this.editNode&&this.editNode.focus){dijit.focus(this.editNode);}else{console.debug("Have no idea how to focus into the editor!");}}},updateInterval:200,_updateTimer:null,onDisplayChanged:function(e){if(!this._updateTimer){if(this._updateTimer){clearTimeout(this._updateTimer);}this._updateTimer=setTimeout(dojo.hitch(this,this.onNormalizedDisplayChanged),this.updateInterval);}},onNormalizedDisplayChanged:function(){this._updateTimer=null;},onChange:function(_1ad){},_normalizeCommand:function(cmd){var _1af=cmd.toLowerCase();if(_1af=="formatblock"){if(dojo.isSafari){_1af="heading";}}else{if(_1af=="hilitecolor"&&!dojo.isMoz){_1af="backcolor";}}return _1af;},queryCommandAvailable:function(_1b0){var ie=1;var _1b2=1<<1;var _1b3=1<<2;var _1b4=1<<3;var _1b5=1<<4;var _1b6=dojo.isSafari;function isSupportedBy(_1b7){return {ie:Boolean(_1b7&ie),mozilla:Boolean(_1b7&_1b2),safari:Boolean(_1b7&_1b3),safari420:Boolean(_1b7&_1b5),opera:Boolean(_1b7&_1b4)};};var _1b8=null;switch(_1b0.toLowerCase()){case "bold":case "italic":case "underline":case "subscript":case "superscript":case "fontname":case "fontsize":case "forecolor":case "hilitecolor":case "justifycenter":case "justifyfull":case "justifyleft":case "justifyright":case "delete":case "selectall":_1b8=isSupportedBy(_1b2|ie|_1b3|_1b4);break;case "createlink":case "unlink":case "removeformat":case "inserthorizontalrule":case "insertimage":case "insertorderedlist":case "insertunorderedlist":case "indent":case "outdent":case "formatblock":case "inserthtml":case "undo":case "redo":case "strikethrough":_1b8=isSupportedBy(_1b2|ie|_1b4|_1b5);break;case "blockdirltr":case "blockdirrtl":case "dirltr":case "dirrtl":case "inlinedirltr":case "inlinedirrtl":_1b8=isSupportedBy(ie);break;case "cut":case "copy":case "paste":_1b8=isSupportedBy(ie|_1b2|_1b5);break;case "inserttable":_1b8=isSupportedBy(_1b2|ie);break;case "insertcell":case "insertcol":case "insertrow":case "deletecells":case "deletecols":case "deleterows":case "mergecells":case "splitcell":_1b8=isSupportedBy(ie|_1b2);break;default:return false;}return (dojo.isIE&&_1b8.ie)||(dojo.isMoz&&_1b8.mozilla)||(dojo.isSafari&&_1b8.safari)||(_1b6&&_1b8.safari420)||(dojo.isOpera&&_1b8.opera);},execCommand:function(_1b9,_1ba){var _1bb;this.focus();_1b9=this._normalizeCommand(_1b9);if(_1ba!=undefined){if(_1b9=="heading"){throw new Error("unimplemented");}else{if((_1b9=="formatblock")&&dojo.isIE){_1ba="<"+_1ba+">";}}}if(_1b9=="inserthtml"){_1ba=this._preFilterContent(_1ba);if(dojo.isIE){var _1bc=this.document.selection.createRange();_1bc.pasteHTML(_1ba);_1bc.select();_1bb=true;}else{if(dojo.isMoz&&!_1ba.length){dojo.withGlobal(this.window,"remove",dijit._editor.selection);_1bb=true;}else{_1bb=this.document.execCommand(_1b9,false,_1ba);}}}else{if((_1b9=="unlink")&&(this.queryCommandEnabled("unlink"))&&(dojo.isMoz||dojo.isSafari)){var _1bd=this.window.getSelection();var a=dojo.withGlobal(this.window,"getAncestorElement",dijit._editor.selection,["a"]);dojo.withGlobal(this.window,"selectElement",dijit._editor.selection,[a]);_1bb=this.document.execCommand("unlink",false,null);}else{if((_1b9=="hilitecolor")&&(dojo.isMoz)){this.document.execCommand("styleWithCSS",false,true);_1bb=this.document.execCommand(_1b9,false,_1ba);this.document.execCommand("styleWithCSS",false,false);}else{if((dojo.isIE)&&((_1b9=="backcolor")||(_1b9=="forecolor"))){_1ba=arguments.length>1?_1ba:null;_1bb=this.document.execCommand(_1b9,false,_1ba);}else{_1ba=arguments.length>1?_1ba:null;if(_1ba||_1b9!="createlink"){_1bb=this.document.execCommand(_1b9,false,_1ba);}}}}}this.onDisplayChanged();return _1bb;},queryCommandEnabled:function(_1bf){_1bf=this._normalizeCommand(_1bf);if(dojo.isMoz||dojo.isSafari){if(_1bf=="unlink"){return dojo.withGlobal(this.window,"hasAncestorElement",dijit._editor.selection,["a"]);}else{if(_1bf=="inserttable"){return true;}}}if(dojo.isSafari){if(_1bf=="copy"){_1bf="cut";}else{if(_1bf=="paste"){return true;}}}var elem=(dojo.isIE)?this.document.selection.createRange():this.document;return elem.queryCommandEnabled(_1bf);},queryCommandState:function(_1c1){_1c1=this._normalizeCommand(_1c1);return this.document.queryCommandState(_1c1);},queryCommandValue:function(_1c2){_1c2=this._normalizeCommand(_1c2);if(dojo.isIE&&_1c2=="formatblock"){return this._local2NativeFormatNames[this.document.queryCommandValue(_1c2)];}return this.document.queryCommandValue(_1c2);},placeCursorAtStart:function(){this.focus();var _1c3=false;if(dojo.isMoz){var _1c4=this.editNode.firstChild;while(_1c4){if(_1c4.nodeType==3){if(_1c4.nodeValue.replace(/^\s+|\s+$/g,"").length>0){_1c3=true;dojo.withGlobal(this.window,"selectElement",dijit._editor.selection,[_1c4]);break;}}else{if(_1c4.nodeType==1){_1c3=true;dojo.withGlobal(this.window,"selectElementChildren",dijit._editor.selection,[_1c4]);break;}}_1c4=_1c4.nextSibling;}}else{_1c3=true;dojo.withGlobal(this.window,"selectElementChildren",dijit._editor.selection,[this.editNode]);}if(_1c3){dojo.withGlobal(this.window,"collapse",dijit._editor.selection,[true]);}},placeCursorAtEnd:function(){this.focus();var _1c5=false;if(dojo.isMoz){var last=this.editNode.lastChild;while(last){if(last.nodeType==3){if(last.nodeValue.replace(/^\s+|\s+$/g,"").length>0){_1c5=true;dojo.withGlobal(this.window,"selectElement",dijit._editor.selection,[last]);break;}}else{if(last.nodeType==1){_1c5=true;if(last.lastChild){dojo.withGlobal(this.window,"selectElement",dijit._editor.selection,[last.lastChild]);}else{dojo.withGlobal(this.window,"selectElement",dijit._editor.selection,[last]);}break;}}last=last.previousSibling;}}else{_1c5=true;dojo.withGlobal(this.window,"selectElementChildren",dijit._editor.selection,[this.editNode]);}if(_1c5){dojo.withGlobal(this.window,"collapse",dijit._editor.selection,[false]);}},getValue:function(_1c7){if(this.textarea){if(this.isClosed||!this.isLoaded){return this.textarea.value;}}return this._postFilterContent(null,_1c7);},setValue:function(html){if(this.textarea&&(this.isClosed||!this.isLoaded)){this.textarea.value=html;}else{html=this._preFilterContent(html);if(this.isClosed){this.domNode.innerHTML=html;this._preDomFilterContent(this.domNode);}else{this.editNode.innerHTML=html;this._preDomFilterContent(this.editNode);}}},replaceValue:function(html){if(this.isClosed){this.setValue(html);}else{if(this.window&&this.window.getSelection&&!dojo.isMoz){this.setValue(html);}else{if(this.window&&this.window.getSelection){html=this._preFilterContent(html);this.execCommand("selectall");if(dojo.isMoz&&!html){html="&nbsp;";}this.execCommand("inserthtml",html);this._preDomFilterContent(this.editNode);}else{if(this.document&&this.document.selection){this.setValue(html);}}}}},_preFilterContent:function(html){var ec=html;dojo.forEach(this.contentPreFilters,function(ef){if(ef){ec=ef(ec);}});return ec;},_preDomFilterContent:function(dom){dom=dom||this.editNode;dojo.forEach(this.contentDomPreFilters,function(ef){if(ef&&dojo.isFunction(ef)){ef(dom);}},this);},_postFilterContent:function(dom,_1d0){dom=dom||this.editNode;if(this.contentDomPostFilters.length){if(_1d0&&dom["cloneNode"]){dom=dom.cloneNode(true);}dojo.forEach(this.contentDomPostFilters,function(ef){dom=ef(dom);});}var ec=this.getNodeChildrenHtml(dom);if(!ec.replace(/^(?:\s|\xA0)+/g,"").replace(/(?:\s|\xA0)+$/g,"").length){ec="";}dojo.forEach(this.contentPostFilters,function(ef){ec=ef(ec);});return ec;},_saveContent:function(e){var _1d5=dojo.byId("dijit._editor.RichText.savedContent");_1d5.value+=this._SEPARATOR+this.name+":"+this.getValue();},escapeXml:function(str,_1d7){str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");if(!_1d7){str=str.replace(/'/gm,"&#39;");}return str;},getNodeHtml:function(node){switch(node.nodeType){case 1:var _1d9="<"+node.tagName.toLowerCase();if(dojo.isMoz){if(node.getAttribute("type")=="_moz"){node.removeAttribute("type");}if(node.getAttribute("_moz_dirty")!=undefined){node.removeAttribute("_moz_dirty");}}var _1da=[];if(dojo.isIE){var s=node.outerHTML;s=s.substr(0,s.indexOf(">"));s=s.replace(/(?:['"])[^"']*\1/g,"");var reg=/([^\s=]+)=/g;var m,key;while((m=reg.exec(s))!=undefined){key=m[1];if(key.substr(0,3)!="_dj"){if(key=="src"||key=="href"){if(node.getAttribute("_djrealurl")){_1da.push([key,node.getAttribute("_djrealurl")]);continue;}}if(key=="class"){_1da.push([key,node.className]);}else{_1da.push([key,node.getAttribute(key)]);}}}}else{var attr,i=0,_1e1=node.attributes;while((attr=_1e1[i++])){if(attr.name.substr(0,3)!="_dj"){var v=attr.value;if(attr.name=="src"||attr.name=="href"){if(node.getAttribute("_djrealurl")){v=node.getAttribute("_djrealurl");}}_1da.push([attr.name,v]);}}}_1da.sort(function(a,b){return a[0]<b[0]?-1:(a[0]==b[0]?0:1);});i=0;while((attr=_1da[i++])){_1d9+=" "+attr[0]+"=\""+attr[1]+"\"";}if(node.childNodes.length){_1d9+=">"+this.getNodeChildrenHtml(node)+"</"+node.tagName.toLowerCase()+">";}else{_1d9+=" />";}break;case 3:var _1d9=this.escapeXml(node.nodeValue,true);break;case 8:var _1d9="<!--"+this.escapeXml(node.nodeValue,true)+"-->";break;default:var _1d9="Element not recognized - Type: "+node.nodeType+" Name: "+node.nodeName;}return _1d9;},getNodeChildrenHtml:function(dom){var out="";if(!dom){return out;}var _1e7=dom["childNodes"]||dom;var i=0;var node;while((node=_1e7[i++])){out+=this.getNodeHtml(node);}return out;},close:function(save,_1eb){if(this.isClosed){return false;}if(!arguments.length){save=true;}this._content=this.getValue();var _1ec=(this.savedContent!=this._content);if(this.interval){clearInterval(this.interval);}if(this.textarea){with(this.textarea.style){position="";left=top="";if(dojo.isIE){overflow=this.__overflow;this.__overflow=null;}}if(save){this.textarea.value=this._content;}else{this.textarea.value=this.savedContent;}dojo._destroyElement(this.domNode);this.domNode=this.textarea;}else{if(save){this.domNode.innerHTML=this._content;}else{this.domNode.innerHTML=this.savedContent;}}dojo.removeClass(this.domNode,"RichTextEditable");this.isClosed=true;this.isLoaded=false;delete this.editNode;if(this.window&&this.window._frameElement){this.window._frameElement=null;}this.window=null;this.document=null;this.editingArea=null;this.editorObject=null;return _1ec;},destroyRendering:function(){},destroy:function(){this.destroyRendering();if(!this.isClosed){this.close(false);}this.inherited("destroy",arguments);},_fixContentForMoz:function(html){html=html.replace(/<(\/)?strong([ \>])/gi,"<$1b$2");html=html.replace(/<(\/)?em([ \>])/gi,"<$1i$2");return html;},_srcInImgRegex:/(?:(<img(?=\s).*?\ssrc=)("|')(.*?)\2)|(?:(<img\s.*?src=)([^"'][^ >]+))/gi,_hrefInARegex:/(?:(<a(?=\s).*?\shref=)("|')(.*?)\2)|(?:(<a\s.*?href=)([^"'][^ >]+))/gi,_preFixUrlAttributes:function(html){html=html.replace(this._hrefInARegex,"$1$4$2$3$5$2 _djrealurl=$2$3$5$2");html=html.replace(this._srcInImgRegex,"$1$4$2$3$5$2 _djrealurl=$2$3$5$2");return html;}});}if(!dojo._hasResource["dijit.Toolbar"]){dojo._hasResource["dijit.Toolbar"]=true;dojo.provide("dijit.Toolbar");dojo.declare("dijit.Toolbar",[dijit._Widget,dijit._Templated,dijit._KeyNavContainer],{templateString:"<div class=\"dijit dijitToolbar\" waiRole=\"toolbar\" tabIndex=\"${tabIndex}\" dojoAttachPoint=\"containerNode\">"+"</div>",tabIndex:"0",postCreate:function(){this.connectKeyNavHandlers(this.isLeftToRight()?[dojo.keys.LEFT_ARROW]:[dojo.keys.RIGHT_ARROW],this.isLeftToRight()?[dojo.keys.RIGHT_ARROW]:[dojo.keys.LEFT_ARROW]);},startup:function(){this.startupKeyNavChildren();}});dojo.declare("dijit.ToolbarSeparator",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"dijitToolbarSeparator dijitInline\"></div>",postCreate:function(){dojo.setSelectable(this.domNode,false);},isFocusable:function(){return false;}});}if(!dojo._hasResource["dijit.form.Button"]){dojo._hasResource["dijit.form.Button"]=true;dojo.provide("dijit.form.Button");dojo.declare("dijit.form.Button",dijit.form._FormWidget,{label:"",showLabel:true,iconClass:"",type:"button",baseClass:"dijitButton",templateString:"<div class=\"dijit dijitLeft dijitInline dijitButton\"\n\tdojoAttachEvent=\"onclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\n\t><div class='dijitRight'\n\t\t><button class=\"dijitStretch dijitButtonNode dijitButtonContents\" dojoAttachPoint=\"focusNode,titleNode\"\n\t\t\ttype=\"${type}\" waiRole=\"button\" waiState=\"labelledby-${id}_label\"\n\t\t\t><span class=\"dijitInline ${iconClass}\" dojoAttachPoint=\"iconNode\" \n \t\t\t\t><span class=\"dijitToggleButtonIconChar\">&#10003</span \n\t\t\t></span\n\t\t\t><span class=\"dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\">${label}</span\n\t\t></button\n\t></div\n></div>\n",_onClick:function(e){if(this.disabled){return false;}this._clicked();return this.onClick(e);},_onButtonClick:function(e){dojo.stopEvent(e);var _1f1=this._onClick(e)!==false;if(this.type=="submit"&&_1f1){for(var node=this.domNode;node;node=node.parentNode){var _1f3=dijit.byNode(node);if(_1f3&&_1f3._onSubmit){_1f3._onSubmit(e);break;}if(node.tagName.toLowerCase()=="form"){if(!node.onsubmit||node.onsubmit()){node.submit();}break;}}}},postCreate:function(){if(this.showLabel==false){var _1f4="";this.label=this.containerNode.innerHTML;_1f4=dojo.trim(this.containerNode.innerText||this.containerNode.textContent);this.titleNode.title=_1f4;dojo.addClass(this.containerNode,"dijitDisplayNone");}this.inherited(arguments);},onClick:function(e){return true;},_clicked:function(e){},setLabel:function(_1f7){this.containerNode.innerHTML=this.label=_1f7;if(dojo.isMozilla){var _1f8=dojo.getComputedStyle(this.domNode).display;this.domNode.style.display="none";var _1f9=this;setTimeout(function(){_1f9.domNode.style.display=_1f8;},1);}if(this.showLabel==false){this.titleNode.title=dojo.trim(this.containerNode.innerText||this.containerNode.textContent);}}});dojo.declare("dijit.form.DropDownButton",[dijit.form.Button,dijit._Container],{baseClass:"dijitDropDownButton",templateString:"<div class=\"dijit dijitLeft dijitInline\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse,onclick:_onDropDownClick,onkeydown:_onDropDownKeydown,onblur:_onDropDownBlur,onkeypress:_onKey\"\n\t><div class='dijitRight'>\n\t<button class=\"dijitStretch dijitButtonNode dijitButtonContents\" type=\"${type}\"\n\t\tdojoAttachPoint=\"focusNode,titleNode\" waiRole=\"button\" waiState=\"haspopup-true,labelledby-${id}_label\"\n\t\t><div class=\"dijitInline ${iconClass}\" dojoAttachPoint=\"iconNode\"></div\n\t\t><span class=\"dijitButtonText\" \tdojoAttachPoint=\"containerNode,popupStateNode\"\n\t\tid=\"${id}_label\">${label}</span\n\t\t><span class='dijitA11yDownArrow'>&#9660;</span>\n\t</button>\n</div></div>\n",_fillContent:function(){if(this.srcNodeRef){var _1fa=dojo.query("*",this.srcNodeRef);dijit.form.DropDownButton.superclass._fillContent.call(this,_1fa[0]);this.dropDownContainer=this.srcNodeRef;}},startup:function(){if(!this.dropDown){var _1fb=dojo.query("[widgetId]",this.dropDownContainer)[0];this.dropDown=dijit.byNode(_1fb);delete this.dropDownContainer;}dojo.body().appendChild(this.dropDown.domNode);this.dropDown.domNode.style.display="none";},_onArrowClick:function(e){if(this.disabled){return;}this._toggleDropDown();},_onDropDownClick:function(e){var _1fe=dojo.isFF&&dojo.isFF<3&&navigator.appVersion.indexOf("Macintosh")!=-1;if(!_1fe||e.detail!=0||this._seenKeydown){this._onArrowClick(e);}this._seenKeydown=false;},_onDropDownKeydown:function(e){this._seenKeydown=true;},_onDropDownBlur:function(e){this._seenKeydown=false;},_onKey:function(e){if(this.disabled){return;}if(e.keyCode==dojo.keys.DOWN_ARROW){if(!this.dropDown||this.dropDown.domNode.style.display=="none"){dojo.stopEvent(e);return this._toggleDropDown();}}},_onBlur:function(){this._closeDropDown();},_toggleDropDown:function(){if(this.disabled){return;}dijit.focus(this.popupStateNode);var _202=this.dropDown;if(!_202){return false;}if(!_202.isShowingNow){if(_202.href&&!_202.isLoaded){var self=this;var _204=dojo.connect(_202,"onLoad",function(){dojo.disconnect(_204);self._openDropDown();});_202._loadCheck(true);return;}else{this._openDropDown();}}else{this._closeDropDown();}},_openDropDown:function(){var _205=this.dropDown;var _206=_205.domNode.style.width;var self=this;dijit.popup.open({parent:this,popup:_205,around:this.domNode,orient:this.isLeftToRight()?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"},onExecute:function(){self._closeDropDown(true);},onCancel:function(){self._closeDropDown(true);},onClose:function(){_205.domNode.style.width=_206;self.popupStateNode.removeAttribute("popupActive");this._opened=false;}});if(this.domNode.offsetWidth>_205.domNode.offsetWidth){var _208=null;if(!this.isLeftToRight()){_208=_205.domNode.parentNode;var _209=_208.offsetLeft+_208.offsetWidth;}dojo.marginBox(_205.domNode,{w:this.domNode.offsetWidth});if(_208){_208.style.left=_209-this.domNode.offsetWidth+"px";}}this.popupStateNode.setAttribute("popupActive","true");this._opened=true;if(_205.focus){_205.focus();}},_closeDropDown:function(_20a){if(this._opened){dijit.popup.close(this.dropDown);if(_20a){this.focus();}this._opened=false;}}});dojo.declare("dijit.form.ComboButton",dijit.form.DropDownButton,{templateString:"<table class='dijit dijitReset dijitInline dijitLeft'\n\tcellspacing='0' cellpadding='0'\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\">\n\t<tr>\n\t\t<td\tclass=\"dijitStretch dijitButtonContents dijitButtonNode\"\n\t\t\ttabIndex=\"${tabIndex}\"\n\t\t\tdojoAttachEvent=\"ondijitclick:_onButtonClick\" dojoAttachPoint=\"titleNode\"\n\t\t\twaiRole=\"button\" waiState=\"labelledby-${id}_label\">\n\t\t\t<div class=\"dijitInline ${iconClass}\" dojoAttachPoint=\"iconNode\"></div>\n\t\t\t<span class=\"dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\">${label}</span>\n\t\t</td>\n\t\t<td class='dijitReset dijitRight dijitButtonNode dijitDownArrowButton'\n\t\t\tdojoAttachPoint=\"popupStateNode,focusNode\"\n\t\t\tdojoAttachEvent=\"ondijitclick:_onArrowClick, onkeypress:_onKey\"\n\t\t\tstateModifier=\"DownArrow\"\n\t\t\ttitle=\"${optionsTitle}\" name=\"${name}\"\n\t\t\twaiRole=\"button\" waiState=\"haspopup-true\"\n\t\t><div waiRole=\"presentation\">&#9660;</div>\n\t</td></tr>\n</table>\n",attributeMap:dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),{id:"",name:""}),optionsTitle:"",baseClass:"dijitComboButton",_focusedNode:null,postCreate:function(){this.inherited(arguments);this._focalNodes=[this.titleNode,this.popupStateNode];dojo.forEach(this._focalNodes,dojo.hitch(this,function(node){if(dojo.isIE){this.connect(node,"onactivate",this._onNodeFocus);}else{this.connect(node,"onfocus",this._onNodeFocus);}}));},focusFocalNode:function(node){this._focusedNode=node;dijit.focus(node);},hasNextFocalNode:function(){return this._focusedNode!==this.getFocalNodes()[1];},focusNext:function(){this._focusedNode=this.getFocalNodes()[this._focusedNode?1:0];dijit.focus(this._focusedNode);},hasPrevFocalNode:function(){return this._focusedNode!==this.getFocalNodes()[0];},focusPrev:function(){this._focusedNode=this.getFocalNodes()[this._focusedNode?0:1];dijit.focus(this._focusedNode);},getFocalNodes:function(){return this._focalNodes;},_onNodeFocus:function(evt){this._focusedNode=evt.currentTarget;},_onBlur:function(evt){this.inherited(arguments);this._focusedNode=null;}});dojo.declare("dijit.form.ToggleButton",dijit.form.Button,{baseClass:"dijitToggleButton",checked:false,_clicked:function(evt){this.setChecked(!this.checked);},setChecked:function(_210){this.checked=_210;dijit.setWaiState(this.focusNode||this.domNode,"pressed",this.checked);this._setStateClass();this.onChange(_210);}});}if(!dojo._hasResource["dijit._editor._Plugin"]){dojo._hasResource["dijit._editor._Plugin"]=true;dojo.provide("dijit._editor._Plugin");dojo.declare("dijit._editor._Plugin",null,{constructor:function(args,node){if(args){dojo.mixin(this,args);}},editor:null,iconClassPrefix:"dijitEditorIcon",button:null,queryCommand:null,command:"",commandArg:null,useDefaultCommand:true,buttonClass:dijit.form.Button,updateInterval:200,_initButton:function(){if(this.command.length){var _213=this.editor.commands[this.command];var _214="dijitEditorIcon "+this.iconClassPrefix+this.command.charAt(0).toUpperCase()+this.command.substr(1);if(!this.button){var _215={label:_213,showLabel:false,iconClass:_214,dropDown:this.dropDown};this.button=new this.buttonClass(_215);}}},updateState:function(){var _e=this.editor;var _c=this.command;if(!_e){return;}if(!_e.isLoaded){return;}if(!_c.length){return;}if(this.button){try{var _218=_e.queryCommandEnabled(_c);this.button.setDisabled(!_218);if(this.button.setChecked){this.button.setChecked(_e.queryCommandState(_c));}}catch(e){console.debug(e);}}},setEditor:function(_219){this.editor=_219;this._initButton();if((this.command.length)&&(!this.editor.queryCommandAvailable(this.command))){if(this.button){this.button.domNode.style.display="none";}}if(this.button&&this.useDefaultCommand){dojo.connect(this.button,"onClick",dojo.hitch(this.editor,"execCommand",this.command,this.commandArg));}dojo.connect(this.editor,"onNormalizedDisplayChanged",this,"updateState");},setToolbar:function(_21a){if(this.button){_21a.addChild(this.button);}}});}if(!dojo._hasResource["dijit.Editor"]){dojo._hasResource["dijit.Editor"]=true;dojo.provide("dijit.Editor");dojo.declare("dijit.Editor",dijit._editor.RichText,{plugins:null,extraPlugins:null,constructor:function(){this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|","insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull"];this._plugins=[];this._editInterval=this.editActionInterval*1000;},postCreate:function(){if(this.customUndo){dojo["require"]("dijit._editor.range");this._steps=this._steps.slice(0);this._undoedSteps=this._undoedSteps.slice(0);}if(dojo.isArray(this.extraPlugins)){this.plugins=this.plugins.concat(this.extraPlugins);}dijit.Editor.superclass.postCreate.apply(this,arguments);this.commands=dojo.i18n.getLocalization("dijit._editor","commands",this.lang);if(!this.toolbar){var _21b=dojo.doc.createElement("div");dojo.place(_21b,this.editingArea,"before");this.toolbar=new dijit.Toolbar({},_21b);}dojo.forEach(this.plugins,this.addPlugin,this);this.onNormalizedDisplayChanged();},destroy:function(){dojo.forEach(this._plugins,function(p){if(p.destroy){p.destroy();}});this._plugins=[];this.toolbar.destroy();delete this.toolbar;this.inherited("destroy",arguments);},addPlugin:function(_21d,_21e){var args=dojo.isString(_21d)?{name:_21d}:_21d;if(!args.setEditor){var o={"args":args,"plugin":null,"editor":this};dojo.publish("dijit.Editor.getPlugin",[o]);if(!o.plugin){var pc=dojo.getObject(args.name);if(pc){o.plugin=new pc(args);}}if(!o.plugin){console.debug("Cannot find plugin",_21d);return;}_21d=o.plugin;}if(arguments.length>1){this._plugins[_21e]=_21d;}else{this._plugins.push(_21d);}_21d.setEditor(this);if(dojo.isFunction(_21d.setToolbar)){_21d.setToolbar(this.toolbar);}},customUndo:dojo.isIE,editActionInterval:3,beginEditing:function(cmd){if(!this._inEditing){this._inEditing=true;this._beginEditing(cmd);}if(this.editActionInterval>0){if(this._editTimer){clearTimeout(this._editTimer);}this._editTimer=setTimeout(dojo.hitch(this,this.endEditing),this._editInterval);}},_steps:[],_undoedSteps:[],execCommand:function(cmd){if(this.customUndo&&(cmd=="undo"||cmd=="redo")){return this[cmd]();}else{try{if(this.customUndo){this.endEditing();this._beginEditing();}var r=this.inherited("execCommand",arguments);if(this.customUndo){this._endEditing();}return r;}catch(e){if(dojo.isMoz&&/copy|cut|paste/.test(cmd)){var sub=dojo.string.substitute,_226={cut:"X",copy:"C",paste:"V"},_227=navigator.userAgent.indexOf("Macintosh")!=-1;alert(sub(this.commands.systemShortcutFF,[this.commands[cmd],sub(this.commands[_227?"appleKey":"ctrlKey"],[_226[cmd]])]));}return false;}}},queryCommandEnabled:function(cmd){if(this.customUndo&&(cmd=="undo"||cmd=="redo")){return cmd=="undo"?(this._steps.length>1):(this._undoedSteps.length>0);}else{return this.inherited("queryCommandEnabled",arguments);}},_changeToStep:function(from,to){this.setValue(to.text);var b=to.bookmark;if(!b){return;}if(dojo.isIE){if(dojo.isArray(b)){var tmp=[];dojo.forEach(b,function(n){tmp.push(dijit.range.getNode(n,this.editNode));},this);b=tmp;}}else{var r=dijit.range.create();r.setStart(dijit.range.getNode(b.startContainer,this.editNode),b.startOffset);r.setEnd(dijit.range.getNode(b.endContainer,this.editNode),b.endOffset);b=r;}dojo.withGlobal(this.window,"moveToBookmark",dijit,[b]);},undo:function(){this.endEditing(true);var s=this._steps.pop();if(this._steps.length>0){this.focus();this._changeToStep(s,this._steps[this._steps.length-1]);this._undoedSteps.push(s);this.onDisplayChanged();return true;}return false;},redo:function(){this.endEditing(true);var s=this._undoedSteps.pop();if(s&&this._steps.length>0){this.focus();this._changeToStep(this._steps[this._steps.length-1],s);this._steps.push(s);this.onDisplayChanged();return true;}return false;},endEditing:function(_231){if(this._editTimer){clearTimeout(this._editTimer);}if(this._inEditing){this._endEditing(_231);this._inEditing=false;}},_getBookmark:function(){var b=dojo.withGlobal(this.window,dijit.getBookmark);if(dojo.isIE){if(dojo.isArray(b)){var tmp=[];dojo.forEach(b,function(n){tmp.push(dijit.range.getIndex(n,this.editNode).o);},this);b=tmp;}}else{var tmp=dijit.range.getIndex(b.startContainer,this.editNode).o;b={startContainer:tmp,startOffset:b.startOffset,endContainer:b.endContainer===b.startContainer?tmp:dijit.range.getIndex(b.endContainer,this.editNode).o,endOffset:b.endOffset};}return b;},_beginEditing:function(cmd){if(this._steps.length===0){this._steps.push({"text":this.savedContent,"bookmark":this._getBookmark()});}},_endEditing:function(_236){var v=this.getValue(true);this._undoedSteps=[];this._steps.push({"text":v,"bookmark":this._getBookmark()});},onKeyDown:function(e){if(!this.customUndo){this.inherited("onKeyDown",arguments);return;}var k=e.keyCode,ks=dojo.keys;if(e.ctrlKey){if(k===90||k===122){dojo.stopEvent(e);this.undo();return;}else{if(k===89||k===121){dojo.stopEvent(e);this.redo();return;}}}this.inherited("onKeyDown",arguments);switch(k){case ks.ENTER:this.beginEditing();break;case ks.BACKSPACE:case ks.DELETE:this.beginEditing();break;case 88:case 86:if(e.ctrlKey&&!e.altKey&&!e.metaKey){this.endEditing();if(e.keyCode==88){this.beginEditing("cut");setTimeout(dojo.hitch(this,this.endEditing),1);}else{this.beginEditing("paste");setTimeout(dojo.hitch(this,this.endEditing),1);}break;}default:if(!e.ctrlKey&&!e.altKey&&!e.metaKey&&(e.keyCode<dojo.keys.F1||e.keyCode>dojo.keys.F15)){this.beginEditing();break;}case ks.ALT:this.endEditing();break;case ks.UP_ARROW:case ks.DOWN_ARROW:case ks.LEFT_ARROW:case ks.RIGHT_ARROW:case ks.HOME:case ks.END:case ks.PAGE_UP:case ks.PAGE_DOWN:this.endEditing(true);break;case ks.CTRL:case ks.SHIFT:case ks.TAB:break;}},_onBlur:function(){this.inherited("_onBlur",arguments);this.endEditing(true);},onClick:function(){this.endEditing(true);this.inherited("onClick",arguments);}});dojo.subscribe("dijit.Editor.getPlugin",null,function(o){if(o.plugin){return;}var args=o.args,p;var _p=dijit._editor._Plugin;var name=args.name;switch(name){case "undo":case "redo":case "cut":case "copy":case "paste":case "insertOrderedList":case "insertUnorderedList":case "indent":case "outdent":case "justifyCenter":case "justifyFull":case "justifyLeft":case "justifyRight":case "delete":case "selectAll":case "removeFormat":p=new _p({command:name});break;case "bold":case "italic":case "underline":case "strikethrough":case "subscript":case "superscript":p=new _p({buttonClass:dijit.form.ToggleButton,command:name});break;case "|":p=new _p({button:new dijit.ToolbarSeparator()});break;case "createLink":p=new dijit._editor.plugins.LinkDialog({command:name});break;case "foreColor":case "hiliteColor":p=new dijit._editor.plugins.TextColor({command:name});break;case "fontName":case "fontSize":case "formatBlock":p=new dijit._editor.plugins.FontChoice({command:name});}o.plugin=p;});}if(!dojo._hasResource["dijit.Menu"]){dojo._hasResource["dijit.Menu"]=true;dojo.provide("dijit.Menu");dojo.declare("dijit.Menu",[dijit._Widget,dijit._Templated,dijit._KeyNavContainer],{constructor:function(){this._bindings=[];},templateString:"<table class=\"dijit dijitMenu dijitReset dijitMenuTable\" waiRole=\"menu\" dojoAttachEvent=\"onkeypress:_onKeyPress\">"+"<tbody class=\"dijitReset\" dojoAttachPoint=\"containerNode\"></tbody>"+"</table>",targetNodeIds:[],contextMenuForWindow:false,parentMenu:null,popupDelay:500,_contextMenuWithMouse:false,postCreate:function(){if(this.contextMenuForWindow){this.bindDomNode(dojo.body());}else{dojo.forEach(this.targetNodeIds,this.bindDomNode,this);}this.connectKeyNavHandlers([dojo.keys.UP_ARROW],[dojo.keys.DOWN_ARROW]);},startup:function(){dojo.forEach(this.getChildren(),function(_240){_240.startup();});this.startupKeyNavChildren();},onExecute:function(){},onCancel:function(_241){},_moveToPopup:function(evt){if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled){this.focusedChild._onClick(evt);}},_onKeyPress:function(evt){if(evt.ctrlKey||evt.altKey){return;}switch(evt.keyCode){case dojo.keys.RIGHT_ARROW:this._moveToPopup(evt);dojo.stopEvent(evt);break;case dojo.keys.LEFT_ARROW:if(this.parentMenu){this.onCancel(false);}else{dojo.stopEvent(evt);}break;}},onItemHover:function(item){this.focusChild(item);if(this.focusedChild.popup&&!this.focusedChild.disabled&&!this.hover_timer){this.hover_timer=setTimeout(dojo.hitch(this,"_openPopup"),this.popupDelay);}},_onChildBlur:function(item){dijit.popup.close(item.popup);item._blur();this._stopPopupTimer();},onItemUnhover:function(item){},_stopPopupTimer:function(){if(this.hover_timer){clearTimeout(this.hover_timer);this.hover_timer=null;}},_getTopMenu:function(){for(var top=this;top.parentMenu;top=top.parentMenu){}return top;},onItemClick:function(item){if(item.disabled){return false;}if(item.popup){if(!this.is_open){this._openPopup();}}else{this.onExecute();item.onClick();}},_iframeContentWindow:function(_249){var win=dijit.getDocumentWindow(dijit.Menu._iframeContentDocument(_249))||dijit.Menu._iframeContentDocument(_249)["__parent__"]||(_249.name&&document.frames[_249.name])||null;return win;},_iframeContentDocument:function(_24b){var doc=_24b.contentDocument||(_24b.contentWindow&&_24b.contentWindow.document)||(_24b.name&&document.frames[_24b.name]&&document.frames[_24b.name].document)||null;return doc;},bindDomNode:function(node){node=dojo.byId(node);var win=dijit.getDocumentWindow(node.ownerDocument);if(node.tagName.toLowerCase()=="iframe"){win=this._iframeContentWindow(node);node=dojo.withGlobal(win,dojo.body);}var cn=(node==dojo.body()?dojo.doc:node);node[this.id]=this._bindings.push([dojo.connect(cn,"oncontextmenu",this,"_openMyself"),dojo.connect(cn,"onkeydown",this,"_contextKey"),dojo.connect(cn,"onmousedown",this,"_contextMouse")]);},unBindDomNode:function(_250){var node=dojo.byId(_250);var bid=node[this.id]-1,b=this._bindings[bid];dojo.forEach(b,dojo.disconnect);delete this._bindings[bid];},_contextKey:function(e){this._contextMenuWithMouse=false;if(e.keyCode==dojo.keys.F10){dojo.stopEvent(e);if(e.shiftKey&&e.type=="keydown"){var _e={target:e.target,pageX:e.pageX,pageY:e.pageY};_e.preventDefault=_e.stopPropagation=function(){};window.setTimeout(dojo.hitch(this,function(){this._openMyself(_e);}),1);}}},_contextMouse:function(e){this._contextMenuWithMouse=true;},_openMyself:function(e){dojo.stopEvent(e);var x,y;if(dojo.isSafari||this._contextMenuWithMouse){x=e.pageX;y=e.pageY;}else{var _25a=dojo.coords(e.target,true);x=_25a.x+10;y=_25a.y+10;}var self=this;var _25c=dijit.getFocus(this);function closeAndRestoreFocus(){dijit.focus(_25c);dijit.popup.close(self);};dijit.popup.open({popup:this,x:x,y:y,onExecute:closeAndRestoreFocus,onCancel:closeAndRestoreFocus,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=function(){dijit.popup.close(this);};},onOpen:function(e){this.isShowingNow=true;},onClose:function(){this._stopPopupTimer();this.parentMenu=null;this.isShowingNow=false;this.currentPopup=null;if(this.focusedChild){this._onChildBlur(this.focusedChild);this.focusedChild=null;}},_openPopup:function(){this._stopPopupTimer();var _25e=this.focusedChild;var _25f=_25e.popup;if(_25f.isShowingNow){return;}_25f.parentMenu=this;var self=this;dijit.popup.open({parent:this,popup:_25f,around:_25e.arrowCell,orient:this.isLeftToRight()?{"TR":"TL","TL":"TR"}:{"TL":"TR","TR":"TL"},onCancel:function(){dijit.popup.close(_25f);_25e.focus();self.currentPopup=null;}});this.currentPopup=_25f;if(_25f.focus){_25f.focus();}}});dojo.declare("dijit.MenuItem",[dijit._Widget,dijit._Templated,dijit._Contained],{templateString:"<tr class=\"dijitReset dijitMenuItem\""+"dojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">"+"<td class=\"dijitReset\"><div class=\"dijitMenuItemIcon ${iconClass}\" dojoAttachPoint=\"iconNode\" ></div></td>"+"<td tabIndex=\"-1\" class=\"dijitReset dijitMenuItemLabel\" dojoAttachPoint=\"containerNode\" waiRole=\"menuitem\"></td>"+"<td class=\"dijitReset\" dojoAttachPoint=\"arrowCell\">"+"<div class=\"dijitMenuExpand\" dojoAttachPoint=\"expand\" style=\"display:none\">"+"<span class=\"dijitInline dijitArrowNode dijitMenuExpandInner\">+</span>"+"</div>"+"</td>"+"</tr>",label:"",iconClass:"",disabled:false,postCreate:function(){dojo.setSelectable(this.domNode,false);this.setDisabled(this.disabled);if(this.label){this.containerNode.innerHTML=this.label;}},_onHover:function(){this.getParent().onItemHover(this);},_onUnhover:function(){this.getParent().onItemUnhover(this);},_onClick:function(evt){this.getParent().onItemClick(this);dojo.stopEvent(evt);},onClick:function(){},focus:function(){dojo.addClass(this.domNode,"dijitMenuItemHover");try{dijit.focus(this.containerNode);}catch(e){}},_blur:function(){dojo.removeClass(this.domNode,"dijitMenuItemHover");},setDisabled:function(_262){this.disabled=_262;dojo[_262?"addClass":"removeClass"](this.domNode,"dijitMenuItemDisabled");dijit.setWaiState(this.containerNode,"disabled",_262?"true":"false");}});dojo.declare("dijit.PopupMenuItem",dijit.MenuItem,{_fillContent:function(){if(this.srcNodeRef){var _263=dojo.query("*",this.srcNodeRef);dijit.PopupMenuItem.superclass._fillContent.call(this,_263[0]);this.dropDownContainer=this.srcNodeRef;}},startup:function(){if(!this.popup){var node=dojo.query("[widgetId]",this.dropDownContainer)[0];this.popup=dijit.byNode(node);}dojo.body().appendChild(this.popup.domNode);this.popup.domNode.style.display="none";dojo.addClass(this.expand,"dijitMenuExpandEnabled");dojo.style(this.expand,"display","");dijit.setWaiState(this.containerNode,"haspopup","true");}});dojo.declare("dijit.MenuSeparator",[dijit._Widget,dijit._Templated,dijit._Contained],{templateString:"<tr class=\"dijitMenuSeparator\"><td colspan=3>"+"<div class=\"dijitMenuSeparatorTop\"></div>"+"<div class=\"dijitMenuSeparatorBottom\"></div>"+"</td></tr>",postCreate:function(){dojo.setSelectable(this.domNode,false);},isFocusable:function(){return false;}});}if(!dojo._hasResource["dojo.regexp"]){dojo._hasResource["dojo.regexp"]=true;dojo.provide("dojo.regexp");dojo.regexp.escapeString=function(str,_266){return str.replace(/([\.$?*!=:|{}\(\)\[\]\\\/^])/g,function(ch){if(_266&&_266.indexOf(ch)!=-1){return ch;}return "\\"+ch;});};dojo.regexp.buildGroupRE=function(arr,re,_26a){if(!(arr instanceof Array)){return re(arr);}var b=[];for(var i=0;i<arr.length;i++){b.push(re(arr[i]));}return dojo.regexp.group(b.join("|"),_26a);};dojo.regexp.group=function(_26d,_26e){return "("+(_26e?"?:":"")+_26d+")";};}if(!dojo._hasResource["dojo.number"]){dojo._hasResource["dojo.number"]=true;dojo.provide("dojo.number");dojo.number.format=function(_26f,_270){_270=dojo.mixin({},_270||{});var _271=dojo.i18n.normalizeLocale(_270.locale);var _272=dojo.i18n.getLocalization("dojo.cldr","number",_271);_270.customs=_272;var _273=_270.pattern||_272[(_270.type||"decimal")+"Format"];if(isNaN(_26f)){return null;}return dojo.number._applyPattern(_26f,_273,_270);};dojo.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;dojo.number._applyPattern=function(_274,_275,_276){_276=_276||{};var _277=_276.customs.group;var _278=_276.customs.decimal;var _279=_275.split(";");var _27a=_279[0];_275=_279[(_274<0)?1:0]||("-"+_27a);if(_275.indexOf("%")!=-1){_274*=100;}else{if(_275.indexOf("‰")!=-1){_274*=1000;}else{if(_275.indexOf("¤")!=-1){_277=_276.customs.currencyGroup||_277;_278=_276.customs.currencyDecimal||_278;_275=_275.replace(/\u00a4{1,3}/,function(_27b){var prop=["symbol","currency","displayName"][_27b.length-1];return _276[prop]||_276.currency||"";});}else{if(_275.indexOf("E")!=-1){throw new Error("exponential notation not supported");}}}}var _27d=dojo.number._numberPatternRE;var _27e=_27a.match(_27d);if(!_27e){throw new Error("unable to find a number expression in pattern: "+_275);}return _275.replace(_27d,dojo.number._formatAbsolute(_274,_27e[0],{decimal:_278,group:_277,places:_276.places}));};dojo.number.round=function(_27f,_280,_281){var _282=String(_27f).split(".");var _283=(_282[1]&&_282[1].length)||0;if(_283>_280){var _284=Math.pow(10,_280);if(_281>0){_284*=10/_281;_280++;}_27f=Math.round(_27f*_284)/_284;_282=String(_27f).split(".");_283=(_282[1]&&_282[1].length)||0;if(_283>_280){_282[1]=_282[1].substr(0,_280);_27f=Number(_282.join("."));}}return _27f;};dojo.number._formatAbsolute=function(_285,_286,_287){_287=_287||{};if(_287.places===true){_287.places=0;}if(_287.places===Infinity){_287.places=6;}var _288=_286.split(".");var _289=(_287.places>=0)?_287.places:(_288[1]&&_288[1].length)||0;if(!(_287.round<0)){_285=dojo.number.round(_285,_289,_287.round);}var _28a=String(Math.abs(_285)).split(".");var _28b=_28a[1]||"";if(_287.places){_28a[1]=dojo.string.pad(_28b.substr(0,_287.places),_287.places,"0",true);}else{if(_288[1]&&_287.places!==0){var pad=_288[1].lastIndexOf("0")+1;if(pad>_28b.length){_28a[1]=dojo.string.pad(_28b,pad,"0",true);}var _28d=_288[1].length;if(_28d<_28b.length){_28a[1]=_28b.substr(0,_28d);}}else{if(_28a[1]){_28a.pop();}}}var _28e=_288[0].replace(",","");pad=_28e.indexOf("0");if(pad!=-1){pad=_28e.length-pad;if(pad>_28a[0].length){_28a[0]=dojo.string.pad(_28a[0],pad);}if(_28e.indexOf("#")==-1){_28a[0]=_28a[0].substr(_28a[0].length-pad);}}var _28f=_288[0].lastIndexOf(",");var _290,_291;if(_28f!=-1){_290=_288[0].length-_28f-1;var _292=_288[0].substr(0,_28f);_28f=_292.lastIndexOf(",");if(_28f!=-1){_291=_292.length-_28f-1;}}var _293=[];for(var _294=_28a[0];_294;){var off=_294.length-_290;_293.push((off>0)?_294.substr(off):_294);_294=(off>0)?_294.slice(0,off):"";if(_291){_290=_291;delete _291;}}_28a[0]=_293.reverse().join(_287.group||",");return _28a.join(_287.decimal||".");};dojo.number.regexp=function(_296){return dojo.number._parseInfo(_296).regexp;};dojo.number._parseInfo=function(_297){_297=_297||{};var _298=dojo.i18n.normalizeLocale(_297.locale);var _299=dojo.i18n.getLocalization("dojo.cldr","number",_298);var _29a=_297.pattern||_299[(_297.type||"decimal")+"Format"];var _29b=_299.group;var _29c=_299.decimal;var _29d=1;if(_29a.indexOf("%")!=-1){_29d/=100;}else{if(_29a.indexOf("‰")!=-1){_29d/=1000;}else{var _29e=_29a.indexOf("¤")!=-1;if(_29e){_29b=_299.currencyGroup||_29b;_29c=_299.currencyDecimal||_29c;}}}var _29f=_29a.split(";");if(_29f.length==1){_29f.push("-"+_29f[0]);}var re=dojo.regexp.buildGroupRE(_29f,function(_2a1){_2a1="(?:"+dojo.regexp.escapeString(_2a1,".")+")";return _2a1.replace(dojo.number._numberPatternRE,function(_2a2){var _2a3={signed:false,separator:_297.strict?_29b:[_29b,""],fractional:_297.fractional,decimal:_29c,exponent:false};var _2a4=_2a2.split(".");var _2a5=_297.places;if(_2a4.length==1||_2a5===0){_2a3.fractional=false;}else{if(typeof _2a5=="undefined"){_2a5=_2a4[1].lastIndexOf("0")+1;}if(_2a5&&_297.fractional==undefined){_2a3.fractional=true;}if(!_297.places&&(_2a5<_2a4[1].length)){_2a5+=","+_2a4[1].length;}_2a3.places=_2a5;}var _2a6=_2a4[0].split(",");if(_2a6.length>1){_2a3.groupSize=_2a6.pop().length;if(_2a6.length>1){_2a3.groupSize2=_2a6.pop().length;}}return "("+dojo.number._realNumberRegexp(_2a3)+")";});},true);if(_29e){re=re.replace(/(\s*)(\u00a4{1,3})(\s*)/g,function(_2a7,_2a8,_2a9,_2aa){var prop=["symbol","currency","displayName"][_2a9.length-1];var _2ac=dojo.regexp.escapeString(_297[prop]||_297.currency||"");_2a8=_2a8?"\\s":"";_2aa=_2aa?"\\s":"";if(!_297.strict){if(_2a8){_2a8+="*";}if(_2aa){_2aa+="*";}return "(?:"+_2a8+_2ac+_2aa+")?";}return _2a8+_2ac+_2aa;});}return {regexp:re.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:_29b,decimal:_29c,factor:_29d};};dojo.number.parse=function(_2ad,_2ae){var info=dojo.number._parseInfo(_2ae);var _2b0=(new RegExp("^"+info.regexp+"$")).exec(_2ad);if(!_2b0){return NaN;}var _2b1=_2b0[1];if(!_2b0[1]){if(!_2b0[2]){return NaN;}_2b1=_2b0[2];info.factor*=-1;}_2b1=_2b1.replace(new RegExp("["+info.group+"\\s\\xa0"+"]","g"),"").replace(info.decimal,".");return Number(_2b1)*info.factor;};dojo.number._realNumberRegexp=function(_2b2){_2b2=_2b2||{};if(typeof _2b2.places=="undefined"){_2b2.places=Infinity;}if(typeof _2b2.decimal!="string"){_2b2.decimal=".";}if(typeof _2b2.fractional=="undefined"||/^0/.test(_2b2.places)){_2b2.fractional=[true,false];}if(typeof _2b2.exponent=="undefined"){_2b2.exponent=[true,false];}if(typeof _2b2.eSigned=="undefined"){_2b2.eSigned=[true,false];}var _2b3=dojo.number._integerRegexp(_2b2);var _2b4=dojo.regexp.buildGroupRE(_2b2.fractional,function(q){var re="";if(q&&(_2b2.places!==0)){re="\\"+_2b2.decimal;if(_2b2.places==Infinity){re="(?:"+re+"\\d+)?";}else{re+="\\d{"+_2b2.places+"}";}}return re;},true);var _2b7=dojo.regexp.buildGroupRE(_2b2.exponent,function(q){if(q){return "([eE]"+dojo.number._integerRegexp({signed:_2b2.eSigned})+")";}return "";});var _2b9=_2b3+_2b4;if(_2b4){_2b9="(?:(?:"+_2b9+")|(?:"+_2b4+"))";}return _2b9+_2b7;};dojo.number._integerRegexp=function(_2ba){_2ba=_2ba||{};if(typeof _2ba.signed=="undefined"){_2ba.signed=[true,false];}if(typeof _2ba.separator=="undefined"){_2ba.separator="";}else{if(typeof _2ba.groupSize=="undefined"){_2ba.groupSize=3;}}var _2bb=dojo.regexp.buildGroupRE(_2ba.signed,function(q){return q?"[-+]":"";},true);var _2bd=dojo.regexp.buildGroupRE(_2ba.separator,function(sep){if(!sep){return "(?:0|[1-9]\\d*)";}sep=dojo.regexp.escapeString(sep);if(sep==" "){sep="\\s";}else{if(sep==" "){sep="\\s\\xa0";}}var grp=_2ba.groupSize,grp2=_2ba.groupSize2;if(grp2){var _2c1="(?:0|[1-9]\\d{0,"+(grp2-1)+"}(?:["+sep+"]\\d{"+grp2+"})*["+sep+"]\\d{"+grp+"})";return ((grp-grp2)>0)?"(?:"+_2c1+"|(?:0|[1-9]\\d{0,"+(grp-1)+"}))":_2c1;}return "(?:0|[1-9]\\d{0,"+(grp-1)+"}(?:["+sep+"]\\d{"+grp+"})*)";},true);return _2bb+_2bd;};}if(!dojo._hasResource["dijit.ProgressBar"]){dojo._hasResource["dijit.ProgressBar"]=true;dojo.provide("dijit.ProgressBar");dojo.declare("dijit.ProgressBar",[dijit._Widget,dijit._Templated],{progress:"0",maximum:100,places:0,indeterminate:false,templateString:"<div class=\"dijitProgressBar dijitProgressBarEmpty\"\n\t><div waiRole=\"progressbar\" tabindex=\"0\" dojoAttachPoint=\"internalProgress\" class=\"dijitProgressBarFull\"\n\t\t><div class=\"dijitProgressBarTile\"></div\n\t\t><span style=\"visibility:hidden\">&nbsp;</span\n\t></div\n\t><div dojoAttachPoint=\"label\" class=\"dijitProgressBarLabel\" id=\"${id}_label\">&nbsp;</div\n\t><img dojoAttachPoint=\"inteterminateHighContrastImage\" class=\"dijitProgressBarIndeterminateHighContrastImage\"\n\t></img\n></div>\n",_indeterminateHighContrastImagePath:dojo.moduleUrl("dijit","themes/a11y/indeterminate_progress.gif"),postCreate:function(){this.inherited("postCreate",arguments);this.inteterminateHighContrastImage.setAttribute("src",this._indeterminateHighContrastImagePath);this.update();},update:function(_2c2){dojo.mixin(this,_2c2||{});var _2c3=1,_2c4;if(this.indeterminate){_2c4="addClass";dijit.removeWaiState(this.internalProgress,"valuenow");dijit.removeWaiState(this.internalProgress,"valuemin");dijit.removeWaiState(this.internalProgress,"valuemax");}else{_2c4="removeClass";if(String(this.progress).indexOf("%")!=-1){_2c3=Math.min(parseFloat(this.progress)/100,1);this.progress=_2c3*this.maximum;}else{this.progress=Math.min(this.progress,this.maximum);_2c3=this.progress/this.maximum;}var text=this.report(_2c3);this.label.firstChild.nodeValue=text;dijit.setWaiState(this.internalProgress,"describedby",this.label.id);dijit.setWaiState(this.internalProgress,"valuenow",this.progress);dijit.setWaiState(this.internalProgress,"valuemin",0);dijit.setWaiState(this.internalProgress,"valuemax",this.maximum);}dojo[_2c4](this.domNode,"dijitProgressBarIndeterminate");this.internalProgress.style.width=(_2c3*100)+"%";this.onChange();},report:function(_2c6){return dojo.number.format(_2c6,{type:"percent",places:this.places,locale:this.lang});},onChange:function(){}});}if(!dojo._hasResource["dijit.TitlePane"]){dojo._hasResource["dijit.TitlePane"]=true;dojo.provide("dijit.TitlePane");dojo.declare("dijit.TitlePane",[dijit.layout.ContentPane,dijit._Templated],{title:"",open:true,duration:250,baseClass:"dijitTitlePane",templateString:"<div class=\"dijitTitlePane\">\n\t<div dojoAttachEvent=\"onclick:toggle,onkeypress: _onTitleKey,onfocus:_handleFocus,onblur:_handleFocus\" tabindex=\"0\"\n\t\t\twaiRole=\"button\" class=\"dijitTitlePaneTitle\" dojoAttachPoint=\"focusNode\">\n\t\t<div dojoAttachPoint=\"arrowNode\" class=\"dijitInline dijitArrowNode\"><span dojoAttachPoint=\"arrowNodeInner\" class=\"dijitArrowNodeInner\"></span></div>\n\t\t<div dojoAttachPoint=\"titleNode\" class=\"dijitTitlePaneTextNode\"></div>\n\t</div>\n\t<div class=\"dijitTitlePaneContentOuter\" dojoAttachPoint=\"hideNode\">\n\t\t<div class=\"dijitReset\" dojoAttachPoint=\"wipeNode\">\n\t\t\t<div class=\"dijitTitlePaneContentInner\" dojoAttachPoint=\"containerNode\" waiRole=\"region\" tabindex=\"-1\">\n\t\t\t\t<!-- nested divs because wipeIn()/wipeOut() doesn't work right on node w/padding etc. Put padding on inner div. -->\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n",postCreate:function(){this.setTitle(this.title);if(!this.open){this.hideNode.style.display=this.wipeNode.style.display="none";}this._setCss();dojo.setSelectable(this.titleNode,false);this.inherited("postCreate",arguments);dijit.setWaiState(this.containerNode,"labelledby",this.titleNode.id);dijit.setWaiState(this.focusNode,"haspopup","true");var _2c7=this.hideNode,_2c8=this.wipeNode;this._wipeIn=dojo.fx.wipeIn({node:this.wipeNode,duration:this.duration,beforeBegin:function(){_2c7.style.display="";}});this._wipeOut=dojo.fx.wipeOut({node:this.wipeNode,duration:this.duration,onEnd:function(){_2c7.style.display="none";}});},setContent:function(_2c9){if(this._wipeOut.status()=="playing"){this.inherited("setContent",arguments);}else{if(this._wipeIn.status()=="playing"){this._wipeIn.stop();}dojo.marginBox(this.wipeNode,{h:dojo.marginBox(this.wipeNode).h});this.inherited("setContent",arguments);this._wipeIn.play();}},toggle:function(){dojo.forEach([this._wipeIn,this._wipeOut],function(_2ca){if(_2ca.status()=="playing"){_2ca.stop();}});this[this.open?"_wipeOut":"_wipeIn"].play();this.open=!this.open;this._loadCheck();this._setCss();},_setCss:function(){var _2cb=["dijitClosed","dijitOpen"];var _2cc=this.open;dojo.removeClass(this.focusNode,_2cb[!_2cc+0]);this.focusNode.className+=" "+_2cb[_2cc+0];this.arrowNodeInner.innerHTML=this.open?"-":"+";},_onTitleKey:function(e){if(e.keyCode==dojo.keys.ENTER||e.charCode==dojo.keys.SPACE){this.toggle();}else{if(e.keyCode==dojo.keys.DOWN_ARROW){if(this.open){this.containerNode.focus();e.preventDefault();}}}},_handleFocus:function(e){dojo[(e.type=="focus"?"addClass":"removeClass")](this.focusNode,this.baseClass+"Focused");},setTitle:function(_2cf){this.titleNode.innerHTML=_2cf;}});}if(!dojo._hasResource["dijit.Tooltip"]){dojo._hasResource["dijit.Tooltip"]=true;dojo.provide("dijit.Tooltip");dojo.declare("dijit._MasterTooltip",[dijit._Widget,dijit._Templated],{duration:200,templateString:"<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\">\n\t<div class=\"dijitTooltipContainer dijitTooltipContents\" dojoAttachPoint=\"containerNode\" waiRole='alert'></div>\n\t<div class=\"dijitTooltipConnector\"></div>\n</div>\n",postCreate:function(){dojo.body().appendChild(this.domNode);this.bgIframe=new dijit.BackgroundIframe(this.domNode);this.fadeIn=dojo.fadeIn({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onShow")});this.fadeOut=dojo.fadeOut({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onHide")});},show:function(_2d0,_2d1){if(this.aroundNode&&this.aroundNode===_2d1){return;}if(this.fadeOut.status()=="playing"){this._onDeck=arguments;return;}this.containerNode.innerHTML=_2d0;this.domNode.style.top=(this.domNode.offsetTop+1)+"px";var _2d2=this.isLeftToRight()?{"BR":"BL","BL":"BR"}:{"BL":"BR","BR":"BL"};var pos=dijit.placeOnScreenAroundElement(this.domNode,_2d1,_2d2);this.domNode.className="dijitTooltip dijitTooltip"+(pos.corner=="BL"?"Right":"Left");dojo.style(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=true;this.aroundNode=_2d1;},_onShow:function(){if(dojo.isIE){this.domNode.style.filter="";}},hide:function(_2d4){if(!this.aroundNode||this.aroundNode!==_2d4){return;}if(this._onDeck){this._onDeck=null;return;}this.fadeIn.stop();this.isShowingNow=false;this.aroundNode=null;this.fadeOut.play();},_onHide:function(){this.domNode.style.cssText="";if(this._onDeck){this.show.apply(this,this._onDeck);this._onDeck=null;}}});dijit.showTooltip=function(_2d5,_2d6){if(!dijit._masterTT){dijit._masterTT=new dijit._MasterTooltip();}return dijit._masterTT.show(_2d5,_2d6);};dijit.hideTooltip=function(_2d7){if(!dijit._masterTT){dijit._masterTT=new dijit._MasterTooltip();}return dijit._masterTT.hide(_2d7);};dojo.declare("dijit.Tooltip",dijit._Widget,{label:"",showDelay:400,connectId:[],postCreate:function(){if(this.srcNodeRef){this.srcNodeRef.style.display="none";}this._connectNodes=[];dojo.forEach(this.connectId,function(id){var node=dojo.byId(id);if(node){this._connectNodes.push(node);dojo.forEach(["onMouseOver","onMouseOut","onFocus","onBlur","onHover","onUnHover"],function(_2da){this.connect(node,_2da.toLowerCase(),"_"+_2da);},this);if(dojo.isIE){node.style.zoom=1;}}},this);},_onMouseOver:function(e){this._onHover(e);},_onMouseOut:function(e){if(dojo.isDescendant(e.relatedTarget,e.target)){return;}this._onUnHover(e);},_onFocus:function(e){this._focus=true;this._onHover(e);},_onBlur:function(e){this._focus=false;this._onUnHover(e);},_onHover:function(e){if(!this._showTimer){var _2e0=e.target;this._showTimer=setTimeout(dojo.hitch(this,function(){this.open(_2e0);}),this.showDelay);}},_onUnHover:function(e){if(this._focus){return;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}this.close();},open:function(_2e2){_2e2=_2e2||this._connectNodes[0];if(!_2e2){return;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}dijit.showTooltip(this.label||this.domNode.innerHTML,_2e2);this._connectNode=_2e2;},close:function(){dijit.hideTooltip(this._connectNode);delete this._connectNode;if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}},uninitialize:function(){this.close();}});}if(!dojo._hasResource["dojo.cookie"]){dojo._hasResource["dojo.cookie"]=true;dojo.provide("dojo.cookie");dojo.cookie=function(name,_2e4,_2e5){var c=document.cookie;if(arguments.length==1){var idx=c.lastIndexOf(name+"=");if(idx==-1){return null;}var _2e8=idx+name.length+1;var end=c.indexOf(";",idx+name.length+1);if(end==-1){end=c.length;}return decodeURIComponent(c.substring(_2e8,end));}else{_2e5=_2e5||{};_2e4=encodeURIComponent(_2e4);if(typeof (_2e5.expires)=="number"){var d=new Date();d.setTime(d.getTime()+(_2e5.expires*24*60*60*1000));_2e5.expires=d;}document.cookie=name+"="+_2e4+(_2e5.expires?"; expires="+_2e5.expires.toUTCString():"")+(_2e5.path?"; path="+_2e5.path:"")+(_2e5.domain?"; domain="+_2e5.domain:"")+(_2e5.secure?"; secure":"");return null;}};}if(!dojo._hasResource["dijit.Tree"]){dojo._hasResource["dijit.Tree"]=true;dojo.provide("dijit.Tree");dojo.declare("dijit._TreeNode",[dijit._Widget,dijit._Templated,dijit._Container,dijit._Contained],{item:null,isTreeNode:true,label:"",isExpandable:null,isExpanded:false,state:"UNCHECKED",templateString:"<div class=\"dijitTreeNode dijitTreeExpandLeaf dijitTreeChildrenNo\" waiRole=\"presentation\"\n\t><span dojoAttachPoint=\"expandoNode\" class=\"dijitTreeExpando\" waiRole=\"presentation\"\n\t></span\n\t><span dojoAttachPoint=\"expandoNodeText\" class=\"dijitExpandoText\" waiRole=\"presentation\"\n\t></span\n\t>\n\t<div dojoAttachPoint=\"contentNode\" class=\"dijitTreeContent\" waiRole=\"presentation\">\n\t\t<div dojoAttachPoint=\"iconNode\" class=\"dijitInline dijitTreeIcon\" waiRole=\"presentation\"></div>\n\t\t<span dojoAttachPoint=\"labelNode\" class=\"dijitTreeLabel\" wairole=\"treeitem\" tabindex=\"-1\"></span>\n\t</div>\n</div>\n",postCreate:function(){this.setLabelNode(this.label);this._setExpando();this._updateItemClasses(this.item);if(this.isExpandable){dijit.setWaiState(this.labelNode,"expanded",this.isExpanded);}},markProcessing:function(){this.state="LOADING";this._setExpando(true);},unmarkProcessing:function(){this._setExpando(false);},_updateItemClasses:function(item){this.iconNode.className="dijitInline dijitTreeIcon "+this.tree.getIconClass(item);this.labelNode.className="dijitTreeLabel "+this.tree.getLabelClass(item);},_updateLayout:function(){var _2ec=this.getParent();if(_2ec&&_2ec.isTree&&_2ec._hideRoot){dojo.addClass(this.domNode,"dijitTreeIsRoot");}else{dojo.toggleClass(this.domNode,"dijitTreeIsLast",!this.getNextSibling());}},_setExpando:function(_2ed){var _2ee=["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"];var idx=_2ed?0:(this.isExpandable?(this.isExpanded?1:2):3);dojo.forEach(_2ee,function(s){dojo.removeClass(this.expandoNode,s);},this);dojo.addClass(this.expandoNode,_2ee[idx]);this.expandoNodeText.innerHTML=_2ed?"*":(this.isExpandable?(this.isExpanded?"-":"+"):"*");},expand:function(){if(this.isExpanded){return;}if(this._wipeOut.status()=="playing"){this._wipeOut.stop();}this.isExpanded=true;dijit.setWaiState(this.labelNode,"expanded","true");dijit.setWaiRole(this.containerNode,"group");this._setExpando();this._wipeIn.play();},collapse:function(){if(!this.isExpanded){return;}if(this._wipeIn.status()=="playing"){this._wipeIn.stop();}this.isExpanded=false;dijit.setWaiState(this.labelNode,"expanded","false");this._setExpando();this._wipeOut.play();},setLabelNode:function(_2f1){this.labelNode.innerHTML="";this.labelNode.appendChild(document.createTextNode(_2f1));},_setChildren:function(_2f2){this.destroyDescendants();this.state="LOADED";var _2f3={};if(_2f2&&_2f2.length>0){this.isExpandable=true;if(!this.containerNode){this.containerNode=this.tree.containerNodeTemplate.cloneNode(true);this.domNode.appendChild(this.containerNode);}dojo.forEach(_2f2,function(_2f4){var _2f5=new dijit._TreeNode(dojo.mixin({tree:this.tree,label:this.tree.getLabel(_2f4.item)},_2f4));this.addChild(_2f5);var _2f6=this.tree.store.getIdentity(_2f4.item);_2f3[_2f6]=_2f5;if(this.tree.persist){if(this.tree._openedItemIds[_2f6]){this.tree._expandNode(_2f5);}}},this);dojo.forEach(this.getChildren(),function(_2f7,idx){_2f7._updateLayout();});}else{this.isExpandable=false;}if(this._setExpando){this._setExpando(false);}if(this.isTree&&this._hideRoot){var fc=this.getChildren()[0];var _2fa=fc?fc.labelNode:this.domNode;_2fa.setAttribute("tabIndex","0");}if(this.containerNode&&!this._wipeIn){this._wipeIn=dojo.fx.wipeIn({node:this.containerNode,duration:150});this._wipeOut=dojo.fx.wipeOut({node:this.containerNode,duration:150});}return _2f3;},_addChildren:function(_2fb){var _2fc={};if(_2fb&&_2fb.length>0){dojo.forEach(_2fb,function(_2fd){var _2fe=new dijit._TreeNode(dojo.mixin({tree:this.tree,label:this.tree.getLabel(_2fd.item)},_2fd));this.addChild(_2fe);_2fc[this.tree.store.getIdentity(_2fd.item)]=_2fe;},this);dojo.forEach(this.getChildren(),function(_2ff,idx){_2ff._updateLayout();});}return _2fc;},deleteNode:function(node){node.destroy();var _302=this.getChildren();if(_302.length==0){this.isExpandable=false;this.collapse();}dojo.forEach(_302,function(_303){_303._updateLayout();});},makeExpandable:function(){this.isExpandable=true;this._setExpando(false);}});dojo.declare("dijit.Tree",dijit._TreeNode,{store:null,query:null,childrenAttr:["children"],templateString:"<div class=\"dijitTreeContainer\" style=\"\" waiRole=\"tree\"\n\tdojoAttachEvent=\"onclick:_onClick,onkeypress:_onKeyPress\">\n\t<div class=\"dijitTreeNode dijitTreeIsRoot dijitTreeExpandLeaf dijitTreeChildrenNo\" waiRole=\"presentation\"\n\t\tdojoAttachPoint=\"rowNode\"\n\t\t><span dojoAttachPoint=\"expandoNode\" class=\"dijitTreeExpando\" waiRole=\"presentation\"\n\t\t></span\n\t\t><span dojoAttachPoint=\"expandoNodeText\" class=\"dijitExpandoText\" waiRole=\"presentation\"\n\t\t></span\n\t\t>\n\t\t<div dojoAttachPoint=\"contentNode\" class=\"dijitTreeContent\" waiRole=\"presentation\">\n\t\t\t<div dojoAttachPoint=\"iconNode\" class=\"dijitInline dijitTreeIcon\" waiRole=\"presentation\"></div>\n\t\t\t<span dojoAttachPoint=\"labelNode\" class=\"dijitTreeLabel\" wairole=\"treeitem\" tabindex=\"0\"></span>\n\t\t</div>\n\t</div>\n</div>\n",isExpandable:true,isTree:true,persist:true,dndController:null,dndParams:["onDndDrop","itemCreator","onDndCancel","checkAcceptance","checkItemAcceptance"],onDndDrop:null,itemCreator:null,onDndCancel:null,checkAcceptance:null,checkItemAcceptance:null,_publish:function(_304,_305){dojo.publish(this.id,[dojo.mixin({tree:this,event:_304},_305||{})]);},postMixInProperties:function(){this.tree=this;this.lastFocused=this.labelNode;this._itemNodeMap={};this._hideRoot=!this.label;if(!this.store.getFeatures()["dojo.data.api.Identity"]){throw new Error("dijit.tree requires access to a store supporting the dojo.data Identity api");}if(!this.cookieName){this.cookieName=this.id+"SaveStateCookie";}if(this.store.getFeatures()["dojo.data.api.Notification"]){this.connect(this.store,"onNew","_onNewItem");this.connect(this.store,"onDelete","_onDeleteItem");this.connect(this.store,"onSet","_onSetItem");}},postCreate:function(){if(this.persist){var _306=dojo.cookie(this.cookieName);this._openedItemIds={};if(_306){dojo.forEach(_306.split(","),function(item){this._openedItemIds[item]=true;},this);}}var div=document.createElement("div");div.style.display="none";div.className="dijitTreeContainer";dijit.setWaiRole(div,"presentation");this.containerNodeTemplate=div;if(this._hideRoot){this.rowNode.style.display="none";}this.inherited("postCreate",arguments);this._expandNode(this);if(this.dndController){if(dojo.isString(this.dndController)){this.dndController=dojo.getObject(this.dndController);}var _309={};for(var i=0;i<this.dndParams.length;i++){if(this[this.dndParams[i]]){_309[this.dndParams[i]]=this[this.dndParams[i]];}}this.dndController=new this.dndController(this,_309);}this.connect(this.domNode,dojo.isIE?"onactivate":"onfocus","_onTreeFocus");},mayHaveChildren:function(item){return dojo.some(this.childrenAttr,function(attr){return this.store.hasAttribute(item,attr);},this);},getItemChildren:function(_30d,_30e){var _30f=this.store;if(_30d==null){_30f.fetch({query:this.query,onComplete:_30e});}else{var _310=[];for(var i=0;i<this.childrenAttr.length;i++){_310=_310.concat(_30f.getValues(_30d,this.childrenAttr[i]));}var _312=0;dojo.forEach(_310,function(item){if(!_30f.isItemLoaded(item)){_312++;}});if(_312==0){_30e(_310);}else{function onItem(item){if(--_312==0){_30e(_310);}};dojo.forEach(_310,function(item){if(!_30f.isItemLoaded(item)){_30f.loadItem({item:item,onItem:onItem});}});}}},getItemParentIdentity:function(item,_317){return this.store.getIdentity(_317.item);},getLabel:function(item){return this.store.getLabel(item);},getIconClass:function(item){},getLabelClass:function(item){},_onLoadAllItems:function(node,_31c){var _31d=dojo.map(_31c,function(item){return {item:item,isExpandable:this.mayHaveChildren(item)};},this);dojo.mixin(this._itemNodeMap,node._setChildren(_31d));this._expandNode(node);},_onKeyPress:function(e){if(e.altKey){return;}var _320=dijit.getEnclosingWidget(e.target);if(!_320){return;}if(e.charCode){var _321=e.charCode;if(!e.altKey&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey){_321=(String.fromCharCode(_321)).toLowerCase();this._onLetterKeyNav({node:_320,key:_321});dojo.stopEvent(e);}}else{var map=this._keyHandlerMap;if(!map){map={};map[dojo.keys.ENTER]="_onEnterKey";map[dojo.keys.LEFT_ARROW]="_onLeftArrow";map[dojo.keys.RIGHT_ARROW]="_onRightArrow";map[dojo.keys.UP_ARROW]="_onUpArrow";map[dojo.keys.DOWN_ARROW]="_onDownArrow";map[dojo.keys.HOME]="_onHomeKey";map[dojo.keys.END]="_onEndKey";this._keyHandlerMap=map;}if(this._keyHandlerMap[e.keyCode]){this[this._keyHandlerMap[e.keyCode]]({node:_320,item:_320.item});dojo.stopEvent(e);}}},_onEnterKey:function(_323){this._publish("execute",{item:_323.item,node:_323.node});this.onClick(_323.item,_323.node);},_onDownArrow:function(_324){var _325=this._navToNextNode(_324.node);if(_325&&_325.isTreeNode){_325.tree.focusNode(_325);return _325;}},_onUpArrow:function(_326){var _327=_326.node;var _328=_327;var _329=_327.getPreviousSibling();if(_329){_327=_329;while(_327.isExpandable&&_327.isExpanded&&_327.hasChildren()){_328=_327;var _32a=_327.getChildren();_327=_32a[_32a.length-1];}}else{var _32b=_327.getParent();if(!(this._hideRoot&&_32b===this)){_327=_32b;}}if(_327&&_327.isTreeNode){_328=_327;}if(_328&&_328.isTreeNode){_328.tree.focusNode(_328);return _328;}},_onRightArrow:function(_32c){var _32d=_32c.node;var _32e=_32d;if(_32d.isExpandable&&!_32d.isExpanded){this._expandNode(_32d);}else{if(_32d.hasChildren()){_32d=_32d.getChildren()[0];}}if(_32d&&_32d.isTreeNode){_32e=_32d;}if(_32e&&_32e.isTreeNode){_32e.tree.focusNode(_32e);return _32e;}},_onLeftArrow:function(_32f){var node=_32f.node;var _331=node;if(node.isExpandable&&node.isExpanded){this._collapseNode(node);}else{node=node.getParent();}if(node&&node.isTreeNode){_331=node;}if(_331&&_331.isTreeNode){_331.tree.focusNode(_331);return _331;}},_onHomeKey:function(){var _332=this._navToRootOrFirstNode();if(_332){_332.tree.focusNode(_332);return _332;}},_onEndKey:function(_333){var _334=_333.node.tree;var _335=_334;while(_335.isExpanded){var c=_335.getChildren();_335=c[c.length-1];if(_335.isTreeNode){_334=_335;}}if(_334&&_334.isTreeNode){_334.tree.focusNode(_334);return _334;}},_onLetterKeyNav:function(_337){var node=startNode=_337.node;var key=_337.key;do{node=this._navToNextNode(node);if(!node){node=this._navToRootOrFirstNode();}}while(node!==startNode&&(node.label.charAt(0).toLowerCase()!=key));if(node&&node.isTreeNode){if(node!==startNode){node.tree.focusNode(node);}return node;}},_onClick:function(e){var _33b=e.target;var _33c=dijit.getEnclosingWidget(_33b);if(!_33c||!_33c.isTreeNode){return;}if(_33b==_33c.expandoNode||_33b==_33c.expandoNodeText){if(_33c.isExpandable){this._onExpandoClick({node:_33c});}}else{this._publish("execute",{item:_33c.item,node:_33c});this.onClick(_33c.item,_33c);this.focusNode(_33c);}dojo.stopEvent(e);},_onExpandoClick:function(_33d){var node=_33d.node;if(node.isExpanded){this._collapseNode(node);}else{this._expandNode(node);}},onClick:function(item,node){},_navToNextNode:function(node){var _342;if(node.isExpandable&&node.isExpanded&&node.hasChildren()){_342=node.getChildren()[0];}else{while(node&&node.isTreeNode){_342=node.getNextSibling();if(_342){break;}node=node.getParent();}}return _342;},_navToRootOrFirstNode:function(){if(!this._hideRoot){return this;}else{var _343=this.getChildren()[0];if(_343&&_343.isTreeNode){return _343;}}},_collapseNode:function(node){if(node.isExpandable){if(node.state=="LOADING"){return;}if(this.lastFocused){if(dojo.isDescendant(this.lastFocused.domNode,node.domNode)){this.focusNode(node);}else{this.focusNode(this.lastFocused);}}node.collapse();if(this.persist&&node.item){delete this._openedItemIds[this.store.getIdentity(node.item)];this._saveState();}}},_expandNode:function(node){var t=node.tree;if(t.lastFocused){t.focusNode(t.lastFocused);}if(!node.isExpandable){return;}var _347=this.store;var _348=this.store.getValue;switch(node.state){case "LOADING":return;case "UNCHECKED":node.markProcessing();var _349=this;var _34a=function(_34b){node.unmarkProcessing();_349._onLoadAllItems(node,_34b);};this.getItemChildren(node.item,_34a);break;default:if(node.expand){node.expand();if(this.persist&&node.item){this._openedItemIds[this.store.getIdentity(node.item)]=true;this._saveState();}}break;}},blurNode:function(){var node=this.lastFocused;if(!node){return;}var _34d=node.labelNode;dojo.removeClass(_34d,"dijitTreeLabelFocused");_34d.setAttribute("tabIndex","-1");this.lastFocused=null;},focusNode:function(node){node.labelNode.focus();},_onBlur:function(){if(this.lastFocused){var _34f=this.lastFocused.labelNode;dojo.removeClass(_34f,"dijitTreeLabelFocused");}},_onTreeFocus:function(evt){var node=dijit.getEnclosingWidget(evt.target);if(node!=this.lastFocused){this.blurNode();}var _352=node.labelNode;_352.setAttribute("tabIndex","0");dojo.addClass(_352,"dijitTreeLabelFocused");this.lastFocused=node;},_onNewItem:function(item,_354){var _355;if(_354){var _356=this._itemNodeMap[this.getItemParentIdentity(item,_354)];if(!_356||dojo.indexOf(this.childrenAttr,_354.attribute)==-1){return;}}var _357={item:item,isExpandable:this.mayHaveChildren(item)};if(_356){if(!_356.isExpandable){_356.makeExpandable();}if(_356.state=="LOADED"||_356.isExpanded){var _358=_356._addChildren([_357]);}}else{var _358=this._addChildren([_357]);}if(_358){dojo.mixin(this._itemNodeMap,_358);}},_onDeleteItem:function(item){var _35a=this.store.getIdentity(item);var node=this._itemNodeMap[_35a];if(node){var _35c=node.getParent();_35c.deleteNode(node);this._itemNodeMap[_35a]=null;}},_onSetItem:function(item){var _35e=this.store.getIdentity(item);node=this._itemNodeMap[_35e];if(node){node.setLabelNode(this.getLabel(item));node._updateItemClasses(item);}},_saveState:function(){if(!this.persist){return;}var ary=[];for(var id in this._openedItemIds){ary.push(id);}dojo.cookie(this.cookieName,ary.join(","));}});}if(!dojo._hasResource["dijit.form.TextBox"]){dojo._hasResource["dijit.form.TextBox"]=true;dojo.provide("dijit.form.TextBox");dojo.declare("dijit.form.TextBox",dijit.form._FormWidget,{trim:false,uppercase:false,lowercase:false,propercase:false,maxLength:"",templateString:"<input class=\"dojoTextBox\" dojoAttachPoint='textbox,focusNode' name=\"${name}\"\n\tdojoAttachEvent='onmouseenter:_onMouse,onmouseleave:_onMouse,onfocus:_onMouse,onblur:_onMouse,onkeyup,onkeypress:_onKeyPress'\n\tautocomplete=\"off\" type=\"${type}\"\n\t/>\n",baseClass:"dijitTextBox",attributeMap:dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),{maxLength:"focusNode"}),getDisplayedValue:function(){return this.filter(this.textbox.value);},getValue:function(){return this.parse(this.getDisplayedValue(),this.constraints);},setValue:function(_361,_362,_363){var _364=this.filter(_361);if((typeof _364==typeof _361)&&(_363==null||_363==undefined)){_363=this.format(_364,this.constraints);}if(_363!=null&&_363!=undefined){this.textbox.value=_363;}dijit.form.TextBox.superclass.setValue.call(this,_364,_362);},setDisplayedValue:function(_365){this.textbox.value=_365;this.setValue(this.getValue(),true);},forWaiValuenow:function(){return this.getDisplayedValue();},format:function(_366,_367){return ((_366==null||_366==undefined)?"":(_366.toString?_366.toString():_366));},parse:function(_368,_369){return _368;},postCreate:function(){this.textbox.setAttribute("value",this.getDisplayedValue());this.inherited("postCreate",arguments);if(this.srcNodeRef){dojo.style(this.textbox,"cssText",this.style);this.textbox.className+=" "+this["class"];}this._layoutHack();},_layoutHack:function(){if(dojo.isFF==2&&this.domNode.tagName=="TABLE"){var node=this.domNode;var old=node.style.opacity;node.style.opacity="0.999";setTimeout(function(){node.style.opacity=old;},0);}},filter:function(val){if(val==undefined||val==null){return "";}else{if(typeof val!="string"){return val;}}if(this.trim){val=dojo.trim(val);}if(this.uppercase){val=val.toUpperCase();}if(this.lowercase){val=val.toLowerCase();}if(this.propercase){val=val.replace(/[^\s]+/g,function(word){return word.substring(0,1).toUpperCase()+word.substring(1);});}return val;},_onBlur:function(){this.setValue(this.getValue(),(this.isValid?this.isValid():true));},onkeyup:function(){}});}if(!dojo._hasResource["dijit.InlineEditBox"]){dojo._hasResource["dijit.InlineEditBox"]=true;dojo.provide("dijit.InlineEditBox");dojo.declare("dijit.InlineEditBox",dijit._Widget,{editing:false,autoSave:true,buttonSave:"",buttonCancel:"",renderAsHtml:false,editor:"dijit.form.TextBox",editorParams:{},onChange:function(_36e){},width:"100%",value:"",noValueIndicator:"<span style='font-family: wingdings; text-decoration: underline;'>&nbsp;&nbsp;&nbsp;&nbsp;&#x270d;&nbsp;&nbsp;&nbsp;&nbsp;</span>",postMixInProperties:function(){this.inherited("postMixInProperties",arguments);this.displayNode=this.srcNodeRef;var _36f={ondijitclick:"_onClick",onmouseover:"_onMouseOver",onmouseout:"_onMouseOut",onfocus:"_onMouseOver",onblur:"_onMouseOut"};for(var name in _36f){this.connect(this.displayNode,name,_36f[name]);}dijit.setWaiRole(this.displayNode,"button");if(!this.displayNode.getAttribute("tabIndex")){this.displayNode.setAttribute("tabIndex",0);}if(!this.value){this.value=this.displayNode.innerHTML;}this._setDisplayValue(this.value);},_onMouseOver:function(){dojo.addClass(this.displayNode,this.disabled?"dijitDisabledClickableRegion":"dijitClickableRegion");},_onMouseOut:function(){dojo.removeClass(this.displayNode,this.disabled?"dijitDisabledClickableRegion":"dijitClickableRegion");},_onClick:function(e){if(this.disabled){return;}if(e){dojo.stopEvent(e);}this._onMouseOut();setTimeout(dojo.hitch(this,"_edit"),0);},_edit:function(){this.editing=true;var _372=(this.renderAsHtml?this.value:this.value.replace(/\s*\r?\n\s*/g,"").replace(/<br\/?>/gi,"\n").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&"));var _373=document.createElement("span");dojo.place(_373,this.domNode,"before");var ew=this.editWidget=new dijit._InlineEditor({value:dojo.trim(_372),autoSave:this.autoSave,buttonSave:this.buttonSave,buttonCancel:this.buttonCancel,renderAsHtml:this.renderAsHtml,editor:this.editor,editorParams:this.editorParams,style:dojo.getComputedStyle(this.displayNode),save:dojo.hitch(this,"save"),cancel:dojo.hitch(this,"cancel"),width:this.width},_373);var ews=ew.domNode.style;this.displayNode.style.display="none";ews.position="static";ews.visibility="visible";this.domNode=ew.domNode;setTimeout(function(){ew.focus();},100);},_showText:function(_376){this.displayNode.style.display="";var ews=this.editWidget.domNode.style;ews.position="absolute";ews.visibility="hidden";this.domNode=this.displayNode;var _378=this;setTimeout(function(){if(_376){dijit.focus(_378.displayNode);}_378.editWidget.destroy();delete _378.editWidget;},100);},save:function(_379){this.editing=false;this.value=this.editWidget.getValue()+"";if(this.renderAsHtml){this.value=this.value.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;").replace("\n","<br>");}this._setDisplayValue(this.value);this.onChange(this.value);this._showText(_379);},_setDisplayValue:function(val){this.displayNode.innerHTML=val||this.noValueIndicator;},cancel:function(_37b){this.editing=false;this._showText(_37b);}});dojo.declare("dijit._InlineEditor",[dijit._Widget,dijit._Templated],{templateString:"<fieldset dojoAttachPoint=\"editNode\" waiRole=\"presentation\" style=\"position: absolute; visibility:hidden\" class=\"dijitReset dijitInline\"\n\tdojoAttachEvent=\"onkeypress: _onKeyPress\" \n\t><input dojoAttachPoint=\"editorPlaceholder\"\n\t/><span dojoAttachPoint=\"buttonContainer\"\n\t\t><button class='saveButton' dojoAttachPoint=\"saveButton\" dojoType=\"dijit.form.Button\" dojoAttachEvent=\"onClick:save\">${buttonSave}</button\n\t\t><button class='cancelButton' dojoAttachPoint=\"cancelButton\" dojoType=\"dijit.form.Button\" dojoAttachEvent=\"onClick:cancel\">${buttonCancel}</button\n\t></span\n></fieldset>\n",widgetsInTemplate:true,postMixInProperties:function(){this.inherited("postMixInProperties",arguments);this.messages=dojo.i18n.getLocalization("dijit","common",this.lang);dojo.forEach(["buttonSave","buttonCancel"],function(prop){if(!this[prop]){this[prop]=this.messages[prop];}},this);},postCreate:function(){var cls=dojo.getObject(this.editor);var ew=this.editWidget=new cls(this.editorParams,this.editorPlaceholder);var _37f=this.style;dojo.forEach(["fontWeight","fontFamily","fontSize","fontStyle"],function(prop){ew.focusNode.style[prop]=_37f[prop];},this);dojo.forEach(["marginTop","marginBottom","marginLeft","marginRight"],function(prop){this.domNode.style[prop]=_37f[prop];},this);if(this.width=="100%"){ew.domNode.style.width="100%";this.domNode.style.display="block";}else{ew.domNode.style.width=this.width+(Number(this.width)==this.width?"px":"");}this.connect(this.editWidget,"onChange","_onChange");this._ignoreNextOnChange=true;(this.editWidget.setDisplayedValue||this.editWidget.setValue).call(this.editWidget,this.value);this._initialText=this.getValue();if(this.autoSave){this.buttonContainer.style.display="none";}},destroy:function(){this.editWidget.destroy();this.inherited(arguments);},getValue:function(){var ew=this.editWidget;return ew.getDisplayedValue?ew.getDisplayedValue():ew.getValue();},_onKeyPress:function(e){if(this._exitInProgress){return;}if(this.autoSave){if(e.keyCode==dojo.keys.ESCAPE){dojo.stopEvent(e);this._exitInProgress=true;this.cancel(true);}else{if(e.keyCode==dojo.keys.ENTER){dojo.stopEvent(e);this._exitInProgress=true;this.save(true);}}}else{var _384=this;setTimeout(function(){_384.saveButton.setDisabled(_384.getValue()==_384._initialText);},100);}},_onBlur:function(){if(this._exitInProgress){return;}if(this.autoSave){this._exitInProgress=true;if(this.getValue()==this._initialText){this.cancel(false);}else{this.save(false);}}},enableSave:function(){return this.editWidget.isValid?this.editWidget.isValid():true;},_onChange:function(){if(this._ignoreNextOnChange){delete this._ignoreNextOnChange;return;}if(this._exitInProgress){return;}if(this.autoSave){this._exitInProgress=true;this.save(true);}else{this.saveButton.setDisabled((this.getValue()==this._initialText)||!this.enableSave());}},enableSave:function(){return this.editWidget.isValid?this.editWidget.isValid():true;},focus:function(){this.editWidget.focus();dijit.selectInputText(this.editWidget.focusNode);}});dijit.selectInputText=function(_385){var _386=dojo.global;var _387=dojo.doc;_385=dojo.byId(_385);if(_387["selection"]&&dojo.body()["createTextRange"]){if(_385.createTextRange){var _388=_385.createTextRange();_388.moveStart("character",0);_388.moveEnd("character",_385.value.length);_388.select();}}else{if(_386["getSelection"]){var _389=_386.getSelection();if(_385.setSelectionRange){_385.setSelectionRange(0,_385.value.length);}}}_385.focus();};}if(!dojo._hasResource["dijit.form.CheckBox"]){dojo._hasResource["dijit.form.CheckBox"]=true;dojo.provide("dijit.form.CheckBox");dojo.declare("dijit.form.CheckBox",dijit.form.ToggleButton,{templateString:"<fieldset class=\"dijitReset dijitInline\" waiRole=\"presentation\"\n\t><input\n\t \ttype=\"${type}\" name=\"${name}\"\n\t\tclass=\"dijitReset dijitCheckBoxInput\"\n\t\tdojoAttachPoint=\"inputNode,focusNode\"\n\t \tdojoAttachEvent=\"onmouseover:_onMouse,onmouseout:_onMouse,onclick:_onClick\"\n/></fieldset>\n",baseClass:"dijitCheckBox",type:"checkbox",value:"on",postCreate:function(){dojo.setSelectable(this.inputNode,false);this.setChecked(this.checked);this.inherited(arguments);},setChecked:function(_38a){if(dojo.isIE){if(_38a){this.inputNode.setAttribute("checked","checked");}else{this.inputNode.removeAttribute("checked");}}else{this.inputNode.checked=_38a;}this.inherited(arguments);},setValue:function(_38b){if(_38b==null){_38b="";}this.inputNode.value=_38b;dijit.form.CheckBox.superclass.setValue.call(this,_38b);}});dojo.declare("dijit.form.RadioButton",dijit.form.CheckBox,{type:"radio",baseClass:"dijitRadio",_groups:{},postCreate:function(){(this._groups[this.name]=this._groups[this.name]||[]).push(this);this.inherited(arguments);},uninitialize:function(){dojo.forEach(this._groups[this.name],function(_38c,i,arr){if(_38c===this){arr.splice(i,1);return;}},this);},setChecked:function(_38f){if(_38f){dojo.forEach(this._groups[this.name],function(_390){if(_390!=this&&_390.checked){_390.setChecked(false);}},this);}this.inherited(arguments);},_clicked:function(e){if(!this.checked){this.setChecked(true);}}});}if(!dojo._hasResource["dojo.data.util.filter"]){dojo._hasResource["dojo.data.util.filter"]=true;dojo.provide("dojo.data.util.filter");dojo.data.util.filter.patternToRegExp=function(_392,_393){var rxp="^";var c=null;for(var i=0;i<_392.length;i++){c=_392.charAt(i);switch(c){case "\\":rxp+=c;i++;rxp+=_392.charAt(i);break;case "*":rxp+=".*";break;case "?":rxp+=".";break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":rxp+="\\";default:rxp+=c;}}rxp+="$";if(_393){return new RegExp(rxp,"i");}else{return new RegExp(rxp);}};}if(!dojo._hasResource["dojo.data.util.sorter"]){dojo._hasResource["dojo.data.util.sorter"]=true;dojo.provide("dojo.data.util.sorter");dojo.data.util.sorter.basicComparator=function(a,b){var ret=0;if(a>b||typeof a==="undefined"||a===null){ret=1;}else{if(a<b||typeof b==="undefined"||b===null){ret=-1;}}return ret;};dojo.data.util.sorter.createSortFunction=function(_39a,_39b){var _39c=[];function createSortFunction(attr,dir){return function(_39f,_3a0){var a=_39b.getValue(_39f,attr);var b=_39b.getValue(_3a0,attr);var _3a3=null;if(_39b.comparatorMap){if(typeof attr!=="string"){attr=_39b.getIdentity(attr);}_3a3=_39b.comparatorMap[attr]||dojo.data.util.sorter.basicComparator;}_3a3=_3a3||dojo.data.util.sorter.basicComparator;return dir*_3a3(a,b);};};for(var i=0;i<_39a.length;i++){sortAttribute=_39a[i];if(sortAttribute.attribute){var _3a5=(sortAttribute.descending)?-1:1;_39c.push(createSortFunction(sortAttribute.attribute,_3a5));}}return function(rowA,rowB){var i=0;while(i<_39c.length){var ret=_39c[i++](rowA,rowB);if(ret!==0){return ret;}}return 0;};};}if(!dojo._hasResource["dojo.data.util.simpleFetch"]){dojo._hasResource["dojo.data.util.simpleFetch"]=true;dojo.provide("dojo.data.util.simpleFetch");dojo.data.util.simpleFetch.fetch=function(_3aa){_3aa=_3aa||{};if(!_3aa.store){_3aa.store=this;}var self=this;var _3ac=function(_3ad,_3ae){if(_3ae.onError){var _3af=_3ae.scope||dojo.global;_3ae.onError.call(_3af,_3ad,_3ae);}};var _3b0=function(_3b1,_3b2){var _3b3=_3b2.abort||null;var _3b4=false;var _3b5=_3b2.start?_3b2.start:0;var _3b6=_3b2.count?(_3b5+_3b2.count):_3b1.length;_3b2.abort=function(){_3b4=true;if(_3b3){_3b3.call(_3b2);}};var _3b7=_3b2.scope||dojo.global;if(!_3b2.store){_3b2.store=self;}if(_3b2.onBegin){_3b2.onBegin.call(_3b7,_3b1.length,_3b2);}if(_3b2.sort){_3b1.sort(dojo.data.util.sorter.createSortFunction(_3b2.sort,self));}if(_3b2.onItem){for(var i=_3b5;(i<_3b1.length)&&(i<_3b6);++i){var item=_3b1[i];if(!_3b4){_3b2.onItem.call(_3b7,item,_3b2);}}}if(_3b2.onComplete&&!_3b4){var _3ba=null;if(!_3b2.onItem){_3ba=_3b1.slice(_3b5,_3b6);}_3b2.onComplete.call(_3b7,_3ba,_3b2);}};this._fetchItems(_3aa,_3b0,_3ac);return _3aa;};}if(!dojo._hasResource["dojo.data.ItemFileReadStore"]){dojo._hasResource["dojo.data.ItemFileReadStore"]=true;dojo.provide("dojo.data.ItemFileReadStore");dojo.declare("dojo.data.ItemFileReadStore",null,{constructor:function(_3bb){this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=false;this._jsonFileUrl=_3bb.url;this._jsonData=_3bb.data;this._datatypeMap=_3bb.typeMap||{};if(!this._datatypeMap["Date"]){this._datatypeMap["Date"]={type:Date,deserialize:function(_3bc){return dojo.date.stamp.fromISOString(_3bc);}};}this._features={"dojo.data.api.Read":true,"dojo.data.api.Identity":true};this._itemsByIdentity=null;this._storeRefPropName="_S";this._itemNumPropName="_0";this._rootItemPropName="_RI";this._loadInProgress=false;this._queuedFetches=[];},url:"",_assertIsItem:function(item){if(!this.isItem(item)){throw new Error("dojo.data.ItemFileReadStore: Invalid item argument.");}},_assertIsAttribute:function(_3be){if(typeof _3be!=="string"){throw new Error("dojo.data.ItemFileReadStore: Invalid attribute argument.");}},getValue:function(item,_3c0,_3c1){var _3c2=this.getValues(item,_3c0);return (_3c2.length>0)?_3c2[0]:_3c1;},getValues:function(item,_3c4){this._assertIsItem(item);this._assertIsAttribute(_3c4);return item[_3c4]||[];},getAttributes:function(item){this._assertIsItem(item);var _3c6=[];for(var key in item){if((key!==this._storeRefPropName)&&(key!==this._itemNumPropName)&&(key!==this._rootItemPropName)){_3c6.push(key);}}return _3c6;},hasAttribute:function(item,_3c9){return this.getValues(item,_3c9).length>0;},containsValue:function(item,_3cb,_3cc){var _3cd=undefined;if(typeof _3cc==="string"){_3cd=dojo.data.util.filter.patternToRegExp(_3cc,false);}return this._containsValue(item,_3cb,_3cc,_3cd);},_containsValue:function(item,_3cf,_3d0,_3d1){return dojo.some(this.getValues(item,_3cf),function(_3d2){if(_3d2!==null&&!dojo.isObject(_3d2)&&_3d1){if(_3d2.toString().match(_3d1)){return true;}}else{if(_3d0===_3d2){return true;}}});},isItem:function(_3d3){if(_3d3&&_3d3[this._storeRefPropName]===this){if(this._arrayOfAllItems[_3d3[this._itemNumPropName]]===_3d3){return true;}}return false;},isItemLoaded:function(_3d4){return this.isItem(_3d4);},loadItem:function(_3d5){this._assertIsItem(_3d5.item);},getFeatures:function(){return this._features;},getLabel:function(item){if(this._labelAttr&&this.isItem(item)){return this.getValue(item,this._labelAttr);}return undefined;},getLabelAttributes:function(item){if(this._labelAttr){return [this._labelAttr];}return null;},_fetchItems:function(_3d8,_3d9,_3da){var self=this;var _3dc=function(_3dd,_3de){var _3df=[];if(_3dd.query){var _3e0=_3dd.queryOptions?_3dd.queryOptions.ignoreCase:false;var _3e1={};for(var key in _3dd.query){var _3e3=_3dd.query[key];if(typeof _3e3==="string"){_3e1[key]=dojo.data.util.filter.patternToRegExp(_3e3,_3e0);}}for(var i=0;i<_3de.length;++i){var _3e5=true;var _3e6=_3de[i];if(_3e6===null){_3e5=false;}else{for(var key in _3dd.query){var _3e3=_3dd.query[key];if(!self._containsValue(_3e6,key,_3e3,_3e1[key])){_3e5=false;}}}if(_3e5){_3df.push(_3e6);}}_3d9(_3df,_3dd);}else{for(var i=0;i<_3de.length;++i){var item=_3de[i];if(item!==null){_3df.push(item);}}_3d9(_3df,_3dd);}};if(this._loadFinished){_3dc(_3d8,this._getItemsArray(_3d8.queryOptions));}else{if(this._jsonFileUrl){if(this._loadInProgress){this._queuedFetches.push({args:_3d8,filter:_3dc});}else{this._loadInProgress=true;var _3e8={url:self._jsonFileUrl,handleAs:"json-comment-optional"};var _3e9=dojo.xhrGet(_3e8);_3e9.addCallback(function(data){try{self._getItemsFromLoadedData(data);self._loadFinished=true;self._loadInProgress=false;_3dc(_3d8,self._getItemsArray(_3d8.queryOptions));self._handleQueuedFetches();}catch(e){self._loadFinished=true;self._loadInProgress=false;_3da(e,_3d8);}});_3e9.addErrback(function(_3eb){self._loadInProgress=false;_3da(_3eb,_3d8);});}}else{if(this._jsonData){try{this._loadFinished=true;this._getItemsFromLoadedData(this._jsonData);this._jsonData=null;_3dc(_3d8,this._getItemsArray(_3d8.queryOptions));}catch(e){_3da(e,_3d8);}}else{_3da(new Error("dojo.data.ItemFileReadStore: No JSON source data was provided as either URL or a nested Javascript object."),_3d8);}}}},_handleQueuedFetches:function(){if(this._queuedFetches.length>0){for(var i=0;i<this._queuedFetches.length;i++){var _3ed=this._queuedFetches[i];var _3ee=_3ed.args;var _3ef=_3ed.filter;if(_3ef){_3ef(_3ee,this._getItemsArray(_3ee.queryOptions));}else{this.fetchItemByIdentity(_3ee);}}this._queuedFetches=[];}},_getItemsArray:function(_3f0){if(_3f0&&_3f0.deep){return this._arrayOfAllItems;}return this._arrayOfTopLevelItems;},close:function(_3f1){},_getItemsFromLoadedData:function(_3f2){function valueIsAnItem(_3f3){var _3f4=((_3f3!=null)&&(typeof _3f3=="object")&&(!dojo.isArray(_3f3))&&(!dojo.isFunction(_3f3))&&(_3f3.constructor==Object)&&(typeof _3f3._reference=="undefined")&&(typeof _3f3._type=="undefined")&&(typeof _3f3._value=="undefined"));return _3f4;};var self=this;function addItemAndSubItemsToArrayOfAllItems(_3f6){self._arrayOfAllItems.push(_3f6);for(var _3f7 in _3f6){var _3f8=_3f6[_3f7];if(_3f8){if(dojo.isArray(_3f8)){var _3f9=_3f8;for(var k=0;k<_3f9.length;++k){var _3fb=_3f9[k];if(valueIsAnItem(_3fb)){addItemAndSubItemsToArrayOfAllItems(_3fb);}}}else{if(valueIsAnItem(_3f8)){addItemAndSubItemsToArrayOfAllItems(_3f8);}}}}};this._labelAttr=_3f2.label;var i;var item;this._arrayOfAllItems=[];this._arrayOfTopLevelItems=_3f2.items;for(i=0;i<this._arrayOfTopLevelItems.length;++i){item=this._arrayOfTopLevelItems[i];addItemAndSubItemsToArrayOfAllItems(item);item[this._rootItemPropName]=true;}var _3fe={};var key;for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];for(key in item){if(key!==this._rootItemPropName){var _400=item[key];if(_400!==null){if(!dojo.isArray(_400)){item[key]=[_400];}}else{item[key]=[null];}}_3fe[key]=key;}}while(_3fe[this._storeRefPropName]){this._storeRefPropName+="_";}while(_3fe[this._itemNumPropName]){this._itemNumPropName+="_";}var _401;var _402=_3f2.identifier;if(_402){this._itemsByIdentity={};this._features["dojo.data.api.Identity"]=_402;for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];_401=item[_402];var _403=_401[0];if(!this._itemsByIdentity[_403]){this._itemsByIdentity[_403]=item;}else{if(this._jsonFileUrl){throw new Error("dojo.data.ItemFileReadStore: The json data as specified by: ["+this._jsonFileUrl+"] is malformed. Items within the list have identifier: ["+_402+"]. Value collided: ["+_403+"]");}else{if(this._jsonData){throw new Error("dojo.data.ItemFileReadStore: The json data provided by the creation arguments is malformed. Items within the list have identifier: ["+_402+"]. Value collided: ["+_403+"]");}}}}}else{this._features["dojo.data.api.Identity"]=Number;}for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];item[this._storeRefPropName]=this;item[this._itemNumPropName]=i;}for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];for(key in item){_401=item[key];for(var j=0;j<_401.length;++j){_400=_401[j];if(_400!==null&&typeof _400=="object"){if(_400._type&&_400._value){var type=_400._type;var _406=this._datatypeMap[type];if(!_406){throw new Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+type+"'");}else{if(dojo.isFunction(_406)){_401[j]=new _406(_400._value);}else{if(dojo.isFunction(_406.deserialize)){_401[j]=_406.deserialize(_400._value);}else{throw new Error("dojo.data.ItemFileReadStore: Value provided in typeMap was neither a constructor, nor a an object with a deserialize function");}}}}if(_400._reference){var _407=_400._reference;if(dojo.isString(_407)){_401[j]=this._itemsByIdentity[_407];}else{for(var k=0;k<this._arrayOfAllItems.length;++k){var _409=this._arrayOfAllItems[k];var _40a=true;for(var _40b in _407){if(_409[_40b]!=_407[_40b]){_40a=false;}}if(_40a){_401[j]=_409;}}}}}}}}},getIdentity:function(item){var _40d=this._features["dojo.data.api.Identity"];if(_40d===Number){return item[this._itemNumPropName];}else{var _40e=item[_40d];if(_40e){return _40e[0];}}return null;},fetchItemByIdentity:function(_40f){if(!this._loadFinished){var self=this;if(this._jsonFileUrl){if(this._loadInProgress){this._queuedFetches.push({args:_40f});}else{this._loadInProgress=true;var _411={url:self._jsonFileUrl,handleAs:"json-comment-optional"};var _412=dojo.xhrGet(_411);_412.addCallback(function(data){var _414=_40f.scope?_40f.scope:dojo.global;try{self._getItemsFromLoadedData(data);self._loadFinished=true;self._loadInProgress=false;var item=self._getItemByIdentity(_40f.identity);if(_40f.onItem){_40f.onItem.call(_414,item);}self._handleQueuedFetches();}catch(error){self._loadInProgress=false;if(_40f.onError){_40f.onError.call(_414,error);}}});_412.addErrback(function(_416){self._loadInProgress=false;if(_40f.onError){var _417=_40f.scope?_40f.scope:dojo.global;_40f.onError.call(_417,_416);}});}}else{if(this._jsonData){self._getItemsFromLoadedData(self._jsonData);self._jsonData=null;self._loadFinished=true;var item=self._getItemByIdentity(_40f.identity);if(_40f.onItem){var _419=_40f.scope?_40f.scope:dojo.global;_40f.onItem.call(_419,item);}}}}else{var item=this._getItemByIdentity(_40f.identity);if(_40f.onItem){var _419=_40f.scope?_40f.scope:dojo.global;_40f.onItem.call(_419,item);}}},_getItemByIdentity:function(_41a){var item=null;if(this._itemsByIdentity){item=this._itemsByIdentity[_41a];}else{item=this._arrayOfAllItems[_41a];}if(item===undefined){item=null;}return item;},getIdentityAttributes:function(item){var _41d=this._features["dojo.data.api.Identity"];if(_41d===Number){return null;}else{return [_41d];}},_forceLoad:function(){var self=this;if(this._jsonFileUrl){var _41f={url:self._jsonFileUrl,handleAs:"json-comment-optional",sync:true};var _420=dojo.xhrGet(_41f);_420.addCallback(function(data){try{if(self._loadInProgress!==true&&!self._loadFinished){self._getItemsFromLoadedData(data);self._loadFinished=true;}}catch(e){console.log(e);throw e;}});_420.addErrback(function(_422){throw _422;});}else{if(this._jsonData){self._getItemsFromLoadedData(self._jsonData);self._jsonData=null;self._loadFinished=true;}}}});dojo.extend(dojo.data.ItemFileReadStore,dojo.data.util.simpleFetch);}if(!dojo._hasResource["dijit.form.ValidationTextBox"]){dojo._hasResource["dijit.form.ValidationTextBox"]=true;dojo.provide("dijit.form.ValidationTextBox");dojo.declare("dijit.form.ValidationTextBox",dijit.form.TextBox,{templateString:"<table style=\"display: -moz-inline-stack;\" class=\"dijit dijitReset dijitInlineTable\" cellspacing=\"0\" cellpadding=\"0\"\n\tid=\"widget_${id}\" name=\"${name}\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse\" waiRole=\"presentation\"\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset dijitInputField\" width=\"100%\"\n\t\t\t><input dojoAttachPoint='textbox,focusNode' dojoAttachEvent='onfocus,onblur:_onMouse,onkeyup,onkeypress:_onKeyPress' autocomplete=\"off\"\n\t\t\ttype='${type}' name='${name}'\n\t\t/></td\n\t\t><td class=\"dijitReset dijitValidationIconField\" width=\"0%\"\n\t\t\t><div dojoAttachPoint='iconNode' class='dijitValidationIcon'></div><div class='dijitValidationIconText'>&Chi;</div\n\t\t></td\n\t></tr\n></table>\n",baseClass:"dijitTextBox",required:false,promptMessage:"",invalidMessage:"$_unset_$",constraints:{},regExp:".*",regExpGen:function(_423){return this.regExp;},state:"",setValue:function(){this.inherited("setValue",arguments);this.validate(false);},validator:function(_424,_425){return (new RegExp("^("+this.regExpGen(_425)+")"+(this.required?"":"?")+"$")).test(_424)&&(!this.required||!this._isEmpty(_424))&&(this._isEmpty(_424)||this.parse(_424,_425)!==null);},isValid:function(_426){return this.validator(this.textbox.value,this.constraints);},_isEmpty:function(_427){return /^\s*$/.test(_427);},getErrorMessage:function(_428){return this.invalidMessage;},getPromptMessage:function(_429){return this.promptMessage;},validate:function(_42a){var _42b="";var _42c=this.isValid(_42a);var _42d=this._isEmpty(this.textbox.value);this.state=(_42c||(!this._hasBeenBlurred&&_42d))?"":"Error";this._setStateClass();dijit.setWaiState(this.focusNode,"invalid",(_42c?"false":"true"));if(_42a){if(_42d){_42b=this.getPromptMessage(true);}if(!_42b&&!_42c){_42b=this.getErrorMessage(true);}}this._displayMessage(_42b);},_message:"",_displayMessage:function(_42e){if(this._message==_42e){return;}this._message=_42e;this.displayMessage(_42e);},displayMessage:function(_42f){if(_42f){dijit.showTooltip(_42f,this.domNode);}else{dijit.hideTooltip(this.domNode);}},_hasBeenBlurred:false,_onBlur:function(evt){this._hasBeenBlurred=true;this.validate(false);this.inherited("_onBlur",arguments);},onfocus:function(evt){this.validate(true);this._onMouse(evt);},onkeyup:function(evt){this.onfocus(evt);},constructor:function(){this.constraints={};},postMixInProperties:function(){this.inherited("postMixInProperties",arguments);this.constraints.locale=this.lang;this.messages=dojo.i18n.getLocalization("dijit.form","validate",this.lang);if(this.invalidMessage=="$_unset_$"){this.invalidMessage=this.messages.invalidMessage;}var p=this.regExpGen(this.constraints);this.regExp=p;}});dojo.declare("dijit.form.MappedTextBox",dijit.form.ValidationTextBox,{serialize:function(val,_435){return (val.toString?val.toString():"");},toString:function(){var val=this.filter(this.getValue());return (val!=null)?((typeof val=="string")?val:this.serialize(val,this.constraints)):"";},validate:function(){this.valueNode.value=this.toString();this.inherited("validate",arguments);},postCreate:function(){var _437=this.textbox;var _438=(this.valueNode=document.createElement("input"));_438.setAttribute("type",_437.type);_438.setAttribute("value",this.toString());dojo.style(_438,"display","none");_438.name=this.textbox.name;this.textbox.name="_"+this.textbox.name+"_displayed_";this.textbox.removeAttribute("name");dojo.place(_438,_437,"after");this.inherited("postCreate",arguments);}});dojo.declare("dijit.form.RangeBoundTextBox",dijit.form.MappedTextBox,{rangeMessage:"",compare:function(val1,val2){return val1-val2;},rangeCheck:function(_43b,_43c){var _43d=(typeof _43c.min!="undefined");var _43e=(typeof _43c.max!="undefined");if(_43d||_43e){return (!_43d||this.compare(_43b,_43c.min)>=0)&&(!_43e||this.compare(_43b,_43c.max)<=0);}else{return true;}},isInRange:function(_43f){return this.rangeCheck(this.getValue(),this.constraints);},isValid:function(_440){return this.inherited("isValid",arguments)&&((this._isEmpty(this.textbox.value)&&!this.required)||this.isInRange(_440));},getErrorMessage:function(_441){if(dijit.form.RangeBoundTextBox.superclass.isValid.call(this,false)&&!this.isInRange(_441)){return this.rangeMessage;}else{return this.inherited("getErrorMessage",arguments);}},postMixInProperties:function(){this.inherited("postMixInProperties",arguments);if(!this.rangeMessage){this.messages=dojo.i18n.getLocalization("dijit.form","validate",this.lang);this.rangeMessage=this.messages.rangeMessage;}},postCreate:function(){this.inherited("postCreate",arguments);if(typeof this.constraints.min!="undefined"){dijit.setWaiState(this.focusNode,"valuemin",this.constraints.min);}if(typeof this.constraints.max!="undefined"){dijit.setWaiState(this.focusNode,"valuemax",this.constraints.max);}}});}if(!dojo._hasResource["dijit.form.ComboBox"]){dojo._hasResource["dijit.form.ComboBox"]=true;dojo.provide("dijit.form.ComboBox");dojo.declare("dijit.form.ComboBoxMixin",null,{item:null,pageSize:Infinity,store:null,query:{},autoComplete:true,searchDelay:100,searchAttr:"name",ignoreCase:true,hasDownArrow:true,_hasFocus:false,templateString:"<table class=\"dijit dijitReset dijitInlineTable dijitLeft\" cellspacing=\"0\" cellpadding=\"0\"\n\tid=\"widget_${id}\" name=\"${name}\" dojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse\" waiRole=\"presentation\"\n\t><tr class=\"dijitReset\"\n\t\t><td class='dijitReset dijitStretch dijitInputField' width=\"100%\"\n\t\t\t><input type=\"text\" autocomplete=\"off\" name=\"${name}\"\n\t\t\tdojoAttachEvent=\"onkeypress, onkeyup, onfocus, compositionend\"\n\t\t\tdojoAttachPoint=\"textbox,focusNode\" waiRole=\"combobox\"\n\t\t/></td\n\t\t><td class=\"dijitReset dijitValidationIconField\" width=\"0%\"\n\t\t\t><div dojoAttachPoint='iconNode' class='dijitValidationIcon'></div\n\t\t\t><div class='dijitValidationIconText'>&Chi;</div\n\t\t></td\n\t\t><td class='dijitReset dijitRight dijitButtonNode dijitDownArrowButton' width=\"0%\"\n\t\t\tdojoAttachPoint=\"downArrowNode\"\n\t\t\tdojoAttachEvent=\"onmousedown:_onArrowMouseDown,onmouseup:_onMouse,onmouseenter:_onMouse,onmouseleave:_onMouse\"\n\t\t\t><div class=\"dijitDownArrowButtonInner\" waiRole=\"presentation\"\n\t\t\t\t><div class=\"dijitDownArrowButtonChar\">&#9660;</div\n\t\t\t></div\n\t\t></td\t\n\t></tr\n></table>\n",baseClass:"dijitComboBox",_lastDisplayedValue:"",getValue:function(){return dijit.form.TextBox.superclass.getValue.apply(this,arguments);},setDisplayedValue:function(_442){this._lastDisplayedValue=_442;this.setValue(_442,true);},_getCaretPos:function(_443){if(typeof (_443.selectionStart)=="number"){return _443.selectionStart;}else{if(dojo.isIE){var tr=document.selection.createRange().duplicate();var ntr=_443.createTextRange();tr.move("character",0);ntr.move("character",0);try{ntr.setEndPoint("EndToEnd",tr);return String(ntr.text).replace(/\r/g,"").length;}catch(e){return 0;}}}},_setCaretPos:function(_446,_447){_447=parseInt(_447);this._setSelectedRange(_446,_447,_447);},_setSelectedRange:function(_448,_449,end){if(!end){end=_448.value.length;}if(_448.setSelectionRange){dijit.focus(_448);_448.setSelectionRange(_449,end);}else{if(_448.createTextRange){var _44b=_448.createTextRange();with(_44b){collapse(true);moveEnd("character",end);moveStart("character",_449);select();}}else{_448.value=_448.value;_448.blur();dijit.focus(_448);var dist=parseInt(_448.value.length)-end;var _44d=String.fromCharCode(37);var tcc=_44d.charCodeAt(0);for(var x=0;x<dist;x++){var te=document.createEvent("KeyEvents");te.initKeyEvent("keypress",true,true,null,false,false,false,false,tcc,tcc);_448.dispatchEvent(te);}}}},onkeypress:function(evt){if(evt.altKey||(evt.ctrlKey&&evt.charCode!=118)){return;}var _452=false;this.item=null;if(this._isShowingNow){this._popupWidget.handleKey(evt);}switch(evt.keyCode){case dojo.keys.PAGE_DOWN:case dojo.keys.DOWN_ARROW:if(!this._isShowingNow||this._prev_key_esc){this._arrowPressed();_452=true;}else{this._announceOption(this._popupWidget.getHighlightedOption());}dojo.stopEvent(evt);this._prev_key_backspace=false;this._prev_key_esc=false;break;case dojo.keys.PAGE_UP:case dojo.keys.UP_ARROW:if(this._isShowingNow){this._announceOption(this._popupWidget.getHighlightedOption());}dojo.stopEvent(evt);this._prev_key_backspace=false;this._prev_key_esc=false;break;case dojo.keys.ENTER:var _453;if(this._isShowingNow&&(_453=this._popupWidget.getHighlightedOption())){if(_453==this._popupWidget.nextButton){this._nextSearch(1);dojo.stopEvent(evt);break;}else{if(_453==this._popupWidget.previousButton){this._nextSearch(-1);dojo.stopEvent(evt);break;}}}else{this.setDisplayedValue(this.getDisplayedValue());}evt.preventDefault();case dojo.keys.TAB:var _454=this.getDisplayedValue();if(this._popupWidget&&(_454==this._popupWidget._messages["previousMessage"]||_454==this._popupWidget._messages["nextMessage"])){break;}if(this._isShowingNow){this._prev_key_backspace=false;this._prev_key_esc=false;if(this._popupWidget.getHighlightedOption()){this._popupWidget.setValue({target:this._popupWidget.getHighlightedOption()},true);}this._hideResultList();}break;case dojo.keys.SPACE:this._prev_key_backspace=false;this._prev_key_esc=false;if(this._isShowingNow&&this._popupWidget.getHighlightedOption()){dojo.stopEvent(evt);this._selectOption();this._hideResultList();}else{_452=true;}break;case dojo.keys.ESCAPE:this._prev_key_backspace=false;this._prev_key_esc=true;this._hideResultList();if(this._lastDisplayedValue!=this.getDisplayedValue()){this.setDisplayedValue(this._lastDisplayedValue);dojo.stopEvent(evt);}else{this.setValue(this.getValue(),false);}break;case dojo.keys.DELETE:case dojo.keys.BACKSPACE:this._prev_key_esc=false;this._prev_key_backspace=true;_452=true;break;case dojo.keys.RIGHT_ARROW:case dojo.keys.LEFT_ARROW:this._prev_key_backspace=false;this._prev_key_esc=false;break;default:this._prev_key_backspace=false;this._prev_key_esc=false;if(dojo.isIE||evt.charCode!=0){_452=true;}}if(this.searchTimer){clearTimeout(this.searchTimer);}if(_452){this.searchTimer=setTimeout(dojo.hitch(this,this._startSearchFromInput),this.searchDelay);}},_autoCompleteText:function(text){this._setSelectedRange(this.focusNode,this.focusNode.value.length,this.focusNode.value.length);if(new RegExp("^"+escape(this.focusNode.value),this.ignoreCase?"i":"").test(escape(text))){var cpos=this._getCaretPos(this.focusNode);if((cpos+1)>this.focusNode.value.length){this.focusNode.value=text;this._setSelectedRange(this.focusNode,cpos,this.focusNode.value.length);dijit.setWaiState(this.focusNode,"valuenow",text);}}else{this.focusNode.value=text;this._setSelectedRange(this.focusNode,0,this.focusNode.value.length);dijit.setWaiState(this.focusNode,"valuenow",text);}},_openResultList:function(_457,_458){if(this.disabled||_458.query[this.searchAttr]!=this._lastQuery){return;}this._popupWidget.clearResultList();if(!_457.length){this._hideResultList();return;}var _459=new String(this.store.getValue(_457[0],this.searchAttr));if(_459&&this.autoComplete&&!this._prev_key_backspace&&(_458.query[this.searchAttr]!="*")){this._autoCompleteText(_459);dijit.setWaiState(this.focusNode||this.domNode,"valuenow",_459);}this._popupWidget.createOptions(_457,_458,dojo.hitch(this,this._getMenuLabelFromItem));this._showResultList();if(_458.direction){if(_458.direction==1){this._popupWidget.highlightFirstOption();}else{if(_458.direction==-1){this._popupWidget.highlightLastOption();}}this._announceOption(this._popupWidget.getHighlightedOption());}},_showResultList:function(){this._hideResultList();var _45a=this._popupWidget.getItems(),_45b=Math.min(_45a.length,this.maxListLength);this._arrowPressed();this._displayMessage("");with(this._popupWidget.domNode.style){width="";height="";}var best=this.open();var _45d=dojo.marginBox(this._popupWidget.domNode);this._popupWidget.domNode.style.overflow=((best.h==_45d.h)&&(best.w==_45d.w))?"hidden":"auto";var _45e=best.w;if(best.h<this._popupWidget.domNode.scrollHeight){_45e+=16;}dojo.marginBox(this._popupWidget.domNode,{h:best.h,w:Math.max(_45e,this.domNode.offsetWidth)});},_hideResultList:function(){if(this._isShowingNow){dijit.popup.close(this._popupWidget);this._arrowIdle();this._isShowingNow=false;}},_onBlur:function(){this._hasFocus=false;this._hasBeenBlurred=true;this._hideResultList();this._arrowIdle();var _45f=this.getDisplayedValue();if(this._popupWidget&&(_45f==this._popupWidget._messages["previousMessage"]||_45f==this._popupWidget._messages["nextMessage"])){this.setValue(this._lastValueReported,true);}else{this.setDisplayedValue(_45f);}},onfocus:function(evt){this._hasFocus=true;this._onMouse(evt);},_announceOption:function(node){if(node==null){return;}var _462;if(node==this._popupWidget.nextButton||node==this._popupWidget.previousButton){_462=node.innerHTML;}else{_462=this.store.getValue(node.item,this.searchAttr);}this.focusNode.value=this.focusNode.value.substring(0,this._getCaretPos(this.focusNode));this._autoCompleteText(_462);},_selectOption:function(evt){var tgt=null;if(!evt){evt={target:this._popupWidget.getHighlightedOption()};}if(!evt.target){this.setDisplayedValue(this.getDisplayedValue());return;}else{tgt=evt.target;}if(!evt.noHide){this._hideResultList();this._setCaretPos(this.focusNode,this.store.getValue(tgt.item,this.searchAttr).length);}this._doSelect(tgt);},_doSelect:function(tgt){this.item=tgt.item;this.setValue(this.store.getValue(tgt.item,this.searchAttr),true);},_onArrowMouseDown:function(evt){if(this.disabled){return;}dojo.stopEvent(evt);this.focus();if(this._isShowingNow){this._hideResultList();}else{this._startSearch("");}},_startSearchFromInput:function(){this._startSearch(this.focusNode.value);},_startSearch:function(key){if(!this._popupWidget){this._popupWidget=new dijit.form._ComboBoxMenu({onChange:dojo.hitch(this,this._selectOption)});}var _468=this.query;this._lastQuery=_468[this.searchAttr]=key+"*";var _469=this.store.fetch({queryOptions:{ignoreCase:this.ignoreCase,deep:true},query:_468,onComplete:dojo.hitch(this,"_openResultList"),start:0,count:this.pageSize});function nextSearch(_46a,_46b){_46a.start+=_46a.count*_46b;_46a.direction=_46b;_46a.store.fetch(_46a);};this._nextSearch=this._popupWidget.onPage=dojo.hitch(this,nextSearch,_469);},_getValueField:function(){return this.searchAttr;},_arrowPressed:function(){if(!this.disabled&&this.hasDownArrow){dojo.addClass(this.downArrowNode,"dijitArrowButtonActive");}},_arrowIdle:function(){if(!this.disabled&&this.hasDownArrow){dojo.removeClass(this.downArrowNode,"dojoArrowButtonPushed");}},compositionend:function(evt){this.onkeypress({charCode:-1});},constructor:function(){this.query={};},postMixInProperties:function(){if(!this.hasDownArrow){this.baseClass="dijitTextBox";}if(!this.store){var _46d=this.srcNodeRef?dojo.query("> option",this.srcNodeRef).map(function(node){node.style.display="none";return {value:node.getAttribute("value"),name:String(node.innerHTML)};}):{};this.store=new dojo.data.ItemFileReadStore({data:{identifier:this._getValueField(),items:_46d}});if(_46d&&_46d.length&&!this.value){this.value=_46d[this.srcNodeRef.selectedIndex!=-1?this.srcNodeRef.selectedIndex:0][this._getValueField()];}}},uninitialize:function(){if(this._popupWidget){this._hideResultList();this._popupWidget.destroy();}},_getMenuLabelFromItem:function(item){return {html:false,label:this.store.getValue(item,this.searchAttr)};},open:function(){this._isShowingNow=true;return dijit.popup.open({popup:this._popupWidget,around:this.domNode,parent:this});}});dojo.declare("dijit.form._ComboBoxMenu",[dijit._Widget,dijit._Templated],{templateString:"<div class='dijitMenu' dojoAttachEvent='onmousedown,onmouseup,onmouseover,onmouseout' tabIndex='-1' style='overflow:\"auto\";'>"+"<div class='dijitMenuItem dijitMenuPreviousButton' dojoAttachPoint='previousButton'></div>"+"<div class='dijitMenuItem dijitMenuNextButton' dojoAttachPoint='nextButton'></div>"+"</div>",_messages:null,postMixInProperties:function(){this._messages=dojo.i18n.getLocalization("dijit.form","ComboBox",this.lang);this.inherited("postMixInProperties",arguments);},setValue:function(_470){this.value=_470;this.onChange(_470);},onChange:function(_471){},onPage:function(_472){},postCreate:function(){this.previousButton.innerHTML=this._messages["previousMessage"];this.nextButton.innerHTML=this._messages["nextMessage"];this.inherited("postCreate",arguments);},onClose:function(){this._blurOptionNode();},_createOption:function(item,_474){var _475=_474(item);var _476=document.createElement("div");if(_475.html){_476.innerHTML=_475.label;}else{_476.appendChild(document.createTextNode(_475.label));}if(_476.innerHTML==""){_476.innerHTML="&nbsp;";}_476.item=item;return _476;},createOptions:function(_477,_478,_479){this.previousButton.style.display=_478.start==0?"none":"";var _47a=this;dojo.forEach(_477,function(item){var _47c=_47a._createOption(item,_479);_47c.className="dijitMenuItem";_47a.domNode.insertBefore(_47c,_47a.nextButton);});this.nextButton.style.display=_478.count==_477.length?"":"none";},clearResultList:function(){while(this.domNode.childNodes.length>2){this.domNode.removeChild(this.domNode.childNodes[this.domNode.childNodes.length-2]);}},getItems:function(){return this.domNode.childNodes;},getListLength:function(){return this.domNode.childNodes.length-2;},onmousedown:function(evt){dojo.stopEvent(evt);},onmouseup:function(evt){if(evt.target===this.domNode){return;}else{if(evt.target==this.previousButton){this.onPage(-1);}else{if(evt.target==this.nextButton){this.onPage(1);}else{var tgt=evt.target;while(!tgt.item){tgt=tgt.parentNode;}this.setValue({target:tgt},true);}}}},onmouseover:function(evt){if(evt.target===this.domNode){return;}var tgt=evt.target;if(!(tgt==this.previousButton||tgt==this.nextButton)){while(!tgt.item){tgt=tgt.parentNode;}}this._focusOptionNode(tgt);},onmouseout:function(evt){if(evt.target===this.domNode){return;}this._blurOptionNode();},_focusOptionNode:function(node){if(this._highlighted_option!=node){this._blurOptionNode();this._highlighted_option=node;dojo.addClass(this._highlighted_option,"dijitMenuItemHover");}},_blurOptionNode:function(){if(this._highlighted_option){dojo.removeClass(this._highlighted_option,"dijitMenuItemHover");this._highlighted_option=null;}},_highlightNextOption:function(){if(!this.getHighlightedOption()){this._focusOptionNode(this.domNode.firstChild.style.display=="none"?this.domNode.firstChild.nextSibling:this.domNode.firstChild);}else{if(this._highlighted_option.nextSibling&&this._highlighted_option.nextSibling.style.display!="none"){this._focusOptionNode(this._highlighted_option.nextSibling);}}dijit.scrollIntoView(this._highlighted_option);},highlightFirstOption:function(){this._focusOptionNode(this.domNode.firstChild.nextSibling);dijit.scrollIntoView(this._highlighted_option);},highlightLastOption:function(){this._focusOptionNode(this.domNode.lastChild.previousSibling);dijit.scrollIntoView(this._highlighted_option);},_highlightPrevOption:function(){if(!this.getHighlightedOption()){this._focusOptionNode(this.domNode.lastChild.style.display=="none"?this.domNode.lastChild.previousSibling:this.domNode.lastChild);}else{if(this._highlighted_option.previousSibling&&this._highlighted_option.previousSibling.style.display!="none"){this._focusOptionNode(this._highlighted_option.previousSibling);}}dijit.scrollIntoView(this._highlighted_option);},_page:function(up){var _485=0;var _486=this.domNode.scrollTop;var _487=parseInt(dojo.getComputedStyle(this.domNode).height);if(!this.getHighlightedOption()){this._highlightNextOption();}while(_485<_487){if(up){if(!this.getHighlightedOption().previousSibling||this._highlighted_option.previousSibling.style.display=="none"){break;}this._highlightPrevOption();}else{if(!this.getHighlightedOption().nextSibling||this._highlighted_option.nextSibling.style.display=="none"){break;}this._highlightNextOption();}var _488=this.domNode.scrollTop;_485+=(_488-_486)*(up?-1:1);_486=_488;}},pageUp:function(){this._page(true);},pageDown:function(){this._page(false);},getHighlightedOption:function(){return this._highlighted_option&&this._highlighted_option.parentNode?this._highlighted_option:null;},handleKey:function(evt){switch(evt.keyCode){case dojo.keys.DOWN_ARROW:this._highlightNextOption();break;case dojo.keys.PAGE_DOWN:this.pageDown();break;case dojo.keys.UP_ARROW:this._highlightPrevOption();break;case dojo.keys.PAGE_UP:this.pageUp();break;}}});dojo.declare("dijit.form.ComboBox",[dijit.form.ValidationTextBox,dijit.form.ComboBoxMixin],{postMixInProperties:function(){dijit.form.ComboBoxMixin.prototype.postMixInProperties.apply(this,arguments);dijit.form.ValidationTextBox.prototype.postMixInProperties.apply(this,arguments);}});}if(!dojo._hasResource["dojo.cldr.monetary"]){dojo._hasResource["dojo.cldr.monetary"]=true;dojo.provide("dojo.cldr.monetary");dojo.cldr.monetary.getData=function(code){var _48b={ADP:0,BHD:3,BIF:0,BYR:0,CLF:0,CLP:0,DJF:0,ESP:0,GNF:0,IQD:3,ITL:0,JOD:3,JPY:0,KMF:0,KRW:0,KWD:3,LUF:0,LYD:3,MGA:0,MGF:0,OMR:3,PYG:0,RWF:0,TND:3,TRL:0,VUV:0,XAF:0,XOF:0,XPF:0};var _48c={CHF:5};var _48d=_48b[code],_48e=_48c[code];if(typeof _48d=="undefined"){_48d=2;}if(typeof _48e=="undefined"){_48e=0;}return {places:_48d,round:_48e};};}if(!dojo._hasResource["dojo.currency"]){dojo._hasResource["dojo.currency"]=true;dojo.provide("dojo.currency");dojo.currency._mixInDefaults=function(_48f){_48f=_48f||{};_48f.type="currency";var _490=dojo.i18n.getLocalization("dojo.cldr","currency",_48f.locale)||{};var iso=_48f.currency;var data=dojo.cldr.monetary.getData(iso);dojo.forEach(["displayName","symbol","group","decimal"],function(prop){data[prop]=_490[iso+"_"+prop];});data.fractional=[true,false];return dojo.mixin(data,_48f);};dojo.currency.format=function(_494,_495){return dojo.number.format(_494,dojo.currency._mixInDefaults(_495));};dojo.currency.regexp=function(_496){return dojo.number.regexp(dojo.currency._mixInDefaults(_496));};dojo.currency.parse=function(_497,_498){return dojo.number.parse(_497,dojo.currency._mixInDefaults(_498));};}if(!dojo._hasResource["dijit.form.NumberTextBox"]){dojo._hasResource["dijit.form.NumberTextBox"]=true;dojo.provide("dijit.form.NumberTextBox");dojo.declare("dijit.form.NumberTextBoxMixin",null,{regExpGen:dojo.number.regexp,format:function(_499,_49a){if(isNaN(_499)){return "";}return dojo.number.format(_499,_49a);},parse:dojo.number.parse,filter:function(_49b){if(typeof _49b=="string"){return this.inherited("filter",arguments);}return (isNaN(_49b)?"":_49b);},value:NaN});dojo.declare("dijit.form.NumberTextBox",[dijit.form.RangeBoundTextBox,dijit.form.NumberTextBoxMixin],{});}if(!dojo._hasResource["dijit.form.CurrencyTextBox"]){dojo._hasResource["dijit.form.CurrencyTextBox"]=true;dojo.provide("dijit.form.CurrencyTextBox");dojo.declare("dijit.form.CurrencyTextBox",dijit.form.NumberTextBox,{currency:"",regExpGen:dojo.currency.regexp,format:dojo.currency.format,parse:dojo.currency.parse,postMixInProperties:function(){if(this.constraints===dijit.form.ValidationTextBox.prototype.constraints){this.constraints={};}this.constraints.currency=this.currency;dijit.form.CurrencyTextBox.superclass.postMixInProperties.apply(this,arguments);}});}if(!dojo._hasResource["dojo.cldr.supplemental"]){dojo._hasResource["dojo.cldr.supplemental"]=true;dojo.provide("dojo.cldr.supplemental");dojo.cldr.supplemental.getFirstDayOfWeek=function(_49c){var _49d={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,lb:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,tn:6,ye:6,as:0,au:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,ie:0,il:0,is:0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,za:0,zw:0,et:0,mw:0,ng:0,tj:0,gb:0,sy:4};var _49e=dojo.cldr.supplemental._region(_49c);var dow=_49d[_49e];return (typeof dow=="undefined")?1:dow;};dojo.cldr.supplemental._region=function(_4a0){_4a0=dojo.i18n.normalizeLocale(_4a0);var tags=_4a0.split("-");var _4a2=tags[1];if(!_4a2){_4a2={de:"de",en:"us",es:"es",fi:"fi",fr:"fr",hu:"hu",it:"it",ja:"jp",ko:"kr",nl:"nl",pt:"br",sv:"se",zh:"cn"}[tags[0]];}else{if(_4a2.length==4){_4a2=tags[2];}}return _4a2;};dojo.cldr.supplemental.getWeekend=function(_4a3){var _4a4={eg:5,il:5,sy:5,"in":0,ae:4,bh:4,dz:4,iq:4,jo:4,kw:4,lb:4,ly:4,ma:4,om:4,qa:4,sa:4,sd:4,tn:4,ye:4};var _4a5={ae:5,bh:5,dz:5,iq:5,jo:5,kw:5,lb:5,ly:5,ma:5,om:5,qa:5,sa:5,sd:5,tn:5,ye:5,af:5,ir:5,eg:6,il:6,sy:6};var _4a6=dojo.cldr.supplemental._region(_4a3);var _4a7=_4a4[_4a6];var end=_4a5[_4a6];if(typeof _4a7=="undefined"){_4a7=6;}if(typeof end=="undefined"){end=0;}return {start:_4a7,end:end};};}if(!dojo._hasResource["dojo.date"]){dojo._hasResource["dojo.date"]=true;dojo.provide("dojo.date");dojo.date.getDaysInMonth=function(_4a9){var _4aa=_4a9.getMonth();var days=[31,28,31,30,31,30,31,31,30,31,30,31];if(_4aa==1&&dojo.date.isLeapYear(_4a9)){return 29;}return days[_4aa];};dojo.date.isLeapYear=function(_4ac){var year=_4ac.getFullYear();return !(year%400)||(!(year%4)&&!!(year%100));};dojo.date.getTimezoneName=function(_4ae){var str=_4ae.toString();var tz="";var _4b1;var pos=str.indexOf("(");if(pos>-1){tz=str.substring(++pos,str.indexOf(")"));}else{var pat=/([A-Z\/]+) \d{4}$/;if((_4b1=str.match(pat))){tz=_4b1[1];}else{str=_4ae.toLocaleString();pat=/ ([A-Z\/]+)$/;if((_4b1=str.match(pat))){tz=_4b1[1];}}}return (tz=="AM"||tz=="PM")?"":tz;};dojo.date.compare=function(_4b4,_4b5,_4b6){_4b4=new Date(Number(_4b4));_4b5=new Date(Number(_4b5||new Date()));if(typeof _4b6!=="undefined"){if(_4b6=="date"){_4b4.setHours(0,0,0,0);_4b5.setHours(0,0,0,0);}else{if(_4b6=="time"){_4b4.setFullYear(0,0,0);_4b5.setFullYear(0,0,0);}}}if(_4b4>_4b5){return 1;}if(_4b4<_4b5){return -1;}return 0;};dojo.date.add=function(date,_4b8,_4b9){var sum=new Date(Number(date));var _4bb=false;var _4bc="Date";switch(_4b8){case "day":break;case "weekday":var days,_4be;var adj=0;var mod=_4b9%5;if(!mod){days=(_4b9>0)?5:-5;_4be=(_4b9>0)?((_4b9-5)/5):((_4b9+5)/5);}else{days=mod;_4be=parseInt(_4b9/5);}var strt=date.getDay();if(strt==6&&_4b9>0){adj=1;}else{if(strt==0&&_4b9<0){adj=-1;}}var trgt=strt+days;if(trgt==0||trgt==6){adj=(_4b9>0)?2:-2;}_4b9=7*_4be+days+adj;break;case "year":_4bc="FullYear";_4bb=true;break;case "week":_4b9*=7;break;case "quarter":_4b9*=3;case "month":_4bb=true;_4bc="Month";break;case "hour":case "minute":case "second":case "millisecond":_4bc="UTC"+_4b8.charAt(0).toUpperCase()+_4b8.substring(1)+"s";}if(_4bc){sum["set"+_4bc](sum["get"+_4bc]()+_4b9);}if(_4bb&&(sum.getDate()<date.getDate())){sum.setDate(0);}return sum;};dojo.date.difference=function(_4c3,_4c4,_4c5){_4c4=_4c4||new Date();_4c5=_4c5||"day";var _4c6=_4c4.getFullYear()-_4c3.getFullYear();var _4c7=1;switch(_4c5){case "quarter":var m1=_4c3.getMonth();var m2=_4c4.getMonth();var q1=Math.floor(m1/3)+1;var q2=Math.floor(m2/3)+1;q2+=(_4c6*4);_4c7=q2-q1;break;case "weekday":var days=Math.round(dojo.date.difference(_4c3,_4c4,"day"));var _4cd=parseInt(dojo.date.difference(_4c3,_4c4,"week"));var mod=days%7;if(mod==0){days=_4cd*5;}else{var adj=0;var aDay=_4c3.getDay();var bDay=_4c4.getDay();_4cd=parseInt(days/7);mod=days%7;var _4d2=new Date(_4c3);_4d2.setDate(_4d2.getDate()+(_4cd*7));var _4d3=_4d2.getDay();if(days>0){switch(true){case aDay==6:adj=-1;break;case aDay==0:adj=0;break;case bDay==6:adj=-1;break;case bDay==0:adj=-2;break;case (_4d3+mod)>5:adj=-2;}}else{if(days<0){switch(true){case aDay==6:adj=0;break;case aDay==0:adj=1;break;case bDay==6:adj=2;break;case bDay==0:adj=1;break;case (_4d3+mod)<0:adj=2;}}}days+=adj;days-=(_4cd*2);}_4c7=days;break;case "year":_4c7=_4c6;break;case "month":_4c7=(_4c4.getMonth()-_4c3.getMonth())+(_4c6*12);break;case "week":_4c7=parseInt(dojo.date.difference(_4c3,_4c4,"day")/7);break;case "day":_4c7/=24;case "hour":_4c7/=60;case "minute":_4c7/=60;case "second":_4c7/=1000;case "millisecond":_4c7*=_4c4.getTime()-_4c3.getTime();}return Math.round(_4c7);};}if(!dojo._hasResource["dojo.date.locale"]){dojo._hasResource["dojo.date.locale"]=true;dojo.provide("dojo.date.locale");(function(){function formatPattern(_4d4,_4d5,_4d6){return _4d6.replace(/([a-z])\1*/ig,function(_4d7){var s;var c=_4d7.charAt(0);var l=_4d7.length;var pad;var _4dc=["abbr","wide","narrow"];switch(c){case "G":s=_4d5[(l<4)?"eraAbbr":"eraNames"][_4d4.getFullYear()<0?0:1];break;case "y":s=_4d4.getFullYear();switch(l){case 1:break;case 2:s=String(s);s=s.substr(s.length-2);break;default:pad=true;}break;case "Q":case "q":s=Math.ceil((_4d4.getMonth()+1)/3);pad=true;break;case "M":case "L":var m=_4d4.getMonth();var _4de;switch(l){case 1:case 2:s=m+1;pad=true;break;case 3:case 4:case 5:_4de=_4dc[l-3];break;}if(_4de){var type=(c=="L")?"standalone":"format";var prop=["months",type,_4de].join("-");s=_4d5[prop][m];}break;case "w":var _4e1=0;s=dojo.date.locale._getWeekOfYear(_4d4,_4e1);pad=true;break;case "d":s=_4d4.getDate();pad=true;break;case "D":s=dojo.date.locale._getDayOfYear(_4d4);pad=true;break;case "E":case "e":case "c":var d=_4d4.getDay();var _4de;switch(l){case 1:case 2:if(c=="e"){var _4e3=dojo.cldr.supplemental.getFirstDayOfWeek(options.locale);d=(d-_4e3+7)%7;}if(c!="c"){s=d+1;pad=true;break;}case 3:case 4:case 5:_4de=_4dc[l-3];break;}if(_4de){var type=(c=="c")?"standalone":"format";var prop=["days",type,_4de].join("-");s=_4d5[prop][d];}break;case "a":var _4e4=(_4d4.getHours()<12)?"am":"pm";s=_4d5[_4e4];break;case "h":case "H":case "K":case "k":var h=_4d4.getHours();switch(c){case "h":s=(h%12)||12;break;case "H":s=h;break;case "K":s=(h%12);break;case "k":s=h||24;break;}pad=true;break;case "m":s=_4d4.getMinutes();pad=true;break;case "s":s=_4d4.getSeconds();pad=true;break;case "S":s=Math.round(_4d4.getMilliseconds()*Math.pow(10,l-3));break;case "v":case "z":s=dojo.date.getTimezoneName(_4d4);if(s){break;}l=4;case "Z":var _4e6=_4d4.getTimezoneOffset();var tz=[(_4e6<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_4e6)/60),2),dojo.string.pad(Math.abs(_4e6)%60,2)];if(l==4){tz.splice(0,0,"GMT");tz.splice(3,0,":");}s=tz.join("");break;default:throw new Error("dojo.date.locale.format: invalid pattern char: "+_4d6);}if(pad){s=dojo.string.pad(s,l);}return s;});};dojo.date.locale.format=function(_4e8,_4e9){_4e9=_4e9||{};var _4ea=dojo.i18n.normalizeLocale(_4e9.locale);var _4eb=_4e9.formatLength||"short";var _4ec=dojo.date.locale._getGregorianBundle(_4ea);var str=[];var _4ee=dojo.hitch(this,formatPattern,_4e8,_4ec);if(_4e9.selector=="year"){var year=_4e8.getFullYear();if(_4ea.match(/^zh|^ja/)){year+="年";}return year;}if(_4e9.selector!="time"){var _4f0=_4e9.datePattern||_4ec["dateFormat-"+_4eb];if(_4f0){str.push(_processPattern(_4f0,_4ee));}}if(_4e9.selector!="date"){var _4f1=_4e9.timePattern||_4ec["timeFormat-"+_4eb];if(_4f1){str.push(_processPattern(_4f1,_4ee));}}var _4f2=str.join(" ");return _4f2;};dojo.date.locale.regexp=function(_4f3){return dojo.date.locale._parseInfo(_4f3).regexp;};dojo.date.locale._parseInfo=function(_4f4){_4f4=_4f4||{};var _4f5=dojo.i18n.normalizeLocale(_4f4.locale);var _4f6=dojo.date.locale._getGregorianBundle(_4f5);var _4f7=_4f4.formatLength||"short";var _4f8=_4f4.datePattern||_4f6["dateFormat-"+_4f7];var _4f9=_4f4.timePattern||_4f6["timeFormat-"+_4f7];var _4fa;if(_4f4.selector=="date"){_4fa=_4f8;}else{if(_4f4.selector=="time"){_4fa=_4f9;}else{_4fa=_4f8+" "+_4f9;}}var _4fb=[];var re=_processPattern(_4fa,dojo.hitch(this,_buildDateTimeRE,_4fb,_4f6,_4f4));return {regexp:re,tokens:_4fb,bundle:_4f6};};dojo.date.locale.parse=function(_4fd,_4fe){var info=dojo.date.locale._parseInfo(_4fe);var _500=info.tokens,_501=info.bundle;var re=new RegExp("^"+info.regexp+"$");var _503=re.exec(_4fd);if(!_503){return null;}var _504=["abbr","wide","narrow"];var _505=new Date(1972,0);var _506={};var amPm="";dojo.forEach(_503,function(v,i){if(!i){return;}var _50a=_500[i-1];var l=_50a.length;switch(_50a.charAt(0)){case "y":if(l!=2){_505.setFullYear(v);_506.year=v;}else{if(v<100){v=Number(v);var year=""+new Date().getFullYear();var _50d=year.substring(0,2)*100;var _50e=Number(year.substring(2,4));var _50f=Math.min(_50e+20,99);var num=(v<_50f)?_50d+v:_50d-100+v;_505.setFullYear(num);_506.year=num;}else{if(_4fe.strict){return null;}_505.setFullYear(v);_506.year=v;}}break;case "M":if(l>2){var _511=_501["months-format-"+_504[l-3]].concat();if(!_4fe.strict){v=v.replace(".","").toLowerCase();_511=dojo.map(_511,function(s){return s.replace(".","").toLowerCase();});}v=dojo.indexOf(_511,v);if(v==-1){return null;}}else{v--;}_505.setMonth(v);_506.month=v;break;case "E":case "e":var days=_501["days-format-"+_504[l-3]].concat();if(!_4fe.strict){v=v.toLowerCase();days=dojo.map(days,"".toLowerCase);}v=dojo.indexOf(days,v);if(v==-1){return null;}break;case "d":_505.setDate(v);_506.date=v;break;case "D":_505.setMonth(0);_505.setDate(v);break;case "a":var am=_4fe.am||_501.am;var pm=_4fe.pm||_501.pm;if(!_4fe.strict){var _516=/\./g;v=v.replace(_516,"").toLowerCase();am=am.replace(_516,"").toLowerCase();pm=pm.replace(_516,"").toLowerCase();}if(_4fe.strict&&v!=am&&v!=pm){return null;}amPm=(v==pm)?"p":(v==am)?"a":"";break;case "K":if(v==24){v=0;}case "h":case "H":case "k":if(v>23){return null;}_505.setHours(v);break;case "m":_505.setMinutes(v);break;case "s":_505.setSeconds(v);break;case "S":_505.setMilliseconds(v);}});var _517=_505.getHours();if(amPm==="p"&&_517<12){_505.setHours(_517+12);}else{if(amPm==="a"&&_517==12){_505.setHours(0);}}if(_506.year&&_505.getFullYear()!=_506.year){return null;}if(_506.month&&_505.getMonth()!=_506.month){return null;}if(_506.date&&_505.getDate()!=_506.date){return null;}return _505;};function _processPattern(_518,_519,_51a,_51b){var _51c=function(x){return x;};_519=_519||_51c;_51a=_51a||_51c;_51b=_51b||_51c;var _51e=_518.match(/(''|[^'])+/g);var _51f=false;dojo.forEach(_51e,function(_520,i){if(!_520){_51e[i]="";}else{_51e[i]=(_51f?_51a:_519)(_520);_51f=!_51f;}});return _51b(_51e.join(""));};function _buildDateTimeRE(_522,_523,_524,_525){_525=dojo.regexp.escapeString(_525);if(!_524.strict){_525=_525.replace(" a"," ?a");}return _525.replace(/([a-z])\1*/ig,function(_526){var s;var c=_526.charAt(0);var l=_526.length;var p2="",p3="";if(_524.strict){if(l>1){p2="0"+"{"+(l-1)+"}";}if(l>2){p3="0"+"{"+(l-2)+"}";}}else{p2="0?";p3="0{0,2}";}switch(c){case "y":s="\\d{2,4}";break;case "M":s=(l>2)?"\\S+":p2+"[1-9]|1[0-2]";break;case "D":s=p2+"[1-9]|"+p3+"[1-9][0-9]|[12][0-9][0-9]|3[0-5][0-9]|36[0-6]";break;case "d":s=p2+"[1-9]|[12]\\d|3[01]";break;case "w":s=p2+"[1-9]|[1-4][0-9]|5[0-3]";break;case "E":s="\\S+";break;case "h":s=p2+"[1-9]|1[0-2]";break;case "k":s=p2+"\\d|1[01]";break;case "H":s=p2+"\\d|1\\d|2[0-3]";break;case "K":s=p2+"[1-9]|1\\d|2[0-4]";break;case "m":case "s":s="[0-5]\\d";break;case "S":s="\\d{"+l+"}";break;case "a":var am=_524.am||_523.am||"AM";var pm=_524.pm||_523.pm||"PM";if(_524.strict){s=am+"|"+pm;}else{s=am+"|"+pm;if(am!=am.toLowerCase()){s+="|"+am.toLowerCase();}if(pm!=pm.toLowerCase()){s+="|"+pm.toLowerCase();}}break;default:s=".*";}if(_522){_522.push(_526);}return "("+s+")";}).replace(/[\xa0 ]/g,"[\\s\\xa0]");};})();(function(){var _52e=[];dojo.date.locale.addCustomFormats=function(_52f,_530){_52e.push({pkg:_52f,name:_530});};dojo.date.locale._getGregorianBundle=function(_531){var _532={};dojo.forEach(_52e,function(desc){var _534=dojo.i18n.getLocalization(desc.pkg,desc.name,_531);_532=dojo.mixin(_532,_534);},this);return _532;};})();dojo.date.locale.addCustomFormats("dojo.cldr","gregorian");dojo.date.locale.getNames=function(item,type,use,_538){var _539;var _53a=dojo.date.locale._getGregorianBundle(_538);var _53b=[item,use,type];if(use=="standAlone"){_539=_53a[_53b.join("-")];}_53b[1]="format";return (_539||_53a[_53b.join("-")]).concat();};dojo.date.locale.isWeekend=function(_53c,_53d){var _53e=dojo.cldr.supplemental.getWeekend(_53d);var day=(_53c||new Date()).getDay();if(_53e.end<_53e.start){_53e.end+=7;if(day<_53e.start){day+=7;}}return day>=_53e.start&&day<=_53e.end;};dojo.date.locale._getDayOfYear=function(_540){return dojo.date.difference(new Date(_540.getFullYear(),0,1),_540)+1;};dojo.date.locale._getWeekOfYear=function(_541,_542){if(arguments.length==1){_542=0;}var _543=new Date(_541.getFullYear(),0,1).getDay();var adj=(_543-_542+7)%7;var week=Math.floor((dojo.date.locale._getDayOfYear(_541)+adj-1)/7);if(_543==_542){week++;}return week;};}if(!dojo._hasResource["dijit._Calendar"]){dojo._hasResource["dijit._Calendar"]=true;dojo.provide("dijit._Calendar");dojo.declare("dijit._Calendar",[dijit._Widget,dijit._Templated],{templateString:"<table cellspacing=\"0\" cellpadding=\"0\" class=\"dijitCalendarContainer\">\n\t<thead>\n\t\t<tr class=\"dijitReset dijitCalendarMonthContainer\" valign=\"top\">\n\t\t\t<th class='dijitReset' dojoAttachPoint=\"decrementMonth\">\n\t\t\t\t<span class=\"dijitInline dijitCalendarIncrementControl dijitCalendarDecrease\"><span dojoAttachPoint=\"decreaseArrowNode\" class=\"dijitA11ySideArrow dijitCalendarIncrementControl dijitCalendarDecreaseInner\">-</span></span>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' colspan=\"5\">\n\t\t\t\t<div dojoAttachPoint=\"monthLabelSpacer\" class=\"dijitCalendarMonthLabelSpacer\"></div>\n\t\t\t\t<div dojoAttachPoint=\"monthLabelNode\" class=\"dijitCalendarMonth\"></div>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' dojoAttachPoint=\"incrementMonth\">\n\t\t\t\t<div class=\"dijitInline dijitCalendarIncrementControl dijitCalendarIncrease\"><span dojoAttachPoint=\"increaseArrowNode\" class=\"dijitA11ySideArrow dijitCalendarIncrementControl dijitCalendarIncreaseInner\">+</span></div>\n\t\t\t</th>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th class=\"dijitReset dijitCalendarDayLabelTemplate\"><span class=\"dijitCalendarDayLabel\"></span></th>\n\t\t</tr>\n\t</thead>\n\t<tbody dojoAttachEvent=\"onclick: _onDayClick\" class=\"dijitReset dijitCalendarBodyContainer\">\n\t\t<tr class=\"dijitReset dijitCalendarWeekTemplate\">\n\t\t\t<td class=\"dijitReset dijitCalendarDateTemplate\"><span class=\"dijitCalendarDateLabel\"></span></td>\n\t\t</tr>\n\t</tbody>\n\t<tfoot class=\"dijitReset dijitCalendarYearContainer\">\n\t\t<tr>\n\t\t\t<td class='dijitReset' valign=\"top\" colspan=\"7\">\n\t\t\t\t<h3 class=\"dijitCalendarYearLabel\">\n\t\t\t\t\t<span dojoAttachPoint=\"previousYearLabelNode\" class=\"dijitInline dijitCalendarPreviousYear\"></span>\n\t\t\t\t\t<span dojoAttachPoint=\"currentYearLabelNode\" class=\"dijitInline dijitCalendarSelectedYear\"></span>\n\t\t\t\t\t<span dojoAttachPoint=\"nextYearLabelNode\" class=\"dijitInline dijitCalendarNextYear\"></span>\n\t\t\t\t</h3>\n\t\t\t</td>\n\t\t</tr>\n\t</tfoot>\n</table>\t\n",value:new Date(),dayWidth:"narrow",setValue:function(_546){if(!this.value||dojo.date.compare(_546,this.value)){_546=new Date(_546);this.displayMonth=new Date(_546);if(!this.isDisabledDate(_546,this.lang)){this.value=_546;this.value.setHours(0,0,0,0);this.onChange(this.value);}this._populateGrid();}},_setText:function(node,text){while(node.firstChild){node.removeChild(node.firstChild);}node.appendChild(document.createTextNode(text));},_populateGrid:function(){var _549=this.displayMonth;_549.setDate(1);var _54a=_549.getDay();var _54b=dojo.date.getDaysInMonth(_549);var _54c=dojo.date.getDaysInMonth(dojo.date.add(_549,"month",-1));var _54d=new Date();var _54e=this.value;var _54f=dojo.cldr.supplemental.getFirstDayOfWeek(this.lang);if(_54f>_54a){_54f-=7;}dojo.query(".dijitCalendarDateTemplate",this.domNode).forEach(function(_550,i){i+=_54f;var date=new Date(_549);var _553,_554="dijitCalendar",adj=0;if(i<_54a){_553=_54c-_54a+i+1;adj=-1;_554+="Previous";}else{if(i>=(_54a+_54b)){_553=i-_54a-_54b+1;adj=1;_554+="Next";}else{_553=i-_54a+1;_554+="Current";}}if(adj){date=dojo.date.add(date,"month",adj);}date.setDate(_553);if(!dojo.date.compare(date,_54d,"date")){_554="dijitCalendarCurrentDate "+_554;}if(!dojo.date.compare(date,_54e,"date")){_554="dijitCalendarSelectedDate "+_554;}if(this.isDisabledDate(date,this.lang)){_554="dijitCalendarDisabledDate "+_554;}_550.className=_554+"Month dijitCalendarDateTemplate";_550.dijitDateValue=date.valueOf();var _556=dojo.query(".dijitCalendarDateLabel",_550)[0];this._setText(_556,date.getDate());},this);var _557=dojo.date.locale.getNames("months","wide","standAlone",this.lang);this._setText(this.monthLabelNode,_557[_549.getMonth()]);var y=_549.getFullYear()-1;dojo.forEach(["previous","current","next"],function(name){this._setText(this[name+"YearLabelNode"],dojo.date.locale.format(new Date(y++,0),{selector:"year",locale:this.lang}));},this);var _55a=this;var _55b=function(_55c,_55d,adj){dijit.typematic.addMouseListener(_55a[_55c],_55a,function(_55f){if(_55f>=0){_55a._adjustDisplay(_55d,adj);}},0.8,500);};_55b("incrementMonth","month",1);_55b("decrementMonth","month",-1);_55b("nextYearLabelNode","year",1);_55b("previousYearLabelNode","year",-1);},postCreate:function(){dijit._Calendar.superclass.postCreate.apply(this);var _560=dojo.hitch(this,function(_561,n){var _563=dojo.query(_561,this.domNode)[0];for(var i=0;i<n;i++){_563.parentNode.appendChild(_563.cloneNode(true));}});_560(".dijitCalendarDayLabelTemplate",6);_560(".dijitCalendarDateTemplate",6);_560(".dijitCalendarWeekTemplate",5);var _565=dojo.date.locale.getNames("days",this.dayWidth,"standAlone",this.lang);var _566=dojo.cldr.supplemental.getFirstDayOfWeek(this.lang);dojo.query(".dijitCalendarDayLabel",this.domNode).forEach(function(_567,i){this._setText(_567,_565[(i+_566)%7]);},this);var _569=dojo.date.locale.getNames("months","wide","standAlone",this.lang);dojo.forEach(_569,function(name){var _56b=dojo.doc.createElement("div");this._setText(_56b,name);this.monthLabelSpacer.appendChild(_56b);},this);this.value=null;this.setValue(new Date());},_adjustDisplay:function(part,_56d){this.displayMonth=dojo.date.add(this.displayMonth,part,_56d);this._populateGrid();},_onDayClick:function(evt){var node=evt.target;dojo.stopEvent(evt);while(!node.dijitDateValue){node=node.parentNode;}if(!dojo.hasClass(node,"dijitCalendarDisabledDate")){this.setValue(node.dijitDateValue);this.onValueSelected(this.value);}},onValueSelected:function(date){},onChange:function(date){},isDisabledDate:function(_572,_573){return false;}});}if(!dojo._hasResource["dijit._TimePicker"]){dojo._hasResource["dijit._TimePicker"]=true;dojo.provide("dijit._TimePicker");dojo.declare("dijit._TimePicker",[dijit._Widget,dijit._Templated],{templateString:"<div id=\"widget_${id}\" class=\"dijitMenu\"\n ><div dojoAttachPoint=\"upArrow\" class=\"dijitButtonNode\"><span class=\"dijitTimePickerA11yText\">&#9650;</span></div\n ><div dojoAttachPoint=\"timeMenu,focusNode\" dojoAttachEvent=\"onclick:_onOptionSelected,onmouseover,onmouseout\"></div\n ><div dojoAttachPoint=\"downArrow\" class=\"dijitButtonNode\"><span class=\"dijitTimePickerA11yText\">&#9660;</span></div\n></div>\n",baseClass:"dijitTimePicker",clickableIncrement:"T00:15:00",visibleIncrement:"T01:00:00",visibleRange:"T05:00:00",value:new Date(),_visibleIncrement:2,_clickableIncrement:1,_totalIncrements:10,constraints:{},serialize:dojo.date.stamp.toISOString,setValue:function(date,_575){this.value=date;this._showText();},isDisabledDate:function(_576,_577){return false;},_showText:function(){this.timeMenu.innerHTML="";var _578=dojo.date.stamp.fromISOString;this._clickableIncrementDate=_578(this.clickableIncrement);this._visibleIncrementDate=_578(this.visibleIncrement);this._visibleRangeDate=_578(this.visibleRange);var _579=function(date){return date.getHours()*60*60+date.getMinutes()*60+date.getSeconds();};var _57b=_579(this._clickableIncrementDate);var _57c=_579(this._visibleIncrementDate);var _57d=_579(this._visibleRangeDate);var time=this.value.getTime();this._refDate=new Date(time-time%(_57c*1000));this._clickableIncrement=1;this._totalIncrements=_57d/_57b;this._visibleIncrement=_57c/_57b;for(var i=-this._totalIncrements/2;i<=this._totalIncrements/2;i+=this._clickableIncrement){var div=this._createOption(i);this.timeMenu.appendChild(div);}},postCreate:function(){if(this.constraints===dijit._TimePicker.prototype.constraints){this.constraints={};}if(!this.constraints.locale){this.constraints.locale=this.lang;}this.connect(this.timeMenu,dojo.isIE?"onmousewheel":"DOMMouseScroll","_mouseWheeled");dijit.typematic.addMouseListener(this.upArrow,this,this._onArrowUp,0.8,500);dijit.typematic.addMouseListener(this.downArrow,this,this._onArrowDown,0.8,500);this.inherited("postCreate",arguments);this.setValue(this.value);},_createOption:function(_581){var div=document.createElement("div");var date=(div.date=new Date(this._refDate));div.index=_581;var _584=this._clickableIncrementDate;date.setHours(date.getHours()+_584.getHours()*_581,date.getMinutes()+_584.getMinutes()*_581,date.getSeconds()+_584.getSeconds()*_581);var _585=document.createElement("div");dojo.addClass(div,this.baseClass+"Item");dojo.addClass(_585,this.baseClass+"ItemInner");_585.innerHTML=dojo.date.locale.format(date,this.constraints);div.appendChild(_585);if(_581%this._visibleIncrement<1&&_581%this._visibleIncrement>-1){dojo.addClass(div,this.baseClass+"Marker");}else{if(_581%this._clickableIncrement==0){dojo.addClass(div,this.baseClass+"Tick");}}if(this.isDisabledDate(date)){dojo.addClass(div,this.baseClass+"ItemDisabled");}if(dojo.date.compare(this.value,date,this.constraints.selector)==0){div.selected=true;dojo.addClass(div,this.baseClass+"ItemSelected");}return div;},_onOptionSelected:function(tgt){var _587=tgt.target.date||tgt.target.parentNode.date;if(!_587||this.isDisabledDate(_587)){return;}this.setValue(_587);this.onValueSelected(_587);},onValueSelected:function(_588){},onmouseover:function(e){var tgr=(e.target.parentNode===this.timeMenu)?e.target:e.target.parentNode;this._highlighted_option=tgr;dojo.addClass(tgr,this.baseClass+"ItemHover");},onmouseout:function(e){var tgr=(e.target.parentNode===this.timeMenu)?e.target:e.target.parentNode;if(this._highlighted_option===tgr){dojo.removeClass(tgr,this.baseClass+"ItemHover");}},_mouseWheeled:function(e){dojo.stopEvent(e);var _58e=(dojo.isIE?e.wheelDelta:-e.detail);this[(_58e>0?"_onArrowUp":"_onArrowDown")]();},_onArrowUp:function(){var _58f=this.timeMenu.childNodes[0].index-1;var div=this._createOption(_58f);this.timeMenu.removeChild(this.timeMenu.childNodes[this.timeMenu.childNodes.length-1]);this.timeMenu.insertBefore(div,this.timeMenu.childNodes[0]);},_onArrowDown:function(){var _591=this.timeMenu.childNodes[this.timeMenu.childNodes.length-1].index+1;var div=this._createOption(_591);this.timeMenu.removeChild(this.timeMenu.childNodes[0]);this.timeMenu.appendChild(div);}});}if(!dojo._hasResource["dijit.form.TimeTextBox"]){dojo._hasResource["dijit.form.TimeTextBox"]=true;dojo.provide("dijit.form.TimeTextBox");dojo.declare("dijit.form.TimeTextBox",dijit.form.RangeBoundTextBox,{regExpGen:dojo.date.locale.regexp,compare:dojo.date.compare,format:function(_593,_594){if(!_593||_593.toString()==this._invalid){return null;}return dojo.date.locale.format(_593,_594);},parse:dojo.date.locale.parse,serialize:dojo.date.stamp.toISOString,value:new Date(""),_invalid:(new Date("")).toString(),_popupClass:"dijit._TimePicker",postMixInProperties:function(){this.inherited("postMixInProperties",arguments);var _595=this.constraints;_595.selector="time";if(typeof _595.min=="string"){_595.min=dojo.date.stamp.fromISOString(_595.min);}if(typeof _595.max=="string"){_595.max=dojo.date.stamp.fromISOString(_595.max);}},_onFocus:function(evt){this._open();},setValue:function(_597,_598){this.inherited("setValue",arguments);if(this._picker){if(!_597||_597.toString()==this._invalid){_597=new Date();}this._picker.setValue(_597);}},_open:function(){if(this.disabled){return;}var self=this;if(!this._picker){var _59a=dojo.getObject(this._popupClass,false);this._picker=new _59a({onValueSelected:function(_59b){self.focus();setTimeout(dojo.hitch(self,"_close"),1);dijit.form.TimeTextBox.superclass.setValue.call(self,_59b,true);},lang:this.lang,constraints:this.constraints,isDisabledDate:function(date){return self.constraints&&(dojo.date.compare(self.constraints.min,date)>0||dojo.date.compare(self.constraints.max,date)<0);}});this._picker.setValue(this.getValue()||new Date());}if(!this._opened){dijit.popup.open({parent:this,popup:this._picker,around:this.domNode,onCancel:dojo.hitch(this,this._close),onClose:function(){self._opened=false;}});this._opened=true;}dojo.marginBox(this._picker.domNode,{w:this.domNode.offsetWidth});},_close:function(){if(this._opened){dijit.popup.close(this._picker);this._opened=false;}},_onBlur:function(){this._close();this.inherited("_onBlur",arguments);},getDisplayedValue:function(){return this.textbox.value;},setDisplayedValue:function(_59d){this.textbox.value=_59d;}});}if(!dojo._hasResource["dijit.form.DateTextBox"]){dojo._hasResource["dijit.form.DateTextBox"]=true;dojo.provide("dijit.form.DateTextBox");dojo.declare("dijit.form.DateTextBox",dijit.form.TimeTextBox,{_popupClass:"dijit._Calendar",postMixInProperties:function(){this.inherited("postMixInProperties",arguments);this.constraints.selector="date";}});}if(!dojo._hasResource["dijit.form.FilteringSelect"]){dojo._hasResource["dijit.form.FilteringSelect"]=true;dojo.provide("dijit.form.FilteringSelect");dojo.declare("dijit.form.FilteringSelect",[dijit.form.MappedTextBox,dijit.form.ComboBoxMixin],{labelAttr:"",labelType:"text",_isvalid:true,isValid:function(){return this._isvalid;},_callbackSetLabel:function(_59e,_59f,_5a0){if(_59f&&_59f.query[this.searchAttr]!=this._lastQuery){return;}if(!_59e.length){if(!this._hasFocus){this.valueNode.value="";}dijit.form.TextBox.superclass.setValue.call(this,undefined,!this._hasFocus);this._isvalid=false;this.validate(this._hasFocus);}else{this._setValueFromItem(_59e[0],_5a0);}},_openResultList:function(_5a1,_5a2){if(_5a2.query[this.searchAttr]!=this._lastQuery){return;}this._isvalid=_5a1.length!=0;this.validate(true);dijit.form.ComboBoxMixin.prototype._openResultList.apply(this,arguments);},getValue:function(){return this.valueNode.value;},_getValueField:function(){return "value";},_setValue:function(_5a3,_5a4,_5a5){this.valueNode.value=_5a3;dijit.form.FilteringSelect.superclass.setValue.call(this,_5a3,_5a5,_5a4);this._lastDisplayedValue=_5a4;},setValue:function(_5a6,_5a7){var self=this;var _5a9=function(item,_5ab){if(item){if(self.store.isItemLoaded(item)){self._callbackSetLabel([item],undefined,_5ab);}else{self.store.loadItem({item:item,onItem:function(_5ac,_5ad){self._callbackSetLabel(_5ac,_5ad,_5ab);}});}}else{self._isvalid=false;self.validate(false);}};this.store.fetchItemByIdentity({identity:_5a6,onItem:function(item){_5a9(item,_5a7);}});},_setValueFromItem:function(item,_5b0){this._isvalid=true;this._setValue(this.store.getIdentity(item),this.labelFunc(item,this.store),_5b0);},labelFunc:function(item,_5b2){return _5b2.getValue(item,this.searchAttr);},onkeyup:function(evt){},_doSelect:function(tgt){this.item=tgt.item;this._setValueFromItem(tgt.item,true);},setDisplayedValue:function(_5b5){if(this.store){var _5b6={};this._lastQuery=_5b6[this.searchAttr]=_5b5;this.textbox.value=_5b5;this._lastDisplayedValue=_5b5;this.store.fetch({query:_5b6,queryOptions:{ignoreCase:this.ignoreCase,deep:true},onComplete:dojo.hitch(this,this._callbackSetLabel)});}},_getMenuLabelFromItem:function(item){if(this.labelAttr){return {html:this.labelType=="html",label:this.store.getValue(item,this.labelAttr)};}else{return dijit.form.ComboBoxMixin.prototype._getMenuLabelFromItem.apply(this,arguments);}},postMixInProperties:function(){dijit.form.ComboBoxMixin.prototype.postMixInProperties.apply(this,arguments);dijit.form.MappedTextBox.prototype.postMixInProperties.apply(this,arguments);}});}if(!dojo._hasResource["dijit.form._Spinner"]){dojo._hasResource["dijit.form._Spinner"]=true;dojo.provide("dijit.form._Spinner");dojo.declare("dijit.form._Spinner",dijit.form.RangeBoundTextBox,{defaultTimeout:500,timeoutChangeRate:0.9,smallDelta:1,largeDelta:10,templateString:"<table class=\"dijit dijitReset dijitInlineTable dijitLeft\" cellspacing=\"0\" cellpadding=\"0\"\n\tid=\"widget_${id}\" name=\"${name}\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onkeypress:_onKeyPress\"\n\twaiRole=\"presentation\"\n\t><tr class=\"dijitReset\"\n\t\t><td rowspan=\"2\" class=\"dijitReset dijitStretch dijitInputField\" width=\"100%\"\n\t\t\t><input dojoAttachPoint=\"textbox,focusNode\" type=\"${type}\" dojoAttachEvent=\"onfocus,onkeyup\"\n\t\t\t\twaiRole=\"spinbutton\" autocomplete=\"off\" name=\"${name}\"\n\t\t></td\n\t\t><td rowspan=\"2\" class=\"dijitReset dijitValidationIconField\" width=\"0%\" \n\t\t\t><div dojoAttachPoint='iconNode' class='dijitValidationIcon'></div\n\t\t></td\n\t\t><td class=\"dijitReset dijitRight dijitButtonNode dijitUpArrowButton\" width=\"0%\"\n\t\t\t\tdojoAttachPoint=\"upArrowNode\"\n\t\t\t\tdojoAttachEvent=\"onmousedown:_handleUpArrowEvent,onmouseup:_handleUpArrowEvent,onmouseover:_handleUpArrowEvent,onmouseout:_handleUpArrowEvent\"\n\t\t\t\tstateModifier=\"UpArrow\"\n\t\t\t><div class=\"dijitA11yUpArrow\">&#9650;</div\n\t\t></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset dijitRight dijitButtonNode dijitDownArrowButton\" width=\"0%\"\n\t\t\t\tdojoAttachPoint=\"downArrowNode\"\n\t\t\t\tdojoAttachEvent=\"onmousedown:_handleDownArrowEvent,onmouseup:_handleDownArrowEvent,onmouseover:_handleDownArrowEvent,onmouseout:_handleDownArrowEvent\"\n\t\t\t\tstateModifier=\"DownArrow\"\n\t\t\t><div class=\"dijitA11yDownArrow\">&#9660;</div\n\t\t></td\n\t></tr\n></table>\n\n",baseClass:"dijitSpinner",adjust:function(val,_5b9){return val;},_handleUpArrowEvent:function(e){this._onMouse(e,this.upArrowNode);},_handleDownArrowEvent:function(e){this._onMouse(e,this.downArrowNode);},_arrowPressed:function(_5bc,_5bd){if(this.disabled){return;}dojo.addClass(_5bc,"dijitSpinnerButtonActive");this.setValue(this.adjust(this.getValue(),_5bd*this.smallDelta),false);},_arrowReleased:function(node){if(this.disabled){return;}this._wheelTimer=null;dijit.focus(this.textbox);dojo.removeClass(node,"dijitSpinnerButtonActive");},_typematicCallback:function(_5bf,node,evt){if(node==this.textbox){node=(evt.keyCode==dojo.keys.UP_ARROW)?this.upArrowNode:this.downArrowNode;}if(_5bf==-1){this._arrowReleased(node);}else{this._arrowPressed(node,(node==this.upArrowNode)?1:-1);}},_wheelTimer:null,_mouseWheeled:function(evt){dojo.stopEvent(evt);var _5c3=0;if(typeof evt.wheelDelta=="number"){_5c3=evt.wheelDelta;}else{if(typeof evt.detail=="number"){_5c3=-evt.detail;}}if(_5c3>0){var node=this.upArrowNode;var dir=+1;}else{if(_5c3<0){var node=this.downArrowNode;var dir=-1;}else{return;}}this._arrowPressed(node,dir);if(this._wheelTimer!=null){clearTimeout(this._wheelTimer);}var _5c6=this;this._wheelTimer=setTimeout(function(){_5c6._arrowReleased(node);},50);},postCreate:function(){this.inherited("postCreate",arguments);this.connect(this.textbox,dojo.isIE?"onmousewheel":"DOMMouseScroll","_mouseWheeled");dijit.typematic.addListener(this.upArrowNode,this.textbox,{keyCode:dojo.keys.UP_ARROW,ctrlKey:false,altKey:false,shiftKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout);dijit.typematic.addListener(this.downArrowNode,this.textbox,{keyCode:dojo.keys.DOWN_ARROW,ctrlKey:false,altKey:false,shiftKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout);}});}if(!dojo._hasResource["dijit.form.NumberSpinner"]){dojo._hasResource["dijit.form.NumberSpinner"]=true;dojo.provide("dijit.form.NumberSpinner");dojo.declare("dijit.form.NumberSpinner",[dijit.form._Spinner,dijit.form.NumberTextBoxMixin],{required:true,adjust:function(val,_5c8){var _5c9=val+_5c8;if(isNaN(val)||isNaN(_5c9)){return val;}if((typeof this.constraints.max=="number")&&(_5c9>this.constraints.max)){_5c9=this.constraints.max;}if((typeof this.constraints.min=="number")&&(_5c9<this.constraints.min)){_5c9=this.constraints.min;}return _5c9;}});}if(!dojo._hasResource["dijit.form.Slider"]){dojo._hasResource["dijit.form.Slider"]=true;dojo.provide("dijit.form.Slider");dojo.declare("dijit.form.HorizontalSlider",[dijit.form._FormWidget,dijit._Container],{templateString:"<table class=\"dijit dijitReset dijitSlider\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\"\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t\t><td dojoAttachPoint=\"containerNode,topDecoration\" class=\"dijitReset\" style=\"text-align:center;width:100%;\"></td\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitHorizontalSliderButtonContainer\"\n\t\t\t><div class=\"dijitHorizontalSliderDecrementIcon\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"decrementButton\" dojoAttachEvent=\"onclick: decrement\"><span class=\"dijitSliderButtonInner\">-</span></div\n\t\t></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><div class=\"dijitSliderBar dijitSliderBumper dijitHorizontalSliderBumper dijitSliderLeftBumper dijitHorizontalSliderLeftBumper\"></div\n\t\t></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><input dojoAttachPoint=\"valueNode\" type=\"hidden\" name=\"${name}\"\n\t\t\t/><div style=\"position:relative;\" dojoAttachPoint=\"sliderBarContainer\"\n\t\t\t\t><div dojoAttachPoint=\"progressBar\" class=\"dijitSliderBar dijitHorizontalSliderBar dijitSliderProgressBar dijitHorizontalSliderProgressBar\" dojoAttachEvent=\"onclick:_onBarClick\"\n\t\t\t\t\t><div dojoAttachPoint=\"sliderHandle,focusNode\" class=\"dijitSliderMoveable dijitHorizontalSliderMoveable\" dojoAttachEvent=\"onkeypress:_onKeyPress,onclick:_onHandleClick\" waiRole=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"\n\t\t\t\t\t\t><div class=\"dijitSliderImageHandle dijitHorizontalSliderImageHandle\"></div\n\t\t\t\t\t></div\n\t\t\t\t></div\n\t\t\t\t><div dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitHorizontalSliderBar dijitSliderRemainingBar dijitHorizontalSliderRemainingBar\" dojoAttachEvent=\"onclick:_onBarClick\"></div\n\t\t\t></div\n\t\t></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><div class=\"dijitSliderBar dijitSliderBumper dijitHorizontalSliderBumper dijitSliderRightBumper dijitHorizontalSliderRightBumper\"></div\n\t\t></td\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitHorizontalSliderButtonContainer\" style=\"right:0px;\"\n\t\t\t><div class=\"dijitHorizontalSliderIncrementIcon\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"incrementButton\" dojoAttachEvent=\"onclick: increment\"><span class=\"dijitSliderButtonInner\">+</span></div\n\t\t></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t\t><td dojoAttachPoint=\"containerNode,bottomDecoration\" class=\"dijitReset\" style=\"text-align:center;\"></td\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t></tr\n></table>\n",value:0,showButtons:true,minimum:0,maximum:100,discreteValues:Infinity,pageIncrement:2,clickSelect:true,widgetsInTemplate:true,attributeMap:dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),{id:"",name:"valueNode"}),baseClass:"dijitSlider",_mousePixelCoord:"pageX",_pixelCount:"w",_startingPixelCoord:"x",_startingPixelCount:"l",_handleOffsetCoord:"left",_progressPixelSize:"width",_upsideDown:false,_onKeyPress:function(e){if(this.disabled||e.altKey||e.ctrlKey){return;}switch(e.keyCode){case dojo.keys.HOME:this.setValue(this.minimum,false);break;case dojo.keys.END:this.setValue(this.maximum,false);break;case dojo.keys.UP_ARROW:case (this._isReversed()?dojo.keys.LEFT_ARROW:dojo.keys.RIGHT_ARROW):case dojo.keys.PAGE_UP:this.increment(e);break;case dojo.keys.DOWN_ARROW:case (this._isReversed()?dojo.keys.RIGHT_ARROW:dojo.keys.LEFT_ARROW):case dojo.keys.PAGE_DOWN:this.decrement(e);break;default:this.inherited("_onKeyPress",arguments);return;}dojo.stopEvent(e);},_onHandleClick:function(e){if(this.disabled){return;}if(!dojo.isIE){dijit.focus(this.sliderHandle);}dojo.stopEvent(e);},_isReversed:function(){return !(this._upsideDown||this.isLeftToRight());},_onBarClick:function(e){if(this.disabled||!this.clickSelect){return;}dijit.focus(this.sliderHandle);dojo.stopEvent(e);var _5cd=dojo.coords(this.sliderBarContainer,true);var _5ce=e[this._mousePixelCoord]-_5cd[this._startingPixelCoord];this._setPixelValue(this._isReversed()||this._upsideDown?(_5cd[this._pixelCount]-_5ce):_5ce,_5cd[this._pixelCount],true);},_setPixelValue:function(_5cf,_5d0,_5d1){if(this.disabled){return;}_5cf=_5cf<0?0:_5d0<_5cf?_5d0:_5cf;var _5d2=this.discreteValues;if(_5d2<=1||_5d2==Infinity){_5d2=_5d0;}_5d2--;var _5d3=_5d0/_5d2;var _5d4=Math.round(_5cf/_5d3);this.setValue((this.maximum-this.minimum)*_5d4/_5d2+this.minimum,_5d1);},setValue:function(_5d5,_5d6){this.valueNode.value=this.value=_5d5;this.inherited("setValue",arguments);var _5d7=(_5d5-this.minimum)/(this.maximum-this.minimum);this.progressBar.style[this._progressPixelSize]=(_5d7*100)+"%";this.remainingBar.style[this._progressPixelSize]=((1-_5d7)*100)+"%";},_bumpValue:function(_5d8){if(this.disabled){return;}var s=dojo.getComputedStyle(this.sliderBarContainer);var c=dojo._getContentBox(this.sliderBarContainer,s);var _5db=this.discreteValues;if(_5db<=1||_5db==Infinity){_5db=c[this._pixelCount];}_5db--;var _5dc=(this.value-this.minimum)*_5db/(this.maximum-this.minimum)+_5d8;if(_5dc<0){_5dc=0;}if(_5dc>_5db){_5dc=_5db;}_5dc=_5dc*(this.maximum-this.minimum)/_5db+this.minimum;this.setValue(_5dc,true);},decrement:function(e){this._bumpValue(e.keyCode==dojo.keys.PAGE_DOWN?-this.pageIncrement:-1);},increment:function(e){this._bumpValue(e.keyCode==dojo.keys.PAGE_UP?this.pageIncrement:1);},_mouseWheeled:function(evt){dojo.stopEvent(evt);var _5e0=0;if(typeof evt.wheelDelta=="number"){_5e0=evt.wheelDelta;}else{if(typeof evt.detail=="number"){_5e0=-evt.detail;}}if(_5e0>0){this.increment(evt);}else{if(_5e0<0){this.decrement(evt);}}},startup:function(){dojo.forEach(this.getChildren(),function(_5e1){if(this[_5e1.container]!=this.containerNode){this[_5e1.container].appendChild(_5e1.domNode);}},this);},_onBlur:function(){dijit.form.HorizontalSlider.superclass.setValue.call(this,this.value,true);},postCreate:function(){if(this.showButtons){this.incrementButton.style.display="";this.decrementButton.style.display="";}this.connect(this.domNode,dojo.isIE?"onmousewheel":"DOMMouseScroll","_mouseWheeled");var _5e2=this;var _5e3=function(){dijit.form._SliderMover.apply(this,arguments);this.widget=_5e2;};dojo.extend(_5e3,dijit.form._SliderMover.prototype);this._movable=new dojo.dnd.Moveable(this.sliderHandle,{mover:_5e3});this.inherited("postCreate",arguments);},destroy:function(){this._movable.destroy();this.inherited("destroy",arguments);}});dojo.declare("dijit.form.VerticalSlider",dijit.form.HorizontalSlider,{templateString:"<table class=\"dijitReset dijitSlider\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\"\n><tbody class=\"dijitReset\"\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitVerticalSliderButtonContainer\"\n\t\t\t><div class=\"dijitVerticalSliderIncrementIcon\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"incrementButton\" dojoAttachEvent=\"onclick: increment\"><span class=\"dijitSliderButtonInner\">+</span></div\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><center><div class=\"dijitSliderBar dijitSliderBumper dijitVerticalSliderBumper dijitSliderTopBumper dijitVerticalSliderTopBumper\"></div></center\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td dojoAttachPoint=\"leftDecoration\" class=\"dijitReset\" style=\"text-align:center;height:100%;\"></td\n\t\t><td class=\"dijitReset\" style=\"height:100%;\"\n\t\t\t><input dojoAttachPoint=\"valueNode\" type=\"hidden\" name=\"${name}\"\n\t\t\t/><center style=\"position:relative;height:100%;\" dojoAttachPoint=\"sliderBarContainer\"\n\t\t\t\t><div dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitVerticalSliderBar dijitSliderRemainingBar dijitVerticalSliderRemainingBar\" dojoAttachEvent=\"onclick:_onBarClick\"></div\n\t\t\t\t><div dojoAttachPoint=\"progressBar\" class=\"dijitSliderBar dijitVerticalSliderBar dijitSliderProgressBar dijitVerticalSliderProgressBar\" dojoAttachEvent=\"onclick:_onBarClick\"\n\t\t\t\t\t><div dojoAttachPoint=\"sliderHandle,focusNode\" class=\"dijitSliderMoveable\" dojoAttachEvent=\"onkeypress:_onKeyPress,onclick:_onHandleClick\" style=\"vertical-align:top;\" waiRole=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"\n\t\t\t\t\t\t><div class=\"dijitSliderImageHandle dijitVerticalSliderImageHandle\"></div\n\t\t\t\t\t></div\n\t\t\t\t></div\n\t\t\t></center\n\t\t></td\n\t\t><td dojoAttachPoint=\"containerNode,rightDecoration\" class=\"dijitReset\" style=\"text-align:center;height:100%;\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><center><div class=\"dijitSliderBar dijitSliderBumper dijitVerticalSliderBumper dijitSliderBottomBumper dijitVerticalSliderBottomBumper\"></div></center\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitVerticalSliderButtonContainer\"\n\t\t\t><div class=\"dijitVerticalSliderDecrementIcon\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"decrementButton\" dojoAttachEvent=\"onclick: decrement\"><span class=\"dijitSliderButtonInner\">-</span></div\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n></tbody></table>\n",_mousePixelCoord:"pageY",_pixelCount:"h",_startingPixelCoord:"y",_startingPixelCount:"t",_handleOffsetCoord:"top",_progressPixelSize:"height",_upsideDown:true});dojo.declare("dijit.form._SliderMover",dojo.dnd.Mover,{onMouseMove:function(e){var _5e5=this.widget;var c=this.constraintBox;if(!c){var _5e7=_5e5.sliderBarContainer;var s=dojo.getComputedStyle(_5e7);var c=dojo._getContentBox(_5e7,s);c[_5e5._startingPixelCount]=0;this.constraintBox=c;}var m=this.marginBox;var _5ea=_5e5._isReversed()?e[_5e5._mousePixelCoord]-dojo._abs(_5e5.sliderBarContainer).x:m[_5e5._startingPixelCount]+e[_5e5._mousePixelCoord];dojo.hitch(_5e5,"_setPixelValue")(_5e5._isReversed()||_5e5._upsideDown?(c[_5e5._pixelCount]-_5ea):_5ea,c[_5e5._pixelCount]);},destroy:function(e){var _5ec=this.widget;_5ec.setValue(_5ec.value,true);dojo.dnd.Mover.prototype.destroy.call(this);}});dojo.declare("dijit.form.HorizontalRule",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"RuleContainer HorizontalRuleContainer\"></div>",count:3,container:"containerNode",ruleStyle:"",_positionPrefix:"<div class=\"RuleMark HorizontalRuleMark\" style=\"left:",_positionSuffix:"%;",_suffix:"\"></div>",_genHTML:function(pos,ndx){return this._positionPrefix+pos+this._positionSuffix+this.ruleStyle+this._suffix;},_isHorizontal:true,postCreate:function(){if(this.count==1){var _5ef=this._genHTML(50,0);}else{var _5f0=100/(this.count-1);if(!this._isHorizontal||this.isLeftToRight()){var _5ef=this._genHTML(0,0);for(var i=1;i<this.count-1;i++){_5ef+=this._genHTML(_5f0*i,i);}_5ef+=this._genHTML(100,this.count-1);}else{var _5ef=this._genHTML(100,0);for(var i=1;i<this.count-1;i++){_5ef+=this._genHTML(100-_5f0*i,i);}_5ef+=this._genHTML(0,this.count-1);}}this.domNode.innerHTML=_5ef;}});dojo.declare("dijit.form.VerticalRule",dijit.form.HorizontalRule,{templateString:"<div class=\"RuleContainer VerticalRuleContainer\"></div>",_positionPrefix:"<div class=\"RuleMark VerticalRuleMark\" style=\"top:",_isHorizontal:false});dojo.declare("dijit.form.HorizontalRuleLabels",dijit.form.HorizontalRule,{templateString:"<div class=\"RuleContainer HorizontalRuleContainer\"></div>",labelStyle:"",labels:[],numericMargin:0,minimum:0,maximum:1,constraints:{pattern:"#%"},_positionPrefix:"<div class=\"RuleLabelContainer HorizontalRuleLabelContainer\" style=\"left:",_labelPrefix:"\"><span class=\"RuleLabel HorizontalRuleLabel\">",_suffix:"</span></div>",_calcPosition:function(pos){return pos;},_genHTML:function(pos,ndx){return this._positionPrefix+this._calcPosition(pos)+this._positionSuffix+this.labelStyle+this._labelPrefix+this.labels[ndx]+this._suffix;},getLabels:function(){var _5f5=this.labels;if(!_5f5.length){_5f5=dojo.query("> li",this.srcNodeRef).map(function(node){return String(node.innerHTML);});}this.srcNodeRef.innerHTML="";if(!_5f5.length&&this.count>1){var _5f7=this.minimum;var inc=(this.maximum-_5f7)/(this.count-1);for(var i=0;i<this.count;i++){_5f5.push((i<this.numericMargin||i>=(this.count-this.numericMargin))?"":dojo.number.format(_5f7,this.constraints));_5f7+=inc;}}return _5f5;},postMixInProperties:function(){this.inherited("postMixInProperties",arguments);this.labels=this.getLabels();this.count=this.labels.length;}});dojo.declare("dijit.form.VerticalRuleLabels",dijit.form.HorizontalRuleLabels,{templateString:"<div class=\"RuleContainer VerticalRuleContainer\"></div>",_positionPrefix:"<div class=\"RuleLabelContainer VerticalRuleLabelContainer\" style=\"top:",_labelPrefix:"\"><span class=\"RuleLabel VerticalRuleLabel\">",_calcPosition:function(pos){return 100-pos;},_isHorizontal:false});}if(!dojo._hasResource["dijit.form.Textarea"]){dojo._hasResource["dijit.form.Textarea"]=true;dojo.provide("dijit.form.Textarea");dojo.declare("dijit.form.Textarea",dijit.form._FormWidget,{attributeMap:dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),{style:"styleNode","class":"styleNode"}),templateString:(dojo.isIE||dojo.isSafari||dojo.isMozilla)?((dojo.isIE||dojo.isSafari)?"<fieldset id=\"${id}\" class=\"dijitInline dijitInputField dijitTextArea\" dojoAttachPoint=\"styleNode\" waiRole=\"presentation\"><div dojoAttachPoint=\"editNode,focusNode,eventNode\" dojoAttachEvent=\"onpaste:_changing,oncut:_changing\" waiRole=\"textarea\" style=\"text-decoration:none;_padding-bottom:16px;display:block;overflow:auto;\" contentEditable=\"true\"></div>":"<span id=\"${id}\" class=\"dijitReset\">"+"<iframe src=\"javascript:<html><head><title>${_iframeEditTitle}</title></head><body><script>var _postCreate=window.frameElement?window.frameElement.postCreate:null;if(_postCreate)_postCreate();</script></body></html>\""+" dojoAttachPoint=\"iframe,styleNode\" dojoAttachEvent=\"onblur:_onIframeBlur\" class=\"dijitInline dijitInputField dijitTextArea\"></iframe>")+"<textarea name=\"${name}\" value=\"${value}\" dojoAttachPoint=\"formValueNode\" style=\"display:none;\"></textarea>"+((dojo.isIE||dojo.isSafari)?"</fieldset>":"</span>"):"<textarea id=\"${id}\" name=\"${name}\" value=\"${value}\" dojoAttachPoint=\"formValueNode,editNode,focusNode,styleNode\" class=\"dijitInputField dijitTextArea\"></textarea>",focus:function(){if(!this.disabled){this._changing();}if(dojo.isMozilla){dijit.focus(this.iframe);}else{dijit.focus(this.focusNode);}},setValue:function(_5fb,_5fc){var _5fd=this.editNode;if(typeof _5fb=="string"){_5fd.innerHTML="";if(_5fb.split){var _5fe=this;var _5ff=true;dojo.forEach(_5fb.split("\n"),function(line){if(_5ff){_5ff=false;}else{_5fd.appendChild(document.createElement("BR"));}_5fd.appendChild(document.createTextNode(line));});}else{_5fd.appendChild(document.createTextNode(_5fb));}}else{_5fb=_5fd.innerHTML;if(this.iframe){_5fb=_5fb.replace(/<div><\/div>\r?\n?$/i,"");}_5fb=_5fb.replace(/\s*\r?\n|^\s+|\s+$|&nbsp;/g,"").replace(/>\s+</g,"><").replace(/<\/(p|div)>$|^<(p|div)[^>]*>/gi,"").replace(/([^>])<div>/g,"$1\n").replace(/<\/p>\s*<p[^>]*>|<br[^>]*>/gi,"\n").replace(/<[^>]*>/g,"").replace(/&amp;/gi,"&").replace(/&lt;/gi,"<").replace(/&gt;/gi,">");}this.value=this.formValueNode.value=_5fb;if(this.iframe){var _601=document.createElement("div");_5fd.appendChild(_601);var _602=_601.offsetTop;if(_5fd.scrollWidth>_5fd.clientWidth){_602+=16;}if(this.lastHeight!=_602){if(_602==0){_602=16;}dojo.contentBox(this.iframe,{h:_602});this.lastHeight=_602;}_5fd.removeChild(_601);}dijit.form.Textarea.superclass.setValue.call(this,this.getValue(),_5fc);},getValue:function(){return this.formValueNode.value.replace(/\r/g,"");},postMixInProperties:function(){dijit.form.Textarea.superclass.postMixInProperties.apply(this,arguments);if(this.srcNodeRef&&this.srcNodeRef.innerHTML!=""){this.value=this.srcNodeRef.innerHTML;this.srcNodeRef.innerHTML="";}if((!this.value||this.value=="")&&this.srcNodeRef&&this.srcNodeRef.value){this.value=this.srcNodeRef.value;}if(!this.value){this.value="";}this.value=this.value.replace(/\r\n/g,"\n").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&");if(dojo.isMozilla){var _603=dojo.i18n.getLocalization("dijit","Textarea");this._iframeEditTitle=_603.iframeEditTitle;this._iframeFocusTitle=_603.iframeFocusTitle;var _604=dojo.query("label[for=\""+this.id+"\"]");if(_604.length){this._iframeEditTitle=_604[0].innerHTML+" "+this._iframeEditTitle;}var body=this.focusNode=this.editNode=document.createElement("BODY");body.style.margin="0px";body.style.padding="0px";body.style.border="0px";}},postCreate:function(){if(dojo.isIE||dojo.isSafari){this.domNode.style.overflowY="hidden";}else{if(dojo.isMozilla){var w=this.iframe.contentWindow;try{var _607=this.iframe.contentDocument.title;}catch(e){var _607="";}if(!w||!_607){this.iframe.postCreate=dojo.hitch(this,this.postCreate);return;}var d=w.document;d.getElementsByTagName("HTML")[0].replaceChild(this.editNode,d.getElementsByTagName("BODY")[0]);if(!this.isLeftToRight()){d.getElementsByTagName("HTML")[0].dir="rtl";}this.iframe.style.overflowY="hidden";this.eventNode=d;w.addEventListener("resize",dojo.hitch(this,this._changed),false);}else{this.focusNode=this.domNode;}}if(this.eventNode){this.connect(this.eventNode,"keypress",this._onKeyPress);this.connect(this.eventNode,"mousemove",this._changed);this.connect(this.eventNode,"focus",this._focused);this.connect(this.eventNode,"blur",this._blurred);}if(this.editNode){this.connect(this.editNode,"change",this._changed);}this.inherited("postCreate",arguments);},_focused:function(e){dojo.addClass(this.iframe||this.domNode,"dijitInputFieldFocused");this._changed(e);},_blurred:function(e){dojo.removeClass(this.iframe||this.domNode,"dijitInputFieldFocused");this._changed(e,true);},_onIframeBlur:function(){this.iframe.contentDocument.title=this._iframeEditTitle;},_onKeyPress:function(e){if(e.keyCode==dojo.keys.TAB&&!e.shiftKey&&!e.ctrlKey&&!e.altKey&&this.iframe){this.iframe.contentDocument.title=this._iframeFocusTitle;this.iframe.focus();dojo.stopEvent(e);}else{if(e.keyCode==dojo.keys.ENTER){e.stopPropagation();}else{if(this.inherited("_onKeyPress",arguments)&&this.iframe){var te=document.createEvent("KeyEvents");te.initKeyEvent("keypress",true,true,null,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.keyCode,e.charCode);this.iframe.dispatchEvent(te);}}}this._changing();},_changing:function(e){setTimeout(dojo.hitch(this,"_changed",e,false),1);},_changed:function(e,_60f){if(this.iframe&&this.iframe.contentDocument.designMode!="on"){this.iframe.contentDocument.designMode="on";}this.setValue(null,_60f);}});}if(!dojo._hasResource["dijit.layout.StackContainer"]){dojo._hasResource["dijit.layout.StackContainer"]=true;dojo.provide("dijit.layout.StackContainer");dojo.declare("dijit.layout.StackContainer",dijit.layout._LayoutWidget,{doLayout:true,_started:false,postCreate:function(){dijit.setWaiRole((this.containerNode||this.domNode),"tabpanel");this.connect(this.domNode,"onkeypress",this._onKeyPress);},startup:function(){if(this._started){return;}var _610=this.getChildren();dojo.forEach(_610,this._setupChild,this);dojo.some(_610,function(_611){if(_611.selected){this.selectedChildWidget=_611;}return _611.selected;},this);var _612=this.selectedChildWidget;if(!_612&&_610[0]){_612=this.selectedChildWidget=_610[0];_612.selected=true;}if(_612){this._showChild(_612);}dojo.publish(this.id+"-startup",[{children:_610,selected:_612}]);this.inherited("startup",arguments);this._started=true;},_setupChild:function(page){page.domNode.style.display="none";page.domNode.style.position="relative";return page;},addChild:function(_614,_615){dijit._Container.prototype.addChild.apply(this,arguments);_614=this._setupChild(_614);if(this._started){this.layout();dojo.publish(this.id+"-addChild",[_614,_615]);if(!this.selectedChildWidget){this.selectChild(_614);}}},removeChild:function(page){dijit._Container.prototype.removeChild.apply(this,arguments);if(this._beingDestroyed){return;}if(this._started){dojo.publish(this.id+"-removeChild",[page]);this.layout();}if(this.selectedChildWidget===page){this.selectedChildWidget=undefined;if(this._started){var _617=this.getChildren();if(_617.length){this.selectChild(_617[0]);}}}},selectChild:function(page){page=dijit.byId(page);if(this.selectedChildWidget!=page){this._transition(page,this.selectedChildWidget);this.selectedChildWidget=page;dojo.publish(this.id+"-selectChild",[page]);}},_transition:function(_619,_61a){if(_61a){this._hideChild(_61a);}this._showChild(_619);if(this.doLayout&&_619.resize){_619.resize(this._containerContentBox||this._contentBox);}},_adjacent:function(_61b){var _61c=this.getChildren();var _61d=dojo.indexOf(_61c,this.selectedChildWidget);_61d+=_61b?1:_61c.length-1;return _61c[_61d%_61c.length];},forward:function(){this.selectChild(this._adjacent(true));},back:function(){this.selectChild(this._adjacent(false));},_onKeyPress:function(e){dojo.publish(this.id+"-containerKeyPress",[{e:e,page:this}]);},layout:function(){if(this.doLayout&&this.selectedChildWidget&&this.selectedChildWidget.resize){this.selectedChildWidget.resize(this._contentBox);}},_showChild:function(page){var _620=this.getChildren();page.isFirstChild=(page==_620[0]);page.isLastChild=(page==_620[_620.length-1]);page.selected=true;page.domNode.style.display="";if(page._loadCheck){page._loadCheck();}if(page.onShow){page.onShow();}},_hideChild:function(page){page.selected=false;page.domNode.style.display="none";if(page.onHide){page.onHide();}},closeChild:function(page){var _623=page.onClose(this,page);if(_623){this.removeChild(page);page.destroy();}},destroy:function(){this._beingDestroyed=true;this.inherited("destroy",arguments);}});dojo.declare("dijit.layout.StackController",[dijit._Widget,dijit._Templated,dijit._Container],{templateString:"<span wairole='tablist' dojoAttachEvent='onkeypress' class='dijitStackController'></span>",containerId:"",buttonWidget:"dijit.layout._StackButton",postCreate:function(){dijit.setWaiRole(this.domNode,"tablist");this.pane2button={};this._subscriptions=[dojo.subscribe(this.containerId+"-startup",this,"onStartup"),dojo.subscribe(this.containerId+"-addChild",this,"onAddChild"),dojo.subscribe(this.containerId+"-removeChild",this,"onRemoveChild"),dojo.subscribe(this.containerId+"-selectChild",this,"onSelectChild"),dojo.subscribe(this.containerId+"-containerKeyPress",this,"onContainerKeyPress")];},onStartup:function(info){dojo.forEach(info.children,this.onAddChild,this);this.onSelectChild(info.selected);},destroy:function(){dojo.forEach(this._subscriptions,dojo.unsubscribe);this.inherited("destroy",arguments);},onAddChild:function(page,_626){var _627=document.createElement("span");this.domNode.appendChild(_627);var cls=dojo.getObject(this.buttonWidget);var _629=new cls({label:page.title,closeButton:page.closable},_627);this.addChild(_629,_626);this.pane2button[page]=_629;page.controlButton=_629;dojo.connect(_629,"onClick",dojo.hitch(this,"onButtonClick",page));dojo.connect(_629,"onClickCloseButton",dojo.hitch(this,"onCloseButtonClick",page));if(!this._currentChild){_629.focusNode.setAttribute("tabIndex","0");this._currentChild=page;}},onRemoveChild:function(page){if(this._currentChild===page){this._currentChild=null;}var _62b=this.pane2button[page];if(_62b){_62b.destroy();}this.pane2button[page]=null;},onSelectChild:function(page){if(!page){return;}if(this._currentChild){var _62d=this.pane2button[this._currentChild];_62d.setChecked(false);_62d.focusNode.setAttribute("tabIndex","-1");}var _62e=this.pane2button[page];_62e.setChecked(true);this._currentChild=page;_62e.focusNode.setAttribute("tabIndex","0");},onButtonClick:function(page){var _630=dijit.byId(this.containerId);_630.selectChild(page);},onCloseButtonClick:function(page){var _632=dijit.byId(this.containerId);_632.closeChild(page);var b=this.pane2button[this._currentChild];if(b){dijit.focus(b.focusNode||b.domNode);}},adjacent:function(_634){var _635=this.getChildren();var _636=dojo.indexOf(_635,this.pane2button[this._currentChild]);var _637=_634?1:_635.length-1;return _635[(_636+_637)%_635.length];},onkeypress:function(e){if(this.disabled||e.altKey){return;}var _639=true;if(e.ctrlKey||!e._djpage){var k=dojo.keys;switch(e.keyCode){case k.LEFT_ARROW:case k.UP_ARROW:case k.PAGE_UP:_639=false;case k.RIGHT_ARROW:case k.DOWN_ARROW:case k.PAGE_DOWN:this.adjacent(_639).onClick();dojo.stopEvent(e);break;case k.DELETE:if(this._currentChild.closable){this.onCloseButtonClick(this._currentChild);}dojo.stopEvent(e);break;default:if(e.ctrlKey){if(e.keyCode==k.TAB){this.adjacent(!e.shiftKey).onClick();dojo.stopEvent(e);}else{if(e.keyChar=="w"){if(this._currentChild.closable){this.onCloseButtonClick(this._currentChild);}dojo.stopEvent(e);}}}}}},onContainerKeyPress:function(info){info.e._djpage=info.page;this.onkeypress(info.e);}});dojo.declare("dijit.layout._StackButton",dijit.form.ToggleButton,{tabIndex:"-1",postCreate:function(evt){dijit.setWaiRole((this.focusNode||this.domNode),"tab");this.inherited("postCreate",arguments);},onClick:function(evt){dijit.focus(this.focusNode);},onClickCloseButton:function(evt){evt.stopPropagation();}});dojo.extend(dijit._Widget,{title:"",selected:false,closable:false,onClose:function(){return true;}});}if(!dojo._hasResource["dijit.layout.AccordionContainer"]){dojo._hasResource["dijit.layout.AccordionContainer"]=true;dojo.provide("dijit.layout.AccordionContainer");dojo.declare("dijit.layout.AccordionContainer",dijit.layout.StackContainer,{duration:250,_verticalSpace:0,postCreate:function(){this.domNode.style.overflow="hidden";this.inherited("postCreate",arguments);dijit.setWaiRole(this.domNode,"tablist");dojo.addClass(this.domNode,"dijitAccordionContainer");},startup:function(){if(this._started){return;}this.inherited("startup",arguments);if(this.selectedChildWidget){var _63f=this.selectedChildWidget.containerNode.style;_63f.display="";_63f.overflow="auto";this.selectedChildWidget._setSelectedState(true);}},layout:function(){var _640=0;var _641=this.selectedChildWidget;dojo.forEach(this.getChildren(),function(_642){_640+=_642.getTitleHeight();});var _643=this._contentBox;this._verticalSpace=(_643.h-_640);if(_641){_641.containerNode.style.height=this._verticalSpace+"px";}},_setupChild:function(page){return page;},_transition:function(_645,_646){if(this._inTransition){return;}this._inTransition=true;var _647=[];var _648=this._verticalSpace;if(_645){_645.setSelected(true);var _649=_645.containerNode;_649.style.display="";_647.push(dojo.animateProperty({node:_649,duration:this.duration,properties:{height:{start:"1",end:_648}},onEnd:function(){_649.style.overflow="auto";}}));}if(_646){_646.setSelected(false);var _64a=_646.containerNode;_64a.style.overflow="hidden";_647.push(dojo.animateProperty({node:_64a,duration:this.duration,properties:{height:{start:_648,end:"1"}},onEnd:function(){_64a.style.display="none";}}));}this._inTransition=false;dojo.fx.combine(_647).play();},_onKeyPress:function(e){if(this.disabled||e.altKey){return;}var k=dojo.keys;switch(e.keyCode){case k.LEFT_ARROW:case k.UP_ARROW:case k.PAGE_UP:this._adjacent(false)._onTitleClick();dojo.stopEvent(e);break;case k.RIGHT_ARROW:case k.DOWN_ARROW:case k.PAGE_DOWN:this._adjacent(true)._onTitleClick();dojo.stopEvent(e);break;default:if(e.ctrlKey&&e.keyCode==k.TAB){this._adjacent(e._dijitWidget,!e.shiftKey)._onTitleClick();dojo.stopEvent(e);}}}});dojo.declare("dijit.layout.AccordionPane",[dijit.layout.ContentPane,dijit._Templated,dijit._Contained],{templateString:"<div class='dijitAccordionPane'\n\t><div dojoAttachPoint='titleNode,focusNode' dojoAttachEvent='ondijitclick:_onTitleClick,onkeypress:_onTitleKeyPress,onfocus:_handleFocus,onblur:_handleFocus'\n\t\tclass='dijitAccordionTitle' wairole=\"tab\"\n\t\t><div class='dijitAccordionArrow'></div\n\t\t><div class='arrowTextUp' waiRole=\"presentation\">&#9650;</div\n\t\t><div class='arrowTextDown' waiRole=\"presentation\">&#9660;</div\n\t\t><div dojoAttachPoint='titleTextNode' class='dijitAccordionText'>${title}</div></div\n\t><div><div dojoAttachPoint='containerNode' style='overflow: hidden; height: 1px; display: none'\n\t\tclass='dijitAccordionBody' wairole=\"tabpanel\"\n\t></div></div>\n</div>\n",postCreate:function(){this.inherited("postCreate",arguments);dojo.setSelectable(this.titleNode,false);this.setSelected(this.selected);},getTitleHeight:function(){return dojo.marginBox(this.titleNode).h;},_onTitleClick:function(){var _64d=this.getParent();if(!_64d._inTransition){_64d.selectChild(this);dijit.focus(this.focusNode);}},_onTitleKeyPress:function(evt){evt._dijitWidget=this;return this.getParent()._onKeyPress(evt);},_setSelectedState:function(_64f){this.selected=_64f;dojo[(_64f?"addClass":"removeClass")](this.domNode,"dijitAccordionPane-selected");this.focusNode.setAttribute("tabIndex",_64f?"0":"-1");},_handleFocus:function(e){dojo[(e.type=="focus"?"addClass":"removeClass")](this.focusNode,"dijitAccordionPaneFocused");},setSelected:function(_651){this._setSelectedState(_651);if(_651){this.onSelected();}},onSelected:function(){}});}if(!dojo._hasResource["dijit.layout.LayoutContainer"]){dojo._hasResource["dijit.layout.LayoutContainer"]=true;dojo.provide("dijit.layout.LayoutContainer");dojo.declare("dijit.layout.LayoutContainer",dijit.layout._LayoutWidget,{layout:function(){dijit.layout.layoutChildren(this.domNode,this._contentBox,this.getChildren());},addChild:function(_652,_653){dijit._Container.prototype.addChild.apply(this,arguments);if(this._started){dijit.layout.layoutChildren(this.domNode,this._contentBox,this.getChildren());}},removeChild:function(_654){dijit._Container.prototype.removeChild.apply(this,arguments);if(this._started){dijit.layout.layoutChildren(this.domNode,this._contentBox,this.getChildren());}}});dojo.extend(dijit._Widget,{layoutAlign:"none"});}if(!dojo._hasResource["dijit.layout.LinkPane"]){dojo._hasResource["dijit.layout.LinkPane"]=true;dojo.provide("dijit.layout.LinkPane");dojo.declare("dijit.layout.LinkPane",[dijit.layout.ContentPane,dijit._Templated],{templateString:"<div class=\"dijitLinkPane\"></div>",postCreate:function(){if(this.srcNodeRef){this.title+=this.srcNodeRef.innerHTML;}this.inherited("postCreate",arguments);}});}if(!dojo._hasResource["dijit.layout.SplitContainer"]){dojo._hasResource["dijit.layout.SplitContainer"]=true;dojo.provide("dijit.layout.SplitContainer");dojo.declare("dijit.layout.SplitContainer",dijit.layout._LayoutWidget,{activeSizing:false,sizerWidth:7,orientation:"horizontal",persist:true,postMixInProperties:function(){this.inherited("postMixInProperties",arguments);this.isHorizontal=(this.orientation=="horizontal");},postCreate:function(){this.inherited("postCreate",arguments);this.sizers=[];dojo.addClass(this.domNode,"dijitSplitContainer");if(dojo.isMozilla){this.domNode.style.overflow="-moz-scrollbars-none";}if(typeof this.sizerWidth=="object"){try{this.sizerWidth=parseInt(this.sizerWidth.toString());}catch(e){this.sizerWidth=7;}}var _655=this.virtualSizer=document.createElement("div");_655.style.position="relative";_655.style.zIndex=10;_655.className=this.isHorizontal?"dijitSplitContainerVirtualSizerH":"dijitSplitContainerVirtualSizerV";this.domNode.appendChild(_655);dojo.setSelectable(_655,false);},startup:function(){if(this._started){return;}dojo.forEach(this.getChildren(),function(_656,i,_658){this._injectChild(_656);if(i<_658.length-1){this._addSizer();}},this);if(this.persist){this._restoreState();}this.inherited("startup",arguments);this._started=true;},_injectChild:function(_659){_659.domNode.style.position="absolute";dojo.addClass(_659.domNode,"dijitSplitPane");},_addSizer:function(){var i=this.sizers.length;var _65b=this.sizers[i]=document.createElement("div");_65b.className=this.isHorizontal?"dijitSplitContainerSizerH":"dijitSplitContainerSizerV";var _65c=document.createElement("div");_65c.className="thumb";_65b.appendChild(_65c);var self=this;var _65e=(function(){var _65f=i;return function(e){self.beginSizing(e,_65f);};})();dojo.connect(_65b,"onmousedown",_65e);this.domNode.appendChild(_65b);dojo.setSelectable(_65b,false);},removeChild:function(_661){if(this.sizers.length&&dojo.indexOf(this.getChildren(),_661)!=-1){var i=this.sizers.length-1;dojo._destroyElement(this.sizers[i]);this.sizers.length--;}this.inherited("removeChild",arguments);if(this._started){this.layout();}},addChild:function(_663,_664){this.inherited("addChild",arguments);if(this._started){this._injectChild(_663);var _665=this.getChildren();if(_665.length>1){this._addSizer();}this.layout();}},layout:function(){this.paneWidth=this._contentBox.w;this.paneHeight=this._contentBox.h;var _666=this.getChildren();if(!_666.length){return;}var _667=this.isHorizontal?this.paneWidth:this.paneHeight;if(_666.length>1){_667-=this.sizerWidth*(_666.length-1);}var _668=0;dojo.forEach(_666,function(_669){_668+=_669.sizeShare;});var _66a=_667/_668;var _66b=0;dojo.forEach(_666.slice(0,_666.length-1),function(_66c){var size=Math.round(_66a*_66c.sizeShare);_66c.sizeActual=size;_66b+=size;});_666[_666.length-1].sizeActual=_667-_66b;this._checkSizes();var pos=0;var size=_666[0].sizeActual;this._movePanel(_666[0],pos,size);_666[0].position=pos;pos+=size;if(!this.sizers){return;}dojo.some(_666.slice(1),function(_670,i){if(!this.sizers[i]){return true;}this._moveSlider(this.sizers[i],pos,this.sizerWidth);this.sizers[i].position=pos;pos+=this.sizerWidth;size=_670.sizeActual;this._movePanel(_670,pos,size);_670.position=pos;pos+=size;},this);},_movePanel:function(_672,pos,size){if(this.isHorizontal){_672.domNode.style.left=pos+"px";_672.domNode.style.top=0;var box={w:size,h:this.paneHeight};if(_672.resize){_672.resize(box);}else{dojo.marginBox(_672.domNode,box);}}else{_672.domNode.style.left=0;_672.domNode.style.top=pos+"px";var box={w:this.paneWidth,h:size};if(_672.resize){_672.resize(box);}else{dojo.marginBox(_672.domNode,box);}}},_moveSlider:function(_676,pos,size){if(this.isHorizontal){_676.style.left=pos+"px";_676.style.top=0;dojo.marginBox(_676,{w:size,h:this.paneHeight});}else{_676.style.left=0;_676.style.top=pos+"px";dojo.marginBox(_676,{w:this.paneWidth,h:size});}},_growPane:function(_679,pane){if(_679>0){if(pane.sizeActual>pane.sizeMin){if((pane.sizeActual-pane.sizeMin)>_679){pane.sizeActual=pane.sizeActual-_679;_679=0;}else{_679-=pane.sizeActual-pane.sizeMin;pane.sizeActual=pane.sizeMin;}}}return _679;},_checkSizes:function(){var _67b=0;var _67c=0;var _67d=this.getChildren();dojo.forEach(_67d,function(_67e){_67c+=_67e.sizeActual;_67b+=_67e.sizeMin;});if(_67b<=_67c){var _67f=0;dojo.forEach(_67d,function(_680){if(_680.sizeActual<_680.sizeMin){_67f+=_680.sizeMin-_680.sizeActual;_680.sizeActual=_680.sizeMin;}});if(_67f>0){var list=this.isDraggingLeft?_67d.reverse():_67d;dojo.forEach(list,function(_682){_67f=this._growPane(_67f,_682);},this);}}else{dojo.forEach(_67d,function(_683){_683.sizeActual=Math.round(_67c*(_683.sizeMin/_67b));});}},beginSizing:function(e,i){var _686=this.getChildren();this.paneBefore=_686[i];this.paneAfter=_686[i+1];this.isSizing=true;this.sizingSplitter=this.sizers[i];if(!this.cover){this.cover=dojo.doc.createElement("div");this.domNode.appendChild(this.cover);var s=this.cover.style;s.position="absolute";s.zIndex=1;s.top=0;s.left=0;s.width="100%";s.height="100%";}else{this.cover.style.zIndex=1;}this.sizingSplitter.style.zIndex=2;this.originPos=dojo.coords(_686[0].domNode,true);if(this.isHorizontal){var _688=(e.layerX?e.layerX:e.offsetX);var _689=e.pageX;this.originPos=this.originPos.x;}else{var _688=(e.layerY?e.layerY:e.offsetY);var _689=e.pageY;this.originPos=this.originPos.y;}this.startPoint=this.lastPoint=_689;this.screenToClientOffset=_689-_688;this.dragOffset=this.lastPoint-this.paneBefore.sizeActual-this.originPos-this.paneBefore.position;if(!this.activeSizing){this._showSizingLine();}this._connects=[];this._connects.push(dojo.connect(document.documentElement,"onmousemove",this,"changeSizing"));this._connects.push(dojo.connect(document.documentElement,"onmouseup",this,"endSizing"));dojo.stopEvent(e);},changeSizing:function(e){if(!this.isSizing){return;}this.lastPoint=this.isHorizontal?e.pageX:e.pageY;this.movePoint();if(this.activeSizing){this._updateSize();}else{this._moveSizingLine();}dojo.stopEvent(e);},endSizing:function(e){if(!this.isSizing){return;}if(this.cover){this.cover.style.zIndex=-1;}if(!this.activeSizing){this._hideSizingLine();}this._updateSize();this.isSizing=false;if(this.persist){this._saveState(this);}dojo.forEach(this._connects,dojo.disconnect);},movePoint:function(){var p=this.lastPoint-this.screenToClientOffset;var a=p-this.dragOffset;a=this.legaliseSplitPoint(a);p=a+this.dragOffset;this.lastPoint=p+this.screenToClientOffset;},legaliseSplitPoint:function(a){a+=this.sizingSplitter.position;this.isDraggingLeft=!!(a>0);if(!this.activeSizing){var min=this.paneBefore.position+this.paneBefore.sizeMin;if(a<min){a=min;}var max=this.paneAfter.position+(this.paneAfter.sizeActual-(this.sizerWidth+this.paneAfter.sizeMin));if(a>max){a=max;}}a-=this.sizingSplitter.position;this._checkSizes();return a;},_updateSize:function(){var pos=this.lastPoint-this.dragOffset-this.originPos;var _692=this.paneBefore.position;var _693=this.paneAfter.position+this.paneAfter.sizeActual;this.paneBefore.sizeActual=pos-_692;this.paneAfter.position=pos+this.sizerWidth;this.paneAfter.sizeActual=_693-this.paneAfter.position;dojo.forEach(this.getChildren(),function(_694){_694.sizeShare=_694.sizeActual;});if(this._started){this.layout();}},_showSizingLine:function(){this._moveSizingLine();dojo.marginBox(this.virtualSizer,this.isHorizontal?{w:this.sizerWidth,h:this.paneHeight}:{w:this.paneWidth,h:this.sizerWidth});this.virtualSizer.style.display="block";},_hideSizingLine:function(){this.virtualSizer.style.display="none";},_moveSizingLine:function(){var pos=(this.lastPoint-this.startPoint)+this.sizingSplitter.position;dojo.style(this.virtualSizer,(this.isHorizontal?"left":"top"),pos+"px");},_getCookieName:function(i){return this.id+"_"+i;},_restoreState:function(){dojo.forEach(this.getChildren(),function(_697,i){var _699=this._getCookieName(i);var _69a=dojo.cookie(_699);if(_69a){var pos=parseInt(_69a);if(typeof pos=="number"){_697.sizeShare=pos;}}},this);},_saveState:function(){dojo.forEach(this.getChildren(),function(_69c,i){dojo.cookie(this._getCookieName(i),_69c.sizeShare);},this);}});dojo.extend(dijit._Widget,{sizeMin:10,sizeShare:10});}if(!dojo._hasResource["dijit.layout.TabContainer"]){dojo._hasResource["dijit.layout.TabContainer"]=true;dojo.provide("dijit.layout.TabContainer");dojo.declare("dijit.layout.TabContainer",[dijit.layout.StackContainer,dijit._Templated],{tabPosition:"top",templateString:null,templateString:"<div class=\"dijitTabContainer\">\n\t<div dojoAttachPoint=\"tablistNode\"></div>\n\t<div class=\"dijitTabPaneWrapper\" dojoAttachPoint=\"containerNode\"></div>\n</div>\n",postCreate:function(){dijit.layout.TabContainer.superclass.postCreate.apply(this,arguments);this.tablist=new dijit.layout.TabController({id:this.id+"_tablist",tabPosition:this.tabPosition,doLayout:this.doLayout,containerId:this.id},this.tablistNode);},_setupChild:function(tab){dojo.addClass(tab.domNode,"dijitTabPane");this.inherited("_setupChild",arguments);return tab;},startup:function(){if(this._started){return;}this.tablist.startup();this.inherited("startup",arguments);if(dojo.isSafari){setTimeout(dojo.hitch(this,"layout"),0);}},layout:function(){if(!this.doLayout){return;}var _69f=this.tabPosition.replace(/-h/,"");var _6a0=[{domNode:this.tablist.domNode,layoutAlign:_69f},{domNode:this.containerNode,layoutAlign:"client"}];dijit.layout.layoutChildren(this.domNode,this._contentBox,_6a0);this._containerContentBox=dijit.layout.marginBox2contentBox(this.containerNode,_6a0[1]);if(this.selectedChildWidget){this._showChild(this.selectedChildWidget);if(this.doLayout&&this.selectedChildWidget.resize){this.selectedChildWidget.resize(this._containerContentBox);}}},destroy:function(){this.tablist.destroy();this.inherited("destroy",arguments);}});dojo.declare("dijit.layout.TabController",dijit.layout.StackController,{templateString:"<div wairole='tablist' dojoAttachEvent='onkeypress:onkeypress'></div>",tabPosition:"top",doLayout:true,buttonWidget:"dijit.layout._TabButton",postMixInProperties:function(){this["class"]="dijitTabLabels-"+this.tabPosition+(this.doLayout?"":" dijitTabNoLayout");this.inherited("postMixInProperties",arguments);}});dojo.declare("dijit.layout._TabButton",dijit.layout._StackButton,{baseClass:"dijitTab",templateString:"<div dojoAttachEvent='onclick:onClick,onmouseenter:_onMouse,onmouseleave:_onMouse'>\n <div class='dijitTabInnerDiv' dojoAttachPoint='innerDiv'>\n <span dojoAttachPoint='containerNode,focusNode'>${!label}</span>\n <span dojoAttachPoint='closeButtonNode' class='closeImage' dojoAttachEvent='onmouseenter:_onMouse, onmouseleave:_onMouse, onclick:onClickCloseButton' stateModifier='CloseButton'>\n <span dojoAttachPoint='closeText' class='closeText'>x</span>\n </span>\n </div>\n</div>\n",postCreate:function(){if(this.closeButton){dojo.addClass(this.innerDiv,"dijitClosable");}else{this.closeButtonNode.style.display="none";}this.inherited("postCreate",arguments);dojo.setSelectable(this.containerNode,false);}});}if(!dojo._hasResource["dijit.dijit-all"]){dojo._hasResource["dijit.dijit-all"]=true;console.warn("dijit-all may include much more code than your application actually requires. We strongly recommend that you investigate a custom build or the web build tool");dojo.provide("dijit.dijit-all");}dojo.i18n._preloadLocalizations("dijit.nls.dijit-all",["es-es","es","hu","it-it","de","pt-br","pl","fr-fr","zh-cn","pt","en-us","zh","ru","xx","fr","zh-tw","it","cs","en-gb","de-de","ja-jp","ko-kr","ko","en","ROOT","ja"]);
+if(!dojo._hasResource["dojo.colors"]){dojo._hasResource["dojo.colors"]=true;dojo.provide("dojo.colors");(function(){var _1=function(m1,m2,h){if(h<0){++h;}if(h>1){--h;}var h6=6*h;if(h6<1){return m1+(m2-m1)*h6;}if(2*h<1){return m2;}if(3*h<2){return m1+(m2-m1)*(2/3-h)*6;}return m1;};dojo.colorFromRgb=function(_2,_3){var m=_2.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(m){var c=m[2].split(/\s*,\s*/),l=c.length,t=m[1],a;if((t=="rgb"&&l==3)||(t=="rgba"&&l==4)){var r=c[0];if(r.charAt(r.length-1)=="%"){a=dojo.map(c,function(x){return parseFloat(x)*2.56;});if(l==4){a[3]=c[3];}return dojo.colorFromArray(a,_3);}return dojo.colorFromArray(c,_3);}if((t=="hsl"&&l==3)||(t=="hsla"&&l==4)){var H=((parseFloat(c[0])%360)+360)%360/360,S=parseFloat(c[1])/100,L=parseFloat(c[2])/100,m2=L<=0.5?L*(S+1):L+S-L*S,m1=2*L-m2;a=[_1(m1,m2,H+1/3)*256,_1(m1,m2,H)*256,_1(m1,m2,H-1/3)*256,1];if(l==4){a[3]=c[3];}return dojo.colorFromArray(a,_3);}}return null;};var _4=function(c,_5,_6){c=Number(c);return isNaN(c)?_6:c<_5?_5:c>_6?_6:c;};dojo.Color.prototype.sanitize=function(){var t=this;t.r=Math.round(_4(t.r,0,255));t.g=Math.round(_4(t.g,0,255));t.b=Math.round(_4(t.b,0,255));t.a=_4(t.a,0,1);return this;};})();dojo.colors.makeGrey=function(g,a){return dojo.colorFromArray([g,g,g,a]);};dojo.mixin(dojo.Color.named,{aliceblue:[240,248,255],antiquewhite:[250,235,215],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],blanchedalmond:[255,235,205],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],oldlace:[253,245,230],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],thistle:[216,191,216],tomato:[255,99,71],transparent:[0,0,0,0],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],whitesmoke:[245,245,245],yellowgreen:[154,205,50]});}if(!dojo._hasResource["dojo.i18n"]){dojo._hasResource["dojo.i18n"]=true;dojo.provide("dojo.i18n");dojo.i18n.getLocalization=function(_7,_8,_9){_9=dojo.i18n.normalizeLocale(_9);var _a=_9.split("-");var _b=[_7,"nls",_8].join(".");var _c=dojo._loadedModules[_b];if(_c){var _d;for(var i=_a.length;i>0;i--){var _e=_a.slice(0,i).join("_");if(_c[_e]){_d=_c[_e];break;}}if(!_d){_d=_c.ROOT;}if(_d){var _f=function(){};_f.prototype=_d;return new _f();}}throw new Error("Bundle not found: "+_8+" in "+_7+" , locale="+_9);};dojo.i18n.normalizeLocale=function(_10){var _11=_10?_10.toLowerCase():dojo.locale;if(_11=="root"){_11="ROOT";}return _11;};dojo.i18n._requireLocalization=function(_12,_13,_14,_15){var _16=dojo.i18n.normalizeLocale(_14);var _17=[_12,"nls",_13].join(".");var _18="";if(_15){var _19=_15.split(",");for(var i=0;i<_19.length;i++){if(_16["indexOf"](_19[i])==0){if(_19[i].length>_18.length){_18=_19[i];}}}if(!_18){_18="ROOT";}}var _1a=_15?_18:_16;var _1b=dojo._loadedModules[_17];var _1c=null;if(_1b){if(dojo.config.localizationComplete&&_1b._built){return;}var _1d=_1a.replace(/-/g,"_");var _1e=_17+"."+_1d;_1c=dojo._loadedModules[_1e];}if(!_1c){_1b=dojo["provide"](_17);var _1f=dojo._getModuleSymbols(_12);var _20=_1f.concat("nls").join("/");var _21;dojo.i18n._searchLocalePath(_1a,_15,function(loc){var _22=loc.replace(/-/g,"_");var _23=_17+"."+_22;var _24=false;if(!dojo._loadedModules[_23]){dojo["provide"](_23);var _25=[_20];if(loc!="ROOT"){_25.push(loc);}_25.push(_13);var _26=_25.join("/")+".js";_24=dojo._loadPath(_26,null,function(_27){var _28=function(){};_28.prototype=_21;_1b[_22]=new _28();for(var j in _27){_1b[_22][j]=_27[j];}});}else{_24=true;}if(_24&&_1b[_22]){_21=_1b[_22];}else{_1b[_22]=_21;}if(_15){return true;}});}if(_15&&_16!=_18){_1b[_16.replace(/-/g,"_")]=_1b[_18.replace(/-/g,"_")];}};(function(){var _29=dojo.config.extraLocale;if(_29){if(!_29 instanceof Array){_29=[_29];}var req=dojo.i18n._requireLocalization;dojo.i18n._requireLocalization=function(m,b,_2a,_2b){req(m,b,_2a,_2b);if(_2a){return;}for(var i=0;i<_29.length;i++){req(m,b,_29[i],_2b);}};}})();dojo.i18n._searchLocalePath=function(_2c,_2d,_2e){_2c=dojo.i18n.normalizeLocale(_2c);var _2f=_2c.split("-");var _30=[];for(var i=_2f.length;i>0;i--){_30.push(_2f.slice(0,i).join("-"));}_30.push(false);if(_2d){_30.reverse();}for(var j=_30.length-1;j>=0;j--){var loc=_30[j]||"ROOT";var _31=_2e(loc);if(_31){break;}}};dojo.i18n._preloadLocalizations=function(_32,_33){function _34(_35){_35=dojo.i18n.normalizeLocale(_35);dojo.i18n._searchLocalePath(_35,true,function(loc){for(var i=0;i<_33.length;i++){if(_33[i]==loc){dojo["require"](_32+"_"+loc);return true;}}return false;});};_34();var _36=dojo.config.extraLocale||[];for(var i=0;i<_36.length;i++){_34(_36[i]);}};}if(!dojo._hasResource["dijit.ColorPalette"]){dojo._hasResource["dijit.ColorPalette"]=true;dojo.provide("dijit.ColorPalette");dojo.declare("dijit.ColorPalette",[dijit._Widget,dijit._Templated],{defaultTimeout:500,timeoutChangeRate:0.9,palette:"7x10",value:null,_currentFocus:0,_xDim:null,_yDim:null,_palettes:{"7x10":[["white","seashell","cornsilk","lemonchiffon","lightyellow","palegreen","paleturquoise","lightcyan","lavender","plum"],["lightgray","pink","bisque","moccasin","khaki","lightgreen","lightseagreen","lightskyblue","cornflowerblue","violet"],["silver","lightcoral","sandybrown","orange","palegoldenrod","chartreuse","mediumturquoise","skyblue","mediumslateblue","orchid"],["gray","red","orangered","darkorange","yellow","limegreen","darkseagreen","royalblue","slateblue","mediumorchid"],["dimgray","crimson","chocolate","coral","gold","forestgreen","seagreen","blue","blueviolet","darkorchid"],["darkslategray","firebrick","saddlebrown","sienna","olive","green","darkcyan","mediumblue","darkslateblue","darkmagenta"],["black","darkred","maroon","brown","darkolivegreen","darkgreen","midnightblue","navy","indigo","purple"]],"3x4":[["white","lime","green","blue"],["silver","yellow","fuchsia","navy"],["gray","red","purple","black"]]},_imagePaths:{"7x10":dojo.moduleUrl("dijit.themes","a11y/colors7x10.png"),"3x4":dojo.moduleUrl("dijit.themes","a11y/colors3x4.png")},_paletteCoords:{"leftOffset":3,"topOffset":3,"cWidth":20,"cHeight":20},templateString:dojo.cache("dijit","templates/ColorPalette.html","<div class=\"dijitInline dijitColorPalette\">\n\t<div class=\"dijitColorPaletteInner\" dojoAttachPoint=\"divNode\" waiRole=\"grid\"\">\n\t\t<img class=\"dijitColorPaletteUnder\" dojoAttachPoint=\"imageNode\" waiRole=\"presentation\" alt=\"\">\n\t</div>\n</div>\n"),_paletteDims:{"7x10":{"width":"206px","height":"145px"},"3x4":{"width":"86px","height":"64px"}},tabIndex:"0",buildRendering:function(){this.inherited(arguments);dojo.mixin(this.divNode.style,this._paletteDims[this.palette]);this.imageNode.setAttribute("src",this._imagePaths[this.palette].toString());var _37=this._palettes[this.palette];this.domNode.style.position="relative";this._cellNodes=[];this.colorNames=dojo.i18n.getLocalization("dojo","colors",this.lang);var url=this._blankGif,_38=new dojo.Color(),_39=this._paletteCoords;for(var row=0;row<_37.length;row++){var _3a=dojo.create("div",{role:"row"},this.divNode);for(var col=0;col<_37[row].length;col++){var _3b=_37[row][col],_3c=_38.setColor(dojo.Color.named[_3b]);var _3d=dojo.create("span",{"class":"dijitPaletteCell",tabIndex:"-1",title:this.colorNames[_3b],style:{top:_39.topOffset+(row*_39.cHeight)+"px",left:_39.leftOffset+(col*_39.cWidth)+"px"}});var _3e=dojo.create("img",{src:url,"class":"dijitPaletteImg",alt:this.colorNames[_3b]},_3d);_3e.color=_3c.toHex();var _3f=_3e.style;_3f.color=_3f.backgroundColor=_3e.color;dojo.forEach(["Dijitclick","MouseEnter","MouseLeave","Focus"],function(_40){this.connect(_3d,"on"+_40.toLowerCase(),"_onCell"+_40);},this);dojo.place(_3d,_3a);dijit.setWaiRole(_3d,"gridcell");_3d.index=this._cellNodes.length;this._cellNodes.push(_3d);}}this._xDim=_37[0].length;this._yDim=_37.length;var _41={UP_ARROW:-this._xDim,DOWN_ARROW:this._xDim,RIGHT_ARROW:1,LEFT_ARROW:-1};for(var key in _41){this._connects.push(dijit.typematic.addKeyListener(this.domNode,{charOrCode:dojo.keys[key],ctrlKey:false,altKey:false,shiftKey:false},this,function(){var _42=_41[key];return function(_43){this._navigateByKey(_42,_43);};}(),this.timeoutChangeRate,this.defaultTimeout));}},postCreate:function(){this.inherited(arguments);this._currentFocus=this._cellNodes[0];dojo.attr(this._currentFocus,"tabIndex",this.tabIndex);},focus:function(){dojo.addClass(this._currentFocus,"dijitPaletteCellHighlight");dijit.focus(this._currentFocus);},onChange:function(_44){},_onFocus:function(){dojo.addClass(this._currentFocus,"dijitPaletteCellHighlight");this.inherited(arguments);},_onBlur:function(){dojo.attr(this._currentFocus,"tabIndex","-1");dojo.removeClass(this._currentFocus,"dijitPaletteCellHighlight");this._currentFocus=this._cellNodes[0];dojo.attr(this._currentFocus,"tabIndex",this.tabIndex);this.inherited(arguments);},_onCellDijitclick:function(evt){var _45=evt.currentTarget;this._selectColor(_45);dojo.stopEvent(evt);},_onCellMouseEnter:function(evt){var _46=evt.currentTarget;this._setCurrent(_46);},_onCellMouseLeave:function(evt){dojo.removeClass(this._currentFocus,"dijitPaletteCellHighlight");},_onCellFocus:function(evt){this._setCurrent(evt.currentTarget);},_setCurrent:function(_47){if("_currentFocus" in this){dojo.attr(this._currentFocus,"tabIndex","-1");dojo.removeClass(this._currentFocus,"dijitPaletteCellHighlight");}this._currentFocus=_47;if(_47){dojo.attr(_47,"tabIndex",this.tabIndex);dojo.addClass(_47,"dijitPaletteCellHighlight");}},_selectColor:function(_48){var img=_48.getElementsByTagName("img")[0];this.onChange(this.value=img.color);},_navigateByKey:function(_49,_4a){if(_4a==-1){return;}var _4b=this._currentFocus.index+_49;if(_4b<this._cellNodes.length&&_4b>-1){var _4c=this._cellNodes[_4b];this._setCurrent(_4c);setTimeout(dojo.hitch(dijit,"focus",_4c),0);}}});}if(!dojo._hasResource["dijit.Declaration"]){dojo._hasResource["dijit.Declaration"]=true;dojo.provide("dijit.Declaration");dojo.declare("dijit.Declaration",dijit._Widget,{_noScript:true,widgetClass:"",defaults:null,mixins:[],buildRendering:function(){var src=this.srcNodeRef.parentNode.removeChild(this.srcNodeRef),_4d=dojo.query("> script[type^='dojo/method'][event]",src).orphan(),_4e=dojo.query("> script[type^='dojo/method']",src).orphan(),_4f=dojo.query("> script[type^='dojo/connect']",src).orphan(),_50=src.nodeName;var _51=this.defaults||{};dojo.forEach(_4d,function(s){var evt=s.getAttribute("event"),_52=dojo.parser._functionFromScript(s);_51[evt]=_52;});this.mixins=this.mixins.length?dojo.map(this.mixins,function(_53){return dojo.getObject(_53);}):[dijit._Widget,dijit._Templated];_51.widgetsInTemplate=true;_51._skipNodeCache=true;_51.templateString="<"+_50+" class='"+src.className+"' dojoAttachPoint='"+(src.getAttribute("dojoAttachPoint")||"")+"' dojoAttachEvent='"+(src.getAttribute("dojoAttachEvent")||"")+"' >"+src.innerHTML.replace(/\%7B/g,"{").replace(/\%7D/g,"}")+"</"+_50+">";dojo.query("[dojoType]",src).forEach(function(_54){_54.removeAttribute("dojoType");});var wc=dojo.declare(this.widgetClass,this.mixins,_51);var _55=_4f.concat(_4e);dojo.forEach(_55,function(s){var evt=s.getAttribute("event")||"postscript",_56=dojo.parser._functionFromScript(s);dojo.connect(wc.prototype,evt,_56);});}});}if(!dojo._hasResource["dojo.dnd.common"]){dojo._hasResource["dojo.dnd.common"]=true;dojo.provide("dojo.dnd.common");dojo.dnd.getCopyKeyState=dojo.isCopyKeyPressed;dojo.dnd._uniqueId=0;dojo.dnd.getUniqueId=function(){var id;do{id=dojo._scopeName+"Unique"+(++dojo.dnd._uniqueId);}while(dojo.byId(id));return id;};dojo.dnd._empty={};dojo.dnd.isFormElement=function(e){var t=e.target;if(t.nodeType==3){t=t.parentNode;}return " button textarea input select option ".indexOf(" "+t.tagName.toLowerCase()+" ")>=0;};}if(!dojo._hasResource["dojo.dnd.autoscroll"]){dojo._hasResource["dojo.dnd.autoscroll"]=true;dojo.provide("dojo.dnd.autoscroll");dojo.dnd.getViewport=function(){var d=dojo.doc,dd=d.documentElement,w=window,b=dojo.body();if(dojo.isMozilla){return {w:dd.clientWidth,h:w.innerHeight};}else{if(!dojo.isOpera&&w.innerWidth){return {w:w.innerWidth,h:w.innerHeight};}else{if(!dojo.isOpera&&dd&&dd.clientWidth){return {w:dd.clientWidth,h:dd.clientHeight};}else{if(b.clientWidth){return {w:b.clientWidth,h:b.clientHeight};}}}}return null;};dojo.dnd.V_TRIGGER_AUTOSCROLL=32;dojo.dnd.H_TRIGGER_AUTOSCROLL=32;dojo.dnd.V_AUTOSCROLL_VALUE=16;dojo.dnd.H_AUTOSCROLL_VALUE=16;dojo.dnd.autoScroll=function(e){var v=dojo.dnd.getViewport(),dx=0,dy=0;if(e.clientX<dojo.dnd.H_TRIGGER_AUTOSCROLL){dx=-dojo.dnd.H_AUTOSCROLL_VALUE;}else{if(e.clientX>v.w-dojo.dnd.H_TRIGGER_AUTOSCROLL){dx=dojo.dnd.H_AUTOSCROLL_VALUE;}}if(e.clientY<dojo.dnd.V_TRIGGER_AUTOSCROLL){dy=-dojo.dnd.V_AUTOSCROLL_VALUE;}else{if(e.clientY>v.h-dojo.dnd.V_TRIGGER_AUTOSCROLL){dy=dojo.dnd.V_AUTOSCROLL_VALUE;}}window.scrollBy(dx,dy);};dojo.dnd._validNodes={"div":1,"p":1,"td":1};dojo.dnd._validOverflow={"auto":1,"scroll":1};dojo.dnd.autoScrollNodes=function(e){for(var n=e.target;n;){if(n.nodeType==1&&(n.tagName.toLowerCase() in dojo.dnd._validNodes)){var s=dojo.getComputedStyle(n);if(s.overflow.toLowerCase() in dojo.dnd._validOverflow){var b=dojo._getContentBox(n,s),t=dojo.position(n,true);var w=Math.min(dojo.dnd.H_TRIGGER_AUTOSCROLL,b.w/2),h=Math.min(dojo.dnd.V_TRIGGER_AUTOSCROLL,b.h/2),rx=e.pageX-t.x,ry=e.pageY-t.y,dx=0,dy=0;if(dojo.isWebKit||dojo.isOpera){rx+=dojo.body().scrollLeft,ry+=dojo.body().scrollTop;}if(rx>0&&rx<b.w){if(rx<w){dx=-w;}else{if(rx>b.w-w){dx=w;}}}if(ry>0&&ry<b.h){if(ry<h){dy=-h;}else{if(ry>b.h-h){dy=h;}}}var _57=n.scrollLeft,_58=n.scrollTop;n.scrollLeft=n.scrollLeft+dx;n.scrollTop=n.scrollTop+dy;if(_57!=n.scrollLeft||_58!=n.scrollTop){return;}}}try{n=n.parentNode;}catch(x){n=null;}}dojo.dnd.autoScroll(e);};}if(!dojo._hasResource["dojo.dnd.Mover"]){dojo._hasResource["dojo.dnd.Mover"]=true;dojo.provide("dojo.dnd.Mover");dojo.declare("dojo.dnd.Mover",null,{constructor:function(_59,e,_5a){this.node=dojo.byId(_59);this.marginBox={l:e.pageX,t:e.pageY};this.mouseButton=e.button;var h=this.host=_5a,d=_59.ownerDocument,_5b=dojo.connect(d,"onmousemove",this,"onFirstMove");this.events=[dojo.connect(d,"onmousemove",this,"onMouseMove"),dojo.connect(d,"onmouseup",this,"onMouseUp"),dojo.connect(d,"ondragstart",dojo.stopEvent),dojo.connect(d.body,"onselectstart",dojo.stopEvent),_5b];if(h&&h.onMoveStart){h.onMoveStart(this);}},onMouseMove:function(e){dojo.dnd.autoScroll(e);var m=this.marginBox;this.host.onMove(this,{l:m.l+e.pageX,t:m.t+e.pageY});dojo.stopEvent(e);},onMouseUp:function(e){if(dojo.isWebKit&&dojo.isMac&&this.mouseButton==2?e.button==0:this.mouseButton==e.button){this.destroy();}dojo.stopEvent(e);},onFirstMove:function(){var s=this.node.style,l,t,h=this.host;switch(s.position){case "relative":case "absolute":l=Math.round(parseFloat(s.left));t=Math.round(parseFloat(s.top));break;default:s.position="absolute";var m=dojo.marginBox(this.node);var b=dojo.doc.body;var bs=dojo.getComputedStyle(b);var bm=dojo._getMarginBox(b,bs);var bc=dojo._getContentBox(b,bs);l=m.l-(bc.l-bm.l);t=m.t-(bc.t-bm.t);break;}this.marginBox.l=l-this.marginBox.l;this.marginBox.t=t-this.marginBox.t;if(h&&h.onFirstMove){h.onFirstMove(this);}dojo.disconnect(this.events.pop());},destroy:function(){dojo.forEach(this.events,dojo.disconnect);var h=this.host;if(h&&h.onMoveStop){h.onMoveStop(this);}this.events=this.node=this.host=null;}});}if(!dojo._hasResource["dojo.dnd.Moveable"]){dojo._hasResource["dojo.dnd.Moveable"]=true;dojo.provide("dojo.dnd.Moveable");dojo.declare("dojo.dnd.Moveable",null,{handle:"",delay:0,skip:false,constructor:function(_5c,_5d){this.node=dojo.byId(_5c);if(!_5d){_5d={};}this.handle=_5d.handle?dojo.byId(_5d.handle):null;if(!this.handle){this.handle=this.node;}this.delay=_5d.delay>0?_5d.delay:0;this.skip=_5d.skip;this.mover=_5d.mover?_5d.mover:dojo.dnd.Mover;this.events=[dojo.connect(this.handle,"onmousedown",this,"onMouseDown"),dojo.connect(this.handle,"ondragstart",this,"onSelectStart"),dojo.connect(this.handle,"onselectstart",this,"onSelectStart")];},markupFactory:function(_5e,_5f){return new dojo.dnd.Moveable(_5f,_5e);},destroy:function(){dojo.forEach(this.events,dojo.disconnect);this.events=this.node=this.handle=null;},onMouseDown:function(e){if(this.skip&&dojo.dnd.isFormElement(e)){return;}if(this.delay){this.events.push(dojo.connect(this.handle,"onmousemove",this,"onMouseMove"),dojo.connect(this.handle,"onmouseup",this,"onMouseUp"));this._lastX=e.pageX;this._lastY=e.pageY;}else{this.onDragDetected(e);}dojo.stopEvent(e);},onMouseMove:function(e){if(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay){this.onMouseUp(e);this.onDragDetected(e);}dojo.stopEvent(e);},onMouseUp:function(e){for(var i=0;i<2;++i){dojo.disconnect(this.events.pop());}dojo.stopEvent(e);},onSelectStart:function(e){if(!this.skip||!dojo.dnd.isFormElement(e)){dojo.stopEvent(e);}},onDragDetected:function(e){new this.mover(this.node,e,this);},onMoveStart:function(_60){dojo.publish("/dnd/move/start",[_60]);dojo.addClass(dojo.body(),"dojoMove");dojo.addClass(this.node,"dojoMoveItem");},onMoveStop:function(_61){dojo.publish("/dnd/move/stop",[_61]);dojo.removeClass(dojo.body(),"dojoMove");dojo.removeClass(this.node,"dojoMoveItem");},onFirstMove:function(_62){},onMove:function(_63,_64){this.onMoving(_63,_64);var s=_63.node.style;s.left=_64.l+"px";s.top=_64.t+"px";this.onMoved(_63,_64);},onMoving:function(_65,_66){},onMoved:function(_67,_68){}});}if(!dojo._hasResource["dojo.dnd.move"]){dojo._hasResource["dojo.dnd.move"]=true;dojo.provide("dojo.dnd.move");dojo.declare("dojo.dnd.move.constrainedMoveable",dojo.dnd.Moveable,{constraints:function(){},within:false,markupFactory:function(_69,_6a){return new dojo.dnd.move.constrainedMoveable(_6a,_69);},constructor:function(_6b,_6c){if(!_6c){_6c={};}this.constraints=_6c.constraints;this.within=_6c.within;},onFirstMove:function(_6d){var c=this.constraintBox=this.constraints.call(this,_6d);c.r=c.l+c.w;c.b=c.t+c.h;if(this.within){var mb=dojo.marginBox(_6d.node);c.r-=mb.w;c.b-=mb.h;}},onMove:function(_6e,_6f){var c=this.constraintBox,s=_6e.node.style;s.left=(_6f.l<c.l?c.l:c.r<_6f.l?c.r:_6f.l)+"px";s.top=(_6f.t<c.t?c.t:c.b<_6f.t?c.b:_6f.t)+"px";}});dojo.declare("dojo.dnd.move.boxConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{box:{},markupFactory:function(_70,_71){return new dojo.dnd.move.boxConstrainedMoveable(_71,_70);},constructor:function(_72,_73){var box=_73&&_73.box;this.constraints=function(){return box;};}});dojo.declare("dojo.dnd.move.parentConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(_74,_75){return new dojo.dnd.move.parentConstrainedMoveable(_75,_74);},constructor:function(_76,_77){var _78=_77&&_77.area;this.constraints=function(){var n=this.node.parentNode,s=dojo.getComputedStyle(n),mb=dojo._getMarginBox(n,s);if(_78=="margin"){return mb;}var t=dojo._getMarginExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(_78=="border"){return mb;}t=dojo._getBorderExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(_78=="padding"){return mb;}t=dojo._getPadExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;return mb;};}});dojo.dnd.move.constrainedMover=function(fun,_79){dojo.deprecated("dojo.dnd.move.constrainedMover, use dojo.dnd.move.constrainedMoveable instead");var _7a=function(_7b,e,_7c){dojo.dnd.Mover.call(this,_7b,e,_7c);};dojo.extend(_7a,dojo.dnd.Mover.prototype);dojo.extend(_7a,{onMouseMove:function(e){dojo.dnd.autoScroll(e);var m=this.marginBox,c=this.constraintBox,l=m.l+e.pageX,t=m.t+e.pageY;l=l<c.l?c.l:c.r<l?c.r:l;t=t<c.t?c.t:c.b<t?c.b:t;this.host.onMove(this,{l:l,t:t});},onFirstMove:function(){dojo.dnd.Mover.prototype.onFirstMove.call(this);var c=this.constraintBox=fun.call(this);c.r=c.l+c.w;c.b=c.t+c.h;if(_79){var mb=dojo.marginBox(this.node);c.r-=mb.w;c.b-=mb.h;}}});return _7a;};dojo.dnd.move.boxConstrainedMover=function(box,_7d){dojo.deprecated("dojo.dnd.move.boxConstrainedMover, use dojo.dnd.move.boxConstrainedMoveable instead");return dojo.dnd.move.constrainedMover(function(){return box;},_7d);};dojo.dnd.move.parentConstrainedMover=function(_7e,_7f){dojo.deprecated("dojo.dnd.move.parentConstrainedMover, use dojo.dnd.move.parentConstrainedMoveable instead");var fun=function(){var n=this.node.parentNode,s=dojo.getComputedStyle(n),mb=dojo._getMarginBox(n,s);if(_7e=="margin"){return mb;}var t=dojo._getMarginExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(_7e=="border"){return mb;}t=dojo._getBorderExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(_7e=="padding"){return mb;}t=dojo._getPadExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;return mb;};return dojo.dnd.move.constrainedMover(fun,_7f);};dojo.dnd.constrainedMover=dojo.dnd.move.constrainedMover;dojo.dnd.boxConstrainedMover=dojo.dnd.move.boxConstrainedMover;dojo.dnd.parentConstrainedMover=dojo.dnd.move.parentConstrainedMover;}if(!dojo._hasResource["dojo.dnd.TimedMoveable"]){dojo._hasResource["dojo.dnd.TimedMoveable"]=true;dojo.provide("dojo.dnd.TimedMoveable");(function(){var _80=dojo.dnd.Moveable.prototype.onMove;dojo.declare("dojo.dnd.TimedMoveable",dojo.dnd.Moveable,{timeout:40,constructor:function(_81,_82){if(!_82){_82={};}if(_82.timeout&&typeof _82.timeout=="number"&&_82.timeout>=0){this.timeout=_82.timeout;}},markupFactory:function(_83,_84){return new dojo.dnd.TimedMoveable(_84,_83);},onMoveStop:function(_85){if(_85._timer){clearTimeout(_85._timer);_80.call(this,_85,_85._leftTop);}dojo.dnd.Moveable.prototype.onMoveStop.apply(this,arguments);},onMove:function(_86,_87){_86._leftTop=_87;if(!_86._timer){var _88=this;_86._timer=setTimeout(function(){_86._timer=null;_80.call(_88,_86,_86._leftTop);},this.timeout);}}});})();}if(!dojo._hasResource["dojo.fx.Toggler"]){dojo._hasResource["dojo.fx.Toggler"]=true;dojo.provide("dojo.fx.Toggler");dojo.declare("dojo.fx.Toggler",null,{node:null,showFunc:dojo.fadeIn,hideFunc:dojo.fadeOut,showDuration:200,hideDuration:200,constructor:function(_89){var _8a=this;dojo.mixin(_8a,_89);_8a.node=_89.node;_8a._showArgs=dojo.mixin({},_89);_8a._showArgs.node=_8a.node;_8a._showArgs.duration=_8a.showDuration;_8a.showAnim=_8a.showFunc(_8a._showArgs);_8a._hideArgs=dojo.mixin({},_89);_8a._hideArgs.node=_8a.node;_8a._hideArgs.duration=_8a.hideDuration;_8a.hideAnim=_8a.hideFunc(_8a._hideArgs);dojo.connect(_8a.showAnim,"beforeBegin",dojo.hitch(_8a.hideAnim,"stop",true));dojo.connect(_8a.hideAnim,"beforeBegin",dojo.hitch(_8a.showAnim,"stop",true));},show:function(_8b){return this.showAnim.play(_8b||0);},hide:function(_8c){return this.hideAnim.play(_8c||0);}});}if(!dojo._hasResource["dojo.fx"]){dojo._hasResource["dojo.fx"]=true;dojo.provide("dojo.fx");(function(){var d=dojo,_8d={_fire:function(evt,_8e){if(this[evt]){this[evt].apply(this,_8e||[]);}return this;}};var _8f=function(_90){this._index=-1;this._animations=_90||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;d.forEach(this._animations,function(a){this.duration+=a.duration;if(a.delay){this.duration+=a.delay;}},this);};d.extend(_8f,{_onAnimate:function(){this._fire("onAnimate",arguments);},_onEnd:function(){d.disconnect(this._onAnimateCtx);d.disconnect(this._onEndCtx);this._onAnimateCtx=this._onEndCtx=null;if(this._index+1==this._animations.length){this._fire("onEnd");}else{this._current=this._animations[++this._index];this._onAnimateCtx=d.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx=d.connect(this._current,"onEnd",this,"_onEnd");this._current.play(0,true);}},play:function(_91,_92){if(!this._current){this._current=this._animations[this._index=0];}if(!_92&&this._current.status()=="playing"){return this;}var _93=d.connect(this._current,"beforeBegin",this,function(){this._fire("beforeBegin");}),_94=d.connect(this._current,"onBegin",this,function(arg){this._fire("onBegin",arguments);}),_95=d.connect(this._current,"onPlay",this,function(arg){this._fire("onPlay",arguments);d.disconnect(_93);d.disconnect(_94);d.disconnect(_95);});if(this._onAnimateCtx){d.disconnect(this._onAnimateCtx);}this._onAnimateCtx=d.connect(this._current,"onAnimate",this,"_onAnimate");if(this._onEndCtx){d.disconnect(this._onEndCtx);}this._onEndCtx=d.connect(this._current,"onEnd",this,"_onEnd");this._current.play.apply(this._current,arguments);return this;},pause:function(){if(this._current){var e=d.connect(this._current,"onPause",this,function(arg){this._fire("onPause",arguments);d.disconnect(e);});this._current.pause();}return this;},gotoPercent:function(_96,_97){this.pause();var _98=this.duration*_96;this._current=null;d.some(this._animations,function(a){if(a.duration<=_98){this._current=a;return true;}_98-=a.duration;return false;});if(this._current){this._current.gotoPercent(_98/this._current.duration,_97);}return this;},stop:function(_99){if(this._current){if(_99){for(;this._index+1<this._animations.length;++this._index){this._animations[this._index].stop(true);}this._current=this._animations[this._index];}var e=d.connect(this._current,"onStop",this,function(arg){this._fire("onStop",arguments);d.disconnect(e);});this._current.stop();}return this;},status:function(){return this._current?this._current.status():"stopped";},destroy:function(){if(this._onAnimateCtx){d.disconnect(this._onAnimateCtx);}if(this._onEndCtx){d.disconnect(this._onEndCtx);}}});d.extend(_8f,_8d);dojo.fx.chain=function(_9a){return new _8f(_9a);};var _9b=function(_9c){this._animations=_9c||[];this._connects=[];this._finished=0;this.duration=0;d.forEach(_9c,function(a){var _9d=a.duration;if(a.delay){_9d+=a.delay;}if(this.duration<_9d){this.duration=_9d;}this._connects.push(d.connect(a,"onEnd",this,"_onEnd"));},this);this._pseudoAnimation=new d.Animation({curve:[0,1],duration:this.duration});var _9e=this;d.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop","onEnd"],function(evt){_9e._connects.push(d.connect(_9e._pseudoAnimation,evt,function(){_9e._fire(evt,arguments);}));});};d.extend(_9b,{_doAction:function(_9f,_a0){d.forEach(this._animations,function(a){a[_9f].apply(a,_a0);});return this;},_onEnd:function(){if(++this._finished>this._animations.length){this._fire("onEnd");}},_call:function(_a1,_a2){var t=this._pseudoAnimation;t[_a1].apply(t,_a2);},play:function(_a3,_a4){this._finished=0;this._doAction("play",arguments);this._call("play",arguments);return this;},pause:function(){this._doAction("pause",arguments);this._call("pause",arguments);return this;},gotoPercent:function(_a5,_a6){var ms=this.duration*_a5;d.forEach(this._animations,function(a){a.gotoPercent(a.duration<ms?1:(ms/a.duration),_a6);});this._call("gotoPercent",arguments);return this;},stop:function(_a7){this._doAction("stop",arguments);this._call("stop",arguments);return this;},status:function(){return this._pseudoAnimation.status();},destroy:function(){d.forEach(this._connects,dojo.disconnect);}});d.extend(_9b,_8d);dojo.fx.combine=function(_a8){return new _9b(_a8);};dojo.fx.wipeIn=function(_a9){var _aa=_a9.node=d.byId(_a9.node),s=_aa.style,o;var _ab=d.animateProperty(d.mixin({properties:{height:{start:function(){o=s.overflow;s.overflow="hidden";if(s.visibility=="hidden"||s.display=="none"){s.height="1px";s.display="";s.visibility="";return 1;}else{var _ac=d.style(_aa,"height");return Math.max(_ac,1);}},end:function(){return _aa.scrollHeight;}}}},_a9));d.connect(_ab,"onEnd",function(){s.height="auto";s.overflow=o;});return _ab;};dojo.fx.wipeOut=function(_ad){var _ae=_ad.node=d.byId(_ad.node),s=_ae.style,o;var _af=d.animateProperty(d.mixin({properties:{height:{end:1}}},_ad));d.connect(_af,"beforeBegin",function(){o=s.overflow;s.overflow="hidden";s.display="";});d.connect(_af,"onEnd",function(){s.overflow=o;s.height="auto";s.display="none";});return _af;};dojo.fx.slideTo=function(_b0){var _b1=_b0.node=d.byId(_b0.node),top=null,_b2=null;var _b3=(function(n){return function(){var cs=d.getComputedStyle(n);var pos=cs.position;top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);_b2=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);if(pos!="absolute"&&pos!="relative"){var ret=d.position(n,true);top=ret.y;_b2=ret.x;n.style.position="absolute";n.style.top=top+"px";n.style.left=_b2+"px";}};})(_b1);_b3();var _b4=d.animateProperty(d.mixin({properties:{top:_b0.top||0,left:_b0.left||0}},_b0));d.connect(_b4,"beforeBegin",_b4,_b3);return _b4;};})();}if(!dojo._hasResource["dijit.form._FormMixin"]){dojo._hasResource["dijit.form._FormMixin"]=true;dojo.provide("dijit.form._FormMixin");dojo.declare("dijit.form._FormMixin",null,{reset:function(){dojo.forEach(this.getDescendants(),function(_b5){if(_b5.reset){_b5.reset();}});},validate:function(){var _b6=false;return dojo.every(dojo.map(this.getDescendants(),function(_b7){_b7._hasBeenBlurred=true;var _b8=_b7.disabled||!_b7.validate||_b7.validate();if(!_b8&&!_b6){dijit.scrollIntoView(_b7.containerNode||_b7.domNode);_b7.focus();_b6=true;}return _b8;}),function(_b9){return _b9;});},setValues:function(val){dojo.deprecated(this.declaredClass+"::setValues() is deprecated. Use attr('value', val) instead.","","2.0");return this.attr("value",val);},_setValueAttr:function(obj){var map={};dojo.forEach(this.getDescendants(),function(_ba){if(!_ba.name){return;}var _bb=map[_ba.name]||(map[_ba.name]=[]);_bb.push(_ba);});for(var _bc in map){if(!map.hasOwnProperty(_bc)){continue;}var _bd=map[_bc],_be=dojo.getObject(_bc,false,obj);if(_be===undefined){continue;}if(!dojo.isArray(_be)){_be=[_be];}if(typeof _bd[0].checked=="boolean"){dojo.forEach(_bd,function(w,i){w.attr("value",dojo.indexOf(_be,w.value)!=-1);});}else{if(_bd[0].multiple){_bd[0].attr("value",_be);}else{dojo.forEach(_bd,function(w,i){w.attr("value",_be[i]);});}}}},getValues:function(){dojo.deprecated(this.declaredClass+"::getValues() is deprecated. Use attr('value') instead.","","2.0");return this.attr("value");},_getValueAttr:function(){var obj={};dojo.forEach(this.getDescendants(),function(_bf){var _c0=_bf.name;if(!_c0||_bf.disabled){return;}var _c1=_bf.attr("value");if(typeof _bf.checked=="boolean"){if(/Radio/.test(_bf.declaredClass)){if(_c1!==false){dojo.setObject(_c0,_c1,obj);}else{_c1=dojo.getObject(_c0,false,obj);if(_c1===undefined){dojo.setObject(_c0,null,obj);}}}else{var ary=dojo.getObject(_c0,false,obj);if(!ary){ary=[];dojo.setObject(_c0,ary,obj);}if(_c1!==false){ary.push(_c1);}}}else{var _c2=dojo.getObject(_c0,false,obj);if(typeof _c2!="undefined"){if(dojo.isArray(_c2)){_c2.push(_c1);}else{dojo.setObject(_c0,[_c2,_c1],obj);}}else{dojo.setObject(_c0,_c1,obj);}}});return obj;},isValid:function(){this._invalidWidgets=dojo.filter(this.getDescendants(),function(_c3){return !_c3.disabled&&_c3.isValid&&!_c3.isValid();});return !this._invalidWidgets.length;},onValidStateChange:function(_c4){},_widgetChange:function(_c5){var _c6=this._lastValidState;if(!_c5||this._lastValidState===undefined){_c6=this.isValid();if(this._lastValidState===undefined){this._lastValidState=_c6;}}else{if(_c5.isValid){this._invalidWidgets=dojo.filter(this._invalidWidgets||[],function(w){return (w!=_c5);},this);if(!_c5.isValid()&&!_c5.attr("disabled")){this._invalidWidgets.push(_c5);}_c6=(this._invalidWidgets.length===0);}}if(_c6!==this._lastValidState){this._lastValidState=_c6;this.onValidStateChange(_c6);}},connectChildren:function(){dojo.forEach(this._changeConnections,dojo.hitch(this,"disconnect"));var _c7=this;var _c8=this._changeConnections=[];dojo.forEach(dojo.filter(this.getDescendants(),function(_c9){return _c9.validate;}),function(_ca){_c8.push(_c7.connect(_ca,"validate",dojo.hitch(_c7,"_widgetChange",_ca)));_c8.push(_c7.connect(_ca,"_setDisabledAttr",dojo.hitch(_c7,"_widgetChange",_ca)));});this._widgetChange(null);},startup:function(){this.inherited(arguments);this._changeConnections=[];this.connectChildren();}});}if(!dojo._hasResource["dijit._DialogMixin"]){dojo._hasResource["dijit._DialogMixin"]=true;dojo.provide("dijit._DialogMixin");dojo.declare("dijit._DialogMixin",null,{attributeMap:dijit._Widget.prototype.attributeMap,execute:function(_cb){},onCancel:function(){},onExecute:function(){},_onSubmit:function(){this.onExecute();this.execute(this.attr("value"));},_getFocusItems:function(_cc){var _cd=dijit._getTabNavigable(dojo.byId(_cc));this._firstFocusItem=_cd.lowest||_cd.first||_cc;this._lastFocusItem=_cd.last||_cd.highest||this._firstFocusItem;if(dojo.isMoz&&this._firstFocusItem.tagName.toLowerCase()=="input"&&dojo.getNodeProp(this._firstFocusItem,"type").toLowerCase()=="file"){dojo.attr(_cc,"tabIndex","0");this._firstFocusItem=_cc;}}});}if(!dojo._hasResource["dijit.DialogUnderlay"]){dojo._hasResource["dijit.DialogUnderlay"]=true;dojo.provide("dijit.DialogUnderlay");dojo.declare("dijit.DialogUnderlay",[dijit._Widget,dijit._Templated],{templateString:"<div class='dijitDialogUnderlayWrapper'><div class='dijitDialogUnderlay' dojoAttachPoint='node'></div></div>",dialogId:"","class":"",attributeMap:{id:"domNode"},_setDialogIdAttr:function(id){dojo.attr(this.node,"id",id+"_underlay");},_setClassAttr:function(_ce){this.node.className="dijitDialogUnderlay "+_ce;},postCreate:function(){dojo.body().appendChild(this.domNode);},layout:function(){var is=this.node.style,os=this.domNode.style;os.display="none";var _cf=dijit.getViewport();os.top=_cf.t+"px";os.left=_cf.l+"px";is.width=_cf.w+"px";is.height=_cf.h+"px";os.display="block";},show:function(){this.domNode.style.display="block";this.layout();this.bgIframe=new dijit.BackgroundIframe(this.domNode);},hide:function(){this.bgIframe.destroy();this.domNode.style.display="none";},uninitialize:function(){if(this.bgIframe){this.bgIframe.destroy();}this.inherited(arguments);}});}if(!dojo._hasResource["dojo.html"]){dojo._hasResource["dojo.html"]=true;dojo.provide("dojo.html");(function(){var _d0=0,d=dojo;dojo.html._secureForInnerHtml=function(_d1){return _d1.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"");};dojo.html._emptyNode=dojo.empty;dojo.html._setNodeContent=function(_d2,_d3){d.empty(_d2);if(_d3){if(typeof _d3=="string"){_d3=d._toDom(_d3,_d2.ownerDocument);}if(!_d3.nodeType&&d.isArrayLike(_d3)){for(var _d4=_d3.length,i=0;i<_d3.length;i=_d4==_d3.length?i+1:0){d.place(_d3[i],_d2,"last");}}else{d.place(_d3,_d2,"last");}}return _d2;};dojo.declare("dojo.html._ContentSetter",null,{node:"",content:"",id:"",cleanContent:false,extractContent:false,parseContent:false,constructor:function(_d5,_d6){dojo.mixin(this,_d5||{});_d6=this.node=dojo.byId(this.node||_d6);if(!this.id){this.id=["Setter",(_d6)?_d6.id||_d6.tagName:"",_d0++].join("_");}if(!(this.node||_d6)){new Error(this.declaredClass+": no node provided to "+this.id);}},set:function(_d7,_d8){if(undefined!==_d7){this.content=_d7;}if(_d8){this._mixin(_d8);}this.onBegin();this.setContent();this.onEnd();return this.node;},setContent:function(){var _d9=this.node;if(!_d9){console.error("setContent given no node");}try{_d9=dojo.html._setNodeContent(_d9,this.content);}catch(e){var _da=this.onContentError(e);try{_d9.innerHTML=_da;}catch(e){console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+e.message,e);}}this.node=_d9;},empty:function(){if(this.parseResults&&this.parseResults.length){dojo.forEach(this.parseResults,function(w){if(w.destroy){w.destroy();}});delete this.parseResults;}dojo.html._emptyNode(this.node);},onBegin:function(){var _db=this.content;if(dojo.isString(_db)){if(this.cleanContent){_db=dojo.html._secureForInnerHtml(_db);}if(this.extractContent){var _dc=_db.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_dc){_db=_dc[1];}}}this.empty();this.content=_db;return this.node;},onEnd:function(){if(this.parseContent){this._parse();}return this.node;},tearDown:function(){delete this.parseResults;delete this.node;delete this.content;},onContentError:function(err){return "Error occured setting content: "+err;},_mixin:function(_dd){var _de={},key;for(key in _dd){if(key in _de){continue;}this[key]=_dd[key];}},_parse:function(){var _df=this.node;try{this.parseResults=dojo.parser.parse(_df,true);}catch(e){this._onError("Content",e,"Error parsing in _ContentSetter#"+this.id);}},_onError:function(_e0,err,_e1){var _e2=this["on"+_e0+"Error"].call(this,err);if(_e1){console.error(_e1,err);}else{if(_e2){dojo.html._setNodeContent(this.node,_e2,true);}}}});dojo.html.set=function(_e3,_e4,_e5){if(undefined==_e4){console.warn("dojo.html.set: no cont argument provided, using empty string");_e4="";}if(!_e5){return dojo.html._setNodeContent(_e3,_e4,true);}else{var op=new dojo.html._ContentSetter(dojo.mixin(_e5,{content:_e4,node:_e3}));return op.set();}};})();}if(!dojo._hasResource["dijit.layout.ContentPane"]){dojo._hasResource["dijit.layout.ContentPane"]=true;dojo.provide("dijit.layout.ContentPane");dojo.declare("dijit.layout.ContentPane",dijit._Widget,{href:"",extractContent:false,parseOnLoad:true,preventCache:false,preload:false,refreshOnShow:false,loadingMessage:"<span class='dijitContentPaneLoading'>${loadingState}</span>",errorMessage:"<span class='dijitContentPaneError'>${errorState}</span>",isLoaded:false,baseClass:"dijitContentPane",doLayout:true,ioArgs:{},isContainer:true,isLayoutContainer:true,onLoadDeferred:null,attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{title:[]}),postMixInProperties:function(){this.inherited(arguments);var _e6=dojo.i18n.getLocalization("dijit","loading",this.lang);this.loadingMessage=dojo.string.substitute(this.loadingMessage,_e6);this.errorMessage=dojo.string.substitute(this.errorMessage,_e6);if(!this.href&&this.srcNodeRef&&this.srcNodeRef.innerHTML){this.isLoaded=true;}},buildRendering:function(){this.inherited(arguments);if(!this.containerNode){this.containerNode=this.domNode;}},postCreate:function(){this.domNode.title="";if(!dojo.attr(this.domNode,"role")){dijit.setWaiRole(this.domNode,"group");}dojo.addClass(this.domNode,this.baseClass);},startup:function(){if(this._started){return;}var _e7=dijit._Contained.prototype.getParent.call(this);this._childOfLayoutWidget=_e7&&_e7.isLayoutContainer;this._needLayout=!this._childOfLayoutWidget;if(this.isLoaded){dojo.forEach(this.getChildren(),function(_e8){_e8.startup();});}if(this._isShown()||this.preload){this._onShow();}this.inherited(arguments);},_checkIfSingleChild:function(){var _e9=dojo.query("> *",this.containerNode).filter(function(_ea){return _ea.tagName!=="SCRIPT";}),_eb=_e9.filter(function(_ec){return dojo.hasAttr(_ec,"dojoType")||dojo.hasAttr(_ec,"widgetId");}),_ed=dojo.filter(_eb.map(dijit.byNode),function(_ee){return _ee&&_ee.domNode&&_ee.resize;});if(_e9.length==_eb.length&&_ed.length==1){this._singleChild=_ed[0];}else{delete this._singleChild;}dojo.toggleClass(this.containerNode,this.baseClass+"SingleChild",!!this._singleChild);},setHref:function(_ef){dojo.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use attr('href', ...) instead.","","2.0");return this.attr("href",_ef);},_setHrefAttr:function(_f0){this.cancel();this.onLoadDeferred=new dojo.Deferred(dojo.hitch(this,"cancel"));this.href=_f0;if(this._created&&(this.preload||this._isShown())){this._load();}else{this._hrefChanged=true;}return this.onLoadDeferred;},setContent:function(_f1){dojo.deprecated("dijit.layout.ContentPane.setContent() is deprecated. Use attr('content', ...) instead.","","2.0");this.attr("content",_f1);},_setContentAttr:function(_f2){this.href="";this.cancel();this.onLoadDeferred=new dojo.Deferred(dojo.hitch(this,"cancel"));this._setContent(_f2||"");this._isDownloaded=false;return this.onLoadDeferred;},_getContentAttr:function(){return this.containerNode.innerHTML;},cancel:function(){if(this._xhrDfd&&(this._xhrDfd.fired==-1)){this._xhrDfd.cancel();}delete this._xhrDfd;this.onLoadDeferred=null;},uninitialize:function(){if(this._beingDestroyed){this.cancel();}this.inherited(arguments);},destroyRecursive:function(_f3){if(this._beingDestroyed){return;}this.inherited(arguments);},resize:function(_f4,_f5){if(!this._wasShown){this._onShow();}this._resizeCalled=true;if(_f4){dojo.marginBox(this.domNode,_f4);}var cn=this.containerNode;if(cn===this.domNode){var mb=_f5||{};dojo.mixin(mb,_f4||{});if(!("h" in mb)||!("w" in mb)){mb=dojo.mixin(dojo.marginBox(cn),mb);}this._contentBox=dijit.layout.marginBox2contentBox(cn,mb);}else{this._contentBox=dojo.contentBox(cn);}this._layoutChildren();},_isShown:function(){if(this._childOfLayoutWidget){if(this._resizeCalled&&"open" in this){return this.open;}return this._resizeCalled;}else{if("open" in this){return this.open;}else{var _f6=this.domNode;return (_f6.style.display!="none")&&(_f6.style.visibility!="hidden")&&!dojo.hasClass(_f6,"dijitHidden");}}},_onShow:function(){if(this.href){if(!this._xhrDfd&&(!this.isLoaded||this._hrefChanged||this.refreshOnShow)){this.refresh();}}else{if(!this._childOfLayoutWidget&&this._needLayout){this._layoutChildren();}}this.inherited(arguments);this._wasShown=true;},refresh:function(){this.cancel();this.onLoadDeferred=new dojo.Deferred(dojo.hitch(this,"cancel"));this._load();return this.onLoadDeferred;},_load:function(){this._setContent(this.onDownloadStart(),true);var _f7=this;var _f8={preventCache:(this.preventCache||this.refreshOnShow),url:this.href,handleAs:"text"};if(dojo.isObject(this.ioArgs)){dojo.mixin(_f8,this.ioArgs);}var _f9=(this._xhrDfd=(this.ioMethod||dojo.xhrGet)(_f8));_f9.addCallback(function(_fa){try{_f7._isDownloaded=true;_f7._setContent(_fa,false);_f7.onDownloadEnd();}catch(err){_f7._onError("Content",err);}delete _f7._xhrDfd;return _fa;});_f9.addErrback(function(err){if(!_f9.canceled){_f7._onError("Download",err);}delete _f7._xhrDfd;return err;});delete this._hrefChanged;},_onLoadHandler:function(_fb){this.isLoaded=true;try{this.onLoadDeferred.callback(_fb);this.onLoad(_fb);}catch(e){console.error("Error "+this.widgetId+" running custom onLoad code: "+e.message);}},_onUnloadHandler:function(){this.isLoaded=false;try{this.onUnload();}catch(e){console.error("Error "+this.widgetId+" running custom onUnload code: "+e.message);}},destroyDescendants:function(){if(this.isLoaded){this._onUnloadHandler();}var _fc=this._contentSetter;dojo.forEach(this.getChildren(),function(_fd){if(_fd.destroyRecursive){_fd.destroyRecursive();}});if(_fc){dojo.forEach(_fc.parseResults,function(_fe){if(_fe.destroyRecursive&&_fe.domNode&&_fe.domNode.parentNode==dojo.body()){_fe.destroyRecursive();}});delete _fc.parseResults;}dojo.html._emptyNode(this.containerNode);delete this._singleChild;},_setContent:function(_ff,_100){this.destroyDescendants();var _101=this._contentSetter;if(!(_101&&_101 instanceof dojo.html._ContentSetter)){_101=this._contentSetter=new dojo.html._ContentSetter({node:this.containerNode,_onError:dojo.hitch(this,this._onError),onContentError:dojo.hitch(this,function(e){var _102=this.onContentError(e);try{this.containerNode.innerHTML=_102;}catch(e){console.error("Fatal "+this.id+" could not change content due to "+e.message,e);}})});}var _103=dojo.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:this.parseOnLoad},this._contentSetterParams||{});dojo.mixin(_101,_103);_101.set((dojo.isObject(_ff)&&_ff.domNode)?_ff.domNode:_ff);delete this._contentSetterParams;if(!_100){dojo.forEach(this.getChildren(),function(_104){if(!this.parseOnLoad||_104.getParent){_104.startup();}},this);this._scheduleLayout();this._onLoadHandler(_ff);}},_onError:function(type,err,_105){this.onLoadDeferred.errback(err);var _106=this["on"+type+"Error"].call(this,err);if(_105){console.error(_105,err);}else{if(_106){this._setContent(_106,true);}}},_scheduleLayout:function(){if(this._isShown()){this._layoutChildren();}else{this._needLayout=true;}},_layoutChildren:function(){if(this.doLayout){this._checkIfSingleChild();}if(this._singleChild&&this._singleChild.resize){var cb=this._contentBox||dojo.contentBox(this.containerNode);this._singleChild.resize({w:cb.w,h:cb.h});}else{dojo.forEach(this.getChildren(),function(_107){if(_107.resize){_107.resize();}});}delete this._needLayout;},onLoad:function(data){},onUnload:function(){},onDownloadStart:function(){return this.loadingMessage;},onContentError:function(_108){},onDownloadError:function(_109){return this.errorMessage;},onDownloadEnd:function(){}});}if(!dojo._hasResource["dijit.TooltipDialog"]){dojo._hasResource["dijit.TooltipDialog"]=true;dojo.provide("dijit.TooltipDialog");dojo.declare("dijit.TooltipDialog",[dijit.layout.ContentPane,dijit._Templated,dijit.form._FormMixin,dijit._DialogMixin],{title:"",doLayout:false,autofocus:true,baseClass:"dijitTooltipDialog",_firstFocusItem:null,_lastFocusItem:null,templateString:dojo.cache("dijit","templates/TooltipDialog.html","<div waiRole=\"presentation\">\n\t<div class=\"dijitTooltipContainer\" waiRole=\"presentation\">\n\t\t<div class =\"dijitTooltipContents dijitTooltipFocusNode\" dojoAttachPoint=\"containerNode\" tabindex=\"-1\" waiRole=\"dialog\"></div>\n\t</div>\n\t<div class=\"dijitTooltipConnector\" waiRole=\"presentation\"></div>\n</div>\n"),postCreate:function(){this.inherited(arguments);this.connect(this.containerNode,"onkeypress","_onKey");this.containerNode.title=this.title;},orient:function(node,_10a,_10b){var c=this._currentOrientClass;if(c){dojo.removeClass(this.domNode,c);}c="dijitTooltipAB"+(_10b.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(_10b.charAt(0)=="T"?"Below":"Above");dojo.addClass(this.domNode,c);this._currentOrientClass=c;},onOpen:function(pos){this.orient(this.domNode,pos.aroundCorner,pos.corner);this._onShow();if(this.autofocus){this._getFocusItems(this.containerNode);dijit.focus(this._firstFocusItem);}},onClose:function(){this.onHide();},_onKey:function(evt){var node=evt.target;var dk=dojo.keys;if(evt.charOrCode===dk.TAB){this._getFocusItems(this.containerNode);}var _10c=(this._firstFocusItem==this._lastFocusItem);if(evt.charOrCode==dk.ESCAPE){setTimeout(dojo.hitch(this,"onCancel"),0);dojo.stopEvent(evt);}else{if(node==this._firstFocusItem&&evt.shiftKey&&evt.charOrCode===dk.TAB){if(!_10c){dijit.focus(this._lastFocusItem);}dojo.stopEvent(evt);}else{if(node==this._lastFocusItem&&evt.charOrCode===dk.TAB&&!evt.shiftKey){if(!_10c){dijit.focus(this._firstFocusItem);}dojo.stopEvent(evt);}else{if(evt.charOrCode===dk.TAB){evt.stopPropagation();}}}}}});}if(!dojo._hasResource["dijit.Dialog"]){dojo._hasResource["dijit.Dialog"]=true;dojo.provide("dijit.Dialog");dojo.declare("dijit._DialogBase",[dijit._Templated,dijit.form._FormMixin,dijit._DialogMixin],{templateString:dojo.cache("dijit","templates/Dialog.html","<div class=\"dijitDialog\" tabindex=\"-1\" waiRole=\"dialog\" waiState=\"labelledby-${id}_title\">\n\t<div dojoAttachPoint=\"titleBar\" class=\"dijitDialogTitleBar\">\n\t<span dojoAttachPoint=\"titleNode\" class=\"dijitDialogTitle\" id=\"${id}_title\"></span>\n\t<span dojoAttachPoint=\"closeButtonNode\" class=\"dijitDialogCloseIcon\" dojoAttachEvent=\"onclick: onCancel, onmouseenter: _onCloseEnter, onmouseleave: _onCloseLeave\" title=\"${buttonCancel}\">\n\t\t<span dojoAttachPoint=\"closeText\" class=\"closeText\" title=\"${buttonCancel}\">x</span>\n\t</span>\n\t</div>\n\t\t<div dojoAttachPoint=\"containerNode\" class=\"dijitDialogPaneContent\"></div>\n</div>\n"),attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{title:[{node:"titleNode",type:"innerHTML"},{node:"titleBar",type:"attribute"}],"aria-describedby":""}),open:false,duration:dijit.defaultDuration,refocus:true,autofocus:true,_firstFocusItem:null,_lastFocusItem:null,doLayout:false,draggable:true,"aria-describedby":"",postMixInProperties:function(){var _10d=dojo.i18n.getLocalization("dijit","common");dojo.mixin(this,_10d);this.inherited(arguments);},postCreate:function(){dojo.style(this.domNode,{display:"none",position:"absolute"});dojo.body().appendChild(this.domNode);this.inherited(arguments);this.connect(this,"onExecute","hide");this.connect(this,"onCancel","hide");this._modalconnects=[];},onLoad:function(){this._position();this.inherited(arguments);},_endDrag:function(e){if(e&&e.node&&e.node===this.domNode){this._relativePosition=dojo.position(e.node);}},_setup:function(){var node=this.domNode;if(this.titleBar&&this.draggable){this._moveable=(dojo.isIE==6)?new dojo.dnd.TimedMoveable(node,{handle:this.titleBar}):new dojo.dnd.Moveable(node,{handle:this.titleBar,timeout:0});dojo.subscribe("/dnd/move/stop",this,"_endDrag");}else{dojo.addClass(node,"dijitDialogFixed");}this.underlayAttrs={dialogId:this.id,"class":dojo.map(this["class"].split(/\s/),function(s){return s+"_underlay";}).join(" ")};this._fadeIn=dojo.fadeIn({node:node,duration:this.duration,beforeBegin:dojo.hitch(this,function(){var _10e=dijit._underlay;if(!_10e){_10e=dijit._underlay=new dijit.DialogUnderlay(this.underlayAttrs);}else{_10e.attr(this.underlayAttrs);}var _10f=948+dijit._dialogStack.length*2;dojo.style(dijit._underlay.domNode,"zIndex",_10f);dojo.style(this.domNode,"zIndex",_10f+1);_10e.show();}),onEnd:dojo.hitch(this,function(){if(this.autofocus){this._getFocusItems(this.domNode);dijit.focus(this._firstFocusItem);}})});this._fadeOut=dojo.fadeOut({node:node,duration:this.duration,onEnd:dojo.hitch(this,function(){node.style.display="none";var ds=dijit._dialogStack;if(ds.length==0){dijit._underlay.hide();}else{dojo.style(dijit._underlay.domNode,"zIndex",948+ds.length*2);dijit._underlay.attr(ds[ds.length-1].underlayAttrs);}if(this.refocus){var _110=this._savedFocus;if(ds.length>0){var pd=ds[ds.length-1];if(!dojo.isDescendant(_110.node,pd.domNode)){pd._getFocusItems(pd.domNode);_110=pd._firstFocusItem;}}dijit.focus(_110);}})});},uninitialize:function(){var _111=false;if(this._fadeIn&&this._fadeIn.status()=="playing"){_111=true;this._fadeIn.stop();}if(this._fadeOut&&this._fadeOut.status()=="playing"){_111=true;this._fadeOut.stop();}if((this.open||_111)&&!dijit._underlay._destroyed){dijit._underlay.hide();}if(this._moveable){this._moveable.destroy();}this.inherited(arguments);},_size:function(){this._checkIfSingleChild();if(this._singleChild){if(this._singleChildOriginalStyle){this._singleChild.domNode.style.cssText=this._singleChildOriginalStyle;}delete this._singleChildOriginalStyle;}else{dojo.style(this.containerNode,{width:"auto",height:"auto"});}var mb=dojo.marginBox(this.domNode);var _112=dijit.getViewport();if(mb.w>=_112.w||mb.h>=_112.h){var w=Math.min(mb.w,Math.floor(_112.w*0.75)),h=Math.min(mb.h,Math.floor(_112.h*0.75));if(this._singleChild&&this._singleChild.resize){this._singleChildOriginalStyle=this._singleChild.domNode.style.cssText;this._singleChild.resize({w:w,h:h});}else{dojo.style(this.containerNode,{width:w+"px",height:h+"px",overflow:"auto",position:"relative"});}}else{if(this._singleChild&&this._singleChild.resize){this._singleChild.resize();}}},_position:function(){if(!dojo.hasClass(dojo.body(),"dojoMove")){var node=this.domNode,_113=dijit.getViewport(),p=this._relativePosition,bb=p?null:dojo._getBorderBox(node),l=Math.floor(_113.l+(p?p.x:(_113.w-bb.w)/2)),t=Math.floor(_113.t+(p?p.y:(_113.h-bb.h)/2));dojo.style(node,{left:l+"px",top:t+"px"});}},_onKey:function(evt){var ds=dijit._dialogStack;if(ds[ds.length-1]!=this){return;}if(evt.charOrCode){var dk=dojo.keys;var node=evt.target;if(evt.charOrCode===dk.TAB){this._getFocusItems(this.domNode);}var _114=(this._firstFocusItem==this._lastFocusItem);if(node==this._firstFocusItem&&evt.shiftKey&&evt.charOrCode===dk.TAB){if(!_114){dijit.focus(this._lastFocusItem);}dojo.stopEvent(evt);}else{if(node==this._lastFocusItem&&evt.charOrCode===dk.TAB&&!evt.shiftKey){if(!_114){dijit.focus(this._firstFocusItem);}dojo.stopEvent(evt);}else{while(node){if(node==this.domNode||dojo.hasClass(node,"dijitPopup")){if(evt.charOrCode==dk.ESCAPE){this.onCancel();}else{return;}}node=node.parentNode;}if(evt.charOrCode!==dk.TAB){dojo.stopEvent(evt);}else{if(!dojo.isOpera){try{this._firstFocusItem.focus();}catch(e){}}}}}}},show:function(){if(this.open){return;}if(!this._alreadyInitialized){this._setup();this._alreadyInitialized=true;}if(this._fadeOut.status()=="playing"){this._fadeOut.stop();}this._modalconnects.push(dojo.connect(window,"onscroll",this,"layout"));this._modalconnects.push(dojo.connect(window,"onresize",this,function(){var _115=dijit.getViewport();if(!this._oldViewport||_115.h!=this._oldViewport.h||_115.w!=this._oldViewport.w){this.layout();this._oldViewport=_115;}}));this._modalconnects.push(dojo.connect(dojo.doc.documentElement,"onkeypress",this,"_onKey"));dojo.style(this.domNode,{opacity:0,display:""});this.open=true;this._onShow();this._size();this._position();dijit._dialogStack.push(this);this._fadeIn.play();this._savedFocus=dijit.getFocus(this);},hide:function(){var ds=dijit._dialogStack;if(!this._alreadyInitialized||this!=ds[ds.length-1]){return;}if(this._fadeIn.status()=="playing"){this._fadeIn.stop();}ds.pop();this._fadeOut.play();if(this._scrollConnected){this._scrollConnected=false;}dojo.forEach(this._modalconnects,dojo.disconnect);this._modalconnects=[];if(this._relativePosition){delete this._relativePosition;}this.open=false;this.onHide();},layout:function(){if(this.domNode.style.display!="none"){if(dijit._underlay){dijit._underlay.layout();}this._position();}},destroy:function(){dojo.forEach(this._modalconnects,dojo.disconnect);if(this.refocus&&this.open){setTimeout(dojo.hitch(dijit,"focus",this._savedFocus),25);}this.inherited(arguments);},_onCloseEnter:function(){dojo.addClass(this.closeButtonNode,"dijitDialogCloseIcon-hover");},_onCloseLeave:function(){dojo.removeClass(this.closeButtonNode,"dijitDialogCloseIcon-hover");}});dojo.declare("dijit.Dialog",[dijit.layout.ContentPane,dijit._DialogBase],{});dijit._dialogStack=[];}if(!dojo._hasResource["dijit._editor.selection"]){dojo._hasResource["dijit._editor.selection"]=true;dojo.provide("dijit._editor.selection");dojo.mixin(dijit._editor.selection,{getType:function(){if(dojo.isIE){return dojo.doc.selection.type.toLowerCase();}else{var _116="text";var oSel;try{oSel=dojo.global.getSelection();}catch(e){}if(oSel&&oSel.rangeCount==1){var _117=oSel.getRangeAt(0);if((_117.startContainer==_117.endContainer)&&((_117.endOffset-_117.startOffset)==1)&&(_117.startContainer.nodeType!=3)){_116="control";}}return _116;}},getSelectedText:function(){if(dojo.isIE){if(dijit._editor.selection.getType()=="control"){return null;}return dojo.doc.selection.createRange().text;}else{var _118=dojo.global.getSelection();if(_118){return _118.toString();}}return "";},getSelectedHtml:function(){if(dojo.isIE){if(dijit._editor.selection.getType()=="control"){return null;}return dojo.doc.selection.createRange().htmlText;}else{var _119=dojo.global.getSelection();if(_119&&_119.rangeCount){var i;var html="";for(i=0;i<_119.rangeCount;i++){var frag=_119.getRangeAt(i).cloneContents();var div=dojo.doc.createElement("div");div.appendChild(frag);html+=div.innerHTML;}return html;}return null;}},getSelectedElement:function(){if(dijit._editor.selection.getType()=="control"){if(dojo.isIE){var _11a=dojo.doc.selection.createRange();if(_11a&&_11a.item){return dojo.doc.selection.createRange().item(0);}}else{var _11b=dojo.global.getSelection();return _11b.anchorNode.childNodes[_11b.anchorOffset];}}return null;},getParentElement:function(){if(dijit._editor.selection.getType()=="control"){var p=this.getSelectedElement();if(p){return p.parentNode;}}else{if(dojo.isIE){var r=dojo.doc.selection.createRange();r.collapse(true);return r.parentElement();}else{var _11c=dojo.global.getSelection();if(_11c){var node=_11c.anchorNode;while(node&&(node.nodeType!=1)){node=node.parentNode;}return node;}}}return null;},hasAncestorElement:function(_11d){return this.getAncestorElement.apply(this,arguments)!=null;},getAncestorElement:function(_11e){var node=this.getSelectedElement()||this.getParentElement();return this.getParentOfType(node,arguments);},isTag:function(node,tags){if(node&&node.tagName){var _11f=node.tagName.toLowerCase();for(var i=0;i<tags.length;i++){var _120=String(tags[i]).toLowerCase();if(_11f==_120){return _120;}}}return "";},getParentOfType:function(node,tags){while(node){if(this.isTag(node,tags).length){return node;}node=node.parentNode;}return null;},collapse:function(_121){if(window.getSelection){var _122=dojo.global.getSelection();if(_122.removeAllRanges){if(_121){_122.collapseToStart();}else{_122.collapseToEnd();}}else{_122.collapse(_121);}}else{if(dojo.isIE){var _123=dojo.doc.selection.createRange();_123.collapse(_121);_123.select();}}},remove:function(){var sel=dojo.doc.selection;if(dojo.isIE){if(sel.type.toLowerCase()!="none"){sel.clear();}return sel;}else{sel=dojo.global.getSelection();sel.deleteFromDocument();return sel;}},selectElementChildren:function(_124,_125){var win=dojo.global;var doc=dojo.doc;var _126;_124=dojo.byId(_124);if(doc.selection&&dojo.isIE&&dojo.body().createTextRange){_126=_124.ownerDocument.body.createTextRange();_126.moveToElementText(_124);if(!_125){try{_126.select();}catch(e){}}}else{if(win.getSelection){var _127=dojo.global.getSelection();if(_127.setBaseAndExtent){_127.setBaseAndExtent(_124,0,_124,_124.innerText.length-1);}else{if(dojo.isOpera){if(_127.rangeCount){_126=_127.getRangeAt(0);}else{_126=doc.createRange();}_126.setStart(_124,0);_126.setEnd(_124,(_124.nodeType==3)?_124.length:_124.childNodes.length);_127.addRange(_126);}else{if(_127.selectAllChildren){_127.selectAllChildren(_124);}}}}}},selectElement:function(_128,_129){var _12a;var doc=dojo.doc;var win=dojo.global;_128=dojo.byId(_128);if(dojo.isIE&&dojo.body().createTextRange){try{_12a=dojo.body().createControlRange();_12a.addElement(_128);if(!_129){_12a.select();}}catch(e){this.selectElementChildren(_128,_129);}}else{if(dojo.global.getSelection){var _12b=win.getSelection();_12a=doc.createRange();if(_12b.removeAllRanges){if(dojo.isOpera){if(_12b.getRangeAt(0)){_12a=_12b.getRangeAt(0);}}_12a.selectNode(_128);_12b.removeAllRanges();_12b.addRange(_12a);}}}}});}if(!dojo._hasResource["dijit._editor.range"]){dojo._hasResource["dijit._editor.range"]=true;dojo.provide("dijit._editor.range");dijit.range={};dijit.range.getIndex=function(node,_12c){var ret=[],retR=[];var stop=_12c;var _12d=node;var _12e,n;while(node!=stop){var i=0;_12e=node.parentNode;while((n=_12e.childNodes[i++])){if(n===node){--i;break;}}if(i>=_12e.childNodes.length){dojo.debug("Error finding index of a node in dijit.range.getIndex");}ret.unshift(i);retR.unshift(i-_12e.childNodes.length);node=_12e;}if(ret.length>0&&_12d.nodeType==3){n=_12d.previousSibling;while(n&&n.nodeType==3){ret[ret.length-1]--;n=n.previousSibling;}n=_12d.nextSibling;while(n&&n.nodeType==3){retR[retR.length-1]++;n=n.nextSibling;}}return {o:ret,r:retR};};dijit.range.getNode=function(_12f,_130){if(!dojo.isArray(_12f)||_12f.length==0){return _130;}var node=_130;dojo.every(_12f,function(i){if(i>=0&&i<node.childNodes.length){node=node.childNodes[i];}else{node=null;return false;}return true;});return node;};dijit.range.getCommonAncestor=function(n1,n2){var _131=function(n){var as=[];while(n){as.unshift(n);if(n.nodeName!="BODY"){n=n.parentNode;}else{break;}}return as;};var n1as=_131(n1);var n2as=_131(n2);var m=Math.min(n1as.length,n2as.length);var com=n1as[0];for(var i=1;i<m;i++){if(n1as[i]===n2as[i]){com=n1as[i];}else{break;}}return com;};dijit.range.getAncestor=function(node,_132,root){root=root||node.ownerDocument.body;while(node&&node!==root){var name=node.nodeName.toUpperCase();if(_132.test(name)){return node;}node=node.parentNode;}return null;};dijit.range.BlockTagNames=/^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DT|DE)$/;dijit.range.getBlockAncestor=function(node,_133,root){root=root||node.ownerDocument.body;_133=_133||dijit.range.BlockTagNames;var _134=null,_135;while(node&&node!==root){var name=node.nodeName.toUpperCase();if(!_134&&_133.test(name)){_134=node;}if(!_135&&(/^(?:BODY|TD|TH|CAPTION)$/).test(name)){_135=node;}node=node.parentNode;}return {blockNode:_134,blockContainer:_135||node.ownerDocument.body};};dijit.range.atBeginningOfContainer=function(_136,node,_137){var _138=false;var _139=(_137==0);if(!_139&&node.nodeType==3){if(/^[\s\xA0]+$/.test(node.nodeValue.substr(0,_137))){_139=true;}}if(_139){var _13a=node;_138=true;while(_13a&&_13a!==_136){if(_13a.previousSibling){_138=false;break;}_13a=_13a.parentNode;}}return _138;};dijit.range.atEndOfContainer=function(_13b,node,_13c){var _13d=false;var _13e=(_13c==(node.length||node.childNodes.length));if(!_13e&&node.nodeType==3){if(/^[\s\xA0]+$/.test(node.nodeValue.substr(_13c))){_13e=true;}}if(_13e){var _13f=node;_13d=true;while(_13f&&_13f!==_13b){if(_13f.nextSibling){_13d=false;break;}_13f=_13f.parentNode;}}return _13d;};dijit.range.adjacentNoneTextNode=function(_140,next){var node=_140;var len=(0-_140.length)||0;var prop=next?"nextSibling":"previousSibling";while(node){if(node.nodeType!=3){break;}len+=node.length;node=node[prop];}return [node,len];};dijit.range._w3c=Boolean(window["getSelection"]);dijit.range.create=function(win){if(dijit.range._w3c){return (win||dojo.global).document.createRange();}else{return new dijit.range.W3CRange;}};dijit.range.getSelection=function(win,_141){if(dijit.range._w3c){return win.getSelection();}else{var s=new dijit.range.ie.selection(win);if(!_141){s._getCurrentSelection();}return s;}};if(!dijit.range._w3c){dijit.range.ie={cachedSelection:{},selection:function(win){this._ranges=[];this.addRange=function(r,_142){this._ranges.push(r);if(!_142){r._select();}this.rangeCount=this._ranges.length;};this.removeAllRanges=function(){this._ranges=[];this.rangeCount=0;};var _143=function(){var r=win.document.selection.createRange();var type=win.document.selection.type.toUpperCase();if(type=="CONTROL"){return new dijit.range.W3CRange(dijit.range.ie.decomposeControlRange(r));}else{return new dijit.range.W3CRange(dijit.range.ie.decomposeTextRange(r));}};this.getRangeAt=function(i){return this._ranges[i];};this._getCurrentSelection=function(){this.removeAllRanges();var r=_143();if(r){this.addRange(r,true);}};},decomposeControlRange:function(_144){var _145=_144.item(0),_146=_144.item(_144.length-1);var _147=_145.parentNode,_148=_146.parentNode;var _149=dijit.range.getIndex(_145,_147).o;var _14a=dijit.range.getIndex(_146,_148).o+1;return [_147,_149,_148,_14a];},getEndPoint:function(_14b,end){var _14c=_14b.duplicate();_14c.collapse(!end);var _14d="EndTo"+(end?"End":"Start");var _14e=_14c.parentElement();var _14f,_150,_151;if(_14e.childNodes.length>0){dojo.every(_14e.childNodes,function(node,i){var _152;if(node.nodeType!=3){_14c.moveToElementText(node);if(_14c.compareEndPoints(_14d,_14b)>0){if(_151&&_151.nodeType==3){_14f=_151;_152=true;}else{_14f=_14e;_150=i;return false;}}else{if(i==_14e.childNodes.length-1){_14f=_14e;_150=_14e.childNodes.length;return false;}}}else{if(i==_14e.childNodes.length-1){_14f=node;_152=true;}}if(_152&&_14f){var _153=dijit.range.adjacentNoneTextNode(_14f)[0];if(_153){_14f=_153.nextSibling;}else{_14f=_14e.firstChild;}var _154=dijit.range.adjacentNoneTextNode(_14f);_153=_154[0];var _155=_154[1];if(_153){_14c.moveToElementText(_153);_14c.collapse(false);}else{_14c.moveToElementText(_14e);}_14c.setEndPoint(_14d,_14b);_150=_14c.text.length-_155;return false;}_151=node;return true;});}else{_14f=_14e;_150=0;}if(!end&&_14f.nodeType==1&&_150==_14f.childNodes.length){var _156=_14f.nextSibling;if(_156&&_156.nodeType==3){_14f=_156;_150=0;}}return [_14f,_150];},setEndPoint:function(_157,_158,_159){var _15a=_157.duplicate(),node,len;if(_158.nodeType!=3){if(_159>0){node=_158.childNodes[_159-1];if(node.nodeType==3){_158=node;_159=node.length;}else{if(node.nextSibling&&node.nextSibling.nodeType==3){_158=node.nextSibling;_159=0;}else{_15a.moveToElementText(node.nextSibling?node:_158);var _15b=node.parentNode;var _15c=_15b.insertBefore(node.ownerDocument.createTextNode(" "),node.nextSibling);_15a.collapse(false);_15b.removeChild(_15c);}}}else{_15a.moveToElementText(_158);_15a.collapse(true);}}if(_158.nodeType==3){var _15d=dijit.range.adjacentNoneTextNode(_158);var _15e=_15d[0];len=_15d[1];if(_15e){_15a.moveToElementText(_15e);_15a.collapse(false);if(_15e.contentEditable!="inherit"){len++;}}else{_15a.moveToElementText(_158.parentNode);_15a.collapse(true);}_159+=len;if(_159>0){if(_15a.move("character",_159)!=_159){console.error("Error when moving!");}}}return _15a;},decomposeTextRange:function(_15f){var _160=dijit.range.ie.getEndPoint(_15f);var _161=_160[0],_162=_160[1];var _163=_160[0],_164=_160[1];if(_15f.htmlText.length){if(_15f.htmlText==_15f.text){_164=_162+_15f.text.length;}else{_160=dijit.range.ie.getEndPoint(_15f,true);_163=_160[0],_164=_160[1];}}return [_161,_162,_163,_164];},setRange:function(_165,_166,_167,_168,_169,_16a){var _16b=dijit.range.ie.setEndPoint(_165,_166,_167);_165.setEndPoint("StartToStart",_16b);if(!_16a){var end=dijit.range.ie.setEndPoint(_165,_168,_169);}_165.setEndPoint("EndToEnd",end||_16b);return _165;}};dojo.declare("dijit.range.W3CRange",null,{constructor:function(){if(arguments.length>0){this.setStart(arguments[0][0],arguments[0][1]);this.setEnd(arguments[0][2],arguments[0][3]);}else{this.commonAncestorContainer=null;this.startContainer=null;this.startOffset=0;this.endContainer=null;this.endOffset=0;this.collapsed=true;}},_updateInternal:function(){if(this.startContainer!==this.endContainer){this.commonAncestorContainer=dijit.range.getCommonAncestor(this.startContainer,this.endContainer);}else{this.commonAncestorContainer=this.startContainer;}this.collapsed=(this.startContainer===this.endContainer)&&(this.startOffset==this.endOffset);},setStart:function(node,_16c){_16c=parseInt(_16c);if(this.startContainer===node&&this.startOffset==_16c){return;}delete this._cachedBookmark;this.startContainer=node;this.startOffset=_16c;if(!this.endContainer){this.setEnd(node,_16c);}else{this._updateInternal();}},setEnd:function(node,_16d){_16d=parseInt(_16d);if(this.endContainer===node&&this.endOffset==_16d){return;}delete this._cachedBookmark;this.endContainer=node;this.endOffset=_16d;if(!this.startContainer){this.setStart(node,_16d);}else{this._updateInternal();}},setStartAfter:function(node,_16e){this._setPoint("setStart",node,_16e,1);},setStartBefore:function(node,_16f){this._setPoint("setStart",node,_16f,0);},setEndAfter:function(node,_170){this._setPoint("setEnd",node,_170,1);},setEndBefore:function(node,_171){this._setPoint("setEnd",node,_171,0);},_setPoint:function(what,node,_172,ext){var _173=dijit.range.getIndex(node,node.parentNode).o;this[what](node.parentNode,_173.pop()+ext);},_getIERange:function(){var r=(this._body||this.endContainer.ownerDocument.body).createTextRange();dijit.range.ie.setRange(r,this.startContainer,this.startOffset,this.endContainer,this.endOffset,this.collapsed);return r;},getBookmark:function(body){this._getIERange();return this._cachedBookmark;},_select:function(){var r=this._getIERange();r.select();},deleteContents:function(){var r=this._getIERange();r.pasteHTML("");this.endContainer=this.startContainer;this.endOffset=this.startOffset;this.collapsed=true;},cloneRange:function(){var r=new dijit.range.W3CRange([this.startContainer,this.startOffset,this.endContainer,this.endOffset]);r._body=this._body;return r;},detach:function(){this._body=null;this.commonAncestorContainer=null;this.startContainer=null;this.startOffset=0;this.endContainer=null;this.endOffset=0;this.collapsed=true;}});}}if(!dojo._hasResource["dijit._editor.html"]){dojo._hasResource["dijit._editor.html"]=true;dojo.provide("dijit._editor.html");dijit._editor.escapeXml=function(str,_174){str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");if(!_174){str=str.replace(/'/gm,"&#39;");}return str;};dijit._editor.getNodeHtml=function(node){var _175;switch(node.nodeType){case 1:var _176=node.nodeName.toLowerCase();if(_176.charAt(0)=="/"){return "";}_175="<"+_176;var _177=[];var attr;if(dojo.isIE&&node.outerHTML){var s=node.outerHTML;s=s.substr(0,s.indexOf(">")).replace(/(['"])[^"']*\1/g,"");var reg=/(\b\w+)\s?=/g;var m,key;while((m=reg.exec(s))){key=m[1];if(key.substr(0,3)!="_dj"){if(key=="src"||key=="href"){if(node.getAttribute("_djrealurl")){_177.push([key,node.getAttribute("_djrealurl")]);continue;}}var val,_178;switch(key){case "style":val=node.style.cssText.toLowerCase();break;case "class":val=node.className;break;case "width":if(_176==="img"){_178=/width=(\S+)/i.exec(s);if(_178){val=_178[1];}break;}case "height":if(_176==="img"){_178=/height=(\S+)/i.exec(s);if(_178){val=_178[1];}break;}default:val=node.getAttribute(key);}if(val!=null){_177.push([key,val.toString()]);}}}}else{var i=0;while((attr=node.attributes[i++])){var n=attr.name;if(n.substr(0,3)!="_dj"){var v=attr.value;if(n=="src"||n=="href"){if(node.getAttribute("_djrealurl")){v=node.getAttribute("_djrealurl");}}_177.push([n,v]);}}}_177.sort(function(a,b){return a[0]<b[0]?-1:(a[0]==b[0]?0:1);});var j=0;while((attr=_177[j++])){_175+=" "+attr[0]+"=\""+(dojo.isString(attr[1])?dijit._editor.escapeXml(attr[1],true):attr[1])+"\"";}if(_176==="script"){_175+=">"+node.innerHTML+"</"+_176+">";}else{if(node.childNodes.length){_175+=">"+dijit._editor.getChildrenHtml(node)+"</"+_176+">";}else{switch(_176){case "br":case "hr":case "img":case "input":case "base":case "meta":case "area":case "basefont":_175+=" />";break;default:_175+="></"+_176+">";}}}break;case 4:case 3:_175=dijit._editor.escapeXml(node.nodeValue,true);break;case 8:_175="<!--"+dijit._editor.escapeXml(node.nodeValue,true)+"-->";break;default:_175="<!-- Element not recognized - Type: "+node.nodeType+" Name: "+node.nodeName+"-->";}return _175;};dijit._editor.getChildrenHtml=function(dom){var out="";if(!dom){return out;}var _179=dom["childNodes"]||dom;var _17a=!dojo.isIE||_179!==dom;var node,i=0;while((node=_179[i++])){if(!_17a||node.parentNode==dom){out+=dijit._editor.getNodeHtml(node);}}return out;};}if(!dojo._hasResource["dijit._editor.RichText"]){dojo._hasResource["dijit._editor.RichText"]=true;dojo.provide("dijit._editor.RichText");if(!dojo.config["useXDomain"]||dojo.config["allowXdRichTextSave"]){if(dojo._postLoad){(function(){var _17b=dojo.doc.createElement("textarea");_17b.id=dijit._scopeName+"._editor.RichText.savedContent";dojo.style(_17b,{display:"none",position:"absolute",top:"-100px",height:"3px",width:"3px"});dojo.body().appendChild(_17b);})();}else{try{dojo.doc.write("<textarea id=\""+dijit._scopeName+"._editor.RichText.savedContent\" "+"style=\"display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;\"></textarea>");}catch(e){}}}dojo.declare("dijit._editor.RichText",dijit._Widget,{constructor:function(_17c){this.contentPreFilters=[];this.contentPostFilters=[];this.contentDomPreFilters=[];this.contentDomPostFilters=[];this.editingAreaStyleSheets=[];this.events=[].concat(this.events);this._keyHandlers={};this.contentPreFilters.push(dojo.hitch(this,"_preFixUrlAttributes"));if(dojo.isMoz){this.contentPreFilters.push(this._normalizeFontStyle);this.contentPostFilters.push(this._removeMozBogus);}if(dojo.isWebKit){this.contentPreFilters.push(this._removeWebkitBogus);this.contentPostFilters.push(this._removeWebkitBogus);}if(dojo.isIE){this.contentPostFilters.push(this._normalizeFontStyle);}this.onLoadDeferred=new dojo.Deferred();},inheritWidth:false,focusOnLoad:false,name:"",styleSheets:"",_content:"",height:"300px",minHeight:"1em",isClosed:true,isLoaded:false,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",onLoadDeferred:null,isTabIndent:false,disableSpellCheck:false,postCreate:function(){if("textarea"==this.domNode.tagName.toLowerCase()){console.warn("RichText should not be used with the TEXTAREA tag. See dijit._editor.RichText docs.");}dojo.publish(dijit._scopeName+"._editor.RichText::init",[this]);this.open();this.setupDefaultShortcuts();},setupDefaultShortcuts:function(){var exec=dojo.hitch(this,function(cmd,arg){return function(){return !this.execCommand(cmd,arg);};});var _17d={b:exec("bold"),i:exec("italic"),u:exec("underline"),a:exec("selectall"),s:function(){this.save(true);},m:function(){this.isTabIndent=!this.isTabIndent;},"1":exec("formatblock","h1"),"2":exec("formatblock","h2"),"3":exec("formatblock","h3"),"4":exec("formatblock","h4"),"\\":exec("insertunorderedlist")};if(!dojo.isIE){_17d.Z=exec("redo");}for(var key in _17d){this.addKeyHandler(key,true,false,_17d[key]);}},events:["onKeyPress","onKeyDown","onKeyUp","onClick"],captureEvents:[],_editorCommandsLocalized:false,_localizeEditorCommands:function(){if(this._editorCommandsLocalized){return;}this._editorCommandsLocalized=true;var _17e=["div","p","pre","h1","h2","h3","h4","h5","h6","ol","ul","address"];var _17f="",_180,i=0;while((_180=_17e[i++])){if(_180.charAt(1)!="l"){_17f+="<"+_180+"><span>content</span></"+_180+"><br/>";}else{_17f+="<"+_180+"><li>content</li></"+_180+"><br/>";}}var div=dojo.doc.createElement("div");dojo.style(div,{position:"absolute",top:"-2000px"});dojo.doc.body.appendChild(div);div.innerHTML=_17f;var node=div.firstChild;while(node){dijit._editor.selection.selectElement(node.firstChild);dojo.withGlobal(this.window,"selectElement",dijit._editor.selection,[node.firstChild]);var _181=node.tagName.toLowerCase();this._local2NativeFormatNames[_181]=document.queryCommandValue("formatblock");this._native2LocalFormatNames[this._local2NativeFormatNames[_181]]=_181;node=node.nextSibling.nextSibling;}dojo.body().removeChild(div);},open:function(_182){if(!this.onLoadDeferred||this.onLoadDeferred.fired>=0){this.onLoadDeferred=new dojo.Deferred();}if(!this.isClosed){this.close();}dojo.publish(dijit._scopeName+"._editor.RichText::open",[this]);this._content="";if(arguments.length==1&&_182.nodeName){this.domNode=_182;}var dn=this.domNode;var html;if(dn.nodeName&&dn.nodeName.toLowerCase()=="textarea"){var ta=(this.textarea=dn);this.name=ta.name;html=ta.value;dn=this.domNode=dojo.doc.createElement("div");dn.setAttribute("widgetId",this.id);ta.removeAttribute("widgetId");dn.cssText=ta.cssText;dn.className+=" "+ta.className;dojo.place(dn,ta,"before");var _183=dojo.hitch(this,function(){dojo.style(ta,{display:"block",position:"absolute",top:"-1000px"});if(dojo.isIE){var s=ta.style;this.__overflow=s.overflow;s.overflow="hidden";}});if(dojo.isIE){setTimeout(_183,10);}else{_183();}if(ta.form){dojo.connect(ta.form,"onsubmit",this,function(){ta.value=this.getValue();});}}else{html=dijit._editor.getChildrenHtml(dn);dn.innerHTML="";}var _184=dojo.contentBox(dn);this._oldHeight=_184.h;this._oldWidth=_184.w;this.savedContent=html;if(dn.nodeName&&dn.nodeName=="LI"){dn.innerHTML=" <br>";}this.editingArea=dn.ownerDocument.createElement("div");dn.appendChild(this.editingArea);if(this.name!==""&&(!dojo.config["useXDomain"]||dojo.config["allowXdRichTextSave"])){var _185=dojo.byId(dijit._scopeName+"._editor.RichText.savedContent");if(_185.value!==""){var _186=_185.value.split(this._SEPARATOR),i=0,dat;while((dat=_186[i++])){var data=dat.split(":");if(data[0]==this.name){html=data[1];_186.splice(i,1);break;}}}dojo.addOnUnload(dojo.hitch(this,"_saveContent"));}this.isClosed=false;var ifr=(this.editorObject=this.iframe=dojo.doc.createElement("iframe"));ifr.id=this.id+"_iframe";this._iframeSrc=this._getIframeDocTxt();ifr.style.border="none";ifr.style.width="100%";if(this._layoutMode){ifr.style.height="100%";}else{if(dojo.isIE>=7){if(this.height){ifr.style.height=this.height;}if(this.minHeight){ifr.style.minHeight=this.minHeight;}}else{ifr.style.height=this.height?this.height:this.minHeight;}}ifr.frameBorder=0;ifr._loadFunc=dojo.hitch(this,function(win){this.window=win;this.document=this.window.document;if(dojo.isIE){this._localizeEditorCommands();}this.onLoad(html);this.savedContent=this.getValue(true);});var s="javascript:parent."+dijit._scopeName+".byId(\""+this.id+"\")._iframeSrc";ifr.setAttribute("src",s);this.editingArea.appendChild(ifr);if(dojo.isSafari){setTimeout(function(){ifr.setAttribute("src",s);},0);}if(dn.nodeName=="LI"){dn.lastChild.style.marginTop="-1.2em";}dojo.addClass(this.domNode,"RichTextEditable");},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_getIframeDocTxt:function(){var _187=dojo.getComputedStyle(this.domNode);var html="";if(dojo.isIE||(!this.height&&!dojo.isMoz)){html="<div></div>";}else{if(dojo.isMoz){this._cursorToStart=true;html="&nbsp;";}}var font=[_187.fontWeight,_187.fontSize,_187.fontFamily].join(" ");var _188=_187.lineHeight;if(_188.indexOf("px")>=0){_188=parseFloat(_188)/parseFloat(_187.fontSize);}else{if(_188.indexOf("em")>=0){_188=parseFloat(_188);}else{_188="normal";}}var _189="";this.style.replace(/(^|;)(line-|font-?)[^;]+/g,function(_18a){_189+=_18a.replace(/^;/g,"")+";";});var _18b=dojo.query("label[for=\""+this.id+"\"]");return [this.isLeftToRight()?"<html><head>":"<html dir='rtl'><head>",(dojo.isMoz&&_18b.length?"<title>"+_18b[0].innerHTML+"</title>":""),"<meta http-equiv='Content-Type' content='text/html'>","<style>","body,html {","\tbackground:transparent;","\tpadding: 1px 0 0 0;","\tmargin: -1px 0 0 0;",(dojo.isWebKit?"\twidth: 100%;":""),(dojo.isWebKit?"\theight: 100%;":""),"}","body{","\ttop:0px; left:0px; right:0px;","\tfont:",font,";",((this.height||dojo.isOpera)?"":"position: fixed;"),"\tmin-height:",this.minHeight,";","\tline-height:",_188,"}","p{ margin: 1em 0; }",(this.height?"":"body,html{overflow-y:hidden;/*for IE*/} body > div {overflow-x:auto;/*FF:horizontal scrollbar*/ overflow-y:hidden;/*safari*/ min-height:"+this.minHeight+";/*safari*/}"),"li > ul:-moz-first-node, li > ol:-moz-first-node{ padding-top: 1.2em; } ","li{ min-height:1.2em; }","</style>",this._applyEditingAreaStyleSheets(),"</head><body onload='frameElement._loadFunc(window,document)' style='"+_189+"'>",html,"</body></html>"].join("");},_applyEditingAreaStyleSheets:function(){var _18c=[];if(this.styleSheets){_18c=this.styleSheets.split(";");this.styleSheets="";}_18c=_18c.concat(this.editingAreaStyleSheets);this.editingAreaStyleSheets=[];var text="",i=0,url;while((url=_18c[i++])){var _18d=(new dojo._Url(dojo.global.location,url)).toString();this.editingAreaStyleSheets.push(_18d);text+="<link rel=\"stylesheet\" type=\"text/css\" href=\""+_18d+"\"/>";}return text;},addStyleSheet:function(uri){var url=uri.toString();if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){url=(new dojo._Url(dojo.global.location,url)).toString();}if(dojo.indexOf(this.editingAreaStyleSheets,url)>-1){return;}this.editingAreaStyleSheets.push(url);this.onLoadDeferred.addCallback(dojo.hitch(function(){if(this.document.createStyleSheet){this.document.createStyleSheet(url);}else{var head=this.document.getElementsByTagName("head")[0];var _18e=this.document.createElement("link");_18e.rel="stylesheet";_18e.type="text/css";_18e.href=url;head.appendChild(_18e);}}));},removeStyleSheet:function(uri){var url=uri.toString();if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){url=(new dojo._Url(dojo.global.location,url)).toString();}var _18f=dojo.indexOf(this.editingAreaStyleSheets,url);if(_18f==-1){return;}delete this.editingAreaStyleSheets[_18f];dojo.withGlobal(this.window,"query",dojo,["link:[href=\""+url+"\"]"]).orphan();},disabled:false,_mozSettingProps:{"styleWithCSS":false},_setDisabledAttr:function(_190){this.disabled=_190;if(!this.isLoaded){return;}_190=!!_190;if(dojo.isIE||dojo.isWebKit||dojo.isOpera){var _191=dojo.isIE&&(this.isLoaded||!this.focusOnLoad);if(_191){this.editNode.unselectable="on";}this.editNode.contentEditable=!_190;if(_191){var _192=this;setTimeout(function(){_192.editNode.unselectable="off";},0);}}else{try{this.document.designMode=(_190?"off":"on");}catch(e){return;}if(!_190&&this._mozSettingProps){var ps=this._mozSettingProps;for(var n in ps){if(ps.hasOwnProperty(n)){try{this.document.execCommand(n,false,ps[n]);}catch(e2){}}}}}this._disabledOK=true;},onLoad:function(html){if(!this.window.__registeredWindow){this.window.__registeredWindow=true;this._iframeRegHandle=dijit.registerIframe(this.iframe);}if(!dojo.isIE&&(this.height||dojo.isMoz)){this.editNode=this.document.body;}else{this.editNode=this.document.body.firstChild;var _193=this;if(dojo.isIE){var _194=(this.tabStop=dojo.doc.createElement("<div tabIndex=-1>"));this.editingArea.appendChild(_194);this.iframe.onfocus=function(){_193.editNode.setActive();};}}this.focusNode=this.editNode;var _195=this.events.concat(this.captureEvents);var ap=this.iframe?this.document:this.editNode;dojo.forEach(_195,function(item){this.connect(ap,item.toLowerCase(),item);},this);if(dojo.isIE){this.connect(this.document,"onmousedown","_onIEMouseDown");this.editNode.style.zoom=1;}if(dojo.isWebKit){this._webkitListener=this.connect(this.document,"onmouseup","onDisplayChanged");}if(dojo.isIE){try{this.document.execCommand("RespectVisibilityInDesign",true,null);}catch(e){}}this.isLoaded=true;this.attr("disabled",this.disabled);this.setValue(html);if(this.onLoadDeferred){this.onLoadDeferred.callback(true);}this.onDisplayChanged();if(this.focusOnLoad){dojo.addOnLoad(dojo.hitch(this,function(){setTimeout(dojo.hitch(this,"focus"),this.updateInterval);}));}},onKeyDown:function(e){if(e.keyCode===dojo.keys.TAB&&this.isTabIndent){dojo.stopEvent(e);if(this.queryCommandEnabled((e.shiftKey?"outdent":"indent"))){this.execCommand((e.shiftKey?"outdent":"indent"));}}if(dojo.isIE){if(e.keyCode==dojo.keys.TAB&&!this.isTabIndent){if(e.shiftKey&&!e.ctrlKey&&!e.altKey){this.iframe.focus();}else{if(!e.shiftKey&&!e.ctrlKey&&!e.altKey){this.tabStop.focus();}}}else{if(e.keyCode===dojo.keys.BACKSPACE&&this.document.selection.type==="Control"){dojo.stopEvent(e);this.execCommand("delete");}else{if((65<=e.keyCode&&e.keyCode<=90)||(e.keyCode>=37&&e.keyCode<=40)){e.charCode=e.keyCode;this.onKeyPress(e);}}}}return true;},onKeyUp:function(e){return;},setDisabled:function(_196){dojo.deprecated("dijit.Editor::setDisabled is deprecated","use dijit.Editor::attr(\"disabled\",boolean) instead",2);this.attr("disabled",_196);},_setValueAttr:function(_197){this.setValue(_197);},_setDisableSpellCheckAttr:function(_198){if(this.document){dojo.attr(this.document.body,"spellcheck",!_198);}else{this.onLoadDeferred.addCallback(dojo.hitch(this,function(){dojo.attr(this.document.body,"spellcheck",!_198);}));}this.disableSpellCheck=_198;},onKeyPress:function(e){var c=(e.keyChar&&e.keyChar.toLowerCase())||e.keyCode,_199=this._keyHandlers[c],args=arguments;if(_199&&!e.altKey){dojo.some(_199,function(h){if(!(h.shift^e.shiftKey)&&!(h.ctrl^e.ctrlKey)){if(!h.handler.apply(this,args)){e.preventDefault();}return true;}},this);}if(!this._onKeyHitch){this._onKeyHitch=dojo.hitch(this,"onKeyPressed");}setTimeout(this._onKeyHitch,1);return true;},addKeyHandler:function(key,ctrl,_19a,_19b){if(!dojo.isArray(this._keyHandlers[key])){this._keyHandlers[key]=[];}this._keyHandlers[key].push({shift:_19a||false,ctrl:ctrl||false,handler:_19b});},onKeyPressed:function(){this.onDisplayChanged();},onClick:function(e){this.onDisplayChanged(e);},_onIEMouseDown:function(e){if(!this._focused&&!this.disabled){this.focus();}},_onBlur:function(e){this.inherited(arguments);var _19c=this.getValue(true);if(_19c!=this.savedContent){this.onChange(_19c);this.savedContent=_19c;}},_onFocus:function(e){if(!this.disabled){if(!this._disabledOK){this.attr("disabled",false);}this.inherited(arguments);}},blur:function(){if(!dojo.isIE&&this.window.document.documentElement&&this.window.document.documentElement.focus){this.window.document.documentElement.focus();}else{if(dojo.doc.body.focus){dojo.doc.body.focus();}}},focus:function(){if(!dojo.isIE){dijit.focus(this.iframe);if(this._cursorToStart){delete this._cursorToStart;if(this.editNode.childNodes&&this.editNode.childNodes.length===1&&this.editNode.innerHTML==="&nbsp;"){this.placeCursorAtStart();}}}else{if(this.editNode&&this.editNode.focus){this.iframe.fireEvent("onfocus",document.createEventObject());}}},updateInterval:200,_updateTimer:null,onDisplayChanged:function(e){if(this._updateTimer){clearTimeout(this._updateTimer);}if(!this._updateHandler){this._updateHandler=dojo.hitch(this,"onNormalizedDisplayChanged");}this._updateTimer=setTimeout(this._updateHandler,this.updateInterval);},onNormalizedDisplayChanged:function(){delete this._updateTimer;},onChange:function(_19d){},_normalizeCommand:function(cmd,_19e){var _19f=cmd.toLowerCase();if(_19f=="formatblock"){if(dojo.isSafari&&_19e===undefined){_19f="heading";}}else{if(_19f=="hilitecolor"&&!dojo.isMoz){_19f="backcolor";}}return _19f;},_qcaCache:{},queryCommandAvailable:function(_1a0){var ca=this._qcaCache[_1a0];if(ca!==undefined){return ca;}return (this._qcaCache[_1a0]=this._queryCommandAvailable(_1a0));},_queryCommandAvailable:function(_1a1){var ie=1;var _1a2=1<<1;var _1a3=1<<2;var _1a4=1<<3;var _1a5=1<<4;function _1a6(_1a7){return {ie:Boolean(_1a7&ie),mozilla:Boolean(_1a7&_1a2),webkit:Boolean(_1a7&_1a3),webkit420:Boolean(_1a7&_1a5),opera:Boolean(_1a7&_1a4)};};var _1a8=null;switch(_1a1.toLowerCase()){case "bold":case "italic":case "underline":case "subscript":case "superscript":case "fontname":case "fontsize":case "forecolor":case "hilitecolor":case "justifycenter":case "justifyfull":case "justifyleft":case "justifyright":case "delete":case "selectall":case "toggledir":_1a8=_1a6(_1a2|ie|_1a3|_1a4);break;case "createlink":case "unlink":case "removeformat":case "inserthorizontalrule":case "insertimage":case "insertorderedlist":case "insertunorderedlist":case "indent":case "outdent":case "formatblock":case "inserthtml":case "undo":case "redo":case "strikethrough":case "tabindent":_1a8=_1a6(_1a2|ie|_1a4|_1a5);break;case "blockdirltr":case "blockdirrtl":case "dirltr":case "dirrtl":case "inlinedirltr":case "inlinedirrtl":_1a8=_1a6(ie);break;case "cut":case "copy":case "paste":_1a8=_1a6(ie|_1a2|_1a5);break;case "inserttable":_1a8=_1a6(_1a2|ie);break;case "insertcell":case "insertcol":case "insertrow":case "deletecells":case "deletecols":case "deleterows":case "mergecells":case "splitcell":_1a8=_1a6(ie|_1a2);break;default:return false;}return (dojo.isIE&&_1a8.ie)||(dojo.isMoz&&_1a8.mozilla)||(dojo.isWebKit&&_1a8.webkit)||(dojo.isWebKit>420&&_1a8.webkit420)||(dojo.isOpera&&_1a8.opera);},execCommand:function(_1a9,_1aa){var _1ab;this.focus();_1a9=this._normalizeCommand(_1a9,_1aa);if(_1aa!==undefined){if(_1a9=="heading"){throw new Error("unimplemented");}else{if((_1a9=="formatblock")&&dojo.isIE){_1aa="<"+_1aa+">";}}}var _1ac="_"+_1a9+"Impl";if(this[_1ac]){_1ab=this[_1ac](_1aa);}else{_1aa=arguments.length>1?_1aa:null;if(_1aa||_1a9!="createlink"){_1ab=this.document.execCommand(_1a9,false,_1aa);}}this.onDisplayChanged();return _1ab;},queryCommandEnabled:function(_1ad){if(this.disabled||!this._disabledOK){return false;}_1ad=this._normalizeCommand(_1ad);if(dojo.isMoz||dojo.isWebKit){if(_1ad=="unlink"){return this._sCall("hasAncestorElement",["a"]);}else{if(_1ad=="inserttable"){return true;}}}if(dojo.isWebKit){if(_1ad=="copy"){_1ad="cut";}else{if(_1ad=="paste"){return true;}}}var elem=dojo.isIE?this.document.selection.createRange():this.document;try{return elem.queryCommandEnabled(_1ad);}catch(e){return false;}},queryCommandState:function(_1ae){if(this.disabled||!this._disabledOK){return false;}_1ae=this._normalizeCommand(_1ae);try{return this.document.queryCommandState(_1ae);}catch(e){return false;}},queryCommandValue:function(_1af){if(this.disabled||!this._disabledOK){return false;}var r;_1af=this._normalizeCommand(_1af);if(dojo.isIE&&_1af=="formatblock"){r=this._native2LocalFormatNames[this.document.queryCommandValue(_1af)];}else{if(dojo.isMoz&&_1af==="hilitecolor"){var _1b0;try{_1b0=this.document.queryCommandValue("styleWithCSS");}catch(e){_1b0=false;}this.document.execCommand("styleWithCSS",false,true);r=this.document.queryCommandValue(_1af);this.document.execCommand("styleWithCSS",false,_1b0);}else{r=this.document.queryCommandValue(_1af);}}return r;},_sCall:function(name,args){return dojo.withGlobal(this.window,name,dijit._editor.selection,args);},placeCursorAtStart:function(){this.focus();var _1b1=false;if(dojo.isMoz){var _1b2=this.editNode.firstChild;while(_1b2){if(_1b2.nodeType==3){if(_1b2.nodeValue.replace(/^\s+|\s+$/g,"").length>0){_1b1=true;this._sCall("selectElement",[_1b2]);break;}}else{if(_1b2.nodeType==1){_1b1=true;var tg=_1b2.tagName?_1b2.tagName.toLowerCase():"";if(/br|input|img|base|meta|area|basefont|hr|link/.test(tg)){this._sCall("selectElement",[_1b2]);}else{this._sCall("selectElementChildren",[_1b2]);}break;}}_1b2=_1b2.nextSibling;}}else{_1b1=true;this._sCall("selectElementChildren",[this.editNode]);}if(_1b1){this._sCall("collapse",[true]);}},placeCursorAtEnd:function(){this.focus();var _1b3=false;if(dojo.isMoz){var last=this.editNode.lastChild;while(last){if(last.nodeType==3){if(last.nodeValue.replace(/^\s+|\s+$/g,"").length>0){_1b3=true;this._sCall("selectElement",[last]);break;}}else{if(last.nodeType==1){_1b3=true;if(last.lastChild){this._sCall("selectElement",[last.lastChild]);}else{this._sCall("selectElement",[last]);}break;}}last=last.previousSibling;}}else{_1b3=true;this._sCall("selectElementChildren",[this.editNode]);}if(_1b3){this._sCall("collapse",[false]);}},getValue:function(_1b4){if(this.textarea){if(this.isClosed||!this.isLoaded){return this.textarea.value;}}return this._postFilterContent(null,_1b4);},_getValueAttr:function(){return this.getValue(true);},setValue:function(html){if(!this.isLoaded){this.onLoadDeferred.addCallback(dojo.hitch(this,function(){this.setValue(html);}));return;}if(this.textarea&&(this.isClosed||!this.isLoaded)){this.textarea.value=html;}else{html=this._preFilterContent(html);var node=this.isClosed?this.domNode:this.editNode;if(!html&&dojo.isWebKit){this._cursorToStart=true;html="&nbsp;";}node.innerHTML=html;this._preDomFilterContent(node);}this.onDisplayChanged();},replaceValue:function(html){if(this.isClosed){this.setValue(html);}else{if(this.window&&this.window.getSelection&&!dojo.isMoz){this.setValue(html);}else{if(this.window&&this.window.getSelection){html=this._preFilterContent(html);this.execCommand("selectall");if(!html){this._cursorToStart=true;html="&nbsp;";}this.execCommand("inserthtml",html);this._preDomFilterContent(this.editNode);}else{if(this.document&&this.document.selection){this.setValue(html);}}}}},_preFilterContent:function(html){var ec=html;dojo.forEach(this.contentPreFilters,function(ef){if(ef){ec=ef(ec);}});return ec;},_preDomFilterContent:function(dom){dom=dom||this.editNode;dojo.forEach(this.contentDomPreFilters,function(ef){if(ef&&dojo.isFunction(ef)){ef(dom);}},this);},_postFilterContent:function(dom,_1b5){var ec;if(!dojo.isString(dom)){dom=dom||this.editNode;if(this.contentDomPostFilters.length){if(_1b5){dom=dojo.clone(dom);}dojo.forEach(this.contentDomPostFilters,function(ef){dom=ef(dom);});}ec=dijit._editor.getChildrenHtml(dom);}else{ec=dom;}if(!dojo.trim(ec.replace(/^\xA0\xA0*/,"").replace(/\xA0\xA0*$/,"")).length){ec="";}dojo.forEach(this.contentPostFilters,function(ef){ec=ef(ec);});return ec;},_saveContent:function(e){var _1b6=dojo.byId(dijit._scopeName+"._editor.RichText.savedContent");if(_1b6.value){_1b6.value+=this._SEPARATOR;}_1b6.value+=this.name+":"+this.getValue(true);},escapeXml:function(str,_1b7){str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");if(!_1b7){str=str.replace(/'/gm,"&#39;");}return str;},getNodeHtml:function(node){dojo.deprecated("dijit.Editor::getNodeHtml is deprecated","use dijit._editor.getNodeHtml instead",2);return dijit._editor.getNodeHtml(node);},getNodeChildrenHtml:function(dom){dojo.deprecated("dijit.Editor::getNodeChildrenHtml is deprecated","use dijit._editor.getChildrenHtml instead",2);return dijit._editor.getChildrenHtml(dom);},close:function(save){if(this.isClosed){return false;}if(!arguments.length){save=true;}this._content=this.getValue();var _1b8=(this.savedContent!=this._content);if(this.interval){clearInterval(this.interval);}if(this._webkitListener){this.disconnect(this._webkitListener);delete this._webkitListener;}if(dojo.isIE){this.iframe.onfocus=null;}this.iframe._loadFunc=null;if(this._iframeRegHandle){dijit.unregisterIframe(this._iframeRegHandle);delete this._iframeRegHandle;}if(this.textarea){var s=this.textarea.style;s.position="";s.left=s.top="";if(dojo.isIE){s.overflow=this.__overflow;this.__overflow=null;}this.textarea.value=save?this._content:this.savedContent;dojo.destroy(this.domNode);this.domNode=this.textarea;}else{this.domNode.innerHTML=save?this._content:this.savedContent;}delete this.iframe;dojo.removeClass(this.domNode,"RichTextEditable");this.isClosed=true;this.isLoaded=false;delete this.editNode;delete this.focusNode;if(this.window&&this.window._frameElement){this.window._frameElement=null;}this.window=null;this.document=null;this.editingArea=null;this.editorObject=null;return _1b8;},destroy:function(){if(!this.isClosed){this.close(false);}this.inherited(arguments);},_removeMozBogus:function(html){return html.replace(/\stype="_moz"/gi,"").replace(/\s_moz_dirty=""/gi,"").replace(/_moz_resizing="(true|false)"/gi,"");},_removeWebkitBogus:function(html){html=html.replace(/\sclass="webkit-block-placeholder"/gi,"");html=html.replace(/\sclass="apple-style-span"/gi,"");return html;},_normalizeFontStyle:function(html){return html.replace(/<(\/)?strong([ \>])/gi,"<$1b$2").replace(/<(\/)?em([ \>])/gi,"<$1i$2");},_preFixUrlAttributes:function(html){return html.replace(/(?:(<a(?=\s).*?\shref=)("|')(.*?)\2)|(?:(<a\s.*?href=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl=$2$3$5$2").replace(/(?:(<img(?=\s).*?\ssrc=)("|')(.*?)\2)|(?:(<img\s.*?src=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl=$2$3$5$2");},_inserthorizontalruleImpl:function(_1b9){if(dojo.isIE){return this._inserthtmlImpl("<hr>");}return this.document.execCommand("inserthorizontalrule",false,_1b9);},_unlinkImpl:function(_1ba){if((this.queryCommandEnabled("unlink"))&&(dojo.isMoz||dojo.isWebKit)){var a=this._sCall("getAncestorElement",["a"]);this._sCall("selectElement",[a]);return this.document.execCommand("unlink",false,null);}return this.document.execCommand("unlink",false,_1ba);},_hilitecolorImpl:function(_1bb){var _1bc;if(dojo.isMoz){this.document.execCommand("styleWithCSS",false,true);_1bc=this.document.execCommand("hilitecolor",false,_1bb);this.document.execCommand("styleWithCSS",false,false);}else{_1bc=this.document.execCommand("hilitecolor",false,_1bb);}return _1bc;},_backcolorImpl:function(_1bd){if(dojo.isIE){_1bd=_1bd?_1bd:null;}return this.document.execCommand("backcolor",false,_1bd);},_forecolorImpl:function(_1be){if(dojo.isIE){_1be=_1be?_1be:null;}return this.document.execCommand("forecolor",false,_1be);},_inserthtmlImpl:function(_1bf){_1bf=this._preFilterContent(_1bf);var rv=true;if(dojo.isIE){var _1c0=this.document.selection.createRange();if(this.document.selection.type.toUpperCase()=="CONTROL"){var n=_1c0.item(0);while(_1c0.length){_1c0.remove(_1c0.item(0));}n.outerHTML=_1bf;}else{_1c0.pasteHTML(_1bf);}_1c0.select();}else{if(dojo.isMoz&&!_1bf.length){this._sCall("remove");}else{rv=this.document.execCommand("inserthtml",false,_1bf);}}return rv;}});}if(!dojo._hasResource["dijit._KeyNavContainer"]){dojo._hasResource["dijit._KeyNavContainer"]=true;dojo.provide("dijit._KeyNavContainer");dojo.declare("dijit._KeyNavContainer",dijit._Container,{tabIndex:"0",_keyNavCodes:{},connectKeyNavHandlers:function(_1c1,_1c2){var _1c3=(this._keyNavCodes={});var prev=dojo.hitch(this,this.focusPrev);var next=dojo.hitch(this,this.focusNext);dojo.forEach(_1c1,function(code){_1c3[code]=prev;});dojo.forEach(_1c2,function(code){_1c3[code]=next;});this.connect(this.domNode,"onkeypress","_onContainerKeypress");this.connect(this.domNode,"onfocus","_onContainerFocus");},startupKeyNavChildren:function(){dojo.forEach(this.getChildren(),dojo.hitch(this,"_startupChild"));},addChild:function(_1c4,_1c5){dijit._KeyNavContainer.superclass.addChild.apply(this,arguments);this._startupChild(_1c4);},focus:function(){this.focusFirstChild();},focusFirstChild:function(){var _1c6=this._getFirstFocusableChild();if(_1c6){this.focusChild(_1c6);}},focusNext:function(){var _1c7=this._getNextFocusableChild(this.focusedChild,1);this.focusChild(_1c7);},focusPrev:function(){var _1c8=this._getNextFocusableChild(this.focusedChild,-1);this.focusChild(_1c8,true);},focusChild:function(_1c9,last){if(this.focusedChild&&_1c9!==this.focusedChild){this._onChildBlur(this.focusedChild);}_1c9.focus(last?"end":"start");this.focusedChild=_1c9;},_startupChild:function(_1ca){_1ca.attr("tabIndex","-1");this.connect(_1ca,"_onFocus",function(){_1ca.attr("tabIndex",this.tabIndex);});this.connect(_1ca,"_onBlur",function(){_1ca.attr("tabIndex","-1");});},_onContainerFocus:function(evt){if(evt.target!==this.domNode){return;}this.focusFirstChild();dojo.attr(this.domNode,"tabIndex","-1");},_onBlur:function(evt){if(this.tabIndex){dojo.attr(this.domNode,"tabIndex",this.tabIndex);}this.inherited(arguments);},_onContainerKeypress:function(evt){if(evt.ctrlKey||evt.altKey){return;}var func=this._keyNavCodes[evt.charOrCode];if(func){func();dojo.stopEvent(evt);}},_onChildBlur:function(_1cb){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1);},_getNextFocusableChild:function(_1cc,dir){if(_1cc){_1cc=this._getSiblingOfChild(_1cc,dir);}var _1cd=this.getChildren();for(var i=0;i<_1cd.length;i++){if(!_1cc){_1cc=_1cd[(dir>0)?0:(_1cd.length-1)];}if(_1cc.isFocusable()){return _1cc;}_1cc=this._getSiblingOfChild(_1cc,dir);}return null;}});}if(!dojo._hasResource["dijit.ToolbarSeparator"]){dojo._hasResource["dijit.ToolbarSeparator"]=true;dojo.provide("dijit.ToolbarSeparator");dojo.declare("dijit.ToolbarSeparator",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"dijitToolbarSeparator dijitInline\"></div>",postCreate:function(){dojo.setSelectable(this.domNode,false);},isFocusable:function(){return false;}});}if(!dojo._hasResource["dijit.Toolbar"]){dojo._hasResource["dijit.Toolbar"]=true;dojo.provide("dijit.Toolbar");dojo.declare("dijit.Toolbar",[dijit._Widget,dijit._Templated,dijit._KeyNavContainer],{templateString:"<div class=\"dijit dijitToolbar\" waiRole=\"toolbar\" tabIndex=\"${tabIndex}\" dojoAttachPoint=\"containerNode\">"+"</div>",postCreate:function(){this.connectKeyNavHandlers(this.isLeftToRight()?[dojo.keys.LEFT_ARROW]:[dojo.keys.RIGHT_ARROW],this.isLeftToRight()?[dojo.keys.RIGHT_ARROW]:[dojo.keys.LEFT_ARROW]);},startup:function(){if(this._started){return;}this.startupKeyNavChildren();this.inherited(arguments);}});}if(!dojo._hasResource["dijit._HasDropDown"]){dojo._hasResource["dijit._HasDropDown"]=true;dojo.provide("dijit._HasDropDown");dojo.declare("dijit._HasDropDown",null,{_buttonNode:null,_arrowWrapperNode:null,_popupStateNode:null,_aroundNode:null,dropDown:null,autoWidth:true,forceWidth:false,maxHeight:0,dropDownPosition:["below","above"],_stopClickEvents:true,_onDropDownMouse:function(e){if(e.type=="click"&&!this._seenKeydown){return;}this._seenKeydown=false;if(e.type=="mousedown"){this._docHandler=this.connect(dojo.doc,"onmouseup","_onDropDownMouseup");}if(this.disabled||this.readOnly){return;}if(this._stopClickEvents){dojo.stopEvent(e);}this.toggleDropDown();if(e.type=="click"||e.type=="keypress"){this._onDropDownMouseup();}},_onDropDownMouseup:function(e){if(e&&this._docHandler){this.disconnect(this._docHandler);}var _1ce=this.dropDown,_1cf=false;if(e&&this._opened){var c=dojo.position(this._buttonNode,true);if(!(e.pageX>=c.x&&e.pageX<=c.x+c.w)||!(e.pageY>=c.y&&e.pageY<=c.y+c.h)){var t=e.target;while(t&&!_1cf){if(dojo.hasClass(t,"dijitPopup")){_1cf=true;}else{t=t.parentNode;}}if(_1cf){t=e.target;if(_1ce.onItemClick){var _1d0;while(t&&!(_1d0=dijit.byNode(t))){t=t.parentNode;}if(_1d0&&_1d0.onClick&&_1d0.getParent){_1d0.getParent().onItemClick(_1d0,e);}}return;}}}if(this._opened&&_1ce.focus){window.setTimeout(dojo.hitch(_1ce,"focus"),1);}},_setupDropdown:function(){this._buttonNode=this._buttonNode||this.focusNode||this.domNode;this._popupStateNode=this._popupStateNode||this.focusNode||this._buttonNode;this._aroundNode=this._aroundNode||this.domNode;this.connect(this._buttonNode,"onmousedown","_onDropDownMouse");this.connect(this._buttonNode,"onclick","_onDropDownMouse");this.connect(this._buttonNode,"onkeydown","_onDropDownKeydown");this.connect(this._buttonNode,"onblur","_onDropDownBlur");this.connect(this._buttonNode,"onkeypress","_onKey");if(this._setStateClass){this.connect(this,"openDropDown","_setStateClass");this.connect(this,"closeDropDown","_setStateClass");}var _1d1={"after":this.isLeftToRight()?"Right":"Left","before":this.isLeftToRight()?"Left":"Right","above":"Up","below":"Down","left":"Left","right":"Right"}[this.dropDownPosition[0]]||this.dropDownPosition[0]||"Down";dojo.addClass(this._arrowWrapperNode||this._buttonNode,"dijit"+_1d1+"ArrowButton");},postCreate:function(){this._setupDropdown();this.inherited(arguments);},destroyDescendants:function(){if(this.dropDown){if(!this.dropDown._destroyed){this.dropDown.destroyRecursive();}delete this.dropDown;}this.inherited(arguments);},_onDropDownKeydown:function(e){this._seenKeydown=true;},_onKeyPress:function(e){if(this._opened&&e.charOrCode==dojo.keys.ESCAPE&&!e.shiftKey&&!e.ctrlKey&&!e.altKey){this.toggleDropDown();dojo.stopEvent(e);return;}this.inherited(arguments);},_onDropDownBlur:function(e){this._seenKeydown=false;},_onKey:function(e){if(this.disabled||this.readOnly){return;}var d=this.dropDown;if(d&&this._opened&&d.handleKey){if(d.handleKey(e)===false){return;}}if(d&&this._opened&&e.keyCode==dojo.keys.ESCAPE){this.toggleDropDown();return;}if(e.keyCode==dojo.keys.DOWN_ARROW||e.keyCode==dojo.keys.ENTER||e.charOrCode==" "){this._onDropDownMouse(e);}},_onBlur:function(){this.closeDropDown();this.inherited(arguments);},isLoaded:function(){return true;},loadDropDown:function(_1d2){_1d2();},toggleDropDown:function(){if(this.disabled||this.readOnly){return;}this.focus();var _1d3=this.dropDown;if(!_1d3){return;}if(!this._opened){if(!this.isLoaded()){this.loadDropDown(dojo.hitch(this,"openDropDown"));return;}else{this.openDropDown();}}else{this.closeDropDown();}},openDropDown:function(){var _1d4=this.dropDown;var _1d5=_1d4.domNode;var self=this;if(!this._preparedNode){dijit.popup.moveOffScreen(_1d5);this._preparedNode=true;if(_1d5.style.width){this._explicitDDWidth=true;}if(_1d5.style.height){this._explicitDDHeight=true;}}if(this.maxHeight||this.forceWidth||this.autoWidth){var _1d6={display:"",visibility:"hidden"};if(!this._explicitDDWidth){_1d6.width="";}if(!this._explicitDDHeight){_1d6.height="";}dojo.style(_1d5,_1d6);var mb=dojo.marginBox(_1d5);var _1d7=(this.maxHeight&&mb.h>this.maxHeight);dojo.style(_1d5,{overflow:_1d7?"auto":"hidden"});if(this.forceWidth){mb.w=this.domNode.offsetWidth;}else{if(this.autoWidth){mb.w=Math.max(mb.w,this.domNode.offsetWidth);}else{delete mb.w;}}if(_1d7){mb.h=this.maxHeight;if("w" in mb){mb.w+=16;}}else{delete mb.h;}delete mb.t;delete mb.l;if(dojo.isFunction(_1d4.resize)){_1d4.resize(mb);}else{dojo.marginBox(_1d5,mb);}}var _1d8=dijit.popup.open({parent:this,popup:_1d4,around:this._aroundNode,orient:dijit.getPopupAroundAlignment((this.dropDownPosition&&this.dropDownPosition.length)?this.dropDownPosition:["below"],this.isLeftToRight()),onExecute:function(){self.closeDropDown(true);},onCancel:function(){self.closeDropDown(true);},onClose:function(){dojo.attr(self._popupStateNode,"popupActive",false);dojo.removeClass(self._popupStateNode,"dijitHasDropDownOpen");self._opened=false;self.state="";}});dojo.attr(this._popupStateNode,"popupActive","true");dojo.addClass(self._popupStateNode,"dijitHasDropDownOpen");this._opened=true;this.state="Opened";return _1d8;},closeDropDown:function(_1d9){if(this._opened){dijit.popup.close(this.dropDown);if(_1d9){this.focus();}this._opened=false;this.state="";}}});}if(!dojo._hasResource["dijit.form.Button"]){dojo._hasResource["dijit.form.Button"]=true;dojo.provide("dijit.form.Button");dojo.declare("dijit.form.Button",dijit.form._FormWidget,{label:"",showLabel:true,iconClass:"",type:"button",baseClass:"dijitButton",templateString:dojo.cache("dijit.form","templates/Button.html","<span class=\"dijit dijitReset dijitLeft dijitInline\"\n\tdojoAttachEvent=\"onclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\n\t><span class=\"dijitReset dijitRight dijitInline\"\n\t\t><span class=\"dijitReset dijitInline dijitButtonNode\"\n\t\t\t><button class=\"dijitReset dijitStretch dijitButtonContents\"\n\t\t\t\tdojoAttachPoint=\"titleNode,focusNode\"\n\t\t\t\t${nameAttrSetting} type=\"${type}\" value=\"${value}\" waiRole=\"button\" waiState=\"labelledby-${id}_label\"\n\t\t\t\t><span class=\"dijitReset dijitInline\" dojoAttachPoint=\"iconNode\"\n\t\t\t\t\t><span class=\"dijitReset dijitToggleButtonIconChar\">&#10003;</span\n\t\t\t\t></span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\n\t\t\t\t\tid=\"${id}_label\"\n\t\t\t\t\tdojoAttachPoint=\"containerNode\"\n\t\t\t\t></span\n\t\t\t></button\n\t\t></span\n\t></span\n></span>\n"),attributeMap:dojo.delegate(dijit.form._FormWidget.prototype.attributeMap,{label:{node:"containerNode",type:"innerHTML"},iconClass:{node:"iconNode",type:"class"}}),_onClick:function(e){if(this.disabled){return false;}this._clicked();return this.onClick(e);},_onButtonClick:function(e){if(this._onClick(e)===false){e.preventDefault();}else{if(this.type=="submit"&&!this.focusNode.form){for(var node=this.domNode;node.parentNode;node=node.parentNode){var _1da=dijit.byNode(node);if(_1da&&typeof _1da._onSubmit=="function"){_1da._onSubmit(e);break;}}}}},_setValueAttr:function(_1db){var attr=this.attributeMap.value||"";if(this[attr.node||attr||"domNode"].tagName=="BUTTON"){if(_1db!=this.value){}}},_fillContent:function(_1dc){if(_1dc&&(!this.params||!("label" in this.params))){this.attr("label",_1dc.innerHTML);}},postCreate:function(){dojo.setSelectable(this.focusNode,false);this.inherited(arguments);},_setShowLabelAttr:function(val){if(this.containerNode){dojo.toggleClass(this.containerNode,"dijitDisplayNone",!val);}this.showLabel=val;},onClick:function(e){return true;},_clicked:function(e){},setLabel:function(_1dd){dojo.deprecated("dijit.form.Button.setLabel() is deprecated. Use attr('label', ...) instead.","","2.0");this.attr("label",_1dd);},_setLabelAttr:function(_1de){this.containerNode.innerHTML=this.label=_1de;if(this.showLabel==false&&!this.params.title){this.titleNode.title=dojo.trim(this.containerNode.innerText||this.containerNode.textContent||"");}}});dojo.declare("dijit.form.DropDownButton",[dijit.form.Button,dijit._Container,dijit._HasDropDown],{baseClass:"dijitDropDownButton",templateString:dojo.cache("dijit.form","templates/DropDownButton.html","<span class=\"dijit dijitReset dijitLeft dijitInline\"\n\tdojoAttachPoint=\"_buttonNode\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\n\t><span class='dijitReset dijitRight dijitInline'\n\t\t><span class='dijitReset dijitInline dijitButtonNode'\n\t\t\t><button class=\"dijitReset dijitStretch dijitButtonContents\"\n\t\t\t\t${nameAttrSetting} type=\"${type}\" value=\"${value}\"\n\t\t\t\tdojoAttachPoint=\"focusNode,titleNode,_arrowWrapperNode\"\n\t\t\t\twaiRole=\"button\" waiState=\"haspopup-true,labelledby-${id}_label\"\n\t\t\t\t><span class=\"dijitReset dijitInline\"\n\t\t\t\t\tdojoAttachPoint=\"iconNode\"\n\t\t\t\t></span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\n\t\t\t\t\tdojoAttachPoint=\"containerNode,_popupStateNode\"\n\t\t\t\t\tid=\"${id}_label\"\n\t\t\t\t></span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonInner\">&thinsp;</span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonChar\">&#9660;</span\n\t\t\t></button\n\t\t></span\n\t></span\n></span>\n"),_fillContent:function(){if(this.srcNodeRef){var _1df=dojo.query("*",this.srcNodeRef);dijit.form.DropDownButton.superclass._fillContent.call(this,_1df[0]);this.dropDownContainer=this.srcNodeRef;}},startup:function(){if(this._started){return;}if(!this.dropDown){var _1e0=dojo.query("[widgetId]",this.dropDownContainer)[0];this.dropDown=dijit.byNode(_1e0);delete this.dropDownContainer;}dijit.popup.moveOffScreen(this.dropDown.domNode);this.inherited(arguments);},isLoaded:function(){var _1e1=this.dropDown;return (!_1e1.href||_1e1.isLoaded);},loadDropDown:function(){var _1e2=this.dropDown;if(!_1e2){return;}if(!this.isLoaded()){var _1e3=dojo.connect(_1e2,"onLoad",this,function(){dojo.disconnect(_1e3);this.openDropDown();});_1e2.refresh();}else{this.openDropDown();}},isFocusable:function(){return this.inherited(arguments)&&!this._mouseDown;}});dojo.declare("dijit.form.ComboButton",dijit.form.DropDownButton,{templateString:dojo.cache("dijit.form","templates/ComboButton.html","<table class='dijit dijitReset dijitInline dijitLeft'\n\tcellspacing='0' cellpadding='0' waiRole=\"presentation\"\n\t><tbody waiRole=\"presentation\"><tr waiRole=\"presentation\"\n\t\t><td class=\"dijitReset dijitStretch dijitButtonNode\"><button id=\"${id}_button\" class=\"dijitReset dijitButtonContents\"\n\t\t\tdojoAttachEvent=\"onclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse,onkeypress:_onButtonKeyPress\" dojoAttachPoint=\"titleNode\"\n\t\t\twaiRole=\"button\" waiState=\"labelledby-${id}_label\"\n\t\t\t><div class=\"dijitReset dijitInline\" dojoAttachPoint=\"iconNode\" waiRole=\"presentation\"></div\n\t\t\t><div class=\"dijitReset dijitInline dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\" waiRole=\"presentation\"></div\n\t\t></button></td\n\t\t><td id=\"${id}_arrow\" class='dijitReset dijitRight dijitButtonNode dijitArrowButton'\n\t\t\tdojoAttachPoint=\"_popupStateNode,focusNode,_buttonNode\"\n\t\t\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onkeypress:_onArrowKeyPress\"\n\t\t\tstateModifier=\"DownArrow\"\n\t\t\ttitle=\"${optionsTitle}\" ${nameAttrSetting}\n\t\t\twaiRole=\"button\" waiState=\"haspopup-true\"\n\t\t\t><div class=\"dijitReset dijitArrowButtonInner\" waiRole=\"presentation\">&thinsp;</div\n\t\t\t><div class=\"dijitReset dijitArrowButtonChar\" waiRole=\"presentation\">&#9660;</div\n\t\t></td\n\t></tr></tbody\n></table>\n"),attributeMap:dojo.mixin(dojo.clone(dijit.form.Button.prototype.attributeMap),{id:"",tabIndex:["focusNode","titleNode"],title:"titleNode"}),optionsTitle:"",baseClass:"dijitComboButton",_focusedNode:null,postCreate:function(){this.inherited(arguments);this._focalNodes=[this.titleNode,this._popupStateNode];var isIE=dojo.isIE;dojo.forEach(this._focalNodes,dojo.hitch(this,function(node){this.connect(node,isIE?"onactivate":"onfocus",this._onNodeFocus);this.connect(node,isIE?"ondeactivate":"onblur",this._onNodeBlur);}));if(isIE&&(isIE<8||dojo.isQuirks)){with(this.titleNode){style.width=scrollWidth+"px";this.connect(this.titleNode,"onresize",function(){setTimeout(function(){style.width=scrollWidth+"px";},0);});}}},_onNodeFocus:function(evt){this._focusedNode=evt.currentTarget;var fnc=this._focusedNode==this.focusNode?"dijitDownArrowButtonFocused":"dijitButtonContentsFocused";dojo.addClass(this._focusedNode,fnc);},_onNodeBlur:function(evt){var fnc=evt.currentTarget==this.focusNode?"dijitDownArrowButtonFocused":"dijitButtonContentsFocused";dojo.removeClass(evt.currentTarget,fnc);},_onBlur:function(){this.inherited(arguments);this._focusedNode=null;},_onButtonKeyPress:function(evt){if(evt.charOrCode==dojo.keys[this.isLeftToRight()?"RIGHT_ARROW":"LEFT_ARROW"]){dijit.focus(this._popupStateNode);dojo.stopEvent(evt);}},_onArrowKeyPress:function(evt){if(evt.charOrCode==dojo.keys[this.isLeftToRight()?"LEFT_ARROW":"RIGHT_ARROW"]){dijit.focus(this.titleNode);dojo.stopEvent(evt);}},focus:function(_1e4){dijit.focus(_1e4=="start"?this.titleNode:this._popupStateNode);}});dojo.declare("dijit.form.ToggleButton",dijit.form.Button,{baseClass:"dijitToggleButton",checked:false,attributeMap:dojo.mixin(dojo.clone(dijit.form.Button.prototype.attributeMap),{checked:"focusNode"}),_clicked:function(evt){this.attr("checked",!this.checked);},_setCheckedAttr:function(_1e5){this.checked=_1e5;dojo.attr(this.focusNode||this.domNode,"checked",_1e5);dijit.setWaiState(this.focusNode||this.domNode,"pressed",_1e5);this._setStateClass();this._handleOnChange(_1e5,true);},setChecked:function(_1e6){dojo.deprecated("setChecked("+_1e6+") is deprecated. Use attr('checked',"+_1e6+") instead.","","2.0");this.attr("checked",_1e6);},reset:function(){this._hasBeenBlurred=false;this.attr("checked",this.params.checked||false);}});}if(!dojo._hasResource["dijit._editor._Plugin"]){dojo._hasResource["dijit._editor._Plugin"]=true;dojo.provide("dijit._editor._Plugin");dojo.declare("dijit._editor._Plugin",null,{constructor:function(args,node){this.params=args||{};dojo.mixin(this,this.params);this._connects=[];},editor:null,iconClassPrefix:"dijitEditorIcon",button:null,command:"",useDefaultCommand:true,buttonClass:dijit.form.Button,getLabel:function(key){return this.editor.commands[key];},_initButton:function(){if(this.command.length){var _1e7=this.getLabel(this.command);var _1e8=this.iconClassPrefix+" "+this.iconClassPrefix+this.command.charAt(0).toUpperCase()+this.command.substr(1);if(!this.button){var _1e9=dojo.mixin({label:_1e7,showLabel:false,iconClass:_1e8,dropDown:this.dropDown,tabIndex:"-1"},this.params||{});this.button=new this.buttonClass(_1e9);}}},destroy:function(){dojo.forEach(this._connects,dojo.disconnect);if(this.dropDown){this.dropDown.destroyRecursive();}},connect:function(o,f,tf){this._connects.push(dojo.connect(o,f,this,tf));},updateState:function(){var e=this.editor,c=this.command,_1ea,_1eb;if(!e||!e.isLoaded||!c.length){return;}if(this.button){try{_1eb=e.queryCommandEnabled(c);if(this.enabled!==_1eb){this.enabled=_1eb;this.button.attr("disabled",!_1eb);}if(typeof this.button.checked=="boolean"){_1ea=e.queryCommandState(c);if(this.checked!==_1ea){this.checked=_1ea;this.button.attr("checked",e.queryCommandState(c));}}}catch(e){}}},setEditor:function(_1ec){this.editor=_1ec;this._initButton();if(this.command.length&&!this.editor.queryCommandAvailable(this.command)){if(this.button){this.button.domNode.style.display="none";}}if(this.button&&this.useDefaultCommand){this.connect(this.button,"onClick",dojo.hitch(this.editor,"execCommand",this.command,this.commandArg));}this.connect(this.editor,"onNormalizedDisplayChanged","updateState");},setToolbar:function(_1ed){if(this.button){_1ed.addChild(this.button);}}});}if(!dojo._hasResource["dijit._editor.plugins.EnterKeyHandling"]){dojo._hasResource["dijit._editor.plugins.EnterKeyHandling"]=true;dojo.provide("dijit._editor.plugins.EnterKeyHandling");dojo.declare("dijit._editor.plugins.EnterKeyHandling",dijit._editor._Plugin,{blockNodeForEnter:"BR",constructor:function(args){if(args){dojo.mixin(this,args);}},setEditor:function(_1ee){this.editor=_1ee;if(this.blockNodeForEnter=="BR"){if(dojo.isIE){_1ee.contentDomPreFilters.push(dojo.hitch(this,"regularPsToSingleLinePs"));_1ee.contentDomPostFilters.push(dojo.hitch(this,"singleLinePsToRegularPs"));_1ee.onLoadDeferred.addCallback(dojo.hitch(this,"_fixNewLineBehaviorForIE"));}else{_1ee.onLoadDeferred.addCallback(dojo.hitch(this,function(d){try{this.editor.document.execCommand("insertBrOnReturn",false,true);}catch(e){}return d;}));}}else{if(this.blockNodeForEnter){dojo["require"]("dijit._editor.range");var h=dojo.hitch(this,this.handleEnterKey);_1ee.addKeyHandler(13,0,0,h);_1ee.addKeyHandler(13,0,1,h);this.connect(this.editor,"onKeyPressed","onKeyPressed");}}},onKeyPressed:function(e){if(this._checkListLater){if(dojo.withGlobal(this.editor.window,"isCollapsed",dijit)){var _1ef=dojo.withGlobal(this.editor.window,"getAncestorElement",dijit._editor.selection,["LI"]);if(!_1ef){dijit._editor.RichText.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter);var _1f0=dojo.withGlobal(this.editor.window,"getAncestorElement",dijit._editor.selection,[this.blockNodeForEnter]);if(_1f0){_1f0.innerHTML=this.bogusHtmlContent;if(dojo.isIE){var r=this.editor.document.selection.createRange();r.move("character",-1);r.select();}}else{console.error("onKeyPressed: Cannot find the new block node");}}else{if(dojo.isMoz){if(_1ef.parentNode.parentNode.nodeName=="LI"){_1ef=_1ef.parentNode.parentNode;}}var fc=_1ef.firstChild;if(fc&&fc.nodeType==1&&(fc.nodeName=="UL"||fc.nodeName=="OL")){_1ef.insertBefore(fc.ownerDocument.createTextNode(" "),fc);var _1f1=dijit.range.create(this.editor.window);_1f1.setStart(_1ef.firstChild,0);var _1f2=dijit.range.getSelection(this.editor.window,true);_1f2.removeAllRanges();_1f2.addRange(_1f1);}}}this._checkListLater=false;}if(this._pressedEnterInBlock){if(this._pressedEnterInBlock.previousSibling){this.removeTrailingBr(this._pressedEnterInBlock.previousSibling);}delete this._pressedEnterInBlock;}},bogusHtmlContent:"&nbsp;",blockNodes:/^(?:P|H1|H2|H3|H4|H5|H6|LI)$/,handleEnterKey:function(e){var _1f3,_1f4,_1f5,doc=this.editor.document,br;if(e.shiftKey){var _1f6=dojo.withGlobal(this.editor.window,"getParentElement",dijit._editor.selection);var _1f7=dijit.range.getAncestor(_1f6,this.blockNodes);if(_1f7){if(!e.shiftKey&&_1f7.tagName=="LI"){return true;}_1f3=dijit.range.getSelection(this.editor.window);_1f4=_1f3.getRangeAt(0);if(!_1f4.collapsed){_1f4.deleteContents();_1f3=dijit.range.getSelection(this.editor.window);_1f4=_1f3.getRangeAt(0);}if(dijit.range.atBeginningOfContainer(_1f7,_1f4.startContainer,_1f4.startOffset)){if(e.shiftKey){br=doc.createElement("br");_1f5=dijit.range.create(this.editor.window);_1f7.insertBefore(br,_1f7.firstChild);_1f5.setStartBefore(br.nextSibling);_1f3.removeAllRanges();_1f3.addRange(_1f5);}else{dojo.place(br,_1f7,"before");}}else{if(dijit.range.atEndOfContainer(_1f7,_1f4.startContainer,_1f4.startOffset)){_1f5=dijit.range.create(this.editor.window);br=doc.createElement("br");if(e.shiftKey){_1f7.appendChild(br);_1f7.appendChild(doc.createTextNode(" "));_1f5.setStart(_1f7.lastChild,0);}else{dojo.place(br,_1f7,"after");_1f5.setStartAfter(_1f7);}_1f3.removeAllRanges();_1f3.addRange(_1f5);}else{return true;}}}else{dijit._editor.RichText.prototype.execCommand.call(this.editor,"inserthtml","<br>");}return false;}var _1f8=true;_1f3=dijit.range.getSelection(this.editor.window);_1f4=_1f3.getRangeAt(0);if(!_1f4.collapsed){_1f4.deleteContents();_1f3=dijit.range.getSelection(this.editor.window);_1f4=_1f3.getRangeAt(0);}var _1f9=dijit.range.getBlockAncestor(_1f4.endContainer,null,this.editor.editNode);var _1fa=_1f9.blockNode;if((this._checkListLater=(_1fa&&(_1fa.nodeName=="LI"||_1fa.parentNode.nodeName=="LI")))){if(dojo.isMoz){this._pressedEnterInBlock=_1fa;}if(/^(\s|&nbsp;|\xA0|<span\b[^>]*\bclass=['"]Apple-style-span['"][^>]*>(\s|&nbsp;|\xA0)<\/span>)?(<br>)?$/.test(_1fa.innerHTML)){_1fa.innerHTML="";if(dojo.isWebKit){_1f5=dijit.range.create(this.editor.window);_1f5.setStart(_1fa,0);_1f3.removeAllRanges();_1f3.addRange(_1f5);}this._checkListLater=false;}return true;}if(!_1f9.blockNode||_1f9.blockNode===this.editor.editNode){try{dijit._editor.RichText.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter);}catch(e2){}_1f9={blockNode:dojo.withGlobal(this.editor.window,"getAncestorElement",dijit._editor.selection,[this.blockNodeForEnter]),blockContainer:this.editor.editNode};if(_1f9.blockNode){if(_1f9.blockNode!=this.editor.editNode&&(!(_1f9.blockNode.textContent||_1f9.blockNode.innerHTML).replace(/^\s+|\s+$/g,"").length)){this.removeTrailingBr(_1f9.blockNode);return false;}}else{_1f9.blockNode=this.editor.editNode;}_1f3=dijit.range.getSelection(this.editor.window);_1f4=_1f3.getRangeAt(0);}var _1fb=doc.createElement(this.blockNodeForEnter);_1fb.innerHTML=this.bogusHtmlContent;this.removeTrailingBr(_1f9.blockNode);if(dijit.range.atEndOfContainer(_1f9.blockNode,_1f4.endContainer,_1f4.endOffset)){if(_1f9.blockNode===_1f9.blockContainer){_1f9.blockNode.appendChild(_1fb);}else{dojo.place(_1fb,_1f9.blockNode,"after");}_1f8=false;_1f5=dijit.range.create(this.editor.window);_1f5.setStart(_1fb,0);_1f3.removeAllRanges();_1f3.addRange(_1f5);if(this.editor.height){dijit.scrollIntoView(_1fb);}}else{if(dijit.range.atBeginningOfContainer(_1f9.blockNode,_1f4.startContainer,_1f4.startOffset)){dojo.place(_1fb,_1f9.blockNode,_1f9.blockNode===_1f9.blockContainer?"first":"before");if(_1fb.nextSibling&&this.editor.height){_1f5=dijit.range.create(this.editor.window);_1f5.setStart(_1fb.nextSibling,0);_1f3.removeAllRanges();_1f3.addRange(_1f5);dijit.scrollIntoView(_1fb.nextSibling);}_1f8=false;}else{if(dojo.isMoz){this._pressedEnterInBlock=_1f9.blockNode;}}}return _1f8;},removeTrailingBr:function(_1fc){var para=/P|DIV|LI/i.test(_1fc.tagName)?_1fc:dijit._editor.selection.getParentOfType(_1fc,["P","DIV","LI"]);if(!para){return;}if(para.lastChild){if((para.childNodes.length>1&&para.lastChild.nodeType==3&&/^[\s\xAD]*$/.test(para.lastChild.nodeValue))||para.lastChild.tagName=="BR"){dojo.destroy(para.lastChild);}}if(!para.childNodes.length){para.innerHTML=this.bogusHtmlContent;}},_fixNewLineBehaviorForIE:function(d){var doc=this.editor.document;if(doc.__INSERTED_EDITIOR_NEWLINE_CSS===undefined){var _1fd=dojo.create("style",{type:"text/css"},doc.getElementsByTagName("head")[0]);_1fd.styleSheet.cssText="p{margin:0;}";this.editor.document.__INSERTED_EDITIOR_NEWLINE_CSS=true;}return d;},regularPsToSingleLinePs:function(_1fe,_1ff){function _200(el){function _201(_202){var newP=_202[0].ownerDocument.createElement("p");_202[0].parentNode.insertBefore(newP,_202[0]);dojo.forEach(_202,function(node){newP.appendChild(node);});};var _203=0;var _204=[];var _205;while(_203<el.childNodes.length){_205=el.childNodes[_203];if(_205.nodeType==3||(_205.nodeType==1&&_205.nodeName!="BR"&&dojo.style(_205,"display")!="block")){_204.push(_205);}else{var _206=_205.nextSibling;if(_204.length){_201(_204);_203=(_203+1)-_204.length;if(_205.nodeName=="BR"){dojo.destroy(_205);}}_204=[];}_203++;}if(_204.length){_201(_204);}};function _207(el){var _208=null;var _209=[];var _20a=el.childNodes.length-1;for(var i=_20a;i>=0;i--){_208=el.childNodes[i];if(_208.nodeName=="BR"){var newP=_208.ownerDocument.createElement("p");dojo.place(newP,el,"after");if(_209.length==0&&i!=_20a){newP.innerHTML="&nbsp;";}dojo.forEach(_209,function(node){newP.appendChild(node);});dojo.destroy(_208);_209=[];}else{_209.unshift(_208);}}};var _20b=[];var ps=_1fe.getElementsByTagName("p");dojo.forEach(ps,function(p){_20b.push(p);});dojo.forEach(_20b,function(p){var _20c=p.previousSibling;if((_20c)&&(_20c.nodeType==1)&&(_20c.nodeName=="P"||dojo.style(_20c,"display")!="block")){var newP=p.parentNode.insertBefore(this.document.createElement("p"),p);newP.innerHTML=_1ff?"":"&nbsp;";}_207(p);},this.editor);_200(_1fe);return _1fe;},singleLinePsToRegularPs:function(_20d){function _20e(node){var ps=node.getElementsByTagName("p");var _20f=[];for(var i=0;i<ps.length;i++){var p=ps[i];var _210=false;for(var k=0;k<_20f.length;k++){if(_20f[k]===p.parentNode){_210=true;break;}}if(!_210){_20f.push(p.parentNode);}}return _20f;};function _211(node){return (!node.childNodes.length||node.innerHTML=="&nbsp;");};var _212=_20e(_20d);for(var i=0;i<_212.length;i++){var _213=_212[i];var _214=null;var node=_213.firstChild;var _215=null;while(node){if(node.nodeType!=1||node.tagName!="P"||(node.getAttributeNode("style")||{}).specified){_214=null;}else{if(_211(node)){_215=node;_214=null;}else{if(_214==null){_214=node;}else{if((!_214.lastChild||_214.lastChild.nodeName!="BR")&&(node.firstChild)&&(node.firstChild.nodeName!="BR")){_214.appendChild(this.editor.document.createElement("br"));}while(node.firstChild){_214.appendChild(node.firstChild);}_215=node;}}}node=node.nextSibling;if(_215){dojo.destroy(_215);_215=null;}}}return _20d;}});}if(!dojo._hasResource["dijit.Editor"]){dojo._hasResource["dijit.Editor"]=true;dojo.provide("dijit.Editor");dojo.declare("dijit.Editor",dijit._editor.RichText,{plugins:null,extraPlugins:null,constructor:function(){if(!dojo.isArray(this.plugins)){this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|","insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull","dijit._editor.plugins.EnterKeyHandling"];}this._plugins=[];this._editInterval=this.editActionInterval*1000;if(dojo.isIE){this.events.push("onBeforeDeactivate");this.events.push("onBeforeActivate");}},postCreate:function(){if(this.customUndo){dojo["require"]("dijit._editor.range");this._steps=this._steps.slice(0);this._undoedSteps=this._undoedSteps.slice(0);}if(dojo.isArray(this.extraPlugins)){this.plugins=this.plugins.concat(this.extraPlugins);}this.inherited(arguments);this.commands=dojo.i18n.getLocalization("dijit._editor","commands",this.lang);if(!this.toolbar){this.toolbar=new dijit.Toolbar({});dojo.place(this.toolbar.domNode,this.editingArea,"before");}dojo.forEach(this.plugins,this.addPlugin,this);this.onNormalizedDisplayChanged();this.toolbar.startup();},destroy:function(){dojo.forEach(this._plugins,function(p){if(p&&p.destroy){p.destroy();}});this._plugins=[];this.toolbar.destroyRecursive();delete this.toolbar;this.inherited(arguments);},addPlugin:function(_216,_217){var args=dojo.isString(_216)?{name:_216}:_216;if(!args.setEditor){var o={"args":args,"plugin":null,"editor":this};dojo.publish(dijit._scopeName+".Editor.getPlugin",[o]);if(!o.plugin){var pc=dojo.getObject(args.name);if(pc){o.plugin=new pc(args);}}if(!o.plugin){console.warn("Cannot find plugin",_216);return;}_216=o.plugin;}if(arguments.length>1){this._plugins[_217]=_216;}else{this._plugins.push(_216);}_216.setEditor(this);if(dojo.isFunction(_216.setToolbar)){_216.setToolbar(this.toolbar);}},startup:function(){},resize:function(size){if(size){dijit.layout._LayoutWidget.prototype.resize.apply(this,arguments);}},layout:function(){this.editingArea.style.height=(this._contentBox.h-dojo.marginBox(this.toolbar.domNode).h)+"px";if(this.iframe){this.iframe.style.height="100%";}this._layoutMode=true;},_onIEMouseDown:function(e){var _218=this.document.body.componentFromPoint(e.x,e.y);if(!_218){delete this._savedSelection;if(e.target.tagName=="BODY"){setTimeout(dojo.hitch(this,"placeCursorAtEnd"),0);}this.inherited(arguments);}},onBeforeActivate:function(e){this._restoreSelection();},onBeforeDeactivate:function(e){if(this.customUndo){this.endEditing(true);}if(e.target.tagName!="BODY"){this._saveSelection();}},customUndo:dojo.isIE,editActionInterval:3,beginEditing:function(cmd){if(!this._inEditing){this._inEditing=true;this._beginEditing(cmd);}if(this.editActionInterval>0){if(this._editTimer){clearTimeout(this._editTimer);}this._editTimer=setTimeout(dojo.hitch(this,this.endEditing),this._editInterval);}},_steps:[],_undoedSteps:[],execCommand:function(cmd){if(this.customUndo&&(cmd=="undo"||cmd=="redo")){return this[cmd]();}else{if(this.customUndo){this.endEditing();this._beginEditing();}var r;try{r=this.inherited("execCommand",arguments);if(dojo.isWebKit&&cmd=="paste"&&!r){throw {code:1011};}}catch(e){if(e.code==1011&&/copy|cut|paste/.test(cmd)){var sub=dojo.string.substitute,_219={cut:"X",copy:"C",paste:"V"};alert(sub(this.commands.systemShortcut,[this.commands[cmd],sub(this.commands[dojo.isMac?"appleKey":"ctrlKey"],[_219[cmd]])]));}r=false;}if(this.customUndo){this._endEditing();}return r;}},queryCommandEnabled:function(cmd){if(this.customUndo&&(cmd=="undo"||cmd=="redo")){return cmd=="undo"?(this._steps.length>1):(this._undoedSteps.length>0);}else{return this.inherited("queryCommandEnabled",arguments);}},_moveToBookmark:function(b){var _21a=b.mark;var mark=b.mark;var col=b.isCollapsed;if(dojo.isIE){if(dojo.isArray(mark)){_21a=[];dojo.forEach(mark,function(n){_21a.push(dijit.range.getNode(n,this.editNode));},this);}}else{var r=dijit.range.create(this.window);r.setStart(dijit.range.getNode(b.startContainer,this.editNode),b.startOffset);r.setEnd(dijit.range.getNode(b.endContainer,this.editNode),b.endOffset);_21a=r;}dojo.withGlobal(this.window,"moveToBookmark",dijit,[{mark:_21a,isCollapsed:col}]);},_changeToStep:function(from,to){this.setValue(to.text);var b=to.bookmark;if(!b){return;}this._moveToBookmark(b);},undo:function(){this.endEditing(true);var s=this._steps.pop();if(this._steps.length>0){this.focus();this._changeToStep(s,this._steps[this._steps.length-1]);this._undoedSteps.push(s);this.onDisplayChanged();return true;}return false;},redo:function(){this.endEditing(true);var s=this._undoedSteps.pop();if(s&&this._steps.length>0){this.focus();this._changeToStep(this._steps[this._steps.length-1],s);this._steps.push(s);this.onDisplayChanged();return true;}return false;},endEditing:function(_21b){if(this._editTimer){clearTimeout(this._editTimer);}if(this._inEditing){this._endEditing(_21b);this._inEditing=false;}},_getBookmark:function(){var b=dojo.withGlobal(this.window,dijit.getBookmark);var tmp=[];if(b.mark){var mark=b.mark;if(dojo.isIE){if(dojo.isArray(mark)){dojo.forEach(mark,function(n){tmp.push(dijit.range.getIndex(n,this.editNode).o);},this);b.mark=tmp;}}else{tmp=dijit.range.getIndex(mark.startContainer,this.editNode).o;b.mark={startContainer:tmp,startOffset:mark.startOffset,endContainer:mark.endContainer===mark.startContainer?tmp:dijit.range.getIndex(mark.endContainer,this.editNode).o,endOffset:mark.endOffset};}}return b;},_beginEditing:function(cmd){if(this._steps.length===0){this._steps.push({"text":this.savedContent,"bookmark":this._getBookmark()});}},_endEditing:function(_21c){var v=this.getValue(true);this._undoedSteps=[];this._steps.push({text:v,bookmark:this._getBookmark()});},onKeyDown:function(e){if(!dojo.isIE&&!this.iframe&&e.keyCode==dojo.keys.TAB&&!this.tabIndent){this._saveSelection();}if(!this.customUndo){this.inherited(arguments);return;}var k=e.keyCode,ks=dojo.keys;if(e.ctrlKey&&!e.altKey){if(k==90||k==122){dojo.stopEvent(e);this.undo();return;}else{if(k==89||k==121){dojo.stopEvent(e);this.redo();return;}}}this.inherited(arguments);switch(k){case ks.ENTER:case ks.BACKSPACE:case ks.DELETE:this.beginEditing();break;case 88:case 86:if(e.ctrlKey&&!e.altKey&&!e.metaKey){this.endEditing();if(e.keyCode==88){this.beginEditing("cut");setTimeout(dojo.hitch(this,this.endEditing),1);}else{this.beginEditing("paste");setTimeout(dojo.hitch(this,this.endEditing),1);}break;}default:if(!e.ctrlKey&&!e.altKey&&!e.metaKey&&(e.keyCode<dojo.keys.F1||e.keyCode>dojo.keys.F15)){this.beginEditing();break;}case ks.ALT:this.endEditing();break;case ks.UP_ARROW:case ks.DOWN_ARROW:case ks.LEFT_ARROW:case ks.RIGHT_ARROW:case ks.HOME:case ks.END:case ks.PAGE_UP:case ks.PAGE_DOWN:this.endEditing(true);break;case ks.CTRL:case ks.SHIFT:case ks.TAB:break;}},_onBlur:function(){this.inherited("_onBlur",arguments);this.endEditing(true);},_saveSelection:function(){this._savedSelection=this._getBookmark();},_restoreSelection:function(){if(this._savedSelection){if(dojo.withGlobal(this.window,"isCollapsed",dijit)){this._moveToBookmark(this._savedSelection);}delete this._savedSelection;}},onClick:function(){this.endEditing(true);this.inherited(arguments);}});dojo.subscribe(dijit._scopeName+".Editor.getPlugin",null,function(o){if(o.plugin){return;}var args=o.args,p;var _21d=dijit._editor._Plugin;var name=args.name;switch(name){case "undo":case "redo":case "cut":case "copy":case "paste":case "insertOrderedList":case "insertUnorderedList":case "indent":case "outdent":case "justifyCenter":case "justifyFull":case "justifyLeft":case "justifyRight":case "delete":case "selectAll":case "removeFormat":case "unlink":case "insertHorizontalRule":p=new _21d({command:name});break;case "bold":case "italic":case "underline":case "strikethrough":case "subscript":case "superscript":p=new _21d({buttonClass:dijit.form.ToggleButton,command:name});break;case "|":p=new _21d({button:new dijit.ToolbarSeparator()});}o.plugin=p;});}if(!dojo._hasResource["dijit.MenuItem"]){dojo._hasResource["dijit.MenuItem"]=true;dojo.provide("dijit.MenuItem");dojo.declare("dijit.MenuItem",[dijit._Widget,dijit._Templated,dijit._Contained],{templateString:dojo.cache("dijit","templates/MenuItem.html","<tr class=\"dijitReset dijitMenuItem\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitem\" tabIndex=\"-1\"\n\t\tdojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<td class=\"dijitReset\" waiRole=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon\" dojoAttachPoint=\"iconNode\">\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" dojoAttachPoint=\"containerNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" dojoAttachPoint=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" waiRole=\"presentation\">\n\t\t<div dojoAttachPoint=\"arrowWrapper\" style=\"visibility: hidden\">\n\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuExpand\">\n\t\t\t<span class=\"dijitMenuExpandA11y\">+</span>\n\t\t</div>\n\t</td>\n</tr>\n"),attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{label:{node:"containerNode",type:"innerHTML"},iconClass:{node:"iconNode",type:"class"}}),label:"",iconClass:"",accelKey:"",disabled:false,_fillContent:function(_21e){if(_21e&&!("label" in this.params)){this.attr("label",_21e.innerHTML);}},postCreate:function(){dojo.setSelectable(this.domNode,false);var _21f=this.id+"_text";dojo.attr(this.containerNode,"id",_21f);if(this.accelKeyNode){dojo.attr(this.accelKeyNode,"id",this.id+"_accel");_21f+=" "+this.id+"_accel";}dijit.setWaiState(this.domNode,"labelledby",_21f);},_onHover:function(){dojo.addClass(this.domNode,"dijitMenuItemHover");this.getParent().onItemHover(this);},_onUnhover:function(){dojo.removeClass(this.domNode,"dijitMenuItemHover");this.getParent().onItemUnhover(this);},_onClick:function(evt){this.getParent().onItemClick(this,evt);dojo.stopEvent(evt);},onClick:function(evt){},focus:function(){try{if(dojo.isIE==8){this.containerNode.focus();}dijit.focus(this.focusNode);}catch(e){}},_onFocus:function(){this._setSelected(true);this.getParent()._onItemFocus(this);this.inherited(arguments);},_setSelected:function(_220){dojo.toggleClass(this.domNode,"dijitMenuItemSelected",_220);},setLabel:function(_221){dojo.deprecated("dijit.MenuItem.setLabel() is deprecated. Use attr('label', ...) instead.","","2.0");this.attr("label",_221);},setDisabled:function(_222){dojo.deprecated("dijit.Menu.setDisabled() is deprecated. Use attr('disabled', bool) instead.","","2.0");this.attr("disabled",_222);},_setDisabledAttr:function(_223){this.disabled=_223;dojo[_223?"addClass":"removeClass"](this.domNode,"dijitMenuItemDisabled");dijit.setWaiState(this.focusNode,"disabled",_223?"true":"false");},_setAccelKeyAttr:function(_224){this.accelKey=_224;this.accelKeyNode.style.display=_224?"":"none";this.accelKeyNode.innerHTML=_224;dojo.attr(this.containerNode,"colSpan",_224?"1":"2");}});}if(!dojo._hasResource["dijit.PopupMenuItem"]){dojo._hasResource["dijit.PopupMenuItem"]=true;dojo.provide("dijit.PopupMenuItem");dojo.declare("dijit.PopupMenuItem",dijit.MenuItem,{_fillContent:function(){if(this.srcNodeRef){var _225=dojo.query("*",this.srcNodeRef);dijit.PopupMenuItem.superclass._fillContent.call(this,_225[0]);this.dropDownContainer=this.srcNodeRef;}},startup:function(){if(this._started){return;}this.inherited(arguments);if(!this.popup){var node=dojo.query("[widgetId]",this.dropDownContainer)[0];this.popup=dijit.byNode(node);}dojo.body().appendChild(this.popup.domNode);this.popup.domNode.style.display="none";if(this.arrowWrapper){dojo.style(this.arrowWrapper,"visibility","");}dijit.setWaiState(this.focusNode,"haspopup","true");},destroyDescendants:function(){if(this.popup){if(!this.popup._destroyed){this.popup.destroyRecursive();}delete this.popup;}this.inherited(arguments);}});}if(!dojo._hasResource["dijit.CheckedMenuItem"]){dojo._hasResource["dijit.CheckedMenuItem"]=true;dojo.provide("dijit.CheckedMenuItem");dojo.declare("dijit.CheckedMenuItem",dijit.MenuItem,{templateString:dojo.cache("dijit","templates/CheckedMenuItem.html","<tr class=\"dijitReset dijitMenuItem\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitemcheckbox\" tabIndex=\"-1\"\n\t\tdojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<td class=\"dijitReset\" waiRole=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon dijitCheckedMenuItemIcon\" dojoAttachPoint=\"iconNode\">\n\t\t<span class=\"dijitCheckedMenuItemIconChar\">&#10003;</span>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" dojoAttachPoint=\"containerNode,labelNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" dojoAttachPoint=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" waiRole=\"presentation\">\n\t</td>\n</tr>\n"),checked:false,_setCheckedAttr:function(_226){dojo.toggleClass(this.domNode,"dijitCheckedMenuItemChecked",_226);dijit.setWaiState(this.domNode,"checked",_226);this.checked=_226;},onChange:function(_227){},_onClick:function(e){if(!this.disabled){this.attr("checked",!this.checked);this.onChange(this.checked);}this.inherited(arguments);}});}if(!dojo._hasResource["dijit.MenuSeparator"]){dojo._hasResource["dijit.MenuSeparator"]=true;dojo.provide("dijit.MenuSeparator");dojo.declare("dijit.MenuSeparator",[dijit._Widget,dijit._Templated,dijit._Contained],{templateString:dojo.cache("dijit","templates/MenuSeparator.html","<tr class=\"dijitMenuSeparator\">\n\t<td colspan=\"4\">\n\t\t<div class=\"dijitMenuSeparatorTop\"></div>\n\t\t<div class=\"dijitMenuSeparatorBottom\"></div>\n\t</td>\n</tr>\n"),postCreate:function(){dojo.setSelectable(this.domNode,false);},isFocusable:function(){return false;}});}if(!dojo._hasResource["dijit.Menu"]){dojo._hasResource["dijit.Menu"]=true;dojo.provide("dijit.Menu");dojo.declare("dijit._MenuBase",[dijit._Widget,dijit._Templated,dijit._KeyNavContainer],{parentMenu:null,popupDelay:500,startup:function(){if(this._started){return;}dojo.forEach(this.getChildren(),function(_228){_228.startup();});this.startupKeyNavChildren();this.inherited(arguments);},onExecute:function(){},onCancel:function(_229){},_moveToPopup:function(evt){if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled){this.focusedChild._onClick(evt);}else{var _22a=this._getTopMenu();if(_22a&&_22a._isMenuBar){_22a.focusNext();}}},_onPopupHover:function(evt){if(this.currentPopup&&this.currentPopup._pendingClose_timer){var _22b=this.currentPopup.parentMenu;if(_22b.focusedChild){_22b.focusedChild._setSelected(false);}_22b.focusedChild=this.currentPopup.from_item;_22b.focusedChild._setSelected(true);this._stopPendingCloseTimer(this.currentPopup);}},onItemHover:function(item){if(this.isActive){this.focusChild(item);if(this.focusedChild.popup&&!this.focusedChild.disabled&&!this.hover_timer){this.hover_timer=setTimeout(dojo.hitch(this,"_openPopup"),this.popupDelay);}}if(this.focusedChild){this.focusChild(item);}this._hoveredChild=item;},_onChildBlur:function(item){this._stopPopupTimer();item._setSelected(false);var _22c=item.popup;if(_22c){this._stopPendingCloseTimer(_22c);_22c._pendingClose_timer=setTimeout(function(){_22c._pendingClose_timer=null;if(_22c.parentMenu){_22c.parentMenu.currentPopup=null;}dijit.popup.close(_22c);},this.popupDelay);}},onItemUnhover:function(item){if(this.isActive){this._stopPopupTimer();}if(this._hoveredChild==item){this._hoveredChild=null;}},_stopPopupTimer:function(){if(this.hover_timer){clearTimeout(this.hover_timer);this.hover_timer=null;}},_stopPendingCloseTimer:function(_22d){if(_22d._pendingClose_timer){clearTimeout(_22d._pendingClose_timer);_22d._pendingClose_timer=null;}},_stopFocusTimer:function(){if(this._focus_timer){clearTimeout(this._focus_timer);this._focus_timer=null;}},_getTopMenu:function(){for(var top=this;top.parentMenu;top=top.parentMenu){}return top;},onItemClick:function(item,evt){if(item.disabled){return false;}if(typeof this.isShowingNow=="undefined"){this._markActive();}this.focusChild(item);if(item.popup){this._openPopup();}else{this.onExecute();item.onClick(evt);}},_openPopup:function(){this._stopPopupTimer();var _22e=this.focusedChild;if(!_22e){return;}var _22f=_22e.popup;if(_22f.isShowingNow){return;}if(this.currentPopup){this._stopPendingCloseTimer(this.currentPopup);dijit.popup.close(this.currentPopup);}_22f.parentMenu=this;_22f.from_item=_22e;var self=this;dijit.popup.open({parent:this,popup:_22f,around:_22e.domNode,orient:this._orient||(this.isLeftToRight()?{"TR":"TL","TL":"TR","BR":"BL","BL":"BR"}:{"TL":"TR","TR":"TL","BL":"BR","BR":"BL"}),onCancel:function(){self.focusChild(_22e);self._cleanUp();_22e._setSelected(true);self.focusedChild=_22e;},onExecute:dojo.hitch(this,"_cleanUp")});this.currentPopup=_22f;_22f.connect(_22f.domNode,"onmouseenter",dojo.hitch(self,"_onPopupHover"));if(_22f.focus){_22f._focus_timer=setTimeout(dojo.hitch(_22f,function(){this._focus_timer=null;this.focus();}),0);}},_markActive:function(){this.isActive=true;dojo.addClass(this.domNode,"dijitMenuActive");dojo.removeClass(this.domNode,"dijitMenuPassive");},onOpen:function(e){this.isShowingNow=true;this._markActive();},_markInactive:function(){this.isActive=false;dojo.removeClass(this.domNode,"dijitMenuActive");dojo.addClass(this.domNode,"dijitMenuPassive");},onClose:function(){this._stopFocusTimer();this._markInactive();this.isShowingNow=false;this.parentMenu=null;},_closeChild:function(){this._stopPopupTimer();if(this.focusedChild){this.focusedChild._setSelected(false);this.focusedChild._onUnhover();this.focusedChild=null;}if(this.currentPopup){dijit.popup.close(this.currentPopup);this.currentPopup=null;}},_onItemFocus:function(item){if(this._hoveredChild&&this._hoveredChild!=item){this._hoveredChild._onUnhover();}},_onBlur:function(){this._cleanUp();this.inherited(arguments);},_cleanUp:function(){this._closeChild();if(typeof this.isShowingNow=="undefined"){this._markInactive();}}});dojo.declare("dijit.Menu",dijit._MenuBase,{constructor:function(){this._bindings=[];},templateString:dojo.cache("dijit","templates/Menu.html","<table class=\"dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable\" waiRole=\"menu\" tabIndex=\"${tabIndex}\" dojoAttachEvent=\"onkeypress:_onKeyPress\">\n\t<tbody class=\"dijitReset\" dojoAttachPoint=\"containerNode\"></tbody>\n</table>\n"),targetNodeIds:[],contextMenuForWindow:false,leftClickToOpen:false,refocus:true,_contextMenuWithMouse:false,postCreate:function(){if(this.contextMenuForWindow){this.bindDomNode(dojo.body());}else{dojo.forEach(this.targetNodeIds,this.bindDomNode,this);}var k=dojo.keys,l=this.isLeftToRight();this._openSubMenuKey=l?k.RIGHT_ARROW:k.LEFT_ARROW;this._closeSubMenuKey=l?k.LEFT_ARROW:k.RIGHT_ARROW;this.connectKeyNavHandlers([k.UP_ARROW],[k.DOWN_ARROW]);},_onKeyPress:function(evt){if(evt.ctrlKey||evt.altKey){return;}switch(evt.charOrCode){case this._openSubMenuKey:this._moveToPopup(evt);dojo.stopEvent(evt);break;case this._closeSubMenuKey:if(this.parentMenu){if(this.parentMenu._isMenuBar){this.parentMenu.focusPrev();}else{this.onCancel(false);}}else{dojo.stopEvent(evt);}break;}},_iframeContentWindow:function(_230){var win=dijit.getDocumentWindow(this._iframeContentDocument(_230))||this._iframeContentDocument(_230)["__parent__"]||(_230.name&&dojo.doc.frames[_230.name])||null;return win;},_iframeContentDocument:function(_231){var doc=_231.contentDocument||(_231.contentWindow&&_231.contentWindow.document)||(_231.name&&dojo.doc.frames[_231.name]&&dojo.doc.frames[_231.name].document)||null;return doc;},bindDomNode:function(node){node=dojo.byId(node);var cn;if(node.tagName.toLowerCase()=="iframe"){var _232=node,win=this._iframeContentWindow(_232);cn=dojo.withGlobal(win,dojo.body);}else{cn=(node==dojo.body()?dojo.doc.documentElement:node);}var _233={node:node,iframe:_232};dojo.attr(node,"_dijitMenu"+this.id,this._bindings.push(_233));var _234=dojo.hitch(this,function(cn){return [dojo.connect(cn,(this.leftClickToOpen)?"onclick":"oncontextmenu",this,function(evt){this._openMyself(evt,cn,_232);}),dojo.connect(cn,"onkeydown",this,"_contextKey"),dojo.connect(cn,"onmousedown",this,"_contextMouse")];});_233.connects=cn?_234(cn):[];if(_232){_233.onloadHandler=dojo.hitch(this,function(){var win=this._iframeContentWindow(_232);cn=dojo.withGlobal(win,dojo.body);_233.connects=_234(cn);});if(_232.addEventListener){_232.addEventListener("load",_233.onloadHandler,false);}else{_232.attachEvent("onload",_233.onloadHandler);}}},unBindDomNode:function(_235){var node;try{node=dojo.byId(_235);}catch(e){return;}var _236="_dijitMenu"+this.id;if(node&&dojo.hasAttr(node,_236)){var bid=dojo.attr(node,_236)-1,b=this._bindings[bid];dojo.forEach(b.connects,dojo.disconnect);var _237=b.iframe;if(_237){if(_237.removeEventListener){_237.removeEventListener("load",b.onloadHandler,false);}else{_237.detachEvent("onload",b.onloadHandler);}}dojo.removeAttr(node,_236);delete this._bindings[bid];}},_contextKey:function(e){this._contextMenuWithMouse=false;if(e.keyCode==dojo.keys.F10){dojo.stopEvent(e);if(e.shiftKey&&e.type=="keydown"){var _238={target:e.target,pageX:e.pageX,pageY:e.pageY};_238.preventDefault=_238.stopPropagation=function(){};window.setTimeout(dojo.hitch(this,function(){this._openMyself(_238);}),1);}}},_contextMouse:function(e){this._contextMenuWithMouse=true;},_openMyself:function(e,node,_239){if(this.leftClickToOpen&&e.button>0){return;}dojo.stopEvent(e);var x,y;if(dojo.isSafari||this._contextMenuWithMouse){x=e.pageX;y=e.pageY;if(_239){var od=e.target.ownerDocument,ifc=dojo.position(_239,true),win=this._iframeContentWindow(_239),_23a=dojo.withGlobal(win,"_docScroll",dojo);var cs=dojo.getComputedStyle(_239),tp=dojo._toPixelValue,left=(dojo.isIE&&dojo.isQuirks?0:tp(_239,cs.paddingLeft))+(dojo.isIE&&dojo.isQuirks?tp(_239,cs.borderLeftWidth):0),top=(dojo.isIE&&dojo.isQuirks?0:tp(_239,cs.paddingTop))+(dojo.isIE&&dojo.isQuirks?tp(_239,cs.borderTopWidth):0);x+=ifc.x+left-_23a.x;y+=ifc.y+top-_23a.y;}}else{var _23b=dojo.position(e.target,true);x=_23b.x+10;y=_23b.y+10;}var self=this;var _23c=dijit.getFocus(this);function _23d(){if(self.refocus){dijit.focus(_23c);}dijit.popup.close(self);};dijit.popup.open({popup:this,x:x,y:y,onExecute:_23d,onCancel:_23d,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=function(){this.inherited("_onBlur",arguments);dijit.popup.close(this);};},uninitialize:function(){dojo.forEach(this._bindings,function(b){if(b){this.unBindDomNode(b.node);}},this);this.inherited(arguments);}});}if(!dojo._hasResource["dijit.MenuBar"]){dojo._hasResource["dijit.MenuBar"]=true;dojo.provide("dijit.MenuBar");dojo.declare("dijit.MenuBar",dijit._MenuBase,{templateString:dojo.cache("dijit","templates/MenuBar.html","<div class=\"dijitMenuBar dijitMenuPassive\" dojoAttachPoint=\"containerNode\" waiRole=\"menubar\" tabIndex=\"${tabIndex}\" dojoAttachEvent=\"onkeypress: _onKeyPress\"></div>\n"),_isMenuBar:true,constructor:function(){this._orient=this.isLeftToRight()?{BL:"TL"}:{BR:"TR"};},postCreate:function(){var k=dojo.keys,l=this.isLeftToRight();this.connectKeyNavHandlers(l?[k.LEFT_ARROW]:[k.RIGHT_ARROW],l?[k.RIGHT_ARROW]:[k.LEFT_ARROW]);},focusChild:function(item){var _23e=this.focusedChild,_23f=_23e&&_23e.popup&&_23e.popup.isShowingNow;this.inherited(arguments);if(_23f&&item.popup&&!item.disabled){this._openPopup();}},_onKeyPress:function(evt){if(evt.ctrlKey||evt.altKey){return;}switch(evt.charOrCode){case dojo.keys.DOWN_ARROW:this._moveToPopup(evt);dojo.stopEvent(evt);}},onItemClick:function(item,evt){if(item.popup&&item.popup.isShowingNow){item.popup.onCancel();}else{this.inherited(arguments);}}});}if(!dojo._hasResource["dijit.MenuBarItem"]){dojo._hasResource["dijit.MenuBarItem"]=true;dojo.provide("dijit.MenuBarItem");dojo.declare("dijit._MenuBarItemMixin",null,{templateString:dojo.cache("dijit","templates/MenuBarItem.html","<div class=\"dijitReset dijitInline dijitMenuItem dijitMenuItemLabel\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitem\" tabIndex=\"-1\"'\n\t\tdojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<span dojoAttachPoint=\"containerNode\"></span>\n</div>\n"),attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{label:{node:"containerNode",type:"innerHTML"}})});dojo.declare("dijit.MenuBarItem",[dijit.MenuItem,dijit._MenuBarItemMixin],{});}if(!dojo._hasResource["dijit.PopupMenuBarItem"]){dojo._hasResource["dijit.PopupMenuBarItem"]=true;dojo.provide("dijit.PopupMenuBarItem");dojo.declare("dijit.PopupMenuBarItem",[dijit.PopupMenuItem,dijit._MenuBarItemMixin],{});}if(!dojo._hasResource["dojo.regexp"]){dojo._hasResource["dojo.regexp"]=true;dojo.provide("dojo.regexp");dojo.regexp.escapeString=function(str,_240){return str.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(ch){if(_240&&_240.indexOf(ch)!=-1){return ch;}return "\\"+ch;});};dojo.regexp.buildGroupRE=function(arr,re,_241){if(!(arr instanceof Array)){return re(arr);}var b=[];for(var i=0;i<arr.length;i++){b.push(re(arr[i]));}return dojo.regexp.group(b.join("|"),_241);};dojo.regexp.group=function(_242,_243){return "("+(_243?"?:":"")+_242+")";};}if(!dojo._hasResource["dojo.number"]){dojo._hasResource["dojo.number"]=true;dojo.provide("dojo.number");dojo.number.format=function(_244,_245){_245=dojo.mixin({},_245||{});var _246=dojo.i18n.normalizeLocale(_245.locale);var _247=dojo.i18n.getLocalization("dojo.cldr","number",_246);_245.customs=_247;var _248=_245.pattern||_247[(_245.type||"decimal")+"Format"];if(isNaN(_244)||Math.abs(_244)==Infinity){return null;}return dojo.number._applyPattern(_244,_248,_245);};dojo.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;dojo.number._applyPattern=function(_249,_24a,_24b){_24b=_24b||{};var _24c=_24b.customs.group;var _24d=_24b.customs.decimal;var _24e=_24a.split(";");var _24f=_24e[0];_24a=_24e[(_249<0)?1:0]||("-"+_24f);if(_24a.indexOf("%")!=-1){_249*=100;}else{if(_24a.indexOf("‰")!=-1){_249*=1000;}else{if(_24a.indexOf("¤")!=-1){_24c=_24b.customs.currencyGroup||_24c;_24d=_24b.customs.currencyDecimal||_24d;_24a=_24a.replace(/\u00a4{1,3}/,function(_250){var prop=["symbol","currency","displayName"][_250.length-1];return _24b[prop]||_24b.currency||"";});}else{if(_24a.indexOf("E")!=-1){throw new Error("exponential notation not supported");}}}}var _251=dojo.number._numberPatternRE;var _252=_24f.match(_251);if(!_252){throw new Error("unable to find a number expression in pattern: "+_24a);}if(_24b.fractional===false){_24b.places=0;}return _24a.replace(_251,dojo.number._formatAbsolute(_249,_252[0],{decimal:_24d,group:_24c,places:_24b.places,round:_24b.round}));};dojo.number.round=function(_253,_254,_255){var _256=10/(_255||10);return (_256*+_253).toFixed(_254)/_256;};if((0.9).toFixed()==0){(function(){var _257=dojo.number.round;dojo.number.round=function(v,p,m){var d=Math.pow(10,-p||0),a=Math.abs(v);if(!v||a>=d||a*Math.pow(10,p+1)<5){d=0;}return _257(v,p,m)+(v>0?d:-d);};})();}dojo.number._formatAbsolute=function(_258,_259,_25a){_25a=_25a||{};if(_25a.places===true){_25a.places=0;}if(_25a.places===Infinity){_25a.places=6;}var _25b=_259.split(".");var _25c=(_25a.places>=0)?_25a.places:(_25b[1]&&_25b[1].length)||0;if(!(_25a.round<0)){_258=dojo.number.round(_258,_25c,_25a.round);}var _25d=String(Math.abs(_258)).split(".");var _25e=_25d[1]||"";if(_25a.places){var _25f=dojo.isString(_25a.places)&&_25a.places.indexOf(",");if(_25f){_25a.places=_25a.places.substring(_25f+1);}_25d[1]=dojo.string.pad(_25e.substr(0,_25a.places),_25a.places,"0",true);}else{if(_25b[1]&&_25a.places!==0){var pad=_25b[1].lastIndexOf("0")+1;if(pad>_25e.length){_25d[1]=dojo.string.pad(_25e,pad,"0",true);}var _260=_25b[1].length;if(_260<_25e.length){_25d[1]=_25e.substr(0,_260);}}else{if(_25d[1]){_25d.pop();}}}var _261=_25b[0].replace(",","");pad=_261.indexOf("0");if(pad!=-1){pad=_261.length-pad;if(pad>_25d[0].length){_25d[0]=dojo.string.pad(_25d[0],pad);}if(_261.indexOf("#")==-1){_25d[0]=_25d[0].substr(_25d[0].length-pad);}}var _262=_25b[0].lastIndexOf(",");var _263,_264;if(_262!=-1){_263=_25b[0].length-_262-1;var _265=_25b[0].substr(0,_262);_262=_265.lastIndexOf(",");if(_262!=-1){_264=_265.length-_262-1;}}var _266=[];for(var _267=_25d[0];_267;){var off=_267.length-_263;_266.push((off>0)?_267.substr(off):_267);_267=(off>0)?_267.slice(0,off):"";if(_264){_263=_264;delete _264;}}_25d[0]=_266.reverse().join(_25a.group||",");return _25d.join(_25a.decimal||".");};dojo.number.regexp=function(_268){return dojo.number._parseInfo(_268).regexp;};dojo.number._parseInfo=function(_269){_269=_269||{};var _26a=dojo.i18n.normalizeLocale(_269.locale);var _26b=dojo.i18n.getLocalization("dojo.cldr","number",_26a);var _26c=_269.pattern||_26b[(_269.type||"decimal")+"Format"];var _26d=_26b.group;var _26e=_26b.decimal;var _26f=1;if(_26c.indexOf("%")!=-1){_26f/=100;}else{if(_26c.indexOf("‰")!=-1){_26f/=1000;}else{var _270=_26c.indexOf("¤")!=-1;if(_270){_26d=_26b.currencyGroup||_26d;_26e=_26b.currencyDecimal||_26e;}}}var _271=_26c.split(";");if(_271.length==1){_271.push("-"+_271[0]);}var re=dojo.regexp.buildGroupRE(_271,function(_272){_272="(?:"+dojo.regexp.escapeString(_272,".")+")";return _272.replace(dojo.number._numberPatternRE,function(_273){var _274={signed:false,separator:_269.strict?_26d:[_26d,""],fractional:_269.fractional,decimal:_26e,exponent:false};var _275=_273.split(".");var _276=_269.places;if(_275.length==1||_276===0){_274.fractional=false;}else{if(_276===undefined){_276=_269.pattern?_275[1].lastIndexOf("0")+1:Infinity;}if(_276&&_269.fractional==undefined){_274.fractional=true;}if(!_269.places&&(_276<_275[1].length)){_276+=","+_275[1].length;}_274.places=_276;}var _277=_275[0].split(",");if(_277.length>1){_274.groupSize=_277.pop().length;if(_277.length>1){_274.groupSize2=_277.pop().length;}}return "("+dojo.number._realNumberRegexp(_274)+")";});},true);if(_270){re=re.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(_278,_279,_27a,_27b){var prop=["symbol","currency","displayName"][_27a.length-1];var _27c=dojo.regexp.escapeString(_269[prop]||_269.currency||"");_279=_279?"[\\s\\xa0]":"";_27b=_27b?"[\\s\\xa0]":"";if(!_269.strict){if(_279){_279+="*";}if(_27b){_27b+="*";}return "(?:"+_279+_27c+_27b+")?";}return _279+_27c+_27b;});}return {regexp:re.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:_26d,decimal:_26e,factor:_26f};};dojo.number.parse=function(_27d,_27e){var info=dojo.number._parseInfo(_27e);var _27f=(new RegExp("^"+info.regexp+"$")).exec(_27d);if(!_27f){return NaN;}var _280=_27f[1];if(!_27f[1]){if(!_27f[2]){return NaN;}_280=_27f[2];info.factor*=-1;}_280=_280.replace(new RegExp("["+info.group+"\\s\\xa0"+"]","g"),"").replace(info.decimal,".");return _280*info.factor;};dojo.number._realNumberRegexp=function(_281){_281=_281||{};if(!("places" in _281)){_281.places=Infinity;}if(typeof _281.decimal!="string"){_281.decimal=".";}if(!("fractional" in _281)||/^0/.test(_281.places)){_281.fractional=[true,false];}if(!("exponent" in _281)){_281.exponent=[true,false];}if(!("eSigned" in _281)){_281.eSigned=[true,false];}var _282=dojo.number._integerRegexp(_281);var _283=dojo.regexp.buildGroupRE(_281.fractional,function(q){var re="";if(q&&(_281.places!==0)){re="\\"+_281.decimal;if(_281.places==Infinity){re="(?:"+re+"\\d+)?";}else{re+="\\d{"+_281.places+"}";}}return re;},true);var _284=dojo.regexp.buildGroupRE(_281.exponent,function(q){if(q){return "([eE]"+dojo.number._integerRegexp({signed:_281.eSigned})+")";}return "";});var _285=_282+_283;if(_283){_285="(?:(?:"+_285+")|(?:"+_283+"))";}return _285+_284;};dojo.number._integerRegexp=function(_286){_286=_286||{};if(!("signed" in _286)){_286.signed=[true,false];}if(!("separator" in _286)){_286.separator="";}else{if(!("groupSize" in _286)){_286.groupSize=3;}}var _287=dojo.regexp.buildGroupRE(_286.signed,function(q){return q?"[-+]":"";},true);var _288=dojo.regexp.buildGroupRE(_286.separator,function(sep){if(!sep){return "(?:\\d+)";}sep=dojo.regexp.escapeString(sep);if(sep==" "){sep="\\s";}else{if(sep==" "){sep="\\s\\xa0";}}var grp=_286.groupSize,grp2=_286.groupSize2;if(grp2){var _289="(?:0|[1-9]\\d{0,"+(grp2-1)+"}(?:["+sep+"]\\d{"+grp2+"})*["+sep+"]\\d{"+grp+"})";return ((grp-grp2)>0)?"(?:"+_289+"|(?:0|[1-9]\\d{0,"+(grp-1)+"}))":_289;}return "(?:0|[1-9]\\d{0,"+(grp-1)+"}(?:["+sep+"]\\d{"+grp+"})*)";},true);return _287+_288;};}if(!dojo._hasResource["dijit.ProgressBar"]){dojo._hasResource["dijit.ProgressBar"]=true;dojo.provide("dijit.ProgressBar");dojo.declare("dijit.ProgressBar",[dijit._Widget,dijit._Templated],{progress:"0",maximum:100,places:0,indeterminate:false,name:"",templateString:dojo.cache("dijit","templates/ProgressBar.html","<div class=\"dijitProgressBar dijitProgressBarEmpty\"\n\t><div waiRole=\"progressbar\" dojoAttachPoint=\"internalProgress\" class=\"dijitProgressBarFull\"\n\t\t><div class=\"dijitProgressBarTile\"></div\n\t\t><span style=\"visibility:hidden\">&nbsp;</span\n\t></div\n\t><div dojoAttachPoint=\"label\" class=\"dijitProgressBarLabel\" id=\"${id}_label\">&nbsp;</div\n\t><img dojoAttachPoint=\"indeterminateHighContrastImage\" class=\"dijitProgressBarIndeterminateHighContrastImage\" alt=\"\"\n\t></img\n></div>\n"),_indeterminateHighContrastImagePath:dojo.moduleUrl("dijit","themes/a11y/indeterminate_progress.gif"),postCreate:function(){this.inherited(arguments);this.indeterminateHighContrastImage.setAttribute("src",this._indeterminateHighContrastImagePath.toString());this.update();},update:function(_28a){dojo.mixin(this,_28a||{});var tip=this.internalProgress;var _28b=1,_28c;if(this.indeterminate){_28c="addClass";dijit.removeWaiState(tip,"valuenow");dijit.removeWaiState(tip,"valuemin");dijit.removeWaiState(tip,"valuemax");}else{_28c="removeClass";if(String(this.progress).indexOf("%")!=-1){_28b=Math.min(parseFloat(this.progress)/100,1);this.progress=_28b*this.maximum;}else{this.progress=Math.min(this.progress,this.maximum);_28b=this.progress/this.maximum;}var text=this.report(_28b);this.label.firstChild.nodeValue=text;dijit.setWaiState(tip,"describedby",this.label.id);dijit.setWaiState(tip,"valuenow",this.progress);dijit.setWaiState(tip,"valuemin",0);dijit.setWaiState(tip,"valuemax",this.maximum);}dojo[_28c](this.domNode,"dijitProgressBarIndeterminate");tip.style.width=(_28b*100)+"%";this.onChange();},_setValueAttr:function(v){if(v==Infinity){this.update({indeterminate:true});}else{this.update({indeterminate:false,progress:v});}},_getValueAttr:function(){return this.progress;},report:function(_28d){return dojo.number.format(_28d,{type:"percent",places:this.places,locale:this.lang});},onChange:function(){}});}if(!dojo._hasResource["dijit.TitlePane"]){dojo._hasResource["dijit.TitlePane"]=true;dojo.provide("dijit.TitlePane");dojo.declare("dijit.TitlePane",[dijit.layout.ContentPane,dijit._Templated],{title:"",open:true,toggleable:true,tabIndex:"0",duration:dijit.defaultDuration,baseClass:"dijitTitlePane",templateString:dojo.cache("dijit","templates/TitlePane.html","<div class=\"${baseClass}\">\n\t<div dojoAttachEvent=\"onclick:_onTitleClick, onkeypress:_onTitleKey, onfocus:_handleFocus, onblur:_handleFocus, onmouseenter:_onTitleEnter, onmouseleave:_onTitleLeave\"\n\t\t\tclass=\"dijitTitlePaneTitle\" dojoAttachPoint=\"titleBarNode,focusNode\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" dojoAttachPoint=\"arrowNode\" class=\"dijitArrowNode\" waiRole=\"presentation\"\n\t\t><span dojoAttachPoint=\"arrowNodeInner\" class=\"dijitArrowNodeInner\"></span\n\t\t><span dojoAttachPoint=\"titleNode\" class=\"dijitTitlePaneTextNode\"></span>\n\t</div>\n\t<div class=\"dijitTitlePaneContentOuter\" dojoAttachPoint=\"hideNode\" waiRole=\"presentation\">\n\t\t<div class=\"dijitReset\" dojoAttachPoint=\"wipeNode\" waiRole=\"presentation\">\n\t\t\t<div class=\"dijitTitlePaneContentInner\" dojoAttachPoint=\"containerNode\" waiRole=\"region\" tabindex=\"-1\" id=\"${id}_pane\">\n\t\t\t\t<!-- nested divs because wipeIn()/wipeOut() doesn't work right on node w/padding etc. Put padding on inner div. -->\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n"),attributeMap:dojo.delegate(dijit.layout.ContentPane.prototype.attributeMap,{title:{node:"titleNode",type:"innerHTML"},tooltip:{node:"focusNode",type:"attribute",attribute:"title"},id:""}),postCreate:function(){if(!this.open){this.hideNode.style.display=this.wipeNode.style.display="none";}this._setCss();dojo.setSelectable(this.titleNode,false);dijit.setWaiState(this.containerNode,"hidden",this.open?"false":"true");dijit.setWaiState(this.focusNode,"pressed",this.open?"true":"false");var _28e=this.hideNode,_28f=this.wipeNode;this._wipeIn=dojo.fx.wipeIn({node:this.wipeNode,duration:this.duration,beforeBegin:function(){_28e.style.display="";}});this._wipeOut=dojo.fx.wipeOut({node:this.wipeNode,duration:this.duration,onEnd:function(){_28e.style.display="none";}});this.inherited(arguments);},_setOpenAttr:function(open){if(this.open!==open){this.toggle();}},_setToggleableAttr:function(_290){this.toggleable=_290;dijit.setWaiRole(this.focusNode,_290?"button":"heading");dojo.attr(this.focusNode,"tabIndex",_290?this.tabIndex:"-1");if(_290){dijit.setWaiState(this.focusNode,"controls",this.id+"_pane");}this._setCss();},_setContentAttr:function(_291){if(!this.open||!this._wipeOut||this._wipeOut.status()=="playing"){this.inherited(arguments);}else{if(this._wipeIn&&this._wipeIn.status()=="playing"){this._wipeIn.stop();}dojo.marginBox(this.wipeNode,{h:dojo.marginBox(this.wipeNode).h});this.inherited(arguments);if(this._wipeIn){this._wipeIn.play();}else{this.hideNode.style.display="";}}},toggle:function(){dojo.forEach([this._wipeIn,this._wipeOut],function(_292){if(_292&&_292.status()=="playing"){_292.stop();}});var anim=this[this.open?"_wipeOut":"_wipeIn"];if(anim){anim.play();}else{this.hideNode.style.display=this.open?"":"none";}this.open=!this.open;dijit.setWaiState(this.containerNode,"hidden",this.open?"false":"true");dijit.setWaiState(this.focusNode,"pressed",this.open?"true":"false");if(this.open){this._onShow();}else{this.onHide();}this._setCss();},_setCss:function(){var node=this.titleBarNode||this.focusNode;if(this._titleBarClass){dojo.removeClass(node,this._titleBarClass);}this._titleBarClass="dijit"+(this.toggleable?"":"Fixed")+(this.open?"Open":"Closed");dojo.addClass(node,this._titleBarClass);this.arrowNodeInner.innerHTML=this.open?"-":"+";},_onTitleKey:function(e){if(e.charOrCode==dojo.keys.ENTER||e.charOrCode==" "){if(this.toggleable){this.toggle();}dojo.stopEvent(e);}else{if(e.charOrCode==dojo.keys.DOWN_ARROW&&this.open){this.containerNode.focus();e.preventDefault();}}},_onTitleEnter:function(){if(this.toggleable){dojo.addClass(this.focusNode,"dijitTitlePaneTitle-hover");}},_onTitleLeave:function(){if(this.toggleable){dojo.removeClass(this.focusNode,"dijitTitlePaneTitle-hover");}},_onTitleClick:function(){if(this.toggleable){this.toggle();}},_handleFocus:function(e){dojo.toggleClass(this.focusNode,this.baseClass+"Focused",e.type=="focus");},setTitle:function(_293){dojo.deprecated("dijit.TitlePane.setTitle() is deprecated. Use attr('title', ...) instead.","","2.0");this.attr("title",_293);}});}if(!dojo._hasResource["dijit.Tooltip"]){dojo._hasResource["dijit.Tooltip"]=true;dojo.provide("dijit.Tooltip");dojo.declare("dijit._MasterTooltip",[dijit._Widget,dijit._Templated],{duration:dijit.defaultDuration,templateString:dojo.cache("dijit","templates/Tooltip.html","<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\">\n\t<div class=\"dijitTooltipContainer dijitTooltipContents\" dojoAttachPoint=\"containerNode\" waiRole='alert'></div>\n\t<div class=\"dijitTooltipConnector\"></div>\n</div>\n"),postCreate:function(){dojo.body().appendChild(this.domNode);this.bgIframe=new dijit.BackgroundIframe(this.domNode);this.fadeIn=dojo.fadeIn({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onShow")});this.fadeOut=dojo.fadeOut({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onHide")});},show:function(_294,_295,_296){if(this.aroundNode&&this.aroundNode===_295){return;}if(this.fadeOut.status()=="playing"){this._onDeck=arguments;return;}this.containerNode.innerHTML=_294;this.domNode.style.top=(this.domNode.offsetTop+1)+"px";var pos=dijit.placeOnScreenAroundElement(this.domNode,_295,dijit.getPopupAroundAlignment((_296&&_296.length)?_296:dijit.Tooltip.defaultPosition,this.isLeftToRight()),dojo.hitch(this,"orient"));dojo.style(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=true;this.aroundNode=_295;},orient:function(node,_297,_298){node.className="dijitTooltip "+{"BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[_297+"-"+_298];},_onShow:function(){if(dojo.isIE){this.domNode.style.filter="";}},hide:function(_299){if(this._onDeck&&this._onDeck[1]==_299){this._onDeck=null;}else{if(this.aroundNode===_299){this.fadeIn.stop();this.isShowingNow=false;this.aroundNode=null;this.fadeOut.play();}else{}}},_onHide:function(){this.domNode.style.cssText="";if(this._onDeck){this.show.apply(this,this._onDeck);this._onDeck=null;}}});dijit.showTooltip=function(_29a,_29b,_29c){if(!dijit._masterTT){dijit._masterTT=new dijit._MasterTooltip();}return dijit._masterTT.show(_29a,_29b,_29c);};dijit.hideTooltip=function(_29d){if(!dijit._masterTT){dijit._masterTT=new dijit._MasterTooltip();}return dijit._masterTT.hide(_29d);};dojo.declare("dijit.Tooltip",dijit._Widget,{label:"",showDelay:400,connectId:[],position:[],constructor:function(){this._nodeConnectionsById={};},_setConnectIdAttr:function(_29e){for(var _29f in this._nodeConnectionsById){this.removeTarget(_29f);}dojo.forEach(dojo.isArrayLike(_29e)?_29e:[_29e],this.addTarget,this);},_getConnectIdAttr:function(){var ary=[];for(var id in this._nodeConnectionsById){ary.push(id);}return ary;},addTarget:function(id){var node=dojo.byId(id);if(!node){return;}if(node.id in this._nodeConnectionsById){return;}this._nodeConnectionsById[node.id]=[this.connect(node,"onmouseenter","_onTargetMouseEnter"),this.connect(node,"onmouseleave","_onTargetMouseLeave"),this.connect(node,"onfocus","_onTargetFocus"),this.connect(node,"onblur","_onTargetBlur")];if(dojo.isIE&&!node.style.zoom){node.style.zoom=1;}},removeTarget:function(node){var id=node.id||node;if(id in this._nodeConnectionsById){dojo.forEach(this._nodeConnectionsById[id],this.disconnect,this);delete this._nodeConnectionsById[id];}},postCreate:function(){dojo.addClass(this.domNode,"dijitTooltipData");},startup:function(){this.inherited(arguments);var ids=this.connectId;dojo.forEach(dojo.isArrayLike(ids)?ids:[ids],this.addTarget,this);},_onTargetMouseEnter:function(e){this._onHover(e);},_onTargetMouseLeave:function(e){this._onUnHover(e);},_onTargetFocus:function(e){this._focus=true;this._onHover(e);},_onTargetBlur:function(e){this._focus=false;this._onUnHover(e);},_onHover:function(e){if(!this._showTimer){var _2a0=e.target;this._showTimer=setTimeout(dojo.hitch(this,function(){this.open(_2a0);}),this.showDelay);}},_onUnHover:function(e){if(this._focus){return;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}this.close();},open:function(_2a1){if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}dijit.showTooltip(this.label||this.domNode.innerHTML,_2a1,this.position);this._connectNode=_2a1;this.onShow(_2a1,this.position);},close:function(){if(this._connectNode){dijit.hideTooltip(this._connectNode);delete this._connectNode;this.onHide();}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}},onShow:function(_2a2,_2a3){},onHide:function(){},uninitialize:function(){this.close();this.inherited(arguments);}});dijit.Tooltip.defaultPosition=["after","before"];}if(!dojo._hasResource["dojo.DeferredList"]){dojo._hasResource["dojo.DeferredList"]=true;dojo.provide("dojo.DeferredList");dojo.declare("dojo.DeferredList",dojo.Deferred,{constructor:function(list,_2a4,_2a5,_2a6,_2a7){this.list=list;this.resultList=new Array(this.list.length);this.chain=[];this.id=this._nextId();this.fired=-1;this.paused=0;this.results=[null,null];this.canceller=_2a7;this.silentlyCancelled=false;if(this.list.length===0&&!_2a4){this.callback(this.resultList);}this.finishedCount=0;this.fireOnOneCallback=_2a4;this.fireOnOneErrback=_2a5;this.consumeErrors=_2a6;dojo.forEach(this.list,function(d,_2a8){d.addCallback(this,function(r){this._cbDeferred(_2a8,true,r);return r;});d.addErrback(this,function(r){this._cbDeferred(_2a8,false,r);return r;});},this);},_cbDeferred:function(_2a9,_2aa,_2ab){this.resultList[_2a9]=[_2aa,_2ab];this.finishedCount+=1;if(this.fired!==0){if(_2aa&&this.fireOnOneCallback){this.callback([_2a9,_2ab]);}else{if(!_2aa&&this.fireOnOneErrback){this.errback(_2ab);}else{if(this.finishedCount==this.list.length){this.callback(this.resultList);}}}}if(!_2aa&&this.consumeErrors){_2ab=null;}return _2ab;},gatherResults:function(_2ac){var d=new dojo.DeferredList(_2ac,false,true,false);d.addCallback(function(_2ad){var ret=[];dojo.forEach(_2ad,function(_2ae){ret.push(_2ae[1]);});return ret;});return d;}});}if(!dojo._hasResource["dojo.cookie"]){dojo._hasResource["dojo.cookie"]=true;dojo.provide("dojo.cookie");dojo.cookie=function(name,_2af,_2b0){var c=document.cookie;if(arguments.length==1){var _2b1=c.match(new RegExp("(?:^|; )"+dojo.regexp.escapeString(name)+"=([^;]*)"));return _2b1?decodeURIComponent(_2b1[1]):undefined;}else{_2b0=_2b0||{};var exp=_2b0.expires;if(typeof exp=="number"){var d=new Date();d.setTime(d.getTime()+exp*24*60*60*1000);exp=_2b0.expires=d;}if(exp&&exp.toUTCString){_2b0.expires=exp.toUTCString();}_2af=encodeURIComponent(_2af);var _2b2=name+"="+_2af,_2b3;for(_2b3 in _2b0){_2b2+="; "+_2b3;var _2b4=_2b0[_2b3];if(_2b4!==true){_2b2+="="+_2b4;}}document.cookie=_2b2;}};dojo.cookie.isSupported=function(){if(!("cookieEnabled" in navigator)){this("__djCookieTest__","CookiesAllowed");navigator.cookieEnabled=this("__djCookieTest__")=="CookiesAllowed";if(navigator.cookieEnabled){this("__djCookieTest__","",{expires:-1});}}return navigator.cookieEnabled;};}if(!dojo._hasResource["dijit.tree.TreeStoreModel"]){dojo._hasResource["dijit.tree.TreeStoreModel"]=true;dojo.provide("dijit.tree.TreeStoreModel");dojo.declare("dijit.tree.TreeStoreModel",null,{store:null,childrenAttrs:["children"],newItemIdAttr:"id",labelAttr:"",root:null,query:null,deferItemLoadingUntilExpand:false,constructor:function(args){dojo.mixin(this,args);this.connects=[];var _2b5=this.store;if(!_2b5.getFeatures()["dojo.data.api.Identity"]){throw new Error("dijit.Tree: store must support dojo.data.Identity");}if(_2b5.getFeatures()["dojo.data.api.Notification"]){this.connects=this.connects.concat([dojo.connect(_2b5,"onNew",this,"onNewItem"),dojo.connect(_2b5,"onDelete",this,"onDeleteItem"),dojo.connect(_2b5,"onSet",this,"onSetItem")]);}},destroy:function(){dojo.forEach(this.connects,dojo.disconnect);},getRoot:function(_2b6,_2b7){if(this.root){_2b6(this.root);}else{this.store.fetch({query:this.query,onComplete:dojo.hitch(this,function(_2b8){if(_2b8.length!=1){throw new Error(this.declaredClass+": query "+dojo.toJson(this.query)+" returned "+_2b8.length+" items, but must return exactly one item");}this.root=_2b8[0];_2b6(this.root);}),onError:_2b7});}},mayHaveChildren:function(item){return dojo.some(this.childrenAttrs,function(attr){return this.store.hasAttribute(item,attr);},this);},getChildren:function(_2b9,_2ba,_2bb){var _2bc=this.store;if(!_2bc.isItemLoaded(_2b9)){var _2bd=dojo.hitch(this,arguments.callee);_2bc.loadItem({item:_2b9,onItem:function(_2be){_2bd(_2be,_2ba,_2bb);},onError:_2bb});return;}var _2bf=[];for(var i=0;i<this.childrenAttrs.length;i++){var vals=_2bc.getValues(_2b9,this.childrenAttrs[i]);_2bf=_2bf.concat(vals);}var _2c0=0;if(!this.deferItemLoadingUntilExpand){dojo.forEach(_2bf,function(item){if(!_2bc.isItemLoaded(item)){_2c0++;}});}if(_2c0==0){_2ba(_2bf);}else{var _2c1=function _2c1(item){if(--_2c0==0){_2ba(_2bf);}};dojo.forEach(_2bf,function(item){if(!_2bc.isItemLoaded(item)){_2bc.loadItem({item:item,onItem:_2c1,onError:_2bb});}});}},isItem:function(_2c2){return this.store.isItem(_2c2);},fetchItemByIdentity:function(_2c3){this.store.fetchItemByIdentity(_2c3);},getIdentity:function(item){return this.store.getIdentity(item);},getLabel:function(item){if(this.labelAttr){return this.store.getValue(item,this.labelAttr);}else{return this.store.getLabel(item);}},newItem:function(args,_2c4,_2c5){var _2c6={parent:_2c4,attribute:this.childrenAttrs[0],insertIndex:_2c5};if(this.newItemIdAttr&&args[this.newItemIdAttr]){this.fetchItemByIdentity({identity:args[this.newItemIdAttr],scope:this,onItem:function(item){if(item){this.pasteItem(item,null,_2c4,true,_2c5);}else{this.store.newItem(args,_2c6);}}});}else{this.store.newItem(args,_2c6);}},pasteItem:function(_2c7,_2c8,_2c9,_2ca,_2cb){var _2cc=this.store,_2cd=this.childrenAttrs[0];if(_2c8){dojo.forEach(this.childrenAttrs,function(attr){if(_2cc.containsValue(_2c8,attr,_2c7)){if(!_2ca){var _2ce=dojo.filter(_2cc.getValues(_2c8,attr),function(x){return x!=_2c7;});_2cc.setValues(_2c8,attr,_2ce);}_2cd=attr;}});}if(_2c9){if(typeof _2cb=="number"){var _2cf=_2cc.getValues(_2c9,_2cd);_2cf.splice(_2cb,0,_2c7);_2cc.setValues(_2c9,_2cd,_2cf);}else{_2cc.setValues(_2c9,_2cd,_2cc.getValues(_2c9,_2cd).concat(_2c7));}}},onChange:function(item){},onChildrenChange:function(_2d0,_2d1){},onDelete:function(_2d2,_2d3){},onNewItem:function(item,_2d4){if(!_2d4){return;}this.getChildren(_2d4.item,dojo.hitch(this,function(_2d5){this.onChildrenChange(_2d4.item,_2d5);}));},onDeleteItem:function(item){this.onDelete(item);},onSetItem:function(item,_2d6,_2d7,_2d8){if(dojo.indexOf(this.childrenAttrs,_2d6)!=-1){this.getChildren(item,dojo.hitch(this,function(_2d9){this.onChildrenChange(item,_2d9);}));}else{this.onChange(item);}}});}if(!dojo._hasResource["dijit.tree.ForestStoreModel"]){dojo._hasResource["dijit.tree.ForestStoreModel"]=true;dojo.provide("dijit.tree.ForestStoreModel");dojo.declare("dijit.tree.ForestStoreModel",dijit.tree.TreeStoreModel,{rootId:"$root$",rootLabel:"ROOT",query:null,constructor:function(_2da){this.root={store:this,root:true,id:_2da.rootId,label:_2da.rootLabel,children:_2da.rootChildren};},mayHaveChildren:function(item){return item===this.root||this.inherited(arguments);},getChildren:function(_2db,_2dc,_2dd){if(_2db===this.root){if(this.root.children){_2dc(this.root.children);}else{this.store.fetch({query:this.query,onComplete:dojo.hitch(this,function(_2de){this.root.children=_2de;_2dc(_2de);}),onError:_2dd});}}else{this.inherited(arguments);}},isItem:function(_2df){return (_2df===this.root)?true:this.inherited(arguments);},fetchItemByIdentity:function(_2e0){if(_2e0.identity==this.root.id){var _2e1=_2e0.scope?_2e0.scope:dojo.global;if(_2e0.onItem){_2e0.onItem.call(_2e1,this.root);}}else{this.inherited(arguments);}},getIdentity:function(item){return (item===this.root)?this.root.id:this.inherited(arguments);},getLabel:function(item){return (item===this.root)?this.root.label:this.inherited(arguments);},newItem:function(args,_2e2,_2e3){if(_2e2===this.root){this.onNewRootItem(args);return this.store.newItem(args);}else{return this.inherited(arguments);}},onNewRootItem:function(args){},pasteItem:function(_2e4,_2e5,_2e6,_2e7,_2e8){if(_2e5===this.root){if(!_2e7){this.onLeaveRoot(_2e4);}}dijit.tree.TreeStoreModel.prototype.pasteItem.call(this,_2e4,_2e5===this.root?null:_2e5,_2e6===this.root?null:_2e6,_2e7,_2e8);if(_2e6===this.root){this.onAddToRoot(_2e4);}},onAddToRoot:function(item){},onLeaveRoot:function(item){},_requeryTop:function(){var _2e9=this.root.children||[];this.store.fetch({query:this.query,onComplete:dojo.hitch(this,function(_2ea){this.root.children=_2ea;if(_2e9.length!=_2ea.length||dojo.some(_2e9,function(item,idx){return _2ea[idx]!=item;})){this.onChildrenChange(this.root,_2ea);}})});},onNewItem:function(item,_2eb){this._requeryTop();this.inherited(arguments);},onDeleteItem:function(item){if(dojo.indexOf(this.root.children,item)!=-1){this._requeryTop();}this.inherited(arguments);}});}if(!dojo._hasResource["dijit.Tree"]){dojo._hasResource["dijit.Tree"]=true;dojo.provide("dijit.Tree");dojo.declare("dijit._TreeNode",[dijit._Widget,dijit._Templated,dijit._Container,dijit._Contained],{item:null,isTreeNode:true,label:"",isExpandable:null,isExpanded:false,state:"UNCHECKED",templateString:dojo.cache("dijit","templates/TreeNode.html","<div class=\"dijitTreeNode\" waiRole=\"presentation\"\n\t><div dojoAttachPoint=\"rowNode\" class=\"dijitTreeRow\" waiRole=\"presentation\" dojoAttachEvent=\"onmouseenter:_onMouseEnter, onmouseleave:_onMouseLeave, onclick:_onClick, ondblclick:_onDblClick\"\n\t\t><img src=\"${_blankGif}\" alt=\"\" dojoAttachPoint=\"expandoNode\" class=\"dijitTreeExpando\" waiRole=\"presentation\"\n\t\t><span dojoAttachPoint=\"expandoNodeText\" class=\"dijitExpandoText\" waiRole=\"presentation\"\n\t\t></span\n\t\t><span dojoAttachPoint=\"contentNode\"\n\t\t\tclass=\"dijitTreeContent\" waiRole=\"presentation\">\n\t\t\t<img src=\"${_blankGif}\" alt=\"\" dojoAttachPoint=\"iconNode\" class=\"dijitTreeIcon\" waiRole=\"presentation\"\n\t\t\t><span dojoAttachPoint=\"labelNode\" class=\"dijitTreeLabel\" wairole=\"treeitem\" tabindex=\"-1\" waiState=\"selected-false\" dojoAttachEvent=\"onfocus:_onLabelFocus, onblur:_onLabelBlur\"></span>\n\t\t</span\n\t></div>\n\t<div dojoAttachPoint=\"containerNode\" class=\"dijitTreeContainer\" waiRole=\"presentation\" style=\"display: none;\"></div>\n</div>\n"),attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{label:{node:"labelNode",type:"innerText"},tooltip:{node:"rowNode",type:"attribute",attribute:"title"}}),postCreate:function(){this._setExpando();this._updateItemClasses(this.item);if(this.isExpandable){dijit.setWaiState(this.labelNode,"expanded",this.isExpanded);}},_setIndentAttr:function(_2ec){this.indent=_2ec;var _2ed=(Math.max(_2ec,0)*this.tree._nodePixelIndent)+"px";dojo.style(this.domNode,"backgroundPosition",_2ed+" 0px");dojo.style(this.rowNode,dojo._isBodyLtr()?"paddingLeft":"paddingRight",_2ed);dojo.forEach(this.getChildren(),function(_2ee){_2ee.attr("indent",_2ec+1);});},markProcessing:function(){this.state="LOADING";this._setExpando(true);},unmarkProcessing:function(){this._setExpando(false);},_updateItemClasses:function(item){var tree=this.tree,_2ef=tree.model;if(tree._v10Compat&&item===_2ef.root){item=null;}this._applyClassAndStyle(item,"icon","Icon");this._applyClassAndStyle(item,"label","Label");this._applyClassAndStyle(item,"row","Row");},_applyClassAndStyle:function(item,_2f0,_2f1){var _2f2="_"+_2f0+"Class";var _2f3=_2f0+"Node";if(this[_2f2]){dojo.removeClass(this[_2f3],this[_2f2]);}this[_2f2]=this.tree["get"+_2f1+"Class"](item,this.isExpanded);if(this[_2f2]){dojo.addClass(this[_2f3],this[_2f2]);}dojo.style(this[_2f3],this.tree["get"+_2f1+"Style"](item,this.isExpanded)||{});},_updateLayout:function(){var _2f4=this.getParent();if(!_2f4||_2f4.rowNode.style.display=="none"){dojo.addClass(this.domNode,"dijitTreeIsRoot");}else{dojo.toggleClass(this.domNode,"dijitTreeIsLast",!this.getNextSibling());}},_setExpando:function(_2f5){var _2f6=["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"],_2f7=["*","-","+","*"],idx=_2f5?0:(this.isExpandable?(this.isExpanded?1:2):3);dojo.removeClass(this.expandoNode,_2f6);dojo.addClass(this.expandoNode,_2f6[idx]);this.expandoNodeText.innerHTML=_2f7[idx];},expand:function(){if(this._expandDeferred){return this._expandDeferred;}this._wipeOut&&this._wipeOut.stop();this.isExpanded=true;dijit.setWaiState(this.labelNode,"expanded","true");dijit.setWaiRole(this.containerNode,"group");dojo.addClass(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);if(this==this.tree.rootNode){dijit.setWaiState(this.tree.domNode,"expanded","true");}var def,_2f8=dojo.fx.wipeIn({node:this.containerNode,duration:dijit.defaultDuration,onEnd:function(){def.callback(true);}});def=(this._expandDeferred=new dojo.Deferred(function(){_2f8.stop();}));_2f8.play();return def;},collapse:function(){if(!this.isExpanded){return;}if(this._expandDeferred){this._expandDeferred.cancel();delete this._expandDeferred;}this.isExpanded=false;dijit.setWaiState(this.labelNode,"expanded","false");if(this==this.tree.rootNode){dijit.setWaiState(this.tree.domNode,"expanded","false");}dojo.removeClass(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);if(!this._wipeOut){this._wipeOut=dojo.fx.wipeOut({node:this.containerNode,duration:dijit.defaultDuration});}this._wipeOut.play();},indent:0,setChildItems:function(_2f9){var tree=this.tree,_2fa=tree.model,defs=[];this.getChildren().forEach(function(_2fb){dijit._Container.prototype.removeChild.call(this,_2fb);},this);this.state="LOADED";if(_2f9&&_2f9.length>0){this.isExpandable=true;dojo.forEach(_2f9,function(item){var id=_2fa.getIdentity(item),_2fc=tree._itemNodesMap[id],node;if(_2fc){for(var i=0;i<_2fc.length;i++){if(_2fc[i]&&!_2fc[i].getParent()){node=_2fc[i];node.attr("indent",this.indent+1);break;}}}if(!node){node=this.tree._createTreeNode({item:item,tree:tree,isExpandable:_2fa.mayHaveChildren(item),label:tree.getLabel(item),tooltip:tree.getTooltip(item),indent:this.indent+1});if(_2fc){_2fc.push(node);}else{tree._itemNodesMap[id]=[node];}}this.addChild(node);if(this.tree.autoExpand||this.tree._state(item)){defs.push(tree._expandNode(node));}},this);dojo.forEach(this.getChildren(),function(_2fd,idx){_2fd._updateLayout();});}else{this.isExpandable=false;}if(this._setExpando){this._setExpando(false);}if(this==tree.rootNode){var fc=this.tree.showRoot?this:this.getChildren()[0];if(fc){fc.setSelected(true);tree.lastFocused=fc;}else{tree.domNode.setAttribute("tabIndex","0");}}return new dojo.DeferredList(defs);},removeChild:function(node){this.inherited(arguments);var _2fe=this.getChildren();if(_2fe.length==0){this.isExpandable=false;this.collapse();}dojo.forEach(_2fe,function(_2ff){_2ff._updateLayout();});},makeExpandable:function(){this.isExpandable=true;this._setExpando(false);},_onLabelFocus:function(evt){dojo.addClass(this.labelNode,"dijitTreeLabelFocused");this.tree._onNodeFocus(this);},_onLabelBlur:function(evt){dojo.removeClass(this.labelNode,"dijitTreeLabelFocused");},setSelected:function(_300){var _301=this.labelNode;_301.setAttribute("tabIndex",_300?"0":"-1");dijit.setWaiState(_301,"selected",_300);dojo.toggleClass(this.rowNode,"dijitTreeNodeSelected",_300);},_onClick:function(evt){this.tree._onClick(this,evt);},_onDblClick:function(evt){this.tree._onDblClick(this,evt);},_onMouseEnter:function(evt){dojo.addClass(this.rowNode,"dijitTreeNodeHover");this.tree._onNodeMouseEnter(this,evt);},_onMouseLeave:function(evt){dojo.removeClass(this.rowNode,"dijitTreeNodeHover");this.tree._onNodeMouseLeave(this,evt);}});dojo.declare("dijit.Tree",[dijit._Widget,dijit._Templated],{store:null,model:null,query:null,label:"",showRoot:true,childrenAttr:["children"],path:[],selectedItem:null,openOnClick:false,openOnDblClick:false,templateString:dojo.cache("dijit","templates/Tree.html","<div class=\"dijitTree dijitTreeContainer\" waiRole=\"tree\"\n\tdojoAttachEvent=\"onkeypress:_onKeyPress\">\n\t<div class=\"dijitInline dijitTreeIndent\" style=\"position: absolute; top: -9999px\" dojoAttachPoint=\"indentDetector\"></div>\n</div>\n"),persist:true,autoExpand:false,dndController:null,dndParams:["onDndDrop","itemCreator","onDndCancel","checkAcceptance","checkItemAcceptance","dragThreshold","betweenThreshold"],onDndDrop:null,itemCreator:null,onDndCancel:null,checkAcceptance:null,checkItemAcceptance:null,dragThreshold:5,betweenThreshold:0,_nodePixelIndent:19,_publish:function(_302,_303){dojo.publish(this.id,[dojo.mixin({tree:this,event:_302},_303||{})]);},postMixInProperties:function(){this.tree=this;this._itemNodesMap={};if(!this.cookieName){this.cookieName=this.id+"SaveStateCookie";}this._loadDeferred=new dojo.Deferred();this.inherited(arguments);},postCreate:function(){this._initState();if(!this.model){this._store2model();}this.connect(this.model,"onChange","_onItemChange");this.connect(this.model,"onChildrenChange","_onItemChildrenChange");this.connect(this.model,"onDelete","_onItemDelete");this._load();this.inherited(arguments);if(this.dndController){if(dojo.isString(this.dndController)){this.dndController=dojo.getObject(this.dndController);}var _304={};for(var i=0;i<this.dndParams.length;i++){if(this[this.dndParams[i]]){_304[this.dndParams[i]]=this[this.dndParams[i]];}}this.dndController=new this.dndController(this,_304);}},_store2model:function(){this._v10Compat=true;dojo.deprecated("Tree: from version 2.0, should specify a model object rather than a store/query");var _305={id:this.id+"_ForestStoreModel",store:this.store,query:this.query,childrenAttrs:this.childrenAttr};if(this.params.mayHaveChildren){_305.mayHaveChildren=dojo.hitch(this,"mayHaveChildren");}if(this.params.getItemChildren){_305.getChildren=dojo.hitch(this,function(item,_306,_307){this.getItemChildren((this._v10Compat&&item===this.model.root)?null:item,_306,_307);});}this.model=new dijit.tree.ForestStoreModel(_305);this.showRoot=Boolean(this.label);},onLoad:function(){},_load:function(){this.model.getRoot(dojo.hitch(this,function(item){var rn=(this.rootNode=this.tree._createTreeNode({item:item,tree:this,isExpandable:true,label:this.label||this.getLabel(item),indent:this.showRoot?0:-1}));if(!this.showRoot){rn.rowNode.style.display="none";}this.domNode.appendChild(rn.domNode);var _308=this.model.getIdentity(item);if(this._itemNodesMap[_308]){this._itemNodesMap[_308].push(rn);}else{this._itemNodesMap[_308]=[rn];}rn._updateLayout();this._expandNode(rn).addCallback(dojo.hitch(this,function(){this._loadDeferred.callback(true);this.onLoad();}));}),function(err){console.error(this,": error loading root: ",err);});},getNodesByItem:function(item){if(!item){return [];}var _309=dojo.isString(item)?item:this.model.getIdentity(item);return [].concat(this._itemNodesMap[_309]);},_setSelectedItemAttr:function(item){var _30a=this.attr("selectedItem");var _30b=(!item||dojo.isString(item))?item:this.model.getIdentity(item);if(_30b==_30a?this.model.getIdentity(_30a):null){return;}var _30c=this._itemNodesMap[_30b];if(_30c&&_30c.length){this.focusNode(_30c[0]);}else{if(this.lastFocused){this.lastFocused.setSelected(false);this.lastFocused=null;}}},_getSelectedItemAttr:function(){return this.lastFocused&&this.lastFocused.item;},_setPathAttr:function(path){if(!path||!path.length){return;}this._loadDeferred.addCallback(dojo.hitch(this,function(){if(!this.rootNode){return;}if(path[0]!==this.rootNode.item&&(dojo.isString(path[0])&&path[0]!=this.model.getIdentity(this.rootNode.item))){console.error(this,":path[0] doesn't match this.rootNode.item. Maybe you are using the wrong tree.");return;}path.shift();var node=this.rootNode;function _30d(){var item=path.shift(),_30e=dojo.isString(item)?item:this.model.getIdentity(item);dojo.some(this._itemNodesMap[_30e],function(n){if(n.getParent()==node){node=n;return true;}return false;});if(path.length){this._expandNode(node).addCallback(dojo.hitch(this,_30d));}else{if(this.lastFocused!=node){this.focusNode(node);}}};this._expandNode(node).addCallback(dojo.hitch(this,_30d));}));},_getPathAttr:function(){if(!this.lastFocused){return;}var res=[];var _30f=this.lastFocused;while(_30f&&_30f!==this.rootNode){res.unshift(_30f.item);_30f=_30f.getParent();}res.unshift(this.rootNode.item);return res;},mayHaveChildren:function(item){},getItemChildren:function(_310,_311){},getLabel:function(item){return this.model.getLabel(item);},getIconClass:function(item,_312){return (!item||this.model.mayHaveChildren(item))?(_312?"dijitFolderOpened":"dijitFolderClosed"):"dijitLeaf";},getLabelClass:function(item,_313){},getRowClass:function(item,_314){},getIconStyle:function(item,_315){},getLabelStyle:function(item,_316){},getRowStyle:function(item,_317){},getTooltip:function(item){return "";},_onKeyPress:function(e){if(e.altKey){return;}var dk=dojo.keys;var _318=dijit.getEnclosingWidget(e.target);if(!_318){return;}var key=e.charOrCode;if(typeof key=="string"){if(!e.altKey&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey){this._onLetterKeyNav({node:_318,key:key.toLowerCase()});dojo.stopEvent(e);}}else{if(this._curSearch){clearTimeout(this._curSearch.timer);delete this._curSearch;}var map=this._keyHandlerMap;if(!map){map={};map[dk.ENTER]="_onEnterKey";map[this.isLeftToRight()?dk.LEFT_ARROW:dk.RIGHT_ARROW]="_onLeftArrow";map[this.isLeftToRight()?dk.RIGHT_ARROW:dk.LEFT_ARROW]="_onRightArrow";map[dk.UP_ARROW]="_onUpArrow";map[dk.DOWN_ARROW]="_onDownArrow";map[dk.HOME]="_onHomeKey";map[dk.END]="_onEndKey";this._keyHandlerMap=map;}if(this._keyHandlerMap[key]){this[this._keyHandlerMap[key]]({node:_318,item:_318.item,evt:e});dojo.stopEvent(e);}}},_onEnterKey:function(_319,evt){this._publish("execute",{item:_319.item,node:_319.node});this.onClick(_319.item,_319.node,evt);},_onDownArrow:function(_31a){var node=this._getNextNode(_31a.node);if(node&&node.isTreeNode){this.focusNode(node);}},_onUpArrow:function(_31b){var node=_31b.node;var _31c=node.getPreviousSibling();if(_31c){node=_31c;while(node.isExpandable&&node.isExpanded&&node.hasChildren()){var _31d=node.getChildren();node=_31d[_31d.length-1];}}else{var _31e=node.getParent();if(!(!this.showRoot&&_31e===this.rootNode)){node=_31e;}}if(node&&node.isTreeNode){this.focusNode(node);}},_onRightArrow:function(_31f){var node=_31f.node;if(node.isExpandable&&!node.isExpanded){this._expandNode(node);}else{if(node.hasChildren()){node=node.getChildren()[0];if(node&&node.isTreeNode){this.focusNode(node);}}}},_onLeftArrow:function(_320){var node=_320.node;if(node.isExpandable&&node.isExpanded){this._collapseNode(node);}else{var _321=node.getParent();if(_321&&_321.isTreeNode&&!(!this.showRoot&&_321===this.rootNode)){this.focusNode(_321);}}},_onHomeKey:function(){var node=this._getRootOrFirstNode();if(node){this.focusNode(node);}},_onEndKey:function(_322){var node=this.rootNode;while(node.isExpanded){var c=node.getChildren();node=c[c.length-1];}if(node&&node.isTreeNode){this.focusNode(node);}},multiCharSearchDuration:250,_onLetterKeyNav:function(_323){var cs=this._curSearch;if(cs){cs.pattern=cs.pattern+_323.key;clearTimeout(cs.timer);}else{cs=this._curSearch={pattern:_323.key,startNode:_323.node};}var self=this;cs.timer=setTimeout(function(){delete self._curSearch;},this.multiCharSearchDuration);var node=cs.startNode;do{node=this._getNextNode(node);if(!node){node=this._getRootOrFirstNode();}}while(node!==cs.startNode&&(node.label.toLowerCase().substr(0,cs.pattern.length)!=cs.pattern));if(node&&node.isTreeNode){if(node!==cs.startNode){this.focusNode(node);}}},_onClick:function(_324,e){var _325=e.target;if((this.openOnClick&&_324.isExpandable)||(_325==_324.expandoNode||_325==_324.expandoNodeText)){if(_324.isExpandable){this._onExpandoClick({node:_324});}}else{this._publish("execute",{item:_324.item,node:_324,evt:e});this.onClick(_324.item,_324,e);this.focusNode(_324);}dojo.stopEvent(e);},_onDblClick:function(_326,e){var _327=e.target;if((this.openOnDblClick&&_326.isExpandable)||(_327==_326.expandoNode||_327==_326.expandoNodeText)){if(_326.isExpandable){this._onExpandoClick({node:_326});}}else{this._publish("execute",{item:_326.item,node:_326,evt:e});this.onDblClick(_326.item,_326,e);this.focusNode(_326);}dojo.stopEvent(e);},_onExpandoClick:function(_328){var node=_328.node;this.focusNode(node);if(node.isExpanded){this._collapseNode(node);}else{this._expandNode(node);}},onClick:function(item,node,evt){},onDblClick:function(item,node,evt){},onOpen:function(item,node){},onClose:function(item,node){},_getNextNode:function(node){if(node.isExpandable&&node.isExpanded&&node.hasChildren()){return node.getChildren()[0];}else{while(node&&node.isTreeNode){var _329=node.getNextSibling();if(_329){return _329;}node=node.getParent();}return null;}},_getRootOrFirstNode:function(){return this.showRoot?this.rootNode:this.rootNode.getChildren()[0];},_collapseNode:function(node){if(node._expandNodeDeferred){delete node._expandNodeDeferred;}if(node.isExpandable){if(node.state=="LOADING"){return;}node.collapse();this.onClose(node.item,node);if(node.item){this._state(node.item,false);this._saveState();}}},_expandNode:function(node,_32a){if(node._expandNodeDeferred&&!_32a){return node._expandNodeDeferred;}var _32b=this.model,item=node.item,_32c=this;switch(node.state){case "UNCHECKED":node.markProcessing();var def=(node._expandNodeDeferred=new dojo.Deferred());_32b.getChildren(item,function(_32d){node.unmarkProcessing();var scid=node.setChildItems(_32d);var ed=_32c._expandNode(node,true);scid.addCallback(function(){ed.addCallback(function(){def.callback();});});},function(err){console.error(_32c,": error loading root children: ",err);});break;default:def=(node._expandNodeDeferred=node.expand());this.onOpen(node.item,node);if(item){this._state(item,true);this._saveState();}}return def;},focusNode:function(node){dijit.focus(node.labelNode);},_onNodeFocus:function(node){if(node){if(node!=this.lastFocused&&this.lastFocused&&!this.lastFocused._destroyed){this.lastFocused.setSelected(false);}node.setSelected(true);this.lastFocused=node;}},_onNodeMouseEnter:function(node){},_onNodeMouseLeave:function(node){},_onItemChange:function(item){var _32e=this.model,_32f=_32e.getIdentity(item),_330=this._itemNodesMap[_32f];if(_330){var self=this;dojo.forEach(_330,function(node){node.attr({label:self.getLabel(item),tooltip:self.getTooltip(item)});node._updateItemClasses(item);});}},_onItemChildrenChange:function(_331,_332){var _333=this.model,_334=_333.getIdentity(_331),_335=this._itemNodesMap[_334];if(_335){dojo.forEach(_335,function(_336){_336.setChildItems(_332);});}},_onItemDelete:function(item){var _337=this.model,_338=_337.getIdentity(item),_339=this._itemNodesMap[_338];if(_339){dojo.forEach(_339,function(node){var _33a=node.getParent();if(_33a){_33a.removeChild(node);}node.destroyRecursive();});delete this._itemNodesMap[_338];}},_initState:function(){if(this.persist){var _33b=dojo.cookie(this.cookieName);this._openedItemIds={};if(_33b){dojo.forEach(_33b.split(","),function(item){this._openedItemIds[item]=true;},this);}}},_state:function(item,_33c){if(!this.persist){return false;}var id=this.model.getIdentity(item);if(arguments.length===1){return this._openedItemIds[id];}if(_33c){this._openedItemIds[id]=true;}else{delete this._openedItemIds[id];}},_saveState:function(){if(!this.persist){return;}var ary=[];for(var id in this._openedItemIds){ary.push(id);}dojo.cookie(this.cookieName,ary.join(","),{expires:365});},destroy:function(){if(this._curSearch){clearTimeout(this._curSearch.timer);delete this._curSearch;}if(this.rootNode){this.rootNode.destroyRecursive();}if(this.dndController&&!dojo.isString(this.dndController)){this.dndController.destroy();}this.rootNode=null;this.inherited(arguments);},destroyRecursive:function(){this.destroy();},resize:function(_33d){if(_33d){dojo.marginBox(this.domNode,_33d);dojo.style(this.domNode,"overflow","auto");}this._nodePixelIndent=dojo.marginBox(this.tree.indentDetector).w;if(this.tree.rootNode){this.tree.rootNode.attr("indent",this.showRoot?0:-1);}},_createTreeNode:function(args){return new dijit._TreeNode(args);}});}if(!dojo._hasResource["dijit.form.TextBox"]){dojo._hasResource["dijit.form.TextBox"]=true;dojo.provide("dijit.form.TextBox");dojo.declare("dijit.form.TextBox",dijit.form._FormValueWidget,{trim:false,uppercase:false,lowercase:false,propercase:false,maxLength:"",selectOnClick:false,templateString:dojo.cache("dijit.form","templates/TextBox.html","<input class=\"dijit dijitReset dijitLeft\" dojoAttachPoint='textbox,focusNode'\n\tdojoAttachEvent='onmouseenter:_onMouse,onmouseleave:_onMouse'\n\tautocomplete=\"off\" type=\"${type}\" ${nameAttrSetting}\n\t/>\n"),baseClass:"dijitTextBox",attributeMap:dojo.delegate(dijit.form._FormValueWidget.prototype.attributeMap,{maxLength:"focusNode"}),_getValueAttr:function(){return this.parse(this.attr("displayedValue"),this.constraints);},_setValueAttr:function(_33e,_33f,_340){var _341;if(_33e!==undefined){_341=this.filter(_33e);if(typeof _340!="string"){if(_341!==null&&((typeof _341!="number")||!isNaN(_341))){_340=this.filter(this.format(_341,this.constraints));}else{_340="";}}}if(_340!=null&&_340!=undefined&&((typeof _340)!="number"||!isNaN(_340))&&this.textbox.value!=_340){this.textbox.value=_340;}this.inherited(arguments,[_341,_33f]);},displayedValue:"",getDisplayedValue:function(){dojo.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use attr('displayedValue') instead.","","2.0");return this.attr("displayedValue");},_getDisplayedValueAttr:function(){return this.filter(this.textbox.value);},setDisplayedValue:function(_342){dojo.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use attr('displayedValue', ...) instead.","","2.0");this.attr("displayedValue",_342);},_setDisplayedValueAttr:function(_343){if(_343===null||_343===undefined){_343="";}else{if(typeof _343!="string"){_343=String(_343);}}this.textbox.value=_343;this._setValueAttr(this.attr("value"),undefined,_343);},format:function(_344,_345){return ((_344==null||_344==undefined)?"":(_344.toString?_344.toString():_344));},parse:function(_346,_347){return _346;},_refreshState:function(){},_onInput:function(e){if(e&&e.type&&/key/i.test(e.type)&&e.keyCode){switch(e.keyCode){case dojo.keys.SHIFT:case dojo.keys.ALT:case dojo.keys.CTRL:case dojo.keys.TAB:return;}}if(this.intermediateChanges){var _348=this;setTimeout(function(){_348._handleOnChange(_348.attr("value"),false);},0);}this._refreshState();},postCreate:function(){this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);if(dojo.isMoz||dojo.isOpera){this.connect(this.textbox,"oninput",this._onInput);}else{this.connect(this.textbox,"onkeydown",this._onInput);this.connect(this.textbox,"onkeyup",this._onInput);this.connect(this.textbox,"onpaste",this._onInput);this.connect(this.textbox,"oncut",this._onInput);}},_blankValue:"",filter:function(val){if(val===null){return this._blankValue;}if(typeof val!="string"){return val;}if(this.trim){val=dojo.trim(val);}if(this.uppercase){val=val.toUpperCase();}if(this.lowercase){val=val.toLowerCase();}if(this.propercase){val=val.replace(/[^\s]+/g,function(word){return word.substring(0,1).toUpperCase()+word.substring(1);});}return val;},_setBlurValue:function(){this._setValueAttr(this.attr("value"),true);},_onBlur:function(e){if(this.disabled){return;}this._setBlurValue();this.inherited(arguments);if(this._selectOnClickHandle){this.disconnect(this._selectOnClickHandle);}if(this.selectOnClick&&dojo.isMoz){this.textbox.selectionStart=this.textbox.selectionEnd=undefined;}},_onFocus:function(by){if(this.disabled||this.readOnly){return;}if(this.selectOnClick&&by=="mouse"){this._selectOnClickHandle=this.connect(this.domNode,"onmouseup",function(){this.disconnect(this._selectOnClickHandle);var _349;if(dojo.isIE){var _34a=dojo.doc.selection.createRange();var _34b=_34a.parentElement();_349=_34b==this.textbox&&_34a.text.length==0;}else{_349=this.textbox.selectionStart==this.textbox.selectionEnd;}if(_349){dijit.selectInputText(this.textbox);}});}this._refreshState();this.inherited(arguments);},reset:function(){this.textbox.value="";this.inherited(arguments);}});dijit.selectInputText=function(_34c,_34d,stop){var _34e=dojo.global;var _34f=dojo.doc;_34c=dojo.byId(_34c);if(isNaN(_34d)){_34d=0;}if(isNaN(stop)){stop=_34c.value?_34c.value.length:0;}dijit.focus(_34c);if(_34f["selection"]&&dojo.body()["createTextRange"]){if(_34c.createTextRange){var _350=_34c.createTextRange();with(_350){collapse(true);moveStart("character",-99999);moveStart("character",_34d);moveEnd("character",stop-_34d);select();}}}else{if(_34e["getSelection"]){if(_34c.setSelectionRange){_34c.setSelectionRange(_34d,stop);}}}};}if(!dojo._hasResource["dijit.InlineEditBox"]){dojo._hasResource["dijit.InlineEditBox"]=true;dojo.provide("dijit.InlineEditBox");dojo.declare("dijit.InlineEditBox",dijit._Widget,{editing:false,autoSave:true,buttonSave:"",buttonCancel:"",renderAsHtml:false,editor:"dijit.form.TextBox",editorWrapper:"dijit._InlineEditor",editorParams:{},onChange:function(_351){},onCancel:function(){},width:"100%",value:"",noValueIndicator:"<span style='font-family: wingdings; text-decoration: underline;'>&nbsp;&nbsp;&nbsp;&nbsp;&#x270d;&nbsp;&nbsp;&nbsp;&nbsp;</span>",constructor:function(){this.editorParams={};},postMixInProperties:function(){this.inherited(arguments);this.displayNode=this.srcNodeRef;var _352={ondijitclick:"_onClick",onmouseover:"_onMouseOver",onmouseout:"_onMouseOut",onfocus:"_onMouseOver",onblur:"_onMouseOut"};for(var name in _352){this.connect(this.displayNode,name,_352[name]);}dijit.setWaiRole(this.displayNode,"button");if(!this.displayNode.getAttribute("tabIndex")){this.displayNode.setAttribute("tabIndex",0);}this.attr("value",this.value||this.displayNode.innerHTML);},setDisabled:function(_353){dojo.deprecated("dijit.InlineEditBox.setDisabled() is deprecated. Use attr('disabled', bool) instead.","","2.0");this.attr("disabled",_353);},_setDisabledAttr:function(_354){this.disabled=_354;dijit.setWaiState(this.domNode,"disabled",_354);if(_354){this.displayNode.removeAttribute("tabIndex");}else{this.displayNode.setAttribute("tabIndex",0);}},_onMouseOver:function(){dojo.addClass(this.displayNode,this.disabled?"dijitDisabledClickableRegion":"dijitClickableRegion");},_onMouseOut:function(){dojo.removeClass(this.displayNode,this.disabled?"dijitDisabledClickableRegion":"dijitClickableRegion");},_onClick:function(e){if(this.disabled){return;}if(e){dojo.stopEvent(e);}this._onMouseOut();setTimeout(dojo.hitch(this,"edit"),0);},edit:function(){if(this.disabled||this.editing){return;}this.editing=true;this._savedPosition=dojo.style(this.displayNode,"position")||"static";this._savedOpacity=dojo.style(this.displayNode,"opacity")||"1";this._savedTabIndex=dojo.attr(this.displayNode,"tabIndex")||"0";if(this.wrapperWidget){this.wrapperWidget.editWidget.attr("displayedValue" in this.editorParams?"displayedValue":"value",this.value);}else{var _355=dojo.create("span",null,this.domNode,"before");var ewc=dojo.getObject(this.editorWrapper);this.wrapperWidget=new ewc({value:this.value,buttonSave:this.buttonSave,buttonCancel:this.buttonCancel,tabIndex:this._savedTabIndex,editor:this.editor,inlineEditBox:this,sourceStyle:dojo.getComputedStyle(this.displayNode),save:dojo.hitch(this,"save"),cancel:dojo.hitch(this,"cancel")},_355);}var ww=this.wrapperWidget;if(dojo.isIE){dijit.focus(dijit.getFocus());}dojo.style(this.displayNode,{position:"absolute",opacity:"0",display:"none"});dojo.style(ww.domNode,{position:this._savedPosition,visibility:"visible",opacity:"1"});dojo.attr(this.displayNode,"tabIndex","-1");setTimeout(dojo.hitch(this,function(){ww.focus();ww._resetValue=ww.getValue();}),0);},_onBlur:function(){this.inherited(arguments);if(!this.editing){setTimeout(dojo.hitch(this,function(){if(this.wrapperWidget){this.wrapperWidget.destroy();delete this.wrapperWidget;}}),0);}},_showText:function(_356){var ww=this.wrapperWidget;dojo.style(ww.domNode,{position:"absolute",visibility:"hidden",opacity:"0"});dojo.style(this.displayNode,{position:this._savedPosition,opacity:this._savedOpacity,display:""});dojo.attr(this.displayNode,"tabIndex",this._savedTabIndex);if(_356){dijit.focus(this.displayNode);}},save:function(_357){if(this.disabled||!this.editing){return;}this.editing=false;var ww=this.wrapperWidget;var _358=ww.getValue();this.attr("value",_358);setTimeout(dojo.hitch(this,"onChange",_358),0);this._showText(_357);},setValue:function(val){dojo.deprecated("dijit.InlineEditBox.setValue() is deprecated. Use attr('value', ...) instead.","","2.0");return this.attr("value",val);},_setValueAttr:function(val){this.value=val=dojo.trim(val);if(!this.renderAsHtml){val=val.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;").replace(/\n/g,"<br>");}this.displayNode.innerHTML=val||this.noValueIndicator;},getValue:function(){dojo.deprecated("dijit.InlineEditBox.getValue() is deprecated. Use attr('value') instead.","","2.0");return this.attr("value");},cancel:function(_359){if(this.disabled||!this.editing){return;}this.editing=false;setTimeout(dojo.hitch(this,"onCancel"),0);this._showText(_359);}});dojo.declare("dijit._InlineEditor",[dijit._Widget,dijit._Templated],{templateString:dojo.cache("dijit","templates/InlineEditBox.html","<span dojoAttachPoint=\"editNode\" waiRole=\"presentation\" style=\"position: absolute; visibility:hidden\" class=\"dijitReset dijitInline\"\n\tdojoAttachEvent=\"onkeypress: _onKeyPress\"\n\t><span dojoAttachPoint=\"editorPlaceholder\"></span\n\t><span dojoAttachPoint=\"buttonContainer\"\n\t\t><button class='saveButton' dojoAttachPoint=\"saveButton\" dojoType=\"dijit.form.Button\" dojoAttachEvent=\"onClick:save\" label=\"${buttonSave}\"></button\n\t\t><button class='cancelButton' dojoAttachPoint=\"cancelButton\" dojoType=\"dijit.form.Button\" dojoAttachEvent=\"onClick:cancel\" label=\"${buttonCancel}\"></button\n\t></span\n></span>\n"),widgetsInTemplate:true,postMixInProperties:function(){this.inherited(arguments);this.messages=dojo.i18n.getLocalization("dijit","common",this.lang);dojo.forEach(["buttonSave","buttonCancel"],function(prop){if(!this[prop]){this[prop]=this.messages[prop];}},this);},postCreate:function(){var cls=dojo.getObject(this.editor);var _35a=this.sourceStyle;var _35b="line-height:"+_35a.lineHeight+";";dojo.forEach(["Weight","Family","Size","Style"],function(prop){_35b+="font-"+prop+":"+_35a["font"+prop]+";";},this);dojo.forEach(["marginTop","marginBottom","marginLeft","marginRight"],function(prop){this.domNode.style[prop]=_35a[prop];},this);var _35c=this.inlineEditBox.width;if(_35c=="100%"){_35b+="width:100%;";this.domNode.style.display="block";}else{_35b+="width:"+(_35c+(Number(_35c)==_35c?"px":""))+";";}var _35d=this.inlineEditBox.editorParams;_35d.style=_35b;_35d["displayedValue" in cls.prototype?"displayedValue":"value"]=this.value;var ew=this.editWidget=new cls(_35d,this.editorPlaceholder);if(this.inlineEditBox.autoSave){this.buttonContainer.style.display="none";this.connect(ew,"onChange","_onChange");this.connect(ew,"onKeyPress","_onKeyPress");}else{if("intermediateChanges" in cls.prototype){ew.attr("intermediateChanges",true);this.connect(ew,"onChange","_onIntermediateChange");this.saveButton.attr("disabled",true);}}},_onIntermediateChange:function(val){this.saveButton.attr("disabled",(this.getValue()==this._resetValue)||!this.enableSave());},destroy:function(){this.editWidget.destroy(true);this.inherited(arguments);},getValue:function(){var ew=this.editWidget;return String(ew.attr("displayedValue" in ew?"displayedValue":"value"));},_onKeyPress:function(e){if(this.inlineEditBox.autoSave&&this.inlineEditBox.editing){if(e.altKey||e.ctrlKey){return;}if(e.charOrCode==dojo.keys.ESCAPE){dojo.stopEvent(e);this.cancel(true);}else{if(e.charOrCode==dojo.keys.ENTER&&e.target.tagName=="INPUT"){dojo.stopEvent(e);this._onChange();}}}},_onBlur:function(){this.inherited(arguments);if(this.inlineEditBox.autoSave&&this.inlineEditBox.editing){if(this.getValue()==this._resetValue){this.cancel(false);}else{if(this.enableSave()){this.save(false);}}}},_onChange:function(){if(this.inlineEditBox.autoSave&&this.inlineEditBox.editing&&this.enableSave()){dojo.style(this.inlineEditBox.displayNode,{display:""});dijit.focus(this.inlineEditBox.displayNode);}},enableSave:function(){return (this.editWidget.isValid?this.editWidget.isValid():true);},focus:function(){this.editWidget.focus();setTimeout(dojo.hitch(this,function(){if(this.editWidget.focusNode.tagName=="INPUT"){dijit.selectInputText(this.editWidget.focusNode);}}),0);}});}if(!dojo._hasResource["dijit.form.Form"]){dojo._hasResource["dijit.form.Form"]=true;dojo.provide("dijit.form.Form");dojo.declare("dijit.form.Form",[dijit._Widget,dijit._Templated,dijit.form._FormMixin],{name:"",action:"",method:"",encType:"","accept-charset":"",accept:"",target:"",templateString:"<form dojoAttachPoint='containerNode' dojoAttachEvent='onreset:_onReset,onsubmit:_onSubmit' ${nameAttrSetting}></form>",attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{action:"",method:"",encType:"","accept-charset":"",accept:"",target:""}),postMixInProperties:function(){this.nameAttrSetting=this.name?("name='"+this.name+"'"):"";this.inherited(arguments);},execute:function(_35e){},onExecute:function(){},_setEncTypeAttr:function(_35f){this.encType=_35f;dojo.attr(this.domNode,"encType",_35f);if(dojo.isIE){this.domNode.encoding=_35f;}},postCreate:function(){if(dojo.isIE&&this.srcNodeRef&&this.srcNodeRef.attributes){var item=this.srcNodeRef.attributes.getNamedItem("encType");if(item&&!item.specified&&(typeof item.value=="string")){this.attr("encType",item.value);}}this.inherited(arguments);},onReset:function(e){return true;},_onReset:function(e){var faux={returnValue:true,preventDefault:function(){this.returnValue=false;},stopPropagation:function(){},currentTarget:e.currentTarget,target:e.target};if(!(this.onReset(faux)===false)&&faux.returnValue){this.reset();}dojo.stopEvent(e);return false;},_onSubmit:function(e){var fp=dijit.form.Form.prototype;if(this.execute!=fp.execute||this.onExecute!=fp.onExecute){dojo.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.","","2.0");this.onExecute();this.execute(this.getValues());}if(this.onSubmit(e)===false){dojo.stopEvent(e);}},onSubmit:function(e){return this.isValid();},submit:function(){if(!(this.onSubmit()===false)){this.containerNode.submit();}}});}if(!dojo._hasResource["dijit.form.DropDownButton"]){dojo._hasResource["dijit.form.DropDownButton"]=true;dojo.provide("dijit.form.DropDownButton");}if(!dojo._hasResource["dijit.form.ComboButton"]){dojo._hasResource["dijit.form.ComboButton"]=true;dojo.provide("dijit.form.ComboButton");}if(!dojo._hasResource["dijit.form.ToggleButton"]){dojo._hasResource["dijit.form.ToggleButton"]=true;dojo.provide("dijit.form.ToggleButton");}if(!dojo._hasResource["dijit.form.CheckBox"]){dojo._hasResource["dijit.form.CheckBox"]=true;dojo.provide("dijit.form.CheckBox");dojo.declare("dijit.form.CheckBox",dijit.form.ToggleButton,{templateString:dojo.cache("dijit.form","templates/CheckBox.html","<div class=\"dijitReset dijitInline\" waiRole=\"presentation\"\n\t><input\n\t \t${nameAttrSetting} type=\"${type}\" ${checkedAttrSetting}\n\t\tclass=\"dijitReset dijitCheckBoxInput\"\n\t\tdojoAttachPoint=\"focusNode\"\n\t \tdojoAttachEvent=\"onmouseover:_onMouse,onmouseout:_onMouse,onclick:_onClick\"\n/></div>\n"),baseClass:"dijitCheckBox",type:"checkbox",value:"on",readOnly:false,attributeMap:dojo.delegate(dijit.form.ToggleButton.prototype.attributeMap,{readOnly:"focusNode"}),_setReadOnlyAttr:function(_360){this.readOnly=_360;dojo.attr(this.focusNode,"readOnly",_360);dijit.setWaiState(this.focusNode,"readonly",_360);this._setStateClass();},_setValueAttr:function(_361){if(typeof _361=="string"){this.value=_361;dojo.attr(this.focusNode,"value",_361);_361=true;}if(this._created){this.attr("checked",_361);}},_getValueAttr:function(){return (this.checked?this.value:false);},postMixInProperties:function(){if(this.value==""){this.value="on";}this.checkedAttrSetting=this.checked?"checked":"";this.inherited(arguments);},_fillContent:function(_362){},reset:function(){this._hasBeenBlurred=false;this.attr("checked",this.params.checked||false);this.value=this.params.value||"on";dojo.attr(this.focusNode,"value",this.value);},_onFocus:function(){if(this.id){dojo.query("label[for='"+this.id+"']").addClass("dijitFocusedLabel");}},_onBlur:function(){if(this.id){dojo.query("label[for='"+this.id+"']").removeClass("dijitFocusedLabel");}},_onClick:function(e){if(this.readOnly){return false;}return this.inherited(arguments);}});dojo.declare("dijit.form.RadioButton",dijit.form.CheckBox,{type:"radio",baseClass:"dijitRadio",_setCheckedAttr:function(_363){this.inherited(arguments);if(!this._created){return;}if(_363){var _364=this;dojo.query("INPUT[type=radio]",this.focusNode.form||dojo.doc).forEach(function(_365){if(_365.name==_364.name&&_365!=_364.focusNode&&_365.form==_364.focusNode.form){var _366=dijit.getEnclosingWidget(_365);if(_366&&_366.checked){_366.attr("checked",false);}}});}},_clicked:function(e){if(!this.checked){this.attr("checked",true);}}});}if(!dojo._hasResource["dijit.form.RadioButton"]){dojo._hasResource["dijit.form.RadioButton"]=true;dojo.provide("dijit.form.RadioButton");}if(!dojo._hasResource["dijit.form.ValidationTextBox"]){dojo._hasResource["dijit.form.ValidationTextBox"]=true;dojo.provide("dijit.form.ValidationTextBox");dojo.declare("dijit.form.ValidationTextBox",dijit.form.TextBox,{templateString:dojo.cache("dijit.form","templates/ValidationTextBox.html","<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\n\tid=\"widget_${id}\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\" waiRole=\"presentation\"\n\t><div style=\"overflow:hidden;\"\n\t\t><div class=\"dijitReset dijitValidationIcon\"><br></div\n\t\t><div class=\"dijitReset dijitValidationIconText\">&Chi;</div\n\t\t><div class=\"dijitReset dijitInputField\"\n\t\t\t><input class=\"dijitReset\" dojoAttachPoint='textbox,focusNode' autocomplete=\"off\"\n\t\t\t${nameAttrSetting} type='${type}'\n\t\t/></div\n\t></div\n></div>\n"),baseClass:"dijitTextBox",required:false,promptMessage:"",invalidMessage:"$_unset_$",constraints:{},regExp:".*",regExpGen:function(_367){return this.regExp;},state:"",tooltipPosition:[],_setValueAttr:function(){this.inherited(arguments);this.validate(this._focused);},validator:function(_368,_369){return (new RegExp("^(?:"+this.regExpGen(_369)+")"+(this.required?"":"?")+"$")).test(_368)&&(!this.required||!this._isEmpty(_368))&&(this._isEmpty(_368)||this.parse(_368,_369)!==undefined);},_isValidSubset:function(){return this.textbox.value.search(this._partialre)==0;},isValid:function(_36a){return this.validator(this.textbox.value,this.constraints);},_isEmpty:function(_36b){return /^\s*$/.test(_36b);},getErrorMessage:function(_36c){return this.invalidMessage;},getPromptMessage:function(_36d){return this.promptMessage;},_maskValidSubsetError:true,validate:function(_36e){var _36f="";var _370=this.disabled||this.isValid(_36e);if(_370){this._maskValidSubsetError=true;}var _371=!_370&&_36e&&this._isValidSubset();var _372=this._isEmpty(this.textbox.value);if(_372){this._maskValidSubsetError=true;}this.state=(_370||(!this._hasBeenBlurred&&_372)||_371)?"":"Error";if(this.state=="Error"){this._maskValidSubsetError=false;}this._setStateClass();dijit.setWaiState(this.focusNode,"invalid",_370?"false":"true");if(_36e){if(_372){_36f=this.getPromptMessage(true);}if(!_36f&&(this.state=="Error"||(_371&&!this._maskValidSubsetError))){_36f=this.getErrorMessage(true);}}this.displayMessage(_36f);return _370;},_message:"",displayMessage:function(_373){if(this._message==_373){return;}this._message=_373;dijit.hideTooltip(this.domNode);if(_373){dijit.showTooltip(_373,this.domNode,this.tooltipPosition);}},_refreshState:function(){this.validate(this._focused);this.inherited(arguments);},constructor:function(){this.constraints={};},postMixInProperties:function(){this.inherited(arguments);this.constraints.locale=this.lang;this.messages=dojo.i18n.getLocalization("dijit.form","validate",this.lang);if(this.invalidMessage=="$_unset_$"){this.invalidMessage=this.messages.invalidMessage;}var p=this.regExpGen(this.constraints);this.regExp=p;var _374="";if(p!=".*"){this.regExp.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(re){switch(re.charAt(0)){case "{":case "+":case "?":case "*":case "^":case "$":case "|":case "(":_374+=re;break;case ")":_374+="|$)";break;default:_374+="(?:"+re+"|$)";break;}});}try{"".search(_374);}catch(e){_374=this.regExp;console.warn("RegExp error in "+this.declaredClass+": "+this.regExp);}this._partialre="^(?:"+_374+")$";},_setDisabledAttr:function(_375){this.inherited(arguments);this._refreshState();},_setRequiredAttr:function(_376){this.required=_376;dijit.setWaiState(this.focusNode,"required",_376);this._refreshState();},postCreate:function(){if(dojo.isIE){var s=dojo.getComputedStyle(this.focusNode);if(s){var ff=s.fontFamily;if(ff){this.focusNode.style.fontFamily=ff;}}}this.inherited(arguments);},reset:function(){this._maskValidSubsetError=true;this.inherited(arguments);},_onBlur:function(){this.displayMessage("");this.inherited(arguments);}});dojo.declare("dijit.form.MappedTextBox",dijit.form.ValidationTextBox,{postMixInProperties:function(){this.inherited(arguments);this.nameAttrSetting="";},serialize:function(val,_377){return val.toString?val.toString():"";},toString:function(){var val=this.filter(this.attr("value"));return val!=null?(typeof val=="string"?val:this.serialize(val,this.constraints)):"";},validate:function(){this.valueNode.value=this.toString();return this.inherited(arguments);},buildRendering:function(){this.inherited(arguments);this.valueNode=dojo.place("<input type='hidden'"+(this.name?" name='"+this.name+"'":"")+">",this.textbox,"after");},reset:function(){this.valueNode.value="";this.inherited(arguments);}});dojo.declare("dijit.form.RangeBoundTextBox",dijit.form.MappedTextBox,{rangeMessage:"",rangeCheck:function(_378,_379){return ("min" in _379?(this.compare(_378,_379.min)>=0):true)&&("max" in _379?(this.compare(_378,_379.max)<=0):true);},isInRange:function(_37a){return this.rangeCheck(this.attr("value"),this.constraints);},_isDefinitelyOutOfRange:function(){var val=this.attr("value");var _37b=false;var _37c=false;if("min" in this.constraints){var min=this.constraints.min;min=this.compare(val,((typeof min=="number")&&min>=0&&val!=0)?0:min);_37b=(typeof min=="number")&&min<0;}if("max" in this.constraints){var max=this.constraints.max;max=this.compare(val,((typeof max!="number")||max>0)?max:0);_37c=(typeof max=="number")&&max>0;}return _37b||_37c;},_isValidSubset:function(){return this.inherited(arguments)&&!this._isDefinitelyOutOfRange();},isValid:function(_37d){return this.inherited(arguments)&&((this._isEmpty(this.textbox.value)&&!this.required)||this.isInRange(_37d));},getErrorMessage:function(_37e){var v=this.attr("value");if(v!==null&&v!==""&&v!==undefined&&!this.isInRange(_37e)){return this.rangeMessage;}return this.inherited(arguments);},postMixInProperties:function(){this.inherited(arguments);if(!this.rangeMessage){this.messages=dojo.i18n.getLocalization("dijit.form","validate",this.lang);this.rangeMessage=this.messages.rangeMessage;}},postCreate:function(){this.inherited(arguments);if(this.constraints.min!==undefined){dijit.setWaiState(this.focusNode,"valuemin",this.constraints.min);}if(this.constraints.max!==undefined){dijit.setWaiState(this.focusNode,"valuemax",this.constraints.max);}},_setValueAttr:function(_37f,_380){dijit.setWaiState(this.focusNode,"valuenow",_37f);this.inherited(arguments);}});}if(!dojo._hasResource["dojo.cldr.monetary"]){dojo._hasResource["dojo.cldr.monetary"]=true;dojo.provide("dojo.cldr.monetary");dojo.cldr.monetary.getData=function(code){var _381={ADP:0,BHD:3,BIF:0,BYR:0,CLF:0,CLP:0,DJF:0,ESP:0,GNF:0,IQD:3,ITL:0,JOD:3,JPY:0,KMF:0,KRW:0,KWD:3,LUF:0,LYD:3,MGA:0,MGF:0,OMR:3,PYG:0,RWF:0,TND:3,TRL:0,VUV:0,XAF:0,XOF:0,XPF:0};var _382={CHF:5};var _383=_381[code],_384=_382[code];if(typeof _383=="undefined"){_383=2;}if(typeof _384=="undefined"){_384=0;}return {places:_383,round:_384};};}if(!dojo._hasResource["dojo.currency"]){dojo._hasResource["dojo.currency"]=true;dojo.provide("dojo.currency");dojo.currency._mixInDefaults=function(_385){_385=_385||{};_385.type="currency";var _386=dojo.i18n.getLocalization("dojo.cldr","currency",_385.locale)||{};var iso=_385.currency;var data=dojo.cldr.monetary.getData(iso);dojo.forEach(["displayName","symbol","group","decimal"],function(prop){data[prop]=_386[iso+"_"+prop];});data.fractional=[true,false];return dojo.mixin(data,_385);};dojo.currency.format=function(_387,_388){return dojo.number.format(_387,dojo.currency._mixInDefaults(_388));};dojo.currency.regexp=function(_389){return dojo.number.regexp(dojo.currency._mixInDefaults(_389));};dojo.currency.parse=function(_38a,_38b){return dojo.number.parse(_38a,dojo.currency._mixInDefaults(_38b));};}if(!dojo._hasResource["dijit.form.NumberTextBox"]){dojo._hasResource["dijit.form.NumberTextBox"]=true;dojo.provide("dijit.form.NumberTextBox");dojo.declare("dijit.form.NumberTextBoxMixin",null,{regExpGen:dojo.number.regexp,value:NaN,editOptions:{pattern:"#.######"},_formatter:dojo.number.format,postMixInProperties:function(){var _38c=typeof this.constraints.places=="number"?this.constraints.places:0;if(_38c){_38c++;}if(typeof this.constraints.max!="number"){this.constraints.max=9*Math.pow(10,15-_38c);}if(typeof this.constraints.min!="number"){this.constraints.min=-9*Math.pow(10,15-_38c);}this.inherited(arguments);},_onFocus:function(){if(this.disabled){return;}var val=this.attr("value");if(typeof val=="number"&&!isNaN(val)){var _38d=this.format(val,this.constraints);if(_38d!==undefined){this.textbox.value=_38d;}}this.inherited(arguments);},format:function(_38e,_38f){if(typeof _38e!="number"){return String(_38e);}if(isNaN(_38e)){return "";}if(("rangeCheck" in this)&&!this.rangeCheck(_38e,_38f)){return String(_38e);}if(this.editOptions&&this._focused){_38f=dojo.mixin({},_38f,this.editOptions);}return this._formatter(_38e,_38f);},parse:dojo.number.parse,_getDisplayedValueAttr:function(){var v=this.inherited(arguments);return isNaN(v)?this.textbox.value:v;},filter:function(_390){return (_390===null||_390===""||_390===undefined)?NaN:this.inherited(arguments);},serialize:function(_391,_392){return (typeof _391!="number"||isNaN(_391))?"":this.inherited(arguments);},_setValueAttr:function(_393,_394,_395){if(_393!==undefined&&_395===undefined){if(typeof _393=="number"){if(isNaN(_393)){_395="";}else{if(("rangeCheck" in this)&&!this.rangeCheck(_393,this.constraints)){_395=String(_393);}}}else{if(!_393){_395="";_393=NaN;}else{_395=String(_393);_393=undefined;}}}this.inherited(arguments,[_393,_394,_395]);},_getValueAttr:function(){var v=this.inherited(arguments);if(isNaN(v)&&this.textbox.value!==""){if(this.constraints.exponent!==false&&/\de[-+]?|\d/i.test(this.textbox.value)&&(new RegExp("^"+dojo.number._realNumberRegexp(dojo.mixin({},this.constraints))+"$").test(this.textbox.value))){var n=Number(this.textbox.value);return isNaN(n)?undefined:n;}else{return undefined;}}else{return v;}},isValid:function(_396){if(!this._focused||this._isEmpty(this.textbox.value)){return this.inherited(arguments);}else{var v=this.attr("value");if(!isNaN(v)&&this.rangeCheck(v,this.constraints)){if(this.constraints.exponent!==false&&/\de[-+]?\d/i.test(this.textbox.value)){return true;}else{return this.inherited(arguments);}}else{return false;}}}});dojo.declare("dijit.form.NumberTextBox",[dijit.form.RangeBoundTextBox,dijit.form.NumberTextBoxMixin],{});}if(!dojo._hasResource["dijit.form.CurrencyTextBox"]){dojo._hasResource["dijit.form.CurrencyTextBox"]=true;dojo.provide("dijit.form.CurrencyTextBox");dojo.declare("dijit.form.CurrencyTextBox",dijit.form.NumberTextBox,{currency:"",regExpGen:function(_397){return "("+(this._focused?this.inherited(arguments,[dojo.mixin({},_397,this.editOptions)])+"|":"")+dojo.currency.regexp(_397)+")";},_formatter:dojo.currency.format,parse:function(_398,_399){var v=dojo.currency.parse(_398,_399);if(isNaN(v)&&/\d+/.test(_398)){return this.inherited(arguments,[_398,dojo.mixin({},_399,this.editOptions)]);}return v;},postMixInProperties:function(){this.constraints=dojo.currency._mixInDefaults(dojo.mixin(this.constraints,{currency:this.currency,exponent:false}));this.inherited(arguments);}});}if(!dojo._hasResource["dojo.cldr.supplemental"]){dojo._hasResource["dojo.cldr.supplemental"]=true;dojo.provide("dojo.cldr.supplemental");dojo.cldr.supplemental.getFirstDayOfWeek=function(_39a){var _39b={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,lb:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,tn:6,ye:6,as:0,au:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,ie:0,il:0,is:0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,za:0,zw:0,et:0,mw:0,ng:0,tj:0,sy:4};var _39c=dojo.cldr.supplemental._region(_39a);var dow=_39b[_39c];return (dow===undefined)?1:dow;};dojo.cldr.supplemental._region=function(_39d){_39d=dojo.i18n.normalizeLocale(_39d);var tags=_39d.split("-");var _39e=tags[1];if(!_39e){_39e={de:"de",en:"us",es:"es",fi:"fi",fr:"fr",he:"il",hu:"hu",it:"it",ja:"jp",ko:"kr",nl:"nl",pt:"br",sv:"se",zh:"cn"}[tags[0]];}else{if(_39e.length==4){_39e=tags[2];}}return _39e;};dojo.cldr.supplemental.getWeekend=function(_39f){var _3a0={eg:5,il:5,sy:5,"in":0,ae:4,bh:4,dz:4,iq:4,jo:4,kw:4,lb:4,ly:4,ma:4,om:4,qa:4,sa:4,sd:4,tn:4,ye:4};var _3a1={ae:5,bh:5,dz:5,iq:5,jo:5,kw:5,lb:5,ly:5,ma:5,om:5,qa:5,sa:5,sd:5,tn:5,ye:5,af:5,ir:5,eg:6,il:6,sy:6};var _3a2=dojo.cldr.supplemental._region(_39f);var _3a3=_3a0[_3a2];var end=_3a1[_3a2];if(_3a3===undefined){_3a3=6;}if(end===undefined){end=0;}return {start:_3a3,end:end};};}if(!dojo._hasResource["dojo.date"]){dojo._hasResource["dojo.date"]=true;dojo.provide("dojo.date");dojo.date.getDaysInMonth=function(_3a4){var _3a5=_3a4.getMonth();var days=[31,28,31,30,31,30,31,31,30,31,30,31];if(_3a5==1&&dojo.date.isLeapYear(_3a4)){return 29;}return days[_3a5];};dojo.date.isLeapYear=function(_3a6){var year=_3a6.getFullYear();return !(year%400)||(!(year%4)&&!!(year%100));};dojo.date.getTimezoneName=function(_3a7){var str=_3a7.toString();var tz="";var _3a8;var pos=str.indexOf("(");if(pos>-1){tz=str.substring(++pos,str.indexOf(")"));}else{var pat=/([A-Z\/]+) \d{4}$/;if((_3a8=str.match(pat))){tz=_3a8[1];}else{str=_3a7.toLocaleString();pat=/ ([A-Z\/]+)$/;if((_3a8=str.match(pat))){tz=_3a8[1];}}}return (tz=="AM"||tz=="PM")?"":tz;};dojo.date.compare=function(_3a9,_3aa,_3ab){_3a9=new Date(+_3a9);_3aa=new Date(+(_3aa||new Date()));if(_3ab=="date"){_3a9.setHours(0,0,0,0);_3aa.setHours(0,0,0,0);}else{if(_3ab=="time"){_3a9.setFullYear(0,0,0);_3aa.setFullYear(0,0,0);}}if(_3a9>_3aa){return 1;}if(_3a9<_3aa){return -1;}return 0;};dojo.date.add=function(date,_3ac,_3ad){var sum=new Date(+date);var _3ae=false;var _3af="Date";switch(_3ac){case "day":break;case "weekday":var days,_3b0;var mod=_3ad%5;if(!mod){days=(_3ad>0)?5:-5;_3b0=(_3ad>0)?((_3ad-5)/5):((_3ad+5)/5);}else{days=mod;_3b0=parseInt(_3ad/5);}var strt=date.getDay();var adj=0;if(strt==6&&_3ad>0){adj=1;}else{if(strt==0&&_3ad<0){adj=-1;}}var trgt=strt+days;if(trgt==0||trgt==6){adj=(_3ad>0)?2:-2;}_3ad=(7*_3b0)+days+adj;break;case "year":_3af="FullYear";_3ae=true;break;case "week":_3ad*=7;break;case "quarter":_3ad*=3;case "month":_3ae=true;_3af="Month";break;default:_3af="UTC"+_3ac.charAt(0).toUpperCase()+_3ac.substring(1)+"s";}if(_3af){sum["set"+_3af](sum["get"+_3af]()+_3ad);}if(_3ae&&(sum.getDate()<date.getDate())){sum.setDate(0);}return sum;};dojo.date.difference=function(_3b1,_3b2,_3b3){_3b2=_3b2||new Date();_3b3=_3b3||"day";var _3b4=_3b2.getFullYear()-_3b1.getFullYear();var _3b5=1;switch(_3b3){case "quarter":var m1=_3b1.getMonth();var m2=_3b2.getMonth();var q1=Math.floor(m1/3)+1;var q2=Math.floor(m2/3)+1;q2+=(_3b4*4);_3b5=q2-q1;break;case "weekday":var days=Math.round(dojo.date.difference(_3b1,_3b2,"day"));var _3b6=parseInt(dojo.date.difference(_3b1,_3b2,"week"));var mod=days%7;if(mod==0){days=_3b6*5;}else{var adj=0;var aDay=_3b1.getDay();var bDay=_3b2.getDay();_3b6=parseInt(days/7);mod=days%7;var _3b7=new Date(_3b1);_3b7.setDate(_3b7.getDate()+(_3b6*7));var _3b8=_3b7.getDay();if(days>0){switch(true){case aDay==6:adj=-1;break;case aDay==0:adj=0;break;case bDay==6:adj=-1;break;case bDay==0:adj=-2;break;case (_3b8+mod)>5:adj=-2;}}else{if(days<0){switch(true){case aDay==6:adj=0;break;case aDay==0:adj=1;break;case bDay==6:adj=2;break;case bDay==0:adj=1;break;case (_3b8+mod)<0:adj=2;}}}days+=adj;days-=(_3b6*2);}_3b5=days;break;case "year":_3b5=_3b4;break;case "month":_3b5=(_3b2.getMonth()-_3b1.getMonth())+(_3b4*12);break;case "week":_3b5=parseInt(dojo.date.difference(_3b1,_3b2,"day")/7);break;case "day":_3b5/=24;case "hour":_3b5/=60;case "minute":_3b5/=60;case "second":_3b5/=1000;case "millisecond":_3b5*=_3b2.getTime()-_3b1.getTime();}return Math.round(_3b5);};}if(!dojo._hasResource["dojo.date.locale"]){dojo._hasResource["dojo.date.locale"]=true;dojo.provide("dojo.date.locale");(function(){function _3b9(_3ba,_3bb,_3bc,_3bd){return _3bd.replace(/([a-z])\1*/ig,function(_3be){var s,pad,c=_3be.charAt(0),l=_3be.length,_3bf=["abbr","wide","narrow"];switch(c){case "G":s=_3bb[(l<4)?"eraAbbr":"eraNames"][_3ba.getFullYear()<0?0:1];break;case "y":s=_3ba.getFullYear();switch(l){case 1:break;case 2:if(!_3bc.fullYear){s=String(s);s=s.substr(s.length-2);break;}default:pad=true;}break;case "Q":case "q":s=Math.ceil((_3ba.getMonth()+1)/3);pad=true;break;case "M":var m=_3ba.getMonth();if(l<3){s=m+1;pad=true;}else{var _3c0=["months","format",_3bf[l-3]].join("-");s=_3bb[_3c0][m];}break;case "w":var _3c1=0;s=dojo.date.locale._getWeekOfYear(_3ba,_3c1);pad=true;break;case "d":s=_3ba.getDate();pad=true;break;case "D":s=dojo.date.locale._getDayOfYear(_3ba);pad=true;break;case "E":var d=_3ba.getDay();if(l<3){s=d+1;pad=true;}else{var _3c2=["days","format",_3bf[l-3]].join("-");s=_3bb[_3c2][d];}break;case "a":var _3c3=(_3ba.getHours()<12)?"am":"pm";s=_3bb[_3c3];break;case "h":case "H":case "K":case "k":var h=_3ba.getHours();switch(c){case "h":s=(h%12)||12;break;case "H":s=h;break;case "K":s=(h%12);break;case "k":s=h||24;break;}pad=true;break;case "m":s=_3ba.getMinutes();pad=true;break;case "s":s=_3ba.getSeconds();pad=true;break;case "S":s=Math.round(_3ba.getMilliseconds()*Math.pow(10,l-3));pad=true;break;case "v":case "z":s=dojo.date.locale._getZone(_3ba,true,_3bc);if(s){break;}l=4;case "Z":var _3c4=dojo.date.locale._getZone(_3ba,false,_3bc);var tz=[(_3c4<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_3c4)/60),2),dojo.string.pad(Math.abs(_3c4)%60,2)];if(l==4){tz.splice(0,0,"GMT");tz.splice(3,0,":");}s=tz.join("");break;default:throw new Error("dojo.date.locale.format: invalid pattern char: "+_3bd);}if(pad){s=dojo.string.pad(s,l);}return s;});};dojo.date.locale._getZone=function(_3c5,_3c6,_3c7){if(_3c6){return dojo.date.getTimezoneName(_3c5);}else{return _3c5.getTimezoneOffset();}};dojo.date.locale.format=function(_3c8,_3c9){_3c9=_3c9||{};var _3ca=dojo.i18n.normalizeLocale(_3c9.locale),_3cb=_3c9.formatLength||"short",_3cc=dojo.date.locale._getGregorianBundle(_3ca),str=[],_3cd=dojo.hitch(this,_3b9,_3c8,_3cc,_3c9);if(_3c9.selector=="year"){return _3ce(_3cc["dateFormatItem-yyyy"]||"yyyy",_3cd);}var _3cf;if(_3c9.selector!="date"){_3cf=_3c9.timePattern||_3cc["timeFormat-"+_3cb];if(_3cf){str.push(_3ce(_3cf,_3cd));}}if(_3c9.selector!="time"){_3cf=_3c9.datePattern||_3cc["dateFormat-"+_3cb];if(_3cf){str.push(_3ce(_3cf,_3cd));}}return str.length==1?str[0]:_3cc["dateTimeFormat-"+_3cb].replace(/\{(\d+)\}/g,function(_3d0,key){return str[key];});};dojo.date.locale.regexp=function(_3d1){return dojo.date.locale._parseInfo(_3d1).regexp;};dojo.date.locale._parseInfo=function(_3d2){_3d2=_3d2||{};var _3d3=dojo.i18n.normalizeLocale(_3d2.locale),_3d4=dojo.date.locale._getGregorianBundle(_3d3),_3d5=_3d2.formatLength||"short",_3d6=_3d2.datePattern||_3d4["dateFormat-"+_3d5],_3d7=_3d2.timePattern||_3d4["timeFormat-"+_3d5],_3d8;if(_3d2.selector=="date"){_3d8=_3d6;}else{if(_3d2.selector=="time"){_3d8=_3d7;}else{_3d8=_3d4["dateTimeFormat-"+_3d5].replace(/\{(\d+)\}/g,function(_3d9,key){return [_3d7,_3d6][key];});}}var _3da=[],re=_3ce(_3d8,dojo.hitch(this,_3db,_3da,_3d4,_3d2));return {regexp:re,tokens:_3da,bundle:_3d4};};dojo.date.locale.parse=function(_3dc,_3dd){var info=dojo.date.locale._parseInfo(_3dd),_3de=info.tokens,_3df=info.bundle,re=new RegExp("^"+info.regexp+"$",info.strict?"":"i"),_3e0=re.exec(_3dc);if(!_3e0){return null;}var _3e1=["abbr","wide","narrow"],_3e2=[1970,0,1,0,0,0,0],amPm="",_3e3=dojo.every(_3e0,function(v,i){if(!i){return true;}var _3e4=_3de[i-1];var l=_3e4.length;switch(_3e4.charAt(0)){case "y":if(l!=2&&_3dd.strict){_3e2[0]=v;}else{if(v<100){v=Number(v);var year=""+new Date().getFullYear(),_3e5=year.substring(0,2)*100,_3e6=Math.min(Number(year.substring(2,4))+20,99),num=(v<_3e6)?_3e5+v:_3e5-100+v;_3e2[0]=num;}else{if(_3dd.strict){return false;}_3e2[0]=v;}}break;case "M":if(l>2){var _3e7=_3df["months-format-"+_3e1[l-3]].concat();if(!_3dd.strict){v=v.replace(".","").toLowerCase();_3e7=dojo.map(_3e7,function(s){return s.replace(".","").toLowerCase();});}v=dojo.indexOf(_3e7,v);if(v==-1){return false;}}else{v--;}_3e2[1]=v;break;case "E":case "e":var days=_3df["days-format-"+_3e1[l-3]].concat();if(!_3dd.strict){v=v.toLowerCase();days=dojo.map(days,function(d){return d.toLowerCase();});}v=dojo.indexOf(days,v);if(v==-1){return false;}break;case "D":_3e2[1]=0;case "d":_3e2[2]=v;break;case "a":var am=_3dd.am||_3df.am;var pm=_3dd.pm||_3df.pm;if(!_3dd.strict){var _3e8=/\./g;v=v.replace(_3e8,"").toLowerCase();am=am.replace(_3e8,"").toLowerCase();pm=pm.replace(_3e8,"").toLowerCase();}if(_3dd.strict&&v!=am&&v!=pm){return false;}amPm=(v==pm)?"p":(v==am)?"a":"";break;case "K":if(v==24){v=0;}case "h":case "H":case "k":if(v>23){return false;}_3e2[3]=v;break;case "m":_3e2[4]=v;break;case "s":_3e2[5]=v;break;case "S":_3e2[6]=v;}return true;});var _3e9=+_3e2[3];if(amPm==="p"&&_3e9<12){_3e2[3]=_3e9+12;}else{if(amPm==="a"&&_3e9==12){_3e2[3]=0;}}var _3ea=new Date(_3e2[0],_3e2[1],_3e2[2],_3e2[3],_3e2[4],_3e2[5],_3e2[6]);if(_3dd.strict){_3ea.setFullYear(_3e2[0]);}var _3eb=_3de.join(""),_3ec=_3eb.indexOf("d")!=-1,_3ed=_3eb.indexOf("M")!=-1;if(!_3e3||(_3ed&&_3ea.getMonth()>_3e2[1])||(_3ec&&_3ea.getDate()>_3e2[2])){return null;}if((_3ed&&_3ea.getMonth()<_3e2[1])||(_3ec&&_3ea.getDate()<_3e2[2])){_3ea=dojo.date.add(_3ea,"hour",1);}return _3ea;};function _3ce(_3ee,_3ef,_3f0,_3f1){var _3f2=function(x){return x;};_3ef=_3ef||_3f2;_3f0=_3f0||_3f2;_3f1=_3f1||_3f2;var _3f3=_3ee.match(/(''|[^'])+/g),_3f4=_3ee.charAt(0)=="'";dojo.forEach(_3f3,function(_3f5,i){if(!_3f5){_3f3[i]="";}else{_3f3[i]=(_3f4?_3f0:_3ef)(_3f5);_3f4=!_3f4;}});return _3f1(_3f3.join(""));};function _3db(_3f6,_3f7,_3f8,_3f9){_3f9=dojo.regexp.escapeString(_3f9);if(!_3f8.strict){_3f9=_3f9.replace(" a"," ?a");}return _3f9.replace(/([a-z])\1*/ig,function(_3fa){var s,c=_3fa.charAt(0),l=_3fa.length,p2="",p3="";if(_3f8.strict){if(l>1){p2="0"+"{"+(l-1)+"}";}if(l>2){p3="0"+"{"+(l-2)+"}";}}else{p2="0?";p3="0{0,2}";}switch(c){case "y":s="\\d{2,4}";break;case "M":s=(l>2)?"\\S+?":p2+"[1-9]|1[0-2]";break;case "D":s=p2+"[1-9]|"+p3+"[1-9][0-9]|[12][0-9][0-9]|3[0-5][0-9]|36[0-6]";break;case "d":s="[12]\\d|"+p2+"[1-9]|3[01]";break;case "w":s=p2+"[1-9]|[1-4][0-9]|5[0-3]";break;case "E":s="\\S+";break;case "h":s=p2+"[1-9]|1[0-2]";break;case "k":s=p2+"\\d|1[01]";break;case "H":s=p2+"\\d|1\\d|2[0-3]";break;case "K":s=p2+"[1-9]|1\\d|2[0-4]";break;case "m":case "s":s="[0-5]\\d";break;case "S":s="\\d{"+l+"}";break;case "a":var am=_3f8.am||_3f7.am||"AM";var pm=_3f8.pm||_3f7.pm||"PM";if(_3f8.strict){s=am+"|"+pm;}else{s=am+"|"+pm;if(am!=am.toLowerCase()){s+="|"+am.toLowerCase();}if(pm!=pm.toLowerCase()){s+="|"+pm.toLowerCase();}if(s.indexOf(".")!=-1){s+="|"+s.replace(/\./g,"");}}s=s.replace(/\./g,"\\.");break;default:s=".*";}if(_3f6){_3f6.push(_3fa);}return "("+s+")";}).replace(/[\xa0 ]/g,"[\\s\\xa0]");};})();(function(){var _3fb=[];dojo.date.locale.addCustomFormats=function(_3fc,_3fd){_3fb.push({pkg:_3fc,name:_3fd});};dojo.date.locale._getGregorianBundle=function(_3fe){var _3ff={};dojo.forEach(_3fb,function(desc){var _400=dojo.i18n.getLocalization(desc.pkg,desc.name,_3fe);_3ff=dojo.mixin(_3ff,_400);},this);return _3ff;};})();dojo.date.locale.addCustomFormats("dojo.cldr","gregorian");dojo.date.locale.getNames=function(item,type,_401,_402){var _403,_404=dojo.date.locale._getGregorianBundle(_402),_405=[item,_401,type];if(_401=="standAlone"){var key=_405.join("-");_403=_404[key];if(_403[0]==1){_403=undefined;}}_405[1]="format";return (_403||_404[_405.join("-")]).concat();};dojo.date.locale.isWeekend=function(_406,_407){var _408=dojo.cldr.supplemental.getWeekend(_407),day=(_406||new Date()).getDay();if(_408.end<_408.start){_408.end+=7;if(day<_408.start){day+=7;}}return day>=_408.start&&day<=_408.end;};dojo.date.locale._getDayOfYear=function(_409){return dojo.date.difference(new Date(_409.getFullYear(),0,1,_409.getHours()),_409)+1;};dojo.date.locale._getWeekOfYear=function(_40a,_40b){if(arguments.length==1){_40b=0;}var _40c=new Date(_40a.getFullYear(),0,1).getDay(),adj=(_40c-_40b+7)%7,week=Math.floor((dojo.date.locale._getDayOfYear(_40a)+adj-1)/7);if(_40c==_40b){week++;}return week;};}if(!dojo._hasResource["dijit.Calendar"]){dojo._hasResource["dijit.Calendar"]=true;dojo.provide("dijit.Calendar");dojo.declare("dijit.Calendar",[dijit._Widget,dijit._Templated],{templateString:dojo.cache("dijit","templates/Calendar.html","<table cellspacing=\"0\" cellpadding=\"0\" class=\"dijitCalendarContainer\" role=\"grid\" dojoAttachEvent=\"onkeypress: _onKeyPress\">\n\t<thead>\n\t\t<tr class=\"dijitReset dijitCalendarMonthContainer\" valign=\"top\">\n\t\t\t<th class='dijitReset' dojoAttachPoint=\"decrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarDecrease\" waiRole=\"presentation\">\n\t\t\t\t<span dojoAttachPoint=\"decreaseArrowNode\" class=\"dijitA11ySideArrow\">-</span>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' colspan=\"5\">\n\t\t\t\t<div class=\"dijitVisible\">\n\t\t\t\t\t<div class=\"dijitPopup dijitMenu dijitMenuPassive dijitHidden\" dojoAttachPoint=\"monthDropDown\" dojoAttachEvent=\"onmouseup: _onMonthSelect, onmouseover: _onMenuHover, onmouseout: _onMenuHover\">\n\t\t\t\t\t\t<div class=\"dijitCalendarMonthLabelTemplate dijitCalendarMonthLabel\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div dojoAttachPoint=\"monthLabelSpacer\" class=\"dijitSpacer\"></div>\n\t\t\t\t<div dojoAttachPoint=\"monthLabelNode\" class=\"dijitCalendarMonthLabel dijitInline dijitVisible\" dojoAttachEvent=\"onmousedown: _onMonthToggle\"></div>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' dojoAttachPoint=\"incrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarIncrease\" waiRole=\"presentation\">\n\t\t\t\t<span dojoAttachPoint=\"increaseArrowNode\" class=\"dijitA11ySideArrow\">+</span>\n\t\t\t</th>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th class=\"dijitReset dijitCalendarDayLabelTemplate\" role=\"columnheader\"><span class=\"dijitCalendarDayLabel\"></span></th>\n\t\t</tr>\n\t</thead>\n\t<tbody dojoAttachEvent=\"onclick: _onDayClick, onmouseover: _onDayMouseOver, onmouseout: _onDayMouseOut\" class=\"dijitReset dijitCalendarBodyContainer\">\n\t\t<tr class=\"dijitReset dijitCalendarWeekTemplate\" role=\"row\">\n\t\t\t<td class=\"dijitReset dijitCalendarDateTemplate\" role=\"gridcell\"><span class=\"dijitCalendarDateLabel\"></span></td>\n\t\t</tr>\n\t</tbody>\n\t<tfoot class=\"dijitReset dijitCalendarYearContainer\">\n\t\t<tr>\n\t\t\t<td class='dijitReset' valign=\"top\" colspan=\"7\">\n\t\t\t\t<h3 class=\"dijitCalendarYearLabel\">\n\t\t\t\t\t<span dojoAttachPoint=\"previousYearLabelNode\" class=\"dijitInline dijitCalendarPreviousYear\"></span>\n\t\t\t\t\t<span dojoAttachPoint=\"currentYearLabelNode\" class=\"dijitInline dijitCalendarSelectedYear\"></span>\n\t\t\t\t\t<span dojoAttachPoint=\"nextYearLabelNode\" class=\"dijitInline dijitCalendarNextYear\"></span>\n\t\t\t\t</h3>\n\t\t\t</td>\n\t\t</tr>\n\t</tfoot>\n</table>\n"),value:new Date(),datePackage:"dojo.date",dayWidth:"narrow",tabIndex:"0",attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{tabIndex:"domNode"}),setValue:function(_40d){dojo.deprecated("dijit.Calendar:setValue() is deprecated. Use attr('value', ...) instead.","","2.0");this.attr("value",_40d);},_getValueAttr:function(){var _40e=new this.dateClassObj(this.value);_40e.setHours(0,0,0,0);if(_40e.getDate()<this.value.getDate()){_40e=this.dateFuncObj.add(_40e,"hour",1);}return _40e;},_setValueAttr:function(_40f){if(!this.value||this.dateFuncObj.compare(_40f,this.value)){_40f=new this.dateClassObj(_40f);_40f.setHours(1);this.displayMonth=new this.dateClassObj(_40f);if(!this.isDisabledDate(_40f,this.lang)){this.value=_40f;this.onChange(this.attr("value"));}dojo.attr(this.domNode,"aria-label",this.dateLocaleModule.format(_40f,{selector:"date",formatLength:"full"}));this._populateGrid();}},_setText:function(node,text){while(node.firstChild){node.removeChild(node.firstChild);}node.appendChild(dojo.doc.createTextNode(text));},_populateGrid:function(){var _410=this.displayMonth;_410.setDate(1);var _411=_410.getDay(),_412=this.dateFuncObj.getDaysInMonth(_410),_413=this.dateFuncObj.getDaysInMonth(this.dateFuncObj.add(_410,"month",-1)),_414=new this.dateClassObj(),_415=dojo.cldr.supplemental.getFirstDayOfWeek(this.lang);if(_415>_411){_415-=7;}dojo.query(".dijitCalendarDateTemplate",this.domNode).forEach(function(_416,i){i+=_415;var date=new this.dateClassObj(_410),_417,_418="dijitCalendar",adj=0;if(i<_411){_417=_413-_411+i+1;adj=-1;_418+="Previous";}else{if(i>=(_411+_412)){_417=i-_411-_412+1;adj=1;_418+="Next";}else{_417=i-_411+1;_418+="Current";}}if(adj){date=this.dateFuncObj.add(date,"month",adj);}date.setDate(_417);if(!this.dateFuncObj.compare(date,_414,"date")){_418="dijitCalendarCurrentDate "+_418;}if(this._isSelectedDate(date,this.lang)){_418="dijitCalendarSelectedDate "+_418;}if(this.isDisabledDate(date,this.lang)){_418="dijitCalendarDisabledDate "+_418;}var _419=this.getClassForDate(date,this.lang);if(_419){_418=_419+" "+_418;}_416.className=_418+"Month dijitCalendarDateTemplate";_416.dijitDateValue=date.valueOf();var _41a=dojo.query(".dijitCalendarDateLabel",_416)[0],text=date.getDateLocalized?date.getDateLocalized(this.lang):date.getDate();this._setText(_41a,text);},this);var _41b=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang);this._setText(this.monthLabelNode,_41b[_410.getMonth()]);var y=_410.getFullYear()-1;var d=new this.dateClassObj();dojo.forEach(["previous","current","next"],function(name){d.setFullYear(y++);this._setText(this[name+"YearLabelNode"],this.dateLocaleModule.format(d,{selector:"year",locale:this.lang}));},this);var _41c=this;var _41d=function(_41e,_41f,adj){_41c._connects.push(dijit.typematic.addMouseListener(_41c[_41e],_41c,function(_420){if(_420>=0){_41c._adjustDisplay(_41f,adj);}},0.8,500));};_41d("incrementMonth","month",1);_41d("decrementMonth","month",-1);_41d("nextYearLabelNode","year",1);_41d("previousYearLabelNode","year",-1);},goToToday:function(){this.attr("value",new this.dateClassObj());},constructor:function(args){var _421=(args.datePackage&&(args.datePackage!="dojo.date"))?args.datePackage+".Date":"Date";this.dateClassObj=dojo.getObject(_421,false);this.datePackage=args.datePackage||this.datePackage;this.dateFuncObj=dojo.getObject(this.datePackage,false);this.dateLocaleModule=dojo.getObject(this.datePackage+".locale",false);},postMixInProperties:function(){if(isNaN(this.value)){delete this.value;}this.inherited(arguments);},postCreate:function(){this.inherited(arguments);dojo.setSelectable(this.domNode,false);var _422=dojo.hitch(this,function(_423,n){var _424=dojo.query(_423,this.domNode)[0];for(var i=0;i<n;i++){_424.parentNode.appendChild(_424.cloneNode(true));}});_422(".dijitCalendarDayLabelTemplate",6);_422(".dijitCalendarDateTemplate",6);_422(".dijitCalendarWeekTemplate",5);var _425=this.dateLocaleModule.getNames("days",this.dayWidth,"standAlone",this.lang);var _426=dojo.cldr.supplemental.getFirstDayOfWeek(this.lang);dojo.query(".dijitCalendarDayLabel",this.domNode).forEach(function(_427,i){this._setText(_427,_425[(i+_426)%7]);},this);var _428=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang);_422(".dijitCalendarMonthLabelTemplate",_428.length-1);dojo.query(".dijitCalendarMonthLabelTemplate",this.domNode).forEach(function(node,i){dojo.attr(node,"month",i);this._setText(node,_428[i]);dojo.place(node.cloneNode(true),this.monthLabelSpacer);},this);var _429=this.value;this.value=null;this.attr("value",new this.dateClassObj(_429));},_onMenuHover:function(e){dojo.stopEvent(e);dojo.toggleClass(e.target,"dijitMenuItemHover");},_adjustDisplay:function(part,_42a){this.displayMonth=this.dateFuncObj.add(this.displayMonth,part,_42a);this._populateGrid();},_onMonthToggle:function(evt){dojo.stopEvent(evt);if(evt.type=="mousedown"){var _42b=dojo.position(this.monthLabelNode);var dim={width:_42b.w+"px",top:-this.displayMonth.getMonth()*_42b.h+"px"};if((dojo.isIE&&dojo.isQuirks)||dojo.isIE<7){dim.left=-_42b.w/2+"px";}dojo.style(this.monthDropDown,dim);this._popupHandler=this.connect(document,"onmouseup","_onMonthToggle");}else{this.disconnect(this._popupHandler);delete this._popupHandler;}dojo.toggleClass(this.monthDropDown,"dijitHidden");dojo.toggleClass(this.monthLabelNode,"dijitVisible");},_onMonthSelect:function(evt){this._onMonthToggle(evt);this.displayMonth.setMonth(dojo.attr(evt.target,"month"));this._populateGrid();},_onDayClick:function(evt){dojo.stopEvent(evt);for(var node=evt.target;node&&!node.dijitDateValue;node=node.parentNode){}if(node&&!dojo.hasClass(node,"dijitCalendarDisabledDate")){this.attr("value",node.dijitDateValue);this.onValueSelected(this.attr("value"));}},_onDayMouseOver:function(evt){var node=evt.target;if(node&&(node.dijitDateValue||node==this.previousYearLabelNode||node==this.nextYearLabelNode)){dojo.addClass(node,"dijitCalendarHoveredDate");this._currentNode=node;}},_onDayMouseOut:function(evt){if(!this._currentNode){return;}for(var node=evt.relatedTarget;node;){if(node==this._currentNode){return;}try{node=node.parentNode;}catch(x){node=null;}}dojo.removeClass(this._currentNode,"dijitCalendarHoveredDate");this._currentNode=null;},_onKeyPress:function(evt){var dk=dojo.keys,_42c=-1,_42d,_42e=this.value;switch(evt.keyCode){case dk.RIGHT_ARROW:_42c=1;case dk.LEFT_ARROW:_42d="day";if(!this.isLeftToRight()){_42c*=-1;}break;case dk.DOWN_ARROW:_42c=1;case dk.UP_ARROW:_42d="week";break;case dk.PAGE_DOWN:_42c=1;case dk.PAGE_UP:_42d=evt.ctrlKey?"year":"month";break;case dk.END:_42e=this.dateFuncObj.add(_42e,"month",1);_42d="day";case dk.HOME:_42e=new Date(_42e).setDate(1);break;case dk.ENTER:this.onValueSelected(this.attr("value"));break;case dk.ESCAPE:default:return;}dojo.stopEvent(evt);if(_42d){_42e=this.dateFuncObj.add(_42e,_42d,_42c);}this.attr("value",_42e);},onValueSelected:function(date){},onChange:function(date){},_isSelectedDate:function(_42f,_430){return !this.dateFuncObj.compare(_42f,this.value,"date");},isDisabledDate:function(_431,_432){},getClassForDate:function(_433,_434){}});}if(!dojo._hasResource["dijit.form._DateTimeTextBox"]){dojo._hasResource["dijit.form._DateTimeTextBox"]=true;dojo.provide("dijit.form._DateTimeTextBox");dojo.declare("dijit.form._DateTimeTextBox",dijit.form.RangeBoundTextBox,{regExpGen:dojo.date.locale.regexp,datePackage:"dojo.date",compare:dojo.date.compare,format:function(_435,_436){if(!_435){return "";}return this.dateLocaleModule.format(_435,_436);},parse:function(_437,_438){return this.dateLocaleModule.parse(_437,_438)||(this._isEmpty(_437)?null:undefined);},serialize:function(val,_439){if(val.toGregorian){val=val.toGregorian();}return dojo.date.stamp.toISOString(val,_439);},value:new Date(""),_blankValue:null,popupClass:"",_selector:"",constructor:function(args){var _43a=args.datePackage?args.datePackage+".Date":"Date";this.dateClassObj=dojo.getObject(_43a,false);this.value=new this.dateClassObj("");this.datePackage=args.datePackage||this.datePackage;this.dateLocaleModule=dojo.getObject(this.datePackage+".locale",false);this.regExpGen=this.dateLocaleModule.regexp;},postMixInProperties:function(){this.inherited(arguments);if(!this.value||this.value.toString()==dijit.form._DateTimeTextBox.prototype.value.toString()){this.value=null;}var _43b=this.constraints;_43b.selector=this._selector;_43b.fullYear=true;var _43c=dojo.date.stamp.fromISOString;if(typeof _43b.min=="string"){_43b.min=_43c(_43b.min);}if(typeof _43b.max=="string"){_43b.max=_43c(_43b.max);}},_onFocus:function(evt){this._open();this.inherited(arguments);},_setValueAttr:function(_43d,_43e,_43f){if(_43d instanceof Date&&!(this.dateClassObj instanceof Date)){_43d=new this.dateClassObj(_43d);}this.inherited(arguments);if(this._picker){if(!_43d){_43d=new this.dateClassObj();}this._picker.attr("value",_43d);}},_open:function(){if(this.disabled||this.readOnly||!this.popupClass){return;}var _440=this;if(!this._picker){var _441=dojo.getObject(this.popupClass,false);this._picker=new _441({onValueSelected:function(_442){if(_440._tabbingAway){delete _440._tabbingAway;}else{_440.focus();}setTimeout(dojo.hitch(_440,"_close"),1);dijit.form._DateTimeTextBox.superclass._setValueAttr.call(_440,_442,true);},id:this.id+"_popup",lang:_440.lang,constraints:_440.constraints,datePackage:_440.datePackage,isDisabledDate:function(date){var _443=dojo.date.compare;var _444=_440.constraints;return _444&&(_444.min&&(_443(_444.min,date,_440._selector)>0)||(_444.max&&_443(_444.max,date,_440._selector)<0));}});this._picker.attr("value",this.attr("value")||new this.dateClassObj());}if(!this._opened){dijit.popup.open({parent:this,popup:this._picker,orient:{"BL":"TL","TL":"BL"},around:this.domNode,onCancel:dojo.hitch(this,this._close),onClose:function(){_440._opened=false;}});this._opened=true;}dojo.marginBox(this._picker.domNode,{w:this.domNode.offsetWidth});},_close:function(){if(this._opened){dijit.popup.close(this._picker);this._opened=false;}},_onBlur:function(){this._close();if(this._picker){this._picker.destroy();delete this._picker;}this.inherited(arguments);},_getDisplayedValueAttr:function(){return this.textbox.value;},_setDisplayedValueAttr:function(_445,_446){this._setValueAttr(this.parse(_445,this.constraints),_446,_445);},destroy:function(){if(this._picker){this._picker.destroy();delete this._picker;}this.inherited(arguments);},postCreate:function(){this.inherited(arguments);this.connect(this.focusNode,"onkeypress",this._onKeyPress);this.connect(this.focusNode,"onclick",this._open);},_onKeyPress:function(e){var p=this._picker,dk=dojo.keys;if(p&&this._opened&&p.handleKey){if(p.handleKey(e)===false){return;}}if(this._opened&&e.charOrCode==dk.ESCAPE&&!(e.shiftKey||e.ctrlKey||e.altKey||e.metaKey)){this._close();dojo.stopEvent(e);}else{if(!this._opened&&e.charOrCode==dk.DOWN_ARROW){this._open();dojo.stopEvent(e);}else{if(e.charOrCode===dk.TAB){this._tabbingAway=true;}else{if(this._opened&&(e.keyChar||e.charOrCode===dk.BACKSPACE||e.charOrCode==dk.DELETE)){setTimeout(dojo.hitch(this,function(){dijit.placeOnScreenAroundElement(p.domNode.parentNode,this.domNode,{"BL":"TL","TL":"BL"},p.orient?dojo.hitch(p,"orient"):null);}),1);}}}}}});}if(!dojo._hasResource["dijit.form.DateTextBox"]){dojo._hasResource["dijit.form.DateTextBox"]=true;dojo.provide("dijit.form.DateTextBox");dojo.declare("dijit.form.DateTextBox",dijit.form._DateTimeTextBox,{baseClass:"dijitTextBox dijitDateTextBox",popupClass:"dijit.Calendar",_selector:"date",value:new Date("")});}if(!dojo._hasResource["dijit.form._Spinner"]){dojo._hasResource["dijit.form._Spinner"]=true;dojo.provide("dijit.form._Spinner");dojo.declare("dijit.form._Spinner",dijit.form.RangeBoundTextBox,{defaultTimeout:500,timeoutChangeRate:0.9,smallDelta:1,largeDelta:10,templateString:dojo.cache("dijit.form","templates/Spinner.html","<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\n\tid=\"widget_${id}\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\" waiRole=\"presentation\"\n\t><div class=\"dijitInputLayoutContainer\"\n\t\t><div class=\"dijitReset dijitSpinnerButtonContainer\"\n\t\t\t>&nbsp;<div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitUpArrowButton\"\n\t\t\t\tdojoAttachPoint=\"upArrowNode\"\n\t\t\t\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse\"\n\t\t\t\tstateModifier=\"UpArrow\"\n\t\t\t\t><div class=\"dijitArrowButtonInner\">&thinsp;</div\n\t\t\t\t><div class=\"dijitArrowButtonChar\">&#9650;</div\n\t\t\t></div\n\t\t\t><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitDownArrowButton\"\n\t\t\t\tdojoAttachPoint=\"downArrowNode\"\n\t\t\t\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse\"\n\t\t\t\tstateModifier=\"DownArrow\"\n\t\t\t\t><div class=\"dijitArrowButtonInner\">&thinsp;</div\n\t\t\t\t><div class=\"dijitArrowButtonChar\">&#9660;</div\n\t\t\t></div\n\t\t></div\n\t\t><div class=\"dijitReset dijitValidationIcon\"><br></div\n\t\t><div class=\"dijitReset dijitValidationIconText\">&Chi;</div\n\t\t><div class=\"dijitReset dijitInputField\"\n\t\t\t><input class='dijitReset' dojoAttachPoint=\"textbox,focusNode\" type=\"${type}\" dojoAttachEvent=\"onkeypress:_onKeyPress\"\n\t\t\t\twaiRole=\"spinbutton\" autocomplete=\"off\" ${nameAttrSetting}\n\t\t/></div\n\t></div\n></div>\n"),baseClass:"dijitSpinner",adjust:function(val,_447){return val;},_arrowState:function(node,_448){this._active=_448;this.stateModifier=node.getAttribute("stateModifier")||"";this._setStateClass();},_arrowPressed:function(_449,_44a,_44b){if(this.disabled||this.readOnly){return;}this._arrowState(_449,true);this._setValueAttr(this.adjust(this.attr("value"),_44a*_44b),false);dijit.selectInputText(this.textbox,this.textbox.value.length);},_arrowReleased:function(node){this._wheelTimer=null;if(this.disabled||this.readOnly){return;}this._arrowState(node,false);},_typematicCallback:function(_44c,node,evt){var inc=this.smallDelta;if(node==this.textbox){var k=dojo.keys;var key=evt.charOrCode;inc=(key==k.PAGE_UP||key==k.PAGE_DOWN)?this.largeDelta:this.smallDelta;node=(key==k.UP_ARROW||key==k.PAGE_UP)?this.upArrowNode:this.downArrowNode;}if(_44c==-1){this._arrowReleased(node);}else{this._arrowPressed(node,(node==this.upArrowNode)?1:-1,inc);}},_wheelTimer:null,_mouseWheeled:function(evt){dojo.stopEvent(evt);var _44d=evt.detail?(evt.detail*-1):(evt.wheelDelta/120);if(_44d!==0){var node=this[(_44d>0?"upArrowNode":"downArrowNode")];this._arrowPressed(node,_44d,this.smallDelta);if(!this._wheelTimer){clearTimeout(this._wheelTimer);}this._wheelTimer=setTimeout(dojo.hitch(this,"_arrowReleased",node),50);}},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,!dojo.isMozilla?"onmousewheel":"DOMMouseScroll","_mouseWheeled");this._connects.push(dijit.typematic.addListener(this.upArrowNode,this.textbox,{charOrCode:dojo.keys.UP_ARROW,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout));this._connects.push(dijit.typematic.addListener(this.downArrowNode,this.textbox,{charOrCode:dojo.keys.DOWN_ARROW,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout));this._connects.push(dijit.typematic.addListener(this.upArrowNode,this.textbox,{charOrCode:dojo.keys.PAGE_UP,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout));this._connects.push(dijit.typematic.addListener(this.downArrowNode,this.textbox,{charOrCode:dojo.keys.PAGE_DOWN,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout));if(dojo.isIE){var _44e=this;(function resize(){var sz=_44e.upArrowNode.parentNode.offsetHeight;if(sz){_44e.upArrowNode.style.height=sz>>1;_44e.downArrowNode.style.height=sz-(sz>>1);_44e.focusNode.parentNode.style.height=sz;}})();this.connect(this.domNode,"onresize",function(){setTimeout(function(){resize();_44e._setStateClass();},0);});this._layoutHackIE7();}}});}if(!dojo._hasResource["dijit.form.NumberSpinner"]){dojo._hasResource["dijit.form.NumberSpinner"]=true;dojo.provide("dijit.form.NumberSpinner");dojo.declare("dijit.form.NumberSpinner",[dijit.form._Spinner,dijit.form.NumberTextBoxMixin],{adjust:function(val,_44f){var tc=this.constraints,v=isNaN(val),_450=!isNaN(tc.max),_451=!isNaN(tc.min);if(v&&_44f!=0){val=(_44f>0)?_451?tc.min:_450?tc.max:0:_450?this.constraints.max:_451?tc.min:0;}var _452=val+_44f;if(v||isNaN(_452)){return val;}if(_450&&(_452>tc.max)){_452=tc.max;}if(_451&&(_452<tc.min)){_452=tc.min;}return _452;},_onKeyPress:function(e){if((e.charOrCode==dojo.keys.HOME||e.charOrCode==dojo.keys.END)&&!(e.ctrlKey||e.altKey||e.metaKey)&&typeof this.attr("value")!="undefined"){var _453=this.constraints[(e.charOrCode==dojo.keys.HOME?"min":"max")];if(_453){this._setValueAttr(_453,true);}dojo.stopEvent(e);}}});}if(!dojo._hasResource["dojo.data.util.sorter"]){dojo._hasResource["dojo.data.util.sorter"]=true;dojo.provide("dojo.data.util.sorter");dojo.data.util.sorter.basicComparator=function(a,b){var r=-1;if(a===null){a=undefined;}if(b===null){b=undefined;}if(a==b){r=0;}else{if(a>b||a==null){r=1;}}return r;};dojo.data.util.sorter.createSortFunction=function(_454,_455){var _456=[];function _457(attr,dir,comp,s){return function(_458,_459){var a=s.getValue(_458,attr);var b=s.getValue(_459,attr);return dir*comp(a,b);};};var _45a;var map=_455.comparatorMap;var bc=dojo.data.util.sorter.basicComparator;for(var i=0;i<_454.length;i++){_45a=_454[i];var attr=_45a.attribute;if(attr){var dir=(_45a.descending)?-1:1;var comp=bc;if(map){if(typeof attr!=="string"&&("toString" in attr)){attr=attr.toString();}comp=map[attr]||bc;}_456.push(_457(attr,dir,comp,_455));}}return function(rowA,rowB){var i=0;while(i<_456.length){var ret=_456[i++](rowA,rowB);if(ret!==0){return ret;}}return 0;};};}if(!dojo._hasResource["dojo.data.util.simpleFetch"]){dojo._hasResource["dojo.data.util.simpleFetch"]=true;dojo.provide("dojo.data.util.simpleFetch");dojo.data.util.simpleFetch.fetch=function(_45b){_45b=_45b||{};if(!_45b.store){_45b.store=this;}var self=this;var _45c=function(_45d,_45e){if(_45e.onError){var _45f=_45e.scope||dojo.global;_45e.onError.call(_45f,_45d,_45e);}};var _460=function(_461,_462){var _463=_462.abort||null;var _464=false;var _465=_462.start?_462.start:0;var _466=(_462.count&&(_462.count!==Infinity))?(_465+_462.count):_461.length;_462.abort=function(){_464=true;if(_463){_463.call(_462);}};var _467=_462.scope||dojo.global;if(!_462.store){_462.store=self;}if(_462.onBegin){_462.onBegin.call(_467,_461.length,_462);}if(_462.sort){_461.sort(dojo.data.util.sorter.createSortFunction(_462.sort,self));}if(_462.onItem){for(var i=_465;(i<_461.length)&&(i<_466);++i){var item=_461[i];if(!_464){_462.onItem.call(_467,item,_462);}}}if(_462.onComplete&&!_464){var _468=null;if(!_462.onItem){_468=_461.slice(_465,_466);}_462.onComplete.call(_467,_468,_462);}};this._fetchItems(_45b,_460,_45c);return _45b;};}if(!dojo._hasResource["dojo.data.util.filter"]){dojo._hasResource["dojo.data.util.filter"]=true;dojo.provide("dojo.data.util.filter");dojo.data.util.filter.patternToRegExp=function(_469,_46a){var rxp="^";var c=null;for(var i=0;i<_469.length;i++){c=_469.charAt(i);switch(c){case "\\":rxp+=c;i++;rxp+=_469.charAt(i);break;case "*":rxp+=".*";break;case "?":rxp+=".";break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":rxp+="\\";default:rxp+=c;}}rxp+="$";if(_46a){return new RegExp(rxp,"mi");}else{return new RegExp(rxp,"m");}};}if(!dojo._hasResource["dijit.form.ComboBox"]){dojo._hasResource["dijit.form.ComboBox"]=true;dojo.provide("dijit.form.ComboBox");dojo.declare("dijit.form.ComboBoxMixin",null,{item:null,pageSize:Infinity,store:null,fetchProperties:{},query:{},autoComplete:true,highlightMatch:"first",searchDelay:100,searchAttr:"name",labelAttr:"",labelType:"text",queryExpr:"${0}*",ignoreCase:true,hasDownArrow:true,templateString:dojo.cache("dijit.form","templates/ComboBox.html","<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\n\tid=\"widget_${id}\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\" dojoAttachPoint=\"comboNode\" waiRole=\"combobox\" tabIndex=\"-1\"\n\t><div style=\"overflow:hidden;\"\n\t\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton'\n\t\t\tdojoAttachPoint=\"downArrowNode\" waiRole=\"presentation\"\n\t\t\tdojoAttachEvent=\"onmousedown:_onArrowMouseDown,onmouseup:_onMouse,onmouseenter:_onMouse,onmouseleave:_onMouse\"\n\t\t\t><div class=\"dijitArrowButtonInner\">&thinsp;</div\n\t\t\t><div class=\"dijitArrowButtonChar\">&#9660;</div\n\t\t></div\n\t\t><div class=\"dijitReset dijitValidationIcon\"><br></div\n\t\t><div class=\"dijitReset dijitValidationIconText\">&Chi;</div\n\t\t><div class=\"dijitReset dijitInputField\"\n\t\t\t><input ${nameAttrSetting} type=\"text\" autocomplete=\"off\" class='dijitReset'\n\t\t\tdojoAttachEvent=\"onkeypress:_onKeyPress,compositionend\"\n\t\t\tdojoAttachPoint=\"textbox,focusNode\" waiRole=\"textbox\" waiState=\"haspopup-true,autocomplete-list\"\n\t\t/></div\n\t></div\n></div>\n"),baseClass:"dijitComboBox",_getCaretPos:function(_46b){var pos=0;if(typeof (_46b.selectionStart)=="number"){pos=_46b.selectionStart;}else{if(dojo.isIE){var tr=dojo.doc.selection.createRange().duplicate();var ntr=_46b.createTextRange();tr.move("character",0);ntr.move("character",0);try{ntr.setEndPoint("EndToEnd",tr);pos=String(ntr.text).replace(/\r/g,"").length;}catch(e){}}}return pos;},_setCaretPos:function(_46c,_46d){_46d=parseInt(_46d);dijit.selectInputText(_46c,_46d,_46d);},_setDisabledAttr:function(_46e){this.inherited(arguments);dijit.setWaiState(this.comboNode,"disabled",_46e);},_abortQuery:function(){if(this.searchTimer){clearTimeout(this.searchTimer);this.searchTimer=null;}if(this._fetchHandle){if(this._fetchHandle.abort){this._fetchHandle.abort();}this._fetchHandle=null;}},_onKeyPress:function(evt){var key=evt.charOrCode;if(evt.altKey||((evt.ctrlKey||evt.metaKey)&&(key!="x"&&key!="v"))||key==dojo.keys.SHIFT){return;}var _46f=false;var _470="_startSearchFromInput";var pw=this._popupWidget;var dk=dojo.keys;var _471=null;this._prev_key_backspace=false;this._abortQuery();if(this._isShowingNow){pw.handleKey(key);_471=pw.getHighlightedOption();}switch(key){case dk.PAGE_DOWN:case dk.DOWN_ARROW:case dk.PAGE_UP:case dk.UP_ARROW:if(!this._isShowingNow){this._arrowPressed();_46f=true;_470="_startSearchAll";}else{this._announceOption(_471);}dojo.stopEvent(evt);break;case dk.ENTER:if(_471){if(_471==pw.nextButton){this._nextSearch(1);dojo.stopEvent(evt);break;}else{if(_471==pw.previousButton){this._nextSearch(-1);dojo.stopEvent(evt);break;}}}else{this._setBlurValue();this._setCaretPos(this.focusNode,this.focusNode.value.length);}evt.preventDefault();case dk.TAB:var _472=this.attr("displayedValue");if(pw&&(_472==pw._messages["previousMessage"]||_472==pw._messages["nextMessage"])){break;}if(_471){this._selectOption();}if(this._isShowingNow){this._lastQuery=null;this._hideResultList();}break;case " ":if(_471){dojo.stopEvent(evt);this._selectOption();this._hideResultList();}else{_46f=true;}break;case dk.ESCAPE:if(this._isShowingNow){dojo.stopEvent(evt);this._hideResultList();}break;case dk.DELETE:case dk.BACKSPACE:this._prev_key_backspace=true;_46f=true;break;default:_46f=typeof key=="string"||key==229;}if(_46f){this.item=undefined;this.searchTimer=setTimeout(dojo.hitch(this,_470),1);}},_autoCompleteText:function(text){var fn=this.focusNode;dijit.selectInputText(fn,fn.value.length);var _473=this.ignoreCase?"toLowerCase":"substr";if(text[_473](0).indexOf(this.focusNode.value[_473](0))==0){var cpos=this._getCaretPos(fn);if((cpos+1)>fn.value.length){fn.value=text;dijit.selectInputText(fn,cpos);}}else{fn.value=text;dijit.selectInputText(fn);}},_openResultList:function(_474,_475){this._fetchHandle=null;if(this.disabled||this.readOnly||(_475.query[this.searchAttr]!=this._lastQuery)){return;}this._popupWidget.clearResultList();if(!_474.length){this._hideResultList();return;}_475._maxOptions=this._maxOptions;var _476=this._popupWidget.createOptions(_474,_475,dojo.hitch(this,"_getMenuLabelFromItem"));this._showResultList();if(_475.direction){if(1==_475.direction){this._popupWidget.highlightFirstOption();}else{if(-1==_475.direction){this._popupWidget.highlightLastOption();}}this._announceOption(this._popupWidget.getHighlightedOption());}else{if(this.autoComplete&&!this._prev_key_backspace&&!/^[*]+$/.test(_475.query[this.searchAttr])){this._announceOption(_476[1]);}}},_showResultList:function(){this._hideResultList();this._arrowPressed();this.displayMessage("");dojo.style(this._popupWidget.domNode,{width:"",height:""});var best=this.open();var _477=dojo.marginBox(this._popupWidget.domNode);this._popupWidget.domNode.style.overflow=((best.h==_477.h)&&(best.w==_477.w))?"hidden":"auto";var _478=best.w;if(best.h<this._popupWidget.domNode.scrollHeight){_478+=16;}dojo.marginBox(this._popupWidget.domNode,{h:best.h,w:Math.max(_478,this.domNode.offsetWidth)});if(_478<this.domNode.offsetWidth){this._popupWidget.domNode.parentNode.style.left=dojo.position(this.domNode).x+"px";}dijit.setWaiState(this.comboNode,"expanded","true");},_hideResultList:function(){this._abortQuery();if(this._isShowingNow){dijit.popup.close(this._popupWidget);this._arrowIdle();this._isShowingNow=false;dijit.setWaiState(this.comboNode,"expanded","false");dijit.removeWaiState(this.focusNode,"activedescendant");}},_setBlurValue:function(){var _479=this.attr("displayedValue");var pw=this._popupWidget;if(pw&&(_479==pw._messages["previousMessage"]||_479==pw._messages["nextMessage"])){this._setValueAttr(this._lastValueReported,true);}else{if(typeof this.item=="undefined"){this.item=null;this.attr("displayedValue",_479);}else{if(this.value!=this._lastValueReported){dijit.form._FormValueWidget.prototype._setValueAttr.call(this,this.value,true);}this._refreshState();}}},_onBlur:function(){this._hideResultList();this._arrowIdle();this.inherited(arguments);},_setItemAttr:function(item,_47a,_47b){if(!_47b){_47b=this.labelFunc(item,this.store);}this.value=this._getValueField()!=this.searchAttr?this.store.getIdentity(item):_47b;this.item=item;dijit.form.ComboBox.superclass._setValueAttr.call(this,this.value,_47a,_47b);},_announceOption:function(node){if(!node){return;}var _47c;if(node==this._popupWidget.nextButton||node==this._popupWidget.previousButton){_47c=node.innerHTML;this.item=undefined;this.value="";}else{_47c=this.labelFunc(node.item,this.store);this.attr("item",node.item,false,_47c);}this.focusNode.value=this.focusNode.value.substring(0,this._lastInput.length);dijit.setWaiState(this.focusNode,"activedescendant",dojo.attr(node,"id"));this._autoCompleteText(_47c);},_selectOption:function(evt){if(evt){this._announceOption(evt.target);}this._hideResultList();this._setCaretPos(this.focusNode,this.focusNode.value.length);dijit.form._FormValueWidget.prototype._setValueAttr.call(this,this.value,true);},_onArrowMouseDown:function(evt){if(this.disabled||this.readOnly){return;}dojo.stopEvent(evt);this.focus();if(this._isShowingNow){this._hideResultList();}else{this._startSearchAll();}},_startSearchAll:function(){this._startSearch("");},_startSearchFromInput:function(){this._startSearch(this.focusNode.value.replace(/([\\\*\?])/g,"\\$1"));},_getQueryString:function(text){return dojo.string.substitute(this.queryExpr,[text]);},_startSearch:function(key){if(!this._popupWidget){var _47d=this.id+"_popup";this._popupWidget=new dijit.form._ComboBoxMenu({onChange:dojo.hitch(this,this._selectOption),id:_47d});dijit.removeWaiState(this.focusNode,"activedescendant");dijit.setWaiState(this.textbox,"owns",_47d);}var _47e=dojo.clone(this.query);this._lastInput=key;this._lastQuery=_47e[this.searchAttr]=this._getQueryString(key);this.searchTimer=setTimeout(dojo.hitch(this,function(_47f,_480){this.searchTimer=null;var _481={queryOptions:{ignoreCase:this.ignoreCase,deep:true},query:_47f,onBegin:dojo.hitch(this,"_setMaxOptions"),onComplete:dojo.hitch(this,"_openResultList"),onError:function(_482){_480._fetchHandle=null;console.error("dijit.form.ComboBox: "+_482);dojo.hitch(_480,"_hideResultList")();},start:0,count:this.pageSize};dojo.mixin(_481,_480.fetchProperties);this._fetchHandle=_480.store.fetch(_481);var _483=function(_484,_485){_484.start+=_484.count*_485;_484.direction=_485;this._fetchHandle=this.store.fetch(_484);};this._nextSearch=this._popupWidget.onPage=dojo.hitch(this,_483,this._fetchHandle);},_47e,this),this.searchDelay);},_setMaxOptions:function(size,_486){this._maxOptions=size;},_getValueField:function(){return this.searchAttr;},_arrowPressed:function(){if(!this.disabled&&!this.readOnly&&this.hasDownArrow){dojo.addClass(this.downArrowNode,"dijitArrowButtonActive");}},_arrowIdle:function(){if(!this.disabled&&!this.readOnly&&this.hasDownArrow){dojo.removeClass(this.downArrowNode,"dojoArrowButtonPushed");}},compositionend:function(evt){this._onKeyPress({charOrCode:229});},constructor:function(){this.query={};this.fetchProperties={};},postMixInProperties:function(){if(!this.hasDownArrow){this.baseClass="dijitTextBox";}if(!this.store){var _487=this.srcNodeRef;this.store=new dijit.form._ComboBoxDataStore(_487);if(!this.value||((typeof _487.selectedIndex=="number")&&_487.selectedIndex.toString()===this.value)){var item=this.store.fetchSelectedItem();if(item){var _488=this._getValueField();this.value=_488!=this.searchAttr?this.store.getValue(item,_488):this.labelFunc(item,this.store);}}}this.inherited(arguments);},postCreate:function(){var _489=dojo.query("label[for=\""+this.id+"\"]");if(_489.length){_489[0].id=(this.id+"_label");var cn=this.comboNode;dijit.setWaiState(cn,"labelledby",_489[0].id);}this.inherited(arguments);},uninitialize:function(){if(this._popupWidget&&!this._popupWidget._destroyed){this._hideResultList();this._popupWidget.destroy();}this.inherited(arguments);},_getMenuLabelFromItem:function(item){var _48a=this.labelAttr?this.store.getValue(item,this.labelAttr):this.labelFunc(item,this.store);var _48b=this.labelType;if(this.highlightMatch!="none"&&this.labelType=="text"&&this._lastInput){_48a=this.doHighlight(_48a,this._escapeHtml(this._lastInput));_48b="html";}return {html:_48b=="html",label:_48a};},doHighlight:function(_48c,find){var _48d="i"+(this.highlightMatch=="all"?"g":"");var _48e=this._escapeHtml(_48c);find=dojo.regexp.escapeString(find);var ret=_48e.replace(new RegExp("(^|\\s)("+find+")",_48d),"$1<span class=\"dijitComboBoxHighlightMatch\">$2</span>");return ret;},_escapeHtml:function(str){str=String(str).replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");return str;},open:function(){this._isShowingNow=true;return dijit.popup.open({popup:this._popupWidget,around:this.domNode,parent:this});},reset:function(){this.item=null;this.inherited(arguments);},labelFunc:function(item,_48f){return _48f.getValue(item,this.searchAttr).toString();}});dojo.declare("dijit.form._ComboBoxMenu",[dijit._Widget,dijit._Templated],{templateString:"<ul class='dijitReset dijitMenu' dojoAttachEvent='onmousedown:_onMouseDown,onmouseup:_onMouseUp,onmouseover:_onMouseOver,onmouseout:_onMouseOut' tabIndex='-1' style='overflow: \"auto\"; overflow-x: \"hidden\";'>"+"<li class='dijitMenuItem dijitMenuPreviousButton' dojoAttachPoint='previousButton' waiRole='option'></li>"+"<li class='dijitMenuItem dijitMenuNextButton' dojoAttachPoint='nextButton' waiRole='option'></li>"+"</ul>",_messages:null,postMixInProperties:function(){this._messages=dojo.i18n.getLocalization("dijit.form","ComboBox",this.lang);this.inherited(arguments);},_setValueAttr:function(_490){this.value=_490;this.onChange(_490);},onChange:function(_491){},onPage:function(_492){},postCreate:function(){this.previousButton.innerHTML=this._messages["previousMessage"];this.nextButton.innerHTML=this._messages["nextMessage"];this.inherited(arguments);},onClose:function(){this._blurOptionNode();},_createOption:function(item,_493){var _494=_493(item);var _495=dojo.doc.createElement("li");dijit.setWaiRole(_495,"option");if(_494.html){_495.innerHTML=_494.label;}else{_495.appendChild(dojo.doc.createTextNode(_494.label));}if(_495.innerHTML==""){_495.innerHTML="&nbsp;";}_495.item=item;return _495;},createOptions:function(_496,_497,_498){this.previousButton.style.display=(_497.start==0)?"none":"";dojo.attr(this.previousButton,"id",this.id+"_prev");dojo.forEach(_496,function(item,i){var _499=this._createOption(item,_498);_499.className="dijitReset dijitMenuItem";dojo.attr(_499,"id",this.id+i);this.domNode.insertBefore(_499,this.nextButton);},this);var _49a=false;if(_497._maxOptions&&_497._maxOptions!=-1){if((_497.start+_497.count)<_497._maxOptions){_49a=true;}else{if((_497.start+_497.count)>(_497._maxOptions-1)){if(_497.count==_496.length){_49a=true;}}}}else{if(_497.count==_496.length){_49a=true;}}this.nextButton.style.display=_49a?"":"none";dojo.attr(this.nextButton,"id",this.id+"_next");return this.domNode.childNodes;},clearResultList:function(){while(this.domNode.childNodes.length>2){this.domNode.removeChild(this.domNode.childNodes[this.domNode.childNodes.length-2]);}},_onMouseDown:function(evt){dojo.stopEvent(evt);},_onMouseUp:function(evt){if(evt.target===this.domNode){return;}else{if(evt.target==this.previousButton){this.onPage(-1);}else{if(evt.target==this.nextButton){this.onPage(1);}else{var tgt=evt.target;while(!tgt.item){tgt=tgt.parentNode;}this._setValueAttr({target:tgt},true);}}}},_onMouseOver:function(evt){if(evt.target===this.domNode){return;}var tgt=evt.target;if(!(tgt==this.previousButton||tgt==this.nextButton)){while(!tgt.item){tgt=tgt.parentNode;}}this._focusOptionNode(tgt);},_onMouseOut:function(evt){if(evt.target===this.domNode){return;}this._blurOptionNode();},_focusOptionNode:function(node){if(this._highlighted_option!=node){this._blurOptionNode();this._highlighted_option=node;dojo.addClass(this._highlighted_option,"dijitMenuItemSelected");}},_blurOptionNode:function(){if(this._highlighted_option){dojo.removeClass(this._highlighted_option,"dijitMenuItemSelected");this._highlighted_option=null;}},_highlightNextOption:function(){var fc=this.domNode.firstChild;if(!this.getHighlightedOption()){this._focusOptionNode(fc.style.display=="none"?fc.nextSibling:fc);}else{var ns=this._highlighted_option.nextSibling;if(ns&&ns.style.display!="none"){this._focusOptionNode(ns);}}dijit.scrollIntoView(this._highlighted_option);},highlightFirstOption:function(){this._focusOptionNode(this.domNode.firstChild.nextSibling);dijit.scrollIntoView(this._highlighted_option);},highlightLastOption:function(){this._focusOptionNode(this.domNode.lastChild.previousSibling);dijit.scrollIntoView(this._highlighted_option);},_highlightPrevOption:function(){var lc=this.domNode.lastChild;if(!this.getHighlightedOption()){this._focusOptionNode(lc.style.display=="none"?lc.previousSibling:lc);}else{var ps=this._highlighted_option.previousSibling;if(ps&&ps.style.display!="none"){this._focusOptionNode(ps);}}dijit.scrollIntoView(this._highlighted_option);},_page:function(up){var _49b=0;var _49c=this.domNode.scrollTop;var _49d=dojo.style(this.domNode,"height");if(!this.getHighlightedOption()){this._highlightNextOption();}while(_49b<_49d){if(up){if(!this.getHighlightedOption().previousSibling||this._highlighted_option.previousSibling.style.display=="none"){break;}this._highlightPrevOption();}else{if(!this.getHighlightedOption().nextSibling||this._highlighted_option.nextSibling.style.display=="none"){break;}this._highlightNextOption();}var _49e=this.domNode.scrollTop;_49b+=(_49e-_49c)*(up?-1:1);_49c=_49e;}},pageUp:function(){this._page(true);},pageDown:function(){this._page(false);},getHighlightedOption:function(){var ho=this._highlighted_option;return (ho&&ho.parentNode)?ho:null;},handleKey:function(key){switch(key){case dojo.keys.DOWN_ARROW:this._highlightNextOption();break;case dojo.keys.PAGE_DOWN:this.pageDown();break;case dojo.keys.UP_ARROW:this._highlightPrevOption();break;case dojo.keys.PAGE_UP:this.pageUp();break;}}});dojo.declare("dijit.form.ComboBox",[dijit.form.ValidationTextBox,dijit.form.ComboBoxMixin],{_setValueAttr:function(_49f,_4a0,_4a1){this.item=null;if(!_49f){_49f="";}dijit.form.ValidationTextBox.prototype._setValueAttr.call(this,_49f,_4a0,_4a1);}});dojo.declare("dijit.form._ComboBoxDataStore",null,{constructor:function(root){this.root=root;dojo.query("> option",root).forEach(function(node){node.innerHTML=dojo.trim(node.innerHTML);});},getValue:function(item,_4a2,_4a3){return (_4a2=="value")?item.value:(item.innerText||item.textContent||"");},isItemLoaded:function(_4a4){return true;},getFeatures:function(){return {"dojo.data.api.Read":true,"dojo.data.api.Identity":true};},_fetchItems:function(args,_4a5,_4a6){if(!args.query){args.query={};}if(!args.query.name){args.query.name="";}if(!args.queryOptions){args.queryOptions={};}var _4a7=dojo.data.util.filter.patternToRegExp(args.query.name,args.queryOptions.ignoreCase),_4a8=dojo.query("> option",this.root).filter(function(_4a9){return (_4a9.innerText||_4a9.textContent||"").match(_4a7);});if(args.sort){_4a8.sort(dojo.data.util.sorter.createSortFunction(args.sort,this));}_4a5(_4a8,args);},close:function(_4aa){return;},getLabel:function(item){return item.innerHTML;},getIdentity:function(item){return dojo.attr(item,"value");},fetchItemByIdentity:function(args){var item=dojo.query("option[value='"+args.identity+"']",this.root)[0];args.onItem(item);},fetchSelectedItem:function(){var root=this.root,si=root.selectedIndex;return dojo.query("> option:nth-child("+(si!=-1?si+1:1)+")",root)[0];}});dojo.extend(dijit.form._ComboBoxDataStore,dojo.data.util.simpleFetch);}if(!dojo._hasResource["dijit.form.FilteringSelect"]){dojo._hasResource["dijit.form.FilteringSelect"]=true;dojo.provide("dijit.form.FilteringSelect");dojo.declare("dijit.form.FilteringSelect",[dijit.form.MappedTextBox,dijit.form.ComboBoxMixin],{_isvalid:true,required:true,_lastDisplayedValue:"",isValid:function(){return this._isvalid||(!this.required&&this.attr("displayedValue")=="");},_callbackSetLabel:function(_4ab,_4ac,_4ad){if((_4ac&&_4ac.query[this.searchAttr]!=this._lastQuery)||(!_4ac&&_4ab.length&&this.store.getIdentity(_4ab[0])!=this._lastQuery)){return;}if(!_4ab.length){this.valueNode.value="";dijit.form.TextBox.superclass._setValueAttr.call(this,"",_4ad||(_4ad===undefined&&!this._focused));this._isvalid=false;this.validate(this._focused);this.item=null;}else{this.attr("item",_4ab[0],_4ad);}},_openResultList:function(_4ae,_4af){if(_4af.query[this.searchAttr]!=this._lastQuery){return;}this._isvalid=_4ae.length!=0;this.validate(true);dijit.form.ComboBoxMixin.prototype._openResultList.apply(this,arguments);},_getValueAttr:function(){return this.valueNode.value;},_getValueField:function(){return "value";},_setValueAttr:function(_4b0,_4b1){if(!this._onChangeActive){_4b1=null;}this._lastQuery=_4b0;if(_4b0===null||_4b0===""){this._setDisplayedValueAttr("",_4b1);return;}var self=this;this.store.fetchItemByIdentity({identity:_4b0,onItem:function(item){self._callbackSetLabel([item],undefined,_4b1);}});},_setItemAttr:function(item,_4b2,_4b3){this._isvalid=true;this.inherited(arguments);this.valueNode.value=this.value;this._lastDisplayedValue=this.textbox.value;},_getDisplayQueryString:function(text){return text.replace(/([\\\*\?])/g,"\\$1");},_setDisplayedValueAttr:function(_4b4,_4b5){if(!this._created){_4b5=false;}if(this.store){this._hideResultList();var _4b6=dojo.clone(this.query);this._lastQuery=_4b6[this.searchAttr]=this._getDisplayQueryString(_4b4);this.textbox.value=_4b4;this._lastDisplayedValue=_4b4;var _4b7=this;var _4b8={query:_4b6,queryOptions:{ignoreCase:this.ignoreCase,deep:true},onComplete:function(_4b9,_4ba){_4b7._fetchHandle=null;dojo.hitch(_4b7,"_callbackSetLabel")(_4b9,_4ba,_4b5);},onError:function(_4bb){_4b7._fetchHandle=null;console.error("dijit.form.FilteringSelect: "+_4bb);dojo.hitch(_4b7,"_callbackSetLabel")([],undefined,false);}};dojo.mixin(_4b8,this.fetchProperties);this._fetchHandle=this.store.fetch(_4b8);}},postMixInProperties:function(){this.inherited(arguments);this._isvalid=!this.required;},undo:function(){this.attr("displayedValue",this._lastDisplayedValue);}});}if(!dojo._hasResource["dijit.form.MultiSelect"]){dojo._hasResource["dijit.form.MultiSelect"]=true;dojo.provide("dijit.form.MultiSelect");dojo.declare("dijit.form.MultiSelect",dijit.form._FormValueWidget,{size:7,templateString:"<select multiple='true' ${nameAttrSetting} dojoAttachPoint='containerNode,focusNode' dojoAttachEvent='onchange: _onChange'></select>",attributeMap:dojo.delegate(dijit.form._FormWidget.prototype.attributeMap,{size:"focusNode"}),reset:function(){this._hasBeenBlurred=false;this._setValueAttr(this._resetValue,true);},addSelected:function(_4bc){_4bc.getSelected().forEach(function(n){this.containerNode.appendChild(n);this.domNode.scrollTop=this.domNode.offsetHeight;var _4bd=_4bc.domNode.scrollTop;_4bc.domNode.scrollTop=0;_4bc.domNode.scrollTop=_4bd;},this);},getSelected:function(){return dojo.query("option",this.containerNode).filter(function(n){return n.selected;});},_getValueAttr:function(){return this.getSelected().map(function(n){return n.value;});},multiple:true,_setValueAttr:function(_4be){dojo.query("option",this.containerNode).forEach(function(n){n.selected=(dojo.indexOf(_4be,n.value)!=-1);});},invertSelection:function(_4bf){dojo.query("option",this.containerNode).forEach(function(n){n.selected=!n.selected;});this._handleOnChange(this.attr("value"),_4bf==true);},_onChange:function(e){this._handleOnChange(this.attr("value"),true);},resize:function(size){if(size){dojo.marginBox(this.domNode,size);}},postCreate:function(){this._onChange();}});}if(!dojo._hasResource["dijit.form.HorizontalSlider"]){dojo._hasResource["dijit.form.HorizontalSlider"]=true;dojo.provide("dijit.form.HorizontalSlider");dojo.declare("dijit.form.HorizontalSlider",[dijit.form._FormValueWidget,dijit._Container],{templateString:dojo.cache("dijit.form","templates/HorizontalSlider.html","<table class=\"dijit dijitReset dijitSlider\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\" dojoAttachEvent=\"onkeypress:_onKeyPress,onkeyup:_onKeyUp\"\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t\t><td dojoAttachPoint=\"topDecoration\" class=\"dijitReset\" style=\"text-align:center;width:100%;\"></td\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH\"\n\t\t\t><div class=\"dijitSliderDecrementIconH\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"decrementButton\"><span class=\"dijitSliderButtonInner\">-</span></div\n\t\t></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderLeftBumper dijitSliderLeftBumper\" dojoAttachEvent=\"onmousedown:_onClkDecBumper\"></div\n\t\t></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><input dojoAttachPoint=\"valueNode\" type=\"hidden\" ${nameAttrSetting}\n\t\t\t/><div class=\"dijitReset dijitSliderBarContainerH\" waiRole=\"presentation\" dojoAttachPoint=\"sliderBarContainer\"\n\t\t\t\t><div waiRole=\"presentation\" dojoAttachPoint=\"progressBar\" class=\"dijitSliderBar dijitSliderBarH dijitSliderProgressBar dijitSliderProgressBarH\" dojoAttachEvent=\"onmousedown:_onBarClick\"\n\t\t\t\t\t><div class=\"dijitSliderMoveable dijitSliderMoveableH\"\n\t\t\t\t\t\t><div dojoAttachPoint=\"sliderHandle,focusNode\" class=\"dijitSliderImageHandle dijitSliderImageHandleH\" dojoAttachEvent=\"onmousedown:_onHandleClick\" waiRole=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"></div\n\t\t\t\t\t></div\n\t\t\t\t></div\n\t\t\t\t><div waiRole=\"presentation\" dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitSliderBarH dijitSliderRemainingBar dijitSliderRemainingBarH\" dojoAttachEvent=\"onmousedown:_onBarClick\"></div\n\t\t\t></div\n\t\t></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderRightBumper dijitSliderRightBumper\" dojoAttachEvent=\"onmousedown:_onClkIncBumper\"></div\n\t\t></td\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH\" style=\"right:0px;\"\n\t\t\t><div class=\"dijitSliderIncrementIconH\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"incrementButton\"><span class=\"dijitSliderButtonInner\">+</span></div\n\t\t></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t\t><td dojoAttachPoint=\"containerNode,bottomDecoration\" class=\"dijitReset\" style=\"text-align:center;\"></td\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t></tr\n></table>\n"),value:0,showButtons:true,minimum:0,maximum:100,discreteValues:Infinity,pageIncrement:2,clickSelect:true,slideDuration:dijit.defaultDuration,widgetsInTemplate:true,attributeMap:dojo.delegate(dijit.form._FormWidget.prototype.attributeMap,{id:""}),baseClass:"dijitSlider",_mousePixelCoord:"pageX",_pixelCount:"w",_startingPixelCoord:"x",_startingPixelCount:"l",_handleOffsetCoord:"left",_progressPixelSize:"width",_onKeyUp:function(e){if(this.disabled||this.readOnly||e.altKey||e.ctrlKey||e.metaKey){return;}this._setValueAttr(this.value,true);},_onKeyPress:function(e){if(this.disabled||this.readOnly||e.altKey||e.ctrlKey||e.metaKey){return;}switch(e.charOrCode){case dojo.keys.HOME:this._setValueAttr(this.minimum,false);break;case dojo.keys.END:this._setValueAttr(this.maximum,false);break;case ((this._descending||this.isLeftToRight())?dojo.keys.RIGHT_ARROW:dojo.keys.LEFT_ARROW):case (this._descending===false?dojo.keys.DOWN_ARROW:dojo.keys.UP_ARROW):case (this._descending===false?dojo.keys.PAGE_DOWN:dojo.keys.PAGE_UP):this.increment(e);break;case ((this._descending||this.isLeftToRight())?dojo.keys.LEFT_ARROW:dojo.keys.RIGHT_ARROW):case (this._descending===false?dojo.keys.UP_ARROW:dojo.keys.DOWN_ARROW):case (this._descending===false?dojo.keys.PAGE_UP:dojo.keys.PAGE_DOWN):this.decrement(e);break;default:return;}dojo.stopEvent(e);},_onHandleClick:function(e){if(this.disabled||this.readOnly){return;}if(!dojo.isIE){dijit.focus(this.sliderHandle);}dojo.stopEvent(e);},_isReversed:function(){return !this.isLeftToRight();},_onBarClick:function(e){if(this.disabled||this.readOnly||!this.clickSelect){return;}dijit.focus(this.sliderHandle);dojo.stopEvent(e);var _4c0=dojo.position(this.sliderBarContainer,true);var _4c1=e[this._mousePixelCoord]-_4c0[this._startingPixelCoord];this._setPixelValue(this._isReversed()?(_4c0[this._pixelCount]-_4c1):_4c1,_4c0[this._pixelCount],true);this._movable.onMouseDown(e);},_setPixelValue:function(_4c2,_4c3,_4c4){if(this.disabled||this.readOnly){return;}_4c2=_4c2<0?0:_4c3<_4c2?_4c3:_4c2;var _4c5=this.discreteValues;if(_4c5<=1||_4c5==Infinity){_4c5=_4c3;}_4c5--;var _4c6=_4c3/_4c5;var _4c7=Math.round(_4c2/_4c6);this._setValueAttr((this.maximum-this.minimum)*_4c7/_4c5+this.minimum,_4c4);},_setValueAttr:function(_4c8,_4c9){this.valueNode.value=this.value=_4c8;dijit.setWaiState(this.focusNode,"valuenow",_4c8);this.inherited(arguments);var _4ca=(_4c8-this.minimum)/(this.maximum-this.minimum);var _4cb=(this._descending===false)?this.remainingBar:this.progressBar;var _4cc=(this._descending===false)?this.progressBar:this.remainingBar;if(this._inProgressAnim&&this._inProgressAnim.status!="stopped"){this._inProgressAnim.stop(true);}if(_4c9&&this.slideDuration>0&&_4cb.style[this._progressPixelSize]){var _4cd=this;var _4ce={};var _4cf=parseFloat(_4cb.style[this._progressPixelSize]);var _4d0=this.slideDuration*(_4ca-_4cf/100);if(_4d0==0){return;}if(_4d0<0){_4d0=0-_4d0;}_4ce[this._progressPixelSize]={start:_4cf,end:_4ca*100,units:"%"};this._inProgressAnim=dojo.animateProperty({node:_4cb,duration:_4d0,onAnimate:function(v){_4cc.style[_4cd._progressPixelSize]=(100-parseFloat(v[_4cd._progressPixelSize]))+"%";},onEnd:function(){delete _4cd._inProgressAnim;},properties:_4ce});this._inProgressAnim.play();}else{_4cb.style[this._progressPixelSize]=(_4ca*100)+"%";_4cc.style[this._progressPixelSize]=((1-_4ca)*100)+"%";}},_bumpValue:function(_4d1,_4d2){if(this.disabled||this.readOnly){return;}var s=dojo.getComputedStyle(this.sliderBarContainer);var c=dojo._getContentBox(this.sliderBarContainer,s);var _4d3=this.discreteValues;if(_4d3<=1||_4d3==Infinity){_4d3=c[this._pixelCount];}_4d3--;var _4d4=(this.value-this.minimum)*_4d3/(this.maximum-this.minimum)+_4d1;if(_4d4<0){_4d4=0;}if(_4d4>_4d3){_4d4=_4d3;}_4d4=_4d4*(this.maximum-this.minimum)/_4d3+this.minimum;this._setValueAttr(_4d4,_4d2);},_onClkBumper:function(val){if(this.disabled||this.readOnly||!this.clickSelect){return;}this._setValueAttr(val,true);},_onClkIncBumper:function(){this._onClkBumper(this._descending===false?this.minimum:this.maximum);},_onClkDecBumper:function(){this._onClkBumper(this._descending===false?this.maximum:this.minimum);},decrement:function(e){this._bumpValue(e.charOrCode==dojo.keys.PAGE_DOWN?-this.pageIncrement:-1);},increment:function(e){this._bumpValue(e.charOrCode==dojo.keys.PAGE_UP?this.pageIncrement:1);},_mouseWheeled:function(evt){dojo.stopEvent(evt);var _4d5=!dojo.isMozilla;var _4d6=evt[(_4d5?"wheelDelta":"detail")]*(_4d5?1:-1);this._bumpValue(_4d6<0?-1:1,true);},startup:function(){dojo.forEach(this.getChildren(),function(_4d7){if(this[_4d7.container]!=this.containerNode){this[_4d7.container].appendChild(_4d7.domNode);}},this);},_typematicCallback:function(_4d8,_4d9,e){if(_4d8==-1){this._setValueAttr(this.value,true);}else{this[(_4d9==(this._descending?this.incrementButton:this.decrementButton))?"decrement":"increment"](e);}},postCreate:function(){if(this.showButtons){this.incrementButton.style.display="";this.decrementButton.style.display="";this._connects.push(dijit.typematic.addMouseListener(this.decrementButton,this,"_typematicCallback",25,500));this._connects.push(dijit.typematic.addMouseListener(this.incrementButton,this,"_typematicCallback",25,500));}this.connect(this.domNode,!dojo.isMozilla?"onmousewheel":"DOMMouseScroll","_mouseWheeled");var _4da=dojo.declare(dijit.form._SliderMover,{widget:this});this._movable=new dojo.dnd.Moveable(this.sliderHandle,{mover:_4da});var _4db=dojo.query("label[for=\""+this.id+"\"]");if(_4db.length){_4db[0].id=(this.id+"_label");dijit.setWaiState(this.focusNode,"labelledby",_4db[0].id);}dijit.setWaiState(this.focusNode,"valuemin",this.minimum);dijit.setWaiState(this.focusNode,"valuemax",this.maximum);this.inherited(arguments);this._layoutHackIE7();},destroy:function(){this._movable.destroy();if(this._inProgressAnim&&this._inProgressAnim.status!="stopped"){this._inProgressAnim.stop(true);}this._supportingWidgets=dijit.findWidgets(this.domNode);this.inherited(arguments);}});dojo.declare("dijit.form._SliderMover",dojo.dnd.Mover,{onMouseMove:function(e){var _4dc=this.widget;var _4dd=_4dc._abspos;if(!_4dd){_4dd=_4dc._abspos=dojo.position(_4dc.sliderBarContainer,true);_4dc._setPixelValue_=dojo.hitch(_4dc,"_setPixelValue");_4dc._isReversed_=_4dc._isReversed();}var _4de=e[_4dc._mousePixelCoord]-_4dd[_4dc._startingPixelCoord];_4dc._setPixelValue_(_4dc._isReversed_?(_4dd[_4dc._pixelCount]-_4de):_4de,_4dd[_4dc._pixelCount],false);},destroy:function(e){dojo.dnd.Mover.prototype.destroy.apply(this,arguments);var _4df=this.widget;_4df._abspos=null;_4df._setValueAttr(_4df.value,true);}});}if(!dojo._hasResource["dijit.form.VerticalSlider"]){dojo._hasResource["dijit.form.VerticalSlider"]=true;dojo.provide("dijit.form.VerticalSlider");dojo.declare("dijit.form.VerticalSlider",dijit.form.HorizontalSlider,{templateString:dojo.cache("dijit.form","templates/VerticalSlider.html","<table class=\"dijitReset dijitSlider\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\" dojoAttachEvent=\"onkeypress:_onKeyPress,onkeyup:_onKeyUp\"\n><tbody class=\"dijitReset\"\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV\"\n\t\t\t><div class=\"dijitSliderIncrementIconV\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"decrementButton\"><span class=\"dijitSliderButtonInner\">+</span></div\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><center><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderTopBumper dijitSliderTopBumper\" dojoAttachEvent=\"onmousedown:_onClkIncBumper\"></div></center\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td dojoAttachPoint=\"leftDecoration\" class=\"dijitReset\" style=\"text-align:center;height:100%;\"></td\n\t\t><td class=\"dijitReset\" style=\"height:100%;\"\n\t\t\t><input dojoAttachPoint=\"valueNode\" type=\"hidden\" ${nameAttrSetting}\n\t\t\t/><center class=\"dijitReset dijitSliderBarContainerV\" waiRole=\"presentation\" dojoAttachPoint=\"sliderBarContainer\"\n\t\t\t\t><div waiRole=\"presentation\" dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitSliderBarV dijitSliderRemainingBar dijitSliderRemainingBarV\" dojoAttachEvent=\"onmousedown:_onBarClick\"><!--#5629--></div\n\t\t\t\t><div waiRole=\"presentation\" dojoAttachPoint=\"progressBar\" class=\"dijitSliderBar dijitSliderBarV dijitSliderProgressBar dijitSliderProgressBarV\" dojoAttachEvent=\"onmousedown:_onBarClick\"\n\t\t\t\t\t><div class=\"dijitSliderMoveable\" style=\"vertical-align:top;\"\n\t\t\t\t\t\t><div dojoAttachPoint=\"sliderHandle,focusNode\" class=\"dijitSliderImageHandle dijitSliderImageHandleV\" dojoAttachEvent=\"onmousedown:_onHandleClick\" waiRole=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"></div\n\t\t\t\t\t></div\n\t\t\t\t></div\n\t\t\t></center\n\t\t></td\n\t\t><td dojoAttachPoint=\"containerNode,rightDecoration\" class=\"dijitReset\" style=\"text-align:center;height:100%;\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><center><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderBottomBumper dijitSliderBottomBumper\" dojoAttachEvent=\"onmousedown:_onClkDecBumper\"></div></center\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV\"\n\t\t\t><div class=\"dijitSliderDecrementIconV\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"incrementButton\"><span class=\"dijitSliderButtonInner\">-</span></div\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n></tbody></table>\n"),_mousePixelCoord:"pageY",_pixelCount:"h",_startingPixelCoord:"y",_startingPixelCount:"t",_handleOffsetCoord:"top",_progressPixelSize:"height",_descending:true,startup:function(){if(this._started){return;}if(!this.isLeftToRight()&&dojo.isMoz){if(this.leftDecoration){this._rtlRectify(this.leftDecoration);}if(this.rightDecoration){this._rtlRectify(this.rightDecoration);}}this.inherited(arguments);},_isReversed:function(){return this._descending;},_rtlRectify:function(_4e0){var _4e1=[];while(_4e0.firstChild){_4e1.push(_4e0.firstChild);_4e0.removeChild(_4e0.firstChild);}for(var i=_4e1.length-1;i>=0;i--){if(_4e1[i]){_4e0.appendChild(_4e1[i]);}}}});}if(!dojo._hasResource["dijit.form.HorizontalRule"]){dojo._hasResource["dijit.form.HorizontalRule"]=true;dojo.provide("dijit.form.HorizontalRule");dojo.declare("dijit.form.HorizontalRule",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"dijitRuleContainer dijitRuleContainerH\"></div>",count:3,container:"containerNode",ruleStyle:"",_positionPrefix:"<div class=\"dijitRuleMark dijitRuleMarkH\" style=\"left:",_positionSuffix:"%;",_suffix:"\"></div>",_genHTML:function(pos,ndx){return this._positionPrefix+pos+this._positionSuffix+this.ruleStyle+this._suffix;},_isHorizontal:true,postCreate:function(){var _4e2;if(this.count==1){_4e2=this._genHTML(50,0);}else{var i;var _4e3=100/(this.count-1);if(!this._isHorizontal||this.isLeftToRight()){_4e2=this._genHTML(0,0);for(i=1;i<this.count-1;i++){_4e2+=this._genHTML(_4e3*i,i);}_4e2+=this._genHTML(100,this.count-1);}else{_4e2=this._genHTML(100,0);for(i=1;i<this.count-1;i++){_4e2+=this._genHTML(100-_4e3*i,i);}_4e2+=this._genHTML(0,this.count-1);}}this.domNode.innerHTML=_4e2;}});}if(!dojo._hasResource["dijit.form.VerticalRule"]){dojo._hasResource["dijit.form.VerticalRule"]=true;dojo.provide("dijit.form.VerticalRule");dojo.declare("dijit.form.VerticalRule",dijit.form.HorizontalRule,{templateString:"<div class=\"dijitRuleContainer dijitRuleContainerV\"></div>",_positionPrefix:"<div class=\"dijitRuleMark dijitRuleMarkV\" style=\"top:",_isHorizontal:false});}if(!dojo._hasResource["dijit.form.HorizontalRuleLabels"]){dojo._hasResource["dijit.form.HorizontalRuleLabels"]=true;dojo.provide("dijit.form.HorizontalRuleLabels");dojo.declare("dijit.form.HorizontalRuleLabels",dijit.form.HorizontalRule,{templateString:"<div class=\"dijitRuleContainer dijitRuleContainerH dijitRuleLabelsContainer dijitRuleLabelsContainerH\"></div>",labelStyle:"",labels:[],numericMargin:0,minimum:0,maximum:1,constraints:{pattern:"#%"},_positionPrefix:"<div class=\"dijitRuleLabelContainer dijitRuleLabelContainerH\" style=\"left:",_labelPrefix:"\"><span class=\"dijitRuleLabel dijitRuleLabelH\">",_suffix:"</span></div>",_calcPosition:function(pos){return pos;},_genHTML:function(pos,ndx){return this._positionPrefix+this._calcPosition(pos)+this._positionSuffix+this.labelStyle+this._labelPrefix+this.labels[ndx]+this._suffix;},getLabels:function(){var _4e4=this.labels;if(!_4e4.length){_4e4=dojo.query("> li",this.srcNodeRef).map(function(node){return String(node.innerHTML);});}this.srcNodeRef.innerHTML="";if(!_4e4.length&&this.count>1){var _4e5=this.minimum;var inc=(this.maximum-_4e5)/(this.count-1);for(var i=0;i<this.count;i++){_4e4.push((i<this.numericMargin||i>=(this.count-this.numericMargin))?"":dojo.number.format(_4e5,this.constraints));_4e5+=inc;}}return _4e4;},postMixInProperties:function(){this.inherited(arguments);this.labels=this.getLabels();this.count=this.labels.length;}});}if(!dojo._hasResource["dijit.form.VerticalRuleLabels"]){dojo._hasResource["dijit.form.VerticalRuleLabels"]=true;dojo.provide("dijit.form.VerticalRuleLabels");dojo.declare("dijit.form.VerticalRuleLabels",dijit.form.HorizontalRuleLabels,{templateString:"<div class=\"dijitRuleContainer dijitRuleContainerV dijitRuleLabelsContainer dijitRuleLabelsContainerV\"></div>",_positionPrefix:"<div class=\"dijitRuleLabelContainer dijitRuleLabelContainerV\" style=\"top:",_labelPrefix:"\"><span class=\"dijitRuleLabel dijitRuleLabelV\">",_calcPosition:function(pos){return 100-pos;}});}if(!dojo._hasResource["dijit.form.SimpleTextarea"]){dojo._hasResource["dijit.form.SimpleTextarea"]=true;dojo.provide("dijit.form.SimpleTextarea");dojo.declare("dijit.form.SimpleTextarea",dijit.form.TextBox,{baseClass:"dijitTextArea",attributeMap:dojo.delegate(dijit.form._FormValueWidget.prototype.attributeMap,{rows:"textbox",cols:"textbox"}),rows:"3",cols:"20",templateString:"<textarea ${nameAttrSetting} dojoAttachPoint='focusNode,containerNode,textbox' autocomplete='off'></textarea>",postMixInProperties:function(){if(!this.value&&this.srcNodeRef){this.value=this.srcNodeRef.value;}this.inherited(arguments);},filter:function(_4e6){if(_4e6){_4e6=_4e6.replace(/\r/g,"");}return this.inherited(arguments);},postCreate:function(){this.inherited(arguments);if(dojo.isIE&&this.cols){dojo.addClass(this.textbox,"dijitTextAreaCols");}},_previousValue:"",_onInput:function(e){if(this.maxLength){var _4e7=parseInt(this.maxLength);var _4e8=this.textbox.value.replace(/\r/g,"");var _4e9=_4e8.length-_4e7;if(_4e9>0){if(e){dojo.stopEvent(e);}var _4ea=this.textbox;if(_4ea.selectionStart){var pos=_4ea.selectionStart;var cr=0;if(dojo.isOpera){cr=(this.textbox.value.substring(0,pos).match(/\r/g)||[]).length;}this.textbox.value=_4e8.substring(0,pos-_4e9-cr)+_4e8.substring(pos-cr);_4ea.setSelectionRange(pos-_4e9,pos-_4e9);}else{if(dojo.doc.selection){_4ea.focus();var _4eb=dojo.doc.selection.createRange();_4eb.moveStart("character",-_4e9);_4eb.text="";_4eb.select();}}}this._previousValue=this.textbox.value;}this.inherited(arguments);}});}if(!dojo._hasResource["dijit.form.Textarea"]){dojo._hasResource["dijit.form.Textarea"]=true;dojo.provide("dijit.form.Textarea");dojo.declare("dijit.form.Textarea",dijit.form.SimpleTextarea,{cols:"",_previousNewlines:0,_strictMode:(dojo.doc.compatMode!="BackCompat"),_getHeight:function(_4ec){var newH=_4ec.scrollHeight;if(dojo.isIE){newH+=_4ec.offsetHeight-_4ec.clientHeight-((dojo.isIE<8&&this._strictMode)?dojo._getPadBorderExtents(_4ec).h:0);}else{if(dojo.isMoz){newH+=_4ec.offsetHeight-_4ec.clientHeight;}else{if(dojo.isWebKit&&!(dojo.isSafari<4)){newH+=dojo._getBorderExtents(_4ec).h;}else{newH+=dojo._getPadBorderExtents(_4ec).h;}}}return newH;},_estimateHeight:function(_4ed){_4ed.style.maxHeight="";_4ed.style.height="auto";_4ed.rows=(_4ed.value.match(/\n/g)||[]).length+1;},_needsHelpShrinking:dojo.isMoz||dojo.isWebKit,_onInput:function(){this.inherited(arguments);if(this._busyResizing){return;}this._busyResizing=true;var _4ee=this.textbox;if(_4ee.scrollHeight&&_4ee.offsetHeight&&_4ee.clientHeight){var newH=this._getHeight(_4ee)+"px";if(_4ee.style.height!=newH){_4ee.style.maxHeight=_4ee.style.height=newH;}if(this._needsHelpShrinking){if(this._setTimeoutHandle){clearTimeout(this._setTimeoutHandle);}this._setTimeoutHandle=setTimeout(dojo.hitch(this,"_shrink"),0);}}else{this._estimateHeight(_4ee);}this._busyResizing=false;},_busyResizing:false,_shrink:function(){this._setTimeoutHandle=null;if(this._needsHelpShrinking&&!this._busyResizing){this._busyResizing=true;var _4ef=this.textbox;var _4f0=false;if(_4ef.value==""){_4ef.value=" ";_4f0=true;}var _4f1=_4ef.scrollHeight;if(!_4f1){this._estimateHeight(_4ef);}else{var _4f2=_4ef.style.paddingBottom;var _4f3=dojo._getPadExtents(_4ef);_4f3=_4f3.h-_4f3.t;_4ef.style.paddingBottom=_4f3+1+"px";var newH=this._getHeight(_4ef)-1+"px";if(_4ef.style.maxHeight!=newH){_4ef.style.paddingBottom=_4f3+_4f1+"px";_4ef.scrollTop=0;_4ef.style.maxHeight=this._getHeight(_4ef)-_4f1+"px";}_4ef.style.paddingBottom=_4f2;}if(_4f0){_4ef.value="";}this._busyResizing=false;}},resize:function(){this._onInput();},_setValueAttr:function(){this.inherited(arguments);this.resize();},postCreate:function(){this.inherited(arguments);dojo.style(this.textbox,{overflowY:"hidden",overflowX:"auto",boxSizing:"border-box",MsBoxSizing:"border-box",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box"});this.connect(this.textbox,"onscroll",this._onInput);this.connect(this.textbox,"onresize",this._onInput);this.connect(this.textbox,"onfocus",this._onInput);setTimeout(dojo.hitch(this,"resize"),0);}});}if(!dojo._hasResource["dijit.layout.StackController"]){dojo._hasResource["dijit.layout.StackController"]=true;dojo.provide("dijit.layout.StackController");dojo.declare("dijit.layout.StackController",[dijit._Widget,dijit._Templated,dijit._Container],{templateString:"<span wairole='tablist' dojoAttachEvent='onkeypress' class='dijitStackController'></span>",containerId:"",buttonWidget:"dijit.layout._StackButton",postCreate:function(){dijit.setWaiRole(this.domNode,"tablist");this.pane2button={};this.pane2handles={};this.subscribe(this.containerId+"-startup","onStartup");this.subscribe(this.containerId+"-addChild","onAddChild");this.subscribe(this.containerId+"-removeChild","onRemoveChild");this.subscribe(this.containerId+"-selectChild","onSelectChild");this.subscribe(this.containerId+"-containerKeyPress","onContainerKeyPress");},onStartup:function(info){dojo.forEach(info.children,this.onAddChild,this);if(info.selected){this.onSelectChild(info.selected);}},destroy:function(){for(var pane in this.pane2button){this.onRemoveChild(dijit.byId(pane));}this.inherited(arguments);},onAddChild:function(page,_4f4){var _4f5=dojo.doc.createElement("span");this.domNode.appendChild(_4f5);var cls=dojo.getObject(this.buttonWidget);var _4f6=new cls({id:this.id+"_"+page.id,label:page.title,showLabel:page.showTitle,iconClass:page.iconClass,closeButton:page.closable,title:page.tooltip},_4f5);dijit.setWaiState(_4f6.focusNode,"selected","false");this.pane2handles[page.id]=[this.connect(page,"attr",function(name,_4f7){if(arguments.length==2){var _4f8={title:"label",showTitle:"showLabel",iconClass:"iconClass",closable:"closeButton",tooltip:"title"}[name];if(_4f8){_4f6.attr(_4f8,_4f7);}}}),this.connect(_4f6,"onClick",dojo.hitch(this,"onButtonClick",page)),this.connect(_4f6,"onClickCloseButton",dojo.hitch(this,"onCloseButtonClick",page))];this.addChild(_4f6,_4f4);this.pane2button[page.id]=_4f6;page.controlButton=_4f6;if(!this._currentChild){_4f6.focusNode.setAttribute("tabIndex","0");dijit.setWaiState(_4f6.focusNode,"selected","true");this._currentChild=page;}if(!this.isLeftToRight()&&dojo.isIE&&this._rectifyRtlTabList){this._rectifyRtlTabList();}},onRemoveChild:function(page){if(this._currentChild===page){this._currentChild=null;}dojo.forEach(this.pane2handles[page.id],this.disconnect,this);delete this.pane2handles[page.id];var _4f9=this.pane2button[page.id];if(_4f9){this.removeChild(_4f9);delete this.pane2button[page.id];_4f9.destroy();}delete page.controlButton;},onSelectChild:function(page){if(!page){return;}if(this._currentChild){var _4fa=this.pane2button[this._currentChild.id];_4fa.attr("checked",false);dijit.setWaiState(_4fa.focusNode,"selected","false");_4fa.focusNode.setAttribute("tabIndex","-1");}var _4fb=this.pane2button[page.id];_4fb.attr("checked",true);dijit.setWaiState(_4fb.focusNode,"selected","true");this._currentChild=page;_4fb.focusNode.setAttribute("tabIndex","0");var _4fc=dijit.byId(this.containerId);dijit.setWaiState(_4fc.containerNode,"labelledby",_4fb.id);},onButtonClick:function(page){var _4fd=dijit.byId(this.containerId);_4fd.selectChild(page);},onCloseButtonClick:function(page){var _4fe=dijit.byId(this.containerId);_4fe.closeChild(page);if(this._currentChild){var b=this.pane2button[this._currentChild.id];if(b){dijit.focus(b.focusNode||b.domNode);}}},adjacent:function(_4ff){if(!this.isLeftToRight()&&(!this.tabPosition||/top|bottom/.test(this.tabPosition))){_4ff=!_4ff;}var _500=this.getChildren();var _501=dojo.indexOf(_500,this.pane2button[this._currentChild.id]);var _502=_4ff?1:_500.length-1;return _500[(_501+_502)%_500.length];},onkeypress:function(e){if(this.disabled||e.altKey){return;}var _503=null;if(e.ctrlKey||!e._djpage){var k=dojo.keys;switch(e.charOrCode){case k.LEFT_ARROW:case k.UP_ARROW:if(!e._djpage){_503=false;}break;case k.PAGE_UP:if(e.ctrlKey){_503=false;}break;case k.RIGHT_ARROW:case k.DOWN_ARROW:if(!e._djpage){_503=true;}break;case k.PAGE_DOWN:if(e.ctrlKey){_503=true;}break;case k.DELETE:if(this._currentChild.closable){this.onCloseButtonClick(this._currentChild);}dojo.stopEvent(e);break;default:if(e.ctrlKey){if(e.charOrCode===k.TAB){this.adjacent(!e.shiftKey).onClick();dojo.stopEvent(e);}else{if(e.charOrCode=="w"){if(this._currentChild.closable){this.onCloseButtonClick(this._currentChild);}dojo.stopEvent(e);}}}}if(_503!==null){this.adjacent(_503).onClick();dojo.stopEvent(e);}}},onContainerKeyPress:function(info){info.e._djpage=info.page;this.onkeypress(info.e);}});dojo.declare("dijit.layout._StackButton",dijit.form.ToggleButton,{tabIndex:"-1",postCreate:function(evt){dijit.setWaiRole((this.focusNode||this.domNode),"tab");this.inherited(arguments);},onClick:function(evt){dijit.focus(this.focusNode);},onClickCloseButton:function(evt){evt.stopPropagation();}});}if(!dojo._hasResource["dijit.layout.StackContainer"]){dojo._hasResource["dijit.layout.StackContainer"]=true;dojo.provide("dijit.layout.StackContainer");dojo.declare("dijit.layout.StackContainer",dijit.layout._LayoutWidget,{doLayout:true,persist:false,baseClass:"dijitStackContainer",postCreate:function(){this.inherited(arguments);dojo.addClass(this.domNode,"dijitLayoutContainer");dijit.setWaiRole(this.containerNode,"tabpanel");this.connect(this.domNode,"onkeypress",this._onKeyPress);},startup:function(){if(this._started){return;}var _504=this.getChildren();dojo.forEach(_504,this._setupChild,this);if(this.persist){this.selectedChildWidget=dijit.byId(dojo.cookie(this.id+"_selectedChild"));}else{dojo.some(_504,function(_505){if(_505.selected){this.selectedChildWidget=_505;}return _505.selected;},this);}var _506=this.selectedChildWidget;if(!_506&&_504[0]){_506=this.selectedChildWidget=_504[0];_506.selected=true;}dojo.publish(this.id+"-startup",[{children:_504,selected:_506}]);this.inherited(arguments);},resize:function(){var _507=this.selectedChildWidget;if(_507&&!this._hasBeenShown){this._hasBeenShown=true;this._showChild(_507);}this.inherited(arguments);},_setupChild:function(_508){this.inherited(arguments);dojo.removeClass(_508.domNode,"dijitVisible");dojo.addClass(_508.domNode,"dijitHidden");_508.domNode.title="";},addChild:function(_509,_50a){this.inherited(arguments);if(this._started){dojo.publish(this.id+"-addChild",[_509,_50a]);this.layout();if(!this.selectedChildWidget){this.selectChild(_509);}}},removeChild:function(page){this.inherited(arguments);if(this._started){dojo.publish(this.id+"-removeChild",[page]);}if(this._beingDestroyed){return;}if(this._started){this.layout();}if(this.selectedChildWidget===page){this.selectedChildWidget=undefined;if(this._started){var _50b=this.getChildren();if(_50b.length){this.selectChild(_50b[0]);}}}},selectChild:function(page){page=dijit.byId(page);if(this.selectedChildWidget!=page){this._transition(page,this.selectedChildWidget);this.selectedChildWidget=page;dojo.publish(this.id+"-selectChild",[page]);if(this.persist){dojo.cookie(this.id+"_selectedChild",this.selectedChildWidget.id);}}},_transition:function(_50c,_50d){if(_50d){this._hideChild(_50d);}this._showChild(_50c);if(_50c.resize){if(this.doLayout){_50c.resize(this._containerContentBox||this._contentBox);}else{_50c.resize();}}},_adjacent:function(_50e){var _50f=this.getChildren();var _510=dojo.indexOf(_50f,this.selectedChildWidget);_510+=_50e?1:_50f.length-1;return _50f[_510%_50f.length];},forward:function(){this.selectChild(this._adjacent(true));},back:function(){this.selectChild(this._adjacent(false));},_onKeyPress:function(e){dojo.publish(this.id+"-containerKeyPress",[{e:e,page:this}]);},layout:function(){if(this.doLayout&&this.selectedChildWidget&&this.selectedChildWidget.resize){this.selectedChildWidget.resize(this._contentBox);}},_showChild:function(page){var _511=this.getChildren();page.isFirstChild=(page==_511[0]);page.isLastChild=(page==_511[_511.length-1]);page.selected=true;dojo.removeClass(page.domNode,"dijitHidden");dojo.addClass(page.domNode,"dijitVisible");page._onShow();},_hideChild:function(page){page.selected=false;dojo.removeClass(page.domNode,"dijitVisible");dojo.addClass(page.domNode,"dijitHidden");page.onHide();},closeChild:function(page){var _512=page.onClose(this,page);if(_512){this.removeChild(page);page.destroyRecursive();}},destroyDescendants:function(_513){dojo.forEach(this.getChildren(),function(_514){this.removeChild(_514);_514.destroyRecursive(_513);},this);}});dojo.extend(dijit._Widget,{selected:false,closable:false,iconClass:"",showTitle:true,onClose:function(){return true;}});}if(!dojo._hasResource["dijit.layout.AccordionPane"]){dojo._hasResource["dijit.layout.AccordionPane"]=true;dojo.provide("dijit.layout.AccordionPane");dojo.declare("dijit.layout.AccordionPane",dijit.layout.ContentPane,{constructor:function(){dojo.deprecated("dijit.layout.AccordionPane deprecated, use ContentPane instead","","2.0");},onSelected:function(){}});}if(!dojo._hasResource["dijit.layout.AccordionContainer"]){dojo._hasResource["dijit.layout.AccordionContainer"]=true;dojo.provide("dijit.layout.AccordionContainer");dojo.declare("dijit.layout.AccordionContainer",dijit.layout.StackContainer,{duration:dijit.defaultDuration,buttonWidget:"dijit.layout._AccordionButton",_verticalSpace:0,baseClass:"dijitAccordionContainer",postCreate:function(){this.domNode.style.overflow="hidden";this.inherited(arguments);dijit.setWaiRole(this.domNode,"tablist");},startup:function(){if(this._started){return;}this.inherited(arguments);if(this.selectedChildWidget){var _515=this.selectedChildWidget.containerNode.style;_515.display="";_515.overflow="auto";this.selectedChildWidget._buttonWidget._setSelectedState(true);}},_getTargetHeight:function(node){var cs=dojo.getComputedStyle(node);return Math.max(this._verticalSpace-dojo._getPadBorderExtents(node,cs).h,0);},layout:function(){var _516=this.selectedChildWidget;var _517=0;dojo.forEach(this.getChildren(),function(_518){_517+=_518._buttonWidget.getTitleHeight();});var _519=this._contentBox;this._verticalSpace=_519.h-_517;this._containerContentBox={h:this._verticalSpace,w:_519.w};if(_516){_516.resize(this._containerContentBox);}},_setupChild:function(_51a){var cls=dojo.getObject(this.buttonWidget);var _51b=(_51a._buttonWidget=new cls({contentWidget:_51a,label:_51a.title,title:_51a.tooltip,iconClass:_51a.iconClass,id:_51a.id+"_button",parent:this}));_51a._accordionConnectHandle=this.connect(_51a,"attr",function(name,_51c){if(arguments.length==2){switch(name){case "title":case "iconClass":_51b.attr(name,_51c);}}});dojo.place(_51a._buttonWidget.domNode,_51a.domNode,"before");this.inherited(arguments);},removeChild:function(_51d){this.disconnect(_51d._accordionConnectHandle);delete _51d._accordionConnectHandle;_51d._buttonWidget.destroy();delete _51d._buttonWidget;this.inherited(arguments);},getChildren:function(){return dojo.filter(this.inherited(arguments),function(_51e){return _51e.declaredClass!=this.buttonWidget;},this);},destroy:function(){dojo.forEach(this.getChildren(),function(_51f){_51f._buttonWidget.destroy();});this.inherited(arguments);},_transition:function(_520,_521){if(this._inTransition){return;}this._inTransition=true;var _522=[];var _523=this._verticalSpace;if(_520){_520._buttonWidget.setSelected(true);this._showChild(_520);if(this.doLayout&&_520.resize){_520.resize(this._containerContentBox);}var _524=_520.domNode;dojo.addClass(_524,"dijitVisible");dojo.removeClass(_524,"dijitHidden");var _525=_524.style.overflow;_524.style.overflow="hidden";_522.push(dojo.animateProperty({node:_524,duration:this.duration,properties:{height:{start:1,end:this._getTargetHeight(_524)}},onEnd:dojo.hitch(this,function(){_524.style.overflow=_525;delete this._inTransition;})}));}if(_521){_521._buttonWidget.setSelected(false);var _526=_521.domNode,_527=_526.style.overflow;_526.style.overflow="hidden";_522.push(dojo.animateProperty({node:_526,duration:this.duration,properties:{height:{start:this._getTargetHeight(_526),end:1}},onEnd:function(){dojo.addClass(_526,"dijitHidden");dojo.removeClass(_526,"dijitVisible");_526.style.overflow=_527;if(_521.onHide){_521.onHide();}}}));}dojo.fx.combine(_522).play();},_onKeyPress:function(e,_528){if(this._inTransition||this.disabled||e.altKey||!(_528||e.ctrlKey)){if(this._inTransition){dojo.stopEvent(e);}return;}var k=dojo.keys,c=e.charOrCode;if((_528&&(c==k.LEFT_ARROW||c==k.UP_ARROW))||(e.ctrlKey&&c==k.PAGE_UP)){this._adjacent(false)._buttonWidget._onTitleClick();dojo.stopEvent(e);}else{if((_528&&(c==k.RIGHT_ARROW||c==k.DOWN_ARROW))||(e.ctrlKey&&(c==k.PAGE_DOWN||c==k.TAB))){this._adjacent(true)._buttonWidget._onTitleClick();dojo.stopEvent(e);}}}});dojo.declare("dijit.layout._AccordionButton",[dijit._Widget,dijit._Templated],{templateString:dojo.cache("dijit.layout","templates/AccordionButton.html","<div dojoAttachPoint='titleNode,focusNode' dojoAttachEvent='ondijitclick:_onTitleClick,onkeypress:_onTitleKeyPress,onfocus:_handleFocus,onblur:_handleFocus,onmouseenter:_onTitleEnter,onmouseleave:_onTitleLeave'\n\t\tclass='dijitAccordionTitle' wairole=\"tab\" waiState=\"expanded-false\"\n\t\t><span class='dijitInline dijitAccordionArrow' waiRole=\"presentation\"></span\n\t\t><span class='arrowTextUp' waiRole=\"presentation\">+</span\n\t\t><span class='arrowTextDown' waiRole=\"presentation\">-</span\n\t\t><img src=\"${_blankGif}\" alt=\"\" dojoAttachPoint='iconNode' style=\"vertical-align: middle\" waiRole=\"presentation\"/>\n\t\t<span waiRole=\"presentation\" dojoAttachPoint='titleTextNode' class='dijitAccordionText'></span>\n</div>\n"),attributeMap:dojo.mixin(dojo.clone(dijit.layout.ContentPane.prototype.attributeMap),{label:{node:"titleTextNode",type:"innerHTML"},title:{node:"titleTextNode",type:"attribute",attribute:"title"},iconClass:{node:"iconNode",type:"class"}}),baseClass:"dijitAccordionTitle",getParent:function(){return this.parent;},postCreate:function(){this.inherited(arguments);dojo.setSelectable(this.domNode,false);this.setSelected(this.selected);var _529=dojo.attr(this.domNode,"id").replace(" ","_");dojo.attr(this.titleTextNode,"id",_529+"_title");dijit.setWaiState(this.focusNode,"labelledby",dojo.attr(this.titleTextNode,"id"));},getTitleHeight:function(){return dojo.marginBox(this.titleNode).h;},_onTitleClick:function(){var _52a=this.getParent();if(!_52a._inTransition){_52a.selectChild(this.contentWidget);dijit.focus(this.focusNode);}},_onTitleEnter:function(){dojo.addClass(this.focusNode,"dijitAccordionTitle-hover");},_onTitleLeave:function(){dojo.removeClass(this.focusNode,"dijitAccordionTitle-hover");},_onTitleKeyPress:function(evt){return this.getParent()._onKeyPress(evt,this.contentWidget);},_setSelectedState:function(_52b){this.selected=_52b;dojo[(_52b?"addClass":"removeClass")](this.titleNode,"dijitAccordionTitle-selected");dijit.setWaiState(this.focusNode,"expanded",_52b);dijit.setWaiState(this.focusNode,"selected",_52b);this.focusNode.setAttribute("tabIndex",_52b?"0":"-1");},_handleFocus:function(e){dojo.toggleClass(this.titleTextNode,"dijitAccordionFocused",e.type=="focus");},setSelected:function(_52c){this._setSelectedState(_52c);if(_52c){var cw=this.contentWidget;if(cw.onSelected){cw.onSelected();}}}});}if(!dojo._hasResource["dijit.layout.BorderContainer"]){dojo._hasResource["dijit.layout.BorderContainer"]=true;dojo.provide("dijit.layout.BorderContainer");dojo.declare("dijit.layout.BorderContainer",dijit.layout._LayoutWidget,{design:"headline",gutters:true,liveSplitters:true,persist:false,baseClass:"dijitBorderContainer",_splitterClass:"dijit.layout._Splitter",postMixInProperties:function(){if(!this.gutters){this.baseClass+="NoGutter";}this.inherited(arguments);},postCreate:function(){this.inherited(arguments);this._splitters={};this._splitterThickness={};},startup:function(){if(this._started){return;}dojo.forEach(this.getChildren(),this._setupChild,this);this.inherited(arguments);},_setupChild:function(_52d){var _52e=_52d.region;if(_52e){this.inherited(arguments);dojo.addClass(_52d.domNode,this.baseClass+"Pane");var ltr=this.isLeftToRight();if(_52e=="leading"){_52e=ltr?"left":"right";}if(_52e=="trailing"){_52e=ltr?"right":"left";}this["_"+_52e]=_52d.domNode;this["_"+_52e+"Widget"]=_52d;if((_52d.splitter||this.gutters)&&!this._splitters[_52e]){var _52f=dojo.getObject(_52d.splitter?this._splitterClass:"dijit.layout._Gutter");var _530=new _52f({container:this,child:_52d,region:_52e,live:this.liveSplitters});_530.isSplitter=true;this._splitters[_52e]=_530.domNode;dojo.place(this._splitters[_52e],_52d.domNode,"after");_530.startup();}_52d.region=_52e;}},_computeSplitterThickness:function(_531){this._splitterThickness[_531]=this._splitterThickness[_531]||dojo.marginBox(this._splitters[_531])[(/top|bottom/.test(_531)?"h":"w")];},layout:function(){for(var _532 in this._splitters){this._computeSplitterThickness(_532);}this._layoutChildren();},addChild:function(_533,_534){this.inherited(arguments);if(this._started){this.layout();}},removeChild:function(_535){var _536=_535.region;var _537=this._splitters[_536];if(_537){dijit.byNode(_537).destroy();delete this._splitters[_536];delete this._splitterThickness[_536];}this.inherited(arguments);delete this["_"+_536];delete this["_"+_536+"Widget"];if(this._started){this._layoutChildren(_535.region);}dojo.removeClass(_535.domNode,this.baseClass+"Pane");},getChildren:function(){return dojo.filter(this.inherited(arguments),function(_538){return !_538.isSplitter;});},getSplitter:function(_539){var _53a=this._splitters[_539];return _53a?dijit.byNode(_53a):null;},resize:function(_53b,_53c){if(!this.cs||!this.pe){var node=this.domNode;this.cs=dojo.getComputedStyle(node);this.pe=dojo._getPadExtents(node,this.cs);this.pe.r=dojo._toPixelValue(node,this.cs.paddingRight);this.pe.b=dojo._toPixelValue(node,this.cs.paddingBottom);dojo.style(node,"padding","0px");}this.inherited(arguments);},_layoutChildren:function(_53d){if(!this._borderBox||!this._borderBox.h){return;}var _53e=(this.design=="sidebar");var _53f=0,_540=0,_541=0,_542=0;var _543={},_544={},_545={},_546={},_547=(this._center&&this._center.style)||{};var _548=/left|right/.test(_53d);var _549=!_53d||(!_548&&!_53e);var _54a=!_53d||(_548&&_53e);if(this._top){_543=_54a&&this._top.style;_53f=dojo.marginBox(this._top).h;}if(this._left){_544=_549&&this._left.style;_541=dojo.marginBox(this._left).w;}if(this._right){_545=_549&&this._right.style;_542=dojo.marginBox(this._right).w;}if(this._bottom){_546=_54a&&this._bottom.style;_540=dojo.marginBox(this._bottom).h;}var _54b=this._splitters;var _54c=_54b.top,_54d=_54b.bottom,_54e=_54b.left,_54f=_54b.right;var _550=this._splitterThickness;var _551=_550.top||0,_552=_550.left||0,_553=_550.right||0,_554=_550.bottom||0;if(_552>50||_553>50){setTimeout(dojo.hitch(this,function(){this._splitterThickness={};for(var _555 in this._splitters){this._computeSplitterThickness(_555);}this._layoutChildren();}),50);return false;}var pe=this.pe;var _556={left:(_53e?_541+_552:0)+pe.l+"px",right:(_53e?_542+_553:0)+pe.r+"px"};if(_54c){dojo.mixin(_54c.style,_556);_54c.style.top=_53f+pe.t+"px";}if(_54d){dojo.mixin(_54d.style,_556);_54d.style.bottom=_540+pe.b+"px";}_556={top:(_53e?0:_53f+_551)+pe.t+"px",bottom:(_53e?0:_540+_554)+pe.b+"px"};if(_54e){dojo.mixin(_54e.style,_556);_54e.style.left=_541+pe.l+"px";}if(_54f){dojo.mixin(_54f.style,_556);_54f.style.right=_542+pe.r+"px";}dojo.mixin(_547,{top:pe.t+_53f+_551+"px",left:pe.l+_541+_552+"px",right:pe.r+_542+_553+"px",bottom:pe.b+_540+_554+"px"});var _557={top:_53e?pe.t+"px":_547.top,bottom:_53e?pe.b+"px":_547.bottom};dojo.mixin(_544,_557);dojo.mixin(_545,_557);_544.left=pe.l+"px";_545.right=pe.r+"px";_543.top=pe.t+"px";_546.bottom=pe.b+"px";if(_53e){_543.left=_546.left=_541+_552+pe.l+"px";_543.right=_546.right=_542+_553+pe.r+"px";}else{_543.left=_546.left=pe.l+"px";_543.right=_546.right=pe.r+"px";}var _558=this._borderBox.h-pe.t-pe.b,_559=_558-(_53f+_551+_540+_554),_55a=_53e?_558:_559;var _55b=this._borderBox.w-pe.l-pe.r,_55c=_55b-(_541+_552+_542+_553),_55d=_53e?_55c:_55b;var dim={top:{w:_55d,h:_53f},bottom:{w:_55d,h:_540},left:{w:_541,h:_55a},right:{w:_542,h:_55a},center:{h:_559,w:_55c}};var _55e=dojo.isIE<8||(dojo.isIE&&dojo.isQuirks)||dojo.some(this.getChildren(),function(_55f){return _55f.domNode.tagName=="TEXTAREA"||_55f.domNode.tagName=="INPUT";});if(_55e){var _560=function(_561,_562,_563){if(_561){(_561.resize?_561.resize(_562,_563):dojo.marginBox(_561.domNode,_562));}};if(_54e){_54e.style.height=_55a;}if(_54f){_54f.style.height=_55a;}_560(this._leftWidget,{h:_55a},dim.left);_560(this._rightWidget,{h:_55a},dim.right);if(_54c){_54c.style.width=_55d;}if(_54d){_54d.style.width=_55d;}_560(this._topWidget,{w:_55d},dim.top);_560(this._bottomWidget,{w:_55d},dim.bottom);_560(this._centerWidget,dim.center);}else{var _564={};if(_53d){_564[_53d]=_564.center=true;if(/top|bottom/.test(_53d)&&this.design!="sidebar"){_564.left=_564.right=true;}else{if(/left|right/.test(_53d)&&this.design=="sidebar"){_564.top=_564.bottom=true;}}}dojo.forEach(this.getChildren(),function(_565){if(_565.resize&&(!_53d||_565.region in _564)){_565.resize(null,dim[_565.region]);}},this);}},destroy:function(){for(var _566 in this._splitters){var _567=this._splitters[_566];dijit.byNode(_567).destroy();dojo.destroy(_567);}delete this._splitters;delete this._splitterThickness;this.inherited(arguments);}});dojo.extend(dijit._Widget,{region:"",splitter:false,minSize:0,maxSize:Infinity});dojo.declare("dijit.layout._Splitter",[dijit._Widget,dijit._Templated],{live:true,templateString:"<div class=\"dijitSplitter\" dojoAttachEvent=\"onkeypress:_onKeyPress,onmousedown:_startDrag,onmouseenter:_onMouse,onmouseleave:_onMouse\" tabIndex=\"0\" waiRole=\"separator\"><div class=\"dijitSplitterThumb\"></div></div>",postCreate:function(){this.inherited(arguments);this.horizontal=/top|bottom/.test(this.region);dojo.addClass(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V"));this._factor=/top|left/.test(this.region)?1:-1;this._cookieName=this.container.id+"_"+this.region;if(this.container.persist){var _568=dojo.cookie(this._cookieName);if(_568){this.child.domNode.style[this.horizontal?"height":"width"]=_568;}}},_computeMaxSize:function(){var dim=this.horizontal?"h":"w",_569=this.container._splitterThickness[this.region];var flip={left:"right",right:"left",top:"bottom",bottom:"top",leading:"trailing",trailing:"leading"},_56a=this.container["_"+flip[this.region]];var _56b=dojo.contentBox(this.container.domNode)[dim]-(_56a?dojo.marginBox(_56a)[dim]:0)-20-_569*2;return Math.min(this.child.maxSize,_56b);},_startDrag:function(e){if(!this.cover){this.cover=dojo.doc.createElement("div");dojo.addClass(this.cover,"dijitSplitterCover");dojo.place(this.cover,this.child.domNode,"after");}dojo.addClass(this.cover,"dijitSplitterCoverActive");if(this.fake){dojo.destroy(this.fake);}if(!(this._resize=this.live)){(this.fake=this.domNode.cloneNode(true)).removeAttribute("id");dojo.addClass(this.domNode,"dijitSplitterShadow");dojo.place(this.fake,this.domNode,"after");}dojo.addClass(this.domNode,"dijitSplitterActive");dojo.addClass(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V")+"Active");if(this.fake){dojo.removeClass(this.fake,"dijitSplitterHover");dojo.removeClass(this.fake,"dijitSplitter"+(this.horizontal?"H":"V")+"Hover");}var _56c=this._factor,max=this._computeMaxSize(),min=this.child.minSize||20,_56d=this.horizontal,axis=_56d?"pageY":"pageX",_56e=e[axis],_56f=this.domNode.style,dim=_56d?"h":"w",_570=dojo.marginBox(this.child.domNode)[dim],_571=this.region,_572=parseInt(this.domNode.style[_571],10),_573=this._resize,mb={},_574=this.child.domNode,_575=dojo.hitch(this.container,this.container._layoutChildren),de=dojo.doc.body;this._handlers=(this._handlers||[]).concat([dojo.connect(de,"onmousemove",this._drag=function(e,_576){var _577=e[axis]-_56e,_578=_56c*_577+_570,_579=Math.max(Math.min(_578,max),min);if(_573||_576){mb[dim]=_579;dojo.marginBox(_574,mb);_575(_571);}_56f[_571]=_56c*_577+_572+(_579-_578)+"px";}),dojo.connect(dojo.doc,"ondragstart",dojo.stopEvent),dojo.connect(dojo.body(),"onselectstart",dojo.stopEvent),dojo.connect(de,"onmouseup",this,"_stopDrag")]);dojo.stopEvent(e);},_onMouse:function(e){var o=(e.type=="mouseover"||e.type=="mouseenter");dojo.toggleClass(this.domNode,"dijitSplitterHover",o);dojo.toggleClass(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V")+"Hover",o);},_stopDrag:function(e){try{if(this.cover){dojo.removeClass(this.cover,"dijitSplitterCoverActive");}if(this.fake){dojo.destroy(this.fake);}dojo.removeClass(this.domNode,"dijitSplitterActive");dojo.removeClass(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V")+"Active");dojo.removeClass(this.domNode,"dijitSplitterShadow");this._drag(e);this._drag(e,true);}finally{this._cleanupHandlers();delete this._drag;}if(this.container.persist){dojo.cookie(this._cookieName,this.child.domNode.style[this.horizontal?"height":"width"],{expires:365});}},_cleanupHandlers:function(){dojo.forEach(this._handlers,dojo.disconnect);delete this._handlers;},_onKeyPress:function(e){this._resize=true;var _57a=this.horizontal;var tick=1;var dk=dojo.keys;switch(e.charOrCode){case _57a?dk.UP_ARROW:dk.LEFT_ARROW:tick*=-1;case _57a?dk.DOWN_ARROW:dk.RIGHT_ARROW:break;default:return;}var _57b=dojo.marginBox(this.child.domNode)[_57a?"h":"w"]+this._factor*tick;var mb={};mb[this.horizontal?"h":"w"]=Math.max(Math.min(_57b,this._computeMaxSize()),this.child.minSize);dojo.marginBox(this.child.domNode,mb);this.container._layoutChildren(this.region);dojo.stopEvent(e);},destroy:function(){this._cleanupHandlers();delete this.child;delete this.container;delete this.cover;delete this.fake;this.inherited(arguments);}});dojo.declare("dijit.layout._Gutter",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"dijitGutter\" waiRole=\"presentation\"></div>",postCreate:function(){this.horizontal=/top|bottom/.test(this.region);dojo.addClass(this.domNode,"dijitGutter"+(this.horizontal?"H":"V"));}});}if(!dojo._hasResource["dijit.layout.LayoutContainer"]){dojo._hasResource["dijit.layout.LayoutContainer"]=true;dojo.provide("dijit.layout.LayoutContainer");dojo.declare("dijit.layout.LayoutContainer",dijit.layout._LayoutWidget,{baseClass:"dijitLayoutContainer",constructor:function(){dojo.deprecated("dijit.layout.LayoutContainer is deprecated","use BorderContainer instead",2);},layout:function(){dijit.layout.layoutChildren(this.domNode,this._contentBox,this.getChildren());},addChild:function(_57c,_57d){this.inherited(arguments);if(this._started){dijit.layout.layoutChildren(this.domNode,this._contentBox,this.getChildren());}},removeChild:function(_57e){this.inherited(arguments);if(this._started){dijit.layout.layoutChildren(this.domNode,this._contentBox,this.getChildren());}}});dojo.extend(dijit._Widget,{layoutAlign:"none"});}if(!dojo._hasResource["dijit.layout.LinkPane"]){dojo._hasResource["dijit.layout.LinkPane"]=true;dojo.provide("dijit.layout.LinkPane");dojo.declare("dijit.layout.LinkPane",[dijit.layout.ContentPane,dijit._Templated],{templateString:"<div class=\"dijitLinkPane\" dojoAttachPoint=\"containerNode\"></div>",postMixInProperties:function(){if(this.srcNodeRef){this.title+=this.srcNodeRef.innerHTML;}this.inherited(arguments);},_fillContent:function(_57f){}});}if(!dojo._hasResource["dijit.layout.SplitContainer"]){dojo._hasResource["dijit.layout.SplitContainer"]=true;dojo.provide("dijit.layout.SplitContainer");dojo.declare("dijit.layout.SplitContainer",dijit.layout._LayoutWidget,{constructor:function(){dojo.deprecated("dijit.layout.SplitContainer is deprecated","use BorderContainer with splitter instead",2);},activeSizing:false,sizerWidth:7,orientation:"horizontal",persist:true,baseClass:"dijitSplitContainer",postMixInProperties:function(){this.inherited("postMixInProperties",arguments);this.isHorizontal=(this.orientation=="horizontal");},postCreate:function(){this.inherited(arguments);this.sizers=[];if(dojo.isMozilla){this.domNode.style.overflow="-moz-scrollbars-none";}if(typeof this.sizerWidth=="object"){try{this.sizerWidth=parseInt(this.sizerWidth.toString());}catch(e){this.sizerWidth=7;}}var _580=dojo.doc.createElement("div");this.virtualSizer=_580;_580.style.position="relative";_580.style.zIndex=10;_580.className=this.isHorizontal?"dijitSplitContainerVirtualSizerH":"dijitSplitContainerVirtualSizerV";this.domNode.appendChild(_580);dojo.setSelectable(_580,false);},destroy:function(){delete this.virtualSizer;dojo.forEach(this._ownconnects,dojo.disconnect);this.inherited(arguments);},startup:function(){if(this._started){return;}dojo.forEach(this.getChildren(),function(_581,i,_582){this._setupChild(_581);if(i<_582.length-1){this._addSizer();}},this);if(this.persist){this._restoreState();}this.inherited(arguments);},_setupChild:function(_583){this.inherited(arguments);_583.domNode.style.position="absolute";dojo.addClass(_583.domNode,"dijitSplitPane");},_onSizerMouseDown:function(e){if(e.target.id){for(var i=0;i<this.sizers.length;i++){if(this.sizers[i].id==e.target.id){break;}}if(i<this.sizers.length){this.beginSizing(e,i);}}},_addSizer:function(_584){_584=_584===undefined?this.sizers.length:_584;var _585=dojo.doc.createElement("div");_585.id=dijit.getUniqueId("dijit_layout_SplitterContainer_Splitter");this.sizers.splice(_584,0,_585);this.domNode.appendChild(_585);_585.className=this.isHorizontal?"dijitSplitContainerSizerH":"dijitSplitContainerSizerV";var _586=dojo.doc.createElement("div");_586.className="thumb";_586.id=_585.id;_585.appendChild(_586);this.connect(_585,"onmousedown","_onSizerMouseDown");dojo.setSelectable(_585,false);},removeChild:function(_587){if(this.sizers.length){var i=dojo.indexOf(this.getChildren(),_587);if(i!=-1){if(i==this.sizers.length){i--;}dojo.destroy(this.sizers[i]);this.sizers.splice(i,1);}}this.inherited(arguments);if(this._started){this.layout();}},addChild:function(_588,_589){this.inherited(arguments);if(this._started){var _58a=this.getChildren();if(_58a.length>1){this._addSizer(_589);}this.layout();}},layout:function(){this.paneWidth=this._contentBox.w;this.paneHeight=this._contentBox.h;var _58b=this.getChildren();if(!_58b.length){return;}var _58c=this.isHorizontal?this.paneWidth:this.paneHeight;if(_58b.length>1){_58c-=this.sizerWidth*(_58b.length-1);}var _58d=0;dojo.forEach(_58b,function(_58e){_58d+=_58e.sizeShare;});var _58f=_58c/_58d;var _590=0;dojo.forEach(_58b.slice(0,_58b.length-1),function(_591){var size=Math.round(_58f*_591.sizeShare);_591.sizeActual=size;_590+=size;});_58b[_58b.length-1].sizeActual=_58c-_590;this._checkSizes();var pos=0;var size=_58b[0].sizeActual;this._movePanel(_58b[0],pos,size);_58b[0].position=pos;pos+=size;if(!this.sizers){return;}dojo.some(_58b.slice(1),function(_592,i){if(!this.sizers[i]){return true;}this._moveSlider(this.sizers[i],pos,this.sizerWidth);this.sizers[i].position=pos;pos+=this.sizerWidth;size=_592.sizeActual;this._movePanel(_592,pos,size);_592.position=pos;pos+=size;},this);},_movePanel:function(_593,pos,size){if(this.isHorizontal){_593.domNode.style.left=pos+"px";_593.domNode.style.top=0;var box={w:size,h:this.paneHeight};if(_593.resize){_593.resize(box);}else{dojo.marginBox(_593.domNode,box);}}else{_593.domNode.style.left=0;_593.domNode.style.top=pos+"px";var box={w:this.paneWidth,h:size};if(_593.resize){_593.resize(box);}else{dojo.marginBox(_593.domNode,box);}}},_moveSlider:function(_594,pos,size){if(this.isHorizontal){_594.style.left=pos+"px";_594.style.top=0;dojo.marginBox(_594,{w:size,h:this.paneHeight});}else{_594.style.left=0;_594.style.top=pos+"px";dojo.marginBox(_594,{w:this.paneWidth,h:size});}},_growPane:function(_595,pane){if(_595>0){if(pane.sizeActual>pane.sizeMin){if((pane.sizeActual-pane.sizeMin)>_595){pane.sizeActual=pane.sizeActual-_595;_595=0;}else{_595-=pane.sizeActual-pane.sizeMin;pane.sizeActual=pane.sizeMin;}}}return _595;},_checkSizes:function(){var _596=0;var _597=0;var _598=this.getChildren();dojo.forEach(_598,function(_599){_597+=_599.sizeActual;_596+=_599.sizeMin;});if(_596<=_597){var _59a=0;dojo.forEach(_598,function(_59b){if(_59b.sizeActual<_59b.sizeMin){_59a+=_59b.sizeMin-_59b.sizeActual;_59b.sizeActual=_59b.sizeMin;}});if(_59a>0){var list=this.isDraggingLeft?_598.reverse():_598;dojo.forEach(list,function(_59c){_59a=this._growPane(_59a,_59c);},this);}}else{dojo.forEach(_598,function(_59d){_59d.sizeActual=Math.round(_597*(_59d.sizeMin/_596));});}},beginSizing:function(e,i){var _59e=this.getChildren();this.paneBefore=_59e[i];this.paneAfter=_59e[i+1];this.isSizing=true;this.sizingSplitter=this.sizers[i];if(!this.cover){this.cover=dojo.create("div",{style:{position:"absolute",zIndex:5,top:0,left:0,width:"100%",height:"100%"}},this.domNode);}else{this.cover.style.zIndex=5;}this.sizingSplitter.style.zIndex=6;this.originPos=dojo.position(_59e[0].domNode,true);if(this.isHorizontal){var _59f=e.layerX||e.offsetX||0;var _5a0=e.pageX;this.originPos=this.originPos.x;}else{var _59f=e.layerY||e.offsetY||0;var _5a0=e.pageY;this.originPos=this.originPos.y;}this.startPoint=this.lastPoint=_5a0;this.screenToClientOffset=_5a0-_59f;this.dragOffset=this.lastPoint-this.paneBefore.sizeActual-this.originPos-this.paneBefore.position;if(!this.activeSizing){this._showSizingLine();}this._ownconnects=[];this._ownconnects.push(dojo.connect(dojo.doc.documentElement,"onmousemove",this,"changeSizing"));this._ownconnects.push(dojo.connect(dojo.doc.documentElement,"onmouseup",this,"endSizing"));dojo.stopEvent(e);},changeSizing:function(e){if(!this.isSizing){return;}this.lastPoint=this.isHorizontal?e.pageX:e.pageY;this.movePoint();if(this.activeSizing){this._updateSize();}else{this._moveSizingLine();}dojo.stopEvent(e);},endSizing:function(e){if(!this.isSizing){return;}if(this.cover){this.cover.style.zIndex=-1;}if(!this.activeSizing){this._hideSizingLine();}this._updateSize();this.isSizing=false;if(this.persist){this._saveState(this);}dojo.forEach(this._ownconnects,dojo.disconnect);},movePoint:function(){var p=this.lastPoint-this.screenToClientOffset;var a=p-this.dragOffset;a=this.legaliseSplitPoint(a);p=a+this.dragOffset;this.lastPoint=p+this.screenToClientOffset;},legaliseSplitPoint:function(a){a+=this.sizingSplitter.position;this.isDraggingLeft=!!(a>0);if(!this.activeSizing){var min=this.paneBefore.position+this.paneBefore.sizeMin;if(a<min){a=min;}var max=this.paneAfter.position+(this.paneAfter.sizeActual-(this.sizerWidth+this.paneAfter.sizeMin));if(a>max){a=max;}}a-=this.sizingSplitter.position;this._checkSizes();return a;},_updateSize:function(){var pos=this.lastPoint-this.dragOffset-this.originPos;var _5a1=this.paneBefore.position;var _5a2=this.paneAfter.position+this.paneAfter.sizeActual;this.paneBefore.sizeActual=pos-_5a1;this.paneAfter.position=pos+this.sizerWidth;this.paneAfter.sizeActual=_5a2-this.paneAfter.position;dojo.forEach(this.getChildren(),function(_5a3){_5a3.sizeShare=_5a3.sizeActual;});if(this._started){this.layout();}},_showSizingLine:function(){this._moveSizingLine();dojo.marginBox(this.virtualSizer,this.isHorizontal?{w:this.sizerWidth,h:this.paneHeight}:{w:this.paneWidth,h:this.sizerWidth});this.virtualSizer.style.display="block";},_hideSizingLine:function(){this.virtualSizer.style.display="none";},_moveSizingLine:function(){var pos=(this.lastPoint-this.startPoint)+this.sizingSplitter.position;dojo.style(this.virtualSizer,(this.isHorizontal?"left":"top"),pos+"px");},_getCookieName:function(i){return this.id+"_"+i;},_restoreState:function(){dojo.forEach(this.getChildren(),function(_5a4,i){var _5a5=this._getCookieName(i);var _5a6=dojo.cookie(_5a5);if(_5a6){var pos=parseInt(_5a6);if(typeof pos=="number"){_5a4.sizeShare=pos;}}},this);},_saveState:function(){if(!this.persist){return;}dojo.forEach(this.getChildren(),function(_5a7,i){dojo.cookie(this._getCookieName(i),_5a7.sizeShare,{expires:365});},this);}});dojo.extend(dijit._Widget,{sizeMin:10,sizeShare:10});}if(!dojo._hasResource["dijit.layout._TabContainerBase"]){dojo._hasResource["dijit.layout._TabContainerBase"]=true;dojo.provide("dijit.layout._TabContainerBase");dojo.declare("dijit.layout._TabContainerBase",[dijit.layout.StackContainer,dijit._Templated],{tabPosition:"top",baseClass:"dijitTabContainer",tabStrip:false,nested:false,templateString:dojo.cache("dijit.layout","templates/TabContainer.html","<div class=\"dijitTabContainer\">\n\t<div class=\"dijitTabListWrapper\" dojoAttachPoint=\"tablistNode\"></div>\n\t<div dojoAttachPoint=\"tablistSpacer\" class=\"dijitTabSpacer ${baseClass}-spacer\"></div>\n\t<div class=\"dijitTabPaneWrapper ${baseClass}-container\" dojoAttachPoint=\"containerNode\"></div>\n</div>\n"),postMixInProperties:function(){this.baseClass+=this.tabPosition.charAt(0).toUpperCase()+this.tabPosition.substr(1).replace(/-.*/,"");this.srcNodeRef&&dojo.style(this.srcNodeRef,"visibility","hidden");this.inherited(arguments);},postCreate:function(){this.inherited(arguments);this.tablist=this._makeController(this.tablistNode);if(!this.doLayout){dojo.addClass(this.domNode,"dijitTabContainerNoLayout");}if(this.nested){dojo.addClass(this.domNode,"dijitTabContainerNested");dojo.addClass(this.tablist.containerNode,"dijitTabContainerTabListNested");dojo.addClass(this.tablistSpacer,"dijitTabContainerSpacerNested");dojo.addClass(this.containerNode,"dijitTabPaneWrapperNested");}else{dojo.addClass(this.domNode,"tabStrip-"+(this.tabStrip?"enabled":"disabled"));}},_setupChild:function(tab){dojo.addClass(tab.domNode,"dijitTabPane");this.inherited(arguments);},startup:function(){if(this._started){return;}this.tablist.startup();this.inherited(arguments);},layout:function(){if(!this._contentBox||typeof (this._contentBox.l)=="undefined"){return;}var sc=this.selectedChildWidget;if(this.doLayout){var _5a8=this.tabPosition.replace(/-h/,"");this.tablist.layoutAlign=_5a8;var _5a9=[this.tablist,{domNode:this.tablistSpacer,layoutAlign:_5a8},{domNode:this.containerNode,layoutAlign:"client"}];dijit.layout.layoutChildren(this.domNode,this._contentBox,_5a9);this._containerContentBox=dijit.layout.marginBox2contentBox(this.containerNode,_5a9[2]);if(sc&&sc.resize){sc.resize(this._containerContentBox);}}else{if(this.tablist.resize){this.tablist.resize({w:dojo.contentBox(this.domNode).w});}if(sc&&sc.resize){sc.resize();}}},destroy:function(){if(this.tablist){this.tablist.destroy();}this.inherited(arguments);}});}if(!dojo._hasResource["dijit.layout.TabController"]){dojo._hasResource["dijit.layout.TabController"]=true;dojo.provide("dijit.layout.TabController");dojo.declare("dijit.layout.TabController",dijit.layout.StackController,{templateString:"<div wairole='tablist' dojoAttachEvent='onkeypress:onkeypress'></div>",tabPosition:"top",buttonWidget:"dijit.layout._TabButton",_rectifyRtlTabList:function(){if(0>=this.tabPosition.indexOf("-h")){return;}if(!this.pane2button){return;}var _5aa=0;for(var pane in this.pane2button){var ow=this.pane2button[pane].innerDiv.scrollWidth;_5aa=Math.max(_5aa,ow);}for(pane in this.pane2button){this.pane2button[pane].innerDiv.style.width=_5aa+"px";}}});dojo.declare("dijit.layout._TabButton",dijit.layout._StackButton,{baseClass:"dijitTab",templateString:dojo.cache("dijit.layout","templates/_TabButton.html","<div waiRole=\"presentation\" dojoAttachPoint=\"titleNode\" dojoAttachEvent='onclick:onClick,onmouseenter:_onMouse,onmouseleave:_onMouse'>\n <div waiRole=\"presentation\" class='dijitTabInnerDiv' dojoAttachPoint='innerDiv'>\n <div waiRole=\"presentation\" class='dijitTabContent' dojoAttachPoint='tabContent,focusNode'>\n\t <img src=\"${_blankGif}\" alt=\"\" dojoAttachPoint='iconNode' waiRole=\"presentation\"/>\n\t <span dojoAttachPoint='containerNode' class='tabLabel'></span>\n\t <span class=\"closeButton\" dojoAttachPoint='closeNode'\n\t \t\tdojoAttachEvent='onclick: onClickCloseButton, onmouseenter: _onCloseButtonEnter, onmouseleave: _onCloseButtonLeave'>\n\t \t<img src=\"${_blankGif}\" alt=\"\" dojoAttachPoint='closeIcon' class='closeImage' waiRole=\"presentation\"/>\n\t <span dojoAttachPoint='closeText' class='closeText'>x</span>\n\t </span>\n </div>\n </div>\n</div>\n"),scrollOnFocus:false,postMixInProperties:function(){if(!this.iconClass){this.iconClass="dijitTabButtonIcon";}},postCreate:function(){this.inherited(arguments);dojo.setSelectable(this.containerNode,false);if(this.iconNode.className=="dijitTabButtonIcon"){dojo.style(this.iconNode,"width","1px");}},startup:function(){this.inherited(arguments);var n=this.domNode;setTimeout(function(){n.className=n.className;},1);},_setCloseButtonAttr:function(disp){this.closeButton=disp;dojo.toggleClass(this.innerDiv,"dijitClosable",disp);this.closeNode.style.display=disp?"":"none";if(disp){var _5ab=dojo.i18n.getLocalization("dijit","common");if(this.closeNode){dojo.attr(this.closeNode,"title",_5ab.itemClose);if(dojo.isIE<8){dojo.attr(this.closeIcon,"title",_5ab.itemClose);}}var _5ab=dojo.i18n.getLocalization("dijit","common");this._closeMenu=new dijit.Menu({id:this.id+"_Menu",targetNodeIds:[this.domNode]});this._closeMenu.addChild(new dijit.MenuItem({label:_5ab.itemClose,onClick:dojo.hitch(this,"onClickCloseButton")}));}else{if(this._closeMenu){this._closeMenu.destroyRecursive();delete this._closeMenu;}}},destroy:function(){if(this._closeMenu){this._closeMenu.destroyRecursive();delete this._closeMenu;}this.inherited(arguments);},_onCloseButtonEnter:function(){dojo.addClass(this.closeNode,"closeButton-hover");},_onCloseButtonLeave:function(){dojo.removeClass(this.closeNode,"closeButton-hover");}});}if(!dojo._hasResource["dijit.layout.ScrollingTabController"]){dojo._hasResource["dijit.layout.ScrollingTabController"]=true;dojo.provide("dijit.layout.ScrollingTabController");dojo.declare("dijit.layout.ScrollingTabController",dijit.layout.TabController,{templateString:dojo.cache("dijit.layout","templates/ScrollingTabController.html","<div class=\"dijitTabListContainer-${tabPosition}\" style=\"visibility:hidden\">\n\t<div dojoType=\"dijit.layout._ScrollingTabControllerButton\" buttonType=\"menuBtn\" buttonClass=\"tabStripMenuButton\"\n\t\t\ttabPosition=\"${tabPosition}\" dojoAttachPoint=\"_menuBtn\" showLabel=false>&darr;</div>\n\t<div dojoType=\"dijit.layout._ScrollingTabControllerButton\" buttonType=\"leftBtn\" buttonClass=\"tabStripSlideButtonLeft\"\n\t\t\ttabPosition=\"${tabPosition}\" dojoAttachPoint=\"_leftBtn\" dojoAttachEvent=\"onClick: doSlideLeft\" showLabel=false>&larr;</div>\n\t<div dojoType=\"dijit.layout._ScrollingTabControllerButton\" buttonType=\"rightBtn\" buttonClass=\"tabStripSlideButtonRight\"\n\t\t\ttabPosition=\"${tabPosition}\" dojoAttachPoint=\"_rightBtn\" dojoAttachEvent=\"onClick: doSlideRight\" showLabel=false>&rarr;</div>\n\t<div class='dijitTabListWrapper' dojoAttachPoint='tablistWrapper'>\n\t\t<div wairole='tablist' dojoAttachEvent='onkeypress:onkeypress'\n\t\t\t\tdojoAttachPoint='containerNode' class='nowrapTabStrip'>\n\t\t</div>\n\t</div>\n</div>\n"),useMenu:true,useSlider:true,tabStripClass:"",widgetsInTemplate:true,_minScroll:5,attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{"class":"containerNode"}),postCreate:function(){this.inherited(arguments);var n=this.domNode;this.scrollNode=this.tablistWrapper;this._initButtons();if(!this.tabStripClass){this.tabStripClass="dijitTabContainer"+this.tabPosition.charAt(0).toUpperCase()+this.tabPosition.substr(1).replace(/-.*/,"")+"None";dojo.addClass(n,"tabStrip-disabled");}dojo.addClass(this.tablistWrapper,this.tabStripClass);},onStartup:function(){this.inherited(arguments);dojo.style(this.domNode,"visibility","visible");this._postStartup=true;},onAddChild:function(page,_5ac){this.inherited(arguments);var _5ad;if(this.useMenu){var _5ae=this.containerId;_5ad=new dijit.MenuItem({label:page.title,onClick:dojo.hitch(this,function(){var _5af=dijit.byId(_5ae);_5af.selectChild(page);})});this._menuChildren[page.id]=_5ad;this._menu.addChild(_5ad,_5ac);}this.pane2handles[page.id].push(this.connect(this.pane2button[page.id],"attr",function(name,_5b0){if(this._postStartup){if(arguments.length==2&&name=="label"){if(_5ad){_5ad.attr(name,_5b0);}if(this._dim){this.resize(this._dim);}}}}));dojo.style(this.containerNode,"width",(dojo.style(this.containerNode,"width")+200)+"px");},onRemoveChild:function(page,_5b1){var _5b2=this.pane2button[page.id];if(this._selectedTab===_5b2.domNode){this._selectedTab=null;}if(this.useMenu&&page&&page.id&&this._menuChildren[page.id]){this._menu.removeChild(this._menuChildren[page.id]);this._menuChildren[page.id].destroy();delete this._menuChildren[page.id];}this.inherited(arguments);},_initButtons:function(){this._menuChildren={};this._btnWidth=0;this._buttons=dojo.query("> .tabStripButton",this.domNode).filter(function(btn){if((this.useMenu&&btn==this._menuBtn.domNode)||(this.useSlider&&(btn==this._rightBtn.domNode||btn==this._leftBtn.domNode))){this._btnWidth+=dojo.marginBox(btn).w;return true;}else{dojo.style(btn,"display","none");return false;}},this);if(this.useMenu){this._menu=new dijit.Menu({id:this.id+"_menu",targetNodeIds:[this._menuBtn.domNode],leftClickToOpen:true,refocus:false});this._supportingWidgets.push(this._menu);}},_getTabsWidth:function(){var _5b3=this.getChildren();if(_5b3.length){var _5b4=_5b3[this.isLeftToRight()?0:_5b3.length-1].domNode,_5b5=_5b3[this.isLeftToRight()?_5b3.length-1:0].domNode;return _5b5.offsetLeft+dojo.style(_5b5,"width")-_5b4.offsetLeft;}else{return 0;}},_enableBtn:function(_5b6){var _5b7=this._getTabsWidth();_5b6=_5b6||dojo.style(this.scrollNode,"width");return _5b7>0&&_5b6<_5b7;},resize:function(dim){if(this.domNode.offsetWidth==0){return;}this._dim=dim;this.scrollNode.style.height="auto";this._contentBox=dijit.layout.marginBox2contentBox(this.domNode,{h:0,w:dim.w});this._contentBox.h=this.scrollNode.offsetHeight;dojo.contentBox(this.domNode,this._contentBox);var _5b8=this._enableBtn(this._contentBox.w);this._buttons.style("display",_5b8?"":"none");this._leftBtn.layoutAlign="left";this._rightBtn.layoutAlign="right";this._menuBtn.layoutAlign=this.isLeftToRight()?"right":"left";dijit.layout.layoutChildren(this.domNode,this._contentBox,[this._menuBtn,this._leftBtn,this._rightBtn,{domNode:this.scrollNode,layoutAlign:"client"}]);if(this._selectedTab){var w=this.scrollNode,sl=this._convertToScrollLeft(this._getScrollForSelectedTab());w.scrollLeft=sl;}this._setButtonClass(this._getScroll());},_getScroll:function(){var sl=(this.isLeftToRight()||dojo.isIE<8||dojo.isQuirks||dojo.isWebKit)?this.scrollNode.scrollLeft:dojo.style(this.containerNode,"width")-dojo.style(this.scrollNode,"width")+(dojo.isIE==8?-1:1)*this.scrollNode.scrollLeft;return sl;},_convertToScrollLeft:function(val){if(this.isLeftToRight()||dojo.isIE<8||dojo.isQuirks||dojo.isWebKit){return val;}else{var _5b9=dojo.style(this.containerNode,"width")-dojo.style(this.scrollNode,"width");return (dojo.isIE==8?-1:1)*(val-_5b9);}},onSelectChild:function(page){var tab=this.pane2button[page.id];if(!tab||!page){return;}var node=tab.domNode;if(node!=this._selectedTab){this._selectedTab=node;var sl=this._getScroll();if(sl>node.offsetLeft||sl+dojo.style(this.scrollNode,"width")<node.offsetLeft+dojo.style(node,"width")){this.createSmoothScroll().play();}}this.inherited(arguments);},_getScrollBounds:function(){var _5ba=this.getChildren(),_5bb=dojo.style(this.scrollNode,"width"),_5bc=dojo.style(this.containerNode,"width"),_5bd=_5bc-_5bb,_5be=this._getTabsWidth();if(_5ba.length&&_5be>_5bb){return {min:this.isLeftToRight()?0:_5ba[_5ba.length-1].domNode.offsetLeft,max:this.isLeftToRight()?(_5ba[_5ba.length-1].domNode.offsetLeft+dojo.style(_5ba[_5ba.length-1].domNode,"width"))-_5bb:_5bd};}else{var _5bf=this.isLeftToRight()?0:_5bd;return {min:_5bf,max:_5bf};}},_getScrollForSelectedTab:function(){var w=this.scrollNode,n=this._selectedTab,_5c0=dojo.style(this.scrollNode,"width"),_5c1=this._getScrollBounds();var pos=(n.offsetLeft+dojo.style(n,"width")/2)-_5c0/2;pos=Math.min(Math.max(pos,_5c1.min),_5c1.max);return pos;},createSmoothScroll:function(x){if(arguments.length>0){var _5c2=this._getScrollBounds();x=Math.min(Math.max(x,_5c2.min),_5c2.max);}else{x=this._getScrollForSelectedTab();}if(this._anim&&this._anim.status()=="playing"){this._anim.stop();}var self=this,w=this.scrollNode,anim=new dojo._Animation({beforeBegin:function(){if(this.curve){delete this.curve;}var oldS=w.scrollLeft,newS=self._convertToScrollLeft(x);anim.curve=new dojo._Line(oldS,newS);},onAnimate:function(val){w.scrollLeft=val;}});this._anim=anim;this._setButtonClass(x);return anim;},_getBtnNode:function(e){var n=e.target;while(n&&!dojo.hasClass(n,"tabStripButton")){n=n.parentNode;}return n;},doSlideRight:function(e){this.doSlide(1,this._getBtnNode(e));},doSlideLeft:function(e){this.doSlide(-1,this._getBtnNode(e));},doSlide:function(_5c3,node){if(node&&dojo.hasClass(node,"dijitTabBtnDisabled")){return;}var _5c4=dojo.style(this.scrollNode,"width");var d=(_5c4*0.75)*_5c3;var to=this._getScroll()+d;this._setButtonClass(to);this.createSmoothScroll(to).play();},_setButtonClass:function(_5c5){var cls="dijitTabBtnDisabled",_5c6=this._getScrollBounds();dojo.toggleClass(this._leftBtn.domNode,cls,_5c5<=_5c6.min);dojo.toggleClass(this._rightBtn.domNode,cls,_5c5>=_5c6.max);}});dojo.declare("dijit.layout._ScrollingTabControllerButton",dijit.form.Button,{baseClass:"dijitTab",buttonType:"",buttonClass:"",tabPosition:"top",templateString:dojo.cache("dijit.layout","templates/_ScrollingTabControllerButton.html","<div id=\"${id}-${buttonType}\" class=\"tabStripButton dijitTab ${buttonClass} tabStripButton-${tabPosition}\"\n\t\tdojoAttachEvent=\"onclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\">\n\t<div role=\"presentation\" wairole=\"presentation\" class=\"dijitTabInnerDiv\" dojoattachpoint=\"innerDiv,focusNode\">\n\t\t<div role=\"presentation\" wairole=\"presentation\" class=\"dijitTabContent dijitButtonContents\" dojoattachpoint=\"tabContent\">\n\t\t\t<img src=\"${_blankGif}\"/>\n\t\t\t<span dojoAttachPoint=\"containerNode,titleNode\" class=\"dijitButtonText\"></span>\n\t\t</div>\n\t</div>\n</div>\n"),tabIndex:""});}if(!dojo._hasResource["dijit.layout.TabContainer"]){dojo._hasResource["dijit.layout.TabContainer"]=true;dojo.provide("dijit.layout.TabContainer");dojo.declare("dijit.layout.TabContainer",dijit.layout._TabContainerBase,{useMenu:true,useSlider:true,controllerWidget:"",_makeController:function(_5c7){var cls=this.baseClass+"-tabs"+(this.doLayout?"":" dijitTabNoLayout"),_5c8=dojo.getObject(this.controllerWidget);return new _5c8({id:this.id+"_tablist",tabPosition:this.tabPosition,doLayout:this.doLayout,containerId:this.id,"class":cls,nested:this.nested,useMenu:this.useMenu,useSlider:this.useSlider,tabStripClass:this.tabStrip?this.baseClass+(this.tabStrip?"":"No")+"Strip":null},_5c7);},postMixInProperties:function(){this.inherited(arguments);if(!this.controllerWidget){this.controllerWidget=(this.tabPosition=="top"||this.tabPosition=="bottom")&&!this.nested?"dijit.layout.ScrollingTabController":"dijit.layout.TabController";}}});}if(!dojo._hasResource["dijit.dijit-all"]){dojo._hasResource["dijit.dijit-all"]=true;console.warn("dijit-all may include much more code than your application actually requires. We strongly recommend that you investigate a custom build or the web build tool");dojo.provide("dijit.dijit-all");}dojo.i18n._preloadLocalizations("dijit.nls.dijit-all",["ROOT","ar","ca","cs","da","de","de-de","el","en","en-gb","en-us","es","es-es","fi","fi-fi","fr","fr-fr","he","he-il","hu","it","it-it","ja","ja-jp","ko","ko-kr","nb","nl","nl-nl","pl","pt","pt-br","pt-pt","ru","sk","sl","sv","th","tr","xx","zh","zh-cn","zh-tw"]);
diff --git a/js/dojo/dijit/dijit-all.js.uncompressed.js b/js/dojo/dijit/dijit-all.js.uncompressed.js
--- a/js/dojo/dijit/dijit-all.js.uncompressed.js
+++ b/js/dojo/dijit/dijit-all.js.uncompressed.js
@@ -1,14798 +1,24901 @@
/*
- Copyright (c) 2004-2007, The Dojo Foundation
- All Rights Reserved.
-
- Licensed under the Academic Free License version 2.1 or above OR the
- modified BSD license. For more information on Dojo licensing, see:
-
- http://dojotoolkit.org/book/dojo-book-0-9/introduction/licensing
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
*/
/*
This is a compiled version of Dojo, built for deployment and not for
development. To get an editable version, please visit:
http://dojotoolkit.org
for documentation and information on getting the source.
*/
if(!dojo._hasResource["dojo.colors"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo.colors"] = true;
dojo.provide("dojo.colors");
+//TODO: this module appears to break naming conventions
+
+/*=====
+dojo.colors = {
+ // summary: Color utilities
+}
+=====*/
+
(function(){
- // this is a standard convertion prescribed by the CSS3 Color Module
+ // this is a standard conversion prescribed by the CSS3 Color Module
var hue2rgb = function(m1, m2, h){
if(h < 0){ ++h; }
if(h > 1){ --h; }
var h6 = 6 * h;
if(h6 < 1){ return m1 + (m2 - m1) * h6; }
if(2 * h < 1){ return m2; }
if(3 * h < 2){ return m1 + (m2 - m1) * (2 / 3 - h) * 6; }
return m1;
};
dojo.colorFromRgb = function(/*String*/ color, /*dojo.Color?*/ obj){
// summary:
// get rgb(a) array from css-style color declarations
// description:
// this function can handle all 4 CSS3 Color Module formats: rgb,
// rgba, hsl, hsla, including rgb(a) with percentage values.
var m = color.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);
if(m){
- var c = m[2].split(/\s*,\s*/), l = c.length, t = m[1];
+ var c = m[2].split(/\s*,\s*/), l = c.length, t = m[1], a;
if((t == "rgb" && l == 3) || (t == "rgba" && l == 4)){
var r = c[0];
if(r.charAt(r.length - 1) == "%"){
// 3 rgb percentage values
- var a = dojo.map(c, function(x){
+ a = dojo.map(c, function(x){
return parseFloat(x) * 2.56;
});
if(l == 4){ a[3] = c[3]; }
return dojo.colorFromArray(a, obj); // dojo.Color
}
return dojo.colorFromArray(c, obj); // dojo.Color
}
if((t == "hsl" && l == 3) || (t == "hsla" && l == 4)){
// normalize hsl values
var H = ((parseFloat(c[0]) % 360) + 360) % 360 / 360,
S = parseFloat(c[1]) / 100,
L = parseFloat(c[2]) / 100,
// calculate rgb according to the algorithm
// recommended by the CSS3 Color Module
m2 = L <= 0.5 ? L * (S + 1) : L + S - L * S,
- m1 = 2 * L - m2,
- a = [hue2rgb(m1, m2, H + 1 / 3) * 256,
- hue2rgb(m1, m2, H) * 256, hue2rgb(m1, m2, H - 1 / 3) * 256, 1];
+ m1 = 2 * L - m2;
+ a = [
+ hue2rgb(m1, m2, H + 1 / 3) * 256,
+ hue2rgb(m1, m2, H) * 256,
+ hue2rgb(m1, m2, H - 1 / 3) * 256,
+ 1
+ ];
if(l == 4){ a[3] = c[3]; }
return dojo.colorFromArray(a, obj); // dojo.Color
}
}
return null; // dojo.Color
};
var confine = function(c, low, high){
// summary:
// sanitize a color component by making sure it is a number,
// and clamping it to valid values
c = Number(c);
return isNaN(c) ? high : c < low ? low : c > high ? high : c; // Number
};
dojo.Color.prototype.sanitize = function(){
// summary: makes sure that the object has correct attributes
var t = this;
t.r = Math.round(confine(t.r, 0, 255));
t.g = Math.round(confine(t.g, 0, 255));
t.b = Math.round(confine(t.b, 0, 255));
t.a = confine(t.a, 0, 1);
return this; // dojo.Color
};
})();
dojo.colors.makeGrey = function(/*Number*/ g, /*Number?*/ a){
// summary: creates a greyscale color with an optional alpha
return dojo.colorFromArray([g, g, g, a]);
};
-
// mixin all CSS3 named colors not already in _base, along with SVG 1.0 variant spellings
-dojo.Color.named = dojo.mixin({
+dojo.mixin(dojo.Color.named, {
aliceblue: [240,248,255],
antiquewhite: [250,235,215],
aquamarine: [127,255,212],
azure: [240,255,255],
beige: [245,245,220],
bisque: [255,228,196],
blanchedalmond: [255,235,205],
blueviolet: [138,43,226],
brown: [165,42,42],
burlywood: [222,184,135],
cadetblue: [95,158,160],
chartreuse: [127,255,0],
chocolate: [210,105,30],
coral: [255,127,80],
cornflowerblue: [100,149,237],
cornsilk: [255,248,220],
crimson: [220,20,60],
cyan: [0,255,255],
darkblue: [0,0,139],
darkcyan: [0,139,139],
darkgoldenrod: [184,134,11],
darkgray: [169,169,169],
darkgreen: [0,100,0],
darkgrey: [169,169,169],
darkkhaki: [189,183,107],
darkmagenta: [139,0,139],
darkolivegreen: [85,107,47],
darkorange: [255,140,0],
darkorchid: [153,50,204],
darkred: [139,0,0],
darksalmon: [233,150,122],
darkseagreen: [143,188,143],
darkslateblue: [72,61,139],
darkslategray: [47,79,79],
darkslategrey: [47,79,79],
darkturquoise: [0,206,209],
darkviolet: [148,0,211],
deeppink: [255,20,147],
deepskyblue: [0,191,255],
dimgray: [105,105,105],
dimgrey: [105,105,105],
dodgerblue: [30,144,255],
firebrick: [178,34,34],
floralwhite: [255,250,240],
forestgreen: [34,139,34],
gainsboro: [220,220,220],
ghostwhite: [248,248,255],
gold: [255,215,0],
goldenrod: [218,165,32],
greenyellow: [173,255,47],
grey: [128,128,128],
honeydew: [240,255,240],
hotpink: [255,105,180],
indianred: [205,92,92],
indigo: [75,0,130],
ivory: [255,255,240],
khaki: [240,230,140],
lavender: [230,230,250],
lavenderblush: [255,240,245],
lawngreen: [124,252,0],
lemonchiffon: [255,250,205],
lightblue: [173,216,230],
lightcoral: [240,128,128],
lightcyan: [224,255,255],
lightgoldenrodyellow: [250,250,210],
lightgray: [211,211,211],
lightgreen: [144,238,144],
lightgrey: [211,211,211],
lightpink: [255,182,193],
lightsalmon: [255,160,122],
lightseagreen: [32,178,170],
lightskyblue: [135,206,250],
lightslategray: [119,136,153],
lightslategrey: [119,136,153],
lightsteelblue: [176,196,222],
lightyellow: [255,255,224],
limegreen: [50,205,50],
linen: [250,240,230],
magenta: [255,0,255],
mediumaquamarine: [102,205,170],
mediumblue: [0,0,205],
mediumorchid: [186,85,211],
mediumpurple: [147,112,219],
mediumseagreen: [60,179,113],
mediumslateblue: [123,104,238],
mediumspringgreen: [0,250,154],
mediumturquoise: [72,209,204],
mediumvioletred: [199,21,133],
midnightblue: [25,25,112],
mintcream: [245,255,250],
mistyrose: [255,228,225],
moccasin: [255,228,181],
navajowhite: [255,222,173],
oldlace: [253,245,230],
olivedrab: [107,142,35],
orange: [255,165,0],
orangered: [255,69,0],
orchid: [218,112,214],
palegoldenrod: [238,232,170],
palegreen: [152,251,152],
paleturquoise: [175,238,238],
palevioletred: [219,112,147],
papayawhip: [255,239,213],
peachpuff: [255,218,185],
peru: [205,133,63],
pink: [255,192,203],
plum: [221,160,221],
powderblue: [176,224,230],
rosybrown: [188,143,143],
royalblue: [65,105,225],
saddlebrown: [139,69,19],
salmon: [250,128,114],
sandybrown: [244,164,96],
seagreen: [46,139,87],
seashell: [255,245,238],
sienna: [160,82,45],
skyblue: [135,206,235],
slateblue: [106,90,205],
slategray: [112,128,144],
slategrey: [112,128,144],
snow: [255,250,250],
springgreen: [0,255,127],
steelblue: [70,130,180],
tan: [210,180,140],
thistle: [216,191,216],
tomato: [255,99,71],
transparent: [0, 0, 0, 0],
turquoise: [64,224,208],
violet: [238,130,238],
wheat: [245,222,179],
whitesmoke: [245,245,245],
yellowgreen: [154,205,50]
-}, dojo.Color.named);
+});
}
if(!dojo._hasResource["dojo.i18n"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo.i18n"] = true;
dojo.provide("dojo.i18n");
+/*=====
+dojo.i18n = {
+ // summary: Utility classes to enable loading of resources for internationalization (i18n)
+};
+=====*/
+
dojo.i18n.getLocalization = function(/*String*/packageName, /*String*/bundleName, /*String?*/locale){
// summary:
// Returns an Object containing the localization for a given resource
// bundle in a package, matching the specified locale.
// description:
// Returns a hash containing name/value pairs in its prototypesuch
// that values can be easily overridden. Throws an exception if the
// bundle is not found. Bundle must have already been loaded by
- // dojo.requireLocalization() or by a build optimization step. NOTE:
+ // `dojo.requireLocalization()` or by a build optimization step. NOTE:
// try not to call this method as part of an object property
- // definition (var foo = { bar: dojo.i18n.getLocalization() }). In
+ // definition (`var foo = { bar: dojo.i18n.getLocalization() }`). In
// some loading situations, the bundle may not be available in time
// for the object definition. Instead, call this method inside a
// function that is run after all modules load or the page loads (like
- // in dojo.adOnLoad()), or in a widget lifecycle method.
+ // in `dojo.addOnLoad()`), or in a widget lifecycle method.
// packageName:
// package which is associated with this resource
// bundleName:
// the base filename of the resource bundle (without the ".js" suffix)
// locale:
// the variant to load (optional). By default, the locale defined by
// the host environment: dojo.locale
locale = dojo.i18n.normalizeLocale(locale);
// look for nearest locale match
var elements = locale.split('-');
var module = [packageName,"nls",bundleName].join('.');
var bundle = dojo._loadedModules[module];
if(bundle){
var localization;
for(var i = elements.length; i > 0; i--){
var loc = elements.slice(0, i).join('_');
if(bundle[loc]){
localization = bundle[loc];
break;
}
}
if(!localization){
localization = bundle.ROOT;
}
// make a singleton prototype so that the caller won't accidentally change the values globally
if(localization){
var clazz = function(){};
clazz.prototype = localization;
return new clazz(); // Object
}
}
throw new Error("Bundle not found: " + bundleName + " in " + packageName+" , locale=" + locale);
};
dojo.i18n.normalizeLocale = function(/*String?*/locale){
// summary:
// Returns canonical form of locale, as used by Dojo.
//
// description:
- // All variants are case-insensitive and are separated by '-' as specified in RFC 3066.
+ // All variants are case-insensitive and are separated by '-' as specified in [RFC 3066](http://www.ietf.org/rfc/rfc3066.txt).
// If no locale is specified, the dojo.locale is returned. dojo.locale is defined by
// the user agent's locale unless overridden by djConfig.
var result = locale ? locale.toLowerCase() : dojo.locale;
if(result == "root"){
result = "ROOT";
}
return result; // String
};
dojo.i18n._requireLocalization = function(/*String*/moduleName, /*String*/bundleName, /*String?*/locale, /*String?*/availableFlatLocales){
// summary:
// See dojo.requireLocalization()
// description:
// Called by the bootstrap, but factored out so that it is only
// included in the build when needed.
var targetLocale = dojo.i18n.normalizeLocale(locale);
var bundlePackage = [moduleName, "nls", bundleName].join(".");
// NOTE:
// When loading these resources, the packaging does not match what is
// on disk. This is an implementation detail, as this is just a
// private data structure to hold the loaded resources. e.g.
- // tests/hello/nls/en-us/salutations.js is loaded as the object
- // tests.hello.nls.salutations.en_us={...} The structure on disk is
+ // `tests/hello/nls/en-us/salutations.js` is loaded as the object
+ // `tests.hello.nls.salutations.en_us={...}` The structure on disk is
// intended to be most convenient for developers and translators, but
// in memory it is more logical and efficient to store in a different
// order. Locales cannot use dashes, since the resulting path will
// not evaluate as valid JS, so we translate them to underscores.
//Find the best-match locale to load if we have available flat locales.
var bestLocale = "";
if(availableFlatLocales){
var flatLocales = availableFlatLocales.split(",");
for(var i = 0; i < flatLocales.length; i++){
//Locale must match from start of string.
- if(targetLocale.indexOf(flatLocales[i]) == 0){
+ //Using ["indexOf"] so customBase builds do not see
+ //this as a dojo._base.array dependency.
+ if(targetLocale["indexOf"](flatLocales[i]) == 0){
if(flatLocales[i].length > bestLocale.length){
bestLocale = flatLocales[i];
}
}
}
if(!bestLocale){
bestLocale = "ROOT";
}
}
//See if the desired locale is already loaded.
var tempLocale = availableFlatLocales ? bestLocale : targetLocale;
var bundle = dojo._loadedModules[bundlePackage];
var localizedBundle = null;
if(bundle){
- if(djConfig.localizationComplete && bundle._built){return;}
+ if(dojo.config.localizationComplete && bundle._built){return;}
var jsLoc = tempLocale.replace(/-/g, '_');
var translationPackage = bundlePackage+"."+jsLoc;
localizedBundle = dojo._loadedModules[translationPackage];
}
if(!localizedBundle){
bundle = dojo["provide"](bundlePackage);
var syms = dojo._getModuleSymbols(moduleName);
var modpath = syms.concat("nls").join("/");
var parent;
dojo.i18n._searchLocalePath(tempLocale, availableFlatLocales, function(loc){
var jsLoc = loc.replace(/-/g, '_');
var translationPackage = bundlePackage + "." + jsLoc;
var loaded = false;
if(!dojo._loadedModules[translationPackage]){
// Mark loaded whether it's found or not, so that further load attempts will not be made
dojo["provide"](translationPackage);
var module = [modpath];
if(loc != "ROOT"){module.push(loc);}
module.push(bundleName);
var filespec = module.join("/") + '.js';
loaded = dojo._loadPath(filespec, null, function(hash){
// Use singleton with prototype to point to parent bundle, then mix-in result from loadPath
var clazz = function(){};
clazz.prototype = parent;
bundle[jsLoc] = new clazz();
for(var j in hash){ bundle[jsLoc][j] = hash[j]; }
});
}else{
loaded = true;
}
if(loaded && bundle[jsLoc]){
parent = bundle[jsLoc];
}else{
bundle[jsLoc] = parent;
}
if(availableFlatLocales){
//Stop the locale path searching if we know the availableFlatLocales, since
//the first call to this function will load the only bundle that is needed.
return true;
}
});
}
//Save the best locale bundle as the target locale bundle when we know the
//the available bundles.
if(availableFlatLocales && targetLocale != bestLocale){
bundle[targetLocale.replace(/-/g, '_')] = bundle[bestLocale.replace(/-/g, '_')];
}
};
(function(){
// If other locales are used, dojo.requireLocalization should load them as
// well, by default.
//
// Override dojo.requireLocalization to do load the default bundle, then
// iterate through the extraLocale list and load those translations as
// well, unless a particular locale was requested.
- var extra = djConfig.extraLocale;
+ var extra = dojo.config.extraLocale;
if(extra){
if(!extra instanceof Array){
extra = [extra];
}
var req = dojo.i18n._requireLocalization;
dojo.i18n._requireLocalization = function(m, b, locale, availableFlatLocales){
req(m,b,locale, availableFlatLocales);
if(locale){return;}
for(var i=0; i<extra.length; i++){
req(m,b,extra[i], availableFlatLocales);
}
};
}
})();
dojo.i18n._searchLocalePath = function(/*String*/locale, /*Boolean*/down, /*Function*/searchFunc){
// summary:
// A helper method to assist in searching for locale-based resources.
// Will iterate through the variants of a particular locale, either up
// or down, executing a callback function. For example, "en-us" and
// true will try "en-us" followed by "en" and finally "ROOT".
locale = dojo.i18n.normalizeLocale(locale);
var elements = locale.split('-');
var searchlist = [];
for(var i = elements.length; i > 0; i--){
searchlist.push(elements.slice(0, i).join('-'));
}
searchlist.push(false);
if(down){searchlist.reverse();}
for(var j = searchlist.length - 1; j >= 0; j--){
var loc = searchlist[j] || "ROOT";
var stop = searchFunc(loc);
if(stop){ break; }
}
};
dojo.i18n._preloadLocalizations = function(/*String*/bundlePrefix, /*Array*/localesGenerated){
// summary:
// Load built, flattened resource bundles, if available for all
// locales used in the page. Only called by built layer files.
function preload(locale){
locale = dojo.i18n.normalizeLocale(locale);
dojo.i18n._searchLocalePath(locale, true, function(loc){
for(var i=0; i<localesGenerated.length;i++){
if(localesGenerated[i] == loc){
dojo["require"](bundlePrefix+"_"+loc);
return true; // Boolean
}
}
return false; // Boolean
});
}
preload();
- var extra = djConfig.extraLocale||[];
+ var extra = dojo.config.extraLocale||[];
for(var i=0; i<extra.length; i++){
preload(extra[i]);
}
};
}
if(!dojo._hasResource["dijit.ColorPalette"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.ColorPalette"] = true;
dojo.provide("dijit.ColorPalette");
-dojo.declare(
- "dijit.ColorPalette",
- [dijit._Widget, dijit._Templated],
-{
- // summary
- // Grid showing various colors, so the user can pick a certain color
+dojo.declare("dijit.ColorPalette",
+ [dijit._Widget, dijit._Templated],
+ {
+ // summary:
+ // A keyboard accessible color-picking widget
+ // description:
+ // Grid showing various colors, so the user can pick a certain color.
+ // Can be used standalone, or as a popup.
+ //
+ // example:
+ // | <div dojoType="dijit.ColorPalette"></div>
+ //
+ // example:
+ // | var picker = new dijit.ColorPalette({ },srcNode);
+ // | picker.startup();
// defaultTimeout: Number
- // number of milliseconds before a held key or button becomes typematic
+ // Number of milliseconds before a held key or button becomes typematic
defaultTimeout: 500,
// timeoutChangeRate: Number
- // fraction of time used to change the typematic timer between events
+ // Fraction of time used to change the typematic timer between events
// 1.0 means that each typematic event fires at defaultTimeout intervals
// < 1.0 means that each typematic event fires at an increasing faster rate
timeoutChangeRate: 0.90,
// palette: String
// Size of grid, either "7x10" or "3x4".
palette: "7x10",
- //_value: String
+ // value: String
// The value of the selected color.
value: null,
- //_currentFocus: Integer
- // Index of the currently focused color.
+ // _currentFocus: [private] DomNode
+ // The currently focused or hovered color.
+ // Different from value, which represents the selected (i.e. clicked) color.
_currentFocus: 0,
- // _xDim: Integer
+ // _xDim: [protected] Integer
// This is the number of colors horizontally across.
_xDim: null,
- // _yDim: Integer
+ // _yDim: [protected] Integer
/// This is the number of colors vertically down.
_yDim: null,
- // _palettes: Map
+ // _palettes: [protected] Map
// This represents the value of the colors.
// The first level is a hashmap of the different arrays available
// The next two dimensions represent the columns and rows of colors.
_palettes: {
-
"7x10": [["white", "seashell", "cornsilk", "lemonchiffon","lightyellow", "palegreen", "paleturquoise", "lightcyan", "lavender", "plum"],
["lightgray", "pink", "bisque", "moccasin", "khaki", "lightgreen", "lightseagreen", "lightskyblue", "cornflowerblue", "violet"],
["silver", "lightcoral", "sandybrown", "orange", "palegoldenrod", "chartreuse", "mediumturquoise", "skyblue", "mediumslateblue","orchid"],
["gray", "red", "orangered", "darkorange", "yellow", "limegreen", "darkseagreen", "royalblue", "slateblue", "mediumorchid"],
["dimgray", "crimson", "chocolate", "coral", "gold", "forestgreen", "seagreen", "blue", "blueviolet", "darkorchid"],
["darkslategray","firebrick","saddlebrown", "sienna", "olive", "green", "darkcyan", "mediumblue","darkslateblue", "darkmagenta" ],
["black", "darkred", "maroon", "brown", "darkolivegreen", "darkgreen", "midnightblue", "navy", "indigo", "purple"]],
"3x4": [["white", "lime", "green", "blue"],
["silver", "yellow", "fuchsia", "navy"],
- ["gray", "red", "purple", "black"]]
-
- },
-
- // _imagePaths: Map
+ ["gray", "red", "purple", "black"]]
+ },
+
+ // _imagePaths: [protected] Map
// This is stores the path to the palette images
_imagePaths: {
- "7x10": dojo.moduleUrl("dijit", "templates/colors7x10.png"),
- "3x4": dojo.moduleUrl("dijit", "templates/colors3x4.png")
- },
-
- // _paletteCoords: Map
+ "7x10": dojo.moduleUrl("dijit.themes", "a11y/colors7x10.png"),
+ "3x4": dojo.moduleUrl("dijit.themes", "a11y/colors3x4.png")
+ },
+
+ // _paletteCoords: [protected] Map
// This is a map that is used to calculate the coordinates of the
// images that make up the palette.
_paletteCoords: {
- "leftOffset": 4, "topOffset": 4,
+ "leftOffset": 3, "topOffset": 3,
"cWidth": 20, "cHeight": 20
-
- },
-
- // templatePath: String
- // Path to the template of this widget.
- templateString:"<div class=\"dijitInline dijitColorPalette\">\n\t<div class=\"dijitColorPaletteInner\" dojoAttachPoint=\"divNode\" waiRole=\"grid\" tabIndex=\"-1\">\n\t\t<img class=\"dijitColorPaletteUnder\" dojoAttachPoint=\"imageNode\" waiRole=\"presentation\">\n\t</div>\t\n</div>\n",
-
- // _paletteDims: Object
+ },
+
+ // templateString: String
+ // The template of this widget.
+ templateString: dojo.cache("dijit", "templates/ColorPalette.html", "<div class=\"dijitInline dijitColorPalette\">\n\t<div class=\"dijitColorPaletteInner\" dojoAttachPoint=\"divNode\" waiRole=\"grid\"\">\n\t\t<img class=\"dijitColorPaletteUnder\" dojoAttachPoint=\"imageNode\" waiRole=\"presentation\" alt=\"\">\n\t</div>\n</div>\n"),
+
+ // _paletteDims: [protected] Object
// Size of the supported palettes for alignment purposes.
_paletteDims: {
"7x10": {"width": "206px", "height": "145px"},
"3x4": {"width": "86px", "height": "64px"}
},
-
- postCreate: function(){
+ // tabIndex: String
+ // Widget tab index.
+ tabIndex: "0",
+
+ buildRendering: function(){
+ // Instantiate the template, which makes a skeleton into which we'll insert a bunch of
+ // <img> nodes
+ this.inherited(arguments);
+
// A name has to be given to the colorMap, this needs to be unique per Palette.
dojo.mixin(this.divNode.style, this._paletteDims[this.palette]);
- this.imageNode.setAttribute("src", this._imagePaths[this.palette]);
- var choices = this._palettes[this.palette];
+ this.imageNode.setAttribute("src", this._imagePaths[this.palette].toString());
+ var choices = this._palettes[this.palette];
this.domNode.style.position = "relative";
- this._highlightNodes = [];
+ this._cellNodes = [];
this.colorNames = dojo.i18n.getLocalization("dojo", "colors", this.lang);
- var url= dojo.moduleUrl("dijit", "templates/blank.gif");
- var colorObject = new dojo.Color(),
- coords = this._paletteCoords;
+ var url = this._blankGif,
+ colorObject = new dojo.Color(),
+ coords = this._paletteCoords;
for(var row=0; row < choices.length; row++){
- for(var col=0; col < choices[row].length; col++) {
- var highlightNode = document.createElement("img");
- highlightNode.src = url;
- dojo.addClass(highlightNode, "dijitPaletteImg");
- var color = choices[row][col],
- colorValue = colorObject.setColor(dojo.Color.named[color]);
- highlightNode.alt = this.colorNames[color];
- highlightNode.color = colorValue.toHex();
- var highlightStyle = highlightNode.style;
- highlightStyle.color = highlightStyle.backgroundColor = highlightNode.color;
- dojo.forEach(["Dijitclick", "MouseOut", "MouseOver", "Blur", "Focus"], function(handler) {
- this.connect(highlightNode, "on" + handler.toLowerCase(), "_onColor" + handler);
- }, this);
- this.divNode.appendChild(highlightNode);
- highlightStyle.top = coords.topOffset + (row * coords.cHeight) + "px";
- highlightStyle.left = coords.leftOffset + (col * coords.cWidth) + "px";
- highlightNode.setAttribute("tabIndex", "-1");
- highlightNode.title = this.colorNames[color];
- dijit.setWaiRole(highlightNode, "gridcell");
- highlightNode.index = this._highlightNodes.length;
- this._highlightNodes.push(highlightNode);
- }
- }
- this._highlightNodes[this._currentFocus].tabIndex = 0;
+ var rowNode = dojo.create("div", {
+ role: "row"
+ }, this.divNode);
+ for(var col=0; col < choices[row].length; col++){
+
+ var color = choices[row][col],
+ colorValue = colorObject.setColor(dojo.Color.named[color]);
+
+ var cellNode = dojo.create("span", {
+ "class": "dijitPaletteCell",
+ tabIndex: "-1",
+ title: this.colorNames[color],
+ style: {
+ top: coords.topOffset + (row * coords.cHeight) + "px",
+ left: coords.leftOffset + (col * coords.cWidth) + "px"
+ }
+ });
+
+ var imgNode = dojo.create("img",{
+ src: url,
+ "class":"dijitPaletteImg",
+ alt: this.colorNames[color]
+ }, cellNode);
+
+ // FIXME: color is an attribute of img?
+ imgNode.color = colorValue.toHex();
+ var imgStyle = imgNode.style;
+ imgStyle.color = imgStyle.backgroundColor = imgNode.color;
+
+ dojo.forEach(["Dijitclick", "MouseEnter", "MouseLeave", "Focus"], function(handler){
+ this.connect(cellNode, "on" + handler.toLowerCase(), "_onCell" + handler);
+ }, this);
+
+ dojo.place(cellNode, rowNode);
+
+ dijit.setWaiRole(cellNode, "gridcell");
+ cellNode.index = this._cellNodes.length;
+ this._cellNodes.push(cellNode);
+ }
+ }
this._xDim = choices[0].length;
this._yDim = choices.length;
// Now set all events
// The palette itself is navigated to with the tab key on the keyboard
// Keyboard navigation within the Palette is with the arrow keys
// Spacebar selects the color.
- // For the up key the index is changed by negative the x dimension.
+ // For the up key the index is changed by negative the x dimension.
var keyIncrementMap = {
UP_ARROW: -this._xDim,
- // The down key the index is increase by the x dimension.
+ // The down key the index is increase by the x dimension.
DOWN_ARROW: this._xDim,
// Right and left move the index by 1.
RIGHT_ARROW: 1,
LEFT_ARROW: -1
};
for(var key in keyIncrementMap){
this._connects.push(dijit.typematic.addKeyListener(this.domNode,
- {keyCode:dojo.keys[key], ctrlKey:false, altKey:false, shiftKey:false},
+ {charOrCode:dojo.keys[key], ctrlKey:false, altKey:false, shiftKey:false},
this,
function(){
var increment = keyIncrementMap[key];
return function(count){ this._navigateByKey(increment, count); };
}(),
this.timeoutChangeRate, this.defaultTimeout));
}
},
+
+ postCreate: function(){
+ this.inherited(arguments);
+
+ // Set initial navigable node. At any point in time there's exactly one
+ // cell with tabIndex != -1. If focus is inside the ColorPalette then
+ // focus is on that cell.
+ // TODO: if we set aria info (for the current value) on the ColorPalette itself then can we avoid
+ // having to focus each individual cell?
+ this._currentFocus = this._cellNodes[0];
+ dojo.attr(this._currentFocus, "tabIndex", this.tabIndex);
+ },
focus: function(){
// summary:
- // Focus this ColorPalette.
- dijit.focus(this._highlightNodes[this._currentFocus]);
+ // Focus this ColorPalette. Puts focus on the most recently focused cell.
+
+ // The cell already has tabIndex set, just need to set CSS and focus it
+ dojo.addClass(this._currentFocus, "dijitPaletteCellHighlight");
+ dijit.focus(this._currentFocus);
},
onChange: function(color){
// summary:
// Callback when a color is selected.
// color: String
// Hex value corresponding to color.
// console.debug("Color selected is: "+color);
},
- _onColorDijitclick: function(/*Event*/ evt){
+ _onFocus: function(){
+ // summary:
+ // Handler for when the ColorPalette gets focus (because a cell inside
+ // the ColorPalette got focus)
+ // tags:
+ // protected
+
+ dojo.addClass(this._currentFocus, "dijitPaletteCellHighlight");
+ this.inherited(arguments);
+ },
+
+ _onBlur: function(){
+ // summary:
+ // Handler for when the ColorPalette loses focus
+ // tags:
+ // protected
+
+ // Just to be the same as 1.3, when I am focused again go to first (0,0) cell rather than
+ // currently focused node.
+ dojo.attr(this._currentFocus, "tabIndex", "-1");
+ dojo.removeClass(this._currentFocus, "dijitPaletteCellHighlight");
+ this._currentFocus = this._cellNodes[0];
+ dojo.attr(this._currentFocus, "tabIndex", this.tabIndex);
+
+ this.inherited(arguments);
+ },
+
+ _onCellDijitclick: function(/*Event*/ evt){
// summary:
// Handler for click, enter key & space key. Selects the color.
// evt:
// The event.
+ // tags:
+ // private
+
var target = evt.currentTarget;
- if (this._currentFocus != target.index){
- this._currentFocus = target.index;
- dijit.focus(target);
- }
this._selectColor(target);
dojo.stopEvent(evt);
},
- _onColorMouseOut: function(/*Event*/ evt){
- // summary:
- // Handler for onMouseOut. Removes highlight.
+ _onCellMouseEnter: function(/*Event*/ evt){
+ // summary:
+ // Handler for onMouseEnter event on a cell. Put highlight on the color under the mouse.
// evt:
// The mouse event.
- dojo.removeClass(evt.currentTarget, "dijitPaletteImgHighlight");
- },
-
- _onColorMouseOver: function(/*Event*/ evt){
- // summary:
- // Handler for onMouseOver. Highlights the color.
+ // tags:
+ // private
+
+ var target = evt.currentTarget;
+ this._setCurrent(target);
+ },
+
+ _onCellMouseLeave: function(/*Event*/ evt){
+ // summary:
+ // Handler for onMouseLeave event on a cell. Remove highlight on the color under the mouse.
// evt:
// The mouse event.
- var target = evt.currentTarget;
- target.tabIndex = 0;
- target.focus();
- },
-
- _onColorBlur: function(/*Event*/ evt){
- // summary:
- // Handler for onBlur. Removes highlight and sets
- // the first color as the palette's tab point.
- // evt:
- // The blur event.
- dojo.removeClass(evt.currentTarget, "dijitPaletteImgHighlight");
- evt.currentTarget.tabIndex = -1;
- this._currentFocus = 0;
- this._highlightNodes[0].tabIndex = 0;
- },
-
- _onColorFocus: function(/*Event*/ evt){
- // summary:
- // Handler for onFocus. Highlights the color.
+ // tags:
+ // private
+
+ dojo.removeClass(this._currentFocus, "dijitPaletteCellHighlight");
+ },
+
+ _onCellFocus: function(/*Event*/ evt){
+ // summary:
+ // Handler for onFocus of a cell.
+ // description:
+ // Removes highlight of the color that just lost focus, and highlights
+ // the new color. Also moves the tabIndex setting to the new cell.
+ //
// evt:
// The focus event.
- if(this._currentFocus != evt.currentTarget.index){
- this._highlightNodes[this._currentFocus].tabIndex = -1;
- }
- this._currentFocus = evt.currentTarget.index;
- dojo.addClass(evt.currentTarget, "dijitPaletteImgHighlight");
-
- },
-
- _selectColor: function(selectNode){
+ // tags:
+ // private
+
+ this._setCurrent(evt.currentTarget);
+ },
+
+ _setCurrent: function(/*Node*/ node){
+ // summary:
+ // Called when a color is hovered or focused.
+ // description:
+ // Removes highlight of the old color, and highlights
+ // the new color. Also moves the tabIndex setting to the new cell.
+ // tags:
+ // protected
+ if("_currentFocus" in this){
+ // Remove highlight and tabIndex on old cell
+ dojo.attr(this._currentFocus, "tabIndex", "-1");
+ dojo.removeClass(this._currentFocus, "dijitPaletteCellHighlight");
+ }
+
+ // Set highlight and tabIndex of new cell
+ this._currentFocus = node;
+ if(node){
+ dojo.attr(node, "tabIndex", this.tabIndex);
+ dojo.addClass(node, "dijitPaletteCellHighlight");
+ }
+ },
+
+ _selectColor: function(selectNode){
// summary:
// This selects a color. It triggers the onChange event
// area:
// The area node that covers the color being selected.
- this.onChange(this.value = selectNode.color);
+ // tags:
+ // private
+ var img = selectNode.getElementsByTagName("img")[0];
+ this.onChange(this.value = img.color);
},
_navigateByKey: function(increment, typeCount){
- // summary:we
+ // summary:
// This is the callback for typematic.
// It changes the focus and the highlighed color.
// increment:
// How much the key is navigated.
// typeCount:
// How many times typematic has fired.
+ // tags:
+ // private
// typecount == -1 means the key is released.
if(typeCount == -1){ return; }
- var newFocusIndex = this._currentFocus + increment;
- if(newFocusIndex < this._highlightNodes.length && newFocusIndex > -1)
+ var newFocusIndex = this._currentFocus.index + increment;
+ if(newFocusIndex < this._cellNodes.length && newFocusIndex > -1)
{
- var focusNode = this._highlightNodes[newFocusIndex];
- focusNode.tabIndex = 0;
- focusNode.focus();
+ var focusNode = this._cellNodes[newFocusIndex];
+ this._setCurrent(focusNode);
+
+ // Actually focus the node, for the benefit of screen readers.
+ // Use setTimeout because IE doesn't like changing focus inside of an event handler
+ setTimeout(dojo.hitch(dijit, "focus", focusNode), 0);
}
}
});
}
if(!dojo._hasResource["dijit.Declaration"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.Declaration"] = true;
dojo.provide("dijit.Declaration");
dojo.declare(
"dijit.Declaration",
dijit._Widget,
{
// summary:
- // The Declaration widget allows a user to declare new widget
+ // The Declaration widget allows a developer to declare new widget
// classes directly from a snippet of markup.
+ // _noScript: [private] Boolean
+ // Flag to parser to leave alone the script tags contained inside of me
_noScript: true,
+
+ // widgetClass: String
+ // Name of class being declared, ex: "acme.myWidget"
widgetClass: "",
- replaceVars: true,
+
+ // propList: Object
+ // Set of attributes for this widget along with default values, ex:
+ // {delay: 100, title: "hello world"}
defaults: null,
+
+ // mixins: String[]
+ // List containing the prototype for this widget, and also any mixins,
+ // ex: ["dijit._Widget", "dijit._Container"]
mixins: [],
+
buildRendering: function(){
- var src = this.srcNodeRef.parentNode.removeChild(this.srcNodeRef);
- var preambles = dojo.query("> script[type='dojo/method'][event='preamble']", src).orphan();
- var scripts = dojo.query("> script[type^='dojo/']", src).orphan();
- var srcType = src.nodeName;
-
- var propList = this.defaults||{};
+ var src = this.srcNodeRef.parentNode.removeChild(this.srcNodeRef),
+ methods = dojo.query("> script[type^='dojo/method'][event]", src).orphan(),
+ postscriptConnects = dojo.query("> script[type^='dojo/method']", src).orphan(),
+ regularConnects = dojo.query("> script[type^='dojo/connect']", src).orphan(),
+ srcType = src.nodeName;
+
+ var propList = this.defaults || {};
+
+ // For all methods defined like <script type="dojo/method" event="foo">,
+ // add that method to prototype
+ dojo.forEach(methods, function(s){
+ var evt = s.getAttribute("event"),
+ func = dojo.parser._functionFromScript(s);
+ propList[evt] = func;
+ });
// map array of strings like [ "dijit.form.Button" ] to array of mixin objects
// (note that dojo.map(this.mixins, dojo.getObject) doesn't work because it passes
// a bogus third argument to getObject(), confusing it)
this.mixins = this.mixins.length ?
dojo.map(this.mixins, function(name){ return dojo.getObject(name); } ) :
[ dijit._Widget, dijit._Templated ];
- if(preambles.length){
- // we only support one preamble. So be it.
- propList.preamble = dojo.parser._functionFromScript(preambles[0]);
- }
-
- var parsedScripts = dojo.map(scripts, function(s){
- var evt = s.getAttribute("event")||"postscript";
- return {
- event: evt,
- func: dojo.parser._functionFromScript(s)
- };
- });
-
- // do the connects for each <script type="dojo/connect" event="foo"> block and make
- // all <script type="dojo/method"> tags execute right after construction
- this.mixins.push(function(){
- dojo.forEach(parsedScripts, function(s){
- dojo.connect(this, s.event, this, s.func);
- }, this);
- });
-
propList.widgetsInTemplate = true;
propList._skipNodeCache = true;
- propList.templateString = "<"+srcType+" class='"+src.className+"' dojoAttachPoint='"+(src.getAttribute("dojoAttachPoint")||'')+"' dojoAttachEvent='"+(src.getAttribute("dojoAttachEvent")||'')+"' >"+src.innerHTML.replace(/\%7B/g,"{").replace(/\%7D/g,"}")+"</"+srcType+">";
- // console.debug(propList.templateString);
+ propList.templateString = "<"+srcType+" class='"+src.className+"' dojoAttachPoint='"+(src.getAttribute("dojoAttachPoint") || '')+"' dojoAttachEvent='"+(src.getAttribute("dojoAttachEvent") || '')+"' >"+src.innerHTML.replace(/\%7B/g,"{").replace(/\%7D/g,"}")+"</"+srcType+">";
// strip things so we don't create stuff under us in the initial setup phase
dojo.query("[dojoType]", src).forEach(function(node){
node.removeAttribute("dojoType");
});
// create the new widget class
- dojo.declare(
+ var wc = dojo.declare(
this.widgetClass,
this.mixins,
propList
);
+
+ // Handle <script> blocks of form:
+ // <script type="dojo/connect" event="foo">
+ // and
+ // <script type="dojo/method">
+ // (Note that the second one is just shorthand for a dojo/connect to postscript)
+ // Since this is a connect in the declaration, we are actually connection to the method
+ // in the _prototype_.
+ var connects = regularConnects.concat(postscriptConnects);
+ dojo.forEach(connects, function(s){
+ var evt = s.getAttribute("event") || "postscript",
+ func = dojo.parser._functionFromScript(s);
+ dojo.connect(wc.prototype, evt, func);
+ });
}
}
);
}
if(!dojo._hasResource["dojo.dnd.common"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo.dnd.common"] = true;
dojo.provide("dojo.dnd.common");
-dojo.dnd._copyKey = navigator.appVersion.indexOf("Macintosh") < 0 ? "ctrlKey" : "metaKey";
-
-dojo.dnd.getCopyKeyState = function(e) {
- // summary: abstracts away the difference between selection on Mac and PC,
- // and returns the state of the "copy" key to be pressed.
- // e: Event: mouse event
- return e[dojo.dnd._copyKey]; // Boolean
-};
+dojo.dnd.getCopyKeyState = dojo.isCopyKeyPressed;
dojo.dnd._uniqueId = 0;
dojo.dnd.getUniqueId = function(){
- // summary: returns a unique string for use with any DOM element
+ // summary:
+ // returns a unique string for use with any DOM element
var id;
do{
- id = "dojoUnique" + (++dojo.dnd._uniqueId);
+ id = dojo._scopeName + "Unique" + (++dojo.dnd._uniqueId);
}while(dojo.byId(id));
return id;
};
dojo.dnd._empty = {};
dojo.dnd.isFormElement = function(/*Event*/ e){
- // summary: returns true, if user clicked on a form element
+ // summary:
+ // returns true if user clicked on a form element
var t = e.target;
if(t.nodeType == 3 /*TEXT_NODE*/){
t = t.parentNode;
}
return " button textarea input select option ".indexOf(" " + t.tagName.toLowerCase() + " ") >= 0; // Boolean
};
}
if(!dojo._hasResource["dojo.dnd.autoscroll"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo.dnd.autoscroll"] = true;
dojo.provide("dojo.dnd.autoscroll");
dojo.dnd.getViewport = function(){
- // summary: returns a viewport size (visible part of the window)
+ // summary:
+ // Returns a viewport size (visible part of the window)
+
+ // TODO: remove this when getViewport() moved to dojo core, see #7028
// FIXME: need more docs!!
var d = dojo.doc, dd = d.documentElement, w = window, b = dojo.body();
if(dojo.isMozilla){
return {w: dd.clientWidth, h: w.innerHeight}; // Object
}else if(!dojo.isOpera && w.innerWidth){
return {w: w.innerWidth, h: w.innerHeight}; // Object
}else if (!dojo.isOpera && dd && dd.clientWidth){
return {w: dd.clientWidth, h: dd.clientHeight}; // Object
}else if (b.clientWidth){
return {w: b.clientWidth, h: b.clientHeight}; // Object
}
return null; // Object
};
dojo.dnd.V_TRIGGER_AUTOSCROLL = 32;
dojo.dnd.H_TRIGGER_AUTOSCROLL = 32;
dojo.dnd.V_AUTOSCROLL_VALUE = 16;
dojo.dnd.H_AUTOSCROLL_VALUE = 16;
dojo.dnd.autoScroll = function(e){
// summary:
// a handler for onmousemove event, which scrolls the window, if
// necesary
- // e: Event:
+ // e: Event
// onmousemove event
// FIXME: needs more docs!
var v = dojo.dnd.getViewport(), dx = 0, dy = 0;
if(e.clientX < dojo.dnd.H_TRIGGER_AUTOSCROLL){
dx = -dojo.dnd.H_AUTOSCROLL_VALUE;
}else if(e.clientX > v.w - dojo.dnd.H_TRIGGER_AUTOSCROLL){
dx = dojo.dnd.H_AUTOSCROLL_VALUE;
}
if(e.clientY < dojo.dnd.V_TRIGGER_AUTOSCROLL){
dy = -dojo.dnd.V_AUTOSCROLL_VALUE;
}else if(e.clientY > v.h - dojo.dnd.V_TRIGGER_AUTOSCROLL){
dy = dojo.dnd.V_AUTOSCROLL_VALUE;
}
window.scrollBy(dx, dy);
};
dojo.dnd._validNodes = {"div": 1, "p": 1, "td": 1};
dojo.dnd._validOverflow = {"auto": 1, "scroll": 1};
dojo.dnd.autoScrollNodes = function(e){
// summary:
// a handler for onmousemove event, which scrolls the first avaialble
// Dom element, it falls back to dojo.dnd.autoScroll()
- // e: Event:
+ // e: Event
// onmousemove event
// FIXME: needs more docs!
for(var n = e.target; n;){
if(n.nodeType == 1 && (n.tagName.toLowerCase() in dojo.dnd._validNodes)){
var s = dojo.getComputedStyle(n);
if(s.overflow.toLowerCase() in dojo.dnd._validOverflow){
- var b = dojo._getContentBox(n, s), t = dojo._abs(n, true);
- // console.debug(b.l, b.t, t.x, t.y, n.scrollLeft, n.scrollTop);
- b.l += t.x + n.scrollLeft;
- b.t += t.y + n.scrollTop;
+ var b = dojo._getContentBox(n, s), t = dojo.position(n, true);
+ //console.log(b.l, b.t, t.x, t.y, n.scrollLeft, n.scrollTop);
var w = Math.min(dojo.dnd.H_TRIGGER_AUTOSCROLL, b.w / 2),
h = Math.min(dojo.dnd.V_TRIGGER_AUTOSCROLL, b.h / 2),
- rx = e.pageX - b.l, ry = e.pageY - b.t, dx = 0, dy = 0;
+ rx = e.pageX - t.x, ry = e.pageY - t.y, dx = 0, dy = 0;
+ if(dojo.isWebKit || dojo.isOpera){
+ // FIXME: this code should not be here, it should be taken into account
+ // either by the event fixing code, or the dojo.position()
+ // FIXME: this code doesn't work on Opera 9.5 Beta
+ rx += dojo.body().scrollLeft, ry += dojo.body().scrollTop;
+ }
if(rx > 0 && rx < b.w){
if(rx < w){
- dx = -dojo.dnd.H_AUTOSCROLL_VALUE;
+ dx = -w;
}else if(rx > b.w - w){
- dx = dojo.dnd.H_AUTOSCROLL_VALUE;
- }
- }
- //console.debug("ry =", ry, "b.h =", b.h, "h =", h);
+ dx = w;
+ }
+ }
+ //console.log("ry =", ry, "b.h =", b.h, "h =", h);
if(ry > 0 && ry < b.h){
if(ry < h){
- dy = -dojo.dnd.V_AUTOSCROLL_VALUE;
+ dy = -h;
}else if(ry > b.h - h){
- dy = dojo.dnd.V_AUTOSCROLL_VALUE;
+ dy = h;
}
}
var oldLeft = n.scrollLeft, oldTop = n.scrollTop;
n.scrollLeft = n.scrollLeft + dx;
n.scrollTop = n.scrollTop + dy;
- // if(dx || dy){ console.debug(oldLeft + ", " + oldTop + "\n" + dx + ", " + dy + "\n" + n.scrollLeft + ", " + n.scrollTop); }
if(oldLeft != n.scrollLeft || oldTop != n.scrollTop){ return; }
}
}
try{
n = n.parentNode;
}catch(x){
n = null;
}
}
dojo.dnd.autoScroll(e);
};
}
if(!dojo._hasResource["dojo.dnd.Mover"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo.dnd.Mover"] = true;
dojo.provide("dojo.dnd.Mover");
dojo.declare("dojo.dnd.Mover", null, {
constructor: function(node, e, host){
- // summary: an object, which makes a node follow the mouse,
- // used as a default mover, and as a base class for custom movers
- // node: Node: a node (or node's id) to be moved
- // e: Event: a mouse event, which started the move;
- // only pageX and pageY properties are used
- // host: Object?: object which implements the functionality of the move,
- // and defines proper events (onMoveStart and onMoveStop)
+ // summary:
+ // an object, which makes a node follow the mouse.
+ // Used as a default mover, and as a base class for custom movers.
+ // node: Node
+ // a node (or node's id) to be moved
+ // e: Event
+ // a mouse event, which started the move;
+ // only pageX and pageY properties are used
+ // host: Object?
+ // object which implements the functionality of the move,
+ // and defines proper events (onMoveStart and onMoveStop)
this.node = dojo.byId(node);
this.marginBox = {l: e.pageX, t: e.pageY};
this.mouseButton = e.button;
var h = this.host = host, d = node.ownerDocument,
firstEvent = dojo.connect(d, "onmousemove", this, "onFirstMove");
this.events = [
dojo.connect(d, "onmousemove", this, "onMouseMove"),
dojo.connect(d, "onmouseup", this, "onMouseUp"),
// cancel text selection and text dragging
- dojo.connect(d, "ondragstart", dojo, "stopEvent"),
- dojo.connect(d, "onselectstart", dojo, "stopEvent"),
+ dojo.connect(d, "ondragstart", dojo.stopEvent),
+ dojo.connect(d.body, "onselectstart", dojo.stopEvent),
firstEvent
];
// notify that the move has started
if(h && h.onMoveStart){
h.onMoveStart(this);
}
},
// mouse event processors
onMouseMove: function(e){
- // summary: event processor for onmousemove
- // e: Event: mouse event
+ // summary:
+ // event processor for onmousemove
+ // e: Event
+ // mouse event
dojo.dnd.autoScroll(e);
var m = this.marginBox;
this.host.onMove(this, {l: m.l + e.pageX, t: m.t + e.pageY});
+ dojo.stopEvent(e);
},
onMouseUp: function(e){
- if(this.mouseButton == e.button){
+ if(dojo.isWebKit && dojo.isMac && this.mouseButton == 2 ?
+ e.button == 0 : this.mouseButton == e.button){
this.destroy();
}
+ dojo.stopEvent(e);
},
// utilities
onFirstMove: function(){
- // summary: makes the node absolute; it is meant to be called only once
- this.node.style.position = "absolute"; // enforcing the absolute mode
- var m = dojo.marginBox(this.node);
- m.l -= this.marginBox.l;
- m.t -= this.marginBox.t;
- this.marginBox = m;
- this.host.onFirstMove(this);
+ // summary:
+ // makes the node absolute; it is meant to be called only once.
+ // relative and absolutely positioned nodes are assumed to use pixel units
+ var s = this.node.style, l, t, h = this.host;
+ switch(s.position){
+ case "relative":
+ case "absolute":
+ // assume that left and top values are in pixels already
+ l = Math.round(parseFloat(s.left));
+ t = Math.round(parseFloat(s.top));
+ break;
+ default:
+ s.position = "absolute"; // enforcing the absolute mode
+ var m = dojo.marginBox(this.node);
+ // event.pageX/pageY (which we used to generate the initial
+ // margin box) includes padding and margin set on the body.
+ // However, setting the node's position to absolute and then
+ // doing dojo.marginBox on it *doesn't* take that additional
+ // space into account - so we need to subtract the combined
+ // padding and margin. We use getComputedStyle and
+ // _getMarginBox/_getContentBox to avoid the extra lookup of
+ // the computed style.
+ var b = dojo.doc.body;
+ var bs = dojo.getComputedStyle(b);
+ var bm = dojo._getMarginBox(b, bs);
+ var bc = dojo._getContentBox(b, bs);
+ l = m.l - (bc.l - bm.l);
+ t = m.t - (bc.t - bm.t);
+ break;
+ }
+ this.marginBox.l = l - this.marginBox.l;
+ this.marginBox.t = t - this.marginBox.t;
+ if(h && h.onFirstMove){
+ h.onFirstMove(this);
+ }
dojo.disconnect(this.events.pop());
},
destroy: function(){
- // summary: stops the move, deletes all references, so the object can be garbage-collected
+ // summary:
+ // stops the move, deletes all references, so the object can be garbage-collected
dojo.forEach(this.events, dojo.disconnect);
// undo global settings
var h = this.host;
if(h && h.onMoveStop){
h.onMoveStop(this);
}
// destroy objects
- this.events = this.node = null;
+ this.events = this.node = this.host = null;
}
});
}
if(!dojo._hasResource["dojo.dnd.Moveable"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo.dnd.Moveable"] = true;
dojo.provide("dojo.dnd.Moveable");
+/*=====
+dojo.declare("dojo.dnd.__MoveableArgs", [], {
+ // handle: Node||String
+ // A node (or node's id), which is used as a mouse handle.
+ // If omitted, the node itself is used as a handle.
+ handle: null,
+
+ // delay: Number
+ // delay move by this number of pixels
+ delay: 0,
+
+ // skip: Boolean
+ // skip move of form elements
+ skip: false,
+
+ // mover: Object
+ // a constructor of custom Mover
+ mover: dojo.dnd.Mover
+});
+=====*/
+
dojo.declare("dojo.dnd.Moveable", null, {
// object attributes (for markup)
handle: "",
delay: 0,
skip: false,
constructor: function(node, params){
- // summary: an object, which makes a node moveable
- // node: Node: a node (or node's id) to be moved
- // params: Object: an optional object with additional parameters;
- // following parameters are recognized:
- // handle: Node: a node (or node's id), which is used as a mouse handle
- // if omitted, the node itself is used as a handle
- // delay: Number: delay move by this number of pixels
- // skip: Boolean: skip move of form elements
- // mover: Object: a constructor of custom Mover
+ // summary:
+ // an object, which makes a node moveable
+ // node: Node
+ // a node (or node's id) to be moved
+ // params: dojo.dnd.__MoveableArgs?
+ // optional parameters
this.node = dojo.byId(node);
if(!params){ params = {}; }
this.handle = params.handle ? dojo.byId(params.handle) : null;
if(!this.handle){ this.handle = this.node; }
this.delay = params.delay > 0 ? params.delay : 0;
this.skip = params.skip;
this.mover = params.mover ? params.mover : dojo.dnd.Mover;
this.events = [
dojo.connect(this.handle, "onmousedown", this, "onMouseDown"),
// cancel text selection and text dragging
dojo.connect(this.handle, "ondragstart", this, "onSelectStart"),
dojo.connect(this.handle, "onselectstart", this, "onSelectStart")
];
},
// markup methods
markupFactory: function(params, node){
return new dojo.dnd.Moveable(node, params);
},
// methods
destroy: function(){
- // summary: stops watching for possible move, deletes all references, so the object can be garbage-collected
+ // summary:
+ // stops watching for possible move, deletes all references, so the object can be garbage-collected
dojo.forEach(this.events, dojo.disconnect);
this.events = this.node = this.handle = null;
},
// mouse event processors
onMouseDown: function(e){
- // summary: event processor for onmousedown, creates a Mover for the node
- // e: Event: mouse event
+ // summary:
+ // event processor for onmousedown, creates a Mover for the node
+ // e: Event
+ // mouse event
if(this.skip && dojo.dnd.isFormElement(e)){ return; }
if(this.delay){
- this.events.push(dojo.connect(this.handle, "onmousemove", this, "onMouseMove"));
- this.events.push(dojo.connect(this.handle, "onmouseup", this, "onMouseUp"));
+ this.events.push(
+ dojo.connect(this.handle, "onmousemove", this, "onMouseMove"),
+ dojo.connect(this.handle, "onmouseup", this, "onMouseUp")
+ );
this._lastX = e.pageX;
this._lastY = e.pageY;
}else{
- new this.mover(this.node, e, this);
+ this.onDragDetected(e);
}
dojo.stopEvent(e);
},
onMouseMove: function(e){
- // summary: event processor for onmousemove, used only for delayed drags
- // e: Event: mouse event
+ // summary:
+ // event processor for onmousemove, used only for delayed drags
+ // e: Event
+ // mouse event
if(Math.abs(e.pageX - this._lastX) > this.delay || Math.abs(e.pageY - this._lastY) > this.delay){
this.onMouseUp(e);
- new this.mover(this.node, e, this);
+ this.onDragDetected(e);
}
dojo.stopEvent(e);
},
onMouseUp: function(e){
- // summary: event processor for onmouseup, used only for delayed delayed drags
- // e: Event: mouse event
- dojo.disconnect(this.events.pop());
- dojo.disconnect(this.events.pop());
+ // summary:
+ // event processor for onmouseup, used only for delayed drags
+ // e: Event
+ // mouse event
+ for(var i = 0; i < 2; ++i){
+ dojo.disconnect(this.events.pop());
+ }
+ dojo.stopEvent(e);
},
onSelectStart: function(e){
- // summary: event processor for onselectevent and ondragevent
- // e: Event: mouse event
+ // summary:
+ // event processor for onselectevent and ondragevent
+ // e: Event
+ // mouse event
if(!this.skip || !dojo.dnd.isFormElement(e)){
dojo.stopEvent(e);
}
},
// local events
+ onDragDetected: function(/* Event */ e){
+ // summary:
+ // called when the drag is detected;
+ // responsible for creation of the mover
+ new this.mover(this.node, e, this);
+ },
onMoveStart: function(/* dojo.dnd.Mover */ mover){
- // summary: called before every move operation
+ // summary:
+ // called before every move operation
dojo.publish("/dnd/move/start", [mover]);
dojo.addClass(dojo.body(), "dojoMove");
dojo.addClass(this.node, "dojoMoveItem");
},
onMoveStop: function(/* dojo.dnd.Mover */ mover){
- // summary: called after every move operation
+ // summary:
+ // called after every move operation
dojo.publish("/dnd/move/stop", [mover]);
dojo.removeClass(dojo.body(), "dojoMove");
dojo.removeClass(this.node, "dojoMoveItem");
},
onFirstMove: function(/* dojo.dnd.Mover */ mover){
- // summary: called during the very first move notification,
- // can be used to initialize coordinates, can be overwritten.
+ // summary:
+ // called during the very first move notification;
+ // can be used to initialize coordinates, can be overwritten.
// default implementation does nothing
},
onMove: function(/* dojo.dnd.Mover */ mover, /* Object */ leftTop){
- // summary: called during every move notification,
- // should actually move the node, can be overwritten.
+ // summary:
+ // called during every move notification;
+ // should actually move the node; can be overwritten.
this.onMoving(mover, leftTop);
- dojo.marginBox(mover.node, leftTop);
+ var s = mover.node.style;
+ s.left = leftTop.l + "px";
+ s.top = leftTop.t + "px";
this.onMoved(mover, leftTop);
},
onMoving: function(/* dojo.dnd.Mover */ mover, /* Object */ leftTop){
- // summary: called before every incremental move,
- // can be overwritten.
+ // summary:
+ // called before every incremental move; can be overwritten.
// default implementation does nothing
},
onMoved: function(/* dojo.dnd.Mover */ mover, /* Object */ leftTop){
- // summary: called after every incremental move,
- // can be overwritten.
+ // summary:
+ // called after every incremental move; can be overwritten.
// default implementation does nothing
}
});
}
if(!dojo._hasResource["dojo.dnd.move"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo.dnd.move"] = true;
dojo.provide("dojo.dnd.move");
+/*=====
+dojo.declare("dojo.dnd.move.__constrainedMoveableArgs", [dojo.dnd.__MoveableArgs], {
+ // constraints: Function
+ // Calculates a constraint box.
+ // It is called in a context of the moveable object.
+ constraints: function(){},
+
+ // within: Boolean
+ // restrict move within boundaries.
+ within: false
+});
+=====*/
+
dojo.declare("dojo.dnd.move.constrainedMoveable", dojo.dnd.Moveable, {
// object attributes (for markup)
constraints: function(){},
within: false,
// markup methods
markupFactory: function(params, node){
return new dojo.dnd.move.constrainedMoveable(node, params);
},
constructor: function(node, params){
- // summary: an object, which makes a node moveable
- // node: Node: a node (or node's id) to be moved
- // params: Object: an optional object with additional parameters;
- // following parameters are recognized:
- // constraints: Function: a function, which calculates a constraint box,
- // it is called in a context of the moveable object.
- // within: Boolean: restrict move within boundaries.
- // the rest is passed to the base class
+ // summary:
+ // an object that makes a node moveable
+ // node: Node
+ // a node (or node's id) to be moved
+ // params: dojo.dnd.move.__constrainedMoveableArgs?
+ // an optional object with additional parameters;
+ // the rest is passed to the base class
if(!params){ params = {}; }
this.constraints = params.constraints;
this.within = params.within;
},
onFirstMove: function(/* dojo.dnd.Mover */ mover){
- // summary: called during the very first move notification,
- // can be used to initialize coordinates, can be overwritten.
- var c = this.constraintBox = this.constraints.call(this, mover), m = mover.marginBox;
- c.r = c.l + c.w - (this.within ? m.w : 0);
- c.b = c.t + c.h - (this.within ? m.h : 0);
+ // summary:
+ // called during the very first move notification;
+ // can be used to initialize coordinates, can be overwritten.
+ var c = this.constraintBox = this.constraints.call(this, mover);
+ c.r = c.l + c.w;
+ c.b = c.t + c.h;
+ if(this.within){
+ var mb = dojo.marginBox(mover.node);
+ c.r -= mb.w;
+ c.b -= mb.h;
+ }
},
onMove: function(/* dojo.dnd.Mover */ mover, /* Object */ leftTop){
- // summary: called during every move notification,
- // should actually move the node, can be overwritten.
- var c = this.constraintBox;
- leftTop.l = leftTop.l < c.l ? c.l : c.r < leftTop.l ? c.r : leftTop.l;
- leftTop.t = leftTop.t < c.t ? c.t : c.b < leftTop.t ? c.b : leftTop.t;
- dojo.marginBox(mover.node, leftTop);
- }
-});
+ // summary:
+ // called during every move notification;
+ // should actually move the node; can be overwritten.
+ var c = this.constraintBox, s = mover.node.style;
+ s.left = (leftTop.l < c.l ? c.l : c.r < leftTop.l ? c.r : leftTop.l) + "px";
+ s.top = (leftTop.t < c.t ? c.t : c.b < leftTop.t ? c.b : leftTop.t) + "px";
+ }
+});
+
+/*=====
+dojo.declare("dojo.dnd.move.__boxConstrainedMoveableArgs", [dojo.dnd.move.__constrainedMoveableArgs], {
+ // box: Object
+ // a constraint box
+ box: {}
+});
+=====*/
dojo.declare("dojo.dnd.move.boxConstrainedMoveable", dojo.dnd.move.constrainedMoveable, {
- // object attributes (for markup)
+ // box:
+ // object attributes (for markup)
box: {},
// markup methods
markupFactory: function(params, node){
return new dojo.dnd.move.boxConstrainedMoveable(node, params);
},
constructor: function(node, params){
- // summary: an object, which makes a node moveable
- // node: Node: a node (or node's id) to be moved
- // params: Object: an optional object with additional parameters;
- // following parameters are recognized:
- // box: Object: a constraint box
- // the rest is passed to the base class
+ // summary:
+ // an object, which makes a node moveable
+ // node: Node
+ // a node (or node's id) to be moved
+ // params: dojo.dnd.move.__boxConstrainedMoveableArgs?
+ // an optional object with parameters
var box = params && params.box;
this.constraints = function(){ return box; };
}
});
+/*=====
+dojo.declare("dojo.dnd.move.__parentConstrainedMoveableArgs", [dojo.dnd.move.__constrainedMoveableArgs], {
+ // area: String
+ // A parent's area to restrict the move.
+ // Can be "margin", "border", "padding", or "content".
+ area: ""
+});
+=====*/
+
dojo.declare("dojo.dnd.move.parentConstrainedMoveable", dojo.dnd.move.constrainedMoveable, {
- // object attributes (for markup)
+ // area:
+ // object attributes (for markup)
area: "content",
// markup methods
markupFactory: function(params, node){
return new dojo.dnd.move.parentConstrainedMoveable(node, params);
},
constructor: function(node, params){
- // summary: an object, which makes a node moveable
- // node: Node: a node (or node's id) to be moved
- // params: Object: an optional object with additional parameters;
- // following parameters are recognized:
- // area: String: a parent's area to restrict the move,
- // can be "margin", "border", "padding", or "content".
- // the rest is passed to the base class
+ // summary:
+ // an object, which makes a node moveable
+ // node: Node
+ // a node (or node's id) to be moved
+ // params: dojo.dnd.move.__parentConstrainedMoveableArgs?
+ // an optional object with parameters
var area = params && params.area;
this.constraints = function(){
var n = this.node.parentNode,
s = dojo.getComputedStyle(n),
mb = dojo._getMarginBox(n, s);
if(area == "margin"){
return mb; // Object
}
var t = dojo._getMarginExtents(n, s);
mb.l += t.l, mb.t += t.t, mb.w -= t.w, mb.h -= t.h;
if(area == "border"){
return mb; // Object
}
t = dojo._getBorderExtents(n, s);
mb.l += t.l, mb.t += t.t, mb.w -= t.w, mb.h -= t.h;
if(area == "padding"){
return mb; // Object
}
t = dojo._getPadExtents(n, s);
mb.l += t.l, mb.t += t.t, mb.w -= t.w, mb.h -= t.h;
return mb; // Object
};
}
});
// WARNING: below are obsolete objects, instead of custom movers use custom moveables (above)
dojo.dnd.move.constrainedMover = function(fun, within){
- // summary: returns a constrained version of dojo.dnd.Mover
- // description: this function produces n object, which will put a constraint on
- // the margin box of dragged object in absolute coordinates
- // fun: Function: called on drag, and returns a constraint box
- // within: Boolean: if true, constraints the whole dragged object withtin the rectangle,
- // otherwise the constraint is applied to the left-top corner
+ // summary:
+ // returns a constrained version of dojo.dnd.Mover
+ // description:
+ // this function produces n object, which will put a constraint on
+ // the margin box of dragged object in absolute coordinates
+ // fun: Function
+ // called on drag, and returns a constraint box
+ // within: Boolean
+ // if true, constraints the whole dragged object withtin the rectangle,
+ // otherwise the constraint is applied to the left-top corner
+
+ dojo.deprecated("dojo.dnd.move.constrainedMover, use dojo.dnd.move.constrainedMoveable instead");
var mover = function(node, e, notifier){
dojo.dnd.Mover.call(this, node, e, notifier);
};
dojo.extend(mover, dojo.dnd.Mover.prototype);
dojo.extend(mover, {
onMouseMove: function(e){
// summary: event processor for onmousemove
// e: Event: mouse event
dojo.dnd.autoScroll(e);
var m = this.marginBox, c = this.constraintBox,
l = m.l + e.pageX, t = m.t + e.pageY;
l = l < c.l ? c.l : c.r < l ? c.r : l;
t = t < c.t ? c.t : c.b < t ? c.b : t;
this.host.onMove(this, {l: l, t: t});
},
onFirstMove: function(){
// summary: called once to initialize things; it is meant to be called only once
dojo.dnd.Mover.prototype.onFirstMove.call(this);
- var c = this.constraintBox = fun.call(this), m = this.marginBox;
- c.r = c.l + c.w - (within ? m.w : 0);
- c.b = c.t + c.h - (within ? m.h : 0);
+ var c = this.constraintBox = fun.call(this);
+ c.r = c.l + c.w;
+ c.b = c.t + c.h;
+ if(within){
+ var mb = dojo.marginBox(this.node);
+ c.r -= mb.w;
+ c.b -= mb.h;
+ }
}
});
return mover; // Object
};
dojo.dnd.move.boxConstrainedMover = function(box, within){
- // summary: a specialization of dojo.dnd.constrainedMover, which constrains to the specified box
- // box: Object: a constraint box (l, t, w, h)
- // within: Boolean: if true, constraints the whole dragged object withtin the rectangle,
- // otherwise the constraint is applied to the left-top corner
+ // summary:
+ // a specialization of dojo.dnd.constrainedMover, which constrains to the specified box
+ // box: Object
+ // a constraint box (l, t, w, h)
+ // within: Boolean
+ // if true, constraints the whole dragged object withtin the rectangle,
+ // otherwise the constraint is applied to the left-top corner
+
+ dojo.deprecated("dojo.dnd.move.boxConstrainedMover, use dojo.dnd.move.boxConstrainedMoveable instead");
return dojo.dnd.move.constrainedMover(function(){ return box; }, within); // Object
};
dojo.dnd.move.parentConstrainedMover = function(area, within){
- // summary: a specialization of dojo.dnd.constrainedMover, which constrains to the parent node
- // area: String: "margin" to constrain within the parent's margin box, "border" for the border box,
- // "padding" for the padding box, and "content" for the content box; "content" is the default value.
- // within: Boolean: if true, constraints the whole dragged object withtin the rectangle,
- // otherwise the constraint is applied to the left-top corner
+ // summary:
+ // a specialization of dojo.dnd.constrainedMover, which constrains to the parent node
+ // area: String
+ // "margin" to constrain within the parent's margin box, "border" for the border box,
+ // "padding" for the padding box, and "content" for the content box; "content" is the default value.
+ // within: Boolean
+ // if true, constraints the whole dragged object within the rectangle,
+ // otherwise the constraint is applied to the left-top corner
+
+ dojo.deprecated("dojo.dnd.move.parentConstrainedMover, use dojo.dnd.move.parentConstrainedMoveable instead");
var fun = function(){
var n = this.node.parentNode,
s = dojo.getComputedStyle(n),
mb = dojo._getMarginBox(n, s);
if(area == "margin"){
return mb; // Object
}
var t = dojo._getMarginExtents(n, s);
mb.l += t.l, mb.t += t.t, mb.w -= t.w, mb.h -= t.h;
if(area == "border"){
return mb; // Object
}
t = dojo._getBorderExtents(n, s);
mb.l += t.l, mb.t += t.t, mb.w -= t.w, mb.h -= t.h;
if(area == "padding"){
return mb; // Object
}
t = dojo._getPadExtents(n, s);
mb.l += t.l, mb.t += t.t, mb.w -= t.w, mb.h -= t.h;
return mb; // Object
};
return dojo.dnd.move.constrainedMover(fun, within); // Object
};
// patching functions one level up for compatibility
dojo.dnd.constrainedMover = dojo.dnd.move.constrainedMover;
dojo.dnd.boxConstrainedMover = dojo.dnd.move.boxConstrainedMover;
dojo.dnd.parentConstrainedMover = dojo.dnd.move.parentConstrainedMover;
}
-if(!dojo._hasResource["dojo.fx"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.fx"] = true;
-dojo.provide("dojo.fx");
-dojo.provide("dojo.fx.Toggler");
-
-dojo.fx.chain = function(/*dojo._Animation[]*/ animations){
- // summary: Chain a list of dojo._Animation s to run in sequence
- // example:
- // | dojo.fx.chain([
- // | dojo.fadeIn({ node:node }),
- // | dojo.fadeOut({ node:otherNode })
- // | ]).play();
- //
- var first = animations.shift();
- var previous = first;
- dojo.forEach(animations, function(current){
- dojo.connect(previous, "onEnd", current, "play");
- previous = current;
+if(!dojo._hasResource["dojo.dnd.TimedMoveable"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojo.dnd.TimedMoveable"] = true;
+dojo.provide("dojo.dnd.TimedMoveable");
+
+
+
+/*=====
+dojo.declare("dojo.dnd.__TimedMoveableArgs", [dojo.dnd.__MoveableArgs], {
+ // timeout: Number
+ // delay move by this number of ms,
+ // accumulating position changes during the timeout
+ timeout: 0
+});
+=====*/
+
+(function(){
+ // precalculate long expressions
+ var oldOnMove = dojo.dnd.Moveable.prototype.onMove;
+
+ dojo.declare("dojo.dnd.TimedMoveable", dojo.dnd.Moveable, {
+ // summary:
+ // A specialized version of Moveable to support an FPS throttling.
+ // This class puts an upper restriction on FPS, which may reduce
+ // the CPU load. The additional parameter "timeout" regulates
+ // the delay before actually moving the moveable object.
+
+ // object attributes (for markup)
+ timeout: 40, // in ms, 40ms corresponds to 25 fps
+
+ constructor: function(node, params){
+ // summary:
+ // an object that makes a node moveable with a timer
+ // node: Node||String
+ // a node (or node's id) to be moved
+ // params: dojo.dnd.__TimedMoveableArgs
+ // object with additional parameters.
+
+ // sanitize parameters
+ if(!params){ params = {}; }
+ if(params.timeout && typeof params.timeout == "number" && params.timeout >= 0){
+ this.timeout = params.timeout;
+ }
+ },
+
+ // markup methods
+ markupFactory: function(params, node){
+ return new dojo.dnd.TimedMoveable(node, params);
+ },
+
+ onMoveStop: function(/* dojo.dnd.Mover */ mover){
+ if(mover._timer){
+ // stop timer
+ clearTimeout(mover._timer)
+ // reflect the last received position
+ oldOnMove.call(this, mover, mover._leftTop)
+ }
+ dojo.dnd.Moveable.prototype.onMoveStop.apply(this, arguments);
+ },
+ onMove: function(/* dojo.dnd.Mover */ mover, /* Object */ leftTop){
+ mover._leftTop = leftTop;
+ if(!mover._timer){
+ var _t = this; // to avoid using dojo.hitch()
+ mover._timer = setTimeout(function(){
+ // we don't have any pending requests
+ mover._timer = null;
+ // reflect the last received position
+ oldOnMove.call(_t, mover, mover._leftTop);
+ }, this.timeout);
+ }
+ }
});
- return first; // dojo._Animation
-};
-
-dojo.fx.combine = function(/*dojo._Animation[]*/ animations){
- // summary: Combine a list of dojo._Animation s to run in parallel
- // example:
- // | dojo.fx.combine([
- // | dojo.fadeIn({ node:node }),
- // | dojo.fadeOut({ node:otherNode })
- // | ]).play();
- var ctr = new dojo._Animation({ curve: [0, 1] });
- if(!animations.length){ return ctr; }
- // animations.sort(function(a, b){ return a.duration-b.duration; });
- ctr.duration = animations[0].duration;
- dojo.forEach(animations, function(current){
- dojo.forEach([ "play", "pause", "stop" ],
- function(e){
- if(current[e]){
- dojo.connect(ctr, e, current, e);
- }
- }
- );
- });
- return ctr; // dojo._Animation
-};
+})();
+
+}
+
+if(!dojo._hasResource["dojo.fx.Toggler"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojo.fx.Toggler"] = true;
+dojo.provide("dojo.fx.Toggler");
dojo.declare("dojo.fx.Toggler", null, {
// summary:
+ // A simple `dojo.Animation` toggler API.
+ //
+ // description:
// class constructor for an animation toggler. It accepts a packed
// set of arguments about what type of animation to use in each
- // direction, duration, etc.
+ // direction, duration, etc. All available members are mixed into
+ // these animations from the constructor (for example, `node`,
+ // `showDuration`, `hideDuration`).
//
// example:
// | var t = new dojo.fx.Toggler({
// | node: "nodeId",
// | showDuration: 500,
// | // hideDuration will default to "200"
- // | showFunc: dojo.wipeIn,
+ // | showFunc: dojo.fx.wipeIn,
// | // hideFunc will default to "fadeOut"
// | });
// | t.show(100); // delay showing for 100ms
// | // ...time passes...
// | t.hide();
+ // node: DomNode
+ // the node to target for the showing and hiding animations
+ node: null,
+
+ // showFunc: Function
+ // The function that returns the `dojo.Animation` to show the node
+ showFunc: dojo.fadeIn,
+
+ // hideFunc: Function
+ // The function that returns the `dojo.Animation` to hide the node
+ hideFunc: dojo.fadeOut,
+
+ // showDuration:
+ // Time in milliseconds to run the show Animation
+ showDuration: 200,
+
+ // hideDuration:
+ // Time in milliseconds to run the hide Animation
+ hideDuration: 200,
+
// FIXME: need a policy for where the toggler should "be" the next
// time show/hide are called if we're stopped somewhere in the
// middle.
+ // FIXME: also would be nice to specify individual showArgs/hideArgs mixed into
+ // each animation individually.
+ // FIXME: also would be nice to have events from the animations exposed/bridged
+
+ /*=====
+ _showArgs: null,
+ _showAnim: null,
+
+ _hideArgs: null,
+ _hideAnim: null,
+
+ _isShowing: false,
+ _isHiding: false,
+ =====*/
constructor: function(args){
var _t = this;
dojo.mixin(_t, args);
_t.node = args.node;
_t._showArgs = dojo.mixin({}, args);
_t._showArgs.node = _t.node;
_t._showArgs.duration = _t.showDuration;
_t.showAnim = _t.showFunc(_t._showArgs);
_t._hideArgs = dojo.mixin({}, args);
_t._hideArgs.node = _t.node;
_t._hideArgs.duration = _t.hideDuration;
_t.hideAnim = _t.hideFunc(_t._hideArgs);
dojo.connect(_t.showAnim, "beforeBegin", dojo.hitch(_t.hideAnim, "stop", true));
dojo.connect(_t.hideAnim, "beforeBegin", dojo.hitch(_t.showAnim, "stop", true));
},
- // node: DomNode
- // the node to toggle
- node: null,
-
- // showFunc: Function
- // The function that returns the dojo._Animation to show the node
- showFunc: dojo.fadeIn,
-
- // hideFunc: Function
- // The function that returns the dojo._Animation to hide the node
- hideFunc: dojo.fadeOut,
-
- // showDuration:
- // Time in milliseconds to run the show Animation
- showDuration: 200,
-
- // hideDuration:
- // Time in milliseconds to run the hide Animation
- hideDuration: 200,
-
- /*=====
- _showArgs: null,
- _showAnim: null,
-
- _hideArgs: null,
- _hideAnim: null,
-
- _isShowing: false,
- _isHiding: false,
- =====*/
-
show: function(delay){
// summary: Toggle the node to showing
+ // delay: Integer?
+ // Ammount of time to stall playing the show animation
return this.showAnim.play(delay || 0);
},
hide: function(delay){
// summary: Toggle the node to hidden
+ // delay: Integer?
+ // Ammount of time to stall playing the hide animation
return this.hideAnim.play(delay || 0);
}
});
-dojo.fx.wipeIn = function(/*Object*/ args){
- // summary
- // Returns an animation that will expand the
- // node defined in 'args' object from it's current height to
- // it's natural height (with no scrollbar).
- // Node must have no margin/border/padding.
- args.node = dojo.byId(args.node);
- var node = args.node, s = node.style;
-
- var anim = dojo.animateProperty(dojo.mixin({
- properties: {
- height: {
- // wrapped in functions so we wait till the last second to query (in case value has changed)
- start: function(){
- // start at current [computed] height, but use 1px rather than 0
- // because 0 causes IE to display the whole panel
- s.overflow="hidden";
- if(s.visibility=="hidden"||s.display=="none"){
- s.height="1px";
- s.display="";
- s.visibility="";
- return 1;
- }else{
- var height = dojo.style(node, "height");
- return Math.max(height, 1);
- }
- },
- end: function(){
- return node.scrollHeight;
- }
- }
- }
- }, args));
-
- dojo.connect(anim, "onEnd", function(){
- s.height = "auto";
- });
-
- return anim; // dojo._Animation
-}
-
-dojo.fx.wipeOut = function(/*Object*/ args){
- // summary
- // Returns an animation that will shrink node defined in "args"
- // from it's current height to 1px, and then hide it.
- var node = args.node = dojo.byId(args.node);
- var s = node.style;
-
- var anim = dojo.animateProperty(dojo.mixin({
- properties: {
- height: {
- end: 1 // 0 causes IE to display the whole panel
- }
- }
- }, args));
-
- dojo.connect(anim, "beforeBegin", function(){
- s.overflow = "hidden";
- s.display = "";
- });
- dojo.connect(anim, "onEnd", function(){
- s.height = "auto";
- s.display = "none";
- });
-
- return anim; // dojo._Animation
-}
-
-dojo.fx.slideTo = function(/*Object?*/ args){
- // summary
- // Returns an animation that will slide "node"
- // defined in args Object from its current position to
- // the position defined by (args.left, args.top).
- // example:
- // | dojo.fx.slideTo({ node: node, left:"40", top:"50", unit:"px" }).play()
-
- var node = (args.node = dojo.byId(args.node));
+}
+
+if(!dojo._hasResource["dojo.fx"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojo.fx"] = true;
+dojo.provide("dojo.fx");
+ // FIXME: remove this back-compat require in 2.0
+/*=====
+dojo.fx = {
+ // summary: Effects library on top of Base animations
+};
+=====*/
+(function(){
- var top = null;
- var left = null;
-
- var init = (function(n){
- return function(){
- var cs = dojo.getComputedStyle(n);
- var pos = cs.position;
- top = (pos == 'absolute' ? n.offsetTop : parseInt(cs.top) || 0);
- left = (pos == 'absolute' ? n.offsetLeft : parseInt(cs.left) || 0);
- if(pos != 'absolute' && pos != 'relative'){
- var ret = dojo.coords(n, true);
- top = ret.y;
- left = ret.x;
- n.style.position="absolute";
- n.style.top=top+"px";
- n.style.left=left+"px";
+ var d = dojo,
+ _baseObj = {
+ _fire: function(evt, args){
+ if(this[evt]){
+ this[evt].apply(this, args||[]);
+ }
+ return this;
}
};
- })(node);
- init();
-
- var anim = dojo.animateProperty(dojo.mixin({
- properties: {
- top: { end: args.top||0 },
- left: { end: args.left||0 }
- }
- }, args));
- dojo.connect(anim, "beforeBegin", anim, init);
-
- return anim; // dojo._Animation
-}
-
-}
-
-if(!dojo._hasResource["dijit.layout.ContentPane"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.layout.ContentPane"] = true;
-dojo.provide("dijit.layout.ContentPane");
-
-
-
-
-
-
-
-
-dojo.declare(
- "dijit.layout.ContentPane",
- dijit._Widget,
-{
- // summary:
- // A widget that acts as a Container for other widgets, and includes a ajax interface
- // description:
- // A widget that can be used as a standalone widget
- // or as a baseclass for other widgets
- // Handles replacement of document fragment using either external uri or javascript
- // generated markup or DOM content, instantiating widgets within that content.
- // Don't confuse it with an iframe, it only needs/wants document fragments.
- // It's useful as a child of LayoutContainer, SplitContainer, or TabContainer.
- // But note that those classes can contain any widget as a child.
- // example:
- // Some quick samples:
- // To change the innerHTML use .setContent('<b>new content</b>')
- //
- // Or you can send it a NodeList, .setContent(dojo.query('div [class=selected]', userSelection))
- // please note that the nodes in NodeList will copied, not moved
- //
- // To do a ajax update use .setHref('url')
- //
- // href: String
- // The href of the content that displays now.
- // Set this at construction if you want to load data externally when the
- // pane is shown. (Set preload=true to load it immediately.)
- // Changing href after creation doesn't have any effect; see setHref();
- href: "",
-
- // extractContent: Boolean
- // Extract visible content from inside of <body> .... </body>
- extractContent: false,
-
- // parseOnLoad: Boolean
- // parse content and create the widgets, if any
- parseOnLoad: true,
-
- // preventCache: Boolean
- // Cache content retreived externally
- preventCache: false,
-
- // preload: Boolean
- // Force load of data even if pane is hidden.
- preload: false,
-
- // refreshOnShow: Boolean
- // Refresh (re-download) content when pane goes from hidden to shown
- refreshOnShow: false,
-
- // loadingMessage: String
- // Message that shows while downloading
- loadingMessage: "<span class='dijitContentPaneLoading'>${loadingState}</span>",
-
- // errorMessage: String
- // Message that shows if an error occurs
- errorMessage: "<span class='dijitContentPaneError'>${errorState}</span>",
-
- // isLoaded: Boolean
- // Tells loading status see onLoad|onUnload for event hooks
- isLoaded: false,
-
- // class: String
- // Class name to apply to ContentPane dom nodes
- "class": "dijitContentPane",
-
- postCreate: function(){
- // remove the title attribute so it doesn't show up when i hover
- // over a node
- this.domNode.title = "";
-
- if(this.preload){
- this._loadCheck();
- }
-
- var messages = dojo.i18n.getLocalization("dijit", "loading", this.lang);
- this.loadingMessage = dojo.string.substitute(this.loadingMessage, messages);
- this.errorMessage = dojo.string.substitute(this.errorMessage, messages);
-
- // for programatically created ContentPane (with <span> tag), need to muck w/CSS
- // or it's as though overflow:visible is set
- dojo.addClass(this.domNode, this["class"]);
- },
-
- startup: function(){
- if(this._started){ return; }
- this._checkIfSingleChild();
- if(this._singleChild){
- this._singleChild.startup();
- }
- this._loadCheck();
- this._started = true;
- },
-
- _checkIfSingleChild: function(){
- // summary:
- // Test if we have exactly one widget as a child, and if so assume that we are a container for that widget,
- // and should propogate startup() and resize() calls to it.
- var childNodes = dojo.query(">", this.containerNode || this.domNode),
- childWidgets = childNodes.filter("[widgetId]");
-
- if(childNodes.length == 1 && childWidgets.length == 1){
- this.isContainer = true;
- this._singleChild = dijit.byNode(childWidgets[0]);
- }else{
- delete this.isContainer;
- delete this._singleChild;
- }
- },
-
- refresh: function(){
- // summary:
- // Force a refresh (re-download) of content, be sure to turn off cache
-
- // we return result of _prepareLoad here to avoid code dup. in dojox.layout.ContentPane
- return this._prepareLoad(true);
- },
-
- setHref: function(/*String|Uri*/ href){
- // summary:
- // Reset the (external defined) content of this pane and replace with new url
- // Note: It delays the download until widget is shown if preload is false
- // href:
- // url to the page you want to get, must be within the same domain as your mainpage
- this.href = href;
-
- // we return result of _prepareLoad here to avoid code dup. in dojox.layout.ContentPane
- return this._prepareLoad();
- },
-
- setContent: function(/*String|DomNode|Nodelist*/data){
- // summary:
- // Replaces old content with data content, include style classes from old content
- // data:
- // the new Content may be String, DomNode or NodeList
- //
- // if data is a NodeList (or an array of nodes) nodes are copied
- // so you can import nodes from another document implicitly
-
- // clear href so we cant run refresh and clear content
- // refresh should only work if we downloaded the content
- if(!this._isDownloaded){
- this.href = "";
- this._onUnloadHandler();
- }
-
- this._setContent(data || "");
-
- this._isDownloaded = false; // must be set after _setContent(..), pathadjust in dojox.layout.ContentPane
-
- if(this.parseOnLoad){
- this._createSubWidgets();
- }
-
- this._checkIfSingleChild();
- if(this._singleChild && this._singleChild.resize){
- this._singleChild.resize(this._contentBox);
- }
-
- this._onLoadHandler();
- },
-
- cancel: function(){
- // summary:
- // Cancels a inflight download of content
- if(this._xhrDfd && (this._xhrDfd.fired == -1)){
- this._xhrDfd.cancel();
- }
- delete this._xhrDfd; // garbage collect
- },
-
- destroy: function(){
- // if we have multiple controllers destroying us, bail after the first
- if(this._beingDestroyed){
- return;
- }
- // make sure we call onUnload
- this._onUnloadHandler();
- this._beingDestroyed = true;
- this.inherited("destroy",arguments);
- },
-
- resize: function(size){
- dojo.marginBox(this.domNode, size);
-
- // Compute content box size in case we [later] need to size child
- // If either height or width wasn't specified by the user, then query node for it.
- // But note that setting the margin box and then immediately querying dimensions may return
- // inaccurate results, so try not to depend on it.
- var node = this.containerNode || this.domNode,
- mb = dojo.mixin(dojo.marginBox(node), size||{});
-
- this._contentBox = dijit.layout.marginBox2contentBox(node, mb);
-
- // If we have a single widget child then size it to fit snugly within my borders
- if(this._singleChild && this._singleChild.resize){
- this._singleChild.resize(this._contentBox);
- }
- },
-
- _prepareLoad: function(forceLoad){
- // sets up for a xhrLoad, load is deferred until widget onShow
- // cancels a inflight download
- this.cancel();
- this.isLoaded = false;
- this._loadCheck(forceLoad);
- },
-
- _loadCheck: function(forceLoad){
- // call this when you change onShow (onSelected) status when selected in parent container
- // it's used as a trigger for href download when this.domNode.display != 'none'
-
- // sequence:
- // if no href -> bail
- // forceLoad -> always load
- // this.preload -> load when download not in progress, domNode display doesn't matter
- // this.refreshOnShow -> load when download in progress bails, domNode display !='none' AND
- // this.open !== false (undefined is ok), isLoaded doesn't matter
- // else -> load when download not in progress, if this.open !== false (undefined is ok) AND
- // domNode display != 'none', isLoaded must be false
-
- var displayState = ((this.open !== false) && (this.domNode.style.display != 'none'));
-
- if(this.href &&
- (forceLoad ||
- (this.preload && !this._xhrDfd) ||
- (this.refreshOnShow && displayState && !this._xhrDfd) ||
- (!this.isLoaded && displayState && !this._xhrDfd)
- )
- ){
- this._downloadExternalContent();
- }
- },
-
- _downloadExternalContent: function(){
- this._onUnloadHandler();
-
- // display loading message
- this._setContent(
- this.onDownloadStart.call(this)
+
+ var _chain = function(animations){
+ this._index = -1;
+ this._animations = animations||[];
+ this._current = this._onAnimateCtx = this._onEndCtx = null;
+
+ this.duration = 0;
+ d.forEach(this._animations, function(a){
+ this.duration += a.duration;
+ if(a.delay){ this.duration += a.delay; }
+ }, this);
+ };
+ d.extend(_chain, {
+ _onAnimate: function(){
+ this._fire("onAnimate", arguments);
+ },
+ _onEnd: function(){
+ d.disconnect(this._onAnimateCtx);
+ d.disconnect(this._onEndCtx);
+ this._onAnimateCtx = this._onEndCtx = null;
+ if(this._index + 1 == this._animations.length){
+ this._fire("onEnd");
+ }else{
+ // switch animations
+ this._current = this._animations[++this._index];
+ this._onAnimateCtx = d.connect(this._current, "onAnimate", this, "_onAnimate");
+ this._onEndCtx = d.connect(this._current, "onEnd", this, "_onEnd");
+ this._current.play(0, true);
+ }
+ },
+ play: function(/*int?*/ delay, /*Boolean?*/ gotoStart){
+ if(!this._current){ this._current = this._animations[this._index = 0]; }
+ if(!gotoStart && this._current.status() == "playing"){ return this; }
+ var beforeBegin = d.connect(this._current, "beforeBegin", this, function(){
+ this._fire("beforeBegin");
+ }),
+ onBegin = d.connect(this._current, "onBegin", this, function(arg){
+ this._fire("onBegin", arguments);
+ }),
+ onPlay = d.connect(this._current, "onPlay", this, function(arg){
+ this._fire("onPlay", arguments);
+ d.disconnect(beforeBegin);
+ d.disconnect(onBegin);
+ d.disconnect(onPlay);
+ });
+ if(this._onAnimateCtx){
+ d.disconnect(this._onAnimateCtx);
+ }
+ this._onAnimateCtx = d.connect(this._current, "onAnimate", this, "_onAnimate");
+ if(this._onEndCtx){
+ d.disconnect(this._onEndCtx);
+ }
+ this._onEndCtx = d.connect(this._current, "onEnd", this, "_onEnd");
+ this._current.play.apply(this._current, arguments);
+ return this;
+ },
+ pause: function(){
+ if(this._current){
+ var e = d.connect(this._current, "onPause", this, function(arg){
+ this._fire("onPause", arguments);
+ d.disconnect(e);
+ });
+ this._current.pause();
+ }
+ return this;
+ },
+ gotoPercent: function(/*Decimal*/percent, /*Boolean?*/ andPlay){
+ this.pause();
+ var offset = this.duration * percent;
+ this._current = null;
+ d.some(this._animations, function(a){
+ if(a.duration <= offset){
+ this._current = a;
+ return true;
+ }
+ offset -= a.duration;
+ return false;
+ });
+ if(this._current){
+ this._current.gotoPercent(offset / this._current.duration, andPlay);
+ }
+ return this;
+ },
+ stop: function(/*boolean?*/ gotoEnd){
+ if(this._current){
+ if(gotoEnd){
+ for(; this._index + 1 < this._animations.length; ++this._index){
+ this._animations[this._index].stop(true);
+ }
+ this._current = this._animations[this._index];
+ }
+ var e = d.connect(this._current, "onStop", this, function(arg){
+ this._fire("onStop", arguments);
+ d.disconnect(e);
+ });
+ this._current.stop();
+ }
+ return this;
+ },
+ status: function(){
+ return this._current ? this._current.status() : "stopped";
+ },
+ destroy: function(){
+ if(this._onAnimateCtx){ d.disconnect(this._onAnimateCtx); }
+ if(this._onEndCtx){ d.disconnect(this._onEndCtx); }
+ }
+ });
+ d.extend(_chain, _baseObj);
+
+ dojo.fx.chain = function(/*dojo.Animation[]*/ animations){
+ // summary:
+ // Chain a list of `dojo.Animation`s to run in sequence
+ //
+ // description:
+ // Return a `dojo.Animation` which will play all passed
+ // `dojo.Animation` instances in sequence, firing its own
+ // synthesized events simulating a single animation. (eg:
+ // onEnd of this animation means the end of the chain,
+ // not the individual animations within)
+ //
+ // example:
+ // Once `node` is faded out, fade in `otherNode`
+ // | dojo.fx.chain([
+ // | dojo.fadeIn({ node:node }),
+ // | dojo.fadeOut({ node:otherNode })
+ // | ]).play();
+ //
+ return new _chain(animations) // dojo.Animation
+ };
+
+ var _combine = function(animations){
+ this._animations = animations||[];
+ this._connects = [];
+ this._finished = 0;
+
+ this.duration = 0;
+ d.forEach(animations, function(a){
+ var duration = a.duration;
+ if(a.delay){ duration += a.delay; }
+ if(this.duration < duration){ this.duration = duration; }
+ this._connects.push(d.connect(a, "onEnd", this, "_onEnd"));
+ }, this);
+
+ this._pseudoAnimation = new d.Animation({curve: [0, 1], duration: this.duration});
+ var self = this;
+ d.forEach(["beforeBegin", "onBegin", "onPlay", "onAnimate", "onPause", "onStop", "onEnd"],
+ function(evt){
+ self._connects.push(d.connect(self._pseudoAnimation, evt,
+ function(){ self._fire(evt, arguments); }
+ ));
+ }
);
-
- var self = this;
- var getArgs = {
- preventCache: (this.preventCache || this.refreshOnShow),
- url: this.href,
- handleAs: "text"
- };
- if(dojo.isObject(this.ioArgs)){
- dojo.mixin(getArgs, this.ioArgs);
- }
-
- var hand = this._xhrDfd = (this.ioMethod || dojo.xhrGet)(getArgs);
-
- hand.addCallback(function(html){
- try{
- self.onDownloadEnd.call(self);
- self._isDownloaded = true;
- self.setContent.call(self, html); // onload event is called from here
- }catch(err){
- self._onError.call(self, 'Content', err); // onContentError
- }
- delete self._xhrDfd;
- return html;
- });
-
- hand.addErrback(function(err){
- if(!hand.cancelled){
- // show error message in the pane
- self._onError.call(self, 'Download', err); // onDownloadError
- }
- delete self._xhrDfd;
- return err;
+ };
+ d.extend(_combine, {
+ _doAction: function(action, args){
+ d.forEach(this._animations, function(a){
+ a[action].apply(a, args);
+ });
+ return this;
+ },
+ _onEnd: function(){
+ if(++this._finished > this._animations.length){
+ this._fire("onEnd");
+ }
+ },
+ _call: function(action, args){
+ var t = this._pseudoAnimation;
+ t[action].apply(t, args);
+ },
+ play: function(/*int?*/ delay, /*Boolean?*/ gotoStart){
+ this._finished = 0;
+ this._doAction("play", arguments);
+ this._call("play", arguments);
+ return this;
+ },
+ pause: function(){
+ this._doAction("pause", arguments);
+ this._call("pause", arguments);
+ return this;
+ },
+ gotoPercent: function(/*Decimal*/percent, /*Boolean?*/ andPlay){
+ var ms = this.duration * percent;
+ d.forEach(this._animations, function(a){
+ a.gotoPercent(a.duration < ms ? 1 : (ms / a.duration), andPlay);
+ });
+ this._call("gotoPercent", arguments);
+ return this;
+ },
+ stop: function(/*boolean?*/ gotoEnd){
+ this._doAction("stop", arguments);
+ this._call("stop", arguments);
+ return this;
+ },
+ status: function(){
+ return this._pseudoAnimation.status();
+ },
+ destroy: function(){
+ d.forEach(this._connects, dojo.disconnect);
+ }
+ });
+ d.extend(_combine, _baseObj);
+
+ dojo.fx.combine = function(/*dojo.Animation[]*/ animations){
+ // summary:
+ // Combine a list of `dojo.Animation`s to run in parallel
+ //
+ // description:
+ // Combine an array of `dojo.Animation`s to run in parallel,
+ // providing a new `dojo.Animation` instance encompasing each
+ // animation, firing standard animation events.
+ //
+ // example:
+ // Fade out `node` while fading in `otherNode` simultaneously
+ // | dojo.fx.combine([
+ // | dojo.fadeIn({ node:node }),
+ // | dojo.fadeOut({ node:otherNode })
+ // | ]).play();
+ //
+ // example:
+ // When the longest animation ends, execute a function:
+ // | var anim = dojo.fx.combine([
+ // | dojo.fadeIn({ node: n, duration:700 }),
+ // | dojo.fadeOut({ node: otherNode, duration: 300 })
+ // | ]);
+ // | dojo.connect(anim, "onEnd", function(){
+ // | // overall animation is done.
+ // | });
+ // | anim.play(); // play the animation
+ //
+ return new _combine(animations); // dojo.Animation
+ };
+
+ dojo.fx.wipeIn = function(/*Object*/ args){
+ // summary:
+ // Expand a node to it's natural height.
+ //
+ // description:
+ // Returns an animation that will expand the
+ // node defined in 'args' object from it's current height to
+ // it's natural height (with no scrollbar).
+ // Node must have no margin/border/padding.
+ //
+ // args: Object
+ // A hash-map of standard `dojo.Animation` constructor properties
+ // (such as easing: node: duration: and so on)
+ //
+ // example:
+ // | dojo.fx.wipeIn({
+ // | node:"someId"
+ // | }).play()
+ var node = args.node = d.byId(args.node), s = node.style, o;
+
+ var anim = d.animateProperty(d.mixin({
+ properties: {
+ height: {
+ // wrapped in functions so we wait till the last second to query (in case value has changed)
+ start: function(){
+ // start at current [computed] height, but use 1px rather than 0
+ // because 0 causes IE to display the whole panel
+ o = s.overflow;
+ s.overflow = "hidden";
+ if(s.visibility == "hidden" || s.display == "none"){
+ s.height = "1px";
+ s.display = "";
+ s.visibility = "";
+ return 1;
+ }else{
+ var height = d.style(node, "height");
+ return Math.max(height, 1);
+ }
+ },
+ end: function(){
+ return node.scrollHeight;
+ }
+ }
+ }
+ }, args));
+
+ d.connect(anim, "onEnd", function(){
+ s.height = "auto";
+ s.overflow = o;
});
- },
-
- _onLoadHandler: function(){
- this.isLoaded = true;
- try{
- this.onLoad.call(this);
- }catch(e){
- console.error('Error '+this.widgetId+' running custom onLoad code');
- }
- },
-
- _onUnloadHandler: function(){
- this.isLoaded = false;
- this.cancel();
- try{
- this.onUnload.call(this);
- }catch(e){
- console.error('Error '+this.widgetId+' running custom onUnload code');
- }
- },
-
- _setContent: function(cont){
- this.destroyDescendants();
-
- try{
- var node = this.containerNode || this.domNode;
- while(node.firstChild){
- dojo._destroyElement(node.firstChild);
- }
- if(typeof cont == "string"){
- // dijit.ContentPane does only minimal fixes,
- // No pathAdjustments, script retrieval, style clean etc
- // some of these should be available in the dojox.layout.ContentPane
- if(this.extractContent){
- match = cont.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
- if(match){ cont = match[1]; }
- }
- node.innerHTML = cont;
- }else{
- // domNode or NodeList
- if(cont.nodeType){ // domNode (htmlNode 1 or textNode 3)
- node.appendChild(cont);
- }else{// nodelist or array such as dojo.Nodelist
- dojo.forEach(cont, function(n){
- node.appendChild(n.cloneNode(true));
- });
- }
- }
- }catch(e){
- // check if a domfault occurs when we are appending this.errorMessage
- // like for instance if domNode is a UL and we try append a DIV
- var errMess = this.onContentError(e);
- try{
- node.innerHTML = errMess;
- }catch(e){
- console.error('Fatal '+this.id+' could not change content due to '+e.message, e);
- }
- }
- },
-
- _onError: function(type, err, consoleText){
- // shows user the string that is returned by on[type]Error
- // overide on[type]Error and return your own string to customize
- var errText = this['on' + type + 'Error'].call(this, err);
- if(consoleText){
- console.error(consoleText, err);
- }else if(errText){// a empty string won't change current content
- this._setContent.call(this, errText);
- }
- },
-
- _createSubWidgets: function(){
- // summary: scan my contents and create subwidgets
- var rootNode = this.containerNode || this.domNode;
- try{
- dojo.parser.parse(rootNode, true);
- }catch(e){
- this._onError('Content', e, "Couldn't create widgets in "+this.id
- +(this.href ? " from "+this.href : ""));
- }
- },
-
- // EVENT's, should be overide-able
- onLoad: function(e){
- // summary:
- // Event hook, is called after everything is loaded and widgetified
- },
-
- onUnload: function(e){
- // summary:
- // Event hook, is called before old content is cleared
- },
-
- onDownloadStart: function(){
- // summary:
- // called before download starts
- // the string returned by this function will be the html
- // that tells the user we are loading something
- // override with your own function if you want to change text
- return this.loadingMessage;
- },
-
- onContentError: function(/*Error*/ error){
- // summary:
- // called on DOM faults, require fault etc in content
- // default is to display errormessage inside pane
- },
-
- onDownloadError: function(/*Error*/ error){
- // summary:
- // Called when download error occurs, default is to display
- // errormessage inside pane. Overide function to change that.
- // The string returned by this function will be the html
- // that tells the user a error happend
- return this.errorMessage;
- },
-
- onDownloadEnd: function(){
- // summary:
- // called when download is finished
- }
-});
-
-}
-
-if(!dojo._hasResource["dijit.form.Form"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.form.Form"] = true;
-dojo.provide("dijit.form.Form");
-
-
-
+
+ return anim; // dojo.Animation
+ }
+
+ dojo.fx.wipeOut = function(/*Object*/ args){
+ // summary:
+ // Shrink a node to nothing and hide it.
+ //
+ // description:
+ // Returns an animation that will shrink node defined in "args"
+ // from it's current height to 1px, and then hide it.
+ //
+ // args: Object
+ // A hash-map of standard `dojo.Animation` constructor properties
+ // (such as easing: node: duration: and so on)
+ //
+ // example:
+ // | dojo.fx.wipeOut({ node:"someId" }).play()
+
+ var node = args.node = d.byId(args.node), s = node.style, o;
+
+ var anim = d.animateProperty(d.mixin({
+ properties: {
+ height: {
+ end: 1 // 0 causes IE to display the whole panel
+ }
+ }
+ }, args));
+
+ d.connect(anim, "beforeBegin", function(){
+ o = s.overflow;
+ s.overflow = "hidden";
+ s.display = "";
+ });
+ d.connect(anim, "onEnd", function(){
+ s.overflow = o;
+ s.height = "auto";
+ s.display = "none";
+ });
+
+ return anim; // dojo.Animation
+ }
+
+ dojo.fx.slideTo = function(/*Object*/ args){
+ // summary:
+ // Slide a node to a new top/left position
+ //
+ // description:
+ // Returns an animation that will slide "node"
+ // defined in args Object from its current position to
+ // the position defined by (args.left, args.top).
+ //
+ // args: Object
+ // A hash-map of standard `dojo.Animation` constructor properties
+ // (such as easing: node: duration: and so on). Special args members
+ // are `top` and `left`, which indicate the new position to slide to.
+ //
+ // example:
+ // | dojo.fx.slideTo({ node: node, left:"40", top:"50", units:"px" }).play()
+
+ var node = args.node = d.byId(args.node),
+ top = null, left = null;
+
+ var init = (function(n){
+ return function(){
+ var cs = d.getComputedStyle(n);
+ var pos = cs.position;
+ top = (pos == 'absolute' ? n.offsetTop : parseInt(cs.top) || 0);
+ left = (pos == 'absolute' ? n.offsetLeft : parseInt(cs.left) || 0);
+ if(pos != 'absolute' && pos != 'relative'){
+ var ret = d.position(n, true);
+ top = ret.y;
+ left = ret.x;
+ n.style.position="absolute";
+ n.style.top=top+"px";
+ n.style.left=left+"px";
+ }
+ };
+ })(node);
+ init();
+
+ var anim = d.animateProperty(d.mixin({
+ properties: {
+ top: args.top || 0,
+ left: args.left || 0
+ }
+ }, args));
+ d.connect(anim, "beforeBegin", anim, init);
+
+ return anim; // dojo.Animation
+ }
+
+})();
+
+}
+
+if(!dojo._hasResource["dijit.form._FormMixin"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form._FormMixin"] = true;
+dojo.provide("dijit.form._FormMixin");
dojo.declare("dijit.form._FormMixin", null,
{
- /*
- summary:
- Widget corresponding to <form> tag, for validation and serialization
-
- usage:
- <form dojoType="dijit.form.Form" id="myForm">
- Name: <input type="text" name="name" />
- </form>
- myObj={name: "John Doe"};
- dijit.byId('myForm').setValues(myObj);
-
- myObj=dijit.byId('myForm').getValues();
- TODO:
- * Repeater
- * better handling for arrays. Often form elements have names with [] like
- * people[3].sex (for a list of people [{name: Bill, sex: M}, ...])
-
- */
-
- // HTML <FORM> attributes
-
- action: "",
- method: "",
- enctype: "",
- name: "",
- "accept-charset": "",
- accept: "",
- target: "",
-
- attributeMap: dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),
- {action: "", method: "", enctype: "", "accept-charset": "", accept: "", target: ""}),
-
- // execute: Function
- // User defined function to do stuff when the user hits the submit button
- execute: function(/*Object*/ formContents){},
-
- // onCancel: Function
- // Callback when user has canceled dialog, to notify container
- // (user shouldn't override)
- onCancel: function(){},
-
- // onExecute: Function
- // Callback when user is about to execute dialog, to notify container
- // (user shouldn't override)
- onExecute: function(){},
-
- templateString: "<form dojoAttachPoint='containerNode' dojoAttachEvent='onsubmit:_onSubmit' name='${name}' enctype='multipart/form-data'></form>",
-
- _onSubmit: function(/*event*/e) {
- // summary: callback when user hits submit button
- dojo.stopEvent(e);
- this.onExecute(); // notify container that we are about to execute
- this.execute(this.getValues());
- },
-
- submit: function() {
- // summary: programatically submit form
- this.containerNode.submit();
- },
-
- setValues: function(/*object*/obj) {
- // summary: fill in form values from a JSON structure
+ // summary:
+ // Mixin for containers of form widgets (i.e. widgets that represent a single value
+ // and can be children of a <form> node or dijit.form.Form widget)
+ // description:
+ // Can extract all the form widgets
+ // values and combine them into a single javascript object, or alternately
+ // take such an object and set the values for all the contained
+ // form widgets
+
+/*=====
+ // value: Object
+ // Name/value hash for each form element.
+ // If there are multiple elements w/the same name, value is an array,
+ // unless they are radio buttons in which case value is a scalar since only
+ // one can be checked at a time.
+ //
+ // If the name is a dot separated list (like a.b.c.d), it's a nested structure.
+ // Only works on widget form elements.
+ // example:
+ // | { name: "John Smith", interests: ["sports", "movies"] }
+=====*/
+
+ // TODO:
+ // * Repeater
+ // * better handling for arrays. Often form elements have names with [] like
+ // * people[3].sex (for a list of people [{name: Bill, sex: M}, ...])
+ //
+ //
+
+ reset: function(){
+ dojo.forEach(this.getDescendants(), function(widget){
+ if(widget.reset){
+ widget.reset();
+ }
+ });
+ },
+
+ validate: function(){
+ // summary:
+ // returns if the form is valid - same as isValid - but
+ // provides a few additional (ui-specific) features.
+ // 1 - it will highlight any sub-widgets that are not
+ // valid
+ // 2 - it will call focus() on the first invalid
+ // sub-widget
+ var didFocus = false;
+ return dojo.every(dojo.map(this.getDescendants(), function(widget){
+ // Need to set this so that "required" widgets get their
+ // state set.
+ widget._hasBeenBlurred = true;
+ var valid = widget.disabled || !widget.validate || widget.validate();
+ if(!valid && !didFocus){
+ // Set focus of the first non-valid widget
+ dijit.scrollIntoView(widget.containerNode || widget.domNode);
+ widget.focus();
+ didFocus = true;
+ }
+ return valid;
+ }), function(item){ return item; });
+ },
+
+ setValues: function(val){
+ dojo.deprecated(this.declaredClass+"::setValues() is deprecated. Use attr('value', val) instead.", "", "2.0");
+ return this.attr('value', val);
+ },
+ _setValueAttr: function(/*object*/obj){
+ // summary:
+ // Fill in form values from according to an Object (in the format returned by attr('value'))
// generate map from name --> [list of widgets with that name]
- var map = {};
+ var map = { };
dojo.forEach(this.getDescendants(), function(widget){
if(!widget.name){ return; }
var entry = map[widget.name] || (map[widget.name] = [] );
entry.push(widget);
});
- // call setValue() or setChecked() for each widget, according to obj
for(var name in map){
+ if(!map.hasOwnProperty(name)){
+ continue;
+ }
var widgets = map[name], // array of widgets w/this name
values = dojo.getObject(name, false, obj); // list of values for those widgets
+
+ if(values === undefined){
+ continue;
+ }
if(!dojo.isArray(values)){
values = [ values ];
}
- if(widgets[0].setChecked){
+ if(typeof widgets[0].checked == 'boolean'){
// for checkbox/radio, values is a list of which widgets should be checked
dojo.forEach(widgets, function(w, i){
- w.setChecked(dojo.indexOf(values, w.value) != -1);
+ w.attr('value', dojo.indexOf(values, w.value) != -1);
});
+ }else if(widgets[0].multiple){
+ // it takes an array (e.g. multi-select)
+ widgets[0].attr('value', values);
}else{
// otherwise, values is a list of values to be assigned sequentially to each widget
dojo.forEach(widgets, function(w, i){
- w.setValue(values[i]);
- });
+ w.attr('value', values[i]);
+ });
}
}
/***
- * TODO: code for plain input boxes (this shouldn't run for inputs that are part of widgets
+ * TODO: code for plain input boxes (this shouldn't run for inputs that are part of widgets)
dojo.forEach(this.containerNode.elements, function(element){
- if (element.name == ''){return}; // like "continue"
+ if(element.name == ''){return}; // like "continue"
var namePath = element.name.split(".");
var myObj=obj;
var name=namePath[namePath.length-1];
- for(var j=1,len2=namePath.length;j<len2;++j) {
+ for(var j=1,len2=namePath.length;j<len2;++j){
var p=namePath[j - 1];
// repeater support block
var nameA=p.split("[");
- if (nameA.length > 1) {
- if(typeof(myObj[nameA[0]]) == "undefined") {
+ if(nameA.length > 1){
+ if(typeof(myObj[nameA[0]]) == "undefined"){
myObj[nameA[0]]=[ ];
} // if
nameIndex=parseInt(nameA[1]);
- if(typeof(myObj[nameA[0]][nameIndex]) == "undefined") {
- myObj[nameA[0]][nameIndex]={};
+ if(typeof(myObj[nameA[0]][nameIndex]) == "undefined"){
+ myObj[nameA[0]][nameIndex] = { };
}
myObj=myObj[nameA[0]][nameIndex];
continue;
} // repeater support ends
- if(typeof(myObj[p]) == "undefined") {
+ if(typeof(myObj[p]) == "undefined"){
myObj=undefined;
break;
};
myObj=myObj[p];
}
- if (typeof(myObj) == "undefined") {
+ if(typeof(myObj) == "undefined"){
return; // like "continue"
}
- if (typeof(myObj[name]) == "undefined" && this.ignoreNullValues) {
+ if(typeof(myObj[name]) == "undefined" && this.ignoreNullValues){
return; // like "continue"
}
- // TODO: widget values (just call setValue() on the widget)
-
- switch(element.type) {
+ // TODO: widget values (just call attr('value', ...) on the widget)
+
+ // TODO: maybe should call dojo.getNodeProp() instead
+ switch(element.type){
case "checkbox":
element.checked = (name in myObj) &&
- dojo.some(myObj[name], function(val){ return val==element.value; });
+ dojo.some(myObj[name], function(val){ return val == element.value; });
break;
case "radio":
- element.checked = (name in myObj) && myObj[name]==element.value;
+ element.checked = (name in myObj) && myObj[name] == element.value;
break;
case "select-multiple":
element.selectedIndex=-1;
dojo.forEach(element.options, function(option){
option.selected = dojo.some(myObj[name], function(val){ return option.value == val; });
});
break;
case "select-one":
element.selectedIndex="0";
dojo.forEach(element.options, function(option){
option.selected = option.value == myObj[name];
});
break;
case "hidden":
case "text":
case "textarea":
case "password":
element.value = myObj[name] || "";
break;
}
});
*/
},
- getValues: function() {
- // summary: generate JSON structure from form values
+ getValues: function(){
+ dojo.deprecated(this.declaredClass+"::getValues() is deprecated. Use attr('value') instead.", "", "2.0");
+ return this.attr('value');
+ },
+ _getValueAttr: function(){
+ // summary:
+ // Returns Object representing form values.
+ // description:
+ // Returns name/value hash for each form element.
+ // If there are multiple elements w/the same name, value is an array,
+ // unless they are radio buttons in which case value is a scalar since only
+ // one can be checked at a time.
+ //
+ // If the name is a dot separated list (like a.b.c.d), creates a nested structure.
+ // Only works on widget form elements.
+ // example:
+ // | { name: "John Smith", interests: ["sports", "movies"] }
// get widget values
- var obj = {};
+ var obj = { };
dojo.forEach(this.getDescendants(), function(widget){
- var value = widget.getValue ? widget.getValue() : widget.value;
var name = widget.name;
- if(!name){ return; }
+ if(!name || widget.disabled){ return; }
+
+ // Single value widget (checkbox, radio, or plain <input> type widget
+ var value = widget.attr('value');
// Store widget's value(s) as a scalar, except for checkboxes which are automatically arrays
- if(widget.setChecked){
+ if(typeof widget.checked == 'boolean'){
if(/Radio/.test(widget.declaredClass)){
// radio button
- if(widget.checked){
+ if(value !== false){
dojo.setObject(name, value, obj);
+ }else{
+ // give radio widgets a default of null
+ value = dojo.getObject(name, false, obj);
+ if(value === undefined){
+ dojo.setObject(name, null, obj);
+ }
}
}else{
// checkbox/toggle button
var ary=dojo.getObject(name, false, obj);
if(!ary){
ary=[];
dojo.setObject(name, ary, obj);
}
- if(widget.checked){
+ if(value !== false){
ary.push(value);
}
}
}else{
- // plain input
- dojo.setObject(name, value, obj);
+ var prev=dojo.getObject(name, false, obj);
+ if(typeof prev != "undefined"){
+ if(dojo.isArray(prev)){
+ prev.push(value);
+ }else{
+ dojo.setObject(name, [prev, value], obj);
+ }
+ }else{
+ // unique name
+ dojo.setObject(name, value, obj);
+ }
}
});
/***
* code for plain input boxes (see also dojo.formToObject, can we use that instead of this code?
* but it doesn't understand [] notation, presumably)
var obj = { };
dojo.forEach(this.containerNode.elements, function(elm){
- if (!elm.name) {
+ if(!elm.name) {
return; // like "continue"
}
var namePath = elm.name.split(".");
var myObj=obj;
var name=namePath[namePath.length-1];
- for(var j=1,len2=namePath.length;j<len2;++j) {
+ for(var j=1,len2=namePath.length;j<len2;++j){
var nameIndex = null;
var p=namePath[j - 1];
var nameA=p.split("[");
- if (nameA.length > 1) {
- if(typeof(myObj[nameA[0]]) == "undefined") {
+ if(nameA.length > 1){
+ if(typeof(myObj[nameA[0]]) == "undefined"){
myObj[nameA[0]]=[ ];
} // if
nameIndex=parseInt(nameA[1]);
- if(typeof(myObj[nameA[0]][nameIndex]) == "undefined") {
- myObj[nameA[0]][nameIndex]={};
+ if(typeof(myObj[nameA[0]][nameIndex]) == "undefined"){
+ myObj[nameA[0]][nameIndex] = { };
}
- } else if(typeof(myObj[nameA[0]]) == "undefined") {
- myObj[nameA[0]]={}
+ } else if(typeof(myObj[nameA[0]]) == "undefined"){
+ myObj[nameA[0]] = { }
} // if
- if (nameA.length == 1) {
+ if(nameA.length == 1){
myObj=myObj[nameA[0]];
- } else {
+ } else{
myObj=myObj[nameA[0]][nameIndex];
} // if
} // for
- if ((elm.type != "select-multiple" && elm.type != "checkbox" && elm.type != "radio") || (elm.type=="radio" && elm.checked)) {
- if(name == name.split("[")[0]) {
+ if((elm.type != "select-multiple" && elm.type != "checkbox" && elm.type != "radio") || (elm.type == "radio" && elm.checked)){
+ if(name == name.split("[")[0]){
myObj[name]=elm.value;
- } else {
+ } else{
// can not set value when there is no name
}
- } else if (elm.type == "checkbox" && elm.checked) {
- if(typeof(myObj[name]) == 'undefined') {
+ } else if(elm.type == "checkbox" && elm.checked){
+ if(typeof(myObj[name]) == 'undefined'){
myObj[name]=[ ];
}
myObj[name].push(elm.value);
- } else if (elm.type == "select-multiple") {
- if(typeof(myObj[name]) == 'undefined') {
+ } else if(elm.type == "select-multiple"){
+ if(typeof(myObj[name]) == 'undefined'){
myObj[name]=[ ];
}
- for (var jdx=0,len3=elm.options.length; jdx<len3; ++jdx) {
- if (elm.options[jdx].selected) {
+ for(var jdx=0,len3=elm.options.length; jdx<len3; ++jdx){
+ if(elm.options[jdx].selected){
myObj[name].push(elm.options[jdx].value);
}
}
} // if
name=undefined;
}); // forEach
***/
return obj;
},
- isValid: function() {
- // TODO: ComboBox might need time to process a recently input value. This should be async?
- // make sure that every widget that has a validator function returns true
- return dojo.every(this.getDescendants(), function(widget){
- return !widget.isValid || widget.isValid();
+ // TODO: ComboBox might need time to process a recently input value. This should be async?
+ isValid: function(){
+ // summary:
+ // Returns true if all of the widgets are valid
+
+ // This also populate this._invalidWidgets[] array with list of invalid widgets...
+ // TODO: put that into separate function? It's confusing to have that as a side effect
+ // of a method named isValid().
+
+ this._invalidWidgets = dojo.filter(this.getDescendants(), function(widget){
+ return !widget.disabled && widget.isValid && !widget.isValid();
});
+ return !this._invalidWidgets.length;
+ },
+
+
+ onValidStateChange: function(isValid){
+ // summary:
+ // Stub function to connect to if you want to do something
+ // (like disable/enable a submit button) when the valid
+ // state changes on the form as a whole.
+ },
+
+ _widgetChange: function(widget){
+ // summary:
+ // Connected to a widget's onChange function - update our
+ // valid state, if needed.
+ var isValid = this._lastValidState;
+ if(!widget || this._lastValidState === undefined){
+ // We have passed a null widget, or we haven't been validated
+ // yet - let's re-check all our children
+ // This happens when we connect (or reconnect) our children
+ isValid = this.isValid();
+ if(this._lastValidState === undefined){
+ // Set this so that we don't fire an onValidStateChange
+ // the first time
+ this._lastValidState = isValid;
+ }
+ }else if(widget.isValid){
+ this._invalidWidgets = dojo.filter(this._invalidWidgets || [], function(w){
+ return (w != widget);
+ }, this);
+ if(!widget.isValid() && !widget.attr("disabled")){
+ this._invalidWidgets.push(widget);
+ }
+ isValid = (this._invalidWidgets.length === 0);
+ }
+ if(isValid !== this._lastValidState){
+ this._lastValidState = isValid;
+ this.onValidStateChange(isValid);
+ }
+ },
+
+ connectChildren: function(){
+ // summary:
+ // Connects to the onChange function of all children to
+ // track valid state changes. You can call this function
+ // directly, ex. in the event that you programmatically
+ // add a widget to the form *after* the form has been
+ // initialized.
+ dojo.forEach(this._changeConnections, dojo.hitch(this, "disconnect"));
+ var _this = this;
+
+ // we connect to validate - so that it better reflects the states
+ // of the widgets - also, we only connect if it has a validate
+ // function (to avoid too many unneeded connections)
+ var conns = this._changeConnections = [];
+ dojo.forEach(dojo.filter(this.getDescendants(),
+ function(item){ return item.validate; }
+ ),
+ function(widget){
+ // We are interested in whenever the widget is validated - or
+ // whenever the disabled attribute on that widget is changed
+ conns.push(_this.connect(widget, "validate",
+ dojo.hitch(_this, "_widgetChange", widget)));
+ conns.push(_this.connect(widget, "_setDisabledAttr",
+ dojo.hitch(_this, "_widgetChange", widget)));
+ });
+
+ // Call the widget change function to update the valid state, in
+ // case something is different now.
+ this._widgetChange(null);
+ },
+
+ startup: function(){
+ this.inherited(arguments);
+ // Initialize our valid state tracking. Needs to be done in startup
+ // because it's not guaranteed that our children are initialized
+ // yet.
+ this._changeConnections = [];
+ this.connectChildren();
}
});
-dojo.declare(
- "dijit.form.Form",
- [dijit._Widget, dijit._Templated, dijit.form._FormMixin],
- null
+}
+
+if(!dojo._hasResource["dijit._DialogMixin"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit._DialogMixin"] = true;
+dojo.provide("dijit._DialogMixin");
+
+dojo.declare("dijit._DialogMixin", null,
+ {
+ // summary:
+ // This provides functions useful to Dialog and TooltipDialog
+
+ attributeMap: dijit._Widget.prototype.attributeMap,
+
+ execute: function(/*Object*/ formContents){
+ // summary:
+ // Callback when the user hits the submit button.
+ // Override this method to handle Dialog execution.
+ // description:
+ // After the user has pressed the submit button, the Dialog
+ // first calls onExecute() to notify the container to hide the
+ // dialog and restore focus to wherever it used to be.
+ //
+ // *Then* this method is called.
+ // type:
+ // callback
+ },
+
+ onCancel: function(){
+ // summary:
+ // Called when user has pressed the Dialog's cancel button, to notify container.
+ // description:
+ // Developer shouldn't override or connect to this method;
+ // it's a private communication device between the TooltipDialog
+ // and the thing that opened it (ex: `dijit.form.DropDownButton`)
+ // type:
+ // protected
+ },
+
+ onExecute: function(){
+ // summary:
+ // Called when user has pressed the dialog's OK button, to notify container.
+ // description:
+ // Developer shouldn't override or connect to this method;
+ // it's a private communication device between the TooltipDialog
+ // and the thing that opened it (ex: `dijit.form.DropDownButton`)
+ // type:
+ // protected
+ },
+
+ _onSubmit: function(){
+ // summary:
+ // Callback when user hits submit button
+ // type:
+ // protected
+ this.onExecute(); // notify container that we are about to execute
+ this.execute(this.attr('value'));
+ },
+
+ _getFocusItems: function(/*Node*/ dialogNode){
+ // summary:
+ // Find focusable Items each time a dialog is opened,
+ // setting _firstFocusItem and _lastFocusItem
+ // tags:
+ // protected
+
+ var elems = dijit._getTabNavigable(dojo.byId(dialogNode));
+ this._firstFocusItem = elems.lowest || elems.first || dialogNode;
+ this._lastFocusItem = elems.last || elems.highest || this._firstFocusItem;
+ if(dojo.isMoz && this._firstFocusItem.tagName.toLowerCase() == "input" &&
+ dojo.getNodeProp(this._firstFocusItem, "type").toLowerCase() == "file"){
+ // FF doesn't behave well when first element is input type=file, set first focusable to dialog container
+ dojo.attr(dialogNode, "tabIndex", "0");
+ this._firstFocusItem = dialogNode;
+ }
+ }
+ }
);
}
-if(!dojo._hasResource["dijit.Dialog"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.Dialog"] = true;
-dojo.provide("dijit.Dialog");
-
-
-
-
-
+if(!dojo._hasResource["dijit.DialogUnderlay"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.DialogUnderlay"] = true;
+dojo.provide("dijit.DialogUnderlay");
dojo.declare(
"dijit.DialogUnderlay",
[dijit._Widget, dijit._Templated],
{
- // summary: the thing that grays out the screen behind the dialog
+ // summary:
+ // The component that blocks the screen behind a `dijit.Dialog`
+ //
+ // description:
+ // A component used to block input behind a `dijit.Dialog`. Only a single
+ // instance of this widget is created by `dijit.Dialog`, and saved as
+ // a reference to be shared between all Dialogs as `dijit._underlay`
+ //
+ // The underlay itself can be styled based on and id:
+ // | #myDialog_underlay { background-color:red; }
+ //
+ // In the case of `dijit.Dialog`, this id is based on the id of the Dialog,
+ // suffixed with _underlay.
// Template has two divs; outer div is used for fade-in/fade-out, and also to hold background iframe.
// Inner div has opacity specified in CSS file.
- templateString: "<div class=dijitDialogUnderlayWrapper id='${id}_underlay'><div class=dijitDialogUnderlay dojoAttachPoint='node'></div></div>",
+ templateString: "<div class='dijitDialogUnderlayWrapper'><div class='dijitDialogUnderlay' dojoAttachPoint='node'></div></div>",
+
+ // Parameters on creation or updatable later
+
+ // dialogId: String
+ // Id of the dialog.... DialogUnderlay's id is based on this id
+ dialogId: "",
+
+ // class: String
+ // This class name is used on the DialogUnderlay node, in addition to dijitDialogUnderlay
+ "class": "",
+
+ attributeMap: { id: "domNode" },
+
+ _setDialogIdAttr: function(id){
+ dojo.attr(this.node, "id", id + "_underlay");
+ },
+
+ _setClassAttr: function(clazz){
+ this.node.className = "dijitDialogUnderlay " + clazz;
+ },
postCreate: function(){
+ // summary:
+ // Append the underlay to the body
dojo.body().appendChild(this.domNode);
- this.bgIframe = new dijit.BackgroundIframe(this.domNode);
},
layout: function(){
- // summary
+ // summary:
+ // Sets the background to the size of the viewport
+ //
+ // description:
// Sets the background to the size of the viewport (rather than the size
// of the document) since we need to cover the whole browser window, even
// if the document is only a few lines long.
-
- var viewport = dijit.getViewport();
+ // tags:
+ // private
+
var is = this.node.style,
os = this.domNode.style;
+ // hide the background temporarily, so that the background itself isn't
+ // causing scrollbars to appear (might happen when user shrinks browser
+ // window and then we are called to resize)
+ os.display = "none";
+
+ // then resize and show
+ var viewport = dijit.getViewport();
os.top = viewport.t + "px";
os.left = viewport.l + "px";
is.width = viewport.w + "px";
is.height = viewport.h + "px";
-
- // process twice since the scroll bar may have been removed
- // by the previous resizing
- var viewport2 = dijit.getViewport();
- if(viewport.w != viewport2.w){ is.width = viewport2.w + "px"; }
- if(viewport.h != viewport2.h){ is.height = viewport2.h + "px"; }
+ os.display = "block";
},
show: function(){
+ // summary:
+ // Show the dialog underlay
this.domNode.style.display = "block";
this.layout();
- if(this.bgIframe.iframe){
- this.bgIframe.iframe.style.display = "block";
- }
- this._resizeHandler = this.connect(window, "onresize", "layout");
+ this.bgIframe = new dijit.BackgroundIframe(this.domNode);
},
hide: function(){
+ // summary:
+ // Hides the dialog underlay
+ this.bgIframe.destroy();
this.domNode.style.display = "none";
- if(this.bgIframe.iframe){
- this.bgIframe.iframe.style.display = "none";
- }
- this.disconnect(this._resizeHandler);
},
uninitialize: function(){
if(this.bgIframe){
this.bgIframe.destroy();
}
+ this.inherited(arguments);
}
}
);
+}
+
+if(!dojo._hasResource["dojo.html"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojo.html"] = true;
+dojo.provide("dojo.html");
+
+// the parser might be needed..
+
+
+(function(){ // private scope, sort of a namespace
+
+ // idCounter is incremented with each instantiation to allow asignment of a unique id for tracking, logging purposes
+ var idCounter = 0,
+ d = dojo;
+
+ dojo.html._secureForInnerHtml = function(/*String*/ cont){
+ // summary:
+ // removes !DOCTYPE and title elements from the html string.
+ //
+ // khtml is picky about dom faults, you can't attach a style or <title> node as child of body
+ // must go into head, so we need to cut out those tags
+ // cont:
+ // An html string for insertion into the dom
+ //
+ return cont.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig, ""); // String
+ };
+
+/*====
+ dojo.html._emptyNode = function(node){
+ // summary:
+ // removes all child nodes from the given node
+ // node: DOMNode
+ // the parent element
+ };
+=====*/
+ dojo.html._emptyNode = dojo.empty;
+
+ dojo.html._setNodeContent = function(/* DomNode */ node, /* String|DomNode|NodeList */ cont){
+ // summary:
+ // inserts the given content into the given node
+ // node:
+ // the parent element
+ // content:
+ // the content to be set on the parent element.
+ // This can be an html string, a node reference or a NodeList, dojo.NodeList, Array or other enumerable list of nodes
+
+ // always empty
+ d.empty(node);
+
+ if(cont) {
+ if(typeof cont == "string") {
+ cont = d._toDom(cont, node.ownerDocument);
+ }
+ if(!cont.nodeType && d.isArrayLike(cont)) {
+ // handle as enumerable, but it may shrink as we enumerate it
+ for(var startlen=cont.length, i=0; i<cont.length; i=startlen==cont.length ? i+1 : 0) {
+ d.place( cont[i], node, "last");
+ }
+ } else {
+ // pass nodes, documentFragments and unknowns through to dojo.place
+ d.place(cont, node, "last");
+ }
+ }
+
+ // return DomNode
+ return node;
+ };
+
+ // we wrap up the content-setting operation in a object
+ dojo.declare("dojo.html._ContentSetter", null,
+ {
+ // node: DomNode|String
+ // An node which will be the parent element that we set content into
+ node: "",
+
+ // content: String|DomNode|DomNode[]
+ // The content to be placed in the node. Can be an HTML string, a node reference, or a enumerable list of nodes
+ content: "",
+
+ // id: String?
+ // Usually only used internally, and auto-generated with each instance
+ id: "",
+
+ // cleanContent: Boolean
+ // Should the content be treated as a full html document,
+ // and the real content stripped of <html>, <body> wrapper before injection
+ cleanContent: false,
+
+ // extractContent: Boolean
+ // Should the content be treated as a full html document, and the real content stripped of <html>, <body> wrapper before injection
+ extractContent: false,
+
+ // parseContent: Boolean
+ // Should the node by passed to the parser after the new content is set
+ parseContent: false,
+
+ // lifecyle methods
+ constructor: function(/* Object */params, /* String|DomNode */node){
+ // summary:
+ // Provides a configurable, extensible object to wrap the setting on content on a node
+ // call the set() method to actually set the content..
+
+ // the original params are mixed directly into the instance "this"
+ dojo.mixin(this, params || {});
+
+ // give precedence to params.node vs. the node argument
+ // and ensure its a node, not an id string
+ node = this.node = dojo.byId( this.node || node );
+
+ if(!this.id){
+ this.id = [
+ "Setter",
+ (node) ? node.id || node.tagName : "",
+ idCounter++
+ ].join("_");
+ }
+
+ if(! (this.node || node)){
+ new Error(this.declaredClass + ": no node provided to " + this.id);
+ }
+ },
+ set: function(/* String|DomNode|NodeList? */ cont, /* Object? */ params){
+ // summary:
+ // front-end to the set-content sequence
+ // cont:
+ // An html string, node or enumerable list of nodes for insertion into the dom
+ // If not provided, the object's content property will be used
+ if(undefined !== cont){
+ this.content = cont;
+ }
+ // in the re-use scenario, set needs to be able to mixin new configuration
+ if(params){
+ this._mixin(params);
+ }
+
+ this.onBegin();
+ this.setContent();
+ this.onEnd();
+
+ return this.node;
+ },
+ setContent: function(){
+ // summary:
+ // sets the content on the node
+
+ var node = this.node;
+ if(!node) {
+ console.error("setContent given no node");
+ }
+ try{
+ node = dojo.html._setNodeContent(node, this.content);
+ }catch(e){
+ // check if a domfault occurs when we are appending this.errorMessage
+ // like for instance if domNode is a UL and we try append a DIV
+
+ // FIXME: need to allow the user to provide a content error message string
+ var errMess = this.onContentError(e);
+ try{
+ node.innerHTML = errMess;
+ }catch(e){
+ console.error('Fatal ' + this.declaredClass + '.setContent could not change content due to '+e.message, e);
+ }
+ }
+ // always put back the node for the next method
+ this.node = node; // DomNode
+ },
+
+ empty: function() {
+ // summary
+ // cleanly empty out existing content
+
+ // destroy any widgets from a previous run
+ // NOTE: if you dont want this you'll need to empty
+ // the parseResults array property yourself to avoid bad things happenning
+ if(this.parseResults && this.parseResults.length) {
+ dojo.forEach(this.parseResults, function(w) {
+ if(w.destroy){
+ w.destroy();
+ }
+ });
+ delete this.parseResults;
+ }
+ // this is fast, but if you know its already empty or safe, you could
+ // override empty to skip this step
+ dojo.html._emptyNode(this.node);
+ },
+
+ onBegin: function(){
+ // summary
+ // Called after instantiation, but before set();
+ // It allows modification of any of the object properties
+ // - including the node and content provided - before the set operation actually takes place
+ // This default implementation checks for cleanContent and extractContent flags to
+ // optionally pre-process html string content
+ var cont = this.content;
+
+ if(dojo.isString(cont)){
+ if(this.cleanContent){
+ cont = dojo.html._secureForInnerHtml(cont);
+ }
+
+ if(this.extractContent){
+ var match = cont.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
+ if(match){ cont = match[1]; }
+ }
+ }
+
+ // clean out the node and any cruft associated with it - like widgets
+ this.empty();
+
+ this.content = cont;
+ return this.node; /* DomNode */
+ },
+
+ onEnd: function(){
+ // summary
+ // Called after set(), when the new content has been pushed into the node
+ // It provides an opportunity for post-processing before handing back the node to the caller
+ // This default implementation checks a parseContent flag to optionally run the dojo parser over the new content
+ if(this.parseContent){
+ // populates this.parseResults if you need those..
+ this._parse();
+ }
+ return this.node; /* DomNode */
+ },
+
+ tearDown: function(){
+ // summary
+ // manually reset the Setter instance if its being re-used for example for another set()
+ // description
+ // tearDown() is not called automatically.
+ // In normal use, the Setter instance properties are simply allowed to fall out of scope
+ // but the tearDown method can be called to explicitly reset this instance.
+ delete this.parseResults;
+ delete this.node;
+ delete this.content;
+ },
+
+ onContentError: function(err){
+ return "Error occured setting content: " + err;
+ },
+
+ _mixin: function(params){
+ // mix properties/methods into the instance
+ // TODO: the intention with tearDown is to put the Setter's state
+ // back to that of the original constructor (vs. deleting/resetting everything regardless of ctor params)
+ // so we could do something here to move the original properties aside for later restoration
+ var empty = {}, key;
+ for(key in params){
+ if(key in empty){ continue; }
+ // TODO: here's our opportunity to mask the properties we dont consider configurable/overridable
+ // .. but history shows we'll almost always guess wrong
+ this[key] = params[key];
+ }
+ },
+ _parse: function(){
+ // summary:
+ // runs the dojo parser over the node contents, storing any results in this.parseResults
+ // Any errors resulting from parsing are passed to _onError for handling
+
+ var rootNode = this.node;
+ try{
+ // store the results (widgets, whatever) for potential retrieval
+ this.parseResults = dojo.parser.parse(rootNode, true);
+ }catch(e){
+ this._onError('Content', e, "Error parsing in _ContentSetter#"+this.id);
+ }
+ },
+
+ _onError: function(type, err, consoleText){
+ // summary:
+ // shows user the string that is returned by on[type]Error
+ // overide/implement on[type]Error and return your own string to customize
+ var errText = this['on' + type + 'Error'].call(this, err);
+ if(consoleText){
+ console.error(consoleText, err);
+ }else if(errText){ // a empty string won't change current content
+ dojo.html._setNodeContent(this.node, errText, true);
+ }
+ }
+ }); // end dojo.declare()
+
+ dojo.html.set = function(/* DomNode */ node, /* String|DomNode|NodeList */ cont, /* Object? */ params){
+ // summary:
+ // inserts (replaces) the given content into the given node. dojo.place(cont, node, "only")
+ // may be a better choice for simple HTML insertion.
+ // description:
+ // Unless you need to use the params capabilities of this method, you should use
+ // dojo.place(cont, node, "only"). dojo.place() has more robust support for injecting
+ // an HTML string into the DOM, but it only handles inserting an HTML string as DOM
+ // elements, or inserting a DOM node. dojo.place does not handle NodeList insertions
+ // or the other capabilities as defined by the params object for this method.
+ // node:
+ // the parent element that will receive the content
+ // cont:
+ // the content to be set on the parent element.
+ // This can be an html string, a node reference or a NodeList, dojo.NodeList, Array or other enumerable list of nodes
+ // params:
+ // Optional flags/properties to configure the content-setting. See dojo.html._ContentSetter
+ // example:
+ // A safe string/node/nodelist content replacement/injection with hooks for extension
+ // Example Usage:
+ // dojo.html.set(node, "some string");
+ // dojo.html.set(node, contentNode, {options});
+ // dojo.html.set(node, myNode.childNodes, {options});
+ if(undefined == cont){
+ console.warn("dojo.html.set: no cont argument provided, using empty string");
+ cont = "";
+ }
+ if(!params){
+ // simple and fast
+ return dojo.html._setNodeContent(node, cont, true);
+ }else{
+ // more options but slower
+ // note the arguments are reversed in order, to match the convention for instantiation via the parser
+ var op = new dojo.html._ContentSetter(dojo.mixin(
+ params,
+ { content: cont, node: node }
+ ));
+ return op.set();
+ }
+ };
+})();
+
+}
+
+if(!dojo._hasResource["dijit.layout.ContentPane"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.layout.ContentPane"] = true;
+dojo.provide("dijit.layout.ContentPane");
+
+
+
+ // for dijit.layout.marginBox2contentBox()
+
+
+
+
+
+
dojo.declare(
- "dijit.Dialog",
- [dijit.layout.ContentPane, dijit._Templated, dijit.form._FormMixin],
- {
- // summary:
+ "dijit.layout.ContentPane", dijit._Widget,
+{
+ // summary:
+ // A widget that acts as a container for mixed HTML and widgets, and includes an Ajax interface
+ // description:
+ // A widget that can be used as a stand alone widget
+ // or as a base class for other widgets.
+ //
+ // Handles replacement of document fragment using either external uri or javascript
+ // generated markup or DOM content, instantiating widgets within that content.
+ // Don't confuse it with an iframe, it only needs/wants document fragments.
+ // It's useful as a child of LayoutContainer, SplitContainer, or TabContainer.
+ // But note that those classes can contain any widget as a child.
+ // example:
+ // Some quick samples:
+ // To change the innerHTML use .attr('content', '<b>new content</b>')
+ //
+ // Or you can send it a NodeList, .attr('content', dojo.query('div [class=selected]', userSelection))
+ // please note that the nodes in NodeList will copied, not moved
+ //
+ // To do a ajax update use .attr('href', url)
+
+ // href: String
+ // The href of the content that displays now.
+ // Set this at construction if you want to load data externally when the
+ // pane is shown. (Set preload=true to load it immediately.)
+ // Changing href after creation doesn't have any effect; use attr('href', ...);
+ href: "",
+
+/*=====
+ // content: String || DomNode || NodeList || dijit._Widget
+ // The innerHTML of the ContentPane.
+ // Note that the initialization parameter / argument to attr("content", ...)
+ // can be a String, DomNode, Nodelist, or _Widget.
+ content: "",
+=====*/
+
+ // extractContent: Boolean
+ // Extract visible content from inside of <body> .... </body>.
+ // I.e., strip <html> and <head> (and it's contents) from the href
+ extractContent: false,
+
+ // parseOnLoad: Boolean
+ // Parse content and create the widgets, if any.
+ parseOnLoad: true,
+
+ // preventCache: Boolean
+ // Prevent caching of data from href's by appending a timestamp to the href.
+ preventCache: false,
+
+ // preload: Boolean
+ // Force load of data on initialization even if pane is hidden.
+ preload: false,
+
+ // refreshOnShow: Boolean
+ // Refresh (re-download) content when pane goes from hidden to shown
+ refreshOnShow: false,
+
+ // loadingMessage: String
+ // Message that shows while downloading
+ loadingMessage: "<span class='dijitContentPaneLoading'>${loadingState}</span>",
+
+ // errorMessage: String
+ // Message that shows if an error occurs
+ errorMessage: "<span class='dijitContentPaneError'>${errorState}</span>",
+
+ // isLoaded: [readonly] Boolean
+ // True if the ContentPane has data in it, either specified
+ // during initialization (via href or inline content), or set
+ // via attr('content', ...) / attr('href', ...)
+ //
+ // False if it doesn't have any content, or if ContentPane is
+ // still in the process of downloading href.
+ isLoaded: false,
+
+ baseClass: "dijitContentPane",
+
+ // doLayout: Boolean
+ // - false - don't adjust size of children
+ // - true - if there is a single visible child widget, set it's size to
+ // however big the ContentPane is
+ doLayout: true,
+
+ // ioArgs: Object
+ // Parameters to pass to xhrGet() request, for example:
+ // | <div dojoType="dijit.layout.ContentPane" href="./bar" ioArgs="{timeout: 500}">
+ ioArgs: {},
+
+ // isContainer: [protected] Boolean
+ // Indicates that this widget acts as a "parent" to the descendant widgets.
+ // When the parent is started it will call startup() on the child widgets.
+ // See also `isLayoutContainer`.
+ isContainer: true,
+
+ // isLayoutContainer: [protected] Boolean
+ // Indicates that this widget will call resize() on it's child widgets
+ // when they become visible.
+ isLayoutContainer: true,
+
+ // onLoadDeferred: [readonly] dojo.Deferred
+ // This is the `dojo.Deferred` returned by attr('href', ...) and refresh().
+ // Calling onLoadDeferred.addCallback() or addErrback() registers your
+ // callback to be called only once, when the prior attr('href', ...) call or
+ // the initial href parameter to the constructor finishes loading.
+ //
+ // This is different than an onLoad() handler which gets called any time any href is loaded.
+ onLoadDeferred: null,
+
+ // Override _Widget's attributeMap because we don't want the title attribute (used to specify
+ // tab labels) to be copied to ContentPane.domNode... otherwise a tooltip shows up over the
+ // entire pane.
+ attributeMap: dojo.delegate(dijit._Widget.prototype.attributeMap, {
+ title: []
+ }),
+
+ postMixInProperties: function(){
+ this.inherited(arguments);
+ var messages = dojo.i18n.getLocalization("dijit", "loading", this.lang);
+ this.loadingMessage = dojo.string.substitute(this.loadingMessage, messages);
+ this.errorMessage = dojo.string.substitute(this.errorMessage, messages);
+
+ // Detect if we were initialized with data
+ if(!this.href && this.srcNodeRef && this.srcNodeRef.innerHTML){
+ this.isLoaded = true;
+ }
+ },
+
+ buildRendering: function(){
+ // Overrides Widget.buildRendering().
+ // Since we have no template we need to set this.containerNode ourselves.
+ // For subclasses of ContentPane do have a template, does nothing.
+ this.inherited(arguments);
+ if(!this.containerNode){
+ // make getDescendants() work
+ this.containerNode = this.domNode;
+ }
+ },
+
+ postCreate: function(){
+ // remove the title attribute so it doesn't show up when hovering
+ // over a node
+ this.domNode.title = "";
+
+ if(!dojo.attr(this.domNode,"role")){
+ dijit.setWaiRole(this.domNode, "group");
+ }
+
+ dojo.addClass(this.domNode, this.baseClass);
+ },
+
+ startup: function(){
+ // summary:
+ // See `dijit.layout._LayoutWidget.startup` for description.
+ // Although ContentPane doesn't extend _LayoutWidget, it does implement
+ // the same API.
+ if(this._started){ return; }
+
+ var parent = dijit._Contained.prototype.getParent.call(this);
+ this._childOfLayoutWidget = parent && parent.isLayoutContainer;
+
+ // I need to call resize() on my child/children (when I become visible), unless
+ // I'm the child of a layout widget in which case my parent will call resize() on me and I'll do it then.
+ this._needLayout = !this._childOfLayoutWidget;
+
+ if(this.isLoaded){
+ dojo.forEach(this.getChildren(), function(child){
+ child.startup();
+ });
+ }
+
+ if(this._isShown() || this.preload){
+ this._onShow();
+ }
+
+ this.inherited(arguments);
+ },
+
+ _checkIfSingleChild: function(){
+ // summary:
+ // Test if we have exactly one visible widget as a child,
+ // and if so assume that we are a container for that widget,
+ // and should propogate startup() and resize() calls to it.
+ // Skips over things like data stores since they aren't visible.
+
+ var childNodes = dojo.query("> *", this.containerNode).filter(function(node){
+ return node.tagName !== "SCRIPT"; // or a regexp for hidden elements like script|area|map|etc..
+ }),
+ childWidgetNodes = childNodes.filter(function(node){
+ return dojo.hasAttr(node, "dojoType") || dojo.hasAttr(node, "widgetId");
+ }),
+ candidateWidgets = dojo.filter(childWidgetNodes.map(dijit.byNode), function(widget){
+ return widget && widget.domNode && widget.resize;
+ });
+
+ if(
+ // all child nodes are widgets
+ childNodes.length == childWidgetNodes.length &&
+
+ // all but one are invisible (like dojo.data)
+ candidateWidgets.length == 1
+ ){
+ this._singleChild = candidateWidgets[0];
+ }else{
+ delete this._singleChild;
+ }
+
+ // So we can set overflow: hidden to avoid a safari bug w/scrollbars showing up (#9449)
+ dojo.toggleClass(this.containerNode, this.baseClass + "SingleChild", !!this._singleChild);
+ },
+
+ setHref: function(/*String|Uri*/ href){
+ // summary:
+ // Deprecated. Use attr('href', ...) instead.
+ dojo.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use attr('href', ...) instead.", "", "2.0");
+ return this.attr("href", href);
+ },
+ _setHrefAttr: function(/*String|Uri*/ href){
+ // summary:
+ // Hook so attr("href", ...) works.
+ // description:
+ // Reset the (external defined) content of this pane and replace with new url
+ // Note: It delays the download until widget is shown if preload is false.
+ // href:
+ // url to the page you want to get, must be within the same domain as your mainpage
+
+ // Cancel any in-flight requests (an attr('href') will cancel any in-flight attr('href', ...))
+ this.cancel();
+
+ this.onLoadDeferred = new dojo.Deferred(dojo.hitch(this, "cancel"));
+
+ this.href = href;
+
+ // _setHrefAttr() is called during creation and by the user, after creation.
+ // only in the second case do we actually load the URL; otherwise it's done in startup()
+ if(this._created && (this.preload || this._isShown())){
+ this._load();
+ }else{
+ // Set flag to indicate that href needs to be loaded the next time the
+ // ContentPane is made visible
+ this._hrefChanged = true;
+ }
+
+ return this.onLoadDeferred; // dojo.Deferred
+ },
+
+ setContent: function(/*String|DomNode|Nodelist*/data){
+ // summary:
+ // Deprecated. Use attr('content', ...) instead.
+ dojo.deprecated("dijit.layout.ContentPane.setContent() is deprecated. Use attr('content', ...) instead.", "", "2.0");
+ this.attr("content", data);
+ },
+ _setContentAttr: function(/*String|DomNode|Nodelist*/data){
+ // summary:
+ // Hook to make attr("content", ...) work.
+ // Replaces old content with data content, include style classes from old content
+ // data:
+ // the new Content may be String, DomNode or NodeList
+ //
+ // if data is a NodeList (or an array of nodes) nodes are copied
+ // so you can import nodes from another document implicitly
+
+ // clear href so we can't run refresh and clear content
+ // refresh should only work if we downloaded the content
+ this.href = "";
+
+ // Cancel any in-flight requests (an attr('content') will cancel any in-flight attr('href', ...))
+ this.cancel();
+
+ // Even though user is just setting content directly, still need to define an onLoadDeferred
+ // because the _onLoadHandler() handler is still getting called from setContent()
+ this.onLoadDeferred = new dojo.Deferred(dojo.hitch(this, "cancel"));
+
+ this._setContent(data || "");
+
+ this._isDownloaded = false; // mark that content is from a attr('content') not an attr('href')
+
+ return this.onLoadDeferred; // dojo.Deferred
+ },
+ _getContentAttr: function(){
+ // summary:
+ // Hook to make attr("content") work
+ return this.containerNode.innerHTML;
+ },
+
+ cancel: function(){
+ // summary:
+ // Cancels an in-flight download of content
+ if(this._xhrDfd && (this._xhrDfd.fired == -1)){
+ this._xhrDfd.cancel();
+ }
+ delete this._xhrDfd; // garbage collect
+
+ this.onLoadDeferred = null;
+ },
+
+ uninitialize: function(){
+ if(this._beingDestroyed){
+ this.cancel();
+ }
+ this.inherited(arguments);
+ },
+
+ destroyRecursive: function(/*Boolean*/ preserveDom){
+ // summary:
+ // Destroy the ContentPane and its contents
+
+ // if we have multiple controllers destroying us, bail after the first
+ if(this._beingDestroyed){
+ return;
+ }
+ this.inherited(arguments);
+ },
+
+ resize: function(changeSize, resultSize){
+ // summary:
+ // See `dijit.layout._LayoutWidget.resize` for description.
+ // Although ContentPane doesn't extend _LayoutWidget, it does implement
+ // the same API.
+
+ // For the TabContainer --> BorderContainer --> ContentPane case, _onShow() is
+ // never called, so resize() is our trigger to do the initial href download.
+ if(!this._wasShown){
+ this._onShow();
+ }
+
+ this._resizeCalled = true;
+
+ // Set margin box size, unless it wasn't specified, in which case use current size.
+ if(changeSize){
+ dojo.marginBox(this.domNode, changeSize);
+ }
+
+ // Compute content box size of containerNode in case we [later] need to size our single child.
+ var cn = this.containerNode;
+ if(cn === this.domNode){
+ // If changeSize or resultSize was passed to this method and this.containerNode ==
+ // this.domNode then we can compute the content-box size without querying the node,
+ // which is more reliable (similar to LayoutWidget.resize) (see for example #9449).
+ var mb = resultSize || {};
+ dojo.mixin(mb, changeSize || {}); // changeSize overrides resultSize
+ if(!("h" in mb) || !("w" in mb)){
+ mb = dojo.mixin(dojo.marginBox(cn), mb); // just use dojo.marginBox() to fill in missing values
+ }
+ this._contentBox = dijit.layout.marginBox2contentBox(cn, mb);
+ }else{
+ this._contentBox = dojo.contentBox(cn);
+ }
+
+ // Make my children layout, or size my single child widget
+ this._layoutChildren();
+ },
+
+ _isShown: function(){
+ // summary:
+ // Returns true if the content is currently shown.
+ // description:
+ // If I am a child of a layout widget then it actually returns true if I've ever been visible,
+ // not whether I'm currently visible, since that's much faster than tracing up the DOM/widget
+ // tree every call, and at least solves the performance problem on page load by deferring loading
+ // hidden ContentPanes until they are first shown
+
+ if(this._childOfLayoutWidget){
+ // If we are TitlePane, etc - we return that only *IF* we've been resized
+ if(this._resizeCalled && "open" in this){
+ return this.open;
+ }
+ return this._resizeCalled;
+ }else if("open" in this){
+ return this.open; // for TitlePane, etc.
+ }else{
+ // TODO: with _childOfLayoutWidget check maybe this branch no longer necessary?
+ var node = this.domNode;
+ return (node.style.display != 'none') && (node.style.visibility != 'hidden') && !dojo.hasClass(node, "dijitHidden");
+ }
+ },
+
+ _onShow: function(){
+ // summary:
+ // Called when the ContentPane is made visible
+ // description:
+ // For a plain ContentPane, this is called on initialization, from startup().
+ // If the ContentPane is a hidden pane of a TabContainer etc., then it's
+ // called whenever the pane is made visible.
+ //
+ // Does necessary processing, including href download and layout/resize of
+ // child widget(s)
+
+ if(this.href){
+ if(!this._xhrDfd && // if there's an href that isn't already being loaded
+ (!this.isLoaded || this._hrefChanged || this.refreshOnShow)
+ ){
+ this.refresh();
+ }
+ }else{
+ // If we are the child of a layout widget then the layout widget will call resize() on
+ // us, and then we will size our child/children. Otherwise, we need to do it now.
+ if(!this._childOfLayoutWidget && this._needLayout){
+ // If a layout has been scheduled for when we become visible, do it now
+ this._layoutChildren();
+ }
+ }
+
+ this.inherited(arguments);
+
+ // Need to keep track of whether ContentPane has been shown (which is different than
+ // whether or not it's currently visible).
+ this._wasShown = true;
+ },
+
+ refresh: function(){
+ // summary:
+ // [Re]download contents of href and display
+ // description:
+ // 1. cancels any currently in-flight requests
+ // 2. posts "loading..." message
+ // 3. sends XHR to download new data
+
+ // Cancel possible prior in-flight request
+ this.cancel();
+
+ this.onLoadDeferred = new dojo.Deferred(dojo.hitch(this, "cancel"));
+ this._load();
+ return this.onLoadDeferred;
+ },
+
+ _load: function(){
+ // summary:
+ // Load/reload the href specified in this.href
+
+ // display loading message
+ this._setContent(this.onDownloadStart(), true);
+
+ var self = this;
+ var getArgs = {
+ preventCache: (this.preventCache || this.refreshOnShow),
+ url: this.href,
+ handleAs: "text"
+ };
+ if(dojo.isObject(this.ioArgs)){
+ dojo.mixin(getArgs, this.ioArgs);
+ }
+
+ var hand = (this._xhrDfd = (this.ioMethod || dojo.xhrGet)(getArgs));
+
+ hand.addCallback(function(html){
+ try{
+ self._isDownloaded = true;
+ self._setContent(html, false);
+ self.onDownloadEnd();
+ }catch(err){
+ self._onError('Content', err); // onContentError
+ }
+ delete self._xhrDfd;
+ return html;
+ });
+
+ hand.addErrback(function(err){
+ if(!hand.canceled){
+ // show error message in the pane
+ self._onError('Download', err); // onDownloadError
+ }
+ delete self._xhrDfd;
+ return err;
+ });
+
+ // Remove flag saying that a load is needed
+ delete this._hrefChanged;
+ },
+
+ _onLoadHandler: function(data){
+ // summary:
+ // This is called whenever new content is being loaded
+ this.isLoaded = true;
+ try{
+ this.onLoadDeferred.callback(data);
+ this.onLoad(data);
+ }catch(e){
+ console.error('Error '+this.widgetId+' running custom onLoad code: ' + e.message);
+ }
+ },
+
+ _onUnloadHandler: function(){
+ // summary:
+ // This is called whenever the content is being unloaded
+ this.isLoaded = false;
+ try{
+ this.onUnload();
+ }catch(e){
+ console.error('Error '+this.widgetId+' running custom onUnload code: ' + e.message);
+ }
+ },
+
+ destroyDescendants: function(){
+ // summary:
+ // Destroy all the widgets inside the ContentPane and empty containerNode
+
+ // Make sure we call onUnload (but only when the ContentPane has real content)
+ if(this.isLoaded){
+ this._onUnloadHandler();
+ }
+
+ // Even if this.isLoaded == false there might still be a "Loading..." message
+ // to erase, so continue...
+
+ // For historical reasons we need to delete all widgets under this.containerNode,
+ // even ones that the user has created manually.
+ var setter = this._contentSetter;
+ dojo.forEach(this.getChildren(), function(widget){
+ if(widget.destroyRecursive){
+ widget.destroyRecursive();
+ }
+ });
+ if(setter){
+ // Most of the widgets in setter.parseResults have already been destroyed, but
+ // things like Menu that have been moved to <body> haven't yet
+ dojo.forEach(setter.parseResults, function(widget){
+ if(widget.destroyRecursive && widget.domNode && widget.domNode.parentNode == dojo.body()){
+ widget.destroyRecursive();
+ }
+ });
+ delete setter.parseResults;
+ }
+
+ // And then clear away all the DOM nodes
+ dojo.html._emptyNode(this.containerNode);
+
+ // Delete any state information we have about current contents
+ delete this._singleChild;
+ },
+
+ _setContent: function(cont, isFakeContent){
+ // summary:
+ // Insert the content into the container node
+
+ // first get rid of child widgets
+ this.destroyDescendants();
+
+ // dojo.html.set will take care of the rest of the details
+ // we provide an override for the error handling to ensure the widget gets the errors
+ // configure the setter instance with only the relevant widget instance properties
+ // NOTE: unless we hook into attr, or provide property setters for each property,
+ // we need to re-configure the ContentSetter with each use
+ var setter = this._contentSetter;
+ if(! (setter && setter instanceof dojo.html._ContentSetter)){
+ setter = this._contentSetter = new dojo.html._ContentSetter({
+ node: this.containerNode,
+ _onError: dojo.hitch(this, this._onError),
+ onContentError: dojo.hitch(this, function(e){
+ // fires if a domfault occurs when we are appending this.errorMessage
+ // like for instance if domNode is a UL and we try append a DIV
+ var errMess = this.onContentError(e);
+ try{
+ this.containerNode.innerHTML = errMess;
+ }catch(e){
+ console.error('Fatal '+this.id+' could not change content due to '+e.message, e);
+ }
+ })/*,
+ _onError */
+ });
+ };
+
+ var setterParams = dojo.mixin({
+ cleanContent: this.cleanContent,
+ extractContent: this.extractContent,
+ parseContent: this.parseOnLoad
+ }, this._contentSetterParams || {});
+
+ dojo.mixin(setter, setterParams);
+
+ setter.set( (dojo.isObject(cont) && cont.domNode) ? cont.domNode : cont );
+
+ // setter params must be pulled afresh from the ContentPane each time
+ delete this._contentSetterParams;
+
+ if(!isFakeContent){
+ // Startup each top level child widget (and they will start their children, recursively)
+ dojo.forEach(this.getChildren(), function(child){
+ // The parser has already called startup on all widgets *without* a getParent() method
+ if(!this.parseOnLoad || child.getParent){
+ child.startup();
+ }
+ }, this);
+
+ // Call resize() on each of my child layout widgets,
+ // or resize() on my single child layout widget...
+ // either now (if I'm currently visible)
+ // or when I become visible
+ this._scheduleLayout();
+
+ this._onLoadHandler(cont);
+ }
+ },
+
+ _onError: function(type, err, consoleText){
+ this.onLoadDeferred.errback(err);
+
+ // shows user the string that is returned by on[type]Error
+ // overide on[type]Error and return your own string to customize
+ var errText = this['on' + type + 'Error'].call(this, err);
+ if(consoleText){
+ console.error(consoleText, err);
+ }else if(errText){// a empty string won't change current content
+ this._setContent(errText, true);
+ }
+ },
+
+ _scheduleLayout: function(){
+ // summary:
+ // Call resize() on each of my child layout widgets, either now
+ // (if I'm currently visible) or when I become visible
+ if(this._isShown()){
+ this._layoutChildren();
+ }else{
+ this._needLayout = true;
+ }
+ },
+
+ _layoutChildren: function(){
+ // summary:
+ // Since I am a Container widget, each of my children expects me to
+ // call resize() or layout() on them.
+ // description:
+ // Should be called on initialization and also whenever we get new content
+ // (from an href, or from attr('content', ...))... but deferred until
+ // the ContentPane is visible
+
+ if(this.doLayout){
+ this._checkIfSingleChild();
+ }
+
+ if(this._singleChild && this._singleChild.resize){
+ var cb = this._contentBox || dojo.contentBox(this.containerNode);
+
+ // note: if widget has padding this._contentBox will have l and t set,
+ // but don't pass them to resize() or it will doubly-offset the child
+ this._singleChild.resize({w: cb.w, h: cb.h});
+ }else{
+ // All my child widgets are independently sized (rather than matching my size),
+ // but I still need to call resize() on each child to make it layout.
+ dojo.forEach(this.getChildren(), function(widget){
+ if(widget.resize){
+ widget.resize();
+ }
+ });
+ }
+ delete this._needLayout;
+ },
+
+ // EVENT's, should be overide-able
+ onLoad: function(data){
+ // summary:
+ // Event hook, is called after everything is loaded and widgetified
+ // tags:
+ // callback
+ },
+
+ onUnload: function(){
+ // summary:
+ // Event hook, is called before old content is cleared
+ // tags:
+ // callback
+ },
+
+ onDownloadStart: function(){
+ // summary:
+ // Called before download starts.
+ // description:
+ // The string returned by this function will be the html
+ // that tells the user we are loading something.
+ // Override with your own function if you want to change text.
+ // tags:
+ // extension
+ return this.loadingMessage;
+ },
+
+ onContentError: function(/*Error*/ error){
+ // summary:
+ // Called on DOM faults, require faults etc. in content.
+ //
+ // In order to display an error message in the pane, return
+ // the error message from this method, as an HTML string.
+ //
+ // By default (if this method is not overriden), it returns
+ // nothing, so the error message is just printed to the console.
+ // tags:
+ // extension
+ },
+
+ onDownloadError: function(/*Error*/ error){
+ // summary:
+ // Called when download error occurs.
+ //
+ // In order to display an error message in the pane, return
+ // the error message from this method, as an HTML string.
+ //
+ // Default behavior (if this method is not overriden) is to display
+ // the error message inside the pane.
+ // tags:
+ // extension
+ return this.errorMessage;
+ },
+
+ onDownloadEnd: function(){
+ // summary:
+ // Called when download is finished.
+ // tags:
+ // callback
+ }
+});
+
+}
+
+if(!dojo._hasResource["dijit.TooltipDialog"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.TooltipDialog"] = true;
+dojo.provide("dijit.TooltipDialog");
+
+
+
+
+
+
+dojo.declare(
+ "dijit.TooltipDialog",
+ [dijit.layout.ContentPane, dijit._Templated, dijit.form._FormMixin, dijit._DialogMixin],
+ {
+ // summary:
+ // Pops up a dialog that appears like a Tooltip
+
+ // title: String
+ // Description of tooltip dialog (required for a11y)
+ title: "",
+
+ // doLayout: [protected] Boolean
+ // Don't change this parameter from the default value.
+ // This ContentPane parameter doesn't make sense for TooltipDialog, since TooltipDialog
+ // is never a child of a layout container, nor can you specify the size of
+ // TooltipDialog in order to control the size of an inner widget.
+ doLayout: false,
+
+ // autofocus: Boolean
+ // A Toggle to modify the default focus behavior of a Dialog, which
+ // is to focus on the first dialog element after opening the dialog.
+ // False will disable autofocusing. Default: true
+ autofocus: true,
+
+ // baseClass: [protected] String
+ // The root className to use for the various states of this widget
+ baseClass: "dijitTooltipDialog",
+
+ // _firstFocusItem: [private] [readonly] DomNode
+ // The pointer to the first focusable node in the dialog.
+ // Set by `dijit._DialogMixin._getFocusItems`.
+ _firstFocusItem: null,
+
+ // _lastFocusItem: [private] [readonly] DomNode
+ // The pointer to which node has focus prior to our dialog.
+ // Set by `dijit._DialogMixin._getFocusItems`.
+ _lastFocusItem: null,
+
+ templateString: dojo.cache("dijit", "templates/TooltipDialog.html", "<div waiRole=\"presentation\">\n\t<div class=\"dijitTooltipContainer\" waiRole=\"presentation\">\n\t\t<div class =\"dijitTooltipContents dijitTooltipFocusNode\" dojoAttachPoint=\"containerNode\" tabindex=\"-1\" waiRole=\"dialog\"></div>\n\t</div>\n\t<div class=\"dijitTooltipConnector\" waiRole=\"presentation\"></div>\n</div>\n"),
+
+ postCreate: function(){
+ this.inherited(arguments);
+ this.connect(this.containerNode, "onkeypress", "_onKey");
+ this.containerNode.title = this.title;
+ },
+
+ orient: function(/*DomNode*/ node, /*String*/ aroundCorner, /*String*/ corner){
+ // summary:
+ // Configure widget to be displayed in given position relative to the button.
+ // This is called from the dijit.popup code, and should not be called
+ // directly.
+ // tags:
+ // protected
+ var c = this._currentOrientClass;
+ if(c){
+ dojo.removeClass(this.domNode, c);
+ }
+ c = "dijitTooltipAB"+(corner.charAt(1) == 'L'?"Left":"Right")+" dijitTooltip"+(corner.charAt(0) == 'T' ? "Below" : "Above");
+ dojo.addClass(this.domNode, c);
+ this._currentOrientClass = c;
+ },
+
+ onOpen: function(/*Object*/ pos){
+ // summary:
+ // Called when dialog is displayed.
+ // This is called from the dijit.popup code, and should not be called directly.
+ // tags:
+ // protected
+
+ this.orient(this.domNode,pos.aroundCorner, pos.corner);
+ this._onShow(); // lazy load trigger
+
+ if(this.autofocus){
+ this._getFocusItems(this.containerNode);
+ dijit.focus(this._firstFocusItem);
+ }
+ },
+
+ onClose: function(){
+ // summary:
+ // Called when dialog is hidden.
+ // This is called from the dijit.popup code, and should not be called directly.
+ // tags:
+ // protected
+ this.onHide();
+ },
+
+ _onKey: function(/*Event*/ evt){
+ // summary:
+ // Handler for keyboard events
+ // description:
+ // Keep keyboard focus in dialog; close dialog on escape key
+ // tags:
+ // private
+
+ var node = evt.target;
+ var dk = dojo.keys;
+ if(evt.charOrCode === dk.TAB){
+ this._getFocusItems(this.containerNode);
+ }
+ var singleFocusItem = (this._firstFocusItem == this._lastFocusItem);
+ if(evt.charOrCode == dk.ESCAPE){
+ // Use setTimeout to avoid crash on IE, see #10396.
+ setTimeout(dojo.hitch(this, "onCancel"), 0);
+ dojo.stopEvent(evt);
+ }else if(node == this._firstFocusItem && evt.shiftKey && evt.charOrCode === dk.TAB){
+ if(!singleFocusItem){
+ dijit.focus(this._lastFocusItem); // send focus to last item in dialog
+ }
+ dojo.stopEvent(evt);
+ }else if(node == this._lastFocusItem && evt.charOrCode === dk.TAB && !evt.shiftKey){
+ if(!singleFocusItem){
+ dijit.focus(this._firstFocusItem); // send focus to first item in dialog
+ }
+ dojo.stopEvent(evt);
+ }else if(evt.charOrCode === dk.TAB){
+ // we want the browser's default tab handling to move focus
+ // but we don't want the tab to propagate upwards
+ evt.stopPropagation();
+ }
+ }
+ }
+ );
+
+}
+
+if(!dojo._hasResource["dijit.Dialog"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.Dialog"] = true;
+dojo.provide("dijit.Dialog");
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*=====
+dijit._underlay = function(kwArgs){
+ // summary:
+ // A shared instance of a `dijit.DialogUnderlay`
+ //
+ // description:
+ // A shared instance of a `dijit.DialogUnderlay` created and
+ // used by `dijit.Dialog`, though never created until some Dialog
+ // or subclass thereof is shown.
+};
+=====*/
+
+dojo.declare(
+ "dijit._DialogBase",
+ [dijit._Templated, dijit.form._FormMixin, dijit._DialogMixin],
+ {
+ // summary:
+ // A modal dialog Widget
+ //
+ // description:
// Pops up a modal dialog window, blocking access to the screen
// and also graying out the screen Dialog is extended from
// ContentPane so it supports all the same parameters (href, etc.)
-
- templateString: null,
- templateString:"<div class=\"dijitDialog\">\n\t<div dojoAttachPoint=\"titleBar\" class=\"dijitDialogTitleBar\" tabindex=\"0\" waiRole=\"dialog\">\n\t<span dojoAttachPoint=\"titleNode\" class=\"dijitDialogTitle\">${title}</span>\n\t<span dojoAttachPoint=\"closeButtonNode\" class=\"dijitDialogCloseIcon\" dojoAttachEvent=\"onclick: hide\">\n\t\t<span dojoAttachPoint=\"closeText\" class=\"closeText\">x</span>\n\t</span>\n\t</div>\n\t\t<div dojoAttachPoint=\"containerNode\" class=\"dijitDialogPaneContent\"></div>\n\t<span dojoAttachPoint=\"tabEnd\" dojoAttachEvent=\"onfocus:_cycleFocus\" tabindex=\"0\"></span>\n</div>\n",
+ //
+ // example:
+ // | <div dojoType="dijit.Dialog" href="test.html"></div>
+ //
+ // example:
+ // | var foo = new dijit.Dialog({ title: "test dialog", content: "test content" };
+ // | dojo.body().appendChild(foo.domNode);
+ // | foo.startup();
+
+ templateString: dojo.cache("dijit", "templates/Dialog.html", "<div class=\"dijitDialog\" tabindex=\"-1\" waiRole=\"dialog\" waiState=\"labelledby-${id}_title\">\n\t<div dojoAttachPoint=\"titleBar\" class=\"dijitDialogTitleBar\">\n\t<span dojoAttachPoint=\"titleNode\" class=\"dijitDialogTitle\" id=\"${id}_title\"></span>\n\t<span dojoAttachPoint=\"closeButtonNode\" class=\"dijitDialogCloseIcon\" dojoAttachEvent=\"onclick: onCancel, onmouseenter: _onCloseEnter, onmouseleave: _onCloseLeave\" title=\"${buttonCancel}\">\n\t\t<span dojoAttachPoint=\"closeText\" class=\"closeText\" title=\"${buttonCancel}\">x</span>\n\t</span>\n\t</div>\n\t\t<div dojoAttachPoint=\"containerNode\" class=\"dijitDialogPaneContent\"></div>\n</div>\n"),
+
+ attributeMap: dojo.delegate(dijit._Widget.prototype.attributeMap, {
+ title: [
+ { node: "titleNode", type: "innerHTML" },
+ { node: "titleBar", type: "attribute" }
+ ],
+ "aria-describedby":""
+ }),
// open: Boolean
- // is True or False depending on state of dialog
+ // True if Dialog is currently displayed on screen.
open: false,
// duration: Integer
// The time in milliseconds it takes the dialog to fade in and out
- duration: 400,
-
- _lastFocusItem:null,
-
- attributeMap: dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),
- {title: "titleBar"}),
+ duration: dijit.defaultDuration,
+
+ // refocus: Boolean
+ // A Toggle to modify the default focus behavior of a Dialog, which
+ // is to re-focus the element which had focus before being opened.
+ // False will disable refocusing. Default: true
+ refocus: true,
+
+ // autofocus: Boolean
+ // A Toggle to modify the default focus behavior of a Dialog, which
+ // is to focus on the first dialog element after opening the dialog.
+ // False will disable autofocusing. Default: true
+ autofocus: true,
+
+ // _firstFocusItem: [private] [readonly] DomNode
+ // The pointer to the first focusable node in the dialog.
+ // Set by `dijit._DialogMixin._getFocusItems`.
+ _firstFocusItem: null,
+
+ // _lastFocusItem: [private] [readonly] DomNode
+ // The pointer to which node has focus prior to our dialog.
+ // Set by `dijit._DialogMixin._getFocusItems`.
+ _lastFocusItem: null,
+
+ // doLayout: [protected] Boolean
+ // Don't change this parameter from the default value.
+ // This ContentPane parameter doesn't make sense for Dialog, since Dialog
+ // is never a child of a layout container, nor can you specify the size of
+ // Dialog in order to control the size of an inner widget.
+ doLayout: false,
+
+ // draggable: Boolean
+ // Toggles the moveable aspect of the Dialog. If true, Dialog
+ // can be dragged by it's title. If false it will remain centered
+ // in the viewport.
+ draggable: true,
+
+ //aria-describedby: String
+ // Allows the user to add an aria-describedby attribute onto the dialog. The value should
+ // be the id of the container element of text that describes the dialog purpose (usually
+ // the first text in the dialog).
+ // <div dojoType="dijit.Dialog" aria-describedby="intro" .....>
+ // <div id="intro">Introductory text</div>
+ // <div>rest of dialog contents</div>
+ // </div>
+ "aria-describedby":"",
+
+ postMixInProperties: function(){
+ var _nlsResources = dojo.i18n.getLocalization("dijit", "common");
+ dojo.mixin(this, _nlsResources);
+ this.inherited(arguments);
+ },
postCreate: function(){
+ dojo.style(this.domNode, {
+ display: "none",
+ position:"absolute"
+ });
dojo.body().appendChild(this.domNode);
- this.inherited("postCreate",arguments);
- this.domNode.style.display="none";
+
+ this.inherited(arguments);
+
this.connect(this, "onExecute", "hide");
this.connect(this, "onCancel", "hide");
+ this._modalconnects = [];
},
onLoad: function(){
- // summary:
- // when href is specified we need to reposition the dialog after the data is loaded
+ // summary:
+ // Called when data has been loaded from an href.
+ // Unlike most other callbacks, this function can be connected to (via `dojo.connect`)
+ // but should *not* be overriden.
+ // tags:
+ // callback
+
+ // when href is specified we need to reposition the dialog after the data is loaded
this._position();
- this.inherited("onLoad",arguments);
+ this.inherited(arguments);
+ },
+
+ _endDrag: function(e){
+ // summary:
+ // Called after dragging the Dialog. Saves the position of the dialog in the viewport.
+ // tags:
+ // private
+ if(e && e.node && e.node === this.domNode){
+ this._relativePosition = dojo.position(e.node);
+ }
},
_setup: function(){
// summary:
- // stuff we need to do before showing the Dialog for the first
+ // Stuff we need to do before showing the Dialog for the first
// time (but we defer it until right beforehand, for
- // performance reasons)
-
- this._modalconnects = [];
-
- if(this.titleBar){
- this._moveable = new dojo.dnd.Moveable(this.domNode, { handle: this.titleBar });
- }
-
- this._underlay = new dijit.DialogUnderlay();
+ // performance reasons).
+ // tags:
+ // private
var node = this.domNode;
- this._fadeIn = dojo.fx.combine(
- [dojo.fadeIn({
- node: node,
- duration: this.duration
- }),
- dojo.fadeIn({
- node: this._underlay.domNode,
- duration: this.duration,
- onBegin: dojo.hitch(this._underlay, "show")
- })
- ]
- );
-
- this._fadeOut = dojo.fx.combine(
- [dojo.fadeOut({
- node: node,
- duration: this.duration,
- onEnd: function(){
- node.style.display="none";
- }
- }),
- dojo.fadeOut({
- node: this._underlay.domNode,
- duration: this.duration,
- onEnd: dojo.hitch(this._underlay, "hide")
- })
- ]
- );
+
+ if(this.titleBar && this.draggable){
+ this._moveable = (dojo.isIE == 6) ?
+ new dojo.dnd.TimedMoveable(node, { handle: this.titleBar }) : // prevent overload, see #5285
+ new dojo.dnd.Moveable(node, { handle: this.titleBar, timeout: 0 });
+ dojo.subscribe("/dnd/move/stop",this,"_endDrag");
+ }else{
+ dojo.addClass(node,"dijitDialogFixed");
+ }
+
+ this.underlayAttrs = {
+ dialogId: this.id,
+ "class": dojo.map(this["class"].split(/\s/), function(s){ return s+"_underlay"; }).join(" ")
+ };
+
+ this._fadeIn = dojo.fadeIn({
+ node: node,
+ duration: this.duration,
+ beforeBegin: dojo.hitch(this, function(){
+ var underlay = dijit._underlay;
+ if(!underlay){
+ underlay = dijit._underlay = new dijit.DialogUnderlay(this.underlayAttrs);
+ }else{
+ underlay.attr(this.underlayAttrs);
+ }
+
+ var zIndex = 948 + dijit._dialogStack.length*2;
+ dojo.style(dijit._underlay.domNode, 'zIndex', zIndex);
+ dojo.style(this.domNode, 'zIndex', zIndex + 1);
+ underlay.show();
+ }),
+ onEnd: dojo.hitch(this, function(){
+ if(this.autofocus){
+ // find focusable Items each time dialog is shown since if dialog contains a widget the
+ // first focusable items can change
+ this._getFocusItems(this.domNode);
+ dijit.focus(this._firstFocusItem);
+ }
+ })
+ });
+
+ this._fadeOut = dojo.fadeOut({
+ node: node,
+ duration: this.duration,
+ onEnd: dojo.hitch(this, function(){
+ node.style.display = "none";
+
+ // Restore the previous dialog in the stack, or if this is the only dialog
+ // then restore to original page
+ var ds = dijit._dialogStack;
+ if(ds.length == 0){
+ dijit._underlay.hide();
+ }else{
+ dojo.style(dijit._underlay.domNode, 'zIndex', 948 + ds.length*2);
+ dijit._underlay.attr(ds[ds.length-1].underlayAttrs);
+ }
+
+ // Restore focus to wherever it was before this dialog was displayed
+ if(this.refocus){
+ var focus = this._savedFocus;
+
+ // If we are returning control to a previous dialog but for some reason
+ // that dialog didn't have a focused field, set focus to first focusable item.
+ // This situation could happen if two dialogs appeared at nearly the same time,
+ // since a dialog doesn't set it's focus until the fade-in is finished.
+ if(ds.length > 0){
+ var pd = ds[ds.length-1];
+ if(!dojo.isDescendant(focus.node, pd.domNode)){
+ pd._getFocusItems(pd.domNode);
+ focus = pd._firstFocusItem;
+ }
+ }
+
+ dijit.focus(focus);
+ }
+ })
+ });
},
uninitialize: function(){
- if(this._underlay){
- this._underlay.destroy();
+ var wasPlaying = false;
+ if(this._fadeIn && this._fadeIn.status() == "playing"){
+ wasPlaying = true;
+ this._fadeIn.stop();
+ }
+ if(this._fadeOut && this._fadeOut.status() == "playing"){
+ wasPlaying = true;
+ this._fadeOut.stop();
+ }
+
+ // Hide the underlay, unless the underlay widget has already been destroyed
+ // because we are being called during page unload (when all widgets are destroyed)
+ if((this.open || wasPlaying) && !dijit._underlay._destroyed){
+ dijit._underlay.hide();
+ }
+ if(this._moveable){
+ this._moveable.destroy();
+ }
+ this.inherited(arguments);
+ },
+
+ _size: function(){
+ // summary:
+ // If necessary, shrink dialog contents so dialog fits in viewport
+ // tags:
+ // private
+
+ this._checkIfSingleChild();
+
+ // If we resized the dialog contents earlier, reset them back to original size, so
+ // that if the user later increases the viewport size, the dialog can display w/out a scrollbar.
+ // Need to do this before the dojo.marginBox(this.domNode) call below.
+ if(this._singleChild){
+ if(this._singleChildOriginalStyle){
+ this._singleChild.domNode.style.cssText = this._singleChildOriginalStyle;
+ }
+ delete this._singleChildOriginalStyle;
+ }else{
+ dojo.style(this.containerNode, {
+ width:"auto",
+ height:"auto"
+ });
+ }
+
+ var mb = dojo.marginBox(this.domNode);
+ var viewport = dijit.getViewport();
+ if(mb.w >= viewport.w || mb.h >= viewport.h){
+ // Reduce size of dialog contents so that dialog fits in viewport
+
+ var w = Math.min(mb.w, Math.floor(viewport.w * 0.75)),
+ h = Math.min(mb.h, Math.floor(viewport.h * 0.75));
+
+ if(this._singleChild && this._singleChild.resize){
+ this._singleChildOriginalStyle = this._singleChild.domNode.style.cssText;
+ this._singleChild.resize({w: w, h: h});
+ }else{
+ dojo.style(this.containerNode, {
+ width: w + "px",
+ height: h + "px",
+ overflow: "auto",
+ position: "relative" // workaround IE bug moving scrollbar or dragging dialog
+ });
+ }
+ }else{
+ if(this._singleChild && this._singleChild.resize){
+ this._singleChild.resize();
+ }
}
},
_position: function(){
- // summary: position modal dialog in center of screen
-
- if(dojo.hasClass(dojo.body(),"dojoMove")){ return; }
- var viewport = dijit.getViewport();
- var mb = dojo.marginBox(this.domNode);
-
- var style = this.domNode.style;
- style.left = Math.floor((viewport.l + (viewport.w - mb.w)/2)) + "px";
- style.top = Math.floor((viewport.t + (viewport.h - mb.h)/2)) + "px";
- },
-
- _findLastFocus: function(/*Event*/ evt){
- // summary: called from onblur of dialog container to determine the last focusable item
- this._lastFocused = evt.target;
- },
-
- _cycleFocus: function(/*Event*/ evt){
- // summary: when tabEnd receives focus, advance focus around to titleBar
-
- // on first focus to tabEnd, store the last focused item in dialog
- if(!this._lastFocusItem){
- this._lastFocusItem = this._lastFocused;
- }
- this.titleBar.focus();
+ // summary:
+ // Position modal dialog in the viewport. If no relative offset
+ // in the viewport has been determined (by dragging, for instance),
+ // center the node. Otherwise, use the Dialog's stored relative offset,
+ // and position the node to top: left: values based on the viewport.
+ // tags:
+ // private
+ if(!dojo.hasClass(dojo.body(),"dojoMove")){
+ var node = this.domNode,
+ viewport = dijit.getViewport(),
+ p = this._relativePosition,
+ bb = p ? null : dojo._getBorderBox(node),
+ l = Math.floor(viewport.l + (p ? p.x : (viewport.w - bb.w) / 2)),
+ t = Math.floor(viewport.t + (p ? p.y : (viewport.h - bb.h) / 2))
+ ;
+ dojo.style(node,{
+ left: l + "px",
+ top: t + "px"
+ });
+ }
},
_onKey: function(/*Event*/ evt){
- if(evt.keyCode){
+ // summary:
+ // Handles the keyboard events for accessibility reasons
+ // tags:
+ // private
+
+ var ds = dijit._dialogStack;
+ if(ds[ds.length-1] != this){
+ // console.debug(this.id + ': skipping because', this, 'is not the active dialog');
+ return;
+ }
+
+ if(evt.charOrCode){
+ var dk = dojo.keys;
var node = evt.target;
- // see if we are shift-tabbing from titleBar
- if(node == this.titleBar && evt.shiftKey && evt.keyCode == dojo.keys.TAB){
- if(this._lastFocusItem){
- this._lastFocusItem.focus(); // send focus to last item in dialog if known
+ if(evt.charOrCode === dk.TAB){
+ this._getFocusItems(this.domNode);
+ }
+ var singleFocusItem = (this._firstFocusItem == this._lastFocusItem);
+ // see if we are shift-tabbing from first focusable item on dialog
+ if(node == this._firstFocusItem && evt.shiftKey && evt.charOrCode === dk.TAB){
+ if(!singleFocusItem){
+ dijit.focus(this._lastFocusItem); // send focus to last item in dialog
+ }
+ dojo.stopEvent(evt);
+ }else if(node == this._lastFocusItem && evt.charOrCode === dk.TAB && !evt.shiftKey){
+ if(!singleFocusItem){
+ dijit.focus(this._firstFocusItem); // send focus to first item in dialog
}
dojo.stopEvent(evt);
}else{
// see if the key is for the dialog
while(node){
- if(node == this.domNode){
- if(evt.keyCode == dojo.keys.ESCAPE){
- this.hide();
+ if(node == this.domNode || dojo.hasClass(node, "dijitPopup")){
+ if(evt.charOrCode == dk.ESCAPE){
+ this.onCancel();
}else{
return; // just let it go
}
}
node = node.parentNode;
}
// this key is for the disabled document window
- if(evt.keyCode != dojo.keys.TAB){ // allow tabbing into the dialog for a11y
+ if(evt.charOrCode !== dk.TAB){ // allow tabbing into the dialog for a11y
dojo.stopEvent(evt);
// opera won't tab to a div
- }else if (!dojo.isOpera){
+ }else if(!dojo.isOpera){
try{
- this.titleBar.focus();
- }catch(e){/*squelch*/}
+ this._firstFocusItem.focus();
+ }catch(e){ /*squelch*/ }
}
}
}
},
show: function(){
- // summary: display the dialog
-
- // first time we show the dialog, there's some initialization stuff to do
+ // summary:
+ // Display the dialog
+ if(this.open){ return; }
+
+ // first time we show the dialog, there's some initialization stuff to do
if(!this._alreadyInitialized){
this._setup();
this._alreadyInitialized=true;
}
if(this._fadeOut.status() == "playing"){
this._fadeOut.stop();
}
this._modalconnects.push(dojo.connect(window, "onscroll", this, "layout"));
- this._modalconnects.push(dojo.connect(document.documentElement, "onkeypress", this, "_onKey"));
-
- // IE doesn't bubble onblur events - use ondeactivate instead
- var ev = typeof(document.ondeactivate) == "object" ? "ondeactivate" : "onblur";
- this._modalconnects.push(dojo.connect(this.containerNode, ev, this, "_findLastFocus"));
-
- dojo.style(this.domNode, "opacity", 0);
- this.domNode.style.display="block";
+ this._modalconnects.push(dojo.connect(window, "onresize", this, function(){
+ // IE gives spurious resize events and can actually get stuck
+ // in an infinite loop if we don't ignore them
+ var viewport = dijit.getViewport();
+ if(!this._oldViewport ||
+ viewport.h != this._oldViewport.h ||
+ viewport.w != this._oldViewport.w){
+ this.layout();
+ this._oldViewport = viewport;
+ }
+ }));
+ this._modalconnects.push(dojo.connect(dojo.doc.documentElement, "onkeypress", this, "_onKey"));
+
+ dojo.style(this.domNode, {
+ opacity:0,
+ display:""
+ });
+
this.open = true;
- this._loadCheck(); // lazy load trigger
-
+ this._onShow(); // lazy load trigger
+
+ this._size();
this._position();
-
+ dijit._dialogStack.push(this);
this._fadeIn.play();
this._savedFocus = dijit.getFocus(this);
-
- // set timeout to allow the browser to render dialog
- setTimeout(dojo.hitch(this, function(){
- dijit.focus(this.titleBar);
- }), 50);
},
hide: function(){
- // summary
+ // summary:
// Hide the dialog
- // if we haven't been initialized yet then we aren't showing and we can just return
- if(!this._alreadyInitialized){
+ // if we haven't been initialized yet then we aren't showing and we can just return
+ // or if we aren't the active dialog, don't allow us to close yet
+ var ds = dijit._dialogStack;
+ if(!this._alreadyInitialized || this != ds[ds.length-1]){
return;
}
if(this._fadeIn.status() == "playing"){
this._fadeIn.stop();
}
+
+ // throw away current active dialog from stack -- making the previous dialog or the node on the original page active
+ ds.pop();
+
this._fadeOut.play();
- if (this._scrollConnected){
+ if(this._scrollConnected){
this._scrollConnected = false;
}
dojo.forEach(this._modalconnects, dojo.disconnect);
this._modalconnects = [];
- this.connect(this._fadeOut,"onEnd",dojo.hitch(this,function(){
- dijit.focus(this._savedFocus);
- }));
+ if(this._relativePosition){
+ delete this._relativePosition;
+ }
this.open = false;
- },
-
- layout: function() {
- // summary: position the Dialog and the underlay
- if(this.domNode.style.display == "block"){
- this._underlay.layout();
+
+ this.onHide();
+ },
+
+ layout: function(){
+ // summary:
+ // Position the Dialog and the underlay
+ // tags:
+ // private
+ if(this.domNode.style.display != "none"){
+ if(dijit._underlay){ // avoid race condition during show()
+ dijit._underlay.layout();
+ }
this._position();
}
+ },
+
+ destroy: function(){
+ dojo.forEach(this._modalconnects, dojo.disconnect);
+ if(this.refocus && this.open){
+ setTimeout(dojo.hitch(dijit,"focus",this._savedFocus), 25);
+ }
+ this.inherited(arguments);
+ },
+
+ _onCloseEnter: function(){
+ // summary:
+ // Called when user hovers over close icon
+ // tags:
+ // private
+ dojo.addClass(this.closeButtonNode, "dijitDialogCloseIcon-hover");
+ },
+
+ _onCloseLeave: function(){
+ // summary:
+ // Called when user stops hovering over close icon
+ // tags:
+ // private
+ dojo.removeClass(this.closeButtonNode, "dijitDialogCloseIcon-hover");
}
}
);
dojo.declare(
- "dijit.TooltipDialog",
- [dijit.layout.ContentPane, dijit._Templated, dijit.form._FormMixin],
- {
- // summary:
- // Pops up a dialog that appears like a Tooltip
- // title: String
- // Description of tooltip dialog (required for a11Y)
- title: "",
-
- _lastFocusItem: null,
-
- templateString: null,
- templateString:"<div class=\"dijitTooltipDialog\" >\n\t<div class=\"dijitTooltipContainer\">\n\t\t<div class =\"dijitTooltipContents dijitTooltipFocusNode\" dojoAttachPoint=\"containerNode\" tabindex=\"0\" waiRole=\"dialog\"></div>\n\t</div>\n\t<span dojoAttachPoint=\"tabEnd\" tabindex=\"0\" dojoAttachEvent=\"focus:_cycleFocus\"></span>\n\t<div class=\"dijitTooltipConnector\" ></div>\n</div>\n",
-
- postCreate: function(){
- this.inherited("postCreate",arguments);
- this.connect(this.containerNode, "onkeypress", "_onKey");
-
- // IE doesn't bubble onblur events - use ondeactivate instead
- var ev = typeof(document.ondeactivate) == "object" ? "ondeactivate" : "onblur";
- this.connect(this.containerNode, ev, "_findLastFocus");
- this.containerNode.title=this.title;
- },
-
- orient: function(/*Object*/ corner){
- // summary: configure widget to be displayed in given position relative to the button
- this.domNode.className="dijitTooltipDialog " +" dijitTooltipAB"+(corner.charAt(1)=='L'?"Left":"Right")+" dijitTooltip"+(corner.charAt(0)=='T' ? "Below" : "Above");
- },
-
- onOpen: function(/*Object*/ pos){
- // summary: called when dialog is displayed
- this.orient(pos.corner);
- this._loadCheck(); // lazy load trigger
- this.containerNode.focus();
- },
-
- _onKey: function(/*Event*/ evt){
- // summary: keep keyboard focus in dialog; close dialog on escape key
- if(evt.keyCode == dojo.keys.ESCAPE){
- this.onCancel();
- }else if(evt.target == this.containerNode && evt.shiftKey && evt.keyCode == dojo.keys.TAB){
- if (this._lastFocusItem){
- this._lastFocusItem.focus();
- }
- dojo.stopEvent(evt);
- }else if(evt.keyCode == dojo.keys.TAB){
- // we want the browser's default tab handling to move focus
- // but we don't want the tab to propagate upwards
- evt.stopPropagation();
- }
- },
-
- _findLastFocus: function(/*Event*/ evt){
- // summary: called from onblur of dialog container to determine the last focusable item
- this._lastFocused = evt.target;
- },
-
- _cycleFocus: function(/*Event*/ evt){
- // summary: when tabEnd receives focus, advance focus around to containerNode
-
- // on first focus to tabEnd, store the last focused item in dialog
- if(!this._lastFocusItem){
- this._lastFocusItem = this._lastFocused;
- }
- this.containerNode.focus();
- }
- }
+ "dijit.Dialog",
+ [dijit.layout.ContentPane, dijit._DialogBase],
+ {}
);
+// Stack of currenctly displayed dialogs, layered on top of each other
+dijit._dialogStack = [];
+
+// For back-compat. TODO: remove in 2.0
+
}
if(!dojo._hasResource["dijit._editor.selection"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit._editor.selection"] = true;
dojo.provide("dijit._editor.selection");
// FIXME:
// all of these methods branch internally for IE. This is probably
// sub-optimal in terms of runtime performance. We should investigate the
// size difference for differentiating at definition time.
dojo.mixin(dijit._editor.selection, {
getType: function(){
- // summary: Get the selection type (like document.select.type in IE).
- if(dojo.doc["selection"]){ //IE
+ // summary:
+ // Get the selection type (like dojo.doc.select.type in IE).
+ if(dojo.isIE){
return dojo.doc.selection.type.toLowerCase();
}else{
var stype = "text";
// Check if the actual selection is a CONTROL (IMG, TABLE, HR, etc...).
var oSel;
try{
oSel = dojo.global.getSelection();
}catch(e){ /*squelch*/ }
- if(oSel && oSel.rangeCount==1){
+ if(oSel && oSel.rangeCount == 1){
var oRange = oSel.getRangeAt(0);
if( (oRange.startContainer == oRange.endContainer) &&
((oRange.endOffset - oRange.startOffset) == 1) &&
(oRange.startContainer.nodeType != 3 /* text node*/)
){
stype = "control";
}
}
- return stype;
+ return stype; //String
}
},
getSelectedText: function(){
// summary:
// Return the text (no html tags) included in the current selection or null if no text is selected
- if(dojo.doc["selection"]){ //IE
+ if(dojo.isIE){
if(dijit._editor.selection.getType() == 'control'){
return null;
}
return dojo.doc.selection.createRange().text;
}else{
var selection = dojo.global.getSelection();
if(selection){
- return selection.toString();
- }
- }
+ return selection.toString(); //String
+ }
+ }
+ return '';
},
getSelectedHtml: function(){
// summary:
- // Return the html of the current selection or null if unavailable
- if(dojo.doc["selection"]){ //IE
+ // Return the html text of the current selection or null if unavailable
+ if(dojo.isIE){
if(dijit._editor.selection.getType() == 'control'){
return null;
}
return dojo.doc.selection.createRange().htmlText;
}else{
var selection = dojo.global.getSelection();
if(selection && selection.rangeCount){
- var frag = selection.getRangeAt(0).cloneContents();
- var div = document.createElement("div");
- div.appendChild(frag);
- return div.innerHTML;
+ var i;
+ var html = "";
+ for(i = 0; i < selection.rangeCount; i++){
+ //Handle selections spanning ranges, such as Opera
+ var frag = selection.getRangeAt(i).cloneContents();
+ var div = dojo.doc.createElement("div");
+ div.appendChild(frag);
+ html += div.innerHTML;
+ }
+ return html; //String
}
return null;
}
},
getSelectedElement: function(){
// summary:
// Retrieves the selected element (if any), just in the case that
// a single element (object like and image or a table) is
// selected.
- if(this.getType() == "control"){
- if(dojo.doc["selection"]){ //IE
+ if(dijit._editor.selection.getType() == "control"){
+ if(dojo.isIE){
var range = dojo.doc.selection.createRange();
if(range && range.item){
return dojo.doc.selection.createRange().item(0);
}
}else{
var selection = dojo.global.getSelection();
return selection.anchorNode.childNodes[ selection.anchorOffset ];
}
}
+ return null;
},
getParentElement: function(){
// summary:
// Get the parent element of the current selection
- if(this.getType() == "control"){
+ if(dijit._editor.selection.getType() == "control"){
var p = this.getSelectedElement();
if(p){ return p.parentNode; }
}else{
- if(dojo.doc["selection"]){ //IE
- return dojo.doc.selection.createRange().parentElement();
+ if(dojo.isIE){
+ var r = dojo.doc.selection.createRange();
+ r.collapse(true);
+ return r.parentElement();
}else{
var selection = dojo.global.getSelection();
if(selection){
var node = selection.anchorNode;
-
while(node && (node.nodeType != 1)){ // not an element
node = node.parentNode;
}
-
return node;
}
}
}
+ return null;
},
hasAncestorElement: function(/*String*/tagName /* ... */){
// summary:
// Check whether current selection has a parent element which is
// of type tagName (or one of the other specified tagName)
- return (this.getAncestorElement.apply(this, arguments) != null);
+ // tagName: String
+ // The tag name to determine if it has an ancestor of.
+ return this.getAncestorElement.apply(this, arguments) != null; //Boolean
},
getAncestorElement: function(/*String*/tagName /* ... */){
// summary:
// Return the parent element of the current selection which is of
// type tagName (or one of the other specified tagName)
-
+ // tagName: String
+ // The tag name to determine if it has an ancestor of.
var node = this.getSelectedElement() || this.getParentElement();
- return this.getParentOfType(node, arguments);
- },
-
- isTag: function(/*DomNode*/node, /*Array*/tags){
+ return this.getParentOfType(node, arguments); //DOMNode
+ },
+
+ isTag: function(/*DomNode*/ node, /*String[]*/ tags){
+ // summary:
+ // Function to determine if a node is one of an array of tags.
+ // node:
+ // The node to inspect.
+ // tags:
+ // An array of tag name strings to check to see if the node matches.
if(node && node.tagName){
var _nlc = node.tagName.toLowerCase();
for(var i=0; i<tags.length; i++){
var _tlc = String(tags[i]).toLowerCase();
if(_nlc == _tlc){
- return _tlc;
+ return _tlc; // String
}
}
}
return "";
},
- getParentOfType: function(/*DomNode*/node, /*Array*/tags){
+ getParentOfType: function(/*DomNode*/ node, /*String[]*/ tags){
+ // summary:
+ // Function to locate a parent node that matches one of a set of tags
+ // node:
+ // The node to inspect.
+ // tags:
+ // An array of tag name strings to check to see if the node matches.
while(node){
if(this.isTag(node, tags).length){
- return node;
+ return node; // DOMNode
}
node = node.parentNode;
}
return null;
},
+ collapse: function(/*Boolean*/beginning){
+ // summary:
+ // Function to collapse (clear), the current selection
+ // beginning: Boolean
+ // Boolean to indicate whether to collapse the cursor to the beginning of the selection or end.
+ if(window.getSelection){
+ var selection = dojo.global.getSelection();
+ if(selection.removeAllRanges){ // Mozilla
+ if(beginning){
+ selection.collapseToStart();
+ }else{
+ selection.collapseToEnd();
+ }
+ }else{ // Safari
+ // pulled from WebCore/ecma/kjs_window.cpp, line 2536
+ selection.collapse(beginning);
+ }
+ }else if(dojo.isIE){ // IE
+ var range = dojo.doc.selection.createRange();
+ range.collapse(beginning);
+ range.select();
+ }
+ },
+
remove: function(){
- // summary: delete current selection
- var _s = dojo.doc.selection;
- if(_s){ //IE
- if(_s.type.toLowerCase() != "none"){
- _s.clear();
- }
- return _s;
- }else{
- _s = dojo.global.getSelection();
- _s.deleteFromDocument();
- return _s;
+ // summary:
+ // Function to delete the currently selected content from the document.
+ var sel = dojo.doc.selection;
+ if(dojo.isIE){
+ if(sel.type.toLowerCase() != "none"){
+ sel.clear();
+ }
+ return sel; //Selection
+ }else{
+ sel = dojo.global.getSelection();
+ sel.deleteFromDocument();
+ return sel; //Selection
}
},
selectElementChildren: function(/*DomNode*/element,/*Boolean?*/nochangefocus){
// summary:
// clear previous selection and select the content of the node
// (excluding the node itself)
- var _window = dojo.global;
- var _document = dojo.doc;
+ // element: DOMNode
+ // The element you wish to select the children content of.
+ // nochangefocus: Boolean
+ // Boolean to indicate if the foxus should change or not.
+ var win = dojo.global;
+ var doc = dojo.doc;
+ var range;
element = dojo.byId(element);
- if(_document.selection && dojo.body().createTextRange){ // IE
- var range = element.ownerDocument.body.createTextRange();
+ if(doc.selection && dojo.isIE && dojo.body().createTextRange){ // IE
+ range = element.ownerDocument.body.createTextRange();
range.moveToElementText(element);
if(!nochangefocus){
- range.select();
- }
- }else if(_window["getSelection"]){
- var selection = _window.getSelection();
- if(selection["setBaseAndExtent"]){ // Safari
+ try{
+ range.select(); // IE throws an exception here if the widget is hidden. See #5439
+ }catch(e){ /* squelch */}
+ }
+ }else if(win.getSelection){
+ var selection = dojo.global.getSelection();
+ if(selection.setBaseAndExtent){ // Safari
selection.setBaseAndExtent(element, 0, element, element.innerText.length - 1);
- }else if(selection["selectAllChildren"]){ // Mozilla
+ }else if(dojo.isOpera){
+ //Opera's selectAllChildren doesn't seem to work right
+ //against <body> nodes and possibly others ... so
+ //we use the W3C range API
+ if(selection.rangeCount){
+ range = selection.getRangeAt(0);
+ }else{
+ range = doc.createRange();
+ }
+ range.setStart(element, 0);
+ range.setEnd(element,(element.nodeType == 3)?element.length:element.childNodes.length);
+ selection.addRange(range);
+ }else if(selection.selectAllChildren){ // Mozilla
selection.selectAllChildren(element);
}
}
},
selectElement: function(/*DomNode*/element,/*Boolean?*/nochangefocus){
// summary:
// clear previous selection and select element (including all its children)
- var _document = dojo.doc;
+ // element: DOMNode
+ // The element to select.
+ // nochangefocus: Boolean
+ // Boolean indicating if the focus should be changed. IE only.
+ var range;
+ var doc = dojo.doc;
+ var win = dojo.global;
element = dojo.byId(element);
- if(_document.selection && dojo.body().createTextRange){ // IE
+ if(dojo.isIE && dojo.body().createTextRange){
try{
- var range = dojo.body().createControlRange();
+ range = dojo.body().createControlRange();
range.addElement(element);
if(!nochangefocus){
range.select();
}
}catch(e){
this.selectElementChildren(element,nochangefocus);
}
- }else if(dojo.global["getSelection"]){
- var selection = dojo.global.getSelection();
- // FIXME: does this work on Safari?
- if(selection["removeAllRanges"]){ // Mozilla
- var range = _document.createRange() ;
- range.selectNode(element) ;
- selection.removeAllRanges() ;
- selection.addRange(range) ;
- }
- }
- }
-});
+ }else if(dojo.global.getSelection){
+ var selection = win.getSelection();
+ range = doc.createRange();
+ if(selection.removeAllRanges){ // Mozilla
+ // FIXME: does this work on Safari?
+ if(dojo.isOpera){
+ //Opera works if you use the current range on
+ //the selection if present.
+ if(selection.getRangeAt(0)){
+ range = selection.getRangeAt(0);
+ }
+ }
+ range.selectNode(element);
+ selection.removeAllRanges();
+ selection.addRange(range);
+ }
+ }
+ }
+});
+
+}
+
+if(!dojo._hasResource["dijit._editor.range"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit._editor.range"] = true;
+dojo.provide("dijit._editor.range");
+
+dijit.range={};
+
+dijit.range.getIndex=function(/*DomNode*/node, /*DomNode*/parent){
+// dojo.profile.start("dijit.range.getIndex");
+ var ret=[], retR=[];
+ var stop = parent;
+ var onode = node;
+
+ var pnode, n;
+ while(node != stop){
+ var i = 0;
+ pnode = node.parentNode;
+ while((n=pnode.childNodes[i++])){
+ if(n === node){
+ --i;
+ break;
+ }
+ }
+ if(i>=pnode.childNodes.length){
+ dojo.debug("Error finding index of a node in dijit.range.getIndex");
+ }
+ ret.unshift(i);
+ retR.unshift(i-pnode.childNodes.length);
+ node = pnode;
+ }
+
+ //normalized() can not be called so often to prevent
+ //invalidating selection/range, so we have to detect
+ //here that any text nodes in a row
+ if(ret.length > 0 && onode.nodeType == 3){
+ n = onode.previousSibling;
+ while(n && n.nodeType == 3){
+ ret[ret.length-1]--;
+ n = n.previousSibling;
+ }
+ n = onode.nextSibling;
+ while(n && n.nodeType == 3){
+ retR[retR.length-1]++;
+ n = n.nextSibling;
+ }
+ }
+// dojo.profile.end("dijit.range.getIndex");
+ return {o: ret, r:retR};
+}
+
+dijit.range.getNode = function(/*Array*/index, /*DomNode*/parent){
+ if(!dojo.isArray(index) || index.length == 0){
+ return parent;
+ }
+ var node = parent;
+// if(!node)debugger
+ dojo.every(index, function(i){
+ if(i >= 0 && i < node.childNodes.length){
+ node = node.childNodes[i];
+ }else{
+ node = null;
+ console.debug('Error: can not find node with index',index,'under parent node',parent );
+ return false; //terminate dojo.every
+ }
+ return true; //carry on the every loop
+ });
+
+ return node;
+}
+
+dijit.range.getCommonAncestor = function(n1,n2){
+ var getAncestors = function(n){
+ var as=[];
+ while(n){
+ as.unshift(n);
+ if(n.nodeName!='BODY'){
+ n = n.parentNode;
+ }else{
+ break;
+ }
+ }
+ return as;
+ };
+ var n1as = getAncestors(n1);
+ var n2as = getAncestors(n2);
+
+ var m = Math.min(n1as.length,n2as.length);
+ var com = n1as[0]; //at least, one element should be in the array: the root (BODY by default)
+ for(var i=1;i<m;i++){
+ if(n1as[i] === n2as[i]){
+ com = n1as[i]
+ }else{
+ break;
+ }
+ }
+ return com;
+}
+
+dijit.range.getAncestor = function(/*DomNode*/node, /*RegEx?*/regex, /*DomNode?*/root){
+ root = root || node.ownerDocument.body;
+ while(node && node !== root){
+ var name = node.nodeName.toUpperCase() ;
+ if(regex.test(name)){
+ return node;
+ }
+
+ node = node.parentNode;
+ }
+ return null;
+}
+
+dijit.range.BlockTagNames = /^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DT|DE)$/;
+dijit.range.getBlockAncestor = function(/*DomNode*/node, /*RegEx?*/regex, /*DomNode?*/root){
+ root = root || node.ownerDocument.body;
+ regex = regex || dijit.range.BlockTagNames;
+ var block=null, blockContainer;
+ while(node && node !== root){
+ var name = node.nodeName.toUpperCase() ;
+ if(!block && regex.test(name)){
+ block = node;
+ }
+ if(!blockContainer && (/^(?:BODY|TD|TH|CAPTION)$/).test(name)){
+ blockContainer = node;
+ }
+
+ node = node.parentNode;
+ }
+ return {blockNode:block, blockContainer:blockContainer || node.ownerDocument.body};
+}
+
+dijit.range.atBeginningOfContainer = function(/*DomNode*/container, /*DomNode*/node, /*Int*/offset){
+ var atBeginning = false;
+ var offsetAtBeginning = (offset == 0);
+ if(!offsetAtBeginning && node.nodeType == 3){ //if this is a text node, check whether the left part is all space
+ if(/^[\s\xA0]+$/.test(node.nodeValue.substr(0,offset))){
+ offsetAtBeginning = true;
+ }
+ }
+ if(offsetAtBeginning){
+ var cnode = node;
+ atBeginning = true;
+ while(cnode && cnode !== container){
+ if(cnode.previousSibling){
+ atBeginning = false;
+ break;
+ }
+ cnode = cnode.parentNode;
+ }
+ }
+ return atBeginning;
+}
+
+dijit.range.atEndOfContainer = function(/*DomNode*/container, /*DomNode*/node, /*Int*/offset){
+ var atEnd = false;
+ var offsetAtEnd = (offset == (node.length || node.childNodes.length));
+ if(!offsetAtEnd && node.nodeType == 3){ //if this is a text node, check whether the right part is all space
+ if(/^[\s\xA0]+$/.test(node.nodeValue.substr(offset))){
+ offsetAtEnd = true;
+ }
+ }
+ if(offsetAtEnd){
+ var cnode = node;
+ atEnd = true;
+ while(cnode && cnode !== container){
+ if(cnode.nextSibling){
+ atEnd = false;
+ break;
+ }
+ cnode = cnode.parentNode;
+ }
+ }
+ return atEnd;
+}
+
+dijit.range.adjacentNoneTextNode=function(startnode, next){
+ var node = startnode;
+ var len = (0-startnode.length) || 0;
+ var prop = next?'nextSibling':'previousSibling';
+ while(node){
+ if(node.nodeType!=3){
+ break;
+ }
+ len += node.length
+ node = node[prop];
+ }
+ return [node,len];
+}
+
+dijit.range._w3c = Boolean(window['getSelection']);
+dijit.range.create = function(/*Window?*/win){
+ if(dijit.range._w3c){
+ return (win || dojo.global).document.createRange();
+ }else{//IE
+ return new dijit.range.W3CRange;
+ }
+}
+
+dijit.range.getSelection = function(/*Window*/win, /*Boolean?*/ignoreUpdate){
+ if(dijit.range._w3c){
+ return win.getSelection();
+ }else{//IE
+ var s = new dijit.range.ie.selection(win);
+ if(!ignoreUpdate){
+ s._getCurrentSelection();
+ }
+ return s;
+ }
+}
+
+if(!dijit.range._w3c){
+ dijit.range.ie={
+ cachedSelection: {},
+ selection: function(win){
+ this._ranges = [];
+ this.addRange = function(r, /*boolean*/internal){
+ this._ranges.push(r);
+ if(!internal){
+ r._select();
+ }
+ this.rangeCount = this._ranges.length;
+ };
+ this.removeAllRanges = function(){
+ //don't detach, the range may be used later
+// for(var i=0;i<this._ranges.length;i++){
+// this._ranges[i].detach();
+// }
+ this._ranges = [];
+ this.rangeCount = 0;
+ };
+ var _initCurrentRange = function(){
+ var r = win.document.selection.createRange();
+ var type=win.document.selection.type.toUpperCase();
+ if(type == "CONTROL"){
+ //TODO: multiple range selection(?)
+ return new dijit.range.W3CRange(dijit.range.ie.decomposeControlRange(r));
+ }else{
+ return new dijit.range.W3CRange(dijit.range.ie.decomposeTextRange(r));
+ }
+ };
+ this.getRangeAt = function(i){
+ return this._ranges[i];
+ };
+ this._getCurrentSelection = function(){
+ this.removeAllRanges();
+ var r=_initCurrentRange();
+ if(r){
+ this.addRange(r, true);
+ }
+ };
+ },
+ decomposeControlRange: function(range){
+ var firstnode = range.item(0), lastnode = range.item(range.length-1);
+ var startContainer = firstnode.parentNode, endContainer = lastnode.parentNode;
+ var startOffset = dijit.range.getIndex(firstnode, startContainer).o;
+ var endOffset = dijit.range.getIndex(lastnode, endContainer).o+1;
+ return [startContainer, startOffset,endContainer, endOffset];
+ },
+ getEndPoint: function(range, end){
+ var atmrange = range.duplicate();
+ atmrange.collapse(!end);
+ var cmpstr = 'EndTo' + (end?'End':'Start');
+ var parentNode = atmrange.parentElement();
+
+ var startnode, startOffset, lastNode;
+ if(parentNode.childNodes.length>0){
+ dojo.every(parentNode.childNodes, function(node,i){
+ var calOffset;
+ if(node.nodeType != 3){
+ atmrange.moveToElementText(node);
+
+ if(atmrange.compareEndPoints(cmpstr,range) > 0){
+ //startnode = node.previousSibling;
+ if(lastNode && lastNode.nodeType == 3){
+ //where shall we put the start? in the text node or after?
+ startnode = lastNode;
+ calOffset = true;
+ }else{
+ startnode = parentNode;
+ startOffset = i;
+ return false;
+ }
+ }else{
+ if(i == parentNode.childNodes.length-1){
+ startnode = parentNode;
+ startOffset = parentNode.childNodes.length;
+ return false;
+ }
+ }
+ }else{
+ if(i == parentNode.childNodes.length-1){//at the end of this node
+ startnode = node;
+ calOffset = true;
+ }
+ }
+ // try{
+ if(calOffset && startnode){
+ var prevnode = dijit.range.adjacentNoneTextNode(startnode)[0];
+ if(prevnode){
+ startnode = prevnode.nextSibling;
+ }else{
+ startnode = parentNode.firstChild; //firstChild must be a text node
+ }
+ var prevnodeobj = dijit.range.adjacentNoneTextNode(startnode);
+ prevnode = prevnodeobj[0];
+ var lenoffset = prevnodeobj[1];
+ if(prevnode){
+ atmrange.moveToElementText(prevnode);
+ atmrange.collapse(false);
+ }else{
+ atmrange.moveToElementText(parentNode);
+ }
+ atmrange.setEndPoint(cmpstr, range);
+ startOffset = atmrange.text.length-lenoffset;
+
+ return false;
+ }
+ // }catch(e){ debugger }
+ lastNode = node;
+ return true;
+ });
+ }else{
+ startnode = parentNode;
+ startOffset = 0;
+ }
+
+ //if at the end of startnode and we are dealing with start container, then
+ //move the startnode to nextSibling if it is a text node
+ //TODO: do this for end container?
+ if(!end && startnode.nodeType == 1 && startOffset == startnode.childNodes.length){
+ var nextnode=startnode.nextSibling;
+ if(nextnode && nextnode.nodeType == 3){
+ startnode = nextnode;
+ startOffset = 0;
+ }
+ }
+ return [startnode, startOffset];
+ },
+ setEndPoint: function(range, container, offset){
+ //text node
+ var atmrange = range.duplicate(), node, len;
+ if(container.nodeType!=3){ //normal node
+ if(offset > 0){
+ node = container.childNodes[offset-1];
+ if(node.nodeType == 3){
+ container = node;
+ offset = node.length;
+ //pass through
+ }else{
+ if(node.nextSibling && node.nextSibling.nodeType == 3){
+ container=node.nextSibling;
+ offset=0;
+ //pass through
+ }else{
+ atmrange.moveToElementText(node.nextSibling?node:container);
+ var parent = node.parentNode;
+ var tempNode = parent.insertBefore(node.ownerDocument.createTextNode(' '), node.nextSibling);
+ atmrange.collapse(false);
+ parent.removeChild(tempNode);
+ }
+ }
+ }else{
+ atmrange.moveToElementText(container);
+ atmrange.collapse(true);
+ }
+ }
+ if(container.nodeType == 3){
+ var prevnodeobj = dijit.range.adjacentNoneTextNode(container);
+ var prevnode = prevnodeobj[0];
+ len = prevnodeobj[1];
+ if(prevnode){
+ atmrange.moveToElementText(prevnode);
+ atmrange.collapse(false);
+ //if contentEditable is not inherit, the above collapse won't make the end point
+ //in the correctly position: it always has a -1 offset, so compensate it
+ if(prevnode.contentEditable!='inherit'){
+ len++;
+ }
+ }else{
+ atmrange.moveToElementText(container.parentNode);
+ atmrange.collapse(true);
+ }
+
+ offset += len;
+ if(offset>0){
+ if(atmrange.move('character',offset) != offset){
+ console.error('Error when moving!');
+ }
+ }
+ }
+
+ return atmrange;
+ },
+ decomposeTextRange: function(range){
+ var tmpary = dijit.range.ie.getEndPoint(range);
+ var startContainer = tmpary[0], startOffset = tmpary[1];
+ var endContainer = tmpary[0], endOffset = tmpary[1];
+
+ if(range.htmlText.length){
+ if(range.htmlText == range.text){ //in the same text node
+ endOffset = startOffset+range.text.length;
+ }else{
+ tmpary = dijit.range.ie.getEndPoint(range,true);
+ endContainer = tmpary[0], endOffset = tmpary[1];
+// if(startContainer.tagName == "BODY"){
+// startContainer = startContainer.firstChild;
+// }
+ }
+ }
+ return [startContainer, startOffset, endContainer, endOffset];
+ },
+ setRange: function(range, startContainer,
+ startOffset, endContainer, endOffset, collapsed){
+ var start=dijit.range.ie.setEndPoint(range, startContainer, startOffset);
+
+ range.setEndPoint('StartToStart',start);
+ if(!collapsed){
+ var end=dijit.range.ie.setEndPoint(range, endContainer, endOffset);
+ }
+ range.setEndPoint('EndToEnd',end || start);
+
+ return range;
+ }
+ }
+
+dojo.declare("dijit.range.W3CRange",null, {
+ constructor: function(){
+ if(arguments.length>0){
+ this.setStart(arguments[0][0],arguments[0][1]);
+ this.setEnd(arguments[0][2],arguments[0][3]);
+ }else{
+ this.commonAncestorContainer = null;
+ this.startContainer = null;
+ this.startOffset = 0;
+ this.endContainer = null;
+ this.endOffset = 0;
+ this.collapsed = true;
+ }
+ },
+ _updateInternal: function(){
+ if(this.startContainer !== this.endContainer){
+ this.commonAncestorContainer = dijit.range.getCommonAncestor(this.startContainer, this.endContainer);
+ }else{
+ this.commonAncestorContainer = this.startContainer;
+ }
+ this.collapsed = (this.startContainer === this.endContainer) && (this.startOffset == this.endOffset);
+ },
+ setStart: function(node, offset){
+ offset=parseInt(offset);
+ if(this.startContainer === node && this.startOffset == offset){
+ return;
+ }
+ delete this._cachedBookmark;
+
+ this.startContainer = node;
+ this.startOffset = offset;
+ if(!this.endContainer){
+ this.setEnd(node, offset);
+ }else{
+ this._updateInternal();
+ }
+ },
+ setEnd: function(node, offset){
+ offset=parseInt(offset);
+ if(this.endContainer === node && this.endOffset == offset){
+ return;
+ }
+ delete this._cachedBookmark;
+
+ this.endContainer = node;
+ this.endOffset = offset;
+ if(!this.startContainer){
+ this.setStart(node, offset);
+ }else{
+ this._updateInternal();
+ }
+ },
+ setStartAfter: function(node, offset){
+ this._setPoint('setStart', node, offset, 1);
+ },
+ setStartBefore: function(node, offset){
+ this._setPoint('setStart', node, offset, 0);
+ },
+ setEndAfter: function(node, offset){
+ this._setPoint('setEnd', node, offset, 1);
+ },
+ setEndBefore: function(node, offset){
+ this._setPoint('setEnd', node, offset, 0);
+ },
+ _setPoint: function(what, node, offset, ext){
+ var index = dijit.range.getIndex(node, node.parentNode).o;
+ this[what](node.parentNode, index.pop()+ext);
+ },
+ _getIERange: function(){
+ var r = (this._body || this.endContainer.ownerDocument.body).createTextRange();
+ dijit.range.ie.setRange(r, this.startContainer, this.startOffset, this.endContainer, this.endOffset, this.collapsed);
+ return r;
+ },
+ getBookmark: function(body){
+ this._getIERange();
+ return this._cachedBookmark;
+ },
+ _select: function(){
+ var r = this._getIERange();
+ r.select();
+ },
+ deleteContents: function(){
+ var r = this._getIERange();
+ r.pasteHTML('');
+ this.endContainer = this.startContainer;
+ this.endOffset = this.startOffset;
+ this.collapsed = true;
+ },
+ cloneRange: function(){
+ var r = new dijit.range.W3CRange([this.startContainer,this.startOffset,
+ this.endContainer,this.endOffset]);
+ r._body = this._body;
+ return r;
+ },
+ detach: function(){
+ this._body = null;
+ this.commonAncestorContainer = null;
+ this.startContainer = null;
+ this.startOffset = 0;
+ this.endContainer = null;
+ this.endOffset = 0;
+ this.collapsed = true;
+}
+});
+} //if(!dijit.range._w3c)
+
+}
+
+if(!dojo._hasResource["dijit._editor.html"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit._editor.html"] = true;
+dojo.provide("dijit._editor.html");
+
+dijit._editor.escapeXml=function(/*String*/str, /*Boolean?*/noSingleQuotes){
+ // summary:
+ // Adds escape sequences for special characters in XML: &<>"'
+ // Optionally skips escapes for single quotes
+ str = str.replace(/&/gm, "&amp;").replace(/</gm, "&lt;").replace(/>/gm, "&gt;").replace(/"/gm, "&quot;");
+ if(!noSingleQuotes){
+ str = str.replace(/'/gm, "&#39;");
+ }
+ return str; // string
+};
+
+dijit._editor.getNodeHtml=function(/* DomNode */node){
+ var output;
+ switch(node.nodeType){
+ case 1: //element node
+ var lName = node.nodeName.toLowerCase();
+ if(lName.charAt(0) == "/"){
+ // IE does some strange things with malformed HTML input, like
+ // treating a close tag </span> without an open tag <span>, as
+ // a new tag with tagName of /span. Corrupts output HTML, remove
+ // them. Other browsers don't prefix tags that way, so will
+ // never show up.
+ return "";
+ }
+ output = '<' + lName;
+
+ //store the list of attributes and sort it to have the
+ //attributes appear in the dictionary order
+ var attrarray = [];
+ var attr;
+ if(dojo.isIE && node.outerHTML){
+ var s = node.outerHTML;
+ s = s.substr(0, s.indexOf('>'))
+ .replace(/(['"])[^"']*\1/g, ''); //to make the following regexp safe
+ var reg = /(\b\w+)\s?=/g;
+ var m, key;
+ while((m = reg.exec(s))){
+ key = m[1];
+ if(key.substr(0,3) != '_dj'){
+ if(key == 'src' || key == 'href'){
+ if(node.getAttribute('_djrealurl')){
+ attrarray.push([key,node.getAttribute('_djrealurl')]);
+ continue;
+ }
+ }
+ var val, match;
+ switch(key){
+ case 'style':
+ val = node.style.cssText.toLowerCase();
+ break;
+ case 'class':
+ val = node.className;
+ break;
+ case 'width':
+ if(lName === "img"){
+ // This somehow gets lost on IE for IMG tags and the like
+ // and we have to find it in outerHTML, known IE oddity.
+ match=/width=(\S+)/i.exec(s);
+ if(match){
+ val = match[1];
+ }
+ break;
+ }
+ case 'height':
+ if(lName === "img"){
+ // This somehow gets lost on IE for IMG tags and the like
+ // and we have to find it in outerHTML, known IE oddity.
+ match=/height=(\S+)/i.exec(s);
+ if(match){
+ val = match[1];
+ }
+ break;
+ }
+ default:
+ val = node.getAttribute(key);
+ }
+ if(val != null){
+ attrarray.push([key, val.toString()]);
+ }
+ }
+ }
+ }else{
+ var i = 0;
+ while((attr = node.attributes[i++])){
+ //ignore all attributes starting with _dj which are
+ //internal temporary attributes used by the editor
+ var n = attr.name;
+ if(n.substr(0,3) != '_dj' /*&&
+ (attr.specified == undefined || attr.specified)*/){
+ var v = attr.value;
+ if(n == 'src' || n == 'href'){
+ if(node.getAttribute('_djrealurl')){
+ v = node.getAttribute('_djrealurl');
+ }
+ }
+ attrarray.push([n,v]);
+ }
+ }
+ }
+ attrarray.sort(function(a,b){
+ return a[0] < b[0] ? -1 : (a[0] == b[0] ? 0 : 1);
+ });
+ var j = 0;
+ while((attr = attrarray[j++])){
+ output += ' ' + attr[0] + '="' +
+ (dojo.isString(attr[1]) ? dijit._editor.escapeXml(attr[1], true) : attr[1]) + '"';
+ }
+ if(lName === "script"){
+ // Browsers handle script tags differently in how you get content,
+ // but innerHTML always seems to work, so insert its content that way
+ // Yes, it's bad to allow script tags in the editor code, but some people
+ // seem to want to do it, so we need to at least return them right.
+ // other plugins/filters can strip them.
+ output += '>' + node.innerHTML +'</' + lName + '>';
+ }else{
+ if(node.childNodes.length){
+ output += '>' + dijit._editor.getChildrenHtml(node)+'</' + lName +'>';
+ }else{
+ switch(lName){
+ case 'br':
+ case 'hr':
+ case 'img':
+ case 'input':
+ case 'base':
+ case 'meta':
+ case 'area':
+ case 'basefont':
+ // These should all be singly closed
+ output += ' />';
+ break;
+ default:
+ // Assume XML style separate closure for everything else.
+ output += '></' + lName + '>';
+ }
+ }
+ }
+ break;
+ case 4: // cdata
+ case 3: // text
+ // FIXME:
+ output = dijit._editor.escapeXml(node.nodeValue, true);
+ break;
+ case 8: //comment
+ // FIXME:
+ output = '<!--' + dijit._editor.escapeXml(node.nodeValue, true) + '-->';
+ break;
+ default:
+ output = "<!-- Element not recognized - Type: " + node.nodeType + " Name: " + node.nodeName + "-->";
+ }
+ return output;
+};
+
+dijit._editor.getChildrenHtml = function(/* DomNode */dom){
+ // summary:
+ // Returns the html content of a DomNode and children
+ var out = "";
+ if(!dom){ return out; }
+ var nodes = dom["childNodes"] || dom;
+
+ //IE issue.
+ //If we have an actual node we can check parent relationships on for IE,
+ //We should check, as IE sometimes builds invalid DOMS. If no parent, we can't check
+ //And should just process it and hope for the best.
+ var checkParent = !dojo.isIE || nodes !== dom;
+
+ var node, i = 0;
+ while((node = nodes[i++])){
+ //IE is broken. DOMs are supposed to be a tree. But in the case of malformed HTML, IE generates a graph
+ //meaning one node ends up with multiple references (multiple parents). This is totally wrong and invalid, but
+ //such is what it is. We have to keep track and check for this because otherise the source output HTML will have dups.
+ //No other browser generates a graph. Leave it to IE to break a fundamental DOM rule. So, we check the parent if we can
+ //If we can't, nothing more we can do other than walk it.
+ if(!checkParent || node.parentNode == dom){
+ out += dijit._editor.getNodeHtml(node);
+ }
+ }
+ return out; // String
+};
}
if(!dojo._hasResource["dijit._editor.RichText"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit._editor.RichText"] = true;
dojo.provide("dijit._editor.RichText");
// used to restore content when user leaves this page then comes back
-// but do not try doing document.write if we are using xd loading.
-// document.write will only work if RichText.js is included in the dojo.js
+// but do not try doing dojo.doc.write if we are using xd loading.
+// dojo.doc.write will only work if RichText.js is included in the dojo.js
// file. If it is included in dojo.js and you want to allow rich text saving
-// for back/forward actions, then set djConfig.allowXdRichTextSave = true.
-if(!djConfig["useXDomain"] || djConfig["allowXdRichTextSave"]){
+// for back/forward actions, then set dojo.config.allowXdRichTextSave = true.
+if(!dojo.config["useXDomain"] || dojo.config["allowXdRichTextSave"]){
if(dojo._postLoad){
(function(){
var savetextarea = dojo.doc.createElement('textarea');
- savetextarea.id = "dijit._editor.RichText.savedContent";
- var s = savetextarea.style;
- s.display='none';
- s.position='absolute';
- s.top="-100px";
- s.left="-100px"
- s.height="3px";
- s.width="3px";
+ savetextarea.id = dijit._scopeName + "._editor.RichText.savedContent";
+ dojo.style(savetextarea, {
+ display:'none',
+ position:'absolute',
+ top:"-100px",
+ height:"3px",
+ width:"3px"
+ });
dojo.body().appendChild(savetextarea);
})();
}else{
//dojo.body() is not available before onLoad is fired
- try {
- dojo.doc.write('<textarea id="dijit._editor.RichText.savedContent" ' +
+ try{
+ dojo.doc.write('<textarea id="' + dijit._scopeName + '._editor.RichText.savedContent" ' +
'style="display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;"></textarea>');
}catch(e){ }
}
}
-dojo.declare("dijit._editor.RichText", [ dijit._Widget ], {
- constructor: function(){
- // summary:
- // dijit._editor.RichText is the core of the WYSIWYG editor in dojo, which
- // provides the basic editing features. It also encapsulates the differences
- // of different js engines for various browsers
- //
- // contentPreFilters: Array
- // pre content filter function register array.
+
+dojo.declare("dijit._editor.RichText", dijit._Widget, {
+ constructor: function(params){
+ // summary:
+ // dijit._editor.RichText is the core of dijit.Editor, which provides basic
+ // WYSIWYG editing features.
+ //
+ // description:
+ // dijit._editor.RichText is the core of dijit.Editor, which provides basic
+ // WYSIWYG editing features. It also encapsulates the differences
+ // of different js engines for various browsers. Do not use this widget
+ // with an HTML &lt;TEXTAREA&gt; tag, since the browser unescapes XML escape characters,
+ // like &lt;. This can have unexpected behavior and lead to security issues
+ // such as scripting attacks.
+ //
+ // tags:
+ // private
+
+ // contentPreFilters: Function(String)[]
+ // Pre content filter function register array.
// these filters will be executed before the actual
- // editing area get the html content
+ // editing area gets the html content.
this.contentPreFilters = [];
- // contentPostFilters: Array
+ // contentPostFilters: Function(String)[]
// post content filter function register array.
- // these will be used on the resulting html
- // from contentDomPostFilters. The resuling
- // content is the final html (returned by getValue())
+ // These will be used on the resulting html
+ // from contentDomPostFilters. The resulting
+ // content is the final html (returned by getValue()).
this.contentPostFilters = [];
- // contentDomPreFilters: Array
- // pre content dom filter function register array.
- // these filters are applied after the result from
- // contentPreFilters are set to the editing area
+ // contentDomPreFilters: Function(DomNode)[]
+ // Pre content dom filter function register array.
+ // These filters are applied after the result from
+ // contentPreFilters are set to the editing area.
this.contentDomPreFilters = [];
- // contentDomPostFilters: Array
- // post content dom filter function register array.
- // these filters are executed on the editing area dom
- // the result from these will be passed to contentPostFilters
+ // contentDomPostFilters: Function(DomNode)[]
+ // Post content dom filter function register array.
+ // These filters are executed on the editing area dom.
+ // The result from these will be passed to contentPostFilters.
this.contentDomPostFilters = [];
- // editingAreaStyleSheets: Array
+ // editingAreaStyleSheets: dojo._URL[]
// array to store all the stylesheets applied to the editing area
- this.editingAreaStyleSheets=[];
+ this.editingAreaStyleSheets = [];
+
+ // Make a copy of this.events before we start writing into it, otherwise we
+ // will modify the prototype which leads to bad things on pages w/multiple editors
+ this.events = [].concat(this.events);
this._keyHandlers = {};
this.contentPreFilters.push(dojo.hitch(this, "_preFixUrlAttributes"));
if(dojo.isMoz){
- this.contentPreFilters.push(this._fixContentForMoz);
+ this.contentPreFilters.push(this._normalizeFontStyle);
+ this.contentPostFilters.push(this._removeMozBogus);
+ }
+ if(dojo.isWebKit){
+ // Try to clean up WebKit bogus artifacts. The inserted classes
+ // made by WebKit sometimes messes things up.
+ this.contentPreFilters.push(this._removeWebkitBogus);
+ this.contentPostFilters.push(this._removeWebkitBogus);
+ }
+ if(dojo.isIE){
+ // IE generates <strong> and <em> but we want to normalize to <b> and <i>
+ this.contentPostFilters.push(this._normalizeFontStyle);
}
//this.contentDomPostFilters.push(this._postDomFixUrlAttributes);
this.onLoadDeferred = new dojo.Deferred();
},
// inheritWidth: Boolean
// whether to inherit the parent's width or simply use 100%
inheritWidth: false,
- // focusOnLoad: Boolean
- // whether focusing into this instance of richtext when page onload
+ // focusOnLoad: [deprecated] Boolean
+ // Focus into this widget when the page is loaded
focusOnLoad: false,
- // name: String
- // If a save name is specified the content is saved and restored when the user
- // leave this page can come back, or if the editor is not properly closed after
- // editing has started.
+ // name: String?
+ // Specifies the name of a (hidden) <textarea> node on the page that's used to save
+ // the editor content on page leave. Used to restore editor contents after navigating
+ // to a new page and then hitting the back button.
name: "",
- // styleSheets: String
+ // styleSheets: [const] String
// semicolon (";") separated list of css files for the editing area
styleSheets: "",
- // _content: String
+ // _content: [private] String
// temporary content storage
_content: "",
// height: String
- // set height to fix the editor at a specific height, with scrolling.
- // By default, this is 300px. If you want to have the editor always
+ // Set height to fix the editor at a specific height, with scrolling.
+ // By default, this is 300px. If you want to have the editor always
// resizes to accommodate the content, use AlwaysShowToolbar plugin
- // and set height=""
+ // and set height="". If this editor is used within a layout widget,
+ // set height="100%".
height: "300px",
// minHeight: String
- // The minimum height that the editor should have
+ // The minimum height that the editor should have.
minHeight: "1em",
-
- // isClosed: Boolean
+
+ // isClosed: [private] Boolean
isClosed: true,
- // isLoaded: Boolean
+ // isLoaded: [private] Boolean
isLoaded: false,
- // _SEPARATOR: String
- // used to concat contents from multiple textareas into a single string
+ // _SEPARATOR: [private] String
+ // Used to concat contents from multiple editors into a single string,
+ // so they can be saved into a single <textarea> node. See "name" attribute.
_SEPARATOR: "@@**%%__RICHTEXTBOUNDRY__%%**@@",
- // onLoadDeferred: dojo.Deferred
- // deferred which is fired when the editor finishes loading
+ // onLoadDeferred: [protected] dojo.Deferred
+ // Deferred which is fired when the editor finishes loading
onLoadDeferred: null,
+ // isTabIndent: Boolean
+ // Make tab key and shift-tab indent and outdent rather than navigating.
+ // Caution: sing this makes web pages inaccessible to users unable to use a mouse.
+ isTabIndent: false,
+
+ // disableSpellCheck: [const] Boolean
+ // When true, disables the browser's native spell checking, if supported.
+ // Works only in Firefox.
+ disableSpellCheck: false,
+
postCreate: function(){
- // summary: init
- dojo.publish("dijit._editor.RichText::init", [this]);
+ if("textarea" == this.domNode.tagName.toLowerCase()){
+ console.warn("RichText should not be used with the TEXTAREA tag. See dijit._editor.RichText docs.");
+ }
+ dojo.publish(dijit._scopeName + "._editor.RichText::init", [this]);
this.open();
this.setupDefaultShortcuts();
},
setupDefaultShortcuts: function(){
- // summary: add some default key handlers
+ // summary:
+ // Add some default key handlers
// description:
// Overwrite this to setup your own handlers. The default
// implementation does not use Editor commands, but directly
// executes the builtin commands within the underlying browser
// support.
- var ctrl = this.KEY_CTRL;
- var exec = function(cmd, arg){
- return arguments.length == 1 ? function(){ this.execCommand(cmd); } :
- function(){ this.execCommand(cmd, arg); }
- }
- this.addKeyHandler("b", ctrl, exec("bold"));
- this.addKeyHandler("i", ctrl, exec("italic"));
- this.addKeyHandler("u", ctrl, exec("underline"));
- this.addKeyHandler("a", ctrl, exec("selectall"));
- this.addKeyHandler("s", ctrl, function () { this.save(true); });
-
- this.addKeyHandler("1", ctrl, exec("formatblock", "h1"));
- this.addKeyHandler("2", ctrl, exec("formatblock", "h2"));
- this.addKeyHandler("3", ctrl, exec("formatblock", "h3"));
- this.addKeyHandler("4", ctrl, exec("formatblock", "h4"));
-
- this.addKeyHandler("\\", ctrl, exec("insertunorderedlist"));
+ // tags:
+ // protected
+ var exec = dojo.hitch(this, function(cmd, arg){
+ return function(){
+ return !this.execCommand(cmd,arg);
+ };
+ });
+
+ var ctrlKeyHandlers = {
+ b: exec("bold"),
+ i: exec("italic"),
+ u: exec("underline"),
+ a: exec("selectall"),
+ s: function(){ this.save(true); },
+ m: function(){ this.isTabIndent = !this.isTabIndent; },
+
+ "1": exec("formatblock", "h1"),
+ "2": exec("formatblock", "h2"),
+ "3": exec("formatblock", "h3"),
+ "4": exec("formatblock", "h4"),
+
+ "\\": exec("insertunorderedlist")
+ };
+
if(!dojo.isIE){
- this.addKeyHandler("Z", ctrl, exec("redo"));
- }
- },
-
- // events: Array
+ ctrlKeyHandlers.Z = exec("redo"); //FIXME: undo?
+ }
+
+ for(var key in ctrlKeyHandlers){
+ this.addKeyHandler(key, true, false, ctrlKeyHandlers[key]);
+ }
+ },
+
+ // events: [private] String[]
// events which should be connected to the underlying editing area
events: ["onKeyPress", "onKeyDown", "onKeyUp", "onClick"],
- // events: Array
- // events which should be connected to the underlying editing
+ // captureEvents: [deprecated] String[]
+ // Events which should be connected to the underlying editing
// area, events in this array will be addListener with
- // capture=true
+ // capture=true.
+ // TODO: looking at the code I don't see any distinction between events and captureEvents,
+ // so get rid of this for 2.0 if not sooner
captureEvents: [],
_editorCommandsLocalized: false,
_localizeEditorCommands: function(){
+ // summary:
+ // When IE is running in a non-English locale, the API actually changes,
+ // so that we have to say (for example) danraku instead of p (for paragraph).
+ // Handle that here.
+ // tags:
+ // private
if(this._editorCommandsLocalized){
return;
}
this._editorCommandsLocalized = true;
//in IE, names for blockformat is locale dependent, so we cache the values here
//if the normal way fails, we try the hard way to get the list
//do not use _cacheLocalBlockFormatNames here, as it will
//trigger security warning in IE7
- //in the array below, ul can not come directly after ol,
- //otherwise the queryCommandValue returns Normal for it
- var formats = ['p', 'pre', 'address', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ol', 'div', 'ul'];
+ //put p after div, so if IE returns Normal, we show it as paragraph
+ //We can distinguish p and div if IE returns Normal, however, in order to detect that,
+ //we have to call this.document.selection.createRange().parentElement() or such, which
+ //could slow things down. Leave it as it is for now
+ var formats = ['div', 'p', 'pre', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ol', 'ul', 'address'];
var localhtml = "", format, i=0;
while((format=formats[i++])){
+ //append a <br> after each element to separate the elements more reliably
if(format.charAt(1) != 'l'){
- localhtml += "<"+format+"><span>content</span></"+format+">";
- }else{
- localhtml += "<"+format+"><li>content</li></"+format+">";
+ localhtml += "<"+format+"><span>content</span></"+format+"><br/>";
+ }else{
+ localhtml += "<"+format+"><li>content</li></"+format+"><br/>";
}
}
//queryCommandValue returns empty if we hide editNode, so move it out of screen temporary
- var div=document.createElement('div');
- div.style.position = "absolute";
- div.style.left = "-2000px";
- div.style.top = "-2000px";
- document.body.appendChild(div);
+ var div = dojo.doc.createElement('div');
+ dojo.style(div, {
+ position: "absolute",
+ top: "-2000px"
+ });
+ dojo.doc.body.appendChild(div);
div.innerHTML = localhtml;
var node = div.firstChild;
while(node){
dijit._editor.selection.selectElement(node.firstChild);
dojo.withGlobal(this.window, "selectElement", dijit._editor.selection, [node.firstChild]);
var nativename = node.tagName.toLowerCase();
- this._local2NativeFormatNames[nativename] = document.queryCommandValue("formatblock");//this.queryCommandValue("formatblock");
+ this._local2NativeFormatNames[nativename] = document.queryCommandValue("formatblock");
+ //this.queryCommandValue("formatblock");
this._native2LocalFormatNames[this._local2NativeFormatNames[nativename]] = nativename;
- node = node.nextSibling;
- }
- document.body.removeChild(div);
- },
-
- open: function(/*DomNode?*/element){
+ node = node.nextSibling.nextSibling;
+ }
+ dojo.body().removeChild(div);
+ },
+
+ open: function(/*DomNode?*/ element){
// summary:
// Transforms the node referenced in this.domNode into a rich text editing
- // node. This will result in the creation and replacement with an <iframe>
- // if designMode(FF)/contentEditable(IE) is used.
-
- if((!this.onLoadDeferred)||(this.onLoadDeferred.fired >= 0)){
+ // node.
+ // description:
+ // Sets up the editing area asynchronously. This will result in
+ // the creation and replacement with an <iframe>.
+ //
+ // A dojo.Deferred object is created at this.onLoadDeferred, and
+ // users may attach to it to be informed when the rich-text area
+ // initialization is finalized.
+ // tags:
+ // private
+
+ if(!this.onLoadDeferred || this.onLoadDeferred.fired >= 0){
this.onLoadDeferred = new dojo.Deferred();
}
if(!this.isClosed){ this.close(); }
- dojo.publish("dijit._editor.RichText::open", [ this ]);
+ dojo.publish(dijit._scopeName + "._editor.RichText::open", [ this ]);
this._content = "";
- if((arguments.length == 1)&&(element["nodeName"])){ this.domNode = element; } // else unchanged
-
- if( (this.domNode["nodeName"])&&
- (this.domNode.nodeName.toLowerCase() == "textarea")){
+ if(arguments.length == 1 && element.nodeName){ // else unchanged
+ this.domNode = element;
+ }
+
+ var dn = this.domNode;
+
+ // "html" will hold the innerHTML of the srcNodeRef and will be used to
+ // initialize the editor.
+ var html;
+
+ if(dn.nodeName && dn.nodeName.toLowerCase() == "textarea"){
// if we were created from a textarea, then we need to create a
// new editing harness node.
- this.textarea = this.domNode;
- this.name=this.textarea.name;
- var html = this._preFilterContent(this.textarea.value);
- this.domNode = dojo.doc.createElement("div");
- this.domNode.setAttribute('widgetId',this.id);
- this.textarea.removeAttribute('widgetId');
- this.domNode.cssText = this.textarea.cssText;
- this.domNode.className += " "+this.textarea.className;
- dojo.place(this.domNode, this.textarea, "before");
+ var ta = (this.textarea = dn);
+ this.name = ta.name;
+ html = ta.value;
+ dn = this.domNode = dojo.doc.createElement("div");
+ dn.setAttribute('widgetId', this.id);
+ ta.removeAttribute('widgetId');
+ dn.cssText = ta.cssText;
+ dn.className += " " + ta.className;
+ dojo.place(dn, ta, "before");
var tmpFunc = dojo.hitch(this, function(){
//some browsers refuse to submit display=none textarea, so
- //move the textarea out of screen instead
- with(this.textarea.style){
- display = "block";
- position = "absolute";
- left = top = "-1000px";
-
- if(dojo.isIE){ //nasty IE bug: abnormal formatting if overflow is not hidden
- this.__overflow = overflow;
- overflow = "hidden";
- }
+ //move the textarea off screen instead
+ dojo.style(ta, {
+ display: "block",
+ position: "absolute",
+ top: "-1000px"
+ });
+
+ if(dojo.isIE){ //nasty IE bug: abnormal formatting if overflow is not hidden
+ var s = ta.style;
+ this.__overflow = s.overflow;
+ s.overflow = "hidden";
}
});
if(dojo.isIE){
setTimeout(tmpFunc, 10);
}else{
tmpFunc();
}
- // this.domNode.innerHTML = html;
-
-// if(this.textarea.form){
-// // FIXME: port: this used to be before advice!!!
-// dojo.connect(this.textarea.form, "onsubmit", this, function(){
-// // FIXME: should we be calling close() here instead?
-// this.textarea.value = this.getValue();
-// });
-// }
- }else{
- var html = this._preFilterContent(this.getNodeChildrenHtml(this.domNode));
- this.domNode.innerHTML = '';
- }
- if(html == ""){ html = "&nbsp;"; }
-
- var content = dojo.contentBox(this.domNode);
- // var content = dojo.contentBox(this.srcNodeRef);
+ if(ta.form){
+ dojo.connect(ta.form, "onsubmit", this, function(){
+ // FIXME: should we be calling close() here instead?
+ ta.value = this.getValue();
+ });
+ }
+ }else{
+ html = dijit._editor.getChildrenHtml(dn);
+ dn.innerHTML = "";
+ }
+
+ var content = dojo.contentBox(dn);
this._oldHeight = content.h;
this._oldWidth = content.w;
this.savedContent = html;
// If we're a list item we have to put in a blank line to force the
// bullet to nicely align at the top of text
- if( (this.domNode["nodeName"]) &&
- (this.domNode.nodeName == "LI") ){
- this.domNode.innerHTML = " <br>";
- }
-
- this.editingArea = dojo.doc.createElement("div");
- this.domNode.appendChild(this.editingArea);
-
- if(this.name != "" && (!djConfig["useXDomain"] || djConfig["allowXdRichTextSave"])){
- var saveTextarea = dojo.byId("dijit._editor.RichText.savedContent");
- if(saveTextarea.value != ""){
+ if(dn.nodeName && dn.nodeName == "LI"){
+ dn.innerHTML = " <br>";
+ }
+
+ this.editingArea = dn.ownerDocument.createElement("div");
+ dn.appendChild(this.editingArea);
+
+ // User has pressed back/forward button so we lost the text in the editor, but it's saved
+ // in a hidden <textarea> (which contains the data for all the editors on this page),
+ // so get editor value from there
+ if(this.name !== "" && (!dojo.config["useXDomain"] || dojo.config["allowXdRichTextSave"])){
+ var saveTextarea = dojo.byId(dijit._scopeName + "._editor.RichText.savedContent");
+ if(saveTextarea.value !== ""){
var datas = saveTextarea.value.split(this._SEPARATOR), i=0, dat;
while((dat=datas[i++])){
var data = dat.split(":");
if(data[0] == this.name){
html = data[1];
- datas.splice(i, 1);
+ datas.splice(i, 1); // TODO: this has no effect
break;
}
}
}
- // FIXME: need to do something different for Opera/Safari
- dojo.connect(window, "onbeforeunload", this, "_saveContent");
- // dojo.connect(window, "onunload", this, "_saveContent");
+ // TODO: this is troublesome if this editor has been destroyed, should have global handler.
+ // TODO: need to clear <textarea> in global handler
+ dojo.addOnUnload(dojo.hitch(this, "_saveContent"));
}
this.isClosed = false;
- // Safari's selections go all out of whack if we do it inline,
- // so for now IE is our only hero
- //if (typeof document.body.contentEditable != "undefined") {
- if(dojo.isIE || dojo.isSafari || dojo.isOpera){ // contentEditable, easy
- var ifr = this.iframe = dojo.doc.createElement('iframe');
- ifr.src = 'javascript:void(0)';
- this.editorObject = ifr;
- ifr.style.border = "none";
- ifr.style.width = "100%";
- ifr.frameBorder = 0;
-// ifr.style.scrolling = this.height ? "auto" : "vertical";
- this.editingArea.appendChild(ifr);
- this.window = ifr.contentWindow;
- this.document = this.window.document;
- this.document.open();
- this.document.write(this._getIframeDocTxt(html));
- this.document.close();
-
+
+ var ifr = (this.editorObject = this.iframe = dojo.doc.createElement('iframe'));
+ ifr.id = this.id+"_iframe";
+ this._iframeSrc = this._getIframeDocTxt();
+ ifr.style.border = "none";
+ ifr.style.width = "100%";
+ if(this._layoutMode){
+ // iframe should be 100% height, thus getting it's height from surrounding
+ // <div> (which has the correct height set by Editor)
+ ifr.style.height = "100%";
+ }else{
if(dojo.isIE >= 7){
if(this.height){
ifr.style.height = this.height;
}
if(this.minHeight){
ifr.style.minHeight = this.minHeight;
}
}else{
ifr.style.height = this.height ? this.height : this.minHeight;
}
+ }
+ ifr.frameBorder = 0;
+ ifr._loadFunc = dojo.hitch( this, function(win){
+ this.window = win;
+ this.document = this.window.document;
if(dojo.isIE){
this._localizeEditorCommands();
}
- this.onLoad();
- }else{ // designMode in iframe
- this._drawIframe(html);
+ // Do final setup and set initial contents of editor
+ this.onLoad(html);
+
+ this.savedContent = this.getValue(true);
+ });
+
+ // Set the iframe's initial (blank) content.
+ var s = 'javascript:parent.' + dijit._scopeName + '.byId("'+this.id+'")._iframeSrc';
+ ifr.setAttribute('src', s);
+ this.editingArea.appendChild(ifr);
+
+ if(dojo.isSafari){ // Safari seems to always append iframe with src=about:blank
+ setTimeout(function(){ifr.setAttribute('src', s);},0);
}
// TODO: this is a guess at the default line-height, kinda works
- if(this.domNode.nodeName == "LI"){ this.domNode.lastChild.style.marginTop = "-1.2em"; }
- this.domNode.className += " RichTextEditable";
+ if(dn.nodeName == "LI"){
+ dn.lastChild.style.marginTop = "-1.2em";
+ }
+
+ dojo.addClass(this.domNode, "RichTextEditable");
},
//static cache variables shared among all instance of this class
_local2NativeFormatNames: {},
_native2LocalFormatNames: {},
- _localizedIframeTitles: null,
-
- _getIframeDocTxt: function(/* String */ html){
+
+ _getIframeDocTxt: function(){
+ // summary:
+ // Generates the boilerplate text of the document inside the iframe (ie, <html><head>...</head><body/></html>).
+ // Editor content (if not blank) should be added afterwards.
+ // tags:
+ // private
var _cs = dojo.getComputedStyle(this.domNode);
- if(!this.height && !dojo.isMoz){
- html="<div>"+html+"</div>";
- }
+
+ // The contents inside of <body>. The real contents are set later via a call to setValue().
+ var html = "";
+ if(dojo.isIE || (!this.height && !dojo.isMoz)){
+ // In auto-expand mode, need a wrapper div for AlwaysShowToolbar plugin to correctly
+ // expand/contract the editor as the content changes.
+ html = "<div></div>";
+ }else if(dojo.isMoz){
+ // workaround bug where can't select then delete text (until user types something
+ // into the editor)... and/or issue where typing doesn't erase selected text
+ this._cursorToStart = true;
+ html = "&nbsp;";
+ }
+
var font = [ _cs.fontWeight, _cs.fontSize, _cs.fontFamily ].join(" ");
// line height is tricky - applying a units value will mess things up.
// if we can't get a non-units value, bail out.
var lineHeight = _cs.lineHeight;
if(lineHeight.indexOf("px") >= 0){
lineHeight = parseFloat(lineHeight)/parseFloat(_cs.fontSize);
// console.debug(lineHeight);
}else if(lineHeight.indexOf("em")>=0){
lineHeight = parseFloat(lineHeight);
}else{
- lineHeight = "1.0";
- }
+ // If we can't get a non-units value, just default
+ // it to the CSS spec default of 'normal'. Seems to
+ // work better, esp on IE, than '1.0'
+ lineHeight = "normal";
+ }
+ var userStyle = "";
+ this.style.replace(/(^|;)(line-|font-?)[^;]+/g, function(match){ userStyle += match.replace(/^;/g,"") + ';'; });
+
+ // need to find any associated label element and update iframe document title
+ var label=dojo.query('label[for="'+this.id+'"]');
+
return [
this.isLeftToRight() ? "<html><head>" : "<html dir='rtl'><head>",
- (dojo.isMoz ? "<title>" + this._localizedIframeTitles.iframeEditTitle + "</title>" : ""),
+ (dojo.isMoz && label.length ? "<title>" + label[0].innerHTML + "</title>" : ""),
+ "<meta http-equiv='Content-Type' content='text/html'>",
"<style>",
"body,html {",
- " background:transparent;",
- " padding: 0;",
- " margin: 0;",
+ "\tbackground:transparent;",
+ "\tpadding: 1px 0 0 0;",
+ "\tmargin: -1px 0 0 0;", // remove extraneous vertical scrollbar on safari and firefox
+ (dojo.isWebKit?"\twidth: 100%;":""),
+ (dojo.isWebKit?"\theight: 100%;":""),
"}",
// TODO: left positioning will cause contents to disappear out of view
// if it gets too wide for the visible area
"body{",
- " top:0px; left:0px; right:0px;",
+ "\ttop:0px; left:0px; right:0px;",
+ "\tfont:", font, ";",
((this.height||dojo.isOpera) ? "" : "position: fixed;"),
- " font:", font, ";",
// FIXME: IE 6 won't understand min-height?
- " min-height:", this.minHeight, ";",
- " line-height:", lineHeight,
+ "\tmin-height:", this.minHeight, ";",
+ "\tline-height:", lineHeight,
"}",
- "p{ margin: 1em 0 !important; }",
- (this.height ?
- "" : "body,html{overflow-y:hidden;/*for IE*/} body > div {overflow-x:auto;/*for FF to show vertical scrollbar*/}"
+ "p{ margin: 1em 0; }",
+ (this.height ? // height:auto undoes the height:100%
+ "" : "body,html{overflow-y:hidden;/*for IE*/} body > div {overflow-x:auto;/*FF:horizontal scrollbar*/ overflow-y:hidden;/*safari*/ min-height:"+this.minHeight+";/*safari*/}"
),
"li > ul:-moz-first-node, li > ol:-moz-first-node{ padding-top: 1.2em; } ",
"li{ min-height:1.2em; }",
"</style>",
this._applyEditingAreaStyleSheets(),
- "</head><body>"+html+"</body></html>"
+ "</head><body onload='frameElement._loadFunc(window,document)' style='"+userStyle+"'>", html, "</body></html>"
].join(""); // String
},
- _drawIframe: function(/*String*/html){
- // summary:
- // Draws an iFrame using the existing one if one exists.
- // Used by Mozilla, Safari, and Opera
-
- if(!this.iframe){
- var ifr = this.iframe = dojo.doc.createElement("iframe");
- // this.iframe.src = "about:blank";
- // document.body.appendChild(this.iframe);
- // console.debug(this.iframe.contentDocument.open());
- // dojo.body().appendChild(this.iframe);
- var ifrs = ifr.style;
- // ifrs.border = "1px solid black";
- ifrs.border = "none";
- ifrs.lineHeight = "0"; // squash line height
- ifrs.verticalAlign = "bottom";
-// ifrs.scrolling = this.height ? "auto" : "vertical";
- this.editorObject = this.iframe;
- // get screen reader text for mozilla here, too
- this._localizedIframeTitles = dojo.i18n.getLocalization("dijit", "Textarea");
- // need to find any associated label element and update iframe document title
- var label=dojo.query('label[for="'+this.id+'"]');
- if(label.length){
- this._localizedIframeTitles.iframeEditTitle = label[0].innerHTML + " " + this._localizedIframeTitles.iframeEditTitle;
- }
- }
- // opera likes this to be outside the with block
- // this.iframe.src = "javascript:void(0)";//dojo.uri.dojoUri("src/widget/templates/richtextframe.html") + ((dojo.doc.domain != currentDomain) ? ("#"+dojo.doc.domain) : "");
- this.iframe.style.width = this.inheritWidth ? this._oldWidth : "100%";
-
- if(this.height){
- this.iframe.style.height = this.height;
- }else{
- this.iframe.height = this._oldHeight;
- }
-
- if(this.textarea){
- var tmpContent = this.srcNodeRef;
- }else{
- var tmpContent = dojo.doc.createElement('div');
- tmpContent.style.display="none";
- tmpContent.innerHTML = html;
- //append tmpContent to under the current domNode so that the margin
- //calculation below is correct
- this.editingArea.appendChild(tmpContent);
- }
-
- this.editingArea.appendChild(this.iframe);
-
- //do we want to show the content before the editing area finish loading here?
- //if external style sheets are used for the editing area, the appearance now
- //and after loading of the editing area won't be the same (and padding/margin
- //calculation above may not be accurate)
- // tmpContent.style.display = "none";
- // this.editingArea.appendChild(this.iframe);
-
- var _iframeInitialized = false;
- // console.debug(this.iframe);
- // var contentDoc = this.iframe.contentWindow.document;
-
-
- // note that on Safari lower than 420+, we have to get the iframe
- // by ID in order to get something w/ a contentDocument property
-
- var contentDoc = this.iframe.contentDocument;
- contentDoc.open();
- contentDoc.write(this._getIframeDocTxt(html));
- contentDoc.close();
-
- // now we wait for onload. Janky hack!
- var ifrFunc = dojo.hitch(this, function(){
- if(!_iframeInitialized){
- _iframeInitialized = true;
- }else{ return; }
- if(!this.editNode){
- try{
- if(this.iframe.contentWindow){
- this.window = this.iframe.contentWindow;
- this.document = this.iframe.contentWindow.document
- }else if(this.iframe.contentDocument){
- // for opera
- this.window = this.iframe.contentDocument.window;
- this.document = this.iframe.contentDocument;
- }
- if(!this.document.body){
- throw 'Error';
- }
- }catch(e){
- setTimeout(ifrFunc,500);
- _iframeInitialized = false;
- return;
- }
-
- dojo._destroyElement(tmpContent);
- this.document.designMode = "on";
- // try{
- // this.document.designMode = "on";
- // }catch(e){
- // this._tryDesignModeOnClick=true;
- // }
-
- this.onLoad();
- }else{
- dojo._destroyElement(tmpContent);
- this.editNode.innerHTML = html;
- this.onDisplayChanged();
- }
- this._preDomFilterContent(this.editNode);
- });
-
- ifrFunc();
- },
-
_applyEditingAreaStyleSheets: function(){
// summary:
// apply the specified css files in styleSheets
+ // tags:
+ // private
var files = [];
if(this.styleSheets){
files = this.styleSheets.split(';');
this.styleSheets = '';
}
//empty this.editingAreaStyleSheets here, as it will be filled in addStyleSheet
files = files.concat(this.editingAreaStyleSheets);
this.editingAreaStyleSheets = [];
var text='', i=0, url;
while((url=files[i++])){
var abstring = (new dojo._Url(dojo.global.location, url)).toString();
this.editingAreaStyleSheets.push(abstring);
- text += '<link rel="stylesheet" type="text/css" href="'+abstring+'"/>'
+ text += '<link rel="stylesheet" type="text/css" href="'+abstring+'"/>';
}
return text;
},
- addStyleSheet: function(/*dojo._Url*/uri){
+ addStyleSheet: function(/*dojo._Url*/ uri){
// summary:
// add an external stylesheet for the editing area
- // uri: a dojo.uri.Uri pointing to the url of the external css file
+ // uri:
+ // A dojo.uri.Uri pointing to the url of the external css file
var url=uri.toString();
//if uri is relative, then convert it to absolute so that it can be resolved correctly in iframe
if(url.charAt(0) == '.' || (url.charAt(0) != '/' && !uri.host)){
url = (new dojo._Url(dojo.global.location, url)).toString();
}
if(dojo.indexOf(this.editingAreaStyleSheets, url) > -1){
- console.debug("dijit._editor.RichText.addStyleSheet: Style sheet "+url+" is already applied to the editing area!");
+// console.debug("dijit._editor.RichText.addStyleSheet: Style sheet "+url+" is already applied");
return;
}
this.editingAreaStyleSheets.push(url);
- if(this.document.createStyleSheet){ //IE
- this.document.createStyleSheet(url);
- }else{ //other browser
- var head = this.document.getElementsByTagName("head")[0];
- var stylesheet = this.document.createElement("link");
- with(stylesheet){
- rel="stylesheet";
- type="text/css";
- href=url;
- }
- head.appendChild(stylesheet);
- }
- },
-
- removeStyleSheet: function(/*dojo._Url*/uri){
+ this.onLoadDeferred.addCallback(dojo.hitch(function(){
+ if(this.document.createStyleSheet){ //IE
+ this.document.createStyleSheet(url);
+ }else{ //other browser
+ var head = this.document.getElementsByTagName("head")[0];
+ var stylesheet = this.document.createElement("link");
+ stylesheet.rel="stylesheet";
+ stylesheet.type="text/css";
+ stylesheet.href=url;
+ head.appendChild(stylesheet);
+ }
+ }));
+ },
+
+ removeStyleSheet: function(/*dojo._Url*/ uri){
// summary:
// remove an external stylesheet for the editing area
var url=uri.toString();
//if uri is relative, then convert it to absolute so that it can be resolved correctly in iframe
if(url.charAt(0) == '.' || (url.charAt(0) != '/' && !uri.host)){
url = (new dojo._Url(dojo.global.location, url)).toString();
}
var index = dojo.indexOf(this.editingAreaStyleSheets, url);
if(index == -1){
- console.debug("dijit._editor.RichText.removeStyleSheet: Style sheet "+url+" is not applied to the editing area so it can not be removed!");
+// console.debug("dijit._editor.RichText.removeStyleSheet: Style sheet "+url+" has not been applied");
return;
}
delete this.editingAreaStyleSheets[index];
- dojo.withGlobal(this.window,'query', dojo, ['link:[href="'+url+'"]']).orphan()
- },
-
+ dojo.withGlobal(this.window,'query', dojo, ['link:[href="'+url+'"]']).orphan();
+ },
+
+ // disabled: Boolean
+ // The editor is disabled; the text cannot be changed.
disabled: false,
- _mozSettingProps: ['styleWithCSS','insertBrOnReturn'],
- setDisabled: function(/*Boolean*/ disabled){
- if(dojo.isIE || dojo.isSafari || dojo.isOpera){
- this.editNode.contentEditable=!disabled;
+
+ _mozSettingProps: {'styleWithCSS':false},
+ _setDisabledAttr: function(/*Boolean*/ value){
+ this.disabled = value;
+ if(!this.isLoaded){ return; } // this method requires init to be complete
+ value = !!value;
+ if(dojo.isIE || dojo.isWebKit || dojo.isOpera){
+ var preventIEfocus = dojo.isIE && (this.isLoaded || !this.focusOnLoad);
+ if(preventIEfocus){ this.editNode.unselectable = "on"; }
+ this.editNode.contentEditable = !value;
+ if(preventIEfocus){
+ var _this = this;
+ setTimeout(function(){ _this.editNode.unselectable = "off"; }, 0);
+ }
}else{ //moz
- if(disabled){
- this._mozSettings=[false,this.blockNodeForEnter==='BR'];
- }
- this.document.designMode=(disabled?'off':'on');
- if(!disabled){
- dojo.forEach(this._mozSettingProps, function(s,i){
- this.document.execCommand(s,false,this._mozSettings[i]);
- },this);
- }
-// this.document.execCommand('contentReadOnly', false, disabled);
-// if(disabled){
+ try{
+ this.document.designMode=(value?'off':'on');
+ }catch(e){ return; } // ! _disabledOK
+ if(!value && this._mozSettingProps){
+ var ps = this._mozSettingProps;
+ for(var n in ps){
+ if(ps.hasOwnProperty(n)){
+ try{
+ this.document.execCommand(n,false,ps[n]);
+ }catch(e2){}
+ }
+ }
+ }
+// this.document.execCommand('contentReadOnly', false, value);
+// if(value){
// this.blur(); //to remove the blinking caret
// }
-//
- }
- this.disabled=disabled;
+ }
+ this._disabledOK = true;
},
/* Event handlers
*****************/
- _isResized: function(){ return false; },
-
- onLoad: function(/* Event */ e){
- // summary: handler after the content of the document finishes loading
- this.isLoaded = true;
- if(this.height || dojo.isMoz){
+ onLoad: function(/*String*/ html){
+ // summary:
+ // Handler after the iframe finishes loading.
+ // html: String
+ // Editor contents should be set to this value
+ // tags:
+ // protected
+
+ // TODO: rename this to _onLoad, make empty public onLoad() method, deprecate/make protected onLoadDeferred handler?
+
+ if(!this.window.__registeredWindow){
+ this.window.__registeredWindow = true;
+ this._iframeRegHandle = dijit.registerIframe(this.iframe);
+ }
+ if(!dojo.isIE && (this.height || dojo.isMoz)){
this.editNode=this.document.body;
}else{
+ // there's a wrapper div around the content, see _getIframeDocTxt().
this.editNode=this.document.body.firstChild;
- }
- this.editNode.contentEditable = true; //should do no harm in FF
- this._preDomFilterContent(this.editNode);
-
- var events=this.events.concat(this.captureEvents),i=0,et;
- while((et=events[i++])){
- this.connect(this.document, et.toLowerCase(), et);
- }
- if(!dojo.isIE){
- try{ // sanity check for Mozilla
-// this.document.execCommand("useCSS", false, true); // old moz call
- this.document.execCommand("styleWithCSS", false, false); // new moz call
- //this.document.execCommand("insertBrOnReturn", false, false); // new moz call
- }catch(e2){ }
- // FIXME: when scrollbars appear/disappear this needs to be fired
- }else{ // IE contentEditable
+ var _this = this;
+ if(dojo.isIE){ // #4996 IE wants to focus the BODY tag
+ var tabStop = (this.tabStop = dojo.doc.createElement('<div tabIndex=-1>'));
+ this.editingArea.appendChild(tabStop);
+ this.iframe.onfocus = function(){ _this.editNode.setActive(); };
+ }
+ }
+ this.focusNode = this.editNode; // for InlineEditBox
+
+
+ var events = this.events.concat(this.captureEvents);
+ var ap = this.iframe ? this.document : this.editNode;
+ dojo.forEach(events, function(item){
+ this.connect(ap, item.toLowerCase(), item);
+ }, this);
+
+ if(dojo.isIE){ // IE contentEditable
+ this.connect(this.document, "onmousedown", "_onIEMouseDown"); // #4996 fix focus
+
// give the node Layout on IE
+ // TODO: this may no longer be needed, since we've reverted IE to using an iframe,
+ // not contentEditable. Removing it would also probably remove the need for creating
+ // the extra <div> in _getIframeDocTxt()
this.editNode.style.zoom = 1.0;
}
+ if(dojo.isWebKit){
+ //WebKit sometimes doesn't fire right on selections, so the toolbar
+ //doesn't update right. Therefore, help it out a bit with an additional
+ //listener. A mouse up will typically indicate a display change, so fire this
+ //and get the toolbar to adapt. Reference: #9532
+ this._webkitListener = this.connect(this.document, "onmouseup", "onDisplayChanged");
+ }
+
+ if(dojo.isIE){
+ // Try to make sure 'hidden' elements aren't visible in edit mode (like browsers other than IE
+ // do). See #9103
+ try{
+ this.document.execCommand('RespectVisibilityInDesign', true, null);
+ }catch(e){/* squelch */}
+ }
+
+ this.isLoaded = true;
+
+ this.attr('disabled', this.disabled); // initialize content to editable (or not)
+
+ // Note that setValue() call will only work after isLoaded is set to true (above)
+ this.setValue(html);
+
+ if(this.onLoadDeferred){
+ this.onLoadDeferred.callback(true);
+ }
+
+ this.onDisplayChanged();
+
if(this.focusOnLoad){
- this.focus();
- }
-
- this.onDisplayChanged(e);
- if(this.onLoadDeferred){
- this.onLoadDeferred.callback(true);
+ // after the document loads, then set focus after updateInterval expires so that
+ // onNormalizedDisplayChanged has run to avoid input caret issues
+ dojo.addOnLoad(dojo.hitch(this, function(){ setTimeout(dojo.hitch(this, "focus"), this.updateInterval); }));
}
},
onKeyDown: function(/* Event */ e){
- // summary: Fired on keydown
-
-// console.info("onkeydown:", e.keyCode);
+ // summary:
+ // Handler for onkeydown event
+ // tags:
+ // protected
// we need this event at the moment to get the events from control keys
// such as the backspace. It might be possible to add this to Dojo, so that
// keyPress events can be emulated by the keyDown and keyUp detection.
+
+ if(e.keyCode === dojo.keys.TAB && this.isTabIndent ){
+ dojo.stopEvent(e); //prevent tab from moving focus out of editor
+
+ // FIXME: this is a poor-man's indent/outdent. It would be
+ // better if it added 4 "&nbsp;" chars in an undoable way.
+ // Unfortunately pasteHTML does not prove to be undoable
+ if(this.queryCommandEnabled((e.shiftKey ? "outdent" : "indent"))){
+ this.execCommand((e.shiftKey ? "outdent" : "indent"));
+ }
+ }
if(dojo.isIE){
- if(e.keyCode === dojo.keys.BACKSPACE && this.document.selection.type === "Control"){
+ if(e.keyCode == dojo.keys.TAB && !this.isTabIndent){
+ if(e.shiftKey && !e.ctrlKey && !e.altKey){
+ // focus the BODY so the browser will tab away from it instead
+ this.iframe.focus();
+ }else if(!e.shiftKey && !e.ctrlKey && !e.altKey){
+ // focus the BODY so the browser will tab away from it instead
+ this.tabStop.focus();
+ }
+ }else if(e.keyCode === dojo.keys.BACKSPACE && this.document.selection.type === "Control"){
// IE has a bug where if a non-text object is selected in the editor,
- // hitting backspace would act as if the browser's back button was
- // clicked instead of deleting the object. see #1069
+ // hitting backspace would act as if the browser's back button was
+ // clicked instead of deleting the object. see #1069
dojo.stopEvent(e);
this.execCommand("delete");
- }else if( (65 <= e.keyCode&&e.keyCode <= 90) ||
- (e.keyCode>=37&&e.keyCode<=40) // FIXME: get this from connect() instead!
+ }else if((65 <= e.keyCode && e.keyCode <= 90) ||
+ (e.keyCode>=37 && e.keyCode<=40) // FIXME: get this from connect() instead!
){ //arrow keys
e.charCode = e.keyCode;
this.onKeyPress(e);
}
}
- else if (dojo.isMoz){
- if(e.keyCode == dojo.keys.TAB && !e.shiftKey && !e.ctrlKey && !e.altKey && this.iframe){
- // update iframe document title for screen reader
- this.iframe.contentDocument.title = this._localizedIframeTitles.iframeFocusTitle;
-
- // Place focus on the iframe. A subsequent tab or shift tab will put focus
- // on the correct control.
- this.iframe.focus(); // this.focus(); won't work
- dojo.stopEvent(e);
- }else if (e.keyCode == dojo.keys.TAB && e.shiftKey){
- // if there is a toolbar, set focus to it, otherwise ignore
- if (this.toolbar){
- this.toolbar.focus();
- }
- dojo.stopEvent(e);
- }
- }
+ return true;
},
onKeyUp: function(e){
- // summary: Fired on keyup
+ // summary:
+ // Handler for onkeyup event
+ // tags:
+ // callback
return;
},
- KEY_CTRL: 1,
- KEY_SHIFT: 2,
+ setDisabled: function(/*Boolean*/ disabled){
+ // summary:
+ // Deprecated, use attr('disabled', ...) instead.
+ // tags:
+ // deprecated
+ dojo.deprecated('dijit.Editor::setDisabled is deprecated','use dijit.Editor::attr("disabled",boolean) instead', 2.0);
+ this.attr('disabled',disabled);
+ },
+ _setValueAttr: function(/*String*/ value){
+ // summary:
+ // Registers that attr("value", foo) should call setValue(foo)
+ this.setValue(value);
+ },
+ _setDisableSpellCheckAttr: function(/*Boolean*/ disabled){
+ if(this.document){
+ dojo.attr(this.document.body, "spellcheck", !disabled);
+ }else{
+ // try again after the editor is finished loading
+ this.onLoadDeferred.addCallback(dojo.hitch(this, function(){
+ dojo.attr(this.document.body, "spellcheck", !disabled);
+ }));
+ }
+ this.disableSpellCheck = disabled;
+ },
onKeyPress: function(e){
- // summary: Fired on keypress
-
-// console.info("onkeypress:", e.keyCode);
-
- // handle the various key events
- var modifiers = e.ctrlKey ? this.KEY_CTRL : 0 | e.shiftKey?this.KEY_SHIFT : 0;
-
- var key = e.keyChar||e.keyCode;
- if(this._keyHandlers[key]){
- // console.debug("char:", e.key);
- var handlers = this._keyHandlers[key], i = 0, h;
- while((h = handlers[i++])){
- if(modifiers == h.modifiers){
- if(!h.handler.apply(this,arguments)){
+ // summary:
+ // Handle the various key events
+ // tags:
+ // protected
+
+ var c = (e.keyChar && e.keyChar.toLowerCase()) || e.keyCode,
+ handlers = this._keyHandlers[c],
+ args = arguments;
+
+ if(handlers && !e.altKey){
+ dojo.some(handlers, function(h){
+ if(!(h.shift ^ e.shiftKey) && !(h.ctrl ^ e.ctrlKey)){
+ if(!h.handler.apply(this, args)){
e.preventDefault();
}
- break;
- }
- }
+ return true;
+ }
+ }, this);
}
// function call after the character has been inserted
- setTimeout(dojo.hitch(this, function(){
- this.onKeyPressed(e);
- }), 1);
- },
-
- addKeyHandler: function(/*String*/key, /*Int*/modifiers, /*Function*/handler){
- // summary: add a handler for a keyboard shortcut
- if(!dojo.isArray(this._keyHandlers[key])){ this._keyHandlers[key] = []; }
+ if(!this._onKeyHitch){
+ this._onKeyHitch = dojo.hitch(this, "onKeyPressed");
+ }
+ setTimeout(this._onKeyHitch, 1);
+ return true;
+ },
+
+ addKeyHandler: function(/*String*/ key, /*Boolean*/ ctrl, /*Boolean*/ shift, /*Function*/ handler){
+ // summary:
+ // Add a handler for a keyboard shortcut
+ // description:
+ // The key argument should be in lowercase if it is a letter character
+ // tags:
+ // protected
+ if(!dojo.isArray(this._keyHandlers[key])){
+ this._keyHandlers[key] = [];
+ }
+ //TODO: would be nice to make this a hash instead of an array for quick lookups
this._keyHandlers[key].push({
- modifiers: modifiers || 0,
+ shift: shift || false,
+ ctrl: ctrl || false,
handler: handler
});
},
- onKeyPressed: function(/*Event*/e){
+ onKeyPressed: function(){
+ // summary:
+ // Handler for after the user has pressed a key, and the display has been updated.
+ // (Runs on a timer so that it runs after the display is updated)
+ // tags:
+ // private
this.onDisplayChanged(/*e*/); // can't pass in e
},
- onClick: function(/*Event*/e){
-// console.debug('onClick',this._tryDesignModeOnClick);
-// if(this._tryDesignModeOnClick){
-// try{
-// this.document.designMode='on';
-// this._tryDesignModeOnClick=false;
-// }catch(e){}
-// }
- this.onDisplayChanged(e); },
+ onClick: function(/*Event*/ e){
+ // summary:
+ // Handler for when the user clicks.
+ // tags:
+ // private
+
+ // console.info('onClick',this._tryDesignModeOn);
+ this.onDisplayChanged(e);
+ },
+
+ _onIEMouseDown: function(/*Event*/ e){
+ // summary:
+ // IE only to prevent 2 clicks to focus
+ // tags:
+ // protected
+
+ if(!this._focused && !this.disabled){
+ this.focus();
+ }
+ },
+
_onBlur: function(e){
+ // summary:
+ // Called from focus manager when focus has moved away from this editor
+ // tags:
+ // protected
+
+ // console.info('_onBlur')
+
+ this.inherited(arguments);
var _c=this.getValue(true);
+
if(_c!=this.savedContent){
this.onChange(_c);
this.savedContent=_c;
}
- if (dojo.isMoz && this.iframe){
- this.iframe.contentDocument.title = this._localizedIframeTitles.iframeEditTitle;
- }
-// console.info('_onBlur')
- },
- _initialFocus: true,
- _onFocus: function(/*Event*/e){
-// console.info('_onFocus')
- // summary: Fired on focus
- if( (dojo.isMoz)&&(this._initialFocus) ){
- this._initialFocus = false;
- if(this.editNode.innerHTML.replace(/^\s+|\s+$/g, "") == "&nbsp;"){
- this.placeCursorAtStart();
-// this.execCommand("selectall");
-// this.window.getSelection().collapseToStart();
- }
- }
- },
-
+ },
+ _onFocus: function(/*Event*/ e){
+ // summary:
+ // Called from focus manager when focus has moved into this editor
+ // tags:
+ // protected
+
+ // console.info('_onFocus')
+ if(!this.disabled){
+ if(!this._disabledOK){
+ this.attr('disabled', false);
+ }
+ this.inherited(arguments);
+ }
+ },
+
+ // TODO: why is this needed - should we deprecate this ?
blur: function(){
- // summary: remove focus from this instance
- if(this.iframe){
- this.window.blur();
- }else if(this.editNode){
- this.editNode.blur();
+ // summary:
+ // Remove focus from this instance.
+ // tags:
+ // deprecated
+ if(!dojo.isIE && this.window.document.documentElement && this.window.document.documentElement.focus){
+ this.window.document.documentElement.focus();
+ }else if(dojo.doc.body.focus){
+ dojo.doc.body.focus();
}
},
focus: function(){
- // summary: move focus to this instance
- if(this.iframe && !dojo.isIE){
+ // summary:
+ // Move focus to this editor
+ if(!dojo.isIE){
dijit.focus(this.iframe);
+ if(this._cursorToStart){
+ delete this._cursorToStart;
+ if(this.editNode.childNodes &&
+ this.editNode.childNodes.length === 1 &&
+ this.editNode.innerHTML === "&nbsp;"){
+ this.placeCursorAtStart();
+ }
+ }
}else if(this.editNode && this.editNode.focus){
// editNode may be hidden in display:none div, lets just punt in this case
- dijit.focus(this.editNode);
- }else{
- console.debug("Have no idea how to focus into the editor!");
- }
- },
-
-// _lastUpdate: 0,
+ //this.editNode.focus(); -> causes IE to scroll always (strict and quirks mode) to the top the Iframe
+ // if we fire the event manually and let the browser handle the focusing, the latest
+ // cursor position is focused like in FF
+ this.iframe.fireEvent('onfocus', document.createEventObject()); // createEventObject only in IE
+ // }else{
+ // TODO: should we throw here?
+ // console.debug("Have no idea how to focus into the editor!");
+ }
+ },
+
+ // _lastUpdate: 0,
updateInterval: 200,
_updateTimer: null,
- onDisplayChanged: function(/*Event*/e){
+ onDisplayChanged: function(/*Event*/ e){
// summary:
// This event will be fired everytime the display context
// changes and the result needs to be reflected in the UI.
// description:
// If you don't want to have update too often,
// onNormalizedDisplayChanged should be used instead
-
-// var _t=new Date();
- if(!this._updateTimer){
-// this._lastUpdate=_t;
- if(this._updateTimer){
- clearTimeout(this._updateTimer);
- }
- this._updateTimer=setTimeout(dojo.hitch(this,this.onNormalizedDisplayChanged),this.updateInterval);
- }
+ // tags:
+ // private
+
+ // var _t=new Date();
+ if(this._updateTimer){
+ clearTimeout(this._updateTimer);
+ }
+ if(!this._updateHandler){
+ this._updateHandler = dojo.hitch(this,"onNormalizedDisplayChanged");
+ }
+ this._updateTimer = setTimeout(this._updateHandler, this.updateInterval);
},
onNormalizedDisplayChanged: function(){
// summary:
// This event is fired every updateInterval ms or more
// description:
- // If something needs to happen immidiately after a
- // user change, please use onDisplayChanged instead
- this._updateTimer=null;
+ // If something needs to happen immediately after a
+ // user change, please use onDisplayChanged instead.
+ // tags:
+ // private
+ delete this._updateTimer;
},
onChange: function(newContent){
// summary:
- // this is fired if and only if the editor loses focus and
- // the content is changed
-
-// console.log('onChange',newContent);
- },
- _normalizeCommand: function(/*String*/cmd){
+ // This is fired if and only if the editor loses focus and
+ // the content is changed.
+ },
+ _normalizeCommand: function(/*String*/ cmd, /*Anything?*/argument){
// summary:
// Used as the advice function by dojo.connect to map our
// normalized set of commands to those supported by the target
- // browser
+ // browser.
+ // tags:
+ // private
var command = cmd.toLowerCase();
if(command == "formatblock"){
- if(dojo.isSafari){ command = "heading"; }
+ if(dojo.isSafari && argument === undefined){ command = "heading"; }
}else if(command == "hilitecolor" && !dojo.isMoz){
command = "backcolor";
}
return command;
},
- queryCommandAvailable: function(/*String*/command){
- // summary:
- // Tests whether a command is supported by the host. Clients SHOULD check
- // whether a command is supported before attempting to use it, behaviour
- // for unsupported commands is undefined.
- // command: The command to test for
+ _qcaCache: {},
+ queryCommandAvailable: function(/*String*/ command){
+ // summary:
+ // Tests whether a command is supported by the host. Clients
+ // SHOULD check whether a command is supported before attempting
+ // to use it, behaviour for unsupported commands is undefined.
+ // command:
+ // The command to test for
+ // tags:
+ // private
+
+ // memoizing version. See _queryCommandAvailable for computing version
+ var ca = this._qcaCache[command];
+ if(ca !== undefined){ return ca; }
+ return (this._qcaCache[command] = this._queryCommandAvailable(command));
+ },
+
+ _queryCommandAvailable: function(/*String*/ command){
+ // summary:
+ // See queryCommandAvailable().
+ // tags:
+ // private
+
var ie = 1;
var mozilla = 1 << 1;
- var safari = 1 << 2;
+ var webkit = 1 << 2;
var opera = 1 << 3;
- var safari420 = 1 << 4;
-
- var gt420 = dojo.isSafari;
+ var webkit420 = 1 << 4;
function isSupportedBy(browsers){
return {
ie: Boolean(browsers & ie),
mozilla: Boolean(browsers & mozilla),
- safari: Boolean(browsers & safari),
- safari420: Boolean(browsers & safari420),
+ webkit: Boolean(browsers & webkit),
+ webkit420: Boolean(browsers & webkit420),
opera: Boolean(browsers & opera)
- }
+ };
}
var supportedBy = null;
switch(command.toLowerCase()){
case "bold": case "italic": case "underline":
case "subscript": case "superscript":
case "fontname": case "fontsize":
case "forecolor": case "hilitecolor":
case "justifycenter": case "justifyfull": case "justifyleft":
- case "justifyright": case "delete": case "selectall":
- supportedBy = isSupportedBy(mozilla | ie | safari | opera);
+ case "justifyright": case "delete": case "selectall": case "toggledir":
+ supportedBy = isSupportedBy(mozilla | ie | webkit | opera);
break;
case "createlink": case "unlink": case "removeformat":
case "inserthorizontalrule": case "insertimage":
case "insertorderedlist": case "insertunorderedlist":
case "indent": case "outdent": case "formatblock":
- case "inserthtml": case "undo": case "redo": case "strikethrough":
- supportedBy = isSupportedBy(mozilla | ie | opera | safari420);
+ case "inserthtml": case "undo": case "redo": case "strikethrough": case "tabindent":
+ supportedBy = isSupportedBy(mozilla | ie | opera | webkit420);
break;
case "blockdirltr": case "blockdirrtl":
case "dirltr": case "dirrtl":
case "inlinedirltr": case "inlinedirrtl":
supportedBy = isSupportedBy(ie);
break;
case "cut": case "copy": case "paste":
- supportedBy = isSupportedBy( ie | mozilla | safari420);
+ supportedBy = isSupportedBy( ie | mozilla | webkit420);
break;
case "inserttable":
supportedBy = isSupportedBy(mozilla | ie);
break;
case "insertcell": case "insertcol": case "insertrow":
case "deletecells": case "deletecols": case "deleterows":
case "mergecells": case "splitcell":
supportedBy = isSupportedBy(ie | mozilla);
break;
default: return false;
}
return (dojo.isIE && supportedBy.ie) ||
(dojo.isMoz && supportedBy.mozilla) ||
- (dojo.isSafari && supportedBy.safari) ||
- (gt420 && supportedBy.safari420) ||
- (dojo.isOpera && supportedBy.opera); // Boolean return true if the command is supported, false otherwise
- },
-
- execCommand: function(/*String*/command, argument){
- // summary: Executes a command in the Rich Text area
- // command: The command to execute
- // argument: An optional argument to the command
+ (dojo.isWebKit && supportedBy.webkit) ||
+ (dojo.isWebKit > 420 && supportedBy.webkit420) ||
+ (dojo.isOpera && supportedBy.opera); // Boolean return true if the command is supported, false otherwise
+ },
+
+ execCommand: function(/*String*/ command, argument){
+ // summary:
+ // Executes a command in the Rich Text area
+ // command:
+ // The command to execute
+ // argument:
+ // An optional argument to the command
+ // tags:
+ // protected
var returnValue;
//focus() is required for IE to work
//In addition, focus() makes sure after the execution of
//the command, the editor receives the focus as expected
this.focus();
- command = this._normalizeCommand(command);
- if(argument != undefined){
+ command = this._normalizeCommand(command, argument);
+
+
+ if(argument !== undefined){
if(command == "heading"){
throw new Error("unimplemented");
}else if((command == "formatblock") && dojo.isIE){
argument = '<'+argument+'>';
}
}
- if(command == "inserthtml"){
- //TODO: we shall probably call _preDomFilterContent here as well
- argument=this._preFilterContent(argument);
- if(dojo.isIE){
- var insertRange = this.document.selection.createRange();
- insertRange.pasteHTML(argument);
- insertRange.select();
- //insertRange.collapse(true);
- returnValue=true;
- }else if(dojo.isMoz && !argument.length){
- //mozilla can not inserthtml an empty html to delete current selection
- //so we delete the selection instead in this case
- dojo.withGlobal(this.window,'remove',dijit._editor.selection); // FIXME
- returnValue=true;
- }else{
- returnValue=this.document.execCommand(command, false, argument);
- }
- }else if(
- (command == "unlink")&&
- (this.queryCommandEnabled("unlink"))&&
- (dojo.isMoz || dojo.isSafari)
- ){
- // fix up unlink in Mozilla to unlink the link and not just the selection
-
- // grab selection
- // Mozilla gets upset if we just store the range so we have to
- // get the basic properties and recreate to save the selection
- var selection = this.window.getSelection();
- // var selectionRange = selection.getRangeAt(0);
- // var selectionStartContainer = selectionRange.startContainer;
- // var selectionStartOffset = selectionRange.startOffset;
- // var selectionEndContainer = selectionRange.endContainer;
- // var selectionEndOffset = selectionRange.endOffset;
-
- // select our link and unlink
- var a = dojo.withGlobal(this.window, "getAncestorElement",dijit._editor.selection, ['a']);
- dojo.withGlobal(this.window, "selectElement", dijit._editor.selection, [a]);
-
- returnValue=this.document.execCommand("unlink", false, null);
- }else if((command == "hilitecolor")&&(dojo.isMoz)){
-// // mozilla doesn't support hilitecolor properly when useCSS is
-// // set to false (bugzilla #279330)
-
- this.document.execCommand("styleWithCSS", false, true);
- returnValue = this.document.execCommand(command, false, argument);
- this.document.execCommand("styleWithCSS", false, false);
-
- }else if((dojo.isIE)&&( (command == "backcolor")||(command == "forecolor") )){
- // Tested under IE 6 XP2, no problem here, comment out
- // IE weirdly collapses ranges when we exec these commands, so prevent it
-// var tr = this.document.selection.createRange();
- argument = arguments.length > 1 ? argument : null;
- returnValue = this.document.execCommand(command, false, argument);
-
- // timeout is workaround for weird IE behavior were the text
- // selection gets correctly re-created, but subsequent input
- // apparently isn't bound to it
-// setTimeout(function(){tr.select();}, 1);
+
+ //Check to see if we have any over-rides for commands, they will be functions on this
+ //widget of the form _commandImpl. If we don't, fall through to the basic native
+ //exec command of the browser.
+ var implFunc = "_" + command + "Impl";
+ if(this[implFunc]){
+ returnValue = this[implFunc](argument);
}else{
argument = arguments.length > 1 ? argument : null;
-// if(dojo.isMoz){
-// this.document = this.iframe.contentWindow.document
-// }
-
if(argument || command!="createlink"){
returnValue = this.document.execCommand(command, false, argument);
}
}
this.onDisplayChanged();
return returnValue;
},
- queryCommandEnabled: function(/*String*/command){
- // summary: check whether a command is enabled or not
+ queryCommandEnabled: function(/*String*/ command){
+ // summary:
+ // Check whether a command is enabled or not.
+ // tags:
+ // protected
+ if(this.disabled || !this._disabledOK){ return false; }
command = this._normalizeCommand(command);
- if(dojo.isMoz || dojo.isSafari){
+ if(dojo.isMoz || dojo.isWebKit){
if(command == "unlink"){ // mozilla returns true always
- // console.debug(dojo.withGlobal(this.window, "hasAncestorElement",dijit._editor.selection, ['a']));
- return dojo.withGlobal(this.window, "hasAncestorElement",dijit._editor.selection, ['a']);
- }else if (command == "inserttable"){
+ // console.debug(this._sCall("hasAncestorElement", ['a']));
+ return this._sCall("hasAncestorElement", ["a"]);
+ }else if(command == "inserttable"){
return true;
}
}
//see #4109
- if(dojo.isSafari)
+ if(dojo.isWebKit){
if(command == "copy"){
- command="cut";
+ command = "cut";
}else if(command == "paste"){
return true;
- }
-
- // return this.document.queryCommandEnabled(command);
- var elem = (dojo.isIE) ? this.document.selection.createRange() : this.document;
- return elem.queryCommandEnabled(command);
+ }
+ }
+
+ var elem = dojo.isIE ? this.document.selection.createRange() : this.document;
+ try{
+ return elem.queryCommandEnabled(command);
+ }catch(e){
+ //Squelch, occurs if editor is hidden on FF 3 (and maybe others.)
+ return false;
+ }
+
},
queryCommandState: function(command){
- // summary: check the state of a given command
+ // summary:
+ // Check the state of a given command and returns true or false.
+ // tags:
+ // protected
+
+ if(this.disabled || !this._disabledOK){ return false; }
command = this._normalizeCommand(command);
- return this.document.queryCommandState(command);
+ try{
+ return this.document.queryCommandState(command);
+ }catch(e){
+ //Squelch, occurs if editor is hidden on FF 3 (and maybe others.)
+ return false;
+ }
},
queryCommandValue: function(command){
- // summary: check the value of a given command
+ // summary:
+ // Check the value of a given command. This matters most for
+ // custom selections and complex values like font value setting.
+ // tags:
+ // protected
+
+ if(this.disabled || !this._disabledOK){ return false; }
+ var r;
command = this._normalizeCommand(command);
if(dojo.isIE && command == "formatblock"){
- return this._local2NativeFormatNames[this.document.queryCommandValue(command)];
- }
- return this.document.queryCommandValue(command);
+ r = this._native2LocalFormatNames[this.document.queryCommandValue(command)];
+ }else if(dojo.isMoz && command === "hilitecolor"){
+ var oldValue;
+ try{
+ oldValue = this.document.queryCommandValue("styleWithCSS");
+ }catch(e){
+ oldValue = false;
+ }
+ this.document.execCommand("styleWithCSS", false, true);
+ r = this.document.queryCommandValue(command);
+ this.document.execCommand("styleWithCSS", false, oldValue);
+ }else{
+ r = this.document.queryCommandValue(command);
+ }
+ return r;
},
// Misc.
+ _sCall: function(name, args){
+ // summary:
+ // Run the named method of dijit._editor.selection over the
+ // current editor instance's window, with the passed args.
+ // tags:
+ // private
+ return dojo.withGlobal(this.window, name, dijit._editor.selection, args);
+ },
+
+ // FIXME: this is a TON of code duplication. Why?
+
placeCursorAtStart: function(){
// summary:
- // place the cursor at the start of the editing area
+ // Place the cursor at the start of the editing area.
+ // tags:
+ // private
+
this.focus();
//see comments in placeCursorAtEnd
var isvalid=false;
if(dojo.isMoz){
+ // TODO: Is this branch even necessary?
var first=this.editNode.firstChild;
while(first){
if(first.nodeType == 3){
if(first.nodeValue.replace(/^\s+|\s+$/g, "").length>0){
isvalid=true;
- dojo.withGlobal(this.window, "selectElement", dijit._editor.selection, [first]);
+ this._sCall("selectElement", [ first ]);
break;
}
}else if(first.nodeType == 1){
isvalid=true;
- dojo.withGlobal(this.window, "selectElementChildren",dijit._editor.selection, [first]);
+ var tg = first.tagName ? first.tagName.toLowerCase() : "";
+ // Collapse before childless tags.
+ if(/br|input|img|base|meta|area|basefont|hr|link/.test(tg)){
+ this._sCall("selectElement", [ first ]);
+ }else{
+ // Collapse inside tags with children.
+ this._sCall("selectElementChildren", [ first ]);
+ }
break;
}
first = first.nextSibling;
}
}else{
isvalid=true;
- dojo.withGlobal(this.window, "selectElementChildren",dijit._editor.selection, [this.editNode]);
+ this._sCall("selectElementChildren", [ this.editNode ]);
}
if(isvalid){
- dojo.withGlobal(this.window, "collapse", dijit._editor.selection, [true]);
+ this._sCall("collapse", [ true ]);
}
},
placeCursorAtEnd: function(){
// summary:
- // place the cursor at the end of the editing area
+ // Place the cursor at the end of the editing area.
+ // tags:
+ // private
+
this.focus();
- //In mozilla, if last child is not a text node, we have to use selectElementChildren on this.editNode.lastChild
- //otherwise the cursor would be placed at the end of the closing tag of this.editNode.lastChild
+ //In mozilla, if last child is not a text node, we have to use
+ // selectElementChildren on this.editNode.lastChild otherwise the
+ // cursor would be placed at the end of the closing tag of
+ //this.editNode.lastChild
var isvalid=false;
if(dojo.isMoz){
var last=this.editNode.lastChild;
while(last){
if(last.nodeType == 3){
if(last.nodeValue.replace(/^\s+|\s+$/g, "").length>0){
isvalid=true;
- dojo.withGlobal(this.window, "selectElement",dijit._editor.selection, [last]);
+ this._sCall("selectElement", [ last ]);
break;
}
}else if(last.nodeType == 1){
isvalid=true;
if(last.lastChild){
- dojo.withGlobal(this.window, "selectElement",dijit._editor.selection, [last.lastChild]);
+ this._sCall("selectElement", [ last.lastChild ]);
}else{
- dojo.withGlobal(this.window, "selectElement",dijit._editor.selection, [last]);
+ this._sCall("selectElement", [ last ]);
}
break;
}
last = last.previousSibling;
}
}else{
isvalid=true;
- dojo.withGlobal(this.window, "selectElementChildren",dijit._editor.selection, [this.editNode]);
+ this._sCall("selectElementChildren", [ this.editNode ]);
}
if(isvalid){
- dojo.withGlobal(this.window, "collapse", dijit._editor.selection, [false]);
- }
- },
-
- getValue: function(/*Boolean?*/nonDestructive){
- // summary:
- // return the current content of the editing area (post filters are applied)
+ this._sCall("collapse", [ false ]);
+ }
+ },
+
+ getValue: function(/*Boolean?*/ nonDestructive){
+ // summary:
+ // Return the current content of the editing area (post filters
+ // are applied). Users should call attr('value') instead.
+ // nonDestructive:
+ // defaults to false. Should the post-filtering be run over a copy
+ // of the live DOM? Most users should pass "true" here unless they
+ // *really* know that none of the installed filters are going to
+ // mess up the editing session.
+ // tags:
+ // private
if(this.textarea){
if(this.isClosed || !this.isLoaded){
return this.textarea.value;
}
}
return this._postFilterContent(null, nonDestructive);
},
-
- setValue: function(/*String*/html){
- // summary:
- // this function set the content. No undo history is preserved
+ _getValueAttr: function(){
+ // summary:
+ // Hook to make attr("value") work
+ return this.getValue(true);
+ },
+
+ setValue: function(/*String*/ html){
+ // summary:
+ // This function sets the content. No undo history is preserved.
+ // Users should use attr('value', ...) instead.
+ // tags:
+ // deprecated
+
+ // TODO: remove this and getValue() for 2.0, and move code to _setValueAttr()
+
+ if(!this.isLoaded){
+ // try again after the editor is finished loading
+ this.onLoadDeferred.addCallback(dojo.hitch(this, function(){
+ this.setValue(html);
+ }));
+ return;
+ }
if(this.textarea && (this.isClosed || !this.isLoaded)){
this.textarea.value=html;
}else{
html = this._preFilterContent(html);
- if(this.isClosed){
- this.domNode.innerHTML = html;
- this._preDomFilterContent(this.domNode);
- }else{
- this.editNode.innerHTML = html;
- this._preDomFilterContent(this.editNode);
- }
- }
- },
-
- replaceValue: function(/*String*/html){
- // summary:
- // this function set the content while trying to maintain the undo stack
+ var node = this.isClosed ? this.domNode : this.editNode;
+
+ // Use &nbsp; to avoid webkit problems where editor is disabled until the user clicks it
+ if(!html && dojo.isWebKit){
+ this._cursorToStart = true;
+ html = "&nbsp;";
+ }
+ node.innerHTML = html;
+ this._preDomFilterContent(node);
+ }
+ this.onDisplayChanged();
+ },
+
+ replaceValue: function(/*String*/ html){
+ // summary:
+ // This function set the content while trying to maintain the undo stack
// (now only works fine with Moz, this is identical to setValue in all
// other browsers)
+ // tags:
+ // protected
+
if(this.isClosed){
this.setValue(html);
}else if(this.window && this.window.getSelection && !dojo.isMoz){ // Safari
// look ma! it's a totally f'd browser!
this.setValue(html);
}else if(this.window && this.window.getSelection){ // Moz
html = this._preFilterContent(html);
this.execCommand("selectall");
- if(dojo.isMoz && !html){ html = "&nbsp;" }
+ if(!html){
+ this._cursorToStart = true;
+ html = "&nbsp;";
+ }
this.execCommand("inserthtml", html);
this._preDomFilterContent(this.editNode);
}else if(this.document && this.document.selection){//IE
//In IE, when the first element is not a text node, say
//an <a> tag, when replacing the content of the editing
//area, the <a> tag will be around all the content
//so for now, use setValue for IE too
this.setValue(html);
}
},
- _preFilterContent: function(/*String*/html){
- // summary:
- // filter the input before setting the content of the editing area
+ _preFilterContent: function(/*String*/ html){
+ // summary:
+ // Filter the input before setting the content of the editing
+ // area. DOM pre-filtering may happen after this
+ // string-based filtering takes place but as of 1.2, this is not
+ // guaranteed for operations such as the inserthtml command.
+ // tags:
+ // private
+
var ec = html;
dojo.forEach(this.contentPreFilters, function(ef){ if(ef){ ec = ef(ec); } });
return ec;
},
- _preDomFilterContent: function(/*DomNode*/dom){
- // summary:
- // filter the input
+ _preDomFilterContent: function(/*DomNode*/ dom){
+ // summary:
+ // filter the input's live DOM. All filter operations should be
+ // considered to be "live" and operating on the DOM that the user
+ // will be interacting with in their editing session.
+ // tags:
+ // private
dom = dom || this.editNode;
dojo.forEach(this.contentDomPreFilters, function(ef){
if(ef && dojo.isFunction(ef)){
ef(dom);
}
}, this);
},
- _postFilterContent: function(/*DomNode|DomNode[]?*/dom,/*Boolean?*/nonDestructive){
+ _postFilterContent: function(
+ /*DomNode|DomNode[]|String?*/ dom,
+ /*Boolean?*/ nonDestructive){
// summary:
// filter the output after getting the content of the editing area
- dom = dom || this.editNode;
- if(this.contentDomPostFilters.length){
- if(nonDestructive && dom['cloneNode']){
- dom = dom.cloneNode(true);
- }
- dojo.forEach(this.contentDomPostFilters, function(ef){
- dom = ef(dom);
- });
- }
- var ec = this.getNodeChildrenHtml(dom);
- if(!ec.replace(/^(?:\s|\xA0)+/g, "").replace(/(?:\s|\xA0)+$/g,"").length){ ec = ""; }
+ //
+ // description:
+ // post-filtering allows plug-ins and users to specify any number
+ // of transforms over the editor's content, enabling many common
+ // use-cases such as transforming absolute to relative URLs (and
+ // vice-versa), ensuring conformance with a particular DTD, etc.
+ // The filters are registered in the contentDomPostFilters and
+ // contentPostFilters arrays. Each item in the
+ // contentDomPostFilters array is a function which takes a DOM
+ // Node or array of nodes as its only argument and returns the
+ // same. It is then passed down the chain for further filtering.
+ // The contentPostFilters array behaves the same way, except each
+ // member operates on strings. Together, the DOM and string-based
+ // filtering allow the full range of post-processing that should
+ // be necessaray to enable even the most agressive of post-editing
+ // conversions to take place.
+ //
+ // If nonDestructive is set to "true", the nodes are cloned before
+ // filtering proceeds to avoid potentially destructive transforms
+ // to the content which may still needed to be edited further.
+ // Once DOM filtering has taken place, the serialized version of
+ // the DOM which is passed is run through each of the
+ // contentPostFilters functions.
+ //
+ // dom:
+ // a node, set of nodes, which to filter using each of the current
+ // members of the contentDomPostFilters and contentPostFilters arrays.
+ //
+ // nonDestructive:
+ // defaults to "false". If true, ensures that filtering happens on
+ // a clone of the passed-in content and not the actual node
+ // itself.
+ //
+ // tags:
+ // private
+
+ var ec;
+ if(!dojo.isString(dom)){
+ dom = dom || this.editNode;
+ if(this.contentDomPostFilters.length){
+ if(nonDestructive){
+ dom = dojo.clone(dom);
+ }
+ dojo.forEach(this.contentDomPostFilters, function(ef){
+ dom = ef(dom);
+ });
+ }
+ ec = dijit._editor.getChildrenHtml(dom);
+ }else{
+ ec = dom;
+ }
+
+ if(!dojo.trim(ec.replace(/^\xA0\xA0*/, '').replace(/\xA0\xA0*$/, '')).length){
+ ec = "";
+ }
// if(dojo.isIE){
// //removing appended <P>&nbsp;</P> for IE
// ec = ec.replace(/(?:<p>&nbsp;</p>[\n\r]*)+$/i,"");
// }
dojo.forEach(this.contentPostFilters, function(ef){
ec = ef(ec);
});
return ec;
},
- _saveContent: function(/*Event*/e){
+ _saveContent: function(/*Event*/ e){
// summary:
// Saves the content in an onunload event if the editor has not been closed
- var saveTextarea = dojo.byId("dijit._editor.RichText.savedContent");
- saveTextarea.value += this._SEPARATOR + this.name + ":" + this.getValue();
- },
-
-
- escapeXml: function(/*String*/str, /*Boolean*/noSingleQuotes){
- //summary:
+ // tags:
+ // private
+
+ var saveTextarea = dojo.byId(dijit._scopeName + "._editor.RichText.savedContent");
+ if(saveTextarea.value){
+ saveTextarea.value += this._SEPARATOR;
+ }
+ saveTextarea.value += this.name + ":" + this.getValue(true);
+ },
+
+
+ escapeXml: function(/*String*/ str, /*Boolean*/ noSingleQuotes){
+ // summary:
// Adds escape sequences for special characters in XML: &<>"'
// Optionally skips escapes for single quotes
+ // tags:
+ // private
+
str = str.replace(/&/gm, "&amp;").replace(/</gm, "&lt;").replace(/>/gm, "&gt;").replace(/"/gm, "&quot;");
if(!noSingleQuotes){
str = str.replace(/'/gm, "&#39;");
}
return str; // string
},
- getNodeHtml: function(/* DomNode */node){
- switch(node.nodeType){
- case 1: //element node
- var output = '<'+node.tagName.toLowerCase();
- if(dojo.isMoz){
- if(node.getAttribute('type')=='_moz'){
- node.removeAttribute('type');
- }
- if(node.getAttribute('_moz_dirty') != undefined){
- node.removeAttribute('_moz_dirty');
- }
- }
- //store the list of attributes and sort it to have the
- //attributes appear in the dictionary order
- var attrarray = [];
- if(dojo.isIE){
- var s = node.outerHTML;
- s = s.substr(0,s.indexOf('>'));
- s = s.replace(/(?:['"])[^"']*\1/g, '');//to make the following regexp safe
- var reg = /([^\s=]+)=/g;
- var m, key;
- while((m = reg.exec(s)) != undefined){
- key=m[1];
- if(key.substr(0,3) != '_dj'){
- if(key == 'src' || key == 'href'){
- if(node.getAttribute('_djrealurl')){
- attrarray.push([key,node.getAttribute('_djrealurl')]);
- continue;
- }
- }
- if(key == 'class'){
- attrarray.push([key,node.className]);
- }else{
- attrarray.push([key,node.getAttribute(key)]);
- }
- }
- }
- }else{
- var attr, i=0, attrs = node.attributes;
- while((attr=attrs[i++])){
- //ignore all attributes starting with _dj which are
- //internal temporary attributes used by the editor
- if(attr.name.substr(0,3) != '_dj' /*&&
- (attr.specified == undefined || attr.specified)*/){
- var v = attr.value;
- if(attr.name == 'src' || attr.name == 'href'){
- if(node.getAttribute('_djrealurl')){
- v = node.getAttribute('_djrealurl');
- }
- }
- attrarray.push([attr.name,v]);
- }
- }
- }
- attrarray.sort(function(a,b){
- return a[0]<b[0]?-1:(a[0]==b[0]?0:1);
- });
- i=0;
- while((attr=attrarray[i++])){
- output += ' '+attr[0]+'="'+attr[1]+'"';
- }
- if(node.childNodes.length){
- output += '>' + this.getNodeChildrenHtml(node)+'</'+node.tagName.toLowerCase()+'>';
- }else{
- output += ' />';
- }
- break;
- case 3: //text
- // FIXME:
- var output = this.escapeXml(node.nodeValue,true);
- break;
- case 8: //comment
- // FIXME:
- var output = '<!--'+this.escapeXml(node.nodeValue,true)+'-->';
- break;
- default:
- var output = "Element not recognized - Type: " + node.nodeType + " Name: " + node.nodeName;
- }
- return output;
- },
-
- getNodeChildrenHtml: function(/* DomNode */dom){
- // summary: Returns the html content of a DomNode and children
- var out = "";
- if(!dom){ return out; }
- var nodes = dom["childNodes"]||dom;
- var i=0;
- var node;
- while((node=nodes[i++])){
- out += this.getNodeHtml(node);
- }
- return out; // String
- },
-
- close: function(/*Boolean*/save, /*Boolean*/force){
+ getNodeHtml: function(/* DomNode */ node){
+ // summary:
+ // Deprecated. Use dijit._editor._getNodeHtml() instead.
+ // tags:
+ // deprecated
+ dojo.deprecated('dijit.Editor::getNodeHtml is deprecated','use dijit._editor.getNodeHtml instead', 2);
+ return dijit._editor.getNodeHtml(node); // String
+ },
+
+ getNodeChildrenHtml: function(/* DomNode */ dom){
+ // summary:
+ // Deprecated. Use dijit._editor.getChildrenHtml() instead.
+ // tags:
+ // deprecated
+ dojo.deprecated('dijit.Editor::getNodeChildrenHtml is deprecated','use dijit._editor.getChildrenHtml instead', 2);
+ return dijit._editor.getChildrenHtml(dom);
+ },
+
+ close: function(/*Boolean*/ save){
// summary:
// Kills the editor and optionally writes back the modified contents to the
// element from which it originated.
// save:
// Whether or not to save the changes. If false, the changes are discarded.
- // force:
+ // tags:
+ // private
+
if(this.isClosed){return false; }
if(!arguments.length){ save = true; }
this._content = this.getValue();
var changed = (this.savedContent != this._content);
// line height is squashed for iframes
// FIXME: why was this here? if (this.iframe){ this.domNode.style.lineHeight = null; }
if(this.interval){ clearInterval(this.interval); }
+ if(this._webkitListener){
+ //Cleaup of WebKit fix: #9532
+ this.disconnect(this._webkitListener);
+ delete this._webkitListener;
+ }
+
+ // Guard against memory leaks on IE (see #9268)
+ if(dojo.isIE){
+ this.iframe.onfocus = null;
+ }
+ this.iframe._loadFunc = null;
+
+ if(this._iframeRegHandle){
+ dijit.unregisterIframe(this._iframeRegHandle);
+ delete this._iframeRegHandle;
+ }
+
if(this.textarea){
- with(this.textarea.style){
- position = "";
- left = top = "";
- if(dojo.isIE){
- overflow = this.__overflow;
- this.__overflow = null;
- }
- }
- if(save){
- this.textarea.value = this._content;
- }else{
- this.textarea.value = this.savedContent;
- }
- dojo._destroyElement(this.domNode);
+ var s = this.textarea.style;
+ s.position = "";
+ s.left = s.top = "";
+ if(dojo.isIE){
+ s.overflow = this.__overflow;
+ this.__overflow = null;
+ }
+ this.textarea.value = save ? this._content : this.savedContent;
+ dojo.destroy(this.domNode);
this.domNode = this.textarea;
}else{
- if(save){
- //why we treat moz differently? comment out to fix #1061
-// if(dojo.isMoz){
-// var nc = dojo.doc.createElement("span");
-// this.domNode.appendChild(nc);
-// nc.innerHTML = this.editNode.innerHTML;
-// }else{
-// this.domNode.innerHTML = this._content;
-// }
- this.domNode.innerHTML = this._content;
- }else{
- this.domNode.innerHTML = this.savedContent;
- }
- }
+ // if(save){
+ // why we treat moz differently? comment out to fix #1061
+ // if(dojo.isMoz){
+ // var nc = dojo.doc.createElement("span");
+ // this.domNode.appendChild(nc);
+ // nc.innerHTML = this.editNode.innerHTML;
+ // }else{
+ // this.domNode.innerHTML = this._content;
+ // }
+ // }
+
+ // Note that this destroys the iframe
+ this.domNode.innerHTML = save ? this._content : this.savedContent;
+ }
+ delete this.iframe;
dojo.removeClass(this.domNode, "RichTextEditable");
this.isClosed = true;
this.isLoaded = false;
- // FIXME: is this always the right thing to do?
+
delete this.editNode;
+ delete this.focusNode;
if(this.window && this.window._frameElement){
this.window._frameElement = null;
}
this.window = null;
this.document = null;
this.editingArea = null;
this.editorObject = null;
return changed; // Boolean: whether the content has been modified
},
- destroyRendering: function(){
- // summary: stub
- },
-
destroy: function(){
- this.destroyRendering();
if(!this.isClosed){ this.close(false); }
- this.inherited("destroy",arguments);
- //dijit._editor.RichText.superclass.destroy.call(this);
- },
-
- _fixContentForMoz: function(/* String */ html){
- // summary:
- // Moz can not handle strong/em tags correctly, convert them to b/i
- html = html.replace(/<(\/)?strong([ \>])/gi, '<$1b$2' );
- html = html.replace(/<(\/)?em([ \>])/gi, '<$1i$2' );
+ this.inherited(arguments);
+ },
+
+ _removeMozBogus: function(/* String */ html){
+ // summary:
+ // Post filter to remove unwanted HTML attributes generated by mozilla
+ // tags:
+ // private
+ return html.replace(/\stype="_moz"/gi, '').replace(/\s_moz_dirty=""/gi, '').replace(/_moz_resizing="(true|false)"/gi,''); // String
+ },
+ _removeWebkitBogus: function(/* String */ html){
+ // summary:
+ // Post filter to remove unwanted HTML attributes generated by webkit
+ // tags:
+ // private
+ html = html.replace(/\sclass="webkit-block-placeholder"/gi, '');
+ html = html.replace(/\sclass="apple-style-span"/gi, '');
return html; // String
},
-
- _srcInImgRegex : /(?:(<img(?=\s).*?\ssrc=)("|')(.*?)\2)|(?:(<img\s.*?src=)([^"'][^ >]+))/gi ,
- _hrefInARegex : /(?:(<a(?=\s).*?\shref=)("|')(.*?)\2)|(?:(<a\s.*?href=)([^"'][^ >]+))/gi ,
+ _normalizeFontStyle: function(/* String */ html){
+ // summary:
+ // Convert <strong> and <em> to <b> and <i>.
+ // description:
+ // Moz can not handle strong/em tags correctly, so to help
+ // mozilla and also to normalize output, convert them to <b> and <i>.
+ //
+ // Note the IE generates <strong> and <em> rather than <b> and <i>
+ // tags:
+ // private
+ return html.replace(/<(\/)?strong([ \>])/gi, '<$1b$2')
+ .replace(/<(\/)?em([ \>])/gi, '<$1i$2' ); // String
+ },
_preFixUrlAttributes: function(/* String */ html){
- html = html.replace(this._hrefInARegex, '$1$4$2$3$5$2 _djrealurl=$2$3$5$2') ;
- html = html.replace(this._srcInImgRegex, '$1$4$2$3$5$2 _djrealurl=$2$3$5$2') ;
- return html; // String
- }
-});
+ // summary:
+ // Pre-filter to do fixing to href attributes on <a> and <img> tags
+ // tags:
+ // private
+ return html.replace(/(?:(<a(?=\s).*?\shref=)("|')(.*?)\2)|(?:(<a\s.*?href=)([^"'][^ >]+))/gi,
+ '$1$4$2$3$5$2 _djrealurl=$2$3$5$2')
+ .replace(/(?:(<img(?=\s).*?\ssrc=)("|')(.*?)\2)|(?:(<img\s.*?src=)([^"'][^ >]+))/gi,
+ '$1$4$2$3$5$2 _djrealurl=$2$3$5$2'); // String
+ },
+
+ /*****************************************************************************
+ The following functions implement HTML manipulation commands for various
+ browser/contentEditable implementations. The goal of them is to enforce
+ standard behaviors of them.
+ ******************************************************************************/
+
+ _inserthorizontalruleImpl: function(argument){
+ // summary:
+ // This function implements the insertion of HTML <HR> tags.
+ // into a point on the page. IE doesn't to it right, so
+ // we have to use an alternate form
+ // argument:
+ // arguments to the exec command, if any.
+ // tags:
+ // protected
+ if(dojo.isIE){
+ return this._inserthtmlImpl("<hr>");
+ }
+ return this.document.execCommand("inserthorizontalrule", false, argument);
+ },
+
+ _unlinkImpl: function(argument){
+ // summary:
+ // This function implements the unlink of an <a> tag.
+ // argument:
+ // arguments to the exec command, if any.
+ // tags:
+ // protected
+ if((this.queryCommandEnabled("unlink")) && (dojo.isMoz || dojo.isWebKit)){
+ var a = this._sCall("getAncestorElement", [ "a" ]);
+ this._sCall("selectElement", [ a ]);
+ return this.document.execCommand("unlink", false, null);
+ }
+ return this.document.execCommand("unlink", false, argument);
+ },
+
+ _hilitecolorImpl: function(argument){
+ // summary:
+ // This function implements the hilitecolor command
+ // argument:
+ // arguments to the exec command, if any.
+ // tags:
+ // protected
+ var returnValue;
+ if(dojo.isMoz){
+ // mozilla doesn't support hilitecolor properly when useCSS is
+ // set to false (bugzilla #279330)
+ this.document.execCommand("styleWithCSS", false, true);
+ returnValue = this.document.execCommand("hilitecolor", false, argument);
+ this.document.execCommand("styleWithCSS", false, false);
+ }else{
+ returnValue = this.document.execCommand("hilitecolor", false, argument);
+ }
+ return returnValue;
+ },
+
+ _backcolorImpl: function(argument){
+ // summary:
+ // This function implements the backcolor command
+ // argument:
+ // arguments to the exec command, if any.
+ // tags:
+ // protected
+ if(dojo.isIE){
+ // Tested under IE 6 XP2, no problem here, comment out
+ // IE weirdly collapses ranges when we exec these commands, so prevent it
+ // var tr = this.document.selection.createRange();
+ argument = argument ? argument : null;
+ }
+ return this.document.execCommand("backcolor", false, argument);
+ },
+
+ _forecolorImpl: function(argument){
+ // summary:
+ // This function implements the forecolor command
+ // argument:
+ // arguments to the exec command, if any.
+ // tags:
+ // protected
+ if(dojo.isIE){
+ // Tested under IE 6 XP2, no problem here, comment out
+ // IE weirdly collapses ranges when we exec these commands, so prevent it
+ // var tr = this.document.selection.createRange();
+ argument = argument? argument : null;
+ }
+ return this.document.execCommand("forecolor", false, argument);
+ },
+
+ _inserthtmlImpl: function(argument){
+ // summary:
+ // This function implements the insertion of HTML content into
+ // a point on the page.
+ // argument:
+ // The content to insert, if any.
+ // tags:
+ // protected
+ argument = this._preFilterContent(argument);
+ var rv = true;
+ if(dojo.isIE){
+ var insertRange = this.document.selection.createRange();
+ if(this.document.selection.type.toUpperCase() == 'CONTROL'){
+ var n=insertRange.item(0);
+ while(insertRange.length){
+ insertRange.remove(insertRange.item(0));
+ }
+ n.outerHTML=argument;
+ }else{
+ insertRange.pasteHTML(argument);
+ }
+ insertRange.select();
+ //insertRange.collapse(true);
+ }else if(dojo.isMoz && !argument.length){
+ //mozilla can not inserthtml an empty html to delete current selection
+ //so we delete the selection instead in this case
+ this._sCall("remove"); // FIXME
+ }else{
+ rv = this.document.execCommand("inserthtml", false, argument);
+ }
+ return rv;
+ }
+});
+
+}
+
+if(!dojo._hasResource["dijit._KeyNavContainer"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit._KeyNavContainer"] = true;
+dojo.provide("dijit._KeyNavContainer");
+
+
+dojo.declare("dijit._KeyNavContainer",
+ dijit._Container,
+ {
+
+ // summary:
+ // A _Container with keyboard navigation of its children.
+ // description:
+ // To use this mixin, call connectKeyNavHandlers() in
+ // postCreate() and call startupKeyNavChildren() in startup().
+ // It provides normalized keyboard and focusing code for Container
+ // widgets.
+/*=====
+ // focusedChild: [protected] Widget
+ // The currently focused child widget, or null if there isn't one
+ focusedChild: null,
+=====*/
+
+ // tabIndex: Integer
+ // Tab index of the container; same as HTML tabIndex attribute.
+ // Note then when user tabs into the container, focus is immediately
+ // moved to the first item in the container.
+ tabIndex: "0",
+
+ _keyNavCodes: {},
+
+ connectKeyNavHandlers: function(/*dojo.keys[]*/ prevKeyCodes, /*dojo.keys[]*/ nextKeyCodes){
+ // summary:
+ // Call in postCreate() to attach the keyboard handlers
+ // to the container.
+ // preKeyCodes: dojo.keys[]
+ // Key codes for navigating to the previous child.
+ // nextKeyCodes: dojo.keys[]
+ // Key codes for navigating to the next child.
+ // tags:
+ // protected
+
+ var keyCodes = (this._keyNavCodes = {});
+ var prev = dojo.hitch(this, this.focusPrev);
+ var next = dojo.hitch(this, this.focusNext);
+ dojo.forEach(prevKeyCodes, function(code){ keyCodes[code] = prev; });
+ dojo.forEach(nextKeyCodes, function(code){ keyCodes[code] = next; });
+ this.connect(this.domNode, "onkeypress", "_onContainerKeypress");
+ this.connect(this.domNode, "onfocus", "_onContainerFocus");
+ },
+
+ startupKeyNavChildren: function(){
+ // summary:
+ // Call in startup() to set child tabindexes to -1
+ // tags:
+ // protected
+ dojo.forEach(this.getChildren(), dojo.hitch(this, "_startupChild"));
+ },
+
+ addChild: function(/*dijit._Widget*/ widget, /*int?*/ insertIndex){
+ // summary:
+ // Add a child to our _Container
+ dijit._KeyNavContainer.superclass.addChild.apply(this, arguments);
+ this._startupChild(widget);
+ },
+
+ focus: function(){
+ // summary:
+ // Default focus() implementation: focus the first child.
+ this.focusFirstChild();
+ },
+
+ focusFirstChild: function(){
+ // summary:
+ // Focus the first focusable child in the container.
+ // tags:
+ // protected
+ var child = this._getFirstFocusableChild();
+ if(child){ // edge case: Menu could be empty or hidden
+ this.focusChild(child);
+ }
+ },
+
+ focusNext: function(){
+ // summary:
+ // Focus the next widget
+ // tags:
+ // protected
+ var child = this._getNextFocusableChild(this.focusedChild, 1);
+ this.focusChild(child);
+ },
+
+ focusPrev: function(){
+ // summary:
+ // Focus the last focusable node in the previous widget
+ // (ex: go to the ComboButton icon section rather than button section)
+ // tags:
+ // protected
+ var child = this._getNextFocusableChild(this.focusedChild, -1);
+ this.focusChild(child, true);
+ },
+
+ focusChild: function(/*dijit._Widget*/ widget, /*Boolean*/ last){
+ // summary:
+ // Focus widget.
+ // widget:
+ // Reference to container's child widget
+ // last:
+ // If true and if widget has multiple focusable nodes, focus the
+ // last one instead of the first one
+ // tags:
+ // protected
+
+ if(this.focusedChild && widget !== this.focusedChild){
+ this._onChildBlur(this.focusedChild);
+ }
+ widget.focus(last ? "end" : "start");
+ this.focusedChild = widget;
+ },
+
+ _startupChild: function(/*dijit._Widget*/ widget){
+ // summary:
+ // Setup for each child widget
+ // description:
+ // Sets tabIndex=-1 on each child, so that the tab key will
+ // leave the container rather than visiting each child.
+ // tags:
+ // private
+
+ widget.attr("tabIndex", "-1");
+
+ this.connect(widget, "_onFocus", function(){
+ // Set valid tabIndex so tabbing away from widget goes to right place, see #10272
+ widget.attr("tabIndex", this.tabIndex);
+ });
+ this.connect(widget, "_onBlur", function(){
+ widget.attr("tabIndex", "-1");
+ });
+ },
+
+ _onContainerFocus: function(evt){
+ // summary:
+ // Handler for when the container gets focus
+ // description:
+ // Initially the container itself has a tabIndex, but when it gets
+ // focus, switch focus to first child...
+ // tags:
+ // private
+
+ // Note that we can't use _onFocus() because switching focus from the
+ // _onFocus() handler confuses the focus.js code
+ // (because it causes _onFocusNode() to be called recursively)
+
+ // focus bubbles on Firefox,
+ // so just make sure that focus has really gone to the container
+ if(evt.target !== this.domNode){ return; }
+
+ this.focusFirstChild();
+
+ // and then set the container's tabIndex to -1,
+ // (don't remove as that breaks Safari 4)
+ // so that tab or shift-tab will go to the fields after/before
+ // the container, rather than the container itself
+ dojo.attr(this.domNode, "tabIndex", "-1");
+ },
+
+ _onBlur: function(evt){
+ // When focus is moved away the container, and it's descendant (popup) widgets,
+ // then restore the container's tabIndex so that user can tab to it again.
+ // Note that using _onBlur() so that this doesn't happen when focus is shifted
+ // to one of my child widgets (typically a popup)
+ if(this.tabIndex){
+ dojo.attr(this.domNode, "tabIndex", this.tabIndex);
+ }
+ this.inherited(arguments);
+ },
+
+ _onContainerKeypress: function(evt){
+ // summary:
+ // When a key is pressed, if it's an arrow key etc. then
+ // it's handled here.
+ // tags:
+ // private
+ if(evt.ctrlKey || evt.altKey){ return; }
+ var func = this._keyNavCodes[evt.charOrCode];
+ if(func){
+ func();
+ dojo.stopEvent(evt);
+ }
+ },
+
+ _onChildBlur: function(/*dijit._Widget*/ widget){
+ // summary:
+ // Called when focus leaves a child widget to go
+ // to a sibling widget.
+ // tags:
+ // protected
+ },
+
+ _getFirstFocusableChild: function(){
+ // summary:
+ // Returns first child that can be focused
+ return this._getNextFocusableChild(null, 1); // dijit._Widget
+ },
+
+ _getNextFocusableChild: function(child, dir){
+ // summary:
+ // Returns the next or previous focusable child, compared
+ // to "child"
+ // child: Widget
+ // The current widget
+ // dir: Integer
+ // * 1 = after
+ // * -1 = before
+ if(child){
+ child = this._getSiblingOfChild(child, dir);
+ }
+ var children = this.getChildren();
+ for(var i=0; i < children.length; i++){
+ if(!child){
+ child = children[(dir>0) ? 0 : (children.length-1)];
+ }
+ if(child.isFocusable()){
+ return child; // dijit._Widget
+ }
+ child = this._getSiblingOfChild(child, dir);
+ }
+ // no focusable child found
+ return null; // dijit._Widget
+ }
+ }
+);
+
+}
+
+if(!dojo._hasResource["dijit.ToolbarSeparator"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.ToolbarSeparator"] = true;
+dojo.provide("dijit.ToolbarSeparator");
+
+
+
+
+dojo.declare("dijit.ToolbarSeparator",
+ [ dijit._Widget, dijit._Templated ],
+ {
+ // summary:
+ // A spacer between two `dijit.Toolbar` items
+ templateString: '<div class="dijitToolbarSeparator dijitInline"></div>',
+ postCreate: function(){ dojo.setSelectable(this.domNode, false); },
+ isFocusable: function(){
+ // summary:
+ // This widget isn't focusable, so pass along that fact.
+ // tags:
+ // protected
+ return false;
+ }
+
+ });
+
+
}
if(!dojo._hasResource["dijit.Toolbar"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.Toolbar"] = true;
dojo.provide("dijit.Toolbar");
-dojo.declare(
- "dijit.Toolbar",
+dojo.declare("dijit.Toolbar",
[dijit._Widget, dijit._Templated, dijit._KeyNavContainer],
-{
+ {
+ // summary:
+ // A Toolbar widget, used to hold things like `dijit.Editor` buttons
+
templateString:
'<div class="dijit dijitToolbar" waiRole="toolbar" tabIndex="${tabIndex}" dojoAttachPoint="containerNode">' +
-// '<table style="table-layout: fixed" class="dijitReset dijitToolbarTable">' + // factor out style
-// '<tr class="dijitReset" dojoAttachPoint="containerNode"></tr>'+
-// '</table>' +
+ // '<table style="table-layout: fixed" class="dijitReset dijitToolbarTable">' + // factor out style
+ // '<tr class="dijitReset" dojoAttachPoint="containerNode"></tr>'+
+ // '</table>' +
'</div>',
- tabIndex: "0",
-
postCreate: function(){
this.connectKeyNavHandlers(
this.isLeftToRight() ? [dojo.keys.LEFT_ARROW] : [dojo.keys.RIGHT_ARROW],
this.isLeftToRight() ? [dojo.keys.RIGHT_ARROW] : [dojo.keys.LEFT_ARROW]
);
},
startup: function(){
+ if(this._started){ return; }
+
this.startupKeyNavChildren();
+
+ this.inherited(arguments);
}
}
);
-// Combine with dijit.MenuSeparator??
-dojo.declare(
- "dijit.ToolbarSeparator",
- [ dijit._Widget, dijit._Templated ],
-{
- // summary
- // A line between two menu items
- templateString: '<div class="dijitToolbarSeparator dijitInline"></div>',
- postCreate: function(){ dojo.setSelectable(this.domNode, false); },
- isFocusable: function(){ return false; }
-});
+// For back-compat, remove for 2.0
+
+
+}
+
+if(!dojo._hasResource["dijit._HasDropDown"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit._HasDropDown"] = true;
+dojo.provide("dijit._HasDropDown");
+
+
+
+
+dojo.declare("dijit._HasDropDown",
+ null,
+ {
+ // summary:
+ // Mixin for widgets that need drop down ability.
+
+ // _buttonNode: [protected] DomNode
+ // The button/icon/node to click to display the drop down.
+ // Can be set via a dojoAttachPoint assignment.
+ // If missing, then either focusNode or domNode (if focusNode is also missing) will be used.
+ _buttonNode: null,
+
+ // _arrowWrapperNode: [protected] DomNode
+ // Will set CSS class dijitUpArrow, dijitDownArrow, dijitRightArrow etc. on this node depending
+ // on where the drop down is set to be positioned.
+ // Can be set via a dojoAttachPoint assignment.
+ // If missing, then _buttonNode will be used.
+ _arrowWrapperNode: null,
+
+ // _popupStateNode: [protected] DomNode
+ // The node to set the popupActive class on.
+ // Can be set via a dojoAttachPoint assignment.
+ // If missing, then focusNode or _buttonNode (if focusNode is missing) will be used.
+ _popupStateNode: null,
+
+ // _aroundNode: [protected] DomNode
+ // The node to display the popup around.
+ // Can be set via a dojoAttachPoint assignment.
+ // If missing, then domNode will be used.
+ _aroundNode: null,
+
+ // dropDown: [protected] Widget
+ // The widget to display as a popup. This widget *must* be
+ // defined before the startup function is called.
+ dropDown: null,
+
+ // autoWidth: [protected] Boolean
+ // Set to true to make the drop down at least as wide as this
+ // widget. Set to false if the drop down should just be its
+ // default width
+ autoWidth: true,
+
+ // forceWidth: [protected] Boolean
+ // Set to true to make the drop down exactly as wide as this
+ // widget. Overrides autoWidth.
+ forceWidth: false,
+
+ // maxHeight: [protected] Integer
+ // The max height for our dropdown. Set to 0 for no max height.
+ // any dropdown taller than this will have scrollbars
+ maxHeight: 0,
+
+ // dropDownPosition: [const] String[]
+ // This variable controls the position of the drop down.
+ // It's an array of strings with the following values:
+ //
+ // * before: places drop down to the left of the target node/widget, or to the right in
+ // the case of RTL scripts like Hebrew and Arabic
+ // * after: places drop down to the right of the target node/widget, or to the left in
+ // the case of RTL scripts like Hebrew and Arabic
+ // * above: drop down goes above target node
+ // * below: drop down goes below target node
+ //
+ // The list is positions is tried, in order, until a position is found where the drop down fits
+ // within the viewport.
+ //
+ dropDownPosition: ["below","above"],
+
+ // _stopClickEvents: Boolean
+ // When set to false, the click events will not be stopped, in
+ // case you want to use them in your subwidget
+ _stopClickEvents: true,
+
+ _onDropDownMouse: function(/*Event*/ e){
+ // summary:
+ // Callback when the user mouse clicks on the arrow icon, or presses the down
+ // arrow key, to open the drop down.
+
+ // We handle mouse events using onmousedown in order to allow for selecting via
+ // a mouseDown --> mouseMove --> mouseUp. So, our click is already handled, unless
+ // we are executed via keypress - in which case, this._seenKeydown
+ // will be set to true.
+ if(e.type == "click" && !this._seenKeydown){ return; }
+ this._seenKeydown = false;
+
+ // If we are a mouse event, set up the mouseup handler. See _onDropDownMouse() for
+ // details on this handler.
+ if(e.type == "mousedown"){
+ this._docHandler = this.connect(dojo.doc, "onmouseup", "_onDropDownMouseup");
+ }
+ if(this.disabled || this.readOnly){ return; }
+ if(this._stopClickEvents){
+ dojo.stopEvent(e);
+ }
+ this.toggleDropDown();
+
+ // If we are a click, then we'll pretend we did a mouse up
+ if(e.type == "click" || e.type == "keypress"){
+ this._onDropDownMouseup();
+ }
+ },
+
+ _onDropDownMouseup: function(/*Event?*/ e){
+ // summary:
+ // Callback when the user lifts their mouse after mouse down on the arrow icon.
+ // If the drop is a simple menu and the mouse is over the menu, we execute it, otherwise, we focus our
+ // dropDown node. If the event is missing, then we are not
+ // a mouseup event.
+ //
+ // This is useful for the common mouse movement pattern
+ // with native browser <select> nodes:
+ // 1. mouse down on the select node (probably on the arrow)
+ // 2. move mouse to a menu item while holding down the mouse button
+ // 3. mouse up. this selects the menu item as though the user had clicked it.
+
+ if(e && this._docHandler){
+ this.disconnect(this._docHandler);
+ }
+ var dropDown = this.dropDown, overMenu = false;
+
+ if(e && this._opened){
+ // This code deals with the corner-case when the drop down covers the original widget,
+ // because it's so large. In that case mouse-up shouldn't select a value from the menu.
+ // Find out if our target is somewhere in our dropdown widget,
+ // but not over our _buttonNode (the clickable node)
+ var c = dojo.position(this._buttonNode, true);
+ if(!(e.pageX >= c.x && e.pageX <= c.x + c.w) ||
+ !(e.pageY >= c.y && e.pageY <= c.y + c.h)){
+ var t = e.target;
+ while(t && !overMenu){
+ if(dojo.hasClass(t, "dijitPopup")){
+ overMenu = true;
+ }else{
+ t = t.parentNode;
+ }
+ }
+ if(overMenu){
+ t = e.target;
+ if(dropDown.onItemClick){
+ var menuItem;
+ while(t && !(menuItem = dijit.byNode(t))){
+ t = t.parentNode;
+ }
+ if(menuItem && menuItem.onClick && menuItem.getParent){
+ menuItem.getParent().onItemClick(menuItem, e);
+ }
+ }
+ return;
+ }
+ }
+ }
+ if(this._opened && dropDown.focus){
+ // Focus the dropdown widget - do it on a delay so that we
+ // don't steal our own focus.
+ window.setTimeout(dojo.hitch(dropDown, "focus"), 1);
+ }
+ },
+
+ _setupDropdown: function(){
+ // summary:
+ // set up nodes and connect our mouse and keypress events
+ this._buttonNode = this._buttonNode || this.focusNode || this.domNode;
+ this._popupStateNode = this._popupStateNode || this.focusNode || this._buttonNode;
+ this._aroundNode = this._aroundNode || this.domNode;
+ this.connect(this._buttonNode, "onmousedown", "_onDropDownMouse");
+ this.connect(this._buttonNode, "onclick", "_onDropDownMouse");
+ this.connect(this._buttonNode, "onkeydown", "_onDropDownKeydown");
+ this.connect(this._buttonNode, "onblur", "_onDropDownBlur");
+ this.connect(this._buttonNode, "onkeypress", "_onKey");
+
+ // If we have a _setStateClass function (which happens when
+ // we are a form widget), then we need to connect our open/close
+ // functions to it
+ if(this._setStateClass){
+ this.connect(this, "openDropDown", "_setStateClass");
+ this.connect(this, "closeDropDown", "_setStateClass");
+ }
+
+ // Add a class to the "dijitDownArrowButton" type class to _buttonNode so theme can set direction of arrow
+ // based on where drop down will normally appear
+ var defaultPos = {
+ "after" : this.isLeftToRight() ? "Right" : "Left",
+ "before" : this.isLeftToRight() ? "Left" : "Right",
+ "above" : "Up",
+ "below" : "Down",
+ "left" : "Left",
+ "right" : "Right"
+ }[this.dropDownPosition[0]] || this.dropDownPosition[0] || "Down";
+ dojo.addClass(this._arrowWrapperNode || this._buttonNode, "dijit" + defaultPos + "ArrowButton");
+ },
+
+ postCreate: function(){
+ this._setupDropdown();
+ this.inherited(arguments);
+ },
+
+ destroyDescendants: function(){
+ if(this.dropDown){
+ // Destroy the drop down, unless it's already been destroyed. This can happen because
+ // the drop down is a direct child of <body> even though it's logically my child.
+ if(!this.dropDown._destroyed){
+ this.dropDown.destroyRecursive();
+ }
+ delete this.dropDown;
+ }
+ this.inherited(arguments);
+ },
+
+ _onDropDownKeydown: function(/*Event*/ e){
+ this._seenKeydown = true;
+ },
+
+ _onKeyPress: function(/*Event*/ e){
+ if(this._opened && e.charOrCode == dojo.keys.ESCAPE && !e.shiftKey && !e.ctrlKey && !e.altKey){
+ this.toggleDropDown();
+ dojo.stopEvent(e);
+ return;
+ }
+ this.inherited(arguments);
+ },
+
+ _onDropDownBlur: function(/*Event*/ e){
+ this._seenKeydown = false;
+ },
+
+ _onKey: function(/*Event*/ e){
+ // summary:
+ // Callback when the user presses a key on menu popup node
+
+ if(this.disabled || this.readOnly){ return; }
+ var d = this.dropDown;
+ if(d && this._opened && d.handleKey){
+ if(d.handleKey(e) === false){ return; }
+ }
+ if(d && this._opened && e.keyCode == dojo.keys.ESCAPE){
+ this.toggleDropDown();
+ return;
+ }
+ if(e.keyCode == dojo.keys.DOWN_ARROW || e.keyCode == dojo.keys.ENTER || e.charOrCode == " "){
+ this._onDropDownMouse(e);
+ }
+ },
+
+ _onBlur: function(){
+ // summary:
+ // Called magically when focus has shifted away from this widget and it's dropdown
+
+ this.closeDropDown();
+ // don't focus on button. the user has explicitly focused on something else.
+ this.inherited(arguments);
+ },
+
+ isLoaded: function(){
+ // summary:
+ // Returns whether or not the dropdown is loaded. This can
+ // be overridden in order to force a call to loadDropDown().
+ // tags:
+ // protected
+
+ return true;
+ },
+
+ loadDropDown: function(/* Function */ loadCallback){
+ // summary:
+ // Loads the data for the dropdown, and at some point, calls
+ // the given callback
+ // tags:
+ // protected
+
+ loadCallback();
+ },
+
+ toggleDropDown: function(){
+ // summary:
+ // Toggle the drop-down widget; if it is up, close it, if not, open it
+ // tags:
+ // protected
+
+ if(this.disabled || this.readOnly){ return; }
+ this.focus();
+ var dropDown = this.dropDown;
+ if(!dropDown){ return; }
+ if(!this._opened){
+ // If we aren't loaded, load it first so there isn't a flicker
+ if(!this.isLoaded()){
+ this.loadDropDown(dojo.hitch(this, "openDropDown"));
+ return;
+ }else{
+ this.openDropDown();
+ }
+ }else{
+ this.closeDropDown();
+ }
+ },
+
+ openDropDown: function(){
+ // summary:
+ // Opens the dropdown for this widget - it returns the
+ // return value of dijit.popup.open
+ // tags:
+ // protected
+
+ var dropDown = this.dropDown;
+ var ddNode = dropDown.domNode;
+ var self = this;
+
+ // Prepare our popup's height and honor maxHeight if it exists.
+
+ // TODO: isn't maxHeight dependent on the return value from dijit.popup.open(),
+ // ie, dependent on how much space is available (BK)
+
+ if(!this._preparedNode){
+ dijit.popup.moveOffScreen(ddNode);
+ this._preparedNode = true;
+ // Check if we have explicitly set width and height on the dropdown widget dom node
+ if(ddNode.style.width){
+ this._explicitDDWidth = true;
+ }
+ if(ddNode.style.height){
+ this._explicitDDHeight = true;
+ }
+ }
+ if(this.maxHeight || this.forceWidth || this.autoWidth){
+ var myStyle = {
+ display: "",
+ visibility: "hidden"
+ };
+ if(!this._explicitDDWidth){
+ myStyle.width = "";
+ }
+ if(!this._explicitDDHeight){
+ myStyle.height = "";
+ }
+ dojo.style(ddNode, myStyle);
+ var mb = dojo.marginBox(ddNode);
+ var overHeight = (this.maxHeight && mb.h > this.maxHeight);
+ dojo.style(ddNode, {overflow: overHeight ? "auto" : "hidden"});
+ if(this.forceWidth){
+ mb.w = this.domNode.offsetWidth;
+ }else if(this.autoWidth){
+ mb.w = Math.max(mb.w, this.domNode.offsetWidth);
+ }else{
+ delete mb.w;
+ }
+ if(overHeight){
+ mb.h = this.maxHeight;
+ if("w" in mb){
+ mb.w += 16;
+ }
+ }else{
+ delete mb.h;
+ }
+ delete mb.t;
+ delete mb.l;
+ if(dojo.isFunction(dropDown.resize)){
+ dropDown.resize(mb);
+ }else{
+ dojo.marginBox(ddNode, mb);
+ }
+ }
+ var retVal = dijit.popup.open({
+ parent: this,
+ popup: dropDown,
+ around: this._aroundNode,
+ orient: dijit.getPopupAroundAlignment((this.dropDownPosition && this.dropDownPosition.length) ? this.dropDownPosition : ["below"],this.isLeftToRight()),
+ onExecute: function(){
+ self.closeDropDown(true);
+ },
+ onCancel: function(){
+ self.closeDropDown(true);
+ },
+ onClose: function(){
+ dojo.attr(self._popupStateNode, "popupActive", false);
+ dojo.removeClass(self._popupStateNode, "dijitHasDropDownOpen");
+ self._opened = false;
+ self.state = "";
+ }
+ });
+ dojo.attr(this._popupStateNode, "popupActive", "true");
+ dojo.addClass(self._popupStateNode, "dijitHasDropDownOpen");
+ this._opened=true;
+ this.state="Opened";
+ // TODO: set this.checked and call setStateClass(), to affect button look while drop down is shown
+ return retVal;
+ },
+
+ closeDropDown: function(/*Boolean*/ focus){
+ // summary:
+ // Closes the drop down on this widget
+ // tags:
+ // protected
+
+ if(this._opened){
+ dijit.popup.close(this.dropDown);
+ if(focus){ this.focus(); }
+ this._opened = false;
+ this.state = "";
+ }
+ }
+
+ }
+);
}
if(!dojo._hasResource["dijit.form.Button"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.form.Button"] = true;
dojo.provide("dijit.form.Button");
-dojo.declare("dijit.form.Button", dijit.form._FormWidget, {
-/*
- * usage
- * <button dojoType="button" onClick="...">Hello world</button>
- *
- * var button1 = new dijit.form.Button({label: "hello world", onClick: foo});
- * dojo.body().appendChild(button1.domNode);
- */
- // summary
- // Basically the same thing as a normal HTML button, but with special styling.
-
- // label: String
- // text to display in button
+
+dojo.declare("dijit.form.Button",
+ dijit.form._FormWidget,
+ {
+ // summary:
+ // Basically the same thing as a normal HTML button, but with special styling.
+ // description:
+ // Buttons can display a label, an icon, or both.
+ // A label should always be specified (through innerHTML) or the label
+ // attribute. It can be hidden via showLabel=false.
+ // example:
+ // | <button dojoType="dijit.form.Button" onClick="...">Hello world</button>
+ //
+ // example:
+ // | var button1 = new dijit.form.Button({label: "hello world", onClick: foo});
+ // | dojo.body().appendChild(button1.domNode);
+
+ // label: HTML String
+ // Text to display in button.
+ // If the label is hidden (showLabel=false) then and no title has
+ // been specified, then label is also set as title attribute of icon.
label: "",
// showLabel: Boolean
- // whether or not to display the text label in button
+ // Set this to true to hide the label text and display only the icon.
+ // (If showLabel=false then iconClass must be specified.)
+ // Especially useful for toolbars.
+ // If showLabel=true, the label will become the title (a.k.a. tooltip/hint) of the icon.
+ //
+ // The exception case is for computers in high-contrast mode, where the label
+ // will still be displayed, since the icon doesn't appear.
showLabel: true,
// iconClass: String
- // class to apply to div in button to make it display an icon
+ // Class to apply to DOMNode in button to make it display an icon
iconClass: "",
+ // type: String
+ // Defines the type of button. "button", "submit", or "reset".
type: "button",
+
baseClass: "dijitButton",
- templateString:"<div class=\"dijit dijitLeft dijitInline dijitButton\"\n\tdojoAttachEvent=\"onclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\n\t><div class='dijitRight'\n\t\t><button class=\"dijitStretch dijitButtonNode dijitButtonContents\" dojoAttachPoint=\"focusNode,titleNode\"\n\t\t\ttype=\"${type}\" waiRole=\"button\" waiState=\"labelledby-${id}_label\"\n\t\t\t><span class=\"dijitInline ${iconClass}\" dojoAttachPoint=\"iconNode\" \n \t\t\t\t><span class=\"dijitToggleButtonIconChar\">&#10003</span \n\t\t\t></span\n\t\t\t><span class=\"dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\">${label}</span\n\t\t></button\n\t></div\n></div>\n",
-
- // TODO: set button's title to this.containerNode.innerText
+
+ templateString: dojo.cache("dijit.form", "templates/Button.html", "<span class=\"dijit dijitReset dijitLeft dijitInline\"\n\tdojoAttachEvent=\"onclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\n\t><span class=\"dijitReset dijitRight dijitInline\"\n\t\t><span class=\"dijitReset dijitInline dijitButtonNode\"\n\t\t\t><button class=\"dijitReset dijitStretch dijitButtonContents\"\n\t\t\t\tdojoAttachPoint=\"titleNode,focusNode\"\n\t\t\t\t${nameAttrSetting} type=\"${type}\" value=\"${value}\" waiRole=\"button\" waiState=\"labelledby-${id}_label\"\n\t\t\t\t><span class=\"dijitReset dijitInline\" dojoAttachPoint=\"iconNode\"\n\t\t\t\t\t><span class=\"dijitReset dijitToggleButtonIconChar\">&#10003;</span\n\t\t\t\t></span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\n\t\t\t\t\tid=\"${id}_label\"\n\t\t\t\t\tdojoAttachPoint=\"containerNode\"\n\t\t\t\t></span\n\t\t\t></button\n\t\t></span\n\t></span\n></span>\n"),
+
+ attributeMap: dojo.delegate(dijit.form._FormWidget.prototype.attributeMap, {
+ label: { node: "containerNode", type: "innerHTML" },
+ iconClass: { node: "iconNode", type: "class" }
+ }),
+
_onClick: function(/*Event*/ e){
- // summary: internal function to handle click actions
- if(this.disabled){ return false; }
+ // summary:
+ // Internal function to handle click actions
+ if(this.disabled){
+ return false;
+ }
this._clicked(); // widget click actions
return this.onClick(e); // user click actions
},
_onButtonClick: function(/*Event*/ e){
- // summary: callback when the user mouse clicks the button portion
- dojo.stopEvent(e);
- var okToSubmit = this._onClick(e) !== false; // returning nothing is same as true
-
- // for some reason type=submit buttons don't automatically submit the form; do it manually
- if(this.type=="submit" && okToSubmit){
- for(var node=this.domNode; node; node=node.parentNode){
+ // summary:
+ // Handler when the user activates the button portion.
+ if(this._onClick(e) === false){ // returning nothing is same as true
+ e.preventDefault(); // needed for checkbox
+ }else if(this.type == "submit" && !this.focusNode.form){ // see if a nonform widget needs to be signalled
+ for(var node=this.domNode; node.parentNode/*#5935*/; node=node.parentNode){
var widget=dijit.byNode(node);
- if(widget && widget._onSubmit){
+ if(widget && typeof widget._onSubmit == "function"){
widget._onSubmit(e);
break;
}
- if(node.tagName.toLowerCase() == "form"){
- if(!node.onsubmit || node.onsubmit()){ node.submit(); }
- break;
- }
- }
+ }
+ }
+ },
+
+ _setValueAttr: function(/*String*/ value){
+ // Verify that value cannot be set for BUTTON elements.
+ var attr = this.attributeMap.value || '';
+ if(this[attr.node || attr || 'domNode'].tagName == 'BUTTON'){
+ // On IE, setting value actually overrides innerHTML, so disallow for everyone for consistency
+ if(value != this.value){
+ console.debug('Cannot change the value attribute on a Button widget.');
+ }
+ }
+ },
+
+ _fillContent: function(/*DomNode*/ source){
+ // Overrides _Templated._fillContent().
+ // If button label is specified as srcNodeRef.innerHTML rather than
+ // this.params.label, handle it here.
+ if(source && (!this.params || !("label" in this.params))){
+ this.attr('label', source.innerHTML);
}
},
postCreate: function(){
- // summary:
- // get label and set as title on button icon if necessary
- if (this.showLabel == false){
- var labelText = "";
- this.label = this.containerNode.innerHTML;
- labelText = dojo.trim(this.containerNode.innerText || this.containerNode.textContent);
- // set title attrib on iconNode
- this.titleNode.title=labelText;
- dojo.addClass(this.containerNode,"dijitDisplayNone");
- }
- this.inherited(arguments);
+ dojo.setSelectable(this.focusNode, false);
+ this.inherited(arguments);
+ },
+
+ _setShowLabelAttr: function(val){
+ if(this.containerNode){
+ dojo.toggleClass(this.containerNode, "dijitDisplayNone", !val);
+ }
+ this.showLabel = val;
},
onClick: function(/*Event*/ e){
- // summary: user callback for when button is clicked
- // if type="submit", return value != false to perform submit
- return true;
+ // summary:
+ // Callback for when button is clicked.
+ // If type="submit", return true to perform submit, or false to cancel it.
+ // type:
+ // callback
+ return true; // Boolean
},
_clicked: function(/*Event*/ e){
- // summary: internal replaceable function for when the button is clicked
+ // summary:
+ // Internal overridable function for when the button is clicked
},
setLabel: function(/*String*/ content){
- // summary: reset the label (text) of the button; takes an HTML string
+ // summary:
+ // Deprecated. Use attr('label', ...) instead.
+ dojo.deprecated("dijit.form.Button.setLabel() is deprecated. Use attr('label', ...) instead.", "", "2.0");
+ this.attr("label", content);
+ },
+ _setLabelAttr: function(/*String*/ content){
+ // summary:
+ // Hook for attr('label', ...) to work.
+ // description:
+ // Set the label (text) of the button; takes an HTML string.
this.containerNode.innerHTML = this.label = content;
- if(dojo.isMozilla){ // Firefox has re-render issues with tables
- var oldDisplay = dojo.getComputedStyle(this.domNode).display;
- this.domNode.style.display="none";
- var _this = this;
- setTimeout(function(){_this.domNode.style.display=oldDisplay;},1);
- }
- if (this.showLabel == false){
- this.titleNode.title=dojo.trim(this.containerNode.innerText || this.containerNode.textContent);
- }
- }
-});
-
-/*
- * usage
- * <button dojoType="DropDownButton" label="Hello world"><div dojotype=dijit.Menu>...</div></button>
- *
- * var button1 = new dijit.form.DropDownButton({ label: "hi", dropDown: new dijit.Menu(...) });
- * dojo.body().appendChild(button1);
- */
-dojo.declare("dijit.form.DropDownButton", [dijit.form.Button, dijit._Container], {
- // summary
- // push the button and a menu shows up
+ if(this.showLabel == false && !this.params.title){
+ this.titleNode.title = dojo.trim(this.containerNode.innerText || this.containerNode.textContent || '');
+ }
+ }
+});
+
+
+dojo.declare("dijit.form.DropDownButton", [dijit.form.Button, dijit._Container, dijit._HasDropDown], {
+ // summary:
+ // A button with a drop down
+ //
+ // example:
+ // | <button dojoType="dijit.form.DropDownButton" label="Hello world">
+ // | <div dojotype="dijit.Menu">...</div>
+ // | </button>
+ //
+ // example:
+ // | var button1 = new dijit.form.DropDownButton({ label: "hi", dropDown: new dijit.Menu(...) });
+ // | dojo.body().appendChild(button1);
+ //
baseClass : "dijitDropDownButton",
- templateString:"<div class=\"dijit dijitLeft dijitInline\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse,onclick:_onDropDownClick,onkeydown:_onDropDownKeydown,onblur:_onDropDownBlur,onkeypress:_onKey\"\n\t><div class='dijitRight'>\n\t<button class=\"dijitStretch dijitButtonNode dijitButtonContents\" type=\"${type}\"\n\t\tdojoAttachPoint=\"focusNode,titleNode\" waiRole=\"button\" waiState=\"haspopup-true,labelledby-${id}_label\"\n\t\t><div class=\"dijitInline ${iconClass}\" dojoAttachPoint=\"iconNode\"></div\n\t\t><span class=\"dijitButtonText\" \tdojoAttachPoint=\"containerNode,popupStateNode\"\n\t\tid=\"${id}_label\">${label}</span\n\t\t><span class='dijitA11yDownArrow'>&#9660;</span>\n\t</button>\n</div></div>\n",
+ templateString: dojo.cache("dijit.form", "templates/DropDownButton.html", "<span class=\"dijit dijitReset dijitLeft dijitInline\"\n\tdojoAttachPoint=\"_buttonNode\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\n\t><span class='dijitReset dijitRight dijitInline'\n\t\t><span class='dijitReset dijitInline dijitButtonNode'\n\t\t\t><button class=\"dijitReset dijitStretch dijitButtonContents\"\n\t\t\t\t${nameAttrSetting} type=\"${type}\" value=\"${value}\"\n\t\t\t\tdojoAttachPoint=\"focusNode,titleNode,_arrowWrapperNode\"\n\t\t\t\twaiRole=\"button\" waiState=\"haspopup-true,labelledby-${id}_label\"\n\t\t\t\t><span class=\"dijitReset dijitInline\"\n\t\t\t\t\tdojoAttachPoint=\"iconNode\"\n\t\t\t\t></span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\n\t\t\t\t\tdojoAttachPoint=\"containerNode,_popupStateNode\"\n\t\t\t\t\tid=\"${id}_label\"\n\t\t\t\t></span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonInner\">&thinsp;</span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonChar\">&#9660;</span\n\t\t\t></button\n\t\t></span\n\t></span\n></span>\n"),
_fillContent: function(){
- // my inner HTML contains both the button contents and a drop down widget, like
+ // Overrides Button._fillContent().
+ //
+ // My inner HTML contains both the button contents and a drop down widget, like
// <DropDownButton> <span>push me</span> <Menu> ... </Menu> </DropDownButton>
// The first node is assumed to be the button content. The widget is the popup.
+
if(this.srcNodeRef){ // programatically created buttons might not define srcNodeRef
//FIXME: figure out how to filter out the widget and use all remaining nodes as button
// content, not just nodes[0]
var nodes = dojo.query("*", this.srcNodeRef);
dijit.form.DropDownButton.superclass._fillContent.call(this, nodes[0]);
// save pointer to srcNode so we can grab the drop down widget after it's instantiated
this.dropDownContainer = this.srcNodeRef;
}
},
startup: function(){
+ if(this._started){ return; }
+
// the child widget from srcNodeRef is the dropdown widget. Insert it in the page DOM,
// make it invisible, and store a reference to pass to the popup code.
if(!this.dropDown){
var dropDownNode = dojo.query("[widgetId]", this.dropDownContainer)[0];
this.dropDown = dijit.byNode(dropDownNode);
delete this.dropDownContainer;
}
- dojo.body().appendChild(this.dropDown.domNode);
- this.dropDown.domNode.style.display="none";
- },
-
- _onArrowClick: function(/*Event*/ e){
- // summary: callback when the user mouse clicks on menu popup node
- if(this.disabled){ return; }
- this._toggleDropDown();
- },
-
- _onDropDownClick: function(/*Event*/ e){
- // on Firefox 2 on the Mac it is possible to fire onclick
- // by pressing enter down on a second element and transferring
- // focus to the DropDownButton;
- // we want to prevent opening our menu in this situation
- // and only do so if we have seen a keydown on this button;
- // e.detail != 0 means that we were fired by mouse
- var isMacFFlessThan3 = dojo.isFF && dojo.isFF < 3
- && navigator.appVersion.indexOf("Macintosh") != -1;
- if(!isMacFFlessThan3 || e.detail != 0 || this._seenKeydown){
- this._onArrowClick(e);
- }
- this._seenKeydown = false;
- },
-
- _onDropDownKeydown: function(/*Event*/ e){
- this._seenKeydown = true;
- },
-
- _onDropDownBlur: function(/*Event*/ e){
- this._seenKeydown = false;
- },
-
- _onKey: function(/*Event*/ e){
- // summary: callback when the user presses a key on menu popup node
- if(this.disabled){ return; }
- if(e.keyCode == dojo.keys.DOWN_ARROW){
- if(!this.dropDown || this.dropDown.domNode.style.display=="none"){
- dojo.stopEvent(e);
- return this._toggleDropDown();
- }
- }
- },
-
- _onBlur: function(){
- // summary: called magically when focus has shifted away from this widget and it's dropdown
- this._closeDropDown();
- // don't focus on button. the user has explicitly focused on something else.
- },
-
- _toggleDropDown: function(){
- // summary: toggle the drop-down widget; if it is up, close it, if not, open it
- if(this.disabled){ return; }
- dijit.focus(this.popupStateNode);
+ dijit.popup.moveOffScreen(this.dropDown.domNode);
+
+ this.inherited(arguments);
+ },
+
+ isLoaded: function(){
+ // Returns whether or not we are loaded - if our dropdown has an href,
+ // then we want to check that.
+ var dropDown = this.dropDown;
+ return (!dropDown.href || dropDown.isLoaded);
+ },
+
+ loadDropDown: function(){
+ // Loads our dropdown
var dropDown = this.dropDown;
- if(!dropDown){ return false; }
- if(!dropDown.isShowingNow){
- // If there's an href, then load that first, so we don't get a flicker
- if(dropDown.href && !dropDown.isLoaded){
- var self = this;
- var handler = dojo.connect(dropDown, "onLoad", function(){
- dojo.disconnect(handler);
- self._openDropDown();
- });
- dropDown._loadCheck(true);
- return;
- }else{
- this._openDropDown();
- }
- }else{
- this._closeDropDown();
- }
- },
-
- _openDropDown: function(){
- var dropDown = this.dropDown;
- var oldWidth=dropDown.domNode.style.width;
- var self = this;
-
- dijit.popup.open({
- parent: this,
- popup: dropDown,
- around: this.domNode,
- orient: this.isLeftToRight() ? {'BL':'TL', 'BR':'TR', 'TL':'BL', 'TR':'BR'}
- : {'BR':'TR', 'BL':'TL', 'TR':'BR', 'TL':'BL'},
- onExecute: function(){
- self._closeDropDown(true);
- },
- onCancel: function(){
- self._closeDropDown(true);
- },
- onClose: function(){
- dropDown.domNode.style.width = oldWidth;
- self.popupStateNode.removeAttribute("popupActive");
- this._opened = false;
- }
- });
- if(this.domNode.offsetWidth > dropDown.domNode.offsetWidth){
- var adjustNode = null;
- if(!this.isLeftToRight()){
- adjustNode = dropDown.domNode.parentNode;
- var oldRight = adjustNode.offsetLeft + adjustNode.offsetWidth;
- }
- // make menu at least as wide as the button
- dojo.marginBox(dropDown.domNode, {w: this.domNode.offsetWidth});
- if(adjustNode){
- adjustNode.style.left = oldRight - this.domNode.offsetWidth + "px";
- }
- }
- this.popupStateNode.setAttribute("popupActive", "true");
- this._opened=true;
- if(dropDown.focus){
- dropDown.focus();
- }
- // TODO: set this.checked and call setStateClass(), to affect button look while drop down is shown
- },
-
- _closeDropDown: function(/*Boolean*/ focus){
- if(this._opened){
- dijit.popup.close(this.dropDown);
- if(focus){ this.focus(); }
- this._opened = false;
- }
- }
-});
-
-/*
- * usage
- * <button dojoType="ComboButton" onClick="..."><span>Hello world</span><div dojoType=dijit.Menu>...</div></button>
- *
- * var button1 = new dijit.form.ComboButton({label: "hello world", onClick: foo, dropDown: "myMenu"});
- * dojo.body().appendChild(button1.domNode);
- */
+ if(!dropDown){ return; }
+ if(!this.isLoaded()){
+ var handler = dojo.connect(dropDown, "onLoad", this, function(){
+ dojo.disconnect(handler);
+ this.openDropDown();
+ });
+ dropDown.refresh();
+ }else{
+ this.openDropDown();
+ }
+ },
+
+ isFocusable: function(){
+ // Overridden so that focus is handled by the _HasDropDown mixin, not by
+ // the _FormWidget mixin.
+ return this.inherited(arguments) && !this._mouseDown;
+ }
+});
+
dojo.declare("dijit.form.ComboButton", dijit.form.DropDownButton, {
- // summary
- // left side is normal button, right side displays menu
- templateString:"<table class='dijit dijitReset dijitInline dijitLeft'\n\tcellspacing='0' cellpadding='0'\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\">\n\t<tr>\n\t\t<td\tclass=\"dijitStretch dijitButtonContents dijitButtonNode\"\n\t\t\ttabIndex=\"${tabIndex}\"\n\t\t\tdojoAttachEvent=\"ondijitclick:_onButtonClick\" dojoAttachPoint=\"titleNode\"\n\t\t\twaiRole=\"button\" waiState=\"labelledby-${id}_label\">\n\t\t\t<div class=\"dijitInline ${iconClass}\" dojoAttachPoint=\"iconNode\"></div>\n\t\t\t<span class=\"dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\">${label}</span>\n\t\t</td>\n\t\t<td class='dijitReset dijitRight dijitButtonNode dijitDownArrowButton'\n\t\t\tdojoAttachPoint=\"popupStateNode,focusNode\"\n\t\t\tdojoAttachEvent=\"ondijitclick:_onArrowClick, onkeypress:_onKey\"\n\t\t\tstateModifier=\"DownArrow\"\n\t\t\ttitle=\"${optionsTitle}\" name=\"${name}\"\n\t\t\twaiRole=\"button\" waiState=\"haspopup-true\"\n\t\t><div waiRole=\"presentation\">&#9660;</div>\n\t</td></tr>\n</table>\n",
-
- attributeMap: dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),
- {id:"", name:""}),
+ // summary:
+ // A combination button and drop-down button.
+ // Users can click one side to "press" the button, or click an arrow
+ // icon to display the drop down.
+ //
+ // example:
+ // | <button dojoType="dijit.form.ComboButton" onClick="...">
+ // | <span>Hello world</span>
+ // | <div dojoType="dijit.Menu">...</div>
+ // | </button>
+ //
+ // example:
+ // | var button1 = new dijit.form.ComboButton({label: "hello world", onClick: foo, dropDown: "myMenu"});
+ // | dojo.body().appendChild(button1.domNode);
+ //
+
+ templateString: dojo.cache("dijit.form", "templates/ComboButton.html", "<table class='dijit dijitReset dijitInline dijitLeft'\n\tcellspacing='0' cellpadding='0' waiRole=\"presentation\"\n\t><tbody waiRole=\"presentation\"><tr waiRole=\"presentation\"\n\t\t><td class=\"dijitReset dijitStretch dijitButtonNode\"><button id=\"${id}_button\" class=\"dijitReset dijitButtonContents\"\n\t\t\tdojoAttachEvent=\"onclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse,onkeypress:_onButtonKeyPress\" dojoAttachPoint=\"titleNode\"\n\t\t\twaiRole=\"button\" waiState=\"labelledby-${id}_label\"\n\t\t\t><div class=\"dijitReset dijitInline\" dojoAttachPoint=\"iconNode\" waiRole=\"presentation\"></div\n\t\t\t><div class=\"dijitReset dijitInline dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\" waiRole=\"presentation\"></div\n\t\t></button></td\n\t\t><td id=\"${id}_arrow\" class='dijitReset dijitRight dijitButtonNode dijitArrowButton'\n\t\t\tdojoAttachPoint=\"_popupStateNode,focusNode,_buttonNode\"\n\t\t\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onkeypress:_onArrowKeyPress\"\n\t\t\tstateModifier=\"DownArrow\"\n\t\t\ttitle=\"${optionsTitle}\" ${nameAttrSetting}\n\t\t\twaiRole=\"button\" waiState=\"haspopup-true\"\n\t\t\t><div class=\"dijitReset dijitArrowButtonInner\" waiRole=\"presentation\">&thinsp;</div\n\t\t\t><div class=\"dijitReset dijitArrowButtonChar\" waiRole=\"presentation\">&#9660;</div\n\t\t></td\n\t></tr></tbody\n></table>\n"),
+
+ attributeMap: dojo.mixin(dojo.clone(dijit.form.Button.prototype.attributeMap), {
+ id: "",
+ tabIndex: ["focusNode", "titleNode"],
+ title: "titleNode"
+ }),
// optionsTitle: String
- // text that describes the options menu (accessibility)
+ // Text that describes the options menu (accessibility)
optionsTitle: "",
baseClass: "dijitComboButton",
_focusedNode: null,
postCreate: function(){
this.inherited(arguments);
- this._focalNodes = [this.titleNode, this.popupStateNode];
+ this._focalNodes = [this.titleNode, this._popupStateNode];
+ var isIE = dojo.isIE;
dojo.forEach(this._focalNodes, dojo.hitch(this, function(node){
- if(dojo.isIE){
- this.connect(node, "onactivate", this._onNodeFocus);
- }else{
- this.connect(node, "onfocus", this._onNodeFocus);
- }
+ this.connect(node, isIE? "onactivate" : "onfocus", this._onNodeFocus);
+ this.connect(node, isIE? "ondeactivate" : "onblur", this._onNodeBlur);
}));
- },
-
- focusFocalNode: function(node){
- // summary: Focus the focal node node.
- this._focusedNode = node;
- dijit.focus(node);
- },
-
- hasNextFocalNode: function(){
- // summary: Returns true if this widget has no node currently
- // focused or if there is a node following the focused one.
- // False is returned if the last node has focus.
- return this._focusedNode !== this.getFocalNodes()[1];
- },
-
- focusNext: function(){
- // summary: Focus the focal node following the current node with focus
- // or the first one if no node currently has focus.
- this._focusedNode = this.getFocalNodes()[this._focusedNode ? 1 : 0];
- dijit.focus(this._focusedNode);
- },
-
- hasPrevFocalNode: function(){
- // summary: Returns true if this widget has no node currently
- // focused or if there is a node before the focused one.
- // False is returned if the first node has focus.
- return this._focusedNode !== this.getFocalNodes()[0];
- },
-
- focusPrev: function(){
- // summary: Focus the focal node before the current node with focus
- // or the last one if no node currently has focus.
- this._focusedNode = this.getFocalNodes()[this._focusedNode ? 0 : 1];
- dijit.focus(this._focusedNode);
- },
-
- getFocalNodes: function(){
- // summary: Returns an array of focal nodes for this widget.
- return this._focalNodes;
+ if(isIE && (isIE < 8 || dojo.isQuirks)){ // fixed in IE8/strict
+ with(this.titleNode){ // resize BUTTON tag so parent TD won't inherit extra padding
+ style.width = scrollWidth + "px";
+ this.connect(this.titleNode, "onresize", function(){
+ setTimeout( function(){ style.width = scrollWidth + "px"; }, 0);
+ });
+ }
+ }
},
_onNodeFocus: function(evt){
this._focusedNode = evt.currentTarget;
- },
-
- _onBlur: function(evt){
+ var fnc = this._focusedNode == this.focusNode ? "dijitDownArrowButtonFocused" : "dijitButtonContentsFocused";
+ dojo.addClass(this._focusedNode, fnc);
+ },
+
+ _onNodeBlur: function(evt){
+ var fnc = evt.currentTarget == this.focusNode ? "dijitDownArrowButtonFocused" : "dijitButtonContentsFocused";
+ dojo.removeClass(evt.currentTarget, fnc);
+ },
+
+ _onBlur: function(){
this.inherited(arguments);
this._focusedNode = null;
+ },
+
+ _onButtonKeyPress: function(/*Event*/ evt){
+ // summary:
+ // Handler for right arrow key when focus is on left part of button
+ if(evt.charOrCode == dojo.keys[this.isLeftToRight() ? "RIGHT_ARROW" : "LEFT_ARROW"]){
+ dijit.focus(this._popupStateNode);
+ dojo.stopEvent(evt);
+ }
+ },
+
+ _onArrowKeyPress: function(/*Event*/ evt){
+ // summary:
+ // Handler for left arrow key when focus is on right part of button
+ if(evt.charOrCode == dojo.keys[this.isLeftToRight() ? "LEFT_ARROW" : "RIGHT_ARROW"]){
+ dijit.focus(this.titleNode);
+ dojo.stopEvent(evt);
+ }
+ },
+
+ focus: function(/*String*/ position){
+ // summary:
+ // Focuses this widget to according to position, if specified,
+ // otherwise on arrow node
+ // position:
+ // "start" or "end"
+
+ dijit.focus(position == "start" ? this.titleNode : this._popupStateNode);
}
});
dojo.declare("dijit.form.ToggleButton", dijit.form.Button, {
- // summary
- // A button that can be in two states (checked or not).
- // Can be base class for things like tabs or checkbox or radio buttons
+ // summary:
+ // A button that can be in two states (checked or not).
+ // Can be base class for things like tabs or checkbox or radio buttons
baseClass: "dijitToggleButton",
// checked: Boolean
// Corresponds to the native HTML <input> element's attribute.
// In markup, specified as "checked='checked'" or just "checked".
// True if the button is depressed, or the checkbox is checked,
// or the radio button is selected, etc.
checked: false,
+ attributeMap: dojo.mixin(dojo.clone(dijit.form.Button.prototype.attributeMap), {
+ checked:"focusNode"
+ }),
+
_clicked: function(/*Event*/ evt){
- this.setChecked(!this.checked);
+ this.attr('checked', !this.checked);
+ },
+
+ _setCheckedAttr: function(/*Boolean*/ value){
+ this.checked = value;
+ dojo.attr(this.focusNode || this.domNode, "checked", value);
+ dijit.setWaiState(this.focusNode || this.domNode, "pressed", value);
+ this._setStateClass();
+ this._handleOnChange(value, true);
},
setChecked: function(/*Boolean*/ checked){
- // summary
- // Programatically deselect the button
- this.checked = checked;
- dijit.setWaiState(this.focusNode || this.domNode, "pressed", this.checked);
- this._setStateClass();
- this.onChange(checked);
+ // summary:
+ // Deprecated. Use attr('checked', true/false) instead.
+ dojo.deprecated("setChecked("+checked+") is deprecated. Use attr('checked',"+checked+") instead.", "", "2.0");
+ this.attr('checked', checked);
+ },
+
+ reset: function(){
+ // summary:
+ // Reset the widget's value to what it was at initialization time
+
+ this._hasBeenBlurred = false;
+
+ // set checked state to original setting
+ this.attr('checked', this.params.checked || false);
}
});
}
if(!dojo._hasResource["dijit._editor._Plugin"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit._editor._Plugin"] = true;
dojo.provide("dijit._editor._Plugin");
dojo.declare("dijit._editor._Plugin", null, {
// summary
- // This represents a "plugin" to the editor, which is basically
+ // Base class for a "plugin" to the editor, which is usually
// a single button on the Toolbar and some associated code
+
constructor: function(/*Object?*/args, /*DomNode?*/node){
- if(args){
- dojo.mixin(this, args);
- }
- },
-
+ this.params = args || {};
+ dojo.mixin(this, this.params);
+ this._connects=[];
+ },
+
+ // editor: [const] dijit.Editor
+ // Points to the parent editor
editor: null,
+
+ // iconClassPrefix: [const] String
+ // The CSS class name for the button node is formed from `iconClassPrefix` and `command`
iconClassPrefix: "dijitEditorIcon",
+
+ // button: dijit._Widget?
+ // Pointer to `dijit.form.Button` or other widget (ex: `dijit.form.FilteringSelect`)
+ // that is added to the toolbar to control this plugin.
+ // If not specified, will be created on initialization according to `buttonClass`
button: null,
- queryCommand: null,
+
+ // command: String
+ // String like "insertUnorderedList", "outdent", "justifyCenter", etc. that represents an editor command.
+ // Passed to editor.execCommand() if `useDefaultCommand` is true.
command: "",
- commandArg: null,
+
+ // useDefaultCommand: Boolean
+ // If true, this plugin executes by calling Editor.execCommand() with the argument specified in `command`.
useDefaultCommand: true,
+
+ // buttonClass: Widget Class
+ // Class of widget (ex: dijit.form.Button or dijit.form.FilteringSelect)
+ // that is added to the toolbar to control this plugin.
+ // This is used to instantiate the button, unless `button` itself is specified directly.
buttonClass: dijit.form.Button,
- updateInterval: 200, // only allow updates every two tenths of a second
+
+ getLabel: function(/*String*/key){
+ // summary:
+ // Returns the label to use for the button
+ // tags:
+ // private
+ return this.editor.commands[key]; // String
+ },
+
_initButton: function(){
+ // summary:
+ // Initialize the button or other widget that will control this plugin.
+ // This code only works for plugins controlling built-in commands in the editor.
+ // tags:
+ // protected extension
if(this.command.length){
- var label = this.editor.commands[this.command];
- var className = "dijitEditorIcon "+this.iconClassPrefix + this.command.charAt(0).toUpperCase() + this.command.substr(1);
+ var label = this.getLabel(this.command);
+ var className = this.iconClassPrefix+" "+this.iconClassPrefix + this.command.charAt(0).toUpperCase() + this.command.substr(1);
if(!this.button){
- var props = {
+ var props = dojo.mixin({
label: label,
showLabel: false,
iconClass: className,
- dropDown: this.dropDown
- };
+ dropDown: this.dropDown,
+ tabIndex: "-1"
+ }, this.params || {});
this.button = new this.buttonClass(props);
}
}
},
+
+ destroy: function(){
+ // summary:
+ // Destroy this plugin
+
+ dojo.forEach(this._connects, dojo.disconnect);
+ if(this.dropDown){
+ this.dropDown.destroyRecursive();
+ }
+ },
+
+ connect: function(o, f, tf){
+ // summary:
+ // Make a dojo.connect() that is automatically disconnected when this plugin is destroyed.
+ // Similar to `dijit._Widget.connect`.
+ // tags:
+ // protected
+ this._connects.push(dojo.connect(o, f, this, tf));
+ },
+
updateState: function(){
- var _e = this.editor;
- var _c = this.command;
- if(!_e){ return; }
- if(!_e.isLoaded){ return; }
- if(!_c.length){ return; }
+ // summary:
+ // Change state of the plugin to respond to events in the editor.
+ // description:
+ // This is called on meaningful events in the editor, such as change of selection
+ // or caret position (but not simple typing of alphanumeric keys). It gives the
+ // plugin a chance to update the CSS of its button.
+ //
+ // For example, the "bold" plugin will highlight/unhighlight the bold button depending on whether the
+ // characters next to the caret are bold or not.
+ //
+ // Only makes sense when `useDefaultCommand` is true, as it calls Editor.queryCommandEnabled(`command`).
+ var e = this.editor,
+ c = this.command,
+ checked, enabled;
+ if(!e || !e.isLoaded || !c.length){ return; }
if(this.button){
try{
- var enabled = _e.queryCommandEnabled(_c);
- this.button.setDisabled(!enabled);
- if(this.button.setChecked){
- this.button.setChecked(_e.queryCommandState(_c));
+ enabled = e.queryCommandEnabled(c);
+ if(this.enabled !== enabled){
+ this.enabled = enabled;
+ this.button.attr('disabled', !enabled);
+ }
+ if(typeof this.button.checked == 'boolean'){
+ checked = e.queryCommandState(c);
+ if(this.checked !== checked){
+ this.checked = checked;
+ this.button.attr('checked', e.queryCommandState(c));
+ }
}
}catch(e){
- console.debug(e);
- }
- }
- },
- setEditor: function(/*Widget*/editor){
- // FIXME: detatch from previous editor!!
+ console.log(e); // FIXME: we shouldn't have debug statements in our code. Log as an error?
+ }
+ }
+ },
+
+ setEditor: function(/*dijit.Editor*/ editor){
+ // summary:
+ // Tell the plugin which Editor it is associated with.
+
+ // TODO: refactor code to just pass editor to constructor.
+
+ // FIXME: detach from previous editor!!
this.editor = editor;
// FIXME: prevent creating this if we don't need to (i.e., editor can't handle our command)
this._initButton();
// FIXME: wire up editor to button here!
- if( (this.command.length) &&
- (!this.editor.queryCommandAvailable(this.command))
- ){
+ if(this.command.length &&
+ !this.editor.queryCommandAvailable(this.command)){
// console.debug("hiding:", this.command);
if(this.button){
this.button.domNode.style.display = "none";
}
}
if(this.button && this.useDefaultCommand){
- dojo.connect(this.button, "onClick",
+ this.connect(this.button, "onClick",
dojo.hitch(this.editor, "execCommand", this.command, this.commandArg)
);
}
- dojo.connect(this.editor, "onNormalizedDisplayChanged", this, "updateState");
- },
- setToolbar: function(/*Widget*/toolbar){
+ this.connect(this.editor, "onNormalizedDisplayChanged", "updateState");
+ },
+
+ setToolbar: function(/*dijit.Toolbar*/ toolbar){
+ // summary:
+ // Tell the plugin to add it's controller widget (often a button)
+ // to the toolbar. Does nothing if there is no controller widget.
+
+ // TODO: refactor code to just pass toolbar to constructor.
+
if(this.button){
toolbar.addChild(this.button);
}
// console.debug("adding", this.button, "to:", toolbar);
}
});
}
+if(!dojo._hasResource["dijit._editor.plugins.EnterKeyHandling"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit._editor.plugins.EnterKeyHandling"] = true;
+dojo.provide("dijit._editor.plugins.EnterKeyHandling");
+
+
+
+dojo.declare("dijit._editor.plugins.EnterKeyHandling", dijit._editor._Plugin, {
+ // summary:
+ // This plugin tries to make all browsers behave consistently w.r.t
+ // displaying paragraphs, specifically dealing with when the user presses
+ // the ENTER key.
+ //
+ // It deals mainly with how the text appears on the screen (specifically
+ // address the double-spaced line problem on IE), but also has some code
+ // to normalize what attr('value') returns.
+ //
+ // description:
+ // This plugin has three modes:
+ //
+ // * blockModeForEnter=BR
+ // * blockModeForEnter=DIV
+ // * blockModeForEnter=P
+ //
+ // In blockModeForEnter=P, the ENTER key semantically means "start a new
+ // paragraph", whereas shift-ENTER means "new line in the current paragraph".
+ // For example:
+ //
+ // | first paragraph <shift-ENTER>
+ // | second line of first paragraph <ENTER>
+ // |
+ // | second paragraph
+ //
+ // In the other two modes, the ENTER key means to go to a new line in the
+ // current paragraph, and users [visually] create a new paragraph by pressing ENTER twice.
+ // For example, if the user enters text into an editor like this:
+ //
+ // | one <ENTER>
+ // | two <ENTER>
+ // | three <ENTER>
+ // | <ENTER>
+ // | four <ENTER>
+ // | five <ENTER>
+ // | six <ENTER>
+ //
+ // It will appear on the screen as two paragraphs of three lines each.
+ //
+ // blockNodeForEnter=BR
+ // --------------------
+ // On IE, typing the above keystrokes in the editor will internally produce DOM of:
+ //
+ // | <p>one</p>
+ // | <p>two</p>
+ // | <p>three</p>
+ // | <p></p>
+ // | <p>four</p>
+ // | <p>five</p>
+ // | <p>six</p>
+ //
+ // However, blockNodeForEnter=BR makes the Editor on IE display like other browsers, by
+ // changing the CSS for the <p> node to not have top/bottom margins,
+ // thus eliminating the double-spaced appearance.
+ //
+ // Also, attr('value') when used w/blockNodeForEnter=br on IE will return:
+ //
+ // | <p> one <br> two <br> three </p>
+ // | <p> four <br> five <br> six </p>
+ //
+ // This output normalization implemented by a filter when the
+ // editor writes out it's data, to convert consecutive <p>
+ // nodes into a single <p> node with internal <br> separators.
+ //
+ // There's also a pre-filter to mirror the post-filter.
+ // It converts a single <p> with <br> line breaks
+ // into separate <p> nodes, and creates empty <p> nodes for spacing
+ // between paragraphs.
+ //
+ // On FF typing the above keystrokes will internally generate:
+ //
+ // | one <br> two <br> three <br> <br> four <br> five <br> six <br>
+ //
+ // And on Safari it will generate:
+ //
+ // | "one"
+ // | <div>two</div>
+ // | <div>three</div>
+ // | <div><br></div>
+ // | <div>four</div>
+ // | <div>five</div>
+ // | <div>six</div>
+ //
+ // Thus, Safari and FF already look correct although semantically their content is a bit strange.
+ // On Safari or Firefox blockNodeForEnter=BR uses the builtin editor command "insertBrOnReturn",
+ // but that doesn't seem to do anything.
+ // Thus, attr('value') on safari/FF returns the browser-specific HTML listed above,
+ // rather than the semantically meaningful value that IE returns: <p>one<br>two</p> <p>three<br>four</p>.
+ //
+ // (Note: originally based on http://bugs.dojotoolkit.org/ticket/2859)
+ //
+ // blockNodeForEnter=P
+ // -------------------
+ // Plugin will monitor keystrokes and update the editor's content on the fly,
+ // so that the ENTER key will create a new <p> on FF and Safari (it already
+ // works that way by default on IE).
+ //
+ // blockNodeForEnter=DIV
+ // ---------------------
+ // Follows the same code path as blockNodeForEnter=P but inserting a <div>
+ // on ENTER key. Although it produces strange internal DOM, like this:
+ //
+ // | <div>paragraph one</div>
+ // | <div>paragraph one, line 2</div>
+ // | <div>&nbsp;</div>
+ // | <div>paragraph two</div>
+ //
+ // it does provide a consistent look on all browsers, and the on-the-fly DOM updating
+ // can be useful for collaborative editing.
+
+ // blockNodeForEnter: String
+ // This property decides the behavior of Enter key. It can be either P,
+ // DIV, BR, or empty (which means disable this feature). Anything else
+ // will trigger errors.
+ //
+ // See class description for more details.
+ blockNodeForEnter: 'BR',
+
+ constructor: function(args){
+ if(args){
+ dojo.mixin(this,args);
+ }
+ },
+
+ setEditor: function(editor){
+ // Overrides _Plugin.setEditor().
+ this.editor = editor;
+ if(this.blockNodeForEnter == 'BR'){
+ if(dojo.isIE){
+ editor.contentDomPreFilters.push(dojo.hitch(this, "regularPsToSingleLinePs"));
+ editor.contentDomPostFilters.push(dojo.hitch(this, "singleLinePsToRegularPs"));
+ editor.onLoadDeferred.addCallback(dojo.hitch(this, "_fixNewLineBehaviorForIE"));
+ }else{
+ editor.onLoadDeferred.addCallback(dojo.hitch(this,function(d){
+ try{
+ this.editor.document.execCommand("insertBrOnReturn", false, true);
+ }catch(e){}
+ return d;
+ }));
+ }
+ }else if(this.blockNodeForEnter){
+ // add enter key handler
+ // FIXME: need to port to the new event code!!
+ dojo['require']('dijit._editor.range');
+ var h = dojo.hitch(this,this.handleEnterKey);
+ editor.addKeyHandler(13, 0, 0, h); //enter
+ editor.addKeyHandler(13, 0, 1, h); //shift+enter
+ this.connect(this.editor,'onKeyPressed','onKeyPressed');
+ }
+ },
+ onKeyPressed: function(e){
+ // summary:
+ // Handler for keypress events.
+ // tags:
+ // private
+ if(this._checkListLater){
+ if(dojo.withGlobal(this.editor.window, 'isCollapsed', dijit)){
+ var liparent=dojo.withGlobal(this.editor.window, 'getAncestorElement', dijit._editor.selection, ['LI']);
+ if(!liparent){
+ // circulate the undo detection code by calling RichText::execCommand directly
+ dijit._editor.RichText.prototype.execCommand.call(this.editor, 'formatblock',this.blockNodeForEnter);
+ // set the innerHTML of the new block node
+ var block = dojo.withGlobal(this.editor.window, 'getAncestorElement', dijit._editor.selection, [this.blockNodeForEnter]);
+ if(block){
+ block.innerHTML=this.bogusHtmlContent;
+ if(dojo.isIE){
+ // move to the start by moving backwards one char
+ var r = this.editor.document.selection.createRange();
+ r.move('character',-1);
+ r.select();
+ }
+ }else{
+ console.error('onKeyPressed: Cannot find the new block node'); // FIXME
+ }
+ }else{
+ if(dojo.isMoz){
+ if(liparent.parentNode.parentNode.nodeName == 'LI'){
+ liparent=liparent.parentNode.parentNode;
+ }
+ }
+ var fc=liparent.firstChild;
+ if(fc && fc.nodeType == 1 && (fc.nodeName == 'UL' || fc.nodeName == 'OL')){
+ liparent.insertBefore(fc.ownerDocument.createTextNode('\xA0'),fc);
+ var newrange = dijit.range.create(this.editor.window);
+ newrange.setStart(liparent.firstChild,0);
+ var selection = dijit.range.getSelection(this.editor.window, true);
+ selection.removeAllRanges();
+ selection.addRange(newrange);
+ }
+ }
+ }
+ this._checkListLater = false;
+ }
+ if(this._pressedEnterInBlock){
+ // the new created is the original current P, so we have previousSibling below
+ if(this._pressedEnterInBlock.previousSibling){
+ this.removeTrailingBr(this._pressedEnterInBlock.previousSibling);
+ }
+ delete this._pressedEnterInBlock;
+ }
+ },
+
+ // bogusHtmlContent: [private] String
+ // HTML to stick into a new empty block
+ bogusHtmlContent: '&nbsp;',
+
+ // blockNodes: [private] Regex
+ // Regex for testing if a given tag is a block level (display:block) tag
+ blockNodes: /^(?:P|H1|H2|H3|H4|H5|H6|LI)$/,
+
+ handleEnterKey: function(e){
+ // summary:
+ // Handler for enter key events when blockModeForEnter is DIV or P.
+ // description:
+ // Manually handle enter key event to make the behavior consistent across
+ // all supported browsers. See class description for details.
+ // tags:
+ // private
+
+ var selection, range, newrange, doc=this.editor.document,br;
+ if(e.shiftKey){ // shift+enter always generates <br>
+ var parent = dojo.withGlobal(this.editor.window, "getParentElement", dijit._editor.selection);
+ var header = dijit.range.getAncestor(parent,this.blockNodes);
+ if(header){
+ if(!e.shiftKey && header.tagName == 'LI'){
+ return true; // let browser handle
+ }
+ selection = dijit.range.getSelection(this.editor.window);
+ range = selection.getRangeAt(0);
+ if(!range.collapsed){
+ range.deleteContents();
+ selection = dijit.range.getSelection(this.editor.window);
+ range = selection.getRangeAt(0);
+ }
+ if(dijit.range.atBeginningOfContainer(header, range.startContainer, range.startOffset)){
+ if(e.shiftKey){
+ br=doc.createElement('br');
+ newrange = dijit.range.create(this.editor.window);
+ header.insertBefore(br,header.firstChild);
+ newrange.setStartBefore(br.nextSibling);
+ selection.removeAllRanges();
+ selection.addRange(newrange);
+ }else{
+ dojo.place(br, header, "before");
+ }
+ }else if(dijit.range.atEndOfContainer(header, range.startContainer, range.startOffset)){
+ newrange = dijit.range.create(this.editor.window);
+ br=doc.createElement('br');
+ if(e.shiftKey){
+ header.appendChild(br);
+ header.appendChild(doc.createTextNode('\xA0'));
+ newrange.setStart(header.lastChild,0);
+ }else{
+ dojo.place(br, header, "after");
+ newrange.setStartAfter(header);
+ }
+
+ selection.removeAllRanges();
+ selection.addRange(newrange);
+ }else{
+ return true; // let browser handle
+ }
+ }else{
+ // don't change this: do not call this.execCommand, as that may have other logic in subclass
+ dijit._editor.RichText.prototype.execCommand.call(this.editor, 'inserthtml', '<br>');
+ }
+ return false;
+ }
+ var _letBrowserHandle = true;
+
+ // first remove selection
+ selection = dijit.range.getSelection(this.editor.window);
+ range = selection.getRangeAt(0);
+ if(!range.collapsed){
+ range.deleteContents();
+ selection = dijit.range.getSelection(this.editor.window);
+ range = selection.getRangeAt(0);
+ }
+
+ var block = dijit.range.getBlockAncestor(range.endContainer, null, this.editor.editNode);
+ var blockNode = block.blockNode;
+
+ // if this is under a LI or the parent of the blockNode is LI, just let browser to handle it
+ if((this._checkListLater = (blockNode && (blockNode.nodeName == 'LI' || blockNode.parentNode.nodeName == 'LI')))){
+ if(dojo.isMoz){
+ // press enter in middle of P may leave a trailing <br/>, let's remove it later
+ this._pressedEnterInBlock = blockNode;
+ }
+ // if this li only contains spaces, set the content to empty so the browser will outdent this item
+ if(/^(\s|&nbsp;|\xA0|<span\b[^>]*\bclass=['"]Apple-style-span['"][^>]*>(\s|&nbsp;|\xA0)<\/span>)?(<br>)?$/.test(blockNode.innerHTML)){
+ // empty LI node
+ blockNode.innerHTML = '';
+ if(dojo.isWebKit){ // WebKit tosses the range when innerHTML is reset
+ newrange = dijit.range.create(this.editor.window);
+ newrange.setStart(blockNode, 0);
+ selection.removeAllRanges();
+ selection.addRange(newrange);
+ }
+ this._checkListLater = false; // nothing to check since the browser handles outdent
+ }
+ return true;
+ }
+
+ // text node directly under body, let's wrap them in a node
+ if(!block.blockNode || block.blockNode===this.editor.editNode){
+ try{
+ dijit._editor.RichText.prototype.execCommand.call(this.editor, 'formatblock',this.blockNodeForEnter);
+ }catch(e2){ /*squelch FF3 exception bug when editor content is a single BR*/ }
+ // get the newly created block node
+ // FIXME
+ block = {blockNode:dojo.withGlobal(this.editor.window, "getAncestorElement", dijit._editor.selection, [this.blockNodeForEnter]),
+ blockContainer: this.editor.editNode};
+ if(block.blockNode){
+ if(block.blockNode != this.editor.editNode &&
+ (!(block.blockNode.textContent || block.blockNode.innerHTML).replace(/^\s+|\s+$/g, "").length)){
+ this.removeTrailingBr(block.blockNode);
+ return false;
+ }
+ }else{ // we shouldn't be here if formatblock worked
+ block.blockNode = this.editor.editNode;
+ }
+ selection = dijit.range.getSelection(this.editor.window);
+ range = selection.getRangeAt(0);
+ }
+
+ var newblock = doc.createElement(this.blockNodeForEnter);
+ newblock.innerHTML=this.bogusHtmlContent;
+ this.removeTrailingBr(block.blockNode);
+ if(dijit.range.atEndOfContainer(block.blockNode, range.endContainer, range.endOffset)){
+ if(block.blockNode === block.blockContainer){
+ block.blockNode.appendChild(newblock);
+ }else{
+ dojo.place(newblock, block.blockNode, "after");
+ }
+ _letBrowserHandle = false;
+ // lets move caret to the newly created block
+ newrange = dijit.range.create(this.editor.window);
+ newrange.setStart(newblock, 0);
+ selection.removeAllRanges();
+ selection.addRange(newrange);
+ if(this.editor.height){
+ dijit.scrollIntoView(newblock);
+ }
+ }else if(dijit.range.atBeginningOfContainer(block.blockNode,
+ range.startContainer, range.startOffset)){
+ dojo.place(newblock, block.blockNode, block.blockNode === block.blockContainer ? "first" : "before");
+ if(newblock.nextSibling && this.editor.height){
+ // position input caret - mostly WebKit needs this
+ newrange = dijit.range.create(this.editor.window);
+ newrange.setStart(newblock.nextSibling, 0);
+ selection.removeAllRanges();
+ selection.addRange(newrange);
+ // browser does not scroll the caret position into view, do it manually
+ dijit.scrollIntoView(newblock.nextSibling);
+ }
+ _letBrowserHandle = false;
+ }else{ // press enter in the middle of P
+ if(dojo.isMoz){
+ // press enter in middle of P may leave a trailing <br/>, let's remove it later
+ this._pressedEnterInBlock = block.blockNode;
+ }
+ }
+ return _letBrowserHandle;
+ },
+
+ removeTrailingBr: function(container){
+ // summary:
+ // If last child of container is a <br>, then remove it.
+ // tags:
+ // private
+ var para = /P|DIV|LI/i.test(container.tagName) ?
+ container : dijit._editor.selection.getParentOfType(container,['P','DIV','LI']);
+
+ if(!para){ return; }
+ if(para.lastChild){
+ if((para.childNodes.length > 1 && para.lastChild.nodeType == 3 && /^[\s\xAD]*$/.test(para.lastChild.nodeValue)) ||
+ para.lastChild.tagName=='BR'){
+
+ dojo.destroy(para.lastChild);
+ }
+ }
+ if(!para.childNodes.length){
+ para.innerHTML=this.bogusHtmlContent;
+ }
+ },
+ _fixNewLineBehaviorForIE: function(d){
+ // summary:
+ // Insert CSS so <p> nodes don't have spacing around them,
+ // thus hiding the fact that ENTER key on IE is creating new
+ // paragraphs
+
+ // cannot use !important since there may be custom user styling;
+ var doc = this.editor.document;
+ if(doc.__INSERTED_EDITIOR_NEWLINE_CSS === undefined){
+ var style = dojo.create("style", {type: "text/css"}, doc.getElementsByTagName("head")[0]);
+ style.styleSheet.cssText = "p{margin:0;}"; // cannot use !important since there may be custom user styling;
+ this.editor.document.__INSERTED_EDITIOR_NEWLINE_CSS = true;
+ }
+ return d;
+ },
+ regularPsToSingleLinePs: function(element, noWhiteSpaceInEmptyP){
+ // summary:
+ // Converts a <p> node containing <br>'s into multiple <p> nodes.
+ // description:
+ // See singleLinePsToRegularPs(). This method does the
+ // opposite thing, and is used as a pre-filter when loading the
+ // editor, to mirror the effects of the post-filter at end of edit.
+ // tags:
+ // private
+ function wrapLinesInPs(el){
+ // move "lines" of top-level text nodes into ps
+ function wrapNodes(nodes){
+ // nodes are assumed to all be siblings
+ var newP = nodes[0].ownerDocument.createElement('p'); // FIXME: not very idiomatic
+ nodes[0].parentNode.insertBefore(newP, nodes[0]);
+ dojo.forEach(nodes, function(node){
+ newP.appendChild(node);
+ });
+ }
+
+ var currentNodeIndex = 0;
+ var nodesInLine = [];
+ var currentNode;
+ while(currentNodeIndex < el.childNodes.length){
+ currentNode = el.childNodes[currentNodeIndex];
+ if( currentNode.nodeType==3 || // text node
+ (currentNode.nodeType==1 && currentNode.nodeName!='BR' && dojo.style(currentNode, "display")!="block")
+ ){
+ nodesInLine.push(currentNode);
+ }else{
+ // hit line delimiter; process nodesInLine if there are any
+ var nextCurrentNode = currentNode.nextSibling;
+ if(nodesInLine.length){
+ wrapNodes(nodesInLine);
+ currentNodeIndex = (currentNodeIndex+1)-nodesInLine.length;
+ if(currentNode.nodeName=="BR"){
+ dojo.destroy(currentNode);
+ }
+ }
+ nodesInLine = [];
+ }
+ currentNodeIndex++;
+ }
+ if(nodesInLine.length){ wrapNodes(nodesInLine); }
+ }
+
+ function splitP(el){
+ // split a paragraph into seperate paragraphs at BRs
+ var currentNode = null;
+ var trailingNodes = [];
+ var lastNodeIndex = el.childNodes.length-1;
+ for(var i=lastNodeIndex; i>=0; i--){
+ currentNode = el.childNodes[i];
+ if(currentNode.nodeName=="BR"){
+ var newP = currentNode.ownerDocument.createElement('p');
+ dojo.place(newP, el, "after");
+ if(trailingNodes.length==0 && i != lastNodeIndex){
+ newP.innerHTML = "&nbsp;"
+ }
+ dojo.forEach(trailingNodes, function(node){
+ newP.appendChild(node);
+ });
+ dojo.destroy(currentNode);
+ trailingNodes = [];
+ }else{
+ trailingNodes.unshift(currentNode);
+ }
+ }
+ }
+
+ var pList = [];
+ var ps = element.getElementsByTagName('p');
+ dojo.forEach(ps, function(p){ pList.push(p); });
+ dojo.forEach(pList, function(p){
+ var prevSib = p.previousSibling;
+ if( (prevSib) && (prevSib.nodeType == 1) &&
+ (prevSib.nodeName == 'P' || dojo.style(prevSib, 'display') != 'block')
+ ){
+ var newP = p.parentNode.insertBefore(this.document.createElement('p'), p);
+ // this is essential to prevent IE from losing the P.
+ // if it's going to be innerHTML'd later we need
+ // to add the &nbsp; to _really_ force the issue
+ newP.innerHTML = noWhiteSpaceInEmptyP ? "" : "&nbsp;";
+ }
+ splitP(p);
+ },this.editor);
+ wrapLinesInPs(element);
+ return element;
+ },
+
+ singleLinePsToRegularPs: function(element){
+ // summary:
+ // Called as post-filter.
+ // Apparently collapses adjacent <p> nodes into a single <p>
+ // nodes with <br> separating each line.
+ //
+ // example:
+ // Given this input:
+ // | <p>line 1</p>
+ // | <p>line 2</p>
+ // | <ol>
+ // | <li>item 1
+ // | <li>item 2
+ // | </ol>
+ // | <p>line 3</p>
+ // | <p>line 4</p>
+ //
+ // Will convert to:
+ // | <p>line 1<br>line 2</p>
+ // | <ol>
+ // | <li>item 1
+ // | <li>item 2
+ // | </ol>
+ // | <p>line 3<br>line 4</p>
+ //
+ // Not sure why this situation would even come up after the pre-filter and
+ // the enter-key-handling code.
+ //
+ // tags:
+ // private
+
+ function getParagraphParents(node){
+ // summary:
+ // Used to get list of all nodes that contain paragraphs.
+ // Seems like that would just be the very top node itself, but apparently not.
+ var ps = node.getElementsByTagName('p');
+ var parents = [];
+ for(var i=0; i<ps.length; i++){
+ var p = ps[i];
+ var knownParent = false;
+ for(var k=0; k < parents.length; k++){
+ if(parents[k] === p.parentNode){
+ knownParent = true;
+ break;
+ }
+ }
+ if(!knownParent){
+ parents.push(p.parentNode);
+ }
+ }
+ return parents;
+ }
+
+ function isParagraphDelimiter(node){
+ return (!node.childNodes.length || node.innerHTML=="&nbsp;");
+ }
+
+ var paragraphContainers = getParagraphParents(element);
+ for(var i=0; i<paragraphContainers.length; i++){
+ var container = paragraphContainers[i];
+ var firstPInBlock = null;
+ var node = container.firstChild;
+ var deleteNode = null;
+ while(node){
+ if(node.nodeType != 1 || node.tagName != 'P' ||
+ (node.getAttributeNode('style') || {/*no style*/}).specified){
+ firstPInBlock = null;
+ }else if(isParagraphDelimiter(node)){
+ deleteNode = node;
+ firstPInBlock = null;
+ }else{
+ if(firstPInBlock == null){
+ firstPInBlock = node;
+ }else{
+ if( (!firstPInBlock.lastChild || firstPInBlock.lastChild.nodeName != 'BR') &&
+ (node.firstChild) &&
+ (node.firstChild.nodeName != 'BR')
+ ){
+ firstPInBlock.appendChild(this.editor.document.createElement('br'));
+ }
+ while(node.firstChild){
+ firstPInBlock.appendChild(node.firstChild);
+ }
+ deleteNode = node;
+ }
+ }
+ node = node.nextSibling;
+ if(deleteNode){
+ dojo.destroy(deleteNode);
+ deleteNode = null;
+ }
+ }
+ }
+ return element;
+ }
+});
+
+}
+
if(!dojo._hasResource["dijit.Editor"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.Editor"] = true;
dojo.provide("dijit.Editor");
+
+
+
dojo.declare(
"dijit.Editor",
dijit._editor.RichText,
{
- // summary: A rich-text Editing widget
-
- // plugins: Array
- // a list of plugin names (as strings) or instances (as objects)
+ // summary:
+ // A rich text Editing widget
+ //
+ // description:
+ // This widget provides basic WYSIWYG editing features, based on the browser's
+ // underlying rich text editing capability, accompanied by a toolbar (`dijit.Toolbar`).
+ // A plugin model is available to extend the editor's capabilities as well as the
+ // the options available in the toolbar. Content generation may vary across
+ // browsers, and clipboard operations may have different results, to name
+ // a few limitations. Note: this widget should not be used with the HTML
+ // &lt;TEXTAREA&gt; tag -- see dijit._editor.RichText for details.
+
+ // plugins: Object[]
+ // A list of plugin names (as strings) or instances (as objects)
// for this widget.
+ //
+ // When declared in markup, it might look like:
+ // | plugins="['bold',{name:'dijit._editor.plugins.FontChoice', command:'fontName', generic:true}]"
plugins: null,
- // extraPlugins: Array
- // a list of extra plugin names which will be appended to plugins array
+ // extraPlugins: Object[]
+ // A list of extra plugin names which will be appended to plugins array
extraPlugins: null,
constructor: function(){
- this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|",
- "insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull"/*"createLink"*/];
+ // summary:
+ // Runs on widget initialization to setup arrays etc.
+ // tags:
+ // private
+
+ if(!dojo.isArray(this.plugins)){
+ this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|",
+ "insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull",
+ "dijit._editor.plugins.EnterKeyHandling" /*, "createLink"*/];
+ }
this._plugins=[];
this._editInterval = this.editActionInterval * 1000;
+
+ //IE will always lose focus when other element gets focus, while for FF and safari,
+ //when no iframe is used, focus will be lost whenever another element gets focus.
+ //For IE, we can connect to onBeforeDeactivate, which will be called right before
+ //the focus is lost, so we can obtain the selected range. For other browsers,
+ //no equivelent of onBeforeDeactivate, so we need to do two things to make sure
+ //selection is properly saved before focus is lost: 1) when user clicks another
+ //element in the page, in which case we listen to mousedown on the entire page and
+ //see whether user clicks out of a focus editor, if so, save selection (focus will
+ //only lost after onmousedown event is fired, so we can obtain correct caret pos.)
+ //2) when user tabs away from the editor, which is handled in onKeyDown below.
+ if(dojo.isIE){
+ this.events.push("onBeforeDeactivate");
+ this.events.push("onBeforeActivate");
+ }
},
postCreate: function(){
//for custom undo/redo
if(this.customUndo){
dojo['require']("dijit._editor.range");
this._steps=this._steps.slice(0);
this._undoedSteps=this._undoedSteps.slice(0);
// this.addKeyHandler('z',this.KEY_CTRL,this.undo);
// this.addKeyHandler('y',this.KEY_CTRL,this.redo);
}
if(dojo.isArray(this.extraPlugins)){
this.plugins=this.plugins.concat(this.extraPlugins);
}
// try{
- dijit.Editor.superclass.postCreate.apply(this, arguments);
+ this.inherited(arguments);
+// dijit.Editor.superclass.postCreate.apply(this, arguments);
this.commands = dojo.i18n.getLocalization("dijit._editor", "commands", this.lang);
if(!this.toolbar){
// if we haven't been assigned a toolbar, create one
- var toolbarNode = dojo.doc.createElement("div");
- dojo.place(toolbarNode, this.editingArea, "before");
- this.toolbar = new dijit.Toolbar({}, toolbarNode);
+ this.toolbar = new dijit.Toolbar({});
+ dojo.place(this.toolbar.domNode, this.editingArea, "before");
}
dojo.forEach(this.plugins, this.addPlugin, this);
this.onNormalizedDisplayChanged(); //update toolbar button status
// }catch(e){ console.debug(e); }
+
+ this.toolbar.startup();
},
destroy: function(){
dojo.forEach(this._plugins, function(p){
- if(p.destroy){
+ if(p && p.destroy){
p.destroy();
}
});
this._plugins=[];
- this.toolbar.destroy(); delete this.toolbar;
- this.inherited('destroy',arguments);
+ this.toolbar.destroyRecursive();
+ delete this.toolbar;
+ this.inherited(arguments);
},
addPlugin: function(/*String||Object*/plugin, /*Integer?*/index){
- // summary:
+ // summary:
// takes a plugin name as a string or a plugin instance and
// adds it to the toolbar and associates it with this editor
// instance. The resulting plugin is added to the Editor's
// plugins array. If index is passed, it's placed in the plugins
// array at that index. No big magic, but a nice helper for
// passing in plugin names via markup.
- // plugin: String, args object or plugin instance. Required.
- // args: This object will be passed to the plugin constructor.
- // index:
- // Integer, optional. Used when creating an instance from
+ //
+ // plugin: String, args object or plugin instance
+ //
+ // args:
+ // This object will be passed to the plugin constructor
+ //
+ // index: Integer
+ // Used when creating an instance from
// something already in this.plugins. Ensures that the new
// instance is assigned to this.plugins at that index.
var args=dojo.isString(plugin)?{name:plugin}:plugin;
if(!args.setEditor){
var o={"args":args,"plugin":null,"editor":this};
- dojo.publish("dijit.Editor.getPlugin",[o]);
+ dojo.publish(dijit._scopeName + ".Editor.getPlugin",[o]);
if(!o.plugin){
var pc = dojo.getObject(args.name);
if(pc){
o.plugin=new pc(args);
}
}
if(!o.plugin){
- console.debug('Cannot find plugin',plugin);
+ console.warn('Cannot find plugin',plugin);
return;
}
plugin=o.plugin;
}
if(arguments.length > 1){
this._plugins[index] = plugin;
}else{
this._plugins.push(plugin);
}
plugin.setEditor(this);
if(dojo.isFunction(plugin.setToolbar)){
plugin.setToolbar(this.toolbar);
}
},
+ //the following 3 functions are required to make the editor play nice under a layout widget, see #4070
+ startup: function(){
+ // summary:
+ // Exists to make Editor work as a child of a layout widget.
+ // Developers don't need to call this method.
+ // tags:
+ // protected
+ //console.log('startup',arguments);
+ },
+ resize: function(size){
+ // summary:
+ // Resize the editor to the specified size, see `dijit.layout._LayoutWidget.resize`
+ if(size){
+ // we've been given a height/width for the entire editor (toolbar + contents), calls layout()
+ // to split the allocated size between the toolbar and the contents
+ dijit.layout._LayoutWidget.prototype.resize.apply(this, arguments);
+ }
+ /*
+ else{
+ // do nothing, the editor is already laid out correctly. The user has probably specified
+ // the height parameter, which was used to set a size on the iframe
+ }
+ */
+ },
+ layout: function(){
+ // summary:
+ // Called from `dijit.layout._LayoutWidget.resize`. This shouldn't be called directly
+ // tags:
+ // protected
+
+ // Converts the iframe (or rather the <div> surrounding it) to take all the available space
+ // except what's needed for the toolbar
+ this.editingArea.style.height = (this._contentBox.h - dojo.marginBox(this.toolbar.domNode).h)+"px";
+ if(this.iframe){
+ this.iframe.style.height="100%";
+ }
+ this._layoutMode = true;
+ },
+ _onIEMouseDown: function(/*Event*/ e){
+ // summary:
+ // IE only to prevent 2 clicks to focus
+ // tags:
+ // private
+
+ var outsideClientArea = this.document.body.componentFromPoint(e.x, e.y);
+ if(!outsideClientArea){
+ delete this._savedSelection; // new mouse position overrides old selection
+ if(e.target.tagName == "BODY"){
+ setTimeout(dojo.hitch(this, "placeCursorAtEnd"), 0);
+ }
+ this.inherited(arguments);
+ }
+ },
+ onBeforeActivate: function(e){
+ this._restoreSelection();
+ },
+ onBeforeDeactivate: function(e){
+ // summary:
+ // Called on IE right before focus is lost. Saves the selected range.
+ // tags:
+ // private
+ if(this.customUndo){
+ this.endEditing(true);
+ }
+ //in IE, the selection will be lost when other elements get focus,
+ //let's save focus before the editor is deactivated
+ if(e.target.tagName != "BODY"){
+ this._saveSelection();
+ }
+ //console.log('onBeforeDeactivate',this);
+ },
+
/* beginning of custom undo/redo support */
// customUndo: Boolean
// Whether we shall use custom undo/redo support instead of the native
// browser support. By default, we only enable customUndo for IE, as it
// has broken native undo/redo support. Note: the implementation does
- // support other browsers which have W3C DOM2 Range API.
+ // support other browsers which have W3C DOM2 Range API implemented.
customUndo: dojo.isIE,
- // editActionInterval: Integer
+ // editActionInterval: Integer
// When using customUndo, not every keystroke will be saved as a step.
// Instead typing (including delete) will be grouped together: after
- // a user stop typing for editActionInterval seconds, a step will be
+ // a user stops typing for editActionInterval seconds, a step will be
// saved; if a user resume typing within editActionInterval seconds,
// the timeout will be restarted. By default, editActionInterval is 3
// seconds.
editActionInterval: 3,
+
beginEditing: function(cmd){
+ // summary:
+ // Called to note that the user has started typing alphanumeric characters, if it's not already noted.
+ // Deals with saving undo; see editActionInterval parameter.
+ // tags:
+ // private
if(!this._inEditing){
this._inEditing=true;
this._beginEditing(cmd);
}
if(this.editActionInterval>0){
if(this._editTimer){
clearTimeout(this._editTimer);
}
this._editTimer = setTimeout(dojo.hitch(this, this.endEditing), this._editInterval);
}
},
_steps:[],
_undoedSteps:[],
execCommand: function(cmd){
- if(this.customUndo && (cmd=='undo' || cmd=='redo')){
+ // summary:
+ // Main handler for executing any commands to the editor, like paste, bold, etc.
+ // Called by plugins, but not meant to be called by end users.
+ // tags:
+ // protected
+ if(this.customUndo && (cmd == 'undo' || cmd == 'redo')){
return this[cmd]();
}else{
+ if(this.customUndo){
+ this.endEditing();
+ this._beginEditing();
+ }
+ var r;
try{
- if(this.customUndo){
- this.endEditing();
- this._beginEditing();
- }
- var r = this.inherited('execCommand',arguments);
- if(this.customUndo){
- this._endEditing();
- }
- return r;
+ r = this.inherited('execCommand', arguments);
+ if(dojo.isWebKit && cmd == 'paste' && !r){ //see #4598: safari does not support invoking paste from js
+ throw { code: 1011 }; // throw an object like Mozilla's error
+ }
}catch(e){
- if(dojo.isMoz && /copy|cut|paste/.test(cmd)){
- // Warn user of platform limitation. Cannot programmatically access keyboard. See ticket #4136
+ //TODO: when else might we get an exception? Do we need the Mozilla test below?
+ if(e.code == 1011 /* Mozilla: service denied */ && /copy|cut|paste/.test(cmd)){
+ // Warn user of platform limitation. Cannot programmatically access clipboard. See ticket #4136
var sub = dojo.string.substitute,
- accel = {cut:'X', copy:'C', paste:'V'},
- isMac = navigator.userAgent.indexOf("Macintosh") != -1;
- alert(sub(this.commands.systemShortcutFF,
- [this.commands[cmd], sub(this.commands[isMac ? 'appleKey' : 'ctrlKey'], [accel[cmd]])]));
- }
- return false;
- }
+ accel = {cut:'X', copy:'C', paste:'V'};
+ alert(sub(this.commands.systemShortcut,
+ [this.commands[cmd], sub(this.commands[dojo.isMac ? 'appleKey' : 'ctrlKey'], [accel[cmd]])]));
+ }
+ r = false;
+ }
+ if(this.customUndo){
+ this._endEditing();
+ }
+ return r;
}
},
queryCommandEnabled: function(cmd){
- if(this.customUndo && (cmd=='undo' || cmd=='redo')){
- return cmd=='undo'?(this._steps.length>1):(this._undoedSteps.length>0);
+ // summary:
+ // Returns true if specified editor command is enabled.
+ // Used by the plugins to know when to highlight/not highlight buttons.
+ // tags:
+ // protected
+ if(this.customUndo && (cmd == 'undo' || cmd == 'redo')){
+ return cmd == 'undo' ? (this._steps.length > 1) : (this._undoedSteps.length > 0);
}else{
return this.inherited('queryCommandEnabled',arguments);
}
},
- _changeToStep: function(from,to){
+
+ _moveToBookmark: function(b){
+ // summary:
+ // Selects the text specified in bookmark b
+ // tags:
+ // private
+ var bookmark = b.mark;
+ var mark = b.mark;
+ var col = b.isCollapsed;
+ if(dojo.isIE){
+ if(dojo.isArray(mark)){//IE CONTROL
+ bookmark = [];
+ dojo.forEach(mark,function(n){
+ bookmark.push(dijit.range.getNode(n,this.editNode));
+ },this);
+ }
+ }else{//w3c range
+ var r=dijit.range.create(this.window);
+ r.setStart(dijit.range.getNode(b.startContainer,this.editNode),b.startOffset);
+ r.setEnd(dijit.range.getNode(b.endContainer,this.editNode),b.endOffset);
+ bookmark=r;
+ }
+ dojo.withGlobal(this.window,'moveToBookmark',dijit,[{mark: bookmark, isCollapsed: col}]);
+ },
+
+ _changeToStep: function(from, to){
+ // summary:
+ // Reverts editor to "to" setting, from the undo stack.
+ // tags:
+ // private
this.setValue(to.text);
var b=to.bookmark;
if(!b){ return; }
- if(dojo.isIE){
- if(dojo.isArray(b)){//IE CONTROL
- var tmp=[];
- dojo.forEach(b,function(n){
- tmp.push(dijit.range.getNode(n,this.editNode));
- },this);
- b=tmp;
- }
- }else{//w3c range
- var r=dijit.range.create();
- r.setStart(dijit.range.getNode(b.startContainer,this.editNode),b.startOffset);
- r.setEnd(dijit.range.getNode(b.endContainer,this.editNode),b.endOffset);
- b=r;
- }
- dojo.withGlobal(this.window,'moveToBookmark',dijit,[b]);
+ this._moveToBookmark(b);
},
undo: function(){
+ // summary:
+ // Handler for editor undo (ex: ctrl-z) operation
+ // tags:
+ // private
// console.log('undo');
this.endEditing(true);
var s=this._steps.pop();
if(this._steps.length>0){
this.focus();
this._changeToStep(s,this._steps[this._steps.length-1]);
this._undoedSteps.push(s);
this.onDisplayChanged();
return true;
}
return false;
},
redo: function(){
+ // summary:
+ // Handler for editor redo (ex: ctrl-y) operation
+ // tags:
+ // private
+
// console.log('redo');
this.endEditing(true);
var s=this._undoedSteps.pop();
if(s && this._steps.length>0){
this.focus();
this._changeToStep(this._steps[this._steps.length-1],s);
this._steps.push(s);
this.onDisplayChanged();
return true;
}
return false;
},
endEditing: function(ignore_caret){
+ // summary:
+ // Called to note that the user has stopped typing alphanumeric characters, if it's not already noted.
+ // Deals with saving undo; see editActionInterval parameter.
+ // tags:
+ // private
if(this._editTimer){
clearTimeout(this._editTimer);
}
if(this._inEditing){
this._endEditing(ignore_caret);
this._inEditing=false;
}
},
_getBookmark: function(){
+ // summary:
+ // Get the currently selected text
+ // tags:
+ // protected
var b=dojo.withGlobal(this.window,dijit.getBookmark);
- if(dojo.isIE){
- if(dojo.isArray(b)){//CONTROL
- var tmp=[];
- dojo.forEach(b,function(n){
- tmp.push(dijit.range.getIndex(n,this.editNode).o);
- },this);
- b=tmp;
- }
- }else{//w3c range
- var tmp=dijit.range.getIndex(b.startContainer,this.editNode).o
- b={startContainer:tmp,
- startOffset:b.startOffset,
- endContainer:b.endContainer===b.startContainer?tmp:dijit.range.getIndex(b.endContainer,this.editNode).o,
- endOffset:b.endOffset};
+ var tmp=[];
+ if(b.mark){
+ var mark = b.mark;
+ if(dojo.isIE){
+ if(dojo.isArray(mark)){//CONTROL
+ dojo.forEach(mark,function(n){
+ tmp.push(dijit.range.getIndex(n,this.editNode).o);
+ },this);
+ b.mark = tmp;
+ }
+ }else{//w3c range
+ tmp=dijit.range.getIndex(mark.startContainer,this.editNode).o;
+ b.mark ={startContainer:tmp,
+ startOffset:mark.startOffset,
+ endContainer:mark.endContainer === mark.startContainer?tmp:dijit.range.getIndex(mark.endContainer,this.editNode).o,
+ endOffset:mark.endOffset};
+ }
}
return b;
},
_beginEditing: function(cmd){
- if(this._steps.length===0){
+ // summary:
+ // Called when the user starts typing alphanumeric characters.
+ // Deals with saving undo; see editActionInterval parameter.
+ // tags:
+ // private
+ if(this._steps.length === 0){
this._steps.push({'text':this.savedContent,'bookmark':this._getBookmark()});
}
},
_endEditing: function(ignore_caret){
+ // summary:
+ // Called when the user stops typing alphanumeric characters.
+ // Deals with saving undo; see editActionInterval parameter.
+ // tags:
+ // private
var v=this.getValue(true);
this._undoedSteps=[];//clear undoed steps
- this._steps.push({'text':v,'bookmark':this._getBookmark()});
+ this._steps.push({text: v, bookmark: this._getBookmark()});
},
onKeyDown: function(e){
+ // summary:
+ // Handler for onkeydown event.
+ // tags:
+ // private
+
+ //We need to save selection if the user TAB away from this editor
+ //no need to call _saveSelection for IE, as that will be taken care of in onBeforeDeactivate
+ if(!dojo.isIE && !this.iframe && e.keyCode == dojo.keys.TAB && !this.tabIndent){
+ this._saveSelection();
+ }
if(!this.customUndo){
- this.inherited('onKeyDown',arguments);
+ this.inherited(arguments);
return;
}
- var k=e.keyCode,ks=dojo.keys;
- if(e.ctrlKey){
- if(k===90||k===122){ //z
+ var k = e.keyCode, ks = dojo.keys;
+ if(e.ctrlKey && !e.altKey){//undo and redo only if the special right Alt + z/y are not pressed #5892
+ if(k == 90 || k == 122){ //z
dojo.stopEvent(e);
this.undo();
return;
- }else if(k===89||k===121){ //y
+ }else if(k == 89 || k == 121){ //y
dojo.stopEvent(e);
this.redo();
return;
}
}
- this.inherited('onKeyDown',arguments);
+ this.inherited(arguments);
switch(k){
case ks.ENTER:
- this.beginEditing();
- break;
case ks.BACKSPACE:
case ks.DELETE:
this.beginEditing();
break;
case 88: //x
case 86: //v
if(e.ctrlKey && !e.altKey && !e.metaKey){
this.endEditing();//end current typing step if any
if(e.keyCode == 88){
this.beginEditing('cut');
//use timeout to trigger after the cut is complete
setTimeout(dojo.hitch(this, this.endEditing), 1);
}else{
this.beginEditing('paste');
//use timeout to trigger after the paste is complete
setTimeout(dojo.hitch(this, this.endEditing), 1);
}
break;
}
//pass through
default:
if(!e.ctrlKey && !e.altKey && !e.metaKey && (e.keyCode<dojo.keys.F1 || e.keyCode>dojo.keys.F15)){
this.beginEditing();
break;
}
//pass through
case ks.ALT:
this.endEditing();
break;
case ks.UP_ARROW:
case ks.DOWN_ARROW:
case ks.LEFT_ARROW:
case ks.RIGHT_ARROW:
case ks.HOME:
case ks.END:
case ks.PAGE_UP:
case ks.PAGE_DOWN:
this.endEditing(true);
break;
//maybe ctrl+backspace/delete, so don't endEditing when ctrl is pressed
case ks.CTRL:
case ks.SHIFT:
case ks.TAB:
break;
- }
+ }
},
_onBlur: function(){
+ // summary:
+ // Called from focus manager when focus has moved away from this editor
+ // tags:
+ // protected
+
+ //this._saveSelection();
this.inherited('_onBlur',arguments);
this.endEditing(true);
},
+ _saveSelection: function(){
+ // summary:
+ // Save the currently selected text in _savedSelection attribute
+ // tags:
+ // private
+ this._savedSelection=this._getBookmark();
+ //console.log('save selection',this._savedSelection,this);
+ },
+ _restoreSelection: function(){
+ // summary:
+ // Re-select the text specified in _savedSelection attribute;
+ // see _saveSelection().
+ // tags:
+ // private
+ if(this._savedSelection){
+ // only restore the selection if the current range is collapsed
+ // if not collapsed, then it means the editor does not lose
+ // selection and there is no need to restore it
+ if(dojo.withGlobal(this.window,'isCollapsed',dijit)){
+ this._moveToBookmark(this._savedSelection);
+ }
+ delete this._savedSelection;
+ }
+ },
+
onClick: function(){
+ // summary:
+ // Handler for when editor is clicked
+ // tags:
+ // protected
this.endEditing(true);
- this.inherited('onClick',arguments);
+ this.inherited(arguments);
}
/* end of custom undo/redo support */
}
);
-/* the following code is to registered a handler to get default plugins */
-dojo.subscribe("dijit.Editor.getPlugin",null,function(o){
+// Register the "default plugins", ie, the built-in editor commands
+dojo.subscribe(dijit._scopeName + ".Editor.getPlugin",null,function(o){
if(o.plugin){ return; }
- var args=o.args, p;
+ var args = o.args, p;
var _p = dijit._editor._Plugin;
- var name=args.name;
+ var name = args.name;
switch(name){
case "undo": case "redo": case "cut": case "copy": case "paste": case "insertOrderedList":
case "insertUnorderedList": case "indent": case "outdent": case "justifyCenter":
case "justifyFull": case "justifyLeft": case "justifyRight": case "delete":
- case "selectAll": case "removeFormat":
+ case "selectAll": case "removeFormat": case "unlink":
+ case "insertHorizontalRule":
p = new _p({ command: name });
break;
case "bold": case "italic": case "underline": case "strikethrough":
case "subscript": case "superscript":
p = new _p({ buttonClass: dijit.form.ToggleButton, command: name });
break;
case "|":
p = new _p({ button: new dijit.ToolbarSeparator() });
- break;
- case "createLink":
-// dojo['require']('dijit._editor.plugins.LinkDialog');
- p = new dijit._editor.plugins.LinkDialog({ command: name });
- break;
- case "foreColor": case "hiliteColor":
- p = new dijit._editor.plugins.TextColor({ command: name });
- break;
- case "fontName": case "fontSize": case "formatBlock":
- p = new dijit._editor.plugins.FontChoice({ command: name });
}
// console.log('name',name,p);
o.plugin=p;
});
}
+if(!dojo._hasResource["dijit.MenuItem"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.MenuItem"] = true;
+dojo.provide("dijit.MenuItem");
+
+
+
+
+
+dojo.declare("dijit.MenuItem",
+ [dijit._Widget, dijit._Templated, dijit._Contained],
+ {
+ // summary:
+ // A line item in a Menu Widget
+
+ // Make 3 columns
+ // icon, label, and expand arrow (BiDi-dependent) indicating sub-menu
+ templateString: dojo.cache("dijit", "templates/MenuItem.html", "<tr class=\"dijitReset dijitMenuItem\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitem\" tabIndex=\"-1\"\n\t\tdojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<td class=\"dijitReset\" waiRole=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon\" dojoAttachPoint=\"iconNode\">\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" dojoAttachPoint=\"containerNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" dojoAttachPoint=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" waiRole=\"presentation\">\n\t\t<div dojoAttachPoint=\"arrowWrapper\" style=\"visibility: hidden\">\n\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuExpand\">\n\t\t\t<span class=\"dijitMenuExpandA11y\">+</span>\n\t\t</div>\n\t</td>\n</tr>\n"),
+
+ attributeMap: dojo.delegate(dijit._Widget.prototype.attributeMap, {
+ label: { node: "containerNode", type: "innerHTML" },
+ iconClass: { node: "iconNode", type: "class" }
+ }),
+
+ // label: String
+ // Menu text
+ label: '',
+
+ // iconClass: String
+ // Class to apply to DOMNode to make it display an icon.
+ iconClass: "",
+
+ // accelKey: String
+ // Text for the accelerator (shortcut) key combination.
+ // Note that although Menu can display accelerator keys there
+ // is no infrastructure to actually catch and execute these
+ // accelerators.
+ accelKey: "",
+
+ // disabled: Boolean
+ // If true, the menu item is disabled.
+ // If false, the menu item is enabled.
+ disabled: false,
+
+ _fillContent: function(/*DomNode*/ source){
+ // If button label is specified as srcNodeRef.innerHTML rather than
+ // this.params.label, handle it here.
+ if(source && !("label" in this.params)){
+ this.attr('label', source.innerHTML);
+ }
+ },
+
+ postCreate: function(){
+ dojo.setSelectable(this.domNode, false);
+ var label = this.id+"_text";
+ dojo.attr(this.containerNode, "id", label);
+ if(this.accelKeyNode){
+ dojo.attr(this.accelKeyNode, "id", this.id + "_accel");
+ label += " " + this.id + "_accel";
+ }
+ dijit.setWaiState(this.domNode, "labelledby", label);
+ },
+
+ _onHover: function(){
+ // summary:
+ // Handler when mouse is moved onto menu item
+ // tags:
+ // protected
+ dojo.addClass(this.domNode, 'dijitMenuItemHover');
+ this.getParent().onItemHover(this);
+ },
+
+ _onUnhover: function(){
+ // summary:
+ // Handler when mouse is moved off of menu item,
+ // possibly to a child menu, or maybe to a sibling
+ // menuitem or somewhere else entirely.
+ // tags:
+ // protected
+
+ // if we are unhovering the currently selected item
+ // then unselect it
+ dojo.removeClass(this.domNode, 'dijitMenuItemHover');
+ this.getParent().onItemUnhover(this);
+ },
+
+ _onClick: function(evt){
+ // summary:
+ // Internal handler for click events on MenuItem.
+ // tags:
+ // private
+ this.getParent().onItemClick(this, evt);
+ dojo.stopEvent(evt);
+ },
+
+ onClick: function(/*Event*/ evt){
+ // summary:
+ // User defined function to handle clicks
+ // tags:
+ // callback
+ },
+
+ focus: function(){
+ // summary:
+ // Focus on this MenuItem
+ try{
+ if(dojo.isIE == 8){
+ // needed for IE8 which won't scroll TR tags into view on focus yet calling scrollIntoView creates flicker (#10275)
+ this.containerNode.focus();
+ }
+ dijit.focus(this.focusNode);
+ }catch(e){
+ // this throws on IE (at least) in some scenarios
+ }
+ },
+
+ _onFocus: function(){
+ // summary:
+ // This is called by the focus manager when focus
+ // goes to this MenuItem or a child menu.
+ // tags:
+ // protected
+ this._setSelected(true);
+ this.getParent()._onItemFocus(this);
+
+ this.inherited(arguments);
+ },
+
+ _setSelected: function(selected){
+ // summary:
+ // Indicate that this node is the currently selected one
+ // tags:
+ // private
+
+ /***
+ * TODO: remove this method and calls to it, when _onBlur() is working for MenuItem.
+ * Currently _onBlur() gets called when focus is moved from the MenuItem to a child menu.
+ * That's not supposed to happen, but the problem is:
+ * In order to allow dijit.popup's getTopPopup() to work,a sub menu's popupParent
+ * points to the parent Menu, bypassing the parent MenuItem... thus the
+ * MenuItem is not in the chain of active widgets and gets a premature call to
+ * _onBlur()
+ */
+
+ dojo.toggleClass(this.domNode, "dijitMenuItemSelected", selected);
+ },
+
+ setLabel: function(/*String*/ content){
+ // summary:
+ // Deprecated. Use attr('label', ...) instead.
+ // tags:
+ // deprecated
+ dojo.deprecated("dijit.MenuItem.setLabel() is deprecated. Use attr('label', ...) instead.", "", "2.0");
+ this.attr("label", content);
+ },
+
+ setDisabled: function(/*Boolean*/ disabled){
+ // summary:
+ // Deprecated. Use attr('disabled', bool) instead.
+ // tags:
+ // deprecated
+ dojo.deprecated("dijit.Menu.setDisabled() is deprecated. Use attr('disabled', bool) instead.", "", "2.0");
+ this.attr('disabled', disabled);
+ },
+ _setDisabledAttr: function(/*Boolean*/ value){
+ // summary:
+ // Hook for attr('disabled', ...) to work.
+ // Enable or disable this menu item.
+ this.disabled = value;
+ dojo[value ? "addClass" : "removeClass"](this.domNode, 'dijitMenuItemDisabled');
+ dijit.setWaiState(this.focusNode, 'disabled', value ? 'true' : 'false');
+ },
+ _setAccelKeyAttr: function(/*String*/ value){
+ // summary:
+ // Hook for attr('accelKey', ...) to work.
+ // Set accelKey on this menu item.
+ this.accelKey=value;
+
+ this.accelKeyNode.style.display=value?"":"none";
+ this.accelKeyNode.innerHTML=value;
+ //have to use colSpan to make it work in IE
+ dojo.attr(this.containerNode,'colSpan',value?"1":"2");
+ }
+ });
+
+}
+
+if(!dojo._hasResource["dijit.PopupMenuItem"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.PopupMenuItem"] = true;
+dojo.provide("dijit.PopupMenuItem");
+
+
+
+dojo.declare("dijit.PopupMenuItem",
+ dijit.MenuItem,
+ {
+ _fillContent: function(){
+ // summary:
+ // When Menu is declared in markup, this code gets the menu label and
+ // the popup widget from the srcNodeRef.
+ // description:
+ // srcNodeRefinnerHTML contains both the menu item text and a popup widget
+ // The first part holds the menu item text and the second part is the popup
+ // example:
+ // | <div dojoType="dijit.PopupMenuItem">
+ // | <span>pick me</span>
+ // | <popup> ... </popup>
+ // | </div>
+ // tags:
+ // protected
+
+ if(this.srcNodeRef){
+ var nodes = dojo.query("*", this.srcNodeRef);
+ dijit.PopupMenuItem.superclass._fillContent.call(this, nodes[0]);
+
+ // save pointer to srcNode so we can grab the drop down widget after it's instantiated
+ this.dropDownContainer = this.srcNodeRef;
+ }
+ },
+
+ startup: function(){
+ if(this._started){ return; }
+ this.inherited(arguments);
+
+ // we didn't copy the dropdown widget from the this.srcNodeRef, so it's in no-man's
+ // land now. move it to dojo.doc.body.
+ if(!this.popup){
+ var node = dojo.query("[widgetId]", this.dropDownContainer)[0];
+ this.popup = dijit.byNode(node);
+ }
+ dojo.body().appendChild(this.popup.domNode);
+
+ this.popup.domNode.style.display="none";
+ if(this.arrowWrapper){
+ dojo.style(this.arrowWrapper, "visibility", "");
+ }
+ dijit.setWaiState(this.focusNode, "haspopup", "true");
+ },
+
+ destroyDescendants: function(){
+ if(this.popup){
+ // Destroy the popup, unless it's already been destroyed. This can happen because
+ // the popup is a direct child of <body> even though it's logically my child.
+ if(!this.popup._destroyed){
+ this.popup.destroyRecursive();
+ }
+ delete this.popup;
+ }
+ this.inherited(arguments);
+ }
+ });
+
+
+}
+
+if(!dojo._hasResource["dijit.CheckedMenuItem"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.CheckedMenuItem"] = true;
+dojo.provide("dijit.CheckedMenuItem");
+
+
+
+dojo.declare("dijit.CheckedMenuItem",
+ dijit.MenuItem,
+ {
+ // summary:
+ // A checkbox-like menu item for toggling on and off
+
+ templateString: dojo.cache("dijit", "templates/CheckedMenuItem.html", "<tr class=\"dijitReset dijitMenuItem\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitemcheckbox\" tabIndex=\"-1\"\n\t\tdojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<td class=\"dijitReset\" waiRole=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon dijitCheckedMenuItemIcon\" dojoAttachPoint=\"iconNode\">\n\t\t<span class=\"dijitCheckedMenuItemIconChar\">&#10003;</span>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" dojoAttachPoint=\"containerNode,labelNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" dojoAttachPoint=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" waiRole=\"presentation\">\n\t</td>\n</tr>\n"),
+
+ // checked: Boolean
+ // Our checked state
+ checked: false,
+ _setCheckedAttr: function(/*Boolean*/ checked){
+ // summary:
+ // Hook so attr('checked', bool) works.
+ // Sets the class and state for the check box.
+ dojo.toggleClass(this.domNode, "dijitCheckedMenuItemChecked", checked);
+ dijit.setWaiState(this.domNode, "checked", checked);
+ this.checked = checked;
+ },
+
+ onChange: function(/*Boolean*/ checked){
+ // summary:
+ // User defined function to handle check/uncheck events
+ // tags:
+ // callback
+ },
+
+ _onClick: function(/*Event*/ e){
+ // summary:
+ // Clicking this item just toggles its state
+ // tags:
+ // private
+ if(!this.disabled){
+ this.attr("checked", !this.checked);
+ this.onChange(this.checked);
+ }
+ this.inherited(arguments);
+ }
+ });
+
+}
+
+if(!dojo._hasResource["dijit.MenuSeparator"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.MenuSeparator"] = true;
+dojo.provide("dijit.MenuSeparator");
+
+
+
+
+
+dojo.declare("dijit.MenuSeparator",
+ [dijit._Widget, dijit._Templated, dijit._Contained],
+ {
+ // summary:
+ // A line between two menu items
+
+ templateString: dojo.cache("dijit", "templates/MenuSeparator.html", "<tr class=\"dijitMenuSeparator\">\n\t<td colspan=\"4\">\n\t\t<div class=\"dijitMenuSeparatorTop\"></div>\n\t\t<div class=\"dijitMenuSeparatorBottom\"></div>\n\t</td>\n</tr>\n"),
+
+ postCreate: function(){
+ dojo.setSelectable(this.domNode, false);
+ },
+
+ isFocusable: function(){
+ // summary:
+ // Override to always return false
+ // tags:
+ // protected
+
+ return false; // Boolean
+ }
+ });
+
+
+}
+
if(!dojo._hasResource["dijit.Menu"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.Menu"] = true;
dojo.provide("dijit.Menu");
-dojo.declare(
- "dijit.Menu",
+dojo.declare("dijit._MenuBase",
[dijit._Widget, dijit._Templated, dijit._KeyNavContainer],
{
- constructor: function() {
- this._bindings = [];
- },
-
- templateString:
- '<table class="dijit dijitMenu dijitReset dijitMenuTable" waiRole="menu" dojoAttachEvent="onkeypress:_onKeyPress">' +
- '<tbody class="dijitReset" dojoAttachPoint="containerNode"></tbody>'+
- '</table>',
-
- // targetNodeIds: String[]
- // Array of dom node ids of nodes to attach to.
- // Fill this with nodeIds upon widget creation and it becomes context menu for those nodes.
- targetNodeIds: [],
-
- // contextMenuForWindow: Boolean
- // if true, right clicking anywhere on the window will cause this context menu to open;
- // if false, must specify targetNodeIds
- contextMenuForWindow: false,
-
- // parentMenu: Widget
- // pointer to menu that displayed me
+ // summary:
+ // Base class for Menu and MenuBar
+
+ // parentMenu: [readonly] Widget
+ // pointer to menu that displayed me
parentMenu: null,
// popupDelay: Integer
- // number of milliseconds before hovering (without clicking) causes the popup to automatically open
+ // number of milliseconds before hovering (without clicking) causes the popup to automatically open.
popupDelay: 500,
- // _contextMenuWithMouse: Boolean
- // used to record mouse and keyboard events to determine if a context
- // menu is being opened with the keyboard or the mouse
- _contextMenuWithMouse: false,
-
- postCreate: function(){
- if(this.contextMenuForWindow){
- this.bindDomNode(dojo.body());
- }else{
- dojo.forEach(this.targetNodeIds, this.bindDomNode, this);
- }
- this.connectKeyNavHandlers([dojo.keys.UP_ARROW], [dojo.keys.DOWN_ARROW]);
- },
-
startup: function(){
+ if(this._started){ return; }
+
dojo.forEach(this.getChildren(), function(child){ child.startup(); });
this.startupKeyNavChildren();
+
+ this.inherited(arguments);
},
onExecute: function(){
- // summary: attach point for notification about when a menu item has been executed
+ // summary:
+ // Attach point for notification about when a menu item has been executed.
+ // This is an internal mechanism used for Menus to signal to their parent to
+ // close them, because they are about to execute the onClick handler. In
+ // general developers should not attach to or override this method.
+ // tags:
+ // protected
},
onCancel: function(/*Boolean*/ closeAll){
- // summary: attach point for notification about when the user cancels the current menu
+ // summary:
+ // Attach point for notification about when the user cancels the current menu
+ // This is an internal mechanism used for Menus to signal to their parent to
+ // close them. In general developers should not attach to or override this method.
+ // tags:
+ // protected
},
_moveToPopup: function(/*Event*/ evt){
+ // summary:
+ // This handles the right arrow key (left arrow key on RTL systems),
+ // which will either open a submenu, or move to the next item in the
+ // ancestor MenuBar
+ // tags:
+ // private
+
if(this.focusedChild && this.focusedChild.popup && !this.focusedChild.disabled){
this.focusedChild._onClick(evt);
- }
- },
-
- _onKeyPress: function(/*Event*/ evt){
- // summary
- // Handle keyboard based menu navigation.
- if(evt.ctrlKey || evt.altKey){ return; }
-
- switch(evt.keyCode){
- case dojo.keys.RIGHT_ARROW:
- this._moveToPopup(evt);
- dojo.stopEvent(evt);
- break;
- case dojo.keys.LEFT_ARROW:
- if(this.parentMenu){
- this.onCancel(false);
- }else{
- dojo.stopEvent(evt);
- }
- break;
+ }else{
+ var topMenu = this._getTopMenu();
+ if(topMenu && topMenu._isMenuBar){
+ topMenu.focusNext();
+ }
+ }
+ },
+
+ _onPopupHover: function(/*Event*/ evt){
+ // summary:
+ // This handler is called when the mouse moves over the popup.
+ // tags:
+ // private
+
+ // if the mouse hovers over a menu popup that is in pending-close state,
+ // then stop the close operation.
+ // This can't be done in onItemHover since some popup targets don't have MenuItems (e.g. ColorPicker)
+ if(this.currentPopup && this.currentPopup._pendingClose_timer){
+ var parentMenu = this.currentPopup.parentMenu;
+ // highlight the parent menu item pointing to this popup
+ if(parentMenu.focusedChild){
+ parentMenu.focusedChild._setSelected(false);
+ }
+ parentMenu.focusedChild = this.currentPopup.from_item;
+ parentMenu.focusedChild._setSelected(true);
+ // cancel the pending close
+ this._stopPendingCloseTimer(this.currentPopup);
}
},
onItemHover: function(/*MenuItem*/ item){
- this.focusChild(item);
-
- if(this.focusedChild.popup && !this.focusedChild.disabled && !this.hover_timer){
- this.hover_timer = setTimeout(dojo.hitch(this, "_openPopup"), this.popupDelay);
- }
+ // summary:
+ // Called when cursor is over a MenuItem.
+ // tags:
+ // protected
+
+ // Don't do anything unless user has "activated" the menu by:
+ // 1) clicking it
+ // 2) opening it from a parent menu (which automatically focuses it)
+ if(this.isActive){
+ this.focusChild(item);
+ if(this.focusedChild.popup && !this.focusedChild.disabled && !this.hover_timer){
+ this.hover_timer = setTimeout(dojo.hitch(this, "_openPopup"), this.popupDelay);
+ }
+ }
+ // if the user is mixing mouse and keyboard navigation,
+ // then the menu may not be active but a menu item has focus,
+ // but it's not the item that the mouse just hovered over.
+ // To avoid both keyboard and mouse selections, use the latest.
+ if(this.focusedChild){
+ this.focusChild(item);
+ }
+ this._hoveredChild = item;
},
_onChildBlur: function(item){
+ // summary:
+ // Called when a child MenuItem becomes inactive because focus
+ // has been removed from the MenuItem *and* it's descendant menus.
+ // tags:
+ // private
+ this._stopPopupTimer();
+ item._setSelected(false);
// Close all popups that are open and descendants of this menu
- dijit.popup.close(item.popup);
- item._blur();
- this._stopPopupTimer();
+ var itemPopup = item.popup;
+ if(itemPopup){
+ this._stopPendingCloseTimer(itemPopup);
+ itemPopup._pendingClose_timer = setTimeout(function(){
+ itemPopup._pendingClose_timer = null;
+ if(itemPopup.parentMenu){
+ itemPopup.parentMenu.currentPopup = null;
+ }
+ dijit.popup.close(itemPopup); // this calls onClose
+ }, this.popupDelay);
+ }
},
onItemUnhover: function(/*MenuItem*/ item){
+ // summary:
+ // Callback fires when mouse exits a MenuItem
+ // tags:
+ // protected
+
+ if(this.isActive){
+ this._stopPopupTimer();
+ }
+ if(this._hoveredChild == item){ this._hoveredChild = null; }
},
_stopPopupTimer: function(){
+ // summary:
+ // Cancels the popup timer because the user has stop hovering
+ // on the MenuItem, etc.
+ // tags:
+ // private
if(this.hover_timer){
clearTimeout(this.hover_timer);
this.hover_timer = null;
}
},
+ _stopPendingCloseTimer: function(/*dijit._Widget*/ popup){
+ // summary:
+ // Cancels the pending-close timer because the close has been preempted
+ // tags:
+ // private
+ if(popup._pendingClose_timer){
+ clearTimeout(popup._pendingClose_timer);
+ popup._pendingClose_timer = null;
+ }
+ },
+
+ _stopFocusTimer: function(){
+ // summary:
+ // Cancels the pending-focus timer because the menu was closed before focus occured
+ // tags:
+ // private
+ if(this._focus_timer){
+ clearTimeout(this._focus_timer);
+ this._focus_timer = null;
+ }
+ },
+
_getTopMenu: function(){
+ // summary:
+ // Returns the top menu in this chain of Menus
+ // tags:
+ // private
for(var top=this; top.parentMenu; top=top.parentMenu);
return top;
},
- onItemClick: function(/*Widget*/ item){
- // summary: user defined function to handle clicks on an item
- // summary: internal function for clicks
+ onItemClick: function(/*dijit._Widget*/ item, /*Event*/ evt){
+ // summary:
+ // Handle clicks on an item.
+ // tags:
+ // private
if(item.disabled){ return false; }
+ // this can't be done in _onFocus since the _onFocus events occurs asynchronously
+ if(typeof this.isShowingNow == 'undefined'){ // non-popup menu
+ this._markActive();
+ }
+
+ this.focusChild(item);
+
if(item.popup){
- if(!this.is_open){
- this._openPopup();
- }
+ this._openPopup();
}else{
// before calling user defined handler, close hierarchy of menus
// and restore focus to place it was when menu was opened
this.onExecute();
// user defined handler for click
- item.onClick();
+ item.onClick(evt);
+ }
+ },
+
+ _openPopup: function(){
+ // summary:
+ // Open the popup to the side of/underneath the current menu item
+ // tags:
+ // protected
+
+ this._stopPopupTimer();
+ var from_item = this.focusedChild;
+ if(!from_item){ return; } // the focused child lost focus since the timer was started
+ var popup = from_item.popup;
+ if(popup.isShowingNow){ return; }
+ if(this.currentPopup){
+ this._stopPendingCloseTimer(this.currentPopup);
+ dijit.popup.close(this.currentPopup);
+ }
+ popup.parentMenu = this;
+ popup.from_item = from_item; // helps finding the parent item that should be focused for this popup
+ var self = this;
+ dijit.popup.open({
+ parent: this,
+ popup: popup,
+ around: from_item.domNode,
+ orient: this._orient || (this.isLeftToRight() ?
+ {'TR': 'TL', 'TL': 'TR', 'BR': 'BL', 'BL': 'BR'} :
+ {'TL': 'TR', 'TR': 'TL', 'BL': 'BR', 'BR': 'BL'}),
+ onCancel: function(){ // called when the child menu is canceled
+ // set isActive=false (_closeChild vs _cleanUp) so that subsequent hovering will NOT open child menus
+ // which seems aligned with the UX of most applications (e.g. notepad, wordpad, paint shop pro)
+ self.focusChild(from_item); // put focus back on my node
+ self._cleanUp(); // close the submenu (be sure this is done _after_ focus is moved)
+ from_item._setSelected(true); // oops, _cleanUp() deselected the item
+ self.focusedChild = from_item; // and unset focusedChild
+ },
+ onExecute: dojo.hitch(this, "_cleanUp")
+ });
+
+ this.currentPopup = popup;
+ // detect mouseovers to handle lazy mouse movements that temporarily focus other menu items
+ popup.connect(popup.domNode, "onmouseenter", dojo.hitch(self, "_onPopupHover")); // cleaned up when the popped-up widget is destroyed on close
+
+ if(popup.focus){
+ // If user is opening the popup via keyboard (right arrow, or down arrow for MenuBar),
+ // if the cursor happens to collide with the popup, it will generate an onmouseover event
+ // even though the mouse wasn't moved. Use a setTimeout() to call popup.focus so that
+ // our focus() call overrides the onmouseover event, rather than vice-versa. (#8742)
+ popup._focus_timer = setTimeout(dojo.hitch(popup, function(){
+ this._focus_timer = null;
+ this.focus();
+ }), 0);
+ }
+ },
+
+ _markActive: function(){
+ // summary:
+ // Mark this menu's state as active.
+ // Called when this Menu gets focus from:
+ // 1) clicking it (mouse or via space/arrow key)
+ // 2) being opened by a parent menu.
+ // This is not called just from mouse hover.
+ // Focusing a menu via TAB does NOT automatically set isActive
+ // since TAB is a navigation operation and not a selection one.
+ // For Windows apps, pressing the ALT key focuses the menubar
+ // menus (similar to TAB navigation) but the menu is not active
+ // (ie no dropdown) until an item is clicked.
+ this.isActive = true;
+ dojo.addClass(this.domNode, "dijitMenuActive");
+ dojo.removeClass(this.domNode, "dijitMenuPassive");
+ },
+
+ onOpen: function(/*Event*/ e){
+ // summary:
+ // Callback when this menu is opened.
+ // This is called by the popup manager as notification that the menu
+ // was opened.
+ // tags:
+ // private
+
+ this.isShowingNow = true;
+ this._markActive();
+ },
+
+ _markInactive: function(){
+ // summary:
+ // Mark this menu's state as inactive.
+ this.isActive = false; // don't do this in _onBlur since the state is pending-close until we get here
+ dojo.removeClass(this.domNode, "dijitMenuActive");
+ dojo.addClass(this.domNode, "dijitMenuPassive");
+ },
+
+ onClose: function(){
+ // summary:
+ // Callback when this menu is closed.
+ // This is called by the popup manager as notification that the menu
+ // was closed.
+ // tags:
+ // private
+
+ this._stopFocusTimer();
+ this._markInactive();
+ this.isShowingNow = false;
+ this.parentMenu = null;
+ },
+
+ _closeChild: function(){
+ // summary:
+ // Called when submenu is clicked or focus is lost. Close hierarchy of menus.
+ // tags:
+ // private
+ this._stopPopupTimer();
+ if(this.focusedChild){ // unhighlight the focused item
+ this.focusedChild._setSelected(false);
+ this.focusedChild._onUnhover();
+ this.focusedChild = null;
+ }
+ if(this.currentPopup){
+ // Close all popups that are open and descendants of this menu
+ dijit.popup.close(this.currentPopup);
+ this.currentPopup = null;
+ }
+ },
+
+ _onItemFocus: function(/*MenuItem*/ item){
+ // summary:
+ // Called when child of this Menu gets focus from:
+ // 1) clicking it
+ // 2) tabbing into it
+ // 3) being opened by a parent menu.
+ // This is not called just from mouse hover.
+ if(this._hoveredChild && this._hoveredChild != item){
+ this._hoveredChild._onUnhover(); // any previous mouse movement is trumped by focus selection
+ }
+ },
+
+ _onBlur: function(){
+ // summary:
+ // Called when focus is moved away from this Menu and it's submenus.
+ // tags:
+ // protected
+ this._cleanUp();
+ this.inherited(arguments);
+ },
+
+ _cleanUp: function(){
+ // summary:
+ // Called when the user is done with this menu. Closes hierarchy of menus.
+ // tags:
+ // private
+
+ this._closeChild(); // don't call this.onClose since that's incorrect for MenuBar's that never close
+ if(typeof this.isShowingNow == 'undefined'){ // non-popup menu doesn't call onClose
+ this._markInactive();
+ }
+ }
+});
+
+dojo.declare("dijit.Menu",
+ dijit._MenuBase,
+ {
+ // summary
+ // A context menu you can assign to multiple elements
+
+ // TODO: most of the code in here is just for context menu (right-click menu)
+ // support. In retrospect that should have been a separate class (dijit.ContextMenu).
+ // Split them for 2.0
+
+ constructor: function(){
+ this._bindings = [];
+ },
+
+ templateString: dojo.cache("dijit", "templates/Menu.html", "<table class=\"dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable\" waiRole=\"menu\" tabIndex=\"${tabIndex}\" dojoAttachEvent=\"onkeypress:_onKeyPress\">\n\t<tbody class=\"dijitReset\" dojoAttachPoint=\"containerNode\"></tbody>\n</table>\n"),
+
+ // targetNodeIds: [const] String[]
+ // Array of dom node ids of nodes to attach to.
+ // Fill this with nodeIds upon widget creation and it becomes context menu for those nodes.
+ targetNodeIds: [],
+
+ // contextMenuForWindow: [const] Boolean
+ // If true, right clicking anywhere on the window will cause this context menu to open.
+ // If false, must specify targetNodeIds.
+ contextMenuForWindow: false,
+
+ // leftClickToOpen: [const] Boolean
+ // If true, menu will open on left click instead of right click, similiar to a file menu.
+ leftClickToOpen: false,
+
+ // refocus: Boolean
+ // When this menu closes, re-focus the element which had focus before it was opened.
+ refocus: true,
+
+ // _contextMenuWithMouse: [private] Boolean
+ // Used to record mouse and keyboard events to determine if a context
+ // menu is being opened with the keyboard or the mouse.
+ _contextMenuWithMouse: false,
+
+ postCreate: function(){
+ if(this.contextMenuForWindow){
+ this.bindDomNode(dojo.body());
+ }else{
+ // TODO: should have _setTargetNodeIds() method to handle initialization and a possible
+ // later attr('targetNodeIds', ...) call. There's also a problem that targetNodeIds[]
+ // gets stale after calls to bindDomNode()/unBindDomNode() as it still is just the original list (see #9610)
+ dojo.forEach(this.targetNodeIds, this.bindDomNode, this);
+ }
+ var k = dojo.keys, l = this.isLeftToRight();
+ this._openSubMenuKey = l ? k.RIGHT_ARROW : k.LEFT_ARROW;
+ this._closeSubMenuKey = l ? k.LEFT_ARROW : k.RIGHT_ARROW;
+ this.connectKeyNavHandlers([k.UP_ARROW], [k.DOWN_ARROW]);
+ },
+
+ _onKeyPress: function(/*Event*/ evt){
+ // summary:
+ // Handle keyboard based menu navigation.
+ // tags:
+ // protected
+
+ if(evt.ctrlKey || evt.altKey){ return; }
+
+ switch(evt.charOrCode){
+ case this._openSubMenuKey:
+ this._moveToPopup(evt);
+ dojo.stopEvent(evt);
+ break;
+ case this._closeSubMenuKey:
+ if(this.parentMenu){
+ if(this.parentMenu._isMenuBar){
+ this.parentMenu.focusPrev();
+ }else{
+ this.onCancel(false);
+ }
+ }else{
+ dojo.stopEvent(evt);
+ }
+ break;
}
},
// thanks burstlib!
- _iframeContentWindow: function(/* HTMLIFrameElement */iframe_el) {
- // summary
- // returns the window reference of the passed iframe
- var win = dijit.getDocumentWindow(dijit.Menu._iframeContentDocument(iframe_el)) ||
+ _iframeContentWindow: function(/* HTMLIFrameElement */iframe_el){
+ // summary:
+ // Returns the window reference of the passed iframe
+ // tags:
+ // private
+ var win = dijit.getDocumentWindow(this._iframeContentDocument(iframe_el)) ||
// Moz. TODO: is this available when defaultView isn't?
- dijit.Menu._iframeContentDocument(iframe_el)['__parent__'] ||
- (iframe_el.name && document.frames[iframe_el.name]) || null;
+ this._iframeContentDocument(iframe_el)['__parent__'] ||
+ (iframe_el.name && dojo.doc.frames[iframe_el.name]) || null;
return win; // Window
},
_iframeContentDocument: function(/* HTMLIFrameElement */iframe_el){
- // summary
- // returns a reference to the document object inside iframe_el
+ // summary:
+ // Returns a reference to the document object inside iframe_el
+ // tags:
+ // protected
var doc = iframe_el.contentDocument // W3
|| (iframe_el.contentWindow && iframe_el.contentWindow.document) // IE
- || (iframe_el.name && document.frames[iframe_el.name] && document.frames[iframe_el.name].document)
+ || (iframe_el.name && dojo.doc.frames[iframe_el.name] && dojo.doc.frames[iframe_el.name].document)
|| null;
return doc; // HTMLDocument
},
bindDomNode: function(/*String|DomNode*/ node){
- // summary: attach menu to given node
+ // summary:
+ // Attach menu to given node
node = dojo.byId(node);
- //TODO: this is to support context popups in Editor. Maybe this shouldn't be in dijit.Menu
- var win = dijit.getDocumentWindow(node.ownerDocument);
- if(node.tagName.toLowerCase()=="iframe"){
- win = this._iframeContentWindow(node);
- node = dojo.withGlobal(win, dojo.body);
- }
-
- // to capture these events at the top level,
- // attach to document, not body
- var cn = (node == dojo.body() ? dojo.doc : node);
-
- node[this.id] = this._bindings.push([
- dojo.connect(cn, "oncontextmenu", this, "_openMyself"),
- dojo.connect(cn, "onkeydown", this, "_contextKey"),
- dojo.connect(cn, "onmousedown", this, "_contextMouse")
- ]);
+ var cn; // Connect node
+
+ // Support context menus on iframes. Rather than binding to the iframe itself we need
+ // to bind to the <body> node inside the iframe.
+ if(node.tagName.toLowerCase() == "iframe"){
+ var iframe = node,
+ win = this._iframeContentWindow(iframe);
+ cn = dojo.withGlobal(win, dojo.body);
+ }else{
+
+ // To capture these events at the top level, attach to <html>, not <body>.
+ // Otherwise right-click context menu just doesn't work.
+ cn = (node == dojo.body() ? dojo.doc.documentElement : node);
+ }
+
+
+ // "binding" is the object to track our connection to the node (ie, the parameter to bindDomNode())
+ var binding = {
+ node: node,
+ iframe: iframe
+ };
+
+ // Save info about binding in _bindings[], and make node itself record index(+1) into
+ // _bindings[] array. Prefix w/_dijitMenu to avoid setting an attribute that may
+ // start with a number, which fails on FF/safari.
+ dojo.attr(node, "_dijitMenu" + this.id, this._bindings.push(binding));
+
+ // Setup the connections to monitor click etc., unless we are connecting to an iframe which hasn't finished
+ // loading yet, in which case we need to wait for the onload event first, and then connect
+ var doConnects = dojo.hitch(this, function(cn){
+ return [
+ dojo.connect(cn, (this.leftClickToOpen)?"onclick":"oncontextmenu", this, function(evt){
+ this._openMyself(evt, cn, iframe);
+ }),
+ dojo.connect(cn, "onkeydown", this, "_contextKey"),
+ dojo.connect(cn, "onmousedown", this, "_contextMouse")
+ ];
+ });
+ binding.connects = cn ? doConnects(cn) : [];
+
+ if(iframe){
+ // Setup handler to [re]bind to the iframe when the contents are initially loaded,
+ // and every time the contents change.
+ // Need to do this b/c we are actually binding to the iframe's <body> node.
+ // Note: can't use dojo.connect(), see #9609.
+
+ binding.onloadHandler = dojo.hitch(this, function(){
+ // want to remove old connections, but IE throws exceptions when trying to
+ // access the <body> node because it's already gone, or at least in a state of limbo
+
+ var win = this._iframeContentWindow(iframe);
+ cn = dojo.withGlobal(win, dojo.body);
+ binding.connects = doConnects(cn);
+ });
+ if(iframe.addEventListener){
+ iframe.addEventListener("load", binding.onloadHandler, false);
+ }else{
+ iframe.attachEvent("onload", binding.onloadHandler);
+ }
+ }
},
unBindDomNode: function(/*String|DomNode*/ nodeName){
- // summary: detach menu from given node
- var node = dojo.byId(nodeName);
- var bid = node[this.id]-1, b = this._bindings[bid];
- dojo.forEach(b, dojo.disconnect);
- delete this._bindings[bid];
+ // summary:
+ // Detach menu from given node
+
+ var node;
+ try{
+ node = dojo.byId(nodeName);
+ }catch(e){
+ // On IE the dojo.byId() call will get an exception if the attach point was
+ // the <body> node of an <iframe> that has since been reloaded (and thus the
+ // <body> node is in a limbo state of destruction.
+ return;
+ }
+
+ // node["_dijitMenu" + this.id] contains index(+1) into my _bindings[] array
+ var attrName = "_dijitMenu" + this.id;
+ if(node && dojo.hasAttr(node, attrName)){
+ var bid = dojo.attr(node, attrName)-1, b = this._bindings[bid];
+ dojo.forEach(b.connects, dojo.disconnect);
+
+ // Remove listener for iframe onload events
+ var iframe = b.iframe;
+ if(iframe){
+ if(iframe.removeEventListener){
+ iframe.removeEventListener("load", b.onloadHandler, false);
+ }else{
+ iframe.detachEvent("onload", b.onloadHandler);
+ }
+ }
+
+ dojo.removeAttr(node, attrName);
+ delete this._bindings[bid];
+ }
},
_contextKey: function(e){
+ // summary:
+ // Code to handle popping up editor using F10 key rather than mouse
+ // tags:
+ // private
this._contextMenuWithMouse = false;
- if (e.keyCode == dojo.keys.F10) {
+ if(e.keyCode == dojo.keys.F10){
dojo.stopEvent(e);
- if (e.shiftKey && e.type=="keydown") {
+ if(e.shiftKey && e.type == "keydown"){
// FF: copying the wrong property from e will cause the system
// context menu to appear in spite of stopEvent. Don't know
// exactly which properties cause this effect.
var _e = { target: e.target, pageX: e.pageX, pageY: e.pageY };
_e.preventDefault = _e.stopPropagation = function(){};
// IE: without the delay, focus work in "open" causes the system
// context menu to appear in spite of stopEvent.
window.setTimeout(dojo.hitch(this, function(){ this._openMyself(_e); }), 1);
}
}
},
_contextMouse: function(e){
+ // summary:
+ // Helper to remember when we opened the context menu with the mouse instead
+ // of with the keyboard
+ // tags:
+ // private
this._contextMenuWithMouse = true;
},
- _openMyself: function(/*Event*/ e){
+ _openMyself: function(/*Event*/ e, /*DomNode?*/ node, /*DomNode?*/ iframe){
// summary:
// Internal function for opening myself when the user
- // does a right-click or something similar
-
+ // does a right-click or something similar.
+ // node:
+ // The node that is being clicked
+ // iframe:
+ // If an <iframe> is being clicked, iframe points to that iframe and node
+ // points to the iframe's body.
+ // tags:
+ // private
+
+ if(this.leftClickToOpen && e.button>0){
+ return;
+ }
dojo.stopEvent(e);
// Get coordinates.
- // if we are opening the menu with the mouse or on safari open
+ // If we are opening the menu with the mouse or on safari open
// the menu at the mouse cursor
// (Safari does not have a keyboard command to open the context menu
// and we don't currently have a reliable way to determine
// _contextMenuWithMouse on Safari)
var x,y;
if(dojo.isSafari || this._contextMenuWithMouse){
x=e.pageX;
y=e.pageY;
+
+ if(iframe){
+ // Event is on <body> node of an <iframe>, convert coordinates to match main document
+ var od = e.target.ownerDocument,
+ ifc = dojo.position(iframe, true),
+ win = this._iframeContentWindow(iframe),
+ scroll = dojo.withGlobal(win, "_docScroll", dojo);
+
+ var cs = dojo.getComputedStyle(iframe),
+ tp = dojo._toPixelValue,
+ left = (dojo.isIE && dojo.isQuirks ? 0 : tp(iframe, cs.paddingLeft)) + (dojo.isIE && dojo.isQuirks ? tp(iframe, cs.borderLeftWidth) : 0),
+ top = (dojo.isIE && dojo.isQuirks ? 0 : tp(iframe, cs.paddingTop)) + (dojo.isIE && dojo.isQuirks ? tp(iframe, cs.borderTopWidth) : 0);
+
+ x += ifc.x + left - scroll.x;
+ y += ifc.y + top - scroll.y;
+ }
}else{
// otherwise open near e.target
- var coords = dojo.coords(e.target, true);
+ var coords = dojo.position(e.target, true);
x = coords.x + 10;
y = coords.y + 10;
}
var self=this;
var savedFocus = dijit.getFocus(this);
function closeAndRestoreFocus(){
// user has clicked on a menu or popup
- dijit.focus(savedFocus);
+ if(self.refocus){
+ dijit.focus(savedFocus);
+ }
dijit.popup.close(self);
}
dijit.popup.open({
popup: this,
x: x,
y: y,
onExecute: closeAndRestoreFocus,
onCancel: closeAndRestoreFocus,
orient: this.isLeftToRight() ? 'L' : 'R'
});
this.focus();
this._onBlur = function(){
+ this.inherited('_onBlur', arguments);
// Usually the parent closes the child widget but if this is a context
// menu then there is no parent
dijit.popup.close(this);
// don't try to restore focus; user has clicked another part of the screen
// and set focus there
- }
- },
-
- onOpen: function(/*Event*/ e){
- // summary
- // Open menu relative to the mouse
- this.isShowingNow = true;
- },
-
- onClose: function(){
- // summary: callback when this menu is closed
- this._stopPopupTimer();
- this.parentMenu = null;
- this.isShowingNow = false;
- this.currentPopup = null;
- if(this.focusedChild){
- this._onChildBlur(this.focusedChild);
- this.focusedChild = null;
- }
- },
-
- _openPopup: function(){
- // summary: open the popup to the side of the current menu item
- this._stopPopupTimer();
- var from_item = this.focusedChild;
- var popup = from_item.popup;
-
- if(popup.isShowingNow){ return; }
- popup.parentMenu = this;
- var self = this;
- dijit.popup.open({
- parent: this,
- popup: popup,
- around: from_item.arrowCell,
- orient: this.isLeftToRight() ? {'TR': 'TL', 'TL': 'TR'} : {'TL': 'TR', 'TR': 'TL'},
- onCancel: function(){
- // called when the child menu is canceled
- dijit.popup.close(popup);
- from_item.focus(); // put focus back on my node
- self.currentPopup = null;
- }
- });
-
- this.currentPopup = popup;
-
- if(popup.focus){
- popup.focus();
- }
+ };
+ },
+
+ uninitialize: function(){
+ dojo.forEach(this._bindings, function(b){ if(b){ this.unBindDomNode(b.node); } }, this);
+ this.inherited(arguments);
}
}
);
-dojo.declare(
- "dijit.MenuItem",
- [dijit._Widget, dijit._Templated, dijit._Contained],
-{
- // summary
- // A line item in a Menu2
-
- // Make 3 columns
- // icon, label, and expand arrow (BiDi-dependent) indicating sub-menu
- templateString:
- '<tr class="dijitReset dijitMenuItem"'
- +'dojoAttachEvent="onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick">'
- +'<td class="dijitReset"><div class="dijitMenuItemIcon ${iconClass}" dojoAttachPoint="iconNode" ></div></td>'
- +'<td tabIndex="-1" class="dijitReset dijitMenuItemLabel" dojoAttachPoint="containerNode" waiRole="menuitem"></td>'
- +'<td class="dijitReset" dojoAttachPoint="arrowCell">'
- +'<div class="dijitMenuExpand" dojoAttachPoint="expand" style="display:none">'
- +'<span class="dijitInline dijitArrowNode dijitMenuExpandInner">+</span>'
- +'</div>'
- +'</td>'
- +'</tr>',
-
- // label: String
- // menu text
- label: '',
-
- // iconClass: String
- // class to apply to div in button to make it display an icon
- iconClass: "",
-
- // disabled: Boolean
- // if true, the menu item is disabled
- // if false, the menu item is enabled
- disabled: false,
+// Back-compat (TODO: remove in 2.0)
+
+
+
+
+
+
+}
+
+if(!dojo._hasResource["dijit.MenuBar"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.MenuBar"] = true;
+dojo.provide("dijit.MenuBar");
+
+
+
+dojo.declare("dijit.MenuBar", dijit._MenuBase, {
+ // summary:
+ // A menu bar, listing menu choices horizontally, like the "File" menu in most desktop applications
+
+ templateString: dojo.cache("dijit", "templates/MenuBar.html", "<div class=\"dijitMenuBar dijitMenuPassive\" dojoAttachPoint=\"containerNode\" waiRole=\"menubar\" tabIndex=\"${tabIndex}\" dojoAttachEvent=\"onkeypress: _onKeyPress\"></div>\n"),
+
+ // _isMenuBar: [protected] Boolean
+ // This is a MenuBar widget, not a (vertical) Menu widget.
+ _isMenuBar: true,
+
+ constructor: function(){
+ // summary:
+ // Sets up local variables etc.
+ // tags:
+ // private
+
+ // parameter to dijit.popup.open() about where to put popup (relative to this.domNode)
+ this._orient = this.isLeftToRight() ? {BL: 'TL'} : {BR: 'TR'};
+ },
postCreate: function(){
- dojo.setSelectable(this.domNode, false);
- this.setDisabled(this.disabled);
- if(this.label){
- this.containerNode.innerHTML=this.label;
- }
- },
-
- _onHover: function(){
- // summary: callback when mouse is moved onto menu item
- this.getParent().onItemHover(this);
- },
-
- _onUnhover: function(){
- // summary: callback when mouse is moved off of menu item
- // if we are unhovering the currently selected item
- // then unselect it
- this.getParent().onItemUnhover(this);
- },
-
- _onClick: function(evt){
- this.getParent().onItemClick(this);
- dojo.stopEvent(evt);
- },
-
- onClick: function() {
- // summary
- // User defined function to handle clicks
- },
-
- focus: function(){
- dojo.addClass(this.domNode, 'dijitMenuItemHover');
- try{
- dijit.focus(this.containerNode);
- }catch(e){
- // this throws on IE (at least) in some scenarios
- }
- },
-
- _blur: function(){
- dojo.removeClass(this.domNode, 'dijitMenuItemHover');
- },
-
- setDisabled: function(/*Boolean*/ value){
- // summary: enable or disable this menu item
- this.disabled = value;
- dojo[value ? "addClass" : "removeClass"](this.domNode, 'dijitMenuItemDisabled');
- dijit.setWaiState(this.containerNode, 'disabled', value ? 'true' : 'false');
- }
-});
-
-dojo.declare(
- "dijit.PopupMenuItem",
- dijit.MenuItem,
-{
- _fillContent: function(){
- // my inner HTML contains both the menu item text and a popup widget, like
- // <div dojoType="dijit.PopupMenuItem">
- // <span>pick me</span>
- // <popup> ... </popup>
- // </div>
- // the first part holds the menu item text and the second part is the popup
- if(this.srcNodeRef){
- var nodes = dojo.query("*", this.srcNodeRef);
- dijit.PopupMenuItem.superclass._fillContent.call(this, nodes[0]);
-
- // save pointer to srcNode so we can grab the drop down widget after it's instantiated
- this.dropDownContainer = this.srcNodeRef;
- }
- },
-
- startup: function(){
- // we didn't copy the dropdown widget from the this.srcNodeRef, so it's in no-man's
- // land now. move it to document.body.
- if(!this.popup){
- var node = dojo.query("[widgetId]", this.dropDownContainer)[0];
- this.popup = dijit.byNode(node);
- }
- dojo.body().appendChild(this.popup.domNode);
-
- this.popup.domNode.style.display="none";
- dojo.addClass(this.expand, "dijitMenuExpandEnabled");
- dojo.style(this.expand, "display", "");
- dijit.setWaiState(this.containerNode, "haspopup", "true");
- }
-});
-
-dojo.declare(
- "dijit.MenuSeparator",
- [dijit._Widget, dijit._Templated, dijit._Contained],
-{
- // summary
- // A line between two menu items
-
- templateString: '<tr class="dijitMenuSeparator"><td colspan=3>'
- +'<div class="dijitMenuSeparatorTop"></div>'
- +'<div class="dijitMenuSeparatorBottom"></div>'
- +'</td></tr>',
-
- postCreate: function(){
- dojo.setSelectable(this.domNode, false);
- },
-
- isFocusable: function(){
- // summary:
- // over ride to always return false
- return false;
- }
-});
+ var k = dojo.keys, l = this.isLeftToRight();
+ this.connectKeyNavHandlers(
+ l ? [k.LEFT_ARROW] : [k.RIGHT_ARROW],
+ l ? [k.RIGHT_ARROW] : [k.LEFT_ARROW]
+ );
+ },
+
+ focusChild: function(item){
+ // overload focusChild so that whenever the focus is moved to a new item,
+ // check the previous focused whether it has its popup open, if so, after
+ // focusing the new item, open its submenu immediately
+ var prev_item = this.focusedChild,
+ showpopup = prev_item && prev_item.popup && prev_item.popup.isShowingNow;
+ this.inherited(arguments);
+ if(showpopup && item.popup && !item.disabled){
+ this._openPopup(); // TODO: on down arrow, _openPopup() is called here and in onItemClick()
+ }
+ },
+
+ _onKeyPress: function(/*Event*/ evt){
+ // summary:
+ // Handle keyboard based menu navigation.
+ // tags:
+ // protected
+
+ if(evt.ctrlKey || evt.altKey){ return; }
+
+ switch(evt.charOrCode){
+ case dojo.keys.DOWN_ARROW:
+ this._moveToPopup(evt);
+ dojo.stopEvent(evt);
+ }
+ },
+
+ onItemClick: function(/*dijit._Widget*/ item, /*Event*/ evt){
+ // summary:
+ // Handle clicks on an item. Cancels a dropdown if already open.
+ // tags:
+ // private
+ if(item.popup && item.popup.isShowingNow){
+ item.popup.onCancel();
+ }else{
+ this.inherited(arguments);
+ }
+ }
+});
+
+}
+
+if(!dojo._hasResource["dijit.MenuBarItem"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.MenuBarItem"] = true;
+dojo.provide("dijit.MenuBarItem");
+
+
+
+dojo.declare("dijit._MenuBarItemMixin", null, {
+ templateString: dojo.cache("dijit", "templates/MenuBarItem.html", "<div class=\"dijitReset dijitInline dijitMenuItem dijitMenuItemLabel\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitem\" tabIndex=\"-1\"'\n\t\tdojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<span dojoAttachPoint=\"containerNode\"></span>\n</div>\n"),
+
+ // overriding attributeMap because we don't have icon
+ attributeMap: dojo.delegate(dijit._Widget.prototype.attributeMap, {
+ label: { node: "containerNode", type: "innerHTML" }
+ })
+});
+
+dojo.declare("dijit.MenuBarItem", [dijit.MenuItem, dijit._MenuBarItemMixin], {
+ // summary:
+ // Item in a MenuBar that's clickable, and doesn't spawn a submenu when pressed (or hovered)
+
+});
+
+}
+
+if(!dojo._hasResource["dijit.PopupMenuBarItem"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.PopupMenuBarItem"] = true;
+dojo.provide("dijit.PopupMenuBarItem");
+
+
+
+
+dojo.declare("dijit.PopupMenuBarItem", [dijit.PopupMenuItem, dijit._MenuBarItemMixin], {
+ // summary:
+ // Item in a MenuBar like "File" or "Edit", that spawns a submenu when pressed (or hovered)
+});
+
}
if(!dojo._hasResource["dojo.regexp"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo.regexp"] = true;
dojo.provide("dojo.regexp");
+/*=====
+dojo.regexp = {
+ // summary: Regular expressions and Builder resources
+};
+=====*/
+
dojo.regexp.escapeString = function(/*String*/str, /*String?*/except){
// summary:
// Adds escape sequences for special characters in regular expressions
// except:
// a String with special characters to be left unescaped
-// return str.replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm, "\\$1"); // string
- return str.replace(/([\.$?*!=:|{}\(\)\[\]\\\/^])/g, function(ch){
+ return str.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, function(ch){
if(except && except.indexOf(ch) != -1){
return ch;
}
return "\\" + ch;
}); // String
}
dojo.regexp.buildGroupRE = function(/*Object|Array*/arr, /*Function*/re, /*Boolean?*/nonCapture){
// summary:
// Builds a regular expression that groups subexpressions
// description:
// A utility function used by some of the RE generators. The
// subexpressions are constructed by the function, re, in the second
// parameter. re builds one subexpression for each elem in the array
// a, in the first parameter. Returns a string for a regular
// expression that groups all the subexpressions.
// arr:
// A single value or an array of values.
// re:
// A function. Takes one parameter and converts it to a regular
// expression.
// nonCapture:
// If true, uses non-capturing match, otherwise matches are retained
// by regular expression. Defaults to false
// case 1: a is a single value.
if(!(arr instanceof Array)){
return re(arr); // String
}
// case 2: a is an array
var b = [];
for(var i = 0; i < arr.length; i++){
// convert each elem to a RE
b.push(re(arr[i]));
}
// join the REs as alternatives in a RE group.
return dojo.regexp.group(b.join("|"), nonCapture); // String
}
dojo.regexp.group = function(/*String*/expression, /*Boolean?*/nonCapture){
// summary:
// adds group match to expression
// nonCapture:
// If true, uses non-capturing match, otherwise matches are retained
// by regular expression.
return "(" + (nonCapture ? "?:":"") + expression + ")"; // String
}
}
if(!dojo._hasResource["dojo.number"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo.number"] = true;
dojo.provide("dojo.number");
/*=====
-dojo.number.__formatOptions = function(kwArgs){
+dojo.number = {
+ // summary: localized formatting and parsing routines for Number
+}
+
+dojo.number.__FormatOptions = function(){
// pattern: String?
- // override formatting pattern with this string (see
- // dojo.number._applyPattern)
+ // override [formatting pattern](http://www.unicode.org/reports/tr35/#Number_Format_Patterns)
+ // with this string. Default value is based on locale. Overriding this property will defeat
+ // localization.
// type: String?
// choose a format type based on the locale from the following:
- // decimal, scientific, percent, currency. decimal by default.
+ // decimal, scientific (not yet supported), percent, currency. decimal by default.
// places: Number?
// fixed number of decimal places to show. This overrides any
// information in the provided pattern.
- // round: NUmber?
+ // round: Number?
// 5 rounds to nearest .5; 0 rounds to nearest whole (default). -1
- // means don't round.
- // currency: String?
- // iso4217 currency code
- // symbol: String?
- // localized currency symbol
+ // means do not round.
// locale: String?
// override the locale used to determine formatting rules
+ this.pattern = pattern;
+ this.type = type;
+ this.places = places;
+ this.round = round;
+ this.locale = locale;
}
=====*/
-dojo.number.format = function(/*Number*/value, /*dojo.number.__formatOptions?*/options){
+dojo.number.format = function(/*Number*/value, /*dojo.number.__FormatOptions?*/options){
// summary:
// Format a Number as a String, using locale-specific settings
// description:
// Create a string from a Number using a known localized pattern.
// Formatting patterns appropriate to the locale are chosen from the
- // CLDR http://unicode.org/cldr as well as the appropriate symbols and
- // delimiters. See http://www.unicode.org/reports/tr35/#Number_Elements
+ // [CLDR](http://unicode.org/cldr) as well as the appropriate symbols and
+ // delimiters. See <http://www.unicode.org/reports/tr35/#Number_Elements>
+ // If value is Infinity, -Infinity, or is not a valid JavaScript number, return null.
// value:
- // the number to be formatted. If not a valid JavaScript number,
- // return null.
+ // the number to be formatted
options = dojo.mixin({}, options || {});
var locale = dojo.i18n.normalizeLocale(options.locale);
var bundle = dojo.i18n.getLocalization("dojo.cldr", "number", locale);
options.customs = bundle;
var pattern = options.pattern || bundle[(options.type || "decimal") + "Format"];
- if(isNaN(value)){ return null; } // null
+ if(isNaN(value) || Math.abs(value) == Infinity){ return null; } // null
return dojo.number._applyPattern(value, pattern, options); // String
};
//dojo.number._numberPatternRE = /(?:[#0]*,?)*[#0](?:\.0*#*)?/; // not precise, but good enough
dojo.number._numberPatternRE = /[#0,]*[#0](?:\.0*#*)?/; // not precise, but good enough
-dojo.number._applyPattern = function(/*Number*/value, /*String*/pattern, /*dojo.number.__formatOptions?*/options){
+dojo.number._applyPattern = function(/*Number*/value, /*String*/pattern, /*dojo.number.__FormatOptions?*/options){
// summary:
// Apply pattern to format value as a string using options. Gives no
// consideration to local customs.
// value:
// the number to be formatted.
// pattern:
- // a pattern string as described in
- // http://www.unicode.org/reports/tr35/#Number_Format_Patterns
- // options: dojo.number.__formatOptions?
- // _applyPattern is usually called via dojo.number.format() which
+ // a pattern string as described by
+ // [unicode.org TR35](http://www.unicode.org/reports/tr35/#Number_Format_Patterns)
+ // options: dojo.number.__FormatOptions?
+ // _applyPattern is usually called via `dojo.number.format()` which
// populates an extra property in the options parameter, "customs".
// The customs object specifies group and decimal parameters if set.
//TODO: support escapes
options = options || {};
var group = options.customs.group;
var decimal = options.customs.decimal;
var patternList = pattern.split(';');
var positivePattern = patternList[0];
pattern = patternList[(value < 0) ? 1 : 0] || ("-" + positivePattern);
//TODO: only test against unescaped
if(pattern.indexOf('%') != -1){
value *= 100;
}else if(pattern.indexOf('\u2030') != -1){
value *= 1000; // per mille
}else if(pattern.indexOf('\u00a4') != -1){
group = options.customs.currencyGroup || group;//mixins instead?
decimal = options.customs.currencyDecimal || decimal;// Should these be mixins instead?
pattern = pattern.replace(/\u00a4{1,3}/, function(match){
var prop = ["symbol", "currency", "displayName"][match.length-1];
return options[prop] || options.currency || "";
});
}else if(pattern.indexOf('E') != -1){
throw new Error("exponential notation not supported");
}
//TODO: support @ sig figs?
var numberPatternRE = dojo.number._numberPatternRE;
var numberPattern = positivePattern.match(numberPatternRE);
if(!numberPattern){
throw new Error("unable to find a number expression in pattern: "+pattern);
}
+ if(options.fractional === false){ options.places = 0; }
return pattern.replace(numberPatternRE,
- dojo.number._formatAbsolute(value, numberPattern[0], {decimal: decimal, group: group, places: options.places}));
-}
-
-dojo.number.round = function(/*Number*/value, /*Number*/places, /*Number?*/multiple){
+ dojo.number._formatAbsolute(value, numberPattern[0], {decimal: decimal, group: group, places: options.places, round: options.round}));
+}
+
+dojo.number.round = function(/*Number*/value, /*Number?*/places, /*Number?*/increment){
// summary:
- // Rounds the number at the given number of places
+ // Rounds to the nearest value with the given number of decimal places, away from zero
+ // description:
+ // Rounds to the nearest value with the given number of decimal places, away from zero if equal.
+ // Similar to Number.toFixed(), but compensates for browser quirks. Rounding can be done by
+ // fractional increments also, such as the nearest quarter.
+ // NOTE: Subject to floating point errors. See dojox.math.round for experimental workaround.
// value:
- // the number to round
+ // The number to round
// places:
- // the number of decimal places where rounding takes place
- // multiple:
- // rounds next place to nearest multiple
-
- var pieces = String(value).split(".");
- var length = (pieces[1] && pieces[1].length) || 0;
- if(length > places){
- var factor = Math.pow(10, places);
- if(multiple > 0){factor *= 10/multiple;places++;} //FIXME
- value = Math.round(value * factor)/factor;
-
- // truncate to remove any residual floating point values
- pieces = String(value).split(".");
- length = (pieces[1] && pieces[1].length) || 0;
- if(length > places){
- pieces[1] = pieces[1].substr(0, places);
- value = Number(pieces.join("."));
- }
- }
- return value; //Number
+ // The number of decimal places where rounding takes place. Defaults to 0 for whole rounding.
+ // Must be non-negative.
+ // increment:
+ // Rounds next place to nearest value of increment/10. 10 by default.
+ // example:
+ // >>> dojo.number.round(-0.5)
+ // -1
+ // >>> dojo.number.round(162.295, 2)
+ // 162.29 // note floating point error. Should be 162.3
+ // >>> dojo.number.round(10.71, 0, 2.5)
+ // 10.75
+ var factor = 10 / (increment || 10);
+ return (factor * +value).toFixed(places) / factor; // Number
+}
+
+if((0.9).toFixed() == 0){
+ // (isIE) toFixed() bug workaround: Rounding fails on IE when most significant digit
+ // is just after the rounding place and is >=5
+ (function(){
+ var round = dojo.number.round;
+ dojo.number.round = function(v, p, m){
+ var d = Math.pow(10, -p || 0), a = Math.abs(v);
+ if(!v || a >= d || a * Math.pow(10, p + 1) < 5){
+ d = 0;
+ }
+ return round(v, p, m) + (v > 0 ? d : -d);
+ }
+ })();
}
/*=====
-dojo.number.__formatAbsoluteOptions = function(kwArgs){
+dojo.number.__FormatAbsoluteOptions = function(){
// decimal: String?
// the decimal separator
// group: String?
// the group separator
- // places: Integer?
- // number of decimal places
+ // places: Number?|String?
+ // number of decimal places. the range "n,m" will format to m places.
// round: Number?
// 5 rounds to nearest .5; 0 rounds to nearest whole (default). -1
// means don't round.
+ this.decimal = decimal;
+ this.group = group;
+ this.places = places;
+ this.round = round;
}
=====*/
-dojo.number._formatAbsolute = function(/*Number*/value, /*String*/pattern, /*dojo.number.__formatAbsoluteOptions?*/options){
+dojo.number._formatAbsolute = function(/*Number*/value, /*String*/pattern, /*dojo.number.__FormatAbsoluteOptions?*/options){
// summary:
// Apply numeric pattern to absolute value using options. Gives no
// consideration to local customs.
// value:
// the number to be formatted, ignores sign
// pattern:
- // the number portion of a pattern (e.g. #,##0.00)
+ // the number portion of a pattern (e.g. `#,##0.00`)
options = options || {};
if(options.places === true){options.places=0;}
if(options.places === Infinity){options.places=6;} // avoid a loop; pick a limit
var patternParts = pattern.split(".");
var maxPlaces = (options.places >= 0) ? options.places : (patternParts[1] && patternParts[1].length) || 0;
if(!(options.round < 0)){
value = dojo.number.round(value, maxPlaces, options.round);
}
var valueParts = String(Math.abs(value)).split(".");
var fractional = valueParts[1] || "";
if(options.places){
+ var comma = dojo.isString(options.places) && options.places.indexOf(",");
+ if(comma){
+ options.places = options.places.substring(comma+1);
+ }
valueParts[1] = dojo.string.pad(fractional.substr(0, options.places), options.places, '0', true);
}else if(patternParts[1] && options.places !== 0){
// Pad fractional with trailing zeros
var pad = patternParts[1].lastIndexOf("0") + 1;
if(pad > fractional.length){
valueParts[1] = dojo.string.pad(fractional, pad, '0', true);
}
// Truncate fractional
var places = patternParts[1].length;
if(places < fractional.length){
valueParts[1] = fractional.substr(0, places);
}
}else{
if(valueParts[1]){ valueParts.pop(); }
}
// Pad whole with leading zeros
var patternDigits = patternParts[0].replace(',', '');
pad = patternDigits.indexOf("0");
if(pad != -1){
pad = patternDigits.length - pad;
if(pad > valueParts[0].length){
valueParts[0] = dojo.string.pad(valueParts[0], pad);
}
// Truncate whole
if(patternDigits.indexOf("#") == -1){
valueParts[0] = valueParts[0].substr(valueParts[0].length - pad);
}
}
// Add group separators
var index = patternParts[0].lastIndexOf(',');
var groupSize, groupSize2;
if(index != -1){
groupSize = patternParts[0].length - index - 1;
var remainder = patternParts[0].substr(0, index);
index = remainder.lastIndexOf(',');
if(index != -1){
groupSize2 = remainder.length - index - 1;
}
}
var pieces = [];
for(var whole = valueParts[0]; whole;){
var off = whole.length - groupSize;
pieces.push((off > 0) ? whole.substr(off) : whole);
whole = (off > 0) ? whole.slice(0, off) : "";
if(groupSize2){
groupSize = groupSize2;
delete groupSize2;
}
}
valueParts[0] = pieces.reverse().join(options.group || ",");
return valueParts.join(options.decimal || ".");
};
/*=====
-dojo.number.__regexpOptions = function(kwArgs){
+dojo.number.__RegexpOptions = function(){
// pattern: String?
- // override pattern with this string. Default is provided based on
- // locale.
+ // override [formatting pattern](http://www.unicode.org/reports/tr35/#Number_Format_Patterns)
+ // with this string. Default value is based on locale. Overriding this property will defeat
+ // localization.
// type: String?
// choose a format type based on the locale from the following:
- // decimal, scientific, percent, currency. decimal by default.
+ // decimal, scientific (not yet supported), percent, currency. decimal by default.
// locale: String?
// override the locale used to determine formatting rules
// strict: Boolean?
- // strict parsing, false by default
+ // strict parsing, false by default. Strict parsing requires input as produced by the format() method.
+ // Non-strict is more permissive, e.g. flexible on white space, omitting thousands separators
// places: Number|String?
// number of decimal places to accept: Infinity, a positive number, or
- // a range "n,m". By default, defined by pattern.
+ // a range "n,m". Defined by pattern or Infinity if pattern not provided.
+ this.pattern = pattern;
+ this.type = type;
+ this.locale = locale;
+ this.strict = strict;
+ this.places = places;
}
=====*/
-dojo.number.regexp = function(/*dojo.number.__regexpOptions?*/options){
+dojo.number.regexp = function(/*dojo.number.__RegexpOptions?*/options){
// summary:
// Builds the regular needed to parse a number
// description:
// Returns regular expression with positive and negative match, group
// and decimal separators
return dojo.number._parseInfo(options).regexp; // String
}
dojo.number._parseInfo = function(/*Object?*/options){
options = options || {};
var locale = dojo.i18n.normalizeLocale(options.locale);
var bundle = dojo.i18n.getLocalization("dojo.cldr", "number", locale);
var pattern = options.pattern || bundle[(options.type || "decimal") + "Format"];
//TODO: memoize?
var group = bundle.group;
var decimal = bundle.decimal;
var factor = 1;
if(pattern.indexOf('%') != -1){
factor /= 100;
}else if(pattern.indexOf('\u2030') != -1){
factor /= 1000; // per mille
}else{
var isCurrency = pattern.indexOf('\u00a4') != -1;
if(isCurrency){
group = bundle.currencyGroup || group;
decimal = bundle.currencyDecimal || decimal;
}
}
//TODO: handle quoted escapes
var patternList = pattern.split(';');
if(patternList.length == 1){
patternList.push("-" + patternList[0]);
}
var re = dojo.regexp.buildGroupRE(patternList, function(pattern){
pattern = "(?:"+dojo.regexp.escapeString(pattern, '.')+")";
return pattern.replace(dojo.number._numberPatternRE, function(format){
var flags = {
signed: false,
separator: options.strict ? group : [group,""],
fractional: options.fractional,
decimal: decimal,
exponent: false};
var parts = format.split('.');
var places = options.places;
if(parts.length == 1 || places === 0){flags.fractional = false;}
else{
- if(typeof places == "undefined"){ places = parts[1].lastIndexOf('0')+1; }
+ if(places === undefined){ places = options.pattern ? parts[1].lastIndexOf('0')+1 : Infinity; }
if(places && options.fractional == undefined){flags.fractional = true;} // required fractional, unless otherwise specified
if(!options.places && (places < parts[1].length)){ places += "," + parts[1].length; }
flags.places = places;
}
var groups = parts[0].split(',');
if(groups.length>1){
flags.groupSize = groups.pop().length;
if(groups.length>1){
flags.groupSize2 = groups.pop().length;
}
}
return "("+dojo.number._realNumberRegexp(flags)+")";
});
}, true);
if(isCurrency){
// substitute the currency symbol for the placeholder in the pattern
- re = re.replace(/(\s*)(\u00a4{1,3})(\s*)/g, function(match, before, target, after){
+ re = re.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g, function(match, before, target, after){
var prop = ["symbol", "currency", "displayName"][target.length-1];
var symbol = dojo.regexp.escapeString(options[prop] || options.currency || "");
- before = before ? "\\s" : "";
- after = after ? "\\s" : "";
+ before = before ? "[\\s\\xa0]" : "";
+ after = after ? "[\\s\\xa0]" : "";
if(!options.strict){
if(before){before += "*";}
if(after){after += "*";}
return "(?:"+before+symbol+after+")?";
}
return before+symbol+after;
});
}
//TODO: substitute localized sign/percent/permille/etc.?
// normalize whitespace and return
return {regexp: re.replace(/[\xa0 ]/g, "[\\s\\xa0]"), group: group, decimal: decimal, factor: factor}; // Object
}
/*=====
-dojo.number.__parseOptions = function(kwArgs){
- // pattern: String
- // override pattern with this string. Default is provided based on
- // locale.
+dojo.number.__ParseOptions = function(){
+ // pattern: String?
+ // override [formatting pattern](http://www.unicode.org/reports/tr35/#Number_Format_Patterns)
+ // with this string. Default value is based on locale. Overriding this property will defeat
+ // localization.
// type: String?
// choose a format type based on the locale from the following:
- // decimal, scientific, percent, currency. decimal by default.
- // locale: String
+ // decimal, scientific (not yet supported), percent, currency. decimal by default.
+ // locale: String?
// override the locale used to determine formatting rules
// strict: Boolean?
- // strict parsing, false by default
- // currency: Object
- // object with currency information
+ // strict parsing, false by default. Strict parsing requires input as produced by the format() method.
+ // Non-strict is more permissive, e.g. flexible on white space, omitting thousands separators
+ this.pattern = pattern;
+ this.type = type;
+ this.locale = locale;
+ this.strict = strict;
}
=====*/
-dojo.number.parse = function(/*String*/expression, /*dojo.number.__parseOptions?*/options){
+dojo.number.parse = function(/*String*/expression, /*dojo.number.__ParseOptions?*/options){
// summary:
// Convert a properly formatted string to a primitive Number, using
// locale-specific settings.
// description:
// Create a Number from a string using a known localized pattern.
- // Formatting patterns are chosen appropriate to the locale.
- // Formatting patterns are implemented using the syntax described at
- // *URL*
+ // Formatting patterns are chosen appropriate to the locale
+ // and follow the syntax described by
+ // [unicode.org TR35](http://www.unicode.org/reports/tr35/#Number_Format_Patterns)
// expression:
// A string representation of a Number
var info = dojo.number._parseInfo(options);
var results = (new RegExp("^"+info.regexp+"$")).exec(expression);
if(!results){
return NaN; //NaN
}
var absoluteMatch = results[1]; // match for the positive expression
if(!results[1]){
if(!results[2]){
return NaN; //NaN
}
// matched the negative pattern
absoluteMatch =results[2];
info.factor *= -1;
}
// Transform it to something Javascript can parse as a number. Normalize
// decimal point and strip out group separators or alternate forms of whitespace
absoluteMatch = absoluteMatch.
replace(new RegExp("["+info.group + "\\s\\xa0"+"]", "g"), "").
replace(info.decimal, ".");
// Adjust for negative sign, percent, etc. as necessary
- return Number(absoluteMatch) * info.factor; //Number
+ return absoluteMatch * info.factor; //Number
};
/*=====
-dojo.number.__realNumberRegexpFlags = function(kwArgs){
+dojo.number.__RealNumberRegexpFlags = function(){
// places: Number?
// The integer number of decimal places or a range given as "n,m". If
// not given, the decimal part is optional and the number of places is
// unlimited.
// decimal: String?
// A string for the character used as the decimal point. Default
// is ".".
- // fractional: Boolean|Array?
- // Whether decimal places are allowed. Can be true, false, or [true,
- // false]. Default is [true, false]
- // exponent: Boolean|Array?
+ // fractional: Boolean?|Array?
+ // Whether decimal places are used. Can be true, false, or [true,
+ // false]. Default is [true, false] which means optional.
+ // exponent: Boolean?|Array?
// Express in exponential notation. Can be true, false, or [true,
// false]. Default is [true, false], (i.e. will match if the
// exponential part is present are not).
- // eSigned: Boolean|Array?
+ // eSigned: Boolean?|Array?
// The leading plus-or-minus sign on the exponent. Can be true,
// false, or [true, false]. Default is [true, false], (i.e. will
// match if it is signed or unsigned). flags in regexp.integer can be
// applied.
+ this.places = places;
+ this.decimal = decimal;
+ this.fractional = fractional;
+ this.exponent = exponent;
+ this.eSigned = eSigned;
}
=====*/
-dojo.number._realNumberRegexp = function(/*dojo.number.__realNumberRegexpFlags?*/flags){
+dojo.number._realNumberRegexp = function(/*dojo.number.__RealNumberRegexpFlags?*/flags){
// summary:
// Builds a regular expression to match a real number in exponential
// notation
- // flags:
- // An object
// assign default values to missing paramters
flags = flags || {};
- if(typeof flags.places == "undefined"){ flags.places = Infinity; }
+ //TODO: use mixin instead?
+ if(!("places" in flags)){ flags.places = Infinity; }
if(typeof flags.decimal != "string"){ flags.decimal = "."; }
- if(typeof flags.fractional == "undefined" || /^0/.test(flags.places)){ flags.fractional = [true, false]; }
- if(typeof flags.exponent == "undefined"){ flags.exponent = [true, false]; }
- if(typeof flags.eSigned == "undefined"){ flags.eSigned = [true, false]; }
+ if(!("fractional" in flags) || /^0/.test(flags.places)){ flags.fractional = [true, false]; }
+ if(!("exponent" in flags)){ flags.exponent = [true, false]; }
+ if(!("eSigned" in flags)){ flags.eSigned = [true, false]; }
// integer RE
var integerRE = dojo.number._integerRegexp(flags);
// decimal RE
var decimalRE = dojo.regexp.buildGroupRE(flags.fractional,
function(q){
var re = "";
if(q && (flags.places!==0)){
re = "\\" + flags.decimal;
if(flags.places == Infinity){
re = "(?:" + re + "\\d+)?";
}else{
re += "\\d{" + flags.places + "}";
}
}
return re;
},
true
);
// exponent RE
var exponentRE = dojo.regexp.buildGroupRE(flags.exponent,
function(q){
if(q){ return "([eE]" + dojo.number._integerRegexp({ signed: flags.eSigned}) + ")"; }
return "";
}
);
// real number RE
var realRE = integerRE + decimalRE;
// allow for decimals without integers, e.g. .25
if(decimalRE){realRE = "(?:(?:"+ realRE + ")|(?:" + decimalRE + "))";}
return realRE + exponentRE; // String
};
/*=====
-dojo.number.__integerRegexpFlags = function(kwArgs){
+dojo.number.__IntegerRegexpFlags = function(){
// signed: Boolean?
- // The leading plus-or-minus sign. Can be true, false, or [true,
- // false]. Default is [true, false], (i.e. will match if it is signed
+ // The leading plus-or-minus sign. Can be true, false, or `[true,false]`.
+ // Default is `[true, false]`, (i.e. will match if it is signed
// or unsigned).
// separator: String?
// The character used as the thousands separator. Default is no
- // separator. For more than one symbol use an array, e.g. [",", ""],
+ // separator. For more than one symbol use an array, e.g. `[",", ""]`,
// makes ',' optional.
// groupSize: Number?
// group size between separators
- // flags.groupSize2: Number?
- // second grouping (for India)
+ // groupSize2: Number?
+ // second grouping, where separators 2..n have a different interval than the first separator (for India)
+ this.signed = signed;
+ this.separator = separator;
+ this.groupSize = groupSize;
+ this.groupSize2 = groupSize2;
}
=====*/
-dojo.number._integerRegexp = function(/*dojo.number.__integerRegexpFlags?*/flags){
+dojo.number._integerRegexp = function(/*dojo.number.__IntegerRegexpFlags?*/flags){
// summary:
// Builds a regular expression that matches an integer
- // flags:
- // An object
// assign default values to missing paramters
flags = flags || {};
- if(typeof flags.signed == "undefined"){ flags.signed = [true, false]; }
- if(typeof flags.separator == "undefined"){
+ if(!("signed" in flags)){ flags.signed = [true, false]; }
+ if(!("separator" in flags)){
flags.separator = "";
- }else if(typeof flags.groupSize == "undefined"){
+ }else if(!("groupSize" in flags)){
flags.groupSize = 3;
}
// build sign RE
var signRE = dojo.regexp.buildGroupRE(flags.signed,
- function(q) { return q ? "[-+]" : ""; },
+ function(q){ return q ? "[-+]" : ""; },
true
);
// number RE
var numberRE = dojo.regexp.buildGroupRE(flags.separator,
function(sep){
if(!sep){
- return "(?:0|[1-9]\\d*)";
+ return "(?:\\d+)";
}
sep = dojo.regexp.escapeString(sep);
if(sep == " "){ sep = "\\s"; }
else if(sep == "\xa0"){ sep = "\\s\\xa0"; }
var grp = flags.groupSize, grp2 = flags.groupSize2;
+ //TODO: should we continue to enforce that numbers with separators begin with 1-9? See #6933
if(grp2){
var grp2RE = "(?:0|[1-9]\\d{0," + (grp2-1) + "}(?:[" + sep + "]\\d{" + grp2 + "})*[" + sep + "]\\d{" + grp + "})";
return ((grp-grp2) > 0) ? "(?:" + grp2RE + "|(?:0|[1-9]\\d{0," + (grp-1) + "}))" : grp2RE;
}
return "(?:0|[1-9]\\d{0," + (grp-1) + "}(?:[" + sep + "]\\d{" + grp + "})*)";
},
true
);
// integer RE
return signRE + numberRE; // String
}
}
if(!dojo._hasResource["dijit.ProgressBar"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.ProgressBar"] = true;
dojo.provide("dijit.ProgressBar");
dojo.declare("dijit.ProgressBar", [dijit._Widget, dijit._Templated], {
// summary:
- // a progress widget
- //
- // usage:
- // <div dojoType="ProgressBar"
- // places="0"
- // progress="..." maximum="..."></div>
-
- // progress: String (Percentage or Number)
- // initial progress value.
- // with "%": percentage value, 0% <= progress <= 100%
- // or without "%": absolute value, 0 <= progress <= maximum
+ // A progress indication widget, showing the amount completed
+ // (often the percentage completed) of a task.
+ //
+ // example:
+ // | <div dojoType="ProgressBar"
+ // | places="0"
+ // | progress="..." maximum="...">
+ // | </div>
+ //
+ // description:
+ // Note that the progress bar is updated via (a non-standard)
+ // update() method, rather than via attr() like other widgets.
+
+ // progress: [const] String (Percentage or Number)
+ // Number or percentage indicating amount of task completed.
+ // With "%": percentage value, 0% <= progress <= 100%, or
+ // without "%": absolute value, 0 <= progress <= maximum
+ // TODO: rename to value for 2.0
progress: "0",
- // maximum: Float
- // max sample number
+ // maximum: [const] Float
+ // Max sample number
maximum: 100,
- // places: Number
- // number of places to show in values; 0 by default
+ // places: [const] Number
+ // Number of places to show in values; 0 by default
places: 0,
- // indeterminate: Boolean
- // false: show progress
- // true: show that a process is underway but that the progress is unknown
+ // indeterminate: [const] Boolean
+ // If false: show progress value (number or percentage).
+ // If true: show that a process is underway but that the amount completed is unknown.
indeterminate: false,
- templateString:"<div class=\"dijitProgressBar dijitProgressBarEmpty\"\n\t><div waiRole=\"progressbar\" tabindex=\"0\" dojoAttachPoint=\"internalProgress\" class=\"dijitProgressBarFull\"\n\t\t><div class=\"dijitProgressBarTile\"></div\n\t\t><span style=\"visibility:hidden\">&nbsp;</span\n\t></div\n\t><div dojoAttachPoint=\"label\" class=\"dijitProgressBarLabel\" id=\"${id}_label\">&nbsp;</div\n\t><img dojoAttachPoint=\"inteterminateHighContrastImage\" class=\"dijitProgressBarIndeterminateHighContrastImage\"\n\t></img\n></div>\n",
-
+ // name: String
+ // this is the field name (for a form) if set. This needs to be set if you want to use
+ // this widget in a dijit.form.Form widget (such as dijit.Dialog)
+ name: '',
+
+ templateString: dojo.cache("dijit", "templates/ProgressBar.html", "<div class=\"dijitProgressBar dijitProgressBarEmpty\"\n\t><div waiRole=\"progressbar\" dojoAttachPoint=\"internalProgress\" class=\"dijitProgressBarFull\"\n\t\t><div class=\"dijitProgressBarTile\"></div\n\t\t><span style=\"visibility:hidden\">&nbsp;</span\n\t></div\n\t><div dojoAttachPoint=\"label\" class=\"dijitProgressBarLabel\" id=\"${id}_label\">&nbsp;</div\n\t><img dojoAttachPoint=\"indeterminateHighContrastImage\" class=\"dijitProgressBarIndeterminateHighContrastImage\" alt=\"\"\n\t></img\n></div>\n"),
+
+ // _indeterminateHighContrastImagePath: [private] dojo._URL
+ // URL to image to use for indeterminate progress bar when display is in high contrast mode
_indeterminateHighContrastImagePath:
dojo.moduleUrl("dijit", "themes/a11y/indeterminate_progress.gif"),
// public functions
postCreate: function(){
- this.inherited("postCreate",arguments);
- this.inteterminateHighContrastImage.setAttribute("src",
- this._indeterminateHighContrastImagePath);
+ this.inherited(arguments);
+ this.indeterminateHighContrastImage.setAttribute("src",
+ this._indeterminateHighContrastImagePath.toString());
this.update();
},
update: function(/*Object?*/attributes){
- // summary: update progress information
- //
- // attributes: may provide progress and/or maximum properties on this parameter,
- // see attribute specs for details.
- dojo.mixin(this, attributes||{});
+ // summary:
+ // Change attributes of ProgressBar, similar to attr(hash).
+ //
+ // attributes:
+ // May provide progress and/or maximum properties on this parameter;
+ // see attribute specs for details.
+ //
+ // example:
+ // | myProgressBar.update({'indeterminate': true});
+ // | myProgressBar.update({'progress': 80});
+
+ // TODO: deprecate this method and use attr() instead
+
+ dojo.mixin(this, attributes || {});
+ var tip = this.internalProgress;
var percent = 1, classFunc;
if(this.indeterminate){
classFunc = "addClass";
- dijit.removeWaiState(this.internalProgress, "valuenow");
- dijit.removeWaiState(this.internalProgress, "valuemin");
- dijit.removeWaiState(this.internalProgress, "valuemax");
+ dijit.removeWaiState(tip, "valuenow");
+ dijit.removeWaiState(tip, "valuemin");
+ dijit.removeWaiState(tip, "valuemax");
}else{
classFunc = "removeClass";
if(String(this.progress).indexOf("%") != -1){
percent = Math.min(parseFloat(this.progress)/100, 1);
this.progress = percent * this.maximum;
}else{
this.progress = Math.min(this.progress, this.maximum);
percent = this.progress / this.maximum;
}
var text = this.report(percent);
this.label.firstChild.nodeValue = text;
- dijit.setWaiState(this.internalProgress, "describedby", this.label.id);
- dijit.setWaiState(this.internalProgress, "valuenow", this.progress);
- dijit.setWaiState(this.internalProgress, "valuemin", 0);
- dijit.setWaiState(this.internalProgress, "valuemax", this.maximum);
+ dijit.setWaiState(tip, "describedby", this.label.id);
+ dijit.setWaiState(tip, "valuenow", this.progress);
+ dijit.setWaiState(tip, "valuemin", 0);
+ dijit.setWaiState(tip, "valuemax", this.maximum);
}
dojo[classFunc](this.domNode, "dijitProgressBarIndeterminate");
- this.internalProgress.style.width = (percent * 100) + "%";
+ tip.style.width = (percent * 100) + "%";
this.onChange();
},
+ _setValueAttr: function(v){
+ if(v == Infinity){
+ this.update({indeterminate:true});
+ }else{
+ this.update({indeterminate:false, progress:v});
+ }
+ },
+
+ _getValueAttr: function(){
+ return this.progress;
+ },
+
report: function(/*float*/percent){
- // Generates message to show; may be overridden by user
- return dojo.number.format(percent, {type: "percent", places: this.places, locale: this.lang});
- },
-
- onChange: function(){}
+ // summary:
+ // Generates message to show inside progress bar (normally indicating amount of task completed).
+ // May be overridden.
+ // tags:
+ // extension
+
+ return dojo.number.format(percent, { type: "percent", places: this.places, locale: this.lang });
+ },
+
+ onChange: function(){
+ // summary:
+ // Callback fired when progress updates.
+ // tags:
+ // progress
+ }
});
}
if(!dojo._hasResource["dijit.TitlePane"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.TitlePane"] = true;
dojo.provide("dijit.TitlePane");
dojo.declare(
"dijit.TitlePane",
[dijit.layout.ContentPane, dijit._Templated],
{
- // summary
- // A pane with a title on top, that can be opened or collapsed.
- //
+ // summary:
+ // A pane with a title on top, that can be expanded or collapsed.
+ //
+ // description:
+ // An accessible container with a title Heading, and a content
+ // section that slides open and closed. TitlePane is an extension to
+ // `dijit.layout.ContentPane`, providing all the useful content-control aspects from it.
+ //
+ // example:
+ // | // load a TitlePane from remote file:
+ // | var foo = new dijit.TitlePane({ href: "foobar.html", title:"Title" });
+ // | foo.startup();
+ //
+ // example:
+ // | <!-- markup href example: -->
+ // | <div dojoType="dijit.TitlePane" href="foobar.html" title="Title"></div>
+ //
+ // example:
+ // | <!-- markup with inline data -->
+ // | <div dojoType="dijit.TitlePane" title="Title">
+ // | <p>I am content</p>
+ // | </div>
+
// title: String
// Title of the pane
title: "",
// open: Boolean
// Whether pane is opened or closed.
open: true,
+ // toggleable: Boolean
+ // Whether pane can be opened or closed by clicking the title bar.
+ toggleable: true,
+
+ // tabIndex: String
+ // Tabindex setting for the title (so users can tab to the title then
+ // use space/enter to open/close the title pane)
+ tabIndex: "0",
+
// duration: Integer
// Time in milliseconds to fade in/fade out
- duration: 250,
-
- // baseClass: String
- // the root className to use for the various states of this widget
+ duration: dijit.defaultDuration,
+
+ // baseClass: [protected] String
+ // The root className to be placed on this widget's domNode.
baseClass: "dijitTitlePane",
- templateString:"<div class=\"dijitTitlePane\">\n\t<div dojoAttachEvent=\"onclick:toggle,onkeypress: _onTitleKey,onfocus:_handleFocus,onblur:_handleFocus\" tabindex=\"0\"\n\t\t\twaiRole=\"button\" class=\"dijitTitlePaneTitle\" dojoAttachPoint=\"focusNode\">\n\t\t<div dojoAttachPoint=\"arrowNode\" class=\"dijitInline dijitArrowNode\"><span dojoAttachPoint=\"arrowNodeInner\" class=\"dijitArrowNodeInner\"></span></div>\n\t\t<div dojoAttachPoint=\"titleNode\" class=\"dijitTitlePaneTextNode\"></div>\n\t</div>\n\t<div class=\"dijitTitlePaneContentOuter\" dojoAttachPoint=\"hideNode\">\n\t\t<div class=\"dijitReset\" dojoAttachPoint=\"wipeNode\">\n\t\t\t<div class=\"dijitTitlePaneContentInner\" dojoAttachPoint=\"containerNode\" waiRole=\"region\" tabindex=\"-1\">\n\t\t\t\t<!-- nested divs because wipeIn()/wipeOut() doesn't work right on node w/padding etc. Put padding on inner div. -->\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n",
+ templateString: dojo.cache("dijit", "templates/TitlePane.html", "<div class=\"${baseClass}\">\n\t<div dojoAttachEvent=\"onclick:_onTitleClick, onkeypress:_onTitleKey, onfocus:_handleFocus, onblur:_handleFocus, onmouseenter:_onTitleEnter, onmouseleave:_onTitleLeave\"\n\t\t\tclass=\"dijitTitlePaneTitle\" dojoAttachPoint=\"titleBarNode,focusNode\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" dojoAttachPoint=\"arrowNode\" class=\"dijitArrowNode\" waiRole=\"presentation\"\n\t\t><span dojoAttachPoint=\"arrowNodeInner\" class=\"dijitArrowNodeInner\"></span\n\t\t><span dojoAttachPoint=\"titleNode\" class=\"dijitTitlePaneTextNode\"></span>\n\t</div>\n\t<div class=\"dijitTitlePaneContentOuter\" dojoAttachPoint=\"hideNode\" waiRole=\"presentation\">\n\t\t<div class=\"dijitReset\" dojoAttachPoint=\"wipeNode\" waiRole=\"presentation\">\n\t\t\t<div class=\"dijitTitlePaneContentInner\" dojoAttachPoint=\"containerNode\" waiRole=\"region\" tabindex=\"-1\" id=\"${id}_pane\">\n\t\t\t\t<!-- nested divs because wipeIn()/wipeOut() doesn't work right on node w/padding etc. Put padding on inner div. -->\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n"),
+
+ attributeMap: dojo.delegate(dijit.layout.ContentPane.prototype.attributeMap, {
+ title: { node: "titleNode", type: "innerHTML" },
+ tooltip: {node: "focusNode", type: "attribute", attribute: "title"}, // focusNode spans the entire width, titleNode doesn't
+ id:""
+ }),
postCreate: function(){
- this.setTitle(this.title);
if(!this.open){
this.hideNode.style.display = this.wipeNode.style.display = "none";
}
this._setCss();
dojo.setSelectable(this.titleNode, false);
- this.inherited("postCreate",arguments);
- dijit.setWaiState(this.containerNode, "labelledby", this.titleNode.id);
- dijit.setWaiState(this.focusNode, "haspopup", "true");
+ dijit.setWaiState(this.containerNode,"hidden", this.open ? "false" : "true");
+ dijit.setWaiState(this.focusNode, "pressed", this.open ? "true" : "false");
// setup open/close animations
var hideNode = this.hideNode, wipeNode = this.wipeNode;
this._wipeIn = dojo.fx.wipeIn({
node: this.wipeNode,
duration: this.duration,
beforeBegin: function(){
hideNode.style.display="";
}
});
this._wipeOut = dojo.fx.wipeOut({
node: this.wipeNode,
duration: this.duration,
onEnd: function(){
hideNode.style.display="none";
}
});
- },
-
- setContent: function(content){
- // summary
- // Typically called when an href is loaded. Our job is to make the animation smooth
- if(this._wipeOut.status() == "playing"){
- // we are currently *closing* the pane, so just let that continue
- this.inherited("setContent",arguments);
- }else{
- if(this._wipeIn.status() == "playing"){
+ this.inherited(arguments);
+ },
+
+ _setOpenAttr: function(/* Boolean */ open){
+ // summary:
+ // Hook to make attr("open", boolean) control the open/closed state of the pane.
+ // open: Boolean
+ // True if you want to open the pane, false if you want to close it.
+ if(this.open !== open){ this.toggle(); }
+ },
+
+ _setToggleableAttr: function(/* Boolean */ canToggle){
+ // summary:
+ // Hook to make attr("canToggle", boolean) work.
+ // canToggle: Boolean
+ // True to allow user to open/close pane by clicking title bar.
+ this.toggleable = canToggle;
+ dijit.setWaiRole(this.focusNode, canToggle ? "button" : "heading");
+ dojo.attr(this.focusNode, "tabIndex", canToggle ? this.tabIndex : "-1");
+ if(canToggle){
+ // TODO: if canToggle is switched from true false shouldn't we remove this setting?
+ dijit.setWaiState(this.focusNode, "controls", this.id+"_pane");
+ }
+ this._setCss();
+ },
+
+ _setContentAttr: function(content){
+ // summary:
+ // Hook to make attr("content", ...) work.
+ // Typically called when an href is loaded. Our job is to make the animation smooth.
+
+ if(!this.open || !this._wipeOut || this._wipeOut.status() == "playing"){
+ // we are currently *closing* the pane (or the pane is closed), so just let that continue
+ this.inherited(arguments);
+ }else{
+ if(this._wipeIn && this._wipeIn.status() == "playing"){
this._wipeIn.stop();
}
// freeze container at current height so that adding new content doesn't make it jump
- dojo.marginBox(this.wipeNode, {h: dojo.marginBox(this.wipeNode).h});
+ dojo.marginBox(this.wipeNode, { h: dojo.marginBox(this.wipeNode).h });
// add the new content (erasing the old content, if any)
- this.inherited("setContent",arguments);
+ this.inherited(arguments);
// call _wipeIn.play() to animate from current height to new height
- this._wipeIn.play();
+ if(this._wipeIn){
+ this._wipeIn.play();
+ }else{
+ this.hideNode.style.display = "";
+ }
}
},
toggle: function(){
- // summary: switches between opened and closed state
+ // summary:
+ // Switches between opened and closed state
+ // tags:
+ // private
+
dojo.forEach([this._wipeIn, this._wipeOut], function(animation){
- if(animation.status() == "playing"){
+ if(animation && animation.status() == "playing"){
animation.stop();
}
});
- this[this.open ? "_wipeOut" : "_wipeIn"].play();
+ var anim = this[this.open ? "_wipeOut" : "_wipeIn"]
+ if(anim){
+ anim.play();
+ }else{
+ this.hideNode.style.display = this.open ? "" : "none";
+ }
this.open =! this.open;
+ dijit.setWaiState(this.containerNode, "hidden", this.open ? "false" : "true");
+ dijit.setWaiState(this.focusNode, "pressed", this.open ? "true" : "false");
// load content (if this is the first time we are opening the TitlePane
- // and content is specified as an href, or we have setHref when hidden)
- this._loadCheck();
+ // and content is specified as an href, or href was set when hidden)
+ if(this.open){
+ this._onShow();
+ }else{
+ this.onHide();
+ }
this._setCss();
},
_setCss: function(){
- // summary: set the open/close css state for the TitlePane
- var classes = ["dijitClosed", "dijitOpen"];
- var boolIndex = this.open;
- dojo.removeClass(this.focusNode, classes[!boolIndex+0]);
- this.focusNode.className += " " + classes[boolIndex+0];
-
- // provide a character based indicator for images-off mode
+ // summary:
+ // Set the open/close css state for the TitlePane
+ // tags:
+ // private
+
+ var node = this.titleBarNode || this.focusNode;
+
+ if(this._titleBarClass){
+ dojo.removeClass(node, this._titleBarClass);
+ }
+ this._titleBarClass = "dijit" + (this.toggleable ? "" : "Fixed") + (this.open ? "Open" : "Closed");
+ dojo.addClass(node, this._titleBarClass);
this.arrowNodeInner.innerHTML = this.open ? "-" : "+";
},
_onTitleKey: function(/*Event*/ e){
- // summary: callback when user hits a key
- if(e.keyCode == dojo.keys.ENTER || e.charCode == dojo.keys.SPACE){
+ // summary:
+ // Handler for when user hits a key
+ // tags:
+ // private
+
+ if(e.charOrCode == dojo.keys.ENTER || e.charOrCode == ' '){
+ if(this.toggleable){
+ this.toggle();
+ }
+ dojo.stopEvent(e);
+ }else if(e.charOrCode == dojo.keys.DOWN_ARROW && this.open){
+ this.containerNode.focus();
+ e.preventDefault();
+ }
+ },
+
+ _onTitleEnter: function(){
+ // summary:
+ // Handler for when someone hovers over my title
+ // tags:
+ // private
+ if(this.toggleable){
+ dojo.addClass(this.focusNode, "dijitTitlePaneTitle-hover");
+ }
+ },
+
+ _onTitleLeave: function(){
+ // summary:
+ // Handler when someone stops hovering over my title
+ // tags:
+ // private
+ if(this.toggleable){
+ dojo.removeClass(this.focusNode, "dijitTitlePaneTitle-hover");
+ }
+ },
+
+ _onTitleClick: function(){
+ // summary:
+ // Handler when user clicks the title bar
+ // tags:
+ // private
+ if(this.toggleable){
this.toggle();
}
- else if(e.keyCode == dojo.keys.DOWN_ARROW){
- if(this.open){
- this.containerNode.focus();
- e.preventDefault();
- }
- }
- },
-
+ },
+
_handleFocus: function(/*Event*/ e){
- // summary: handle blur and focus for this widget
-
- // add/removeClass is safe to call without hasClass in this case
- dojo[(e.type=="focus" ? "addClass" : "removeClass")](this.focusNode,this.baseClass+"Focused");
+ // summary:
+ // Handle blur and focus events on title bar
+ // tags:
+ // private
+
+ dojo.toggleClass(this.focusNode, this.baseClass + "Focused", e.type == "focus");
},
setTitle: function(/*String*/ title){
- // summary: sets the text of the title
- this.titleNode.innerHTML=title;
+ // summary:
+ // Deprecated. Use attr('title', ...) instead.
+ // tags:
+ // deprecated
+ dojo.deprecated("dijit.TitlePane.setTitle() is deprecated. Use attr('title', ...) instead.", "", "2.0");
+ this.attr("title", title);
}
});
}
if(!dojo._hasResource["dijit.Tooltip"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.Tooltip"] = true;
dojo.provide("dijit.Tooltip");
dojo.declare(
"dijit._MasterTooltip",
[dijit._Widget, dijit._Templated],
{
- // summary
+ // summary:
// Internal widget that holds the actual tooltip markup,
// which occurs once per page.
// Called by Tooltip widgets which are just containers to hold
// the markup
+ // tags:
+ // protected
// duration: Integer
// Milliseconds to fade in/fade out
- duration: 200,
-
- templateString:"<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\">\n\t<div class=\"dijitTooltipContainer dijitTooltipContents\" dojoAttachPoint=\"containerNode\" waiRole='alert'></div>\n\t<div class=\"dijitTooltipConnector\"></div>\n</div>\n",
+ duration: dijit.defaultDuration,
+
+ templateString: dojo.cache("dijit", "templates/Tooltip.html", "<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\">\n\t<div class=\"dijitTooltipContainer dijitTooltipContents\" dojoAttachPoint=\"containerNode\" waiRole='alert'></div>\n\t<div class=\"dijitTooltipConnector\"></div>\n</div>\n"),
postCreate: function(){
dojo.body().appendChild(this.domNode);
this.bgIframe = new dijit.BackgroundIframe(this.domNode);
// Setup fade-in and fade-out functions.
this.fadeIn = dojo.fadeIn({ node: this.domNode, duration: this.duration, onEnd: dojo.hitch(this, "_onShow") });
this.fadeOut = dojo.fadeOut({ node: this.domNode, duration: this.duration, onEnd: dojo.hitch(this, "_onHide") });
},
- show: function(/*String*/ innerHTML, /*DomNode*/ aroundNode){
- // summary:
- // Display tooltip w/specified contents to right specified node
- // (To left if there's no space on the right, or if LTR==right)
+ show: function(/*String*/ innerHTML, /*DomNode*/ aroundNode, /*String[]?*/ position){
+ // summary:
+ // Display tooltip w/specified contents to right of specified node
+ // (To left if there's no space on the right, or if LTR==right)
if(this.aroundNode && this.aroundNode === aroundNode){
return;
}
if(this.fadeOut.status() == "playing"){
// previous tooltip is being hidden; wait until the hide completes then show new one
this._onDeck=arguments;
return;
}
this.containerNode.innerHTML=innerHTML;
// Firefox bug. when innerHTML changes to be shorter than previous
// one, the node size will not be updated until it moves.
this.domNode.style.top = (this.domNode.offsetTop + 1) + "px";
- // position the element and change CSS according to position
- var align = this.isLeftToRight() ? {'BR': 'BL', 'BL': 'BR'} : {'BL': 'BR', 'BR': 'BL'};
- var pos = dijit.placeOnScreenAroundElement(this.domNode, aroundNode, align);
- this.domNode.className="dijitTooltip dijitTooltip" + (pos.corner=='BL' ? "Right" : "Left");//FIXME: might overwrite class
+ var pos = dijit.placeOnScreenAroundElement(this.domNode, aroundNode, dijit.getPopupAroundAlignment((position && position.length) ? position : dijit.Tooltip.defaultPosition, this.isLeftToRight()), dojo.hitch(this, "orient"));
// show it
dojo.style(this.domNode, "opacity", 0);
this.fadeIn.play();
this.isShowingNow = true;
this.aroundNode = aroundNode;
},
+ orient: function(/* DomNode */ node, /* String */ aroundCorner, /* String */ tooltipCorner){
+ // summary:
+ // Private function to set CSS for tooltip node based on which position it's in.
+ // This is called by the dijit popup code.
+ // tags:
+ // protected
+
+ node.className = "dijitTooltip " +
+ {
+ "BL-TL": "dijitTooltipBelow dijitTooltipABLeft",
+ "TL-BL": "dijitTooltipAbove dijitTooltipABLeft",
+ "BR-TR": "dijitTooltipBelow dijitTooltipABRight",
+ "TR-BR": "dijitTooltipAbove dijitTooltipABRight",
+ "BR-BL": "dijitTooltipRight",
+ "BL-BR": "dijitTooltipLeft"
+ }[aroundCorner + "-" + tooltipCorner];
+ },
+
_onShow: function(){
+ // summary:
+ // Called at end of fade-in operation
+ // tags:
+ // protected
if(dojo.isIE){
// the arrow won't show up on a node w/an opacity filter
this.domNode.style.filter="";
}
},
hide: function(aroundNode){
- // summary: hide the tooltip
- if(!this.aroundNode || this.aroundNode !== aroundNode){
- return;
- }
- if(this._onDeck){
+ // summary:
+ // Hide the tooltip
+ if(this._onDeck && this._onDeck[1] == aroundNode){
// this hide request is for a show() that hasn't even started yet;
// just cancel the pending show()
this._onDeck=null;
- return;
- }
- this.fadeIn.stop();
- this.isShowingNow = false;
- this.aroundNode = null;
- this.fadeOut.play();
+ }else if(this.aroundNode === aroundNode){
+ // this hide request is for the currently displayed tooltip
+ this.fadeIn.stop();
+ this.isShowingNow = false;
+ this.aroundNode = null;
+ this.fadeOut.play();
+ }else{
+ // just ignore the call, it's for a tooltip that has already been erased
+ }
},
_onHide: function(){
+ // summary:
+ // Called at end of fade-out operation
+ // tags:
+ // protected
+
this.domNode.style.cssText=""; // to position offscreen again
if(this._onDeck){
// a show request has been queued up; do it now
this.show.apply(this, this._onDeck);
this._onDeck=null;
}
}
}
);
-dijit.showTooltip = function(/*String*/ innerHTML, /*DomNode*/ aroundNode){
- // summary:
- // Display tooltip w/specified contents to right specified node
- // (To left if there's no space on the right, or if LTR==right)
+dijit.showTooltip = function(/*String*/ innerHTML, /*DomNode*/ aroundNode, /*String[]?*/ position){
+ // summary:
+ // Display tooltip w/specified contents in specified position.
+ // See description of dijit.Tooltip.defaultPosition for details on position parameter.
+ // If position is not specified then dijit.Tooltip.defaultPosition is used.
if(!dijit._masterTT){ dijit._masterTT = new dijit._MasterTooltip(); }
- return dijit._masterTT.show(innerHTML, aroundNode);
+ return dijit._masterTT.show(innerHTML, aroundNode, position);
};
dijit.hideTooltip = function(aroundNode){
- // summary: hide the tooltip
+ // summary:
+ // Hide the tooltip
if(!dijit._masterTT){ dijit._masterTT = new dijit._MasterTooltip(); }
return dijit._masterTT.hide(aroundNode);
};
dojo.declare(
"dijit.Tooltip",
dijit._Widget,
{
- // summary
+ // summary:
// Pops up a tooltip (a help message) when you hover over a node.
// label: String
// Text to display in the tooltip.
// Specified as innerHTML when creating the widget from markup.
label: "",
// showDelay: Integer
// Number of milliseconds to wait after hovering over/focusing on the object, before
// the tooltip is displayed.
showDelay: 400,
- // connectId: String[]
- // Id(s) of domNodes to attach the tooltip to.
+ // connectId: [const] String[]
+ // Id's of domNodes to attach the tooltip to.
// When user hovers over any of the specified dom nodes, the tooltip will appear.
+ //
+ // Note: Currently connectId can only be specified on initialization, it cannot
+ // be changed via attr('connectId', ...)
+ //
+ // Note: in 2.0 this will be renamed to connectIds for less confusion.
connectId: [],
+ // position: String[]
+ // See description of `dijit.Tooltip.defaultPosition` for details on position parameter.
+ position: [],
+
+ constructor: function(){
+ // Map id's of nodes I'm connected to to a list of the this.connect() handles
+ this._nodeConnectionsById = {};
+ },
+
+ _setConnectIdAttr: function(newIds){
+ for(var oldId in this._nodeConnectionsById){
+ this.removeTarget(oldId);
+ }
+ dojo.forEach(dojo.isArrayLike(newIds) ? newIds : [newIds], this.addTarget, this);
+ },
+
+ _getConnectIdAttr: function(){
+ var ary = [];
+ for(var id in this._nodeConnectionsById){
+ ary.push(id);
+ }
+ return ary;
+ },
+
+ addTarget: function(/*DOMNODE || String*/ id){
+ // summary:
+ // Attach tooltip to specified node, if it's not already connected
+ var node = dojo.byId(id);
+ if(!node){ return; }
+ if(node.id in this._nodeConnectionsById){ return; }//Already connected
+
+ this._nodeConnectionsById[node.id] = [
+ this.connect(node, "onmouseenter", "_onTargetMouseEnter"),
+ this.connect(node, "onmouseleave", "_onTargetMouseLeave"),
+ this.connect(node, "onfocus", "_onTargetFocus"),
+ this.connect(node, "onblur", "_onTargetBlur")
+ ];
+ if(dojo.isIE && !node.style.zoom){//preserve zoom
+ // BiDi workaround
+ node.style.zoom = 1;
+ }
+ },
+
+ removeTarget: function(/*DOMNODE || String*/ node){
+ // summary:
+ // Detach tooltip from specified node
+
+ // map from DOMNode back to plain id string
+ var id = node.id || node;
+
+ if(id in this._nodeConnectionsById){
+ dojo.forEach(this._nodeConnectionsById[id], this.disconnect, this);
+ delete this._nodeConnectionsById[id];
+ }
+ },
+
postCreate: function(){
- if(this.srcNodeRef){
- this.srcNodeRef.style.display = "none";
- }
-
- this._connectNodes = [];
-
- dojo.forEach(this.connectId, function(id) {
- var node = dojo.byId(id);
- if (node) {
- this._connectNodes.push(node);
- dojo.forEach(["onMouseOver", "onMouseOut", "onFocus", "onBlur", "onHover", "onUnHover"], function(event){
- this.connect(node, event.toLowerCase(), "_"+event);
- }, this);
- if(dojo.isIE){
- // BiDi workaround
- node.style.zoom = 1;
- }
- }
- }, this);
- },
-
- _onMouseOver: function(/*Event*/ e){
+ dojo.addClass(this.domNode,"dijitTooltipData");
+ },
+
+ startup: function(){
+ this.inherited(arguments);
+
+ // If this tooltip was created in a template, or for some other reason the specified connectId[s]
+ // didn't exist during the widget's initialization, then connect now.
+ var ids = this.connectId;
+ dojo.forEach(dojo.isArrayLike(ids) ? ids : [ids], this.addTarget, this);
+ },
+
+ _onTargetMouseEnter: function(/*Event*/ e){
+ // summary:
+ // Handler for mouseenter event on the target node
+ // tags:
+ // private
this._onHover(e);
},
- _onMouseOut: function(/*Event*/ e){
- if(dojo.isDescendant(e.relatedTarget, e.target)){
- // false event; just moved from target to target child; ignore.
- return;
- }
+ _onTargetMouseLeave: function(/*Event*/ e){
+ // summary:
+ // Handler for mouseleave event on the target node
+ // tags:
+ // private
this._onUnHover(e);
},
- _onFocus: function(/*Event*/ e){
+ _onTargetFocus: function(/*Event*/ e){
+ // summary:
+ // Handler for focus event on the target node
+ // tags:
+ // private
+
this._focus = true;
this._onHover(e);
},
-
- _onBlur: function(/*Event*/ e){
+
+ _onTargetBlur: function(/*Event*/ e){
+ // summary:
+ // Handler for blur event on the target node
+ // tags:
+ // private
+
this._focus = false;
this._onUnHover(e);
},
_onHover: function(/*Event*/ e){
+ // summary:
+ // Despite the name of this method, it actually handles both hover and focus
+ // events on the target node, setting a timer to show the tooltip.
+ // tags:
+ // private
if(!this._showTimer){
var target = e.target;
this._showTimer = setTimeout(dojo.hitch(this, function(){this.open(target)}), this.showDelay);
}
},
_onUnHover: function(/*Event*/ e){
- // keep a tooltip open if the associated element has focus
+ // summary:
+ // Despite the name of this method, it actually handles both mouseleave and blur
+ // events on the target node, hiding the tooltip.
+ // tags:
+ // private
+
+ // keep a tooltip open if the associated element still has focus (even though the
+ // mouse moved away)
if(this._focus){ return; }
+
if(this._showTimer){
clearTimeout(this._showTimer);
delete this._showTimer;
}
this.close();
},
open: function(/*DomNode*/ target){
- // summary: display the tooltip; usually not called directly.
- target = target || this._connectNodes[0];
- if(!target){ return; }
+ // summary:
+ // Display the tooltip; usually not called directly.
+ // tags:
+ // private
if(this._showTimer){
clearTimeout(this._showTimer);
delete this._showTimer;
}
- dijit.showTooltip(this.label || this.domNode.innerHTML, target);
-
+ dijit.showTooltip(this.label || this.domNode.innerHTML, target, this.position);
+
this._connectNode = target;
+ this.onShow(target, this.position);
},
close: function(){
- // summary: hide the tooltip; usually not called directly.
- dijit.hideTooltip(this._connectNode);
- delete this._connectNode;
+ // summary:
+ // Hide the tooltip or cancel timer for show of tooltip
+ // tags:
+ // private
+
+ if(this._connectNode){
+ // if tooltip is currently shown
+ dijit.hideTooltip(this._connectNode);
+ delete this._connectNode;
+ this.onHide();
+ }
if(this._showTimer){
+ // if tooltip is scheduled to be shown (after a brief delay)
clearTimeout(this._showTimer);
delete this._showTimer;
}
},
+ onShow: function(target, position){
+ // summary:
+ // Called when the tooltip is shown
+ // tags:
+ // callback
+ },
+
+ onHide: function(){
+ // summary:
+ // Called when the tooltip is hidden
+ // tags:
+ // callback
+ },
+
uninitialize: function(){
this.close();
+ this.inherited(arguments);
}
}
);
+// dijit.Tooltip.defaultPosition: String[]
+// This variable controls the position of tooltips, if the position is not specified to
+// the Tooltip widget or *TextBox widget itself. It's an array of strings with the following values:
+//
+// * before: places tooltip to the left of the target node/widget, or to the right in
+// the case of RTL scripts like Hebrew and Arabic
+// * after: places tooltip to the right of the target node/widget, or to the left in
+// the case of RTL scripts like Hebrew and Arabic
+// * above: tooltip goes above target node
+// * below: tooltip goes below target node
+//
+// The list is positions is tried, in order, until a position is found where the tooltip fits
+// within the viewport.
+//
+// Be careful setting this parameter. A value of "above" may work fine until the user scrolls
+// the screen so that there's no room above the target node. Nodes with drop downs, like
+// DropDownButton or FilteringSelect, are especially problematic, in that you need to be sure
+// that the drop down and tooltip don't overlap, even when the viewport is scrolled so that there
+// is only room below (or above) the target node, but not both.
+dijit.Tooltip.defaultPosition = ["after", "before"];
+
+}
+
+if(!dojo._hasResource["dojo.DeferredList"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojo.DeferredList"] = true;
+dojo.provide("dojo.DeferredList");
+dojo.declare("dojo.DeferredList", dojo.Deferred, {
+ constructor: function(/*Array*/ list, /*Boolean?*/ fireOnOneCallback, /*Boolean?*/ fireOnOneErrback, /*Boolean?*/ consumeErrors, /*Function?*/ canceller){
+ // summary:
+ // Provides event handling for a group of Deferred objects.
+ // description:
+ // DeferredList takes an array of existing deferreds and returns a new deferred of its own
+ // this new deferred will typically have its callback fired when all of the deferreds in
+ // the given list have fired their own deferreds. The parameters `fireOnOneCallback` and
+ // fireOnOneErrback, will fire before all the deferreds as appropriate
+ //
+ // list:
+ // The list of deferreds to be synchronizied with this DeferredList
+ // fireOnOneCallback:
+ // Will cause the DeferredLists callback to be fired as soon as any
+ // of the deferreds in its list have been fired instead of waiting until
+ // the entire list has finished
+ // fireonOneErrback:
+ // Will cause the errback to fire upon any of the deferreds errback
+ // canceller:
+ // A deferred canceller function, see dojo.Deferred
+ this.list = list;
+ this.resultList = new Array(this.list.length);
+
+ // Deferred init
+ this.chain = [];
+ this.id = this._nextId();
+ this.fired = -1;
+ this.paused = 0;
+ this.results = [null, null];
+ this.canceller = canceller;
+ this.silentlyCancelled = false;
+
+ if(this.list.length === 0 && !fireOnOneCallback){
+ this.callback(this.resultList);
+ }
+
+ this.finishedCount = 0;
+ this.fireOnOneCallback = fireOnOneCallback;
+ this.fireOnOneErrback = fireOnOneErrback;
+ this.consumeErrors = consumeErrors;
+
+ dojo.forEach(this.list, function(d, index){
+ d.addCallback(this, function(r){ this._cbDeferred(index, true, r); return r; });
+ d.addErrback(this, function(r){ this._cbDeferred(index, false, r); return r; });
+ }, this);
+ },
+
+ _cbDeferred: function(index, succeeded, result){
+ // summary:
+ // The DeferredLists' callback handler
+
+ this.resultList[index] = [succeeded, result]; this.finishedCount += 1;
+ if(this.fired !== 0){
+ if(succeeded && this.fireOnOneCallback){
+ this.callback([index, result]);
+ }else if(!succeeded && this.fireOnOneErrback){
+ this.errback(result);
+ }else if(this.finishedCount == this.list.length){
+ this.callback(this.resultList);
+ }
+ }
+ if(!succeeded && this.consumeErrors){
+ result = null;
+ }
+ return result;
+ },
+
+ gatherResults: function(deferredList){
+ // summary:
+ // Gathers the results of the deferreds for packaging
+ // as the parameters to the Deferred Lists' callback
+
+ var d = new dojo.DeferredList(deferredList, false, true, false);
+ d.addCallback(function(results){
+ var ret = [];
+ dojo.forEach(results, function(result){
+ ret.push(result[1]);
+ });
+ return ret;
+ });
+ return d;
+ }
+});
+
}
if(!dojo._hasResource["dojo.cookie"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo.cookie"] = true;
dojo.provide("dojo.cookie");
+
+
/*=====
-dojo.__cookieProps = function(kwArgs){
- // expires: Date|Number?
- // If a number, seen as the number of days from today. If a date, the
- // date past which the cookie is invalid. If expires is in the past,
- // the cookie will be deleted If expires is left out or is 0, the
- // cookie will expire when the browser closes.
+dojo.__cookieProps = function(){
+ // expires: Date|String|Number?
+ // If a number, the number of days from today at which the cookie
+ // will expire. If a date, the date past which the cookie will expire.
+ // If expires is in the past, the cookie will be deleted.
+ // If expires is omitted or is 0, the cookie will expire when the browser closes. << FIXME: 0 seems to disappear right away? FF3.
// path: String?
// The path to use for the cookie.
// domain: String?
// The domain to use for the cookie.
// secure: Boolean?
// Whether to only send the cookie on secure connections
+ this.expires = expires;
+ this.path = path;
+ this.domain = domain;
+ this.secure = secure;
}
=====*/
dojo.cookie = function(/*String*/name, /*String?*/value, /*dojo.__cookieProps?*/props){
// summary:
// Get or set a cookie.
// description:
- // If you pass in one argument, the the value of the cookie is returned
- //
- // If you pass in two arguments, the cookie value is set to the second
- // argument.
- //
- // If you pass in three arguments, the cookie value is set to the
- // second argument, and the options on the third argument are used for
- // extended properties on the cookie
+ // If one argument is passed, returns the value of the cookie
+ // For two or more arguments, acts as a setter.
// name:
- // The name of the cookie
+ // Name of the cookie
// value:
- // Optional. The value for the cookie.
+ // Value for the cookie
// props:
- // Optional additional properties for the cookie
+ // Properties for the cookie
// example:
// set a cookie with the JSON-serialized contents of an object which
// will expire 5 days from now:
// | dojo.cookie("configObj", dojo.toJson(config), { expires: 5 });
//
// example:
// de-serialize a cookie back into a JavaScript object:
// | var config = dojo.fromJson(dojo.cookie("configObj"));
//
// example:
// delete a cookie:
- // | dojo.cookie("configObj", null);
+ // | dojo.cookie("configObj", null, {expires: -1});
var c = document.cookie;
if(arguments.length == 1){
- var idx = c.lastIndexOf(name+'=');
- if(idx == -1){ return null; }
- var start = idx+name.length+1;
- var end = c.indexOf(';', idx+name.length+1);
- if(end == -1){ end = c.length; }
- return decodeURIComponent(c.substring(start, end));
+ var matches = c.match(new RegExp("(?:^|; )" + dojo.regexp.escapeString(name) + "=([^;]*)"));
+ return matches ? decodeURIComponent(matches[1]) : undefined; // String or undefined
}else{
props = props || {};
- value = encodeURIComponent(value);
- if(typeof(props.expires) == "number"){
+// FIXME: expires=0 seems to disappear right away, not on close? (FF3) Change docs?
+ var exp = props.expires;
+ if(typeof exp == "number"){
var d = new Date();
- d.setTime(d.getTime()+(props.expires*24*60*60*1000));
- props.expires = d;
- }
- document.cookie = name + "=" + value
- + (props.expires ? "; expires=" + props.expires.toUTCString() : "")
- + (props.path ? "; path=" + props.path : "")
- + (props.domain ? "; domain=" + props.domain : "")
- + (props.secure ? "; secure" : "");
- return null;
- }
-};
+ d.setTime(d.getTime() + exp*24*60*60*1000);
+ exp = props.expires = d;
+ }
+ if(exp && exp.toUTCString){ props.expires = exp.toUTCString(); }
+
+ value = encodeURIComponent(value);
+ var updatedCookie = name + "=" + value, propName;
+ for(propName in props){
+ updatedCookie += "; " + propName;
+ var propValue = props[propName];
+ if(propValue !== true){ updatedCookie += "=" + propValue; }
+ }
+ document.cookie = updatedCookie;
+ }
+};
+
+dojo.cookie.isSupported = function(){
+ // summary:
+ // Use to determine if the current browser supports cookies or not.
+ //
+ // Returns true if user allows cookies.
+ // Returns false if user doesn't allow cookies.
+
+ if(!("cookieEnabled" in navigator)){
+ this("__djCookieTest__", "CookiesAllowed");
+ navigator.cookieEnabled = this("__djCookieTest__") == "CookiesAllowed";
+ if(navigator.cookieEnabled){
+ this("__djCookieTest__", "", {expires: -1});
+ }
+ }
+ return navigator.cookieEnabled;
+};
+
+}
+
+if(!dojo._hasResource["dijit.tree.TreeStoreModel"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.tree.TreeStoreModel"] = true;
+dojo.provide("dijit.tree.TreeStoreModel");
+
+dojo.declare(
+ "dijit.tree.TreeStoreModel",
+ null,
+ {
+ // summary:
+ // Implements dijit.Tree.model connecting to a store with a single
+ // root item. Any methods passed into the constructor will override
+ // the ones defined here.
+
+ // store: dojo.data.Store
+ // Underlying store
+ store: null,
+
+ // childrenAttrs: String[]
+ // One or more attribute names (attributes in the dojo.data item) that specify that item's children
+ childrenAttrs: ["children"],
+
+ // newItemIdAttr: String
+ // Name of attribute in the Object passed to newItem() that specifies the id.
+ //
+ // If newItemIdAttr is set then it's used when newItem() is called to see if an
+ // item with the same id already exists, and if so just links to the old item
+ // (so that the old item ends up with two parents).
+ //
+ // Setting this to null or "" will make every drop create a new item.
+ newItemIdAttr: "id",
+
+ // labelAttr: String
+ // If specified, get label for tree node from this attribute, rather
+ // than by calling store.getLabel()
+ labelAttr: "",
+
+ // root: [readonly] dojo.data.Item
+ // Pointer to the root item (read only, not a parameter)
+ root: null,
+
+ // query: anything
+ // Specifies datastore query to return the root item for the tree.
+ // Must only return a single item. Alternately can just pass in pointer
+ // to root item.
+ // example:
+ // | {id:'ROOT'}
+ query: null,
+
+ // deferItemLoadingUntilExpand: Boolean
+ // Setting this to true will cause the TreeStoreModel to defer calling loadItem on nodes
+ // until they are expanded. This allows for lazying loading where only one
+ // loadItem (and generally one network call, consequently) per expansion
+ // (rather than one for each child).
+ // This relies on partial loading of the children items; each children item of a
+ // fully loaded item should contain the label and info about having children.
+ deferItemLoadingUntilExpand: false,
+
+ constructor: function(/* Object */ args){
+ // summary:
+ // Passed the arguments listed above (store, etc)
+ // tags:
+ // private
+
+ dojo.mixin(this, args);
+
+ this.connects = [];
+
+ var store = this.store;
+ if(!store.getFeatures()['dojo.data.api.Identity']){
+ throw new Error("dijit.Tree: store must support dojo.data.Identity");
+ }
+
+ // if the store supports Notification, subscribe to the notification events
+ if(store.getFeatures()['dojo.data.api.Notification']){
+ this.connects = this.connects.concat([
+ dojo.connect(store, "onNew", this, "onNewItem"),
+ dojo.connect(store, "onDelete", this, "onDeleteItem"),
+ dojo.connect(store, "onSet", this, "onSetItem")
+ ]);
+ }
+ },
+
+ destroy: function(){
+ dojo.forEach(this.connects, dojo.disconnect);
+ // TODO: should cancel any in-progress processing of getRoot(), getChildren()
+ },
+
+ // =======================================================================
+ // Methods for traversing hierarchy
+
+ getRoot: function(onItem, onError){
+ // summary:
+ // Calls onItem with the root item for the tree, possibly a fabricated item.
+ // Calls onError on error.
+ if(this.root){
+ onItem(this.root);
+ }else{
+ this.store.fetch({
+ query: this.query,
+ onComplete: dojo.hitch(this, function(items){
+ if(items.length != 1){
+ throw new Error(this.declaredClass + ": query " + dojo.toJson(this.query) + " returned " + items.length +
+ " items, but must return exactly one item");
+ }
+ this.root = items[0];
+ onItem(this.root);
+ }),
+ onError: onError
+ });
+ }
+ },
+
+ mayHaveChildren: function(/*dojo.data.Item*/ item){
+ // summary:
+ // Tells if an item has or may have children. Implementing logic here
+ // avoids showing +/- expando icon for nodes that we know don't have children.
+ // (For efficiency reasons we may not want to check if an element actually
+ // has children until user clicks the expando node)
+ return dojo.some(this.childrenAttrs, function(attr){
+ return this.store.hasAttribute(item, attr);
+ }, this);
+ },
+
+ getChildren: function(/*dojo.data.Item*/ parentItem, /*function(items)*/ onComplete, /*function*/ onError){
+ // summary:
+ // Calls onComplete() with array of child items of given parent item, all loaded.
+
+ var store = this.store;
+ if(!store.isItemLoaded(parentItem)){
+ // The parent is not loaded yet, we must be in deferItemLoadingUntilExpand
+ // mode, so we will load it and just return the children (without loading each
+ // child item)
+ var getChildren = dojo.hitch(this, arguments.callee);
+ store.loadItem({
+ item: parentItem,
+ onItem: function(parentItem){
+ getChildren(parentItem, onComplete, onError);
+ },
+ onError: onError
+ });
+ return;
+ }
+ // get children of specified item
+ var childItems = [];
+ for(var i=0; i<this.childrenAttrs.length; i++){
+ var vals = store.getValues(parentItem, this.childrenAttrs[i]);
+ childItems = childItems.concat(vals);
+ }
+
+ // count how many items need to be loaded
+ var _waitCount = 0;
+ if(!this.deferItemLoadingUntilExpand){
+ dojo.forEach(childItems, function(item){ if(!store.isItemLoaded(item)){ _waitCount++; } });
+ }
+
+ if(_waitCount == 0){
+ // all items are already loaded (or we aren't loading them). proceed...
+ onComplete(childItems);
+ }else{
+ // still waiting for some or all of the items to load
+ var onItem = function onItem(item){
+ if(--_waitCount == 0){
+ // all nodes have been loaded, send them to the tree
+ onComplete(childItems);
+ }
+ }
+ dojo.forEach(childItems, function(item){
+ if(!store.isItemLoaded(item)){
+ store.loadItem({
+ item: item,
+ onItem: onItem,
+ onError: onError
+ });
+ }
+ });
+ }
+ },
+
+ // =======================================================================
+ // Inspecting items
+
+ isItem: function(/* anything */ something){
+ return this.store.isItem(something); // Boolean
+ },
+
+ fetchItemByIdentity: function(/* object */ keywordArgs){
+ this.store.fetchItemByIdentity(keywordArgs);
+ },
+
+ getIdentity: function(/* item */ item){
+ return this.store.getIdentity(item); // Object
+ },
+
+ getLabel: function(/*dojo.data.Item*/ item){
+ // summary:
+ // Get the label for an item
+ if(this.labelAttr){
+ return this.store.getValue(item,this.labelAttr); // String
+ }else{
+ return this.store.getLabel(item); // String
+ }
+ },
+
+ // =======================================================================
+ // Write interface
+
+ newItem: function(/* dojo.dnd.Item */ args, /*Item*/ parent, /*int?*/ insertIndex){
+ // summary:
+ // Creates a new item. See `dojo.data.api.Write` for details on args.
+ // Used in drag & drop when item from external source dropped onto tree.
+ // description:
+ // Developers will need to override this method if new items get added
+ // to parents with multiple children attributes, in order to define which
+ // children attribute points to the new item.
+
+ var pInfo = {parent: parent, attribute: this.childrenAttrs[0], insertIndex: insertIndex};
+
+ if(this.newItemIdAttr && args[this.newItemIdAttr]){
+ // Maybe there's already a corresponding item in the store; if so, reuse it.
+ this.fetchItemByIdentity({identity: args[this.newItemIdAttr], scope: this, onItem: function(item){
+ if(item){
+ // There's already a matching item in store, use it
+ this.pasteItem(item, null, parent, true, insertIndex);
+ }else{
+ // Create new item in the tree, based on the drag source.
+ this.store.newItem(args, pInfo);
+ }
+ }});
+ }else{
+ // [as far as we know] there is no id so we must assume this is a new item
+ this.store.newItem(args, pInfo);
+ }
+ },
+
+ pasteItem: function(/*Item*/ childItem, /*Item*/ oldParentItem, /*Item*/ newParentItem, /*Boolean*/ bCopy, /*int?*/ insertIndex){
+ // summary:
+ // Move or copy an item from one parent item to another.
+ // Used in drag & drop
+ var store = this.store,
+ parentAttr = this.childrenAttrs[0]; // name of "children" attr in parent item
+
+ // remove child from source item, and record the attribute that child occurred in
+ if(oldParentItem){
+ dojo.forEach(this.childrenAttrs, function(attr){
+ if(store.containsValue(oldParentItem, attr, childItem)){
+ if(!bCopy){
+ var values = dojo.filter(store.getValues(oldParentItem, attr), function(x){
+ return x != childItem;
+ });
+ store.setValues(oldParentItem, attr, values);
+ }
+ parentAttr = attr;
+ }
+ });
+ }
+
+ // modify target item's children attribute to include this item
+ if(newParentItem){
+ if(typeof insertIndex == "number"){
+ var childItems = store.getValues(newParentItem, parentAttr);
+ childItems.splice(insertIndex, 0, childItem);
+ store.setValues(newParentItem, parentAttr, childItems);
+ }else{
+ store.setValues(newParentItem, parentAttr,
+ store.getValues(newParentItem, parentAttr).concat(childItem));
+ }
+ }
+ },
+
+ // =======================================================================
+ // Callbacks
+
+ onChange: function(/*dojo.data.Item*/ item){
+ // summary:
+ // Callback whenever an item has changed, so that Tree
+ // can update the label, icon, etc. Note that changes
+ // to an item's children or parent(s) will trigger an
+ // onChildrenChange() so you can ignore those changes here.
+ // tags:
+ // callback
+ },
+
+ onChildrenChange: function(/*dojo.data.Item*/ parent, /*dojo.data.Item[]*/ newChildrenList){
+ // summary:
+ // Callback to do notifications about new, updated, or deleted items.
+ // tags:
+ // callback
+ },
+
+ onDelete: function(/*dojo.data.Item*/ parent, /*dojo.data.Item[]*/ newChildrenList){
+ // summary:
+ // Callback when an item has been deleted.
+ // description:
+ // Note that there will also be an onChildrenChange() callback for the parent
+ // of this item.
+ // tags:
+ // callback
+ },
+
+ // =======================================================================
+ // Events from data store
+
+ onNewItem: function(/* dojo.data.Item */ item, /* Object */ parentInfo){
+ // summary:
+ // Handler for when new items appear in the store, either from a drop operation
+ // or some other way. Updates the tree view (if necessary).
+ // description:
+ // If the new item is a child of an existing item,
+ // calls onChildrenChange() with the new list of children
+ // for that existing item.
+ //
+ // tags:
+ // extension
+
+ // We only care about the new item if it has a parent that corresponds to a TreeNode
+ // we are currently displaying
+ if(!parentInfo){
+ return;
+ }
+
+ // Call onChildrenChange() on parent (ie, existing) item with new list of children
+ // In the common case, the new list of children is simply parentInfo.newValue or
+ // [ parentInfo.newValue ], although if items in the store has multiple
+ // child attributes (see `childrenAttr`), then it's a superset of parentInfo.newValue,
+ // so call getChildren() to be sure to get right answer.
+ this.getChildren(parentInfo.item, dojo.hitch(this, function(children){
+ this.onChildrenChange(parentInfo.item, children);
+ }));
+ },
+
+ onDeleteItem: function(/*Object*/ item){
+ // summary:
+ // Handler for delete notifications from underlying store
+ this.onDelete(item);
+ },
+
+ onSetItem: function(/* item */ item,
+ /* attribute-name-string */ attribute,
+ /* object | array */ oldValue,
+ /* object | array */ newValue){
+ // summary:
+ // Updates the tree view according to changes in the data store.
+ // description:
+ // Handles updates to an item's children by calling onChildrenChange(), and
+ // other updates to an item by calling onChange().
+ //
+ // See `onNewItem` for more details on handling updates to an item's children.
+ // tags:
+ // extension
+
+ if(dojo.indexOf(this.childrenAttrs, attribute) != -1){
+ // item's children list changed
+ this.getChildren(item, dojo.hitch(this, function(children){
+ // See comments in onNewItem() about calling getChildren()
+ this.onChildrenChange(item, children);
+ }));
+ }else{
+ // item's label/icon/etc. changed.
+ this.onChange(item);
+ }
+ }
+ });
+
+
+
+}
+
+if(!dojo._hasResource["dijit.tree.ForestStoreModel"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.tree.ForestStoreModel"] = true;
+dojo.provide("dijit.tree.ForestStoreModel");
+
+
+
+dojo.declare("dijit.tree.ForestStoreModel", dijit.tree.TreeStoreModel, {
+ // summary:
+ // Interface between Tree and a dojo.store that doesn't have a root item,
+ // i.e. has multiple "top level" items.
+ //
+ // description
+ // Use this class to wrap a dojo.store, making all the items matching the specified query
+ // appear as children of a fabricated "root item". If no query is specified then all the
+ // items returned by fetch() on the underlying store become children of the root item.
+ // It allows dijit.Tree to assume a single root item, even if the store doesn't have one.
+
+ // Parameters to constructor
+
+ // rootId: String
+ // ID of fabricated root item
+ rootId: "$root$",
+
+ // rootLabel: String
+ // Label of fabricated root item
+ rootLabel: "ROOT",
+
+ // query: String
+ // Specifies the set of children of the root item.
+ // example:
+ // | {type:'continent'}
+ query: null,
+
+ // End of parameters to constructor
+
+ constructor: function(params){
+ // summary:
+ // Sets up variables, etc.
+ // tags:
+ // private
+
+ // Make dummy root item
+ this.root = {
+ store: this,
+ root: true,
+ id: params.rootId,
+ label: params.rootLabel,
+ children: params.rootChildren // optional param
+ };
+ },
+
+ // =======================================================================
+ // Methods for traversing hierarchy
+
+ mayHaveChildren: function(/*dojo.data.Item*/ item){
+ // summary:
+ // Tells if an item has or may have children. Implementing logic here
+ // avoids showing +/- expando icon for nodes that we know don't have children.
+ // (For efficiency reasons we may not want to check if an element actually
+ // has children until user clicks the expando node)
+ // tags:
+ // extension
+ return item === this.root || this.inherited(arguments);
+ },
+
+ getChildren: function(/*dojo.data.Item*/ parentItem, /*function(items)*/ callback, /*function*/ onError){
+ // summary:
+ // Calls onComplete() with array of child items of given parent item, all loaded.
+ if(parentItem === this.root){
+ if(this.root.children){
+ // already loaded, just return
+ callback(this.root.children);
+ }else{
+ this.store.fetch({
+ query: this.query,
+ onComplete: dojo.hitch(this, function(items){
+ this.root.children = items;
+ callback(items);
+ }),
+ onError: onError
+ });
+ }
+ }else{
+ this.inherited(arguments);
+ }
+ },
+
+ // =======================================================================
+ // Inspecting items
+
+ isItem: function(/* anything */ something){
+ return (something === this.root) ? true : this.inherited(arguments);
+ },
+
+ fetchItemByIdentity: function(/* object */ keywordArgs){
+ if(keywordArgs.identity == this.root.id){
+ var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
+ if(keywordArgs.onItem){
+ keywordArgs.onItem.call(scope, this.root);
+ }
+ }else{
+ this.inherited(arguments);
+ }
+ },
+
+ getIdentity: function(/* item */ item){
+ return (item === this.root) ? this.root.id : this.inherited(arguments);
+ },
+
+ getLabel: function(/* item */ item){
+ return (item === this.root) ? this.root.label : this.inherited(arguments);
+ },
+
+ // =======================================================================
+ // Write interface
+
+ newItem: function(/* dojo.dnd.Item */ args, /*Item*/ parent, /*int?*/ insertIndex){
+ // summary:
+ // Creates a new item. See dojo.data.api.Write for details on args.
+ // Used in drag & drop when item from external source dropped onto tree.
+ if(parent === this.root){
+ this.onNewRootItem(args);
+ return this.store.newItem(args);
+ }else{
+ return this.inherited(arguments);
+ }
+ },
+
+ onNewRootItem: function(args){
+ // summary:
+ // User can override this method to modify a new element that's being
+ // added to the root of the tree, for example to add a flag like root=true
+ },
+
+ pasteItem: function(/*Item*/ childItem, /*Item*/ oldParentItem, /*Item*/ newParentItem, /*Boolean*/ bCopy, /*int?*/ insertIndex){
+ // summary:
+ // Move or copy an item from one parent item to another.
+ // Used in drag & drop
+ if(oldParentItem === this.root){
+ if(!bCopy){
+ // It's onLeaveRoot()'s responsibility to modify the item so it no longer matches
+ // this.query... thus triggering an onChildrenChange() event to notify the Tree
+ // that this element is no longer a child of the root node
+ this.onLeaveRoot(childItem);
+ }
+ }
+ dijit.tree.TreeStoreModel.prototype.pasteItem.call(this, childItem,
+ oldParentItem === this.root ? null : oldParentItem,
+ newParentItem === this.root ? null : newParentItem,
+ bCopy,
+ insertIndex
+ );
+ if(newParentItem === this.root){
+ // It's onAddToRoot()'s responsibility to modify the item so it matches
+ // this.query... thus triggering an onChildrenChange() event to notify the Tree
+ // that this element is now a child of the root node
+ this.onAddToRoot(childItem);
+ }
+ },
+
+ // =======================================================================
+ // Handling for top level children
+
+ onAddToRoot: function(/* item */ item){
+ // summary:
+ // Called when item added to root of tree; user must override this method
+ // to modify the item so that it matches the query for top level items
+ // example:
+ // | store.setValue(item, "root", true);
+ // tags:
+ // extension
+ console.log(this, ": item ", item, " added to root");
+ },
+
+ onLeaveRoot: function(/* item */ item){
+ // summary:
+ // Called when item removed from root of tree; user must override this method
+ // to modify the item so it doesn't match the query for top level items
+ // example:
+ // | store.unsetAttribute(item, "root");
+ // tags:
+ // extension
+ console.log(this, ": item ", item, " removed from root");
+ },
+
+ // =======================================================================
+ // Events from data store
+
+ _requeryTop: function(){
+ // reruns the query for the children of the root node,
+ // sending out an onSet notification if those children have changed
+ var oldChildren = this.root.children || [];
+ this.store.fetch({
+ query: this.query,
+ onComplete: dojo.hitch(this, function(newChildren){
+ this.root.children = newChildren;
+
+ // If the list of children or the order of children has changed...
+ if(oldChildren.length != newChildren.length ||
+ dojo.some(oldChildren, function(item, idx){ return newChildren[idx] != item;})){
+ this.onChildrenChange(this.root, newChildren);
+ }
+ })
+ });
+ },
+
+ onNewItem: function(/* dojo.data.Item */ item, /* Object */ parentInfo){
+ // summary:
+ // Handler for when new items appear in the store. Developers should override this
+ // method to be more efficient based on their app/data.
+ // description:
+ // Note that the default implementation requeries the top level items every time
+ // a new item is created, since any new item could be a top level item (even in
+ // addition to being a child of another item, since items can have multiple parents).
+ //
+ // Developers can override this function to do something more efficient if they can
+ // detect which items are possible top level items (based on the item and the
+ // parentInfo parameters). Often all top level items have parentInfo==null, but
+ // that will depend on which store you use and what your data is like.
+ // tags:
+ // extension
+ this._requeryTop();
+
+ this.inherited(arguments);
+ },
+
+ onDeleteItem: function(/*Object*/ item){
+ // summary:
+ // Handler for delete notifications from underlying store
+
+ // check if this was a child of root, and if so send notification that root's children
+ // have changed
+ if(dojo.indexOf(this.root.children, item) != -1){
+ this._requeryTop();
+ }
+
+ this.inherited(arguments);
+ }
+});
+
+
}
if(!dojo._hasResource["dijit.Tree"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.Tree"] = true;
dojo.provide("dijit.Tree");
+
+
dojo.declare(
"dijit._TreeNode",
[dijit._Widget, dijit._Templated, dijit._Container, dijit._Contained],
{
- // summary
- // Single node within a tree
+ // summary:
+ // Single node within a tree. This class is used internally
+ // by Tree and should not be accessed directly.
+ // tags:
+ // private
// item: dojo.data.Item
// the dojo.data entry this tree represents
- item: null,
-
+ item: null,
+
+ // isTreeNode: [protected] Boolean
+ // Indicates that this is a TreeNode. Used by `dijit.Tree` only,
+ // should not be accessed directly.
isTreeNode: true,
// label: String
// Text of this tree node
label: "",
-
- isExpandable: null, // show expando node
-
+
+ // isExpandable: [private] Boolean
+ // This node has children, so show the expando node (+ sign)
+ isExpandable: null,
+
+ // isExpanded: [readonly] Boolean
+ // This node is currently expanded (ie, opened)
isExpanded: false,
- // state: String
- // dynamic loading-related stuff.
+ // state: [private] String
+ // Dynamic loading-related stuff.
// When an empty folder node appears, it is "UNCHECKED" first,
- // then after dojo.data query it becomes "LOADING" and, finally "LOADED"
+ // then after dojo.data query it becomes "LOADING" and, finally "LOADED"
state: "UNCHECKED",
-
- templateString:"<div class=\"dijitTreeNode dijitTreeExpandLeaf dijitTreeChildrenNo\" waiRole=\"presentation\"\n\t><span dojoAttachPoint=\"expandoNode\" class=\"dijitTreeExpando\" waiRole=\"presentation\"\n\t></span\n\t><span dojoAttachPoint=\"expandoNodeText\" class=\"dijitExpandoText\" waiRole=\"presentation\"\n\t></span\n\t>\n\t<div dojoAttachPoint=\"contentNode\" class=\"dijitTreeContent\" waiRole=\"presentation\">\n\t\t<div dojoAttachPoint=\"iconNode\" class=\"dijitInline dijitTreeIcon\" waiRole=\"presentation\"></div>\n\t\t<span dojoAttachPoint=\"labelNode\" class=\"dijitTreeLabel\" wairole=\"treeitem\" tabindex=\"-1\"></span>\n\t</div>\n</div>\n",
+
+ templateString: dojo.cache("dijit", "templates/TreeNode.html", "<div class=\"dijitTreeNode\" waiRole=\"presentation\"\n\t><div dojoAttachPoint=\"rowNode\" class=\"dijitTreeRow\" waiRole=\"presentation\" dojoAttachEvent=\"onmouseenter:_onMouseEnter, onmouseleave:_onMouseLeave, onclick:_onClick, ondblclick:_onDblClick\"\n\t\t><img src=\"${_blankGif}\" alt=\"\" dojoAttachPoint=\"expandoNode\" class=\"dijitTreeExpando\" waiRole=\"presentation\"\n\t\t><span dojoAttachPoint=\"expandoNodeText\" class=\"dijitExpandoText\" waiRole=\"presentation\"\n\t\t></span\n\t\t><span dojoAttachPoint=\"contentNode\"\n\t\t\tclass=\"dijitTreeContent\" waiRole=\"presentation\">\n\t\t\t<img src=\"${_blankGif}\" alt=\"\" dojoAttachPoint=\"iconNode\" class=\"dijitTreeIcon\" waiRole=\"presentation\"\n\t\t\t><span dojoAttachPoint=\"labelNode\" class=\"dijitTreeLabel\" wairole=\"treeitem\" tabindex=\"-1\" waiState=\"selected-false\" dojoAttachEvent=\"onfocus:_onLabelFocus, onblur:_onLabelBlur\"></span>\n\t\t</span\n\t></div>\n\t<div dojoAttachPoint=\"containerNode\" class=\"dijitTreeContainer\" waiRole=\"presentation\" style=\"display: none;\"></div>\n</div>\n"),
+
+ attributeMap: dojo.delegate(dijit._Widget.prototype.attributeMap, {
+ label: {node: "labelNode", type: "innerText"},
+ tooltip: {node: "rowNode", type: "attribute", attribute: "title"}
+ }),
postCreate: function(){
- // set label, escaping special characters
- this.setLabelNode(this.label);
-
- // set expand icon for leaf
+ // set expand icon for leaf
this._setExpando();
// set icon and label class based on item
this._updateItemClasses(this.item);
if(this.isExpandable){
dijit.setWaiState(this.labelNode, "expanded", this.isExpanded);
}
},
+ _setIndentAttr: function(indent){
+ // summary:
+ // Tell this node how many levels it should be indented
+ // description:
+ // 0 for top level nodes, 1 for their children, 2 for their
+ // grandchildren, etc.
+ this.indent = indent;
+
+ // Math.max() is to prevent negative padding on hidden root node (when indent == -1)
+ var pixels = (Math.max(indent, 0) * this.tree._nodePixelIndent) + "px";
+
+ dojo.style(this.domNode, "backgroundPosition", pixels + " 0px");
+ dojo.style(this.rowNode, dojo._isBodyLtr() ? "paddingLeft" : "paddingRight", pixels);
+
+ dojo.forEach(this.getChildren(), function(child){
+ child.attr("indent", indent+1);
+ });
+ },
+
markProcessing: function(){
- // summary: visually denote that tree is loading data, etc.
+ // summary:
+ // Visually denote that tree is loading data, etc.
+ // tags:
+ // private
this.state = "LOADING";
- this._setExpando(true);
+ this._setExpando(true);
},
unmarkProcessing: function(){
- // summary: clear markup from markProcessing() call
- this._setExpando(false);
+ // summary:
+ // Clear markup from markProcessing() call
+ // tags:
+ // private
+ this._setExpando(false);
},
_updateItemClasses: function(item){
- // summary: set appropriate CSS classes for item (used to allow for item updates to change respective CSS)
- this.iconNode.className = "dijitInline dijitTreeIcon " + this.tree.getIconClass(item);
- this.labelNode.className = "dijitTreeLabel " + this.tree.getLabelClass(item);
- },
-
+ // summary:
+ // Set appropriate CSS classes for icon and label dom node
+ // (used to allow for item updates to change respective CSS)
+ // tags:
+ // private
+ var tree = this.tree, model = tree.model;
+ if(tree._v10Compat && item === model.root){
+ // For back-compat with 1.0, need to use null to specify root item (TODO: remove in 2.0)
+ item = null;
+ }
+ this._applyClassAndStyle(item, "icon", "Icon");
+ this._applyClassAndStyle(item, "label", "Label");
+ this._applyClassAndStyle(item, "row", "Row");
+ },
+
+ _applyClassAndStyle: function(item, lower, upper){
+ // summary:
+ // Set the appropriate CSS classes and styles for labels, icons and rows.
+ //
+ // item:
+ // The data item.
+ //
+ // lower:
+ // The lower case attribute to use, e.g. 'icon', 'label' or 'row'.
+ //
+ // upper:
+ // The upper case attribute to use, e.g. 'Icon', 'Label' or 'Row'.
+ //
+ // tags:
+ // private
+
+ var clsName = "_" + lower + "Class";
+ var nodeName = lower + "Node";
+
+ if(this[clsName]){
+ dojo.removeClass(this[nodeName], this[clsName]);
+ }
+ this[clsName] = this.tree["get" + upper + "Class"](item, this.isExpanded);
+ if(this[clsName]){
+ dojo.addClass(this[nodeName], this[clsName]);
+ }
+ dojo.style(this[nodeName], this.tree["get" + upper + "Style"](item, this.isExpanded) || {});
+ },
+
_updateLayout: function(){
- // summary: set appropriate CSS classes for this.domNode
+ // summary:
+ // Set appropriate CSS classes for this.domNode
+ // tags:
+ // private
var parent = this.getParent();
- if(parent && parent.isTree && parent._hideRoot){
+ if(!parent || parent.rowNode.style.display == "none"){
/* if we are hiding the root node then make every first level child look like a root node */
dojo.addClass(this.domNode, "dijitTreeIsRoot");
}else{
dojo.toggleClass(this.domNode, "dijitTreeIsLast", !this.getNextSibling());
}
},
_setExpando: function(/*Boolean*/ processing){
- // summary: set the right image for the expando node
+ // summary:
+ // Set the right image for the expando node
+ // tags:
+ // private
+
+ var styles = ["dijitTreeExpandoLoading", "dijitTreeExpandoOpened",
+ "dijitTreeExpandoClosed", "dijitTreeExpandoLeaf"],
+ _a11yStates = ["*","-","+","*"],
+ idx = processing ? 0 : (this.isExpandable ? (this.isExpanded ? 1 : 2) : 3);
// apply the appropriate class to the expando node
- var styles = ["dijitTreeExpandoLoading", "dijitTreeExpandoOpened",
- "dijitTreeExpandoClosed", "dijitTreeExpandoLeaf"];
- var idx = processing ? 0 : (this.isExpandable ? (this.isExpanded ? 1 : 2) : 3);
- dojo.forEach(styles,
- function(s){
- dojo.removeClass(this.expandoNode, s);
- }, this
- );
+ dojo.removeClass(this.expandoNode, styles);
dojo.addClass(this.expandoNode, styles[idx]);
// provide a non-image based indicator for images-off mode
- this.expandoNodeText.innerHTML =
- processing ? "*" :
- (this.isExpandable ?
- (this.isExpanded ? "-" : "+") : "*");
- },
+ this.expandoNodeText.innerHTML = _a11yStates[idx];
+
+ },
expand: function(){
- // summary: show my children
- if(this.isExpanded){ return; }
+ // summary:
+ // Show my children
+ // returns:
+ // Deferred that fires when expansion is complete
+
+ // If there's already an expand in progress or we are already expanded, just return
+ if(this._expandDeferred){
+ return this._expandDeferred; // dojo.Deferred
+ }
+
// cancel in progress collapse operation
- if(this._wipeOut.status() == "playing"){
- this._wipeOut.stop();
- }
-
+ this._wipeOut && this._wipeOut.stop();
+
+ // All the state information for when a node is expanded, maybe this should be
+ // set when the animation completes instead
this.isExpanded = true;
dijit.setWaiState(this.labelNode, "expanded", "true");
dijit.setWaiRole(this.containerNode, "group");
-
+ dojo.addClass(this.contentNode,'dijitTreeContentExpanded');
this._setExpando();
-
- this._wipeIn.play();
- },
-
- collapse: function(){
+ this._updateItemClasses(this.item);
+ if(this == this.tree.rootNode){
+ dijit.setWaiState(this.tree.domNode, "expanded", "true");
+ }
+
+ var def,
+ wipeIn = dojo.fx.wipeIn({
+ node: this.containerNode, duration: dijit.defaultDuration,
+ onEnd: function(){
+ def.callback(true);
+ }
+ });
+
+ // Deferred that fires when expand is complete
+ def = (this._expandDeferred = new dojo.Deferred(function(){
+ // Canceller
+ wipeIn.stop();
+ }));
+
+ wipeIn.play();
+
+ return def; // dojo.Deferred
+ },
+
+ collapse: function(){
+ // summary:
+ // Collapse this node (if it's expanded)
+
if(!this.isExpanded){ return; }
// cancel in progress expand operation
- if(this._wipeIn.status() == "playing"){
- this._wipeIn.stop();
+ if(this._expandDeferred){
+ this._expandDeferred.cancel();
+ delete this._expandDeferred;
}
this.isExpanded = false;
dijit.setWaiState(this.labelNode, "expanded", "false");
+ if(this == this.tree.rootNode){
+ dijit.setWaiState(this.tree.domNode, "expanded", "false");
+ }
+ dojo.removeClass(this.contentNode,'dijitTreeContentExpanded');
this._setExpando();
-
+ this._updateItemClasses(this.item);
+
+ if(!this._wipeOut){
+ this._wipeOut = dojo.fx.wipeOut({
+ node: this.containerNode, duration: dijit.defaultDuration
+ });
+ }
this._wipeOut.play();
},
- setLabelNode: function(label){
- this.labelNode.innerHTML="";
- this.labelNode.appendChild(document.createTextNode(label));
- },
-
- _setChildren: function(/* Object[] */ childrenArray){
- // summary:
- // Sets the children of this node.
- // Sets this.isExpandable based on whether or not there are children
- // Takes array of objects like: {label: ...} (_TreeNode options basically)
- // See parameters of _TreeNode for details.
-
- this.destroyDescendants();
+ // indent: Integer
+ // Levels from this node to the root node
+ indent: 0,
+
+ setChildItems: function(/* Object[] */ items){
+ // summary:
+ // Sets the child items of this node, removing/adding nodes
+ // from current children to match specified items[] array.
+ // Also, if this.persist == true, expands any children that were previously
+ // opened.
+ // returns:
+ // Deferred object that fires after all previously opened children
+ // have been expanded again (or fires instantly if there are no such children).
+
+ var tree = this.tree,
+ model = tree.model,
+ defs = []; // list of deferreds that need to fire before I am complete
+
+
+ // Orphan all my existing children.
+ // If items contains some of the same items as before then we will reattach them.
+ // Don't call this.removeChild() because that will collapse the tree etc.
+ this.getChildren().forEach(function(child){
+ dijit._Container.prototype.removeChild.call(this, child);
+ }, this);
this.state = "LOADED";
- var nodeMap= {};
- if(childrenArray && childrenArray.length > 0){
+
+ if(items && items.length > 0){
this.isExpandable = true;
- if(!this.containerNode){ // maybe this node was unfolderized and still has container
- this.containerNode = this.tree.containerNodeTemplate.cloneNode(true);
- this.domNode.appendChild(this.containerNode);
- }
-
- // Create _TreeNode widget for each specified tree node
- dojo.forEach(childrenArray, function(childParams){
- var child = new dijit._TreeNode(dojo.mixin({
- tree: this.tree,
- label: this.tree.getLabel(childParams.item)
- }, childParams));
- this.addChild(child);
- var identity = this.tree.store.getIdentity(childParams.item);
- nodeMap[identity] = child;
- if(this.tree.persist){
- if(this.tree._openedItemIds[identity]){
- this.tree._expandNode(child);
- }
+
+ // Create _TreeNode widget for each specified tree node, unless one already
+ // exists and isn't being used (presumably it's from a DnD move and was recently
+ // released
+ dojo.forEach(items, function(item){
+ var id = model.getIdentity(item),
+ existingNodes = tree._itemNodesMap[id],
+ node;
+ if(existingNodes){
+ for(var i=0;i<existingNodes.length;i++){
+ if(existingNodes[i] && !existingNodes[i].getParent()){
+ node = existingNodes[i];
+ node.attr('indent', this.indent+1);
+ break;
+ }
+ }
+ }
+ if(!node){
+ node = this.tree._createTreeNode({
+ item: item,
+ tree: tree,
+ isExpandable: model.mayHaveChildren(item),
+ label: tree.getLabel(item),
+ tooltip: tree.getTooltip(item),
+ indent: this.indent + 1
+ });
+ if(existingNodes){
+ existingNodes.push(node);
+ }else{
+ tree._itemNodesMap[id] = [node];
+ }
+ }
+ this.addChild(node);
+
+ // If node was previously opened then open it again now (this may trigger
+ // more data store accesses, recursively)
+ if(this.tree.autoExpand || this.tree._state(item)){
+ defs.push(tree._expandNode(node));
}
}, this);
// note that updateLayout() needs to be called on each child after
// _all_ the children exist
dojo.forEach(this.getChildren(), function(child, idx){
child._updateLayout();
});
}else{
this.isExpandable=false;
}
if(this._setExpando){
- // change expando to/form dot or + icon, as appropriate
+ // change expando to/from dot or + icon, as appropriate
this._setExpando(false);
}
- if(this.isTree && this._hideRoot){
- // put first child in tab index if one exists.
- var fc = this.getChildren()[0];
- var tabnode = fc ? fc.labelNode : this.domNode;
- tabnode.setAttribute("tabIndex", "0");
- }
-
- // create animations for showing/hiding the children (if children exist)
- if(this.containerNode && !this._wipeIn){
- this._wipeIn = dojo.fx.wipeIn({node: this.containerNode, duration: 150});
- this._wipeOut = dojo.fx.wipeOut({node: this.containerNode, duration: 150});
- }
-
- return nodeMap;
- },
-
- _addChildren: function(/* object[] */ childrenArray){
- // summary:
- // adds the children to this node.
- // Takes array of objects like: {label: ...} (_TreeNode options basically)
-
- // See parameters of _TreeNode for details.
- var nodeMap = {};
- if(childrenArray && childrenArray.length > 0){
- dojo.forEach(childrenArray, function(childParams){
- var child = new dijit._TreeNode(
- dojo.mixin({
- tree: this.tree,
- label: this.tree.getLabel(childParams.item)
- }, childParams)
- );
- this.addChild(child);
- nodeMap[this.tree.store.getIdentity(childParams.item)] = child;
- }, this);
-
- dojo.forEach(this.getChildren(), function(child, idx){
- child._updateLayout();
- });
- }
-
- return nodeMap;
- },
-
- deleteNode: function(/* treeNode */ node){
- node.destroy();
-
- var children = this.getChildren();
+ // On initial tree show, make the selected TreeNode as either the root node of the tree,
+ // or the first child, if the root node is hidden
+ if(this == tree.rootNode){
+ var fc = this.tree.showRoot ? this : this.getChildren()[0];
+ if(fc){
+ fc.setSelected(true);
+ tree.lastFocused = fc;
+ }else{
+ // fallback: no nodes in tree so focus on Tree <div> itself
+ tree.domNode.setAttribute("tabIndex", "0");
+ }
+ }
+
+ return new dojo.DeferredList(defs); // dojo.Deferred
+ },
+
+ removeChild: function(/* treeNode */ node){
+ this.inherited(arguments);
+
+ var children = this.getChildren();
if(children.length == 0){
this.isExpandable = false;
this.collapse();
}
dojo.forEach(children, function(child){
child._updateLayout();
});
},
makeExpandable: function(){
- //summary
+ // summary:
// if this node wasn't already showing the expando node,
// turn it into one and call _setExpando()
+
+ // TODO: hmm this isn't called from anywhere, maybe should remove it for 2.0
+
this.isExpandable = true;
this._setExpando(false);
+ },
+
+ _onLabelFocus: function(evt){
+ // summary:
+ // Called when this node is focused (possibly programatically)
+ // tags:
+ // private
+ dojo.addClass(this.labelNode, "dijitTreeLabelFocused");
+ this.tree._onNodeFocus(this);
+ },
+
+ _onLabelBlur: function(evt){
+ // summary:
+ // Called when focus was moved away from this node, either to
+ // another TreeNode or away from the Tree entirely.
+ // Note that we aren't using _onFocus/_onBlur builtin to dijit
+ // because _onBlur() isn't called when focus is moved to my child TreeNode.
+ // tags:
+ // private
+ dojo.removeClass(this.labelNode, "dijitTreeLabelFocused");
+ },
+
+ setSelected: function(/*Boolean*/ selected){
+ // summary:
+ // A Tree has a (single) currently selected node.
+ // Mark that this node is/isn't that currently selected node.
+ // description:
+ // In particular, setting a node as selected involves setting tabIndex
+ // so that when user tabs to the tree, focus will go to that node (only).
+ var labelNode = this.labelNode;
+ labelNode.setAttribute("tabIndex", selected ? "0" : "-1");
+ dijit.setWaiState(labelNode, "selected", selected);
+ dojo.toggleClass(this.rowNode, "dijitTreeNodeSelected", selected);
+ },
+
+ _onClick: function(evt){
+ // summary:
+ // Handler for onclick event on a node
+ // tags:
+ // private
+ this.tree._onClick(this, evt);
+ },
+ _onDblClick: function(evt){
+ // summary:
+ // Handler for ondblclick event on a node
+ // tags:
+ // private
+ this.tree._onDblClick(this, evt);
+ },
+
+ _onMouseEnter: function(evt){
+ // summary:
+ // Handler for onmouseenter event on a node
+ // tags:
+ // private
+ dojo.addClass(this.rowNode, "dijitTreeNodeHover");
+ this.tree._onNodeMouseEnter(this, evt);
+ },
+
+ _onMouseLeave: function(evt){
+ // summary:
+ // Handler for onmouseenter event on a node
+ // tags:
+ // private
+ dojo.removeClass(this.rowNode, "dijitTreeNodeHover");
+ this.tree._onNodeMouseLeave(this, evt);
}
});
dojo.declare(
"dijit.Tree",
- dijit._TreeNode,
+ [dijit._Widget, dijit._Templated],
{
- // summary
- // This widget displays hierarchical data from a store. A query is specified
- // to get the "top level children" from a data store, and then those items are
- // queried for their children and so on (but lazily, as the user clicks the expand node).
- //
- // Thus in the default mode of operation this widget is technically a forest, not a tree,
- // in that there can be multiple "top level children". However, if you specify label,
- // then a special top level node (not corresponding to any item in the datastore) is
- // created, to father all the top level children.
-
- // store: String||dojo.data.Store
- // The store to get data to display in the tree
+ // summary:
+ // This widget displays hierarchical data from a store.
+
+ // store: [deprecated] String||dojo.data.Store
+ // Deprecated. Use "model" parameter instead.
+ // The store to get data to display in the tree.
store: null,
- // query: String
- // query to get top level node(s) of tree (ex: {type:'continent'})
+ // model: dijit.Tree.model
+ // Interface to read tree data, get notifications of changes to tree data,
+ // and for handling drop operations (i.e drag and drop onto the tree)
+ model: null,
+
+ // query: [deprecated] anything
+ // Deprecated. User should specify query to the model directly instead.
+ // Specifies datastore query to return the root item or top items for the tree.
query: null,
- // childrenAttr: String
- // one ore more attributes that holds children of a tree node
+ // label: [deprecated] String
+ // Deprecated. Use dijit.tree.ForestStoreModel directly instead.
+ // Used in conjunction with query parameter.
+ // If a query is specified (rather than a root node id), and a label is also specified,
+ // then a fake root node is created and displayed, with this label.
+ label: "",
+
+ // showRoot: [const] Boolean
+ // Should the root node be displayed, or hidden?
+ showRoot: true,
+
+ // childrenAttr: [deprecated] String[]
+ // Deprecated. This information should be specified in the model.
+ // One ore more attributes that holds children of a tree node
childrenAttr: ["children"],
- templateString:"<div class=\"dijitTreeContainer\" style=\"\" waiRole=\"tree\"\n\tdojoAttachEvent=\"onclick:_onClick,onkeypress:_onKeyPress\">\n\t<div class=\"dijitTreeNode dijitTreeIsRoot dijitTreeExpandLeaf dijitTreeChildrenNo\" waiRole=\"presentation\"\n\t\tdojoAttachPoint=\"rowNode\"\n\t\t><span dojoAttachPoint=\"expandoNode\" class=\"dijitTreeExpando\" waiRole=\"presentation\"\n\t\t></span\n\t\t><span dojoAttachPoint=\"expandoNodeText\" class=\"dijitExpandoText\" waiRole=\"presentation\"\n\t\t></span\n\t\t>\n\t\t<div dojoAttachPoint=\"contentNode\" class=\"dijitTreeContent\" waiRole=\"presentation\">\n\t\t\t<div dojoAttachPoint=\"iconNode\" class=\"dijitInline dijitTreeIcon\" waiRole=\"presentation\"></div>\n\t\t\t<span dojoAttachPoint=\"labelNode\" class=\"dijitTreeLabel\" wairole=\"treeitem\" tabindex=\"0\"></span>\n\t\t</div>\n\t</div>\n</div>\n",
-
- isExpandable: true,
-
- isTree: true,
+ // path: String[] or Item[]
+ // Full path from rootNode to selected node expressed as array of items or array of ids.
+ path: [],
+
+ // selectedItem: [readonly] Item
+ // The currently selected item in this tree.
+ // This property can only be set (via attr('selectedItem', ...)) when that item is already
+ // visible in the tree. (I.e. the tree has already been expanded to show that node.)
+ // Should generally use `path` attribute to set the selected item instead.
+ selectedItem: null,
+
+ // openOnClick: Boolean
+ // If true, clicking a folder node's label will open it, rather than calling onClick()
+ openOnClick: false,
+
+ // openOnDblClick: Boolean
+ // If true, double-clicking a folder node's label will open it, rather than calling onDblClick()
+ openOnDblClick: false,
+
+ templateString: dojo.cache("dijit", "templates/Tree.html", "<div class=\"dijitTree dijitTreeContainer\" waiRole=\"tree\"\n\tdojoAttachEvent=\"onkeypress:_onKeyPress\">\n\t<div class=\"dijitInline dijitTreeIndent\" style=\"position: absolute; top: -9999px\" dojoAttachPoint=\"indentDetector\"></div>\n</div>\n"),
// persist: Boolean
- // enables/disables use of cookies for state saving.
+ // Enables/disables use of cookies for state saving.
persist: true,
-
- // dndController: String
- // class name to use as as the dnd controller
+
+ // autoExpand: Boolean
+ // Fully expand the tree on load. Overrides `persist`
+ autoExpand: false,
+
+ // dndController: [protected] String
+ // Class name to use as as the dnd controller. Specifying this class enables DnD.
+ // Generally you should specify this as "dijit.tree.dndSource".
dndController: null,
- //parameters to pull off of the tree and pass on to the dndController as its params
- dndParams: ["onDndDrop","itemCreator","onDndCancel","checkAcceptance", "checkItemAcceptance"],
+ // parameters to pull off of the tree and pass on to the dndController as its params
+ dndParams: ["onDndDrop","itemCreator","onDndCancel","checkAcceptance", "checkItemAcceptance", "dragThreshold", "betweenThreshold"],
//declare the above items so they can be pulled from the tree's markup
- onDndDrop:null,
- itemCreator:null,
- onDndCancel:null,
- checkAcceptance:null,
- checkItemAcceptance:null,
+
+ // onDndDrop: [protected] Function
+ // Parameter to dndController, see `dijit.tree.dndSource.onDndDrop`.
+ // Generally this doesn't need to be set.
+ onDndDrop: null,
+
+ /*=====
+ itemCreator: function(nodes, target, source){
+ // summary:
+ // Returns objects passed to `Tree.model.newItem()` based on DnD nodes
+ // dropped onto the tree. Developer must override this method to enable
+ // dropping from external sources onto this Tree, unless the Tree.model's items
+ // happen to look like {id: 123, name: "Apple" } with no other attributes.
+ // description:
+ // For each node in nodes[], which came from source, create a hash of name/value
+ // pairs to be passed to Tree.model.newItem(). Returns array of those hashes.
+ // nodes: DomNode[]
+ // The DOMNodes dragged from the source container
+ // target: DomNode
+ // The target TreeNode.rowNode
+ // source: dojo.dnd.Source
+ // The source container the nodes were dragged from, perhaps another Tree or a plain dojo.dnd.Source
+ // returns: Object[]
+ // Array of name/value hashes for each new item to be added to the Tree, like:
+ // | [
+ // | { id: 123, label: "apple", foo: "bar" },
+ // | { id: 456, label: "pear", zaz: "bam" }
+ // | ]
+ // tags:
+ // extension
+ return [{}];
+ },
+ =====*/
+ itemCreator: null,
+
+ // onDndCancel: [protected] Function
+ // Parameter to dndController, see `dijit.tree.dndSource.onDndCancel`.
+ // Generally this doesn't need to be set.
+ onDndCancel: null,
+
+/*=====
+ checkAcceptance: function(source, nodes){
+ // summary:
+ // Checks if the Tree itself can accept nodes from this source
+ // source: dijit.tree._dndSource
+ // The source which provides items
+ // nodes: DOMNode[]
+ // Array of DOM nodes corresponding to nodes being dropped, dijitTreeRow nodes if
+ // source is a dijit.Tree.
+ // tags:
+ // extension
+ return true; // Boolean
+ },
+=====*/
+ checkAcceptance: null,
+
+/*=====
+ checkItemAcceptance: function(target, source, position){
+ // summary:
+ // Stub function to be overridden if one wants to check for the ability to drop at the node/item level
+ // description:
+ // In the base case, this is called to check if target can become a child of source.
+ // When betweenThreshold is set, position="before" or "after" means that we
+ // are asking if the source node can be dropped before/after the target node.
+ // target: DOMNode
+ // The dijitTreeRoot DOM node inside of the TreeNode that we are dropping on to
+ // Use dijit.getEnclosingWidget(target) to get the TreeNode.
+ // source: dijit.tree.dndSource
+ // The (set of) nodes we are dropping
+ // position: String
+ // "over", "before", or "after"
+ // tags:
+ // extension
+ return true; // Boolean
+ },
+=====*/
+ checkItemAcceptance: null,
+
+ // dragThreshold: Integer
+ // Number of pixels mouse moves before it's considered the start of a drag operation
+ dragThreshold: 5,
+
+ // betweenThreshold: Integer
+ // Set to a positive value to allow drag and drop "between" nodes.
+ //
+ // If during DnD mouse is over a (target) node but less than betweenThreshold
+ // pixels from the bottom edge, dropping the the dragged node will make it
+ // the next sibling of the target node, rather than the child.
+ //
+ // Similarly, if mouse is over a target node but less that betweenThreshold
+ // pixels from the top edge, dropping the dragged node will make it
+ // the target node's previous sibling rather than the target node's child.
+ betweenThreshold: 0,
+
+ // _nodePixelIndent: Integer
+ // Number of pixels to indent tree nodes (relative to parent node).
+ // Default is 19 but can be overridden by setting CSS class dijitTreeIndent
+ // and calling resize() or startup() on tree after it's in the DOM.
+ _nodePixelIndent: 19,
_publish: function(/*String*/ topicName, /*Object*/ message){
// summary:
// Publish a message for this widget/topic
- dojo.publish(this.id, [dojo.mixin({tree: this, event: topicName}, message||{})]);
+ dojo.publish(this.id, [dojo.mixin({tree: this, event: topicName}, message || {})]);
},
postMixInProperties: function(){
this.tree = this;
- this.lastFocused = this.labelNode;
-
- this._itemNodeMap={};
-
- this._hideRoot = !this.label;
-
- if(!this.store.getFeatures()['dojo.data.api.Identity']){
- throw new Error("dijit.tree requires access to a store supporting the dojo.data Identity api");
- }
+
+ this._itemNodesMap={};
if(!this.cookieName){
this.cookieName = this.id + "SaveStateCookie";
}
- // if the store supports Notification, subscribe to the notification events
- if(this.store.getFeatures()['dojo.data.api.Notification']){
- this.connect(this.store, "onNew", "_onNewItem");
- this.connect(this.store, "onDelete", "_onDeleteItem");
- this.connect(this.store, "onSet", "_onSetItem");
- }
+ this._loadDeferred = new dojo.Deferred();
+
+ this.inherited(arguments);
},
postCreate: function(){
- // load in which nodes should be opened automatically
+ this._initState();
+
+ // Create glue between store and Tree, if not specified directly by user
+ if(!this.model){
+ this._store2model();
+ }
+
+ // monitor changes to items
+ this.connect(this.model, "onChange", "_onItemChange");
+ this.connect(this.model, "onChildrenChange", "_onItemChildrenChange");
+ this.connect(this.model, "onDelete", "_onItemDelete");
+
+ this._load();
+
+ this.inherited(arguments);
+
+ if(this.dndController){
+ if(dojo.isString(this.dndController)){
+ this.dndController = dojo.getObject(this.dndController);
+ }
+ var params={};
+ for(var i=0; i<this.dndParams.length;i++){
+ if(this[this.dndParams[i]]){
+ params[this.dndParams[i]] = this[this.dndParams[i]];
+ }
+ }
+ this.dndController = new this.dndController(this, params);
+ }
+ },
+
+ _store2model: function(){
+ // summary:
+ // User specified a store&query rather than model, so create model from store/query
+ this._v10Compat = true;
+ dojo.deprecated("Tree: from version 2.0, should specify a model object rather than a store/query");
+
+ var modelParams = {
+ id: this.id + "_ForestStoreModel",
+ store: this.store,
+ query: this.query,
+ childrenAttrs: this.childrenAttr
+ };
+
+ // Only override the model's mayHaveChildren() method if the user has specified an override
+ if(this.params.mayHaveChildren){
+ modelParams.mayHaveChildren = dojo.hitch(this, "mayHaveChildren");
+ }
+
+ if(this.params.getItemChildren){
+ modelParams.getChildren = dojo.hitch(this, function(item, onComplete, onError){
+ this.getItemChildren((this._v10Compat && item === this.model.root) ? null : item, onComplete, onError);
+ });
+ }
+ this.model = new dijit.tree.ForestStoreModel(modelParams);
+
+ // For backwards compatibility, the visibility of the root node is controlled by
+ // whether or not the user has specified a label
+ this.showRoot = Boolean(this.label);
+ },
+
+ onLoad: function(){
+ // summary:
+ // Called when tree finishes loading and expanding.
+ // description:
+ // If persist == true the loading may encompass many levels of fetches
+ // from the data store, each asynchronous. Waits for all to finish.
+ // tags:
+ // callback
+ },
+
+ _load: function(){
+ // summary:
+ // Initial load of the tree.
+ // Load root node (possibly hidden) and it's children.
+ this.model.getRoot(
+ dojo.hitch(this, function(item){
+ var rn = (this.rootNode = this.tree._createTreeNode({
+ item: item,
+ tree: this,
+ isExpandable: true,
+ label: this.label || this.getLabel(item),
+ indent: this.showRoot ? 0 : -1
+ }));
+ if(!this.showRoot){
+ rn.rowNode.style.display="none";
+ }
+ this.domNode.appendChild(rn.domNode);
+ var identity = this.model.getIdentity(item);
+ if(this._itemNodesMap[identity]){
+ this._itemNodesMap[identity].push(rn);
+ }else{
+ this._itemNodesMap[identity] = [rn];
+ }
+
+ rn._updateLayout(); // sets "dijitTreeIsRoot" CSS classname
+
+ // load top level children and then fire onLoad() event
+ this._expandNode(rn).addCallback(dojo.hitch(this, function(){
+ this._loadDeferred.callback(true);
+ this.onLoad();
+ }));
+ }),
+ function(err){
+ console.error(this, ": error loading root: ", err);
+ }
+ );
+ },
+
+ getNodesByItem: function(/*dojo.data.Item or id*/ item){
+ // summary:
+ // Returns all tree nodes that refer to an item
+ // returns:
+ // Array of tree nodes that refer to passed item
+
+ if(!item){ return []; }
+ var identity = dojo.isString(item) ? item : this.model.getIdentity(item);
+ // return a copy so widget don't get messed up by changes to returned array
+ return [].concat(this._itemNodesMap[identity]);
+ },
+
+ _setSelectedItemAttr: function(/*dojo.data.Item or id*/ item){
+ // summary:
+ // Select a tree node related to passed item.
+ // WARNING: if model use multi-parented items or desired tree node isn't already loaded
+ // behavior is not granted. Use 'path' attr instead for full support.
+ var oldValue = this.attr("selectedItem");
+ var identity = (!item || dojo.isString(item)) ? item : this.model.getIdentity(item);
+ if(identity == oldValue ? this.model.getIdentity(oldValue) : null){ return; }
+ var nodes = this._itemNodesMap[identity];
+ if(nodes && nodes.length){
+ //select the first item
+ this.focusNode(nodes[0]);
+ }else if(this.lastFocused){
+ // Select none so deselect current
+ this.lastFocused.setSelected(false);
+ this.lastFocused = null;
+ }
+ },
+
+ _getSelectedItemAttr: function(){
+ // summary:
+ // Return item related to selected tree node.
+ return this.lastFocused && this.lastFocused.item;
+ },
+
+ _setPathAttr: function(/*Item[] || String[]*/ path){
+ // summary:
+ // Select the tree node identified by passed path.
+ // path:
+ // Array of items or item id's
+
+ if(!path || !path.length){ return; }
+
+ // If this is called during initialization, defer running until Tree has finished loading
+ this._loadDeferred.addCallback(dojo.hitch(this, function(){
+ if(!this.rootNode){
+ console.debug("!this.rootNode");
+ return;
+ }
+ if(path[0] !== this.rootNode.item && (dojo.isString(path[0]) && path[0] != this.model.getIdentity(this.rootNode.item))){
+ console.error(this, ":path[0] doesn't match this.rootNode.item. Maybe you are using the wrong tree.");
+ return;
+ }
+ path.shift();
+
+ var node = this.rootNode;
+
+ function advance(){
+ // summary:
+ // Called when "node" has completed loading and expanding. Pop the next item from the path
+ // (which must be a child of "node") and advance to it, and then recurse.
+
+ // Set item and identity to next item in path (node is pointing to the item that was popped
+ // from the path _last_ time.
+ var item = path.shift(),
+ identity = dojo.isString(item) ? item : this.model.getIdentity(item);
+
+ // Change "node" from previous item in path to the item we just popped from path
+ dojo.some(this._itemNodesMap[identity], function(n){
+ if(n.getParent() == node){
+ node = n;
+ return true;
+ }
+ return false;
+ });
+
+ if(path.length){
+ // Need to do more expanding
+ this._expandNode(node).addCallback(dojo.hitch(this, advance));
+ }else{
+ // Final destination node, select it
+ if(this.lastFocused != node){
+ this.focusNode(node);
+ }
+ }
+ }
+
+ this._expandNode(node).addCallback(dojo.hitch(this, advance));
+ }));
+ },
+
+ _getPathAttr: function(){
+ // summary:
+ // Return an array of items that is the path to selected tree node.
+ if(!this.lastFocused){ return; }
+ var res = [];
+ var treeNode = this.lastFocused;
+ while(treeNode && treeNode !== this.rootNode){
+ res.unshift(treeNode.item);
+ treeNode = treeNode.getParent();
+ }
+ res.unshift(this.rootNode.item);
+ return res;
+ },
+
+ ////////////// Data store related functions //////////////////////
+ // These just get passed to the model; they are here for back-compat
+
+ mayHaveChildren: function(/*dojo.data.Item*/ item){
+ // summary:
+ // Deprecated. This should be specified on the model itself.
+ //
+ // Overridable function to tell if an item has or may have children.
+ // Controls whether or not +/- expando icon is shown.
+ // (For efficiency reasons we may not want to check if an element actually
+ // has children until user clicks the expando node)
+ // tags:
+ // deprecated
+ },
+
+ getItemChildren: function(/*dojo.data.Item*/ parentItem, /*function(items)*/ onComplete){
+ // summary:
+ // Deprecated. This should be specified on the model itself.
+ //
+ // Overridable function that return array of child items of given parent item,
+ // or if parentItem==null then return top items in tree
+ // tags:
+ // deprecated
+ },
+
+ ///////////////////////////////////////////////////////
+ // Functions for converting an item to a TreeNode
+ getLabel: function(/*dojo.data.Item*/ item){
+ // summary:
+ // Overridable function to get the label for a tree node (given the item)
+ // tags:
+ // extension
+ return this.model.getLabel(item); // String
+ },
+
+ getIconClass: function(/*dojo.data.Item*/ item, /*Boolean*/ opened){
+ // summary:
+ // Overridable function to return CSS class name to display icon
+ // tags:
+ // extension
+ return (!item || this.model.mayHaveChildren(item)) ? (opened ? "dijitFolderOpened" : "dijitFolderClosed") : "dijitLeaf"
+ },
+
+ getLabelClass: function(/*dojo.data.Item*/ item, /*Boolean*/ opened){
+ // summary:
+ // Overridable function to return CSS class name to display label
+ // tags:
+ // extension
+ },
+
+ getRowClass: function(/*dojo.data.Item*/ item, /*Boolean*/ opened){
+ // summary:
+ // Overridable function to return CSS class name to display row
+ // tags:
+ // extension
+ },
+
+ getIconStyle: function(/*dojo.data.Item*/ item, /*Boolean*/ opened){
+ // summary:
+ // Overridable function to return CSS styles to display icon
+ // returns:
+ // Object suitable for input to dojo.style() like {backgroundImage: "url(...)"}
+ // tags:
+ // extension
+ },
+
+ getLabelStyle: function(/*dojo.data.Item*/ item, /*Boolean*/ opened){
+ // summary:
+ // Overridable function to return CSS styles to display label
+ // returns:
+ // Object suitable for input to dojo.style() like {color: "red", background: "green"}
+ // tags:
+ // extension
+ },
+
+ getRowStyle: function(/*dojo.data.Item*/ item, /*Boolean*/ opened){
+ // summary:
+ // Overridable function to return CSS styles to display row
+ // returns:
+ // Object suitable for input to dojo.style() like {background-color: "#bbb"}
+ // tags:
+ // extension
+ },
+
+ getTooltip: function(/*dojo.data.Item*/ item){
+ // summary:
+ // Overridable function to get the tooltip for a tree node (given the item)
+ // tags:
+ // extension
+ return ""; // String
+ },
+
+ /////////// Keyboard and Mouse handlers ////////////////////
+
+ _onKeyPress: function(/*Event*/ e){
+ // summary:
+ // Translates keypress events into commands for the controller
+ if(e.altKey){ return; }
+ var dk = dojo.keys;
+ var treeNode = dijit.getEnclosingWidget(e.target);
+ if(!treeNode){ return; }
+
+ var key = e.charOrCode;
+ if(typeof key == "string"){ // handle printables (letter navigation)
+ // Check for key navigation.
+ if(!e.altKey && !e.ctrlKey && !e.shiftKey && !e.metaKey){
+ this._onLetterKeyNav( { node: treeNode, key: key.toLowerCase() } );
+ dojo.stopEvent(e);
+ }
+ }else{ // handle non-printables (arrow keys)
+ // clear record of recent printables (being saved for multi-char letter navigation),
+ // because "a", down-arrow, "b" shouldn't search for "ab"
+ if(this._curSearch){
+ clearTimeout(this._curSearch.timer);
+ delete this._curSearch;
+ }
+
+ var map = this._keyHandlerMap;
+ if(!map){
+ // setup table mapping keys to events
+ map = {};
+ map[dk.ENTER]="_onEnterKey";
+ map[this.isLeftToRight() ? dk.LEFT_ARROW : dk.RIGHT_ARROW]="_onLeftArrow";
+ map[this.isLeftToRight() ? dk.RIGHT_ARROW : dk.LEFT_ARROW]="_onRightArrow";
+ map[dk.UP_ARROW]="_onUpArrow";
+ map[dk.DOWN_ARROW]="_onDownArrow";
+ map[dk.HOME]="_onHomeKey";
+ map[dk.END]="_onEndKey";
+ this._keyHandlerMap = map;
+ }
+ if(this._keyHandlerMap[key]){
+ this[this._keyHandlerMap[key]]( { node: treeNode, item: treeNode.item, evt: e } );
+ dojo.stopEvent(e);
+ }
+ }
+ },
+
+ _onEnterKey: function(/*Object*/ message, /*Event*/ evt){
+ this._publish("execute", { item: message.item, node: message.node } );
+ this.onClick(message.item, message.node, evt);
+ },
+
+ _onDownArrow: function(/*Object*/ message){
+ // summary:
+ // down arrow pressed; get next visible node, set focus there
+ var node = this._getNextNode(message.node);
+ if(node && node.isTreeNode){
+ this.focusNode(node);
+ }
+ },
+
+ _onUpArrow: function(/*Object*/ message){
+ // summary:
+ // Up arrow pressed; move to previous visible node
+
+ var node = message.node;
+
+ // if younger siblings
+ var previousSibling = node.getPreviousSibling();
+ if(previousSibling){
+ node = previousSibling;
+ // if the previous node is expanded, dive in deep
+ while(node.isExpandable && node.isExpanded && node.hasChildren()){
+ // move to the last child
+ var children = node.getChildren();
+ node = children[children.length-1];
+ }
+ }else{
+ // if this is the first child, return the parent
+ // unless the parent is the root of a tree with a hidden root
+ var parent = node.getParent();
+ if(!(!this.showRoot && parent === this.rootNode)){
+ node = parent;
+ }
+ }
+
+ if(node && node.isTreeNode){
+ this.focusNode(node);
+ }
+ },
+
+ _onRightArrow: function(/*Object*/ message){
+ // summary:
+ // Right arrow pressed; go to child node
+ var node = message.node;
+
+ // if not expanded, expand, else move to 1st child
+ if(node.isExpandable && !node.isExpanded){
+ this._expandNode(node);
+ }else if(node.hasChildren()){
+ node = node.getChildren()[0];
+ if(node && node.isTreeNode){
+ this.focusNode(node);
+ }
+ }
+ },
+
+ _onLeftArrow: function(/*Object*/ message){
+ // summary:
+ // Left arrow pressed.
+ // If not collapsed, collapse, else move to parent.
+
+ var node = message.node;
+
+ if(node.isExpandable && node.isExpanded){
+ this._collapseNode(node);
+ }else{
+ var parent = node.getParent();
+ if(parent && parent.isTreeNode && !(!this.showRoot && parent === this.rootNode)){
+ this.focusNode(parent);
+ }
+ }
+ },
+
+ _onHomeKey: function(){
+ // summary:
+ // Home key pressed; get first visible node, and set focus there
+ var node = this._getRootOrFirstNode();
+ if(node){
+ this.focusNode(node);
+ }
+ },
+
+ _onEndKey: function(/*Object*/ message){
+ // summary:
+ // End key pressed; go to last visible node.
+
+ var node = this.rootNode;
+ while(node.isExpanded){
+ var c = node.getChildren();
+ node = c[c.length - 1];
+ }
+
+ if(node && node.isTreeNode){
+ this.focusNode(node);
+ }
+ },
+
+ // multiCharSearchDuration: Number
+ // If multiple characters are typed where each keystroke happens within
+ // multiCharSearchDuration of the previous keystroke,
+ // search for nodes matching all the keystrokes.
+ //
+ // For example, typing "ab" will search for entries starting with
+ // "ab" unless the delay between "a" and "b" is greater than multiCharSearchDuration.
+ multiCharSearchDuration: 250,
+
+ _onLetterKeyNav: function(message){
+ // summary:
+ // Called when user presses a prinatable key; search for node starting with recently typed letters.
+ // message: Object
+ // Like { node: TreeNode, key: 'a' } where key is the key the user pressed.
+
+ // Branch depending on whether this key starts a new search, or modifies an existing search
+ var cs = this._curSearch;
+ if(cs){
+ // We are continuing a search. Ex: user has pressed 'a', and now has pressed
+ // 'b', so we want to search for nodes starting w/"ab".
+ cs.pattern = cs.pattern + message.key;
+ clearTimeout(cs.timer);
+ }else{
+ // We are starting a new search
+ cs = this._curSearch = {
+ pattern: message.key,
+ startNode: message.node
+ };
+ }
+
+ // set/reset timer to forget recent keystrokes
+ var self = this;
+ cs.timer = setTimeout(function(){
+ delete self._curSearch;
+ }, this.multiCharSearchDuration);
+
+ // Navigate to TreeNode matching keystrokes [entered so far].
+ var node = cs.startNode;
+ do{
+ node = this._getNextNode(node);
+ //check for last node, jump to first node if necessary
+ if(!node){
+ node = this._getRootOrFirstNode();
+ }
+ }while(node !== cs.startNode && (node.label.toLowerCase().substr(0, cs.pattern.length) != cs.pattern));
+ if(node && node.isTreeNode){
+ // no need to set focus if back where we started
+ if(node !== cs.startNode){
+ this.focusNode(node);
+ }
+ }
+ },
+
+ _onClick: function(/*TreeNode*/ nodeWidget, /*Event*/ e){
+ // summary:
+ // Translates click events into commands for the controller to process
+
+ var domElement = e.target;
+
+ if( (this.openOnClick && nodeWidget.isExpandable) ||
+ (domElement == nodeWidget.expandoNode || domElement == nodeWidget.expandoNodeText) ){
+ // expando node was clicked, or label of a folder node was clicked; open it
+ if(nodeWidget.isExpandable){
+ this._onExpandoClick({node:nodeWidget});
+ }
+ }else{
+ this._publish("execute", { item: nodeWidget.item, node: nodeWidget, evt: e } );
+ this.onClick(nodeWidget.item, nodeWidget, e);
+ this.focusNode(nodeWidget);
+ }
+ dojo.stopEvent(e);
+ },
+ _onDblClick: function(/*TreeNode*/ nodeWidget, /*Event*/ e){
+ // summary:
+ // Translates double-click events into commands for the controller to process
+
+ var domElement = e.target;
+
+ if( (this.openOnDblClick && nodeWidget.isExpandable) ||
+ (domElement == nodeWidget.expandoNode || domElement == nodeWidget.expandoNodeText) ){
+ // expando node was clicked, or label of a folder node was clicked; open it
+ if(nodeWidget.isExpandable){
+ this._onExpandoClick({node:nodeWidget});
+ }
+ }else{
+ this._publish("execute", { item: nodeWidget.item, node: nodeWidget, evt: e } );
+ this.onDblClick(nodeWidget.item, nodeWidget, e);
+ this.focusNode(nodeWidget);
+ }
+ dojo.stopEvent(e);
+ },
+
+ _onExpandoClick: function(/*Object*/ message){
+ // summary:
+ // User clicked the +/- icon; expand or collapse my children.
+ var node = message.node;
+
+ // If we are collapsing, we might be hiding the currently focused node.
+ // Also, clicking the expando node might have erased focus from the current node.
+ // For simplicity's sake just focus on the node with the expando.
+ this.focusNode(node);
+
+ if(node.isExpanded){
+ this._collapseNode(node);
+ }else{
+ this._expandNode(node);
+ }
+ },
+
+ onClick: function(/* dojo.data */ item, /*TreeNode*/ node, /*Event*/ evt){
+ // summary:
+ // Callback when a tree node is clicked
+ // tags:
+ // callback
+ },
+ onDblClick: function(/* dojo.data */ item, /*TreeNode*/ node, /*Event*/ evt){
+ // summary:
+ // Callback when a tree node is double-clicked
+ // tags:
+ // callback
+ },
+ onOpen: function(/* dojo.data */ item, /*TreeNode*/ node){
+ // summary:
+ // Callback when a node is opened
+ // tags:
+ // callback
+ },
+ onClose: function(/* dojo.data */ item, /*TreeNode*/ node){
+ // summary:
+ // Callback when a node is closed
+ // tags:
+ // callback
+ },
+
+ _getNextNode: function(node){
+ // summary:
+ // Get next visible node
+
+ if(node.isExpandable && node.isExpanded && node.hasChildren()){
+ // if this is an expanded node, get the first child
+ return node.getChildren()[0]; // _TreeNode
+ }else{
+ // find a parent node with a sibling
+ while(node && node.isTreeNode){
+ var returnNode = node.getNextSibling();
+ if(returnNode){
+ return returnNode; // _TreeNode
+ }
+ node = node.getParent();
+ }
+ return null;
+ }
+ },
+
+ _getRootOrFirstNode: function(){
+ // summary:
+ // Get first visible node
+ return this.showRoot ? this.rootNode : this.rootNode.getChildren()[0];
+ },
+
+ _collapseNode: function(/*_TreeNode*/ node){
+ // summary:
+ // Called when the user has requested to collapse the node
+
+ if(node._expandNodeDeferred){
+ delete node._expandNodeDeferred;
+ }
+
+ if(node.isExpandable){
+ if(node.state == "LOADING"){
+ // ignore clicks while we are in the process of loading data
+ return;
+ }
+
+ node.collapse();
+ this.onClose(node.item, node);
+
+ if(node.item){
+ this._state(node.item,false);
+ this._saveState();
+ }
+ }
+ },
+
+ _expandNode: function(/*_TreeNode*/ node, /*Boolean?*/ recursive){
+ // summary:
+ // Called when the user has requested to expand the node
+ // recursive:
+ // Internal flag used when _expandNode() calls itself, don't set.
+ // returns:
+ // Deferred that fires when the node is loaded and opened and (if persist=true) all it's descendants
+ // that were previously opened too
+
+ if(node._expandNodeDeferred && !recursive){
+ // there's already an expand in progress (or completed), so just return
+ return node._expandNodeDeferred; // dojo.Deferred
+ }
+
+ var model = this.model,
+ item = node.item,
+ _this = this;
+
+ switch(node.state){
+ case "UNCHECKED":
+ // need to load all the children, and then expand
+ node.markProcessing();
+
+ // Setup deferred to signal when the load and expand are finished.
+ // Save that deferred in this._expandDeferred as a flag that operation is in progress.
+ var def = (node._expandNodeDeferred = new dojo.Deferred());
+
+ // Get the children
+ model.getChildren(
+ item,
+ function(items){
+ node.unmarkProcessing();
+
+ // Display the children and also start expanding any children that were previously expanded
+ // (if this.persist == true). The returned Deferred will fire when those expansions finish.
+ var scid = node.setChildItems(items);
+
+ // Call _expandNode() again but this time it will just to do the animation (default branch).
+ // The returned Deferred will fire when the animation completes.
+ // TODO: seems like I can avoid recursion and just use a deferred to sequence the events?
+ var ed = _this._expandNode(node, true);
+
+ // After the above two tasks (setChildItems() and recursive _expandNode()) finish,
+ // signal that I am done.
+ scid.addCallback(function(){
+ ed.addCallback(function(){
+ def.callback();
+ })
+ });
+ },
+ function(err){
+ console.error(_this, ": error loading root children: ", err);
+ }
+ );
+ break;
+
+ default: // "LOADED"
+ // data is already loaded; just expand node
+ def = (node._expandNodeDeferred = node.expand());
+
+ this.onOpen(node.item, node);
+
+ if(item){
+ this._state(item, true);
+ this._saveState();
+ }
+ }
+
+ return def; // dojo.Deferred
+ },
+
+ ////////////////// Miscellaneous functions ////////////////
+
+ focusNode: function(/* _tree.Node */ node){
+ // summary:
+ // Focus on the specified node (which must be visible)
+ // tags:
+ // protected
+
+ // set focus so that the label will be voiced using screen readers
+ dijit.focus(node.labelNode);
+ },
+
+ _onNodeFocus: function(/*dijit._Widget*/ node){
+ // summary:
+ // Called when a TreeNode gets focus, either by user clicking
+ // it, or programatically by arrow key handling code.
+ // description:
+ // It marks that the current node is the selected one, and the previously
+ // selected node no longer is.
+
+ if(node){
+ if(node != this.lastFocused && this.lastFocused && !this.lastFocused._destroyed){
+ // mark that the previously selected node is no longer the selected one
+ this.lastFocused.setSelected(false);
+ }
+
+ // mark that the new node is the currently selected one
+ node.setSelected(true);
+ this.lastFocused = node;
+ }
+ },
+
+ _onNodeMouseEnter: function(/*dijit._Widget*/ node){
+ // summary:
+ // Called when mouse is over a node (onmouseenter event)
+ },
+
+ _onNodeMouseLeave: function(/*dijit._Widget*/ node){
+ // summary:
+ // Called when mouse is over a node (onmouseenter event)
+ },
+
+ //////////////// Events from the model //////////////////////////
+
+ _onItemChange: function(/*Item*/ item){
+ // summary:
+ // Processes notification of a change to an item's scalar values like label
+ var model = this.model,
+ identity = model.getIdentity(item),
+ nodes = this._itemNodesMap[identity];
+
+ if(nodes){
+ var self = this;
+ dojo.forEach(nodes,function(node){
+ node.attr({
+ label: self.getLabel(item),
+ tooltip: self.getTooltip(item)
+ });
+ node._updateItemClasses(item);
+ });
+ }
+ },
+
+ _onItemChildrenChange: function(/*dojo.data.Item*/ parent, /*dojo.data.Item[]*/ newChildrenList){
+ // summary:
+ // Processes notification of a change to an item's children
+ var model = this.model,
+ identity = model.getIdentity(parent),
+ parentNodes = this._itemNodesMap[identity];
+
+ if(parentNodes){
+ dojo.forEach(parentNodes,function(parentNode){
+ parentNode.setChildItems(newChildrenList);
+ });
+ }
+ },
+
+ _onItemDelete: function(/*Item*/ item){
+ // summary:
+ // Processes notification of a deletion of an item
+ var model = this.model,
+ identity = model.getIdentity(item),
+ nodes = this._itemNodesMap[identity];
+
+ if(nodes){
+ dojo.forEach(nodes,function(node){
+ var parent = node.getParent();
+ if(parent){
+ // if node has not already been orphaned from a _onSetItem(parent, "children", ..) call...
+ parent.removeChild(node);
+ }
+ node.destroyRecursive();
+ });
+ delete this._itemNodesMap[identity];
+ }
+ },
+
+ /////////////// Miscellaneous funcs
+
+ _initState: function(){
+ // summary:
+ // Load in which nodes should be opened automatically
if(this.persist){
var cookie = dojo.cookie(this.cookieName);
this._openedItemIds = {};
if(cookie){
dojo.forEach(cookie.split(','), function(item){
this._openedItemIds[item] = true;
}, this);
}
}
-
- // make template for container node (we will clone this and insert it into
- // any nodes that have children)
- var div = document.createElement('div');
- div.style.display = 'none';
- div.className = "dijitTreeContainer";
- dijit.setWaiRole(div, "presentation");
- this.containerNodeTemplate = div;
-
- if(this._hideRoot){
- this.rowNode.style.display="none";
- }
-
- this.inherited("postCreate", arguments);
-
- // load top level children
- this._expandNode(this);
-
- if(this.dndController){
- if(dojo.isString(this.dndController)){
- this.dndController= dojo.getObject(this.dndController);
- }
- var params={};
- for (var i=0; i<this.dndParams.length;i++){
- if(this[this.dndParams[i]]){
- params[this.dndParams[i]]=this[this.dndParams[i]];
- }
- }
- this.dndController= new this.dndController(this, params);
- }
-
- this.connect(this.domNode,
- dojo.isIE ? "onactivate" : "onfocus",
- "_onTreeFocus");
- },
-
- ////////////// Data store related functions //////////////////////
-
- mayHaveChildren: function(/*dojo.data.Item*/ item){
- // summary
- // User overridable function to tell if an item has or may have children.
- // Controls whether or not +/- expando icon is shown.
- // (For efficiency reasons we may not want to check if an element has
- // children until user clicks the expando node)
-
- return dojo.some(this.childrenAttr, function(attr){
- return this.store.hasAttribute(item, attr);
- }, this);
- },
-
- getItemChildren: function(/*dojo.data.Item*/ parentItem, /*function(items)*/ onComplete){
- // summary
- // User overridable function that return array of child items of given parent item,
- // or if parentItem==null then return top items in tree
- var store = this.store;
- if(parentItem == null){
- // get top level nodes
- store.fetch({ query: this.query, onComplete: onComplete});
- }else{
- // get children of specified node
- var childItems = [];
- for (var i=0; i<this.childrenAttr.length; i++){
- childItems= childItems.concat(store.getValues(parentItem, this.childrenAttr[i]));
- }
- // count how many items need to be loaded
- var _waitCount = 0;
- dojo.forEach(childItems, function(item){ if(!store.isItemLoaded(item)){ _waitCount++; } });
-
- if(_waitCount == 0){
- // all items are already loaded. proceed..
- onComplete(childItems);
- }else{
- // still waiting for some or all of the items to load
- function onItem(item){
- if(--_waitCount == 0){
- // all nodes have been loaded, send them to the tree
- onComplete(childItems);
- }
- }
- dojo.forEach(childItems, function(item){
- if(!store.isItemLoaded(item)){
- store.loadItem({item: item, onItem: onItem});
- }
- });
- }
- }
- },
-
- getItemParentIdentity: function(/*dojo.data.Item*/ item, /*Object*/ parentInfo){
- // summary
- // User overridable function, to return id of parent (or null if top level).
- // It's called with args from dojo.store.onNew
- return this.store.getIdentity(parentInfo.item); // String
- },
-
- getLabel: function(/*dojo.data.Item*/ item){
- // summary: user overridable function to get the label for a tree node (given the item)
- return this.store.getLabel(item); // String
- },
-
- getIconClass: function(/*dojo.data.Item*/ item){
- // summary: user overridable function to return CSS class name to display icon
- },
-
- getLabelClass: function(/*dojo.data.Item*/ item){
- // summary: user overridable function to return CSS class name to display label
- },
-
- _onLoadAllItems: function(/*_TreeNode*/ node, /*dojo.data.Item[]*/ items){
- // sumary: callback when all the children of a given node have been loaded
- var childParams=dojo.map(items, function(item){
- return {
- item: item,
- isExpandable: this.mayHaveChildren(item)
- };
- }, this);
-
- dojo.mixin(this._itemNodeMap,node._setChildren(childParams));
-
- this._expandNode(node);
- },
-
- /////////// Keyboard and Mouse handlers ////////////////////
-
- _onKeyPress: function(/*Event*/ e){
- // summary: translates keypress events into commands for the controller
- if(e.altKey){ return; }
- var treeNode = dijit.getEnclosingWidget(e.target);
- if(!treeNode){ return; }
-
- // Note: On IE e.keyCode is not 0 for printables so check e.charCode.
- // In dojo charCode is universally 0 for non-printables.
- if(e.charCode){ // handle printables (letter navigation)
- // Check for key navigation.
- var navKey = e.charCode;
- if(!e.altKey && !e.ctrlKey && !e.shiftKey && !e.metaKey){
- navKey = (String.fromCharCode(navKey)).toLowerCase();
- this._onLetterKeyNav( { node: treeNode, key: navKey } );
- dojo.stopEvent(e);
- }
- }else{ // handle non-printables (arrow keys)
- var map = this._keyHandlerMap;
- if(!map){
- // setup table mapping keys to events
- map = {};
- map[dojo.keys.ENTER]="_onEnterKey";
- map[dojo.keys.LEFT_ARROW]="_onLeftArrow";
- map[dojo.keys.RIGHT_ARROW]="_onRightArrow";
- map[dojo.keys.UP_ARROW]="_onUpArrow";
- map[dojo.keys.DOWN_ARROW]="_onDownArrow";
- map[dojo.keys.HOME]="_onHomeKey";
- map[dojo.keys.END]="_onEndKey";
- this._keyHandlerMap = map;
- }
- if(this._keyHandlerMap[e.keyCode]){
- this[this._keyHandlerMap[e.keyCode]]( { node: treeNode, item: treeNode.item } );
- dojo.stopEvent(e);
- }
- }
- },
-
- _onEnterKey: function(/*Object*/ message){
- this._publish("execute", { item: message.item, node: message.node} );
- this.onClick(message.item, message.node);
- },
-
- _onDownArrow: function(/*Object*/ message){
- // summary: down arrow pressed; get next visible node, set focus there
- var returnNode = this._navToNextNode(message.node);
- if(returnNode && returnNode.isTreeNode){
- returnNode.tree.focusNode(returnNode);
- return returnNode;
- }
- },
-
- _onUpArrow: function(/*Object*/ message){
- // summary: up arrow pressed; move to previous visible node
-
- var nodeWidget = message.node;
- var returnWidget = nodeWidget;
-
- // if younger siblings
- var previousSibling = nodeWidget.getPreviousSibling();
- if(previousSibling){
- nodeWidget = previousSibling;
- // if the previous nodeWidget is expanded, dive in deep
- while(nodeWidget.isExpandable && nodeWidget.isExpanded && nodeWidget.hasChildren()){
- returnWidget = nodeWidget;
- // move to the last child
- var children = nodeWidget.getChildren();
- nodeWidget = children[children.length-1];
- }
- }else{
- // if this is the first child, return the parent
- // unless the parent is the root of a tree with a hidden root
- var parent = nodeWidget.getParent();
- if(!(this._hideRoot && parent === this)){
- nodeWidget = parent;
- }
- }
-
- if(nodeWidget && nodeWidget.isTreeNode){
- returnWidget = nodeWidget;
- }
-
- if(returnWidget && returnWidget.isTreeNode){
- returnWidget.tree.focusNode(returnWidget);
- return returnWidget;
- }
- },
-
- _onRightArrow: function(/*Object*/ message){
- // summary: right arrow pressed; go to child node
- var nodeWidget = message.node;
- var returnWidget = nodeWidget;
-
- // if not expanded, expand, else move to 1st child
- if(nodeWidget.isExpandable && !nodeWidget.isExpanded){
- this._expandNode(nodeWidget);
- }else if(nodeWidget.hasChildren()){
- nodeWidget = nodeWidget.getChildren()[0];
- }
-
- if(nodeWidget && nodeWidget.isTreeNode){
- returnWidget = nodeWidget;
- }
-
- if(returnWidget && returnWidget.isTreeNode){
- returnWidget.tree.focusNode(returnWidget);
- return returnWidget;
- }
- },
-
- _onLeftArrow: function(/*Object*/ message){
- // summary: left arrow pressed; go to parent
-
- var node = message.node;
- var returnWidget = node;
-
- // if not collapsed, collapse, else move to parent
- if(node.isExpandable && node.isExpanded){
- this._collapseNode(node);
- }else{
- node = node.getParent();
- }
- if(node && node.isTreeNode){
- returnWidget = node;
- }
-
- if(returnWidget && returnWidget.isTreeNode){
- returnWidget.tree.focusNode(returnWidget);
- return returnWidget;
- }
- },
-
- _onHomeKey: function(){
- // summary: home pressed; get first visible node, set focus there
- var returnNode = this._navToRootOrFirstNode();
- if(returnNode){
- returnNode.tree.focusNode(returnNode);
- return returnNode;
- }
- },
-
- _onEndKey: function(/*Object*/ message){
- // summary: end pressed; go to last visible node
-
- var returnWidget = message.node.tree;
-
- var lastChild = returnWidget;
- while(lastChild.isExpanded){
- var c = lastChild.getChildren();
- lastChild = c[c.length - 1];
- if(lastChild.isTreeNode){
- returnWidget = lastChild;
- }
- }
-
- if(returnWidget && returnWidget.isTreeNode){
- returnWidget.tree.focusNode(returnWidget);
- return returnWidget;
- }
- },
-
- _onLetterKeyNav: function(message){
- // summary: letter key pressed; search for node starting with first char = key
- var node = startNode = message.node;
- var key = message.key;
- do{
- node = this._navToNextNode(node);
- //check for last node, jump to first node if necessary
- if(!node){
- node = this._navToRootOrFirstNode();
- }
- }while(node !== startNode && (node.label.charAt(0).toLowerCase() != key));
- if(node && node.isTreeNode){
- // no need to set focus if back where we started
- if(node !== startNode){
- node.tree.focusNode(node);
- }
- return node;
- }
- },
-
- _onClick: function(/*Event*/ e){
- // summary: translates click events into commands for the controller to process
- var domElement = e.target;
-
- // find node
- var nodeWidget = dijit.getEnclosingWidget(domElement);
- if(!nodeWidget || !nodeWidget.isTreeNode){
- return;
- }
-
- if(domElement == nodeWidget.expandoNode ||
- domElement == nodeWidget.expandoNodeText){
- // expando node was clicked
- if(nodeWidget.isExpandable){
- this._onExpandoClick({node:nodeWidget});
- }
- }else{
- this._publish("execute", { item: nodeWidget.item, node: nodeWidget} );
- this.onClick(nodeWidget.item, nodeWidget);
- this.focusNode(nodeWidget);
- }
- dojo.stopEvent(e);
- },
-
- _onExpandoClick: function(/*Object*/ message){
- // summary: user clicked the +/- icon; expand or collapse my children.
- var node = message.node;
- if(node.isExpanded){
- this._collapseNode(node);
- }else{
- this._expandNode(node);
- }
- },
-
- onClick: function(/* dojo.data */ item, /*TreeNode*/ node){
- // summary: user overridable function for executing a tree item
- },
-
- _navToNextNode: function(node){
- // summary: get next visible node
- var returnNode;
- // if this is an expanded node, get the first child
- if(node.isExpandable && node.isExpanded && node.hasChildren()){
- returnNode = node.getChildren()[0];
- }else{
- // find a parent node with a sibling
- while(node && node.isTreeNode){
- returnNode = node.getNextSibling();
- if(returnNode){
- break;
- }
- node = node.getParent();
- }
- }
- return returnNode;
- },
-
- _navToRootOrFirstNode: function(){
- // summary: get first visible node
- if(!this._hideRoot){
- return this;
- }else{
- var returnNode = this.getChildren()[0];
- if(returnNode && returnNode.isTreeNode){
- return returnNode;
- }
- }
- },
-
- _collapseNode: function(/*_TreeNode*/ node){
- // summary: called when the user has requested to collapse the node
-
- if(node.isExpandable){
- if(node.state == "LOADING"){
- // ignore clicks while we are in the process of loading data
- return;
- }
- if(this.lastFocused){
- // are we collapsing a descendant with focus?
- if(dojo.isDescendant(this.lastFocused.domNode, node.domNode)){
- this.focusNode(node);
- }else{
- // clicking the expando node might have erased focus from
- // the current item; restore it
- this.focusNode(this.lastFocused);
- }
- }
- node.collapse();
- if(this.persist && node.item){
- delete this._openedItemIds[this.store.getIdentity(node.item)];
- this._saveState();
- }
- }
- },
-
- _expandNode: function(/*_TreeNode*/ node){
- // summary: called when the user has requested to expand the node
-
- // clicking the expando node might have erased focus from the current item; restore it
- var t = node.tree;
- if(t.lastFocused){ t.focusNode(t.lastFocused); }
-
- if(!node.isExpandable){
- return;
- }
-
- var store = this.store;
- var getValue = this.store.getValue;
-
- switch(node.state){
- case "LOADING":
- // ignore clicks while we are in the process of loading data
- return;
-
- case "UNCHECKED":
- // need to load all the children, and then expand
- node.markProcessing();
- var _this = this;
- var onComplete = function(childItems){
- node.unmarkProcessing();
- _this._onLoadAllItems(node, childItems);
- };
- this.getItemChildren(node.item, onComplete);
- break;
-
- default:
- // data is already loaded; just proceed
- if(node.expand){ // top level Tree doesn't have expand() method
- node.expand();
- if(this.persist && node.item){
- this._openedItemIds[this.store.getIdentity(node.item)] = true;
- this._saveState();
- }
- }
- break;
- }
- },
-
- ////////////////// Miscellaneous functions ////////////////
-
- blurNode: function(){
- // summary
- // Removes focus from the currently focused node (which must be visible).
- // Usually not called directly (just call focusNode() on another node instead)
- var node = this.lastFocused;
- if(!node){ return; }
- var labelNode = node.labelNode;
- dojo.removeClass(labelNode, "dijitTreeLabelFocused");
- labelNode.setAttribute("tabIndex", "-1");
- this.lastFocused = null;
- },
-
- focusNode: function(/* _tree.Node */ node){
- // summary
- // Focus on the specified node (which must be visible)
-
- // set focus so that the label will be voiced using screen readers
- node.labelNode.focus();
- },
-
- _onBlur: function(){
- // summary:
- // We've moved away from the whole tree. The currently "focused" node
- // (see focusNode above) should remain as the lastFocused node so we can
- // tab back into the tree. Just change CSS to get rid of the dotted border
- // until that time
- if(this.lastFocused){
- var labelNode = this.lastFocused.labelNode;
- dojo.removeClass(labelNode, "dijitTreeLabelFocused");
- }
- },
-
- _onTreeFocus: function(evt){
- var node = dijit.getEnclosingWidget(evt.target);
- if(node != this.lastFocused){
- this.blurNode();
- }
- var labelNode = node.labelNode;
- // set tabIndex so that the tab key can find this node
- labelNode.setAttribute("tabIndex", "0");
- dojo.addClass(labelNode, "dijitTreeLabelFocused");
- this.lastFocused = node;
- },
-
- //////////////// Events from data store //////////////////////////
-
-
- _onNewItem: function(/*Object*/ item, parentInfo){
- //summary: callback when new item has been added to the store.
-
- var loadNewItem; // should new item be displayed in tree?
-
- if(parentInfo){
- var parent = this._itemNodeMap[this.getItemParentIdentity(item, parentInfo)];
-
- // If new item's parent item not in tree view yet, can safely ignore.
- // Also, if a query of specified parent wouldn't return this item, then ignore.
- if(!parent ||
- dojo.indexOf(this.childrenAttr, parentInfo.attribute) == -1){
- return;
- }
- }
-
- var childParams = {
- item: item,
- isExpandable: this.mayHaveChildren(item)
- };
- if(parent){
- if(!parent.isExpandable){
- parent.makeExpandable();
- }
- if(parent.state=="LOADED" || parent.isExpanded){
- var childrenMap=parent._addChildren([childParams]);
- }
- }else{
- // top level node
- var childrenMap=this._addChildren([childParams]);
- }
-
- if(childrenMap){
- dojo.mixin(this._itemNodeMap, childrenMap);
- //this._itemNodeMap[this.store.getIdentity(item)]=child;
- }
- },
-
- _onDeleteItem: function(/*Object*/ item){
- //summary: delete event from the store
- //since the object has just been deleted, we need to
- //use the name directly
- var identity = this.store.getIdentity(item);
- var node = this._itemNodeMap[identity];
-
- if(node){
- var parent = node.getParent();
- parent.deleteNode(node);
- this._itemNodeMap[identity]=null;
- }
- },
-
- _onSetItem: function(/*Object*/ item){
- //summary: set data event on an item in the store
- var identity = this.store.getIdentity(item);
- node = this._itemNodeMap[identity];
-
- if(node){
- node.setLabelNode(this.getLabel(item));
- node._updateItemClasses(item);
- }
- },
-
+ },
+ _state: function(item,expanded){
+ // summary:
+ // Query or set expanded state for an item,
+ if(!this.persist){
+ return false;
+ }
+ var id=this.model.getIdentity(item);
+ if(arguments.length === 1){
+ return this._openedItemIds[id];
+ }
+ if(expanded){
+ this._openedItemIds[id] = true;
+ }else{
+ delete this._openedItemIds[id];
+ }
+ },
_saveState: function(){
- //summary: create and save a cookie with the currently expanded nodes identifiers
+ // summary:
+ // Create and save a cookie with the currently expanded nodes identifiers
if(!this.persist){
return;
}
var ary = [];
for(var id in this._openedItemIds){
ary.push(id);
}
- dojo.cookie(this.cookieName, ary.join(","));
- }
-});
+ dojo.cookie(this.cookieName, ary.join(","), {expires:365});
+ },
+
+ destroy: function(){
+ if(this._curSearch){
+ clearTimeout(this._curSearch.timer);
+ delete this._curSearch;
+ }
+ if(this.rootNode){
+ this.rootNode.destroyRecursive();
+ }
+ if(this.dndController && !dojo.isString(this.dndController)){
+ this.dndController.destroy();
+ }
+ this.rootNode = null;
+ this.inherited(arguments);
+ },
+
+ destroyRecursive: function(){
+ // A tree is treated as a leaf, not as a node with children (like a grid),
+ // but defining destroyRecursive for back-compat.
+ this.destroy();
+ },
+
+ resize: function(changeSize){
+ if(changeSize){
+ dojo.marginBox(this.domNode, changeSize);
+ dojo.style(this.domNode, "overflow", "auto"); // for scrollbars
+ }
+
+ // The only JS sizing involved w/tree is the indentation, which is specified
+ // in CSS and read in through this dummy indentDetector node (tree must be
+ // visible and attached to the DOM to read this)
+ this._nodePixelIndent = dojo.marginBox(this.tree.indentDetector).w;
+
+ if(this.tree.rootNode){
+ // If tree has already loaded, then reset indent for all the nodes
+ this.tree.rootNode.attr('indent', this.showRoot ? 0 : -1);
+ }
+ },
+
+ _createTreeNode: function(/*Object*/ args){
+ // summary:
+ // creates a TreeNode
+ // description:
+ // Developers can override this method to define their own TreeNode class;
+ // However it will probably be removed in a future release in favor of a way
+ // of just specifying a widget for the label, rather than one that contains
+ // the children too.
+ return new dijit._TreeNode(args);
+ }
+});
+
+// For back-compat. TODO: remove in 2.0
+
+
}
if(!dojo._hasResource["dijit.form.TextBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.form.TextBox"] = true;
dojo.provide("dijit.form.TextBox");
dojo.declare(
"dijit.form.TextBox",
- dijit.form._FormWidget,
- {
- // summary:
- // A generic textbox field.
- // Serves as a base class to derive more specialized functionality in subclasses.
-
- // trim: Boolean
+ dijit.form._FormValueWidget,
+ {
+ // summary:
+ // A base class for textbox form inputs
+
+ // trim: Boolean
// Removes leading and trailing whitespace if true. Default is false.
trim: false,
- // uppercase: Boolean
+ // uppercase: Boolean
// Converts all characters to uppercase if true. Default is false.
uppercase: false,
- // lowercase: Boolean
+ // lowercase: Boolean
// Converts all characters to lowercase if true. Default is false.
lowercase: false,
- // propercase: Boolean
+ // propercase: Boolean
// Converts the first character of each word to uppercase if true.
propercase: false,
- // maxLength: String
+ // maxLength: String
// HTML INPUT tag maxLength declaration.
maxLength: "",
- templateString:"<input class=\"dojoTextBox\" dojoAttachPoint='textbox,focusNode' name=\"${name}\"\n\tdojoAttachEvent='onmouseenter:_onMouse,onmouseleave:_onMouse,onfocus:_onMouse,onblur:_onMouse,onkeyup,onkeypress:_onKeyPress'\n\tautocomplete=\"off\" type=\"${type}\"\n\t/>\n",
+ // selectOnClick: [const] Boolean
+ // If true, all text will be selected when focused with mouse
+ selectOnClick: false,
+
+ templateString: dojo.cache("dijit.form", "templates/TextBox.html", "<input class=\"dijit dijitReset dijitLeft\" dojoAttachPoint='textbox,focusNode'\n\tdojoAttachEvent='onmouseenter:_onMouse,onmouseleave:_onMouse'\n\tautocomplete=\"off\" type=\"${type}\" ${nameAttrSetting}\n\t/>\n"),
baseClass: "dijitTextBox",
- attributeMap: dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),
- {maxLength:"focusNode"}),
+ attributeMap: dojo.delegate(dijit.form._FormValueWidget.prototype.attributeMap, {
+ maxLength: "focusNode"
+ }),
+
+ _getValueAttr: function(){
+ // summary:
+ // Hook so attr('value') works as we like.
+ // description:
+ // For `dijit.form.TextBox` this basically returns the value of the <input>.
+ //
+ // For `dijit.form.MappedTextBox` subclasses, which have both
+ // a "displayed value" and a separate "submit value",
+ // This treats the "displayed value" as the master value, computing the
+ // submit value from it via this.parse().
+ return this.parse(this.attr('displayedValue'), this.constraints);
+ },
+
+ _setValueAttr: function(value, /*Boolean?*/ priorityChange, /*String?*/ formattedValue){
+ // summary:
+ // Hook so attr('value', ...) works.
+ //
+ // description:
+ // Sets the value of the widget to "value" which can be of
+ // any type as determined by the widget.
+ //
+ // value:
+ // The visual element value is also set to a corresponding,
+ // but not necessarily the same, value.
+ //
+ // formattedValue:
+ // If specified, used to set the visual element value,
+ // otherwise a computed visual value is used.
+ //
+ // priorityChange:
+ // If true, an onChange event is fired immediately instead of
+ // waiting for the next blur event.
+
+ var filteredValue;
+ if(value !== undefined){
+ // TODO: this is calling filter() on both the display value and the actual value.
+ // I added a comment to the filter() definition about this, but it should be changed.
+ filteredValue = this.filter(value);
+ if(typeof formattedValue != "string"){
+ if(filteredValue !== null && ((typeof filteredValue != "number") || !isNaN(filteredValue))){
+ formattedValue = this.filter(this.format(filteredValue, this.constraints));
+ }else{ formattedValue = ''; }
+ }
+ }
+ if(formattedValue != null && formattedValue != undefined && ((typeof formattedValue) != "number" || !isNaN(formattedValue)) && this.textbox.value != formattedValue){
+ this.textbox.value = formattedValue;
+ }
+ this.inherited(arguments, [filteredValue, priorityChange]);
+ },
+
+ // displayedValue: String
+ // For subclasses like ComboBox where the displayed value
+ // (ex: Kentucky) and the serialized value (ex: KY) are different,
+ // this represents the displayed value.
+ //
+ // Setting 'displayedValue' through attr('displayedValue', ...)
+ // updates 'value', and vice-versa. Othewise 'value' is updated
+ // from 'displayedValue' periodically, like onBlur etc.
+ //
+ // TODO: move declaration to MappedTextBox?
+ // Problem is that ComboBox references displayedValue,
+ // for benefit of FilteringSelect.
+ displayedValue: "",
getDisplayedValue: function(){
+ // summary:
+ // Deprecated. Use attr('displayedValue') instead.
+ // tags:
+ // deprecated
+ dojo.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use attr('displayedValue') instead.", "", "2.0");
+ return this.attr('displayedValue');
+ },
+
+ _getDisplayedValueAttr: function(){
+ // summary:
+ // Hook so attr('displayedValue') works.
+ // description:
+ // Returns the displayed value (what the user sees on the screen),
+ // after filtering (ie, trimming spaces etc.).
+ //
+ // For some subclasses of TextBox (like ComboBox), the displayed value
+ // is different from the serialized value that's actually
+ // sent to the server (see dijit.form.ValidationTextBox.serialize)
+
return this.filter(this.textbox.value);
},
- getValue: function(){
- return this.parse(this.getDisplayedValue(), this.constraints);
- },
-
- setValue: function(value, /*Boolean, optional*/ priorityChange, /*String, optional*/ formattedValue){
- var filteredValue = this.filter(value);
- if((typeof filteredValue == typeof value) && (formattedValue == null || formattedValue == undefined)){
- formattedValue = this.format(filteredValue, this.constraints);
- }
- if(formattedValue != null && formattedValue != undefined){
- this.textbox.value = formattedValue;
- }
- dijit.form.TextBox.superclass.setValue.call(this, filteredValue, priorityChange);
- },
-
setDisplayedValue: function(/*String*/value){
+ // summary:
+ // Deprecated. Use attr('displayedValue', ...) instead.
+ // tags:
+ // deprecated
+ dojo.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use attr('displayedValue', ...) instead.", "", "2.0");
+ this.attr('displayedValue', value);
+ },
+
+ _setDisplayedValueAttr: function(/*String*/value){
+ // summary:
+ // Hook so attr('displayedValue', ...) works.
+ // description:
+ // Sets the value of the visual element to the string "value".
+ // The widget value is also set to a corresponding,
+ // but not necessarily the same, value.
+
+ if(value === null || value === undefined){ value = '' }
+ else if(typeof value != "string"){ value = String(value) }
this.textbox.value = value;
- this.setValue(this.getValue(), true);
- },
-
- forWaiValuenow: function(){
- return this.getDisplayedValue();
+ this._setValueAttr(this.attr('value'), undefined, value);
},
format: function(/* String */ value, /* Object */ constraints){
- // summary: Replacable function to convert a value to a properly formatted string
+ // summary:
+ // Replacable function to convert a value to a properly formatted string.
+ // tags:
+ // protected extension
return ((value == null || value == undefined) ? "" : (value.toString ? value.toString() : value));
},
parse: function(/* String */ value, /* Object */ constraints){
- // summary: Replacable function to convert a formatted string to a value
- return value;
+ // summary:
+ // Replacable function to convert a formatted string to a value
+ // tags:
+ // protected extension
+
+ return value; // String
+ },
+
+ _refreshState: function(){
+ // summary:
+ // After the user types some characters, etc., this method is
+ // called to check the field for validity etc. The base method
+ // in `dijit.form.TextBox` does nothing, but subclasses override.
+ // tags:
+ // protected
+ },
+
+ _onInput: function(e){
+ if(e && e.type && /key/i.test(e.type) && e.keyCode){
+ switch(e.keyCode){
+ case dojo.keys.SHIFT:
+ case dojo.keys.ALT:
+ case dojo.keys.CTRL:
+ case dojo.keys.TAB:
+ return;
+ }
+ }
+ if(this.intermediateChanges){
+ var _this = this;
+ // the setTimeout allows the key to post to the widget input box
+ setTimeout(function(){ _this._handleOnChange(_this.attr('value'), false); }, 0);
+ }
+ this._refreshState();
},
postCreate: function(){
// setting the value here is needed since value="" in the template causes "undefined"
// and setting in the DOM (instead of the JS object) helps with form reset actions
- this.textbox.setAttribute("value", this.getDisplayedValue());
- this.inherited('postCreate', arguments);
-
- if(this.srcNodeRef){
- dojo.style(this.textbox, "cssText", this.style);
- this.textbox.className += " " + this["class"];
- }
- this._layoutHack();
- },
-
- _layoutHack: function(){
- // summary: work around table sizing bugs on FF2 by forcing redraw
- if(dojo.isFF == 2 && this.domNode.tagName=="TABLE"){
- var node=this.domNode;
- var old = node.style.opacity;
- node.style.opacity = "0.999";
- setTimeout(function(){
- node.style.opacity = old;
- }, 0);
- }
- },
-
+ this.textbox.setAttribute("value", this.textbox.value); // DOM and JS values shuld be the same
+ this.inherited(arguments);
+ if(dojo.isMoz || dojo.isOpera){
+ this.connect(this.textbox, "oninput", this._onInput);
+ }else{
+ this.connect(this.textbox, "onkeydown", this._onInput);
+ this.connect(this.textbox, "onkeyup", this._onInput);
+ this.connect(this.textbox, "onpaste", this._onInput);
+ this.connect(this.textbox, "oncut", this._onInput);
+ }
+ },
+
+ _blankValue: '', // if the textbox is blank, what value should be reported
filter: function(val){
- // summary: Apply various filters to textbox value
- if(val == undefined || val == null){ return ""; }
- else if(typeof val != "string"){ return val; }
+ // summary:
+ // Auto-corrections (such as trimming) that are applied to textbox
+ // value on blur or form submit.
+ // description:
+ // For MappedTextBox subclasses, this is called twice
+ // - once with the display value
+ // - once the value as set/returned by attr('value', ...)
+ // and attr('value'), ex: a Number for NumberTextBox.
+ //
+ // In the latter case it does corrections like converting null to NaN. In
+ // the former case the NumberTextBox.filter() method calls this.inherited()
+ // to execute standard trimming code in TextBox.filter().
+ //
+ // TODO: break this into two methods in 2.0
+ //
+ // tags:
+ // protected extension
+ if(val === null){ return this._blankValue; }
+ if(typeof val != "string"){ return val; }
if(this.trim){
val = dojo.trim(val);
}
if(this.uppercase){
val = val.toUpperCase();
}
if(this.lowercase){
val = val.toLowerCase();
}
if(this.propercase){
val = val.replace(/[^\s]+/g, function(word){
return word.substring(0,1).toUpperCase() + word.substring(1);
});
}
return val;
},
- // event handlers, you can over-ride these in your own subclasses
- _onBlur: function(){
- this.setValue(this.getValue(), (this.isValid ? this.isValid() : true));
- },
-
- onkeyup: function(){
- // TODO: it would be nice to massage the value (ie: automatic uppercase, etc) as the user types
- // but this messes up the cursor position if you are typing into the middle of a word, and
- // also trimming doesn't work correctly (it prevents spaces between words too!)
- // this.setValue(this.getValue());
+ _setBlurValue: function(){
+ this._setValueAttr(this.attr('value'), true);
+ },
+
+ _onBlur: function(e){
+ if(this.disabled){ return; }
+ this._setBlurValue();
+ this.inherited(arguments);
+
+ if(this._selectOnClickHandle){
+ this.disconnect(this._selectOnClickHandle);
+ }
+ if(this.selectOnClick && dojo.isMoz){
+ this.textbox.selectionStart = this.textbox.selectionEnd = undefined; // clear selection so that the next mouse click doesn't reselect
+ }
+ },
+
+ _onFocus: function(/*String*/ by){
+ if(this.disabled || this.readOnly){ return; }
+
+ // Select all text on focus via click if nothing already selected.
+ // Since mouse-up will clear the selection need to defer selection until after mouse-up.
+ // Don't do anything on focus by tabbing into the widgetm since there's no associated mouse-up event.
+ if(this.selectOnClick && by == "mouse"){
+ this._selectOnClickHandle = this.connect(this.domNode, "onmouseup", function(){
+ // Only select all text on first click; otherwise users would have no way to clear
+ // the selection.
+ this.disconnect(this._selectOnClickHandle);
+
+ // Check if the user selected some text manually (mouse-down, mouse-move, mouse-up)
+ // and if not, then select all the text
+ var textIsNotSelected;
+ if(dojo.isIE){
+ var range = dojo.doc.selection.createRange();
+ var parent = range.parentElement();
+ textIsNotSelected = parent == this.textbox && range.text.length == 0;
+ }else{
+ textIsNotSelected = this.textbox.selectionStart == this.textbox.selectionEnd;
+ }
+ if(textIsNotSelected){
+ dijit.selectInputText(this.textbox);
+ }
+ });
+ }
+
+ this._refreshState();
+ this.inherited(arguments);
+ },
+
+ reset: function(){
+ // Overrides dijit._FormWidget.reset().
+ // Additionally resets the displayed textbox value to ''
+ this.textbox.value = '';
+ this.inherited(arguments);
}
}
);
+dijit.selectInputText = function(/*DomNode*/element, /*Number?*/ start, /*Number?*/ stop){
+ // summary:
+ // Select text in the input element argument, from start (default 0), to stop (default end).
+
+ // TODO: use functions in _editor/selection.js?
+ var _window = dojo.global;
+ var _document = dojo.doc;
+ element = dojo.byId(element);
+ if(isNaN(start)){ start = 0; }
+ if(isNaN(stop)){ stop = element.value ? element.value.length : 0; }
+ dijit.focus(element);
+ if(_document["selection"] && dojo.body()["createTextRange"]){ // IE
+ if(element.createTextRange){
+ var range = element.createTextRange();
+ with(range){
+ collapse(true);
+ moveStart("character", -99999); // move to 0
+ moveStart("character", start); // delta from 0 is the correct position
+ moveEnd("character", stop-start);
+ select();
+ }
+ }
+ }else if(_window["getSelection"]){
+ if(element.setSelectionRange){
+ element.setSelectionRange(start, stop);
+ }
+ }
+};
+
}
if(!dojo._hasResource["dijit.InlineEditBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.InlineEditBox"] = true;
dojo.provide("dijit.InlineEditBox");
dojo.declare("dijit.InlineEditBox",
dijit._Widget,
{
- // summary: An element with in-line edit capabilitites
+ // summary:
+ // An element with in-line edit capabilitites
//
// description:
- // Behavior for an existing node (<p>, <div>, <span>, etc.) so that
+ // Behavior for an existing node (`<p>`, `<div>`, `<span>`, etc.) so that
// when you click it, an editor shows up in place of the original
// text. Optionally, Save and Cancel button are displayed below the edit widget.
// When Save is clicked, the text is pulled from the edit
// widget and redisplayed and the edit widget is again hidden.
// By default a plain Textarea widget is used as the editor (or for
// inline values a TextBox), but you can specify an editor such as
// dijit.Editor (for editing HTML) or a Slider (for adjusting a number).
// An edit widget must support the following API to be used:
- // String getDisplayedValue() OR String getValue()
- // void setDisplayedValue(String) OR void setValue(String)
- // void focus()
- //
- // editing: Boolean
+ // - displayedValue or value as initialization parameter,
+ // and available through attr('displayedValue') / attr('value')
+ // - void focus()
+ // - DOM-node focusNode = node containing editable text
+
+ // editing: [readonly] Boolean
// Is the node currently in edit mode?
editing: false,
// autoSave: Boolean
// Changing the value automatically saves it; don't have to push save button
// (and save button isn't even displayed)
autoSave: true,
// buttonSave: String
// Save button label
buttonSave: "",
// buttonCancel: String
// Cancel button label
buttonCancel: "",
// renderAsHtml: Boolean
// Set this to true if the specified Editor's value should be interpreted as HTML
- // rather than plain text (ie, dijit.Editor)
+ // rather than plain text (ex: `dijit.Editor`)
renderAsHtml: false,
// editor: String
// Class name for Editor widget
editor: "dijit.form.TextBox",
+ // editorWrapper: String
+ // Class name for widget that wraps the editor widget, displaying save/cancel
+ // buttons.
+ editorWrapper: "dijit._InlineEditor",
+
// editorParams: Object
// Set of parameters for editor, like {required: true}
editorParams: {},
onChange: function(value){
- // summary: User should set this handler to be notified of changes to value
+ // summary:
+ // Set this handler to be notified of changes to value.
+ // tags:
+ // callback
+ },
+
+ onCancel: function(){
+ // summary:
+ // Set this handler to be notified when editing is cancelled.
+ // tags:
+ // callback
},
// width: String
- // Width of editor. By default it's width=100% (ie, block mode)
+ // Width of editor. By default it's width=100% (ie, block mode).
width: "100%",
// value: String
// The display value of the widget in read-only mode
value: "",
- // noValueIndicator: String
+ // noValueIndicator: [const] String
// The text that gets displayed when there is no value (so that the user has a place to click to edit)
noValueIndicator: "<span style='font-family: wingdings; text-decoration: underline;'>&nbsp;&nbsp;&nbsp;&nbsp;&#x270d;&nbsp;&nbsp;&nbsp;&nbsp;</span>",
+ constructor: function(){
+ // summary:
+ // Sets up private arrays etc.
+ // tags:
+ // private
+ this.editorParams = {};
+ },
+
postMixInProperties: function(){
- this.inherited('postMixInProperties', arguments);
+ this.inherited(arguments);
// save pointer to original source node, since Widget nulls-out srcNodeRef
this.displayNode = this.srcNodeRef;
// connect handlers to the display node
var events = {
ondijitclick: "_onClick",
onmouseover: "_onMouseOver",
onmouseout: "_onMouseOut",
onfocus: "_onMouseOver",
- onblur: "_onMouseOut"
+ onblur: "_onMouseOut"
};
for(var name in events){
this.connect(this.displayNode, name, events[name]);
}
dijit.setWaiRole(this.displayNode, "button");
if(!this.displayNode.getAttribute("tabIndex")){
this.displayNode.setAttribute("tabIndex", 0);
}
- if(!this.value){
- this.value = this.displayNode.innerHTML;
- }
- this._setDisplayValue(this.value); // if blank, change to icon for "input needed"
+ this.attr('value', this.value || this.displayNode.innerHTML);
+ },
+
+ setDisabled: function(/*Boolean*/ disabled){
+ // summary:
+ // Deprecated. Use attr('disable', ...) instead.
+ // tags:
+ // deprecated
+ dojo.deprecated("dijit.InlineEditBox.setDisabled() is deprecated. Use attr('disabled', bool) instead.", "", "2.0");
+ this.attr('disabled', disabled);
+ },
+
+ _setDisabledAttr: function(/*Boolean*/ disabled){
+ // summary:
+ // Hook to make attr("disabled", ...) work.
+ // Set disabled state of widget.
+ this.disabled = disabled;
+ dijit.setWaiState(this.domNode, "disabled", disabled);
+ if(disabled){
+ this.displayNode.removeAttribute("tabIndex");
+ }else{
+ this.displayNode.setAttribute("tabIndex", 0);
+ }
},
_onMouseOver: function(){
+ // summary:
+ // Handler for onmouseover event.
+ // tags:
+ // private
dojo.addClass(this.displayNode, this.disabled ? "dijitDisabledClickableRegion" : "dijitClickableRegion");
},
_onMouseOut: function(){
+ // summary:
+ // Handler for onmouseout event.
+ // tags:
+ // private
dojo.removeClass(this.displayNode, this.disabled ? "dijitDisabledClickableRegion" : "dijitClickableRegion");
},
_onClick: function(/*Event*/ e){
+ // summary:
+ // Handler for onclick event.
+ // tags:
+ // private
if(this.disabled){ return; }
if(e){ dojo.stopEvent(e); }
this._onMouseOut();
// Since FF gets upset if you move a node while in an event handler for that node...
- setTimeout(dojo.hitch(this, "_edit"), 0);
- },
-
- _edit: function(){
- // summary: display the editor widget in place of the original (read only) markup
-
+ setTimeout(dojo.hitch(this, "edit"), 0);
+ },
+
+ edit: function(){
+ // summary:
+ // Display the editor widget in place of the original (read only) markup.
+ // tags:
+ // private
+
+ if(this.disabled || this.editing){ return; }
this.editing = true;
- var editValue =
- (this.renderAsHtml ?
- this.value :
- this.value.replace(/\s*\r?\n\s*/g,"").replace(/<br\/?>/gi, "\n").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&"));
-
- // Placeholder for edit widget
- // Put place holder (and eventually editWidget) before the display node so that it's positioned correctly
- // when Calendar dropdown appears, which happens automatically on focus.
- var placeholder = document.createElement("span");
- dojo.place(placeholder, this.domNode, "before");
-
- var ew = this.editWidget = new dijit._InlineEditor({
- value: dojo.trim(editValue),
- autoSave: this.autoSave,
- buttonSave: this.buttonSave,
- buttonCancel: this.buttonCancel,
- renderAsHtml: this.renderAsHtml,
- editor: this.editor,
- editorParams: this.editorParams,
- style: dojo.getComputedStyle(this.displayNode),
- save: dojo.hitch(this, "save"),
- cancel: dojo.hitch(this, "cancel"),
- width: this.width
- }, placeholder);
-
+ // save some display node values that can be restored later
+ this._savedPosition = dojo.style(this.displayNode, "position") || "static";
+ this._savedOpacity = dojo.style(this.displayNode, "opacity") || "1";
+ this._savedTabIndex = dojo.attr(this.displayNode, "tabIndex") || "0";
+
+ if(this.wrapperWidget){
+ this.wrapperWidget.editWidget.attr("displayedValue" in this.editorParams ? "displayedValue" : "value", this.value);
+ }else{
+ // Placeholder for edit widget
+ // Put place holder (and eventually editWidget) before the display node so that it's positioned correctly
+ // when Calendar dropdown appears, which happens automatically on focus.
+ var placeholder = dojo.create("span", null, this.domNode, "before");
+
+ // Create the editor wrapper (the thing that holds the editor widget and the save/cancel buttons)
+ var ewc = dojo.getObject(this.editorWrapper);
+ this.wrapperWidget = new ewc({
+ value: this.value,
+ buttonSave: this.buttonSave,
+ buttonCancel: this.buttonCancel,
+ tabIndex: this._savedTabIndex,
+ editor: this.editor,
+ inlineEditBox: this,
+ sourceStyle: dojo.getComputedStyle(this.displayNode),
+ save: dojo.hitch(this, "save"),
+ cancel: dojo.hitch(this, "cancel")
+ }, placeholder);
+ }
+ var ww = this.wrapperWidget;
+
+ if(dojo.isIE){
+ dijit.focus(dijit.getFocus()); // IE (at least 8) needs help with tab order changes
+ }
// to avoid screen jitter, we first create the editor with position:absolute, visibility:hidden,
// and then when it's finished rendering, we switch from display mode to editor
- var ews = ew.domNode.style;
- this.displayNode.style.display="none";
- ews.position = "static";
- ews.visibility = "visible";
+ // position:absolute releases screen space allocated to the display node
+ // opacity:0 is the same as visibility:hidden but is still focusable
+ // visiblity:hidden removes focus outline
+
+ dojo.style(this.displayNode, { position: "absolute", opacity: "0", display: "none" }); // makes display node invisible, display style used for focus-ability
+ dojo.style(ww.domNode, { position: this._savedPosition, visibility: "visible", opacity: "1" });
+ dojo.attr(this.displayNode, "tabIndex", "-1"); // needed by WebKit for TAB from editor to skip displayNode
// Replace the display widget with edit widget, leaving them both displayed for a brief time so that
// focus can be shifted without incident. (browser may needs some time to render the editor.)
- this.domNode = ew.domNode;
- setTimeout(function(){
- ew.focus();
- }, 100);
+ setTimeout(dojo.hitch(this, function(){
+ ww.focus(); // both nodes are showing, so we can switch focus safely
+ ww._resetValue = ww.getValue();
+ }), 0);
+ },
+
+ _onBlur: function(){
+ // summary:
+ // Called when focus moves outside the InlineEditBox.
+ // Performs garbage collection.
+ // tags:
+ // private
+
+ this.inherited(arguments);
+ if(!this.editing){
+ setTimeout(dojo.hitch(this, function(){
+ if(this.wrapperWidget){
+ this.wrapperWidget.destroy();
+ delete this.wrapperWidget;
+ }
+ }), 0);
+ }
},
_showText: function(/*Boolean*/ focus){
- // summary: revert to display mode, and optionally focus on display node
-
- // display the read-only text and then quickly hide the editor (to avoid screen jitter)
- this.displayNode.style.display="";
- var ews = this.editWidget.domNode.style;
- ews.position="absolute";
- ews.visibility="hidden";
-
- this.domNode = this.displayNode;
-
- // give the browser some time to render the display node and then shift focus to it
- // and hide the edit widget
- var _this = this;
- setTimeout(function(){
- if(focus){
- dijit.focus(_this.displayNode);
- }
- _this.editWidget.destroy();
- delete _this.editWidget;
- }, 100);
+ // summary:
+ // Revert to display mode, and optionally focus on display node
+ // tags:
+ // private
+
+ var ww = this.wrapperWidget;
+ dojo.style(ww.domNode, { position: "absolute", visibility: "hidden", opacity: "0" }); // hide the editor from mouse/keyboard events
+ dojo.style(this.displayNode, { position: this._savedPosition, opacity: this._savedOpacity, display: "" }); // make the original text visible
+ dojo.attr(this.displayNode, "tabIndex", this._savedTabIndex);
+ if(focus){
+ dijit.focus(this.displayNode);
+ }
},
save: function(/*Boolean*/ focus){
// summary:
// Save the contents of the editor and revert to display mode.
// focus: Boolean
// Focus on the display mode text
+ // tags:
+ // private
+
+ if(this.disabled || !this.editing){ return; }
this.editing = false;
- this.value = this.editWidget.getValue() + "";
- if(this.renderAsHtml){
- this.value = this.value.replace(/&/gm, "&amp;").replace(/</gm, "&lt;").replace(/>/gm, "&gt;").replace(/"/gm, "&quot;")
- .replace("\n", "<br>");
- }
- this._setDisplayValue(this.value);
+ var ww = this.wrapperWidget;
+ var value = ww.getValue();
+ this.attr('value', value); // display changed, formatted value
// tell the world that we have changed
- this.onChange(this.value);
-
- this._showText(focus);
- },
-
- _setDisplayValue: function(/*String*/ val){
- // summary: inserts specified HTML value into this node, or an "input needed" character if node is blank
+ setTimeout(dojo.hitch(this, "onChange", value), 0); // setTimeout prevents browser freeze for long-running event handlers
+
+ this._showText(focus); // set focus as needed
+ },
+
+ setValue: function(/*String*/ val){
+ // summary:
+ // Deprecated. Use attr('value', ...) instead.
+ // tags:
+ // deprecated
+ dojo.deprecated("dijit.InlineEditBox.setValue() is deprecated. Use attr('value', ...) instead.", "", "2.0");
+ return this.attr("value", val);
+ },
+
+ _setValueAttr: function(/*String*/ val){
+ // summary:
+ // Hook to make attr("value", ...) work.
+ // Inserts specified HTML value into this node, or an "input needed" character if node is blank.
+
+ this.value = val = dojo.trim(val);
+ if(!this.renderAsHtml){
+ val = val.replace(/&/gm, "&amp;").replace(/</gm, "&lt;").replace(/>/gm, "&gt;").replace(/"/gm, "&quot;").replace(/\n/g, "<br>");
+ }
this.displayNode.innerHTML = val || this.noValueIndicator;
},
+ getValue: function(){
+ // summary:
+ // Deprecated. Use attr('value') instead.
+ // tags:
+ // deprecated
+ dojo.deprecated("dijit.InlineEditBox.getValue() is deprecated. Use attr('value') instead.", "", "2.0");
+ return this.attr("value");
+ },
+
cancel: function(/*Boolean*/ focus){
// summary:
// Revert to display mode, discarding any changes made in the editor
+ // tags:
+ // private
+
+ if(this.disabled || !this.editing){ return; }
this.editing = false;
+
+ // tell the world that we have no changes
+ setTimeout(dojo.hitch(this, "onCancel"), 0); // setTimeout prevents browser freeze for long-running event handlers
+
this._showText(focus);
}
});
dojo.declare(
"dijit._InlineEditor",
[dijit._Widget, dijit._Templated],
{
// summary:
- // internal widget used by InlineEditBox, displayed when in editing mode
+ // Internal widget used by InlineEditBox, displayed when in editing mode
// to display the editor and maybe save/cancel buttons. Calling code should
// connect to save/cancel methods to detect when editing is finished
//
// Has mainly the same parameters as InlineEditBox, plus these values:
//
// style: Object
// Set of CSS attributes of display node, to replicate in editor
//
// value: String
// Value as an HTML string or plain text string, depending on renderAsHTML flag
- templateString:"<fieldset dojoAttachPoint=\"editNode\" waiRole=\"presentation\" style=\"position: absolute; visibility:hidden\" class=\"dijitReset dijitInline\"\n\tdojoAttachEvent=\"onkeypress: _onKeyPress\" \n\t><input dojoAttachPoint=\"editorPlaceholder\"\n\t/><span dojoAttachPoint=\"buttonContainer\"\n\t\t><button class='saveButton' dojoAttachPoint=\"saveButton\" dojoType=\"dijit.form.Button\" dojoAttachEvent=\"onClick:save\">${buttonSave}</button\n\t\t><button class='cancelButton' dojoAttachPoint=\"cancelButton\" dojoType=\"dijit.form.Button\" dojoAttachEvent=\"onClick:cancel\">${buttonCancel}</button\n\t></span\n></fieldset>\n",
+ templateString: dojo.cache("dijit", "templates/InlineEditBox.html", "<span dojoAttachPoint=\"editNode\" waiRole=\"presentation\" style=\"position: absolute; visibility:hidden\" class=\"dijitReset dijitInline\"\n\tdojoAttachEvent=\"onkeypress: _onKeyPress\"\n\t><span dojoAttachPoint=\"editorPlaceholder\"></span\n\t><span dojoAttachPoint=\"buttonContainer\"\n\t\t><button class='saveButton' dojoAttachPoint=\"saveButton\" dojoType=\"dijit.form.Button\" dojoAttachEvent=\"onClick:save\" label=\"${buttonSave}\"></button\n\t\t><button class='cancelButton' dojoAttachPoint=\"cancelButton\" dojoType=\"dijit.form.Button\" dojoAttachEvent=\"onClick:cancel\" label=\"${buttonCancel}\"></button\n\t></span\n></span>\n"),
widgetsInTemplate: true,
postMixInProperties: function(){
- this.inherited('postMixInProperties', arguments);
+ this.inherited(arguments);
this.messages = dojo.i18n.getLocalization("dijit", "common", this.lang);
dojo.forEach(["buttonSave", "buttonCancel"], function(prop){
if(!this[prop]){ this[prop] = this.messages[prop]; }
}, this);
},
postCreate: function(){
// Create edit widget in place in the template
var cls = dojo.getObject(this.editor);
- var ew = this.editWidget = new cls(this.editorParams, this.editorPlaceholder);
// Copy the style from the source
// Don't copy ALL properties though, just the necessary/applicable ones
- var srcStyle = this.style;
- dojo.forEach(["fontWeight","fontFamily","fontSize","fontStyle"], function(prop){
- ew.focusNode.style[prop]=srcStyle[prop];
+ var srcStyle = this.sourceStyle;
+ var editStyle = "line-height:" + srcStyle.lineHeight + ";";
+ dojo.forEach(["Weight","Family","Size","Style"], function(prop){
+ editStyle += "font-"+prop+":"+srcStyle["font"+prop]+";";
}, this);
dojo.forEach(["marginTop","marginBottom","marginLeft", "marginRight"], function(prop){
- this.domNode.style[prop]=srcStyle[prop];
+ this.domNode.style[prop] = srcStyle[prop];
}, this);
- if(this.width=="100%"){
+ var width = this.inlineEditBox.width;
+ if(width == "100%"){
// block mode
- ew.domNode.style.width = "100%"; // because display: block doesn't work for table widgets
- this.domNode.style.display="block";
+ editStyle += "width:100%;";
+ this.domNode.style.display = "block";
}else{
// inline-block mode
- ew.domNode.style.width = this.width + (Number(this.width)==this.width ? "px" : "");
- }
-
- this.connect(this.editWidget, "onChange", "_onChange");
-
- // setting the value of the edit widget will cause a possibly asynchronous onChange() call.
- // we need to ignore it, since we are only interested in when the user changes the value.
- this._ignoreNextOnChange = true;
- (this.editWidget.setDisplayedValue||this.editWidget.setValue).call(this.editWidget, this.value);
-
- this._initialText = this.getValue();
-
- if(this.autoSave){
+ editStyle += "width:" + (width + (Number(width) == width ? "px" : "")) + ";";
+ }
+ var editorParams = this.inlineEditBox.editorParams;
+ editorParams.style = editStyle;
+ editorParams[ "displayedValue" in cls.prototype ? "displayedValue" : "value"] = this.value;
+ var ew = this.editWidget = new cls(editorParams, this.editorPlaceholder);
+
+ if(this.inlineEditBox.autoSave){
+ // Hide the save/cancel buttons since saving is done by simply tabbing away or
+ // selecting a value from the drop down list
this.buttonContainer.style.display="none";
- }
+
+ // Selecting a value from a drop down list causes an onChange event and then we save
+ this.connect(ew, "onChange", "_onChange");
+
+ // ESC and TAB should cancel and save. Note that edit widgets do a stopEvent() on ESC key (to
+ // prevent Dialog from closing when the user just wants to revert the value in the edit widget),
+ // so this is the only way we can see the key press event.
+ this.connect(ew, "onKeyPress", "_onKeyPress");
+ }else{
+ // If possible, enable/disable save button based on whether the user has changed the value
+ if("intermediateChanges" in cls.prototype){
+ ew.attr("intermediateChanges", true);
+ this.connect(ew, "onChange", "_onIntermediateChange");
+ this.saveButton.attr("disabled", true);
+ }
+ }
+ },
+
+ _onIntermediateChange: function(val){
+ // summary:
+ // Called for editor widgets that support the intermediateChanges=true flag as a way
+ // to detect when to enable/disabled the save button
+ this.saveButton.attr("disabled", (this.getValue() == this._resetValue) || !this.enableSave());
},
destroy: function(){
- this.editWidget.destroy();
+ this.editWidget.destroy(true); // let the parent wrapper widget clean up the DOM
this.inherited(arguments);
},
getValue: function(){
+ // summary:
+ // Return the [display] value of the edit widget
var ew = this.editWidget;
- return ew.getDisplayedValue ? ew.getDisplayedValue() : ew.getValue();
+ return String(ew.attr("displayedValue" in ew ? "displayedValue" : "value"));
},
_onKeyPress: function(e){
- // summary: Callback when keypress in the edit box (see template).
+ // summary:
+ // Handler for keypress in the edit box in autoSave mode.
// description:
// For autoSave widgets, if Esc/Enter, call cancel/save.
- // For non-autoSave widgets, enable save button if the text value is
- // different than the original value.
- if(this._exitInProgress){
- return;
- }
- if(this.autoSave){
+ // tags:
+ // private
+
+ if(this.inlineEditBox.autoSave && this.inlineEditBox.editing){
+ if(e.altKey || e.ctrlKey){ return; }
// If Enter/Esc pressed, treat as save/cancel.
- if(e.keyCode == dojo.keys.ESCAPE){
+ if(e.charOrCode == dojo.keys.ESCAPE){
+ dojo.stopEvent(e);
+ this.cancel(true); // sets editing=false which short-circuits _onBlur processing
+ }else if(e.charOrCode == dojo.keys.ENTER && e.target.tagName == "INPUT"){
dojo.stopEvent(e);
- this._exitInProgress = true;
- this.cancel(true);
- }else if(e.keyCode == dojo.keys.ENTER){
- dojo.stopEvent(e);
- this._exitInProgress = true;
- this.save(true);
- }
- }else{
- var _this = this;
- // Delay before calling getValue().
- // The delay gives the browser a chance to update the Textarea.
- setTimeout(
- function(){
- _this.saveButton.setDisabled(_this.getValue() == _this._initialText);
- }, 100);
+ this._onChange(); // fire _onBlur and then save
+ }
+
+ // _onBlur will handle TAB automatically by allowing
+ // the TAB to change focus before we mess with the DOM: #6227
+ // Expounding by request:
+ // The current focus is on the edit widget input field.
+ // save() will hide and destroy this widget.
+ // We want the focus to jump from the currently hidden
+ // displayNode, but since it's hidden, it's impossible to
+ // unhide it, focus it, and then have the browser focus
+ // away from it to the next focusable element since each
+ // of these events is asynchronous and the focus-to-next-element
+ // is already queued.
+ // So we allow the browser time to unqueue the move-focus event
+ // before we do all the hide/show stuff.
}
},
_onBlur: function(){
// summary:
- // Called when focus moves outside the editor
- if(this._exitInProgress){
- // when user clicks the "save" button, focus is shifted back to display text, causing this
- // function to be called, but in that case don't do anything
- return;
- }
- if(this.autoSave){
- this._exitInProgress = true;
- if(this.getValue() == this._initialText){
+ // Called when focus moves outside the editor
+ // tags:
+ // private
+
+ this.inherited(arguments);
+ if(this.inlineEditBox.autoSave && this.inlineEditBox.editing){
+ if(this.getValue() == this._resetValue){
this.cancel(false);
- }else{
+ }else if(this.enableSave()){
this.save(false);
}
}
},
+ _onChange: function(){
+ // summary:
+ // Called when the underlying widget fires an onChange event,
+ // such as when the user selects a value from the drop down list of a ComboBox,
+ // which means that the user has finished entering the value and we should save.
+ // tags:
+ // private
+
+ if(this.inlineEditBox.autoSave && this.inlineEditBox.editing && this.enableSave()){
+ dojo.style(this.inlineEditBox.displayNode, { display: "" });
+ dijit.focus(this.inlineEditBox.displayNode); // fires _onBlur which will save the formatted value
+ }
+ },
+
enableSave: function(){
- // summary: User replacable function returning a Boolean to indicate
- // if the Save button should be enabled or not - usually due to invalid conditions
- return this.editWidget.isValid ? this.editWidget.isValid() : true; // Boolean
- },
-
- _onChange: function(){
- // summary:
- // Called when the underlying widget fires an onChange event,
- // which means that the user has finished entering the value
-
- if(this._ignoreNextOnChange){
- delete this._ignoreNextOnChange;
- return;
- }
- if(this._exitInProgress){
- // TODO: the onChange event might happen after the return key for an async widget
- // like FilteringSelect. Shouldn't be deleting the edit widget on end-of-edit
- return;
- }
- if(this.autoSave){
- this._exitInProgress = true;
- this.save(true);
- }else{
- // in case the keypress event didn't get through (old problem with Textarea that has been fixed
- // in theory) or if the keypress event comes too quickly and the value inside the Textarea hasn't
- // been updated yet)
- this.saveButton.setDisabled((this.getValue() == this._initialText) || !this.enableSave());
- }
- },
-
- enableSave: function(){
- // summary: User replacable function returning a Boolean to indicate
- // if the Save button should be enabled or not - usually due to invalid conditions
- return this.editWidget.isValid ? this.editWidget.isValid() : true;
+ // summary:
+ // User overridable function returning a Boolean to indicate
+ // if the Save button should be enabled or not - usually due to invalid conditions
+ // tags:
+ // extension
+ return (
+ this.editWidget.isValid
+ ? this.editWidget.isValid()
+ : true
+ );
},
focus: function(){
+ // summary:
+ // Focus the edit widget.
+ // tags:
+ // protected
+
this.editWidget.focus();
- dijit.selectInputText(this.editWidget.focusNode);
- }
-});
-
-dijit.selectInputText = function(/*DomNode*/element){
- // summary: select all the text in an input element
-
- // TODO: use functions in _editor/selection.js?
- var _window = dojo.global;
- var _document = dojo.doc;
- element = dojo.byId(element);
- if(_document["selection"] && dojo.body()["createTextRange"]){ // IE
- if(element.createTextRange){
- var range = element.createTextRange();
- range.moveStart("character", 0);
- range.moveEnd("character", element.value.length);
- range.select();
- }
- }else if(_window["getSelection"]){
- var selection = _window.getSelection();
- // FIXME: does this work on Safari?
- if(element.setSelectionRange){
- element.setSelectionRange(0, element.value.length);
- }
- }
- element.focus();
-};
+ setTimeout(dojo.hitch(this, function(){
+ if(this.editWidget.focusNode.tagName == "INPUT"){
+ dijit.selectInputText(this.editWidget.focusNode);
+ }
+ }), 0);
+ }
+});
+
+}
+
+if(!dojo._hasResource["dijit.form.Form"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form.Form"] = true;
+dojo.provide("dijit.form.Form");
+
+
+
+
+
+dojo.declare(
+ "dijit.form.Form",
+ [dijit._Widget, dijit._Templated, dijit.form._FormMixin],
+ {
+ // summary:
+ // Widget corresponding to HTML form tag, for validation and serialization
+ //
+ // example:
+ // | <form dojoType="dijit.form.Form" id="myForm">
+ // | Name: <input type="text" name="name" />
+ // | </form>
+ // | myObj = {name: "John Doe"};
+ // | dijit.byId('myForm').attr('value', myObj);
+ // |
+ // | myObj=dijit.byId('myForm').attr('value');
+
+ // HTML <FORM> attributes
+
+ // name: String?
+ // Name of form for scripting.
+ name: "",
+
+ // action: String?
+ // Server-side form handler.
+ action: "",
+
+ // method: String?
+ // HTTP method used to submit the form, either "GET" or "POST".
+ method: "",
+
+ // encType: String?
+ // Encoding type for the form, ex: application/x-www-form-urlencoded.
+ encType: "",
+
+ // accept-charset: String?
+ // List of supported charsets.
+ "accept-charset": "",
+
+ // accept: String?
+ // List of MIME types for file upload.
+ accept: "",
+
+ // target: String?
+ // Target frame for the document to be opened in.
+ target: "",
+
+ templateString: "<form dojoAttachPoint='containerNode' dojoAttachEvent='onreset:_onReset,onsubmit:_onSubmit' ${nameAttrSetting}></form>",
+
+ attributeMap: dojo.delegate(dijit._Widget.prototype.attributeMap, {
+ action: "",
+ method: "",
+ encType: "",
+ "accept-charset": "",
+ accept: "",
+ target: ""
+ }),
+
+ postMixInProperties: function(){
+ // Setup name=foo string to be referenced from the template (but only if a name has been specified)
+ // Unfortunately we can't use attributeMap to set the name due to IE limitations, see #8660
+ this.nameAttrSetting = this.name ? ("name='" + this.name + "'") : "";
+ this.inherited(arguments);
+ },
+
+ execute: function(/*Object*/ formContents){
+ // summary:
+ // Deprecated: use submit()
+ // tags:
+ // deprecated
+ },
+
+ onExecute: function(){
+ // summary:
+ // Deprecated: use onSubmit()
+ // tags:
+ // deprecated
+ },
+
+ _setEncTypeAttr: function(/*String*/ value){
+ this.encType = value;
+ dojo.attr(this.domNode, "encType", value);
+ if(dojo.isIE){ this.domNode.encoding = value; }
+ },
+
+ postCreate: function(){
+ // IE tries to hide encType
+ // TODO: this code should be in parser, not here.
+ if(dojo.isIE && this.srcNodeRef && this.srcNodeRef.attributes){
+ var item = this.srcNodeRef.attributes.getNamedItem('encType');
+ if(item && !item.specified && (typeof item.value == "string")){
+ this.attr('encType', item.value);
+ }
+ }
+ this.inherited(arguments);
+ },
+
+ onReset: function(/*Event?*/ e){
+ // summary:
+ // Callback when user resets the form. This method is intended
+ // to be over-ridden. When the `reset` method is called
+ // programmatically, the return value from `onReset` is used
+ // to compute whether or not resetting should proceed
+ // tags:
+ // callback
+ return true; // Boolean
+ },
+
+ _onReset: function(e){
+ // create fake event so we can know if preventDefault() is called
+ var faux = {
+ returnValue: true, // the IE way
+ preventDefault: function(){ // not IE
+ this.returnValue = false;
+ },
+ stopPropagation: function(){}, currentTarget: e.currentTarget, target: e.target
+ };
+ // if return value is not exactly false, and haven't called preventDefault(), then reset
+ if(!(this.onReset(faux) === false) && faux.returnValue){
+ this.reset();
+ }
+ dojo.stopEvent(e);
+ return false;
+ },
+
+ _onSubmit: function(e){
+ var fp = dijit.form.Form.prototype;
+ // TODO: remove this if statement beginning with 2.0
+ if(this.execute != fp.execute || this.onExecute != fp.onExecute){
+ dojo.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.", "", "2.0");
+ this.onExecute();
+ this.execute(this.getValues());
+ }
+ if(this.onSubmit(e) === false){ // only exactly false stops submit
+ dojo.stopEvent(e);
+ }
+ },
+
+ onSubmit: function(/*Event?*/e){
+ // summary:
+ // Callback when user submits the form.
+ // description:
+ // This method is intended to be over-ridden, but by default it checks and
+ // returns the validity of form elements. When the `submit`
+ // method is called programmatically, the return value from
+ // `onSubmit` is used to compute whether or not submission
+ // should proceed
+ // tags:
+ // extension
+
+ return this.isValid(); // Boolean
+ },
+
+ submit: function(){
+ // summary:
+ // programmatically submit form if and only if the `onSubmit` returns true
+ if(!(this.onSubmit() === false)){
+ this.containerNode.submit();
+ }
+ }
+ }
+);
+
+}
+
+if(!dojo._hasResource["dijit.form.DropDownButton"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form.DropDownButton"] = true;
+dojo.provide("dijit.form.DropDownButton");
+
+
+
+}
+
+if(!dojo._hasResource["dijit.form.ComboButton"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form.ComboButton"] = true;
+dojo.provide("dijit.form.ComboButton");
+
+
+}
+
+if(!dojo._hasResource["dijit.form.ToggleButton"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form.ToggleButton"] = true;
+dojo.provide("dijit.form.ToggleButton");
}
if(!dojo._hasResource["dijit.form.CheckBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.form.CheckBox"] = true;
dojo.provide("dijit.form.CheckBox");
dojo.declare(
"dijit.form.CheckBox",
dijit.form.ToggleButton,
{
// summary:
// Same as an HTML checkbox, but with fancy styling.
//
// description:
// User interacts with real html inputs.
// On onclick (which occurs by mouse click, space-bar, or
// using the arrow keys to switch the selected radio button),
// we update the state of the checkbox/radio.
//
// There are two modes:
// 1. High contrast mode
// 2. Normal mode
// In case 1, the regular html inputs are shown and used by the user.
// In case 2, the regular html inputs are invisible but still used by
// the user. They are turned quasi-invisible and overlay the background-image.
- templateString:"<fieldset class=\"dijitReset dijitInline\" waiRole=\"presentation\"\n\t><input\n\t \ttype=\"${type}\" name=\"${name}\"\n\t\tclass=\"dijitReset dijitCheckBoxInput\"\n\t\tdojoAttachPoint=\"inputNode,focusNode\"\n\t \tdojoAttachEvent=\"onmouseover:_onMouse,onmouseout:_onMouse,onclick:_onClick\"\n/></fieldset>\n",
+ templateString: dojo.cache("dijit.form", "templates/CheckBox.html", "<div class=\"dijitReset dijitInline\" waiRole=\"presentation\"\n\t><input\n\t \t${nameAttrSetting} type=\"${type}\" ${checkedAttrSetting}\n\t\tclass=\"dijitReset dijitCheckBoxInput\"\n\t\tdojoAttachPoint=\"focusNode\"\n\t \tdojoAttachEvent=\"onmouseover:_onMouse,onmouseout:_onMouse,onclick:_onClick\"\n/></div>\n"),
baseClass: "dijitCheckBox",
- // Value of "type" attribute for <input>
+ // type: [private] String
+ // type attribute on <input> node.
+ // Overrides `dijit.form.Button.type`. Users should not change this value.
type: "checkbox",
- // value: Value
- // equivalent to value field on normal checkbox (if checked, the value is passed as
- // the value when form is submitted)
+ // value: String
+ // As an initialization parameter, equivalent to value field on normal checkbox
+ // (if checked, the value is passed as the value when form is submitted).
+ //
+ // However, attr('value') will return either the string or false depending on
+ // whether or not the checkbox is checked.
+ //
+ // attr('value', string) will check the checkbox and change the value to the
+ // specified string
+ //
+ // attr('value', boolean) will change the checked state.
value: "on",
- postCreate: function(){
- dojo.setSelectable(this.inputNode, false);
- this.setChecked(this.checked);
- this.inherited(arguments);
- },
-
- setChecked: function(/*Boolean*/ checked){
- if(dojo.isIE){
- if(checked){ this.inputNode.setAttribute('checked', 'checked'); }
- else{ this.inputNode.removeAttribute('checked'); }
- }else{ this.inputNode.checked = checked; }
- this.inherited(arguments);
- },
-
- setValue: function(/*String*/ value){
- if(value == null){ value = ""; }
- this.inputNode.value = value;
- dijit.form.CheckBox.superclass.setValue.call(this,value);
+ // readOnly: Boolean
+ // Should this widget respond to user input?
+ // In markup, this is specified as "readOnly".
+ // Similar to disabled except readOnly form values are submitted.
+ readOnly: false,
+
+ attributeMap: dojo.delegate(dijit.form.ToggleButton.prototype.attributeMap, {
+ readOnly: "focusNode"
+ }),
+
+ _setReadOnlyAttr: function(/*Boolean*/ value){
+ this.readOnly = value;
+ dojo.attr(this.focusNode, 'readOnly', value);
+ dijit.setWaiState(this.focusNode, "readonly", value);
+ this._setStateClass();
+ },
+
+ _setValueAttr: function(/*String or Boolean*/ newValue){
+ // summary:
+ // Handler for value= attribute to constructor, and also calls to
+ // attr('value', val).
+ // description:
+ // During initialization, just saves as attribute to the <input type=checkbox>.
+ //
+ // After initialization,
+ // when passed a boolean, controls whether or not the CheckBox is checked.
+ // If passed a string, changes the value attribute of the CheckBox (the one
+ // specified as "value" when the CheckBox was constructed (ex: <input
+ // dojoType="dijit.CheckBox" value="chicken">)
+ if(typeof newValue == "string"){
+ this.value = newValue;
+ dojo.attr(this.focusNode, 'value', newValue);
+ newValue = true;
+ }
+ if(this._created){
+ this.attr('checked', newValue);
+ }
+ },
+ _getValueAttr: function(){
+ // summary:
+ // Hook so attr('value') works.
+ // description:
+ // If the CheckBox is checked, returns the value attribute.
+ // Otherwise returns false.
+ return (this.checked ? this.value : false);
+ },
+
+ postMixInProperties: function(){
+ if(this.value == ""){
+ this.value = "on";
+ }
+
+ // Need to set initial checked state as part of template, so that form submit works.
+ // dojo.attr(node, "checked", bool) doesn't work on IEuntil node has been attached
+ // to <body>, see #8666
+ this.checkedAttrSetting = this.checked ? "checked" : "";
+
+ this.inherited(arguments);
+ },
+
+ _fillContent: function(/*DomNode*/ source){
+ // Override Button::_fillContent() since it doesn't make sense for CheckBox,
+ // since CheckBox doesn't even have a container
+ },
+
+ reset: function(){
+ // Override ToggleButton.reset()
+
+ this._hasBeenBlurred = false;
+
+ this.attr('checked', this.params.checked || false);
+
+ // Handle unlikely event that the <input type=checkbox> value attribute has changed
+ this.value = this.params.value || "on";
+ dojo.attr(this.focusNode, 'value', this.value);
+ },
+
+ _onFocus: function(){
+ if(this.id){
+ dojo.query("label[for='"+this.id+"']").addClass("dijitFocusedLabel");
+ }
+ },
+
+ _onBlur: function(){
+ if(this.id){
+ dojo.query("label[for='"+this.id+"']").removeClass("dijitFocusedLabel");
+ }
+ },
+
+ _onClick: function(/*Event*/ e){
+ // summary:
+ // Internal function to handle click actions - need to check
+ // readOnly, since button no longer does that check.
+ if(this.readOnly){
+ return false;
+ }
+ return this.inherited(arguments);
}
}
);
dojo.declare(
"dijit.form.RadioButton",
dijit.form.CheckBox,
{
// summary:
// Same as an HTML radio, but with fancy styling.
- //
- // description:
- // Implementation details
- //
- // Specialization:
- // We keep track of dijit radio groups so that we can update the state
- // of all the siblings (the "context") in a group based on input
- // events. We don't rely on browser radio grouping.
type: "radio",
baseClass: "dijitRadio",
- // This shared object keeps track of all widgets, grouped by name
- _groups: {},
-
- postCreate: function(){
- // add this widget to _groups
- (this._groups[this.name] = this._groups[this.name] || []).push(this);
-
- this.inherited(arguments);
- },
-
- uninitialize: function(){
- // remove this widget from _groups
- dojo.forEach(this._groups[this.name], function(widget, i, arr){
- if(widget === this){
- arr.splice(i, 1);
- return;
- }
- }, this);
- },
-
- setChecked: function(/*Boolean*/ checked){
+ _setCheckedAttr: function(/*Boolean*/ value){
// If I am being checked then have to deselect currently checked radio button
- if(checked){
- dojo.forEach(this._groups[this.name], function(widget){
- if(widget != this && widget.checked){
- widget.setChecked(false);
- }
- }, this);
- }
- this.inherited(arguments);
+ this.inherited(arguments);
+ if(!this._created){ return; }
+ if(value){
+ var _this = this;
+ // search for radio buttons with the same name that need to be unchecked
+ dojo.query("INPUT[type=radio]", this.focusNode.form || dojo.doc).forEach( // can't use name= since dojo.query doesn't support [] in the name
+ function(inputNode){
+ if(inputNode.name == _this.name && inputNode != _this.focusNode && inputNode.form == _this.focusNode.form){
+ var widget = dijit.getEnclosingWidget(inputNode);
+ if(widget && widget.checked){
+ widget.attr('checked', false);
+ }
+ }
+ }
+ );
+ }
},
_clicked: function(/*Event*/ e){
if(!this.checked){
- this.setChecked(true);
+ this.attr('checked', true);
}
}
}
);
}
-if(!dojo._hasResource["dojo.data.util.filter"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.data.util.filter"] = true;
-dojo.provide("dojo.data.util.filter");
-
-dojo.data.util.filter.patternToRegExp = function(/*String*/pattern, /*boolean?*/ ignoreCase){
- // summary:
- // Helper function to convert a simple pattern to a regular expression for matching.
- // description:
- // Returns a regular expression object that conforms to the defined conversion rules.
- // For example:
- // ca* -> /^ca.*$/
- // *ca* -> /^.*ca.*$/
- // *c\*a* -> /^.*c\*a.*$/
- // *c\*a?* -> /^.*c\*a..*$/
- // and so on.
- //
- // pattern: string
- // A simple matching pattern to convert that follows basic rules:
- // * Means match anything, so ca* means match anything starting with ca
- // ? Means match single character. So, b?b will match to bob and bab, and so on.
- // \ is an escape character. So for example, \* means do not treat * as a match, but literal character *.
- // To use a \ as a character in the string, it must be escaped. So in the pattern it should be
- // represented by \\ to be treated as an ordinary \ character instead of an escape.
- //
- // ignoreCase:
- // An optional flag to indicate if the pattern matching should be treated as case-sensitive or not when comparing
- // By default, it is assumed case sensitive.
-
- var rxp = "^";
- var c = null;
- for(var i = 0; i < pattern.length; i++){
- c = pattern.charAt(i);
- switch (c) {
- case '\\':
- rxp += c;
- i++;
- rxp += pattern.charAt(i);
- break;
- case '*':
- rxp += ".*"; break;
- case '?':
- rxp += "."; break;
- case '$':
- case '^':
- case '/':
- case '+':
- case '.':
- case '|':
- case '(':
- case ')':
- case '{':
- case '}':
- case '[':
- case ']':
- rxp += "\\"; //fallthrough
- default:
- rxp += c;
- }
- }
- rxp += "$";
- if(ignoreCase){
- return new RegExp(rxp,"i"); //RegExp
- }else{
- return new RegExp(rxp); //RegExp
- }
-
-};
-
-}
-
-if(!dojo._hasResource["dojo.data.util.sorter"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.data.util.sorter"] = true;
-dojo.provide("dojo.data.util.sorter");
-
-dojo.data.util.sorter.basicComparator = function( /*anything*/ a,
- /*anything*/ b){
- // summary:
- // Basic comparision function that compares if an item is greater or less than another item
- // description:
- // returns 1 if a > b, -1 if a < b, 0 if equal.
- // undefined values are treated as larger values so that they're pushed to the end of the list.
-
- var ret = 0;
- if(a > b || typeof a === "undefined" || a === null){
- ret = 1;
- }else if(a < b || typeof b === "undefined" || b === null){
- ret = -1;
- }
- return ret; //int, {-1,0,1}
-};
-
-dojo.data.util.sorter.createSortFunction = function( /* attributes array */sortSpec,
- /*dojo.data.core.Read*/ store){
- // summary:
- // Helper function to generate the sorting function based off the list of sort attributes.
- // description:
- // The sort function creation will look for a property on the store called 'comparatorMap'. If it exists
- // it will look in the mapping for comparisons function for the attributes. If one is found, it will
- // use it instead of the basic comparator, which is typically used for strings, ints, booleans, and dates.
- // Returns the sorting function for this particular list of attributes and sorting directions.
- //
- // sortSpec: array
- // A JS object that array that defines out what attribute names to sort on and whether it should be descenting or asending.
- // The objects should be formatted as follows:
- // {
- // attribute: "attributeName-string" || attribute,
- // descending: true|false; // Default is false.
- // }
- // store: object
- // The datastore object to look up item values from.
- //
- var sortFunctions=[];
-
- function createSortFunction(attr, dir){
- return function(itemA, itemB){
- var a = store.getValue(itemA, attr);
- var b = store.getValue(itemB, attr);
- //See if we have a override for an attribute comparison.
- var comparator = null;
- if(store.comparatorMap){
- if(typeof attr !== "string"){
- attr = store.getIdentity(attr);
- }
- comparator = store.comparatorMap[attr]||dojo.data.util.sorter.basicComparator;
- }
- comparator = comparator||dojo.data.util.sorter.basicComparator;
- return dir * comparator(a,b); //int
- };
- }
-
- for(var i = 0; i < sortSpec.length; i++){
- sortAttribute = sortSpec[i];
- if(sortAttribute.attribute){
- var direction = (sortAttribute.descending) ? -1 : 1;
- sortFunctions.push(createSortFunction(sortAttribute.attribute, direction));
- }
- }
-
- return function(rowA, rowB){
- var i=0;
- while(i < sortFunctions.length){
- var ret = sortFunctions[i++](rowA, rowB);
- if(ret !== 0){
- return ret;//int
- }
- }
- return 0; //int
- }; // Function
-};
-
-}
-
-if(!dojo._hasResource["dojo.data.util.simpleFetch"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.data.util.simpleFetch"] = true;
-dojo.provide("dojo.data.util.simpleFetch");
-
-
-dojo.data.util.simpleFetch.fetch = function(/* Object? */ request){
- // summary:
- // The simpleFetch mixin is designed to serve as a set of function(s) that can
- // be mixed into other datastore implementations to accelerate their development.
- // The simpleFetch mixin should work well for any datastore that can respond to a _fetchItems()
- // call by returning an array of all the found items that matched the query. The simpleFetch mixin
- // is not designed to work for datastores that respond to a fetch() call by incrementally
- // loading items, or sequentially loading partial batches of the result
- // set. For datastores that mixin simpleFetch, simpleFetch
- // implements a fetch method that automatically handles eight of the fetch()
- // arguments -- onBegin, onItem, onComplete, onError, start, count, sort and scope
- // The class mixing in simpleFetch should not implement fetch(),
- // but should instead implement a _fetchItems() method. The _fetchItems()
- // method takes three arguments, the keywordArgs object that was passed
- // to fetch(), a callback function to be called when the result array is
- // available, and an error callback to be called if something goes wrong.
- // The _fetchItems() method should ignore any keywordArgs parameters for
- // start, count, onBegin, onItem, onComplete, onError, sort, and scope.
- // The _fetchItems() method needs to correctly handle any other keywordArgs
- // parameters, including the query parameter and any optional parameters
- // (such as includeChildren). The _fetchItems() method should create an array of
- // result items and pass it to the fetchHandler along with the original request object
- // -- or, the _fetchItems() method may, if it wants to, create an new request object
- // with other specifics about the request that are specific to the datastore and pass
- // that as the request object to the handler.
- //
- // For more information on this specific function, see dojo.data.api.Read.fetch()
- request = request || {};
- if(!request.store){
- request.store = this;
- }
- var self = this;
-
- var _errorHandler = function(errorData, requestObject){
- if(requestObject.onError){
- var scope = requestObject.scope || dojo.global;
- requestObject.onError.call(scope, errorData, requestObject);
- }
- };
-
- var _fetchHandler = function(items, requestObject){
- var oldAbortFunction = requestObject.abort || null;
- var aborted = false;
-
- var startIndex = requestObject.start?requestObject.start:0;
- var endIndex = requestObject.count?(startIndex + requestObject.count):items.length;
-
- requestObject.abort = function(){
- aborted = true;
- if(oldAbortFunction){
- oldAbortFunction.call(requestObject);
- }
- };
-
- var scope = requestObject.scope || dojo.global;
- if(!requestObject.store){
- requestObject.store = self;
- }
- if(requestObject.onBegin){
- requestObject.onBegin.call(scope, items.length, requestObject);
- }
- if(requestObject.sort){
- items.sort(dojo.data.util.sorter.createSortFunction(requestObject.sort, self));
- }
- if(requestObject.onItem){
- for(var i = startIndex; (i < items.length) && (i < endIndex); ++i){
- var item = items[i];
- if(!aborted){
- requestObject.onItem.call(scope, item, requestObject);
- }
- }
- }
- if(requestObject.onComplete && !aborted){
- var subset = null;
- if (!requestObject.onItem) {
- subset = items.slice(startIndex, endIndex);
- }
- requestObject.onComplete.call(scope, subset, requestObject);
- }
- };
- this._fetchItems(request, _fetchHandler, _errorHandler);
- return request; // Object
-};
-
-}
-
-if(!dojo._hasResource["dojo.data.ItemFileReadStore"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.data.ItemFileReadStore"] = true;
-dojo.provide("dojo.data.ItemFileReadStore");
-
-
-
-
-
-dojo.declare("dojo.data.ItemFileReadStore", null,{
- // summary:
- // The ItemFileReadStore implements the dojo.data.api.Read API and reads
- // data from JSON files that have contents in this format --
- // { items: [
- // { name:'Kermit', color:'green', age:12, friends:['Gonzo', {_reference:{name:'Fozzie Bear'}}]},
- // { name:'Fozzie Bear', wears:['hat', 'tie']},
- // { name:'Miss Piggy', pets:'Foo-Foo'}
- // ]}
- // Note that it can also contain an 'identifer' property that specified which attribute on the items
- // in the array of items that acts as the unique identifier for that item.
- //
- constructor: function(/* Object */ keywordParameters){
- // summary: constructor
- // keywordParameters: {url: String}
- // keywordParameters: {data: jsonObject}
- // keywordParameters: {typeMap: object)
- // The structure of the typeMap object is as follows:
- // {
- // type0: function || object,
- // type1: function || object,
- // ...
- // typeN: function || object
- // }
- // Where if it is a function, it is assumed to be an object constructor that takes the
- // value of _value as the initialization parameters. If it is an object, then it is assumed
- // to be an object of general form:
- // {
- // type: function, //constructor.
- // deserialize: function(value) //The function that parses the value and constructs the object defined by type appropriately.
- // }
-
- this._arrayOfAllItems = [];
- this._arrayOfTopLevelItems = [];
- this._loadFinished = false;
- this._jsonFileUrl = keywordParameters.url;
- this._jsonData = keywordParameters.data;
- this._datatypeMap = keywordParameters.typeMap || {};
- if(!this._datatypeMap['Date']){
- //If no default mapping for dates, then set this as default.
- //We use the dojo.date.stamp here because the ISO format is the 'dojo way'
- //of generically representing dates.
- this._datatypeMap['Date'] = {
- type: Date,
- deserialize: function(value){
- return dojo.date.stamp.fromISOString(value);
- }
- };
- }
- this._features = {'dojo.data.api.Read':true, 'dojo.data.api.Identity':true};
- this._itemsByIdentity = null;
- this._storeRefPropName = "_S"; // Default name for the store reference to attach to every item.
- this._itemNumPropName = "_0"; // Default Item Id for isItem to attach to every item.
- this._rootItemPropName = "_RI"; // Default Item Id for isItem to attach to every item.
- this._loadInProgress = false; //Got to track the initial load to prevent duelling loads of the dataset.
- this._queuedFetches = [];
- },
-
- url: "", // use "" rather than undefined for the benefit of the parser (#3539)
-
- _assertIsItem: function(/* item */ item){
- // summary:
- // This function tests whether the item passed in is indeed an item in the store.
- // item:
- // The item to test for being contained by the store.
- if(!this.isItem(item)){
- throw new Error("dojo.data.ItemFileReadStore: Invalid item argument.");
- }
- },
-
- _assertIsAttribute: function(/* attribute-name-string */ attribute){
- // summary:
- // This function tests whether the item passed in is indeed a valid 'attribute' like type for the store.
- // attribute:
- // The attribute to test for being contained by the store.
- if(typeof attribute !== "string"){
- throw new Error("dojo.data.ItemFileReadStore: Invalid attribute argument.");
- }
- },
-
- getValue: function( /* item */ item,
- /* attribute-name-string */ attribute,
- /* value? */ defaultValue){
- // summary:
- // See dojo.data.api.Read.getValue()
- var values = this.getValues(item, attribute);
- return (values.length > 0)?values[0]:defaultValue; // mixed
- },
-
- getValues: function(/* item */ item,
- /* attribute-name-string */ attribute){
- // summary:
- // See dojo.data.api.Read.getValues()
-
- this._assertIsItem(item);
- this._assertIsAttribute(attribute);
- return item[attribute] || []; // Array
- },
-
- getAttributes: function(/* item */ item){
- // summary:
- // See dojo.data.api.Read.getAttributes()
- this._assertIsItem(item);
- var attributes = [];
- for(var key in item){
- // Save off only the real item attributes, not the special id marks for O(1) isItem.
- if((key !== this._storeRefPropName) && (key !== this._itemNumPropName) && (key !== this._rootItemPropName)){
- attributes.push(key);
- }
- }
- return attributes; // Array
- },
-
- hasAttribute: function( /* item */ item,
- /* attribute-name-string */ attribute) {
- // summary:
- // See dojo.data.api.Read.hasAttribute()
- return this.getValues(item, attribute).length > 0;
- },
-
- containsValue: function(/* item */ item,
- /* attribute-name-string */ attribute,
- /* anything */ value){
- // summary:
- // See dojo.data.api.Read.containsValue()
- var regexp = undefined;
- if(typeof value === "string"){
- regexp = dojo.data.util.filter.patternToRegExp(value, false);
- }
- return this._containsValue(item, attribute, value, regexp); //boolean.
- },
-
- _containsValue: function( /* item */ item,
- /* attribute-name-string */ attribute,
- /* anything */ value,
- /* RegExp?*/ regexp){
- // summary:
- // Internal function for looking at the values contained by the item.
- // description:
- // Internal function for looking at the values contained by the item. This
- // function allows for denoting if the comparison should be case sensitive for
- // strings or not (for handling filtering cases where string case should not matter)
- //
- // item:
- // The data item to examine for attribute values.
- // attribute:
- // The attribute to inspect.
- // value:
- // The value to match.
- // regexp:
- // Optional regular expression generated off value if value was of string type to handle wildcarding.
- // If present and attribute values are string, then it can be used for comparison instead of 'value'
- return dojo.some(this.getValues(item, attribute), function(possibleValue){
- if(possibleValue !== null && !dojo.isObject(possibleValue) && regexp){
- if(possibleValue.toString().match(regexp)){
- return true; // Boolean
- }
- }else if(value === possibleValue){
- return true; // Boolean
- }
- });
- },
-
- isItem: function(/* anything */ something){
- // summary:
- // See dojo.data.api.Read.isItem()
- if(something && something[this._storeRefPropName] === this){
- if(this._arrayOfAllItems[something[this._itemNumPropName]] === something){
- return true;
- }
- }
- return false; // Boolean
- },
-
- isItemLoaded: function(/* anything */ something){
- // summary:
- // See dojo.data.api.Read.isItemLoaded()
- return this.isItem(something); //boolean
- },
-
- loadItem: function(/* object */ keywordArgs){
- // summary:
- // See dojo.data.api.Read.loadItem()
- this._assertIsItem(keywordArgs.item);
- },
-
- getFeatures: function(){
- // summary:
- // See dojo.data.api.Read.getFeatures()
- return this._features; //Object
- },
-
- getLabel: function(/* item */ item){
- // summary:
- // See dojo.data.api.Read.getLabel()
- if(this._labelAttr && this.isItem(item)){
- return this.getValue(item,this._labelAttr); //String
- }
- return undefined; //undefined
- },
-
- getLabelAttributes: function(/* item */ item){
- // summary:
- // See dojo.data.api.Read.getLabelAttributes()
- if(this._labelAttr){
- return [this._labelAttr]; //array
- }
- return null; //null
- },
-
- _fetchItems: function( /* Object */ keywordArgs,
- /* Function */ findCallback,
- /* Function */ errorCallback){
- // summary:
- // See dojo.data.util.simpleFetch.fetch()
- var self = this;
- var filter = function(requestArgs, arrayOfItems){
- var items = [];
- if(requestArgs.query){
- var ignoreCase = requestArgs.queryOptions ? requestArgs.queryOptions.ignoreCase : false;
-
- //See if there are any string values that can be regexp parsed first to avoid multiple regexp gens on the
- //same value for each item examined. Much more efficient.
- var regexpList = {};
- for(var key in requestArgs.query){
- var value = requestArgs.query[key];
- if(typeof value === "string"){
- regexpList[key] = dojo.data.util.filter.patternToRegExp(value, ignoreCase);
- }
- }
-
- for(var i = 0; i < arrayOfItems.length; ++i){
- var match = true;
- var candidateItem = arrayOfItems[i];
- if(candidateItem === null){
- match = false;
- }else{
- for(var key in requestArgs.query) {
- var value = requestArgs.query[key];
- if (!self._containsValue(candidateItem, key, value, regexpList[key])){
- match = false;
- }
- }
- }
- if(match){
- items.push(candidateItem);
- }
- }
- findCallback(items, requestArgs);
- }else{
- // We want a copy to pass back in case the parent wishes to sort the array.
- // We shouldn't allow resort of the internal list, so that multiple callers
- // can get lists and sort without affecting each other. We also need to
- // filter out any null values that have been left as a result of deleteItem()
- // calls in ItemFileWriteStore.
- for(var i = 0; i < arrayOfItems.length; ++i){
- var item = arrayOfItems[i];
- if(item !== null){
- items.push(item);
- }
- }
- findCallback(items, requestArgs);
- }
- };
-
- if(this._loadFinished){
- filter(keywordArgs, this._getItemsArray(keywordArgs.queryOptions));
- }else{
-
- if(this._jsonFileUrl){
- //If fetches come in before the loading has finished, but while
- //a load is in progress, we have to defer the fetching to be
- //invoked in the callback.
- if(this._loadInProgress){
- this._queuedFetches.push({args: keywordArgs, filter: filter});
- }else{
- this._loadInProgress = true;
- var getArgs = {
- url: self._jsonFileUrl,
- handleAs: "json-comment-optional"
- };
- var getHandler = dojo.xhrGet(getArgs);
- getHandler.addCallback(function(data){
- try{
- self._getItemsFromLoadedData(data);
- self._loadFinished = true;
- self._loadInProgress = false;
-
- filter(keywordArgs, self._getItemsArray(keywordArgs.queryOptions));
- self._handleQueuedFetches();
- }catch(e){
- self._loadFinished = true;
- self._loadInProgress = false;
- errorCallback(e, keywordArgs);
- }
- });
- getHandler.addErrback(function(error){
- self._loadInProgress = false;
- errorCallback(error, keywordArgs);
- });
- }
- }else if(this._jsonData){
- try{
- this._loadFinished = true;
- this._getItemsFromLoadedData(this._jsonData);
- this._jsonData = null;
- filter(keywordArgs, this._getItemsArray(keywordArgs.queryOptions));
- }catch(e){
- errorCallback(e, keywordArgs);
- }
- }else{
- errorCallback(new Error("dojo.data.ItemFileReadStore: No JSON source data was provided as either URL or a nested Javascript object."), keywordArgs);
- }
- }
- },
-
- _handleQueuedFetches: function(){
- // summary:
- // Internal function to execute delayed request in the store.
- //Execute any deferred fetches now.
- if (this._queuedFetches.length > 0) {
- for(var i = 0; i < this._queuedFetches.length; i++){
- var fData = this._queuedFetches[i];
- var delayedQuery = fData.args;
- var delayedFilter = fData.filter;
- if(delayedFilter){
- delayedFilter(delayedQuery, this._getItemsArray(delayedQuery.queryOptions));
- }else{
- this.fetchItemByIdentity(delayedQuery);
- }
- }
- this._queuedFetches = [];
- }
- },
-
- _getItemsArray: function(/*object?*/queryOptions){
- // summary:
- // Internal function to determine which list of items to search over.
- // queryOptions: The query options parameter, if any.
- if(queryOptions && queryOptions.deep) {
- return this._arrayOfAllItems;
- }
- return this._arrayOfTopLevelItems;
- },
-
- close: function(/*dojo.data.api.Request || keywordArgs || null */ request){
- // summary:
- // See dojo.data.api.Read.close()
- },
-
- _getItemsFromLoadedData: function(/* Object */ dataObject){
- // summary:
- // Function to parse the loaded data into item format and build the internal items array.
- // description:
- // Function to parse the loaded data into item format and build the internal items array.
- //
- // dataObject:
- // The JS data object containing the raw data to convery into item format.
- //
- // returns: array
- // Array of items in store item format.
-
- // First, we define a couple little utility functions...
-
- function valueIsAnItem(/* anything */ aValue){
- // summary:
- // Given any sort of value that could be in the raw json data,
- // return true if we should interpret the value as being an
- // item itself, rather than a literal value or a reference.
- // example:
- // | false == valueIsAnItem("Kermit");
- // | false == valueIsAnItem(42);
- // | false == valueIsAnItem(new Date());
- // | false == valueIsAnItem({_type:'Date', _value:'May 14, 1802'});
- // | false == valueIsAnItem({_reference:'Kermit'});
- // | true == valueIsAnItem({name:'Kermit', color:'green'});
- // | true == valueIsAnItem({iggy:'pop'});
- // | true == valueIsAnItem({foo:42});
- var isItem = (
- (aValue != null) &&
- (typeof aValue == "object") &&
- (!dojo.isArray(aValue)) &&
- (!dojo.isFunction(aValue)) &&
- (aValue.constructor == Object) &&
- (typeof aValue._reference == "undefined") &&
- (typeof aValue._type == "undefined") &&
- (typeof aValue._value == "undefined")
- );
- return isItem;
- }
-
- var self = this;
- function addItemAndSubItemsToArrayOfAllItems(/* Item */ anItem){
- self._arrayOfAllItems.push(anItem);
- for(var attribute in anItem){
- var valueForAttribute = anItem[attribute];
- if(valueForAttribute){
- if(dojo.isArray(valueForAttribute)){
- var valueArray = valueForAttribute;
- for(var k = 0; k < valueArray.length; ++k){
- var singleValue = valueArray[k];
- if(valueIsAnItem(singleValue)){
- addItemAndSubItemsToArrayOfAllItems(singleValue);
- }
- }
- }else{
- if(valueIsAnItem(valueForAttribute)){
- addItemAndSubItemsToArrayOfAllItems(valueForAttribute);
- }
- }
- }
- }
- }
-
- this._labelAttr = dataObject.label;
-
- // We need to do some transformations to convert the data structure
- // that we read from the file into a format that will be convenient
- // to work with in memory.
-
- // Step 1: Walk through the object hierarchy and build a list of all items
- var i;
- var item;
- this._arrayOfAllItems = [];
- this._arrayOfTopLevelItems = dataObject.items;
-
- for(i = 0; i < this._arrayOfTopLevelItems.length; ++i){
- item = this._arrayOfTopLevelItems[i];
- addItemAndSubItemsToArrayOfAllItems(item);
- item[this._rootItemPropName]=true;
- }
-
- // Step 2: Walk through all the attribute values of all the items,
- // and replace single values with arrays. For example, we change this:
- // { name:'Miss Piggy', pets:'Foo-Foo'}
- // into this:
- // { name:['Miss Piggy'], pets:['Foo-Foo']}
- //
- // We also store the attribute names so we can validate our store
- // reference and item id special properties for the O(1) isItem
- var allAttributeNames = {};
- var key;
-
- for(i = 0; i < this._arrayOfAllItems.length; ++i){
- item = this._arrayOfAllItems[i];
- for(key in item){
- if (key !== this._rootItemPropName)
- {
- var value = item[key];
- if(value !== null){
- if(!dojo.isArray(value)){
- item[key] = [value];
- }
- }else{
- item[key] = [null];
- }
- }
- allAttributeNames[key]=key;
- }
- }
-
- // Step 3: Build unique property names to use for the _storeRefPropName and _itemNumPropName
- // This should go really fast, it will generally never even run the loop.
- while(allAttributeNames[this._storeRefPropName]){
- this._storeRefPropName += "_";
- }
- while(allAttributeNames[this._itemNumPropName]){
- this._itemNumPropName += "_";
- }
-
- // Step 4: Some data files specify an optional 'identifier', which is
- // the name of an attribute that holds the identity of each item.
- // If this data file specified an identifier attribute, then build a
- // hash table of items keyed by the identity of the items.
- var arrayOfValues;
-
- var identifier = dataObject.identifier;
- if(identifier){
- this._itemsByIdentity = {};
- this._features['dojo.data.api.Identity'] = identifier;
- for(i = 0; i < this._arrayOfAllItems.length; ++i){
- item = this._arrayOfAllItems[i];
- arrayOfValues = item[identifier];
- var identity = arrayOfValues[0];
- if(!this._itemsByIdentity[identity]){
- this._itemsByIdentity[identity] = item;
- }else{
- if(this._jsonFileUrl){
- throw new Error("dojo.data.ItemFileReadStore: The json data as specified by: [" + this._jsonFileUrl + "] is malformed. Items within the list have identifier: [" + identifier + "]. Value collided: [" + identity + "]");
- }else if(this._jsonData){
- throw new Error("dojo.data.ItemFileReadStore: The json data provided by the creation arguments is malformed. Items within the list have identifier: [" + identifier + "]. Value collided: [" + identity + "]");
- }
- }
- }
- }else{
- this._features['dojo.data.api.Identity'] = Number;
- }
-
- // Step 5: Walk through all the items, and set each item's properties
- // for _storeRefPropName and _itemNumPropName, so that store.isItem() will return true.
- for(i = 0; i < this._arrayOfAllItems.length; ++i){
- item = this._arrayOfAllItems[i];
- item[this._storeRefPropName] = this;
- item[this._itemNumPropName] = i;
- }
-
- // Step 6: We walk through all the attribute values of all the items,
- // looking for type/value literals and item-references.
- //
- // We replace item-references with pointers to items. For example, we change:
- // { name:['Kermit'], friends:[{_reference:{name:'Miss Piggy'}}] }
- // into this:
- // { name:['Kermit'], friends:[miss_piggy] }
- // (where miss_piggy is the object representing the 'Miss Piggy' item).
- //
- // We replace type/value pairs with typed-literals. For example, we change:
- // { name:['Nelson Mandela'], born:[{_type:'Date', _value:'July 18, 1918'}] }
- // into this:
- // { name:['Kermit'], born:(new Date('July 18, 1918')) }
- //
- // We also generate the associate map for all items for the O(1) isItem function.
- for(i = 0; i < this._arrayOfAllItems.length; ++i){
- item = this._arrayOfAllItems[i]; // example: { name:['Kermit'], friends:[{_reference:{name:'Miss Piggy'}}] }
- for(key in item){
- arrayOfValues = item[key]; // example: [{_reference:{name:'Miss Piggy'}}]
- for(var j = 0; j < arrayOfValues.length; ++j) {
- value = arrayOfValues[j]; // example: {_reference:{name:'Miss Piggy'}}
- if(value !== null && typeof value == "object"){
- if(value._type && value._value){
- var type = value._type; // examples: 'Date', 'Color', or 'ComplexNumber'
- var mappingObj = this._datatypeMap[type]; // examples: Date, dojo.Color, foo.math.ComplexNumber, {type: dojo.Color, deserialize(value){ return new dojo.Color(value)}}
- if(!mappingObj){
- throw new Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '" + type + "'");
- }else if(dojo.isFunction(mappingObj)){
- arrayOfValues[j] = new mappingObj(value._value);
- }else if(dojo.isFunction(mappingObj.deserialize)){
- arrayOfValues[j] = mappingObj.deserialize(value._value);
- }else{
- throw new Error("dojo.data.ItemFileReadStore: Value provided in typeMap was neither a constructor, nor a an object with a deserialize function");
- }
- }
- if(value._reference){
- var referenceDescription = value._reference; // example: {name:'Miss Piggy'}
- if(dojo.isString(referenceDescription)){
- // example: 'Miss Piggy'
- // from an item like: { name:['Kermit'], friends:[{_reference:'Miss Piggy'}]}
- arrayOfValues[j] = this._itemsByIdentity[referenceDescription];
- }else{
- // example: {name:'Miss Piggy'}
- // from an item like: { name:['Kermit'], friends:[{_reference:{name:'Miss Piggy'}}] }
- for(var k = 0; k < this._arrayOfAllItems.length; ++k){
- var candidateItem = this._arrayOfAllItems[k];
- var found = true;
- for(var refKey in referenceDescription){
- if(candidateItem[refKey] != referenceDescription[refKey]){
- found = false;
- }
- }
- if(found){
- arrayOfValues[j] = candidateItem;
- }
- }
- }
- }
- }
- }
- }
- }
- },
-
- getIdentity: function(/* item */ item){
- // summary:
- // See dojo.data.api.Identity.getIdentity()
- var identifier = this._features['dojo.data.api.Identity'];
- if(identifier === Number){
- return item[this._itemNumPropName]; // Number
- }else{
- var arrayOfValues = item[identifier];
- if(arrayOfValues){
- return arrayOfValues[0]; // Object || String
- }
- }
- return null; // null
- },
-
- fetchItemByIdentity: function(/* Object */ keywordArgs){
- // summary:
- // See dojo.data.api.Identity.fetchItemByIdentity()
-
- // Hasn't loaded yet, we have to trigger the load.
- if(!this._loadFinished){
- var self = this;
- if(this._jsonFileUrl){
-
- if(this._loadInProgress){
- this._queuedFetches.push({args: keywordArgs});
- }else{
- this._loadInProgress = true;
- var getArgs = {
- url: self._jsonFileUrl,
- handleAs: "json-comment-optional"
- };
- var getHandler = dojo.xhrGet(getArgs);
- getHandler.addCallback(function(data){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- try{
- self._getItemsFromLoadedData(data);
- self._loadFinished = true;
- self._loadInProgress = false;
- var item = self._getItemByIdentity(keywordArgs.identity);
- if(keywordArgs.onItem){
- keywordArgs.onItem.call(scope, item);
- }
- self._handleQueuedFetches();
- }catch(error){
- self._loadInProgress = false;
- if(keywordArgs.onError){
- keywordArgs.onError.call(scope, error);
- }
- }
- });
- getHandler.addErrback(function(error){
- self._loadInProgress = false;
- if(keywordArgs.onError){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- keywordArgs.onError.call(scope, error);
- }
- });
- }
-
- }else if(this._jsonData){
- // Passed in data, no need to xhr.
- self._getItemsFromLoadedData(self._jsonData);
- self._jsonData = null;
- self._loadFinished = true;
- var item = self._getItemByIdentity(keywordArgs.identity);
- if(keywordArgs.onItem){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- keywordArgs.onItem.call(scope, item);
- }
- }
- }else{
- // Already loaded. We can just look it up and call back.
- var item = this._getItemByIdentity(keywordArgs.identity);
- if(keywordArgs.onItem){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- keywordArgs.onItem.call(scope, item);
- }
- }
- },
-
- _getItemByIdentity: function(/* Object */ identity){
- // summary:
- // Internal function to look an item up by its identity map.
- var item = null;
- if(this._itemsByIdentity){
- item = this._itemsByIdentity[identity];
- }else{
- item = this._arrayOfAllItems[identity];
- }
- if(item === undefined){
- item = null;
- }
- return item; // Object
- },
-
- getIdentityAttributes: function(/* item */ item){
- // summary:
- // See dojo.data.api.Identity.getIdentifierAttributes()
-
- var identifier = this._features['dojo.data.api.Identity'];
- if(identifier === Number){
- // If (identifier === Number) it means getIdentity() just returns
- // an integer item-number for each item. The dojo.data.api.Identity
- // spec says we need to return null if the identity is not composed
- // of attributes
- return null; // null
- }else{
- return [identifier]; // Array
- }
- },
-
- _forceLoad: function(){
- // summary:
- // Internal function to force a load of the store if it hasn't occurred yet. This is required
- // for specific functions to work properly.
- var self = this;
- if(this._jsonFileUrl){
- var getArgs = {
- url: self._jsonFileUrl,
- handleAs: "json-comment-optional",
- sync: true
- };
- var getHandler = dojo.xhrGet(getArgs);
- getHandler.addCallback(function(data){
- try{
- //Check to be sure there wasn't another load going on concurrently
- //So we don't clobber data that comes in on it. If there is a load going on
- //then do not save this data. It will potentially clobber current data.
- //We mainly wanted to sync/wait here.
- //TODO: Revisit the loading scheme of this store to improve multi-initial
- //request handling.
- if (self._loadInProgress !== true && !self._loadFinished) {
- self._getItemsFromLoadedData(data);
- self._loadFinished = true;
- }
- }catch(e){
- console.log(e);
- throw e;
- }
- });
- getHandler.addErrback(function(error){
- throw error;
- });
- }else if(this._jsonData){
- self._getItemsFromLoadedData(self._jsonData);
- self._jsonData = null;
- self._loadFinished = true;
- }
- }
-});
-//Mix in the simple fetch implementation to this class.
-dojo.extend(dojo.data.ItemFileReadStore,dojo.data.util.simpleFetch);
+if(!dojo._hasResource["dijit.form.RadioButton"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form.RadioButton"] = true;
+dojo.provide("dijit.form.RadioButton");
+
+
+// TODO: for 2.0, move the RadioButton code into this file
}
if(!dojo._hasResource["dijit.form.ValidationTextBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.form.ValidationTextBox"] = true;
dojo.provide("dijit.form.ValidationTextBox");
+/*=====
+ dijit.form.ValidationTextBox.__Constraints = function(){
+ // locale: String
+ // locale used for validation, picks up value from this widget's lang attribute
+ // _flags_: anything
+ // various flags passed to regExpGen function
+ this.locale = "";
+ this._flags_ = "";
+ }
+=====*/
+
dojo.declare(
"dijit.form.ValidationTextBox",
dijit.form.TextBox,
{
// summary:
- // A subclass of TextBox.
- // Over-ride isValid in subclasses to perform specific kinds of validation.
-
- templateString:"<table style=\"display: -moz-inline-stack;\" class=\"dijit dijitReset dijitInlineTable\" cellspacing=\"0\" cellpadding=\"0\"\n\tid=\"widget_${id}\" name=\"${name}\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse\" waiRole=\"presentation\"\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset dijitInputField\" width=\"100%\"\n\t\t\t><input dojoAttachPoint='textbox,focusNode' dojoAttachEvent='onfocus,onblur:_onMouse,onkeyup,onkeypress:_onKeyPress' autocomplete=\"off\"\n\t\t\ttype='${type}' name='${name}'\n\t\t/></td\n\t\t><td class=\"dijitReset dijitValidationIconField\" width=\"0%\"\n\t\t\t><div dojoAttachPoint='iconNode' class='dijitValidationIcon'></div><div class='dijitValidationIconText'>&Chi;</div\n\t\t></td\n\t></tr\n></table>\n",
+ // Base class for textbox widgets with the ability to validate content of various types and provide user feedback.
+ // tags:
+ // protected
+
+ templateString: dojo.cache("dijit.form", "templates/ValidationTextBox.html", "<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\n\tid=\"widget_${id}\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\" waiRole=\"presentation\"\n\t><div style=\"overflow:hidden;\"\n\t\t><div class=\"dijitReset dijitValidationIcon\"><br></div\n\t\t><div class=\"dijitReset dijitValidationIconText\">&Chi;</div\n\t\t><div class=\"dijitReset dijitInputField\"\n\t\t\t><input class=\"dijitReset\" dojoAttachPoint='textbox,focusNode' autocomplete=\"off\"\n\t\t\t${nameAttrSetting} type='${type}'\n\t\t/></div\n\t></div\n></div>\n"),
baseClass: "dijitTextBox",
- // default values for new subclass properties
// required: Boolean
- // Can be true or false, default is false.
+ // User is required to enter data into this field.
required: false,
+
// promptMessage: String
- // Hint string
+ // If defined, display this hint string immediately on focus to the textbox, if empty.
+ // Think of this like a tooltip that tells the user what to do, not an error message
+ // that tells the user what they've done wrong.
+ //
+ // Message disappears when user starts typing.
promptMessage: "",
+
// invalidMessage: String
// The message to display if value is invalid.
invalidMessage: "$_unset_$", // read from the message file if not overridden
- // constraints: Object
+
+ // constraints: dijit.form.ValidationTextBox.__Constraints
// user-defined object needed to pass parameters to the validator functions
constraints: {},
- // regExp: String
+
+ // regExp: [extension protected] String
// regular expression string used to validate the input
// Do not specify both regExp and regExpGen
regExp: ".*",
- // regExpGen: Function
- // user replaceable function used to generate regExp when dependent on constraints
- // Do not specify both regExp and regExpGen
- regExpGen: function(constraints){ return this.regExp; },
-
- // state: String
+
+ regExpGen: function(/*dijit.form.ValidationTextBox.__Constraints*/constraints){
+ // summary:
+ // Overridable function used to generate regExp when dependent on constraints.
+ // Do not specify both regExp and regExpGen.
+ // tags:
+ // extension protected
+ return this.regExp; // String
+ },
+
+ // state: [readonly] String
// Shows current state (ie, validation result) of input (Normal, Warning, or Error)
state: "",
- setValue: function(){
- this.inherited('setValue', arguments);
- this.validate(false);
- },
-
- validator: function(value,constraints){
- // summary: user replaceable function used to validate the text input against the regular expression.
- return (new RegExp("^(" + this.regExpGen(constraints) + ")"+(this.required?"":"?")+"$")).test(value) &&
+ // tooltipPosition: String[]
+ // See description of `dijit.Tooltip.defaultPosition` for details on this parameter.
+ tooltipPosition: [],
+
+ _setValueAttr: function(){
+ // summary:
+ // Hook so attr('value', ...) works.
+ this.inherited(arguments);
+ this.validate(this._focused);
+ },
+
+ validator: function(/*anything*/value, /*dijit.form.ValidationTextBox.__Constraints*/constraints){
+ // summary:
+ // Overridable function used to validate the text input against the regular expression.
+ // tags:
+ // protected
+ return (new RegExp("^(?:" + this.regExpGen(constraints) + ")"+(this.required?"":"?")+"$")).test(value) &&
(!this.required || !this._isEmpty(value)) &&
- (this._isEmpty(value) || this.parse(value, constraints) !== null);
- },
-
- isValid: function(/* Boolean*/ isFocused){
- // summary: Need to over-ride with your own validation code in subclasses
+ (this._isEmpty(value) || this.parse(value, constraints) !== undefined); // Boolean
+ },
+
+ _isValidSubset: function(){
+ // summary:
+ // Returns true if the value is either already valid or could be made valid by appending characters.
+ // This is used for validation while the user [may be] still typing.
+ return this.textbox.value.search(this._partialre) == 0;
+ },
+
+ isValid: function(/*Boolean*/ isFocused){
+ // summary:
+ // Tests if value is valid.
+ // Can override with your own routine in a subclass.
+ // tags:
+ // protected
return this.validator(this.textbox.value, this.constraints);
},
_isEmpty: function(value){
- // summary: Checks for whitespace
+ // summary:
+ // Checks for whitespace
return /^\s*$/.test(value); // Boolean
},
- getErrorMessage: function(/* Boolean*/ isFocused){
- // summary: return an error message to show if appropriate
- return this.invalidMessage;
- },
-
- getPromptMessage: function(/* Boolean*/ isFocused){
- // summary: return a hint to show if appropriate
- return this.promptMessage;
- },
-
- validate: function(/* Boolean*/ isFocused){
+ getErrorMessage: function(/*Boolean*/ isFocused){
+ // summary:
+ // Return an error message to show if appropriate
+ // tags:
+ // protected
+ return this.invalidMessage; // String
+ },
+
+ getPromptMessage: function(/*Boolean*/ isFocused){
+ // summary:
+ // Return a hint message to show when widget is first focused
+ // tags:
+ // protected
+ return this.promptMessage; // String
+ },
+
+ _maskValidSubsetError: true,
+ validate: function(/*Boolean*/ isFocused){
// summary:
// Called by oninit, onblur, and onkeypress.
// description:
// Show missing or invalid messages if appropriate, and highlight textbox field.
+ // tags:
+ // protected
var message = "";
- var isValid = this.isValid(isFocused);
+ var isValid = this.disabled || this.isValid(isFocused);
+ if(isValid){ this._maskValidSubsetError = true; }
+ var isValidSubset = !isValid && isFocused && this._isValidSubset();
var isEmpty = this._isEmpty(this.textbox.value);
- this.state = (isValid || (!this._hasBeenBlurred && isEmpty)) ? "" : "Error";
+ if(isEmpty){ this._maskValidSubsetError = true; }
+ this.state = (isValid || (!this._hasBeenBlurred && isEmpty) || isValidSubset) ? "" : "Error";
+ if(this.state == "Error"){ this._maskValidSubsetError = false; }
this._setStateClass();
- dijit.setWaiState(this.focusNode, "invalid", (isValid? "false" : "true"));
+ dijit.setWaiState(this.focusNode, "invalid", isValid ? "false" : "true");
if(isFocused){
if(isEmpty){
message = this.getPromptMessage(true);
}
- if(!message && !isValid){
+ if(!message && (this.state == "Error" || (isValidSubset && !this._maskValidSubsetError))){
message = this.getErrorMessage(true);
}
}
- this._displayMessage(message);
- },
-
- // currently displayed message
+ this.displayMessage(message);
+ return isValid;
+ },
+
+ // _message: String
+ // Currently displayed message
_message: "",
- _displayMessage: function(/*String*/ message){
- if(this._message == message){ return; }
- this._message = message;
- this.displayMessage(message);
- },
-
displayMessage: function(/*String*/ message){
// summary:
- // User overridable method to display validation errors/hints.
+ // Overridable method to display validation errors/hints.
// By default uses a tooltip.
+ // tags:
+ // extension
+ if(this._message == message){ return; }
+ this._message = message;
+ dijit.hideTooltip(this.domNode);
if(message){
- dijit.showTooltip(message, this.domNode);
- }else{
- dijit.hideTooltip(this.domNode);
- }
- },
-
- _hasBeenBlurred: false,
-
- _onBlur: function(evt){
- this._hasBeenBlurred = true;
- this.validate(false);
- this.inherited('_onBlur', arguments);
- },
-
- onfocus: function(evt){
- // TODO: change to _onFocus?
- this.validate(true);
- this._onMouse(evt); // update CSS classes
- },
-
- onkeyup: function(evt){
- this.onfocus(evt);
+ dijit.showTooltip(message, this.domNode, this.tooltipPosition);
+ }
+ },
+
+ _refreshState: function(){
+ // Overrides TextBox._refreshState()
+ this.validate(this._focused);
+ this.inherited(arguments);
},
//////////// INITIALIZATION METHODS ///////////////////////////////////////
+
constructor: function(){
this.constraints = {};
},
postMixInProperties: function(){
- this.inherited('postMixInProperties', arguments);
- this.constraints.locale=this.lang;
+ this.inherited(arguments);
+ this.constraints.locale = this.lang;
this.messages = dojo.i18n.getLocalization("dijit.form", "validate", this.lang);
if(this.invalidMessage == "$_unset_$"){ this.invalidMessage = this.messages.invalidMessage; }
var p = this.regExpGen(this.constraints);
this.regExp = p;
- // make value a string for all types so that form reset works well
+ var partialre = "";
+ // parse the regexp and produce a new regexp that matches valid subsets
+ // if the regexp is .* then there's no use in matching subsets since everything is valid
+ if(p != ".*"){ this.regExp.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,
+ function (re){
+ switch(re.charAt(0)){
+ case '{':
+ case '+':
+ case '?':
+ case '*':
+ case '^':
+ case '$':
+ case '|':
+ case '(':
+ partialre += re;
+ break;
+ case ")":
+ partialre += "|$)";
+ break;
+ default:
+ partialre += "(?:"+re+"|$)";
+ break;
+ }
+ }
+ );}
+ try{ // this is needed for now since the above regexp parsing needs more test verification
+ "".search(partialre);
+ }catch(e){ // should never be here unless the original RE is bad or the parsing is bad
+ partialre = this.regExp;
+ console.warn('RegExp error in ' + this.declaredClass + ': ' + this.regExp);
+ } // should never be here unless the original RE is bad or the parsing is bad
+ this._partialre = "^(?:" + partialre + ")$";
+ },
+
+ _setDisabledAttr: function(/*Boolean*/ value){
+ this.inherited(arguments); // call FormValueWidget._setDisabledAttr()
+ this._refreshState();
+ },
+
+ _setRequiredAttr: function(/*Boolean*/ value){
+ this.required = value;
+ dijit.setWaiState(this.focusNode,"required", value);
+ this._refreshState();
+ },
+
+ postCreate: function(){
+ if(dojo.isIE){ // IE INPUT tag fontFamily has to be set directly using STYLE
+ var s = dojo.getComputedStyle(this.focusNode);
+ if(s){
+ var ff = s.fontFamily;
+ if(ff){
+ this.focusNode.style.fontFamily = ff;
+ }
+ }
+ }
+ this.inherited(arguments);
+ },
+
+ reset:function(){
+ // Overrides dijit.form.TextBox.reset() by also
+ // hiding errors about partial matches
+ this._maskValidSubsetError = true;
+ this.inherited(arguments);
+ },
+
+ _onBlur: function(){
+ this.displayMessage('');
+ this.inherited(arguments);
}
}
);
dojo.declare(
"dijit.form.MappedTextBox",
dijit.form.ValidationTextBox,
{
// summary:
- // A subclass of ValidationTextBox.
- // Provides a hidden input field and a serialize method to override
-
- serialize: function(val, /*Object?*/options){
- // summary: user replaceable function used to convert the getValue() result to a String
- return (val.toString ? val.toString() : "");
+ // A dijit.form.ValidationTextBox subclass which provides a base class for widgets that have
+ // a visible formatted display value, and a serializable
+ // value in a hidden input field which is actually sent to the server.
+ // description:
+ // The visible display may
+ // be locale-dependent and interactive. The value sent to the server is stored in a hidden
+ // input field which uses the `name` attribute declared by the original widget. That value sent
+ // to the server is defined by the dijit.form.MappedTextBox.serialize method and is typically
+ // locale-neutral.
+ // tags:
+ // protected
+
+ postMixInProperties: function(){
+ this.inherited(arguments);
+
+ // we want the name attribute to go to the hidden <input>, not the displayed <input>,
+ // so override _FormWidget.postMixInProperties() setting of nameAttrSetting
+ this.nameAttrSetting = "";
+ },
+
+ serialize: function(/*anything*/val, /*Object?*/options){
+ // summary:
+ // Overridable function used to convert the attr('value') result to a canonical
+ // (non-localized) string. For example, will print dates in ISO format, and
+ // numbers the same way as they are represented in javascript.
+ // tags:
+ // protected extension
+ return val.toString ? val.toString() : ""; // String
},
toString: function(){
- // summary: display the widget as a printable string using the widget's value
- var val = this.filter(this.getValue());
- return (val!=null) ? ((typeof val == "string") ? val : this.serialize(val, this.constraints)) : "";
+ // summary:
+ // Returns widget as a printable string using the widget's value
+ // tags:
+ // protected
+ var val = this.filter(this.attr('value')); // call filter in case value is nonstring and filter has been customized
+ return val != null ? (typeof val == "string" ? val : this.serialize(val, this.constraints)) : ""; // String
},
validate: function(){
+ // Overrides `dijit.form.TextBox.validate`
this.valueNode.value = this.toString();
- this.inherited('validate', arguments);
- },
-
- postCreate: function(){
- var textbox = this.textbox;
- var valueNode = (this.valueNode = document.createElement("input"));
- valueNode.setAttribute("type", textbox.type);
- valueNode.setAttribute("value", this.toString());
- dojo.style(valueNode, "display", "none");
- valueNode.name = this.textbox.name;
- this.textbox.name = "_" + this.textbox.name + "_displayed_";
- this.textbox.removeAttribute("name");
- dojo.place(valueNode, textbox, "after");
-
- this.inherited('postCreate', arguments);
+ return this.inherited(arguments);
+ },
+
+ buildRendering: function(){
+ // Overrides `dijit._Templated.buildRendering`
+
+ this.inherited(arguments);
+
+ // Create a hidden <input> node with the serialized value used for submit
+ // (as opposed to the displayed value).
+ // Passing in name as markup rather than calling dojo.create() with an attrs argument
+ // to make dojo.query(input[name=...]) work on IE. (see #8660)
+ this.valueNode = dojo.place("<input type='hidden'" + (this.name ? " name='" + this.name + "'" : "") + ">", this.textbox, "after");
+ },
+
+ reset:function(){
+ // Overrides `dijit.form.ValidationTextBox.reset` to
+ // reset the hidden textbox value to ''
+ this.valueNode.value = '';
+ this.inherited(arguments);
}
}
);
+/*=====
+ dijit.form.RangeBoundTextBox.__Constraints = function(){
+ // min: Number
+ // Minimum signed value. Default is -Infinity
+ // max: Number
+ // Maximum signed value. Default is +Infinity
+ this.min = min;
+ this.max = max;
+ }
+=====*/
+
dojo.declare(
"dijit.form.RangeBoundTextBox",
dijit.form.MappedTextBox,
{
// summary:
- // A subclass of MappedTextBox.
- // Tests for a value out-of-range
- /*===== contraints object:
- // min: Number
- // Minimum signed value. Default is -Infinity
- min: undefined,
- // max: Number
- // Maximum signed value. Default is +Infinity
- max: undefined,
- =====*/
+ // Base class for textbox form widgets which defines a range of valid values.
// rangeMessage: String
// The message to display if value is out-of-range
rangeMessage: "",
- compare: function(val1, val2){
- // summary: compare 2 values
- return val1 - val2;
- },
-
- rangeCheck: function(/* Number */ primitive, /* Object */ constraints){
- // summary: user replaceable function used to validate the range of the numeric input value
- var isMin = (typeof constraints.min != "undefined");
- var isMax = (typeof constraints.max != "undefined");
- if(isMin || isMax){
- return (!isMin || this.compare(primitive,constraints.min) >= 0) &&
- (!isMax || this.compare(primitive,constraints.max) <= 0);
- }else{ return true; }
- },
-
- isInRange: function(/* Boolean*/ isFocused){
- // summary: Need to over-ride with your own validation code in subclasses
- return this.rangeCheck(this.getValue(), this.constraints);
- },
-
- isValid: function(/* Boolean*/ isFocused){
- return this.inherited('isValid', arguments) &&
- ((this._isEmpty(this.textbox.value) && !this.required) || this.isInRange(isFocused));
- },
-
- getErrorMessage: function(/* Boolean*/ isFocused){
- if(dijit.form.RangeBoundTextBox.superclass.isValid.call(this, false) && !this.isInRange(isFocused)){ return this.rangeMessage; }
- else{ return this.inherited('getErrorMessage', arguments); }
+ /*=====
+ // constraints: dijit.form.RangeBoundTextBox.__Constraints
+ constraints: {},
+ ======*/
+
+ rangeCheck: function(/*Number*/ primitive, /*dijit.form.RangeBoundTextBox.__Constraints*/ constraints){
+ // summary:
+ // Overridable function used to validate the range of the numeric input value.
+ // tags:
+ // protected
+ return ("min" in constraints? (this.compare(primitive,constraints.min) >= 0) : true) &&
+ ("max" in constraints? (this.compare(primitive,constraints.max) <= 0) : true); // Boolean
+ },
+
+ isInRange: function(/*Boolean*/ isFocused){
+ // summary:
+ // Tests if the value is in the min/max range specified in constraints
+ // tags:
+ // protected
+ return this.rangeCheck(this.attr('value'), this.constraints);
+ },
+
+ _isDefinitelyOutOfRange: function(){
+ // summary:
+ // Returns true if the value is out of range and will remain
+ // out of range even if the user types more characters
+ var val = this.attr('value');
+ var isTooLittle = false;
+ var isTooMuch = false;
+ if("min" in this.constraints){
+ var min = this.constraints.min;
+ min = this.compare(val, ((typeof min == "number") && min >= 0 && val !=0) ? 0 : min);
+ isTooLittle = (typeof min == "number") && min < 0;
+ }
+ if("max" in this.constraints){
+ var max = this.constraints.max;
+ max = this.compare(val, ((typeof max != "number") || max > 0) ? max : 0);
+ isTooMuch = (typeof max == "number") && max > 0;
+ }
+ return isTooLittle || isTooMuch;
+ },
+
+ _isValidSubset: function(){
+ // summary:
+ // Overrides `dijit.form.ValidationTextBox._isValidSubset`.
+ // Returns true if the input is syntactically valid, and either within
+ // range or could be made in range by more typing.
+ return this.inherited(arguments) && !this._isDefinitelyOutOfRange();
+ },
+
+ isValid: function(/*Boolean*/ isFocused){
+ // Overrides dijit.form.ValidationTextBox.isValid to check that the value is also in range.
+ return this.inherited(arguments) &&
+ ((this._isEmpty(this.textbox.value) && !this.required) || this.isInRange(isFocused)); // Boolean
+ },
+
+ getErrorMessage: function(/*Boolean*/ isFocused){
+ // Overrides dijit.form.ValidationTextBox.getErrorMessage to print "out of range" message if appropriate
+ var v = this.attr('value');
+ if(v !== null && v !== '' && v !== undefined && !this.isInRange(isFocused)){ // don't check isInRange w/o a real value
+ return this.rangeMessage; // String
+ }
+ return this.inherited(arguments);
},
postMixInProperties: function(){
- this.inherited('postMixInProperties', arguments);
+ this.inherited(arguments);
if(!this.rangeMessage){
this.messages = dojo.i18n.getLocalization("dijit.form", "validate", this.lang);
this.rangeMessage = this.messages.rangeMessage;
}
},
postCreate: function(){
- this.inherited('postCreate', arguments);
- if(typeof this.constraints.min != "undefined"){
+ this.inherited(arguments);
+ if(this.constraints.min !== undefined){
dijit.setWaiState(this.focusNode, "valuemin", this.constraints.min);
}
- if(typeof this.constraints.max != "undefined"){
+ if(this.constraints.max !== undefined){
dijit.setWaiState(this.focusNode, "valuemax", this.constraints.max);
}
- }
- }
-);
-
-}
-
-if(!dojo._hasResource["dijit.form.ComboBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.form.ComboBox"] = true;
-dojo.provide("dijit.form.ComboBox");
-
-
-
-
-
-dojo.declare(
- "dijit.form.ComboBoxMixin",
- null,
- {
- // summary:
- // Auto-completing text box, and base class for FilteringSelect widget.
- //
- // The drop down box's values are populated from an class called
- // a data provider, which returns a list of values based on the characters
- // that the user has typed into the input box.
- //
- // Some of the options to the ComboBox are actually arguments to the data
- // provider.
- //
- // You can assume that all the form widgets (and thus anything that mixes
- // in ComboBoxMixin) will inherit from _FormWidget and thus the "this"
- // reference will also "be a" _FormWidget.
-
- // item: Object
- // This is the item returned by the dojo.data.store implementation that
- // provides the data for this cobobox, it's the currently selected item.
- item: null,
-
- // pageSize: Integer
- // Argument to data provider.
- // Specifies number of search results per page (before hitting "next" button)
- pageSize: Infinity,
-
- // store: Object
- // Reference to data provider object used by this ComboBox
- store: null,
-
- // query: Object
- // A query that can be passed to 'store' to initially filter the items,
- // before doing further filtering based on searchAttr and the key.
- query: {},
-
- // autoComplete: Boolean
- // If you type in a partial string, and then tab out of the <input> box,
- // automatically copy the first entry displayed in the drop down list to
- // the <input> field
- autoComplete: true,
-
- // searchDelay: Integer
- // Delay in milliseconds between when user types something and we start
- // searching based on that value
- searchDelay: 100,
-
- // searchAttr: String
- // Searches pattern match against this field
- searchAttr: "name",
-
- // ignoreCase: Boolean
- // Set true if the ComboBox should ignore case when matching possible items
- ignoreCase: true,
-
- // hasDownArrow: Boolean
- // Set this textbox to have a down arrow button.
- // Defaults to true.
- hasDownArrow:true,
-
- // _hasFocus: Boolean
- // Represents focus state of the textbox
- // TODO: get rid of this; it's unnecessary (but currently referenced in FilteringSelect)
- _hasFocus:false,
-
- templateString:"<table class=\"dijit dijitReset dijitInlineTable dijitLeft\" cellspacing=\"0\" cellpadding=\"0\"\n\tid=\"widget_${id}\" name=\"${name}\" dojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse\" waiRole=\"presentation\"\n\t><tr class=\"dijitReset\"\n\t\t><td class='dijitReset dijitStretch dijitInputField' width=\"100%\"\n\t\t\t><input type=\"text\" autocomplete=\"off\" name=\"${name}\"\n\t\t\tdojoAttachEvent=\"onkeypress, onkeyup, onfocus, compositionend\"\n\t\t\tdojoAttachPoint=\"textbox,focusNode\" waiRole=\"combobox\"\n\t\t/></td\n\t\t><td class=\"dijitReset dijitValidationIconField\" width=\"0%\"\n\t\t\t><div dojoAttachPoint='iconNode' class='dijitValidationIcon'></div\n\t\t\t><div class='dijitValidationIconText'>&Chi;</div\n\t\t></td\n\t\t><td class='dijitReset dijitRight dijitButtonNode dijitDownArrowButton' width=\"0%\"\n\t\t\tdojoAttachPoint=\"downArrowNode\"\n\t\t\tdojoAttachEvent=\"onmousedown:_onArrowMouseDown,onmouseup:_onMouse,onmouseenter:_onMouse,onmouseleave:_onMouse\"\n\t\t\t><div class=\"dijitDownArrowButtonInner\" waiRole=\"presentation\"\n\t\t\t\t><div class=\"dijitDownArrowButtonChar\">&#9660;</div\n\t\t\t></div\n\t\t></td\t\n\t></tr\n></table>\n",
-
- baseClass:"dijitComboBox",
-
- _lastDisplayedValue: "",
-
- getValue:function(){
- // don't get the textbox value but rather the previously set hidden value
- return dijit.form.TextBox.superclass.getValue.apply(this, arguments);
- },
-
- setDisplayedValue:function(/*String*/ value){
- this._lastDisplayedValue = value;
- this.setValue(value, true);
- },
-
- _getCaretPos: function(/*DomNode*/ element){
- // khtml 3.5.2 has selection* methods as does webkit nightlies from 2005-06-22
- if(typeof(element.selectionStart)=="number"){
- // FIXME: this is totally borked on Moz < 1.3. Any recourse?
- return element.selectionStart;
- }else if(dojo.isIE){
- // in the case of a mouse click in a popup being handled,
- // then the document.selection is not the textarea, but the popup
- // var r = document.selection.createRange();
- // hack to get IE 6 to play nice. What a POS browser.
- var tr = document.selection.createRange().duplicate();
- var ntr = element.createTextRange();
- tr.move("character",0);
- ntr.move("character",0);
- try{
- // If control doesnt have focus, you get an exception.
- // Seems to happen on reverse-tab, but can also happen on tab (seems to be a race condition - only happens sometimes).
- // There appears to be no workaround for this - googled for quite a while.
- ntr.setEndPoint("EndToEnd", tr);
- return String(ntr.text).replace(/\r/g,"").length;
- }catch(e){
- return 0; // If focus has shifted, 0 is fine for caret pos.
- }
- }
- },
-
- _setCaretPos: function(/*DomNode*/ element, /*Number*/ location){
- location = parseInt(location);
- this._setSelectedRange(element, location, location);
- },
-
- _setSelectedRange: function(/*DomNode*/ element, /*Number*/ start, /*Number*/ end){
- if(!end){
- end = element.value.length;
- } // NOTE: Strange - should be able to put caret at start of text?
- // Mozilla
- // parts borrowed from http://www.faqts.com/knowledge_base/view.phtml/aid/13562/fid/130
- if(element.setSelectionRange){
- dijit.focus(element);
- element.setSelectionRange(start, end);
- }else if(element.createTextRange){ // IE
- var range = element.createTextRange();
- with(range){
- collapse(true);
- moveEnd('character', end);
- moveStart('character', start);
- select();
- }
- }else{ //otherwise try the event-creation hack (our own invention)
- // do we need these?
- element.value = element.value;
- element.blur();
- dijit.focus(element);
- // figure out how far back to go
- var dist = parseInt(element.value.length)-end;
- var tchar = String.fromCharCode(37);
- var tcc = tchar.charCodeAt(0);
- for(var x = 0; x < dist; x++){
- var te = document.createEvent("KeyEvents");
- te.initKeyEvent("keypress", true, true, null, false, false, false, false, tcc, tcc);
- element.dispatchEvent(te);
- }
- }
- },
-
- onkeypress: function(/*Event*/ evt){
- // summary: handles keyboard events
-
- //except for pasting case - ctrl + v(118)
- if(evt.altKey || (evt.ctrlKey && evt.charCode != 118)){
- return;
- }
- var doSearch = false;
- this.item = null; // #4872
- if(this._isShowingNow){this._popupWidget.handleKey(evt);}
- switch(evt.keyCode){
- case dojo.keys.PAGE_DOWN:
- case dojo.keys.DOWN_ARROW:
- if(!this._isShowingNow||this._prev_key_esc){
- this._arrowPressed();
- doSearch=true;
- }else{
- this._announceOption(this._popupWidget.getHighlightedOption());
- }
- dojo.stopEvent(evt);
- this._prev_key_backspace = false;
- this._prev_key_esc = false;
- break;
-
- case dojo.keys.PAGE_UP:
- case dojo.keys.UP_ARROW:
- if(this._isShowingNow){
- this._announceOption(this._popupWidget.getHighlightedOption());
- }
- dojo.stopEvent(evt);
- this._prev_key_backspace = false;
- this._prev_key_esc = false;
- break;
-
- case dojo.keys.ENTER:
- // prevent submitting form if user presses enter
- // also prevent accepting the value if either Next or Previous are selected
- var highlighted;
- if(this._isShowingNow&&(highlighted=this._popupWidget.getHighlightedOption())){
- // only stop event on prev/next
- if(highlighted==this._popupWidget.nextButton){
- this._nextSearch(1);
- dojo.stopEvent(evt);
- break;
- }
- else if(highlighted==this._popupWidget.previousButton){
- this._nextSearch(-1);
- dojo.stopEvent(evt);
- break;
- }
- }else{
- this.setDisplayedValue(this.getDisplayedValue());
- }
- // default case:
- // prevent submit, but allow event to bubble
- evt.preventDefault();
- // fall through
-
- case dojo.keys.TAB:
- var newvalue=this.getDisplayedValue();
- // #4617: if the user had More Choices selected fall into the _onBlur handler
- if(this._popupWidget &&
- (newvalue == this._popupWidget._messages["previousMessage"] ||
- newvalue == this._popupWidget._messages["nextMessage"])){
- break;
- }
- if(this._isShowingNow){
- this._prev_key_backspace = false;
- this._prev_key_esc = false;
- if(this._popupWidget.getHighlightedOption()){
- this._popupWidget.setValue({target:this._popupWidget.getHighlightedOption()}, true);
- }
- this._hideResultList();
- }
- break;
-
- case dojo.keys.SPACE:
- this._prev_key_backspace = false;
- this._prev_key_esc = false;
- if(this._isShowingNow && this._popupWidget.getHighlightedOption()){
- dojo.stopEvent(evt);
- this._selectOption();
- this._hideResultList();
- }else{
- doSearch = true;
- }
- break;
-
- case dojo.keys.ESCAPE:
- this._prev_key_backspace = false;
- this._prev_key_esc = true;
- this._hideResultList();
- if(this._lastDisplayedValue != this.getDisplayedValue()){
- this.setDisplayedValue(this._lastDisplayedValue);
- dojo.stopEvent(evt);
- }else{
- this.setValue(this.getValue(), false);
- }
- break;
-
- case dojo.keys.DELETE:
- case dojo.keys.BACKSPACE:
- this._prev_key_esc = false;
- this._prev_key_backspace = true;
- doSearch = true;
- break;
-
- case dojo.keys.RIGHT_ARROW: // fall through
-
- case dojo.keys.LEFT_ARROW: // fall through
- this._prev_key_backspace = false;
- this._prev_key_esc = false;
- break;
-
- default:// non char keys (F1-F12 etc..) shouldn't open list
- this._prev_key_backspace = false;
- this._prev_key_esc = false;
- if(dojo.isIE || evt.charCode != 0){
- doSearch=true;
- }
- }
- if(this.searchTimer){
- clearTimeout(this.searchTimer);
- }
- if(doSearch){
- // need to wait a tad before start search so that the event bubbles through DOM and we have value visible
- this.searchTimer = setTimeout(dojo.hitch(this, this._startSearchFromInput), this.searchDelay);
- }
- },
-
- _autoCompleteText: function(/*String*/ text){
- // summary:
- // Fill in the textbox with the first item from the drop down list, and
- // highlight the characters that were auto-completed. For example, if user
- // typed "CA" and the drop down list appeared, the textbox would be changed to
- // "California" and "ifornia" would be highlighted.
-
- // IE7: clear selection so next highlight works all the time
- this._setSelectedRange(this.focusNode, this.focusNode.value.length, this.focusNode.value.length);
- // does text autoComplete the value in the textbox?
- // #3744: escape regexp so the user's input isn't treated as a regular expression.
- // Example: If the user typed "(" then the regexp would throw "unterminated parenthetical."
- // Also see #2558 for the autocompletion bug this regular expression fixes.
- if(new RegExp("^"+escape(this.focusNode.value), this.ignoreCase ? "i" : "").test(escape(text))){
- var cpos = this._getCaretPos(this.focusNode);
- // only try to extend if we added the last character at the end of the input
- if((cpos+1) > this.focusNode.value.length){
- // only add to input node as we would overwrite Capitalisation of chars
- // actually, that is ok
- this.focusNode.value = text;//.substr(cpos);
- // visually highlight the autocompleted characters
- this._setSelectedRange(this.focusNode, cpos, this.focusNode.value.length);
- dijit.setWaiState(this.focusNode, "valuenow", text);
- }
- }else{
- // text does not autoComplete; replace the whole value and highlight
- this.focusNode.value = text;
- this._setSelectedRange(this.focusNode, 0, this.focusNode.value.length);
- dijit.setWaiState(this.focusNode, "valuenow", text);
- }
- },
-
- _openResultList: function(/*Object*/ results, /*Object*/ dataObject){
- if(this.disabled || dataObject.query[this.searchAttr] != this._lastQuery){
- return;
- }
- this._popupWidget.clearResultList();
- if(!results.length){
- this._hideResultList();
- return;
- }
-
- // Fill in the textbox with the first item from the drop down list, and
- // highlight the characters that were auto-completed. For example, if user
- // typed "CA" and the drop down list appeared, the textbox would be changed to
- // "California" and "ifornia" would be highlighted.
-
- var zerothvalue=new String(this.store.getValue(results[0], this.searchAttr));
- if(zerothvalue && this.autoComplete && !this._prev_key_backspace &&
- // when the user clicks the arrow button to show the full list,
- // startSearch looks for "*".
- // it does not make sense to autocomplete
- // if they are just previewing the options available.
- (dataObject.query[this.searchAttr] != "*")){
- this._autoCompleteText(zerothvalue);
- // announce the autocompleted value
- dijit.setWaiState(this.focusNode || this.domNode, "valuenow", zerothvalue);
- }
- this._popupWidget.createOptions(results, dataObject, dojo.hitch(this, this._getMenuLabelFromItem));
-
- // show our list (only if we have content, else nothing)
- this._showResultList();
-
- // #4091: tell the screen reader that the paging callback finished by shouting the next choice
- if(dataObject.direction){
- if(dataObject.direction==1){
- this._popupWidget.highlightFirstOption();
- }else if(dataObject.direction==-1){
- this._popupWidget.highlightLastOption();
- }
- this._announceOption(this._popupWidget.getHighlightedOption());
- }
- },
-
- _showResultList: function(){
- this._hideResultList();
- var items = this._popupWidget.getItems(),
- visibleCount = Math.min(items.length,this.maxListLength);
- this._arrowPressed();
- // hide the tooltip
- this._displayMessage("");
-
- // Position the list and if it's too big to fit on the screen then
- // size it to the maximum possible height
- // Our dear friend IE doesnt take max-height so we need to calculate that on our own every time
- // TODO: want to redo this, see http://trac.dojotoolkit.org/ticket/3272, http://trac.dojotoolkit.org/ticket/4108
- with(this._popupWidget.domNode.style){
- // natural size of the list has changed, so erase old width/height settings,
- // which were hardcoded in a previous call to this function (via dojo.marginBox() call)
- width="";
- height="";
- }
- var best=this.open();
- // #3212: only set auto scroll bars if necessary
- // prevents issues with scroll bars appearing when they shouldn't when node is made wider (fractional pixels cause this)
- var popupbox=dojo.marginBox(this._popupWidget.domNode);
- this._popupWidget.domNode.style.overflow=((best.h==popupbox.h)&&(best.w==popupbox.w))?"hidden":"auto";
- // #4134: borrow TextArea scrollbar test so content isn't covered by scrollbar and horizontal scrollbar doesn't appear
- var newwidth=best.w;
- if(best.h<this._popupWidget.domNode.scrollHeight){newwidth+=16;}
- dojo.marginBox(this._popupWidget.domNode, {h:best.h,w:Math.max(newwidth,this.domNode.offsetWidth)});
- },
-
- _hideResultList: function(){
- if(this._isShowingNow){
- dijit.popup.close(this._popupWidget);
- this._arrowIdle();
- this._isShowingNow=false;
- }
- },
-
- _onBlur: function(){
- // summary: called magically when focus has shifted away from this widget and it's dropdown
- this._hasFocus=false;
- this._hasBeenBlurred = true;
- this._hideResultList();
- this._arrowIdle();
- // if the user clicks away from the textbox OR tabs away, set the value to the textbox value
- // #4617: if value is now more choices or previous choices, revert the value
- var newvalue=this.getDisplayedValue();
- if(this._popupWidget&&(newvalue==this._popupWidget._messages["previousMessage"]||newvalue==this._popupWidget._messages["nextMessage"])){
- this.setValue(this._lastValueReported, true);
- }else{
- this.setDisplayedValue(newvalue);
- }
- },
-
- onfocus:function(/*Event*/ evt){
- this._hasFocus=true;
-
- // update styling to reflect that we are focused
- this._onMouse(evt);
- },
-
- _announceOption: function(/*Node*/ node){
- // summary:
- // a11y code that puts the highlighted option in the textbox
- // This way screen readers will know what is happening in the menu
-
- if(node==null){return;}
- // pull the text value from the item attached to the DOM node
- var newValue;
- if(node==this._popupWidget.nextButton||node==this._popupWidget.previousButton){
- newValue=node.innerHTML;
- }else{
- newValue=this.store.getValue(node.item, this.searchAttr);
- }
- // get the text that the user manually entered (cut off autocompleted text)
- this.focusNode.value=this.focusNode.value.substring(0, this._getCaretPos(this.focusNode));
- // autocomplete the rest of the option to announce change
- this._autoCompleteText(newValue);
- },
-
- _selectOption: function(/*Event*/ evt){
- var tgt = null;
- if(!evt){
- evt ={ target: this._popupWidget.getHighlightedOption()};
- }
- // what if nothing is highlighted yet?
- if(!evt.target){
- // handle autocompletion where the the user has hit ENTER or TAB
- this.setDisplayedValue(this.getDisplayedValue());
- return;
- // otherwise the user has accepted the autocompleted value
- }else{
- tgt = evt.target;
- }
- if(!evt.noHide){
- this._hideResultList();
- this._setCaretPos(this.focusNode, this.store.getValue(tgt.item, this.searchAttr).length);
- }
- this._doSelect(tgt);
- },
-
- _doSelect: function(tgt){
- this.item = tgt.item;
- this.setValue(this.store.getValue(tgt.item, this.searchAttr), true);
- },
-
- _onArrowMouseDown: function(evt){
- // summary: callback when arrow is clicked
- if(this.disabled){
- return;
- }
- dojo.stopEvent(evt);
- this.focus();
- if(this._isShowingNow){
- this._hideResultList();
- }else{
- // forces full population of results, if they click
- // on the arrow it means they want to see more options
- this._startSearch("");
- }
- },
-
- _startSearchFromInput: function(){
- this._startSearch(this.focusNode.value);
- },
-
- _startSearch: function(/*String*/ key){
- if(!this._popupWidget){
- this._popupWidget = new dijit.form._ComboBoxMenu({
- onChange: dojo.hitch(this, this._selectOption)
- });
- }
- // create a new query to prevent accidentally querying for a hidden value from FilteringSelect's keyField
- var query=this.query;
- this._lastQuery=query[this.searchAttr]=key+"*";
- var dataObject=this.store.fetch({queryOptions:{ignoreCase:this.ignoreCase, deep:true}, query: query, onComplete:dojo.hitch(this, "_openResultList"), start:0, count:this.pageSize});
- function nextSearch(dataObject, direction){
- dataObject.start+=dataObject.count*direction;
- // #4091: tell callback the direction of the paging so the screen reader knows which menu option to shout
- dataObject.direction=direction;
- dataObject.store.fetch(dataObject);
- }
- this._nextSearch=this._popupWidget.onPage=dojo.hitch(this, nextSearch, dataObject);
- },
-
- _getValueField:function(){
- return this.searchAttr;
- },
-
- /////////////// Event handlers /////////////////////
-
- _arrowPressed: function(){
- if(!this.disabled&&this.hasDownArrow){
- dojo.addClass(this.downArrowNode, "dijitArrowButtonActive");
- }
- },
-
- _arrowIdle: function(){
- if(!this.disabled&&this.hasDownArrow){
- dojo.removeClass(this.downArrowNode, "dojoArrowButtonPushed");
- }
- },
-
- compositionend: function(/*Event*/ evt){
- // summary: When inputting characters using an input method, such as Asian
- // languages, it will generate this event instead of onKeyDown event
- // Note: this event is only triggered in FF (not in IE)
- this.onkeypress({charCode:-1});
- },
-
- //////////// INITIALIZATION METHODS ///////////////////////////////////////
- constructor: function(){
- this.query={};
- },
-
- postMixInProperties: function(){
- if(!this.hasDownArrow){
- this.baseClass = "dijitTextBox";
- }
- if(!this.store){
- // if user didn't specify store, then assume there are option tags
- var items = this.srcNodeRef ? dojo.query("> option", this.srcNodeRef).map(function(node){
- node.style.display="none";
- return { value: node.getAttribute("value"), name: String(node.innerHTML) };
- }) : {};
- this.store = new dojo.data.ItemFileReadStore({data: {identifier:this._getValueField(), items:items}});
-
- // if there is no value set and there is an option list,
- // set the value to the first value to be consistent with native Select
- if(items && items.length && !this.value){
- // For <select>, IE does not let you set the value attribute of the srcNodeRef (and thus dojo.mixin does not copy it).
- // IE does understand selectedIndex though, which is automatically set by the selected attribute of an option tag
- this.value = items[this.srcNodeRef.selectedIndex != -1 ? this.srcNodeRef.selectedIndex : 0]
- [this._getValueField()];
- }
- }
- },
-
- uninitialize:function(){
- if(this._popupWidget){
- this._hideResultList();
- this._popupWidget.destroy()
- };
- },
-
- _getMenuLabelFromItem:function(/*Item*/ item){
- return {html:false, label:this.store.getValue(item, this.searchAttr)};
- },
-
- open:function(){
- this._isShowingNow=true;
- return dijit.popup.open({
- popup: this._popupWidget,
- around: this.domNode,
- parent: this
- });
- }
- }
-);
-
-dojo.declare(
- "dijit.form._ComboBoxMenu",
- [dijit._Widget, dijit._Templated],
-
- {
- // summary:
- // Focus-less div based menu for internal use in ComboBox
-
- templateString:"<div class='dijitMenu' dojoAttachEvent='onmousedown,onmouseup,onmouseover,onmouseout' tabIndex='-1' style='overflow:\"auto\";'>"
- +"<div class='dijitMenuItem dijitMenuPreviousButton' dojoAttachPoint='previousButton'></div>"
- +"<div class='dijitMenuItem dijitMenuNextButton' dojoAttachPoint='nextButton'></div>"
- +"</div>",
- _messages:null,
-
- postMixInProperties:function(){
- this._messages = dojo.i18n.getLocalization("dijit.form", "ComboBox", this.lang);
- this.inherited("postMixInProperties", arguments);
- },
-
- setValue:function(/*Object*/ value){
- this.value=value;
- this.onChange(value);
- },
-
- onChange:function(/*Object*/ value){},
- onPage:function(/*Number*/ direction){},
-
- postCreate:function(){
- // fill in template with i18n messages
- this.previousButton.innerHTML=this._messages["previousMessage"];
- this.nextButton.innerHTML=this._messages["nextMessage"];
- this.inherited("postCreate", arguments);
- },
-
- onClose:function(){
- this._blurOptionNode();
- },
-
- _createOption:function(/*Object*/ item, labelFunc){
- // summary: creates an option to appear on the popup menu
- // subclassed by FilteringSelect
-
- var labelObject=labelFunc(item);
- var menuitem = document.createElement("div");
- if(labelObject.html){menuitem.innerHTML=labelObject.label;}
- else{menuitem.appendChild(document.createTextNode(labelObject.label));}
- // #3250: in blank options, assign a normal height
- if(menuitem.innerHTML==""){
- menuitem.innerHTML="&nbsp;"
- }
- menuitem.item=item;
- return menuitem;
- },
-
- createOptions:function(results, dataObject, labelFunc){
- //this._dataObject=dataObject;
- //this._dataObject.onComplete=dojo.hitch(comboBox, comboBox._openResultList);
- // display "Previous . . ." button
- this.previousButton.style.display=dataObject.start==0?"none":"";
- // create options using _createOption function defined by parent ComboBox (or FilteringSelect) class
- // #2309: iterate over cache nondestructively
- var _this=this;
- dojo.forEach(results, function(item){
- var menuitem=_this._createOption(item, labelFunc);
- menuitem.className = "dijitMenuItem";
- _this.domNode.insertBefore(menuitem, _this.nextButton);
- });
- // display "Next . . ." button
- this.nextButton.style.display=dataObject.count==results.length?"":"none";
- },
-
- clearResultList:function(){
- // keep the previous and next buttons of course
- while(this.domNode.childNodes.length>2){
- this.domNode.removeChild(this.domNode.childNodes[this.domNode.childNodes.length-2]);
- }
- },
-
- // these functions are called in showResultList
- getItems:function(){
- return this.domNode.childNodes;
- },
-
- getListLength:function(){
- return this.domNode.childNodes.length-2;
- },
-
- onmousedown:function(/*Event*/ evt){
- dojo.stopEvent(evt);
- },
-
- onmouseup:function(/*Event*/ evt){
- if(evt.target === this.domNode){
- return;
- }else if(evt.target==this.previousButton){
- this.onPage(-1);
- }else if(evt.target==this.nextButton){
- this.onPage(1);
- }else{
- var tgt=evt.target;
- // while the clicked node is inside the div
- while(!tgt.item){
- // recurse to the top
- tgt=tgt.parentNode;
- }
- this.setValue({target:tgt}, true);
- }
- },
-
- onmouseover:function(/*Event*/ evt){
- if(evt.target === this.domNode){ return; }
- var tgt=evt.target;
- if(!(tgt==this.previousButton||tgt==this.nextButton)){
- // while the clicked node is inside the div
- while(!tgt.item){
- // recurse to the top
- tgt=tgt.parentNode;
- }
- }
- this._focusOptionNode(tgt);
- },
-
- onmouseout:function(/*Event*/ evt){
- if(evt.target === this.domNode){ return; }
- this._blurOptionNode();
- },
-
- _focusOptionNode:function(/*DomNode*/ node){
- // summary:
- // does the actual highlight
- if(this._highlighted_option != node){
- this._blurOptionNode();
- this._highlighted_option = node;
- dojo.addClass(this._highlighted_option, "dijitMenuItemHover");
- }
- },
-
- _blurOptionNode:function(){
- // summary:
- // removes highlight on highlighted option
- if(this._highlighted_option){
- dojo.removeClass(this._highlighted_option, "dijitMenuItemHover");
- this._highlighted_option = null;
- }
- },
-
- _highlightNextOption:function(){
- // because each press of a button clears the menu,
- // the highlighted option sometimes becomes detached from the menu!
- // test to see if the option has a parent to see if this is the case.
- if(!this.getHighlightedOption()){
- this._focusOptionNode(this.domNode.firstChild.style.display=="none"?this.domNode.firstChild.nextSibling:this.domNode.firstChild);
- }else if(this._highlighted_option.nextSibling&&this._highlighted_option.nextSibling.style.display!="none"){
- this._focusOptionNode(this._highlighted_option.nextSibling);
- }
- // scrollIntoView is called outside of _focusOptionNode because in IE putting it inside causes the menu to scroll up on mouseover
- dijit.scrollIntoView(this._highlighted_option);
- },
-
- highlightFirstOption:function(){
- // highlight the non-Previous choices option
- this._focusOptionNode(this.domNode.firstChild.nextSibling);
- dijit.scrollIntoView(this._highlighted_option);
- },
-
- highlightLastOption:function(){
- // highlight the noon-More choices option
- this._focusOptionNode(this.domNode.lastChild.previousSibling);
- dijit.scrollIntoView(this._highlighted_option);
- },
-
- _highlightPrevOption:function(){
- // if nothing selected, highlight last option
- // makes sense if you select Previous and try to keep scrolling up the list
- if(!this.getHighlightedOption()){
- this._focusOptionNode(this.domNode.lastChild.style.display=="none"?this.domNode.lastChild.previousSibling:this.domNode.lastChild);
- }else if(this._highlighted_option.previousSibling&&this._highlighted_option.previousSibling.style.display!="none"){
- this._focusOptionNode(this._highlighted_option.previousSibling);
- }
- dijit.scrollIntoView(this._highlighted_option);
- },
-
- _page:function(/*Boolean*/ up){
- var scrollamount=0;
- var oldscroll=this.domNode.scrollTop;
- var height=parseInt(dojo.getComputedStyle(this.domNode).height);
- // if no item is highlighted, highlight the first option
- if(!this.getHighlightedOption()){this._highlightNextOption();}
- while(scrollamount<height){
- if(up){
- // stop at option 1
- if(!this.getHighlightedOption().previousSibling||this._highlighted_option.previousSibling.style.display=="none"){break;}
- this._highlightPrevOption();
- }else{
- // stop at last option
- if(!this.getHighlightedOption().nextSibling||this._highlighted_option.nextSibling.style.display=="none"){break;}
- this._highlightNextOption();
- }
- // going backwards
- var newscroll=this.domNode.scrollTop;
- scrollamount+=(newscroll-oldscroll)*(up ? -1:1);
- oldscroll=newscroll;
- }
- },
-
- pageUp:function(){
- this._page(true);
- },
-
- pageDown:function(){
- this._page(false);
- },
-
- getHighlightedOption:function(){
- // summary:
- // Returns the highlighted option.
- return this._highlighted_option&&this._highlighted_option.parentNode ? this._highlighted_option : null;
- },
-
- handleKey:function(evt){
- switch(evt.keyCode){
- case dojo.keys.DOWN_ARROW:
- this._highlightNextOption();
- break;
- case dojo.keys.PAGE_DOWN:
- this.pageDown();
- break;
- case dojo.keys.UP_ARROW:
- this._highlightPrevOption();
- break;
- case dojo.keys.PAGE_UP:
- this.pageUp();
- break;
- }
- }
- }
-);
-
-dojo.declare(
- "dijit.form.ComboBox",
- [dijit.form.ValidationTextBox, dijit.form.ComboBoxMixin],
- {
- postMixInProperties: function(){
- dijit.form.ComboBoxMixin.prototype.postMixInProperties.apply(this, arguments);
- dijit.form.ValidationTextBox.prototype.postMixInProperties.apply(this, arguments);
+ },
+
+ _setValueAttr: function(/*Number*/ value, /*Boolean?*/ priorityChange){
+ // summary:
+ // Hook so attr('value', ...) works.
+
+ dijit.setWaiState(this.focusNode, "valuenow", value);
+ this.inherited(arguments);
}
}
);
}
if(!dojo._hasResource["dojo.cldr.monetary"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo.cldr.monetary"] = true;
dojo.provide("dojo.cldr.monetary");
-dojo.cldr.monetary.getData = function(code){
+dojo.cldr.monetary.getData = function(/*String*/code){
// summary: A mapping of currency code to currency-specific formatting information. Returns a unique object with properties: places, round.
-// code: an iso4217 currency code
+// code: an [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) currency code
// from http://www.unicode.org/cldr/data/common/supplemental/supplementalData.xml:supplementalData/currencyData/fractions
var placesData = {
ADP:0,BHD:3,BIF:0,BYR:0,CLF:0,CLP:0,DJF:0,ESP:0,GNF:0,
IQD:3,ITL:0,JOD:3,JPY:0,KMF:0,KRW:0,KWD:3,LUF:0,LYD:3,
MGA:0,MGF:0,OMR:3,PYG:0,RWF:0,TND:3,TRL:0,VUV:0,XAF:0,
XOF:0,XPF:0
};
var roundingData = {CHF:5};
var places = placesData[code], round = roundingData[code];
if(typeof places == "undefined"){ places = 2; }
if(typeof round == "undefined"){ round = 0; }
return {places: places, round: round}; // Object
};
}
if(!dojo._hasResource["dojo.currency"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo.currency"] = true;
dojo.provide("dojo.currency");
+/*=====
+dojo.currency = {
+ // summary: localized formatting and parsing routines for currencies
+}
+=====*/
+
dojo.currency._mixInDefaults = function(options){
options = options || {};
options.type = "currency";
// Get locale-depenent currency data, like the symbol
var bundle = dojo.i18n.getLocalization("dojo.cldr", "currency", options.locale) || {};
// Mixin locale-independent currency data, like # of places
var iso = options.currency;
var data = dojo.cldr.monetary.getData(iso);
dojo.forEach(["displayName","symbol","group","decimal"], function(prop){
data[prop] = bundle[iso+"_"+prop];
});
data.fractional = [true, false];
// Mixin with provided options
return dojo.mixin(data, options);
}
-dojo.currency.format = function(/*Number*/value, /*Object?*/options){
+/*=====
+dojo.declare("dojo.currency.__FormatOptions", [dojo.number.__FormatOptions], {
+ // type: String?
+ // Should not be set. Value is assumed to be currency.
+ // currency: String?
+ // an [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code, a three letter sequence like "USD".
+ // For use with dojo.currency only.
+ // symbol: String?
+ // localized currency symbol. The default will be looked up in table of supported currencies in `dojo.cldr`
+ // A [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code will be used if not found.
+ // places: Number?
+ // number of decimal places to show. Default is defined based on which currency is used.
+ type: "",
+ symbol: "",
+ places: "",
+ fractional: ""
+});
+=====*/
+
+dojo.currency.format = function(/*Number*/value, /*dojo.currency.__FormatOptions?*/options){
// summary:
-// Format a Number as a String, using locale-specific settings
+// Format a Number as a currency, using locale-specific settings
//
// description:
-// Create a string from a Number using a known localized pattern.
-// Formatting patterns appropriate to the locale are chosen from the CLDR http://unicode.org/cldr
-// as well as the appropriate symbols and delimiters. See http://www.unicode.org/reports/tr35/#Number_Elements
+// Create a string from a Number using a known, localized pattern.
+// [Formatting patterns](http://www.unicode.org/reports/tr35/#Number_Elements) appropriate to the locale are chosen from the [CLDR](http://unicode.org/cldr)
+// as well as the appropriate symbols and delimiters.
//
// value:
// the number to be formatted.
-//
-// options: object {currency: String, pattern: String?, places: Number?, round: Number?, symbol: String?, locale: String?}
-// currency- the ISO4217 currency code, a three letter sequence like "USD"
-// See http://en.wikipedia.org/wiki/ISO_4217
-// symbol- override currency symbol. Normally, will be looked up in table of supported currencies, and ISO currency code will
-// be used if not found. See dojo.i18n.cldr.nls->currency.js
-// pattern- override formatting pattern with this string (see dojo.number.applyPattern)
-// places- fixed number of decimal places to show. Default is defined by the currency.
-// round- 5 rounds to nearest .5; 0 rounds to nearest whole (default). -1 means don't round.
-// locale- override the locale used to determine formatting rules
return dojo.number.format(value, dojo.currency._mixInDefaults(options));
}
-dojo.currency.regexp = function(/*Object?*/options){
+dojo.currency.regexp = function(/*dojo.number.__RegexpOptions?*/options){
//
// summary:
-// Builds the regular needed to parse a number
+// Builds the regular needed to parse a currency value
//
// description:
// Returns regular expression with positive and negative match, group and decimal separators
-//
-// options: object {pattern: String, locale: String, strict: Boolean, places: mixed}
-// currency- the ISO4217 currency code, a three letter sequence like "USD"
-// See http://en.wikipedia.org/wiki/ISO_4217
-// symbol- override currency symbol. Normally, will be looked up in table of supported currencies, and ISO currency code will
-// be used if not found. See dojo.i18n.cldr.nls->currency.js
-// pattern- override pattern with this string
-// locale- override the locale used to determine formatting rules
-// strict- strict parsing, false by default
-// places- number of decimal places to accept. Default is defined by currency.
+// Note: the options.places default, the number of decimal places to accept, is defined by the currency type.
return dojo.number.regexp(dojo.currency._mixInDefaults(options)); // String
}
-dojo.currency.parse = function(/*String*/expression, /*Object?*/options){
-//
-// summary:
-// Convert a properly formatted string to a primitive Number,
-// using locale-specific settings.
-//
-// description:
-// Create a Number from a string using a known localized pattern.
-// Formatting patterns are chosen appropriate to the locale.
-// Formatting patterns are implemented using the syntax described at *URL*
-//
-// expression: A string representation of a Number
-//
-// options: object {pattern: string, locale: string, strict: boolean}
-// currency- the ISO4217 currency code, a three letter sequence like "USD"
-// See http://en.wikipedia.org/wiki/ISO_4217
-// symbol- override currency symbol. Normally, will be looked up in table of supported currencies, and ISO currency code will
-// be used if not found. See dojo.i18n.cldr.nls->currency.js
-// pattern- override pattern with this string
-// locale- override the locale used to determine formatting rules
-// strict- strict parsing, false by default
-// places- number of decimal places to accept. Default is defined by currency.
-// fractional- where places are implied by pattern or explicit 'places' parameter, whether to include the fractional portion.
-// By default for currencies, it the fractional portion is optional.
+/*=====
+dojo.declare("dojo.currency.__ParseOptions", [dojo.number.__ParseOptions], {
+ // type: String?
+ // Should not be set. Value is assumed to be currency.
+ // currency: String?
+ // an [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code, a three letter sequence like "USD".
+ // For use with dojo.currency only.
+ // symbol: String?
+ // localized currency symbol. The default will be looked up in table of supported currencies in `dojo.cldr`
+ // A [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code will be used if not found.
+ // places: Number?
+ // number of decimal places to accept. Default is defined based on which currency is used.
+ // fractional: Boolean?|Array?
+ // Whether to include the fractional portion, where the number of decimal places are implied by pattern
+ // or explicit 'places' parameter. By default for currencies, it the fractional portion is optional.
+ type: "",
+ symbol: "",
+ places: "",
+ fractional: ""
+});
+=====*/
+
+dojo.currency.parse = function(/*String*/expression, /*dojo.currency.__ParseOptions?*/options){
+ //
+ // summary:
+ // Convert a properly formatted currency string to a primitive Number,
+ // using locale-specific settings.
+ //
+ // description:
+ // Create a Number from a string using a known, localized pattern.
+ // [Formatting patterns](http://www.unicode.org/reports/tr35/#Number_Format_Patterns) are chosen appropriate to the locale.
+ //
+ // expression: A string representation of a Number
+
return dojo.number.parse(expression, dojo.currency._mixInDefaults(options));
}
}
if(!dojo._hasResource["dijit.form.NumberTextBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.form.NumberTextBox"] = true;
dojo.provide("dijit.form.NumberTextBox");
+/*=====
dojo.declare(
- "dijit.form.NumberTextBoxMixin",
+ "dijit.form.NumberTextBox.__Constraints",
+ [dijit.form.RangeBoundTextBox.__Constraints, dojo.number.__FormatOptions, dojo.number.__ParseOptions], {
+ // summary:
+ // Specifies both the rules on valid/invalid values (minimum, maximum,
+ // number of required decimal places), and also formatting options for
+ // displaying the value when the field is not focused.
+ // example:
+ // Minimum/maximum:
+ // To specify a field between 0 and 120:
+ // | {min:0,max:120}
+ // To specify a field that must be an integer:
+ // | {fractional:false}
+ // To specify a field where 0 to 3 decimal places are allowed on input,
+ // but after the field is blurred the value is displayed with 3 decimal places:
+ // | {places:'0,3'}
+});
+=====*/
+
+dojo.declare("dijit.form.NumberTextBoxMixin",
null,
{
// summary:
// A mixin for all number textboxes
+ // tags:
+ // protected
+
+ // Override ValidationTextBox.regExpGen().... we use a reg-ex generating function rather
+ // than a straight regexp to deal with locale (plus formatting options too?)
regExpGen: dojo.number.regexp,
- format: function(/*Number*/ value, /*Object*/ constraints){
+ /*=====
+ // constraints: dijit.form.NumberTextBox.__Constraints
+ // Despite the name, this parameter specifies both constraints on the input
+ // (including minimum/maximum allowed values) as well as
+ // formatting options like places (the number of digits to display after
+ // the decimal point). See `dijit.form.NumberTextBox.__Constraints` for details.
+ constraints: {},
+ ======*/
+
+ // value: Number
+ // The value of this NumberTextBox as a javascript Number (ie, not a String).
+ // If the displayed value is blank, the value is NaN, and if the user types in
+ // an gibberish value (like "hello world"), the value is undefined
+ // (i.e. attr('value') returns undefined).
+ //
+ // Symetrically, attr('value', NaN) will clear the displayed value,
+ // whereas attr('value', undefined) will have no effect.
+ value: NaN,
+
+ // editOptions: [protected] Object
+ // Properties to mix into constraints when the value is being edited.
+ // This is here because we edit the number in the format "12345", which is
+ // different than the display value (ex: "12,345")
+ editOptions: { pattern: '#.######' },
+
+ /*=====
+ _formatter: function(value, options){
+ // summary:
+ // _formatter() is called by format(). It's the base routine for formatting a number,
+ // as a string, for example converting 12345 into "12,345".
+ // value: Number
+ // The number to be converted into a string.
+ // options: dojo.number.__FormatOptions?
+ // Formatting options
+ // tags:
+ // protected extension
+
+ return "12345"; // String
+ },
+ =====*/
+ _formatter: dojo.number.format,
+
+ postMixInProperties: function(){
+ var places = typeof this.constraints.places == "number"? this.constraints.places : 0;
+ if(places){ places++; } // decimal rounding errors take away another digit of precision
+ if(typeof this.constraints.max != "number"){
+ this.constraints.max = 9 * Math.pow(10, 15-places);
+ }
+ if(typeof this.constraints.min != "number"){
+ this.constraints.min = -9 * Math.pow(10, 15-places);
+ }
+ this.inherited(arguments);
+ },
+
+ _onFocus: function(){
+ if(this.disabled){ return; }
+ var val = this.attr('value');
+ if(typeof val == "number" && !isNaN(val)){
+ var formattedValue = this.format(val, this.constraints);
+ if(formattedValue !== undefined){
+ this.textbox.value = formattedValue;
+ }
+ }
+ this.inherited(arguments);
+ },
+
+ format: function(/*Number*/ value, /*dojo.number.__FormatOptions*/ constraints){
+ // summary:
+ // Formats the value as a Number, according to constraints.
+ // tags:
+ // protected
+
+ if(typeof value != "number"){ return String(value); }
if(isNaN(value)){ return ""; }
- return dojo.number.format(value, constraints);
- },
-
+ if(("rangeCheck" in this) && !this.rangeCheck(value, constraints)){ return String(value) }
+ if(this.editOptions && this._focused){
+ constraints = dojo.mixin({}, constraints, this.editOptions);
+ }
+ return this._formatter(value, constraints);
+ },
+
+ /*=====
+ parse: function(value, constraints){
+ // summary:
+ // Parses the string value as a Number, according to constraints.
+ // value: String
+ // String representing a number
+ // constraints: dojo.number.__ParseOptions
+ // Formatting options
+ // tags:
+ // protected
+
+ return 123.45; // Number
+ },
+ =====*/
parse: dojo.number.parse,
+ _getDisplayedValueAttr: function(){
+ var v = this.inherited(arguments);
+ return isNaN(v) ? this.textbox.value : v;
+ },
+
filter: function(/*Number*/ value){
- if(typeof value == "string"){ return this.inherited('filter', arguments); }
- return (isNaN(value) ? '' : value);
- },
-
- value: NaN
+ // summary:
+ // This is called with both the display value (string), and the actual value (a number).
+ // When called with the actual value it does corrections so that '' etc. are represented as NaN.
+ // Otherwise it dispatches to the superclass's filter() method.
+ //
+ // See `dijit.form.TextBox.filter` for more details.
+ return (value === null || value === '' || value === undefined) ? NaN : this.inherited(arguments); // attr('value', null||''||undefined) should fire onChange(NaN)
+ },
+
+ serialize: function(/*Number*/ value, /*Object?*/options){
+ // summary:
+ // Convert value (a Number) into a canonical string (ie, how the number literal is written in javascript/java/C/etc.)
+ // tags:
+ // protected
+ return (typeof value != "number" || isNaN(value)) ? '' : this.inherited(arguments);
+ },
+
+ _setValueAttr: function(/*Number*/ value, /*Boolean?*/ priorityChange, /*String?*/formattedValue){
+ // summary:
+ // Hook so attr('value', ...) works.
+ if(value !== undefined && formattedValue === undefined){
+ if(typeof value == "number"){
+ if(isNaN(value)){ formattedValue = '' }
+ else if(("rangeCheck" in this) && !this.rangeCheck(value, this.constraints)){
+ formattedValue = String(value);
+ }
+ }else if(!value){ // 0 processed in if branch above, ''|null|undefined flow thru here
+ formattedValue = '';
+ value = NaN;
+ }else{ // non-numeric values
+ formattedValue = String(value);
+ value = undefined;
+ }
+ }
+ this.inherited(arguments, [value, priorityChange, formattedValue]);
+ },
+
+ _getValueAttr: function(){
+ // summary:
+ // Hook so attr('value') works.
+ // Returns Number, NaN for '', or undefined for unparsable text
+ var v = this.inherited(arguments); // returns Number for all values accepted by parse() or NaN for all other displayed values
+
+ // If the displayed value of the textbox is gibberish (ex: "hello world"), this.inherited() above
+ // returns NaN; this if() branch converts the return value to undefined.
+ // Returning undefined prevents user text from being overwritten when doing _setValueAttr(_getValueAttr()).
+ // A blank displayed value is still returned as NaN.
+ if(isNaN(v) && this.textbox.value !== ''){
+ if(this.constraints.exponent !== false && /\de[-+]?|\d/i.test(this.textbox.value) && (new RegExp("^"+dojo.number._realNumberRegexp(dojo.mixin({}, this.constraints))+"$").test(this.textbox.value))){ // check for exponential notation that parse() rejected (erroneously?)
+ var n = Number(this.textbox.value);
+ return isNaN(n) ? undefined : n; // return exponential Number or undefined for random text (may not be possible to do with the above RegExp check)
+ }else{
+ return undefined; // gibberish
+ }
+ }else{
+ return v; // Number or NaN for ''
+ }
+ },
+
+ isValid: function(/*Boolean*/ isFocused){
+ // Overrides dijit.form.RangeBoundTextBox.isValid to check that the editing-mode value is valid since
+ // it may not be formatted according to the regExp vaidation rules
+ if(!this._focused || this._isEmpty(this.textbox.value)){
+ return this.inherited(arguments);
+ }else{
+ var v = this.attr('value');
+ if(!isNaN(v) && this.rangeCheck(v, this.constraints)){
+ if(this.constraints.exponent !== false && /\de[-+]?\d/i.test(this.textbox.value)){ // exponential, parse doesn't like it
+ return true; // valid exponential number in range
+ }else{
+ return this.inherited(arguments);
+ }
+ }else{
+ return false;
+ }
+ }
+ }
}
);
-dojo.declare(
- "dijit.form.NumberTextBox",
+dojo.declare("dijit.form.NumberTextBox",
[dijit.form.RangeBoundTextBox,dijit.form.NumberTextBoxMixin],
{
// summary:
- // A validating, serializable, range-bound text box.
- // constraints object: min, max, places
+ // A TextBox for entering numbers, with formatting and range checking
+ // description:
+ // NumberTextBox is a textbox for entering and displaying numbers, supporting
+ // the following main features:
+ //
+ // 1. Enforce minimum/maximum allowed values (as well as enforcing that the user types
+ // a number rather than a random string)
+ // 2. NLS support (altering roles of comma and dot as "thousands-separator" and "decimal-point"
+ // depending on locale).
+ // 3. Separate modes for editing the value and displaying it, specifically that
+ // the thousands separator character (typically comma) disappears when editing
+ // but reappears after the field is blurred.
+ // 4. Formatting and constraints regarding the number of places (digits after the decimal point)
+ // allowed on input, and number of places displayed when blurred (see `constraints` parameter).
}
);
}
if(!dojo._hasResource["dijit.form.CurrencyTextBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.form.CurrencyTextBox"] = true;
dojo.provide("dijit.form.CurrencyTextBox");
-//FIXME: dojo.experimental throws an unreadable exception?
-//dojo.experimental("dijit.form.CurrencyTextBox");
-
-
-
+
+
+
+/*=====
+dojo.declare(
+ "dijit.form.CurrencyTextBox.__Constraints",
+ [dijit.form.NumberTextBox.__Constraints, dojo.currency.__FormatOptions, dojo.currency.__ParseOptions], {
+ // summary:
+ // Specifies both the rules on valid/invalid values (minimum, maximum,
+ // number of required decimal places), and also formatting options for
+ // displaying the value when the field is not focused (currency symbol,
+ // etc.)
+ // description:
+ // Follows the pattern of `dijit.form.NumberTextBox.constraints`.
+ // In general developers won't need to set this parameter
+ // example:
+ // To ensure that the user types in the cents (for example, 1.00 instead of just 1):
+ // | {fractional:true}
+});
+=====*/
dojo.declare(
"dijit.form.CurrencyTextBox",
dijit.form.NumberTextBox,
{
- // code: String
- // the ISO4217 currency code, a three letter sequence like "USD"
- // See http://en.wikipedia.org/wiki/ISO_4217
+ // summary:
+ // A validating currency textbox
+ // description:
+ // CurrencyTextBox is similar to `dijit.form.NumberTextBox` but has a few
+ // extra features related to currency:
+ //
+ // 1. After specifying the currency type (american dollars, euros, etc.) it automatically
+ // sets parse/format options such as how many decimal places to show.
+ // 2. The currency mark (dollar sign, euro mark, etc.) is displayed when the field is blurred
+ // but erased during editing, so that the user can just enter a plain number.
+
+ // currency: String
+ // the [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code, a three letter sequence like "USD"
currency: "",
- regExpGen: dojo.currency.regexp,
- format: dojo.currency.format,
- parse: dojo.currency.parse,
+ // constraints: dijit.form.CurrencyTextBox.__Constraints
+ // Despite the name, this parameter specifies both constraints on the input
+ // (including minimum/maximum allowed values) as well as
+ // formatting options. See `dijit.form.CurrencyTextBox.__Constraints` for details.
+ /*=====
+ constraints: {},
+ ======*/
+
+ // Override regExpGen ValidationTextBox.regExpGen().... we use a reg-ex generating function rather
+ // than a straight regexp to deal with locale (plus formatting options too?)
+ regExpGen: function(constraints){
+ // if focused, accept either currency data or NumberTextBox format
+ return '(' + (this._focused? this.inherited(arguments, [ dojo.mixin({}, constraints, this.editOptions) ]) + '|' : '')
+ + dojo.currency.regexp(constraints) + ')';
+ },
+
+ // Override NumberTextBox._formatter to deal with currencies, ex: converts "123.45" to "$123.45"
+ _formatter: dojo.currency.format,
+
+ parse: function(/* String */ value, /* Object */ constraints){
+ // summary:
+ // Parses string value as a Currency, according to the constraints object
+ // tags:
+ // protected extension
+ var v = dojo.currency.parse(value, constraints);
+ if(isNaN(v) && /\d+/.test(value)){ // currency parse failed, but it could be because they are using NumberTextBox format so try its parse
+ return this.inherited(arguments, [ value, dojo.mixin({}, constraints, this.editOptions) ]);
+ }
+ return v;
+ },
+
postMixInProperties: function(){
- if(this.constraints === dijit.form.ValidationTextBox.prototype.constraints){
- // declare a constraints property on 'this' so we don't overwrite the shared default object in 'prototype'
- this.constraints = {};
- }
- this.constraints.currency = this.currency;
- dijit.form.CurrencyTextBox.superclass.postMixInProperties.apply(this, arguments);
+ this.constraints = dojo.currency._mixInDefaults(dojo.mixin(this.constraints, { currency: this.currency, exponent: false })); // get places
+ this.inherited(arguments);
}
}
);
}
if(!dojo._hasResource["dojo.cldr.supplemental"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo.cldr.supplemental"] = true;
dojo.provide("dojo.cldr.supplemental");
dojo.cldr.supplemental.getFirstDayOfWeek = function(/*String?*/locale){
// summary: Returns a zero-based index for first day of the week
// description:
// Returns a zero-based index for first day of the week, as used by the local (Gregorian) calendar.
// e.g. Sunday (returns 0), or Monday (returns 1)
// from http://www.unicode.org/cldr/data/common/supplemental/supplementalData.xml:supplementalData/weekData/firstDay
var firstDay = {/*default is 1=Monday*/
mv:5,
ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,lb:6,ly:6,ma:6,om:6,qa:6,sa:6,
sd:6,so:6,tn:6,ye:6,
as:0,au:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,ie:0,il:0,is:0,jm:0,jp:0,kg:0,kr:0,la:0,
mh:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,za:0,zw:0,
et:0,mw:0,ng:0,tj:0,
- gb:0,
+// variant. do not use? gb:0,
sy:4
};
var country = dojo.cldr.supplemental._region(locale);
var dow = firstDay[country];
- return (typeof dow == 'undefined') ? 1 : dow; /*Number*/
+ return (dow === undefined) ? 1 : dow; /*Number*/
};
dojo.cldr.supplemental._region = function(/*String?*/locale){
locale = dojo.i18n.normalizeLocale(locale);
var tags = locale.split('-');
var region = tags[1];
if(!region){
// IE often gives language only (#2269)
// Arbitrary mappings of language-only locales to a country:
- region = {de:"de", en:"us", es:"es", fi:"fi", fr:"fr", hu:"hu", it:"it",
- ja:"jp", ko:"kr", nl:"nl", pt:"br", sv:"se", zh:"cn"}[tags[0]];
+ region = {de:"de", en:"us", es:"es", fi:"fi", fr:"fr", he:"il", hu:"hu", it:"it",
+ ja:"jp", ko:"kr", nl:"nl", pt:"br", sv:"se", zh:"cn"}[tags[0]];
}else if(region.length == 4){
// The ISO 3166 country code is usually in the second position, unless a
// 4-letter script is given. See http://www.ietf.org/rfc/rfc4646.txt
region = tags[2];
}
return region;
}
dojo.cldr.supplemental.getWeekend = function(/*String?*/locale){
// summary: Returns a hash containing the start and end days of the weekend
// description:
// Returns a hash containing the start and end days of the weekend according to local custom using locale,
// or by default in the user's locale.
// e.g. {start:6, end:0}
// from http://www.unicode.org/cldr/data/common/supplemental/supplementalData.xml:supplementalData/weekData/weekend{Start,End}
var weekendStart = {/*default is 6=Saturday*/
eg:5,il:5,sy:5,
'in':0,
ae:4,bh:4,dz:4,iq:4,jo:4,kw:4,lb:4,ly:4,ma:4,om:4,qa:4,sa:4,sd:4,tn:4,ye:4
};
var weekendEnd = {/*default is 0=Sunday*/
ae:5,bh:5,dz:5,iq:5,jo:5,kw:5,lb:5,ly:5,ma:5,om:5,qa:5,sa:5,sd:5,tn:5,ye:5,af:5,ir:5,
eg:6,il:6,sy:6
};
var country = dojo.cldr.supplemental._region(locale);
var start = weekendStart[country];
var end = weekendEnd[country];
- if(typeof start == 'undefined'){start=6;}
- if(typeof end == 'undefined'){end=0;}
+ if(start === undefined){start=6;}
+ if(end === undefined){end=0;}
return {start:start, end:end}; /*Object {start,end}*/
};
}
if(!dojo._hasResource["dojo.date"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo.date"] = true;
dojo.provide("dojo.date");
+/*=====
+dojo.date = {
+ // summary: Date manipulation utilities
+}
+=====*/
+
dojo.date.getDaysInMonth = function(/*Date*/dateObject){
// summary:
// Returns the number of days in the month used by dateObject
var month = dateObject.getMonth();
var days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
if(month == 1 && dojo.date.isLeapYear(dateObject)){ return 29; } // Number
return days[month]; // Number
}
dojo.date.isLeapYear = function(/*Date*/dateObject){
// summary:
// Determines if the year of the dateObject is a leap year
// description:
// Leap years are years with an additional day YYYY-02-29, where the
// year number is a multiple of four with the following exception: If
// a year is a multiple of 100, then it is only a leap year if it is
// also a multiple of 400. For example, 1900 was not a leap year, but
// 2000 is one.
var year = dateObject.getFullYear();
return !(year%400) || (!(year%4) && !!(year%100)); // Boolean
}
// FIXME: This is not localized
dojo.date.getTimezoneName = function(/*Date*/dateObject){
// summary:
// Get the user's time zone as provided by the browser
// dateObject:
// Needed because the timezone may vary with time (daylight savings)
// description:
// Try to get time zone info from toString or toLocaleString method of
// the Date object -- UTC offset is not a time zone. See
// http://www.twinsun.com/tz/tz-link.htm Note: results may be
// inconsistent across browsers.
var str = dateObject.toString(); // Start looking in toString
var tz = ''; // The result -- return empty string if nothing found
var match;
// First look for something in parentheses -- fast lookup, no regex
var pos = str.indexOf('(');
if(pos > -1){
tz = str.substring(++pos, str.indexOf(')'));
}else{
// If at first you don't succeed ...
// If IE knows about the TZ, it appears before the year
// Capital letters or slash before a 4-digit year
// at the end of string
var pat = /([A-Z\/]+) \d{4}$/;
if((match = str.match(pat))){
tz = match[1];
}else{
// Some browsers (e.g. Safari) glue the TZ on the end
// of toLocaleString instead of putting it in toString
str = dateObject.toLocaleString();
// Capital letters or slash -- end of string,
// after space
pat = / ([A-Z\/]+)$/;
if((match = str.match(pat))){
tz = match[1];
}
}
}
// Make sure it doesn't somehow end up return AM or PM
return (tz == 'AM' || tz == 'PM') ? '' : tz; // String
}
// Utility methods to do arithmetic calculations with Dates
dojo.date.compare = function(/*Date*/date1, /*Date?*/date2, /*String?*/portion){
// summary:
// Compare two date objects by date, time, or both.
// description:
// Returns 0 if equal, positive if a > b, else negative.
// date1:
// Date object
// date2:
// Date object. If not specified, the current Date is used.
// portion:
// A string indicating the "date" or "time" portion of a Date object.
// Compares both "date" and "time" by default. One of the following:
// "date", "time", "datetime"
// Extra step required in copy for IE - see #3112
- date1 = new Date(Number(date1));
- date2 = new Date(Number(date2 || new Date()));
-
- if(typeof portion !== "undefined"){
- if(portion == "date"){
- // Ignore times and compare dates.
- date1.setHours(0, 0, 0, 0);
- date2.setHours(0, 0, 0, 0);
- }else if(portion == "time"){
- // Ignore dates and compare times.
- date1.setFullYear(0, 0, 0);
- date2.setFullYear(0, 0, 0);
- }
+ date1 = new Date(+date1);
+ date2 = new Date(+(date2 || new Date()));
+
+ if(portion == "date"){
+ // Ignore times and compare dates.
+ date1.setHours(0, 0, 0, 0);
+ date2.setHours(0, 0, 0, 0);
+ }else if(portion == "time"){
+ // Ignore dates and compare times.
+ date1.setFullYear(0, 0, 0);
+ date2.setFullYear(0, 0, 0);
}
if(date1 > date2){ return 1; } // int
if(date1 < date2){ return -1; } // int
return 0; // int
};
dojo.date.add = function(/*Date*/date, /*String*/interval, /*int*/amount){
// summary:
// Add to a Date in intervals of different size, from milliseconds to years
// date: Date
// Date object to start with
// interval:
// A string representing the interval. One of the following:
// "year", "month", "day", "hour", "minute", "second",
// "millisecond", "quarter", "week", "weekday"
// amount:
// How much to add to the date.
- var sum = new Date(Number(date)); // convert to Number before copying to accomodate IE (#3112)
+ var sum = new Date(+date); // convert to Number before copying to accomodate IE (#3112)
var fixOvershoot = false;
var property = "Date";
switch(interval){
case "day":
break;
case "weekday":
- //i18n FIXME: assumes Saturday/Sunday weekend, but even this is not standard. There are CLDR entries to localize this.
- var days, weeks;
- var adj = 0;
+ //i18n FIXME: assumes Saturday/Sunday weekend, but this is not always true. see dojo.cldr.supplemental
+
// Divide the increment time span into weekspans plus leftover days
// e.g., 8 days is one 5-day weekspan / and two leftover days
// Can't have zero leftover days, so numbers divisible by 5 get
// a days value of 5, and the remaining days make up the number of weeks
+ var days, weeks;
var mod = amount % 5;
if(!mod){
days = (amount > 0) ? 5 : -5;
weeks = (amount > 0) ? ((amount-5)/5) : ((amount+5)/5);
}else{
days = mod;
weeks = parseInt(amount/5);
}
// Get weekday value for orig date param
var strt = date.getDay();
// Orig date is Sat / positive incrementer
// Jump over Sun
+ var adj = 0;
if(strt == 6 && amount > 0){
adj = 1;
}else if(strt == 0 && amount < 0){
// Orig date is Sun / negative incrementer
// Jump back over Sat
adj = -1;
}
// Get weekday val for the new date
var trgt = strt + days;
// New date is on Sat or Sun
if(trgt == 0 || trgt == 6){
adj = (amount > 0) ? 2 : -2;
}
// Increment by number of weeks plus leftover days plus
// weekend adjustments
- amount = 7 * weeks + days + adj;
+ amount = (7 * weeks) + days + adj;
break;
case "year":
property = "FullYear";
// Keep increment/decrement from 2/29 out of March
fixOvershoot = true;
break;
case "week":
amount *= 7;
break;
case "quarter":
// Naive quarter is just three months
amount *= 3;
// fallthrough...
case "month":
// Reset to last day of month if you overshoot
fixOvershoot = true;
property = "Month";
break;
- case "hour":
- case "minute":
- case "second":
- case "millisecond":
- property = "UTC" + interval.charAt(0).toUpperCase() + interval.substring(1) + "s";
+// case "hour":
+// case "minute":
+// case "second":
+// case "millisecond":
+ default:
+ property = "UTC"+interval.charAt(0).toUpperCase() + interval.substring(1) + "s";
}
if(property){
sum["set"+property](sum["get"+property]()+amount);
}
if(fixOvershoot && (sum.getDate() < date.getDate())){
sum.setDate(0);
}
return sum; // Date
};
dojo.date.difference = function(/*Date*/date1, /*Date?*/date2, /*String?*/interval){
// summary:
// Get the difference in a specific unit of time (e.g., number of
// months, weeks, days, etc.) between two dates, rounded to the
// nearest integer.
// date1:
// Date object
// date2:
// Date object. If not specified, the current Date is used.
// interval:
// A string representing the interval. One of the following:
// "year", "month", "day", "hour", "minute", "second",
// "millisecond", "quarter", "week", "weekday"
// Defaults to "day".
date2 = date2 || new Date();
interval = interval || "day";
var yearDiff = date2.getFullYear() - date1.getFullYear();
var delta = 1; // Integer return value
switch(interval){
case "quarter":
var m1 = date1.getMonth();
var m2 = date2.getMonth();
// Figure out which quarter the months are in
var q1 = Math.floor(m1/3) + 1;
var q2 = Math.floor(m2/3) + 1;
// Add quarters for any year difference between the dates
q2 += (yearDiff * 4);
delta = q2 - q1;
break;
case "weekday":
var days = Math.round(dojo.date.difference(date1, date2, "day"));
var weeks = parseInt(dojo.date.difference(date1, date2, "week"));
var mod = days % 7;
// Even number of weeks
if(mod == 0){
days = weeks*5;
}else{
// Weeks plus spare change (< 7 days)
var adj = 0;
var aDay = date1.getDay();
var bDay = date2.getDay();
weeks = parseInt(days/7);
mod = days % 7;
// Mark the date advanced by the number of
// round weeks (may be zero)
var dtMark = new Date(date1);
dtMark.setDate(dtMark.getDate()+(weeks*7));
var dayMark = dtMark.getDay();
// Spare change days -- 6 or less
if(days > 0){
switch(true){
// Range starts on Sat
case aDay == 6:
adj = -1;
break;
// Range starts on Sun
case aDay == 0:
adj = 0;
break;
// Range ends on Sat
case bDay == 6:
adj = -1;
break;
// Range ends on Sun
case bDay == 0:
adj = -2;
break;
// Range contains weekend
case (dayMark + mod) > 5:
adj = -2;
}
}else if(days < 0){
switch(true){
// Range starts on Sat
case aDay == 6:
adj = 0;
break;
// Range starts on Sun
case aDay == 0:
adj = 1;
break;
// Range ends on Sat
case bDay == 6:
adj = 2;
break;
// Range ends on Sun
case bDay == 0:
adj = 1;
break;
// Range contains weekend
case (dayMark + mod) < 0:
adj = 2;
}
}
days += adj;
days -= (weeks*2);
}
delta = days;
break;
case "year":
delta = yearDiff;
break;
case "month":
delta = (date2.getMonth() - date1.getMonth()) + (yearDiff * 12);
break;
case "week":
// Truncate instead of rounding
// Don't use Math.floor -- value may be negative
delta = parseInt(dojo.date.difference(date1, date2, "day")/7);
break;
case "day":
delta /= 24;
// fallthrough
case "hour":
delta /= 60;
// fallthrough
case "minute":
delta /= 60;
// fallthrough
case "second":
delta /= 1000;
// fallthrough
case "millisecond":
delta *= date2.getTime() - date1.getTime();
}
// Round for fractional values and DST leaps
return Math.round(delta); // Number (integer)
};
}
if(!dojo._hasResource["dojo.date.locale"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo.date.locale"] = true;
dojo.provide("dojo.date.locale");
// Localization methods for Date. Honor local customs using locale-dependent dojo.cldr data.
// Load the bundles containing localization information for
// names and formats
//NOTE: Everything in this module assumes Gregorian calendars.
// Other calendars will be implemented in separate modules.
(function(){
// Format a pattern without literals
- function formatPattern(dateObject, bundle, pattern){
+ function formatPattern(dateObject, bundle, options, pattern){
return pattern.replace(/([a-z])\1*/ig, function(match){
- var s;
- var c = match.charAt(0);
- var l = match.length;
- var pad;
- var widthList = ["abbr", "wide", "narrow"];
+ var s, pad,
+ c = match.charAt(0),
+ l = match.length,
+ widthList = ["abbr", "wide", "narrow"];
switch(c){
case 'G':
s = bundle[(l < 4) ? "eraAbbr" : "eraNames"][dateObject.getFullYear() < 0 ? 0 : 1];
break;
case 'y':
s = dateObject.getFullYear();
switch(l){
case 1:
break;
case 2:
- s = String(s); s = s.substr(s.length - 2);
- break;
+ if(!options.fullYear){
+ s = String(s); s = s.substr(s.length - 2);
+ break;
+ }
+ // fallthrough
default:
pad = true;
}
break;
case 'Q':
case 'q':
s = Math.ceil((dateObject.getMonth()+1)/3);
// switch(l){
// case 1: case 2:
pad = true;
// break;
// case 3: case 4: // unimplemented
// }
break;
case 'M':
- case 'L':
var m = dateObject.getMonth();
- var width;
- switch(l){
- case 1: case 2:
- s = m+1; pad = true;
- break;
- case 3: case 4: case 5:
- width = widthList[l-3];
- break;
- }
- if(width){
- var type = (c == "L") ? "standalone" : "format";
- var prop = ["months",type,width].join("-");
- s = bundle[prop][m];
+ if(l<3){
+ s = m+1; pad = true;
+ }else{
+ var propM = ["months", "format", widthList[l-3]].join("-");
+ s = bundle[propM][m];
}
break;
case 'w':
var firstDay = 0;
s = dojo.date.locale._getWeekOfYear(dateObject, firstDay); pad = true;
break;
case 'd':
s = dateObject.getDate(); pad = true;
break;
case 'D':
s = dojo.date.locale._getDayOfYear(dateObject); pad = true;
break;
case 'E':
- case 'e':
- case 'c': // REVIEW: don't see this in the spec?
var d = dateObject.getDay();
- var width;
- switch(l){
- case 1: case 2:
- if(c == 'e'){
- var first = dojo.cldr.supplemental.getFirstDayOfWeek(options.locale);
- d = (d-first+7)%7;
- }
- if(c != 'c'){
- s = d+1; pad = true;
- break;
- }
- // else fallthrough...
- case 3: case 4: case 5:
- width = widthList[l-3];
- break;
- }
- if(width){
- var type = (c == "c") ? "standalone" : "format";
- var prop = ["days",type,width].join("-");
- s = bundle[prop][d];
+ if(l<3){
+ s = d+1; pad = true;
+ }else{
+ var propD = ["days", "format", widthList[l-3]].join("-");
+ s = bundle[propD][d];
}
break;
case 'a':
var timePeriod = (dateObject.getHours() < 12) ? 'am' : 'pm';
s = bundle[timePeriod];
break;
case 'h':
case 'H':
case 'K':
case 'k':
var h = dateObject.getHours();
// strange choices in the date format make it impossible to write this succinctly
- switch (c) {
+ switch (c){
case 'h': // 1-12
s = (h % 12) || 12;
break;
case 'H': // 0-23
s = h;
break;
case 'K': // 0-11
s = (h % 12);
break;
case 'k': // 1-24
s = h || 24;
break;
}
pad = true;
break;
case 'm':
s = dateObject.getMinutes(); pad = true;
break;
case 's':
s = dateObject.getSeconds(); pad = true;
break;
case 'S':
- s = Math.round(dateObject.getMilliseconds() * Math.pow(10, l-3));
+ s = Math.round(dateObject.getMilliseconds() * Math.pow(10, l-3)); pad = true;
break;
case 'v': // FIXME: don't know what this is. seems to be same as z?
case 'z':
// We only have one timezone to offer; the one from the browser
- s = dojo.date.getTimezoneName(dateObject);
+ s = dojo.date.locale._getZone(dateObject, true, options);
if(s){break;}
l=4;
// fallthrough... use GMT if tz not available
case 'Z':
- var offset = dateObject.getTimezoneOffset();
+ var offset = dojo.date.locale._getZone(dateObject, false, options);
var tz = [
(offset<=0 ? "+" : "-"),
dojo.string.pad(Math.floor(Math.abs(offset)/60), 2),
dojo.string.pad(Math.abs(offset)% 60, 2)
];
if(l==4){
tz.splice(0, 0, "GMT");
tz.splice(3, 0, ":");
}
s = tz.join("");
break;
-// case 'Y': case 'u': case 'W': case 'F': case 'g': case 'A':
-// console.debug(match+" modifier unimplemented");
+// case 'Y': case 'u': case 'W': case 'F': case 'g': case 'A': case 'e':
+// console.log(match+" modifier unimplemented");
default:
throw new Error("dojo.date.locale.format: invalid pattern char: "+pattern);
}
if(pad){ s = dojo.string.pad(s, l); }
return s;
});
}
-dojo.date.locale.format = function(/*Date*/dateObject, /*Object?*/options){
+/*=====
+ dojo.date.locale.__FormatOptions = function(){
+ // selector: String
+ // choice of 'time','date' (default: date and time)
+ // formatLength: String
+ // choice of long, short, medium or full (plus any custom additions). Defaults to 'short'
+ // datePattern:String
+ // override pattern with this string
+ // timePattern:String
+ // override pattern with this string
+ // am: String
+ // override strings for am in times
+ // pm: String
+ // override strings for pm in times
+ // locale: String
+ // override the locale used to determine formatting rules
+ // fullYear: Boolean
+ // (format only) use 4 digit years whenever 2 digit years are called for
+ // strict: Boolean
+ // (parse only) strict parsing, off by default
+ this.selector = selector;
+ this.formatLength = formatLength;
+ this.datePattern = datePattern;
+ this.timePattern = timePattern;
+ this.am = am;
+ this.pm = pm;
+ this.locale = locale;
+ this.fullYear = fullYear;
+ this.strict = strict;
+ }
+=====*/
+
+dojo.date.locale._getZone = function(/*Date*/dateObject, /*boolean*/getName, /*dojo.date.locale.__FormatOptions?*/options){
+ // summary:
+ // Returns the zone (or offset) for the given date and options. This
+ // is broken out into a separate function so that it can be overridden
+ // by timezone-aware code.
+ //
+ // dateObject:
+ // the date and/or time being formatted.
+ //
+ // getName:
+ // Whether to return the timezone string (if true), or the offset (if false)
+ //
+ // options:
+ // The options being used for formatting
+ if(getName){
+ return dojo.date.getTimezoneName(dateObject);
+ }else{
+ return dateObject.getTimezoneOffset();
+ }
+};
+
+
+dojo.date.locale.format = function(/*Date*/dateObject, /*dojo.date.locale.__FormatOptions?*/options){
// summary:
// Format a Date object as a String, using locale-specific settings.
//
// description:
// Create a string from a Date object using a known localized pattern.
// By default, this method formats both date and time from dateObject.
// Formatting patterns are chosen appropriate to the locale. Different
// formatting lengths may be chosen, with "full" used by default.
// Custom patterns may be used or registered with translations using
- // the addCustomFormats method.
- // Formatting patterns are implemented using the syntax described at
- // http://www.unicode.org/reports/tr35/tr35-4.html#Date_Format_Patterns
+ // the dojo.date.locale.addCustomFormats method.
+ // Formatting patterns are implemented using [the syntax described at
+ // unicode.org](http://www.unicode.org/reports/tr35/tr35-4.html#Date_Format_Patterns)
//
// dateObject:
// the date and/or time to be formatted. If a time only is formatted,
// the values in the year, month, and day fields are irrelevant. The
// opposite is true when formatting only dates.
- //
- // options: object {selector: string, formatLength: string, datePattern: string, timePattern: string, locale: string}
- // selector- choice of 'time','date' (default: date and time)
- // formatLength- choice of long, short, medium or full (plus any custom additions). Defaults to 'short'
- // datePattern,timePattern- override pattern with this string
- // am,pm- override strings for am/pm in times
- // locale- override the locale used to determine formatting rules
options = options || {};
- var locale = dojo.i18n.normalizeLocale(options.locale);
- var formatLength = options.formatLength || 'short';
- var bundle = dojo.date.locale._getGregorianBundle(locale);
- var str = [];
- var sauce = dojo.hitch(this, formatPattern, dateObject, bundle);
+ var locale = dojo.i18n.normalizeLocale(options.locale),
+ formatLength = options.formatLength || 'short',
+ bundle = dojo.date.locale._getGregorianBundle(locale),
+ str = [],
+ sauce = dojo.hitch(this, formatPattern, dateObject, bundle, options);
if(options.selector == "year"){
- // Special case as this is not yet driven by CLDR data
- var year = dateObject.getFullYear();
- if(locale.match(/^zh|^ja/)){
- year += "\u5E74";
- }
- return year;
+ return _processPattern(bundle["dateFormatItem-yyyy"] || "yyyy", sauce);
+ }
+ var pattern;
+ if(options.selector != "date"){
+ pattern = options.timePattern || bundle["timeFormat-"+formatLength];
+ if(pattern){str.push(_processPattern(pattern, sauce));}
}
if(options.selector != "time"){
- var datePattern = options.datePattern || bundle["dateFormat-"+formatLength];
- if(datePattern){str.push(_processPattern(datePattern, sauce));}
- }
- if(options.selector != "date"){
- var timePattern = options.timePattern || bundle["timeFormat-"+formatLength];
- if(timePattern){str.push(_processPattern(timePattern, sauce));}
- }
- var result = str.join(" "); //TODO: use locale-specific pattern to assemble date + time
- return result; // String
-};
-
-dojo.date.locale.regexp = function(/*Object?*/options){
+ pattern = options.datePattern || bundle["dateFormat-"+formatLength];
+ if(pattern){str.push(_processPattern(pattern, sauce));}
+ }
+
+ return str.length == 1 ? str[0] : bundle["dateTimeFormat-"+formatLength].replace(/\{(\d+)\}/g,
+ function(match, key){ return str[key]; }); // String
+};
+
+dojo.date.locale.regexp = function(/*dojo.date.locale.__FormatOptions?*/options){
// summary:
// Builds the regular needed to parse a localized date
- //
- // options: object {selector: string, formatLength: string, datePattern: string, timePattern: string, locale: string, strict: boolean}
- // selector- choice of 'time', 'date' (default: date and time)
- // formatLength- choice of long, short, medium or full (plus any custom additions). Defaults to 'short'
- // datePattern,timePattern- override pattern with this string
- // locale- override the locale used to determine formatting rules
return dojo.date.locale._parseInfo(options).regexp; // String
};
-dojo.date.locale._parseInfo = function(/*Object?*/options){
+dojo.date.locale._parseInfo = function(/*dojo.date.locale.__FormatOptions?*/options){
options = options || {};
- var locale = dojo.i18n.normalizeLocale(options.locale);
- var bundle = dojo.date.locale._getGregorianBundle(locale);
- var formatLength = options.formatLength || 'short';
- var datePattern = options.datePattern || bundle["dateFormat-" + formatLength];
- var timePattern = options.timePattern || bundle["timeFormat-" + formatLength];
- var pattern;
+ var locale = dojo.i18n.normalizeLocale(options.locale),
+ bundle = dojo.date.locale._getGregorianBundle(locale),
+ formatLength = options.formatLength || 'short',
+ datePattern = options.datePattern || bundle["dateFormat-" + formatLength],
+ timePattern = options.timePattern || bundle["timeFormat-" + formatLength],
+ pattern;
if(options.selector == 'date'){
pattern = datePattern;
}else if(options.selector == 'time'){
pattern = timePattern;
}else{
- pattern = datePattern + ' ' + timePattern; //TODO: use locale-specific pattern to assemble date + time
- }
-
- var tokens = [];
- var re = _processPattern(pattern, dojo.hitch(this, _buildDateTimeRE, tokens, bundle, options));
+ pattern = bundle["dateTimeFormat-"+formatLength].replace(/\{(\d+)\}/g,
+ function(match, key){ return [timePattern, datePattern][key]; });
+ }
+
+ var tokens = [],
+ re = _processPattern(pattern, dojo.hitch(this, _buildDateTimeRE, tokens, bundle, options));
return {regexp: re, tokens: tokens, bundle: bundle};
};
-dojo.date.locale.parse = function(/*String*/value, /*Object?*/options){
+dojo.date.locale.parse = function(/*String*/value, /*dojo.date.locale.__FormatOptions?*/options){
// summary:
// Convert a properly formatted string to a primitive Date object,
// using locale-specific settings.
//
// description:
// Create a Date object from a string using a known localized pattern.
// By default, this method parses looking for both date and time in the string.
// Formatting patterns are chosen appropriate to the locale. Different
// formatting lengths may be chosen, with "full" used by default.
// Custom patterns may be used or registered with translations using
- // the addCustomFormats method.
- // Formatting patterns are implemented using the syntax described at
- // http://www.unicode.org/reports/tr35/#Date_Format_Patterns
+ // the dojo.date.locale.addCustomFormats method.
+ //
+ // Formatting patterns are implemented using [the syntax described at
+ // unicode.org](http://www.unicode.org/reports/tr35/tr35-4.html#Date_Format_Patterns)
+ // When two digit years are used, a century is chosen according to a sliding
+ // window of 80 years before and 20 years after present year, for both `yy` and `yyyy` patterns.
+ // year < 100CE requires strict mode.
//
// value:
// A string representation of a date
- //
- // options: object {selector: string, formatLength: string, datePattern: string, timePattern: string, locale: string, strict: boolean}
- // selector- choice of 'time', 'date' (default: date and time)
- // formatLength- choice of long, short, medium or full (plus any custom additions). Defaults to 'short'
- // datePattern,timePattern- override pattern with this string
- // am,pm- override strings for am/pm in times
- // locale- override the locale used to determine formatting rules
- // strict- strict parsing, off by default
-
- var info = dojo.date.locale._parseInfo(options);
- var tokens = info.tokens, bundle = info.bundle;
- var re = new RegExp("^" + info.regexp + "$");
- var match = re.exec(value);
+
+ var info = dojo.date.locale._parseInfo(options),
+ tokens = info.tokens, bundle = info.bundle,
+ re = new RegExp("^" + info.regexp + "$", info.strict ? "" : "i"),
+ match = re.exec(value);
+
if(!match){ return null; } // null
- var widthList = ['abbr', 'wide', 'narrow'];
- //1972 is a leap year. We want to avoid Feb 29 rolling over into Mar 1,
- //in the cases where the year is parsed after the month and day.
- var result = new Date(1972, 0);
- var expected = {};
- var amPm = "";
- dojo.forEach(match, function(v, i){
- if(!i){return;}
+ var widthList = ['abbr', 'wide', 'narrow'],
+ result = [1970,0,1,0,0,0,0], // will get converted to a Date at the end
+ amPm = "",
+ valid = dojo.every(match, function(v, i){
+ if(!i){return true;}
var token=tokens[i-1];
var l=token.length;
switch(token.charAt(0)){
case 'y':
- if(l != 2){
+ if(l != 2 && options.strict){
//interpret year literally, so '5' would be 5 A.D.
- result.setFullYear(v);
- expected.year = v;
+ result[0] = v;
}else{
if(v<100){
v = Number(v);
//choose century to apply, according to a sliding window
//of 80 years before and 20 years after present year
- var year = '' + new Date().getFullYear();
- var century = year.substring(0, 2) * 100;
- var yearPart = Number(year.substring(2, 4));
- var cutoff = Math.min(yearPart + 20, 99);
- var num = (v < cutoff) ? century + v : century - 100 + v;
- result.setFullYear(num);
- expected.year = num;
+ var year = '' + new Date().getFullYear(),
+ century = year.substring(0, 2) * 100,
+ cutoff = Math.min(Number(year.substring(2, 4)) + 20, 99),
+ num = (v < cutoff) ? century + v : century - 100 + v;
+ result[0] = num;
}else{
//we expected 2 digits and got more...
if(options.strict){
- return null;
+ return false;
}
//interpret literally, so '150' would be 150 A.D.
//also tolerate '1950', if 'yyyy' input passed to 'yy' format
- result.setFullYear(v);
- expected.year = v;
+ result[0] = v;
}
}
break;
case 'M':
if(l>2){
var months = bundle['months-format-' + widthList[l-3]].concat();
if(!options.strict){
//Tolerate abbreviating period in month part
//Case-insensitive comparison
v = v.replace(".","").toLowerCase();
months = dojo.map(months, function(s){ return s.replace(".","").toLowerCase(); } );
}
v = dojo.indexOf(months, v);
if(v == -1){
-// console.debug("dojo.date.locale.parse: Could not parse month name: '" + v + "'.");
- return null;
+// console.log("dojo.date.locale.parse: Could not parse month name: '" + v + "'.");
+ return false;
}
}else{
v--;
}
- result.setMonth(v);
- expected.month = v;
+ result[1] = v;
break;
case 'E':
case 'e':
var days = bundle['days-format-' + widthList[l-3]].concat();
if(!options.strict){
//Case-insensitive comparison
v = v.toLowerCase();
- days = dojo.map(days, "".toLowerCase);
+ days = dojo.map(days, function(d){return d.toLowerCase();});
}
v = dojo.indexOf(days, v);
if(v == -1){
-// console.debug("dojo.date.locale.parse: Could not parse weekday name: '" + v + "'.");
- return null;
+// console.log("dojo.date.locale.parse: Could not parse weekday name: '" + v + "'.");
+ return false;
}
//TODO: not sure what to actually do with this input,
//in terms of setting something on the Date obj...?
//without more context, can't affect the actual date
//TODO: just validate?
break;
+ case 'D':
+ result[1] = 0;
+ // fallthrough...
case 'd':
- result.setDate(v);
- expected.date = v;
- break;
- case 'D':
- //FIXME: need to defer this until after the year is set for leap-year?
- result.setMonth(0);
- result.setDate(v);
+ result[2] = v;
break;
case 'a': //am/pm
var am = options.am || bundle.am;
var pm = options.pm || bundle.pm;
if(!options.strict){
var period = /\./g;
v = v.replace(period,'').toLowerCase();
am = am.replace(period,'').toLowerCase();
pm = pm.replace(period,'').toLowerCase();
}
if(options.strict && v != am && v != pm){
-// console.debug("dojo.date.locale.parse: Could not parse am/pm part.");
- return null;
+// console.log("dojo.date.locale.parse: Could not parse am/pm part.");
+ return false;
}
// we might not have seen the hours field yet, so store the state and apply hour change later
amPm = (v == pm) ? 'p' : (v == am) ? 'a' : '';
break;
case 'K': //hour (1-24)
- if(v==24){v=0;}
+ if(v == 24){ v = 0; }
// fallthrough...
case 'h': //hour (1-12)
case 'H': //hour (0-23)
case 'k': //hour (0-11)
//TODO: strict bounds checking, padding
if(v > 23){
-// console.debug("dojo.date.locale.parse: Illegal hours value");
- return null;
+// console.log("dojo.date.locale.parse: Illegal hours value");
+ return false;
}
//in the 12-hour case, adjusting for am/pm requires the 'a' part
//which could come before or after the hour, so we will adjust later
- result.setHours(v);
+ result[3] = v;
break;
case 'm': //minutes
- result.setMinutes(v);
+ result[4] = v;
break;
case 's': //seconds
- result.setSeconds(v);
+ result[5] = v;
break;
case 'S': //milliseconds
- result.setMilliseconds(v);
+ result[6] = v;
// break;
// case 'w':
//TODO var firstDay = 0;
// default:
//TODO: throw?
-// console.debug("dojo.date.locale.parse: unsupported pattern char=" + token.charAt(0));
- }
+// console.log("dojo.date.locale.parse: unsupported pattern char=" + token.charAt(0));
+ }
+ return true;
});
- var hours = result.getHours();
+ var hours = +result[3];
if(amPm === 'p' && hours < 12){
- result.setHours(hours + 12); //e.g., 3pm -> 15
+ result[3] = hours + 12; //e.g., 3pm -> 15
}else if(amPm === 'a' && hours == 12){
- result.setHours(0); //12am -> 0
- }
-
- //validate parse date fields versus input date fields
- if(expected.year && result.getFullYear() != expected.year){
-// console.debug("dojo.date.locale.parse: Parsed year: '" + result.getFullYear() + "' did not match input year: '" + expected.year + "'.");
- return null;
- }
- if(expected.month && result.getMonth() != expected.month){
-// console.debug("dojo.date.locale.parse: Parsed month: '" + result.getMonth() + "' did not match input month: '" + expected.month + "'.");
- return null;
- }
- if(expected.date && result.getDate() != expected.date){
-// console.debug("dojo.date.locale.parse: Parsed day of month: '" + result.getDate() + "' did not match input day of month: '" + expected.date + "'.");
- return null;
+ result[3] = 0; //12am -> 0
}
//TODO: implement a getWeekday() method in order to test
//validity of input strings containing 'EEE' or 'EEEE'...
- return result; // Date
+
+ var dateObject = new Date(result[0], result[1], result[2], result[3], result[4], result[5], result[6]); // Date
+ if(options.strict){
+ dateObject.setFullYear(result[0]);
+ }
+
+ // Check for overflow. The Date() constructor normalizes things like April 32nd...
+ //TODO: why isn't this done for times as well?
+ var allTokens = tokens.join(""),
+ dateToken = allTokens.indexOf('d') != -1,
+ monthToken = allTokens.indexOf('M') != -1;
+
+ if(!valid ||
+ (monthToken && dateObject.getMonth() > result[1]) ||
+ (dateToken && dateObject.getDate() > result[2])){
+ return null;
+ }
+
+ // Check for underflow, due to DST shifts. See #9366
+ // This assumes a 1 hour dst shift correction at midnight
+ // We could compare the timezone offset after the shift and add the difference instead.
+ if((monthToken && dateObject.getMonth() < result[1]) ||
+ (dateToken && dateObject.getDate() < result[2])){
+ dateObject = dojo.date.add(dateObject, "hour", 1);
+ }
+
+ return dateObject; // Date
};
function _processPattern(pattern, applyPattern, applyLiteral, applyAll){
//summary: Process a pattern with literals in it
// Break up on single quotes, treat every other one as a literal, except '' which becomes '
var identity = function(x){return x;};
applyPattern = applyPattern || identity;
applyLiteral = applyLiteral || identity;
applyAll = applyAll || identity;
//split on single quotes (which escape literals in date format strings)
//but preserve escaped single quotes (e.g., o''clock)
- var chunks = pattern.match(/(''|[^'])+/g);
- var literal = false;
+ var chunks = pattern.match(/(''|[^'])+/g),
+ literal = pattern.charAt(0) == "'";
dojo.forEach(chunks, function(chunk, i){
if(!chunk){
chunks[i]='';
}else{
chunks[i]=(literal ? applyLiteral : applyPattern)(chunk);
literal = !literal;
}
});
return applyAll(chunks.join(''));
}
function _buildDateTimeRE(tokens, bundle, options, pattern){
pattern = dojo.regexp.escapeString(pattern);
if(!options.strict){ pattern = pattern.replace(" a", " ?a"); } // kludge to tolerate no space before am/pm
return pattern.replace(/([a-z])\1*/ig, function(match){
// Build a simple regexp. Avoid captures, which would ruin the tokens list
- var s;
- var c = match.charAt(0);
- var l = match.length;
- var p2 = '', p3 = '';
+ var s,
+ c = match.charAt(0),
+ l = match.length,
+ p2 = '', p3 = '';
if(options.strict){
if(l > 1){ p2 = '0' + '{'+(l-1)+'}'; }
if(l > 2){ p3 = '0' + '{'+(l-2)+'}'; }
}else{
p2 = '0?'; p3 = '0{0,2}';
}
switch(c){
case 'y':
s = '\\d{2,4}';
break;
case 'M':
- s = (l>2) ? '\\S+' : p2+'[1-9]|1[0-2]';
+ s = (l>2) ? '\\S+?' : p2+'[1-9]|1[0-2]';
break;
case 'D':
s = p2+'[1-9]|'+p3+'[1-9][0-9]|[12][0-9][0-9]|3[0-5][0-9]|36[0-6]';
break;
case 'd':
- s = p2+'[1-9]|[12]\\d|3[01]';
+ s = '[12]\\d|'+p2+'[1-9]|3[01]';
break;
case 'w':
s = p2+'[1-9]|[1-4][0-9]|5[0-3]';
break;
case 'E':
s = '\\S+';
break;
case 'h': //hour (1-12)
s = p2+'[1-9]|1[0-2]';
break;
case 'k': //hour (0-11)
s = p2+'\\d|1[01]';
break;
case 'H': //hour (0-23)
s = p2+'\\d|1\\d|2[0-3]';
break;
case 'K': //hour (1-24)
s = p2+'[1-9]|1\\d|2[0-4]';
break;
case 'm':
case 's':
s = '[0-5]\\d';
break;
case 'S':
s = '\\d{'+l+'}';
break;
case 'a':
var am = options.am || bundle.am || 'AM';
var pm = options.pm || bundle.pm || 'PM';
if(options.strict){
s = am + '|' + pm;
}else{
s = am + '|' + pm;
if(am != am.toLowerCase()){ s += '|' + am.toLowerCase(); }
if(pm != pm.toLowerCase()){ s += '|' + pm.toLowerCase(); }
- }
+ if(s.indexOf('.') != -1){ s += '|' + s.replace(/\./g, ""); }
+ }
+ s = s.replace(/\./g, "\\.");
break;
default:
// case 'v':
// case 'z':
// case 'Z':
s = ".*";
-// console.debug("parse of date format, pattern=" + pattern);
+// console.log("parse of date format, pattern=" + pattern);
}
if(tokens){ tokens.push(match); }
return "(" + s + ")"; // add capture
}).replace(/[\xa0 ]/g, "[\\s\\xa0]"); // normalize whitespace. Need explicit handling of \xa0 for IE.
}
})();
(function(){
var _customFormats = [];
dojo.date.locale.addCustomFormats = function(/*String*/packageName, /*String*/bundleName){
// summary:
// Add a reference to a bundle containing localized custom formats to be
// used by date/time formatting and parsing routines.
//
// description:
// The user may add custom localized formats where the bundle has properties following the
- // same naming convention used by dojo for the CLDR data: dateFormat-xxxx / timeFormat-xxxx
+ // same naming convention used by dojo.cldr: `dateFormat-xxxx` / `timeFormat-xxxx`
// The pattern string should match the format used by the CLDR.
- // See dojo.date.format for details.
+ // See dojo.date.locale.format() for details.
// The resources must be loaded by dojo.requireLocalization() prior to use
_customFormats.push({pkg:packageName,name:bundleName});
};
dojo.date.locale._getGregorianBundle = function(/*String*/locale){
var gregorian = {};
dojo.forEach(_customFormats, function(desc){
var bundle = dojo.i18n.getLocalization(desc.pkg, desc.name, locale);
gregorian = dojo.mixin(gregorian, bundle);
}, this);
return gregorian; /*Object*/
};
})();
dojo.date.locale.addCustomFormats("dojo.cldr","gregorian");
-dojo.date.locale.getNames = function(/*String*/item, /*String*/type, /*String?*/use, /*String?*/locale){
+dojo.date.locale.getNames = function(/*String*/item, /*String*/type, /*String?*/context, /*String?*/locale){
// summary:
// Used to get localized strings from dojo.cldr for day or month names.
//
- // item: 'months' || 'days'
- // type: 'wide' || 'narrow' || 'abbr' (e.g. "Monday", "Mon", or "M" respectively, in English)
- // use: 'standAlone' || 'format' (default)
- // locale: override locale used to find the names
-
- var label;
- var lookup = dojo.date.locale._getGregorianBundle(locale);
- var props = [item, use, type];
- if(use == 'standAlone'){
- label = lookup[props.join('-')];
+ // item:
+ // 'months' || 'days'
+ // type:
+ // 'wide' || 'narrow' || 'abbr' (e.g. "Monday", "Mon", or "M" respectively, in English)
+ // context:
+ // 'standAlone' || 'format' (default)
+ // locale:
+ // override locale used to find the names
+
+ var label,
+ lookup = dojo.date.locale._getGregorianBundle(locale),
+ props = [item, context, type];
+ if(context == 'standAlone'){
+ var key = props.join('-');
+ label = lookup[key];
+ // Fall back to 'format' flavor of name
+ if(label[0] == 1){ label = undefined; } // kludge, in the absense of real aliasing support in dojo.cldr
}
props[1] = 'format';
// return by copy so changes won't be made accidentally to the in-memory model
return (label || lookup[props.join('-')]).concat(); /*Array*/
};
dojo.date.locale.isWeekend = function(/*Date?*/dateObject, /*String?*/locale){
// summary:
// Determines if the date falls on a weekend, according to local custom.
- var weekend = dojo.cldr.supplemental.getWeekend(locale);
- var day = (dateObject || new Date()).getDay();
+ var weekend = dojo.cldr.supplemental.getWeekend(locale),
+ day = (dateObject || new Date()).getDay();
if(weekend.end < weekend.start){
weekend.end += 7;
if(day < weekend.start){ day += 7; }
}
return day >= weekend.start && day <= weekend.end; // Boolean
};
// These are used only by format and strftime. Do they need to be public? Which module should they go in?
dojo.date.locale._getDayOfYear = function(/*Date*/dateObject){
// summary: gets the day of the year as represented by dateObject
- return dojo.date.difference(new Date(dateObject.getFullYear(), 0, 1), dateObject) + 1; // Number
+ return dojo.date.difference(new Date(dateObject.getFullYear(), 0, 1, dateObject.getHours()), dateObject) + 1; // Number
};
dojo.date.locale._getWeekOfYear = function(/*Date*/dateObject, /*Number*/firstDayOfWeek){
if(arguments.length == 1){ firstDayOfWeek = 0; } // Sunday
- var firstDayOfYear = new Date(dateObject.getFullYear(), 0, 1).getDay();
- var adj = (firstDayOfYear - firstDayOfWeek + 7) % 7;
- var week = Math.floor((dojo.date.locale._getDayOfYear(dateObject) + adj - 1) / 7);
+ var firstDayOfYear = new Date(dateObject.getFullYear(), 0, 1).getDay(),
+ adj = (firstDayOfYear - firstDayOfWeek + 7) % 7,
+ week = Math.floor((dojo.date.locale._getDayOfYear(dateObject) + adj - 1) / 7);
// if year starts on the specified day, start counting weeks at 1
if(firstDayOfYear == firstDayOfWeek){ week++; }
return week; // Number
};
}
-if(!dojo._hasResource["dijit._Calendar"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._Calendar"] = true;
-dojo.provide("dijit._Calendar");
+if(!dojo._hasResource["dijit.Calendar"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.Calendar"] = true;
+dojo.provide("dijit.Calendar");
dojo.declare(
- "dijit._Calendar",
+ "dijit.Calendar",
[dijit._Widget, dijit._Templated],
{
- /*
- summary:
- A simple GUI for choosing a date in the context of a monthly calendar.
-
- description:
- This widget is used internally by other widgets and is not accessible
- as a standalone widget.
- This widget can't be used in a form because it doesn't serialize the date to an
- <input> field. For a form element, use DateTextBox instead.
-
- Note that the parser takes all dates attributes passed in the `RFC 3339` format:
- http://www.faqs.org/rfcs/rfc3339.html (2005-06-30T08:05:00-07:00)
- so that they are serializable and locale-independent.
-
- usage:
- var calendar = new dijit._Calendar({}, dojo.byId("calendarNode"));
- -or-
- <div dojoType="dijit._Calendar"></div>
- */
- templateString:"<table cellspacing=\"0\" cellpadding=\"0\" class=\"dijitCalendarContainer\">\n\t<thead>\n\t\t<tr class=\"dijitReset dijitCalendarMonthContainer\" valign=\"top\">\n\t\t\t<th class='dijitReset' dojoAttachPoint=\"decrementMonth\">\n\t\t\t\t<span class=\"dijitInline dijitCalendarIncrementControl dijitCalendarDecrease\"><span dojoAttachPoint=\"decreaseArrowNode\" class=\"dijitA11ySideArrow dijitCalendarIncrementControl dijitCalendarDecreaseInner\">-</span></span>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' colspan=\"5\">\n\t\t\t\t<div dojoAttachPoint=\"monthLabelSpacer\" class=\"dijitCalendarMonthLabelSpacer\"></div>\n\t\t\t\t<div dojoAttachPoint=\"monthLabelNode\" class=\"dijitCalendarMonth\"></div>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' dojoAttachPoint=\"incrementMonth\">\n\t\t\t\t<div class=\"dijitInline dijitCalendarIncrementControl dijitCalendarIncrease\"><span dojoAttachPoint=\"increaseArrowNode\" class=\"dijitA11ySideArrow dijitCalendarIncrementControl dijitCalendarIncreaseInner\">+</span></div>\n\t\t\t</th>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th class=\"dijitReset dijitCalendarDayLabelTemplate\"><span class=\"dijitCalendarDayLabel\"></span></th>\n\t\t</tr>\n\t</thead>\n\t<tbody dojoAttachEvent=\"onclick: _onDayClick\" class=\"dijitReset dijitCalendarBodyContainer\">\n\t\t<tr class=\"dijitReset dijitCalendarWeekTemplate\">\n\t\t\t<td class=\"dijitReset dijitCalendarDateTemplate\"><span class=\"dijitCalendarDateLabel\"></span></td>\n\t\t</tr>\n\t</tbody>\n\t<tfoot class=\"dijitReset dijitCalendarYearContainer\">\n\t\t<tr>\n\t\t\t<td class='dijitReset' valign=\"top\" colspan=\"7\">\n\t\t\t\t<h3 class=\"dijitCalendarYearLabel\">\n\t\t\t\t\t<span dojoAttachPoint=\"previousYearLabelNode\" class=\"dijitInline dijitCalendarPreviousYear\"></span>\n\t\t\t\t\t<span dojoAttachPoint=\"currentYearLabelNode\" class=\"dijitInline dijitCalendarSelectedYear\"></span>\n\t\t\t\t\t<span dojoAttachPoint=\"nextYearLabelNode\" class=\"dijitInline dijitCalendarNextYear\"></span>\n\t\t\t\t</h3>\n\t\t\t</td>\n\t\t</tr>\n\t</tfoot>\n</table>\t\n",
+ // summary:
+ // A simple GUI for choosing a date in the context of a monthly calendar.
+ //
+ // description:
+ // A simple GUI for choosing a date in the context of a monthly calendar.
+ // This widget can't be used in a form because it doesn't serialize the date to an
+ // `<input>` field. For a form element, use dijit.form.DateTextBox instead.
+ //
+ // Note that the parser takes all dates attributes passed in the
+ // [RFC 3339 format](http://www.faqs.org/rfcs/rfc3339.html), e.g. `2005-06-30T08:05:00-07:00`
+ // so that they are serializable and locale-independent.
+ //
+ // example:
+ // | var calendar = new dijit.Calendar({}, dojo.byId("calendarNode"));
+ //
+ // example:
+ // | <div dojoType="dijit.Calendar"></div>
+
+ templateString: dojo.cache("dijit", "templates/Calendar.html", "<table cellspacing=\"0\" cellpadding=\"0\" class=\"dijitCalendarContainer\" role=\"grid\" dojoAttachEvent=\"onkeypress: _onKeyPress\">\n\t<thead>\n\t\t<tr class=\"dijitReset dijitCalendarMonthContainer\" valign=\"top\">\n\t\t\t<th class='dijitReset' dojoAttachPoint=\"decrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarDecrease\" waiRole=\"presentation\">\n\t\t\t\t<span dojoAttachPoint=\"decreaseArrowNode\" class=\"dijitA11ySideArrow\">-</span>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' colspan=\"5\">\n\t\t\t\t<div class=\"dijitVisible\">\n\t\t\t\t\t<div class=\"dijitPopup dijitMenu dijitMenuPassive dijitHidden\" dojoAttachPoint=\"monthDropDown\" dojoAttachEvent=\"onmouseup: _onMonthSelect, onmouseover: _onMenuHover, onmouseout: _onMenuHover\">\n\t\t\t\t\t\t<div class=\"dijitCalendarMonthLabelTemplate dijitCalendarMonthLabel\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div dojoAttachPoint=\"monthLabelSpacer\" class=\"dijitSpacer\"></div>\n\t\t\t\t<div dojoAttachPoint=\"monthLabelNode\" class=\"dijitCalendarMonthLabel dijitInline dijitVisible\" dojoAttachEvent=\"onmousedown: _onMonthToggle\"></div>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' dojoAttachPoint=\"incrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarIncrease\" waiRole=\"presentation\">\n\t\t\t\t<span dojoAttachPoint=\"increaseArrowNode\" class=\"dijitA11ySideArrow\">+</span>\n\t\t\t</th>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th class=\"dijitReset dijitCalendarDayLabelTemplate\" role=\"columnheader\"><span class=\"dijitCalendarDayLabel\"></span></th>\n\t\t</tr>\n\t</thead>\n\t<tbody dojoAttachEvent=\"onclick: _onDayClick, onmouseover: _onDayMouseOver, onmouseout: _onDayMouseOut\" class=\"dijitReset dijitCalendarBodyContainer\">\n\t\t<tr class=\"dijitReset dijitCalendarWeekTemplate\" role=\"row\">\n\t\t\t<td class=\"dijitReset dijitCalendarDateTemplate\" role=\"gridcell\"><span class=\"dijitCalendarDateLabel\"></span></td>\n\t\t</tr>\n\t</tbody>\n\t<tfoot class=\"dijitReset dijitCalendarYearContainer\">\n\t\t<tr>\n\t\t\t<td class='dijitReset' valign=\"top\" colspan=\"7\">\n\t\t\t\t<h3 class=\"dijitCalendarYearLabel\">\n\t\t\t\t\t<span dojoAttachPoint=\"previousYearLabelNode\" class=\"dijitInline dijitCalendarPreviousYear\"></span>\n\t\t\t\t\t<span dojoAttachPoint=\"currentYearLabelNode\" class=\"dijitInline dijitCalendarSelectedYear\"></span>\n\t\t\t\t\t<span dojoAttachPoint=\"nextYearLabelNode\" class=\"dijitInline dijitCalendarNextYear\"></span>\n\t\t\t\t</h3>\n\t\t\t</td>\n\t\t</tr>\n\t</tfoot>\n</table>\n"),
// value: Date
- // the currently selected Date
+ // The currently selected Date
value: new Date(),
+ // datePackage: String
+ // JavaScript namespace to find Calendar routines. Uses Gregorian Calendar routines
+ // at dojo.date by default.
+ datePackage: "dojo.date",
+
// dayWidth: String
- // How to represent the days of the week in the calendar header. See dojo.date.locale
+ // How to represent the days of the week in the calendar header. See dojo.date.locale
dayWidth: "narrow",
+ // tabIndex: Integer
+ // Order fields are traversed when user hits the tab key
+ tabIndex: "0",
+
+ attributeMap: dojo.delegate(dijit._Widget.prototype.attributeMap, {
+ tabIndex: "domNode"
+ }),
+
setValue: function(/*Date*/ value){
- // summary: set the current date and update the UI. If the date is disabled, the selection will
- // not change, but the display will change to the corresponding month.
- if(!this.value || dojo.date.compare(value, this.value)){
- value = new Date(value);
- this.displayMonth = new Date(value);
+ // summary:
+ // Deprecated. Used attr('value', ...) instead.
+ // tags:
+ // deprecated
+ dojo.deprecated("dijit.Calendar:setValue() is deprecated. Use attr('value', ...) instead.", "", "2.0");
+ this.attr('value', value);
+ },
+
+ _getValueAttr: function(){
+ // summary:
+ // Support getter attr('value')
+ var value = new this.dateClassObj(this.value);
+ value.setHours(0, 0, 0, 0); // return midnight, local time for back-compat
+
+ // If daylight savings pushes midnight to the previous date, fix the Date
+ // object to point at 1am so it will represent the correct day. See #9366
+ if(value.getDate() < this.value.getDate()){
+ value = this.dateFuncObj.add(value, "hour", 1);
+ }
+ return value;
+ },
+
+ _setValueAttr: function(/*Date*/ value){
+ // summary:
+ // Support setter attr("value", ...)
+ // description:
+ // Set the current date and update the UI. If the date is disabled, the value will
+ // not change, but the display will change to the corresponding month.
+ // tags:
+ // protected
+ if(!this.value || this.dateFuncObj.compare(value, this.value)){
+ value = new this.dateClassObj(value);
+ value.setHours(1); // to avoid issues when DST shift occurs at midnight, see #8521, #9366
+ this.displayMonth = new this.dateClassObj(value);
if(!this.isDisabledDate(value, this.lang)){
this.value = value;
- this.value.setHours(0,0,0,0);
- this.onChange(this.value);
- }
+ this.onChange(this.attr('value'));
+ }
+ dojo.attr(this.domNode, "aria-label",
+ this.dateLocaleModule.format(value,
+ {selector:"date", formatLength:"full"}));
this._populateGrid();
}
},
_setText: function(node, text){
+ // summary:
+ // This just sets the content of node to the specified text.
+ // Can't do "node.innerHTML=text" because of an IE bug w/tables, see #3434.
+ // tags:
+ // private
while(node.firstChild){
node.removeChild(node.firstChild);
}
- node.appendChild(document.createTextNode(text));
+ node.appendChild(dojo.doc.createTextNode(text));
},
_populateGrid: function(){
+ // summary:
+ // Fills in the calendar grid with each day (1-31)
+ // tags:
+ // private
var month = this.displayMonth;
month.setDate(1);
- var firstDay = month.getDay();
- var daysInMonth = dojo.date.getDaysInMonth(month);
- var daysInPreviousMonth = dojo.date.getDaysInMonth(dojo.date.add(month, "month", -1));
- var today = new Date();
- var selected = this.value;
-
- var dayOffset = dojo.cldr.supplemental.getFirstDayOfWeek(this.lang);
+ var firstDay = month.getDay(),
+ daysInMonth = this.dateFuncObj.getDaysInMonth(month),
+ daysInPreviousMonth = this.dateFuncObj.getDaysInMonth(this.dateFuncObj.add(month, "month", -1)),
+ today = new this.dateClassObj(),
+ dayOffset = dojo.cldr.supplemental.getFirstDayOfWeek(this.lang);
if(dayOffset > firstDay){ dayOffset -= 7; }
// Iterate through dates in the calendar and fill in date numbers and style info
dojo.query(".dijitCalendarDateTemplate", this.domNode).forEach(function(template, i){
i += dayOffset;
- var date = new Date(month);
- var number, clazz = "dijitCalendar", adj = 0;
+ var date = new this.dateClassObj(month),
+ number, clazz = "dijitCalendar", adj = 0;
if(i < firstDay){
number = daysInPreviousMonth - firstDay + i + 1;
adj = -1;
clazz += "Previous";
}else if(i >= (firstDay + daysInMonth)){
number = i - firstDay - daysInMonth + 1;
adj = 1;
clazz += "Next";
}else{
number = i - firstDay + 1;
clazz += "Current";
}
if(adj){
- date = dojo.date.add(date, "month", adj);
+ date = this.dateFuncObj.add(date, "month", adj);
}
date.setDate(number);
- if(!dojo.date.compare(date, today, "date")){
+ if(!this.dateFuncObj.compare(date, today, "date")){
clazz = "dijitCalendarCurrentDate " + clazz;
}
- if(!dojo.date.compare(date, selected, "date")){
+ if(this._isSelectedDate(date, this.lang)){
clazz = "dijitCalendarSelectedDate " + clazz;
}
if(this.isDisabledDate(date, this.lang)){
clazz = "dijitCalendarDisabledDate " + clazz;
}
- template.className = clazz + "Month dijitCalendarDateTemplate";
+ var clazz2 = this.getClassForDate(date, this.lang);
+ if(clazz2){
+ clazz = clazz2 + " " + clazz;
+ }
+
+ template.className = clazz + "Month dijitCalendarDateTemplate";
template.dijitDateValue = date.valueOf();
- var label = dojo.query(".dijitCalendarDateLabel", template)[0];
- this._setText(label, date.getDate());
+ var label = dojo.query(".dijitCalendarDateLabel", template)[0],
+ text = date.getDateLocalized ? date.getDateLocalized(this.lang) : date.getDate();
+ this._setText(label, text);
}, this);
// Fill in localized month name
- var monthNames = dojo.date.locale.getNames('months', 'wide', 'standAlone', this.lang);
+ var monthNames = this.dateLocaleModule.getNames('months', 'wide', 'standAlone', this.lang);
this._setText(this.monthLabelNode, monthNames[month.getMonth()]);
// Fill in localized prev/current/next years
var y = month.getFullYear() - 1;
+ var d = new this.dateClassObj();
dojo.forEach(["previous", "current", "next"], function(name){
+ d.setFullYear(y++);
this._setText(this[name+"YearLabelNode"],
- dojo.date.locale.format(new Date(y++, 0), {selector:'year', locale:this.lang}));
+ this.dateLocaleModule.format(d, {selector:'year', locale:this.lang}));
}, this);
// Set up repeating mouse behavior
var _this = this;
var typematic = function(nodeProp, dateProp, adj){
- dijit.typematic.addMouseListener(_this[nodeProp], _this, function(count){
- if(count >= 0){ _this._adjustDisplay(dateProp, adj); }
- }, 0.8, 500);
+//FIXME: leaks (collects) listeners if populateGrid is called multiple times. Do this once?
+ _this._connects.push(
+ dijit.typematic.addMouseListener(_this[nodeProp], _this, function(count){
+ if(count >= 0){ _this._adjustDisplay(dateProp, adj); }
+ }, 0.8, 500)
+ );
};
typematic("incrementMonth", "month", 1);
typematic("decrementMonth", "month", -1);
typematic("nextYearLabelNode", "year", 1);
typematic("previousYearLabelNode", "year", -1);
},
+ goToToday: function(){
+ // summary:
+ // Sets calendar's value to today's date
+ this.attr('value', new this.dateClassObj());
+ },
+
+ constructor: function(/*Object*/args){
+ var dateClass = (args.datePackage && (args.datePackage != "dojo.date"))? args.datePackage + ".Date" : "Date";
+ this.dateClassObj = dojo.getObject(dateClass, false);
+ this.datePackage = args.datePackage || this.datePackage;
+ this.dateFuncObj = dojo.getObject(this.datePackage, false);
+ this.dateLocaleModule = dojo.getObject(this.datePackage + ".locale", false);
+ },
+
+ postMixInProperties: function(){
+ // parser.instantiate sometimes passes in NaN for IE. Use default value in prototype instead.
+ if(isNaN(this.value)){ delete this.value; }
+ this.inherited(arguments);
+ },
+
postCreate: function(){
- dijit._Calendar.superclass.postCreate.apply(this);
+ this.inherited(arguments);
+ dojo.setSelectable(this.domNode, false);
var cloneClass = dojo.hitch(this, function(clazz, n){
var template = dojo.query(clazz, this.domNode)[0];
for(var i=0; i<n; i++){
template.parentNode.appendChild(template.cloneNode(true));
}
});
// clone the day label and calendar day templates 6 times to make 7 columns
cloneClass(".dijitCalendarDayLabelTemplate", 6);
cloneClass(".dijitCalendarDateTemplate", 6);
// now make 6 week rows
cloneClass(".dijitCalendarWeekTemplate", 5);
// insert localized day names in the header
- var dayNames = dojo.date.locale.getNames('days', this.dayWidth, 'standAlone', this.lang);
+ var dayNames = this.dateLocaleModule.getNames('days', this.dayWidth, 'standAlone', this.lang);
var dayOffset = dojo.cldr.supplemental.getFirstDayOfWeek(this.lang);
dojo.query(".dijitCalendarDayLabel", this.domNode).forEach(function(label, i){
this._setText(label, dayNames[(i + dayOffset) % 7]);
}, this);
- // Fill in spacer element with all the month names (invisible) so that the maximum width will affect layout
- var monthNames = dojo.date.locale.getNames('months', 'wide', 'standAlone', this.lang);
- dojo.forEach(monthNames, function(name){
- var monthSpacer = dojo.doc.createElement("div");
- this._setText(monthSpacer, name);
- this.monthLabelSpacer.appendChild(monthSpacer);
+ // Fill in spacer/month dropdown element with all the month names (invisible) so that the maximum width will affect layout
+ var monthNames = this.dateLocaleModule.getNames('months', 'wide', 'standAlone', this.lang);
+ cloneClass(".dijitCalendarMonthLabelTemplate", monthNames.length-1);
+ dojo.query(".dijitCalendarMonthLabelTemplate", this.domNode).forEach(function(node, i){
+ dojo.attr(node, "month", i);
+ this._setText(node, monthNames[i]);
+ dojo.place(node.cloneNode(true), this.monthLabelSpacer);
}, this);
+ var value = this.value;
this.value = null;
- this.setValue(new Date());
- },
-
- _adjustDisplay: function(/*String*/part, /*int*/amount){
- this.displayMonth = dojo.date.add(this.displayMonth, part, amount);
+ this.attr('value', new this.dateClassObj(value));
+ },
+
+ _onMenuHover: function(e){
+ dojo.stopEvent(e);
+ dojo.toggleClass(e.target, "dijitMenuItemHover");
+ },
+
+ _adjustDisplay: function(/*String*/ part, /*int*/ amount){
+ // summary:
+ // Moves calendar forwards or backwards by months or years
+ // part:
+ // "month" or "year"
+ // amount:
+ // Number of months or years
+ // tags:
+ // private
+ this.displayMonth = this.dateFuncObj.add(this.displayMonth, part, amount);
this._populateGrid();
},
- _onDayClick: function(/*Event*/evt){
- var node = evt.target;
+ _onMonthToggle: function(/*Event*/ evt){
+ // summary:
+ // Handler for when user triggers or dismisses the month list
+ // tags:
+ // protected
+ dojo.stopEvent(evt);
+
+ if(evt.type == "mousedown"){
+ var coords = dojo.position(this.monthLabelNode);
+// coords.y -= dojo.position(this.domNode, true).y;
+ // Size the dropdown's width to match the label in the widget
+ // so that they are horizontally aligned
+ var dim = {
+ width: coords.w + "px",
+ top: -this.displayMonth.getMonth() * coords.h + "px"
+ };
+ if((dojo.isIE && dojo.isQuirks) || dojo.isIE < 7){
+ dim.left = -coords.w/2 + "px";
+ }
+ dojo.style(this.monthDropDown, dim);
+ this._popupHandler = this.connect(document, "onmouseup", "_onMonthToggle");
+ }else{
+ this.disconnect(this._popupHandler);
+ delete this._popupHandler;
+ }
+
+ dojo.toggleClass(this.monthDropDown, "dijitHidden");
+ dojo.toggleClass(this.monthLabelNode, "dijitVisible");
+ },
+
+ _onMonthSelect: function(/*Event*/ evt){
+ // summary:
+ // Handler for when user selects a month from a list
+ // tags:
+ // protected
+ this._onMonthToggle(evt);
+ this.displayMonth.setMonth(dojo.attr(evt.target, "month"));
+ this._populateGrid();
+ },
+
+ _onDayClick: function(/*Event*/ evt){
+ // summary:
+ // Handler for day clicks, selects the date if appropriate
+ // tags:
+ // protected
dojo.stopEvent(evt);
- while(!node.dijitDateValue){
- node = node.parentNode;
- }
- if(!dojo.hasClass(node, "dijitCalendarDisabledDate")){
- this.setValue(node.dijitDateValue);
- this.onValueSelected(this.value);
- }
- },
-
- onValueSelected: function(/*Date*/date){
- //summary: a date cell was selected. It may be the same as the previous value.
- },
-
- onChange: function(/*Date*/date){
- //summary: called only when the selected date has changed
- },
-
- isDisabledDate: function(/*Date*/dateObject, /*String?*/locale){
- // summary:
- // May be overridden to disable certain dates in the calendar e.g. isDisabledDate=dojo.date.locale.isWeekend
+ for(var node = evt.target; node && !node.dijitDateValue; node = node.parentNode);
+ if(node && !dojo.hasClass(node, "dijitCalendarDisabledDate")){
+ this.attr('value', node.dijitDateValue);
+ this.onValueSelected(this.attr('value'));
+ }
+ },
+
+ _onDayMouseOver: function(/*Event*/ evt){
+ // summary:
+ // Handler for mouse over events on days, sets up hovered style
+ // tags:
+ // protected
+ var node = evt.target;
+ if(node && (node.dijitDateValue || node == this.previousYearLabelNode || node == this.nextYearLabelNode) ){
+ dojo.addClass(node, "dijitCalendarHoveredDate");
+ this._currentNode = node;
+ }
+ },
+
+ _onDayMouseOut: function(/*Event*/ evt){
+ // summary:
+ // Handler for mouse out events on days, clears hovered style
+ // tags:
+ // protected
+ if(!this._currentNode){ return; }
+ for(var node = evt.relatedTarget; node;){
+ if(node == this._currentNode){ return; }
+ try{
+ node = node.parentNode;
+ }catch(x){
+ node = null;
+ }
+ }
+ dojo.removeClass(this._currentNode, "dijitCalendarHoveredDate");
+ this._currentNode = null;
+ },
+
+//TODO: use typematic
+//TODO: skip disabled dates without ending up in a loop
+//TODO: could optimize by avoiding populate grid when month does not change
+ _onKeyPress: function(/*Event*/evt){
+ // summary:
+ // Provides keyboard navigation of calendar
+ // tags:
+ // protected
+ var dk = dojo.keys,
+ increment = -1,
+ interval,
+ newValue = this.value;
+ switch(evt.keyCode){
+ case dk.RIGHT_ARROW:
+ increment = 1;
+ //fallthrough...
+ case dk.LEFT_ARROW:
+ interval = "day";
+ if(!this.isLeftToRight()){ increment *= -1; }
+ break;
+ case dk.DOWN_ARROW:
+ increment = 1;
+ //fallthrough...
+ case dk.UP_ARROW:
+ interval = "week";
+ break;
+ case dk.PAGE_DOWN:
+ increment = 1;
+ //fallthrough...
+ case dk.PAGE_UP:
+ interval = evt.ctrlKey ? "year" : "month";
+ break;
+ case dk.END:
+ // go to the next month
+ newValue = this.dateFuncObj.add(newValue, "month", 1);
+ // subtract a day from the result when we're done
+ interval = "day";
+ //fallthrough...
+ case dk.HOME:
+ newValue = new Date(newValue).setDate(1);
+ break;
+ case dk.ENTER:
+ this.onValueSelected(this.attr('value'));
+ break;
+ case dk.ESCAPE:
+ //TODO
+ default:
+ return;
+ }
+ dojo.stopEvent(evt);
+
+ if(interval){
+ newValue = this.dateFuncObj.add(newValue, interval, increment);
+ }
+
+ this.attr("value", newValue);
+ },
+
+ onValueSelected: function(/*Date*/ date){
+ // summary:
+ // Notification that a date cell was selected. It may be the same as the previous value.
+ // description:
+ // Used by `dijit.form._DateTimeTextBox` (and thus `dijit.form.DateTextBox`)
+ // to get notification when the user has clicked a date.
+ // tags:
+ // protected
+ },
+
+ onChange: function(/*Date*/ date){
+ // summary:
+ // Called only when the selected date has changed
+ },
+
+ _isSelectedDate: function(/*Date*/ dateObject, /*String?*/ locale){
+ // summary:
+ // Extension point so developers can subclass Calendar to
+ // support multiple (concurrently) selected dates
+ // tags:
+ // protected extension
+ return !this.dateFuncObj.compare(dateObject, this.value, "date")
+ },
+
+ isDisabledDate: function(/*Date*/ dateObject, /*String?*/ locale){
+ // summary:
+ // May be overridden to disable certain dates in the calendar e.g. `isDisabledDate=dojo.date.locale.isWeekend`
+ // tags:
+ // extension
+/*=====
return false; // Boolean
+=====*/
+ },
+
+ getClassForDate: function(/*Date*/ dateObject, /*String?*/ locale){
+ // summary:
+ // May be overridden to return CSS classes to associate with the date entry for the given dateObject,
+ // for example to indicate a holiday in specified locale.
+ // tags:
+ // extension
+
+/*=====
+ return ""; // String
+=====*/
}
}
);
}
-if(!dojo._hasResource["dijit._TimePicker"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._TimePicker"] = true;
-dojo.provide("dijit._TimePicker");
-
-
-
-
-dojo.declare("dijit._TimePicker",
- [dijit._Widget, dijit._Templated],
- {
- // summary:
- // A graphical time picker that TimeTextBox pops up
- // It is functionally modeled after the Java applet at http://java.arcadevillage.com/applets/timepica.htm
- // See ticket #599
-
- templateString:"<div id=\"widget_${id}\" class=\"dijitMenu\"\n ><div dojoAttachPoint=\"upArrow\" class=\"dijitButtonNode\"><span class=\"dijitTimePickerA11yText\">&#9650;</span></div\n ><div dojoAttachPoint=\"timeMenu,focusNode\" dojoAttachEvent=\"onclick:_onOptionSelected,onmouseover,onmouseout\"></div\n ><div dojoAttachPoint=\"downArrow\" class=\"dijitButtonNode\"><span class=\"dijitTimePickerA11yText\">&#9660;</span></div\n></div>\n",
- baseClass: "dijitTimePicker",
-
- // clickableIncrement: String
- // ISO-8601 string representing the amount by which
- // every clickable element in the time picker increases
- // Set in non-Zulu time, without a time zone
- // Example: "T00:15:00" creates 15 minute increments
- // Must divide visibleIncrement evenly
- clickableIncrement: "T00:15:00",
-
- // visibleIncrement: String
- // ISO-8601 string representing the amount by which
- // every element with a visible time in the time picker increases
- // Set in non Zulu time, without a time zone
- // Example: "T01:00:00" creates text in every 1 hour increment
- visibleIncrement: "T01:00:00",
-
- // visibleRange: String
- // ISO-8601 string representing the range of this TimePicker
- // The TimePicker will only display times in this range
- // Example: "T05:00:00" displays 5 hours of options
- visibleRange: "T05:00:00",
-
- // value: String
- // Date to display.
- // Defaults to current time and date.
- // Can be a Date object or an ISO-8601 string
- // If you specify the GMT time zone ("-01:00"),
- // the time will be converted to the local time in the local time zone.
- // Otherwise, the time is considered to be in the local time zone.
- // If you specify the date and isDate is true, the date is used.
- // Example: if your local time zone is GMT -05:00,
- // "T10:00:00" becomes "T10:00:00-05:00" (considered to be local time),
- // "T10:00:00-01:00" becomes "T06:00:00-05:00" (4 hour difference),
- // "T10:00:00Z" becomes "T05:00:00-05:00" (5 hour difference between Zulu and local time)
- // "yyyy-mm-ddThh:mm:ss" is the format to set the date and time
- // Example: "2007-06-01T09:00:00"
- value: new Date(),
-
- _visibleIncrement:2,
- _clickableIncrement:1,
- _totalIncrements:10,
- constraints:{},
-
- serialize: dojo.date.stamp.toISOString,
-
- setValue:function(/*Date*/ date, /*Boolean*/ priority){
- // summary:
- // Set the value of the TimePicker
- // Redraws the TimePicker around the new date
-
- //dijit._TimePicker.superclass.setValue.apply(this, arguments);
- this.value=date;
- this._showText();
- },
-
- isDisabledDate: function(/*Date*/dateObject, /*String?*/locale){
- // summary:
- // May be overridden to disable certain dates in the TimePicker e.g. isDisabledDate=dojo.date.locale.isWeekend
- return false; // Boolean
- },
-
- _showText:function(){
- this.timeMenu.innerHTML="";
- var fromIso = dojo.date.stamp.fromISOString;
- this._clickableIncrementDate=fromIso(this.clickableIncrement);
- this._visibleIncrementDate=fromIso(this.visibleIncrement);
- this._visibleRangeDate=fromIso(this.visibleRange);
- // get the value of the increments and the range in seconds (since 00:00:00) to find out how many divs to create
- var sinceMidnight = function(/*Date*/ date){
- return date.getHours()*60*60+date.getMinutes()*60+date.getSeconds();
- };
-
- var clickableIncrementSeconds = sinceMidnight(this._clickableIncrementDate);
- var visibleIncrementSeconds = sinceMidnight(this._visibleIncrementDate);
- var visibleRangeSeconds = sinceMidnight(this._visibleRangeDate);
-
- // round reference date to previous visible increment
- var time = this.value.getTime();
- this._refDate = new Date(time - time % (visibleIncrementSeconds*1000));
-
- // assume clickable increment is the smallest unit
- this._clickableIncrement=1;
- // divide the visible range by the clickable increment to get the number of divs to create
- // example: 10:00:00/00:15:00 -> display 40 divs
- this._totalIncrements=visibleRangeSeconds/clickableIncrementSeconds;
- // divide the visible increments by the clickable increments to get how often to display the time inline
- // example: 01:00:00/00:15:00 -> display the time every 4 divs
- this._visibleIncrement=visibleIncrementSeconds/clickableIncrementSeconds;
- for(var i=-this._totalIncrements/2; i<=this._totalIncrements/2; i+=this._clickableIncrement){
- var div=this._createOption(i);
- this.timeMenu.appendChild(div);
- }
-
- // TODO:
- // I commented this out because it
- // causes problems for a TimeTextBox in a Dialog, or as the editor of an InlineEditBox,
- // because the timeMenu node isn't visible yet. -- Bill (Bug #????)
- // dijit.focus(this.timeMenu);
- },
-
- postCreate:function(){
- // instantiate constraints
- if(this.constraints===dijit._TimePicker.prototype.constraints){
- this.constraints={};
- }
- // dojo.date.locale needs the lang in the constraints as locale
- if(!this.constraints.locale){
- this.constraints.locale=this.lang;
- }
-
- // assign typematic mouse listeners to the arrow buttons
- this.connect(this.timeMenu, dojo.isIE ? "onmousewheel" : 'DOMMouseScroll', "_mouseWheeled");
- dijit.typematic.addMouseListener(this.upArrow,this,this._onArrowUp, 0.8, 500);
- dijit.typematic.addMouseListener(this.downArrow,this,this._onArrowDown, 0.8, 500);
- //dijit.typematic.addListener(this.upArrow,this.timeMenu, {keyCode:dojo.keys.UP_ARROW,ctrlKey:false,altKey:false,shiftKey:false}, this, "_onArrowUp", 0.8, 500);
- //dijit.typematic.addListener(this.downArrow, this.timeMenu, {keyCode:dojo.keys.DOWN_ARROW,ctrlKey:false,altKey:false,shiftKey:false}, this, "_onArrowDown", 0.8,500);
-
- this.inherited("postCreate", arguments);
- this.setValue(this.value);
- },
-
- _createOption:function(/*Number*/ index){
- // summary: creates a clickable time option
- var div=document.createElement("div");
- var date = (div.date = new Date(this._refDate));
- div.index=index;
- var incrementDate = this._clickableIncrementDate;
- date.setHours(date.getHours()+incrementDate.getHours()*index,
- date.getMinutes()+incrementDate.getMinutes()*index,
- date.getSeconds()+incrementDate.getSeconds()*index);
-
- var innerDiv = document.createElement('div');
- dojo.addClass(div,this.baseClass+"Item");
- dojo.addClass(innerDiv,this.baseClass+"ItemInner");
- innerDiv.innerHTML=dojo.date.locale.format(date, this.constraints);
- div.appendChild(innerDiv);
-
- if(index%this._visibleIncrement<1 && index%this._visibleIncrement>-1){
- dojo.addClass(div, this.baseClass+"Marker");
- }else if(index%this._clickableIncrement==0){
- dojo.addClass(div, this.baseClass+"Tick");
- }
-
- if(this.isDisabledDate(date)){
- // set disabled
- dojo.addClass(div, this.baseClass+"ItemDisabled");
- }
- if(dojo.date.compare(this.value, date, this.constraints.selector)==0){
- div.selected=true;
- dojo.addClass(div, this.baseClass+"ItemSelected");
- }
- return div;
- },
-
- _onOptionSelected:function(/*Object*/ tgt){
- var tdate = tgt.target.date || tgt.target.parentNode.date;
- if(!tdate||this.isDisabledDate(tdate)){return;}
- this.setValue(tdate);
- this.onValueSelected(tdate);
- },
-
- onValueSelected:function(value){
- },
-
- onmouseover:function(/*Event*/ e){
- var tgr = (e.target.parentNode === this.timeMenu) ? e.target : e.target.parentNode;
- this._highlighted_option=tgr;
- dojo.addClass(tgr, this.baseClass+"ItemHover");
- },
-
- onmouseout:function(/*Event*/ e){
- var tgr = (e.target.parentNode === this.timeMenu) ? e.target : e.target.parentNode;
- if(this._highlighted_option===tgr){
- dojo.removeClass(tgr, this.baseClass+"ItemHover");
- }
- },
-
- _mouseWheeled:function(/*Event*/e){
- // summary: handle the mouse wheel listener
- dojo.stopEvent(e);
- // we're not _measuring_ the scroll amount, just direction
- var scrollAmount = (dojo.isIE ? e.wheelDelta : -e.detail);
- this[(scrollAmount>0 ? "_onArrowUp" : "_onArrowDown")](); // yes, we're making a new dom node every time you mousewheel, or click
- },
-
- _onArrowUp:function(){
- // summary: remove the bottom time and add one to the top
- var index=this.timeMenu.childNodes[0].index-1;
- var div=this._createOption(index);
- this.timeMenu.removeChild(this.timeMenu.childNodes[this.timeMenu.childNodes.length-1]);
- this.timeMenu.insertBefore(div, this.timeMenu.childNodes[0]);
- },
-
- _onArrowDown:function(){
- // summary: remove the top time and add one to the bottom
- var index=this.timeMenu.childNodes[this.timeMenu.childNodes.length-1].index+1;
- var div=this._createOption(index);
- this.timeMenu.removeChild(this.timeMenu.childNodes[0]);
- this.timeMenu.appendChild(div);
- }
- }
-);
-
-}
-
-if(!dojo._hasResource["dijit.form.TimeTextBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.form.TimeTextBox"] = true;
-dojo.provide("dijit.form.TimeTextBox");
-
-
-
-
-
-
+if(!dojo._hasResource["dijit.form._DateTimeTextBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form._DateTimeTextBox"] = true;
+dojo.provide("dijit.form._DateTimeTextBox");
+
+
+
+
+
+
+/*=====
+dojo.declare(
+ "dijit.form._DateTimeTextBox.__Constraints",
+ [dijit.form.RangeBoundTextBox.__Constraints, dojo.date.locale.__FormatOptions], {
+ // summary:
+ // Specifies both the rules on valid/invalid values (first/last date/time allowed),
+ // and also formatting options for how the date/time is displayed.
+ // example:
+ // To restrict to dates within 2004, displayed in a long format like "December 25, 2005":
+ // | {min:'2004-01-01',max:'2004-12-31', formatLength:'long'}
+});
+=====*/
dojo.declare(
- "dijit.form.TimeTextBox",
+ "dijit.form._DateTimeTextBox",
dijit.form.RangeBoundTextBox,
{
// summary:
- // A validating, serializable, range-bound date text box.
-
- // constraints object: min, max
+ // Base class for validating, serializable, range-bound date or time text box.
+
+ // constraints: dijit.form._DateTimeTextBox.__Constraints
+ // Despite the name, this parameter specifies both constraints on the input
+ // (including starting/ending dates/times allowed) as well as
+ // formatting options like whether the date is displayed in long (ex: December 25, 2005)
+ // or short (ex: 12/25/2005) format. See `dijit.form._DateTimeTextBox.__Constraints` for details.
+ /*=====
+ constraints: {},
+ ======*/
+
+ // Override ValidationTextBox.regExpGen().... we use a reg-ex generating function rather
+ // than a straight regexp to deal with locale (plus formatting options too?)
regExpGen: dojo.date.locale.regexp,
+
+ // datePackage: String
+ // JavaScript namespace to find calendar routines. Uses Gregorian calendar routines
+ // at dojo.date, by default.
+ datePackage: "dojo.date",
+
+ // Override _FormWidget.compare() to work for dates/times
compare: dojo.date.compare,
- format: function(/*Date*/ value, /*Object*/ constraints){
- if(!value || value.toString() == this._invalid){ return null; }
- return dojo.date.locale.format(value, constraints);
- },
- parse: dojo.date.locale.parse,
- serialize: dojo.date.stamp.toISOString,
-
- value: new Date(""), // NaN
- _invalid: (new Date("")).toString(), // NaN
-
- _popupClass: "dijit._TimePicker",
+
+ format: function(/*Date*/ value, /*dojo.date.locale.__FormatOptions*/ constraints){
+ // summary:
+ // Formats the value as a Date, according to specified locale (second argument)
+ // tags:
+ // protected
+ if(!value){ return ''; }
+ return this.dateLocaleModule.format(value, constraints);
+ },
+
+ parse: function(/*String*/ value, /*dojo.date.locale.__FormatOptions*/ constraints){
+ // summary:
+ // Parses as string as a Date, according to constraints
+ // tags:
+ // protected
+
+ return this.dateLocaleModule.parse(value, constraints) || (this._isEmpty(value) ? null : undefined); // Date
+ },
+
+ // Overrides ValidationTextBox.serialize() to serialize a date in canonical ISO format.
+ serialize: function(/*anything*/val, /*Object?*/options){
+ if(val.toGregorian){
+ val = val.toGregorian();
+ }
+ return dojo.date.stamp.toISOString(val, options);
+ },
+
+ // value: Date
+ // The value of this widget as a JavaScript Date object. Use attr("value") / attr("value", val) to manipulate.
+ // When passed to the parser in markup, must be specified according to `dojo.date.stamp.fromISOString`
+ value: new Date(""), // value.toString()="NaN"
+ _blankValue: null, // used by filter() when the textbox is blank
+
+ // popupClass: [protected extension] String
+ // Name of the popup widget class used to select a date/time.
+ // Subclasses should specify this.
+ popupClass: "", // default is no popup = text only
+
+
+ // _selector: [protected extension] String
+ // Specifies constraints.selector passed to dojo.date functions, should be either
+ // "date" or "time".
+ // Subclass must specify this.
+ _selector: "",
+
+ constructor: function(/*Object*/args){
+ var dateClass = args.datePackage ? args.datePackage + ".Date" : "Date";
+ this.dateClassObj = dojo.getObject(dateClass, false);
+ this.value = new this.dateClassObj("");
+
+ this.datePackage = args.datePackage || this.datePackage;
+ this.dateLocaleModule = dojo.getObject(this.datePackage + ".locale", false);
+ this.regExpGen = this.dateLocaleModule.regexp;
+ },
postMixInProperties: function(){
- //dijit.form.RangeBoundTextBox.prototype.postMixInProperties.apply(this, arguments);
- this.inherited("postMixInProperties",arguments);
+ this.inherited(arguments);
+
+ if(!this.value || this.value.toString() == dijit.form._DateTimeTextBox.prototype.value.toString()){
+ this.value = null;
+ }
var constraints = this.constraints;
- constraints.selector = 'time';
- if(typeof constraints.min == "string"){ constraints.min = dojo.date.stamp.fromISOString(constraints.min); }
- if(typeof constraints.max == "string"){ constraints.max = dojo.date.stamp.fromISOString(constraints.max); }
+ constraints.selector = this._selector;
+ constraints.fullYear = true; // see #5465 - always format with 4-digit years
+ var fromISO = dojo.date.stamp.fromISOString;
+ if(typeof constraints.min == "string"){ constraints.min = fromISO(constraints.min); }
+ if(typeof constraints.max == "string"){ constraints.max = fromISO(constraints.max); }
},
_onFocus: function(/*Event*/ evt){
- // summary: open the TimePicker popup
+ // summary:
+ // open the popup
this._open();
- },
-
- setValue: function(/*Date*/ value, /*Boolean, optional*/ priorityChange){
- // summary:
- // Sets the date on this textbox
- this.inherited('setValue', arguments);
+ this.inherited(arguments);
+ },
+
+ _setValueAttr: function(/*Date*/ value, /*Boolean?*/ priorityChange, /*String?*/ formattedValue){
+ // summary:
+ // Sets the date on this textbox. Note that `value` must be like a Javascript Date object.
+ if(value instanceof Date && !(this.dateClassObj instanceof Date)){
+ value = new this.dateClassObj(value);
+ }
+
+ this.inherited(arguments);
if(this._picker){
// #3948: fix blank date on popup only
- if(!value || value.toString() == this._invalid){value=new Date();}
- this._picker.setValue(value);
+ if(!value){value = new this.dateClassObj();}
+ this._picker.attr('value', value);
}
},
_open: function(){
// summary:
- // opens the TimePicker, and sets the onValueSelected value
-
- if(this.disabled){return;}
-
- var self = this;
+ // opens the TimePicker, and sets the onValueSelected value
+
+ if(this.disabled || this.readOnly || !this.popupClass){return;}
+
+ var textBox = this;
if(!this._picker){
- var popupProto=dojo.getObject(this._popupClass, false);
- this._picker = new popupProto({
+ var PopupProto = dojo.getObject(this.popupClass, false);
+ this._picker = new PopupProto({
onValueSelected: function(value){
-
- self.focus(); // focus the textbox before the popup closes to avoid reopening the popup
- setTimeout(dojo.hitch(self, "_close"), 1); // allow focus time to take
+ if(textBox._tabbingAway){
+ delete textBox._tabbingAway;
+ }else{
+ textBox.focus(); // focus the textbox before the popup closes to avoid reopening the popup
+ }
+ setTimeout(dojo.hitch(textBox, "_close"), 1); // allow focus time to take
// this will cause InlineEditBox and other handlers to do stuff so make sure it's last
- dijit.form.TimeTextBox.superclass.setValue.call(self, value, true);
+ dijit.form._DateTimeTextBox.superclass._setValueAttr.call(textBox, value, true);
},
- lang: this.lang,
- constraints:this.constraints,
+ id: this.id + "_popup",
+ lang: textBox.lang,
+ constraints: textBox.constraints,
+
+ datePackage: textBox.datePackage,
+
isDisabledDate: function(/*Date*/ date){
// summary:
- // disables dates outside of the min/max of the TimeTextBox
- return self.constraints && (dojo.date.compare(self.constraints.min,date) > 0 || dojo.date.compare(self.constraints.max,date) < 0);
+ // disables dates outside of the min/max of the _DateTimeTextBox
+ var compare = dojo.date.compare;
+ var constraints = textBox.constraints;
+ return constraints && (constraints.min && (compare(constraints.min, date, textBox._selector) > 0) ||
+ (constraints.max && compare(constraints.max, date, textBox._selector) < 0));
}
});
- this._picker.setValue(this.getValue() || new Date());
+ this._picker.attr('value', this.attr('value') || new this.dateClassObj());
}
if(!this._opened){
+ // Open drop down. Align left sides of input box and drop down, even in RTL mode,
+ // otherwise positioning thrown off when the drop down width is changed in marginBox call below (#10676)
dijit.popup.open({
parent: this,
popup: this._picker,
+ orient: {'BL':'TL', 'TL':'BL'},
around: this.domNode,
onCancel: dojo.hitch(this, this._close),
- onClose: function(){ self._opened=false; }
+ onClose: function(){ textBox._opened=false; }
});
this._opened=true;
}
-
+
dojo.marginBox(this._picker.domNode,{ w:this.domNode.offsetWidth });
},
_close: function(){
if(this._opened){
dijit.popup.close(this._picker);
this._opened=false;
- }
+ }
},
_onBlur: function(){
- // summary: called magically when focus has shifted away from this widget and it's dropdown
+ // summary:
+ // Called magically when focus has shifted away from this widget and it's dropdown
this._close();
- this.inherited('_onBlur', arguments);
+ if(this._picker){
+ // teardown so that constraints will be rebuilt next time (redundant reference: #6002)
+ this._picker.destroy();
+ delete this._picker;
+ }
+ this.inherited(arguments);
// don't focus on <input>. the user has explicitly focused on something else.
},
- getDisplayedValue:function(){
+ _getDisplayedValueAttr: function(){
return this.textbox.value;
},
- setDisplayedValue:function(/*String*/ value){
- this.textbox.value=value;
+ _setDisplayedValueAttr: function(/*String*/ value, /*Boolean?*/ priorityChange){
+ this._setValueAttr(this.parse(value, this.constraints), priorityChange, value);
+ },
+
+ destroy: function(){
+ if(this._picker){
+ this._picker.destroy();
+ delete this._picker;
+ }
+ this.inherited(arguments);
+ },
+
+ postCreate: function(){
+ this.inherited(arguments);
+ this.connect(this.focusNode, 'onkeypress', this._onKeyPress);
+ this.connect(this.focusNode, 'onclick', this._open);
+ },
+
+ _onKeyPress: function(/*Event*/ e){
+ // summary:
+ // Handler for keypress events
+
+ var p = this._picker, dk = dojo.keys;
+ // Handle the key in the picker, if it has a handler. If the handler
+ // returns false, then don't handle any other keys.
+ if(p && this._opened && p.handleKey){
+ if(p.handleKey(e) === false){ return; }
+ }
+ if(this._opened && e.charOrCode == dk.ESCAPE && !(e.shiftKey || e.ctrlKey || e.altKey || e.metaKey)){
+ this._close();
+ dojo.stopEvent(e);
+ }else if(!this._opened && e.charOrCode == dk.DOWN_ARROW){
+ this._open();
+ dojo.stopEvent(e);
+ }else if(e.charOrCode === dk.TAB){
+ this._tabbingAway = true;
+ }else if(this._opened && (e.keyChar || e.charOrCode === dk.BACKSPACE || e.charOrCode == dk.DELETE)){
+ // Replace the element - but do it after a delay to allow for
+ // filtering to occur
+ setTimeout(dojo.hitch(this, function(){
+ dijit.placeOnScreenAroundElement(p.domNode.parentNode, this.domNode, {'BL':'TL', 'TL':'BL'}, p.orient ? dojo.hitch(p, "orient") : null);
+ }), 1);
+ }
}
}
);
}
if(!dojo._hasResource["dijit.form.DateTextBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.form.DateTextBox"] = true;
dojo.provide("dijit.form.DateTextBox");
dojo.declare(
"dijit.form.DateTextBox",
- dijit.form.TimeTextBox,
- {
- // summary:
- // A validating, serializable, range-bound date text box.
-
- _popupClass: "dijit._Calendar",
-
- postMixInProperties: function(){
- this.inherited('postMixInProperties', arguments);
- this.constraints.selector = 'date';
- }
- }
-);
-
-}
-
-if(!dojo._hasResource["dijit.form.FilteringSelect"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.form.FilteringSelect"] = true;
-dojo.provide("dijit.form.FilteringSelect");
-
-
-
-dojo.declare(
- "dijit.form.FilteringSelect",
- [dijit.form.MappedTextBox, dijit.form.ComboBoxMixin],
- {
- /*
- * summary
- * Enhanced version of HTML's <select> tag.
- *
- * Similar features:
- * - There is a drop down list of possible values.
- * - You can only enter a value from the drop down list. (You can't enter an arbitrary value.)
- * - The value submitted with the form is the hidden value (ex: CA),
- * not the displayed value a.k.a. label (ex: California)
- *
- * Enhancements over plain HTML version:
- * - If you type in some text then it will filter down the list of possible values in the drop down list.
- * - List can be specified either as a static list or via a javascript function (that can get the list from a server)
- */
-
- // searchAttr: String
- // Searches pattern match against this field
-
- // labelAttr: String
- // Optional. The text that actually appears in the drop down.
- // If not specified, the searchAttr text is used instead.
- labelAttr: "",
-
- // labelType: String
- // "html" or "text"
- labelType: "text",
-
- _isvalid:true,
-
- isValid:function(){
- return this._isvalid;
- },
-
- _callbackSetLabel: function(/*Array*/ result, /*Object*/ dataObject, /*Boolean, optional*/ priorityChange){
- // summary
- // Callback function that dynamically sets the label of the ComboBox
-
- // setValue does a synchronous lookup,
- // so it calls _callbackSetLabel directly,
- // and so does not pass dataObject
- // dataObject==null means do not test the lastQuery, just continue
- if(dataObject&&dataObject.query[this.searchAttr]!=this._lastQuery){return;}
- if(!result.length){
- //#3268: do nothing on bad input
- //this._setValue("", "");
- //#3285: change CSS to indicate error
- if(!this._hasFocus){ this.valueNode.value=""; }
- dijit.form.TextBox.superclass.setValue.call(this, undefined, !this._hasFocus);
- this._isvalid=false;
- this.validate(this._hasFocus);
- }else{
- this._setValueFromItem(result[0], priorityChange);
- }
- },
-
- _openResultList: function(/*Object*/ results, /*Object*/ dataObject){
- // #3285: tap into search callback to see if user's query resembles a match
- if(dataObject.query[this.searchAttr]!=this._lastQuery){return;}
- this._isvalid=results.length!=0;
- this.validate(true);
- dijit.form.ComboBoxMixin.prototype._openResultList.apply(this, arguments);
- },
-
- getValue:function(){
- // don't get the textbox value but rather the previously set hidden value
- return this.valueNode.value;
- },
-
- _getValueField:function(){
- // used for option tag selects
- return "value";
- },
-
- _setValue:function(/*String*/ value, /*String*/ displayedValue, /*Boolean, optional*/ priorityChange){
- this.valueNode.value = value;
- dijit.form.FilteringSelect.superclass.setValue.call(this, value, priorityChange, displayedValue);
- this._lastDisplayedValue = displayedValue;
- },
-
- setValue: function(/*String*/ value, /*Boolean, optional*/ priorityChange){
- // summary
- // Sets the value of the select.
- // Also sets the label to the corresponding value by reverse lookup.
-
- //#3347: fetchItemByIdentity if no keyAttr specified
- var self=this;
- var handleFetchByIdentity = function(item, priorityChange){
- if(item){
- if(self.store.isItemLoaded(item)){
- self._callbackSetLabel([item], undefined, priorityChange);
- }else{
- self.store.loadItem({item:item, onItem: function(result, dataObject){self._callbackSetLabel(result, dataObject, priorityChange)}});
- }
- }else{
- self._isvalid=false;
- // prevent errors from Tooltip not being created yet
- self.validate(false);
- }
- }
- this.store.fetchItemByIdentity({identity: value, onItem: function(item){handleFetchByIdentity(item, priorityChange)}});
- },
-
- _setValueFromItem: function(/*item*/ item, /*Boolean, optional*/ priorityChange){
- // summary
- // Set the displayed valued in the input box, based on a selected item.
- // Users shouldn't call this function; they should be calling setDisplayedValue() instead
- this._isvalid=true;
- this._setValue(this.store.getIdentity(item), this.labelFunc(item, this.store), priorityChange);
- },
-
- labelFunc: function(/*item*/ item, /*dojo.data.store*/ store){
- // summary: Event handler called when the label changes
- // returns the label that the ComboBox should display
- return store.getValue(item, this.searchAttr);
- },
-
- onkeyup: function(/*Event*/ evt){
- // summary: internal function
- // FilteringSelect needs to wait for the complete label before committing to a reverse lookup
- //this.setDisplayedValue(this.textbox.value);
- },
-
- _doSelect: function(/*Event*/ tgt){
- // summary:
- // ComboBox's menu callback function
- // FilteringSelect overrides this to set both the visible and hidden value from the information stored in the menu
- this.item = tgt.item;
- this._setValueFromItem(tgt.item, true);
- },
-
- setDisplayedValue:function(/*String*/ label){
- // summary:
- // Set textbox to display label
- // Also performs reverse lookup to set the hidden value
- // Used in InlineEditBox
-
- if(this.store){
- var query={};
- this._lastQuery=query[this.searchAttr]=label;
- // if the label is not valid, the callback will never set it,
- // so the last valid value will get the warning textbox
- // set the textbox value now so that the impending warning will make sense to the user
- this.textbox.value=label;
- this._lastDisplayedValue=label;
- this.store.fetch({query:query, queryOptions:{ignoreCase:this.ignoreCase, deep:true}, onComplete: dojo.hitch(this, this._callbackSetLabel)});
- }
- },
-
- _getMenuLabelFromItem:function(/*Item*/ item){
- // internal function to help ComboBoxMenu figure out what to display
- if(this.labelAttr){return {html:this.labelType=="html", label:this.store.getValue(item, this.labelAttr)};}
- else{
- // because this function is called by ComboBoxMenu, this.inherited tries to find the superclass of ComboBoxMenu
- return dijit.form.ComboBoxMixin.prototype._getMenuLabelFromItem.apply(this, arguments);
- }
- },
-
- postMixInProperties: function(){
- dijit.form.ComboBoxMixin.prototype.postMixInProperties.apply(this, arguments);
- dijit.form.MappedTextBox.prototype.postMixInProperties.apply(this, arguments);
- }
+ dijit.form._DateTimeTextBox,
+ {
+ // summary:
+ // A validating, serializable, range-bound date text box with a drop down calendar
+ //
+ // Example:
+ // | new dijit.form.DateTextBox({value: new Date(2009, 0, 20)})
+ //
+ // Example:
+ // | <input dojotype='dijit.form.DateTextBox' value='2009-01-20'>
+
+ baseClass: "dijitTextBox dijitDateTextBox",
+ popupClass: "dijit.Calendar",
+ _selector: "date",
+
+ // value: Date
+ // The value of this widget as a JavaScript Date object, with only year/month/day specified.
+ // If specified in markup, use the format specified in `dojo.date.stamp.fromISOString`
+ value: new Date("") // value.toString()="NaN"
}
);
}
if(!dojo._hasResource["dijit.form._Spinner"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.form._Spinner"] = true;
dojo.provide("dijit.form._Spinner");
dojo.declare(
"dijit.form._Spinner",
dijit.form.RangeBoundTextBox,
{
-
- // summary: Mixin for validation widgets with a spinner
- // description: This class basically (conceptually) extends dijit.form.ValidationTextBox.
- // It modifies the template to have up/down arrows, and provides related handling code.
+ // summary:
+ // Mixin for validation widgets with a spinner.
+ // description:
+ // This class basically (conceptually) extends `dijit.form.ValidationTextBox`.
+ // It modifies the template to have up/down arrows, and provides related handling code.
// defaultTimeout: Number
- // number of milliseconds before a held key or button becomes typematic
+ // Number of milliseconds before a held arrow key or up/down button becomes typematic
defaultTimeout: 500,
// timeoutChangeRate: Number
- // fraction of time used to change the typematic timer between events
- // 1.0 means that each typematic event fires at defaultTimeout intervals
- // < 1.0 means that each typematic event fires at an increasing faster rate
+ // Fraction of time used to change the typematic timer between events.
+ // 1.0 means that each typematic event fires at defaultTimeout intervals.
+ // < 1.0 means that each typematic event fires at an increasing faster rate.
timeoutChangeRate: 0.90,
// smallDelta: Number
- // adjust the value by this much when spinning using the arrow keys/buttons
+ // Adjust the value by this much when spinning using the arrow keys/buttons
smallDelta: 1,
+
// largeDelta: Number
- // adjust the value by this much when spinning using the PgUp/Dn keys
+ // Adjust the value by this much when spinning using the PgUp/Dn keys
largeDelta: 10,
- templateString:"<table class=\"dijit dijitReset dijitInlineTable dijitLeft\" cellspacing=\"0\" cellpadding=\"0\"\n\tid=\"widget_${id}\" name=\"${name}\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onkeypress:_onKeyPress\"\n\twaiRole=\"presentation\"\n\t><tr class=\"dijitReset\"\n\t\t><td rowspan=\"2\" class=\"dijitReset dijitStretch dijitInputField\" width=\"100%\"\n\t\t\t><input dojoAttachPoint=\"textbox,focusNode\" type=\"${type}\" dojoAttachEvent=\"onfocus,onkeyup\"\n\t\t\t\twaiRole=\"spinbutton\" autocomplete=\"off\" name=\"${name}\"\n\t\t></td\n\t\t><td rowspan=\"2\" class=\"dijitReset dijitValidationIconField\" width=\"0%\" \n\t\t\t><div dojoAttachPoint='iconNode' class='dijitValidationIcon'></div\n\t\t></td\n\t\t><td class=\"dijitReset dijitRight dijitButtonNode dijitUpArrowButton\" width=\"0%\"\n\t\t\t\tdojoAttachPoint=\"upArrowNode\"\n\t\t\t\tdojoAttachEvent=\"onmousedown:_handleUpArrowEvent,onmouseup:_handleUpArrowEvent,onmouseover:_handleUpArrowEvent,onmouseout:_handleUpArrowEvent\"\n\t\t\t\tstateModifier=\"UpArrow\"\n\t\t\t><div class=\"dijitA11yUpArrow\">&#9650;</div\n\t\t></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset dijitRight dijitButtonNode dijitDownArrowButton\" width=\"0%\"\n\t\t\t\tdojoAttachPoint=\"downArrowNode\"\n\t\t\t\tdojoAttachEvent=\"onmousedown:_handleDownArrowEvent,onmouseup:_handleDownArrowEvent,onmouseover:_handleDownArrowEvent,onmouseout:_handleDownArrowEvent\"\n\t\t\t\tstateModifier=\"DownArrow\"\n\t\t\t><div class=\"dijitA11yDownArrow\">&#9660;</div\n\t\t></td\n\t></tr\n></table>\n\n",
+ templateString: dojo.cache("dijit.form", "templates/Spinner.html", "<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\n\tid=\"widget_${id}\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\" waiRole=\"presentation\"\n\t><div class=\"dijitInputLayoutContainer\"\n\t\t><div class=\"dijitReset dijitSpinnerButtonContainer\"\n\t\t\t>&nbsp;<div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitUpArrowButton\"\n\t\t\t\tdojoAttachPoint=\"upArrowNode\"\n\t\t\t\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse\"\n\t\t\t\tstateModifier=\"UpArrow\"\n\t\t\t\t><div class=\"dijitArrowButtonInner\">&thinsp;</div\n\t\t\t\t><div class=\"dijitArrowButtonChar\">&#9650;</div\n\t\t\t></div\n\t\t\t><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitDownArrowButton\"\n\t\t\t\tdojoAttachPoint=\"downArrowNode\"\n\t\t\t\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse\"\n\t\t\t\tstateModifier=\"DownArrow\"\n\t\t\t\t><div class=\"dijitArrowButtonInner\">&thinsp;</div\n\t\t\t\t><div class=\"dijitArrowButtonChar\">&#9660;</div\n\t\t\t></div\n\t\t></div\n\t\t><div class=\"dijitReset dijitValidationIcon\"><br></div\n\t\t><div class=\"dijitReset dijitValidationIconText\">&Chi;</div\n\t\t><div class=\"dijitReset dijitInputField\"\n\t\t\t><input class='dijitReset' dojoAttachPoint=\"textbox,focusNode\" type=\"${type}\" dojoAttachEvent=\"onkeypress:_onKeyPress\"\n\t\t\t\twaiRole=\"spinbutton\" autocomplete=\"off\" ${nameAttrSetting}\n\t\t/></div\n\t></div\n></div>\n"),
baseClass: "dijitSpinner",
adjust: function(/* Object */ val, /*Number*/ delta){
- // summary: user replaceable function used to adjust a primitive value(Number/Date/...) by the delta amount specified
- // the val is adjusted in a way that makes sense to the object type
+ // summary:
+ // Overridable function used to adjust a primitive value(Number/Date/...) by the delta amount specified.
+ // The val is adjusted in a way that makes sense to the object type.
+ // tags:
+ // protected extension
return val;
},
- _handleUpArrowEvent : function(/*Event*/ e){
- this._onMouse(e, this.upArrowNode);
- },
-
- _handleDownArrowEvent : function(/*Event*/ e){
- this._onMouse(e, this.downArrowNode);
- },
-
-
- _arrowPressed: function(/*Node*/ nodePressed, /*Number*/ direction){
- if(this.disabled){ return; }
- dojo.addClass(nodePressed, "dijitSpinnerButtonActive");
- this.setValue(this.adjust(this.getValue(), direction*this.smallDelta), false);
+ _arrowState: function(/*Node*/ node, /*Boolean*/ pressed){
+ // summary:
+ // Called when an arrow key is pressed to update the relevant CSS classes
+ this._active = pressed;
+ this.stateModifier = node.getAttribute("stateModifier") || "";
+ this._setStateClass();
+ },
+
+ _arrowPressed: function(/*Node*/ nodePressed, /*Number*/ direction, /*Number*/ increment){
+ // summary:
+ // Handler for arrow button or arrow key being pressed
+ if(this.disabled || this.readOnly){ return; }
+ this._arrowState(nodePressed, true);
+ this._setValueAttr(this.adjust(this.attr('value'), direction*increment), false);
+ dijit.selectInputText(this.textbox, this.textbox.value.length);
},
_arrowReleased: function(/*Node*/ node){
- if(this.disabled){ return; }
+ // summary:
+ // Handler for arrow button or arrow key being released
this._wheelTimer = null;
- dijit.focus(this.textbox);
- dojo.removeClass(node, "dijitSpinnerButtonActive");
+ if(this.disabled || this.readOnly){ return; }
+ this._arrowState(node, false);
},
_typematicCallback: function(/*Number*/ count, /*DOMNode*/ node, /*Event*/ evt){
- if(node == this.textbox){ node = (evt.keyCode == dojo.keys.UP_ARROW) ? this.upArrowNode : this.downArrowNode; }
+ var inc=this.smallDelta;
+ if(node == this.textbox){
+ var k=dojo.keys;
+ var key = evt.charOrCode;
+ inc = (key == k.PAGE_UP || key == k.PAGE_DOWN) ? this.largeDelta : this.smallDelta;
+ node = (key == k.UP_ARROW || key == k.PAGE_UP) ? this.upArrowNode : this.downArrowNode;
+ }
if(count == -1){ this._arrowReleased(node); }
- else{ this._arrowPressed(node, (node == this.upArrowNode) ? 1 : -1); }
+ else{ this._arrowPressed(node, (node == this.upArrowNode) ? 1 : -1, inc); }
},
_wheelTimer: null,
_mouseWheeled: function(/*Event*/ evt){
+ // summary:
+ // Mouse wheel listener where supported
+
dojo.stopEvent(evt);
- var scrollAmount = 0;
- if(typeof evt.wheelDelta == 'number'){ // IE
- scrollAmount = evt.wheelDelta;
- }else if(typeof evt.detail == 'number'){ // Mozilla+Firefox
- scrollAmount = -evt.detail;
- }
- if(scrollAmount > 0){
- var node = this.upArrowNode;
- var dir = +1;
- }else if(scrollAmount < 0){
- var node = this.downArrowNode;
- var dir = -1;
- }else{ return; }
- this._arrowPressed(node, dir);
- if(this._wheelTimer != null){
- clearTimeout(this._wheelTimer);
- }
- var _this = this;
- this._wheelTimer = setTimeout(function(){_this._arrowReleased(node);}, 50);
+ // FIXME: Safari bubbles
+
+ // be nice to DOH and scroll as much as the event says to
+ var scrollAmount = evt.detail ? (evt.detail * -1) : (evt.wheelDelta / 120);
+ if(scrollAmount !== 0){
+ var node = this[(scrollAmount > 0 ? "upArrowNode" : "downArrowNode" )];
+
+ this._arrowPressed(node, scrollAmount, this.smallDelta);
+
+ if(!this._wheelTimer){
+ clearTimeout(this._wheelTimer);
+ }
+ this._wheelTimer = setTimeout(dojo.hitch(this,"_arrowReleased",node), 50);
+ }
+
},
postCreate: function(){
- this.inherited('postCreate', arguments);
+ this.inherited(arguments);
// extra listeners
- this.connect(this.textbox, dojo.isIE ? "onmousewheel" : 'DOMMouseScroll', "_mouseWheeled");
- dijit.typematic.addListener(this.upArrowNode, this.textbox, {keyCode:dojo.keys.UP_ARROW,ctrlKey:false,altKey:false,shiftKey:false}, this, "_typematicCallback", this.timeoutChangeRate, this.defaultTimeout);
- dijit.typematic.addListener(this.downArrowNode, this.textbox, {keyCode:dojo.keys.DOWN_ARROW,ctrlKey:false,altKey:false,shiftKey:false}, this, "_typematicCallback", this.timeoutChangeRate, this.defaultTimeout);
+ this.connect(this.domNode, !dojo.isMozilla ? "onmousewheel" : 'DOMMouseScroll', "_mouseWheeled");
+ this._connects.push(dijit.typematic.addListener(this.upArrowNode, this.textbox, {charOrCode:dojo.keys.UP_ARROW,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false}, this, "_typematicCallback", this.timeoutChangeRate, this.defaultTimeout));
+ this._connects.push(dijit.typematic.addListener(this.downArrowNode, this.textbox, {charOrCode:dojo.keys.DOWN_ARROW,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false}, this, "_typematicCallback", this.timeoutChangeRate, this.defaultTimeout));
+ this._connects.push(dijit.typematic.addListener(this.upArrowNode, this.textbox, {charOrCode:dojo.keys.PAGE_UP,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false}, this, "_typematicCallback", this.timeoutChangeRate, this.defaultTimeout));
+ this._connects.push(dijit.typematic.addListener(this.downArrowNode, this.textbox, {charOrCode:dojo.keys.PAGE_DOWN,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false}, this, "_typematicCallback", this.timeoutChangeRate, this.defaultTimeout));
+ if(dojo.isIE){
+ var _this = this;
+ (function resize(){
+ var sz = _this.upArrowNode.parentNode.offsetHeight;
+ if(sz){
+ _this.upArrowNode.style.height = sz >> 1;
+ _this.downArrowNode.style.height = sz - (sz >> 1);
+ _this.focusNode.parentNode.style.height = sz;
+ }
+ })();
+ this.connect(this.domNode, "onresize",
+ function(){ setTimeout(
+ function(){
+ resize();
+ // cause IE to rerender when spinner is moved from hidden to visible
+ _this._setStateClass();
+ }, 0);
+ }
+ );
+ this._layoutHackIE7();
+ }
}
});
}
if(!dojo._hasResource["dijit.form.NumberSpinner"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.form.NumberSpinner"] = true;
dojo.provide("dijit.form.NumberSpinner");
-dojo.declare(
-"dijit.form.NumberSpinner",
-[dijit.form._Spinner, dijit.form.NumberTextBoxMixin],
-{
- // summary: Number Spinner
- // description: This widget is the same as NumberTextBox but with up/down arrows added
-
- required: true,
-
- adjust: function(/* Object */ val, /*Number*/ delta){
- // summary: change Number val by the given amount
- var newval = val+delta;
- if(isNaN(val) || isNaN(newval)){ return val; }
- if((typeof this.constraints.max == "number") && (newval > this.constraints.max)){
- newval = this.constraints.max;
- }
- if((typeof this.constraints.min == "number") && (newval < this.constraints.min)){
- newval = this.constraints.min;
+dojo.declare("dijit.form.NumberSpinner",
+ [dijit.form._Spinner, dijit.form.NumberTextBoxMixin],
+ {
+ // summary:
+ // Extends NumberTextBox to add up/down arrows and pageup/pagedown for incremental change to the value
+ //
+ // description:
+ // A `dijit.form.NumberTextBox` extension to provide keyboard accessible value selection
+ // as well as icons for spinning direction. When using the keyboard, the typematic rules
+ // apply, meaning holding the key will gradually increarease or decrease the value and
+ // accelerate.
+ //
+ // example:
+ // | new dijit.form.NumberSpinner({ constraints:{ max:300, min:100 }}, "someInput");
+
+ adjust: function(/* Object */val, /* Number*/delta){
+ // summary:
+ // Change Number val by the given amount
+ // tags:
+ // protected
+
+ var tc = this.constraints,
+ v = isNaN(val),
+ gotMax = !isNaN(tc.max),
+ gotMin = !isNaN(tc.min)
+ ;
+ if(v && delta != 0){ // blank or invalid value and they want to spin, so create defaults
+ val = (delta > 0) ?
+ gotMin ? tc.min : gotMax ? tc.max : 0 :
+ gotMax ? this.constraints.max : gotMin ? tc.min : 0
+ ;
+ }
+ var newval = val + delta;
+ if(v || isNaN(newval)){ return val; }
+ if(gotMax && (newval > tc.max)){
+ newval = tc.max;
+ }
+ if(gotMin && (newval < tc.min)){
+ newval = tc.min;
}
return newval;
- }
-});
-
-}
-
-if(!dojo._hasResource["dijit.form.Slider"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.form.Slider"] = true;
-dojo.provide("dijit.form.Slider");
+ },
+
+ _onKeyPress: function(e){
+ if((e.charOrCode == dojo.keys.HOME || e.charOrCode == dojo.keys.END) && !(e.ctrlKey || e.altKey || e.metaKey)
+ && typeof this.attr('value') != 'undefined' /* gibberish, so HOME and END are default editing keys*/){
+ var value = this.constraints[(e.charOrCode == dojo.keys.HOME ? "min" : "max")];
+ if(value){
+ this._setValueAttr(value,true);
+ }
+ // eat home or end key whether we change the value or not
+ dojo.stopEvent(e);
+ }
+ }
+
+});
+
+}
+
+if(!dojo._hasResource["dojo.data.util.sorter"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojo.data.util.sorter"] = true;
+dojo.provide("dojo.data.util.sorter");
+
+dojo.data.util.sorter.basicComparator = function( /*anything*/ a,
+ /*anything*/ b){
+ // summary:
+ // Basic comparision function that compares if an item is greater or less than another item
+ // description:
+ // returns 1 if a > b, -1 if a < b, 0 if equal.
+ // 'null' values (null, undefined) are treated as larger values so that they're pushed to the end of the list.
+ // And compared to each other, null is equivalent to undefined.
+
+ //null is a problematic compare, so if null, we set to undefined.
+ //Makes the check logic simple, compact, and consistent
+ //And (null == undefined) === true, so the check later against null
+ //works for undefined and is less bytes.
+ var r = -1;
+ if(a === null){
+ a = undefined;
+ }
+ if(b === null){
+ b = undefined;
+ }
+ if(a == b){
+ r = 0;
+ }else if(a > b || a == null){
+ r = 1;
+ }
+ return r; //int {-1,0,1}
+};
+
+dojo.data.util.sorter.createSortFunction = function( /* attributes array */sortSpec,
+ /*dojo.data.core.Read*/ store){
+ // summary:
+ // Helper function to generate the sorting function based off the list of sort attributes.
+ // description:
+ // The sort function creation will look for a property on the store called 'comparatorMap'. If it exists
+ // it will look in the mapping for comparisons function for the attributes. If one is found, it will
+ // use it instead of the basic comparator, which is typically used for strings, ints, booleans, and dates.
+ // Returns the sorting function for this particular list of attributes and sorting directions.
+ //
+ // sortSpec: array
+ // A JS object that array that defines out what attribute names to sort on and whether it should be descenting or asending.
+ // The objects should be formatted as follows:
+ // {
+ // attribute: "attributeName-string" || attribute,
+ // descending: true|false; // Default is false.
+ // }
+ // store: object
+ // The datastore object to look up item values from.
+ //
+ var sortFunctions=[];
+
+ function createSortFunction(attr, dir, comp, s){
+ //Passing in comp and s (comparator and store), makes this
+ //function much faster.
+ return function(itemA, itemB){
+ var a = s.getValue(itemA, attr);
+ var b = s.getValue(itemB, attr);
+ return dir * comp(a,b); //int
+ };
+ }
+ var sortAttribute;
+ var map = store.comparatorMap;
+ var bc = dojo.data.util.sorter.basicComparator;
+ for(var i = 0; i < sortSpec.length; i++){
+ sortAttribute = sortSpec[i];
+ var attr = sortAttribute.attribute;
+ if(attr){
+ var dir = (sortAttribute.descending) ? -1 : 1;
+ var comp = bc;
+ if(map){
+ if(typeof attr !== "string" && ("toString" in attr)){
+ attr = attr.toString();
+ }
+ comp = map[attr] || bc;
+ }
+ sortFunctions.push(createSortFunction(attr,
+ dir, comp, store));
+ }
+ }
+ return function(rowA, rowB){
+ var i=0;
+ while(i < sortFunctions.length){
+ var ret = sortFunctions[i++](rowA, rowB);
+ if(ret !== 0){
+ return ret;//int
+ }
+ }
+ return 0; //int
+ }; // Function
+};
+
+}
+
+if(!dojo._hasResource["dojo.data.util.simpleFetch"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojo.data.util.simpleFetch"] = true;
+dojo.provide("dojo.data.util.simpleFetch");
+
+
+dojo.data.util.simpleFetch.fetch = function(/* Object? */ request){
+ // summary:
+ // The simpleFetch mixin is designed to serve as a set of function(s) that can
+ // be mixed into other datastore implementations to accelerate their development.
+ // The simpleFetch mixin should work well for any datastore that can respond to a _fetchItems()
+ // call by returning an array of all the found items that matched the query. The simpleFetch mixin
+ // is not designed to work for datastores that respond to a fetch() call by incrementally
+ // loading items, or sequentially loading partial batches of the result
+ // set. For datastores that mixin simpleFetch, simpleFetch
+ // implements a fetch method that automatically handles eight of the fetch()
+ // arguments -- onBegin, onItem, onComplete, onError, start, count, sort and scope
+ // The class mixing in simpleFetch should not implement fetch(),
+ // but should instead implement a _fetchItems() method. The _fetchItems()
+ // method takes three arguments, the keywordArgs object that was passed
+ // to fetch(), a callback function to be called when the result array is
+ // available, and an error callback to be called if something goes wrong.
+ // The _fetchItems() method should ignore any keywordArgs parameters for
+ // start, count, onBegin, onItem, onComplete, onError, sort, and scope.
+ // The _fetchItems() method needs to correctly handle any other keywordArgs
+ // parameters, including the query parameter and any optional parameters
+ // (such as includeChildren). The _fetchItems() method should create an array of
+ // result items and pass it to the fetchHandler along with the original request object
+ // -- or, the _fetchItems() method may, if it wants to, create an new request object
+ // with other specifics about the request that are specific to the datastore and pass
+ // that as the request object to the handler.
+ //
+ // For more information on this specific function, see dojo.data.api.Read.fetch()
+ request = request || {};
+ if(!request.store){
+ request.store = this;
+ }
+ var self = this;
+
+ var _errorHandler = function(errorData, requestObject){
+ if(requestObject.onError){
+ var scope = requestObject.scope || dojo.global;
+ requestObject.onError.call(scope, errorData, requestObject);
+ }
+ };
+
+ var _fetchHandler = function(items, requestObject){
+ var oldAbortFunction = requestObject.abort || null;
+ var aborted = false;
+
+ var startIndex = requestObject.start?requestObject.start:0;
+ var endIndex = (requestObject.count && (requestObject.count !== Infinity))?(startIndex + requestObject.count):items.length;
+
+ requestObject.abort = function(){
+ aborted = true;
+ if(oldAbortFunction){
+ oldAbortFunction.call(requestObject);
+ }
+ };
+
+ var scope = requestObject.scope || dojo.global;
+ if(!requestObject.store){
+ requestObject.store = self;
+ }
+ if(requestObject.onBegin){
+ requestObject.onBegin.call(scope, items.length, requestObject);
+ }
+ if(requestObject.sort){
+ items.sort(dojo.data.util.sorter.createSortFunction(requestObject.sort, self));
+ }
+ if(requestObject.onItem){
+ for(var i = startIndex; (i < items.length) && (i < endIndex); ++i){
+ var item = items[i];
+ if(!aborted){
+ requestObject.onItem.call(scope, item, requestObject);
+ }
+ }
+ }
+ if(requestObject.onComplete && !aborted){
+ var subset = null;
+ if(!requestObject.onItem){
+ subset = items.slice(startIndex, endIndex);
+ }
+ requestObject.onComplete.call(scope, subset, requestObject);
+ }
+ };
+ this._fetchItems(request, _fetchHandler, _errorHandler);
+ return request; // Object
+};
+
+}
+
+if(!dojo._hasResource["dojo.data.util.filter"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojo.data.util.filter"] = true;
+dojo.provide("dojo.data.util.filter");
+
+dojo.data.util.filter.patternToRegExp = function(/*String*/pattern, /*boolean?*/ ignoreCase){
+ // summary:
+ // Helper function to convert a simple pattern to a regular expression for matching.
+ // description:
+ // Returns a regular expression object that conforms to the defined conversion rules.
+ // For example:
+ // ca* -> /^ca.*$/
+ // *ca* -> /^.*ca.*$/
+ // *c\*a* -> /^.*c\*a.*$/
+ // *c\*a?* -> /^.*c\*a..*$/
+ // and so on.
+ //
+ // pattern: string
+ // A simple matching pattern to convert that follows basic rules:
+ // * Means match anything, so ca* means match anything starting with ca
+ // ? Means match single character. So, b?b will match to bob and bab, and so on.
+ // \ is an escape character. So for example, \* means do not treat * as a match, but literal character *.
+ // To use a \ as a character in the string, it must be escaped. So in the pattern it should be
+ // represented by \\ to be treated as an ordinary \ character instead of an escape.
+ //
+ // ignoreCase:
+ // An optional flag to indicate if the pattern matching should be treated as case-sensitive or not when comparing
+ // By default, it is assumed case sensitive.
+
+ var rxp = "^";
+ var c = null;
+ for(var i = 0; i < pattern.length; i++){
+ c = pattern.charAt(i);
+ switch(c){
+ case '\\':
+ rxp += c;
+ i++;
+ rxp += pattern.charAt(i);
+ break;
+ case '*':
+ rxp += ".*"; break;
+ case '?':
+ rxp += "."; break;
+ case '$':
+ case '^':
+ case '/':
+ case '+':
+ case '.':
+ case '|':
+ case '(':
+ case ')':
+ case '{':
+ case '}':
+ case '[':
+ case ']':
+ rxp += "\\"; //fallthrough
+ default:
+ rxp += c;
+ }
+ }
+ rxp += "$";
+ if(ignoreCase){
+ return new RegExp(rxp,"mi"); //RegExp
+ }else{
+ return new RegExp(rxp,"m"); //RegExp
+ }
+
+};
+
+}
+
+if(!dojo._hasResource["dijit.form.ComboBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form.ComboBox"] = true;
+dojo.provide("dijit.form.ComboBox");
+
+
+
+
+
+
+
+
+
+dojo.declare(
+ "dijit.form.ComboBoxMixin",
+ null,
+ {
+ // summary:
+ // Implements the base functionality for `dijit.form.ComboBox`/`dijit.form.FilteringSelect`
+ // description:
+ // All widgets that mix in dijit.form.ComboBoxMixin must extend `dijit.form._FormValueWidget`.
+ // tags:
+ // protected
+
+ // item: Object
+ // This is the item returned by the dojo.data.store implementation that
+ // provides the data for this ComboBox, it's the currently selected item.
+ item: null,
+
+ // pageSize: Integer
+ // Argument to data provider.
+ // Specifies number of search results per page (before hitting "next" button)
+ pageSize: Infinity,
+
+ // store: Object
+ // Reference to data provider object used by this ComboBox
+ store: null,
+
+ // fetchProperties: Object
+ // Mixin to the dojo.data store's fetch.
+ // For example, to set the sort order of the ComboBox menu, pass:
+ // | { sort: {attribute:"name",descending: true} }
+ // To override the default queryOptions so that deep=false, do:
+ // | { queryOptions: {ignoreCase: true, deep: false} }
+ fetchProperties:{},
+
+ // query: Object
+ // A query that can be passed to 'store' to initially filter the items,
+ // before doing further filtering based on `searchAttr` and the key.
+ // Any reference to the `searchAttr` is ignored.
+ query: {},
+
+ // autoComplete: Boolean
+ // If user types in a partial string, and then tab out of the `<input>` box,
+ // automatically copy the first entry displayed in the drop down list to
+ // the `<input>` field
+ autoComplete: true,
+
+ // highlightMatch: String
+ // One of: "first", "all" or "none".
+ //
+ // If the ComboBox/FilteringSelect opens with the search results and the searched
+ // string can be found, it will be highlighted. If set to "all"
+ // then will probably want to change `queryExpr` parameter to '*${0}*'
+ //
+ // Highlighting is only performed when `labelType` is "text", so as to not
+ // interfere with any HTML markup an HTML label might contain.
+ highlightMatch: "first",
+
+ // searchDelay: Integer
+ // Delay in milliseconds between when user types something and we start
+ // searching based on that value
+ searchDelay: 100,
+
+ // searchAttr: String
+ // Search for items in the data store where this attribute (in the item)
+ // matches what the user typed
+ searchAttr: "name",
+
+ // labelAttr: String?
+ // The entries in the drop down list come from this attribute in the
+ // dojo.data items.
+ // If not specified, the searchAttr attribute is used instead.
+ labelAttr: "",
+
+ // labelType: String
+ // Specifies how to interpret the labelAttr in the data store items.
+ // Can be "html" or "text".
+ labelType: "text",
+
+ // queryExpr: String
+ // This specifies what query ComboBox/FilteringSelect sends to the data store,
+ // based on what the user has typed. Changing this expression will modify
+ // whether the drop down shows only exact matches, a "starting with" match,
+ // etc. Use it in conjunction with highlightMatch.
+ // dojo.data query expression pattern.
+ // `${0}` will be substituted for the user text.
+ // `*` is used for wildcards.
+ // `${0}*` means "starts with", `*${0}*` means "contains", `${0}` means "is"
+ queryExpr: "${0}*",
+
+ // ignoreCase: Boolean
+ // Set true if the ComboBox/FilteringSelect should ignore case when matching possible items
+ ignoreCase: true,
+
+ // hasDownArrow: [const] Boolean
+ // Set this textbox to have a down arrow button, to display the drop down list.
+ // Defaults to true.
+ hasDownArrow: true,
+
+ templateString: dojo.cache("dijit.form", "templates/ComboBox.html", "<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\n\tid=\"widget_${id}\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\" dojoAttachPoint=\"comboNode\" waiRole=\"combobox\" tabIndex=\"-1\"\n\t><div style=\"overflow:hidden;\"\n\t\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton'\n\t\t\tdojoAttachPoint=\"downArrowNode\" waiRole=\"presentation\"\n\t\t\tdojoAttachEvent=\"onmousedown:_onArrowMouseDown,onmouseup:_onMouse,onmouseenter:_onMouse,onmouseleave:_onMouse\"\n\t\t\t><div class=\"dijitArrowButtonInner\">&thinsp;</div\n\t\t\t><div class=\"dijitArrowButtonChar\">&#9660;</div\n\t\t></div\n\t\t><div class=\"dijitReset dijitValidationIcon\"><br></div\n\t\t><div class=\"dijitReset dijitValidationIconText\">&Chi;</div\n\t\t><div class=\"dijitReset dijitInputField\"\n\t\t\t><input ${nameAttrSetting} type=\"text\" autocomplete=\"off\" class='dijitReset'\n\t\t\tdojoAttachEvent=\"onkeypress:_onKeyPress,compositionend\"\n\t\t\tdojoAttachPoint=\"textbox,focusNode\" waiRole=\"textbox\" waiState=\"haspopup-true,autocomplete-list\"\n\t\t/></div\n\t></div\n></div>\n"),
+
+ baseClass:"dijitComboBox",
+
+ _getCaretPos: function(/*DomNode*/ element){
+ // khtml 3.5.2 has selection* methods as does webkit nightlies from 2005-06-22
+ var pos = 0;
+ if(typeof(element.selectionStart) == "number"){
+ // FIXME: this is totally borked on Moz < 1.3. Any recourse?
+ pos = element.selectionStart;
+ }else if(dojo.isIE){
+ // in the case of a mouse click in a popup being handled,
+ // then the dojo.doc.selection is not the textarea, but the popup
+ // var r = dojo.doc.selection.createRange();
+ // hack to get IE 6 to play nice. What a POS browser.
+ var tr = dojo.doc.selection.createRange().duplicate();
+ var ntr = element.createTextRange();
+ tr.move("character",0);
+ ntr.move("character",0);
+ try{
+ // If control doesnt have focus, you get an exception.
+ // Seems to happen on reverse-tab, but can also happen on tab (seems to be a race condition - only happens sometimes).
+ // There appears to be no workaround for this - googled for quite a while.
+ ntr.setEndPoint("EndToEnd", tr);
+ pos = String(ntr.text).replace(/\r/g,"").length;
+ }catch(e){
+ // If focus has shifted, 0 is fine for caret pos.
+ }
+ }
+ return pos;
+ },
+
+ _setCaretPos: function(/*DomNode*/ element, /*Number*/ location){
+ location = parseInt(location);
+ dijit.selectInputText(element, location, location);
+ },
+
+ _setDisabledAttr: function(/*Boolean*/ value){
+ // Additional code to set disabled state of ComboBox node.
+ // Overrides _FormValueWidget._setDisabledAttr() or ValidationTextBox._setDisabledAttr().
+ this.inherited(arguments);
+ dijit.setWaiState(this.comboNode, "disabled", value);
+ },
+
+ _abortQuery: function(){
+ // stop in-progress query
+ if(this.searchTimer){
+ clearTimeout(this.searchTimer);
+ this.searchTimer = null;
+ }
+ if(this._fetchHandle){
+ if(this._fetchHandle.abort){ this._fetchHandle.abort(); }
+ this._fetchHandle = null;
+ }
+ },
+
+ _onKeyPress: function(/*Event*/ evt){
+ // summary:
+ // Handles keyboard events
+ var key = evt.charOrCode;
+ // except for cutting/pasting case - ctrl + x/v
+ if(evt.altKey || ((evt.ctrlKey || evt.metaKey) && (key != 'x' && key != 'v')) || key == dojo.keys.SHIFT){
+ return; // throw out weird key combinations and spurious events
+ }
+ var doSearch = false;
+ var searchFunction = "_startSearchFromInput";
+ var pw = this._popupWidget;
+ var dk = dojo.keys;
+ var highlighted = null;
+ this._prev_key_backspace = false;
+ this._abortQuery();
+ if(this._isShowingNow){
+ pw.handleKey(key);
+ highlighted = pw.getHighlightedOption();
+ }
+ switch(key){
+ case dk.PAGE_DOWN:
+ case dk.DOWN_ARROW:
+ case dk.PAGE_UP:
+ case dk.UP_ARROW:
+ if(!this._isShowingNow){
+ this._arrowPressed();
+ doSearch = true;
+ searchFunction = "_startSearchAll";
+ }else{
+ this._announceOption(highlighted);
+ }
+ dojo.stopEvent(evt);
+ break;
+
+ case dk.ENTER:
+ // prevent submitting form if user presses enter. Also
+ // prevent accepting the value if either Next or Previous
+ // are selected
+ if(highlighted){
+ // only stop event on prev/next
+ if(highlighted == pw.nextButton){
+ this._nextSearch(1);
+ dojo.stopEvent(evt);
+ break;
+ }else if(highlighted == pw.previousButton){
+ this._nextSearch(-1);
+ dojo.stopEvent(evt);
+ break;
+ }
+ }else{
+ // Update 'value' (ex: KY) according to currently displayed text
+ this._setBlurValue(); // set value if needed
+ this._setCaretPos(this.focusNode, this.focusNode.value.length); // move cursor to end and cancel highlighting
+ }
+ // default case:
+ // prevent submit, but allow event to bubble
+ evt.preventDefault();
+ // fall through
+
+ case dk.TAB:
+ var newvalue = this.attr('displayedValue');
+ // if the user had More Choices selected fall into the
+ // _onBlur handler
+ if(pw && (
+ newvalue == pw._messages["previousMessage"] ||
+ newvalue == pw._messages["nextMessage"])
+ ){
+ break;
+ }
+ if(highlighted){
+ this._selectOption();
+ }
+ if(this._isShowingNow){
+ this._lastQuery = null; // in case results come back later
+ this._hideResultList();
+ }
+ break;
+
+ case ' ':
+ if(highlighted){
+ dojo.stopEvent(evt);
+ this._selectOption();
+ this._hideResultList();
+ }else{
+ doSearch = true;
+ }
+ break;
+
+ case dk.ESCAPE:
+ if(this._isShowingNow){
+ dojo.stopEvent(evt);
+ this._hideResultList();
+ }
+ break;
+
+ case dk.DELETE:
+ case dk.BACKSPACE:
+ this._prev_key_backspace = true;
+ doSearch = true;
+ break;
+
+ default:
+ // Non char keys (F1-F12 etc..) shouldn't open list.
+ // Ascii characters and IME input (Chinese, Japanese etc.) should.
+ // On IE and safari, IME input produces keycode == 229, and we simulate
+ // it on firefox by attaching to compositionend event (see compositionend method)
+ doSearch = typeof key == 'string' || key == 229;
+ }
+ if(doSearch){
+ // need to wait a tad before start search so that the event
+ // bubbles through DOM and we have value visible
+ this.item = undefined; // undefined means item needs to be set
+ this.searchTimer = setTimeout(dojo.hitch(this, searchFunction),1);
+ }
+ },
+
+ _autoCompleteText: function(/*String*/ text){
+ // summary:
+ // Fill in the textbox with the first item from the drop down
+ // list, and highlight the characters that were
+ // auto-completed. For example, if user typed "CA" and the
+ // drop down list appeared, the textbox would be changed to
+ // "California" and "ifornia" would be highlighted.
+
+ var fn = this.focusNode;
+
+ // IE7: clear selection so next highlight works all the time
+ dijit.selectInputText(fn, fn.value.length);
+ // does text autoComplete the value in the textbox?
+ var caseFilter = this.ignoreCase? 'toLowerCase' : 'substr';
+ if(text[caseFilter](0).indexOf(this.focusNode.value[caseFilter](0)) == 0){
+ var cpos = this._getCaretPos(fn);
+ // only try to extend if we added the last character at the end of the input
+ if((cpos+1) > fn.value.length){
+ // only add to input node as we would overwrite Capitalisation of chars
+ // actually, that is ok
+ fn.value = text;//.substr(cpos);
+ // visually highlight the autocompleted characters
+ dijit.selectInputText(fn, cpos);
+ }
+ }else{
+ // text does not autoComplete; replace the whole value and highlight
+ fn.value = text;
+ dijit.selectInputText(fn);
+ }
+ },
+
+ _openResultList: function(/*Object*/ results, /*Object*/ dataObject){
+ this._fetchHandle = null;
+ if( this.disabled ||
+ this.readOnly ||
+ (dataObject.query[this.searchAttr] != this._lastQuery)
+ ){
+ return;
+ }
+ this._popupWidget.clearResultList();
+ if(!results.length){
+ this._hideResultList();
+ return;
+ }
+
+
+ // Fill in the textbox with the first item from the drop down list,
+ // and highlight the characters that were auto-completed. For
+ // example, if user typed "CA" and the drop down list appeared, the
+ // textbox would be changed to "California" and "ifornia" would be
+ // highlighted.
+
+ dataObject._maxOptions = this._maxOptions;
+ var nodes = this._popupWidget.createOptions(
+ results,
+ dataObject,
+ dojo.hitch(this, "_getMenuLabelFromItem")
+ );
+
+ // show our list (only if we have content, else nothing)
+ this._showResultList();
+
+ // #4091:
+ // tell the screen reader that the paging callback finished by
+ // shouting the next choice
+ if(dataObject.direction){
+ if(1 == dataObject.direction){
+ this._popupWidget.highlightFirstOption();
+ }else if(-1 == dataObject.direction){
+ this._popupWidget.highlightLastOption();
+ }
+ this._announceOption(this._popupWidget.getHighlightedOption());
+ }else if(this.autoComplete && !this._prev_key_backspace /*&& !dataObject.direction*/
+ // when the user clicks the arrow button to show the full list,
+ // startSearch looks for "*".
+ // it does not make sense to autocomplete
+ // if they are just previewing the options available.
+ && !/^[*]+$/.test(dataObject.query[this.searchAttr])){
+ this._announceOption(nodes[1]); // 1st real item
+ }
+ },
+
+ _showResultList: function(){
+ this._hideResultList();
+ this._arrowPressed();
+ // hide the tooltip
+ this.displayMessage("");
+
+ // Position the list and if it's too big to fit on the screen then
+ // size it to the maximum possible height
+ // Our dear friend IE doesnt take max-height so we need to
+ // calculate that on our own every time
+
+ // TODO: want to redo this, see
+ // http://trac.dojotoolkit.org/ticket/3272
+ // and
+ // http://trac.dojotoolkit.org/ticket/4108
+
+
+ // natural size of the list has changed, so erase old
+ // width/height settings, which were hardcoded in a previous
+ // call to this function (via dojo.marginBox() call)
+ dojo.style(this._popupWidget.domNode, {width: "", height: ""});
+
+ var best = this.open();
+ // #3212:
+ // only set auto scroll bars if necessary prevents issues with
+ // scroll bars appearing when they shouldn't when node is made
+ // wider (fractional pixels cause this)
+ var popupbox = dojo.marginBox(this._popupWidget.domNode);
+ this._popupWidget.domNode.style.overflow =
+ ((best.h == popupbox.h) && (best.w == popupbox.w)) ? "hidden" : "auto";
+ // #4134:
+ // borrow TextArea scrollbar test so content isn't covered by
+ // scrollbar and horizontal scrollbar doesn't appear
+ var newwidth = best.w;
+ if(best.h < this._popupWidget.domNode.scrollHeight){
+ newwidth += 16;
+ }
+ dojo.marginBox(this._popupWidget.domNode, {
+ h: best.h,
+ w: Math.max(newwidth, this.domNode.offsetWidth)
+ });
+
+ // If we increased the width of drop down to match the width of ComboBox.domNode,
+ // then need to reposition the drop down (wrapper) so (all of) the drop down still
+ // appears underneath the ComboBox.domNode
+ if(newwidth < this.domNode.offsetWidth){
+ this._popupWidget.domNode.parentNode.style.left = dojo.position(this.domNode).x + "px";
+ }
+
+ dijit.setWaiState(this.comboNode, "expanded", "true");
+ },
+
+ _hideResultList: function(){
+ this._abortQuery();
+ if(this._isShowingNow){
+ dijit.popup.close(this._popupWidget);
+ this._arrowIdle();
+ this._isShowingNow=false;
+ dijit.setWaiState(this.comboNode, "expanded", "false");
+ dijit.removeWaiState(this.focusNode,"activedescendant");
+ }
+ },
+
+ _setBlurValue: function(){
+ // if the user clicks away from the textbox OR tabs away, set the
+ // value to the textbox value
+ // #4617:
+ // if value is now more choices or previous choices, revert
+ // the value
+ var newvalue=this.attr('displayedValue');
+ var pw = this._popupWidget;
+ if(pw && (
+ newvalue == pw._messages["previousMessage"] ||
+ newvalue == pw._messages["nextMessage"]
+ )
+ ){
+ this._setValueAttr(this._lastValueReported, true);
+ }else if(typeof this.item == "undefined"){
+ // Update 'value' (ex: KY) according to currently displayed text
+ this.item = null;
+ this.attr('displayedValue', newvalue);
+ }else{
+ if(this.value != this._lastValueReported){
+ dijit.form._FormValueWidget.prototype._setValueAttr.call(this, this.value, true);
+ }
+ this._refreshState();
+ }
+ },
+
+ _onBlur: function(){
+ // summary:
+ // Called magically when focus has shifted away from this widget and it's drop down
+ this._hideResultList();
+ this._arrowIdle();
+ this.inherited(arguments);
+ },
+
+ _setItemAttr: function(/*item*/ item, /*Boolean?*/ priorityChange, /*String?*/ displayedValue){
+ // summary:
+ // Set the displayed valued in the input box, and the hidden value
+ // that gets submitted, based on a dojo.data store item.
+ // description:
+ // Users shouldn't call this function; they should be calling
+ // attr('item', value)
+ // tags:
+ // private
+ if(!displayedValue){ displayedValue = this.labelFunc(item, this.store); }
+ this.value = this._getValueField() != this.searchAttr? this.store.getIdentity(item) : displayedValue;
+ this.item = item;
+ dijit.form.ComboBox.superclass._setValueAttr.call(this, this.value, priorityChange, displayedValue);
+ },
+
+ _announceOption: function(/*Node*/ node){
+ // summary:
+ // a11y code that puts the highlighted option in the textbox.
+ // This way screen readers will know what is happening in the
+ // menu.
+
+ if(!node){
+ return;
+ }
+ // pull the text value from the item attached to the DOM node
+ var newValue;
+ if( node == this._popupWidget.nextButton ||
+ node == this._popupWidget.previousButton){
+ newValue = node.innerHTML;
+ this.item = undefined;
+ this.value = '';
+ }else{
+ newValue = this.labelFunc(node.item, this.store);
+ this.attr('item', node.item, false, newValue);
+ }
+ // get the text that the user manually entered (cut off autocompleted text)
+ this.focusNode.value = this.focusNode.value.substring(0, this._lastInput.length);
+ // set up ARIA activedescendant
+ dijit.setWaiState(this.focusNode, "activedescendant", dojo.attr(node, "id"));
+ // autocomplete the rest of the option to announce change
+ this._autoCompleteText(newValue);
+ },
+
+ _selectOption: function(/*Event*/ evt){
+ // summary:
+ // Menu callback function, called when an item in the menu is selected.
+ if(evt){
+ this._announceOption(evt.target);
+ }
+ this._hideResultList();
+ this._setCaretPos(this.focusNode, this.focusNode.value.length);
+ dijit.form._FormValueWidget.prototype._setValueAttr.call(this, this.value, true); // set this.value and fire onChange
+ },
+
+ _onArrowMouseDown: function(evt){
+ // summary:
+ // Callback when arrow is clicked
+ if(this.disabled || this.readOnly){
+ return;
+ }
+ dojo.stopEvent(evt);
+ this.focus();
+ if(this._isShowingNow){
+ this._hideResultList();
+ }else{
+ // forces full population of results, if they click
+ // on the arrow it means they want to see more options
+ this._startSearchAll();
+ }
+ },
+
+ _startSearchAll: function(){
+ this._startSearch('');
+ },
+
+ _startSearchFromInput: function(){
+ this._startSearch(this.focusNode.value.replace(/([\\\*\?])/g, "\\$1"));
+ },
+
+ _getQueryString: function(/*String*/ text){
+ return dojo.string.substitute(this.queryExpr, [text]);
+ },
+
+ _startSearch: function(/*String*/ key){
+ if(!this._popupWidget){
+ var popupId = this.id + "_popup";
+ this._popupWidget = new dijit.form._ComboBoxMenu({
+ onChange: dojo.hitch(this, this._selectOption),
+ id: popupId
+ });
+ dijit.removeWaiState(this.focusNode,"activedescendant");
+ dijit.setWaiState(this.textbox,"owns",popupId); // associate popup with textbox
+ }
+ // create a new query to prevent accidentally querying for a hidden
+ // value from FilteringSelect's keyField
+ var query = dojo.clone(this.query); // #5970
+ this._lastInput = key; // Store exactly what was entered by the user.
+ this._lastQuery = query[this.searchAttr] = this._getQueryString(key);
+ // #5970: set _lastQuery, *then* start the timeout
+ // otherwise, if the user types and the last query returns before the timeout,
+ // _lastQuery won't be set and their input gets rewritten
+ this.searchTimer=setTimeout(dojo.hitch(this, function(query, _this){
+ this.searchTimer = null;
+ var fetch = {
+ queryOptions: {
+ ignoreCase: this.ignoreCase,
+ deep: true
+ },
+ query: query,
+ onBegin: dojo.hitch(this, "_setMaxOptions"),
+ onComplete: dojo.hitch(this, "_openResultList"),
+ onError: function(errText){
+ _this._fetchHandle = null;
+ console.error('dijit.form.ComboBox: ' + errText);
+ dojo.hitch(_this, "_hideResultList")();
+ },
+ start: 0,
+ count: this.pageSize
+ };
+ dojo.mixin(fetch, _this.fetchProperties);
+ this._fetchHandle = _this.store.fetch(fetch);
+
+ var nextSearch = function(dataObject, direction){
+ dataObject.start += dataObject.count*direction;
+ // #4091:
+ // tell callback the direction of the paging so the screen
+ // reader knows which menu option to shout
+ dataObject.direction = direction;
+ this._fetchHandle = this.store.fetch(dataObject);
+ };
+ this._nextSearch = this._popupWidget.onPage = dojo.hitch(this, nextSearch, this._fetchHandle);
+ }, query, this), this.searchDelay);
+ },
+
+ _setMaxOptions: function(size, request){
+ this._maxOptions = size;
+ },
+
+ _getValueField: function(){
+ // summmary:
+ // Helper for postMixInProperties() to set this.value based on data inlined into the markup.
+ // Returns the attribute name in the item (in dijit.form._ComboBoxDataStore) to use as the value.
+ return this.searchAttr;
+ },
+
+ /////////////// Event handlers /////////////////////
+
+ _arrowPressed: function(){
+ if(!this.disabled && !this.readOnly && this.hasDownArrow){
+ dojo.addClass(this.downArrowNode, "dijitArrowButtonActive");
+ }
+ },
+
+ _arrowIdle: function(){
+ if(!this.disabled && !this.readOnly && this.hasDownArrow){
+ dojo.removeClass(this.downArrowNode, "dojoArrowButtonPushed");
+ }
+ },
+
+ // FIXME: For 2.0, rename to "_compositionEnd"
+ compositionend: function(/*Event*/ evt){
+ // summary:
+ // When inputting characters using an input method, such as
+ // Asian languages, it will generate this event instead of
+ // onKeyDown event.
+ // Note: this event is only triggered in FF (not in IE/safari)
+ // tags:
+ // private
+
+ // 229 is the code produced by IE and safari while pressing keys during
+ // IME input mode
+ this._onKeyPress({charOrCode: 229});
+ },
+
+ //////////// INITIALIZATION METHODS ///////////////////////////////////////
+
+ constructor: function(){
+ this.query={};
+ this.fetchProperties={};
+ },
+
+ postMixInProperties: function(){
+ if(!this.hasDownArrow){
+ this.baseClass = "dijitTextBox";
+ }
+ if(!this.store){
+ var srcNodeRef = this.srcNodeRef;
+
+ // if user didn't specify store, then assume there are option tags
+ this.store = new dijit.form._ComboBoxDataStore(srcNodeRef);
+
+ // if there is no value set and there is an option list, set
+ // the value to the first value to be consistent with native
+ // Select
+
+ // Firefox and Safari set value
+ // IE6 and Opera set selectedIndex, which is automatically set
+ // by the selected attribute of an option tag
+ // IE6 does not set value, Opera sets value = selectedIndex
+ if( !this.value || (
+ (typeof srcNodeRef.selectedIndex == "number") &&
+ srcNodeRef.selectedIndex.toString() === this.value)
+ ){
+ var item = this.store.fetchSelectedItem();
+ if(item){
+ var valueField = this._getValueField();
+ this.value = valueField != this.searchAttr? this.store.getValue(item, valueField) : this.labelFunc(item, this.store);
+ }
+ }
+ }
+ this.inherited(arguments);
+ },
+
+ postCreate: function(){
+ // summary:
+ // Subclasses must call this method from their postCreate() methods
+ // tags:
+ // protected
+
+ // find any associated label element and add to ComboBox node.
+ var label=dojo.query('label[for="'+this.id+'"]');
+ if(label.length){
+ label[0].id = (this.id+"_label");
+ var cn=this.comboNode;
+ dijit.setWaiState(cn, "labelledby", label[0].id);
+
+ }
+ this.inherited(arguments);
+ },
+
+ uninitialize: function(){
+ if(this._popupWidget && !this._popupWidget._destroyed){
+ this._hideResultList();
+ this._popupWidget.destroy();
+ }
+ this.inherited(arguments);
+ },
+
+ _getMenuLabelFromItem: function(/*Item*/ item){
+ var label = this.labelAttr? this.store.getValue(item, this.labelAttr) : this.labelFunc(item, this.store);
+ var labelType = this.labelType;
+ // If labelType is not "text" we don't want to screw any markup ot whatever.
+ if(this.highlightMatch != "none" && this.labelType == "text" && this._lastInput){
+ label = this.doHighlight(label, this._escapeHtml(this._lastInput));
+ labelType = "html";
+ }
+ return {html: labelType == "html", label: label};
+ },
+
+ doHighlight: function(/*String*/label, /*String*/find){
+ // summary:
+ // Highlights the string entered by the user in the menu. By default this
+ // highlights the first occurence found. Override this method
+ // to implement your custom highlighing.
+ // tags:
+ // protected
+
+ // Add greedy when this.highlightMatch == "all"
+ var modifiers = "i"+(this.highlightMatch == "all"?"g":"");
+ var escapedLabel = this._escapeHtml(label);
+ find = dojo.regexp.escapeString(find); // escape regexp special chars
+ var ret = escapedLabel.replace(new RegExp("(^|\\s)("+ find +")", modifiers),
+ '$1<span class="dijitComboBoxHighlightMatch">$2</span>');
+ return ret;// returns String, (almost) valid HTML (entities encoded)
+ },
+
+ _escapeHtml: function(/*string*/str){
+ // TODO Should become dojo.html.entities(), when exists use instead
+ // summary:
+ // Adds escape sequences for special characters in XML: &<>"'
+ str = String(str).replace(/&/gm, "&amp;").replace(/</gm, "&lt;")
+ .replace(/>/gm, "&gt;").replace(/"/gm, "&quot;");
+ return str; // string
+ },
+
+ open: function(){
+ // summary:
+ // Opens the drop down menu. TODO: rename to _open.
+ // tags:
+ // private
+ this._isShowingNow=true;
+ return dijit.popup.open({
+ popup: this._popupWidget,
+ around: this.domNode,
+ parent: this
+ });
+ },
+
+ reset: function(){
+ // Overrides the _FormWidget.reset().
+ // Additionally reset the .item (to clean up).
+ this.item = null;
+ this.inherited(arguments);
+ },
+
+ labelFunc: function(/*item*/ item, /*dojo.data.store*/ store){
+ // summary:
+ // Computes the label to display based on the dojo.data store item.
+ // returns:
+ // The label that the ComboBox should display
+ // tags:
+ // private
+
+ // Use toString() because XMLStore returns an XMLItem whereas this
+ // method is expected to return a String (#9354)
+ return store.getValue(item, this.searchAttr).toString(); // String
+ }
+ }
+);
+
+dojo.declare(
+ "dijit.form._ComboBoxMenu",
+ [dijit._Widget, dijit._Templated],
+ {
+ // summary:
+ // Focus-less menu for internal use in `dijit.form.ComboBox`
+ // tags:
+ // private
+
+ templateString: "<ul class='dijitReset dijitMenu' dojoAttachEvent='onmousedown:_onMouseDown,onmouseup:_onMouseUp,onmouseover:_onMouseOver,onmouseout:_onMouseOut' tabIndex='-1' style='overflow: \"auto\"; overflow-x: \"hidden\";'>"
+ +"<li class='dijitMenuItem dijitMenuPreviousButton' dojoAttachPoint='previousButton' waiRole='option'></li>"
+ +"<li class='dijitMenuItem dijitMenuNextButton' dojoAttachPoint='nextButton' waiRole='option'></li>"
+ +"</ul>",
+
+ // _messages: Object
+ // Holds "next" and "previous" text for paging buttons on drop down
+ _messages: null,
+
+ postMixInProperties: function(){
+ this._messages = dojo.i18n.getLocalization("dijit.form", "ComboBox", this.lang);
+ this.inherited(arguments);
+ },
+
+ _setValueAttr: function(/*Object*/ value){
+ this.value = value;
+ this.onChange(value);
+ },
+
+ // stubs
+ onChange: function(/*Object*/ value){
+ // summary:
+ // Notifies ComboBox/FilteringSelect that user clicked an option in the drop down menu.
+ // Probably should be called onSelect.
+ // tags:
+ // callback
+ },
+ onPage: function(/*Number*/ direction){
+ // summary:
+ // Notifies ComboBox/FilteringSelect that user clicked to advance to next/previous page.
+ // tags:
+ // callback
+ },
+
+ postCreate: function(){
+ // fill in template with i18n messages
+ this.previousButton.innerHTML = this._messages["previousMessage"];
+ this.nextButton.innerHTML = this._messages["nextMessage"];
+ this.inherited(arguments);
+ },
+
+ onClose: function(){
+ // summary:
+ // Callback from dijit.popup code to this widget, notifying it that it closed
+ // tags:
+ // private
+ this._blurOptionNode();
+ },
+
+ _createOption: function(/*Object*/ item, labelFunc){
+ // summary:
+ // Creates an option to appear on the popup menu subclassed by
+ // `dijit.form.FilteringSelect`.
+
+ var labelObject = labelFunc(item);
+ var menuitem = dojo.doc.createElement("li");
+ dijit.setWaiRole(menuitem, "option");
+ if(labelObject.html){
+ menuitem.innerHTML = labelObject.label;
+ }else{
+ menuitem.appendChild(
+ dojo.doc.createTextNode(labelObject.label)
+ );
+ }
+ // #3250: in blank options, assign a normal height
+ if(menuitem.innerHTML == ""){
+ menuitem.innerHTML = "&nbsp;";
+ }
+ menuitem.item=item;
+ return menuitem;
+ },
+
+ createOptions: function(results, dataObject, labelFunc){
+ // summary:
+ // Fills in the items in the drop down list
+ // results:
+ // Array of dojo.data items
+ // dataObject:
+ // dojo.data store
+ // labelFunc:
+ // Function to produce a label in the drop down list from a dojo.data item
+
+ //this._dataObject=dataObject;
+ //this._dataObject.onComplete=dojo.hitch(comboBox, comboBox._openResultList);
+ // display "Previous . . ." button
+ this.previousButton.style.display = (dataObject.start == 0) ? "none" : "";
+ dojo.attr(this.previousButton, "id", this.id + "_prev");
+ // create options using _createOption function defined by parent
+ // ComboBox (or FilteringSelect) class
+ // #2309:
+ // iterate over cache nondestructively
+ dojo.forEach(results, function(item, i){
+ var menuitem = this._createOption(item, labelFunc);
+ menuitem.className = "dijitReset dijitMenuItem";
+ dojo.attr(menuitem, "id", this.id + i);
+ this.domNode.insertBefore(menuitem, this.nextButton);
+ }, this);
+ // display "Next . . ." button
+ var displayMore = false;
+ //Try to determine if we should show 'more'...
+ if(dataObject._maxOptions && dataObject._maxOptions != -1){
+ if((dataObject.start + dataObject.count) < dataObject._maxOptions){
+ displayMore = true;
+ }else if((dataObject.start + dataObject.count) > (dataObject._maxOptions - 1)){
+ //Weird return from a datastore, where a start + count > maxOptions
+ // implies maxOptions isn't really valid and we have to go into faking it.
+ //And more or less assume more if count == results.length
+ if(dataObject.count == results.length){
+ displayMore = true;
+ }
+ }
+ }else if(dataObject.count == results.length){
+ //Don't know the size, so we do the best we can based off count alone.
+ //So, if we have an exact match to count, assume more.
+ displayMore = true;
+ }
+
+ this.nextButton.style.display = displayMore ? "" : "none";
+ dojo.attr(this.nextButton,"id", this.id + "_next");
+ return this.domNode.childNodes;
+ },
+
+ clearResultList: function(){
+ // summary:
+ // Clears the entries in the drop down list, but of course keeps the previous and next buttons.
+ while(this.domNode.childNodes.length>2){
+ this.domNode.removeChild(this.domNode.childNodes[this.domNode.childNodes.length-2]);
+ }
+ },
+
+ _onMouseDown: function(/*Event*/ evt){
+ dojo.stopEvent(evt);
+ },
+
+ _onMouseUp: function(/*Event*/ evt){
+ if(evt.target === this.domNode){
+ return;
+ }else if(evt.target == this.previousButton){
+ this.onPage(-1);
+ }else if(evt.target == this.nextButton){
+ this.onPage(1);
+ }else{
+ var tgt = evt.target;
+ // while the clicked node is inside the div
+ while(!tgt.item){
+ // recurse to the top
+ tgt = tgt.parentNode;
+ }
+ this._setValueAttr({ target: tgt }, true);
+ }
+ },
+
+ _onMouseOver: function(/*Event*/ evt){
+ if(evt.target === this.domNode){ return; }
+ var tgt = evt.target;
+ if(!(tgt == this.previousButton || tgt == this.nextButton)){
+ // while the clicked node is inside the div
+ while(!tgt.item){
+ // recurse to the top
+ tgt = tgt.parentNode;
+ }
+ }
+ this._focusOptionNode(tgt);
+ },
+
+ _onMouseOut: function(/*Event*/ evt){
+ if(evt.target === this.domNode){ return; }
+ this._blurOptionNode();
+ },
+
+ _focusOptionNode: function(/*DomNode*/ node){
+ // summary:
+ // Does the actual highlight.
+ if(this._highlighted_option != node){
+ this._blurOptionNode();
+ this._highlighted_option = node;
+ dojo.addClass(this._highlighted_option, "dijitMenuItemSelected");
+ }
+ },
+
+ _blurOptionNode: function(){
+ // summary:
+ // Removes highlight on highlighted option.
+ if(this._highlighted_option){
+ dojo.removeClass(this._highlighted_option, "dijitMenuItemSelected");
+ this._highlighted_option = null;
+ }
+ },
+
+ _highlightNextOption: function(){
+ // summary:
+ // Highlight the item just below the current selection.
+ // If nothing selected, highlight first option.
+
+ // because each press of a button clears the menu,
+ // the highlighted option sometimes becomes detached from the menu!
+ // test to see if the option has a parent to see if this is the case.
+ var fc = this.domNode.firstChild;
+ if(!this.getHighlightedOption()){
+ this._focusOptionNode(fc.style.display == "none" ? fc.nextSibling : fc);
+ }else{
+ var ns = this._highlighted_option.nextSibling;
+ if(ns && ns.style.display != "none"){
+ this._focusOptionNode(ns);
+ }
+ }
+ // scrollIntoView is called outside of _focusOptionNode because in IE putting it inside causes the menu to scroll up on mouseover
+ dijit.scrollIntoView(this._highlighted_option);
+ },
+
+ highlightFirstOption: function(){
+ // summary:
+ // Highlight the first real item in the list (not Previous Choices).
+ this._focusOptionNode(this.domNode.firstChild.nextSibling);
+ dijit.scrollIntoView(this._highlighted_option);
+ },
+
+ highlightLastOption: function(){
+ // summary:
+ // Highlight the last real item in the list (not More Choices).
+ this._focusOptionNode(this.domNode.lastChild.previousSibling);
+ dijit.scrollIntoView(this._highlighted_option);
+ },
+
+ _highlightPrevOption: function(){
+ // summary:
+ // Highlight the item just above the current selection.
+ // If nothing selected, highlight last option (if
+ // you select Previous and try to keep scrolling up the list).
+ var lc = this.domNode.lastChild;
+ if(!this.getHighlightedOption()){
+ this._focusOptionNode(lc.style.display == "none" ? lc.previousSibling : lc);
+ }else{
+ var ps = this._highlighted_option.previousSibling;
+ if(ps && ps.style.display != "none"){
+ this._focusOptionNode(ps);
+ }
+ }
+ dijit.scrollIntoView(this._highlighted_option);
+ },
+
+ _page: function(/*Boolean*/ up){
+ // summary:
+ // Handles page-up and page-down keypresses
+
+ var scrollamount = 0;
+ var oldscroll = this.domNode.scrollTop;
+ var height = dojo.style(this.domNode, "height");
+ // if no item is highlighted, highlight the first option
+ if(!this.getHighlightedOption()){
+ this._highlightNextOption();
+ }
+ while(scrollamount<height){
+ if(up){
+ // stop at option 1
+ if(!this.getHighlightedOption().previousSibling ||
+ this._highlighted_option.previousSibling.style.display == "none"){
+ break;
+ }
+ this._highlightPrevOption();
+ }else{
+ // stop at last option
+ if(!this.getHighlightedOption().nextSibling ||
+ this._highlighted_option.nextSibling.style.display == "none"){
+ break;
+ }
+ this._highlightNextOption();
+ }
+ // going backwards
+ var newscroll=this.domNode.scrollTop;
+ scrollamount+=(newscroll-oldscroll)*(up ? -1:1);
+ oldscroll=newscroll;
+ }
+ },
+
+ pageUp: function(){
+ // summary:
+ // Handles pageup keypress.
+ // TODO: just call _page directly from handleKey().
+ // tags:
+ // private
+ this._page(true);
+ },
+
+ pageDown: function(){
+ // summary:
+ // Handles pagedown keypress.
+ // TODO: just call _page directly from handleKey().
+ // tags:
+ // private
+ this._page(false);
+ },
+
+ getHighlightedOption: function(){
+ // summary:
+ // Returns the highlighted option.
+ var ho = this._highlighted_option;
+ return (ho && ho.parentNode) ? ho : null;
+ },
+
+ handleKey: function(key){
+ switch(key){
+ case dojo.keys.DOWN_ARROW:
+ this._highlightNextOption();
+ break;
+ case dojo.keys.PAGE_DOWN:
+ this.pageDown();
+ break;
+ case dojo.keys.UP_ARROW:
+ this._highlightPrevOption();
+ break;
+ case dojo.keys.PAGE_UP:
+ this.pageUp();
+ break;
+ }
+ }
+ }
+);
+
+dojo.declare(
+ "dijit.form.ComboBox",
+ [dijit.form.ValidationTextBox, dijit.form.ComboBoxMixin],
+ {
+ // summary:
+ // Auto-completing text box, and base class for dijit.form.FilteringSelect.
+ //
+ // description:
+ // The drop down box's values are populated from an class called
+ // a data provider, which returns a list of values based on the characters
+ // that the user has typed into the input box.
+ // If OPTION tags are used as the data provider via markup,
+ // then the OPTION tag's child text node is used as the widget value
+ // when selected. The OPTION tag's value attribute is ignored.
+ // To set the default value when using OPTION tags, specify the selected
+ // attribute on 1 of the child OPTION tags.
+ //
+ // Some of the options to the ComboBox are actually arguments to the data
+ // provider.
+
+ _setValueAttr: function(/*String*/ value, /*Boolean?*/ priorityChange, /*String?*/ displayedValue){
+ // summary:
+ // Hook so attr('value', value) works.
+ // description:
+ // Sets the value of the select.
+ this.item = null; // value not looked up in store
+ if(!value){ value = ''; } // null translates to blank
+ dijit.form.ValidationTextBox.prototype._setValueAttr.call(this, value, priorityChange, displayedValue);
+ }
+ }
+);
+
+dojo.declare("dijit.form._ComboBoxDataStore", null, {
+ // summary:
+ // Inefficient but small data store specialized for inlined `dijit.form.ComboBox` data
+ //
+ // description:
+ // Provides a store for inlined data like:
+ //
+ // | <select>
+ // | <option value="AL">Alabama</option>
+ // | ...
+ //
+ // Actually. just implements the subset of dojo.data.Read/Notification
+ // needed for ComboBox and FilteringSelect to work.
+ //
+ // Note that an item is just a pointer to the <option> DomNode.
+
+ constructor: function( /*DomNode*/ root){
+ this.root = root;
+
+ dojo.query("> option", root).forEach(function(node){
+ // TODO: this was added in #3858 but unclear why/if it's needed; doesn't seem to be.
+ // If it is needed then can we just hide the select itself instead?
+ //node.style.display="none";
+ node.innerHTML = dojo.trim(node.innerHTML);
+ });
+
+ },
+
+ getValue: function( /* item */ item,
+ /* attribute-name-string */ attribute,
+ /* value? */ defaultValue){
+ return (attribute == "value") ? item.value : (item.innerText || item.textContent || '');
+ },
+
+ isItemLoaded: function(/* anything */ something){
+ return true;
+ },
+
+ getFeatures: function(){
+ return {"dojo.data.api.Read": true, "dojo.data.api.Identity": true};
+ },
+
+ _fetchItems: function( /* Object */ args,
+ /* Function */ findCallback,
+ /* Function */ errorCallback){
+ // summary:
+ // See dojo.data.util.simpleFetch.fetch()
+ if(!args.query){ args.query = {}; }
+ if(!args.query.name){ args.query.name = ""; }
+ if(!args.queryOptions){ args.queryOptions = {}; }
+ var matcher = dojo.data.util.filter.patternToRegExp(args.query.name, args.queryOptions.ignoreCase),
+ items = dojo.query("> option", this.root).filter(function(option){
+ return (option.innerText || option.textContent || '').match(matcher);
+ } );
+ if(args.sort){
+ items.sort(dojo.data.util.sorter.createSortFunction(args.sort, this));
+ }
+ findCallback(items, args);
+ },
+
+ close: function(/*dojo.data.api.Request || args || null */ request){
+ return;
+ },
+
+ getLabel: function(/* item */ item){
+ return item.innerHTML;
+ },
+
+ getIdentity: function(/* item */ item){
+ return dojo.attr(item, "value");
+ },
+
+ fetchItemByIdentity: function(/* Object */ args){
+ // summary:
+ // Given the identity of an item, this method returns the item that has
+ // that identity through the onItem callback.
+ // Refer to dojo.data.api.Identity.fetchItemByIdentity() for more details.
+ //
+ // description:
+ // Given arguments like:
+ //
+ // | {identity: "CA", onItem: function(item){...}
+ //
+ // Call `onItem()` with the DOM node `<option value="CA">California</option>`
+ var item = dojo.query("option[value='" + args.identity + "']", this.root)[0];
+ args.onItem(item);
+ },
+
+ fetchSelectedItem: function(){
+ // summary:
+ // Get the option marked as selected, like `<option selected>`.
+ // Not part of dojo.data API.
+ var root = this.root,
+ si = root.selectedIndex;
+ return dojo.query("> option:nth-child(" +
+ (si != -1 ? si+1 : 1) + ")",
+ root)[0]; // dojo.data.Item
+ }
+});
+//Mix in the simple fetch implementation to this class.
+dojo.extend(dijit.form._ComboBoxDataStore,dojo.data.util.simpleFetch);
+
+}
+
+if(!dojo._hasResource["dijit.form.FilteringSelect"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form.FilteringSelect"] = true;
+dojo.provide("dijit.form.FilteringSelect");
+
+
+
+dojo.declare(
+ "dijit.form.FilteringSelect",
+ [dijit.form.MappedTextBox, dijit.form.ComboBoxMixin],
+ {
+ // summary:
+ // An enhanced version of the HTML SELECT tag, populated dynamically
+ //
+ // description:
+ // An enhanced version of the HTML SELECT tag, populated dynamically. It works
+ // very nicely with very large data sets because it can load and page data as needed.
+ // It also resembles ComboBox, but does not allow values outside of the provided ones.
+ // If OPTION tags are used as the data provider via markup, then the
+ // OPTION tag's child text node is used as the displayed value when selected
+ // while the OPTION tag's value attribute is used as the widget value on form submit.
+ // To set the default value when using OPTION tags, specify the selected
+ // attribute on 1 of the child OPTION tags.
+ //
+ // Similar features:
+ // - There is a drop down list of possible values.
+ // - You can only enter a value from the drop down list. (You can't
+ // enter an arbitrary value.)
+ // - The value submitted with the form is the hidden value (ex: CA),
+ // not the displayed value a.k.a. label (ex: California)
+ //
+ // Enhancements over plain HTML version:
+ // - If you type in some text then it will filter down the list of
+ // possible values in the drop down list.
+ // - List can be specified either as a static list or via a javascript
+ // function (that can get the list from a server)
+
+ _isvalid: true,
+
+ // required: Boolean
+ // True (default) if user is required to enter a value into this field.
+ required: true,
+
+ _lastDisplayedValue: "",
+
+ isValid: function(){
+ // Overrides ValidationTextBox.isValid()
+ return this._isvalid || (!this.required && this.attr('displayedValue') == ""); // #5974
+ },
+
+ _callbackSetLabel: function( /*Array*/ result,
+ /*Object*/ dataObject,
+ /*Boolean?*/ priorityChange){
+ // summary:
+ // Callback function that dynamically sets the label of the
+ // ComboBox
+
+ // setValue does a synchronous lookup,
+ // so it calls _callbackSetLabel directly,
+ // and so does not pass dataObject
+ // still need to test against _lastQuery in case it came too late
+ if((dataObject && dataObject.query[this.searchAttr] != this._lastQuery) || (!dataObject && result.length && this.store.getIdentity(result[0]) != this._lastQuery)){
+ return;
+ }
+ if(!result.length){
+ //#3268: do nothing on bad input
+ //#3285: change CSS to indicate error
+ this.valueNode.value = "";
+ dijit.form.TextBox.superclass._setValueAttr.call(this, "", priorityChange || (priorityChange === undefined && !this._focused));
+ this._isvalid = false;
+ this.validate(this._focused);
+ this.item = null;
+ }else{
+ this.attr('item', result[0], priorityChange);
+ }
+ },
+
+ _openResultList: function(/*Object*/ results, /*Object*/ dataObject){
+ // Overrides ComboBox._openResultList()
+
+ // #3285: tap into search callback to see if user's query resembles a match
+ if(dataObject.query[this.searchAttr] != this._lastQuery){
+ return;
+ }
+ this._isvalid = results.length != 0; // FIXME: should this be greater-than?
+ this.validate(true);
+ dijit.form.ComboBoxMixin.prototype._openResultList.apply(this, arguments);
+ },
+
+ _getValueAttr: function(){
+ // summary:
+ // Hook for attr('value') to work.
+
+ // don't get the textbox value but rather the previously set hidden value.
+ // Use this.valueNode.value which isn't always set for other MappedTextBox widgets until blur
+ return this.valueNode.value;
+ },
+
+ _getValueField: function(){
+ // Overrides ComboBox._getValueField()
+ return "value";
+ },
+
+ _setValueAttr: function(/*String*/ value, /*Boolean?*/ priorityChange){
+ // summary:
+ // Hook so attr('value', value) works.
+ // description:
+ // Sets the value of the select.
+ // Also sets the label to the corresponding value by reverse lookup.
+ if(!this._onChangeActive){ priorityChange = null; }
+ this._lastQuery = value;
+
+ if(value === null || value === ''){
+ this._setDisplayedValueAttr('', priorityChange);
+ return;
+ }
+
+ //#3347: fetchItemByIdentity if no keyAttr specified
+ var self = this;
+ this.store.fetchItemByIdentity({
+ identity: value,
+ onItem: function(item){
+ self._callbackSetLabel([item], undefined, priorityChange);
+ }
+ });
+ },
+
+ _setItemAttr: function(/*item*/ item, /*Boolean?*/ priorityChange, /*String?*/ displayedValue){
+ // summary:
+ // Set the displayed valued in the input box, and the hidden value
+ // that gets submitted, based on a dojo.data store item.
+ // description:
+ // Users shouldn't call this function; they should be calling
+ // attr('item', value)
+ // tags:
+ // private
+ this._isvalid = true;
+ this.inherited(arguments);
+ this.valueNode.value = this.value;
+ this._lastDisplayedValue = this.textbox.value;
+ },
+
+ _getDisplayQueryString: function(/*String*/ text){
+ return text.replace(/([\\\*\?])/g, "\\$1");
+ },
+
+ _setDisplayedValueAttr: function(/*String*/ label, /*Boolean?*/ priorityChange){
+ // summary:
+ // Hook so attr('displayedValue', label) works.
+ // description:
+ // Sets textbox to display label. Also performs reverse lookup
+ // to set the hidden value.
+
+ // When this is called during initialization it'll ping the datastore
+ // for reverse lookup, and when that completes (after an XHR request)
+ // will call setValueAttr()... but that shouldn't trigger an onChange()
+ // event, even when it happens after creation has finished
+ if(!this._created){
+ priorityChange = false;
+ }
+
+ if(this.store){
+ this._hideResultList();
+ var query = dojo.clone(this.query); // #6196: populate query with user-specifics
+ // escape meta characters of dojo.data.util.filter.patternToRegExp().
+ this._lastQuery = query[this.searchAttr] = this._getDisplayQueryString(label);
+ // if the label is not valid, the callback will never set it,
+ // so the last valid value will get the warning textbox set the
+ // textbox value now so that the impending warning will make
+ // sense to the user
+ this.textbox.value = label;
+ this._lastDisplayedValue = label;
+ var _this = this;
+ var fetch = {
+ query: query,
+ queryOptions: {
+ ignoreCase: this.ignoreCase,
+ deep: true
+ },
+ onComplete: function(result, dataObject){
+ _this._fetchHandle = null;
+ dojo.hitch(_this, "_callbackSetLabel")(result, dataObject, priorityChange);
+ },
+ onError: function(errText){
+ _this._fetchHandle = null;
+ console.error('dijit.form.FilteringSelect: ' + errText);
+ dojo.hitch(_this, "_callbackSetLabel")([], undefined, false);
+ }
+ };
+ dojo.mixin(fetch, this.fetchProperties);
+ this._fetchHandle = this.store.fetch(fetch);
+ }
+ },
+
+ postMixInProperties: function(){
+ this.inherited(arguments);
+ this._isvalid = !this.required;
+ },
+
+ undo: function(){
+ this.attr('displayedValue', this._lastDisplayedValue);
+ }
+ }
+);
+
+}
+
+if(!dojo._hasResource["dijit.form.MultiSelect"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form.MultiSelect"] = true;
+dojo.provide("dijit.form.MultiSelect");
+
+
+
+dojo.declare("dijit.form.MultiSelect", dijit.form._FormValueWidget, {
+ // summary:
+ // Widget version of a <select multiple=true> element,
+ // for selecting multiple options.
+
+ // size: Number
+ // Number of elements to display on a page
+ // NOTE: may be removed in version 2.0, since elements may have variable height;
+ // set the size via style="..." or CSS class names instead.
+ size: 7,
+
+ templateString: "<select multiple='true' ${nameAttrSetting} dojoAttachPoint='containerNode,focusNode' dojoAttachEvent='onchange: _onChange'></select>",
+
+ attributeMap: dojo.delegate(dijit.form._FormWidget.prototype.attributeMap, {
+ size: "focusNode"
+ }),
+
+ reset: function(){
+ // summary:
+ // Reset the widget's value to what it was at initialization time
+
+ // TODO: once we inherit from FormValueWidget this won't be needed
+ this._hasBeenBlurred = false;
+ this._setValueAttr(this._resetValue, true);
+ },
+
+ addSelected: function(/* dijit.form.MultiSelect */ select){
+ // summary:
+ // Move the selected nodes of a passed Select widget
+ // instance to this Select widget.
+ //
+ // example:
+ // | // move all the selected values from "bar" to "foo"
+ // | dijit.byId("foo").addSelected(dijit.byId("bar"));
+
+ select.getSelected().forEach(function(n){
+ this.containerNode.appendChild(n);
+ // scroll to bottom to see item
+ // cannot use scrollIntoView since <option> tags don't support all attributes
+ // does not work on IE due to a bug where <select> always shows scrollTop = 0
+ this.domNode.scrollTop = this.domNode.offsetHeight; // overshoot will be ignored
+ // scrolling the source select is trickier esp. on safari who forgets to change the scrollbar size
+ var oldscroll = select.domNode.scrollTop;
+ select.domNode.scrollTop = 0;
+ select.domNode.scrollTop = oldscroll;
+ },this);
+ },
+
+ getSelected: function(){
+ // summary:
+ // Access the NodeList of the selected options directly
+ return dojo.query("option",this.containerNode).filter(function(n){
+ return n.selected; // Boolean
+ }); // dojo.NodeList
+ },
+
+ _getValueAttr: function(){
+ // summary:
+ // Hook so attr('value') works.
+ // description:
+ // Returns an array of the selected options' values.
+ return this.getSelected().map(function(n){
+ return n.value;
+ });
+ },
+
+ multiple: true, // for Form
+
+ _setValueAttr: function(/* Array */values){
+ // summary:
+ // Hook so attr('value', values) works.
+ // description:
+ // Set the value(s) of this Select based on passed values
+ dojo.query("option",this.containerNode).forEach(function(n){
+ n.selected = (dojo.indexOf(values,n.value) != -1);
+ });
+ },
+
+ invertSelection: function(onChange){
+ // summary:
+ // Invert the selection
+ // onChange: Boolean
+ // If null, onChange is not fired.
+ dojo.query("option",this.containerNode).forEach(function(n){
+ n.selected = !n.selected;
+ });
+ this._handleOnChange(this.attr('value'), onChange == true);
+ },
+
+ _onChange: function(/*Event*/ e){
+ this._handleOnChange(this.attr('value'), true);
+ },
+
+ // for layout widgets:
+ resize: function(/* Object */size){
+ if(size){
+ dojo.marginBox(this.domNode, size);
+ }
+ },
+
+ postCreate: function(){
+ this._onChange();
+ }
+});
+
+}
+
+if(!dojo._hasResource["dijit.form.HorizontalSlider"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form.HorizontalSlider"] = true;
+dojo.provide("dijit.form.HorizontalSlider");
+
dojo.declare(
"dijit.form.HorizontalSlider",
- [dijit.form._FormWidget, dijit._Container],
+ [dijit.form._FormValueWidget, dijit._Container],
{
- // summary
- // A form widget that allows one to select a value with a horizontally draggable image
-
- templateString:"<table class=\"dijit dijitReset dijitSlider\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\"\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t\t><td dojoAttachPoint=\"containerNode,topDecoration\" class=\"dijitReset\" style=\"text-align:center;width:100%;\"></td\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitHorizontalSliderButtonContainer\"\n\t\t\t><div class=\"dijitHorizontalSliderDecrementIcon\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"decrementButton\" dojoAttachEvent=\"onclick: decrement\"><span class=\"dijitSliderButtonInner\">-</span></div\n\t\t></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><div class=\"dijitSliderBar dijitSliderBumper dijitHorizontalSliderBumper dijitSliderLeftBumper dijitHorizontalSliderLeftBumper\"></div\n\t\t></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><input dojoAttachPoint=\"valueNode\" type=\"hidden\" name=\"${name}\"\n\t\t\t/><div style=\"position:relative;\" dojoAttachPoint=\"sliderBarContainer\"\n\t\t\t\t><div dojoAttachPoint=\"progressBar\" class=\"dijitSliderBar dijitHorizontalSliderBar dijitSliderProgressBar dijitHorizontalSliderProgressBar\" dojoAttachEvent=\"onclick:_onBarClick\"\n\t\t\t\t\t><div dojoAttachPoint=\"sliderHandle,focusNode\" class=\"dijitSliderMoveable dijitHorizontalSliderMoveable\" dojoAttachEvent=\"onkeypress:_onKeyPress,onclick:_onHandleClick\" waiRole=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"\n\t\t\t\t\t\t><div class=\"dijitSliderImageHandle dijitHorizontalSliderImageHandle\"></div\n\t\t\t\t\t></div\n\t\t\t\t></div\n\t\t\t\t><div dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitHorizontalSliderBar dijitSliderRemainingBar dijitHorizontalSliderRemainingBar\" dojoAttachEvent=\"onclick:_onBarClick\"></div\n\t\t\t></div\n\t\t></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><div class=\"dijitSliderBar dijitSliderBumper dijitHorizontalSliderBumper dijitSliderRightBumper dijitHorizontalSliderRightBumper\"></div\n\t\t></td\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitHorizontalSliderButtonContainer\" style=\"right:0px;\"\n\t\t\t><div class=\"dijitHorizontalSliderIncrementIcon\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"incrementButton\" dojoAttachEvent=\"onclick: increment\"><span class=\"dijitSliderButtonInner\">+</span></div\n\t\t></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t\t><td dojoAttachPoint=\"containerNode,bottomDecoration\" class=\"dijitReset\" style=\"text-align:center;\"></td\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t></tr\n></table>\n",
+ // summary:
+ // A form widget that allows one to select a value with a horizontally draggable handle
+
+ templateString: dojo.cache("dijit.form", "templates/HorizontalSlider.html", "<table class=\"dijit dijitReset dijitSlider\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\" dojoAttachEvent=\"onkeypress:_onKeyPress,onkeyup:_onKeyUp\"\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t\t><td dojoAttachPoint=\"topDecoration\" class=\"dijitReset\" style=\"text-align:center;width:100%;\"></td\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH\"\n\t\t\t><div class=\"dijitSliderDecrementIconH\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"decrementButton\"><span class=\"dijitSliderButtonInner\">-</span></div\n\t\t></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderLeftBumper dijitSliderLeftBumper\" dojoAttachEvent=\"onmousedown:_onClkDecBumper\"></div\n\t\t></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><input dojoAttachPoint=\"valueNode\" type=\"hidden\" ${nameAttrSetting}\n\t\t\t/><div class=\"dijitReset dijitSliderBarContainerH\" waiRole=\"presentation\" dojoAttachPoint=\"sliderBarContainer\"\n\t\t\t\t><div waiRole=\"presentation\" dojoAttachPoint=\"progressBar\" class=\"dijitSliderBar dijitSliderBarH dijitSliderProgressBar dijitSliderProgressBarH\" dojoAttachEvent=\"onmousedown:_onBarClick\"\n\t\t\t\t\t><div class=\"dijitSliderMoveable dijitSliderMoveableH\"\n\t\t\t\t\t\t><div dojoAttachPoint=\"sliderHandle,focusNode\" class=\"dijitSliderImageHandle dijitSliderImageHandleH\" dojoAttachEvent=\"onmousedown:_onHandleClick\" waiRole=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"></div\n\t\t\t\t\t></div\n\t\t\t\t></div\n\t\t\t\t><div waiRole=\"presentation\" dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitSliderBarH dijitSliderRemainingBar dijitSliderRemainingBarH\" dojoAttachEvent=\"onmousedown:_onBarClick\"></div\n\t\t\t></div\n\t\t></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderRightBumper dijitSliderRightBumper\" dojoAttachEvent=\"onmousedown:_onClkIncBumper\"></div\n\t\t></td\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH\" style=\"right:0px;\"\n\t\t\t><div class=\"dijitSliderIncrementIconH\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"incrementButton\"><span class=\"dijitSliderButtonInner\">+</span></div\n\t\t></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t\t><td dojoAttachPoint=\"containerNode,bottomDecoration\" class=\"dijitReset\" style=\"text-align:center;\"></td\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t></tr\n></table>\n"),
+
+ // Overrides FormValueWidget.value to indicate numeric value
value: 0,
- // showButtons: boolean
- // Show increment/decrement buttons at the ends of the slider?
+ // showButtons: Boolean
+ // Show increment/decrement buttons at the ends of the slider?
showButtons: true,
- // minimum:: integer
- // The minimum value allowed.
+ // minimum:: Integer
+ // The minimum value the slider can be set to.
minimum: 0,
- // maximum: integer
- // The maximum allowed value.
+ // maximum: Integer
+ // The maximum value the slider can be set to.
maximum: 100,
- // discreteValues: integer
- // The maximum allowed values dispersed evenly between minimum and maximum (inclusive).
+ // discreteValues: Integer
+ // If specified, indicates that the slider handle has only 'discreteValues' possible positions,
+ // and that after dragging the handle, it will snap to the nearest possible position.
+ // Thus, the slider has only 'discreteValues' possible values.
+ //
+ // For example, if minimum=10, maxiumum=30, and discreteValues=3, then the slider handle has
+ // three possible positions, representing values 10, 20, or 30.
+ //
+ // If discreteValues is not specified or if it's value is higher than the number of pixels
+ // in the slider bar, then the slider handle can be moved freely, and the slider's value will be
+ // computed/reported based on pixel position (in this case it will likely be fractional,
+ // such as 123.456789).
discreteValues: Infinity,
- // pageIncrement: integer
- // The amount of change with shift+arrow
+ // pageIncrement: Integer
+ // If discreteValues is also specified, this indicates the amount of clicks (ie, snap positions)
+ // that the slider handle is moved via pageup/pagedown keys.
+ // If discreteValues is not specified, it indicates the number of pixels.
pageIncrement: 2,
- // clickSelect: boolean
- // If clicking the progress bar changes the value or not
+ // clickSelect: Boolean
+ // If clicking the slider bar changes the value or not
clickSelect: true,
+ // slideDuration: Number
+ // The time in ms to take to animate the slider handle from 0% to 100%,
+ // when clicking the slider bar to make the handle move.
+ slideDuration: dijit.defaultDuration,
+
+ // Flag to _Templated
widgetsInTemplate: true,
- attributeMap: dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),
- {id:"", name:"valueNode"}),
+ attributeMap: dojo.delegate(dijit.form._FormWidget.prototype.attributeMap, {
+ id: ""
+ }),
baseClass: "dijitSlider",
_mousePixelCoord: "pageX",
_pixelCount: "w",
_startingPixelCoord: "x",
_startingPixelCount: "l",
_handleOffsetCoord: "left",
_progressPixelSize: "width",
- _upsideDown: false,
+
+ _onKeyUp: function(/*Event*/ e){
+ if(this.disabled || this.readOnly || e.altKey || e.ctrlKey || e.metaKey){ return; }
+ this._setValueAttr(this.value, true);
+ },
_onKeyPress: function(/*Event*/ e){
- if(this.disabled || e.altKey || e.ctrlKey){ return; }
- switch(e.keyCode){
+ if(this.disabled || this.readOnly || e.altKey || e.ctrlKey || e.metaKey){ return; }
+ switch(e.charOrCode){
case dojo.keys.HOME:
- this.setValue(this.minimum, false);
+ this._setValueAttr(this.minimum, false);
break;
case dojo.keys.END:
- this.setValue(this.maximum, false);
- break;
- case dojo.keys.UP_ARROW:
- case (this._isReversed() ? dojo.keys.LEFT_ARROW : dojo.keys.RIGHT_ARROW):
- case dojo.keys.PAGE_UP:
+ this._setValueAttr(this.maximum, false);
+ break;
+ // this._descending === false: if ascending vertical (min on top)
+ // (this._descending || this.isLeftToRight()): if left-to-right horizontal or descending vertical
+ case ((this._descending || this.isLeftToRight()) ? dojo.keys.RIGHT_ARROW : dojo.keys.LEFT_ARROW):
+ case (this._descending === false ? dojo.keys.DOWN_ARROW : dojo.keys.UP_ARROW):
+ case (this._descending === false ? dojo.keys.PAGE_DOWN : dojo.keys.PAGE_UP):
this.increment(e);
break;
- case dojo.keys.DOWN_ARROW:
- case (this._isReversed() ? dojo.keys.RIGHT_ARROW : dojo.keys.LEFT_ARROW):
- case dojo.keys.PAGE_DOWN:
+ case ((this._descending || this.isLeftToRight()) ? dojo.keys.LEFT_ARROW : dojo.keys.RIGHT_ARROW):
+ case (this._descending === false ? dojo.keys.UP_ARROW : dojo.keys.DOWN_ARROW):
+ case (this._descending === false ? dojo.keys.PAGE_UP : dojo.keys.PAGE_DOWN):
this.decrement(e);
break;
default:
- this.inherited("_onKeyPress", arguments);
return;
}
dojo.stopEvent(e);
},
_onHandleClick: function(e){
- if(this.disabled){ return; }
+ if(this.disabled || this.readOnly){ return; }
if(!dojo.isIE){
// make sure you get focus when dragging the handle
// (but don't do on IE because it causes a flicker on mouse up (due to blur then focus)
dijit.focus(this.sliderHandle);
}
dojo.stopEvent(e);
},
-
- _isReversed: function() {
- return !(this._upsideDown || this.isLeftToRight());
+
+ _isReversed: function(){
+ // summary:
+ // Returns true if direction is from right to left
+ // tags:
+ // protected extension
+ return !this.isLeftToRight();
},
_onBarClick: function(e){
- if(this.disabled || !this.clickSelect){ return; }
+ if(this.disabled || this.readOnly || !this.clickSelect){ return; }
dijit.focus(this.sliderHandle);
dojo.stopEvent(e);
- var abspos = dojo.coords(this.sliderBarContainer, true);
+ var abspos = dojo.position(this.sliderBarContainer, true);
var pixelValue = e[this._mousePixelCoord] - abspos[this._startingPixelCoord];
- this._setPixelValue(this._isReversed() || this._upsideDown ? (abspos[this._pixelCount] - pixelValue) : pixelValue, abspos[this._pixelCount], true);
+ this._setPixelValue(this._isReversed() ? (abspos[this._pixelCount] - pixelValue) : pixelValue, abspos[this._pixelCount], true);
+ this._movable.onMouseDown(e);
},
_setPixelValue: function(/*Number*/ pixelValue, /*Number*/ maxPixels, /*Boolean, optional*/ priorityChange){
- if(this.disabled){ return; }
+ if(this.disabled || this.readOnly){ return; }
pixelValue = pixelValue < 0 ? 0 : maxPixels < pixelValue ? maxPixels : pixelValue;
var count = this.discreteValues;
if(count <= 1 || count == Infinity){ count = maxPixels; }
count--;
var pixelsPerValue = maxPixels / count;
var wholeIncrements = Math.round(pixelValue / pixelsPerValue);
- this.setValue((this.maximum-this.minimum)*wholeIncrements/count + this.minimum, priorityChange);
- },
-
- setValue: function(/*Number*/ value, /*Boolean, optional*/ priorityChange){
+ this._setValueAttr((this.maximum-this.minimum)*wholeIncrements/count + this.minimum, priorityChange);
+ },
+
+ _setValueAttr: function(/*Number*/ value, /*Boolean, optional*/ priorityChange){
+ // summary:
+ // Hook so attr('value', value) works.
this.valueNode.value = this.value = value;
- this.inherited('setValue', arguments);
+ dijit.setWaiState(this.focusNode, "valuenow", value);
+ this.inherited(arguments);
var percent = (value - this.minimum) / (this.maximum - this.minimum);
- this.progressBar.style[this._progressPixelSize] = (percent*100) + "%";
- this.remainingBar.style[this._progressPixelSize] = ((1-percent)*100) + "%";
- },
-
- _bumpValue: function(signedChange){
- if(this.disabled){ return; }
+ var progressBar = (this._descending === false) ? this.remainingBar : this.progressBar;
+ var remainingBar = (this._descending === false) ? this.progressBar : this.remainingBar;
+ if(this._inProgressAnim && this._inProgressAnim.status != "stopped"){
+ this._inProgressAnim.stop(true);
+ }
+ if(priorityChange && this.slideDuration > 0 && progressBar.style[this._progressPixelSize]){
+ // animate the slider
+ var _this = this;
+ var props = {};
+ var start = parseFloat(progressBar.style[this._progressPixelSize]);
+ var duration = this.slideDuration * (percent-start/100);
+ if(duration == 0){ return; }
+ if(duration < 0){ duration = 0 - duration; }
+ props[this._progressPixelSize] = { start: start, end: percent*100, units:"%" };
+ this._inProgressAnim = dojo.animateProperty({ node: progressBar, duration: duration,
+ onAnimate: function(v){ remainingBar.style[_this._progressPixelSize] = (100-parseFloat(v[_this._progressPixelSize])) + "%"; },
+ onEnd: function(){ delete _this._inProgressAnim; },
+ properties: props
+ })
+ this._inProgressAnim.play();
+ }
+ else{
+ progressBar.style[this._progressPixelSize] = (percent*100) + "%";
+ remainingBar.style[this._progressPixelSize] = ((1-percent)*100) + "%";
+ }
+ },
+
+ _bumpValue: function(signedChange, /*Boolean, optional*/ priorityChange){
+ if(this.disabled || this.readOnly){ return; }
var s = dojo.getComputedStyle(this.sliderBarContainer);
var c = dojo._getContentBox(this.sliderBarContainer, s);
var count = this.discreteValues;
if(count <= 1 || count == Infinity){ count = c[this._pixelCount]; }
count--;
var value = (this.value - this.minimum) * count / (this.maximum - this.minimum) + signedChange;
if(value < 0){ value = 0; }
if(value > count){ value = count; }
value = value * (this.maximum - this.minimum) / count + this.minimum;
- this.setValue(value, true);
- },
-
- decrement: function(e){
- // summary
- // decrement slider by 1 unit
- this._bumpValue(e.keyCode == dojo.keys.PAGE_DOWN?-this.pageIncrement:-1);
- },
-
- increment: function(e){
- // summary
- // increment slider by 1 unit
- this._bumpValue(e.keyCode == dojo.keys.PAGE_UP?this.pageIncrement:1);
+ this._setValueAttr(value, priorityChange);
+ },
+
+ _onClkBumper: function(val){
+ if(this.disabled || this.readOnly || !this.clickSelect){ return; }
+ this._setValueAttr(val, true);
+ },
+
+ _onClkIncBumper: function(){
+ this._onClkBumper(this._descending === false ? this.minimum : this.maximum);
+ },
+
+ _onClkDecBumper: function(){
+ this._onClkBumper(this._descending === false ? this.maximum : this.minimum);
+ },
+
+ decrement: function(/*Event*/ e){
+ // summary:
+ // Decrement slider
+ // tags:
+ // private
+ this._bumpValue(e.charOrCode == dojo.keys.PAGE_DOWN ? -this.pageIncrement : -1);
+ },
+
+ increment: function(/*Event*/ e){
+ // summary:
+ // Increment slider
+ // tags:
+ // private
+ this._bumpValue(e.charOrCode == dojo.keys.PAGE_UP ? this.pageIncrement : 1);
},
_mouseWheeled: function(/*Event*/ evt){
+ // summary:
+ // Event handler for mousewheel where supported
dojo.stopEvent(evt);
- var scrollAmount = 0;
- if(typeof evt.wheelDelta == 'number'){ // IE
- scrollAmount = evt.wheelDelta;
- }else if(typeof evt.detail == 'number'){ // Mozilla+Firefox
- scrollAmount = -evt.detail;
- }
- if(scrollAmount > 0){
- this.increment(evt);
- }else if(scrollAmount < 0){
- this.decrement(evt);
- }
+ var janky = !dojo.isMozilla;
+ var scroll = evt[(janky ? "wheelDelta" : "detail")] * (janky ? 1 : -1);
+ this._bumpValue(scroll < 0 ? -1 : 1, true); // negative scroll acts like a decrement
},
startup: function(){
dojo.forEach(this.getChildren(), function(child){
if(this[child.container] != this.containerNode){
this[child.container].appendChild(child.domNode);
}
}, this);
},
- _onBlur: function(){
- dijit.form.HorizontalSlider.superclass.setValue.call(this, this.value, true);
+ _typematicCallback: function(/*Number*/ count, /*Object*/ button, /*Event*/ e){
+ if(count == -1){
+ this._setValueAttr(this.value, true);
+ }else{
+ this[(button == (this._descending? this.incrementButton : this.decrementButton)) ? "decrement" : "increment"](e);
+ }
},
postCreate: function(){
if(this.showButtons){
this.incrementButton.style.display="";
this.decrementButton.style.display="";
- }
- this.connect(this.domNode, dojo.isIE ? "onmousewheel" : 'DOMMouseScroll', "_mouseWheeled");
+ this._connects.push(dijit.typematic.addMouseListener(
+ this.decrementButton, this, "_typematicCallback", 25, 500));
+ this._connects.push(dijit.typematic.addMouseListener(
+ this.incrementButton, this, "_typematicCallback", 25, 500));
+ }
+ this.connect(this.domNode, !dojo.isMozilla ? "onmousewheel" : "DOMMouseScroll", "_mouseWheeled");
// define a custom constructor for a SliderMover that points back to me
- var _self = this;
- var mover = function(){
- dijit.form._SliderMover.apply(this, arguments);
- this.widget = _self;
- };
- dojo.extend(mover, dijit.form._SliderMover.prototype);
+ var mover = dojo.declare(dijit.form._SliderMover, {
+ widget: this
+ });
this._movable = new dojo.dnd.Moveable(this.sliderHandle, {mover: mover});
- this.inherited('postCreate', arguments);
+ // find any associated label element and add to slider focusnode.
+ var label=dojo.query('label[for="'+this.id+'"]');
+ if(label.length){
+ label[0].id = (this.id+"_label");
+ dijit.setWaiState(this.focusNode, "labelledby", label[0].id);
+ }
+ dijit.setWaiState(this.focusNode, "valuemin", this.minimum);
+ dijit.setWaiState(this.focusNode, "valuemax", this.maximum);
+
+ this.inherited(arguments);
+ this._layoutHackIE7();
},
destroy: function(){
this._movable.destroy();
- this.inherited('destroy', arguments);
- }
-});
-
-dojo.declare(
- "dijit.form.VerticalSlider",
- dijit.form.HorizontalSlider,
-{
- // summary
- // A form widget that allows one to select a value with a vertically draggable image
-
- templateString:"<table class=\"dijitReset dijitSlider\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\"\n><tbody class=\"dijitReset\"\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitVerticalSliderButtonContainer\"\n\t\t\t><div class=\"dijitVerticalSliderIncrementIcon\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"incrementButton\" dojoAttachEvent=\"onclick: increment\"><span class=\"dijitSliderButtonInner\">+</span></div\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><center><div class=\"dijitSliderBar dijitSliderBumper dijitVerticalSliderBumper dijitSliderTopBumper dijitVerticalSliderTopBumper\"></div></center\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td dojoAttachPoint=\"leftDecoration\" class=\"dijitReset\" style=\"text-align:center;height:100%;\"></td\n\t\t><td class=\"dijitReset\" style=\"height:100%;\"\n\t\t\t><input dojoAttachPoint=\"valueNode\" type=\"hidden\" name=\"${name}\"\n\t\t\t/><center style=\"position:relative;height:100%;\" dojoAttachPoint=\"sliderBarContainer\"\n\t\t\t\t><div dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitVerticalSliderBar dijitSliderRemainingBar dijitVerticalSliderRemainingBar\" dojoAttachEvent=\"onclick:_onBarClick\"></div\n\t\t\t\t><div dojoAttachPoint=\"progressBar\" class=\"dijitSliderBar dijitVerticalSliderBar dijitSliderProgressBar dijitVerticalSliderProgressBar\" dojoAttachEvent=\"onclick:_onBarClick\"\n\t\t\t\t\t><div dojoAttachPoint=\"sliderHandle,focusNode\" class=\"dijitSliderMoveable\" dojoAttachEvent=\"onkeypress:_onKeyPress,onclick:_onHandleClick\" style=\"vertical-align:top;\" waiRole=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"\n\t\t\t\t\t\t><div class=\"dijitSliderImageHandle dijitVerticalSliderImageHandle\"></div\n\t\t\t\t\t></div\n\t\t\t\t></div\n\t\t\t></center\n\t\t></td\n\t\t><td dojoAttachPoint=\"containerNode,rightDecoration\" class=\"dijitReset\" style=\"text-align:center;height:100%;\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><center><div class=\"dijitSliderBar dijitSliderBumper dijitVerticalSliderBumper dijitSliderBottomBumper dijitVerticalSliderBottomBumper\"></div></center\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitVerticalSliderButtonContainer\"\n\t\t\t><div class=\"dijitVerticalSliderDecrementIcon\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"decrementButton\" dojoAttachEvent=\"onclick: decrement\"><span class=\"dijitSliderButtonInner\">-</span></div\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n></tbody></table>\n",
- _mousePixelCoord: "pageY",
- _pixelCount: "h",
- _startingPixelCoord: "y",
- _startingPixelCount: "t",
- _handleOffsetCoord: "top",
- _progressPixelSize: "height",
- _upsideDown: true
+ if(this._inProgressAnim && this._inProgressAnim.status != "stopped"){
+ this._inProgressAnim.stop(true);
+ }
+ this._supportingWidgets = dijit.findWidgets(this.domNode); // tells destroy about pseudo-child widgets (ruler/labels)
+ this.inherited(arguments);
+ }
});
dojo.declare("dijit.form._SliderMover",
dojo.dnd.Mover,
{
onMouseMove: function(e){
var widget = this.widget;
- var c = this.constraintBox;
- if(!c){
- var container = widget.sliderBarContainer;
- var s = dojo.getComputedStyle(container);
- var c = dojo._getContentBox(container, s);
- c[widget._startingPixelCount] = 0;
- this.constraintBox = c;
- }
- var m = this.marginBox;
- var pixelValue = widget._isReversed() ?
- e[widget._mousePixelCoord] - dojo._abs(widget.sliderBarContainer).x :
- m[widget._startingPixelCount] + e[widget._mousePixelCoord];
- dojo.hitch(widget, "_setPixelValue")(widget._isReversed() || widget._upsideDown? (c[widget._pixelCount]-pixelValue) : pixelValue, c[widget._pixelCount]);
- },
-
+ var abspos = widget._abspos;
+ if(!abspos){
+ abspos = widget._abspos = dojo.position(widget.sliderBarContainer, true);
+ widget._setPixelValue_ = dojo.hitch(widget, "_setPixelValue");
+ widget._isReversed_ = widget._isReversed();
+ }
+ var pixelValue = e[widget._mousePixelCoord] - abspos[widget._startingPixelCoord];
+ widget._setPixelValue_(widget._isReversed_ ? (abspos[widget._pixelCount]-pixelValue) : pixelValue, abspos[widget._pixelCount], false);
+ },
+
destroy: function(e){
+ dojo.dnd.Mover.prototype.destroy.apply(this, arguments);
var widget = this.widget;
- widget.setValue(widget.value, true);
- dojo.dnd.Mover.prototype.destroy.call(this);
- }
-});
+ widget._abspos = null;
+ widget._setValueAttr(widget.value, true);
+ }
+});
+
+
+
+}
+
+if(!dojo._hasResource["dijit.form.VerticalSlider"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form.VerticalSlider"] = true;
+dojo.provide("dijit.form.VerticalSlider");
+
+
+
+dojo.declare(
+ "dijit.form.VerticalSlider",
+ dijit.form.HorizontalSlider,
+{
+ // summary:
+ // A form widget that allows one to select a value with a vertically draggable handle
+
+ templateString: dojo.cache("dijit.form", "templates/VerticalSlider.html", "<table class=\"dijitReset dijitSlider\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\" dojoAttachEvent=\"onkeypress:_onKeyPress,onkeyup:_onKeyUp\"\n><tbody class=\"dijitReset\"\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV\"\n\t\t\t><div class=\"dijitSliderIncrementIconV\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"decrementButton\"><span class=\"dijitSliderButtonInner\">+</span></div\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><center><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderTopBumper dijitSliderTopBumper\" dojoAttachEvent=\"onmousedown:_onClkIncBumper\"></div></center\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td dojoAttachPoint=\"leftDecoration\" class=\"dijitReset\" style=\"text-align:center;height:100%;\"></td\n\t\t><td class=\"dijitReset\" style=\"height:100%;\"\n\t\t\t><input dojoAttachPoint=\"valueNode\" type=\"hidden\" ${nameAttrSetting}\n\t\t\t/><center class=\"dijitReset dijitSliderBarContainerV\" waiRole=\"presentation\" dojoAttachPoint=\"sliderBarContainer\"\n\t\t\t\t><div waiRole=\"presentation\" dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitSliderBarV dijitSliderRemainingBar dijitSliderRemainingBarV\" dojoAttachEvent=\"onmousedown:_onBarClick\"><!--#5629--></div\n\t\t\t\t><div waiRole=\"presentation\" dojoAttachPoint=\"progressBar\" class=\"dijitSliderBar dijitSliderBarV dijitSliderProgressBar dijitSliderProgressBarV\" dojoAttachEvent=\"onmousedown:_onBarClick\"\n\t\t\t\t\t><div class=\"dijitSliderMoveable\" style=\"vertical-align:top;\"\n\t\t\t\t\t\t><div dojoAttachPoint=\"sliderHandle,focusNode\" class=\"dijitSliderImageHandle dijitSliderImageHandleV\" dojoAttachEvent=\"onmousedown:_onHandleClick\" waiRole=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"></div\n\t\t\t\t\t></div\n\t\t\t\t></div\n\t\t\t></center\n\t\t></td\n\t\t><td dojoAttachPoint=\"containerNode,rightDecoration\" class=\"dijitReset\" style=\"text-align:center;height:100%;\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><center><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderBottomBumper dijitSliderBottomBumper\" dojoAttachEvent=\"onmousedown:_onClkDecBumper\"></div></center\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV\"\n\t\t\t><div class=\"dijitSliderDecrementIconV\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"incrementButton\"><span class=\"dijitSliderButtonInner\">-</span></div\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n></tbody></table>\n"),
+ _mousePixelCoord: "pageY",
+ _pixelCount: "h",
+ _startingPixelCoord: "y",
+ _startingPixelCount: "t",
+ _handleOffsetCoord: "top",
+ _progressPixelSize: "height",
+
+ // _descending: Boolean
+ // Specifies if the slider values go from high-on-top (true), or low-on-top (false)
+ // TODO: expose this in 1.2 - the css progress/remaining bar classes need to be reversed
+ _descending: true,
+
+ startup: function(){
+ if(this._started){ return; }
+
+ if(!this.isLeftToRight() && dojo.isMoz){
+ if(this.leftDecoration){this._rtlRectify(this.leftDecoration);}
+ if(this.rightDecoration){this._rtlRectify(this.rightDecoration);}
+ }
+
+ this.inherited(arguments);
+ },
+
+ _isReversed: function(){
+ // summary:
+ // Overrides HorizontalSlider._isReversed.
+ // Indicates if values are high on top (with low numbers on the bottom).
+ return this._descending;
+ },
+
+ _rtlRectify: function(decorationNode/*NodeList*/){
+ // summary:
+ // Helper function on gecko.
+ // Rectify children nodes for left/right decoration in rtl case.
+ // Simply switch the rule and label child for each decoration node.
+ // tags:
+ // private
+ var childNodes = [];
+ while(decorationNode.firstChild){
+ childNodes.push(decorationNode.firstChild);
+ decorationNode.removeChild(decorationNode.firstChild);
+ }
+ for(var i = childNodes.length-1; i >=0; i--){
+ if(childNodes[i]){
+ decorationNode.appendChild(childNodes[i]);
+ }
+ }
+ }
+});
+
+
+}
+
+if(!dojo._hasResource["dijit.form.HorizontalRule"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form.HorizontalRule"] = true;
+dojo.provide("dijit.form.HorizontalRule");
+
+
dojo.declare("dijit.form.HorizontalRule", [dijit._Widget, dijit._Templated],
{
- // Summary:
- // Create hash marks for the Horizontal slider
- templateString: '<div class="RuleContainer HorizontalRuleContainer"></div>',
+ // summary:
+ // Hash marks for `dijit.form.HorizontalSlider`
+
+ templateString: '<div class="dijitRuleContainer dijitRuleContainerH"></div>',
// count: Integer
// Number of hash marks to generate
count: 3,
- // container: Node
- // If this is a child widget, connect it to this parent node
+ // container: String
+ // For HorizontalSlider, this is either "topDecoration" or "bottomDecoration",
+ // and indicates whether this rule goes above or below the slider.
container: "containerNode",
// ruleStyle: String
// CSS style to apply to individual hash marks
ruleStyle: "",
- _positionPrefix: '<div class="RuleMark HorizontalRuleMark" style="left:',
+ _positionPrefix: '<div class="dijitRuleMark dijitRuleMarkH" style="left:',
_positionSuffix: '%;',
_suffix: '"></div>',
_genHTML: function(pos, ndx){
return this._positionPrefix + pos + this._positionSuffix + this.ruleStyle + this._suffix;
},
-
+
+ // _isHorizontal: [protected extension] Boolean
+ // VerticalRule will override this...
_isHorizontal: true,
postCreate: function(){
- if(this.count==1){
- var innerHTML = this._genHTML(50, 0);
- }else{
+ var innerHTML;
+ if(this.count == 1){
+ innerHTML = this._genHTML(50, 0);
+ }else{
+ var i;
var interval = 100 / (this.count-1);
if(!this._isHorizontal || this.isLeftToRight()){
- var innerHTML = this._genHTML(0, 0);
- for(var i=1; i < this.count-1; i++){
+ innerHTML = this._genHTML(0, 0);
+ for(i=1; i < this.count-1; i++){
innerHTML += this._genHTML(interval*i, i);
}
innerHTML += this._genHTML(100, this.count-1);
}else{
- var innerHTML = this._genHTML(100, 0);
- for(var i=1; i < this.count-1; i++){
+ innerHTML = this._genHTML(100, 0);
+ for(i=1; i < this.count-1; i++){
innerHTML += this._genHTML(100-interval*i, i);
}
innerHTML += this._genHTML(0, this.count-1);
}
}
this.domNode.innerHTML = innerHTML;
}
});
+}
+
+if(!dojo._hasResource["dijit.form.VerticalRule"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form.VerticalRule"] = true;
+dojo.provide("dijit.form.VerticalRule");
+
+
+
dojo.declare("dijit.form.VerticalRule", dijit.form.HorizontalRule,
{
- // Summary:
- // Create hash marks for the Vertical slider
- templateString: '<div class="RuleContainer VerticalRuleContainer"></div>',
- _positionPrefix: '<div class="RuleMark VerticalRuleMark" style="top:',
-
+ // summary:
+ // Hash marks for the `dijit.form.VerticalSlider`
+
+ templateString: '<div class="dijitRuleContainer dijitRuleContainerV"></div>',
+ _positionPrefix: '<div class="dijitRuleMark dijitRuleMarkV" style="top:',
+
+/*=====
+ // container: String
+ // This is either "leftDecoration" or "rightDecoration",
+ // to indicate whether this rule goes to the left or to the right of the slider.
+ // Note that on RTL system, "leftDecoration" would actually go to the right, and vice-versa.
+ container: "",
+=====*/
+
+ // Overrides HorizontalRule._isHorizontal
_isHorizontal: false
-});
+
+});
+
+
+}
+
+if(!dojo._hasResource["dijit.form.HorizontalRuleLabels"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form.HorizontalRuleLabels"] = true;
+dojo.provide("dijit.form.HorizontalRuleLabels");
+
+
dojo.declare("dijit.form.HorizontalRuleLabels", dijit.form.HorizontalRule,
{
- // Summary:
- // Create labels for the Horizontal slider
- templateString: '<div class="RuleContainer HorizontalRuleContainer"></div>',
+ // summary:
+ // Labels for `dijit.form.HorizontalSlider`
+
+ templateString: '<div class="dijitRuleContainer dijitRuleContainerH dijitRuleLabelsContainer dijitRuleLabelsContainerH"></div>',
// labelStyle: String
// CSS style to apply to individual text labels
labelStyle: "",
- // labels: Array
- // Array of text labels to render - evenly spaced from left-to-right or bottom-to-top
+ // labels: String[]?
+ // Array of text labels to render - evenly spaced from left-to-right or bottom-to-top.
+ // Alternately, minimum and maximum can be specified, to get numeric labels.
labels: [],
// numericMargin: Integer
- // Number of generated numeric labels that should be rendered as '' on the ends when labels[] are not specified
+ // Number of generated numeric labels that should be rendered as '' on the ends when labels[] are not specified
numericMargin: 0,
// numericMinimum: Integer
- // Leftmost label value for generated numeric labels when labels[] are not specified
+ // Leftmost label value for generated numeric labels when labels[] are not specified
minimum: 0,
// numericMaximum: Integer
- // Rightmost label value for generated numeric labels when labels[] are not specified
+ // Rightmost label value for generated numeric labels when labels[] are not specified
maximum: 1,
- // constraints: object
- // pattern, places, lang, et al (see dojo.number) for generated numeric labels when labels[] are not specified
+ // constraints: Object
+ // pattern, places, lang, et al (see dojo.number) for generated numeric labels when labels[] are not specified
constraints: {pattern:"#%"},
- _positionPrefix: '<div class="RuleLabelContainer HorizontalRuleLabelContainer" style="left:',
- _labelPrefix: '"><span class="RuleLabel HorizontalRuleLabel">',
+ _positionPrefix: '<div class="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:',
+ _labelPrefix: '"><span class="dijitRuleLabel dijitRuleLabelH">',
_suffix: '</span></div>',
_calcPosition: function(pos){
+ // summary:
+ // Returns the value to be used in HTML for the label as part of the left: attribute
+ // tags:
+ // protected extension
return pos;
},
_genHTML: function(pos, ndx){
return this._positionPrefix + this._calcPosition(pos) + this._positionSuffix + this.labelStyle + this._labelPrefix + this.labels[ndx] + this._suffix;
},
getLabels: function(){
- // summary: user replaceable function to return the labels array
+ // summary:
+ // Overridable function to return array of labels to use for this slider.
+ // Can specify a getLabels() method instead of a labels[] array, or min/max attributes.
+ // tags:
+ // protected extension
// if the labels array was not specified directly, then see if <li> children were
var labels = this.labels;
if(!labels.length){
// for markup creation, labels are specified as child elements
labels = dojo.query("> li", this.srcNodeRef).map(function(node){
return String(node.innerHTML);
});
}
this.srcNodeRef.innerHTML = '';
// if the labels were not specified directly and not as <li> children, then calculate numeric labels
if(!labels.length && this.count > 1){
var start = this.minimum;
var inc = (this.maximum - start) / (this.count-1);
- for (var i=0; i < this.count; i++){
- labels.push((i<this.numericMargin||i>=(this.count-this.numericMargin))? '' : dojo.number.format(start, this.constraints));
+ for(var i=0; i < this.count; i++){
+ labels.push((i < this.numericMargin || i >= (this.count-this.numericMargin)) ? '' : dojo.number.format(start, this.constraints));
start += inc;
}
}
return labels;
},
postMixInProperties: function(){
- this.inherited('postMixInProperties', arguments);
+ this.inherited(arguments);
this.labels = this.getLabels();
this.count = this.labels.length;
}
});
+
+
+}
+
+if(!dojo._hasResource["dijit.form.VerticalRuleLabels"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form.VerticalRuleLabels"] = true;
+dojo.provide("dijit.form.VerticalRuleLabels");
+
+
+
dojo.declare("dijit.form.VerticalRuleLabels", dijit.form.HorizontalRuleLabels,
{
- // Summary:
- // Create labels for the Vertical slider
- templateString: '<div class="RuleContainer VerticalRuleContainer"></div>',
-
- _positionPrefix: '<div class="RuleLabelContainer VerticalRuleLabelContainer" style="top:',
- _labelPrefix: '"><span class="RuleLabel VerticalRuleLabel">',
+ // summary:
+ // Labels for the `dijit.form.VerticalSlider`
+
+ templateString: '<div class="dijitRuleContainer dijitRuleContainerV dijitRuleLabelsContainer dijitRuleLabelsContainerV"></div>',
+
+ _positionPrefix: '<div class="dijitRuleLabelContainer dijitRuleLabelContainerV" style="top:',
+ _labelPrefix: '"><span class="dijitRuleLabel dijitRuleLabelV">',
_calcPosition: function(pos){
+ // Overrides HorizontalRuleLabel._calcPosition()
return 100-pos;
- },
-
- _isHorizontal: false
+ }
+});
+
+}
+
+if(!dojo._hasResource["dijit.form.SimpleTextarea"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form.SimpleTextarea"] = true;
+dojo.provide("dijit.form.SimpleTextarea");
+
+
+
+dojo.declare("dijit.form.SimpleTextarea",
+ dijit.form.TextBox,
+ {
+ // summary:
+ // A simple textarea that degrades, and responds to
+ // minimal LayoutContainer usage, and works with dijit.form.Form.
+ // Doesn't automatically size according to input, like Textarea.
+ //
+ // example:
+ // | <textarea dojoType="dijit.form.SimpleTextarea" name="foo" value="bar" rows=30 cols=40></textarea>
+ //
+ // example:
+ // | new dijit.form.SimpleTextarea({ rows:20, cols:30 }, "foo");
+
+ baseClass: "dijitTextArea",
+
+ attributeMap: dojo.delegate(dijit.form._FormValueWidget.prototype.attributeMap, {
+ rows:"textbox", cols: "textbox"
+ }),
+
+ // rows: Number
+ // The number of rows of text.
+ rows: "3",
+
+ // rows: Number
+ // The number of characters per line.
+ cols: "20",
+
+ templateString: "<textarea ${nameAttrSetting} dojoAttachPoint='focusNode,containerNode,textbox' autocomplete='off'></textarea>",
+
+ postMixInProperties: function(){
+ // Copy value from srcNodeRef, unless user specified a value explicitly (or there is no srcNodeRef)
+ if(!this.value && this.srcNodeRef){
+ this.value = this.srcNodeRef.value;
+ }
+ this.inherited(arguments);
+ },
+
+ filter: function(/*String*/ value){
+ // Override TextBox.filter to deal with newlines... specifically (IIRC) this is for IE which writes newlines
+ // as \r\n instead of just \n
+ if(value){
+ value = value.replace(/\r/g,"");
+ }
+ return this.inherited(arguments);
+ },
+
+ postCreate: function(){
+ this.inherited(arguments);
+ if(dojo.isIE && this.cols){ // attribute selectors is not supported in IE6
+ dojo.addClass(this.textbox, "dijitTextAreaCols");
+ }
+ },
+
+ _previousValue: "",
+ _onInput: function(/*Event?*/ e){
+ // Override TextBox._onInput() to enforce maxLength restriction
+ if(this.maxLength){
+ var maxLength = parseInt(this.maxLength);
+ var value = this.textbox.value.replace(/\r/g,'');
+ var overflow = value.length - maxLength;
+ if(overflow > 0){
+ if(e){ dojo.stopEvent(e); }
+ var textarea = this.textbox;
+ if(textarea.selectionStart){
+ var pos = textarea.selectionStart;
+ var cr = 0;
+ if(dojo.isOpera){
+ cr = (this.textbox.value.substring(0,pos).match(/\r/g) || []).length;
+ }
+ this.textbox.value = value.substring(0,pos-overflow-cr)+value.substring(pos-cr);
+ textarea.setSelectionRange(pos-overflow, pos-overflow);
+ }else if(dojo.doc.selection){ //IE
+ textarea.focus();
+ var range = dojo.doc.selection.createRange();
+ // delete overflow characters
+ range.moveStart("character", -overflow);
+ range.text = '';
+ // show cursor
+ range.select();
+ }
+ }
+ this._previousValue = this.textbox.value;
+ }
+ this.inherited(arguments);
+ }
});
}
if(!dojo._hasResource["dijit.form.Textarea"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.form.Textarea"] = true;
dojo.provide("dijit.form.Textarea");
+dojo.declare(
+ "dijit.form.Textarea",
+ dijit.form.SimpleTextarea,
+ {
+ // summary:
+ // A textarea widget that adjusts it's height according to the amount of data.
+ //
+ // description:
+ // A textarea that dynamically expands/contracts (changing it's height) as
+ // the user types, to display all the text without requiring a scroll bar.
+ //
+ // Takes nearly all the parameters (name, value, etc.) that a vanilla textarea takes.
+ // Rows is not supported since this widget adjusts the height.
+ //
+ // example:
+ // | <textarea dojoType="dijit.form.TextArea">...</textarea>
+
+
+ // Override SimpleTextArea.cols to default to width:100%, for backward compatibility
+ cols: "",
+
+ _previousNewlines: 0,
+ _strictMode: (dojo.doc.compatMode != 'BackCompat'), // not the same as !dojo.isQuirks
+
+ _getHeight: function(textarea){
+ var newH = textarea.scrollHeight;
+ if(dojo.isIE){
+ newH += textarea.offsetHeight - textarea.clientHeight - ((dojo.isIE < 8 && this._strictMode) ? dojo._getPadBorderExtents(textarea).h : 0);
+ }else if(dojo.isMoz){
+ newH += textarea.offsetHeight - textarea.clientHeight; // creates room for horizontal scrollbar
+ }else if(dojo.isWebKit && !(dojo.isSafari < 4)){ // Safari 4.0 && Chrome
+ newH += dojo._getBorderExtents(textarea).h;
+ }else{ // Safari 3.x and Opera 9.6
+ newH += dojo._getPadBorderExtents(textarea).h;
+ }
+ return newH;
+ },
+
+ _estimateHeight: function(textarea){
+ // summary:
+ // Approximate the height when the textarea is invisible with the number of lines in the text.
+ // Fails when someone calls setValue with a long wrapping line, but the layout fixes itself when the user clicks inside so . . .
+ // In IE, the resize event is supposed to fire when the textarea becomes visible again and that will correct the size automatically.
+ //
+ textarea.style.maxHeight = "";
+ textarea.style.height = "auto";
+ // #rows = #newlines+1
+ // Note: on Moz, the following #rows appears to be 1 too many.
+ // Actually, Moz is reserving room for the scrollbar.
+ // If you increase the font size, this behavior becomes readily apparent as the last line gets cut off without the +1.
+ textarea.rows = (textarea.value.match(/\n/g) || []).length + 1;
+ },
+
+ _needsHelpShrinking: dojo.isMoz || dojo.isWebKit,
+
+ _onInput: function(){
+ // Override SimpleTextArea._onInput() to deal with height adjustment
+ this.inherited(arguments);
+ if(this._busyResizing){ return; }
+ this._busyResizing = true;
+ var textarea = this.textbox;
+ if(textarea.scrollHeight && textarea.offsetHeight && textarea.clientHeight){
+ var newH = this._getHeight(textarea) + "px";
+ if(textarea.style.height != newH){
+ textarea.style.maxHeight = textarea.style.height = newH;
+ }
+ if(this._needsHelpShrinking){
+ if(this._setTimeoutHandle){
+ clearTimeout(this._setTimeoutHandle);
+ }
+ this._setTimeoutHandle = setTimeout(dojo.hitch(this, "_shrink"), 0); // try to collapse multiple shrinks into 1
+ }
+ }else{
+ // hidden content of unknown size
+ this._estimateHeight(textarea);
+ }
+ this._busyResizing = false;
+ },
+
+ _busyResizing: false,
+ _shrink: function(){
+ // grow paddingBottom to see if scrollHeight shrinks (when it is unneccesarily big)
+ this._setTimeoutHandle = null;
+ if(this._needsHelpShrinking && !this._busyResizing){
+ this._busyResizing = true;
+ var textarea = this.textbox;
+ var empty = false;
+ if(textarea.value == ''){
+ textarea.value = ' '; // prevent collapse all the way back to 0
+ empty = true;
+ }
+ var scrollHeight = textarea.scrollHeight;
+ if(!scrollHeight){
+ this._estimateHeight(textarea);
+ }else{
+ var oldPadding = textarea.style.paddingBottom;
+ var newPadding = dojo._getPadExtents(textarea);
+ newPadding = newPadding.h - newPadding.t;
+ textarea.style.paddingBottom = newPadding + 1 + "px"; // tweak padding to see if height can be reduced
+ var newH = this._getHeight(textarea) - 1 + "px"; // see if the height changed by the 1px added
+ if(textarea.style.maxHeight != newH){ // if can be reduced, so now try a big chunk
+ textarea.style.paddingBottom = newPadding + scrollHeight + "px";
+ textarea.scrollTop = 0;
+ textarea.style.maxHeight = this._getHeight(textarea) - scrollHeight + "px"; // scrollHeight is the added padding
+ }
+ textarea.style.paddingBottom = oldPadding;
+ }
+ if(empty){
+ textarea.value = '';
+ }
+ this._busyResizing = false;
+ }
+ },
+
+ resize: function(){
+ // summary:
+ // Resizes the textarea vertically (should be called after a style/value change)
+ this._onInput();
+ },
+
+ _setValueAttr: function(){
+ this.inherited(arguments);
+ this.resize();
+ },
+
+ postCreate: function(){
+ this.inherited(arguments);
+ // tweak textarea style to reduce browser differences
+ dojo.style(this.textbox, { overflowY: 'hidden', overflowX: 'auto', boxSizing: 'border-box', MsBoxSizing: 'border-box', WebkitBoxSizing: 'border-box', MozBoxSizing: 'border-box' });
+ this.connect(this.textbox, "onscroll", this._onInput);
+ this.connect(this.textbox, "onresize", this._onInput);
+ this.connect(this.textbox, "onfocus", this._onInput); // useful when a previous estimate was off a bit
+ setTimeout(dojo.hitch(this, "resize"), 0);
+ }
+});
+
+}
+
+if(!dojo._hasResource["dijit.layout.StackController"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.layout.StackController"] = true;
+dojo.provide("dijit.layout.StackController");
+
+
+
+
+
dojo.declare(
- "dijit.form.Textarea",
- dijit.form._FormWidget,
-{
- // summary
- // A textarea that resizes vertically to contain the data.
- // Takes nearly all the parameters (name, value, etc.) that a vanilla textarea takes.
- // Cols is not supported and the width should be specified with style width.
- // Rows is not supported since this widget adjusts the height.
- // usage:
- // <textarea dojoType="dijit.form.TextArea">...</textarea>
-
- attributeMap: dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),
- {style:"styleNode", 'class':"styleNode"}),
-
- templateString: (dojo.isIE || dojo.isSafari || dojo.isMozilla) ?
- ((dojo.isIE || dojo.isSafari) ? '<fieldset id="${id}" class="dijitInline dijitInputField dijitTextArea" dojoAttachPoint="styleNode" waiRole="presentation"><div dojoAttachPoint="editNode,focusNode,eventNode" dojoAttachEvent="onpaste:_changing,oncut:_changing" waiRole="textarea" style="text-decoration:none;_padding-bottom:16px;display:block;overflow:auto;" contentEditable="true"></div>'
- : '<span id="${id}" class="dijitReset">'+
- '<iframe src="javascript:<html><head><title>${_iframeEditTitle}</title></head><body><script>var _postCreate=window.frameElement?window.frameElement.postCreate:null;if(_postCreate)_postCreate();</script></body></html>"'+
- ' dojoAttachPoint="iframe,styleNode" dojoAttachEvent="onblur:_onIframeBlur" class="dijitInline dijitInputField dijitTextArea"></iframe>')
- + '<textarea name="${name}" value="${value}" dojoAttachPoint="formValueNode" style="display:none;"></textarea>'
- + ((dojo.isIE || dojo.isSafari) ? '</fieldset>':'</span>')
- : '<textarea id="${id}" name="${name}" value="${value}" dojoAttachPoint="formValueNode,editNode,focusNode,styleNode" class="dijitInputField dijitTextArea"></textarea>',
-
- focus: function(){
- // summary: Received focus, needed for the InlineEditBox widget
- if(!this.disabled){
- this._changing(); // set initial height
- }
- if(dojo.isMozilla){
- dijit.focus(this.iframe);
- }else{
+ "dijit.layout.StackController",
+ [dijit._Widget, dijit._Templated, dijit._Container],
+ {
+ // summary:
+ // Set of buttons to select a page in a page list.
+ // description:
+ // Monitors the specified StackContainer, and whenever a page is
+ // added, deleted, or selected, updates itself accordingly.
+
+ templateString: "<span wairole='tablist' dojoAttachEvent='onkeypress' class='dijitStackController'></span>",
+
+ // containerId: [const] String
+ // The id of the page container that I point to
+ containerId: "",
+
+ // buttonWidget: [const] String
+ // The name of the button widget to create to correspond to each page
+ buttonWidget: "dijit.layout._StackButton",
+
+ postCreate: function(){
+ dijit.setWaiRole(this.domNode, "tablist");
+
+ this.pane2button = {}; // mapping from pane id to buttons
+ this.pane2handles = {}; // mapping from pane id to this.connect() handles
+
+ // Listen to notifications from StackContainer
+ this.subscribe(this.containerId+"-startup", "onStartup");
+ this.subscribe(this.containerId+"-addChild", "onAddChild");
+ this.subscribe(this.containerId+"-removeChild", "onRemoveChild");
+ this.subscribe(this.containerId+"-selectChild", "onSelectChild");
+ this.subscribe(this.containerId+"-containerKeyPress", "onContainerKeyPress");
+ },
+
+ onStartup: function(/*Object*/ info){
+ // summary:
+ // Called after StackContainer has finished initializing
+ // tags:
+ // private
+ dojo.forEach(info.children, this.onAddChild, this);
+ if(info.selected){
+ // Show button corresponding to selected pane (unless selected
+ // is null because there are no panes)
+ this.onSelectChild(info.selected);
+ }
+ },
+
+ destroy: function(){
+ for(var pane in this.pane2button){
+ this.onRemoveChild(dijit.byId(pane));
+ }
+ this.inherited(arguments);
+ },
+
+ onAddChild: function(/*dijit._Widget*/ page, /*Integer?*/ insertIndex){
+ // summary:
+ // Called whenever a page is added to the container.
+ // Create button corresponding to the page.
+ // tags:
+ // private
+
+ // add a node that will be promoted to the button widget
+ var refNode = dojo.doc.createElement("span");
+ this.domNode.appendChild(refNode);
+ // create an instance of the button widget
+ var cls = dojo.getObject(this.buttonWidget);
+ var button = new cls({
+ id: this.id + "_" + page.id,
+ label: page.title,
+ showLabel: page.showTitle,
+ iconClass: page.iconClass,
+ closeButton: page.closable,
+ title: page.tooltip
+ }, refNode);
+ dijit.setWaiState(button.focusNode,"selected", "false");
+ this.pane2handles[page.id] = [
+ this.connect(page, 'attr', function(name, value){
+ if(arguments.length == 2){
+ var buttonAttr = {
+ title: 'label',
+ showTitle: 'showLabel',
+ iconClass: 'iconClass',
+ closable: 'closeButton',
+ tooltip: 'title'
+ }[name];
+ if(buttonAttr){
+ button.attr(buttonAttr, value);
+ }
+ }
+ }),
+ this.connect(button, 'onClick', dojo.hitch(this,"onButtonClick", page)),
+ this.connect(button, 'onClickCloseButton', dojo.hitch(this,"onCloseButtonClick", page))
+ ];
+ this.addChild(button, insertIndex);
+ this.pane2button[page.id] = button;
+ page.controlButton = button; // this value might be overwritten if two tabs point to same container
+ if(!this._currentChild){ // put the first child into the tab order
+ button.focusNode.setAttribute("tabIndex", "0");
+ dijit.setWaiState(button.focusNode, "selected", "true");
+ this._currentChild = page;
+ }
+ // make sure all tabs have the same length
+ if(!this.isLeftToRight() && dojo.isIE && this._rectifyRtlTabList){
+ this._rectifyRtlTabList();
+ }
+ },
+
+ onRemoveChild: function(/*dijit._Widget*/ page){
+ // summary:
+ // Called whenever a page is removed from the container.
+ // Remove the button corresponding to the page.
+ // tags:
+ // private
+
+ if(this._currentChild === page){ this._currentChild = null; }
+ dojo.forEach(this.pane2handles[page.id], this.disconnect, this);
+ delete this.pane2handles[page.id];
+ var button = this.pane2button[page.id];
+ if(button){
+ this.removeChild(button);
+ delete this.pane2button[page.id];
+ button.destroy();
+ }
+ delete page.controlButton;
+ },
+
+ onSelectChild: function(/*dijit._Widget*/ page){
+ // summary:
+ // Called when a page has been selected in the StackContainer, either by me or by another StackController
+ // tags:
+ // private
+
+ if(!page){ return; }
+
+ if(this._currentChild){
+ var oldButton=this.pane2button[this._currentChild.id];
+ oldButton.attr('checked', false);
+ dijit.setWaiState(oldButton.focusNode, "selected", "false");
+ oldButton.focusNode.setAttribute("tabIndex", "-1");
+ }
+
+ var newButton=this.pane2button[page.id];
+ newButton.attr('checked', true);
+ dijit.setWaiState(newButton.focusNode, "selected", "true");
+ this._currentChild = page;
+ newButton.focusNode.setAttribute("tabIndex", "0");
+ var container = dijit.byId(this.containerId);
+ dijit.setWaiState(container.containerNode, "labelledby", newButton.id);
+ },
+
+ onButtonClick: function(/*dijit._Widget*/ page){
+ // summary:
+ // Called whenever one of my child buttons is pressed in an attempt to select a page
+ // tags:
+ // private
+
+ var container = dijit.byId(this.containerId);
+ container.selectChild(page);
+ },
+
+ onCloseButtonClick: function(/*dijit._Widget*/ page){
+ // summary:
+ // Called whenever one of my child buttons [X] is pressed in an attempt to close a page
+ // tags:
+ // private
+
+ var container = dijit.byId(this.containerId);
+ container.closeChild(page);
+ if(this._currentChild){
+ var b = this.pane2button[this._currentChild.id];
+ if(b){
+ dijit.focus(b.focusNode || b.domNode);
+ }
+ }
+ },
+
+ // TODO: this is a bit redundant with forward, back api in StackContainer
+ adjacent: function(/*Boolean*/ forward){
+ // summary:
+ // Helper for onkeypress to find next/previous button
+ // tags:
+ // private
+
+ if(!this.isLeftToRight() && (!this.tabPosition || /top|bottom/.test(this.tabPosition))){ forward = !forward; }
+ // find currently focused button in children array
+ var children = this.getChildren();
+ var current = dojo.indexOf(children, this.pane2button[this._currentChild.id]);
+ // pick next button to focus on
+ var offset = forward ? 1 : children.length - 1;
+ return children[ (current + offset) % children.length ]; // dijit._Widget
+ },
+
+ onkeypress: function(/*Event*/ e){
+ // summary:
+ // Handle keystrokes on the page list, for advancing to next/previous button
+ // and closing the current page if the page is closable.
+ // tags:
+ // private
+
+ if(this.disabled || e.altKey ){ return; }
+ var forward = null;
+ if(e.ctrlKey || !e._djpage){
+ var k = dojo.keys;
+ switch(e.charOrCode){
+ case k.LEFT_ARROW:
+ case k.UP_ARROW:
+ if(!e._djpage){ forward = false; }
+ break;
+ case k.PAGE_UP:
+ if(e.ctrlKey){ forward = false; }
+ break;
+ case k.RIGHT_ARROW:
+ case k.DOWN_ARROW:
+ if(!e._djpage){ forward = true; }
+ break;
+ case k.PAGE_DOWN:
+ if(e.ctrlKey){ forward = true; }
+ break;
+ case k.DELETE:
+ if(this._currentChild.closable){
+ this.onCloseButtonClick(this._currentChild);
+ }
+ dojo.stopEvent(e);
+ break;
+ default:
+ if(e.ctrlKey){
+ if(e.charOrCode === k.TAB){
+ this.adjacent(!e.shiftKey).onClick();
+ dojo.stopEvent(e);
+ }else if(e.charOrCode == "w"){
+ if(this._currentChild.closable){
+ this.onCloseButtonClick(this._currentChild);
+ }
+ dojo.stopEvent(e); // avoid browser tab closing.
+ }
+ }
+ }
+ // handle page navigation
+ if(forward !== null){
+ this.adjacent(forward).onClick();
+ dojo.stopEvent(e);
+ }
+ }
+ },
+
+ onContainerKeyPress: function(/*Object*/ info){
+ // summary:
+ // Called when there was a keypress on the container
+ // tags:
+ // private
+ info.e._djpage = info.page;
+ this.onkeypress(info.e);
+ }
+ });
+
+
+dojo.declare("dijit.layout._StackButton",
+ dijit.form.ToggleButton,
+ {
+ // summary:
+ // Internal widget used by StackContainer.
+ // description:
+ // The button-like or tab-like object you click to select or delete a page
+ // tags:
+ // private
+
+ // Override _FormWidget.tabIndex.
+ // StackContainer buttons are not in the tab order by default.
+ // Probably we should be calling this.startupKeyNavChildren() instead.
+ tabIndex: "-1",
+
+ postCreate: function(/*Event*/ evt){
+ dijit.setWaiRole((this.focusNode || this.domNode), "tab");
+ this.inherited(arguments);
+ },
+
+ onClick: function(/*Event*/ evt){
+ // summary:
+ // This is for TabContainer where the tabs are <span> rather than button,
+ // so need to set focus explicitly (on some browsers)
+ // Note that you shouldn't override this method, but you can connect to it.
dijit.focus(this.focusNode);
- }
- },
-
- setValue: function(/*String*/ value, /*Boolean, optional*/ priorityChange){
- var editNode = this.editNode;
- if(typeof value == "string"){
- editNode.innerHTML = ""; // wipe out old nodes
- if(value.split){
- var _this=this;
- var isFirst = true;
- dojo.forEach(value.split("\n"), function(line){
- if(isFirst){ isFirst = false; }
- else {
- editNode.appendChild(document.createElement("BR")); // preserve line breaks
- }
- editNode.appendChild(document.createTextNode(line)); // use text nodes so that imbedded tags can be edited
- });
- }else{
- editNode.appendChild(document.createTextNode(value));
- }
- }else{
- // blah<BR>blah --> blah\nblah
- // <P>blah</P><P>blah</P> --> blah\nblah
- // <DIV>blah</DIV><DIV>blah</DIV> --> blah\nblah
- // &amp;&lt;&gt; -->&< >
- value = editNode.innerHTML;
- if(this.iframe){ // strip sizeNode
- value = value.replace(/<div><\/div>\r?\n?$/i,"");
- }
- value = value.replace(/\s*\r?\n|^\s+|\s+$|&nbsp;/g,"").replace(/>\s+</g,"><").replace(/<\/(p|div)>$|^<(p|div)[^>]*>/gi,"").replace(/([^>])<div>/g,"$1\n").replace(/<\/p>\s*<p[^>]*>|<br[^>]*>/gi,"\n").replace(/<[^>]*>/g,"").replace(/&amp;/gi,"\&").replace(/&lt;/gi,"<").replace(/&gt;/gi,">");
- }
- this.value = this.formValueNode.value = value;
- if(this.iframe){
- var sizeNode = document.createElement('div');
- editNode.appendChild(sizeNode);
- var newHeight = sizeNode.offsetTop;
- if(editNode.scrollWidth > editNode.clientWidth){ newHeight+=16; } // scrollbar space needed?
- if(this.lastHeight != newHeight){ // cache size so that we don't get a resize event because of a resize event
- if(newHeight == 0){ newHeight = 16; } // height = 0 causes the browser to not set scrollHeight
- dojo.contentBox(this.iframe, {h: newHeight});
- this.lastHeight = newHeight;
- }
- editNode.removeChild(sizeNode);
- }
- dijit.form.Textarea.superclass.setValue.call(this, this.getValue(), priorityChange);
- },
-
- getValue: function(){
- return this.formValueNode.value.replace(/\r/g,"");
- },
-
- postMixInProperties: function(){
- dijit.form.Textarea.superclass.postMixInProperties.apply(this,arguments);
- // don't let the source text be converted to a DOM structure since we just want raw text
- if(this.srcNodeRef && this.srcNodeRef.innerHTML != ""){
- this.value = this.srcNodeRef.innerHTML;
- this.srcNodeRef.innerHTML = "";
- }
- if((!this.value || this.value == "") && this.srcNodeRef && this.srcNodeRef.value){
- this.value = this.srcNodeRef.value;
- }
- if(!this.value){ this.value = ""; }
- this.value = this.value.replace(/\r\n/g,"\n").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&");
- if(dojo.isMozilla){
- // In the case of Firefox an iframe is used and when the text gets focus,
- // focus is fired from the document object. There isn't a way to put a
- // waiRole on the document object and as a result screen readers don't
- // announce the role. As a result screen reader users are lost.
- //
- // An additional problem is that the browser gives the document object a
- // very cryptic accessible name, e.g.
- // wysiwyg://13/http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/form/test_InlineEditBox.html
- // When focus is fired from the document object, the screen reader speaks
- // the accessible name. The cyptic accessile name is confusing.
- //
- // A workaround for both of these problems is to give the iframe's
- // document a title, the name of which is similar to a role name, i.e.
- // "edit area". This will be used as the accessible name which will replace
- // the cryptic name and will also convey the role information to the user.
- // Because it is read directly to the user, the string must be localized.
- // In addition, since a <label> element can not be associated with an iframe, if
- // this control has a label, insert the text into the title as well.
- var _nlsResources = dojo.i18n.getLocalization("dijit", "Textarea");
- this._iframeEditTitle = _nlsResources.iframeEditTitle;
- this._iframeFocusTitle = _nlsResources.iframeFocusTitle;
- var label=dojo.query('label[for="'+this.id+'"]');
- if(label.length){
- this._iframeEditTitle = label[0].innerHTML + " " + this._iframeEditTitle;
- }
- var body = this.focusNode = this.editNode = document.createElement('BODY');
- body.style.margin="0px";
- body.style.padding="0px";
- body.style.border="0px";
- }
- },
-
- postCreate: function(){
- if(dojo.isIE || dojo.isSafari){
- this.domNode.style.overflowY = 'hidden';
- }else if(dojo.isMozilla){
- var w = this.iframe.contentWindow;
- try { // #4715: peeking at the title can throw a security exception during iframe setup
- var title = this.iframe.contentDocument.title;
- } catch(e) { var title = ''; }
- if(!w || !title){
- this.iframe.postCreate = dojo.hitch(this, this.postCreate);
- return;
- }
- var d = w.document;
- d.getElementsByTagName('HTML')[0].replaceChild(this.editNode, d.getElementsByTagName('BODY')[0]);
- if(!this.isLeftToRight()){
- d.getElementsByTagName('HTML')[0].dir = "rtl";
- }
- this.iframe.style.overflowY = 'hidden';
- this.eventNode = d;
- // this.connect won't destroy this handler cleanly since its on the iframe's window object
- // resize is a method of window, not document
- w.addEventListener("resize", dojo.hitch(this, this._changed), false); // resize is only on the window object
- }else{
- this.focusNode = this.domNode;
- }
- if(this.eventNode){
- this.connect(this.eventNode, "keypress", this._onKeyPress);
- this.connect(this.eventNode, "mousemove", this._changed);
- this.connect(this.eventNode, "focus", this._focused);
- this.connect(this.eventNode, "blur", this._blurred);
- }
- if(this.editNode){
- this.connect(this.editNode, "change", this._changed); // needed for mouse paste events per #3479
- }
- this.inherited('postCreate', arguments);
- },
-
- // event handlers, you can over-ride these in your own subclasses
- _focused: function(e){
- dojo.addClass(this.iframe||this.domNode, "dijitInputFieldFocused");
- this._changed(e);
- },
-
- _blurred: function(e){
- dojo.removeClass(this.iframe||this.domNode, "dijitInputFieldFocused");
- this._changed(e, true);
- },
-
- _onIframeBlur: function(){
- // Reset the title back to "edit area".
- this.iframe.contentDocument.title = this._iframeEditTitle;
- },
-
- _onKeyPress: function(e){
- if(e.keyCode == dojo.keys.TAB && !e.shiftKey && !e.ctrlKey && !e.altKey && this.iframe){
- // Pressing the tab key in the iframe (with designMode on) will cause the
- // entry of a tab character so we have to trap that here. Since we don't
- // know the next focusable object we put focus on the iframe and then the
- // user has to press tab again (which then does the expected thing).
- // A problem with that is that the screen reader user hears "edit area"
- // announced twice which causes confusion. By setting the
- // contentDocument's title to "edit area frame" the confusion should be
- // eliminated.
- this.iframe.contentDocument.title = this._iframeFocusTitle;
- // Place focus on the iframe. A subsequent tab or shift tab will put focus
- // on the correct control.
- // Note: Can't use this.focus() because that results in a call to
- // dijit.focus and if that receives an iframe target it will set focus
- // on the iframe's contentWindow.
- this.iframe.focus(); // this.focus(); won't work
- dojo.stopEvent(e);
- }else if(e.keyCode == dojo.keys.ENTER){
- e.stopPropagation();
- }else if(this.inherited("_onKeyPress", arguments) && this.iframe){
- // #3752:
- // The key press will not make it past the iframe.
- // If a widget is listening outside of the iframe, (like InlineEditBox)
- // it will not hear anything.
- // Create an equivalent event so everyone else knows what is going on.
- var te = document.createEvent("KeyEvents");
- te.initKeyEvent("keypress", true, true, null, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.keyCode, e.charCode);
- this.iframe.dispatchEvent(te);
- }
- this._changing();
- },
-
- _changing: function(e){
- // summary: event handler for when a change is imminent
- setTimeout(dojo.hitch(this, "_changed", e, false), 1);
- },
-
- _changed: function(e, priorityChange){
- // summary: event handler for when a change has already happened
- if(this.iframe && this.iframe.contentDocument.designMode != "on"){
- this.iframe.contentDocument.designMode="on"; // in case this failed on init due to being hidden
- }
- this.setValue(null, priorityChange);
- }
-});
+
+ // ... now let StackController catch the event and tell me what to do
+ },
+
+ onClickCloseButton: function(/*Event*/ evt){
+ // summary:
+ // StackContainer connects to this function; if your widget contains a close button
+ // then clicking it should call this function.
+ // Note that you shouldn't override this method, but you can connect to it.
+ evt.stopPropagation();
+ }
+ });
+
}
if(!dojo._hasResource["dijit.layout.StackContainer"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.layout.StackContainer"] = true;
dojo.provide("dijit.layout.StackContainer");
+
dojo.declare(
"dijit.layout.StackContainer",
dijit.layout._LayoutWidget,
-
- // summary
- // A container that has multiple children, but shows only
- // one child at a time (like looking at the pages in a book one by one).
- //
- // Publishes topics <widgetId>-addChild, <widgetId>-removeChild, and <widgetId>-selectChild
- //
- // Can be base class for container, Wizard, Show, etc.
-{
+ {
+ // summary:
+ // A container that has multiple children, but shows only
+ // one child at a time
+ //
+ // description:
+ // A container for widgets (ContentPanes, for example) That displays
+ // only one Widget at a time.
+ //
+ // Publishes topics [widgetId]-addChild, [widgetId]-removeChild, and [widgetId]-selectChild
+ //
+ // Can be base class for container, Wizard, Show, etc.
+
// doLayout: Boolean
- // if true, change the size of my currently displayed child to match my size
+ // If true, change the size of my currently displayed child to match my size
doLayout: true,
- _started: false,
-
- // selectedChildWidget: Widget
- // References the currently selected child widget, if any
+ // persist: Boolean
+ // Remembers the selected child across sessions
+ persist: false,
+
+ baseClass: "dijitStackContainer",
+
+/*=====
+ // selectedChildWidget: [readonly] dijit._Widget
+ // References the currently selected child widget, if any.
+ // Adjust selected child with selectChild() method.
+ selectedChildWidget: null,
+=====*/
postCreate: function(){
- dijit.setWaiRole((this.containerNode || this.domNode), "tabpanel");
+ this.inherited(arguments);
+ dojo.addClass(this.domNode, "dijitLayoutContainer");
+ dijit.setWaiRole(this.containerNode, "tabpanel");
this.connect(this.domNode, "onkeypress", this._onKeyPress);
},
-
+
startup: function(){
if(this._started){ return; }
var children = this.getChildren();
- // Setup each page panel
+ // Setup each page panel to be initially hidden
dojo.forEach(children, this._setupChild, this);
- // Figure out which child to initially display
- dojo.some(children, function(child){
- if(child.selected){
- this.selectedChildWidget = child;
- }
- return child.selected;
- }, this);
-
+ // Figure out which child to initially display, defaulting to first one
+ if(this.persist){
+ this.selectedChildWidget = dijit.byId(dojo.cookie(this.id + "_selectedChild"));
+ }else{
+ dojo.some(children, function(child){
+ if(child.selected){
+ this.selectedChildWidget = child;
+ }
+ return child.selected;
+ }, this);
+ }
var selected = this.selectedChildWidget;
-
- // Default to the first child
if(!selected && children[0]){
selected = this.selectedChildWidget = children[0];
selected.selected = true;
}
- if(selected){
- this._showChild(selected);
- }
-
- // Now publish information about myself so any StackControllers can initialize..
+
+ // Publish information about myself so any StackControllers can initialize.
+ // This needs to happen before this.inherited(arguments) so that for
+ // TabContainer, this._contentBox doesn't include the space for the tab labels.
dojo.publish(this.id+"-startup", [{children: children, selected: selected}]);
- this.inherited("startup",arguments);
- this._started = true;
- },
-
- _setupChild: function(/*Widget*/ page){
- // Summary: prepare the given child
-
- page.domNode.style.display = "none";
-
- // since we are setting the width/height of the child elements, they need
- // to be position:relative, or IE has problems (See bug #2033)
- page.domNode.style.position = "relative";
-
- return page; // dijit._Widget
- },
-
- addChild: function(/*Widget*/ child, /*Integer?*/ insertIndex){
- // summary: Adds a widget to the stack
-
- dijit._Container.prototype.addChild.apply(this, arguments);
- child = this._setupChild(child);
+
+ // Startup each child widget, and do initial layout like setting this._contentBox,
+ // then calls this.resize() which does the initial sizing on the selected child.
+ this.inherited(arguments);
+ },
+
+ resize: function(){
+ // Resize is called when we are first made visible (it's called from startup()
+ // if we are initially visible). If this is the first time we've been made
+ // visible then show our first child.
+ var selected = this.selectedChildWidget;
+ if(selected && !this._hasBeenShown){
+ this._hasBeenShown = true;
+ this._showChild(selected);
+ }
+ this.inherited(arguments);
+ },
+
+ _setupChild: function(/*dijit._Widget*/ child){
+ // Overrides _LayoutWidget._setupChild()
+
+ this.inherited(arguments);
+
+ dojo.removeClass(child.domNode, "dijitVisible");
+ dojo.addClass(child.domNode, "dijitHidden");
+
+ // remove the title attribute so it doesn't show up when i hover
+ // over a node
+ child.domNode.title = "";
+ },
+
+ addChild: function(/*dijit._Widget*/ child, /*Integer?*/ insertIndex){
+ // Overrides _Container.addChild() to do layout and publish events
+
+ this.inherited(arguments);
if(this._started){
+ dojo.publish(this.id+"-addChild", [child, insertIndex]);
+
// in case the tab titles have overflowed from one line to two lines
+ // (or, if this if first child, from zero lines to one line)
+ // TODO: w/ScrollingTabController this is no longer necessary, although
+ // ScrollTabController.resize() does need to get called to show/hide
+ // the navigation buttons as appropriate, but that's handled in ScrollingTabController.onAddChild()
this.layout();
- dojo.publish(this.id+"-addChild", [child, insertIndex]);
-
// if this is the first child, then select it
if(!this.selectedChildWidget){
this.selectChild(child);
}
}
},
- removeChild: function(/*Widget*/ page){
- // summary: Removes the pane from the stack
-
- dijit._Container.prototype.removeChild.apply(this, arguments);
+ removeChild: function(/*dijit._Widget*/ page){
+ // Overrides _Container.removeChild() to do layout and publish events
+
+ this.inherited(arguments);
+
+ if(this._started){
+ // this will notify any tablists to remove a button; do this first because it may affect sizing
+ dojo.publish(this.id + "-removeChild", [page]);
+ }
// If we are being destroyed than don't run the code below (to select another page), because we are deleting
// every page one by one
if(this._beingDestroyed){ return; }
if(this._started){
- // this will notify any tablists to remove a button; do this first because it may affect sizing
- dojo.publish(this.id+"-removeChild", [page]);
-
// in case the tab titles now take up one line instead of two lines
+ // TODO: this is overkill in most cases since ScrollingTabController never changes size (for >= 1 tab)
this.layout();
}
if(this.selectedChildWidget === page){
this.selectedChildWidget = undefined;
if(this._started){
var children = this.getChildren();
if(children.length){
this.selectChild(children[0]);
}
}
}
},
- selectChild: function(/*Widget*/ page){
- // summary:
- // Show the given widget (which must be one of my children)
+ selectChild: function(/*dijit._Widget|String*/ page){
+ // summary:
+ // Show the given widget (which must be one of my children)
+ // page:
+ // Reference to child widget or id of child widget
page = dijit.byId(page);
if(this.selectedChildWidget != page){
// Deselect old page and select new one
this._transition(page, this.selectedChildWidget);
this.selectedChildWidget = page;
dojo.publish(this.id+"-selectChild", [page]);
- }
- },
-
- _transition: function(/*Widget*/newWidget, /*Widget*/oldWidget){
+
+ if(this.persist){
+ dojo.cookie(this.id + "_selectedChild", this.selectedChildWidget.id);
+ }
+ }
+ },
+
+ _transition: function(/*dijit._Widget*/newWidget, /*dijit._Widget*/oldWidget){
+ // summary:
+ // Hide the old widget and display the new widget.
+ // Subclasses should override this.
+ // tags:
+ // protected extension
if(oldWidget){
this._hideChild(oldWidget);
}
this._showChild(newWidget);
// Size the new widget, in case this is the first time it's being shown,
// or I have been resized since the last time it was shown.
- // page must be visible for resizing to work
- if(this.doLayout && newWidget.resize){
- newWidget.resize(this._containerContentBox || this._contentBox);
+ // Note that page must be visible for resizing to work.
+ if(newWidget.resize){
+ if(this.doLayout){
+ newWidget.resize(this._containerContentBox || this._contentBox);
+ }else{
+ // the child should pick it's own size but we still need to call resize()
+ // (with no arguments) to let the widget lay itself out
+ newWidget.resize();
+ }
}
},
_adjacent: function(/*Boolean*/ forward){
- // summary: Gets the next/previous child widget in this container from the current selection
+ // summary:
+ // Gets the next/previous child widget in this container from the current selection.
var children = this.getChildren();
var index = dojo.indexOf(children, this.selectedChildWidget);
index += forward ? 1 : children.length - 1;
return children[ index % children.length ]; // dijit._Widget
},
forward: function(){
- // Summary: advance to next page
+ // summary:
+ // Advance to next page.
this.selectChild(this._adjacent(true));
},
back: function(){
- // Summary: go back to previous page
+ // summary:
+ // Go back to previous page.
this.selectChild(this._adjacent(false));
},
_onKeyPress: function(e){
dojo.publish(this.id+"-containerKeyPress", [{ e: e, page: this}]);
},
layout: function(){
+ // Implement _LayoutWidget.layout() virtual method.
if(this.doLayout && this.selectedChildWidget && this.selectedChildWidget.resize){
this.selectedChildWidget.resize(this._contentBox);
}
},
- _showChild: function(/*Widget*/ page){
+ _showChild: function(/*dijit._Widget*/ page){
+ // summary:
+ // Show the specified child by changing it's CSS, and call _onShow()/onShow() so
+ // it can do any updates it needs regarding loading href's etc.
var children = this.getChildren();
page.isFirstChild = (page == children[0]);
page.isLastChild = (page == children[children.length-1]);
page.selected = true;
- page.domNode.style.display="";
- if(page._loadCheck){
- page._loadCheck(); // trigger load in ContentPane
- }
- if(page.onShow){
- page.onShow();
- }
- },
-
- _hideChild: function(/*Widget*/ page){
+ dojo.removeClass(page.domNode, "dijitHidden");
+ dojo.addClass(page.domNode, "dijitVisible");
+
+ page._onShow();
+ },
+
+ _hideChild: function(/*dijit._Widget*/ page){
+ // summary:
+ // Hide the specified child by changing it's CSS, and call _onHide() so
+ // it's notified.
page.selected=false;
- page.domNode.style.display="none";
- if(page.onHide){
- page.onHide();
- }
- },
-
- closeChild: function(/*Widget*/ page){
- // summary
- // callback when user clicks the [X] to remove a page
- // if onClose() returns true then remove and destroy the childd
+ dojo.removeClass(page.domNode, "dijitVisible");
+ dojo.addClass(page.domNode, "dijitHidden");
+
+ page.onHide();
+ },
+
+ closeChild: function(/*dijit._Widget*/ page){
+ // summary:
+ // Callback when user clicks the [X] to remove a page.
+ // If onClose() returns true then remove and destroy the child.
+ // tags:
+ // private
var remove = page.onClose(this, page);
if(remove){
this.removeChild(page);
// makes sure we can clean up executeScripts in ContentPane onUnLoad
- page.destroy();
- }
- },
-
- destroy: function(){
- this._beingDestroyed = true;
- this.inherited("destroy",arguments);
- }
-});
-
-dojo.declare(
- "dijit.layout.StackController",
- [dijit._Widget, dijit._Templated, dijit._Container],
- {
- // summary:
- // Set of buttons to select a page in a page list.
- // Monitors the specified StackContainer, and whenever a page is
- // added, deleted, or selected, updates itself accordingly.
-
- templateString: "<span wairole='tablist' dojoAttachEvent='onkeypress' class='dijitStackController'></span>",
-
- // containerId: String
- // the id of the page container that I point to
- containerId: "",
-
- // buttonWidget: String
- // the name of the button widget to create to correspond to each page
- buttonWidget: "dijit.layout._StackButton",
-
- postCreate: function(){
- dijit.setWaiRole(this.domNode, "tablist");
-
- this.pane2button = {}; // mapping from panes to buttons
- this._subscriptions=[
- dojo.subscribe(this.containerId+"-startup", this, "onStartup"),
- dojo.subscribe(this.containerId+"-addChild", this, "onAddChild"),
- dojo.subscribe(this.containerId+"-removeChild", this, "onRemoveChild"),
- dojo.subscribe(this.containerId+"-selectChild", this, "onSelectChild"),
- dojo.subscribe(this.containerId+"-containerKeyPress", this, "onContainerKeyPress")
- ];
- },
-
- onStartup: function(/*Object*/ info){
- // summary: called after StackContainer has finished initializing
- dojo.forEach(info.children, this.onAddChild, this);
- this.onSelectChild(info.selected);
- },
-
- destroy: function(){
- dojo.forEach(this._subscriptions, dojo.unsubscribe);
- this.inherited("destroy",arguments);
- },
-
- onAddChild: function(/*Widget*/ page, /*Integer?*/ insertIndex){
- // summary:
- // Called whenever a page is added to the container.
- // Create button corresponding to the page.
-
- // add a node that will be promoted to the button widget
- var refNode = document.createElement("span");
- this.domNode.appendChild(refNode);
- // create an instance of the button widget
- var cls = dojo.getObject(this.buttonWidget);
- var button = new cls({label: page.title, closeButton: page.closable}, refNode);
- this.addChild(button, insertIndex);
- this.pane2button[page] = button;
- page.controlButton = button; // this value might be overwritten if two tabs point to same container
-
- dojo.connect(button, "onClick", dojo.hitch(this,"onButtonClick",page));
- dojo.connect(button, "onClickCloseButton", dojo.hitch(this,"onCloseButtonClick",page));
-
- if(!this._currentChild){ // put the first child into the tab order
- button.focusNode.setAttribute("tabIndex","0");
- this._currentChild = page;
- }
- },
-
- onRemoveChild: function(/*Widget*/ page){
- // summary:
- // Called whenever a page is removed from the container.
- // Remove the button corresponding to the page.
- if(this._currentChild === page){ this._currentChild = null; }
- var button = this.pane2button[page];
- if(button){
- // TODO? if current child { reassign }
- button.destroy();
- }
- this.pane2button[page] = null;
- },
-
- onSelectChild: function(/*Widget*/ page){
- // summary:
- // Called when a page has been selected in the StackContainer, either by me or by another StackController
-
- if(!page){ return; }
-
- if(this._currentChild){
- var oldButton=this.pane2button[this._currentChild];
- oldButton.setChecked(false);
- oldButton.focusNode.setAttribute("tabIndex", "-1");
- }
-
- var newButton=this.pane2button[page];
- newButton.setChecked(true);
- this._currentChild = page;
- newButton.focusNode.setAttribute("tabIndex", "0");
- },
-
- onButtonClick: function(/*Widget*/ page){
- // summary:
- // Called whenever one of my child buttons is pressed in an attempt to select a page
- var container = dijit.byId(this.containerId); // TODO: do this via topics?
- container.selectChild(page);
- },
-
- onCloseButtonClick: function(/*Widget*/ page){
- // summary:
- // Called whenever one of my child buttons [X] is pressed in an attempt to close a page
- var container = dijit.byId(this.containerId);
- container.closeChild(page);
- var b = this.pane2button[this._currentChild];
- if(b){
- dijit.focus(b.focusNode || b.domNode);
- }
- },
-
- // TODO: this is a bit redundant with forward, back api in StackContainer
- adjacent: function(/*Boolean*/ forward){
- // find currently focused button in children array
- var children = this.getChildren();
- var current = dojo.indexOf(children, this.pane2button[this._currentChild]);
- // pick next button to focus on
- var offset = forward ? 1 : children.length - 1;
- return children[ (current + offset) % children.length ]; // dijit._Widget
- },
-
- onkeypress: function(/*Event*/ e){
- // summary:
- // Handle keystrokes on the page list, for advancing to next/previous button
- // and closing the current page if the page is closable.
-
- if(this.disabled || e.altKey ){ return; }
- var forward = true;
- if(e.ctrlKey || !e._djpage){
- var k = dojo.keys;
- switch(e.keyCode){
- case k.LEFT_ARROW:
- case k.UP_ARROW:
- case k.PAGE_UP:
- forward = false;
- // fall through
- case k.RIGHT_ARROW:
- case k.DOWN_ARROW:
- case k.PAGE_DOWN:
- this.adjacent(forward).onClick();
- dojo.stopEvent(e);
- break;
- case k.DELETE:
- if(this._currentChild.closable){
- this.onCloseButtonClick(this._currentChild);
- }
- dojo.stopEvent(e);
- break;
- default:
- if(e.ctrlKey){
- if(e.keyCode == k.TAB){
- this.adjacent(!e.shiftKey).onClick();
- dojo.stopEvent(e);
- }else if(e.keyChar == "w"){
- if(this._currentChild.closable){
- this.onCloseButtonClick(this._currentChild);
- }
- dojo.stopEvent(e); // avoid browser tab closing.
- }
- }
- }
- }
- },
-
- onContainerKeyPress: function(/*Object*/ info){
- info.e._djpage = info.page;
- this.onkeypress(info.e);
- }
-});
-
-dojo.declare("dijit.layout._StackButton",
- dijit.form.ToggleButton,
- {
- // summary
- // Internal widget used by StackContainer.
- // The button-like or tab-like object you click to select or delete a page
-
- tabIndex: "-1", // StackContainer buttons are not in the tab order by default
-
- postCreate: function(/*Event*/ evt){
- dijit.setWaiRole((this.focusNode || this.domNode), "tab");
- this.inherited("postCreate", arguments);
- },
-
- onClick: function(/*Event*/ evt){
- // summary: This is for TabContainer where the tabs are <span> rather than button,
- // so need to set focus explicitly (on some browsers)
- dijit.focus(this.focusNode);
-
- // ... now let StackController catch the event and tell me what to do
- },
-
- onClickCloseButton: function(/*Event*/ evt){
- // summary
- // StackContainer connects to this function; if your widget contains a close button
- // then clicking it should call this function.
- evt.stopPropagation();
- }
-});
+ page.destroyRecursive();
+ }
+ },
+
+ destroyDescendants: function(/*Boolean*/preserveDom){
+ dojo.forEach(this.getChildren(), function(child){
+ this.removeChild(child);
+ child.destroyRecursive(preserveDom);
+ }, this);
+ }
+});
+
+// For back-compat, remove for 2.0
+
+
// These arguments can be specified for the children of a StackContainer.
// Since any widget can be specified as a StackContainer child, mix them
// into the base widget class. (This is a hack, but it's effective.)
dojo.extend(dijit._Widget, {
- // title: String
- // Title of this widget. Used by TabContainer to the name the tab, etc.
- title: "",
-
// selected: Boolean
- // Is this child currently selected?
+ // Parameter for children of `dijit.layout.StackContainer` or subclasses.
+ // Specifies that this widget should be the initially displayed pane.
+ // Note: to change the selected child use `dijit.layout.StackContainer.selectChild`
selected: false,
// closable: Boolean
+ // Parameter for children of `dijit.layout.StackContainer` or subclasses.
// True if user can close (destroy) this child, such as (for example) clicking the X on the tab.
- closable: false, // true if user can close this tab pane
+ closable: false,
+
+ // iconClass: String
+ // Parameter for children of `dijit.layout.StackContainer` or subclasses.
+ // CSS Class specifying icon to use in label associated with this pane.
+ iconClass: "",
+
+ // showTitle: Boolean
+ // Parameter for children of `dijit.layout.StackContainer` or subclasses.
+ // When true, display title of this widget as tab label etc., rather than just using
+ // icon specified in iconClass
+ showTitle: true,
onClose: function(){
- // summary: Callback if someone tries to close the child, child will be closed if func returns true
- return true;
+ // summary:
+ // Parameter for children of `dijit.layout.StackContainer` or subclasses.
+ // Callback if a user tries to close the child. Child will be closed if this function returns true.
+ // tags:
+ // extension
+
+ return true; // Boolean
+ }
+});
+
+}
+
+if(!dojo._hasResource["dijit.layout.AccordionPane"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.layout.AccordionPane"] = true;
+dojo.provide("dijit.layout.AccordionPane");
+
+
+
+dojo.declare("dijit.layout.AccordionPane", dijit.layout.ContentPane, {
+ // summary:
+ // Deprecated widget. Use `dijit.layout.ContentPane` instead.
+ // tags:
+ // deprecated
+
+ constructor: function(){
+ dojo.deprecated("dijit.layout.AccordionPane deprecated, use ContentPane instead", "", "2.0");
+ },
+
+ onSelected: function(){
+ // summary:
+ // called when this pane is selected
}
});
}
if(!dojo._hasResource["dijit.layout.AccordionContainer"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.layout.AccordionContainer"] = true;
dojo.provide("dijit.layout.AccordionContainer");
+ // for back compat, remove for 2.0
+
dojo.declare(
"dijit.layout.AccordionContainer",
dijit.layout.StackContainer,
{
// summary:
// Holds a set of panes where every pane's title is visible, but only one pane's content is visible at a time,
// and switching between panes is visualized by sliding the other panes up/down.
- // usage:
- // <div dojoType="dijit.layout.AccordionContainer">
- // <div dojoType="dijit.layout.AccordionPane" title="pane 1">
- // <div dojoType="dijit.layout.ContentPane">...</div>
- // </div>
- // <div dojoType="dijit.layout.AccordionPane" title="pane 2">
- // <p>This is some text</p>
- // ...
- // </div>
+ // example:
+ // | <div dojoType="dijit.layout.AccordionContainer">
+ // | <div dojoType="dijit.layout.ContentPane" title="pane 1">
+ // | </div>
+ // | <div dojoType="dijit.layout.ContentPane" title="pane 2">
+ // | <p>This is some text</p>
+ // | </div>
+ // | </div>
// duration: Integer
// Amount of time (in ms) it takes to slide panes
- duration: 250,
-
+ duration: dijit.defaultDuration,
+
+ // buttonWidget: [const] String
+ // The name of the widget used to display the title of each pane
+ buttonWidget: "dijit.layout._AccordionButton",
+
+ // _verticalSpace: Number
+ // Pixels of space available for the open pane
+ // (my content box size minus the cumulative size of all the title bars)
_verticalSpace: 0,
+ baseClass: "dijitAccordionContainer",
+
postCreate: function(){
- this.domNode.style.overflow="hidden";
- this.inherited("postCreate",arguments);
+ this.domNode.style.overflow = "hidden";
+ this.inherited(arguments);
dijit.setWaiRole(this.domNode, "tablist");
- dojo.addClass(this.domNode,"dijitAccordionContainer");
},
startup: function(){
if(this._started){ return; }
- this.inherited("startup",arguments);
+ this.inherited(arguments);
if(this.selectedChildWidget){
var style = this.selectedChildWidget.containerNode.style;
style.display = "";
style.overflow = "auto";
- this.selectedChildWidget._setSelectedState(true);
- }
+ this.selectedChildWidget._buttonWidget._setSelectedState(true);
+ }
+ },
+
+ _getTargetHeight: function(/* Node */ node){
+ // summary:
+ // For the given node, returns the height that should be
+ // set to achieve our vertical space (subtract any padding
+ // we may have).
+ //
+ // This is used by the animations.
+ //
+ // TODO: I don't think this works correctly in IE quirks when an elements
+ // style.height including padding and borders
+ var cs = dojo.getComputedStyle(node);
+ return Math.max(this._verticalSpace - dojo._getPadBorderExtents(node, cs).h, 0);
},
layout: function(){
- // summary
- // Set the height of the open pane based on what room remains
- // get cumulative height of all the title bars, and figure out which pane is open
+ // Implement _LayoutWidget.layout() virtual method.
+ // Set the height of the open pane based on what room remains.
+
+ var openPane = this.selectedChildWidget;
+
+ // get cumulative height of all the title bars
var totalCollapsedHeight = 0;
- var openPane = this.selectedChildWidget;
dojo.forEach(this.getChildren(), function(child){
- totalCollapsedHeight += child.getTitleHeight();
+ totalCollapsedHeight += child._buttonWidget.getTitleHeight();
});
var mySize = this._contentBox;
- this._verticalSpace = (mySize.h - totalCollapsedHeight);
+ this._verticalSpace = mySize.h - totalCollapsedHeight;
+
+ // Memo size to make displayed child
+ this._containerContentBox = {
+ h: this._verticalSpace,
+ w: mySize.w
+ };
+
if(openPane){
- openPane.containerNode.style.height = this._verticalSpace + "px";
-/***
-TODO: this is wrong. probably you wanted to call resize on the SplitContainer
-inside the AccordionPane??
- if(openPane.resize){
- openPane.resize({h: this._verticalSpace});
- }
-***/
- }
- },
-
- _setupChild: function(/*Widget*/ page){
- // Summary: prepare the given child
- return page;
+ openPane.resize(this._containerContentBox);
+ }
+ },
+
+ _setupChild: function(child){
+ // Overrides _LayoutWidget._setupChild().
+ // Setup clickable title to sit above the child widget,
+ // and stash pointer to it inside the widget itself.
+
+ var cls = dojo.getObject(this.buttonWidget);
+ var button = (child._buttonWidget = new cls({
+ contentWidget: child,
+ label: child.title,
+ title: child.tooltip,
+ iconClass: child.iconClass,
+ id: child.id + "_button",
+ parent: this
+ }));
+
+ child._accordionConnectHandle = this.connect(child, 'attr', function(name, value){
+ if(arguments.length == 2){
+ switch(name){
+ case 'title':
+ case 'iconClass':
+ button.attr(name, value);
+ }
+ }
+ });
+
+ dojo.place(child._buttonWidget.domNode, child.domNode, "before");
+
+ this.inherited(arguments);
+ },
+
+ removeChild: function(child){
+ // Overrides _LayoutWidget.removeChild().
+ this.disconnect(child._accordionConnectHandle);
+ delete child._accordionConnectHandle;
+
+ child._buttonWidget.destroy();
+ delete child._buttonWidget;
+
+ this.inherited(arguments);
+ },
+
+ getChildren: function(){
+ // Overrides _Container.getChildren() to ignore titles and only look at panes.
+ return dojo.filter(this.inherited(arguments), function(child){
+ return child.declaredClass != this.buttonWidget;
+ }, this);
+ },
+
+ destroy: function(){
+ dojo.forEach(this.getChildren(), function(child){
+ child._buttonWidget.destroy();
+ });
+ this.inherited(arguments);
},
_transition: function(/*Widget?*/newWidget, /*Widget?*/oldWidget){
+ // Overrides StackContainer._transition() to provide sliding of title bars etc.
+
//TODO: should be able to replace this with calls to slideIn/slideOut
if(this._inTransition){ return; }
this._inTransition = true;
var animations = [];
var paneHeight = this._verticalSpace;
if(newWidget){
- newWidget.setSelected(true);
- var newContents = newWidget.containerNode;
- newContents.style.display = "";
-
+ newWidget._buttonWidget.setSelected(true);
+
+ this._showChild(newWidget); // prepare widget to be slid in
+
+ // Size the new widget, in case this is the first time it's being shown,
+ // or I have been resized since the last time it was shown.
+ // Note that page must be visible for resizing to work.
+ if(this.doLayout && newWidget.resize){
+ newWidget.resize(this._containerContentBox);
+ }
+
+ var newContents = newWidget.domNode;
+ dojo.addClass(newContents, "dijitVisible");
+ dojo.removeClass(newContents, "dijitHidden");
+ var newContentsOverflow = newContents.style.overflow;
+ newContents.style.overflow = "hidden";
animations.push(dojo.animateProperty({
node: newContents,
duration: this.duration,
properties: {
- height: { start: "1", end: paneHeight }
+ height: { start: 1, end: this._getTargetHeight(newContents) }
},
- onEnd: function(){
- newContents.style.overflow = "auto";
- }
+ onEnd: dojo.hitch(this, function(){
+ newContents.style.overflow = newContentsOverflow;
+ delete this._inTransition;
+ })
}));
}
if(oldWidget){
- oldWidget.setSelected(false);
- var oldContents = oldWidget.containerNode;
+ oldWidget._buttonWidget.setSelected(false);
+ var oldContents = oldWidget.domNode,
+ oldContentsOverflow = oldContents.style.overflow;
oldContents.style.overflow = "hidden";
animations.push(dojo.animateProperty({
node: oldContents,
duration: this.duration,
properties: {
- height: { start: paneHeight, end: "1" }
+ height: { start: this._getTargetHeight(oldContents), end: 1 }
},
onEnd: function(){
- oldContents.style.display = "none";
+ dojo.addClass(oldContents, "dijitHidden");
+ dojo.removeClass(oldContents, "dijitVisible");
+ oldContents.style.overflow = oldContentsOverflow;
+ if(oldWidget.onHide){
+ oldWidget.onHide();
+ }
}
}));
}
- this._inTransition = false;
-
dojo.fx.combine(animations).play();
},
// note: we are treating the container as controller here
- _onKeyPress: function(/*Event*/ e){
- if(this.disabled || e.altKey ){ return; }
- var k = dojo.keys;
- switch(e.keyCode){
- case k.LEFT_ARROW:
- case k.UP_ARROW:
- case k.PAGE_UP:
- this._adjacent(false)._onTitleClick();
+ _onKeyPress: function(/*Event*/ e, /*dijit._Widget*/ fromTitle){
+ // summary:
+ // Handle keypress events
+ // description:
+ // This is called from a handler on AccordionContainer.domNode
+ // (setup in StackContainer), and is also called directly from
+ // the click handler for accordion labels
+ if(this._inTransition || this.disabled || e.altKey || !(fromTitle || e.ctrlKey)){
+ if(this._inTransition){
dojo.stopEvent(e);
- break;
- case k.RIGHT_ARROW:
- case k.DOWN_ARROW:
- case k.PAGE_DOWN:
- this._adjacent(true)._onTitleClick();
- dojo.stopEvent(e);
- break;
- default:
- if(e.ctrlKey && e.keyCode == k.TAB){
- this._adjacent(e._dijitWidget, !e.shiftKey)._onTitleClick();
- dojo.stopEvent(e);
- }
-
+ }
+ return;
+ }
+ var k = dojo.keys,
+ c = e.charOrCode;
+ if((fromTitle && (c == k.LEFT_ARROW || c == k.UP_ARROW)) ||
+ (e.ctrlKey && c == k.PAGE_UP)){
+ this._adjacent(false)._buttonWidget._onTitleClick();
+ dojo.stopEvent(e);
+ }else if((fromTitle && (c == k.RIGHT_ARROW || c == k.DOWN_ARROW)) ||
+ (e.ctrlKey && (c == k.PAGE_DOWN || c == k.TAB))){
+ this._adjacent(true)._buttonWidget._onTitleClick();
+ dojo.stopEvent(e);
}
}
}
);
-dojo.declare(
- "dijit.layout.AccordionPane",
- [dijit.layout.ContentPane, dijit._Templated, dijit._Contained],
-{
- // summary
- // AccordionPane is a ContentPane with a title that may contain another widget.
- // Nested layout widgets, such as SplitContainer, are not supported at this time.
-
- templateString:"<div class='dijitAccordionPane'\n\t><div dojoAttachPoint='titleNode,focusNode' dojoAttachEvent='ondijitclick:_onTitleClick,onkeypress:_onTitleKeyPress,onfocus:_handleFocus,onblur:_handleFocus'\n\t\tclass='dijitAccordionTitle' wairole=\"tab\"\n\t\t><div class='dijitAccordionArrow'></div\n\t\t><div class='arrowTextUp' waiRole=\"presentation\">&#9650;</div\n\t\t><div class='arrowTextDown' waiRole=\"presentation\">&#9660;</div\n\t\t><div dojoAttachPoint='titleTextNode' class='dijitAccordionText'>${title}</div></div\n\t><div><div dojoAttachPoint='containerNode' style='overflow: hidden; height: 1px; display: none'\n\t\tclass='dijitAccordionBody' wairole=\"tabpanel\"\n\t></div></div>\n</div>\n",
+dojo.declare("dijit.layout._AccordionButton",
+ [dijit._Widget, dijit._Templated],
+ {
+ // summary:
+ // The title bar to click to open up an accordion pane.
+ // Internal widget used by AccordionContainer.
+ // tags:
+ // private
+
+ templateString: dojo.cache("dijit.layout", "templates/AccordionButton.html", "<div dojoAttachPoint='titleNode,focusNode' dojoAttachEvent='ondijitclick:_onTitleClick,onkeypress:_onTitleKeyPress,onfocus:_handleFocus,onblur:_handleFocus,onmouseenter:_onTitleEnter,onmouseleave:_onTitleLeave'\n\t\tclass='dijitAccordionTitle' wairole=\"tab\" waiState=\"expanded-false\"\n\t\t><span class='dijitInline dijitAccordionArrow' waiRole=\"presentation\"></span\n\t\t><span class='arrowTextUp' waiRole=\"presentation\">+</span\n\t\t><span class='arrowTextDown' waiRole=\"presentation\">-</span\n\t\t><img src=\"${_blankGif}\" alt=\"\" dojoAttachPoint='iconNode' style=\"vertical-align: middle\" waiRole=\"presentation\"/>\n\t\t<span waiRole=\"presentation\" dojoAttachPoint='titleTextNode' class='dijitAccordionText'></span>\n</div>\n"),
+ attributeMap: dojo.mixin(dojo.clone(dijit.layout.ContentPane.prototype.attributeMap), {
+ label: {node: "titleTextNode", type: "innerHTML" },
+ title: {node: "titleTextNode", type: "attribute", attribute: "title"},
+ iconClass: { node: "iconNode", type: "class" }
+ }),
+
+ baseClass: "dijitAccordionTitle",
+
+ getParent: function(){
+ // summary:
+ // Returns the parent.
+ // tags:
+ // private
+ return this.parent;
+ },
postCreate: function(){
- this.inherited("postCreate",arguments)
- dojo.setSelectable(this.titleNode, false);
+ this.inherited(arguments);
+ dojo.setSelectable(this.domNode, false);
this.setSelected(this.selected);
+ var titleTextNodeId = dojo.attr(this.domNode,'id').replace(' ','_');
+ dojo.attr(this.titleTextNode, "id", titleTextNodeId+"_title");
+ dijit.setWaiState(this.focusNode, "labelledby", dojo.attr(this.titleTextNode, "id"));
},
getTitleHeight: function(){
- // summary: returns the height of the title dom node
+ // summary:
+ // Returns the height of the title dom node.
return dojo.marginBox(this.titleNode).h; // Integer
},
_onTitleClick: function(){
- // summary: callback when someone clicks my title
+ // summary:
+ // Callback when someone clicks my title.
var parent = this.getParent();
if(!parent._inTransition){
- parent.selectChild(this);
+ parent.selectChild(this.contentWidget);
dijit.focus(this.focusNode);
}
},
+ _onTitleEnter: function(){
+ // summary:
+ // Callback when someone hovers over my title.
+ dojo.addClass(this.focusNode, "dijitAccordionTitle-hover");
+ },
+
+ _onTitleLeave: function(){
+ // summary:
+ // Callback when someone stops hovering over my title.
+ dojo.removeClass(this.focusNode, "dijitAccordionTitle-hover");
+ },
+
_onTitleKeyPress: function(/*Event*/ evt){
- evt._dijitWidget = this;
- return this.getParent()._onKeyPress(evt);
+ return this.getParent()._onKeyPress(evt, this.contentWidget);
},
_setSelectedState: function(/*Boolean*/ isSelected){
this.selected = isSelected;
- dojo[(isSelected ? "addClass" : "removeClass")](this.domNode,"dijitAccordionPane-selected");
+ dojo[(isSelected ? "addClass" : "removeClass")](this.titleNode,"dijitAccordionTitle-selected");
+ dijit.setWaiState(this.focusNode, "expanded", isSelected);
+ dijit.setWaiState(this.focusNode, "selected", isSelected);
this.focusNode.setAttribute("tabIndex", isSelected ? "0" : "-1");
},
-
- _handleFocus: function(/*Event*/e){
- // summary: handle the blur and focus state of this widget
- dojo[(e.type=="focus" ? "addClass" : "removeClass")](this.focusNode,"dijitAccordionPaneFocused");
+
+ _handleFocus: function(/*Event*/ e){
+ // summary:
+ // Handle the blur and focus state of this widget.
+ dojo.toggleClass(this.titleTextNode, "dijitAccordionFocused", e.type == "focus");
},
setSelected: function(/*Boolean*/ isSelected){
- // summary: change the selected state on this pane
+ // summary:
+ // Change the selected state on this pane.
this._setSelectedState(isSelected);
- if(isSelected){ this.onSelected(); }
- },
-
- onSelected: function(){
- // summary: called when this pane is selected
+ if(isSelected){
+ var cw = this.contentWidget;
+ if(cw.onSelected){ cw.onSelected(); }
+ }
+ }
+});
+
+}
+
+if(!dojo._hasResource["dijit.layout.BorderContainer"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.layout.BorderContainer"] = true;
+dojo.provide("dijit.layout.BorderContainer");
+
+
+
+
+dojo.declare(
+ "dijit.layout.BorderContainer",
+ dijit.layout._LayoutWidget,
+{
+ // summary:
+ // Provides layout in up to 5 regions, a mandatory center with optional borders along its 4 sides.
+ //
+ // description:
+ // A BorderContainer is a box with a specified size, such as style="width: 500px; height: 500px;",
+ // that contains a child widget marked region="center" and optionally children widgets marked
+ // region equal to "top", "bottom", "leading", "trailing", "left" or "right".
+ // Children along the edges will be laid out according to width or height dimensions and may
+ // include optional splitters (splitter="true") to make them resizable by the user. The remaining
+ // space is designated for the center region.
+ //
+ // NOTE: Splitters must not be more than 50 pixels in width.
+ //
+ // The outer size must be specified on the BorderContainer node. Width must be specified for the sides
+ // and height for the top and bottom, respectively. No dimensions should be specified on the center;
+ // it will fill the remaining space. Regions named "leading" and "trailing" may be used just like
+ // "left" and "right" except that they will be reversed in right-to-left environments.
+ //
+ // example:
+ // | <div dojoType="dijit.layout.BorderContainer" design="sidebar" gutters="false"
+ // | style="width: 400px; height: 300px;">
+ // | <div dojoType="ContentPane" region="top">header text</div>
+ // | <div dojoType="ContentPane" region="right" splitter="true" style="width: 200px;">table of contents</div>
+ // | <div dojoType="ContentPane" region="center">client area</div>
+ // | </div>
+
+ // design: String
+ // Which design is used for the layout:
+ // - "headline" (default) where the top and bottom extend
+ // the full width of the container
+ // - "sidebar" where the left and right sides extend from top to bottom.
+ design: "headline",
+
+ // gutters: Boolean
+ // Give each pane a border and margin.
+ // Margin determined by domNode.paddingLeft.
+ // When false, only resizable panes have a gutter (i.e. draggable splitter) for resizing.
+ gutters: true,
+
+ // liveSplitters: Boolean
+ // Specifies whether splitters resize as you drag (true) or only upon mouseup (false)
+ liveSplitters: true,
+
+ // persist: Boolean
+ // Save splitter positions in a cookie.
+ persist: false,
+
+ baseClass: "dijitBorderContainer",
+
+ // _splitterClass: String
+ // Optional hook to override the default Splitter widget used by BorderContainer
+ _splitterClass: "dijit.layout._Splitter",
+
+ postMixInProperties: function(){
+ // change class name to indicate that BorderContainer is being used purely for
+ // layout (like LayoutContainer) rather than for pretty formatting.
+ if(!this.gutters){
+ this.baseClass += "NoGutter";
+ }
+ this.inherited(arguments);
+ },
+
+ postCreate: function(){
+ this.inherited(arguments);
+
+ this._splitters = {};
+ this._splitterThickness = {};
+ },
+
+ startup: function(){
+ if(this._started){ return; }
+ dojo.forEach(this.getChildren(), this._setupChild, this);
+ this.inherited(arguments);
+ },
+
+ _setupChild: function(/*dijit._Widget*/ child){
+ // Override _LayoutWidget._setupChild().
+
+ var region = child.region;
+ if(region){
+ this.inherited(arguments);
+
+ dojo.addClass(child.domNode, this.baseClass+"Pane");
+
+ var ltr = this.isLeftToRight();
+ if(region == "leading"){ region = ltr ? "left" : "right"; }
+ if(region == "trailing"){ region = ltr ? "right" : "left"; }
+
+ //FIXME: redundant?
+ this["_"+region] = child.domNode;
+ this["_"+region+"Widget"] = child;
+
+ // Create draggable splitter for resizing pane,
+ // or alternately if splitter=false but BorderContainer.gutters=true then
+ // insert dummy div just for spacing
+ if((child.splitter || this.gutters) && !this._splitters[region]){
+ var _Splitter = dojo.getObject(child.splitter ? this._splitterClass : "dijit.layout._Gutter");
+ var splitter = new _Splitter({
+ container: this,
+ child: child,
+ region: region,
+ live: this.liveSplitters
+ });
+ splitter.isSplitter = true;
+ this._splitters[region] = splitter.domNode;
+ dojo.place(this._splitters[region], child.domNode, "after");
+
+ // Splitters arent added as Contained children, so we need to call startup explicitly
+ splitter.startup();
+ }
+ child.region = region;
+ }
+ },
+
+ _computeSplitterThickness: function(region){
+ this._splitterThickness[region] = this._splitterThickness[region] ||
+ dojo.marginBox(this._splitters[region])[(/top|bottom/.test(region) ? 'h' : 'w')];
+ },
+
+ layout: function(){
+ // Implement _LayoutWidget.layout() virtual method.
+ for(var region in this._splitters){ this._computeSplitterThickness(region); }
+ this._layoutChildren();
+ },
+
+ addChild: function(/*dijit._Widget*/ child, /*Integer?*/ insertIndex){
+ // Override _LayoutWidget.addChild().
+ this.inherited(arguments);
+ if(this._started){
+ this.layout(); //OPT
+ }
+ },
+
+ removeChild: function(/*dijit._Widget*/ child){
+ // Override _LayoutWidget.removeChild().
+ var region = child.region;
+ var splitter = this._splitters[region];
+ if(splitter){
+ dijit.byNode(splitter).destroy();
+ delete this._splitters[region];
+ delete this._splitterThickness[region];
+ }
+ this.inherited(arguments);
+ delete this["_"+region];
+ delete this["_" +region+"Widget"];
+ if(this._started){
+ this._layoutChildren(child.region);
+ }
+ dojo.removeClass(child.domNode, this.baseClass+"Pane");
+ },
+
+ getChildren: function(){
+ // Override _LayoutWidget.getChildren() to only return real children, not the splitters.
+ return dojo.filter(this.inherited(arguments), function(widget){
+ return !widget.isSplitter;
+ });
+ },
+
+ getSplitter: function(/*String*/region){
+ // summary:
+ // Returns the widget responsible for rendering the splitter associated with region
+ var splitter = this._splitters[region];
+ return splitter ? dijit.byNode(splitter) : null;
+ },
+
+ resize: function(newSize, currentSize){
+ // Overrides _LayoutWidget.resize().
+
+ // resetting potential padding to 0px to provide support for 100% width/height + padding
+ // TODO: this hack doesn't respect the box model and is a temporary fix
+ if(!this.cs || !this.pe){
+ var node = this.domNode;
+ this.cs = dojo.getComputedStyle(node);
+ this.pe = dojo._getPadExtents(node, this.cs);
+ this.pe.r = dojo._toPixelValue(node, this.cs.paddingRight);
+ this.pe.b = dojo._toPixelValue(node, this.cs.paddingBottom);
+
+ dojo.style(node, "padding", "0px");
+ }
+
+ this.inherited(arguments);
+ },
+
+ _layoutChildren: function(/*String?*/changedRegion){
+ // summary:
+ // This is the main routine for setting size/position of each child
+
+ if(!this._borderBox || !this._borderBox.h){
+ // We are currently hidden, or we haven't been sized by our parent yet.
+ // Abort. Someone will resize us later.
+ return;
+ }
+
+ var sidebarLayout = (this.design == "sidebar");
+ var topHeight = 0, bottomHeight = 0, leftWidth = 0, rightWidth = 0;
+ var topStyle = {}, leftStyle = {}, rightStyle = {}, bottomStyle = {},
+ centerStyle = (this._center && this._center.style) || {};
+
+ var changedSide = /left|right/.test(changedRegion);
+
+ var layoutSides = !changedRegion || (!changedSide && !sidebarLayout);
+ var layoutTopBottom = !changedRegion || (changedSide && sidebarLayout);
+
+ // Ask browser for width/height of side panes.
+ // Would be nice to cache this but height can change according to width
+ // (because words wrap around). I don't think width will ever change though
+ // (except when the user drags a splitter).
+ if(this._top){
+ topStyle = layoutTopBottom && this._top.style;
+ topHeight = dojo.marginBox(this._top).h;
+ }
+ if(this._left){
+ leftStyle = layoutSides && this._left.style;
+ leftWidth = dojo.marginBox(this._left).w;
+ }
+ if(this._right){
+ rightStyle = layoutSides && this._right.style;
+ rightWidth = dojo.marginBox(this._right).w;
+ }
+ if(this._bottom){
+ bottomStyle = layoutTopBottom && this._bottom.style;
+ bottomHeight = dojo.marginBox(this._bottom).h;
+ }
+
+ var splitters = this._splitters;
+ var topSplitter = splitters.top, bottomSplitter = splitters.bottom,
+ leftSplitter = splitters.left, rightSplitter = splitters.right;
+ var splitterThickness = this._splitterThickness;
+ var topSplitterThickness = splitterThickness.top || 0,
+ leftSplitterThickness = splitterThickness.left || 0,
+ rightSplitterThickness = splitterThickness.right || 0,
+ bottomSplitterThickness = splitterThickness.bottom || 0;
+
+ // Check for race condition where CSS hasn't finished loading, so
+ // the splitter width == the viewport width (#5824)
+ if(leftSplitterThickness > 50 || rightSplitterThickness > 50){
+ setTimeout(dojo.hitch(this, function(){
+ // Results are invalid. Clear them out.
+ this._splitterThickness = {};
+
+ for(var region in this._splitters){
+ this._computeSplitterThickness(region);
+ }
+ this._layoutChildren();
+ }), 50);
+ return false;
+ }
+
+ var pe = this.pe;
+
+ var splitterBounds = {
+ left: (sidebarLayout ? leftWidth + leftSplitterThickness: 0) + pe.l + "px",
+ right: (sidebarLayout ? rightWidth + rightSplitterThickness: 0) + pe.r + "px"
+ };
+
+ if(topSplitter){
+ dojo.mixin(topSplitter.style, splitterBounds);
+ topSplitter.style.top = topHeight + pe.t + "px";
+ }
+
+ if(bottomSplitter){
+ dojo.mixin(bottomSplitter.style, splitterBounds);
+ bottomSplitter.style.bottom = bottomHeight + pe.b + "px";
+ }
+
+ splitterBounds = {
+ top: (sidebarLayout ? 0 : topHeight + topSplitterThickness) + pe.t + "px",
+ bottom: (sidebarLayout ? 0 : bottomHeight + bottomSplitterThickness) + pe.b + "px"
+ };
+
+ if(leftSplitter){
+ dojo.mixin(leftSplitter.style, splitterBounds);
+ leftSplitter.style.left = leftWidth + pe.l + "px";
+ }
+
+ if(rightSplitter){
+ dojo.mixin(rightSplitter.style, splitterBounds);
+ rightSplitter.style.right = rightWidth + pe.r + "px";
+ }
+
+ dojo.mixin(centerStyle, {
+ top: pe.t + topHeight + topSplitterThickness + "px",
+ left: pe.l + leftWidth + leftSplitterThickness + "px",
+ right: pe.r + rightWidth + rightSplitterThickness + "px",
+ bottom: pe.b + bottomHeight + bottomSplitterThickness + "px"
+ });
+
+ var bounds = {
+ top: sidebarLayout ? pe.t + "px" : centerStyle.top,
+ bottom: sidebarLayout ? pe.b + "px" : centerStyle.bottom
+ };
+ dojo.mixin(leftStyle, bounds);
+ dojo.mixin(rightStyle, bounds);
+ leftStyle.left = pe.l + "px"; rightStyle.right = pe.r + "px"; topStyle.top = pe.t + "px"; bottomStyle.bottom = pe.b + "px";
+ if(sidebarLayout){
+ topStyle.left = bottomStyle.left = leftWidth + leftSplitterThickness + pe.l + "px";
+ topStyle.right = bottomStyle.right = rightWidth + rightSplitterThickness + pe.r + "px";
+ }else{
+ topStyle.left = bottomStyle.left = pe.l + "px";
+ topStyle.right = bottomStyle.right = pe.r + "px";
+ }
+
+ // More calculations about sizes of panes
+ var containerHeight = this._borderBox.h - pe.t - pe.b,
+ middleHeight = containerHeight - ( topHeight + topSplitterThickness + bottomHeight + bottomSplitterThickness),
+ sidebarHeight = sidebarLayout ? containerHeight : middleHeight;
+
+ var containerWidth = this._borderBox.w - pe.l - pe.r,
+ middleWidth = containerWidth - (leftWidth + leftSplitterThickness + rightWidth + rightSplitterThickness),
+ sidebarWidth = sidebarLayout ? middleWidth : containerWidth;
+
+ // New margin-box size of each pane
+ var dim = {
+ top: { w: sidebarWidth, h: topHeight },
+ bottom: { w: sidebarWidth, h: bottomHeight },
+ left: { w: leftWidth, h: sidebarHeight },
+ right: { w: rightWidth, h: sidebarHeight },
+ center: { h: middleHeight, w: middleWidth }
+ };
+
+ // Nodes in IE<8 don't respond to t/l/b/r, and TEXTAREA doesn't respond in any browser
+ var janky = dojo.isIE < 8 || (dojo.isIE && dojo.isQuirks) || dojo.some(this.getChildren(), function(child){
+ return child.domNode.tagName == "TEXTAREA" || child.domNode.tagName == "INPUT";
+ });
+ if(janky){
+ // Set the size of the children the old fashioned way, by setting
+ // CSS width and height
+
+ var resizeWidget = function(widget, changes, result){
+ if(widget){
+ (widget.resize ? widget.resize(changes, result) : dojo.marginBox(widget.domNode, changes));
+ }
+ };
+
+ if(leftSplitter){ leftSplitter.style.height = sidebarHeight; }
+ if(rightSplitter){ rightSplitter.style.height = sidebarHeight; }
+ resizeWidget(this._leftWidget, {h: sidebarHeight}, dim.left);
+ resizeWidget(this._rightWidget, {h: sidebarHeight}, dim.right);
+
+ if(topSplitter){ topSplitter.style.width = sidebarWidth; }
+ if(bottomSplitter){ bottomSplitter.style.width = sidebarWidth; }
+ resizeWidget(this._topWidget, {w: sidebarWidth}, dim.top);
+ resizeWidget(this._bottomWidget, {w: sidebarWidth}, dim.bottom);
+
+ resizeWidget(this._centerWidget, dim.center);
+ }else{
+ // We've already sized the children by setting style.top/bottom/left/right...
+ // Now just need to call resize() on those children telling them their new size,
+ // so they can re-layout themselves
+
+ // Calculate which panes need a notification
+ var resizeList = {};
+ if(changedRegion){
+ resizeList[changedRegion] = resizeList.center = true;
+ if(/top|bottom/.test(changedRegion) && this.design != "sidebar"){
+ resizeList.left = resizeList.right = true;
+ }else if(/left|right/.test(changedRegion) && this.design == "sidebar"){
+ resizeList.top = resizeList.bottom = true;
+ }
+ }
+
+ dojo.forEach(this.getChildren(), function(child){
+ if(child.resize && (!changedRegion || child.region in resizeList)){
+ child.resize(null, dim[child.region]);
+ }
+ }, this);
+ }
+ },
+
+ destroy: function(){
+ for(var region in this._splitters){
+ var splitter = this._splitters[region];
+ dijit.byNode(splitter).destroy();
+ dojo.destroy(splitter);
+ }
+ delete this._splitters;
+ delete this._splitterThickness;
+ this.inherited(arguments);
+ }
+});
+
+// This argument can be specified for the children of a BorderContainer.
+// Since any widget can be specified as a LayoutContainer child, mix it
+// into the base widget class. (This is a hack, but it's effective.)
+dojo.extend(dijit._Widget, {
+ // region: [const] String
+ // Parameter for children of `dijit.layout.BorderContainer`.
+ // Values: "top", "bottom", "leading", "trailing", "left", "right", "center".
+ // See the `dijit.layout.BorderContainer` description for details.
+ region: '',
+
+ // splitter: [const] Boolean
+ // Parameter for child of `dijit.layout.BorderContainer` where region != "center".
+ // If true, enables user to resize the widget by putting a draggable splitter between
+ // this widget and the region=center widget.
+ splitter: false,
+
+ // minSize: [const] Number
+ // Parameter for children of `dijit.layout.BorderContainer`.
+ // Specifies a minimum size (in pixels) for this widget when resized by a splitter.
+ minSize: 0,
+
+ // maxSize: [const] Number
+ // Parameter for children of `dijit.layout.BorderContainer`.
+ // Specifies a maximum size (in pixels) for this widget when resized by a splitter.
+ maxSize: Infinity
+});
+
+
+
+dojo.declare("dijit.layout._Splitter", [ dijit._Widget, dijit._Templated ],
+{
+ // summary:
+ // A draggable spacer between two items in a `dijit.layout.BorderContainer`.
+ // description:
+ // This is instantiated by `dijit.layout.BorderContainer`. Users should not
+ // create it directly.
+ // tags:
+ // private
+
+/*=====
+ // container: [const] dijit.layout.BorderContainer
+ // Pointer to the parent BorderContainer
+ container: null,
+
+ // child: [const] dijit.layout._LayoutWidget
+ // Pointer to the pane associated with this splitter
+ child: null,
+
+ // region: String
+ // Region of pane associated with this splitter.
+ // "top", "bottom", "left", "right".
+ region: null,
+=====*/
+
+ // live: [const] Boolean
+ // If true, the child's size changes and the child widget is redrawn as you drag the splitter;
+ // otherwise, the size doesn't change until you drop the splitter (by mouse-up)
+ live: true,
+
+ templateString: '<div class="dijitSplitter" dojoAttachEvent="onkeypress:_onKeyPress,onmousedown:_startDrag,onmouseenter:_onMouse,onmouseleave:_onMouse" tabIndex="0" waiRole="separator"><div class="dijitSplitterThumb"></div></div>',
+
+ postCreate: function(){
+ this.inherited(arguments);
+ this.horizontal = /top|bottom/.test(this.region);
+ dojo.addClass(this.domNode, "dijitSplitter" + (this.horizontal ? "H" : "V"));
+// dojo.addClass(this.child.domNode, "dijitSplitterPane");
+// dojo.setSelectable(this.domNode, false); //TODO is this necessary?
+
+ this._factor = /top|left/.test(this.region) ? 1 : -1;
+
+ this._cookieName = this.container.id + "_" + this.region;
+ if(this.container.persist){
+ // restore old size
+ var persistSize = dojo.cookie(this._cookieName);
+ if(persistSize){
+ this.child.domNode.style[this.horizontal ? "height" : "width"] = persistSize;
+ }
+ }
+ },
+
+ _computeMaxSize: function(){
+ // summary:
+ // Compute the maximum size that my corresponding pane can be set to
+
+ var dim = this.horizontal ? 'h' : 'w',
+ thickness = this.container._splitterThickness[this.region];
+
+ // Get DOMNode of opposite pane, if an opposite pane exists.
+ // Ex: if I am the _Splitter for the left pane, then get the right pane.
+ var flip = {left:'right', right:'left', top:'bottom', bottom:'top', leading:'trailing', trailing:'leading'},
+ oppNode = this.container["_" + flip[this.region]];
+
+ // I can expand up to the edge of the opposite pane, or if there's no opposite pane, then to
+ // edge of BorderContainer
+ var available = dojo.contentBox(this.container.domNode)[dim] -
+ (oppNode ? dojo.marginBox(oppNode)[dim] : 0) -
+ 20 - thickness * 2;
+
+ return Math.min(this.child.maxSize, available);
+ },
+
+ _startDrag: function(e){
+ if(!this.cover){
+ this.cover = dojo.doc.createElement('div');
+ dojo.addClass(this.cover, "dijitSplitterCover");
+ dojo.place(this.cover, this.child.domNode, "after");
+ }
+ dojo.addClass(this.cover, "dijitSplitterCoverActive");
+
+ // Safeguard in case the stop event was missed. Shouldn't be necessary if we always get the mouse up.
+ if(this.fake){ dojo.destroy(this.fake); }
+ if(!(this._resize = this.live)){ //TODO: disable live for IE6?
+ // create fake splitter to display at old position while we drag
+ (this.fake = this.domNode.cloneNode(true)).removeAttribute("id");
+ dojo.addClass(this.domNode, "dijitSplitterShadow");
+ dojo.place(this.fake, this.domNode, "after");
+ }
+ dojo.addClass(this.domNode, "dijitSplitterActive");
+ dojo.addClass(this.domNode, "dijitSplitter" + (this.horizontal ? "H" : "V") + "Active");
+ if(this.fake){
+ dojo.removeClass(this.fake, "dijitSplitterHover");
+ dojo.removeClass(this.fake, "dijitSplitter" + (this.horizontal ? "H" : "V") + "Hover");
+ }
+
+ //Performance: load data info local vars for onmousevent function closure
+ var factor = this._factor,
+ max = this._computeMaxSize(),
+ min = this.child.minSize || 20,
+ isHorizontal = this.horizontal,
+ axis = isHorizontal ? "pageY" : "pageX",
+ pageStart = e[axis],
+ splitterStyle = this.domNode.style,
+ dim = isHorizontal ? 'h' : 'w',
+ childStart = dojo.marginBox(this.child.domNode)[dim],
+ region = this.region,
+ splitterStart = parseInt(this.domNode.style[region], 10),
+ resize = this._resize,
+ mb = {},
+ childNode = this.child.domNode,
+ layoutFunc = dojo.hitch(this.container, this.container._layoutChildren),
+ de = dojo.doc.body;
+
+ this._handlers = (this._handlers || []).concat([
+ dojo.connect(de, "onmousemove", this._drag = function(e, forceResize){
+ var delta = e[axis] - pageStart,
+ childSize = factor * delta + childStart,
+ boundChildSize = Math.max(Math.min(childSize, max), min);
+
+ if(resize || forceResize){
+ mb[dim] = boundChildSize;
+ // TODO: inefficient; we set the marginBox here and then immediately layoutFunc() needs to query it
+ dojo.marginBox(childNode, mb);
+ layoutFunc(region);
+ }
+ splitterStyle[region] = factor * delta + splitterStart + (boundChildSize - childSize) + "px";
+ }),
+ dojo.connect(dojo.doc, "ondragstart", dojo.stopEvent),
+ dojo.connect(dojo.body(), "onselectstart", dojo.stopEvent),
+ dojo.connect(de, "onmouseup", this, "_stopDrag")
+ ]);
+ dojo.stopEvent(e);
+ },
+
+ _onMouse: function(e){
+ var o = (e.type == "mouseover" || e.type == "mouseenter");
+ dojo.toggleClass(this.domNode, "dijitSplitterHover", o);
+ dojo.toggleClass(this.domNode, "dijitSplitter" + (this.horizontal ? "H" : "V") + "Hover", o);
+ },
+
+ _stopDrag: function(e){
+ try{
+ if(this.cover){
+ dojo.removeClass(this.cover, "dijitSplitterCoverActive");
+ }
+ if(this.fake){ dojo.destroy(this.fake); }
+ dojo.removeClass(this.domNode, "dijitSplitterActive");
+ dojo.removeClass(this.domNode, "dijitSplitter" + (this.horizontal ? "H" : "V") + "Active");
+ dojo.removeClass(this.domNode, "dijitSplitterShadow");
+ this._drag(e); //TODO: redundant with onmousemove?
+ this._drag(e, true);
+ }finally{
+ this._cleanupHandlers();
+ delete this._drag;
+ }
+
+ if(this.container.persist){
+ dojo.cookie(this._cookieName, this.child.domNode.style[this.horizontal ? "height" : "width"], {expires:365});
+ }
+ },
+
+ _cleanupHandlers: function(){
+ dojo.forEach(this._handlers, dojo.disconnect);
+ delete this._handlers;
+ },
+
+ _onKeyPress: function(/*Event*/ e){
+ // should we apply typematic to this?
+ this._resize = true;
+ var horizontal = this.horizontal;
+ var tick = 1;
+ var dk = dojo.keys;
+ switch(e.charOrCode){
+ case horizontal ? dk.UP_ARROW : dk.LEFT_ARROW:
+ tick *= -1;
+// break;
+ case horizontal ? dk.DOWN_ARROW : dk.RIGHT_ARROW:
+ break;
+ default:
+// this.inherited(arguments);
+ return;
+ }
+ var childSize = dojo.marginBox(this.child.domNode)[ horizontal ? 'h' : 'w' ] + this._factor * tick;
+ var mb = {};
+ mb[ this.horizontal ? "h" : "w"] = Math.max(Math.min(childSize, this._computeMaxSize()), this.child.minSize);
+ dojo.marginBox(this.child.domNode, mb);
+ this.container._layoutChildren(this.region);
+ dojo.stopEvent(e);
+ },
+
+ destroy: function(){
+ this._cleanupHandlers();
+ delete this.child;
+ delete this.container;
+ delete this.cover;
+ delete this.fake;
+ this.inherited(arguments);
+ }
+});
+
+dojo.declare("dijit.layout._Gutter", [dijit._Widget, dijit._Templated ],
+{
+ // summary:
+ // Just a spacer div to separate side pane from center pane.
+ // Basically a trick to lookup the gutter/splitter width from the theme.
+ // description:
+ // Instantiated by `dijit.layout.BorderContainer`. Users should not
+ // create directly.
+ // tags:
+ // private
+
+ templateString: '<div class="dijitGutter" waiRole="presentation"></div>',
+
+ postCreate: function(){
+ this.horizontal = /top|bottom/.test(this.region);
+ dojo.addClass(this.domNode, "dijitGutter" + (this.horizontal ? "H" : "V"));
}
});
}
if(!dojo._hasResource["dijit.layout.LayoutContainer"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.layout.LayoutContainer"] = true;
dojo.provide("dijit.layout.LayoutContainer");
-dojo.declare(
- "dijit.layout.LayoutContainer",
+dojo.declare("dijit.layout.LayoutContainer",
dijit.layout._LayoutWidget,
-{
- // summary
- // Provides Delphi-style panel layout semantics.
- //
- // details
- // A LayoutContainer is a box with a specified size (like style="width: 500px; height: 500px;"),
- // that contains children widgets marked with "layoutAlign" of "left", "right", "bottom", "top", and "client".
- // It takes it's children marked as left/top/bottom/right, and lays them out along the edges of the box,
- // and then it takes the child marked "client" and puts it into the remaining space in the middle.
- //
- // Left/right positioning is similar to CSS's "float: left" and "float: right",
- // and top/bottom positioning would be similar to "float: top" and "float: bottom", if there were such
- // CSS.
- //
- // Note that there can only be one client element, but there can be multiple left, right, top,
- // or bottom elements.
- //
- // usage
- // <style>
- // html, body{ height: 100%; width: 100%; }
- // </style>
- // <div dojoType="dijit.layout.LayoutContainer" style="width: 100%; height: 100%">
- // <div dojoType="dijit.layout.ContentPane" layoutAlign="top">header text</div>
- // <div dojoType="dijit.layout.ContentPane" layoutAlign="left" style="width: 200px;">table of contents</div>
- // <div dojoType="dijit.layout.ContentPane" layoutAlign="client">client area</div>
- // </div>
- //
- // Lays out each child in the natural order the children occur in.
- // Basically each child is laid out into the "remaining space", where "remaining space" is initially
- // the content area of this widget, but is reduced to a smaller rectangle each time a child is added.
- //
+ {
+ // summary:
+ // Deprecated. Use `dijit.layout.BorderContainer` instead.
+ //
+ // description:
+ // Provides Delphi-style panel layout semantics.
+ //
+ // A LayoutContainer is a box with a specified size (like style="width: 500px; height: 500px;"),
+ // that contains children widgets marked with "layoutAlign" of "left", "right", "bottom", "top", and "client".
+ // It takes it's children marked as left/top/bottom/right, and lays them out along the edges of the box,
+ // and then it takes the child marked "client" and puts it into the remaining space in the middle.
+ //
+ // Left/right positioning is similar to CSS's "float: left" and "float: right",
+ // and top/bottom positioning would be similar to "float: top" and "float: bottom", if there were such
+ // CSS.
+ //
+ // Note that there can only be one client element, but there can be multiple left, right, top,
+ // or bottom elements.
+ //
+ // example:
+ // | <style>
+ // | html, body{ height: 100%; width: 100%; }
+ // | </style>
+ // | <div dojoType="dijit.layout.LayoutContainer" style="width: 100%; height: 100%">
+ // | <div dojoType="dijit.layout.ContentPane" layoutAlign="top">header text</div>
+ // | <div dojoType="dijit.layout.ContentPane" layoutAlign="left" style="width: 200px;">table of contents</div>
+ // | <div dojoType="dijit.layout.ContentPane" layoutAlign="client">client area</div>
+ // | </div>
+ //
+ // Lays out each child in the natural order the children occur in.
+ // Basically each child is laid out into the "remaining space", where "remaining space" is initially
+ // the content area of this widget, but is reduced to a smaller rectangle each time a child is added.
+ // tags:
+ // deprecated
+
+ baseClass: "dijitLayoutContainer",
+
+ constructor: function(){
+ dojo.deprecated("dijit.layout.LayoutContainer is deprecated", "use BorderContainer instead", 2.0);
+ },
layout: function(){
dijit.layout.layoutChildren(this.domNode, this._contentBox, this.getChildren());
},
- addChild: function(/*Widget*/ child, /*Integer?*/ insertIndex){
- dijit._Container.prototype.addChild.apply(this, arguments);
+ addChild: function(/*dijit._Widget*/ child, /*Integer?*/ insertIndex){
+ this.inherited(arguments);
if(this._started){
dijit.layout.layoutChildren(this.domNode, this._contentBox, this.getChildren());
}
},
- removeChild: function(/*Widget*/ widget){
- dijit._Container.prototype.removeChild.apply(this, arguments);
+ removeChild: function(/*dijit._Widget*/ widget){
+ this.inherited(arguments);
if(this._started){
dijit.layout.layoutChildren(this.domNode, this._contentBox, this.getChildren());
}
}
});
// This argument can be specified for the children of a LayoutContainer.
// Since any widget can be specified as a LayoutContainer child, mix it
// into the base widget class. (This is a hack, but it's effective.)
dojo.extend(dijit._Widget, {
// layoutAlign: String
// "none", "left", "right", "bottom", "top", and "client".
// See the LayoutContainer description for details on this parameter.
layoutAlign: 'none'
});
}
if(!dojo._hasResource["dijit.layout.LinkPane"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.layout.LinkPane"] = true;
dojo.provide("dijit.layout.LinkPane");
dojo.declare("dijit.layout.LinkPane",
[dijit.layout.ContentPane, dijit._Templated],
{
- // summary:
- // A ContentPane that loads data remotely
+ // summary:
+ // A ContentPane with an href where (when declared in markup)
+ // the title is specified as innerHTML rather than as a title attribute.
// description:
- // LinkPane is just a ContentPane that loads data remotely (via the href attribute),
- // and has markup similar to an anchor. The anchor's body (the words between <a> and </a>)
- // become the title of the widget (used for TabContainer, AccordionContainer, etc.)
+ // LinkPane is just a ContentPane that is declared in markup similarly
+ // to an anchor. The anchor's body (the words between `<a>` and `</a>`)
+ // become the title of the widget (used for TabContainer, AccordionContainer, etc.)
// example:
- // <a href="foo.html">my title</a>
+ // | <a href="foo.html">my title</a>
// I'm using a template because the user may specify the input as
// <a href="foo.html">title</a>, in which case we need to get rid of the
// <a> because we don't want a link.
- templateString: '<div class="dijitLinkPane"></div>',
-
- postCreate: function(){
-
+ templateString: '<div class="dijitLinkPane" dojoAttachPoint="containerNode"></div>',
+
+ postMixInProperties: function(){
// If user has specified node contents, they become the title
// (the link must be plain text)
if(this.srcNodeRef){
this.title += this.srcNodeRef.innerHTML;
}
- this.inherited("postCreate",arguments);
+ this.inherited(arguments);
+ },
+
+ _fillContent: function(/*DomNode*/ source){
+ // Overrides _Templated._fillContent().
+
+ // _Templated._fillContent() relocates srcNodeRef innerHTML to templated container node,
+ // but in our case the srcNodeRef innerHTML is the title, so shouldn't be
+ // copied
}
});
}
if(!dojo._hasResource["dijit.layout.SplitContainer"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.layout.SplitContainer"] = true;
dojo.provide("dijit.layout.SplitContainer");
//
// FIXME: make it prettier
// FIXME: active dragging upwards doesn't always shift other bars (direction calculation is wrong in this case)
//
dojo.declare("dijit.layout.SplitContainer",
dijit.layout._LayoutWidget,
{
- // summary:
- // A Container widget with sizing handles in-between each child
+ // summary:
+ // Deprecated. Use `dijit.layout.BorderContainer` instead.
// description:
+ // A Container widget with sizing handles in-between each child.
// Contains multiple children widgets, all of which are displayed side by side
// (either horizontally or vertically); there's a bar between each of the children,
// and you can adjust the relative size of each child by dragging the bars.
//
// You must specify a size (width and height) for the SplitContainer.
- //
+ // tags:
+ // deprecated
+
+ constructor: function(){
+ dojo.deprecated("dijit.layout.SplitContainer is deprecated", "use BorderContainer with splitter instead", 2.0);
+ },
+
// activeSizing: Boolean
// If true, the children's size changes as you drag the bar;
// otherwise, the sizes don't change until you drop the bar (by mouse-up)
activeSizing: false,
// sizerWidth: Integer
// Size in pixels of the bar between each child
sizerWidth: 7, // FIXME: this should be a CSS attribute (at 7 because css wants it to be 7 until we fix to css)
// orientation: String
// either 'horizontal' or vertical; indicates whether the children are
// arranged side-by-side or up/down.
orientation: 'horizontal',
// persist: Boolean
// Save splitter positions in a cookie
persist: true,
+ baseClass: "dijitSplitContainer",
+
postMixInProperties: function(){
this.inherited("postMixInProperties",arguments);
this.isHorizontal = (this.orientation == 'horizontal');
},
postCreate: function(){
- this.inherited("postCreate",arguments);
+ this.inherited(arguments);
this.sizers = [];
- dojo.addClass(this.domNode, "dijitSplitContainer");
+
// overflow has to be explicitly hidden for splitContainers using gekko (trac #1435)
// to keep other combined css classes from inadvertantly making the overflow visible
if(dojo.isMozilla){
this.domNode.style.overflow = '-moz-scrollbars-none'; // hidden doesn't work
}
// create the fake dragger
if(typeof this.sizerWidth == "object"){
try{ //FIXME: do this without a try/catch
this.sizerWidth = parseInt(this.sizerWidth.toString());
}catch(e){ this.sizerWidth = 7; }
}
- var sizer = this.virtualSizer = document.createElement('div');
+ var sizer = dojo.doc.createElement('div');
+ this.virtualSizer = sizer;
sizer.style.position = 'relative';
// #1681: work around the dreaded 'quirky percentages in IE' layout bug
// If the splitcontainer's dimensions are specified in percentages, it
// will be resized when the virtualsizer is displayed in _showSizingLine
// (typically expanding its bounds unnecessarily). This happens because
// we use position: relative for .dijitSplitContainer.
// The workaround: instead of changing the display style attribute,
// switch to changing the zIndex (bring to front/move to back)
sizer.style.zIndex = 10;
sizer.className = this.isHorizontal ? 'dijitSplitContainerVirtualSizerH' : 'dijitSplitContainerVirtualSizerV';
this.domNode.appendChild(sizer);
dojo.setSelectable(sizer, false);
},
+ destroy: function(){
+ delete this.virtualSizer;
+ dojo.forEach(this._ownconnects, dojo.disconnect);
+ this.inherited(arguments);
+ },
startup: function(){
if(this._started){ return; }
+
dojo.forEach(this.getChildren(), function(child, i, children){
// attach the children and create the draggers
- this._injectChild(child);
+ this._setupChild(child);
if(i < children.length-1){
this._addSizer();
}
}, this);
if(this.persist){
this._restoreState();
}
- this.inherited("startup",arguments);
- this._started = true;
- },
-
- _injectChild: function(child){
+
+ this.inherited(arguments);
+ },
+
+ _setupChild: function(/*dijit._Widget*/ child){
+ this.inherited(arguments);
child.domNode.style.position = "absolute";
dojo.addClass(child.domNode, "dijitSplitPane");
},
- _addSizer: function(){
- var i = this.sizers.length;
+ _onSizerMouseDown: function(e){
+ if(e.target.id){
+ for(var i=0;i<this.sizers.length;i++){
+ if(this.sizers[i].id == e.target.id){
+ break;
+ }
+ }
+ if(i<this.sizers.length){
+ this.beginSizing(e,i);
+ }
+ }
+ },
+ _addSizer: function(index){
+ index = index === undefined ? this.sizers.length : index;
// TODO: use a template for this!!!
- var sizer = this.sizers[i] = document.createElement('div');
+ var sizer = dojo.doc.createElement('div');
+ sizer.id=dijit.getUniqueId('dijit_layout_SplitterContainer_Splitter');
+ this.sizers.splice(index,0,sizer);
+ this.domNode.appendChild(sizer);
+
sizer.className = this.isHorizontal ? 'dijitSplitContainerSizerH' : 'dijitSplitContainerSizerV';
// add the thumb div
- var thumb = document.createElement('div');
+ var thumb = dojo.doc.createElement('div');
thumb.className = 'thumb';
+ thumb.id = sizer.id;
sizer.appendChild(thumb);
// FIXME: are you serious? why aren't we using mover start/stop combo?
- var self = this;
- var handler = (function(){ var sizer_i = i; return function(e){ self.beginSizing(e, sizer_i); } })();
- dojo.connect(sizer, "onmousedown", handler);
-
- this.domNode.appendChild(sizer);
+ this.connect(sizer, "onmousedown", '_onSizerMouseDown');
+
dojo.setSelectable(sizer, false);
},
removeChild: function(widget){
- // summary: Remove sizer, but only if widget is really our child and
+ // summary:
+ // Remove sizer, but only if widget is really our child and
// we have at least one sizer to throw away
- if(this.sizers.length && dojo.indexOf(this.getChildren(), widget) != -1){
- var i = this.sizers.length - 1;
- dojo._destroyElement(this.sizers[i]);
- this.sizers.length--;
+ if(this.sizers.length){
+ var i=dojo.indexOf(this.getChildren(), widget)
+ if(i != -1){
+ if(i == this.sizers.length){
+ i--;
+ }
+ dojo.destroy(this.sizers[i]);
+ this.sizers.splice(i,1);
+ }
}
// Remove widget and repaint
- this.inherited("removeChild",arguments);
+ this.inherited(arguments);
if(this._started){
this.layout();
}
},
- addChild: function(/*Widget*/ child, /*Integer?*/ insertIndex){
- // summary: Add a child widget to the container
- // child: a widget to add
- // insertIndex: postion in the "stack" to add the child widget
-
- this.inherited("addChild",arguments);
+ addChild: function(/*dijit._Widget*/ child, /*Integer?*/ insertIndex){
+ // summary:
+ // Add a child widget to the container
+ // child:
+ // a widget to add
+ // insertIndex:
+ // postion in the "stack" to add the child widget
+
+ this.inherited(arguments);
if(this._started){
// Do the stuff that startup() does for each widget
- this._injectChild(child);
var children = this.getChildren();
if(children.length > 1){
- this._addSizer();
+ this._addSizer(insertIndex);
}
// and then reposition (ie, shrink) every pane to make room for the new guy
this.layout();
}
},
layout: function(){
// summary:
// Do layout of panels
// base class defines this._contentBox on initial creation and also
// on resize
this.paneWidth = this._contentBox.w;
this.paneHeight = this._contentBox.h;
var children = this.getChildren();
if(!children.length){ return; }
//
// calculate space
//
var space = this.isHorizontal ? this.paneWidth : this.paneHeight;
if(children.length > 1){
space -= this.sizerWidth * (children.length - 1);
}
//
// calculate total of SizeShare values
//
var outOf = 0;
dojo.forEach(children, function(child){
outOf += child.sizeShare;
});
//
// work out actual pixels per sizeshare unit
//
var pixPerUnit = space / outOf;
//
// set the SizeActual member of each pane
//
var totalSize = 0;
dojo.forEach(children.slice(0, children.length - 1), function(child){
var size = Math.round(pixPerUnit * child.sizeShare);
child.sizeActual = size;
totalSize += size;
});
children[children.length-1].sizeActual = space - totalSize;
//
// make sure the sizes are ok
//
this._checkSizes();
//
// now loop, positioning each pane and letting children resize themselves
//
var pos = 0;
var size = children[0].sizeActual;
this._movePanel(children[0], pos, size);
children[0].position = pos;
pos += size;
// if we don't have any sizers, our layout method hasn't been called yet
// so bail until we are called..TODO: REVISIT: need to change the startup
// algorithm to guaranteed the ordering of calls to layout method
if(!this.sizers){
return;
}
dojo.some(children.slice(1), function(child, i){
// error-checking
if(!this.sizers[i]){
return true;
}
// first we position the sizing handle before this pane
this._moveSlider(this.sizers[i], pos, this.sizerWidth);
this.sizers[i].position = pos;
pos += this.sizerWidth;
size = child.sizeActual;
this._movePanel(child, pos, size);
child.position = pos;
pos += size;
}, this);
},
_movePanel: function(panel, pos, size){
if(this.isHorizontal){
panel.domNode.style.left = pos + 'px'; // TODO: resize() takes l and t parameters too, don't need to set manually
panel.domNode.style.top = 0;
var box = {w: size, h: this.paneHeight};
if(panel.resize){
panel.resize(box);
}else{
dojo.marginBox(panel.domNode, box);
}
}else{
panel.domNode.style.left = 0; // TODO: resize() takes l and t parameters too, don't need to set manually
panel.domNode.style.top = pos + 'px';
var box = {w: this.paneWidth, h: size};
if(panel.resize){
panel.resize(box);
}else{
dojo.marginBox(panel.domNode, box);
}
}
},
_moveSlider: function(slider, pos, size){
if(this.isHorizontal){
slider.style.left = pos + 'px';
slider.style.top = 0;
dojo.marginBox(slider, { w: size, h: this.paneHeight });
}else{
slider.style.left = 0;
slider.style.top = pos + 'px';
dojo.marginBox(slider, { w: this.paneWidth, h: size });
}
},
_growPane: function(growth, pane){
if(growth > 0){
if(pane.sizeActual > pane.sizeMin){
if((pane.sizeActual - pane.sizeMin) > growth){
// stick all the growth in this pane
pane.sizeActual = pane.sizeActual - growth;
growth = 0;
}else{
// put as much growth in here as we can
growth -= pane.sizeActual - pane.sizeMin;
pane.sizeActual = pane.sizeMin;
}
}
}
return growth;
},
_checkSizes: function(){
var totalMinSize = 0;
var totalSize = 0;
var children = this.getChildren();
dojo.forEach(children, function(child){
totalSize += child.sizeActual;
totalMinSize += child.sizeMin;
});
// only make adjustments if we have enough space for all the minimums
if(totalMinSize <= totalSize){
var growth = 0;
dojo.forEach(children, function(child){
if(child.sizeActual < child.sizeMin){
growth += child.sizeMin - child.sizeActual;
child.sizeActual = child.sizeMin;
}
});
if(growth > 0){
var list = this.isDraggingLeft ? children.reverse() : children;
dojo.forEach(list, function(child){
growth = this._growPane(growth, child);
}, this);
}
}else{
dojo.forEach(children, function(child){
child.sizeActual = Math.round(totalSize * (child.sizeMin / totalMinSize));
});
}
},
beginSizing: function(e, i){
var children = this.getChildren();
this.paneBefore = children[i];
this.paneAfter = children[i+1];
this.isSizing = true;
this.sizingSplitter = this.sizers[i];
if(!this.cover){
- this.cover = dojo.doc.createElement('div');
- this.domNode.appendChild(this.cover);
- var s = this.cover.style;
- s.position = 'absolute';
- s.zIndex = 1;
- s.top = 0;
- s.left = 0;
- s.width = "100%";
- s.height = "100%";
- }else{
- this.cover.style.zIndex = 1;
- }
- this.sizingSplitter.style.zIndex = 2;
+ this.cover = dojo.create('div', {
+ style: {
+ position:'absolute',
+ zIndex:5,
+ top: 0,
+ left: 0,
+ width: "100%",
+ height: "100%"
+ }
+ }, this.domNode);
+ }else{
+ this.cover.style.zIndex = 5;
+ }
+ this.sizingSplitter.style.zIndex = 6;
// TODO: REVISIT - we want MARGIN_BOX and core hasn't exposed that yet (but can't we use it anyway if we pay attention? we do elsewhere.)
- this.originPos = dojo.coords(children[0].domNode, true);
+ this.originPos = dojo.position(children[0].domNode, true);
if(this.isHorizontal){
- var client = (e.layerX ? e.layerX : e.offsetX);
+ var client = e.layerX || e.offsetX || 0;
var screen = e.pageX;
this.originPos = this.originPos.x;
}else{
- var client = (e.layerY ? e.layerY : e.offsetY);
+ var client = e.layerY || e.offsetY || 0;
var screen = e.pageY;
this.originPos = this.originPos.y;
}
this.startPoint = this.lastPoint = screen;
this.screenToClientOffset = screen - client;
this.dragOffset = this.lastPoint - this.paneBefore.sizeActual - this.originPos - this.paneBefore.position;
if(!this.activeSizing){
this._showSizingLine();
}
- //
+ //
// attach mouse events
//
- this._connects = [];
- this._connects.push(dojo.connect(document.documentElement, "onmousemove", this, "changeSizing"));
- this._connects.push(dojo.connect(document.documentElement, "onmouseup", this, "endSizing"));
+ this._ownconnects = [];
+ this._ownconnects.push(dojo.connect(dojo.doc.documentElement, "onmousemove", this, "changeSizing"));
+ this._ownconnects.push(dojo.connect(dojo.doc.documentElement, "onmouseup", this, "endSizing"));
dojo.stopEvent(e);
},
changeSizing: function(e){
if(!this.isSizing){ return; }
this.lastPoint = this.isHorizontal ? e.pageX : e.pageY;
this.movePoint();
if(this.activeSizing){
this._updateSize();
}else{
this._moveSizingLine();
}
dojo.stopEvent(e);
},
endSizing: function(e){
if(!this.isSizing){ return; }
if(this.cover){
this.cover.style.zIndex = -1;
}
if(!this.activeSizing){
this._hideSizingLine();
}
this._updateSize();
this.isSizing = false;
if(this.persist){
this._saveState(this);
}
- dojo.forEach(this._connects,dojo.disconnect);
+ dojo.forEach(this._ownconnects, dojo.disconnect);
},
movePoint: function(){
// make sure lastPoint is a legal point to drag to
var p = this.lastPoint - this.screenToClientOffset;
var a = p - this.dragOffset;
a = this.legaliseSplitPoint(a);
p = a + this.dragOffset;
this.lastPoint = p + this.screenToClientOffset;
},
legaliseSplitPoint: function(a){
a += this.sizingSplitter.position;
this.isDraggingLeft = !!(a > 0);
if(!this.activeSizing){
var min = this.paneBefore.position + this.paneBefore.sizeMin;
if(a < min){
a = min;
}
var max = this.paneAfter.position + (this.paneAfter.sizeActual - (this.sizerWidth + this.paneAfter.sizeMin));
if(a > max){
a = max;
}
}
a -= this.sizingSplitter.position;
this._checkSizes();
return a;
},
_updateSize: function(){
//FIXME: sometimes this.lastPoint is NaN
var pos = this.lastPoint - this.dragOffset - this.originPos;
var start_region = this.paneBefore.position;
- var end_region = this.paneAfter.position + this.paneAfter.sizeActual;
+ var end_region = this.paneAfter.position + this.paneAfter.sizeActual;
this.paneBefore.sizeActual = pos - start_region;
this.paneAfter.position = pos + this.sizerWidth;
- this.paneAfter.sizeActual = end_region - this.paneAfter.position;
+ this.paneAfter.sizeActual = end_region - this.paneAfter.position;
dojo.forEach(this.getChildren(), function(child){
child.sizeShare = child.sizeActual;
});
if(this._started){
this.layout();
}
},
_showSizingLine: function(){
this._moveSizingLine();
dojo.marginBox(this.virtualSizer,
this.isHorizontal ? { w: this.sizerWidth, h: this.paneHeight } : { w: this.paneWidth, h: this.sizerWidth });
this.virtualSizer.style.display = 'block';
},
_hideSizingLine: function(){
this.virtualSizer.style.display = 'none';
},
_moveSizingLine: function(){
var pos = (this.lastPoint - this.startPoint) + this.sizingSplitter.position;
dojo.style(this.virtualSizer,(this.isHorizontal ? "left" : "top"),pos+"px");
// this.virtualSizer.style[ this.isHorizontal ? "left" : "top" ] = pos + 'px'; // FIXME: remove this line if the previous is better
},
_getCookieName: function(i){
return this.id + "_" + i;
},
_restoreState: function(){
dojo.forEach(this.getChildren(), function(child, i){
var cookieName = this._getCookieName(i);
var cookieValue = dojo.cookie(cookieName);
if(cookieValue){
var pos = parseInt(cookieValue);
if(typeof pos == "number"){
child.sizeShare = pos;
}
}
}, this);
},
_saveState: function(){
+ if(!this.persist){
+ return;
+ }
dojo.forEach(this.getChildren(), function(child, i){
- dojo.cookie(this._getCookieName(i), child.sizeShare);
+ dojo.cookie(this._getCookieName(i), child.sizeShare, {expires:365});
}, this);
}
});
// These arguments can be specified for the children of a SplitContainer.
// Since any widget can be specified as a SplitContainer child, mix them
// into the base widget class. (This is a hack, but it's effective.)
dojo.extend(dijit._Widget, {
- // sizeMin: Integer
- // Minimum size (width or height) of a child of a SplitContainer.
- // The value is relative to other children's sizeShare properties.
+ // sizeMin: [deprecated] Integer
+ // Deprecated. Parameter for children of `dijit.layout.SplitContainer`.
+ // Minimum size (width or height) of a child of a SplitContainer.
+ // The value is relative to other children's sizeShare properties.
sizeMin: 10,
- // sizeShare: Integer
- // Size (width or height) of a child of a SplitContainer.
- // The value is relative to other children's sizeShare properties.
- // For example, if there are two children and each has sizeShare=10, then
- // each takes up 50% of the available space.
+ // sizeShare: [deprecated] Integer
+ // Deprecated. Parameter for children of `dijit.layout.SplitContainer`.
+ // Size (width or height) of a child of a SplitContainer.
+ // The value is relative to other children's sizeShare properties.
+ // For example, if there are two children and each has sizeShare=10, then
+ // each takes up 50% of the available space.
sizeShare: 10
});
}
-if(!dojo._hasResource["dijit.layout.TabContainer"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.layout.TabContainer"] = true;
-dojo.provide("dijit.layout.TabContainer");
-
-
-
-
-dojo.declare("dijit.layout.TabContainer",
+if(!dojo._hasResource["dijit.layout._TabContainerBase"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.layout._TabContainerBase"] = true;
+dojo.provide("dijit.layout._TabContainerBase");
+
+
+
+
+dojo.declare("dijit.layout._TabContainerBase",
[dijit.layout.StackContainer, dijit._Templated],
- {
- // summary:
- // A Container with Title Tabs, each one pointing at a pane in the container.
+ {
+ // summary:
+ // Abstract base class for TabContainer. Must define _makeController() to instantiate
+ // and return the widget that displays the tab labels
// description:
- // A TabContainer is a container that has multiple panes, but shows only
- // one pane at a time. There are a set of tabs corresponding to each pane,
- // where each tab has the title (aka title) of the pane, and optionally a close button.
- //
- // Publishes topics <widgetId>-addChild, <widgetId>-removeChild, and <widgetId>-selectChild
- // (where <widgetId> is the id of the TabContainer itself.
- //
+ // A TabContainer is a container that has multiple panes, but shows only
+ // one pane at a time. There are a set of tabs corresponding to each pane,
+ // where each tab has the name (aka title) of the pane, and optionally a close button.
+
// tabPosition: String
- // Defines where tabs go relative to tab content.
- // "top", "bottom", "left-h", "right-h"
+ // Defines where tabs go relative to tab content.
+ // "top", "bottom", "left-h", "right-h"
tabPosition: "top",
- templateString: null, // override setting in StackContainer
- templateString:"<div class=\"dijitTabContainer\">\n\t<div dojoAttachPoint=\"tablistNode\"></div>\n\t<div class=\"dijitTabPaneWrapper\" dojoAttachPoint=\"containerNode\"></div>\n</div>\n",
-
- postCreate: function(){
- dijit.layout.TabContainer.superclass.postCreate.apply(this, arguments);
- // create the tab list that will have a tab (a.k.a. tab button) for each tab panel
- this.tablist = new dijit.layout.TabController(
- {
- id: this.id + "_tablist",
- tabPosition: this.tabPosition,
- doLayout: this.doLayout,
- containerId: this.id
- }, this.tablistNode);
- },
-
- _setupChild: function(/* Widget */tab){
+ baseClass: "dijitTabContainer",
+
+ // tabStrip: Boolean
+ // Defines whether the tablist gets an extra class for layouting, putting a border/shading
+ // around the set of tabs.
+ tabStrip: false,
+
+ // nested: Boolean
+ // If true, use styling for a TabContainer nested inside another TabContainer.
+ // For tundra etc., makes tabs look like links, and hides the outer
+ // border since the outer TabContainer already has a border.
+ nested: false,
+
+ templateString: dojo.cache("dijit.layout", "templates/TabContainer.html", "<div class=\"dijitTabContainer\">\n\t<div class=\"dijitTabListWrapper\" dojoAttachPoint=\"tablistNode\"></div>\n\t<div dojoAttachPoint=\"tablistSpacer\" class=\"dijitTabSpacer ${baseClass}-spacer\"></div>\n\t<div class=\"dijitTabPaneWrapper ${baseClass}-container\" dojoAttachPoint=\"containerNode\"></div>\n</div>\n"),
+
+ postMixInProperties: function(){
+ // set class name according to tab position, ex: dijitTabContainerTop
+ this.baseClass += this.tabPosition.charAt(0).toUpperCase() + this.tabPosition.substr(1).replace(/-.*/, "");
+
+ this.srcNodeRef && dojo.style(this.srcNodeRef, "visibility", "hidden");
+
+ this.inherited(arguments);
+ },
+
+ postCreate: function(){
+ this.inherited(arguments);
+
+ // Create the tab list that will have a tab (a.k.a. tab button) for each tab panel
+ this.tablist = this._makeController(this.tablistNode);
+
+ if(!this.doLayout){ dojo.addClass(this.domNode, "dijitTabContainerNoLayout"); }
+
+ if(this.nested){
+ /* workaround IE's lack of support for "a > b" selectors by
+ * tagging each node in the template.
+ */
+ dojo.addClass(this.domNode, "dijitTabContainerNested");
+ dojo.addClass(this.tablist.containerNode, "dijitTabContainerTabListNested");
+ dojo.addClass(this.tablistSpacer, "dijitTabContainerSpacerNested");
+ dojo.addClass(this.containerNode, "dijitTabPaneWrapperNested");
+ }else{
+ dojo.addClass(this.domNode, "tabStrip-" + (this.tabStrip ? "enabled" : "disabled"));
+ }
+ },
+
+ _setupChild: function(/*dijit._Widget*/ tab){
+ // Overrides StackContainer._setupChild().
dojo.addClass(tab.domNode, "dijitTabPane");
- this.inherited("_setupChild",arguments);
- return tab; // Widget
+ this.inherited(arguments);
},
startup: function(){
if(this._started){ return; }
// wire up the tablist and its tabs
this.tablist.startup();
- this.inherited("startup",arguments);
-
- if(dojo.isSafari){
- // sometimes safari 3.0.3 miscalculates the height of the tab labels, see #4058
- setTimeout(dojo.hitch(this, "layout"), 0);
- }
+
+ this.inherited(arguments);
},
layout: function(){
- // Summary: Configure the content pane to take up all the space except for where the tabs are
- if(!this.doLayout){ return; }
-
- // position and size the titles and the container node
- var titleAlign=this.tabPosition.replace(/-h/,"");
- var children = [
- {domNode: this.tablist.domNode, layoutAlign: titleAlign},
- {domNode: this.containerNode, layoutAlign: "client"}
- ];
- dijit.layout.layoutChildren(this.domNode, this._contentBox, children);
-
- // Compute size to make each of my children.
- // children[1] is the margin-box size of this.containerNode, set by layoutChildren() call above
- this._containerContentBox = dijit.layout.marginBox2contentBox(this.containerNode, children[1]);
-
- if(this.selectedChildWidget){
- this._showChild(this.selectedChildWidget);
- if(this.doLayout && this.selectedChildWidget.resize){
- this.selectedChildWidget.resize(this._containerContentBox);
+ // Overrides StackContainer.layout().
+ // Configure the content pane to take up all the space except for where the tabs are
+
+ if(!this._contentBox || typeof(this._contentBox.l) == "undefined"){return;}
+
+ var sc = this.selectedChildWidget;
+
+ if(this.doLayout){
+ // position and size the titles and the container node
+ var titleAlign = this.tabPosition.replace(/-h/, "");
+ this.tablist.layoutAlign = titleAlign;
+ var children = [this.tablist, {
+ domNode: this.tablistSpacer,
+ layoutAlign: titleAlign
+ }, {
+ domNode: this.containerNode,
+ layoutAlign: "client"
+ }];
+ dijit.layout.layoutChildren(this.domNode, this._contentBox, children);
+
+ // Compute size to make each of my children.
+ // children[2] is the margin-box size of this.containerNode, set by layoutChildren() call above
+ this._containerContentBox = dijit.layout.marginBox2contentBox(this.containerNode, children[2]);
+
+ if(sc && sc.resize){
+ sc.resize(this._containerContentBox);
+ }
+ }else{
+ // just layout the tab controller, so it can position left/right buttons etc.
+ if(this.tablist.resize){
+ this.tablist.resize({w: dojo.contentBox(this.domNode).w});
+ }
+
+ // and call resize() on the selected pane just to tell it that it's been made visible
+ if(sc && sc.resize){
+ sc.resize();
+ }
+ }
+ },
+
+ destroy: function(){
+ if(this.tablist){
+ this.tablist.destroy();
+ }
+ this.inherited(arguments);
+ }
+});
+
+
+}
+
+if(!dojo._hasResource["dijit.layout.TabController"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.layout.TabController"] = true;
+dojo.provide("dijit.layout.TabController");
+
+
+
+// Menu is used for an accessible close button, would be nice to have a lighter-weight solution
+
+
+
+
+
+dojo.declare("dijit.layout.TabController",
+ dijit.layout.StackController,
+{
+ // summary:
+ // Set of tabs (the things with titles and a close button, that you click to show a tab panel).
+ // Used internally by `dijit.layout.TabContainer`.
+ // description:
+ // Lets the user select the currently shown pane in a TabContainer or StackContainer.
+ // TabController also monitors the TabContainer, and whenever a pane is
+ // added or deleted updates itself accordingly.
+ // tags:
+ // private
+
+ templateString: "<div wairole='tablist' dojoAttachEvent='onkeypress:onkeypress'></div>",
+
+ // tabPosition: String
+ // Defines where tabs go relative to the content.
+ // "top", "bottom", "left-h", "right-h"
+ tabPosition: "top",
+
+ // buttonWidget: String
+ // The name of the tab widget to create to correspond to each page
+ buttonWidget: "dijit.layout._TabButton",
+
+ _rectifyRtlTabList: function(){
+ // summary:
+ // For left/right TabContainer when page is RTL mode, rectify the width of all tabs to be equal, otherwise the tab widths are different in IE
+
+ if(0 >= this.tabPosition.indexOf('-h')){ return; }
+ if(!this.pane2button){ return; }
+
+ var maxWidth = 0;
+ for(var pane in this.pane2button){
+ var ow = this.pane2button[pane].innerDiv.scrollWidth;
+ maxWidth = Math.max(maxWidth, ow);
+ }
+ //unify the length of all the tabs
+ for(pane in this.pane2button){
+ this.pane2button[pane].innerDiv.style.width = maxWidth + 'px';
+ }
+ }
+});
+
+dojo.declare("dijit.layout._TabButton",
+ dijit.layout._StackButton,
+ {
+ // summary:
+ // A tab (the thing you click to select a pane).
+ // description:
+ // Contains the title of the pane, and optionally a close-button to destroy the pane.
+ // This is an internal widget and should not be instantiated directly.
+ // tags:
+ // private
+
+ // baseClass: String
+ // The CSS class applied to the domNode.
+ baseClass: "dijitTab",
+
+ templateString: dojo.cache("dijit.layout", "templates/_TabButton.html", "<div waiRole=\"presentation\" dojoAttachPoint=\"titleNode\" dojoAttachEvent='onclick:onClick,onmouseenter:_onMouse,onmouseleave:_onMouse'>\n <div waiRole=\"presentation\" class='dijitTabInnerDiv' dojoAttachPoint='innerDiv'>\n <div waiRole=\"presentation\" class='dijitTabContent' dojoAttachPoint='tabContent,focusNode'>\n\t <img src=\"${_blankGif}\" alt=\"\" dojoAttachPoint='iconNode' waiRole=\"presentation\"/>\n\t <span dojoAttachPoint='containerNode' class='tabLabel'></span>\n\t <span class=\"closeButton\" dojoAttachPoint='closeNode'\n\t \t\tdojoAttachEvent='onclick: onClickCloseButton, onmouseenter: _onCloseButtonEnter, onmouseleave: _onCloseButtonLeave'>\n\t \t<img src=\"${_blankGif}\" alt=\"\" dojoAttachPoint='closeIcon' class='closeImage' waiRole=\"presentation\"/>\n\t <span dojoAttachPoint='closeText' class='closeText'>x</span>\n\t </span>\n </div>\n </div>\n</div>\n"),
+
+ // Override _FormWidget.scrollOnFocus.
+ // Don't scroll the whole tab container into view when the button is focused.
+ scrollOnFocus: false,
+
+ postMixInProperties: function(){
+ // Override blank iconClass from Button to do tab height adjustment on IE6,
+ // to make sure that tabs with and w/out close icons are same height
+ if(!this.iconClass){
+ this.iconClass = "dijitTabButtonIcon";
+ }
+ },
+
+ postCreate: function(){
+ this.inherited(arguments);
+ dojo.setSelectable(this.containerNode, false);
+
+ // If a custom icon class has not been set for the
+ // tab icon, set its width to one pixel. This ensures
+ // that the height styling of the tab is maintained,
+ // as it is based on the height of the icon.
+ // TODO: I still think we can just set dijitTabButtonIcon to 1px in CSS <Bill>
+ if(this.iconNode.className == "dijitTabButtonIcon"){
+ dojo.style(this.iconNode, "width", "1px");
+ }
+ },
+
+ startup: function(){
+ this.inherited(arguments);
+ var n = this.domNode;
+
+ // Required to give IE6 a kick, as it initially hides the
+ // tabs until they are focused on.
+ setTimeout(function(){
+ n.className = n.className;
+ }, 1);
+ },
+
+ _setCloseButtonAttr: function(disp){
+ this.closeButton = disp;
+ dojo.toggleClass(this.innerDiv, "dijitClosable", disp);
+ this.closeNode.style.display = disp ? "" : "none";
+ if(disp){
+ var _nlsResources = dojo.i18n.getLocalization("dijit", "common");
+ if(this.closeNode){
+ dojo.attr(this.closeNode,"title", _nlsResources.itemClose);
+ if (dojo.isIE<8){
+ // IE<8 needs title set directly on image. Only set for IE since alt=""
+ // for this node and WCAG 2.0 does not allow title when alt=""
+ dojo.attr(this.closeIcon, "title", _nlsResources.itemClose);
+ }
+ }
+ // add context menu onto title button
+ var _nlsResources = dojo.i18n.getLocalization("dijit", "common");
+ this._closeMenu = new dijit.Menu({
+ id: this.id+"_Menu",
+ targetNodeIds: [this.domNode]
+ });
+
+ this._closeMenu.addChild(new dijit.MenuItem({
+ label: _nlsResources.itemClose,
+ onClick: dojo.hitch(this, "onClickCloseButton")
+ }));
+ }else{
+ if(this._closeMenu){
+ this._closeMenu.destroyRecursive();
+ delete this._closeMenu;
}
}
},
destroy: function(){
- this.tablist.destroy();
- this.inherited("destroy",arguments);
- }
-});
-
-//TODO: make private?
-dojo.declare("dijit.layout.TabController",
- dijit.layout.StackController,
- {
- // summary:
- // Set of tabs (the things with titles and a close button, that you click to show a tab panel).
- // description:
- // Lets the user select the currently shown pane in a TabContainer or StackContainer.
- // TabController also monitors the TabContainer, and whenever a pane is
- // added or deleted updates itself accordingly.
-
- templateString: "<div wairole='tablist' dojoAttachEvent='onkeypress:onkeypress'></div>",
-
- // tabPosition: String
- // Defines where tabs go relative to the content.
- // "top", "bottom", "left-h", "right-h"
- tabPosition: "top",
-
- // doLayout: Boolean
- // TODOC: deprecate doLayout? not sure.
- doLayout: true,
-
- // buttonWidget: String
- // the name of the tab widget to create to correspond to each page
- buttonWidget: "dijit.layout._TabButton",
-
- postMixInProperties: function(){
- this["class"] = "dijitTabLabels-" + this.tabPosition + (this.doLayout ? "" : " dijitTabNoLayout");
- this.inherited("postMixInProperties",arguments);
- }
-});
-
-dojo.declare("dijit.layout._TabButton",
- dijit.layout._StackButton,
- {
- // summary:
- // A tab (the thing you click to select a pane).
- // description:
- // Contains the title of the pane, and optionally a close-button to destroy the pane.
- // This is an internal widget and should not be instantiated directly.
-
- baseClass: "dijitTab",
-
- templateString:"<div dojoAttachEvent='onclick:onClick,onmouseenter:_onMouse,onmouseleave:_onMouse'>\n <div class='dijitTabInnerDiv' dojoAttachPoint='innerDiv'>\n <span dojoAttachPoint='containerNode,focusNode'>${!label}</span>\n <span dojoAttachPoint='closeButtonNode' class='closeImage' dojoAttachEvent='onmouseenter:_onMouse, onmouseleave:_onMouse, onclick:onClickCloseButton' stateModifier='CloseButton'>\n <span dojoAttachPoint='closeText' class='closeText'>x</span>\n </span>\n </div>\n</div>\n",
+ if(this._closeMenu){
+ this._closeMenu.destroyRecursive();
+ delete this._closeMenu;
+ }
+ this.inherited(arguments);
+ },
+
+ _onCloseButtonEnter: function(){
+ // summary:
+ // Handler when mouse is moved over the close icon (the X)
+ dojo.addClass(this.closeNode, "closeButton-hover");
+ },
+
+ _onCloseButtonLeave: function(){
+ // summary:
+ // Handler when mouse is moved off the close icon (the X)
+ dojo.removeClass(this.closeNode, "closeButton-hover");
+ }
+});
+
+}
+
+if(!dojo._hasResource["dijit.layout.ScrollingTabController"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.layout.ScrollingTabController"] = true;
+dojo.provide("dijit.layout.ScrollingTabController");
+
+
+
+
+dojo.declare("dijit.layout.ScrollingTabController",
+ dijit.layout.TabController,
+ {
+ // summary:
+ // Set of tabs with left/right arrow keys and a menu to switch between tabs not
+ // all fitting on a single row.
+ // Works only for horizontal tabs (either above or below the content, not to the left
+ // or right).
+ // tags:
+ // private
+
+ templateString: dojo.cache("dijit.layout", "templates/ScrollingTabController.html", "<div class=\"dijitTabListContainer-${tabPosition}\" style=\"visibility:hidden\">\n\t<div dojoType=\"dijit.layout._ScrollingTabControllerButton\" buttonType=\"menuBtn\" buttonClass=\"tabStripMenuButton\"\n\t\t\ttabPosition=\"${tabPosition}\" dojoAttachPoint=\"_menuBtn\" showLabel=false>&darr;</div>\n\t<div dojoType=\"dijit.layout._ScrollingTabControllerButton\" buttonType=\"leftBtn\" buttonClass=\"tabStripSlideButtonLeft\"\n\t\t\ttabPosition=\"${tabPosition}\" dojoAttachPoint=\"_leftBtn\" dojoAttachEvent=\"onClick: doSlideLeft\" showLabel=false>&larr;</div>\n\t<div dojoType=\"dijit.layout._ScrollingTabControllerButton\" buttonType=\"rightBtn\" buttonClass=\"tabStripSlideButtonRight\"\n\t\t\ttabPosition=\"${tabPosition}\" dojoAttachPoint=\"_rightBtn\" dojoAttachEvent=\"onClick: doSlideRight\" showLabel=false>&rarr;</div>\n\t<div class='dijitTabListWrapper' dojoAttachPoint='tablistWrapper'>\n\t\t<div wairole='tablist' dojoAttachEvent='onkeypress:onkeypress'\n\t\t\t\tdojoAttachPoint='containerNode' class='nowrapTabStrip'>\n\t\t</div>\n\t</div>\n</div>\n"),
+
+ // useMenu:[const] Boolean
+ // True if a menu should be used to select tabs when they are too
+ // wide to fit the TabContainer, false otherwise.
+ useMenu: true,
+
+ // useSlider: [const] Boolean
+ // True if a slider should be used to select tabs when they are too
+ // wide to fit the TabContainer, false otherwise.
+ useSlider: true,
+
+ // tabStripClass: String
+ // The css class to apply to the tab strip, if it is visible.
+ tabStripClass: "",
+
+ widgetsInTemplate: true,
+
+ // _minScroll: Number
+ // The distance in pixels from the edge of the tab strip which,
+ // if a scroll animation is less than, forces the scroll to
+ // go all the way to the left/right.
+ _minScroll: 5,
+
+ attributeMap: dojo.delegate(dijit._Widget.prototype.attributeMap, {
+ "class": "containerNode"
+ }),
postCreate: function(){
- if(this.closeButton){
- dojo.addClass(this.innerDiv, "dijitClosable");
- } else {
- this.closeButtonNode.style.display="none";
- }
- this.inherited("postCreate",arguments);
- dojo.setSelectable(this.containerNode, false);
- }
-});
+ this.inherited(arguments);
+ var n = this.domNode;
+
+ this.scrollNode = this.tablistWrapper;
+ this._initButtons();
+
+ if(!this.tabStripClass){
+ this.tabStripClass = "dijitTabContainer" +
+ this.tabPosition.charAt(0).toUpperCase() +
+ this.tabPosition.substr(1).replace(/-.*/, "") +
+ "None";
+ dojo.addClass(n, "tabStrip-disabled")
+ }
+
+ dojo.addClass(this.tablistWrapper, this.tabStripClass);
+ },
+
+ onStartup: function(){
+ this.inherited(arguments);
+
+ // Do not show the TabController until the related
+ // StackController has added it's children. This gives
+ // a less visually jumpy instantiation.
+ dojo.style(this.domNode, "visibility", "visible");
+ this._postStartup = true;
+ },
+
+ onAddChild: function(page, insertIndex){
+ this.inherited(arguments);
+ var menuItem;
+ if(this.useMenu){
+ var containerId = this.containerId;
+ menuItem = new dijit.MenuItem({
+ label: page.title,
+ onClick: dojo.hitch(this, function(){
+ var container = dijit.byId(containerId);
+ container.selectChild(page);
+ })
+ });
+ this._menuChildren[page.id] = menuItem;
+ this._menu.addChild(menuItem, insertIndex);
+ }
+
+ // update the menuItem label when the button label is updated
+ this.pane2handles[page.id].push(
+ this.connect(this.pane2button[page.id], "attr", function(name, value){
+ if(this._postStartup){
+ if(arguments.length == 2 && name == "label"){
+ if(menuItem){
+ menuItem.attr(name, value);
+ }
+
+ // The changed label will have changed the width of the
+ // buttons, so do a resize
+ if(this._dim){
+ this.resize(this._dim);
+ }
+ }
+ }
+ })
+ );
+
+ // Increment the width of the wrapper when a tab is added
+ // This makes sure that the buttons never wrap.
+ // The value 200 is chosen as it should be bigger than most
+ // Tab button widths.
+ dojo.style(this.containerNode, "width",
+ (dojo.style(this.containerNode, "width") + 200) + "px");
+ },
+
+ onRemoveChild: function(page, insertIndex){
+ // null out _selectedTab because we are about to delete that dom node
+ var button = this.pane2button[page.id];
+ if(this._selectedTab === button.domNode){
+ this._selectedTab = null;
+ }
+
+ // delete menu entry corresponding to pane that was removed from TabContainer
+ if(this.useMenu && page && page.id && this._menuChildren[page.id]){
+ this._menu.removeChild(this._menuChildren[page.id]);
+ this._menuChildren[page.id].destroy();
+ delete this._menuChildren[page.id];
+ }
+
+ this.inherited(arguments);
+ },
+
+ _initButtons: function(){
+ // summary:
+ // Creates the buttons used to scroll to view tabs that
+ // may not be visible if the TabContainer is too narrow.
+ this._menuChildren = {};
+
+ // Make a list of the buttons to display when the tab labels become
+ // wider than the TabContainer, and hide the other buttons.
+ // Also gets the total width of the displayed buttons.
+ this._btnWidth = 0;
+ this._buttons = dojo.query("> .tabStripButton", this.domNode).filter(function(btn){
+ if((this.useMenu && btn == this._menuBtn.domNode) ||
+ (this.useSlider && (btn == this._rightBtn.domNode || btn == this._leftBtn.domNode))){
+ this._btnWidth += dojo.marginBox(btn).w;
+ return true;
+ }else{
+ dojo.style(btn, "display", "none");
+ return false;
+ }
+ }, this);
+
+ if(this.useMenu){
+ // Create the menu that is used to select tabs.
+ this._menu = new dijit.Menu({
+ id: this.id + "_menu",
+ targetNodeIds: [this._menuBtn.domNode],
+ leftClickToOpen: true,
+ refocus: false // selecting a menu item sets focus to a TabButton
+ });
+ this._supportingWidgets.push(this._menu);
+ }
+ },
+
+ _getTabsWidth: function(){
+ var children = this.getChildren();
+ if(children.length){
+ var leftTab = children[this.isLeftToRight() ? 0 : children.length - 1].domNode,
+ rightTab = children[this.isLeftToRight() ? children.length - 1 : 0].domNode;
+ return rightTab.offsetLeft + dojo.style(rightTab, "width") - leftTab.offsetLeft;
+ }else{
+ return 0;
+ }
+ },
+
+ _enableBtn: function(width){
+ // summary:
+ // Determines if the tabs are wider than the width of the TabContainer, and
+ // thus that we need to display left/right/menu navigation buttons.
+ var tabsWidth = this._getTabsWidth();
+ width = width || dojo.style(this.scrollNode, "width");
+ return tabsWidth > 0 && width < tabsWidth;
+ },
+
+ resize: function(dim){
+ // summary:
+ // Hides or displays the buttons used to scroll the tab list and launch the menu
+ // that selects tabs.
+
+ if(this.domNode.offsetWidth == 0){
+ return;
+ }
+
+ // Save the dimensions to be used when a child is renamed.
+ this._dim = dim;
+
+ // Set my height to be my natural height (tall enough for one row of tab labels),
+ // and my content-box width based on margin-box width specified in dim parameter.
+ // But first reset scrollNode.height in case it was set by layoutChildren() call
+ // in a previous run of this method.
+ this.scrollNode.style.height = "auto";
+ this._contentBox = dijit.layout.marginBox2contentBox(this.domNode, {h: 0, w: dim.w});
+ this._contentBox.h = this.scrollNode.offsetHeight;
+ dojo.contentBox(this.domNode, this._contentBox);
+
+ // Show/hide the left/right/menu navigation buttons depending on whether or not they
+ // are needed.
+ var enable = this._enableBtn(this._contentBox.w);
+ this._buttons.style("display", enable ? "" : "none");
+
+ // Position and size the navigation buttons and the tablist
+ this._leftBtn.layoutAlign = "left";
+ this._rightBtn.layoutAlign = "right";
+ this._menuBtn.layoutAlign = this.isLeftToRight() ? "right" : "left";
+ dijit.layout.layoutChildren(this.domNode, this._contentBox,
+ [this._menuBtn, this._leftBtn, this._rightBtn, {domNode: this.scrollNode, layoutAlign: "client"}]);
+
+ // set proper scroll so that selected tab is visible
+ if(this._selectedTab){
+ var w = this.scrollNode,
+ sl = this._convertToScrollLeft(this._getScrollForSelectedTab());
+ w.scrollLeft = sl;
+ }
+
+ // Enable/disabled left right buttons depending on whether or not user can scroll to left or right
+ this._setButtonClass(this._getScroll());
+ },
+
+ _getScroll: function(){
+ // summary:
+ // Returns the current scroll of the tabs where 0 means
+ // "scrolled all the way to the left" and some positive number, based on #
+ // of pixels of possible scroll (ex: 1000) means "scrolled all the way to the right"
+ var sl = (this.isLeftToRight() || dojo.isIE < 8 || dojo.isQuirks || dojo.isWebKit) ? this.scrollNode.scrollLeft :
+ dojo.style(this.containerNode, "width") - dojo.style(this.scrollNode, "width")
+ + (dojo.isIE == 8 ? -1 : 1) * this.scrollNode.scrollLeft;
+ return sl;
+ },
+
+ _convertToScrollLeft: function(val){
+ // summary:
+ // Given a scroll value where 0 means "scrolled all the way to the left"
+ // and some positive number, based on # of pixels of possible scroll (ex: 1000)
+ // means "scrolled all the way to the right", return value to set this.scrollNode.scrollLeft
+ // to achieve that scroll.
+ //
+ // This method is to adjust for RTL funniness in various browsers and versions.
+ if(this.isLeftToRight() || dojo.isIE < 8 || dojo.isQuirks || dojo.isWebKit){
+ return val;
+ }else{
+ var maxScroll = dojo.style(this.containerNode, "width") - dojo.style(this.scrollNode, "width");
+ return (dojo.isIE == 8 ? -1 : 1) * (val - maxScroll);
+ }
+ },
+
+ onSelectChild: function(/*dijit._Widget*/ page){
+ // summary:
+ // Smoothly scrolls to a tab when it is selected.
+
+ var tab = this.pane2button[page.id];
+ if(!tab || !page){return;}
+
+ var node = tab.domNode;
+ if(node != this._selectedTab){
+ this._selectedTab = node;
+
+ var sl = this._getScroll();
+
+ if(sl > node.offsetLeft ||
+ sl + dojo.style(this.scrollNode, "width") <
+ node.offsetLeft + dojo.style(node, "width")){
+ this.createSmoothScroll().play();
+ }
+ }
+
+ this.inherited(arguments);
+ },
+
+ _getScrollBounds: function(){
+ // summary:
+ // Returns the minimum and maximum scroll setting to show the leftmost and rightmost
+ // tabs (respectively)
+ var children = this.getChildren(),
+ scrollNodeWidth = dojo.style(this.scrollNode, "width"), // about 500px
+ containerWidth = dojo.style(this.containerNode, "width"), // 50,000px
+ maxPossibleScroll = containerWidth - scrollNodeWidth, // scrolling until right edge of containerNode visible
+ tabsWidth = this._getTabsWidth();
+
+ if(children.length && tabsWidth > scrollNodeWidth){
+ // Scrolling should happen
+ return {
+ min: this.isLeftToRight() ? 0 : children[children.length-1].domNode.offsetLeft,
+ max: this.isLeftToRight() ?
+ (children[children.length-1].domNode.offsetLeft + dojo.style(children[children.length-1].domNode, "width")) - scrollNodeWidth :
+ maxPossibleScroll
+ };
+ }else{
+ // No scrolling needed, all tabs visible, we stay either scrolled to far left or far right (depending on dir)
+ var onlyScrollPosition = this.isLeftToRight() ? 0 : maxPossibleScroll;
+ return {
+ min: onlyScrollPosition,
+ max: onlyScrollPosition
+ };
+ }
+ },
+
+ _getScrollForSelectedTab: function(){
+ // summary:
+ // Returns the scroll value setting so that the selected tab
+ // will appear in the center
+ var w = this.scrollNode,
+ n = this._selectedTab,
+ scrollNodeWidth = dojo.style(this.scrollNode, "width"),
+ scrollBounds = this._getScrollBounds();
+
+ // TODO: scroll minimal amount (to either right or left) so that
+ // selected tab is fully visible, and just return if it's already visible?
+ var pos = (n.offsetLeft + dojo.style(n, "width")/2) - scrollNodeWidth/2;
+ pos = Math.min(Math.max(pos, scrollBounds.min), scrollBounds.max);
+
+ // TODO:
+ // If scrolling close to the left side or right side, scroll
+ // all the way to the left or right. See this._minScroll.
+ // (But need to make sure that doesn't scroll the tab out of view...)
+ return pos;
+ },
+
+ createSmoothScroll : function(x){
+ // summary:
+ // Creates a dojo._Animation object that smoothly scrolls the tab list
+ // either to a fixed horizontal pixel value, or to the selected tab.
+ // description:
+ // If an number argument is passed to the function, that horizontal
+ // pixel position is scrolled to. Otherwise the currently selected
+ // tab is scrolled to.
+ // x: Integer?
+ // An optional pixel value to scroll to, indicating distance from left.
+
+ // Calculate position to scroll to
+ if(arguments.length > 0){
+ // position specified by caller, just make sure it's within bounds
+ var scrollBounds = this._getScrollBounds();
+ x = Math.min(Math.max(x, scrollBounds.min), scrollBounds.max);
+ }else{
+ // scroll to center the current tab
+ x = this._getScrollForSelectedTab();
+ }
+
+ if(this._anim && this._anim.status() == "playing"){
+ this._anim.stop();
+ }
+
+ var self = this,
+ w = this.scrollNode,
+ anim = new dojo._Animation({
+ beforeBegin: function(){
+ if(this.curve){ delete this.curve; }
+ var oldS = w.scrollLeft,
+ newS = self._convertToScrollLeft(x);
+ anim.curve = new dojo._Line(oldS, newS);
+ },
+ onAnimate: function(val){
+ w.scrollLeft = val;
+ }
+ });
+ this._anim = anim;
+
+ // Disable/enable left/right buttons according to new scroll position
+ this._setButtonClass(x);
+
+ return anim; // dojo._Animation
+ },
+
+ _getBtnNode: function(e){
+ // summary:
+ // Gets a button DOM node from a mouse click event.
+ // e:
+ // The mouse click event.
+ var n = e.target;
+ while(n && !dojo.hasClass(n, "tabStripButton")){
+ n = n.parentNode;
+ }
+ return n;
+ },
+
+ doSlideRight: function(e){
+ // summary:
+ // Scrolls the menu to the right.
+ // e:
+ // The mouse click event.
+ this.doSlide(1, this._getBtnNode(e));
+ },
+
+ doSlideLeft: function(e){
+ // summary:
+ // Scrolls the menu to the left.
+ // e:
+ // The mouse click event.
+ this.doSlide(-1,this._getBtnNode(e));
+ },
+
+ doSlide: function(direction, node){
+ // summary:
+ // Scrolls the tab list to the left or right by 75% of the widget width.
+ // direction:
+ // If the direction is 1, the widget scrolls to the right, if it is
+ // -1, it scrolls to the left.
+
+ if(node && dojo.hasClass(node, "dijitTabBtnDisabled")){return;}
+
+ var sWidth = dojo.style(this.scrollNode, "width");
+ var d = (sWidth * 0.75) * direction;
+
+ var to = this._getScroll() + d;
+
+ this._setButtonClass(to);
+
+ this.createSmoothScroll(to).play();
+ },
+
+ _setButtonClass: function(scroll){
+ // summary:
+ // Adds or removes a class to the left and right scroll buttons
+ // to indicate whether each one is enabled/disabled.
+ // description:
+ // If the tabs are scrolled all the way to the left, the class
+ // 'dijitTabBtnDisabled' is added to the left button.
+ // If the tabs are scrolled all the way to the right, the class
+ // 'dijitTabBtnDisabled' is added to the right button.
+ // scroll: Integer
+ // amount of horizontal scroll
+
+ var cls = "dijitTabBtnDisabled",
+ scrollBounds = this._getScrollBounds();
+ dojo.toggleClass(this._leftBtn.domNode, cls, scroll <= scrollBounds.min);
+ dojo.toggleClass(this._rightBtn.domNode, cls, scroll >= scrollBounds.max);
+ }
+});
+
+dojo.declare("dijit.layout._ScrollingTabControllerButton",
+ dijit.form.Button,
+ {
+ baseClass: "dijitTab",
+
+ buttonType: "",
+
+ buttonClass: "",
+
+ tabPosition: "top",
+
+ templateString: dojo.cache("dijit.layout", "templates/_ScrollingTabControllerButton.html", "<div id=\"${id}-${buttonType}\" class=\"tabStripButton dijitTab ${buttonClass} tabStripButton-${tabPosition}\"\n\t\tdojoAttachEvent=\"onclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\">\n\t<div role=\"presentation\" wairole=\"presentation\" class=\"dijitTabInnerDiv\" dojoattachpoint=\"innerDiv,focusNode\">\n\t\t<div role=\"presentation\" wairole=\"presentation\" class=\"dijitTabContent dijitButtonContents\" dojoattachpoint=\"tabContent\">\n\t\t\t<img src=\"${_blankGif}\"/>\n\t\t\t<span dojoAttachPoint=\"containerNode,titleNode\" class=\"dijitButtonText\"></span>\n\t\t</div>\n\t</div>\n</div>\n"),
+
+ // Override inherited tabIndex: 0 from dijit.form.Button, because user shouldn't be
+ // able to tab to the left/right/menu buttons
+ tabIndex: ""
+ }
+);
+
+}
+
+if(!dojo._hasResource["dijit.layout.TabContainer"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.layout.TabContainer"] = true;
+dojo.provide("dijit.layout.TabContainer");
+
+
+
+
+
+dojo.declare("dijit.layout.TabContainer",
+ dijit.layout._TabContainerBase,
+ {
+ // summary:
+ // A Container with tabs to select each child (only one of which is displayed at a time).
+ // description:
+ // A TabContainer is a container that has multiple panes, but shows only
+ // one pane at a time. There are a set of tabs corresponding to each pane,
+ // where each tab has the name (aka title) of the pane, and optionally a close button.
+
+ // useMenu: [const] Boolean
+ // True if a menu should be used to select tabs when they are too
+ // wide to fit the TabContainer, false otherwise.
+ useMenu: true,
+
+ // useSlider: [const] Boolean
+ // True if a slider should be used to select tabs when they are too
+ // wide to fit the TabContainer, false otherwise.
+ useSlider: true,
+
+ // controllerWidget: String
+ // An optional parameter to override the widget used to display the tab labels
+ controllerWidget: "",
+
+ _makeController: function(/*DomNode*/ srcNode){
+ // summary:
+ // Instantiate tablist controller widget and return reference to it.
+ // Callback from _TabContainerBase.postCreate().
+ // tags:
+ // protected extension
+
+ var cls = this.baseClass + "-tabs" + (this.doLayout ? "" : " dijitTabNoLayout"),
+ TabController = dojo.getObject(this.controllerWidget);
+
+ return new TabController({
+ id: this.id + "_tablist",
+ tabPosition: this.tabPosition,
+ doLayout: this.doLayout,
+ containerId: this.id,
+ "class": cls,
+ nested: this.nested,
+ useMenu: this.useMenu,
+ useSlider: this.useSlider,
+ tabStripClass: this.tabStrip ? this.baseClass + (this.tabStrip ? "":"No") + "Strip": null
+ }, srcNode);
+ },
+
+ postMixInProperties: function(){
+ this.inherited(arguments);
+
+ // Scrolling controller only works for horizontal non-nested tabs
+ if(!this.controllerWidget){
+ this.controllerWidget = (this.tabPosition == "top" || this.tabPosition == "bottom") && !this.nested ?
+ "dijit.layout.ScrollingTabController" : "dijit.layout.TabController";
+ }
+ }
+});
+
}
if(!dojo._hasResource["dijit.dijit-all"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.dijit-all"] = true;
console.warn("dijit-all may include much more code than your application actually requires. We strongly recommend that you investigate a custom build or the web build tool");
dojo.provide("dijit.dijit-all");
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-}
-
-
-dojo.i18n._preloadLocalizations("dijit.nls.dijit-all", ["es-es", "es", "hu", "it-it", "de", "pt-br", "pl", "fr-fr", "zh-cn", "pt", "en-us", "zh", "ru", "xx", "fr", "zh-tw", "it", "cs", "en-gb", "de-de", "ja-jp", "ko-kr", "ko", "en", "ROOT", "ja"]);
+/*=====
+dijit["dijit-all"] = {
+ // summary:
+ // A rollup that includes every dijit. You probably don't need this.
+};
+=====*/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+// Form widgets
+
+
+// Button widgets
+
+
+
+
+
+
+
+// Textbox widgets
+
+
+
+
+
+
+
+// Select widgets
+
+
+
+
+// Slider widgets
+
+
+
+
+
+
+
+// Textarea widgets
+
+
+
+// Layout widgets
+
+
+
+ //deprecated
+
+ //deprecated
+
+
+
+}
+
+
+dojo.i18n._preloadLocalizations("dijit.nls.dijit-all", ["ROOT","ar","ca","cs","da","de","de-de","el","en","en-gb","en-us","es","es-es","fi","fi-fi","fr","fr-fr","he","he-il","hu","it","it-it","ja","ja-jp","ko","ko-kr","nb","nl","nl-nl","pl","pt","pt-br","pt-pt","ru","sk","sl","sv","th","tr","xx","zh","zh-cn","zh-tw"]);
diff --git a/js/dojo/dijit/dijit.js b/js/dojo/dijit/dijit.js
--- a/js/dojo/dijit/dijit.js
+++ b/js/dojo/dijit/dijit.js
@@ -1,20 +1,16 @@
/*
- Copyright (c) 2004-2007, The Dojo Foundation
- All Rights Reserved.
-
- Licensed under the Academic Free License version 2.1 or above OR the
- modified BSD license. For more information on Dojo licensing, see:
-
- http://dojotoolkit.org/book/dojo-book-0-9/introduction/licensing
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
*/
/*
This is a compiled version of Dojo, built for deployment and not for
development. To get an editable version, please visit:
http://dojotoolkit.org
for documentation and information on getting the source.
*/
-if(!dojo._hasResource["dijit._base.focus"]){dojo._hasResource["dijit._base.focus"]=true;dojo.provide("dijit._base.focus");dojo.mixin(dijit,{_curFocus:null,_prevFocus:null,isCollapsed:function(){var _1=dojo.global;var _2=dojo.doc;if(_2.selection){return !_2.selection.createRange().text;}else{if(_1.getSelection){var _3=_1.getSelection();if(dojo.isString(_3)){return !_3;}else{return _3.isCollapsed||!_3.toString();}}}},getBookmark:function(){var _4,_5=dojo.doc.selection;if(_5){var _6=_5.createRange();if(_5.type.toUpperCase()=="CONTROL"){_4=_6.length?dojo._toArray(_6):null;}else{_4=_6.getBookmark();}}else{if(dojo.global.getSelection){_5=dojo.global.getSelection();if(_5){var _6=_5.getRangeAt(0);_4=_6.cloneRange();}}else{console.debug("No idea how to store the current selection for this browser!");}}return _4;},moveToBookmark:function(_7){var _8=dojo.doc;if(_8.selection){var _9;if(dojo.isArray(_7)){_9=_8.body.createControlRange();dojo.forEach(_7,_9.addElement);}else{_9=_8.selection.createRange();_9.moveToBookmark(_7);}_9.select();}else{var _a=dojo.global.getSelection&&dojo.global.getSelection();if(_a&&_a.removeAllRanges){_a.removeAllRanges();_a.addRange(_7);}else{console.debug("No idea how to restore selection for this browser!");}}},getFocus:function(_b,_c){return {node:_b&&dojo.isDescendant(dijit._curFocus,_b.domNode)?dijit._prevFocus:dijit._curFocus,bookmark:!dojo.withGlobal(_c||dojo.global,dijit.isCollapsed)?dojo.withGlobal(_c||dojo.global,dijit.getBookmark):null,openedForWindow:_c};},focus:function(_d){if(!_d){return;}var _e="node" in _d?_d.node:_d,_f=_d.bookmark,_10=_d.openedForWindow;if(_e){var _11=(_e.tagName.toLowerCase()=="iframe")?_e.contentWindow:_e;if(_11&&_11.focus){try{_11.focus();}catch(e){}}dijit._onFocusNode(_e);}if(_f&&dojo.withGlobal(_10||dojo.global,dijit.isCollapsed)){if(_10){_10.focus();}try{dojo.withGlobal(_10||dojo.global,moveToBookmark,null,[_f]);}catch(e){}}},_activeStack:[],registerWin:function(_12){if(!_12){_12=window;}dojo.connect(_12.document,"onmousedown",null,function(evt){dijit._justMouseDowned=true;setTimeout(function(){dijit._justMouseDowned=false;},0);dijit._onTouchNode(evt.target||evt.srcElement);});var _14=_12.document.body||_12.document.getElementsByTagName("body")[0];if(_14){if(dojo.isIE){_14.attachEvent("onactivate",function(evt){if(evt.srcElement.tagName.toLowerCase()!="body"){dijit._onFocusNode(evt.srcElement);}});_14.attachEvent("ondeactivate",function(evt){dijit._onBlurNode(evt.srcElement);});}else{_14.addEventListener("focus",function(evt){dijit._onFocusNode(evt.target);},true);_14.addEventListener("blur",function(evt){dijit._onBlurNode(evt.target);},true);}}_14=null;},_onBlurNode:function(_19){dijit._prevFocus=dijit._curFocus;dijit._curFocus=null;var w=dijit.getEnclosingWidget(_19);if(w&&w._setStateClass){w._focused=false;w._setStateClass();}if(dijit._justMouseDowned){return;}if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);}dijit._clearActiveWidgetsTimer=setTimeout(function(){delete dijit._clearActiveWidgetsTimer;dijit._setStack([]);},100);},_onTouchNode:function(_1b){if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);delete dijit._clearActiveWidgetsTimer;}var _1c=[];try{while(_1b){if(_1b.dijitPopupParent){_1b=dijit.byId(_1b.dijitPopupParent).domNode;}else{if(_1b.tagName&&_1b.tagName.toLowerCase()=="body"){if(_1b===dojo.body()){break;}_1b=dojo.query("iframe").filter(function(_1d){return _1d.contentDocument.body===_1b;})[0];}else{var id=_1b.getAttribute&&_1b.getAttribute("widgetId");if(id){_1c.unshift(id);}_1b=_1b.parentNode;}}}}catch(e){}dijit._setStack(_1c);},_onFocusNode:function(_1f){if(_1f&&_1f.tagName&&_1f.tagName.toLowerCase()=="body"){return;}dijit._onTouchNode(_1f);if(_1f==dijit._curFocus){return;}dijit._prevFocus=dijit._curFocus;dijit._curFocus=_1f;dojo.publish("focusNode",[_1f]);var w=dijit.getEnclosingWidget(_1f);if(w&&w._setStateClass){w._focused=true;w._setStateClass();}},_setStack:function(_21){var _22=dijit._activeStack;dijit._activeStack=_21;for(var _23=0;_23<Math.min(_22.length,_21.length);_23++){if(_22[_23]!=_21[_23]){break;}}for(var i=_22.length-1;i>=_23;i--){var _25=dijit.byId(_22[i]);if(_25){dojo.publish("widgetBlur",[_25]);if(_25._onBlur){_25._onBlur();}}}for(var i=_23;i<_21.length;i++){var _25=dijit.byId(_21[i]);if(_25){dojo.publish("widgetFocus",[_25]);if(_25._onFocus){_25._onFocus();}}}}});dojo.addOnLoad(dijit.registerWin);}if(!dojo._hasResource["dijit._base.manager"]){dojo._hasResource["dijit._base.manager"]=true;dojo.provide("dijit._base.manager");dojo.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={};},add:function(_26){if(this._hash[_26.id]){throw new Error("Tried to register widget with id=="+_26.id+" but that id is already registered");}this._hash[_26.id]=_26;},remove:function(id){delete this._hash[id];},forEach:function(_28){for(var id in this._hash){_28(this._hash[id]);}},filter:function(_2a){var res=new dijit.WidgetSet();this.forEach(function(_2c){if(_2a(_2c)){res.add(_2c);}});return res;},byId:function(id){return this._hash[id];},byClass:function(cls){return this.filter(function(_2f){return _2f.declaredClass==cls;});}});dijit.registry=new dijit.WidgetSet();dijit._widgetTypeCtr={};dijit.getUniqueId=function(_30){var id;do{id=_30+"_"+(dijit._widgetTypeCtr[_30]!==undefined?++dijit._widgetTypeCtr[_30]:dijit._widgetTypeCtr[_30]=0);}while(dijit.byId(id));return id;};if(dojo.isIE){dojo.addOnUnload(function(){dijit.registry.forEach(function(_32){_32.destroy();});});}dijit.byId=function(id){return (dojo.isString(id))?dijit.registry.byId(id):id;};dijit.byNode=function(_34){return dijit.registry.byId(_34.getAttribute("widgetId"));};dijit.getEnclosingWidget=function(_35){while(_35){if(_35.getAttribute&&_35.getAttribute("widgetId")){return dijit.registry.byId(_35.getAttribute("widgetId"));}_35=_35.parentNode;}return null;};}if(!dojo._hasResource["dijit._base.place"]){dojo._hasResource["dijit._base.place"]=true;dojo.provide("dijit._base.place");dijit.getViewport=function(){var _36=dojo.global;var _37=dojo.doc;var w=0,h=0;if(dojo.isMozilla){var _3a,_3b,_3c,_3d;if(_37.body.clientWidth>_37.documentElement.clientWidth){_3a=_37.documentElement.clientWidth;_3c=_37.body.clientWidth;}else{_3c=_37.documentElement.clientWidth;_3a=_37.body.clientWidth;}if(_37.body.clientHeight>_37.documentElement.clientHeight){_3b=_37.documentElement.clientHeight;_3d=_37.body.clientHeight;}else{_3d=_37.documentElement.clientHeight;_3b=_37.body.clientHeight;}w=(_3c>_36.innerWidth)?_3a:_3c;h=(_3d>_36.innerHeight)?_3b:_3d;}else{if(!dojo.isOpera&&_36.innerWidth){w=_36.innerWidth;h=_36.innerHeight;}else{if(dojo.isIE&&_37.documentElement&&_37.documentElement.clientHeight){w=_37.documentElement.clientWidth;h=_37.documentElement.clientHeight;}else{if(dojo.body().clientWidth){w=dojo.body().clientWidth;h=dojo.body().clientHeight;}}}}var _3e=dojo._docScroll();return {w:w,h:h,l:_3e.x,t:_3e.y};};dijit.placeOnScreen=function(_3f,pos,_41,_42){var _43=dojo.map(_41,function(_44){return {corner:_44,pos:pos};});return dijit._place(_3f,_43);};dijit._place=function(_45,_46,_47){var _48=dijit.getViewport();if(!_45.parentNode||String(_45.parentNode.tagName).toLowerCase()!="body"){dojo.body().appendChild(_45);}var _49=null;for(var i=0;i<_46.length;i++){var _4b=_46[i].corner;var pos=_46[i].pos;if(_47){_47(_4b);}var _4d=_45.style.display;var _4e=_45.style.visibility;_45.style.visibility="hidden";_45.style.display="";var mb=dojo.marginBox(_45);_45.style.display=_4d;_45.style.visibility=_4e;var _50=(_4b.charAt(1)=="L"?pos.x:Math.max(_48.l,pos.x-mb.w)),_51=(_4b.charAt(0)=="T"?pos.y:Math.max(_48.t,pos.y-mb.h)),_52=(_4b.charAt(1)=="L"?Math.min(_48.l+_48.w,_50+mb.w):pos.x),_53=(_4b.charAt(0)=="T"?Math.min(_48.t+_48.h,_51+mb.h):pos.y),_54=_52-_50,_55=_53-_51,_56=(mb.w-_54)+(mb.h-_55);if(_49==null||_56<_49.overflow){_49={corner:_4b,aroundCorner:_46[i].aroundCorner,x:_50,y:_51,w:_54,h:_55,overflow:_56};}if(_56==0){break;}}_45.style.left=_49.x+"px";_45.style.top=_49.y+"px";return _49;};dijit.placeOnScreenAroundElement=function(_57,_58,_59,_5a){_58=dojo.byId(_58);var _5b=_58.style.display;_58.style.display="";var _5c=_58.offsetWidth;var _5d=_58.offsetHeight;var _5e=dojo.coords(_58,true);_58.style.display=_5b;var _5f=[];for(var _60 in _59){_5f.push({aroundCorner:_60,corner:_59[_60],pos:{x:_5e.x+(_60.charAt(1)=="L"?0:_5c),y:_5e.y+(_60.charAt(0)=="T"?0:_5d)}});}return dijit._place(_57,_5f,_5a);};}if(!dojo._hasResource["dijit._base.window"]){dojo._hasResource["dijit._base.window"]=true;dojo.provide("dijit._base.window");dijit.getDocumentWindow=function(doc){if(dojo.isSafari&&!doc._parentWindow){var fix=function(win){win.document._parentWindow=win;for(var i=0;i<win.frames.length;i++){fix(win.frames[i]);}};fix(window.top);}if(dojo.isIE&&window!==document.parentWindow&&!doc._parentWindow){doc.parentWindow.execScript("document._parentWindow = window;","Javascript");var win=doc._parentWindow;doc._parentWindow=null;return win;}return doc._parentWindow||doc.parentWindow||doc.defaultView;};}if(!dojo._hasResource["dijit._base.popup"]){dojo._hasResource["dijit._base.popup"]=true;dojo.provide("dijit._base.popup");dijit.popup=new function(){var _66=[],_67=1000,_68=1;this.open=function(_69){var _6a=_69.popup,_6b=_69.orient||{"BL":"TL","TL":"BL"},_6c=_69.around,id=(_69.around&&_69.around.id)?(_69.around.id+"_dropdown"):("popup_"+_68++);var _6e=dojo.doc.createElement("div");_6e.id=id;_6e.className="dijitPopup";_6e.style.zIndex=_67+_66.length;_6e.style.visibility="hidden";if(_69.parent){_6e.dijitPopupParent=_69.parent.id;}dojo.body().appendChild(_6e);_6a.domNode.style.display="";_6e.appendChild(_6a.domNode);var _6f=new dijit.BackgroundIframe(_6e);var _70=_6c?dijit.placeOnScreenAroundElement(_6e,_6c,_6b,_6a.orient?dojo.hitch(_6a,"orient"):null):dijit.placeOnScreen(_6e,_69,_6b=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"]);_6e.style.visibility="visible";var _71=[];function getTopPopup(){for(var pi=_66.length-1;pi>0&&_66[pi].parent===_66[pi-1].widget;pi--){}return _66[pi];};_71.push(dojo.connect(_6e,"onkeypress",this,function(evt){if(evt.keyCode==dojo.keys.ESCAPE&&_69.onCancel){_69.onCancel();}else{if(evt.keyCode==dojo.keys.TAB){dojo.stopEvent(evt);var _74=getTopPopup();if(_74&&_74.onCancel){_74.onCancel();}}}}));if(_6a.onCancel){_71.push(dojo.connect(_6a,"onCancel",null,_69.onCancel));}_71.push(dojo.connect(_6a,_6a.onExecute?"onExecute":"onChange",null,function(){var _75=getTopPopup();if(_75&&_75.onExecute){_75.onExecute();}}));_66.push({wrapper:_6e,iframe:_6f,widget:_6a,parent:_69.parent,onExecute:_69.onExecute,onCancel:_69.onCancel,onClose:_69.onClose,handlers:_71});if(_6a.onOpen){_6a.onOpen(_70);}return _70;};this.close=function(_76){while(dojo.some(_66,function(_77){return _77.widget==_76;})){var top=_66.pop(),_79=top.wrapper,_7a=top.iframe,_7b=top.widget,_7c=top.onClose;if(_7b.onClose){_7b.onClose();}dojo.forEach(top.handlers,dojo.disconnect);if(!_7b||!_7b.domNode){return;}dojo.style(_7b.domNode,"display","none");dojo.body().appendChild(_7b.domNode);_7a.destroy();dojo._destroyElement(_79);if(_7c){_7c();}}};}();dijit._frames=new function(){var _7d=[];this.pop=function(){var _7e;if(_7d.length){_7e=_7d.pop();_7e.style.display="";}else{if(dojo.isIE){var _7f="<iframe src='javascript:\"\"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";_7e=dojo.doc.createElement(_7f);}else{var _7e=dojo.doc.createElement("iframe");_7e.src="javascript:\"\"";_7e.className="dijitBackgroundIframe";}_7e.tabIndex=-1;dojo.body().appendChild(_7e);}return _7e;};this.push=function(_80){_80.style.display="";if(dojo.isIE){_80.style.removeExpression("width");_80.style.removeExpression("height");}_7d.push(_80);};}();if(dojo.isIE&&dojo.isIE<7){dojo.addOnLoad(function(){var f=dijit._frames;dojo.forEach([f.pop()],f.push);});}dijit.BackgroundIframe=function(_82){if(!_82.id){throw new Error("no id");}if((dojo.isIE&&dojo.isIE<7)||(dojo.isFF&&dojo.isFF<3&&dojo.hasClass(dojo.body(),"dijit_a11y"))){var _83=dijit._frames.pop();_82.appendChild(_83);if(dojo.isIE){_83.style.setExpression("width","document.getElementById('"+_82.id+"').offsetWidth");_83.style.setExpression("height","document.getElementById('"+_82.id+"').offsetHeight");}this.iframe=_83;}};dojo.extend(dijit.BackgroundIframe,{destroy:function(){if(this.iframe){dijit._frames.push(this.iframe);delete this.iframe;}}});}if(!dojo._hasResource["dijit._base.scroll"]){dojo._hasResource["dijit._base.scroll"]=true;dojo.provide("dijit._base.scroll");dijit.scrollIntoView=function(_84){if(dojo.isIE){if(dojo.marginBox(_84.parentNode).h<=_84.parentNode.scrollHeight){_84.scrollIntoView(false);}}else{if(dojo.isMozilla){_84.scrollIntoView(false);}else{var _85=_84.parentNode;var _86=_85.scrollTop+dojo.marginBox(_85).h;var _87=_84.offsetTop+dojo.marginBox(_84).h;if(_86<_87){_85.scrollTop+=(_87-_86);}else{if(_85.scrollTop>_84.offsetTop){_85.scrollTop-=(_85.scrollTop-_84.offsetTop);}}}}};}if(!dojo._hasResource["dijit._base.sniff"]){dojo._hasResource["dijit._base.sniff"]=true;dojo.provide("dijit._base.sniff");(function(){var d=dojo;var ie=d.isIE;var _8a=d.isOpera;var maj=Math.floor;var _8c={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_iequirks:ie&&d.isQuirks,dj_opera:_8a,dj_opera8:maj(_8a)==8,dj_opera9:maj(_8a)==9,dj_khtml:d.isKhtml,dj_safari:d.isSafari,dj_gecko:d.isMozilla};for(var p in _8c){if(_8c[p]){var _8e=dojo.doc.documentElement;if(_8e.className){_8e.className+=" "+p;}else{_8e.className=p;}}}})();}if(!dojo._hasResource["dijit._base.bidi"]){dojo._hasResource["dijit._base.bidi"]=true;dojo.provide("dijit._base.bidi");dojo.addOnLoad(function(){if(!dojo._isBodyLtr()){dojo.addClass(dojo.body(),"dijitRtl");}});}if(!dojo._hasResource["dijit._base.typematic"]){dojo._hasResource["dijit._base.typematic"]=true;dojo.provide("dijit._base.typematic");dijit.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=(this._currentTimeout<0)?this._initialDelay:((this._subsequentDelay>1)?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay));this._timer=setTimeout(dojo.hitch(this,"_fireEventAndReload"),this._currentTimeout);},trigger:function(evt,_90,_91,_92,obj,_94,_95){if(obj!=this._obj){this.stop();this._initialDelay=_95||500;this._subsequentDelay=_94||0.9;this._obj=obj;this._evt=evt;this._node=_91;this._currentTimeout=-1;this._count=-1;this._callback=dojo.hitch(_90,_92);this._fireEventAndReload();}},stop:function(){if(this._timer){clearTimeout(this._timer);this._timer=null;}if(this._obj){this._callback(-1,this._node,this._evt);this._obj=null;}},addKeyListener:function(_96,_97,_98,_99,_9a,_9b){return [dojo.connect(_96,"onkeypress",this,function(evt){if(evt.keyCode==_97.keyCode&&(!_97.charCode||_97.charCode==evt.charCode)&&(_97.ctrlKey===undefined||_97.ctrlKey==evt.ctrlKey)&&(_97.altKey===undefined||_97.altKey==evt.ctrlKey)&&(_97.shiftKey===undefined||_97.shiftKey==evt.ctrlKey)){dojo.stopEvent(evt);dijit.typematic.trigger(_97,_98,_96,_99,_97,_9a,_9b);}else{if(dijit.typematic._obj==_97){dijit.typematic.stop();}}}),dojo.connect(_96,"onkeyup",this,function(evt){if(dijit.typematic._obj==_97){dijit.typematic.stop();}})];},addMouseListener:function(_9e,_9f,_a0,_a1,_a2){var dc=dojo.connect;return [dc(_9e,"mousedown",this,function(evt){dojo.stopEvent(evt);dijit.typematic.trigger(evt,_9f,_9e,_a0,_9e,_a1,_a2);}),dc(_9e,"mouseup",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(_9e,"mouseout",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(_9e,"mousemove",this,function(evt){dojo.stopEvent(evt);}),dc(_9e,"dblclick",this,function(evt){dojo.stopEvent(evt);if(dojo.isIE){dijit.typematic.trigger(evt,_9f,_9e,_a0,_9e,_a1,_a2);setTimeout(dijit.typematic.stop,50);}})];},addListener:function(_a9,_aa,_ab,_ac,_ad,_ae,_af){return this.addKeyListener(_aa,_ab,_ac,_ad,_ae,_af).concat(this.addMouseListener(_a9,_ac,_ad,_ae,_af));}};}if(!dojo._hasResource["dijit._base.wai"]){dojo._hasResource["dijit._base.wai"]=true;dojo.provide("dijit._base.wai");dijit.wai={onload:function(){var div=document.createElement("div");div.id="a11yTestNode";div.style.cssText="border: 1px solid;"+"border-color:red green;"+"position: absolute;"+"height: 5px;"+"top: -999px;"+"background-image: url(\""+dojo.moduleUrl("dijit","form/templates/blank.gif")+"\");";dojo.body().appendChild(div);function check(){var cs=dojo.getComputedStyle(div);if(cs){var _b2=cs.backgroundImage;var _b3=(cs.borderTopColor==cs.borderRightColor)||(_b2!=null&&(_b2=="none"||_b2=="url(invalid-url:)"));dojo[_b3?"addClass":"removeClass"](dojo.body(),"dijit_a11y");}};check();if(dojo.isIE){setInterval(check,4000);}}};if(dojo.isIE||dojo.isMoz){dojo._loaders.unshift(dijit.wai.onload);}dojo.mixin(dijit,{hasWaiRole:function(_b4){if(_b4.hasAttribute){return _b4.hasAttribute("role");}else{return _b4.getAttribute("role")?true:false;}},getWaiRole:function(_b5){var _b6=_b5.getAttribute("role");if(_b6){var _b7=_b6.indexOf(":");return _b7==-1?_b6:_b6.substring(_b7+1);}else{return "";}},setWaiRole:function(_b8,_b9){if(dojo.isFF&&dojo.isFF<3){_b8.setAttribute("role","wairole:"+_b9);}else{_b8.setAttribute("role",_b9);}},removeWaiRole:function(_ba){_ba.removeAttribute("role");},hasWaiState:function(_bb,_bc){if(dojo.isFF&&dojo.isFF<3){return _bb.hasAttributeNS("http://www.w3.org/2005/07/aaa",_bc);}else{if(_bb.hasAttribute){return _bb.hasAttribute("aria-"+_bc);}else{return _bb.getAttribute("aria-"+_bc)?true:false;}}},getWaiState:function(_bd,_be){if(dojo.isFF&&dojo.isFF<3){return _bd.getAttributeNS("http://www.w3.org/2005/07/aaa",_be);}else{var _bf=_bd.getAttribute("aria-"+_be);return _bf?_bf:"";}},setWaiState:function(_c0,_c1,_c2){if(dojo.isFF&&dojo.isFF<3){_c0.setAttributeNS("http://www.w3.org/2005/07/aaa","aaa:"+_c1,_c2);}else{_c0.setAttribute("aria-"+_c1,_c2);}},removeWaiState:function(_c3,_c4){if(dojo.isFF&&dojo.isFF<3){_c3.removeAttributeNS("http://www.w3.org/2005/07/aaa",_c4);}else{_c3.removeAttribute("aria-"+_c4);}}});}if(!dojo._hasResource["dijit._base"]){dojo._hasResource["dijit._base"]=true;dojo.provide("dijit._base");}if(!dojo._hasResource["dojo.date.stamp"]){dojo._hasResource["dojo.date.stamp"]=true;dojo.provide("dojo.date.stamp");dojo.date.stamp.fromISOString=function(_c5,_c6){if(!dojo.date.stamp._isoRegExp){dojo.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;}var _c7=dojo.date.stamp._isoRegExp.exec(_c5);var _c8=null;if(_c7){_c7.shift();_c7[1]&&_c7[1]--;_c7[6]&&(_c7[6]*=1000);if(_c6){_c6=new Date(_c6);dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(_c9){return _c6["get"+_c9]();}).forEach(function(_ca,_cb){if(_c7[_cb]===undefined){_c7[_cb]=_ca;}});}_c8=new Date(_c7[0]||1970,_c7[1]||0,_c7[2]||0,_c7[3]||0,_c7[4]||0,_c7[5]||0,_c7[6]||0);var _cc=0;var _cd=_c7[7]&&_c7[7].charAt(0);if(_cd!="Z"){_cc=((_c7[8]||0)*60)+(Number(_c7[9])||0);if(_cd!="-"){_cc*=-1;}}if(_cd){_cc-=_c8.getTimezoneOffset();}if(_cc){_c8.setTime(_c8.getTime()+_cc*60000);}}return _c8;};dojo.date.stamp.toISOString=function(_ce,_cf){var _=function(n){return (n<10)?"0"+n:n;};_cf=_cf||{};var _d2=[];var _d3=_cf.zulu?"getUTC":"get";var _d4="";if(_cf.selector!="time"){_d4=[_ce[_d3+"FullYear"](),_(_ce[_d3+"Month"]()+1),_(_ce[_d3+"Date"]())].join("-");}_d2.push(_d4);if(_cf.selector!="date"){var _d5=[_(_ce[_d3+"Hours"]()),_(_ce[_d3+"Minutes"]()),_(_ce[_d3+"Seconds"]())].join(":");var _d6=_ce[_d3+"Milliseconds"]();if(_cf.milliseconds){_d5+="."+(_d6<100?"0":"")+_(_d6);}if(_cf.zulu){_d5+="Z";}else{if(_cf.selector!="time"){var _d7=_ce.getTimezoneOffset();var _d8=Math.abs(_d7);_d5+=(_d7>0?"-":"+")+_(Math.floor(_d8/60))+":"+_(_d8%60);}}_d2.push(_d5);}return _d2.join("T");};}if(!dojo._hasResource["dojo.parser"]){dojo._hasResource["dojo.parser"]=true;dojo.provide("dojo.parser");dojo.parser=new function(){var d=dojo;function val2type(_da){if(d.isString(_da)){return "string";}if(typeof _da=="number"){return "number";}if(typeof _da=="boolean"){return "boolean";}if(d.isFunction(_da)){return "function";}if(d.isArray(_da)){return "array";}if(_da instanceof Date){return "date";}if(_da instanceof d._Url){return "url";}return "object";};function str2obj(_db,_dc){switch(_dc){case "string":return _db;case "number":return _db.length?Number(_db):NaN;case "boolean":return typeof _db=="boolean"?_db:!(_db.toLowerCase()=="false");case "function":if(d.isFunction(_db)){_db=_db.toString();_db=d.trim(_db.substring(_db.indexOf("{")+1,_db.length-1));}try{if(_db.search(/[^\w\.]+/i)!=-1){_db=d.parser._nameAnonFunc(new Function(_db),this);}return d.getObject(_db,false);}catch(e){return new Function();}case "array":return _db.split(/\s*,\s*/);case "date":switch(_db){case "":return new Date("");case "now":return new Date();default:return d.date.stamp.fromISOString(_db);}case "url":return d.baseUrl+_db;default:return d.fromJson(_db);}};var _dd={};function getClassInfo(_de){if(!_dd[_de]){var cls=d.getObject(_de);if(!d.isFunction(cls)){throw new Error("Could not load class '"+_de+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");}var _e0=cls.prototype;var _e1={};for(var _e2 in _e0){if(_e2.charAt(0)=="_"){continue;}var _e3=_e0[_e2];_e1[_e2]=val2type(_e3);}_dd[_de]={cls:cls,params:_e1};}return _dd[_de];};this._functionFromScript=function(_e4){var _e5="";var _e6="";var _e7=_e4.getAttribute("args");if(_e7){d.forEach(_e7.split(/\s*,\s*/),function(_e8,idx){_e5+="var "+_e8+" = arguments["+idx+"]; ";});}var _ea=_e4.getAttribute("with");if(_ea&&_ea.length){d.forEach(_ea.split(/\s*,\s*/),function(_eb){_e5+="with("+_eb+"){";_e6+="}";});}return new Function(_e5+_e4.innerHTML+_e6);};this.instantiate=function(_ec){var _ed=[];d.forEach(_ec,function(_ee){if(!_ee){return;}var _ef=_ee.getAttribute("dojoType");if((!_ef)||(!_ef.length)){return;}var _f0=getClassInfo(_ef);var _f1=_f0.cls;var ps=_f1._noScript||_f1.prototype._noScript;var _f3={};var _f4=_ee.attributes;for(var _f5 in _f0.params){var _f6=_f4.getNamedItem(_f5);if(!_f6||(!_f6.specified&&(!dojo.isIE||_f5.toLowerCase()!="value"))){continue;}var _f7=_f6.value;switch(_f5){case "class":_f7=_ee.className;break;case "style":_f7=_ee.style&&_ee.style.cssText;}var _f8=_f0.params[_f5];_f3[_f5]=str2obj(_f7,_f8);}if(!ps){var _f9=[],_fa=[];d.query("> script[type^='dojo/']",_ee).orphan().forEach(function(_fb){var _fc=_fb.getAttribute("event"),_ef=_fb.getAttribute("type"),nf=d.parser._functionFromScript(_fb);if(_fc){if(_ef=="dojo/connect"){_f9.push({event:_fc,func:nf});}else{_f3[_fc]=nf;}}else{_fa.push(nf);}});}var _fe=_f1["markupFactory"];if(!_fe&&_f1["prototype"]){_fe=_f1.prototype["markupFactory"];}var _ff=_fe?_fe(_f3,_ee,_f1):new _f1(_f3,_ee);_ed.push(_ff);var _100=_ee.getAttribute("jsId");if(_100){d.setObject(_100,_ff);}if(!ps){dojo.forEach(_f9,function(_101){dojo.connect(_ff,_101.event,null,_101.func);});dojo.forEach(_fa,function(func){func.call(_ff);});}});d.forEach(_ed,function(_103){if(_103&&(_103.startup)&&((!_103.getParent)||(!_103.getParent()))){_103.startup();}});return _ed;};this.parse=function(_104){var list=d.query("[dojoType]",_104);var _106=this.instantiate(list);return _106;};}();(function(){var _107=function(){if(djConfig["parseOnLoad"]==true){dojo.parser.parse();}};if(dojo.exists("dijit.wai.onload")&&(dijit.wai.onload===dojo._loaders[0])){dojo._loaders.splice(1,0,_107);}else{dojo._loaders.unshift(_107);}})();dojo.parser._anonCtr=0;dojo.parser._anon={};dojo.parser._nameAnonFunc=function(_108,_109){var jpn="$joinpoint";var nso=(_109||dojo.parser._anon);if(dojo.isIE){var cn=_108["__dojoNameCache"];if(cn&&nso[cn]===_108){return _108["__dojoNameCache"];}}var ret="__"+dojo.parser._anonCtr++;while(typeof nso[ret]!="undefined"){ret="__"+dojo.parser._anonCtr++;}nso[ret]=_108;return ret;};}if(!dojo._hasResource["dijit._Widget"]){dojo._hasResource["dijit._Widget"]=true;dojo.provide("dijit._Widget");dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",srcNodeRef:null,domNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},postscript:function(_10e,_10f){this.create(_10e,_10f);},create:function(_110,_111){this.srcNodeRef=dojo.byId(_111);this._connects=[];this._attaches=[];if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_110){dojo.mixin(this,_110);}this.postMixInProperties();if(!this.id){this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));}dijit.registry.add(this);this.buildRendering();if(this.domNode){for(var attr in this.attributeMap){var _113=this[this.attributeMap[attr]||"domNode"];var _114=this[attr];if(typeof _114!="object"&&(_114!==""||(_110&&_110[attr]))){switch(attr){case "class":dojo.addClass(_113,_114);break;case "style":if(_113.style.cssText){_113.style.cssText+="; "+_114;}else{_113.style.cssText=_114;}break;default:_113.setAttribute(attr,_114);}}}}if(this.domNode){this.domNode.setAttribute("widgetId",this.id);}this.postCreate();if(this.srcNodeRef&&!this.srcNodeRef.parentNode){delete this.srcNodeRef;}},postMixInProperties:function(){},buildRendering:function(){this.domNode=this.srcNodeRef||dojo.doc.createElement("div");},postCreate:function(){},startup:function(){},destroyRecursive:function(_115){this.destroyDescendants();this.destroy();},destroy:function(_116){this.uninitialize();dojo.forEach(this._connects,function(_117){dojo.forEach(_117,dojo.disconnect);});this.destroyRendering(_116);dijit.registry.remove(this.id);},destroyRendering:function(_118){if(this.bgIframe){this.bgIframe.destroy();delete this.bgIframe;}if(this.domNode){dojo._destroyElement(this.domNode);delete this.domNode;}if(this.srcNodeRef){dojo._destroyElement(this.srcNodeRef);delete this.srcNodeRef;}},destroyDescendants:function(){dojo.forEach(this.getDescendants(),function(_119){_119.destroy();});},uninitialize:function(){return false;},toString:function(){return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";},getDescendants:function(){var list=dojo.query("[widgetId]",this.domNode);return list.map(dijit.byNode);},nodesWithKeyClick:["input","button"],connect:function(obj,_11c,_11d){var _11e=[];if(_11c=="ondijitclick"){var w=this;if(!this.nodesWithKeyClick[obj.nodeName]){_11e.push(dojo.connect(obj,"onkeydown",this,function(e){if(e.keyCode==dojo.keys.ENTER){return (dojo.isString(_11d))?w[_11d](e):_11d.call(w,e);}else{if(e.keyCode==dojo.keys.SPACE){dojo.stopEvent(e);}}}));_11e.push(dojo.connect(obj,"onkeyup",this,function(e){if(e.keyCode==dojo.keys.SPACE){return dojo.isString(_11d)?w[_11d](e):_11d.call(w,e);}}));}_11c="onclick";}_11e.push(dojo.connect(obj,_11c,this,_11d));this._connects.push(_11e);return _11e;},disconnect:function(_122){for(var i=0;i<this._connects.length;i++){if(this._connects[i]==_122){dojo.forEach(_122,dojo.disconnect);this._connects.splice(i,1);return;}}},isLeftToRight:function(){if(typeof this._ltr=="undefined"){this._ltr=dojo.getComputedStyle(this.domNode).direction!="rtl";}return this._ltr;},isFocusable:function(){return this.focus&&(dojo.style(this.domNode,"display")!="none");}});}if(!dojo._hasResource["dojo.string"]){dojo._hasResource["dojo.string"]=true;dojo.provide("dojo.string");dojo.string.pad=function(text,size,ch,end){var out=String(text);if(!ch){ch="0";}while(out.length<size){if(end){out+=ch;}else{out=ch+out;}}return out;};dojo.string.substitute=function(_129,map,_12b,_12c){return _129.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_12d,key,_12f){var _130=dojo.getObject(key,false,map);if(_12f){_130=dojo.getObject(_12f,false,_12c)(_130);}if(_12b){_130=_12b(_130,key);}return _130.toString();});};dojo.string.trim=function(str){str=str.replace(/^\s+/,"");for(var i=str.length-1;i>0;i--){if(/\S/.test(str.charAt(i))){str=str.substring(0,i+1);break;}}return str;};}if(!dojo._hasResource["dijit._Templated"]){dojo._hasResource["dijit._Templated"]=true;dojo.provide("dijit._Templated");dojo.declare("dijit._Templated",null,{templateNode:null,templateString:null,templatePath:null,widgetsInTemplate:false,containerNode:null,_skipNodeCache:false,buildRendering:function(){var _133=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);var node;if(dojo.isString(_133)){var _135=this.declaredClass,_136=this;var tstr=dojo.string.substitute(_133,this,function(_138,key){if(key.charAt(0)=="!"){_138=_136[key.substr(1)];}if(typeof _138=="undefined"){throw new Error(_135+" template:"+key);}if(!_138){return "";}return key.charAt(0)=="!"?_138:_138.toString().replace(/"/g,"&quot;");},this);node=dijit._Templated._createNodesFromText(tstr)[0];}else{node=_133.cloneNode(true);}this._attachTemplateNodes(node);var _13a=this.srcNodeRef;if(_13a&&_13a.parentNode){_13a.parentNode.replaceChild(node,_13a);}this.domNode=node;if(this.widgetsInTemplate){var _13b=dojo.parser.parse(node);this._attachTemplateNodes(_13b,function(n,p){return n[p];});}this._fillContent(_13a);},_fillContent:function(_13e){var dest=this.containerNode;if(_13e&&dest){while(_13e.hasChildNodes()){dest.appendChild(_13e.firstChild);}}},_attachTemplateNodes:function(_140,_141){_141=_141||function(n,p){return n.getAttribute(p);};var _144=dojo.isArray(_140)?_140:(_140.all||_140.getElementsByTagName("*"));var x=dojo.isArray(_140)?0:-1;for(;x<_144.length;x++){var _146=(x==-1)?_140:_144[x];if(this.widgetsInTemplate&&_141(_146,"dojoType")){continue;}var _147=_141(_146,"dojoAttachPoint");if(_147){var _148,_149=_147.split(/\s*,\s*/);while(_148=_149.shift()){if(dojo.isArray(this[_148])){this[_148].push(_146);}else{this[_148]=_146;}}}var _14a=_141(_146,"dojoAttachEvent");if(_14a){var _14b,_14c=_14a.split(/\s*,\s*/);var trim=dojo.trim;while(_14b=_14c.shift()){if(_14b){var _14e=null;if(_14b.indexOf(":")!=-1){var _14f=_14b.split(":");_14b=trim(_14f[0]);_14e=trim(_14f[1]);}else{_14b=trim(_14b);}if(!_14e){_14e=_14b;}this.connect(_146,_14b,_14e);}}}var role=_141(_146,"waiRole");if(role){dijit.setWaiRole(_146,role);}var _151=_141(_146,"waiState");if(_151){dojo.forEach(_151.split(/\s*,\s*/),function(_152){if(_152.indexOf("-")!=-1){var pair=_152.split("-");dijit.setWaiState(_146,pair[0],pair[1]);}});}}}});dijit._Templated._templateCache={};dijit._Templated.getCachedTemplate=function(_154,_155,_156){var _157=dijit._Templated._templateCache;var key=_155||_154;var _159=_157[key];if(_159){return _159;}if(!_155){_155=dijit._Templated._sanitizeTemplateString(dojo._getText(_154));}_155=dojo.string.trim(_155);if(_155.match(/\$\{([^\}]+)\}/g)||_156){return (_157[key]=_155);}else{return (_157[key]=dijit._Templated._createNodesFromText(_155)[0]);}};dijit._Templated._sanitizeTemplateString=function(_15a){if(_15a){_15a=_15a.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var _15b=_15a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_15b){_15a=_15b[1];}}else{_15a="";}return _15a;};if(dojo.isIE){dojo.addOnUnload(function(){var _15c=dijit._Templated._templateCache;for(var key in _15c){var _15e=_15c[key];if(!isNaN(_15e.nodeType)){dojo._destroyElement(_15e);}delete _15c[key];}});}(function(){var _15f={cell:{re:/^<t[dh][\s\r\n>]/i,pre:"<table><tbody><tr>",post:"</tr></tbody></table>"},row:{re:/^<tr[\s\r\n>]/i,pre:"<table><tbody>",post:"</tbody></table>"},section:{re:/^<(thead|tbody|tfoot)[\s\r\n>]/i,pre:"<table>",post:"</table>"}};var tn;dijit._Templated._createNodesFromText=function(text){if(!tn){tn=dojo.doc.createElement("div");tn.style.display="none";dojo.body().appendChild(tn);}var _162="none";var _163=text.replace(/^\s+/,"");for(var type in _15f){var map=_15f[type];if(map.re.test(_163)){_162=type;text=map.pre+text+map.post;break;}}tn.innerHTML=text;if(tn.normalize){tn.normalize();}var tag={cell:"tr",row:"tbody",section:"table"}[_162];var _167=(typeof tag!="undefined")?tn.getElementsByTagName(tag)[0]:tn;var _168=[];while(_167.firstChild){_168.push(_167.removeChild(_167.firstChild));}tn.innerHTML="";return _168;};})();dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});}if(!dojo._hasResource["dijit._Container"]){dojo._hasResource["dijit._Container"]=true;dojo.provide("dijit._Container");dojo.declare("dijit._Contained",null,{getParent:function(){for(var p=this.domNode.parentNode;p;p=p.parentNode){var id=p.getAttribute&&p.getAttribute("widgetId");if(id){var _16b=dijit.byId(id);return _16b.isContainer?_16b:null;}}return null;},_getSibling:function(_16c){var node=this.domNode;do{node=node[_16c+"Sibling"];}while(node&&node.nodeType!=1);if(!node){return null;}var id=node.getAttribute("widgetId");return dijit.byId(id);},getPreviousSibling:function(){return this._getSibling("previous");},getNextSibling:function(){return this._getSibling("next");}});dojo.declare("dijit._Container",null,{isContainer:true,addChild:function(_16f,_170){if(_170===undefined){_170="last";}var _171=this.containerNode||this.domNode;if(_170&&typeof _170=="number"){var _172=dojo.query("> [widgetid]",_171);if(_172&&_172.length>=_170){_171=_172[_170-1];_170="after";}}dojo.place(_16f.domNode,_171,_170);if(this._started&&!_16f._started){_16f.startup();}},removeChild:function(_173){var node=_173.domNode;node.parentNode.removeChild(node);},_nextElement:function(node){do{node=node.nextSibling;}while(node&&node.nodeType!=1);return node;},_firstElement:function(node){node=node.firstChild;if(node&&node.nodeType!=1){node=this._nextElement(node);}return node;},getChildren:function(){return dojo.query("> [widgetId]",this.containerNode||this.domNode).map(dijit.byNode);},hasChildren:function(){var cn=this.containerNode||this.domNode;return !!this._firstElement(cn);},_getSiblingOfChild:function(_178,dir){var node=_178.domNode;var _17b=(dir>0?"nextSibling":"previousSibling");do{node=node[_17b];}while(node&&(node.nodeType!=1||!dijit.byNode(node)));return node?dijit.byNode(node):null;}});dojo.declare("dijit._KeyNavContainer",[dijit._Container],{_keyNavCodes:{},connectKeyNavHandlers:function(_17c,_17d){var _17e=this._keyNavCodes={};var prev=dojo.hitch(this,this.focusPrev);var next=dojo.hitch(this,this.focusNext);dojo.forEach(_17c,function(code){_17e[code]=prev;});dojo.forEach(_17d,function(code){_17e[code]=next;});this.connect(this.domNode,"onkeypress","_onContainerKeypress");if(dojo.isIE){this.connect(this.domNode,"onactivate","_onContainerFocus");this.connect(this.domNode,"ondeactivate","_onContainerBlur");}else{this.connect(this.domNode,"onfocus","_onContainerFocus");this.connect(this.domNode,"onblur","_onContainerBlur");}},startupKeyNavChildren:function(){dojo.forEach(this.getChildren(),dojo.hitch(this,"_setTabIndexMinusOne"));},addChild:function(_183,_184){dijit._KeyNavContainer.superclass.addChild.apply(this,arguments);this._setTabIndexMinusOne(_183);},focus:function(){this.focusFirstChild();},focusFirstChild:function(){this.focusChild(this._getFirstFocusableChild());},focusNext:function(){if(this.focusedChild&&this.focusedChild.hasNextFocalNode&&this.focusedChild.hasNextFocalNode()){this.focusedChild.focusNext();return;}var _185=this._getNextFocusableChild(this.focusedChild,1);if(_185.getFocalNodes){this.focusChild(_185,_185.getFocalNodes()[0]);}else{this.focusChild(_185);}},focusPrev:function(){if(this.focusedChild&&this.focusedChild.hasPrevFocalNode&&this.focusedChild.hasPrevFocalNode()){this.focusedChild.focusPrev();return;}var _186=this._getNextFocusableChild(this.focusedChild,-1);if(_186.getFocalNodes){var _187=_186.getFocalNodes();this.focusChild(_186,_187[_187.length-1]);}else{this.focusChild(_186);}},focusChild:function(_188,node){if(_188){if(this.focusedChild&&_188!==this.focusedChild){this._onChildBlur(this.focusedChild);}this.focusedChild=_188;if(node&&_188.focusFocalNode){_188.focusFocalNode(node);}else{_188.focus();}}},_setTabIndexMinusOne:function(_18a){if(_18a.getFocalNodes){dojo.forEach(_18a.getFocalNodes(),function(node){node.setAttribute("tabIndex",-1);});}else{(_18a.focusNode||_18a.domNode).setAttribute("tabIndex",-1);}},_onContainerFocus:function(evt){this.domNode.setAttribute("tabIndex",-1);if(evt.target===this.domNode){this.focusFirstChild();}else{var _18d=dijit.getEnclosingWidget(evt.target);if(_18d&&_18d.isFocusable()){this.focusedChild=_18d;}}},_onContainerBlur:function(evt){if(this.tabIndex){this.domNode.setAttribute("tabIndex",this.tabIndex);}},_onContainerKeypress:function(evt){if(evt.ctrlKey||evt.altKey){return;}var func=this._keyNavCodes[evt.keyCode];if(func){func();dojo.stopEvent(evt);}},_onChildBlur:function(_191){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1);},_getNextFocusableChild:function(_192,dir){if(_192){_192=this._getSiblingOfChild(_192,dir);}var _194=this.getChildren();for(var i=0;i<_194.length;i++){if(!_192){_192=_194[(dir>0)?0:(_194.length-1)];}if(_192.isFocusable()){return _192;}_192=this._getSiblingOfChild(_192,dir);}}});}if(!dojo._hasResource["dijit.layout._LayoutWidget"]){dojo._hasResource["dijit.layout._LayoutWidget"]=true;dojo.provide("dijit.layout._LayoutWidget");dojo.declare("dijit.layout._LayoutWidget",[dijit._Widget,dijit._Container,dijit._Contained],{isLayoutContainer:true,postCreate:function(){dojo.addClass(this.domNode,"dijitContainer");},startup:function(){if(this._started){return;}this._started=true;if(this.getChildren){dojo.forEach(this.getChildren(),function(_196){_196.startup();});}if(!this.getParent||!this.getParent()){this.resize();this.connect(window,"onresize",function(){this.resize();});}},resize:function(args){var node=this.domNode;if(args){dojo.marginBox(node,args);if(args.t){node.style.top=args.t+"px";}if(args.l){node.style.left=args.l+"px";}}var mb=dojo.mixin(dojo.marginBox(node),args||{});this._contentBox=dijit.layout.marginBox2contentBox(node,mb);this.layout();},layout:function(){}});dijit.layout.marginBox2contentBox=function(node,mb){var cs=dojo.getComputedStyle(node);var me=dojo._getMarginExtents(node,cs);var pb=dojo._getPadBorderExtents(node,cs);return {l:dojo._toPixelValue(node,cs.paddingLeft),t:dojo._toPixelValue(node,cs.paddingTop),w:mb.w-(me.w+pb.w),h:mb.h-(me.h+pb.h)};};(function(){var _19f=function(word){return word.substring(0,1).toUpperCase()+word.substring(1);};var size=function(_1a2,dim){_1a2.resize?_1a2.resize(dim):dojo.marginBox(_1a2.domNode,dim);dojo.mixin(_1a2,dojo.marginBox(_1a2.domNode));dojo.mixin(_1a2,dim);};dijit.layout.layoutChildren=function(_1a4,dim,_1a6){dim=dojo.mixin({},dim);dojo.addClass(_1a4,"dijitLayoutContainer");_1a6=dojo.filter(_1a6,function(item){return item.layoutAlign!="client";}).concat(dojo.filter(_1a6,function(item){return item.layoutAlign=="client";}));dojo.forEach(_1a6,function(_1a9){var elm=_1a9.domNode,pos=_1a9.layoutAlign;var _1ac=elm.style;_1ac.left=dim.l+"px";_1ac.top=dim.t+"px";_1ac.bottom=_1ac.right="auto";dojo.addClass(elm,"dijitAlign"+_19f(pos));if(pos=="top"||pos=="bottom"){size(_1a9,{w:dim.w});dim.h-=_1a9.h;if(pos=="top"){dim.t+=_1a9.h;}else{_1ac.top=dim.t+dim.h+"px";}}else{if(pos=="left"||pos=="right"){size(_1a9,{h:dim.h});dim.w-=_1a9.w;if(pos=="left"){dim.l+=_1a9.w;}else{_1ac.left=dim.l+dim.w+"px";}}else{if(pos=="client"){size(_1a9,dim);}}}});};})();}if(!dojo._hasResource["dijit.form._FormWidget"]){dojo._hasResource["dijit.form._FormWidget"]=true;dojo.provide("dijit.form._FormWidget");dojo.declare("dijit.form._FormWidget",[dijit._Widget,dijit._Templated],{baseClass:"",value:"",name:"",id:"",alt:"",type:"text",tabIndex:"0",disabled:false,intermediateChanges:false,attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{id:"focusNode",tabIndex:"focusNode",alt:"focusNode"}),setDisabled:function(_1ad){this.domNode.disabled=this.disabled=_1ad;if(this.focusNode){this.focusNode.disabled=_1ad;}if(_1ad){this._hovering=false;this._active=false;}dijit.setWaiState(this.focusNode||this.domNode,"disabled",_1ad);this._setStateClass();},_onMouse:function(_1ae){var _1af=_1ae.target;if(_1af&&_1af.getAttribute){this.stateModifier=_1af.getAttribute("stateModifier")||"";}if(!this.disabled){switch(_1ae.type){case "mouseenter":case "mouseover":this._hovering=true;break;case "mouseout":case "mouseleave":this._hovering=false;break;case "mousedown":this._active=true;var self=this;var _1b1=this.connect(dojo.body(),"onmouseup",function(){self._active=false;self._setStateClass();self.disconnect(_1b1);});break;}this._setStateClass();}},isFocusable:function(){return !this.disabled&&(dojo.style(this.domNode,"display")!="none");},focus:function(){dijit.focus(this.focusNode);},_setStateClass:function(){if(!("staticClass" in this)){this.staticClass=(this.stateNode||this.domNode).className;}var _1b2=[this.baseClass];function multiply(_1b3){_1b2=_1b2.concat(dojo.map(_1b2,function(c){return c+_1b3;}));};if(this.checked){multiply("Checked");}if(this.state){multiply(this.state);}if(this.selected){multiply("Selected");}if(this.disabled){multiply("Disabled");}else{if(this._active){multiply(this.stateModifier+"Active");}else{if(this._focused){multiply("Focused");}if((this.stateModifier||!this._focused)&&this._hovering){multiply(this.stateModifier+"Hover");}}}(this.stateNode||this.domNode).className=this.staticClass+" "+_1b2.join(" ");},onChange:function(_1b5){},postCreate:function(){this.setValue(this.value,null);this.setDisabled(this.disabled);this._setStateClass();},setValue:function(_1b6,_1b7){this._lastValue=_1b6;dijit.setWaiState(this.focusNode||this.domNode,"valuenow",this.forWaiValuenow());if(_1b7===undefined){_1b7=true;}if(this._lastValueReported==undefined&&_1b7===null){this._lastValueReported=_1b6;}if((this.intermediateChanges||_1b7)&&((_1b6&&_1b6.toString)?_1b6.toString():_1b6)!==((this._lastValueReported&&this._lastValueReported.toString)?this._lastValueReported.toString():this._lastValueReported)){this._lastValueReported=_1b6;this.onChange(_1b6);}},getValue:function(){return this._lastValue;},undo:function(){this.setValue(this._lastValueReported,false);},_onKeyPress:function(e){if(e.keyCode==dojo.keys.ESCAPE&&!e.shiftKey&&!e.ctrlKey&&!e.altKey){var v=this.getValue();var lv=this._lastValueReported;if((typeof lv!="undefined")&&((v!==null&&v.toString)?v.toString():null)!==lv.toString()){this.undo();dojo.stopEvent(e);return false;}}return true;},forWaiValuenow:function(){return this.getValue();}});}if(!dojo._hasResource["dijit.dijit"]){dojo._hasResource["dijit.dijit"]=true;dojo.provide("dijit.dijit");}
+if(!dojo._hasResource["dijit._base.manager"]){dojo._hasResource["dijit._base.manager"]=true;dojo.provide("dijit._base.manager");dojo.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={};this.length=0;},add:function(_1){if(this._hash[_1.id]){throw new Error("Tried to register widget with id=="+_1.id+" but that id is already registered");}this._hash[_1.id]=_1;this.length++;},remove:function(id){if(this._hash[id]){delete this._hash[id];this.length--;}},forEach:function(_2,_3){_3=_3||dojo.global;var i=0,id;for(id in this._hash){_2.call(_3,this._hash[id],i++,this._hash);}return this;},filter:function(_4,_5){_5=_5||dojo.global;var _6=new dijit.WidgetSet(),i=0,id;for(id in this._hash){var w=this._hash[id];if(_4.call(_5,w,i++,this._hash)){_6.add(w);}}return _6;},byId:function(id){return this._hash[id];},byClass:function(_7){var _8=new dijit.WidgetSet(),id,_9;for(id in this._hash){_9=this._hash[id];if(_9.declaredClass==_7){_8.add(_9);}}return _8;},toArray:function(){var ar=[];for(var id in this._hash){ar.push(this._hash[id]);}return ar;},map:function(_a,_b){return dojo.map(this.toArray(),_a,_b);},every:function(_c,_d){_d=_d||dojo.global;var x=0,i;for(i in this._hash){if(!_c.call(_d,this._hash[i],x++,this._hash)){return false;}}return true;},some:function(_e,_f){_f=_f||dojo.global;var x=0,i;for(i in this._hash){if(_e.call(_f,this._hash[i],x++,this._hash)){return true;}}return false;}});dijit.registry=new dijit.WidgetSet();dijit._widgetTypeCtr={};dijit.getUniqueId=function(_10){var id;do{id=_10+"_"+(_10 in dijit._widgetTypeCtr?++dijit._widgetTypeCtr[_10]:dijit._widgetTypeCtr[_10]=0);}while(dijit.byId(id));return dijit._scopeName=="dijit"?id:dijit._scopeName+"_"+id;};dijit.findWidgets=function(_11){var _12=[];function _13(_14){for(var _15=_14.firstChild;_15;_15=_15.nextSibling){if(_15.nodeType==1){var _16=_15.getAttribute("widgetId");if(_16){var _17=dijit.byId(_16);_12.push(_17);}else{_13(_15);}}}};_13(_11);return _12;};dijit._destroyAll=function(){dijit._curFocus=null;dijit._prevFocus=null;dijit._activeStack=[];dojo.forEach(dijit.findWidgets(dojo.body()),function(_18){if(!_18._destroyed){if(_18.destroyRecursive){_18.destroyRecursive();}else{if(_18.destroy){_18.destroy();}}}});};if(dojo.isIE){dojo.addOnWindowUnload(function(){dijit._destroyAll();});}dijit.byId=function(id){return typeof id=="string"?dijit.registry._hash[id]:id;};dijit.byNode=function(_19){return dijit.registry.byId(_19.getAttribute("widgetId"));};dijit.getEnclosingWidget=function(_1a){while(_1a){var id=_1a.getAttribute&&_1a.getAttribute("widgetId");if(id){return dijit.byId(id);}_1a=_1a.parentNode;}return null;};dijit._isElementShown=function(_1b){var _1c=dojo.style(_1b);return (_1c.visibility!="hidden")&&(_1c.visibility!="collapsed")&&(_1c.display!="none")&&(dojo.attr(_1b,"type")!="hidden");};dijit.isTabNavigable=function(_1d){if(dojo.attr(_1d,"disabled")){return false;}else{if(dojo.hasAttr(_1d,"tabIndex")){return dojo.attr(_1d,"tabIndex")>=0;}else{switch(_1d.nodeName.toLowerCase()){case "a":return dojo.hasAttr(_1d,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return true;case "iframe":if(dojo.isMoz){return _1d.contentDocument.designMode=="on";}else{if(dojo.isWebKit){var doc=_1d.contentDocument,_1e=doc&&doc.body;return _1e&&_1e.contentEditable=="true";}else{try{doc=_1d.contentWindow.document;_1e=doc&&doc.body;return _1e&&_1e.firstChild&&_1e.firstChild.contentEditable=="true";}catch(e){return false;}}}default:return _1d.contentEditable=="true";}}}};dijit._getTabNavigable=function(_1f){var _20,_21,_22,_23,_24,_25;var _26=function(_27){dojo.query("> *",_27).forEach(function(_28){var _29=dijit._isElementShown(_28);if(_29&&dijit.isTabNavigable(_28)){var _2a=dojo.attr(_28,"tabIndex");if(!dojo.hasAttr(_28,"tabIndex")||_2a==0){if(!_20){_20=_28;}_21=_28;}else{if(_2a>0){if(!_22||_2a<_23){_23=_2a;_22=_28;}if(!_24||_2a>=_25){_25=_2a;_24=_28;}}}}if(_29&&_28.nodeName.toUpperCase()!="SELECT"){_26(_28);}});};if(dijit._isElementShown(_1f)){_26(_1f);}return {first:_20,last:_21,lowest:_22,highest:_24};};dijit.getFirstInTabbingOrder=function(_2b){var _2c=dijit._getTabNavigable(dojo.byId(_2b));return _2c.lowest?_2c.lowest:_2c.first;};dijit.getLastInTabbingOrder=function(_2d){var _2e=dijit._getTabNavigable(dojo.byId(_2d));return _2e.last?_2e.last:_2e.highest;};dijit.defaultDuration=dojo.config["defaultDuration"]||200;}if(!dojo._hasResource["dijit._base.focus"]){dojo._hasResource["dijit._base.focus"]=true;dojo.provide("dijit._base.focus");dojo.mixin(dijit,{_curFocus:null,_prevFocus:null,isCollapsed:function(){return dijit.getBookmark().isCollapsed;},getBookmark:function(){var bm,rg,tg,sel=dojo.doc.selection,cf=dijit._curFocus;if(dojo.global.getSelection){sel=dojo.global.getSelection();if(sel){if(sel.isCollapsed){tg=cf?cf.tagName:"";if(tg){tg=tg.toLowerCase();if(tg=="textarea"||(tg=="input"&&(!cf.type||cf.type.toLowerCase()=="text"))){sel={start:cf.selectionStart,end:cf.selectionEnd,node:cf,pRange:true};return {isCollapsed:(sel.end<=sel.start),mark:sel};}}bm={isCollapsed:true};}else{rg=sel.getRangeAt(0);bm={isCollapsed:false,mark:rg.cloneRange()};}}}else{if(sel){tg=cf?cf.tagName:"";tg=tg.toLowerCase();if(cf&&tg&&(tg=="button"||tg=="textarea"||tg=="input")){if(sel.type&&sel.type.toLowerCase()=="none"){return {isCollapsed:true,mark:null};}else{rg=sel.createRange();return {isCollapsed:rg.text&&rg.text.length?false:true,mark:{range:rg,pRange:true}};}}bm={};try{rg=sel.createRange();bm.isCollapsed=!(sel.type=="Text"?rg.htmlText.length:rg.length);}catch(e){bm.isCollapsed=true;return bm;}if(sel.type.toUpperCase()=="CONTROL"){if(rg.length){bm.mark=[];var i=0,len=rg.length;while(i<len){bm.mark.push(rg.item(i++));}}else{bm.isCollapsed=true;bm.mark=null;}}else{bm.mark=rg.getBookmark();}}else{console.warn("No idea how to store the current selection for this browser!");}}return bm;},moveToBookmark:function(_2f){var _30=dojo.doc,_31=_2f.mark;if(_31){if(dojo.global.getSelection){var sel=dojo.global.getSelection();if(sel&&sel.removeAllRanges){if(_31.pRange){var r=_31;var n=r.node;n.selectionStart=r.start;n.selectionEnd=r.end;}else{sel.removeAllRanges();sel.addRange(_31);}}else{console.warn("No idea how to restore selection for this browser!");}}else{if(_30.selection&&_31){var rg;if(_31.pRange){rg=_31.range;}else{if(dojo.isArray(_31)){rg=_30.body.createControlRange();dojo.forEach(_31,function(n){rg.addElement(n);});}else{rg=_30.body.createTextRange();rg.moveToBookmark(_31);}}rg.select();}}}},getFocus:function(_32,_33){var _34=!dijit._curFocus||(_32&&dojo.isDescendant(dijit._curFocus,_32.domNode))?dijit._prevFocus:dijit._curFocus;return {node:_34,bookmark:(_34==dijit._curFocus)&&dojo.withGlobal(_33||dojo.global,dijit.getBookmark),openedForWindow:_33};},focus:function(_35){if(!_35){return;}var _36="node" in _35?_35.node:_35,_37=_35.bookmark,_38=_35.openedForWindow,_39=_37?_37.isCollapsed:false;if(_36){var _3a=(_36.tagName.toLowerCase()=="iframe")?_36.contentWindow:_36;if(_3a&&_3a.focus){try{_3a.focus();}catch(e){}}dijit._onFocusNode(_36);}if(_37&&dojo.withGlobal(_38||dojo.global,dijit.isCollapsed)&&!_39){if(_38){_38.focus();}try{dojo.withGlobal(_38||dojo.global,dijit.moveToBookmark,null,[_37]);}catch(e2){}}},_activeStack:[],registerIframe:function(_3b){return dijit.registerWin(_3b.contentWindow,_3b);},unregisterIframe:function(_3c){dijit.unregisterWin(_3c);},registerWin:function(_3d,_3e){var _3f=function(evt){dijit._justMouseDowned=true;setTimeout(function(){dijit._justMouseDowned=false;},0);dijit._onTouchNode(_3e||evt.target||evt.srcElement,"mouse");};var doc=dojo.isIE?_3d.document.documentElement:_3d.document;if(doc){if(dojo.isIE){doc.attachEvent("onmousedown",_3f);var _40=function(evt){if(evt.srcElement.tagName.toLowerCase()!="#document"&&dijit.isTabNavigable(evt.srcElement)){dijit._onFocusNode(_3e||evt.srcElement);}else{dijit._onTouchNode(_3e||evt.srcElement);}};doc.attachEvent("onactivate",_40);var _41=function(evt){dijit._onBlurNode(_3e||evt.srcElement);};doc.attachEvent("ondeactivate",_41);return function(){doc.detachEvent("onmousedown",_3f);doc.detachEvent("onactivate",_40);doc.detachEvent("ondeactivate",_41);doc=null;};}else{doc.addEventListener("mousedown",_3f,true);var _42=function(evt){dijit._onFocusNode(_3e||evt.target);};doc.addEventListener("focus",_42,true);var _43=function(evt){dijit._onBlurNode(_3e||evt.target);};doc.addEventListener("blur",_43,true);return function(){doc.removeEventListener("mousedown",_3f,true);doc.removeEventListener("focus",_42,true);doc.removeEventListener("blur",_43,true);doc=null;};}}},unregisterWin:function(_44){_44&&_44();},_onBlurNode:function(_45){dijit._prevFocus=dijit._curFocus;dijit._curFocus=null;if(dijit._justMouseDowned){return;}if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);}dijit._clearActiveWidgetsTimer=setTimeout(function(){delete dijit._clearActiveWidgetsTimer;dijit._setStack([]);dijit._prevFocus=null;},100);},_onTouchNode:function(_46,by){if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);delete dijit._clearActiveWidgetsTimer;}var _47=[];try{while(_46){var _48=dojo.attr(_46,"dijitPopupParent");if(_48){_46=dijit.byId(_48).domNode;}else{if(_46.tagName&&_46.tagName.toLowerCase()=="body"){if(_46===dojo.body()){break;}_46=dijit.getDocumentWindow(_46.ownerDocument).frameElement;}else{var id=_46.getAttribute&&_46.getAttribute("widgetId");if(id){_47.unshift(id);}_46=_46.parentNode;}}}}catch(e){}dijit._setStack(_47,by);},_onFocusNode:function(_49){if(!_49){return;}if(_49.nodeType==9){return;}dijit._onTouchNode(_49);if(_49==dijit._curFocus){return;}if(dijit._curFocus){dijit._prevFocus=dijit._curFocus;}dijit._curFocus=_49;dojo.publish("focusNode",[_49]);},_setStack:function(_4a,by){var _4b=dijit._activeStack;dijit._activeStack=_4a;for(var _4c=0;_4c<Math.min(_4b.length,_4a.length);_4c++){if(_4b[_4c]!=_4a[_4c]){break;}}var _4d;for(var i=_4b.length-1;i>=_4c;i--){_4d=dijit.byId(_4b[i]);if(_4d){_4d._focused=false;_4d._hasBeenBlurred=true;if(_4d._onBlur){_4d._onBlur(by);}if(_4d._setStateClass){_4d._setStateClass();}dojo.publish("widgetBlur",[_4d,by]);}}for(i=_4c;i<_4a.length;i++){_4d=dijit.byId(_4a[i]);if(_4d){_4d._focused=true;if(_4d._onFocus){_4d._onFocus(by);}if(_4d._setStateClass){_4d._setStateClass();}dojo.publish("widgetFocus",[_4d,by]);}}}});dojo.addOnLoad(function(){var _4e=dijit.registerWin(window);if(dojo.isIE){dojo.addOnWindowUnload(function(){dijit.unregisterWin(_4e);_4e=null;});}});}if(!dojo._hasResource["dojo.AdapterRegistry"]){dojo._hasResource["dojo.AdapterRegistry"]=true;dojo.provide("dojo.AdapterRegistry");dojo.AdapterRegistry=function(_4f){this.pairs=[];this.returnWrappers=_4f||false;};dojo.extend(dojo.AdapterRegistry,{register:function(_50,_51,_52,_53,_54){this.pairs[((_54)?"unshift":"push")]([_50,_51,_52,_53]);},match:function(){for(var i=0;i<this.pairs.length;i++){var _55=this.pairs[i];if(_55[1].apply(this,arguments)){if((_55[3])||(this.returnWrappers)){return _55[2];}else{return _55[2].apply(this,arguments);}}}throw new Error("No match found");},unregister:function(_56){for(var i=0;i<this.pairs.length;i++){var _57=this.pairs[i];if(_57[0]==_56){this.pairs.splice(i,1);return true;}}return false;}});}if(!dojo._hasResource["dijit._base.place"]){dojo._hasResource["dijit._base.place"]=true;dojo.provide("dijit._base.place");dijit.getViewport=function(){var _58=(dojo.doc.compatMode=="BackCompat")?dojo.body():dojo.doc.documentElement;var _59=dojo._docScroll();return {w:_58.clientWidth,h:_58.clientHeight,l:_59.x,t:_59.y};};dijit.placeOnScreen=function(_5a,pos,_5b,_5c){var _5d=dojo.map(_5b,function(_5e){var c={corner:_5e,pos:{x:pos.x,y:pos.y}};if(_5c){c.pos.x+=_5e.charAt(1)=="L"?_5c.x:-_5c.x;c.pos.y+=_5e.charAt(0)=="T"?_5c.y:-_5c.y;}return c;});return dijit._place(_5a,_5d);};dijit._place=function(_5f,_60,_61){var _62=dijit.getViewport();if(!_5f.parentNode||String(_5f.parentNode.tagName).toLowerCase()!="body"){dojo.body().appendChild(_5f);}var _63=null;dojo.some(_60,function(_64){var _65=_64.corner;var pos=_64.pos;if(_61){_61(_5f,_64.aroundCorner,_65);}var _66=_5f.style;var _67=_66.display;var _68=_66.visibility;_66.visibility="hidden";_66.display="";var mb=dojo.marginBox(_5f);_66.display=_67;_66.visibility=_68;var _69=Math.max(_62.l,_65.charAt(1)=="L"?pos.x:(pos.x-mb.w)),_6a=Math.max(_62.t,_65.charAt(0)=="T"?pos.y:(pos.y-mb.h)),_6b=Math.min(_62.l+_62.w,_65.charAt(1)=="L"?(_69+mb.w):pos.x),_6c=Math.min(_62.t+_62.h,_65.charAt(0)=="T"?(_6a+mb.h):pos.y),_6d=_6b-_69,_6e=_6c-_6a,_6f=(mb.w-_6d)+(mb.h-_6e);if(_63==null||_6f<_63.overflow){_63={corner:_65,aroundCorner:_64.aroundCorner,x:_69,y:_6a,w:_6d,h:_6e,overflow:_6f};}return !_6f;});_5f.style.left=_63.x+"px";_5f.style.top=_63.y+"px";if(_63.overflow&&_61){_61(_5f,_63.aroundCorner,_63.corner);}return _63;};dijit.placeOnScreenAroundNode=function(_70,_71,_72,_73){_71=dojo.byId(_71);var _74=_71.style.display;_71.style.display="";var _75=dojo.position(_71,true);_71.style.display=_74;return dijit._placeOnScreenAroundRect(_70,_75.x,_75.y,_75.w,_75.h,_72,_73);};dijit.placeOnScreenAroundRectangle=function(_76,_77,_78,_79){return dijit._placeOnScreenAroundRect(_76,_77.x,_77.y,_77.width,_77.height,_78,_79);};dijit._placeOnScreenAroundRect=function(_7a,x,y,_7b,_7c,_7d,_7e){var _7f=[];for(var _80 in _7d){_7f.push({aroundCorner:_80,corner:_7d[_80],pos:{x:x+(_80.charAt(1)=="L"?0:_7b),y:y+(_80.charAt(0)=="T"?0:_7c)}});}return dijit._place(_7a,_7f,_7e);};dijit.placementRegistry=new dojo.AdapterRegistry();dijit.placementRegistry.register("node",function(n,x){return typeof x=="object"&&typeof x.offsetWidth!="undefined"&&typeof x.offsetHeight!="undefined";},dijit.placeOnScreenAroundNode);dijit.placementRegistry.register("rect",function(n,x){return typeof x=="object"&&"x" in x&&"y" in x&&"width" in x&&"height" in x;},dijit.placeOnScreenAroundRectangle);dijit.placeOnScreenAroundElement=function(_81,_82,_83,_84){return dijit.placementRegistry.match.apply(dijit.placementRegistry,arguments);};dijit.getPopupAlignment=function(_85,_86){var _87={};dojo.forEach(_85,function(pos){switch(pos){case "after":_87[_86?"BR":"BL"]=_86?"BL":"BR";break;case "before":_87[_86?"BL":"BR"]=_86?"BR":"BL";break;case "below":_87[_86?"BL":"BR"]=_86?"TL":"TR";_87[_86?"BR":"BL"]=_86?"TR":"TL";break;case "above":default:_87[_86?"TL":"TR"]=_86?"BL":"BR";_87[_86?"TR":"TL"]=_86?"BR":"BL";break;}});return _87;};dijit.getPopupAroundAlignment=function(_88,_89){var _8a={};dojo.forEach(_88,function(pos){switch(pos){case "after":_8a[_89?"BR":"BL"]=_89?"BL":"BR";break;case "before":_8a[_89?"BL":"BR"]=_89?"BR":"BL";break;case "below":_8a[_89?"BL":"BR"]=_89?"TL":"TR";_8a[_89?"BR":"BL"]=_89?"TR":"TL";break;case "above":default:_8a[_89?"TL":"TR"]=_89?"BL":"BR";_8a[_89?"TR":"TL"]=_89?"BR":"BL";break;}});return _8a;};}if(!dojo._hasResource["dijit._base.window"]){dojo._hasResource["dijit._base.window"]=true;dojo.provide("dijit._base.window");dijit.getDocumentWindow=function(doc){if(dojo.isIE&&window!==document.parentWindow&&!doc._parentWindow){doc.parentWindow.execScript("document._parentWindow = window;","Javascript");var win=doc._parentWindow;doc._parentWindow=null;return win;}return doc._parentWindow||doc.parentWindow||doc.defaultView;};}if(!dojo._hasResource["dijit._base.popup"]){dojo._hasResource["dijit._base.popup"]=true;dojo.provide("dijit._base.popup");dijit.popup=new function(){var _8b=[],_8c=1000,_8d=1;this.moveOffScreen=function(_8e){var s=_8e.style;s.visibility="hidden";s.position="absolute";s.top="-9999px";if(s.display=="none"){s.display="";}dojo.body().appendChild(_8e);};var _8f=function(){for(var pi=_8b.length-1;pi>0&&_8b[pi].parent===_8b[pi-1].widget;pi--){}return _8b[pi];};var _90=[];this.open=function(_91){var _92=_91.popup,_93=_91.orient||(dojo._isBodyLtr()?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"}),_94=_91.around,id=(_91.around&&_91.around.id)?(_91.around.id+"_dropdown"):("popup_"+_8d++);var _95=_90.pop(),_96,_97;if(!_95){_96=dojo.create("div",{"class":"dijitPopup"},dojo.body());dijit.setWaiRole(_96,"presentation");}else{_96=_95[0];_97=_95[1];}dojo.attr(_96,{id:id,style:{zIndex:_8c+_8b.length,visibility:"hidden",top:"-9999px"},dijitPopupParent:_91.parent?_91.parent.id:""});var s=_92.domNode.style;s.display="";s.visibility="";s.position="";s.top="0px";_96.appendChild(_92.domNode);if(!_97){_97=new dijit.BackgroundIframe(_96);}else{_97.resize(_96);}var _98=_94?dijit.placeOnScreenAroundElement(_96,_94,_93,_92.orient?dojo.hitch(_92,"orient"):null):dijit.placeOnScreen(_96,_91,_93=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],_91.padding);_96.style.visibility="visible";var _99=[];_99.push(dojo.connect(_96,"onkeypress",this,function(evt){if(evt.charOrCode==dojo.keys.ESCAPE&&_91.onCancel){dojo.stopEvent(evt);_91.onCancel();}else{if(evt.charOrCode===dojo.keys.TAB){dojo.stopEvent(evt);var _9a=_8f();if(_9a&&_9a.onCancel){_9a.onCancel();}}}}));if(_92.onCancel){_99.push(dojo.connect(_92,"onCancel",_91.onCancel));}_99.push(dojo.connect(_92,_92.onExecute?"onExecute":"onChange",function(){var _9b=_8f();if(_9b&&_9b.onExecute){_9b.onExecute();}}));_8b.push({wrapper:_96,iframe:_97,widget:_92,parent:_91.parent,onExecute:_91.onExecute,onCancel:_91.onCancel,onClose:_91.onClose,handlers:_99});if(_92.onOpen){_92.onOpen(_98);}return _98;};this.close=function(_9c){while(dojo.some(_8b,function(_9d){return _9d.widget==_9c;})){var top=_8b.pop(),_9e=top.wrapper,_9f=top.iframe,_a0=top.widget,_a1=top.onClose;if(_a0.onClose){_a0.onClose();}dojo.forEach(top.handlers,dojo.disconnect);if(_a0&&_a0.domNode){this.moveOffScreen(_a0.domNode);}_9e.style.top="-9999px";_9e.style.visibility="hidden";_90.push([_9e,_9f]);if(_a1){_a1();}}};}();dijit._frames=new function(){var _a2=[];this.pop=function(){var _a3;if(_a2.length){_a3=_a2.pop();_a3.style.display="";}else{if(dojo.isIE){var _a4=dojo.config["dojoBlankHtmlUrl"]||(dojo.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\"";var _a5="<iframe src='"+_a4+"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";_a3=dojo.doc.createElement(_a5);}else{_a3=dojo.create("iframe");_a3.src="javascript:\"\"";_a3.className="dijitBackgroundIframe";dojo.style(_a3,"opacity",0.1);}_a3.tabIndex=-1;}return _a3;};this.push=function(_a6){_a6.style.display="none";_a2.push(_a6);};}();dijit.BackgroundIframe=function(_a7){if(!_a7.id){throw new Error("no id");}if(dojo.isIE||dojo.isMoz){var _a8=dijit._frames.pop();_a7.appendChild(_a8);if(dojo.isIE<7){this.resize(_a7);this._conn=dojo.connect(_a7,"onresize",this,function(){this.resize(_a7);});}else{dojo.style(_a8,{width:"100%",height:"100%"});}this.iframe=_a8;}};dojo.extend(dijit.BackgroundIframe,{resize:function(_a9){if(this.iframe&&dojo.isIE<7){dojo.style(this.iframe,{width:_a9.offsetWidth+"px",height:_a9.offsetHeight+"px"});}},destroy:function(){if(this._conn){dojo.disconnect(this._conn);this._conn=null;}if(this.iframe){dijit._frames.push(this.iframe);delete this.iframe;}}});}if(!dojo._hasResource["dijit._base.scroll"]){dojo._hasResource["dijit._base.scroll"]=true;dojo.provide("dijit._base.scroll");dijit.scrollIntoView=function(_aa,pos){try{_aa=dojo.byId(_aa);var doc=_aa.ownerDocument||dojo.doc,_ab=doc.body||dojo.body(),_ac=doc.documentElement||_ab.parentNode,_ad=dojo.isIE,_ae=dojo.isWebKit;if((!(dojo.isMoz||_ad||_ae)||_aa==_ab||_aa==_ac)&&(typeof _aa.scrollIntoView!="undefined")){_aa.scrollIntoView(false);return;}var _af=doc.compatMode=="BackCompat",_b0=_af?_ab:_ac,_b1=_ae?_ab:_b0,_b2=_b0.clientWidth,_b3=_b0.clientHeight,rtl=!dojo._isBodyLtr(),_b4=pos||dojo.position(_aa),el=_aa.parentNode,_b5=function(el){return ((_ad<=6||(_ad&&_af))?false:(dojo.style(el,"position").toLowerCase()=="fixed"));};if(_b5(_aa)){return;}while(el){if(el==_ab){el=_b1;}var _b6=dojo.position(el),_b7=_b5(el);with(_b6){if(el==_b1){w=_b2,h=_b3;if(_b1==_ac&&_ad&&rtl){x+=_b1.offsetWidth-w;}if(x<0||!_ad){x=0;}if(y<0||!_ad){y=0;}}else{var pb=dojo._getPadBorderExtents(el);w-=pb.w;h-=pb.h;x+=pb.l;y+=pb.t;}with(el){if(el!=_b1){var _b8=clientWidth,_b9=w-_b8;if(_b8>0&&_b9>0){w=_b8;if(_ad&&rtl){x+=_b9;}}_b8=clientHeight;_b9=h-_b8;if(_b8>0&&_b9>0){h=_b8;}}if(_b7){if(y<0){h+=y,y=0;}if(x<0){w+=x,x=0;}if(y+h>_b3){h=_b3-y;}if(x+w>_b2){w=_b2-x;}}var l=_b4.x-x,t=_b4.y-Math.max(y,0),r=l+_b4.w-w,bot=t+_b4.h-h;if(r*l>0){var s=Math[l<0?"max":"min"](l,r);_b4.x+=scrollLeft;scrollLeft+=(_ad>=8&&!_af&&rtl)?-s:s;_b4.x-=scrollLeft;}if(bot*t>0){_b4.y+=scrollTop;scrollTop+=Math[t<0?"max":"min"](t,bot);_b4.y-=scrollTop;}}}el=(el!=_b1)&&!_b7&&el.parentNode;}}catch(error){console.error("scrollIntoView: "+error);_aa.scrollIntoView(false);}};}if(!dojo._hasResource["dijit._base.sniff"]){dojo._hasResource["dijit._base.sniff"]=true;dojo.provide("dijit._base.sniff");(function(){var d=dojo,_ba=d.doc.documentElement,ie=d.isIE,_bb=d.isOpera,maj=Math.floor,ff=d.isFF,_bc=d.boxModel.replace(/-/,""),_bd={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_ie8:maj(ie)==8,dj_iequirks:ie&&d.isQuirks,dj_opera:_bb,dj_khtml:d.isKhtml,dj_webkit:d.isWebKit,dj_safari:d.isSafari,dj_chrome:d.isChrome,dj_gecko:d.isMozilla,dj_ff3:maj(ff)==3};_bd["dj_"+_bc]=true;for(var p in _bd){if(_bd[p]){if(_ba.className){_ba.className+=" "+p;}else{_ba.className=p;}}}dojo._loaders.unshift(function(){if(!dojo._isBodyLtr()){_ba.className+=" dijitRtl";for(var p in _bd){if(_bd[p]){_ba.className+=" "+p+"-rtl";}}}});})();}if(!dojo._hasResource["dijit._base.typematic"]){dojo._hasResource["dijit._base.typematic"]=true;dojo.provide("dijit._base.typematic");dijit.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=Math.max(this._currentTimeout<0?this._initialDelay:(this._subsequentDelay>1?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay)),10);this._timer=setTimeout(dojo.hitch(this,"_fireEventAndReload"),this._currentTimeout);},trigger:function(evt,_be,_bf,_c0,obj,_c1,_c2){if(obj!=this._obj){this.stop();this._initialDelay=_c2||500;this._subsequentDelay=_c1||0.9;this._obj=obj;this._evt=evt;this._node=_bf;this._currentTimeout=-1;this._count=-1;this._callback=dojo.hitch(_be,_c0);this._fireEventAndReload();}},stop:function(){if(this._timer){clearTimeout(this._timer);this._timer=null;}if(this._obj){this._callback(-1,this._node,this._evt);this._obj=null;}},addKeyListener:function(_c3,_c4,_c5,_c6,_c7,_c8){if(_c4.keyCode){_c4.charOrCode=_c4.keyCode;dojo.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}else{if(_c4.charCode){_c4.charOrCode=String.fromCharCode(_c4.charCode);dojo.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}}return [dojo.connect(_c3,"onkeypress",this,function(evt){if(evt.charOrCode==_c4.charOrCode&&(_c4.ctrlKey===undefined||_c4.ctrlKey==evt.ctrlKey)&&(_c4.altKey===undefined||_c4.altKey==evt.altKey)&&(_c4.metaKey===undefined||_c4.metaKey==(evt.metaKey||false))&&(_c4.shiftKey===undefined||_c4.shiftKey==evt.shiftKey)){dojo.stopEvent(evt);dijit.typematic.trigger(_c4,_c5,_c3,_c6,_c4,_c7,_c8);}else{if(dijit.typematic._obj==_c4){dijit.typematic.stop();}}}),dojo.connect(_c3,"onkeyup",this,function(evt){if(dijit.typematic._obj==_c4){dijit.typematic.stop();}})];},addMouseListener:function(_c9,_ca,_cb,_cc,_cd){var dc=dojo.connect;return [dc(_c9,"mousedown",this,function(evt){dojo.stopEvent(evt);dijit.typematic.trigger(evt,_ca,_c9,_cb,_c9,_cc,_cd);}),dc(_c9,"mouseup",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(_c9,"mouseout",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(_c9,"mousemove",this,function(evt){dojo.stopEvent(evt);}),dc(_c9,"dblclick",this,function(evt){dojo.stopEvent(evt);if(dojo.isIE){dijit.typematic.trigger(evt,_ca,_c9,_cb,_c9,_cc,_cd);setTimeout(dojo.hitch(this,dijit.typematic.stop),50);}})];},addListener:function(_ce,_cf,_d0,_d1,_d2,_d3,_d4){return this.addKeyListener(_cf,_d0,_d1,_d2,_d3,_d4).concat(this.addMouseListener(_ce,_d1,_d2,_d3,_d4));}};}if(!dojo._hasResource["dijit._base.wai"]){dojo._hasResource["dijit._base.wai"]=true;dojo.provide("dijit._base.wai");dijit.wai={onload:function(){var div=dojo.create("div",{id:"a11yTestNode",style:{cssText:"border: 1px solid;"+"border-color:red green;"+"position: absolute;"+"height: 5px;"+"top: -999px;"+"background-image: url(\""+(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif"))+"\");"}},dojo.body());var cs=dojo.getComputedStyle(div);if(cs){var _d5=cs.backgroundImage;var _d6=(cs.borderTopColor==cs.borderRightColor)||(_d5!=null&&(_d5=="none"||_d5=="url(invalid-url:)"));dojo[_d6?"addClass":"removeClass"](dojo.body(),"dijit_a11y");if(dojo.isIE){div.outerHTML="";}else{dojo.body().removeChild(div);}}}};if(dojo.isIE||dojo.isMoz){dojo._loaders.unshift(dijit.wai.onload);}dojo.mixin(dijit,{_XhtmlRoles:/banner|contentinfo|definition|main|navigation|search|note|secondary|seealso/,hasWaiRole:function(_d7,_d8){var _d9=this.getWaiRole(_d7);return _d8?(_d9.indexOf(_d8)>-1):(_d9.length>0);},getWaiRole:function(_da){return dojo.trim((dojo.attr(_da,"role")||"").replace(this._XhtmlRoles,"").replace("wairole:",""));},setWaiRole:function(_db,_dc){var _dd=dojo.attr(_db,"role")||"";if(!this._XhtmlRoles.test(_dd)){dojo.attr(_db,"role",_dc);}else{if((" "+_dd+" ").indexOf(" "+_dc+" ")<0){var _de=dojo.trim(_dd.replace(this._XhtmlRoles,""));var _df=dojo.trim(_dd.replace(_de,""));dojo.attr(_db,"role",_df+(_df?" ":"")+_dc);}}},removeWaiRole:function(_e0,_e1){var _e2=dojo.attr(_e0,"role");if(!_e2){return;}if(_e1){var t=dojo.trim((" "+_e2+" ").replace(" "+_e1+" "," "));dojo.attr(_e0,"role",t);}else{_e0.removeAttribute("role");}},hasWaiState:function(_e3,_e4){return _e3.hasAttribute?_e3.hasAttribute("aria-"+_e4):!!_e3.getAttribute("aria-"+_e4);},getWaiState:function(_e5,_e6){return _e5.getAttribute("aria-"+_e6)||"";},setWaiState:function(_e7,_e8,_e9){_e7.setAttribute("aria-"+_e8,_e9);},removeWaiState:function(_ea,_eb){_ea.removeAttribute("aria-"+_eb);}});}if(!dojo._hasResource["dijit._base"]){dojo._hasResource["dijit._base"]=true;dojo.provide("dijit._base");}if(!dojo._hasResource["dojo.date.stamp"]){dojo._hasResource["dojo.date.stamp"]=true;dojo.provide("dojo.date.stamp");dojo.date.stamp.fromISOString=function(_ec,_ed){if(!dojo.date.stamp._isoRegExp){dojo.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;}var _ee=dojo.date.stamp._isoRegExp.exec(_ec),_ef=null;if(_ee){_ee.shift();if(_ee[1]){_ee[1]--;}if(_ee[6]){_ee[6]*=1000;}if(_ed){_ed=new Date(_ed);dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(_f0){return _ed["get"+_f0]();}).forEach(function(_f1,_f2){if(_ee[_f2]===undefined){_ee[_f2]=_f1;}});}_ef=new Date(_ee[0]||1970,_ee[1]||0,_ee[2]||1,_ee[3]||0,_ee[4]||0,_ee[5]||0,_ee[6]||0);if(_ee[0]<100){_ef.setFullYear(_ee[0]||1970);}var _f3=0,_f4=_ee[7]&&_ee[7].charAt(0);if(_f4!="Z"){_f3=((_ee[8]||0)*60)+(Number(_ee[9])||0);if(_f4!="-"){_f3*=-1;}}if(_f4){_f3-=_ef.getTimezoneOffset();}if(_f3){_ef.setTime(_ef.getTime()+_f3*60000);}}return _ef;};dojo.date.stamp.toISOString=function(_f5,_f6){var _f7=function(n){return (n<10)?"0"+n:n;};_f6=_f6||{};var _f8=[],_f9=_f6.zulu?"getUTC":"get",_fa="";if(_f6.selector!="time"){var _fb=_f5[_f9+"FullYear"]();_fa=["0000".substr((_fb+"").length)+_fb,_f7(_f5[_f9+"Month"]()+1),_f7(_f5[_f9+"Date"]())].join("-");}_f8.push(_fa);if(_f6.selector!="date"){var _fc=[_f7(_f5[_f9+"Hours"]()),_f7(_f5[_f9+"Minutes"]()),_f7(_f5[_f9+"Seconds"]())].join(":");var _fd=_f5[_f9+"Milliseconds"]();if(_f6.milliseconds){_fc+="."+(_fd<100?"0":"")+_f7(_fd);}if(_f6.zulu){_fc+="Z";}else{if(_f6.selector!="time"){var _fe=_f5.getTimezoneOffset();var _ff=Math.abs(_fe);_fc+=(_fe>0?"-":"+")+_f7(Math.floor(_ff/60))+":"+_f7(_ff%60);}}_f8.push(_fc);}return _f8.join("T");};}if(!dojo._hasResource["dojo.parser"]){dojo._hasResource["dojo.parser"]=true;dojo.provide("dojo.parser");dojo.parser=new function(){var d=dojo;this._attrName=d._scopeName+"Type";this._query="["+this._attrName+"]";function _100(_101){if(d.isString(_101)){return "string";}if(typeof _101=="number"){return "number";}if(typeof _101=="boolean"){return "boolean";}if(d.isFunction(_101)){return "function";}if(d.isArray(_101)){return "array";}if(_101 instanceof Date){return "date";}if(_101 instanceof d._Url){return "url";}return "object";};function _102(_103,type){switch(type){case "string":return _103;case "number":return _103.length?Number(_103):NaN;case "boolean":return typeof _103=="boolean"?_103:!(_103.toLowerCase()=="false");case "function":if(d.isFunction(_103)){_103=_103.toString();_103=d.trim(_103.substring(_103.indexOf("{")+1,_103.length-1));}try{if(_103.search(/[^\w\.]+/i)!=-1){return new Function(_103);}else{return d.getObject(_103,false);}}catch(e){return new Function();}case "array":return _103?_103.split(/\s*,\s*/):[];case "date":switch(_103){case "":return new Date("");case "now":return new Date();default:return d.date.stamp.fromISOString(_103);}case "url":return d.baseUrl+_103;default:return d.fromJson(_103);}};var _104={};dojo.connect(dojo,"extend",function(){_104={};});function _105(_106){if(!_104[_106]){var cls=d.getObject(_106);if(!d.isFunction(cls)){throw new Error("Could not load class '"+_106+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");}var _107=cls.prototype;var _108={},_109={};for(var name in _107){if(name.charAt(0)=="_"){continue;}if(name in _109){continue;}var _10a=_107[name];_108[name]=_100(_10a);}_104[_106]={cls:cls,params:_108};}return _104[_106];};this._functionFromScript=function(_10b){var _10c="";var _10d="";var _10e=_10b.getAttribute("args");if(_10e){d.forEach(_10e.split(/\s*,\s*/),function(part,idx){_10c+="var "+part+" = arguments["+idx+"]; ";});}var _10f=_10b.getAttribute("with");if(_10f&&_10f.length){d.forEach(_10f.split(/\s*,\s*/),function(part){_10c+="with("+part+"){";_10d+="}";});}return new Function(_10c+_10b.innerHTML+_10d);};this.instantiate=function(_110,_111,args){var _112=[],dp=dojo.parser;_111=_111||{};args=args||{};d.forEach(_110,function(node){if(!node){return;}var type=dp._attrName in _111?_111[dp._attrName]:node.getAttribute(dp._attrName);if(!type||!type.length){return;}var _113=_105(type),_114=_113.cls,ps=_114._noScript||_114.prototype._noScript;var _115={},_116=node.attributes;for(var name in _113.params){var item=name in _111?{value:_111[name],specified:true}:_116.getNamedItem(name);if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){continue;}var _117=item.value;switch(name){case "class":_117="className" in _111?_111.className:node.className;break;case "style":_117="style" in _111?_111.style:(node.style&&node.style.cssText);}var _118=_113.params[name];if(typeof _117=="string"){_115[name]=_102(_117,_118);}else{_115[name]=_117;}}if(!ps){var _119=[],_11a=[];d.query("> script[type^='dojo/']",node).orphan().forEach(function(_11b){var _11c=_11b.getAttribute("event"),type=_11b.getAttribute("type"),nf=d.parser._functionFromScript(_11b);if(_11c){if(type=="dojo/connect"){_119.push({event:_11c,func:nf});}else{_115[_11c]=nf;}}else{_11a.push(nf);}});}var _11d=_114.markupFactory||_114.prototype&&_114.prototype.markupFactory;var _11e=_11d?_11d(_115,node,_114):new _114(_115,node);_112.push(_11e);var _11f=node.getAttribute("jsId");if(_11f){d.setObject(_11f,_11e);}if(!ps){d.forEach(_119,function(_120){d.connect(_11e,_120.event,null,_120.func);});d.forEach(_11a,function(func){func.call(_11e);});}});if(!_111._started){d.forEach(_112,function(_121){if(!args.noStart&&_121&&_121.startup&&!_121._started&&(!_121.getParent||!_121.getParent())){_121.startup();}});}return _112;};this.parse=function(_122,args){var root;if(!args&&_122&&_122.rootNode){args=_122;root=args.rootNode;}else{root=_122;}var list=d.query(this._query,root);return this.instantiate(list,null,args);};}();(function(){var _123=function(){if(dojo.config.parseOnLoad){dojo.parser.parse();}};if(dojo.exists("dijit.wai.onload")&&(dijit.wai.onload===dojo._loaders[0])){dojo._loaders.splice(1,0,_123);}else{dojo._loaders.unshift(_123);}})();}if(!dojo._hasResource["dijit._Widget"]){dojo._hasResource["dijit._Widget"]=true;dojo.provide("dijit._Widget");dojo.require("dijit._base");dojo.connect(dojo,"_connect",function(_124,_125){if(_124&&dojo.isFunction(_124._onConnect)){_124._onConnect(_125);}});dijit._connectOnUseEventHandler=function(_126){};dijit._lastKeyDownNode=null;if(dojo.isIE){(function(){var _127=function(evt){dijit._lastKeyDownNode=evt.srcElement;};dojo.doc.attachEvent("onkeydown",_127);dojo.addOnWindowUnload(function(){dojo.doc.detachEvent("onkeydown",_127);});})();}else{dojo.doc.addEventListener("keydown",function(evt){dijit._lastKeyDownNode=evt.target;},true);}(function(){var _128={},_129=function(_12a){var dc=_12a.declaredClass;if(!_128[dc]){var r=[],_12b,_12c=_12a.constructor.prototype;for(var _12d in _12c){if(dojo.isFunction(_12c[_12d])&&(_12b=_12d.match(/^_set([a-zA-Z]*)Attr$/))&&_12b[1]){r.push(_12b[1].charAt(0).toLowerCase()+_12b[1].substr(1));}}_128[dc]=r;}return _128[dc]||[];};dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",tooltip:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:dijit._connectOnUseEventHandler,onDblClick:dijit._connectOnUseEventHandler,onKeyDown:dijit._connectOnUseEventHandler,onKeyPress:dijit._connectOnUseEventHandler,onKeyUp:dijit._connectOnUseEventHandler,onMouseDown:dijit._connectOnUseEventHandler,onMouseMove:dijit._connectOnUseEventHandler,onMouseOut:dijit._connectOnUseEventHandler,onMouseOver:dijit._connectOnUseEventHandler,onMouseLeave:dijit._connectOnUseEventHandler,onMouseEnter:dijit._connectOnUseEventHandler,onMouseUp:dijit._connectOnUseEventHandler,_blankGif:(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif")).toString(),postscript:function(_12e,_12f){this.create(_12e,_12f);},create:function(_130,_131){this.srcNodeRef=dojo.byId(_131);this._connects=[];this._subscribes=[];this._deferredConnects=dojo.clone(this._deferredConnects);for(var attr in this.attributeMap){delete this._deferredConnects[attr];}for(attr in this._deferredConnects){if(this[attr]!==dijit._connectOnUseEventHandler){delete this._deferredConnects[attr];}}if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_130){this.params=_130;dojo.mixin(this,_130);}this.postMixInProperties();if(!this.id){this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));}dijit.registry.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();var _132=this.srcNodeRef;if(_132&&_132.parentNode){_132.parentNode.replaceChild(this.domNode,_132);}for(attr in this.params){this._onConnect(attr);}}if(this.domNode){this.domNode.setAttribute("widgetId",this.id);}this.postCreate();if(this.srcNodeRef&&!this.srcNodeRef.parentNode){delete this.srcNodeRef;}this._created=true;},_applyAttributes:function(){var _133=function(attr,_134){if((_134.params&&attr in _134.params)||_134[attr]){_134.attr(attr,_134[attr]);}};for(var attr in this.attributeMap){_133(attr,this);}dojo.forEach(_129(this),function(a){if(!(a in this.attributeMap)){_133(a,this);}},this);},postMixInProperties:function(){},buildRendering:function(){this.domNode=this.srcNodeRef||dojo.create("div");},postCreate:function(){},startup:function(){this._started=true;},destroyRecursive:function(_135){this._beingDestroyed=true;this.destroyDescendants(_135);this.destroy(_135);},destroy:function(_136){this._beingDestroyed=true;this.uninitialize();var d=dojo,dfe=d.forEach,dun=d.unsubscribe;dfe(this._connects,function(_137){dfe(_137,d.disconnect);});dfe(this._subscribes,function(_138){dun(_138);});dfe(this._supportingWidgets||[],function(w){if(w.destroyRecursive){w.destroyRecursive();}else{if(w.destroy){w.destroy();}}});this.destroyRendering(_136);dijit.registry.remove(this.id);this._destroyed=true;},destroyRendering:function(_139){if(this.bgIframe){this.bgIframe.destroy(_139);delete this.bgIframe;}if(this.domNode){if(_139){dojo.removeAttr(this.domNode,"widgetId");}else{dojo.destroy(this.domNode);}delete this.domNode;}if(this.srcNodeRef){if(!_139){dojo.destroy(this.srcNodeRef);}delete this.srcNodeRef;}},destroyDescendants:function(_13a){dojo.forEach(this.getChildren(),function(_13b){if(_13b.destroyRecursive){_13b.destroyRecursive(_13a);}});},uninitialize:function(){return false;},onFocus:function(){},onBlur:function(){},_onFocus:function(e){this.onFocus();},_onBlur:function(){this.onBlur();},_onConnect:function(_13c){if(_13c in this._deferredConnects){var _13d=this[this._deferredConnects[_13c]||"domNode"];this.connect(_13d,_13c.toLowerCase(),_13c);delete this._deferredConnects[_13c];}},_setClassAttr:function(_13e){var _13f=this[this.attributeMap["class"]||"domNode"];dojo.removeClass(_13f,this["class"]);this["class"]=_13e;dojo.addClass(_13f,_13e);},_setStyleAttr:function(_140){var _141=this[this.attributeMap.style||"domNode"];if(dojo.isObject(_140)){dojo.style(_141,_140);}else{if(_141.style.cssText){_141.style.cssText+="; "+_140;}else{_141.style.cssText=_140;}}this.style=_140;},setAttribute:function(attr,_142){dojo.deprecated(this.declaredClass+"::setAttribute() is deprecated. Use attr() instead.","","2.0");this.attr(attr,_142);},_attrToDom:function(attr,_143){var _144=this.attributeMap[attr];dojo.forEach(dojo.isArray(_144)?_144:[_144],function(_145){var _146=this[_145.node||_145||"domNode"];var type=_145.type||"attribute";switch(type){case "attribute":if(dojo.isFunction(_143)){_143=dojo.hitch(this,_143);}var _147=_145.attribute?_145.attribute:(/^on[A-Z][a-zA-Z]*$/.test(attr)?attr.toLowerCase():attr);dojo.attr(_146,_147,_143);break;case "innerText":_146.innerHTML="";_146.appendChild(dojo.doc.createTextNode(_143));break;case "innerHTML":_146.innerHTML=_143;break;case "class":dojo.removeClass(_146,this[attr]);dojo.addClass(_146,_143);break;}},this);this[attr]=_143;},attr:function(name,_148){var args=arguments.length;if(args==1&&!dojo.isString(name)){for(var x in name){this.attr(x,name[x]);}return this;}var _149=this._getAttrNames(name);if(args>=2){if(this[_149.s]){args=dojo._toArray(arguments,1);return this[_149.s].apply(this,args)||this;}else{if(name in this.attributeMap){this._attrToDom(name,_148);}this[name]=_148;}return this;}else{return this[_149.g]?this[_149.g]():this[name];}},_attrPairNames:{},_getAttrNames:function(name){var apn=this._attrPairNames;if(apn[name]){return apn[name];}var uc=name.charAt(0).toUpperCase()+name.substr(1);return (apn[name]={n:name+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"});},toString:function(){return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";},getDescendants:function(){return this.containerNode?dojo.query("[widgetId]",this.containerNode).map(dijit.byNode):[];},getChildren:function(){return this.containerNode?dijit.findWidgets(this.containerNode):[];},nodesWithKeyClick:["input","button"],connect:function(obj,_14a,_14b){var d=dojo,dc=d._connect,_14c=[];if(_14a=="ondijitclick"){if(!this.nodesWithKeyClick[obj.tagName.toLowerCase()]){var m=d.hitch(this,_14b);_14c.push(dc(obj,"onkeydown",this,function(e){if((e.keyCode==d.keys.ENTER||e.keyCode==d.keys.SPACE)&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){dijit._lastKeyDownNode=e.target;d.stopEvent(e);}}),dc(obj,"onkeyup",this,function(e){if((e.keyCode==d.keys.ENTER||e.keyCode==d.keys.SPACE)&&e.target===dijit._lastKeyDownNode&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){dijit._lastKeyDownNode=null;return m(e);}}));}_14a="onclick";}_14c.push(dc(obj,_14a,this,_14b));this._connects.push(_14c);return _14c;},disconnect:function(_14d){for(var i=0;i<this._connects.length;i++){if(this._connects[i]==_14d){dojo.forEach(_14d,dojo.disconnect);this._connects.splice(i,1);return;}}},subscribe:function(_14e,_14f){var d=dojo,_150=d.subscribe(_14e,this,_14f);this._subscribes.push(_150);return _150;},unsubscribe:function(_151){for(var i=0;i<this._subscribes.length;i++){if(this._subscribes[i]==_151){dojo.unsubscribe(_151);this._subscribes.splice(i,1);return;}}},isLeftToRight:function(){return dojo._isBodyLtr();},isFocusable:function(){return this.focus&&(dojo.style(this.domNode,"display")!="none");},placeAt:function(_152,_153){if(_152.declaredClass&&_152.addChild){_152.addChild(this,_153);}else{dojo.place(this.domNode,_152,_153);}return this;},_onShow:function(){this.onShow();},onShow:function(){},onHide:function(){}});})();}if(!dojo._hasResource["dojo.string"]){dojo._hasResource["dojo.string"]=true;dojo.provide("dojo.string");dojo.string.rep=function(str,num){if(num<=0||!str){return "";}var buf=[];for(;;){if(num&1){buf.push(str);}if(!(num>>=1)){break;}str+=str;}return buf.join("");};dojo.string.pad=function(text,size,ch,end){if(!ch){ch="0";}var out=String(text),pad=dojo.string.rep(ch,Math.ceil((size-out.length)/ch.length));return end?out+pad:pad+out;};dojo.string.substitute=function(_154,map,_155,_156){_156=_156||dojo.global;_155=_155?dojo.hitch(_156,_155):function(v){return v;};return _154.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_157,key,_158){var _159=dojo.getObject(key,false,map);if(_158){_159=dojo.getObject(_158,false,_156).call(_156,_159,key);}return _155(_159,key).toString();});};dojo.string.trim=String.prototype.trim?dojo.trim:function(str){str=str.replace(/^\s+/,"");for(var i=str.length-1;i>=0;i--){if(/\S/.test(str.charAt(i))){str=str.substring(0,i+1);break;}}return str;};}if(!dojo._hasResource["dojo.cache"]){dojo._hasResource["dojo.cache"]=true;dojo.provide("dojo.cache");(function(){var _15a={};dojo.cache=function(_15b,url,_15c){if(typeof _15b=="string"){var _15d=dojo.moduleUrl(_15b,url);}else{_15d=_15b;_15c=url;}var key=_15d.toString();var val=_15c;if(_15c!==undefined&&!dojo.isString(_15c)){val=("value" in _15c?_15c.value:undefined);}var _15e=_15c&&_15c.sanitize?true:false;if(val||val===null){if(val==null){delete _15a[key];}else{val=_15a[key]=_15e?dojo.cache._sanitize(val):val;}}else{if(!(key in _15a)){val=dojo._getText(key);_15a[key]=_15e?dojo.cache._sanitize(val):val;}val=_15a[key];}return val;};dojo.cache._sanitize=function(val){if(val){val=val.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var _15f=val.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_15f){val=_15f[1];}}else{val="";}return val;};})();}if(!dojo._hasResource["dijit._Templated"]){dojo._hasResource["dijit._Templated"]=true;dojo.provide("dijit._Templated");dojo.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_earlyTemplatedStartup:false,constructor:function(){this._attachPoints=[];},_stringRepl:function(tmpl){var _160=this.declaredClass,_161=this;return dojo.string.substitute(tmpl,this,function(_162,key){if(key.charAt(0)=="!"){_162=dojo.getObject(key.substr(1),false,_161);}if(typeof _162=="undefined"){throw new Error(_160+" template:"+key);}if(_162==null){return "";}return key.charAt(0)=="!"?_162:_162.toString().replace(/"/g,"&quot;");},this);},buildRendering:function(){var _163=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);var node;if(dojo.isString(_163)){node=dojo._toDom(this._stringRepl(_163));if(node.nodeType!=1){throw new Error("Invalid template: "+_163);}}else{node=_163.cloneNode(true);}this.domNode=node;this._attachTemplateNodes(node);if(this.widgetsInTemplate){var _164=dojo.parser,qry,attr;if(_164._query!="[dojoType]"){qry=_164._query;attr=_164._attrName;_164._query="[dojoType]";_164._attrName="dojoType";}var cw=(this._startupWidgets=dojo.parser.parse(node,{noStart:!this._earlyTemplatedStartup}));if(qry){_164._query=qry;_164._attrName=attr;}this._supportingWidgets=dijit.findWidgets(node);this._attachTemplateNodes(cw,function(n,p){return n[p];});}this._fillContent(this.srcNodeRef);},_fillContent:function(_165){var dest=this.containerNode;if(_165&&dest){while(_165.hasChildNodes()){dest.appendChild(_165.firstChild);}}},_attachTemplateNodes:function(_166,_167){_167=_167||function(n,p){return n.getAttribute(p);};var _168=dojo.isArray(_166)?_166:(_166.all||_166.getElementsByTagName("*"));var x=dojo.isArray(_166)?0:-1;for(;x<_168.length;x++){var _169=(x==-1)?_166:_168[x];if(this.widgetsInTemplate&&_167(_169,"dojoType")){continue;}var _16a=_167(_169,"dojoAttachPoint");if(_16a){var _16b,_16c=_16a.split(/\s*,\s*/);while((_16b=_16c.shift())){if(dojo.isArray(this[_16b])){this[_16b].push(_169);}else{this[_16b]=_169;}this._attachPoints.push(_16b);}}var _16d=_167(_169,"dojoAttachEvent");if(_16d){var _16e,_16f=_16d.split(/\s*,\s*/);var trim=dojo.trim;while((_16e=_16f.shift())){if(_16e){var _170=null;if(_16e.indexOf(":")!=-1){var _171=_16e.split(":");_16e=trim(_171[0]);_170=trim(_171[1]);}else{_16e=trim(_16e);}if(!_170){_170=_16e;}this.connect(_169,_16e,_170);}}}var role=_167(_169,"waiRole");if(role){dijit.setWaiRole(_169,role);}var _172=_167(_169,"waiState");if(_172){dojo.forEach(_172.split(/\s*,\s*/),function(_173){if(_173.indexOf("-")!=-1){var pair=_173.split("-");dijit.setWaiState(_169,pair[0],pair[1]);}});}}},startup:function(){dojo.forEach(this._startupWidgets,function(w){if(w&&!w._started&&w.startup){w.startup();}});this.inherited(arguments);},destroyRendering:function(){dojo.forEach(this._attachPoints,function(_174){delete this[_174];},this);this._attachPoints=[];this.inherited(arguments);}});dijit._Templated._templateCache={};dijit._Templated.getCachedTemplate=function(_175,_176,_177){var _178=dijit._Templated._templateCache;var key=_176||_175;var _179=_178[key];if(_179){try{if(!_179.ownerDocument||_179.ownerDocument==dojo.doc){return _179;}}catch(e){}dojo.destroy(_179);}if(!_176){_176=dojo.cache(_175,{sanitize:true});}_176=dojo.string.trim(_176);if(_177||_176.match(/\$\{([^\}]+)\}/g)){return (_178[key]=_176);}else{var node=dojo._toDom(_176);if(node.nodeType!=1){throw new Error("Invalid template: "+_176);}return (_178[key]=node);}};if(dojo.isIE){dojo.addOnWindowUnload(function(){var _17a=dijit._Templated._templateCache;for(var key in _17a){var _17b=_17a[key];if(typeof _17b=="object"){dojo.destroy(_17b);}delete _17a[key];}});}dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});}if(!dojo._hasResource["dijit._Container"]){dojo._hasResource["dijit._Container"]=true;dojo.provide("dijit._Container");dojo.declare("dijit._Container",null,{isContainer:true,buildRendering:function(){this.inherited(arguments);if(!this.containerNode){this.containerNode=this.domNode;}},addChild:function(_17c,_17d){var _17e=this.containerNode;if(_17d&&typeof _17d=="number"){var _17f=this.getChildren();if(_17f&&_17f.length>=_17d){_17e=_17f[_17d-1].domNode;_17d="after";}}dojo.place(_17c.domNode,_17e,_17d);if(this._started&&!_17c._started){_17c.startup();}},removeChild:function(_180){if(typeof _180=="number"&&_180>0){_180=this.getChildren()[_180];}if(_180&&_180.domNode){var node=_180.domNode;node.parentNode.removeChild(node);}},getChildren:function(){return dojo.query("> [widgetId]",this.containerNode).map(dijit.byNode);},hasChildren:function(){return dojo.query("> [widgetId]",this.containerNode).length>0;},destroyDescendants:function(_181){dojo.forEach(this.getChildren(),function(_182){_182.destroyRecursive(_181);});},_getSiblingOfChild:function(_183,dir){var node=_183.domNode,_184=(dir>0?"nextSibling":"previousSibling");do{node=node[_184];}while(node&&(node.nodeType!=1||!dijit.byNode(node)));return node&&dijit.byNode(node);},getIndexOfChild:function(_185){return dojo.indexOf(this.getChildren(),_185);},startup:function(){if(this._started){return;}dojo.forEach(this.getChildren(),function(_186){_186.startup();});this.inherited(arguments);}});}if(!dojo._hasResource["dijit._Contained"]){dojo._hasResource["dijit._Contained"]=true;dojo.provide("dijit._Contained");dojo.declare("dijit._Contained",null,{getParent:function(){var _187=dijit.getEnclosingWidget(this.domNode.parentNode);return _187&&_187.isContainer?_187:null;},_getSibling:function(_188){var node=this.domNode;do{node=node[_188+"Sibling"];}while(node&&node.nodeType!=1);return node&&dijit.byNode(node);},getPreviousSibling:function(){return this._getSibling("previous");},getNextSibling:function(){return this._getSibling("next");},getIndexInParent:function(){var p=this.getParent();if(!p||!p.getIndexOfChild){return -1;}return p.getIndexOfChild(this);}});}if(!dojo._hasResource["dijit.layout._LayoutWidget"]){dojo._hasResource["dijit.layout._LayoutWidget"]=true;dojo.provide("dijit.layout._LayoutWidget");dojo.declare("dijit.layout._LayoutWidget",[dijit._Widget,dijit._Container,dijit._Contained],{baseClass:"dijitLayoutContainer",isLayoutContainer:true,postCreate:function(){dojo.addClass(this.domNode,"dijitContainer");dojo.addClass(this.domNode,this.baseClass);this.inherited(arguments);},startup:function(){if(this._started){return;}this.inherited(arguments);var _189=this.getParent&&this.getParent();if(!(_189&&_189.isLayoutContainer)){this.resize();this.connect(dojo.isIE?this.domNode:dojo.global,"onresize",function(){this.resize();});}},resize:function(_18a,_18b){var node=this.domNode;if(_18a){dojo.marginBox(node,_18a);if(_18a.t){node.style.top=_18a.t+"px";}if(_18a.l){node.style.left=_18a.l+"px";}}var mb=_18b||{};dojo.mixin(mb,_18a||{});if(!("h" in mb)||!("w" in mb)){mb=dojo.mixin(dojo.marginBox(node),mb);}var cs=dojo.getComputedStyle(node);var me=dojo._getMarginExtents(node,cs);var be=dojo._getBorderExtents(node,cs);var bb=(this._borderBox={w:mb.w-(me.w+be.w),h:mb.h-(me.h+be.h)});var pe=dojo._getPadExtents(node,cs);this._contentBox={l:dojo._toPixelValue(node,cs.paddingLeft),t:dojo._toPixelValue(node,cs.paddingTop),w:bb.w-pe.w,h:bb.h-pe.h};this.layout();},layout:function(){},_setupChild:function(_18c){dojo.addClass(_18c.domNode,this.baseClass+"-child");if(_18c.baseClass){dojo.addClass(_18c.domNode,this.baseClass+"-"+_18c.baseClass);}},addChild:function(_18d,_18e){this.inherited(arguments);if(this._started){this._setupChild(_18d);}},removeChild:function(_18f){dojo.removeClass(_18f.domNode,this.baseClass+"-child");if(_18f.baseClass){dojo.removeClass(_18f.domNode,this.baseClass+"-"+_18f.baseClass);}this.inherited(arguments);}});dijit.layout.marginBox2contentBox=function(node,mb){var cs=dojo.getComputedStyle(node);var me=dojo._getMarginExtents(node,cs);var pb=dojo._getPadBorderExtents(node,cs);return {l:dojo._toPixelValue(node,cs.paddingLeft),t:dojo._toPixelValue(node,cs.paddingTop),w:mb.w-(me.w+pb.w),h:mb.h-(me.h+pb.h)};};(function(){var _190=function(word){return word.substring(0,1).toUpperCase()+word.substring(1);};var size=function(_191,dim){_191.resize?_191.resize(dim):dojo.marginBox(_191.domNode,dim);dojo.mixin(_191,dojo.marginBox(_191.domNode));dojo.mixin(_191,dim);};dijit.layout.layoutChildren=function(_192,dim,_193){dim=dojo.mixin({},dim);dojo.addClass(_192,"dijitLayoutContainer");_193=dojo.filter(_193,function(item){return item.layoutAlign!="client";}).concat(dojo.filter(_193,function(item){return item.layoutAlign=="client";}));dojo.forEach(_193,function(_194){var elm=_194.domNode,pos=_194.layoutAlign;var _195=elm.style;_195.left=dim.l+"px";_195.top=dim.t+"px";_195.bottom=_195.right="auto";dojo.addClass(elm,"dijitAlign"+_190(pos));if(pos=="top"||pos=="bottom"){size(_194,{w:dim.w});dim.h-=_194.h;if(pos=="top"){dim.t+=_194.h;}else{_195.top=dim.t+dim.h+"px";}}else{if(pos=="left"||pos=="right"){size(_194,{h:dim.h});dim.w-=_194.w;if(pos=="left"){dim.l+=_194.w;}else{_195.left=dim.l+dim.w+"px";}}else{if(pos=="client"){size(_194,dim);}}}});};})();}if(!dojo._hasResource["dijit.form._FormWidget"]){dojo._hasResource["dijit.form._FormWidget"]=true;dojo.provide("dijit.form._FormWidget");dojo.declare("dijit.form._FormWidget",[dijit._Widget,dijit._Templated],{baseClass:"",name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:false,intermediateChanges:false,scrollOnFocus:true,attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{value:"focusNode",id:"focusNode",tabIndex:"focusNode",alt:"focusNode",title:"focusNode"}),postMixInProperties:function(){this.nameAttrSetting=this.name?("name='"+this.name+"'"):"";this.inherited(arguments);},_setDisabledAttr:function(_196){this.disabled=_196;dojo.attr(this.focusNode,"disabled",_196);if(this.valueNode){dojo.attr(this.valueNode,"disabled",_196);}dijit.setWaiState(this.focusNode,"disabled",_196);if(_196){this._hovering=false;this._active=false;this.focusNode.setAttribute("tabIndex","-1");}else{this.focusNode.setAttribute("tabIndex",this.tabIndex);}this._setStateClass();},setDisabled:function(_197){dojo.deprecated("setDisabled("+_197+") is deprecated. Use attr('disabled',"+_197+") instead.","","2.0");this.attr("disabled",_197);},_onFocus:function(e){if(this.scrollOnFocus){dijit.scrollIntoView(this.domNode);}this.inherited(arguments);},_onMouse:function(_198){var _199=_198.currentTarget;if(_199&&_199.getAttribute){this.stateModifier=_199.getAttribute("stateModifier")||"";}if(!this.disabled){switch(_198.type){case "mouseenter":case "mouseover":this._hovering=true;this._active=this._mouseDown;break;case "mouseout":case "mouseleave":this._hovering=false;this._active=false;break;case "mousedown":this._active=true;this._mouseDown=true;var _19a=this.connect(dojo.body(),"onmouseup",function(){if(this._mouseDown&&this.isFocusable()){this.focus();}this._active=false;this._mouseDown=false;this._setStateClass();this.disconnect(_19a);});break;}this._setStateClass();}},isFocusable:function(){return !this.disabled&&!this.readOnly&&this.focusNode&&(dojo.style(this.domNode,"display")!="none");},focus:function(){dijit.focus(this.focusNode);},_setStateClass:function(){var _19b=this.baseClass.split(" ");function _19c(_19d){_19b=_19b.concat(dojo.map(_19b,function(c){return c+_19d;}),"dijit"+_19d);};if(this.checked){_19c("Checked");}if(this.state){_19c(this.state);}if(this.selected){_19c("Selected");}if(this.disabled){_19c("Disabled");}else{if(this.readOnly){_19c("ReadOnly");}else{if(this._active){_19c(this.stateModifier+"Active");}else{if(this._focused){_19c("Focused");}if(this._hovering){_19c(this.stateModifier+"Hover");}}}}var tn=this.stateNode||this.domNode,_19e={};dojo.forEach(tn.className.split(" "),function(c){_19e[c]=true;});if("_stateClasses" in this){dojo.forEach(this._stateClasses,function(c){delete _19e[c];});}dojo.forEach(_19b,function(c){_19e[c]=true;});var _19f=[];for(var c in _19e){_19f.push(c);}tn.className=_19f.join(" ");this._stateClasses=_19b;},compare:function(val1,val2){if(typeof val1=="number"&&typeof val2=="number"){return (isNaN(val1)&&isNaN(val2))?0:val1-val2;}else{if(val1>val2){return 1;}else{if(val1<val2){return -1;}else{return 0;}}}},onChange:function(_1a0){},_onChangeActive:false,_handleOnChange:function(_1a1,_1a2){this._lastValue=_1a1;if(this._lastValueReported==undefined&&(_1a2===null||!this._onChangeActive)){this._resetValue=this._lastValueReported=_1a1;}if((this.intermediateChanges||_1a2||_1a2===undefined)&&((typeof _1a1!=typeof this._lastValueReported)||this.compare(_1a1,this._lastValueReported)!=0)){this._lastValueReported=_1a1;if(this._onChangeActive){if(this._onChangeHandle){clearTimeout(this._onChangeHandle);}this._onChangeHandle=setTimeout(dojo.hitch(this,function(){this._onChangeHandle=null;this.onChange(_1a1);}),0);}}},create:function(){this.inherited(arguments);this._onChangeActive=true;this._setStateClass();},destroy:function(){if(this._onChangeHandle){clearTimeout(this._onChangeHandle);this.onChange(this._lastValueReported);}this.inherited(arguments);},setValue:function(_1a3){dojo.deprecated("dijit.form._FormWidget:setValue("+_1a3+") is deprecated. Use attr('value',"+_1a3+") instead.","","2.0");this.attr("value",_1a3);},getValue:function(){dojo.deprecated(this.declaredClass+"::getValue() is deprecated. Use attr('value') instead.","","2.0");return this.attr("value");}});dojo.declare("dijit.form._FormValueWidget",dijit.form._FormWidget,{readOnly:false,attributeMap:dojo.delegate(dijit.form._FormWidget.prototype.attributeMap,{value:"",readOnly:"focusNode"}),_setReadOnlyAttr:function(_1a4){this.readOnly=_1a4;dojo.attr(this.focusNode,"readOnly",_1a4);dijit.setWaiState(this.focusNode,"readonly",_1a4);this._setStateClass();},postCreate:function(){if(dojo.isIE){this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);}if(this._resetValue===undefined){this._resetValue=this.value;}},_setValueAttr:function(_1a5,_1a6){this.value=_1a5;this._handleOnChange(_1a5,_1a6);},_getValueAttr:function(){return this._lastValue;},undo:function(){this._setValueAttr(this._lastValueReported,false);},reset:function(){this._hasBeenBlurred=false;this._setValueAttr(this._resetValue,true);},_onKeyDown:function(e){if(e.keyCode==dojo.keys.ESCAPE&&!(e.ctrlKey||e.altKey||e.metaKey)){var te;if(dojo.isIE){e.preventDefault();te=document.createEventObject();te.keyCode=dojo.keys.ESCAPE;te.shiftKey=e.shiftKey;e.srcElement.fireEvent("onkeypress",te);}}},_layoutHackIE7:function(){if(dojo.isIE==7){var _1a7=this.domNode;var _1a8=_1a7.parentNode;var _1a9=_1a7.firstChild||_1a7;var _1aa=_1a9.style.filter;while(_1a8&&_1a8.clientHeight==0){_1a8._disconnectHandle=this.connect(_1a8,"onscroll",dojo.hitch(this,function(e){this.disconnect(_1a8._disconnectHandle);_1a8.removeAttribute("_disconnectHandle");_1a9.style.filter=(new Date()).getMilliseconds();setTimeout(function(){_1a9.style.filter=_1aa;},0);}));_1a8=_1a8.parentNode;}}}});}if(!dojo._hasResource["dijit.dijit"]){dojo._hasResource["dijit.dijit"]=true;dojo.provide("dijit.dijit");}
diff --git a/js/dojo/dijit/dijit.js.uncompressed.js b/js/dojo/dijit/dijit.js.uncompressed.js
--- a/js/dojo/dijit/dijit.js.uncompressed.js
+++ b/js/dojo/dijit/dijit.js.uncompressed.js
@@ -1,3292 +1,5596 @@
/*
- Copyright (c) 2004-2007, The Dojo Foundation
- All Rights Reserved.
-
- Licensed under the Academic Free License version 2.1 or above OR the
- modified BSD license. For more information on Dojo licensing, see:
-
- http://dojotoolkit.org/book/dojo-book-0-9/introduction/licensing
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
*/
/*
This is a compiled version of Dojo, built for deployment and not for
development. To get an editable version, please visit:
http://dojotoolkit.org
for documentation and information on getting the source.
*/
+if(!dojo._hasResource["dijit._base.manager"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit._base.manager"] = true;
+dojo.provide("dijit._base.manager");
+
+dojo.declare("dijit.WidgetSet", null, {
+ // summary:
+ // A set of widgets indexed by id. A default instance of this class is
+ // available as `dijit.registry`
+ //
+ // example:
+ // Create a small list of widgets:
+ // | var ws = new dijit.WidgetSet();
+ // | ws.add(dijit.byId("one"));
+ // | ws.add(dijit.byId("two"));
+ // | // destroy both:
+ // | ws.forEach(function(w){ w.destroy(); });
+ //
+ // example:
+ // Using dijit.registry:
+ // | dijit.registry.forEach(function(w){ /* do something */ });
+
+ constructor: function(){
+ this._hash = {};
+ this.length = 0;
+ },
+
+ add: function(/*dijit._Widget*/ widget){
+ // summary:
+ // Add a widget to this list. If a duplicate ID is detected, a error is thrown.
+ //
+ // widget: dijit._Widget
+ // Any dijit._Widget subclass.
+ if(this._hash[widget.id]){
+ throw new Error("Tried to register widget with id==" + widget.id + " but that id is already registered");
+ }
+ this._hash[widget.id] = widget;
+ this.length++;
+ },
+
+ remove: function(/*String*/ id){
+ // summary:
+ // Remove a widget from this WidgetSet. Does not destroy the widget; simply
+ // removes the reference.
+ if(this._hash[id]){
+ delete this._hash[id];
+ this.length--;
+ }
+ },
+
+ forEach: function(/*Function*/ func, /* Object? */thisObj){
+ // summary:
+ // Call specified function for each widget in this set.
+ //
+ // func:
+ // A callback function to run for each item. Is passed the widget, the index
+ // in the iteration, and the full hash, similar to `dojo.forEach`.
+ //
+ // thisObj:
+ // An optional scope parameter
+ //
+ // example:
+ // Using the default `dijit.registry` instance:
+ // | dijit.registry.forEach(function(widget){
+ // | console.log(widget.declaredClass);
+ // | });
+ //
+ // returns:
+ // Returns self, in order to allow for further chaining.
+
+ thisObj = thisObj || dojo.global;
+ var i = 0, id;
+ for(id in this._hash){
+ func.call(thisObj, this._hash[id], i++, this._hash);
+ }
+ return this; // dijit.WidgetSet
+ },
+
+ filter: function(/*Function*/ filter, /* Object? */thisObj){
+ // summary:
+ // Filter down this WidgetSet to a smaller new WidgetSet
+ // Works the same as `dojo.filter` and `dojo.NodeList.filter`
+ //
+ // filter:
+ // Callback function to test truthiness. Is passed the widget
+ // reference and the pseudo-index in the object.
+ //
+ // thisObj: Object?
+ // Option scope to use for the filter function.
+ //
+ // example:
+ // Arbitrary: select the odd widgets in this list
+ // | dijit.registry.filter(function(w, i){
+ // | return i % 2 == 0;
+ // | }).forEach(function(w){ /* odd ones */ });
+
+ thisObj = thisObj || dojo.global;
+ var res = new dijit.WidgetSet(), i = 0, id;
+ for(id in this._hash){
+ var w = this._hash[id];
+ if(filter.call(thisObj, w, i++, this._hash)){
+ res.add(w);
+ }
+ }
+ return res; // dijit.WidgetSet
+ },
+
+ byId: function(/*String*/ id){
+ // summary:
+ // Find a widget in this list by it's id.
+ // example:
+ // Test if an id is in a particular WidgetSet
+ // | var ws = new dijit.WidgetSet();
+ // | ws.add(dijit.byId("bar"));
+ // | var t = ws.byId("bar") // returns a widget
+ // | var x = ws.byId("foo"); // returns undefined
+
+ return this._hash[id]; // dijit._Widget
+ },
+
+ byClass: function(/*String*/ cls){
+ // summary:
+ // Reduce this widgetset to a new WidgetSet of a particular `declaredClass`
+ //
+ // cls: String
+ // The Class to scan for. Full dot-notated string.
+ //
+ // example:
+ // Find all `dijit.TitlePane`s in a page:
+ // | dijit.registry.byClass("dijit.TitlePane").forEach(function(tp){ tp.close(); });
+
+ var res = new dijit.WidgetSet(), id, widget;
+ for(id in this._hash){
+ widget = this._hash[id];
+ if(widget.declaredClass == cls){
+ res.add(widget);
+ }
+ }
+ return res; // dijit.WidgetSet
+},
+
+ toArray: function(){
+ // summary:
+ // Convert this WidgetSet into a true Array
+ //
+ // example:
+ // Work with the widget .domNodes in a real Array
+ // | dojo.map(dijit.registry.toArray(), function(w){ return w.domNode; });
+
+ var ar = [];
+ for(var id in this._hash){
+ ar.push(this._hash[id]);
+ }
+ return ar; // dijit._Widget[]
+},
+
+ map: function(/* Function */func, /* Object? */thisObj){
+ // summary:
+ // Create a new Array from this WidgetSet, following the same rules as `dojo.map`
+ // example:
+ // | var nodes = dijit.registry.map(function(w){ return w.domNode; });
+ //
+ // returns:
+ // A new array of the returned values.
+ return dojo.map(this.toArray(), func, thisObj); // Array
+ },
+
+ every: function(func, thisObj){
+ // summary:
+ // A synthetic clone of `dojo.every` acting explictly on this WidgetSet
+ //
+ // func: Function
+ // A callback function run for every widget in this list. Exits loop
+ // when the first false return is encountered.
+ //
+ // thisObj: Object?
+ // Optional scope parameter to use for the callback
+
+ thisObj = thisObj || dojo.global;
+ var x = 0, i;
+ for(i in this._hash){
+ if(!func.call(thisObj, this._hash[i], x++, this._hash)){
+ return false; // Boolean
+ }
+ }
+ return true; // Boolean
+ },
+
+ some: function(func, thisObj){
+ // summary:
+ // A synthetic clone of `dojo.some` acting explictly on this WidgetSet
+ //
+ // func: Function
+ // A callback function run for every widget in this list. Exits loop
+ // when the first true return is encountered.
+ //
+ // thisObj: Object?
+ // Optional scope parameter to use for the callback
+
+ thisObj = thisObj || dojo.global;
+ var x = 0, i;
+ for(i in this._hash){
+ if(func.call(thisObj, this._hash[i], x++, this._hash)){
+ return true; // Boolean
+ }
+ }
+ return false; // Boolean
+ }
+
+});
+
+/*=====
+dijit.registry = {
+ // summary:
+ // A list of widgets on a page.
+ // description:
+ // Is an instance of `dijit.WidgetSet`
+};
+=====*/
+dijit.registry= new dijit.WidgetSet();
+
+dijit._widgetTypeCtr = {};
+
+dijit.getUniqueId = function(/*String*/widgetType){
+ // summary:
+ // Generates a unique id for a given widgetType
+
+ var id;
+ do{
+ id = widgetType + "_" +
+ (widgetType in dijit._widgetTypeCtr ?
+ ++dijit._widgetTypeCtr[widgetType] : dijit._widgetTypeCtr[widgetType] = 0);
+ }while(dijit.byId(id));
+ return dijit._scopeName == "dijit" ? id : dijit._scopeName + "_" + id; // String
+};
+
+dijit.findWidgets = function(/*DomNode*/ root){
+ // summary:
+ // Search subtree under root returning widgets found.
+ // Doesn't search for nested widgets (ie, widgets inside other widgets).
+
+ var outAry = [];
+
+ function getChildrenHelper(root){
+ for(var node = root.firstChild; node; node = node.nextSibling){
+ if(node.nodeType == 1){
+ var widgetId = node.getAttribute("widgetId");
+ if(widgetId){
+ var widget = dijit.byId(widgetId);
+ outAry.push(widget);
+ }else{
+ getChildrenHelper(node);
+ }
+ }
+ }
+ }
+
+ getChildrenHelper(root);
+ return outAry;
+};
+
+dijit._destroyAll = function(){
+ // summary:
+ // Code to destroy all widgets and do other cleanup on page unload
+
+ // Clean up focus manager lingering references to widgets and nodes
+ dijit._curFocus = null;
+ dijit._prevFocus = null;
+ dijit._activeStack = [];
+
+ // Destroy all the widgets, top down
+ dojo.forEach(dijit.findWidgets(dojo.body()), function(widget){
+ // Avoid double destroy of widgets like Menu that are attached to <body>
+ // even though they are logically children of other widgets.
+ if(!widget._destroyed){
+ if(widget.destroyRecursive){
+ widget.destroyRecursive();
+ }else if(widget.destroy){
+ widget.destroy();
+ }
+ }
+ });
+};
+
+if(dojo.isIE){
+ // Only run _destroyAll() for IE because we think it's only necessary in that case,
+ // and because it causes problems on FF. See bug #3531 for details.
+ dojo.addOnWindowUnload(function(){
+ dijit._destroyAll();
+ });
+}
+
+dijit.byId = function(/*String|Widget*/id){
+ // summary:
+ // Returns a widget by it's id, or if passed a widget, no-op (like dojo.byId())
+ return typeof id == "string" ? dijit.registry._hash[id] : id; // dijit._Widget
+};
+
+dijit.byNode = function(/* DOMNode */ node){
+ // summary:
+ // Returns the widget corresponding to the given DOMNode
+ return dijit.registry.byId(node.getAttribute("widgetId")); // dijit._Widget
+};
+
+dijit.getEnclosingWidget = function(/* DOMNode */ node){
+ // summary:
+ // Returns the widget whose DOM tree contains the specified DOMNode, or null if
+ // the node is not contained within the DOM tree of any widget
+ while(node){
+ var id = node.getAttribute && node.getAttribute("widgetId");
+ if(id){
+ return dijit.byId(id);
+ }
+ node = node.parentNode;
+ }
+ return null;
+};
+
+dijit._isElementShown = function(/*Element*/elem){
+ var style = dojo.style(elem);
+ return (style.visibility != "hidden")
+ && (style.visibility != "collapsed")
+ && (style.display != "none")
+ && (dojo.attr(elem, "type") != "hidden");
+}
+
+dijit.isTabNavigable = function(/*Element*/elem){
+ // summary:
+ // Tests if an element is tab-navigable
+
+ // TODO: convert (and rename method) to return effectivite tabIndex; will save time in _getTabNavigable()
+ if(dojo.attr(elem, "disabled")){
+ return false;
+ }else if(dojo.hasAttr(elem, "tabIndex")){
+ // Explicit tab index setting
+ return dojo.attr(elem, "tabIndex") >= 0; // boolean
+ }else{
+ // No explicit tabIndex setting, need to investigate node type
+ switch(elem.nodeName.toLowerCase()){
+ case "a":
+ // An <a> w/out a tabindex is only navigable if it has an href
+ return dojo.hasAttr(elem, "href");
+ case "area":
+ case "button":
+ case "input":
+ case "object":
+ case "select":
+ case "textarea":
+ // These are navigable by default
+ return true;
+ case "iframe":
+ // If it's an editor <iframe> then it's tab navigable.
+ if(dojo.isMoz){
+ return elem.contentDocument.designMode == "on";
+ }else if(dojo.isWebKit){
+ var doc = elem.contentDocument,
+ body = doc && doc.body;
+ return body && body.contentEditable == 'true';
+ }else{
+ // contentWindow.document isn't accessible within IE7/8
+ // if the iframe.src points to a foreign url and this
+ // page contains an element, that could get focus
+ try{
+ doc = elem.contentWindow.document;
+ body = doc && doc.body;
+ return body && body.firstChild && body.firstChild.contentEditable == 'true';
+ }catch(e){
+ return false;
+ }
+ }
+ default:
+ return elem.contentEditable == 'true';
+ }
+ }
+};
+
+dijit._getTabNavigable = function(/*DOMNode*/root){
+ // summary:
+ // Finds descendants of the specified root node.
+ //
+ // description:
+ // Finds the following descendants of the specified root node:
+ // * the first tab-navigable element in document order
+ // without a tabIndex or with tabIndex="0"
+ // * the last tab-navigable element in document order
+ // without a tabIndex or with tabIndex="0"
+ // * the first element in document order with the lowest
+ // positive tabIndex value
+ // * the last element in document order with the highest
+ // positive tabIndex value
+ var first, last, lowest, lowestTabindex, highest, highestTabindex;
+ var walkTree = function(/*DOMNode*/parent){
+ dojo.query("> *", parent).forEach(function(child){
+ var isShown = dijit._isElementShown(child);
+ if(isShown && dijit.isTabNavigable(child)){
+ var tabindex = dojo.attr(child, "tabIndex");
+ if(!dojo.hasAttr(child, "tabIndex") || tabindex == 0){
+ if(!first){ first = child; }
+ last = child;
+ }else if(tabindex > 0){
+ if(!lowest || tabindex < lowestTabindex){
+ lowestTabindex = tabindex;
+ lowest = child;
+ }
+ if(!highest || tabindex >= highestTabindex){
+ highestTabindex = tabindex;
+ highest = child;
+ }
+ }
+ }
+ if(isShown && child.nodeName.toUpperCase() != 'SELECT'){ walkTree(child) }
+ });
+ };
+ if(dijit._isElementShown(root)){ walkTree(root) }
+ return { first: first, last: last, lowest: lowest, highest: highest };
+}
+dijit.getFirstInTabbingOrder = function(/*String|DOMNode*/root){
+ // summary:
+ // Finds the descendant of the specified root node
+ // that is first in the tabbing order
+ var elems = dijit._getTabNavigable(dojo.byId(root));
+ return elems.lowest ? elems.lowest : elems.first; // DomNode
+};
+
+dijit.getLastInTabbingOrder = function(/*String|DOMNode*/root){
+ // summary:
+ // Finds the descendant of the specified root node
+ // that is last in the tabbing order
+ var elems = dijit._getTabNavigable(dojo.byId(root));
+ return elems.last ? elems.last : elems.highest; // DomNode
+};
+
+/*=====
+dojo.mixin(dijit, {
+ // defaultDuration: Integer
+ // The default animation speed (in ms) to use for all Dijit
+ // transitional animations, unless otherwise specified
+ // on a per-instance basis. Defaults to 200, overrided by
+ // `djConfig.defaultDuration`
+ defaultDuration: 300
+});
+=====*/
+
+dijit.defaultDuration = dojo.config["defaultDuration"] || 200;
+
+}
+
if(!dojo._hasResource["dijit._base.focus"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit._base.focus"] = true;
dojo.provide("dijit._base.focus");
+ // for dijit.isTabNavigable()
+
// summary:
// These functions are used to query or set the focus and selection.
//
-// Also, they trace when widgets become actived/deactivated,
+// Also, they trace when widgets become activated/deactivated,
// so that the widget can fire _onFocus/_onBlur events.
// "Active" here means something similar to "focused", but
// "focus" isn't quite the right word because we keep track of
-// a whole stack of "active" widgets. Example: Combobutton --> Menu -->
-// MenuItem. The onBlur event for Combobutton doesn't fire due to focusing
+// a whole stack of "active" widgets. Example: ComboButton --> Menu -->
+// MenuItem. The onBlur event for ComboButton doesn't fire due to focusing
// on the Menu or a MenuItem, since they are considered part of the
-// Combobutton widget. It only happens when focus is shifted
+// ComboButton widget. It only happens when focus is shifted
// somewhere completely different.
-dojo.mixin(dijit,
-{
+dojo.mixin(dijit, {
// _curFocus: DomNode
// Currently focused item on screen
_curFocus: null,
// _prevFocus: DomNode
// Previously focused item on screen
_prevFocus: null,
isCollapsed: function(){
- // summary: tests whether the current selection is empty
- var _window = dojo.global;
- var _document = dojo.doc;
- if(_document.selection){ // IE
- return !_document.selection.createRange().text; // Boolean
- }else if(_window.getSelection){
- var selection = _window.getSelection();
- if(dojo.isString(selection)){ // Safari
- return !selection; // Boolean
- }else{ // Mozilla/W3
- return selection.isCollapsed || !selection.toString(); // Boolean
- }
- }
+ // summary:
+ // Returns true if there is no text selected
+ return dijit.getBookmark().isCollapsed;
},
getBookmark: function(){
- // summary: Retrieves a bookmark that can be used with moveToBookmark to return to the same range
- var bookmark, selection = dojo.doc.selection;
- if(selection){ // IE
- var range = selection.createRange();
- if(selection.type.toUpperCase()=='CONTROL'){
- bookmark = range.length ? dojo._toArray(range) : null;
+ // summary:
+ // Retrieves a bookmark that can be used with moveToBookmark to return to the same range
+ var bm, rg, tg, sel = dojo.doc.selection, cf = dijit._curFocus;
+
+ if(dojo.global.getSelection){
+ //W3C Range API for selections.
+ sel = dojo.global.getSelection();
+ if(sel){
+ if(sel.isCollapsed){
+ tg = cf? cf.tagName : "";
+ if(tg){
+ //Create a fake rangelike item to restore selections.
+ tg = tg.toLowerCase();
+ if(tg == "textarea" ||
+ (tg == "input" && (!cf.type || cf.type.toLowerCase() == "text"))){
+ sel = {
+ start: cf.selectionStart,
+ end: cf.selectionEnd,
+ node: cf,
+ pRange: true
+ };
+ return {isCollapsed: (sel.end <= sel.start), mark: sel}; //Object.
+ }
+ }
+ bm = {isCollapsed:true};
+ }else{
+ rg = sel.getRangeAt(0);
+ bm = {isCollapsed: false, mark: rg.cloneRange()};
+ }
+ }
+ }else if(sel){
+ // If the current focus was a input of some sort and no selection, don't bother saving
+ // a native bookmark. This is because it causes issues with dialog/page selection restore.
+ // So, we need to create psuedo bookmarks to work with.
+ tg = cf ? cf.tagName : "";
+ tg = tg.toLowerCase();
+ if(cf && tg && (tg == "button" || tg == "textarea" || tg == "input")){
+ if(sel.type && sel.type.toLowerCase() == "none"){
+ return {
+ isCollapsed: true,
+ mark: null
+ }
+ }else{
+ rg = sel.createRange();
+ return {
+ isCollapsed: rg.text && rg.text.length?false:true,
+ mark: {
+ range: rg,
+ pRange: true
+ }
+ };
+ }
+ }
+ bm = {};
+
+ //'IE' way for selections.
+ try{
+ // createRange() throws exception when dojo in iframe
+ //and nothing selected, see #9632
+ rg = sel.createRange();
+ bm.isCollapsed = !(sel.type == 'Text' ? rg.htmlText.length : rg.length);
+ }catch(e){
+ bm.isCollapsed = true;
+ return bm;
+ }
+ if(sel.type.toUpperCase() == 'CONTROL'){
+ if(rg.length){
+ bm.mark=[];
+ var i=0,len=rg.length;
+ while(i<len){
+ bm.mark.push(rg.item(i++));
+ }
+ }else{
+ bm.isCollapsed = true;
+ bm.mark = null;
+ }
}else{
- bookmark = range.getBookmark();
+ bm.mark = rg.getBookmark();
}
}else{
- if(dojo.global.getSelection){
- selection = dojo.global.getSelection();
- if(selection){
- var range = selection.getRangeAt(0);
- bookmark = range.cloneRange();
- }
- }else{
- console.debug("No idea how to store the current selection for this browser!");
- }
+ console.warn("No idea how to store the current selection for this browser!");
}
- return bookmark; // Array
+ return bm; // Object
},
moveToBookmark: function(/*Object*/bookmark){
- // summary: Moves current selection to a bookmark
- // bookmark: this should be a returned object from dojo.html.selection.getBookmark()
- var _document = dojo.doc;
- if(_document.selection){ // IE
- var range;
- if(dojo.isArray(bookmark)){
- range = _document.body.createControlRange();
- dojo.forEach(bookmark, range.addElement);
- }else{
- range = _document.selection.createRange();
- range.moveToBookmark(bookmark);
- }
- range.select();
- }else{ //Moz/W3C
- var selection = dojo.global.getSelection && dojo.global.getSelection();
- if(selection && selection.removeAllRanges){
- selection.removeAllRanges();
- selection.addRange(bookmark);
- }else{
- console.debug("No idea how to restore selection for this browser!");
+ // summary:
+ // Moves current selection to a bookmark
+ // bookmark:
+ // This should be a returned object from dijit.getBookmark()
+
+ var _doc = dojo.doc,
+ mark = bookmark.mark;
+ if(mark){
+ if(dojo.global.getSelection){
+ //W3C Rangi API (FF, WebKit, Opera, etc)
+ var sel = dojo.global.getSelection();
+ if(sel && sel.removeAllRanges){
+ if(mark.pRange){
+ var r = mark;
+ var n = r.node;
+ n.selectionStart = r.start;
+ n.selectionEnd = r.end;
+ }else{
+ sel.removeAllRanges();
+ sel.addRange(mark);
+ }
+ }else{
+ console.warn("No idea how to restore selection for this browser!");
+ }
+ }else if(_doc.selection && mark){
+ //'IE' way.
+ var rg;
+ if(mark.pRange){
+ rg = mark.range;
+ }else if(dojo.isArray(mark)){
+ rg = _doc.body.createControlRange();
+ //rg.addElement does not have call/apply method, so can not call it directly
+ //rg is not available in "range.addElement(item)", so can't use that either
+ dojo.forEach(mark, function(n){
+ rg.addElement(n);
+ });
+ }else{
+ rg = _doc.body.createTextRange();
+ rg.moveToBookmark(mark);
+ }
+ rg.select();
}
}
},
- getFocus: function(/*Widget*/menu, /*Window*/ openedForWindow){
+ getFocus: function(/*Widget?*/ menu, /*Window?*/ openedForWindow){
// summary:
- // Returns the current focus and selection.
- // Called when a popup appears (either a top level menu or a dialog),
- // or when a toolbar/menubar receives focus
+ // Called as getFocus(), this returns an Object showing the current focus
+ // and selected text.
//
- // menu:
- // the menu that's being opened
+ // Called as getFocus(widget), where widget is a (widget representing) a button
+ // that was just pressed, it returns where focus was before that button
+ // was pressed. (Pressing the button may have either shifted focus to the button,
+ // or removed focus altogether.) In this case the selected text is not returned,
+ // since it can't be accurately determined.
+ //
+ // menu: dijit._Widget or {domNode: DomNode} structure
+ // The button that was just pressed. If focus has disappeared or moved
+ // to this button, returns the previous focus. In this case the bookmark
+ // information is already lost, and null is returned.
//
// openedForWindow:
- // iframe in which menu was opened
+ // iframe in which menu was opened
//
// returns:
- // a handle to restore focus/selection
-
+ // A handle to restore focus/selection, to be passed to `dijit.focus`
+ var node = !dijit._curFocus || (menu && dojo.isDescendant(dijit._curFocus, menu.domNode)) ? dijit._prevFocus : dijit._curFocus;
return {
- // Node to return focus to
- node: menu && dojo.isDescendant(dijit._curFocus, menu.domNode) ? dijit._prevFocus : dijit._curFocus,
-
- // Previously selected text
- bookmark:
- !dojo.withGlobal(openedForWindow||dojo.global, dijit.isCollapsed) ?
- dojo.withGlobal(openedForWindow||dojo.global, dijit.getBookmark) :
- null,
-
+ node: node,
+ bookmark: (node == dijit._curFocus) && dojo.withGlobal(openedForWindow || dojo.global, dijit.getBookmark),
openedForWindow: openedForWindow
}; // Object
},
focus: function(/*Object || DomNode */ handle){
// summary:
// Sets the focused node and the selection according to argument.
// To set focus to an iframe's content, pass in the iframe itself.
// handle:
// object returned by get(), or a DomNode
if(!handle){ return; }
var node = "node" in handle ? handle.node : handle, // because handle is either DomNode or a composite object
bookmark = handle.bookmark,
- openedForWindow = handle.openedForWindow;
+ openedForWindow = handle.openedForWindow,
+ collapsed = bookmark ? bookmark.isCollapsed : false;
// Set the focus
// Note that for iframe's we need to use the <iframe> to follow the parentNode chain,
// but we need to set focus to iframe.contentWindow
if(node){
- var focusNode = (node.tagName.toLowerCase()=="iframe") ? node.contentWindow : node;
+ var focusNode = (node.tagName.toLowerCase() == "iframe") ? node.contentWindow : node;
if(focusNode && focusNode.focus){
try{
// Gecko throws sometimes if setting focus is impossible,
// node not displayed or something like that
focusNode.focus();
}catch(e){/*quiet*/}
- }
+ }
dijit._onFocusNode(node);
}
// set the selection
// do not need to restore if current selection is not empty
- // (use keyboard to select a menu item)
- if(bookmark && dojo.withGlobal(openedForWindow||dojo.global, dijit.isCollapsed)){
+ // (use keyboard to select a menu item) or if previous selection was collapsed
+ // as it may cause focus shift (Esp in IE).
+ if(bookmark && dojo.withGlobal(openedForWindow || dojo.global, dijit.isCollapsed) && !collapsed){
if(openedForWindow){
openedForWindow.focus();
}
try{
- dojo.withGlobal(openedForWindow||dojo.global, moveToBookmark, null, [bookmark]);
- }catch(e){
+ dojo.withGlobal(openedForWindow || dojo.global, dijit.moveToBookmark, null, [bookmark]);
+ }catch(e2){
/*squelch IE internal error, see http://trac.dojotoolkit.org/ticket/1984 */
}
}
},
- // List of currently active widgets (focused widget and it's ancestors)
+ // _activeStack: dijit._Widget[]
+ // List of currently active widgets (focused widget and it's ancestors)
_activeStack: [],
- registerWin: function(/*Window?*/targetWindow){
+ registerIframe: function(/*DomNode*/ iframe){
+ // summary:
+ // Registers listeners on the specified iframe so that any click
+ // or focus event on that iframe (or anything in it) is reported
+ // as a focus/click event on the <iframe> itself.
+ // description:
+ // Currently only used by editor.
+ // returns:
+ // Handle to pass to unregisterIframe()
+ return dijit.registerWin(iframe.contentWindow, iframe);
+ },
+
+ unregisterIframe: function(/*Object*/ handle){
+ // summary:
+ // Unregisters listeners on the specified iframe created by registerIframe.
+ // After calling be sure to delete or null out the handle itself.
+ // handle:
+ // Handle returned by registerIframe()
+
+ dijit.unregisterWin(handle);
+ },
+
+ registerWin: function(/*Window?*/targetWindow, /*DomNode?*/ effectiveNode){
// summary:
// Registers listeners on the specified window (either the main
- // window or an iframe) to detect when the user has clicked somewhere.
- // Anyone that creates an iframe should call this function.
-
- if(!targetWindow){
- targetWindow = window;
- }
-
- dojo.connect(targetWindow.document, "onmousedown", null, function(evt){
+ // window or an iframe's window) to detect when the user has clicked somewhere
+ // or focused somewhere.
+ // description:
+ // Users should call registerIframe() instead of this method.
+ // targetWindow:
+ // If specified this is the window associated with the iframe,
+ // i.e. iframe.contentWindow.
+ // effectiveNode:
+ // If specified, report any focus events inside targetWindow as
+ // an event on effectiveNode, rather than on evt.target.
+ // returns:
+ // Handle to pass to unregisterWin()
+
+ // TODO: make this function private in 2.0; Editor/users should call registerIframe(),
+
+ var mousedownListener = function(evt){
dijit._justMouseDowned = true;
setTimeout(function(){ dijit._justMouseDowned = false; }, 0);
- dijit._onTouchNode(evt.target||evt.srcElement);
- });
+ dijit._onTouchNode(effectiveNode || evt.target || evt.srcElement, "mouse");
+ };
//dojo.connect(targetWindow, "onscroll", ???);
- // Listen for blur and focus events on targetWindow's body
- var body = targetWindow.document.body || targetWindow.document.getElementsByTagName("body")[0];
- if(body){
+ // Listen for blur and focus events on targetWindow's document.
+ // IIRC, I'm using attachEvent() rather than dojo.connect() because focus/blur events don't bubble
+ // through dojo.connect(), and also maybe to catch the focus events early, before onfocus handlers
+ // fire.
+ // Connect to <html> (rather than document) on IE to avoid memory leaks, but document on other browsers because
+ // (at least for FF) the focus event doesn't fire on <html> or <body>.
+ var doc = dojo.isIE ? targetWindow.document.documentElement : targetWindow.document;
+ if(doc){
if(dojo.isIE){
- body.attachEvent('onactivate', function(evt){
- if(evt.srcElement.tagName.toLowerCase() != "body"){
- dijit._onFocusNode(evt.srcElement);
+ doc.attachEvent('onmousedown', mousedownListener);
+ var activateListener = function(evt){
+ // IE reports that nodes like <body> have gotten focus, even though they have tabIndex=-1,
+ // Should consider those more like a mouse-click than a focus....
+ if(evt.srcElement.tagName.toLowerCase() != "#document" &&
+ dijit.isTabNavigable(evt.srcElement)){
+ dijit._onFocusNode(effectiveNode || evt.srcElement);
+ }else{
+ dijit._onTouchNode(effectiveNode || evt.srcElement);
}
- });
- body.attachEvent('ondeactivate', function(evt){ dijit._onBlurNode(evt.srcElement); });
+ };
+ doc.attachEvent('onactivate', activateListener);
+ var deactivateListener = function(evt){
+ dijit._onBlurNode(effectiveNode || evt.srcElement);
+ };
+ doc.attachEvent('ondeactivate', deactivateListener);
+
+ return function(){
+ doc.detachEvent('onmousedown', mousedownListener);
+ doc.detachEvent('onactivate', activateListener);
+ doc.detachEvent('ondeactivate', deactivateListener);
+ doc = null; // prevent memory leak (apparent circular reference via closure)
+ };
}else{
- body.addEventListener('focus', function(evt){ dijit._onFocusNode(evt.target); }, true);
- body.addEventListener('blur', function(evt){ dijit._onBlurNode(evt.target); }, true);
+ doc.addEventListener('mousedown', mousedownListener, true);
+ var focusListener = function(evt){
+ dijit._onFocusNode(effectiveNode || evt.target);
+ };
+ doc.addEventListener('focus', focusListener, true);
+ var blurListener = function(evt){
+ dijit._onBlurNode(effectiveNode || evt.target);
+ };
+ doc.addEventListener('blur', blurListener, true);
+
+ return function(){
+ doc.removeEventListener('mousedown', mousedownListener, true);
+ doc.removeEventListener('focus', focusListener, true);
+ doc.removeEventListener('blur', blurListener, true);
+ doc = null; // prevent memory leak (apparent circular reference via closure)
+ };
}
}
- body = null; // prevent memory leak (apparent circular reference via closure)
+ },
+
+ unregisterWin: function(/*Handle*/ handle){
+ // summary:
+ // Unregisters listeners on the specified window (either the main
+ // window or an iframe's window) according to handle returned from registerWin().
+ // After calling be sure to delete or null out the handle itself.
+
+ // Currently our handle is actually a function
+ handle && handle();
},
_onBlurNode: function(/*DomNode*/ node){
// summary:
// Called when focus leaves a node.
// Usually ignored, _unless_ it *isn't* follwed by touching another node,
// which indicates that we tabbed off the last field on the page,
// in which case every widget is marked inactive
dijit._prevFocus = dijit._curFocus;
dijit._curFocus = null;
- var w = dijit.getEnclosingWidget(node);
- if (w && w._setStateClass){
- w._focused = false;
- w._setStateClass();
- }
if(dijit._justMouseDowned){
// the mouse down caused a new widget to be marked as active; this blur event
// is coming late, so ignore it.
return;
}
// if the blur event isn't followed by a focus event then mark all widgets as inactive.
if(dijit._clearActiveWidgetsTimer){
clearTimeout(dijit._clearActiveWidgetsTimer);
}
dijit._clearActiveWidgetsTimer = setTimeout(function(){
- delete dijit._clearActiveWidgetsTimer; dijit._setStack([]); }, 100);
+ delete dijit._clearActiveWidgetsTimer;
+ dijit._setStack([]);
+ dijit._prevFocus = null;
+ }, 100);
},
- _onTouchNode: function(/*DomNode*/ node){
- // summary
+ _onTouchNode: function(/*DomNode*/ node, /*String*/ by){
+ // summary:
// Callback when node is focused or mouse-downed
+ // node:
+ // The node that was touched.
+ // by:
+ // "mouse" if the focus/touch was caused by a mouse down event
// ignore the recent blurNode event
if(dijit._clearActiveWidgetsTimer){
clearTimeout(dijit._clearActiveWidgetsTimer);
delete dijit._clearActiveWidgetsTimer;
}
// compute stack of active widgets (ex: ComboButton --> Menu --> MenuItem)
var newStack=[];
try{
while(node){
- if(node.dijitPopupParent){
- node=dijit.byId(node.dijitPopupParent).domNode;
- }else if(node.tagName && node.tagName.toLowerCase()=="body"){
+ var popupParent = dojo.attr(node, "dijitPopupParent");
+ if(popupParent){
+ node=dijit.byId(popupParent).domNode;
+ }else if(node.tagName && node.tagName.toLowerCase() == "body"){
// is this the root of the document or just the root of an iframe?
- if(node===dojo.body()){
+ if(node === dojo.body()){
// node is the root of the main document
break;
}
// otherwise, find the iframe this node refers to (can't access it via parentNode,
- // need to do this trick instead) and continue tracing up the document
- node=dojo.query("iframe").filter(function(iframe){ return iframe.contentDocument.body===node; })[0];
+ // need to do this trick instead). window.frameElement is supported in IE/FF/Webkit
+ node=dijit.getDocumentWindow(node.ownerDocument).frameElement;
}else{
var id = node.getAttribute && node.getAttribute("widgetId");
if(id){
newStack.unshift(id);
}
node=node.parentNode;
}
}
}catch(e){ /* squelch */ }
- dijit._setStack(newStack);
+ dijit._setStack(newStack, by);
},
_onFocusNode: function(/*DomNode*/ node){
- // summary
+ // summary:
// Callback when node is focused
- if(node && node.tagName && node.tagName.toLowerCase() == "body"){
+
+ if(!node){
return;
}
+
+ if(node.nodeType == 9){
+ // Ignore focus events on the document itself. This is here so that
+ // (for example) clicking the up/down arrows of a spinner
+ // (which don't get focus) won't cause that widget to blur. (FF issue)
+ return;
+ }
+
dijit._onTouchNode(node);
- if(node==dijit._curFocus){ return; }
- dijit._prevFocus = dijit._curFocus;
+
+ if(node == dijit._curFocus){ return; }
+ if(dijit._curFocus){
+ dijit._prevFocus = dijit._curFocus;
+ }
dijit._curFocus = node;
dojo.publish("focusNode", [node]);
-
- // handle focus/blur styling
- var w = dijit.getEnclosingWidget(node);
- if (w && w._setStateClass){
- w._focused = true;
- w._setStateClass();
- }
},
- _setStack: function(newStack){
- // summary
- // The stack of active widgets has changed. Send out appropriate events and record new stack
-
- var oldStack = dijit._activeStack;
+ _setStack: function(/*String[]*/ newStack, /*String*/ by){
+ // summary:
+ // The stack of active widgets has changed. Send out appropriate events and records new stack.
+ // newStack:
+ // array of widget id's, starting from the top (outermost) widget
+ // by:
+ // "mouse" if the focus/touch was caused by a mouse down event
+
+ var oldStack = dijit._activeStack;
dijit._activeStack = newStack;
// compare old stack to new stack to see how many elements they have in common
for(var nCommon=0; nCommon<Math.min(oldStack.length, newStack.length); nCommon++){
if(oldStack[nCommon] != newStack[nCommon]){
break;
}
}
+ var widget;
// for all elements that have gone out of focus, send blur event
for(var i=oldStack.length-1; i>=nCommon; i--){
- var widget = dijit.byId(oldStack[i]);
+ widget = dijit.byId(oldStack[i]);
if(widget){
- dojo.publish("widgetBlur", [widget]);
+ widget._focused = false;
+ widget._hasBeenBlurred = true;
if(widget._onBlur){
- widget._onBlur();
+ widget._onBlur(by);
}
+ if(widget._setStateClass){
+ widget._setStateClass();
+ }
+ dojo.publish("widgetBlur", [widget, by]);
}
}
// for all element that have come into focus, send focus event
- for(var i=nCommon; i<newStack.length; i++){
- var widget = dijit.byId(newStack[i]);
+ for(i=nCommon; i<newStack.length; i++){
+ widget = dijit.byId(newStack[i]);
if(widget){
- dojo.publish("widgetFocus", [widget]);
+ widget._focused = true;
if(widget._onFocus){
- widget._onFocus();
+ widget._onFocus(by);
}
+ if(widget._setStateClass){
+ widget._setStateClass();
+ }
+ dojo.publish("widgetFocus", [widget, by]);
}
}
}
});
// register top window and all the iframes it contains
-dojo.addOnLoad(dijit.registerWin);
+dojo.addOnLoad(function(){
+ var handle = dijit.registerWin(window);
+ if(dojo.isIE){
+ dojo.addOnWindowUnload(function(){
+ dijit.unregisterWin(handle);
+ handle = null;
+ })
+ }
+});
}
-if(!dojo._hasResource["dijit._base.manager"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._base.manager"] = true;
-dojo.provide("dijit._base.manager");
-
-dojo.declare("dijit.WidgetSet", null, {
- constructor: function(){
- // summary:
- // A set of widgets indexed by id
- this._hash={};
- },
-
- add: function(/*Widget*/ widget){
- if(this._hash[widget.id]){
- throw new Error("Tried to register widget with id==" + widget.id + " but that id is already registered");
- }
- this._hash[widget.id]=widget;
- },
-
- remove: function(/*String*/ id){
- delete this._hash[id];
+if(!dojo._hasResource["dojo.AdapterRegistry"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojo.AdapterRegistry"] = true;
+dojo.provide("dojo.AdapterRegistry");
+
+dojo.AdapterRegistry = function(/*Boolean?*/ returnWrappers){
+ // summary:
+ // A registry to make contextual calling/searching easier.
+ // description:
+ // Objects of this class keep list of arrays in the form [name, check,
+ // wrap, directReturn] that are used to determine what the contextual
+ // result of a set of checked arguments is. All check/wrap functions
+ // in this registry should be of the same arity.
+ // example:
+ // | // create a new registry
+ // | var reg = new dojo.AdapterRegistry();
+ // | reg.register("handleString",
+ // | dojo.isString,
+ // | function(str){
+ // | // do something with the string here
+ // | }
+ // | );
+ // | reg.register("handleArr",
+ // | dojo.isArray,
+ // | function(arr){
+ // | // do something with the array here
+ // | }
+ // | );
+ // |
+ // | // now we can pass reg.match() *either* an array or a string and
+ // | // the value we pass will get handled by the right function
+ // | reg.match("someValue"); // will call the first function
+ // | reg.match(["someValue"]); // will call the second
+
+ this.pairs = [];
+ this.returnWrappers = returnWrappers || false; // Boolean
+}
+
+dojo.extend(dojo.AdapterRegistry, {
+ register: function(/*String*/ name, /*Function*/ check, /*Function*/ wrap, /*Boolean?*/ directReturn, /*Boolean?*/ override){
+ // summary:
+ // register a check function to determine if the wrap function or
+ // object gets selected
+ // name:
+ // a way to identify this matcher.
+ // check:
+ // a function that arguments are passed to from the adapter's
+ // match() function. The check function should return true if the
+ // given arguments are appropriate for the wrap function.
+ // directReturn:
+ // If directReturn is true, the value passed in for wrap will be
+ // returned instead of being called. Alternately, the
+ // AdapterRegistry can be set globally to "return not call" using
+ // the returnWrappers property. Either way, this behavior allows
+ // the registry to act as a "search" function instead of a
+ // function interception library.
+ // override:
+ // If override is given and true, the check function will be given
+ // highest priority. Otherwise, it will be the lowest priority
+ // adapter.
+ this.pairs[((override) ? "unshift" : "push")]([name, check, wrap, directReturn]);
},
- forEach: function(/*Function*/ func){
- for(var id in this._hash){
- func(this._hash[id]);
+ match: function(/* ... */){
+ // summary:
+ // Find an adapter for the given arguments. If no suitable adapter
+ // is found, throws an exception. match() accepts any number of
+ // arguments, all of which are passed to all matching functions
+ // from the registered pairs.
+ for(var i = 0; i < this.pairs.length; i++){
+ var pair = this.pairs[i];
+ if(pair[1].apply(this, arguments)){
+ if((pair[3])||(this.returnWrappers)){
+ return pair[2];
+ }else{
+ return pair[2].apply(this, arguments);
+ }
+ }
}
+ throw new Error("No match found");
},
- filter: function(/*Function*/ filter){
- var res = new dijit.WidgetSet();
- this.forEach(function(widget){
- if(filter(widget)){ res.add(widget); }
- });
- return res; // dijit.WidgetSet
- },
-
- byId: function(/*String*/ id){
- return this._hash[id];
- },
-
- byClass: function(/*String*/ cls){
- return this.filter(function(widget){ return widget.declaredClass==cls; }); // dijit.WidgetSet
+ unregister: function(name){
+ // summary: Remove a named adapter from the registry
+
+ // FIXME: this is kind of a dumb way to handle this. On a large
+ // registry this will be slow-ish and we can use the name as a lookup
+ // should we choose to trade memory for speed.
+ for(var i = 0; i < this.pairs.length; i++){
+ var pair = this.pairs[i];
+ if(pair[0] == name){
+ this.pairs.splice(i, 1);
+ return true;
+ }
+ }
+ return false;
}
- });
-
-// registry: list of all widgets on page
-dijit.registry = new dijit.WidgetSet();
-
-dijit._widgetTypeCtr = {};
-
-dijit.getUniqueId = function(/*String*/widgetType){
- // summary
- // Generates a unique id for a given widgetType
-
- var id;
- do{
- id = widgetType + "_" +
- (dijit._widgetTypeCtr[widgetType] !== undefined ?
- ++dijit._widgetTypeCtr[widgetType] : dijit._widgetTypeCtr[widgetType] = 0);
- }while(dijit.byId(id));
- return id; // String
-};
-
-
-if(dojo.isIE){
- // Only run this for IE because we think it's only necessary in that case,
- // and because it causes problems on FF. See bug #3531 for details.
- dojo.addOnUnload(function(){
- dijit.registry.forEach(function(widget){ widget.destroy(); });
- });
-}
-
-dijit.byId = function(/*String|Widget*/id){
- // summary:
- // Returns a widget by its id, or if passed a widget, no-op (like dojo.byId())
- return (dojo.isString(id)) ? dijit.registry.byId(id) : id; // Widget
-};
-
-dijit.byNode = function(/* DOMNode */ node){
- // summary:
- // Returns the widget as referenced by node
- return dijit.registry.byId(node.getAttribute("widgetId")); // Widget
-};
-
-dijit.getEnclosingWidget = function(/* DOMNode */ node){
- // summary:
- // Returns the widget whose dom tree contains node or null if
- // the node is not contained within the dom tree of any widget
- while(node){
- if(node.getAttribute && node.getAttribute("widgetId")){
- return dijit.registry.byId(node.getAttribute("widgetId"));
- }
- node = node.parentNode;
- }
- return null;
-};
+});
}
if(!dojo._hasResource["dijit._base.place"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit._base.place"] = true;
dojo.provide("dijit._base.place");
+
+
// ported from dojo.html.util
dijit.getViewport = function(){
- // summary
- // Returns the dimensions and scroll position of the viewable area of a browser window
-
- var _window = dojo.global;
- var _document = dojo.doc;
-
- // get viewport size
- var w = 0, h = 0;
- if(dojo.isMozilla){
- // mozilla
- // _window.innerHeight includes the height taken by the scroll bar
- // clientHeight is ideal but has DTD issues:
- // #4539: FF reverses the roles of body.clientHeight/Width and documentElement.clientHeight/Width based on the DTD!
- // check DTD to see whether body or documentElement returns the viewport dimensions using this algorithm:
- var minw, minh, maxw, maxh;
- if(_document.body.clientWidth>_document.documentElement.clientWidth){
- minw = _document.documentElement.clientWidth;
- maxw = _document.body.clientWidth;
- }else{
- maxw = _document.documentElement.clientWidth;
- minw = _document.body.clientWidth;
- }
- if(_document.body.clientHeight>_document.documentElement.clientHeight){
- minh = _document.documentElement.clientHeight;
- maxh = _document.body.clientHeight;
- }else{
- maxh = _document.documentElement.clientHeight;
- minh = _document.body.clientHeight;
- }
- w = (maxw > _window.innerWidth) ? minw : maxw;
- h = (maxh > _window.innerHeight) ? minh : maxh;
- }else if(!dojo.isOpera && _window.innerWidth){
- //in opera9, dojo.body().clientWidth should be used, instead
- //of window.innerWidth/document.documentElement.clientWidth
- //so we have to check whether it is opera
- w = _window.innerWidth;
- h = _window.innerHeight;
- }else if(dojo.isIE && _document.documentElement && _document.documentElement.clientHeight){
- w = _document.documentElement.clientWidth;
- h = _document.documentElement.clientHeight;
- }else if(dojo.body().clientWidth){
- // IE5, Opera
- w = dojo.body().clientWidth;
- h = dojo.body().clientHeight;
- }
+ // summary:
+ // Returns the dimensions and scroll position of the viewable area of a browser window
+
+ var scrollRoot = (dojo.doc.compatMode == 'BackCompat')? dojo.body() : dojo.doc.documentElement;
// get scroll position
- var scroll = dojo._docScroll();
-
- return { w: w, h: h, l: scroll.x, t: scroll.y }; // object
+ var scroll = dojo._docScroll(); // scrollRoot.scrollTop/Left should work
+ return { w: scrollRoot.clientWidth, h: scrollRoot.clientHeight, l: scroll.x, t: scroll.y };
};
+/*=====
+dijit.__Position = function(){
+ // x: Integer
+ // horizontal coordinate in pixels, relative to document body
+ // y: Integer
+ // vertical coordinate in pixels, relative to document body
+
+ thix.x = x;
+ this.y = y;
+}
+=====*/
+
+
dijit.placeOnScreen = function(
- /* DomNode */ node,
- /* Object */ pos,
- /* Object */ corners,
- /* boolean? */ tryOnly){
- // summary:
- // Keeps 'node' in the visible area of the screen while trying to
- // place closest to pos.x, pos.y. The input coordinates are
- // expected to be the desired document position.
- //
- // Set which corner(s) you want to bind to, such as
- //
- // placeOnScreen(node, {x: 10, y: 20}, ["TR", "BL"])
- //
- // The desired x/y will be treated as the topleft(TL)/topright(TR) or
- // BottomLeft(BL)/BottomRight(BR) corner of the node. Each corner is tested
- // and if a perfect match is found, it will be used. Otherwise, it goes through
- // all of the specified corners, and choose the most appropriate one.
- //
+ /* DomNode */ node,
+ /* dijit.__Position */ pos,
+ /* String[] */ corners,
+ /* dijit.__Position? */ padding){
+ // summary:
+ // Positions one of the node's corners at specified position
+ // such that node is fully visible in viewport.
+ // description:
// NOTE: node is assumed to be absolutely or relatively positioned.
-
- var choices = dojo.map(corners, function(corner){ return { corner: corner, pos: pos }; });
+ // pos:
+ // Object like {x: 10, y: 20}
+ // corners:
+ // Array of Strings representing order to try corners in, like ["TR", "BL"].
+ // Possible values are:
+ // * "BL" - bottom left
+ // * "BR" - bottom right
+ // * "TL" - top left
+ // * "TR" - top right
+ // padding:
+ // set padding to put some buffer around the element you want to position.
+ // example:
+ // Try to place node's top right corner at (10,20).
+ // If that makes node go (partially) off screen, then try placing
+ // bottom left corner at (10,20).
+ // | placeOnScreen(node, {x: 10, y: 20}, ["TR", "BL"])
+
+ var choices = dojo.map(corners, function(corner){
+ var c = { corner: corner, pos: {x:pos.x,y:pos.y} };
+ if(padding){
+ c.pos.x += corner.charAt(1) == 'L' ? padding.x : -padding.x;
+ c.pos.y += corner.charAt(0) == 'T' ? padding.y : -padding.y;
+ }
+ return c;
+ });
return dijit._place(node, choices);
}
dijit._place = function(/*DomNode*/ node, /* Array */ choices, /* Function */ layoutNode){
// summary:
// Given a list of spots to put node, put it at the first spot where it fits,
// of if it doesn't fit anywhere then the place with the least overflow
// choices: Array
// Array of elements like: {corner: 'TL', pos: {x: 10, y: 20} }
// Above example says to put the top-left corner of the node at (10,20)
- // layoutNode: Function(node, orient)
+ // layoutNode: Function(node, aroundNodeCorner, nodeCorner)
// for things like tooltip, they are displayed differently (and have different dimensions)
// based on their orientation relative to the parent. This adjusts the popup based on orientation.
// get {x: 10, y: 10, w: 100, h:100} type obj representing position of
// viewport over document
var view = dijit.getViewport();
// This won't work if the node is inside a <div style="position: relative">,
- // so reattach it to document.body. (Otherwise, the positioning will be wrong
+ // so reattach it to dojo.doc.body. (Otherwise, the positioning will be wrong
// and also it might get cutoff)
if(!node.parentNode || String(node.parentNode.tagName).toLowerCase() != "body"){
dojo.body().appendChild(node);
}
- var best=null;
- for(var i=0; i<choices.length; i++){
- var corner = choices[i].corner;
- var pos = choices[i].pos;
+ var best = null;
+ dojo.some(choices, function(choice){
+ var corner = choice.corner;
+ var pos = choice.pos;
// configure node to be displayed in given position relative to button
// (need to do this in order to get an accurate size for the node, because
// a tooltips size changes based on position, due to triangle)
if(layoutNode){
- layoutNode(corner);
+ layoutNode(node, choice.aroundCorner, corner);
}
// get node's size
- var oldDisplay = node.style.display;
- var oldVis = node.style.visibility;
- node.style.visibility = "hidden";
- node.style.display = "";
+ var style = node.style;
+ var oldDisplay = style.display;
+ var oldVis = style.visibility;
+ style.visibility = "hidden";
+ style.display = "";
var mb = dojo.marginBox(node);
- node.style.display = oldDisplay;
- node.style.visibility = oldVis;
+ style.display = oldDisplay;
+ style.visibility = oldVis;
// coordinates and size of node with specified corner placed at pos,
// and clipped by viewport
- var startX = (corner.charAt(1)=='L' ? pos.x : Math.max(view.l, pos.x - mb.w)),
- startY = (corner.charAt(0)=='T' ? pos.y : Math.max(view.t, pos.y - mb.h)),
- endX = (corner.charAt(1)=='L' ? Math.min(view.l+view.w, startX+mb.w) : pos.x),
- endY = (corner.charAt(0)=='T' ? Math.min(view.t+view.h, startY+mb.h) : pos.y),
- width = endX-startX,
- height = endY-startY,
- overflow = (mb.w-width) + (mb.h-height);
-
- if(best==null || overflow<best.overflow){
+ var startX = Math.max(view.l, corner.charAt(1) == 'L' ? pos.x : (pos.x - mb.w)),
+ startY = Math.max(view.t, corner.charAt(0) == 'T' ? pos.y : (pos.y - mb.h)),
+ endX = Math.min(view.l + view.w, corner.charAt(1) == 'L' ? (startX + mb.w) : pos.x),
+ endY = Math.min(view.t + view.h, corner.charAt(0) == 'T' ? (startY + mb.h) : pos.y),
+ width = endX - startX,
+ height = endY - startY,
+ overflow = (mb.w - width) + (mb.h - height);
+
+ if(best == null || overflow < best.overflow){
best = {
corner: corner,
- aroundCorner: choices[i].aroundCorner,
+ aroundCorner: choice.aroundCorner,
x: startX,
y: startY,
w: width,
h: height,
overflow: overflow
};
}
- if(overflow==0){
- break;
- }
- }
+ return !overflow;
+ });
node.style.left = best.x + "px";
node.style.top = best.y + "px";
+ if(best.overflow && layoutNode){
+ layoutNode(node, best.aroundCorner, best.corner);
+ }
return best;
}
-dijit.placeOnScreenAroundElement = function(
+dijit.placeOnScreenAroundNode = function(
/* DomNode */ node,
/* DomNode */ aroundNode,
/* Object */ aroundCorners,
- /* Function */ layoutNode){
-
- // summary
- // Like placeOnScreen, except it accepts aroundNode instead of x,y
- // and attempts to place node around it. Uses margin box dimensions.
+ /* Function? */ layoutNode){
+
+ // summary:
+ // Position node adjacent or kitty-corner to aroundNode
+ // such that it's fully visible in viewport.
+ //
+ // description:
+ // Place node such that corner of node touches a corner of
+ // aroundNode, and that node is fully visible.
+ //
+ // aroundCorners:
+ // Ordered list of pairs of corners to try matching up.
+ // Each pair of corners is represented as a key/value in the hash,
+ // where the key corresponds to the aroundNode's corner, and
+ // the value corresponds to the node's corner:
+ //
+ // | { aroundNodeCorner1: nodeCorner1, aroundNodeCorner2: nodeCorner2, ...}
//
- // aroundCorners
- // specify Which corner of aroundNode should be
- // used to place the node => which corner(s) of node to use (see the
- // corners parameter in dijit.placeOnScreen)
- // e.g. {'TL': 'BL', 'BL': 'TL'}
+ // The following strings are used to represent the four corners:
+ // * "BL" - bottom left
+ // * "BR" - bottom right
+ // * "TL" - top left
+ // * "TR" - top right
//
- // layoutNode: Function(node, orient)
- // for things like tooltip, they are displayed differently (and have different dimensions)
+ // layoutNode: Function(node, aroundNodeCorner, nodeCorner)
+ // For things like tooltip, they are displayed differently (and have different dimensions)
// based on their orientation relative to the parent. This adjusts the popup based on orientation.
-
+ //
+ // example:
+ // | dijit.placeOnScreenAroundNode(node, aroundNode, {'BL':'TL', 'TR':'BR'});
+ // This will try to position node such that node's top-left corner is at the same position
+ // as the bottom left corner of the aroundNode (ie, put node below
+ // aroundNode, with left edges aligned). If that fails it will try to put
+ // the bottom-right corner of node where the top right corner of aroundNode is
+ // (ie, put node above aroundNode, with right edges aligned)
+ //
// get coordinates of aroundNode
aroundNode = dojo.byId(aroundNode);
var oldDisplay = aroundNode.style.display;
aroundNode.style.display="";
// #3172: use the slightly tighter border box instead of marginBox
- var aroundNodeW = aroundNode.offsetWidth; //mb.w;
- var aroundNodeH = aroundNode.offsetHeight; //mb.h;
- var aroundNodePos = dojo.coords(aroundNode, true);
+ var aroundNodePos = dojo.position(aroundNode, true);
aroundNode.style.display=oldDisplay;
+ // place the node around the calculated rectangle
+ return dijit._placeOnScreenAroundRect(node,
+ aroundNodePos.x, aroundNodePos.y, aroundNodePos.w, aroundNodePos.h, // rectangle
+ aroundCorners, layoutNode);
+};
+
+/*=====
+dijit.__Rectangle = function(){
+ // x: Integer
+ // horizontal offset in pixels, relative to document body
+ // y: Integer
+ // vertical offset in pixels, relative to document body
+ // width: Integer
+ // width in pixels
+ // height: Integer
+ // height in pixels
+
+ this.x = x;
+ this.y = y;
+ this.width = width;
+ this.height = height;
+}
+=====*/
+
+
+dijit.placeOnScreenAroundRectangle = function(
+ /* DomNode */ node,
+ /* dijit.__Rectangle */ aroundRect,
+ /* Object */ aroundCorners,
+ /* Function */ layoutNode){
+
+ // summary:
+ // Like dijit.placeOnScreenAroundNode(), except that the "around"
+ // parameter is an arbitrary rectangle on the screen (x, y, width, height)
+ // instead of a dom node.
+
+ return dijit._placeOnScreenAroundRect(node,
+ aroundRect.x, aroundRect.y, aroundRect.width, aroundRect.height, // rectangle
+ aroundCorners, layoutNode);
+};
+
+dijit._placeOnScreenAroundRect = function(
+ /* DomNode */ node,
+ /* Number */ x,
+ /* Number */ y,
+ /* Number */ width,
+ /* Number */ height,
+ /* Object */ aroundCorners,
+ /* Function */ layoutNode){
+
+ // summary:
+ // Like dijit.placeOnScreenAroundNode(), except it accepts coordinates
+ // of a rectangle to place node adjacent to.
+
+ // TODO: combine with placeOnScreenAroundRectangle()
+
// Generate list of possible positions for node
var choices = [];
for(var nodeCorner in aroundCorners){
choices.push( {
aroundCorner: nodeCorner,
corner: aroundCorners[nodeCorner],
pos: {
- x: aroundNodePos.x + (nodeCorner.charAt(1)=='L' ? 0 : aroundNodeW),
- y: aroundNodePos.y + (nodeCorner.charAt(0)=='T' ? 0 : aroundNodeH)
+ x: x + (nodeCorner.charAt(1) == 'L' ? 0 : width),
+ y: y + (nodeCorner.charAt(0) == 'T' ? 0 : height)
}
});
}
return dijit._place(node, choices, layoutNode);
-}
+};
+
+dijit.placementRegistry= new dojo.AdapterRegistry();
+dijit.placementRegistry.register("node",
+ function(n, x){
+ return typeof x == "object" &&
+ typeof x.offsetWidth != "undefined" && typeof x.offsetHeight != "undefined";
+ },
+ dijit.placeOnScreenAroundNode);
+dijit.placementRegistry.register("rect",
+ function(n, x){
+ return typeof x == "object" &&
+ "x" in x && "y" in x && "width" in x && "height" in x;
+ },
+ dijit.placeOnScreenAroundRectangle);
+
+dijit.placeOnScreenAroundElement = function(
+ /* DomNode */ node,
+ /* Object */ aroundElement,
+ /* Object */ aroundCorners,
+ /* Function */ layoutNode){
+
+ // summary:
+ // Like dijit.placeOnScreenAroundNode(), except it accepts an arbitrary object
+ // for the "around" argument and finds a proper processor to place a node.
+
+ return dijit.placementRegistry.match.apply(dijit.placementRegistry, arguments);
+};
+
+dijit.getPopupAlignment = function(/*Array*/ position, /*Boolean*/ leftToRight){
+ // summary:
+ // Transforms the passed array of preferred positions into a format suitable for passing as the aroundCorners argument to dijit.placeOnScreenAroundElement.
+ //
+ // position: String[]
+ // This variable controls the position of the drop down.
+ // It's an array of strings with the following values:
+ //
+ // * before: places drop down to the left of the target node/widget, or to the right in
+ // the case of RTL scripts like Hebrew and Arabic
+ // * after: places drop down to the right of the target node/widget, or to the left in
+ // the case of RTL scripts like Hebrew and Arabic
+ // * above: drop down goes above target node
+ // * below: drop down goes below target node
+ //
+ // The list is positions is tried, in order, until a position is found where the drop down fits
+ // within the viewport.
+ //
+ // leftToRight: Boolean
+ // Whether the popup will be displaying in leftToRight mode.
+ //
+ var align = {};
+ dojo.forEach(position, function(pos){
+ switch(pos){
+ case "after":
+ align[leftToRight ? "BR" : "BL"] = leftToRight ? "BL" : "BR";
+ break;
+ case "before":
+ align[leftToRight ? "BL" : "BR"] = leftToRight ? "BR" : "BL";
+ break;
+ case "below":
+ // first try to align left borders, next try to align right borders (or reverse for RTL mode)
+ align[leftToRight ? "BL" : "BR"] = leftToRight ? "TL" : "TR";
+ align[leftToRight ? "BR" : "BL"] = leftToRight ? "TR" : "TL";
+ break;
+ case "above":
+ default:
+ // first try to align left borders, next try to align right borders (or reverse for RTL mode)
+ align[leftToRight ? "TL" : "TR"] = leftToRight ? "BL" : "BR";
+ align[leftToRight ? "TR" : "TL"] = leftToRight ? "BR" : "BL";
+ break;
+ }
+ });
+ return align;
+};
+dijit.getPopupAroundAlignment = function(/*Array*/ position, /*Boolean*/ leftToRight){
+ // summary:
+ // Transforms the passed array of preferred positions into a format suitable for passing as the aroundCorners argument to dijit.placeOnScreenAroundElement.
+ //
+ // position: String[]
+ // This variable controls the position of the drop down.
+ // It's an array of strings with the following values:
+ //
+ // * before: places drop down to the left of the target node/widget, or to the right in
+ // the case of RTL scripts like Hebrew and Arabic
+ // * after: places drop down to the right of the target node/widget, or to the left in
+ // the case of RTL scripts like Hebrew and Arabic
+ // * above: drop down goes above target node
+ // * below: drop down goes below target node
+ //
+ // The list is positions is tried, in order, until a position is found where the drop down fits
+ // within the viewport.
+ //
+ // leftToRight: Boolean
+ // Whether the popup will be displaying in leftToRight mode.
+ //
+ var align = {};
+ dojo.forEach(position, function(pos){
+ switch(pos){
+ case "after":
+ align[leftToRight ? "BR" : "BL"] = leftToRight ? "BL" : "BR";
+ break;
+ case "before":
+ align[leftToRight ? "BL" : "BR"] = leftToRight ? "BR" : "BL";
+ break;
+ case "below":
+ // first try to align left borders, next try to align right borders (or reverse for RTL mode)
+ align[leftToRight ? "BL" : "BR"] = leftToRight ? "TL" : "TR";
+ align[leftToRight ? "BR" : "BL"] = leftToRight ? "TR" : "TL";
+ break;
+ case "above":
+ default:
+ // first try to align left borders, next try to align right borders (or reverse for RTL mode)
+ align[leftToRight ? "TL" : "TR"] = leftToRight ? "BL" : "BR";
+ align[leftToRight ? "TR" : "TL"] = leftToRight ? "BR" : "BL";
+ break;
+ }
+ });
+ return align;
+};
}
if(!dojo._hasResource["dijit._base.window"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit._base.window"] = true;
dojo.provide("dijit._base.window");
+// TODO: remove this in 2.0, it's not used anymore, or at least not internally
+
dijit.getDocumentWindow = function(doc){
- // summary
- // Get window object associated with document doc
-
- // With Safari, there is not way to retrieve the window from the document, so we must fix it.
- if(dojo.isSafari && !doc._parentWindow){
- /*
- This is a Safari specific function that fix the reference to the parent
- window from the document object.
- */
- var fix=function(win){
- win.document._parentWindow=win;
- for(var i=0; i<win.frames.length; i++){
- fix(win.frames[i]);
- }
- }
- fix(window.top);
- }
-
- //In some IE versions (at least 6.0), document.parentWindow does not return a
- //reference to the real window object (maybe a copy), so we must fix it as well
- //We use IE specific execScript to attach the real window reference to
- //document._parentWindow for later use
+ // summary:
+ // Get window object associated with document doc
+
+ // In some IE versions (at least 6.0), document.parentWindow does not return a
+ // reference to the real window object (maybe a copy), so we must fix it as well
+ // We use IE specific execScript to attach the real window reference to
+ // document._parentWindow for later use
if(dojo.isIE && window !== document.parentWindow && !doc._parentWindow){
/*
In IE 6, only the variable "window" can be used to connect events (others
may be only copies).
*/
doc.parentWindow.execScript("document._parentWindow = window;", "Javascript");
//to prevent memory leak, unset it after use
//another possibility is to add an onUnload handler which seems overkill to me (liucougar)
var win = doc._parentWindow;
doc._parentWindow = null;
return win; // Window
}
return doc._parentWindow || doc.parentWindow || doc.defaultView; // Window
}
}
if(!dojo._hasResource["dijit._base.popup"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit._base.popup"] = true;
dojo.provide("dijit._base.popup");
dijit.popup = new function(){
// summary:
// This class is used to show/hide widgets as popups.
- //
var stack = [],
beginZIndex=1000,
idGen = 1;
- this.open = function(/*Object*/ args){
+ this.moveOffScreen = function(/*DomNode*/ node){
+ // summary:
+ // Moves node offscreen without hiding it (so that all layout widgets included
+ // in this node can still layout properly)
+ //
+ // description:
+ // Attaches node to dojo.doc.body, and
+ // positions it off screen, but not display:none, so that
+ // the widget doesn't appear in the page flow and/or cause a blank
+ // area at the bottom of the viewport (making scrollbar longer), but
+ // initialization of contained widgets works correctly
+
+ var s = node.style;
+ s.visibility = "hidden"; // so TAB key doesn't navigate to hidden popup
+ s.position = "absolute";
+ s.top = "-9999px";
+ if(s.display == "none"){
+ s.display="";
+ }
+ dojo.body().appendChild(node);
+ };
+
+/*=====
+dijit.popup.__OpenArgs = function(){
+ // popup: Widget
+ // widget to display
+ // parent: Widget
+ // the button etc. that is displaying this popup
+ // around: DomNode
+ // DOM node (typically a button); place popup relative to this node. (Specify this *or* "x" and "y" parameters.)
+ // x: Integer
+ // Absolute horizontal position (in pixels) to place node at. (Specify this *or* "around" parameter.)
+ // y: Integer
+ // Absolute vertical position (in pixels) to place node at. (Specity this *or* "around" parameter.)
+ // orient: Object || String
+ // When the around parameter is specified, orient should be an
+ // ordered list of tuples of the form (around-node-corner, popup-node-corner).
+ // dijit.popup.open() tries to position the popup according to each tuple in the list, in order,
+ // until the popup appears fully within the viewport.
+ //
+ // The default value is {BL:'TL', TL:'BL'}, which represents a list of two tuples:
+ // 1. (BL, TL)
+ // 2. (TL, BL)
+ // where BL means "bottom left" and "TL" means "top left".
+ // So by default, it first tries putting the popup below the around node, left-aligning them,
+ // and then tries to put it above the around node, still left-aligning them. Note that the
+ // default is horizontally reversed when in RTL mode.
+ //
+ // When an (x,y) position is specified rather than an around node, orient is either
+ // "R" or "L". R (for right) means that it tries to put the popup to the right of the mouse,
+ // specifically positioning the popup's top-right corner at the mouse position, and if that doesn't
+ // fit in the viewport, then it tries, in order, the bottom-right corner, the top left corner,
+ // and the top-right corner.
+ // onCancel: Function
+ // callback when user has canceled the popup by
+ // 1. hitting ESC or
+ // 2. by using the popup widget's proprietary cancel mechanism (like a cancel button in a dialog);
+ // i.e. whenever popupWidget.onCancel() is called, args.onCancel is called
+ // onClose: Function
+ // callback whenever this popup is closed
+ // onExecute: Function
+ // callback when user "executed" on the popup/sub-popup by selecting a menu choice, etc. (top menu only)
+ // padding: dijit.__Position
+ // adding a buffer around the opening position. This is only useful when around is not set.
+ this.popup = popup;
+ this.parent = parent;
+ this.around = around;
+ this.x = x;
+ this.y = y;
+ this.orient = orient;
+ this.onCancel = onCancel;
+ this.onClose = onClose;
+ this.onExecute = onExecute;
+ this.padding = padding;
+}
+=====*/
+
+ // Compute the closest ancestor popup that's *not* a child of another popup.
+ // Ex: For a TooltipDialog with a button that spawns a tree of menus, find the popup of the button.
+ var getTopPopup = function(){
+ for(var pi=stack.length-1; pi > 0 && stack[pi].parent === stack[pi-1].widget; pi--){
+ /* do nothing, just trying to get right value for pi */
+ }
+ return stack[pi];
+ };
+
+ var wrappers=[];
+ this.open = function(/*dijit.popup.__OpenArgs*/ args){
// summary:
// Popup the widget at the specified position
//
- // args: Object
- // popup: Widget
- // widget to display,
- // parent: Widget
- // the button etc. that is displaying this popup
- // around: DomNode
- // DOM node (typically a button); place popup relative to this node
- // orient: Object
- // structure specifying possible positions of popup relative to "around" node
- // onCancel: Function
- // callback when user has canceled the popup by
- // 1. hitting ESC or
- // 2. by using the popup widget's proprietary cancel mechanism (like a cancel button in a dialog);
- // ie: whenever popupWidget.onCancel() is called, args.onCancel is called
- // onClose: Function
- // callback whenever this popup is closed
- // onExecute: Function
- // callback when user "executed" on the popup/sub-popup by selecting a menu choice, etc. (top menu only)
+ // example:
+ // opening at the mouse position
+ // | dijit.popup.open({popup: menuWidget, x: evt.pageX, y: evt.pageY});
//
- // examples:
- // 1. opening at the mouse position
- // dijit.popup.open({popup: menuWidget, x: evt.pageX, y: evt.pageY});
- // 2. opening the widget as a dropdown
- // dijit.popup.open({parent: this, popup: menuWidget, around: this.domNode, onClose: function(){...} });
+ // example:
+ // opening the widget as a dropdown
+ // | dijit.popup.open({parent: this, popup: menuWidget, around: this.domNode, onClose: function(){...}});
//
- // Note that whatever widget called dijit.popup.open() should also listen to it's own _onBlur callback
- // (fired from _base/focus.js) to know that focus has moved somewhere else and thus the popup should be closed.
+ // Note that whatever widget called dijit.popup.open() should also listen to its own _onBlur callback
+ // (fired from _base/focus.js) to know that focus has moved somewhere else and thus the popup should be closed.
var widget = args.popup,
- orient = args.orient || {'BL':'TL', 'TL':'BL'},
+ orient = args.orient || (
+ dojo._isBodyLtr() ?
+ {'BL':'TL', 'BR':'TR', 'TL':'BL', 'TR':'BR'} :
+ {'BR':'TR', 'BL':'TL', 'TR':'BR', 'TL':'BL'}
+ ),
around = args.around,
id = (args.around && args.around.id) ? (args.around.id+"_dropdown") : ("popup_"+idGen++);
// make wrapper div to hold widget and possibly hold iframe behind it.
// we can't attach the iframe as a child of the widget.domNode because
// widget.domNode might be a <table>, <ul>, etc.
- var wrapper = dojo.doc.createElement("div");
- wrapper.id = id;
- wrapper.className="dijitPopup";
- wrapper.style.zIndex = beginZIndex + stack.length;
- wrapper.style.visibility = "hidden";
- if(args.parent){
- wrapper.dijitPopupParent=args.parent.id;
+
+ var wrapperobj = wrappers.pop(), wrapper, iframe;
+ if(!wrapperobj){
+ wrapper = dojo.create("div",{
+ "class":"dijitPopup"
+ }, dojo.body());
+ dijit.setWaiRole(wrapper, "presentation");
+ }else{
+ // recycled a old wrapper, so that we don't need to reattach the iframe
+ // which is slow even if the iframe is empty, see #10167
+ wrapper = wrapperobj[0];
+ iframe = wrapperobj[1];
}
- dojo.body().appendChild(wrapper);
-
- widget.domNode.style.display="";
+
+ dojo.attr(wrapper,{
+ id: id,
+ style:{
+ zIndex: beginZIndex + stack.length,
+ visibility:"hidden",
+ // prevent transient scrollbar causing misalign (#5776), and initial flash in upper left (#10111)
+ top: "-9999px"
+ },
+ dijitPopupParent: args.parent ? args.parent.id : ""
+ });
+
+ var s = widget.domNode.style;
+ s.display = "";
+ s.visibility = "";
+ s.position = "";
+ s.top = "0px";
wrapper.appendChild(widget.domNode);
- var iframe = new dijit.BackgroundIframe(wrapper);
+ if(!iframe){
+ iframe = new dijit.BackgroundIframe(wrapper);
+ }else{
+ iframe.resize(wrapper)
+ }
// position the wrapper node
var best = around ?
dijit.placeOnScreenAroundElement(wrapper, around, orient, widget.orient ? dojo.hitch(widget, "orient") : null) :
- dijit.placeOnScreen(wrapper, args, orient == 'R' ? ['TR','BR','TL','BL'] : ['TL','BL','TR','BR']);
+ dijit.placeOnScreen(wrapper, args, orient == 'R' ? ['TR','BR','TL','BL'] : ['TL','BL','TR','BR'], args.padding);
wrapper.style.visibility = "visible";
// TODO: use effects to fade in wrapper
var handlers = [];
- // Compute the closest ancestor popup that's *not* a child of another popup.
- // Ex: For a TooltipDialog with a button that spawns a tree of menus, find the popup of the button.
- function getTopPopup(){
- for(var pi=stack.length-1; pi > 0 && stack[pi].parent === stack[pi-1].widget; pi--);
- return stack[pi];
- }
-
// provide default escape and tab key handling
// (this will work for any widget, not just menu)
handlers.push(dojo.connect(wrapper, "onkeypress", this, function(evt){
- if(evt.keyCode == dojo.keys.ESCAPE && args.onCancel){
+ if(evt.charOrCode == dojo.keys.ESCAPE && args.onCancel){
+ dojo.stopEvent(evt);
args.onCancel();
- }else if(evt.keyCode == dojo.keys.TAB){
+ }else if(evt.charOrCode === dojo.keys.TAB){
dojo.stopEvent(evt);
var topPopup = getTopPopup();
if(topPopup && topPopup.onCancel){
topPopup.onCancel();
}
}
}));
// watch for cancel/execute events on the popup and notify the caller
// (for a menu, "execute" means clicking an item)
if(widget.onCancel){
- handlers.push(dojo.connect(widget, "onCancel", null, args.onCancel));
+ handlers.push(dojo.connect(widget, "onCancel", args.onCancel));
}
- handlers.push(dojo.connect(widget, widget.onExecute ? "onExecute" : "onChange", null, function(){
+ handlers.push(dojo.connect(widget, widget.onExecute ? "onExecute" : "onChange", function(){
var topPopup = getTopPopup();
if(topPopup && topPopup.onExecute){
topPopup.onExecute();
}
}));
stack.push({
wrapper: wrapper,
iframe: iframe,
widget: widget,
parent: args.parent,
onExecute: args.onExecute,
onCancel: args.onCancel,
onClose: args.onClose,
handlers: handlers
});
if(widget.onOpen){
+ // TODO: in 2.0 standardize onShow() (used by StackContainer) and onOpen() (used here)
widget.onOpen(best);
}
return best;
};
- this.close = function(/*Widget*/ popup){
+ this.close = function(/*dijit._Widget*/ popup){
// summary:
// Close specified popup and any popups that it parented
+
+ // Basically work backwards from the top of the stack closing popups
+ // until we hit the specified popup, but IIRC there was some issue where closing
+ // a popup would cause others to close too. Thus if we are trying to close B in [A,B,C]
+ // closing C might close B indirectly and then the while() condition will run where stack==[A]...
+ // so the while condition is constructed defensively.
while(dojo.some(stack, function(elem){return elem.widget == popup;})){
var top = stack.pop(),
wrapper = top.wrapper,
iframe = top.iframe,
widget = top.widget,
onClose = top.onClose;
-
+
if(widget.onClose){
+ // TODO: in 2.0 standardize onHide() (used by StackContainer) and onClose() (used here)
widget.onClose();
}
dojo.forEach(top.handlers, dojo.disconnect);
-
- // #2685: check if the widget still has a domNode so ContentPane can change its URL without getting an error
- if(!widget||!widget.domNode){ return; }
- dojo.style(widget.domNode, "display", "none");
- dojo.body().appendChild(widget.domNode);
- iframe.destroy();
- dojo._destroyElement(wrapper);
-
+
+ // Move the widget offscreen, unless it has already been destroyed in above onClose() etc.
+ if(widget && widget.domNode){
+ this.moveOffScreen(widget.domNode);
+ }
+
+ // recycle the wrapper plus iframe, so we prevent reattaching iframe everytime an popup opens
+ // don't use moveOffScreen which would also reattach the wrapper to body, which causes reloading of iframe
+ wrapper.style.top = "-9999px";
+ wrapper.style.visibility = "hidden";
+ wrappers.push([wrapper,iframe]);
+
if(onClose){
onClose();
}
}
};
}();
dijit._frames = new function(){
- // summary: cache of iframes
+ // summary:
+ // cache of iframes
var queue = [];
this.pop = function(){
var iframe;
if(queue.length){
iframe = queue.pop();
iframe.style.display="";
}else{
if(dojo.isIE){
- var html="<iframe src='javascript:\"\"'"
+ var burl = dojo.config["dojoBlankHtmlUrl"] || (dojo.moduleUrl("dojo", "resources/blank.html")+"") || "javascript:\"\"";
+ var html="<iframe src='" + burl + "'"
+ " style='position: absolute; left: 0px; top: 0px;"
+ "z-index: -1; filter:Alpha(Opacity=\"0\");'>";
iframe = dojo.doc.createElement(html);
}else{
- var iframe = dojo.doc.createElement("iframe");
+ iframe = dojo.create("iframe");
iframe.src = 'javascript:""';
iframe.className = "dijitBackgroundIframe";
+ dojo.style(iframe, "opacity", 0.1);
}
iframe.tabIndex = -1; // Magic to prevent iframe from getting focus on tab keypress - as style didnt work.
- dojo.body().appendChild(iframe);
}
return iframe;
};
this.push = function(iframe){
- iframe.style.display="";
- if(dojo.isIE){
- iframe.style.removeExpression("width");
- iframe.style.removeExpression("height");
- }
+ iframe.style.display="none";
queue.push(iframe);
}
}();
-// fill the queue
-if(dojo.isIE && dojo.isIE < 7){
- dojo.addOnLoad(function(){
- var f = dijit._frames;
- dojo.forEach([f.pop()], f.push);
- });
-}
-
dijit.BackgroundIframe = function(/* DomNode */node){
- // summary:
- // For IE z-index schenanigans. id attribute is required.
+ // summary:
+ // For IE/FF z-index schenanigans. id attribute is required.
//
- // description:
+ // description:
// new dijit.BackgroundIframe(node)
// Makes a background iframe as a child of node, that fills
// area (and position) of node
if(!node.id){ throw new Error("no id"); }
- if((dojo.isIE && dojo.isIE < 7) || (dojo.isFF && dojo.isFF < 3 && dojo.hasClass(dojo.body(), "dijit_a11y"))){
+ if(dojo.isIE || dojo.isMoz){
var iframe = dijit._frames.pop();
node.appendChild(iframe);
- if(dojo.isIE){
- iframe.style.setExpression("width", "document.getElementById('" + node.id + "').offsetWidth");
- iframe.style.setExpression("height", "document.getElementById('" + node.id + "').offsetHeight");
+ if(dojo.isIE<7){
+ this.resize(node);
+ this._conn = dojo.connect(node, 'onresize', this, function(){
+ this.resize(node);
+ });
+ }else{
+ dojo.style(iframe, {
+ width: '100%',
+ height: '100%'
+ });
}
this.iframe = iframe;
}
};
dojo.extend(dijit.BackgroundIframe, {
+ resize: function(node){
+ // summary:
+ // resize the iframe so its the same size as node
+ // description:
+ // this function is a no-op in all browsers except
+ // IE6, which does not support 100% width/height
+ // of absolute positioned iframes
+ if(this.iframe && dojo.isIE<7){
+ dojo.style(this.iframe, {
+ width: node.offsetWidth + 'px',
+ height: node.offsetHeight + 'px'
+ });
+ }
+ },
destroy: function(){
- // summary: destroy the iframe
+ // summary:
+ // destroy the iframe
+ if(this._conn){
+ dojo.disconnect(this._conn);
+ this._conn = null;
+ }
if(this.iframe){
dijit._frames.push(this.iframe);
delete this.iframe;
}
}
});
}
if(!dojo._hasResource["dijit._base.scroll"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit._base.scroll"] = true;
dojo.provide("dijit._base.scroll");
-dijit.scrollIntoView = function(/* DomNode */node){
- // summary
- // Scroll the passed node into view, if it is not.
-
+dijit.scrollIntoView = function(/*DomNode*/ node, /*Object?*/ pos){
+ // summary:
+ // Scroll the passed node into view, if it is not already.
+
// don't rely on that node.scrollIntoView works just because the function is there
- // it doesnt work in Konqueror or Opera even though the function is there and probably
- // not safari either
- // dont like browser sniffs implementations but sometimes you have to use it
- if(dojo.isIE){
- //only call scrollIntoView if there is a scrollbar for this menu,
- //otherwise, scrollIntoView will scroll the window scrollbar
- if(dojo.marginBox(node.parentNode).h <= node.parentNode.scrollHeight){ //PORT was getBorderBox
- node.scrollIntoView(false);
+
+ try{ // catch unexpected/unrecreatable errors (#7808) since we can recover using a semi-acceptable native method
+ node = dojo.byId(node);
+ var doc = node.ownerDocument || dojo.doc,
+ body = doc.body || dojo.body(),
+ html = doc.documentElement || body.parentNode,
+ isIE = dojo.isIE, isWK = dojo.isWebKit;
+ // if an untested browser, then use the native method
+ if((!(dojo.isMoz || isIE || isWK) || node == body || node == html) && (typeof node.scrollIntoView != "undefined")){
+ node.scrollIntoView(false); // short-circuit to native if possible
+ return;
+ }
+ var backCompat = doc.compatMode == 'BackCompat',
+ clientAreaRoot = backCompat? body : html,
+ scrollRoot = isWK ? body : clientAreaRoot,
+ rootWidth = clientAreaRoot.clientWidth,
+ rootHeight = clientAreaRoot.clientHeight,
+ rtl = !dojo._isBodyLtr(),
+ nodePos = pos || dojo.position(node),
+ el = node.parentNode,
+ isFixed = function(el){
+ return ((isIE <= 6 || (isIE && backCompat))? false : (dojo.style(el, 'position').toLowerCase() == "fixed"));
+ };
+ if(isFixed(node)){ return; } // nothing to do
+ while(el){
+ if(el == body){ el = scrollRoot; }
+ var elPos = dojo.position(el),
+ fixedPos = isFixed(el);
+ with(elPos){
+ if(el == scrollRoot){
+ w = rootWidth, h = rootHeight;
+ if(scrollRoot == html && isIE && rtl){ x += scrollRoot.offsetWidth-w; } // IE workaround where scrollbar causes negative x
+ if(x < 0 || !isIE){ x = 0; } // IE can have values > 0
+ if(y < 0 || !isIE){ y = 0; }
+ }else{
+ var pb = dojo._getPadBorderExtents(el);
+ w -= pb.w; h -= pb.h; x += pb.l; y += pb.t;
+ }
+ with(el){
+ if(el != scrollRoot){ // body, html sizes already have the scrollbar removed
+ var clientSize = clientWidth,
+ scrollBarSize = w - clientSize;
+ if(clientSize > 0 && scrollBarSize > 0){
+ w = clientSize;
+ if(isIE && rtl){ x += scrollBarSize; }
+ }
+ clientSize = clientHeight;
+ scrollBarSize = h - clientSize;
+ if(clientSize > 0 && scrollBarSize > 0){
+ h = clientSize;
+ }
+ }
+ if(fixedPos){ // bounded by viewport, not parents
+ if(y < 0){
+ h += y, y = 0;
+ }
+ if(x < 0){
+ w += x, x = 0;
+ }
+ if(y + h > rootHeight){
+ h = rootHeight - y;
+ }
+ if(x + w > rootWidth){
+ w = rootWidth - x;
+ }
+ }
+ // calculate overflow in all 4 directions
+ var l = nodePos.x - x, // beyond left: < 0
+ t = nodePos.y - Math.max(y, 0), // beyond top: < 0
+ r = l + nodePos.w - w, // beyond right: > 0
+ bot = t + nodePos.h - h; // beyond bottom: > 0
+ if(r * l > 0){
+ var s = Math[l < 0? "max" : "min"](l, r);
+ nodePos.x += scrollLeft;
+ scrollLeft += (isIE >= 8 && !backCompat && rtl)? -s : s;
+ nodePos.x -= scrollLeft;
+ }
+ if(bot * t > 0){
+ nodePos.y += scrollTop;
+ scrollTop += Math[t < 0? "max" : "min"](t, bot);
+ nodePos.y -= scrollTop;
+ }
+ }
}
- }else if(dojo.isMozilla){
+ el = (el != scrollRoot) && !fixedPos && el.parentNode;
+ }
+ }catch(error){
+ console.error('scrollIntoView: ' + error);
node.scrollIntoView(false);
- }else{
- var parent = node.parentNode;
- var parentBottom = parent.scrollTop + dojo.marginBox(parent).h; //PORT was getBorderBox
- var nodeBottom = node.offsetTop + dojo.marginBox(node).h;
- if(parentBottom < nodeBottom){
- parent.scrollTop += (nodeBottom - parentBottom);
- }else if(parent.scrollTop > node.offsetTop){
- parent.scrollTop -= (parent.scrollTop - node.offsetTop);
- }
}
};
}
if(!dojo._hasResource["dijit._base.sniff"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit._base.sniff"] = true;
+// summary:
+// Applies pre-set CSS classes to the top-level HTML node, based on:
+// - browser (ex: dj_ie)
+// - browser version (ex: dj_ie6)
+// - box model (ex: dj_contentBox)
+// - text direction (ex: dijitRtl)
+//
+// In addition, browser, browser version, and box model are
+// combined with an RTL flag when browser text is RTL. ex: dj_ie-rtl.
+//
+// Simply doing a require on this module will
+// establish this CSS. Modified version of Morris' CSS hack.
+
dojo.provide("dijit._base.sniff");
-// ported from dojo.html.applyBrowserClass (style.js)
-
-// summary:
-// Applies pre-set class names based on browser & version to the
-// top-level HTML node. Simply doing a require on this module will
-// establish this CSS. Modified version of Morris' CSS hack.
(function(){
- var d = dojo;
- var ie = d.isIE;
- var opera = d.isOpera;
- var maj = Math.floor;
- var classes = {
- dj_ie: ie,
-// dj_ie55: ie == 5.5,
- dj_ie6: maj(ie) == 6,
- dj_ie7: maj(ie) == 7,
- dj_iequirks: ie && d.isQuirks,
-// NOTE: Opera not supported by dijit
- dj_opera: opera,
- dj_opera8: maj(opera) == 8,
- dj_opera9: maj(opera) == 9,
- dj_khtml: d.isKhtml,
- dj_safari: d.isSafari,
- dj_gecko: d.isMozilla
- }; // no dojo unsupported browsers
-
+
+ var d = dojo,
+ html = d.doc.documentElement,
+ ie = d.isIE,
+ opera = d.isOpera,
+ maj = Math.floor,
+ ff = d.isFF,
+ boxModel = d.boxModel.replace(/-/,''),
+
+ classes = {
+ dj_ie: ie,
+ dj_ie6: maj(ie) == 6,
+ dj_ie7: maj(ie) == 7,
+ dj_ie8: maj(ie) == 8,
+ dj_iequirks: ie && d.isQuirks,
+
+ // NOTE: Opera not supported by dijit
+ dj_opera: opera,
+
+ dj_khtml: d.isKhtml,
+
+ dj_webkit: d.isWebKit,
+ dj_safari: d.isSafari,
+ dj_chrome: d.isChrome,
+
+ dj_gecko: d.isMozilla,
+ dj_ff3: maj(ff) == 3
+ }; // no dojo unsupported browsers
+
+ classes["dj_" + boxModel] = true;
+
+ // apply browser, browser version, and box model class names
for(var p in classes){
if(classes[p]){
- var html = dojo.doc.documentElement; //TODO browser-specific DOM magic needed?
if(html.className){
html.className += " " + p;
}else{
html.className = p;
}
}
}
+
+ // If RTL mode then add dijitRtl flag plus repeat existing classes
+ // with -rtl extension
+ // (unshift is to make this code run after <body> node is loaded but before parser runs)
+ dojo._loaders.unshift(function(){
+ if(!dojo._isBodyLtr()){
+ html.className += " dijitRtl";
+ for(var p in classes){
+ if(classes[p]){
+ html.className += " " + p + "-rtl";
+ }
+ }
+ }
+ });
+
})();
}
-if(!dojo._hasResource["dijit._base.bidi"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._base.bidi"] = true;
-dojo.provide("dijit._base.bidi");
-
-// summary: applies a class to the top of the document for right-to-left stylesheet rules
-
-dojo.addOnLoad(function(){
- if(!dojo._isBodyLtr()){
- dojo.addClass(dojo.body(), "dijitRtl");
- }
-});
-
-}
-
if(!dojo._hasResource["dijit._base.typematic"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit._base.typematic"] = true;
dojo.provide("dijit._base.typematic");
dijit.typematic = {
// summary:
- // These functions are used to repetitively call a user specified callback
- // method when a specific key or mouse click over a specific DOM node is
- // held down for a specific amount of time.
- // Only 1 such event is allowed to occur on the browser page at 1 time.
+ // These functions are used to repetitively call a user specified callback
+ // method when a specific key or mouse click over a specific DOM node is
+ // held down for a specific amount of time.
+ // Only 1 such event is allowed to occur on the browser page at 1 time.
_fireEventAndReload: function(){
this._timer = null;
this._callback(++this._count, this._node, this._evt);
- this._currentTimeout = (this._currentTimeout < 0) ? this._initialDelay : ((this._subsequentDelay > 1) ? this._subsequentDelay : Math.round(this._currentTimeout * this._subsequentDelay));
+
+ // Schedule next event, reducing the timer a little bit each iteration, bottoming-out at 10 to avoid
+ // browser overload (particularly avoiding starving DOH robot so it never gets to send a mouseup)
+ this._currentTimeout = Math.max(
+ this._currentTimeout < 0 ? this._initialDelay :
+ (this._subsequentDelay > 1 ? this._subsequentDelay : Math.round(this._currentTimeout * this._subsequentDelay)),
+ 10);
this._timer = setTimeout(dojo.hitch(this, "_fireEventAndReload"), this._currentTimeout);
},
trigger: function(/*Event*/ evt, /* Object */ _this, /*DOMNode*/ node, /* Function */ callback, /* Object */ obj, /* Number */ subsequentDelay, /* Number */ initialDelay){
// summary:
- // Start a timed, repeating callback sequence.
- // If already started, the function call is ignored.
- // This method is not normally called by the user but can be
- // when the normal listener code is insufficient.
- // Parameters:
- // evt: key or mouse event object to pass to the user callback
- // _this: pointer to the user's widget space.
- // node: the DOM node object to pass the the callback function
- // callback: function to call until the sequence is stopped called with 3 parameters:
- // count: integer representing number of repeated calls (0..n) with -1 indicating the iteration has stopped
- // node: the DOM node object passed in
- // evt: key or mouse event object
- // obj: user space object used to uniquely identify each typematic sequence
- // subsequentDelay: if > 1, the number of milliseconds until the 3->n events occur
+ // Start a timed, repeating callback sequence.
+ // If already started, the function call is ignored.
+ // This method is not normally called by the user but can be
+ // when the normal listener code is insufficient.
+ // evt:
+ // key or mouse event object to pass to the user callback
+ // _this:
+ // pointer to the user's widget space.
+ // node:
+ // the DOM node object to pass the the callback function
+ // callback:
+ // function to call until the sequence is stopped called with 3 parameters:
+ // count:
+ // integer representing number of repeated calls (0..n) with -1 indicating the iteration has stopped
+ // node:
+ // the DOM node object passed in
+ // evt:
+ // key or mouse event object
+ // obj:
+ // user space object used to uniquely identify each typematic sequence
+ // subsequentDelay:
+ // if > 1, the number of milliseconds until the 3->n events occur
// or else the fractional time multiplier for the next event's delay, default=0.9
- // initialDelay: the number of milliseconds until the 2nd event occurs, default=500ms
+ // initialDelay:
+ // the number of milliseconds until the 2nd event occurs, default=500ms
if(obj != this._obj){
this.stop();
this._initialDelay = initialDelay || 500;
this._subsequentDelay = subsequentDelay || 0.90;
this._obj = obj;
this._evt = evt;
this._node = node;
this._currentTimeout = -1;
this._count = -1;
this._callback = dojo.hitch(_this, callback);
this._fireEventAndReload();
}
},
stop: function(){
// summary:
- // Stop an ongoing timed, repeating callback sequence.
+ // Stop an ongoing timed, repeating callback sequence.
if(this._timer){
clearTimeout(this._timer);
this._timer = null;
}
if(this._obj){
this._callback(-1, this._node, this._evt);
this._obj = null;
}
},
addKeyListener: function(/*DOMNode*/ node, /*Object*/ keyObject, /*Object*/ _this, /*Function*/ callback, /*Number*/ subsequentDelay, /*Number*/ initialDelay){
- // summary: Start listening for a specific typematic key.
- // keyObject: an object defining the key to listen for.
- // key: (mandatory) the keyCode (number) or character (string) to listen for.
- // ctrlKey: desired ctrl key state to initiate the calback sequence:
- // pressed (true)
- // released (false)
- // either (unspecified)
- // altKey: same as ctrlKey but for the alt key
- // shiftKey: same as ctrlKey but for the shift key
- // See the trigger method for other parameters.
- // Returns an array of dojo.connect handles
+ // summary:
+ // Start listening for a specific typematic key.
+ // See also the trigger method for other parameters.
+ // keyObject:
+ // an object defining the key to listen for.
+ // charOrCode:
+ // the printable character (string) or keyCode (number) to listen for.
+ // keyCode:
+ // (deprecated - use charOrCode) the keyCode (number) to listen for (implies charCode = 0).
+ // charCode:
+ // (deprecated - use charOrCode) the charCode (number) to listen for.
+ // ctrlKey:
+ // desired ctrl key state to initiate the calback sequence:
+ // - pressed (true)
+ // - released (false)
+ // - either (unspecified)
+ // altKey:
+ // same as ctrlKey but for the alt key
+ // shiftKey:
+ // same as ctrlKey but for the shift key
+ // returns:
+ // an array of dojo.connect handles
+ if(keyObject.keyCode){
+ keyObject.charOrCode = keyObject.keyCode;
+ dojo.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.", "", "2.0");
+ }else if(keyObject.charCode){
+ keyObject.charOrCode = String.fromCharCode(keyObject.charCode);
+ dojo.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.", "", "2.0");
+ }
return [
dojo.connect(node, "onkeypress", this, function(evt){
- if(evt.keyCode == keyObject.keyCode && (!keyObject.charCode || keyObject.charCode == evt.charCode) &&
+ if(evt.charOrCode == keyObject.charOrCode &&
(keyObject.ctrlKey === undefined || keyObject.ctrlKey == evt.ctrlKey) &&
- (keyObject.altKey === undefined || keyObject.altKey == evt.ctrlKey) &&
- (keyObject.shiftKey === undefined || keyObject.shiftKey == evt.ctrlKey)){
+ (keyObject.altKey === undefined || keyObject.altKey == evt.altKey) &&
+ (keyObject.metaKey === undefined || keyObject.metaKey == (evt.metaKey || false)) && // IE doesn't even set metaKey
+ (keyObject.shiftKey === undefined || keyObject.shiftKey == evt.shiftKey)){
dojo.stopEvent(evt);
dijit.typematic.trigger(keyObject, _this, node, callback, keyObject, subsequentDelay, initialDelay);
}else if(dijit.typematic._obj == keyObject){
dijit.typematic.stop();
}
}),
dojo.connect(node, "onkeyup", this, function(evt){
if(dijit.typematic._obj == keyObject){
dijit.typematic.stop();
}
})
];
},
addMouseListener: function(/*DOMNode*/ node, /*Object*/ _this, /*Function*/ callback, /*Number*/ subsequentDelay, /*Number*/ initialDelay){
- // summary: Start listening for a typematic mouse click.
- // See the trigger method for other parameters.
- // Returns an array of dojo.connect handles
+ // summary:
+ // Start listening for a typematic mouse click.
+ // See the trigger method for other parameters.
+ // returns:
+ // an array of dojo.connect handles
var dc = dojo.connect;
return [
dc(node, "mousedown", this, function(evt){
dojo.stopEvent(evt);
dijit.typematic.trigger(evt, _this, node, callback, node, subsequentDelay, initialDelay);
}),
dc(node, "mouseup", this, function(evt){
dojo.stopEvent(evt);
dijit.typematic.stop();
}),
dc(node, "mouseout", this, function(evt){
dojo.stopEvent(evt);
dijit.typematic.stop();
}),
dc(node, "mousemove", this, function(evt){
dojo.stopEvent(evt);
}),
dc(node, "dblclick", this, function(evt){
dojo.stopEvent(evt);
if(dojo.isIE){
dijit.typematic.trigger(evt, _this, node, callback, node, subsequentDelay, initialDelay);
- setTimeout(dijit.typematic.stop, 50);
+ setTimeout(dojo.hitch(this, dijit.typematic.stop), 50);
}
})
];
},
addListener: function(/*Node*/ mouseNode, /*Node*/ keyNode, /*Object*/ keyObject, /*Object*/ _this, /*Function*/ callback, /*Number*/ subsequentDelay, /*Number*/ initialDelay){
- // summary: Start listening for a specific typematic key and mouseclick.
- // This is a thin wrapper to addKeyListener and addMouseListener.
- // mouseNode: the DOM node object to listen on for mouse events.
- // keyNode: the DOM node object to listen on for key events.
- // See the addMouseListener and addKeyListener methods for other parameters.
- // Returns an array of dojo.connect handles
+ // summary:
+ // Start listening for a specific typematic key and mouseclick.
+ // This is a thin wrapper to addKeyListener and addMouseListener.
+ // See the addMouseListener and addKeyListener methods for other parameters.
+ // mouseNode:
+ // the DOM node object to listen on for mouse events.
+ // keyNode:
+ // the DOM node object to listen on for key events.
+ // returns:
+ // an array of dojo.connect handles
return this.addKeyListener(keyNode, keyObject, _this, callback, subsequentDelay, initialDelay).concat(
this.addMouseListener(mouseNode, _this, callback, subsequentDelay, initialDelay));
}
};
}
if(!dojo._hasResource["dijit._base.wai"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit._base.wai"] = true;
dojo.provide("dijit._base.wai");
dijit.wai = {
onload: function(){
// summary:
- // Function that detects if we are in high-contrast mode or not,
- // and sets up a timer to periodically confirm the value.
- // figure out the background-image style property
- // and apply that to the image.src property.
- // description:
- // This must be a named function and not an anonymous
- // function, so that the widget parsing code can make sure it
- // registers its onload function after this function.
- // DO NOT USE "this" within this function.
+ // Detects if we are in high-contrast mode or not
+
+ // This must be a named function and not an anonymous
+ // function, so that the widget parsing code can make sure it
+ // registers its onload function after this function.
+ // DO NOT USE "this" within this function.
// create div for testing if high contrast mode is on or images are turned off
- var div = document.createElement("div");
- div.id = "a11yTestNode";
- div.style.cssText = 'border: 1px solid;'
- + 'border-color:red green;'
- + 'position: absolute;'
- + 'height: 5px;'
- + 'top: -999px;'
- + 'background-image: url("' + dojo.moduleUrl("dijit", "form/templates/blank.gif") + '");';
- dojo.body().appendChild(div);
+ var div = dojo.create("div",{
+ id: "a11yTestNode",
+ style:{
+ cssText:'border: 1px solid;'
+ + 'border-color:red green;'
+ + 'position: absolute;'
+ + 'height: 5px;'
+ + 'top: -999px;'
+ + 'background-image: url("' + (dojo.config.blankGif || dojo.moduleUrl("dojo", "resources/blank.gif")) + '");'
+ }
+ }, dojo.body());
// test it
- function check(){
- var cs = dojo.getComputedStyle(div);
- if(cs){
- var bkImg = cs.backgroundImage;
- var needsA11y = (cs.borderTopColor==cs.borderRightColor) || (bkImg != null && (bkImg == "none" || bkImg == "url(invalid-url:)" ));
- dojo[needsA11y ? "addClass" : "removeClass"](dojo.body(), "dijit_a11y");
+ var cs = dojo.getComputedStyle(div);
+ if(cs){
+ var bkImg = cs.backgroundImage;
+ var needsA11y = (cs.borderTopColor == cs.borderRightColor) || (bkImg != null && (bkImg == "none" || bkImg == "url(invalid-url:)" ));
+ dojo[needsA11y ? "addClass" : "removeClass"](dojo.body(), "dijit_a11y");
+ if(dojo.isIE){
+ div.outerHTML = ""; // prevent mixed-content warning, see http://support.microsoft.com/kb/925014
+ }else{
+ dojo.body().removeChild(div);
}
}
- check();
- if(dojo.isIE){
- setInterval(check, 4000);
- }
}
};
// Test if computer is in high contrast mode.
// Make sure the a11y test runs first, before widgets are instantiated.
if(dojo.isIE || dojo.isMoz){ // NOTE: checking in Safari messes things up
dojo._loaders.unshift(dijit.wai.onload);
}
-dojo.mixin(dijit,
-{
- hasWaiRole: function(/*Element*/ elem){
- // Summary: Return true if elem has a role attribute and false if not.
- if(elem.hasAttribute){
- return elem.hasAttribute("role");
- }else{
- return elem.getAttribute("role") ? true : false;
- }
+dojo.mixin(dijit, {
+ _XhtmlRoles: /banner|contentinfo|definition|main|navigation|search|note|secondary|seealso/,
+
+ hasWaiRole: function(/*Element*/ elem, /*String*/ role){
+ // summary:
+ // Determines if an element has a particular non-XHTML role.
+ // returns:
+ // True if elem has the specific non-XHTML role attribute and false if not.
+ // For backwards compatibility if role parameter not provided,
+ // returns true if has non XHTML role
+ var waiRole = this.getWaiRole(elem);
+ return role ? (waiRole.indexOf(role) > -1) : (waiRole.length > 0);
},
getWaiRole: function(/*Element*/ elem){
- // Summary: Return the role of elem or an empty string if
- // elem does not have a role.
- var value = elem.getAttribute("role");
- if(value){
- var prefixEnd = value.indexOf(":");
- return prefixEnd == -1 ? value : value.substring(prefixEnd+1);
- }else{
- return "";
- }
+ // summary:
+ // Gets the non-XHTML role for an element (which should be a wai role).
+ // returns:
+ // The non-XHTML role of elem or an empty string if elem
+ // does not have a role.
+ return dojo.trim((dojo.attr(elem, "role") || "").replace(this._XhtmlRoles,"").replace("wairole:",""));
},
setWaiRole: function(/*Element*/ elem, /*String*/ role){
- // Summary: Set the role on elem. On Firefox 2 and below, "wairole:" is
- // prepended to the provided role value.
- if(dojo.isFF && dojo.isFF < 3){
- elem.setAttribute("role", "wairole:"+role);
+ // summary:
+ // Sets the role on an element.
+ // description:
+ // Replace existing role attribute with new role.
+ // If elem already has an XHTML role, append this role to XHTML role
+ // and remove other ARIA roles.
+
+ var curRole = dojo.attr(elem, "role") || "";
+ if(!this._XhtmlRoles.test(curRole)){
+ dojo.attr(elem, "role", role);
}else{
- elem.setAttribute("role", role);
+ if((" "+ curRole +" ").indexOf(" " + role + " ") < 0){
+ var clearXhtml = dojo.trim(curRole.replace(this._XhtmlRoles, ""));
+ var cleanRole = dojo.trim(curRole.replace(clearXhtml, ""));
+ dojo.attr(elem, "role", cleanRole + (cleanRole ? ' ' : '') + role);
+ }
}
},
- removeWaiRole: function(/*Element*/ elem){
- // Summary: Removes the role attribute from elem.
- elem.removeAttribute("role");
+ removeWaiRole: function(/*Element*/ elem, /*String*/ role){
+ // summary:
+ // Removes the specified non-XHTML role from an element.
+ // Removes role attribute if no specific role provided (for backwards compat.)
+
+ var roleValue = dojo.attr(elem, "role");
+ if(!roleValue){ return; }
+ if(role){
+ var t = dojo.trim((" " + roleValue + " ").replace(" " + role + " ", " "));
+ dojo.attr(elem, "role", t);
+ }else{
+ elem.removeAttribute("role");
+ }
},
hasWaiState: function(/*Element*/ elem, /*String*/ state){
- // Summary: Return true if elem has a value for the given state and
+ // summary:
+ // Determines if an element has a given state.
+ // description:
+ // Checks for an attribute called "aria-"+state.
+ // returns:
+ // true if elem has a value for the given state and
// false if it does not.
- // On Firefox 2 and below, we check for an attribute in namespace
- // "http://www.w3.org/2005/07/aaa" with a name of the given state.
- // On all other browsers, we check for an attribute called
- // "aria-"+state.
- if(dojo.isFF && dojo.isFF < 3){
- return elem.hasAttributeNS("http://www.w3.org/2005/07/aaa", state);
- }else{
- if(elem.hasAttribute){
- return elem.hasAttribute("aria-"+state);
- }else{
- return elem.getAttribute("aria-"+state) ? true : false;
- }
- }
+
+ return elem.hasAttribute ? elem.hasAttribute("aria-"+state) : !!elem.getAttribute("aria-"+state);
},
getWaiState: function(/*Element*/ elem, /*String*/ state){
- // Summary: Return the value of the requested state on elem
+ // summary:
+ // Gets the value of a state on an element.
+ // description:
+ // Checks for an attribute called "aria-"+state.
+ // returns:
+ // The value of the requested state on elem
// or an empty string if elem has no value for state.
- // On Firefox 2 and below, we check for an attribute in namespace
- // "http://www.w3.org/2005/07/aaa" with a name of the given state.
- // On all other browsers, we check for an attribute called
- // "aria-"+state.
- if(dojo.isFF && dojo.isFF < 3){
- return elem.getAttributeNS("http://www.w3.org/2005/07/aaa", state);
- }else{
- var value = elem.getAttribute("aria-"+state);
- return value ? value : "";
- }
+
+ return elem.getAttribute("aria-"+state) || "";
},
setWaiState: function(/*Element*/ elem, /*String*/ state, /*String*/ value){
- // Summary: Set state on elem to value.
- // On Firefox 2 and below, we set an attribute in namespace
- // "http://www.w3.org/2005/07/aaa" with a name of the given state.
- // On all other browsers, we set an attribute called
- // "aria-"+state.
- if(dojo.isFF && dojo.isFF < 3){
- elem.setAttributeNS("http://www.w3.org/2005/07/aaa",
- "aaa:"+state, value);
- }else{
- elem.setAttribute("aria-"+state, value);
- }
+ // summary:
+ // Sets a state on an element.
+ // description:
+ // Sets an attribute called "aria-"+state.
+
+ elem.setAttribute("aria-"+state, value);
},
removeWaiState: function(/*Element*/ elem, /*String*/ state){
- // Summary: Removes the given state from elem.
- // On Firefox 2 and below, we remove the attribute in namespace
- // "http://www.w3.org/2005/07/aaa" with a name of the given state.
- // On all other browsers, we remove the attribute called
- // "aria-"+state.
- if(dojo.isFF && dojo.isFF < 3){
- elem.removeAttributeNS("http://www.w3.org/2005/07/aaa", state);
- }else{
- elem.removeAttribute("aria-"+state);
- }
+ // summary:
+ // Removes a state from an element.
+ // description:
+ // Sets an attribute called "aria-"+state.
+
+ elem.removeAttribute("aria-"+state);
}
});
}
if(!dojo._hasResource["dijit._base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit._base"] = true;
dojo.provide("dijit._base");
-
}
if(!dojo._hasResource["dojo.date.stamp"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo.date.stamp"] = true;
dojo.provide("dojo.date.stamp");
// Methods to convert dates to or from a wire (string) format using well-known conventions
dojo.date.stamp.fromISOString = function(/*String*/formattedString, /*Number?*/defaultTime){
// summary:
// Returns a Date object given a string formatted according to a subset of the ISO-8601 standard.
//
// description:
// Accepts a string formatted according to a profile of ISO8601 as defined by
- // RFC3339 (http://www.ietf.org/rfc/rfc3339.txt), except that partial input is allowed.
- // Can also process dates as specified by http://www.w3.org/TR/NOTE-datetime
+ // [RFC3339](http://www.ietf.org/rfc/rfc3339.txt), except that partial input is allowed.
+ // Can also process dates as specified [by the W3C](http://www.w3.org/TR/NOTE-datetime)
// The following combinations are valid:
- // * dates only
- // yyyy
- // yyyy-MM
- // yyyy-MM-dd
+ //
+ // * dates only
+ // | * yyyy
+ // | * yyyy-MM
+ // | * yyyy-MM-dd
// * times only, with an optional time zone appended
- // THH:mm
- // THH:mm:ss
- // THH:mm:ss.SSS
+ // | * THH:mm
+ // | * THH:mm:ss
+ // | * THH:mm:ss.SSS
// * and "datetimes" which could be any combination of the above
+ //
// timezones may be specified as Z (for UTC) or +/- followed by a time expression HH:mm
// Assumes the local time zone if not specified. Does not validate. Improperly formatted
// input may return null. Arguments which are out of bounds will be handled
// by the Date constructor (e.g. January 32nd typically gets resolved to February 1st)
+ // Only years between 100 and 9999 are supported.
//
// formattedString:
// A string such as 2005-06-30T08:05:00-07:00 or 2005-06-30 or T08:05:00
//
// defaultTime:
// Used for defaults for fields omitted in the formattedString.
// Uses 1970-01-01T00:00:00.0Z by default.
if(!dojo.date.stamp._isoRegExp){
dojo.date.stamp._isoRegExp =
//TODO: could be more restrictive and check for 00-59, etc.
/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;
}
- var match = dojo.date.stamp._isoRegExp.exec(formattedString);
- var result = null;
+ var match = dojo.date.stamp._isoRegExp.exec(formattedString),
+ result = null;
if(match){
match.shift();
- match[1] && match[1]--; // Javascript Date months are 0-based
- match[6] && (match[6] *= 1000); // Javascript Date expects fractional seconds as milliseconds
+ if(match[1]){match[1]--;} // Javascript Date months are 0-based
+ if(match[6]){match[6] *= 1000;} // Javascript Date expects fractional seconds as milliseconds
if(defaultTime){
// mix in defaultTime. Relatively expensive, so use || operators for the fast path of defaultTime === 0
defaultTime = new Date(defaultTime);
dojo.map(["FullYear", "Month", "Date", "Hours", "Minutes", "Seconds", "Milliseconds"], function(prop){
return defaultTime["get" + prop]();
}).forEach(function(value, index){
if(match[index] === undefined){
match[index] = value;
}
});
}
- result = new Date(match[0]||1970, match[1]||0, match[2]||0, match[3]||0, match[4]||0, match[5]||0, match[6]||0);
-
- var offset = 0;
- var zoneSign = match[7] && match[7].charAt(0);
+ result = new Date(match[0]||1970, match[1]||0, match[2]||1, match[3]||0, match[4]||0, match[5]||0, match[6]||0); //TODO: UTC defaults
+ if(match[0] < 100){
+ result.setFullYear(match[0] || 1970);
+ }
+
+ var offset = 0,
+ zoneSign = match[7] && match[7].charAt(0);
if(zoneSign != 'Z'){
offset = ((match[8] || 0) * 60) + (Number(match[9]) || 0);
if(zoneSign != '-'){ offset *= -1; }
}
if(zoneSign){
offset -= result.getTimezoneOffset();
}
if(offset){
result.setTime(result.getTime() + offset * 60000);
}
}
return result; // Date or null
}
-dojo.date.stamp.toISOString = function(/*Date*/dateObject, /*Object?*/options){
+/*=====
+ dojo.date.stamp.__Options = function(){
+ // selector: String
+ // "date" or "time" for partial formatting of the Date object.
+ // Both date and time will be formatted by default.
+ // zulu: Boolean
+ // if true, UTC/GMT is used for a timezone
+ // milliseconds: Boolean
+ // if true, output milliseconds
+ this.selector = selector;
+ this.zulu = zulu;
+ this.milliseconds = milliseconds;
+ }
+=====*/
+
+dojo.date.stamp.toISOString = function(/*Date*/dateObject, /*dojo.date.stamp.__Options?*/options){
// summary:
// Format a Date object as a string according a subset of the ISO-8601 standard
//
// description:
- // When options.selector is omitted, output follows RFC3339 (http://www.ietf.org/rfc/rfc3339.txt)
+ // When options.selector is omitted, output follows [RFC3339](http://www.ietf.org/rfc/rfc3339.txt)
// The local time zone is included as an offset from GMT, except when selector=='time' (time without a date)
- // Does not check bounds.
+ // Does not check bounds. Only years between 100 and 9999 are supported.
//
// dateObject:
// A Date object
- //
- // object {selector: string, zulu: boolean, milliseconds: boolean}
- // selector- "date" or "time" for partial formatting of the Date object.
- // Both date and time will be formatted by default.
- // zulu- if true, UTC/GMT is used for a timezone
- // milliseconds- if true, output milliseconds
-
- var _ = function(n){ return (n < 10) ? "0" + n : n; }
+
+ var _ = function(n){ return (n < 10) ? "0" + n : n; };
options = options || {};
- var formattedDate = [];
- var getter = options.zulu ? "getUTC" : "get";
- var date = "";
+ var formattedDate = [],
+ getter = options.zulu ? "getUTC" : "get",
+ date = "";
if(options.selector != "time"){
- date = [dateObject[getter+"FullYear"](), _(dateObject[getter+"Month"]()+1), _(dateObject[getter+"Date"]())].join('-');
+ var year = dateObject[getter+"FullYear"]();
+ date = ["0000".substr((year+"").length)+year, _(dateObject[getter+"Month"]()+1), _(dateObject[getter+"Date"]())].join('-');
}
formattedDate.push(date);
if(options.selector != "date"){
var time = [_(dateObject[getter+"Hours"]()), _(dateObject[getter+"Minutes"]()), _(dateObject[getter+"Seconds"]())].join(':');
var millis = dateObject[getter+"Milliseconds"]();
if(options.milliseconds){
time += "."+ (millis < 100 ? "0" : "") + _(millis);
}
if(options.zulu){
time += "Z";
}else if(options.selector != "time"){
var timezoneOffset = dateObject.getTimezoneOffset();
var absOffset = Math.abs(timezoneOffset);
time += (timezoneOffset > 0 ? "-" : "+") +
_(Math.floor(absOffset/60)) + ":" + _(absOffset%60);
}
formattedDate.push(time);
}
return formattedDate.join('T'); // String
}
}
if(!dojo._hasResource["dojo.parser"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo.parser"] = true;
dojo.provide("dojo.parser");
dojo.parser = new function(){
+ // summary: The Dom/Widget parsing package
var d = dojo;
+ this._attrName = d._scopeName + "Type";
+ this._query = "[" + this._attrName + "]";
function val2type(/*Object*/ value){
// summary:
// Returns name of type of given value.
if(d.isString(value)){ return "string"; }
if(typeof value == "number"){ return "number"; }
if(typeof value == "boolean"){ return "boolean"; }
if(d.isFunction(value)){ return "function"; }
if(d.isArray(value)){ return "array"; } // typeof [] == "object"
if(value instanceof Date) { return "date"; } // assume timestamp
if(value instanceof d._Url){ return "url"; }
return "object";
}
function str2obj(/*String*/ value, /*String*/ type){
// summary:
// Convert given string value to given type
switch(type){
case "string":
return value;
case "number":
return value.length ? Number(value) : NaN;
case "boolean":
// for checked/disabled value might be "" or "checked". interpret as true.
return typeof value == "boolean" ? value : !(value.toLowerCase()=="false");
case "function":
if(d.isFunction(value)){
// IE gives us a function, even when we say something like onClick="foo"
// (in which case it gives us an invalid function "function(){ foo }").
// Therefore, convert to string
value=value.toString();
value=d.trim(value.substring(value.indexOf('{')+1, value.length-1));
}
try{
if(value.search(/[^\w\.]+/i) != -1){
- // TODO: "this" here won't work
- value = d.parser._nameAnonFunc(new Function(value), this);
+ // The user has specified some text for a function like "return x+5"
+ return new Function(value);
+ }else{
+ // The user has specified the name of a function like "myOnClick"
+ return d.getObject(value, false);
}
- return d.getObject(value, false);
}catch(e){ return new Function(); }
case "array":
- return value.split(/\s*,\s*/);
+ return value ? value.split(/\s*,\s*/) : [];
case "date":
switch(value){
case "": return new Date(""); // the NaN of dates
case "now": return new Date(); // current date
default: return d.date.stamp.fromISOString(value);
}
case "url":
return d.baseUrl + value;
default:
return d.fromJson(value);
}
}
var instanceClasses = {
// map from fully qualified name (like "dijit.Button") to structure like
// { cls: dijit.Button, params: {label: "string", disabled: "boolean"} }
};
-
+
+ // Widgets like BorderContainer add properties to _Widget via dojo.extend().
+ // If BorderContainer is loaded after _Widget's parameter list has been cached,
+ // we need to refresh that parameter list (for _Widget and all widgets that extend _Widget).
+ dojo.connect(dojo, "extend", function(){
+ instanceClasses = {};
+ });
+
function getClassInfo(/*String*/ className){
// className:
- // fully qualified name (like "dijit.Button")
+ // fully qualified name (like "dijit.form.Button")
// returns:
// structure like
// {
// cls: dijit.Button,
// params: { label: "string", disabled: "boolean"}
// }
if(!instanceClasses[className]){
// get pointer to widget class
var cls = d.getObject(className);
if(!d.isFunction(cls)){
throw new Error("Could not load class '" + className +
"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");
}
var proto = cls.prototype;
// get table of parameter names & types
- var params={};
+ var params = {}, dummyClass = {};
for(var name in proto){
if(name.charAt(0)=="_"){ continue; } // skip internal properties
+ if(name in dummyClass){ continue; } // skip "constructor" and "toString"
var defVal = proto[name];
params[name]=val2type(defVal);
}
instanceClasses[className] = { cls: cls, params: params };
}
return instanceClasses[className];
}
this._functionFromScript = function(script){
var preamble = "";
var suffix = "";
var argsStr = script.getAttribute("args");
if(argsStr){
d.forEach(argsStr.split(/\s*,\s*/), function(part, idx){
preamble += "var "+part+" = arguments["+idx+"]; ";
});
}
var withStr = script.getAttribute("with");
if(withStr && withStr.length){
d.forEach(withStr.split(/\s*,\s*/), function(part){
preamble += "with("+part+"){";
suffix += "}";
});
}
return new Function(preamble+script.innerHTML+suffix);
}
- this.instantiate = function(/* Array */nodes){
+ this.instantiate = function(/* Array */nodes, /* Object? */mixin, /* Object? */args){
// summary:
// Takes array of nodes, and turns them into class instances and
// potentially calls a layout method to allow them to connect with
// any children
- var thelist = [];
+ // mixin: Object?
+ // An object that will be mixed in with each node in the array.
+ // Values in the mixin will override values in the node, if they
+ // exist.
+ // args: Object?
+ // An object used to hold kwArgs for instantiation.
+ // Only supports 'noStart' currently.
+ var thelist = [], dp = dojo.parser;
+ mixin = mixin||{};
+ args = args||{};
+
d.forEach(nodes, function(node){
if(!node){ return; }
- var type = node.getAttribute("dojoType");
- if((!type)||(!type.length)){ return; }
- var clsInfo = getClassInfo(type);
- var clazz = clsInfo.cls;
- var ps = clazz._noScript||clazz.prototype._noScript;
+ var type = dp._attrName in mixin?mixin[dp._attrName]:node.getAttribute(dp._attrName);
+ if(!type || !type.length){ return; }
+ var clsInfo = getClassInfo(type),
+ clazz = clsInfo.cls,
+ ps = clazz._noScript || clazz.prototype._noScript;
// read parameters (ie, attributes).
// clsInfo.params lists expected params like {"checked": "boolean", "n": "number"}
- var params = {};
- var attributes = node.attributes;
+ var params = {},
+ attributes = node.attributes;
for(var name in clsInfo.params){
- var item = attributes.getNamedItem(name);
+ var item = name in mixin?{value:mixin[name],specified:true}:attributes.getNamedItem(name);
if(!item || (!item.specified && (!dojo.isIE || name.toLowerCase()!="value"))){ continue; }
var value = item.value;
// Deal with IE quirks for 'class' and 'style'
switch(name){
case "class":
- value = node.className;
+ value = "className" in mixin?mixin.className:node.className;
break;
case "style":
- value = node.style && node.style.cssText; // FIXME: Opera?
+ value = "style" in mixin?mixin.style:(node.style && node.style.cssText); // FIXME: Opera?
}
var _type = clsInfo.params[name];
- params[name] = str2obj(value, _type);
+ if(typeof value == "string"){
+ params[name] = str2obj(value, _type);
+ }else{
+ params[name] = value;
+ }
}
// Process <script type="dojo/*"> script tags
// <script type="dojo/method" event="foo"> tags are added to params, and passed to
// the widget on instantiation.
// <script type="dojo/method"> tags (with no event) are executed after instantiation
// <script type="dojo/connect" event="foo"> tags are dojo.connected after instantiation
+ // note: dojo/* script tags cannot exist in self closing widgets, like <input />
if(!ps){
var connects = [], // functions to connect after instantiation
calls = []; // functions to call after instantiation
d.query("> script[type^='dojo/']", node).orphan().forEach(function(script){
var event = script.getAttribute("event"),
type = script.getAttribute("type"),
nf = d.parser._functionFromScript(script);
if(event){
if(type == "dojo/connect"){
connects.push({event: event, func: nf});
}else{
params[event] = nf;
}
}else{
calls.push(nf);
}
});
}
- var markupFactory = clazz["markupFactory"];
- if(!markupFactory && clazz["prototype"]){
- markupFactory = clazz.prototype["markupFactory"];
- }
+ var markupFactory = clazz.markupFactory || clazz.prototype && clazz.prototype.markupFactory;
// create the instance
var instance = markupFactory ? markupFactory(params, node, clazz) : new clazz(params, node);
thelist.push(instance);
// map it to the JS namespace if that makes sense
var jsname = node.getAttribute("jsId");
if(jsname){
d.setObject(jsname, instance);
}
// process connections and startup functions
if(!ps){
- dojo.forEach(connects, function(connect){
- dojo.connect(instance, connect.event, null, connect.func);
+ d.forEach(connects, function(connect){
+ d.connect(instance, connect.event, null, connect.func);
});
- dojo.forEach(calls, function(func){
+ d.forEach(calls, function(func){
func.call(instance);
});
}
});
// Call startup on each top level instance if it makes sense (as for
// widgets). Parent widgets will recursively call startup on their
// (non-top level) children
- d.forEach(thelist, function(instance){
- if( instance &&
- (instance.startup) &&
- ((!instance.getParent) || (!instance.getParent()))
- ){
- instance.startup();
- }
- });
+ if(!mixin._started){
+ d.forEach(thelist, function(instance){
+ if( !args.noStart && instance &&
+ instance.startup &&
+ !instance._started &&
+ (!instance.getParent || !instance.getParent())
+ ){
+ instance.startup();
+ }
+ });
+ }
return thelist;
};
- this.parse = function(/*DomNode?*/ rootNode){
+ this.parse = function(/*DomNode?*/ rootNode, /* Object? */ args){
// summary:
+ // Scan the DOM for class instances, and instantiate them.
+ //
+ // description:
// Search specified node (or root node) recursively for class instances,
// and instantiate them Searches for
// dojoType="qualified.class.name"
- var list = d.query('[dojoType]', rootNode);
- // go build the object instances
- var instances = this.instantiate(list);
- return instances;
+ //
+ // rootNode: DomNode?
+ // A default starting root node from which to start the parsing. Can be
+ // omitted, defaulting to the entire document. If omitted, the `args`
+ // object can be passed in this place. If the `args` object has a
+ // `rootNode` member, that is used.
+ //
+ // args:
+ // a kwArgs object passed along to instantiate()
+ //
+ // * noStart: Boolean?
+ // when set will prevent the parser from calling .startup()
+ // when locating the nodes.
+ // * rootNode: DomNode?
+ // identical to the function's `rootNode` argument, though
+ // allowed to be passed in via this `args object.
+ //
+ // example:
+ // Parse all widgets on a page:
+ // | dojo.parser.parse();
+ //
+ // example:
+ // Parse all classes within the node with id="foo"
+ // | dojo.parser.parse(dojo.byId(foo));
+ //
+ // example:
+ // Parse all classes in a page, but do not call .startup() on any
+ // child
+ // | dojo.parser.parse({ noStart: true })
+ //
+ // example:
+ // Parse all classes in a node, but do not call .startup()
+ // | dojo.parser.parse(someNode, { noStart:true });
+ // | // or
+ // | dojo.parser.parse({ noStart:true, rootNode: someNode });
+
+ // determine the root node based on the passed arguments.
+ var root;
+ if(!args && rootNode && rootNode.rootNode){
+ args = rootNode;
+ root = args.rootNode;
+ }else{
+ root = rootNode;
+ }
+
+ var list = d.query(this._query, root);
+ // go build the object instances
+ return this.instantiate(list, null, args); // Array
+
};
}();
//Register the parser callback. It should be the first callback
//after the a11y test.
(function(){
var parseRunner = function(){
- if(djConfig["parseOnLoad"] == true){
+ if(dojo.config.parseOnLoad){
dojo.parser.parse();
}
};
// FIXME: need to clobber cross-dependency!!
if(dojo.exists("dijit.wai.onload") && (dijit.wai.onload === dojo._loaders[0])){
dojo._loaders.splice(1, 0, parseRunner);
}else{
dojo._loaders.unshift(parseRunner);
}
})();
-//TODO: ported from 0.4.x Dojo. Can we reduce this?
-dojo.parser._anonCtr = 0;
-dojo.parser._anon = {}; // why is this property required?
-dojo.parser._nameAnonFunc = function(/*Function*/anonFuncPtr, /*Object*/thisObj){
- // summary:
- // Creates a reference to anonFuncPtr in thisObj with a completely
- // unique name. The new name is returned as a String.
- var jpn = "$joinpoint";
- var nso = (thisObj|| dojo.parser._anon);
- if(dojo.isIE){
- var cn = anonFuncPtr["__dojoNameCache"];
- if(cn && nso[cn] === anonFuncPtr){
- return anonFuncPtr["__dojoNameCache"];
- }
- }
- var ret = "__"+dojo.parser._anonCtr++;
- while(typeof nso[ret] != "undefined"){
- ret = "__"+dojo.parser._anonCtr++;
- }
- nso[ret] = anonFuncPtr;
- return ret; // String
-}
-
}
if(!dojo._hasResource["dijit._Widget"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit._Widget"] = true;
dojo.provide("dijit._Widget");
-
+dojo.require( "dijit._base" );
+
+
+// This code is to assist deferring dojo.connect() calls in widgets (connecting to events on the widgets'
+// DOM nodes) until someone actually needs to monitor that event.
+dojo.connect(dojo, "_connect",
+ function(/*dijit._Widget*/ widget, /*String*/ event){
+ if(widget && dojo.isFunction(widget._onConnect)){
+ widget._onConnect(event);
+ }
+ });
+
+dijit._connectOnUseEventHandler = function(/*Event*/ event){};
+
+// Keep track of where the last keydown event was, to help avoid generating
+// spurious ondijitclick events when:
+// 1. focus is on a <button> or <a>
+// 2. user presses then releases the ENTER key
+// 3. onclick handler fires and shifts focus to another node, with an ondijitclick handler
+// 4. onkeyup event fires, causing the ondijitclick handler to fire
+dijit._lastKeyDownNode = null;
+if(dojo.isIE){
+ (function(){
+ var keydownCallback = function(evt){
+ dijit._lastKeyDownNode = evt.srcElement;
+ };
+ dojo.doc.attachEvent('onkeydown', keydownCallback);
+ dojo.addOnWindowUnload(function(){
+ dojo.doc.detachEvent('onkeydown', keydownCallback);
+ });
+ })();
+}else{
+ dojo.doc.addEventListener('keydown', function(evt){
+ dijit._lastKeyDownNode = evt.target;
+ }, true);
+}
+
+(function(){
+
+var _attrReg = {}, // cached results from getSetterAttributes
+ getSetterAttributes = function(widget){
+ // summary:
+ // Returns list of attributes with custom setters for specified widget
+ var dc = widget.declaredClass;
+ if(!_attrReg[dc]){
+ var r = [],
+ attrs,
+ proto = widget.constructor.prototype;
+ for(var fxName in proto){
+ if(dojo.isFunction(proto[fxName]) && (attrs = fxName.match(/^_set([a-zA-Z]*)Attr$/)) && attrs[1]){
+ r.push(attrs[1].charAt(0).toLowerCase() + attrs[1].substr(1));
+ }
+ }
+ _attrReg[dc] = r;
+ }
+ return _attrReg[dc] || []; // String[]
+ };
dojo.declare("dijit._Widget", null, {
// summary:
- // The foundation of dijit widgets.
- //
- // id: String
- // a unique, opaque ID string that can be assigned by users or by the
+ // Base class for all Dijit widgets.
+
+ // id: [const] String
+ // A unique, opaque ID string that can be assigned by users or by the
// system. If the developer passes an ID which is known not to be
// unique, the specified ID is ignored and the system-generated ID is
// used instead.
id: "",
- // lang: String
- // Language to display this widget in (like en-us).
- // Defaults to brower's specified preferred language (typically the language of the OS)
+ // lang: [const] String
+ // Rarely used. Overrides the default Dojo locale used to render this widget,
+ // as defined by the [HTML LANG](http://www.w3.org/TR/html401/struct/dirlang.html#adef-lang) attribute.
+ // Value must be among the list of locales specified during by the Dojo bootstrap,
+ // formatted according to [RFC 3066](http://www.ietf.org/rfc/rfc3066.txt) (like en-us).
lang: "",
- // dir: String
- // Bi-directional support, as defined by the HTML DIR attribute. Either left-to-right "ltr" or right-to-left "rtl".
+ // dir: [const] String
+ // Unsupported by Dijit, but here for completeness. Dijit only supports setting text direction on the
+ // entire document.
+ // Bi-directional support, as defined by the [HTML DIR](http://www.w3.org/TR/html401/struct/dirlang.html#adef-dir)
+ // attribute. Either left-to-right "ltr" or right-to-left "rtl".
dir: "",
// class: String
- // HTML class attribute
+ // HTML class attribute
"class": "",
- // style: String
- // HTML style attribute
+ // style: String||Object
+ // HTML style attributes as cssText string or name/value hash
style: "",
// title: String
- // HTML title attribute
+ // HTML title attribute.
+ //
+ // For form widgets this specifies a tooltip to display when hovering over
+ // the widget (just like the native HTML title attribute).
+ //
+ // For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer,
+ // etc., it's used to specify the tab label, accordion pane title, etc.
title: "",
- // srcNodeRef: DomNode
- // pointer to original dom node
+ // tooltip: String
+ // When this widget's title attribute is used to for a tab label, accordion pane title, etc.,
+ // this specifies the tooltip to appear when the mouse is hovered over that text.
+ tooltip: "",
+
+ // srcNodeRef: [readonly] DomNode
+ // pointer to original DOM node
srcNodeRef: null,
- // domNode: DomNode
- // this is our visible representation of the widget! Other DOM
+ // domNode: [readonly] DomNode
+ // This is our visible representation of the widget! Other DOM
// Nodes may by assigned to other properties, usually through the
- // template system's dojoAttachPonit syntax, but the domNode
+ // template system's dojoAttachPoint syntax, but the domNode
// property is the canonical "top level" node in widget UI.
domNode: null,
- // attributeMap: Object
- // A map of attributes and attachpoints -- typically standard HTML attributes -- to set
- // on the widget's dom, at the "domNode" attach point, by default.
- // Other node references can be specified as properties of 'this'
- attributeMap: {id:"", dir:"", lang:"", "class":"", style:"", title:""}, // TODO: add on* handlers?
+ // containerNode: [readonly] DomNode
+ // Designates where children of the source DOM node will be placed.
+ // "Children" in this case refers to both DOM nodes and widgets.
+ // For example, for myWidget:
+ //
+ // | <div dojoType=myWidget>
+ // | <b> here's a plain DOM node
+ // | <span dojoType=subWidget>and a widget</span>
+ // | <i> and another plain DOM node </i>
+ // | </div>
+ //
+ // containerNode would point to:
+ //
+ // | <b> here's a plain DOM node
+ // | <span dojoType=subWidget>and a widget</span>
+ // | <i> and another plain DOM node </i>
+ //
+ // In templated widgets, "containerNode" is set via a
+ // dojoAttachPoint assignment.
+ //
+ // containerNode must be defined for any widget that accepts innerHTML
+ // (like ContentPane or BorderContainer or even Button), and conversely
+ // is null for widgets that don't, like TextBox.
+ containerNode: null,
+
+/*=====
+ // _started: Boolean
+ // startup() has completed.
+ _started: false,
+=====*/
+
+ // attributeMap: [protected] Object
+ // attributeMap sets up a "binding" between attributes (aka properties)
+ // of the widget and the widget's DOM.
+ // Changes to widget attributes listed in attributeMap will be
+ // reflected into the DOM.
+ //
+ // For example, calling attr('title', 'hello')
+ // on a TitlePane will automatically cause the TitlePane's DOM to update
+ // with the new title.
+ //
+ // attributeMap is a hash where the key is an attribute of the widget,
+ // and the value reflects a binding to a:
+ //
+ // - DOM node attribute
+ // | focus: {node: "focusNode", type: "attribute"}
+ // Maps this.focus to this.focusNode.focus
+ //
+ // - DOM node innerHTML
+ // | title: { node: "titleNode", type: "innerHTML" }
+ // Maps this.title to this.titleNode.innerHTML
+ //
+ // - DOM node innerText
+ // | title: { node: "titleNode", type: "innerText" }
+ // Maps this.title to this.titleNode.innerText
+ //
+ // - DOM node CSS class
+ // | myClass: { node: "domNode", type: "class" }
+ // Maps this.myClass to this.domNode.className
+ //
+ // If the value is an array, then each element in the array matches one of the
+ // formats of the above list.
+ //
+ // There are also some shorthands for backwards compatibility:
+ // - string --> { node: string, type: "attribute" }, for example:
+ // | "focusNode" ---> { node: "focusNode", type: "attribute" }
+ // - "" --> { node: "domNode", type: "attribute" }
+ attributeMap: {id:"", dir:"", lang:"", "class":"", style:"", title:""},
+
+ // _deferredConnects: [protected] Object
+ // attributeMap addendum for event handlers that should be connected only on first use
+ _deferredConnects: {
+ onClick: "",
+ onDblClick: "",
+ onKeyDown: "",
+ onKeyPress: "",
+ onKeyUp: "",
+ onMouseMove: "",
+ onMouseDown: "",
+ onMouseOut: "",
+ onMouseOver: "",
+ onMouseLeave: "",
+ onMouseEnter: "",
+ onMouseUp: ""
+ },
+
+ onClick: dijit._connectOnUseEventHandler,
+ /*=====
+ onClick: function(event){
+ // summary:
+ // Connect to this function to receive notifications of mouse click events.
+ // event:
+ // mouse Event
+ // tags:
+ // callback
+ },
+ =====*/
+ onDblClick: dijit._connectOnUseEventHandler,
+ /*=====
+ onDblClick: function(event){
+ // summary:
+ // Connect to this function to receive notifications of mouse double click events.
+ // event:
+ // mouse Event
+ // tags:
+ // callback
+ },
+ =====*/
+ onKeyDown: dijit._connectOnUseEventHandler,
+ /*=====
+ onKeyDown: function(event){
+ // summary:
+ // Connect to this function to receive notifications of keys being pressed down.
+ // event:
+ // key Event
+ // tags:
+ // callback
+ },
+ =====*/
+ onKeyPress: dijit._connectOnUseEventHandler,
+ /*=====
+ onKeyPress: function(event){
+ // summary:
+ // Connect to this function to receive notifications of printable keys being typed.
+ // event:
+ // key Event
+ // tags:
+ // callback
+ },
+ =====*/
+ onKeyUp: dijit._connectOnUseEventHandler,
+ /*=====
+ onKeyUp: function(event){
+ // summary:
+ // Connect to this function to receive notifications of keys being released.
+ // event:
+ // key Event
+ // tags:
+ // callback
+ },
+ =====*/
+ onMouseDown: dijit._connectOnUseEventHandler,
+ /*=====
+ onMouseDown: function(event){
+ // summary:
+ // Connect to this function to receive notifications of when the mouse button is pressed down.
+ // event:
+ // mouse Event
+ // tags:
+ // callback
+ },
+ =====*/
+ onMouseMove: dijit._connectOnUseEventHandler,
+ /*=====
+ onMouseMove: function(event){
+ // summary:
+ // Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget.
+ // event:
+ // mouse Event
+ // tags:
+ // callback
+ },
+ =====*/
+ onMouseOut: dijit._connectOnUseEventHandler,
+ /*=====
+ onMouseOut: function(event){
+ // summary:
+ // Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget.
+ // event:
+ // mouse Event
+ // tags:
+ // callback
+ },
+ =====*/
+ onMouseOver: dijit._connectOnUseEventHandler,
+ /*=====
+ onMouseOver: function(event){
+ // summary:
+ // Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget.
+ // event:
+ // mouse Event
+ // tags:
+ // callback
+ },
+ =====*/
+ onMouseLeave: dijit._connectOnUseEventHandler,
+ /*=====
+ onMouseLeave: function(event){
+ // summary:
+ // Connect to this function to receive notifications of when the mouse moves off of this widget.
+ // event:
+ // mouse Event
+ // tags:
+ // callback
+ },
+ =====*/
+ onMouseEnter: dijit._connectOnUseEventHandler,
+ /*=====
+ onMouseEnter: function(event){
+ // summary:
+ // Connect to this function to receive notifications of when the mouse moves onto this widget.
+ // event:
+ // mouse Event
+ // tags:
+ // callback
+ },
+ =====*/
+ onMouseUp: dijit._connectOnUseEventHandler,
+ /*=====
+ onMouseUp: function(event){
+ // summary:
+ // Connect to this function to receive notifications of when the mouse button is released.
+ // event:
+ // mouse Event
+ // tags:
+ // callback
+ },
+ =====*/
+
+ // Constants used in templates
+
+ // _blankGif: [protected] String
+ // Path to a blank 1x1 image.
+ // Used by <img> nodes in templates that really get their image via CSS background-image.
+ _blankGif: (dojo.config.blankGif || dojo.moduleUrl("dojo", "resources/blank.gif")).toString(),
//////////// INITIALIZATION METHODS ///////////////////////////////////////
- postscript: function(params, srcNodeRef){
+ postscript: function(/*Object?*/params, /*DomNode|String*/srcNodeRef){
+ // summary:
+ // Kicks off widget instantiation. See create() for details.
+ // tags:
+ // private
this.create(params, srcNodeRef);
},
- create: function(params, srcNodeRef){
+ create: function(/*Object?*/params, /*DomNode|String?*/srcNodeRef){
// summary:
- // To understand the process by which widgets are instantiated, it
- // is critical to understand what other methods create calls and
- // which of them you'll want to override. Of course, adventurous
- // developers could override create entirely, but this should
- // only be done as a last resort.
+ // Kick off the life-cycle of a widget
+ // params:
+ // Hash of initialization parameters for widget, including
+ // scalar values (like title, duration etc.) and functions,
+ // typically callbacks like onClick.
+ // srcNodeRef:
+ // If a srcNodeRef (DOM node) is specified:
+ // - use srcNodeRef.innerHTML as my contents
+ // - if this is a behavioral widget then apply behavior
+ // to that srcNodeRef
+ // - otherwise, replace srcNodeRef with my generated DOM
+ // tree
+ // description:
+ // Create calls a number of widget methods (postMixInProperties, buildRendering, postCreate,
+ // etc.), some of which of you'll want to override. See http://docs.dojocampus.org/dijit/_Widget
+ // for a discussion of the widget creation lifecycle.
//
- // Below is a list of the methods that are called, in the order
- // they are fired, along with notes about what they do and if/when
- // you should over-ride them in your widget:
- //
- // postMixInProperties:
- // a stub function that you can over-ride to modify
- // variables that may have been naively assigned by
- // mixInProperties
- // # widget is added to manager object here
- // buildRendering
- // Subclasses use this method to handle all UI initialization
- // Sets this.domNode. Templated widgets do this automatically
- // and otherwise it just uses the source dom node.
- // postCreate
- // a stub function that you can over-ride to modify take
- // actions once the widget has been placed in the UI
-
- // store pointer to original dom tree
+ // Of course, adventurous developers could override create entirely, but this should
+ // only be done as a last resort.
+ // tags:
+ // private
+
+ // store pointer to original DOM tree
this.srcNodeRef = dojo.byId(srcNodeRef);
// For garbage collection. An array of handles returned by Widget.connect()
// Each handle returned from Widget.connect() is an array of handles from dojo.connect()
- this._connects=[];
-
- // _attaches: String[]
- // names of all our dojoAttachPoint variables
- this._attaches=[];
+ this._connects = [];
+
+ // For garbage collection. An array of handles returned by Widget.subscribe()
+ // The handle returned from Widget.subscribe() is the handle returned from dojo.subscribe()
+ this._subscribes = [];
+
+ // To avoid double-connects, remove entries from _deferredConnects
+ // that have been setup manually by a subclass (ex, by dojoAttachEvent).
+ // If a subclass has redefined a callback (ex: onClick) then assume it's being
+ // connected to manually.
+ this._deferredConnects = dojo.clone(this._deferredConnects);
+ for(var attr in this.attributeMap){
+ delete this._deferredConnects[attr]; // can't be in both attributeMap and _deferredConnects
+ }
+ for(attr in this._deferredConnects){
+ if(this[attr] !== dijit._connectOnUseEventHandler){
+ delete this._deferredConnects[attr]; // redefined, probably dojoAttachEvent exists
+ }
+ }
//mixin our passed parameters
if(this.srcNodeRef && (typeof this.srcNodeRef.id == "string")){ this.id = this.srcNodeRef.id; }
if(params){
+ this.params = params;
dojo.mixin(this,params);
}
this.postMixInProperties();
// generate an id for the widget if one wasn't specified
// (be sure to do this before buildRendering() because that function might
- // expect the id to be there.
+ // expect the id to be there.)
if(!this.id){
- this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));
+ this.id = dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));
}
dijit.registry.add(this);
this.buildRendering();
- // Copy attributes listed in attributeMap into the [newly created] DOM for the widget.
- // The placement of these attributes is according to the property mapping in attributeMap.
- // Note special handling for 'style' and 'class' attributes which are lists and can
- // have elements from both old and new structures, and some attributes like "type"
- // cannot be processed this way as they are not mutable.
if(this.domNode){
- for(var attr in this.attributeMap){
- var mapNode = this[this.attributeMap[attr] || "domNode"];
- var value = this[attr];
- if(typeof value != "object" && (value !== "" || (params && params[attr]))){
- switch(attr){
- case "class":
- dojo.addClass(mapNode, value);
- break;
- case "style":
- if(mapNode.style.cssText){
- mapNode.style.cssText += "; " + value;// FIXME: Opera
- }else{
- mapNode.style.cssText = value;
- }
- break;
- default:
- mapNode.setAttribute(attr, value);
- }
- }
+ // Copy attributes listed in attributeMap into the [newly created] DOM for the widget.
+ this._applyAttributes();
+
+ var source = this.srcNodeRef;
+ if(source && source.parentNode){
+ source.parentNode.replaceChild(this.domNode, source);
+ }
+
+ // If the developer has specified a handler as a widget parameter
+ // (ex: new Button({onClick: ...})
+ // then naturally need to connect from DOM node to that handler immediately,
+ for(attr in this.params){
+ this._onConnect(attr);
}
}
if(this.domNode){
this.domNode.setAttribute("widgetId", this.id);
}
this.postCreate();
// If srcNodeRef has been processed and removed from the DOM (e.g. TemplatedWidget) then delete it to allow GC.
if(this.srcNodeRef && !this.srcNodeRef.parentNode){
delete this.srcNodeRef;
- }
+ }
+
+ this._created = true;
+ },
+
+ _applyAttributes: function(){
+ // summary:
+ // Step during widget creation to copy all widget attributes to the
+ // DOM as per attributeMap and _setXXXAttr functions.
+ // description:
+ // Skips over blank/false attribute values, unless they were explicitly specified
+ // as parameters to the widget, since those are the default anyway,
+ // and setting tabIndex="" is different than not setting tabIndex at all.
+ //
+ // It processes the attributes in the attribute map first, and then
+ // it goes through and processes the attributes for the _setXXXAttr
+ // functions that have been specified
+ // tags:
+ // private
+ var condAttrApply = function(attr, scope){
+ if((scope.params && attr in scope.params) || scope[attr]){
+ scope.attr(attr, scope[attr]);
+ }
+ };
+
+ // Do the attributes in attributeMap
+ for(var attr in this.attributeMap){
+ condAttrApply(attr, this);
+ }
+
+ // And also any attributes with custom setters
+ dojo.forEach(getSetterAttributes(this), function(a){
+ if(!(a in this.attributeMap)){
+ condAttrApply(a, this);
+ }
+ }, this);
},
postMixInProperties: function(){
- // summary
- // Called after the parameters to the widget have been read-in,
- // but before the widget template is instantiated.
- // Especially useful to set properties that are referenced in the widget template.
+ // summary:
+ // Called after the parameters to the widget have been read-in,
+ // but before the widget template is instantiated. Especially
+ // useful to set properties that are referenced in the widget
+ // template.
+ // tags:
+ // protected
},
buildRendering: function(){
// summary:
- // Construct the UI for this widget, setting this.domNode.
- // Most widgets will mixin TemplatedWidget, which overrides this method.
- this.domNode = this.srcNodeRef || dojo.doc.createElement('div');
+ // Construct the UI for this widget, setting this.domNode
+ // description:
+ // Most widgets will mixin `dijit._Templated`, which implements this
+ // method.
+ // tags:
+ // protected
+ this.domNode = this.srcNodeRef || dojo.create('div');
},
postCreate: function(){
// summary:
- // Called after a widget's dom has been setup
+ // Processing after the DOM fragment is created
+ // description:
+ // Called after the DOM fragment has been created, but not necessarily
+ // added to the document. Do not include any operations which rely on
+ // node dimensions or placement.
+ // tags:
+ // protected
},
startup: function(){
// summary:
- // Called after a widget's children, and other widgets on the page, have been created.
- // Provides an opportunity to manipulate any children before they are displayed
- // This is useful for composite widgets that need to control or layout sub-widgets
- // Many layout widgets can use this as a wiring phase
+ // Processing after the DOM fragment is added to the document
+ // description:
+ // Called after a widget and its children have been created and added to the page,
+ // and all related widgets have finished their create() cycle, up through postCreate().
+ // This is useful for composite widgets that need to control or layout sub-widgets.
+ // Many layout widgets can use this as a wiring phase.
+ this._started = true;
},
//////////// DESTROY FUNCTIONS ////////////////////////////////
- destroyRecursive: function(/*Boolean*/ finalize){
+ destroyRecursive: function(/*Boolean?*/ preserveDom){
// summary:
- // Destroy this widget and it's descendants. This is the generic
- // "destructor" function that all widget users should call to
- // cleanly discard with a widget. Once a widget is destroyed, it's
- // removed from the manager object.
- // finalize: Boolean
- // is this function being called part of global environment
- // tear-down?
-
- this.destroyDescendants();
- this.destroy();
+ // Destroy this widget and its descendants
+ // description:
+ // This is the generic "destructor" function that all widget users
+ // should call to cleanly discard with a widget. Once a widget is
+ // destroyed, it is removed from the manager object.
+ // preserveDom:
+ // If true, this method will leave the original DOM structure
+ // alone of descendant Widgets. Note: This will NOT work with
+ // dijit._Templated widgets.
+
+ this._beingDestroyed = true;
+ this.destroyDescendants(preserveDom);
+ this.destroy(preserveDom);
},
- destroy: function(/*Boolean*/ finalize){
+ destroy: function(/*Boolean*/ preserveDom){
// summary:
- // Destroy this widget, but not its descendants
- // finalize: Boolean
- // is this function being called part of global environment
- // tear-down?
+ // Destroy this widget, but not its descendants.
+ // This method will, however, destroy internal widgets such as those used within a template.
+ // preserveDom: Boolean
+ // If true, this method will leave the original DOM structure alone.
+ // Note: This will not yet work with _Templated widgets
+
+ this._beingDestroyed = true;
this.uninitialize();
- dojo.forEach(this._connects, function(array){
- dojo.forEach(array, dojo.disconnect);
+ var d = dojo,
+ dfe = d.forEach,
+ dun = d.unsubscribe;
+ dfe(this._connects, function(array){
+ dfe(array, d.disconnect);
+ });
+ dfe(this._subscribes, function(handle){
+ dun(handle);
});
- this.destroyRendering(finalize);
+
+ // destroy widgets created as part of template, etc.
+ dfe(this._supportingWidgets || [], function(w){
+ if(w.destroyRecursive){
+ w.destroyRecursive();
+ }else if(w.destroy){
+ w.destroy();
+ }
+ });
+
+ this.destroyRendering(preserveDom);
dijit.registry.remove(this.id);
+ this._destroyed = true;
},
- destroyRendering: function(/*Boolean*/ finalize){
+ destroyRendering: function(/*Boolean?*/ preserveDom){
// summary:
// Destroys the DOM nodes associated with this widget
- // finalize: Boolean
- // is this function being called part of global environment
- // tear-down?
+ // preserveDom:
+ // If true, this method will leave the original DOM structure alone
+ // during tear-down. Note: this will not work with _Templated
+ // widgets yet.
+ // tags:
+ // protected
if(this.bgIframe){
- this.bgIframe.destroy();
+ this.bgIframe.destroy(preserveDom);
delete this.bgIframe;
}
if(this.domNode){
- dojo._destroyElement(this.domNode);
+ if(preserveDom){
+ dojo.removeAttr(this.domNode, "widgetId");
+ }else{
+ dojo.destroy(this.domNode);
+ }
delete this.domNode;
}
if(this.srcNodeRef){
- dojo._destroyElement(this.srcNodeRef);
+ if(!preserveDom){
+ dojo.destroy(this.srcNodeRef);
+ }
delete this.srcNodeRef;
}
},
- destroyDescendants: function(){
+ destroyDescendants: function(/*Boolean?*/ preserveDom){
// summary:
// Recursively destroy the children of this widget and their
// descendants.
-
- // TODO: should I destroy in the reverse order, to go bottom up?
- dojo.forEach(this.getDescendants(), function(widget){ widget.destroy(); });
+ // preserveDom:
+ // If true, the preserveDom attribute is passed to all descendant
+ // widget's .destroy() method. Not for use with _Templated
+ // widgets.
+
+ // get all direct descendants and destroy them recursively
+ dojo.forEach(this.getChildren(), function(widget){
+ if(widget.destroyRecursive){
+ widget.destroyRecursive(preserveDom);
+ }
+ });
},
+
uninitialize: function(){
// summary:
- // stub function. Over-ride to implement custom widget tear-down
+ // Stub function. Override to implement custom widget tear-down
// behavior.
+ // tags:
+ // protected
return false;
},
////////////////// MISCELLANEOUS METHODS ///////////////////
+ onFocus: function(){
+ // summary:
+ // Called when the widget becomes "active" because
+ // it or a widget inside of it either has focus, or has recently
+ // been clicked.
+ // tags:
+ // callback
+ },
+
+ onBlur: function(){
+ // summary:
+ // Called when the widget stops being "active" because
+ // focus moved to something outside of it, or the user
+ // clicked somewhere outside of it, or the widget was
+ // hidden.
+ // tags:
+ // callback
+ },
+
+ _onFocus: function(e){
+ // summary:
+ // This is where widgets do processing for when they are active,
+ // such as changing CSS classes. See onFocus() for more details.
+ // tags:
+ // protected
+ this.onFocus();
+ },
+
+ _onBlur: function(){
+ // summary:
+ // This is where widgets do processing for when they stop being active,
+ // such as changing CSS classes. See onBlur() for more details.
+ // tags:
+ // protected
+ this.onBlur();
+ },
+
+ _onConnect: function(/*String*/ event){
+ // summary:
+ // Called when someone connects to one of my handlers.
+ // "Turn on" that handler if it isn't active yet.
+ //
+ // This is also called for every single initialization parameter
+ // so need to do nothing for parameters like "id".
+ // tags:
+ // private
+ if(event in this._deferredConnects){
+ var mapNode = this[this._deferredConnects[event] || 'domNode'];
+ this.connect(mapNode, event.toLowerCase(), event);
+ delete this._deferredConnects[event];
+ }
+ },
+
+ _setClassAttr: function(/*String*/ value){
+ // summary:
+ // Custom setter for the CSS "class" attribute
+ // tags:
+ // protected
+ var mapNode = this[this.attributeMap["class"] || 'domNode'];
+ dojo.removeClass(mapNode, this["class"])
+ this["class"] = value;
+ dojo.addClass(mapNode, value);
+ },
+
+ _setStyleAttr: function(/*String||Object*/ value){
+ // summary:
+ // Sets the style attribut of the widget according to value,
+ // which is either a hash like {height: "5px", width: "3px"}
+ // or a plain string
+ // description:
+ // Determines which node to set the style on based on style setting
+ // in attributeMap.
+ // tags:
+ // protected
+
+ var mapNode = this[this.attributeMap.style || 'domNode'];
+
+ // Note: technically we should revert any style setting made in a previous call
+ // to his method, but that's difficult to keep track of.
+
+ if(dojo.isObject(value)){
+ dojo.style(mapNode, value);
+ }else{
+ if(mapNode.style.cssText){
+ mapNode.style.cssText += "; " + value;
+ }else{
+ mapNode.style.cssText = value;
+ }
+ }
+
+ this.style = value;
+ },
+
+ setAttribute: function(/*String*/ attr, /*anything*/ value){
+ // summary:
+ // Deprecated. Use attr() instead.
+ // tags:
+ // deprecated
+ dojo.deprecated(this.declaredClass+"::setAttribute() is deprecated. Use attr() instead.", "", "2.0");
+ this.attr(attr, value);
+ },
+
+ _attrToDom: function(/*String*/ attr, /*String*/ value){
+ // summary:
+ // Reflect a widget attribute (title, tabIndex, duration etc.) to
+ // the widget DOM, as specified in attributeMap.
+ //
+ // description:
+ // Also sets this["attr"] to the new value.
+ // Note some attributes like "type"
+ // cannot be processed this way as they are not mutable.
+ //
+ // tags:
+ // private
+
+ var commands = this.attributeMap[attr];
+ dojo.forEach(dojo.isArray(commands) ? commands : [commands], function(command){
+
+ // Get target node and what we are doing to that node
+ var mapNode = this[command.node || command || "domNode"]; // DOM node
+ var type = command.type || "attribute"; // class, innerHTML, innerText, or attribute
+
+ switch(type){
+ case "attribute":
+ if(dojo.isFunction(value)){ // functions execute in the context of the widget
+ value = dojo.hitch(this, value);
+ }
+
+ // Get the name of the DOM node attribute; usually it's the same
+ // as the name of the attribute in the widget (attr), but can be overridden.
+ // Also maps handler names to lowercase, like onSubmit --> onsubmit
+ var attrName = command.attribute ? command.attribute :
+ (/^on[A-Z][a-zA-Z]*$/.test(attr) ? attr.toLowerCase() : attr);
+
+ dojo.attr(mapNode, attrName, value);
+ break;
+ case "innerText":
+ mapNode.innerHTML = "";
+ mapNode.appendChild(dojo.doc.createTextNode(value));
+ break;
+ case "innerHTML":
+ mapNode.innerHTML = value;
+ break;
+ case "class":
+ dojo.removeClass(mapNode, this[attr]);
+ dojo.addClass(mapNode, value);
+ break;
+ }
+ }, this);
+ this[attr] = value;
+ },
+
+ attr: function(/*String|Object*/name, /*Object?*/value){
+ // summary:
+ // Set or get properties on a widget instance.
+ // name:
+ // The property to get or set. If an object is passed here and not
+ // a string, its keys are used as names of attributes to be set
+ // and the value of the object as values to set in the widget.
+ // value:
+ // Optional. If provided, attr() operates as a setter. If omitted,
+ // the current value of the named property is returned.
+ // description:
+ // Get or set named properties on a widget. If no value is
+ // provided, the current value of the attribute is returned,
+ // potentially via a getter method. If a value is provided, then
+ // the method acts as a setter, assigning the value to the name,
+ // potentially calling any explicitly provided setters to handle
+ // the operation. For instance, if the widget has properties "foo"
+ // and "bar" and a method named "_setFooAttr", calling:
+ // | myWidget.attr("foo", "Howdy!");
+ // would be equivalent to calling:
+ // | widget._setFooAttr("Howdy!");
+ // while calling:
+ // | myWidget.attr("bar", "Howdy!");
+ // would be the same as writing:
+ // | widget.bar = "Howdy!";
+ // It also tries to copy the changes to the widget's DOM according
+ // to settings in attributeMap (see description of `dijit._Widget.attributeMap`
+ // for details)
+ // For example, calling:
+ // | myTitlePane.attr("title", "Howdy!");
+ // will do
+ // | myTitlePane.title = "Howdy!";
+ // | myTitlePane.title.innerHTML = "Howdy!";
+ // It works for DOM node attributes too. Calling
+ // | widget.attr("disabled", true)
+ // will set the disabled attribute on the widget's focusNode,
+ // among other housekeeping for a change in disabled state.
+
+ // open questions:
+ // - how to handle build shortcut for attributes which want to map
+ // into DOM attributes?
+ // - what relationship should setAttribute()/attr() have to
+ // layout() calls?
+ var args = arguments.length;
+ if(args == 1 && !dojo.isString(name)){
+ for(var x in name){ this.attr(x, name[x]); }
+ return this;
+ }
+ var names = this._getAttrNames(name);
+ if(args >= 2){ // setter
+ if(this[names.s]){
+ // use the explicit setter
+ args = dojo._toArray(arguments, 1);
+ return this[names.s].apply(this, args) || this;
+ }else{
+ // if param is specified as DOM node attribute, copy it
+ if(name in this.attributeMap){
+ this._attrToDom(name, value);
+ }
+
+ // FIXME: what about function assignments? Any way to connect() here?
+ this[name] = value;
+ }
+ return this;
+ }else{ // getter
+ return this[names.g] ? this[names.g]() : this[name];
+ }
+ },
+
+ _attrPairNames: {}, // shared between all widgets
+ _getAttrNames: function(name){
+ // summary:
+ // Helper function for Widget.attr().
+ // Caches attribute name values so we don't do the string ops every time.
+ // tags:
+ // private
+
+ var apn = this._attrPairNames;
+ if(apn[name]){ return apn[name]; }
+ var uc = name.charAt(0).toUpperCase() + name.substr(1);
+ return (apn[name] = {
+ n: name+"Node",
+ s: "_set"+uc+"Attr",
+ g: "_get"+uc+"Attr"
+ });
+ },
+
toString: function(){
// summary:
- // returns a string that represents the widget. When a widget is
- // cast to a string, this method will be used to generate the
- // output. Currently, it does not implement any sort of reversable
+ // Returns a string that represents the widget
+ // description:
+ // When a widget is cast to a string, this method will be used to generate the
+ // output. Currently, it does not implement any sort of reversible
// serialization.
return '[Widget ' + this.declaredClass + ', ' + (this.id || 'NO ID') + ']'; // String
},
getDescendants: function(){
// summary:
- // return all the descendant widgets
- var list = dojo.query('[widgetId]', this.domNode);
- return list.map(dijit.byNode); // Array
+ // Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode.
+ // This method should generally be avoided as it returns widgets declared in templates, which are
+ // supposed to be internal/hidden, but it's left here for back-compat reasons.
+
+ return this.containerNode ? dojo.query('[widgetId]', this.containerNode).map(dijit.byNode) : []; // dijit._Widget[]
},
- nodesWithKeyClick : ["input", "button"],
+ getChildren: function(){
+ // summary:
+ // Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode.
+ // Does not return nested widgets, nor widgets that are part of this widget's template.
+ return this.containerNode ? dijit.findWidgets(this.containerNode) : []; // dijit._Widget[]
+ },
+
+ // nodesWithKeyClick: [private] String[]
+ // List of nodes that correctly handle click events via native browser support,
+ // and don't need dijit's help
+ nodesWithKeyClick: ["input", "button"],
connect: function(
/*Object|null*/ obj,
- /*String*/ event,
+ /*String|Function*/ event,
/*String|Function*/ method){
-
// summary:
// Connects specified obj/event to specified method of this object
// and registers for disconnect() on widget destroy.
- // Special event: "ondijitclick" triggers on a click or enter-down or space-up
- // Similar to dojo.connect() but takes three arguments rather than four.
- var handles =[];
+ // description:
+ // Provide widget-specific analog to dojo.connect, except with the
+ // implicit use of this widget as the target object.
+ // This version of connect also provides a special "ondijitclick"
+ // event which triggers on a click or space or enter keyup
+ // returns:
+ // A handle that can be passed to `disconnect` in order to disconnect before
+ // the widget is destroyed.
+ // example:
+ // | var btn = new dijit.form.Button();
+ // | // when foo.bar() is called, call the listener we're going to
+ // | // provide in the scope of btn
+ // | btn.connect(foo, "bar", function(){
+ // | console.debug(this.toString());
+ // | });
+ // tags:
+ // protected
+
+ var d = dojo,
+ dc = d._connect,
+ handles = [];
if(event == "ondijitclick"){
- var w = this;
// add key based click activation for unsupported nodes.
- if(!this.nodesWithKeyClick[obj.nodeName]){
- handles.push(dojo.connect(obj, "onkeydown", this,
- function(e){
- if(e.keyCode == dojo.keys.ENTER){
- return (dojo.isString(method))?
- w[method](e) : method.call(w, e);
- }else if(e.keyCode == dojo.keys.SPACE){
- // stop space down as it causes IE to scroll
- // the browser window
- dojo.stopEvent(e);
+ // do all processing onkey up to prevent spurious clicks
+ // for details see comments at top of this file where _lastKeyDownNode is defined
+ if(!this.nodesWithKeyClick[obj.tagName.toLowerCase()]){
+ var m = d.hitch(this, method);
+ handles.push(
+ dc(obj, "onkeydown", this, function(e){
+ //console.log(this.id + ": onkeydown, e.target = ", e.target, ", lastKeyDownNode was ", dijit._lastKeyDownNode, ", equality is ", (e.target === dijit._lastKeyDownNode));
+ if((e.keyCode == d.keys.ENTER || e.keyCode == d.keys.SPACE) &&
+ !e.ctrlKey && !e.shiftKey && !e.altKey && !e.metaKey){
+ // needed on IE for when focus changes between keydown and keyup - otherwise dropdown menus do not work
+ dijit._lastKeyDownNode = e.target;
+ d.stopEvent(e); // stop event to prevent scrolling on space key in IE
}
- }));
- handles.push(dojo.connect(obj, "onkeyup", this,
- function(e){
- if(e.keyCode == dojo.keys.SPACE){
- return dojo.isString(method) ?
- w[method](e) : method.call(w, e);
+ }),
+ dc(obj, "onkeyup", this, function(e){
+ //console.log(this.id + ": onkeyup, e.target = ", e.target, ", lastKeyDownNode was ", dijit._lastKeyDownNode, ", equality is ", (e.target === dijit._lastKeyDownNode));
+ if( (e.keyCode == d.keys.ENTER || e.keyCode == d.keys.SPACE) &&
+ e.target === dijit._lastKeyDownNode &&
+ !e.ctrlKey && !e.shiftKey && !e.altKey && !e.metaKey){
+ //need reset here or have problems in FF when focus returns to trigger element after closing popup/alert
+ dijit._lastKeyDownNode = null;
+ return m(e);
}
- }));
+ })
+ );
}
event = "onclick";
}
- handles.push(dojo.connect(obj, event, this, method));
-
- // return handles for FormElement and ComboBox
+ handles.push(dc(obj, event, this, method));
+
this._connects.push(handles);
- return handles;
+ return handles; // _Widget.Handle
},
- disconnect: function(/*Object*/ handles){
+ disconnect: function(/* _Widget.Handle */ handles){
// summary:
- // Disconnects handle created by this.connect.
- // Also removes handle from this widget's list of connects
+ // Disconnects handle created by `connect`.
+ // Also removes handle from this widget's list of connects.
+ // tags:
+ // protected
for(var i=0; i<this._connects.length; i++){
- if(this._connects[i]==handles){
+ if(this._connects[i] == handles){
dojo.forEach(handles, dojo.disconnect);
this._connects.splice(i, 1);
return;
}
}
},
+ subscribe: function(
+ /*String*/ topic,
+ /*String|Function*/ method){
+ // summary:
+ // Subscribes to the specified topic and calls the specified method
+ // of this object and registers for unsubscribe() on widget destroy.
+ // description:
+ // Provide widget-specific analog to dojo.subscribe, except with the
+ // implicit use of this widget as the target object.
+ // example:
+ // | var btn = new dijit.form.Button();
+ // | // when /my/topic is published, this button changes its label to
+ // | // be the parameter of the topic.
+ // | btn.subscribe("/my/topic", function(v){
+ // | this.attr("label", v);
+ // | });
+ var d = dojo,
+ handle = d.subscribe(topic, this, method);
+
+ // return handles for Any widget that may need them
+ this._subscribes.push(handle);
+ return handle;
+ },
+
+ unsubscribe: function(/*Object*/ handle){
+ // summary:
+ // Unsubscribes handle created by this.subscribe.
+ // Also removes handle from this widget's list of subscriptions
+ for(var i=0; i<this._subscribes.length; i++){
+ if(this._subscribes[i] == handle){
+ dojo.unsubscribe(handle);
+ this._subscribes.splice(i, 1);
+ return;
+ }
+ }
+ },
+
isLeftToRight: function(){
// summary:
- // Checks the DOM to for the text direction for bi-directional support
- // description:
- // This method cannot be used during widget construction because the widget
- // must first be connected to the DOM tree. Parent nodes are searched for the
- // 'dir' attribute until one is found, otherwise left to right mode is assumed.
- // See HTML spec, DIR attribute for more information.
-
- if(typeof this._ltr == "undefined"){
- this._ltr = dojo.getComputedStyle(this.domNode).direction != "rtl";
- }
- return this._ltr; //Boolean
+ // Checks the page for text direction
+ // tags:
+ // protected
+ return dojo._isBodyLtr(); //Boolean
},
isFocusable: function(){
// summary:
// Return true if this widget can currently be focused
// and false if not
return this.focus && (dojo.style(this.domNode, "display") != "none");
+ },
+
+ placeAt: function(/* String|DomNode|_Widget */reference, /* String?|Int? */position){
+ // summary:
+ // Place this widget's domNode reference somewhere in the DOM based
+ // on standard dojo.place conventions, or passing a Widget reference that
+ // contains and addChild member.
+ //
+ // description:
+ // A convenience function provided in all _Widgets, providing a simple
+ // shorthand mechanism to put an existing (or newly created) Widget
+ // somewhere in the dom, and allow chaining.
+ //
+ // reference:
+ // The String id of a domNode, a domNode reference, or a reference to a Widget posessing
+ // an addChild method.
+ //
+ // position:
+ // If passed a string or domNode reference, the position argument
+ // accepts a string just as dojo.place does, one of: "first", "last",
+ // "before", or "after".
+ //
+ // If passed a _Widget reference, and that widget reference has an ".addChild" method,
+ // it will be called passing this widget instance into that method, supplying the optional
+ // position index passed.
+ //
+ // returns:
+ // dijit._Widget
+ // Provides a useful return of the newly created dijit._Widget instance so you
+ // can "chain" this function by instantiating, placing, then saving the return value
+ // to a variable.
+ //
+ // example:
+ // | // create a Button with no srcNodeRef, and place it in the body:
+ // | var button = new dijit.form.Button({ label:"click" }).placeAt(dojo.body());
+ // | // now, 'button' is still the widget reference to the newly created button
+ // | dojo.connect(button, "onClick", function(e){ console.log('click'); });
+ //
+ // example:
+ // | // create a button out of a node with id="src" and append it to id="wrapper":
+ // | var button = new dijit.form.Button({},"src").placeAt("wrapper");
+ //
+ // example:
+ // | // place a new button as the first element of some div
+ // | var button = new dijit.form.Button({ label:"click" }).placeAt("wrapper","first");
+ //
+ // example:
+ // | // create a contentpane and add it to a TabContainer
+ // | var tc = dijit.byId("myTabs");
+ // | new dijit.layout.ContentPane({ href:"foo.html", title:"Wow!" }).placeAt(tc)
+
+ if(reference.declaredClass && reference.addChild){
+ reference.addChild(this, position);
+ }else{
+ dojo.place(this.domNode, reference, position);
+ }
+ return this;
+ },
+
+ _onShow: function(){
+ // summary:
+ // Internal method called when this widget is made visible.
+ // See `onShow` for details.
+ this.onShow();
+ },
+
+ onShow: function(){
+ // summary:
+ // Called when this widget becomes the selected pane in a
+ // `dijit.layout.TabContainer`, `dijit.layout.StackContainer`,
+ // `dijit.layout.AccordionContainer`, etc.
+ //
+ // Also called to indicate display of a `dijit.Dialog`, `dijit.TooltipDialog`, or `dijit.TitlePane`.
+ // tags:
+ // callback
+ },
+
+ onHide: function(){
+ // summary:
+ // Called when another widget becomes the selected pane in a
+ // `dijit.layout.TabContainer`, `dijit.layout.StackContainer`,
+ // `dijit.layout.AccordionContainer`, etc.
+ //
+ // Also called to indicate hide of a `dijit.Dialog`, `dijit.TooltipDialog`, or `dijit.TitlePane`.
+ // tags:
+ // callback
}
});
+})();
+
}
if(!dojo._hasResource["dojo.string"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo.string"] = true;
dojo.provide("dojo.string");
-dojo.string.pad = function(/*String*/text, /*int*/size, /*String?*/ch, /*boolean?*/end){
- // summary:
- // Pad a string to guarantee that it is at least 'size' length by
- // filling with the character 'c' at either the start or end of the
+/*=====
+dojo.string = {
+ // summary: String utilities for Dojo
+};
+=====*/
+
+dojo.string.rep = function(/*String*/str, /*Integer*/num){
+ // summary:
+ // Efficiently replicate a string `n` times.
+ // str:
+ // the string to replicate
+ // num:
+ // number of times to replicate the string
+
+ if(num <= 0 || !str){ return ""; }
+
+ var buf = [];
+ for(;;){
+ if(num & 1){
+ buf.push(str);
+ }
+ if(!(num >>= 1)){ break; }
+ str += str;
+ }
+ return buf.join(""); // String
+};
+
+dojo.string.pad = function(/*String*/text, /*Integer*/size, /*String?*/ch, /*Boolean?*/end){
+ // summary:
+ // Pad a string to guarantee that it is at least `size` length by
+ // filling with the character `ch` at either the start or end of the
// string. Pads at the start, by default.
- // text: the string to pad
- // size: length to provide padding
- // ch: character to pad, defaults to '0'
- // end: adds padding at the end if true, otherwise pads at start
-
- var out = String(text);
+ // text:
+ // the string to pad
+ // size:
+ // length to provide padding
+ // ch:
+ // character to pad, defaults to '0'
+ // end:
+ // adds padding at the end if true, otherwise pads at start
+ // example:
+ // | // Fill the string to length 10 with "+" characters on the right. Yields "Dojo++++++".
+ // | dojo.string.pad("Dojo", 10, "+", true);
+
if(!ch){
ch = '0';
}
- while(out.length < size){
- if(end){
- out += ch;
- }else{
- out = ch + out;
- }
- }
- return out; // String
+ var out = String(text),
+ pad = dojo.string.rep(ch, Math.ceil((size - out.length) / ch.length));
+ return end ? out + pad : pad + out; // String
};
-dojo.string.substitute = function( /*String*/template,
- /*Object or Array*/map,
- /*Function?*/transform,
- /*Object?*/thisObject){
- // summary:
+dojo.string.substitute = function( /*String*/ template,
+ /*Object|Array*/map,
+ /*Function?*/ transform,
+ /*Object?*/ thisObject){
+ // summary:
// Performs parameterized substitutions on a string. Throws an
// exception if any parameter is unmatched.
- // description:
- // For example,
- // | dojo.string.substitute("File '${0}' is not found in directory '${1}'.",["foo.html","/temp"]);
- // | dojo.string.substitute("File '${name}' is not found in directory '${info.dir}'.",{name: "foo.html", info: {dir: "/temp"}});
- // both return
- // "File 'foo.html' is not found in directory '/temp'."
- // template:
- // a string with expressions in the form ${key} to be replaced or
- // ${key:format} which specifies a format function. NOTE syntax has
- // changed from %{key}
- // map: where to look for substitutions
- // transform:
+ // template:
+ // a string with expressions in the form `${key}` to be replaced or
+ // `${key:format}` which specifies a format function. keys are case-sensitive.
+ // map:
+ // hash to search for substitutions
+ // transform:
// a function to process all parameters before substitution takes
- // place, e.g. dojo.string.encodeXML
- // thisObject:
+ // place, e.g. mylib.encodeXML
+ // thisObject:
// where to look for optional format function; default to the global
// namespace
-
- return template.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g, function(match, key, format){
- var value = dojo.getObject(key,false,map);
- if(format){ value = dojo.getObject(format,false,thisObject)(value);}
- if(transform){ value = transform(value, key); }
- return value.toString();
- }); // string
+ // example:
+ // Substitutes two expressions in a string from an Array or Object
+ // | // returns "File 'foo.html' is not found in directory '/temp'."
+ // | // by providing substitution data in an Array
+ // | dojo.string.substitute(
+ // | "File '${0}' is not found in directory '${1}'.",
+ // | ["foo.html","/temp"]
+ // | );
+ // |
+ // | // also returns "File 'foo.html' is not found in directory '/temp'."
+ // | // but provides substitution data in an Object structure. Dotted
+ // | // notation may be used to traverse the structure.
+ // | dojo.string.substitute(
+ // | "File '${name}' is not found in directory '${info.dir}'.",
+ // | { name: "foo.html", info: { dir: "/temp" } }
+ // | );
+ // example:
+ // Use a transform function to modify the values:
+ // | // returns "file 'foo.html' is not found in directory '/temp'."
+ // | dojo.string.substitute(
+ // | "${0} is not found in ${1}.",
+ // | ["foo.html","/temp"],
+ // | function(str){
+ // | // try to figure out the type
+ // | var prefix = (str.charAt(0) == "/") ? "directory": "file";
+ // | return prefix + " '" + str + "'";
+ // | }
+ // | );
+ // example:
+ // Use a formatter
+ // | // returns "thinger -- howdy"
+ // | dojo.string.substitute(
+ // | "${0:postfix}", ["thinger"], null, {
+ // | postfix: function(value, key){
+ // | return value + " -- howdy";
+ // | }
+ // | }
+ // | );
+
+ thisObject = thisObject || dojo.global;
+ transform = transform ?
+ dojo.hitch(thisObject, transform) : function(v){ return v; };
+
+ return template.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,
+ function(match, key, format){
+ var value = dojo.getObject(key, false, map);
+ if(format){
+ value = dojo.getObject(format, false, thisObject).call(thisObject, value, key);
+ }
+ return transform(value, key).toString();
+ }); // String
+};
+
+/*=====
+dojo.string.trim = function(str){
+ // summary:
+ // Trims whitespace from both sides of the string
+ // str: String
+ // String to be trimmed
+ // returns: String
+ // Returns the trimmed string
+ // description:
+ // This version of trim() was taken from [Steven Levithan's blog](http://blog.stevenlevithan.com/archives/faster-trim-javascript).
+ // The short yet performant version of this function is dojo.trim(),
+ // which is part of Dojo base. Uses String.prototype.trim instead, if available.
+ return ""; // String
+}
+=====*/
+
+dojo.string.trim = String.prototype.trim ?
+ dojo.trim : // aliasing to the native function
+ function(str){
+ str = str.replace(/^\s+/, '');
+ for(var i = str.length - 1; i >= 0; i--){
+ if(/\S/.test(str.charAt(i))){
+ str = str.substring(0, i + 1);
+ break;
+ }
+ }
+ return str;
+ };
+
+}
+
+if(!dojo._hasResource["dojo.cache"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojo.cache"] = true;
+dojo.provide("dojo.cache");
+
+/*=====
+dojo.cache = {
+ // summary:
+ // A way to cache string content that is fetchable via `dojo.moduleUrl`.
};
-
-dojo.string.trim = function(/*String*/ str){
- // summary: trims whitespaces from both sides of the string
- // description:
- // This version of trim() was taken from Steven Levithan's blog:
- // http://blog.stevenlevithan.com/archives/faster-trim-javascript.
- // The short yet good-performing version of this function is
- // dojo.trim(), which is part of the base.
- str = str.replace(/^\s+/, '');
- for(var i = str.length - 1; i > 0; i--){
- if(/\S/.test(str.charAt(i))){
- str = str.substring(0, i + 1);
- break;
+=====*/
+
+(function(){
+ var cache = {};
+ dojo.cache = function(/*String||Object*/module, /*String*/url, /*String||Object?*/value){
+ // summary:
+ // A getter and setter for storing the string content associated with the
+ // module and url arguments.
+ // description:
+ // module and url are used to call `dojo.moduleUrl()` to generate a module URL.
+ // If value is specified, the cache value for the moduleUrl will be set to
+ // that value. Otherwise, dojo.cache will fetch the moduleUrl and store it
+ // in its internal cache and return that cached value for the URL. To clear
+ // a cache value pass null for value. Since XMLHttpRequest (XHR) is used to fetch the
+ // the URL contents, only modules on the same domain of the page can use this capability.
+ // The build system can inline the cache values though, to allow for xdomain hosting.
+ // module: String||Object
+ // If a String, the module name to use for the base part of the URL, similar to module argument
+ // to `dojo.moduleUrl`. If an Object, something that has a .toString() method that
+ // generates a valid path for the cache item. For example, a dojo._Url object.
+ // url: String
+ // The rest of the path to append to the path derived from the module argument. If
+ // module is an object, then this second argument should be the "value" argument instead.
+ // value: String||Object?
+ // If a String, the value to use in the cache for the module/url combination.
+ // If an Object, it can have two properties: value and sanitize. The value property
+ // should be the value to use in the cache, and sanitize can be set to true or false,
+ // to indicate if XML declarations should be removed from the value and if the HTML
+ // inside a body tag in the value should be extracted as the real value. The value argument
+ // or the value property on the value argument are usually only used by the build system
+ // as it inlines cache content.
+ // example:
+ // To ask dojo.cache to fetch content and store it in the cache (the dojo["cache"] style
+ // of call is used to avoid an issue with the build system erroneously trying to intern
+ // this example. To get the build system to intern your dojo.cache calls, use the
+ // "dojo.cache" style of call):
+ // | //If template.html contains "<h1>Hello</h1>" that will be
+ // | //the value for the text variable.
+ // | var text = dojo["cache"]("my.module", "template.html");
+ // example:
+ // To ask dojo.cache to fetch content and store it in the cache, and sanitize the input
+ // (the dojo["cache"] style of call is used to avoid an issue with the build system
+ // erroneously trying to intern this example. To get the build system to intern your
+ // dojo.cache calls, use the "dojo.cache" style of call):
+ // | //If template.html contains "<html><body><h1>Hello</h1></body></html>", the
+ // | //text variable will contain just "<h1>Hello</h1>".
+ // | var text = dojo["cache"]("my.module", "template.html", {sanitize: true});
+ // example:
+ // Same example as previous, but demostrates how an object can be passed in as
+ // the first argument, then the value argument can then be the second argument.
+ // | //If template.html contains "<html><body><h1>Hello</h1></body></html>", the
+ // | //text variable will contain just "<h1>Hello</h1>".
+ // | var text = dojo["cache"](new dojo._Url("my/module/template.html"), {sanitize: true});
+
+ //Module could be a string, or an object that has a toString() method
+ //that will return a useful path. If it is an object, then the "url" argument
+ //will actually be the value argument.
+ if(typeof module == "string"){
+ var pathObj = dojo.moduleUrl(module, url);
+ }else{
+ pathObj = module;
+ value = url;
}
- }
- return str; // String
-};
+ var key = pathObj.toString();
+
+ var val = value;
+ if(value !== undefined && !dojo.isString(value)){
+ val = ("value" in value ? value.value : undefined);
+ }
+
+ var sanitize = value && value.sanitize ? true : false;
+
+ if(val || val === null){
+ //We have a value, either clear or set the cache value.
+ if(val == null){
+ delete cache[key];
+ }else{
+ val = cache[key] = sanitize ? dojo.cache._sanitize(val) : val;
+ }
+ }else{
+ //Allow cache values to be empty strings. If key property does
+ //not exist, fetch it.
+ if(!(key in cache)){
+ val = dojo._getText(key);
+ cache[key] = sanitize ? dojo.cache._sanitize(val) : val;
+ }
+ val = cache[key];
+ }
+ return val; //String
+ };
+
+ dojo.cache._sanitize = function(/*String*/val){
+ // summary:
+ // Strips <?xml ...?> declarations so that external SVG and XML
+ // documents can be added to a document without worry. Also, if the string
+ // is an HTML document, only the part inside the body tag is returned.
+ // description:
+ // Copied from dijit._Templated._sanitizeTemplateString.
+ if(val){
+ val = val.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, "");
+ var matches = val.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
+ if(matches){
+ val = matches[1];
+ }
+ }else{
+ val = "";
+ }
+ return val; //String
+ };
+})();
}
if(!dojo._hasResource["dijit._Templated"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit._Templated"] = true;
dojo.provide("dijit._Templated");
dojo.declare("dijit._Templated",
null,
{
// summary:
- // mixin for widgets that are instantiated from a template
-
- // templateNode: DomNode
- // a node that represents the widget template. Pre-empts both templateString and templatePath.
- templateNode: null,
-
- // templateString String:
- // a string that represents the widget template. Pre-empts the
+ // Mixin for widgets that are instantiated from a template
+
+ // templateString: [protected] String
+ // A string that represents the widget template. Pre-empts the
// templatePath. In builds that have their strings "interned", the
// templatePath is converted to an inline templateString, thereby
// preventing a synchronous network call.
+ //
+ // Use in conjunction with dojo.cache() to load from a file.
templateString: null,
- // templatePath: String
- // Path to template (HTML file) for this widget
+ // templatePath: [protected deprecated] String
+ // Path to template (HTML file) for this widget relative to dojo.baseUrl.
+ // Deprecated: use templateString with dojo.cache() instead.
templatePath: null,
- // widgetsInTemplate Boolean:
- // should we parse the template to find widgets that might be
- // declared in markup inside it? false by default.
+ // widgetsInTemplate: [protected] Boolean
+ // Should we parse the template to find widgets that might be
+ // declared in markup inside it? False by default.
widgetsInTemplate: false,
- // containerNode DomNode:
- // holds child elements. "containerNode" is generally set via a
- // dojoAttachPoint assignment and it designates where children of
- // the src dom node will be placed
- containerNode: null,
-
- // skipNodeCache Boolean:
- // if using a cached widget template node poses issues for a
+ // skipNodeCache: [protected] Boolean
+ // If using a cached widget template node poses issues for a
// particular widget class, it can set this property to ensure
// that its template is always re-built from a string
_skipNodeCache: false,
+ // _earlyTemplatedStartup: Boolean
+ // A fallback to preserve the 1.0 - 1.3 behavior of children in
+ // templates having their startup called before the parent widget
+ // fires postCreate. Defaults to 'false', causing child widgets to
+ // have their .startup() called immediately before a parent widget
+ // .startup(), but always after the parent .postCreate(). Set to
+ // 'true' to re-enable to previous, arguably broken, behavior.
+ _earlyTemplatedStartup: false,
+
+ // _attachPoints: [private] String[]
+ // List of widget attribute names associated with dojoAttachPoint=... in the
+ // template, ex: ["containerNode", "labelNode"]
+/*=====
+ _attachPoints: [],
+ =====*/
+
+ constructor: function(){
+ this._attachPoints = [];
+ },
+
+ _stringRepl: function(tmpl){
+ // summary:
+ // Does substitution of ${foo} type properties in template string
+ // tags:
+ // private
+ var className = this.declaredClass, _this = this;
+ // Cache contains a string because we need to do property replacement
+ // do the property replacement
+ return dojo.string.substitute(tmpl, this, function(value, key){
+ if(key.charAt(0) == '!'){ value = dojo.getObject(key.substr(1), false, _this); }
+ if(typeof value == "undefined"){ throw new Error(className+" template:"+key); } // a debugging aide
+ if(value == null){ return ""; }
+
+ // Substitution keys beginning with ! will skip the transform step,
+ // in case a user wishes to insert unescaped markup, e.g. ${!foo}
+ return key.charAt(0) == "!" ? value :
+ // Safer substitution, see heading "Attribute values" in
+ // http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.3.2
+ value.toString().replace(/"/g,"&quot;"); //TODO: add &amp? use encodeXML method?
+ }, this);
+ },
+
// method over-ride
buildRendering: function(){
// summary:
// Construct the UI for this widget from a template, setting this.domNode.
+ // tags:
+ // protected
// Lookup cached version of template, and download to cache if it
// isn't there already. Returns either a DomNode or a string, depending on
// whether or not the template contains ${foo} replacement parameters.
var cached = dijit._Templated.getCachedTemplate(this.templatePath, this.templateString, this._skipNodeCache);
var node;
if(dojo.isString(cached)){
- var className = this.declaredClass, _this = this;
- // Cache contains a string because we need to do property replacement
- // do the property replacement
- var tstr = dojo.string.substitute(cached, this, function(value, key){
- if(key.charAt(0) == '!'){ value = _this[key.substr(1)]; }
- if(typeof value == "undefined"){ throw new Error(className+" template:"+key); } // a debugging aide
- if(!value){ return ""; }
-
- // Substitution keys beginning with ! will skip the transform step,
- // in case a user wishes to insert unescaped markup, e.g. ${!foo}
- return key.charAt(0) == "!" ? value :
- // Safer substitution, see heading "Attribute values" in
- // http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.3.2
- value.toString().replace(/"/g,"&quot;"); //TODO: add &amp? use encodeXML method?
- }, this);
-
- node = dijit._Templated._createNodesFromText(tstr)[0];
+ node = dojo._toDom(this._stringRepl(cached));
+ if(node.nodeType != 1){
+ // Flag common problems such as templates with multiple top level nodes (nodeType == 11)
+ throw new Error("Invalid template: " + cached);
+ }
}else{
// if it's a node, all we have to do is clone it
node = cached.cloneNode(true);
}
+ this.domNode = node;
+
// recurse through the node, looking for, and attaching to, our
- // attachment points which should be defined on the template node.
+ // attachment points and events, which should be defined on the template node.
this._attachTemplateNodes(node);
- var source = this.srcNodeRef;
- if(source && source.parentNode){
- source.parentNode.replaceChild(node, source);
- }
-
- this.domNode = node;
if(this.widgetsInTemplate){
- var childWidgets = dojo.parser.parse(node);
- this._attachTemplateNodes(childWidgets, function(n,p){
+ // Make sure dojoType is used for parsing widgets in template.
+ // The dojo.parser.query could be changed from multiversion support.
+ var parser = dojo.parser, qry, attr;
+ if(parser._query != "[dojoType]"){
+ qry = parser._query;
+ attr = parser._attrName;
+ parser._query = "[dojoType]";
+ parser._attrName = "dojoType";
+ }
+
+ // Store widgets that we need to start at a later point in time
+ var cw = (this._startupWidgets = dojo.parser.parse(node, {
+ noStart: !this._earlyTemplatedStartup
+ }));
+
+ // Restore the query.
+ if(qry){
+ parser._query = qry;
+ parser._attrName = attr;
+ }
+
+ this._supportingWidgets = dijit.findWidgets(node);
+
+ this._attachTemplateNodes(cw, function(n,p){
return n[p];
});
}
- this._fillContent(source);
+ this._fillContent(this.srcNodeRef);
},
_fillContent: function(/*DomNode*/ source){
// summary:
- // relocate source contents to templated container node
- // this.containerNode must be able to receive children, or exceptions will be thrown
+ // Relocate source contents to templated container node.
+ // this.containerNode must be able to receive children, or exceptions will be thrown.
+ // tags:
+ // protected
var dest = this.containerNode;
if(source && dest){
while(source.hasChildNodes()){
dest.appendChild(source.firstChild);
}
}
},
_attachTemplateNodes: function(rootNode, getAttrFunc){
// summary:
- // map widget properties and functions to the handlers specified in
+ // Iterate through the template and attach functions and nodes accordingly.
+ // description:
+ // Map widget properties and functions to the handlers specified in
// the dom node and it's descendants. This function iterates over all
// nodes and looks for these properties:
// * dojoAttachPoint
- // * dojoAttachEvent
+ // * dojoAttachEvent
// * waiRole
// * waiState
// rootNode: DomNode|Array[Widgets]
// the node to search for properties. All children will be searched.
- // getAttrFunc: function?
+ // getAttrFunc: Function?
// a function which will be used to obtain property for a given
// DomNode/Widget
+ // tags:
+ // private
getAttrFunc = getAttrFunc || function(n,p){ return n.getAttribute(p); };
var nodes = dojo.isArray(rootNode) ? rootNode : (rootNode.all || rootNode.getElementsByTagName("*"));
- var x=dojo.isArray(rootNode)?0:-1;
+ var x = dojo.isArray(rootNode) ? 0 : -1;
for(; x<nodes.length; x++){
var baseNode = (x == -1) ? rootNode : nodes[x];
- if(this.widgetsInTemplate && getAttrFunc(baseNode,'dojoType')){
+ if(this.widgetsInTemplate && getAttrFunc(baseNode, "dojoType")){
continue;
}
// Process dojoAttachPoint
var attachPoint = getAttrFunc(baseNode, "dojoAttachPoint");
if(attachPoint){
var point, points = attachPoint.split(/\s*,\s*/);
- while(point=points.shift()){
+ while((point = points.shift())){
if(dojo.isArray(this[point])){
this[point].push(baseNode);
}else{
this[point]=baseNode;
}
+ this._attachPoints.push(point);
}
}
// Process dojoAttachEvent
var attachEvent = getAttrFunc(baseNode, "dojoAttachEvent");
if(attachEvent){
// NOTE: we want to support attributes that have the form
// "domEvent: nativeEvent; ..."
var event, events = attachEvent.split(/\s*,\s*/);
var trim = dojo.trim;
- while(event=events.shift()){
+ while((event = events.shift())){
if(event){
var thisFunc = null;
if(event.indexOf(":") != -1){
// oh, if only JS had tuple assignment
var funcNameArr = event.split(":");
event = trim(funcNameArr[0]);
thisFunc = trim(funcNameArr[1]);
}else{
event = trim(event);
}
if(!thisFunc){
thisFunc = event;
}
this.connect(baseNode, event, thisFunc);
}
}
}
// waiRole, waiState
var role = getAttrFunc(baseNode, "waiRole");
if(role){
dijit.setWaiRole(baseNode, role);
}
var values = getAttrFunc(baseNode, "waiState");
if(values){
dojo.forEach(values.split(/\s*,\s*/), function(stateValue){
if(stateValue.indexOf('-') != -1){
var pair = stateValue.split('-');
dijit.setWaiState(baseNode, pair[0], pair[1]);
}
});
}
-
}
+ },
+
+ startup: function(){
+ dojo.forEach(this._startupWidgets, function(w){
+ if(w && !w._started && w.startup){
+ w.startup();
+ }
+ });
+ this.inherited(arguments);
+ },
+
+ destroyRendering: function(){
+ // Delete all attach points to prevent IE6 memory leaks.
+ dojo.forEach(this._attachPoints, function(point){
+ delete this[point];
+ }, this);
+ this._attachPoints = [];
+
+ this.inherited(arguments);
}
}
);
// key is either templatePath or templateString; object is either string or DOM tree
dijit._Templated._templateCache = {};
dijit._Templated.getCachedTemplate = function(templatePath, templateString, alwaysUseString){
// summary:
- // static method to get a template based on the templatePath or
+ // Static method to get a template based on the templatePath or
// templateString key
- // templatePath: String
- // the URL to get the template from. dojo.uri.Uri is often passed as well.
+ // templatePath: String||dojo.uri.Uri
+ // The URL to get the template from.
// templateString: String?
- // a string to use in lieu of fetching the template from a URL
- // Returns:
- // Either string (if there are ${} variables that need to be replaced) or just
- // a DOM tree (if the node can be cloned directly)
+ // a string to use in lieu of fetching the template from a URL. Takes precedence
+ // over templatePath
+ // returns: Mixed
+ // Either string (if there are ${} variables that need to be replaced) or just
+ // a DOM tree (if the node can be cloned directly)
// is it already cached?
var tmplts = dijit._Templated._templateCache;
var key = templateString || templatePath;
var cached = tmplts[key];
if(cached){
- return cached;
+ try{
+ // if the cached value is an innerHTML string (no ownerDocument) or a DOM tree created within the current document, then use the current cached value
+ if(!cached.ownerDocument || cached.ownerDocument == dojo.doc){
+ // string or node of the same document
+ return cached;
+ }
+ }catch(e){ /* squelch */ } // IE can throw an exception if cached.ownerDocument was reloaded
+ dojo.destroy(cached);
}
// If necessary, load template string from template path
if(!templateString){
- templateString = dijit._Templated._sanitizeTemplateString(dojo._getText(templatePath));
+ templateString = dojo.cache(templatePath, {sanitize: true});
}
-
templateString = dojo.string.trim(templateString);
- if(templateString.match(/\$\{([^\}]+)\}/g) || alwaysUseString){
+ if(alwaysUseString || templateString.match(/\$\{([^\}]+)\}/g)){
// there are variables in the template so all we can do is cache the string
return (tmplts[key] = templateString); //String
}else{
// there are no variables in the template so we can cache the DOM tree
- return (tmplts[key] = dijit._Templated._createNodesFromText(templateString)[0]); //Node
+ var node = dojo._toDom(templateString);
+ if(node.nodeType != 1){
+ throw new Error("Invalid template: " + templateString);
+ }
+ return (tmplts[key] = node); //Node
}
};
-dijit._Templated._sanitizeTemplateString = function(/*String*/tString){
- // summary:
- // Strips <?xml ...?> declarations so that external SVG and XML
- // documents can be added to a document without worry. Also, if the string
- // is an HTML document, only the part inside the body tag is returned.
- if(tString){
- tString = tString.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, "");
- var matches = tString.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
- if(matches){
- tString = matches[1];
- }
- }else{
- tString = "";
- }
- return tString; //String
-};
-
-
if(dojo.isIE){
- dojo.addOnUnload(function(){
+ dojo.addOnWindowUnload(function(){
var cache = dijit._Templated._templateCache;
for(var key in cache){
var value = cache[key];
- if(!isNaN(value.nodeType)){ // isNode equivalent
- dojo._destroyElement(value);
+ if(typeof value == "object"){ // value is either a string or a DOM node template
+ dojo.destroy(value);
}
delete cache[key];
}
});
}
-(function(){
- var tagMap = {
- cell: {re: /^<t[dh][\s\r\n>]/i, pre: "<table><tbody><tr>", post: "</tr></tbody></table>"},
- row: {re: /^<tr[\s\r\n>]/i, pre: "<table><tbody>", post: "</tbody></table>"},
- section: {re: /^<(thead|tbody|tfoot)[\s\r\n>]/i, pre: "<table>", post: "</table>"}
- };
-
- // dummy container node used temporarily to hold nodes being created
- var tn;
-
- dijit._Templated._createNodesFromText = function(/*String*/text){
- // summary:
- // Attempts to create a set of nodes based on the structure of the passed text.
-
- if(!tn){
- tn = dojo.doc.createElement("div");
- tn.style.display="none";
- dojo.body().appendChild(tn);
- }
- var tableType = "none";
- var rtext = text.replace(/^\s+/, "");
- for(var type in tagMap){
- var map = tagMap[type];
- if(map.re.test(rtext)){
- tableType = type;
- text = map.pre + text + map.post;
- break;
- }
- }
-
- tn.innerHTML = text;
- if(tn.normalize){
- tn.normalize();
- }
-
- var tag = { cell: "tr", row: "tbody", section: "table" }[tableType];
- var _parent = (typeof tag != "undefined") ?
- tn.getElementsByTagName(tag)[0] :
- tn;
-
- var nodes = [];
- while(_parent.firstChild){
- nodes.push(_parent.removeChild(_parent.firstChild));
- }
- tn.innerHTML="";
- return nodes; // Array
- }
-})();
-
// These arguments can be specified for widgets which are used in templates.
// Since any widget can be specified as sub widgets in template, mix it
// into the base widget class. (This is a hack, but it's effective.)
dojo.extend(dijit._Widget,{
dojoAttachEvent: "",
dojoAttachPoint: "",
waiRole: "",
waiState:""
-})
+});
}
if(!dojo._hasResource["dijit._Container"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit._Container"] = true;
dojo.provide("dijit._Container");
-dojo.declare("dijit._Contained",
- null,
- {
- // summary
- // Mixin for widgets that are children of a container widget
-
- getParent: function(){
- // summary:
- // returns the parent widget of this widget, assuming the parent
- // implements dijit._Container
- for(var p=this.domNode.parentNode; p; p=p.parentNode){
- var id = p.getAttribute && p.getAttribute("widgetId");
- if(id){
- var parent = dijit.byId(id);
- return parent.isContainer ? parent : null;
- }
- }
- return null;
- },
-
- _getSibling: function(which){
- var node = this.domNode;
- do{
- node = node[which+"Sibling"];
- }while(node && node.nodeType != 1);
- if(!node){ return null; } // null
- var id = node.getAttribute("widgetId");
- return dijit.byId(id);
- },
-
- getPreviousSibling: function(){
- // summary:
- // returns null if this is the first child of the parent,
- // otherwise returns the next element sibling to the "left".
-
- return this._getSibling("previous");
- },
-
- getNextSibling: function(){
- // summary:
- // returns null if this is the last child of the parent,
- // otherwise returns the next element sibling to the "right".
-
- return this._getSibling("next");
- }
- }
-);
-
dojo.declare("dijit._Container",
null,
{
- // summary
- // Mixin for widgets that contain a list of children like SplitContainer
-
+ // summary:
+ // Mixin for widgets that contain a set of widget children.
+ // description:
+ // Use this mixin for widgets that needs to know about and
+ // keep track of their widget children. Suitable for widgets like BorderContainer
+ // and TabContainer which contain (only) a set of child widgets.
+ //
+ // It's not suitable for widgets like ContentPane
+ // which contains mixed HTML (plain DOM nodes in addition to widgets),
+ // and where contained widgets are not necessarily directly below
+ // this.containerNode. In that case calls like addChild(node, position)
+ // wouldn't make sense.
+
+ // isContainer: [protected] Boolean
+ // Indicates that this widget acts as a "parent" to the descendant widgets.
+ // When the parent is started it will call startup() on the child widgets.
+ // See also `isLayoutContainer`.
isContainer: true,
- addChild: function(/*Widget*/ widget, /*int?*/ insertIndex){
+ buildRendering: function(){
+ this.inherited(arguments);
+ if(!this.containerNode){
+ // all widgets with descendants must set containerNode
+ this.containerNode = this.domNode;
+ }
+ },
+
+ addChild: function(/*dijit._Widget*/ widget, /*int?*/ insertIndex){
// summary:
- // Process the given child widget, inserting it's dom node as
- // a child of our dom node
-
- if(insertIndex === undefined){
- insertIndex = "last";
- }
- var refNode = this.containerNode || this.domNode;
+ // Makes the given widget a child of this widget.
+ // description:
+ // Inserts specified child widget's dom node as a child of this widget's
+ // container node, and possibly does other processing (such as layout).
+
+ var refNode = this.containerNode;
if(insertIndex && typeof insertIndex == "number"){
- var children = dojo.query("> [widgetid]", refNode);
+ var children = this.getChildren();
if(children && children.length >= insertIndex){
- refNode = children[insertIndex-1]; insertIndex = "after";
+ refNode = children[insertIndex-1].domNode;
+ insertIndex = "after";
}
}
dojo.place(widget.domNode, refNode, insertIndex);
// If I've been started but the child widget hasn't been started,
// start it now. Make sure to do this after widget has been
// inserted into the DOM tree, so it can see that it's being controlled by me,
// so it doesn't try to size itself.
if(this._started && !widget._started){
widget.startup();
}
},
- removeChild: function(/*Widget*/ widget){
+ removeChild: function(/*Widget or int*/ widget){
// summary:
- // removes the passed widget instance from this widget but does
- // not destroy it
- var node = widget.domNode;
- node.parentNode.removeChild(node); // detach but don't destroy
- },
-
- _nextElement: function(node){
- do{
- node = node.nextSibling;
- }while(node && node.nodeType != 1);
- return node;
- },
-
- _firstElement: function(node){
- node = node.firstChild;
- if(node && node.nodeType != 1){
- node = this._nextElement(node);
+ // Removes the passed widget instance from this widget but does
+ // not destroy it. You can also pass in an integer indicating
+ // the index within the container to remove
+
+ if(typeof widget == "number" && widget > 0){
+ widget = this.getChildren()[widget];
}
- return node;
+
+ if(widget && widget.domNode){
+ var node = widget.domNode;
+ node.parentNode.removeChild(node); // detach but don't destroy
+ }
},
getChildren: function(){
// summary:
- // Returns array of children widgets
- return dojo.query("> [widgetId]", this.containerNode || this.domNode).map(dijit.byNode); // Array
+ // Returns array of children widgets.
+ // description:
+ // Returns the widgets that are directly under this.containerNode.
+ return dojo.query("> [widgetId]", this.containerNode).map(dijit.byNode); // Widget[]
},
hasChildren: function(){
// summary:
- // Returns true if widget has children
- var cn = this.containerNode || this.domNode;
- return !!this._firstElement(cn); // Boolean
+ // Returns true if widget has children, i.e. if this.containerNode contains something.
+ return dojo.query("> [widgetId]", this.containerNode).length > 0; // Boolean
},
- _getSiblingOfChild: function(/*Widget*/ child, /*int*/ dir){
+ destroyDescendants: function(/*Boolean*/ preserveDom){
// summary:
- // get the next or previous widget sibling of child
+ // Destroys all the widgets inside this.containerNode,
+ // but not this widget itself
+ dojo.forEach(this.getChildren(), function(child){ child.destroyRecursive(preserveDom); });
+ },
+
+ _getSiblingOfChild: function(/*dijit._Widget*/ child, /*int*/ dir){
+ // summary:
+ // Get the next or previous widget sibling of child
// dir:
// if 1, get the next sibling
// if -1, get the previous sibling
- var node = child.domNode;
- var which = (dir>0 ? "nextSibling" : "previousSibling");
+ // tags:
+ // private
+ var node = child.domNode,
+ which = (dir>0 ? "nextSibling" : "previousSibling");
do{
node = node[which];
}while(node && (node.nodeType != 1 || !dijit.byNode(node)));
- return node ? dijit.byNode(node) : null;
- }
- }
-);
-
-dojo.declare("dijit._KeyNavContainer",
- [dijit._Container],
- {
-
- // summary:
- // A _Container with keyboard navigation of its children.
- // To use this mixin, call connectKeyNavHandlers() in
- // postCreate() and call startupKeyNavChildren() in startup().
-
-/*=====
- // focusedChild: Widget
- // The currently focused child widget, or null if there isn't one
- focusedChild: null,
-=====*/
-
- _keyNavCodes: {},
-
- connectKeyNavHandlers: function(/*Array*/ prevKeyCodes, /*Array*/ nextKeyCodes){
- // summary:
- // Call in postCreate() to attach the keyboard handlers
- // to the container.
- // preKeyCodes: Array
- // Key codes for navigating to the previous child.
- // nextKeyCodes: Array
- // Key codes for navigating to the next child.
-
- var keyCodes = this._keyNavCodes = {};
- var prev = dojo.hitch(this, this.focusPrev);
- var next = dojo.hitch(this, this.focusNext);
- dojo.forEach(prevKeyCodes, function(code){ keyCodes[code] = prev });
- dojo.forEach(nextKeyCodes, function(code){ keyCodes[code] = next });
- this.connect(this.domNode, "onkeypress", "_onContainerKeypress");
- if(dojo.isIE){
- this.connect(this.domNode, "onactivate", "_onContainerFocus");
- this.connect(this.domNode, "ondeactivate", "_onContainerBlur");
- }else{
- this.connect(this.domNode, "onfocus", "_onContainerFocus");
- this.connect(this.domNode, "onblur", "_onContainerBlur");
- }
- },
-
- startupKeyNavChildren: function(){
- // summary:
- // Call in startup() to set child tabindexes to -1
- dojo.forEach(this.getChildren(), dojo.hitch(this, "_setTabIndexMinusOne"));
- },
-
- addChild: function(/*Widget*/ widget, /*int?*/ insertIndex){
- // summary: Add a child to our _Container
- dijit._KeyNavContainer.superclass.addChild.apply(this, arguments);
- this._setTabIndexMinusOne(widget);
- },
-
- focus: function(){
- // summary: Default focus() implementation: focus the first child.
- this.focusFirstChild();
- },
-
- focusFirstChild: function(){
- // summary: Focus the first focusable child in the container.
- this.focusChild(this._getFirstFocusableChild());
- },
-
- focusNext: function(){
- // summary: Focus the next widget or focal node (for widgets
- // with multiple focal nodes) within this container.
- if(this.focusedChild && this.focusedChild.hasNextFocalNode
- && this.focusedChild.hasNextFocalNode()){
- this.focusedChild.focusNext();
- return;
- }
- var child = this._getNextFocusableChild(this.focusedChild, 1);
- if(child.getFocalNodes){
- this.focusChild(child, child.getFocalNodes()[0]);
- }else{
- this.focusChild(child);
- }
- },
-
- focusPrev: function(){
- // summary: Focus the previous widget or focal node (for widgets
- // with multiple focal nodes) within this container.
- if(this.focusedChild && this.focusedChild.hasPrevFocalNode
- && this.focusedChild.hasPrevFocalNode()){
- this.focusedChild.focusPrev();
- return;
- }
- var child = this._getNextFocusableChild(this.focusedChild, -1);
- if(child.getFocalNodes){
- var nodes = child.getFocalNodes();
- this.focusChild(child, nodes[nodes.length-1]);
- }else{
- this.focusChild(child);
- }
+ return node && dijit.byNode(node); // dijit._Widget
},
- focusChild: function(/*Widget*/ widget, /*Node?*/ node){
- // summary: Focus widget. Optionally focus 'node' within widget.
- if(widget){
- if(this.focusedChild && widget !== this.focusedChild){
- this._onChildBlur(this.focusedChild);
- }
- this.focusedChild = widget;
- if(node && widget.focusFocalNode){
- widget.focusFocalNode(node);
- }else{
- widget.focus();
- }
- }
- },
-
- _setTabIndexMinusOne: function(/*Widget*/ widget){
- if(widget.getFocalNodes){
- dojo.forEach(widget.getFocalNodes(), function(node){
- node.setAttribute("tabIndex", -1);
- });
- }else{
- (widget.focusNode || widget.domNode).setAttribute("tabIndex", -1);
- }
- },
-
- _onContainerFocus: function(evt){
- this.domNode.setAttribute("tabIndex", -1);
- if(evt.target === this.domNode){
- this.focusFirstChild();
- }else{
- var widget = dijit.getEnclosingWidget(evt.target);
- if(widget && widget.isFocusable()){
- this.focusedChild = widget;
- }
- }
- },
-
- _onContainerBlur: function(evt){
- if(this.tabIndex){
- this.domNode.setAttribute("tabIndex", this.tabIndex);
- }
- },
-
- _onContainerKeypress: function(evt){
- if(evt.ctrlKey || evt.altKey){ return; }
- var func = this._keyNavCodes[evt.keyCode];
- if(func){
- func();
- dojo.stopEvent(evt);
- }
- },
-
- _onChildBlur: function(/*Widget*/ widget){
+ getIndexOfChild: function(/*dijit._Widget*/ child){
// summary:
- // Called when focus leaves a child widget to go
- // to a sibling widget.
- },
-
- _getFirstFocusableChild: function(){
- return this._getNextFocusableChild(null, 1);
- },
-
- _getNextFocusableChild: function(child, dir){
- if(child){
- child = this._getSiblingOfChild(child, dir);
- }
- var children = this.getChildren();
- for(var i=0; i < children.length; i++){
- if(!child){
- child = children[(dir>0) ? 0 : (children.length-1)];
- }
- if(child.isFocusable()){
- return child;
- }
- child = this._getSiblingOfChild(child, dir);
- }
- }
- }
-);
-
-}
-
-if(!dojo._hasResource["dijit.layout._LayoutWidget"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.layout._LayoutWidget"] = true;
-dojo.provide("dijit.layout._LayoutWidget");
-
-
-
-
-dojo.declare("dijit.layout._LayoutWidget",
- [dijit._Widget, dijit._Container, dijit._Contained],
- {
- // summary
- // Mixin for widgets that contain a list of children like SplitContainer.
- // Widgets which mixin this code must define layout() to lay out the children
-
- isLayoutContainer: true,
-
- postCreate: function(){
- dojo.addClass(this.domNode, "dijitContainer");
+ // Gets the index of the child in this container or -1 if not found
+ return dojo.indexOf(this.getChildren(), child); // int
},
startup: function(){
// summary:
// Called after all the widgets have been instantiated and their
- // dom nodes have been inserted somewhere under document.body.
+ // dom nodes have been inserted somewhere under dojo.doc.body.
//
// Widgets should override this method to do any initialization
// dependent on other widgets existing, and then call
// this superclass method to finish things off.
//
// startup() in subclasses shouldn't do anything
// size related because the size of the widget hasn't been set yet.
if(this._started){ return; }
- this._started=true;
-
- if(this.getChildren){
- dojo.forEach(this.getChildren(), function(child){ child.startup(); });
+
+ // Startup all children of this widget
+ dojo.forEach(this.getChildren(), function(child){ child.startup(); });
+
+ this.inherited(arguments);
+ }
+ }
+);
+
+}
+
+if(!dojo._hasResource["dijit._Contained"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit._Contained"] = true;
+dojo.provide("dijit._Contained");
+
+dojo.declare("dijit._Contained",
+ null,
+ {
+ // summary:
+ // Mixin for widgets that are children of a container widget
+ //
+ // example:
+ // | // make a basic custom widget that knows about it's parents
+ // | dojo.declare("my.customClass",[dijit._Widget,dijit._Contained],{});
+
+ getParent: function(){
+ // summary:
+ // Returns the parent widget of this widget, assuming the parent
+ // specifies isContainer
+ var parent = dijit.getEnclosingWidget(this.domNode.parentNode);
+ return parent && parent.isContainer ? parent : null;
+ },
+
+ _getSibling: function(/*String*/ which){
+ // summary:
+ // Returns next or previous sibling
+ // which:
+ // Either "next" or "previous"
+ // tags:
+ // private
+ var node = this.domNode;
+ do{
+ node = node[which+"Sibling"];
+ }while(node && node.nodeType != 1);
+ return node && dijit.byNode(node); // dijit._Widget
+ },
+
+ getPreviousSibling: function(){
+ // summary:
+ // Returns null if this is the first child of the parent,
+ // otherwise returns the next element sibling to the "left".
+
+ return this._getSibling("previous"); // dijit._Widget
+ },
+
+ getNextSibling: function(){
+ // summary:
+ // Returns null if this is the last child of the parent,
+ // otherwise returns the next element sibling to the "right".
+
+ return this._getSibling("next"); // dijit._Widget
+ },
+
+ getIndexInParent: function(){
+ // summary:
+ // Returns the index of this widget within its container parent.
+ // It returns -1 if the parent does not exist, or if the parent
+ // is not a dijit._Container
+
+ var p = this.getParent();
+ if(!p || !p.getIndexOfChild){
+ return -1; // int
+ }
+ return p.getIndexOfChild(this); // int
}
-
- // If I am a top level widget
- if(!this.getParent || !this.getParent()){
+ }
+ );
+
+
+}
+
+if(!dojo._hasResource["dijit.layout._LayoutWidget"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.layout._LayoutWidget"] = true;
+dojo.provide("dijit.layout._LayoutWidget");
+
+
+
+
+
+dojo.declare("dijit.layout._LayoutWidget",
+ [dijit._Widget, dijit._Container, dijit._Contained],
+ {
+ // summary:
+ // Base class for a _Container widget which is responsible for laying out its children.
+ // Widgets which mixin this code must define layout() to manage placement and sizing of the children.
+
+ // baseClass: [protected extension] String
+ // This class name is applied to the widget's domNode
+ // and also may be used to generate names for sub nodes,
+ // for example dijitTabContainer-content.
+ baseClass: "dijitLayoutContainer",
+
+ // isLayoutContainer: [protected] Boolean
+ // Indicates that this widget is going to call resize() on its
+ // children widgets, setting their size, when they become visible.
+ isLayoutContainer: true,
+
+ postCreate: function(){
+ dojo.addClass(this.domNode, "dijitContainer");
+ dojo.addClass(this.domNode, this.baseClass);
+
+ this.inherited(arguments);
+ },
+
+ startup: function(){
+ // summary:
+ // Called after all the widgets have been instantiated and their
+ // dom nodes have been inserted somewhere under dojo.doc.body.
+ //
+ // Widgets should override this method to do any initialization
+ // dependent on other widgets existing, and then call
+ // this superclass method to finish things off.
+ //
+ // startup() in subclasses shouldn't do anything
+ // size related because the size of the widget hasn't been set yet.
+
+ if(this._started){ return; }
+
+ // Need to call inherited first - so that child widgets get started
+ // up correctly
+ this.inherited(arguments);
+
+ // If I am a not being controlled by a parent layout widget...
+ var parent = this.getParent && this.getParent()
+ if(!(parent && parent.isLayoutContainer)){
// Do recursive sizing and layout of all my descendants
// (passing in no argument to resize means that it has to glean the size itself)
this.resize();
- // since my parent isn't a layout container, and my style is width=height=100% (or something similar),
- // then I need to watch when the window resizes, and size myself accordingly
- // (passing in no argument to resize means that it has to glean the size itself)
- this.connect(window, 'onresize', function(){this.resize();});
+ // Since my parent isn't a layout container, and my style *may be* width=height=100%
+ // or something similar (either set directly or via a CSS class),
+ // monitor when my size changes so that I can re-layout.
+ // For browsers where I can't directly monitor when my size changes,
+ // monitor when the viewport changes size, which *may* indicate a size change for me.
+ this.connect(dojo.isIE ? this.domNode : dojo.global, 'onresize', function(){
+ // Using function(){} closure to ensure no arguments to resize.
+ this.resize();
+ });
}
},
- resize: function(args){
+ resize: function(changeSize, resultSize){
// summary:
- // Explicitly set this widget's size (in pixels),
- // and then call layout() to resize contents (and maybe adjust child widgets)
- //
- // args: Object?
- // {w: int, h: int, l: int, t: int}
+ // Call this to resize a widget, or after its size has changed.
+ // description:
+ // Change size mode:
+ // When changeSize is specified, changes the marginBox of this widget
+ // and forces it to relayout its contents accordingly.
+ // changeSize may specify height, width, or both.
+ //
+ // If resultSize is specified it indicates the size the widget will
+ // become after changeSize has been applied.
+ //
+ // Notification mode:
+ // When changeSize is null, indicates that the caller has already changed
+ // the size of the widget, or perhaps it changed because the browser
+ // window was resized. Tells widget to relayout its contents accordingly.
+ //
+ // If resultSize is also specified it indicates the size the widget has
+ // become.
+ //
+ // In either mode, this method also:
+ // 1. Sets this._borderBox and this._contentBox to the new size of
+ // the widget. Queries the current domNode size if necessary.
+ // 2. Calls layout() to resize contents (and maybe adjust child widgets).
+ //
+ // changeSize: Object?
+ // Sets the widget to this margin-box size and position.
+ // May include any/all of the following properties:
+ // | {w: int, h: int, l: int, t: int}
+ //
+ // resultSize: Object?
+ // The margin-box size of this widget after applying changeSize (if
+ // changeSize is specified). If caller knows this size and
+ // passes it in, we don't need to query the browser to get the size.
+ // | {w: int, h: int}
var node = this.domNode;
// set margin box size, unless it wasn't specified, in which case use current size
- if(args){
- dojo.marginBox(node, args);
+ if(changeSize){
+ dojo.marginBox(node, changeSize);
// set offset of the node
- if(args.t){ node.style.top = args.t + "px"; }
- if(args.l){ node.style.left = args.l + "px"; }
+ if(changeSize.t){ node.style.top = changeSize.t + "px"; }
+ if(changeSize.l){ node.style.left = changeSize.l + "px"; }
}
+
// If either height or width wasn't specified by the user, then query node for it.
// But note that setting the margin box and then immediately querying dimensions may return
// inaccurate results, so try not to depend on it.
- var mb = dojo.mixin(dojo.marginBox(node), args||{});
-
- // Save the size of my content box.
- this._contentBox = dijit.layout.marginBox2contentBox(node, mb);
-
- // Callback for widget to adjust size of it's children
+ var mb = resultSize || {};
+ dojo.mixin(mb, changeSize || {}); // changeSize overrides resultSize
+ if( !("h" in mb) || !("w" in mb) ){
+ mb = dojo.mixin(dojo.marginBox(node), mb); // just use dojo.marginBox() to fill in missing values
+ }
+
+ // Compute and save the size of my border box and content box
+ // (w/out calling dojo.contentBox() since that may fail if size was recently set)
+ var cs = dojo.getComputedStyle(node);
+ var me = dojo._getMarginExtents(node, cs);
+ var be = dojo._getBorderExtents(node, cs);
+ var bb = (this._borderBox = {
+ w: mb.w - (me.w + be.w),
+ h: mb.h - (me.h + be.h)
+ });
+ var pe = dojo._getPadExtents(node, cs);
+ this._contentBox = {
+ l: dojo._toPixelValue(node, cs.paddingLeft),
+ t: dojo._toPixelValue(node, cs.paddingTop),
+ w: bb.w - pe.w,
+ h: bb.h - pe.h
+ };
+
+ // Callback for widget to adjust size of its children
this.layout();
},
layout: function(){
- // summary
- // Widgets override this method to size & position their contents/children.
+ // summary:
+ // Widgets override this method to size and position their contents/children.
// When this is called this._contentBox is guaranteed to be set (see resize()).
//
// This is called after startup(), and also when the widget's size has been
// changed.
+ // tags:
+ // protected extension
+ },
+
+ _setupChild: function(/*dijit._Widget*/child){
+ // summary:
+ // Common setup for initial children and children which are added after startup
+ // tags:
+ // protected extension
+
+ dojo.addClass(child.domNode, this.baseClass+"-child");
+ if(child.baseClass){
+ dojo.addClass(child.domNode, this.baseClass+"-"+child.baseClass);
+ }
+ },
+
+ addChild: function(/*dijit._Widget*/ child, /*Integer?*/ insertIndex){
+ // Overrides _Container.addChild() to call _setupChild()
+ this.inherited(arguments);
+ if(this._started){
+ this._setupChild(child);
+ }
+ },
+
+ removeChild: function(/*dijit._Widget*/ child){
+ // Overrides _Container.removeChild() to remove class added by _setupChild()
+ dojo.removeClass(child.domNode, this.baseClass+"-child");
+ if(child.baseClass){
+ dojo.removeClass(child.domNode, this.baseClass+"-"+child.baseClass);
+ }
+ this.inherited(arguments);
}
}
);
dijit.layout.marginBox2contentBox = function(/*DomNode*/ node, /*Object*/ mb){
// summary:
- // Given the margin-box size of a node, return it's content box size.
+ // Given the margin-box size of a node, return its content box size.
// Functions like dojo.contentBox() but is more reliable since it doesn't have
// to wait for the browser to compute sizes.
var cs = dojo.getComputedStyle(node);
- var me=dojo._getMarginExtents(node, cs);
- var pb=dojo._getPadBorderExtents(node, cs);
+ var me = dojo._getMarginExtents(node, cs);
+ var pb = dojo._getPadBorderExtents(node, cs);
return {
l: dojo._toPixelValue(node, cs.paddingLeft),
t: dojo._toPixelValue(node, cs.paddingTop),
w: mb.w - (me.w + pb.w),
h: mb.h - (me.h + pb.h)
};
};
(function(){
var capitalize = function(word){
return word.substring(0,1).toUpperCase() + word.substring(1);
};
var size = function(widget, dim){
// size the child
widget.resize ? widget.resize(dim) : dojo.marginBox(widget.domNode, dim);
// record child's size, but favor our own numbers when we have them.
// the browser lies sometimes
dojo.mixin(widget, dojo.marginBox(widget.domNode));
dojo.mixin(widget, dim);
};
dijit.layout.layoutChildren = function(/*DomNode*/ container, /*Object*/ dim, /*Object[]*/ children){
- /**
- * summary
- * Layout a bunch of child dom nodes within a parent dom node
- * container:
- * parent node
- * dim:
- * {l, t, w, h} object specifying dimensions of container into which to place children
- * children:
- * an array like [ {domNode: foo, layoutAlign: "bottom" }, {domNode: bar, layoutAlign: "client"} ]
- */
+ // summary
+ // Layout a bunch of child dom nodes within a parent dom node
+ // container:
+ // parent node
+ // dim:
+ // {l, t, w, h} object specifying dimensions of container into which to place children
+ // children:
+ // an array like [ {domNode: foo, layoutAlign: "bottom" }, {domNode: bar, layoutAlign: "client"} ]
// copy dim because we are going to modify it
dim = dojo.mixin({}, dim);
dojo.addClass(container, "dijitLayoutContainer");
// Move "client" elements to the end of the array for layout. a11y dictates that the author
// needs to be able to put them in the document in tab-order, but this algorithm requires that
// client be last.
children = dojo.filter(children, function(item){ return item.layoutAlign != "client"; })
.concat(dojo.filter(children, function(item){ return item.layoutAlign == "client"; }));
// set positions/sizes
dojo.forEach(children, function(child){
var elm = child.domNode,
pos = child.layoutAlign;
// set elem to upper left corner of unused space; may move it later
var elmStyle = elm.style;
elmStyle.left = dim.l+"px";
elmStyle.top = dim.t+"px";
elmStyle.bottom = elmStyle.right = "auto";
dojo.addClass(elm, "dijitAlign" + capitalize(pos));
// set size && adjust record of remaining space.
- // note that setting the width of a <div> may affect it's height.
- if(pos=="top" || pos=="bottom"){
+ // note that setting the width of a <div> may affect its height.
+ if(pos == "top" || pos == "bottom"){
size(child, { w: dim.w });
dim.h -= child.h;
- if(pos=="top"){
+ if(pos == "top"){
dim.t += child.h;
}else{
elmStyle.top = dim.t + dim.h + "px";
}
- }else if(pos=="left" || pos=="right"){
+ }else if(pos == "left" || pos == "right"){
size(child, { h: dim.h });
dim.w -= child.w;
- if(pos=="left"){
+ if(pos == "left"){
dim.l += child.w;
}else{
elmStyle.left = dim.l + dim.w + "px";
}
- }else if(pos=="client"){
+ }else if(pos == "client"){
size(child, dim);
}
});
};
})();
}
if(!dojo._hasResource["dijit.form._FormWidget"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.form._FormWidget"] = true;
dojo.provide("dijit.form._FormWidget");
dojo.declare("dijit.form._FormWidget", [dijit._Widget, dijit._Templated],
-{
- /*
- Summary:
- FormElement widgets correspond to native HTML elements such as <input> or <button> or <select>.
- Each FormElement represents a single input value, and has a (possibly hidden) <input> element,
- to which it serializes its input value, so that form submission (either normal submission or via FormBind?)
- works as expected.
-
- All these widgets should have these attributes just like native HTML input elements.
- You can set them during widget construction, but after that they are read only.
-
- They also share some common methods.
- */
-
- // baseClass: String
+ {
+ // summary:
+ // Base class for widgets corresponding to native HTML elements such as <checkbox> or <button>,
+ // which can be children of a <form> node or a `dijit.form.Form` widget.
+ //
+ // description:
+ // Represents a single HTML element.
+ // All these widgets should have these attributes just like native HTML input elements.
+ // You can set them during widget construction or afterwards, via `dijit._Widget.attr`.
+ //
+ // They also share some common methods.
+
+ // baseClass: [protected] String
// Root CSS class of the widget (ex: dijitTextBox), used to add CSS classes of widget
// (ex: "dijitTextBox dijitTextBoxInvalid dijitTextBoxFocused dijitTextBoxInvalidFocused")
// See _setStateClass().
baseClass: "",
- // value: String
- // Corresponds to the native HTML <input> element's attribute.
- value: "",
-
// name: String
// Name used when submitting form; same as "name" attribute or plain HTML elements
name: "",
- // id: String
- // Corresponds to the native HTML <input> element's attribute.
- // Also becomes the id for the widget.
- id: "",
-
// alt: String
// Corresponds to the native HTML <input> element's attribute.
alt: "",
+ // value: String
+ // Corresponds to the native HTML <input> element's attribute.
+ value: "",
+
// type: String
// Corresponds to the native HTML <input> element's attribute.
type: "text",
// tabIndex: Integer
// Order fields are traversed when user hits the tab key
tabIndex: "0",
// disabled: Boolean
// Should this widget respond to user input?
// In markup, this is specified as "disabled='disabled'", or just "disabled".
disabled: false,
// intermediateChanges: Boolean
// Fires onChange for each value change or only on demand
intermediateChanges: false,
+ // scrollOnFocus: Boolean
+ // On focus, should this widget scroll into view?
+ scrollOnFocus: true,
+
// These mixins assume that the focus node is an INPUT, as many but not all _FormWidgets are.
- // Don't attempt to mixin the 'type', 'name' attributes here programatically -- they must be declared
- // directly in the template as read by the parser in order to function. IE is known to specifically
- // require the 'name' attribute at element creation time.
- attributeMap: dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),
- {id:"focusNode", tabIndex:"focusNode", alt:"focusNode"}),
+ attributeMap: dojo.delegate(dijit._Widget.prototype.attributeMap, {
+ value: "focusNode",
+ id: "focusNode",
+ tabIndex: "focusNode",
+ alt: "focusNode",
+ title: "focusNode"
+ }),
+
+ postMixInProperties: function(){
+ // Setup name=foo string to be referenced from the template (but only if a name has been specified)
+ // Unfortunately we can't use attributeMap to set the name due to IE limitations, see #8660
+ this.nameAttrSetting = this.name ? ("name='" + this.name + "'") : "";
+ this.inherited(arguments);
+ },
+
+ _setDisabledAttr: function(/*Boolean*/ value){
+ this.disabled = value;
+ dojo.attr(this.focusNode, 'disabled', value);
+ if(this.valueNode){
+ dojo.attr(this.valueNode, 'disabled', value);
+ }
+ dijit.setWaiState(this.focusNode, "disabled", value);
+
+ if(value){
+ // reset those, because after the domNode is disabled, we can no longer receive
+ // mouse related events, see #4200
+ this._hovering = false;
+ this._active = false;
+ // remove the tabIndex, especially for FF
+ this.focusNode.setAttribute('tabIndex', "-1");
+ }else{
+ this.focusNode.setAttribute('tabIndex', this.tabIndex);
+ }
+ this._setStateClass();
+ },
setDisabled: function(/*Boolean*/ disabled){
// summary:
- // Set disabled state of widget.
-
- this.domNode.disabled = this.disabled = disabled;
- if(this.focusNode){
- this.focusNode.disabled = disabled;
+ // Deprecated. Use attr('disabled', ...) instead.
+ dojo.deprecated("setDisabled("+disabled+") is deprecated. Use attr('disabled',"+disabled+") instead.", "", "2.0");
+ this.attr('disabled', disabled);
+ },
+
+ _onFocus: function(e){
+ if(this.scrollOnFocus){
+ dijit.scrollIntoView(this.domNode);
}
- if(disabled){
- //reset those, because after the domNode is disabled, we can no longer receive
- //mouse related events, see #4200
- this._hovering = false;
- this._active = false;
- }
- dijit.setWaiState(this.focusNode || this.domNode, "disabled", disabled);
- this._setStateClass();
+ this.inherited(arguments);
},
-
_onMouse : function(/*Event*/ event){
// summary:
// Sets _hovering, _active, and stateModifier properties depending on mouse state,
// then calls setStateClass() to set appropriate CSS classes for this.domNode.
//
// To get a different CSS class for hover, send onmouseover and onmouseout events to this method.
// To get a different CSS class while mouse button is depressed, send onmousedown to this method.
- var mouseNode = event.target;
+ var mouseNode = event.currentTarget;
if(mouseNode && mouseNode.getAttribute){
this.stateModifier = mouseNode.getAttribute("stateModifier") || "";
}
if(!this.disabled){
switch(event.type){
- case "mouseenter" :
- case "mouseover" :
+ case "mouseenter":
+ case "mouseover":
this._hovering = true;
+ this._active = this._mouseDown;
break;
- case "mouseout" :
- case "mouseleave" :
+ case "mouseout":
+ case "mouseleave":
this._hovering = false;
+ this._active = false;
break;
case "mousedown" :
this._active = true;
+ this._mouseDown = true;
// set a global event to handle mouseup, so it fires properly
// even if the cursor leaves the button
- var self = this;
- // #2685: use this.connect and disconnect so destroy works properly
var mouseUpConnector = this.connect(dojo.body(), "onmouseup", function(){
- self._active = false;
- self._setStateClass();
- self.disconnect(mouseUpConnector);
+ // if user clicks on the button, even if the mouse is released outside of it,
+ // this button should get focus (which mimics native browser buttons)
+ if(this._mouseDown && this.isFocusable()){
+ this.focus();
+ }
+ this._active = false;
+ this._mouseDown = false;
+ this._setStateClass();
+ this.disconnect(mouseUpConnector);
});
break;
}
this._setStateClass();
}
},
isFocusable: function(){
- return !this.disabled && (dojo.style(this.domNode, "display") != "none");
+ // summary:
+ // Tells if this widget is focusable or not. Used internally by dijit.
+ // tags:
+ // protected
+ return !this.disabled && !this.readOnly && this.focusNode && (dojo.style(this.domNode, "display") != "none");
},
focus: function(){
+ // summary:
+ // Put focus on this widget
dijit.focus(this.focusNode);
},
_setStateClass: function(){
- // summary
- // Update the visual state of the widget by setting the css classes on this.domNode
- // (or this.stateNode if defined) by combining this.baseClass with
- // various suffixes that represent the current widget state(s).
+ // summary:
+ // Update the visual state of the widget by setting the css classes on this.domNode
+ // (or this.stateNode if defined) by combining this.baseClass with
+ // various suffixes that represent the current widget state(s).
//
- // In the case where a widget has multiple
- // states, it sets the class based on all possible
- // combinations. For example, an invalid form widget that is being hovered
- // will be "dijitInput dijitInputInvalid dijitInputHover dijitInputInvalidHover".
- //
- // For complex widgets with multiple regions, there can be various hover/active states,
- // such as "Hover" or "CloseButtonHover" (for tab buttons).
- // This is controlled by a stateModifier="CloseButton" attribute on the close button node.
+ // description:
+ // In the case where a widget has multiple
+ // states, it sets the class based on all possible
+ // combinations. For example, an invalid form widget that is being hovered
+ // will be "dijitInput dijitInputInvalid dijitInputHover dijitInputInvalidHover".
//
- // The widget may have one or more of the following states, determined
- // by this.state, this.checked, this.valid, and this.selected:
- // Error - ValidationTextBox sets this.state to "Error" if the current input value is invalid
- // Checked - ex: a checkmark or a ToggleButton in a checked state, will have this.checked==true
- // Selected - ex: currently selected tab will have this.selected==true
+ // For complex widgets with multiple regions, there can be various hover/active states,
+ // such as "Hover" or "CloseButtonHover" (for tab buttons).
+ // This is controlled by a stateModifier="CloseButton" attribute on the close button node.
//
- // In addition, it may have at most one of the following states,
- // based on this.disabled and flags set in _onMouse (this._active, this._hovering, this._focused):
- // Disabled - if the widget is disabled
- // Active - if the mouse (or space/enter key?) is being pressed down
- // Focused - if the widget has focus
- // Hover - if the mouse is over the widget
+ // The widget may have one or more of the following states, determined
+ // by this.state, this.checked, this.valid, and this.selected:
+ // - Error - ValidationTextBox sets this.state to "Error" if the current input value is invalid
+ // - Checked - ex: a checkmark or a ToggleButton in a checked state, will have this.checked==true
+ // - Selected - ex: currently selected tab will have this.selected==true
//
- // (even if multiple af the above conditions are true we only pick the first matching one)
-
-
- // Get original (non state related, non baseClass related) class specified in template
- if(!("staticClass" in this)){
- this.staticClass = (this.stateNode||this.domNode).className;
- }
+ // In addition, it may have one or more of the following states,
+ // based on this.disabled and flags set in _onMouse (this._active, this._hovering, this._focused):
+ // - Disabled - if the widget is disabled
+ // - Active - if the mouse (or space/enter key?) is being pressed down
+ // - Focused - if the widget has focus
+ // - Hover - if the mouse is over the widget
// Compute new set of classes
- var classes = [ this.baseClass ];
+ var newStateClasses = this.baseClass.split(" ");
function multiply(modifier){
- classes=classes.concat(dojo.map(classes, function(c){ return c+modifier; }));
+ newStateClasses = newStateClasses.concat(dojo.map(newStateClasses, function(c){ return c+modifier; }), "dijit"+modifier);
}
if(this.checked){
multiply("Checked");
}
if(this.state){
multiply(this.state);
}
if(this.selected){
multiply("Selected");
}
- // Only one of these four can be applied.
- // Active trumps Focused, Focused trumps Hover, and Disabled trumps all.
if(this.disabled){
multiply("Disabled");
+ }else if(this.readOnly){
+ multiply("ReadOnly");
}else if(this._active){
multiply(this.stateModifier+"Active");
}else{
if(this._focused){
multiply("Focused");
}
- if((this.stateModifier || !this._focused) && this._hovering){
+ if(this._hovering){
multiply(this.stateModifier+"Hover");
}
}
- (this.stateNode || this.domNode).className = this.staticClass + " " + classes.join(" ");
+
+ // Remove old state classes and add new ones.
+ // For performance concerns we only write into domNode.className once.
+ var tn = this.stateNode || this.domNode,
+ classHash = {}; // set of all classes (state and otherwise) for node
+
+ dojo.forEach(tn.className.split(" "), function(c){ classHash[c] = true; });
+
+ if("_stateClasses" in this){
+ dojo.forEach(this._stateClasses, function(c){ delete classHash[c]; });
+ }
+
+ dojo.forEach(newStateClasses, function(c){ classHash[c] = true; });
+
+ var newClasses = [];
+ for(var c in classHash){
+ newClasses.push(c);
+ }
+ tn.className = newClasses.join(" ");
+
+ this._stateClasses = newStateClasses;
+ },
+
+ compare: function(/*anything*/val1, /*anything*/val2){
+ // summary:
+ // Compare 2 values (as returned by attr('value') for this widget).
+ // tags:
+ // protected
+ if(typeof val1 == "number" && typeof val2 == "number"){
+ return (isNaN(val1) && isNaN(val2)) ? 0 : val1 - val2;
+ }else if(val1 > val2){
+ return 1;
+ }else if(val1 < val2){
+ return -1;
+ }else{
+ return 0;
+ }
},
onChange: function(newValue){
- // summary: callback when value is changed
+ // summary:
+ // Callback when this widget's value is changed.
+ // tags:
+ // callback
+ },
+
+ // _onChangeActive: [private] Boolean
+ // Indicates that changes to the value should call onChange() callback.
+ // This is false during widget initialization, to avoid calling onChange()
+ // when the initial value is set.
+ _onChangeActive: false,
+
+ _handleOnChange: function(/*anything*/ newValue, /* Boolean? */ priorityChange){
+ // summary:
+ // Called when the value of the widget is set. Calls onChange() if appropriate
+ // newValue:
+ // the new value
+ // priorityChange:
+ // For a slider, for example, dragging the slider is priorityChange==false,
+ // but on mouse up, it's priorityChange==true. If intermediateChanges==true,
+ // onChange is only called form priorityChange=true events.
+ // tags:
+ // private
+ this._lastValue = newValue;
+ if(this._lastValueReported == undefined && (priorityChange === null || !this._onChangeActive)){
+ // this block executes not for a change, but during initialization,
+ // and is used to store away the original value (or for ToggleButton, the original checked state)
+ this._resetValue = this._lastValueReported = newValue;
+ }
+ if((this.intermediateChanges || priorityChange || priorityChange === undefined) &&
+ ((typeof newValue != typeof this._lastValueReported) ||
+ this.compare(newValue, this._lastValueReported) != 0)){
+ this._lastValueReported = newValue;
+ if(this._onChangeActive){
+ if(this._onChangeHandle){
+ clearTimeout(this._onChangeHandle);
+ }
+ // setTimout allows hidden value processing to run and
+ // also the onChange handler can safely adjust focus, etc
+ this._onChangeHandle = setTimeout(dojo.hitch(this,
+ function(){
+ this._onChangeHandle = null;
+ this.onChange(newValue);
+ }), 0); // try to collapse multiple onChange's fired faster than can be processed
+ }
+ }
+ },
+
+ create: function(){
+ // Overrides _Widget.create()
+ this.inherited(arguments);
+ this._onChangeActive = true;
+ this._setStateClass();
+ },
+
+ destroy: function(){
+ if(this._onChangeHandle){ // destroy called before last onChange has fired
+ clearTimeout(this._onChangeHandle);
+ this.onChange(this._lastValueReported);
+ }
+ this.inherited(arguments);
+ },
+
+ setValue: function(/*String*/ value){
+ // summary:
+ // Deprecated. Use attr('value', ...) instead.
+ dojo.deprecated("dijit.form._FormWidget:setValue("+value+") is deprecated. Use attr('value',"+value+") instead.", "", "2.0");
+ this.attr('value', value);
+ },
+
+ getValue: function(){
+ // summary:
+ // Deprecated. Use attr('value') instead.
+ dojo.deprecated(this.declaredClass+"::getValue() is deprecated. Use attr('value') instead.", "", "2.0");
+ return this.attr('value');
+ }
+});
+
+dojo.declare("dijit.form._FormValueWidget", dijit.form._FormWidget,
+{
+ // summary:
+ // Base class for widgets corresponding to native HTML elements such as <input> or <select> that have user changeable values.
+ // description:
+ // Each _FormValueWidget represents a single input value, and has a (possibly hidden) <input> element,
+ // to which it serializes it's input value, so that form submission (either normal submission or via FormBind?)
+ // works as expected.
+
+ // Don't attempt to mixin the 'type', 'name' attributes here programatically -- they must be declared
+ // directly in the template as read by the parser in order to function. IE is known to specifically
+ // require the 'name' attribute at element creation time. See #8484, #8660.
+ // TODO: unclear what that {value: ""} is for; FormWidget.attributeMap copies value to focusNode,
+ // so maybe {value: ""} is so the value *doesn't* get copied to focusNode?
+ // Seems like we really want value removed from attributeMap altogether
+ // (although there's no easy way to do that now)
+
+ // readOnly: Boolean
+ // Should this widget respond to user input?
+ // In markup, this is specified as "readOnly".
+ // Similar to disabled except readOnly form values are submitted.
+ readOnly: false,
+
+ attributeMap: dojo.delegate(dijit.form._FormWidget.prototype.attributeMap, {
+ value: "",
+ readOnly: "focusNode"
+ }),
+
+ _setReadOnlyAttr: function(/*Boolean*/ value){
+ this.readOnly = value;
+ dojo.attr(this.focusNode, 'readOnly', value);
+ dijit.setWaiState(this.focusNode, "readonly", value);
+ this._setStateClass();
},
postCreate: function(){
- this.setValue(this.value, null); // null reserved for initial value
- this.setDisabled(this.disabled);
- this._setStateClass();
- },
-
- setValue: function(/*anything*/ newValue, /*Boolean, optional*/ priorityChange){
- // summary: set the value of the widget.
- this._lastValue = newValue;
- dijit.setWaiState(this.focusNode || this.domNode, "valuenow", this.forWaiValuenow());
- if(priorityChange === undefined){ priorityChange = true; } // setValue with value only should fire onChange
- if(this._lastValueReported == undefined && priorityChange === null){ // don't report the initial value
- this._lastValueReported = newValue;
+ if(dojo.isIE){ // IE won't stop the event with keypress
+ this.connect(this.focusNode || this.domNode, "onkeydown", this._onKeyDown);
}
- if((this.intermediateChanges || priorityChange) &&
- ((newValue && newValue.toString)?newValue.toString():newValue) !== ((this._lastValueReported && this._lastValueReported.toString)?this._lastValueReported.toString():this._lastValueReported)){
- this._lastValueReported = newValue;
- this.onChange(newValue);
+ // Update our reset value if it hasn't yet been set (because this.attr
+ // is only called when there *is* a value
+ if(this._resetValue === undefined){
+ this._resetValue = this.value;
}
},
- getValue: function(){
- // summary: get the value of the widget.
+ _setValueAttr: function(/*anything*/ newValue, /*Boolean, optional*/ priorityChange){
+ // summary:
+ // Hook so attr('value', value) works.
+ // description:
+ // Sets the value of the widget.
+ // If the value has changed, then fire onChange event, unless priorityChange
+ // is specified as null (or false?)
+ this.value = newValue;
+ this._handleOnChange(newValue, priorityChange);
+ },
+
+ _getValueAttr: function(){
+ // summary:
+ // Hook so attr('value') works.
return this._lastValue;
},
undo: function(){
- // summary: restore the value to the last value passed to onChange
- this.setValue(this._lastValueReported, false);
+ // summary:
+ // Restore the value to the last value passed to onChange
+ this._setValueAttr(this._lastValueReported, false);
+ },
+
+ reset: function(){
+ // summary:
+ // Reset the widget's value to what it was at initialization time
+ this._hasBeenBlurred = false;
+ this._setValueAttr(this._resetValue, true);
},
- _onKeyPress: function(e){
- if(e.keyCode == dojo.keys.ESCAPE && !e.shiftKey && !e.ctrlKey && !e.altKey){
- var v = this.getValue();
- var lv = this._lastValueReported;
- // Equality comparison of objects such as dates are done by reference so
- // two distinct objects are != even if they have the same data. So use
- // toStrings in case the values are objects.
- if((typeof lv != "undefined") && ((v!==null && v.toString)?v.toString():null) !== lv.toString()){
- this.undo();
- dojo.stopEvent(e);
- return false;
+ _onKeyDown: function(e){
+ if(e.keyCode == dojo.keys.ESCAPE && !(e.ctrlKey || e.altKey || e.metaKey)){
+ var te;
+ if(dojo.isIE){
+ e.preventDefault(); // default behavior needs to be stopped here since keypress is too late
+ te = document.createEventObject();
+ te.keyCode = dojo.keys.ESCAPE;
+ te.shiftKey = e.shiftKey;
+ e.srcElement.fireEvent('onkeypress', te);
}
}
- return true;
},
- forWaiValuenow: function(){
- // summary: returns a value, reflecting the current state of the widget,
- // to be used for the ARIA valuenow.
- // This method may be overridden by subclasses that want
- // to use something other than this.getValue() for valuenow
- return this.getValue();
+ _layoutHackIE7: function(){
+ // summary:
+ // Work around table sizing bugs on IE7 by forcing redraw
+
+ if(dojo.isIE == 7){ // fix IE7 layout bug when the widget is scrolled out of sight
+ var domNode = this.domNode;
+ var parent = domNode.parentNode;
+ var pingNode = domNode.firstChild || domNode; // target node most unlikely to have a custom filter
+ var origFilter = pingNode.style.filter; // save custom filter, most likely nothing
+ while(parent && parent.clientHeight == 0){ // search for parents that haven't rendered yet
+ parent._disconnectHandle = this.connect(parent, "onscroll", dojo.hitch(this, function(e){
+ this.disconnect(parent._disconnectHandle); // only call once
+ parent.removeAttribute("_disconnectHandle"); // clean up DOM node
+ pingNode.style.filter = (new Date()).getMilliseconds(); // set to anything that's unique
+ setTimeout(function(){ pingNode.style.filter = origFilter }, 0); // restore custom filter, if any
+ }));
+ parent = parent.parentNode;
+ }
+ }
}
});
}
if(!dojo._hasResource["dijit.dijit"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.dijit"] = true;
dojo.provide("dijit.dijit");
+/*=====
+dijit.dijit = {
+ // summary:
+ // A roll-up for common dijit methods
+ // description:
+ // A rollup file for the build system including the core and common
+ // dijit files.
+ //
+ // example:
+ // | <script type="text/javascript" src="js/dojo/dijit/dijit.js"></script>
+ //
+};
+=====*/
+
// All the stuff in _base (these are the function that are guaranteed available without an explicit dojo.require)
// And some other stuff that we tend to pull in all the time anyway
}
diff --git a/js/dojo/dijit/form/Button.js b/js/dojo/dijit/form/Button.js
--- a/js/dojo/dijit/form/Button.js
+++ b/js/dojo/dijit/form/Button.js
@@ -1,380 +1,157 @@
-if(!dojo._hasResource["dijit.form.Button"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.form.Button"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit.form.Button"]){
+dojo._hasResource["dijit.form.Button"]=true;
dojo.provide("dijit.form.Button");
-
dojo.require("dijit.form._FormWidget");
dojo.require("dijit._Container");
-
-dojo.declare("dijit.form.Button", dijit.form._FormWidget, {
-/*
- * usage
- * <button dojoType="button" onClick="...">Hello world</button>
- *
- * var button1 = new dijit.form.Button({label: "hello world", onClick: foo});
- * dojo.body().appendChild(button1.domNode);
- */
- // summary
- // Basically the same thing as a normal HTML button, but with special styling.
-
- // label: String
- // text to display in button
- label: "",
-
- // showLabel: Boolean
- // whether or not to display the text label in button
- showLabel: true,
-
- // iconClass: String
- // class to apply to div in button to make it display an icon
- iconClass: "",
-
- type: "button",
- baseClass: "dijitButton",
- templateString:"<div class=\"dijit dijitLeft dijitInline dijitButton\"\n\tdojoAttachEvent=\"onclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\n\t><div class='dijitRight'\n\t\t><button class=\"dijitStretch dijitButtonNode dijitButtonContents\" dojoAttachPoint=\"focusNode,titleNode\"\n\t\t\ttype=\"${type}\" waiRole=\"button\" waiState=\"labelledby-${id}_label\"\n\t\t\t><span class=\"dijitInline ${iconClass}\" dojoAttachPoint=\"iconNode\" \n \t\t\t\t><span class=\"dijitToggleButtonIconChar\">&#10003</span \n\t\t\t></span\n\t\t\t><span class=\"dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\">${label}</span\n\t\t></button\n\t></div\n></div>\n",
-
- // TODO: set button's title to this.containerNode.innerText
-
- _onClick: function(/*Event*/ e){
- // summary: internal function to handle click actions
- if(this.disabled){ return false; }
- this._clicked(); // widget click actions
- return this.onClick(e); // user click actions
- },
-
- _onButtonClick: function(/*Event*/ e){
- // summary: callback when the user mouse clicks the button portion
- dojo.stopEvent(e);
- var okToSubmit = this._onClick(e) !== false; // returning nothing is same as true
-
- // for some reason type=submit buttons don't automatically submit the form; do it manually
- if(this.type=="submit" && okToSubmit){
- for(var node=this.domNode; node; node=node.parentNode){
- var widget=dijit.byNode(node);
- if(widget && widget._onSubmit){
- widget._onSubmit(e);
- break;
- }
- if(node.tagName.toLowerCase() == "form"){
- if(!node.onsubmit || node.onsubmit()){ node.submit(); }
- break;
- }
- }
- }
- },
-
- postCreate: function(){
- // summary:
- // get label and set as title on button icon if necessary
- if (this.showLabel == false){
- var labelText = "";
- this.label = this.containerNode.innerHTML;
- labelText = dojo.trim(this.containerNode.innerText || this.containerNode.textContent);
- // set title attrib on iconNode
- this.titleNode.title=labelText;
- dojo.addClass(this.containerNode,"dijitDisplayNone");
- }
- this.inherited(arguments);
- },
-
- onClick: function(/*Event*/ e){
- // summary: user callback for when button is clicked
- // if type="submit", return value != false to perform submit
- return true;
- },
-
- _clicked: function(/*Event*/ e){
- // summary: internal replaceable function for when the button is clicked
- },
-
- setLabel: function(/*String*/ content){
- // summary: reset the label (text) of the button; takes an HTML string
- this.containerNode.innerHTML = this.label = content;
- if(dojo.isMozilla){ // Firefox has re-render issues with tables
- var oldDisplay = dojo.getComputedStyle(this.domNode).display;
- this.domNode.style.display="none";
- var _this = this;
- setTimeout(function(){_this.domNode.style.display=oldDisplay;},1);
- }
- if (this.showLabel == false){
- this.titleNode.title=dojo.trim(this.containerNode.innerText || this.containerNode.textContent);
- }
- }
+dojo.require("dijit._HasDropDown");
+dojo.declare("dijit.form.Button",dijit.form._FormWidget,{label:"",showLabel:true,iconClass:"",type:"button",baseClass:"dijitButton",templateString:dojo.cache("dijit.form","templates/Button.html","<span class=\"dijit dijitReset dijitLeft dijitInline\"\n\tdojoAttachEvent=\"onclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\n\t><span class=\"dijitReset dijitRight dijitInline\"\n\t\t><span class=\"dijitReset dijitInline dijitButtonNode\"\n\t\t\t><button class=\"dijitReset dijitStretch dijitButtonContents\"\n\t\t\t\tdojoAttachPoint=\"titleNode,focusNode\"\n\t\t\t\t${nameAttrSetting} type=\"${type}\" value=\"${value}\" waiRole=\"button\" waiState=\"labelledby-${id}_label\"\n\t\t\t\t><span class=\"dijitReset dijitInline\" dojoAttachPoint=\"iconNode\"\n\t\t\t\t\t><span class=\"dijitReset dijitToggleButtonIconChar\">&#10003;</span\n\t\t\t\t></span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\n\t\t\t\t\tid=\"${id}_label\"\n\t\t\t\t\tdojoAttachPoint=\"containerNode\"\n\t\t\t\t></span\n\t\t\t></button\n\t\t></span\n\t></span\n></span>\n"),attributeMap:dojo.delegate(dijit.form._FormWidget.prototype.attributeMap,{label:{node:"containerNode",type:"innerHTML"},iconClass:{node:"iconNode",type:"class"}}),_onClick:function(e){
+if(this.disabled){
+return false;
+}
+this._clicked();
+return this.onClick(e);
+},_onButtonClick:function(e){
+if(this._onClick(e)===false){
+e.preventDefault();
+}else{
+if(this.type=="submit"&&!this.focusNode.form){
+for(var _1=this.domNode;_1.parentNode;_1=_1.parentNode){
+var _2=dijit.byNode(_1);
+if(_2&&typeof _2._onSubmit=="function"){
+_2._onSubmit(e);
+break;
+}
+}
+}
+}
+},_setValueAttr:function(_3){
+var _4=this.attributeMap.value||"";
+if(this[_4.node||_4||"domNode"].tagName=="BUTTON"){
+if(_3!=this.value){
+}
+}
+},_fillContent:function(_5){
+if(_5&&(!this.params||!("label" in this.params))){
+this.attr("label",_5.innerHTML);
+}
+},postCreate:function(){
+dojo.setSelectable(this.focusNode,false);
+this.inherited(arguments);
+},_setShowLabelAttr:function(_6){
+if(this.containerNode){
+dojo.toggleClass(this.containerNode,"dijitDisplayNone",!_6);
+}
+this.showLabel=_6;
+},onClick:function(e){
+return true;
+},_clicked:function(e){
+},setLabel:function(_7){
+dojo.deprecated("dijit.form.Button.setLabel() is deprecated. Use attr('label', ...) instead.","","2.0");
+this.attr("label",_7);
+},_setLabelAttr:function(_8){
+this.containerNode.innerHTML=this.label=_8;
+if(this.showLabel==false&&!this.params.title){
+this.titleNode.title=dojo.trim(this.containerNode.innerText||this.containerNode.textContent||"");
+}
+}});
+dojo.declare("dijit.form.DropDownButton",[dijit.form.Button,dijit._Container,dijit._HasDropDown],{baseClass:"dijitDropDownButton",templateString:dojo.cache("dijit.form","templates/DropDownButton.html","<span class=\"dijit dijitReset dijitLeft dijitInline\"\n\tdojoAttachPoint=\"_buttonNode\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\n\t><span class='dijitReset dijitRight dijitInline'\n\t\t><span class='dijitReset dijitInline dijitButtonNode'\n\t\t\t><button class=\"dijitReset dijitStretch dijitButtonContents\"\n\t\t\t\t${nameAttrSetting} type=\"${type}\" value=\"${value}\"\n\t\t\t\tdojoAttachPoint=\"focusNode,titleNode,_arrowWrapperNode\"\n\t\t\t\twaiRole=\"button\" waiState=\"haspopup-true,labelledby-${id}_label\"\n\t\t\t\t><span class=\"dijitReset dijitInline\"\n\t\t\t\t\tdojoAttachPoint=\"iconNode\"\n\t\t\t\t></span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\n\t\t\t\t\tdojoAttachPoint=\"containerNode,_popupStateNode\"\n\t\t\t\t\tid=\"${id}_label\"\n\t\t\t\t></span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonInner\">&thinsp;</span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonChar\">&#9660;</span\n\t\t\t></button\n\t\t></span\n\t></span\n></span>\n"),_fillContent:function(){
+if(this.srcNodeRef){
+var _9=dojo.query("*",this.srcNodeRef);
+dijit.form.DropDownButton.superclass._fillContent.call(this,_9[0]);
+this.dropDownContainer=this.srcNodeRef;
+}
+},startup:function(){
+if(this._started){
+return;
+}
+if(!this.dropDown){
+var _a=dojo.query("[widgetId]",this.dropDownContainer)[0];
+this.dropDown=dijit.byNode(_a);
+delete this.dropDownContainer;
+}
+dijit.popup.moveOffScreen(this.dropDown.domNode);
+this.inherited(arguments);
+},isLoaded:function(){
+var _b=this.dropDown;
+return (!_b.href||_b.isLoaded);
+},loadDropDown:function(){
+var _c=this.dropDown;
+if(!_c){
+return;
+}
+if(!this.isLoaded()){
+var _d=dojo.connect(_c,"onLoad",this,function(){
+dojo.disconnect(_d);
+this.openDropDown();
});
-
-/*
- * usage
- * <button dojoType="DropDownButton" label="Hello world"><div dojotype=dijit.Menu>...</div></button>
- *
- * var button1 = new dijit.form.DropDownButton({ label: "hi", dropDown: new dijit.Menu(...) });
- * dojo.body().appendChild(button1);
- */
-dojo.declare("dijit.form.DropDownButton", [dijit.form.Button, dijit._Container], {
- // summary
- // push the button and a menu shows up
-
- baseClass : "dijitDropDownButton",
-
- templateString:"<div class=\"dijit dijitLeft dijitInline\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse,onclick:_onDropDownClick,onkeydown:_onDropDownKeydown,onblur:_onDropDownBlur,onkeypress:_onKey\"\n\t><div class='dijitRight'>\n\t<button class=\"dijitStretch dijitButtonNode dijitButtonContents\" type=\"${type}\"\n\t\tdojoAttachPoint=\"focusNode,titleNode\" waiRole=\"button\" waiState=\"haspopup-true,labelledby-${id}_label\"\n\t\t><div class=\"dijitInline ${iconClass}\" dojoAttachPoint=\"iconNode\"></div\n\t\t><span class=\"dijitButtonText\" \tdojoAttachPoint=\"containerNode,popupStateNode\"\n\t\tid=\"${id}_label\">${label}</span\n\t\t><span class='dijitA11yDownArrow'>&#9660;</span>\n\t</button>\n</div></div>\n",
-
- _fillContent: function(){
- // my inner HTML contains both the button contents and a drop down widget, like
- // <DropDownButton> <span>push me</span> <Menu> ... </Menu> </DropDownButton>
- // The first node is assumed to be the button content. The widget is the popup.
- if(this.srcNodeRef){ // programatically created buttons might not define srcNodeRef
- //FIXME: figure out how to filter out the widget and use all remaining nodes as button
- // content, not just nodes[0]
- var nodes = dojo.query("*", this.srcNodeRef);
- dijit.form.DropDownButton.superclass._fillContent.call(this, nodes[0]);
-
- // save pointer to srcNode so we can grab the drop down widget after it's instantiated
- this.dropDownContainer = this.srcNodeRef;
- }
- },
-
- startup: function(){
- // the child widget from srcNodeRef is the dropdown widget. Insert it in the page DOM,
- // make it invisible, and store a reference to pass to the popup code.
- if(!this.dropDown){
- var dropDownNode = dojo.query("[widgetId]", this.dropDownContainer)[0];
- this.dropDown = dijit.byNode(dropDownNode);
- delete this.dropDownContainer;
- }
- dojo.body().appendChild(this.dropDown.domNode);
- this.dropDown.domNode.style.display="none";
- },
-
- _onArrowClick: function(/*Event*/ e){
- // summary: callback when the user mouse clicks on menu popup node
- if(this.disabled){ return; }
- this._toggleDropDown();
- },
-
- _onDropDownClick: function(/*Event*/ e){
- // on Firefox 2 on the Mac it is possible to fire onclick
- // by pressing enter down on a second element and transferring
- // focus to the DropDownButton;
- // we want to prevent opening our menu in this situation
- // and only do so if we have seen a keydown on this button;
- // e.detail != 0 means that we were fired by mouse
- var isMacFFlessThan3 = dojo.isFF && dojo.isFF < 3
- && navigator.appVersion.indexOf("Macintosh") != -1;
- if(!isMacFFlessThan3 || e.detail != 0 || this._seenKeydown){
- this._onArrowClick(e);
- }
- this._seenKeydown = false;
- },
-
- _onDropDownKeydown: function(/*Event*/ e){
- this._seenKeydown = true;
- },
-
- _onDropDownBlur: function(/*Event*/ e){
- this._seenKeydown = false;
- },
-
- _onKey: function(/*Event*/ e){
- // summary: callback when the user presses a key on menu popup node
- if(this.disabled){ return; }
- if(e.keyCode == dojo.keys.DOWN_ARROW){
- if(!this.dropDown || this.dropDown.domNode.style.display=="none"){
- dojo.stopEvent(e);
- return this._toggleDropDown();
- }
- }
- },
-
- _onBlur: function(){
- // summary: called magically when focus has shifted away from this widget and it's dropdown
- this._closeDropDown();
- // don't focus on button. the user has explicitly focused on something else.
- },
-
- _toggleDropDown: function(){
- // summary: toggle the drop-down widget; if it is up, close it, if not, open it
- if(this.disabled){ return; }
- dijit.focus(this.popupStateNode);
- var dropDown = this.dropDown;
- if(!dropDown){ return false; }
- if(!dropDown.isShowingNow){
- // If there's an href, then load that first, so we don't get a flicker
- if(dropDown.href && !dropDown.isLoaded){
- var self = this;
- var handler = dojo.connect(dropDown, "onLoad", function(){
- dojo.disconnect(handler);
- self._openDropDown();
- });
- dropDown._loadCheck(true);
- return;
- }else{
- this._openDropDown();
- }
- }else{
- this._closeDropDown();
- }
- },
-
- _openDropDown: function(){
- var dropDown = this.dropDown;
- var oldWidth=dropDown.domNode.style.width;
- var self = this;
-
- dijit.popup.open({
- parent: this,
- popup: dropDown,
- around: this.domNode,
- orient: this.isLeftToRight() ? {'BL':'TL', 'BR':'TR', 'TL':'BL', 'TR':'BR'}
- : {'BR':'TR', 'BL':'TL', 'TR':'BR', 'TL':'BL'},
- onExecute: function(){
- self._closeDropDown(true);
- },
- onCancel: function(){
- self._closeDropDown(true);
- },
- onClose: function(){
- dropDown.domNode.style.width = oldWidth;
- self.popupStateNode.removeAttribute("popupActive");
- this._opened = false;
- }
- });
- if(this.domNode.offsetWidth > dropDown.domNode.offsetWidth){
- var adjustNode = null;
- if(!this.isLeftToRight()){
- adjustNode = dropDown.domNode.parentNode;
- var oldRight = adjustNode.offsetLeft + adjustNode.offsetWidth;
- }
- // make menu at least as wide as the button
- dojo.marginBox(dropDown.domNode, {w: this.domNode.offsetWidth});
- if(adjustNode){
- adjustNode.style.left = oldRight - this.domNode.offsetWidth + "px";
- }
- }
- this.popupStateNode.setAttribute("popupActive", "true");
- this._opened=true;
- if(dropDown.focus){
- dropDown.focus();
- }
- // TODO: set this.checked and call setStateClass(), to affect button look while drop down is shown
- },
-
- _closeDropDown: function(/*Boolean*/ focus){
- if(this._opened){
- dijit.popup.close(this.dropDown);
- if(focus){ this.focus(); }
- this._opened = false;
- }
- }
+_c.refresh();
+}else{
+this.openDropDown();
+}
+},isFocusable:function(){
+return this.inherited(arguments)&&!this._mouseDown;
+}});
+dojo.declare("dijit.form.ComboButton",dijit.form.DropDownButton,{templateString:dojo.cache("dijit.form","templates/ComboButton.html","<table class='dijit dijitReset dijitInline dijitLeft'\n\tcellspacing='0' cellpadding='0' waiRole=\"presentation\"\n\t><tbody waiRole=\"presentation\"><tr waiRole=\"presentation\"\n\t\t><td class=\"dijitReset dijitStretch dijitButtonNode\"><button id=\"${id}_button\" class=\"dijitReset dijitButtonContents\"\n\t\t\tdojoAttachEvent=\"onclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse,onkeypress:_onButtonKeyPress\" dojoAttachPoint=\"titleNode\"\n\t\t\twaiRole=\"button\" waiState=\"labelledby-${id}_label\"\n\t\t\t><div class=\"dijitReset dijitInline\" dojoAttachPoint=\"iconNode\" waiRole=\"presentation\"></div\n\t\t\t><div class=\"dijitReset dijitInline dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\" waiRole=\"presentation\"></div\n\t\t></button></td\n\t\t><td id=\"${id}_arrow\" class='dijitReset dijitRight dijitButtonNode dijitArrowButton'\n\t\t\tdojoAttachPoint=\"_popupStateNode,focusNode,_buttonNode\"\n\t\t\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onkeypress:_onArrowKeyPress\"\n\t\t\tstateModifier=\"DownArrow\"\n\t\t\ttitle=\"${optionsTitle}\" ${nameAttrSetting}\n\t\t\twaiRole=\"button\" waiState=\"haspopup-true\"\n\t\t\t><div class=\"dijitReset dijitArrowButtonInner\" waiRole=\"presentation\">&thinsp;</div\n\t\t\t><div class=\"dijitReset dijitArrowButtonChar\" waiRole=\"presentation\">&#9660;</div\n\t\t></td\n\t></tr></tbody\n></table>\n"),attributeMap:dojo.mixin(dojo.clone(dijit.form.Button.prototype.attributeMap),{id:"",tabIndex:["focusNode","titleNode"],title:"titleNode"}),optionsTitle:"",baseClass:"dijitComboButton",_focusedNode:null,postCreate:function(){
+this.inherited(arguments);
+this._focalNodes=[this.titleNode,this._popupStateNode];
+var _e=dojo.isIE;
+dojo.forEach(this._focalNodes,dojo.hitch(this,function(_f){
+this.connect(_f,_e?"onactivate":"onfocus",this._onNodeFocus);
+this.connect(_f,_e?"ondeactivate":"onblur",this._onNodeBlur);
+}));
+if(_e&&(_e<8||dojo.isQuirks)){
+with(this.titleNode){
+style.width=scrollWidth+"px";
+this.connect(this.titleNode,"onresize",function(){
+setTimeout(function(){
+style.width=scrollWidth+"px";
+},0);
});
-
-/*
- * usage
- * <button dojoType="ComboButton" onClick="..."><span>Hello world</span><div dojoType=dijit.Menu>...</div></button>
- *
- * var button1 = new dijit.form.ComboButton({label: "hello world", onClick: foo, dropDown: "myMenu"});
- * dojo.body().appendChild(button1.domNode);
- */
-dojo.declare("dijit.form.ComboButton", dijit.form.DropDownButton, {
- // summary
- // left side is normal button, right side displays menu
- templateString:"<table class='dijit dijitReset dijitInline dijitLeft'\n\tcellspacing='0' cellpadding='0'\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\">\n\t<tr>\n\t\t<td\tclass=\"dijitStretch dijitButtonContents dijitButtonNode\"\n\t\t\ttabIndex=\"${tabIndex}\"\n\t\t\tdojoAttachEvent=\"ondijitclick:_onButtonClick\" dojoAttachPoint=\"titleNode\"\n\t\t\twaiRole=\"button\" waiState=\"labelledby-${id}_label\">\n\t\t\t<div class=\"dijitInline ${iconClass}\" dojoAttachPoint=\"iconNode\"></div>\n\t\t\t<span class=\"dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\">${label}</span>\n\t\t</td>\n\t\t<td class='dijitReset dijitRight dijitButtonNode dijitDownArrowButton'\n\t\t\tdojoAttachPoint=\"popupStateNode,focusNode\"\n\t\t\tdojoAttachEvent=\"ondijitclick:_onArrowClick, onkeypress:_onKey\"\n\t\t\tstateModifier=\"DownArrow\"\n\t\t\ttitle=\"${optionsTitle}\" name=\"${name}\"\n\t\t\twaiRole=\"button\" waiState=\"haspopup-true\"\n\t\t><div waiRole=\"presentation\">&#9660;</div>\n\t</td></tr>\n</table>\n",
-
- attributeMap: dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),
- {id:"", name:""}),
-
- // optionsTitle: String
- // text that describes the options menu (accessibility)
- optionsTitle: "",
-
- baseClass: "dijitComboButton",
-
- _focusedNode: null,
-
- postCreate: function(){
- this.inherited(arguments);
- this._focalNodes = [this.titleNode, this.popupStateNode];
- dojo.forEach(this._focalNodes, dojo.hitch(this, function(node){
- if(dojo.isIE){
- this.connect(node, "onactivate", this._onNodeFocus);
- }else{
- this.connect(node, "onfocus", this._onNodeFocus);
- }
- }));
- },
-
- focusFocalNode: function(node){
- // summary: Focus the focal node node.
- this._focusedNode = node;
- dijit.focus(node);
- },
-
- hasNextFocalNode: function(){
- // summary: Returns true if this widget has no node currently
- // focused or if there is a node following the focused one.
- // False is returned if the last node has focus.
- return this._focusedNode !== this.getFocalNodes()[1];
- },
-
- focusNext: function(){
- // summary: Focus the focal node following the current node with focus
- // or the first one if no node currently has focus.
- this._focusedNode = this.getFocalNodes()[this._focusedNode ? 1 : 0];
- dijit.focus(this._focusedNode);
- },
-
- hasPrevFocalNode: function(){
- // summary: Returns true if this widget has no node currently
- // focused or if there is a node before the focused one.
- // False is returned if the first node has focus.
- return this._focusedNode !== this.getFocalNodes()[0];
- },
-
- focusPrev: function(){
- // summary: Focus the focal node before the current node with focus
- // or the last one if no node currently has focus.
- this._focusedNode = this.getFocalNodes()[this._focusedNode ? 0 : 1];
- dijit.focus(this._focusedNode);
- },
-
- getFocalNodes: function(){
- // summary: Returns an array of focal nodes for this widget.
- return this._focalNodes;
- },
-
- _onNodeFocus: function(evt){
- this._focusedNode = evt.currentTarget;
- },
-
- _onBlur: function(evt){
- this.inherited(arguments);
- this._focusedNode = null;
- }
-});
-
-dojo.declare("dijit.form.ToggleButton", dijit.form.Button, {
- // summary
- // A button that can be in two states (checked or not).
- // Can be base class for things like tabs or checkbox or radio buttons
-
- baseClass: "dijitToggleButton",
-
- // checked: Boolean
- // Corresponds to the native HTML <input> element's attribute.
- // In markup, specified as "checked='checked'" or just "checked".
- // True if the button is depressed, or the checkbox is checked,
- // or the radio button is selected, etc.
- checked: false,
-
- _clicked: function(/*Event*/ evt){
- this.setChecked(!this.checked);
- },
-
- setChecked: function(/*Boolean*/ checked){
- // summary
- // Programatically deselect the button
- this.checked = checked;
- dijit.setWaiState(this.focusNode || this.domNode, "pressed", this.checked);
- this._setStateClass();
- this.onChange(checked);
- }
-});
-
+}
+}
+},_onNodeFocus:function(evt){
+this._focusedNode=evt.currentTarget;
+var fnc=this._focusedNode==this.focusNode?"dijitDownArrowButtonFocused":"dijitButtonContentsFocused";
+dojo.addClass(this._focusedNode,fnc);
+},_onNodeBlur:function(evt){
+var fnc=evt.currentTarget==this.focusNode?"dijitDownArrowButtonFocused":"dijitButtonContentsFocused";
+dojo.removeClass(evt.currentTarget,fnc);
+},_onBlur:function(){
+this.inherited(arguments);
+this._focusedNode=null;
+},_onButtonKeyPress:function(evt){
+if(evt.charOrCode==dojo.keys[this.isLeftToRight()?"RIGHT_ARROW":"LEFT_ARROW"]){
+dijit.focus(this._popupStateNode);
+dojo.stopEvent(evt);
}
+},_onArrowKeyPress:function(evt){
+if(evt.charOrCode==dojo.keys[this.isLeftToRight()?"LEFT_ARROW":"RIGHT_ARROW"]){
+dijit.focus(this.titleNode);
+dojo.stopEvent(evt);
+}
+},focus:function(_10){
+dijit.focus(_10=="start"?this.titleNode:this._popupStateNode);
+}});
+dojo.declare("dijit.form.ToggleButton",dijit.form.Button,{baseClass:"dijitToggleButton",checked:false,attributeMap:dojo.mixin(dojo.clone(dijit.form.Button.prototype.attributeMap),{checked:"focusNode"}),_clicked:function(evt){
+this.attr("checked",!this.checked);
+},_setCheckedAttr:function(_11){
+this.checked=_11;
+dojo.attr(this.focusNode||this.domNode,"checked",_11);
+dijit.setWaiState(this.focusNode||this.domNode,"pressed",_11);
+this._setStateClass();
+this._handleOnChange(_11,true);
+},setChecked:function(_12){
+dojo.deprecated("setChecked("+_12+") is deprecated. Use attr('checked',"+_12+") instead.","","2.0");
+this.attr("checked",_12);
+},reset:function(){
+this._hasBeenBlurred=false;
+this.attr("checked",this.params.checked||false);
+}});
+}
diff --git a/js/dojo/dijit/form/CheckBox.js b/js/dojo/dijit/form/CheckBox.js
--- a/js/dojo/dijit/form/CheckBox.js
+++ b/js/dojo/dijit/form/CheckBox.js
@@ -1,119 +1,75 @@
-if(!dojo._hasResource["dijit.form.CheckBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.form.CheckBox"] = true;
-dojo.provide("dijit.form.CheckBox");
-
-dojo.require("dijit.form.Button");
-
-dojo.declare(
- "dijit.form.CheckBox",
- dijit.form.ToggleButton,
- {
- // summary:
- // Same as an HTML checkbox, but with fancy styling.
- //
- // description:
- // User interacts with real html inputs.
- // On onclick (which occurs by mouse click, space-bar, or
- // using the arrow keys to switch the selected radio button),
- // we update the state of the checkbox/radio.
- //
- // There are two modes:
- // 1. High contrast mode
- // 2. Normal mode
- // In case 1, the regular html inputs are shown and used by the user.
- // In case 2, the regular html inputs are invisible but still used by
- // the user. They are turned quasi-invisible and overlay the background-image.
-
- templateString:"<fieldset class=\"dijitReset dijitInline\" waiRole=\"presentation\"\n\t><input\n\t \ttype=\"${type}\" name=\"${name}\"\n\t\tclass=\"dijitReset dijitCheckBoxInput\"\n\t\tdojoAttachPoint=\"inputNode,focusNode\"\n\t \tdojoAttachEvent=\"onmouseover:_onMouse,onmouseout:_onMouse,onclick:_onClick\"\n/></fieldset>\n",
-
- baseClass: "dijitCheckBox",
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // Value of "type" attribute for <input>
- type: "checkbox",
-
- // value: Value
- // equivalent to value field on normal checkbox (if checked, the value is passed as
- // the value when form is submitted)
- value: "on",
-
- postCreate: function(){
- dojo.setSelectable(this.inputNode, false);
- this.setChecked(this.checked);
- this.inherited(arguments);
- },
-
- setChecked: function(/*Boolean*/ checked){
- if(dojo.isIE){
- if(checked){ this.inputNode.setAttribute('checked', 'checked'); }
- else{ this.inputNode.removeAttribute('checked'); }
- }else{ this.inputNode.checked = checked; }
- this.inherited(arguments);
- },
-
- setValue: function(/*String*/ value){
- if(value == null){ value = ""; }
- this.inputNode.value = value;
- dijit.form.CheckBox.superclass.setValue.call(this,value);
- }
- }
-);
-dojo.declare(
- "dijit.form.RadioButton",
- dijit.form.CheckBox,
- {
- // summary:
- // Same as an HTML radio, but with fancy styling.
- //
- // description:
- // Implementation details
- //
- // Specialization:
- // We keep track of dijit radio groups so that we can update the state
- // of all the siblings (the "context") in a group based on input
- // events. We don't rely on browser radio grouping.
-
- type: "radio",
- baseClass: "dijitRadio",
-
- // This shared object keeps track of all widgets, grouped by name
- _groups: {},
-
- postCreate: function(){
- // add this widget to _groups
- (this._groups[this.name] = this._groups[this.name] || []).push(this);
-
- this.inherited(arguments);
- },
-
- uninitialize: function(){
- // remove this widget from _groups
- dojo.forEach(this._groups[this.name], function(widget, i, arr){
- if(widget === this){
- arr.splice(i, 1);
- return;
- }
- }, this);
- },
-
- setChecked: function(/*Boolean*/ checked){
- // If I am being checked then have to deselect currently checked radio button
- if(checked){
- dojo.forEach(this._groups[this.name], function(widget){
- if(widget != this && widget.checked){
- widget.setChecked(false);
- }
- }, this);
- }
- this.inherited(arguments);
- },
-
- _clicked: function(/*Event*/ e){
- if(!this.checked){
- this.setChecked(true);
- }
- }
- }
-);
-
+if(!dojo._hasResource["dijit.form.CheckBox"]){
+dojo._hasResource["dijit.form.CheckBox"]=true;
+dojo.provide("dijit.form.CheckBox");
+dojo.require("dijit.form.Button");
+dojo.declare("dijit.form.CheckBox",dijit.form.ToggleButton,{templateString:dojo.cache("dijit.form","templates/CheckBox.html","<div class=\"dijitReset dijitInline\" waiRole=\"presentation\"\n\t><input\n\t \t${nameAttrSetting} type=\"${type}\" ${checkedAttrSetting}\n\t\tclass=\"dijitReset dijitCheckBoxInput\"\n\t\tdojoAttachPoint=\"focusNode\"\n\t \tdojoAttachEvent=\"onmouseover:_onMouse,onmouseout:_onMouse,onclick:_onClick\"\n/></div>\n"),baseClass:"dijitCheckBox",type:"checkbox",value:"on",readOnly:false,attributeMap:dojo.delegate(dijit.form.ToggleButton.prototype.attributeMap,{readOnly:"focusNode"}),_setReadOnlyAttr:function(_1){
+this.readOnly=_1;
+dojo.attr(this.focusNode,"readOnly",_1);
+dijit.setWaiState(this.focusNode,"readonly",_1);
+this._setStateClass();
+},_setValueAttr:function(_2){
+if(typeof _2=="string"){
+this.value=_2;
+dojo.attr(this.focusNode,"value",_2);
+_2=true;
+}
+if(this._created){
+this.attr("checked",_2);
+}
+},_getValueAttr:function(){
+return (this.checked?this.value:false);
+},postMixInProperties:function(){
+if(this.value==""){
+this.value="on";
}
+this.checkedAttrSetting=this.checked?"checked":"";
+this.inherited(arguments);
+},_fillContent:function(_3){
+},reset:function(){
+this._hasBeenBlurred=false;
+this.attr("checked",this.params.checked||false);
+this.value=this.params.value||"on";
+dojo.attr(this.focusNode,"value",this.value);
+},_onFocus:function(){
+if(this.id){
+dojo.query("label[for='"+this.id+"']").addClass("dijitFocusedLabel");
+}
+},_onBlur:function(){
+if(this.id){
+dojo.query("label[for='"+this.id+"']").removeClass("dijitFocusedLabel");
+}
+},_onClick:function(e){
+if(this.readOnly){
+return false;
+}
+return this.inherited(arguments);
+}});
+dojo.declare("dijit.form.RadioButton",dijit.form.CheckBox,{type:"radio",baseClass:"dijitRadio",_setCheckedAttr:function(_4){
+this.inherited(arguments);
+if(!this._created){
+return;
+}
+if(_4){
+var _5=this;
+dojo.query("INPUT[type=radio]",this.focusNode.form||dojo.doc).forEach(function(_6){
+if(_6.name==_5.name&&_6!=_5.focusNode&&_6.form==_5.focusNode.form){
+var _7=dijit.getEnclosingWidget(_6);
+if(_7&&_7.checked){
+_7.attr("checked",false);
+}
+}
+});
+}
+},_clicked:function(e){
+if(!this.checked){
+this.attr("checked",true);
+}
+}});
+}
diff --git a/js/dojo/dijit/form/ComboBox.js b/js/dojo/dijit/form/ComboBox.js
--- a/js/dojo/dijit/form/ComboBox.js
+++ b/js/dojo/dijit/form/ComboBox.js
@@ -1,828 +1,604 @@
-if(!dojo._hasResource["dijit.form.ComboBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.form.ComboBox"] = true;
-dojo.provide("dijit.form.ComboBox");
-
-dojo.require("dojo.data.ItemFileReadStore");
-dojo.require("dijit.form.ValidationTextBox");
-dojo.requireLocalization("dijit.form", "ComboBox", null, "ko,zh,ja,zh-tw,ru,it,hu,ROOT,fr,pt,pl,es,de,cs");
-
-dojo.declare(
- "dijit.form.ComboBoxMixin",
- null,
- {
- // summary:
- // Auto-completing text box, and base class for FilteringSelect widget.
- //
- // The drop down box's values are populated from an class called
- // a data provider, which returns a list of values based on the characters
- // that the user has typed into the input box.
- //
- // Some of the options to the ComboBox are actually arguments to the data
- // provider.
- //
- // You can assume that all the form widgets (and thus anything that mixes
- // in ComboBoxMixin) will inherit from _FormWidget and thus the "this"
- // reference will also "be a" _FormWidget.
-
- // item: Object
- // This is the item returned by the dojo.data.store implementation that
- // provides the data for this cobobox, it's the currently selected item.
- item: null,
-
- // pageSize: Integer
- // Argument to data provider.
- // Specifies number of search results per page (before hitting "next" button)
- pageSize: Infinity,
-
- // store: Object
- // Reference to data provider object used by this ComboBox
- store: null,
-
- // query: Object
- // A query that can be passed to 'store' to initially filter the items,
- // before doing further filtering based on searchAttr and the key.
- query: {},
-
- // autoComplete: Boolean
- // If you type in a partial string, and then tab out of the <input> box,
- // automatically copy the first entry displayed in the drop down list to
- // the <input> field
- autoComplete: true,
-
- // searchDelay: Integer
- // Delay in milliseconds between when user types something and we start
- // searching based on that value
- searchDelay: 100,
-
- // searchAttr: String
- // Searches pattern match against this field
- searchAttr: "name",
-
- // ignoreCase: Boolean
- // Set true if the ComboBox should ignore case when matching possible items
- ignoreCase: true,
-
- // hasDownArrow: Boolean
- // Set this textbox to have a down arrow button.
- // Defaults to true.
- hasDownArrow:true,
-
- // _hasFocus: Boolean
- // Represents focus state of the textbox
- // TODO: get rid of this; it's unnecessary (but currently referenced in FilteringSelect)
- _hasFocus:false,
-
- templateString:"<table class=\"dijit dijitReset dijitInlineTable dijitLeft\" cellspacing=\"0\" cellpadding=\"0\"\n\tid=\"widget_${id}\" name=\"${name}\" dojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse\" waiRole=\"presentation\"\n\t><tr class=\"dijitReset\"\n\t\t><td class='dijitReset dijitStretch dijitInputField' width=\"100%\"\n\t\t\t><input type=\"text\" autocomplete=\"off\" name=\"${name}\"\n\t\t\tdojoAttachEvent=\"onkeypress, onkeyup, onfocus, compositionend\"\n\t\t\tdojoAttachPoint=\"textbox,focusNode\" waiRole=\"combobox\"\n\t\t/></td\n\t\t><td class=\"dijitReset dijitValidationIconField\" width=\"0%\"\n\t\t\t><div dojoAttachPoint='iconNode' class='dijitValidationIcon'></div\n\t\t\t><div class='dijitValidationIconText'>&Chi;</div\n\t\t></td\n\t\t><td class='dijitReset dijitRight dijitButtonNode dijitDownArrowButton' width=\"0%\"\n\t\t\tdojoAttachPoint=\"downArrowNode\"\n\t\t\tdojoAttachEvent=\"onmousedown:_onArrowMouseDown,onmouseup:_onMouse,onmouseenter:_onMouse,onmouseleave:_onMouse\"\n\t\t\t><div class=\"dijitDownArrowButtonInner\" waiRole=\"presentation\"\n\t\t\t\t><div class=\"dijitDownArrowButtonChar\">&#9660;</div\n\t\t\t></div\n\t\t></td\t\n\t></tr\n></table>\n",
-
- baseClass:"dijitComboBox",
-
- _lastDisplayedValue: "",
-
- getValue:function(){
- // don't get the textbox value but rather the previously set hidden value
- return dijit.form.TextBox.superclass.getValue.apply(this, arguments);
- },
-
- setDisplayedValue:function(/*String*/ value){
- this._lastDisplayedValue = value;
- this.setValue(value, true);
- },
-
- _getCaretPos: function(/*DomNode*/ element){
- // khtml 3.5.2 has selection* methods as does webkit nightlies from 2005-06-22
- if(typeof(element.selectionStart)=="number"){
- // FIXME: this is totally borked on Moz < 1.3. Any recourse?
- return element.selectionStart;
- }else if(dojo.isIE){
- // in the case of a mouse click in a popup being handled,
- // then the document.selection is not the textarea, but the popup
- // var r = document.selection.createRange();
- // hack to get IE 6 to play nice. What a POS browser.
- var tr = document.selection.createRange().duplicate();
- var ntr = element.createTextRange();
- tr.move("character",0);
- ntr.move("character",0);
- try{
- // If control doesnt have focus, you get an exception.
- // Seems to happen on reverse-tab, but can also happen on tab (seems to be a race condition - only happens sometimes).
- // There appears to be no workaround for this - googled for quite a while.
- ntr.setEndPoint("EndToEnd", tr);
- return String(ntr.text).replace(/\r/g,"").length;
- }catch(e){
- return 0; // If focus has shifted, 0 is fine for caret pos.
- }
- }
- },
-
- _setCaretPos: function(/*DomNode*/ element, /*Number*/ location){
- location = parseInt(location);
- this._setSelectedRange(element, location, location);
- },
-
- _setSelectedRange: function(/*DomNode*/ element, /*Number*/ start, /*Number*/ end){
- if(!end){
- end = element.value.length;
- } // NOTE: Strange - should be able to put caret at start of text?
- // Mozilla
- // parts borrowed from http://www.faqts.com/knowledge_base/view.phtml/aid/13562/fid/130
- if(element.setSelectionRange){
- dijit.focus(element);
- element.setSelectionRange(start, end);
- }else if(element.createTextRange){ // IE
- var range = element.createTextRange();
- with(range){
- collapse(true);
- moveEnd('character', end);
- moveStart('character', start);
- select();
- }
- }else{ //otherwise try the event-creation hack (our own invention)
- // do we need these?
- element.value = element.value;
- element.blur();
- dijit.focus(element);
- // figure out how far back to go
- var dist = parseInt(element.value.length)-end;
- var tchar = String.fromCharCode(37);
- var tcc = tchar.charCodeAt(0);
- for(var x = 0; x < dist; x++){
- var te = document.createEvent("KeyEvents");
- te.initKeyEvent("keypress", true, true, null, false, false, false, false, tcc, tcc);
- element.dispatchEvent(te);
- }
- }
- },
-
- onkeypress: function(/*Event*/ evt){
- // summary: handles keyboard events
-
- //except for pasting case - ctrl + v(118)
- if(evt.altKey || (evt.ctrlKey && evt.charCode != 118)){
- return;
- }
- var doSearch = false;
- this.item = null; // #4872
- if(this._isShowingNow){this._popupWidget.handleKey(evt);}
- switch(evt.keyCode){
- case dojo.keys.PAGE_DOWN:
- case dojo.keys.DOWN_ARROW:
- if(!this._isShowingNow||this._prev_key_esc){
- this._arrowPressed();
- doSearch=true;
- }else{
- this._announceOption(this._popupWidget.getHighlightedOption());
- }
- dojo.stopEvent(evt);
- this._prev_key_backspace = false;
- this._prev_key_esc = false;
- break;
-
- case dojo.keys.PAGE_UP:
- case dojo.keys.UP_ARROW:
- if(this._isShowingNow){
- this._announceOption(this._popupWidget.getHighlightedOption());
- }
- dojo.stopEvent(evt);
- this._prev_key_backspace = false;
- this._prev_key_esc = false;
- break;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- case dojo.keys.ENTER:
- // prevent submitting form if user presses enter
- // also prevent accepting the value if either Next or Previous are selected
- var highlighted;
- if(this._isShowingNow&&(highlighted=this._popupWidget.getHighlightedOption())){
- // only stop event on prev/next
- if(highlighted==this._popupWidget.nextButton){
- this._nextSearch(1);
- dojo.stopEvent(evt);
- break;
- }
- else if(highlighted==this._popupWidget.previousButton){
- this._nextSearch(-1);
- dojo.stopEvent(evt);
- break;
- }
- }else{
- this.setDisplayedValue(this.getDisplayedValue());
- }
- // default case:
- // prevent submit, but allow event to bubble
- evt.preventDefault();
- // fall through
-
- case dojo.keys.TAB:
- var newvalue=this.getDisplayedValue();
- // #4617: if the user had More Choices selected fall into the _onBlur handler
- if(this._popupWidget &&
- (newvalue == this._popupWidget._messages["previousMessage"] ||
- newvalue == this._popupWidget._messages["nextMessage"])){
- break;
- }
- if(this._isShowingNow){
- this._prev_key_backspace = false;
- this._prev_key_esc = false;
- if(this._popupWidget.getHighlightedOption()){
- this._popupWidget.setValue({target:this._popupWidget.getHighlightedOption()}, true);
- }
- this._hideResultList();
- }
- break;
-
- case dojo.keys.SPACE:
- this._prev_key_backspace = false;
- this._prev_key_esc = false;
- if(this._isShowingNow && this._popupWidget.getHighlightedOption()){
- dojo.stopEvent(evt);
- this._selectOption();
- this._hideResultList();
- }else{
- doSearch = true;
- }
- break;
-
- case dojo.keys.ESCAPE:
- this._prev_key_backspace = false;
- this._prev_key_esc = true;
- this._hideResultList();
- if(this._lastDisplayedValue != this.getDisplayedValue()){
- this.setDisplayedValue(this._lastDisplayedValue);
- dojo.stopEvent(evt);
- }else{
- this.setValue(this.getValue(), false);
- }
- break;
-
- case dojo.keys.DELETE:
- case dojo.keys.BACKSPACE:
- this._prev_key_esc = false;
- this._prev_key_backspace = true;
- doSearch = true;
- break;
-
- case dojo.keys.RIGHT_ARROW: // fall through
-
- case dojo.keys.LEFT_ARROW: // fall through
- this._prev_key_backspace = false;
- this._prev_key_esc = false;
- break;
-
- default:// non char keys (F1-F12 etc..) shouldn't open list
- this._prev_key_backspace = false;
- this._prev_key_esc = false;
- if(dojo.isIE || evt.charCode != 0){
- doSearch=true;
- }
- }
- if(this.searchTimer){
- clearTimeout(this.searchTimer);
- }
- if(doSearch){
- // need to wait a tad before start search so that the event bubbles through DOM and we have value visible
- this.searchTimer = setTimeout(dojo.hitch(this, this._startSearchFromInput), this.searchDelay);
- }
- },
-
- _autoCompleteText: function(/*String*/ text){
- // summary:
- // Fill in the textbox with the first item from the drop down list, and
- // highlight the characters that were auto-completed. For example, if user
- // typed "CA" and the drop down list appeared, the textbox would be changed to
- // "California" and "ifornia" would be highlighted.
-
- // IE7: clear selection so next highlight works all the time
- this._setSelectedRange(this.focusNode, this.focusNode.value.length, this.focusNode.value.length);
- // does text autoComplete the value in the textbox?
- // #3744: escape regexp so the user's input isn't treated as a regular expression.
- // Example: If the user typed "(" then the regexp would throw "unterminated parenthetical."
- // Also see #2558 for the autocompletion bug this regular expression fixes.
- if(new RegExp("^"+escape(this.focusNode.value), this.ignoreCase ? "i" : "").test(escape(text))){
- var cpos = this._getCaretPos(this.focusNode);
- // only try to extend if we added the last character at the end of the input
- if((cpos+1) > this.focusNode.value.length){
- // only add to input node as we would overwrite Capitalisation of chars
- // actually, that is ok
- this.focusNode.value = text;//.substr(cpos);
- // visually highlight the autocompleted characters
- this._setSelectedRange(this.focusNode, cpos, this.focusNode.value.length);
- dijit.setWaiState(this.focusNode, "valuenow", text);
- }
- }else{
- // text does not autoComplete; replace the whole value and highlight
- this.focusNode.value = text;
- this._setSelectedRange(this.focusNode, 0, this.focusNode.value.length);
- dijit.setWaiState(this.focusNode, "valuenow", text);
- }
- },
-
- _openResultList: function(/*Object*/ results, /*Object*/ dataObject){
- if(this.disabled || dataObject.query[this.searchAttr] != this._lastQuery){
- return;
- }
- this._popupWidget.clearResultList();
- if(!results.length){
- this._hideResultList();
- return;
- }
-
- // Fill in the textbox with the first item from the drop down list, and
- // highlight the characters that were auto-completed. For example, if user
- // typed "CA" and the drop down list appeared, the textbox would be changed to
- // "California" and "ifornia" would be highlighted.
-
- var zerothvalue=new String(this.store.getValue(results[0], this.searchAttr));
- if(zerothvalue && this.autoComplete && !this._prev_key_backspace &&
- // when the user clicks the arrow button to show the full list,
- // startSearch looks for "*".
- // it does not make sense to autocomplete
- // if they are just previewing the options available.
- (dataObject.query[this.searchAttr] != "*")){
- this._autoCompleteText(zerothvalue);
- // announce the autocompleted value
- dijit.setWaiState(this.focusNode || this.domNode, "valuenow", zerothvalue);
- }
- this._popupWidget.createOptions(results, dataObject, dojo.hitch(this, this._getMenuLabelFromItem));
-
- // show our list (only if we have content, else nothing)
- this._showResultList();
-
- // #4091: tell the screen reader that the paging callback finished by shouting the next choice
- if(dataObject.direction){
- if(dataObject.direction==1){
- this._popupWidget.highlightFirstOption();
- }else if(dataObject.direction==-1){
- this._popupWidget.highlightLastOption();
- }
- this._announceOption(this._popupWidget.getHighlightedOption());
- }
- },
-
- _showResultList: function(){
- this._hideResultList();
- var items = this._popupWidget.getItems(),
- visibleCount = Math.min(items.length,this.maxListLength);
- this._arrowPressed();
- // hide the tooltip
- this._displayMessage("");
-
- // Position the list and if it's too big to fit on the screen then
- // size it to the maximum possible height
- // Our dear friend IE doesnt take max-height so we need to calculate that on our own every time
- // TODO: want to redo this, see http://trac.dojotoolkit.org/ticket/3272, http://trac.dojotoolkit.org/ticket/4108
- with(this._popupWidget.domNode.style){
- // natural size of the list has changed, so erase old width/height settings,
- // which were hardcoded in a previous call to this function (via dojo.marginBox() call)
- width="";
- height="";
- }
- var best=this.open();
- // #3212: only set auto scroll bars if necessary
- // prevents issues with scroll bars appearing when they shouldn't when node is made wider (fractional pixels cause this)
- var popupbox=dojo.marginBox(this._popupWidget.domNode);
- this._popupWidget.domNode.style.overflow=((best.h==popupbox.h)&&(best.w==popupbox.w))?"hidden":"auto";
- // #4134: borrow TextArea scrollbar test so content isn't covered by scrollbar and horizontal scrollbar doesn't appear
- var newwidth=best.w;
- if(best.h<this._popupWidget.domNode.scrollHeight){newwidth+=16;}
- dojo.marginBox(this._popupWidget.domNode, {h:best.h,w:Math.max(newwidth,this.domNode.offsetWidth)});
- },
-
- _hideResultList: function(){
- if(this._isShowingNow){
- dijit.popup.close(this._popupWidget);
- this._arrowIdle();
- this._isShowingNow=false;
- }
- },
-
- _onBlur: function(){
- // summary: called magically when focus has shifted away from this widget and it's dropdown
- this._hasFocus=false;
- this._hasBeenBlurred = true;
- this._hideResultList();
- this._arrowIdle();
- // if the user clicks away from the textbox OR tabs away, set the value to the textbox value
- // #4617: if value is now more choices or previous choices, revert the value
- var newvalue=this.getDisplayedValue();
- if(this._popupWidget&&(newvalue==this._popupWidget._messages["previousMessage"]||newvalue==this._popupWidget._messages["nextMessage"])){
- this.setValue(this._lastValueReported, true);
- }else{
- this.setDisplayedValue(newvalue);
- }
- },
- onfocus:function(/*Event*/ evt){
- this._hasFocus=true;
-
- // update styling to reflect that we are focused
- this._onMouse(evt);
- },
-
- _announceOption: function(/*Node*/ node){
- // summary:
- // a11y code that puts the highlighted option in the textbox
- // This way screen readers will know what is happening in the menu
-
- if(node==null){return;}
- // pull the text value from the item attached to the DOM node
- var newValue;
- if(node==this._popupWidget.nextButton||node==this._popupWidget.previousButton){
- newValue=node.innerHTML;
- }else{
- newValue=this.store.getValue(node.item, this.searchAttr);
- }
- // get the text that the user manually entered (cut off autocompleted text)
- this.focusNode.value=this.focusNode.value.substring(0, this._getCaretPos(this.focusNode));
- // autocomplete the rest of the option to announce change
- this._autoCompleteText(newValue);
- },
-
- _selectOption: function(/*Event*/ evt){
- var tgt = null;
- if(!evt){
- evt ={ target: this._popupWidget.getHighlightedOption()};
- }
- // what if nothing is highlighted yet?
- if(!evt.target){
- // handle autocompletion where the the user has hit ENTER or TAB
- this.setDisplayedValue(this.getDisplayedValue());
- return;
- // otherwise the user has accepted the autocompleted value
- }else{
- tgt = evt.target;
- }
- if(!evt.noHide){
- this._hideResultList();
- this._setCaretPos(this.focusNode, this.store.getValue(tgt.item, this.searchAttr).length);
- }
- this._doSelect(tgt);
- },
-
- _doSelect: function(tgt){
- this.item = tgt.item;
- this.setValue(this.store.getValue(tgt.item, this.searchAttr), true);
- },
-
- _onArrowMouseDown: function(evt){
- // summary: callback when arrow is clicked
- if(this.disabled){
- return;
- }
- dojo.stopEvent(evt);
- this.focus();
- if(this._isShowingNow){
- this._hideResultList();
- }else{
- // forces full population of results, if they click
- // on the arrow it means they want to see more options
- this._startSearch("");
- }
- },
-
- _startSearchFromInput: function(){
- this._startSearch(this.focusNode.value);
- },
-
- _startSearch: function(/*String*/ key){
- if(!this._popupWidget){
- this._popupWidget = new dijit.form._ComboBoxMenu({
- onChange: dojo.hitch(this, this._selectOption)
- });
- }
- // create a new query to prevent accidentally querying for a hidden value from FilteringSelect's keyField
- var query=this.query;
- this._lastQuery=query[this.searchAttr]=key+"*";
- var dataObject=this.store.fetch({queryOptions:{ignoreCase:this.ignoreCase, deep:true}, query: query, onComplete:dojo.hitch(this, "_openResultList"), start:0, count:this.pageSize});
- function nextSearch(dataObject, direction){
- dataObject.start+=dataObject.count*direction;
- // #4091: tell callback the direction of the paging so the screen reader knows which menu option to shout
- dataObject.direction=direction;
- dataObject.store.fetch(dataObject);
- }
- this._nextSearch=this._popupWidget.onPage=dojo.hitch(this, nextSearch, dataObject);
- },
-
- _getValueField:function(){
- return this.searchAttr;
- },
-
- /////////////// Event handlers /////////////////////
-
- _arrowPressed: function(){
- if(!this.disabled&&this.hasDownArrow){
- dojo.addClass(this.downArrowNode, "dijitArrowButtonActive");
- }
- },
-
- _arrowIdle: function(){
- if(!this.disabled&&this.hasDownArrow){
- dojo.removeClass(this.downArrowNode, "dojoArrowButtonPushed");
- }
- },
-
- compositionend: function(/*Event*/ evt){
- // summary: When inputting characters using an input method, such as Asian
- // languages, it will generate this event instead of onKeyDown event
- // Note: this event is only triggered in FF (not in IE)
- this.onkeypress({charCode:-1});
- },
-
- //////////// INITIALIZATION METHODS ///////////////////////////////////////
- constructor: function(){
- this.query={};
- },
-
- postMixInProperties: function(){
- if(!this.hasDownArrow){
- this.baseClass = "dijitTextBox";
- }
- if(!this.store){
- // if user didn't specify store, then assume there are option tags
- var items = this.srcNodeRef ? dojo.query("> option", this.srcNodeRef).map(function(node){
- node.style.display="none";
- return { value: node.getAttribute("value"), name: String(node.innerHTML) };
- }) : {};
- this.store = new dojo.data.ItemFileReadStore({data: {identifier:this._getValueField(), items:items}});
-
- // if there is no value set and there is an option list,
- // set the value to the first value to be consistent with native Select
- if(items && items.length && !this.value){
- // For <select>, IE does not let you set the value attribute of the srcNodeRef (and thus dojo.mixin does not copy it).
- // IE does understand selectedIndex though, which is automatically set by the selected attribute of an option tag
- this.value = items[this.srcNodeRef.selectedIndex != -1 ? this.srcNodeRef.selectedIndex : 0]
- [this._getValueField()];
- }
- }
- },
-
- uninitialize:function(){
- if(this._popupWidget){
- this._hideResultList();
- this._popupWidget.destroy()
- };
- },
-
- _getMenuLabelFromItem:function(/*Item*/ item){
- return {html:false, label:this.store.getValue(item, this.searchAttr)};
- },
-
- open:function(){
- this._isShowingNow=true;
- return dijit.popup.open({
- popup: this._popupWidget,
- around: this.domNode,
- parent: this
- });
- }
- }
-);
-
-dojo.declare(
- "dijit.form._ComboBoxMenu",
- [dijit._Widget, dijit._Templated],
-
- {
- // summary:
- // Focus-less div based menu for internal use in ComboBox
-
- templateString:"<div class='dijitMenu' dojoAttachEvent='onmousedown,onmouseup,onmouseover,onmouseout' tabIndex='-1' style='overflow:\"auto\";'>"
- +"<div class='dijitMenuItem dijitMenuPreviousButton' dojoAttachPoint='previousButton'></div>"
- +"<div class='dijitMenuItem dijitMenuNextButton' dojoAttachPoint='nextButton'></div>"
- +"</div>",
- _messages:null,
-
- postMixInProperties:function(){
- this._messages = dojo.i18n.getLocalization("dijit.form", "ComboBox", this.lang);
- this.inherited("postMixInProperties", arguments);
- },
-
- setValue:function(/*Object*/ value){
- this.value=value;
- this.onChange(value);
- },
-
- onChange:function(/*Object*/ value){},
- onPage:function(/*Number*/ direction){},
-
- postCreate:function(){
- // fill in template with i18n messages
- this.previousButton.innerHTML=this._messages["previousMessage"];
- this.nextButton.innerHTML=this._messages["nextMessage"];
- this.inherited("postCreate", arguments);
- },
-
- onClose:function(){
- this._blurOptionNode();
- },
-
- _createOption:function(/*Object*/ item, labelFunc){
- // summary: creates an option to appear on the popup menu
- // subclassed by FilteringSelect
-
- var labelObject=labelFunc(item);
- var menuitem = document.createElement("div");
- if(labelObject.html){menuitem.innerHTML=labelObject.label;}
- else{menuitem.appendChild(document.createTextNode(labelObject.label));}
- // #3250: in blank options, assign a normal height
- if(menuitem.innerHTML==""){
- menuitem.innerHTML="&nbsp;"
- }
- menuitem.item=item;
- return menuitem;
- },
-
- createOptions:function(results, dataObject, labelFunc){
- //this._dataObject=dataObject;
- //this._dataObject.onComplete=dojo.hitch(comboBox, comboBox._openResultList);
- // display "Previous . . ." button
- this.previousButton.style.display=dataObject.start==0?"none":"";
- // create options using _createOption function defined by parent ComboBox (or FilteringSelect) class
- // #2309: iterate over cache nondestructively
- var _this=this;
- dojo.forEach(results, function(item){
- var menuitem=_this._createOption(item, labelFunc);
- menuitem.className = "dijitMenuItem";
- _this.domNode.insertBefore(menuitem, _this.nextButton);
- });
- // display "Next . . ." button
- this.nextButton.style.display=dataObject.count==results.length?"":"none";
- },
-
- clearResultList:function(){
- // keep the previous and next buttons of course
- while(this.domNode.childNodes.length>2){
- this.domNode.removeChild(this.domNode.childNodes[this.domNode.childNodes.length-2]);
- }
- },
-
- // these functions are called in showResultList
- getItems:function(){
- return this.domNode.childNodes;
- },
-
- getListLength:function(){
- return this.domNode.childNodes.length-2;
- },
-
- onmousedown:function(/*Event*/ evt){
- dojo.stopEvent(evt);
- },
-
- onmouseup:function(/*Event*/ evt){
- if(evt.target === this.domNode){
- return;
- }else if(evt.target==this.previousButton){
- this.onPage(-1);
- }else if(evt.target==this.nextButton){
- this.onPage(1);
- }else{
- var tgt=evt.target;
- // while the clicked node is inside the div
- while(!tgt.item){
- // recurse to the top
- tgt=tgt.parentNode;
- }
- this.setValue({target:tgt}, true);
- }
- },
-
- onmouseover:function(/*Event*/ evt){
- if(evt.target === this.domNode){ return; }
- var tgt=evt.target;
- if(!(tgt==this.previousButton||tgt==this.nextButton)){
- // while the clicked node is inside the div
- while(!tgt.item){
- // recurse to the top
- tgt=tgt.parentNode;
- }
- }
- this._focusOptionNode(tgt);
- },
-
- onmouseout:function(/*Event*/ evt){
- if(evt.target === this.domNode){ return; }
- this._blurOptionNode();
- },
-
- _focusOptionNode:function(/*DomNode*/ node){
- // summary:
- // does the actual highlight
- if(this._highlighted_option != node){
- this._blurOptionNode();
- this._highlighted_option = node;
- dojo.addClass(this._highlighted_option, "dijitMenuItemHover");
- }
- },
-
- _blurOptionNode:function(){
- // summary:
- // removes highlight on highlighted option
- if(this._highlighted_option){
- dojo.removeClass(this._highlighted_option, "dijitMenuItemHover");
- this._highlighted_option = null;
- }
- },
-
- _highlightNextOption:function(){
- // because each press of a button clears the menu,
- // the highlighted option sometimes becomes detached from the menu!
- // test to see if the option has a parent to see if this is the case.
- if(!this.getHighlightedOption()){
- this._focusOptionNode(this.domNode.firstChild.style.display=="none"?this.domNode.firstChild.nextSibling:this.domNode.firstChild);
- }else if(this._highlighted_option.nextSibling&&this._highlighted_option.nextSibling.style.display!="none"){
- this._focusOptionNode(this._highlighted_option.nextSibling);
- }
- // scrollIntoView is called outside of _focusOptionNode because in IE putting it inside causes the menu to scroll up on mouseover
- dijit.scrollIntoView(this._highlighted_option);
- },
-
- highlightFirstOption:function(){
- // highlight the non-Previous choices option
- this._focusOptionNode(this.domNode.firstChild.nextSibling);
- dijit.scrollIntoView(this._highlighted_option);
- },
-
- highlightLastOption:function(){
- // highlight the noon-More choices option
- this._focusOptionNode(this.domNode.lastChild.previousSibling);
- dijit.scrollIntoView(this._highlighted_option);
- },
-
- _highlightPrevOption:function(){
- // if nothing selected, highlight last option
- // makes sense if you select Previous and try to keep scrolling up the list
- if(!this.getHighlightedOption()){
- this._focusOptionNode(this.domNode.lastChild.style.display=="none"?this.domNode.lastChild.previousSibling:this.domNode.lastChild);
- }else if(this._highlighted_option.previousSibling&&this._highlighted_option.previousSibling.style.display!="none"){
- this._focusOptionNode(this._highlighted_option.previousSibling);
- }
- dijit.scrollIntoView(this._highlighted_option);
- },
-
- _page:function(/*Boolean*/ up){
- var scrollamount=0;
- var oldscroll=this.domNode.scrollTop;
- var height=parseInt(dojo.getComputedStyle(this.domNode).height);
- // if no item is highlighted, highlight the first option
- if(!this.getHighlightedOption()){this._highlightNextOption();}
- while(scrollamount<height){
- if(up){
- // stop at option 1
- if(!this.getHighlightedOption().previousSibling||this._highlighted_option.previousSibling.style.display=="none"){break;}
- this._highlightPrevOption();
- }else{
- // stop at last option
- if(!this.getHighlightedOption().nextSibling||this._highlighted_option.nextSibling.style.display=="none"){break;}
- this._highlightNextOption();
- }
- // going backwards
- var newscroll=this.domNode.scrollTop;
- scrollamount+=(newscroll-oldscroll)*(up ? -1:1);
- oldscroll=newscroll;
- }
- },
-
- pageUp:function(){
- this._page(true);
- },
-
- pageDown:function(){
- this._page(false);
- },
-
- getHighlightedOption:function(){
- // summary:
- // Returns the highlighted option.
- return this._highlighted_option&&this._highlighted_option.parentNode ? this._highlighted_option : null;
- },
-
- handleKey:function(evt){
- switch(evt.keyCode){
- case dojo.keys.DOWN_ARROW:
- this._highlightNextOption();
- break;
- case dojo.keys.PAGE_DOWN:
- this.pageDown();
- break;
- case dojo.keys.UP_ARROW:
- this._highlightPrevOption();
- break;
- case dojo.keys.PAGE_UP:
- this.pageUp();
- break;
- }
- }
- }
-);
-
-dojo.declare(
- "dijit.form.ComboBox",
- [dijit.form.ValidationTextBox, dijit.form.ComboBoxMixin],
- {
- postMixInProperties: function(){
- dijit.form.ComboBoxMixin.prototype.postMixInProperties.apply(this, arguments);
- dijit.form.ValidationTextBox.prototype.postMixInProperties.apply(this, arguments);
- }
- }
-);
-
+if(!dojo._hasResource["dijit.form.ComboBox"]){
+dojo._hasResource["dijit.form.ComboBox"]=true;
+dojo.provide("dijit.form.ComboBox");
+dojo.require("dijit.form._FormWidget");
+dojo.require("dijit.form.ValidationTextBox");
+dojo.require("dojo.data.util.simpleFetch");
+dojo.require("dojo.data.util.filter");
+dojo.require("dojo.regexp");
+dojo.requireLocalization("dijit.form","ComboBox",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-tw");
+dojo.declare("dijit.form.ComboBoxMixin",null,{item:null,pageSize:Infinity,store:null,fetchProperties:{},query:{},autoComplete:true,highlightMatch:"first",searchDelay:100,searchAttr:"name",labelAttr:"",labelType:"text",queryExpr:"${0}*",ignoreCase:true,hasDownArrow:true,templateString:dojo.cache("dijit.form","templates/ComboBox.html","<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\n\tid=\"widget_${id}\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\" dojoAttachPoint=\"comboNode\" waiRole=\"combobox\" tabIndex=\"-1\"\n\t><div style=\"overflow:hidden;\"\n\t\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton'\n\t\t\tdojoAttachPoint=\"downArrowNode\" waiRole=\"presentation\"\n\t\t\tdojoAttachEvent=\"onmousedown:_onArrowMouseDown,onmouseup:_onMouse,onmouseenter:_onMouse,onmouseleave:_onMouse\"\n\t\t\t><div class=\"dijitArrowButtonInner\">&thinsp;</div\n\t\t\t><div class=\"dijitArrowButtonChar\">&#9660;</div\n\t\t></div\n\t\t><div class=\"dijitReset dijitValidationIcon\"><br></div\n\t\t><div class=\"dijitReset dijitValidationIconText\">&Chi;</div\n\t\t><div class=\"dijitReset dijitInputField\"\n\t\t\t><input ${nameAttrSetting} type=\"text\" autocomplete=\"off\" class='dijitReset'\n\t\t\tdojoAttachEvent=\"onkeypress:_onKeyPress,compositionend\"\n\t\t\tdojoAttachPoint=\"textbox,focusNode\" waiRole=\"textbox\" waiState=\"haspopup-true,autocomplete-list\"\n\t\t/></div\n\t></div\n></div>\n"),baseClass:"dijitComboBox",_getCaretPos:function(_1){
+var _2=0;
+if(typeof (_1.selectionStart)=="number"){
+_2=_1.selectionStart;
+}else{
+if(dojo.isIE){
+var tr=dojo.doc.selection.createRange().duplicate();
+var _3=_1.createTextRange();
+tr.move("character",0);
+_3.move("character",0);
+try{
+_3.setEndPoint("EndToEnd",tr);
+_2=String(_3.text).replace(/\r/g,"").length;
+}
+catch(e){
+}
+}
+}
+return _2;
+},_setCaretPos:function(_4,_5){
+_5=parseInt(_5);
+dijit.selectInputText(_4,_5,_5);
+},_setDisabledAttr:function(_6){
+this.inherited(arguments);
+dijit.setWaiState(this.comboNode,"disabled",_6);
+},_abortQuery:function(){
+if(this.searchTimer){
+clearTimeout(this.searchTimer);
+this.searchTimer=null;
+}
+if(this._fetchHandle){
+if(this._fetchHandle.abort){
+this._fetchHandle.abort();
+}
+this._fetchHandle=null;
+}
+},_onKeyPress:function(_7){
+var _8=_7.charOrCode;
+if(_7.altKey||((_7.ctrlKey||_7.metaKey)&&(_8!="x"&&_8!="v"))||_8==dojo.keys.SHIFT){
+return;
+}
+var _9=false;
+var _a="_startSearchFromInput";
+var pw=this._popupWidget;
+var dk=dojo.keys;
+var _b=null;
+this._prev_key_backspace=false;
+this._abortQuery();
+if(this._isShowingNow){
+pw.handleKey(_8);
+_b=pw.getHighlightedOption();
+}
+switch(_8){
+case dk.PAGE_DOWN:
+case dk.DOWN_ARROW:
+case dk.PAGE_UP:
+case dk.UP_ARROW:
+if(!this._isShowingNow){
+this._arrowPressed();
+_9=true;
+_a="_startSearchAll";
+}else{
+this._announceOption(_b);
+}
+dojo.stopEvent(_7);
+break;
+case dk.ENTER:
+if(_b){
+if(_b==pw.nextButton){
+this._nextSearch(1);
+dojo.stopEvent(_7);
+break;
+}else{
+if(_b==pw.previousButton){
+this._nextSearch(-1);
+dojo.stopEvent(_7);
+break;
+}
+}
+}else{
+this._setBlurValue();
+this._setCaretPos(this.focusNode,this.focusNode.value.length);
+}
+_7.preventDefault();
+case dk.TAB:
+var _c=this.attr("displayedValue");
+if(pw&&(_c==pw._messages["previousMessage"]||_c==pw._messages["nextMessage"])){
+break;
+}
+if(_b){
+this._selectOption();
+}
+if(this._isShowingNow){
+this._lastQuery=null;
+this._hideResultList();
+}
+break;
+case " ":
+if(_b){
+dojo.stopEvent(_7);
+this._selectOption();
+this._hideResultList();
+}else{
+_9=true;
+}
+break;
+case dk.ESCAPE:
+if(this._isShowingNow){
+dojo.stopEvent(_7);
+this._hideResultList();
+}
+break;
+case dk.DELETE:
+case dk.BACKSPACE:
+this._prev_key_backspace=true;
+_9=true;
+break;
+default:
+_9=typeof _8=="string"||_8==229;
+}
+if(_9){
+this.item=undefined;
+this.searchTimer=setTimeout(dojo.hitch(this,_a),1);
+}
+},_autoCompleteText:function(_d){
+var fn=this.focusNode;
+dijit.selectInputText(fn,fn.value.length);
+var _e=this.ignoreCase?"toLowerCase":"substr";
+if(_d[_e](0).indexOf(this.focusNode.value[_e](0))==0){
+var _f=this._getCaretPos(fn);
+if((_f+1)>fn.value.length){
+fn.value=_d;
+dijit.selectInputText(fn,_f);
+}
+}else{
+fn.value=_d;
+dijit.selectInputText(fn);
+}
+},_openResultList:function(_10,_11){
+this._fetchHandle=null;
+if(this.disabled||this.readOnly||(_11.query[this.searchAttr]!=this._lastQuery)){
+return;
+}
+this._popupWidget.clearResultList();
+if(!_10.length){
+this._hideResultList();
+return;
+}
+_11._maxOptions=this._maxOptions;
+var _12=this._popupWidget.createOptions(_10,_11,dojo.hitch(this,"_getMenuLabelFromItem"));
+this._showResultList();
+if(_11.direction){
+if(1==_11.direction){
+this._popupWidget.highlightFirstOption();
+}else{
+if(-1==_11.direction){
+this._popupWidget.highlightLastOption();
+}
+}
+this._announceOption(this._popupWidget.getHighlightedOption());
+}else{
+if(this.autoComplete&&!this._prev_key_backspace&&!/^[*]+$/.test(_11.query[this.searchAttr])){
+this._announceOption(_12[1]);
+}
+}
+},_showResultList:function(){
+this._hideResultList();
+this._arrowPressed();
+this.displayMessage("");
+dojo.style(this._popupWidget.domNode,{width:"",height:""});
+var _13=this.open();
+var _14=dojo.marginBox(this._popupWidget.domNode);
+this._popupWidget.domNode.style.overflow=((_13.h==_14.h)&&(_13.w==_14.w))?"hidden":"auto";
+var _15=_13.w;
+if(_13.h<this._popupWidget.domNode.scrollHeight){
+_15+=16;
+}
+dojo.marginBox(this._popupWidget.domNode,{h:_13.h,w:Math.max(_15,this.domNode.offsetWidth)});
+if(_15<this.domNode.offsetWidth){
+this._popupWidget.domNode.parentNode.style.left=dojo.position(this.domNode).x+"px";
+}
+dijit.setWaiState(this.comboNode,"expanded","true");
+},_hideResultList:function(){
+this._abortQuery();
+if(this._isShowingNow){
+dijit.popup.close(this._popupWidget);
+this._arrowIdle();
+this._isShowingNow=false;
+dijit.setWaiState(this.comboNode,"expanded","false");
+dijit.removeWaiState(this.focusNode,"activedescendant");
+}
+},_setBlurValue:function(){
+var _16=this.attr("displayedValue");
+var pw=this._popupWidget;
+if(pw&&(_16==pw._messages["previousMessage"]||_16==pw._messages["nextMessage"])){
+this._setValueAttr(this._lastValueReported,true);
+}else{
+if(typeof this.item=="undefined"){
+this.item=null;
+this.attr("displayedValue",_16);
+}else{
+if(this.value!=this._lastValueReported){
+dijit.form._FormValueWidget.prototype._setValueAttr.call(this,this.value,true);
+}
+this._refreshState();
+}
+}
+},_onBlur:function(){
+this._hideResultList();
+this._arrowIdle();
+this.inherited(arguments);
+},_setItemAttr:function(_17,_18,_19){
+if(!_19){
+_19=this.labelFunc(_17,this.store);
+}
+this.value=this._getValueField()!=this.searchAttr?this.store.getIdentity(_17):_19;
+this.item=_17;
+dijit.form.ComboBox.superclass._setValueAttr.call(this,this.value,_18,_19);
+},_announceOption:function(_1a){
+if(!_1a){
+return;
+}
+var _1b;
+if(_1a==this._popupWidget.nextButton||_1a==this._popupWidget.previousButton){
+_1b=_1a.innerHTML;
+this.item=undefined;
+this.value="";
+}else{
+_1b=this.labelFunc(_1a.item,this.store);
+this.attr("item",_1a.item,false,_1b);
+}
+this.focusNode.value=this.focusNode.value.substring(0,this._lastInput.length);
+dijit.setWaiState(this.focusNode,"activedescendant",dojo.attr(_1a,"id"));
+this._autoCompleteText(_1b);
+},_selectOption:function(evt){
+if(evt){
+this._announceOption(evt.target);
+}
+this._hideResultList();
+this._setCaretPos(this.focusNode,this.focusNode.value.length);
+dijit.form._FormValueWidget.prototype._setValueAttr.call(this,this.value,true);
+},_onArrowMouseDown:function(evt){
+if(this.disabled||this.readOnly){
+return;
+}
+dojo.stopEvent(evt);
+this.focus();
+if(this._isShowingNow){
+this._hideResultList();
+}else{
+this._startSearchAll();
+}
+},_startSearchAll:function(){
+this._startSearch("");
+},_startSearchFromInput:function(){
+this._startSearch(this.focusNode.value.replace(/([\\\*\?])/g,"\\$1"));
+},_getQueryString:function(_1c){
+return dojo.string.substitute(this.queryExpr,[_1c]);
+},_startSearch:function(key){
+if(!this._popupWidget){
+var _1d=this.id+"_popup";
+this._popupWidget=new dijit.form._ComboBoxMenu({onChange:dojo.hitch(this,this._selectOption),id:_1d});
+dijit.removeWaiState(this.focusNode,"activedescendant");
+dijit.setWaiState(this.textbox,"owns",_1d);
}
+var _1e=dojo.clone(this.query);
+this._lastInput=key;
+this._lastQuery=_1e[this.searchAttr]=this._getQueryString(key);
+this.searchTimer=setTimeout(dojo.hitch(this,function(_1f,_20){
+this.searchTimer=null;
+var _21={queryOptions:{ignoreCase:this.ignoreCase,deep:true},query:_1f,onBegin:dojo.hitch(this,"_setMaxOptions"),onComplete:dojo.hitch(this,"_openResultList"),onError:function(_22){
+_20._fetchHandle=null;
+console.error("dijit.form.ComboBox: "+_22);
+dojo.hitch(_20,"_hideResultList")();
+},start:0,count:this.pageSize};
+dojo.mixin(_21,_20.fetchProperties);
+this._fetchHandle=_20.store.fetch(_21);
+var _23=function(_24,_25){
+_24.start+=_24.count*_25;
+_24.direction=_25;
+this._fetchHandle=this.store.fetch(_24);
+};
+this._nextSearch=this._popupWidget.onPage=dojo.hitch(this,_23,this._fetchHandle);
+},_1e,this),this.searchDelay);
+},_setMaxOptions:function(_26,_27){
+this._maxOptions=_26;
+},_getValueField:function(){
+return this.searchAttr;
+},_arrowPressed:function(){
+if(!this.disabled&&!this.readOnly&&this.hasDownArrow){
+dojo.addClass(this.downArrowNode,"dijitArrowButtonActive");
+}
+},_arrowIdle:function(){
+if(!this.disabled&&!this.readOnly&&this.hasDownArrow){
+dojo.removeClass(this.downArrowNode,"dojoArrowButtonPushed");
+}
+},compositionend:function(evt){
+this._onKeyPress({charOrCode:229});
+},constructor:function(){
+this.query={};
+this.fetchProperties={};
+},postMixInProperties:function(){
+if(!this.hasDownArrow){
+this.baseClass="dijitTextBox";
+}
+if(!this.store){
+var _28=this.srcNodeRef;
+this.store=new dijit.form._ComboBoxDataStore(_28);
+if(!this.value||((typeof _28.selectedIndex=="number")&&_28.selectedIndex.toString()===this.value)){
+var _29=this.store.fetchSelectedItem();
+if(_29){
+var _2a=this._getValueField();
+this.value=_2a!=this.searchAttr?this.store.getValue(_29,_2a):this.labelFunc(_29,this.store);
+}
+}
+}
+this.inherited(arguments);
+},postCreate:function(){
+var _2b=dojo.query("label[for=\""+this.id+"\"]");
+if(_2b.length){
+_2b[0].id=(this.id+"_label");
+var cn=this.comboNode;
+dijit.setWaiState(cn,"labelledby",_2b[0].id);
+}
+this.inherited(arguments);
+},uninitialize:function(){
+if(this._popupWidget&&!this._popupWidget._destroyed){
+this._hideResultList();
+this._popupWidget.destroy();
+}
+this.inherited(arguments);
+},_getMenuLabelFromItem:function(_2c){
+var _2d=this.labelAttr?this.store.getValue(_2c,this.labelAttr):this.labelFunc(_2c,this.store);
+var _2e=this.labelType;
+if(this.highlightMatch!="none"&&this.labelType=="text"&&this._lastInput){
+_2d=this.doHighlight(_2d,this._escapeHtml(this._lastInput));
+_2e="html";
+}
+return {html:_2e=="html",label:_2d};
+},doHighlight:function(_2f,_30){
+var _31="i"+(this.highlightMatch=="all"?"g":"");
+var _32=this._escapeHtml(_2f);
+_30=dojo.regexp.escapeString(_30);
+var ret=_32.replace(new RegExp("(^|\\s)("+_30+")",_31),"$1<span class=\"dijitComboBoxHighlightMatch\">$2</span>");
+return ret;
+},_escapeHtml:function(str){
+str=String(str).replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
+return str;
+},open:function(){
+this._isShowingNow=true;
+return dijit.popup.open({popup:this._popupWidget,around:this.domNode,parent:this});
+},reset:function(){
+this.item=null;
+this.inherited(arguments);
+},labelFunc:function(_33,_34){
+return _34.getValue(_33,this.searchAttr).toString();
+}});
+dojo.declare("dijit.form._ComboBoxMenu",[dijit._Widget,dijit._Templated],{templateString:"<ul class='dijitReset dijitMenu' dojoAttachEvent='onmousedown:_onMouseDown,onmouseup:_onMouseUp,onmouseover:_onMouseOver,onmouseout:_onMouseOut' tabIndex='-1' style='overflow: \"auto\"; overflow-x: \"hidden\";'>"+"<li class='dijitMenuItem dijitMenuPreviousButton' dojoAttachPoint='previousButton' waiRole='option'></li>"+"<li class='dijitMenuItem dijitMenuNextButton' dojoAttachPoint='nextButton' waiRole='option'></li>"+"</ul>",_messages:null,postMixInProperties:function(){
+this._messages=dojo.i18n.getLocalization("dijit.form","ComboBox",this.lang);
+this.inherited(arguments);
+},_setValueAttr:function(_35){
+this.value=_35;
+this.onChange(_35);
+},onChange:function(_36){
+},onPage:function(_37){
+},postCreate:function(){
+this.previousButton.innerHTML=this._messages["previousMessage"];
+this.nextButton.innerHTML=this._messages["nextMessage"];
+this.inherited(arguments);
+},onClose:function(){
+this._blurOptionNode();
+},_createOption:function(_38,_39){
+var _3a=_39(_38);
+var _3b=dojo.doc.createElement("li");
+dijit.setWaiRole(_3b,"option");
+if(_3a.html){
+_3b.innerHTML=_3a.label;
+}else{
+_3b.appendChild(dojo.doc.createTextNode(_3a.label));
+}
+if(_3b.innerHTML==""){
+_3b.innerHTML="&nbsp;";
+}
+_3b.item=_38;
+return _3b;
+},createOptions:function(_3c,_3d,_3e){
+this.previousButton.style.display=(_3d.start==0)?"none":"";
+dojo.attr(this.previousButton,"id",this.id+"_prev");
+dojo.forEach(_3c,function(_3f,i){
+var _40=this._createOption(_3f,_3e);
+_40.className="dijitReset dijitMenuItem";
+dojo.attr(_40,"id",this.id+i);
+this.domNode.insertBefore(_40,this.nextButton);
+},this);
+var _41=false;
+if(_3d._maxOptions&&_3d._maxOptions!=-1){
+if((_3d.start+_3d.count)<_3d._maxOptions){
+_41=true;
+}else{
+if((_3d.start+_3d.count)>(_3d._maxOptions-1)){
+if(_3d.count==_3c.length){
+_41=true;
+}
+}
+}
+}else{
+if(_3d.count==_3c.length){
+_41=true;
+}
+}
+this.nextButton.style.display=_41?"":"none";
+dojo.attr(this.nextButton,"id",this.id+"_next");
+return this.domNode.childNodes;
+},clearResultList:function(){
+while(this.domNode.childNodes.length>2){
+this.domNode.removeChild(this.domNode.childNodes[this.domNode.childNodes.length-2]);
+}
+},_onMouseDown:function(evt){
+dojo.stopEvent(evt);
+},_onMouseUp:function(evt){
+if(evt.target===this.domNode){
+return;
+}else{
+if(evt.target==this.previousButton){
+this.onPage(-1);
+}else{
+if(evt.target==this.nextButton){
+this.onPage(1);
+}else{
+var tgt=evt.target;
+while(!tgt.item){
+tgt=tgt.parentNode;
+}
+this._setValueAttr({target:tgt},true);
+}
+}
+}
+},_onMouseOver:function(evt){
+if(evt.target===this.domNode){
+return;
+}
+var tgt=evt.target;
+if(!(tgt==this.previousButton||tgt==this.nextButton)){
+while(!tgt.item){
+tgt=tgt.parentNode;
+}
+}
+this._focusOptionNode(tgt);
+},_onMouseOut:function(evt){
+if(evt.target===this.domNode){
+return;
+}
+this._blurOptionNode();
+},_focusOptionNode:function(_42){
+if(this._highlighted_option!=_42){
+this._blurOptionNode();
+this._highlighted_option=_42;
+dojo.addClass(this._highlighted_option,"dijitMenuItemSelected");
+}
+},_blurOptionNode:function(){
+if(this._highlighted_option){
+dojo.removeClass(this._highlighted_option,"dijitMenuItemSelected");
+this._highlighted_option=null;
+}
+},_highlightNextOption:function(){
+var fc=this.domNode.firstChild;
+if(!this.getHighlightedOption()){
+this._focusOptionNode(fc.style.display=="none"?fc.nextSibling:fc);
+}else{
+var ns=this._highlighted_option.nextSibling;
+if(ns&&ns.style.display!="none"){
+this._focusOptionNode(ns);
+}
+}
+dijit.scrollIntoView(this._highlighted_option);
+},highlightFirstOption:function(){
+this._focusOptionNode(this.domNode.firstChild.nextSibling);
+dijit.scrollIntoView(this._highlighted_option);
+},highlightLastOption:function(){
+this._focusOptionNode(this.domNode.lastChild.previousSibling);
+dijit.scrollIntoView(this._highlighted_option);
+},_highlightPrevOption:function(){
+var lc=this.domNode.lastChild;
+if(!this.getHighlightedOption()){
+this._focusOptionNode(lc.style.display=="none"?lc.previousSibling:lc);
+}else{
+var ps=this._highlighted_option.previousSibling;
+if(ps&&ps.style.display!="none"){
+this._focusOptionNode(ps);
+}
+}
+dijit.scrollIntoView(this._highlighted_option);
+},_page:function(up){
+var _43=0;
+var _44=this.domNode.scrollTop;
+var _45=dojo.style(this.domNode,"height");
+if(!this.getHighlightedOption()){
+this._highlightNextOption();
+}
+while(_43<_45){
+if(up){
+if(!this.getHighlightedOption().previousSibling||this._highlighted_option.previousSibling.style.display=="none"){
+break;
+}
+this._highlightPrevOption();
+}else{
+if(!this.getHighlightedOption().nextSibling||this._highlighted_option.nextSibling.style.display=="none"){
+break;
+}
+this._highlightNextOption();
+}
+var _46=this.domNode.scrollTop;
+_43+=(_46-_44)*(up?-1:1);
+_44=_46;
+}
+},pageUp:function(){
+this._page(true);
+},pageDown:function(){
+this._page(false);
+},getHighlightedOption:function(){
+var ho=this._highlighted_option;
+return (ho&&ho.parentNode)?ho:null;
+},handleKey:function(key){
+switch(key){
+case dojo.keys.DOWN_ARROW:
+this._highlightNextOption();
+break;
+case dojo.keys.PAGE_DOWN:
+this.pageDown();
+break;
+case dojo.keys.UP_ARROW:
+this._highlightPrevOption();
+break;
+case dojo.keys.PAGE_UP:
+this.pageUp();
+break;
+}
+}});
+dojo.declare("dijit.form.ComboBox",[dijit.form.ValidationTextBox,dijit.form.ComboBoxMixin],{_setValueAttr:function(_47,_48,_49){
+this.item=null;
+if(!_47){
+_47="";
+}
+dijit.form.ValidationTextBox.prototype._setValueAttr.call(this,_47,_48,_49);
+}});
+dojo.declare("dijit.form._ComboBoxDataStore",null,{constructor:function(_4a){
+this.root=_4a;
+dojo.query("> option",_4a).forEach(function(_4b){
+_4b.innerHTML=dojo.trim(_4b.innerHTML);
+});
+},getValue:function(_4c,_4d,_4e){
+return (_4d=="value")?_4c.value:(_4c.innerText||_4c.textContent||"");
+},isItemLoaded:function(_4f){
+return true;
+},getFeatures:function(){
+return {"dojo.data.api.Read":true,"dojo.data.api.Identity":true};
+},_fetchItems:function(_50,_51,_52){
+if(!_50.query){
+_50.query={};
+}
+if(!_50.query.name){
+_50.query.name="";
+}
+if(!_50.queryOptions){
+_50.queryOptions={};
+}
+var _53=dojo.data.util.filter.patternToRegExp(_50.query.name,_50.queryOptions.ignoreCase),_54=dojo.query("> option",this.root).filter(function(_55){
+return (_55.innerText||_55.textContent||"").match(_53);
+});
+if(_50.sort){
+_54.sort(dojo.data.util.sorter.createSortFunction(_50.sort,this));
+}
+_51(_54,_50);
+},close:function(_56){
+return;
+},getLabel:function(_57){
+return _57.innerHTML;
+},getIdentity:function(_58){
+return dojo.attr(_58,"value");
+},fetchItemByIdentity:function(_59){
+var _5a=dojo.query("option[value='"+_59.identity+"']",this.root)[0];
+_59.onItem(_5a);
+},fetchSelectedItem:function(){
+var _5b=this.root,si=_5b.selectedIndex;
+return dojo.query("> option:nth-child("+(si!=-1?si+1:1)+")",_5b)[0];
+}});
+dojo.extend(dijit.form._ComboBoxDataStore,dojo.data.util.simpleFetch);
+}
diff --git a/js/dojo/dijit/form/CurrencyTextBox.js b/js/dojo/dijit/form/CurrencyTextBox.js
--- a/js/dojo/dijit/form/CurrencyTextBox.js
+++ b/js/dojo/dijit/form/CurrencyTextBox.js
@@ -1,35 +1,25 @@
-if(!dojo._hasResource["dijit.form.CurrencyTextBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.form.CurrencyTextBox"] = true;
-dojo.provide("dijit.form.CurrencyTextBox");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-//FIXME: dojo.experimental throws an unreadable exception?
-//dojo.experimental("dijit.form.CurrencyTextBox");
+if(!dojo._hasResource["dijit.form.CurrencyTextBox"]){
+dojo._hasResource["dijit.form.CurrencyTextBox"]=true;
+dojo.provide("dijit.form.CurrencyTextBox");
dojo.require("dojo.currency");
dojo.require("dijit.form.NumberTextBox");
-
-dojo.declare(
- "dijit.form.CurrencyTextBox",
- dijit.form.NumberTextBox,
- {
- // code: String
- // the ISO4217 currency code, a three letter sequence like "USD"
- // See http://en.wikipedia.org/wiki/ISO_4217
- currency: "",
-
- regExpGen: dojo.currency.regexp,
- format: dojo.currency.format,
- parse: dojo.currency.parse,
-
- postMixInProperties: function(){
- if(this.constraints === dijit.form.ValidationTextBox.prototype.constraints){
- // declare a constraints property on 'this' so we don't overwrite the shared default object in 'prototype'
- this.constraints = {};
- }
- this.constraints.currency = this.currency;
- dijit.form.CurrencyTextBox.superclass.postMixInProperties.apply(this, arguments);
- }
- }
-);
-
+dojo.declare("dijit.form.CurrencyTextBox",dijit.form.NumberTextBox,{currency:"",regExpGen:function(_1){
+return "("+(this._focused?this.inherited(arguments,[dojo.mixin({},_1,this.editOptions)])+"|":"")+dojo.currency.regexp(_1)+")";
+},_formatter:dojo.currency.format,parse:function(_2,_3){
+var v=dojo.currency.parse(_2,_3);
+if(isNaN(v)&&/\d+/.test(_2)){
+return this.inherited(arguments,[_2,dojo.mixin({},_3,this.editOptions)]);
}
+return v;
+},postMixInProperties:function(){
+this.constraints=dojo.currency._mixInDefaults(dojo.mixin(this.constraints,{currency:this.currency,exponent:false}));
+this.inherited(arguments);
+}});
+}
diff --git a/js/dojo/dijit/form/DateTextBox.js b/js/dojo/dijit/form/DateTextBox.js
--- a/js/dojo/dijit/form/DateTextBox.js
+++ b/js/dojo/dijit/form/DateTextBox.js
@@ -1,24 +1,14 @@
-if(!dojo._hasResource["dijit.form.DateTextBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.form.DateTextBox"] = true;
-dojo.provide("dijit.form.DateTextBox");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.require("dijit._Calendar");
-dojo.require("dijit.form.TimeTextBox");
-dojo.declare(
- "dijit.form.DateTextBox",
- dijit.form.TimeTextBox,
- {
- // summary:
- // A validating, serializable, range-bound date text box.
-
- _popupClass: "dijit._Calendar",
-
- postMixInProperties: function(){
- this.inherited('postMixInProperties', arguments);
- this.constraints.selector = 'date';
- }
- }
-);
-
+if(!dojo._hasResource["dijit.form.DateTextBox"]){
+dojo._hasResource["dijit.form.DateTextBox"]=true;
+dojo.provide("dijit.form.DateTextBox");
+dojo.require("dijit.Calendar");
+dojo.require("dijit.form._DateTimeTextBox");
+dojo.declare("dijit.form.DateTextBox",dijit.form._DateTimeTextBox,{baseClass:"dijitTextBox dijitDateTextBox",popupClass:"dijit.Calendar",_selector:"date",value:new Date("")});
}
diff --git a/js/dojo/dijit/form/FilteringSelect.js b/js/dojo/dijit/form/FilteringSelect.js
--- a/js/dojo/dijit/form/FilteringSelect.js
+++ b/js/dojo/dijit/form/FilteringSelect.js
@@ -1,175 +1,86 @@
-if(!dojo._hasResource["dijit.form.FilteringSelect"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.form.FilteringSelect"] = true;
-dojo.provide("dijit.form.FilteringSelect");
-
-dojo.require("dijit.form.ComboBox");
-
-dojo.declare(
- "dijit.form.FilteringSelect",
- [dijit.form.MappedTextBox, dijit.form.ComboBoxMixin],
- {
- /*
- * summary
- * Enhanced version of HTML's <select> tag.
- *
- * Similar features:
- * - There is a drop down list of possible values.
- * - You can only enter a value from the drop down list. (You can't enter an arbitrary value.)
- * - The value submitted with the form is the hidden value (ex: CA),
- * not the displayed value a.k.a. label (ex: California)
- *
- * Enhancements over plain HTML version:
- * - If you type in some text then it will filter down the list of possible values in the drop down list.
- * - List can be specified either as a static list or via a javascript function (that can get the list from a server)
- */
-
- // searchAttr: String
- // Searches pattern match against this field
-
- // labelAttr: String
- // Optional. The text that actually appears in the drop down.
- // If not specified, the searchAttr text is used instead.
- labelAttr: "",
-
- // labelType: String
- // "html" or "text"
- labelType: "text",
-
- _isvalid:true,
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- isValid:function(){
- return this._isvalid;
- },
-
- _callbackSetLabel: function(/*Array*/ result, /*Object*/ dataObject, /*Boolean, optional*/ priorityChange){
- // summary
- // Callback function that dynamically sets the label of the ComboBox
-
- // setValue does a synchronous lookup,
- // so it calls _callbackSetLabel directly,
- // and so does not pass dataObject
- // dataObject==null means do not test the lastQuery, just continue
- if(dataObject&&dataObject.query[this.searchAttr]!=this._lastQuery){return;}
- if(!result.length){
- //#3268: do nothing on bad input
- //this._setValue("", "");
- //#3285: change CSS to indicate error
- if(!this._hasFocus){ this.valueNode.value=""; }
- dijit.form.TextBox.superclass.setValue.call(this, undefined, !this._hasFocus);
- this._isvalid=false;
- this.validate(this._hasFocus);
- }else{
- this._setValueFromItem(result[0], priorityChange);
- }
- },
-
- _openResultList: function(/*Object*/ results, /*Object*/ dataObject){
- // #3285: tap into search callback to see if user's query resembles a match
- if(dataObject.query[this.searchAttr]!=this._lastQuery){return;}
- this._isvalid=results.length!=0;
- this.validate(true);
- dijit.form.ComboBoxMixin.prototype._openResultList.apply(this, arguments);
- },
-
- getValue:function(){
- // don't get the textbox value but rather the previously set hidden value
- return this.valueNode.value;
- },
-
- _getValueField:function(){
- // used for option tag selects
- return "value";
- },
- _setValue:function(/*String*/ value, /*String*/ displayedValue, /*Boolean, optional*/ priorityChange){
- this.valueNode.value = value;
- dijit.form.FilteringSelect.superclass.setValue.call(this, value, priorityChange, displayedValue);
- this._lastDisplayedValue = displayedValue;
- },
-
- setValue: function(/*String*/ value, /*Boolean, optional*/ priorityChange){
- // summary
- // Sets the value of the select.
- // Also sets the label to the corresponding value by reverse lookup.
-
- //#3347: fetchItemByIdentity if no keyAttr specified
- var self=this;
- var handleFetchByIdentity = function(item, priorityChange){
- if(item){
- if(self.store.isItemLoaded(item)){
- self._callbackSetLabel([item], undefined, priorityChange);
- }else{
- self.store.loadItem({item:item, onItem: function(result, dataObject){self._callbackSetLabel(result, dataObject, priorityChange)}});
- }
- }else{
- self._isvalid=false;
- // prevent errors from Tooltip not being created yet
- self.validate(false);
- }
- }
- this.store.fetchItemByIdentity({identity: value, onItem: function(item){handleFetchByIdentity(item, priorityChange)}});
- },
-
- _setValueFromItem: function(/*item*/ item, /*Boolean, optional*/ priorityChange){
- // summary
- // Set the displayed valued in the input box, based on a selected item.
- // Users shouldn't call this function; they should be calling setDisplayedValue() instead
- this._isvalid=true;
- this._setValue(this.store.getIdentity(item), this.labelFunc(item, this.store), priorityChange);
- },
-
- labelFunc: function(/*item*/ item, /*dojo.data.store*/ store){
- // summary: Event handler called when the label changes
- // returns the label that the ComboBox should display
- return store.getValue(item, this.searchAttr);
- },
-
- onkeyup: function(/*Event*/ evt){
- // summary: internal function
- // FilteringSelect needs to wait for the complete label before committing to a reverse lookup
- //this.setDisplayedValue(this.textbox.value);
- },
-
- _doSelect: function(/*Event*/ tgt){
- // summary:
- // ComboBox's menu callback function
- // FilteringSelect overrides this to set both the visible and hidden value from the information stored in the menu
- this.item = tgt.item;
- this._setValueFromItem(tgt.item, true);
- },
-
- setDisplayedValue:function(/*String*/ label){
- // summary:
- // Set textbox to display label
- // Also performs reverse lookup to set the hidden value
- // Used in InlineEditBox
-
- if(this.store){
- var query={};
- this._lastQuery=query[this.searchAttr]=label;
- // if the label is not valid, the callback will never set it,
- // so the last valid value will get the warning textbox
- // set the textbox value now so that the impending warning will make sense to the user
- this.textbox.value=label;
- this._lastDisplayedValue=label;
- this.store.fetch({query:query, queryOptions:{ignoreCase:this.ignoreCase, deep:true}, onComplete: dojo.hitch(this, this._callbackSetLabel)});
- }
- },
-
- _getMenuLabelFromItem:function(/*Item*/ item){
- // internal function to help ComboBoxMenu figure out what to display
- if(this.labelAttr){return {html:this.labelType=="html", label:this.store.getValue(item, this.labelAttr)};}
- else{
- // because this function is called by ComboBoxMenu, this.inherited tries to find the superclass of ComboBoxMenu
- return dijit.form.ComboBoxMixin.prototype._getMenuLabelFromItem.apply(this, arguments);
- }
- },
-
- postMixInProperties: function(){
- dijit.form.ComboBoxMixin.prototype.postMixInProperties.apply(this, arguments);
- dijit.form.MappedTextBox.prototype.postMixInProperties.apply(this, arguments);
- }
- }
-);
-
+if(!dojo._hasResource["dijit.form.FilteringSelect"]){
+dojo._hasResource["dijit.form.FilteringSelect"]=true;
+dojo.provide("dijit.form.FilteringSelect");
+dojo.require("dijit.form.ComboBox");
+dojo.declare("dijit.form.FilteringSelect",[dijit.form.MappedTextBox,dijit.form.ComboBoxMixin],{_isvalid:true,required:true,_lastDisplayedValue:"",isValid:function(){
+return this._isvalid||(!this.required&&this.attr("displayedValue")=="");
+},_callbackSetLabel:function(_1,_2,_3){
+if((_2&&_2.query[this.searchAttr]!=this._lastQuery)||(!_2&&_1.length&&this.store.getIdentity(_1[0])!=this._lastQuery)){
+return;
+}
+if(!_1.length){
+this.valueNode.value="";
+dijit.form.TextBox.superclass._setValueAttr.call(this,"",_3||(_3===undefined&&!this._focused));
+this._isvalid=false;
+this.validate(this._focused);
+this.item=null;
+}else{
+this.attr("item",_1[0],_3);
+}
+},_openResultList:function(_4,_5){
+if(_5.query[this.searchAttr]!=this._lastQuery){
+return;
+}
+this._isvalid=_4.length!=0;
+this.validate(true);
+dijit.form.ComboBoxMixin.prototype._openResultList.apply(this,arguments);
+},_getValueAttr:function(){
+return this.valueNode.value;
+},_getValueField:function(){
+return "value";
+},_setValueAttr:function(_6,_7){
+if(!this._onChangeActive){
+_7=null;
+}
+this._lastQuery=_6;
+if(_6===null||_6===""){
+this._setDisplayedValueAttr("",_7);
+return;
}
+var _8=this;
+this.store.fetchItemByIdentity({identity:_6,onItem:function(_9){
+_8._callbackSetLabel([_9],undefined,_7);
+}});
+},_setItemAttr:function(_a,_b,_c){
+this._isvalid=true;
+this.inherited(arguments);
+this.valueNode.value=this.value;
+this._lastDisplayedValue=this.textbox.value;
+},_getDisplayQueryString:function(_d){
+return _d.replace(/([\\\*\?])/g,"\\$1");
+},_setDisplayedValueAttr:function(_e,_f){
+if(!this._created){
+_f=false;
+}
+if(this.store){
+this._hideResultList();
+var _10=dojo.clone(this.query);
+this._lastQuery=_10[this.searchAttr]=this._getDisplayQueryString(_e);
+this.textbox.value=_e;
+this._lastDisplayedValue=_e;
+var _11=this;
+var _12={query:_10,queryOptions:{ignoreCase:this.ignoreCase,deep:true},onComplete:function(_13,_14){
+_11._fetchHandle=null;
+dojo.hitch(_11,"_callbackSetLabel")(_13,_14,_f);
+},onError:function(_15){
+_11._fetchHandle=null;
+console.error("dijit.form.FilteringSelect: "+_15);
+dojo.hitch(_11,"_callbackSetLabel")([],undefined,false);
+}};
+dojo.mixin(_12,this.fetchProperties);
+this._fetchHandle=this.store.fetch(_12);
+}
+},postMixInProperties:function(){
+this.inherited(arguments);
+this._isvalid=!this.required;
+},undo:function(){
+this.attr("displayedValue",this._lastDisplayedValue);
+}});
+}
diff --git a/js/dojo/dijit/form/Form.js b/js/dojo/dijit/form/Form.js
--- a/js/dojo/dijit/form/Form.js
+++ b/js/dojo/dijit/form/Form.js
@@ -1,283 +1,62 @@
-if(!dojo._hasResource["dijit.form.Form"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.form.Form"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit.form.Form"]){
+dojo._hasResource["dijit.form.Form"]=true;
dojo.provide("dijit.form.Form");
-
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
-
-dojo.declare("dijit.form._FormMixin", null,
- {
- /*
- summary:
- Widget corresponding to <form> tag, for validation and serialization
-
- usage:
- <form dojoType="dijit.form.Form" id="myForm">
- Name: <input type="text" name="name" />
- </form>
- myObj={name: "John Doe"};
- dijit.byId('myForm').setValues(myObj);
-
- myObj=dijit.byId('myForm').getValues();
- TODO:
- * Repeater
- * better handling for arrays. Often form elements have names with [] like
- * people[3].sex (for a list of people [{name: Bill, sex: M}, ...])
-
- */
-
- // HTML <FORM> attributes
-
- action: "",
- method: "",
- enctype: "",
- name: "",
- "accept-charset": "",
- accept: "",
- target: "",
-
- attributeMap: dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),
- {action: "", method: "", enctype: "", "accept-charset": "", accept: "", target: ""}),
-
- // execute: Function
- // User defined function to do stuff when the user hits the submit button
- execute: function(/*Object*/ formContents){},
-
- // onCancel: Function
- // Callback when user has canceled dialog, to notify container
- // (user shouldn't override)
- onCancel: function(){},
-
- // onExecute: Function
- // Callback when user is about to execute dialog, to notify container
- // (user shouldn't override)
- onExecute: function(){},
-
- templateString: "<form dojoAttachPoint='containerNode' dojoAttachEvent='onsubmit:_onSubmit' name='${name}' enctype='multipart/form-data'></form>",
-
- _onSubmit: function(/*event*/e) {
- // summary: callback when user hits submit button
- dojo.stopEvent(e);
- this.onExecute(); // notify container that we are about to execute
- this.execute(this.getValues());
- },
-
- submit: function() {
- // summary: programatically submit form
- this.containerNode.submit();
- },
-
- setValues: function(/*object*/obj) {
- // summary: fill in form values from a JSON structure
-
- // generate map from name --> [list of widgets with that name]
- var map = {};
- dojo.forEach(this.getDescendants(), function(widget){
- if(!widget.name){ return; }
- var entry = map[widget.name] || (map[widget.name] = [] );
- entry.push(widget);
- });
-
- // call setValue() or setChecked() for each widget, according to obj
- for(var name in map){
- var widgets = map[name], // array of widgets w/this name
- values = dojo.getObject(name, false, obj); // list of values for those widgets
- if(!dojo.isArray(values)){
- values = [ values ];
- }
- if(widgets[0].setChecked){
- // for checkbox/radio, values is a list of which widgets should be checked
- dojo.forEach(widgets, function(w, i){
- w.setChecked(dojo.indexOf(values, w.value) != -1);
- });
- }else{
- // otherwise, values is a list of values to be assigned sequentially to each widget
- dojo.forEach(widgets, function(w, i){
- w.setValue(values[i]);
- });
- }
- }
-
- /***
- * TODO: code for plain input boxes (this shouldn't run for inputs that are part of widgets
-
- dojo.forEach(this.containerNode.elements, function(element){
- if (element.name == ''){return}; // like "continue"
- var namePath = element.name.split(".");
- var myObj=obj;
- var name=namePath[namePath.length-1];
- for(var j=1,len2=namePath.length;j<len2;++j) {
- var p=namePath[j - 1];
- // repeater support block
- var nameA=p.split("[");
- if (nameA.length > 1) {
- if(typeof(myObj[nameA[0]]) == "undefined") {
- myObj[nameA[0]]=[ ];
- } // if
-
- nameIndex=parseInt(nameA[1]);
- if(typeof(myObj[nameA[0]][nameIndex]) == "undefined") {
- myObj[nameA[0]][nameIndex]={};
- }
- myObj=myObj[nameA[0]][nameIndex];
- continue;
- } // repeater support ends
-
- if(typeof(myObj[p]) == "undefined") {
- myObj=undefined;
- break;
- };
- myObj=myObj[p];
- }
-
- if (typeof(myObj) == "undefined") {
- return; // like "continue"
- }
- if (typeof(myObj[name]) == "undefined" && this.ignoreNullValues) {
- return; // like "continue"
- }
-
- // TODO: widget values (just call setValue() on the widget)
-
- switch(element.type) {
- case "checkbox":
- element.checked = (name in myObj) &&
- dojo.some(myObj[name], function(val){ return val==element.value; });
- break;
- case "radio":
- element.checked = (name in myObj) && myObj[name]==element.value;
- break;
- case "select-multiple":
- element.selectedIndex=-1;
- dojo.forEach(element.options, function(option){
- option.selected = dojo.some(myObj[name], function(val){ return option.value == val; });
- });
- break;
- case "select-one":
- element.selectedIndex="0";
- dojo.forEach(element.options, function(option){
- option.selected = option.value == myObj[name];
- });
- break;
- case "hidden":
- case "text":
- case "textarea":
- case "password":
- element.value = myObj[name] || "";
- break;
- }
- });
- */
- },
-
- getValues: function() {
- // summary: generate JSON structure from form values
-
- // get widget values
- var obj = {};
- dojo.forEach(this.getDescendants(), function(widget){
- var value = widget.getValue ? widget.getValue() : widget.value;
- var name = widget.name;
- if(!name){ return; }
-
- // Store widget's value(s) as a scalar, except for checkboxes which are automatically arrays
- if(widget.setChecked){
- if(/Radio/.test(widget.declaredClass)){
- // radio button
- if(widget.checked){
- dojo.setObject(name, value, obj);
- }
- }else{
- // checkbox/toggle button
- var ary=dojo.getObject(name, false, obj);
- if(!ary){
- ary=[];
- dojo.setObject(name, ary, obj);
- }
- if(widget.checked){
- ary.push(value);
- }
- }
- }else{
- // plain input
- dojo.setObject(name, value, obj);
- }
- });
-
- /***
- * code for plain input boxes (see also dojo.formToObject, can we use that instead of this code?
- * but it doesn't understand [] notation, presumably)
- var obj = { };
- dojo.forEach(this.containerNode.elements, function(elm){
- if (!elm.name) {
- return; // like "continue"
- }
- var namePath = elm.name.split(".");
- var myObj=obj;
- var name=namePath[namePath.length-1];
- for(var j=1,len2=namePath.length;j<len2;++j) {
- var nameIndex = null;
- var p=namePath[j - 1];
- var nameA=p.split("[");
- if (nameA.length > 1) {
- if(typeof(myObj[nameA[0]]) == "undefined") {
- myObj[nameA[0]]=[ ];
- } // if
- nameIndex=parseInt(nameA[1]);
- if(typeof(myObj[nameA[0]][nameIndex]) == "undefined") {
- myObj[nameA[0]][nameIndex]={};
- }
- } else if(typeof(myObj[nameA[0]]) == "undefined") {
- myObj[nameA[0]]={}
- } // if
-
- if (nameA.length == 1) {
- myObj=myObj[nameA[0]];
- } else {
- myObj=myObj[nameA[0]][nameIndex];
- } // if
- } // for
-
- if ((elm.type != "select-multiple" && elm.type != "checkbox" && elm.type != "radio") || (elm.type=="radio" && elm.checked)) {
- if(name == name.split("[")[0]) {
- myObj[name]=elm.value;
- } else {
- // can not set value when there is no name
- }
- } else if (elm.type == "checkbox" && elm.checked) {
- if(typeof(myObj[name]) == 'undefined') {
- myObj[name]=[ ];
- }
- myObj[name].push(elm.value);
- } else if (elm.type == "select-multiple") {
- if(typeof(myObj[name]) == 'undefined') {
- myObj[name]=[ ];
- }
- for (var jdx=0,len3=elm.options.length; jdx<len3; ++jdx) {
- if (elm.options[jdx].selected) {
- myObj[name].push(elm.options[jdx].value);
- }
- }
- } // if
- name=undefined;
- }); // forEach
- ***/
- return obj;
- },
-
- isValid: function() {
- // TODO: ComboBox might need time to process a recently input value. This should be async?
- // make sure that every widget that has a validator function returns true
- return dojo.every(this.getDescendants(), function(widget){
- return !widget.isValid || widget.isValid();
- });
- }
- });
-
-dojo.declare(
- "dijit.form.Form",
- [dijit._Widget, dijit._Templated, dijit.form._FormMixin],
- null
-);
-
+dojo.require("dijit.form._FormMixin");
+dojo.declare("dijit.form.Form",[dijit._Widget,dijit._Templated,dijit.form._FormMixin],{name:"",action:"",method:"",encType:"","accept-charset":"",accept:"",target:"",templateString:"<form dojoAttachPoint='containerNode' dojoAttachEvent='onreset:_onReset,onsubmit:_onSubmit' ${nameAttrSetting}></form>",attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{action:"",method:"",encType:"","accept-charset":"",accept:"",target:""}),postMixInProperties:function(){
+this.nameAttrSetting=this.name?("name='"+this.name+"'"):"";
+this.inherited(arguments);
+},execute:function(_1){
+},onExecute:function(){
+},_setEncTypeAttr:function(_2){
+this.encType=_2;
+dojo.attr(this.domNode,"encType",_2);
+if(dojo.isIE){
+this.domNode.encoding=_2;
+}
+},postCreate:function(){
+if(dojo.isIE&&this.srcNodeRef&&this.srcNodeRef.attributes){
+var _3=this.srcNodeRef.attributes.getNamedItem("encType");
+if(_3&&!_3.specified&&(typeof _3.value=="string")){
+this.attr("encType",_3.value);
+}
}
+this.inherited(arguments);
+},onReset:function(e){
+return true;
+},_onReset:function(e){
+var _4={returnValue:true,preventDefault:function(){
+this.returnValue=false;
+},stopPropagation:function(){
+},currentTarget:e.currentTarget,target:e.target};
+if(!(this.onReset(_4)===false)&&_4.returnValue){
+this.reset();
+}
+dojo.stopEvent(e);
+return false;
+},_onSubmit:function(e){
+var fp=dijit.form.Form.prototype;
+if(this.execute!=fp.execute||this.onExecute!=fp.onExecute){
+dojo.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.","","2.0");
+this.onExecute();
+this.execute(this.getValues());
+}
+if(this.onSubmit(e)===false){
+dojo.stopEvent(e);
+}
+},onSubmit:function(e){
+return this.isValid();
+},submit:function(){
+if(!(this.onSubmit()===false)){
+this.containerNode.submit();
+}
+}});
+}
diff --git a/js/dojo/dijit/form/NumberSpinner.js b/js/dojo/dijit/form/NumberSpinner.js
--- a/js/dojo/dijit/form/NumberSpinner.js
+++ b/js/dojo/dijit/form/NumberSpinner.js
@@ -1,31 +1,38 @@
-if(!dojo._hasResource["dijit.form.NumberSpinner"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.form.NumberSpinner"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit.form.NumberSpinner"]){
+dojo._hasResource["dijit.form.NumberSpinner"]=true;
dojo.provide("dijit.form.NumberSpinner");
-
dojo.require("dijit.form._Spinner");
dojo.require("dijit.form.NumberTextBox");
-
-dojo.declare(
-"dijit.form.NumberSpinner",
-[dijit.form._Spinner, dijit.form.NumberTextBoxMixin],
-{
- // summary: Number Spinner
- // description: This widget is the same as NumberTextBox but with up/down arrows added
-
- required: true,
-
- adjust: function(/* Object */ val, /*Number*/ delta){
- // summary: change Number val by the given amount
- var newval = val+delta;
- if(isNaN(val) || isNaN(newval)){ return val; }
- if((typeof this.constraints.max == "number") && (newval > this.constraints.max)){
- newval = this.constraints.max;
- }
- if((typeof this.constraints.min == "number") && (newval < this.constraints.min)){
- newval = this.constraints.min;
- }
- return newval;
- }
-});
-
+dojo.declare("dijit.form.NumberSpinner",[dijit.form._Spinner,dijit.form.NumberTextBoxMixin],{adjust:function(_1,_2){
+var tc=this.constraints,v=isNaN(_1),_3=!isNaN(tc.max),_4=!isNaN(tc.min);
+if(v&&_2!=0){
+_1=(_2>0)?_4?tc.min:_3?tc.max:0:_3?this.constraints.max:_4?tc.min:0;
+}
+var _5=_1+_2;
+if(v||isNaN(_5)){
+return _1;
+}
+if(_3&&(_5>tc.max)){
+_5=tc.max;
}
+if(_4&&(_5<tc.min)){
+_5=tc.min;
+}
+return _5;
+},_onKeyPress:function(e){
+if((e.charOrCode==dojo.keys.HOME||e.charOrCode==dojo.keys.END)&&!(e.ctrlKey||e.altKey||e.metaKey)&&typeof this.attr("value")!="undefined"){
+var _6=this.constraints[(e.charOrCode==dojo.keys.HOME?"min":"max")];
+if(_6){
+this._setValueAttr(_6,true);
+}
+dojo.stopEvent(e);
+}
+}});
+}
diff --git a/js/dojo/dijit/form/NumberTextBox.js b/js/dojo/dijit/form/NumberTextBox.js
--- a/js/dojo/dijit/form/NumberTextBox.js
+++ b/js/dojo/dijit/form/NumberTextBox.js
@@ -1,42 +1,108 @@
-if(!dojo._hasResource["dijit.form.NumberTextBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.form.NumberTextBox"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit.form.NumberTextBox"]){
+dojo._hasResource["dijit.form.NumberTextBox"]=true;
dojo.provide("dijit.form.NumberTextBox");
-
dojo.require("dijit.form.ValidationTextBox");
dojo.require("dojo.number");
-
-dojo.declare(
- "dijit.form.NumberTextBoxMixin",
- null,
- {
- // summary:
- // A mixin for all number textboxes
- regExpGen: dojo.number.regexp,
-
- format: function(/*Number*/ value, /*Object*/ constraints){
- if(isNaN(value)){ return ""; }
- return dojo.number.format(value, constraints);
- },
-
- parse: dojo.number.parse,
-
- filter: function(/*Number*/ value){
- if(typeof value == "string"){ return this.inherited('filter', arguments); }
- return (isNaN(value) ? '' : value);
- },
-
- value: NaN
- }
-);
-
-dojo.declare(
- "dijit.form.NumberTextBox",
- [dijit.form.RangeBoundTextBox,dijit.form.NumberTextBoxMixin],
- {
- // summary:
- // A validating, serializable, range-bound text box.
- // constraints object: min, max, places
- }
-);
-
+dojo.declare("dijit.form.NumberTextBoxMixin",null,{regExpGen:dojo.number.regexp,value:NaN,editOptions:{pattern:"#.######"},_formatter:dojo.number.format,postMixInProperties:function(){
+var _1=typeof this.constraints.places=="number"?this.constraints.places:0;
+if(_1){
+_1++;
+}
+if(typeof this.constraints.max!="number"){
+this.constraints.max=9*Math.pow(10,15-_1);
+}
+if(typeof this.constraints.min!="number"){
+this.constraints.min=-9*Math.pow(10,15-_1);
+}
+this.inherited(arguments);
+},_onFocus:function(){
+if(this.disabled){
+return;
+}
+var _2=this.attr("value");
+if(typeof _2=="number"&&!isNaN(_2)){
+var _3=this.format(_2,this.constraints);
+if(_3!==undefined){
+this.textbox.value=_3;
+}
+}
+this.inherited(arguments);
+},format:function(_4,_5){
+if(typeof _4!="number"){
+return String(_4);
+}
+if(isNaN(_4)){
+return "";
+}
+if(("rangeCheck" in this)&&!this.rangeCheck(_4,_5)){
+return String(_4);
+}
+if(this.editOptions&&this._focused){
+_5=dojo.mixin({},_5,this.editOptions);
}
+return this._formatter(_4,_5);
+},parse:dojo.number.parse,_getDisplayedValueAttr:function(){
+var v=this.inherited(arguments);
+return isNaN(v)?this.textbox.value:v;
+},filter:function(_6){
+return (_6===null||_6===""||_6===undefined)?NaN:this.inherited(arguments);
+},serialize:function(_7,_8){
+return (typeof _7!="number"||isNaN(_7))?"":this.inherited(arguments);
+},_setValueAttr:function(_9,_a,_b){
+if(_9!==undefined&&_b===undefined){
+if(typeof _9=="number"){
+if(isNaN(_9)){
+_b="";
+}else{
+if(("rangeCheck" in this)&&!this.rangeCheck(_9,this.constraints)){
+_b=String(_9);
+}
+}
+}else{
+if(!_9){
+_b="";
+_9=NaN;
+}else{
+_b=String(_9);
+_9=undefined;
+}
+}
+}
+this.inherited(arguments,[_9,_a,_b]);
+},_getValueAttr:function(){
+var v=this.inherited(arguments);
+if(isNaN(v)&&this.textbox.value!==""){
+if(this.constraints.exponent!==false&&/\de[-+]?|\d/i.test(this.textbox.value)&&(new RegExp("^"+dojo.number._realNumberRegexp(dojo.mixin({},this.constraints))+"$").test(this.textbox.value))){
+var n=Number(this.textbox.value);
+return isNaN(n)?undefined:n;
+}else{
+return undefined;
+}
+}else{
+return v;
+}
+},isValid:function(_c){
+if(!this._focused||this._isEmpty(this.textbox.value)){
+return this.inherited(arguments);
+}else{
+var v=this.attr("value");
+if(!isNaN(v)&&this.rangeCheck(v,this.constraints)){
+if(this.constraints.exponent!==false&&/\de[-+]?\d/i.test(this.textbox.value)){
+return true;
+}else{
+return this.inherited(arguments);
+}
+}else{
+return false;
+}
+}
+}});
+dojo.declare("dijit.form.NumberTextBox",[dijit.form.RangeBoundTextBox,dijit.form.NumberTextBoxMixin],{});
+}
diff --git a/js/dojo/dijit/form/Slider.js b/js/dojo/dijit/form/Slider.js
--- a/js/dojo/dijit/form/Slider.js
+++ b/js/dojo/dijit/form/Slider.js
@@ -1,401 +1,18 @@
-if(!dojo._hasResource["dijit.form.Slider"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.form.Slider"] = true;
-dojo.provide("dijit.form.Slider");
-
-dojo.require("dijit.form._FormWidget");
-dojo.require("dijit._Container");
-dojo.require("dojo.dnd.move");
-dojo.require("dijit.form.Button");
-dojo.require("dojo.number");
-
-dojo.declare(
- "dijit.form.HorizontalSlider",
- [dijit.form._FormWidget, dijit._Container],
-{
- // summary
- // A form widget that allows one to select a value with a horizontally draggable image
-
- templateString:"<table class=\"dijit dijitReset dijitSlider\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\"\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t\t><td dojoAttachPoint=\"containerNode,topDecoration\" class=\"dijitReset\" style=\"text-align:center;width:100%;\"></td\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitHorizontalSliderButtonContainer\"\n\t\t\t><div class=\"dijitHorizontalSliderDecrementIcon\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"decrementButton\" dojoAttachEvent=\"onclick: decrement\"><span class=\"dijitSliderButtonInner\">-</span></div\n\t\t></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><div class=\"dijitSliderBar dijitSliderBumper dijitHorizontalSliderBumper dijitSliderLeftBumper dijitHorizontalSliderLeftBumper\"></div\n\t\t></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><input dojoAttachPoint=\"valueNode\" type=\"hidden\" name=\"${name}\"\n\t\t\t/><div style=\"position:relative;\" dojoAttachPoint=\"sliderBarContainer\"\n\t\t\t\t><div dojoAttachPoint=\"progressBar\" class=\"dijitSliderBar dijitHorizontalSliderBar dijitSliderProgressBar dijitHorizontalSliderProgressBar\" dojoAttachEvent=\"onclick:_onBarClick\"\n\t\t\t\t\t><div dojoAttachPoint=\"sliderHandle,focusNode\" class=\"dijitSliderMoveable dijitHorizontalSliderMoveable\" dojoAttachEvent=\"onkeypress:_onKeyPress,onclick:_onHandleClick\" waiRole=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"\n\t\t\t\t\t\t><div class=\"dijitSliderImageHandle dijitHorizontalSliderImageHandle\"></div\n\t\t\t\t\t></div\n\t\t\t\t></div\n\t\t\t\t><div dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitHorizontalSliderBar dijitSliderRemainingBar dijitHorizontalSliderRemainingBar\" dojoAttachEvent=\"onclick:_onBarClick\"></div\n\t\t\t></div\n\t\t></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><div class=\"dijitSliderBar dijitSliderBumper dijitHorizontalSliderBumper dijitSliderRightBumper dijitHorizontalSliderRightBumper\"></div\n\t\t></td\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitHorizontalSliderButtonContainer\" style=\"right:0px;\"\n\t\t\t><div class=\"dijitHorizontalSliderIncrementIcon\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"incrementButton\" dojoAttachEvent=\"onclick: increment\"><span class=\"dijitSliderButtonInner\">+</span></div\n\t\t></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t\t><td dojoAttachPoint=\"containerNode,bottomDecoration\" class=\"dijitReset\" style=\"text-align:center;\"></td\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t></tr\n></table>\n",
- value: 0,
-
- // showButtons: boolean
- // Show increment/decrement buttons at the ends of the slider?
- showButtons: true,
-
- // minimum:: integer
- // The minimum value allowed.
- minimum: 0,
-
- // maximum: integer
- // The maximum allowed value.
- maximum: 100,
-
- // discreteValues: integer
- // The maximum allowed values dispersed evenly between minimum and maximum (inclusive).
- discreteValues: Infinity,
-
- // pageIncrement: integer
- // The amount of change with shift+arrow
- pageIncrement: 2,
-
- // clickSelect: boolean
- // If clicking the progress bar changes the value or not
- clickSelect: true,
-
- widgetsInTemplate: true,
-
- attributeMap: dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),
- {id:"", name:"valueNode"}),
-
- baseClass: "dijitSlider",
-
- _mousePixelCoord: "pageX",
- _pixelCount: "w",
- _startingPixelCoord: "x",
- _startingPixelCount: "l",
- _handleOffsetCoord: "left",
- _progressPixelSize: "width",
- _upsideDown: false,
-
- _onKeyPress: function(/*Event*/ e){
- if(this.disabled || e.altKey || e.ctrlKey){ return; }
- switch(e.keyCode){
- case dojo.keys.HOME:
- this.setValue(this.minimum, false);
- break;
- case dojo.keys.END:
- this.setValue(this.maximum, false);
- break;
- case dojo.keys.UP_ARROW:
- case (this._isReversed() ? dojo.keys.LEFT_ARROW : dojo.keys.RIGHT_ARROW):
- case dojo.keys.PAGE_UP:
- this.increment(e);
- break;
- case dojo.keys.DOWN_ARROW:
- case (this._isReversed() ? dojo.keys.RIGHT_ARROW : dojo.keys.LEFT_ARROW):
- case dojo.keys.PAGE_DOWN:
- this.decrement(e);
- break;
- default:
- this.inherited("_onKeyPress", arguments);
- return;
- }
- dojo.stopEvent(e);
- },
-
- _onHandleClick: function(e){
- if(this.disabled){ return; }
- if(!dojo.isIE){
- // make sure you get focus when dragging the handle
- // (but don't do on IE because it causes a flicker on mouse up (due to blur then focus)
- dijit.focus(this.sliderHandle);
- }
- dojo.stopEvent(e);
- },
-
- _isReversed: function() {
- return !(this._upsideDown || this.isLeftToRight());
- },
-
- _onBarClick: function(e){
- if(this.disabled || !this.clickSelect){ return; }
- dijit.focus(this.sliderHandle);
- dojo.stopEvent(e);
- var abspos = dojo.coords(this.sliderBarContainer, true);
- var pixelValue = e[this._mousePixelCoord] - abspos[this._startingPixelCoord];
- this._setPixelValue(this._isReversed() || this._upsideDown ? (abspos[this._pixelCount] - pixelValue) : pixelValue, abspos[this._pixelCount], true);
- },
-
- _setPixelValue: function(/*Number*/ pixelValue, /*Number*/ maxPixels, /*Boolean, optional*/ priorityChange){
- if(this.disabled){ return; }
- pixelValue = pixelValue < 0 ? 0 : maxPixels < pixelValue ? maxPixels : pixelValue;
- var count = this.discreteValues;
- if(count <= 1 || count == Infinity){ count = maxPixels; }
- count--;
- var pixelsPerValue = maxPixels / count;
- var wholeIncrements = Math.round(pixelValue / pixelsPerValue);
- this.setValue((this.maximum-this.minimum)*wholeIncrements/count + this.minimum, priorityChange);
- },
-
- setValue: function(/*Number*/ value, /*Boolean, optional*/ priorityChange){
- this.valueNode.value = this.value = value;
- this.inherited('setValue', arguments);
- var percent = (value - this.minimum) / (this.maximum - this.minimum);
- this.progressBar.style[this._progressPixelSize] = (percent*100) + "%";
- this.remainingBar.style[this._progressPixelSize] = ((1-percent)*100) + "%";
- },
-
- _bumpValue: function(signedChange){
- if(this.disabled){ return; }
- var s = dojo.getComputedStyle(this.sliderBarContainer);
- var c = dojo._getContentBox(this.sliderBarContainer, s);
- var count = this.discreteValues;
- if(count <= 1 || count == Infinity){ count = c[this._pixelCount]; }
- count--;
- var value = (this.value - this.minimum) * count / (this.maximum - this.minimum) + signedChange;
- if(value < 0){ value = 0; }
- if(value > count){ value = count; }
- value = value * (this.maximum - this.minimum) / count + this.minimum;
- this.setValue(value, true);
- },
-
- decrement: function(e){
- // summary
- // decrement slider by 1 unit
- this._bumpValue(e.keyCode == dojo.keys.PAGE_DOWN?-this.pageIncrement:-1);
- },
-
- increment: function(e){
- // summary
- // increment slider by 1 unit
- this._bumpValue(e.keyCode == dojo.keys.PAGE_UP?this.pageIncrement:1);
- },
-
- _mouseWheeled: function(/*Event*/ evt){
- dojo.stopEvent(evt);
- var scrollAmount = 0;
- if(typeof evt.wheelDelta == 'number'){ // IE
- scrollAmount = evt.wheelDelta;
- }else if(typeof evt.detail == 'number'){ // Mozilla+Firefox
- scrollAmount = -evt.detail;
- }
- if(scrollAmount > 0){
- this.increment(evt);
- }else if(scrollAmount < 0){
- this.decrement(evt);
- }
- },
-
- startup: function(){
- dojo.forEach(this.getChildren(), function(child){
- if(this[child.container] != this.containerNode){
- this[child.container].appendChild(child.domNode);
- }
- }, this);
- },
-
- _onBlur: function(){
- dijit.form.HorizontalSlider.superclass.setValue.call(this, this.value, true);
- },
-
- postCreate: function(){
- if(this.showButtons){
- this.incrementButton.style.display="";
- this.decrementButton.style.display="";
- }
- this.connect(this.domNode, dojo.isIE ? "onmousewheel" : 'DOMMouseScroll', "_mouseWheeled");
-
- // define a custom constructor for a SliderMover that points back to me
- var _self = this;
- var mover = function(){
- dijit.form._SliderMover.apply(this, arguments);
- this.widget = _self;
- };
- dojo.extend(mover, dijit.form._SliderMover.prototype);
-
- this._movable = new dojo.dnd.Moveable(this.sliderHandle, {mover: mover});
- this.inherited('postCreate', arguments);
- },
-
- destroy: function(){
- this._movable.destroy();
- this.inherited('destroy', arguments);
- }
-});
-
-dojo.declare(
- "dijit.form.VerticalSlider",
- dijit.form.HorizontalSlider,
-{
- // summary
- // A form widget that allows one to select a value with a vertically draggable image
-
- templateString:"<table class=\"dijitReset dijitSlider\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\"\n><tbody class=\"dijitReset\"\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitVerticalSliderButtonContainer\"\n\t\t\t><div class=\"dijitVerticalSliderIncrementIcon\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"incrementButton\" dojoAttachEvent=\"onclick: increment\"><span class=\"dijitSliderButtonInner\">+</span></div\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><center><div class=\"dijitSliderBar dijitSliderBumper dijitVerticalSliderBumper dijitSliderTopBumper dijitVerticalSliderTopBumper\"></div></center\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td dojoAttachPoint=\"leftDecoration\" class=\"dijitReset\" style=\"text-align:center;height:100%;\"></td\n\t\t><td class=\"dijitReset\" style=\"height:100%;\"\n\t\t\t><input dojoAttachPoint=\"valueNode\" type=\"hidden\" name=\"${name}\"\n\t\t\t/><center style=\"position:relative;height:100%;\" dojoAttachPoint=\"sliderBarContainer\"\n\t\t\t\t><div dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitVerticalSliderBar dijitSliderRemainingBar dijitVerticalSliderRemainingBar\" dojoAttachEvent=\"onclick:_onBarClick\"></div\n\t\t\t\t><div dojoAttachPoint=\"progressBar\" class=\"dijitSliderBar dijitVerticalSliderBar dijitSliderProgressBar dijitVerticalSliderProgressBar\" dojoAttachEvent=\"onclick:_onBarClick\"\n\t\t\t\t\t><div dojoAttachPoint=\"sliderHandle,focusNode\" class=\"dijitSliderMoveable\" dojoAttachEvent=\"onkeypress:_onKeyPress,onclick:_onHandleClick\" style=\"vertical-align:top;\" waiRole=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"\n\t\t\t\t\t\t><div class=\"dijitSliderImageHandle dijitVerticalSliderImageHandle\"></div\n\t\t\t\t\t></div\n\t\t\t\t></div\n\t\t\t></center\n\t\t></td\n\t\t><td dojoAttachPoint=\"containerNode,rightDecoration\" class=\"dijitReset\" style=\"text-align:center;height:100%;\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><center><div class=\"dijitSliderBar dijitSliderBumper dijitVerticalSliderBumper dijitSliderBottomBumper dijitVerticalSliderBottomBumper\"></div></center\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitVerticalSliderButtonContainer\"\n\t\t\t><div class=\"dijitVerticalSliderDecrementIcon\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"decrementButton\" dojoAttachEvent=\"onclick: decrement\"><span class=\"dijitSliderButtonInner\">-</span></div\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n></tbody></table>\n",
- _mousePixelCoord: "pageY",
- _pixelCount: "h",
- _startingPixelCoord: "y",
- _startingPixelCount: "t",
- _handleOffsetCoord: "top",
- _progressPixelSize: "height",
- _upsideDown: true
-});
-
-dojo.declare("dijit.form._SliderMover",
- dojo.dnd.Mover,
-{
- onMouseMove: function(e){
- var widget = this.widget;
- var c = this.constraintBox;
- if(!c){
- var container = widget.sliderBarContainer;
- var s = dojo.getComputedStyle(container);
- var c = dojo._getContentBox(container, s);
- c[widget._startingPixelCount] = 0;
- this.constraintBox = c;
- }
- var m = this.marginBox;
- var pixelValue = widget._isReversed() ?
- e[widget._mousePixelCoord] - dojo._abs(widget.sliderBarContainer).x :
- m[widget._startingPixelCount] + e[widget._mousePixelCoord];
- dojo.hitch(widget, "_setPixelValue")(widget._isReversed() || widget._upsideDown? (c[widget._pixelCount]-pixelValue) : pixelValue, c[widget._pixelCount]);
- },
-
- destroy: function(e){
- var widget = this.widget;
- widget.setValue(widget.value, true);
- dojo.dnd.Mover.prototype.destroy.call(this);
- }
-});
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.declare("dijit.form.HorizontalRule", [dijit._Widget, dijit._Templated],
-{
- // Summary:
- // Create hash marks for the Horizontal slider
- templateString: '<div class="RuleContainer HorizontalRuleContainer"></div>',
-
- // count: Integer
- // Number of hash marks to generate
- count: 3,
-
- // container: Node
- // If this is a child widget, connect it to this parent node
- container: "containerNode",
-
- // ruleStyle: String
- // CSS style to apply to individual hash marks
- ruleStyle: "",
-
- _positionPrefix: '<div class="RuleMark HorizontalRuleMark" style="left:',
- _positionSuffix: '%;',
- _suffix: '"></div>',
-
- _genHTML: function(pos, ndx){
- return this._positionPrefix + pos + this._positionSuffix + this.ruleStyle + this._suffix;
- },
-
- _isHorizontal: true,
-
- postCreate: function(){
- if(this.count==1){
- var innerHTML = this._genHTML(50, 0);
- }else{
- var interval = 100 / (this.count-1);
- if(!this._isHorizontal || this.isLeftToRight()){
- var innerHTML = this._genHTML(0, 0);
- for(var i=1; i < this.count-1; i++){
- innerHTML += this._genHTML(interval*i, i);
- }
- innerHTML += this._genHTML(100, this.count-1);
- }else{
- var innerHTML = this._genHTML(100, 0);
- for(var i=1; i < this.count-1; i++){
- innerHTML += this._genHTML(100-interval*i, i);
- }
- innerHTML += this._genHTML(0, this.count-1);
- }
- }
- this.domNode.innerHTML = innerHTML;
- }
-});
-
-dojo.declare("dijit.form.VerticalRule", dijit.form.HorizontalRule,
-{
- // Summary:
- // Create hash marks for the Vertical slider
- templateString: '<div class="RuleContainer VerticalRuleContainer"></div>',
- _positionPrefix: '<div class="RuleMark VerticalRuleMark" style="top:',
-
- _isHorizontal: false
-});
-
-dojo.declare("dijit.form.HorizontalRuleLabels", dijit.form.HorizontalRule,
-{
- // Summary:
- // Create labels for the Horizontal slider
- templateString: '<div class="RuleContainer HorizontalRuleContainer"></div>',
-
- // labelStyle: String
- // CSS style to apply to individual text labels
- labelStyle: "",
-
- // labels: Array
- // Array of text labels to render - evenly spaced from left-to-right or bottom-to-top
- labels: [],
-
- // numericMargin: Integer
- // Number of generated numeric labels that should be rendered as '' on the ends when labels[] are not specified
- numericMargin: 0,
-
- // numericMinimum: Integer
- // Leftmost label value for generated numeric labels when labels[] are not specified
- minimum: 0,
-
- // numericMaximum: Integer
- // Rightmost label value for generated numeric labels when labels[] are not specified
- maximum: 1,
-
- // constraints: object
- // pattern, places, lang, et al (see dojo.number) for generated numeric labels when labels[] are not specified
- constraints: {pattern:"#%"},
-
- _positionPrefix: '<div class="RuleLabelContainer HorizontalRuleLabelContainer" style="left:',
- _labelPrefix: '"><span class="RuleLabel HorizontalRuleLabel">',
- _suffix: '</span></div>',
-
- _calcPosition: function(pos){
- return pos;
- },
-
- _genHTML: function(pos, ndx){
- return this._positionPrefix + this._calcPosition(pos) + this._positionSuffix + this.labelStyle + this._labelPrefix + this.labels[ndx] + this._suffix;
- },
-
- getLabels: function(){
- // summary: user replaceable function to return the labels array
-
- // if the labels array was not specified directly, then see if <li> children were
- var labels = this.labels;
- if(!labels.length){
- // for markup creation, labels are specified as child elements
- labels = dojo.query("> li", this.srcNodeRef).map(function(node){
- return String(node.innerHTML);
- });
- }
- this.srcNodeRef.innerHTML = '';
- // if the labels were not specified directly and not as <li> children, then calculate numeric labels
- if(!labels.length && this.count > 1){
- var start = this.minimum;
- var inc = (this.maximum - start) / (this.count-1);
- for (var i=0; i < this.count; i++){
- labels.push((i<this.numericMargin||i>=(this.count-this.numericMargin))? '' : dojo.number.format(start, this.constraints));
- start += inc;
- }
- }
- return labels;
- },
-
- postMixInProperties: function(){
- this.inherited('postMixInProperties', arguments);
- this.labels = this.getLabels();
- this.count = this.labels.length;
- }
-});
-
-dojo.declare("dijit.form.VerticalRuleLabels", dijit.form.HorizontalRuleLabels,
-{
- // Summary:
- // Create labels for the Vertical slider
- templateString: '<div class="RuleContainer VerticalRuleContainer"></div>',
-
- _positionPrefix: '<div class="RuleLabelContainer VerticalRuleLabelContainer" style="top:',
- _labelPrefix: '"><span class="RuleLabel VerticalRuleLabel">',
-
- _calcPosition: function(pos){
- return 100-pos;
- },
-
- _isHorizontal: false
-});
-
+if(!dojo._hasResource["dijit.form.Slider"]){
+dojo._hasResource["dijit.form.Slider"]=true;
+dojo.provide("dijit.form.Slider");
+dojo.deprecated("Call require() for HorizontalSlider / VerticalRule, explicitly rather than 'dijit.form.Slider' itself","","2.0");
+dojo.require("dijit.form.HorizontalSlider");
+dojo.require("dijit.form.VerticalSlider");
+dojo.require("dijit.form.HorizontalRule");
+dojo.require("dijit.form.VerticalRule");
+dojo.require("dijit.form.HorizontalRuleLabels");
+dojo.require("dijit.form.VerticalRuleLabels");
}
diff --git a/js/dojo/dijit/form/TextBox.js b/js/dojo/dijit/form/TextBox.js
--- a/js/dojo/dijit/form/TextBox.js
+++ b/js/dojo/dijit/form/TextBox.js
@@ -1,139 +1,173 @@
-if(!dojo._hasResource["dijit.form.TextBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.form.TextBox"] = true;
-dojo.provide("dijit.form.TextBox");
-
-dojo.require("dijit.form._FormWidget");
-
-dojo.declare(
- "dijit.form.TextBox",
- dijit.form._FormWidget,
- {
- // summary:
- // A generic textbox field.
- // Serves as a base class to derive more specialized functionality in subclasses.
-
- // trim: Boolean
- // Removes leading and trailing whitespace if true. Default is false.
- trim: false,
-
- // uppercase: Boolean
- // Converts all characters to uppercase if true. Default is false.
- uppercase: false,
-
- // lowercase: Boolean
- // Converts all characters to lowercase if true. Default is false.
- lowercase: false,
-
- // propercase: Boolean
- // Converts the first character of each word to uppercase if true.
- propercase: false,
-
- // maxLength: String
- // HTML INPUT tag maxLength declaration.
- maxLength: "",
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- templateString:"<input class=\"dojoTextBox\" dojoAttachPoint='textbox,focusNode' name=\"${name}\"\n\tdojoAttachEvent='onmouseenter:_onMouse,onmouseleave:_onMouse,onfocus:_onMouse,onblur:_onMouse,onkeyup,onkeypress:_onKeyPress'\n\tautocomplete=\"off\" type=\"${type}\"\n\t/>\n",
- baseClass: "dijitTextBox",
-
- attributeMap: dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),
- {maxLength:"focusNode"}),
-
- getDisplayedValue: function(){
- return this.filter(this.textbox.value);
- },
-
- getValue: function(){
- return this.parse(this.getDisplayedValue(), this.constraints);
- },
-
- setValue: function(value, /*Boolean, optional*/ priorityChange, /*String, optional*/ formattedValue){
- var filteredValue = this.filter(value);
- if((typeof filteredValue == typeof value) && (formattedValue == null || formattedValue == undefined)){
- formattedValue = this.format(filteredValue, this.constraints);
- }
- if(formattedValue != null && formattedValue != undefined){
- this.textbox.value = formattedValue;
- }
- dijit.form.TextBox.superclass.setValue.call(this, filteredValue, priorityChange);
- },
-
- setDisplayedValue: function(/*String*/value){
- this.textbox.value = value;
- this.setValue(this.getValue(), true);
- },
-
- forWaiValuenow: function(){
- return this.getDisplayedValue();
- },
- format: function(/* String */ value, /* Object */ constraints){
- // summary: Replacable function to convert a value to a properly formatted string
- return ((value == null || value == undefined) ? "" : (value.toString ? value.toString() : value));
- },
-
- parse: function(/* String */ value, /* Object */ constraints){
- // summary: Replacable function to convert a formatted string to a value
- return value;
- },
-
- postCreate: function(){
- // setting the value here is needed since value="" in the template causes "undefined"
- // and setting in the DOM (instead of the JS object) helps with form reset actions
- this.textbox.setAttribute("value", this.getDisplayedValue());
- this.inherited('postCreate', arguments);
-
- if(this.srcNodeRef){
- dojo.style(this.textbox, "cssText", this.style);
- this.textbox.className += " " + this["class"];
- }
- this._layoutHack();
- },
-
- _layoutHack: function(){
- // summary: work around table sizing bugs on FF2 by forcing redraw
- if(dojo.isFF == 2 && this.domNode.tagName=="TABLE"){
- var node=this.domNode;
- var old = node.style.opacity;
- node.style.opacity = "0.999";
- setTimeout(function(){
- node.style.opacity = old;
- }, 0);
- }
- },
-
- filter: function(val){
- // summary: Apply various filters to textbox value
- if(val == undefined || val == null){ return ""; }
- else if(typeof val != "string"){ return val; }
- if(this.trim){
- val = dojo.trim(val);
- }
- if(this.uppercase){
- val = val.toUpperCase();
- }
- if(this.lowercase){
- val = val.toLowerCase();
- }
- if(this.propercase){
- val = val.replace(/[^\s]+/g, function(word){
- return word.substring(0,1).toUpperCase() + word.substring(1);
- });
- }
- return val;
- },
-
- // event handlers, you can over-ride these in your own subclasses
- _onBlur: function(){
- this.setValue(this.getValue(), (this.isValid ? this.isValid() : true));
- },
-
- onkeyup: function(){
- // TODO: it would be nice to massage the value (ie: automatic uppercase, etc) as the user types
- // but this messes up the cursor position if you are typing into the middle of a word, and
- // also trimming doesn't work correctly (it prevents spaces between words too!)
- // this.setValue(this.getValue());
- }
- }
-);
-
+if(!dojo._hasResource["dijit.form.TextBox"]){
+dojo._hasResource["dijit.form.TextBox"]=true;
+dojo.provide("dijit.form.TextBox");
+dojo.require("dijit.form._FormWidget");
+dojo.declare("dijit.form.TextBox",dijit.form._FormValueWidget,{trim:false,uppercase:false,lowercase:false,propercase:false,maxLength:"",selectOnClick:false,templateString:dojo.cache("dijit.form","templates/TextBox.html","<input class=\"dijit dijitReset dijitLeft\" dojoAttachPoint='textbox,focusNode'\n\tdojoAttachEvent='onmouseenter:_onMouse,onmouseleave:_onMouse'\n\tautocomplete=\"off\" type=\"${type}\" ${nameAttrSetting}\n\t/>\n"),baseClass:"dijitTextBox",attributeMap:dojo.delegate(dijit.form._FormValueWidget.prototype.attributeMap,{maxLength:"focusNode"}),_getValueAttr:function(){
+return this.parse(this.attr("displayedValue"),this.constraints);
+},_setValueAttr:function(_1,_2,_3){
+var _4;
+if(_1!==undefined){
+_4=this.filter(_1);
+if(typeof _3!="string"){
+if(_4!==null&&((typeof _4!="number")||!isNaN(_4))){
+_3=this.filter(this.format(_4,this.constraints));
+}else{
+_3="";
+}
+}
+}
+if(_3!=null&&_3!=undefined&&((typeof _3)!="number"||!isNaN(_3))&&this.textbox.value!=_3){
+this.textbox.value=_3;
+}
+this.inherited(arguments,[_4,_2]);
+},displayedValue:"",getDisplayedValue:function(){
+dojo.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use attr('displayedValue') instead.","","2.0");
+return this.attr("displayedValue");
+},_getDisplayedValueAttr:function(){
+return this.filter(this.textbox.value);
+},setDisplayedValue:function(_5){
+dojo.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use attr('displayedValue', ...) instead.","","2.0");
+this.attr("displayedValue",_5);
+},_setDisplayedValueAttr:function(_6){
+if(_6===null||_6===undefined){
+_6="";
+}else{
+if(typeof _6!="string"){
+_6=String(_6);
+}
+}
+this.textbox.value=_6;
+this._setValueAttr(this.attr("value"),undefined,_6);
+},format:function(_7,_8){
+return ((_7==null||_7==undefined)?"":(_7.toString?_7.toString():_7));
+},parse:function(_9,_a){
+return _9;
+},_refreshState:function(){
+},_onInput:function(e){
+if(e&&e.type&&/key/i.test(e.type)&&e.keyCode){
+switch(e.keyCode){
+case dojo.keys.SHIFT:
+case dojo.keys.ALT:
+case dojo.keys.CTRL:
+case dojo.keys.TAB:
+return;
+}
+}
+if(this.intermediateChanges){
+var _b=this;
+setTimeout(function(){
+_b._handleOnChange(_b.attr("value"),false);
+},0);
+}
+this._refreshState();
+},postCreate:function(){
+this.textbox.setAttribute("value",this.textbox.value);
+this.inherited(arguments);
+if(dojo.isMoz||dojo.isOpera){
+this.connect(this.textbox,"oninput",this._onInput);
+}else{
+this.connect(this.textbox,"onkeydown",this._onInput);
+this.connect(this.textbox,"onkeyup",this._onInput);
+this.connect(this.textbox,"onpaste",this._onInput);
+this.connect(this.textbox,"oncut",this._onInput);
+}
+},_blankValue:"",filter:function(_c){
+if(_c===null){
+return this._blankValue;
+}
+if(typeof _c!="string"){
+return _c;
+}
+if(this.trim){
+_c=dojo.trim(_c);
}
+if(this.uppercase){
+_c=_c.toUpperCase();
+}
+if(this.lowercase){
+_c=_c.toLowerCase();
+}
+if(this.propercase){
+_c=_c.replace(/[^\s]+/g,function(_d){
+return _d.substring(0,1).toUpperCase()+_d.substring(1);
+});
+}
+return _c;
+},_setBlurValue:function(){
+this._setValueAttr(this.attr("value"),true);
+},_onBlur:function(e){
+if(this.disabled){
+return;
+}
+this._setBlurValue();
+this.inherited(arguments);
+if(this._selectOnClickHandle){
+this.disconnect(this._selectOnClickHandle);
+}
+if(this.selectOnClick&&dojo.isMoz){
+this.textbox.selectionStart=this.textbox.selectionEnd=undefined;
+}
+},_onFocus:function(by){
+if(this.disabled||this.readOnly){
+return;
+}
+if(this.selectOnClick&&by=="mouse"){
+this._selectOnClickHandle=this.connect(this.domNode,"onmouseup",function(){
+this.disconnect(this._selectOnClickHandle);
+var _e;
+if(dojo.isIE){
+var _f=dojo.doc.selection.createRange();
+var _10=_f.parentElement();
+_e=_10==this.textbox&&_f.text.length==0;
+}else{
+_e=this.textbox.selectionStart==this.textbox.selectionEnd;
+}
+if(_e){
+dijit.selectInputText(this.textbox);
+}
+});
+}
+this._refreshState();
+this.inherited(arguments);
+},reset:function(){
+this.textbox.value="";
+this.inherited(arguments);
+}});
+dijit.selectInputText=function(_11,_12,_13){
+var _14=dojo.global;
+var _15=dojo.doc;
+_11=dojo.byId(_11);
+if(isNaN(_12)){
+_12=0;
+}
+if(isNaN(_13)){
+_13=_11.value?_11.value.length:0;
+}
+dijit.focus(_11);
+if(_15["selection"]&&dojo.body()["createTextRange"]){
+if(_11.createTextRange){
+var _16=_11.createTextRange();
+with(_16){
+collapse(true);
+moveStart("character",-99999);
+moveStart("character",_12);
+moveEnd("character",_13-_12);
+select();
+}
+}
+}else{
+if(_14["getSelection"]){
+if(_11.setSelectionRange){
+_11.setSelectionRange(_12,_13);
+}
+}
+}
+};
+}
diff --git a/js/dojo/dijit/form/Textarea.js b/js/dojo/dijit/form/Textarea.js
--- a/js/dojo/dijit/form/Textarea.js
+++ b/js/dojo/dijit/form/Textarea.js
@@ -1,238 +1,98 @@
-if(!dojo._hasResource["dijit.form.Textarea"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.form.Textarea"] = true;
-dojo.provide("dijit.form.Textarea");
-
-dojo.require("dijit.form._FormWidget");
-dojo.require("dojo.i18n");
-dojo.requireLocalization("dijit", "Textarea", null, "ROOT");
-
-dojo.declare(
- "dijit.form.Textarea",
- dijit.form._FormWidget,
-{
- // summary
- // A textarea that resizes vertically to contain the data.
- // Takes nearly all the parameters (name, value, etc.) that a vanilla textarea takes.
- // Cols is not supported and the width should be specified with style width.
- // Rows is not supported since this widget adjusts the height.
- // usage:
- // <textarea dojoType="dijit.form.TextArea">...</textarea>
-
- attributeMap: dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),
- {style:"styleNode", 'class':"styleNode"}),
-
- templateString: (dojo.isIE || dojo.isSafari || dojo.isMozilla) ?
- ((dojo.isIE || dojo.isSafari) ? '<fieldset id="${id}" class="dijitInline dijitInputField dijitTextArea" dojoAttachPoint="styleNode" waiRole="presentation"><div dojoAttachPoint="editNode,focusNode,eventNode" dojoAttachEvent="onpaste:_changing,oncut:_changing" waiRole="textarea" style="text-decoration:none;_padding-bottom:16px;display:block;overflow:auto;" contentEditable="true"></div>'
- : '<span id="${id}" class="dijitReset">'+
- '<iframe src="javascript:<html><head><title>${_iframeEditTitle}</title></head><body><script>var _postCreate=window.frameElement?window.frameElement.postCreate:null;if(_postCreate)_postCreate();</script></body></html>"'+
- ' dojoAttachPoint="iframe,styleNode" dojoAttachEvent="onblur:_onIframeBlur" class="dijitInline dijitInputField dijitTextArea"></iframe>')
- + '<textarea name="${name}" value="${value}" dojoAttachPoint="formValueNode" style="display:none;"></textarea>'
- + ((dojo.isIE || dojo.isSafari) ? '</fieldset>':'</span>')
- : '<textarea id="${id}" name="${name}" value="${value}" dojoAttachPoint="formValueNode,editNode,focusNode,styleNode" class="dijitInputField dijitTextArea"></textarea>',
-
- focus: function(){
- // summary: Received focus, needed for the InlineEditBox widget
- if(!this.disabled){
- this._changing(); // set initial height
- }
- if(dojo.isMozilla){
- dijit.focus(this.iframe);
- }else{
- dijit.focus(this.focusNode);
- }
- },
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- setValue: function(/*String*/ value, /*Boolean, optional*/ priorityChange){
- var editNode = this.editNode;
- if(typeof value == "string"){
- editNode.innerHTML = ""; // wipe out old nodes
- if(value.split){
- var _this=this;
- var isFirst = true;
- dojo.forEach(value.split("\n"), function(line){
- if(isFirst){ isFirst = false; }
- else {
- editNode.appendChild(document.createElement("BR")); // preserve line breaks
- }
- editNode.appendChild(document.createTextNode(line)); // use text nodes so that imbedded tags can be edited
- });
- }else{
- editNode.appendChild(document.createTextNode(value));
- }
- }else{
- // blah<BR>blah --> blah\nblah
- // <P>blah</P><P>blah</P> --> blah\nblah
- // <DIV>blah</DIV><DIV>blah</DIV> --> blah\nblah
- // &amp;&lt;&gt; -->&< >
- value = editNode.innerHTML;
- if(this.iframe){ // strip sizeNode
- value = value.replace(/<div><\/div>\r?\n?$/i,"");
- }
- value = value.replace(/\s*\r?\n|^\s+|\s+$|&nbsp;/g,"").replace(/>\s+</g,"><").replace(/<\/(p|div)>$|^<(p|div)[^>]*>/gi,"").replace(/([^>])<div>/g,"$1\n").replace(/<\/p>\s*<p[^>]*>|<br[^>]*>/gi,"\n").replace(/<[^>]*>/g,"").replace(/&amp;/gi,"\&").replace(/&lt;/gi,"<").replace(/&gt;/gi,">");
- }
- this.value = this.formValueNode.value = value;
- if(this.iframe){
- var sizeNode = document.createElement('div');
- editNode.appendChild(sizeNode);
- var newHeight = sizeNode.offsetTop;
- if(editNode.scrollWidth > editNode.clientWidth){ newHeight+=16; } // scrollbar space needed?
- if(this.lastHeight != newHeight){ // cache size so that we don't get a resize event because of a resize event
- if(newHeight == 0){ newHeight = 16; } // height = 0 causes the browser to not set scrollHeight
- dojo.contentBox(this.iframe, {h: newHeight});
- this.lastHeight = newHeight;
- }
- editNode.removeChild(sizeNode);
- }
- dijit.form.Textarea.superclass.setValue.call(this, this.getValue(), priorityChange);
- },
-
- getValue: function(){
- return this.formValueNode.value.replace(/\r/g,"");
- },
- postMixInProperties: function(){
- dijit.form.Textarea.superclass.postMixInProperties.apply(this,arguments);
- // don't let the source text be converted to a DOM structure since we just want raw text
- if(this.srcNodeRef && this.srcNodeRef.innerHTML != ""){
- this.value = this.srcNodeRef.innerHTML;
- this.srcNodeRef.innerHTML = "";
- }
- if((!this.value || this.value == "") && this.srcNodeRef && this.srcNodeRef.value){
- this.value = this.srcNodeRef.value;
- }
- if(!this.value){ this.value = ""; }
- this.value = this.value.replace(/\r\n/g,"\n").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&");
- if(dojo.isMozilla){
- // In the case of Firefox an iframe is used and when the text gets focus,
- // focus is fired from the document object. There isn't a way to put a
- // waiRole on the document object and as a result screen readers don't
- // announce the role. As a result screen reader users are lost.
- //
- // An additional problem is that the browser gives the document object a
- // very cryptic accessible name, e.g.
- // wysiwyg://13/http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/form/test_InlineEditBox.html
- // When focus is fired from the document object, the screen reader speaks
- // the accessible name. The cyptic accessile name is confusing.
- //
- // A workaround for both of these problems is to give the iframe's
- // document a title, the name of which is similar to a role name, i.e.
- // "edit area". This will be used as the accessible name which will replace
- // the cryptic name and will also convey the role information to the user.
- // Because it is read directly to the user, the string must be localized.
- // In addition, since a <label> element can not be associated with an iframe, if
- // this control has a label, insert the text into the title as well.
- var _nlsResources = dojo.i18n.getLocalization("dijit", "Textarea");
- this._iframeEditTitle = _nlsResources.iframeEditTitle;
- this._iframeFocusTitle = _nlsResources.iframeFocusTitle;
- var label=dojo.query('label[for="'+this.id+'"]');
- if(label.length){
- this._iframeEditTitle = label[0].innerHTML + " " + this._iframeEditTitle;
- }
- var body = this.focusNode = this.editNode = document.createElement('BODY');
- body.style.margin="0px";
- body.style.padding="0px";
- body.style.border="0px";
- }
- },
-
- postCreate: function(){
- if(dojo.isIE || dojo.isSafari){
- this.domNode.style.overflowY = 'hidden';
- }else if(dojo.isMozilla){
- var w = this.iframe.contentWindow;
- try { // #4715: peeking at the title can throw a security exception during iframe setup
- var title = this.iframe.contentDocument.title;
- } catch(e) { var title = ''; }
- if(!w || !title){
- this.iframe.postCreate = dojo.hitch(this, this.postCreate);
- return;
- }
- var d = w.document;
- d.getElementsByTagName('HTML')[0].replaceChild(this.editNode, d.getElementsByTagName('BODY')[0]);
- if(!this.isLeftToRight()){
- d.getElementsByTagName('HTML')[0].dir = "rtl";
- }
- this.iframe.style.overflowY = 'hidden';
- this.eventNode = d;
- // this.connect won't destroy this handler cleanly since its on the iframe's window object
- // resize is a method of window, not document
- w.addEventListener("resize", dojo.hitch(this, this._changed), false); // resize is only on the window object
- }else{
- this.focusNode = this.domNode;
- }
- if(this.eventNode){
- this.connect(this.eventNode, "keypress", this._onKeyPress);
- this.connect(this.eventNode, "mousemove", this._changed);
- this.connect(this.eventNode, "focus", this._focused);
- this.connect(this.eventNode, "blur", this._blurred);
- }
- if(this.editNode){
- this.connect(this.editNode, "change", this._changed); // needed for mouse paste events per #3479
- }
- this.inherited('postCreate', arguments);
- },
-
- // event handlers, you can over-ride these in your own subclasses
- _focused: function(e){
- dojo.addClass(this.iframe||this.domNode, "dijitInputFieldFocused");
- this._changed(e);
- },
-
- _blurred: function(e){
- dojo.removeClass(this.iframe||this.domNode, "dijitInputFieldFocused");
- this._changed(e, true);
- },
-
- _onIframeBlur: function(){
- // Reset the title back to "edit area".
- this.iframe.contentDocument.title = this._iframeEditTitle;
- },
-
- _onKeyPress: function(e){
- if(e.keyCode == dojo.keys.TAB && !e.shiftKey && !e.ctrlKey && !e.altKey && this.iframe){
- // Pressing the tab key in the iframe (with designMode on) will cause the
- // entry of a tab character so we have to trap that here. Since we don't
- // know the next focusable object we put focus on the iframe and then the
- // user has to press tab again (which then does the expected thing).
- // A problem with that is that the screen reader user hears "edit area"
- // announced twice which causes confusion. By setting the
- // contentDocument's title to "edit area frame" the confusion should be
- // eliminated.
- this.iframe.contentDocument.title = this._iframeFocusTitle;
- // Place focus on the iframe. A subsequent tab or shift tab will put focus
- // on the correct control.
- // Note: Can't use this.focus() because that results in a call to
- // dijit.focus and if that receives an iframe target it will set focus
- // on the iframe's contentWindow.
- this.iframe.focus(); // this.focus(); won't work
- dojo.stopEvent(e);
- }else if(e.keyCode == dojo.keys.ENTER){
- e.stopPropagation();
- }else if(this.inherited("_onKeyPress", arguments) && this.iframe){
- // #3752:
- // The key press will not make it past the iframe.
- // If a widget is listening outside of the iframe, (like InlineEditBox)
- // it will not hear anything.
- // Create an equivalent event so everyone else knows what is going on.
- var te = document.createEvent("KeyEvents");
- te.initKeyEvent("keypress", true, true, null, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.keyCode, e.charCode);
- this.iframe.dispatchEvent(te);
- }
- this._changing();
- },
-
- _changing: function(e){
- // summary: event handler for when a change is imminent
- setTimeout(dojo.hitch(this, "_changed", e, false), 1);
- },
-
- _changed: function(e, priorityChange){
- // summary: event handler for when a change has already happened
- if(this.iframe && this.iframe.contentDocument.designMode != "on"){
- this.iframe.contentDocument.designMode="on"; // in case this failed on init due to being hidden
- }
- this.setValue(null, priorityChange);
- }
-});
-
+if(!dojo._hasResource["dijit.form.Textarea"]){
+dojo._hasResource["dijit.form.Textarea"]=true;
+dojo.provide("dijit.form.Textarea");
+dojo.require("dijit.form.SimpleTextarea");
+dojo.declare("dijit.form.Textarea",dijit.form.SimpleTextarea,{cols:"",_previousNewlines:0,_strictMode:(dojo.doc.compatMode!="BackCompat"),_getHeight:function(_1){
+var _2=_1.scrollHeight;
+if(dojo.isIE){
+_2+=_1.offsetHeight-_1.clientHeight-((dojo.isIE<8&&this._strictMode)?dojo._getPadBorderExtents(_1).h:0);
+}else{
+if(dojo.isMoz){
+_2+=_1.offsetHeight-_1.clientHeight;
+}else{
+if(dojo.isWebKit&&!(dojo.isSafari<4)){
+_2+=dojo._getBorderExtents(_1).h;
+}else{
+_2+=dojo._getPadBorderExtents(_1).h;
+}
+}
+}
+return _2;
+},_estimateHeight:function(_3){
+_3.style.maxHeight="";
+_3.style.height="auto";
+_3.rows=(_3.value.match(/\n/g)||[]).length+1;
+},_needsHelpShrinking:dojo.isMoz||dojo.isWebKit,_onInput:function(){
+this.inherited(arguments);
+if(this._busyResizing){
+return;
+}
+this._busyResizing=true;
+var _4=this.textbox;
+if(_4.scrollHeight&&_4.offsetHeight&&_4.clientHeight){
+var _5=this._getHeight(_4)+"px";
+if(_4.style.height!=_5){
+_4.style.maxHeight=_4.style.height=_5;
+}
+if(this._needsHelpShrinking){
+if(this._setTimeoutHandle){
+clearTimeout(this._setTimeoutHandle);
+}
+this._setTimeoutHandle=setTimeout(dojo.hitch(this,"_shrink"),0);
+}
+}else{
+this._estimateHeight(_4);
}
+this._busyResizing=false;
+},_busyResizing:false,_shrink:function(){
+this._setTimeoutHandle=null;
+if(this._needsHelpShrinking&&!this._busyResizing){
+this._busyResizing=true;
+var _6=this.textbox;
+var _7=false;
+if(_6.value==""){
+_6.value=" ";
+_7=true;
+}
+var _8=_6.scrollHeight;
+if(!_8){
+this._estimateHeight(_6);
+}else{
+var _9=_6.style.paddingBottom;
+var _a=dojo._getPadExtents(_6);
+_a=_a.h-_a.t;
+_6.style.paddingBottom=_a+1+"px";
+var _b=this._getHeight(_6)-1+"px";
+if(_6.style.maxHeight!=_b){
+_6.style.paddingBottom=_a+_8+"px";
+_6.scrollTop=0;
+_6.style.maxHeight=this._getHeight(_6)-_8+"px";
+}
+_6.style.paddingBottom=_9;
+}
+if(_7){
+_6.value="";
+}
+this._busyResizing=false;
+}
+},resize:function(){
+this._onInput();
+},_setValueAttr:function(){
+this.inherited(arguments);
+this.resize();
+},postCreate:function(){
+this.inherited(arguments);
+dojo.style(this.textbox,{overflowY:"hidden",overflowX:"auto",boxSizing:"border-box",MsBoxSizing:"border-box",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box"});
+this.connect(this.textbox,"onscroll",this._onInput);
+this.connect(this.textbox,"onresize",this._onInput);
+this.connect(this.textbox,"onfocus",this._onInput);
+setTimeout(dojo.hitch(this,"resize"),0);
+}});
+}
diff --git a/js/dojo/dijit/form/TimeTextBox.js b/js/dojo/dijit/form/TimeTextBox.js
--- a/js/dojo/dijit/form/TimeTextBox.js
+++ b/js/dojo/dijit/form/TimeTextBox.js
@@ -1,125 +1,14 @@
-if(!dojo._hasResource["dijit.form.TimeTextBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.form.TimeTextBox"] = true;
-dojo.provide("dijit.form.TimeTextBox");
-
-dojo.require("dojo.date");
-dojo.require("dojo.date.locale");
-dojo.require("dojo.date.stamp");
-dojo.require("dijit._TimePicker");
-dojo.require("dijit.form.ValidationTextBox");
-
-dojo.declare(
- "dijit.form.TimeTextBox",
- dijit.form.RangeBoundTextBox,
- {
- // summary:
- // A validating, serializable, range-bound date text box.
-
- // constraints object: min, max
- regExpGen: dojo.date.locale.regexp,
- compare: dojo.date.compare,
- format: function(/*Date*/ value, /*Object*/ constraints){
- if(!value || value.toString() == this._invalid){ return null; }
- return dojo.date.locale.format(value, constraints);
- },
- parse: dojo.date.locale.parse,
- serialize: dojo.date.stamp.toISOString,
-
- value: new Date(""), // NaN
- _invalid: (new Date("")).toString(), // NaN
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- _popupClass: "dijit._TimePicker",
-
- postMixInProperties: function(){
- //dijit.form.RangeBoundTextBox.prototype.postMixInProperties.apply(this, arguments);
- this.inherited("postMixInProperties",arguments);
- var constraints = this.constraints;
- constraints.selector = 'time';
- if(typeof constraints.min == "string"){ constraints.min = dojo.date.stamp.fromISOString(constraints.min); }
- if(typeof constraints.max == "string"){ constraints.max = dojo.date.stamp.fromISOString(constraints.max); }
- },
-
- _onFocus: function(/*Event*/ evt){
- // summary: open the TimePicker popup
- this._open();
- },
-
- setValue: function(/*Date*/ value, /*Boolean, optional*/ priorityChange){
- // summary:
- // Sets the date on this textbox
- this.inherited('setValue', arguments);
- if(this._picker){
- // #3948: fix blank date on popup only
- if(!value || value.toString() == this._invalid){value=new Date();}
- this._picker.setValue(value);
- }
- },
-
- _open: function(){
- // summary:
- // opens the TimePicker, and sets the onValueSelected value
-
- if(this.disabled){return;}
- var self = this;
-
- if(!this._picker){
- var popupProto=dojo.getObject(this._popupClass, false);
- this._picker = new popupProto({
- onValueSelected: function(value){
-
- self.focus(); // focus the textbox before the popup closes to avoid reopening the popup
- setTimeout(dojo.hitch(self, "_close"), 1); // allow focus time to take
-
- // this will cause InlineEditBox and other handlers to do stuff so make sure it's last
- dijit.form.TimeTextBox.superclass.setValue.call(self, value, true);
- },
- lang: this.lang,
- constraints:this.constraints,
- isDisabledDate: function(/*Date*/ date){
- // summary:
- // disables dates outside of the min/max of the TimeTextBox
- return self.constraints && (dojo.date.compare(self.constraints.min,date) > 0 || dojo.date.compare(self.constraints.max,date) < 0);
- }
- });
- this._picker.setValue(this.getValue() || new Date());
- }
- if(!this._opened){
- dijit.popup.open({
- parent: this,
- popup: this._picker,
- around: this.domNode,
- onCancel: dojo.hitch(this, this._close),
- onClose: function(){ self._opened=false; }
- });
- this._opened=true;
- }
-
- dojo.marginBox(this._picker.domNode,{ w:this.domNode.offsetWidth });
- },
-
- _close: function(){
- if(this._opened){
- dijit.popup.close(this._picker);
- this._opened=false;
- }
- },
-
- _onBlur: function(){
- // summary: called magically when focus has shifted away from this widget and it's dropdown
- this._close();
- this.inherited('_onBlur', arguments);
- // don't focus on <input>. the user has explicitly focused on something else.
- },
-
- getDisplayedValue:function(){
- return this.textbox.value;
- },
-
- setDisplayedValue:function(/*String*/ value){
- this.textbox.value=value;
- }
- }
-);
-
+if(!dojo._hasResource["dijit.form.TimeTextBox"]){
+dojo._hasResource["dijit.form.TimeTextBox"]=true;
+dojo.provide("dijit.form.TimeTextBox");
+dojo.require("dijit._TimePicker");
+dojo.require("dijit.form._DateTimeTextBox");
+dojo.declare("dijit.form.TimeTextBox",dijit.form._DateTimeTextBox,{baseClass:"dijitTextBox dijitTimeTextBox",popupClass:"dijit._TimePicker",_selector:"time",value:new Date("")});
}
diff --git a/js/dojo/dijit/form/ValidationTextBox.js b/js/dojo/dijit/form/ValidationTextBox.js
--- a/js/dojo/dijit/form/ValidationTextBox.js
+++ b/js/dojo/dijit/form/ValidationTextBox.js
@@ -1,268 +1,203 @@
-if(!dojo._hasResource["dijit.form.ValidationTextBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.form.ValidationTextBox"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit.form.ValidationTextBox"]){
+dojo._hasResource["dijit.form.ValidationTextBox"]=true;
dojo.provide("dijit.form.ValidationTextBox");
-
dojo.require("dojo.i18n");
-
dojo.require("dijit.form.TextBox");
dojo.require("dijit.Tooltip");
-
-dojo.requireLocalization("dijit.form", "validate", null, "ko,zh-cn,zh,ja,zh-tw,ru,it,hu,ROOT,fr,pt,pl,es,de,cs");
-
-dojo.declare(
- "dijit.form.ValidationTextBox",
- dijit.form.TextBox,
- {
- // summary:
- // A subclass of TextBox.
- // Over-ride isValid in subclasses to perform specific kinds of validation.
-
- templateString:"<table style=\"display: -moz-inline-stack;\" class=\"dijit dijitReset dijitInlineTable\" cellspacing=\"0\" cellpadding=\"0\"\n\tid=\"widget_${id}\" name=\"${name}\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse\" waiRole=\"presentation\"\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset dijitInputField\" width=\"100%\"\n\t\t\t><input dojoAttachPoint='textbox,focusNode' dojoAttachEvent='onfocus,onblur:_onMouse,onkeyup,onkeypress:_onKeyPress' autocomplete=\"off\"\n\t\t\ttype='${type}' name='${name}'\n\t\t/></td\n\t\t><td class=\"dijitReset dijitValidationIconField\" width=\"0%\"\n\t\t\t><div dojoAttachPoint='iconNode' class='dijitValidationIcon'></div><div class='dijitValidationIconText'>&Chi;</div\n\t\t></td\n\t></tr\n></table>\n",
- baseClass: "dijitTextBox",
-
- // default values for new subclass properties
- // required: Boolean
- // Can be true or false, default is false.
- required: false,
- // promptMessage: String
- // Hint string
- promptMessage: "",
- // invalidMessage: String
- // The message to display if value is invalid.
- invalidMessage: "$_unset_$", // read from the message file if not overridden
- // constraints: Object
- // user-defined object needed to pass parameters to the validator functions
- constraints: {},
- // regExp: String
- // regular expression string used to validate the input
- // Do not specify both regExp and regExpGen
- regExp: ".*",
- // regExpGen: Function
- // user replaceable function used to generate regExp when dependent on constraints
- // Do not specify both regExp and regExpGen
- regExpGen: function(constraints){ return this.regExp; },
-
- // state: String
- // Shows current state (ie, validation result) of input (Normal, Warning, or Error)
- state: "",
-
- setValue: function(){
- this.inherited('setValue', arguments);
- this.validate(false);
- },
-
- validator: function(value,constraints){
- // summary: user replaceable function used to validate the text input against the regular expression.
- return (new RegExp("^(" + this.regExpGen(constraints) + ")"+(this.required?"":"?")+"$")).test(value) &&
- (!this.required || !this._isEmpty(value)) &&
- (this._isEmpty(value) || this.parse(value, constraints) !== null);
- },
-
- isValid: function(/* Boolean*/ isFocused){
- // summary: Need to over-ride with your own validation code in subclasses
- return this.validator(this.textbox.value, this.constraints);
- },
-
- _isEmpty: function(value){
- // summary: Checks for whitespace
- return /^\s*$/.test(value); // Boolean
- },
-
- getErrorMessage: function(/* Boolean*/ isFocused){
- // summary: return an error message to show if appropriate
- return this.invalidMessage;
- },
-
- getPromptMessage: function(/* Boolean*/ isFocused){
- // summary: return a hint to show if appropriate
- return this.promptMessage;
- },
-
- validate: function(/* Boolean*/ isFocused){
- // summary:
- // Called by oninit, onblur, and onkeypress.
- // description:
- // Show missing or invalid messages if appropriate, and highlight textbox field.
- var message = "";
- var isValid = this.isValid(isFocused);
- var isEmpty = this._isEmpty(this.textbox.value);
- this.state = (isValid || (!this._hasBeenBlurred && isEmpty)) ? "" : "Error";
- this._setStateClass();
- dijit.setWaiState(this.focusNode, "invalid", (isValid? "false" : "true"));
- if(isFocused){
- if(isEmpty){
- message = this.getPromptMessage(true);
- }
- if(!message && !isValid){
- message = this.getErrorMessage(true);
- }
- }
- this._displayMessage(message);
- },
-
- // currently displayed message
- _message: "",
-
- _displayMessage: function(/*String*/ message){
- if(this._message == message){ return; }
- this._message = message;
- this.displayMessage(message);
- },
-
- displayMessage: function(/*String*/ message){
- // summary:
- // User overridable method to display validation errors/hints.
- // By default uses a tooltip.
- if(message){
- dijit.showTooltip(message, this.domNode);
- }else{
- dijit.hideTooltip(this.domNode);
- }
- },
-
- _hasBeenBlurred: false,
-
- _onBlur: function(evt){
- this._hasBeenBlurred = true;
- this.validate(false);
- this.inherited('_onBlur', arguments);
- },
-
- onfocus: function(evt){
- // TODO: change to _onFocus?
- this.validate(true);
- this._onMouse(evt); // update CSS classes
- },
-
- onkeyup: function(evt){
- this.onfocus(evt);
- },
-
- //////////// INITIALIZATION METHODS ///////////////////////////////////////
- constructor: function(){
- this.constraints = {};
- },
-
- postMixInProperties: function(){
- this.inherited('postMixInProperties', arguments);
- this.constraints.locale=this.lang;
- this.messages = dojo.i18n.getLocalization("dijit.form", "validate", this.lang);
- if(this.invalidMessage == "$_unset_$"){ this.invalidMessage = this.messages.invalidMessage; }
- var p = this.regExpGen(this.constraints);
- this.regExp = p;
- // make value a string for all types so that form reset works well
- }
- }
-);
-
-dojo.declare(
- "dijit.form.MappedTextBox",
- dijit.form.ValidationTextBox,
- {
- // summary:
- // A subclass of ValidationTextBox.
- // Provides a hidden input field and a serialize method to override
-
- serialize: function(val, /*Object?*/options){
- // summary: user replaceable function used to convert the getValue() result to a String
- return (val.toString ? val.toString() : "");
- },
-
- toString: function(){
- // summary: display the widget as a printable string using the widget's value
- var val = this.filter(this.getValue());
- return (val!=null) ? ((typeof val == "string") ? val : this.serialize(val, this.constraints)) : "";
- },
-
- validate: function(){
- this.valueNode.value = this.toString();
- this.inherited('validate', arguments);
- },
-
- postCreate: function(){
- var textbox = this.textbox;
- var valueNode = (this.valueNode = document.createElement("input"));
- valueNode.setAttribute("type", textbox.type);
- valueNode.setAttribute("value", this.toString());
- dojo.style(valueNode, "display", "none");
- valueNode.name = this.textbox.name;
- this.textbox.name = "_" + this.textbox.name + "_displayed_";
- this.textbox.removeAttribute("name");
- dojo.place(valueNode, textbox, "after");
-
- this.inherited('postCreate', arguments);
- }
- }
-);
-
-dojo.declare(
- "dijit.form.RangeBoundTextBox",
- dijit.form.MappedTextBox,
- {
- // summary:
- // A subclass of MappedTextBox.
- // Tests for a value out-of-range
- /*===== contraints object:
- // min: Number
- // Minimum signed value. Default is -Infinity
- min: undefined,
- // max: Number
- // Maximum signed value. Default is +Infinity
- max: undefined,
- =====*/
-
- // rangeMessage: String
- // The message to display if value is out-of-range
- rangeMessage: "",
-
- compare: function(val1, val2){
- // summary: compare 2 values
- return val1 - val2;
- },
-
- rangeCheck: function(/* Number */ primitive, /* Object */ constraints){
- // summary: user replaceable function used to validate the range of the numeric input value
- var isMin = (typeof constraints.min != "undefined");
- var isMax = (typeof constraints.max != "undefined");
- if(isMin || isMax){
- return (!isMin || this.compare(primitive,constraints.min) >= 0) &&
- (!isMax || this.compare(primitive,constraints.max) <= 0);
- }else{ return true; }
- },
-
- isInRange: function(/* Boolean*/ isFocused){
- // summary: Need to over-ride with your own validation code in subclasses
- return this.rangeCheck(this.getValue(), this.constraints);
- },
-
- isValid: function(/* Boolean*/ isFocused){
- return this.inherited('isValid', arguments) &&
- ((this._isEmpty(this.textbox.value) && !this.required) || this.isInRange(isFocused));
- },
-
- getErrorMessage: function(/* Boolean*/ isFocused){
- if(dijit.form.RangeBoundTextBox.superclass.isValid.call(this, false) && !this.isInRange(isFocused)){ return this.rangeMessage; }
- else{ return this.inherited('getErrorMessage', arguments); }
- },
-
- postMixInProperties: function(){
- this.inherited('postMixInProperties', arguments);
- if(!this.rangeMessage){
- this.messages = dojo.i18n.getLocalization("dijit.form", "validate", this.lang);
- this.rangeMessage = this.messages.rangeMessage;
- }
- },
-
- postCreate: function(){
- this.inherited('postCreate', arguments);
- if(typeof this.constraints.min != "undefined"){
- dijit.setWaiState(this.focusNode, "valuemin", this.constraints.min);
- }
- if(typeof this.constraints.max != "undefined"){
- dijit.setWaiState(this.focusNode, "valuemax", this.constraints.max);
- }
- }
- }
-);
-
+dojo.requireLocalization("dijit.form","validate",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-tw");
+dojo.declare("dijit.form.ValidationTextBox",dijit.form.TextBox,{templateString:dojo.cache("dijit.form","templates/ValidationTextBox.html","<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\n\tid=\"widget_${id}\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\" waiRole=\"presentation\"\n\t><div style=\"overflow:hidden;\"\n\t\t><div class=\"dijitReset dijitValidationIcon\"><br></div\n\t\t><div class=\"dijitReset dijitValidationIconText\">&Chi;</div\n\t\t><div class=\"dijitReset dijitInputField\"\n\t\t\t><input class=\"dijitReset\" dojoAttachPoint='textbox,focusNode' autocomplete=\"off\"\n\t\t\t${nameAttrSetting} type='${type}'\n\t\t/></div\n\t></div\n></div>\n"),baseClass:"dijitTextBox",required:false,promptMessage:"",invalidMessage:"$_unset_$",constraints:{},regExp:".*",regExpGen:function(_1){
+return this.regExp;
+},state:"",tooltipPosition:[],_setValueAttr:function(){
+this.inherited(arguments);
+this.validate(this._focused);
+},validator:function(_2,_3){
+return (new RegExp("^(?:"+this.regExpGen(_3)+")"+(this.required?"":"?")+"$")).test(_2)&&(!this.required||!this._isEmpty(_2))&&(this._isEmpty(_2)||this.parse(_2,_3)!==undefined);
+},_isValidSubset:function(){
+return this.textbox.value.search(this._partialre)==0;
+},isValid:function(_4){
+return this.validator(this.textbox.value,this.constraints);
+},_isEmpty:function(_5){
+return /^\s*$/.test(_5);
+},getErrorMessage:function(_6){
+return this.invalidMessage;
+},getPromptMessage:function(_7){
+return this.promptMessage;
+},_maskValidSubsetError:true,validate:function(_8){
+var _9="";
+var _a=this.disabled||this.isValid(_8);
+if(_a){
+this._maskValidSubsetError=true;
+}
+var _b=!_a&&_8&&this._isValidSubset();
+var _c=this._isEmpty(this.textbox.value);
+if(_c){
+this._maskValidSubsetError=true;
+}
+this.state=(_a||(!this._hasBeenBlurred&&_c)||_b)?"":"Error";
+if(this.state=="Error"){
+this._maskValidSubsetError=false;
+}
+this._setStateClass();
+dijit.setWaiState(this.focusNode,"invalid",_a?"false":"true");
+if(_8){
+if(_c){
+_9=this.getPromptMessage(true);
+}
+if(!_9&&(this.state=="Error"||(_b&&!this._maskValidSubsetError))){
+_9=this.getErrorMessage(true);
+}
+}
+this.displayMessage(_9);
+return _a;
+},_message:"",displayMessage:function(_d){
+if(this._message==_d){
+return;
+}
+this._message=_d;
+dijit.hideTooltip(this.domNode);
+if(_d){
+dijit.showTooltip(_d,this.domNode,this.tooltipPosition);
+}
+},_refreshState:function(){
+this.validate(this._focused);
+this.inherited(arguments);
+},constructor:function(){
+this.constraints={};
+},postMixInProperties:function(){
+this.inherited(arguments);
+this.constraints.locale=this.lang;
+this.messages=dojo.i18n.getLocalization("dijit.form","validate",this.lang);
+if(this.invalidMessage=="$_unset_$"){
+this.invalidMessage=this.messages.invalidMessage;
+}
+var p=this.regExpGen(this.constraints);
+this.regExp=p;
+var _e="";
+if(p!=".*"){
+this.regExp.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(re){
+switch(re.charAt(0)){
+case "{":
+case "+":
+case "?":
+case "*":
+case "^":
+case "$":
+case "|":
+case "(":
+_e+=re;
+break;
+case ")":
+_e+="|$)";
+break;
+default:
+_e+="(?:"+re+"|$)";
+break;
+}
+});
+}
+try{
+"".search(_e);
}
+catch(e){
+_e=this.regExp;
+console.warn("RegExp error in "+this.declaredClass+": "+this.regExp);
+}
+this._partialre="^(?:"+_e+")$";
+},_setDisabledAttr:function(_f){
+this.inherited(arguments);
+this._refreshState();
+},_setRequiredAttr:function(_10){
+this.required=_10;
+dijit.setWaiState(this.focusNode,"required",_10);
+this._refreshState();
+},postCreate:function(){
+if(dojo.isIE){
+var s=dojo.getComputedStyle(this.focusNode);
+if(s){
+var ff=s.fontFamily;
+if(ff){
+this.focusNode.style.fontFamily=ff;
+}
+}
+}
+this.inherited(arguments);
+},reset:function(){
+this._maskValidSubsetError=true;
+this.inherited(arguments);
+},_onBlur:function(){
+this.displayMessage("");
+this.inherited(arguments);
+}});
+dojo.declare("dijit.form.MappedTextBox",dijit.form.ValidationTextBox,{postMixInProperties:function(){
+this.inherited(arguments);
+this.nameAttrSetting="";
+},serialize:function(val,_11){
+return val.toString?val.toString():"";
+},toString:function(){
+var val=this.filter(this.attr("value"));
+return val!=null?(typeof val=="string"?val:this.serialize(val,this.constraints)):"";
+},validate:function(){
+this.valueNode.value=this.toString();
+return this.inherited(arguments);
+},buildRendering:function(){
+this.inherited(arguments);
+this.valueNode=dojo.place("<input type='hidden'"+(this.name?" name='"+this.name+"'":"")+">",this.textbox,"after");
+},reset:function(){
+this.valueNode.value="";
+this.inherited(arguments);
+}});
+dojo.declare("dijit.form.RangeBoundTextBox",dijit.form.MappedTextBox,{rangeMessage:"",rangeCheck:function(_12,_13){
+return ("min" in _13?(this.compare(_12,_13.min)>=0):true)&&("max" in _13?(this.compare(_12,_13.max)<=0):true);
+},isInRange:function(_14){
+return this.rangeCheck(this.attr("value"),this.constraints);
+},_isDefinitelyOutOfRange:function(){
+var val=this.attr("value");
+var _15=false;
+var _16=false;
+if("min" in this.constraints){
+var min=this.constraints.min;
+min=this.compare(val,((typeof min=="number")&&min>=0&&val!=0)?0:min);
+_15=(typeof min=="number")&&min<0;
+}
+if("max" in this.constraints){
+var max=this.constraints.max;
+max=this.compare(val,((typeof max!="number")||max>0)?max:0);
+_16=(typeof max=="number")&&max>0;
+}
+return _15||_16;
+},_isValidSubset:function(){
+return this.inherited(arguments)&&!this._isDefinitelyOutOfRange();
+},isValid:function(_17){
+return this.inherited(arguments)&&((this._isEmpty(this.textbox.value)&&!this.required)||this.isInRange(_17));
+},getErrorMessage:function(_18){
+var v=this.attr("value");
+if(v!==null&&v!==""&&v!==undefined&&!this.isInRange(_18)){
+return this.rangeMessage;
+}
+return this.inherited(arguments);
+},postMixInProperties:function(){
+this.inherited(arguments);
+if(!this.rangeMessage){
+this.messages=dojo.i18n.getLocalization("dijit.form","validate",this.lang);
+this.rangeMessage=this.messages.rangeMessage;
+}
+},postCreate:function(){
+this.inherited(arguments);
+if(this.constraints.min!==undefined){
+dijit.setWaiState(this.focusNode,"valuemin",this.constraints.min);
+}
+if(this.constraints.max!==undefined){
+dijit.setWaiState(this.focusNode,"valuemax",this.constraints.max);
+}
+},_setValueAttr:function(_19,_1a){
+dijit.setWaiState(this.focusNode,"valuenow",_19);
+this.inherited(arguments);
+}});
+}
diff --git a/js/dojo/dijit/form/_FormWidget.js b/js/dojo/dijit/form/_FormWidget.js
--- a/js/dojo/dijit/form/_FormWidget.js
+++ b/js/dojo/dijit/form/_FormWidget.js
@@ -1,269 +1,229 @@
-if(!dojo._hasResource["dijit.form._FormWidget"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.form._FormWidget"] = true;
-dojo.provide("dijit.form._FormWidget");
-
-dojo.require("dijit._Widget");
-dojo.require("dijit._Templated");
-
-dojo.declare("dijit.form._FormWidget", [dijit._Widget, dijit._Templated],
-{
- /*
- Summary:
- FormElement widgets correspond to native HTML elements such as <input> or <button> or <select>.
- Each FormElement represents a single input value, and has a (possibly hidden) <input> element,
- to which it serializes its input value, so that form submission (either normal submission or via FormBind?)
- works as expected.
-
- All these widgets should have these attributes just like native HTML input elements.
- You can set them during widget construction, but after that they are read only.
-
- They also share some common methods.
- */
-
- // baseClass: String
- // Root CSS class of the widget (ex: dijitTextBox), used to add CSS classes of widget
- // (ex: "dijitTextBox dijitTextBoxInvalid dijitTextBoxFocused dijitTextBoxInvalidFocused")
- // See _setStateClass().
- baseClass: "",
-
- // value: String
- // Corresponds to the native HTML <input> element's attribute.
- value: "",
-
- // name: String
- // Name used when submitting form; same as "name" attribute or plain HTML elements
- name: "",
-
- // id: String
- // Corresponds to the native HTML <input> element's attribute.
- // Also becomes the id for the widget.
- id: "",
-
- // alt: String
- // Corresponds to the native HTML <input> element's attribute.
- alt: "",
-
- // type: String
- // Corresponds to the native HTML <input> element's attribute.
- type: "text",
-
- // tabIndex: Integer
- // Order fields are traversed when user hits the tab key
- tabIndex: "0",
-
- // disabled: Boolean
- // Should this widget respond to user input?
- // In markup, this is specified as "disabled='disabled'", or just "disabled".
- disabled: false,
-
- // intermediateChanges: Boolean
- // Fires onChange for each value change or only on demand
- intermediateChanges: false,
-
- // These mixins assume that the focus node is an INPUT, as many but not all _FormWidgets are.
- // Don't attempt to mixin the 'type', 'name' attributes here programatically -- they must be declared
- // directly in the template as read by the parser in order to function. IE is known to specifically
- // require the 'name' attribute at element creation time.
- attributeMap: dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),
- {id:"focusNode", tabIndex:"focusNode", alt:"focusNode"}),
-
- setDisabled: function(/*Boolean*/ disabled){
- // summary:
- // Set disabled state of widget.
-
- this.domNode.disabled = this.disabled = disabled;
- if(this.focusNode){
- this.focusNode.disabled = disabled;
- }
- if(disabled){
- //reset those, because after the domNode is disabled, we can no longer receive
- //mouse related events, see #4200
- this._hovering = false;
- this._active = false;
- }
- dijit.setWaiState(this.focusNode || this.domNode, "disabled", disabled);
- this._setStateClass();
- },
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- _onMouse : function(/*Event*/ event){
- // summary:
- // Sets _hovering, _active, and stateModifier properties depending on mouse state,
- // then calls setStateClass() to set appropriate CSS classes for this.domNode.
- //
- // To get a different CSS class for hover, send onmouseover and onmouseout events to this method.
- // To get a different CSS class while mouse button is depressed, send onmousedown to this method.
-
- var mouseNode = event.target;
- if(mouseNode && mouseNode.getAttribute){
- this.stateModifier = mouseNode.getAttribute("stateModifier") || "";
- }
-
- if(!this.disabled){
- switch(event.type){
- case "mouseenter" :
- case "mouseover" :
- this._hovering = true;
- break;
-
- case "mouseout" :
- case "mouseleave" :
- this._hovering = false;
- break;
-
- case "mousedown" :
- this._active = true;
- // set a global event to handle mouseup, so it fires properly
- // even if the cursor leaves the button
- var self = this;
- // #2685: use this.connect and disconnect so destroy works properly
- var mouseUpConnector = this.connect(dojo.body(), "onmouseup", function(){
- self._active = false;
- self._setStateClass();
- self.disconnect(mouseUpConnector);
- });
- break;
- }
- this._setStateClass();
- }
- },
-
- isFocusable: function(){
- return !this.disabled && (dojo.style(this.domNode, "display") != "none");
- },
-
- focus: function(){
- dijit.focus(this.focusNode);
- },
-
- _setStateClass: function(){
- // summary
- // Update the visual state of the widget by setting the css classes on this.domNode
- // (or this.stateNode if defined) by combining this.baseClass with
- // various suffixes that represent the current widget state(s).
- //
- // In the case where a widget has multiple
- // states, it sets the class based on all possible
- // combinations. For example, an invalid form widget that is being hovered
- // will be "dijitInput dijitInputInvalid dijitInputHover dijitInputInvalidHover".
- //
- // For complex widgets with multiple regions, there can be various hover/active states,
- // such as "Hover" or "CloseButtonHover" (for tab buttons).
- // This is controlled by a stateModifier="CloseButton" attribute on the close button node.
- //
- // The widget may have one or more of the following states, determined
- // by this.state, this.checked, this.valid, and this.selected:
- // Error - ValidationTextBox sets this.state to "Error" if the current input value is invalid
- // Checked - ex: a checkmark or a ToggleButton in a checked state, will have this.checked==true
- // Selected - ex: currently selected tab will have this.selected==true
- //
- // In addition, it may have at most one of the following states,
- // based on this.disabled and flags set in _onMouse (this._active, this._hovering, this._focused):
- // Disabled - if the widget is disabled
- // Active - if the mouse (or space/enter key?) is being pressed down
- // Focused - if the widget has focus
- // Hover - if the mouse is over the widget
- //
- // (even if multiple af the above conditions are true we only pick the first matching one)
-
-
- // Get original (non state related, non baseClass related) class specified in template
- if(!("staticClass" in this)){
- this.staticClass = (this.stateNode||this.domNode).className;
- }
-
- // Compute new set of classes
- var classes = [ this.baseClass ];
-
- function multiply(modifier){
- classes=classes.concat(dojo.map(classes, function(c){ return c+modifier; }));
- }
-
- if(this.checked){
- multiply("Checked");
- }
- if(this.state){
- multiply(this.state);
- }
- if(this.selected){
- multiply("Selected");
- }
-
- // Only one of these four can be applied.
- // Active trumps Focused, Focused trumps Hover, and Disabled trumps all.
- if(this.disabled){
- multiply("Disabled");
- }else if(this._active){
- multiply(this.stateModifier+"Active");
- }else{
- if(this._focused){
- multiply("Focused");
- }
- if((this.stateModifier || !this._focused) && this._hovering){
- multiply(this.stateModifier+"Hover");
- }
- }
- (this.stateNode || this.domNode).className = this.staticClass + " " + classes.join(" ");
- },
-
- onChange: function(newValue){
- // summary: callback when value is changed
- },
-
- postCreate: function(){
- this.setValue(this.value, null); // null reserved for initial value
- this.setDisabled(this.disabled);
- this._setStateClass();
- },
-
- setValue: function(/*anything*/ newValue, /*Boolean, optional*/ priorityChange){
- // summary: set the value of the widget.
- this._lastValue = newValue;
- dijit.setWaiState(this.focusNode || this.domNode, "valuenow", this.forWaiValuenow());
- if(priorityChange === undefined){ priorityChange = true; } // setValue with value only should fire onChange
- if(this._lastValueReported == undefined && priorityChange === null){ // don't report the initial value
- this._lastValueReported = newValue;
- }
- if((this.intermediateChanges || priorityChange) &&
- ((newValue && newValue.toString)?newValue.toString():newValue) !== ((this._lastValueReported && this._lastValueReported.toString)?this._lastValueReported.toString():this._lastValueReported)){
- this._lastValueReported = newValue;
- this.onChange(newValue);
- }
- },
-
- getValue: function(){
- // summary: get the value of the widget.
- return this._lastValue;
- },
-
- undo: function(){
- // summary: restore the value to the last value passed to onChange
- this.setValue(this._lastValueReported, false);
- },
-
- _onKeyPress: function(e){
- if(e.keyCode == dojo.keys.ESCAPE && !e.shiftKey && !e.ctrlKey && !e.altKey){
- var v = this.getValue();
- var lv = this._lastValueReported;
- // Equality comparison of objects such as dates are done by reference so
- // two distinct objects are != even if they have the same data. So use
- // toStrings in case the values are objects.
- if((typeof lv != "undefined") && ((v!==null && v.toString)?v.toString():null) !== lv.toString()){
- this.undo();
- dojo.stopEvent(e);
- return false;
- }
- }
- return true;
- },
-
- forWaiValuenow: function(){
- // summary: returns a value, reflecting the current state of the widget,
- // to be used for the ARIA valuenow.
- // This method may be overridden by subclasses that want
- // to use something other than this.getValue() for valuenow
- return this.getValue();
- }
+if(!dojo._hasResource["dijit.form._FormWidget"]){
+dojo._hasResource["dijit.form._FormWidget"]=true;
+dojo.provide("dijit.form._FormWidget");
+dojo.require("dijit._Widget");
+dojo.require("dijit._Templated");
+dojo.declare("dijit.form._FormWidget",[dijit._Widget,dijit._Templated],{baseClass:"",name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:false,intermediateChanges:false,scrollOnFocus:true,attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{value:"focusNode",id:"focusNode",tabIndex:"focusNode",alt:"focusNode",title:"focusNode"}),postMixInProperties:function(){
+this.nameAttrSetting=this.name?("name='"+this.name+"'"):"";
+this.inherited(arguments);
+},_setDisabledAttr:function(_1){
+this.disabled=_1;
+dojo.attr(this.focusNode,"disabled",_1);
+if(this.valueNode){
+dojo.attr(this.valueNode,"disabled",_1);
+}
+dijit.setWaiState(this.focusNode,"disabled",_1);
+if(_1){
+this._hovering=false;
+this._active=false;
+this.focusNode.setAttribute("tabIndex","-1");
+}else{
+this.focusNode.setAttribute("tabIndex",this.tabIndex);
+}
+this._setStateClass();
+},setDisabled:function(_2){
+dojo.deprecated("setDisabled("+_2+") is deprecated. Use attr('disabled',"+_2+") instead.","","2.0");
+this.attr("disabled",_2);
+},_onFocus:function(e){
+if(this.scrollOnFocus){
+dijit.scrollIntoView(this.domNode);
+}
+this.inherited(arguments);
+},_onMouse:function(_3){
+var _4=_3.currentTarget;
+if(_4&&_4.getAttribute){
+this.stateModifier=_4.getAttribute("stateModifier")||"";
+}
+if(!this.disabled){
+switch(_3.type){
+case "mouseenter":
+case "mouseover":
+this._hovering=true;
+this._active=this._mouseDown;
+break;
+case "mouseout":
+case "mouseleave":
+this._hovering=false;
+this._active=false;
+break;
+case "mousedown":
+this._active=true;
+this._mouseDown=true;
+var _5=this.connect(dojo.body(),"onmouseup",function(){
+if(this._mouseDown&&this.isFocusable()){
+this.focus();
+}
+this._active=false;
+this._mouseDown=false;
+this._setStateClass();
+this.disconnect(_5);
+});
+break;
+}
+this._setStateClass();
+}
+},isFocusable:function(){
+return !this.disabled&&!this.readOnly&&this.focusNode&&(dojo.style(this.domNode,"display")!="none");
+},focus:function(){
+dijit.focus(this.focusNode);
+},_setStateClass:function(){
+var _6=this.baseClass.split(" ");
+function _7(_8){
+_6=_6.concat(dojo.map(_6,function(c){
+return c+_8;
+}),"dijit"+_8);
+};
+if(this.checked){
+_7("Checked");
+}
+if(this.state){
+_7(this.state);
+}
+if(this.selected){
+_7("Selected");
+}
+if(this.disabled){
+_7("Disabled");
+}else{
+if(this.readOnly){
+_7("ReadOnly");
+}else{
+if(this._active){
+_7(this.stateModifier+"Active");
+}else{
+if(this._focused){
+_7("Focused");
+}
+if(this._hovering){
+_7(this.stateModifier+"Hover");
+}
+}
+}
+}
+var tn=this.stateNode||this.domNode,_9={};
+dojo.forEach(tn.className.split(" "),function(c){
+_9[c]=true;
+});
+if("_stateClasses" in this){
+dojo.forEach(this._stateClasses,function(c){
+delete _9[c];
});
-
+}
+dojo.forEach(_6,function(c){
+_9[c]=true;
+});
+var _a=[];
+for(var c in _9){
+_a.push(c);
+}
+tn.className=_a.join(" ");
+this._stateClasses=_6;
+},compare:function(_b,_c){
+if(typeof _b=="number"&&typeof _c=="number"){
+return (isNaN(_b)&&isNaN(_c))?0:_b-_c;
+}else{
+if(_b>_c){
+return 1;
+}else{
+if(_b<_c){
+return -1;
+}else{
+return 0;
+}
+}
+}
+},onChange:function(_d){
+},_onChangeActive:false,_handleOnChange:function(_e,_f){
+this._lastValue=_e;
+if(this._lastValueReported==undefined&&(_f===null||!this._onChangeActive)){
+this._resetValue=this._lastValueReported=_e;
+}
+if((this.intermediateChanges||_f||_f===undefined)&&((typeof _e!=typeof this._lastValueReported)||this.compare(_e,this._lastValueReported)!=0)){
+this._lastValueReported=_e;
+if(this._onChangeActive){
+if(this._onChangeHandle){
+clearTimeout(this._onChangeHandle);
+}
+this._onChangeHandle=setTimeout(dojo.hitch(this,function(){
+this._onChangeHandle=null;
+this.onChange(_e);
+}),0);
+}
+}
+},create:function(){
+this.inherited(arguments);
+this._onChangeActive=true;
+this._setStateClass();
+},destroy:function(){
+if(this._onChangeHandle){
+clearTimeout(this._onChangeHandle);
+this.onChange(this._lastValueReported);
}
+this.inherited(arguments);
+},setValue:function(_10){
+dojo.deprecated("dijit.form._FormWidget:setValue("+_10+") is deprecated. Use attr('value',"+_10+") instead.","","2.0");
+this.attr("value",_10);
+},getValue:function(){
+dojo.deprecated(this.declaredClass+"::getValue() is deprecated. Use attr('value') instead.","","2.0");
+return this.attr("value");
+}});
+dojo.declare("dijit.form._FormValueWidget",dijit.form._FormWidget,{readOnly:false,attributeMap:dojo.delegate(dijit.form._FormWidget.prototype.attributeMap,{value:"",readOnly:"focusNode"}),_setReadOnlyAttr:function(_11){
+this.readOnly=_11;
+dojo.attr(this.focusNode,"readOnly",_11);
+dijit.setWaiState(this.focusNode,"readonly",_11);
+this._setStateClass();
+},postCreate:function(){
+if(dojo.isIE){
+this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);
+}
+if(this._resetValue===undefined){
+this._resetValue=this.value;
+}
+},_setValueAttr:function(_12,_13){
+this.value=_12;
+this._handleOnChange(_12,_13);
+},_getValueAttr:function(){
+return this._lastValue;
+},undo:function(){
+this._setValueAttr(this._lastValueReported,false);
+},reset:function(){
+this._hasBeenBlurred=false;
+this._setValueAttr(this._resetValue,true);
+},_onKeyDown:function(e){
+if(e.keyCode==dojo.keys.ESCAPE&&!(e.ctrlKey||e.altKey||e.metaKey)){
+var te;
+if(dojo.isIE){
+e.preventDefault();
+te=document.createEventObject();
+te.keyCode=dojo.keys.ESCAPE;
+te.shiftKey=e.shiftKey;
+e.srcElement.fireEvent("onkeypress",te);
+}
+}
+},_layoutHackIE7:function(){
+if(dojo.isIE==7){
+var _14=this.domNode;
+var _15=_14.parentNode;
+var _16=_14.firstChild||_14;
+var _17=_16.style.filter;
+while(_15&&_15.clientHeight==0){
+_15._disconnectHandle=this.connect(_15,"onscroll",dojo.hitch(this,function(e){
+this.disconnect(_15._disconnectHandle);
+_15.removeAttribute("_disconnectHandle");
+_16.style.filter=(new Date()).getMilliseconds();
+setTimeout(function(){
+_16.style.filter=_17;
+},0);
+}));
+_15=_15.parentNode;
+}
+}
+}});
+}
diff --git a/js/dojo/dijit/form/_Spinner.js b/js/dojo/dijit/form/_Spinner.js
--- a/js/dojo/dijit/form/_Spinner.js
+++ b/js/dojo/dijit/form/_Spinner.js
@@ -1,104 +1,81 @@
-if(!dojo._hasResource["dijit.form._Spinner"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.form._Spinner"] = true;
-dojo.provide("dijit.form._Spinner");
-
-dojo.require("dijit.form.ValidationTextBox");
-
-dojo.declare(
- "dijit.form._Spinner",
- dijit.form.RangeBoundTextBox,
- {
-
- // summary: Mixin for validation widgets with a spinner
- // description: This class basically (conceptually) extends dijit.form.ValidationTextBox.
- // It modifies the template to have up/down arrows, and provides related handling code.
-
- // defaultTimeout: Number
- // number of milliseconds before a held key or button becomes typematic
- defaultTimeout: 500,
-
- // timeoutChangeRate: Number
- // fraction of time used to change the typematic timer between events
- // 1.0 means that each typematic event fires at defaultTimeout intervals
- // < 1.0 means that each typematic event fires at an increasing faster rate
- timeoutChangeRate: 0.90,
-
- // smallDelta: Number
- // adjust the value by this much when spinning using the arrow keys/buttons
- smallDelta: 1,
- // largeDelta: Number
- // adjust the value by this much when spinning using the PgUp/Dn keys
- largeDelta: 10,
-
- templateString:"<table class=\"dijit dijitReset dijitInlineTable dijitLeft\" cellspacing=\"0\" cellpadding=\"0\"\n\tid=\"widget_${id}\" name=\"${name}\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onkeypress:_onKeyPress\"\n\twaiRole=\"presentation\"\n\t><tr class=\"dijitReset\"\n\t\t><td rowspan=\"2\" class=\"dijitReset dijitStretch dijitInputField\" width=\"100%\"\n\t\t\t><input dojoAttachPoint=\"textbox,focusNode\" type=\"${type}\" dojoAttachEvent=\"onfocus,onkeyup\"\n\t\t\t\twaiRole=\"spinbutton\" autocomplete=\"off\" name=\"${name}\"\n\t\t></td\n\t\t><td rowspan=\"2\" class=\"dijitReset dijitValidationIconField\" width=\"0%\" \n\t\t\t><div dojoAttachPoint='iconNode' class='dijitValidationIcon'></div\n\t\t></td\n\t\t><td class=\"dijitReset dijitRight dijitButtonNode dijitUpArrowButton\" width=\"0%\"\n\t\t\t\tdojoAttachPoint=\"upArrowNode\"\n\t\t\t\tdojoAttachEvent=\"onmousedown:_handleUpArrowEvent,onmouseup:_handleUpArrowEvent,onmouseover:_handleUpArrowEvent,onmouseout:_handleUpArrowEvent\"\n\t\t\t\tstateModifier=\"UpArrow\"\n\t\t\t><div class=\"dijitA11yUpArrow\">&#9650;</div\n\t\t></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset dijitRight dijitButtonNode dijitDownArrowButton\" width=\"0%\"\n\t\t\t\tdojoAttachPoint=\"downArrowNode\"\n\t\t\t\tdojoAttachEvent=\"onmousedown:_handleDownArrowEvent,onmouseup:_handleDownArrowEvent,onmouseover:_handleDownArrowEvent,onmouseout:_handleDownArrowEvent\"\n\t\t\t\tstateModifier=\"DownArrow\"\n\t\t\t><div class=\"dijitA11yDownArrow\">&#9660;</div\n\t\t></td\n\t></tr\n></table>\n\n",
- baseClass: "dijitSpinner",
-
- adjust: function(/* Object */ val, /*Number*/ delta){
- // summary: user replaceable function used to adjust a primitive value(Number/Date/...) by the delta amount specified
- // the val is adjusted in a way that makes sense to the object type
- return val;
- },
-
- _handleUpArrowEvent : function(/*Event*/ e){
- this._onMouse(e, this.upArrowNode);
- },
-
- _handleDownArrowEvent : function(/*Event*/ e){
- this._onMouse(e, this.downArrowNode);
- },
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- _arrowPressed: function(/*Node*/ nodePressed, /*Number*/ direction){
- if(this.disabled){ return; }
- dojo.addClass(nodePressed, "dijitSpinnerButtonActive");
- this.setValue(this.adjust(this.getValue(), direction*this.smallDelta), false);
- },
-
- _arrowReleased: function(/*Node*/ node){
- if(this.disabled){ return; }
- this._wheelTimer = null;
- dijit.focus(this.textbox);
- dojo.removeClass(node, "dijitSpinnerButtonActive");
- },
-
- _typematicCallback: function(/*Number*/ count, /*DOMNode*/ node, /*Event*/ evt){
- if(node == this.textbox){ node = (evt.keyCode == dojo.keys.UP_ARROW) ? this.upArrowNode : this.downArrowNode; }
- if(count == -1){ this._arrowReleased(node); }
- else{ this._arrowPressed(node, (node == this.upArrowNode) ? 1 : -1); }
- },
-
- _wheelTimer: null,
- _mouseWheeled: function(/*Event*/ evt){
- dojo.stopEvent(evt);
- var scrollAmount = 0;
- if(typeof evt.wheelDelta == 'number'){ // IE
- scrollAmount = evt.wheelDelta;
- }else if(typeof evt.detail == 'number'){ // Mozilla+Firefox
- scrollAmount = -evt.detail;
- }
- if(scrollAmount > 0){
- var node = this.upArrowNode;
- var dir = +1;
- }else if(scrollAmount < 0){
- var node = this.downArrowNode;
- var dir = -1;
- }else{ return; }
- this._arrowPressed(node, dir);
- if(this._wheelTimer != null){
- clearTimeout(this._wheelTimer);
- }
- var _this = this;
- this._wheelTimer = setTimeout(function(){_this._arrowReleased(node);}, 50);
- },
-
- postCreate: function(){
- this.inherited('postCreate', arguments);
-
- // extra listeners
- this.connect(this.textbox, dojo.isIE ? "onmousewheel" : 'DOMMouseScroll', "_mouseWheeled");
- dijit.typematic.addListener(this.upArrowNode, this.textbox, {keyCode:dojo.keys.UP_ARROW,ctrlKey:false,altKey:false,shiftKey:false}, this, "_typematicCallback", this.timeoutChangeRate, this.defaultTimeout);
- dijit.typematic.addListener(this.downArrowNode, this.textbox, {keyCode:dojo.keys.DOWN_ARROW,ctrlKey:false,altKey:false,shiftKey:false}, this, "_typematicCallback", this.timeoutChangeRate, this.defaultTimeout);
- }
+if(!dojo._hasResource["dijit.form._Spinner"]){
+dojo._hasResource["dijit.form._Spinner"]=true;
+dojo.provide("dijit.form._Spinner");
+dojo.require("dijit.form.ValidationTextBox");
+dojo.declare("dijit.form._Spinner",dijit.form.RangeBoundTextBox,{defaultTimeout:500,timeoutChangeRate:0.9,smallDelta:1,largeDelta:10,templateString:dojo.cache("dijit.form","templates/Spinner.html","<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\n\tid=\"widget_${id}\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\" waiRole=\"presentation\"\n\t><div class=\"dijitInputLayoutContainer\"\n\t\t><div class=\"dijitReset dijitSpinnerButtonContainer\"\n\t\t\t>&nbsp;<div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitUpArrowButton\"\n\t\t\t\tdojoAttachPoint=\"upArrowNode\"\n\t\t\t\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse\"\n\t\t\t\tstateModifier=\"UpArrow\"\n\t\t\t\t><div class=\"dijitArrowButtonInner\">&thinsp;</div\n\t\t\t\t><div class=\"dijitArrowButtonChar\">&#9650;</div\n\t\t\t></div\n\t\t\t><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitDownArrowButton\"\n\t\t\t\tdojoAttachPoint=\"downArrowNode\"\n\t\t\t\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse\"\n\t\t\t\tstateModifier=\"DownArrow\"\n\t\t\t\t><div class=\"dijitArrowButtonInner\">&thinsp;</div\n\t\t\t\t><div class=\"dijitArrowButtonChar\">&#9660;</div\n\t\t\t></div\n\t\t></div\n\t\t><div class=\"dijitReset dijitValidationIcon\"><br></div\n\t\t><div class=\"dijitReset dijitValidationIconText\">&Chi;</div\n\t\t><div class=\"dijitReset dijitInputField\"\n\t\t\t><input class='dijitReset' dojoAttachPoint=\"textbox,focusNode\" type=\"${type}\" dojoAttachEvent=\"onkeypress:_onKeyPress\"\n\t\t\t\twaiRole=\"spinbutton\" autocomplete=\"off\" ${nameAttrSetting}\n\t\t/></div\n\t></div\n></div>\n"),baseClass:"dijitSpinner",adjust:function(_1,_2){
+return _1;
+},_arrowState:function(_3,_4){
+this._active=_4;
+this.stateModifier=_3.getAttribute("stateModifier")||"";
+this._setStateClass();
+},_arrowPressed:function(_5,_6,_7){
+if(this.disabled||this.readOnly){
+return;
+}
+this._arrowState(_5,true);
+this._setValueAttr(this.adjust(this.attr("value"),_6*_7),false);
+dijit.selectInputText(this.textbox,this.textbox.value.length);
+},_arrowReleased:function(_8){
+this._wheelTimer=null;
+if(this.disabled||this.readOnly){
+return;
+}
+this._arrowState(_8,false);
+},_typematicCallback:function(_9,_a,_b){
+var _c=this.smallDelta;
+if(_a==this.textbox){
+var k=dojo.keys;
+var _d=_b.charOrCode;
+_c=(_d==k.PAGE_UP||_d==k.PAGE_DOWN)?this.largeDelta:this.smallDelta;
+_a=(_d==k.UP_ARROW||_d==k.PAGE_UP)?this.upArrowNode:this.downArrowNode;
+}
+if(_9==-1){
+this._arrowReleased(_a);
+}else{
+this._arrowPressed(_a,(_a==this.upArrowNode)?1:-1,_c);
+}
+},_wheelTimer:null,_mouseWheeled:function(_e){
+dojo.stopEvent(_e);
+var _f=_e.detail?(_e.detail*-1):(_e.wheelDelta/120);
+if(_f!==0){
+var _10=this[(_f>0?"upArrowNode":"downArrowNode")];
+this._arrowPressed(_10,_f,this.smallDelta);
+if(!this._wheelTimer){
+clearTimeout(this._wheelTimer);
+}
+this._wheelTimer=setTimeout(dojo.hitch(this,"_arrowReleased",_10),50);
+}
+},postCreate:function(){
+this.inherited(arguments);
+this.connect(this.domNode,!dojo.isMozilla?"onmousewheel":"DOMMouseScroll","_mouseWheeled");
+this._connects.push(dijit.typematic.addListener(this.upArrowNode,this.textbox,{charOrCode:dojo.keys.UP_ARROW,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout));
+this._connects.push(dijit.typematic.addListener(this.downArrowNode,this.textbox,{charOrCode:dojo.keys.DOWN_ARROW,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout));
+this._connects.push(dijit.typematic.addListener(this.upArrowNode,this.textbox,{charOrCode:dojo.keys.PAGE_UP,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout));
+this._connects.push(dijit.typematic.addListener(this.downArrowNode,this.textbox,{charOrCode:dojo.keys.PAGE_DOWN,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout));
+if(dojo.isIE){
+var _11=this;
+(function resize(){
+var sz=_11.upArrowNode.parentNode.offsetHeight;
+if(sz){
+_11.upArrowNode.style.height=sz>>1;
+_11.downArrowNode.style.height=sz-(sz>>1);
+_11.focusNode.parentNode.style.height=sz;
+}
+})();
+this.connect(this.domNode,"onresize",function(){
+setTimeout(function(){
+resize();
+_11._setStateClass();
+},0);
});
-
+this._layoutHackIE7();
}
+}});
+}
diff --git a/js/dojo/dijit/form/nls/ComboBox.js b/js/dojo/dijit/form/nls/ComboBox.js
--- a/js/dojo/dijit/form/nls/ComboBox.js
+++ b/js/dojo/dijit/form/nls/ComboBox.js
@@ -1,1 +1,1 @@
-({"previousMessage": "Previous choices", "nextMessage": "More choices"})
\ No newline at end of file
+({"previousMessage":"Previous choices","nextMessage":"More choices"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/Textarea.js b/js/dojo/dijit/form/nls/Textarea.js
--- a/js/dojo/dijit/form/nls/Textarea.js
+++ b/js/dojo/dijit/form/nls/Textarea.js
@@ -1,1 +1,1 @@
-({"iframeTitle1": "edit area", "iframeTitle2": "edit area frame"})
\ No newline at end of file
+({"iframeEditTitle":"edit area","iframeFocusTitle":"edit area frame"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/cs/ComboBox.js b/js/dojo/dijit/form/nls/cs/ComboBox.js
--- a/js/dojo/dijit/form/nls/cs/ComboBox.js
+++ b/js/dojo/dijit/form/nls/cs/ComboBox.js
@@ -1,1 +1,1 @@
-({"previousMessage": "Předchozí volby", "nextMessage": "Další volby"})
\ No newline at end of file
+({"previousMessage":"Předchozí volby","nextMessage":"Další volby"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/cs/Textarea.js b/js/dojo/dijit/form/nls/cs/Textarea.js
--- a/js/dojo/dijit/form/nls/cs/Textarea.js
+++ b/js/dojo/dijit/form/nls/cs/Textarea.js
@@ -1,1 +1,1 @@
-({"iframeTitle1": "oblast úprav", "iframeTitle2": "rámec oblasti úprav"})
\ No newline at end of file
+({"iframeEditTitle":"oblast úprav","iframeFocusTitle":"rámec oblasti úprav"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/cs/validate.js b/js/dojo/dijit/form/nls/cs/validate.js
--- a/js/dojo/dijit/form/nls/cs/validate.js
+++ b/js/dojo/dijit/form/nls/cs/validate.js
@@ -1,1 +1,1 @@
-({"rangeMessage": "* Tato hodnota je mimo rozsah.", "invalidMessage": "* Zadaná hodnota není platná.", "missingMessage": "* Tato hodnota je vyžadována."})
\ No newline at end of file
+({"rangeMessage":"Tato hodnota je mimo rozsah.","invalidMessage":"Zadaná hodnota není platná.","missingMessage":"Tato hodnota je vyžadována."})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/de/ComboBox.js b/js/dojo/dijit/form/nls/de/ComboBox.js
--- a/js/dojo/dijit/form/nls/de/ComboBox.js
+++ b/js/dojo/dijit/form/nls/de/ComboBox.js
@@ -1,1 +1,1 @@
-({"previousMessage": "Vorherige Auswahl", "nextMessage": "Weitere Auswahlmöglichkeiten"})
\ No newline at end of file
+({"previousMessage":"Vorherige Auswahl","nextMessage":"Weitere Auswahlmöglichkeiten"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/de/Textarea.js b/js/dojo/dijit/form/nls/de/Textarea.js
--- a/js/dojo/dijit/form/nls/de/Textarea.js
+++ b/js/dojo/dijit/form/nls/de/Textarea.js
@@ -1,1 +1,1 @@
-({"iframeTitle1": "Editierbereich", "iframeTitle2": "Rahmen für Editierbereich"})
\ No newline at end of file
+({"iframeEditTitle":"Editierbereich","iframeFocusTitle":"Rahmen für Editierbereich"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/de/validate.js b/js/dojo/dijit/form/nls/de/validate.js
--- a/js/dojo/dijit/form/nls/de/validate.js
+++ b/js/dojo/dijit/form/nls/de/validate.js
@@ -1,1 +1,1 @@
-({"rangeMessage": "* Dieser Wert ist außerhalb des gültigen Bereichs. ", "invalidMessage": "* Der eingegebene Wert ist ungültig. ", "missingMessage": "* Dieser Wert ist erforderlich."})
\ No newline at end of file
+({"rangeMessage":"Dieser Wert liegt außerhalb des gültigen Bereichs. ","invalidMessage":"Der eingegebene Wert ist ungültig. ","missingMessage":"Dieser Wert ist erforderlich."})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/es/ComboBox.js b/js/dojo/dijit/form/nls/es/ComboBox.js
--- a/js/dojo/dijit/form/nls/es/ComboBox.js
+++ b/js/dojo/dijit/form/nls/es/ComboBox.js
@@ -1,1 +1,1 @@
-({"previousMessage": "Opciones anteriores", "nextMessage": "Más opciones"})
\ No newline at end of file
+({"previousMessage":"Opciones anteriores","nextMessage":"Más opciones"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/es/Textarea.js b/js/dojo/dijit/form/nls/es/Textarea.js
--- a/js/dojo/dijit/form/nls/es/Textarea.js
+++ b/js/dojo/dijit/form/nls/es/Textarea.js
@@ -1,1 +1,1 @@
-({"iframeTitle1": "área de edición", "iframeTitle2": "marco del área de edición"})
\ No newline at end of file
+({"iframeEditTitle":"área de edición","iframeFocusTitle":"marco del área de edición"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/es/validate.js b/js/dojo/dijit/form/nls/es/validate.js
--- a/js/dojo/dijit/form/nls/es/validate.js
+++ b/js/dojo/dijit/form/nls/es/validate.js
@@ -1,1 +1,1 @@
-({"rangeMessage": "* Este valor está fuera del intervalo.", "invalidMessage": "* El valor especificado no es válido.", "missingMessage": "* Este valor es necesario."})
\ No newline at end of file
+({"rangeMessage":"Este valor está fuera del intervalo.","invalidMessage":"El valor especificado no es válido.","missingMessage":"Este valor es necesario."})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/fr/ComboBox.js b/js/dojo/dijit/form/nls/fr/ComboBox.js
--- a/js/dojo/dijit/form/nls/fr/ComboBox.js
+++ b/js/dojo/dijit/form/nls/fr/ComboBox.js
@@ -1,1 +1,1 @@
-({"previousMessage": "Choix précédents", "nextMessage": "Plus de choix"})
\ No newline at end of file
+({"previousMessage":"Choix précédents","nextMessage":"Plus de choix"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/fr/Textarea.js b/js/dojo/dijit/form/nls/fr/Textarea.js
--- a/js/dojo/dijit/form/nls/fr/Textarea.js
+++ b/js/dojo/dijit/form/nls/fr/Textarea.js
@@ -1,1 +1,1 @@
-({"iframeTitle1": "zone d'édition", "iframeTitle2": "cadre de la zone d'édition"})
\ No newline at end of file
+({"iframeEditTitle":"zone d'édition","iframeFocusTitle":"cadre de la zone d'édition"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/fr/validate.js b/js/dojo/dijit/form/nls/fr/validate.js
--- a/js/dojo/dijit/form/nls/fr/validate.js
+++ b/js/dojo/dijit/form/nls/fr/validate.js
@@ -1,1 +1,1 @@
-({"rangeMessage": "* Cette valeur n'est pas comprise dans la plage autorisée. ", "invalidMessage": "* La valeur indiquée n'est pas correcte. ", "missingMessage": "* Cette valeur est requise. "})
\ No newline at end of file
+({"rangeMessage":"Cette valeur n'est pas comprise dans la plage autorisée.","invalidMessage":"La valeur indiquée n'est pas correcte.","missingMessage":"Cette valeur est requise."})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/hu/ComboBox.js b/js/dojo/dijit/form/nls/hu/ComboBox.js
--- a/js/dojo/dijit/form/nls/hu/ComboBox.js
+++ b/js/dojo/dijit/form/nls/hu/ComboBox.js
@@ -1,1 +1,1 @@
-({"previousMessage": "Előző menüpontok", "nextMessage": "További menüpontok"})
\ No newline at end of file
+({"previousMessage":"Előző menüpontok","nextMessage":"További menüpontok"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/hu/Textarea.js b/js/dojo/dijit/form/nls/hu/Textarea.js
--- a/js/dojo/dijit/form/nls/hu/Textarea.js
+++ b/js/dojo/dijit/form/nls/hu/Textarea.js
@@ -1,1 +1,1 @@
-({"iframeTitle1": "szerkesztési terület", "iframeTitle2": "szerkesztési terület keret"})
\ No newline at end of file
+({"iframeEditTitle":"szerkesztési terület","iframeFocusTitle":"szerkesztési terület keret"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/hu/validate.js b/js/dojo/dijit/form/nls/hu/validate.js
--- a/js/dojo/dijit/form/nls/hu/validate.js
+++ b/js/dojo/dijit/form/nls/hu/validate.js
@@ -1,1 +1,1 @@
-({"rangeMessage": "* Az érték kívül van a megengedett tartományon. ", "invalidMessage": "* A megadott érték érvénytelen. ", "missingMessage": "* Meg kell adni egy értéket. "})
\ No newline at end of file
+({"rangeMessage":"Az érték kívül van a megengedett tartományon.","invalidMessage":"A megadott érték érvénytelen.","missingMessage":"Meg kell adni egy értéket."})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/it/ComboBox.js b/js/dojo/dijit/form/nls/it/ComboBox.js
--- a/js/dojo/dijit/form/nls/it/ComboBox.js
+++ b/js/dojo/dijit/form/nls/it/ComboBox.js
@@ -1,1 +1,1 @@
-({"previousMessage": "Scelte precedenti", "nextMessage": "Altre scelte"})
\ No newline at end of file
+({"previousMessage":"Scelte precedenti","nextMessage":"Altre scelte"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/it/Textarea.js b/js/dojo/dijit/form/nls/it/Textarea.js
--- a/js/dojo/dijit/form/nls/it/Textarea.js
+++ b/js/dojo/dijit/form/nls/it/Textarea.js
@@ -1,1 +1,1 @@
-({"iframeTitle1": "modifica area", "iframeTitle2": "modifica frame area"})
\ No newline at end of file
+({"iframeEditTitle":"modifica area","iframeFocusTitle":"modifica frame area"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/it/validate.js b/js/dojo/dijit/form/nls/it/validate.js
--- a/js/dojo/dijit/form/nls/it/validate.js
+++ b/js/dojo/dijit/form/nls/it/validate.js
@@ -1,1 +1,1 @@
-({"rangeMessage": "* Questo valore non è compreso nell'intervallo.", "invalidMessage": "* Il valore immesso non è valido.", "missingMessage": "* Questo valore è obbligatorio."})
\ No newline at end of file
+({"rangeMessage":"Questo valore non è compreso nell'intervallo.","invalidMessage":"Il valore immesso non è valido.","missingMessage":"Questo valore è obbligatorio."})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/ja/ComboBox.js b/js/dojo/dijit/form/nls/ja/ComboBox.js
--- a/js/dojo/dijit/form/nls/ja/ComboBox.js
+++ b/js/dojo/dijit/form/nls/ja/ComboBox.js
@@ -1,1 +1,1 @@
-({"previousMessage": "以前の選択項目", "nextMessage": "追加の選択項目"})
\ No newline at end of file
+({"previousMessage":"以前の選択項目","nextMessage":"追加の選択項目"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/ja/Textarea.js b/js/dojo/dijit/form/nls/ja/Textarea.js
--- a/js/dojo/dijit/form/nls/ja/Textarea.js
+++ b/js/dojo/dijit/form/nls/ja/Textarea.js
@@ -1,1 +1,1 @@
-({"iframeTitle1": "編集域", "iframeTitle2": "編集域フレーム"})
\ No newline at end of file
+({"iframeEditTitle":"編集域","iframeFocusTitle":"編集域フレーム"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/ja/validate.js b/js/dojo/dijit/form/nls/ja/validate.js
--- a/js/dojo/dijit/form/nls/ja/validate.js
+++ b/js/dojo/dijit/form/nls/ja/validate.js
@@ -1,1 +1,1 @@
-({"rangeMessage": "* この値は範囲外です。", "invalidMessage": "* 入力した値は無効です。", "missingMessage": "* この値は必須です。"})
\ No newline at end of file
+({"rangeMessage":"この値は範囲外です。","invalidMessage":"入力した値は無効です。","missingMessage":"この値は必須です。"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/ko/ComboBox.js b/js/dojo/dijit/form/nls/ko/ComboBox.js
--- a/js/dojo/dijit/form/nls/ko/ComboBox.js
+++ b/js/dojo/dijit/form/nls/ko/ComboBox.js
@@ -1,1 +1,1 @@
-({"previousMessage": "이전 선택사항", "nextMessage": "기타 선택사항"})
\ No newline at end of file
+({"previousMessage":"이전 선택사항","nextMessage":"기타 선택사항"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/ko/Textarea.js b/js/dojo/dijit/form/nls/ko/Textarea.js
--- a/js/dojo/dijit/form/nls/ko/Textarea.js
+++ b/js/dojo/dijit/form/nls/ko/Textarea.js
@@ -1,1 +1,1 @@
-({"iframeTitle1": "편집 영역", "iframeTitle2": "편집 영역 프레임"})
\ No newline at end of file
+({"iframeEditTitle":"편집 영역","iframeFocusTitle":"편집 영역 프레임"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/ko/validate.js b/js/dojo/dijit/form/nls/ko/validate.js
--- a/js/dojo/dijit/form/nls/ko/validate.js
+++ b/js/dojo/dijit/form/nls/ko/validate.js
@@ -1,1 +1,1 @@
-({"rangeMessage": "* 이 값은 범위를 벗어납니다. ", "invalidMessage": "* 입력한 값이 유효하지 않습니다. ", "missingMessage": "* 이 값은 필수입니다. "})
\ No newline at end of file
+({"rangeMessage":"이 값은 범위를 벗어납니다.","invalidMessage":"입력된 값이 올바르지 않습니다.","missingMessage":"이 값은 필수입니다."})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/pl/ComboBox.js b/js/dojo/dijit/form/nls/pl/ComboBox.js
--- a/js/dojo/dijit/form/nls/pl/ComboBox.js
+++ b/js/dojo/dijit/form/nls/pl/ComboBox.js
@@ -1,1 +1,1 @@
-({"previousMessage": "Poprzednie wybory", "nextMessage": "Więcej wyborów"})
\ No newline at end of file
+({"previousMessage":"Poprzednie wybory","nextMessage":"Więcej wyborów"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/pl/Textarea.js b/js/dojo/dijit/form/nls/pl/Textarea.js
--- a/js/dojo/dijit/form/nls/pl/Textarea.js
+++ b/js/dojo/dijit/form/nls/pl/Textarea.js
@@ -1,1 +1,1 @@
-({"iframeTitle1": "edycja obszaru", "iframeTitle2": "edycja ramki obszaru"})
\ No newline at end of file
+({"iframeEditTitle":"Obszar edycji","iframeFocusTitle":"Ramka obszaru edycji"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/pl/validate.js b/js/dojo/dijit/form/nls/pl/validate.js
--- a/js/dojo/dijit/form/nls/pl/validate.js
+++ b/js/dojo/dijit/form/nls/pl/validate.js
@@ -1,1 +1,1 @@
-({"rangeMessage": "* Ta wartość jest spoza zakresu.", "invalidMessage": "* Wprowadzona wartość nie jest poprawna.", "missingMessage": "* Ta wartość jest wymagana."})
\ No newline at end of file
+({"rangeMessage":"Ta wartość jest spoza zakresu.","invalidMessage":"Wprowadzona wartość jest niepoprawna.","missingMessage":"Ta wartość jest wymagana."})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/pt/ComboBox.js b/js/dojo/dijit/form/nls/pt/ComboBox.js
--- a/js/dojo/dijit/form/nls/pt/ComboBox.js
+++ b/js/dojo/dijit/form/nls/pt/ComboBox.js
@@ -1,1 +1,1 @@
-({"previousMessage": "Opções anteriores", "nextMessage": "Mais opções"})
\ No newline at end of file
+({"previousMessage":"Opções anteriores","nextMessage":"Mais opções"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/pt/Textarea.js b/js/dojo/dijit/form/nls/pt/Textarea.js
--- a/js/dojo/dijit/form/nls/pt/Textarea.js
+++ b/js/dojo/dijit/form/nls/pt/Textarea.js
@@ -1,1 +1,1 @@
-({"iframeTitle1": "área de edição", "iframeTitle2": "quadro da área de edição"})
\ No newline at end of file
+({"iframeEditTitle":"editar área","iframeFocusTitle":"editar quadro da área"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/pt/validate.js b/js/dojo/dijit/form/nls/pt/validate.js
--- a/js/dojo/dijit/form/nls/pt/validate.js
+++ b/js/dojo/dijit/form/nls/pt/validate.js
@@ -1,1 +1,1 @@
-({"rangeMessage": "* Esse valor está fora do intervalo.", "invalidMessage": "* O valor digitado não é válido.", "missingMessage": "* Esse valor é necessário."})
\ No newline at end of file
+({"rangeMessage":"Este valor está fora do intervalo. ","invalidMessage":"O valor inserido não é válido.","missingMessage":"Este valor é necessário."})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/ru/ComboBox.js b/js/dojo/dijit/form/nls/ru/ComboBox.js
--- a/js/dojo/dijit/form/nls/ru/ComboBox.js
+++ b/js/dojo/dijit/form/nls/ru/ComboBox.js
@@ -1,1 +1,1 @@
-({"previousMessage": "Предыдущие варианты", "nextMessage": "Следующие варианты"})
\ No newline at end of file
+({"previousMessage":"Предыдущие варианты","nextMessage":"Следующие варианты"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/ru/Textarea.js b/js/dojo/dijit/form/nls/ru/Textarea.js
--- a/js/dojo/dijit/form/nls/ru/Textarea.js
+++ b/js/dojo/dijit/form/nls/ru/Textarea.js
@@ -1,1 +1,1 @@
-({"iframeTitle1": "область редактирования", "iframeTitle2": "фрейм области редактирования"})
\ No newline at end of file
+({"iframeEditTitle":"область редактирования","iframeFocusTitle":"фрейм области редактирования"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/ru/validate.js b/js/dojo/dijit/form/nls/ru/validate.js
--- a/js/dojo/dijit/form/nls/ru/validate.js
+++ b/js/dojo/dijit/form/nls/ru/validate.js
@@ -1,1 +1,1 @@
-({"rangeMessage": "* Это значение вне диапазона.", "invalidMessage": "* Указано недопустимое значение.", "missingMessage": "* Это обязательное значение."})
\ No newline at end of file
+({"rangeMessage":"Это значение вне диапазона.","invalidMessage":"Указано недопустимое значение.","missingMessage":"Это обязательное значение."})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/validate.js b/js/dojo/dijit/form/nls/validate.js
--- a/js/dojo/dijit/form/nls/validate.js
+++ b/js/dojo/dijit/form/nls/validate.js
@@ -1,1 +1,1 @@
-({"rangeMessage": "* This value is out of range.", "invalidMessage": "* The value entered is not valid.", "missingMessage": "* This value is required."})
\ No newline at end of file
+({"rangeMessage":"This value is out of range.","invalidMessage":"The value entered is not valid.","missingMessage":"This value is required."})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/zh-tw/ComboBox.js b/js/dojo/dijit/form/nls/zh-tw/ComboBox.js
--- a/js/dojo/dijit/form/nls/zh-tw/ComboBox.js
+++ b/js/dojo/dijit/form/nls/zh-tw/ComboBox.js
@@ -1,1 +1,1 @@
-({"previousMessage": "前一個選擇項", "nextMessage": "其他選擇項"})
\ No newline at end of file
+({"previousMessage":"前一個選擇項","nextMessage":"其他選擇項"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/zh-tw/Textarea.js b/js/dojo/dijit/form/nls/zh-tw/Textarea.js
--- a/js/dojo/dijit/form/nls/zh-tw/Textarea.js
+++ b/js/dojo/dijit/form/nls/zh-tw/Textarea.js
@@ -1,1 +1,1 @@
-({"iframeTitle1": "編輯區", "iframeTitle2": "編輯區框"})
\ No newline at end of file
+({"iframeEditTitle":"編輯區","iframeFocusTitle":"編輯區框"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/zh-tw/validate.js b/js/dojo/dijit/form/nls/zh-tw/validate.js
--- a/js/dojo/dijit/form/nls/zh-tw/validate.js
+++ b/js/dojo/dijit/form/nls/zh-tw/validate.js
@@ -1,1 +1,1 @@
-({"rangeMessage": "* 此值超出範圍。", "invalidMessage": "* 輸入的值無效。", "missingMessage": "* 必須提供此值。"})
\ No newline at end of file
+({"rangeMessage":"此值超出範圍。","invalidMessage":"輸入的值無效。","missingMessage":"必須提供此值。"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/zh/ComboBox.js b/js/dojo/dijit/form/nls/zh/ComboBox.js
--- a/js/dojo/dijit/form/nls/zh/ComboBox.js
+++ b/js/dojo/dijit/form/nls/zh/ComboBox.js
@@ -1,1 +1,1 @@
-({"previousMessage": "先前选项", "nextMessage": "更多选项"})
\ No newline at end of file
+({"previousMessage":"先前选项","nextMessage":"更多选项"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/zh/Textarea.js b/js/dojo/dijit/form/nls/zh/Textarea.js
--- a/js/dojo/dijit/form/nls/zh/Textarea.js
+++ b/js/dojo/dijit/form/nls/zh/Textarea.js
@@ -1,1 +1,1 @@
-({"iframeTitle1": "编辑区", "iframeTitle2": "编辑区框架"})
\ No newline at end of file
+({"iframeEditTitle":"编辑区","iframeFocusTitle":"编辑区框架"})
\ No newline at end of file
diff --git a/js/dojo/dijit/form/nls/zh/validate.js b/js/dojo/dijit/form/nls/zh/validate.js
--- a/js/dojo/dijit/form/nls/zh/validate.js
+++ b/js/dojo/dijit/form/nls/zh/validate.js
@@ -1,1 +1,1 @@
-({"rangeMessage": "* 此值超出范围。", "invalidMessage": "* 输入的值无效。", "missingMessage": "* 此值是必需值。"})
\ No newline at end of file
+({"rangeMessage":"此值超出范围。","invalidMessage":"输入的值无效。","missingMessage":"此值是必需值。"})
\ No newline at end of file
diff --git a/js/dojo/dijit/layout/AccordionContainer.js b/js/dojo/dijit/layout/AccordionContainer.js
--- a/js/dojo/dijit/layout/AccordionContainer.js
+++ b/js/dojo/dijit/layout/AccordionContainer.js
@@ -1,209 +1,171 @@
-if(!dojo._hasResource["dijit.layout.AccordionContainer"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.layout.AccordionContainer"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit.layout.AccordionContainer"]){
+dojo._hasResource["dijit.layout.AccordionContainer"]=true;
dojo.provide("dijit.layout.AccordionContainer");
-
dojo.require("dojo.fx");
-
dojo.require("dijit._Container");
dojo.require("dijit._Templated");
dojo.require("dijit.layout.StackContainer");
dojo.require("dijit.layout.ContentPane");
-
-dojo.declare(
- "dijit.layout.AccordionContainer",
- dijit.layout.StackContainer,
- {
- // summary:
- // Holds a set of panes where every pane's title is visible, but only one pane's content is visible at a time,
- // and switching between panes is visualized by sliding the other panes up/down.
- // usage:
- // <div dojoType="dijit.layout.AccordionContainer">
- // <div dojoType="dijit.layout.AccordionPane" title="pane 1">
- // <div dojoType="dijit.layout.ContentPane">...</div>
- // </div>
- // <div dojoType="dijit.layout.AccordionPane" title="pane 2">
- // <p>This is some text</p>
- // ...
- // </div>
-
- // duration: Integer
- // Amount of time (in ms) it takes to slide panes
- duration: 250,
-
- _verticalSpace: 0,
-
- postCreate: function(){
- this.domNode.style.overflow="hidden";
- this.inherited("postCreate",arguments);
- dijit.setWaiRole(this.domNode, "tablist");
- dojo.addClass(this.domNode,"dijitAccordionContainer");
- },
-
- startup: function(){
- if(this._started){ return; }
- this.inherited("startup",arguments);
- if(this.selectedChildWidget){
- var style = this.selectedChildWidget.containerNode.style;
- style.display = "";
- style.overflow = "auto";
- this.selectedChildWidget._setSelectedState(true);
- }
- },
-
- layout: function(){
- // summary
- // Set the height of the open pane based on what room remains
- // get cumulative height of all the title bars, and figure out which pane is open
- var totalCollapsedHeight = 0;
- var openPane = this.selectedChildWidget;
- dojo.forEach(this.getChildren(), function(child){
- totalCollapsedHeight += child.getTitleHeight();
- });
- var mySize = this._contentBox;
- this._verticalSpace = (mySize.h - totalCollapsedHeight);
- if(openPane){
- openPane.containerNode.style.height = this._verticalSpace + "px";
-/***
-TODO: this is wrong. probably you wanted to call resize on the SplitContainer
-inside the AccordionPane??
- if(openPane.resize){
- openPane.resize({h: this._verticalSpace});
- }
-***/
- }
- },
-
- _setupChild: function(/*Widget*/ page){
- // Summary: prepare the given child
- return page;
- },
-
- _transition: function(/*Widget?*/newWidget, /*Widget?*/oldWidget){
-//TODO: should be able to replace this with calls to slideIn/slideOut
- if(this._inTransition){ return; }
- this._inTransition = true;
- var animations = [];
- var paneHeight = this._verticalSpace;
- if(newWidget){
- newWidget.setSelected(true);
- var newContents = newWidget.containerNode;
- newContents.style.display = "";
-
- animations.push(dojo.animateProperty({
- node: newContents,
- duration: this.duration,
- properties: {
- height: { start: "1", end: paneHeight }
- },
- onEnd: function(){
- newContents.style.overflow = "auto";
- }
- }));
- }
- if(oldWidget){
- oldWidget.setSelected(false);
- var oldContents = oldWidget.containerNode;
- oldContents.style.overflow = "hidden";
- animations.push(dojo.animateProperty({
- node: oldContents,
- duration: this.duration,
- properties: {
- height: { start: paneHeight, end: "1" }
- },
- onEnd: function(){
- oldContents.style.display = "none";
- }
- }));
- }
-
- this._inTransition = false;
-
- dojo.fx.combine(animations).play();
- },
-
- // note: we are treating the container as controller here
- _onKeyPress: function(/*Event*/ e){
- if(this.disabled || e.altKey ){ return; }
- var k = dojo.keys;
- switch(e.keyCode){
- case k.LEFT_ARROW:
- case k.UP_ARROW:
- case k.PAGE_UP:
- this._adjacent(false)._onTitleClick();
- dojo.stopEvent(e);
- break;
- case k.RIGHT_ARROW:
- case k.DOWN_ARROW:
- case k.PAGE_DOWN:
- this._adjacent(true)._onTitleClick();
- dojo.stopEvent(e);
- break;
- default:
- if(e.ctrlKey && e.keyCode == k.TAB){
- this._adjacent(e._dijitWidget, !e.shiftKey)._onTitleClick();
- dojo.stopEvent(e);
- }
-
- }
- }
- }
-);
-
-dojo.declare(
- "dijit.layout.AccordionPane",
- [dijit.layout.ContentPane, dijit._Templated, dijit._Contained],
-{
- // summary
- // AccordionPane is a ContentPane with a title that may contain another widget.
- // Nested layout widgets, such as SplitContainer, are not supported at this time.
-
- templateString:"<div class='dijitAccordionPane'\n\t><div dojoAttachPoint='titleNode,focusNode' dojoAttachEvent='ondijitclick:_onTitleClick,onkeypress:_onTitleKeyPress,onfocus:_handleFocus,onblur:_handleFocus'\n\t\tclass='dijitAccordionTitle' wairole=\"tab\"\n\t\t><div class='dijitAccordionArrow'></div\n\t\t><div class='arrowTextUp' waiRole=\"presentation\">&#9650;</div\n\t\t><div class='arrowTextDown' waiRole=\"presentation\">&#9660;</div\n\t\t><div dojoAttachPoint='titleTextNode' class='dijitAccordionText'>${title}</div></div\n\t><div><div dojoAttachPoint='containerNode' style='overflow: hidden; height: 1px; display: none'\n\t\tclass='dijitAccordionBody' wairole=\"tabpanel\"\n\t></div></div>\n</div>\n",
-
- postCreate: function(){
- this.inherited("postCreate",arguments)
- dojo.setSelectable(this.titleNode, false);
- this.setSelected(this.selected);
- },
-
- getTitleHeight: function(){
- // summary: returns the height of the title dom node
- return dojo.marginBox(this.titleNode).h; // Integer
- },
-
- _onTitleClick: function(){
- // summary: callback when someone clicks my title
- var parent = this.getParent();
- if(!parent._inTransition){
- parent.selectChild(this);
- dijit.focus(this.focusNode);
- }
- },
-
- _onTitleKeyPress: function(/*Event*/ evt){
- evt._dijitWidget = this;
- return this.getParent()._onKeyPress(evt);
- },
-
- _setSelectedState: function(/*Boolean*/ isSelected){
- this.selected = isSelected;
- dojo[(isSelected ? "addClass" : "removeClass")](this.domNode,"dijitAccordionPane-selected");
- this.focusNode.setAttribute("tabIndex", isSelected ? "0" : "-1");
- },
-
- _handleFocus: function(/*Event*/e){
- // summary: handle the blur and focus state of this widget
- dojo[(e.type=="focus" ? "addClass" : "removeClass")](this.focusNode,"dijitAccordionPaneFocused");
- },
-
- setSelected: function(/*Boolean*/ isSelected){
- // summary: change the selected state on this pane
- this._setSelectedState(isSelected);
- if(isSelected){ this.onSelected(); }
- },
-
- onSelected: function(){
- // summary: called when this pane is selected
- }
+dojo.require("dijit.layout.AccordionPane");
+dojo.declare("dijit.layout.AccordionContainer",dijit.layout.StackContainer,{duration:dijit.defaultDuration,buttonWidget:"dijit.layout._AccordionButton",_verticalSpace:0,baseClass:"dijitAccordionContainer",postCreate:function(){
+this.domNode.style.overflow="hidden";
+this.inherited(arguments);
+dijit.setWaiRole(this.domNode,"tablist");
+},startup:function(){
+if(this._started){
+return;
+}
+this.inherited(arguments);
+if(this.selectedChildWidget){
+var _1=this.selectedChildWidget.containerNode.style;
+_1.display="";
+_1.overflow="auto";
+this.selectedChildWidget._buttonWidget._setSelectedState(true);
+}
+},_getTargetHeight:function(_2){
+var cs=dojo.getComputedStyle(_2);
+return Math.max(this._verticalSpace-dojo._getPadBorderExtents(_2,cs).h,0);
+},layout:function(){
+var _3=this.selectedChildWidget;
+var _4=0;
+dojo.forEach(this.getChildren(),function(_5){
+_4+=_5._buttonWidget.getTitleHeight();
+});
+var _6=this._contentBox;
+this._verticalSpace=_6.h-_4;
+this._containerContentBox={h:this._verticalSpace,w:_6.w};
+if(_3){
+_3.resize(this._containerContentBox);
+}
+},_setupChild:function(_7){
+var _8=dojo.getObject(this.buttonWidget);
+var _9=(_7._buttonWidget=new _8({contentWidget:_7,label:_7.title,title:_7.tooltip,iconClass:_7.iconClass,id:_7.id+"_button",parent:this}));
+_7._accordionConnectHandle=this.connect(_7,"attr",function(_a,_b){
+if(arguments.length==2){
+switch(_a){
+case "title":
+case "iconClass":
+_9.attr(_a,_b);
+}
+}
+});
+dojo.place(_7._buttonWidget.domNode,_7.domNode,"before");
+this.inherited(arguments);
+},removeChild:function(_c){
+this.disconnect(_c._accordionConnectHandle);
+delete _c._accordionConnectHandle;
+_c._buttonWidget.destroy();
+delete _c._buttonWidget;
+this.inherited(arguments);
+},getChildren:function(){
+return dojo.filter(this.inherited(arguments),function(_d){
+return _d.declaredClass!=this.buttonWidget;
+},this);
+},destroy:function(){
+dojo.forEach(this.getChildren(),function(_e){
+_e._buttonWidget.destroy();
});
-
+this.inherited(arguments);
+},_transition:function(_f,_10){
+if(this._inTransition){
+return;
+}
+this._inTransition=true;
+var _11=[];
+var _12=this._verticalSpace;
+if(_f){
+_f._buttonWidget.setSelected(true);
+this._showChild(_f);
+if(this.doLayout&&_f.resize){
+_f.resize(this._containerContentBox);
+}
+var _13=_f.domNode;
+dojo.addClass(_13,"dijitVisible");
+dojo.removeClass(_13,"dijitHidden");
+var _14=_13.style.overflow;
+_13.style.overflow="hidden";
+_11.push(dojo.animateProperty({node:_13,duration:this.duration,properties:{height:{start:1,end:this._getTargetHeight(_13)}},onEnd:dojo.hitch(this,function(){
+_13.style.overflow=_14;
+delete this._inTransition;
+})}));
+}
+if(_10){
+_10._buttonWidget.setSelected(false);
+var _15=_10.domNode,_16=_15.style.overflow;
+_15.style.overflow="hidden";
+_11.push(dojo.animateProperty({node:_15,duration:this.duration,properties:{height:{start:this._getTargetHeight(_15),end:1}},onEnd:function(){
+dojo.addClass(_15,"dijitHidden");
+dojo.removeClass(_15,"dijitVisible");
+_15.style.overflow=_16;
+if(_10.onHide){
+_10.onHide();
+}
+}}));
+}
+dojo.fx.combine(_11).play();
+},_onKeyPress:function(e,_17){
+if(this._inTransition||this.disabled||e.altKey||!(_17||e.ctrlKey)){
+if(this._inTransition){
+dojo.stopEvent(e);
+}
+return;
}
+var k=dojo.keys,c=e.charOrCode;
+if((_17&&(c==k.LEFT_ARROW||c==k.UP_ARROW))||(e.ctrlKey&&c==k.PAGE_UP)){
+this._adjacent(false)._buttonWidget._onTitleClick();
+dojo.stopEvent(e);
+}else{
+if((_17&&(c==k.RIGHT_ARROW||c==k.DOWN_ARROW))||(e.ctrlKey&&(c==k.PAGE_DOWN||c==k.TAB))){
+this._adjacent(true)._buttonWidget._onTitleClick();
+dojo.stopEvent(e);
+}
+}
+}});
+dojo.declare("dijit.layout._AccordionButton",[dijit._Widget,dijit._Templated],{templateString:dojo.cache("dijit.layout","templates/AccordionButton.html","<div dojoAttachPoint='titleNode,focusNode' dojoAttachEvent='ondijitclick:_onTitleClick,onkeypress:_onTitleKeyPress,onfocus:_handleFocus,onblur:_handleFocus,onmouseenter:_onTitleEnter,onmouseleave:_onTitleLeave'\n\t\tclass='dijitAccordionTitle' wairole=\"tab\" waiState=\"expanded-false\"\n\t\t><span class='dijitInline dijitAccordionArrow' waiRole=\"presentation\"></span\n\t\t><span class='arrowTextUp' waiRole=\"presentation\">+</span\n\t\t><span class='arrowTextDown' waiRole=\"presentation\">-</span\n\t\t><img src=\"${_blankGif}\" alt=\"\" dojoAttachPoint='iconNode' style=\"vertical-align: middle\" waiRole=\"presentation\"/>\n\t\t<span waiRole=\"presentation\" dojoAttachPoint='titleTextNode' class='dijitAccordionText'></span>\n</div>\n"),attributeMap:dojo.mixin(dojo.clone(dijit.layout.ContentPane.prototype.attributeMap),{label:{node:"titleTextNode",type:"innerHTML"},title:{node:"titleTextNode",type:"attribute",attribute:"title"},iconClass:{node:"iconNode",type:"class"}}),baseClass:"dijitAccordionTitle",getParent:function(){
+return this.parent;
+},postCreate:function(){
+this.inherited(arguments);
+dojo.setSelectable(this.domNode,false);
+this.setSelected(this.selected);
+var _18=dojo.attr(this.domNode,"id").replace(" ","_");
+dojo.attr(this.titleTextNode,"id",_18+"_title");
+dijit.setWaiState(this.focusNode,"labelledby",dojo.attr(this.titleTextNode,"id"));
+},getTitleHeight:function(){
+return dojo.marginBox(this.titleNode).h;
+},_onTitleClick:function(){
+var _19=this.getParent();
+if(!_19._inTransition){
+_19.selectChild(this.contentWidget);
+dijit.focus(this.focusNode);
+}
+},_onTitleEnter:function(){
+dojo.addClass(this.focusNode,"dijitAccordionTitle-hover");
+},_onTitleLeave:function(){
+dojo.removeClass(this.focusNode,"dijitAccordionTitle-hover");
+},_onTitleKeyPress:function(evt){
+return this.getParent()._onKeyPress(evt,this.contentWidget);
+},_setSelectedState:function(_1a){
+this.selected=_1a;
+dojo[(_1a?"addClass":"removeClass")](this.titleNode,"dijitAccordionTitle-selected");
+dijit.setWaiState(this.focusNode,"expanded",_1a);
+dijit.setWaiState(this.focusNode,"selected",_1a);
+this.focusNode.setAttribute("tabIndex",_1a?"0":"-1");
+},_handleFocus:function(e){
+dojo.toggleClass(this.titleTextNode,"dijitAccordionFocused",e.type=="focus");
+},setSelected:function(_1b){
+this._setSelectedState(_1b);
+if(_1b){
+var cw=this.contentWidget;
+if(cw.onSelected){
+cw.onSelected();
+}
+}
+}});
+}
diff --git a/js/dojo/dijit/layout/ContentPane.js b/js/dojo/dijit/layout/ContentPane.js
--- a/js/dojo/dijit/layout/ContentPane.js
+++ b/js/dojo/dijit/layout/ContentPane.js
@@ -1,409 +1,291 @@
-if(!dojo._hasResource["dijit.layout.ContentPane"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.layout.ContentPane"] = true;
-dojo.provide("dijit.layout.ContentPane");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+if(!dojo._hasResource["dijit.layout.ContentPane"]){
+dojo._hasResource["dijit.layout.ContentPane"]=true;
+dojo.provide("dijit.layout.ContentPane");
dojo.require("dijit._Widget");
+dojo.require("dijit._Contained");
dojo.require("dijit.layout._LayoutWidget");
-
dojo.require("dojo.parser");
dojo.require("dojo.string");
-dojo.requireLocalization("dijit", "loading", null, "ko,zh,ja,zh-tw,ru,it,ROOT,hu,fr,pt,pl,es,de,cs");
-
-dojo.declare(
- "dijit.layout.ContentPane",
- dijit._Widget,
-{
- // summary:
- // A widget that acts as a Container for other widgets, and includes a ajax interface
- // description:
- // A widget that can be used as a standalone widget
- // or as a baseclass for other widgets
- // Handles replacement of document fragment using either external uri or javascript
- // generated markup or DOM content, instantiating widgets within that content.
- // Don't confuse it with an iframe, it only needs/wants document fragments.
- // It's useful as a child of LayoutContainer, SplitContainer, or TabContainer.
- // But note that those classes can contain any widget as a child.
- // example:
- // Some quick samples:
- // To change the innerHTML use .setContent('<b>new content</b>')
- //
- // Or you can send it a NodeList, .setContent(dojo.query('div [class=selected]', userSelection))
- // please note that the nodes in NodeList will copied, not moved
- //
- // To do a ajax update use .setHref('url')
- //
- // href: String
- // The href of the content that displays now.
- // Set this at construction if you want to load data externally when the
- // pane is shown. (Set preload=true to load it immediately.)
- // Changing href after creation doesn't have any effect; see setHref();
- href: "",
-
- // extractContent: Boolean
- // Extract visible content from inside of <body> .... </body>
- extractContent: false,
-
- // parseOnLoad: Boolean
- // parse content and create the widgets, if any
- parseOnLoad: true,
-
- // preventCache: Boolean
- // Cache content retreived externally
- preventCache: false,
-
- // preload: Boolean
- // Force load of data even if pane is hidden.
- preload: false,
-
- // refreshOnShow: Boolean
- // Refresh (re-download) content when pane goes from hidden to shown
- refreshOnShow: false,
-
- // loadingMessage: String
- // Message that shows while downloading
- loadingMessage: "<span class='dijitContentPaneLoading'>${loadingState}</span>",
-
- // errorMessage: String
- // Message that shows if an error occurs
- errorMessage: "<span class='dijitContentPaneError'>${errorState}</span>",
-
- // isLoaded: Boolean
- // Tells loading status see onLoad|onUnload for event hooks
- isLoaded: false,
-
- // class: String
- // Class name to apply to ContentPane dom nodes
- "class": "dijitContentPane",
-
- postCreate: function(){
- // remove the title attribute so it doesn't show up when i hover
- // over a node
- this.domNode.title = "";
-
- if(this.preload){
- this._loadCheck();
- }
-
- var messages = dojo.i18n.getLocalization("dijit", "loading", this.lang);
- this.loadingMessage = dojo.string.substitute(this.loadingMessage, messages);
- this.errorMessage = dojo.string.substitute(this.errorMessage, messages);
-
- // for programatically created ContentPane (with <span> tag), need to muck w/CSS
- // or it's as though overflow:visible is set
- dojo.addClass(this.domNode, this["class"]);
- },
-
- startup: function(){
- if(this._started){ return; }
- this._checkIfSingleChild();
- if(this._singleChild){
- this._singleChild.startup();
- }
- this._loadCheck();
- this._started = true;
- },
-
- _checkIfSingleChild: function(){
- // summary:
- // Test if we have exactly one widget as a child, and if so assume that we are a container for that widget,
- // and should propogate startup() and resize() calls to it.
- var childNodes = dojo.query(">", this.containerNode || this.domNode),
- childWidgets = childNodes.filter("[widgetId]");
-
- if(childNodes.length == 1 && childWidgets.length == 1){
- this.isContainer = true;
- this._singleChild = dijit.byNode(childWidgets[0]);
- }else{
- delete this.isContainer;
- delete this._singleChild;
- }
- },
-
- refresh: function(){
- // summary:
- // Force a refresh (re-download) of content, be sure to turn off cache
-
- // we return result of _prepareLoad here to avoid code dup. in dojox.layout.ContentPane
- return this._prepareLoad(true);
- },
-
- setHref: function(/*String|Uri*/ href){
- // summary:
- // Reset the (external defined) content of this pane and replace with new url
- // Note: It delays the download until widget is shown if preload is false
- // href:
- // url to the page you want to get, must be within the same domain as your mainpage
- this.href = href;
-
- // we return result of _prepareLoad here to avoid code dup. in dojox.layout.ContentPane
- return this._prepareLoad();
- },
-
- setContent: function(/*String|DomNode|Nodelist*/data){
- // summary:
- // Replaces old content with data content, include style classes from old content
- // data:
- // the new Content may be String, DomNode or NodeList
- //
- // if data is a NodeList (or an array of nodes) nodes are copied
- // so you can import nodes from another document implicitly
-
- // clear href so we cant run refresh and clear content
- // refresh should only work if we downloaded the content
- if(!this._isDownloaded){
- this.href = "";
- this._onUnloadHandler();
- }
-
- this._setContent(data || "");
-
- this._isDownloaded = false; // must be set after _setContent(..), pathadjust in dojox.layout.ContentPane
-
- if(this.parseOnLoad){
- this._createSubWidgets();
- }
-
- this._checkIfSingleChild();
- if(this._singleChild && this._singleChild.resize){
- this._singleChild.resize(this._contentBox);
- }
-
- this._onLoadHandler();
- },
-
- cancel: function(){
- // summary:
- // Cancels a inflight download of content
- if(this._xhrDfd && (this._xhrDfd.fired == -1)){
- this._xhrDfd.cancel();
- }
- delete this._xhrDfd; // garbage collect
- },
-
- destroy: function(){
- // if we have multiple controllers destroying us, bail after the first
- if(this._beingDestroyed){
- return;
- }
- // make sure we call onUnload
- this._onUnloadHandler();
- this._beingDestroyed = true;
- this.inherited("destroy",arguments);
- },
-
- resize: function(size){
- dojo.marginBox(this.domNode, size);
-
- // Compute content box size in case we [later] need to size child
- // If either height or width wasn't specified by the user, then query node for it.
- // But note that setting the margin box and then immediately querying dimensions may return
- // inaccurate results, so try not to depend on it.
- var node = this.containerNode || this.domNode,
- mb = dojo.mixin(dojo.marginBox(node), size||{});
-
- this._contentBox = dijit.layout.marginBox2contentBox(node, mb);
-
- // If we have a single widget child then size it to fit snugly within my borders
- if(this._singleChild && this._singleChild.resize){
- this._singleChild.resize(this._contentBox);
- }
- },
-
- _prepareLoad: function(forceLoad){
- // sets up for a xhrLoad, load is deferred until widget onShow
- // cancels a inflight download
- this.cancel();
- this.isLoaded = false;
- this._loadCheck(forceLoad);
- },
-
- _loadCheck: function(forceLoad){
- // call this when you change onShow (onSelected) status when selected in parent container
- // it's used as a trigger for href download when this.domNode.display != 'none'
-
- // sequence:
- // if no href -> bail
- // forceLoad -> always load
- // this.preload -> load when download not in progress, domNode display doesn't matter
- // this.refreshOnShow -> load when download in progress bails, domNode display !='none' AND
- // this.open !== false (undefined is ok), isLoaded doesn't matter
- // else -> load when download not in progress, if this.open !== false (undefined is ok) AND
- // domNode display != 'none', isLoaded must be false
-
- var displayState = ((this.open !== false) && (this.domNode.style.display != 'none'));
-
- if(this.href &&
- (forceLoad ||
- (this.preload && !this._xhrDfd) ||
- (this.refreshOnShow && displayState && !this._xhrDfd) ||
- (!this.isLoaded && displayState && !this._xhrDfd)
- )
- ){
- this._downloadExternalContent();
- }
- },
-
- _downloadExternalContent: function(){
- this._onUnloadHandler();
-
- // display loading message
- this._setContent(
- this.onDownloadStart.call(this)
- );
-
- var self = this;
- var getArgs = {
- preventCache: (this.preventCache || this.refreshOnShow),
- url: this.href,
- handleAs: "text"
- };
- if(dojo.isObject(this.ioArgs)){
- dojo.mixin(getArgs, this.ioArgs);
- }
-
- var hand = this._xhrDfd = (this.ioMethod || dojo.xhrGet)(getArgs);
-
- hand.addCallback(function(html){
- try{
- self.onDownloadEnd.call(self);
- self._isDownloaded = true;
- self.setContent.call(self, html); // onload event is called from here
- }catch(err){
- self._onError.call(self, 'Content', err); // onContentError
- }
- delete self._xhrDfd;
- return html;
- });
-
- hand.addErrback(function(err){
- if(!hand.cancelled){
- // show error message in the pane
- self._onError.call(self, 'Download', err); // onDownloadError
- }
- delete self._xhrDfd;
- return err;
- });
- },
-
- _onLoadHandler: function(){
- this.isLoaded = true;
- try{
- this.onLoad.call(this);
- }catch(e){
- console.error('Error '+this.widgetId+' running custom onLoad code');
- }
- },
-
- _onUnloadHandler: function(){
- this.isLoaded = false;
- this.cancel();
- try{
- this.onUnload.call(this);
- }catch(e){
- console.error('Error '+this.widgetId+' running custom onUnload code');
- }
- },
-
- _setContent: function(cont){
- this.destroyDescendants();
-
- try{
- var node = this.containerNode || this.domNode;
- while(node.firstChild){
- dojo._destroyElement(node.firstChild);
- }
- if(typeof cont == "string"){
- // dijit.ContentPane does only minimal fixes,
- // No pathAdjustments, script retrieval, style clean etc
- // some of these should be available in the dojox.layout.ContentPane
- if(this.extractContent){
- match = cont.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
- if(match){ cont = match[1]; }
- }
- node.innerHTML = cont;
- }else{
- // domNode or NodeList
- if(cont.nodeType){ // domNode (htmlNode 1 or textNode 3)
- node.appendChild(cont);
- }else{// nodelist or array such as dojo.Nodelist
- dojo.forEach(cont, function(n){
- node.appendChild(n.cloneNode(true));
- });
- }
- }
- }catch(e){
- // check if a domfault occurs when we are appending this.errorMessage
- // like for instance if domNode is a UL and we try append a DIV
- var errMess = this.onContentError(e);
- try{
- node.innerHTML = errMess;
- }catch(e){
- console.error('Fatal '+this.id+' could not change content due to '+e.message, e);
- }
- }
- },
-
- _onError: function(type, err, consoleText){
- // shows user the string that is returned by on[type]Error
- // overide on[type]Error and return your own string to customize
- var errText = this['on' + type + 'Error'].call(this, err);
- if(consoleText){
- console.error(consoleText, err);
- }else if(errText){// a empty string won't change current content
- this._setContent.call(this, errText);
- }
- },
-
- _createSubWidgets: function(){
- // summary: scan my contents and create subwidgets
- var rootNode = this.containerNode || this.domNode;
- try{
- dojo.parser.parse(rootNode, true);
- }catch(e){
- this._onError('Content', e, "Couldn't create widgets in "+this.id
- +(this.href ? " from "+this.href : ""));
- }
- },
-
- // EVENT's, should be overide-able
- onLoad: function(e){
- // summary:
- // Event hook, is called after everything is loaded and widgetified
- },
-
- onUnload: function(e){
- // summary:
- // Event hook, is called before old content is cleared
- },
-
- onDownloadStart: function(){
- // summary:
- // called before download starts
- // the string returned by this function will be the html
- // that tells the user we are loading something
- // override with your own function if you want to change text
- return this.loadingMessage;
- },
-
- onContentError: function(/*Error*/ error){
- // summary:
- // called on DOM faults, require fault etc in content
- // default is to display errormessage inside pane
- },
-
- onDownloadError: function(/*Error*/ error){
- // summary:
- // Called when download error occurs, default is to display
- // errormessage inside pane. Overide function to change that.
- // The string returned by this function will be the html
- // that tells the user a error happend
- return this.errorMessage;
- },
-
- onDownloadEnd: function(){
- // summary:
- // called when download is finished
- }
+dojo.require("dojo.html");
+dojo.requireLocalization("dijit","loading",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-tw");
+dojo.declare("dijit.layout.ContentPane",dijit._Widget,{href:"",extractContent:false,parseOnLoad:true,preventCache:false,preload:false,refreshOnShow:false,loadingMessage:"<span class='dijitContentPaneLoading'>${loadingState}</span>",errorMessage:"<span class='dijitContentPaneError'>${errorState}</span>",isLoaded:false,baseClass:"dijitContentPane",doLayout:true,ioArgs:{},isContainer:true,isLayoutContainer:true,onLoadDeferred:null,attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{title:[]}),postMixInProperties:function(){
+this.inherited(arguments);
+var _1=dojo.i18n.getLocalization("dijit","loading",this.lang);
+this.loadingMessage=dojo.string.substitute(this.loadingMessage,_1);
+this.errorMessage=dojo.string.substitute(this.errorMessage,_1);
+if(!this.href&&this.srcNodeRef&&this.srcNodeRef.innerHTML){
+this.isLoaded=true;
+}
+},buildRendering:function(){
+this.inherited(arguments);
+if(!this.containerNode){
+this.containerNode=this.domNode;
+}
+},postCreate:function(){
+this.domNode.title="";
+if(!dojo.attr(this.domNode,"role")){
+dijit.setWaiRole(this.domNode,"group");
+}
+dojo.addClass(this.domNode,this.baseClass);
+},startup:function(){
+if(this._started){
+return;
+}
+var _2=dijit._Contained.prototype.getParent.call(this);
+this._childOfLayoutWidget=_2&&_2.isLayoutContainer;
+this._needLayout=!this._childOfLayoutWidget;
+if(this.isLoaded){
+dojo.forEach(this.getChildren(),function(_3){
+_3.startup();
+});
+}
+if(this._isShown()||this.preload){
+this._onShow();
+}
+this.inherited(arguments);
+},_checkIfSingleChild:function(){
+var _4=dojo.query("> *",this.containerNode).filter(function(_5){
+return _5.tagName!=="SCRIPT";
+}),_6=_4.filter(function(_7){
+return dojo.hasAttr(_7,"dojoType")||dojo.hasAttr(_7,"widgetId");
+}),_8=dojo.filter(_6.map(dijit.byNode),function(_9){
+return _9&&_9.domNode&&_9.resize;
});
-
+if(_4.length==_6.length&&_8.length==1){
+this._singleChild=_8[0];
+}else{
+delete this._singleChild;
+}
+dojo.toggleClass(this.containerNode,this.baseClass+"SingleChild",!!this._singleChild);
+},setHref:function(_a){
+dojo.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use attr('href', ...) instead.","","2.0");
+return this.attr("href",_a);
+},_setHrefAttr:function(_b){
+this.cancel();
+this.onLoadDeferred=new dojo.Deferred(dojo.hitch(this,"cancel"));
+this.href=_b;
+if(this._created&&(this.preload||this._isShown())){
+this._load();
+}else{
+this._hrefChanged=true;
+}
+return this.onLoadDeferred;
+},setContent:function(_c){
+dojo.deprecated("dijit.layout.ContentPane.setContent() is deprecated. Use attr('content', ...) instead.","","2.0");
+this.attr("content",_c);
+},_setContentAttr:function(_d){
+this.href="";
+this.cancel();
+this.onLoadDeferred=new dojo.Deferred(dojo.hitch(this,"cancel"));
+this._setContent(_d||"");
+this._isDownloaded=false;
+return this.onLoadDeferred;
+},_getContentAttr:function(){
+return this.containerNode.innerHTML;
+},cancel:function(){
+if(this._xhrDfd&&(this._xhrDfd.fired==-1)){
+this._xhrDfd.cancel();
+}
+delete this._xhrDfd;
+this.onLoadDeferred=null;
+},uninitialize:function(){
+if(this._beingDestroyed){
+this.cancel();
+}
+this.inherited(arguments);
+},destroyRecursive:function(_e){
+if(this._beingDestroyed){
+return;
+}
+this.inherited(arguments);
+},resize:function(_f,_10){
+if(!this._wasShown){
+this._onShow();
+}
+this._resizeCalled=true;
+if(_f){
+dojo.marginBox(this.domNode,_f);
+}
+var cn=this.containerNode;
+if(cn===this.domNode){
+var mb=_10||{};
+dojo.mixin(mb,_f||{});
+if(!("h" in mb)||!("w" in mb)){
+mb=dojo.mixin(dojo.marginBox(cn),mb);
+}
+this._contentBox=dijit.layout.marginBox2contentBox(cn,mb);
+}else{
+this._contentBox=dojo.contentBox(cn);
+}
+this._layoutChildren();
+},_isShown:function(){
+if(this._childOfLayoutWidget){
+if(this._resizeCalled&&"open" in this){
+return this.open;
+}
+return this._resizeCalled;
+}else{
+if("open" in this){
+return this.open;
+}else{
+var _11=this.domNode;
+return (_11.style.display!="none")&&(_11.style.visibility!="hidden")&&!dojo.hasClass(_11,"dijitHidden");
+}
+}
+},_onShow:function(){
+if(this.href){
+if(!this._xhrDfd&&(!this.isLoaded||this._hrefChanged||this.refreshOnShow)){
+this.refresh();
+}
+}else{
+if(!this._childOfLayoutWidget&&this._needLayout){
+this._layoutChildren();
+}
+}
+this.inherited(arguments);
+this._wasShown=true;
+},refresh:function(){
+this.cancel();
+this.onLoadDeferred=new dojo.Deferred(dojo.hitch(this,"cancel"));
+this._load();
+return this.onLoadDeferred;
+},_load:function(){
+this._setContent(this.onDownloadStart(),true);
+var _12=this;
+var _13={preventCache:(this.preventCache||this.refreshOnShow),url:this.href,handleAs:"text"};
+if(dojo.isObject(this.ioArgs)){
+dojo.mixin(_13,this.ioArgs);
+}
+var _14=(this._xhrDfd=(this.ioMethod||dojo.xhrGet)(_13));
+_14.addCallback(function(_15){
+try{
+_12._isDownloaded=true;
+_12._setContent(_15,false);
+_12.onDownloadEnd();
+}
+catch(err){
+_12._onError("Content",err);
}
+delete _12._xhrDfd;
+return _15;
+});
+_14.addErrback(function(err){
+if(!_14.canceled){
+_12._onError("Download",err);
+}
+delete _12._xhrDfd;
+return err;
+});
+delete this._hrefChanged;
+},_onLoadHandler:function(_16){
+this.isLoaded=true;
+try{
+this.onLoadDeferred.callback(_16);
+this.onLoad(_16);
+}
+catch(e){
+console.error("Error "+this.widgetId+" running custom onLoad code: "+e.message);
+}
+},_onUnloadHandler:function(){
+this.isLoaded=false;
+try{
+this.onUnload();
+}
+catch(e){
+console.error("Error "+this.widgetId+" running custom onUnload code: "+e.message);
+}
+},destroyDescendants:function(){
+if(this.isLoaded){
+this._onUnloadHandler();
+}
+var _17=this._contentSetter;
+dojo.forEach(this.getChildren(),function(_18){
+if(_18.destroyRecursive){
+_18.destroyRecursive();
+}
+});
+if(_17){
+dojo.forEach(_17.parseResults,function(_19){
+if(_19.destroyRecursive&&_19.domNode&&_19.domNode.parentNode==dojo.body()){
+_19.destroyRecursive();
+}
+});
+delete _17.parseResults;
+}
+dojo.html._emptyNode(this.containerNode);
+delete this._singleChild;
+},_setContent:function(_1a,_1b){
+this.destroyDescendants();
+var _1c=this._contentSetter;
+if(!(_1c&&_1c instanceof dojo.html._ContentSetter)){
+_1c=this._contentSetter=new dojo.html._ContentSetter({node:this.containerNode,_onError:dojo.hitch(this,this._onError),onContentError:dojo.hitch(this,function(e){
+var _1d=this.onContentError(e);
+try{
+this.containerNode.innerHTML=_1d;
+}
+catch(e){
+console.error("Fatal "+this.id+" could not change content due to "+e.message,e);
+}
+})});
+}
+var _1e=dojo.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:this.parseOnLoad},this._contentSetterParams||{});
+dojo.mixin(_1c,_1e);
+_1c.set((dojo.isObject(_1a)&&_1a.domNode)?_1a.domNode:_1a);
+delete this._contentSetterParams;
+if(!_1b){
+dojo.forEach(this.getChildren(),function(_1f){
+if(!this.parseOnLoad||_1f.getParent){
+_1f.startup();
+}
+},this);
+this._scheduleLayout();
+this._onLoadHandler(_1a);
+}
+},_onError:function(_20,err,_21){
+this.onLoadDeferred.errback(err);
+var _22=this["on"+_20+"Error"].call(this,err);
+if(_21){
+console.error(_21,err);
+}else{
+if(_22){
+this._setContent(_22,true);
+}
+}
+},_scheduleLayout:function(){
+if(this._isShown()){
+this._layoutChildren();
+}else{
+this._needLayout=true;
+}
+},_layoutChildren:function(){
+if(this.doLayout){
+this._checkIfSingleChild();
+}
+if(this._singleChild&&this._singleChild.resize){
+var cb=this._contentBox||dojo.contentBox(this.containerNode);
+this._singleChild.resize({w:cb.w,h:cb.h});
+}else{
+dojo.forEach(this.getChildren(),function(_23){
+if(_23.resize){
+_23.resize();
+}
+});
+}
+delete this._needLayout;
+},onLoad:function(_24){
+},onUnload:function(){
+},onDownloadStart:function(){
+return this.loadingMessage;
+},onContentError:function(_25){
+},onDownloadError:function(_26){
+return this.errorMessage;
+},onDownloadEnd:function(){
+}});
+}
diff --git a/js/dojo/dijit/layout/LayoutContainer.js b/js/dojo/dijit/layout/LayoutContainer.js
--- a/js/dojo/dijit/layout/LayoutContainer.js
+++ b/js/dojo/dijit/layout/LayoutContainer.js
@@ -1,71 +1,28 @@
-if(!dojo._hasResource["dijit.layout.LayoutContainer"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.layout.LayoutContainer"] = true;
-dojo.provide("dijit.layout.LayoutContainer");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.require("dijit.layout._LayoutWidget");
-dojo.declare(
- "dijit.layout.LayoutContainer",
- dijit.layout._LayoutWidget,
-{
- // summary
- // Provides Delphi-style panel layout semantics.
- //
- // details
- // A LayoutContainer is a box with a specified size (like style="width: 500px; height: 500px;"),
- // that contains children widgets marked with "layoutAlign" of "left", "right", "bottom", "top", and "client".
- // It takes it's children marked as left/top/bottom/right, and lays them out along the edges of the box,
- // and then it takes the child marked "client" and puts it into the remaining space in the middle.
- //
- // Left/right positioning is similar to CSS's "float: left" and "float: right",
- // and top/bottom positioning would be similar to "float: top" and "float: bottom", if there were such
- // CSS.
- //
- // Note that there can only be one client element, but there can be multiple left, right, top,
- // or bottom elements.
- //
- // usage
- // <style>
- // html, body{ height: 100%; width: 100%; }
- // </style>
- // <div dojoType="dijit.layout.LayoutContainer" style="width: 100%; height: 100%">
- // <div dojoType="dijit.layout.ContentPane" layoutAlign="top">header text</div>
- // <div dojoType="dijit.layout.ContentPane" layoutAlign="left" style="width: 200px;">table of contents</div>
- // <div dojoType="dijit.layout.ContentPane" layoutAlign="client">client area</div>
- // </div>
- //
- // Lays out each child in the natural order the children occur in.
- // Basically each child is laid out into the "remaining space", where "remaining space" is initially
- // the content area of this widget, but is reduced to a smaller rectangle each time a child is added.
- //
-
- layout: function(){
- dijit.layout.layoutChildren(this.domNode, this._contentBox, this.getChildren());
- },
-
- addChild: function(/*Widget*/ child, /*Integer?*/ insertIndex){
- dijit._Container.prototype.addChild.apply(this, arguments);
- if(this._started){
- dijit.layout.layoutChildren(this.domNode, this._contentBox, this.getChildren());
- }
- },
-
- removeChild: function(/*Widget*/ widget){
- dijit._Container.prototype.removeChild.apply(this, arguments);
- if(this._started){
- dijit.layout.layoutChildren(this.domNode, this._contentBox, this.getChildren());
- }
- }
-});
-
-// This argument can be specified for the children of a LayoutContainer.
-// Since any widget can be specified as a LayoutContainer child, mix it
-// into the base widget class. (This is a hack, but it's effective.)
-dojo.extend(dijit._Widget, {
- // layoutAlign: String
- // "none", "left", "right", "bottom", "top", and "client".
- // See the LayoutContainer description for details on this parameter.
- layoutAlign: 'none'
-});
-
+if(!dojo._hasResource["dijit.layout.LayoutContainer"]){
+dojo._hasResource["dijit.layout.LayoutContainer"]=true;
+dojo.provide("dijit.layout.LayoutContainer");
+dojo.require("dijit.layout._LayoutWidget");
+dojo.declare("dijit.layout.LayoutContainer",dijit.layout._LayoutWidget,{baseClass:"dijitLayoutContainer",constructor:function(){
+dojo.deprecated("dijit.layout.LayoutContainer is deprecated","use BorderContainer instead",2);
+},layout:function(){
+dijit.layout.layoutChildren(this.domNode,this._contentBox,this.getChildren());
+},addChild:function(_1,_2){
+this.inherited(arguments);
+if(this._started){
+dijit.layout.layoutChildren(this.domNode,this._contentBox,this.getChildren());
}
+},removeChild:function(_3){
+this.inherited(arguments);
+if(this._started){
+dijit.layout.layoutChildren(this.domNode,this._contentBox,this.getChildren());
+}
+}});
+dojo.extend(dijit._Widget,{layoutAlign:"none"});
+}
diff --git a/js/dojo/dijit/layout/LinkPane.js b/js/dojo/dijit/layout/LinkPane.js
--- a/js/dojo/dijit/layout/LinkPane.js
+++ b/js/dojo/dijit/layout/LinkPane.js
@@ -1,36 +1,20 @@
-if(!dojo._hasResource["dijit.layout.LinkPane"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.layout.LinkPane"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit.layout.LinkPane"]){
+dojo._hasResource["dijit.layout.LinkPane"]=true;
dojo.provide("dijit.layout.LinkPane");
-
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit._Templated");
-
-dojo.declare("dijit.layout.LinkPane",
- [dijit.layout.ContentPane, dijit._Templated],
- {
- // summary:
- // A ContentPane that loads data remotely
- // description:
- // LinkPane is just a ContentPane that loads data remotely (via the href attribute),
- // and has markup similar to an anchor. The anchor's body (the words between <a> and </a>)
- // become the title of the widget (used for TabContainer, AccordionContainer, etc.)
- // example:
- // <a href="foo.html">my title</a>
-
- // I'm using a template because the user may specify the input as
- // <a href="foo.html">title</a>, in which case we need to get rid of the
- // <a> because we don't want a link.
- templateString: '<div class="dijitLinkPane"></div>',
-
- postCreate: function(){
-
- // If user has specified node contents, they become the title
- // (the link must be plain text)
- if(this.srcNodeRef){
- this.title += this.srcNodeRef.innerHTML;
- }
- this.inherited("postCreate",arguments);
- }
-});
-
+dojo.declare("dijit.layout.LinkPane",[dijit.layout.ContentPane,dijit._Templated],{templateString:"<div class=\"dijitLinkPane\" dojoAttachPoint=\"containerNode\"></div>",postMixInProperties:function(){
+if(this.srcNodeRef){
+this.title+=this.srcNodeRef.innerHTML;
}
+this.inherited(arguments);
+},_fillContent:function(_1){
+}});
+}
diff --git a/js/dojo/dijit/layout/SplitContainer.js b/js/dojo/dijit/layout/SplitContainer.js
--- a/js/dojo/dijit/layout/SplitContainer.js
+++ b/js/dojo/dijit/layout/SplitContainer.js
@@ -1,537 +1,349 @@
-if(!dojo._hasResource["dijit.layout.SplitContainer"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.layout.SplitContainer"] = true;
-dojo.provide("dijit.layout.SplitContainer");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-//
-// FIXME: make it prettier
-// FIXME: active dragging upwards doesn't always shift other bars (direction calculation is wrong in this case)
-//
+if(!dojo._hasResource["dijit.layout.SplitContainer"]){
+dojo._hasResource["dijit.layout.SplitContainer"]=true;
+dojo.provide("dijit.layout.SplitContainer");
dojo.require("dojo.cookie");
dojo.require("dijit.layout._LayoutWidget");
-
-dojo.declare("dijit.layout.SplitContainer",
- dijit.layout._LayoutWidget,
- {
- // summary:
- // A Container widget with sizing handles in-between each child
- // description:
- // Contains multiple children widgets, all of which are displayed side by side
- // (either horizontally or vertically); there's a bar between each of the children,
- // and you can adjust the relative size of each child by dragging the bars.
- //
- // You must specify a size (width and height) for the SplitContainer.
- //
- // activeSizing: Boolean
- // If true, the children's size changes as you drag the bar;
- // otherwise, the sizes don't change until you drop the bar (by mouse-up)
- activeSizing: false,
-
- // sizerWidth: Integer
- // Size in pixels of the bar between each child
- sizerWidth: 7, // FIXME: this should be a CSS attribute (at 7 because css wants it to be 7 until we fix to css)
-
- // orientation: String
- // either 'horizontal' or vertical; indicates whether the children are
- // arranged side-by-side or up/down.
- orientation: 'horizontal',
-
- // persist: Boolean
- // Save splitter positions in a cookie
- persist: true,
-
- postMixInProperties: function(){
- this.inherited("postMixInProperties",arguments);
- this.isHorizontal = (this.orientation == 'horizontal');
- },
-
- postCreate: function(){
- this.inherited("postCreate",arguments);
- this.sizers = [];
- dojo.addClass(this.domNode, "dijitSplitContainer");
- // overflow has to be explicitly hidden for splitContainers using gekko (trac #1435)
- // to keep other combined css classes from inadvertantly making the overflow visible
- if(dojo.isMozilla){
- this.domNode.style.overflow = '-moz-scrollbars-none'; // hidden doesn't work
- }
-
- // create the fake dragger
- if(typeof this.sizerWidth == "object"){
- try{ //FIXME: do this without a try/catch
- this.sizerWidth = parseInt(this.sizerWidth.toString());
- }catch(e){ this.sizerWidth = 7; }
- }
- var sizer = this.virtualSizer = document.createElement('div');
- sizer.style.position = 'relative';
-
- // #1681: work around the dreaded 'quirky percentages in IE' layout bug
- // If the splitcontainer's dimensions are specified in percentages, it
- // will be resized when the virtualsizer is displayed in _showSizingLine
- // (typically expanding its bounds unnecessarily). This happens because
- // we use position: relative for .dijitSplitContainer.
- // The workaround: instead of changing the display style attribute,
- // switch to changing the zIndex (bring to front/move to back)
-
- sizer.style.zIndex = 10;
- sizer.className = this.isHorizontal ? 'dijitSplitContainerVirtualSizerH' : 'dijitSplitContainerVirtualSizerV';
- this.domNode.appendChild(sizer);
- dojo.setSelectable(sizer, false);
- },
-
- startup: function(){
- if(this._started){ return; }
- dojo.forEach(this.getChildren(), function(child, i, children){
- // attach the children and create the draggers
- this._injectChild(child);
-
- if(i < children.length-1){
- this._addSizer();
- }
- }, this);
-
- if(this.persist){
- this._restoreState();
- }
- this.inherited("startup",arguments);
- this._started = true;
- },
-
- _injectChild: function(child){
- child.domNode.style.position = "absolute";
- dojo.addClass(child.domNode, "dijitSplitPane");
- },
-
- _addSizer: function(){
- var i = this.sizers.length;
-
- // TODO: use a template for this!!!
- var sizer = this.sizers[i] = document.createElement('div');
- sizer.className = this.isHorizontal ? 'dijitSplitContainerSizerH' : 'dijitSplitContainerSizerV';
-
- // add the thumb div
- var thumb = document.createElement('div');
- thumb.className = 'thumb';
- sizer.appendChild(thumb);
-
- // FIXME: are you serious? why aren't we using mover start/stop combo?
- var self = this;
- var handler = (function(){ var sizer_i = i; return function(e){ self.beginSizing(e, sizer_i); } })();
- dojo.connect(sizer, "onmousedown", handler);
-
- this.domNode.appendChild(sizer);
- dojo.setSelectable(sizer, false);
- },
-
- removeChild: function(widget){
- // summary: Remove sizer, but only if widget is really our child and
- // we have at least one sizer to throw away
- if(this.sizers.length && dojo.indexOf(this.getChildren(), widget) != -1){
- var i = this.sizers.length - 1;
- dojo._destroyElement(this.sizers[i]);
- this.sizers.length--;
- }
-
- // Remove widget and repaint
- this.inherited("removeChild",arguments);
- if(this._started){
- this.layout();
- }
- },
-
- addChild: function(/*Widget*/ child, /*Integer?*/ insertIndex){
- // summary: Add a child widget to the container
- // child: a widget to add
- // insertIndex: postion in the "stack" to add the child widget
-
- this.inherited("addChild",arguments);
-
- if(this._started){
- // Do the stuff that startup() does for each widget
- this._injectChild(child);
- var children = this.getChildren();
- if(children.length > 1){
- this._addSizer();
- }
-
- // and then reposition (ie, shrink) every pane to make room for the new guy
- this.layout();
- }
- },
-
- layout: function(){
- // summary:
- // Do layout of panels
-
- // base class defines this._contentBox on initial creation and also
- // on resize
- this.paneWidth = this._contentBox.w;
- this.paneHeight = this._contentBox.h;
-
- var children = this.getChildren();
- if(!children.length){ return; }
-
- //
- // calculate space
- //
-
- var space = this.isHorizontal ? this.paneWidth : this.paneHeight;
- if(children.length > 1){
- space -= this.sizerWidth * (children.length - 1);
- }
-
- //
- // calculate total of SizeShare values
- //
- var outOf = 0;
- dojo.forEach(children, function(child){
- outOf += child.sizeShare;
- });
-
- //
- // work out actual pixels per sizeshare unit
- //
- var pixPerUnit = space / outOf;
-
- //
- // set the SizeActual member of each pane
- //
- var totalSize = 0;
- dojo.forEach(children.slice(0, children.length - 1), function(child){
- var size = Math.round(pixPerUnit * child.sizeShare);
- child.sizeActual = size;
- totalSize += size;
- });
-
- children[children.length-1].sizeActual = space - totalSize;
-
- //
- // make sure the sizes are ok
- //
- this._checkSizes();
-
- //
- // now loop, positioning each pane and letting children resize themselves
- //
-
- var pos = 0;
- var size = children[0].sizeActual;
- this._movePanel(children[0], pos, size);
- children[0].position = pos;
- pos += size;
-
- // if we don't have any sizers, our layout method hasn't been called yet
- // so bail until we are called..TODO: REVISIT: need to change the startup
- // algorithm to guaranteed the ordering of calls to layout method
- if(!this.sizers){
- return;
- }
-
- dojo.some(children.slice(1), function(child, i){
- // error-checking
- if(!this.sizers[i]){
- return true;
- }
- // first we position the sizing handle before this pane
- this._moveSlider(this.sizers[i], pos, this.sizerWidth);
- this.sizers[i].position = pos;
- pos += this.sizerWidth;
-
- size = child.sizeActual;
- this._movePanel(child, pos, size);
- child.position = pos;
- pos += size;
- }, this);
- },
-
- _movePanel: function(panel, pos, size){
- if(this.isHorizontal){
- panel.domNode.style.left = pos + 'px'; // TODO: resize() takes l and t parameters too, don't need to set manually
- panel.domNode.style.top = 0;
- var box = {w: size, h: this.paneHeight};
- if(panel.resize){
- panel.resize(box);
- }else{
- dojo.marginBox(panel.domNode, box);
- }
- }else{
- panel.domNode.style.left = 0; // TODO: resize() takes l and t parameters too, don't need to set manually
- panel.domNode.style.top = pos + 'px';
- var box = {w: this.paneWidth, h: size};
- if(panel.resize){
- panel.resize(box);
- }else{
- dojo.marginBox(panel.domNode, box);
- }
- }
- },
-
- _moveSlider: function(slider, pos, size){
- if(this.isHorizontal){
- slider.style.left = pos + 'px';
- slider.style.top = 0;
- dojo.marginBox(slider, { w: size, h: this.paneHeight });
- }else{
- slider.style.left = 0;
- slider.style.top = pos + 'px';
- dojo.marginBox(slider, { w: this.paneWidth, h: size });
- }
- },
-
- _growPane: function(growth, pane){
- if(growth > 0){
- if(pane.sizeActual > pane.sizeMin){
- if((pane.sizeActual - pane.sizeMin) > growth){
-
- // stick all the growth in this pane
- pane.sizeActual = pane.sizeActual - growth;
- growth = 0;
- }else{
- // put as much growth in here as we can
- growth -= pane.sizeActual - pane.sizeMin;
- pane.sizeActual = pane.sizeMin;
- }
- }
- }
- return growth;
- },
-
- _checkSizes: function(){
-
- var totalMinSize = 0;
- var totalSize = 0;
- var children = this.getChildren();
-
- dojo.forEach(children, function(child){
- totalSize += child.sizeActual;
- totalMinSize += child.sizeMin;
- });
-
- // only make adjustments if we have enough space for all the minimums
-
- if(totalMinSize <= totalSize){
-
- var growth = 0;
-
- dojo.forEach(children, function(child){
- if(child.sizeActual < child.sizeMin){
- growth += child.sizeMin - child.sizeActual;
- child.sizeActual = child.sizeMin;
- }
- });
-
- if(growth > 0){
- var list = this.isDraggingLeft ? children.reverse() : children;
- dojo.forEach(list, function(child){
- growth = this._growPane(growth, child);
- }, this);
- }
- }else{
- dojo.forEach(children, function(child){
- child.sizeActual = Math.round(totalSize * (child.sizeMin / totalMinSize));
- });
- }
- },
-
- beginSizing: function(e, i){
- var children = this.getChildren();
- this.paneBefore = children[i];
- this.paneAfter = children[i+1];
-
- this.isSizing = true;
- this.sizingSplitter = this.sizers[i];
-
- if(!this.cover){
- this.cover = dojo.doc.createElement('div');
- this.domNode.appendChild(this.cover);
- var s = this.cover.style;
- s.position = 'absolute';
- s.zIndex = 1;
- s.top = 0;
- s.left = 0;
- s.width = "100%";
- s.height = "100%";
- }else{
- this.cover.style.zIndex = 1;
- }
- this.sizingSplitter.style.zIndex = 2;
-
- // TODO: REVISIT - we want MARGIN_BOX and core hasn't exposed that yet (but can't we use it anyway if we pay attention? we do elsewhere.)
- this.originPos = dojo.coords(children[0].domNode, true);
- if(this.isHorizontal){
- var client = (e.layerX ? e.layerX : e.offsetX);
- var screen = e.pageX;
- this.originPos = this.originPos.x;
- }else{
- var client = (e.layerY ? e.layerY : e.offsetY);
- var screen = e.pageY;
- this.originPos = this.originPos.y;
- }
- this.startPoint = this.lastPoint = screen;
- this.screenToClientOffset = screen - client;
- this.dragOffset = this.lastPoint - this.paneBefore.sizeActual - this.originPos - this.paneBefore.position;
-
- if(!this.activeSizing){
- this._showSizingLine();
- }
-
- //
- // attach mouse events
- //
- this._connects = [];
- this._connects.push(dojo.connect(document.documentElement, "onmousemove", this, "changeSizing"));
- this._connects.push(dojo.connect(document.documentElement, "onmouseup", this, "endSizing"));
-
- dojo.stopEvent(e);
- },
-
- changeSizing: function(e){
- if(!this.isSizing){ return; }
- this.lastPoint = this.isHorizontal ? e.pageX : e.pageY;
- this.movePoint();
- if(this.activeSizing){
- this._updateSize();
- }else{
- this._moveSizingLine();
- }
- dojo.stopEvent(e);
- },
-
- endSizing: function(e){
- if(!this.isSizing){ return; }
- if(this.cover){
- this.cover.style.zIndex = -1;
- }
- if(!this.activeSizing){
- this._hideSizingLine();
- }
-
- this._updateSize();
-
- this.isSizing = false;
-
- if(this.persist){
- this._saveState(this);
- }
-
- dojo.forEach(this._connects,dojo.disconnect);
- },
-
- movePoint: function(){
-
- // make sure lastPoint is a legal point to drag to
- var p = this.lastPoint - this.screenToClientOffset;
-
- var a = p - this.dragOffset;
- a = this.legaliseSplitPoint(a);
- p = a + this.dragOffset;
-
- this.lastPoint = p + this.screenToClientOffset;
- },
-
- legaliseSplitPoint: function(a){
-
- a += this.sizingSplitter.position;
-
- this.isDraggingLeft = !!(a > 0);
-
- if(!this.activeSizing){
- var min = this.paneBefore.position + this.paneBefore.sizeMin;
- if(a < min){
- a = min;
- }
-
- var max = this.paneAfter.position + (this.paneAfter.sizeActual - (this.sizerWidth + this.paneAfter.sizeMin));
- if(a > max){
- a = max;
- }
- }
-
- a -= this.sizingSplitter.position;
-
- this._checkSizes();
-
- return a;
- },
-
- _updateSize: function(){
- //FIXME: sometimes this.lastPoint is NaN
- var pos = this.lastPoint - this.dragOffset - this.originPos;
-
- var start_region = this.paneBefore.position;
- var end_region = this.paneAfter.position + this.paneAfter.sizeActual;
-
- this.paneBefore.sizeActual = pos - start_region;
- this.paneAfter.position = pos + this.sizerWidth;
- this.paneAfter.sizeActual = end_region - this.paneAfter.position;
-
- dojo.forEach(this.getChildren(), function(child){
- child.sizeShare = child.sizeActual;
- });
-
- if(this._started){
- this.layout();
- }
- },
-
- _showSizingLine: function(){
-
- this._moveSizingLine();
-
- dojo.marginBox(this.virtualSizer,
- this.isHorizontal ? { w: this.sizerWidth, h: this.paneHeight } : { w: this.paneWidth, h: this.sizerWidth });
-
- this.virtualSizer.style.display = 'block';
- },
-
- _hideSizingLine: function(){
- this.virtualSizer.style.display = 'none';
- },
-
- _moveSizingLine: function(){
- var pos = (this.lastPoint - this.startPoint) + this.sizingSplitter.position;
- dojo.style(this.virtualSizer,(this.isHorizontal ? "left" : "top"),pos+"px");
- // this.virtualSizer.style[ this.isHorizontal ? "left" : "top" ] = pos + 'px'; // FIXME: remove this line if the previous is better
- },
-
- _getCookieName: function(i){
- return this.id + "_" + i;
- },
-
- _restoreState: function(){
- dojo.forEach(this.getChildren(), function(child, i){
- var cookieName = this._getCookieName(i);
- var cookieValue = dojo.cookie(cookieName);
- if(cookieValue){
- var pos = parseInt(cookieValue);
- if(typeof pos == "number"){
- child.sizeShare = pos;
- }
- }
- }, this);
- },
-
- _saveState: function(){
- dojo.forEach(this.getChildren(), function(child, i){
- dojo.cookie(this._getCookieName(i), child.sizeShare);
- }, this);
- }
+dojo.declare("dijit.layout.SplitContainer",dijit.layout._LayoutWidget,{constructor:function(){
+dojo.deprecated("dijit.layout.SplitContainer is deprecated","use BorderContainer with splitter instead",2);
+},activeSizing:false,sizerWidth:7,orientation:"horizontal",persist:true,baseClass:"dijitSplitContainer",postMixInProperties:function(){
+this.inherited("postMixInProperties",arguments);
+this.isHorizontal=(this.orientation=="horizontal");
+},postCreate:function(){
+this.inherited(arguments);
+this.sizers=[];
+if(dojo.isMozilla){
+this.domNode.style.overflow="-moz-scrollbars-none";
+}
+if(typeof this.sizerWidth=="object"){
+try{
+this.sizerWidth=parseInt(this.sizerWidth.toString());
+}
+catch(e){
+this.sizerWidth=7;
+}
+}
+var _1=dojo.doc.createElement("div");
+this.virtualSizer=_1;
+_1.style.position="relative";
+_1.style.zIndex=10;
+_1.className=this.isHorizontal?"dijitSplitContainerVirtualSizerH":"dijitSplitContainerVirtualSizerV";
+this.domNode.appendChild(_1);
+dojo.setSelectable(_1,false);
+},destroy:function(){
+delete this.virtualSizer;
+dojo.forEach(this._ownconnects,dojo.disconnect);
+this.inherited(arguments);
+},startup:function(){
+if(this._started){
+return;
+}
+dojo.forEach(this.getChildren(),function(_2,i,_3){
+this._setupChild(_2);
+if(i<_3.length-1){
+this._addSizer();
+}
+},this);
+if(this.persist){
+this._restoreState();
+}
+this.inherited(arguments);
+},_setupChild:function(_4){
+this.inherited(arguments);
+_4.domNode.style.position="absolute";
+dojo.addClass(_4.domNode,"dijitSplitPane");
+},_onSizerMouseDown:function(e){
+if(e.target.id){
+for(var i=0;i<this.sizers.length;i++){
+if(this.sizers[i].id==e.target.id){
+break;
+}
+}
+if(i<this.sizers.length){
+this.beginSizing(e,i);
+}
+}
+},_addSizer:function(_5){
+_5=_5===undefined?this.sizers.length:_5;
+var _6=dojo.doc.createElement("div");
+_6.id=dijit.getUniqueId("dijit_layout_SplitterContainer_Splitter");
+this.sizers.splice(_5,0,_6);
+this.domNode.appendChild(_6);
+_6.className=this.isHorizontal?"dijitSplitContainerSizerH":"dijitSplitContainerSizerV";
+var _7=dojo.doc.createElement("div");
+_7.className="thumb";
+_7.id=_6.id;
+_6.appendChild(_7);
+this.connect(_6,"onmousedown","_onSizerMouseDown");
+dojo.setSelectable(_6,false);
+},removeChild:function(_8){
+if(this.sizers.length){
+var i=dojo.indexOf(this.getChildren(),_8);
+if(i!=-1){
+if(i==this.sizers.length){
+i--;
+}
+dojo.destroy(this.sizers[i]);
+this.sizers.splice(i,1);
+}
+}
+this.inherited(arguments);
+if(this._started){
+this.layout();
+}
+},addChild:function(_9,_a){
+this.inherited(arguments);
+if(this._started){
+var _b=this.getChildren();
+if(_b.length>1){
+this._addSizer(_a);
+}
+this.layout();
+}
+},layout:function(){
+this.paneWidth=this._contentBox.w;
+this.paneHeight=this._contentBox.h;
+var _c=this.getChildren();
+if(!_c.length){
+return;
+}
+var _d=this.isHorizontal?this.paneWidth:this.paneHeight;
+if(_c.length>1){
+_d-=this.sizerWidth*(_c.length-1);
+}
+var _e=0;
+dojo.forEach(_c,function(_f){
+_e+=_f.sizeShare;
+});
+var _10=_d/_e;
+var _11=0;
+dojo.forEach(_c.slice(0,_c.length-1),function(_12){
+var _13=Math.round(_10*_12.sizeShare);
+_12.sizeActual=_13;
+_11+=_13;
});
-
-// These arguments can be specified for the children of a SplitContainer.
-// Since any widget can be specified as a SplitContainer child, mix them
-// into the base widget class. (This is a hack, but it's effective.)
-dojo.extend(dijit._Widget, {
- // sizeMin: Integer
- // Minimum size (width or height) of a child of a SplitContainer.
- // The value is relative to other children's sizeShare properties.
- sizeMin: 10,
-
- // sizeShare: Integer
- // Size (width or height) of a child of a SplitContainer.
- // The value is relative to other children's sizeShare properties.
- // For example, if there are two children and each has sizeShare=10, then
- // each takes up 50% of the available space.
- sizeShare: 10
+_c[_c.length-1].sizeActual=_d-_11;
+this._checkSizes();
+var pos=0;
+var _14=_c[0].sizeActual;
+this._movePanel(_c[0],pos,_14);
+_c[0].position=pos;
+pos+=_14;
+if(!this.sizers){
+return;
+}
+dojo.some(_c.slice(1),function(_15,i){
+if(!this.sizers[i]){
+return true;
+}
+this._moveSlider(this.sizers[i],pos,this.sizerWidth);
+this.sizers[i].position=pos;
+pos+=this.sizerWidth;
+_14=_15.sizeActual;
+this._movePanel(_15,pos,_14);
+_15.position=pos;
+pos+=_14;
+},this);
+},_movePanel:function(_16,pos,_17){
+if(this.isHorizontal){
+_16.domNode.style.left=pos+"px";
+_16.domNode.style.top=0;
+var box={w:_17,h:this.paneHeight};
+if(_16.resize){
+_16.resize(box);
+}else{
+dojo.marginBox(_16.domNode,box);
+}
+}else{
+_16.domNode.style.left=0;
+_16.domNode.style.top=pos+"px";
+var box={w:this.paneWidth,h:_17};
+if(_16.resize){
+_16.resize(box);
+}else{
+dojo.marginBox(_16.domNode,box);
+}
+}
+},_moveSlider:function(_18,pos,_19){
+if(this.isHorizontal){
+_18.style.left=pos+"px";
+_18.style.top=0;
+dojo.marginBox(_18,{w:_19,h:this.paneHeight});
+}else{
+_18.style.left=0;
+_18.style.top=pos+"px";
+dojo.marginBox(_18,{w:this.paneWidth,h:_19});
+}
+},_growPane:function(_1a,_1b){
+if(_1a>0){
+if(_1b.sizeActual>_1b.sizeMin){
+if((_1b.sizeActual-_1b.sizeMin)>_1a){
+_1b.sizeActual=_1b.sizeActual-_1a;
+_1a=0;
+}else{
+_1a-=_1b.sizeActual-_1b.sizeMin;
+_1b.sizeActual=_1b.sizeMin;
+}
+}
+}
+return _1a;
+},_checkSizes:function(){
+var _1c=0;
+var _1d=0;
+var _1e=this.getChildren();
+dojo.forEach(_1e,function(_1f){
+_1d+=_1f.sizeActual;
+_1c+=_1f.sizeMin;
+});
+if(_1c<=_1d){
+var _20=0;
+dojo.forEach(_1e,function(_21){
+if(_21.sizeActual<_21.sizeMin){
+_20+=_21.sizeMin-_21.sizeActual;
+_21.sizeActual=_21.sizeMin;
+}
+});
+if(_20>0){
+var _22=this.isDraggingLeft?_1e.reverse():_1e;
+dojo.forEach(_22,function(_23){
+_20=this._growPane(_20,_23);
+},this);
+}
+}else{
+dojo.forEach(_1e,function(_24){
+_24.sizeActual=Math.round(_1d*(_24.sizeMin/_1c));
});
-
+}
+},beginSizing:function(e,i){
+var _25=this.getChildren();
+this.paneBefore=_25[i];
+this.paneAfter=_25[i+1];
+this.isSizing=true;
+this.sizingSplitter=this.sizers[i];
+if(!this.cover){
+this.cover=dojo.create("div",{style:{position:"absolute",zIndex:5,top:0,left:0,width:"100%",height:"100%"}},this.domNode);
+}else{
+this.cover.style.zIndex=5;
+}
+this.sizingSplitter.style.zIndex=6;
+this.originPos=dojo.position(_25[0].domNode,true);
+if(this.isHorizontal){
+var _26=e.layerX||e.offsetX||0;
+var _27=e.pageX;
+this.originPos=this.originPos.x;
+}else{
+var _26=e.layerY||e.offsetY||0;
+var _27=e.pageY;
+this.originPos=this.originPos.y;
+}
+this.startPoint=this.lastPoint=_27;
+this.screenToClientOffset=_27-_26;
+this.dragOffset=this.lastPoint-this.paneBefore.sizeActual-this.originPos-this.paneBefore.position;
+if(!this.activeSizing){
+this._showSizingLine();
+}
+this._ownconnects=[];
+this._ownconnects.push(dojo.connect(dojo.doc.documentElement,"onmousemove",this,"changeSizing"));
+this._ownconnects.push(dojo.connect(dojo.doc.documentElement,"onmouseup",this,"endSizing"));
+dojo.stopEvent(e);
+},changeSizing:function(e){
+if(!this.isSizing){
+return;
+}
+this.lastPoint=this.isHorizontal?e.pageX:e.pageY;
+this.movePoint();
+if(this.activeSizing){
+this._updateSize();
+}else{
+this._moveSizingLine();
+}
+dojo.stopEvent(e);
+},endSizing:function(e){
+if(!this.isSizing){
+return;
+}
+if(this.cover){
+this.cover.style.zIndex=-1;
+}
+if(!this.activeSizing){
+this._hideSizingLine();
+}
+this._updateSize();
+this.isSizing=false;
+if(this.persist){
+this._saveState(this);
}
+dojo.forEach(this._ownconnects,dojo.disconnect);
+},movePoint:function(){
+var p=this.lastPoint-this.screenToClientOffset;
+var a=p-this.dragOffset;
+a=this.legaliseSplitPoint(a);
+p=a+this.dragOffset;
+this.lastPoint=p+this.screenToClientOffset;
+},legaliseSplitPoint:function(a){
+a+=this.sizingSplitter.position;
+this.isDraggingLeft=!!(a>0);
+if(!this.activeSizing){
+var min=this.paneBefore.position+this.paneBefore.sizeMin;
+if(a<min){
+a=min;
+}
+var max=this.paneAfter.position+(this.paneAfter.sizeActual-(this.sizerWidth+this.paneAfter.sizeMin));
+if(a>max){
+a=max;
+}
+}
+a-=this.sizingSplitter.position;
+this._checkSizes();
+return a;
+},_updateSize:function(){
+var pos=this.lastPoint-this.dragOffset-this.originPos;
+var _28=this.paneBefore.position;
+var _29=this.paneAfter.position+this.paneAfter.sizeActual;
+this.paneBefore.sizeActual=pos-_28;
+this.paneAfter.position=pos+this.sizerWidth;
+this.paneAfter.sizeActual=_29-this.paneAfter.position;
+dojo.forEach(this.getChildren(),function(_2a){
+_2a.sizeShare=_2a.sizeActual;
+});
+if(this._started){
+this.layout();
+}
+},_showSizingLine:function(){
+this._moveSizingLine();
+dojo.marginBox(this.virtualSizer,this.isHorizontal?{w:this.sizerWidth,h:this.paneHeight}:{w:this.paneWidth,h:this.sizerWidth});
+this.virtualSizer.style.display="block";
+},_hideSizingLine:function(){
+this.virtualSizer.style.display="none";
+},_moveSizingLine:function(){
+var pos=(this.lastPoint-this.startPoint)+this.sizingSplitter.position;
+dojo.style(this.virtualSizer,(this.isHorizontal?"left":"top"),pos+"px");
+},_getCookieName:function(i){
+return this.id+"_"+i;
+},_restoreState:function(){
+dojo.forEach(this.getChildren(),function(_2b,i){
+var _2c=this._getCookieName(i);
+var _2d=dojo.cookie(_2c);
+if(_2d){
+var pos=parseInt(_2d);
+if(typeof pos=="number"){
+_2b.sizeShare=pos;
+}
+}
+},this);
+},_saveState:function(){
+if(!this.persist){
+return;
+}
+dojo.forEach(this.getChildren(),function(_2e,i){
+dojo.cookie(this._getCookieName(i),_2e.sizeShare,{expires:365});
+},this);
+}});
+dojo.extend(dijit._Widget,{sizeMin:10,sizeShare:10});
+}
diff --git a/js/dojo/dijit/layout/StackContainer.js b/js/dojo/dijit/layout/StackContainer.js
--- a/js/dojo/dijit/layout/StackContainer.js
+++ b/js/dojo/dijit/layout/StackContainer.js
@@ -1,451 +1,150 @@
-if(!dojo._hasResource["dijit.layout.StackContainer"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.layout.StackContainer"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit.layout.StackContainer"]){
+dojo._hasResource["dijit.layout.StackContainer"]=true;
dojo.provide("dijit.layout.StackContainer");
-
dojo.require("dijit._Templated");
dojo.require("dijit.layout._LayoutWidget");
-dojo.require("dijit.form.Button");
-
-dojo.declare(
- "dijit.layout.StackContainer",
- dijit.layout._LayoutWidget,
-
- // summary
- // A container that has multiple children, but shows only
- // one child at a time (like looking at the pages in a book one by one).
- //
- // Publishes topics <widgetId>-addChild, <widgetId>-removeChild, and <widgetId>-selectChild
- //
- // Can be base class for container, Wizard, Show, etc.
-{
- // doLayout: Boolean
- // if true, change the size of my currently displayed child to match my size
- doLayout: true,
-
- _started: false,
-
- // selectedChildWidget: Widget
- // References the currently selected child widget, if any
-
- postCreate: function(){
- dijit.setWaiRole((this.containerNode || this.domNode), "tabpanel");
- this.connect(this.domNode, "onkeypress", this._onKeyPress);
- },
-
- startup: function(){
- if(this._started){ return; }
-
- var children = this.getChildren();
-
- // Setup each page panel
- dojo.forEach(children, this._setupChild, this);
-
- // Figure out which child to initially display
- dojo.some(children, function(child){
- if(child.selected){
- this.selectedChildWidget = child;
- }
- return child.selected;
- }, this);
-
- var selected = this.selectedChildWidget;
-
- // Default to the first child
- if(!selected && children[0]){
- selected = this.selectedChildWidget = children[0];
- selected.selected = true;
- }
- if(selected){
- this._showChild(selected);
- }
-
- // Now publish information about myself so any StackControllers can initialize..
- dojo.publish(this.id+"-startup", [{children: children, selected: selected}]);
- this.inherited("startup",arguments);
- this._started = true;
- },
-
- _setupChild: function(/*Widget*/ page){
- // Summary: prepare the given child
-
- page.domNode.style.display = "none";
-
- // since we are setting the width/height of the child elements, they need
- // to be position:relative, or IE has problems (See bug #2033)
- page.domNode.style.position = "relative";
-
- return page; // dijit._Widget
- },
-
- addChild: function(/*Widget*/ child, /*Integer?*/ insertIndex){
- // summary: Adds a widget to the stack
-
- dijit._Container.prototype.addChild.apply(this, arguments);
- child = this._setupChild(child);
-
- if(this._started){
- // in case the tab titles have overflowed from one line to two lines
- this.layout();
-
- dojo.publish(this.id+"-addChild", [child, insertIndex]);
-
- // if this is the first child, then select it
- if(!this.selectedChildWidget){
- this.selectChild(child);
- }
- }
- },
-
- removeChild: function(/*Widget*/ page){
- // summary: Removes the pane from the stack
-
- dijit._Container.prototype.removeChild.apply(this, arguments);
-
- // If we are being destroyed than don't run the code below (to select another page), because we are deleting
- // every page one by one
- if(this._beingDestroyed){ return; }
-
- if(this._started){
- // this will notify any tablists to remove a button; do this first because it may affect sizing
- dojo.publish(this.id+"-removeChild", [page]);
-
- // in case the tab titles now take up one line instead of two lines
- this.layout();
- }
-
- if(this.selectedChildWidget === page){
- this.selectedChildWidget = undefined;
- if(this._started){
- var children = this.getChildren();
- if(children.length){
- this.selectChild(children[0]);
- }
- }
- }
- },
-
- selectChild: function(/*Widget*/ page){
- // summary:
- // Show the given widget (which must be one of my children)
-
- page = dijit.byId(page);
-
- if(this.selectedChildWidget != page){
- // Deselect old page and select new one
- this._transition(page, this.selectedChildWidget);
- this.selectedChildWidget = page;
- dojo.publish(this.id+"-selectChild", [page]);
- }
- },
-
- _transition: function(/*Widget*/newWidget, /*Widget*/oldWidget){
- if(oldWidget){
- this._hideChild(oldWidget);
- }
- this._showChild(newWidget);
-
- // Size the new widget, in case this is the first time it's being shown,
- // or I have been resized since the last time it was shown.
- // page must be visible for resizing to work
- if(this.doLayout && newWidget.resize){
- newWidget.resize(this._containerContentBox || this._contentBox);
- }
- },
-
- _adjacent: function(/*Boolean*/ forward){
- // summary: Gets the next/previous child widget in this container from the current selection
- var children = this.getChildren();
- var index = dojo.indexOf(children, this.selectedChildWidget);
- index += forward ? 1 : children.length - 1;
- return children[ index % children.length ]; // dijit._Widget
- },
-
- forward: function(){
- // Summary: advance to next page
- this.selectChild(this._adjacent(true));
- },
-
- back: function(){
- // Summary: go back to previous page
- this.selectChild(this._adjacent(false));
- },
-
- _onKeyPress: function(e){
- dojo.publish(this.id+"-containerKeyPress", [{ e: e, page: this}]);
- },
-
- layout: function(){
- if(this.doLayout && this.selectedChildWidget && this.selectedChildWidget.resize){
- this.selectedChildWidget.resize(this._contentBox);
- }
- },
-
- _showChild: function(/*Widget*/ page){
- var children = this.getChildren();
- page.isFirstChild = (page == children[0]);
- page.isLastChild = (page == children[children.length-1]);
- page.selected = true;
-
- page.domNode.style.display="";
- if(page._loadCheck){
- page._loadCheck(); // trigger load in ContentPane
- }
- if(page.onShow){
- page.onShow();
- }
- },
-
- _hideChild: function(/*Widget*/ page){
- page.selected=false;
- page.domNode.style.display="none";
- if(page.onHide){
- page.onHide();
- }
- },
-
- closeChild: function(/*Widget*/ page){
- // summary
- // callback when user clicks the [X] to remove a page
- // if onClose() returns true then remove and destroy the childd
- var remove = page.onClose(this, page);
- if(remove){
- this.removeChild(page);
- // makes sure we can clean up executeScripts in ContentPane onUnLoad
- page.destroy();
- }
- },
-
- destroy: function(){
- this._beingDestroyed = true;
- this.inherited("destroy",arguments);
- }
-});
-
-dojo.declare(
- "dijit.layout.StackController",
- [dijit._Widget, dijit._Templated, dijit._Container],
- {
- // summary:
- // Set of buttons to select a page in a page list.
- // Monitors the specified StackContainer, and whenever a page is
- // added, deleted, or selected, updates itself accordingly.
-
- templateString: "<span wairole='tablist' dojoAttachEvent='onkeypress' class='dijitStackController'></span>",
-
- // containerId: String
- // the id of the page container that I point to
- containerId: "",
-
- // buttonWidget: String
- // the name of the button widget to create to correspond to each page
- buttonWidget: "dijit.layout._StackButton",
-
- postCreate: function(){
- dijit.setWaiRole(this.domNode, "tablist");
-
- this.pane2button = {}; // mapping from panes to buttons
- this._subscriptions=[
- dojo.subscribe(this.containerId+"-startup", this, "onStartup"),
- dojo.subscribe(this.containerId+"-addChild", this, "onAddChild"),
- dojo.subscribe(this.containerId+"-removeChild", this, "onRemoveChild"),
- dojo.subscribe(this.containerId+"-selectChild", this, "onSelectChild"),
- dojo.subscribe(this.containerId+"-containerKeyPress", this, "onContainerKeyPress")
- ];
- },
-
- onStartup: function(/*Object*/ info){
- // summary: called after StackContainer has finished initializing
- dojo.forEach(info.children, this.onAddChild, this);
- this.onSelectChild(info.selected);
- },
-
- destroy: function(){
- dojo.forEach(this._subscriptions, dojo.unsubscribe);
- this.inherited("destroy",arguments);
- },
-
- onAddChild: function(/*Widget*/ page, /*Integer?*/ insertIndex){
- // summary:
- // Called whenever a page is added to the container.
- // Create button corresponding to the page.
-
- // add a node that will be promoted to the button widget
- var refNode = document.createElement("span");
- this.domNode.appendChild(refNode);
- // create an instance of the button widget
- var cls = dojo.getObject(this.buttonWidget);
- var button = new cls({label: page.title, closeButton: page.closable}, refNode);
- this.addChild(button, insertIndex);
- this.pane2button[page] = button;
- page.controlButton = button; // this value might be overwritten if two tabs point to same container
-
- dojo.connect(button, "onClick", dojo.hitch(this,"onButtonClick",page));
- dojo.connect(button, "onClickCloseButton", dojo.hitch(this,"onCloseButtonClick",page));
-
- if(!this._currentChild){ // put the first child into the tab order
- button.focusNode.setAttribute("tabIndex","0");
- this._currentChild = page;
- }
- },
-
- onRemoveChild: function(/*Widget*/ page){
- // summary:
- // Called whenever a page is removed from the container.
- // Remove the button corresponding to the page.
- if(this._currentChild === page){ this._currentChild = null; }
- var button = this.pane2button[page];
- if(button){
- // TODO? if current child { reassign }
- button.destroy();
- }
- this.pane2button[page] = null;
- },
-
- onSelectChild: function(/*Widget*/ page){
- // summary:
- // Called when a page has been selected in the StackContainer, either by me or by another StackController
-
- if(!page){ return; }
-
- if(this._currentChild){
- var oldButton=this.pane2button[this._currentChild];
- oldButton.setChecked(false);
- oldButton.focusNode.setAttribute("tabIndex", "-1");
- }
-
- var newButton=this.pane2button[page];
- newButton.setChecked(true);
- this._currentChild = page;
- newButton.focusNode.setAttribute("tabIndex", "0");
- },
-
- onButtonClick: function(/*Widget*/ page){
- // summary:
- // Called whenever one of my child buttons is pressed in an attempt to select a page
- var container = dijit.byId(this.containerId); // TODO: do this via topics?
- container.selectChild(page);
- },
-
- onCloseButtonClick: function(/*Widget*/ page){
- // summary:
- // Called whenever one of my child buttons [X] is pressed in an attempt to close a page
- var container = dijit.byId(this.containerId);
- container.closeChild(page);
- var b = this.pane2button[this._currentChild];
- if(b){
- dijit.focus(b.focusNode || b.domNode);
- }
- },
-
- // TODO: this is a bit redundant with forward, back api in StackContainer
- adjacent: function(/*Boolean*/ forward){
- // find currently focused button in children array
- var children = this.getChildren();
- var current = dojo.indexOf(children, this.pane2button[this._currentChild]);
- // pick next button to focus on
- var offset = forward ? 1 : children.length - 1;
- return children[ (current + offset) % children.length ]; // dijit._Widget
- },
-
- onkeypress: function(/*Event*/ e){
- // summary:
- // Handle keystrokes on the page list, for advancing to next/previous button
- // and closing the current page if the page is closable.
-
- if(this.disabled || e.altKey ){ return; }
- var forward = true;
- if(e.ctrlKey || !e._djpage){
- var k = dojo.keys;
- switch(e.keyCode){
- case k.LEFT_ARROW:
- case k.UP_ARROW:
- case k.PAGE_UP:
- forward = false;
- // fall through
- case k.RIGHT_ARROW:
- case k.DOWN_ARROW:
- case k.PAGE_DOWN:
- this.adjacent(forward).onClick();
- dojo.stopEvent(e);
- break;
- case k.DELETE:
- if(this._currentChild.closable){
- this.onCloseButtonClick(this._currentChild);
- }
- dojo.stopEvent(e);
- break;
- default:
- if(e.ctrlKey){
- if(e.keyCode == k.TAB){
- this.adjacent(!e.shiftKey).onClick();
- dojo.stopEvent(e);
- }else if(e.keyChar == "w"){
- if(this._currentChild.closable){
- this.onCloseButtonClick(this._currentChild);
- }
- dojo.stopEvent(e); // avoid browser tab closing.
- }
- }
- }
- }
- },
-
- onContainerKeyPress: function(/*Object*/ info){
- info.e._djpage = info.page;
- this.onkeypress(info.e);
- }
-});
-
-dojo.declare("dijit.layout._StackButton",
- dijit.form.ToggleButton,
- {
- // summary
- // Internal widget used by StackContainer.
- // The button-like or tab-like object you click to select or delete a page
-
- tabIndex: "-1", // StackContainer buttons are not in the tab order by default
-
- postCreate: function(/*Event*/ evt){
- dijit.setWaiRole((this.focusNode || this.domNode), "tab");
- this.inherited("postCreate", arguments);
- },
-
- onClick: function(/*Event*/ evt){
- // summary: This is for TabContainer where the tabs are <span> rather than button,
- // so need to set focus explicitly (on some browsers)
- dijit.focus(this.focusNode);
-
- // ... now let StackController catch the event and tell me what to do
- },
-
- onClickCloseButton: function(/*Event*/ evt){
- // summary
- // StackContainer connects to this function; if your widget contains a close button
- // then clicking it should call this function.
- evt.stopPropagation();
- }
-});
-
-// These arguments can be specified for the children of a StackContainer.
-// Since any widget can be specified as a StackContainer child, mix them
-// into the base widget class. (This is a hack, but it's effective.)
-dojo.extend(dijit._Widget, {
- // title: String
- // Title of this widget. Used by TabContainer to the name the tab, etc.
- title: "",
-
- // selected: Boolean
- // Is this child currently selected?
- selected: false,
-
- // closable: Boolean
- // True if user can close (destroy) this child, such as (for example) clicking the X on the tab.
- closable: false, // true if user can close this tab pane
-
- onClose: function(){
- // summary: Callback if someone tries to close the child, child will be closed if func returns true
- return true;
- }
-});
-
+dojo.requireLocalization("dijit","common",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-tw");
+dojo.require("dojo.cookie");
+dojo.declare("dijit.layout.StackContainer",dijit.layout._LayoutWidget,{doLayout:true,persist:false,baseClass:"dijitStackContainer",postCreate:function(){
+this.inherited(arguments);
+dojo.addClass(this.domNode,"dijitLayoutContainer");
+dijit.setWaiRole(this.containerNode,"tabpanel");
+this.connect(this.domNode,"onkeypress",this._onKeyPress);
+},startup:function(){
+if(this._started){
+return;
+}
+var _1=this.getChildren();
+dojo.forEach(_1,this._setupChild,this);
+if(this.persist){
+this.selectedChildWidget=dijit.byId(dojo.cookie(this.id+"_selectedChild"));
+}else{
+dojo.some(_1,function(_2){
+if(_2.selected){
+this.selectedChildWidget=_2;
+}
+return _2.selected;
+},this);
+}
+var _3=this.selectedChildWidget;
+if(!_3&&_1[0]){
+_3=this.selectedChildWidget=_1[0];
+_3.selected=true;
+}
+dojo.publish(this.id+"-startup",[{children:_1,selected:_3}]);
+this.inherited(arguments);
+},resize:function(){
+var _4=this.selectedChildWidget;
+if(_4&&!this._hasBeenShown){
+this._hasBeenShown=true;
+this._showChild(_4);
+}
+this.inherited(arguments);
+},_setupChild:function(_5){
+this.inherited(arguments);
+dojo.removeClass(_5.domNode,"dijitVisible");
+dojo.addClass(_5.domNode,"dijitHidden");
+_5.domNode.title="";
+},addChild:function(_6,_7){
+this.inherited(arguments);
+if(this._started){
+dojo.publish(this.id+"-addChild",[_6,_7]);
+this.layout();
+if(!this.selectedChildWidget){
+this.selectChild(_6);
+}
+}
+},removeChild:function(_8){
+this.inherited(arguments);
+if(this._started){
+dojo.publish(this.id+"-removeChild",[_8]);
+}
+if(this._beingDestroyed){
+return;
+}
+if(this._started){
+this.layout();
+}
+if(this.selectedChildWidget===_8){
+this.selectedChildWidget=undefined;
+if(this._started){
+var _9=this.getChildren();
+if(_9.length){
+this.selectChild(_9[0]);
}
+}
+}
+},selectChild:function(_a){
+_a=dijit.byId(_a);
+if(this.selectedChildWidget!=_a){
+this._transition(_a,this.selectedChildWidget);
+this.selectedChildWidget=_a;
+dojo.publish(this.id+"-selectChild",[_a]);
+if(this.persist){
+dojo.cookie(this.id+"_selectedChild",this.selectedChildWidget.id);
+}
+}
+},_transition:function(_b,_c){
+if(_c){
+this._hideChild(_c);
+}
+this._showChild(_b);
+if(_b.resize){
+if(this.doLayout){
+_b.resize(this._containerContentBox||this._contentBox);
+}else{
+_b.resize();
+}
+}
+},_adjacent:function(_d){
+var _e=this.getChildren();
+var _f=dojo.indexOf(_e,this.selectedChildWidget);
+_f+=_d?1:_e.length-1;
+return _e[_f%_e.length];
+},forward:function(){
+this.selectChild(this._adjacent(true));
+},back:function(){
+this.selectChild(this._adjacent(false));
+},_onKeyPress:function(e){
+dojo.publish(this.id+"-containerKeyPress",[{e:e,page:this}]);
+},layout:function(){
+if(this.doLayout&&this.selectedChildWidget&&this.selectedChildWidget.resize){
+this.selectedChildWidget.resize(this._contentBox);
+}
+},_showChild:function(_10){
+var _11=this.getChildren();
+_10.isFirstChild=(_10==_11[0]);
+_10.isLastChild=(_10==_11[_11.length-1]);
+_10.selected=true;
+dojo.removeClass(_10.domNode,"dijitHidden");
+dojo.addClass(_10.domNode,"dijitVisible");
+_10._onShow();
+},_hideChild:function(_12){
+_12.selected=false;
+dojo.removeClass(_12.domNode,"dijitVisible");
+dojo.addClass(_12.domNode,"dijitHidden");
+_12.onHide();
+},closeChild:function(_13){
+var _14=_13.onClose(this,_13);
+if(_14){
+this.removeChild(_13);
+_13.destroyRecursive();
+}
+},destroyDescendants:function(_15){
+dojo.forEach(this.getChildren(),function(_16){
+this.removeChild(_16);
+_16.destroyRecursive(_15);
+},this);
+}});
+dojo.require("dijit.layout.StackController");
+dojo.extend(dijit._Widget,{selected:false,closable:false,iconClass:"",showTitle:true,onClose:function(){
+return true;
+}});
+}
diff --git a/js/dojo/dijit/layout/TabContainer.js b/js/dojo/dijit/layout/TabContainer.js
--- a/js/dojo/dijit/layout/TabContainer.js
+++ b/js/dojo/dijit/layout/TabContainer.js
@@ -1,146 +1,23 @@
-if(!dojo._hasResource["dijit.layout.TabContainer"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.layout.TabContainer"] = true;
-dojo.provide("dijit.layout.TabContainer");
-
-dojo.require("dijit.layout.StackContainer");
-dojo.require("dijit._Templated");
-
-dojo.declare("dijit.layout.TabContainer",
- [dijit.layout.StackContainer, dijit._Templated],
- {
- // summary:
- // A Container with Title Tabs, each one pointing at a pane in the container.
- // description:
- // A TabContainer is a container that has multiple panes, but shows only
- // one pane at a time. There are a set of tabs corresponding to each pane,
- // where each tab has the title (aka title) of the pane, and optionally a close button.
- //
- // Publishes topics <widgetId>-addChild, <widgetId>-removeChild, and <widgetId>-selectChild
- // (where <widgetId> is the id of the TabContainer itself.
- //
- // tabPosition: String
- // Defines where tabs go relative to tab content.
- // "top", "bottom", "left-h", "right-h"
- tabPosition: "top",
-
- templateString: null, // override setting in StackContainer
- templateString:"<div class=\"dijitTabContainer\">\n\t<div dojoAttachPoint=\"tablistNode\"></div>\n\t<div class=\"dijitTabPaneWrapper\" dojoAttachPoint=\"containerNode\"></div>\n</div>\n",
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- postCreate: function(){
- dijit.layout.TabContainer.superclass.postCreate.apply(this, arguments);
- // create the tab list that will have a tab (a.k.a. tab button) for each tab panel
- this.tablist = new dijit.layout.TabController(
- {
- id: this.id + "_tablist",
- tabPosition: this.tabPosition,
- doLayout: this.doLayout,
- containerId: this.id
- }, this.tablistNode);
- },
-
- _setupChild: function(/* Widget */tab){
- dojo.addClass(tab.domNode, "dijitTabPane");
- this.inherited("_setupChild",arguments);
- return tab; // Widget
- },
-
- startup: function(){
- if(this._started){ return; }
-
- // wire up the tablist and its tabs
- this.tablist.startup();
- this.inherited("startup",arguments);
-
- if(dojo.isSafari){
- // sometimes safari 3.0.3 miscalculates the height of the tab labels, see #4058
- setTimeout(dojo.hitch(this, "layout"), 0);
- }
- },
-
- layout: function(){
- // Summary: Configure the content pane to take up all the space except for where the tabs are
- if(!this.doLayout){ return; }
-
- // position and size the titles and the container node
- var titleAlign=this.tabPosition.replace(/-h/,"");
- var children = [
- {domNode: this.tablist.domNode, layoutAlign: titleAlign},
- {domNode: this.containerNode, layoutAlign: "client"}
- ];
- dijit.layout.layoutChildren(this.domNode, this._contentBox, children);
- // Compute size to make each of my children.
- // children[1] is the margin-box size of this.containerNode, set by layoutChildren() call above
- this._containerContentBox = dijit.layout.marginBox2contentBox(this.containerNode, children[1]);
-
- if(this.selectedChildWidget){
- this._showChild(this.selectedChildWidget);
- if(this.doLayout && this.selectedChildWidget.resize){
- this.selectedChildWidget.resize(this._containerContentBox);
- }
- }
- },
-
- destroy: function(){
- this.tablist.destroy();
- this.inherited("destroy",arguments);
- }
-});
-
-//TODO: make private?
-dojo.declare("dijit.layout.TabController",
- dijit.layout.StackController,
- {
- // summary:
- // Set of tabs (the things with titles and a close button, that you click to show a tab panel).
- // description:
- // Lets the user select the currently shown pane in a TabContainer or StackContainer.
- // TabController also monitors the TabContainer, and whenever a pane is
- // added or deleted updates itself accordingly.
-
- templateString: "<div wairole='tablist' dojoAttachEvent='onkeypress:onkeypress'></div>",
-
- // tabPosition: String
- // Defines where tabs go relative to the content.
- // "top", "bottom", "left-h", "right-h"
- tabPosition: "top",
-
- // doLayout: Boolean
- // TODOC: deprecate doLayout? not sure.
- doLayout: true,
-
- // buttonWidget: String
- // the name of the tab widget to create to correspond to each page
- buttonWidget: "dijit.layout._TabButton",
-
- postMixInProperties: function(){
- this["class"] = "dijitTabLabels-" + this.tabPosition + (this.doLayout ? "" : " dijitTabNoLayout");
- this.inherited("postMixInProperties",arguments);
- }
-});
-
-dojo.declare("dijit.layout._TabButton",
- dijit.layout._StackButton,
- {
- // summary:
- // A tab (the thing you click to select a pane).
- // description:
- // Contains the title of the pane, and optionally a close-button to destroy the pane.
- // This is an internal widget and should not be instantiated directly.
-
- baseClass: "dijitTab",
-
- templateString:"<div dojoAttachEvent='onclick:onClick,onmouseenter:_onMouse,onmouseleave:_onMouse'>\n <div class='dijitTabInnerDiv' dojoAttachPoint='innerDiv'>\n <span dojoAttachPoint='containerNode,focusNode'>${!label}</span>\n <span dojoAttachPoint='closeButtonNode' class='closeImage' dojoAttachEvent='onmouseenter:_onMouse, onmouseleave:_onMouse, onclick:onClickCloseButton' stateModifier='CloseButton'>\n <span dojoAttachPoint='closeText' class='closeText'>x</span>\n </span>\n </div>\n</div>\n",
-
- postCreate: function(){
- if(this.closeButton){
- dojo.addClass(this.innerDiv, "dijitClosable");
- } else {
- this.closeButtonNode.style.display="none";
- }
- this.inherited("postCreate",arguments);
- dojo.setSelectable(this.containerNode, false);
- }
-});
-
+if(!dojo._hasResource["dijit.layout.TabContainer"]){
+dojo._hasResource["dijit.layout.TabContainer"]=true;
+dojo.provide("dijit.layout.TabContainer");
+dojo.require("dijit.layout._TabContainerBase");
+dojo.require("dijit.layout.TabController");
+dojo.require("dijit.layout.ScrollingTabController");
+dojo.declare("dijit.layout.TabContainer",dijit.layout._TabContainerBase,{useMenu:true,useSlider:true,controllerWidget:"",_makeController:function(_1){
+var _2=this.baseClass+"-tabs"+(this.doLayout?"":" dijitTabNoLayout"),_3=dojo.getObject(this.controllerWidget);
+return new _3({id:this.id+"_tablist",tabPosition:this.tabPosition,doLayout:this.doLayout,containerId:this.id,"class":_2,nested:this.nested,useMenu:this.useMenu,useSlider:this.useSlider,tabStripClass:this.tabStrip?this.baseClass+(this.tabStrip?"":"No")+"Strip":null},_1);
+},postMixInProperties:function(){
+this.inherited(arguments);
+if(!this.controllerWidget){
+this.controllerWidget=(this.tabPosition=="top"||this.tabPosition=="bottom")&&!this.nested?"dijit.layout.ScrollingTabController":"dijit.layout.TabController";
}
+}});
+}
diff --git a/js/dojo/dijit/layout/_LayoutWidget.js b/js/dojo/dijit/layout/_LayoutWidget.js
--- a/js/dojo/dijit/layout/_LayoutWidget.js
+++ b/js/dojo/dijit/layout/_LayoutWidget.js
@@ -1,187 +1,127 @@
-if(!dojo._hasResource["dijit.layout._LayoutWidget"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.layout._LayoutWidget"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit.layout._LayoutWidget"]){
+dojo._hasResource["dijit.layout._LayoutWidget"]=true;
dojo.provide("dijit.layout._LayoutWidget");
-
dojo.require("dijit._Widget");
dojo.require("dijit._Container");
-
-dojo.declare("dijit.layout._LayoutWidget",
- [dijit._Widget, dijit._Container, dijit._Contained],
- {
- // summary
- // Mixin for widgets that contain a list of children like SplitContainer.
- // Widgets which mixin this code must define layout() to lay out the children
-
- isLayoutContainer: true,
-
- postCreate: function(){
- dojo.addClass(this.domNode, "dijitContainer");
- },
-
- startup: function(){
- // summary:
- // Called after all the widgets have been instantiated and their
- // dom nodes have been inserted somewhere under document.body.
- //
- // Widgets should override this method to do any initialization
- // dependent on other widgets existing, and then call
- // this superclass method to finish things off.
- //
- // startup() in subclasses shouldn't do anything
- // size related because the size of the widget hasn't been set yet.
-
- if(this._started){ return; }
- this._started=true;
-
- if(this.getChildren){
- dojo.forEach(this.getChildren(), function(child){ child.startup(); });
- }
-
- // If I am a top level widget
- if(!this.getParent || !this.getParent()){
- // Do recursive sizing and layout of all my descendants
- // (passing in no argument to resize means that it has to glean the size itself)
- this.resize();
-
- // since my parent isn't a layout container, and my style is width=height=100% (or something similar),
- // then I need to watch when the window resizes, and size myself accordingly
- // (passing in no argument to resize means that it has to glean the size itself)
- this.connect(window, 'onresize', function(){this.resize();});
- }
- },
-
- resize: function(args){
- // summary:
- // Explicitly set this widget's size (in pixels),
- // and then call layout() to resize contents (and maybe adjust child widgets)
- //
- // args: Object?
- // {w: int, h: int, l: int, t: int}
-
- var node = this.domNode;
-
- // set margin box size, unless it wasn't specified, in which case use current size
- if(args){
- dojo.marginBox(node, args);
-
- // set offset of the node
- if(args.t){ node.style.top = args.t + "px"; }
- if(args.l){ node.style.left = args.l + "px"; }
- }
- // If either height or width wasn't specified by the user, then query node for it.
- // But note that setting the margin box and then immediately querying dimensions may return
- // inaccurate results, so try not to depend on it.
- var mb = dojo.mixin(dojo.marginBox(node), args||{});
-
- // Save the size of my content box.
- this._contentBox = dijit.layout.marginBox2contentBox(node, mb);
-
- // Callback for widget to adjust size of it's children
- this.layout();
- },
-
- layout: function(){
- // summary
- // Widgets override this method to size & position their contents/children.
- // When this is called this._contentBox is guaranteed to be set (see resize()).
- //
- // This is called after startup(), and also when the widget's size has been
- // changed.
- }
- }
-);
-
-dijit.layout.marginBox2contentBox = function(/*DomNode*/ node, /*Object*/ mb){
- // summary:
- // Given the margin-box size of a node, return it's content box size.
- // Functions like dojo.contentBox() but is more reliable since it doesn't have
- // to wait for the browser to compute sizes.
- var cs = dojo.getComputedStyle(node);
- var me=dojo._getMarginExtents(node, cs);
- var pb=dojo._getPadBorderExtents(node, cs);
- return {
- l: dojo._toPixelValue(node, cs.paddingLeft),
- t: dojo._toPixelValue(node, cs.paddingTop),
- w: mb.w - (me.w + pb.w),
- h: mb.h - (me.h + pb.h)
- };
+dojo.require("dijit._Contained");
+dojo.declare("dijit.layout._LayoutWidget",[dijit._Widget,dijit._Container,dijit._Contained],{baseClass:"dijitLayoutContainer",isLayoutContainer:true,postCreate:function(){
+dojo.addClass(this.domNode,"dijitContainer");
+dojo.addClass(this.domNode,this.baseClass);
+this.inherited(arguments);
+},startup:function(){
+if(this._started){
+return;
+}
+this.inherited(arguments);
+var _1=this.getParent&&this.getParent();
+if(!(_1&&_1.isLayoutContainer)){
+this.resize();
+this.connect(dojo.isIE?this.domNode:dojo.global,"onresize",function(){
+this.resize();
+});
+}
+},resize:function(_2,_3){
+var _4=this.domNode;
+if(_2){
+dojo.marginBox(_4,_2);
+if(_2.t){
+_4.style.top=_2.t+"px";
+}
+if(_2.l){
+_4.style.left=_2.l+"px";
+}
+}
+var mb=_3||{};
+dojo.mixin(mb,_2||{});
+if(!("h" in mb)||!("w" in mb)){
+mb=dojo.mixin(dojo.marginBox(_4),mb);
+}
+var cs=dojo.getComputedStyle(_4);
+var me=dojo._getMarginExtents(_4,cs);
+var be=dojo._getBorderExtents(_4,cs);
+var bb=(this._borderBox={w:mb.w-(me.w+be.w),h:mb.h-(me.h+be.h)});
+var pe=dojo._getPadExtents(_4,cs);
+this._contentBox={l:dojo._toPixelValue(_4,cs.paddingLeft),t:dojo._toPixelValue(_4,cs.paddingTop),w:bb.w-pe.w,h:bb.h-pe.h};
+this.layout();
+},layout:function(){
+},_setupChild:function(_5){
+dojo.addClass(_5.domNode,this.baseClass+"-child");
+if(_5.baseClass){
+dojo.addClass(_5.domNode,this.baseClass+"-"+_5.baseClass);
+}
+},addChild:function(_6,_7){
+this.inherited(arguments);
+if(this._started){
+this._setupChild(_6);
+}
+},removeChild:function(_8){
+dojo.removeClass(_8.domNode,this.baseClass+"-child");
+if(_8.baseClass){
+dojo.removeClass(_8.domNode,this.baseClass+"-"+_8.baseClass);
+}
+this.inherited(arguments);
+}});
+dijit.layout.marginBox2contentBox=function(_9,mb){
+var cs=dojo.getComputedStyle(_9);
+var me=dojo._getMarginExtents(_9,cs);
+var pb=dojo._getPadBorderExtents(_9,cs);
+return {l:dojo._toPixelValue(_9,cs.paddingLeft),t:dojo._toPixelValue(_9,cs.paddingTop),w:mb.w-(me.w+pb.w),h:mb.h-(me.h+pb.h)};
};
-
(function(){
- var capitalize = function(word){
- return word.substring(0,1).toUpperCase() + word.substring(1);
- };
-
- var size = function(widget, dim){
- // size the child
- widget.resize ? widget.resize(dim) : dojo.marginBox(widget.domNode, dim);
-
- // record child's size, but favor our own numbers when we have them.
- // the browser lies sometimes
- dojo.mixin(widget, dojo.marginBox(widget.domNode));
- dojo.mixin(widget, dim);
- };
-
- dijit.layout.layoutChildren = function(/*DomNode*/ container, /*Object*/ dim, /*Object[]*/ children){
- /**
- * summary
- * Layout a bunch of child dom nodes within a parent dom node
- * container:
- * parent node
- * dim:
- * {l, t, w, h} object specifying dimensions of container into which to place children
- * children:
- * an array like [ {domNode: foo, layoutAlign: "bottom" }, {domNode: bar, layoutAlign: "client"} ]
- */
-
- // copy dim because we are going to modify it
- dim = dojo.mixin({}, dim);
-
- dojo.addClass(container, "dijitLayoutContainer");
-
- // Move "client" elements to the end of the array for layout. a11y dictates that the author
- // needs to be able to put them in the document in tab-order, but this algorithm requires that
- // client be last.
- children = dojo.filter(children, function(item){ return item.layoutAlign != "client"; })
- .concat(dojo.filter(children, function(item){ return item.layoutAlign == "client"; }));
-
- // set positions/sizes
- dojo.forEach(children, function(child){
- var elm = child.domNode,
- pos = child.layoutAlign;
-
- // set elem to upper left corner of unused space; may move it later
- var elmStyle = elm.style;
- elmStyle.left = dim.l+"px";
- elmStyle.top = dim.t+"px";
- elmStyle.bottom = elmStyle.right = "auto";
-
- dojo.addClass(elm, "dijitAlign" + capitalize(pos));
-
- // set size && adjust record of remaining space.
- // note that setting the width of a <div> may affect it's height.
- if(pos=="top" || pos=="bottom"){
- size(child, { w: dim.w });
- dim.h -= child.h;
- if(pos=="top"){
- dim.t += child.h;
- }else{
- elmStyle.top = dim.t + dim.h + "px";
- }
- }else if(pos=="left" || pos=="right"){
- size(child, { h: dim.h });
- dim.w -= child.w;
- if(pos=="left"){
- dim.l += child.w;
- }else{
- elmStyle.left = dim.l + dim.w + "px";
- }
- }else if(pos=="client"){
- size(child, dim);
- }
- });
- };
-
+var _a=function(_b){
+return _b.substring(0,1).toUpperCase()+_b.substring(1);
+};
+var _c=function(_d,_e){
+_d.resize?_d.resize(_e):dojo.marginBox(_d.domNode,_e);
+dojo.mixin(_d,dojo.marginBox(_d.domNode));
+dojo.mixin(_d,_e);
+};
+dijit.layout.layoutChildren=function(_f,dim,_10){
+dim=dojo.mixin({},dim);
+dojo.addClass(_f,"dijitLayoutContainer");
+_10=dojo.filter(_10,function(_11){
+return _11.layoutAlign!="client";
+}).concat(dojo.filter(_10,function(_12){
+return _12.layoutAlign=="client";
+}));
+dojo.forEach(_10,function(_13){
+var elm=_13.domNode,pos=_13.layoutAlign;
+var _14=elm.style;
+_14.left=dim.l+"px";
+_14.top=dim.t+"px";
+_14.bottom=_14.right="auto";
+dojo.addClass(elm,"dijitAlign"+_a(pos));
+if(pos=="top"||pos=="bottom"){
+_c(_13,{w:dim.w});
+dim.h-=_13.h;
+if(pos=="top"){
+dim.t+=_13.h;
+}else{
+_14.top=dim.t+dim.h+"px";
+}
+}else{
+if(pos=="left"||pos=="right"){
+_c(_13,{h:dim.h});
+dim.w-=_13.w;
+if(pos=="left"){
+dim.l+=_13.w;
+}else{
+_14.left=dim.l+dim.w+"px";
+}
+}else{
+if(pos=="client"){
+_c(_13,dim);
+}
+}
+}
+});
+};
})();
-
}
diff --git a/js/dojo/dijit/nls/common.js b/js/dojo/dijit/nls/common.js
--- a/js/dojo/dijit/nls/common.js
+++ b/js/dojo/dijit/nls/common.js
@@ -1,1 +1,1 @@
-({"buttonCancel": "Cancel", "buttonSave": "Save", "buttonOk": "OK"})
\ No newline at end of file
+({"buttonOk":"OK","buttonCancel":"Cancel","buttonSave":"Save","itemClose":"Close"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/cs/common.js b/js/dojo/dijit/nls/cs/common.js
--- a/js/dojo/dijit/nls/cs/common.js
+++ b/js/dojo/dijit/nls/cs/common.js
@@ -1,1 +1,1 @@
-({"buttonCancel": "Storno", "buttonSave": "Uložit", "buttonOk": "OK"})
\ No newline at end of file
+({"buttonOk":"OK","buttonCancel":"Storno","buttonSave":"Uložit","itemClose":"Zavřít"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/cs/loading.js b/js/dojo/dijit/nls/cs/loading.js
--- a/js/dojo/dijit/nls/cs/loading.js
+++ b/js/dojo/dijit/nls/cs/loading.js
@@ -1,1 +1,1 @@
-({"loadingState": "Probíhá načítání...", "errorState": "Omlouváme se, došlo k chybě"})
\ No newline at end of file
+({"loadingState":"Probíhá načítání...","errorState":"Omlouváme se, došlo k chybě"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/de/common.js b/js/dojo/dijit/nls/de/common.js
--- a/js/dojo/dijit/nls/de/common.js
+++ b/js/dojo/dijit/nls/de/common.js
@@ -1,1 +1,1 @@
-({"buttonCancel": "Abbrechen", "buttonSave": "Speichern", "buttonOk": "OK"})
\ No newline at end of file
+({"buttonOk":"OK","buttonCancel":"Abbrechen","buttonSave":"Speichern","itemClose":"Schließen"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/de/loading.js b/js/dojo/dijit/nls/de/loading.js
--- a/js/dojo/dijit/nls/de/loading.js
+++ b/js/dojo/dijit/nls/de/loading.js
@@ -1,1 +1,1 @@
-({"loadingState": "Wird geladen...", "errorState": "Es ist ein Fehler aufgetreten."})
\ No newline at end of file
+({"loadingState":"Wird geladen...","errorState":"Es ist ein Fehler aufgetreten."})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/dijit-all_ROOT.js b/js/dojo/dijit/nls/dijit-all_ROOT.js
--- a/js/dojo/dijit/nls/dijit-all_ROOT.js
+++ b/js/dojo/dijit/nls/dijit-all_ROOT.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_ROOT");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.ROOT");dojo.nls.colors.ROOT={"lightsteelblue": "light steel blue", "orangered": "orange red", "midnightblue": "midnight blue", "cadetblue": "cadet blue", "seashell": "seashell", "slategrey": "slate gray", "coral": "coral", "darkturquoise": "dark turquoise", "antiquewhite": "antique white", "mediumspringgreen": "medium spring green", "salmon": "salmon", "darkgrey": "dark gray", "ivory": "ivory", "greenyellow": "green-yellow", "mistyrose": "misty rose", "lightsalmon": "light salmon", "silver": "silver", "dimgrey": "dim gray", "orange": "orange", "white": "white", "navajowhite": "navajo white", "royalblue": "royal blue", "deeppink": "deep pink", "lime": "lime", "oldlace": "old lace", "chartreuse": "chartreuse", "darkcyan": "dark cyan", "yellow": "yellow", "linen": "linen", "olive": "olive", "gold": "gold", "lawngreen": "lawn green", "lightyellow": "light yellow", "tan": "tan", "darkviolet": "dark violet", "lightslategrey": "light slate gray", "grey": "gray", "darkkhaki": "dark khaki", "green": "green", "deepskyblue": "deep sky blue", "aqua": "aqua", "sienna": "sienna", "mintcream": "mint cream", "rosybrown": "rosy brown", "mediumslateblue": "medium slate blue", "magenta": "magenta", "lightseagreen": "light sea green", "cyan": "cyan", "olivedrab": "olive drab", "darkgoldenrod": "dark goldenrod", "slateblue": "slate blue", "mediumaquamarine": "medium aquamarine", "lavender": "lavender", "mediumseagreen": "medium sea green", "maroon": "maroon", "darkslategray": "dark slate gray", "mediumturquoise": "medium turquoise", "ghostwhite": "ghost white", "darkblue": "dark blue", "mediumvioletred": "medium violet-red", "brown": "brown", "lightgray": "light gray", "sandybrown": "sandy brown", "pink": "pink", "firebrick": "fire brick", "indigo": "indigo", "snow": "snow", "darkorchid": "dark orchid", "turquoise": "turquoise", "chocolate": "chocolate", "springgreen": "spring green", "moccasin": "moccasin", "navy": "navy", "lemonchiffon": "lemon chiffon", "teal": "teal", "floralwhite": "floral white", "cornflowerblue": "cornflower blue", "paleturquoise": "pale turquoise", "purple": "purple", "gainsboro": "gainsboro", "plum": "plum", "red": "red", "blue": "blue", "forestgreen": "forest green", "darkgreen": "dark green", "honeydew": "honeydew", "darkseagreen": "dark sea green", "lightcoral": "light coral", "palevioletred": "pale violet-red", "mediumpurple": "medium purple", "saddlebrown": "saddle brown", "darkmagenta": "dark magenta", "thistle": "thistle", "whitesmoke": "white smoke", "wheat": "wheat", "violet": "violet", "lightskyblue": "light sky blue", "goldenrod": "goldenrod", "mediumblue": "medium blue", "skyblue": "sky blue", "crimson": "crimson", "darksalmon": "dark salmon", "darkred": "dark red", "darkslategrey": "dark slate gray", "peru": "peru", "lightgrey": "light gray", "lightgoldenrodyellow": "light goldenrod yellow", "blanchedalmond": "blanched almond", "aliceblue": "alice blue", "bisque": "bisque", "slategray": "slate gray", "palegoldenrod": "pale goldenrod", "darkorange": "dark orange", "aquamarine": "aquamarine", "lightgreen": "light green", "burlywood": "burlywood", "dodgerblue": "dodger blue", "darkgray": "dark gray", "lightcyan": "light cyan", "powderblue": "powder blue", "blueviolet": "blue-violet", "orchid": "orchid", "dimgray": "dim gray", "beige": "beige", "fuchsia": "fuchsia", "lavenderblush": "lavender blush", "hotpink": "hot pink", "steelblue": "steel blue", "tomato": "tomato", "lightpink": "light pink", "limegreen": "lime green", "indianred": "indian red", "papayawhip": "papaya whip", "lightslategray": "light slate gray", "gray": "gray", "mediumorchid": "medium orchid", "cornsilk": "cornsilk", "black": "black", "seagreen": "sea green", "darkslateblue": "dark slate blue", "khaki": "khaki", "lightblue": "light blue", "palegreen": "pale green", "azure": "azure", "peachpuff": "peach puff", "darkolivegreen": "dark olive green", "yellowgreen": "yellow green"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.ROOT");dijit.nls.loading.ROOT={"loadingState": "Loading...", "errorState": "Sorry, an error occurred"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.ROOT");dijit.nls.Textarea.ROOT={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.ROOT");dijit._editor.nls.commands.ROOT={"removeFormat": "Remove Format", "copy": "Copy", "paste": "Paste", "selectAll": "Select All", "insertOrderedList": "Numbered List", "insertTable": "Insert/Edit Table", "underline": "Underline", "foreColor": "Foreground Color", "htmlToggle": "HTML Source", "formatBlock": "Paragraph Style", "insertHorizontalRule": "Horizontal Rule", "delete": "Delete", "appleKey": "⌘${0}", "insertUnorderedList": "Bullet List", "tableProp": "Table Property", "insertImage": "Insert Image", "superscript": "Superscript", "subscript": "Subscript", "createLink": "Create Link", "undo": "Undo", "italic": "Italic", "fontName": "Font Name", "justifyLeft": "Align Left", "unlink": "Remove Link", "toggleTableBorder": "Toggle Table Border", "ctrlKey": "ctrl+${0}", "fontSize": "Font Size", "indent": "Indent", "redo": "Redo", "strikethrough": "Strikethrough", "justifyFull": "Justify", "justifyCenter": "Align Center", "hiliteColor": "Background Color", "deleteTable": "Delete Table", "outdent": "Outdent", "cut": "Cut", "plainFormatBlock": "Paragraph Style", "bold": "Bold", "systemShortcutFF": "The \"${0}\" action is only available in Mozilla Firefox using a keyboard shortcut. Use ${1}.", "justifyRight": "Align Right"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.ROOT");dojo.cldr.nls.number.ROOT={"scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencyFormat": "¤ #,##0.00", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.ROOT");dijit.nls.common.ROOT={"buttonCancel": "Cancel", "buttonSave": "Save", "buttonOk": "OK"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.ROOT");dijit.form.nls.validate.ROOT={"rangeMessage": "* This value is out of range.", "invalidMessage": "* The value entered is not valid.", "missingMessage": "* This value is required."};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.ROOT");dijit.form.nls.ComboBox.ROOT={"previousMessage": "Previous choices", "nextMessage": "More choices"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.ROOT");dojo.cldr.nls.currency.ROOT={"USD_symbol": "$", "EUR_displayName": "EUR", "GBP_displayName": "GBP", "JPY_displayName": "JPY", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€", "USD_displayName": "USD"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.ROOT");dojo.cldr.nls.gregorian.ROOT={"dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "eraNames": ["BCE", "CE"], "field-weekday": "Day of the Week", "months-standAlone-narrow": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "timeFormat-full": "HH:mm:ss z", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "days-standAlone-narrow": ["1", "2", "3", "4", "5", "6", "7"], "eraAbbr": ["BCE", "CE"], "dateFormat-long": "yyyy MMMM d", "timeFormat-medium": "HH:mm:ss", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateFormat-medium": "yyyy MMM d", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "timeFormat-long": "HH:mm:ss z", "months-format-abbr": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "timeFormat-short": "HH:mm", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "days-format-abbr": ["1", "2", "3", "4", "5", "6", "7"], "pm": "PM", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "am": "AM", "dateFormat-short": "yy/MM/dd", "dateFormat-full": "EEEE, yyyy MMMM dd", "months-format-wide": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "dateTimeFormats-appendItem-Era": "{0} {1}", "quarters-format-wide": ["Q1", "Q2", "Q3", "Q4"], "days-format-wide": ["1", "2", "3", "4", "5", "6", "7"]};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.ROOT");dijit.nls.Textarea.ROOT={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_ROOT");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.ROOT");dojo.nls.colors.ROOT={"lightsteelblue":"light steel blue","orangered":"orange red","midnightblue":"midnight blue","cadetblue":"cadet blue","seashell":"seashell","slategrey":"slate gray","coral":"coral","darkturquoise":"dark turquoise","antiquewhite":"antique white","mediumspringgreen":"medium spring green","salmon":"salmon","darkgrey":"dark gray","ivory":"ivory","greenyellow":"green-yellow","mistyrose":"misty rose","lightsalmon":"light salmon","silver":"silver","dimgrey":"dim gray","orange":"orange","white":"white","navajowhite":"navajo white","royalblue":"royal blue","deeppink":"deep pink","lime":"lime","oldlace":"old lace","chartreuse":"chartreuse","darkcyan":"dark cyan","yellow":"yellow","linen":"linen","olive":"olive","gold":"gold","lawngreen":"lawn green","lightyellow":"light yellow","tan":"tan","darkviolet":"dark violet","lightslategrey":"light slate gray","grey":"gray","darkkhaki":"dark khaki","green":"green","deepskyblue":"deep sky blue","aqua":"aqua","sienna":"sienna","mintcream":"mint cream","rosybrown":"rosy brown","mediumslateblue":"medium slate blue","magenta":"magenta","lightseagreen":"light sea green","cyan":"cyan","olivedrab":"olive drab","darkgoldenrod":"dark goldenrod","slateblue":"slate blue","mediumaquamarine":"medium aquamarine","lavender":"lavender","mediumseagreen":"medium sea green","maroon":"maroon","darkslategray":"dark slate gray","mediumturquoise":"medium turquoise","ghostwhite":"ghost white","darkblue":"dark blue","mediumvioletred":"medium violet-red","brown":"brown","lightgray":"light gray","sandybrown":"sandy brown","pink":"pink","firebrick":"fire brick","indigo":"indigo","snow":"snow","darkorchid":"dark orchid","turquoise":"turquoise","chocolate":"chocolate","springgreen":"spring green","moccasin":"moccasin","navy":"navy","lemonchiffon":"lemon chiffon","teal":"teal","floralwhite":"floral white","cornflowerblue":"cornflower blue","paleturquoise":"pale turquoise","purple":"purple","gainsboro":"gainsboro","plum":"plum","red":"red","blue":"blue","forestgreen":"forest green","darkgreen":"dark green","honeydew":"honeydew","darkseagreen":"dark sea green","lightcoral":"light coral","palevioletred":"pale violet-red","mediumpurple":"medium purple","saddlebrown":"saddle brown","darkmagenta":"dark magenta","thistle":"thistle","whitesmoke":"white smoke","wheat":"wheat","violet":"violet","lightskyblue":"light sky blue","goldenrod":"goldenrod","mediumblue":"medium blue","skyblue":"sky blue","crimson":"crimson","darksalmon":"dark salmon","darkred":"dark red","darkslategrey":"dark slate gray","peru":"peru","lightgrey":"light gray","lightgoldenrodyellow":"light goldenrod yellow","blanchedalmond":"blanched almond","aliceblue":"alice blue","bisque":"bisque","slategray":"slate gray","palegoldenrod":"pale goldenrod","darkorange":"dark orange","aquamarine":"aquamarine","lightgreen":"light green","burlywood":"burlywood","dodgerblue":"dodger blue","darkgray":"dark gray","lightcyan":"light cyan","powderblue":"powder blue","blueviolet":"blue-violet","orchid":"orchid","dimgray":"dim gray","beige":"beige","fuchsia":"fuchsia","lavenderblush":"lavender blush","hotpink":"hot pink","steelblue":"steel blue","tomato":"tomato","lightpink":"light pink","limegreen":"lime green","indianred":"indian red","papayawhip":"papaya whip","lightslategray":"light slate gray","gray":"gray","mediumorchid":"medium orchid","cornsilk":"cornsilk","black":"black","seagreen":"sea green","darkslateblue":"dark slate blue","khaki":"khaki","lightblue":"light blue","palegreen":"pale green","azure":"azure","peachpuff":"peach puff","darkolivegreen":"dark olive green","yellowgreen":"yellow green"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.ROOT");dijit.nls.loading.ROOT={"loadingState":"Loading...","errorState":"Sorry, an error occurred"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.ROOT");dijit.nls.common.ROOT={"buttonOk":"OK","buttonCancel":"Cancel","buttonSave":"Save","itemClose":"Close"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.ROOT");dijit._editor.nls.commands.ROOT={"removeFormat":"Remove Format","copy":"Copy","paste":"Paste","selectAll":"Select All","insertOrderedList":"Numbered List","insertTable":"Insert/Edit Table","print":"Print","underline":"Underline","foreColor":"Foreground Color","htmlToggle":"HTML Source","formatBlock":"Paragraph Style","newPage":"New Page","insertHorizontalRule":"Horizontal Rule","delete":"Delete","appleKey":"⌘${0}","insertUnorderedList":"Bullet List","tableProp":"Table Property","insertImage":"Insert Image","superscript":"Superscript","subscript":"Subscript","createLink":"Create Link","undo":"Undo","fullScreen":"Toggle Full Screen","italic":"Italic","fontName":"Font Name","justifyLeft":"Align Left","unlink":"Remove Link","toggleTableBorder":"Toggle Table Border","viewSource":"View HTML Source","ctrlKey":"ctrl+${0}","fontSize":"Font Size","systemShortcut":"The \"${0}\" action is only available in your browser using a keyboard shortcut. Use ${1}.","indent":"Indent","redo":"Redo","strikethrough":"Strikethrough","justifyFull":"Justify","justifyCenter":"Align Center","hiliteColor":"Background Color","deleteTable":"Delete Table","outdent":"Outdent","cut":"Cut","plainFormatBlock":"Paragraph Style","toggleDir":"Toggle Direction","bold":"Bold","tabIndent":"Tab Indent","justifyRight":"Align Right"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.ROOT");dojo.cldr.nls.number.ROOT={"scientificFormat":"#E0","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","infinity":"∞","list":";","percentSign":"%","minusSign":"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","nan":"NaN","nativeZeroDigit":"0","plusSign":"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencyFormat":"¤ #,##0.00","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","perMille":"‰","group":",","percentFormat":"#,##0%","decimalFormat":"#,##0.###","decimal":".","patternDigit":"#","currencySpacing-beforeCurrency-insertBetween":" ","exponential":"E"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.ROOT");dijit.form.nls.validate.ROOT={"rangeMessage":"This value is out of range.","invalidMessage":"The value entered is not valid.","missingMessage":"This value is required."};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.ROOT");dojo.cldr.nls.currency.ROOT={"CHF_symbol":"Fr.","JPY_symbol":"JP¥","HKD_symbol":"HK$","USD_symbol":"US$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.ROOT");dojo.cldr.nls.gregorian.ROOT={"months-format-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Day of the Week","dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"EEE, y-M-d","dateFormatItem-MMMEd":"E MMM d","eraNarrow":["BCE","CE"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"y MMMM d","months-format-wide":["1","2","3","4","5","6","7","8","9","10","11","12"],"dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d EEE","dateFormat-full":"EEEE, y MMMM dd","dateFormatItem-Md":"M-d","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","field-era":"Era","dateFormatItem-yM":"y-M","months-standAlone-wide":["1","2","3","4","5","6","7","8","9","10","11","12"],"timeFormat-short":"HH:mm","quarters-format-wide":["Q1","Q2","Q3","Q4"],"timeFormat-long":"HH:mm:ss z","field-year":"Year","dateFormatItem-yMMM":"y MMM","dateFormatItem-yQ":"y Q","dateTimeFormats-appendItem-Era":"{0} {1}","field-hour":"Hour","months-format-abbr":["1","2","3","4","5","6","7","8","9","10","11","12"],"timeFormat-full":"HH:mm:ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","am":"AM","months-standAlone-abbr":["1","2","3","4","5","6","7","8","9","10","11","12"],"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["Q1","Q2","Q3","Q4"],"dateFormatItem-M":"L","days-standAlone-wide":["1","2","3","4","5","6","7"],"dateFormatItem-MMMMd":"MMMM d","timeFormat-medium":"HH:mm:ss","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"eraAbbr":["BCE","CE"],"field-minute":"Minute","field-dayperiod":"Dayperiod","days-standAlone-abbr":["1","2","3","4","5","6","7"],"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","dateFormatItem-MMMd":"MMM d","dateFormatItem-MEd":"E, M-d","dateTimeFormat-full":"{1} {0}","dateFormatItem-yMMMM":"y MMMM","field-day":"Day","days-format-wide":["1","2","3","4","5","6","7"],"field-zone":"Zone","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-y":"y","months-standAlone-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","days-format-abbr":["1","2","3","4","5","6","7"],"eraNames":["BCE","CE"],"days-format-narrow":["1","2","3","4","5","6","7"],"field-month":"Month","days-standAlone-narrow":["1","2","3","4","5","6","7"],"dateFormatItem-MMM":"LLL","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","pm":"PM","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateFormatItem-MMMMEd":"E MMMM d","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormat-short":"yyyy-MM-dd","field-second":"Second","dateFormatItem-yMMMEd":"EEE, y MMM d","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"Week","dateFormat-medium":"y MMM d","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.ROOT");dijit.form.nls.ComboBox.ROOT={"previousMessage":"Previous choices","nextMessage":"More choices"};
diff --git a/js/dojo/dijit/nls/dijit-all_cs.js b/js/dojo/dijit/nls/dijit-all_cs.js
--- a/js/dojo/dijit/nls/dijit-all_cs.js
+++ b/js/dojo/dijit/nls/dijit-all_cs.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_cs");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.cs");dojo.nls.colors.cs={"lightsteelblue": "světlá ocelová modrá", "orangered": "oranžovočervená", "midnightblue": "temně modrá", "cadetblue": "šedomodrá", "seashell": "lasturová", "slategrey": "břidlicová šedá", "coral": "korálová červená", "darkturquoise": "tmavě tyrkysová", "antiquewhite": "krémově bílá", "mediumspringgreen": "střední jarní zelená", "salmon": "lososová", "darkgrey": "tmavě šedá", "ivory": "slonovinová", "greenyellow": "zelenožlutá", "mistyrose": "růžovobílá", "lightsalmon": "světle lososová", "silver": "stříbrná", "dimgrey": "kouřově šedá", "orange": "oranžová", "white": "bílá", "navajowhite": "světle krémová", "royalblue": "královská modrá", "deeppink": "sytě růžová", "lime": "limetková", "oldlace": "světle béžová", "chartreuse": "chartreuska", "darkcyan": "tmavě azurová", "yellow": "žlutá", "linen": "bledě šedobéžová", "olive": "olivová", "gold": "zlatá", "lawngreen": "jasně zelená", "lightyellow": "bledě žlutá", "tan": "šedobéžová", "darkviolet": "tmavě fialová", "lightslategrey": "světlá břidlicová šedá", "grey": "šedá", "darkkhaki": "pískově hnědá", "green": "zelená", "deepskyblue": "sytá nebeská modrá", "aqua": "azurová", "sienna": "siena", "mintcream": "mentolová", "rosybrown": "růžovohnědá", "mediumslateblue": "střední břidlicová modrá", "magenta": "purpurová", "lightseagreen": "světlá mořská zelená", "cyan": "azurová", "olivedrab": "khaki", "darkgoldenrod": "tmavě béžová", "slateblue": "břidlicová modrá", "mediumaquamarine": "střední akvamarínová", "lavender": "levandulová", "mediumseagreen": "střední mořská zelená", "maroon": "kaštanová", "darkslategray": "tmavá břidlicová šedá", "mediumturquoise": "středně tyrkysová", "ghostwhite": "modravě bílá", "darkblue": "tmavě modrá", "mediumvioletred": "středně fialovočervená", "brown": "červenohnědá", "lightgray": "světle šedá", "sandybrown": "oranžovohnědá", "pink": "růžová", "firebrick": "cihlová", "indigo": "indigově modrá", "snow": "sněhobílá", "darkorchid": "tmavě orchidejová", "turquoise": "tyrkysová", "chocolate": "hnědobéžová", "springgreen": "jarní zelená", "moccasin": "bledě krémová", "navy": "námořnická modrá", "lemonchiffon": "světle citrónová", "teal": "šedozelená", "floralwhite": "květinově bílá", "cornflowerblue": "chrpově modrá", "paleturquoise": "bledě tyrkysová", "purple": "nachová", "gainsboro": "bledě šedá", "plum": "švestková", "red": "červená", "blue": "modrá", "forestgreen": "lesní zelená", "darkgreen": "tmavě zelená", "honeydew": "nazelenalá", "darkseagreen": "tmavá mořská zelená", "lightcoral": "světle korálová", "palevioletred": "bledě fialovočervená", "mediumpurple": "středně nachová", "saddlebrown": "hnědá", "darkmagenta": "tmavě purpurová", "thistle": "bodláková", "whitesmoke": "kouřově bílá", "wheat": "zlatohnědá", "violet": "fialová", "lightskyblue": "světlá nebeská modrá", "goldenrod": "béžová", "mediumblue": "středně modrá", "skyblue": "nebeská modrá", "crimson": "karmínová", "darksalmon": "tmavě lososová", "darkred": "tmavě červená", "darkslategrey": "tmavá břidlicová šedá", "peru": "karamelová", "lightgrey": "světle šedá", "lightgoldenrodyellow": "světle žlutá", "blanchedalmond": "mandlová", "aliceblue": "modravá", "bisque": "bledě oranžová", "slategray": "břidlicová šedá", "palegoldenrod": "bledě písková", "darkorange": "tmavě oranžová", "aquamarine": "akvamarínová", "lightgreen": "světle zelená", "burlywood": "krémová", "dodgerblue": "jasně modrá", "darkgray": "tmavě šedá", "lightcyan": "světle azurová", "powderblue": "bledě modrá", "blueviolet": "modrofialová", "orchid": "orchidejová", "dimgray": "kouřově šedá", "beige": "bledě béžová", "fuchsia": "fuchsiová", "lavenderblush": "levandulová růžová", "hotpink": "jasně růžová", "steelblue": "ocelová modrá", "tomato": "tomatová", "lightpink": "světle růžová", "limegreen": "limetkově zelená", "indianred": "indiánská červená", "papayawhip": "papájová", "lightslategray": "světlá břidlicová šedá", "gray": "šedá", "mediumorchid": "středně orchidejová", "cornsilk": "režná", "black": "černá", "seagreen": "mořská zelená", "darkslateblue": "tmavá břidlicová modrá", "khaki": "písková", "lightblue": "světle modrá", "palegreen": "bledě zelená", "azure": "bledě azurová", "peachpuff": "broskvová", "darkolivegreen": "tmavě olivová", "yellowgreen": "žlutozelená"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.cs");dijit.nls.loading.cs={"loadingState": "Probíhá načítání...", "errorState": "Omlouváme se, došlo k chybě"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.cs");dijit.nls.Textarea.cs={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.cs");dijit._editor.nls.commands.cs={"removeFormat": "Odebrat formát", "copy": "Kopírovat", "paste": "Vložit", "selectAll": "Vybrat vše", "insertOrderedList": "Číslovaný seznam", "insertTable": "Vložit/upravit tabulku", "underline": "Podtržení", "foreColor": "Barva popředí", "htmlToggle": "Zdroj HTML", "formatBlock": "Styl odstavce", "insertHorizontalRule": "Vodorovné pravítko", "delete": "Odstranit", "insertUnorderedList": "Seznam s odrážkami", "tableProp": "Vlastnost tabulky", "insertImage": "Vložit obraz", "superscript": "Horní index", "subscript": "Dolní index", "createLink": "Vytvořit odkaz", "undo": "Zpět", "italic": "Kurzíva", "fontName": "Název písma", "justifyLeft": "Zarovnat vlevo", "unlink": "Odebrat odkaz", "toggleTableBorder": "Přepnout ohraničení tabulky", "fontSize": "Velikost písma", "indent": "Odsadit", "redo": "Opakovat", "strikethrough": "Přeškrtnutí", "justifyFull": "Do bloku", "justifyCenter": "Zarovnat na střed", "hiliteColor": "Barva pozadí", "deleteTable": "Odstranit tabulku", "outdent": "Předsadit", "cut": "Vyjmout", "plainFormatBlock": "Styl odstavce", "bold": "Tučné", "systemShortcutFF": "Akce \"${0}\" je v prohlížeči Mozilla Firefox dostupná pouze prostřednictvím klávesové zkratky. Použijte klávesy ${1}.", "justifyRight": "Zarovnat vpravo", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.cs");dojo.cldr.nls.number.cs={"scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencyFormat": "¤ #,##0.00", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.cs");dijit.nls.common.cs={"buttonCancel": "Storno", "buttonSave": "Uložit", "buttonOk": "OK"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.cs");dijit.form.nls.validate.cs={"rangeMessage": "* Tato hodnota je mimo rozsah.", "invalidMessage": "* Zadaná hodnota není platná.", "missingMessage": "* Tato hodnota je vyžadována."};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.cs");dijit.form.nls.ComboBox.cs={"previousMessage": "Předchozí volby", "nextMessage": "Další volby"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.cs");dojo.cldr.nls.currency.cs={"USD_symbol": "$", "EUR_displayName": "EUR", "GBP_displayName": "GBP", "JPY_displayName": "JPY", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€", "USD_displayName": "USD"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.cs");dojo.cldr.nls.gregorian.cs={"dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "eraNames": ["BCE", "CE"], "field-weekday": "Day of the Week", "months-standAlone-narrow": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "timeFormat-full": "HH:mm:ss z", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "days-standAlone-narrow": ["1", "2", "3", "4", "5", "6", "7"], "eraAbbr": ["BCE", "CE"], "dateFormat-long": "yyyy MMMM d", "timeFormat-medium": "HH:mm:ss", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateFormat-medium": "yyyy MMM d", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "timeFormat-long": "HH:mm:ss z", "months-format-abbr": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "timeFormat-short": "HH:mm", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "days-format-abbr": ["1", "2", "3", "4", "5", "6", "7"], "pm": "PM", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "am": "AM", "dateFormat-short": "yy/MM/dd", "dateFormat-full": "EEEE, yyyy MMMM dd", "months-format-wide": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "dateTimeFormats-appendItem-Era": "{0} {1}", "quarters-format-wide": ["Q1", "Q2", "Q3", "Q4"], "days-format-wide": ["1", "2", "3", "4", "5", "6", "7"]};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.cs");dijit.nls.Textarea.cs={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_cs");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.cs");dojo.nls.colors.cs={"lightsteelblue":"světlá ocelová modrá","orangered":"oranžovočervená","midnightblue":"temně modrá","cadetblue":"šedomodrá","seashell":"lasturová","slategrey":"břidlicová šedá","coral":"korálová červená","darkturquoise":"tmavě tyrkysová","antiquewhite":"krémově bílá","mediumspringgreen":"střední jarní zelená","salmon":"lososová","darkgrey":"tmavě šedá","ivory":"slonovinová","greenyellow":"zelenožlutá","mistyrose":"růžovobílá","lightsalmon":"světle lososová","silver":"stříbrná","dimgrey":"kouřově šedá","orange":"oranžová","white":"bílá","navajowhite":"světle krémová","royalblue":"královská modrá","deeppink":"sytě růžová","lime":"limetková","oldlace":"světle béžová","chartreuse":"chartreuska","darkcyan":"tmavě azurová","yellow":"žlutá","linen":"bledě šedobéžová","olive":"olivová","gold":"zlatá","lawngreen":"jasně zelená","lightyellow":"bledě žlutá","tan":"šedobéžová","darkviolet":"tmavě fialová","lightslategrey":"světlá břidlicová šedá","grey":"šedá","darkkhaki":"pískově hnědá","green":"zelená","deepskyblue":"sytá nebeská modrá","aqua":"azurová","sienna":"siena","mintcream":"mentolová","rosybrown":"růžovohnědá","mediumslateblue":"střední břidlicová modrá","magenta":"purpurová","lightseagreen":"světlá mořská zelená","cyan":"azurová","olivedrab":"khaki","darkgoldenrod":"tmavě béžová","slateblue":"břidlicová modrá","mediumaquamarine":"střední akvamarínová","lavender":"levandulová","mediumseagreen":"střední mořská zelená","maroon":"kaštanová","darkslategray":"tmavá břidlicová šedá","mediumturquoise":"středně tyrkysová","ghostwhite":"modravě bílá","darkblue":"tmavě modrá","mediumvioletred":"středně fialovočervená","brown":"červenohnědá","lightgray":"světle šedá","sandybrown":"oranžovohnědá","pink":"růžová","firebrick":"cihlová","indigo":"indigově modrá","snow":"sněhobílá","darkorchid":"tmavě orchidejová","turquoise":"tyrkysová","chocolate":"hnědobéžová","springgreen":"jarní zelená","moccasin":"bledě krémová","navy":"námořnická modrá","lemonchiffon":"světle citrónová","teal":"šedozelená","floralwhite":"květinově bílá","cornflowerblue":"chrpově modrá","paleturquoise":"bledě tyrkysová","purple":"nachová","gainsboro":"bledě šedá","plum":"švestková","red":"červená","blue":"modrá","forestgreen":"lesní zelená","darkgreen":"tmavě zelená","honeydew":"nazelenalá","darkseagreen":"tmavá mořská zelená","lightcoral":"světle korálová","palevioletred":"bledě fialovočervená","mediumpurple":"středně nachová","saddlebrown":"hnědá","darkmagenta":"tmavě purpurová","thistle":"bodláková","whitesmoke":"kouřově bílá","wheat":"zlatohnědá","violet":"fialová","lightskyblue":"světlá nebeská modrá","goldenrod":"béžová","mediumblue":"středně modrá","skyblue":"nebeská modrá","crimson":"karmínová","darksalmon":"tmavě lososová","darkred":"tmavě červená","darkslategrey":"tmavá břidlicová šedá","peru":"karamelová","lightgrey":"světle šedá","lightgoldenrodyellow":"světle žlutá","blanchedalmond":"mandlová","aliceblue":"modravá","bisque":"bledě oranžová","slategray":"břidlicová šedá","palegoldenrod":"bledě písková","darkorange":"tmavě oranžová","aquamarine":"akvamarínová","lightgreen":"světle zelená","burlywood":"krémová","dodgerblue":"jasně modrá","darkgray":"tmavě šedá","lightcyan":"světle azurová","powderblue":"bledě modrá","blueviolet":"modrofialová","orchid":"orchidejová","dimgray":"kouřově šedá","beige":"bledě béžová","fuchsia":"fuchsiová","lavenderblush":"levandulová růžová","hotpink":"jasně růžová","steelblue":"ocelová modrá","tomato":"tomatová","lightpink":"světle růžová","limegreen":"limetkově zelená","indianred":"indiánská červená","papayawhip":"papájová","lightslategray":"světlá břidlicová šedá","gray":"šedá","mediumorchid":"středně orchidejová","cornsilk":"režná","black":"černá","seagreen":"mořská zelená","darkslateblue":"tmavá břidlicová modrá","khaki":"písková","lightblue":"světle modrá","palegreen":"bledě zelená","azure":"bledě azurová","peachpuff":"broskvová","darkolivegreen":"tmavě olivová","yellowgreen":"žlutozelená"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.cs");dijit.nls.loading.cs={"loadingState":"Probíhá načítání...","errorState":"Omlouváme se, došlo k chybě"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.cs");dijit.nls.common.cs={"buttonOk":"OK","buttonCancel":"Storno","buttonSave":"Uložit","itemClose":"Zavřít"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.cs");dijit._editor.nls.commands.cs={"removeFormat":"Odebrat formát","copy":"Kopírovat","paste":"Vložit","selectAll":"Vybrat vše","insertOrderedList":"Číslovaný seznam","insertTable":"Vložit/upravit tabulku","print":"Tisk","underline":"Podtržení","foreColor":"Barva popředí","htmlToggle":"Zdroj HTML","formatBlock":"Styl odstavce","newPage":"Nová stránka","insertHorizontalRule":"Vodorovná čára","delete":"Odstranit","insertUnorderedList":"Seznam s odrážkami","tableProp":"Vlastnost tabulky","insertImage":"Vložit obrázek","superscript":"Horní index","subscript":"Dolní index","createLink":"Vytvořit odkaz","undo":"Zpět","fullScreen":"Přepnout režim celé obrazovky","italic":"Kurzíva","fontName":"Název písma","justifyLeft":"Zarovnat vlevo","unlink":"Odebrat odkaz","toggleTableBorder":"Přepnout ohraničení tabulky","viewSource":"Zobrazit zdroj ve formátu HTML","fontSize":"Velikost písma","systemShortcut":"Akce \"${0}\" je v prohlížeči dostupná pouze prostřednictvím klávesové zkratky. Použijte klávesovou zkratku ${1}.","indent":"Odsadit","redo":"Opakovat","strikethrough":"Přeškrtnutí","justifyFull":"Do bloku","justifyCenter":"Zarovnat na střed","hiliteColor":"Barva pozadí","deleteTable":"Odstranit tabulku","outdent":"Předsadit","cut":"Vyjmout","plainFormatBlock":"Styl odstavce","toggleDir":"Přepnout směr","bold":"Tučné","tabIndent":"Odsazení tabulátoru","justifyRight":"Zarovnat vpravo","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.cs");dojo.cldr.nls.number.cs={"group":" ","percentSign":"%","exponential":"E","percentFormat":"#,##0%","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":",","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","currencyFormat":"#,##0.00 ¤","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.cs");dijit.form.nls.validate.cs={"rangeMessage":"Tato hodnota je mimo rozsah.","invalidMessage":"Zadaná hodnota není platná.","missingMessage":"Tato hodnota je vyžadována."};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.cs");dojo.cldr.nls.currency.cs={"HKD_displayName":"Dolar hongkongský","CHF_displayName":"Frank švýcarský","CAD_displayName":"Dolar kanadský","CNY_displayName":"Juan renminbi","AUD_displayName":"Dolar australský","JPY_displayName":"Jen","USD_displayName":"Dolar americký","GBP_displayName":"Libra šterlinků","EUR_displayName":"Euro","CHF_symbol":"Fr.","JPY_symbol":"JP¥","HKD_symbol":"HK$","USD_symbol":"US$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.cs");dojo.cldr.nls.gregorian.cs={"quarters-standAlone-wide":["1. čtvrtletí","2. čtvrtletí","3. čtvrtletí","4. čtvrtletí"],"quarters-format-abbr":["1. čtvrtletí","2. čtvrtletí","3. čtvrtletí","4. čtvrtletí"],"dateFormat-medium":"d.M.yyyy","quarters-standAlone-abbr":["1. čtvrtletí","2. čtvrtletí","3. čtvrtletí","4. čtvrtletí"],"eraNarrow":["př.Kr.","po Kr."],"months-format-narrow":["l","ú","b","d","k","č","č","s","z","ř","l","p"],"pm":"odp.","months-standAlone-narrow":["l","ú","b","d","k","č","č","s","z","ř","l","p"],"months-standAlone-wide":["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec"],"eraNames":["př.Kr.","po Kr."],"am":"dop.","days-standAlone-narrow":["N","P","Ú","S","Č","P","S"],"months-standAlone-abbr":["1.","2.","3.","4.","5.","6.","7.","8.","9.","10.","11.","12."],"timeFormat-medium":"H:mm:ss","dateFormat-long":"d. MMMM y","dateFormat-short":"d.M.yy","months-format-wide":["ledna","února","března","dubna","května","června","července","srpna","září","října","listopadu","prosince"],"days-standAlone-wide":["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],"days-format-narrow":["N","P","Ú","S","Č","P","S"],"timeFormat-short":"H:mm","months-format-abbr":["ledna","února","března","dubna","května","června","července","srpna","září","října","listopadu","prosince"],"days-standAlone-abbr":["ne","po","út","st","čt","pá","so"],"days-format-wide":["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],"eraAbbr":["př.Kr.","po Kr."],"quarters-format-wide":["1. čtvrtletí","2. čtvrtletí","3. čtvrtletí","4. čtvrtletí"],"dateFormat-full":"EEEE, d. MMMM y","days-format-abbr":["ne","po","út","st","čt","pá","so"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Day of the Week","dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"EEE, y-M-d","dateFormatItem-MMMEd":"E MMM d","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d EEE","dateFormatItem-Md":"M-d","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","field-era":"Era","dateFormatItem-yM":"y-M","timeFormat-long":"HH:mm:ss z","field-year":"Year","dateFormatItem-yMMM":"y MMM","dateFormatItem-yQ":"y Q","dateTimeFormats-appendItem-Era":"{0} {1}","field-hour":"Hour","timeFormat-full":"HH:mm:ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","dateFormatItem-M":"L","dateFormatItem-MMMMd":"MMMM d","dateFormatItem-Hm":"H:mm","field-minute":"Minute","field-dayperiod":"Dayperiod","dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","dateFormatItem-MMMd":"MMM d","dateFormatItem-MEd":"E, M-d","dateTimeFormat-full":"{1} {0}","dateFormatItem-yMMMM":"y MMMM","field-day":"Day","field-zone":"Zone","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-y":"y","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","field-month":"Month","dateFormatItem-MMM":"LLL","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateFormatItem-MMMMEd":"E MMMM d","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","field-second":"Second","dateFormatItem-yMMMEd":"EEE, y MMM d","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"Week","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.cs");dijit.form.nls.ComboBox.cs={"previousMessage":"Předchozí volby","nextMessage":"Další volby"};
diff --git a/js/dojo/dijit/nls/dijit-all_de-de.js b/js/dojo/dijit/nls/dijit-all_de-de.js
--- a/js/dojo/dijit/nls/dijit-all_de-de.js
+++ b/js/dojo/dijit/nls/dijit-all_de-de.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_de-de");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.de_de");dojo.nls.colors.de_de={"lightsteelblue": "Helles Stahlblau", "orangered": "Orangerot", "midnightblue": "Mitternachtblau", "cadetblue": "Kadettenblau", "seashell": "Muschelweiß", "slategrey": "Schiefergrau", "coral": "Koralle", "darkturquoise": "Dunkeltürkis", "antiquewhite": "Antikweiß", "mediumspringgreen": "Mittelfrühlingsgrün", "salmon": "Lachs", "darkgrey": "Dunkelgrau", "ivory": "Elfenbein", "greenyellow": "Grüngelb", "mistyrose": "Blassrose", "lightsalmon": "Helllachs", "silver": "Silbergrau", "dimgrey": "Blassgrau", "orange": "Orange", "white": "Weiß", "navajowhite": "Navajo-weiß", "royalblue": "Königsblau", "deeppink": "Tiefrosa", "lime": "Limone", "oldlace": "Alte Spitze", "chartreuse": "Helles Gelbgrün", "darkcyan": "Dunkelzyan", "yellow": "Gelb", "linen": "Leinen", "olive": "Oliv", "gold": "Gold", "lawngreen": "Grasgrün", "lightyellow": "Hellgelb", "tan": "Hautfarben", "darkviolet": "Dunkelviolett", "lightslategrey": "Helles Schiefergrau", "grey": "Grau", "darkkhaki": "Dunkelkhaki", "green": "Grün", "deepskyblue": "Dunkles Himmelblau", "aqua": "Wasserblau", "sienna": "Sienna", "mintcream": "Mintcreme", "rosybrown": "Rosigbraun", "mediumslateblue": "Mittelschieferblau ", "magenta": "Magenta", "lightseagreen": "Helles Meergrün", "cyan": "Zyan", "olivedrab": "Olivgrau", "darkgoldenrod": "Dunkelgoldgelb", "slateblue": "Schieferblau", "mediumaquamarine": "Mittelaquamarin", "lavender": "Lavendelblau", "mediumseagreen": "Mittelmeeresgrün", "maroon": "Kastanienbraun", "darkslategray": "Dunkelschiefergrau", "mediumturquoise": "Mitteltürkis ", "ghostwhite": "Geisterweiß", "darkblue": "Dunkelblau", "mediumvioletred": "Mittelviolettrot ", "brown": "Braun", "lightgray": "Hellgrau", "sandybrown": "Sandbraun", "pink": "Rosa", "firebrick": "Schamottestein", "indigo": "Indigoblau", "snow": "Schneeweiß", "darkorchid": "Dunkelorchidee", "turquoise": "Türkis", "chocolate": "Schokoladenbraun", "springgreen": "Frühlingsgrün", "moccasin": "Mokassin", "navy": "Marineblau", "lemonchiffon": "Zitronenchiffon", "teal": "Smaragdgrün", "floralwhite": "Blütenweiß", "cornflowerblue": "Kornblumenblau", "paleturquoise": "Blasstürkis", "purple": "Purpurrot", "gainsboro": "Gainsboro", "plum": "Pflaume", "red": "Rot", "blue": "Blau", "forestgreen": "Forstgrün", "darkgreen": "Dunkelgrün", "honeydew": "Honigtau", "darkseagreen": "Dunkles Meergrün", "lightcoral": "Hellkoralle", "palevioletred": "Blassviolettrot ", "mediumpurple": "Mittelpurpur", "saddlebrown": "Sattelbraun", "darkmagenta": "Dunkelmagenta", "thistle": "Distel", "whitesmoke": "Rauchweiß", "wheat": "Weizen", "violet": "Violett", "lightskyblue": "Helles Himmelblau", "goldenrod": "Goldgelb", "mediumblue": "Mittelblau", "skyblue": "Himmelblau", "crimson": "Karmesinrot", "darksalmon": "Dunkellachs", "darkred": "Dunkelrot", "darkslategrey": "Dunkelschiefergrau", "peru": "Peru", "lightgrey": "Hellgrau", "lightgoldenrodyellow": "Hellgoldgelb", "blanchedalmond": "Mandelweiß", "aliceblue": "Alice-blau", "bisque": "Bisquit", "slategray": "Schiefergrau", "palegoldenrod": "Blassgoldgelb", "darkorange": "Dunkelorange", "aquamarine": "Aquamarin", "lightgreen": "Hellgrün", "burlywood": "Burlywood", "dodgerblue": "Dodger-blau", "darkgray": "Dunkelgrau", "lightcyan": "Hellzyan", "powderblue": "Pulverblau", "blueviolet": "Blauviolett", "orchid": "Orchidee", "dimgray": "Blassgrau", "beige": "Beige", "fuchsia": "Fuchsia", "lavenderblush": "Lavendelhauch", "hotpink": "Knallrosa", "steelblue": "Stahlblau", "tomato": "Tomatenrot", "lightpink": "Hellrosa", "limegreen": "Limonengrün", "indianred": "Indischrot", "papayawhip": "Papayacreme", "lightslategray": "Helles Schiefergrau", "gray": "Grau", "mediumorchid": "Mittelorchidee", "cornsilk": "Kornseide", "black": "Schwarz", "seagreen": "Meeresgrün", "darkslateblue": "Dunkelschieferblau", "khaki": "Khaki", "lightblue": "Hellblau", "palegreen": "Blassgrün", "azure": "Azur", "peachpuff": "Pfirsich", "darkolivegreen": "Dunkelolivgrün", "yellowgreen": "Gelbgrün"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.de_de");dijit.nls.loading.de_de={"loadingState": "Wird geladen...", "errorState": "Es ist ein Fehler aufgetreten."};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.de_de");dijit.nls.Textarea.de_de={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.de_de");dijit._editor.nls.commands.de_de={"removeFormat": "Formatierung entfernen", "copy": "Kopieren", "paste": "Einfügen", "selectAll": "Alles auswählen", "insertOrderedList": "Nummerierung", "insertTable": "Tabelle einfügen/bearbeiten", "underline": "Unterstrichen", "foreColor": "Vordergrundfarbe", "htmlToggle": "HTML-Quelltext", "formatBlock": "Absatzstil", "insertHorizontalRule": "Horizontaler Strich", "delete": "Löschen", "insertUnorderedList": "Aufzählungszeichen", "tableProp": "Tabelleneigenschaft", "insertImage": "Grafik einfügen", "superscript": "Hochgestellt", "subscript": "Tiefgestellt", "createLink": "Link erstellen", "undo": "Rückgängig", "italic": "Kursiv", "fontName": "Schriftartname", "justifyLeft": "Linksbündig", "unlink": "Link entfernen", "toggleTableBorder": "Tabellenumrandung ein-/ausschalten", "ctrlKey": "Strg+${0}", "fontSize": "Schriftgröße", "indent": "Einrücken", "redo": "Wiederherstellen", "strikethrough": "Durchgestrichen", "justifyFull": "Blocksatz", "justifyCenter": "Zentriert", "hiliteColor": "Hintergrundfarbe", "deleteTable": "Tabelle löschen", "outdent": "Ausrücken", "cut": "Ausschneiden", "plainFormatBlock": "Absatzstil", "bold": "Fett", "systemShortcutFF": "Die Aktion \"${0}\" ist in Mozilla Firefox nur über einen Tastaturkurzbefehl verfügbar. Verwenden Sie ${1}.", "justifyRight": "Rechtsbündig", "appleKey": "⌘${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.de_de");dojo.cldr.nls.number.de_de={"currencyFormat": "#,##0.00 ¤", "group": ".", "percentFormat": "#,##0 %", "decimal": ",", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "decimalFormat": "#,##0.###", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.de_de");dijit.nls.common.de_de={"buttonCancel": "Abbrechen", "buttonSave": "Speichern", "buttonOk": "OK"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.de_de");dijit.form.nls.validate.de_de={"rangeMessage": "* Dieser Wert ist außerhalb des gültigen Bereichs. ", "invalidMessage": "* Der eingegebene Wert ist ungültig. ", "missingMessage": "* Dieser Wert ist erforderlich."};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.de_de");dijit.form.nls.ComboBox.de_de={"previousMessage": "Vorherige Auswahl", "nextMessage": "Weitere Auswahlmöglichkeiten"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.de_de");dojo.cldr.nls.currency.de_de={"HKD_displayName": "Hongkong Dollar", "CHF_displayName": "Schweizer Franken", "CHF_symbol": "SFr.", "CAD_displayName": "Kanadischer Dollar", "AUD_displayName": "Australischer Dollar", "JPY_displayName": "Yen", "USD_displayName": "US Dollar", "GBP_displayName": "Pfund Sterling", "EUR_displayName": "Euro", "USD_symbol": "$", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.de_de");dojo.cldr.nls.gregorian.de_de={"eraNames": ["v. Chr.", "n. Chr."], "timeFormat-full": "H:mm' Uhr 'z", "eraAbbr": ["v. Chr.", "n. Chr."], "dateFormat-medium": "dd.MM.yyyy", "am": "vorm.", "months-format-abbr": ["Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"], "dateFormat-full": "EEEE, d. MMMM yyyy", "days-format-abbr": ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], "quarters-format-wide": ["1. Quartal", "2. Quartal", "3. Quartal", "4. Quartal"], "pm": "nachm.", "dateFormat-short": "dd.MM.yy", "months-format-wide": ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], "months-standAlone-narrow": ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], "days-standAlone-narrow": ["S", "M", "D", "M", "D", "F", "S"], "dateFormat-long": "d. MMMM yyyy", "days-format-wide": ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "timeFormat-medium": "HH:mm:ss", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "timeFormat-long": "HH:mm:ss z", "timeFormat-short": "HH:mm", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Era": "{0} {1}"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.de_de");dijit.nls.Textarea.de_de={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_de-de");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.de_de");dojo.nls.colors.de_de={"lightsteelblue":"Helles Stahlblau","orangered":"Orangerot","midnightblue":"Mitternachtblau","cadetblue":"Kadettenblau","seashell":"Muschelweiß","slategrey":"Schiefergrau","coral":"Koralle","darkturquoise":"Dunkeltürkis","antiquewhite":"Antikweiß","mediumspringgreen":"Mittelfrühlingsgrün","salmon":"Lachs","darkgrey":"Dunkelgrau","ivory":"Elfenbein","greenyellow":"Grüngelb","mistyrose":"Blassrose","lightsalmon":"Helllachs","silver":"Silbergrau","dimgrey":"Blassgrau","orange":"Orange","white":"Weiß","navajowhite":"Navajo-weiß","royalblue":"Königsblau","deeppink":"Tiefrosa","lime":"Limone","oldlace":"Alte Spitze","chartreuse":"Helles Gelbgrün","darkcyan":"Dunkelzyan","yellow":"Gelb","linen":"Leinen","olive":"Oliv","gold":"Gold","lawngreen":"Grasgrün","lightyellow":"Hellgelb","tan":"Hautfarben","darkviolet":"Dunkelviolett","lightslategrey":"Helles Schiefergrau","grey":"Grau","darkkhaki":"Dunkelkhaki","green":"Grün","deepskyblue":"Dunkles Himmelblau","aqua":"Wasserblau","sienna":"Sienna","mintcream":"Mintcreme","rosybrown":"Rosigbraun","mediumslateblue":"Mittelschieferblau ","magenta":"Magenta","lightseagreen":"Helles Meergrün","cyan":"Zyan","olivedrab":"Olivgrau","darkgoldenrod":"Dunkelgoldgelb","slateblue":"Schieferblau","mediumaquamarine":"Mittelaquamarin","lavender":"Lavendelblau","mediumseagreen":"Mittelmeeresgrün","maroon":"Kastanienbraun","darkslategray":"Dunkelschiefergrau","mediumturquoise":"Mitteltürkis ","ghostwhite":"Geisterweiß","darkblue":"Dunkelblau","mediumvioletred":"Mittelviolettrot ","brown":"Braun","lightgray":"Hellgrau","sandybrown":"Sandbraun","pink":"Rosa","firebrick":"Schamottestein","indigo":"Indigoblau","snow":"Schneeweiß","darkorchid":"Dunkelorchidee","turquoise":"Türkis","chocolate":"Schokoladenbraun","springgreen":"Frühlingsgrün","moccasin":"Mokassin","navy":"Marineblau","lemonchiffon":"Zitronenchiffon","teal":"Smaragdgrün","floralwhite":"Blütenweiß","cornflowerblue":"Kornblumenblau","paleturquoise":"Blasstürkis","purple":"Purpurrot","gainsboro":"Gainsboro","plum":"Pflaume","red":"Rot","blue":"Blau","forestgreen":"Forstgrün","darkgreen":"Dunkelgrün","honeydew":"Honigtau","darkseagreen":"Dunkles Meergrün","lightcoral":"Hellkoralle","palevioletred":"Blassviolettrot ","mediumpurple":"Mittelpurpur","saddlebrown":"Sattelbraun","darkmagenta":"Dunkelmagenta","thistle":"Distel","whitesmoke":"Rauchweiß","wheat":"Weizen","violet":"Violett","lightskyblue":"Helles Himmelblau","goldenrod":"Goldgelb","mediumblue":"Mittelblau","skyblue":"Himmelblau","crimson":"Karmesinrot","darksalmon":"Dunkellachs","darkred":"Dunkelrot","darkslategrey":"Dunkelschiefergrau","peru":"Peru","lightgrey":"Hellgrau","lightgoldenrodyellow":"Hellgoldgelb","blanchedalmond":"Mandelweiß","aliceblue":"Alice-blau","bisque":"Bisquit","slategray":"Schiefergrau","palegoldenrod":"Blassgoldgelb","darkorange":"Dunkelorange","aquamarine":"Aquamarin","lightgreen":"Hellgrün","burlywood":"Burlywood","dodgerblue":"Dodger-blau","darkgray":"Dunkelgrau","lightcyan":"Hellzyan","powderblue":"Pulverblau","blueviolet":"Blauviolett","orchid":"Orchidee","dimgray":"Blassgrau","beige":"Beige","fuchsia":"Fuchsia","lavenderblush":"Lavendelhauch","hotpink":"Knallrosa","steelblue":"Stahlblau","tomato":"Tomatenrot","lightpink":"Hellrosa","limegreen":"Limonengrün","indianred":"Indischrot","papayawhip":"Papayacreme","lightslategray":"Helles Schiefergrau","gray":"Grau","mediumorchid":"Mittelorchidee","cornsilk":"Kornseide","black":"Schwarz","seagreen":"Meeresgrün","darkslateblue":"Dunkelschieferblau","khaki":"Khaki","lightblue":"Hellblau","palegreen":"Blassgrün","azure":"Azur","peachpuff":"Pfirsich","darkolivegreen":"Dunkelolivgrün","yellowgreen":"Gelbgrün"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.de_de");dijit.nls.loading.de_de={"loadingState":"Wird geladen...","errorState":"Es ist ein Fehler aufgetreten."};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.de_de");dijit.nls.common.de_de={"buttonOk":"OK","buttonCancel":"Abbrechen","buttonSave":"Speichern","itemClose":"Schließen"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.de_de");dijit._editor.nls.commands.de_de={"removeFormat":"Formatierung entfernen","copy":"Kopieren","paste":"Einfügen","selectAll":"Alles auswählen","insertOrderedList":"Nummerierung","insertTable":"Tabelle einfügen/bearbeiten","print":"Drucken","underline":"Unterstrichen","foreColor":"Vordergrundfarbe","htmlToggle":"HTML-Quelltext","formatBlock":"Absatzstil","newPage":"Neue Seite","insertHorizontalRule":"Horizontaler Strich","delete":"Löschen","insertUnorderedList":"Aufzählungszeichen","tableProp":"Tabelleneigenschaft","insertImage":"Grafik einfügen","superscript":"Hochgestellt","subscript":"Tiefgestellt","createLink":"Link erstellen","undo":"Rückgängig","fullScreen":"Gesamtanzeige","italic":"Kursiv","fontName":"Schriftartname","justifyLeft":"Linksbündig","unlink":"Link entfernen","toggleTableBorder":"Tabellenumrandung ein-/ausschalten","viewSource":"HTML-Quelle","ctrlKey":"Strg+${0}","fontSize":"Schriftgröße","systemShortcut":"Die Aktion \"${0}\" ist nur über einen Direktaufruf in Ihrem Browser verfügbar. Verwenden Sie ${1}.","indent":"Einrücken","redo":"Wiederherstellen","strikethrough":"Durchgestrichen","justifyFull":"Blocksatz","justifyCenter":"Zentriert","hiliteColor":"Hintergrundfarbe","deleteTable":"Tabelle löschen","outdent":"Ausrücken","cut":"Ausschneiden","plainFormatBlock":"Absatzstil","toggleDir":"Wechselrichtung","bold":"Fett","tabIndent":"Tabulatoreinrückung","justifyRight":"Rechtsbündig","appleKey":"⌘${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.de_de");dojo.cldr.nls.number.de_de={"currencyFormat":"#,##0.00 ¤","group":".","percentSign":"%","exponential":"E","percentFormat":"#,##0 %","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":",","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.de_de");dijit.form.nls.validate.de_de={"rangeMessage":"Dieser Wert liegt außerhalb des gültigen Bereichs. ","invalidMessage":"Der eingegebene Wert ist ungültig. ","missingMessage":"Dieser Wert ist erforderlich."};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.de_de");dojo.cldr.nls.currency.de_de={"HKD_displayName":"Hongkong-Dollar","CHF_displayName":"Schweizer Franken","JPY_symbol":"¥","CAD_displayName":"Kanadischer Dollar","CNY_displayName":"Renminbi Yuan","USD_symbol":"$","AUD_displayName":"Australischer Dollar","JPY_displayName":"Yen","USD_displayName":"US-Dollar","GBP_displayName":"Pfund Sterling","EUR_displayName":"Euro","CHF_symbol":"Fr.","HKD_symbol":"HK$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.de_de");dojo.cldr.nls.gregorian.de_de={"months-format-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Wochentag","dateFormatItem-yyQQQQ":"QQQQ yy","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"EEE, yyyy-M-d","dateFormatItem-MMMEd":"E d. MMM","eraNarrow":["v. Chr.","n. Chr."],"dateFormat-long":"d. MMMM y","months-format-wide":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],"dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d. EEE","dateFormat-full":"EEEE, d. MMMM y","dateFormatItem-Md":"d.M.","dateFormatItem-yyMMdd":"dd.MM.yy","field-era":"Epoche","dateFormatItem-yM":"yyyy-M","months-standAlone-wide":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],"timeFormat-short":"HH:mm","quarters-format-wide":["1. Quartal","2. Quartal","3. Quartal","4. Quartal"],"timeFormat-long":"HH:mm:ss z","field-year":"Jahr","dateFormatItem-yMMM":"MMM y","dateFormatItem-yQ":"Q yyyy","dateFormatItem-yyyyMMMM":"MMMM y","field-hour":"Stunde","dateFormatItem-MMdd":"dd.MM.","months-format-abbr":["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],"dateFormatItem-yyQ":"Q yy","timeFormat-full":"HH:mm:ss zzzz","am":"vorm.","dateFormatItem-H":"H","months-standAlone-abbr":["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["1. Quartal","2. Quartal","3. Quartal","4. Quartal"],"dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"L","days-standAlone-wide":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dateFormatItem-MMMMd":"d. MMMM","dateFormatItem-yyMMM":"MMM yy","timeFormat-medium":"HH:mm:ss","dateFormatItem-Hm":"H:mm","eraAbbr":["v. Chr.","n. Chr."],"field-minute":"Minute","field-dayperiod":"Tageshälfte","days-standAlone-abbr":["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","dateTimeFormat-long":"{1} {0}","dateFormatItem-MMMd":"d. MMM","dateFormatItem-MEd":"E, d.M.","dateTimeFormat-full":"{1} {0}","dateFormatItem-yMMMM":"MMMM y","field-day":"Tag","days-format-wide":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"field-zone":"Zone","dateFormatItem-y":"y","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-yyMM":"MM.yy","days-format-abbr":["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],"eraNames":["v. Chr.","n. Chr."],"days-format-narrow":["S","M","D","M","D","F","S"],"field-month":"Monat","days-standAlone-narrow":["S","M","D","M","D","F","S"],"dateFormatItem-MMM":"LLL","dateFormatItem-HHmm":"HH:mm","pm":"nachm.","dateFormatItem-MMMMEd":"E d. MMMM","dateFormatItem-MMMMdd":"dd. MMMM","dateFormat-short":"dd.MM.yy","dateFormatItem-MMd":"d.MM.","field-second":"Sekunde","dateFormatItem-yMMMEd":"EEE, d. MMM y","dateFormatItem-Ed":"E d.","field-week":"Woche","dateFormat-medium":"dd.MM.yyyy","dateFormatItem-mmss":"mm:ss","dateTimeFormat-short":"{1} {0}","dateFormatItem-yyyy":"y","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.de_de");dijit.form.nls.ComboBox.de_de={"previousMessage":"Vorherige Auswahl","nextMessage":"Weitere Auswahlmöglichkeiten"};
diff --git a/js/dojo/dijit/nls/dijit-all_de.js b/js/dojo/dijit/nls/dijit-all_de.js
--- a/js/dojo/dijit/nls/dijit-all_de.js
+++ b/js/dojo/dijit/nls/dijit-all_de.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_de");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.de");dojo.nls.colors.de={"lightsteelblue": "Helles Stahlblau", "orangered": "Orangerot", "midnightblue": "Mitternachtblau", "cadetblue": "Kadettenblau", "seashell": "Muschelweiß", "slategrey": "Schiefergrau", "coral": "Koralle", "darkturquoise": "Dunkeltürkis", "antiquewhite": "Antikweiß", "mediumspringgreen": "Mittelfrühlingsgrün", "salmon": "Lachs", "darkgrey": "Dunkelgrau", "ivory": "Elfenbein", "greenyellow": "Grüngelb", "mistyrose": "Blassrose", "lightsalmon": "Helllachs", "silver": "Silbergrau", "dimgrey": "Blassgrau", "orange": "Orange", "white": "Weiß", "navajowhite": "Navajo-weiß", "royalblue": "Königsblau", "deeppink": "Tiefrosa", "lime": "Limone", "oldlace": "Alte Spitze", "chartreuse": "Helles Gelbgrün", "darkcyan": "Dunkelzyan", "yellow": "Gelb", "linen": "Leinen", "olive": "Oliv", "gold": "Gold", "lawngreen": "Grasgrün", "lightyellow": "Hellgelb", "tan": "Hautfarben", "darkviolet": "Dunkelviolett", "lightslategrey": "Helles Schiefergrau", "grey": "Grau", "darkkhaki": "Dunkelkhaki", "green": "Grün", "deepskyblue": "Dunkles Himmelblau", "aqua": "Wasserblau", "sienna": "Sienna", "mintcream": "Mintcreme", "rosybrown": "Rosigbraun", "mediumslateblue": "Mittelschieferblau ", "magenta": "Magenta", "lightseagreen": "Helles Meergrün", "cyan": "Zyan", "olivedrab": "Olivgrau", "darkgoldenrod": "Dunkelgoldgelb", "slateblue": "Schieferblau", "mediumaquamarine": "Mittelaquamarin", "lavender": "Lavendelblau", "mediumseagreen": "Mittelmeeresgrün", "maroon": "Kastanienbraun", "darkslategray": "Dunkelschiefergrau", "mediumturquoise": "Mitteltürkis ", "ghostwhite": "Geisterweiß", "darkblue": "Dunkelblau", "mediumvioletred": "Mittelviolettrot ", "brown": "Braun", "lightgray": "Hellgrau", "sandybrown": "Sandbraun", "pink": "Rosa", "firebrick": "Schamottestein", "indigo": "Indigoblau", "snow": "Schneeweiß", "darkorchid": "Dunkelorchidee", "turquoise": "Türkis", "chocolate": "Schokoladenbraun", "springgreen": "Frühlingsgrün", "moccasin": "Mokassin", "navy": "Marineblau", "lemonchiffon": "Zitronenchiffon", "teal": "Smaragdgrün", "floralwhite": "Blütenweiß", "cornflowerblue": "Kornblumenblau", "paleturquoise": "Blasstürkis", "purple": "Purpurrot", "gainsboro": "Gainsboro", "plum": "Pflaume", "red": "Rot", "blue": "Blau", "forestgreen": "Forstgrün", "darkgreen": "Dunkelgrün", "honeydew": "Honigtau", "darkseagreen": "Dunkles Meergrün", "lightcoral": "Hellkoralle", "palevioletred": "Blassviolettrot ", "mediumpurple": "Mittelpurpur", "saddlebrown": "Sattelbraun", "darkmagenta": "Dunkelmagenta", "thistle": "Distel", "whitesmoke": "Rauchweiß", "wheat": "Weizen", "violet": "Violett", "lightskyblue": "Helles Himmelblau", "goldenrod": "Goldgelb", "mediumblue": "Mittelblau", "skyblue": "Himmelblau", "crimson": "Karmesinrot", "darksalmon": "Dunkellachs", "darkred": "Dunkelrot", "darkslategrey": "Dunkelschiefergrau", "peru": "Peru", "lightgrey": "Hellgrau", "lightgoldenrodyellow": "Hellgoldgelb", "blanchedalmond": "Mandelweiß", "aliceblue": "Alice-blau", "bisque": "Bisquit", "slategray": "Schiefergrau", "palegoldenrod": "Blassgoldgelb", "darkorange": "Dunkelorange", "aquamarine": "Aquamarin", "lightgreen": "Hellgrün", "burlywood": "Burlywood", "dodgerblue": "Dodger-blau", "darkgray": "Dunkelgrau", "lightcyan": "Hellzyan", "powderblue": "Pulverblau", "blueviolet": "Blauviolett", "orchid": "Orchidee", "dimgray": "Blassgrau", "beige": "Beige", "fuchsia": "Fuchsia", "lavenderblush": "Lavendelhauch", "hotpink": "Knallrosa", "steelblue": "Stahlblau", "tomato": "Tomatenrot", "lightpink": "Hellrosa", "limegreen": "Limonengrün", "indianred": "Indischrot", "papayawhip": "Papayacreme", "lightslategray": "Helles Schiefergrau", "gray": "Grau", "mediumorchid": "Mittelorchidee", "cornsilk": "Kornseide", "black": "Schwarz", "seagreen": "Meeresgrün", "darkslateblue": "Dunkelschieferblau", "khaki": "Khaki", "lightblue": "Hellblau", "palegreen": "Blassgrün", "azure": "Azur", "peachpuff": "Pfirsich", "darkolivegreen": "Dunkelolivgrün", "yellowgreen": "Gelbgrün"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.de");dijit.nls.loading.de={"loadingState": "Wird geladen...", "errorState": "Es ist ein Fehler aufgetreten."};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.de");dijit.nls.Textarea.de={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.de");dijit._editor.nls.commands.de={"removeFormat": "Formatierung entfernen", "copy": "Kopieren", "paste": "Einfügen", "selectAll": "Alles auswählen", "insertOrderedList": "Nummerierung", "insertTable": "Tabelle einfügen/bearbeiten", "underline": "Unterstrichen", "foreColor": "Vordergrundfarbe", "htmlToggle": "HTML-Quelltext", "formatBlock": "Absatzstil", "insertHorizontalRule": "Horizontaler Strich", "delete": "Löschen", "insertUnorderedList": "Aufzählungszeichen", "tableProp": "Tabelleneigenschaft", "insertImage": "Grafik einfügen", "superscript": "Hochgestellt", "subscript": "Tiefgestellt", "createLink": "Link erstellen", "undo": "Rückgängig", "italic": "Kursiv", "fontName": "Schriftartname", "justifyLeft": "Linksbündig", "unlink": "Link entfernen", "toggleTableBorder": "Tabellenumrandung ein-/ausschalten", "ctrlKey": "Strg+${0}", "fontSize": "Schriftgröße", "indent": "Einrücken", "redo": "Wiederherstellen", "strikethrough": "Durchgestrichen", "justifyFull": "Blocksatz", "justifyCenter": "Zentriert", "hiliteColor": "Hintergrundfarbe", "deleteTable": "Tabelle löschen", "outdent": "Ausrücken", "cut": "Ausschneiden", "plainFormatBlock": "Absatzstil", "bold": "Fett", "systemShortcutFF": "Die Aktion \"${0}\" ist in Mozilla Firefox nur über einen Tastaturkurzbefehl verfügbar. Verwenden Sie ${1}.", "justifyRight": "Rechtsbündig", "appleKey": "⌘${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.de");dojo.cldr.nls.number.de={"group": ".", "percentFormat": "#,##0 %", "decimal": ",", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencyFormat": "¤ #,##0.00", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "decimalFormat": "#,##0.###", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.de");dijit.nls.common.de={"buttonCancel": "Abbrechen", "buttonSave": "Speichern", "buttonOk": "OK"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.de");dijit.form.nls.validate.de={"rangeMessage": "* Dieser Wert ist außerhalb des gültigen Bereichs. ", "invalidMessage": "* Der eingegebene Wert ist ungültig. ", "missingMessage": "* Dieser Wert ist erforderlich."};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.de");dijit.form.nls.ComboBox.de={"previousMessage": "Vorherige Auswahl", "nextMessage": "Weitere Auswahlmöglichkeiten"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.de");dojo.cldr.nls.currency.de={"HKD_displayName": "Hongkong Dollar", "CHF_displayName": "Schweizer Franken", "CHF_symbol": "SFr.", "CAD_displayName": "Kanadischer Dollar", "AUD_displayName": "Australischer Dollar", "JPY_displayName": "Yen", "USD_displayName": "US Dollar", "GBP_displayName": "Pfund Sterling", "EUR_displayName": "Euro", "USD_symbol": "$", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.de");dojo.cldr.nls.gregorian.de={"eraNames": ["v. Chr.", "n. Chr."], "timeFormat-full": "H:mm' Uhr 'z", "eraAbbr": ["v. Chr.", "n. Chr."], "dateFormat-medium": "dd.MM.yyyy", "am": "vorm.", "months-format-abbr": ["Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"], "dateFormat-full": "EEEE, d. MMMM yyyy", "days-format-abbr": ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], "quarters-format-wide": ["1. Quartal", "2. Quartal", "3. Quartal", "4. Quartal"], "pm": "nachm.", "dateFormat-short": "dd.MM.yy", "months-format-wide": ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], "months-standAlone-narrow": ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], "days-standAlone-narrow": ["S", "M", "D", "M", "D", "F", "S"], "dateFormat-long": "d. MMMM yyyy", "days-format-wide": ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "timeFormat-medium": "HH:mm:ss", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "timeFormat-long": "HH:mm:ss z", "timeFormat-short": "HH:mm", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Era": "{0} {1}"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.de");dijit.nls.Textarea.de={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_de");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.de");dojo.nls.colors.de={"lightsteelblue":"Helles Stahlblau","orangered":"Orangerot","midnightblue":"Mitternachtblau","cadetblue":"Kadettenblau","seashell":"Muschelweiß","slategrey":"Schiefergrau","coral":"Koralle","darkturquoise":"Dunkeltürkis","antiquewhite":"Antikweiß","mediumspringgreen":"Mittelfrühlingsgrün","salmon":"Lachs","darkgrey":"Dunkelgrau","ivory":"Elfenbein","greenyellow":"Grüngelb","mistyrose":"Blassrose","lightsalmon":"Helllachs","silver":"Silbergrau","dimgrey":"Blassgrau","orange":"Orange","white":"Weiß","navajowhite":"Navajo-weiß","royalblue":"Königsblau","deeppink":"Tiefrosa","lime":"Limone","oldlace":"Alte Spitze","chartreuse":"Helles Gelbgrün","darkcyan":"Dunkelzyan","yellow":"Gelb","linen":"Leinen","olive":"Oliv","gold":"Gold","lawngreen":"Grasgrün","lightyellow":"Hellgelb","tan":"Hautfarben","darkviolet":"Dunkelviolett","lightslategrey":"Helles Schiefergrau","grey":"Grau","darkkhaki":"Dunkelkhaki","green":"Grün","deepskyblue":"Dunkles Himmelblau","aqua":"Wasserblau","sienna":"Sienna","mintcream":"Mintcreme","rosybrown":"Rosigbraun","mediumslateblue":"Mittelschieferblau ","magenta":"Magenta","lightseagreen":"Helles Meergrün","cyan":"Zyan","olivedrab":"Olivgrau","darkgoldenrod":"Dunkelgoldgelb","slateblue":"Schieferblau","mediumaquamarine":"Mittelaquamarin","lavender":"Lavendelblau","mediumseagreen":"Mittelmeeresgrün","maroon":"Kastanienbraun","darkslategray":"Dunkelschiefergrau","mediumturquoise":"Mitteltürkis ","ghostwhite":"Geisterweiß","darkblue":"Dunkelblau","mediumvioletred":"Mittelviolettrot ","brown":"Braun","lightgray":"Hellgrau","sandybrown":"Sandbraun","pink":"Rosa","firebrick":"Schamottestein","indigo":"Indigoblau","snow":"Schneeweiß","darkorchid":"Dunkelorchidee","turquoise":"Türkis","chocolate":"Schokoladenbraun","springgreen":"Frühlingsgrün","moccasin":"Mokassin","navy":"Marineblau","lemonchiffon":"Zitronenchiffon","teal":"Smaragdgrün","floralwhite":"Blütenweiß","cornflowerblue":"Kornblumenblau","paleturquoise":"Blasstürkis","purple":"Purpurrot","gainsboro":"Gainsboro","plum":"Pflaume","red":"Rot","blue":"Blau","forestgreen":"Forstgrün","darkgreen":"Dunkelgrün","honeydew":"Honigtau","darkseagreen":"Dunkles Meergrün","lightcoral":"Hellkoralle","palevioletred":"Blassviolettrot ","mediumpurple":"Mittelpurpur","saddlebrown":"Sattelbraun","darkmagenta":"Dunkelmagenta","thistle":"Distel","whitesmoke":"Rauchweiß","wheat":"Weizen","violet":"Violett","lightskyblue":"Helles Himmelblau","goldenrod":"Goldgelb","mediumblue":"Mittelblau","skyblue":"Himmelblau","crimson":"Karmesinrot","darksalmon":"Dunkellachs","darkred":"Dunkelrot","darkslategrey":"Dunkelschiefergrau","peru":"Peru","lightgrey":"Hellgrau","lightgoldenrodyellow":"Hellgoldgelb","blanchedalmond":"Mandelweiß","aliceblue":"Alice-blau","bisque":"Bisquit","slategray":"Schiefergrau","palegoldenrod":"Blassgoldgelb","darkorange":"Dunkelorange","aquamarine":"Aquamarin","lightgreen":"Hellgrün","burlywood":"Burlywood","dodgerblue":"Dodger-blau","darkgray":"Dunkelgrau","lightcyan":"Hellzyan","powderblue":"Pulverblau","blueviolet":"Blauviolett","orchid":"Orchidee","dimgray":"Blassgrau","beige":"Beige","fuchsia":"Fuchsia","lavenderblush":"Lavendelhauch","hotpink":"Knallrosa","steelblue":"Stahlblau","tomato":"Tomatenrot","lightpink":"Hellrosa","limegreen":"Limonengrün","indianred":"Indischrot","papayawhip":"Papayacreme","lightslategray":"Helles Schiefergrau","gray":"Grau","mediumorchid":"Mittelorchidee","cornsilk":"Kornseide","black":"Schwarz","seagreen":"Meeresgrün","darkslateblue":"Dunkelschieferblau","khaki":"Khaki","lightblue":"Hellblau","palegreen":"Blassgrün","azure":"Azur","peachpuff":"Pfirsich","darkolivegreen":"Dunkelolivgrün","yellowgreen":"Gelbgrün"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.de");dijit.nls.loading.de={"loadingState":"Wird geladen...","errorState":"Es ist ein Fehler aufgetreten."};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.de");dijit.nls.common.de={"buttonOk":"OK","buttonCancel":"Abbrechen","buttonSave":"Speichern","itemClose":"Schließen"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.de");dijit._editor.nls.commands.de={"removeFormat":"Formatierung entfernen","copy":"Kopieren","paste":"Einfügen","selectAll":"Alles auswählen","insertOrderedList":"Nummerierung","insertTable":"Tabelle einfügen/bearbeiten","print":"Drucken","underline":"Unterstrichen","foreColor":"Vordergrundfarbe","htmlToggle":"HTML-Quelltext","formatBlock":"Absatzstil","newPage":"Neue Seite","insertHorizontalRule":"Horizontaler Strich","delete":"Löschen","insertUnorderedList":"Aufzählungszeichen","tableProp":"Tabelleneigenschaft","insertImage":"Grafik einfügen","superscript":"Hochgestellt","subscript":"Tiefgestellt","createLink":"Link erstellen","undo":"Rückgängig","fullScreen":"Gesamtanzeige","italic":"Kursiv","fontName":"Schriftartname","justifyLeft":"Linksbündig","unlink":"Link entfernen","toggleTableBorder":"Tabellenumrandung ein-/ausschalten","viewSource":"HTML-Quelle","ctrlKey":"Strg+${0}","fontSize":"Schriftgröße","systemShortcut":"Die Aktion \"${0}\" ist nur über einen Direktaufruf in Ihrem Browser verfügbar. Verwenden Sie ${1}.","indent":"Einrücken","redo":"Wiederherstellen","strikethrough":"Durchgestrichen","justifyFull":"Blocksatz","justifyCenter":"Zentriert","hiliteColor":"Hintergrundfarbe","deleteTable":"Tabelle löschen","outdent":"Ausrücken","cut":"Ausschneiden","plainFormatBlock":"Absatzstil","toggleDir":"Wechselrichtung","bold":"Fett","tabIndent":"Tabulatoreinrückung","justifyRight":"Rechtsbündig","appleKey":"⌘${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.de");dojo.cldr.nls.number.de={"group":".","percentSign":"%","exponential":"E","percentFormat":"#,##0 %","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":",","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","currencyFormat":"#,##0.00 ¤","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.de");dijit.form.nls.validate.de={"rangeMessage":"Dieser Wert liegt außerhalb des gültigen Bereichs. ","invalidMessage":"Der eingegebene Wert ist ungültig. ","missingMessage":"Dieser Wert ist erforderlich."};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.de");dojo.cldr.nls.currency.de={"HKD_displayName":"Hongkong-Dollar","CHF_displayName":"Schweizer Franken","JPY_symbol":"¥","CAD_displayName":"Kanadischer Dollar","CNY_displayName":"Renminbi Yuan","USD_symbol":"$","AUD_displayName":"Australischer Dollar","JPY_displayName":"Yen","USD_displayName":"US-Dollar","GBP_displayName":"Pfund Sterling","EUR_displayName":"Euro","CHF_symbol":"Fr.","HKD_symbol":"HK$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.de");dojo.cldr.nls.gregorian.de={"months-format-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Wochentag","dateFormatItem-yyQQQQ":"QQQQ yy","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"EEE, yyyy-M-d","dateFormatItem-MMMEd":"E d. MMM","eraNarrow":["v. Chr.","n. Chr."],"dateFormat-long":"d. MMMM y","months-format-wide":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],"dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d. EEE","dateFormat-full":"EEEE, d. MMMM y","dateFormatItem-Md":"d.M.","dateFormatItem-yyMMdd":"dd.MM.yy","field-era":"Epoche","dateFormatItem-yM":"yyyy-M","months-standAlone-wide":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],"timeFormat-short":"HH:mm","quarters-format-wide":["1. Quartal","2. Quartal","3. Quartal","4. Quartal"],"timeFormat-long":"HH:mm:ss z","field-year":"Jahr","dateFormatItem-yMMM":"MMM y","dateFormatItem-yQ":"Q yyyy","dateFormatItem-yyyyMMMM":"MMMM y","field-hour":"Stunde","dateFormatItem-MMdd":"dd.MM.","months-format-abbr":["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],"dateFormatItem-yyQ":"Q yy","timeFormat-full":"HH:mm:ss zzzz","am":"vorm.","dateFormatItem-H":"H","months-standAlone-abbr":["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["1. Quartal","2. Quartal","3. Quartal","4. Quartal"],"dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"L","days-standAlone-wide":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dateFormatItem-MMMMd":"d. MMMM","dateFormatItem-yyMMM":"MMM yy","timeFormat-medium":"HH:mm:ss","dateFormatItem-Hm":"H:mm","eraAbbr":["v. Chr.","n. Chr."],"field-minute":"Minute","field-dayperiod":"Tageshälfte","days-standAlone-abbr":["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","dateTimeFormat-long":"{1} {0}","dateFormatItem-MMMd":"d. MMM","dateFormatItem-MEd":"E, d.M.","dateTimeFormat-full":"{1} {0}","dateFormatItem-yMMMM":"MMMM y","field-day":"Tag","days-format-wide":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"field-zone":"Zone","dateFormatItem-y":"y","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-yyMM":"MM.yy","days-format-abbr":["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],"eraNames":["v. Chr.","n. Chr."],"days-format-narrow":["S","M","D","M","D","F","S"],"field-month":"Monat","days-standAlone-narrow":["S","M","D","M","D","F","S"],"dateFormatItem-MMM":"LLL","dateFormatItem-HHmm":"HH:mm","pm":"nachm.","dateFormatItem-MMMMEd":"E d. MMMM","dateFormatItem-MMMMdd":"dd. MMMM","dateFormat-short":"dd.MM.yy","dateFormatItem-MMd":"d.MM.","field-second":"Sekunde","dateFormatItem-yMMMEd":"EEE, d. MMM y","dateFormatItem-Ed":"E d.","field-week":"Woche","dateFormat-medium":"dd.MM.yyyy","dateFormatItem-mmss":"mm:ss","dateTimeFormat-short":"{1} {0}","dateFormatItem-yyyy":"y","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.de");dijit.form.nls.ComboBox.de={"previousMessage":"Vorherige Auswahl","nextMessage":"Weitere Auswahlmöglichkeiten"};
diff --git a/js/dojo/dijit/nls/dijit-all_en-gb.js b/js/dojo/dijit/nls/dijit-all_en-gb.js
--- a/js/dojo/dijit/nls/dijit-all_en-gb.js
+++ b/js/dojo/dijit/nls/dijit-all_en-gb.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_en-gb");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.en_gb");dojo.nls.colors.en_gb={"lightsteelblue": "light steel blue", "orangered": "orange red", "midnightblue": "midnight blue", "cadetblue": "cadet blue", "seashell": "seashell", "slategrey": "slate gray", "coral": "coral", "darkturquoise": "dark turquoise", "antiquewhite": "antique white", "mediumspringgreen": "medium spring green", "salmon": "salmon", "darkgrey": "dark gray", "ivory": "ivory", "greenyellow": "green-yellow", "mistyrose": "misty rose", "lightsalmon": "light salmon", "silver": "silver", "dimgrey": "dim gray", "orange": "orange", "white": "white", "navajowhite": "navajo white", "royalblue": "royal blue", "deeppink": "deep pink", "lime": "lime", "oldlace": "old lace", "chartreuse": "chartreuse", "darkcyan": "dark cyan", "yellow": "yellow", "linen": "linen", "olive": "olive", "gold": "gold", "lawngreen": "lawn green", "lightyellow": "light yellow", "tan": "tan", "darkviolet": "dark violet", "lightslategrey": "light slate gray", "grey": "gray", "darkkhaki": "dark khaki", "green": "green", "deepskyblue": "deep sky blue", "aqua": "aqua", "sienna": "sienna", "mintcream": "mint cream", "rosybrown": "rosy brown", "mediumslateblue": "medium slate blue", "magenta": "magenta", "lightseagreen": "light sea green", "cyan": "cyan", "olivedrab": "olive drab", "darkgoldenrod": "dark goldenrod", "slateblue": "slate blue", "mediumaquamarine": "medium aquamarine", "lavender": "lavender", "mediumseagreen": "medium sea green", "maroon": "maroon", "darkslategray": "dark slate gray", "mediumturquoise": "medium turquoise", "ghostwhite": "ghost white", "darkblue": "dark blue", "mediumvioletred": "medium violet-red", "brown": "brown", "lightgray": "light gray", "sandybrown": "sandy brown", "pink": "pink", "firebrick": "fire brick", "indigo": "indigo", "snow": "snow", "darkorchid": "dark orchid", "turquoise": "turquoise", "chocolate": "chocolate", "springgreen": "spring green", "moccasin": "moccasin", "navy": "navy", "lemonchiffon": "lemon chiffon", "teal": "teal", "floralwhite": "floral white", "cornflowerblue": "cornflower blue", "paleturquoise": "pale turquoise", "purple": "purple", "gainsboro": "gainsboro", "plum": "plum", "red": "red", "blue": "blue", "forestgreen": "forest green", "darkgreen": "dark green", "honeydew": "honeydew", "darkseagreen": "dark sea green", "lightcoral": "light coral", "palevioletred": "pale violet-red", "mediumpurple": "medium purple", "saddlebrown": "saddle brown", "darkmagenta": "dark magenta", "thistle": "thistle", "whitesmoke": "white smoke", "wheat": "wheat", "violet": "violet", "lightskyblue": "light sky blue", "goldenrod": "goldenrod", "mediumblue": "medium blue", "skyblue": "sky blue", "crimson": "crimson", "darksalmon": "dark salmon", "darkred": "dark red", "darkslategrey": "dark slate gray", "peru": "peru", "lightgrey": "light gray", "lightgoldenrodyellow": "light goldenrod yellow", "blanchedalmond": "blanched almond", "aliceblue": "alice blue", "bisque": "bisque", "slategray": "slate gray", "palegoldenrod": "pale goldenrod", "darkorange": "dark orange", "aquamarine": "aquamarine", "lightgreen": "light green", "burlywood": "burlywood", "dodgerblue": "dodger blue", "darkgray": "dark gray", "lightcyan": "light cyan", "powderblue": "powder blue", "blueviolet": "blue-violet", "orchid": "orchid", "dimgray": "dim gray", "beige": "beige", "fuchsia": "fuchsia", "lavenderblush": "lavender blush", "hotpink": "hot pink", "steelblue": "steel blue", "tomato": "tomato", "lightpink": "light pink", "limegreen": "lime green", "indianred": "indian red", "papayawhip": "papaya whip", "lightslategray": "light slate gray", "gray": "gray", "mediumorchid": "medium orchid", "cornsilk": "cornsilk", "black": "black", "seagreen": "sea green", "darkslateblue": "dark slate blue", "khaki": "khaki", "lightblue": "light blue", "palegreen": "pale green", "azure": "azure", "peachpuff": "peach puff", "darkolivegreen": "dark olive green", "yellowgreen": "yellow green"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.en_gb");dijit.nls.loading.en_gb={"loadingState": "Loading...", "errorState": "Sorry, an error occurred"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.en_gb");dijit.nls.Textarea.en_gb={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.en_gb");dijit._editor.nls.commands.en_gb={"removeFormat": "Remove Format", "copy": "Copy", "paste": "Paste", "selectAll": "Select All", "insertOrderedList": "Numbered List", "insertTable": "Insert/Edit Table", "underline": "Underline", "foreColor": "Foreground Color", "htmlToggle": "HTML Source", "formatBlock": "Paragraph Style", "insertHorizontalRule": "Horizontal Rule", "delete": "Delete", "appleKey": "⌘${0}", "insertUnorderedList": "Bullet List", "tableProp": "Table Property", "insertImage": "Insert Image", "superscript": "Superscript", "subscript": "Subscript", "createLink": "Create Link", "undo": "Undo", "italic": "Italic", "fontName": "Font Name", "justifyLeft": "Align Left", "unlink": "Remove Link", "toggleTableBorder": "Toggle Table Border", "ctrlKey": "ctrl+${0}", "fontSize": "Font Size", "indent": "Indent", "redo": "Redo", "strikethrough": "Strikethrough", "justifyFull": "Justify", "justifyCenter": "Align Center", "hiliteColor": "Background Color", "deleteTable": "Delete Table", "outdent": "Outdent", "cut": "Cut", "plainFormatBlock": "Paragraph Style", "bold": "Bold", "systemShortcutFF": "The \"${0}\" action is only available in Mozilla Firefox using a keyboard shortcut. Use ${1}.", "justifyRight": "Align Right"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.en_gb");dojo.cldr.nls.number.en_gb={"currencyFormat": "¤#,##0.00", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.en_gb");dijit.nls.common.en_gb={"buttonCancel": "Cancel", "buttonSave": "Save", "buttonOk": "OK"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.en_gb");dijit.form.nls.validate.en_gb={"rangeMessage": "* This value is out of range.", "invalidMessage": "* The value entered is not valid.", "missingMessage": "* This value is required."};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.en_gb");dijit.form.nls.ComboBox.en_gb={"previousMessage": "Previous choices", "nextMessage": "More choices"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.en_gb");dojo.cldr.nls.currency.en_gb={"HKD_displayName": "Hong Kong Dollar", "CHF_displayName": "Swiss Franc", "CHF_symbol": "SwF", "HKD_symbol": "HK$", "CAD_displayName": "Canadian Dollar", "USD_symbol": "US$", "AUD_displayName": "Australian Dollar", "JPY_displayName": "Japanese Yen", "CAD_symbol": "Can$", "USD_displayName": "US Dollar", "GBP_displayName": "British Pound Sterling", "AUD_symbol": "$A", "EUR_displayName": "Euro", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.en_gb");dojo.cldr.nls.gregorian.en_gb={"dateFormat-short": "dd/MM/yyyy", "timeFormat-long": "HH:mm:ss z", "dateFormat-medium": "d MMM yyyy", "dateFormat-long": "d MMMM yyyy", "timeFormat-medium": "HH:mm:ss", "timeFormat-short": "HH:mm", "timeFormat-full": "HH:mm:ss z", "dateFormat-full": "EEEE, d MMMM yyyy", "months-standAlone-narrow": ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], "eraNames": ["Before Christ", "Anno Domini"], "days-standAlone-narrow": ["S", "M", "T", "W", "T", "F", "S"], "field-dayperiod": "AM/PM", "months-format-wide": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], "months-format-abbr": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], "days-format-wide": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], "eraAbbr": ["BC", "AD"], "quarters-format-wide": ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"], "days-format-abbr": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-minute": "Minute", "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "pm": "PM", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "am": "AM", "dateTimeFormats-appendItem-Era": "{0} {1}"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.en_gb");dijit.nls.Textarea.en_gb={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_en-gb");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.en_gb");dojo.nls.colors.en_gb={"lightsteelblue":"light steel blue","orangered":"orange red","midnightblue":"midnight blue","cadetblue":"cadet blue","seashell":"seashell","slategrey":"slate gray","coral":"coral","darkturquoise":"dark turquoise","antiquewhite":"antique white","mediumspringgreen":"medium spring green","salmon":"salmon","darkgrey":"dark gray","ivory":"ivory","greenyellow":"green-yellow","mistyrose":"misty rose","lightsalmon":"light salmon","silver":"silver","dimgrey":"dim gray","orange":"orange","white":"white","navajowhite":"navajo white","royalblue":"royal blue","deeppink":"deep pink","lime":"lime","oldlace":"old lace","chartreuse":"chartreuse","darkcyan":"dark cyan","yellow":"yellow","linen":"linen","olive":"olive","gold":"gold","lawngreen":"lawn green","lightyellow":"light yellow","tan":"tan","darkviolet":"dark violet","lightslategrey":"light slate gray","grey":"gray","darkkhaki":"dark khaki","green":"green","deepskyblue":"deep sky blue","aqua":"aqua","sienna":"sienna","mintcream":"mint cream","rosybrown":"rosy brown","mediumslateblue":"medium slate blue","magenta":"magenta","lightseagreen":"light sea green","cyan":"cyan","olivedrab":"olive drab","darkgoldenrod":"dark goldenrod","slateblue":"slate blue","mediumaquamarine":"medium aquamarine","lavender":"lavender","mediumseagreen":"medium sea green","maroon":"maroon","darkslategray":"dark slate gray","mediumturquoise":"medium turquoise","ghostwhite":"ghost white","darkblue":"dark blue","mediumvioletred":"medium violet-red","brown":"brown","lightgray":"light gray","sandybrown":"sandy brown","pink":"pink","firebrick":"fire brick","indigo":"indigo","snow":"snow","darkorchid":"dark orchid","turquoise":"turquoise","chocolate":"chocolate","springgreen":"spring green","moccasin":"moccasin","navy":"navy","lemonchiffon":"lemon chiffon","teal":"teal","floralwhite":"floral white","cornflowerblue":"cornflower blue","paleturquoise":"pale turquoise","purple":"purple","gainsboro":"gainsboro","plum":"plum","red":"red","blue":"blue","forestgreen":"forest green","darkgreen":"dark green","honeydew":"honeydew","darkseagreen":"dark sea green","lightcoral":"light coral","palevioletred":"pale violet-red","mediumpurple":"medium purple","saddlebrown":"saddle brown","darkmagenta":"dark magenta","thistle":"thistle","whitesmoke":"white smoke","wheat":"wheat","violet":"violet","lightskyblue":"light sky blue","goldenrod":"goldenrod","mediumblue":"medium blue","skyblue":"sky blue","crimson":"crimson","darksalmon":"dark salmon","darkred":"dark red","darkslategrey":"dark slate gray","peru":"peru","lightgrey":"light gray","lightgoldenrodyellow":"light goldenrod yellow","blanchedalmond":"blanched almond","aliceblue":"alice blue","bisque":"bisque","slategray":"slate gray","palegoldenrod":"pale goldenrod","darkorange":"dark orange","aquamarine":"aquamarine","lightgreen":"light green","burlywood":"burlywood","dodgerblue":"dodger blue","darkgray":"dark gray","lightcyan":"light cyan","powderblue":"powder blue","blueviolet":"blue-violet","orchid":"orchid","dimgray":"dim gray","beige":"beige","fuchsia":"fuchsia","lavenderblush":"lavender blush","hotpink":"hot pink","steelblue":"steel blue","tomato":"tomato","lightpink":"light pink","limegreen":"lime green","indianred":"indian red","papayawhip":"papaya whip","lightslategray":"light slate gray","gray":"gray","mediumorchid":"medium orchid","cornsilk":"cornsilk","black":"black","seagreen":"sea green","darkslateblue":"dark slate blue","khaki":"khaki","lightblue":"light blue","palegreen":"pale green","azure":"azure","peachpuff":"peach puff","darkolivegreen":"dark olive green","yellowgreen":"yellow green"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.en_gb");dijit.nls.loading.en_gb={"loadingState":"Loading...","errorState":"Sorry, an error occurred"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.en_gb");dijit.nls.common.en_gb={"buttonOk":"OK","buttonCancel":"Cancel","buttonSave":"Save","itemClose":"Close"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.en_gb");dijit._editor.nls.commands.en_gb={"removeFormat":"Remove Format","copy":"Copy","paste":"Paste","selectAll":"Select All","insertOrderedList":"Numbered List","insertTable":"Insert/Edit Table","print":"Print","underline":"Underline","foreColor":"Foreground Color","htmlToggle":"HTML Source","formatBlock":"Paragraph Style","newPage":"New Page","insertHorizontalRule":"Horizontal Rule","delete":"Delete","appleKey":"⌘${0}","insertUnorderedList":"Bullet List","tableProp":"Table Property","insertImage":"Insert Image","superscript":"Superscript","subscript":"Subscript","createLink":"Create Link","undo":"Undo","fullScreen":"Toggle Full Screen","italic":"Italic","fontName":"Font Name","justifyLeft":"Align Left","unlink":"Remove Link","toggleTableBorder":"Toggle Table Border","viewSource":"View HTML Source","ctrlKey":"ctrl+${0}","fontSize":"Font Size","systemShortcut":"The \"${0}\" action is only available in your browser using a keyboard shortcut. Use ${1}.","indent":"Indent","redo":"Redo","strikethrough":"Strikethrough","justifyFull":"Justify","justifyCenter":"Align Center","hiliteColor":"Background Color","deleteTable":"Delete Table","outdent":"Outdent","cut":"Cut","plainFormatBlock":"Paragraph Style","toggleDir":"Toggle Direction","bold":"Bold","tabIndent":"Tab Indent","justifyRight":"Align Right"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.en_gb");dojo.cldr.nls.number.en_gb={"currencyFormat":"¤#,##0.00","group":",","percentSign":"%","exponential":"E","percentFormat":"#,##0%","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":".","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.en_gb");dijit.form.nls.validate.en_gb={"rangeMessage":"This value is out of range.","invalidMessage":"The value entered is not valid.","missingMessage":"This value is required."};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.en_gb");dojo.cldr.nls.currency.en_gb={"HKD_displayName":"Hong Kong Dollar","CHF_displayName":"Swiss Franc","JPY_symbol":"¥","CAD_displayName":"Canadian Dollar","CNY_displayName":"Chinese Yuan Renminbi","USD_symbol":"$","AUD_displayName":"Australian Dollar","JPY_displayName":"Japanese Yen","USD_displayName":"US Dollar","GBP_displayName":"British Pound Sterling","EUR_displayName":"Euro","CHF_symbol":"Fr.","HKD_symbol":"HK$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.en_gb");dojo.cldr.nls.gregorian.en_gb={"dateFormatItem-yyMMM":"MMM yy","dateFormatItem-Md":"d/M","dateFormatItem-yMEd":"EEE, d/M/yyyy","dateFormatItem-yyyyMMMM":"MMMM y","timeFormat-full":"HH:mm:ss zzzz","timeFormat-medium":"HH:mm:ss","dateFormatItem-MEd":"E, d/M","dateFormat-medium":"d MMM y","dateFormatItem-MMdd":"dd/MM","dateFormatItem-yyyyMM":"MM/yyyy","dateFormat-full":"EEEE, d MMMM y","timeFormat-long":"HH:mm:ss z","timeFormat-short":"HH:mm","dateFormat-short":"dd/MM/yyyy","dateFormatItem-MMMMd":"d MMMM","dateFormat-long":"d MMMM y","dateFormatItem-MMMEd":"E d MMM","dateFormatItem-yM":"M/yyyy","field-dayperiod":"AM/PM","dateFormatItem-yQ":"Q yyyy","field-minute":"Minute","eraNames":["Before Christ","Anno Domini"],"dateTimeFormat-full":"{1} {0}","field-weekday":"Day of the Week","dateFormatItem-yQQQ":"QQQ y","days-standAlone-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dateFormatItem-MMM":"LLL","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateTimeFormat-short":"{1} {0}","field-era":"Era","field-hour":"Hour","dateTimeFormat-medium":"{1} {0}","dateFormatItem-y":"y","months-standAlone-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"dateFormatItem-yMMM":"MMM y","days-standAlone-narrow":["S","M","T","W","T","F","S"],"eraAbbr":["BC","AD"],"dateFormatItem-EEEd":"d EEE","field-zone":"Zone","dateFormatItem-Hm":"H:mm","dateFormatItem-Hms":"H:mm:ss","quarters-standAlone-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"dateFormatItem-yMMMM":"MMMM y","dateFormatItem-ms":"mm:ss","field-year":"Year","quarters-standAlone-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","field-week":"Week","months-standAlone-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"dateFormatItem-MMMMEd":"E, MMMM d","dateFormatItem-MMMd":"MMM d","months-format-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"field-month":"Month","quarters-format-abbr":["Q1","Q2","Q3","Q4"],"days-format-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"pm":"PM","dateFormatItem-M":"L","days-format-narrow":["S","M","T","W","T","F","S"],"field-second":"Second","field-day":"Day","months-format-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-hm":"h:mm a","am":"AM","days-standAlone-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"dateFormatItem-yMMMEd":"EEE, MMM d, y","months-format-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"dateFormatItem-d":"d","quarters-format-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"days-format-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"eraNarrow":["B","A"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-hms":"h:mm:ss a"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.en_gb");dijit.form.nls.ComboBox.en_gb={"previousMessage":"Previous choices","nextMessage":"More choices"};
diff --git a/js/dojo/dijit/nls/dijit-all_en-us.js b/js/dojo/dijit/nls/dijit-all_en-us.js
--- a/js/dojo/dijit/nls/dijit-all_en-us.js
+++ b/js/dojo/dijit/nls/dijit-all_en-us.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_en-us");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.en_us");dojo.nls.colors.en_us={"lightsteelblue": "light steel blue", "orangered": "orange red", "midnightblue": "midnight blue", "cadetblue": "cadet blue", "seashell": "seashell", "slategrey": "slate gray", "coral": "coral", "darkturquoise": "dark turquoise", "antiquewhite": "antique white", "mediumspringgreen": "medium spring green", "salmon": "salmon", "darkgrey": "dark gray", "ivory": "ivory", "greenyellow": "green-yellow", "mistyrose": "misty rose", "lightsalmon": "light salmon", "silver": "silver", "dimgrey": "dim gray", "orange": "orange", "white": "white", "navajowhite": "navajo white", "royalblue": "royal blue", "deeppink": "deep pink", "lime": "lime", "oldlace": "old lace", "chartreuse": "chartreuse", "darkcyan": "dark cyan", "yellow": "yellow", "linen": "linen", "olive": "olive", "gold": "gold", "lawngreen": "lawn green", "lightyellow": "light yellow", "tan": "tan", "darkviolet": "dark violet", "lightslategrey": "light slate gray", "grey": "gray", "darkkhaki": "dark khaki", "green": "green", "deepskyblue": "deep sky blue", "aqua": "aqua", "sienna": "sienna", "mintcream": "mint cream", "rosybrown": "rosy brown", "mediumslateblue": "medium slate blue", "magenta": "magenta", "lightseagreen": "light sea green", "cyan": "cyan", "olivedrab": "olive drab", "darkgoldenrod": "dark goldenrod", "slateblue": "slate blue", "mediumaquamarine": "medium aquamarine", "lavender": "lavender", "mediumseagreen": "medium sea green", "maroon": "maroon", "darkslategray": "dark slate gray", "mediumturquoise": "medium turquoise", "ghostwhite": "ghost white", "darkblue": "dark blue", "mediumvioletred": "medium violet-red", "brown": "brown", "lightgray": "light gray", "sandybrown": "sandy brown", "pink": "pink", "firebrick": "fire brick", "indigo": "indigo", "snow": "snow", "darkorchid": "dark orchid", "turquoise": "turquoise", "chocolate": "chocolate", "springgreen": "spring green", "moccasin": "moccasin", "navy": "navy", "lemonchiffon": "lemon chiffon", "teal": "teal", "floralwhite": "floral white", "cornflowerblue": "cornflower blue", "paleturquoise": "pale turquoise", "purple": "purple", "gainsboro": "gainsboro", "plum": "plum", "red": "red", "blue": "blue", "forestgreen": "forest green", "darkgreen": "dark green", "honeydew": "honeydew", "darkseagreen": "dark sea green", "lightcoral": "light coral", "palevioletred": "pale violet-red", "mediumpurple": "medium purple", "saddlebrown": "saddle brown", "darkmagenta": "dark magenta", "thistle": "thistle", "whitesmoke": "white smoke", "wheat": "wheat", "violet": "violet", "lightskyblue": "light sky blue", "goldenrod": "goldenrod", "mediumblue": "medium blue", "skyblue": "sky blue", "crimson": "crimson", "darksalmon": "dark salmon", "darkred": "dark red", "darkslategrey": "dark slate gray", "peru": "peru", "lightgrey": "light gray", "lightgoldenrodyellow": "light goldenrod yellow", "blanchedalmond": "blanched almond", "aliceblue": "alice blue", "bisque": "bisque", "slategray": "slate gray", "palegoldenrod": "pale goldenrod", "darkorange": "dark orange", "aquamarine": "aquamarine", "lightgreen": "light green", "burlywood": "burlywood", "dodgerblue": "dodger blue", "darkgray": "dark gray", "lightcyan": "light cyan", "powderblue": "powder blue", "blueviolet": "blue-violet", "orchid": "orchid", "dimgray": "dim gray", "beige": "beige", "fuchsia": "fuchsia", "lavenderblush": "lavender blush", "hotpink": "hot pink", "steelblue": "steel blue", "tomato": "tomato", "lightpink": "light pink", "limegreen": "lime green", "indianred": "indian red", "papayawhip": "papaya whip", "lightslategray": "light slate gray", "gray": "gray", "mediumorchid": "medium orchid", "cornsilk": "cornsilk", "black": "black", "seagreen": "sea green", "darkslateblue": "dark slate blue", "khaki": "khaki", "lightblue": "light blue", "palegreen": "pale green", "azure": "azure", "peachpuff": "peach puff", "darkolivegreen": "dark olive green", "yellowgreen": "yellow green"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.en_us");dijit.nls.loading.en_us={"loadingState": "Loading...", "errorState": "Sorry, an error occurred"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.en_us");dijit.nls.Textarea.en_us={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.en_us");dijit._editor.nls.commands.en_us={"removeFormat": "Remove Format", "copy": "Copy", "paste": "Paste", "selectAll": "Select All", "insertOrderedList": "Numbered List", "insertTable": "Insert/Edit Table", "underline": "Underline", "foreColor": "Foreground Color", "htmlToggle": "HTML Source", "formatBlock": "Paragraph Style", "insertHorizontalRule": "Horizontal Rule", "delete": "Delete", "appleKey": "⌘${0}", "insertUnorderedList": "Bullet List", "tableProp": "Table Property", "insertImage": "Insert Image", "superscript": "Superscript", "subscript": "Subscript", "createLink": "Create Link", "undo": "Undo", "italic": "Italic", "fontName": "Font Name", "justifyLeft": "Align Left", "unlink": "Remove Link", "toggleTableBorder": "Toggle Table Border", "ctrlKey": "ctrl+${0}", "fontSize": "Font Size", "indent": "Indent", "redo": "Redo", "strikethrough": "Strikethrough", "justifyFull": "Justify", "justifyCenter": "Align Center", "hiliteColor": "Background Color", "deleteTable": "Delete Table", "outdent": "Outdent", "cut": "Cut", "plainFormatBlock": "Paragraph Style", "bold": "Bold", "systemShortcutFF": "The \"${0}\" action is only available in Mozilla Firefox using a keyboard shortcut. Use ${1}.", "justifyRight": "Align Right"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.en_us");dojo.cldr.nls.number.en_us={"currencyFormat": "¤#,##0.00;(¤#,##0.00)", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.en_us");dijit.nls.common.en_us={"buttonCancel": "Cancel", "buttonSave": "Save", "buttonOk": "OK"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.en_us");dijit.form.nls.validate.en_us={"rangeMessage": "* This value is out of range.", "invalidMessage": "* The value entered is not valid.", "missingMessage": "* This value is required."};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.en_us");dijit.form.nls.ComboBox.en_us={"previousMessage": "Previous choices", "nextMessage": "More choices"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.en_us");dojo.cldr.nls.currency.en_us={"USD_symbol": "$", "HKD_displayName": "Hong Kong Dollar", "CHF_displayName": "Swiss Franc", "CHF_symbol": "SwF", "HKD_symbol": "HK$", "CAD_displayName": "Canadian Dollar", "AUD_displayName": "Australian Dollar", "JPY_displayName": "Japanese Yen", "CAD_symbol": "Can$", "USD_displayName": "US Dollar", "GBP_displayName": "British Pound Sterling", "AUD_symbol": "$A", "EUR_displayName": "Euro", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.en_us");dojo.cldr.nls.gregorian.en_us={"dateFormat-medium": "MMM d, yyyy", "timeFormat-full": "h:mm:ss a v", "months-standAlone-narrow": ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], "eraNames": ["Before Christ", "Anno Domini"], "days-standAlone-narrow": ["S", "M", "T", "W", "T", "F", "S"], "timeFormat-medium": "h:mm:ss a", "dateFormat-long": "MMMM d, yyyy", "field-dayperiod": "AM/PM", "dateFormat-short": "M/d/yy", "months-format-wide": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], "timeFormat-short": "h:mm a", "months-format-abbr": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], "days-format-wide": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], "timeFormat-long": "h:mm:ss a z", "eraAbbr": ["BC", "AD"], "quarters-format-wide": ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"], "dateFormat-full": "EEEE, MMMM d, yyyy", "days-format-abbr": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-minute": "Minute", "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "pm": "PM", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "am": "AM", "dateTimeFormats-appendItem-Era": "{0} {1}"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.en_us");dijit.nls.Textarea.en_us={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_en-us");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.en_us");dojo.nls.colors.en_us={"lightsteelblue":"light steel blue","orangered":"orange red","midnightblue":"midnight blue","cadetblue":"cadet blue","seashell":"seashell","slategrey":"slate gray","coral":"coral","darkturquoise":"dark turquoise","antiquewhite":"antique white","mediumspringgreen":"medium spring green","salmon":"salmon","darkgrey":"dark gray","ivory":"ivory","greenyellow":"green-yellow","mistyrose":"misty rose","lightsalmon":"light salmon","silver":"silver","dimgrey":"dim gray","orange":"orange","white":"white","navajowhite":"navajo white","royalblue":"royal blue","deeppink":"deep pink","lime":"lime","oldlace":"old lace","chartreuse":"chartreuse","darkcyan":"dark cyan","yellow":"yellow","linen":"linen","olive":"olive","gold":"gold","lawngreen":"lawn green","lightyellow":"light yellow","tan":"tan","darkviolet":"dark violet","lightslategrey":"light slate gray","grey":"gray","darkkhaki":"dark khaki","green":"green","deepskyblue":"deep sky blue","aqua":"aqua","sienna":"sienna","mintcream":"mint cream","rosybrown":"rosy brown","mediumslateblue":"medium slate blue","magenta":"magenta","lightseagreen":"light sea green","cyan":"cyan","olivedrab":"olive drab","darkgoldenrod":"dark goldenrod","slateblue":"slate blue","mediumaquamarine":"medium aquamarine","lavender":"lavender","mediumseagreen":"medium sea green","maroon":"maroon","darkslategray":"dark slate gray","mediumturquoise":"medium turquoise","ghostwhite":"ghost white","darkblue":"dark blue","mediumvioletred":"medium violet-red","brown":"brown","lightgray":"light gray","sandybrown":"sandy brown","pink":"pink","firebrick":"fire brick","indigo":"indigo","snow":"snow","darkorchid":"dark orchid","turquoise":"turquoise","chocolate":"chocolate","springgreen":"spring green","moccasin":"moccasin","navy":"navy","lemonchiffon":"lemon chiffon","teal":"teal","floralwhite":"floral white","cornflowerblue":"cornflower blue","paleturquoise":"pale turquoise","purple":"purple","gainsboro":"gainsboro","plum":"plum","red":"red","blue":"blue","forestgreen":"forest green","darkgreen":"dark green","honeydew":"honeydew","darkseagreen":"dark sea green","lightcoral":"light coral","palevioletred":"pale violet-red","mediumpurple":"medium purple","saddlebrown":"saddle brown","darkmagenta":"dark magenta","thistle":"thistle","whitesmoke":"white smoke","wheat":"wheat","violet":"violet","lightskyblue":"light sky blue","goldenrod":"goldenrod","mediumblue":"medium blue","skyblue":"sky blue","crimson":"crimson","darksalmon":"dark salmon","darkred":"dark red","darkslategrey":"dark slate gray","peru":"peru","lightgrey":"light gray","lightgoldenrodyellow":"light goldenrod yellow","blanchedalmond":"blanched almond","aliceblue":"alice blue","bisque":"bisque","slategray":"slate gray","palegoldenrod":"pale goldenrod","darkorange":"dark orange","aquamarine":"aquamarine","lightgreen":"light green","burlywood":"burlywood","dodgerblue":"dodger blue","darkgray":"dark gray","lightcyan":"light cyan","powderblue":"powder blue","blueviolet":"blue-violet","orchid":"orchid","dimgray":"dim gray","beige":"beige","fuchsia":"fuchsia","lavenderblush":"lavender blush","hotpink":"hot pink","steelblue":"steel blue","tomato":"tomato","lightpink":"light pink","limegreen":"lime green","indianred":"indian red","papayawhip":"papaya whip","lightslategray":"light slate gray","gray":"gray","mediumorchid":"medium orchid","cornsilk":"cornsilk","black":"black","seagreen":"sea green","darkslateblue":"dark slate blue","khaki":"khaki","lightblue":"light blue","palegreen":"pale green","azure":"azure","peachpuff":"peach puff","darkolivegreen":"dark olive green","yellowgreen":"yellow green"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.en_us");dijit.nls.loading.en_us={"loadingState":"Loading...","errorState":"Sorry, an error occurred"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.en_us");dijit.nls.common.en_us={"buttonOk":"OK","buttonCancel":"Cancel","buttonSave":"Save","itemClose":"Close"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.en_us");dijit._editor.nls.commands.en_us={"removeFormat":"Remove Format","copy":"Copy","paste":"Paste","selectAll":"Select All","insertOrderedList":"Numbered List","insertTable":"Insert/Edit Table","print":"Print","underline":"Underline","foreColor":"Foreground Color","htmlToggle":"HTML Source","formatBlock":"Paragraph Style","newPage":"New Page","insertHorizontalRule":"Horizontal Rule","delete":"Delete","appleKey":"⌘${0}","insertUnorderedList":"Bullet List","tableProp":"Table Property","insertImage":"Insert Image","superscript":"Superscript","subscript":"Subscript","createLink":"Create Link","undo":"Undo","fullScreen":"Toggle Full Screen","italic":"Italic","fontName":"Font Name","justifyLeft":"Align Left","unlink":"Remove Link","toggleTableBorder":"Toggle Table Border","viewSource":"View HTML Source","ctrlKey":"ctrl+${0}","fontSize":"Font Size","systemShortcut":"The \"${0}\" action is only available in your browser using a keyboard shortcut. Use ${1}.","indent":"Indent","redo":"Redo","strikethrough":"Strikethrough","justifyFull":"Justify","justifyCenter":"Align Center","hiliteColor":"Background Color","deleteTable":"Delete Table","outdent":"Outdent","cut":"Cut","plainFormatBlock":"Paragraph Style","toggleDir":"Toggle Direction","bold":"Bold","tabIndent":"Tab Indent","justifyRight":"Align Right"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.en_us");dojo.cldr.nls.number.en_us={"currencyFormat":"¤#,##0.00;(¤#,##0.00)","group":",","percentSign":"%","exponential":"E","percentFormat":"#,##0%","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":".","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.en_us");dijit.form.nls.validate.en_us={"rangeMessage":"This value is out of range.","invalidMessage":"The value entered is not valid.","missingMessage":"This value is required."};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.en_us");dojo.cldr.nls.currency.en_us={"USD_symbol":"$","HKD_displayName":"Hong Kong Dollar","CHF_displayName":"Swiss Franc","JPY_symbol":"¥","CAD_displayName":"Canadian Dollar","CNY_displayName":"Chinese Yuan Renminbi","AUD_displayName":"Australian Dollar","JPY_displayName":"Japanese Yen","USD_displayName":"US Dollar","GBP_displayName":"British Pound Sterling","EUR_displayName":"Euro","CHF_symbol":"Fr.","HKD_symbol":"HK$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.en_us");dojo.cldr.nls.gregorian.en_us={"dateFormatItem-yM":"M/yyyy","field-dayperiod":"AM/PM","dateFormatItem-yQ":"Q yyyy","field-minute":"Minute","eraNames":["Before Christ","Anno Domini"],"dateFormatItem-MMMEd":"E, MMM d","dateTimeFormat-full":"{1} {0}","field-weekday":"Day of the Week","dateFormatItem-yQQQ":"QQQ y","days-standAlone-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dateFormatItem-MMM":"LLL","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateTimeFormat-short":"{1} {0}","field-era":"Era","field-hour":"Hour","dateTimeFormat-medium":"{1} {0}","dateFormatItem-y":"y","timeFormat-full":"h:mm:ss a zzzz","months-standAlone-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"dateFormatItem-yMMM":"MMM y","days-standAlone-narrow":["S","M","T","W","T","F","S"],"eraAbbr":["BC","AD"],"dateFormat-long":"MMMM d, y","timeFormat-medium":"h:mm:ss a","dateFormatItem-EEEd":"d EEE","field-zone":"Zone","dateFormatItem-Hm":"H:mm","dateFormat-medium":"MMM d, y","dateFormatItem-Hms":"H:mm:ss","quarters-standAlone-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"dateFormatItem-yMMMM":"MMMM y","dateFormatItem-ms":"mm:ss","field-year":"Year","quarters-standAlone-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","field-week":"Week","months-standAlone-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"dateFormatItem-MMMMEd":"E, MMMM d","dateFormatItem-MMMd":"MMM d","timeFormat-long":"h:mm:ss a z","months-format-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"timeFormat-short":"h:mm a","field-month":"Month","quarters-format-abbr":["Q1","Q2","Q3","Q4"],"dateFormatItem-MMMMd":"MMMM d","days-format-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"pm":"PM","dateFormatItem-M":"L","days-format-narrow":["S","M","T","W","T","F","S"],"field-second":"Second","field-day":"Day","dateFormatItem-MEd":"E, M/d","months-format-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-hm":"h:mm a","am":"AM","days-standAlone-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"dateFormat-short":"M/d/yy","dateFormatItem-yMMMEd":"EEE, MMM d, y","dateFormat-full":"EEEE, MMMM d, y","dateFormatItem-Md":"M/d","dateFormatItem-yMEd":"EEE, M/d/yyyy","months-format-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"dateFormatItem-d":"d","quarters-format-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"days-format-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"eraNarrow":["B","A"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-hms":"h:mm:ss a"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.en_us");dijit.form.nls.ComboBox.en_us={"previousMessage":"Previous choices","nextMessage":"More choices"};
diff --git a/js/dojo/dijit/nls/dijit-all_en.js b/js/dojo/dijit/nls/dijit-all_en.js
--- a/js/dojo/dijit/nls/dijit-all_en.js
+++ b/js/dojo/dijit/nls/dijit-all_en.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_en");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.en");dojo.nls.colors.en={"lightsteelblue": "light steel blue", "orangered": "orange red", "midnightblue": "midnight blue", "cadetblue": "cadet blue", "seashell": "seashell", "slategrey": "slate gray", "coral": "coral", "darkturquoise": "dark turquoise", "antiquewhite": "antique white", "mediumspringgreen": "medium spring green", "salmon": "salmon", "darkgrey": "dark gray", "ivory": "ivory", "greenyellow": "green-yellow", "mistyrose": "misty rose", "lightsalmon": "light salmon", "silver": "silver", "dimgrey": "dim gray", "orange": "orange", "white": "white", "navajowhite": "navajo white", "royalblue": "royal blue", "deeppink": "deep pink", "lime": "lime", "oldlace": "old lace", "chartreuse": "chartreuse", "darkcyan": "dark cyan", "yellow": "yellow", "linen": "linen", "olive": "olive", "gold": "gold", "lawngreen": "lawn green", "lightyellow": "light yellow", "tan": "tan", "darkviolet": "dark violet", "lightslategrey": "light slate gray", "grey": "gray", "darkkhaki": "dark khaki", "green": "green", "deepskyblue": "deep sky blue", "aqua": "aqua", "sienna": "sienna", "mintcream": "mint cream", "rosybrown": "rosy brown", "mediumslateblue": "medium slate blue", "magenta": "magenta", "lightseagreen": "light sea green", "cyan": "cyan", "olivedrab": "olive drab", "darkgoldenrod": "dark goldenrod", "slateblue": "slate blue", "mediumaquamarine": "medium aquamarine", "lavender": "lavender", "mediumseagreen": "medium sea green", "maroon": "maroon", "darkslategray": "dark slate gray", "mediumturquoise": "medium turquoise", "ghostwhite": "ghost white", "darkblue": "dark blue", "mediumvioletred": "medium violet-red", "brown": "brown", "lightgray": "light gray", "sandybrown": "sandy brown", "pink": "pink", "firebrick": "fire brick", "indigo": "indigo", "snow": "snow", "darkorchid": "dark orchid", "turquoise": "turquoise", "chocolate": "chocolate", "springgreen": "spring green", "moccasin": "moccasin", "navy": "navy", "lemonchiffon": "lemon chiffon", "teal": "teal", "floralwhite": "floral white", "cornflowerblue": "cornflower blue", "paleturquoise": "pale turquoise", "purple": "purple", "gainsboro": "gainsboro", "plum": "plum", "red": "red", "blue": "blue", "forestgreen": "forest green", "darkgreen": "dark green", "honeydew": "honeydew", "darkseagreen": "dark sea green", "lightcoral": "light coral", "palevioletred": "pale violet-red", "mediumpurple": "medium purple", "saddlebrown": "saddle brown", "darkmagenta": "dark magenta", "thistle": "thistle", "whitesmoke": "white smoke", "wheat": "wheat", "violet": "violet", "lightskyblue": "light sky blue", "goldenrod": "goldenrod", "mediumblue": "medium blue", "skyblue": "sky blue", "crimson": "crimson", "darksalmon": "dark salmon", "darkred": "dark red", "darkslategrey": "dark slate gray", "peru": "peru", "lightgrey": "light gray", "lightgoldenrodyellow": "light goldenrod yellow", "blanchedalmond": "blanched almond", "aliceblue": "alice blue", "bisque": "bisque", "slategray": "slate gray", "palegoldenrod": "pale goldenrod", "darkorange": "dark orange", "aquamarine": "aquamarine", "lightgreen": "light green", "burlywood": "burlywood", "dodgerblue": "dodger blue", "darkgray": "dark gray", "lightcyan": "light cyan", "powderblue": "powder blue", "blueviolet": "blue-violet", "orchid": "orchid", "dimgray": "dim gray", "beige": "beige", "fuchsia": "fuchsia", "lavenderblush": "lavender blush", "hotpink": "hot pink", "steelblue": "steel blue", "tomato": "tomato", "lightpink": "light pink", "limegreen": "lime green", "indianred": "indian red", "papayawhip": "papaya whip", "lightslategray": "light slate gray", "gray": "gray", "mediumorchid": "medium orchid", "cornsilk": "cornsilk", "black": "black", "seagreen": "sea green", "darkslateblue": "dark slate blue", "khaki": "khaki", "lightblue": "light blue", "palegreen": "pale green", "azure": "azure", "peachpuff": "peach puff", "darkolivegreen": "dark olive green", "yellowgreen": "yellow green"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.en");dijit.nls.loading.en={"loadingState": "Loading...", "errorState": "Sorry, an error occurred"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.en");dijit.nls.Textarea.en={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.en");dijit._editor.nls.commands.en={"removeFormat": "Remove Format", "copy": "Copy", "paste": "Paste", "selectAll": "Select All", "insertOrderedList": "Numbered List", "insertTable": "Insert/Edit Table", "underline": "Underline", "foreColor": "Foreground Color", "htmlToggle": "HTML Source", "formatBlock": "Paragraph Style", "insertHorizontalRule": "Horizontal Rule", "delete": "Delete", "appleKey": "⌘${0}", "insertUnorderedList": "Bullet List", "tableProp": "Table Property", "insertImage": "Insert Image", "superscript": "Superscript", "subscript": "Subscript", "createLink": "Create Link", "undo": "Undo", "italic": "Italic", "fontName": "Font Name", "justifyLeft": "Align Left", "unlink": "Remove Link", "toggleTableBorder": "Toggle Table Border", "ctrlKey": "ctrl+${0}", "fontSize": "Font Size", "indent": "Indent", "redo": "Redo", "strikethrough": "Strikethrough", "justifyFull": "Justify", "justifyCenter": "Align Center", "hiliteColor": "Background Color", "deleteTable": "Delete Table", "outdent": "Outdent", "cut": "Cut", "plainFormatBlock": "Paragraph Style", "bold": "Bold", "systemShortcutFF": "The \"${0}\" action is only available in Mozilla Firefox using a keyboard shortcut. Use ${1}.", "justifyRight": "Align Right"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.en");dojo.cldr.nls.number.en={"currencyFormat": "¤#,##0.00", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.en");dijit.nls.common.en={"buttonCancel": "Cancel", "buttonSave": "Save", "buttonOk": "OK"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.en");dijit.form.nls.validate.en={"rangeMessage": "* This value is out of range.", "invalidMessage": "* The value entered is not valid.", "missingMessage": "* This value is required."};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.en");dijit.form.nls.ComboBox.en={"previousMessage": "Previous choices", "nextMessage": "More choices"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.en");dojo.cldr.nls.currency.en={"HKD_displayName": "Hong Kong Dollar", "CHF_displayName": "Swiss Franc", "CHF_symbol": "SwF", "HKD_symbol": "HK$", "CAD_displayName": "Canadian Dollar", "USD_symbol": "US$", "AUD_displayName": "Australian Dollar", "JPY_displayName": "Japanese Yen", "CAD_symbol": "Can$", "USD_displayName": "US Dollar", "GBP_displayName": "British Pound Sterling", "AUD_symbol": "$A", "EUR_displayName": "Euro", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.en");dojo.cldr.nls.gregorian.en={"dateFormat-medium": "MMM d, yyyy", "timeFormat-full": "h:mm:ss a v", "months-standAlone-narrow": ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], "eraNames": ["Before Christ", "Anno Domini"], "days-standAlone-narrow": ["S", "M", "T", "W", "T", "F", "S"], "timeFormat-medium": "h:mm:ss a", "dateFormat-long": "MMMM d, yyyy", "field-dayperiod": "AM/PM", "dateFormat-short": "M/d/yy", "months-format-wide": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], "timeFormat-short": "h:mm a", "months-format-abbr": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], "days-format-wide": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], "timeFormat-long": "h:mm:ss a z", "eraAbbr": ["BC", "AD"], "quarters-format-wide": ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"], "dateFormat-full": "EEEE, MMMM d, yyyy", "days-format-abbr": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-minute": "Minute", "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "pm": "PM", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "am": "AM", "dateTimeFormats-appendItem-Era": "{0} {1}"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.en");dijit.nls.Textarea.en={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_en");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.en");dojo.nls.colors.en={"lightsteelblue":"light steel blue","orangered":"orange red","midnightblue":"midnight blue","cadetblue":"cadet blue","seashell":"seashell","slategrey":"slate gray","coral":"coral","darkturquoise":"dark turquoise","antiquewhite":"antique white","mediumspringgreen":"medium spring green","salmon":"salmon","darkgrey":"dark gray","ivory":"ivory","greenyellow":"green-yellow","mistyrose":"misty rose","lightsalmon":"light salmon","silver":"silver","dimgrey":"dim gray","orange":"orange","white":"white","navajowhite":"navajo white","royalblue":"royal blue","deeppink":"deep pink","lime":"lime","oldlace":"old lace","chartreuse":"chartreuse","darkcyan":"dark cyan","yellow":"yellow","linen":"linen","olive":"olive","gold":"gold","lawngreen":"lawn green","lightyellow":"light yellow","tan":"tan","darkviolet":"dark violet","lightslategrey":"light slate gray","grey":"gray","darkkhaki":"dark khaki","green":"green","deepskyblue":"deep sky blue","aqua":"aqua","sienna":"sienna","mintcream":"mint cream","rosybrown":"rosy brown","mediumslateblue":"medium slate blue","magenta":"magenta","lightseagreen":"light sea green","cyan":"cyan","olivedrab":"olive drab","darkgoldenrod":"dark goldenrod","slateblue":"slate blue","mediumaquamarine":"medium aquamarine","lavender":"lavender","mediumseagreen":"medium sea green","maroon":"maroon","darkslategray":"dark slate gray","mediumturquoise":"medium turquoise","ghostwhite":"ghost white","darkblue":"dark blue","mediumvioletred":"medium violet-red","brown":"brown","lightgray":"light gray","sandybrown":"sandy brown","pink":"pink","firebrick":"fire brick","indigo":"indigo","snow":"snow","darkorchid":"dark orchid","turquoise":"turquoise","chocolate":"chocolate","springgreen":"spring green","moccasin":"moccasin","navy":"navy","lemonchiffon":"lemon chiffon","teal":"teal","floralwhite":"floral white","cornflowerblue":"cornflower blue","paleturquoise":"pale turquoise","purple":"purple","gainsboro":"gainsboro","plum":"plum","red":"red","blue":"blue","forestgreen":"forest green","darkgreen":"dark green","honeydew":"honeydew","darkseagreen":"dark sea green","lightcoral":"light coral","palevioletred":"pale violet-red","mediumpurple":"medium purple","saddlebrown":"saddle brown","darkmagenta":"dark magenta","thistle":"thistle","whitesmoke":"white smoke","wheat":"wheat","violet":"violet","lightskyblue":"light sky blue","goldenrod":"goldenrod","mediumblue":"medium blue","skyblue":"sky blue","crimson":"crimson","darksalmon":"dark salmon","darkred":"dark red","darkslategrey":"dark slate gray","peru":"peru","lightgrey":"light gray","lightgoldenrodyellow":"light goldenrod yellow","blanchedalmond":"blanched almond","aliceblue":"alice blue","bisque":"bisque","slategray":"slate gray","palegoldenrod":"pale goldenrod","darkorange":"dark orange","aquamarine":"aquamarine","lightgreen":"light green","burlywood":"burlywood","dodgerblue":"dodger blue","darkgray":"dark gray","lightcyan":"light cyan","powderblue":"powder blue","blueviolet":"blue-violet","orchid":"orchid","dimgray":"dim gray","beige":"beige","fuchsia":"fuchsia","lavenderblush":"lavender blush","hotpink":"hot pink","steelblue":"steel blue","tomato":"tomato","lightpink":"light pink","limegreen":"lime green","indianred":"indian red","papayawhip":"papaya whip","lightslategray":"light slate gray","gray":"gray","mediumorchid":"medium orchid","cornsilk":"cornsilk","black":"black","seagreen":"sea green","darkslateblue":"dark slate blue","khaki":"khaki","lightblue":"light blue","palegreen":"pale green","azure":"azure","peachpuff":"peach puff","darkolivegreen":"dark olive green","yellowgreen":"yellow green"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.en");dijit.nls.loading.en={"loadingState":"Loading...","errorState":"Sorry, an error occurred"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.en");dijit.nls.common.en={"buttonOk":"OK","buttonCancel":"Cancel","buttonSave":"Save","itemClose":"Close"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.en");dijit._editor.nls.commands.en={"removeFormat":"Remove Format","copy":"Copy","paste":"Paste","selectAll":"Select All","insertOrderedList":"Numbered List","insertTable":"Insert/Edit Table","print":"Print","underline":"Underline","foreColor":"Foreground Color","htmlToggle":"HTML Source","formatBlock":"Paragraph Style","newPage":"New Page","insertHorizontalRule":"Horizontal Rule","delete":"Delete","appleKey":"⌘${0}","insertUnorderedList":"Bullet List","tableProp":"Table Property","insertImage":"Insert Image","superscript":"Superscript","subscript":"Subscript","createLink":"Create Link","undo":"Undo","fullScreen":"Toggle Full Screen","italic":"Italic","fontName":"Font Name","justifyLeft":"Align Left","unlink":"Remove Link","toggleTableBorder":"Toggle Table Border","viewSource":"View HTML Source","ctrlKey":"ctrl+${0}","fontSize":"Font Size","systemShortcut":"The \"${0}\" action is only available in your browser using a keyboard shortcut. Use ${1}.","indent":"Indent","redo":"Redo","strikethrough":"Strikethrough","justifyFull":"Justify","justifyCenter":"Align Center","hiliteColor":"Background Color","deleteTable":"Delete Table","outdent":"Outdent","cut":"Cut","plainFormatBlock":"Paragraph Style","toggleDir":"Toggle Direction","bold":"Bold","tabIndent":"Tab Indent","justifyRight":"Align Right"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.en");dojo.cldr.nls.number.en={"group":",","percentSign":"%","exponential":"E","percentFormat":"#,##0%","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":".","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","currencyFormat":"¤#,##0.00;(¤#,##0.00)","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.en");dijit.form.nls.validate.en={"rangeMessage":"This value is out of range.","invalidMessage":"The value entered is not valid.","missingMessage":"This value is required."};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.en");dojo.cldr.nls.currency.en={"HKD_displayName":"Hong Kong Dollar","CHF_displayName":"Swiss Franc","JPY_symbol":"¥","CAD_displayName":"Canadian Dollar","CNY_displayName":"Chinese Yuan Renminbi","USD_symbol":"$","AUD_displayName":"Australian Dollar","JPY_displayName":"Japanese Yen","USD_displayName":"US Dollar","GBP_displayName":"British Pound Sterling","EUR_displayName":"Euro","CHF_symbol":"Fr.","HKD_symbol":"HK$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.en");dojo.cldr.nls.gregorian.en={"dateFormatItem-yM":"M/yyyy","field-dayperiod":"AM/PM","dateFormatItem-yQ":"Q yyyy","field-minute":"Minute","eraNames":["Before Christ","Anno Domini"],"dateFormatItem-MMMEd":"E, MMM d","dateTimeFormat-full":"{1} {0}","field-weekday":"Day of the Week","dateFormatItem-yQQQ":"QQQ y","days-standAlone-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dateFormatItem-MMM":"LLL","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateTimeFormat-short":"{1} {0}","field-era":"Era","field-hour":"Hour","dateTimeFormat-medium":"{1} {0}","dateFormatItem-y":"y","timeFormat-full":"h:mm:ss a zzzz","months-standAlone-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"dateFormatItem-yMMM":"MMM y","days-standAlone-narrow":["S","M","T","W","T","F","S"],"eraAbbr":["BC","AD"],"dateFormat-long":"MMMM d, y","timeFormat-medium":"h:mm:ss a","dateFormatItem-EEEd":"d EEE","field-zone":"Zone","dateFormatItem-Hm":"H:mm","dateFormat-medium":"MMM d, y","dateFormatItem-Hms":"H:mm:ss","quarters-standAlone-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"dateFormatItem-yMMMM":"MMMM y","dateFormatItem-ms":"mm:ss","field-year":"Year","quarters-standAlone-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","field-week":"Week","months-standAlone-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"dateFormatItem-MMMMEd":"E, MMMM d","dateFormatItem-MMMd":"MMM d","timeFormat-long":"h:mm:ss a z","months-format-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"timeFormat-short":"h:mm a","field-month":"Month","quarters-format-abbr":["Q1","Q2","Q3","Q4"],"dateFormatItem-MMMMd":"MMMM d","days-format-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"pm":"PM","dateFormatItem-M":"L","days-format-narrow":["S","M","T","W","T","F","S"],"field-second":"Second","field-day":"Day","dateFormatItem-MEd":"E, M/d","months-format-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-hm":"h:mm a","am":"AM","days-standAlone-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"dateFormat-short":"M/d/yy","dateFormatItem-yMMMEd":"EEE, MMM d, y","dateFormat-full":"EEEE, MMMM d, y","dateFormatItem-Md":"M/d","dateFormatItem-yMEd":"EEE, M/d/yyyy","months-format-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"dateFormatItem-d":"d","quarters-format-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"days-format-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"eraNarrow":["B","A"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-hms":"h:mm:ss a"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.en");dijit.form.nls.ComboBox.en={"previousMessage":"Previous choices","nextMessage":"More choices"};
diff --git a/js/dojo/dijit/nls/dijit-all_es-es.js b/js/dojo/dijit/nls/dijit-all_es-es.js
--- a/js/dojo/dijit/nls/dijit-all_es-es.js
+++ b/js/dojo/dijit/nls/dijit-all_es-es.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_es-es");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.es_es");dojo.nls.colors.es_es={"lightsteelblue": "azul acero claro", "orangered": "rojo anaranjado", "midnightblue": "azul medianoche", "cadetblue": "azul cadete", "seashell": "blanco marfil", "slategrey": "gris pizarra", "coral": "coral", "darkturquoise": "turquesa oscuro", "antiquewhite": "blanco antiguo", "mediumspringgreen": "verde primavera medio", "salmon": "salmón", "darkgrey": "gris oscuro", "ivory": "marfil", "greenyellow": "amarillo verdoso", "mistyrose": "rosa difuminado", "lightsalmon": "salmón claro", "silver": "plateado", "dimgrey": "gris marengo", "orange": "naranja", "white": "blanco", "navajowhite": "blanco navajo", "royalblue": "azul real", "deeppink": "rosa fuerte", "lime": "lima", "oldlace": "encaje antiguo", "chartreuse": "verde pálido 2", "darkcyan": "cian oscuro", "yellow": "amarillo", "linen": "blanco arena", "olive": "verde oliva", "gold": "oro", "lawngreen": "verde césped", "lightyellow": "amarillo claro", "tan": "canela", "darkviolet": "violeta oscuro", "lightslategrey": "gris pizarra claro", "grey": "gris", "darkkhaki": "caqui oscuro", "green": "verde", "deepskyblue": "azul cielo fuerte", "aqua": "aguamarina", "sienna": "siena", "mintcream": "crema menta", "rosybrown": "marrón rosáceo", "mediumslateblue": "azul pizarra medio", "magenta": "magenta", "lightseagreen": "verde mar claro", "cyan": "cian", "olivedrab": "verde oliva pardusco", "darkgoldenrod": "ocre oscuro", "slateblue": "azul pizarra", "mediumaquamarine": "aguamarina medio", "lavender": "lavanda", "mediumseagreen": "verde mar medio", "maroon": "granate", "darkslategray": "gris pizarra oscuro", "mediumturquoise": "turquesa medio", "ghostwhite": "blanco ligero", "darkblue": "azul oscuro", "mediumvioletred": "rojo violáceo medio", "brown": "marrón", "lightgray": "gris claro", "sandybrown": "marrón arcilla", "pink": "rosa", "firebrick": "teja", "indigo": "añil", "snow": "nieve", "darkorchid": "orquídea oscuro", "turquoise": "turquesa", "chocolate": "chocolate", "springgreen": "verde fuerte", "moccasin": "arena", "navy": "azul marino", "lemonchiffon": "amarillo pastel", "teal": "verde azulado", "floralwhite": "blanco manteca", "cornflowerblue": "azul aciano", "paleturquoise": "turquesa pálido", "purple": "púrpura", "gainsboro": "azul gainsboro", "plum": "ciruela", "red": "rojo", "blue": "azul", "forestgreen": "verde pino", "darkgreen": "verde oscuro", "honeydew": "flor de rocío", "darkseagreen": "verde mar oscuro", "lightcoral": "coral claro", "palevioletred": "rojo violáceo pálido", "mediumpurple": "púrpura medio", "saddlebrown": "cuero", "darkmagenta": "magenta oscuro", "thistle": "cardo", "whitesmoke": "blanco ahumado", "wheat": "trigo", "violet": "violeta", "lightskyblue": "azul cielo claro", "goldenrod": "ocre", "mediumblue": "azul medio", "skyblue": "azul cielo", "crimson": "carmesí", "darksalmon": "salmón oscuro", "darkred": "rojo oscuro", "darkslategrey": "gris pizarra oscuro", "peru": "perú", "lightgrey": "gris claro", "lightgoldenrodyellow": "ocre claro", "blanchedalmond": "almendra pálido", "aliceblue": "blanco azulado", "bisque": "miel", "slategray": "gris pizarra", "palegoldenrod": "ocre pálido", "darkorange": "naranja oscuro", "aquamarine": "aguamarina 2", "lightgreen": "verde claro", "burlywood": "madera", "dodgerblue": "azul fuerte", "darkgray": "gris oscuro", "lightcyan": "cian claro", "powderblue": "azul suave", "blueviolet": "azul violáceo", "orchid": "orquídea", "dimgray": "gris marengo", "beige": "beige", "fuchsia": "fucsia", "lavenderblush": "lavanda rosácea", "hotpink": "rosa oscuro", "steelblue": "azul acero", "tomato": "tomate", "lightpink": "rosa claro", "limegreen": "lima limón", "indianred": "rojo teja", "papayawhip": "papaya claro", "lightslategray": "gris pizarra claro", "gray": "gris", "mediumorchid": "orquídea medio", "cornsilk": "crudo", "black": "negro", "seagreen": "verde mar", "darkslateblue": "azul pizarra oscuro", "khaki": "caqui", "lightblue": "azul claro", "palegreen": "verde pálido", "azure": "blanco cielo", "peachpuff": "melocotón", "darkolivegreen": "verde oliva oscuro", "yellowgreen": "verde amarillento"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.es_es");dijit.nls.loading.es_es={"loadingState": "Cargando...", "errorState": "Lo siento, se ha producido un error"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.es_es");dijit.nls.Textarea.es_es={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.es_es");dijit._editor.nls.commands.es_es={"removeFormat": "Eliminar formato", "copy": "Copiar", "paste": "Pegar", "selectAll": "Seleccionar todo", "insertOrderedList": "Lista numerada", "insertTable": "Insertar/Editar tabla", "underline": "Subrayado", "foreColor": "Color de primer plano", "htmlToggle": "Fuente HTML", "formatBlock": "Estilo de párrafo", "insertHorizontalRule": "Regla horizontal", "delete": "Suprimir", "insertUnorderedList": "Lista con viñetas", "tableProp": "Propiedad de tabla", "insertImage": "Insertar imagen", "superscript": "Superíndice", "subscript": "Subíndice", "createLink": "Crear enlace", "undo": "Deshacer", "italic": "Cursiva", "fontName": "Nombre de font", "justifyLeft": "Alinear izquierda", "unlink": "Eliminar enlace", "toggleTableBorder": "Conmutar borde de tabla", "ctrlKey": "Control+${0}", "fontSize": "Tamaño de font", "indent": "Sangría", "redo": "Rehacer", "strikethrough": "Tachado", "justifyFull": "Justificar", "justifyCenter": "Alinear centro", "hiliteColor": "Color de segundo plano", "deleteTable": "Suprimir tabla", "outdent": "Anular sangría", "cut": "Cortar", "plainFormatBlock": "Estilo de párrafo", "bold": "Negrita", "systemShortcutFF": "La acción \"${0}\" sólo está disponible en Mozilla Firefox mediante un atajo de teclado. Utilice ${1}.", "justifyRight": "Alinear derecha", "appleKey": "⌘${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.es_es");dojo.cldr.nls.number.es_es={"currencyFormat": "#,##0.00 ¤", "group": ".", "decimal": ",", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.es_es");dijit.nls.common.es_es={"buttonCancel": "Cancelar", "buttonSave": "Guardar", "buttonOk": "Aceptar"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.es_es");dijit.form.nls.validate.es_es={"rangeMessage": "* Este valor está fuera del intervalo.", "invalidMessage": "* El valor especificado no es válido.", "missingMessage": "* Este valor es necesario."};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.es_es");dijit.form.nls.ComboBox.es_es={"previousMessage": "Opciones anteriores", "nextMessage": "Más opciones"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.es_es");dojo.cldr.nls.currency.es_es={"HKD_displayName": "dólar de Hong Kong", "CHF_displayName": "franco suizo", "CHF_symbol": "SwF", "HKD_symbol": "HK$", "CAD_displayName": "dólar canadiense", "USD_symbol": "US$", "AUD_displayName": "dólar australiano", "JPY_displayName": "yen japonés", "CAD_symbol": "Can$", "USD_displayName": "dólar estadounidense", "GBP_displayName": "libra esterlina británica", "AUD_symbol": "$A", "EUR_displayName": "euro", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.es_es");dojo.cldr.nls.gregorian.es_es={"dateFormat-short": "dd/MM/yy", "dateFormat-medium": "dd/MM/yyyy", "timeFormat-medium": "H:mm:ss", "timeFormat-short": "H:mm", "quarters-format-abbreviated": ["T1", "T2", "T3", "T4"], "field-second": "segundo", "field-week": "semana", "pm": "p.m.", "timeFormat-full": "HH'H'mm''ss\" z", "months-standAlone-narrow": ["E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], "am": "a.m.", "days-standAlone-narrow": ["D", "L", "M", "M", "J", "V", "S"], "field-year": "año", "field-minute": "minuto", "field-hour": "hora", "dateFormat-long": "d' de 'MMMM' de 'yyyy", "field-day": "día", "field-dayperiod": "periodo del día", "field-month": "mes", "months-format-wide": ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"], "field-era": "era", "months-format-abbr": ["ene", "feb", "mar", "abr", "may", "jun", "jul", "ago", "sep", "oct", "nov", "dic"], "days-format-wide": ["domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"], "eraAbbr": ["a.C.", "d.C."], "quarters-format-wide": ["1er trimestre", "2º trimestre", "3er trimestre", "4º trimestre"], "dateFormat-full": "EEEE d' de 'MMMM' de 'yyyy", "field-weekday": "día de la semana", "days-format-abbr": ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"], "field-zone": "zona", "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "eraNames": ["BCE", "CE"], "dateTimeFormats-appendItem-Year": "{0} {1}", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateTimeFormat": "{1} {0}", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "timeFormat-long": "HH:mm:ss z", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Era": "{0} {1}"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.es_es");dijit.nls.Textarea.es_es={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_es-es");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.es_es");dojo.nls.colors.es_es={"lightsteelblue":"azul acero claro","orangered":"rojo anaranjado","midnightblue":"azul medianoche","cadetblue":"azul cadete","seashell":"blanco marfil","slategrey":"gris pizarra","coral":"coral","darkturquoise":"turquesa oscuro","antiquewhite":"blanco antiguo","mediumspringgreen":"verde primavera medio","salmon":"salmón","darkgrey":"gris oscuro","ivory":"marfil","greenyellow":"amarillo verdoso","mistyrose":"rosa difuminado","lightsalmon":"salmón claro","silver":"plateado","dimgrey":"gris marengo","orange":"naranja","white":"blanco","navajowhite":"blanco navajo","royalblue":"azul real","deeppink":"rosa fuerte","lime":"lima","oldlace":"encaje antiguo","chartreuse":"verde pálido 2","darkcyan":"cian oscuro","yellow":"amarillo","linen":"blanco arena","olive":"verde oliva","gold":"oro","lawngreen":"verde césped","lightyellow":"amarillo claro","tan":"canela","darkviolet":"violeta oscuro","lightslategrey":"gris pizarra claro","grey":"gris","darkkhaki":"caqui oscuro","green":"verde","deepskyblue":"azul cielo fuerte","aqua":"aguamarina","sienna":"siena","mintcream":"crema menta","rosybrown":"marrón rosáceo","mediumslateblue":"azul pizarra medio","magenta":"magenta","lightseagreen":"verde mar claro","cyan":"cian","olivedrab":"verde oliva pardusco","darkgoldenrod":"ocre oscuro","slateblue":"azul pizarra","mediumaquamarine":"aguamarina medio","lavender":"lavanda","mediumseagreen":"verde mar medio","maroon":"granate","darkslategray":"gris pizarra oscuro","mediumturquoise":"turquesa medio","ghostwhite":"blanco ligero","darkblue":"azul oscuro","mediumvioletred":"rojo violáceo medio","brown":"marrón","lightgray":"gris claro","sandybrown":"marrón arcilla","pink":"rosa","firebrick":"teja","indigo":"añil","snow":"nieve","darkorchid":"orquídea oscuro","turquoise":"turquesa","chocolate":"chocolate","springgreen":"verde fuerte","moccasin":"arena","navy":"azul marino","lemonchiffon":"amarillo pastel","teal":"verde azulado","floralwhite":"blanco manteca","cornflowerblue":"azul aciano","paleturquoise":"turquesa pálido","purple":"púrpura","gainsboro":"azul gainsboro","plum":"ciruela","red":"rojo","blue":"azul","forestgreen":"verde pino","darkgreen":"verde oscuro","honeydew":"flor de rocío","darkseagreen":"verde mar oscuro","lightcoral":"coral claro","palevioletred":"rojo violáceo pálido","mediumpurple":"púrpura medio","saddlebrown":"cuero","darkmagenta":"magenta oscuro","thistle":"cardo","whitesmoke":"blanco ahumado","wheat":"trigo","violet":"violeta","lightskyblue":"azul cielo claro","goldenrod":"ocre","mediumblue":"azul medio","skyblue":"azul cielo","crimson":"carmesí","darksalmon":"salmón oscuro","darkred":"rojo oscuro","darkslategrey":"gris pizarra oscuro","peru":"perú","lightgrey":"gris claro","lightgoldenrodyellow":"ocre claro","blanchedalmond":"almendra pálido","aliceblue":"blanco azulado","bisque":"miel","slategray":"gris pizarra","palegoldenrod":"ocre pálido","darkorange":"naranja oscuro","aquamarine":"aguamarina 2","lightgreen":"verde claro","burlywood":"madera","dodgerblue":"azul fuerte","darkgray":"gris oscuro","lightcyan":"cian claro","powderblue":"azul suave","blueviolet":"azul violáceo","orchid":"orquídea","dimgray":"gris marengo","beige":"beige","fuchsia":"fucsia","lavenderblush":"lavanda rosácea","hotpink":"rosa oscuro","steelblue":"azul acero","tomato":"tomate","lightpink":"rosa claro","limegreen":"lima limón","indianred":"rojo teja","papayawhip":"papaya claro","lightslategray":"gris pizarra claro","gray":"gris","mediumorchid":"orquídea medio","cornsilk":"crudo","black":"negro","seagreen":"verde mar","darkslateblue":"azul pizarra oscuro","khaki":"caqui","lightblue":"azul claro","palegreen":"verde pálido","azure":"blanco cielo","peachpuff":"melocotón","darkolivegreen":"verde oliva oscuro","yellowgreen":"verde amarillento"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.es_es");dijit.nls.loading.es_es={"loadingState":"Cargando...","errorState":"Lo siento, se ha producido un error"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.es_es");dijit.nls.common.es_es={"buttonOk":"Aceptar","buttonCancel":"Cancelar","buttonSave":"Guardar","itemClose":"Cerrar"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.es_es");dijit._editor.nls.commands.es_es={"removeFormat":"Eliminar formato","copy":"Copiar","paste":"Pegar","selectAll":"Seleccionar todo","insertOrderedList":"Lista numerada","insertTable":"Insertar/Editar tabla","print":"Imprimir","underline":"Subrayado","foreColor":"Color de primer plano","htmlToggle":"Fuente HTML","formatBlock":"Estilo de párrafo","newPage":"Nueva página","insertHorizontalRule":"Regla horizontal","delete":"Suprimir","insertUnorderedList":"Lista con viñetas","tableProp":"Propiedad de tabla","insertImage":"Insertar imagen","superscript":"Superíndice","subscript":"Subíndice","createLink":"Crear enlace","undo":"Deshacer","fullScreen":"Conmutar pantalla completa","italic":"Cursiva","fontName":"Nombre de font","justifyLeft":"Alinear izquierda","unlink":"Eliminar enlace","toggleTableBorder":"Conmutar borde de tabla","viewSource":"Ver fuente HTML","ctrlKey":"control+${0}","fontSize":"Tamaño de font","systemShortcut":"La acción \"${0}\" sólo está disponible en su navegador mediante un atajo de teclado. Utilice ${1}.","indent":"Sangría","redo":"Rehacer","strikethrough":"Tachado","justifyFull":"Justificar","justifyCenter":"Alinear centro","hiliteColor":"Color de segundo plano","deleteTable":"Suprimir tabla","outdent":"Anular sangría","cut":"Cortar","plainFormatBlock":"Estilo de párrafo","toggleDir":"Conmutar dirección","bold":"Negrita","tabIndent":"Sangría de tabulador","justifyRight":"Alinear derecha","appleKey":"⌘${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.es_es");dojo.cldr.nls.number.es_es={"currencyFormat":"#,##0.00 ¤","group":".","percentSign":"%","exponential":"E","percentFormat":"#,##0%","scientificFormat":"#E0","list":";","infinity":"∞","minusSign":"-","decimal":",","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","patternDigit":"#","currencySpacing-beforeCurrency-insertBetween":" "};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.es_es");dijit.form.nls.validate.es_es={"rangeMessage":"Este valor está fuera del intervalo.","invalidMessage":"El valor especificado no es válido.","missingMessage":"Este valor es necesario."};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.es_es");dojo.cldr.nls.currency.es_es={"HKD_displayName":"dólar de Hong Kong","CHF_displayName":"franco suizo","CAD_displayName":"dólar canadiense","CNY_displayName":"yuan renminbi chino","AUD_displayName":"dólar australiano","JPY_displayName":"yen japonés","USD_displayName":"dólar estadounidense","GBP_displayName":"libra esterlina británica","EUR_displayName":"euro","CHF_symbol":"Fr.","JPY_symbol":"JP¥","HKD_symbol":"HK$","USD_symbol":"US$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.es_es");dojo.cldr.nls.gregorian.es_es={"timeFormat-medium":"H:mm:ss","timeFormat-full":"HH'H'mm''ss\" v","timeFormat-short":"H:mm","months-format-narrow":["E","F","M","A","M","J","J","A","S","O","N","D"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"día de la semana","dateFormatItem-yyQQQQ":"QQQQ 'de' yy","dateFormatItem-yQQQ":"QQQ yyyy","dateFormatItem-yMEd":"EEE d/M/yyyy","dateFormatItem-MMMEd":"E d MMM","eraNarrow":["a.C.","d.C."],"dateFormatItem-MMMdd":"dd-MMM","dateFormat-long":"d 'de' MMMM 'de' y","months-format-wide":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],"dateFormatItem-EEEd":"EEE d","dateFormat-full":"EEEE d 'de' MMMM 'de' y","dateFormatItem-Md":"d/M","field-era":"era","dateFormatItem-yM":"M/yyyy","months-standAlone-wide":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],"quarters-format-wide":["1er trimestre","2º trimestre","3er trimestre","4º trimestre"],"timeFormat-long":"HH:mm:ss z","field-year":"año","dateFormatItem-yMMM":"MMM y","dateFormatItem-yQ":"Q yyyy","field-hour":"hora","months-format-abbr":["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],"dateFormatItem-yyQ":"Q yy","am":"a.m.","months-standAlone-abbr":["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],"quarters-format-abbr":["T1","T2","T3","T4"],"quarters-standAlone-wide":["1er trimestre","2º trimestre","3er trimestre","4º trimestre"],"dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-hhmmss":"hh:mm:ss a","dateFormatItem-M":"L","days-standAlone-wide":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"dateFormatItem-MMMMd":"d 'de' MMMM","dateFormatItem-yyMMM":"MMM-yy","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["T1","T2","T3","T4"],"eraAbbr":["a.C.","d.C."],"field-minute":"minuto","field-dayperiod":"periodo del día","days-standAlone-abbr":["dom","lun","mar","mié","jue","vie","sáb"],"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E, d-M","dateFormatItem-yMMMM":"MMMM 'de' y","field-day":"día","days-format-wide":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"field-zone":"zona","dateFormatItem-yyyyMM":"MM/yyyy","dateFormatItem-y":"y","months-standAlone-narrow":["E","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-yyMM":"MM/yy","days-format-abbr":["dom","lun","mar","mié","jue","vie","sáb"],"eraNames":["antes de Cristo","anno Dómini"],"days-format-narrow":["D","L","M","M","J","V","S"],"field-month":"mes","days-standAlone-narrow":["D","L","M","M","J","V","S"],"dateFormatItem-MMM":"LLL","dateFormatItem-HHmm":"HH:mm","pm":"p.m.","dateFormatItem-MMMMEd":"E d MMMM","dateFormat-short":"dd/MM/yy","dateFormatItem-MMd":"d/MM","field-second":"segundo","dateFormatItem-yMMMEd":"EEE, d MMM y","dateFormatItem-hhmm":"hh:mm a","field-week":"semana","dateFormat-medium":"dd/MM/yyyy","dateFormatItem-mmss":"mm:ss","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormat-medium":"{1} {0}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","dateTimeFormat-full":"{1} {0}","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.es_es");dijit.form.nls.ComboBox.es_es={"previousMessage":"Opciones anteriores","nextMessage":"Más opciones"};
diff --git a/js/dojo/dijit/nls/dijit-all_es.js b/js/dojo/dijit/nls/dijit-all_es.js
--- a/js/dojo/dijit/nls/dijit-all_es.js
+++ b/js/dojo/dijit/nls/dijit-all_es.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_es");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.es");dojo.nls.colors.es={"lightsteelblue": "azul acero claro", "orangered": "rojo anaranjado", "midnightblue": "azul medianoche", "cadetblue": "azul cadete", "seashell": "blanco marfil", "slategrey": "gris pizarra", "coral": "coral", "darkturquoise": "turquesa oscuro", "antiquewhite": "blanco antiguo", "mediumspringgreen": "verde primavera medio", "salmon": "salmón", "darkgrey": "gris oscuro", "ivory": "marfil", "greenyellow": "amarillo verdoso", "mistyrose": "rosa difuminado", "lightsalmon": "salmón claro", "silver": "plateado", "dimgrey": "gris marengo", "orange": "naranja", "white": "blanco", "navajowhite": "blanco navajo", "royalblue": "azul real", "deeppink": "rosa fuerte", "lime": "lima", "oldlace": "encaje antiguo", "chartreuse": "verde pálido 2", "darkcyan": "cian oscuro", "yellow": "amarillo", "linen": "blanco arena", "olive": "verde oliva", "gold": "oro", "lawngreen": "verde césped", "lightyellow": "amarillo claro", "tan": "canela", "darkviolet": "violeta oscuro", "lightslategrey": "gris pizarra claro", "grey": "gris", "darkkhaki": "caqui oscuro", "green": "verde", "deepskyblue": "azul cielo fuerte", "aqua": "aguamarina", "sienna": "siena", "mintcream": "crema menta", "rosybrown": "marrón rosáceo", "mediumslateblue": "azul pizarra medio", "magenta": "magenta", "lightseagreen": "verde mar claro", "cyan": "cian", "olivedrab": "verde oliva pardusco", "darkgoldenrod": "ocre oscuro", "slateblue": "azul pizarra", "mediumaquamarine": "aguamarina medio", "lavender": "lavanda", "mediumseagreen": "verde mar medio", "maroon": "granate", "darkslategray": "gris pizarra oscuro", "mediumturquoise": "turquesa medio", "ghostwhite": "blanco ligero", "darkblue": "azul oscuro", "mediumvioletred": "rojo violáceo medio", "brown": "marrón", "lightgray": "gris claro", "sandybrown": "marrón arcilla", "pink": "rosa", "firebrick": "teja", "indigo": "añil", "snow": "nieve", "darkorchid": "orquídea oscuro", "turquoise": "turquesa", "chocolate": "chocolate", "springgreen": "verde fuerte", "moccasin": "arena", "navy": "azul marino", "lemonchiffon": "amarillo pastel", "teal": "verde azulado", "floralwhite": "blanco manteca", "cornflowerblue": "azul aciano", "paleturquoise": "turquesa pálido", "purple": "púrpura", "gainsboro": "azul gainsboro", "plum": "ciruela", "red": "rojo", "blue": "azul", "forestgreen": "verde pino", "darkgreen": "verde oscuro", "honeydew": "flor de rocío", "darkseagreen": "verde mar oscuro", "lightcoral": "coral claro", "palevioletred": "rojo violáceo pálido", "mediumpurple": "púrpura medio", "saddlebrown": "cuero", "darkmagenta": "magenta oscuro", "thistle": "cardo", "whitesmoke": "blanco ahumado", "wheat": "trigo", "violet": "violeta", "lightskyblue": "azul cielo claro", "goldenrod": "ocre", "mediumblue": "azul medio", "skyblue": "azul cielo", "crimson": "carmesí", "darksalmon": "salmón oscuro", "darkred": "rojo oscuro", "darkslategrey": "gris pizarra oscuro", "peru": "perú", "lightgrey": "gris claro", "lightgoldenrodyellow": "ocre claro", "blanchedalmond": "almendra pálido", "aliceblue": "blanco azulado", "bisque": "miel", "slategray": "gris pizarra", "palegoldenrod": "ocre pálido", "darkorange": "naranja oscuro", "aquamarine": "aguamarina 2", "lightgreen": "verde claro", "burlywood": "madera", "dodgerblue": "azul fuerte", "darkgray": "gris oscuro", "lightcyan": "cian claro", "powderblue": "azul suave", "blueviolet": "azul violáceo", "orchid": "orquídea", "dimgray": "gris marengo", "beige": "beige", "fuchsia": "fucsia", "lavenderblush": "lavanda rosácea", "hotpink": "rosa oscuro", "steelblue": "azul acero", "tomato": "tomate", "lightpink": "rosa claro", "limegreen": "lima limón", "indianred": "rojo teja", "papayawhip": "papaya claro", "lightslategray": "gris pizarra claro", "gray": "gris", "mediumorchid": "orquídea medio", "cornsilk": "crudo", "black": "negro", "seagreen": "verde mar", "darkslateblue": "azul pizarra oscuro", "khaki": "caqui", "lightblue": "azul claro", "palegreen": "verde pálido", "azure": "blanco cielo", "peachpuff": "melocotón", "darkolivegreen": "verde oliva oscuro", "yellowgreen": "verde amarillento"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.es");dijit.nls.loading.es={"loadingState": "Cargando...", "errorState": "Lo siento, se ha producido un error"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.es");dijit.nls.Textarea.es={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.es");dijit._editor.nls.commands.es={"removeFormat": "Eliminar formato", "copy": "Copiar", "paste": "Pegar", "selectAll": "Seleccionar todo", "insertOrderedList": "Lista numerada", "insertTable": "Insertar/Editar tabla", "underline": "Subrayado", "foreColor": "Color de primer plano", "htmlToggle": "Fuente HTML", "formatBlock": "Estilo de párrafo", "insertHorizontalRule": "Regla horizontal", "delete": "Suprimir", "insertUnorderedList": "Lista con viñetas", "tableProp": "Propiedad de tabla", "insertImage": "Insertar imagen", "superscript": "Superíndice", "subscript": "Subíndice", "createLink": "Crear enlace", "undo": "Deshacer", "italic": "Cursiva", "fontName": "Nombre de font", "justifyLeft": "Alinear izquierda", "unlink": "Eliminar enlace", "toggleTableBorder": "Conmutar borde de tabla", "ctrlKey": "Control+${0}", "fontSize": "Tamaño de font", "indent": "Sangría", "redo": "Rehacer", "strikethrough": "Tachado", "justifyFull": "Justificar", "justifyCenter": "Alinear centro", "hiliteColor": "Color de segundo plano", "deleteTable": "Suprimir tabla", "outdent": "Anular sangría", "cut": "Cortar", "plainFormatBlock": "Estilo de párrafo", "bold": "Negrita", "systemShortcutFF": "La acción \"${0}\" sólo está disponible en Mozilla Firefox mediante un atajo de teclado. Utilice ${1}.", "justifyRight": "Alinear derecha", "appleKey": "⌘${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.es");dojo.cldr.nls.number.es={"currencyFormat": "¤#,##0.00;(¤#,##0.00)", "group": ".", "decimal": ",", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.es");dijit.nls.common.es={"buttonCancel": "Cancelar", "buttonSave": "Guardar", "buttonOk": "Aceptar"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.es");dijit.form.nls.validate.es={"rangeMessage": "* Este valor está fuera del intervalo.", "invalidMessage": "* El valor especificado no es válido.", "missingMessage": "* Este valor es necesario."};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.es");dijit.form.nls.ComboBox.es={"previousMessage": "Opciones anteriores", "nextMessage": "Más opciones"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.es");dojo.cldr.nls.currency.es={"HKD_displayName": "dólar de Hong Kong", "CHF_displayName": "franco suizo", "CHF_symbol": "SwF", "HKD_symbol": "HK$", "CAD_displayName": "dólar canadiense", "USD_symbol": "US$", "AUD_displayName": "dólar australiano", "JPY_displayName": "yen japonés", "CAD_symbol": "Can$", "USD_displayName": "dólar estadounidense", "GBP_displayName": "libra esterlina británica", "AUD_symbol": "$A", "EUR_displayName": "euro", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.es");dojo.cldr.nls.gregorian.es={"quarters-format-abbreviated": ["T1", "T2", "T3", "T4"], "dateFormat-medium": "dd-MMM-yy", "field-second": "segundo", "field-week": "semana", "pm": "p.m.", "timeFormat-full": "HH'H'mm''ss\" z", "months-standAlone-narrow": ["E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], "am": "a.m.", "days-standAlone-narrow": ["D", "L", "M", "M", "J", "V", "S"], "field-year": "año", "field-minute": "minuto", "field-hour": "hora", "dateFormat-long": "d' de 'MMMM' de 'yyyy", "field-day": "día", "field-dayperiod": "periodo del día", "field-month": "mes", "dateFormat-short": "d/MM/yy", "months-format-wide": ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"], "field-era": "era", "months-format-abbr": ["ene", "feb", "mar", "abr", "may", "jun", "jul", "ago", "sep", "oct", "nov", "dic"], "days-format-wide": ["domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"], "eraAbbr": ["a.C.", "d.C."], "quarters-format-wide": ["1er trimestre", "2º trimestre", "3er trimestre", "4º trimestre"], "dateFormat-full": "EEEE d' de 'MMMM' de 'yyyy", "field-weekday": "día de la semana", "days-format-abbr": ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"], "field-zone": "zona", "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "eraNames": ["BCE", "CE"], "dateTimeFormats-appendItem-Year": "{0} {1}", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "timeFormat-medium": "HH:mm:ss", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateTimeFormat": "{1} {0}", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "timeFormat-long": "HH:mm:ss z", "timeFormat-short": "HH:mm", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Era": "{0} {1}"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.es");dijit.nls.Textarea.es={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_es");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.es");dojo.nls.colors.es={"lightsteelblue":"azul acero claro","orangered":"rojo anaranjado","midnightblue":"azul medianoche","cadetblue":"azul cadete","seashell":"blanco marfil","slategrey":"gris pizarra","coral":"coral","darkturquoise":"turquesa oscuro","antiquewhite":"blanco antiguo","mediumspringgreen":"verde primavera medio","salmon":"salmón","darkgrey":"gris oscuro","ivory":"marfil","greenyellow":"amarillo verdoso","mistyrose":"rosa difuminado","lightsalmon":"salmón claro","silver":"plateado","dimgrey":"gris marengo","orange":"naranja","white":"blanco","navajowhite":"blanco navajo","royalblue":"azul real","deeppink":"rosa fuerte","lime":"lima","oldlace":"encaje antiguo","chartreuse":"verde pálido 2","darkcyan":"cian oscuro","yellow":"amarillo","linen":"blanco arena","olive":"verde oliva","gold":"oro","lawngreen":"verde césped","lightyellow":"amarillo claro","tan":"canela","darkviolet":"violeta oscuro","lightslategrey":"gris pizarra claro","grey":"gris","darkkhaki":"caqui oscuro","green":"verde","deepskyblue":"azul cielo fuerte","aqua":"aguamarina","sienna":"siena","mintcream":"crema menta","rosybrown":"marrón rosáceo","mediumslateblue":"azul pizarra medio","magenta":"magenta","lightseagreen":"verde mar claro","cyan":"cian","olivedrab":"verde oliva pardusco","darkgoldenrod":"ocre oscuro","slateblue":"azul pizarra","mediumaquamarine":"aguamarina medio","lavender":"lavanda","mediumseagreen":"verde mar medio","maroon":"granate","darkslategray":"gris pizarra oscuro","mediumturquoise":"turquesa medio","ghostwhite":"blanco ligero","darkblue":"azul oscuro","mediumvioletred":"rojo violáceo medio","brown":"marrón","lightgray":"gris claro","sandybrown":"marrón arcilla","pink":"rosa","firebrick":"teja","indigo":"añil","snow":"nieve","darkorchid":"orquídea oscuro","turquoise":"turquesa","chocolate":"chocolate","springgreen":"verde fuerte","moccasin":"arena","navy":"azul marino","lemonchiffon":"amarillo pastel","teal":"verde azulado","floralwhite":"blanco manteca","cornflowerblue":"azul aciano","paleturquoise":"turquesa pálido","purple":"púrpura","gainsboro":"azul gainsboro","plum":"ciruela","red":"rojo","blue":"azul","forestgreen":"verde pino","darkgreen":"verde oscuro","honeydew":"flor de rocío","darkseagreen":"verde mar oscuro","lightcoral":"coral claro","palevioletred":"rojo violáceo pálido","mediumpurple":"púrpura medio","saddlebrown":"cuero","darkmagenta":"magenta oscuro","thistle":"cardo","whitesmoke":"blanco ahumado","wheat":"trigo","violet":"violeta","lightskyblue":"azul cielo claro","goldenrod":"ocre","mediumblue":"azul medio","skyblue":"azul cielo","crimson":"carmesí","darksalmon":"salmón oscuro","darkred":"rojo oscuro","darkslategrey":"gris pizarra oscuro","peru":"perú","lightgrey":"gris claro","lightgoldenrodyellow":"ocre claro","blanchedalmond":"almendra pálido","aliceblue":"blanco azulado","bisque":"miel","slategray":"gris pizarra","palegoldenrod":"ocre pálido","darkorange":"naranja oscuro","aquamarine":"aguamarina 2","lightgreen":"verde claro","burlywood":"madera","dodgerblue":"azul fuerte","darkgray":"gris oscuro","lightcyan":"cian claro","powderblue":"azul suave","blueviolet":"azul violáceo","orchid":"orquídea","dimgray":"gris marengo","beige":"beige","fuchsia":"fucsia","lavenderblush":"lavanda rosácea","hotpink":"rosa oscuro","steelblue":"azul acero","tomato":"tomate","lightpink":"rosa claro","limegreen":"lima limón","indianred":"rojo teja","papayawhip":"papaya claro","lightslategray":"gris pizarra claro","gray":"gris","mediumorchid":"orquídea medio","cornsilk":"crudo","black":"negro","seagreen":"verde mar","darkslateblue":"azul pizarra oscuro","khaki":"caqui","lightblue":"azul claro","palegreen":"verde pálido","azure":"blanco cielo","peachpuff":"melocotón","darkolivegreen":"verde oliva oscuro","yellowgreen":"verde amarillento"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.es");dijit.nls.loading.es={"loadingState":"Cargando...","errorState":"Lo siento, se ha producido un error"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.es");dijit.nls.common.es={"buttonOk":"Aceptar","buttonCancel":"Cancelar","buttonSave":"Guardar","itemClose":"Cerrar"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.es");dijit._editor.nls.commands.es={"removeFormat":"Eliminar formato","copy":"Copiar","paste":"Pegar","selectAll":"Seleccionar todo","insertOrderedList":"Lista numerada","insertTable":"Insertar/Editar tabla","print":"Imprimir","underline":"Subrayado","foreColor":"Color de primer plano","htmlToggle":"Fuente HTML","formatBlock":"Estilo de párrafo","newPage":"Nueva página","insertHorizontalRule":"Regla horizontal","delete":"Suprimir","insertUnorderedList":"Lista con viñetas","tableProp":"Propiedad de tabla","insertImage":"Insertar imagen","superscript":"Superíndice","subscript":"Subíndice","createLink":"Crear enlace","undo":"Deshacer","fullScreen":"Conmutar pantalla completa","italic":"Cursiva","fontName":"Nombre de font","justifyLeft":"Alinear izquierda","unlink":"Eliminar enlace","toggleTableBorder":"Conmutar borde de tabla","viewSource":"Ver fuente HTML","ctrlKey":"control+${0}","fontSize":"Tamaño de font","systemShortcut":"La acción \"${0}\" sólo está disponible en su navegador mediante un atajo de teclado. Utilice ${1}.","indent":"Sangría","redo":"Rehacer","strikethrough":"Tachado","justifyFull":"Justificar","justifyCenter":"Alinear centro","hiliteColor":"Color de segundo plano","deleteTable":"Suprimir tabla","outdent":"Anular sangría","cut":"Cortar","plainFormatBlock":"Estilo de párrafo","toggleDir":"Conmutar dirección","bold":"Negrita","tabIndent":"Sangría de tabulador","justifyRight":"Alinear derecha","appleKey":"⌘${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.es");dojo.cldr.nls.number.es={"group":".","percentSign":"%","exponential":"E","percentFormat":"#,##0%","scientificFormat":"#E0","list":";","infinity":"∞","minusSign":"-","decimal":",","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","currencyFormat":"¤ #,##0.00","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","patternDigit":"#","currencySpacing-beforeCurrency-insertBetween":" "};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.es");dijit.form.nls.validate.es={"rangeMessage":"Este valor está fuera del intervalo.","invalidMessage":"El valor especificado no es válido.","missingMessage":"Este valor es necesario."};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.es");dojo.cldr.nls.currency.es={"HKD_displayName":"dólar de Hong Kong","CHF_displayName":"franco suizo","CAD_displayName":"dólar canadiense","CNY_displayName":"yuan renminbi chino","AUD_displayName":"dólar australiano","JPY_displayName":"yen japonés","USD_displayName":"dólar estadounidense","GBP_displayName":"libra esterlina británica","EUR_displayName":"euro","CHF_symbol":"Fr.","JPY_symbol":"JP¥","HKD_symbol":"HK$","USD_symbol":"US$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.es");dojo.cldr.nls.gregorian.es={"months-format-narrow":["E","F","M","A","M","J","J","A","S","O","N","D"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"día de la semana","dateFormatItem-yyQQQQ":"QQQQ 'de' yy","dateFormatItem-yQQQ":"QQQ yyyy","dateFormatItem-yMEd":"EEE d/M/yyyy","dateFormatItem-MMMEd":"E d MMM","eraNarrow":["a.C.","d.C."],"dateFormatItem-MMMdd":"dd-MMM","dateFormat-long":"d 'de' MMMM 'de' y","months-format-wide":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],"dateFormatItem-EEEd":"EEE d","dateFormat-full":"EEEE d 'de' MMMM 'de' y","dateFormatItem-Md":"d/M","field-era":"era","dateFormatItem-yM":"M/yyyy","months-standAlone-wide":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],"timeFormat-short":"HH:mm","quarters-format-wide":["1er trimestre","2º trimestre","3er trimestre","4º trimestre"],"timeFormat-long":"HH:mm:ss z","field-year":"año","dateFormatItem-yMMM":"MMM y","dateFormatItem-yQ":"Q yyyy","field-hour":"hora","months-format-abbr":["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],"dateFormatItem-yyQ":"Q yy","timeFormat-full":"HH:mm:ss zzzz","am":"a.m.","months-standAlone-abbr":["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],"quarters-format-abbr":["T1","T2","T3","T4"],"quarters-standAlone-wide":["1er trimestre","2º trimestre","3er trimestre","4º trimestre"],"dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-hhmmss":"hh:mm:ss a","dateFormatItem-M":"L","days-standAlone-wide":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"dateFormatItem-MMMMd":"d 'de' MMMM","dateFormatItem-yyMMM":"MMM-yy","timeFormat-medium":"HH:mm:ss","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["T1","T2","T3","T4"],"eraAbbr":["a.C.","d.C."],"field-minute":"minuto","field-dayperiod":"periodo del día","days-standAlone-abbr":["dom","lun","mar","mié","jue","vie","sáb"],"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E, d-M","dateFormatItem-yMMMM":"MMMM 'de' y","field-day":"día","days-format-wide":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"field-zone":"zona","dateFormatItem-yyyyMM":"MM/yyyy","dateFormatItem-y":"y","months-standAlone-narrow":["E","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-yyMM":"MM/yy","days-format-abbr":["dom","lun","mar","mié","jue","vie","sáb"],"eraNames":["antes de Cristo","anno Dómini"],"days-format-narrow":["D","L","M","M","J","V","S"],"field-month":"mes","days-standAlone-narrow":["D","L","M","M","J","V","S"],"dateFormatItem-MMM":"LLL","dateFormatItem-HHmm":"HH:mm","pm":"p.m.","dateFormatItem-MMMMEd":"E d MMMM","dateFormat-short":"dd/MM/yy","dateFormatItem-MMd":"d/MM","field-second":"segundo","dateFormatItem-yMMMEd":"EEE, d MMM y","dateFormatItem-hhmm":"hh:mm a","field-week":"semana","dateFormat-medium":"dd/MM/yyyy","dateFormatItem-mmss":"mm:ss","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormat-medium":"{1} {0}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","dateTimeFormat-full":"{1} {0}","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.es");dijit.form.nls.ComboBox.es={"previousMessage":"Opciones anteriores","nextMessage":"Más opciones"};
diff --git a/js/dojo/dijit/nls/dijit-all_fr-fr.js b/js/dojo/dijit/nls/dijit-all_fr-fr.js
--- a/js/dojo/dijit/nls/dijit-all_fr-fr.js
+++ b/js/dojo/dijit/nls/dijit-all_fr-fr.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_fr-fr");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.fr_fr");dojo.nls.colors.fr_fr={"lightsteelblue": "bleu acier clair", "orangered": "rouge orangé", "midnightblue": "bleu nuit", "cadetblue": "bleu pétrole", "seashell": "coquillage", "slategrey": "gris ardoise", "coral": "corail", "darkturquoise": "turquoise foncé", "antiquewhite": "blanc antique", "mediumspringgreen": "vert printemps moyen", "salmon": "saumon", "darkgrey": "gris foncé", "ivory": "ivoire", "greenyellow": "vert-jaune", "mistyrose": "rose pâle", "lightsalmon": "saumon clair", "silver": "argent", "dimgrey": "gris soutenu", "orange": "orange", "white": "blanc", "navajowhite": "chair", "royalblue": "bleu roi", "deeppink": "rose soutenu", "lime": "vert citron", "oldlace": "blanc cassé", "chartreuse": "vert vif", "darkcyan": "cyan foncé", "yellow": "jaune", "linen": "écru", "olive": "olive", "gold": "or", "lawngreen": "vert prairie", "lightyellow": "jaune clair", "tan": "grège", "darkviolet": "violet foncé", "lightslategrey": "gris ardoise clair", "grey": "gris", "darkkhaki": "kaki foncé", "green": "vert", "deepskyblue": "bleu ciel soutenu", "aqua": "bleu-vert", "sienna": "terre de sienne", "mintcream": "crème de menthe", "rosybrown": "vieux rose", "mediumslateblue": "bleu ardoise moyen", "magenta": "magenta", "lightseagreen": "vert d'eau clair", "cyan": "cyan", "olivedrab": "brun verdâtre", "darkgoldenrod": "jaune paille foncé", "slateblue": "bleu ardoise", "mediumaquamarine": "aigue-marine moyen", "lavender": "lavande", "mediumseagreen": "vert d'eau moyen ", "maroon": "marron", "darkslategray": "gris ardoise foncé", "mediumturquoise": "turquoise moyen", "ghostwhite": "blanc laiteux", "darkblue": "bleu foncé", "mediumvioletred": "rouge violacé moyen", "brown": "brun", "lightgray": "gris clair", "sandybrown": "sable", "pink": "rose", "firebrick": "rouge brique", "indigo": "indigo", "snow": "neige", "darkorchid": "lilas foncé", "turquoise": "turquoise", "chocolate": "chocolat", "springgreen": "vert printemps", "moccasin": "chamois", "navy": "bleu marine", "lemonchiffon": "mousse de citron", "teal": "sarcelle", "floralwhite": "lys", "cornflowerblue": "bleuet", "paleturquoise": "turquoise pâle", "purple": "pourpre", "gainsboro": "gris souris", "plum": "prune", "red": "rouge", "blue": "bleu", "forestgreen": "vert sapin", "darkgreen": "vert foncé", "honeydew": "opalin", "darkseagreen": "vert d'eau foncé", "lightcoral": "corail clair", "palevioletred": "rouge violacé pâle", "mediumpurple": "pourpre moyen", "saddlebrown": "brun cuir", "darkmagenta": "magenta foncé", "thistle": "chardon", "whitesmoke": "blanc cendré", "wheat": "blé", "violet": "violet", "lightskyblue": "bleu ciel clair", "goldenrod": "jaune paille", "mediumblue": "bleu moyen", "skyblue": "bleu ciel", "crimson": "cramoisi", "darksalmon": "saumon foncé", "darkred": "rouge foncé", "darkslategrey": "gris ardoise foncé", "peru": "caramel", "lightgrey": "gris clair", "lightgoldenrodyellow": "jaune paille clair", "blanchedalmond": "coquille d'oeuf", "aliceblue": "bleu gris", "bisque": "beige rosé", "slategray": "gris ardoise", "palegoldenrod": "jaune paille pâle", "darkorange": "orange foncé", "aquamarine": "aigue-marine", "lightgreen": "vert clair", "burlywood": "bois précieux", "dodgerblue": "bleu France", "darkgray": "gris foncé", "lightcyan": "cyan clair", "powderblue": "bleu de smalt", "blueviolet": "bleu-violet", "orchid": "lilas", "dimgray": "gris soutenu", "beige": "beige", "fuchsia": "fuchsia", "lavenderblush": "lavandin", "hotpink": "rose intense", "steelblue": "bleu acier", "tomato": "tomate", "lightpink": "rose clair", "limegreen": "citron vert", "indianred": "rose indien", "papayawhip": "crème de papaye", "lightslategray": "gris ardoise clair", "gray": "gris", "mediumorchid": "lilas moyen", "cornsilk": "vanille", "black": "noir", "seagreen": "vert d'eau", "darkslateblue": "bleu ardoise foncé", "khaki": "kaki", "lightblue": "bleu clair", "palegreen": "vert pâle", "azure": "bleu azur", "peachpuff": "pêche", "darkolivegreen": "olive foncé", "yellowgreen": "vert jaunâtre"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.fr_fr");dijit.nls.loading.fr_fr={"loadingState": "Chargement...", "errorState": "Une erreur est survenue"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.fr_fr");dijit.nls.Textarea.fr_fr={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.fr_fr");dijit._editor.nls.commands.fr_fr={"removeFormat": "Supprimer la mise en forme", "copy": "Copier", "paste": "Coller", "selectAll": "Sélectionner tout", "insertOrderedList": "Liste numérotée", "insertTable": "Insérer/Modifier un tableau", "underline": "Souligner", "foreColor": "Couleur d'avant-plan", "htmlToggle": "Source HTML", "formatBlock": "Style de paragraphe", "insertHorizontalRule": "Règle horizontale", "delete": "Supprimer", "insertUnorderedList": "Liste à puces", "tableProp": "Propriété du tableau", "insertImage": "Insérer une image", "superscript": "Exposant", "subscript": "Indice", "createLink": "Créer un lien", "undo": "Annuler", "italic": "Italique", "fontName": "Nom de police", "justifyLeft": "Aligner à gauche", "unlink": "Supprimer le lien", "toggleTableBorder": "Afficher/Masquer la bordure du tableau", "fontSize": "Taille de police", "indent": "Retrait", "redo": "Rétablir", "strikethrough": "Barrer", "justifyFull": "Justifier", "justifyCenter": "Aligner au centre", "hiliteColor": "Couleur d'arrière-plan", "deleteTable": "Supprimer le tableau", "outdent": "Retrait négatif", "cut": "Couper", "plainFormatBlock": "Style de paragraphe", "bold": "Gras", "systemShortcutFF": "L'action \"${0}\" est disponible dans Mozilla Firefox uniquement, par le biais d'un raccourci-clavier. Utilisez ${1}.", "justifyRight": "Aligner à droite", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.fr_fr");dojo.cldr.nls.number.fr_fr={"group": " ", "percentFormat": "#,##0 %", "currencyFormat": "#,##0.00 ¤", "decimal": ",", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "decimalFormat": "#,##0.###", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.fr_fr");dijit.nls.common.fr_fr={"buttonCancel": "Annuler", "buttonSave": "Sauvegarder", "buttonOk": "OK"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.fr_fr");dijit.form.nls.validate.fr_fr={"rangeMessage": "* Cette valeur n'est pas comprise dans la plage autorisée. ", "invalidMessage": "* La valeur indiquée n'est pas correcte. ", "missingMessage": "* Cette valeur est requise. "};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.fr_fr");dijit.form.nls.ComboBox.fr_fr={"previousMessage": "Choix précédents", "nextMessage": "Plus de choix"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.fr_fr");dojo.cldr.nls.currency.fr_fr={"HKD_displayName": "dollar de Hong Kong", "CHF_displayName": "franc suisse", "CHF_symbol": "sFr.", "CAD_displayName": "dollar canadien", "AUD_displayName": "dollar australien", "JPY_displayName": "yen", "USD_displayName": "dollar des États-Unis", "GBP_displayName": "livre sterling", "EUR_displayName": "euro", "USD_symbol": "$", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.fr_fr");dojo.cldr.nls.gregorian.fr_fr={"eraNames": ["av. J.-C.", "ap. J.-C."], "timeFormat-full": "HH' h 'mm z", "eraAbbr": ["av. J.-C.", "apr. J.-C."], "dateFormat-medium": "d MMM yy", "months-format-abbr": ["janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."], "dateFormat-full": "EEEE d MMMM yyyy", "days-format-abbr": ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."], "quarters-format-wide": ["1er trimestre", "2e trimestre", "3e trimestre", "4e trimestre"], "dateFormat-short": "dd/MM/yy", "quarters-format-abbreviated": ["T1", "T2", "T3", "T4"], "months-format-wide": ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"], "months-standAlone-narrow": ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], "days-standAlone-narrow": ["D", "L", "M", "M", "J", "V", "S"], "dateFormat-long": "d MMMM yyyy", "days-format-wide": ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "timeFormat-medium": "HH:mm:ss", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "timeFormat-long": "HH:mm:ss z", "timeFormat-short": "HH:mm", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "pm": "PM", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "am": "AM", "dateTimeFormats-appendItem-Era": "{0} {1}"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.fr_fr");dijit.nls.Textarea.fr_fr={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_fr-fr");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.fr_fr");dojo.nls.colors.fr_fr={"lightsteelblue":"bleu acier clair","orangered":"rouge orangé","midnightblue":"bleu nuit","cadetblue":"bleu pétrole","seashell":"coquillage","slategrey":"gris ardoise","coral":"corail","darkturquoise":"turquoise foncé","antiquewhite":"blanc antique","mediumspringgreen":"vert printemps moyen","salmon":"saumon","darkgrey":"gris foncé","ivory":"ivoire","greenyellow":"vert-jaune","mistyrose":"rose pâle","lightsalmon":"saumon clair","silver":"argent","dimgrey":"gris soutenu","orange":"orange","white":"blanc","navajowhite":"chair","royalblue":"bleu roi","deeppink":"rose soutenu","lime":"vert citron","oldlace":"blanc cassé","chartreuse":"vert vif","darkcyan":"cyan foncé","yellow":"jaune","linen":"écru","olive":"olive","gold":"or","lawngreen":"vert prairie","lightyellow":"jaune clair","tan":"grège","darkviolet":"violet foncé","lightslategrey":"gris ardoise clair","grey":"gris","darkkhaki":"kaki foncé","green":"vert","deepskyblue":"bleu ciel soutenu","aqua":"bleu-vert","sienna":"terre de sienne","mintcream":"crème de menthe","rosybrown":"vieux rose","mediumslateblue":"bleu ardoise moyen","magenta":"magenta","lightseagreen":"vert d'eau clair","cyan":"cyan","olivedrab":"brun verdâtre","darkgoldenrod":"jaune paille foncé","slateblue":"bleu ardoise","mediumaquamarine":"aigue-marine moyen","lavender":"lavande","mediumseagreen":"vert d'eau moyen","maroon":"marron","darkslategray":"gris ardoise foncé","mediumturquoise":"turquoise moyen","ghostwhite":"blanc laiteux","darkblue":"bleu foncé","mediumvioletred":"rouge violacé moyen","brown":"brun","lightgray":"gris clair","sandybrown":"sable","pink":"rose","firebrick":"rouge brique","indigo":"indigo","snow":"neige","darkorchid":"lilas foncé","turquoise":"turquoise","chocolate":"chocolat","springgreen":"vert printemps","moccasin":"chamois","navy":"bleu marine","lemonchiffon":"mousse de citron","teal":"sarcelle","floralwhite":"lys","cornflowerblue":"bleuet","paleturquoise":"turquoise pâle","purple":"pourpre","gainsboro":"gris souris","plum":"prune","red":"rouge","blue":"bleu","forestgreen":"vert sapin","darkgreen":"vert foncé","honeydew":"opalin","darkseagreen":"vert d'eau foncé","lightcoral":"corail clair","palevioletred":"rouge violacé pâle","mediumpurple":"pourpre moyen","saddlebrown":"brun cuir","darkmagenta":"magenta foncé","thistle":"chardon","whitesmoke":"blanc cendré","wheat":"blé","violet":"violet","lightskyblue":"bleu ciel clair","goldenrod":"jaune paille","mediumblue":"bleu moyen","skyblue":"bleu ciel","crimson":"cramoisi","darksalmon":"saumon foncé","darkred":"rouge foncé","darkslategrey":"gris ardoise foncé","peru":"caramel","lightgrey":"gris clair","lightgoldenrodyellow":"jaune paille clair","blanchedalmond":"coquille d'oeuf","aliceblue":"bleu gris","bisque":"beige rosé","slategray":"gris ardoise","palegoldenrod":"jaune paille pâle","darkorange":"orange foncé","aquamarine":"aigue-marine","lightgreen":"vert clair","burlywood":"bois précieux","dodgerblue":"bleu France","darkgray":"gris foncé","lightcyan":"cyan clair","powderblue":"bleu de smalt","blueviolet":"bleu-violet","orchid":"lilas","dimgray":"gris soutenu","beige":"beige","fuchsia":"fuchsia","lavenderblush":"lavandin","hotpink":"rose intense","steelblue":"bleu acier","tomato":"tomate","lightpink":"rose clair","limegreen":"citron vert","indianred":"rose indien","papayawhip":"crème de papaye","lightslategray":"gris ardoise clair","gray":"gris","mediumorchid":"lilas moyen","cornsilk":"vanille","black":"noir","seagreen":"vert d'eau","darkslateblue":"bleu ardoise foncé","khaki":"kaki","lightblue":"bleu clair","palegreen":"vert pâle","azure":"bleu azur","peachpuff":"pêche","darkolivegreen":"olive foncé","yellowgreen":"vert jaunâtre"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.fr_fr");dijit.nls.loading.fr_fr={"loadingState":"Chargement...","errorState":"Une erreur est survenue"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.fr_fr");dijit.nls.common.fr_fr={"buttonOk":"OK","buttonCancel":"Annuler","buttonSave":"Sauvegarder","itemClose":"Fermer"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.fr_fr");dijit._editor.nls.commands.fr_fr={"removeFormat":"Supprimer la mise en forme","copy":"Copier","paste":"Coller","selectAll":"Sélectionner tout","insertOrderedList":"Liste numérotée","insertTable":"Insérer/Modifier un tableau","print":"Imprimer","underline":"Souligner","foreColor":"Couleur avant-plan","htmlToggle":"Source HTML","formatBlock":"Style de paragraphe","newPage":"Nouvelle page","insertHorizontalRule":"Règle horizontale","delete":"Supprimer","insertUnorderedList":"Liste à puces","tableProp":"Propriété du tableau","insertImage":"Insérer une image","superscript":"Exposant","subscript":"Indice","createLink":"Créer un lien","undo":"Annuler","fullScreen":"Basculer vers le mode plein écran","italic":"Italique","fontName":"Nom de police","justifyLeft":"Aligner à gauche","unlink":"Supprimer le lien","toggleTableBorder":"Afficher/Masquer la bordure du tableau","viewSource":"Afficher la source HTML","fontSize":"Taille de police","systemShortcut":"Action \"${0}\" uniquement disponible dans votre navigateur via un raccourci clavier. Utilisez ${1}.","indent":"Retrait","redo":"Rétablir","strikethrough":"Barrer","justifyFull":"Justifier","justifyCenter":"Aligner au centre","hiliteColor":"Couleur arrière-plan","deleteTable":"Supprimer le tableau","outdent":"Retrait négatif","cut":"Couper","plainFormatBlock":"Style de paragraphe","toggleDir":"Changer de sens","bold":"Gras","tabIndent":"Retrait de tabulation","justifyRight":"Aligner à droite","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.fr_fr");dojo.cldr.nls.number.fr_fr={"group":" ","percentSign":"%","exponential":"E","percentFormat":"#,##0 %","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":",","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","currencyFormat":"#,##0.00 ¤","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.fr_fr");dijit.form.nls.validate.fr_fr={"rangeMessage":"Cette valeur n'est pas comprise dans la plage autorisée.","invalidMessage":"La valeur indiquée n'est pas correcte.","missingMessage":"Cette valeur est requise."};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.fr_fr");dojo.cldr.nls.currency.fr_fr={"HKD_displayName":"dollar de Hong Kong","CHF_displayName":"franc suisse","CHF_symbol":"CHF","JPY_symbol":"¥JP","HKD_symbol":"$HK","CAD_displayName":"dollar canadien","CNY_displayName":"yuan renminbi chinois","USD_symbol":"$US","AUD_displayName":"dollar australien","JPY_displayName":"yen japonais","CAD_symbol":"$CA","USD_displayName":"dollar des États-Unis","CNY_symbol":"Ұ","GBP_displayName":"livre sterling","GBP_symbol":"£UK","AUD_symbol":"$AU","EUR_displayName":"euro","EUR_symbol":"€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.fr_fr");dojo.cldr.nls.gregorian.fr_fr={"months-format-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"jour de la semaine","dateFormatItem-yyQQQQ":"QQQQ yy","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"EEE d/M/yyyy","dateFormatItem-MMMEd":"E d MMM","eraNarrow":["av. J.-C.","ap. J.-C."],"dateFormatItem-MMMdd":"dd MMM","dateFormat-long":"d MMMM y","months-format-wide":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],"dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d EEE","dateFormat-full":"EEEE d MMMM y","dateFormatItem-Md":"d/M","field-era":"ère","dateFormatItem-yM":"M/yyyy","months-standAlone-wide":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],"timeFormat-short":"HH:mm","quarters-format-wide":["1er trimestre","2e trimestre","3e trimestre","4e trimestre"],"timeFormat-long":"HH:mm:ss z","field-year":"année","dateFormatItem-yMMM":"MMM y","dateFormatItem-yQ":"'T'Q y","dateFormatItem-yyyyMMMM":"MMMM y","field-hour":"heure","dateFormatItem-MMdd":"dd/MM","months-format-abbr":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],"dateFormatItem-yyQ":"'T'Q yy","timeFormat-full":"HH:mm:ss zzzz","am":"AM","months-standAlone-abbr":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],"quarters-format-abbr":["T1","T2","T3","T4"],"quarters-standAlone-wide":["1er trimestre","2e trimestre","3e trimestre","4e trimestre"],"dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"L","days-standAlone-wide":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dateFormatItem-MMMMd":"d MMMM","dateFormatItem-yyMMMEEEd":"EEE d MMM yy","dateFormatItem-yyMMM":"MMM yy","timeFormat-medium":"HH:mm:ss","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["T1","T2","T3","T4"],"eraAbbr":["av. J.-C.","ap. J.-C."],"field-minute":"minute","field-dayperiod":"cadran","days-standAlone-abbr":["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],"dateFormatItem-yyMMMd":"d MMM yy","dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["T1","T2","T3","T4"],"dateTimeFormat-long":"{1} {0}","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"EEE d/M","dateFormatItem-yMMMM":"MMMM y","field-day":"jour","days-format-wide":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"field-zone":"fuseau horaire","dateFormatItem-y":"y","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-yyMM":"MM/yy","days-format-abbr":["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],"eraNames":["avant Jésus-Christ","après Jésus-Christ"],"days-format-narrow":["D","L","M","M","J","V","S"],"field-month":"mois","days-standAlone-narrow":["D","L","M","M","J","V","S"],"dateFormatItem-MMM":"LLL","dateFormatItem-HHmm":"HH:mm","pm":"PM","dateFormatItem-MMMMEd":"EEE d MMMM","dateFormat-short":"dd/MM/yy","dateFormatItem-MMd":"d/MM","field-second":"seconde","dateFormatItem-yMMMEd":"EEE d MMM y","field-week":"semaine","dateFormat-medium":"d MMM y","dateFormatItem-mmss":"mm:ss","dateTimeFormat-short":"{1} {0}","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","dateTimeFormat-full":"{1} {0}","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.fr_fr");dijit.form.nls.ComboBox.fr_fr={"previousMessage":"Choix précédents","nextMessage":"Plus de choix"};
diff --git a/js/dojo/dijit/nls/dijit-all_fr.js b/js/dojo/dijit/nls/dijit-all_fr.js
--- a/js/dojo/dijit/nls/dijit-all_fr.js
+++ b/js/dojo/dijit/nls/dijit-all_fr.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_fr");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.fr");dojo.nls.colors.fr={"lightsteelblue": "bleu acier clair", "orangered": "rouge orangé", "midnightblue": "bleu nuit", "cadetblue": "bleu pétrole", "seashell": "coquillage", "slategrey": "gris ardoise", "coral": "corail", "darkturquoise": "turquoise foncé", "antiquewhite": "blanc antique", "mediumspringgreen": "vert printemps moyen", "salmon": "saumon", "darkgrey": "gris foncé", "ivory": "ivoire", "greenyellow": "vert-jaune", "mistyrose": "rose pâle", "lightsalmon": "saumon clair", "silver": "argent", "dimgrey": "gris soutenu", "orange": "orange", "white": "blanc", "navajowhite": "chair", "royalblue": "bleu roi", "deeppink": "rose soutenu", "lime": "vert citron", "oldlace": "blanc cassé", "chartreuse": "vert vif", "darkcyan": "cyan foncé", "yellow": "jaune", "linen": "écru", "olive": "olive", "gold": "or", "lawngreen": "vert prairie", "lightyellow": "jaune clair", "tan": "grège", "darkviolet": "violet foncé", "lightslategrey": "gris ardoise clair", "grey": "gris", "darkkhaki": "kaki foncé", "green": "vert", "deepskyblue": "bleu ciel soutenu", "aqua": "bleu-vert", "sienna": "terre de sienne", "mintcream": "crème de menthe", "rosybrown": "vieux rose", "mediumslateblue": "bleu ardoise moyen", "magenta": "magenta", "lightseagreen": "vert d'eau clair", "cyan": "cyan", "olivedrab": "brun verdâtre", "darkgoldenrod": "jaune paille foncé", "slateblue": "bleu ardoise", "mediumaquamarine": "aigue-marine moyen", "lavender": "lavande", "mediumseagreen": "vert d'eau moyen ", "maroon": "marron", "darkslategray": "gris ardoise foncé", "mediumturquoise": "turquoise moyen", "ghostwhite": "blanc laiteux", "darkblue": "bleu foncé", "mediumvioletred": "rouge violacé moyen", "brown": "brun", "lightgray": "gris clair", "sandybrown": "sable", "pink": "rose", "firebrick": "rouge brique", "indigo": "indigo", "snow": "neige", "darkorchid": "lilas foncé", "turquoise": "turquoise", "chocolate": "chocolat", "springgreen": "vert printemps", "moccasin": "chamois", "navy": "bleu marine", "lemonchiffon": "mousse de citron", "teal": "sarcelle", "floralwhite": "lys", "cornflowerblue": "bleuet", "paleturquoise": "turquoise pâle", "purple": "pourpre", "gainsboro": "gris souris", "plum": "prune", "red": "rouge", "blue": "bleu", "forestgreen": "vert sapin", "darkgreen": "vert foncé", "honeydew": "opalin", "darkseagreen": "vert d'eau foncé", "lightcoral": "corail clair", "palevioletred": "rouge violacé pâle", "mediumpurple": "pourpre moyen", "saddlebrown": "brun cuir", "darkmagenta": "magenta foncé", "thistle": "chardon", "whitesmoke": "blanc cendré", "wheat": "blé", "violet": "violet", "lightskyblue": "bleu ciel clair", "goldenrod": "jaune paille", "mediumblue": "bleu moyen", "skyblue": "bleu ciel", "crimson": "cramoisi", "darksalmon": "saumon foncé", "darkred": "rouge foncé", "darkslategrey": "gris ardoise foncé", "peru": "caramel", "lightgrey": "gris clair", "lightgoldenrodyellow": "jaune paille clair", "blanchedalmond": "coquille d'oeuf", "aliceblue": "bleu gris", "bisque": "beige rosé", "slategray": "gris ardoise", "palegoldenrod": "jaune paille pâle", "darkorange": "orange foncé", "aquamarine": "aigue-marine", "lightgreen": "vert clair", "burlywood": "bois précieux", "dodgerblue": "bleu France", "darkgray": "gris foncé", "lightcyan": "cyan clair", "powderblue": "bleu de smalt", "blueviolet": "bleu-violet", "orchid": "lilas", "dimgray": "gris soutenu", "beige": "beige", "fuchsia": "fuchsia", "lavenderblush": "lavandin", "hotpink": "rose intense", "steelblue": "bleu acier", "tomato": "tomate", "lightpink": "rose clair", "limegreen": "citron vert", "indianred": "rose indien", "papayawhip": "crème de papaye", "lightslategray": "gris ardoise clair", "gray": "gris", "mediumorchid": "lilas moyen", "cornsilk": "vanille", "black": "noir", "seagreen": "vert d'eau", "darkslateblue": "bleu ardoise foncé", "khaki": "kaki", "lightblue": "bleu clair", "palegreen": "vert pâle", "azure": "bleu azur", "peachpuff": "pêche", "darkolivegreen": "olive foncé", "yellowgreen": "vert jaunâtre"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.fr");dijit.nls.loading.fr={"loadingState": "Chargement...", "errorState": "Une erreur est survenue"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.fr");dijit.nls.Textarea.fr={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.fr");dijit._editor.nls.commands.fr={"removeFormat": "Supprimer la mise en forme", "copy": "Copier", "paste": "Coller", "selectAll": "Sélectionner tout", "insertOrderedList": "Liste numérotée", "insertTable": "Insérer/Modifier un tableau", "underline": "Souligner", "foreColor": "Couleur d'avant-plan", "htmlToggle": "Source HTML", "formatBlock": "Style de paragraphe", "insertHorizontalRule": "Règle horizontale", "delete": "Supprimer", "insertUnorderedList": "Liste à puces", "tableProp": "Propriété du tableau", "insertImage": "Insérer une image", "superscript": "Exposant", "subscript": "Indice", "createLink": "Créer un lien", "undo": "Annuler", "italic": "Italique", "fontName": "Nom de police", "justifyLeft": "Aligner à gauche", "unlink": "Supprimer le lien", "toggleTableBorder": "Afficher/Masquer la bordure du tableau", "fontSize": "Taille de police", "indent": "Retrait", "redo": "Rétablir", "strikethrough": "Barrer", "justifyFull": "Justifier", "justifyCenter": "Aligner au centre", "hiliteColor": "Couleur d'arrière-plan", "deleteTable": "Supprimer le tableau", "outdent": "Retrait négatif", "cut": "Couper", "plainFormatBlock": "Style de paragraphe", "bold": "Gras", "systemShortcutFF": "L'action \"${0}\" est disponible dans Mozilla Firefox uniquement, par le biais d'un raccourci-clavier. Utilisez ${1}.", "justifyRight": "Aligner à droite", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.fr");dojo.cldr.nls.number.fr={"group": " ", "percentFormat": "#,##0 %", "currencyFormat": "#,##0.00 ¤", "decimal": ",", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "decimalFormat": "#,##0.###", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.fr");dijit.nls.common.fr={"buttonCancel": "Annuler", "buttonSave": "Sauvegarder", "buttonOk": "OK"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.fr");dijit.form.nls.validate.fr={"rangeMessage": "* Cette valeur n'est pas comprise dans la plage autorisée. ", "invalidMessage": "* La valeur indiquée n'est pas correcte. ", "missingMessage": "* Cette valeur est requise. "};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.fr");dijit.form.nls.ComboBox.fr={"previousMessage": "Choix précédents", "nextMessage": "Plus de choix"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.fr");dojo.cldr.nls.currency.fr={"HKD_displayName": "dollar de Hong Kong", "CHF_displayName": "franc suisse", "CHF_symbol": "sFr.", "CAD_displayName": "dollar canadien", "AUD_displayName": "dollar australien", "JPY_displayName": "yen", "USD_displayName": "dollar des États-Unis", "GBP_displayName": "livre sterling", "EUR_displayName": "euro", "USD_symbol": "$", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.fr");dojo.cldr.nls.gregorian.fr={"eraNames": ["av. J.-C.", "ap. J.-C."], "timeFormat-full": "HH' h 'mm z", "eraAbbr": ["av. J.-C.", "apr. J.-C."], "dateFormat-medium": "d MMM yy", "months-format-abbr": ["janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."], "dateFormat-full": "EEEE d MMMM yyyy", "days-format-abbr": ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."], "quarters-format-wide": ["1er trimestre", "2e trimestre", "3e trimestre", "4e trimestre"], "dateFormat-short": "dd/MM/yy", "quarters-format-abbreviated": ["T1", "T2", "T3", "T4"], "months-format-wide": ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"], "months-standAlone-narrow": ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], "days-standAlone-narrow": ["D", "L", "M", "M", "J", "V", "S"], "dateFormat-long": "d MMMM yyyy", "days-format-wide": ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "timeFormat-medium": "HH:mm:ss", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "timeFormat-long": "HH:mm:ss z", "timeFormat-short": "HH:mm", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "pm": "PM", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "am": "AM", "dateTimeFormats-appendItem-Era": "{0} {1}"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.fr");dijit.nls.Textarea.fr={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_fr");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.fr");dojo.nls.colors.fr={"lightsteelblue":"bleu acier clair","orangered":"rouge orangé","midnightblue":"bleu nuit","cadetblue":"bleu pétrole","seashell":"coquillage","slategrey":"gris ardoise","coral":"corail","darkturquoise":"turquoise foncé","antiquewhite":"blanc antique","mediumspringgreen":"vert printemps moyen","salmon":"saumon","darkgrey":"gris foncé","ivory":"ivoire","greenyellow":"vert-jaune","mistyrose":"rose pâle","lightsalmon":"saumon clair","silver":"argent","dimgrey":"gris soutenu","orange":"orange","white":"blanc","navajowhite":"chair","royalblue":"bleu roi","deeppink":"rose soutenu","lime":"vert citron","oldlace":"blanc cassé","chartreuse":"vert vif","darkcyan":"cyan foncé","yellow":"jaune","linen":"écru","olive":"olive","gold":"or","lawngreen":"vert prairie","lightyellow":"jaune clair","tan":"grège","darkviolet":"violet foncé","lightslategrey":"gris ardoise clair","grey":"gris","darkkhaki":"kaki foncé","green":"vert","deepskyblue":"bleu ciel soutenu","aqua":"bleu-vert","sienna":"terre de sienne","mintcream":"crème de menthe","rosybrown":"vieux rose","mediumslateblue":"bleu ardoise moyen","magenta":"magenta","lightseagreen":"vert d'eau clair","cyan":"cyan","olivedrab":"brun verdâtre","darkgoldenrod":"jaune paille foncé","slateblue":"bleu ardoise","mediumaquamarine":"aigue-marine moyen","lavender":"lavande","mediumseagreen":"vert d'eau moyen","maroon":"marron","darkslategray":"gris ardoise foncé","mediumturquoise":"turquoise moyen","ghostwhite":"blanc laiteux","darkblue":"bleu foncé","mediumvioletred":"rouge violacé moyen","brown":"brun","lightgray":"gris clair","sandybrown":"sable","pink":"rose","firebrick":"rouge brique","indigo":"indigo","snow":"neige","darkorchid":"lilas foncé","turquoise":"turquoise","chocolate":"chocolat","springgreen":"vert printemps","moccasin":"chamois","navy":"bleu marine","lemonchiffon":"mousse de citron","teal":"sarcelle","floralwhite":"lys","cornflowerblue":"bleuet","paleturquoise":"turquoise pâle","purple":"pourpre","gainsboro":"gris souris","plum":"prune","red":"rouge","blue":"bleu","forestgreen":"vert sapin","darkgreen":"vert foncé","honeydew":"opalin","darkseagreen":"vert d'eau foncé","lightcoral":"corail clair","palevioletred":"rouge violacé pâle","mediumpurple":"pourpre moyen","saddlebrown":"brun cuir","darkmagenta":"magenta foncé","thistle":"chardon","whitesmoke":"blanc cendré","wheat":"blé","violet":"violet","lightskyblue":"bleu ciel clair","goldenrod":"jaune paille","mediumblue":"bleu moyen","skyblue":"bleu ciel","crimson":"cramoisi","darksalmon":"saumon foncé","darkred":"rouge foncé","darkslategrey":"gris ardoise foncé","peru":"caramel","lightgrey":"gris clair","lightgoldenrodyellow":"jaune paille clair","blanchedalmond":"coquille d'oeuf","aliceblue":"bleu gris","bisque":"beige rosé","slategray":"gris ardoise","palegoldenrod":"jaune paille pâle","darkorange":"orange foncé","aquamarine":"aigue-marine","lightgreen":"vert clair","burlywood":"bois précieux","dodgerblue":"bleu France","darkgray":"gris foncé","lightcyan":"cyan clair","powderblue":"bleu de smalt","blueviolet":"bleu-violet","orchid":"lilas","dimgray":"gris soutenu","beige":"beige","fuchsia":"fuchsia","lavenderblush":"lavandin","hotpink":"rose intense","steelblue":"bleu acier","tomato":"tomate","lightpink":"rose clair","limegreen":"citron vert","indianred":"rose indien","papayawhip":"crème de papaye","lightslategray":"gris ardoise clair","gray":"gris","mediumorchid":"lilas moyen","cornsilk":"vanille","black":"noir","seagreen":"vert d'eau","darkslateblue":"bleu ardoise foncé","khaki":"kaki","lightblue":"bleu clair","palegreen":"vert pâle","azure":"bleu azur","peachpuff":"pêche","darkolivegreen":"olive foncé","yellowgreen":"vert jaunâtre"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.fr");dijit.nls.loading.fr={"loadingState":"Chargement...","errorState":"Une erreur est survenue"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.fr");dijit.nls.common.fr={"buttonOk":"OK","buttonCancel":"Annuler","buttonSave":"Sauvegarder","itemClose":"Fermer"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.fr");dijit._editor.nls.commands.fr={"removeFormat":"Supprimer la mise en forme","copy":"Copier","paste":"Coller","selectAll":"Sélectionner tout","insertOrderedList":"Liste numérotée","insertTable":"Insérer/Modifier un tableau","print":"Imprimer","underline":"Souligner","foreColor":"Couleur avant-plan","htmlToggle":"Source HTML","formatBlock":"Style de paragraphe","newPage":"Nouvelle page","insertHorizontalRule":"Règle horizontale","delete":"Supprimer","insertUnorderedList":"Liste à puces","tableProp":"Propriété du tableau","insertImage":"Insérer une image","superscript":"Exposant","subscript":"Indice","createLink":"Créer un lien","undo":"Annuler","fullScreen":"Basculer vers le mode plein écran","italic":"Italique","fontName":"Nom de police","justifyLeft":"Aligner à gauche","unlink":"Supprimer le lien","toggleTableBorder":"Afficher/Masquer la bordure du tableau","viewSource":"Afficher la source HTML","fontSize":"Taille de police","systemShortcut":"Action \"${0}\" uniquement disponible dans votre navigateur via un raccourci clavier. Utilisez ${1}.","indent":"Retrait","redo":"Rétablir","strikethrough":"Barrer","justifyFull":"Justifier","justifyCenter":"Aligner au centre","hiliteColor":"Couleur arrière-plan","deleteTable":"Supprimer le tableau","outdent":"Retrait négatif","cut":"Couper","plainFormatBlock":"Style de paragraphe","toggleDir":"Changer de sens","bold":"Gras","tabIndent":"Retrait de tabulation","justifyRight":"Aligner à droite","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.fr");dojo.cldr.nls.number.fr={"group":" ","percentSign":"%","exponential":"E","percentFormat":"#,##0 %","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":",","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","currencyFormat":"#,##0.00 ¤","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.fr");dijit.form.nls.validate.fr={"rangeMessage":"Cette valeur n'est pas comprise dans la plage autorisée.","invalidMessage":"La valeur indiquée n'est pas correcte.","missingMessage":"Cette valeur est requise."};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.fr");dojo.cldr.nls.currency.fr={"HKD_displayName":"dollar de Hong Kong","CHF_displayName":"franc suisse","CHF_symbol":"CHF","JPY_symbol":"¥JP","HKD_symbol":"$HK","CAD_displayName":"dollar canadien","CNY_displayName":"yuan renminbi chinois","USD_symbol":"$US","AUD_displayName":"dollar australien","JPY_displayName":"yen japonais","CAD_symbol":"$CA","USD_displayName":"dollar des États-Unis","CNY_symbol":"Ұ","GBP_displayName":"livre sterling","GBP_symbol":"£UK","AUD_symbol":"$AU","EUR_displayName":"euro","EUR_symbol":"€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.fr");dojo.cldr.nls.gregorian.fr={"months-format-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"jour de la semaine","dateFormatItem-yyQQQQ":"QQQQ yy","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"EEE d/M/yyyy","dateFormatItem-MMMEd":"E d MMM","eraNarrow":["av. J.-C.","ap. J.-C."],"dateFormatItem-MMMdd":"dd MMM","dateFormat-long":"d MMMM y","months-format-wide":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],"dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d EEE","dateFormat-full":"EEEE d MMMM y","dateFormatItem-Md":"d/M","field-era":"ère","dateFormatItem-yM":"M/yyyy","months-standAlone-wide":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],"timeFormat-short":"HH:mm","quarters-format-wide":["1er trimestre","2e trimestre","3e trimestre","4e trimestre"],"timeFormat-long":"HH:mm:ss z","field-year":"année","dateFormatItem-yMMM":"MMM y","dateFormatItem-yQ":"'T'Q y","dateFormatItem-yyyyMMMM":"MMMM y","field-hour":"heure","dateFormatItem-MMdd":"dd/MM","months-format-abbr":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],"dateFormatItem-yyQ":"'T'Q yy","timeFormat-full":"HH:mm:ss zzzz","am":"AM","months-standAlone-abbr":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],"quarters-format-abbr":["T1","T2","T3","T4"],"quarters-standAlone-wide":["1er trimestre","2e trimestre","3e trimestre","4e trimestre"],"dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"L","days-standAlone-wide":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dateFormatItem-MMMMd":"d MMMM","dateFormatItem-yyMMMEEEd":"EEE d MMM yy","dateFormatItem-yyMMM":"MMM yy","timeFormat-medium":"HH:mm:ss","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["T1","T2","T3","T4"],"eraAbbr":["av. J.-C.","ap. J.-C."],"field-minute":"minute","field-dayperiod":"cadran","days-standAlone-abbr":["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],"dateFormatItem-yyMMMd":"d MMM yy","dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["T1","T2","T3","T4"],"dateTimeFormat-long":"{1} {0}","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"EEE d/M","dateFormatItem-yMMMM":"MMMM y","field-day":"jour","days-format-wide":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"field-zone":"fuseau horaire","dateFormatItem-y":"y","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-yyMM":"MM/yy","days-format-abbr":["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],"eraNames":["avant Jésus-Christ","après Jésus-Christ"],"days-format-narrow":["D","L","M","M","J","V","S"],"field-month":"mois","days-standAlone-narrow":["D","L","M","M","J","V","S"],"dateFormatItem-MMM":"LLL","dateFormatItem-HHmm":"HH:mm","pm":"PM","dateFormatItem-MMMMEd":"EEE d MMMM","dateFormat-short":"dd/MM/yy","dateFormatItem-MMd":"d/MM","field-second":"seconde","dateFormatItem-yMMMEd":"EEE d MMM y","field-week":"semaine","dateFormat-medium":"d MMM y","dateFormatItem-mmss":"mm:ss","dateTimeFormat-short":"{1} {0}","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","dateTimeFormat-full":"{1} {0}","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.fr");dijit.form.nls.ComboBox.fr={"previousMessage":"Choix précédents","nextMessage":"Plus de choix"};
diff --git a/js/dojo/dijit/nls/dijit-all_hu.js b/js/dojo/dijit/nls/dijit-all_hu.js
--- a/js/dojo/dijit/nls/dijit-all_hu.js
+++ b/js/dojo/dijit/nls/dijit-all_hu.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_hu");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.hu");dojo.nls.colors.hu={"lightsteelblue": "világos acélkék", "orangered": "narancsvörös", "midnightblue": "éjkék", "cadetblue": "kadétkék", "seashell": "kagyló", "slategrey": "palaszürke", "coral": "korall", "darkturquoise": "sötét türkizkék", "antiquewhite": "antik fehér", "mediumspringgreen": "közepes tavaszzöld", "salmon": "lazacszín", "darkgrey": "sötétszürke", "ivory": "elefántcsont", "greenyellow": "zöldessárga", "mistyrose": "halvány rózsaszín", "lightsalmon": "világos lazacszín", "silver": "ezüst", "dimgrey": "halványszürke", "orange": "narancssárga", "white": "fehér", "navajowhite": "navajo fehér", "royalblue": "királykék", "deeppink": "sötétrózsaszín", "lime": "lime", "oldlace": "régi csipke", "chartreuse": "chartreuse", "darkcyan": "sötét ciánkék", "yellow": "sárga", "linen": "vászonfehér", "olive": "olajzöld", "gold": "arany", "lawngreen": "fűzöld", "lightyellow": "világossárga", "tan": "rozsdabarna", "darkviolet": "sötét ibolyaszín", "lightslategrey": "világos palaszürke", "grey": "szürke", "darkkhaki": "sötét khakiszín", "green": "zöld", "deepskyblue": "sötét égszínkék", "aqua": "vízszín", "sienna": "vörösesbarna", "mintcream": "mentaszósz", "rosybrown": "barnásrózsaszín", "mediumslateblue": "közepes palakék", "magenta": "bíbor", "lightseagreen": "világos tengerzöld", "cyan": "ciánkék", "olivedrab": "olajzöld drapp", "darkgoldenrod": "sötét aranyvessző", "slateblue": "palakék", "mediumaquamarine": "közepes akvamarin", "lavender": "levendula", "mediumseagreen": "közepes tengerzöld", "maroon": "gesztenyebarna", "darkslategray": "sötét palaszürke", "mediumturquoise": "közepes türkizkék", "ghostwhite": "szellemfehér", "darkblue": "sötétkék", "mediumvioletred": "közepes ibolyavörös", "brown": "barna", "lightgray": "világosszürke", "sandybrown": "homokbarna", "pink": "rózsaszín", "firebrick": "téglavörös", "indigo": "indigó", "snow": "hó", "darkorchid": "sötét orchidea", "turquoise": "türkizkék", "chocolate": "csokoládé", "springgreen": "tavaszzöld", "moccasin": "mokkaszín", "navy": "tengerészkék", "lemonchiffon": "sárga műselyem", "teal": "pávakék", "floralwhite": "virágfehér", "cornflowerblue": "búzavirágkék", "paleturquoise": "halvány türkizkék", "purple": "lila", "gainsboro": "gainsboro", "plum": "szilvakék", "red": "vörös", "blue": "kék", "forestgreen": "erdőzöld", "darkgreen": "sötétzöld", "honeydew": "mézharmat", "darkseagreen": "sötét tengerzöld", "lightcoral": "világos korall", "palevioletred": "halvány ibolyavörös", "mediumpurple": "közepes lila", "saddlebrown": "nyeregbarna", "darkmagenta": "sötétbíbor", "thistle": "bogáncs", "whitesmoke": "fehér füst", "wheat": "búza", "violet": "ibolyaszín", "lightskyblue": "világos égszínkék", "goldenrod": "aranyvessző", "mediumblue": "közepes kék", "skyblue": "égszínkék", "crimson": "karmazsinvörös", "darksalmon": "sötét lazacszín", "darkred": "sötétvörös", "darkslategrey": "sötét palaszürke", "peru": "peru", "lightgrey": "világosszürke", "lightgoldenrodyellow": "világos aranyvessző sárga", "blanchedalmond": "hámozott mandula", "aliceblue": "Alice kék", "bisque": "porcelán", "slategray": "palaszürke", "palegoldenrod": "halvány aranyvessző", "darkorange": "sötét narancssárga", "aquamarine": "akvamarin", "lightgreen": "világoszöld", "burlywood": "nyersfa", "dodgerblue": "dodger kék", "darkgray": "sötétszürke", "lightcyan": "világos ciánkék", "powderblue": "púderkék", "blueviolet": "ibolyakék", "orchid": "orchidea", "dimgray": "halványszürke", "beige": "bézs", "fuchsia": "fukszia", "lavenderblush": "pirosas levendula", "hotpink": "meleg rózsaszín", "steelblue": "acélkék", "tomato": "paradicsom", "lightpink": "világos rózsaszín", "limegreen": "limezöld", "indianred": "indiánvörös", "papayawhip": "papayahab", "lightslategray": "világos palaszürke", "gray": "szürke", "mediumorchid": "közepes orchidea", "cornsilk": "kukoricahaj", "black": "fekete", "seagreen": "tengerzöld", "darkslateblue": "sötét palakék", "khaki": "khakiszín", "lightblue": "világoskék", "palegreen": "halványzöld", "azure": "azúrkék", "peachpuff": "barackszín", "darkolivegreen": "sötét olajzöld", "yellowgreen": "sárgászöld"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.hu");dijit.nls.loading.hu={"loadingState": "Betöltés...", "errorState": "Sajnálom, hiba történt"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.hu");dijit.nls.Textarea.hu={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.hu");dijit._editor.nls.commands.hu={"removeFormat": "Formázás eltávolítása", "copy": "Másolás", "paste": "Beillesztés", "selectAll": "Összes kijelölése", "insertOrderedList": "Számozott lista", "insertTable": "Táblázat beszúrása/szerkesztése", "underline": "Aláhúzott", "foreColor": "Előtérszín", "htmlToggle": "HTML forrás", "formatBlock": "Bekezdés stílusa", "insertHorizontalRule": "Vízszintes vonalzó", "delete": "Törlés", "insertUnorderedList": "Felsorolásjeles lista", "tableProp": "Táblázat tulajdonságai", "insertImage": "Kép beszúrása", "superscript": "Felső index", "subscript": "Alsó index", "createLink": "Hivatkozás létrehozása", "undo": "Visszavonás", "italic": "Dőlt", "fontName": "Betűtípus", "justifyLeft": "Balra igazítás", "unlink": "Hivatkozás eltávolítása", "toggleTableBorder": "Táblázatszegély ki-/bekapcsolása", "fontSize": "Betűméret", "indent": "Behúzás", "redo": "Újra", "strikethrough": "Áthúzott", "justifyFull": "Sorkizárás", "justifyCenter": "Középre igazítás", "hiliteColor": "Háttérszín", "deleteTable": "Táblázat törlése", "outdent": "Negatív behúzás", "cut": "Kivágás", "plainFormatBlock": "Bekezdés stílusa", "bold": "Félkövér", "systemShortcutFF": "A(z) \"${0}\" művelet csak Mozilla Firefox böngészőben érhető el billentyűparancs használatával. Használja a következőt: ${1}.", "justifyRight": "Jobbra igazítás", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.hu");dojo.cldr.nls.number.hu={"scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencyFormat": "¤ #,##0.00", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.hu");dijit.nls.common.hu={"buttonCancel": "Mégse", "buttonSave": "Mentés", "buttonOk": "OK"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.hu");dijit.form.nls.validate.hu={"rangeMessage": "* Az érték kívül van a megengedett tartományon. ", "invalidMessage": "* A megadott érték érvénytelen. ", "missingMessage": "* Meg kell adni egy értéket. "};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.hu");dijit.form.nls.ComboBox.hu={"previousMessage": "Előző menüpontok", "nextMessage": "További menüpontok"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.hu");dojo.cldr.nls.currency.hu={"USD_symbol": "$", "EUR_displayName": "EUR", "GBP_displayName": "GBP", "JPY_displayName": "JPY", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€", "USD_displayName": "USD"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.hu");dojo.cldr.nls.gregorian.hu={"dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "eraNames": ["BCE", "CE"], "field-weekday": "Day of the Week", "months-standAlone-narrow": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "timeFormat-full": "HH:mm:ss z", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "days-standAlone-narrow": ["1", "2", "3", "4", "5", "6", "7"], "eraAbbr": ["BCE", "CE"], "dateFormat-long": "yyyy MMMM d", "timeFormat-medium": "HH:mm:ss", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateFormat-medium": "yyyy MMM d", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "timeFormat-long": "HH:mm:ss z", "months-format-abbr": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "timeFormat-short": "HH:mm", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "days-format-abbr": ["1", "2", "3", "4", "5", "6", "7"], "pm": "PM", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "am": "AM", "dateFormat-short": "yy/MM/dd", "dateFormat-full": "EEEE, yyyy MMMM dd", "months-format-wide": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "dateTimeFormats-appendItem-Era": "{0} {1}", "quarters-format-wide": ["Q1", "Q2", "Q3", "Q4"], "days-format-wide": ["1", "2", "3", "4", "5", "6", "7"]};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.hu");dijit.nls.Textarea.hu={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_hu");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.hu");dojo.nls.colors.hu={"lightsteelblue":"világos acélkék","orangered":"narancsvörös","midnightblue":"éjkék","cadetblue":"kadétkék","seashell":"kagyló","slategrey":"palaszürke","coral":"korall","darkturquoise":"sötét türkizkék","antiquewhite":"antik fehér","mediumspringgreen":"közepes tavaszzöld","salmon":"lazacszín","darkgrey":"sötétszürke","ivory":"elefántcsont","greenyellow":"zöldessárga","mistyrose":"halvány rózsaszín","lightsalmon":"világos lazacszín","silver":"ezüst","dimgrey":"halványszürke","orange":"narancssárga","white":"fehér","navajowhite":"navajo fehér","royalblue":"királykék","deeppink":"sötétrózsaszín","lime":"lime","oldlace":"régi csipke","chartreuse":"chartreuse","darkcyan":"sötét ciánkék","yellow":"sárga","linen":"vászonfehér","olive":"olajzöld","gold":"arany","lawngreen":"fűzöld","lightyellow":"világossárga","tan":"rozsdabarna","darkviolet":"sötét ibolyaszín","lightslategrey":"világos palaszürke","grey":"szürke","darkkhaki":"sötét khakiszín","green":"zöld","deepskyblue":"sötét égszínkék","aqua":"vízszín","sienna":"vörösesbarna","mintcream":"mentaszósz","rosybrown":"barnásrózsaszín","mediumslateblue":"közepes palakék","magenta":"bíbor","lightseagreen":"világos tengerzöld","cyan":"ciánkék","olivedrab":"olajzöld drapp","darkgoldenrod":"sötét aranyvessző","slateblue":"palakék","mediumaquamarine":"közepes akvamarin","lavender":"levendula","mediumseagreen":"közepes tengerzöld","maroon":"gesztenyebarna","darkslategray":"sötét palaszürke","mediumturquoise":"közepes türkizkék","ghostwhite":"szellemfehér","darkblue":"sötétkék","mediumvioletred":"közepes ibolyavörös","brown":"barna","lightgray":"világosszürke","sandybrown":"homokbarna","pink":"rózsaszín","firebrick":"téglavörös","indigo":"indigó","snow":"hó","darkorchid":"sötét orchidea","turquoise":"türkizkék","chocolate":"csokoládé","springgreen":"tavaszzöld","moccasin":"mokkaszín","navy":"tengerészkék","lemonchiffon":"sárga műselyem","teal":"pávakék","floralwhite":"virágfehér","cornflowerblue":"búzavirágkék","paleturquoise":"halvány türkizkék","purple":"lila","gainsboro":"gainsboro","plum":"szilvakék","red":"vörös","blue":"kék","forestgreen":"erdőzöld","darkgreen":"sötétzöld","honeydew":"mézharmat","darkseagreen":"sötét tengerzöld","lightcoral":"világos korall","palevioletred":"halvány ibolyavörös","mediumpurple":"közepes lila","saddlebrown":"nyeregbarna","darkmagenta":"sötétbíbor","thistle":"bogáncs","whitesmoke":"fehér füst","wheat":"búza","violet":"ibolyaszín","lightskyblue":"világos égszínkék","goldenrod":"aranyvessző","mediumblue":"közepes kék","skyblue":"égszínkék","crimson":"karmazsinvörös","darksalmon":"sötét lazacszín","darkred":"sötétvörös","darkslategrey":"sötét palaszürke","peru":"peru","lightgrey":"világosszürke","lightgoldenrodyellow":"világos aranyvessző sárga","blanchedalmond":"hámozott mandula","aliceblue":"Alice kék","bisque":"porcelán","slategray":"palaszürke","palegoldenrod":"halvány aranyvessző","darkorange":"sötét narancssárga","aquamarine":"akvamarin","lightgreen":"világoszöld","burlywood":"nyersfa","dodgerblue":"dodger kék","darkgray":"sötétszürke","lightcyan":"világos ciánkék","powderblue":"púderkék","blueviolet":"ibolyakék","orchid":"orchidea","dimgray":"halványszürke","beige":"bézs","fuchsia":"fukszia","lavenderblush":"pirosas levendula","hotpink":"meleg rózsaszín","steelblue":"acélkék","tomato":"paradicsom","lightpink":"világos rózsaszín","limegreen":"limezöld","indianred":"indiánvörös","papayawhip":"papayahab","lightslategray":"világos palaszürke","gray":"szürke","mediumorchid":"közepes orchidea","cornsilk":"kukoricahaj","black":"fekete","seagreen":"tengerzöld","darkslateblue":"sötét palakék","khaki":"khakiszín","lightblue":"világoskék","palegreen":"halványzöld","azure":"azúrkék","peachpuff":"barackszín","darkolivegreen":"sötét olajzöld","yellowgreen":"sárgászöld"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.hu");dijit.nls.loading.hu={"loadingState":"Betöltés...","errorState":"Sajnálom, hiba történt"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.hu");dijit.nls.common.hu={"buttonOk":"OK","buttonCancel":"Mégse","buttonSave":"Mentés","itemClose":"Bezárás"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.hu");dijit._editor.nls.commands.hu={"removeFormat":"Formázás eltávolítása","copy":"Másolás","paste":"Beillesztés","selectAll":"Összes kijelölése","insertOrderedList":"Számozott lista","insertTable":"Táblázat beszúrása/szerkesztése","print":"Nyomtatás","underline":"Aláhúzott","foreColor":"Előtérszín","htmlToggle":"HTML forrás","formatBlock":"Bekezdés stílusa","newPage":"Új oldal","insertHorizontalRule":"Vízszintes vonalzó","delete":"Törlés","insertUnorderedList":"Felsorolásjeles lista","tableProp":"Táblázat tulajdonságai","insertImage":"Kép beszúrása","superscript":"Felső index","subscript":"Alsó index","createLink":"Hivatkozás létrehozása","undo":"Visszavonás","fullScreen":"Váltás teljes képernyőre","italic":"Dőlt","fontName":"Betűtípus","justifyLeft":"Balra igazítás","unlink":"Hivatkozás eltávolítása","toggleTableBorder":"Táblázatszegély ki-/bekapcsolása","viewSource":"HTML forrás megjelenítése","fontSize":"Betűméret","systemShortcut":"A(z) \"${0}\" művelet a böngészőben csak billentyűparancs használatával érhető el. Használja a következőt: ${1}.","indent":"Behúzás","redo":"Újra","strikethrough":"Áthúzott","justifyFull":"Sorkizárás","justifyCenter":"Középre igazítás","hiliteColor":"Háttérszín","deleteTable":"Táblázat törlése","outdent":"Negatív behúzás","cut":"Kivágás","plainFormatBlock":"Bekezdés stílusa","toggleDir":"Irány váltókapcsoló","bold":"Félkövér","tabIndent":"Tab behúzás","justifyRight":"Jobbra igazítás","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.hu");dojo.cldr.nls.number.hu={"group":" ","percentSign":"%","exponential":"E","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":",","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","currencyFormat":"#,##0.00 ¤","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","percentFormat":"#,##0%","currencySpacing-beforeCurrency-insertBetween":" "};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.hu");dijit.form.nls.validate.hu={"rangeMessage":"Az érték kívül van a megengedett tartományon.","invalidMessage":"A megadott érték érvénytelen.","missingMessage":"Meg kell adni egy értéket."};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.hu");dojo.cldr.nls.currency.hu={"HKD_displayName":"Hongkongi dollár","CHF_displayName":"Svájci frank","JPY_symbol":"¥","CAD_displayName":"Kanadai dollár","CNY_displayName":"Kínai jüan renminbi","USD_symbol":"$","AUD_displayName":"Ausztrál dollár","JPY_displayName":"Japán jen","USD_displayName":"USA dollár","GBP_displayName":"Brit font sterling","EUR_displayName":"Euro","CHF_symbol":"Fr.","HKD_symbol":"HK$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.hu");dojo.cldr.nls.gregorian.hu={"field-dayperiod":"napszak","field-minute":"perc","eraNames":["időszámításunk előtt","időszámításunk szerint"],"field-weekday":"hét napja","dateFormatItem-MMdd":"MM.dd.","days-standAlone-wide":["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"],"dateFormatItem-MMM":"LLL","months-standAlone-narrow":["J","F","M","Á","M","J","J","A","S","O","N","D"],"field-era":"éra","field-hour":"óra","quarters-standAlone-abbr":["N1","N2","N3","N4"],"timeFormat-full":"H:mm:ss zzzz","months-standAlone-abbr":["jan.","febr.","márc.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec."],"days-standAlone-narrow":["V","H","K","S","C","P","S"],"eraAbbr":["i. e.","i. sz."],"dateFormatItem-yyyyMM":"yyyy.MM","dateFormatItem-yyyyMMMM":"y. MMMM","dateFormat-long":"y. MMMM d.","timeFormat-medium":"H:mm:ss","field-zone":"zóna","dateFormatItem-Hm":"HH:mm","dateFormat-medium":"yyyy.MM.dd.","quarters-standAlone-wide":["I. negyedév","II. negyedév","III. negyedév","IV. negyedév"],"field-year":"év","quarters-standAlone-narrow":["1","2","3","4"],"months-standAlone-wide":["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december"],"field-week":"hét","dateFormatItem-MMMd":"MMM d.","dateFormatItem-yyQ":"yy/Q","timeFormat-long":"H:mm:ss z","months-format-abbr":["jan.","febr.","márc.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec."],"timeFormat-short":"H:mm","field-month":"hónap","dateFormatItem-MMMMd":"MMMM d.","quarters-format-abbr":["N1","N2","N3","N4"],"days-format-abbr":["V","H","K","Sze","Cs","P","Szo"],"pm":"du.","dateFormatItem-mmss":"mm:ss","dateFormatItem-M":"L","days-format-narrow":["V","H","K","S","C","P","S"],"field-second":"másodperc","field-day":"nap","dateFormatItem-MEd":"M. d., E","months-format-narrow":["J","F","M","Á","M","J","J","A","S","O","N","D"],"am":"de.","days-standAlone-abbr":["V","H","K","Sze","Cs","P","Szo"],"dateFormat-short":"yyyy.MM.dd.","dateFormat-full":"y. MMMM d., EEEE","dateFormatItem-Md":"M. d.","months-format-wide":["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december"],"dateFormatItem-d":"d","quarters-format-wide":["I. negyedév","II. negyedév","III. negyedév","IV. negyedév"],"days-format-wide":["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"],"eraNarrow":["i. e.","i. sz."],"dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"EEE, y-M-d","dateFormatItem-MMMEd":"E MMM d","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d EEE","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateFormatItem-yM":"y-M","dateFormatItem-yMMM":"y MMM","dateFormatItem-yQ":"y Q","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","dateTimeFormat-full":"{1} {0}","dateFormatItem-yMMMM":"y MMMM","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-y":"y","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateFormatItem-MMMMEd":"E MMMM d","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-yMMMEd":"EEE, y MMM d","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.hu");dijit.form.nls.ComboBox.hu={"previousMessage":"Előző menüpontok","nextMessage":"További menüpontok"};
diff --git a/js/dojo/dijit/nls/dijit-all_it-it.js b/js/dojo/dijit/nls/dijit-all_it-it.js
--- a/js/dojo/dijit/nls/dijit-all_it-it.js
+++ b/js/dojo/dijit/nls/dijit-all_it-it.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_it-it");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.it_it");dojo.nls.colors.it_it={"lightsteelblue": "blu acciao chiaro", "orangered": "vermiglio", "midnightblue": "blu melanzana scuro", "cadetblue": "verde acqua", "seashell": "sabbia rosa", "slategrey": "grigio ardesia", "coral": "corallo", "darkturquoise": "turchese scuro", "antiquewhite": "bianco antico", "mediumspringgreen": "verde primavera medio", "salmon": "salmone", "darkgrey": "grigio scuro", "ivory": "avorio", "greenyellow": "giallo verde", "mistyrose": "rosa pallido", "lightsalmon": "salmone chiaro", "silver": "grigio 25%", "dimgrey": "grigio 80%", "orange": "arancione", "white": "bianco", "navajowhite": "pesca chiaro", "royalblue": "blu reale", "deeppink": "ciclamino", "lime": "verde fluorescente", "oldlace": "mandorla", "chartreuse": "verde brillante", "darkcyan": "ciano scuro", "yellow": "giallo", "linen": "lino", "olive": "verde oliva", "gold": "oro", "lawngreen": "verde prato", "lightyellow": "giallo chiaro", "tan": "grigio bruno", "darkviolet": "viola scuro", "lightslategrey": "grigio ardesia chiaro", "grey": "grigio", "darkkhaki": "kaki scuro", "green": "verde", "deepskyblue": "azzurro cielo scuro", "aqua": "acqua", "sienna": "cuoio", "mintcream": "bianco nuvola", "rosybrown": "marrone rosato", "mediumslateblue": "blu ardesia medio", "magenta": "magenta", "lightseagreen": "verde mare chiaro", "cyan": "ciano", "olivedrab": "marrone oliva", "darkgoldenrod": "ocra scuro", "slateblue": "blu ardesia", "mediumaquamarine": "acquamarina medio", "lavender": "lavanda", "mediumseagreen": "verde mare medio", "maroon": "scarlatto", "darkslategray": "grigio ardesia scuro", "mediumturquoise": "turchese medio", "ghostwhite": "bianco gesso", "darkblue": "blu scuro", "mediumvioletred": "vinaccia", "brown": "marrone", "lightgray": "grigio chiaro", "sandybrown": "marrone sabbia", "pink": "rosa", "firebrick": "rosso mattone", "indigo": "indaco", "snow": "neve", "darkorchid": "orchidea scuro", "turquoise": "turchese", "chocolate": "cioccolato", "springgreen": "verde primavera", "moccasin": "mocassino", "navy": "blu notte", "lemonchiffon": "caffelatte chiaro", "teal": "verde turchese", "floralwhite": "bianco giglio", "cornflowerblue": "blu fiordaliso", "paleturquoise": "turchese pallido", "purple": "porpora", "gainsboro": "grigio 10%", "plum": "prugna", "red": "rosso", "blue": "blu", "forestgreen": "verde foresta", "darkgreen": "verde scuro", "honeydew": "bianco germoglio", "darkseagreen": "verde mare scuro", "lightcoral": "rosa corallo", "palevioletred": "vinaccia chiaro", "mediumpurple": "porpora medio", "saddlebrown": "cacao", "darkmagenta": "magenta scuro", "thistle": "rosa cenere", "whitesmoke": "bianco fumo", "wheat": "sabbia", "violet": "viola", "lightskyblue": "azzurro cielo chiaro", "goldenrod": "ocra gialla", "mediumblue": "blu medio", "skyblue": "azzurro cielo", "crimson": "cremisi", "darksalmon": "salmone scuro", "darkred": "rosso scuro", "darkslategrey": "grigio ardesia scuro", "peru": "marrone terra bruciata", "lightgrey": "grigio chiaro", "lightgoldenrodyellow": "giallo tenue", "blanchedalmond": "mandorla chiaro", "aliceblue": "blu alice", "bisque": "incarnato", "slategray": "grigio ardesia", "palegoldenrod": "giallo zolfo chiaro", "darkorange": "arancione scuro", "aquamarine": "acquamarina", "lightgreen": "verde chiaro", "burlywood": "tabacco", "dodgerblue": "blu d'oriente", "darkgray": "grigio scuro", "lightcyan": "ciano chiaro", "powderblue": "azzurro polvere", "blueviolet": "blu violetto", "orchid": "orchidea", "dimgray": "grigio 80%", "beige": "beige", "fuchsia": "fucsia", "lavenderblush": "bianco rosato", "hotpink": "rosa acceso", "steelblue": "blu acciao", "tomato": "pomodoro", "lightpink": "rosa chiaro", "limegreen": "verde lime", "indianred": "terra indiana", "papayawhip": "cipria", "lightslategray": "grigio ardesia chiaro", "gray": "grigio", "mediumorchid": "orchidea medio", "cornsilk": "crema", "black": "nero", "seagreen": "verde mare", "darkslateblue": "blu ardesia scuro", "khaki": "kaki", "lightblue": "azzurro", "palegreen": "verde pallido", "azure": "azzurro ghiaccio", "peachpuff": "pesca", "darkolivegreen": "verde oliva scuro", "yellowgreen": "giallo verde"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.it_it");dijit.nls.loading.it_it={"loadingState": "Caricamento in corso...", "errorState": "Si è verificato un errore"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.it_it");dijit.nls.Textarea.it_it={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.it_it");dijit._editor.nls.commands.it_it={"removeFormat": "Rimuovi formato", "copy": "Copia", "paste": "Incolla", "selectAll": "Seleziona tutto", "insertOrderedList": "Elenco numerato", "insertTable": "Inserisci/Modifica tabella", "underline": "Sottolineato", "foreColor": "Colore primo piano", "htmlToggle": "Origine HTML", "formatBlock": "Stile paragrafo", "insertHorizontalRule": "Righello orizzontale", "delete": "Elimina", "insertUnorderedList": "Elenco puntato", "tableProp": "Proprietà tabella", "insertImage": "Inserisci immagine", "superscript": "Apice", "subscript": "Pedice", "createLink": "Crea collegamento", "undo": "Annulla", "italic": "Corsivo", "fontName": "Nome carattere", "justifyLeft": "Allinea a sinistra", "unlink": "Rimuovi collegamento", "toggleTableBorder": "Mostra/Nascondi margine tabella", "fontSize": "Dimensione carattere", "indent": "Rientra", "redo": "Ripristina", "strikethrough": "Barrato", "justifyFull": "Giustifica", "justifyCenter": "Allinea al centro", "hiliteColor": "Colore sfondo", "deleteTable": "Elimina tabella", "outdent": "Rimuovi rientro", "cut": "Taglia", "plainFormatBlock": "Stile paragrafo", "bold": "Grassetto", "systemShortcutFF": "L'azione \"${0}\" è disponibile solo in Mozilla Firefox tramite tasti di scelta rapida. Utilizzare ${1}.", "justifyRight": "Allinea a destra", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.it_it");dojo.cldr.nls.number.it_it={"group": ".", "decimal": ",", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencyFormat": "¤ #,##0.00", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.it_it");dijit.nls.common.it_it={"buttonCancel": "Annulla", "buttonSave": "Salva", "buttonOk": "OK"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.it_it");dijit.form.nls.validate.it_it={"rangeMessage": "* Questo valore non è compreso nell'intervallo.", "invalidMessage": "* Il valore immesso non è valido.", "missingMessage": "* Questo valore è obbligatorio."};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.it_it");dijit.form.nls.ComboBox.it_it={"previousMessage": "Scelte precedenti", "nextMessage": "Altre scelte"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.it_it");dojo.cldr.nls.currency.it_it={"HKD_displayName": "Dollaro di Hong Kong", "CHF_displayName": "Franco Svizzero", "CHF_symbol": "SFr.", "CAD_displayName": "Dollaro Canadese", "AUD_displayName": "Dollaro Australiano", "JPY_displayName": "Yen Giapponese", "USD_displayName": "Dollaro Statunitense", "GBP_displayName": "Sterlina Inglese", "EUR_displayName": "Euro", "USD_symbol": "$", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.it_it");dojo.cldr.nls.gregorian.it_it={"timeFormat-long": "H:mm:ss z", "quarters-format-abbreviated": ["T1", "T2", "T3", "T4"], "dateFormat-medium": "dd/MMM/yy", "field-second": "secondo", "field-week": "settimana", "pm": "p.", "months-standAlone-narrow": ["G", "F", "M", "A", "M", "G", "L", "A", "S", "O", "N", "D"], "am": "m.", "days-standAlone-narrow": ["D", "L", "M", "M", "G", "V", "S"], "field-year": "anno", "field-minute": "minuto", "field-hour": "ora", "dateFormat-long": "dd MMMM yyyy", "field-day": "giorno", "field-dayperiod": "periodo del giorno", "field-month": "mese", "dateFormat-short": "dd/MM/yy", "months-format-wide": ["gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"], "field-era": "era", "months-format-abbr": ["gen", "feb", "mar", "apr", "mag", "giu", "lug", "ago", "set", "ott", "nov", "dic"], "days-format-wide": ["domenica", "lunedì", "martedì", "mercoledì", "giovedì", "venerdì", "sabato"], "eraAbbr": ["aC", "dC"], "quarters-format-wide": ["1o trimestre", "2o trimestre", "3o trimestre", "4o trimestre"], "dateFormat-full": "EEEE d MMMM yyyy", "field-weekday": "giorno della settimana", "days-format-abbr": ["dom", "lun", "mar", "mer", "gio", "ven", "sab"], "field-zone": "zona", "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "eraNames": ["BCE", "CE"], "dateTimeFormats-appendItem-Year": "{0} {1}", "timeFormat-full": "HH:mm:ss z", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "timeFormat-medium": "HH:mm:ss", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateTimeFormat": "{1} {0}", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "timeFormat-short": "HH:mm", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Era": "{0} {1}"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.it_it");dijit.nls.Textarea.it_it={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_it-it");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.it_it");dojo.nls.colors.it_it={"lightsteelblue":"blu acciao chiaro","orangered":"vermiglio","midnightblue":"blu melanzana scuro","cadetblue":"verde acqua","seashell":"sabbia rosa","slategrey":"grigio ardesia","coral":"corallo","darkturquoise":"turchese scuro","antiquewhite":"bianco antico","mediumspringgreen":"verde primavera medio","salmon":"salmone","darkgrey":"grigio scuro","ivory":"avorio","greenyellow":"giallo verde","mistyrose":"rosa pallido","lightsalmon":"salmone chiaro","silver":"grigio 25%","dimgrey":"grigio 80%","orange":"arancione","white":"bianco","navajowhite":"pesca chiaro","royalblue":"blu reale","deeppink":"ciclamino","lime":"verde fluorescente","oldlace":"mandorla","chartreuse":"verde brillante","darkcyan":"ciano scuro","yellow":"giallo","linen":"lino","olive":"verde oliva","gold":"oro","lawngreen":"verde prato","lightyellow":"giallo chiaro","tan":"grigio bruno","darkviolet":"viola scuro","lightslategrey":"grigio ardesia chiaro","grey":"grigio","darkkhaki":"kaki scuro","green":"verde","deepskyblue":"azzurro cielo scuro","aqua":"acqua","sienna":"cuoio","mintcream":"bianco nuvola","rosybrown":"marrone rosato","mediumslateblue":"blu ardesia medio","magenta":"magenta","lightseagreen":"verde mare chiaro","cyan":"ciano","olivedrab":"marrone oliva","darkgoldenrod":"ocra scuro","slateblue":"blu ardesia","mediumaquamarine":"acquamarina medio","lavender":"lavanda","mediumseagreen":"verde mare medio","maroon":"scarlatto","darkslategray":"grigio ardesia scuro","mediumturquoise":"turchese medio","ghostwhite":"bianco gesso","darkblue":"blu scuro","mediumvioletred":"vinaccia","brown":"marrone","lightgray":"grigio chiaro","sandybrown":"marrone sabbia","pink":"rosa","firebrick":"rosso mattone","indigo":"indaco","snow":"neve","darkorchid":"orchidea scuro","turquoise":"turchese","chocolate":"cioccolato","springgreen":"verde primavera","moccasin":"mocassino","navy":"blu notte","lemonchiffon":"caffelatte chiaro","teal":"verde turchese","floralwhite":"bianco giglio","cornflowerblue":"blu fiordaliso","paleturquoise":"turchese pallido","purple":"porpora","gainsboro":"grigio 10%","plum":"prugna","red":"rosso","blue":"blu","forestgreen":"verde foresta","darkgreen":"verde scuro","honeydew":"bianco germoglio","darkseagreen":"verde mare scuro","lightcoral":"rosa corallo","palevioletred":"vinaccia chiaro","mediumpurple":"porpora medio","saddlebrown":"cacao","darkmagenta":"magenta scuro","thistle":"rosa cenere","whitesmoke":"bianco fumo","wheat":"sabbia","violet":"viola","lightskyblue":"azzurro cielo chiaro","goldenrod":"ocra gialla","mediumblue":"blu medio","skyblue":"azzurro cielo","crimson":"cremisi","darksalmon":"salmone scuro","darkred":"rosso scuro","darkslategrey":"grigio ardesia scuro","peru":"marrone terra bruciata","lightgrey":"grigio chiaro","lightgoldenrodyellow":"giallo tenue","blanchedalmond":"mandorla chiaro","aliceblue":"blu alice","bisque":"incarnato","slategray":"grigio ardesia","palegoldenrod":"giallo zolfo chiaro","darkorange":"arancione scuro","aquamarine":"acquamarina","lightgreen":"verde chiaro","burlywood":"tabacco","dodgerblue":"blu d'oriente","darkgray":"grigio scuro","lightcyan":"ciano chiaro","powderblue":"azzurro polvere","blueviolet":"blu violetto","orchid":"orchidea","dimgray":"grigio 80%","beige":"beige","fuchsia":"fucsia","lavenderblush":"bianco rosato","hotpink":"rosa acceso","steelblue":"blu acciao","tomato":"pomodoro","lightpink":"rosa chiaro","limegreen":"verde lime","indianred":"terra indiana","papayawhip":"cipria","lightslategray":"grigio ardesia chiaro","gray":"grigio","mediumorchid":"orchidea medio","cornsilk":"crema","black":"nero","seagreen":"verde mare","darkslateblue":"blu ardesia scuro","khaki":"kaki","lightblue":"azzurro","palegreen":"verde pallido","azure":"azzurro ghiaccio","peachpuff":"pesca","darkolivegreen":"verde oliva scuro","yellowgreen":"giallo verde"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.it_it");dijit.nls.loading.it_it={"loadingState":"Caricamento in corso...","errorState":"Si è verificato un errore"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.it_it");dijit.nls.common.it_it={"buttonOk":"OK","buttonCancel":"Annulla","buttonSave":"Salva","itemClose":"Chiudi"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.it_it");dijit._editor.nls.commands.it_it={"removeFormat":"Rimuovi formato","copy":"Copia","paste":"Incolla","selectAll":"Seleziona tutto","insertOrderedList":"Elenco numerato","insertTable":"Inserisci/Modifica tabella","print":"Stampa","underline":"Sottolinea","foreColor":"Colore primo piano","htmlToggle":"Origine HTML","formatBlock":"Stile paragrafo","newPage":"Nuova pagina","insertHorizontalRule":"Righello orizzontale","delete":"Elimina","insertUnorderedList":"Elenco puntato","tableProp":"Proprietà tabella","insertImage":"Inserisci immagine","superscript":"Apice","subscript":"Pedice","createLink":"Crea collegamento","undo":"Annulla","fullScreen":"Attiva/Disattiva schermo intero","italic":"Corsivo","fontName":"Nome carattere","justifyLeft":"Allinea a sinistra","unlink":"Rimuovi collegamento","toggleTableBorder":"Attiva/Disattiva bordo tabella","viewSource":"Visualizza origine HTML","fontSize":"Dimensione carattere","systemShortcut":"La azione \"${0}\" è disponibile solo nel browser tramite un tasto di scelta rapida. Utilizzare ${1}.","indent":"Rientro","redo":"Ripristina","strikethrough":"Barrato","justifyFull":"Giustifica","justifyCenter":"Allinea al centro","hiliteColor":"Colore sfondo","deleteTable":"Elimina tabella","outdent":"Annulla rientro","cut":"Taglia","plainFormatBlock":"Stile paragrafo","toggleDir":"Attiva/Disattiva direzione","bold":"Grassetto","tabIndent":"Rientro tabulazione","justifyRight":"Allinea a destra","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.it_it");dojo.cldr.nls.number.it_it={"decimalFormat":"#,##0.###","group":".","scientificFormat":"#E0","percentFormat":"#,##0%","currencyFormat":"¤ #,##0.00","decimal":",","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","infinity":"∞","list":";","percentSign":"%","minusSign":"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","nan":"NaN","nativeZeroDigit":"0","plusSign":"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","perMille":"‰","patternDigit":"#","currencySpacing-beforeCurrency-insertBetween":" ","exponential":"E"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.it_it");dijit.form.nls.validate.it_it={"rangeMessage":"Questo valore non è compreso nell'intervallo.","invalidMessage":"Il valore immesso non è valido.","missingMessage":"Questo valore è obbligatorio."};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.it_it");dojo.cldr.nls.currency.it_it={"HKD_displayName":"Dollaro di Hong Kong","CHF_displayName":"Franco Svizzero","CAD_displayName":"Dollaro Canadese","CNY_displayName":"Renmimbi Cinese","AUD_displayName":"Dollaro Australiano","JPY_displayName":"Yen Giapponese","USD_displayName":"Dollaro Statunitense","GBP_displayName":"Sterlina Inglese","EUR_displayName":"Euro","CHF_symbol":"Fr.","JPY_symbol":"JP¥","HKD_symbol":"HK$","USD_symbol":"US$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.it_it");dojo.cldr.nls.gregorian.it_it={"timeFormat-long":"H:mm:ss z","dateFormatItem-yM":"M/yyyy","field-dayperiod":"periodo del giorno","dateFormatItem-yQ":"Q-yyyy","field-minute":"minuto","eraNames":["a.C.","d.C"],"dateFormatItem-MMMEd":"EEE d MMM","field-weekday":"giorno della settimana","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-MMdd":"dd/MM","days-standAlone-wide":["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],"dateFormatItem-MMM":"LLL","months-standAlone-narrow":["G","F","M","A","M","G","L","A","S","O","N","D"],"field-era":"era","field-hour":"ora","dateFormatItem-hhmm":"hh.mm a","quarters-standAlone-abbr":["T1","T2","T3","T4"],"dateFormatItem-y":"y","timeFormat-full":"HH.mm.ss zzzz","months-standAlone-abbr":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],"dateFormatItem-yMMM":"MMM y","days-standAlone-narrow":["D","L","M","M","G","V","S"],"eraAbbr":["aC","dC"],"dateFormatItem-yyyyMMMM":"MMMM y","dateFormat-long":"dd MMMM y","timeFormat-medium":"HH.mm.ss","field-zone":"zona","dateFormatItem-Hm":"HH:mm","dateFormatItem-yyMM":"MM/yy","dateFormat-medium":"dd/MMM/y","dateFormatItem-yyQQQQ":"QQQQ yy","quarters-standAlone-wide":["1o trimestre","2o trimestre","3o trimestre","4o trimestre"],"dateFormatItem-yMMMM":"MMMM y","dateFormatItem-ms":"mm:ss","field-year":"anno","quarters-standAlone-narrow":["1","2","3","4"],"dateFormatItem-HHmmss":"HH.mm.ss","months-standAlone-wide":["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],"field-week":"settimana","dateFormatItem-MMMMEd":"EEE d MMMM","dateFormatItem-MMMd":"d MMM","dateFormatItem-HHmm":"HH.mm","dateFormatItem-yyQ":"Q yy","months-format-abbr":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],"timeFormat-short":"HH.mm","field-month":"mese","quarters-format-abbr":["T1","T2","T3","T4"],"dateFormatItem-MMMMd":"d MMMM","days-format-abbr":["dom","lun","mar","mer","gio","ven","sab"],"dateFormatItem-MMMMdd":"dd MMMM","pm":"p.","dateFormatItem-M":"L","days-format-narrow":["D","L","M","M","G","V","S"],"field-second":"secondo","field-day":"giorno","dateFormatItem-MEd":"EEE d/M","months-format-narrow":["G","F","M","A","M","G","L","A","S","O","N","D"],"dateFormatItem-hhmmss":"hh.mm.ss a","am":"m.","days-standAlone-abbr":["dom","lun","mar","mer","gio","ven","sab"],"dateFormat-short":"dd/MM/yy","dateFormatItem-yMMMEd":"EEE d MMM y","dateFormat-full":"EEEE d MMMM y","dateFormatItem-Md":"d/M","dateFormatItem-yMEd":"EEE, d-M-yyyy","months-format-wide":["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],"dateFormatItem-d":"d","quarters-format-wide":["1o trimestre","2o trimestre","3o trimestre","4o trimestre"],"days-format-wide":["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],"eraNarrow":["aC","dC"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d EEE","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","dateTimeFormat-full":"{1} {0}","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.it_it");dijit.form.nls.ComboBox.it_it={"previousMessage":"Scelte precedenti","nextMessage":"Altre scelte"};
diff --git a/js/dojo/dijit/nls/dijit-all_it.js b/js/dojo/dijit/nls/dijit-all_it.js
--- a/js/dojo/dijit/nls/dijit-all_it.js
+++ b/js/dojo/dijit/nls/dijit-all_it.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_it");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.it");dojo.nls.colors.it={"lightsteelblue": "blu acciao chiaro", "orangered": "vermiglio", "midnightblue": "blu melanzana scuro", "cadetblue": "verde acqua", "seashell": "sabbia rosa", "slategrey": "grigio ardesia", "coral": "corallo", "darkturquoise": "turchese scuro", "antiquewhite": "bianco antico", "mediumspringgreen": "verde primavera medio", "salmon": "salmone", "darkgrey": "grigio scuro", "ivory": "avorio", "greenyellow": "giallo verde", "mistyrose": "rosa pallido", "lightsalmon": "salmone chiaro", "silver": "grigio 25%", "dimgrey": "grigio 80%", "orange": "arancione", "white": "bianco", "navajowhite": "pesca chiaro", "royalblue": "blu reale", "deeppink": "ciclamino", "lime": "verde fluorescente", "oldlace": "mandorla", "chartreuse": "verde brillante", "darkcyan": "ciano scuro", "yellow": "giallo", "linen": "lino", "olive": "verde oliva", "gold": "oro", "lawngreen": "verde prato", "lightyellow": "giallo chiaro", "tan": "grigio bruno", "darkviolet": "viola scuro", "lightslategrey": "grigio ardesia chiaro", "grey": "grigio", "darkkhaki": "kaki scuro", "green": "verde", "deepskyblue": "azzurro cielo scuro", "aqua": "acqua", "sienna": "cuoio", "mintcream": "bianco nuvola", "rosybrown": "marrone rosato", "mediumslateblue": "blu ardesia medio", "magenta": "magenta", "lightseagreen": "verde mare chiaro", "cyan": "ciano", "olivedrab": "marrone oliva", "darkgoldenrod": "ocra scuro", "slateblue": "blu ardesia", "mediumaquamarine": "acquamarina medio", "lavender": "lavanda", "mediumseagreen": "verde mare medio", "maroon": "scarlatto", "darkslategray": "grigio ardesia scuro", "mediumturquoise": "turchese medio", "ghostwhite": "bianco gesso", "darkblue": "blu scuro", "mediumvioletred": "vinaccia", "brown": "marrone", "lightgray": "grigio chiaro", "sandybrown": "marrone sabbia", "pink": "rosa", "firebrick": "rosso mattone", "indigo": "indaco", "snow": "neve", "darkorchid": "orchidea scuro", "turquoise": "turchese", "chocolate": "cioccolato", "springgreen": "verde primavera", "moccasin": "mocassino", "navy": "blu notte", "lemonchiffon": "caffelatte chiaro", "teal": "verde turchese", "floralwhite": "bianco giglio", "cornflowerblue": "blu fiordaliso", "paleturquoise": "turchese pallido", "purple": "porpora", "gainsboro": "grigio 10%", "plum": "prugna", "red": "rosso", "blue": "blu", "forestgreen": "verde foresta", "darkgreen": "verde scuro", "honeydew": "bianco germoglio", "darkseagreen": "verde mare scuro", "lightcoral": "rosa corallo", "palevioletred": "vinaccia chiaro", "mediumpurple": "porpora medio", "saddlebrown": "cacao", "darkmagenta": "magenta scuro", "thistle": "rosa cenere", "whitesmoke": "bianco fumo", "wheat": "sabbia", "violet": "viola", "lightskyblue": "azzurro cielo chiaro", "goldenrod": "ocra gialla", "mediumblue": "blu medio", "skyblue": "azzurro cielo", "crimson": "cremisi", "darksalmon": "salmone scuro", "darkred": "rosso scuro", "darkslategrey": "grigio ardesia scuro", "peru": "marrone terra bruciata", "lightgrey": "grigio chiaro", "lightgoldenrodyellow": "giallo tenue", "blanchedalmond": "mandorla chiaro", "aliceblue": "blu alice", "bisque": "incarnato", "slategray": "grigio ardesia", "palegoldenrod": "giallo zolfo chiaro", "darkorange": "arancione scuro", "aquamarine": "acquamarina", "lightgreen": "verde chiaro", "burlywood": "tabacco", "dodgerblue": "blu d'oriente", "darkgray": "grigio scuro", "lightcyan": "ciano chiaro", "powderblue": "azzurro polvere", "blueviolet": "blu violetto", "orchid": "orchidea", "dimgray": "grigio 80%", "beige": "beige", "fuchsia": "fucsia", "lavenderblush": "bianco rosato", "hotpink": "rosa acceso", "steelblue": "blu acciao", "tomato": "pomodoro", "lightpink": "rosa chiaro", "limegreen": "verde lime", "indianred": "terra indiana", "papayawhip": "cipria", "lightslategray": "grigio ardesia chiaro", "gray": "grigio", "mediumorchid": "orchidea medio", "cornsilk": "crema", "black": "nero", "seagreen": "verde mare", "darkslateblue": "blu ardesia scuro", "khaki": "kaki", "lightblue": "azzurro", "palegreen": "verde pallido", "azure": "azzurro ghiaccio", "peachpuff": "pesca", "darkolivegreen": "verde oliva scuro", "yellowgreen": "giallo verde"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.it");dijit.nls.loading.it={"loadingState": "Caricamento in corso...", "errorState": "Si è verificato un errore"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.it");dijit.nls.Textarea.it={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.it");dijit._editor.nls.commands.it={"removeFormat": "Rimuovi formato", "copy": "Copia", "paste": "Incolla", "selectAll": "Seleziona tutto", "insertOrderedList": "Elenco numerato", "insertTable": "Inserisci/Modifica tabella", "underline": "Sottolineato", "foreColor": "Colore primo piano", "htmlToggle": "Origine HTML", "formatBlock": "Stile paragrafo", "insertHorizontalRule": "Righello orizzontale", "delete": "Elimina", "insertUnorderedList": "Elenco puntato", "tableProp": "Proprietà tabella", "insertImage": "Inserisci immagine", "superscript": "Apice", "subscript": "Pedice", "createLink": "Crea collegamento", "undo": "Annulla", "italic": "Corsivo", "fontName": "Nome carattere", "justifyLeft": "Allinea a sinistra", "unlink": "Rimuovi collegamento", "toggleTableBorder": "Mostra/Nascondi margine tabella", "fontSize": "Dimensione carattere", "indent": "Rientra", "redo": "Ripristina", "strikethrough": "Barrato", "justifyFull": "Giustifica", "justifyCenter": "Allinea al centro", "hiliteColor": "Colore sfondo", "deleteTable": "Elimina tabella", "outdent": "Rimuovi rientro", "cut": "Taglia", "plainFormatBlock": "Stile paragrafo", "bold": "Grassetto", "systemShortcutFF": "L'azione \"${0}\" è disponibile solo in Mozilla Firefox tramite tasti di scelta rapida. Utilizzare ${1}.", "justifyRight": "Allinea a destra", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.it");dojo.cldr.nls.number.it={"group": ".", "decimal": ",", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencyFormat": "¤ #,##0.00", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.it");dijit.nls.common.it={"buttonCancel": "Annulla", "buttonSave": "Salva", "buttonOk": "OK"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.it");dijit.form.nls.validate.it={"rangeMessage": "* Questo valore non è compreso nell'intervallo.", "invalidMessage": "* Il valore immesso non è valido.", "missingMessage": "* Questo valore è obbligatorio."};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.it");dijit.form.nls.ComboBox.it={"previousMessage": "Scelte precedenti", "nextMessage": "Altre scelte"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.it");dojo.cldr.nls.currency.it={"HKD_displayName": "Dollaro di Hong Kong", "CHF_displayName": "Franco Svizzero", "CHF_symbol": "SFr.", "CAD_displayName": "Dollaro Canadese", "AUD_displayName": "Dollaro Australiano", "JPY_displayName": "Yen Giapponese", "USD_displayName": "Dollaro Statunitense", "GBP_displayName": "Sterlina Inglese", "EUR_displayName": "Euro", "USD_symbol": "$", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.it");dojo.cldr.nls.gregorian.it={"quarters-format-abbreviated": ["T1", "T2", "T3", "T4"], "dateFormat-medium": "dd/MMM/yy", "field-second": "secondo", "field-week": "settimana", "pm": "p.", "months-standAlone-narrow": ["G", "F", "M", "A", "M", "G", "L", "A", "S", "O", "N", "D"], "am": "m.", "days-standAlone-narrow": ["D", "L", "M", "M", "G", "V", "S"], "field-year": "anno", "field-minute": "minuto", "field-hour": "ora", "dateFormat-long": "dd MMMM yyyy", "field-day": "giorno", "field-dayperiod": "periodo del giorno", "field-month": "mese", "dateFormat-short": "dd/MM/yy", "months-format-wide": ["gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"], "field-era": "era", "months-format-abbr": ["gen", "feb", "mar", "apr", "mag", "giu", "lug", "ago", "set", "ott", "nov", "dic"], "days-format-wide": ["domenica", "lunedì", "martedì", "mercoledì", "giovedì", "venerdì", "sabato"], "eraAbbr": ["aC", "dC"], "quarters-format-wide": ["1o trimestre", "2o trimestre", "3o trimestre", "4o trimestre"], "dateFormat-full": "EEEE d MMMM yyyy", "field-weekday": "giorno della settimana", "days-format-abbr": ["dom", "lun", "mar", "mer", "gio", "ven", "sab"], "field-zone": "zona", "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "eraNames": ["BCE", "CE"], "dateTimeFormats-appendItem-Year": "{0} {1}", "timeFormat-full": "HH:mm:ss z", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "timeFormat-medium": "HH:mm:ss", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateTimeFormat": "{1} {0}", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "timeFormat-long": "HH:mm:ss z", "timeFormat-short": "HH:mm", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Era": "{0} {1}"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.it");dijit.nls.Textarea.it={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_it");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.it");dojo.nls.colors.it={"lightsteelblue":"blu acciao chiaro","orangered":"vermiglio","midnightblue":"blu melanzana scuro","cadetblue":"verde acqua","seashell":"sabbia rosa","slategrey":"grigio ardesia","coral":"corallo","darkturquoise":"turchese scuro","antiquewhite":"bianco antico","mediumspringgreen":"verde primavera medio","salmon":"salmone","darkgrey":"grigio scuro","ivory":"avorio","greenyellow":"giallo verde","mistyrose":"rosa pallido","lightsalmon":"salmone chiaro","silver":"grigio 25%","dimgrey":"grigio 80%","orange":"arancione","white":"bianco","navajowhite":"pesca chiaro","royalblue":"blu reale","deeppink":"ciclamino","lime":"verde fluorescente","oldlace":"mandorla","chartreuse":"verde brillante","darkcyan":"ciano scuro","yellow":"giallo","linen":"lino","olive":"verde oliva","gold":"oro","lawngreen":"verde prato","lightyellow":"giallo chiaro","tan":"grigio bruno","darkviolet":"viola scuro","lightslategrey":"grigio ardesia chiaro","grey":"grigio","darkkhaki":"kaki scuro","green":"verde","deepskyblue":"azzurro cielo scuro","aqua":"acqua","sienna":"cuoio","mintcream":"bianco nuvola","rosybrown":"marrone rosato","mediumslateblue":"blu ardesia medio","magenta":"magenta","lightseagreen":"verde mare chiaro","cyan":"ciano","olivedrab":"marrone oliva","darkgoldenrod":"ocra scuro","slateblue":"blu ardesia","mediumaquamarine":"acquamarina medio","lavender":"lavanda","mediumseagreen":"verde mare medio","maroon":"scarlatto","darkslategray":"grigio ardesia scuro","mediumturquoise":"turchese medio","ghostwhite":"bianco gesso","darkblue":"blu scuro","mediumvioletred":"vinaccia","brown":"marrone","lightgray":"grigio chiaro","sandybrown":"marrone sabbia","pink":"rosa","firebrick":"rosso mattone","indigo":"indaco","snow":"neve","darkorchid":"orchidea scuro","turquoise":"turchese","chocolate":"cioccolato","springgreen":"verde primavera","moccasin":"mocassino","navy":"blu notte","lemonchiffon":"caffelatte chiaro","teal":"verde turchese","floralwhite":"bianco giglio","cornflowerblue":"blu fiordaliso","paleturquoise":"turchese pallido","purple":"porpora","gainsboro":"grigio 10%","plum":"prugna","red":"rosso","blue":"blu","forestgreen":"verde foresta","darkgreen":"verde scuro","honeydew":"bianco germoglio","darkseagreen":"verde mare scuro","lightcoral":"rosa corallo","palevioletred":"vinaccia chiaro","mediumpurple":"porpora medio","saddlebrown":"cacao","darkmagenta":"magenta scuro","thistle":"rosa cenere","whitesmoke":"bianco fumo","wheat":"sabbia","violet":"viola","lightskyblue":"azzurro cielo chiaro","goldenrod":"ocra gialla","mediumblue":"blu medio","skyblue":"azzurro cielo","crimson":"cremisi","darksalmon":"salmone scuro","darkred":"rosso scuro","darkslategrey":"grigio ardesia scuro","peru":"marrone terra bruciata","lightgrey":"grigio chiaro","lightgoldenrodyellow":"giallo tenue","blanchedalmond":"mandorla chiaro","aliceblue":"blu alice","bisque":"incarnato","slategray":"grigio ardesia","palegoldenrod":"giallo zolfo chiaro","darkorange":"arancione scuro","aquamarine":"acquamarina","lightgreen":"verde chiaro","burlywood":"tabacco","dodgerblue":"blu d'oriente","darkgray":"grigio scuro","lightcyan":"ciano chiaro","powderblue":"azzurro polvere","blueviolet":"blu violetto","orchid":"orchidea","dimgray":"grigio 80%","beige":"beige","fuchsia":"fucsia","lavenderblush":"bianco rosato","hotpink":"rosa acceso","steelblue":"blu acciao","tomato":"pomodoro","lightpink":"rosa chiaro","limegreen":"verde lime","indianred":"terra indiana","papayawhip":"cipria","lightslategray":"grigio ardesia chiaro","gray":"grigio","mediumorchid":"orchidea medio","cornsilk":"crema","black":"nero","seagreen":"verde mare","darkslateblue":"blu ardesia scuro","khaki":"kaki","lightblue":"azzurro","palegreen":"verde pallido","azure":"azzurro ghiaccio","peachpuff":"pesca","darkolivegreen":"verde oliva scuro","yellowgreen":"giallo verde"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.it");dijit.nls.loading.it={"loadingState":"Caricamento in corso...","errorState":"Si è verificato un errore"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.it");dijit.nls.common.it={"buttonOk":"OK","buttonCancel":"Annulla","buttonSave":"Salva","itemClose":"Chiudi"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.it");dijit._editor.nls.commands.it={"removeFormat":"Rimuovi formato","copy":"Copia","paste":"Incolla","selectAll":"Seleziona tutto","insertOrderedList":"Elenco numerato","insertTable":"Inserisci/Modifica tabella","print":"Stampa","underline":"Sottolinea","foreColor":"Colore primo piano","htmlToggle":"Origine HTML","formatBlock":"Stile paragrafo","newPage":"Nuova pagina","insertHorizontalRule":"Righello orizzontale","delete":"Elimina","insertUnorderedList":"Elenco puntato","tableProp":"Proprietà tabella","insertImage":"Inserisci immagine","superscript":"Apice","subscript":"Pedice","createLink":"Crea collegamento","undo":"Annulla","fullScreen":"Attiva/Disattiva schermo intero","italic":"Corsivo","fontName":"Nome carattere","justifyLeft":"Allinea a sinistra","unlink":"Rimuovi collegamento","toggleTableBorder":"Attiva/Disattiva bordo tabella","viewSource":"Visualizza origine HTML","fontSize":"Dimensione carattere","systemShortcut":"La azione \"${0}\" è disponibile solo nel browser tramite un tasto di scelta rapida. Utilizzare ${1}.","indent":"Rientro","redo":"Ripristina","strikethrough":"Barrato","justifyFull":"Giustifica","justifyCenter":"Allinea al centro","hiliteColor":"Colore sfondo","deleteTable":"Elimina tabella","outdent":"Annulla rientro","cut":"Taglia","plainFormatBlock":"Stile paragrafo","toggleDir":"Attiva/Disattiva direzione","bold":"Grassetto","tabIndent":"Rientro tabulazione","justifyRight":"Allinea a destra","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.it");dojo.cldr.nls.number.it={"decimalFormat":"#,##0.###","group":".","scientificFormat":"#E0","percentFormat":"#,##0%","currencyFormat":"¤ #,##0.00","decimal":",","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","infinity":"∞","list":";","percentSign":"%","minusSign":"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","nan":"NaN","nativeZeroDigit":"0","plusSign":"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","perMille":"‰","patternDigit":"#","currencySpacing-beforeCurrency-insertBetween":" ","exponential":"E"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.it");dijit.form.nls.validate.it={"rangeMessage":"Questo valore non è compreso nell'intervallo.","invalidMessage":"Il valore immesso non è valido.","missingMessage":"Questo valore è obbligatorio."};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.it");dojo.cldr.nls.currency.it={"HKD_displayName":"Dollaro di Hong Kong","CHF_displayName":"Franco Svizzero","CAD_displayName":"Dollaro Canadese","CNY_displayName":"Renmimbi Cinese","AUD_displayName":"Dollaro Australiano","JPY_displayName":"Yen Giapponese","USD_displayName":"Dollaro Statunitense","GBP_displayName":"Sterlina Inglese","EUR_displayName":"Euro","CHF_symbol":"Fr.","JPY_symbol":"JP¥","HKD_symbol":"HK$","USD_symbol":"US$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.it");dojo.cldr.nls.gregorian.it={"dateFormatItem-yM":"M/yyyy","field-dayperiod":"periodo del giorno","dateFormatItem-yQ":"Q-yyyy","field-minute":"minuto","eraNames":["a.C.","d.C"],"dateFormatItem-MMMEd":"EEE d MMM","field-weekday":"giorno della settimana","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-MMdd":"dd/MM","days-standAlone-wide":["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],"dateFormatItem-MMM":"LLL","months-standAlone-narrow":["G","F","M","A","M","G","L","A","S","O","N","D"],"field-era":"era","field-hour":"ora","dateFormatItem-hhmm":"hh.mm a","quarters-standAlone-abbr":["T1","T2","T3","T4"],"dateFormatItem-y":"y","timeFormat-full":"HH.mm.ss zzzz","months-standAlone-abbr":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],"dateFormatItem-yMMM":"MMM y","days-standAlone-narrow":["D","L","M","M","G","V","S"],"eraAbbr":["aC","dC"],"dateFormatItem-yyyyMMMM":"MMMM y","dateFormat-long":"dd MMMM y","timeFormat-medium":"HH.mm.ss","field-zone":"zona","dateFormatItem-Hm":"HH:mm","dateFormatItem-yyMM":"MM/yy","dateFormat-medium":"dd/MMM/y","dateFormatItem-yyQQQQ":"QQQQ yy","quarters-standAlone-wide":["1o trimestre","2o trimestre","3o trimestre","4o trimestre"],"dateFormatItem-yMMMM":"MMMM y","dateFormatItem-ms":"mm:ss","field-year":"anno","quarters-standAlone-narrow":["1","2","3","4"],"dateFormatItem-HHmmss":"HH.mm.ss","months-standAlone-wide":["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],"field-week":"settimana","dateFormatItem-MMMMEd":"EEE d MMMM","dateFormatItem-MMMd":"d MMM","dateFormatItem-HHmm":"HH.mm","dateFormatItem-yyQ":"Q yy","timeFormat-long":"HH.mm.ss z","months-format-abbr":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],"timeFormat-short":"HH.mm","field-month":"mese","quarters-format-abbr":["T1","T2","T3","T4"],"dateFormatItem-MMMMd":"d MMMM","days-format-abbr":["dom","lun","mar","mer","gio","ven","sab"],"dateFormatItem-MMMMdd":"dd MMMM","pm":"p.","dateFormatItem-M":"L","days-format-narrow":["D","L","M","M","G","V","S"],"field-second":"secondo","field-day":"giorno","dateFormatItem-MEd":"EEE d/M","months-format-narrow":["G","F","M","A","M","G","L","A","S","O","N","D"],"dateFormatItem-hhmmss":"hh.mm.ss a","am":"m.","days-standAlone-abbr":["dom","lun","mar","mer","gio","ven","sab"],"dateFormat-short":"dd/MM/yy","dateFormatItem-yMMMEd":"EEE d MMM y","dateFormat-full":"EEEE d MMMM y","dateFormatItem-Md":"d/M","dateFormatItem-yMEd":"EEE, d-M-yyyy","months-format-wide":["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],"dateFormatItem-d":"d","quarters-format-wide":["1o trimestre","2o trimestre","3o trimestre","4o trimestre"],"days-format-wide":["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],"eraNarrow":["aC","dC"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d EEE","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","dateTimeFormat-full":"{1} {0}","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.it");dijit.form.nls.ComboBox.it={"previousMessage":"Scelte precedenti","nextMessage":"Altre scelte"};
diff --git a/js/dojo/dijit/nls/dijit-all_ja-jp.js b/js/dojo/dijit/nls/dijit-all_ja-jp.js
--- a/js/dojo/dijit/nls/dijit-all_ja-jp.js
+++ b/js/dojo/dijit/nls/dijit-all_ja-jp.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_ja-jp");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.ja_jp");dojo.nls.colors.ja_jp={"lightsteelblue": "ライト・スチール・ブルー", "orangered": "オレンジ・レッド", "midnightblue": "ミッドナイト・ブルー", "cadetblue": "くすんだ青", "seashell": "シーシェル", "slategrey": "スレート・グレイ", "coral": "珊瑚", "darkturquoise": "ダーク・ターコイズ", "antiquewhite": "アンティーク・ホワイト", "mediumspringgreen": "ミディアム・スプリング・グリーン", "salmon": "サーモン", "darkgrey": "ダーク・グレイ", "ivory": "アイボリー", "greenyellow": "緑黄色", "mistyrose": "ミスティ・ローズ", "lightsalmon": "ライト・サーモン", "silver": "銀", "dimgrey": "くすんだグレイ", "orange": "オレンジ", "white": "白", "navajowhite": "ナバホ・ホワイト", "royalblue": "藤色", "deeppink": "濃いピンク", "lime": "ライム", "oldlace": "オールド・レイス", "chartreuse": "淡黄緑", "darkcyan": "ダーク・シアン・ブルー", "yellow": "黄", "linen": "亜麻色", "olive": "オリーブ", "gold": "金", "lawngreen": "ローン・グリーン", "lightyellow": "ライト・イエロー", "tan": "茶褐色", "darkviolet": "ダーク・バイオレット", "lightslategrey": "ライト・スレート・グレイ", "grey": "グレイ", "darkkhaki": "ダーク・カーキー", "green": "緑", "deepskyblue": "濃い空色", "aqua": "アクア", "sienna": "黄褐色", "mintcream": "ミント・クリーム", "rosybrown": "ロージー・ブラウン", "mediumslateblue": "ミディアム・スレート・ブルー", "magenta": "赤紫", "lightseagreen": "ライト・シー・グリーン", "cyan": "シアン・ブルー", "olivedrab": "濃黄緑", "darkgoldenrod": "ダーク・ゴールデン・ロッド", "slateblue": "スレート・ブルー", "mediumaquamarine": "ミディアム・アクアマリーン", "lavender": "ラベンダー", "mediumseagreen": "ミディアム・シー・グリーン", "maroon": "えび茶", "darkslategray": "ダーク・スレート・グレイ", "mediumturquoise": "ミディアム・ターコイズ", "ghostwhite": "ゴースト・ホワイト", "darkblue": "ダーク・ブルー", "mediumvioletred": "ミディアム・バイオレット・レッド", "brown": "茶", "lightgray": "ライト・グレイ", "sandybrown": "砂褐色", "pink": "ピンク", "firebrick": "赤煉瓦色", "indigo": "藍色", "snow": "雪色", "darkorchid": "ダーク・オーキッド", "turquoise": "ターコイズ", "chocolate": "チョコレート", "springgreen": "スプリング・グリーン", "moccasin": "モカシン", "navy": "濃紺", "lemonchiffon": "レモン・シフォン", "teal": "ティール", "floralwhite": "フローラル・ホワイト", "cornflowerblue": "コーンフラワー・ブルー", "paleturquoise": "ペイル・ターコイズ", "purple": "紫", "gainsboro": "ゲインズボーロ", "plum": "深紫", "red": "赤", "blue": "青", "forestgreen": "フォレスト・グリーン", "darkgreen": "ダーク・グリーン", "honeydew": "ハニーデュー", "darkseagreen": "ダーク・シー・グリーン", "lightcoral": "ライト・コーラル", "palevioletred": "ペイル・バイオレット・レッド", "mediumpurple": "ミディアム・パープル", "saddlebrown": "サドル・ブラウン", "darkmagenta": "ダーク・マジェンタ", "thistle": "シスル", "whitesmoke": "ホワイト・スモーク", "wheat": "小麦色", "violet": "すみれ色", "lightskyblue": "ライト・スカイ・ブルー", "goldenrod": "ゴールデン・ロッド", "mediumblue": "ミディアム・ブルー", "skyblue": "スカイ・ブルー", "crimson": "深紅", "darksalmon": "ダーク・サーモン", "darkred": "ダーク・レッド", "darkslategrey": "ダーク・スレート・グレイ", "peru": "ペルー", "lightgrey": "ライト・グレイ", "lightgoldenrodyellow": "ライト・ゴールデン・ロッド・イエロー", "blanchedalmond": "皮なしアーモンド", "aliceblue": "アリス・ブルー", "bisque": "ビスク", "slategray": "スレート・グレイ", "palegoldenrod": "ペイル・ゴールデン・ロッド", "darkorange": "ダーク・オレンジ", "aquamarine": "碧緑", "lightgreen": "ライト・グリーン", "burlywood": "バーリーウッド", "dodgerblue": "ドッジャー・ブルー", "darkgray": "ダーク・グレイ", "lightcyan": "ライト・シアン", "powderblue": "淡青", "blueviolet": "青紫", "orchid": "薄紫", "dimgray": "くすんだグレイ", "beige": "ベージュ", "fuchsia": "紫紅色", "lavenderblush": "ラベンダー・ブラッシ", "hotpink": "ホット・ピンク", "steelblue": "鋼色", "tomato": "トマト色", "lightpink": "ライト・ピンク", "limegreen": "ライム・グリーン", "indianred": "インディアン・レッド", "papayawhip": "パパイア・ホイップ", "lightslategray": "ライト・スレート・グレイ", "gray": "グレイ", "mediumorchid": "ミディアム・オーキッド", "cornsilk": "コーンシルク", "black": "黒", "seagreen": "シー・グリーン", "darkslateblue": "ダーク・スレート・ブルー", "khaki": "カーキー", "lightblue": "ライト・ブルー", "palegreen": "ペイル・グリーン", "azure": "薄い空色", "peachpuff": "ピーチ・パフ", "darkolivegreen": "ダーク・オリーブ・グリーン", "yellowgreen": "黄緑"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.ja_jp");dijit.nls.loading.ja_jp={"loadingState": "ロード中...", "errorState": "エラーが発生しました。"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.ja_jp");dijit.nls.Textarea.ja_jp={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.ja_jp");dijit._editor.nls.commands.ja_jp={"removeFormat": "形式の除去", "copy": "コピー", "paste": "貼り付け", "selectAll": "すべて選択", "insertOrderedList": "番号付きリスト", "insertTable": "テーブルの挿入/編集", "underline": "下線", "foreColor": "前景色", "htmlToggle": "HTML ソース", "formatBlock": "段落スタイル", "insertHorizontalRule": "水平罫線", "delete": "削除", "insertUnorderedList": "黒丸付きリスト", "tableProp": "テーブル・プロパティー", "insertImage": "イメージの挿入", "superscript": "上付き文字", "subscript": "下付き文字", "createLink": "リンクの作成", "undo": "元に戻す", "italic": "イタリック", "fontName": "フォント名", "justifyLeft": "左揃え", "unlink": "リンクの除去", "toggleTableBorder": "テーブル・ボーダーの切り替え", "fontSize": "フォント・サイズ", "indent": "インデント", "redo": "やり直し", "strikethrough": "取り消し線", "justifyFull": "両端揃え", "justifyCenter": "中央揃え", "hiliteColor": "背景色", "deleteTable": "テーブルの削除", "outdent": "アウトデント", "cut": "切り取り", "plainFormatBlock": "段落スタイル", "bold": "太字", "systemShortcutFF": "\"${0}\" アクションは、キーボード・ショートカットを使用して Mozilla Firefox でのみ使用できます。${1} を使用してください。", "justifyRight": "右揃え", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.ja_jp");dojo.cldr.nls.number.ja_jp={"currencyFormat": "¤#,##0.00", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.ja_jp");dijit.nls.common.ja_jp={"buttonCancel": "キャンセル", "buttonSave": "保存", "buttonOk": "OK"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.ja_jp");dijit.form.nls.validate.ja_jp={"rangeMessage": "* この値は範囲外です。", "invalidMessage": "* 入力した値は無効です。", "missingMessage": "* この値は必須です。"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.ja_jp");dijit.form.nls.ComboBox.ja_jp={"previousMessage": "以前の選択項目", "nextMessage": "追加の選択項目"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.ja_jp");dojo.cldr.nls.currency.ja_jp={"HKD_displayName": "香港ドル", "CHF_displayName": "スイス フラン", "JPY_symbol": "¥", "CAD_displayName": "カナダ ドル", "AUD_displayName": "オーストラリア ドル", "JPY_displayName": "日本円", "USD_displayName": "米ドル", "GBP_displayName": "英国ポンド", "EUR_displayName": "ユーロ", "USD_symbol": "$", "GBP_symbol": "£", "EUR_symbol": "€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.ja_jp");dojo.cldr.nls.gregorian.ja_jp={"eraNames": ["紀元前", "西暦"], "timeFormat-full": "H'時'mm'分'ss'秒'z", "timeFormat-medium": "H:mm:ss", "eraAbbr": ["紀元前", "西暦"], "dateFormat-medium": "yyyy/MM/dd", "am": "午前", "months-format-abbr": ["1 月", "2 月", "3 月", "4 月", "5 月", "6 月", "7 月", "8 月", "9 月", "10 月", "11 月", "12 月"], "dateFormat-full": "yyyy'年'M'月'd'日'EEEE", "days-format-abbr": ["日", "月", "火", "水", "木", "金", "土"], "timeFormat-long": "H:mm:ss:z", "quarters-format-wide": ["第 1 四半期", "第 2 四半期", "第 3 四半期", "第 4 四半期"], "pm": "午後", "timeFormat-short": "H:mm", "months-format-wide": ["1 月", "2 月", "3 月", "4 月", "5 月", "6 月", "7 月", "8 月", "9 月", "10 月", "11 月", "12 月"], "days-standAlone-narrow": ["日", "月", "火", "水", "木", "金", "土"], "dateFormat-long": "yyyy'年'M'月'd'日'", "days-format-wide": ["日曜日", "月曜日", "火曜日", "水曜日", "木曜日", "金曜日", "土曜日"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "field-weekday": "Day of the Week", "months-standAlone-narrow": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateFormat-short": "yy/MM/dd", "dateTimeFormats-appendItem-Era": "{0} {1}"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.ja_jp");dijit.nls.Textarea.ja_jp={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_ja-jp");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.ja_jp");dojo.nls.colors.ja_jp={"lightsteelblue":"ライト・スチール・ブルー","orangered":"オレンジ・レッド","midnightblue":"ミッドナイト・ブルー","cadetblue":"くすんだ青","seashell":"シーシェル","slategrey":"スレート・グレイ","coral":"珊瑚","darkturquoise":"ダーク・ターコイズ","antiquewhite":"アンティーク・ホワイト","mediumspringgreen":"ミディアム・スプリング・グリーン","salmon":"サーモン","darkgrey":"ダーク・グレイ","ivory":"アイボリー","greenyellow":"緑黄色","mistyrose":"ミスティ・ローズ","lightsalmon":"ライト・サーモン","silver":"銀","dimgrey":"くすんだグレイ","orange":"オレンジ","white":"白","navajowhite":"ナバホ・ホワイト","royalblue":"藤色","deeppink":"濃いピンク","lime":"ライム","oldlace":"オールド・レイス","chartreuse":"淡黄緑","darkcyan":"ダーク・シアン・ブルー","yellow":"黄","linen":"亜麻色","olive":"オリーブ","gold":"金","lawngreen":"ローン・グリーン","lightyellow":"ライト・イエロー","tan":"茶褐色","darkviolet":"ダーク・バイオレット","lightslategrey":"ライト・スレート・グレイ","grey":"グレイ","darkkhaki":"ダーク・カーキー","green":"緑","deepskyblue":"濃い空色","aqua":"アクア","sienna":"黄褐色","mintcream":"ミント・クリーム","rosybrown":"ロージー・ブラウン","mediumslateblue":"ミディアム・スレート・ブルー","magenta":"赤紫","lightseagreen":"ライト・シー・グリーン","cyan":"シアン・ブルー","olivedrab":"濃黄緑","darkgoldenrod":"ダーク・ゴールデン・ロッド","slateblue":"スレート・ブルー","mediumaquamarine":"ミディアム・アクアマリーン","lavender":"ラベンダー","mediumseagreen":"ミディアム・シー・グリーン","maroon":"えび茶","darkslategray":"ダーク・スレート・グレイ","mediumturquoise":"ミディアム・ターコイズ","ghostwhite":"ゴースト・ホワイト","darkblue":"ダーク・ブルー","mediumvioletred":"ミディアム・バイオレット・レッド","brown":"茶","lightgray":"ライト・グレイ","sandybrown":"砂褐色","pink":"ピンク","firebrick":"赤煉瓦色","indigo":"藍色","snow":"雪色","darkorchid":"ダーク・オーキッド","turquoise":"ターコイズ","chocolate":"チョコレート","springgreen":"スプリング・グリーン","moccasin":"モカシン","navy":"濃紺","lemonchiffon":"レモン・シフォン","teal":"ティール","floralwhite":"フローラル・ホワイト","cornflowerblue":"コーンフラワー・ブルー","paleturquoise":"ペイル・ターコイズ","purple":"紫","gainsboro":"ゲインズボーロ","plum":"深紫","red":"赤","blue":"青","forestgreen":"フォレスト・グリーン","darkgreen":"ダーク・グリーン","honeydew":"ハニーデュー","darkseagreen":"ダーク・シー・グリーン","lightcoral":"ライト・コーラル","palevioletred":"ペイル・バイオレット・レッド","mediumpurple":"ミディアム・パープル","saddlebrown":"サドル・ブラウン","darkmagenta":"ダーク・マジェンタ","thistle":"シスル","whitesmoke":"ホワイト・スモーク","wheat":"小麦色","violet":"すみれ色","lightskyblue":"ライト・スカイ・ブルー","goldenrod":"ゴールデン・ロッド","mediumblue":"ミディアム・ブルー","skyblue":"スカイ・ブルー","crimson":"深紅","darksalmon":"ダーク・サーモン","darkred":"ダーク・レッド","darkslategrey":"ダーク・スレート・グレイ","peru":"ペルー","lightgrey":"ライト・グレイ","lightgoldenrodyellow":"ライト・ゴールデン・ロッド・イエロー","blanchedalmond":"皮なしアーモンド","aliceblue":"アリス・ブルー","bisque":"ビスク","slategray":"スレート・グレイ","palegoldenrod":"ペイル・ゴールデン・ロッド","darkorange":"ダーク・オレンジ","aquamarine":"碧緑","lightgreen":"ライト・グリーン","burlywood":"バーリーウッド","dodgerblue":"ドッジャー・ブルー","darkgray":"ダーク・グレイ","lightcyan":"ライト・シアン","powderblue":"淡青","blueviolet":"青紫","orchid":"薄紫","dimgray":"くすんだグレイ","beige":"ベージュ","fuchsia":"紫紅色","lavenderblush":"ラベンダー・ブラッシ","hotpink":"ホット・ピンク","steelblue":"鋼色","tomato":"トマト色","lightpink":"ライト・ピンク","limegreen":"ライム・グリーン","indianred":"インディアン・レッド","papayawhip":"パパイア・ホイップ","lightslategray":"ライト・スレート・グレイ","gray":"グレイ","mediumorchid":"ミディアム・オーキッド","cornsilk":"コーンシルク","black":"黒","seagreen":"シー・グリーン","darkslateblue":"ダーク・スレート・ブルー","khaki":"カーキー","lightblue":"ライト・ブルー","palegreen":"ペイル・グリーン","azure":"薄い空色","peachpuff":"ピーチ・パフ","darkolivegreen":"ダーク・オリーブ・グリーン","yellowgreen":"黄緑"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.ja_jp");dijit.nls.loading.ja_jp={"loadingState":"ロード中...","errorState":"エラーが発生しました。"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.ja_jp");dijit.nls.common.ja_jp={"buttonOk":"OK","buttonCancel":"キャンセル","buttonSave":"保存","itemClose":"閉じる"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.ja_jp");dijit._editor.nls.commands.ja_jp={"removeFormat":"形式の除去","copy":"コピー","paste":"貼り付け","selectAll":"すべて選択","insertOrderedList":"番号付きリスト","insertTable":"テーブルの挿入/編集","print":"印刷","underline":"下線","foreColor":"前景色","htmlToggle":"HTML ソース","formatBlock":"段落スタイル","newPage":"改ページ","insertHorizontalRule":"水平罫線","delete":"削除","insertUnorderedList":"黒丸付きリスト","tableProp":"テーブル・プロパティー","insertImage":"イメージの挿入","superscript":"上付き文字","subscript":"下付き文字","createLink":"リンクの作成","undo":"元に戻す","fullScreen":"フルスクリーンの切り替え","italic":"イタリック","fontName":"フォント名","justifyLeft":"左揃え","unlink":"リンクの除去","toggleTableBorder":"テーブル・ボーダーの切り替え","viewSource":"HTML ソースの表示","fontSize":"フォント・サイズ","systemShortcut":"\"${0}\" アクションは、キーボード・ショートカットを使用して、ブラウザーでのみ使用できます。${1} を使用します。","indent":"インデント","redo":"やり直し","strikethrough":"取り消し線","justifyFull":"両端揃え","justifyCenter":"中央揃え","hiliteColor":"背景色","deleteTable":"テーブルの削除","outdent":"アウトデント","cut":"切り取り","plainFormatBlock":"段落スタイル","toggleDir":"方向の切り替え","bold":"太字","tabIndent":"タブ・インデント","justifyRight":"右揃え","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.ja_jp");dojo.cldr.nls.number.ja_jp={"currencyFormat":"¤#,##0.00","decimalFormat":"#,##0.###","group":",","scientificFormat":"#E0","percentFormat":"#,##0%","decimal":".","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","infinity":"∞","list":";","percentSign":"%","minusSign":"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","nan":"NaN","nativeZeroDigit":"0","plusSign":"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","perMille":"‰","patternDigit":"#","currencySpacing-beforeCurrency-insertBetween":" ","exponential":"E"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.ja_jp");dijit.form.nls.validate.ja_jp={"rangeMessage":"この値は範囲外です。","invalidMessage":"入力した値は無効です。","missingMessage":"この値は必須です。"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.ja_jp");dojo.cldr.nls.currency.ja_jp={"HKD_displayName":"香港ドル","CHF_displayName":"スイス フラン","JPY_symbol":"¥","CAD_displayName":"カナダ ドル","CNY_displayName":"中国人民元","USD_symbol":"$","AUD_displayName":"オーストラリア ドル","JPY_displayName":"日本円","USD_displayName":"米ドル","CNY_symbol":"元","GBP_displayName":"英国ポンド","EUR_displayName":"ユーロ","CHF_symbol":"Fr.","HKD_symbol":"HK$","CAD_symbol":"CA$","EUR_symbol":"€","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.ja_jp");dojo.cldr.nls.gregorian.ja_jp={"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"曜日","dateFormatItem-yQQQ":"yQQQ","dateFormatItem-yMEd":"y/M/d(EEE)","dateFormatItem-MMMEd":"M月d日(E)","eraNarrow":["紀元前","西暦"],"dateFormat-long":"y年M月d日","months-format-wide":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"dateTimeFormat-medium":"{1} {0}","dateFormat-full":"y年M月d日EEEE","dateFormatItem-Md":"M/d","dateFormatItem-yMd":"y/M/d","field-era":"時代","dateFormatItem-yM":"y/M","months-standAlone-wide":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"timeFormat-short":"H:mm","quarters-format-wide":["第1四半期","第2四半期","第3四半期","第4四半期"],"timeFormat-long":"HH:mm:ss z","field-year":"年","dateFormatItem-yMMM":"y年M月","dateFormatItem-yQ":"y/Q","field-hour":"時","dateFormatItem-MMdd":"MM/dd","months-format-abbr":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"dateFormatItem-yyQ":"yy/Q","timeFormat-full":"H時mm分ss秒 zzzz","am":"午前","dateFormatItem-H":"H時","months-standAlone-abbr":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["第1四半期","第2四半期","第3四半期","第4四半期"],"dateFormatItem-M":"L","days-standAlone-wide":["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],"dateFormatItem-MMMMd":"M月d日","dateFormatItem-yyMMM":"y年M月","timeFormat-medium":"H:mm:ss","dateFormatItem-Hm":"H:mm","eraAbbr":["紀元前","西暦"],"field-minute":"分","field-dayperiod":"午前/午後","days-standAlone-abbr":["日","月","火","水","木","金","土"],"dateFormatItem-d":"d日","dateFormatItem-ms":"mm:ss","dateTimeFormat-long":"{1}{0}","dateFormatItem-MMMd":"M月d日","dateFormatItem-MEd":"M/d(E)","dateTimeFormat-full":"{1}{0}","dateFormatItem-yMMMM":"y年M月","field-day":"日","days-format-wide":["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],"field-zone":"タイムゾーン","dateFormatItem-yyyyMM":"yyyy/MM","dateFormatItem-y":"y","months-standAlone-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"dateFormatItem-hm":"ah:mm","dateFormatItem-GGGGyMd":"GGGGy年M月d日","days-format-abbr":["日","月","火","水","木","金","土"],"dateFormatItem-yMMMd":"y年M月d日","eraNames":["紀元前","西暦"],"days-format-narrow":["日","月","火","水","木","金","土"],"field-month":"月","days-standAlone-narrow":["日","月","火","水","木","金","土"],"dateFormatItem-MMM":"LLL","pm":"午後","dateFormatItem-MMMMEd":"M月d日(E)","dateFormat-short":"yy/MM/dd","field-second":"秒","dateFormatItem-yMMMEd":"y年M月d日(EEE)","dateFormatItem-Ed":"d日(EEE)","field-week":"週","dateFormat-medium":"yyyy/MM/dd","dateTimeFormat-short":"{1} {0}","dateFormatItem-hms":"ah:mm:ss","dateFormatItem-yyyy":"y年","months-format-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormatItem-EEEd":"d EEE","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Hms":"H:mm:ss"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.ja_jp");dijit.form.nls.ComboBox.ja_jp={"previousMessage":"以前の選択項目","nextMessage":"追加の選択項目"};
diff --git a/js/dojo/dijit/nls/dijit-all_ja.js b/js/dojo/dijit/nls/dijit-all_ja.js
--- a/js/dojo/dijit/nls/dijit-all_ja.js
+++ b/js/dojo/dijit/nls/dijit-all_ja.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_ja");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.ja");dojo.nls.colors.ja={"lightsteelblue": "ライト・スチール・ブルー", "orangered": "オレンジ・レッド", "midnightblue": "ミッドナイト・ブルー", "cadetblue": "くすんだ青", "seashell": "シーシェル", "slategrey": "スレート・グレイ", "coral": "珊瑚", "darkturquoise": "ダーク・ターコイズ", "antiquewhite": "アンティーク・ホワイト", "mediumspringgreen": "ミディアム・スプリング・グリーン", "salmon": "サーモン", "darkgrey": "ダーク・グレイ", "ivory": "アイボリー", "greenyellow": "緑黄色", "mistyrose": "ミスティ・ローズ", "lightsalmon": "ライト・サーモン", "silver": "銀", "dimgrey": "くすんだグレイ", "orange": "オレンジ", "white": "白", "navajowhite": "ナバホ・ホワイト", "royalblue": "藤色", "deeppink": "濃いピンク", "lime": "ライム", "oldlace": "オールド・レイス", "chartreuse": "淡黄緑", "darkcyan": "ダーク・シアン・ブルー", "yellow": "黄", "linen": "亜麻色", "olive": "オリーブ", "gold": "金", "lawngreen": "ローン・グリーン", "lightyellow": "ライト・イエロー", "tan": "茶褐色", "darkviolet": "ダーク・バイオレット", "lightslategrey": "ライト・スレート・グレイ", "grey": "グレイ", "darkkhaki": "ダーク・カーキー", "green": "緑", "deepskyblue": "濃い空色", "aqua": "アクア", "sienna": "黄褐色", "mintcream": "ミント・クリーム", "rosybrown": "ロージー・ブラウン", "mediumslateblue": "ミディアム・スレート・ブルー", "magenta": "赤紫", "lightseagreen": "ライト・シー・グリーン", "cyan": "シアン・ブルー", "olivedrab": "濃黄緑", "darkgoldenrod": "ダーク・ゴールデン・ロッド", "slateblue": "スレート・ブルー", "mediumaquamarine": "ミディアム・アクアマリーン", "lavender": "ラベンダー", "mediumseagreen": "ミディアム・シー・グリーン", "maroon": "えび茶", "darkslategray": "ダーク・スレート・グレイ", "mediumturquoise": "ミディアム・ターコイズ", "ghostwhite": "ゴースト・ホワイト", "darkblue": "ダーク・ブルー", "mediumvioletred": "ミディアム・バイオレット・レッド", "brown": "茶", "lightgray": "ライト・グレイ", "sandybrown": "砂褐色", "pink": "ピンク", "firebrick": "赤煉瓦色", "indigo": "藍色", "snow": "雪色", "darkorchid": "ダーク・オーキッド", "turquoise": "ターコイズ", "chocolate": "チョコレート", "springgreen": "スプリング・グリーン", "moccasin": "モカシン", "navy": "濃紺", "lemonchiffon": "レモン・シフォン", "teal": "ティール", "floralwhite": "フローラル・ホワイト", "cornflowerblue": "コーンフラワー・ブルー", "paleturquoise": "ペイル・ターコイズ", "purple": "紫", "gainsboro": "ゲインズボーロ", "plum": "深紫", "red": "赤", "blue": "青", "forestgreen": "フォレスト・グリーン", "darkgreen": "ダーク・グリーン", "honeydew": "ハニーデュー", "darkseagreen": "ダーク・シー・グリーン", "lightcoral": "ライト・コーラル", "palevioletred": "ペイル・バイオレット・レッド", "mediumpurple": "ミディアム・パープル", "saddlebrown": "サドル・ブラウン", "darkmagenta": "ダーク・マジェンタ", "thistle": "シスル", "whitesmoke": "ホワイト・スモーク", "wheat": "小麦色", "violet": "すみれ色", "lightskyblue": "ライト・スカイ・ブルー", "goldenrod": "ゴールデン・ロッド", "mediumblue": "ミディアム・ブルー", "skyblue": "スカイ・ブルー", "crimson": "深紅", "darksalmon": "ダーク・サーモン", "darkred": "ダーク・レッド", "darkslategrey": "ダーク・スレート・グレイ", "peru": "ペルー", "lightgrey": "ライト・グレイ", "lightgoldenrodyellow": "ライト・ゴールデン・ロッド・イエロー", "blanchedalmond": "皮なしアーモンド", "aliceblue": "アリス・ブルー", "bisque": "ビスク", "slategray": "スレート・グレイ", "palegoldenrod": "ペイル・ゴールデン・ロッド", "darkorange": "ダーク・オレンジ", "aquamarine": "碧緑", "lightgreen": "ライト・グリーン", "burlywood": "バーリーウッド", "dodgerblue": "ドッジャー・ブルー", "darkgray": "ダーク・グレイ", "lightcyan": "ライト・シアン", "powderblue": "淡青", "blueviolet": "青紫", "orchid": "薄紫", "dimgray": "くすんだグレイ", "beige": "ベージュ", "fuchsia": "紫紅色", "lavenderblush": "ラベンダー・ブラッシ", "hotpink": "ホット・ピンク", "steelblue": "鋼色", "tomato": "トマト色", "lightpink": "ライト・ピンク", "limegreen": "ライム・グリーン", "indianred": "インディアン・レッド", "papayawhip": "パパイア・ホイップ", "lightslategray": "ライト・スレート・グレイ", "gray": "グレイ", "mediumorchid": "ミディアム・オーキッド", "cornsilk": "コーンシルク", "black": "黒", "seagreen": "シー・グリーン", "darkslateblue": "ダーク・スレート・ブルー", "khaki": "カーキー", "lightblue": "ライト・ブルー", "palegreen": "ペイル・グリーン", "azure": "薄い空色", "peachpuff": "ピーチ・パフ", "darkolivegreen": "ダーク・オリーブ・グリーン", "yellowgreen": "黄緑"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.ja");dijit.nls.loading.ja={"loadingState": "ロード中...", "errorState": "エラーが発生しました。"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.ja");dijit.nls.Textarea.ja={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.ja");dijit._editor.nls.commands.ja={"removeFormat": "形式の除去", "copy": "コピー", "paste": "貼り付け", "selectAll": "すべて選択", "insertOrderedList": "番号付きリスト", "insertTable": "テーブルの挿入/編集", "underline": "下線", "foreColor": "前景色", "htmlToggle": "HTML ソース", "formatBlock": "段落スタイル", "insertHorizontalRule": "水平罫線", "delete": "削除", "insertUnorderedList": "黒丸付きリスト", "tableProp": "テーブル・プロパティー", "insertImage": "イメージの挿入", "superscript": "上付き文字", "subscript": "下付き文字", "createLink": "リンクの作成", "undo": "元に戻す", "italic": "イタリック", "fontName": "フォント名", "justifyLeft": "左揃え", "unlink": "リンクの除去", "toggleTableBorder": "テーブル・ボーダーの切り替え", "fontSize": "フォント・サイズ", "indent": "インデント", "redo": "やり直し", "strikethrough": "取り消し線", "justifyFull": "両端揃え", "justifyCenter": "中央揃え", "hiliteColor": "背景色", "deleteTable": "テーブルの削除", "outdent": "アウトデント", "cut": "切り取り", "plainFormatBlock": "段落スタイル", "bold": "太字", "systemShortcutFF": "\"${0}\" アクションは、キーボード・ショートカットを使用して Mozilla Firefox でのみ使用できます。${1} を使用してください。", "justifyRight": "右揃え", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.ja");dojo.cldr.nls.number.ja={"scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencyFormat": "¤ #,##0.00", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.ja");dijit.nls.common.ja={"buttonCancel": "キャンセル", "buttonSave": "保存", "buttonOk": "OK"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.ja");dijit.form.nls.validate.ja={"rangeMessage": "* この値は範囲外です。", "invalidMessage": "* 入力した値は無効です。", "missingMessage": "* この値は必須です。"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.ja");dijit.form.nls.ComboBox.ja={"previousMessage": "以前の選択項目", "nextMessage": "追加の選択項目"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.ja");dojo.cldr.nls.currency.ja={"HKD_displayName": "香港ドル", "CHF_displayName": "スイス フラン", "JPY_symbol": "¥", "CAD_displayName": "カナダ ドル", "AUD_displayName": "オーストラリア ドル", "JPY_displayName": "日本円", "USD_displayName": "米ドル", "GBP_displayName": "英国ポンド", "EUR_displayName": "ユーロ", "USD_symbol": "$", "GBP_symbol": "£", "EUR_symbol": "€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.ja");dojo.cldr.nls.gregorian.ja={"eraNames": ["紀元前", "西暦"], "timeFormat-full": "H'時'mm'分'ss'秒'z", "timeFormat-medium": "H:mm:ss", "eraAbbr": ["紀元前", "西暦"], "dateFormat-medium": "yyyy/MM/dd", "am": "午前", "months-format-abbr": ["1 月", "2 月", "3 月", "4 月", "5 月", "6 月", "7 月", "8 月", "9 月", "10 月", "11 月", "12 月"], "dateFormat-full": "yyyy'年'M'月'd'日'EEEE", "days-format-abbr": ["日", "月", "火", "水", "木", "金", "土"], "timeFormat-long": "H:mm:ss:z", "quarters-format-wide": ["第 1 四半期", "第 2 四半期", "第 3 四半期", "第 4 四半期"], "pm": "午後", "timeFormat-short": "H:mm", "months-format-wide": ["1 月", "2 月", "3 月", "4 月", "5 月", "6 月", "7 月", "8 月", "9 月", "10 月", "11 月", "12 月"], "days-standAlone-narrow": ["日", "月", "火", "水", "木", "金", "土"], "dateFormat-long": "yyyy'年'M'月'd'日'", "days-format-wide": ["日曜日", "月曜日", "火曜日", "水曜日", "木曜日", "金曜日", "土曜日"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "field-weekday": "Day of the Week", "months-standAlone-narrow": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateFormat-short": "yy/MM/dd", "dateTimeFormats-appendItem-Era": "{0} {1}"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.ja");dijit.nls.Textarea.ja={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_ja");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.ja");dojo.nls.colors.ja={"lightsteelblue":"ライト・スチール・ブルー","orangered":"オレンジ・レッド","midnightblue":"ミッドナイト・ブルー","cadetblue":"くすんだ青","seashell":"シーシェル","slategrey":"スレート・グレイ","coral":"珊瑚","darkturquoise":"ダーク・ターコイズ","antiquewhite":"アンティーク・ホワイト","mediumspringgreen":"ミディアム・スプリング・グリーン","salmon":"サーモン","darkgrey":"ダーク・グレイ","ivory":"アイボリー","greenyellow":"緑黄色","mistyrose":"ミスティ・ローズ","lightsalmon":"ライト・サーモン","silver":"銀","dimgrey":"くすんだグレイ","orange":"オレンジ","white":"白","navajowhite":"ナバホ・ホワイト","royalblue":"藤色","deeppink":"濃いピンク","lime":"ライム","oldlace":"オールド・レイス","chartreuse":"淡黄緑","darkcyan":"ダーク・シアン・ブルー","yellow":"黄","linen":"亜麻色","olive":"オリーブ","gold":"金","lawngreen":"ローン・グリーン","lightyellow":"ライト・イエロー","tan":"茶褐色","darkviolet":"ダーク・バイオレット","lightslategrey":"ライト・スレート・グレイ","grey":"グレイ","darkkhaki":"ダーク・カーキー","green":"緑","deepskyblue":"濃い空色","aqua":"アクア","sienna":"黄褐色","mintcream":"ミント・クリーム","rosybrown":"ロージー・ブラウン","mediumslateblue":"ミディアム・スレート・ブルー","magenta":"赤紫","lightseagreen":"ライト・シー・グリーン","cyan":"シアン・ブルー","olivedrab":"濃黄緑","darkgoldenrod":"ダーク・ゴールデン・ロッド","slateblue":"スレート・ブルー","mediumaquamarine":"ミディアム・アクアマリーン","lavender":"ラベンダー","mediumseagreen":"ミディアム・シー・グリーン","maroon":"えび茶","darkslategray":"ダーク・スレート・グレイ","mediumturquoise":"ミディアム・ターコイズ","ghostwhite":"ゴースト・ホワイト","darkblue":"ダーク・ブルー","mediumvioletred":"ミディアム・バイオレット・レッド","brown":"茶","lightgray":"ライト・グレイ","sandybrown":"砂褐色","pink":"ピンク","firebrick":"赤煉瓦色","indigo":"藍色","snow":"雪色","darkorchid":"ダーク・オーキッド","turquoise":"ターコイズ","chocolate":"チョコレート","springgreen":"スプリング・グリーン","moccasin":"モカシン","navy":"濃紺","lemonchiffon":"レモン・シフォン","teal":"ティール","floralwhite":"フローラル・ホワイト","cornflowerblue":"コーンフラワー・ブルー","paleturquoise":"ペイル・ターコイズ","purple":"紫","gainsboro":"ゲインズボーロ","plum":"深紫","red":"赤","blue":"青","forestgreen":"フォレスト・グリーン","darkgreen":"ダーク・グリーン","honeydew":"ハニーデュー","darkseagreen":"ダーク・シー・グリーン","lightcoral":"ライト・コーラル","palevioletred":"ペイル・バイオレット・レッド","mediumpurple":"ミディアム・パープル","saddlebrown":"サドル・ブラウン","darkmagenta":"ダーク・マジェンタ","thistle":"シスル","whitesmoke":"ホワイト・スモーク","wheat":"小麦色","violet":"すみれ色","lightskyblue":"ライト・スカイ・ブルー","goldenrod":"ゴールデン・ロッド","mediumblue":"ミディアム・ブルー","skyblue":"スカイ・ブルー","crimson":"深紅","darksalmon":"ダーク・サーモン","darkred":"ダーク・レッド","darkslategrey":"ダーク・スレート・グレイ","peru":"ペルー","lightgrey":"ライト・グレイ","lightgoldenrodyellow":"ライト・ゴールデン・ロッド・イエロー","blanchedalmond":"皮なしアーモンド","aliceblue":"アリス・ブルー","bisque":"ビスク","slategray":"スレート・グレイ","palegoldenrod":"ペイル・ゴールデン・ロッド","darkorange":"ダーク・オレンジ","aquamarine":"碧緑","lightgreen":"ライト・グリーン","burlywood":"バーリーウッド","dodgerblue":"ドッジャー・ブルー","darkgray":"ダーク・グレイ","lightcyan":"ライト・シアン","powderblue":"淡青","blueviolet":"青紫","orchid":"薄紫","dimgray":"くすんだグレイ","beige":"ベージュ","fuchsia":"紫紅色","lavenderblush":"ラベンダー・ブラッシ","hotpink":"ホット・ピンク","steelblue":"鋼色","tomato":"トマト色","lightpink":"ライト・ピンク","limegreen":"ライム・グリーン","indianred":"インディアン・レッド","papayawhip":"パパイア・ホイップ","lightslategray":"ライト・スレート・グレイ","gray":"グレイ","mediumorchid":"ミディアム・オーキッド","cornsilk":"コーンシルク","black":"黒","seagreen":"シー・グリーン","darkslateblue":"ダーク・スレート・ブルー","khaki":"カーキー","lightblue":"ライト・ブルー","palegreen":"ペイル・グリーン","azure":"薄い空色","peachpuff":"ピーチ・パフ","darkolivegreen":"ダーク・オリーブ・グリーン","yellowgreen":"黄緑"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.ja");dijit.nls.loading.ja={"loadingState":"ロード中...","errorState":"エラーが発生しました。"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.ja");dijit.nls.common.ja={"buttonOk":"OK","buttonCancel":"キャンセル","buttonSave":"保存","itemClose":"閉じる"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.ja");dijit._editor.nls.commands.ja={"removeFormat":"形式の除去","copy":"コピー","paste":"貼り付け","selectAll":"すべて選択","insertOrderedList":"番号付きリスト","insertTable":"テーブルの挿入/編集","print":"印刷","underline":"下線","foreColor":"前景色","htmlToggle":"HTML ソース","formatBlock":"段落スタイル","newPage":"改ページ","insertHorizontalRule":"水平罫線","delete":"削除","insertUnorderedList":"黒丸付きリスト","tableProp":"テーブル・プロパティー","insertImage":"イメージの挿入","superscript":"上付き文字","subscript":"下付き文字","createLink":"リンクの作成","undo":"元に戻す","fullScreen":"フルスクリーンの切り替え","italic":"イタリック","fontName":"フォント名","justifyLeft":"左揃え","unlink":"リンクの除去","toggleTableBorder":"テーブル・ボーダーの切り替え","viewSource":"HTML ソースの表示","fontSize":"フォント・サイズ","systemShortcut":"\"${0}\" アクションは、キーボード・ショートカットを使用して、ブラウザーでのみ使用できます。${1} を使用します。","indent":"インデント","redo":"やり直し","strikethrough":"取り消し線","justifyFull":"両端揃え","justifyCenter":"中央揃え","hiliteColor":"背景色","deleteTable":"テーブルの削除","outdent":"アウトデント","cut":"切り取り","plainFormatBlock":"段落スタイル","toggleDir":"方向の切り替え","bold":"太字","tabIndent":"タブ・インデント","justifyRight":"右揃え","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.ja");dojo.cldr.nls.number.ja={"decimalFormat":"#,##0.###","group":",","scientificFormat":"#E0","percentFormat":"#,##0%","currencyFormat":"¤#,##0.00","decimal":".","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","infinity":"∞","list":";","percentSign":"%","minusSign":"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","nan":"NaN","nativeZeroDigit":"0","plusSign":"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","perMille":"‰","patternDigit":"#","currencySpacing-beforeCurrency-insertBetween":" ","exponential":"E"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.ja");dijit.form.nls.validate.ja={"rangeMessage":"この値は範囲外です。","invalidMessage":"入力した値は無効です。","missingMessage":"この値は必須です。"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.ja");dojo.cldr.nls.currency.ja={"HKD_displayName":"香港ドル","CHF_displayName":"スイス フラン","JPY_symbol":"¥","CAD_displayName":"カナダ ドル","CNY_displayName":"中国人民元","USD_symbol":"$","AUD_displayName":"オーストラリア ドル","JPY_displayName":"日本円","USD_displayName":"米ドル","CNY_symbol":"元","GBP_displayName":"英国ポンド","EUR_displayName":"ユーロ","CHF_symbol":"Fr.","HKD_symbol":"HK$","CAD_symbol":"CA$","EUR_symbol":"€","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.ja");dojo.cldr.nls.gregorian.ja={"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"曜日","dateFormatItem-yQQQ":"yQQQ","dateFormatItem-yMEd":"y/M/d(EEE)","dateFormatItem-MMMEd":"M月d日(E)","eraNarrow":["紀元前","西暦"],"dateFormat-long":"y年M月d日","months-format-wide":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"dateTimeFormat-medium":"{1} {0}","dateFormat-full":"y年M月d日EEEE","dateFormatItem-Md":"M/d","dateFormatItem-yMd":"y/M/d","field-era":"時代","dateFormatItem-yM":"y/M","months-standAlone-wide":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"timeFormat-short":"H:mm","quarters-format-wide":["第1四半期","第2四半期","第3四半期","第4四半期"],"timeFormat-long":"HH:mm:ss z","field-year":"年","dateFormatItem-yMMM":"y年M月","dateFormatItem-yQ":"y/Q","field-hour":"時","dateFormatItem-MMdd":"MM/dd","months-format-abbr":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"dateFormatItem-yyQ":"yy/Q","timeFormat-full":"H時mm分ss秒 zzzz","am":"午前","dateFormatItem-H":"H時","months-standAlone-abbr":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["第1四半期","第2四半期","第3四半期","第4四半期"],"dateFormatItem-M":"L","days-standAlone-wide":["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],"dateFormatItem-MMMMd":"M月d日","dateFormatItem-yyMMM":"y年M月","timeFormat-medium":"H:mm:ss","dateFormatItem-Hm":"H:mm","eraAbbr":["紀元前","西暦"],"field-minute":"分","field-dayperiod":"午前/午後","days-standAlone-abbr":["日","月","火","水","木","金","土"],"dateFormatItem-d":"d日","dateFormatItem-ms":"mm:ss","dateTimeFormat-long":"{1}{0}","dateFormatItem-MMMd":"M月d日","dateFormatItem-MEd":"M/d(E)","dateTimeFormat-full":"{1}{0}","dateFormatItem-yMMMM":"y年M月","field-day":"日","days-format-wide":["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],"field-zone":"タイムゾーン","dateFormatItem-yyyyMM":"yyyy/MM","dateFormatItem-y":"y","months-standAlone-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"dateFormatItem-hm":"ah:mm","dateFormatItem-GGGGyMd":"GGGGy年M月d日","days-format-abbr":["日","月","火","水","木","金","土"],"dateFormatItem-yMMMd":"y年M月d日","eraNames":["紀元前","西暦"],"days-format-narrow":["日","月","火","水","木","金","土"],"field-month":"月","days-standAlone-narrow":["日","月","火","水","木","金","土"],"dateFormatItem-MMM":"LLL","pm":"午後","dateFormatItem-MMMMEd":"M月d日(E)","dateFormat-short":"yy/MM/dd","field-second":"秒","dateFormatItem-yMMMEd":"y年M月d日(EEE)","dateFormatItem-Ed":"d日(EEE)","field-week":"週","dateFormat-medium":"yyyy/MM/dd","dateTimeFormat-short":"{1} {0}","dateFormatItem-hms":"ah:mm:ss","dateFormatItem-yyyy":"y年","months-format-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormatItem-EEEd":"d EEE","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Hms":"H:mm:ss"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.ja");dijit.form.nls.ComboBox.ja={"previousMessage":"以前の選択項目","nextMessage":"追加の選択項目"};
diff --git a/js/dojo/dijit/nls/dijit-all_ko-kr.js b/js/dojo/dijit/nls/dijit-all_ko-kr.js
--- a/js/dojo/dijit/nls/dijit-all_ko-kr.js
+++ b/js/dojo/dijit/nls/dijit-all_ko-kr.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_ko-kr");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.ko_kr");dojo.nls.colors.ko_kr={"lightsteelblue": "라이트 스틸 블루(light steel blue)", "orangered": "오렌지 레드(orange red)", "midnightblue": "미드나잇 블루(midnight blue)", "cadetblue": "카뎃 블루(cadet blue)", "seashell": "씨쉘(seashell)", "slategrey": "슬레이트 그레이(slate gray)", "coral": "코랄(coral)", "darkturquoise": "다크 터콰즈(dark turquoise)", "antiquewhite": "앤틱 화이트(antique white)", "mediumspringgreen": "미디엄 스프링 그린(medium spring green)", "salmon": "샐몬(salmon)", "darkgrey": "다크 그레이(dark gray)", "ivory": "아이보리(ivory)", "greenyellow": "그린 옐로우(green-yellow)", "mistyrose": "미스티 로즈(misty rose)", "lightsalmon": "라이트 샐몬(light salmon)", "silver": "실버(silver)", "dimgrey": "딤 그레이(dim gray)", "orange": "오렌지(orange)", "white": "화이트(white)", "navajowhite": "나바호 화이트(navajo white)", "royalblue": "로얄 블루(royal blue)", "deeppink": "딥 핑크(deep pink)", "lime": "라임(lime)", "oldlace": "올드 레이스(old lace)", "chartreuse": "샤르트뢰즈(chartreuse)", "darkcyan": "다크 시안(dark cyan)", "yellow": "옐로우(yellow)", "linen": "리넨(linen)", "olive": "올리브(olive)", "gold": "골드(gold)", "lawngreen": "론 그린(lawn green)", "lightyellow": "라이트 옐로우(light yellow)", "tan": "탠(tan)", "darkviolet": "다크 바이올렛(dark violet)", "lightslategrey": "라이트 슬레이트 그레이(light slate gray)", "grey": "그레이(gray)", "darkkhaki": "다크 카키(dark khaki)", "green": "그린(green)", "deepskyblue": "딥 스카이 블루(deep sky blue)", "aqua": "아쿠아(aqua)", "sienna": "시에나(sienna)", "mintcream": "민트 크림(mint cream)", "rosybrown": "로지 브라운(rosy brown)", "mediumslateblue": "미디엄 슬레이트 블루(medium slate blue)", "magenta": "마젠타(magenta)", "lightseagreen": "라이트 씨 그린(light sea green)", "cyan": "시안(cyan)", "olivedrab": "올리브 드랩(olive drab)", "darkgoldenrod": "다크 골든로드(dark goldenrod)", "slateblue": "슬레이트 블루(slate blue)", "mediumaquamarine": "미디엄 아쿠아마린(medium aquamarine)", "lavender": "라벤더(lavender)", "mediumseagreen": "미디엄 씨 그린(medium sea green)", "maroon": "마룬(maroon)", "darkslategray": "다크 슬레이트 그레이(dark slate gray)", "mediumturquoise": "미디엄 터콰즈(medium turquoise)", "ghostwhite": "고스트 화이트(ghost white)", "darkblue": "다크 블루(dark blue)", "mediumvioletred": "미디엄 바이올렛 레드(medium violet-red)", "brown": "브라운(brown)", "lightgray": "라이트 그레이(light gray)", "sandybrown": "샌디 브라운(sandy brown)", "pink": "핑크(pink)", "firebrick": "파이어 브릭(fire brick)", "indigo": "인디고(indigo)", "snow": "스노우(snow)", "darkorchid": "다크 오키드(dark orchid)", "turquoise": "터콰즈(turquoise)", "chocolate": "초콜렛(chocolate)", "springgreen": "스프링 그린(spring green)", "moccasin": "모카신(moccasin)", "navy": "네이비(navy)", "lemonchiffon": "레몬 쉬폰(lemon chiffon)", "teal": "틸(teal)", "floralwhite": "플로랄 화이트(floral white)", "cornflowerblue": "콘플라워 블루(cornflower blue)", "paleturquoise": "페일 터콰즈(pale turquoise)", "purple": "퍼플(purple)", "gainsboro": "게인스브로(gainsboro)", "plum": "플럼(plum)", "red": "레드(red)", "blue": "블루(blue)", "forestgreen": "포레스트 그린(forest green)", "darkgreen": "다크 그린(dark green)", "honeydew": "허니듀(honeydew)", "darkseagreen": "다크 씨 그린(dark sea green)", "lightcoral": "라이트 코랄(light coral)", "palevioletred": "페일 바이올렛 레드(pale violet-red)", "mediumpurple": "미디엄 퍼플(medium purple)", "saddlebrown": "새들 브라운(saddle brown)", "darkmagenta": "다크 마젠타(dark magenta)", "thistle": "시슬(thistle)", "whitesmoke": "화이트 스모크(white smoke)", "wheat": "휘트(wheat)", "violet": "바이올렛(violet)", "lightskyblue": "라이트 스카이 블루(light sky blue)", "goldenrod": "골든로드(goldenrod)", "mediumblue": "미디엄 블루(medium blue)", "skyblue": "스카이 블루(sky blue)", "crimson": "크림슨(crimson)", "darksalmon": "다크 샐몬(dark salmon)", "darkred": "다크 레드(dark red)", "darkslategrey": "다크 슬레이트 그레이(dark slate gray)", "peru": "페루(peru)", "lightgrey": "라이트 그레이(light gray)", "lightgoldenrodyellow": "라이트 골든로드 옐로우(light goldenrod yellow)", "blanchedalmond": "블랜치 아몬드(blanched almond)", "aliceblue": "앨리스 블루(alice blue)", "bisque": "비스크(bisque)", "slategray": "슬레이트 그레이(slate gray)", "palegoldenrod": "페일 골든로드(pale goldenrod)", "darkorange": "다크 오렌지(dark orange)", "aquamarine": "아쿠아마린(aquamarine)", "lightgreen": "라이트 그린(light green)", "burlywood": "벌리우드(burlywood)", "dodgerblue": "다저 블루(dodger blue)", "darkgray": "다크 그레이(dark gray)", "lightcyan": "라이트 시안(light cyan)", "powderblue": "파우더 블루(powder blue)", "blueviolet": "블루 바이올렛(blue-violet)", "orchid": "오키드(orchid)", "dimgray": "딤 그레이(dim gray)", "beige": "베이지(beige)", "fuchsia": "후크샤(fuchsia)", "lavenderblush": "라벤더 블러쉬(lavender blush)", "hotpink": "핫 핑크(hot pink)", "steelblue": "스틸 블루(steel blue)", "tomato": "토마토(tomato)", "lightpink": "라이트 핑크(light pink)", "limegreen": "라임 그린(lime green)", "indianred": "인디안 레드(indian red)", "papayawhip": "파파야 휩(papaya whip)", "lightslategray": "라이트 슬레이트 그레이(light slate gray)", "gray": "그레이(gray)", "mediumorchid": "미디엄 오키드(medium orchid)", "cornsilk": "콘실크(cornsilk)", "black": "블랙(black)", "seagreen": "씨 그린(sea green)", "darkslateblue": "다크 슬레이트 블루(dark slate blue)", "khaki": "카키(khaki)", "lightblue": "라이트 블루(light blue)", "palegreen": "페일 그린(pale green)", "azure": "애쥬어(azure)", "peachpuff": "피치 퍼프(peach puff)", "darkolivegreen": "다크 올리브 그린(dark olive green)", "yellowgreen": "옐로우 그린(yellow green)"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.ko_kr");dijit.nls.loading.ko_kr={"loadingState": "로드 중...", "errorState": "죄송합니다. 오류가 발생했습니다."};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.ko_kr");dijit.nls.Textarea.ko_kr={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.ko_kr");dijit._editor.nls.commands.ko_kr={"removeFormat": "형식 제거", "copy": "복사", "paste": "붙여넣기", "selectAll": "모두 선택", "insertOrderedList": "번호 목록", "insertTable": "테이블 삽입/편집", "underline": "밑줄", "foreColor": "전경색", "htmlToggle": "HTML 소스", "formatBlock": "단락 양식", "insertHorizontalRule": "수평 자", "delete": "삭제", "insertUnorderedList": "글머리표 목록", "tableProp": "테이블 특성", "insertImage": "이미지 삽입", "superscript": "위첨자", "subscript": "아래첨자", "createLink": "링크 작성", "undo": "실행 취소", "italic": "이탤릭체", "fontName": "글꼴 이름", "justifyLeft": "왼쪽 맞춤", "unlink": "링크 제거", "toggleTableBorder": "토글 테이블 경계", "fontSize": "글꼴 크기", "indent": "들여쓰기", "redo": "다시 실행", "strikethrough": "취소선", "justifyFull": "양쪽 맞춤", "justifyCenter": "가운데 맞춤", "hiliteColor": "배경색", "deleteTable": "테이블 삭제", "outdent": "내어쓰기", "cut": "잘라내기", "plainFormatBlock": "단락 양식", "bold": "굵은체", "systemShortcutFF": "\"${0}\" 조치는 키보드 바로 가기를 사용하는 Mozilla Firefox에서만 사용 가능합니다. ${1} 사용.", "justifyRight": "오른쪽 맞춤", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.ko_kr");dojo.cldr.nls.number.ko_kr={"currencyFormat": "¤#,##0.00", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.ko_kr");dijit.nls.common.ko_kr={"buttonCancel": "취소", "buttonSave": "저장", "buttonOk": "확인"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.ko_kr");dijit.form.nls.validate.ko_kr={"rangeMessage": "* 이 값은 범위를 벗어납니다. ", "invalidMessage": "* 입력한 값이 유효하지 않습니다. ", "missingMessage": "* 이 값은 필수입니다. "};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.ko_kr");dijit.form.nls.ComboBox.ko_kr={"previousMessage": "이전 선택사항", "nextMessage": "기타 선택사항"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.ko_kr");dojo.cldr.nls.currency.ko_kr={"HKD_displayName": "홍콩 달러", "CHF_displayName": "스위스 프랑달러", "JPY_symbol": "¥", "CAD_displayName": "캐나다 달러", "USD_symbol": "US$", "AUD_displayName": "호주 달러", "JPY_displayName": "일본 엔화", "USD_displayName": "미국 달러", "GBP_displayName": "영국령 파운드 스털링", "EUR_displayName": "유로화", "GBP_symbol": "£", "EUR_symbol": "€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.ko_kr");dojo.cldr.nls.gregorian.ko_kr={"timeFormat-medium": "a h:mm:ss", "timeFormat-short": "a h:mm", "dateFormat-medium": "yyyy. MM. dd", "pm": "오후", "timeFormat-full": "a hh'시' mm'분' ss'초' z", "months-standAlone-narrow": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], "eraNames": ["서력기원전", "서력기원"], "am": "오전", "days-standAlone-narrow": ["일", "월", "화", "수", "목", "금", "토"], "dateFormat-long": "yyyy'년' M'월' d'일'", "dateFormat-short": "yy. MM. dd", "months-format-wide": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], "months-format-abbr": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], "days-format-wide": ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"], "timeFormat-long": "a hh'시' mm'분' ss'초'", "eraAbbr": ["기원전", "서기"], "dateFormat-full": "yyyy'년' M'월' d'일' EEEE", "days-format-abbr": ["일", "월", "화", "수", "목", "금", "토"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Era": "{0} {1}", "quarters-format-wide": ["Q1", "Q2", "Q3", "Q4"]};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.ko_kr");dijit.nls.Textarea.ko_kr={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_ko-kr");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.ko_kr");dojo.nls.colors.ko_kr={"lightsteelblue":"라이트 스틸 블루(light steel blue)","orangered":"오렌지 레드(orange red)","midnightblue":"미드나잇 블루(midnight blue)","cadetblue":"카뎃 블루(cadet blue)","seashell":"씨쉘(seashell)","slategrey":"슬레이트 그레이(slate gray)","coral":"코랄(coral)","darkturquoise":"다크 터콰즈(dark turquoise)","antiquewhite":"앤틱 화이트(antique white)","mediumspringgreen":"미디엄 스프링 그린(medium spring green)","salmon":"샐몬(salmon)","darkgrey":"다크 그레이(dark gray)","ivory":"아이보리(ivory)","greenyellow":"그린 옐로우(green-yellow)","mistyrose":"미스티 로즈(misty rose)","lightsalmon":"라이트 샐몬(light salmon)","silver":"실버(silver)","dimgrey":"딤 그레이(dim gray)","orange":"오렌지(orange)","white":"화이트(white)","navajowhite":"나바호 화이트(navajo white)","royalblue":"로얄 블루(royal blue)","deeppink":"딥 핑크(deep pink)","lime":"라임(lime)","oldlace":"올드 레이스(old lace)","chartreuse":"샤르트뢰즈(chartreuse)","darkcyan":"다크 시안(dark cyan)","yellow":"옐로우(yellow)","linen":"리넨(linen)","olive":"올리브(olive)","gold":"골드(gold)","lawngreen":"론 그린(lawn green)","lightyellow":"라이트 옐로우(light yellow)","tan":"탠(tan)","darkviolet":"다크 바이올렛(dark violet)","lightslategrey":"라이트 슬레이트 그레이(light slate gray)","grey":"그레이(gray)","darkkhaki":"다크 카키(dark khaki)","green":"그린(green)","deepskyblue":"딥 스카이 블루(deep sky blue)","aqua":"아쿠아(aqua)","sienna":"시에나(sienna)","mintcream":"민트 크림(mint cream)","rosybrown":"로지 브라운(rosy brown)","mediumslateblue":"미디엄 슬레이트 블루(medium slate blue)","magenta":"마젠타(magenta)","lightseagreen":"라이트 씨 그린(light sea green)","cyan":"시안(cyan)","olivedrab":"올리브 드랩(olive drab)","darkgoldenrod":"다크 골든로드(dark goldenrod)","slateblue":"슬레이트 블루(slate blue)","mediumaquamarine":"미디엄 아쿠아마린(medium aquamarine)","lavender":"라벤더(lavender)","mediumseagreen":"미디엄 씨 그린(medium sea green)","maroon":"마룬(maroon)","darkslategray":"다크 슬레이트 그레이(dark slate gray)","mediumturquoise":"미디엄 터콰즈(medium turquoise)","ghostwhite":"고스트 화이트(ghost white)","darkblue":"다크 블루(dark blue)","mediumvioletred":"미디엄 바이올렛 레드(medium violet-red)","brown":"브라운(brown)","lightgray":"라이트 그레이(light gray)","sandybrown":"샌디 브라운(sandy brown)","pink":"핑크(pink)","firebrick":"파이어 브릭(fire brick)","indigo":"인디고(indigo)","snow":"스노우(snow)","darkorchid":"다크 오키드(dark orchid)","turquoise":"터콰즈(turquoise)","chocolate":"초콜렛(chocolate)","springgreen":"스프링 그린(spring green)","moccasin":"모카신(moccasin)","navy":"네이비(navy)","lemonchiffon":"레몬 쉬폰(lemon chiffon)","teal":"틸(teal)","floralwhite":"플로랄 화이트(floral white)","cornflowerblue":"콘플라워 블루(cornflower blue)","paleturquoise":"페일 터콰즈(pale turquoise)","purple":"퍼플(purple)","gainsboro":"게인스브로(gainsboro)","plum":"플럼(plum)","red":"레드(red)","blue":"블루(blue)","forestgreen":"포레스트 그린(forest green)","darkgreen":"다크 그린(dark green)","honeydew":"허니듀(honeydew)","darkseagreen":"다크 씨 그린(dark sea green)","lightcoral":"라이트 코랄(light coral)","palevioletred":"페일 바이올렛 레드(pale violet-red)","mediumpurple":"미디엄 퍼플(medium purple)","saddlebrown":"새들 브라운(saddle brown)","darkmagenta":"다크 마젠타(dark magenta)","thistle":"시슬(thistle)","whitesmoke":"화이트 스모크(white smoke)","wheat":"휘트(wheat)","violet":"바이올렛(violet)","lightskyblue":"라이트 스카이 블루(light sky blue)","goldenrod":"골든로드(goldenrod)","mediumblue":"미디엄 블루(medium blue)","skyblue":"스카이 블루(sky blue)","crimson":"크림슨(crimson)","darksalmon":"다크 샐몬(dark salmon)","darkred":"다크 레드(dark red)","darkslategrey":"다크 슬레이트 그레이(dark slate gray)","peru":"페루(peru)","lightgrey":"라이트 그레이(light gray)","lightgoldenrodyellow":"라이트 골든로드 옐로우(light goldenrod yellow)","blanchedalmond":"블랜치 아몬드(blanched almond)","aliceblue":"앨리스 블루(alice blue)","bisque":"비스크(bisque)","slategray":"슬레이트 그레이(slate gray)","palegoldenrod":"페일 골든로드(pale goldenrod)","darkorange":"다크 오렌지(dark orange)","aquamarine":"아쿠아마린(aquamarine)","lightgreen":"라이트 그린(light green)","burlywood":"벌리우드(burlywood)","dodgerblue":"다저 블루(dodger blue)","darkgray":"다크 그레이(dark gray)","lightcyan":"라이트 시안(light cyan)","powderblue":"파우더 블루(powder blue)","blueviolet":"블루 바이올렛(blue-violet)","orchid":"오키드(orchid)","dimgray":"딤 그레이(dim gray)","beige":"베이지(beige)","fuchsia":"후크샤(fuchsia)","lavenderblush":"라벤더 블러쉬(lavender blush)","hotpink":"핫 핑크(hot pink)","steelblue":"스틸 블루(steel blue)","tomato":"토마토(tomato)","lightpink":"라이트 핑크(light pink)","limegreen":"라임 그린(lime green)","indianred":"인디안 레드(indian red)","papayawhip":"파파야 휩(papaya whip)","lightslategray":"라이트 슬레이트 그레이(light slate gray)","gray":"그레이(gray)","mediumorchid":"미디엄 오키드(medium orchid)","cornsilk":"콘실크(cornsilk)","black":"블랙(black)","seagreen":"씨 그린(sea green)","darkslateblue":"다크 슬레이트 블루(dark slate blue)","khaki":"카키(khaki)","lightblue":"라이트 블루(light blue)","palegreen":"페일 그린(pale green)","azure":"애쥬어(azure)","peachpuff":"피치 퍼프(peach puff)","darkolivegreen":"다크 올리브 그린(dark olive green)","yellowgreen":"옐로우 그린(yellow green)"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.ko_kr");dijit.nls.loading.ko_kr={"loadingState":"로드 중...","errorState":"죄송합니다. 오류가 발생했습니다."};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.ko_kr");dijit.nls.common.ko_kr={"buttonOk":"확인","buttonCancel":"취소","buttonSave":"저장","itemClose":"닫기"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.ko_kr");dijit._editor.nls.commands.ko_kr={"removeFormat":"형식 제거","copy":"복사","paste":"붙여넣기","selectAll":"모두 선택","insertOrderedList":"번호 목록","insertTable":"테이블 삽입/편집","print":"인쇄","underline":"밑줄","foreColor":"전경색","htmlToggle":"HTML 소스","formatBlock":"단락 스타일","newPage":"새 페이지","insertHorizontalRule":"수평 자","delete":"삭제","insertUnorderedList":"글머리표 목록","tableProp":"테이블 특성","insertImage":"이미지 삽입","superscript":"위첨자","subscript":"아래첨자","createLink":"링크 작성","undo":"실행 취소","fullScreen":"토글 전체 화면","italic":"기울임체","fontName":"글꼴 이름","justifyLeft":"왼쪽 맞춤","unlink":"링크 제거","toggleTableBorder":"토글 테이블 테두리","viewSource":"HTML 소스 보기","fontSize":"글꼴 크기","systemShortcut":"\"${0}\" 조치는 브라우저에서 키보드 단축키를 이용해서만 사용할 수 있습니다. ${1}을(를) 사용하십시오.","indent":"들여쓰기","redo":"다시 실행","strikethrough":"취소선","justifyFull":"양쪽 맞춤","justifyCenter":"가운데 맞춤","hiliteColor":"배경색","deleteTable":"테이블 삭제","outdent":"내어쓰기","cut":"잘라내기","plainFormatBlock":"단락 스타일","toggleDir":"토글 방향","bold":"굵은체","tabIndent":"탭 들여쓰기","justifyRight":"오른쪽 맞춤","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.ko_kr");dojo.cldr.nls.number.ko_kr={"currencyFormat":"¤#,##0.00","group":",","percentSign":"%","exponential":"E","percentFormat":"#,##0%","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":".","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.ko_kr");dijit.form.nls.validate.ko_kr={"rangeMessage":"이 값은 범위를 벗어납니다.","invalidMessage":"입력된 값이 올바르지 않습니다.","missingMessage":"이 값은 필수입니다."};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.ko_kr");dojo.cldr.nls.currency.ko_kr={"HKD_displayName":"홍콩 달러","CHF_displayName":"스위스 프랑","CAD_displayName":"캐나다 달러","CNY_displayName":"중국 위안 인민폐","AUD_displayName":"호주 달러","JPY_displayName":"일본 엔화","USD_displayName":"미국 달러","GBP_displayName":"영국령 파운드 스털링","EUR_displayName":"유로화","CHF_symbol":"Fr.","JPY_symbol":"JP¥","HKD_symbol":"HK$","USD_symbol":"US$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.ko_kr");dojo.cldr.nls.gregorian.ko_kr={"timeFormat-medium":"a h:mm:ss","timeFormat-short":"a h:mm","months-format-narrow":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"요일","dateFormatItem-yQQQ":"y년 QQQ","dateFormatItem-yMEd":"yyyy. M. d. EEE","dateFormatItem-MMMEd":"MMM d일 (E)","eraNarrow":["기원전","서기"],"dateFormat-long":"y년 M월 d일","months-format-wide":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d일 EEE","dateFormat-full":"y년 M월 d일 EEEE","dateFormatItem-Md":"M. d.","field-era":"연호","dateFormatItem-yM":"yyyy. M.","months-standAlone-wide":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"quarters-format-wide":["제 1/4분기","제 2/4분기","제 3/4분기","제 4/4분기"],"timeFormat-long":"a hh시 mm분 ss초 z","field-year":"년","dateFormatItem-yMMM":"y년 MMM","dateFormatItem-yQ":"y년 Q분기","field-hour":"시","dateFormatItem-MMdd":"MM. dd","months-format-abbr":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"dateFormatItem-yyQ":"yy년 Q분기","timeFormat-full":"a hh시 mm분 ss초 zzzz","am":"오전","months-standAlone-abbr":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"quarters-format-abbr":["1분기","2분기","3분기","4분기"],"quarters-standAlone-wide":["제 1/4분기","제 2/4분기","제 3/4분기","제 4/4분기"],"dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"L","days-standAlone-wide":["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],"dateFormatItem-MMMMd":"MMMM d일","dateFormatItem-yyMMM":"yy년 MMM","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["1분기","2분기","3분기","4분기"],"eraAbbr":["기원전","서기"],"field-minute":"분","field-dayperiod":"오전/오후","days-standAlone-abbr":["일","월","화","수","목","금","토"],"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","dateTimeFormat-long":"{1}{0}","dateFormatItem-MMMd":"MMM d일","dateFormatItem-MEd":"M. d. (E)","dateTimeFormat-full":"{1}{0}","dateFormatItem-yMMMM":"y년 MMMM","field-day":"일","days-format-wide":["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],"field-zone":"시간대","dateFormatItem-yyyyMM":"yyyy. MM","dateFormatItem-y":"y","months-standAlone-narrow":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"dateFormatItem-yyMM":"YY. M.","days-format-abbr":["일","월","화","수","목","금","토"],"dateFormatItem-yMMMd":"y년 MMM d일","eraNames":["서력기원전","서력기원"],"days-format-narrow":["일","월","화","수","목","금","토"],"field-month":"월","days-standAlone-narrow":["일","월","화","수","목","금","토"],"dateFormatItem-MMM":"LLL","dateFormatItem-HHmm":"HH:mm","pm":"오후","dateFormatItem-MMMMEd":"MMMM d일 (E)","dateFormat-short":"yy. M. d.","field-second":"초","dateFormatItem-yMMMEd":"y년 MMM d일 EEE","dateFormatItem-Ed":"d일 (E)","field-week":"주","dateFormat-medium":"yyyy. M. d.","dateFormatItem-mmss":"mm:ss","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H시 m분 s초","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-hms":"h:mm:ss a"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.ko_kr");dijit.form.nls.ComboBox.ko_kr={"previousMessage":"이전 선택사항","nextMessage":"기타 선택사항"};
diff --git a/js/dojo/dijit/nls/dijit-all_ko.js b/js/dojo/dijit/nls/dijit-all_ko.js
--- a/js/dojo/dijit/nls/dijit-all_ko.js
+++ b/js/dojo/dijit/nls/dijit-all_ko.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_ko");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.ko");dojo.nls.colors.ko={"lightsteelblue": "라이트 스틸 블루(light steel blue)", "orangered": "오렌지 레드(orange red)", "midnightblue": "미드나잇 블루(midnight blue)", "cadetblue": "카뎃 블루(cadet blue)", "seashell": "씨쉘(seashell)", "slategrey": "슬레이트 그레이(slate gray)", "coral": "코랄(coral)", "darkturquoise": "다크 터콰즈(dark turquoise)", "antiquewhite": "앤틱 화이트(antique white)", "mediumspringgreen": "미디엄 스프링 그린(medium spring green)", "salmon": "샐몬(salmon)", "darkgrey": "다크 그레이(dark gray)", "ivory": "아이보리(ivory)", "greenyellow": "그린 옐로우(green-yellow)", "mistyrose": "미스티 로즈(misty rose)", "lightsalmon": "라이트 샐몬(light salmon)", "silver": "실버(silver)", "dimgrey": "딤 그레이(dim gray)", "orange": "오렌지(orange)", "white": "화이트(white)", "navajowhite": "나바호 화이트(navajo white)", "royalblue": "로얄 블루(royal blue)", "deeppink": "딥 핑크(deep pink)", "lime": "라임(lime)", "oldlace": "올드 레이스(old lace)", "chartreuse": "샤르트뢰즈(chartreuse)", "darkcyan": "다크 시안(dark cyan)", "yellow": "옐로우(yellow)", "linen": "리넨(linen)", "olive": "올리브(olive)", "gold": "골드(gold)", "lawngreen": "론 그린(lawn green)", "lightyellow": "라이트 옐로우(light yellow)", "tan": "탠(tan)", "darkviolet": "다크 바이올렛(dark violet)", "lightslategrey": "라이트 슬레이트 그레이(light slate gray)", "grey": "그레이(gray)", "darkkhaki": "다크 카키(dark khaki)", "green": "그린(green)", "deepskyblue": "딥 스카이 블루(deep sky blue)", "aqua": "아쿠아(aqua)", "sienna": "시에나(sienna)", "mintcream": "민트 크림(mint cream)", "rosybrown": "로지 브라운(rosy brown)", "mediumslateblue": "미디엄 슬레이트 블루(medium slate blue)", "magenta": "마젠타(magenta)", "lightseagreen": "라이트 씨 그린(light sea green)", "cyan": "시안(cyan)", "olivedrab": "올리브 드랩(olive drab)", "darkgoldenrod": "다크 골든로드(dark goldenrod)", "slateblue": "슬레이트 블루(slate blue)", "mediumaquamarine": "미디엄 아쿠아마린(medium aquamarine)", "lavender": "라벤더(lavender)", "mediumseagreen": "미디엄 씨 그린(medium sea green)", "maroon": "마룬(maroon)", "darkslategray": "다크 슬레이트 그레이(dark slate gray)", "mediumturquoise": "미디엄 터콰즈(medium turquoise)", "ghostwhite": "고스트 화이트(ghost white)", "darkblue": "다크 블루(dark blue)", "mediumvioletred": "미디엄 바이올렛 레드(medium violet-red)", "brown": "브라운(brown)", "lightgray": "라이트 그레이(light gray)", "sandybrown": "샌디 브라운(sandy brown)", "pink": "핑크(pink)", "firebrick": "파이어 브릭(fire brick)", "indigo": "인디고(indigo)", "snow": "스노우(snow)", "darkorchid": "다크 오키드(dark orchid)", "turquoise": "터콰즈(turquoise)", "chocolate": "초콜렛(chocolate)", "springgreen": "스프링 그린(spring green)", "moccasin": "모카신(moccasin)", "navy": "네이비(navy)", "lemonchiffon": "레몬 쉬폰(lemon chiffon)", "teal": "틸(teal)", "floralwhite": "플로랄 화이트(floral white)", "cornflowerblue": "콘플라워 블루(cornflower blue)", "paleturquoise": "페일 터콰즈(pale turquoise)", "purple": "퍼플(purple)", "gainsboro": "게인스브로(gainsboro)", "plum": "플럼(plum)", "red": "레드(red)", "blue": "블루(blue)", "forestgreen": "포레스트 그린(forest green)", "darkgreen": "다크 그린(dark green)", "honeydew": "허니듀(honeydew)", "darkseagreen": "다크 씨 그린(dark sea green)", "lightcoral": "라이트 코랄(light coral)", "palevioletred": "페일 바이올렛 레드(pale violet-red)", "mediumpurple": "미디엄 퍼플(medium purple)", "saddlebrown": "새들 브라운(saddle brown)", "darkmagenta": "다크 마젠타(dark magenta)", "thistle": "시슬(thistle)", "whitesmoke": "화이트 스모크(white smoke)", "wheat": "휘트(wheat)", "violet": "바이올렛(violet)", "lightskyblue": "라이트 스카이 블루(light sky blue)", "goldenrod": "골든로드(goldenrod)", "mediumblue": "미디엄 블루(medium blue)", "skyblue": "스카이 블루(sky blue)", "crimson": "크림슨(crimson)", "darksalmon": "다크 샐몬(dark salmon)", "darkred": "다크 레드(dark red)", "darkslategrey": "다크 슬레이트 그레이(dark slate gray)", "peru": "페루(peru)", "lightgrey": "라이트 그레이(light gray)", "lightgoldenrodyellow": "라이트 골든로드 옐로우(light goldenrod yellow)", "blanchedalmond": "블랜치 아몬드(blanched almond)", "aliceblue": "앨리스 블루(alice blue)", "bisque": "비스크(bisque)", "slategray": "슬레이트 그레이(slate gray)", "palegoldenrod": "페일 골든로드(pale goldenrod)", "darkorange": "다크 오렌지(dark orange)", "aquamarine": "아쿠아마린(aquamarine)", "lightgreen": "라이트 그린(light green)", "burlywood": "벌리우드(burlywood)", "dodgerblue": "다저 블루(dodger blue)", "darkgray": "다크 그레이(dark gray)", "lightcyan": "라이트 시안(light cyan)", "powderblue": "파우더 블루(powder blue)", "blueviolet": "블루 바이올렛(blue-violet)", "orchid": "오키드(orchid)", "dimgray": "딤 그레이(dim gray)", "beige": "베이지(beige)", "fuchsia": "후크샤(fuchsia)", "lavenderblush": "라벤더 블러쉬(lavender blush)", "hotpink": "핫 핑크(hot pink)", "steelblue": "스틸 블루(steel blue)", "tomato": "토마토(tomato)", "lightpink": "라이트 핑크(light pink)", "limegreen": "라임 그린(lime green)", "indianred": "인디안 레드(indian red)", "papayawhip": "파파야 휩(papaya whip)", "lightslategray": "라이트 슬레이트 그레이(light slate gray)", "gray": "그레이(gray)", "mediumorchid": "미디엄 오키드(medium orchid)", "cornsilk": "콘실크(cornsilk)", "black": "블랙(black)", "seagreen": "씨 그린(sea green)", "darkslateblue": "다크 슬레이트 블루(dark slate blue)", "khaki": "카키(khaki)", "lightblue": "라이트 블루(light blue)", "palegreen": "페일 그린(pale green)", "azure": "애쥬어(azure)", "peachpuff": "피치 퍼프(peach puff)", "darkolivegreen": "다크 올리브 그린(dark olive green)", "yellowgreen": "옐로우 그린(yellow green)"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.ko");dijit.nls.loading.ko={"loadingState": "로드 중...", "errorState": "죄송합니다. 오류가 발생했습니다."};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.ko");dijit.nls.Textarea.ko={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.ko");dijit._editor.nls.commands.ko={"removeFormat": "형식 제거", "copy": "복사", "paste": "붙여넣기", "selectAll": "모두 선택", "insertOrderedList": "번호 목록", "insertTable": "테이블 삽입/편집", "underline": "밑줄", "foreColor": "전경색", "htmlToggle": "HTML 소스", "formatBlock": "단락 양식", "insertHorizontalRule": "수평 자", "delete": "삭제", "insertUnorderedList": "글머리표 목록", "tableProp": "테이블 특성", "insertImage": "이미지 삽입", "superscript": "위첨자", "subscript": "아래첨자", "createLink": "링크 작성", "undo": "실행 취소", "italic": "이탤릭체", "fontName": "글꼴 이름", "justifyLeft": "왼쪽 맞춤", "unlink": "링크 제거", "toggleTableBorder": "토글 테이블 경계", "fontSize": "글꼴 크기", "indent": "들여쓰기", "redo": "다시 실행", "strikethrough": "취소선", "justifyFull": "양쪽 맞춤", "justifyCenter": "가운데 맞춤", "hiliteColor": "배경색", "deleteTable": "테이블 삭제", "outdent": "내어쓰기", "cut": "잘라내기", "plainFormatBlock": "단락 양식", "bold": "굵은체", "systemShortcutFF": "\"${0}\" 조치는 키보드 바로 가기를 사용하는 Mozilla Firefox에서만 사용 가능합니다. ${1} 사용.", "justifyRight": "오른쪽 맞춤", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.ko");dojo.cldr.nls.number.ko={"scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencyFormat": "¤ #,##0.00", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.ko");dijit.nls.common.ko={"buttonCancel": "취소", "buttonSave": "저장", "buttonOk": "확인"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.ko");dijit.form.nls.validate.ko={"rangeMessage": "* 이 값은 범위를 벗어납니다. ", "invalidMessage": "* 입력한 값이 유효하지 않습니다. ", "missingMessage": "* 이 값은 필수입니다. "};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.ko");dijit.form.nls.ComboBox.ko={"previousMessage": "이전 선택사항", "nextMessage": "기타 선택사항"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.ko");dojo.cldr.nls.currency.ko={"HKD_displayName": "홍콩 달러", "CHF_displayName": "스위스 프랑달러", "JPY_symbol": "¥", "CAD_displayName": "캐나다 달러", "USD_symbol": "US$", "AUD_displayName": "호주 달러", "JPY_displayName": "일본 엔화", "USD_displayName": "미국 달러", "GBP_displayName": "영국령 파운드 스털링", "EUR_displayName": "유로화", "GBP_symbol": "£", "EUR_symbol": "€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.ko");dojo.cldr.nls.gregorian.ko={"dateFormat-medium": "yyyy. MM. dd", "pm": "오후", "timeFormat-full": "a hh'시' mm'분' ss'초' z", "months-standAlone-narrow": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], "eraNames": ["서력기원전", "서력기원"], "am": "오전", "days-standAlone-narrow": ["일", "월", "화", "수", "목", "금", "토"], "timeFormat-medium": "a hh'시' mm'분'", "dateFormat-long": "yyyy'년' M'월' d'일'", "dateFormat-short": "yy. MM. dd", "months-format-wide": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], "timeFormat-short": "a hh'시' mm'분'", "months-format-abbr": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], "days-format-wide": ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"], "timeFormat-long": "a hh'시' mm'분' ss'초'", "eraAbbr": ["기원전", "서기"], "dateFormat-full": "yyyy'년' M'월' d'일' EEEE", "days-format-abbr": ["일", "월", "화", "수", "목", "금", "토"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Era": "{0} {1}", "quarters-format-wide": ["Q1", "Q2", "Q3", "Q4"]};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.ko");dijit.nls.Textarea.ko={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_ko");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.ko");dojo.nls.colors.ko={"lightsteelblue":"라이트 스틸 블루(light steel blue)","orangered":"오렌지 레드(orange red)","midnightblue":"미드나잇 블루(midnight blue)","cadetblue":"카뎃 블루(cadet blue)","seashell":"씨쉘(seashell)","slategrey":"슬레이트 그레이(slate gray)","coral":"코랄(coral)","darkturquoise":"다크 터콰즈(dark turquoise)","antiquewhite":"앤틱 화이트(antique white)","mediumspringgreen":"미디엄 스프링 그린(medium spring green)","salmon":"샐몬(salmon)","darkgrey":"다크 그레이(dark gray)","ivory":"아이보리(ivory)","greenyellow":"그린 옐로우(green-yellow)","mistyrose":"미스티 로즈(misty rose)","lightsalmon":"라이트 샐몬(light salmon)","silver":"실버(silver)","dimgrey":"딤 그레이(dim gray)","orange":"오렌지(orange)","white":"화이트(white)","navajowhite":"나바호 화이트(navajo white)","royalblue":"로얄 블루(royal blue)","deeppink":"딥 핑크(deep pink)","lime":"라임(lime)","oldlace":"올드 레이스(old lace)","chartreuse":"샤르트뢰즈(chartreuse)","darkcyan":"다크 시안(dark cyan)","yellow":"옐로우(yellow)","linen":"리넨(linen)","olive":"올리브(olive)","gold":"골드(gold)","lawngreen":"론 그린(lawn green)","lightyellow":"라이트 옐로우(light yellow)","tan":"탠(tan)","darkviolet":"다크 바이올렛(dark violet)","lightslategrey":"라이트 슬레이트 그레이(light slate gray)","grey":"그레이(gray)","darkkhaki":"다크 카키(dark khaki)","green":"그린(green)","deepskyblue":"딥 스카이 블루(deep sky blue)","aqua":"아쿠아(aqua)","sienna":"시에나(sienna)","mintcream":"민트 크림(mint cream)","rosybrown":"로지 브라운(rosy brown)","mediumslateblue":"미디엄 슬레이트 블루(medium slate blue)","magenta":"마젠타(magenta)","lightseagreen":"라이트 씨 그린(light sea green)","cyan":"시안(cyan)","olivedrab":"올리브 드랩(olive drab)","darkgoldenrod":"다크 골든로드(dark goldenrod)","slateblue":"슬레이트 블루(slate blue)","mediumaquamarine":"미디엄 아쿠아마린(medium aquamarine)","lavender":"라벤더(lavender)","mediumseagreen":"미디엄 씨 그린(medium sea green)","maroon":"마룬(maroon)","darkslategray":"다크 슬레이트 그레이(dark slate gray)","mediumturquoise":"미디엄 터콰즈(medium turquoise)","ghostwhite":"고스트 화이트(ghost white)","darkblue":"다크 블루(dark blue)","mediumvioletred":"미디엄 바이올렛 레드(medium violet-red)","brown":"브라운(brown)","lightgray":"라이트 그레이(light gray)","sandybrown":"샌디 브라운(sandy brown)","pink":"핑크(pink)","firebrick":"파이어 브릭(fire brick)","indigo":"인디고(indigo)","snow":"스노우(snow)","darkorchid":"다크 오키드(dark orchid)","turquoise":"터콰즈(turquoise)","chocolate":"초콜렛(chocolate)","springgreen":"스프링 그린(spring green)","moccasin":"모카신(moccasin)","navy":"네이비(navy)","lemonchiffon":"레몬 쉬폰(lemon chiffon)","teal":"틸(teal)","floralwhite":"플로랄 화이트(floral white)","cornflowerblue":"콘플라워 블루(cornflower blue)","paleturquoise":"페일 터콰즈(pale turquoise)","purple":"퍼플(purple)","gainsboro":"게인스브로(gainsboro)","plum":"플럼(plum)","red":"레드(red)","blue":"블루(blue)","forestgreen":"포레스트 그린(forest green)","darkgreen":"다크 그린(dark green)","honeydew":"허니듀(honeydew)","darkseagreen":"다크 씨 그린(dark sea green)","lightcoral":"라이트 코랄(light coral)","palevioletred":"페일 바이올렛 레드(pale violet-red)","mediumpurple":"미디엄 퍼플(medium purple)","saddlebrown":"새들 브라운(saddle brown)","darkmagenta":"다크 마젠타(dark magenta)","thistle":"시슬(thistle)","whitesmoke":"화이트 스모크(white smoke)","wheat":"휘트(wheat)","violet":"바이올렛(violet)","lightskyblue":"라이트 스카이 블루(light sky blue)","goldenrod":"골든로드(goldenrod)","mediumblue":"미디엄 블루(medium blue)","skyblue":"스카이 블루(sky blue)","crimson":"크림슨(crimson)","darksalmon":"다크 샐몬(dark salmon)","darkred":"다크 레드(dark red)","darkslategrey":"다크 슬레이트 그레이(dark slate gray)","peru":"페루(peru)","lightgrey":"라이트 그레이(light gray)","lightgoldenrodyellow":"라이트 골든로드 옐로우(light goldenrod yellow)","blanchedalmond":"블랜치 아몬드(blanched almond)","aliceblue":"앨리스 블루(alice blue)","bisque":"비스크(bisque)","slategray":"슬레이트 그레이(slate gray)","palegoldenrod":"페일 골든로드(pale goldenrod)","darkorange":"다크 오렌지(dark orange)","aquamarine":"아쿠아마린(aquamarine)","lightgreen":"라이트 그린(light green)","burlywood":"벌리우드(burlywood)","dodgerblue":"다저 블루(dodger blue)","darkgray":"다크 그레이(dark gray)","lightcyan":"라이트 시안(light cyan)","powderblue":"파우더 블루(powder blue)","blueviolet":"블루 바이올렛(blue-violet)","orchid":"오키드(orchid)","dimgray":"딤 그레이(dim gray)","beige":"베이지(beige)","fuchsia":"후크샤(fuchsia)","lavenderblush":"라벤더 블러쉬(lavender blush)","hotpink":"핫 핑크(hot pink)","steelblue":"스틸 블루(steel blue)","tomato":"토마토(tomato)","lightpink":"라이트 핑크(light pink)","limegreen":"라임 그린(lime green)","indianred":"인디안 레드(indian red)","papayawhip":"파파야 휩(papaya whip)","lightslategray":"라이트 슬레이트 그레이(light slate gray)","gray":"그레이(gray)","mediumorchid":"미디엄 오키드(medium orchid)","cornsilk":"콘실크(cornsilk)","black":"블랙(black)","seagreen":"씨 그린(sea green)","darkslateblue":"다크 슬레이트 블루(dark slate blue)","khaki":"카키(khaki)","lightblue":"라이트 블루(light blue)","palegreen":"페일 그린(pale green)","azure":"애쥬어(azure)","peachpuff":"피치 퍼프(peach puff)","darkolivegreen":"다크 올리브 그린(dark olive green)","yellowgreen":"옐로우 그린(yellow green)"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.ko");dijit.nls.loading.ko={"loadingState":"로드 중...","errorState":"죄송합니다. 오류가 발생했습니다."};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.ko");dijit.nls.common.ko={"buttonOk":"확인","buttonCancel":"취소","buttonSave":"저장","itemClose":"닫기"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.ko");dijit._editor.nls.commands.ko={"removeFormat":"형식 제거","copy":"복사","paste":"붙여넣기","selectAll":"모두 선택","insertOrderedList":"번호 목록","insertTable":"테이블 삽입/편집","print":"인쇄","underline":"밑줄","foreColor":"전경색","htmlToggle":"HTML 소스","formatBlock":"단락 스타일","newPage":"새 페이지","insertHorizontalRule":"수평 자","delete":"삭제","insertUnorderedList":"글머리표 목록","tableProp":"테이블 특성","insertImage":"이미지 삽입","superscript":"위첨자","subscript":"아래첨자","createLink":"링크 작성","undo":"실행 취소","fullScreen":"토글 전체 화면","italic":"기울임체","fontName":"글꼴 이름","justifyLeft":"왼쪽 맞춤","unlink":"링크 제거","toggleTableBorder":"토글 테이블 테두리","viewSource":"HTML 소스 보기","fontSize":"글꼴 크기","systemShortcut":"\"${0}\" 조치는 브라우저에서 키보드 단축키를 이용해서만 사용할 수 있습니다. ${1}을(를) 사용하십시오.","indent":"들여쓰기","redo":"다시 실행","strikethrough":"취소선","justifyFull":"양쪽 맞춤","justifyCenter":"가운데 맞춤","hiliteColor":"배경색","deleteTable":"테이블 삭제","outdent":"내어쓰기","cut":"잘라내기","plainFormatBlock":"단락 스타일","toggleDir":"토글 방향","bold":"굵은체","tabIndent":"탭 들여쓰기","justifyRight":"오른쪽 맞춤","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.ko");dojo.cldr.nls.number.ko={"group":",","percentSign":"%","exponential":"E","percentFormat":"#,##0%","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":".","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","currencyFormat":"¤#,##0.00","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.ko");dijit.form.nls.validate.ko={"rangeMessage":"이 값은 범위를 벗어납니다.","invalidMessage":"입력된 값이 올바르지 않습니다.","missingMessage":"이 값은 필수입니다."};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.ko");dojo.cldr.nls.currency.ko={"HKD_displayName":"홍콩 달러","CHF_displayName":"스위스 프랑","CAD_displayName":"캐나다 달러","CNY_displayName":"중국 위안 인민폐","AUD_displayName":"호주 달러","JPY_displayName":"일본 엔화","USD_displayName":"미국 달러","GBP_displayName":"영국령 파운드 스털링","EUR_displayName":"유로화","CHF_symbol":"Fr.","JPY_symbol":"JP¥","HKD_symbol":"HK$","USD_symbol":"US$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.ko");dojo.cldr.nls.gregorian.ko={"months-format-narrow":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"요일","dateFormatItem-yQQQ":"y년 QQQ","dateFormatItem-yMEd":"yyyy. M. d. EEE","dateFormatItem-MMMEd":"MMM d일 (E)","eraNarrow":["기원전","서기"],"dateFormat-long":"y년 M월 d일","months-format-wide":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d일 EEE","dateFormat-full":"y년 M월 d일 EEEE","dateFormatItem-Md":"M. d.","field-era":"연호","dateFormatItem-yM":"yyyy. M.","months-standAlone-wide":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"timeFormat-short":"a h:mm","quarters-format-wide":["제 1/4분기","제 2/4분기","제 3/4분기","제 4/4분기"],"timeFormat-long":"a hh시 mm분 ss초 z","field-year":"년","dateFormatItem-yMMM":"y년 MMM","dateFormatItem-yQ":"y년 Q분기","field-hour":"시","dateFormatItem-MMdd":"MM. dd","months-format-abbr":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"dateFormatItem-yyQ":"yy년 Q분기","timeFormat-full":"a hh시 mm분 ss초 zzzz","am":"오전","months-standAlone-abbr":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"quarters-format-abbr":["1분기","2분기","3분기","4분기"],"quarters-standAlone-wide":["제 1/4분기","제 2/4분기","제 3/4분기","제 4/4분기"],"dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"L","days-standAlone-wide":["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],"dateFormatItem-MMMMd":"MMMM d일","dateFormatItem-yyMMM":"yy년 MMM","timeFormat-medium":"a h:mm:ss","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["1분기","2분기","3분기","4분기"],"eraAbbr":["기원전","서기"],"field-minute":"분","field-dayperiod":"오전/오후","days-standAlone-abbr":["일","월","화","수","목","금","토"],"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","dateTimeFormat-long":"{1}{0}","dateFormatItem-MMMd":"MMM d일","dateFormatItem-MEd":"M. d. (E)","dateTimeFormat-full":"{1}{0}","dateFormatItem-yMMMM":"y년 MMMM","field-day":"일","days-format-wide":["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],"field-zone":"시간대","dateFormatItem-yyyyMM":"yyyy. MM","dateFormatItem-y":"y","months-standAlone-narrow":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"dateFormatItem-yyMM":"YY. M.","days-format-abbr":["일","월","화","수","목","금","토"],"dateFormatItem-yMMMd":"y년 MMM d일","eraNames":["서력기원전","서력기원"],"days-format-narrow":["일","월","화","수","목","금","토"],"field-month":"월","days-standAlone-narrow":["일","월","화","수","목","금","토"],"dateFormatItem-MMM":"LLL","dateFormatItem-HHmm":"HH:mm","pm":"오후","dateFormatItem-MMMMEd":"MMMM d일 (E)","dateFormat-short":"yy. M. d.","field-second":"초","dateFormatItem-yMMMEd":"y년 MMM d일 EEE","dateFormatItem-Ed":"d일 (E)","field-week":"주","dateFormat-medium":"yyyy. M. d.","dateFormatItem-mmss":"mm:ss","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H시 m분 s초","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-hms":"h:mm:ss a"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.ko");dijit.form.nls.ComboBox.ko={"previousMessage":"이전 선택사항","nextMessage":"기타 선택사항"};
diff --git a/js/dojo/dijit/nls/dijit-all_pl.js b/js/dojo/dijit/nls/dijit-all_pl.js
--- a/js/dojo/dijit/nls/dijit-all_pl.js
+++ b/js/dojo/dijit/nls/dijit-all_pl.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_pl");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.pl");dojo.nls.colors.pl={"lightsteelblue": "jasny stalowoniebieski", "orangered": "pomarańczowoczerwony", "midnightblue": "ciemnogranatowy", "cadetblue": "niebieskoszary", "seashell": "muszla", "slategrey": "łupkowy szary", "coral": "koralowy", "darkturquoise": "ciemnoturkusowy", "antiquewhite": "biel antyczna", "mediumspringgreen": "średnia wiosenna zieleń", "salmon": "łososiowy", "darkgrey": "ciemnoszary", "ivory": "kość słoniowa", "greenyellow": "zielonożółty", "mistyrose": "bladoróżany", "lightsalmon": "jasnołososiowy", "silver": "srebrny", "dimgrey": "przytłumiony szary", "orange": "pomarańczowy", "white": "biały", "navajowhite": "piaskowy", "royalblue": "błękit królewski", "deeppink": "głęboki różowy", "lime": "limetkowy", "oldlace": "bladopomarańczowy", "chartreuse": "jaskrawozielony", "darkcyan": "ciemny cyjan", "yellow": "żółty", "linen": "lniany", "olive": "oliwkowy", "gold": "złoty", "lawngreen": "trawiasty", "lightyellow": "jasnożółty", "tan": "kawowy", "darkviolet": "ciemnofioletowy", "lightslategrey": "jasny łupkowy szary", "grey": "szary", "darkkhaki": "ciemny khaki", "green": "zielony", "deepskyblue": "intensywny błękit nieba", "aqua": "wodny", "sienna": "siena", "mintcream": "jasnomiętowy", "rosybrown": "różowobrązowy", "mediumslateblue": "średni łupkowy niebieski", "magenta": "magenta", "lightseagreen": "jasna morska zieleń", "cyan": "cyjan", "olivedrab": "oliwkowa zieleń", "darkgoldenrod": "ciemnogliniany", "slateblue": "łupkowy niebieski", "mediumaquamarine": "średnia akwamaryna", "lavender": "lawendowy", "mediumseagreen": "średnia morska zieleń", "maroon": "bordowy", "darkslategray": "ciemny łupkowy szary", "mediumturquoise": "średni turkusowy", "ghostwhite": "bladobiały", "darkblue": "ciemnoniebieski", "mediumvioletred": "średni fioletowoczerwony", "brown": "brązowy", "lightgray": "jasnoszary", "sandybrown": "piaskowy brąz", "pink": "różowy", "firebrick": "ceglasty", "indigo": "indygo", "snow": "śnieżny", "darkorchid": "ciemna orchidea", "turquoise": "turkusowy", "chocolate": "czekoladowy", "springgreen": "wiosenna zieleń", "moccasin": "mokasynowy", "navy": "granatowy", "lemonchiffon": "cytrynowy", "teal": "cyrankowy", "floralwhite": "kwiatowa biel", "cornflowerblue": "chabrowy", "paleturquoise": "bladoturkusowy", "purple": "purpurowy", "gainsboro": "bladoszary", "plum": "śliwkowy", "red": "czerwony", "blue": "niebieski", "forestgreen": "leśna zieleń", "darkgreen": "ciemnozielony", "honeydew": "melon", "darkseagreen": "ciemna morska zieleń", "lightcoral": "jasnokoralowy", "palevioletred": "blady fioletowoczerwony", "mediumpurple": "średnia purpura", "saddlebrown": "skórzany brązowy", "darkmagenta": "ciemna magenta", "thistle": "bladofioletowy", "whitesmoke": "przydymiony biały", "wheat": "pszeniczny", "violet": "fioletowy", "lightskyblue": "jasny błękit nieba", "goldenrod": "gliniany", "mediumblue": "średni niebieski", "skyblue": "błękit nieba", "crimson": "karmazynowy", "darksalmon": "ciemnołososiowy", "darkred": "ciemnoczerwony", "darkslategrey": "ciemny łupkowy szary", "peru": "jasnobrązowy", "lightgrey": "jasnoszary", "lightgoldenrodyellow": "jasnogliniana żółć", "blanchedalmond": "migdałowy", "aliceblue": "bladoniebieski", "bisque": "biszkoptowy", "slategray": "łupkowy szary", "palegoldenrod": "bladogliniany", "darkorange": "ciemnopomarańczowy", "aquamarine": "akwamaryna", "lightgreen": "jasnozielony", "burlywood": "kolor drewna", "dodgerblue": "błękit Dodgers", "darkgray": "ciemnoszary", "lightcyan": "jasny cyjan", "powderblue": "pudrowy niebieski", "blueviolet": "niebieskofioletowy", "orchid": "orchidea", "dimgray": "przytłumiony szary", "beige": "beżowy", "fuchsia": "fuksja", "lavenderblush": "lawendoworóżowy", "hotpink": "intensywny różowy", "steelblue": "stalowy niebieski", "tomato": "pomidorowy", "lightpink": "jasnoróżowy", "limegreen": "limetkowozielony", "indianred": "kasztanowy", "papayawhip": "papaja", "lightslategray": "jasny łupkowy szary", "gray": "szary", "mediumorchid": "średnia orchidea", "cornsilk": "kukurydziany", "black": "czarny", "seagreen": "morska zieleń", "darkslateblue": "ciemny łupkowy niebieski", "khaki": "khaki", "lightblue": "jasnoniebieski", "palegreen": "bladozielony", "azure": "lazur", "peachpuff": "brzoskwiniowy", "darkolivegreen": "ciemnooliwkowy", "yellowgreen": "żółtozielony"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.pl");dijit.nls.loading.pl={"loadingState": "Trwa ładowanie...", "errorState": "Niestety, wystąpił błąd"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.pl");dijit.nls.Textarea.pl={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.pl");dijit._editor.nls.commands.pl={"removeFormat": "Usuń formatowanie", "copy": "Kopiuj", "paste": "Wklej", "selectAll": "Wybierz wszystko", "insertOrderedList": "Lista numerowana", "insertTable": "Wstaw/edytuj tabelę", "underline": "Podkreślenie", "foreColor": "Kolor pierwszego planu", "htmlToggle": "Źródło HTML", "formatBlock": "Styl akapitu", "insertHorizontalRule": "Linia pozioma", "delete": "Usuń", "insertUnorderedList": "Lista wypunktowana", "tableProp": "Właściwość tabeli", "insertImage": "Wstaw obraz", "superscript": "Indeks górny", "subscript": "Indeks dolny", "createLink": "Utwórz odsyłacz", "undo": "Cofnij", "italic": "Kursywa", "fontName": "Nazwa czcionki", "justifyLeft": "Wyrównaj do lewej", "unlink": "Usuń odsyłacz", "toggleTableBorder": "Przełącz ramkę tabeli", "fontSize": "Wielkość czcionki", "indent": "Wcięcie", "redo": "Przywróć", "strikethrough": "Przekreślenie", "justifyFull": "Wyrównaj do lewej i prawej", "justifyCenter": "Wyrównaj do środka", "hiliteColor": "Kolor tła", "deleteTable": "Usuń tabelę", "outdent": "Usuń wcięcie", "cut": "Wytnij", "plainFormatBlock": "Styl akapitu", "bold": "Pogrubienie", "systemShortcutFF": "Działanie ${0} jest dostępne w przeglądarce Mozilla Firefox wyłącznie za pomocą skrótu klawiaturowego. Użyj ${1}.", "justifyRight": "Wyrównaj do prawej", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.pl");dojo.cldr.nls.number.pl={"scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencyFormat": "¤ #,##0.00", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.pl");dijit.nls.common.pl={"buttonCancel": "Anuluj", "buttonSave": "Zapisz", "buttonOk": "OK"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.pl");dijit.form.nls.validate.pl={"rangeMessage": "* Ta wartość jest spoza zakresu.", "invalidMessage": "* Wprowadzona wartość nie jest poprawna.", "missingMessage": "* Ta wartość jest wymagana."};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.pl");dijit.form.nls.ComboBox.pl={"previousMessage": "Poprzednie wybory", "nextMessage": "Więcej wyborów"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.pl");dojo.cldr.nls.currency.pl={"USD_symbol": "$", "EUR_displayName": "EUR", "GBP_displayName": "GBP", "JPY_displayName": "JPY", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€", "USD_displayName": "USD"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.pl");dojo.cldr.nls.gregorian.pl={"dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "eraNames": ["BCE", "CE"], "field-weekday": "Day of the Week", "months-standAlone-narrow": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "timeFormat-full": "HH:mm:ss z", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "days-standAlone-narrow": ["1", "2", "3", "4", "5", "6", "7"], "eraAbbr": ["BCE", "CE"], "dateFormat-long": "yyyy MMMM d", "timeFormat-medium": "HH:mm:ss", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateFormat-medium": "yyyy MMM d", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "timeFormat-long": "HH:mm:ss z", "months-format-abbr": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "timeFormat-short": "HH:mm", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "days-format-abbr": ["1", "2", "3", "4", "5", "6", "7"], "pm": "PM", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "am": "AM", "dateFormat-short": "yy/MM/dd", "dateFormat-full": "EEEE, yyyy MMMM dd", "months-format-wide": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "dateTimeFormats-appendItem-Era": "{0} {1}", "quarters-format-wide": ["Q1", "Q2", "Q3", "Q4"], "days-format-wide": ["1", "2", "3", "4", "5", "6", "7"]};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.pl");dijit.nls.Textarea.pl={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_pl");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.pl");dojo.nls.colors.pl={"lightsteelblue":"jasny stalowoniebieski","orangered":"pomarańczowoczerwony","midnightblue":"ciemnogranatowy","cadetblue":"niebieskoszary","seashell":"muszla","slategrey":"łupkowy szary","coral":"koralowy","darkturquoise":"ciemnoturkusowy","antiquewhite":"biel antyczna","mediumspringgreen":"średnia wiosenna zieleń","salmon":"łososiowy","darkgrey":"ciemnoszary","ivory":"kość słoniowa","greenyellow":"zielonożółty","mistyrose":"bladoróżany","lightsalmon":"jasnołososiowy","silver":"srebrny","dimgrey":"przytłumiony szary","orange":"pomarańczowy","white":"biały","navajowhite":"piaskowy","royalblue":"błękit królewski","deeppink":"głęboki różowy","lime":"limetkowy","oldlace":"bladopomarańczowy","chartreuse":"jaskrawozielony","darkcyan":"ciemny cyjan","yellow":"żółty","linen":"lniany","olive":"oliwkowy","gold":"złoty","lawngreen":"trawiasty","lightyellow":"jasnożółty","tan":"kawowy","darkviolet":"ciemnofioletowy","lightslategrey":"jasny łupkowy szary","grey":"szary","darkkhaki":"ciemny khaki","green":"zielony","deepskyblue":"intensywny błękit nieba","aqua":"wodny","sienna":"siena","mintcream":"jasnomiętowy","rosybrown":"różowobrązowy","mediumslateblue":"średni łupkowy niebieski","magenta":"magenta","lightseagreen":"jasna morska zieleń","cyan":"cyjan","olivedrab":"oliwkowa zieleń","darkgoldenrod":"ciemnogliniany","slateblue":"łupkowy niebieski","mediumaquamarine":"średnia akwamaryna","lavender":"lawendowy","mediumseagreen":"średnia morska zieleń","maroon":"bordowy","darkslategray":"ciemny łupkowy szary","mediumturquoise":"średni turkusowy","ghostwhite":"bladobiały","darkblue":"ciemnoniebieski","mediumvioletred":"średni fioletowoczerwony","brown":"brązowy","lightgray":"jasnoszary","sandybrown":"piaskowy brąz","pink":"różowy","firebrick":"ceglasty","indigo":"indygo","snow":"śnieżny","darkorchid":"ciemna orchidea","turquoise":"turkusowy","chocolate":"czekoladowy","springgreen":"wiosenna zieleń","moccasin":"mokasynowy","navy":"granatowy","lemonchiffon":"cytrynowy","teal":"cyrankowy","floralwhite":"kwiatowa biel","cornflowerblue":"chabrowy","paleturquoise":"bladoturkusowy","purple":"purpurowy","gainsboro":"bladoszary","plum":"śliwkowy","red":"czerwony","blue":"niebieski","forestgreen":"leśna zieleń","darkgreen":"ciemnozielony","honeydew":"melon","darkseagreen":"ciemna morska zieleń","lightcoral":"jasnokoralowy","palevioletred":"blady fioletowoczerwony","mediumpurple":"średnia purpura","saddlebrown":"skórzany brązowy","darkmagenta":"ciemna magenta","thistle":"bladofioletowy","whitesmoke":"przydymiony biały","wheat":"pszeniczny","violet":"fioletowy","lightskyblue":"jasny błękit nieba","goldenrod":"gliniany","mediumblue":"średni niebieski","skyblue":"błękit nieba","crimson":"karmazynowy","darksalmon":"ciemnołososiowy","darkred":"ciemnoczerwony","darkslategrey":"ciemny łupkowy szary","peru":"jasnobrązowy","lightgrey":"jasnoszary","lightgoldenrodyellow":"jasnogliniana żółć","blanchedalmond":"migdałowy","aliceblue":"bladoniebieski","bisque":"biszkoptowy","slategray":"łupkowy szary","palegoldenrod":"bladogliniany","darkorange":"ciemnopomarańczowy","aquamarine":"akwamaryna","lightgreen":"jasnozielony","burlywood":"kolor drewna","dodgerblue":"błękit Dodgers","darkgray":"ciemnoszary","lightcyan":"jasny cyjan","powderblue":"pudrowy niebieski","blueviolet":"niebieskofioletowy","orchid":"orchidea","dimgray":"przytłumiony szary","beige":"beżowy","fuchsia":"fuksja","lavenderblush":"lawendoworóżowy","hotpink":"intensywny różowy","steelblue":"stalowy niebieski","tomato":"pomidorowy","lightpink":"jasnoróżowy","limegreen":"limetkowozielony","indianred":"kasztanowy","papayawhip":"papaja","lightslategray":"jasny łupkowy szary","gray":"szary","mediumorchid":"średnia orchidea","cornsilk":"kukurydziany","black":"czarny","seagreen":"morska zieleń","darkslateblue":"ciemny łupkowy niebieski","khaki":"khaki","lightblue":"jasnoniebieski","palegreen":"bladozielony","azure":"lazur","peachpuff":"brzoskwiniowy","darkolivegreen":"ciemnooliwkowy","yellowgreen":"żółtozielony"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.pl");dijit.nls.loading.pl={"loadingState":"Ładowanie...","errorState":"Niestety, wystąpił błąd"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.pl");dijit.nls.common.pl={"buttonOk":"OK","buttonCancel":"Anuluj","buttonSave":"Zapisz","itemClose":"Zamknij"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.pl");dijit._editor.nls.commands.pl={"removeFormat":"Usuń formatowanie","copy":"Kopiuj","paste":"Wklej","selectAll":"Wybierz wszystko","insertOrderedList":"Lista numerowana","insertTable":"Wstaw/edytuj tabelę","print":"Drukuj","underline":"Podkreślenie","foreColor":"Kolor pierwszego planu","htmlToggle":"Źródło HTML","formatBlock":"Styl akapitu","newPage":"Nowa strona","insertHorizontalRule":"Linia pozioma","delete":"Usuń","insertUnorderedList":"Lista wypunktowana","tableProp":"Właściwość tabeli","insertImage":"Wstaw obraz","superscript":"Indeks górny","subscript":"Indeks dolny","createLink":"Utwórz odsyłacz","undo":"Cofnij","fullScreen":"Przełącz pełny ekran","italic":"Kursywa","fontName":"Nazwa czcionki","justifyLeft":"Wyrównaj do lewej","unlink":"Usuń odsyłacz","toggleTableBorder":"Przełącz ramkę tabeli","viewSource":"Wyświetl kod źródłowy HTML","ctrlKey":"Ctrl+${0}","fontSize":"Wielkość czcionki","systemShortcut":"Działanie ${0} jest dostępne w tej przeglądarce wyłącznie przy użyciu skrótu klawiaturowego. Należy użyć klawiszy ${1}.","indent":"Wcięcie","redo":"Ponów","strikethrough":"Przekreślenie","justifyFull":"Wyrównaj do lewej i prawej","justifyCenter":"Wyrównaj do środka","hiliteColor":"Kolor tła","deleteTable":"Usuń tabelę","outdent":"Usuń wcięcie","cut":"Wytnij","plainFormatBlock":"Styl akapitu","toggleDir":"Przełącz kierunek","bold":"Pogrubienie","tabIndent":"Wcięcie o tabulator","justifyRight":"Wyrównaj do prawej","appleKey":"⌘${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.pl");dojo.cldr.nls.number.pl={"group":" ","percentSign":"%","exponential":"E","percentFormat":"#,##0%","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":",","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","currencyFormat":"#,##0.00 ¤","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.pl");dijit.form.nls.validate.pl={"rangeMessage":"Ta wartość jest spoza zakresu.","invalidMessage":"Wprowadzona wartość jest niepoprawna.","missingMessage":"Ta wartość jest wymagana."};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.pl");dojo.cldr.nls.currency.pl={"HKD_displayName":"dolar hongkoński","CHF_displayName":"frank szwajcarski","CAD_displayName":"dolar kanadyjski","CNY_displayName":"juan renminbi","AUD_displayName":"dolar australijski","JPY_displayName":"jen japoński","USD_displayName":"dolar amerykański ","GBP_displayName":"funt szterling","EUR_displayName":"euro","CHF_symbol":"Fr.","JPY_symbol":"JP¥","HKD_symbol":"HK$","USD_symbol":"US$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.pl");dojo.cldr.nls.gregorian.pl={"dateFormatItem-yM":"yyyy-M","field-dayperiod":"Dayperiod","dateFormatItem-yQ":"yyyy Q","field-minute":"Minuta","eraNames":["p.n.e.","n.e."],"dateFormatItem-MMMEd":"d MMM E","field-weekday":"Dzień tygodnia","dateFormatItem-yQQQ":"y QQQ","dateFormatItem-MMdd":"MM-dd","days-standAlone-wide":["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"],"dateFormatItem-MMM":"LLL","months-standAlone-narrow":["s","l","m","k","m","c","l","s","w","p","l","g"],"field-era":"Era","field-hour":"Godzina","dateFormatItem-hhmm":"hh:mm a","quarters-standAlone-abbr":["1 kw.","2 kw.","3 kw.","4 kw."],"dateFormatItem-y":"y","timeFormat-full":"HH:mm:ss zzzz","months-standAlone-abbr":["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru"],"days-standAlone-narrow":["N","P","W","Ś","C","P","S"],"eraAbbr":["p.n.e.","n.e."],"dateFormatItem-yyyyMM":"yyyy-MM","dateFormatItem-yyyyMMMM":"LLLL y","dateFormat-long":"d MMMM y","timeFormat-medium":"HH:mm:ss","field-zone":"Strefa","dateFormatItem-Hm":"H:mm","dateFormatItem-yyMM":"MM/yy","dateFormat-medium":"dd-MM-yyyy","dateFormatItem-yyMMM":"MMM yy","quarters-standAlone-wide":["I kwartał","II kwartał","III kwartał","IV kwartał"],"dateFormatItem-yMMMM":"LLLL y","dateFormatItem-ms":"mm:ss","field-year":"Rok","quarters-standAlone-narrow":["1","2","3","4"],"dateFormatItem-HHmmss":"HH:mm:ss","months-standAlone-wide":["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],"field-week":"Tydzień","dateFormatItem-MMMMEd":"d MMMM E","dateFormatItem-MMMd":"MMM d","dateFormatItem-HHmm":"HH:mm","dateFormatItem-yyQ":"Q yy","timeFormat-long":"HH:mm:ss z","months-format-abbr":["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru"],"timeFormat-short":"HH:mm","field-month":"Miesiąc","quarters-format-abbr":["K1","K2","K3","K4"],"dateFormatItem-MMMMd":"d MMMM","days-format-abbr":["niedz.","pon.","wt.","śr.","czw.","pt.","sob."],"pm":"PM","dateFormatItem-M":"L","dateFormatItem-mmss":"mm:ss","days-format-narrow":["N","P","W","Ś","C","P","S"],"field-second":"Sekunda","field-day":"Dzień","dateFormatItem-MEd":"E, M-d","months-format-narrow":["s","l","m","k","m","c","l","s","w","p","l","g"],"dateFormatItem-hhmmss":"hh:mm:ss a","am":"AM","days-standAlone-abbr":["niedz.","pon.","wt.","śr.","czw.","pt.","sob."],"dateFormat-short":"dd-MM-yy","dateFormatItem-yMMMEd":"EEE, d MMM y","dateFormat-full":"EEEE, d MMMM y","dateFormatItem-Md":"d.M","dateFormatItem-yMEd":"EEE, d.M.yyyy","months-format-wide":["stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","września","października","listopada","grudnia"],"dateFormatItem-d":"d","quarters-format-wide":["I kwartał","II kwartał","III kwartał","IV kwartał"],"days-format-wide":["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"],"eraNarrow":["p.n.e.","n.e."],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d EEE","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateFormatItem-yMMM":"y MMM","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","dateTimeFormat-full":"{1} {0}","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.pl");dijit.form.nls.ComboBox.pl={"previousMessage":"Poprzednie wybory","nextMessage":"Więcej wyborów"};
diff --git a/js/dojo/dijit/nls/dijit-all_pt-br.js b/js/dojo/dijit/nls/dijit-all_pt-br.js
--- a/js/dojo/dijit/nls/dijit-all_pt-br.js
+++ b/js/dojo/dijit/nls/dijit-all_pt-br.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_pt-br");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.pt_br");dojo.nls.colors.pt_br={"lightsteelblue": "azul metálico claro", "orangered": "vermelho-alaranjado", "midnightblue": "azul noturno", "cadetblue": "azul-cadete", "seashell": "concha marinha", "slategrey": "ardósia cinza", "coral": "coral", "darkturquoise": "turquesa-escuro", "antiquewhite": "branco velho", "mediumspringgreen": "verde primavera médio", "salmon": "salmão", "darkgrey": "cinza-escuro", "ivory": "marfim", "greenyellow": "verde-amarelado", "mistyrose": "rosa nublado", "lightsalmon": "salmão claro", "silver": "prata", "dimgrey": "cinza-escuro", "orange": "laranja", "white": "branco", "navajowhite": "branco navajo", "royalblue": "azul real", "deeppink": "rosa profundo", "lime": "lima", "oldlace": "fita velha", "chartreuse": "verde-amarelado", "darkcyan": "ciano-escuro", "yellow": "amarelo", "linen": "linho", "olive": "verde-oliva", "gold": "dourado", "lawngreen": "verde grama", "lightyellow": "amarelo-claro", "tan": "canela", "darkviolet": "violeta-escuro", "lightslategrey": "ardósia cinza-claro", "grey": "cinza", "darkkhaki": "cáqui-escuro", "green": "verde", "deepskyblue": "azul celeste profundo", "aqua": "azul-água", "sienna": "marrom-avermelhado", "mintcream": "menta", "rosybrown": "marrom rosado", "mediumslateblue": "ardósia azul médio", "magenta": "magenta", "lightseagreen": "verde-mar claro", "cyan": "ciano", "olivedrab": "verde-acastanhado", "darkgoldenrod": "ouro-escuro", "slateblue": "ardósia azul", "mediumaquamarine": "verde-azulado temperado", "lavender": "lavanda", "mediumseagreen": "verde mar temperado", "maroon": "castanho", "darkslategray": "ardósia cinza-escuro", "mediumturquoise": "turquesa médio", "ghostwhite": "branco sombreado", "darkblue": "azul-escuro", "mediumvioletred": "violeta avermelhado médio", "brown": "marrom", "lightgray": "cinza-claro", "sandybrown": "marrom arenoso", "pink": "rosado", "firebrick": "tijolo queimado", "indigo": "índigo", "snow": "branco neve", "darkorchid": "orquídea-escuro", "turquoise": "turquesa", "chocolate": "chocolate", "springgreen": "verde primavera", "moccasin": "mocassim", "navy": "marinho", "lemonchiffon": "gaze limão", "teal": "azul-esverdeado", "floralwhite": "branco floral", "cornflowerblue": "centáurea azul", "paleturquoise": "turquesa pálida", "purple": "púrpura", "gainsboro": "gainsboro", "plum": "ameixa", "red": "vermelho", "blue": "azul", "forestgreen": "verde floresta", "darkgreen": "verde-escuro", "honeydew": "verde mel", "darkseagreen": "verde-mar escuro", "lightcoral": "coral-claro", "palevioletred": "violeta pálida", "mediumpurple": "púrpura temperado", "saddlebrown": "marrom couro", "darkmagenta": "magenta-escuro", "thistle": "cardo", "whitesmoke": "branco esfumaçado", "wheat": "trigo", "violet": "violeta", "lightskyblue": "azul celeste claro", "goldenrod": "ouro", "mediumblue": "azul temperado", "skyblue": "azul celeste", "crimson": "carmim", "darksalmon": "salmão escuro", "darkred": "vermelho-escuro", "darkslategrey": "ardósia cinza-escuro", "peru": "peru", "lightgrey": "cinza-claro", "lightgoldenrodyellow": "amarelo-claro", "blanchedalmond": "branco-amêndoa", "aliceblue": "azul-bebê", "bisque": "biscuit", "slategray": "ardósia cinza", "palegoldenrod": "ouro pálido", "darkorange": "laranja-escuro", "aquamarine": "água-marinha", "lightgreen": "verde-claro", "burlywood": "madeira", "dodgerblue": "azul fugidio", "darkgray": "cinza-escuro", "lightcyan": "ciano-claro", "powderblue": "azul pólvora", "blueviolet": "violeta azulado", "orchid": "orquídea", "dimgray": "cinza-escuro", "beige": "bege", "fuchsia": "fúcsia", "lavenderblush": "lavanda avermelhada", "hotpink": "rosa quente", "steelblue": "azul metálico", "tomato": "vermelho tomate", "lightpink": "rosa-claro", "limegreen": "verde lima", "indianred": "vermelho oriental", "papayawhip": "mamão papaia", "lightslategray": "ardósia cinza-claro", "gray": "cinza", "mediumorchid": "orquídea temperado", "cornsilk": "fios de milho", "black": "preto", "seagreen": "verde-mar", "darkslateblue": "ardósia azul-escuro", "khaki": "cáqui", "lightblue": "azul-claro", "palegreen": "verde pálido", "azure": "azul-celeste", "peachpuff": "pêssego", "darkolivegreen": "verde-oliva escuro", "yellowgreen": "amarelo esverdeado"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.pt_br");dijit.nls.loading.pt_br={"loadingState": "Carregando...", "errorState": "Ocorreu um erro"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.pt_br");dijit.nls.Textarea.pt_br={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.pt_br");dijit._editor.nls.commands.pt_br={"removeFormat": "Remover Formato", "copy": "Copiar", "paste": "Colar", "selectAll": "Selecionar Todos", "insertOrderedList": "Lista Numerada", "insertTable": "Inserir/Editar Tabela", "underline": "Sublinhado", "foreColor": "Cor do Primeiro Plano", "htmlToggle": "Origem HTML", "formatBlock": "Estilo de Parágrafo", "insertHorizontalRule": "Régua Horizontal", "delete": "Excluir ", "insertUnorderedList": "Lista com Marcadores", "tableProp": "Propriedade da Tabela", "insertImage": "Inserir Imagem", "superscript": "Sobrescrito", "subscript": "Subscrito", "createLink": "Criar Link", "undo": "Desfazer", "italic": "Itálico", "fontName": "Nome da Fonte", "justifyLeft": "Alinhar pela Esquerda", "unlink": "Remover Link", "toggleTableBorder": "Alternar Moldura da Tabela", "fontSize": "Tamanho da Fonte", "indent": "Recuar", "redo": "Refazer", "strikethrough": "Tachado", "justifyFull": "Justificar", "justifyCenter": "Alinhar pelo Centro", "hiliteColor": "Cor de segundo plano", "deleteTable": "Excluir Tabela", "outdent": "Avançar", "cut": "Recortar", "plainFormatBlock": "Estilo de Parágrafo", "bold": "Negrito", "systemShortcutFF": "A ação \"${0}\" está disponível apenas no Mozilla Firefox utilizando um atalho do teclado. Utilize ${1}.", "justifyRight": "Alinhar pela Direita", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.pt_br");dojo.cldr.nls.number.pt_br={"group": ".", "decimal": ",", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencyFormat": "¤ #,##0.00", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.pt_br");dijit.nls.common.pt_br={"buttonCancel": "Cancelar ", "buttonSave": "Salvar", "buttonOk": "OK"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.pt_br");dijit.form.nls.validate.pt_br={"rangeMessage": "* Esse valor está fora do intervalo.", "invalidMessage": "* O valor digitado não é válido.", "missingMessage": "* Esse valor é necessário."};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.pt_br");dijit.form.nls.ComboBox.pt_br={"previousMessage": "Opções anteriores", "nextMessage": "Mais opções"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.pt_br");dojo.cldr.nls.currency.pt_br={"EUR_displayName": "Euro", "CHF_displayName": "Franco suíço", "HKD_displayName": "Dólar de Hong Kong", "CAD_displayName": "Dólar canadense", "GBP_displayName": "Libra esterlina britânica", "JPY_displayName": "Iene japonês", "AUD_displayName": "Dólar australiano", "USD_displayName": "Dólar norte-americano", "USD_symbol": "$", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.pt_br");dojo.cldr.nls.gregorian.pt_br={"field-hour": "Hora", "field-dayperiod": "Período do dia", "field-minute": "Minuto", "timeFormat-full": "HH'h'mm'min'ss's' z", "field-week": "Semana", "field-weekday": "Dia da semana", "field-second": "Segundo", "dateFormat-medium": "dd/MM/yyyy", "field-day": "Dia", "timeFormat-long": "H'h'm'min's's' z", "field-month": "Mês", "field-year": "Ano", "dateFormat-short": "dd/MM/yy", "field-zone": "Fuso", "eraAbbr": ["a.C.", "d.C."], "months-format-abbr": ["jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez"], "dateFormat-full": "EEEE, d' de 'MMMM' de 'yyyy", "days-format-abbr": ["dom", "seg", "ter", "qua", "qui", "sex", "sáb"], "quarters-format-wide": ["1º trimestre", "2º trimestre", "3º trimestre", "4º trimestre"], "quarters-format-abbreviated": ["T1", "T2", "T3", "T4"], "months-format-wide": ["janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"], "months-standAlone-narrow": ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], "days-standAlone-narrow": ["D", "S", "T", "Q", "Q", "S", "S"], "dateFormat-long": "d' de 'MMMM' de 'yyyy", "days-format-wide": ["domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "eraNames": ["BCE", "CE"], "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "timeFormat-medium": "HH:mm:ss", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateTimeFormat": "{1} {0}", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "timeFormat-short": "HH:mm", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "pm": "PM", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "am": "AM", "dateTimeFormats-appendItem-Era": "{0} {1}"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.pt_br");dijit.nls.Textarea.pt_br={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_pt-br");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.pt_br");dojo.nls.colors.pt_br={"lightsteelblue":"azul-aço claro","orangered":"vermelho alaranjado","midnightblue":"azul meia-noite","cadetblue":"azul cadet","seashell":"seashell","slategrey":"cinza-ardósia","coral":"coral","darkturquoise":"turquesa escuro","antiquewhite":"branco antigo","mediumspringgreen":"verde-primavera médio","salmon":"salmão","darkgrey":"cinza escuro","ivory":"marfim","greenyellow":"amarelo esverdeado","mistyrose":"rosa enevoado","lightsalmon":"salmão claro","silver":"prateado","dimgrey":"cinza turvo","orange":"laranja","white":"branco","navajowhite":"branco navajo","royalblue":"azul royal","deeppink":"rosa profundo","lime":"lima","oldlace":"cadarço velho","chartreuse":"chartreuse","darkcyan":"ciano escuro","yellow":"amarelo","linen":"linho","olive":"oliva","gold":"dourado","lawngreen":"verde grama","lightyellow":"amarelo claro","tan":"tan","darkviolet":"violeta escuro","lightslategrey":"cinza-ardósia claro","grey":"cinza","darkkhaki":"cáqui escuro","green":"verde","deepskyblue":"azul-céu intenso","aqua":"aqua","sienna":"sienna","mintcream":"creme de menta","rosybrown":"marrom rosado","mediumslateblue":"azul-ardósia médio","magenta":"magenta","lightseagreen":"verde marinho claro","cyan":"ciano","olivedrab":"verde oliva","darkgoldenrod":"goldenrod escuro","slateblue":"azul-ardósia","mediumaquamarine":"água-marinha médio","lavender":"lavanda","mediumseagreen":"verde-marinho médio","maroon":"marrom","darkslategray":"cinza-ardósia escuro","mediumturquoise":"turquesa médio","ghostwhite":"branco ghost","darkblue":"azul escuro","mediumvioletred":"vermelho-violeta médio","brown":"marrom","lightgray":"cinza claro","sandybrown":"marrom cor de areia","pink":"rosa","firebrick":"firebrick","indigo":"índigo","snow":"branco neve","darkorchid":"orquídea escuro","turquoise":"turquesa","chocolate":"chocolate","springgreen":"verde primavera","moccasin":"moccasin","navy":"marinho","lemonchiffon":"limão chiffon","teal":"azul esverdeado","floralwhite":"branco floral","cornflowerblue":"azul centaurea","paleturquoise":"turquesa esbranquiçado","purple":"roxo","gainsboro":"gainsboro","plum":"ameixa","red":"vermelho","blue":"azul","forestgreen":"verde floresta","darkgreen":"verde escuro","honeydew":"honeydew","darkseagreen":"verde marinho escuro","lightcoral":"coral claro","palevioletred":"vermelho-violeta esbranquiçado","mediumpurple":"roxo médio","saddlebrown":"marrom saddle","darkmagenta":"magenta escuro","thistle":"thistle","whitesmoke":"fumaça branca","wheat":"trigo","violet":"violeta","lightskyblue":"azul-céu claro","goldenrod":"goldenrod","mediumblue":"azul médio","skyblue":"azul-céu","crimson":"carmesim","darksalmon":"salmão escuro","darkred":"vermelho escuro","darkslategrey":"cinza-ardósia escuro","peru":"peru","lightgrey":"cinza claro","lightgoldenrodyellow":"amarelo goldenrod claro","blanchedalmond":"amêndoa pelada","aliceblue":"azul alice","bisque":"bisque","slategray":"cinza-ardósia","palegoldenrod":"goldenrod esbranquiçado","darkorange":"laranja escuro","aquamarine":"água-marinha","lightgreen":"verde claro","burlywood":"burlywood","dodgerblue":"azul dodger","darkgray":"cinza escuro","lightcyan":"ciano claro","powderblue":"azul-talco","blueviolet":"azul-violeta","orchid":"orquídea","dimgray":"cinza turvo","beige":"bege","fuchsia":"fúcsia","lavenderblush":"lavanda avermelhada","hotpink":"rosa quente","steelblue":"azul-aço","tomato":"tomate","lightpink":"rosa claro","limegreen":"verde-lima","indianred":"vermelho indiano","papayawhip":"creme de papaya","lightslategray":"cinza-ardósia claro","gray":"cinza","mediumorchid":"orquídea médio","cornsilk":"cornsilk","black":"preto","seagreen":"verde-marinho","darkslateblue":"azul-ardósia escuro","khaki":"cáqui","lightblue":"azul claro","palegreen":"verde esbranquiçado","azure":"azul-celeste","peachpuff":"peach puff","darkolivegreen":"verde oliva escuro","yellowgreen":"verde amarelado"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.pt_br");dijit.nls.loading.pt_br={"loadingState":"Carregando...","errorState":"Desculpe, ocorreu um erro"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.pt_br");dijit.nls.common.pt_br={"buttonOk":"OK","buttonCancel":"Cancelar","buttonSave":"Salvar","itemClose":"Fechar"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.pt_br");dijit._editor.nls.commands.pt_br={"removeFormat":"Remover Formato","copy":"Copiar","paste":"Colar","selectAll":"Selecionar Todos","insertOrderedList":"Lista Numerada","insertTable":"Inserir/Editar Tabela","print":"Impressão","underline":"Sublinhado","foreColor":"Cor do Primeiro Plano","htmlToggle":"Origem HTML","formatBlock":"Estilo de Parágrafo","newPage":"Nova Página","insertHorizontalRule":"Régua Horizontal","delete":"Excluir","insertUnorderedList":"Lista com Marcadores","tableProp":"Propriedade da Tabela","insertImage":"Inserir Imagem","superscript":"Sobrescrito","subscript":"Subscrito","createLink":"Criar Link","undo":"Desfazer","fullScreen":"Comutar Tela Cheia","italic":"Itálico","fontName":"Nome da Fonte","justifyLeft":"Alinhar pela Esquerda","unlink":"Remover Link","toggleTableBorder":"Alternar Moldura da Tabela","viewSource":"Visualizar Origem HTML","fontSize":"Tamanho da Fonte","systemShortcut":"A ação \"${0}\" está disponível em seu navegador apenas usando um atalho do teclado. Use ${1}.","indent":"Recuar","redo":"Refazer","strikethrough":"Tachado","justifyFull":"Justificar","justifyCenter":"Alinhar pelo Centro","hiliteColor":"Cor de segundo plano","deleteTable":"Excluir Tabela","outdent":"Não-chanfrado","cut":"Recortar","plainFormatBlock":"Estilo de Parágrafo","toggleDir":"Comutar Direção","bold":"Negrito","tabIndent":"Recuo de Guia","justifyRight":"Alinhar pela Direita","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.pt_br");dojo.cldr.nls.number.pt_br={"group":".","percentSign":"%","exponential":"E","percentFormat":"#,##0%","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":",","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","currencyFormat":"¤#,##0.00;(¤#,##0.00)","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.pt_br");dijit.form.nls.validate.pt_br={"rangeMessage":"Este valor está fora do intervalo. ","invalidMessage":"O valor inserido não é válido.","missingMessage":"Este valor é necessário."};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.pt_br");dojo.cldr.nls.currency.pt_br={"HKD_displayName":"Dólar de Hong Kong","CHF_displayName":"Franco suíço","CAD_displayName":"Dólar canadense","CNY_displayName":"Yuan Renminbi chinês","AUD_displayName":"Dólar australiano","JPY_displayName":"Iene japonês","USD_displayName":"Dólar norte-americano","GBP_displayName":"Libra esterlina britânica","EUR_displayName":"Euro","CHF_symbol":"Fr.","JPY_symbol":"JP¥","HKD_symbol":"HK$","USD_symbol":"US$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.pt_br");dojo.cldr.nls.gregorian.pt_br={"field-hour":"Hora","field-dayperiod":"Período do dia","field-minute":"Minuto","timeFormat-full":"HH'h'mm'min'ss's' z","field-week":"Semana","field-weekday":"Dia da semana","field-second":"Segundo","dateFormat-medium":"dd/MM/yyyy","field-day":"Dia","timeFormat-long":"H'h'm'min's's' z","field-month":"Mês","field-year":"Ano","dateFormat-short":"dd/MM/yy","field-zone":"Fuso","months-format-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"quarters-standAlone-narrow":["1","2","3","4"],"dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"EEE, dd/MM/yyyy","dateFormatItem-MMMEd":"EEE, d 'de' MMM","eraNarrow":["a.C.","d.C."],"dateFormat-long":"d 'de' MMMM 'de' y","months-format-wide":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],"dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"EEE, d","dateFormat-full":"EEEE, d 'de' MMMM 'de' y","dateFormatItem-Md":"d/M","field-era":"Era","dateFormatItem-yM":"MM/yyyy","months-standAlone-wide":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],"timeFormat-short":"HH:mm","quarters-format-wide":["1º trimestre","2º trimestre","3º trimestre","4º trimestre"],"dateFormatItem-yMMM":"MMM 'de' y","dateFormatItem-yQ":"yyyy Q","dateFormatItem-MMdd":"dd/MM","months-format-abbr":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],"dateFormatItem-yyQ":"Q yy","am":"AM","months-standAlone-abbr":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],"quarters-format-abbr":["T1","T2","T3","T4"],"quarters-standAlone-wide":["1º trimestre","2º trimestre","3º trimestre","4º trimestre"],"dateFormatItem-HHmmss":"H'h'mm'min'ss's'","dateFormatItem-M":"L","days-standAlone-wide":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"dateFormatItem-yyyyMMM":"MMM 'de' y","dateFormatItem-MMMMd":"d 'de' MMMM","dateFormatItem-yyMMMEEEd":"EEE, d 'de' MMM 'de' yy","dateFormatItem-yyMMM":"MMM 'de' yy","timeFormat-medium":"HH:mm:ss","dateFormatItem-Hm":"H'h'mm","quarters-standAlone-abbr":["T1","T2","T3","T4"],"eraAbbr":["a.C.","d.C."],"days-standAlone-abbr":["dom","seg","ter","qua","qui","sex","sáb"],"dateFormatItem-yyMMMd":"d 'de' MMM 'de' yy","dateFormatItem-d":"d","dateFormatItem-ms":"mm'min'ss's'","dateFormatItem-MMMd":"d 'de' MMM","dateFormatItem-MEd":"EEE, dd/MM","dateFormatItem-yMMMM":"MMMM 'de' y","days-format-wide":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"dateFormatItem-yyyyMM":"MM/yyyy","dateFormatItem-y":"y","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-yyMM":"MM/yy","days-format-abbr":["dom","seg","ter","qua","qui","sex","sáb"],"eraNames":["Antes de Cristo","Ano do Senhor"],"days-format-narrow":["D","S","T","Q","Q","S","S"],"days-standAlone-narrow":["D","S","T","Q","Q","S","S"],"dateFormatItem-MMM":"LLL","dateFormatItem-HHmm":"HH'h'mm","pm":"PM","dateFormatItem-MMMMEd":"EEE, d 'de' MMMM","dateFormatItem-yMMMEd":"EEE, d 'de' MMM 'de' y","dateFormatItem-mmss":"mm'min'ss's'","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","dateTimeFormat-full":"{1} {0}","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.pt_br");dijit.form.nls.ComboBox.pt_br={"previousMessage":"Opções anteriores","nextMessage":"Mais opções"};
diff --git a/js/dojo/dijit/nls/dijit-all_pt.js b/js/dojo/dijit/nls/dijit-all_pt.js
--- a/js/dojo/dijit/nls/dijit-all_pt.js
+++ b/js/dojo/dijit/nls/dijit-all_pt.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_pt");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.pt");dojo.nls.colors.pt={"lightsteelblue": "azul metálico claro", "orangered": "vermelho-alaranjado", "midnightblue": "azul noturno", "cadetblue": "azul-cadete", "seashell": "concha marinha", "slategrey": "ardósia cinza", "coral": "coral", "darkturquoise": "turquesa-escuro", "antiquewhite": "branco velho", "mediumspringgreen": "verde primavera médio", "salmon": "salmão", "darkgrey": "cinza-escuro", "ivory": "marfim", "greenyellow": "verde-amarelado", "mistyrose": "rosa nublado", "lightsalmon": "salmão claro", "silver": "prata", "dimgrey": "cinza-escuro", "orange": "laranja", "white": "branco", "navajowhite": "branco navajo", "royalblue": "azul real", "deeppink": "rosa profundo", "lime": "lima", "oldlace": "fita velha", "chartreuse": "verde-amarelado", "darkcyan": "ciano-escuro", "yellow": "amarelo", "linen": "linho", "olive": "verde-oliva", "gold": "dourado", "lawngreen": "verde grama", "lightyellow": "amarelo-claro", "tan": "canela", "darkviolet": "violeta-escuro", "lightslategrey": "ardósia cinza-claro", "grey": "cinza", "darkkhaki": "cáqui-escuro", "green": "verde", "deepskyblue": "azul celeste profundo", "aqua": "azul-água", "sienna": "marrom-avermelhado", "mintcream": "menta", "rosybrown": "marrom rosado", "mediumslateblue": "ardósia azul médio", "magenta": "magenta", "lightseagreen": "verde-mar claro", "cyan": "ciano", "olivedrab": "verde-acastanhado", "darkgoldenrod": "ouro-escuro", "slateblue": "ardósia azul", "mediumaquamarine": "verde-azulado temperado", "lavender": "lavanda", "mediumseagreen": "verde mar temperado", "maroon": "castanho", "darkslategray": "ardósia cinza-escuro", "mediumturquoise": "turquesa médio", "ghostwhite": "branco sombreado", "darkblue": "azul-escuro", "mediumvioletred": "violeta avermelhado médio", "brown": "marrom", "lightgray": "cinza-claro", "sandybrown": "marrom arenoso", "pink": "rosado", "firebrick": "tijolo queimado", "indigo": "índigo", "snow": "branco neve", "darkorchid": "orquídea-escuro", "turquoise": "turquesa", "chocolate": "chocolate", "springgreen": "verde primavera", "moccasin": "mocassim", "navy": "marinho", "lemonchiffon": "gaze limão", "teal": "azul-esverdeado", "floralwhite": "branco floral", "cornflowerblue": "centáurea azul", "paleturquoise": "turquesa pálida", "purple": "púrpura", "gainsboro": "gainsboro", "plum": "ameixa", "red": "vermelho", "blue": "azul", "forestgreen": "verde floresta", "darkgreen": "verde-escuro", "honeydew": "verde mel", "darkseagreen": "verde-mar escuro", "lightcoral": "coral-claro", "palevioletred": "violeta pálida", "mediumpurple": "púrpura temperado", "saddlebrown": "marrom couro", "darkmagenta": "magenta-escuro", "thistle": "cardo", "whitesmoke": "branco esfumaçado", "wheat": "trigo", "violet": "violeta", "lightskyblue": "azul celeste claro", "goldenrod": "ouro", "mediumblue": "azul temperado", "skyblue": "azul celeste", "crimson": "carmim", "darksalmon": "salmão escuro", "darkred": "vermelho-escuro", "darkslategrey": "ardósia cinza-escuro", "peru": "peru", "lightgrey": "cinza-claro", "lightgoldenrodyellow": "amarelo-claro", "blanchedalmond": "branco-amêndoa", "aliceblue": "azul-bebê", "bisque": "biscuit", "slategray": "ardósia cinza", "palegoldenrod": "ouro pálido", "darkorange": "laranja-escuro", "aquamarine": "água-marinha", "lightgreen": "verde-claro", "burlywood": "madeira", "dodgerblue": "azul fugidio", "darkgray": "cinza-escuro", "lightcyan": "ciano-claro", "powderblue": "azul pólvora", "blueviolet": "violeta azulado", "orchid": "orquídea", "dimgray": "cinza-escuro", "beige": "bege", "fuchsia": "fúcsia", "lavenderblush": "lavanda avermelhada", "hotpink": "rosa quente", "steelblue": "azul metálico", "tomato": "vermelho tomate", "lightpink": "rosa-claro", "limegreen": "verde lima", "indianred": "vermelho oriental", "papayawhip": "mamão papaia", "lightslategray": "ardósia cinza-claro", "gray": "cinza", "mediumorchid": "orquídea temperado", "cornsilk": "fios de milho", "black": "preto", "seagreen": "verde-mar", "darkslateblue": "ardósia azul-escuro", "khaki": "cáqui", "lightblue": "azul-claro", "palegreen": "verde pálido", "azure": "azul-celeste", "peachpuff": "pêssego", "darkolivegreen": "verde-oliva escuro", "yellowgreen": "amarelo esverdeado"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.pt");dijit.nls.loading.pt={"loadingState": "Carregando...", "errorState": "Ocorreu um erro"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.pt");dijit.nls.Textarea.pt={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.pt");dijit._editor.nls.commands.pt={"removeFormat": "Remover Formato", "copy": "Copiar", "paste": "Colar", "selectAll": "Selecionar Todos", "insertOrderedList": "Lista Numerada", "insertTable": "Inserir/Editar Tabela", "underline": "Sublinhado", "foreColor": "Cor do Primeiro Plano", "htmlToggle": "Origem HTML", "formatBlock": "Estilo de Parágrafo", "insertHorizontalRule": "Régua Horizontal", "delete": "Excluir ", "insertUnorderedList": "Lista com Marcadores", "tableProp": "Propriedade da Tabela", "insertImage": "Inserir Imagem", "superscript": "Sobrescrito", "subscript": "Subscrito", "createLink": "Criar Link", "undo": "Desfazer", "italic": "Itálico", "fontName": "Nome da Fonte", "justifyLeft": "Alinhar pela Esquerda", "unlink": "Remover Link", "toggleTableBorder": "Alternar Moldura da Tabela", "fontSize": "Tamanho da Fonte", "indent": "Recuar", "redo": "Refazer", "strikethrough": "Tachado", "justifyFull": "Justificar", "justifyCenter": "Alinhar pelo Centro", "hiliteColor": "Cor de segundo plano", "deleteTable": "Excluir Tabela", "outdent": "Avançar", "cut": "Recortar", "plainFormatBlock": "Estilo de Parágrafo", "bold": "Negrito", "systemShortcutFF": "A ação \"${0}\" está disponível apenas no Mozilla Firefox utilizando um atalho do teclado. Utilize ${1}.", "justifyRight": "Alinhar pela Direita", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.pt");dojo.cldr.nls.number.pt={"group": ".", "decimal": ",", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencyFormat": "¤ #,##0.00", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.pt");dijit.nls.common.pt={"buttonCancel": "Cancelar ", "buttonSave": "Salvar", "buttonOk": "OK"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.pt");dijit.form.nls.validate.pt={"rangeMessage": "* Esse valor está fora do intervalo.", "invalidMessage": "* O valor digitado não é válido.", "missingMessage": "* Esse valor é necessário."};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.pt");dijit.form.nls.ComboBox.pt={"previousMessage": "Opções anteriores", "nextMessage": "Mais opções"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.pt");dojo.cldr.nls.currency.pt={"EUR_displayName": "Euro", "CHF_displayName": "Franco suíço", "HKD_displayName": "Dólar de Hong Kong", "CAD_displayName": "Dólar canadense", "GBP_displayName": "Libra esterlina britânica", "JPY_displayName": "Iene japonês", "AUD_displayName": "Dólar australiano", "USD_displayName": "Dólar norte-americano", "USD_symbol": "$", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.pt");dojo.cldr.nls.gregorian.pt={"timeFormat-full": "HH'H'mm'm'ss's' z", "eraAbbr": ["a.C.", "d.C."], "dateFormat-medium": "d/MMM/yyyy", "months-format-abbr": ["jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez"], "dateFormat-full": "EEEE, d' de 'MMMM' de 'yyyy", "days-format-abbr": ["dom", "seg", "ter", "qua", "qui", "sex", "sáb"], "quarters-format-wide": ["1º trimestre", "2º trimestre", "3º trimestre", "4º trimestre"], "dateFormat-short": "dd-MM-yyyy", "quarters-format-abbreviated": ["T1", "T2", "T3", "T4"], "months-format-wide": ["janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"], "months-standAlone-narrow": ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], "days-standAlone-narrow": ["D", "S", "T", "Q", "Q", "S", "S"], "dateFormat-long": "d' de 'MMMM' de 'yyyy", "days-format-wide": ["domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "eraNames": ["BCE", "CE"], "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "timeFormat-medium": "HH:mm:ss", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "timeFormat-long": "HH:mm:ss z", "timeFormat-short": "HH:mm", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "pm": "PM", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "am": "AM", "dateTimeFormats-appendItem-Era": "{0} {1}"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.pt");dijit.nls.Textarea.pt={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_pt");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.pt");dojo.nls.colors.pt={"lightsteelblue":"azul-aço claro","orangered":"vermelho alaranjado","midnightblue":"azul meia-noite","cadetblue":"azul cadet","seashell":"seashell","slategrey":"cinza-ardósia","coral":"coral","darkturquoise":"turquesa escuro","antiquewhite":"branco antigo","mediumspringgreen":"verde-primavera médio","salmon":"salmão","darkgrey":"cinza escuro","ivory":"marfim","greenyellow":"amarelo esverdeado","mistyrose":"rosa enevoado","lightsalmon":"salmão claro","silver":"prateado","dimgrey":"cinza turvo","orange":"laranja","white":"branco","navajowhite":"branco navajo","royalblue":"azul royal","deeppink":"rosa profundo","lime":"lima","oldlace":"cadarço velho","chartreuse":"chartreuse","darkcyan":"ciano escuro","yellow":"amarelo","linen":"linho","olive":"oliva","gold":"dourado","lawngreen":"verde grama","lightyellow":"amarelo claro","tan":"tan","darkviolet":"violeta escuro","lightslategrey":"cinza-ardósia claro","grey":"cinza","darkkhaki":"cáqui escuro","green":"verde","deepskyblue":"azul-céu intenso","aqua":"aqua","sienna":"sienna","mintcream":"creme de menta","rosybrown":"marrom rosado","mediumslateblue":"azul-ardósia médio","magenta":"magenta","lightseagreen":"verde marinho claro","cyan":"ciano","olivedrab":"verde oliva","darkgoldenrod":"goldenrod escuro","slateblue":"azul-ardósia","mediumaquamarine":"água-marinha médio","lavender":"lavanda","mediumseagreen":"verde-marinho médio","maroon":"marrom","darkslategray":"cinza-ardósia escuro","mediumturquoise":"turquesa médio","ghostwhite":"branco ghost","darkblue":"azul escuro","mediumvioletred":"vermelho-violeta médio","brown":"marrom","lightgray":"cinza claro","sandybrown":"marrom cor de areia","pink":"rosa","firebrick":"firebrick","indigo":"índigo","snow":"branco neve","darkorchid":"orquídea escuro","turquoise":"turquesa","chocolate":"chocolate","springgreen":"verde primavera","moccasin":"moccasin","navy":"marinho","lemonchiffon":"limão chiffon","teal":"azul esverdeado","floralwhite":"branco floral","cornflowerblue":"azul centaurea","paleturquoise":"turquesa esbranquiçado","purple":"roxo","gainsboro":"gainsboro","plum":"ameixa","red":"vermelho","blue":"azul","forestgreen":"verde floresta","darkgreen":"verde escuro","honeydew":"honeydew","darkseagreen":"verde marinho escuro","lightcoral":"coral claro","palevioletred":"vermelho-violeta esbranquiçado","mediumpurple":"roxo médio","saddlebrown":"marrom saddle","darkmagenta":"magenta escuro","thistle":"thistle","whitesmoke":"fumaça branca","wheat":"trigo","violet":"violeta","lightskyblue":"azul-céu claro","goldenrod":"goldenrod","mediumblue":"azul médio","skyblue":"azul-céu","crimson":"carmesim","darksalmon":"salmão escuro","darkred":"vermelho escuro","darkslategrey":"cinza-ardósia escuro","peru":"peru","lightgrey":"cinza claro","lightgoldenrodyellow":"amarelo goldenrod claro","blanchedalmond":"amêndoa pelada","aliceblue":"azul alice","bisque":"bisque","slategray":"cinza-ardósia","palegoldenrod":"goldenrod esbranquiçado","darkorange":"laranja escuro","aquamarine":"água-marinha","lightgreen":"verde claro","burlywood":"burlywood","dodgerblue":"azul dodger","darkgray":"cinza escuro","lightcyan":"ciano claro","powderblue":"azul-talco","blueviolet":"azul-violeta","orchid":"orquídea","dimgray":"cinza turvo","beige":"bege","fuchsia":"fúcsia","lavenderblush":"lavanda avermelhada","hotpink":"rosa quente","steelblue":"azul-aço","tomato":"tomate","lightpink":"rosa claro","limegreen":"verde-lima","indianred":"vermelho indiano","papayawhip":"creme de papaya","lightslategray":"cinza-ardósia claro","gray":"cinza","mediumorchid":"orquídea médio","cornsilk":"cornsilk","black":"preto","seagreen":"verde-marinho","darkslateblue":"azul-ardósia escuro","khaki":"cáqui","lightblue":"azul claro","palegreen":"verde esbranquiçado","azure":"azul-celeste","peachpuff":"peach puff","darkolivegreen":"verde oliva escuro","yellowgreen":"verde amarelado"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.pt");dijit.nls.loading.pt={"loadingState":"Carregando...","errorState":"Desculpe, ocorreu um erro"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.pt");dijit.nls.common.pt={"buttonOk":"OK","buttonCancel":"Cancelar","buttonSave":"Salvar","itemClose":"Fechar"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.pt");dijit._editor.nls.commands.pt={"removeFormat":"Remover Formato","copy":"Copiar","paste":"Colar","selectAll":"Selecionar Todos","insertOrderedList":"Lista Numerada","insertTable":"Inserir/Editar Tabela","print":"Impressão","underline":"Sublinhado","foreColor":"Cor do Primeiro Plano","htmlToggle":"Origem HTML","formatBlock":"Estilo de Parágrafo","newPage":"Nova Página","insertHorizontalRule":"Régua Horizontal","delete":"Excluir","insertUnorderedList":"Lista com Marcadores","tableProp":"Propriedade da Tabela","insertImage":"Inserir Imagem","superscript":"Sobrescrito","subscript":"Subscrito","createLink":"Criar Link","undo":"Desfazer","fullScreen":"Comutar Tela Cheia","italic":"Itálico","fontName":"Nome da Fonte","justifyLeft":"Alinhar pela Esquerda","unlink":"Remover Link","toggleTableBorder":"Alternar Moldura da Tabela","viewSource":"Visualizar Origem HTML","fontSize":"Tamanho da Fonte","systemShortcut":"A ação \"${0}\" está disponível em seu navegador apenas usando um atalho do teclado. Use ${1}.","indent":"Recuar","redo":"Refazer","strikethrough":"Tachado","justifyFull":"Justificar","justifyCenter":"Alinhar pelo Centro","hiliteColor":"Cor de segundo plano","deleteTable":"Excluir Tabela","outdent":"Não-chanfrado","cut":"Recortar","plainFormatBlock":"Estilo de Parágrafo","toggleDir":"Comutar Direção","bold":"Negrito","tabIndent":"Recuo de Guia","justifyRight":"Alinhar pela Direita","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.pt");dojo.cldr.nls.number.pt={"group":".","percentSign":"%","exponential":"E","percentFormat":"#,##0%","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":",","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","currencyFormat":"¤#,##0.00;(¤#,##0.00)","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.pt");dijit.form.nls.validate.pt={"rangeMessage":"Este valor está fora do intervalo. ","invalidMessage":"O valor inserido não é válido.","missingMessage":"Este valor é necessário."};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.pt");dojo.cldr.nls.currency.pt={"HKD_displayName":"Dólar de Hong Kong","CHF_displayName":"Franco suíço","CAD_displayName":"Dólar canadense","CNY_displayName":"Yuan Renminbi chinês","AUD_displayName":"Dólar australiano","JPY_displayName":"Iene japonês","USD_displayName":"Dólar norte-americano","GBP_displayName":"Libra esterlina britânica","EUR_displayName":"Euro","CHF_symbol":"Fr.","JPY_symbol":"JP¥","HKD_symbol":"HK$","USD_symbol":"US$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.pt");dojo.cldr.nls.gregorian.pt={"months-format-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Dia da semana","dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"EEE, dd/MM/yyyy","dateFormatItem-MMMEd":"EEE, d 'de' MMM","eraNarrow":["a.C.","d.C."],"dateFormat-long":"d 'de' MMMM 'de' y","months-format-wide":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],"dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"EEE, d","dateFormat-full":"EEEE, d 'de' MMMM 'de' y","dateFormatItem-Md":"d/M","field-era":"Era","dateFormatItem-yM":"MM/yyyy","months-standAlone-wide":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],"timeFormat-short":"HH:mm","quarters-format-wide":["1º trimestre","2º trimestre","3º trimestre","4º trimestre"],"timeFormat-long":"HH'h'mm'min'ss's' z","field-year":"Ano","dateFormatItem-yMMM":"MMM 'de' y","dateFormatItem-yQ":"yyyy Q","field-hour":"Hora","dateFormatItem-MMdd":"dd/MM","months-format-abbr":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],"dateFormatItem-yyQ":"Q yy","timeFormat-full":"HH'h'mm'min'ss's' zzzz","am":"AM","months-standAlone-abbr":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],"quarters-format-abbr":["T1","T2","T3","T4"],"quarters-standAlone-wide":["1º trimestre","2º trimestre","3º trimestre","4º trimestre"],"dateFormatItem-HHmmss":"H'h'mm'min'ss's'","dateFormatItem-M":"L","days-standAlone-wide":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"dateFormatItem-yyyyMMM":"MMM 'de' y","dateFormatItem-MMMMd":"d 'de' MMMM","dateFormatItem-yyMMMEEEd":"EEE, d 'de' MMM 'de' yy","dateFormatItem-yyMMM":"MMM 'de' yy","timeFormat-medium":"HH:mm:ss","dateFormatItem-Hm":"H'h'mm","quarters-standAlone-abbr":["T1","T2","T3","T4"],"eraAbbr":["a.C.","d.C."],"field-minute":"Minuto","field-dayperiod":"Período do dia","days-standAlone-abbr":["dom","seg","ter","qua","qui","sex","sáb"],"dateFormatItem-yyMMMd":"d 'de' MMM 'de' yy","dateFormatItem-d":"d","dateFormatItem-ms":"mm'min'ss's'","dateFormatItem-MMMd":"d 'de' MMM","dateFormatItem-MEd":"EEE, dd/MM","dateFormatItem-yMMMM":"MMMM 'de' y","field-day":"Dia","days-format-wide":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"field-zone":"Fuso","dateFormatItem-yyyyMM":"MM/yyyy","dateFormatItem-y":"y","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-yyMM":"MM/yy","days-format-abbr":["dom","seg","ter","qua","qui","sex","sáb"],"eraNames":["Antes de Cristo","Ano do Senhor"],"days-format-narrow":["D","S","T","Q","Q","S","S"],"field-month":"Mês","days-standAlone-narrow":["D","S","T","Q","Q","S","S"],"dateFormatItem-MMM":"LLL","dateFormatItem-HHmm":"HH'h'mm","pm":"PM","dateFormatItem-MMMMEd":"EEE, d 'de' MMMM","dateFormat-short":"dd/MM/yy","field-second":"Segundo","dateFormatItem-yMMMEd":"EEE, d 'de' MMM 'de' y","field-week":"Semana","dateFormat-medium":"dd/MM/yyyy","dateFormatItem-mmss":"mm'min'ss's'","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","dateTimeFormat-full":"{1} {0}","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.pt");dijit.form.nls.ComboBox.pt={"previousMessage":"Opções anteriores","nextMessage":"Mais opções"};
diff --git a/js/dojo/dijit/nls/dijit-all_ru.js b/js/dojo/dijit/nls/dijit-all_ru.js
--- a/js/dojo/dijit/nls/dijit-all_ru.js
+++ b/js/dojo/dijit/nls/dijit-all_ru.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_ru");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.ru");dojo.nls.colors.ru={"lightsteelblue": "светлый стальной", "orangered": "оранжево-красный", "midnightblue": "полуночно-синий", "cadetblue": "серо-синий", "seashell": "морская раковина", "slategrey": "грифельно-серый", "coral": "коралловый", "darkturquoise": "темный бирюзовый", "antiquewhite": "белый антик", "mediumspringgreen": "нейтральный весенне-зеленый", "salmon": "лососевый", "darkgrey": "темно-серый", "ivory": "слоновой кости", "greenyellow": "зелено-желтый", "mistyrose": "блекло-розовый", "lightsalmon": "светло-лососевый", "silver": "серебристый", "dimgrey": "тускло-серый", "orange": "оранжевый", "white": "белый", "navajowhite": "белый навахо", "royalblue": "королевский голубой", "deeppink": "темно-розовый", "lime": "лайм", "oldlace": "матово-белый", "chartreuse": "желто-салатный", "darkcyan": "темный циан", "yellow": "желтый", "linen": "хлопковый", "olive": "оливковый", "gold": "золотой", "lawngreen": "зеленая лужайка", "lightyellow": "светло-желтый", "tan": "рыжевато-коричневый", "darkviolet": "темно-фиолетовый", "lightslategrey": "светлый грифельно-серый", "grey": "серый", "darkkhaki": "темный хаки", "green": "зеленый", "deepskyblue": "темный небесно-голубой", "aqua": "зеленовато-голубой", "sienna": "охра", "mintcream": "мятно-кремовый", "rosybrown": "розово-коричневый", "mediumslateblue": "нейтральный грифельно-синий", "magenta": "пурпурный", "lightseagreen": "светлый морской волны", "cyan": "циан", "olivedrab": "желтовато-серый", "darkgoldenrod": "темно-золотистый", "slateblue": "грифельно-синий", "mediumaquamarine": "нейтральный аквамарин", "lavender": "бледно-лиловый", "mediumseagreen": "нейтральный морской волны", "maroon": "темно-бордовый", "darkslategray": "темный грифельно-серый", "mediumturquoise": "нейтральный бирюзовый", "ghostwhite": "призрачно-белый", "darkblue": "темно-синий", "mediumvioletred": "нейтральный фиолетово-красный", "brown": "коричневый", "lightgray": "светло-серый", "sandybrown": "коричнево-песчаный", "pink": "розовый", "firebrick": "кирпичный", "indigo": "индиго", "snow": "белоснежный", "darkorchid": "темный орсель", "turquoise": "бирюзовый", "chocolate": "шоколадный", "springgreen": "весенний зеленый", "moccasin": "мокасин", "navy": "темно-синий", "lemonchiffon": "бледно-лимонный", "teal": "чирок", "floralwhite": "цветочно-белый", "cornflowerblue": "фиолетово-синий", "paleturquoise": "бледно-бирюзовый", "purple": "фиолетовый", "gainsboro": "бледно-серый", "plum": "сливовый", "red": "красный", "blue": "синий", "forestgreen": "зеленый лесной", "darkgreen": "темно-зеленый", "honeydew": "медовый", "darkseagreen": "темный морской волны", "lightcoral": "светло-коралловый", "palevioletred": "бледный фиолетово-красный", "mediumpurple": "нейтральный фиолетовый", "saddlebrown": "кожано-коричневый", "darkmagenta": "темно-пурпурный", "thistle": "чертополох", "whitesmoke": "дымчато-белый", "wheat": "пшеница", "violet": "фиолетовый", "lightskyblue": "светлый небесно-голубой", "goldenrod": "золотистый", "mediumblue": "нейтральный синий", "skyblue": "небесно-голубой", "crimson": "малиновый", "darksalmon": "темно-лососевый", "darkred": "темно-красный", "darkslategrey": "темный грифельно-серый", "peru": "перу", "lightgrey": "светло-серый", "lightgoldenrodyellow": "светло-золотистый", "blanchedalmond": "светло-миндальный", "aliceblue": "серо-голубой", "bisque": "бисквитный", "slategray": "грифельно-серый", "palegoldenrod": "бледно-золотистый", "darkorange": "темно-оранжевый", "aquamarine": "аквамарин", "lightgreen": "светло-зеленый", "burlywood": "светло-коричневый", "dodgerblue": "бледно-синий", "darkgray": "темно-серый", "lightcyan": "светлый циан", "powderblue": "пороховой", "blueviolet": "сине-фиолетовый", "orchid": "орсель", "dimgray": "тускло-серый", "beige": "бежевый", "fuchsia": "фуксин", "lavenderblush": "розовато-лиловый", "hotpink": "красно-розовый", "steelblue": "стальной", "tomato": "помидор", "lightpink": "светло-розовый", "limegreen": "зеленый лайм", "indianred": "индийский красный", "papayawhip": "черенок папайи", "lightslategray": "светлый грифельно-серый", "gray": "серый", "mediumorchid": "нейтральный орсель", "cornsilk": "шелковый оттенок", "black": "черный", "seagreen": "морской волны", "darkslateblue": "темный грифельно-синий", "khaki": "хаки", "lightblue": "светло-синий", "palegreen": "бледно-зеленый", "azure": "лазурный", "peachpuff": "персиковый", "darkolivegreen": "темно-оливковый", "yellowgreen": "желто-зеленый"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.ru");dijit.nls.loading.ru={"loadingState": "Загрузка...", "errorState": "Извините, возникла ошибка"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.ru");dijit.nls.Textarea.ru={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.ru");dijit._editor.nls.commands.ru={"removeFormat": "Удалить формат", "copy": "Копировать", "paste": "Вставить", "selectAll": "Выбрать все", "insertOrderedList": "Нумерованный список", "insertTable": "Вставить/изменить таблицу", "underline": "Подчеркивание", "foreColor": "Цвет текста", "htmlToggle": "Код HTML", "formatBlock": "Стиль абзаца", "insertHorizontalRule": "Горизонтальная линейка", "delete": "Удалить", "insertUnorderedList": "Список с маркерами", "tableProp": "Свойства таблицы", "insertImage": "Вставить изображение", "superscript": "Верхний индекс", "subscript": "Нижний индекс", "createLink": "Создать ссылку", "undo": "Отменить", "italic": "Курсив", "fontName": "Название шрифта", "justifyLeft": "По левому краю", "unlink": "Удалить ссылку", "toggleTableBorder": "Переключить рамку таблицы", "fontSize": "Размер шрифта", "indent": "Отступ", "redo": "Повторить", "strikethrough": "Перечеркивание", "justifyFull": "По ширине", "justifyCenter": "По центру", "hiliteColor": "Цвет фона", "deleteTable": "Удалить таблицу", "outdent": "Втяжка", "cut": "Вырезать", "plainFormatBlock": "Стиль абзаца", "bold": "Полужирный", "systemShortcutFF": "Действие \"${0}\" доступно в Mozilla Firefox только через сочетание клавиш. Используйте ${1}.", "justifyRight": "По правому краю", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.ru");dojo.cldr.nls.number.ru={"scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencyFormat": "¤ #,##0.00", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.ru");dijit.nls.common.ru={"buttonCancel": "Отмена", "buttonSave": "Сохранить", "buttonOk": "ОК"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.ru");dijit.form.nls.validate.ru={"rangeMessage": "* Это значение вне диапазона.", "invalidMessage": "* Указано недопустимое значение.", "missingMessage": "* Это обязательное значение."};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.ru");dijit.form.nls.ComboBox.ru={"previousMessage": "Предыдущие варианты", "nextMessage": "Следующие варианты"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.ru");dojo.cldr.nls.currency.ru={"USD_symbol": "$", "EUR_displayName": "EUR", "GBP_displayName": "GBP", "JPY_displayName": "JPY", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€", "USD_displayName": "USD"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.ru");dojo.cldr.nls.gregorian.ru={"dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "eraNames": ["BCE", "CE"], "field-weekday": "Day of the Week", "months-standAlone-narrow": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "timeFormat-full": "HH:mm:ss z", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "days-standAlone-narrow": ["1", "2", "3", "4", "5", "6", "7"], "eraAbbr": ["BCE", "CE"], "dateFormat-long": "yyyy MMMM d", "timeFormat-medium": "HH:mm:ss", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateFormat-medium": "yyyy MMM d", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "timeFormat-long": "HH:mm:ss z", "months-format-abbr": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "timeFormat-short": "HH:mm", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "days-format-abbr": ["1", "2", "3", "4", "5", "6", "7"], "pm": "PM", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "am": "AM", "dateFormat-short": "yy/MM/dd", "dateFormat-full": "EEEE, yyyy MMMM dd", "months-format-wide": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "dateTimeFormats-appendItem-Era": "{0} {1}", "quarters-format-wide": ["Q1", "Q2", "Q3", "Q4"], "days-format-wide": ["1", "2", "3", "4", "5", "6", "7"]};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.ru");dijit.nls.Textarea.ru={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_ru");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.ru");dojo.nls.colors.ru={"lightsteelblue":"светлый стальной","orangered":"оранжево-красный","midnightblue":"полуночно-синий","cadetblue":"серо-синий","seashell":"морская раковина","slategrey":"грифельно-серый","coral":"коралловый","darkturquoise":"темный бирюзовый","antiquewhite":"белый антик","mediumspringgreen":"нейтральный весенне-зеленый","salmon":"лососевый","darkgrey":"темно-серый","ivory":"слоновой кости","greenyellow":"зелено-желтый","mistyrose":"блекло-розовый","lightsalmon":"светло-лососевый","silver":"серебристый","dimgrey":"тускло-серый","orange":"оранжевый","white":"белый","navajowhite":"белый навахо","royalblue":"королевский голубой","deeppink":"темно-розовый","lime":"лайм","oldlace":"матово-белый","chartreuse":"желто-салатный","darkcyan":"темный циан","yellow":"желтый","linen":"хлопковый","olive":"оливковый","gold":"золотой","lawngreen":"зеленая лужайка","lightyellow":"светло-желтый","tan":"рыжевато-коричневый","darkviolet":"темно-фиолетовый","lightslategrey":"светлый грифельно-серый","grey":"серый","darkkhaki":"темный хаки","green":"зеленый","deepskyblue":"темный небесно-голубой","aqua":"зеленовато-голубой","sienna":"охра","mintcream":"мятно-кремовый","rosybrown":"розово-коричневый","mediumslateblue":"нейтральный грифельно-синий","magenta":"пурпурный","lightseagreen":"светлый морской волны","cyan":"циан","olivedrab":"желтовато-серый","darkgoldenrod":"темно-золотистый","slateblue":"грифельно-синий","mediumaquamarine":"нейтральный аквамарин","lavender":"бледно-лиловый","mediumseagreen":"нейтральный морской волны","maroon":"темно-бордовый","darkslategray":"темный грифельно-серый","mediumturquoise":"нейтральный бирюзовый","ghostwhite":"призрачно-белый","darkblue":"темно-синий","mediumvioletred":"нейтральный фиолетово-красный","brown":"коричневый","lightgray":"светло-серый","sandybrown":"коричнево-песчаный","pink":"розовый","firebrick":"кирпичный","indigo":"индиго","snow":"белоснежный","darkorchid":"темный орсель","turquoise":"бирюзовый","chocolate":"шоколадный","springgreen":"весенний зеленый","moccasin":"мокасин","navy":"темно-синий","lemonchiffon":"бледно-лимонный","teal":"чирок","floralwhite":"цветочно-белый","cornflowerblue":"фиолетово-синий","paleturquoise":"бледно-бирюзовый","purple":"фиолетовый","gainsboro":"бледно-серый","plum":"сливовый","red":"красный","blue":"синий","forestgreen":"зеленый лесной","darkgreen":"темно-зеленый","honeydew":"медовый","darkseagreen":"темный морской волны","lightcoral":"светло-коралловый","palevioletred":"бледный фиолетово-красный","mediumpurple":"нейтральный фиолетовый","saddlebrown":"кожано-коричневый","darkmagenta":"темно-пурпурный","thistle":"чертополох","whitesmoke":"дымчато-белый","wheat":"пшеница","violet":"фиолетовый","lightskyblue":"светлый небесно-голубой","goldenrod":"золотистый","mediumblue":"нейтральный синий","skyblue":"небесно-голубой","crimson":"малиновый","darksalmon":"темно-лососевый","darkred":"темно-красный","darkslategrey":"темный грифельно-серый","peru":"перу","lightgrey":"светло-серый","lightgoldenrodyellow":"светло-золотистый","blanchedalmond":"светло-миндальный","aliceblue":"серо-голубой","bisque":"бисквитный","slategray":"грифельно-серый","palegoldenrod":"бледно-золотистый","darkorange":"темно-оранжевый","aquamarine":"аквамарин","lightgreen":"светло-зеленый","burlywood":"светло-коричневый","dodgerblue":"бледно-синий","darkgray":"темно-серый","lightcyan":"светлый циан","powderblue":"пороховой","blueviolet":"сине-фиолетовый","orchid":"орсель","dimgray":"тускло-серый","beige":"бежевый","fuchsia":"фуксин","lavenderblush":"розовато-лиловый","hotpink":"красно-розовый","steelblue":"стальной","tomato":"помидор","lightpink":"светло-розовый","limegreen":"зеленый лайм","indianred":"индийский красный","papayawhip":"черенок папайи","lightslategray":"светлый грифельно-серый","gray":"серый","mediumorchid":"нейтральный орсель","cornsilk":"шелковый оттенок","black":"черный","seagreen":"морской волны","darkslateblue":"темный грифельно-синий","khaki":"хаки","lightblue":"светло-синий","palegreen":"бледно-зеленый","azure":"лазурный","peachpuff":"персиковый","darkolivegreen":"темно-оливковый","yellowgreen":"желто-зеленый"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.ru");dijit.nls.loading.ru={"loadingState":"Загрузка...","errorState":"Извините, возникла ошибка"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.ru");dijit.nls.common.ru={"buttonOk":"ОК","buttonCancel":"Отмена","buttonSave":"Сохранить","itemClose":"Закрыть"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.ru");dijit._editor.nls.commands.ru={"removeFormat":"Удалить формат","copy":"Копировать","paste":"Вставить","selectAll":"Выбрать все","insertOrderedList":"Нумерованный список","insertTable":"Вставить/изменить таблицу","print":"Печать","underline":"Подчеркивание","foreColor":"Цвет текста","htmlToggle":"Код HTML","formatBlock":"Стиль абзаца","newPage":"Создать страницу","insertHorizontalRule":"Горизонтальная линейка","delete":"Удалить","insertUnorderedList":"Список с маркерами","tableProp":"Свойства таблицы","insertImage":"Вставить изображение","superscript":"Верхний индекс","subscript":"Нижний индекс","createLink":"Создать ссылку","undo":"Отменить","fullScreen":"Переключить полноэкранный режим","italic":"Курсив","fontName":"Название шрифта","justifyLeft":"По левому краю","unlink":"Удалить ссылку","toggleTableBorder":"Переключить рамку таблицы","viewSource":"Показать исходный код HTML","fontSize":"Размер шрифта","systemShortcut":"Действие \"${0}\" можно выполнить в браузере только путем нажатия клавиш ${1}.","indent":"Отступ","redo":"Повторить","strikethrough":"Перечеркивание","justifyFull":"По ширине","justifyCenter":"По центру","hiliteColor":"Цвет фона","deleteTable":"Удалить таблицу","outdent":"Втяжка","cut":"Вырезать","plainFormatBlock":"Стиль абзаца","toggleDir":"Изменить направление","bold":"Полужирный","tabIndent":"Табуляция","justifyRight":"По правому краю","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.ru");dojo.cldr.nls.number.ru={"group":" ","percentSign":"%","exponential":"E","percentFormat":"#,##0 %","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":",","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","currencyFormat":"#,##0.00 ¤","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","nan":"NaN","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.ru");dijit.form.nls.validate.ru={"rangeMessage":"Это значение вне диапазона.","invalidMessage":"Указано недопустимое значение.","missingMessage":"Это обязательное значение."};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.ru");dojo.cldr.nls.currency.ru={"HKD_displayName":"Гонконгский доллар","CHF_displayName":"Швейцарский франк","CAD_displayName":"Канадский доллар","CNY_displayName":"Юань Ренминби","USD_symbol":"$","AUD_displayName":"Австралийский доллар","JPY_displayName":"Японская иена","USD_displayName":"Доллар США","GBP_displayName":"Английский фунт стерлингов","EUR_displayName":"Евро","CHF_symbol":"Fr.","JPY_symbol":"JP¥","HKD_symbol":"HK$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.ru");dojo.cldr.nls.gregorian.ru={"months-format-narrow":["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"День недели","dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"EEE, yyyy-M-d","dateFormatItem-yyyyLLLL":"LLLL y","dateFormatItem-MMMEd":"E MMM d","eraNarrow":["до н.э.","н.э."],"dateFormat-long":"d MMMM y 'г'.","months-format-wide":["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"],"dateFormat-full":"EEEE, d MMMM y 'г'.","dateFormatItem-Md":"d.M","field-era":"Эра","dateFormatItem-yM":"yyyy-M","months-standAlone-wide":["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],"timeFormat-short":"H:mm","quarters-format-wide":["1-й квартал","2-й квартал","3-й квартал","4-й квартал"],"timeFormat-long":"H:mm:ss z","field-year":"Год","dateFormatItem-yMMM":"MMM y","dateFormatItem-yyyyMMMM":"MMMM y","field-hour":"Час","dateFormatItem-MMdd":"dd.MM","months-format-abbr":["янв.","февр.","марта","апр.","мая","июня","июля","авг.","сент.","окт.","нояб.","дек."],"dateFormatItem-yyQ":"Q yy","timeFormat-full":"H:mm:ss zzzz","am":"AM","dateFormatItem-H":"H","months-standAlone-abbr":["янв.","февр.","март","апр.","май","июнь","июль","авг.","сент.","окт.","нояб.","дек."],"quarters-format-abbr":["1-й кв.","2-й кв.","3-й кв.","4-й кв."],"quarters-standAlone-wide":["1-й квартал","2-й квартал","3-й квартал","4-й квартал"],"dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"L","days-standAlone-wide":["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"],"dateFormatItem-MMMMd":"d MMMM","dateFormatItem-yyMMMEEEd":"EEE, d MMM yy","dateFormatItem-yyMMM":"MMM yy","timeFormat-medium":"H:mm:ss","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["1-й кв.","2-й кв.","3-й кв.","4-й кв."],"eraAbbr":["до н.э.","н.э."],"field-minute":"Минута","field-dayperiod":"AM/PM","days-standAlone-abbr":["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E, M-d","dateFormatItem-yMMMM":"MMMM y","field-day":"День","days-format-wide":["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],"field-zone":"Часовой пояс","dateFormatItem-yyyyMM":"MM.yyyy","dateFormatItem-y":"y","months-standAlone-narrow":["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],"dateFormatItem-yyMM":"MM.yy","days-format-abbr":["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],"eraNames":["до н.э.","н.э."],"days-format-narrow":["В","П","В","С","Ч","П","С"],"field-month":"Месяц","days-standAlone-narrow":["В","П","В","С","Ч","П","С"],"dateFormatItem-MMM":"LLL","dateFormatItem-HHmm":"HH:mm","pm":"PM","dateFormatItem-MMMMEd":"E MMMM d","dateFormat-short":"dd.MM.yy","field-second":"Секунда","dateFormatItem-yMMMEd":"E, d MMM y","dateFormatItem-Ed":"E d","field-week":"Неделя","dateFormat-medium":"dd.MM.yyyy","dateFormatItem-mmss":"mm:ss","dateFormatItem-yyyyQQQQ":"QQQQ y 'г'.","dateFormatItem-yyyy":"y","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d EEE","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateFormatItem-yQ":"y Q","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","dateTimeFormat-full":"{1} {0}","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.ru");dijit.form.nls.ComboBox.ru={"previousMessage":"Предыдущие варианты","nextMessage":"Следующие варианты"};
diff --git a/js/dojo/dijit/nls/dijit-all_xx.js b/js/dojo/dijit/nls/dijit-all_xx.js
--- a/js/dojo/dijit/nls/dijit-all_xx.js
+++ b/js/dojo/dijit/nls/dijit-all_xx.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_xx");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.xx");dojo.nls.colors.xx={"lightsteelblue": "light steel blue", "orangered": "orange red", "midnightblue": "midnight blue", "cadetblue": "cadet blue", "seashell": "seashell", "slategrey": "slate gray", "coral": "coral", "darkturquoise": "dark turquoise", "antiquewhite": "antique white", "mediumspringgreen": "medium spring green", "salmon": "salmon", "darkgrey": "dark gray", "ivory": "ivory", "greenyellow": "green-yellow", "mistyrose": "misty rose", "lightsalmon": "light salmon", "silver": "silver", "dimgrey": "dim gray", "orange": "orange", "white": "white", "navajowhite": "navajo white", "royalblue": "royal blue", "deeppink": "deep pink", "lime": "lime", "oldlace": "old lace", "chartreuse": "chartreuse", "darkcyan": "dark cyan", "yellow": "yellow", "linen": "linen", "olive": "olive", "gold": "gold", "lawngreen": "lawn green", "lightyellow": "light yellow", "tan": "tan", "darkviolet": "dark violet", "lightslategrey": "light slate gray", "grey": "gray", "darkkhaki": "dark khaki", "green": "green", "deepskyblue": "deep sky blue", "aqua": "aqua", "sienna": "sienna", "mintcream": "mint cream", "rosybrown": "rosy brown", "mediumslateblue": "medium slate blue", "magenta": "magenta", "lightseagreen": "light sea green", "cyan": "cyan", "olivedrab": "olive drab", "darkgoldenrod": "dark goldenrod", "slateblue": "slate blue", "mediumaquamarine": "medium aquamarine", "lavender": "lavender", "mediumseagreen": "medium sea green", "maroon": "maroon", "darkslategray": "dark slate gray", "mediumturquoise": "medium turquoise", "ghostwhite": "ghost white", "darkblue": "dark blue", "mediumvioletred": "medium violet-red", "brown": "brown", "lightgray": "light gray", "sandybrown": "sandy brown", "pink": "pink", "firebrick": "fire brick", "indigo": "indigo", "snow": "snow", "darkorchid": "dark orchid", "turquoise": "turquoise", "chocolate": "chocolate", "springgreen": "spring green", "moccasin": "moccasin", "navy": "navy", "lemonchiffon": "lemon chiffon", "teal": "teal", "floralwhite": "floral white", "cornflowerblue": "cornflower blue", "paleturquoise": "pale turquoise", "purple": "purple", "gainsboro": "gainsboro", "plum": "plum", "red": "red", "blue": "blue", "forestgreen": "forest green", "darkgreen": "dark green", "honeydew": "honeydew", "darkseagreen": "dark sea green", "lightcoral": "light coral", "palevioletred": "pale violet-red", "mediumpurple": "medium purple", "saddlebrown": "saddle brown", "darkmagenta": "dark magenta", "thistle": "thistle", "whitesmoke": "white smoke", "wheat": "wheat", "violet": "violet", "lightskyblue": "light sky blue", "goldenrod": "goldenrod", "mediumblue": "medium blue", "skyblue": "sky blue", "crimson": "crimson", "darksalmon": "dark salmon", "darkred": "dark red", "darkslategrey": "dark slate gray", "peru": "peru", "lightgrey": "light gray", "lightgoldenrodyellow": "light goldenrod yellow", "blanchedalmond": "blanched almond", "aliceblue": "alice blue", "bisque": "bisque", "slategray": "slate gray", "palegoldenrod": "pale goldenrod", "darkorange": "dark orange", "aquamarine": "aquamarine", "lightgreen": "light green", "burlywood": "burlywood", "dodgerblue": "dodger blue", "darkgray": "dark gray", "lightcyan": "light cyan", "powderblue": "powder blue", "blueviolet": "blue-violet", "orchid": "orchid", "dimgray": "dim gray", "beige": "beige", "fuchsia": "fuchsia", "lavenderblush": "lavender blush", "hotpink": "hot pink", "steelblue": "steel blue", "tomato": "tomato", "lightpink": "light pink", "limegreen": "lime green", "indianred": "indian red", "papayawhip": "papaya whip", "lightslategray": "light slate gray", "gray": "gray", "mediumorchid": "medium orchid", "cornsilk": "cornsilk", "black": "black", "seagreen": "sea green", "darkslateblue": "dark slate blue", "khaki": "khaki", "lightblue": "light blue", "palegreen": "pale green", "azure": "azure", "peachpuff": "peach puff", "darkolivegreen": "dark olive green", "yellowgreen": "yellow green"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.xx");dijit.nls.loading.xx={"loadingState": "Loading...", "errorState": "Sorry, an error occurred"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.xx");dijit.nls.Textarea.xx={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.xx");dijit._editor.nls.commands.xx={"removeFormat": "Remove Format", "copy": "Copy", "paste": "Paste", "selectAll": "Select All", "insertOrderedList": "Numbered List", "insertTable": "Insert/Edit Table", "underline": "Underline", "foreColor": "Foreground Color", "htmlToggle": "HTML Source", "formatBlock": "Paragraph Style", "insertHorizontalRule": "Horizontal Rule", "delete": "Delete", "appleKey": "⌘${0}", "insertUnorderedList": "Bullet List", "tableProp": "Table Property", "insertImage": "Insert Image", "superscript": "Superscript", "subscript": "Subscript", "createLink": "Create Link", "undo": "Undo", "italic": "Italic", "fontName": "Font Name", "justifyLeft": "Align Left", "unlink": "Remove Link", "toggleTableBorder": "Toggle Table Border", "ctrlKey": "ctrl+${0}", "fontSize": "Font Size", "indent": "Indent", "redo": "Redo", "strikethrough": "Strikethrough", "justifyFull": "Justify", "justifyCenter": "Align Center", "hiliteColor": "Background Color", "deleteTable": "Delete Table", "outdent": "Outdent", "cut": "Cut", "plainFormatBlock": "Paragraph Style", "bold": "Bold", "systemShortcutFF": "The \"${0}\" action is only available in Mozilla Firefox using a keyboard shortcut. Use ${1}.", "justifyRight": "Align Right"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.xx");dojo.cldr.nls.number.xx={"scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencyFormat": "¤ #,##0.00", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.xx");dijit.nls.common.xx={"buttonCancel": "Cancel", "buttonSave": "Save", "buttonOk": "OK"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.xx");dijit.form.nls.validate.xx={"rangeMessage": "* This value is out of range.", "invalidMessage": "* The value entered is not valid.", "missingMessage": "* This value is required."};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.xx");dijit.form.nls.ComboBox.xx={"previousMessage": "Previous choices", "nextMessage": "More choices"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.xx");dojo.cldr.nls.currency.xx={"USD_symbol": "$", "EUR_displayName": "EUR", "GBP_displayName": "GBP", "JPY_displayName": "JPY", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€", "USD_displayName": "USD"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.xx");dojo.cldr.nls.gregorian.xx={"dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "eraNames": ["BCE", "CE"], "field-weekday": "Day of the Week", "months-standAlone-narrow": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "timeFormat-full": "HH:mm:ss z", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "days-standAlone-narrow": ["1", "2", "3", "4", "5", "6", "7"], "eraAbbr": ["BCE", "CE"], "dateFormat-long": "yyyy MMMM d", "timeFormat-medium": "HH:mm:ss", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateFormat-medium": "yyyy MMM d", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "timeFormat-long": "HH:mm:ss z", "months-format-abbr": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "timeFormat-short": "HH:mm", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "days-format-abbr": ["1", "2", "3", "4", "5", "6", "7"], "pm": "PM", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "am": "AM", "dateFormat-short": "yy/MM/dd", "dateFormat-full": "EEEE, yyyy MMMM dd", "months-format-wide": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "dateTimeFormats-appendItem-Era": "{0} {1}", "quarters-format-wide": ["Q1", "Q2", "Q3", "Q4"], "days-format-wide": ["1", "2", "3", "4", "5", "6", "7"]};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.xx");dijit.nls.Textarea.xx={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_xx");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.xx");dojo.nls.colors.xx={"lightsteelblue":"light steel blue","orangered":"orange red","midnightblue":"midnight blue","cadetblue":"cadet blue","seashell":"seashell","slategrey":"slate gray","coral":"coral","darkturquoise":"dark turquoise","antiquewhite":"antique white","mediumspringgreen":"medium spring green","salmon":"salmon","darkgrey":"dark gray","ivory":"ivory","greenyellow":"green-yellow","mistyrose":"misty rose","lightsalmon":"light salmon","silver":"silver","dimgrey":"dim gray","orange":"orange","white":"white","navajowhite":"navajo white","royalblue":"royal blue","deeppink":"deep pink","lime":"lime","oldlace":"old lace","chartreuse":"chartreuse","darkcyan":"dark cyan","yellow":"yellow","linen":"linen","olive":"olive","gold":"gold","lawngreen":"lawn green","lightyellow":"light yellow","tan":"tan","darkviolet":"dark violet","lightslategrey":"light slate gray","grey":"gray","darkkhaki":"dark khaki","green":"green","deepskyblue":"deep sky blue","aqua":"aqua","sienna":"sienna","mintcream":"mint cream","rosybrown":"rosy brown","mediumslateblue":"medium slate blue","magenta":"magenta","lightseagreen":"light sea green","cyan":"cyan","olivedrab":"olive drab","darkgoldenrod":"dark goldenrod","slateblue":"slate blue","mediumaquamarine":"medium aquamarine","lavender":"lavender","mediumseagreen":"medium sea green","maroon":"maroon","darkslategray":"dark slate gray","mediumturquoise":"medium turquoise","ghostwhite":"ghost white","darkblue":"dark blue","mediumvioletred":"medium violet-red","brown":"brown","lightgray":"light gray","sandybrown":"sandy brown","pink":"pink","firebrick":"fire brick","indigo":"indigo","snow":"snow","darkorchid":"dark orchid","turquoise":"turquoise","chocolate":"chocolate","springgreen":"spring green","moccasin":"moccasin","navy":"navy","lemonchiffon":"lemon chiffon","teal":"teal","floralwhite":"floral white","cornflowerblue":"cornflower blue","paleturquoise":"pale turquoise","purple":"purple","gainsboro":"gainsboro","plum":"plum","red":"red","blue":"blue","forestgreen":"forest green","darkgreen":"dark green","honeydew":"honeydew","darkseagreen":"dark sea green","lightcoral":"light coral","palevioletred":"pale violet-red","mediumpurple":"medium purple","saddlebrown":"saddle brown","darkmagenta":"dark magenta","thistle":"thistle","whitesmoke":"white smoke","wheat":"wheat","violet":"violet","lightskyblue":"light sky blue","goldenrod":"goldenrod","mediumblue":"medium blue","skyblue":"sky blue","crimson":"crimson","darksalmon":"dark salmon","darkred":"dark red","darkslategrey":"dark slate gray","peru":"peru","lightgrey":"light gray","lightgoldenrodyellow":"light goldenrod yellow","blanchedalmond":"blanched almond","aliceblue":"alice blue","bisque":"bisque","slategray":"slate gray","palegoldenrod":"pale goldenrod","darkorange":"dark orange","aquamarine":"aquamarine","lightgreen":"light green","burlywood":"burlywood","dodgerblue":"dodger blue","darkgray":"dark gray","lightcyan":"light cyan","powderblue":"powder blue","blueviolet":"blue-violet","orchid":"orchid","dimgray":"dim gray","beige":"beige","fuchsia":"fuchsia","lavenderblush":"lavender blush","hotpink":"hot pink","steelblue":"steel blue","tomato":"tomato","lightpink":"light pink","limegreen":"lime green","indianred":"indian red","papayawhip":"papaya whip","lightslategray":"light slate gray","gray":"gray","mediumorchid":"medium orchid","cornsilk":"cornsilk","black":"black","seagreen":"sea green","darkslateblue":"dark slate blue","khaki":"khaki","lightblue":"light blue","palegreen":"pale green","azure":"azure","peachpuff":"peach puff","darkolivegreen":"dark olive green","yellowgreen":"yellow green"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.xx");dijit.nls.loading.xx={"loadingState":"Loading...","errorState":"Sorry, an error occurred"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.xx");dijit.nls.common.xx={"buttonOk":"OK","buttonCancel":"Cancel","buttonSave":"Save","itemClose":"Close"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.xx");dijit._editor.nls.commands.xx={"removeFormat":"Remove Format","copy":"Copy","paste":"Paste","selectAll":"Select All","insertOrderedList":"Numbered List","insertTable":"Insert/Edit Table","print":"Print","underline":"Underline","foreColor":"Foreground Color","htmlToggle":"HTML Source","formatBlock":"Paragraph Style","newPage":"New Page","insertHorizontalRule":"Horizontal Rule","delete":"Delete","appleKey":"⌘${0}","insertUnorderedList":"Bullet List","tableProp":"Table Property","insertImage":"Insert Image","superscript":"Superscript","subscript":"Subscript","createLink":"Create Link","undo":"Undo","fullScreen":"Toggle Full Screen","italic":"Italic","fontName":"Font Name","justifyLeft":"Align Left","unlink":"Remove Link","toggleTableBorder":"Toggle Table Border","viewSource":"View HTML Source","ctrlKey":"ctrl+${0}","fontSize":"Font Size","systemShortcut":"The \"${0}\" action is only available in your browser using a keyboard shortcut. Use ${1}.","indent":"Indent","redo":"Redo","strikethrough":"Strikethrough","justifyFull":"Justify","justifyCenter":"Align Center","hiliteColor":"Background Color","deleteTable":"Delete Table","outdent":"Outdent","cut":"Cut","plainFormatBlock":"Paragraph Style","toggleDir":"Toggle Direction","bold":"Bold","tabIndent":"Tab Indent","justifyRight":"Align Right"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.xx");dojo.cldr.nls.number.xx={"scientificFormat":"#E0","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","infinity":"∞","list":";","percentSign":"%","minusSign":"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","nan":"NaN","nativeZeroDigit":"0","plusSign":"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencyFormat":"¤ #,##0.00","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","perMille":"‰","group":",","percentFormat":"#,##0%","decimalFormat":"#,##0.###","decimal":".","patternDigit":"#","currencySpacing-beforeCurrency-insertBetween":" ","exponential":"E"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.xx");dijit.form.nls.validate.xx={"rangeMessage":"This value is out of range.","invalidMessage":"The value entered is not valid.","missingMessage":"This value is required."};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.xx");dojo.cldr.nls.currency.xx={"CHF_symbol":"Fr.","JPY_symbol":"JP¥","HKD_symbol":"HK$","USD_symbol":"US$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.xx");dojo.cldr.nls.gregorian.xx={"months-format-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Day of the Week","dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"EEE, y-M-d","dateFormatItem-MMMEd":"E MMM d","eraNarrow":["BCE","CE"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"y MMMM d","months-format-wide":["1","2","3","4","5","6","7","8","9","10","11","12"],"dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d EEE","dateFormat-full":"EEEE, y MMMM dd","dateFormatItem-Md":"M-d","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","field-era":"Era","dateFormatItem-yM":"y-M","months-standAlone-wide":["1","2","3","4","5","6","7","8","9","10","11","12"],"timeFormat-short":"HH:mm","quarters-format-wide":["Q1","Q2","Q3","Q4"],"timeFormat-long":"HH:mm:ss z","field-year":"Year","dateFormatItem-yMMM":"y MMM","dateFormatItem-yQ":"y Q","dateTimeFormats-appendItem-Era":"{0} {1}","field-hour":"Hour","months-format-abbr":["1","2","3","4","5","6","7","8","9","10","11","12"],"timeFormat-full":"HH:mm:ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","am":"AM","months-standAlone-abbr":["1","2","3","4","5","6","7","8","9","10","11","12"],"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["Q1","Q2","Q3","Q4"],"dateFormatItem-M":"L","days-standAlone-wide":["1","2","3","4","5","6","7"],"dateFormatItem-MMMMd":"MMMM d","timeFormat-medium":"HH:mm:ss","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"eraAbbr":["BCE","CE"],"field-minute":"Minute","field-dayperiod":"Dayperiod","days-standAlone-abbr":["1","2","3","4","5","6","7"],"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","dateFormatItem-MMMd":"MMM d","dateFormatItem-MEd":"E, M-d","dateTimeFormat-full":"{1} {0}","dateFormatItem-yMMMM":"y MMMM","field-day":"Day","days-format-wide":["1","2","3","4","5","6","7"],"field-zone":"Zone","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-y":"y","months-standAlone-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","days-format-abbr":["1","2","3","4","5","6","7"],"eraNames":["BCE","CE"],"days-format-narrow":["1","2","3","4","5","6","7"],"field-month":"Month","days-standAlone-narrow":["1","2","3","4","5","6","7"],"dateFormatItem-MMM":"LLL","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","pm":"PM","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateFormatItem-MMMMEd":"E MMMM d","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormat-short":"yyyy-MM-dd","field-second":"Second","dateFormatItem-yMMMEd":"EEE, y MMM d","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"Week","dateFormat-medium":"y MMM d","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.xx");dijit.form.nls.ComboBox.xx={"previousMessage":"Previous choices","nextMessage":"More choices"};
diff --git a/js/dojo/dijit/nls/dijit-all_zh-cn.js b/js/dojo/dijit/nls/dijit-all_zh-cn.js
--- a/js/dojo/dijit/nls/dijit-all_zh-cn.js
+++ b/js/dojo/dijit/nls/dijit-all_zh-cn.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_zh-cn");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.zh_cn");dojo.nls.colors.zh_cn={"lightsteelblue": "浅钢蓝色", "orangered": "橙红色", "midnightblue": "深蓝色", "cadetblue": "灰蓝色", "seashell": "海贝色", "slategrey": "灰石色", "coral": "珊瑚色", "darkturquoise": "深粉蓝", "antiquewhite": "古董白", "mediumspringgreen": "间春绿色", "salmon": "橙红", "darkgrey": "深灰色", "ivory": "象牙色", "greenyellow": "绿黄色", "mistyrose": "浅玫瑰色", "lightsalmon": "淡橙色", "silver": "银白色", "dimgrey": "暗灰色", "orange": "橙色", "white": "白色", "navajowhite": "纳瓦白", "royalblue": "品蓝", "deeppink": "深粉红色", "lime": "淡黄绿色", "oldlace": "老白色", "chartreuse": "黄绿色", "darkcyan": "深青绿", "yellow": "黄色", "linen": "亚麻色", "olive": "橄榄绿", "gold": "金黄色", "lawngreen": "草绿色", "lightyellow": "浅黄色", "tan": "棕褐色", "darkviolet": "深紫色", "lightslategrey": "浅青灰", "grey": "灰色", "darkkhaki": "深卡其色", "green": "绿色", "deepskyblue": "深天蓝色", "aqua": "浅绿色", "sienna": "赭色", "mintcream": "薄荷色", "rosybrown": "褐玫瑰红", "mediumslateblue": "间暗蓝色", "magenta": "洋红色", "lightseagreen": "浅海藻绿", "cyan": "青蓝色", "olivedrab": "草绿色", "darkgoldenrod": "深金黄", "slateblue": "石蓝色", "mediumaquamarine": "间绿色", "lavender": "淡紫色", "mediumseagreen": "间海蓝色", "maroon": "栗色", "darkslategray": "深青灰", "mediumturquoise": "间绿宝石色", "ghostwhite": "苍白", "darkblue": "深蓝", "mediumvioletred": "间紫罗兰色", "brown": "棕色", "lightgray": "浅灰色", "sandybrown": "沙褐色", "pink": "粉红色", "firebrick": "砖红", "indigo": "靛青", "snow": "雪白色", "darkorchid": "深紫色", "turquoise": "绿宝石色", "chocolate": "巧克力色", "springgreen": "春绿色", "moccasin": "鹿皮色", "navy": "深蓝色", "lemonchiffon": "柠檬绸色", "teal": "水鸭色", "floralwhite": "花白色", "cornflowerblue": "浅蓝色", "paleturquoise": "苍绿色", "purple": "紫色", "gainsboro": "淡灰色", "plum": "杨李色", "red": "红色", "blue": "蓝色", "forestgreen": "森林绿", "darkgreen": "深绿色", "honeydew": "蜜汁色", "darkseagreen": "深海藻绿", "lightcoral": "浅珊瑚色", "palevioletred": "苍紫罗兰色", "mediumpurple": "间紫色", "saddlebrown": "重褐色", "darkmagenta": "深洋红色", "thistle": "蓟色", "whitesmoke": "烟白色", "wheat": "浅黄色", "violet": "紫色", "lightskyblue": "浅天蓝色", "goldenrod": "金麒麟色", "mediumblue": "间蓝色", "skyblue": "天蓝色", "crimson": "深红色", "darksalmon": "深橙红", "darkred": "深红色", "darkslategrey": "深青灰", "peru": "秘鲁色", "lightgrey": "浅灰色", "lightgoldenrodyellow": "浅金黄色", "blanchedalmond": "白杏色", "aliceblue": "爱丽丝蓝", "bisque": "桔黄色", "slategray": "灰石色", "palegoldenrod": "淡金黄色", "darkorange": "深橙色", "aquamarine": "碧绿色", "lightgreen": "浅绿色", "burlywood": "实木色", "dodgerblue": "闪蓝色", "darkgray": "深灰色", "lightcyan": "浅青色", "powderblue": "铁蓝", "blueviolet": "紫罗兰色", "orchid": "紫色", "dimgray": "暗灰色", "beige": "米色", "fuchsia": "紫红色", "lavenderblush": "淡紫红", "hotpink": "深粉红", "steelblue": "钢蓝色", "tomato": "西红柿色", "lightpink": "浅粉红色", "limegreen": "橙绿色", "indianred": "印度红", "papayawhip": "木瓜色", "lightslategray": "浅青灰", "gray": "灰色", "mediumorchid": "间紫色", "cornsilk": "米绸色", "black": "黑色", "seagreen": "海绿色", "darkslateblue": "深青蓝", "khaki": "卡其色", "lightblue": "淡蓝色", "palegreen": "淡绿色", "azure": "天蓝色", "peachpuff": "桃色", "darkolivegreen": "深橄榄绿", "yellowgreen": "黄绿色"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.zh_cn");dijit.nls.loading.zh_cn={"loadingState": "正在装入...", "errorState": "对不起,发生了错误"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.zh_cn");dijit.nls.Textarea.zh_cn={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.zh_cn");dijit._editor.nls.commands.zh_cn={"removeFormat": "除去格式", "copy": "复制", "paste": "粘贴", "selectAll": "全选", "insertOrderedList": "编号列表", "insertTable": "插入/编辑表", "underline": "下划线", "foreColor": "前景色", "htmlToggle": "HTML 源代码", "formatBlock": "段落样式", "insertHorizontalRule": "水平线", "delete": "删除", "insertUnorderedList": "符号列表", "tableProp": "表属性", "insertImage": "插入图像", "superscript": "上标", "subscript": "下标", "createLink": "创建链接", "undo": "撤销", "italic": "斜体", "fontName": "字体名称", "justifyLeft": "左对齐", "unlink": "除去链接", "toggleTableBorder": "切换表边框", "fontSize": "字体大小", "indent": "增加缩进", "redo": "重做", "strikethrough": "删除线", "justifyFull": "对齐", "justifyCenter": "居中", "hiliteColor": "背景色", "deleteTable": "删除表", "outdent": "减少缩进", "cut": "剪切", "plainFormatBlock": "段落样式", "bold": "粗体", "systemShortcutFF": "只能在 Mozilla Firefox 中通过键盘快捷方式执行“${0}”操作。请使用 ${1}。", "justifyRight": "右对齐", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.zh_cn");dojo.cldr.nls.number.zh_cn={"currencyFormat": "¤#,##0.00", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.zh_cn");dijit.nls.common.zh_cn={"buttonCancel": "取消", "buttonSave": "保存", "buttonOk": "确定"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.zh_cn");dijit.form.nls.validate.zh_cn={"rangeMessage": "* 输入数据超出值域。", "invalidMessage": "* 非法的输入值。", "missingMessage": "* 此值是必须的。"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.zh_cn");dijit.form.nls.ComboBox.zh_cn={"previousMessage": "先前选项", "nextMessage": "更多选项"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.zh_cn");dojo.cldr.nls.currency.zh_cn={"HKD_displayName": "港元", "CHF_displayName": "瑞士法郎", "JPY_symbol": "JP¥", "HKD_symbol": "HK$", "CAD_displayName": "加拿大元", "USD_symbol": "US$", "AUD_displayName": "澳大利亚元", "JPY_displayName": "日元", "USD_displayName": "美元", "GBP_displayName": "英磅", "EUR_displayName": "欧元", "GBP_symbol": "£", "EUR_symbol": "€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.zh_cn");dojo.cldr.nls.gregorian.zh_cn={"dateFormat-short": "yy-M-d", "timeFormat-long": "ahh'时'mm'分'ss'秒'", "dateFormat-medium": "yyyy-M-d", "dateFormat-long": "yyyy'年'M'月'd'日'", "timeFormat-medium": "ahh:mm:ss", "timeFormat-short": "ah:mm", "timeFormat-full": "ahh'时'mm'分'ss'秒' z", "dateFormat-full": "yyyy'年'M'月'd'日'EEEE", "eraAbbr": ["公元前", "公元"], "am": "上午", "months-format-abbr": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], "days-format-abbr": ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], "pm": "下午", "months-format-wide": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], "months-standAlone-narrow": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], "days-standAlone-narrow": ["日", "一", "二", "三", "四", "五", "六"], "days-format-wide": ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "eraNames": ["BCE", "CE"], "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Era": "{0} {1}", "quarters-format-wide": ["Q1", "Q2", "Q3", "Q4"]};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.zh_cn");dijit.nls.Textarea.zh_cn={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_zh-cn");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.zh_cn");dojo.nls.colors.zh_cn={"lightsteelblue":"浅钢蓝色","orangered":"橙红色","midnightblue":"深蓝色","cadetblue":"灰蓝色","seashell":"海贝色","slategrey":"灰石色","coral":"珊瑚色","darkturquoise":"深粉蓝","antiquewhite":"古董白","mediumspringgreen":"间春绿色","salmon":"橙红","darkgrey":"深灰色","ivory":"象牙色","greenyellow":"绿黄色","mistyrose":"浅玫瑰色","lightsalmon":"淡橙色","silver":"银白色","dimgrey":"暗灰色","orange":"橙色","white":"白色","navajowhite":"纳瓦白","royalblue":"品蓝","deeppink":"深粉红色","lime":"淡黄绿色","oldlace":"老白色","chartreuse":"黄绿色","darkcyan":"深青绿","yellow":"黄色","linen":"亚麻色","olive":"橄榄绿","gold":"金黄色","lawngreen":"草绿色","lightyellow":"浅黄色","tan":"棕褐色","darkviolet":"深紫色","lightslategrey":"浅青灰","grey":"灰色","darkkhaki":"深卡其色","green":"绿色","deepskyblue":"深天蓝色","aqua":"浅绿色","sienna":"赭色","mintcream":"薄荷色","rosybrown":"褐玫瑰红","mediumslateblue":"间暗蓝色","magenta":"洋红色","lightseagreen":"浅海藻绿","cyan":"青蓝色","olivedrab":"草绿色","darkgoldenrod":"深金黄","slateblue":"石蓝色","mediumaquamarine":"间绿色","lavender":"淡紫色","mediumseagreen":"间海蓝色","maroon":"栗色","darkslategray":"深青灰","mediumturquoise":"间绿宝石色","ghostwhite":"苍白","darkblue":"深蓝","mediumvioletred":"间紫罗兰色","brown":"棕色","lightgray":"浅灰色","sandybrown":"沙褐色","pink":"粉红色","firebrick":"砖红","indigo":"靛青","snow":"雪白色","darkorchid":"深紫色","turquoise":"绿宝石色","chocolate":"巧克力色","springgreen":"春绿色","moccasin":"鹿皮色","navy":"藏青色","lemonchiffon":"柠檬绸色","teal":"水鸭色","floralwhite":"花白色","cornflowerblue":"浅蓝色","paleturquoise":"苍绿色","purple":"紫色","gainsboro":"淡灰色","plum":"杨李色","red":"红色","blue":"蓝色","forestgreen":"森林绿","darkgreen":"深绿色","honeydew":"蜜汁色","darkseagreen":"深海藻绿","lightcoral":"浅珊瑚色","palevioletred":"苍紫罗兰色","mediumpurple":"间紫色","saddlebrown":"重褐色","darkmagenta":"深洋红色","thistle":"蓟色","whitesmoke":"烟白色","wheat":"浅黄色","violet":"紫色","lightskyblue":"浅天蓝色","goldenrod":"金麒麟色","mediumblue":"间蓝色","skyblue":"天蓝色","crimson":"绯红色","darksalmon":"深橙红","darkred":"深红色","darkslategrey":"深青灰","peru":"秘鲁色","lightgrey":"浅灰色","lightgoldenrodyellow":"浅金黄色","blanchedalmond":"白杏色","aliceblue":"爱丽丝蓝","bisque":"桔黄色","slategray":"灰石色","palegoldenrod":"淡金黄色","darkorange":"深橙色","aquamarine":"碧绿色","lightgreen":"浅绿色","burlywood":"实木色","dodgerblue":"闪蓝色","darkgray":"深灰色","lightcyan":"浅青色","powderblue":"铁蓝","blueviolet":"蓝紫色","orchid":"紫色","dimgray":"暗灰色","beige":"米色","fuchsia":"紫红色","lavenderblush":"淡紫红","hotpink":"深粉红","steelblue":"钢蓝色","tomato":"西红柿色","lightpink":"浅粉红色","limegreen":"橙绿色","indianred":"印度红","papayawhip":"木瓜色","lightslategray":"浅青灰","gray":"灰色","mediumorchid":"间紫色","cornsilk":"米绸色","black":"黑色","seagreen":"海绿色","darkslateblue":"深青蓝","khaki":"卡其色","lightblue":"淡蓝色","palegreen":"淡绿色","azure":"天蓝色","peachpuff":"桃色","darkolivegreen":"深橄榄绿","yellowgreen":"黄绿色"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.zh_cn");dijit.nls.loading.zh_cn={"loadingState":"正在加载...","errorState":"对不起,发生了错误"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.zh_cn");dijit.nls.common.zh_cn={"buttonOk":"确定","buttonCancel":"取消","buttonSave":"保存","itemClose":"关闭"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.zh_cn");dijit._editor.nls.commands.zh_cn={"removeFormat":"除去格式","copy":"复制","paste":"粘贴","selectAll":"全选","insertOrderedList":"编号列表","insertTable":"插入/编辑表","print":"打印","underline":"下划线","foreColor":"前景色","htmlToggle":"HTML 源代码","formatBlock":"段落样式","newPage":"新建页面","insertHorizontalRule":"水平线","delete":"删除","insertUnorderedList":"符号列表","tableProp":"表属性","insertImage":"插入图像","superscript":"上标","subscript":"下标","createLink":"创建链接","undo":"撤销","fullScreen":"切换全屏","italic":"斜体","fontName":"字体名称","justifyLeft":"左对齐","unlink":"除去链接","toggleTableBorder":"切换表边框","viewSource":"查看 HTML 源代码","fontSize":"字体大小","systemShortcut":"只能通过使用键盘快捷键在浏览器中执行 \"${0}\" 操作。请使用 ${1}。","indent":"增加缩进","redo":"重做","strikethrough":"删除线","justifyFull":"对齐","justifyCenter":"居中","hiliteColor":"背景色","deleteTable":"删除表","outdent":"减少缩进","cut":"剪切","plainFormatBlock":"段落样式","toggleDir":"切换方向","bold":"粗体","tabIndent":"制表符缩进","justifyRight":"右对齐","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.zh_cn");dojo.cldr.nls.number.zh_cn={"currencyFormat":"¤#,##0.00","decimalFormat":"#,##0.###","group":",","scientificFormat":"#E0","percentFormat":"#,##0%","decimal":".","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","infinity":"∞","list":";","percentSign":"%","minusSign":"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","nan":"NaN","nativeZeroDigit":"0","plusSign":"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","perMille":"‰","patternDigit":"#","currencySpacing-beforeCurrency-insertBetween":" ","exponential":"E"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.zh_cn");dijit.form.nls.validate.zh_cn={"rangeMessage":"此值超出范围。","invalidMessage":"输入的值无效。","missingMessage":"此值是必需值。"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.zh_cn");dojo.cldr.nls.currency.zh_cn={"HKD_displayName":"港元","CHF_displayName":"瑞士法郎","CAD_displayName":"加拿大元","CNY_displayName":"人民币","AUD_displayName":"澳大利亚元","JPY_displayName":"日元","USD_displayName":"美元","CNY_symbol":"¥","GBP_displayName":"英镑","EUR_displayName":"欧元","CHF_symbol":"Fr.","JPY_symbol":"JP¥","HKD_symbol":"HK$","USD_symbol":"US$","CAD_symbol":"CA$","EUR_symbol":"€","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.zh_cn");dojo.cldr.nls.gregorian.zh_cn={"dateFormat-short":"yy-M-d","timeFormat-long":"ahh'时'mm'分'ss'秒'","dateFormat-medium":"yyyy-M-d","dateFormat-long":"yyyy'年'M'月'd'日'","timeFormat-medium":"ahh:mm:ss","timeFormat-short":"ah:mm","timeFormat-full":"ahh'时'mm'分'ss'秒' z","dateFormat-full":"yyyy'年'M'月'd'日'EEEE","months-format-narrow":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"周天","dateFormatItem-yQQQ":"y年QQQ","dateFormatItem-yMEd":"y年M月d日,E","dateFormatItem-MMMEd":"MMMd日E","eraNarrow":["公元前","公元"],"months-format-wide":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"dateTimeFormat-medium":"{1} {0}","dateFormatItem-Md":"M-d","field-era":"时期","dateFormatItem-yM":"yyyy-M","months-standAlone-wide":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],"quarters-format-wide":["第1季度","第2季度","第3季度","第4季度"],"field-year":"年","dateFormatItem-yMMM":"y年MMM","dateFormatItem-yQ":"y年QQQ","dateFormatItem-yyyyMMMM":"y年MMMM","field-hour":"小时","dateFormatItem-MMdd":"MM-dd","months-format-abbr":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"dateFormatItem-yyQ":"yy年第Q季度","am":"上午","dateFormatItem-H":"H时","months-standAlone-abbr":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],"quarters-format-abbr":["1季","2季","3季","4季"],"quarters-standAlone-wide":["第1季度","第2季度","第3季度","第4季度"],"dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"L","days-standAlone-wide":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],"dateFormatItem-MMMMd":"MMMMd日","dateFormatItem-yyMMM":"yy年MMM","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["1季","2季","3季","4季"],"eraAbbr":["公元前","公元"],"field-minute":"分钟","field-dayperiod":"上午/下午","days-standAlone-abbr":["周日","周一","周二","周三","周四","周五","周六"],"dateFormatItem-d":"d日","dateFormatItem-ms":"mm:ss","dateTimeFormat-long":"{1}{0}","dateFormatItem-MMMd":"MMMd日","dateFormatItem-MEd":"M-dE","dateTimeFormat-full":"{1}{0}","dateFormatItem-yMMMM":"y年MMMM","field-day":"日","days-format-wide":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],"field-zone":"区域","dateFormatItem-y":"y年","months-standAlone-narrow":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"dateFormatItem-yyMM":"yy-MM","dateFormatItem-hm":"ah:mm","days-format-abbr":["周日","周一","周二","周三","周四","周五","周六"],"dateFormatItem-yMMMd":"y年MMMd日","eraNames":["公元前","公元"],"days-format-narrow":["日","一","二","三","四","五","六"],"field-month":"月","days-standAlone-narrow":["日","一","二","三","四","五","六"],"dateFormatItem-MMM":"LLL","pm":"下午","dateFormatItem-MMMMEd":"MMMMd日E","dateFormatItem-MMMMdd":"MMMMdd日","field-second":"秒钟","dateFormatItem-yMMMEd":"y年MMMd日EEE","dateFormatItem-Ed":"d日E","field-week":"周","dateFormatItem-yyyyM":"y年M月","dateTimeFormat-short":"{1} {0}","dateFormatItem-hms":"ah:mm:ss","dateFormatItem-yyyy":"y年","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormatItem-EEEd":"d EEE","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Hms":"H:mm:ss"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.zh_cn");dijit.form.nls.ComboBox.zh_cn={"previousMessage":"先前选项","nextMessage":"更多选项"};
diff --git a/js/dojo/dijit/nls/dijit-all_zh-tw.js b/js/dojo/dijit/nls/dijit-all_zh-tw.js
--- a/js/dojo/dijit/nls/dijit-all_zh-tw.js
+++ b/js/dojo/dijit/nls/dijit-all_zh-tw.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_zh-tw");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.zh_tw");dojo.nls.colors.zh_tw={"lightsteelblue": "淡鐵藍色", "orangered": "橙紅色", "midnightblue": "午夜藍", "cadetblue": "軍服藍", "seashell": "海貝色", "slategrey": "岩灰色", "coral": "珊瑚紅", "darkturquoise": "暗松石綠", "antiquewhite": "米白色", "mediumspringgreen": "中春綠色", "salmon": "鮭紅色", "darkgrey": "暗灰色", "ivory": "象牙色", "greenyellow": "綠黃色", "mistyrose": "霧玫瑰色", "lightsalmon": "淡鮭紅", "silver": "銀色", "dimgrey": "昏灰色", "orange": "橙色", "white": "白色", "navajowhite": "印地安黃色", "royalblue": "品藍色", "deeppink": "深粉紅色", "lime": "檸檬色", "oldlace": "舊蕾絲色", "chartreuse": "淡黃綠色", "darkcyan": "暗青色", "yellow": "黃色", "linen": "亞麻色", "olive": "橄欖色", "gold": "金色", "lawngreen": "草綠色", "lightyellow": "淡黃色", "tan": "皮革色", "darkviolet": "暗紫羅蘭色", "lightslategrey": "淡岩灰色", "grey": "灰色", "darkkhaki": "暗卡其色", "green": "綠色", "deepskyblue": "深天藍色", "aqua": "水色", "sienna": "黃土赭色", "mintcream": "薄荷乳白色", "rosybrown": "玫瑰褐", "mediumslateblue": "中岩藍色", "magenta": "紫紅色", "lightseagreen": "淡海綠色", "cyan": "青色", "olivedrab": "橄欖綠", "darkgoldenrod": "暗金菊色", "slateblue": "岩藍色", "mediumaquamarine": "中碧綠色", "lavender": "薰衣草紫", "mediumseagreen": "中海綠色", "maroon": "栗色", "darkslategray": "暗岩灰色", "mediumturquoise": "中松石綠", "ghostwhite": "幽靈色", "darkblue": "暗藍色", "mediumvioletred": "中紫羅蘭紅", "brown": "褐色", "lightgray": "淡灰色", "sandybrown": "沙褐色", "pink": "粉紅色", "firebrick": "紅磚色", "indigo": "靛藍色", "snow": "雪白色", "darkorchid": "暗蘭花色", "turquoise": "松石綠", "chocolate": "巧克力色", "springgreen": "春綠色", "moccasin": "鹿皮黃色", "navy": "海軍藍", "lemonchiffon": "奶油黃", "teal": "深藍綠色", "floralwhite": "花卉白", "cornflowerblue": "矢車菊藍", "paleturquoise": "灰松石綠", "purple": "紫色", "gainsboro": "石板灰", "plum": "李紫色", "red": "紅色", "blue": "藍色", "forestgreen": "森綠色", "darkgreen": "暗綠色", "honeydew": "密瓜色", "darkseagreen": "暗海綠色", "lightcoral": "淡珊瑚紅", "palevioletred": "灰紫羅蘭紅", "mediumpurple": "中紫色", "saddlebrown": "鞍褐色", "darkmagenta": "暗紫紅色", "thistle": "薊色", "whitesmoke": "白煙色", "wheat": "小麥色", "violet": "紫羅蘭色", "lightskyblue": "淡天藍色", "goldenrod": "金菊色", "mediumblue": "中藍色", "skyblue": "天藍色", "crimson": "暗深紅色", "darksalmon": "暗鮭紅", "darkred": "暗紅色", "darkslategrey": "暗岩灰色", "peru": "祕魯色", "lightgrey": "淡灰色", "lightgoldenrodyellow": "淡金菊黃", "blanchedalmond": "杏仁白", "aliceblue": "愛麗絲藍", "bisque": "橘黃色", "slategray": "岩灰色", "palegoldenrod": "灰金菊色", "darkorange": "暗橙色", "aquamarine": "碧綠色", "lightgreen": "淡綠色", "burlywood": "實木色", "dodgerblue": "道奇藍", "darkgray": "暗灰色", "lightcyan": "淡青色", "powderblue": "粉藍色", "blueviolet": "藍紫色", "orchid": "蘭花色", "dimgray": "昏灰色", "beige": "灰棕色", "fuchsia": "海棠紅", "lavenderblush": "薰衣草紫紅", "hotpink": "暖粉紅色", "steelblue": "鐵藍色", "tomato": "蕃茄紅", "lightpink": "淡粉紅色", "limegreen": "檸檬綠", "indianred": "印度紅", "papayawhip": "番木瓜色", "lightslategray": "淡岩灰色", "gray": "灰色", "mediumorchid": "中蘭紫色", "cornsilk": "玉米黃", "black": "黑色", "seagreen": "海綠色", "darkslateblue": "暗岩藍色", "khaki": "卡其色", "lightblue": "淡藍色", "palegreen": "灰綠色", "azure": "天藍色", "peachpuff": "粉撲桃色", "darkolivegreen": "暗橄欖綠", "yellowgreen": "黃綠色"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.zh_tw");dijit.nls.loading.zh_tw={"loadingState": "載入中...", "errorState": "抱歉,發生錯誤"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.zh_tw");dijit.nls.Textarea.zh_tw={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.zh_tw");dijit._editor.nls.commands.zh_tw={"removeFormat": "移除格式", "copy": "複製", "paste": "貼上", "selectAll": "全選", "insertOrderedList": "編號清單", "insertTable": "插入/編輯表格", "underline": "底線", "foreColor": "前景顏色", "htmlToggle": "HTML 原始檔", "formatBlock": "段落樣式", "insertHorizontalRule": "水平尺規", "delete": "刪除", "insertUnorderedList": "項目符號清單", "tableProp": "表格內容", "insertImage": "插入影像", "superscript": "上標", "subscript": "下標", "createLink": "建立鏈結", "undo": "復原", "italic": "斜體", "fontName": "字型名稱", "justifyLeft": "靠左對齊", "unlink": "移除鏈結", "toggleTableBorder": "切換表格邊框", "fontSize": "字型大小", "indent": "縮排", "redo": "重做", "strikethrough": "加刪除線", "justifyFull": "對齊", "justifyCenter": "置中對齊", "hiliteColor": "背景顏色", "deleteTable": "刪除表格", "outdent": "凸排", "cut": "剪下", "plainFormatBlock": "段落樣式", "bold": "粗體", "systemShortcutFF": "\"${0}\" 動作在 Mozilla Firefox 中,只能使用鍵盤快速鍵。請使用 ${1}。", "justifyRight": "靠右對齊", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.zh_tw");dojo.cldr.nls.number.zh_tw={"currencyFormat": "¤#,##0.00", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.zh_tw");dijit.nls.common.zh_tw={"buttonCancel": "取消", "buttonSave": "儲存", "buttonOk": "確定"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.zh_tw");dijit.form.nls.validate.zh_tw={"rangeMessage": "* 此值超出範圍。", "invalidMessage": "* 輸入的值無效。", "missingMessage": "* 必須提供此值。"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.zh_tw");dijit.form.nls.ComboBox.zh_tw={"previousMessage": "前一個選擇項", "nextMessage": "其他選擇項"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.zh_tw");dojo.cldr.nls.currency.zh_tw={"HKD_displayName": "港元", "CHF_displayName": "瑞士法郎", "JPY_symbol": "JP¥", "HKD_symbol": "HK$", "CAD_displayName": "加拿大元", "USD_symbol": "US$", "AUD_displayName": "澳大利亚元", "JPY_displayName": "日元", "USD_displayName": "美元", "GBP_displayName": "英磅", "EUR_displayName": "欧元", "GBP_symbol": "£", "EUR_symbol": "€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.zh_tw");dojo.cldr.nls.gregorian.zh_tw={"eraAbbr": ["公元前", "公元"], "am": "上午", "months-format-abbr": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], "days-format-abbr": ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], "pm": "下午", "months-format-wide": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], "months-standAlone-narrow": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], "days-standAlone-narrow": ["日", "一", "二", "三", "四", "五", "六"], "days-format-wide": ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "eraNames": ["BCE", "CE"], "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "timeFormat-full": "HH:mm:ss z", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "dateFormat-long": "yyyy MMMM d", "timeFormat-medium": "HH:mm:ss", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateFormat-medium": "yyyy MMM d", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "timeFormat-long": "HH:mm:ss z", "timeFormat-short": "HH:mm", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateFormat-short": "yy/MM/dd", "dateFormat-full": "EEEE, yyyy MMMM dd", "dateTimeFormats-appendItem-Era": "{0} {1}", "quarters-format-wide": ["Q1", "Q2", "Q3", "Q4"]};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.zh_tw");dijit.nls.Textarea.zh_tw={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_zh-tw");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.zh_tw");dojo.nls.colors.zh_tw={"lightsteelblue":"淡鐵藍色","orangered":"橙紅色","midnightblue":"午夜藍","cadetblue":"軍服藍","seashell":"海貝色","slategrey":"岩灰色","coral":"珊瑚紅","darkturquoise":"暗松石綠","antiquewhite":"米白色","mediumspringgreen":"中春綠色","salmon":"鮭紅色","darkgrey":"暗灰色","ivory":"象牙色","greenyellow":"綠黃色","mistyrose":"霧玫瑰色","lightsalmon":"淡鮭紅","silver":"銀色","dimgrey":"昏灰色","orange":"橙色","white":"白色","navajowhite":"印地安黃色","royalblue":"品藍色","deeppink":"深粉紅色","lime":"檸檬色","oldlace":"舊蕾絲色","chartreuse":"淡黃綠色","darkcyan":"暗青色","yellow":"黃色","linen":"亞麻色","olive":"橄欖色","gold":"金色","lawngreen":"草綠色","lightyellow":"淡黃色","tan":"皮革色","darkviolet":"暗紫羅蘭色","lightslategrey":"淡岩灰色","grey":"灰色","darkkhaki":"暗卡其色","green":"綠色","deepskyblue":"深天藍色","aqua":"水色","sienna":"黃土赭色","mintcream":"薄荷乳白色","rosybrown":"玫瑰褐","mediumslateblue":"中岩藍色","magenta":"紫紅色","lightseagreen":"淡海綠色","cyan":"青色","olivedrab":"橄欖綠","darkgoldenrod":"暗金菊色","slateblue":"岩藍色","mediumaquamarine":"中碧綠色","lavender":"薰衣草紫","mediumseagreen":"中海綠色","maroon":"栗色","darkslategray":"暗岩灰色","mediumturquoise":"中松石綠","ghostwhite":"幽靈色","darkblue":"暗藍色","mediumvioletred":"中紫羅蘭紅","brown":"褐色","lightgray":"淡灰色","sandybrown":"沙褐色","pink":"粉紅色","firebrick":"紅磚色","indigo":"靛藍色","snow":"雪白色","darkorchid":"暗蘭花色","turquoise":"松石綠","chocolate":"巧克力色","springgreen":"春綠色","moccasin":"鹿皮黃色","navy":"海軍藍","lemonchiffon":"奶油黃","teal":"深藍綠色","floralwhite":"花卉白","cornflowerblue":"矢車菊藍","paleturquoise":"灰松石綠","purple":"紫色","gainsboro":"石板灰","plum":"李紫色","red":"紅色","blue":"藍色","forestgreen":"森綠色","darkgreen":"暗綠色","honeydew":"密瓜色","darkseagreen":"暗海綠色","lightcoral":"淡珊瑚紅","palevioletred":"灰紫羅蘭紅","mediumpurple":"中紫色","saddlebrown":"鞍褐色","darkmagenta":"暗紫紅色","thistle":"薊色","whitesmoke":"白煙色","wheat":"小麥色","violet":"紫羅蘭色","lightskyblue":"淡天藍色","goldenrod":"金菊色","mediumblue":"中藍色","skyblue":"天藍色","crimson":"暗深紅色","darksalmon":"暗鮭紅","darkred":"暗紅色","darkslategrey":"暗岩灰色","peru":"祕魯色","lightgrey":"淡灰色","lightgoldenrodyellow":"淡金菊黃","blanchedalmond":"杏仁白","aliceblue":"愛麗絲藍","bisque":"橘黃色","slategray":"岩灰色","palegoldenrod":"灰金菊色","darkorange":"暗橙色","aquamarine":"碧綠色","lightgreen":"淡綠色","burlywood":"實木色","dodgerblue":"道奇藍","darkgray":"暗灰色","lightcyan":"淡青色","powderblue":"粉藍色","blueviolet":"藍紫色","orchid":"蘭花色","dimgray":"昏灰色","beige":"灰棕色","fuchsia":"海棠紅","lavenderblush":"薰衣草紫紅","hotpink":"暖粉紅色","steelblue":"鐵藍色","tomato":"蕃茄紅","lightpink":"淡粉紅色","limegreen":"檸檬綠","indianred":"印度紅","papayawhip":"番木瓜色","lightslategray":"淡岩灰色","gray":"灰色","mediumorchid":"中蘭紫色","cornsilk":"玉米黃","black":"黑色","seagreen":"海綠色","darkslateblue":"暗岩藍色","khaki":"卡其色","lightblue":"淡藍色","palegreen":"灰綠色","azure":"天藍色","peachpuff":"粉撲桃色","darkolivegreen":"暗橄欖綠","yellowgreen":"黃綠色"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.zh_tw");dijit.nls.loading.zh_tw={"loadingState":"載入中...","errorState":"抱歉,發生錯誤"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.zh_tw");dijit.nls.common.zh_tw={"buttonOk":"確定","buttonCancel":"取消","buttonSave":"儲存","itemClose":"關閉"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.zh_tw");dijit._editor.nls.commands.zh_tw={"removeFormat":"移除格式","copy":"複製","paste":"貼上","selectAll":"全選","insertOrderedList":"編號清單","insertTable":"插入/編輯表格","print":"列印","underline":"底線","foreColor":"前景顏色","htmlToggle":"HTML 原始檔","formatBlock":"段落樣式","newPage":"新建頁面","insertHorizontalRule":"水平尺規","delete":"刪除","insertUnorderedList":"項目符號清單","tableProp":"表格內容","insertImage":"插入影像","superscript":"上標","subscript":"下標","createLink":"建立鏈結","undo":"復原","fullScreen":"切換全螢幕","italic":"斜體","fontName":"字型名稱","justifyLeft":"靠左對齊","unlink":"移除鏈結","toggleTableBorder":"切換表格邊框","viewSource":"檢視 HTML 原始檔","fontSize":"字型大小","systemShortcut":"\"${0}\" 動作只能在瀏覽器中透過使用鍵盤快速鍵來使用。請使用 ${1}。","indent":"縮排","redo":"重做","strikethrough":"加刪除線","justifyFull":"對齊","justifyCenter":"置中對齊","hiliteColor":"背景顏色","deleteTable":"刪除表格","outdent":"凸排","cut":"剪下","plainFormatBlock":"段落樣式","toggleDir":"切換方向","bold":"粗體","tabIndent":"定位點縮排","justifyRight":"靠右對齊","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.zh_tw");dojo.cldr.nls.number.zh_tw={"currencyFormat":"¤#,##0.00","group":",","list":";","decimalFormat":"#,##0.###","scientificFormat":"#E0","percentFormat":"#,##0%","decimal":".","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","infinity":"∞","percentSign":"%","minusSign":"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","nan":"NaN","nativeZeroDigit":"0","plusSign":"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","perMille":"‰","patternDigit":"#","currencySpacing-beforeCurrency-insertBetween":" ","exponential":"E"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.zh_tw");dijit.form.nls.validate.zh_tw={"rangeMessage":"此值超出範圍。","invalidMessage":"輸入的值無效。","missingMessage":"必須提供此值。"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.zh_tw");dojo.cldr.nls.currency.zh_tw={"BRE_displayName":"巴西克魯賽羅 (1990-1993)","DEM_displayName":"德國馬克","KGS_symbol":"som","CUP_displayName":"古巴披索","HUF_symbol":"Ft","BDT_symbol":"Tk","LSL_symbol":"M","VEF_symbol":"BsF","MDL_displayName":"摩杜雲列伊","DOP_displayName":"多明尼加披索","MTL_symbol":"Lm","NGN_displayName":"奈及利亞奈拉","KZT_displayName":"卡扎克斯坦坦吉","BGL_symbol":"lev","LTT_displayName":"立陶宛特羅","LAK_displayName":"寮國基普","LKR_displayName":"斯里蘭卡盧布","AOR_displayName":"安哥拉新寬扎 Reajustado (1995-1999)","XEU_displayName":"歐洲貨幣單位 XEU","SYP_symbol":"LS","USS_displayName":"美元 (同一天)","MNT_displayName":"蒙古圖格里克","AMD_symbol":"dram","MOP_displayName":"澳門元","TJR_displayName":"塔吉克斯坦盧布","LUC_displayName":"盧森堡可兌換法郎","LUL_displayName":"盧森堡金融法郎","MRO_symbol":"UM","AON_displayName":"安哥拉新寬扎 (1990-2000)","BEF_displayName":"比利時法郎","IEP_displayName":"愛爾蘭鎊","SBD_displayName":"索羅門群島元","GRD_displayName":"希臘德拉克馬","AZM_displayName":"阿塞拜彊馬特納","MTP_displayName":"馬爾他鎊","UGX_symbol":"U Sh","ARS_symbol":"Arg$","LVR_displayName":"拉脫維亞盧布","GNF_displayName":"幾內亞法郎","GIP_displayName":"直布羅陀鎊","SRG_displayName":"蘇里南盾","BAD_displayName":"波士尼亞-黑塞哥維那第納爾","FJD_displayName":"斐濟元","BAM_displayName":"波士尼亞-黑塞哥維那可轉換馬克","XBB_displayName":"歐洲貨幣單位 XBB","CDF_displayName":"剛果法郎","HRD_displayName":"克羅地亞第納爾","EQE_displayName":"埃奎維勒","BZD_displayName":"伯利茲元","MLF_displayName":"馬里法郎","VEB_symbol":"Be","EGP_displayName":"埃及鎊","MVR_displayName":"馬爾地夫海島盧非亞","KWD_symbol":"KD","TRL_symbol":"TL","ALL_symbol":"lek","SDP_displayName":"蘇丹鎊","NPR_displayName":"尼泊爾盧布","PHP_displayName":"菲律賓披索","DJF_symbol":"DF","WST_displayName":"西薩摩亞塔拉","JPY_displayName":"日圓","TMM_displayName":"土庫曼馬納特","STD_symbol":"Db","BGN_displayName":"保加利亞新列弗","KYD_displayName":"開曼群島美元","VUV_displayName":"萬那杜萬杜","IRR_displayName":"伊朗里亞爾","DJF_displayName":"吉布地法郎","BTN_symbol":"Nu","XDR_displayName":"特殊提款權","ECS_displayName":"厄瓜多蘇克雷","LSM_displayName":"馬洛蒂","MNT_symbol":"Tug","NLG_displayName":"荷蘭盾","MWK_displayName":"馬拉維克瓦查","IRR_symbol":"RI","OMR_symbol":"RO","JMD_symbol":"J$","PES_displayName":"秘魯太陽幣","SRG_symbol":"Sf","LYD_displayName":"利比亞第納爾","BRR_displayName":"巴西克魯賽羅","ETB_symbol":"Br","KMF_symbol":"CF","DKK_symbol":"DKr","XXX_displayName":"XXX","IDR_displayName":"印尼 - 盧布","DZD_symbol":"DA","TZS_symbol":"T Sh","SGD_symbol":"SGD","KGS_displayName":"吉爾吉斯索馬","BRN_displayName":"巴西克如爾達農瓦","AFN_symbol":"Af","ISK_displayName":"冰島克朗","LUF_displayName":"盧森堡法郎","MXN_symbol":"MEX$","GYD_symbol":"G$","TOP_symbol":"T$","SVC_displayName":"薩爾瓦多科郎","ZMK_displayName":"尚比亞克瓦查","TOP_displayName":"東加潘加","ITL_displayName":"義大利里拉","USN_displayName":"美元 (第二天)","KWD_displayName":"科威特第納爾","GEL_symbol":"lari","KMF_displayName":"科摩羅法郎","COP_symbol":"Col$","MYR_displayName":"馬來西亞 - 林吉特","XFU_displayName":"法國 UIC 法郎","GMD_displayName":"甘比亞達拉西","LVL_displayName":"拉脫維亞拉特銀幣","AUD_displayName":"澳幣","XPF_displayName":"CFP 法郎","LBP_displayName":"黎巴嫩鎊","SKK_symbol":"Sk","BYB_displayName":"白俄羅斯新盧布 (1994-1999)","MKD_displayName":"馬其頓第納爾","GWP_displayName":"幾內亞披索披索","CNY_displayName":"人民幣","HNL_symbol":"L","BOB_symbol":"Bs","JOD_displayName":"約旦第納爾","OMR_displayName":"阿曼里奧","BOV_displayName":"玻利維亞幕多","XPT_displayName":"白金","AUD_symbol":"AU$","NOK_displayName":"挪威克羅納","SCR_displayName":"塞舌爾群島盧布","XBA_displayName":"歐洲綜合單位","CSK_displayName":"捷克斯洛伐克硬克朗","PLZ_displayName":"波蘭茲羅提 (1950-1995)","UAK_displayName":"烏克蘭卡本瓦那茲","MGF_displayName":"馬達加斯加法郎","GNS_displayName":"幾內亞西里","YUN_displayName":"南斯拉夫 可轉換第納爾","UYU_symbol":"Ur$","GYD_displayName":"圭亞那元","QAR_displayName":"卡達爾里亞爾","BZD_symbol":"BZ$","JOD_symbol":"JD","ALL_displayName":"阿爾巴尼亞列克","BBD_displayName":"巴貝多元","RON_displayName":"羅馬尼亞列伊","XCD_symbol":"EC$","AMD_displayName":"亞美尼亞德拉姆","CYP_displayName":"賽浦路斯鎊","GBP_symbol":"£","SEK_displayName":"瑞典克羅納","MZN_symbol":"MTn","MMK_displayName":"緬甸元","ZAR_displayName":"南非蘭特","ECV_displayName":"厄瓜多爾由里達瓦康斯坦 (UVC)","LYD_symbol":"LD","VUV_symbol":"VT","AWG_displayName":"阿魯巴盾","CVE_symbol":"CVEsc","STD_displayName":"聖多美島和普林西比島多布拉","CAD_displayName":"加幣","ADP_displayName":"安道爾陪士特","MRO_displayName":"茅利塔尼亞烏吉亞","LSL_displayName":"賴索托羅蒂","TND_displayName":"突尼西亞第納爾","USD_symbol":"$","BMD_symbol":"Ber$","BAM_symbol":"KM","BRC_displayName":"巴西克魯賽羅 (1986-1989)","BMD_displayName":"百慕達幣","BRL_displayName":"巴西里拉","JMD_displayName":"牙買加元","SOS_displayName":"索馬利亞先令","SAR_displayName":"沙烏地里雅","PEI_displayName":"祕魯因蒂","ESP_displayName":"西班牙陪士特","HKD_displayName":"港幣","ESP_symbol":"₧","BWP_displayName":"波札那 - 普拉","TTD_displayName":"千里達及托巴哥元","BSD_displayName":"巴哈馬元","BIF_displayName":"蒲隆地法郎","FRF_displayName":"法國法郎","DKK_displayName":"丹麥克羅納","AED_displayName":"阿拉伯聯合大公國迪爾汗","GHS_symbol":"GH¢","AOK_displayName":"安哥拉寬扎(1977-1990)","ATS_displayName":"奧地利先令","PEN_displayName":"秘魯新太陽幣","CRC_displayName":"哥斯大黎加科郎","PAB_displayName":"巴拿馬巴波亞","CHE_displayName":"WIR 歐元","GQE_displayName":"赤道幾內亞埃奎勒","DZD_displayName":"阿爾及利亞第納爾","EEK_displayName":"愛沙尼亞克朗","YDD_displayName":"葉門第納爾","GHC_displayName":"迦納仙蔕","YER_symbol":"YRl","PLN_symbol":"Zl","NPR_symbol":"Nrs","MXP_displayName":"墨西哥銀披索 (1861-1992)","XAG_displayName":"XAG","XFO_displayName":"法國金法郎","GWE_displayName":"葡屬幾內亞埃斯庫多","BOB_displayName":"玻利維亞貨幣單位","CAD_symbol":"CA$","ZWD_displayName":"辛巴威元","SRD_displayName":"蘇利南元","ZRN_displayName":"薩伊新扎伊爾","XAU_displayName":"黃金","GTQ_symbol":"Q","KRW_symbol":"KRW","BOP_displayName":"玻利維亞披索","LBP_symbol":"LL","XBD_displayName":"歐洲會計單位(XBD)","TZS_displayName":"坦尚尼亞先令","XPF_symbol":"CFPF","TTD_symbol":"TT$","LRD_displayName":"賴比瑞亞元","KRW_displayName":"韓國圜","SHP_displayName":"聖赫勒拿鎊","NAD_symbol":"N$","MZE_displayName":"莫桑比克埃斯庫多","SDD_displayName":"蘇丹第納爾","HRK_displayName":"克羅地亞庫納","FKP_displayName":"福克蘭群島鎊","COP_displayName":"哥倫比亞披索","YUD_displayName":"南斯拉夫第納爾硬幣","YUM_displayName":"南斯拉夫挪威亞第納爾","BYR_symbol":"Rbl","THB_displayName":"泰銖","MGA_displayName":"馬達加斯加艾瑞爾","TWD_displayName":"新臺幣","UGS_displayName":"烏干達先令 (1966-1987)","SBD_symbol":"SI$","ZAL_displayName":"南非 - 蘭特 (金融)","GEL_displayName":"喬治拉里","ILP_displayName":"以色列鎊","MKD_symbol":"MDen","KES_displayName":"肯尼亞先令","CZK_displayName":"捷克克朗","UGX_displayName":"烏干達先令","KZT_symbol":"T","BGL_displayName":"保加利亞硬列弗","ARP_displayName":"阿根廷披索(1983-1985)","BBD_symbol":"BDS$","MYR_symbol":"RM","RUR_displayName":"俄羅斯盧布 (1991-1998)","ERN_displayName":"厄立特里亞納克法","BEF_symbol":"BF","CLF_displayName":"卡林油達佛曼跎","BRB_displayName":"巴西克魯薩多農瓦(1967-1986)","IDR_symbol":"Rp","IEP_symbol":"IR£","BHD_displayName":"巴林第納爾","SYP_displayName":"敘利亞鎊","BIF_symbol":"Fbu","SZL_displayName":"史瓦濟蘭里朗吉尼","INR_displayName":"印度盧布","PTE_displayName":"葡萄牙埃斯庫多","KPW_displayName":"北朝鮮幣","XOF_displayName":"西非法郎 BCEAO","DOP_symbol":"RD$","MXN_displayName":"墨西哥 - 披索","RWF_displayName":"盧安達法郎","ETB_displayName":"衣索比亞比爾","LTL_displayName":"立陶宛里塔","SZL_symbol":"E","QAR_symbol":"QR","SOS_symbol":"Sh.","BND_displayName":"汶萊元","SUR_displayName":"蘇聯盧布","AOA_displayName":"安哥拉寬扎","FJD_symbol":"F$","CVE_displayName":"維德角埃斯庫多","XTS_displayName":"XTS","CLP_displayName":"智利披索","HUF_displayName":"匈牙利 - 福林","LKR_symbol":"SL Re","SCR_symbol":"SR","TJS_displayName":"塔吉克索莫尼","MWK_symbol":"MK","GBP_displayName":"英鎊","TPE_displayName":"帝汶埃斯庫多","GNF_symbol":"GF","SGD_displayName":"新加坡幣","SLL_displayName":"獅子山利昂","MZM_symbol":"Mt","PHP_symbol":"Php","CYP_symbol":"£C","XAF_displayName":"西非法郎 BEAC","MTL_displayName":"馬爾他里拉","KHR_displayName":"柬埔寨瑞爾","ZRZ_displayName":"扎伊爾扎伊爾","KES_symbol":"K Sh","PKR_symbol":"Pra","IQD_symbol":"ID","BEC_displayName":"比利時法郎 (可轉換)","BEL_displayName":"比利時法郎 (金融)","AZN_displayName":"亞塞拜然蒙納特","FIM_displayName":"芬蘭馬克","PKR_displayName":"巴基斯坦盧布","UYP_displayName":"烏拉圭披索 (1975-1993)","ANG_symbol":"NA f.","CHW_displayName":"WIR 法郎","PLN_displayName":"波蘭茲羅提","RON_symbol":"0≤lei|1≤leu|1","BTN_displayName":"不丹那特倫","UAH_displayName":"烏克蘭格里夫那","YER_displayName":"也門里亞爾","UYU_displayName":"烏拉圭披索","CRC_symbol":"C","PGK_displayName":"巴布亞紐幾內亞基那","XBC_displayName":"歐洲會計單位(XBC)","EUR_displayName":"歐元","MUR_displayName":"模里西斯盧布","BYR_displayName":"白俄羅斯盧布","SEK_symbol":"SKr","BHD_symbol":"BD","IQD_displayName":"伊拉克第納爾","VEB_displayName":"委內瑞拉博利瓦","CLP_symbol":"Ch$","MZM_displayName":"莫三比克梅蒂卡爾","NZD_symbol":"$NZ","CHF_symbol":"Fr.","SIT_displayName":"斯洛維尼亞托勒","NOK_symbol":"NKr","XCD_displayName":"格瑞那達元","RUB_displayName":"俄羅斯盧布","BUK_displayName":"緬甸元 BUK","ILS_displayName":"以色列新謝克爾","KHR_symbol":"CR","NAD_displayName":"納米比亞元","HNL_displayName":"洪都拉斯倫皮拉","GTQ_displayName":"瓜地馬拉格查爾","EUR_symbol":"€","NZD_displayName":"紐西蘭幣","ARA_displayName":"阿根廷奧斯特納爾","ARS_displayName":"阿根廷披索","ANG_displayName":"荷屬安地列斯盾","MOP_symbol":"MOP","ZWD_symbol":"Z$","ITL_symbol":"₤","ZAR_symbol":"R","CHF_displayName":"瑞士法郎","USD_displayName":"美元","CNY_symbol":"¥","JPY_symbol":"JP¥","HKD_symbol":"HK$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.zh_tw");dojo.cldr.nls.gregorian.zh_tw={"dateFormatItem-yM":"yyyy/M","field-minute":"分鐘","eraNames":["西元前","西元"],"field-weekday":"週天","dateFormatItem-MMdd":"MM/dd","months-standAlone-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"field-era":"年代","field-hour":"小時","quarters-standAlone-abbr":["第1季","第2季","第3季","第4季"],"timeFormat-full":"zzzzah時mm分ss秒","months-standAlone-abbr":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"dateFormatItem-Ed":"d日(E)","dateFormatItem-yMMM":"y年M月","timeFormat-medium":"ah:mm:ss","field-zone":"區域","dateFormatItem-yyMM":"yyyy/MM","dateFormat-medium":"yyyy/M/d","quarters-standAlone-wide":["第1季","第2季","第3季","第4季"],"dateFormatItem-yMMMM":"y年M月","dateFormatItem-HHmmss":"H:mm:ss","months-standAlone-wide":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"field-week":"週","dateFormatItem-HHmm":"H:mm","timeFormat-long":"zah時mm分ss秒","dateFormatItem-H":"H時","quarters-format-abbr":["第1季","第2季","第3季","第4季"],"days-format-abbr":["週日","週一","週二","週三","週四","週五","週六"],"field-second":"秒","dateFormatItem-MEd":"M-d(E)","months-format-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"days-standAlone-abbr":["週日","週一","週二","週三","週四","週五","週六"],"dateFormat-short":"yy/M/d","dateFormatItem-Md":"M/d","dateFormatItem-yMEd":"yyyy/M/d(EEE)","dateTimeAvailableFormats":["d日(E)","H:mm","H:mm:ss","M-d(E)","MM/dd","M/d","yyyy/M","yyyy/M/d(EEE)","yyyy年M月","yyyy年M月","yyyy/MM","MMMMdd日","MMMd日","MM-dd","M-d","d日","mm:ss","mm:ss","yyyy年","yyyy-M","yyyy年M月d日,E","yyyy年MMM","yyyy年MMMd日EEE","yyyy年MMMM","yyyy年QQQ","y年QQQ","yy-MM","yy年MMM","yy年第Q季度","yyyy年","yyyy年M月","yyyy年MMMM"],"quarters-format-wide":["第1季","第2季","第3季","第4季"],"quarters-standAlone-narrow":["1","2","3","4"],"dateFormatItem-yQQQ":"y年QQQ","dateFormatItem-MMMEd":"MMMd日E","eraNarrow":["公元前","公元"],"dateFormat-long":"y年M月d日","months-format-wide":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"dateTimeFormat-medium":"{1} {0}","dateFormat-full":"y年M月d日EEEE","timeFormat-short":"ah:mm","field-year":"年","dateFormatItem-yQ":"y年QQQ","dateFormatItem-yyyyMMMM":"y年MMMM","months-format-abbr":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"dateFormatItem-yyQ":"yy年第Q季度","am":"上午","dateFormatItem-M":"L","days-standAlone-wide":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],"dateFormatItem-MMMMd":"MMMMd日","dateFormatItem-yyMMM":"yy年MMM","dateFormatItem-Hm":"H:mm","eraAbbr":["公元前","公元"],"field-dayperiod":"上午/下午","dateFormatItem-d":"d日","dateFormatItem-ms":"mm:ss","dateTimeFormat-long":"{1}{0}","dateFormatItem-MMMd":"MMMd日","dateTimeFormat-full":"{1}{0}","field-day":"日","days-format-wide":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],"dateFormatItem-y":"y年","dateFormatItem-hm":"ah:mm","dateFormatItem-yMMMd":"y年MMMd日","days-format-narrow":["日","一","二","三","四","五","六"],"field-month":"月","days-standAlone-narrow":["日","一","二","三","四","五","六"],"dateFormatItem-MMM":"LLL","pm":"下午","dateFormatItem-MMMMEd":"MMMMd日E","dateFormatItem-MMMMdd":"MMMMdd日","dateFormatItem-yMMMEd":"y年MMMd日EEE","dateFormatItem-yyyyM":"y年M月","dateTimeFormat-short":"{1} {0}","dateFormatItem-hms":"ah:mm:ss","dateFormatItem-yyyy":"y年","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormatItem-EEEd":"d EEE","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Hms":"H:mm:ss"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.zh_tw");dijit.form.nls.ComboBox.zh_tw={"previousMessage":"前一個選擇項","nextMessage":"其他選擇項"};
diff --git a/js/dojo/dijit/nls/dijit-all_zh.js b/js/dojo/dijit/nls/dijit-all_zh.js
--- a/js/dojo/dijit/nls/dijit-all_zh.js
+++ b/js/dojo/dijit/nls/dijit-all_zh.js
@@ -1,1 +1,1 @@
-dojo.provide("dijit.nls.dijit-all_zh");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.zh");dojo.nls.colors.zh={"lightsteelblue": "浅钢蓝色", "orangered": "橙红色", "midnightblue": "深蓝色", "cadetblue": "灰蓝色", "seashell": "海贝色", "slategrey": "灰石色", "coral": "珊瑚色", "darkturquoise": "深粉蓝", "antiquewhite": "古董白", "mediumspringgreen": "间春绿色", "salmon": "橙红", "darkgrey": "深灰色", "ivory": "象牙色", "greenyellow": "绿黄色", "mistyrose": "浅玫瑰色", "lightsalmon": "淡橙色", "silver": "银白色", "dimgrey": "暗灰色", "orange": "橙色", "white": "白色", "navajowhite": "纳瓦白", "royalblue": "品蓝", "deeppink": "深粉红色", "lime": "淡黄绿色", "oldlace": "老白色", "chartreuse": "黄绿色", "darkcyan": "深青绿", "yellow": "黄色", "linen": "亚麻色", "olive": "橄榄绿", "gold": "金黄色", "lawngreen": "草绿色", "lightyellow": "浅黄色", "tan": "棕褐色", "darkviolet": "深紫色", "lightslategrey": "浅青灰", "grey": "灰色", "darkkhaki": "深卡其色", "green": "绿色", "deepskyblue": "深天蓝色", "aqua": "浅绿色", "sienna": "赭色", "mintcream": "薄荷色", "rosybrown": "褐玫瑰红", "mediumslateblue": "间暗蓝色", "magenta": "洋红色", "lightseagreen": "浅海藻绿", "cyan": "青蓝色", "olivedrab": "草绿色", "darkgoldenrod": "深金黄", "slateblue": "石蓝色", "mediumaquamarine": "间绿色", "lavender": "淡紫色", "mediumseagreen": "间海蓝色", "maroon": "栗色", "darkslategray": "深青灰", "mediumturquoise": "间绿宝石色", "ghostwhite": "苍白", "darkblue": "深蓝", "mediumvioletred": "间紫罗兰色", "brown": "棕色", "lightgray": "浅灰色", "sandybrown": "沙褐色", "pink": "粉红色", "firebrick": "砖红", "indigo": "靛青", "snow": "雪白色", "darkorchid": "深紫色", "turquoise": "绿宝石色", "chocolate": "巧克力色", "springgreen": "春绿色", "moccasin": "鹿皮色", "navy": "深蓝色", "lemonchiffon": "柠檬绸色", "teal": "水鸭色", "floralwhite": "花白色", "cornflowerblue": "浅蓝色", "paleturquoise": "苍绿色", "purple": "紫色", "gainsboro": "淡灰色", "plum": "杨李色", "red": "红色", "blue": "蓝色", "forestgreen": "森林绿", "darkgreen": "深绿色", "honeydew": "蜜汁色", "darkseagreen": "深海藻绿", "lightcoral": "浅珊瑚色", "palevioletred": "苍紫罗兰色", "mediumpurple": "间紫色", "saddlebrown": "重褐色", "darkmagenta": "深洋红色", "thistle": "蓟色", "whitesmoke": "烟白色", "wheat": "浅黄色", "violet": "紫色", "lightskyblue": "浅天蓝色", "goldenrod": "金麒麟色", "mediumblue": "间蓝色", "skyblue": "天蓝色", "crimson": "深红色", "darksalmon": "深橙红", "darkred": "深红色", "darkslategrey": "深青灰", "peru": "秘鲁色", "lightgrey": "浅灰色", "lightgoldenrodyellow": "浅金黄色", "blanchedalmond": "白杏色", "aliceblue": "爱丽丝蓝", "bisque": "桔黄色", "slategray": "灰石色", "palegoldenrod": "淡金黄色", "darkorange": "深橙色", "aquamarine": "碧绿色", "lightgreen": "浅绿色", "burlywood": "实木色", "dodgerblue": "闪蓝色", "darkgray": "深灰色", "lightcyan": "浅青色", "powderblue": "铁蓝", "blueviolet": "紫罗兰色", "orchid": "紫色", "dimgray": "暗灰色", "beige": "米色", "fuchsia": "紫红色", "lavenderblush": "淡紫红", "hotpink": "深粉红", "steelblue": "钢蓝色", "tomato": "西红柿色", "lightpink": "浅粉红色", "limegreen": "橙绿色", "indianred": "印度红", "papayawhip": "木瓜色", "lightslategray": "浅青灰", "gray": "灰色", "mediumorchid": "间紫色", "cornsilk": "米绸色", "black": "黑色", "seagreen": "海绿色", "darkslateblue": "深青蓝", "khaki": "卡其色", "lightblue": "淡蓝色", "palegreen": "淡绿色", "azure": "天蓝色", "peachpuff": "桃色", "darkolivegreen": "深橄榄绿", "yellowgreen": "黄绿色"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.zh");dijit.nls.loading.zh={"loadingState": "正在装入...", "errorState": "对不起,发生了错误"};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.zh");dijit.nls.Textarea.zh={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.zh");dijit._editor.nls.commands.zh={"removeFormat": "除去格式", "copy": "复制", "paste": "粘贴", "selectAll": "全选", "insertOrderedList": "编号列表", "insertTable": "插入/编辑表", "underline": "下划线", "foreColor": "前景色", "htmlToggle": "HTML 源代码", "formatBlock": "段落样式", "insertHorizontalRule": "水平线", "delete": "删除", "insertUnorderedList": "符号列表", "tableProp": "表属性", "insertImage": "插入图像", "superscript": "上标", "subscript": "下标", "createLink": "创建链接", "undo": "撤销", "italic": "斜体", "fontName": "字体名称", "justifyLeft": "左对齐", "unlink": "除去链接", "toggleTableBorder": "切换表边框", "fontSize": "字体大小", "indent": "增加缩进", "redo": "重做", "strikethrough": "删除线", "justifyFull": "对齐", "justifyCenter": "居中", "hiliteColor": "背景色", "deleteTable": "删除表", "outdent": "减少缩进", "cut": "剪切", "plainFormatBlock": "段落样式", "bold": "粗体", "systemShortcutFF": "只能在 Mozilla Firefox 中通过键盘快捷方式执行“${0}”操作。请使用 ${1}。", "justifyRight": "右对齐", "appleKey": "⌘${0}", "ctrlKey": "ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.zh");dojo.cldr.nls.number.zh={"scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencyFormat": "¤ #,##0.00", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.zh");dijit.nls.common.zh={"buttonCancel": "取消", "buttonSave": "保存", "buttonOk": "确定"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.zh");dijit.form.nls.validate.zh={"rangeMessage": "* 此值超出范围。", "invalidMessage": "* 输入的值无效。", "missingMessage": "* 此值是必需值。"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.zh");dijit.form.nls.ComboBox.zh={"previousMessage": "先前选项", "nextMessage": "更多选项"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.zh");dojo.cldr.nls.currency.zh={"HKD_displayName": "港元", "CHF_displayName": "瑞士法郎", "JPY_symbol": "JP¥", "HKD_symbol": "HK$", "CAD_displayName": "加拿大元", "USD_symbol": "US$", "AUD_displayName": "澳大利亚元", "JPY_displayName": "日元", "USD_displayName": "美元", "GBP_displayName": "英磅", "EUR_displayName": "欧元", "GBP_symbol": "£", "EUR_symbol": "€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.zh");dojo.cldr.nls.gregorian.zh={"eraAbbr": ["公元前", "公元"], "am": "上午", "months-format-abbr": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], "days-format-abbr": ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], "pm": "下午", "months-format-wide": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], "months-standAlone-narrow": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], "days-standAlone-narrow": ["日", "一", "二", "三", "四", "五", "六"], "days-format-wide": ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "eraNames": ["BCE", "CE"], "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "timeFormat-full": "HH:mm:ss z", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "dateFormat-long": "yyyy MMMM d", "timeFormat-medium": "HH:mm:ss", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateFormat-medium": "yyyy MMM d", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "timeFormat-long": "HH:mm:ss z", "timeFormat-short": "HH:mm", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateFormat-short": "yy/MM/dd", "dateFormat-full": "EEEE, yyyy MMMM dd", "dateTimeFormats-appendItem-Era": "{0} {1}", "quarters-format-wide": ["Q1", "Q2", "Q3", "Q4"]};dojo.provide("dijit.nls.Textarea");dijit.nls.Textarea._built=true;dojo.provide("dijit.nls.Textarea.zh");dijit.nls.Textarea.zh={"iframeEditTitle": "edit area", "iframeFocusTitle": "edit area frame"};
+dojo.provide("dijit.nls.dijit-all_zh");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.zh");dojo.nls.colors.zh={"lightsteelblue":"浅钢蓝色","orangered":"橙红色","midnightblue":"深蓝色","cadetblue":"灰蓝色","seashell":"海贝色","slategrey":"灰石色","coral":"珊瑚色","darkturquoise":"深粉蓝","antiquewhite":"古董白","mediumspringgreen":"间春绿色","salmon":"橙红","darkgrey":"深灰色","ivory":"象牙色","greenyellow":"绿黄色","mistyrose":"浅玫瑰色","lightsalmon":"淡橙色","silver":"银白色","dimgrey":"暗灰色","orange":"橙色","white":"白色","navajowhite":"纳瓦白","royalblue":"品蓝","deeppink":"深粉红色","lime":"淡黄绿色","oldlace":"老白色","chartreuse":"黄绿色","darkcyan":"深青绿","yellow":"黄色","linen":"亚麻色","olive":"橄榄绿","gold":"金黄色","lawngreen":"草绿色","lightyellow":"浅黄色","tan":"棕褐色","darkviolet":"深紫色","lightslategrey":"浅青灰","grey":"灰色","darkkhaki":"深卡其色","green":"绿色","deepskyblue":"深天蓝色","aqua":"浅绿色","sienna":"赭色","mintcream":"薄荷色","rosybrown":"褐玫瑰红","mediumslateblue":"间暗蓝色","magenta":"洋红色","lightseagreen":"浅海藻绿","cyan":"青蓝色","olivedrab":"草绿色","darkgoldenrod":"深金黄","slateblue":"石蓝色","mediumaquamarine":"间绿色","lavender":"淡紫色","mediumseagreen":"间海蓝色","maroon":"栗色","darkslategray":"深青灰","mediumturquoise":"间绿宝石色","ghostwhite":"苍白","darkblue":"深蓝","mediumvioletred":"间紫罗兰色","brown":"棕色","lightgray":"浅灰色","sandybrown":"沙褐色","pink":"粉红色","firebrick":"砖红","indigo":"靛青","snow":"雪白色","darkorchid":"深紫色","turquoise":"绿宝石色","chocolate":"巧克力色","springgreen":"春绿色","moccasin":"鹿皮色","navy":"藏青色","lemonchiffon":"柠檬绸色","teal":"水鸭色","floralwhite":"花白色","cornflowerblue":"浅蓝色","paleturquoise":"苍绿色","purple":"紫色","gainsboro":"淡灰色","plum":"杨李色","red":"红色","blue":"蓝色","forestgreen":"森林绿","darkgreen":"深绿色","honeydew":"蜜汁色","darkseagreen":"深海藻绿","lightcoral":"浅珊瑚色","palevioletred":"苍紫罗兰色","mediumpurple":"间紫色","saddlebrown":"重褐色","darkmagenta":"深洋红色","thistle":"蓟色","whitesmoke":"烟白色","wheat":"浅黄色","violet":"紫色","lightskyblue":"浅天蓝色","goldenrod":"金麒麟色","mediumblue":"间蓝色","skyblue":"天蓝色","crimson":"绯红色","darksalmon":"深橙红","darkred":"深红色","darkslategrey":"深青灰","peru":"秘鲁色","lightgrey":"浅灰色","lightgoldenrodyellow":"浅金黄色","blanchedalmond":"白杏色","aliceblue":"爱丽丝蓝","bisque":"桔黄色","slategray":"灰石色","palegoldenrod":"淡金黄色","darkorange":"深橙色","aquamarine":"碧绿色","lightgreen":"浅绿色","burlywood":"实木色","dodgerblue":"闪蓝色","darkgray":"深灰色","lightcyan":"浅青色","powderblue":"铁蓝","blueviolet":"蓝紫色","orchid":"紫色","dimgray":"暗灰色","beige":"米色","fuchsia":"紫红色","lavenderblush":"淡紫红","hotpink":"深粉红","steelblue":"钢蓝色","tomato":"西红柿色","lightpink":"浅粉红色","limegreen":"橙绿色","indianred":"印度红","papayawhip":"木瓜色","lightslategray":"浅青灰","gray":"灰色","mediumorchid":"间紫色","cornsilk":"米绸色","black":"黑色","seagreen":"海绿色","darkslateblue":"深青蓝","khaki":"卡其色","lightblue":"淡蓝色","palegreen":"淡绿色","azure":"天蓝色","peachpuff":"桃色","darkolivegreen":"深橄榄绿","yellowgreen":"黄绿色"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.zh");dijit.nls.loading.zh={"loadingState":"正在加载...","errorState":"对不起,发生了错误"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.zh");dijit.nls.common.zh={"buttonOk":"确定","buttonCancel":"取消","buttonSave":"保存","itemClose":"关闭"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.zh");dijit._editor.nls.commands.zh={"removeFormat":"除去格式","copy":"复制","paste":"粘贴","selectAll":"全选","insertOrderedList":"编号列表","insertTable":"插入/编辑表","print":"打印","underline":"下划线","foreColor":"前景色","htmlToggle":"HTML 源代码","formatBlock":"段落样式","newPage":"新建页面","insertHorizontalRule":"水平线","delete":"删除","insertUnorderedList":"符号列表","tableProp":"表属性","insertImage":"插入图像","superscript":"上标","subscript":"下标","createLink":"创建链接","undo":"撤销","fullScreen":"切换全屏","italic":"斜体","fontName":"字体名称","justifyLeft":"左对齐","unlink":"除去链接","toggleTableBorder":"切换表边框","viewSource":"查看 HTML 源代码","fontSize":"字体大小","systemShortcut":"只能通过使用键盘快捷键在浏览器中执行 \"${0}\" 操作。请使用 ${1}。","indent":"增加缩进","redo":"重做","strikethrough":"删除线","justifyFull":"对齐","justifyCenter":"居中","hiliteColor":"背景色","deleteTable":"删除表","outdent":"减少缩进","cut":"剪切","plainFormatBlock":"段落样式","toggleDir":"切换方向","bold":"粗体","tabIndent":"制表符缩进","justifyRight":"右对齐","appleKey":"⌘${0}","ctrlKey":"ctrl+${0}"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.zh");dojo.cldr.nls.number.zh={"decimalFormat":"#,##0.###","group":",","scientificFormat":"#E0","percentFormat":"#,##0%","currencyFormat":"¤#,##0.00","decimal":".","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","infinity":"∞","list":";","percentSign":"%","minusSign":"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","nan":"NaN","nativeZeroDigit":"0","plusSign":"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","perMille":"‰","patternDigit":"#","currencySpacing-beforeCurrency-insertBetween":" ","exponential":"E"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.zh");dijit.form.nls.validate.zh={"rangeMessage":"此值超出范围。","invalidMessage":"输入的值无效。","missingMessage":"此值是必需值。"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.zh");dojo.cldr.nls.currency.zh={"HKD_displayName":"港元","CHF_displayName":"瑞士法郎","CAD_displayName":"加拿大元","CNY_displayName":"人民币","AUD_displayName":"澳大利亚元","JPY_displayName":"日元","USD_displayName":"美元","CNY_symbol":"¥","GBP_displayName":"英镑","EUR_displayName":"欧元","CHF_symbol":"Fr.","JPY_symbol":"JP¥","HKD_symbol":"HK$","USD_symbol":"US$","CAD_symbol":"CA$","EUR_symbol":"€","GBP_symbol":"£","AUD_symbol":"AU$"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.zh");dojo.cldr.nls.gregorian.zh={"months-format-narrow":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"周天","dateFormatItem-yQQQ":"y年QQQ","dateFormatItem-yMEd":"y年M月d日,E","dateFormatItem-MMMEd":"MMMd日E","eraNarrow":["公元前","公元"],"dateFormat-long":"y年M月d日","months-format-wide":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"dateTimeFormat-medium":"{1} {0}","dateFormat-full":"y年M月d日EEEE","dateFormatItem-Md":"M-d","field-era":"时期","dateFormatItem-yM":"yyyy-M","months-standAlone-wide":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],"timeFormat-short":"ah:mm","quarters-format-wide":["第1季度","第2季度","第3季度","第4季度"],"timeFormat-long":"zah时mm分ss秒","field-year":"年","dateFormatItem-yMMM":"y年MMM","dateFormatItem-yQ":"y年QQQ","dateFormatItem-yyyyMMMM":"y年MMMM","field-hour":"小时","dateFormatItem-MMdd":"MM-dd","months-format-abbr":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"dateFormatItem-yyQ":"yy年第Q季度","timeFormat-full":"zzzzah时mm分ss秒","am":"上午","dateFormatItem-H":"H时","months-standAlone-abbr":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],"quarters-format-abbr":["1季","2季","3季","4季"],"quarters-standAlone-wide":["第1季度","第2季度","第3季度","第4季度"],"dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"L","days-standAlone-wide":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],"dateFormatItem-MMMMd":"MMMMd日","dateFormatItem-yyMMM":"yy年MMM","timeFormat-medium":"ahh:mm:ss","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["1季","2季","3季","4季"],"eraAbbr":["公元前","公元"],"field-minute":"分钟","field-dayperiod":"上午/下午","days-standAlone-abbr":["周日","周一","周二","周三","周四","周五","周六"],"dateFormatItem-d":"d日","dateFormatItem-ms":"mm:ss","dateTimeFormat-long":"{1}{0}","dateFormatItem-MMMd":"MMMd日","dateFormatItem-MEd":"M-dE","dateTimeFormat-full":"{1}{0}","dateFormatItem-yMMMM":"y年MMMM","field-day":"日","days-format-wide":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],"field-zone":"区域","dateFormatItem-y":"y年","months-standAlone-narrow":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"dateFormatItem-yyMM":"yy-MM","dateFormatItem-hm":"ah:mm","days-format-abbr":["周日","周一","周二","周三","周四","周五","周六"],"dateFormatItem-yMMMd":"y年MMMd日","eraNames":["公元前","公元"],"days-format-narrow":["日","一","二","三","四","五","六"],"field-month":"月","days-standAlone-narrow":["日","一","二","三","四","五","六"],"dateFormatItem-MMM":"LLL","pm":"下午","dateFormatItem-MMMMEd":"MMMMd日E","dateFormatItem-MMMMdd":"MMMMdd日","dateFormat-short":"yy-M-d","field-second":"秒钟","dateFormatItem-yMMMEd":"y年MMMd日EEE","dateFormatItem-Ed":"d日E","field-week":"周","dateFormat-medium":"yyyy-M-d","dateFormatItem-yyyyM":"y年M月","dateTimeFormat-short":"{1} {0}","dateFormatItem-hms":"ah:mm:ss","dateFormatItem-yyyy":"y年","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormatItem-EEEd":"d EEE","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Hms":"H:mm:ss"};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.zh");dijit.form.nls.ComboBox.zh={"previousMessage":"先前选项","nextMessage":"更多选项"};
diff --git a/js/dojo/dijit/nls/es/common.js b/js/dojo/dijit/nls/es/common.js
--- a/js/dojo/dijit/nls/es/common.js
+++ b/js/dojo/dijit/nls/es/common.js
@@ -1,1 +1,1 @@
-({"buttonCancel": "Cancelar", "buttonSave": "Guardar", "buttonOk": "Aceptar"})
\ No newline at end of file
+({"buttonOk":"Aceptar","buttonCancel":"Cancelar","buttonSave":"Guardar","itemClose":"Cerrar"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/es/loading.js b/js/dojo/dijit/nls/es/loading.js
--- a/js/dojo/dijit/nls/es/loading.js
+++ b/js/dojo/dijit/nls/es/loading.js
@@ -1,1 +1,1 @@
-({"loadingState": "Cargando...", "errorState": "Lo siento, se ha producido un error"})
\ No newline at end of file
+({"loadingState":"Cargando...","errorState":"Lo siento, se ha producido un error"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/fr/common.js b/js/dojo/dijit/nls/fr/common.js
--- a/js/dojo/dijit/nls/fr/common.js
+++ b/js/dojo/dijit/nls/fr/common.js
@@ -1,1 +1,1 @@
-({"buttonCancel": "Annuler", "buttonSave": "Sauvegarder", "buttonOk": "OK"})
\ No newline at end of file
+({"buttonOk":"OK","buttonCancel":"Annuler","buttonSave":"Sauvegarder","itemClose":"Fermer"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/fr/loading.js b/js/dojo/dijit/nls/fr/loading.js
--- a/js/dojo/dijit/nls/fr/loading.js
+++ b/js/dojo/dijit/nls/fr/loading.js
@@ -1,1 +1,1 @@
-({"loadingState": "Chargement...", "errorState": "Une erreur est survenue"})
\ No newline at end of file
+({"loadingState":"Chargement...","errorState":"Une erreur est survenue"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/hu/common.js b/js/dojo/dijit/nls/hu/common.js
--- a/js/dojo/dijit/nls/hu/common.js
+++ b/js/dojo/dijit/nls/hu/common.js
@@ -1,1 +1,1 @@
-({"buttonCancel": "Mégse", "buttonSave": "Mentés", "buttonOk": "OK"})
\ No newline at end of file
+({"buttonOk":"OK","buttonCancel":"Mégse","buttonSave":"Mentés","itemClose":"Bezárás"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/hu/loading.js b/js/dojo/dijit/nls/hu/loading.js
--- a/js/dojo/dijit/nls/hu/loading.js
+++ b/js/dojo/dijit/nls/hu/loading.js
@@ -1,1 +1,1 @@
-({"loadingState": "Betöltés...", "errorState": "Sajnálom, hiba történt"})
\ No newline at end of file
+({"loadingState":"Betöltés...","errorState":"Sajnálom, hiba történt"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/it/common.js b/js/dojo/dijit/nls/it/common.js
--- a/js/dojo/dijit/nls/it/common.js
+++ b/js/dojo/dijit/nls/it/common.js
@@ -1,1 +1,1 @@
-({"buttonCancel": "Annulla", "buttonSave": "Salva", "buttonOk": "OK"})
\ No newline at end of file
+({"buttonOk":"OK","buttonCancel":"Annulla","buttonSave":"Salva","itemClose":"Chiudi"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/it/loading.js b/js/dojo/dijit/nls/it/loading.js
--- a/js/dojo/dijit/nls/it/loading.js
+++ b/js/dojo/dijit/nls/it/loading.js
@@ -1,1 +1,1 @@
-({"loadingState": "Caricamento in corso...", "errorState": "Si è verificato un errore"})
\ No newline at end of file
+({"loadingState":"Caricamento in corso...","errorState":"Si è verificato un errore"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/ja/common.js b/js/dojo/dijit/nls/ja/common.js
--- a/js/dojo/dijit/nls/ja/common.js
+++ b/js/dojo/dijit/nls/ja/common.js
@@ -1,1 +1,1 @@
-({"buttonCancel": "キャンセル", "buttonSave": "保存", "buttonOk": "OK"})
\ No newline at end of file
+({"buttonOk":"OK","buttonCancel":"キャンセル","buttonSave":"保存","itemClose":"閉じる"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/ja/loading.js b/js/dojo/dijit/nls/ja/loading.js
--- a/js/dojo/dijit/nls/ja/loading.js
+++ b/js/dojo/dijit/nls/ja/loading.js
@@ -1,1 +1,1 @@
-({"loadingState": "ロード中...", "errorState": "エラーが発生しました。"})
\ No newline at end of file
+({"loadingState":"ロード中...","errorState":"エラーが発生しました。"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/ko/common.js b/js/dojo/dijit/nls/ko/common.js
--- a/js/dojo/dijit/nls/ko/common.js
+++ b/js/dojo/dijit/nls/ko/common.js
@@ -1,1 +1,1 @@
-({"buttonCancel": "취소", "buttonSave": "저장", "buttonOk": "확인"})
\ No newline at end of file
+({"buttonOk":"확인","buttonCancel":"취소","buttonSave":"저장","itemClose":"닫기"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/ko/loading.js b/js/dojo/dijit/nls/ko/loading.js
--- a/js/dojo/dijit/nls/ko/loading.js
+++ b/js/dojo/dijit/nls/ko/loading.js
@@ -1,1 +1,1 @@
-({"loadingState": "로드 중...", "errorState": "죄송합니다. 오류가 발생했습니다."})
\ No newline at end of file
+({"loadingState":"로드 중...","errorState":"죄송합니다. 오류가 발생했습니다."})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/loading.js b/js/dojo/dijit/nls/loading.js
--- a/js/dojo/dijit/nls/loading.js
+++ b/js/dojo/dijit/nls/loading.js
@@ -1,1 +1,1 @@
-({"loadingState": "Loading...", "errorState": "Sorry, an error occurred"})
\ No newline at end of file
+({"loadingState":"Loading...","errorState":"Sorry, an error occurred"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/pl/common.js b/js/dojo/dijit/nls/pl/common.js
--- a/js/dojo/dijit/nls/pl/common.js
+++ b/js/dojo/dijit/nls/pl/common.js
@@ -1,1 +1,1 @@
-({"buttonCancel": "Anuluj", "buttonSave": "Zapisz", "buttonOk": "OK"})
\ No newline at end of file
+({"buttonOk":"OK","buttonCancel":"Anuluj","buttonSave":"Zapisz","itemClose":"Zamknij"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/pl/loading.js b/js/dojo/dijit/nls/pl/loading.js
--- a/js/dojo/dijit/nls/pl/loading.js
+++ b/js/dojo/dijit/nls/pl/loading.js
@@ -1,1 +1,1 @@
-({"loadingState": "Trwa ładowanie...", "errorState": "Niestety, wystąpił błąd"})
\ No newline at end of file
+({"loadingState":"Ładowanie...","errorState":"Niestety, wystąpił błąd"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/pt/common.js b/js/dojo/dijit/nls/pt/common.js
--- a/js/dojo/dijit/nls/pt/common.js
+++ b/js/dojo/dijit/nls/pt/common.js
@@ -1,1 +1,1 @@
-({"buttonCancel": "Cancelar ", "buttonSave": "Salvar", "buttonOk": "OK"})
\ No newline at end of file
+({"buttonOk":"OK","buttonCancel":"Cancelar","buttonSave":"Salvar","itemClose":"Fechar"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/pt/loading.js b/js/dojo/dijit/nls/pt/loading.js
--- a/js/dojo/dijit/nls/pt/loading.js
+++ b/js/dojo/dijit/nls/pt/loading.js
@@ -1,1 +1,1 @@
-({"loadingState": "Carregando...", "errorState": "Ocorreu um erro"})
\ No newline at end of file
+({"loadingState":"Carregando...","errorState":"Desculpe, ocorreu um erro"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/ru/common.js b/js/dojo/dijit/nls/ru/common.js
--- a/js/dojo/dijit/nls/ru/common.js
+++ b/js/dojo/dijit/nls/ru/common.js
@@ -1,1 +1,1 @@
-({"buttonCancel": "Отмена", "buttonSave": "Сохранить", "buttonOk": "ОК"})
\ No newline at end of file
+({"buttonOk":"ОК","buttonCancel":"Отмена","buttonSave":"Сохранить","itemClose":"Закрыть"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/ru/loading.js b/js/dojo/dijit/nls/ru/loading.js
--- a/js/dojo/dijit/nls/ru/loading.js
+++ b/js/dojo/dijit/nls/ru/loading.js
@@ -1,1 +1,1 @@
-({"loadingState": "Загрузка...", "errorState": "Извините, возникла ошибка"})
\ No newline at end of file
+({"loadingState":"Загрузка...","errorState":"Извините, возникла ошибка"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/zh-tw/common.js b/js/dojo/dijit/nls/zh-tw/common.js
--- a/js/dojo/dijit/nls/zh-tw/common.js
+++ b/js/dojo/dijit/nls/zh-tw/common.js
@@ -1,1 +1,1 @@
-({"buttonCancel": "取消", "buttonSave": "儲存", "buttonOk": "確定"})
\ No newline at end of file
+({"buttonOk":"確定","buttonCancel":"取消","buttonSave":"儲存","itemClose":"關閉"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/zh-tw/loading.js b/js/dojo/dijit/nls/zh-tw/loading.js
--- a/js/dojo/dijit/nls/zh-tw/loading.js
+++ b/js/dojo/dijit/nls/zh-tw/loading.js
@@ -1,1 +1,1 @@
-({"loadingState": "載入中...", "errorState": "抱歉,發生錯誤"})
\ No newline at end of file
+({"loadingState":"載入中...","errorState":"抱歉,發生錯誤"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/zh/common.js b/js/dojo/dijit/nls/zh/common.js
--- a/js/dojo/dijit/nls/zh/common.js
+++ b/js/dojo/dijit/nls/zh/common.js
@@ -1,1 +1,1 @@
-({"buttonCancel": "取消", "buttonSave": "保存", "buttonOk": "确定"})
\ No newline at end of file
+({"buttonOk":"确定","buttonCancel":"取消","buttonSave":"保存","itemClose":"关闭"})
\ No newline at end of file
diff --git a/js/dojo/dijit/nls/zh/loading.js b/js/dojo/dijit/nls/zh/loading.js
--- a/js/dojo/dijit/nls/zh/loading.js
+++ b/js/dojo/dijit/nls/zh/loading.js
@@ -1,1 +1,1 @@
-({"loadingState": "正在装入...", "errorState": "对不起,发生了错误"})
\ No newline at end of file
+({"loadingState":"正在加载...","errorState":"对不起,发生了错误"})
\ No newline at end of file
diff --git a/js/dojo/dijit/themes/dijit.css b/js/dojo/dijit/themes/dijit.css
--- a/js/dojo/dijit/themes/dijit.css
+++ b/js/dojo/dijit/themes/dijit.css
@@ -1,1460 +1,1455 @@
-/*
- Essential styles that themes can inherit.
- In other words, works but doesn't look great.
-*/
-
-
-/****
- GENERIC PIECES
- ****/
.dijitReset {
- /* Use this style to null out padding, margin, border in your template elements
- so that page specific styles don't break them.
- - Use in all TABLE, TR and TD tags.
- - If there is more than one class on the tag, place this first so other classes override.
- */
- margin:0px;
- border:0px;
- padding:0px;
+
+ margin:0;
+ border:0;
+ padding:0;
line-height:normal;
+ font: inherit;
+ color: inherit;
}
-
.dijitInline {
- /* To inline block elements.
- Similar to InlineBox below, but this has fewer side-effects in Moz.
- Also, apparently works on a DIV as well as a FIELDSET.
- */
- display:-moz-inline-box; /* FF2 */
- display:inline-block; /* webkit and FF3 */
- border:0px;
- padding:0px;
+
+ display:inline-block;
+ #zoom: 1;
+ #display:inline;
+ border:0;
+ padding:0;
vertical-align:middle;
+ #vertical-align: auto;
}
-
-.dj_ie .dijitInline {
- zoom: 1; /* set hasLayout:true to mimic inline-block */
- #display:inline;
+.dijitHidden {
+
+ display: none !important;
}
-
+.dijitVisible {
+
+ display: block !important;
+ position: relative;
+}
+.dj_ie INPUT.dijitTextBox,
+.dj_ie .dijitInputField INPUT {
+ font-size: 100%;
+}
+.dj_ie .dijitInputField INPUT {
+ margin: -1px 0 !important;
+}
.dijitInlineTable {
- /* To inline tables with a given width set (otherwise, use dijitInline above)
- * Must also put style="-moz-inline-stack" on the node itself to workaround FF2 bugs
- */
- display: -moz-inline-stack; /* FF2 */
+
display:inline-table;
- display:inline-block; /* webkit and FF3 */
- #display:inline; /* MSIE (TODO: is this needed???) */
- border:0px;
- padding:0px;
- vertical-align:middle;
- position:relative; /* #5034 */
+ display:inline-block;
+ #zoom: 1;
+ #display:inline;
+ box-sizing: content-box; -moz-box-sizing: content-box;
+ border:0;
+ padding:0;
}
-
.dijitTeeny {
font-size:1px;
line-height:1px;
}
-
-/*
- * Popup items have a wrapper div (dijitPopup)
- * with the real popup inside, and maybe an iframe too
- */
.dijitPopup {
position: absolute;
background-color: transparent;
margin: 0;
border: 0;
padding: 0;
}
.dijit_a11y .dijitPopup,
.dijit_ally .dijitPopup div,
.dijit_a11y .dijitPopup table,
.dijit_a11y .dijitTooltipContainer {
- opacity: 1 !important;
background-color: white !important;
}
-.dj_ie .dijit_a11y .dijitPopup * {
- filter: none;
+.dijitInputField {
+ overflow:hidden;
+ #zoom:1;
}
-
-.dijitInputField {
- font-family:inherit;
- font-size:inherit;
- font-weight:inherit;
-}
-
.dijitPositionOnly {
- /* Null out all position-related properties */
- padding: 0px !important;
- border: 0px !important;
+
+ padding: 0 !important;
+ border: 0 !important;
background-color: transparent !important;
background-image: none !important;
height: auto !important;
width: auto !important;
}
-
.dijitNonPositionOnly {
- /* Null position-related properties */
+
float: none !important;
position: static !important;
- margin: 0px 0px 0px 0px !important;
+ margin: 0 0 0 0 !important;
vertical-align: middle !important;
}
-
.dijitBackgroundIframe {
- /*
- * iframe used for FF2 in high-contrast mode to prevent menu
- * being transparent
- */
+
position: absolute;
- left: 0px;
- top: 0px;
+ left: 0;
+ top: 0;
width: 100%;
height: 100%;
z-index: -1;
border: 0;
padding: 0;
margin: 0;
}
-
.dijitClickableRegion {
- /* a region we expect the user to click on */
- cursor : pointer;
+
+ background-color: #e2ebf2;
+ cursor: text;
}
-
-
.dijitDisplayNone {
- /* hide something. Use this as a class rather than element.style so another class can override */
+
display:none !important;
}
-
.dijitContainer {
- /* for all layout containers */
- overflow: hidden; /* need on IE so something can be reduced in size, and so scrollbars aren't temporarily displayed when resizing */
+
+ overflow: hidden;
}
-
-/****
- A11Y
- ****/
.dijit_a11y * {
background-image:none !important;
- background-color:transparent !important;
}
-
-.dijit_a11y .dijitCalendarIncrementControl .dijitA11ySideArrow {
- padding-left:.2em;
- visibility:visible !important;
+.dijit_a11y .dijitCalendarIncrementControl {
+ display: none;
}
-
-.dijitToolbar .dijitDropDownButton .dijitA11yDownArrow{
- /*make the arrow smaller in toolbar*/
- padding:0;
- margin:0;
-}
-.dj_ie6 .dijitToolbar .dijitDropDownButton .dijitA11yDownArrow{
- /*vertical-align: middle does not place the arrow in the middle of the toolbar in IE*/
- vertical-align: bottom;
+.dijit_a11y .dijitA11ySideArrow {
+ display: inline !important;
+ cursor: pointer;
}
-
-.dijitA11ySideArrow {
- vertical-align:top;
- margin-right:0em;
- margin-left:.2em;
- line-height:2em;
- text-align:center;
+.dijit_a11y .dijitCalendarDateLabel {
+ padding: 1px;
}
-
-.dj_ie .dijitA11yDownArrow,
-.dj_ie .dijitA11yUpArrow {
- font-size:.8em;
- vertical-align:middle;
- margin-right:.5em;
+.dijit_a11y .dijitCalendarSelectedDate .dijitCalendarDateLabel {
+ border: solid 1px black;
+ padding: 0px;
}
-
-
-
-
-.dijit_a11y .dijitButton .dijitButtonNode,
-.dijit_a11y .dijitDropDownButton .dijitButtonNode,
-.dijit_a11y .dijitComboButton .dijitButtonNode,
-.dijit_a11y .dijitComboBox .dijitInputField,
-.dijit_a11y .dijitComboBox .dijitButtonNode {
- border:1px solid black !important;
+.dijit_a11y .dijitCalendarDateTemplate {
+ padding-bottom: 0.1em !important;
+}
+.dijit_a11y .dijit * {
background:white !important;
color:black !important;
}
-
+.dijit_a11y .dijitButtonNode {
+ border-color: black!important;
+ border-style: outset!important;
+ border-width: medium!important;
+}
+.dijit_a11y .dijitComboBoxReadOnly .dijitInputField,
+.dijit_a11y .dijitComboBoxReadOnly .dijitButtonNode,
+.dijit_a11y .dijitSpinnerReadOnly .dijitButtonNode,
+.dijit_a11y .dijitSpinnerReadOnly .dijitInputField,
.dijit_a11y .dijitButtonDisabled .dijitButtonNode,
.dijit_a11y .dijitDropDownButtonDisabled .dijitButtonNode,
.dijit_a11y .dijitComboButtonDisabled .dijitButtonNode,
.dijit_a11y .dijitComboBoxDisabled .dijitInputField,
.dijit_a11y .dijitComboBoxDisabled .dijitButtonNode,
.dijit_a11y .dijitSpinnerDisabled .dijitButtonNode,
.dijit_a11y .dijitSpinnerDisabled .dijitInputField {
- border:1px dotted #999999 !important;
- color:#999999 !important;
+ border-style: outset!important;
+ border-width: medium!important;
+ border-color: #999 !important;
+ color:#999 !important;
}
-
-.dijit_a11y .dijitComboButton .dijitDownArrowButton,
-.dijit_a11y .dijitComboBox .dijitDownArrowButton {
- border-left:0px !important;
+.dijitButtonNode * {
+ vertical-align: middle;
+}
+.dijit_a11y .dijitArrowButtonInner {
+ width: 1em;
+ display: none !important;
}
-
-/* In high contrast mode, display the check symbol */
-.dijit_a11y .dijitToggleButtonChecked .dijitToggleButtonIconChar {
- display: inline !important;
+.dijitButtonNode .dijitArrowButtonInner {
+ background:no-repeat center;
+ width: 16px;
}
-
-
-
-/****
- 3-element borders: ( dijitLeft + dijitStretch + dijitRight )
- ****/
+.dijitComboBox .dijitArrowButtonInner {
+ display: block;
+}
+.dijit_a11y .dijitToggleButtonChecked .dijitToggleButtonIconChar {
+ display: inline !important;
+}
+.dijitLeft {
-.dijitLeft {
- /* Left part of a 3-element border */
background-position:left top;
background-repeat:no-repeat;
}
-
.dijitStretch {
- /* Middle (stretchy) part of a 3-element border */
- white-space:nowrap; /* MOW: move somewhere else */
+
+ white-space:nowrap;
background-repeat:repeat-x;
}
-
.dijitRight {
- /* Right part of a 3-element border */
- #display:inline; /* IE7 sizes to outer size w/o this */
+
+ #display:inline;
background-position:right top;
background-repeat:no-repeat;
}
-
-
-/****
- Right-to-left rules
- ****/
-.dijitRTL .dijitRightArrow {
- /* it becomes a left arrow for LTR locales */
- /* MOW: TODO... */
- margin-left:-2.1em;
-}
-
-
-
-
-
-/****
- dijit.form.Button
- dijit.form.DropDownButton
- dijit.form.ComboButton
- dijit.form.ComboBox (partial)
- ****/
+.dijitToggleButton,
.dijitButton,
.dijitDropDownButton,
-.dijitComboButton,
-.dijitComboBox {
- /* outside of button */
+.dijitComboButton {
+
margin: 0.2em;
- /* normalize line-heights inside the button */
- line-height: 1.3em;
+}
+.dijitToolbar .dijitToggleButton,
+.dijitToolbar .dijitButton,
+.dijitToolbar .dijitDropDownButton,
+.dijitToolbar .dijitComboButton {
+ margin: 0;
}
-
-.dj_safari .dijitToolbar .dijitDropDownButton {
+.dj_ie8 .dijitToolbar button,
+.dj_webkit .dijitToolbar button {
+
+ padding: 1px 2px;
+}
+.dj_ie .dijitToolbar .dijitComboBox{
+
+ vertical-align: middle;
+}
+.dj_ie .dijitComboButton {
+
+ margin-bottom: -3px;
+}
+.dj_webkit .dijitToolbar .dijitDropDownButton {
padding-left: 0.3em;
}
-
+.dj_gecko .dijitToolbar .dijitButtonNode::-moz-focus-inner {
+ padding:0;
+}
.dijitButtonNode {
- /* Node that is acting as a button -- may or may not be a BUTTON element */
+
border:1px solid gray;
- margin:0px;
- padding:.2em .2em .1em .2em;
- overflow:visible;
+ margin:0;
line-height:normal;
- font-family:inherit;
- font-size:inherit;
- color: inherit;
- cursor:pointer;
- vertical-align:middle;
+ vertical-align: middle;
+ #vertical-align: auto;
text-align:center;
white-space: nowrap;
}
-
-.dijitDownArrowButton,
-.dijitUpArrowButton {
- /* Node that is acting as a arrow button -- drop down (spinner has its own treatment). Also gets dijitButtonNode */
- /* place AFTER dijitButtonNode so it overrides */
- padding:0em .4em;
- margin:0px;
- font-size: 0.7em;
+.dijitButtonNode, .dijitButtonNode * {
+ cursor: pointer;
+}
+.dijitReadOnly *,
+.dijitDisabled *,
+.dijitReadOnly,
+.dijitDisabled,
+.dijitDisabledClickableRegion {
+ cursor: not-allowed !important;
}
-
-
-.dijitButtonContents {
- color:inherit;
+.dj_ie .dijitButtonNode {
+
+ zoom: 1;
+}
+.dj_ie .dijitButtonNode button {
+
+ overflow: visible;
+}
+.dijitArrowButton {
+
+
+ padding: 0 .4em;
+}
+DIV.dijitArrowButton {
+ float: right;
}
-
-.dijitDropDownButton .dijitA11yDownArrow {
- margin-left:.8em;
+.dijitSpinner .dijitInputLayoutContainer .dijitArrowButton {
+ border-style: solid;
+ border-width: 0 0 0 1px !important;
+ padding: 0;
+ position: absolute;
+ right: 0;
+ float: none;
+}
+.dijitSpinner .dijitInputLayoutContainer .dijitArrowButton {
+ position: absolute;
+ height: 50%;
}
-
-.dijitComboButton TABLE {
- /* each cell in a combo-table should have its own separate border */
+.dijitSpinner .dijitInputLayoutContainer .dijitDownArrowButton {
+ top: auto;
+ bottom: 0;
+ border-top-width: 1px !important;
+}
+.dijitSpinner .dijitInputLayoutContainer .dijitUpArrowButton {
+ top: 0;
+ bottom: auto;
+}
+TABLE.dijitComboButton {
+
+ border-collapse: collapse;
+ border:0;
+ padding:0;
+ margin:0;
+}
+.dijitToolbar .dijitComboButton {
+
border-collapse: separate;
- border:0px;
- padding:0px;
- margin:0px;
}
-
-.dijitComboButton .dijitButtonContents {
- border-right-width:0px !important;
+.dj_ie BUTTON.dijitButtonNode {
+ overflow: visible;
}
-
-
table .dijitButton .dijitButtonNode,
table .dijitComboButton .dijitButtonNode {
- #overflow:hidden; /* visible messes up if the button is inside a table on IE */
+ #overflow:hidden;
}
-
-
-
.dijitButtonNode IMG {
- /* make text and images line up cleanly */
+
vertical-align:middle;
- margin-bottom:.2em;
+
}
-
-/******
- TextBox related.
- Everything that has an <input>
-*******/
-
.dijitTextBox,
.dijitComboBox,
.dijitSpinner {
border: solid black 1px;
- width: 15em; /* need to set default size on outer node since inner nodes say <input style="width:100%"> and <td width=100%>. user can override */
+ #overflow: hidden;
+ width: 15em;
+ vertical-align: middle;
+ #vertical-align: auto;
}
-
-/* rules for safari to deal with fuzzy blue focus border */
+.dijitTimeTextBox {
+ width: 8em;
+}
.dijitTextBox input:focus,
.dijitComboBox input:focus,
.dijitSpinner input:focus {
- outline: none; /* blue fuzzy line looks wrong on combobox or something w/validation icon showing */
+ outline: none;
}
.dijitTextBoxFocused,
.dijitComboBoxFocused,
-.dijitSpinnerFocused {
- /* should we display focus like we do on other browsers, or use the safari standard focus indicator?? */
+.dijitSpinnerFocused, .dijitSpinnerUpArrowActive, .dijitSpinnerDownArrowActive,
+.dijitTextAreaFocused {
+
outline: auto 5px -webkit-focus-ring-color;
}
-
.dijitTextBox INPUT,
.dijitComboBox INPUT,
.dijitSpinner INPUT {
- padding:0px;
- border-left: solid black 1px; /* TODO: for RTL mode should be border-right */
+ border-left: solid black 1px;
display:inline;
position:static !important;
- border:0px !important;
- margin:0px !important;
- vertical-align:0em !important;
- visibility:visible !important;
+ border:0 !important;
+ margin:0 !important;
+ vertical-align:top !important;
background-color:transparent !important;
background-image:none !important;
width:100% !important;
}
-
-/* #4711: prevent IE from over-expanding 100% width input boxes */
-.dj_ie .dijitTextBox .dijitInputField,
-.dj_ie .dijitComboBox .dijitInputField,
-.dj_ie .dijitSpinner .dijitInputField {
- position:relative;
+.dijitValidationIcon {
+ visibility: hidden;
+ display: block;
+ padding: 0 2px;
+ float: right;
+ height: auto;
}
-.dj_ie .dijitTextBox .dijitInputField INPUT,
-.dj_ie .dijitComboBox .dijitInputField INPUT,
-.dj_ie .dijitSpinner .dijitInputField INPUT {
- position:absolute !important;
- top:auto !important;
- left:auto !important;
- right:auto !important;
- bottom:auto !important;
- font-size:100%;
+.dijitValidationIconText {
+ visibility: hidden;
+ display: none;
+ float:right;
+ font-family: sans-serif;
+ font-style:italic;
+ font-size: 0.75em;
+ padding-right: 0.15em;
+ line-height: 160%;
}
-
-.dj_ie INPUT.dijitTextBox {
- font-size:100%;
-}
-
-/* Display an "X" for invalid input. Themes will override these rules to display an icon instead.
-*/
-.dijitValidationIcon { display: none; background-position-y:center; }
-.dijitValidationIconText { visibility: hidden; }
.dijit_a11y .dijitValidationIcon { display: none !important; }
.dijit_a11y .dijitValidationIconText { display: block !important; }
-
-.dijitTextBoxError .dijitValidationIconText,
-.dijitComboBoxError .dijitValidationIconText,
-.dijitSpinnerError .dijitValidationIconText {
+.dijitError .dijitValidationIcon,
+.dijitError .dijitValidationIconText {
visibility: visible;
}
-
-.dijitSpinner .dijitDownArrowButton,
-.dijitSpinner .dijitUpArrowButton {
- padding: 0 .4em;
- border: 1px solid;
- line-height: .769em;
- /* TODO: as we use border-collapse, is this necessary? */
- border-left-style: none;
-}
-.dj_ie .dijitSpinner .dijitDownArrowButton,
-.dj_ie .dijitSpinner .dijitUpArrowButton {
- padding: 0 .2em!important;
- text-align: center;
-}
-.dijitSpinner .dijitDownArrowButton div,
-.dijitSpinner .dijitUpArrowButton div {
- text-align: center;
- font-size: .769em;
- line-height: 1em;
- vertical-align: baseline;
- margin: 0 auto;
-}
-
-.dijitTextBox .dijitDownArrowButton {
- /* this is for a combo box with no arrow displayed; we set baseClass=TextBox */
+.dijitTextBox .dijitArrowButton {
+
display:none;
}
-
-/****
- dijit.form.CheckBox
- &
- dijit.form.RadioButton
- ****/
-
.dijitCheckBox,
.dijitRadio,
.dijitCheckBoxInput {
padding: 0;
border: 0;
width: 16px;
height: 16px;
background-position:center center;
background-repeat:no-repeat;
+ overflow: hidden;
}
-
.dijitCheckBox INPUT,
.dijitRadio INPUT {
- margin: 0;
+ margin: 0;
padding: 0;
display: block;
}
-
.dijitCheckBoxInput {
- /* place the actual input on top, but all-but-invisible */
+
opacity: 0.01;
- overflow:hidden;
}
-
.dj_ie .dijitCheckBoxInput {
filter: alpha(opacity=0);
}
-
.dijit_a11y .dijitCheckBox,
.dijit_a11y .dijitRadio {
width: auto;
height: auto;
}
.dijit_a11y .dijitCheckBoxInput {
opacity: 1;
filter: none;
width: auto;
height: auto;
}
-
-
-/****
- dijit.ProgressBar
- ****/
-
.dijitProgressBarEmpty{
- /* outer container and background of the bar that's not finished yet*/
+
position:relative;overflow:hidden;
- border:1px solid black; /* a11y: border necessary for high-contrast mode */
- z-index:0; /* establish a stacking context for this progress bar */
+ border:1px solid black;
+ z-index:0;
}
-
.dijitProgressBarFull {
- /* outer container for background of bar that is finished */
+
position:absolute;
overflow:hidden;
z-index:-1;
top:0;
width:100%;
- height:100%;
}
-
-.dijitProgressBarTile{
- /* inner container for finished portion */
+.dj_ie6 .dijitProgressBarFull {
+ height:1.6em;
+}
+.dijitProgressBarTile {
+
position:absolute;
overflow:hidden;
- top:0px;
- left:0px;
- bottom:0px;
- right:0px;
- margin:0px;
- padding:0px;
+ top:0;
+ left:0;
+ bottom:0;
+ right:0;
+ margin:0;
+ padding:0;
width:auto;
height:auto;
background-color:#aaa;
background-attachment: fixed;
}
-
.dijit_a11y .dijitProgressBarTile{
- /* a11y: The border provides visibility in high-contrast mode */
+
border-width:4px;
border-style:solid;
background-color:transparent !important;
}
-
-.dj_iequirks .dijitProgressBarTile{
- width:100%;
- height:100%;
+.dj_ie6 .dijitProgressBarTile {
+
+ position:static;
+
+ height:1.6em;
}
-
-.dj_ie6 .dijitProgressBarTile{
- /* width:auto works in IE6 with position:static but not position:absolute */
- position:static;
- /* height:auto does not work in IE6 */
- height:100%;
-}
-
-.dijitProgressBarIndeterminate .dijitProgressBarLabel{
+.dijitProgressBarIndeterminate .dijitProgressBarLabel {
visibility:hidden;
}
-
-.dijitProgressBarIndeterminate .dijitProgressBarTile{
- /* animated gif for 'indeterminate' mode */
+.dijitProgressBarIndeterminate .dijitProgressBarTile {
+
}
-
-.dijitProgressBarIndeterminateHighContrastImage{
+.dijitProgressBarIndeterminateHighContrastImage {
display:none;
}
-
-.dijit_a11y .dijitProgressBarIndeterminate .dijitProgressBarIndeterminateHighContrastImage{
+.dijit_a11y .dijitProgressBarIndeterminate .dijitProgressBarIndeterminateHighContrastImage {
display:block;
position:absolute;
top:0;
bottom:0;
margin:0;
padding:0;
width:100%;
height:auto;
}
-
-.dijitProgressBarLabel{
+.dijitProgressBarLabel {
display:block;
position:static;
width:100%;
text-align:center;
- background-color:transparent;
-}
-
-/* progress bar in vertical mode - TODO: remove? no longer supported? */
-.dijitProgressBarVertical .dijitProgressBarFull{
- bottom:0px; /* start at the bottom */
+ background-color:transparent !important;
}
-
-.dj_ie6 .dijitProgressBarVertical .dijitProgressBarTile{
- position:absolute;
- /* can't use position:static here -- need absolute positioning to place
- the bar at the bottom of a vertical progressbar */
- width:100%;
-}
-
-
-/****
- dijit.Tooltip
- ****/
-
.dijitTooltip {
position: absolute;
z-index: 2000;
display: block;
- /* make visible but off screen */
+
left: 50%;
top: -10000px;
overflow: visible;
}
-/*
-See http://trac.dojotoolkit.org/ticket/5006
-.dijitTooltipDialog {
- position: relative;
-}
-*/
.dijitTooltipContainer {
border: solid black 2px;
background: #b8b5b5;
color: black;
font-size: small;
}
-
.dijitTooltipFocusNode {
padding: 2px 2px 2px 2px;
}
-
.dijitTooltipConnector {
position: absolute;
}
-
-/* MOW: using actual images at this time
-/* draw an arrow with CSS only * /
-.dijitTooltipConnector {
- /* the border on the triangle * /
- font-size: 0px; line-height: 0%; width: 0px;
- border-top: none;
- border-bottom: 14px solid black;
- border-left: 7px solid transparent;
- border-right: 7px solid transparent;
- top: -14px;
- left: 3px;
- z-index: 2;
+.dijitTooltipData {
+ display:none;
}
-
-.dijitTooltipConnector div {
- /* the background of the triangle * /
- font-size: 0px; line-height: 0%; width: 0px;
- position: absolute;
- border-bottom: 10px solid #b8b5b5;
- border-left: 5px solid transparent;
- border-right: 5px solid transparent;
- top: 6px;
- left: -5px;
- z-index: 3;
-}
-
-*/
-
-
-
-/* Layout widgets. This is essential CSS to make layout work (it isn't "styling" CSS)
- make sure that the position:absolute in dijitAlign* overrides other classes */
-
-.dijitLayoutContainer{
+.dijitLayoutContainer{
position: relative;
display: block;
- overflow: hidden;
+ overflow: hidden;
}
-
body .dijitAlignTop,
body .dijitAlignBottom,
body .dijitAlignLeft,
body .dijitAlignRight {
position: absolute;
- overflow: hidden;
+ overflow: hidden;
}
-
body .dijitAlignClient { position: absolute; }
-
-/* SplitContainer
-
- 'V' == container that splits vertically (up/down)
- 'H' = horizontal (left/right)
-*/
+.dijitBorderContainer, .dijitBorderContainerNoGutter {
+ position:relative;
+ overflow: hidden;
+}
+.dijitBorderContainerPane,
+.dijitBorderContainerNoGutterPane {
+ position: absolute !important;
+ z-index: 2;
+}
+.dijitBorderContainer > .dijitTextArea {
+
+ resize: none;
+}
+.dijitGutter {
+
+ position: absolute;
+ font-size: 1px;
+}
+.dijitSplitter {
+ position: absolute;
+ overflow: hidden;
+ z-index: 10;
+ background-color: #fff;
+ border-color: gray;
+ border-style: solid;
+ border-width: 0;
+}
+.dj_ie .dijitSplitter {
+ z-index: 1;
+}
+.dijitSplitterActive {
+ z-index: 11 !important;
+}
+.dijitSplitterCover{
+ position:absolute;
+ z-index:-1;
+ top:0;
+ left:0;
+ width:100%;
+ height:100%;
+}
+.dijitSplitterCoverActive{
+ z-index:3 !important;
+}
+.dj_ie .dijitSplitterCover{
+ background: white;
+ filter: alpha(opacity=0);
+}
+.dijitSplitterH {
+ height: 7px;
+ border-top:1px;
+ border-bottom:1px;
+ cursor: ns-resize;
+}
+.dijitSplitterV {
+ width: 7px;
+ border-left:1px;
+ border-right:1px;
+ cursor: ew-resize;
+}
.dijitSplitContainer{
position: relative;
overflow: hidden;
display: block;
}
-
.dijitSplitPane{
position: absolute;
}
-
.dijitSplitContainerSizerH,
.dijitSplitContainerSizerV {
position:absolute;
font-size: 1px;
cursor: move;
cursor: w-resize;
background-color: ThreeDFace;
border: 1px solid;
border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;
margin: 0;
}
-
-.dijitSplitContainerSizerV {
- cursor: n-resize;
-}
-
-.dijitSplitContainerSizerH .thumb {
+.dijitSplitContainerSizerH .thumb, .dijitSplitterV .dijitSplitterThumb {
+ overflow:hidden;
position:absolute;
top:49%;
}
-
-.dijitSplitContainerSizerV .thumb {
+.dijitSplitContainerSizerV .thumb, .dijitSplitterH .dijitSplitterThumb {
position:absolute;
left:49%;
}
-
+.dijitSplitterShadow,
.dijitSplitContainerVirtualSizerH,
.dijitSplitContainerVirtualSizerV {
font-size: 1px;
- cursor: move;
- cursor: w-resize;
background-color: ThreeDShadow;
-moz-opacity: 0.5;
opacity: 0.5;
filter: Alpha(Opacity=50);
margin: 0;
}
-
-.dijitSplitContainerVirtualSizerV {
+.dj_ie .dijitSplitterV, .dijitSplitContainerVirtualSizerH {
+ cursor: w-resize;
+}
+.dj_ie .dijitSplitterH, .dijitSplitContainerSizerV, .dijitSplitContainerVirtualSizerV {
cursor: n-resize;
}
-
-
-/* ContentPane */
-
+.dijit_a11y .dijitSplitterH {
+ border-top:1px solid #d3d3d3 !important;
+ border-bottom:1px solid #d3d3d3 !important;
+}
+.dijit_a11y .dijitSplitterV {
+ border-left:1px solid #d3d3d3 !important;
+ border-right:1px solid #d3d3d3 !important;
+}
.dijitContentPane {
display: block;
- overflow: auto; /* if we don't have this (or overflow:hidden), then Widget.resizeTo() doesn't make sense for ContentPane */
+ overflow: auto;
}
-/* TitlePane */
+.dijitContentPaneSingleChild {
+
+ overflow: hidden;
+}
.dijitTitlePane {
display: block;
overflow: hidden;
}
-
-/* Color Palette */
-
.dijitColorPalette {
border:1px solid #999;
background:#fff;
- -moz-border-radius:3pt;
+ -moz-border-radius:3pt;
}
-
img.dijitColorPaletteUnder {
border-style:none;
position:absolute;
left:0;
top:0;
}
.dijitColorPaletteInner {
- position: relative;
+ position: relative;
overflow:hidden;
outline:0;
}
+.dijitPaletteCell {
+ width: 20px;
+ height: 20px;
+ position: absolute;
+ overflow: hidden;
+ z-index: 10;
+ outline-width: 0;
+}
.dijitPaletteImg {
- width: 16px; /*This is the width of one color in the provided palettes. */
- height: 14px; /* Height of one color in the provided palettes. */
+ width: 16px;
+ height: 14px;
position: absolute;
+ top: 1px;
+ left: 1px;
overflow: hidden;
cursor: default;
- z-index: 10;
- border:1px solid #999;
- /* -moz-border-radius:2pt; */
+ border:1px solid #999;
+
}
-
-.dijitPaletteImgHighlight {
- width: 14px; /*This is the width of one color in the provided palettes. */
- height: 12px; /* Height of one color in the provided palettes. */
+.dijitPaletteCellHighlight img {
+ width: 14px;
+ height: 12px;
position: absolute;
+ top: 1px;
+ left: 1px;
overflow: hidden;
cursor: default;
- z-index: 10;
-}
-
-/* .dijitPaletteImg:hover, */
-.dijitPaletteImg:focus,
-.dijitPaletteImgHighlight {
- width: 14px; /*This is the width of one color in the provided palettes. */
- height: 12px; /* Height of one color in the provided palettes. */
- border:2px solid #000;
- outline:2px solid #dedede;
- /* -moz-border-radius:0; */
+ border:2px solid #000;
+ outline:1px solid #dedede;
+
}
-
-
-.dijitColorPaletteCell {
- width:16px;
- height:14px;
- border: 1px solid;
-}
-
-.dijitColorPaletteCell:hover {
- border-style: solid;
- outline:0;
+.dijit_a11y .dijitPaletteCell {
+ background-color:transparent !important;
}
-
-/* Accordion */
-
-.dijitAccordionPane {
- overflow: hidden !important; /* prevent spurious scrollbars */
+.dijit_a11y .dijitPaletteImg {
+ background-color:transparent !important;
}
-
-.dijitAccordionPane .dijitAccordionBody {
- overflow: auto;
-}
-
-
.dijitAccordionContainer {
border:1px solid #b7b7b7;
- border-top:0 !important;
+ border-top:0 !important;
+}
+.dj_webkit .dijitAccordionContainer div:focus {
+ outline:none;
}
-
-.dijitAccordionPane .dijitAccordionTitle:hover {
+.dj_ff3 .dijitAccordionContainer div:focus {
+ outline:none;
+}
+.dijitAccordionTitle {
cursor: pointer;
}
-
-.dijitAccordionPane .dijitAccordionTitle .dijitAccordionArrow {
- float: right;
+.dijitAccordionFocused {
+ text-decoration: underline;
}
-
-/* images off, high-contrast mode styles */
-.dijitAccordionPane .dijitAccordionTitle .arrowTextUp,
-.dijitAccordionPane .dijitAccordionTitle .arrowTextDown {
- display: none;
- float: right;
- font-size: 0.65em;
+.dijitAccordionTitle .arrowTextUp,
+.dijitAccordionTitle .arrowTextDown {
+ display: none;
+ font-size: 0.65em;
font-weight: normal !important;
}
-
-.dijit_a11y .dijitAccordionPane .dijitAccordionTitle .arrowTextUp {
- display: inline;
-}
-
-.dijit_a11y .dijitAccordionPane-selected .dijitAccordionTitle .arrowTextDown {
- display: inline;
+.dijit_a11y .dijitAccordionTitle .arrowTextUp,
+.dijit_a11y .dijitAccordionTitle-selected .arrowTextDown {
+ display: inline;
}
-
-.dijit_a11y .dijitAccordionPane-selected .dijitAccordionTitle .arrowTextUp {
- display: none;
+.dijit_a11y .dijitAccordionTitle-selected .arrowTextUp {
+ display: none;
}
-
-/* Calendar */
-
-.dijitCalendarContainer thead tr th, .dijitCalendarContainer thead tr td, .dijitCalendarContainer tbody tr td, .dijitCalendarContainer tfoot tr td {
+.dijitCalendarContainer thead tr th, .dijitCalendarContainer thead tr td, .dijitCalendarContainer tbody tr td, .dijitCalendarContainer tfoot tr td {
padding: 0;
}
-
.dijitCalendarNextYear {
margin:0 0 0 0.55em;
}
-
.dijitCalendarPreviousYear {
margin:0 0.55em 0 0;
}
-
.dijitCalendarIncrementControl {
- cursor:pointer;
- cursor:hand;
- width:1em;
+ vertical-align: middle;
}
-
.dijitCalendarDisabledDate {
color:gray !important;
}
-
-.dijitCalendarBodyContainer tbody tr td {
- cursor:pointer;
- cursor:hand;
-}
-
-.dijitCalendarPreviousMonthDisabled {
- cursor:default !important
-}
-
-.dijitCalendarCurrentMonthDisabled {
+.dijitCalendarPreviousMonthDisabled,
+.dijitCalendarCurrentMonthDisabled,
+.dijitCalendarNextMonthDisabled {
cursor:default !important
}
-
-.dijitCalendarNextMonthDisabled {
- cursor:default !important;
-}
-
-.dijitCalendarDateTemplate {
+.dijitCalendarIncrementControl,
+.dijitCalendarBodyContainer tbody tr td,
+.dijitCalendarDateTemplate,
+.dijitCalendarContainer .dijitInline {
cursor:pointer;
}
-
-.dijitCalendarSelectedYear {
- cursor:pointer;
-}
-.dijitCalendarNextYear,
-.dijitCalendarPreviousYear {
- cursor:pointer;
-}
-
-.dijitCalendarMonthLabelSpacer {
- /* don't display it, but make it affect the width */
+.dijitSpacer {
+
position: relative;
height: 1px;
overflow: hidden;
visibility: hidden;
}
-
-
-/* Menu */
-
.dijitMenu {
border:1px solid black;
background-color:white;
}
.dijitMenuTable {
- margin:1px 0px;
+ margin:1px 0;
border-collapse:collapse;
- border-width:0px;
+ border-width:0;
background-color:white;
}
-
+.dj_webkit .dijitMenuTable td[colspan="2"]{
+ border-right:hidden;
+}
.dijitMenuItem{
+ text-align: left;
white-space: nowrap;
padding:.1em .2em;
+ cursor:pointer;
}
-
-.dijitMenuItemHover {
- cursor:pointer;
- cursor:hand;
+.dijitMenuPassive .dijitMenuItemHover,
+.dijitMenuItemSelected {
+
background-color:black;
color:white;
}
-
-.dijitMenuItemIcon {
- position: relative;
- background-position: center center;
+.dijitMenuItemIcon, .dijitMenuExpand {
background-repeat: no-repeat;
}
-
.dijitMenuItemDisabled * {
- /* for a disabled menu item, just set it to mostly transparent */
+
opacity:0.3;
cursor:default;
}
.dj_ie .dijit_a11y .dijitMenuItemDisabled td,
.dj_ie .dijitMenuItemDisabled *,
.dj_ie .dijitMenuItemDisabled td {
color:gray !important;
filter: alpha(opacity=35);
}
-
.dijitMenuItemLabel {
position: relative;
vertical-align: middle;
}
-
-.dijit_a11y .dijitMenuItemHover .dijitMenuItemLabel {
+.dijit_a11y .dijitMenuItemSelected {
+ border: 1px #fff dotted !important;
+}
+.dj_ff3 .dijit_a11y .dijitMenuItem td {
+ padding: none !important;
+ background:none ! important;
+}
+.dijit_a11y .dijitMenuItemSelected .dijitMenuItemLabel {
border-width: 1px;
border-style: solid;
}
-.dijit_a11y .dijitMenuItemHover {
- border: 1px #fff dotted !important;
+.dj_ie8 .dijit_a11y .dijitMenuItemLabel {
+ position:static;
+}
+.dijitMenuExpandA11y {
+ display: none;
}
-
-.dijit_a11y .dijitMenuExpandInner {
- display:block !important;
-}
-
-/* separator can be two pixels -- set border of either one to 0px to have only one */
+.dijit_a11y .dijitMenuExpandA11y {
+ display: inline;
+}
+.dijitMenuSeparator td {
+ border: 0;
+ padding: 0;
+}
.dijitMenuSeparatorTop {
height: 50%;
- margin: 0px;
+ margin: 0;
margin-top:3px;
font-size: 1px;
}
-
.dijitMenuSeparatorBottom {
height: 50%;
- margin: 0px;
+ margin: 0;
margin-bottom:3px;
font-size: 1px;
}
-
-
-
-/* Tab */
-
-
-.dijitTabContainer .dijitAlignTop {
-/* position the tab labels row down by 1 px, and on top of the dijitTabPaneWrapper
- so the buttons can overlay the tab pane properly */
- top:1px !important;
- z-index:10;
+.dijitCheckedMenuItemIconChar {
+ vertical-align: middle;
+ visibility:hidden;
+}
+.dijitCheckedMenuItemChecked .dijitCheckedMenuItemIconChar {
+ visibility: visible;
+}
+.dijit_a11y .dijitCheckedMenuItemIconChar {
+ display:inline !important;
+}
+.dijit_a11y .dijitCheckedMenuItemIcon {
+ display: none;
}
-
-.dijitTabContainer .dijitAlignBottom {
-/* position the tab labels row up by 1 px so they overlap */
- margin-top:-1px !important;
- z-index:10;
+.dijitStackController .dijitToggleButtonChecked * {
+ cursor: default;
+}
+.dijitTabContainerNoLayout {
+ width: 100%;
}
-
-.dijitTabContainer .dijitAlignLeft {
-/* position the tab labels left by 1 px so they overlap */
- margin-right:-1px !important;
- z-index:10;
+.dijitTabContainerBottom-tabs,
+.dijitTabContainerTop-tabs,
+.dijitTabContainerLeft-tabs,
+.dijitTabContainerRight-tabs {
+ overflow: visible !important;
}
-
-.dijitTabContainer .dijitAlignRight {
-/* position the tab labels row up by 1 px, and on top of the dijitTabPaneWrapper
- so the buttons can overlay the tab pane properly */
- margin-left:-1px !important;
- z-index:10;
-}
-
-.dijitTabPaneWrapper {
+.dijitTabContainerBottom-container,
+.dijitTabContainerTop-container,
+.dijitTabContainerLeft-container,
+.dijitTabContainerRight-container {
z-index:0;
overflow: hidden;
+ border: 1px solid black;
}
-
+.dijitTabContainer .nowrapTabStrip {
+ width: 50000px;
+ display: block;
+ position: relative;
+}
+.dijitTabContainer .dijitTabListWrapper {
+ overflow: hidden;
+}
+.dijit_a11y .dijitTabContainer .tabStripButton img {
+
+ display: none;
+}
+.dijitTabContainerTop-tabs {
+ border-bottom: 1px solid black;
+}
+.dijitTabContainerTop-container {
+ border-top: 0px;
+}
+.dijitTabContainerLeft-tabs {
+ border-right: 1px solid black;
+ float: left;
+}
+.dijitTabContainerLeft-container {
+ border-left: 0px;
+}
+.dijitTabContainerBottom-tabs {
+ border-top: 1px solid black;
+}
+.dijitTabContainerBottom-container {
+ border-bottom: 0px;
+}
+.dijitTabContainerRight-tabs {
+ border-left: 1px solid black;
+ float: left;
+}
+.dijitTabContainerRight-container {
+ border-right: 0px;
+}
+div.dijitTabBtnDisabled, .dj_ie div.dijitTabBtnDisabled {
+ cursor: auto;
+}
.dijitTab {
position:relative;
- float:left;
cursor:pointer;
white-space:nowrap;
z-index:3;
}
-
-.dijitTabContainer .dijitAlignLeft .dijitTab,
-.dijitTabContainer .dijitAlignRight .dijitTab {
- float:none;
+.dijitTab * {
+
+ vertical-align: middle;
+}
+.dijitTabChecked {
+ cursor: default;
+}
+.dijitTabButtonIcon {
+ height: 18px;
+}
+.dijitTabContainerTop-tabs .dijitTab {
+ top: 1px;
}
-
+.dijitTabContainerBottom-tabs .dijitTab {
+ top: -1px;
+}
+.dijitTabContainerLeft-tabs .dijitTab {
+ left: 1px;
+}
+.dijitTabContainerRight-tabs .dijitTab {
+ left: -1px;
+}
+.dijitTabContainerTop-tabs .dijitTab,
+.dijitTabContainerBottom-tabs .dijitTab {
+
+ display:inline-block;
+ #zoom: 1;
+ #display:inline;
+}
.dijitTabInnerDiv {
position:relative;
}
-
-.dijitTab .close {
- display: inline-block;
- cursor: default;
- font-size: small;
+.tabStripButton {
+ z-index: 12;
}
-
-/* images off, high-contrast mode styles */
+.dijitTabButtonDisabled .tabStripButton {
+ display: none;
+}
+.dijitTab .closeButton {
+ margin-left: 1em;
+}
.dijitTab .closeText {
display:none;
- padding: 0px 2px;
- margin: 0px 2px;
+}
+.dijit_a11y .closeText {
+ display:inline;
+ margin: 0px 6px;
}
.dijit_a11y .dijitTab .closeImage {
- padding: 0px !important;
- margin: 0px !important;
- top: 0px !important;
- bottom: 0px !important;
+ display:none;
}
-.dijit_a11y .closeText {
- display:inline;
- margin-left:6px;
-}
-.dijit_a11y .closeText:hover {
+.dijit_a11y .closeButton-hover .closeText {
border:thin solid;
-}
+}
.dijit_a11y .dijitTabChecked {
border-style:dashed !important;
}
-
.dijit_a11y .dijitTabInnerDiv {
border-left:none !important;
}
-
-
+.dijitTabPane,
+.dijitStackContainer-child,
+.dijitAccordionContainer-child {
+
+ border: none !important;
+}
.dijitInlineEditor {
- /* span around an inline-editable value when in edit mode */
+
position:relative;
vertical-align:bottom;
}
.dj_ie .dijitInlineEditor {
vertical-align:middle;
}
-
.dijitInlineValue {
- /* span around an inline-editable value when NOT in edit mode */
+
}
-
.dijitInlineEditor .dijitButtonContainer {
- /* div around the buttons -- makes them float below the field */
+
position:absolute;
- right:0px;
+ right:0;
overflow:visible;
}
-
.dijitInlineEditor .saveButton,
.dijitInlineEditor .cancelButton {
}
-
-/* Tree */
-
-.dijitTreeExpando {
- float: left;
- display: inline;
- clear:both;
+.dijitTreeIndent {
+
+ width: 19px;
}
-
-.dijitTreeExpand {
- float: left;
- display: inline;
+.dijitTreeRow, .dijitTreeContent {
+ white-space: nowrap;
}
-
+.dijitTreeRow img {
+
+ vertical-align: middle;
+}
.dijitTreeContent {
cursor: default;
- /* can't make inline - multiline bugs */
+}
+.dijitExpandoText {
+ display: none;
}
-
-.dijitExpandoText {
- display: none;
-}
-
-.dijit_a11y .dijitExpandoText {
- float: left;
- display: inline;
+.dijit_a11y .dijitExpandoText {
+ display: inline;
padding-left: 10px;
- padding-right: 10px;
+ padding-right: 10px;
font-family: monospace;
border-style: solid;
border-width: thin;
-}
-
-/* Dialog */
-
+ cursor: pointer;
+}
+.dijitTreeLabel {
+ margin: 0px 4px;
+}
.dijitDialog {
position: absolute;
z-index: 999;
padding: 1px;
+ overflow: hidden;
}
-
+.dijitDialogFixed div.dijitDialogTitleBar {
+ cursor:default;
+}
.dijitDialogUnderlayWrapper {
position: absolute;
- left: 0px;
- top: 0px;
+ left: 0;
+ top: 0;
z-index: 998;
display: none;
- background: transparent;
+ background: transparent !important;
}
-
.dijitDialogUnderlay {
- background: #eeeeee;
+ background: #eee;
opacity: 0.5;
}
-
.dj_ie .dijitDialogUnderlay {
filter: alpha(opacity=50);
}
-
-/* images off, high-contrast mode styles */
+.dijit_a11y .dijitInputLayoutContainer,
.dijit_a11y .dijitDialog {
opacity: 1 !important;
background-color: white !important;
}
-
.dijitDialog .closeText {
display:none;
+
position:absolute;
}
-
-.dijit_a11y .dijitDialog .closeText {
+.dijit_a11y .dijitDialog .closeText {
display:inline;
}
-
.dijitSliderMoveable {
z-index:99;
position:absolute !important;
display:block;
vertical-align:middle;
}
-
-.dijitHorizontalSliderMoveable {
- right:0px;
+.dijitSliderMoveableH {
+ right:0;
}
-
.dijit_a11y div.dijitSliderImageHandle,
.dijitSliderImageHandle {
- margin:0px;
- padding:0px;
+ margin:0;
+ padding:0;
position:absolute !important;
border:8px solid gray;
- width:0px;
- height:0px;
+ width:0;
+ height:0;
}
.dijit_a11y .dijitSliderFocused .dijitSliderImageHandle {
border:4px solid #000;
height:8px;
width:8px;
}
-
-.dijitVerticalSliderImageHandle {
+.dijitSliderImageHandleV {
top:-8px;
left:-6px;
}
-
-.dijitHorizontalSliderImageHandle {
+.dijitSliderImageHandleH {
left:-8px;
top:-5px;
vertical-align:top;
}
-
.dijitSliderBar {
border-style:solid;
border-color:black;
}
-
-.dijitHorizontalSliderBar {
- height:4px;
- border-width:1px 0px;
+.dijitSliderBarContainerV {
+ position:relative;
+ height:100%;
+ z-index:1;
+}
+.dijitSliderBarContainerH {
+ position:relative;
+ z-index:1;
}
-
-.dijitVerticalSliderBar {
+.dijitSliderBarH {
+ height:4px;
+ border-width:1px 0;
+}
+.dijitSliderBarV {
width:4px;
- border-width:0px 1px;
+ border-width:0 1px;
}
-
.dijitSliderProgressBar {
background-color:red;
- #z-index:0;
+ z-index:1;
}
-
-.dijitVerticalSliderProgressBar {
+.dijitSliderProgressBarV {
position:static !important;
height:0%;
vertical-align:top;
text-align:left;
}
-
-.dijitHorizontalSliderProgressBar {
+.dijitSliderProgressBarH {
position:absolute !important;
width:0%;
vertical-align:middle;
overflow:visible;
}
-
.dijitSliderRemainingBar {
overflow:hidden;
background-color:transparent;
- #z-index:-1;
+ z-index:1;
}
-
-.dijitVerticalSliderRemainingBar {
+.dijitSliderRemainingBarV {
height:100%;
text-align:left;
}
-
-.dijitHorizontalSliderRemainingBar {
+.dijitSliderRemainingBarH {
width:100% !important;
}
-
-/* the slider bumper is the space consumed by the slider handle when it hangs over an edge */
.dijitSliderBumper {
overflow:hidden;
- #z-index:-1
+ z-index:1;
}
-
-.dijitVerticalSliderBumper {
+.dijitSliderBumperV {
width:4px;
height:8px;
- border-width:0px 1px;
+ border-width:0 1px;
}
-
-.dijitHorizontalSliderBumper {
+.dijitSliderBumperH {
width:8px;
height:4px;
- border-width:1px 0px;
+ border-width:1px 0;
}
-
-.dijitVerticalSliderBottomBumper,
-.dijitHorizontalSliderLeftBumper {
+.dijitSliderBottomBumper,
+.dijitSliderLeftBumper {
background-color:red;
}
-
-.dijitVerticalSliderTopBumper,
-.dijitHorizontalSliderRightBumper {
+.dijitSliderTopBumper,
+.dijitSliderRightBumper {
background-color:transparent;
}
-
-.dijitHorizontalSliderDecoration {
+.dijitSliderDecorationH {
text-align:center;
}
-
.dijitSlider .dijitSliderButton {
font-family:monospace;
- margin:0px;
- padding:0px;
+ margin:0;
+ padding:0;
display:block;
}
-
.dijit_a11y .dijitSliderButtonInner {
- visibility:visible !important;
+ visibility:visible !important;
}
-
-.dijitSlider .dijitVerticalSliderTopButton {
- vertical-align:bottom;
-}
-
-.dijitSlider .dijitVerticalSliderBottomButton {
- vertical-align:top;
-}
-
.dijitSliderButtonContainer {
text-align:center;
- height:0px;
+ height:0;
}
-
.dijitSlider .dijitButtonNode {
- padding:0px;
+ padding:0;
display:block;
}
-
-.dj_ie .RuleContainer {
- z-index: -1; /* #4809 */
-}
-
-.RuleContainer {
+.dijitRuleContainer {
position:relative;
overflow:visible;
}
-
-.VerticalRuleContainer {
+.dijitRuleContainerV {
height:100%;
- line-height:0px;
+ line-height:0;
float:left;
text-align:left;
}
-
-.dj_opera .VerticalRuleContainer {
+.dj_opera .dijitRuleContainerV {
line-height:2%;
}
-
-.dj_ie .VerticalRuleContainer {
+.dj_ie .dijitRuleContainerV {
line-height:normal;
}
-
-.dj_gecko .VerticalRuleContainer {
- margin:0px 0px 1px 0px; /* mozilla bug workaround for float:left,height:100% block elements */
+.dj_gecko .dijitRuleContainerV {
+ margin:0 0 1px 0;
}
-
-.RuleMark {
+.dijitRuleMark {
position:absolute;
border:1px solid black;
- line-height:0px;
+ line-height:0;
height:100%;
}
-
-.HorizontalRuleMark {
- width:0px;
- border-top-width:0px !important;
- border-bottom-width:0px !important;
- border-left-width:0px !important;
+.dijitRuleMarkH {
+ width:0;
+ border-top-width:0 !important;
+ border-bottom-width:0 !important;
+ border-left-width:0 !important;
}
-
-.RuleLabelContainer {
+.dijitRuleLabelContainer {
position:absolute;
}
-
-.HorizontalRuleLabelContainer {
+.dijitRuleLabelContainerH {
text-align:center;
display:inline-block;
}
-
-.HorizontalRuleLabel {
+.dijitRuleLabelH {
position:relative;
left:-50%;
}
-
-.VerticalRuleMark {
- height:0px;
- border-right-width:0px !important;
- border-bottom-width:0px !important;
- border-left-width:0px !important;
+.dijitRuleMarkV {
+ height:0;
+ border-right-width:0 !important;
+ border-bottom-width:0 !important;
+ border-left-width:0 !important;
width:100%;
- left:0px;
+ left:0;
}
-
-.dj_ie .VerticalRuleLabelContainer {
+.dj_ie .dijitRuleLabelContainerV {
margin-top:-.55em;
}
-
-/* Toolbar A11y */
-.dijit_a11y .dijitButtonContents .dijitButtonText {
+.dijit_a11y .dijitButtonContents .dijitButtonText,
+.dijit_a11y .dijitTab .tabLabel {
display: inline !important;
}
-
+.dj_ie7 .dijitButtonNode > BUTTON.dijitButtonContents > * {
+ position: relative;
+}
.dijitTextArea {
width:100%;
+ overflow-y: auto;
}
-
-.dj_ie .dijitTextArea p {
- margin-top:0px;
- margin-bottom:0px;
+.dijitTextArea[cols] {
+ width:auto;
+}
+.dj_ie .dijitTextAreaCols {
+ width:auto;
+}
+.dijitTextArea > DIV {
+ text-decoration:none;
+ overflow:auto;
+ min-height: 1.40em;
}
-
-/* Editor */
-.IEFixedToolbar {
+.dj_ie .dijitTextArea p {
+ margin-top:0;
+ margin-bottom:0;
+ line-height: normal !important;
+}
+.dijitToolbarSeparator {
+ height: 18px;
+ width: 5px;
+ padding: 0 1px;
+ margin: 0;
+}
+.dijitIEFixedToolbar {
position:absolute;
- /* top:0; */
+
top: expression(eval((document.documentElement||document.body).scrollTop));
}
-
-/* TimePicker */
-
+.RichTextEditable {
+ display: block;
+}
.dijitTimePickerItemInner {
text-align:center;
border:0;
padding:2px 8px 2px 8px;
}
+.dijitTimePickerTick,
+.dijitTimePickerMarker {
+ border-bottom:1px solid gray;
+}
+.dijitTimePicker .dijitDownArrowButton {
+ border-top: none !important;
+}
.dijitTimePickerTick {
- /* opacity:0.1 !important; */
- color:#dedede;
- border-bottom:1px solid #dedede;
- border-top:1px solid #dedede;
- position:relative;
-}
-.dijitTimePickerTick .dijitTimePickerItemInner {
- font-size:0.25em;
+ color:#CCC;
}
.dijitTimePickerMarker {
- background-color:#ededed;
- border-top:1px solid #999;
- border-bottom:1px solid #999;
+ color:black;
+ background-color:#CCC;
}
-
-.dijitTimePickerItemHover {
- opacity:1 !important;
- background-color:#808080;
- color:#fff;
- border-top:1px solid #333;
- border-bottom:1px solid #333;
- cursor:pointer;
-}
-.dijitTimePickerMarker.dijitTimePickerItemHover {
- font-size:1.3em;
-}
-
-.dijitTimePickerItemHover .dijitTimePickerItemInner {
- display:block;
- overflow:visible;
- background-color:#808080;
- font-size:1em;
-}
-
.dijitTimePickerItemSelected {
font-weight:bold;
color:#333;
- background-color:#b7cdee !important;
-}
-
-.dijit_a11y .dijitTimePickerItem {
- border-bottom:1px solid #333;
+ background-color:#b7cdee;
}
-
-
-/* Disable the high contrast character */
+.dijitTimePickerItemHover {
+ background-color:gray;
+ color:white;
+ cursor:pointer;
+}
+.dijit_a11y .dijitTimePickerItem {
+ border-bottom:1px solid #333;
+}
.dijitToggleButtonIconChar {
- display:none !important;
+ display:none !important;
}
.dijit_a11y .dijitToggleButtonIconChar {
display:inline !important;
}
-
.dijit_a11y .dijitToggleButtonIconChar {
- visibility:hidden;
+ visibility:hidden;
}
.dijit_a11y .dijitToggleButtonChecked .dijitToggleButtonIconChar {
visibility:visible !important;
}
+.dijitArrowButtonChar {
+ display:none !important;
+}
+.dijit_a11y .dijitArrowButtonChar {
+ display:inline !important;
+}
+.dijitInputLayoutContainer {
+ position: relative;
+ overflow: hidden;
+}
+.dijitSpinnerButtonContainer {
+ float: right;
+ width: 18px;
+ position: relative;
+ overflow: hidden;
+}
+.dijitSpinner .dijitInputLayoutContainer .dijitArrowButton {
+ height: 50%;
+ width: 16px;
+ overflow: hidden;
+}
+.dijitSpinner .dijitInputLayoutContainer .dijitArrowButtonInner {
+ overflow: hidden;
+ line-height: 50%;
+}
+.dijit_a11y .dijitSpinner .dijitInputLayoutContainer .dijitArrowButton {
+ width: 100%;
+}
+.dijit_a11y .dijitSpinner .dijitArrowButton .dijitArrowButtonChar {
+ font-size: 0.4em;
+ vertical-align: top;
+}
+.dijit_a11y .dijitSpinnerButtonContainer {
+ width: 0.5em;
+ margin-left: 2px;
+ overflow: visible;
+}
+.dijit_a11y .dijitSpinnerButtonContainer .dijitButtonNode {
+ border-width: 1px 0px 0px 1px;
+ border-style: solid !important;
+}
+.dijitSelect {
+ margin: 0.2em;
+}
+.dj_ie .dijitSelect,
+.dj_ie7 .dijitSelect,
+.dj_iequirks .dijitSelect {
+ vertical-align: middle;
+}
+.dj_ie8 .dijitSelect .dijitButtonText {
+ vertical-align: top;
+}
+.dijitSelect .dijitButtonNode {
+ text-align: left;
+}
+.dijitRtl .dijitSelect .dijitButtonNode {
+ text-align: right;
+}
+.dijitToolbar .dijitSelect {
+ margin: 0;
+}
+.dj_webkit .dijitToolbar .dijitSelect {
+ padding-left: 0.3em;
+}
+.dijit_a11y .dijitSelectDisabled .dijitButtonNode {
+ border-style: outset!important;
+ border-width: medium!important;
+ border-color: #999 !important;
+ color:#999 !important;
+}
+.dijitSelect .dijitButtonContents {
+ padding: 0px;
+ background: transparent none;
+}
+.dijitSelectFixedWidth .dijitButtonContents {
+ width: 100%;
+}
+.dijitSelect .dijitArrowButton {
+ width: 16px;
+}
+.dj_ie6 .dijitSelectMenu .dijitMenuItemLabel,
+.dj_ie7 .dijitSelectMenu .dijitMenuItemLabel {
+
+ position: static;
+}
+.dijitSelectLabel *
+{
+ vertical-align: baseline;
+}
+.dijitSelectSelectedOption * {
+ font-weight: bold;
+}
+.dijitSelectMenu {
+ border-width: 1px;
+}
+.dijitSelect .dijitButtonContents {
+ white-space: nowrap;
+}
+.dijitSelectMenu .dijitMenuTable {
+ margin: 0px;
+ background-color: transparent;
+}
+.dijitTextBoxReadOnly,
+.dijitComboBoxReadOnly,
+.dijitSpinnerReadOnly,
+.dijitTextAreaReadOnly,
+.dijitTextBoxDisabled,
+.dijitComboBoxDisabled,
+.dijitSpinnerDisabled,
+.dijitTextAreaDisabled {
+ color: gray;
+}
+.dj_webkit .dijitTextBoxDisabled INPUT,
+.dj_webkit .dijitComboBoxDisabled INPUT,
+.dj_webkit .dijitSpinnerDisabled INPUT {
+ color: #eee;
+}
+.dj_webkit INPUT.dijitTextBoxDisabled,
+.dj_webkit TEXTAREA.dijitTextAreaDisabled {
+ color: #333;
+}
+.dijit_a11y .dijitSliderReadOnly,
+.dijit_a11y .dijitSliderDisabled {
+ opacity:0.6;
+}
+.dj_ie .dijit_a11y .dijitSliderReadOnly .dijitSliderBar,
+.dj_ie .dijit_a11y .dijitSliderDisabled .dijitSliderBar {
+ filter: alpha(opacity=40);
+}
+.dijit_a11y .dijitSlider .dijitSliderButtonContainer DIV {
+ font-family: monospace;
+ font-size: 1em;
+ line-height: 1em;
+ height: auto;
+ width: auto;
+ margin: 0px 4px;
+}
+.dijitForceStatic {
+ position: static !important;
+}
diff --git a/js/dojo/dijit/themes/dijit_rtl.css b/js/dojo/dijit/themes/dijit_rtl.css
--- a/js/dojo/dijit/themes/dijit_rtl.css
+++ b/js/dojo/dijit/themes/dijit_rtl.css
@@ -1,151 +1,82 @@
-/* Tree */
-
-.dijitRtl .dijitTreeContainer .dijitTreeExpando {
- float:right;
-}
-
-.dijitRtl .dijitTreeContainer .dijitTreeExpand {
- float:right;
+.dj_gecko-rtl .dijitInputField {
+ direction: ltr;
}
-
-/* can't specify .dijitRtl and .dijit_a11y on this rule, since they are on the same node */
-.dijitRtl .dijitExpandoText {
- float: right;
- padding-left: 3px;
- padding-right: 0;
-}
-
-/* ComboBox */
-
+.dj_gecko-rtl .dijitInputField * {
+ direction: rtl;
+}
+.dijitRtl .dijitMenuItem {
+ text-align: right;
+}
.dijitRtl .dijitComboBox .dijitInputField {
border-right-width:1px !important;
- border-left-width:0px !important;
+ border-left-width:0 !important;
}
-
-/* Calendar */
-
.dijitRtl .dijitCalendarNextYear {
margin:0 0.55em 0 0;
}
-
.dijitRtl .dijitCalendarPreviousYear {
margin:0 0 0 0.55em;
}
-
.dijitRtl .dijitProgressBarFull .dijitProgressBarLabel {
- right:0px; /* FF workaround */
-}
-
-/* Button */
-
-.dijitRtl .dijitComboButton .dijitButtonContents {
- border-right-width:1px !important;
+ right:0;
}
-
-/* A11y */
-.dijitRtl .dijitA11ySideArrow {
- margin-left:1em;
- margin-right:0;
-}
-
-/* AccordionPane */
-
-.dijitRtl .dijitAccordionPane .dijitAccordionTitle .dijitAccordionArrow,
-.dijitRtl .dijitAccordionPane .dijitAccordionTitle .arrowTextUp,
-.dijitRtl .dijitAccordionPane .dijitAccordionTitle .arrowTextDown {
- float: left;
-}
-
-/* Slider */
-
-.dijitRtl .dijitVerticalSliderImageHandle {
+.dijitRtl .dijitSliderImageHandleV {
left:auto;
right:-6px;
}
-
-.dj_ie .dijitRtl .dijitVerticalSliderImageHandle {
+.dj_ie-rtl .dijitSliderImageHandleV {
right:-10px;
}
-
-.dijitRtl .dijitHorizontalSliderMoveable {
+.dijitRtl .dijitSliderMoveableH {
right:auto;
left:0;
}
-
-.dijitRtl .VerticalRuleContainer {
+.dijitRtl .dijitRuleContainerV {
float:right;
}
-
-.dj_ie .dijitRtl .VerticalRuleContainer {
+.dj_gecko-rtl .dijitRuleContainerV {
+ float:left;
+}
+.dj_ie-rtl .dijitRuleContainerV {
text-align:right;
}
-
-.dj_ie .dijitRtl .VerticalRuleLabel {
+.dj_ie-rtl .dijitRuleLabelV {
text-align:left;
}
-
-.dj_ie .dijitRtl .HorizontalRuleLabel {
+.dj_ie-rtl .dijitRuleLabelH {
zoom:1;
}
-
-.dj_ie .dijitRtl .dijitHorizontalSliderProgressBar {
+.dj_ie-rtl .dijitSliderProgressBarH {
+ right:0;
+ left:auto;
+}
+.dj_gecko-rtl .dijitSliderProgressBarH {
+ float:right;
right:0;
left:auto;
}
-
-/* TabContainer */
-
-.dijitRtl .dijitTab {
- float:right;
-}
-
-.dj_ie .dijitRtl .dijitTab,
-.dj_ie .dijitRtl .dijitTab .dijitTabInnerDiv,
-.dj_ie .dijitRtl .dijitTab .dijitTabInnerDiv span {
- position:static;
- zoom:1;
+.dijitRtl .dijitSpinner .dijitInputLayoutContainer .dijitArrowButton {
+ right: auto;
+ left: 0;
+ border-width: 0 1px 0 0 !important;
}
-
-.dj_ie .dijitRtl .dijitTabContainer .dijitAlignLeft {
- margin-left:1px !important;
+.dijitRtl .dijitSpinnerButtonContainer {
+ float: left;
}
-
-.dj_ie .dijitRtl .dijitTabContainer .dijitAlignRight {
- margin-right:1px !important;
-}
-
-/* TabContainer */
-
-.dijitRtl .dijitTab {
- float:right;
+.dijitRtl .dijit_a11y .dijitSpinnerButtonContainer {
+ margin-left: none;
+ margin-right: 2px;
}
-
-.dj_ie .dijitRtl .dijitTab,
-.dj_ie .dijitRtl .dijitTab .dijitTabInnerDiv {
- zoom:1;
+.dijitRtl DIV.dijitArrowButton, .dijitRtl .dijitValidationIcon, .dijitRtl .dijitValidationIconText {
+ float: left;
}
-
-.dj_ie6 .dijitRtl .dijitTab {
- /* force ie6 to render each tab based on the tab's label */
- width:1px;
-}
-
-.dj_ie7 .dijitRtl .dijitTabContainer .dijitAlignLeft {
- /* fix the offset between tabs and the pane */
- margin-left:1px !important;
+.dijitRtl .dijitContentPaneLoading, .dijitRtl .dijitContentPaneError {
+ background-position:right;
+ padding-right:25px;
}
-
-.dj_ie7 .dijitRtl .dijitTabContainer .dijitAlignRight {
- /* fix the offset between tabs and the pane */
- margin-right:1px !important;
+.dijitRtl .dijitTabContainer .tabStripMenuButton {
+ float: left;
}
-
-.dj_ie6 .dijitRtl .dijitTabContainer .dijitAlignLeft {
- overflow-x:visible;
- margin-left:2px !important;
+.dj_iequirks-rtl .dijitComboButton BUTTON {
+ float:left;
}
-
-.dj_ie6 .dijitRtl .dijitTabContainer .dijitAlignRight {
- overflow-x:visible;
- margin-right:2px !important;
-}
diff --git a/js/dojo/dijit/themes/soria/images/editor.gif b/js/dojo/dijit/themes/soria/images/editor.gif
index 7fe7052c1d60600c6879a9faf3459c5998c0a332..750c6b95d061a534c876c022624d2e01cd14a7ba
GIT binary patch
literal 5409
zc$^i}`6JVh<G}IPW~W`RAy?7n$PqQ7H%ewCbd8*q8mWYOZ*nUQbCbDm%@Lu5N=P;5
zW~ui=aurHBQW25Td_UjkfAIL>dC1Pj#ME=YlngMl2>>V)P=?S7KmdJzDZ{I>l(Sg#
zPyv32#y)oq>cvPyfO3Ed*vIdpg{j*_P!5G=ngd$&SVO1K9j+Ox>PGr*QK}~kcDkj$
z*WbO@HF}?GTmua#wB2stam(`bH4k@3&y%#`V_TQ^94K?Z32FPYPB?1%wv1BkDqR78
zFX~?3TN5-Y)7yM`zauX6v9(`*nFrC`hkeX1`N4@(H+}HeeE+#{`BJ@`*Z#oj9w+(>
zXKNQ$MwZXs0<ZIlEF<@z;@#m(R{~P51s*?twLF7)&^5HWhKUzmBwPr|OuOm?WDHyh
zONk0SR~cZK6G~|e0$35TDdC43gYjkIDsQ}5_OU{}yo>bMwzJU>({I?^3J&Y{cd5Cd
z?8~Wr6e)Wr(k?&7IwCfa6;~b}n;R1IC?+;KK0drAR=X_*7m`>y9R@s!+4}Xemvh!*
z@6;jJ3~_N>Oj>GiO|nH(jNhMs!@F<9=5c*nlkML}L^W|u^D+Y?a~`m>+n!|X;$%IK
z&#4T_7p-0k4J&$HnVFqj!0SxTEHAk9HZlCaq@=?9w6a2GTlU$U!rVK>7ZQ2T{>G$M
zlq6iOe9>0oSj~%C%#+G5ZQz#o-n-4Ht%zv6%_^;|Y%7aSuWqlbDt=Yr9M+ukA+I#D
z@x$Z0!A*B#{$>~U-usu^G@kx=;C-EA*F)CrM{n95H2x_s9(w5W_R;CJ2lCa;eGM&5
zpC8-I)K%Ypwpt)~_4j_$KwHZT{=N1N(RwHO6aV^nC+EA6G~RWyqHn2PC~E4R`tt1g
zm>~bDXy}!o=eyv%P$U@Zt*987``X#u*VkVCw(FCihcEtCJ3KKj7})Idc|7>7v;TAV
zn-BjDzWqE<_xa83;i0iFBdH@}!~O5(Hb*l4PDIU3bpD-4`ZLX0|CGKwF*Wh&%bU5c
ze`iu9pUXeZO#hiJ{Pn5l<yXo2eD(YJ^`ResKYv@D`zqP^-t=cRabsEZWo2VyWq9-V
zt>x7pOKa<rwKsFWH~;>g-uNw9-H>c<eEqw*vAMZPUWY-XflWXU_+S731b~tNn`k}t
zdR}`BN>=x@u)ef29#pq4vTZ2qPFCFGJ1%S}7o?G_lD643R`h0SpQv%N1-;a*DCb0+
z{G|>KTHb8ds6A7w!-*PGIU4%8PgHK3sp}znSUr#|=9m}TKdN!g)Zeb`D0o!s8kA>P
zfI2^)J94(awcuCp{mWx6Rt6<Yg3I=u1_d_wxkgIn#B=s$oxgQ+y=Nzyb=srPZ5o=8
zc6irR*QH+CS)aD^oC`1HYu!IkT-2@2j@%un>g4Wly7%#6$PDZPy}7&ztE9T$*7gKT
z@HPFt_?NEFa`X~LH{-c>N1LxhjC|Sdlq*w=k}t#e_sB^Pdaf>D9!SibD!!$LEnD;}
zuoPAqxe6Yw8=<A-r{$cztoa4;z)ZW-m8DLP5b)>gLpmqKovB*E`dJugwzg3Mz$C%q
zff$pDqk*H^S$6xEygP9J<gfG}-f?JKI@${JaP~v8!sVZDQsPK*cHTG^?;MJpLV;qb
zh(vm_+$BeTI=oA)Xk&7Kqn<8nsq;FO;9&RqsM`fo2+h{%!+A|xZBCEzZAA`3S;o>z
zRN(i)A>QPunVb@NZConFBJ}edff6LsK~&lTOM=Nf(9A-}Jf5m7#LE4R1MxWPnqdo*
zhbD8hi^@(SV;^abl{POUNVL1%Rvl-2&?IY)=KOGezE)CaW8~@qcb?(igMT7Uo(j{0
z@lKV1cevX&76x33@2wPYLveGZc;i7zdV)@$XH@LIOcLxcObTT1Rg2mvY^fsBwDrE(
z%Gx?ve|N9mz0X_WZ>_G255`27h{fC;_PQFtPC4a3G9Mpgz=0QQbI=KSDG7;*c@@KF
z?5B$_zQ@e}oxG`rJ{X*ogIuEa3e}%`HSTI%fp&7!AV12oFq&K-dH36eGRwVVDOX?Z
z{@%Cz5^6ql)zaKzeK^%D<XYfMT-bi2SJ2`gD+im6UUQIM-uiLK{YFtQEPYl6s;Qo7
z@3@q-yX(Tyw8_^oVu}pzW6|}|bC1o}hL6rj%p-kQj=*EpASPBf7Pw>E6{dFdl&60i
zr;l7nIy%l0YF2dwyfoj{LUW#-Gc9p8@+L+9+WYHxP$d6%&DN^z)(hs49~pOP)r0Oc
z#%-`C;xA1T>Q5Sx1~2H_=BH&lk%e-yNn2e{PvJGtriN^YGODY01(9-9+_E0{{ps3*
zs*`=g<?gYZ1(yC`eDvC`JO5f4to%97fo^VHw2+#3F5dgbozi89cHjU=TRvn*m;d&L
z7_&;tRBKAR(wmOx<poAL+`5Bo_5nz{CZ|DWc`LyesaCHnJ7fyP9E549^x?dYEj9JA
zyR1FM*s{1#MGaNoMS;1OtX9_eY_tToUTO_Ca}T<yOFgptfH!2M9^B@Q`#b4m+0kSg
zXB30?Kett9esQnzXg$efkW7I8h(GZ1V@i<O$M;}WI@X&n11CFKVYQ-6M{OLQ=p<ZG
zd<zIXYqmRYJF(@z+jX=iDWw{y1`*zG`ldy+z4XMbr;9%i#5k2=^ZLAZsL!>&f0L-t
zm}y0`HXw`@vsBB5i?wDTB9{ciP$Kz^MaE*(dF^sVaX^o`8HZ~gS{uH}Es;{=naBL%
zsl4-x!{eu(TFvs5ki>5D@kh8zt;vLEnI5`Z8V_8_ibj0<Vr8Xj6t~_DK;#>@Z~Ng|
z8uu$|w+Gb?cshkU$cD-#Nf=UF<yg_ObdX#NO?;3NzyFiL{jhK1&V#6tn>H0MN@t}f
zY*M`QH4Wyr>nlfD3^BOIzs|v|=SvSN$%x|=Un^@Ly<}f}r`m5eM!|29raQz-D+mZA
zkD4Gx>znsFvOgdcyJw+B;U}U(<tk|E<@;V)qC!l5R(~VG&?9;2)bnilMx8<0>@e3#
zQ}-VkhMb%1fJuvIP33QD=aJWZ%yn)xY5b!A^4Z?Cb%!@D^ySWz$-Z{Bk+1F-ISG|U
zbMJFb|4>;7jrWp06~~vi#t(+Jo1dYkzJF?1u-shPPOlcdFAh-6)lXQI_d*0s^JTC4
z^c?XH0M9ypSKS<zbT%i1anF6W%GYwcaG)svl#jf1LC^;z(>yHgvKj{?Z78zvVeTG4
zYnWST3l%}iJ4Gio1@!A^z?RJZDow>GE7R_EC4=VT6NI(XaR+{ikH^Y)p)N+B7Ux|c
zy7y<GPc^rzjxtKZx~3fD15s-~UZcKmX^xP2BUF^8AJfwOO0q~EyH@p?@f-1T`|-s?
z7Np5U<CS(<a5mnegkqDOFld*Ua-S$Ey<I5Rl^~?f`93EdI5YXNXGGYO8nOV7Eh<+W
z6~>$UTO#!&Mn>tqi*frlrogo3t{aL16O`pmmXo_^n#9SfP9jpz^Pt`dsaC<HC^NGP
zW_$!nQt{hoh!g55Fd14(4RhELHSAJ1vHTt)Nxv5z8l}p{KjcMR<Jy=trsE+OpLHd2
zbpvS)To-?>Z9BO_=?|*Wyt`ld4A2?yg61)i`>ek@1v9*$Y&x9AXNXRiWe?PIY?THb
zP&QeU@*4|PYGv(yH<h|_I|tbaH3nNjqXO}DQlJ+ICQxS?n7-guJ*?Nu5a&XI2gyq3
zP&zmrU?l^etGs%aUdQ~ajsU0tN4Y=dYrtb9p*nUmj!D7DmA8cpAFJLpNIf^ZZvtTe
zB_WT^##$@-z;(V}nqekH+*KoHlV0ra<8fuTcA?>Yq0uv^(iP=M@*vBTCh-cTDT*j+
zYPZPJKc;bh4~t5|Xzj6M<3`E5yX<A#TWD<*Cbce)oU9lpj`u{#+JCqOSF+KWY+tF|
zr=kkqEi?@%O}(1(aof5{y#69HMhpx36dK<0;wf<%Q)MaQG{=p;jl}7v#r&gyW{=Mt
zTWi(g^j%P0R(*5Y<)(TU<~ZS+PMibxT#46Kq)?!9gp8sFlDB`brI}&X;9+i(A9=Zl
z1~*>|pR4_DMtbftFFFMtI;7m6X_IjKc>X2dBH|DfVqHvX$G^l!sc`Sel3a>=_RzMh
zmZjP%4lW^mSE!1?vsD&hD!2*^Y?wF+(~G1&4N&30dp`@vwh|C!R$nUAFzK?Su<Rqb
zn-8jr@+_PAsWTf^<H#2F&t0I!yjSi!C>Vu;0pH_%&Y{riU;_ivA&Y!9iDgj;10bZA
z2V+e_cP*a%9&|1zo=~9WgjyqLgakkxPCjyhYVz@a7+UQBM)s|NgO#Vih_KE>R!v7=
ze8{5xB<!;CL`^~V>~U0R089r7#y?GsHNAX6E$e6_nI4vnk0+QDeaMY<1Z8xFM3C2x
z{Z;QpItPYKVouItf+={9Mc^Y{`cMey$i>Yv<9zbsW=U|JK<qF*=pzp|$|OvSrJlt)
znE#3?k>yAz9B4XXtRB~1ugp=zMxjC^3dBoi<+Zmk@kyE&P?i_eR>0HUA^x93vZ~?=
z@^Jocp+e5ZupUB22o9nUdVKBbZKPd1!cK6IAlh=}VZTo?*R3iy9JvIIW=H0)h9jns
z4+MC=VoI~CRwO^7Zq;c4xF$s;(s_7KDmH<HW$~`D_}66Iz&iMmx95P7tDp||x+fK`
zLH7=%LY>%Psm;+jAN24L{MhYCI2rxG5WW}!VyQ|+d?1_RvC;{SKDx2K=7BT7HLHOV
zsQ`p08`aFl&a!*C*t5%LK2y?VM-o*Hu64ha+CxYFVdFeO1f4?YIH8l<2=1IcTb0GW
zI4z|@-V+eOJPMU$8lW=|$a-2Y6F@rt9f0p4VGihEdI0=8Iv%84)goJ)Dljl)xSVPF
zojc%Jz@Arubacrco;+ix1)r+VK9v|ZRUe0Rzzr|PjV{K`@Ng;2fB(tP+&7YGp_FCi
zo|R5UM7iY#U&>7$uz|KGL>V5Ep(H}5wx-A=o<|V<_Tr!hI1D`lPKM7eW?vL$pVEPI
zTtQ)QXppgMdM^HLJqGeNORfcfY{cirZLO@H$ZxJ-g==^>mr%8a@1|bLS#`QM<K!+*
zcFaMwwiG_mIo}-$x=%(3Q7Mm={0I%O`ANbsh<V9Cyjm~%Z{*~F)RF#k0G@sX4uMWe
zY~e^T^nDmG6AEUsQ!**O^iNLLgF$p7=}SuibV?sa0<+o2a7$^5hU7oUGtv&2m0%EQ
zbp}pELZz{~lPDs9r2|;35+u_LhWCZNV<!=8h@ERG30x^t3T6Yypfd?{CefH@r<P=A
zyl6?D2Db`nj=5#rJ5hSR0U9Bhn}F0$23EQr6~aU&^MD>YfkO8(8wSDOJeOfF_!9gH
zx8eziJo8IR8HjtE7icpnow1Ia0P)Ay38RyQi#qY6V0;P_d)TDhIK14nwcPx7xxx;_
zfVgr1+|Hb@9N^|EF5#6H@tceIXcFq|kn=uv!p(q?*mY1c0O;HlSDLV;*3v;65bvU!
zU&nxDU&<eOymNyJD{8@5GePTlo=@KGl!~OAT}eoCTHsVkstdNJwWiko(k7+wk&dqe
z1N30#HYq1uV}TA70$nrZfo~B$s^|~p?gkxU&%Aqn5iJtwc`P0tRX>Gagnna!B>FuP
zzxaJ3WJ0L~ZW+;T8&Pl&!AF^w9<q~;u0c7V#g9N)8U*@3;io#K4B`b4Geg1Y*6a5%
z;J>6Xn1nnCvS!=s6cr^5k1G{gPk6(S@~kIpm-e*p1@*Xu%Mkb#BH~Irbekm#D_<cG
z`A3>gFbb~t$pgsey@*?h`cP}^l!ON^!S8_&?lBNe_AImkHe-_K@*Br%y)9u7&b#M$
znrYCsG^+0e&(a&U{t!GSD?KQ8JHv5D$0`F061K3pP){i(04G~&5-pvFpF)`|0^YTE
z^q)My>!LG#!J*M65)+>{nqL^+wEu-^<WJLE7r`&Rr2EYvo9W|RAAusm)4TCmpK2fK
zRweDMYVidf#I*^SySOOWc`hR76pqfkYY)IhztMz0r{8y^5<v)_0`xS2JaMr;P*M{C
z@E9N$eA2ixrNg!kZs}%3fwyiYPOlO^=YY`3y5BnBk}iN|p@oHQqQW+W!+nf0q>qo)
zWkMuuDHRDDguWnljHcJJkpjxyy>!F|-NAYclpT{lJSjgnCa;WXkZWLEU(PV?G~DZ+
zY466`uU-yqfJ`vJiF$~ach;U?8QV|s@##-dOYpi$={sy`&wAXCrHU~SLG!&0jliyQ
zwWu#pZWv>D`*R6~zc0|!1H`s3R#tL5DqcU_G2X1e!ZQ%{1L7*Vh7cq<QKqyR>EAAA
z3G=P0Ms6#;t5#EERrA=duHhHRo<v4J0cq4H9ojHN6nw|&ZWsS<H%fCEqI-eVow1X6
znAdVx+%o-#&;??<xIH_Hdd3(Bk!;B1I$<0w2uT1F`P~a#RO!rtE#w=|z6c~J19Imn
zaMbudl7;?6$LBKC66&ElnP@5i%N4iHfRF(O0+EE-oF@<`J9acYrEe8=p6r2=tsMtA
zI$Tjro2aJG(8vd}R~xj6)?hpV4Z=a4B=B(`_yqfplAF=DLJnn5OvgCKFkGZG%h_c2
zb?On%iupJ!Tx|GqaIr<&6Bbkp3V67Xa<mH8_=Hs7CLQKH4!_7!*7WaiFCs?s6O!*Z
z6AfJAepC^rP=raq`*72*1t2;6<%k~9nj&3Jc}z><7r7RM$+$JwKA9ag+vJ+ns5isc
z3CB|eXY|0KjMvIfUw`ojx4i6DP`M^gglTy6Yd$5u1SJA!dvTDzpl!V$)qYx@m6p{G
zs6+{q{MB+Ng<QQ}q-QU*ohMnmU%nNh%YMG>M~rD4Jo0W(w9r8Jc(!Y_O!MMZQhMJO
zd7^%f=Am$;xDAHwqKavvVL!35B1XVRg)I&0>VnSt;PiNhUp&n5RCjd-(P+VDaiL+?
zP9mBw#ePX-|ItO1`eYA+viCq)eOSu7;hQS`HFOx8GLq#n!luJ&g2A+>BPfHD4)<gh
z=ZG)%jSBrhT}taFbCi00bko;i=bw>!l`-1}G#fX3^y%QXQncS!Vi$kgv%h0}{jsA{
u8TRA>&{Ac9tRhbw;p4{hQ;8+|<NcudyFrh4L)YI87rz@dcZ5KIeg6lnPO9Gk
diff --git a/js/dojo/dijit/themes/soria/images/progressBarAnim.gif b/js/dojo/dijit/themes/soria/images/progressBarAnim.gif
index 167a3e0d5d6052990938d0dedf9aff5d37a7cd26..73e25e1724be8b09242ac637091e89f011b9cd25
GIT binary patch
literal 9304
zc$}5kXIzta-}mtZ5(qnifIuUe0%E{GtrbBaAz>&8!A(6aARs8UK($h=Js=4rga~0M
zLq<Xv0UUtVRa*muDIy^4snijMfIu|?>dA<3A3?qD^M1XqKDeLx%)$Hk`2GET{e8B%
zh8sX4A>#mKczSv4ujS5XOFb`_M`o5Ucd5!`s`jC!=dYKga%G=lu~(rk{q^nB@#XqX
zRrzmk|2?+w*WCMoQT6X*%Y&oKy)PFBh8KHZEY`NY85mjYQ!G`;-oBh#e(++s;eo32
z&!ubKvyVrXtK`ZjuNH<TmPN9+FJ7y!cB=-*mj4)8=zY0dAyW=bESBF_%AYR1m|T4E
zda1JI?bBC_6)kTs-Fw^feDUr4`^z25nOSw)&{DPhO;xM1u3af=R!Q4c)om(CtEyb4
zs*x)zT2!^|%4)f?wp~@zrV_WPDqB^3!|Li*Wo3)<kI{t(&zHKNE!B0X21gctA6cku
zRdzpLuJ2I(ISKx$l(ikIhc6Z-EpM-MsrpCM{~li!%ih+vE2VA9sutzrk;MnkmwTQs
z{XV)RZdTQIs2;rp|H{g`j<=787Y0Wcs^lt3i>mGEQbqII!O^Au;iax;%MYF{RkSE;
z+QC06_<Jo$T9yBPwLGO#m)v`+m|CiCQ?9PA;#UoJGxqNBrUo-yoG98*2n2#(gux*Y
z073?T4bl9VAiAq5DAYC<3QF00jzWf>&vHQq1`;7z=PAS-q|3$g!dxV!l#&yOM3zF!
ztM`{;imH*YQgUuC8FuH+xvFZ&-8&7pWH6V&5GFGa19=F+<a7qQ^gc8~#&rcEe(wwH
zipzh9!5Bp`BO;jl$Hr{UCZ?kP8Y4x$er<$7s1g6MfV9nz`m)X!rX=eS3URh<j6uX@
zzx*dSm{$tPcBf!8IIF~kL`xq$O3l)OTUhf9tvXu#UGe*KV-%`NtsO>*<A&nq=$)lT
z^MyAuDl(Z8^cK;fI%@Xg8fynXhS@~z9)0ts$UDK}9?rF|`y(HQP>r8lvv!KCZTte3
zb_=~qi`?K{-KwRRq;i^+6>KiJcQ`*1KPuO=GCyo;XVWK+58se+!T#y=SeKdmdeRA-
z;HOP_@Vs?Ao4LqduH8|3{hQ$AtZ8T+V^0xL^sWSYJK+rFz4*+VXE)9Qg^vq1UwEOL
zyJzDIs*F4Ktw(T?$NR21?Qau<YgXL32J3W>X96qf++qitf%=yrY24+{a3c@y50`Zm
zn9YuUi*G6Sy`aXG$g}~vvY|~6LD+^%btmx@7O`|ovG!Mc58_Q?Q=mT9^n(Y*+Vq&)
z;pP?=!CpLqY4`}=_!+bvWj)(akzvn|snFh52KCXRk%SPFZ8}yJ*?K7nK0;$JX!<HL
zK%WXj2h;rJs6bX~+l7NRO!-AxO1Qk>Yo|N%LbnvXY9vG8nuhhb@j4piHiK+MpZra)
z#$peeS!43OOwZTQ8H1k`(a6w_@?D18rDATovQ;9qNU+C*&OlyE7%|SZ7L3D7>}qZ=
zh4EQsZgGd<rHi2sb$Kr0<E8<!#%3Mv?i~4*TQ=LL#kaMfoa!U6UA5QbHV$Nrd`bUu
z!)b`K{JM7`lV;$UuYlj^OHN=I97qb+F;%eY9e;kFZgACV^rnJgGIR4R13B38=ha`7
zH)XPWfBo@5rhQ<3dh^dF%4W!|m3M#AWLmmnWy|0IF5bXk(>+Hc^ygtRn>Nc^Ud~3^
zM+K^O%q>MD)Dn?OHME2*YNL%8kcj{Nli3Qe0VrfM`y7<R20s`!B$GoSW&<vHoGc-d
zQVdYCLy&2L!UE)e5r!BTSOpW2tJq|i;9LQKgxuy_6au#d81Rz;z)waXVFtQ9<b3#G
z9s`){t~lbKfaZe%nENptTeDXY%&2J&DQbdkG{=5t!Hz%({2EY?g9J7y99v!&u7hQ{
zNnp*Hyk$ZVZ!^?AglqQ8hP&!36Yj;}$I6jJRoCLtkRWXz{1$t!xsH}yv}7++T7Mb}
zUc}xq=~|UKj@^=wZn{+T>QS10lr3c-SR4y?4be-xEv)jnXn?n;)a@J(;=)ZW9VcbH
zT|?BJt4+d$S*}3eNuYB|WU%h7=;z&K>gLB({}(cL37HZQ)05|lEfXA)Nn4N7wC&9*
zTzq9B*J9n%DbE)6PMEM^4bKHjvT~EX`)gJdOJA7#1jVfWkT<%OIOO_5?W!n3{`IBP
z;9gby@m=P$FTG0cs-pS|%m(yav2w}IcT~GN<nV8=U=qjCJC}~-r{}O81xc0AIXffN
z0tbT>e|=wng}RKQ(V=gigCD@W%1e}@HfmDfj-}+JAobMEY;D2JfnjV|N$M~zI0es1
z!D=PRc^FzkH;Q3MfLZ!b2qUIW?VUU%qtBj$^(YCE8?yuYi9|;&R|d-4IHIE~8;~nI
zP&J4~n9!LF-9X%9Y}#t#p|!}haEtfv%#Js#V4xz5L+C|74=BE-M^<eS??SM{2MoF*
z%;MvezD0XT&3;8cUEFAo50wqK;o@VUauGld9hdMNx?|So8%Ox)IjWhgb>1Z-ZRU=L
zhtsUYrY^^8stL_Jt9qZ~?Hdok`eTs?=Dq5#05I|N#(OI&nR(5rB^lN*KXj(CQ-^uE
z;YZRm8DHu0AO-r!IG21=aH{SbgJ;GAT9(_@joKy-rYr{Tf7cDL0O+}M?6YhZXgd?i
zrx4ErNFiU41yBlDl=C61(o7L@zXU_fLIN-eIUgXy_~#mtkQ?l};_G}2@`LNbz?MLl
z4z?{at~C(xkafN_j`;iku<kW`0jeHjlcE$XqiNO~3swYzPl}89J0f|3{RuVXPMY+~
zNBoLyF!&*ycn$S96NB!cwR<LRZONOPkd*20X)(bm<Js_h_I#N7u_<F61HFI$f`pn)
zD07T$SGn3x^ct9V2LxA&X%{`s$H?o^T7eg>4>@r}vMmNhp6f0A{GL)#1&!=`+ZVlk
z;OiLLtJ^P|SB_l~!4u0hsPzupC9iHfq&U-8X!o6myVZ3srmmc=v&DuUl?9=GXKOGe
ze4>OfE_xzNl|@aH+JHyTMmIm1?qF@Lee&$mqf6RN=D+r;Y&%jPu#enNP}T6c<zLmQ
znR635yz(!9Q!dQClFw1Q?yHBHukMP>_EmrTGLgodrMh=-3i0S{zE~bBQ~P_5{YoIr
zP8?|5j9A4H;PxZ3^<fx1)&#mzP>$2nPt>v0L*&T5H-4ro#)XwI#TwXh;InsU<Xj*H
z+7{%C#`BP2VPYP4*X0;_5DkqQ<$9?1%8gm*90|c;_BJP*|D<sg=i7H1c0b#hoKs2I
zm9FwN^qjoS20aD8!ujfhroVdEIg0%}puauHO*Z_hh|d#M;{qC75tz@^;&HUUeMNNX
z@o`t4MSKz-feD3(C$Ox#*vax#<Is)@mL}jpzM>83`NPM6SF>Yw#@6`RN2E)6#mp((
z0T@+dTDhnGTCwUe_Nsnjo4F?wH0>BaG<^-AAnDftb+?y6N7Im2qoHNW<t9hJ`p)Yt
z@`)?B{N0`2C_4wOe>M$0M`2O6p;#K!0%#^cA!dOw&IQhA1H_z6N>&IED9S7e3EW=;
zV2Ih3uq)(?Ane?8k^;z`%!bNa_gR=MW)-GL3U)it<pB$X-5H1&xD?nKM;yX@be(H9
z0=k~eBt?y}jNY<lHLi0(*NgJW;af4RLc>HduaTw<Vj~yd9Lhn1KQ053t^NSGZCGbX
z_Mr<4zPq*kjmFe?tC6t^q%~S}=yjr`!!rggnj~b<dh~%Ull_(9(QvTXPP2ORv@{np
zQmj<?DhTe%{JP>!F!4be5?vXMpQ`~EO)kw)D2M+=Fppd<QR5}7Owxw+WBMTxXP7VS
z0OhG*LTrke3@9Pv?tLmYuC{fQp>4kzEOrW5Y&cl#q`xY9u`oS~BX8%F2KQ^6zfAW@
zW369u;xdT4cEfWGZs?=TllK#b|72G??pu*Aey7c;{_N`{^<rYn5@GV`4|~CFMK}Ko
zNQ!gC>upcAnb}bK^;lSD_2#gZN_@oErrGMHef{M)W5|Lo3LcZFYw0`I;myiKhAXhh
zkGj2*jr|D2=>WJ}xGZqDAW^yY2$ZkLl7KG8FgZ9{N@^O(&WS2P6(g9OEc;n|f0P>{
zM2;%%IXE_8%2>c<tfyONRFY`q#xc`9P7zU-ZgQn}t{bPBW8wDW9l!i=wU~j5wzeAA
z5Kp&t3&8U%zS~J)m9i)~69l(7r7i{t$l;I}`a37Zxw7FjO}6P0z<uXrWoFE<edXye
z2cFf28%kfjBZlIPbq8+5r>%=Fyo;!-xXR~{qGh4AR@a>p8OREq1cpiR%uv0RY-dY7
z?*4HC_%AC>PHXDf`WdGQp!`WQcsw;kyJ2YQ<#^rjhT;n8Pkqxjw^`(6E^^<E#SW{l
zkf?tcCIDD&%4UFacI%q+^H2c~+$A7$L6#687PG)%0t8a>0MI#71UeVi!>+D5&(k=+
zD`*U1-j=a2*>W)8c`kuW%`_3%B3r8vzn|{|;)u_#AwNLRGm3h}jGFo*YMf=HV$Ers
z=Yh`WGx{HA_rsj6#ttHnRw>GL@bkmhT{iBfQ7!y}(Ul!641B?F?+wUoc8LyQx@&Qd
z3w<Y5GfY}T9+7rnS4B)*%>$CY%cenkRjP)0oQsyjd=SXo7G&O5TOt+EM0bQ6J}|FU
zX_)8H48dVy5bEQwx_z4_;syRYn|i>8J4v7)hDlc?JQePGD6FvmW5dHjbUT4fpZ^bY
z-b|9La*g?~u79U`V#gbzNQ%}IPxeNy{t%&Ij+F*9m5v5xX}4HC{b{u2Ki~MQHM~Y2
zvG-%cPfzZ<abOi>eqoKd^F|GGyV7H0VFnJWSl*Lz&Pq_R!?NCp7eGg+=%d3hP@iO-
zfm=ADk&D*aGB4B4Lpp2vohrs5^qUbVtUgVSBCJ4l(9(~>+el&H=n(jb2z1n!{K8QZ
zV+QAk@?C(8VQEfGPG^qb32IE}J9(R)3(#G=^228u<R(&>m5!O)jBEojD7uz`I%<5U
zwEz^Z<KPz1EXRi4bIm~Pp|o&H1@gr;;c}82rLnmjFx)9!$C8QR$h@&Gdy#OrmaYW&
zgISA<&hKl%Zb)*5IUG6M-(r5G(Aj}l^%LL0G_SCK3R~OK-Dyt!(OPc4L&U1T8a=<=
z|0+w#@2)XXCpb8C+t$yRcdX=GzM5A!6=$GBcXPbivHbz$mH@Y`t3%qIC^!02{g1ez
z6ks#w>^6W8fVTNA|2N{9nuuTGuSJ|97E}fzYr%$x1d?mX1%;sPN?@ZV;@~hL%lMeA
zPr6Tlmue=cyBhI_Ffan-{T%3uQ>^J`GBvCF-%$#_(Hx%?VZjG|x2TqhJ|;4TnLJW>
zlq$Hu2Ef%_BNbfmPq1)k@*1fi?64TKm-=Z*(sF>YE%rYI^<wk!2OadqRA_NQvNd^t
zIBQ}Jcd%nh4-IeNr&yodzfkKdO|LMw3rH?z<X~zuLEOQA(-8W5t`9Ce4o~Iy<8@Bq
zB)kVt8UKyDVPECg8^X^)D~i{m$N`pfDmYMr7v6qoI8v$lx;s<agA&CUM>E#rHd}ul
zHZX3&hvoOKt?uu(2be0G|32Z+WWJ;J{lvpmlfAaTuMHGM=JERp{mYOE#s}PdZps?&
zHYm@(|L5;kf79UR-z<RuM^M>+=M8O2Y}g=rw<VT0Sbk&2!}2ZrX1>Il(CxwL4W&}$
zs4#W2HY;;mu!4Ye(qe$Z6(a4t5@@=n;X2$*aG?<B!Wae0E*-(}@<od^3&lAjV^>cM
z-HV3K8O?Cp4Nh-9I)P(CTcM7%n=){Bc<a3_ei&P8IMx>y2{xSEKSJ<MZ>AS`BK%1O
z0GerA=*GL#iv9*RZ)*m`pe9I!0F`cOz_UA@CGl!!hH2i6*911zG;~s|S>2>Plwo)U
z;I99=lJ`e=E#ZfcxanS>a8D8b8~5E$xM7@+xcN%!J`L{UUjGm7nWj8k{R~zIbM_m9
z=S~$@*t;*<KgXv2!yC-mbDK9)&Taeur43o54b~f^T`kK5Wrtwylz^}W5BZ?$6W~E9
z2#h!Z9+aJNAG6&Dx_+H$8ztu(DZ$0P1{+9_&zMO%UJ^_rTsj+Z?R+W&|8Aqh(Wnqi
z8lNnbO4qixZEgd2P-0z;eE!Ir>xe{LKz?EG^*AJm%}DlIp-LdHG~K>I?~lsWDK<}<
zTCAl?D-6v9`#US7v_S^G@33ge4hEMTI&L3|3lHHz*LQAPY^|Chn6F>`BbV76m77bB
zoU{)KIfEMdIcd9n(T%VkGsbQU!*|nb4=onz&pz+CHpW;#jtJf|F-z#kY&R^dTx1iV
zl66eybBae?*Y&n~3w=XhTzJAS>sy%{m+3m>#Y`mSjY5=+8!vAw&V|iYtj&`>ZLRm$
z=E(>|PMUmrtGw`31^;`-zIM+q@B6(cyyIiy77KPf#1iK0VsDjK?_61MM}}ijaJ4oZ
z6_%pXHGw;gKu~#GZg-~ANDUg*R8E>kb$X@}2dYkyBGA5qCwTNK*logpbz4mYyPdVx
zZP9;qyCWx4({0A?h@-gxM)k<ljnmj_N;`PRPZ&;Vd}ZRLU;7Hn5H3btj9BS!_gw4t
zp0#ePn>i)lJDE<DoU(Q9GXAa|(t%|e>)V6l+c~2oRGlD|WcxV8uFrSK)iwKYP^u-L
z4$9rMDQq=CmA$UMY-)<|@t{-&UAa{(o+jON$es2q^-%iOu3}EiG#)@Ma~p5f4Yf2?
z={Wm0cC3U$8V7Y6{~|oGc`!ma7KfLwGtklc-)%zyfO78aR<`D)gwM*L5Cx#?Y<?a<
zEZ_(<s!K8h!8uZbA)c=$mynAt6r3y5pw1|+Vu~PlF@j%1$oDfexdxc+;5`}A%|!G9
zoe>X+e>BHE1ySEM>b77;jbzwHb+e6Lvq^DQ><GkNAi=@{h)DiVhTo@iQuo4eO<(sm
z7Mm=LFYE-Th`#^i09OT05$oq&i;tb@ooiFX8zfCnb^=K&Bu@Gcn}qa!MuE;n^O&hS
zwbTibp|_d&Ll-H{>R%w~u&Er@Bk~tIQ8|#)Ub-&3JL89o{TRA-?7i{*RU`we?d;Y3
z%YkFRYu*m?CqpUYT{t^~`GKF8hr0^l3rhox5^1X$ls!(_O@HNG;jDe?G%{>4JEi9?
z8M`nSzFYTSCBAvpiOGF=CX$z!1+NYBshDpQG15}RyU*4Ek>0y+RCQy&0P2!tXGRUO
zJ-^1J^zD1*I&bz^w^Ta&WAKF;Hvi1(bvX7v^nKmaiDly^CVyv?-3l^Z&DOS|51DOD
zG0{g+*h<;g1Y@L1Hw7>(<N;wMMVa>9lAM>|5`l*QIQO0^Ph&6G!P0^i-gFcj0oAcs
zKs3@bd@2vh`PiG%T_`t0aAte-Ecl+^h0Zxj_`WZOm~~eQo{GMT>+*ZX;0WO${cUMS
zEd#(0Uhu`%MPJl`on4U^fKx@C#(OBL4m3eQY(WDQ=QiVS6yDWEd%&6P<W^|KE;=((
zYp1y+cNK-Ip&HwvQt@fhc0Zc{bSQ{fA%SDoFkhG&@i72m_%M%?hoMu|5?dEKQly#L
z3x}Jhu+&0mz0>vd<P!uDD7tz<JvDvpfa3A=wHs3rQw>Er;s=c)>oD?ls^5cYY)`0L
zr`4CwkT&RliZyIAaPBM$-~mu%AkPJw!CMn8%y7vEh=n}Ln&~p2ScAG6L|sR&CSST(
zc22B8opUXODS`aT!w8x~?&W+yjmfb^%1$tekOzSgkC;Ol?Qzc|_77wj^;!T?6Fl3f
zDZuCr0IHsjK;(d`6IXcst(#GL&Jf4^O+0BpIz8$#{W#86fi)n3$0XjD>TQ}ce^9Bp
zC50JUxrV8xOoWkspPDJEp%Qki2S;|8iz&R&Ji21i)Sum>@Amh?AQH{gsmdsfrtTH@
zaL&g#1vvij#qo>Qye1A09kC{xEJXT)vU#i9<H0Kmqz#nV7hUSSoM#7Yx6il{W~gul
zWBq3NOmCjE!IITVN{rVSeSKN*%I6b_1P3kC^H#{(){=)>e!j(X6Kgw!UNO72L(G2v
z5bK=dYq5@huKNOvHSW}>SbKkpHGM7C$}G(-$*U9k!q&epceEpv2JPMOQ{_zTit@=o
z(Al5ft2c~5Oz302bm)68D$J6nOcABf)y)d5iEV{~<Gu~qWd(OZv|Cx*ws>2cnW6}U
zbp$OP^m{T-GeP<vt>1MohVBVY2?-K-W(l5=IE`=hg0FBFni<(k_#U#6l#>Gn9gKDV
zqx?1B`)#!%Edyc}TeGRrMWcmB-aw*-F}6*u=m52I8sZx|;iK=<KC{s!XKja%l{iyS
z=_2+DQ)=Nw*Q&9|*fM2b3CNh-O5PZFk;ZFYO5VpWb$}BDdYp7p=3KYVZ+^5L3s(Gi
zeTLz%&t>Z2es522SZcl1FSabsHQwY<&}9=@GCa$XR6o-QkTOq@4s6NvGdKW4=`}U1
zgv%OxZzAQlGU5$3-Qi&pyiX0jANKx-=Mo5o0t)AX*JL2q1<K<Rkpi&UJW5_p0WWW@
z*?>z~AX0)M3cx8MAr}J|N<LIuSRVpb`xh=I?|#T#;YZ*Qo-Oh>P<TJDJK`Y|A(Y2G
zi$G$8Mm=Dm#|NTbpD_B13j&{tcqs&Z>qjKd_nRH1rox@~!&WxtQG3NM`+GB(@ts;3
zJRWV~te;kH*?DkbPZp|7+C1@oHUknW)H*NO+G~jClj`S(4&6`5s4yTIZQe9E$llZ1
z>utp&xD>w%2Jc9hiaUK<A_uDu9mjN=vS{s^8G^s=rA0DdUxJyE!8I#nbyA&BQQ=5v
z*j?7MPb;?B^4IUm$cnRHeyeacz`b8w9_~w#^R~Oks*f2*()YrGZ9a#Da9#7^r_x~`
z7Pc2Cdp_2o4y8wVuaPY*!*pt1NuCLf?<J^eZbJM%E^OVlj|&?ywy$!JXTtlw42Q=i
z`(FQK|HFdkSG&EmvZefFzk$c<;YNn))Z*MUF;T|m{YdDhYJpP(15Rz>HZM6AZX<n?
z0`HxGkd7_r`e=ofIO7TKl?lUGdR!8M!%cyvMZjzbFw2AX-*=!Kti?~TdSn$B33MX#
zEZs0`^?ovH%7E$lqjs#QBwaZUPR?Uk3T-439N2hzzQ-G+j@iDI_{i+N4zD*5{7ya{
zE#%Em;ATJop7xoLM`^<b1T<=w2&G-srAanT+Lu7x(Pb%#dN9(7;|T~eE}?D`e|k$Y
z815J-*W!qwxUh<w6rNr!ybWgkKvF6v;-uQSuBL|I!jS?nFx-42sINg|F?AEcuP}8}
z?JswiI<$cs@ofS}<X1C|Ld8z<RjOAaqls(znIoasVwnr&Grx*MK8tXR`+1n4<@0^;
zc1rj^JqBv>oetvOobCeUrV|4L!G33PDM-yG;pTkkcaf&wRV8_~<SKG;`h~J{#bS_m
zwuo5)xtES9z8~^S_9xw3aFq0by18q*p8^`*7qZuMld^3=-jA|1x~&k|ntbag&QH40
zX#zNW`m*7cy|%6QJ)<s{n6Z`Fa8py0v?N61bNmj>t1ZeHdk%|__gjJ1LLOq_$=2>J
zi@HW$Mc6OwrAkvqfv@%9{SCDfD7cZkQIvf$BG$s&ygQ(eH{SBtGqHN>!;seCi%9eq
z<4Lb}y&|}&P3@#Y9<1vWyK1zti<aJtwR5=bZaqEL^{)-t76O&qgukwgt26JYKGytO
zGuF^3{zqwRUMDaf>_KNh#+|ioP8ZG%%dk)}HfQU6_-?N6-ksO0XP1PK$KM+ND4Lz@
zTAL<{_mi#QG)XkDKk_QO*mIxz%rC06j`GdMUhYF7RZD-H4H=b6Bc2CeP^RB5SiSyA
zPMqb|-3Io8Yuo0lcZY5Po~wA>wY9x(;TQr<PYFk$;O^ks2JHP{=w+N#fu(O#c3Nq%
zav+w+Vv-Ohu}KJ@^z4HRTx3}Af*)&B6R*wV3?`h1^qHCS)uLTq@Xg9j=^w>1FvG1L
zzB9^>0aFHM(Jwb0{dx?)%l?iWyVWBkYR&mYrpEcdR+N6Ior(UHMO=|<b#9!^|5V)l
zQ^kMqa5+{A=p64fKHV;Z75F2H?TgOa&}uBw7w$Yl=kM2-6MvwH;h22m#z!^WLi`l*
zq%54b&Tj?`cwKV1Pd(Q#2b?8``&&J{W#Kwkqi2#4ruVHYHeHK%SNa+pn2bqpda!l5
z^IG@KlxYt~uLp6+?1NwZh1ChG{{}g1Gjav*n12Fc@fAV^KkI01`Va3V(6ifsGyqDW
zq`5%T(};mgQ2F_E3NkSJV!H4{#3_Lq<q|*$NXZgRQChyFs2o(DRhAnF`6aC>=jz=o
zmz*`@>7a2YnDE~8&IoXT{~KtE8;Z!!GJ32*j(HR{F*uVBBA>J}%KCuZ0)fdv9;G&8
z4fbnUJLHL9mb>il&Tvi=(&^rKj0b7hFUWHX7;y!U3GD<UZZR7(o2|8DVdn~Ubo2O5
zBYlV4^!_#`MhFh?t{Unwv7xt-`NI$?tw_(Z|8SVKY25(%3;ifPDs(i(II=`|2-lp$
zH{Pv(S`l(n_$lJ7OvyD(#3OF?v7D19++T~vP9A9nEXK6e;y%l^^p6quUW+*RpRX&{
zSdHp?ikkG)_2_x6;O(5GVWkaQNnZ1p2KQoiG?tEfo%F>f-d_0bD~J*U4618K@a62y
z?khhgKnP!(PYwj_{c`VyWU<4a2H(6s8S_BTckF)o8Q7ZcS;m=FkKaJuyxVpmZ9n1d
z=_yPQ_cje~1c)1MttCnUkdvKOOQ|4k_iYLg_d$e@we@yO1(ucqWq1%TB6KVkpC!OD
zXqGvTuzCpU2-ao0R{D8B^GdRaVal<)(9lYvuX1v<D<>V(sGS4coAlHAa8LRjLRju|
zNqA+l=pGxD9cCRuF9^CA`)PvT80Km2NjciB^EKkq$&uP)c(>bD+GhK08*4;ItdIL$
z3PmT{A+rMdr4pevcu$7P`eRD7B9HSdyvIg$FzGn_6t;3DJiRvE(D^w2z`XDgGQLpd
zi;V6Jt-I1NHFW&STEC-{n7oF?!p0Wu<`>1}>&-_{9O5Q*bDRNSDGV~`yNTr7Ob`3h
T@pf7Xw9V+{dvP=l;`V<4L7En-
diff --git a/js/dojo/dijit/themes/soria/images/treeExpand_loading.gif b/js/dojo/dijit/themes/soria/images/treeExpand_loading.gif
index b6d53b9da82fc5aad2019f6760448a07a7de1206..db9ddd0282895511c648154db2bf621e33fcfbe1
GIT binary patch
literal 662
zc${<hbhEHb6k!lycox9${rmUp*RS8Yb?f8DkC!iBzIpSemzUR-D_6dJ`Eu{xy;G-7
zojiGR)22<^w{Jgu`0$-OcOE``_~glx0|yRtb#<LPcW(9S)o<Uv{qW(#{{8z`ty*>V
z?AfbVukPKu_sp3y+qP}nx^?TnfB*9H^FM$7ymRNy`}gnH)zuw8e*E_B+m9bVe);m{
z!Gj0atXZ>X&z=(}PF%ZoZR5s`Z{EB)efsqI^XDHtc<}V;(_g=S9X)z<$BrHK_4R#y
zeV;ykN=Zq1_UzfZb?bir{(blE-7Q<Tym;~A(4j*YFJ650>eZ1WM>cQXykf<Q-Me?M
zUAuPu`t_GCUHbX+=dNA5zJ2@l_3PLF|Nk=#CZPC}g^__FfI$bu0mTUe`{#y$rskH`
zwpIpyLo-8m@%9!wDM@ZtHdbd|A?67jydr)Kev20}YMZo~^0F`TU$@@RSX8W4%7|e-
zlMdqsRyl=cKgq>ARrhR=5NKBC+Hv&wdUmH~E+)VA{!A7Z{F(WAn)!^`){BW)%W}Tr
zG+>i#=4QOUPQX%8QTV64hOAe!o|?-ZFUJK52USI4JTi=49O_nJ7Dy;ws_fdxD$gfy
zXaN(`L~bPk1qlY_Lv3O*VGIf;3!1uk?E^k^I4Cu=DM?7oF%VgJs6&iPM91Kv1CtP&
pkwWB$50BWmnPuD<JU=l^QV>v)k+8hfe3(rw>~NQ?w}t?NH2_QY4EX>6
diff --git a/js/dojo/dijit/themes/soria/soria.css b/js/dojo/dijit/themes/soria/soria.css
--- a/js/dojo/dijit/themes/soria/soria.css
+++ b/js/dojo/dijit/themes/soria/soria.css
@@ -1,1151 +1,3105 @@
-/*
- Soria theme - not in solid state right now. Not ready for production ...
-` please feel free to add styles for new widgets should they appear,
- or fix classnames you would fix in tundra.css if you change a widget
- template classname.
-*/
-@import url("../dijit.css");
-
-/* un-comment to endable webkit and ff2 builtin love */
-/*
-@import url("rounded.css");
-*/
-
-.dj_safari .soria .dijitPopup {
- -webkit-box-shadow: 0px 3px 7px #adadad;
-}
-
-/* try and group similar look and feel into these main groupings, and put extra stling grouped
- by widget somehwere below (most already have sections) */
-.soria .dijitButtonNode,
-.soria .dijitToolbar,
-.soria .dijitTab,
-.soria .dijitSplitContainerSizerV,
-.soria .dijitAccordionPane .dijitAccordionTitle,
-.soria .dijitCalendarMonthContainer th,
-.soria .dijitProgressBarEmpty,
-.soria .dijitTooltipContainer,
-.soria .dijitHorizontalSliderRemainingBar {
- background:#b7cdee url('images/gradientTopBg.png') repeat-x;
- /* background:#090 url('images/gradientTopBg.png') repeat-x; */
- #background-image:none !important;
-}
-
-.soria .dijitButtonHover .dijitButtonNode,
-.soria .dijitToggleButtonHover .dijitButtonNode,
-.soria .dijitDropDownButtonHover .dijitButtonNode,
-.soria .dijitComboButtonHover .dijitButtonContents,
-.soria .dijitComboButtonDownArrowHover .dijitDownArrowButton,
-.soria .dijitComboBoxHover .dijitDownArrowButton,
-.soria .dijitSpinnerUpArrowHover .dijitUpArrowButton,
-.soria .dijitSpinnerDownArrowHover .dijitDownArrowButton,
-.soria .dijitTitlePane .dijitTitlePaneTitle,
-.soria .dijitTabHover,
-.soria .dijitTabCloseButtonHover,
-.soria .dijitDialogTitleBar,
-.soria .dijitAccordionPane-selected .dijitAccordionTitle,
-.soria .dijitProgressBarTile,
-.soria .dijitHorizontalSliderProgressBar {
- background:#4f8ce5 url('images/gradientTopBg.png') repeat-x;
-
-}
-
-/* all icons are here */
-.soria .dijitComboBox .dijitDownArrowButtonInner,
-.soria .dijitMenuExpandEnabled,
-.soria .dijitTitlePane .dijitClosed .dijitArrowNode,
-.soria .dijitTitlePane .dijitOpen .dijitArrowNode,
-.soria .dijitTab .dijitClosable .closeImage,
-.soria .dijitTabCloseButton .dijitClosable .closeImage,
-.soria .dijitTabCloseButtonHover .dijitClosable .closeImage,
-.soria .dijitSplitContainerSizerH .thumb,
-.soria .dijitSplitContainerSizerV .thumb,
-.soria .dijitDialogCloseIcon,
-.soria .dijitTooltipConnector,
-.soria .dijitAccordionArrow,
-.soria .dijitCalendarDecrease,
-.soria .dijitCalendarIncrease,
-.soria .dijitHorizontalSliderDecrementIcon,
-.soria .dijitHorizontalSliderIncrementIcon,
-.soria .dijitVerticalSliderIncrementIcon,
-.soria .dijitVerticalSliderDecrementIcon,
-.soria .dijitHorizontalSliderImageHandle,
-.soria .dijitVerticalSliderImageHandle,
-.soria .dijitInputFieldValidationIconNormal,
-.soria .dijitInputFieldValidationIcon,
-/* FIXME: need to make these spans inside the cell? */
-.soria.dojoDndMove .dojoDndAvatarCanDrop .dojoDndAvatarHeader,
-.soria.dojoDndCopy .dojoDndAvatarCanDrop .dojoDndAvatarHeader,
-.soria.dojoDndCopy .dojoDndAvatarHeader,
-.soria.dojoDndMove .dojoDndAvatarHeader,
-/* FIXME: should be .dijitRtl .soria ... {} */
-.dijitRtl .dijitCalendarDecrease,
-.dijitRtl .dijitCalendarIncrease,
-.dijitRtl .dijitMenuItem .dijitMenuExpandEnabled,
-.dijitRtl .dijitTitlePane .dijitClosed .dijitArrowNode,
-.dijitRtl .dijitDialogTitleBar .dijitDialogCloseIcon
+.dijitReset {
+
+ margin:0;
+ border:0;
+ padding:0;
+ line-height:normal;
+ font: inherit;
+ color: inherit;
+}
+.dijitInline {
+
+ display:inline-block;
+ #zoom: 1;
+ #display:inline;
+ border:0;
+ padding:0;
+ vertical-align:middle;
+ #vertical-align: auto;
+}
+.dijitHidden {
+
+ display: none !important;
+}
+.dijitVisible {
+
+ display: block !important;
+ position: relative;
+}
+.dj_ie INPUT.dijitTextBox,
+.dj_ie .dijitInputField INPUT {
+ font-size: 100%;
+}
+.dj_ie .dijitInputField INPUT {
+ margin: -1px 0 !important;
+}
+.dijitInlineTable {
+
+ display:inline-table;
+ display:inline-block;
+ #zoom: 1;
+ #display:inline;
+ box-sizing: content-box; -moz-box-sizing: content-box;
+ border:0;
+ padding:0;
+}
+.dijitTeeny {
+ font-size:1px;
+ line-height:1px;
+}
+.dijitPopup {
+ position: absolute;
+ background-color: transparent;
+ margin: 0;
+ border: 0;
+ padding: 0;
+}
+.dijit_a11y .dijitPopup,
+.dijit_ally .dijitPopup div,
+.dijit_a11y .dijitPopup table,
+.dijit_a11y .dijitTooltipContainer {
+ background-color: white !important;
+}
+.dijitInputField {
+ overflow:hidden;
+ #zoom:1;
+}
+.dijitPositionOnly {
+
+ padding: 0 !important;
+ border: 0 !important;
+ background-color: transparent !important;
+ background-image: none !important;
+ height: auto !important;
+ width: auto !important;
+}
+.dijitNonPositionOnly {
+
+ float: none !important;
+ position: static !important;
+ margin: 0 0 0 0 !important;
+ vertical-align: middle !important;
+}
+.dijitBackgroundIframe {
+
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ z-index: -1;
+ border: 0;
+ padding: 0;
+ margin: 0;
+}
+.dijitClickableRegion {
+
+ background-color: #e2ebf2;
+ cursor: text;
+}
+.dijitDisplayNone {
+
+ display:none !important;
+}
+.dijitContainer {
+
+ overflow: hidden;
+}
+.dijit_a11y * {
+ background-image:none !important;
+}
+.dijit_a11y .dijitCalendarIncrementControl {
+ display: none;
+}
+.dijit_a11y .dijitA11ySideArrow {
+ display: inline !important;
+ cursor: pointer;
+}
+.dijit_a11y .dijitCalendarDateLabel {
+ padding: 1px;
+}
+.dijit_a11y .dijitCalendarSelectedDate .dijitCalendarDateLabel {
+ border: solid 1px black;
+ padding: 0px;
+}
+.dijit_a11y .dijitCalendarDateTemplate {
+ padding-bottom: 0.1em !important;
+}
+.dijit_a11y .dijit * {
+ background:white !important;
+ color:black !important;
+}
+.dijit_a11y .dijitButtonNode {
+ border-color: black!important;
+ border-style: outset!important;
+ border-width: medium!important;
+}
+.dijit_a11y .dijitComboBoxReadOnly .dijitInputField,
+.dijit_a11y .dijitComboBoxReadOnly .dijitButtonNode,
+.dijit_a11y .dijitSpinnerReadOnly .dijitButtonNode,
+.dijit_a11y .dijitSpinnerReadOnly .dijitInputField,
+.dijit_a11y .dijitButtonDisabled .dijitButtonNode,
+.dijit_a11y .dijitDropDownButtonDisabled .dijitButtonNode,
+.dijit_a11y .dijitComboButtonDisabled .dijitButtonNode,
+.dijit_a11y .dijitComboBoxDisabled .dijitInputField,
+.dijit_a11y .dijitComboBoxDisabled .dijitButtonNode,
+.dijit_a11y .dijitSpinnerDisabled .dijitButtonNode,
+.dijit_a11y .dijitSpinnerDisabled .dijitInputField {
+ border-style: outset!important;
+ border-width: medium!important;
+ border-color: #999 !important;
+ color:#999 !important;
+}
+.dijitButtonNode * {
+ vertical-align: middle;
+}
+.dijit_a11y .dijitArrowButtonInner {
+ width: 1em;
+ display: none !important;
+}
+.dijitButtonNode .dijitArrowButtonInner {
+ background:no-repeat center;
+ width: 16px;
+}
+.dijitComboBox .dijitArrowButtonInner {
+ display: block;
+}
+.dijit_a11y .dijitToggleButtonChecked .dijitToggleButtonIconChar {
+ display: inline !important;
+}
+.dijitLeft {
+
+ background-position:left top;
+ background-repeat:no-repeat;
+}
+.dijitStretch {
+
+ white-space:nowrap;
+ background-repeat:repeat-x;
+}
+.dijitRight {
+
+ #display:inline;
+ background-position:right top;
+ background-repeat:no-repeat;
+}
+.dijitToggleButton,
+.dijitButton,
+.dijitDropDownButton,
+.dijitComboButton {
+
+ margin: 0.2em;
+}
+.dijitToolbar .dijitToggleButton,
+.dijitToolbar .dijitButton,
+.dijitToolbar .dijitDropDownButton,
+.dijitToolbar .dijitComboButton {
+ margin: 0;
+}
+.dj_ie8 .dijitToolbar button,
+.dj_webkit .dijitToolbar button {
+
+ padding: 1px 2px;
+}
+.dj_ie .dijitToolbar .dijitComboBox{
+
+ vertical-align: middle;
+}
+.dj_ie .dijitComboButton {
+
+ margin-bottom: -3px;
+}
+.dj_webkit .dijitToolbar .dijitDropDownButton {
+ padding-left: 0.3em;
+}
+.dj_gecko .dijitToolbar .dijitButtonNode::-moz-focus-inner {
+ padding:0;
+}
+.dijitButtonNode {
+
+ border:1px solid gray;
+ margin:0;
+ line-height:normal;
+ vertical-align: middle;
+ #vertical-align: auto;
+ text-align:center;
+ white-space: nowrap;
+}
+.dijitButtonNode, .dijitButtonNode * {
+ cursor: pointer;
+}
+.dijitReadOnly *,
+.dijitDisabled *,
+.dijitReadOnly,
+.dijitDisabled,
+.dijitDisabledClickableRegion {
+ cursor: not-allowed !important;
+}
+.dj_ie .dijitButtonNode {
+
+ zoom: 1;
+}
+.dj_ie .dijitButtonNode button {
+
+ overflow: visible;
+}
+.dijitArrowButton {
+
+
+ padding: 0 .4em;
+}
+DIV.dijitArrowButton {
+ float: right;
+}
+.dijitSpinner .dijitInputLayoutContainer .dijitArrowButton {
+ border-style: solid;
+ border-width: 0 0 0 1px !important;
+ padding: 0;
+ position: absolute;
+ right: 0;
+ float: none;
+}
+.dijitSpinner .dijitInputLayoutContainer .dijitArrowButton {
+ position: absolute;
+ height: 50%;
+}
+.dijitSpinner .dijitInputLayoutContainer .dijitDownArrowButton {
+ top: auto;
+ bottom: 0;
+ border-top-width: 1px !important;
+}
+.dijitSpinner .dijitInputLayoutContainer .dijitUpArrowButton {
+ top: 0;
+ bottom: auto;
+}
+TABLE.dijitComboButton {
+
+ border-collapse: collapse;
+ border:0;
+ padding:0;
+ margin:0;
+}
+.dijitToolbar .dijitComboButton {
+
+ border-collapse: separate;
+}
+.dj_ie BUTTON.dijitButtonNode {
+ overflow: visible;
+}
+table .dijitButton .dijitButtonNode,
+table .dijitComboButton .dijitButtonNode {
+ #overflow:hidden;
+}
+.dijitButtonNode IMG {
+
+ vertical-align:middle;
+
+}
+.dijitTextBox,
+.dijitComboBox,
+.dijitSpinner {
+ border: solid black 1px;
+ #overflow: hidden;
+ width: 15em;
+ vertical-align: middle;
+ #vertical-align: auto;
+}
+.dijitTimeTextBox {
+ width: 8em;
+}
+.dijitTextBox input:focus,
+.dijitComboBox input:focus,
+.dijitSpinner input:focus {
+ outline: none;
+}
+.dijitTextBoxFocused,
+.dijitComboBoxFocused,
+.dijitSpinnerFocused, .dijitSpinnerUpArrowActive, .dijitSpinnerDownArrowActive,
+.dijitTextAreaFocused {
+
+ outline: auto 5px -webkit-focus-ring-color;
+}
+.dijitTextBox INPUT,
+.dijitComboBox INPUT,
+.dijitSpinner INPUT {
+ border-left: solid black 1px;
+ display:inline;
+ position:static !important;
+ border:0 !important;
+ margin:0 !important;
+ vertical-align:top !important;
+ background-color:transparent !important;
+ background-image:none !important;
+ width:100% !important;
+}
+.dijitValidationIcon {
+ visibility: hidden;
+ display: block;
+ padding: 0 2px;
+ float: right;
+ height: auto;
+}
+.dijitValidationIconText {
+ visibility: hidden;
+ display: none;
+ float:right;
+ font-family: sans-serif;
+ font-style:italic;
+ font-size: 0.75em;
+ padding-right: 0.15em;
+ line-height: 160%;
+}
+.dijit_a11y .dijitValidationIcon { display: none !important; }
+.dijit_a11y .dijitValidationIconText { display: block !important; }
+.dijitError .dijitValidationIcon,
+.dijitError .dijitValidationIconText {
+ visibility: visible;
+}
+.dijitTextBox .dijitArrowButton {
+
+ display:none;
+}
+.dijitCheckBox,
+.dijitRadio,
+.dijitCheckBoxInput {
+ padding: 0;
+ border: 0;
+ width: 16px;
+ height: 16px;
+ background-position:center center;
+ background-repeat:no-repeat;
+ overflow: hidden;
+}
+.dijitCheckBox INPUT,
+.dijitRadio INPUT {
+ margin: 0;
+ padding: 0;
+ display: block;
+}
+.dijitCheckBoxInput {
+
+ opacity: 0.01;
+}
+.dj_ie .dijitCheckBoxInput {
+ filter: alpha(opacity=0);
+}
+.dijit_a11y .dijitCheckBox,
+.dijit_a11y .dijitRadio {
+ width: auto;
+ height: auto;
+}
+.dijit_a11y .dijitCheckBoxInput {
+ opacity: 1;
+ filter: none;
+ width: auto;
+ height: auto;
+}
+.dijitProgressBarEmpty{
+
+ position:relative;overflow:hidden;
+ border:1px solid black;
+ z-index:0;
+}
+.dijitProgressBarFull {
+
+ position:absolute;
+ overflow:hidden;
+ z-index:-1;
+ top:0;
+ width:100%;
+}
+.dj_ie6 .dijitProgressBarFull {
+ height:1.6em;
+}
+.dijitProgressBarTile {
+
+ position:absolute;
+ overflow:hidden;
+ top:0;
+ left:0;
+ bottom:0;
+ right:0;
+ margin:0;
+ padding:0;
+ width:auto;
+ height:auto;
+ background-color:#aaa;
+ background-attachment: fixed;
+}
+.dijit_a11y .dijitProgressBarTile{
+
+ border-width:4px;
+ border-style:solid;
+ background-color:transparent !important;
+}
+.dj_ie6 .dijitProgressBarTile {
+
+ position:static;
+
+ height:1.6em;
+}
+.dijitProgressBarIndeterminate .dijitProgressBarLabel {
+ visibility:hidden;
+}
+.dijitProgressBarIndeterminate .dijitProgressBarTile {
+
+}
+.dijitProgressBarIndeterminateHighContrastImage {
+ display:none;
+}
+.dijit_a11y .dijitProgressBarIndeterminate .dijitProgressBarIndeterminateHighContrastImage {
+ display:block;
+ position:absolute;
+ top:0;
+ bottom:0;
+ margin:0;
+ padding:0;
+ width:100%;
+ height:auto;
+}
+.dijitProgressBarLabel {
+ display:block;
+ position:static;
+ width:100%;
+ text-align:center;
+ background-color:transparent !important;
+}
+.dijitTooltip {
+ position: absolute;
+ z-index: 2000;
+ display: block;
+
+ left: 50%;
+ top: -10000px;
+ overflow: visible;
+}
+.dijitTooltipContainer {
+ border: solid black 2px;
+ background: #b8b5b5;
+ color: black;
+ font-size: small;
+}
+.dijitTooltipFocusNode {
+ padding: 2px 2px 2px 2px;
+}
+.dijitTooltipConnector {
+ position: absolute;
+}
+.dijitTooltipData {
+ display:none;
+}
+.dijitLayoutContainer{
+ position: relative;
+ display: block;
+ overflow: hidden;
+}
+body .dijitAlignTop,
+body .dijitAlignBottom,
+body .dijitAlignLeft,
+body .dijitAlignRight {
+ position: absolute;
+ overflow: hidden;
+}
+body .dijitAlignClient { position: absolute; }
+.dijitBorderContainer, .dijitBorderContainerNoGutter {
+ position:relative;
+ overflow: hidden;
+}
+.dijitBorderContainerPane,
+.dijitBorderContainerNoGutterPane {
+ position: absolute !important;
+ z-index: 2;
+}
+.dijitBorderContainer > .dijitTextArea {
+
+ resize: none;
+}
+.dijitGutter {
+
+ position: absolute;
+ font-size: 1px;
+}
+.dijitSplitter {
+ position: absolute;
+ overflow: hidden;
+ z-index: 10;
+ background-color: #fff;
+ border-color: gray;
+ border-style: solid;
+ border-width: 0;
+}
+.dj_ie .dijitSplitter {
+ z-index: 1;
+}
+.dijitSplitterActive {
+ z-index: 11 !important;
+}
+.dijitSplitterCover{
+ position:absolute;
+ z-index:-1;
+ top:0;
+ left:0;
+ width:100%;
+ height:100%;
+}
+.dijitSplitterCoverActive{
+ z-index:3 !important;
+}
+.dj_ie .dijitSplitterCover{
+ background: white;
+ filter: alpha(opacity=0);
+}
+.dijitSplitterH {
+ height: 7px;
+ border-top:1px;
+ border-bottom:1px;
+ cursor: ns-resize;
+}
+.dijitSplitterV {
+ width: 7px;
+ border-left:1px;
+ border-right:1px;
+ cursor: ew-resize;
+}
+.dijitSplitContainer{
+ position: relative;
+ overflow: hidden;
+ display: block;
+}
+.dijitSplitPane{
+ position: absolute;
+}
+.dijitSplitContainerSizerH,
+.dijitSplitContainerSizerV {
+ position:absolute;
+ font-size: 1px;
+ cursor: move;
+ cursor: w-resize;
+ background-color: ThreeDFace;
+ border: 1px solid;
+ border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;
+ margin: 0;
+}
+.dijitSplitContainerSizerH .thumb, .dijitSplitterV .dijitSplitterThumb {
+ overflow:hidden;
+ position:absolute;
+ top:49%;
+}
+.dijitSplitContainerSizerV .thumb, .dijitSplitterH .dijitSplitterThumb {
+ position:absolute;
+ left:49%;
+}
+.dijitSplitterShadow,
+.dijitSplitContainerVirtualSizerH,
+.dijitSplitContainerVirtualSizerV {
+ font-size: 1px;
+ background-color: ThreeDShadow;
+ -moz-opacity: 0.5;
+ opacity: 0.5;
+ filter: Alpha(Opacity=50);
+ margin: 0;
+}
+.dj_ie .dijitSplitterV, .dijitSplitContainerVirtualSizerH {
+ cursor: w-resize;
+}
+.dj_ie .dijitSplitterH, .dijitSplitContainerSizerV, .dijitSplitContainerVirtualSizerV {
+ cursor: n-resize;
+}
+.dijit_a11y .dijitSplitterH {
+ border-top:1px solid #d3d3d3 !important;
+ border-bottom:1px solid #d3d3d3 !important;
+}
+.dijit_a11y .dijitSplitterV {
+ border-left:1px solid #d3d3d3 !important;
+ border-right:1px solid #d3d3d3 !important;
+}
+.dijitContentPane {
+ display: block;
+ overflow: auto;
+}
+.dijitContentPaneSingleChild {
+
+ overflow: hidden;
+}
+.dijitTitlePane {
+ display: block;
+ overflow: hidden;
+}
+.dijitColorPalette {
+ border:1px solid #999;
+ background:#fff;
+ -moz-border-radius:3pt;
+}
+img.dijitColorPaletteUnder {
+ border-style:none;
+ position:absolute;
+ left:0;
+ top:0;
+}
+.dijitColorPaletteInner {
+ position: relative;
+ overflow:hidden;
+ outline:0;
+}
+.dijitPaletteCell {
+ width: 20px;
+ height: 20px;
+ position: absolute;
+ overflow: hidden;
+ z-index: 10;
+ outline-width: 0;
+}
+.dijitPaletteImg {
+ width: 16px;
+ height: 14px;
+ position: absolute;
+ top: 1px;
+ left: 1px;
+ overflow: hidden;
+ cursor: default;
+ border:1px solid #999;
+
+}
+.dijitPaletteCellHighlight img {
+ width: 14px;
+ height: 12px;
+ position: absolute;
+ top: 1px;
+ left: 1px;
+ overflow: hidden;
+ cursor: default;
+ border:2px solid #000;
+ outline:1px solid #dedede;
+
+}
+.dijit_a11y .dijitPaletteCell {
+ background-color:transparent !important;
+}
+.dijit_a11y .dijitPaletteImg {
+ background-color:transparent !important;
+}
+.dijitAccordionContainer {
+ border:1px solid #b7b7b7;
+ border-top:0 !important;
+}
+.dj_webkit .dijitAccordionContainer div:focus {
+ outline:none;
+}
+.dj_ff3 .dijitAccordionContainer div:focus {
+ outline:none;
+}
+.dijitAccordionTitle {
+ cursor: pointer;
+}
+.dijitAccordionFocused {
+ text-decoration: underline;
+}
+.dijitAccordionTitle .arrowTextUp,
+.dijitAccordionTitle .arrowTextDown {
+ display: none;
+ font-size: 0.65em;
+ font-weight: normal !important;
+}
+.dijit_a11y .dijitAccordionTitle .arrowTextUp,
+.dijit_a11y .dijitAccordionTitle-selected .arrowTextDown {
+ display: inline;
+}
+.dijit_a11y .dijitAccordionTitle-selected .arrowTextUp {
+ display: none;
+}
+.dijitCalendarContainer thead tr th, .dijitCalendarContainer thead tr td, .dijitCalendarContainer tbody tr td, .dijitCalendarContainer tfoot tr td {
+ padding: 0;
+}
+.dijitCalendarNextYear {
+ margin:0 0 0 0.55em;
+}
+.dijitCalendarPreviousYear {
+ margin:0 0.55em 0 0;
+}
+.dijitCalendarIncrementControl {
+ vertical-align: middle;
+}
+.dijitCalendarDisabledDate {
+ color:gray !important;
+}
+.dijitCalendarPreviousMonthDisabled,
+.dijitCalendarCurrentMonthDisabled,
+.dijitCalendarNextMonthDisabled {
+ cursor:default !important
+}
+.dijitCalendarIncrementControl,
+.dijitCalendarBodyContainer tbody tr td,
+.dijitCalendarDateTemplate,
+.dijitCalendarContainer .dijitInline {
+ cursor:pointer;
+}
+.dijitSpacer {
+
+ position: relative;
+ height: 1px;
+ overflow: hidden;
+ visibility: hidden;
+}
+.dijitMenu {
+ border:1px solid black;
+ background-color:white;
+}
+.dijitMenuTable {
+ margin:1px 0;
+ border-collapse:collapse;
+ border-width:0;
+ background-color:white;
+}
+.dj_webkit .dijitMenuTable td[colspan="2"]{
+ border-right:hidden;
+}
+.dijitMenuItem{
+ text-align: left;
+ white-space: nowrap;
+ padding:.1em .2em;
+ cursor:pointer;
+}
+.dijitMenuPassive .dijitMenuItemHover,
+.dijitMenuItemSelected {
+
+ background-color:black;
+ color:white;
+}
+.dijitMenuItemIcon, .dijitMenuExpand {
+ background-repeat: no-repeat;
+}
+.dijitMenuItemDisabled * {
+
+ opacity:0.3;
+ cursor:default;
+}
+.dj_ie .dijit_a11y .dijitMenuItemDisabled td,
+.dj_ie .dijitMenuItemDisabled *,
+.dj_ie .dijitMenuItemDisabled td {
+ color:gray !important;
+ filter: alpha(opacity=35);
+}
+.dijitMenuItemLabel {
+ position: relative;
+ vertical-align: middle;
+}
+.dijit_a11y .dijitMenuItemSelected {
+ border: 1px #fff dotted !important;
+}
+.dj_ff3 .dijit_a11y .dijitMenuItem td {
+ padding: none !important;
+ background:none ! important;
+}
+.dijit_a11y .dijitMenuItemSelected .dijitMenuItemLabel {
+ border-width: 1px;
+ border-style: solid;
+}
+.dj_ie8 .dijit_a11y .dijitMenuItemLabel {
+ position:static;
+}
+.dijitMenuExpandA11y {
+ display: none;
+}
+.dijit_a11y .dijitMenuExpandA11y {
+ display: inline;
+}
+.dijitMenuSeparator td {
+ border: 0;
+ padding: 0;
+}
+.dijitMenuSeparatorTop {
+ height: 50%;
+ margin: 0;
+ margin-top:3px;
+ font-size: 1px;
+}
+.dijitMenuSeparatorBottom {
+ height: 50%;
+ margin: 0;
+ margin-bottom:3px;
+ font-size: 1px;
+}
+.dijitCheckedMenuItemIconChar {
+ vertical-align: middle;
+ visibility:hidden;
+}
+.dijitCheckedMenuItemChecked .dijitCheckedMenuItemIconChar {
+ visibility: visible;
+}
+.dijit_a11y .dijitCheckedMenuItemIconChar {
+ display:inline !important;
+}
+.dijit_a11y .dijitCheckedMenuItemIcon {
+ display: none;
+}
+.dijitStackController .dijitToggleButtonChecked * {
+ cursor: default;
+}
+.dijitTabContainerNoLayout {
+ width: 100%;
+}
+.dijitTabContainerBottom-tabs,
+.dijitTabContainerTop-tabs,
+.dijitTabContainerLeft-tabs,
+.dijitTabContainerRight-tabs {
+ overflow: visible !important;
+}
+.dijitTabContainerBottom-container,
+.dijitTabContainerTop-container,
+.dijitTabContainerLeft-container,
+.dijitTabContainerRight-container {
+ z-index:0;
+ overflow: hidden;
+ border: 1px solid black;
+}
+.dijitTabContainer .nowrapTabStrip {
+ width: 50000px;
+ display: block;
+ position: relative;
+}
+.dijitTabContainer .dijitTabListWrapper {
+ overflow: hidden;
+}
+.dijit_a11y .dijitTabContainer .tabStripButton img {
+
+ display: none;
+}
+.dijitTabContainerTop-tabs {
+ border-bottom: 1px solid black;
+}
+.dijitTabContainerTop-container {
+ border-top: 0px;
+}
+.dijitTabContainerLeft-tabs {
+ border-right: 1px solid black;
+ float: left;
+}
+.dijitTabContainerLeft-container {
+ border-left: 0px;
+}
+.dijitTabContainerBottom-tabs {
+ border-top: 1px solid black;
+}
+.dijitTabContainerBottom-container {
+ border-bottom: 0px;
+}
+.dijitTabContainerRight-tabs {
+ border-left: 1px solid black;
+ float: left;
+}
+.dijitTabContainerRight-container {
+ border-right: 0px;
+}
+div.dijitTabBtnDisabled, .dj_ie div.dijitTabBtnDisabled {
+ cursor: auto;
+}
+.dijitTab {
+ position:relative;
+ cursor:pointer;
+ white-space:nowrap;
+ z-index:3;
+}
+.dijitTab * {
+
+ vertical-align: middle;
+}
+.dijitTabChecked {
+ cursor: default;
+}
+.dijitTabButtonIcon {
+ height: 18px;
+}
+.dijitTabContainerTop-tabs .dijitTab {
+ top: 1px;
+}
+.dijitTabContainerBottom-tabs .dijitTab {
+ top: -1px;
+}
+.dijitTabContainerLeft-tabs .dijitTab {
+ left: 1px;
+}
+.dijitTabContainerRight-tabs .dijitTab {
+ left: -1px;
+}
+.dijitTabContainerTop-tabs .dijitTab,
+.dijitTabContainerBottom-tabs .dijitTab {
+
+ display:inline-block;
+ #zoom: 1;
+ #display:inline;
+}
+.dijitTabInnerDiv {
+ position:relative;
+}
+.tabStripButton {
+ z-index: 12;
+}
+.dijitTabButtonDisabled .tabStripButton {
+ display: none;
+}
+.dijitTab .closeButton {
+ margin-left: 1em;
+}
+.dijitTab .closeText {
+ display:none;
+}
+.dijit_a11y .closeText {
+ display:inline;
+ margin: 0px 6px;
+}
+.dijit_a11y .dijitTab .closeImage {
+ display:none;
+}
+.dijit_a11y .closeButton-hover .closeText {
+ border:thin solid;
+}
+.dijit_a11y .dijitTabChecked {
+ border-style:dashed !important;
+}
+.dijit_a11y .dijitTabInnerDiv {
+ border-left:none !important;
+ }
+.dijitTabPane,
+.dijitStackContainer-child,
+.dijitAccordionContainer-child {
+
+ border: none !important;
+}
+.dijitInlineEditor {
+
+ position:relative;
+ vertical-align:bottom;
+}
+.dj_ie .dijitInlineEditor {
+ vertical-align:middle;
+}
+.dijitInlineValue {
+
+}
+.dijitInlineEditor .dijitButtonContainer {
+
+ position:absolute;
+ right:0;
+ overflow:visible;
+}
+.dijitInlineEditor .saveButton,
+.dijitInlineEditor .cancelButton {
+}
+.dijitTreeIndent {
+
+ width: 19px;
+}
+.dijitTreeRow, .dijitTreeContent {
+ white-space: nowrap;
+}
+.dijitTreeRow img {
+
+ vertical-align: middle;
+}
+.dijitTreeContent {
+ cursor: default;
+}
+.dijitExpandoText {
+ display: none;
+}
+.dijit_a11y .dijitExpandoText {
+ display: inline;
+ padding-left: 10px;
+ padding-right: 10px;
+ font-family: monospace;
+ border-style: solid;
+ border-width: thin;
+ cursor: pointer;
+}
+.dijitTreeLabel {
+ margin: 0px 4px;
+}
+.dijitDialog {
+ position: absolute;
+ z-index: 999;
+ padding: 1px;
+ overflow: hidden;
+}
+.dijitDialogFixed div.dijitDialogTitleBar {
+ cursor:default;
+}
+.dijitDialogUnderlayWrapper {
+ position: absolute;
+ left: 0;
+ top: 0;
+ z-index: 998;
+ display: none;
+ background: transparent !important;
+}
+.dijitDialogUnderlay {
+ background: #eee;
+ opacity: 0.5;
+}
+.dj_ie .dijitDialogUnderlay {
+ filter: alpha(opacity=50);
+}
+.dijit_a11y .dijitInputLayoutContainer,
+.dijit_a11y .dijitDialog {
+ opacity: 1 !important;
+ background-color: white !important;
+}
+.dijitDialog .closeText {
+ display:none;
+
+ position:absolute;
+}
+.dijit_a11y .dijitDialog .closeText {
+ display:inline;
+}
+.dijitSliderMoveable {
+ z-index:99;
+ position:absolute !important;
+ display:block;
+ vertical-align:middle;
+}
+.dijitSliderMoveableH {
+ right:0;
+}
+.dijit_a11y div.dijitSliderImageHandle,
+.dijitSliderImageHandle {
+ margin:0;
+ padding:0;
+ position:absolute !important;
+ border:8px solid gray;
+ width:0;
+ height:0;
+}
+.dijit_a11y .dijitSliderFocused .dijitSliderImageHandle {
+ border:4px solid #000;
+ height:8px;
+ width:8px;
+}
+.dijitSliderImageHandleV {
+ top:-8px;
+ left:-6px;
+}
+.dijitSliderImageHandleH {
+ left:-8px;
+ top:-5px;
+ vertical-align:top;
+}
+.dijitSliderBar {
+ border-style:solid;
+ border-color:black;
+}
+.dijitSliderBarContainerV {
+ position:relative;
+ height:100%;
+ z-index:1;
+}
+.dijitSliderBarContainerH {
+ position:relative;
+ z-index:1;
+}
+.dijitSliderBarH {
+ height:4px;
+ border-width:1px 0;
+}
+.dijitSliderBarV {
+ width:4px;
+ border-width:0 1px;
+}
+.dijitSliderProgressBar {
+ background-color:red;
+ z-index:1;
+}
+.dijitSliderProgressBarV {
+ position:static !important;
+ height:0%;
+ vertical-align:top;
+ text-align:left;
+}
+.dijitSliderProgressBarH {
+ position:absolute !important;
+ width:0%;
+ vertical-align:middle;
+ overflow:visible;
+}
+.dijitSliderRemainingBar {
+ overflow:hidden;
+ background-color:transparent;
+ z-index:1;
+}
+.dijitSliderRemainingBarV {
+ height:100%;
+ text-align:left;
+}
+.dijitSliderRemainingBarH {
+ width:100% !important;
+}
+.dijitSliderBumper {
+ overflow:hidden;
+ z-index:1;
+}
+.dijitSliderBumperV {
+ width:4px;
+ height:8px;
+ border-width:0 1px;
+}
+.dijitSliderBumperH {
+ width:8px;
+ height:4px;
+ border-width:1px 0;
+}
+.dijitSliderBottomBumper,
+.dijitSliderLeftBumper {
+ background-color:red;
+}
+.dijitSliderTopBumper,
+.dijitSliderRightBumper {
+ background-color:transparent;
+}
+.dijitSliderDecorationH {
+ text-align:center;
+}
+.dijitSlider .dijitSliderButton {
+ font-family:monospace;
+ margin:0;
+ padding:0;
+ display:block;
+}
+.dijit_a11y .dijitSliderButtonInner {
+ visibility:visible !important;
+}
+.dijitSliderButtonContainer {
+ text-align:center;
+ height:0;
+}
+.dijitSlider .dijitButtonNode {
+ padding:0;
+ display:block;
+}
+.dijitRuleContainer {
+ position:relative;
+ overflow:visible;
+}
+.dijitRuleContainerV {
+ height:100%;
+ line-height:0;
+ float:left;
+ text-align:left;
+}
+.dj_opera .dijitRuleContainerV {
+ line-height:2%;
+}
+.dj_ie .dijitRuleContainerV {
+ line-height:normal;
+}
+.dj_gecko .dijitRuleContainerV {
+ margin:0 0 1px 0;
+}
+.dijitRuleMark {
+ position:absolute;
+ border:1px solid black;
+ line-height:0;
+ height:100%;
+}
+.dijitRuleMarkH {
+ width:0;
+ border-top-width:0 !important;
+ border-bottom-width:0 !important;
+ border-left-width:0 !important;
+}
+.dijitRuleLabelContainer {
+ position:absolute;
+}
+.dijitRuleLabelContainerH {
+ text-align:center;
+ display:inline-block;
+}
+.dijitRuleLabelH {
+ position:relative;
+ left:-50%;
+}
+.dijitRuleMarkV {
+ height:0;
+ border-right-width:0 !important;
+ border-bottom-width:0 !important;
+ border-left-width:0 !important;
+ width:100%;
+ left:0;
+}
+.dj_ie .dijitRuleLabelContainerV {
+ margin-top:-.55em;
+}
+.dijit_a11y .dijitButtonContents .dijitButtonText,
+.dijit_a11y .dijitTab .tabLabel {
+ display: inline !important;
+}
+.dj_ie7 .dijitButtonNode > BUTTON.dijitButtonContents > * {
+ position: relative;
+}
+.dijitTextArea {
+ width:100%;
+ overflow-y: auto;
+}
+.dijitTextArea[cols] {
+ width:auto;
+}
+.dj_ie .dijitTextAreaCols {
+ width:auto;
+}
+.dijitTextArea > DIV {
+ text-decoration:none;
+ overflow:auto;
+ min-height: 1.40em;
+}
+.dj_ie .dijitTextArea p {
+ margin-top:0;
+ margin-bottom:0;
+ line-height: normal !important;
+}
+.dijitToolbarSeparator {
+ height: 18px;
+ width: 5px;
+ padding: 0 1px;
+ margin: 0;
+}
+.dijitIEFixedToolbar {
+ position:absolute;
+
+ top: expression(eval((document.documentElement||document.body).scrollTop));
+}
+.RichTextEditable {
+ display: block;
+}
+.dijitTimePickerItemInner {
+ text-align:center;
+ border:0;
+ padding:2px 8px 2px 8px;
+}
+.dijitTimePickerTick,
+.dijitTimePickerMarker {
+ border-bottom:1px solid gray;
+}
+.dijitTimePicker .dijitDownArrowButton {
+ border-top: none !important;
+}
+.dijitTimePickerTick {
+ color:#CCC;
+}
+.dijitTimePickerMarker {
+ color:black;
+ background-color:#CCC;
+}
+.dijitTimePickerItemSelected {
+ font-weight:bold;
+ color:#333;
+ background-color:#b7cdee;
+}
+.dijitTimePickerItemHover {
+ background-color:gray;
+ color:white;
+ cursor:pointer;
+}
+.dijit_a11y .dijitTimePickerItem {
+ border-bottom:1px solid #333;
+}
+.dijitToggleButtonIconChar {
+ display:none !important;
+}
+.dijit_a11y .dijitToggleButtonIconChar {
+ display:inline !important;
+}
+.dijit_a11y .dijitToggleButtonIconChar {
+ visibility:hidden;
+}
+.dijit_a11y .dijitToggleButtonChecked .dijitToggleButtonIconChar {
+ visibility:visible !important;
+}
+.dijitArrowButtonChar {
+ display:none !important;
+}
+.dijit_a11y .dijitArrowButtonChar {
+ display:inline !important;
+}
+.dijitInputLayoutContainer {
+ position: relative;
+ overflow: hidden;
+}
+.dijitSpinnerButtonContainer {
+ float: right;
+ width: 18px;
+ position: relative;
+ overflow: hidden;
+}
+.dijitSpinner .dijitInputLayoutContainer .dijitArrowButton {
+ height: 50%;
+ width: 16px;
+ overflow: hidden;
+}
+.dijitSpinner .dijitInputLayoutContainer .dijitArrowButtonInner {
+ overflow: hidden;
+ line-height: 50%;
+}
+.dijit_a11y .dijitSpinner .dijitInputLayoutContainer .dijitArrowButton {
+ width: 100%;
+}
+.dijit_a11y .dijitSpinner .dijitArrowButton .dijitArrowButtonChar {
+ font-size: 0.4em;
+ vertical-align: top;
+}
+.dijit_a11y .dijitSpinnerButtonContainer {
+ width: 0.5em;
+ margin-left: 2px;
+ overflow: visible;
+}
+.dijit_a11y .dijitSpinnerButtonContainer .dijitButtonNode {
+ border-width: 1px 0px 0px 1px;
+ border-style: solid !important;
+}
+.dijitSelect {
+ margin: 0.2em;
+}
+.dj_ie .dijitSelect,
+.dj_ie7 .dijitSelect,
+.dj_iequirks .dijitSelect {
+ vertical-align: middle;
+}
+.dj_ie8 .dijitSelect .dijitButtonText {
+ vertical-align: top;
+}
+.dijitSelect .dijitButtonNode {
+ text-align: left;
+}
+.dijitRtl .dijitSelect .dijitButtonNode {
+ text-align: right;
+}
+.dijitToolbar .dijitSelect {
+ margin: 0;
+}
+.dj_webkit .dijitToolbar .dijitSelect {
+ padding-left: 0.3em;
+}
+.dijit_a11y .dijitSelectDisabled .dijitButtonNode {
+ border-style: outset!important;
+ border-width: medium!important;
+ border-color: #999 !important;
+ color:#999 !important;
+}
+.dijitSelect .dijitButtonContents {
+ padding: 0px;
+ background: transparent none;
+}
+.dijitSelectFixedWidth .dijitButtonContents {
+ width: 100%;
+}
+.dijitSelect .dijitArrowButton {
+ width: 16px;
+}
+.dj_ie6 .dijitSelectMenu .dijitMenuItemLabel,
+.dj_ie7 .dijitSelectMenu .dijitMenuItemLabel {
+
+ position: static;
+}
+.dijitSelectLabel *
{
- width:16px;
- height:16px;
- overflow:hidden;
- margin:0; padding:0;
- background-image: url('images/arrows.png');
- background-repeat: none;
-}
-
-.soria .dijitCheckBoxIcon,
-.soria .dijitRadioIcon,
-.soria .dijitCheckBox,
-.soria .dijitRadio {
- width:16px;
- height:16px;
- margin:0; padding:0;
- background-image: url('images/arrows.png');
-}
-
-/* Control opacity of popups */
-.soria .dijitPopup div,
-.soria .dijitPopup table {
- opacity: 0.95;
-}
-/*
- dijit.form.Button
- dijit.form.DropDownButton
- dijit.form.ComboButton
- dijit.form.ComboBox (partial)
-*/
+ vertical-align: baseline;
+}
+.dijitSelectSelectedOption * {
+ font-weight: bold;
+}
+.dijitSelectMenu {
+ border-width: 1px;
+}
+.dijitSelect .dijitButtonContents {
+ white-space: nowrap;
+}
+.dijitSelectMenu .dijitMenuTable {
+ margin: 0px;
+ background-color: transparent;
+}
+.dijitTextBoxReadOnly,
+.dijitComboBoxReadOnly,
+.dijitSpinnerReadOnly,
+.dijitTextAreaReadOnly,
+.dijitTextBoxDisabled,
+.dijitComboBoxDisabled,
+.dijitSpinnerDisabled,
+.dijitTextAreaDisabled {
+ color: gray;
+}
+.dj_webkit .dijitTextBoxDisabled INPUT,
+.dj_webkit .dijitComboBoxDisabled INPUT,
+.dj_webkit .dijitSpinnerDisabled INPUT {
+ color: #eee;
+}
+.dj_webkit INPUT.dijitTextBoxDisabled,
+.dj_webkit TEXTAREA.dijitTextAreaDisabled {
+ color: #333;
+}
+.dijit_a11y .dijitSliderReadOnly,
+.dijit_a11y .dijitSliderDisabled {
+ opacity:0.6;
+}
+.dj_ie .dijit_a11y .dijitSliderReadOnly .dijitSliderBar,
+.dj_ie .dijit_a11y .dijitSliderDisabled .dijitSliderBar {
+ filter: alpha(opacity=40);
+}
+.dijit_a11y .dijitSlider .dijitSliderButtonContainer DIV {
+ font-family: monospace;
+ font-size: 1em;
+ line-height: 1em;
+ height: auto;
+ width: auto;
+ margin: 0px 4px;
+}
+.dijitForceStatic {
+ position: static !important;
+}
+.soria .dojoDndItemBefore {
+ border-top: 2px solid #369;
+}
+.soria .dojoDndItemAfter {
+ border-bottom: 2px solid #369;
+}
+.soria .dojoDndItemOver {
+ cursor:pointer;
+}
+.soria table.dojoDndAvatar { -moz-border-radius: 0; border: 1px solid #ccc; border-collapse: collapse; background-color: #fff; font-size: 75%; color: black;}
+.soria .dojoDndAvatar td { border: none; }
+.soria .dojoDndAvatar tr { border: none; }
+.soria .dojoDndAvatarHeader td { height: 20px; padding: 0 0 0 21px; }
+.soria .dojoDndAvatarItem td { padding: 2px;}
+.soria.dojoDndMove .dojoDndAvatarHeader {background-color: #f58383; background-image: url(images/dndNoMove.png); background-repeat: no-repeat; background-position: 2px center;}
+.soria.dojoDndCopy .dojoDndAvatarHeader {background-color: #f58383; background-image: url(images/dndNoCopy.png); background-repeat: no-repeat; background-position: 2px center;}
+.soria.dojoDndMove .dojoDndAvatarCanDrop .dojoDndAvatarHeader {background-color: #97e68d; background-image: url(images/dndMove.png); background-repeat: no-repeat; background-position: 2px center;}
+.soria.dojoDndCopy .dojoDndAvatarCanDrop .dojoDndAvatarHeader {background-color: #97e68d; background-image: url(images/dndCopy.png); background-repeat: no-repeat; background-position: 2px center;}
+.soria .dijitContentPane {
+ padding: 0px;
+}
+.soria .dijitTabContainerTop-dijitContentPane,
+.soria .dijitTabContainerLeft-dijitContentPane,
+.soria .dijitTabContainerBottom-dijitContentPane,
+.soria .dijitTabContainerRight-dijitContentPane,
+.soria .dijitAccordionContainer-dijitContentPane {
+ background-color: #fff;
+ padding: 5px;
+}
+.soria .dijitSplitContainer-dijitContentPane,
+.soria .dijitBorderContainer-dijitContentPane {
+ background-color: #fff;
+ padding: 5px;
+}
+ .soria .dijitTabContainer .tabStripRBtn {
+ margin-right: 21px;
+}
+ .soria .dijitTabContainer .tabStripLBtn {
+ margin-left: 21px;
+}
+ .soria .nowrapTabStrip .dijitTab {
+ top: 2px;
+}
+ .soria .dijitTabContainerBottom-tabs .dijitTab {
+ top: -1px;
+ bottom: 2px;
+}
+ .soria .dijitTabContainer .tabStripMenuButton-Hover {
+ cursor: pointer;
+}
+.soria .dijitTabPaneWrapper {
+ background:#fff;
+ border:1px solid #B1BADF;
+ margin: 0;
+ padding-left: 0px;
+}
+.soria .dijitTabInnerDiv {
+ padding:0px 3px 0px 0px;
+ margin: 0 0 0 4px;
+ background: url(images/tabContainerSprite.gif) no-repeat;
+ background-position: right -400px;
+}
+.soria .dijitTab {
+ line-height:normal;
+ margin:0 2px 0 0;
+ padding:0px;
+ background: url(images/tabContainerSprite.gif) no-repeat 0 -300px;
+ color: #243C5F;
+ border-bottom: 1px #B1BADF solid;
+}
+.soria .dijitTabInnerDiv .dijitTabContent {
+ padding:4px 3px 2px 4px;
+ background: url(images/tabContainerSprite.gif) repeat-x 0 -350px;
+ position: relative;
+}
+.soria .dijitTabListWrapper {
+ z-index: 10;
+}
+.soria .dijitTabHover {
+ color: #243C5F;
+ background: url(images/tabContainerSprite.gif) no-repeat 0px -150px;
+}
+.soria .dijitTabHover .dijitTabInnerDiv {
+ background: url(images/tabContainerSprite.gif) no-repeat right -250px;
+}
+.soria .dijitTabHover .dijitTabInnerDiv .dijitTabContent {
+ background: url(images/tabContainerSprite.gif) repeat-x 0 -200px;
+}
+.soria .dijitTabChecked,
+.soria .dijitTabCloseButtonChecked
+{
+
+ background: url(images/tabContainerSprite.gif) no-repeat 0px -0px;
+}
+.soria .dijitTabChecked .dijitTabInnerDiv {
+ background: url(images/tabContainerSprite.gif) no-repeat right -100px;
+}
+.soria .dijitTabChecked .dijitTabInnerDiv .dijitTabContent {
+ background: url(images/tabContainerSprite.gif) repeat-x 0 -50px;
+ color: #243C5F !important;
+}
+.soria .dijitTabContainerTabListNested {
+ background: #F0F4FC;
+ background: #D9E9F9;
+ border: none;
+}
+.soria .dijitTabContainerTabListNested .dijitTab {
+ background: none;
+ border: none;
+ top: 0px;
+}
+.soria .dijitTabContainerTabListNested .dijitTab .dijitTabInnerDiv,
+.soria .dijitTabContainerTabListNested .dijitTab .dijitTabContent {
+ background: none;
+}
+.soria .dijitTabContainerTabListNested .dijitTabHover .dijitTabContent .tabLabel {
+ text-decoration: underline;
+}
+.soria .dijitTabContainerTabListNested .dijitTabChecked .tabLabel {
+ text-decoration: underline;
+ font-weight: bold;
+}
+.soria .dijitTabContainerSpacerNested .dijitTabSpacer {
+
+ height: 0px;
+}
+.soria .dijitTabPaneWrapperNested {
+ border: none;
+}
+.soria .dijitTab .closeImage {
+ width: 15px;
+ height: 15px;
+ background: url(images/spriteRoundedIconsSmall.png) no-repeat -60px top;
+ margin-top: -1px;
+}
+.dj_ie6 .soria .dijitTab .dijitClosable .closeImage {
+ background: url(images/spriteRoundedIconsSmall.gif) no-repeat -60px top;
+}
+.soria .dijitTab .closeButton-hover .closeImage {
+ background: url(images/spriteRoundedIconsSmall.png) no-repeat -60px -15px;
+}
+.dj_ie6 .soria .dijitTab .closeButton-hover .closeImage {
+ background: url(images/spriteRoundedIconsSmall.gif) no-repeat -60px -15px;
+}
+.soria .dijitTab .tabLabel {
+
+ min-height: 15px;
+ display: inline-block;
+}
+.dj_ie6 .soria .dijitTabButtonIcon {
+
+ height: 18px;
+ width: 1px;
+}
+.soria .dijitTabContainerTop-tabs {
+ border-color: #B1BADF;
+ padding-left: 3px;
+}
+.soria .dijitTabContainerTopNoStrip {
+ padding-top: 3px;
+}
+.soria .dijitTabContainerTop-container {
+ border-top: none;
+}
+.soria .dijitTabContainerTop .dijitTabListWrapper {
+ border-bottom: none;
+}
+.soria .dijitTabContainerTop-tabs .dijitTab {
+ top: 1px;
+}
+.soria .dijitTabContainerTop-tabs .dijitTabChecked {
+ border-bottom-color: #94b4e6;
+}
+.soria .dijitTabContainerTopStrip {
+ border: 1px solid #B1BADF;
+ margin-top: 1px;
+ padding-top: 1px;
+ background: #F0F4FC;
+}
+.soria .dijitTabContainerTopStrip .dijitTabContainerTop-tabs {
+ padding-left: 3px;
+}
+.soria .dijitTabContainerNested .dijitTabListWrapper {
+ height: auto;
+}
+.soria .dijitTabContainerBottom-tabs {
+ margin-top: -1px;
+ padding-left: 3px;
+ border-top: 1px solid #B1BADF;
+}
+.soria .dijitTabContainerBottom .dijitTabListWrapper {
+ border-top: none;
+ padding-top: 1px;
+ padding-bottom: 1px;
+ float: left;
+}
+.soria .dijitTabContainerBottom-container {
+ border-bottom: none;
+}
+.soria .dijitTabContainerBottom-tabs .dijitTab {
+ border-bottom: none;
+ border-top: 1px solid #B1BADF;
+ background: url(images/tabBottomEnabledSpriteLR.gif) no-repeat bottom left;
+}
+.soria .dijitTabContainerBottom-tabs .dijitTabChecked {
+ border-top-color:#94b4e6;
+}
+.soria .dijitTabContainerBottom-tabs .dijitTabInnerDiv .dijitTabContent {
+ padding-top: 3px;
+ padding-bottom: 3px;
+ background: url(images/tabBottomEnabledC.gif) repeat-x bottom left;
+}
+.soria .dijitTabContainerBottom-tabs .dijitTabInnerDiv {
+ background: url(images/tabBottomEnabledSpriteLR.gif) no-repeat bottom right;
+}
+.soria .dijitTabContainerBottom-tabs .dijitTabHover {
+ color: #243C5F;
+ background: url(images/tabBottomHoverSpriteLR.gif) no-repeat bottom left;
+}
+.soria .dijitTabContainerBottom-tabs .dijitTabHover .dijitTabInnerDiv {
+ background: url(images/tabBottomHoverSpriteLR.gif) no-repeat bottom right;
+}
+.soria .dijitTabContainerBottom-tabs .dijitTabHover .dijitTabInnerDiv .dijitTabContent {
+ background: url(images/tabBottomHoverC.gif) repeat-x bottom left;
+}
+.soria .dijitTabContainerBottom-tabs .dijitTabChecked,
+.soria .dijitTabContainerBottom-tabs .dijitTabCloseButtonChecked
+{
+
+ background: url(images/tabBottomActiveSpriteLR.gif) no-repeat bottom left;
+}
+.soria .dijitTabContainerBottom-tabs .dijitTabChecked .dijitTabInnerDiv {
+ background: url(images/tabBottomActiveSpriteLR.gif) no-repeat bottom right;
+}
+.soria .dijitTabContainerBottom-tabs .dijitTabChecked .dijitTabInnerDiv .dijitTabContent {
+ background: url(images/tabBottomActiveC.gif) repeat-x bottom left;
+}
+.soria .dijitTabContainerBottomStrip {
+ padding-bottom: 2px;
+ border: 1px solid #B1BADF;
+}
+.soria .dijitTabContainerBottomStrip {
+ background: #F0F4FC;
+}
+.soria .dijitTabContainerBottom-spacer,
+.soria .dijitTabContainerTop-spacer {
+ height: 2px;
+ border: 1px solid #8ba0bd;
+ background: #94b4e6;
+}
+.soria .dijitTabContainerTop-spacer {
+ border-top: none;
+}
+.soria .dijitTabContainerBottom-spacer {
+ border-bottom: none;
+}
+.soria .dijitTabContainerRight-tabs {
+ height: 100%;
+ border-color: #ccc;
+ padding-top: 3px;
+}
+.soria .dijitTabContainerRight-container {
+ border-right: none;
+}
+.soria .dijitTabContainerRight-tabs .dijitTab {
+ border-bottom: none;
+ border-left: 1px solid #B1BADF;
+ border-bottom: 1px solid #B1BADF !important;
+}
+.dj_ie6 .soria .dijitTabContainerRight-tabs .dijitTabInnerDiv,
+.dj_ie7 .soria .dijitTabContainerRight-tabs .dijitTabInnerDiv {
+ border-bottom: solid #B1BADF 1px;
+ margin-bottom: -1px;
+}
+.soria .dijitTabContainerRight-tabs .dijitTabChecked {
+ border-left-color: #94b4e6;
+}
+.soria .dijitTabContainerRight-tabs .dijitTabChecked {
+ background: url(images/tabRightChecked.gif) no-repeat left top !important;
+}
+.dj_ie6 .soria .dijitTabContainerRight-tabs .dijitTabChecked .dijitTabInnerDiv,
+.dj_ie7 .soria .dijitTabContainerRight-tabs .dijitTabChecked .dijitTabInnerDiv,
+.dj_ie6 .soria .dijitTabContainerRight-tabs .dijitTabCheckedHover .dijitTabInnerDiv,
+.dj_ie7 .soria .dijitTabContainerRight-tabs .dijitTabCheckedHover .dijitTabInnerDiv {
+ border-bottom: solid #94b4e6 1px;
+ margin-bottom: -1px;
+}
+.soria .dijitTabContainerRight-tabs .dijitTab {
+ background: url(images/tabContainerSprite.gif) no-repeat left -350px;
+}
+.soria .dijitTabContainerRight-tabs .dijitTabHover .dijitTab {
+ background: url(images/tabContainerSprite.gif) no-repeat left -200px;
+}
+.soria .dijitTabContainerRightStrip {
+ padding-right: 2px;
+ border: 1px solid #B1BADF;
+ background: #F0F4FC;
+ border-left: none;
+}
+.soria .dijitTabContainerLeft-tabs {
+ border-color: #ccc;
+ padding-top: 3px;
+ height: 100%;
+}
+.soria .dijitTabContainerLeft-container {
+ border-left: none;
+}
+.soria .dijitTabContainerLeft-tabs .dijitTab {
+ border-right: 1px solid #B1BADF;
+ border-bottom: 1px solid #B1BADF;
+}
+.soria .dijitTabContainerLeft-tabs .dijitTabChecked {
+ border-right: 1px solid #94b4e6;
+}
+.soria .dijitTabContainerLeft-tabs .dijitTabInnerDiv {
+ background: url(images/tabContainerSprite.gif) no-repeat right -350px;
+}
+.soria .dijitTabContainerLeft-tabs .dijitTabHover .dijitTabInnerDiv {
+ background: url(images/tabContainerSprite.gif) no-repeat right -200px;
+}
+.soria .dijitTabContainerLeft-tabs .dijitTabChecked .dijitTabInnerDiv,
+.soria .dijitTabContainerLeft-tabs .dijitTabCheckedHover .dijitTabInnerDiv {
+ background: url(images/tabLeftChecked.gif) no-repeat right top;
+}
+.dj_ie6 .soria .dijitTabContainerLeft-tabs .dijitTabInnerDiv,
+.dj_ie7 .soria .dijitTabContainerLeft-tabs .dijitTabInnerDiv {
+ border-bottom: solid #B1BADF 1px;
+ margin-bottom: -1px;
+}
+.dj_ie6 .soria .dijitTabContainerLeft-tabs .dijitTabChecked .dijitTabInnerDiv,
+.dj_ie7 .soria .dijitTabContainerLeft-tabs .dijitTabChecked .dijitTabInnerDiv,
+.dj_ie6 .soria .dijitTabContainerLeft-tabs .dijitTabCheckedHover .dijitTabInnerDiv,
+.dj_ie7 .soria .dijitTabContainerLeft-tabs .dijitTabCheckedHover .dijitTabInnerDiv {
+ border-bottom: solid #94b4e6 1px;
+ margin-bottom: -1px;
+}
+.soria .dijitTabContainerLeftStrip {
+ padding-left: 2px;
+ border: 1px solid #B1BADF;
+ background: #F0F4FC;
+ border-right: none;
+}
+.soria .dijitTabContainerLeft-tabs .dijitTab,
+.soria .dijitTabContainerRight-tabs .dijitTab {
+ margin-right:auto;
+ margin-bottom:2px;
+}
+.soria .dijitTabContainerLeft-spacer,
+.soria .dijitTabContainerRight-spacer {
+ width: 2px;
+ border: 1px solid #8ba0bd;
+ background: #94b4e6;
+}
+.soria .dijitTabContainerLeft-spacer {
+ border-left: none;
+}
+.soria .dijitTabContainerRight-spacer {
+ border-right: none;
+}
+.soria .dijitTabContainerTop-dijitContentPane .dijitTabContainerTop-tabs {
+ border-left: 0px solid #ccc;
+ border-top: 0px solid #ccc;
+ border-right: 0px solid #ccc;
+ padding-top: 0px;
+ padding-left: 0px;
+}
+.soria .dijitTabContainer .tabStripButton {
+ margin-right: 0;
+}
+.soria .dijitTabContainer .tabStripButton-top {
+ margin-top: 1px;
+}
+.soria .tabStripButton .dijitTabContent{
+ padding: 6px 0 5px 0;
+}
+.dj_ie6 .soria .tabStripButton .dijitTabContent,
+.dj_ie7 .soria .tabStripButton .dijitTabContent {
+ padding-top: 7px;
+}
+.soria .tabStrip-disabled .tabStripButton .dijitTabContent {
+ padding: 5px 0 3px 0;
+}
+.dj_ie6 .soria .tabStrip-disabled .tabStripButton .dijitTabContent,
+.dj_ie7 .soria .tabStrip-disabled .tabStripButton .dijitTabContent {
+ padding-top: 6px;
+}
+.soria .dijitTabContainer .tabStripButton-bottom {
+ background: transparent url(images/tabBottomEnabledSpriteLR.gif) no-repeat scroll left bottom;
+ border-bottom: medium none;
+ border-top: 1px solid #B1BADF;
+}
+.soria .dijitTabContainer .tabStripButton-bottom .dijitTabInnerDiv {
+ background: transparent url(images/tabBottomEnabledSpriteLR.gif) no-repeat scroll right bottom;
+}
+.soria .dijitTabContainer .tabStripButton-bottom .dijitTabContent {
+ background: transparent;
+}
+.soria .dijitTabContainer .tabStripButton {
+
+ width: 21px;
+}
+.soria .dijitTabContainer .tabStripButton img {
+ height: 14px;
+ background: url(images/spriteRoundedIconsSmall.png) no-repeat;
+}
+.dj_ie6 .soria .dijitTabContainer .tabStripButton img {
+ background-image: url(images/spriteRoundedIconsSmall.gif);
+}
+.soria .dijitTabContainer .tabStripMenuButton img {
+ background-position: -15px top;
+}
+.soria .dijitTabContainer .tabStripSlideButtonLeft img {
+ background-position: 0px top;
+}
+.soria .dijitTabContainer .tabStripSlideButtonRight img {
+ background-position: -30px top;
+}
+.soria .dijitAccordionContainer {
+ border-color: #b1badf;
+ background-color: #fff;
+}
+.soria .dijitAccordionTitle {
+ background:#fafafa url(images/titleBar.png) repeat-x top left;
+ border-top: 1px solid #b9bbdd;
+ padding: 5px 4px 6px 8px;
+ cursor:pointer;
+ font-size: 0.9em;
+ font-weight: bold;
+ color: #373941;
+}
+.soria .dijitAccordionTitle-selected {
+ background: #f9f9f9 url(images/accordionItemActive.png) top repeat-x;
+ font-weight: bold;
+ border-top: 1px solid #b9bbdd;
+ border-bottom: 1px solid #b9bbdd;
+ padding: 5px 4px 5px 8px;
+ cursor: default;
+ color: #243C5F;
+}
+.soria .dijitAccordionArrow {
+ background:url(images/spriteRoundedIconsSmallBl.gif) no-repeat -30px top;
+ width:15px;
+ height:15px;
+ margin-top:-1px;
+}
+.soria .dijitAccordionTitle-selected .dijitAccordionArrow {
+ background:url(images/spriteRoundedIconsSmallBl.gif) no-repeat -15px top;
+ margin-top:-1px;
+}
+.soria .dijitAccordionText {
+ margin-left: 4px;
+ margin-right: 4px;
+}
+.soria .dijitSplitContainerSizerH {
+ background:url(images/splitContainerSizerV.png) repeat-y #cddef4;
+ border:0;
+ border-left:0px solid #436496;
+ border-right:0px solid #436496;
+ width:5px;
+}
+.soria .dijitSplitContainerSizerH .thumb {
+ background:url(images/splitContainerSizerV-thumb.png) no-repeat #ccc;
+ left:1px;
+ width:2px;
+ height:19px;
+}
+.soria .dijitSplitContainerSizerV {
+ background:url(images/splitContainerSizerH.png) repeat-x #cddef4;
+ border:0;
+ border-top:0px solid #436496;
+ border-bottom:0px solid #436496;
+ height:2px;
+}
+.soria .dijitSplitContainerSizerV .thumb {
+ background:url(images/splitContainerSizerH-thumb.png) no-repeat #ccc;
+ top:1px;
+ width:19px;
+ height:5px;
+}
+.soria .dijitBorderContainer {
+ background-color: #e1ebfb;
+ padding: 5px;
+}
+.soria .dijitSplitContainer-child,
+.soria .dijitBorderContainer-child {
+
+ border: 1px #b1badf solid;
+}
+.soria .dijitBorderContainer-dijitTabContainerTop,
+.soria .dijitBorderContainer-dijitTabContainerBottom,
+.soria .dijitBorderContainer-dijitTabContainerLeft,
+.soria .dijitBorderContainer-dijitTabContainerRight {
+
+ border: none;
+}
+.soria .dijitBorderContainer-dijitBorderContainer {
+
+ border: none;
+ padding: 0px;
+}
+.soria .dijitSplitterH,
+.soria .dijitGutterH {
+ background: #E1EBFB;
+ border:0;
+ border-left:0px solid #d3d3d3;
+ border-right:0px solid #d3d3d3;
+ height:5px;
+}
+.soria .dijitSplitterH .dijitSplitterThumb {
+ background:#B0B0B0 none;
+ height:1px;
+ top:2px;
+ width:19px;
+}
+.soria .dijitSplitterV,
+.soria .dijitGutterV {
+ background: #E1EBFB;
+ border:0;
+ border-top:0px solid #d3d3d3;
+ border-bottom:0px solid #d3d3d3;
+ width:5px;
+}
+.soria .dijitSplitterV .dijitSplitterThumb {
+ background:#B0B0B0 none;
+ height:19px;
+ left:2px;
+ width:1px;
+}
+.soria .dijitSplitterActive {
+ font-size: 1px;
+ background-image: none;
+ background-color: #aaa;
+ -moz-opacity: 0.6;
+ opacity: 0.6;
+ filter: Alpha(Opacity=60);
+ margin: 0;
+}
+.soria .dijitInputField INPUT,
+.soria .dijitTextBox,
+.soria .dijitComboBox,
+.soria .dijitSpinner {
+ margin: 0em 0.1em;
+}
+.soria .dijitTextBox,
+.soria .dijitComboBox,
+.soria .dijitSpinner,
+.soria .dijitInlineEditor input,
+.soria .dijitTextArea {
+
+ background:#fff url(images/validationInputBg.png) repeat-x top left;
+ border:1px solid #8ba0bd;
+ line-height: normal;
+}
+.dj_ie6 .soria .dijitTextBox,
+.dj_ie6 .soria .dijitComboBox,
+.dj_ie6 .soria .dijitSpinner,
+.dj_ie6 .soria .dijitInlineEditor input,
+.dj_ie6 .soria .dijitTextArea {
+ background:#fff url(images/validationInputBg.gif) repeat-x top left;
+}
+.soria .dijitComboBox .dijitButtonNode {
+ padding: 0 0.2em;
+}
+.soria .dijitComboBox .dijitButtonNode,
+.soria .dijitSpinner .dijitButtonNode {
+
+ border-color: #8ba0bd;
+ border-left: 1px solid #8ba0bd;
+}
+.soria .dijitTextBoxFocused,
+.soria .dijitComboBoxFocused,
+.soria .dijitSpinnerFocused, .soria .dijitSpinnerUpArrowActive, .soria .dijitSpinnerDownArrowActive,
+.soria .dijitTextAreaFocused {
+
+ border-color:#406b9b;
+}
+.soria .dijitComboBoxFocused .dijitButtonNode,
+.soria .dijitSpinnerFocused .dijitButtonNode,
+.soria .dijitSpinnerUpArrowActive .dijitButtonNode,
+.soria .dijitSpinnerDownArrowActive .dijitButtonNode {
+ border-left-color:#8ba0bd;
+}
+.soria .dijitSpinnerFocused .dijitDownArrowButton,
+.soria .dijitSpinnerUpArrowActive .dijitDownArrowButton,
+.soria .dijitSpinnerDownArrowActive .dijitDownArrowButton {
+ border-top-color:#8ba0bd;
+}
+.soria .dijitError {
+ border-color:#f3d118;
+ background-color:#f9f7ba;
+ background-image:none;
+}
+.dj_ie6 .soria .dijitError INPUT {
+
+ background-color:#f9f7ba !important;
+}
+.soria .dijitErrorFocused {
+ background-color:#ff6;
+ background-image:none;
+}
+.dj_ie6 .soria .dijitErrorFocused INPUT {
+
+ background-color:#ff6 !important;
+}
+.soria .dijitValidationIcon {
+
+ width: 16px;
+ background: transparent url(images/warning.png) no-repeat center center;
+}
+.soria .dijitComboBoxHighlightMatch {
+ background-color:#f9f7ba;
+}
.soria .dijitButtonNode {
- /* enabled state - inner */
- border:1px solid #4f8ce5;
- vertical-align: middle;
- padding: 0.2em 0.2em;
-}
-
-.dj_ie6 .soria .dijitButtonNode {
- zoom: 1;
- padding-bottom: 0.1em;
-}
-
+
+
+ border: 1px solid #8ba0bd;
+ border-bottom:1px solid #657c9c;
+ padding: 0.1em 0.2em 0.2em 0.2em;
+ background: #bcd5f0 url(images/buttonEnabled.png) repeat-x top left;
+}
+.soria .dijitSelect .dijitButtonContents {
+ border-right: none;
+}
+.soria .dijitButtonNode button {
+ border: 0px;
+ background-color: transparent;
+}
+.soria .dijitButtonText {
+ text-align: center;
+ padding: 0 0.3em;
+}
+.soria .dijitComboBox .dijitButtonNode {
+ border-width: 0px 0px 0px 1px;
+}
+.soria .dijitArrowButton {
+ color: #111;
+}
+.soria .dijitComboButton .dijitDownArrowButton {
+ padding-right:4px;
+}
+.soria .dijitComboBoxReadOnly,
+.soria .dijitSpinnerReadOnly,
+.soria .dijitSpinnerReadOnly .dijitButtonNode,
.soria .dijitButtonDisabled .dijitButtonNode,
.soria .dijitToggleButtonDisabled .dijitButtonNode,
.soria .dijitDropDownButtonDisabled .dijitButtonNode,
.soria .dijitComboButtonDisabled .dijitButtonNode,
-.soria .dijitComboBoxDisabled .dijitDownArrowButton,
-.soria .dijitComboBoxDisabled .dijitInputField,
-.soria .dijitSpinnerDisabled .dijitInputField,
+.soria .dijitComboBoxDisabled,
+.soria .dijitSpinnerDisabled,
.soria .dijitSpinnerDisabled .dijitButtonNode {
- /* disabled state - inner */
- border: 1px solid #d5d5d5;
- background:#ccc url("images/gradientTopBg.png") repeat-x top left;
- opacity: 0.50; /* Safari, Opera and Mozilla */
-}
-.soria .dijitButtonDisabled .dijitButtonNode *,
-.soria .dijitToggleButtonDisabled .dijitButtonNode *,
-.soria .dijitDropDownButtonDisabled .dijitButtonNode *,
-.soria .dijitComboButtonDisabled .dijitButtonNode *,
-.soria .dijitSpinnerDisabled .dijitButtonNode * {
- filter: gray() alpha(opacity=50); /* IE */
-}
-
+
+ border-color: #b9bbdd #b9bbdd #b9bbdd #b9bbdd;
+ background:#c3d3e5 url(images/buttonDisabled.png) top repeat-x;
+ opacity: 0.60;
+}
+.dj_ie6 .soria .dijitComboButtonDisabled .dijitButtonText {
+
+ color: #aaa;
+}
.soria .dijitButtonHover .dijitButtonNode,
+.soria .dijitButtonNodeHover,
.soria .dijitToggleButtonHover .dijitButtonNode,
.soria .dijitDropDownButtonHover .dijitButtonNode,
.soria .dijitComboButtonHover .dijitButtonContents,
.soria .dijitComboButtonDownArrowHover .dijitDownArrowButton,
.soria .dijitComboBoxHover .dijitDownArrowButton,
.soria .dijitSpinnerUpArrowHover .dijitUpArrowButton,
.soria .dijitSpinnerDownArrowHover .dijitDownArrowButton {
- /* hover state - inner */
- border-color:#666;
- color:#fff;
- background-position:0px -1px;
-}
-
+
+
+ color:#243C5F;
+ background:#acc5e2 url(images/buttonHover.png) repeat-x top left;
+}
.soria .dijitButtonActive .dijitButtonNode,
.soria .dijitToggleButtonActive .dijitButtonNode,
.soria .dijitDropDownButtonActive .dijitButtonNode,
.soria .dijitComboButtonActive .dijitButtonContents,
-.soria .dijitDownArrowActive .dijitDownArrowButton,
+.soria .dijitStackController .dijitToggleButtonChecked .dijitButtonNode {
+
+ border-color:#657c9c;
+ background: #91b4e5 url(images/buttonActive.png) top left repeat-x;
+}
+.soria .dijitSpinnerUpArrowActive .dijitUpArrowButton,
+.soria .dijitSpinnerDownArrowActive .dijitDownArrowButton,
.soria .dijitComboBoxActive .dijitDownArrowButton {
- /* active state - inner (for when you are pressing a normal button, or
- * when a toggle button is in a depressed state
- */
- border-color:#333;
- background: #cbdcf7 url("images/gradientBottomBg.png") bottom repeat-x;
-}
-
-/* button inner contents - labels, icons etc. */
-.soria .dijitButtonNode * {
- display: -moz-inline-box;
- display: inline-block;
- vertical-align: middle;
-}
-.dj_ie .soria .dijitButtonNode * {
- zoom: 1;
- display:inline;
-}
-.soria .dijitButtonText {
- padding: 0 0.3em;
-}
-
-
-.soria .dijitToolbar {
- border: 1px solid #333;
-}
-.soria .dijitToolbar * {
- padding: 0px;
- margin: 0px;
-}
-.dj_ie .soria .dijitToolbar {
- padding-bottom: 1px;
- margin-top: -1px;
-}
-.soria .dijitToolbar .dijitButtonNode {
- padding: 0px;
- margin: 0px;
- border: 1px solid transparent;
- background: none;
-}
-.soria .dijitToolbar .dijitToggleButtonChecked .dijitButtonNode {
- background-color:#C1D2EE;
- border:1px solid #666;
- border-top:0;
- border-bottom:0;
-}
-.soria .dijitToolbar .dijitToggleButtonCheckedHover .dijitButtonContents {
- border-color: #000;
- background-color:transparent;
-}
-.dj_ie6 .soria .dijitToolbar .dijitButtonNode {
- /* workaround no transparent border support in IE6*/
- border-color: #e9e9e9;
-}
-.soria .dijitToolbar .dijitButtonHover .dijitButtonNode,
-.soria .dijitToolbar .dijitToggleButtonHover .dijitButtonNode,
-.soria .dijitToolbar .dijitDropDownButtonHover .dijitButtonNode {
- border-color: #366dba;
-}
-.dijitToolbarSeparator {
- background: url('images/editor.gif');
- height: 18px;
- width: 5px;
- padding: 0px 1px 0px 1px;
- margin: 0px;
-}
-.soria .dijitToolbar .dijitToolbarSeparator {
- background: url('images/editor.gif');
-}
-
-/* ComboBox-icon-specific */
-.soria .dijitComboBox .dijitDownArrowButtonChar {
- /* visibility:hidden; */
- display:none;
-}
-.soria .dijitComboBox .dijitDownArrowButtonInner { background-position:0px 0px; }
-.soria .dijitComboBoxHover .dijitDownArrowButtonInner { }
-.soria .dijitSpinner .dijitButtonNode {
- padding: 0 .4em 0 .4em;
-}
-
-/*
- dijit.form.TextBox
- dijit.form.ValidationTextBox
- dijit.form.SerializableTextBox
- dijit.form.RangeBoundTextBox
- dijit.form.NumberTextBox
- dijit.form.CurrencyTextBox
- dijit.form.NumberSpinner
- dijit.form.ComboBox (partial)
-*/
-.soria .dijitComboBox {
- /* put margin on the outer element of the autocompleter rather than the input */
- margin:.0em .1em .2em .1em;
-}
-
-.soria .dijitInputField,
-.soria .dijitInlineEditor input,
-.soria .dijitTextArea {
- /* For all except dijit.form.NumberSpinner: the actual input element.
- For dijit.form.NumberSpinner: the outer fieldset that contains the input.
- */
- font-size: inherit;
- background:#fff url("images/gradientInverseTopBg.png") repeat-x top left;
- background-position:0 -32px;
- /* border:1px solid #333; */
- line-height: normal;
- padding: 0.2em 0.3em;
-}
-
-.dj_ie .soria TD.dijitInputField,
-.dj_ie .soria .dijitInputField INPUT {
- height: 1.65em; /* set height for IE since the INPUT is position:absolute */
-}
-
-.dj_safari .soria .dijitInputField {
- padding: 0.08em 0.3em; /* looks better */
-}
-
-.soria INPUT.dijitTextBox {
- padding: 0.2em 0.3em;
-}
-
-.dj_ie .soria .dijitTextBox INPUT,
-.dj_ie .soria .dijitComboBox INPUT,
-.dj_ie .soria .dijitSpinner INPUT {
- width:95% !important; /* add a little padding-right for position:absolute INPUT */
-}
-
-.soria .dijitComboBoxFocused .dijitInputField {
- /* input field when focused (eg: typing affects it) */
- border-color:#333;
- border-style:inset;
-}
-
-.soria .dijitComboBoxDisabled .dijitInputField {
- /* input field when disabled (also set above) */
-}
-
-.soria .dijitComboBoxHover .dijitInputField {
- /* input field when hovered over */
- border-color:#4f8ce5;
-}
-
-.soria .dijitComboBoxActive .dijitInputField {
- /* input field when mouse is down (?) */
-}
-
-/* Dojo Input Field */
-
-HTML.dj_ie6 .soria .dijitInputFieldValidationNormal,
-.soria .dijitInputFieldValidationNormal {
+
+ background: #91b4e5 url(images/buttonActive.png) top left repeat-x;
+}
+.soria .dijitArrowButtonInner {
+ background-image: url(images/spriteArrows.png);
+ background-repeat: no-repeat;
+ background-position: 0px top;
+ width: 11px;
+}
+.soria .dijitLeftArrowButton .dijitArrowButtonInner {
+ background-position: -11px top;
+}
+.soria .dijitUpArrowButton .dijitArrowButtonInner {
+ background-position: -22px top;
+}
+.soria .dijitRightArrowButton .dijitArrowButtonInner {
+ background-position: -33px top;
+}
+.dj_ie6 .soria .dijitArrowButtonInner {
+ background-image: url(images/spriteArrows.gif);
+}
+.soria .dijitComboBox .dijitArrowButton .dijitArrowButtonInner {
+ background:url(images/spriteArrows.png) no-repeat left center;
+ width: 11px;
+}
+.dj_ie6 .soria .dijitComboBox .dijitArrowButton .dijitArrowButtonInner {
+ background:url(images/spriteArrows.gif) no-repeat left center;
+}
+.soria .dijitComboBoxHover .dijitArrowButtonInner {
}
-
-HTML.dj_ie6 .soria .dijitInputFieldValidationError,
-.soria .dijitInputFieldValidationError {
- border:1px solid #f3d118;
- background-color::#f9f7ba;
- background-image:none;
-}
-
-.soria .dijitInputFieldFocused {
- border:1px solid #000;
-}
-
-.soria .dijitInputFieldValidationError:hover,
-.soria .dijitInputFieldValidationError:focus {
- background-color:#ff6;
- background-image:none;
-}
-.soria .dijitInputFieldValidationIcon {
- margin-left: 3px;
- padding-bottom: 1px;
-}
-.soria .dijitInputFieldValidationIconNormal {
- background-image: none;
-}
-
-.soria .dijitInputFieldValidationIconError {
- background-position:-384px 0px;
-}
-
-.soria .dijitInputFieldValidationIconText {
- visibility: hidden;
-}
-
-/* CheckBox and Radio Widgets, and the CSS to embed a checkbox or radio icon inside a ToggleButton. */
-
.soria .dijitToggleButton .dijitCheckBox,
-.soria .dijitToggleButton .dijitRadio,
-.soria .dijitToggleButton .dijitCheckBoxIcon,
-.soria .dijitToggleButton .dijitRadioIcon {
- background-image: url('images/checkmarkNoBorder.gif');
-}
-
-.soria .dijitCheckBox, .soria .dijitToggleButton .dijitCheckBoxIcon { background-position: -112px; }/* unchecked */
+.soria .dijitToggleButton .dijitCheckBoxIcon {
+ background-image: url(images/spriteCheckbox.gif);
+}
+.soria .dijitCheckBox,
+.soria .dijitCheckBoxIcon {
+ background-image: url(images/spriteCheckbox.gif);
+ background-repeat: no-repeat;
+ width: 16px;
+ height: 16px;
+ margin: 0;
+ padding: 0;
+}
+.soria .dijitCheckBox,
+.soria .dijitToggleButton .dijitCheckBoxIcon {
+
+ background-position: -16px;
+}
.soria .dijitCheckBoxChecked,
-.soria .dijitToggleButtonChecked .dijitCheckBoxIcon { background-position: -96px; } /* checked */
-.soria .dijitCheckBoxDisabled { /* disabled */ background-position: -144px; }
-.soria .dijitCheckBoxCheckedDisabled { background-position: -128px; } /* disabled but checked */
-.soria .dijitCheckBoxHover,
-.soria .dijitCheckBoxFocused { background-position: -176px; } /* hovering over an unchecked enabled checkbox */
-.soria .dijitCheckBoxCheckedHover,
-.soria .dijitCheckBoxCheckedFocused { background-position: -160px; } /* hovering over a checked enabled checkbox */
+.soria .dijitToggleButtonChecked .dijitCheckBoxIcon {
+
+ background-position: 0px;
+}
+.soria .dijitCheckBoxDisabled {
+
+ background-position: -48px;
+}
+.soria .dijitCheckBoxCheckedDisabled {
+
+ background-position: -32px;
+}
+.soria .dijitCheckBoxHover {
+
+ background-position: -80px;
+}
+.soria .dijitCheckBoxCheckedHover {
+
+ background-position: -64px;
+}
+.soria .dijitToggleButton .dijitRadio,
+.soria .dijitToggleButton .dijitRadioIcon {
+ background-image: url(images/spriteRadio.gif);
+}
.soria .dijitRadio,
-.soria .dijitToggleButton .dijitRadioIcon { background-position: -208px; } /* unselected */
-.soria .dijitRadioChecked,
-.soria .dijitToggleButtonChecked .dijitRadioIcon { background-position: -192px; } /* selected */
-.soria .dijitRadioCheckedDisabled { background-position: -224px; } /* selected but disabled */
-.soria .dijitRadioDisabled { background-position: -240px; } /* unselected and disabled */
-.soria .dijitRadioHover,
-.soria .dijitRadioFocused { background-position: -272px; } /* hovering over an unselected enabled radio button */
-.soria .dijitRadioCheckedHover,
-.soria .dijitRadioCheckedFocused { background-position: -256px; } /* hovering over a selected enabled radio button */
-
-/* diji.Menu */
-.soria .dijitMenu {
- border: 1px solid #333;
- margin: 0px;
- padding: 0px;
-}
-.soria .dijitMenuSeparator,
-.soria .dijitMenuItem {
- background-color: #b7cdee;
- font: menu;
+.soria .dijitRadioIcon {
+ background-image: url(images/spriteRadio.gif);
+ background-repeat: no-repeat;
+ width: 16px;
+ height: 16px;
margin: 0;
-}
-.soria .dijitMenuItem TD {
- padding:2px;
- outline:0;
-}
-.soria .dijitMenuItemHover {
- background-color: #4f8ce5;
- color:#fff;
-}
-.soria .dijitMenuExpand {
- display:none;
-}
-.soria .dijitMenuExpandEnabled {
- background-position: -48px 0px;
- display:block;
-}
-.soria .dijitMenuExpandInner {
- display:none !important;
-}
-/* separator can be two pixels -- set border of either one to 0px to have only one */
-.soria .dijitMenuSeparatorTop {
- border-bottom: 1px solid #333;
-}
-
-.soria .dijitMenuSeparatorBottom {
- border-top: 1px solid #666;
-}
-
-/* TitlePane */
-.soria .dijitTitlePane .dijitTitlePaneTitle {
- border:1px solid #333;
- border-bottom:0;
- background-position:0px -1px;
- padding:4px 4px 4px 4px;
- cursor: pointer;
- color:#fff;
- font-weight:bold;
-}
-.soria .dijitTitlePane .dijitClosed {
- border-bottom:1px solid #333;
-}
-.soria .dijitTitlePane .dijitClosed .dijitArrowNode { background-position:-48px 0px; }
-.soria .dijitTitlePane .dijitOpen .dijitArrowNode { background-position:0px 0px; }
-.soria .dijitTitlePane .dijitArrowNodeInner { visibility:hidden; }
-.soria .dijitTitlePaneTitle .dijitOpenCloseArrowOuter { margin-right:5px; }
-.soria .dijitOpen .dijitTitlePaneTitle .dijitOpenCloseArrowOuter {
- position:relative;
- top:2px;
-}
-.soria .dijitTitlePaneContentOuter {
- background: #ffffff;
- border:1px solid #666;
- border-top: 1px solid #666; /* w/out this, an <h1> on the top line causes a gap between the .content and .label */
-}
-.soria .dijitTitlePaneContentInner {
- padding:10px;
-}
-/* force hasLayout to ensure borders etc, show up */
-.dj_ie6 .soria .dijitTitlePaneContentOuter,
-.dj_ie6 .soria .dijitTitlePane .dijitTitlePaneTitle {
- zoom: 1;
-}
-.soria .dijitClickableRegion {
- background-color : #ffc !important;
-}
-
-/* Tabs */
-.soria .dijitTabPaneWrapper {
- background:#fff;
- /* border:1px solid #b7cde5; */
- border:1px solid #666;
-}
-
-.soria .dijitTab {
- line-height:normal;
- margin-right:3px; /* space between one tab and the next in top/bottom mode */
- padding:0px;
- border:1px solid #666;
-}
-
-.soria .dijitAlignLeft .dijitTab,
-.soria .dijitAlignRight .dijitTab {
- margin-right:0px;
- margin-bottom:5px; /* space between one tab and the next in left/right mode */
-}
-
-.soria .dijitTabInnerDiv {
- padding:6px 10px 4px 10px;
- /* border-left:1px solid #fff; */
- border-bottom:transparent;
-}
-.dj_ie6 .soria .dijitTabInnerDiv { border-bottom:0; }
-
-.soria .dijitTabInnerDiv span {
- outline:0;
-}
-
-.soria .dijitTabHover,
-.soria .dijitTabCloseButtonHover {
- color: #fff;
- border-top-color:#333;
- border-left-color:#333;
- border-right-color:#333;
-}
-
-.soria .dijitTabChecked,
-.soria .dijitTabCloseButtonChecked
-{
- /* the selected tab (with or without hover) */
- background-color:#fff;
- border-color:#666;
- border-top:1px solid #666;
- color:#333;
+ padding: 0;
+}
+.soria .dijitRadio,
+.soria .dijitToggleButton .dijitRadioIcon {
+
+ background-position: -16px;
+}
+.soria .dijitRadioChecked,
+.soria .dijitToggleButtonChecked .dijitRadioIcon {
+
+ background-position: 0px;
+}
+.soria .dijitRadioDisabled {
+
+ background-position: -48px;
+}
+.soria .dijitRadioCheckedDisabled {
+
+ background-position: -32px;
+}
+.soria .dijitRadioHover {
+
+ background-position: -80px;
+}
+.soria .dijitRadioCheckedHover {
+
+ background-position: -64px;
+}
+.soria .dijitSliderProgressBarH {
+ border-color: #b1badf;
+ background: #c0c2c5 url(images/sliderFull.png) repeat-x top left;
+}
+.soria .dijitSliderProgressBarV {
+ border-color: #b1badf;
+ background: #c0c2c5 url(images/sliderFullVertical.png) repeat-y bottom left;
+}
+.soria .dijitSliderFocused .dijitSliderProgressBarH,
+.soria .dijitSliderFocused .dijitSliderLeftBumper {
+ background-image:url(images/sliderFullFocus.png);
+}
+.soria .dijitSliderFocused .dijitSliderProgressBarV,
+.soria .dijitSliderFocused .dijitSliderBottomBumper {
+ background-image:url(images/sliderFullVerticalFocus.png);
+}
+.soria .dijitSliderRemainingBarV {
+ border-color: #b4b4b4;
+ background: #dcdcdc url(images/sliderEmptyVertical.png) repeat-y bottom left;
+}
+.soria .dijitSliderRemainingBarH {
+ border-color: #b4b4b4;
+ background: #dcdcdc url(images/sliderEmpty.png) repeat-x top left;
+}
+.soria .dijitSliderBar {
+ border-style: solid;
+ outline:1px;
-/* border-color: #4F8CE5; */
-/* border-top:1px solid #4f8ce5; */
- background-image:none;
-}
-.soria .dijitTabCloseButton {
- border-bottom:1px solid #fff;
-}
-
-/* make the active tab white on the side next to the content pane */
-.soria .dijitAlignTop .dijitTabChecked,
-.soria .dijitAlignTop .dijitTabCloseButtonChecked
-{
- border-bottom-color:white;
- vertical-align:bottom;
-}
-
-.soria .dijitAlignBottom .dijitTabChecked,
-.soria .dijitAlignBottom .dijitTabCloseButtonChecked
-{
- border-top-color:transparent;
- -moz-border-radius:2px 2px 0px 0px; /* eliminate some border detritrus on moz */
-}
-
-.soria .dijitAlignLeft .dijitTabChecked,
-.soria .dijitAlignLeft .dijitTabCloseButtonChecked
-{
- border-right-color:white;
-}
-
-.soria .dijitAlignRight .dijitTabChecked,
-.soria .dijitAlignRight .dijitTabCloseButtonChecked
-{
- border-left-color:white;
-}
-
-/* make space for a positioned close button */
-.soria .dijitTab .dijitClosable {
- position: relative;
- padding:6px 24px 3px 10px;
- /* border-bottom:transparent; */
-}
-
-.soria .dijitTab .dijitClosable .closeImage {
- position:absolute;
- top: 5px;
- right: 3px;
- background-position:-65px -1px;
-}
-
-.soria .dijitTabCloseButton .dijitClosable .closeImage { background-position:-65px -1px; }
-.soria .dijitTabCloseButtonHover .dijitClosable .closeImage { background-position:-81px -1px; }
-
-.soria .dijitAlignLeft .dijitTab .dijitClosable {
- padding:6px 10px 6px 20px;
-}
-/* correct for IE6.
- We cant force hasLayout as that blows out the shrink wrapped tabs
- ..so we shim in the closeImage position properties instead
-*/
-.dj_ie6 .soria .dijitAlignLeft .dijitTab .dijitClosable .closeImage {
- left:-20px;
-}
-
-.soria .dijitAlignBottom .dijitTab .dijitClosable .closeImage {
- top: auto;
- bottom: 5px;
- right: 2px;
-}
-
-.soria .dijitAlignLeft .dijitTab .dijitClosable .closeImage {
- top: 2px;
- left: 5px;
-}
-
-/* SplitContainer */
-
-.soria .dijitSplitContainerSizerH {
- background:#b7cdee url("images/gradientLeftBg.png") repeat-y;
- border:0;
- border-right:1px solid #cbdcf7;
- width:7px;
-}
-
-.soria .dijitSplitContainerSizerH .thumb {
- background-position:-357px 0px;
- left:0px;
- width:6px;
-}
-
-.soria .dijitSplitContainerSizerV {
- border:0;
- border-bottom:1px solid #cbdcf7;
- height:7px;
-}
-
-.soria .dijitSplitContainerSizerV .thumb {
- background-position:-368px -5px;
- top:0px;
- height:6px;
-}
-
-/* Dialog */
-.soria .dijitDialog {
- margin:0; padding:0;
- background: #eee;
- border: 1px solid #666;
- border-top:0px;
- -webkit-box-shadow: 0px 3px 7px #adadad;
-}
-
-.soria .dijitDialog .dijitDialogTitle {
- border-top: none;
- border-left: none;
- border-right: none;
-}
-
-.soria .dijitDialog .dijitDialogPaneContent {
- background: #ffffff;
- border:none;
- padding:10px;
- outline:0;
- opacity:1;
-}
-
-.soria .dijitDialogTitleBar {
- /* outer container for the titlebar of the dialog */
- border-top: 1px solid #666;
- border-bottom: 1px solid #666;
- padding: 4px 4px 4px 4px;
- cursor: move;
- outline:0;
-}
-
-.soria .dijitDialogTitle {
- /* typography and styling of the dialog title */
- font-weight: bold;
- color:#fff;
- padding: 8px 8px 8px 8px;
- outline:0;
-}
-
-.soria .dijitDialogCloseIcon {
- /* the default close icon for the dialog */
- background-position:-64px 0px;
- float: right;
- position: absolute;
- vertical-align: middle;
- right: 5px;
- top: 5px;
- cursor: pointer;
-}
-.soria .dijitDialogContent {
- /* the body of the dialog */
- padding: 8px;
-}
-
-/* Tooltip */
-.soria .dijitTooltip,
-.soria .dijitTooltipDialog {
- /* the outermost dom node, holding the connector and container */
- opacity: 0.85;
- background: transparent; /* make the area on the sides of the arrow transparent */
-}
-
-.dijitTooltipBelow {
- /* leave room for arrow above content */
- padding-top: 13px;
-}
-
-.dijitTooltipAbove {
- /* leave room for arrow below content */
- padding-bottom: 13px;
-}
-
-.soria .dijitTooltipContainer {
- background-color:#ffc;
- background-position:0 -30px;
- border:1px solid #333;
- padding:0.45em;
- border-radius: 6px;
- -moz-border-radius: 7px;
- -webkit-border-radius: 6px;
-}
-.soria .dijitTooltipContents {
- outline:0; /* the node that gets focus */
-}
-
-.soria .dijitTooltipConnector {
- /* the arrow piece */
+}
+.soria .dijitSliderFocused .dijitSliderBar {
+ border-color:#8ba0bd;
+}
+.dijit_a11y .dijitSliderProgressBar {
+ background-color:#333 !important;
+}
+.soria .dijitSliderImageHandleH {
+ border:0px;
+ width:15px;
+ height:18px;
+ background:url(images/preciseSliderThumb.png) no-repeat center top;
+ cursor:pointer;
+}
+.soria .dijitSliderFocused .dijitSliderImageHandleH {
+ background-image:url(images/preciseSliderThumbFocus.png);
+ #background-image:url(images/preciseSliderThumbFocus.gif);
+}
+.dj_ie6 .soria .dijitSliderImageHandleH {
+ background-image:url(images/preciseSliderThumb.gif);
+}
+.soria .dijitSliderLeftBumper {
+ border-left-width: 1px;
+ border-color: #aab0bb;
+ background: #c0c2c5 url(images/sliderFull.png) repeat-x top left;
+}
+.soria .dijitSliderRightBumper {
+ background: #dcdcdc url(images/sliderEmpty.png) repeat-x top left;
+ border-color: #b4b4b4;
+ border-right-width: 1px;
+}
+.soria .dijitSliderImageHandleV {
border:0px;
- z-index: 2;
- width:16px;
- height:14px;
-}
-.soria .dijitTooltipABRight .dijitTooltipConnector {
- left: auto !important;
- right: 3px;
-}
-.soria .dijitTooltipBelow .dijitTooltipConnector {
- /* the arrow piece for tooltips below an element */
- top: 0px;
- left: 3px;
- background-position:-336px 0px;
-}
-.soria .dijitTooltipAbove .dijitTooltipConnector {
- /* the arrow piece for tooltips above an element */
- bottom: 0px;
- left: 3px;
- background-position:-304px 0px;
-}
-.soria .dijitTooltipLeft {
- padding-right: 14px;
-}
-.dj_ie6 .soria .dijitTooltipLeft {
- padding-right: 16px;
-}
-.soria .dijitTooltipLeft .dijitTooltipConnector {
- /* the arrow piece for tooltips to the left of an element, bottom borders aligned */
- right: 0px;
- bottom: 7px;
- background-position:-288px 0px;
-}
-.soria .dijitTooltipRight {
- padding-left: 13px;
-}
-.soria .dijitTooltipRight .dijitTooltipConnector {
- /* the arrow piece for tooltips to the right of an element, bottom borders aligned */
- left: 0px;
- bottom: 7px;
- background-position:-321px 0px;
-}
-
-/* dijit.layout.AccordionPane */
-.soria .dijitAccordionPane .dijitAccordionTitle {
- border:1px solid #666;
- border-bottom:0;
- padding:5px 5px 3px 5px;
- color:#333;
-}
-
-.soria .dijitAccordionPane-selected .dijitAccordionTitle {
- color:#fff;
- padding: 5px 5px 3px 5px;
- font-weight: bold;
-}
-
-.soria .dijitAccordionPane .dijitAccordionArrow {
- background-position: -32px 0px;
-}
-.soria .dijitAccordionPane-selected .dijitAccordionArrow {
- background-position: 0px 0px;
-}
-.soria .dijitAccordionPane .dijitAccordionBody {
- background: #fff;
- border:1px solid #666;
- border-bottom:0;
-}
-
-/* Tree */
+ width:20px;
+ height:15px;
+ background:url(images/sliderThumb.png) no-repeat center center;
+ #background:url(images/sliderThumb.gif) no-repeat center center;
+ cursor:pointer;
+}
+.soria .dijitSliderFocused .dijitSliderImageHandleV {
+ background-image:url(images/sliderThumbFocus.png);
+ #background-image:url(images/sliderThumbFocus.gif);
+}
+.soria .dijitSliderBottomBumper {
+ border-bottom-width: 1px;
+ border-color: #aab0bb;
+ background: #c0c2c5 url(images/sliderFullVertical.png) repeat-y bottom left;
+}
+.soria .dijitSliderTopBumper {
+ background: #dcdcdc url(images/sliderEmptyVertical.png) repeat-y top left;
+ border-color: #b4b4b4;
+ border-top-width: 1px;
+}
+.soria .dijitSliderIncrementIconH,
+.soria .dijitSliderIncrementIconV {
+ background:url(images/spriteRoundedIconsSmall.png) no-repeat -45px top;
+ #background:url(images/spriteRoundedIconsSmall.gif) no-repeat -45px top;
+ width:15px; height:15px;
+ cursor:pointer;
+}
+.soria .dijitSliderIncrementIconH {
+ background:url(images/spriteRoundedIconsSmall.png) no-repeat -30px top;
+ #background:url(images/spriteRoundedIconsSmall.gif) no-repeat -30px top;
+}
+.soria .dijitSliderDecrementIconH,
+.soria .dijitSliderDecrementIconV {
+ width:15px;
+ height:15px;
+ cursor:pointer;
+ background:url(images/spriteRoundedIconsSmall.png) no-repeat -15px top;
+ #background:url(images/spriteRoundedIconsSmall.gif) no-repeat -15px top;
+}
+.soria .dijitSliderDecrementIconH {
+ background:url(images/spriteRoundedIconsSmall.png) no-repeat 0px top;
+ #background:url(images/spriteRoundedIconsSmall.gif) no-repeat 0px top;
+}
+.soria .dijitSliderButtonInner {
+ visibility:hidden;
+}
+.soria .dijitSliderReadOnly *,
+.soria .dijitSliderDisabled * {
+ border-color: #d5d5d5 #bdbdbd #bdbdbd #d5d5d5;
+ color: #bdbdbd;
+}
+.soria .dijitSliderReadOnly .dijitSliderDecrementIconH,
+.soria .dijitSliderDisabled .dijitSliderDecrementIconH {
+ background-position: 0px -15px;
+}
+.soria .dijitSliderReadOnly .dijitSliderIncrementIconH,
+.soria .dijitSliderDisabled .dijitSliderIncrementIconH {
+ background-position: -30px -15px;
+}
+.soria .dijitSliderReadOnly .dijitSliderDecrementIconV,
+.soria .dijitSliderDisabled .dijitSliderDecrementIconV {
+ background-position: -15px -15px;
+}
+.soria .dijitSliderReadOnly .dijitSliderIncrementIconV,
+.soria .dijitSliderDisabled .dijitSliderIncrementIconV {
+ background-position: -45px -15px;
+}
+.soria .dijitSelectDisabled * {
+ cursor: not-allowed !important;
+}
+.soria .dijitSelectReadOnly * {
+ cursor: default !important;
+}
+.soria .dijitSelect .dijitButtonNode {
+ padding: 0px;
+}
+.soria .dijitSelect .dijitButtonContents {
+ padding-top: 1px;
+ background:#fff url(images/validationInputBg.png) repeat-x top left;
+ #background:#fff url(images/validationInputBg.gif) repeat-x top left;
+}
+.soria .dijitSelectHover .dijitButtonContents,
+.soria .dijitSelectActive .dijitButtonContents,
+.soria .dijitSelectOpened .dijitButtonContents,
+.soria .dijitSelectDisabled .dijitButtonContents,
+.soria .dijitSelectReadOnly .dijitButtonContents{
+ background: transparent none;
+}
+.dj_ie .soria .dijitSelect .dijitButtonContents {
+ padding-top: 0px;
+}
+.soria .dijitSelectDisabled .dijitButtonNode {
+ border-color: #b9bbdd #b9bbdd #b9bbdd #b9bbdd;
+ background:#c3d3e5 url(images/buttonDisabled.png) top repeat-x;
+}
+.dj_ie .soria .dijitSelectDisabled .dijitButtonNode * {
+ filter: gray() alpha(opacity=50);
+}
+.soria .dijitSelectHover .dijitButtonNode {
+ color:#000;
+ background:#acc5e2 url(images/buttonHover.png) repeat-x top left;
+}
+.soria .dijitSelectActive .dijitButtonNode,
+.soria .dijitSelectOpened .dijitButtonNode {
+ border-color:#657c9c;
+ background: #91b4e5 url(images/buttonActive.png) top left repeat-x;
+}
+.soria .dijitSelectMenu td {
+ padding: 0em;
+}
+.soria .dijitSelectMenu .dijitMenuItemIcon {
+ margin: 0.1em 0.2em;
+ display: none;
+}
+.soria .dijitSelectMenu .dijitMenuItemLabel,
+.soria .dijitSelectMenu .dijitMenuArrowCell {
+ padding: 0.1em 0.2em;
+}
.soria .dijitTreeNode {
- margin-left: 19px;
- cursor:pointer;
+ background : url(images/treeI.gif) no-repeat;
+ background-position : top left;
+ background-repeat : repeat-y;
zoom: 1;
}
+.soria .dijitTreeNodeHover {
+
+ background-image: url(images/treeHover.png);
+ background-repeat: repeat;
+ background-color: none !important;
+}
+.soria .dijitTreeIsLast {
+ background: url(images/treeI_half.gif) no-repeat;
+}
+.soria .dijitTreeLabel {
+ font-weight: normal;
+ margin-left: 3px;
+}
.soria .dijitTreeIsRoot {
- margin-left: 4px;
-}
-/* left vertical line (grid) for all nodes */
-.soria .dijitTreeIsLast {
- background: transparent;
-}
+ margin-left: 0;
+ background-image: none;
+}
.soria .dijitTreeExpando {
width: 18px;
height: 18px;
- cursor:pointer;
+}
+.soria .dijitTreeRow {
+
+ padding-bottom: 2px;
}
.soria .dijitTreeContent {
min-height: 18px;
min-width: 18px;
- margin-left:16px;
- padding-top:3px;
padding-left:1px;
}
.soria .dijitTreeExpand {
width: 18px;
height: 18px;
background-repeat : no-repeat;
}
-
-/* same style as IE selection */
.soria .dijitTreeNodeEmphasized {
background-color: Highlight;
color: HighlightText;
}
-
-/* don't use :focus due to opera and IE's lack of support on div's */
.soria .dijitTreeLabelFocused {
- outline:0;
- border-top:0;
- border-bottom:2px solid #4f8ce5;
- background-color:#b7cdee;
-}
-
-/* FIXME: convert to sprites */
-.soria .dijitTreeExpandoOpened { background-image: url('images/treeExpand_minus.gif'); }
-.soria .dijitTreeExpandoClosed { background-image: url('images/treeExpand_plus.gif'); }
-.soria .dijitTreeExpandoLeaf { }
-.soria .dijitTreeExpandoLoading { background-image: url('images/treeExpand_loading.gif'); }
-
-/* Calendar*/
+ outline: 1px invert dotted;
+}
+.soria .dijitTreeNodeSelected .dijitTreeLabel{
+ background:#b8cbec;
+}
+.soria .dijitTreeExpandoOpened {
+ background: url(images/spriteTree.gif) no-repeat -18px top;
+}
+.soria .dijitTreeExpandoClosed {
+ background-image: url(images/spriteTree.gif);
+}
+.soria .dijitTreeExpandoLeaf {
+ background: url(images/spriteTree.gif) no-repeat -36px top;
+}
+.soria .dijitTreeExpandoLoading {
+ background-image: url(images/treeExpand_loading.gif);
+}
+.soria .dijitTreeIcon {
+ width: 16px;
+ height: 16px;
+}
+.soria .dijitFolderOpened {
+ background: url(images/spriteDivIcons.gif) no-repeat -16px top;
+}
+.soria .dijitFolderClosed {
+ background: url(images/spriteDivIcons.gif) no-repeat top left;
+}
+.soria .dijitLeaf {
+ background: url(images/spriteDivIcons.gif) no-repeat -32px top;
+}
+.soria .dijitTreeNode .dojoDndItemBefore,
+.soria .dijitTreeNode .dojoDndItemAfter {
+ border-bottom: none;
+ border-top: none;
+}
+.soria .dijitTreeNode .dojoDndItemBefore .dijitTreeContent {
+
+ border-top: 2px solid #369;
+}
+.soria .dijitTreeNode .dojoDndItemAfter .dijitTreeContent {
+
+ border-bottom: 2px solid #369;
+}
+.soria .dijitProgressBar {
+ margin:2px 0px 2px 0px;
+}
+.soria .dijitProgressBarEmpty{
+
+ background:#fff url(images/progressBarEmpty.png) repeat-x center center;
+ border-color: #8ba0bd;
+}
+.soria .dijitProgressBarTile{
+
+ background:#f0f0f0 url(images/progressBarFull.png) repeat-x center center;
+}
+.soria .dijitProgressBarFull {
+ border-right:1px solid #8ba0bd;
+}
+.soria .dijitProgressBarLabel {
+
+ color:#293a4b;
+}
+.soria .dijitProgressBarIndeterminate .dijitProgressBarTile {
+
+ background:#cad2de url(images/progressBarAnim.gif) repeat-x center center;
+}
+.soria .dijitTitlePaneTitle {
+ background: #cccccc;
+ background:#fff url(images/titleBar.png) repeat-x top left;
+ border:1px solid #bfbfbf;
+ padding:3px 4px;
+ font-size: 0.9em;
+ font-weight: bold;
+ color: #6d6d6d;
+}
+.soria .dijitTitlePaneTitle-hover {
+ background: #f9f9f9 url(images/accordionItemActive.png) top repeat-x;
+ cursor: pointer;
+}
+.soria .dijitTitlePaneTitle * {
+ vertical-align: middle;
+}
+.soria .dijitTitlePane .dijitOpen .dijitArrowNode,
+.soria .dijitTitlePane .dijitClosed .dijitArrowNode {
+ width:15px;
+ height:15px;
+}
+.soria .dijitTitlePaneFocused .dijitTitlePaneTextNode {
+ color: #243C5F;
+}
+.soria .dijitOpen .dijitTitlePaneTextNode,
+.soria .dijitFixedOpen .dijitTitlePaneTextNode {
+ color: #243C5F;
+}
+.soria .dijitTitlePane .dijitClosed .dijitArrowNode {
+ background: url(images/spriteRoundedIconsSmall.png) no-repeat -30px top;
+}
+.dj_ie6 .soria .dijitTitlePane .dijitClosed .dijitArrowNode {
+ background:url(images/spriteRoundedIconsSmall.gif) no-repeat -30px top;
+}
+.soria .dijitTitlePane .dijitOpen .dijitArrowNode {
+ background:url(images/spriteRoundedIconsSmall.png) no-repeat -15px top;
+}
+.dj_ie6 .soria .dijitTitlePane .dijitOpen .dijitArrowNode {
+ background:url(images/spriteRoundedIconsSmall.gif) no-repeat -15px top;
+}
+.soria .dijitTitlePane .dijitArrowNodeInner {
+ display:none;
+}
+.dijit_a11y .dijitTitlePane .dijitOpen .dijitArrowNodeInner,
+.dijit_a11y .dijitTitlePane .dijitClosed .dijitArrowNodeInner {
+ display:inline !important;
+ font-family:monospace;
+ padding-bottom:.2em;
+}
+.dijit_a11y .dijitTitlePane .dijitArrowNode {
+ display:none;
+}
+.soria .dijitTitlePaneContentOuter {
+ background: #ffffff;
+ border:1px solid #bfbfbf;
+ border-top: 0px solid #3d3d3d;
+}
+.soria .dijitTitlePaneContentInner {
+ padding:10px;
+}
+.dj_ie6 .soria .dijitTitlePaneContentOuter,
+.dj_ie6 .soria .dijitTitlePane .dijitTitlePaneTitle {
+ zoom: 1;
+}
+.soria .dijitTitlePaneTextNode {
+ margin-left: 4px;
+ margin-right: 4px;
+}
+.soria .dijitCalendarIncrementControl {
+
+ width:15px;
+ height:15px;
+ background-image: url(images/spriteRoundedIconsSmall.png);
+ background-repeat: no-repeat;
+}
.dj_ie6 .soria .dijitCalendarIncrementControl {
- padding:.1em;
-}
-
-.soria .dijitCalendarIncreaseInner,
-.soria .dijitCalendarDecreaseInner { display:none; }
-.soria .dijitCalendarDecrease { background-position:-16px 0px; }
-.soria .dijitCalendarIncrease { background-position:-48px 0px; }
+ font-size:.1em;
+ background-image: url(images/spriteRoundedIconsSmall.gif);
+}
+.soria .dijitA11ySideArrow {
+ display: none;
+}
+.soria .dijitCalendarDecrease {
+ background-position: top left;
+}
+.soria .dijitCalendarIncrease {
+ background-position: -30px top;
+}
.soria table.dijitCalendarContainer {
font-size: 100%;
- border-collapse: collapse;
- border-spacing: 0;
- border: 1px solid #666;
+ border-spacing: 0;
+ border-collapse: separate;
+ border: 1px solid #b1badf;
margin: 0;
}
-
.soria .dijitCalendarMonthContainer th {
- /* month header cell */
+
+ background:#bed7f0 url(images/titleBar.png) repeat-x top;
padding-top:.3em;
- padding-bottom:.1em;
- text-align:center;
+ padding-bottom:.2em;
+ text-align:center;
}
.dj_ie6 .soria .dijitCalendarMonthContainer th {
- padding-top:.1em;
- padding-bottom:0em;
-}
-
+ padding-top:.2em;
+ padding-bottom:.1em;
+}
.soria .dijitCalendarDayLabelTemplate {
- /* day of week labels */
- background:#b7cdee url("images/gradientBottomBg.png") repeat-x bottom;
+
+ background:#bed7f0;
font-weight:normal;
- background-position:0 -28px;
padding-top:.15em;
- padding-bottom:0em;
- border-top:0;
- border-bottom:1px solid #666;
+ padding-bottom:.2em;
+ border-bottom: 1px solid #b1badf;
color:#293a4b;
text-align:center;
}
-
+.soria .dijitCalendarBodyContainer {
+ border-bottom: 1px solid #eeeeee;
+}
.soria .dijitCalendarMonthLabel {
- /* day of week labels */
color:#293a4b;
- font-size: 0.75em;
font-weight: bold;
- text-align:center;
-}
-
-.dj_ie7 .soria .dijitCalendarDateTemplate,
-.dj_ie6 .soria .dijitCalendarDateTemplate {
- font-size: 0.8em;
-}
-
+}
.soria .dijitCalendarDateTemplate {
- /* style for each day cell */
+
font-size: 0.9em;
font-weight: bold;
text-align: center;
padding: 0.3em 0.3em 0.05em 0.3em;
letter-spacing: 1px;
-}
-
-
+ background-color: #fff;
+ border:#fff solid 1px !important;
+}
+.dj_ie .soria .dijitCalendarDateTemplate {
+ padding: 0.1em .33em 0.02em .33em;
+}
.soria .dijitCalendarPreviousMonth,
.soria .dijitCalendarNextMonth {
- /* days that are part of the previous or next month */
+
color:#999999;
- background-color:#f8f8f8 !important;
-}
-
+ background-color:#fdfdfd !important;
+ border:#fdfdfd solid 1px !important;
+}
.soria .dijitCalendarPreviousMonthDisabled,
.soria .dijitCalendarNextMonthDisabled {
- /* days that are part of the previous or next month - disabled*/
+
background-color:#a4a5a6 !important;
}
-
.soria .dijitCalendarCurrentMonth {
- /* days that are part of this month */
- background-color:white !important;
-}
-
+
+}
.soria .dijitCalendarCurrentMonthDisabled {
- /* days that are part of this month - disabled */
+
background-color:#bbbbbc !important;
}
-
+.soria .dijitCalendarDisabledDate {
+
+
+ text-decoration:line-through !important;
+ cursor:default !important;
+}
.soria .dijitCalendarCurrentDate {
- /* cell for today's date */
+
text-decoration:underline;
font-weight:bold;
}
-
.soria .dijitCalendarSelectedDate {
- /* cell for the selected date */
- background-color:#4f8ce5 !important;
- color:#fff !important;
-}
-
-
+
+ background-color:#b9cbf1 !important;
+ color:black !important;
+ border:#4b5aaa solid 1px !important;
+}
.soria .dijitCalendarYearContainer {
- /* footer of the table that contains the year display/selector */
- background:#b7cdee url("images/gradientBottomBg.png") repeat-x bottom;
- border-top:1px solid #333;
-}
-
+
+ background:white url(images/titleBar.png) repeat-x top;
+}
.soria .dijitCalendarYearLabel {
- /* container for all of 3 year labels */
+
margin:0;
padding:0.4em 0 0.25em 0;
text-align:center;
}
-
.soria .dijitCalendarSelectedYear {
- /* label for selected year */
- color:#fff;
+
+ color:black;
padding:0.2em;
padding-bottom:0.1em;
- background-color:#4f8ce5 !important;
-}
-
-.soria .dijitCalendarNextYear,
+ background-color:#b9cbf1 !important;
+ border:#4b5aaa solid 1px !important;
+}
+.soria .dijitCalendarNextYear,
.soria .dijitCalendarPreviousYear {
- /* label for next/prev years */
+
color:black !important;
font-weight:normal;
}
-
-/* inline edit boxen */
-.soria .dijitInlineValue {
- /* span around an inline-editable value when NOT in edit mode */
- padding:3px;
- margin:4px;
-}
-
-
-/* MOW: trying to get this to look like a mini-dialog. Advised? */
-.soria .dijitInlineEditor {
- /* fieldset surrounding an inlineEditor in edit mode */
- display: inline-block;
- display: -moz-inline-stack;
-}
-.dj_ie6 .dijitInLineEditor {
- display:inline;
-}
-.dijitInlineEditor .saveButton,
-.dijitInlineEditor .cancelButton {
- margin:3px 3px 3px 0px;
-}
-
-/* spinner */
-.soria .dijitSpinner {}
-.soria .dijitSpinner input {
-}
-
-/* dijit.ProgressBar */
-.soria .dijitProgressBar {
- margin:2px 0px 2px 0px;
-}
-
-.soria .dijitProgressBarEmpty {
- /* outer container and background of the bar that's not finished yet*/
- border-color: #333;
-}
-
-.soria .dijitProgressBarTile {
- /* inner container for finished portion when in 'tile' (image) mode */
-}
-
-.soria .dijitProgressBarLabel {
- /* Set to a color that contrasts with both the "Empty" and "Full" parts. */
+.soria .dijitTimePickerTick,
+.soria .dijitTimePickerMarker {
+ border-color: #b1badf;
+}
+.soria .dijitTimePickerTick {
+ color:white;
+}
+.soria .dijitTimePickerMarker {
+ background:#bed7f0 url(images/titleBar.png) repeat-x top;
color:#293a4b;
-}
-
-.soria .dijitProgressBarIndeterminate .dijitProgressBarTile {
- /* use an animated gif for the progress bar in 'indeterminate' mode */
- background:#b7cdee url("images/progressBarAnim.gif") repeat-x top left;
- /* FIXME: make a white/alpha animation to overlay a colored node */
-}
-
-/* dijit.Slider(s) */
-.soria .dijitHorizontalSliderProgressBar {
- border-color: #333;
- zoom:1;
-}
-.soria .dijitVerticalSliderProgressBar {
- border-color: #333;
- background: #4f8ce5 url("images/gradientLeftBg.png") repeat-y bottom left;
-}
-.soria .dijitVerticalSliderRemainingBar {
- border-color: #333;
- background: #b7cdee url("images/gradientLeftBg.png") repeat-y bottom left;
-}
-.soria .dijitHorizontalSliderRemainingBar { border-color: #333; }
-.soria .dijitSliderBar {
- border-style: solid;
- outline:1px;
-}
-
-.soria .dijitHorizontalSliderImageHandle {
+ font-weight: bold;
+}
+.soria .dijitTimePickerItemSelected {
+ color: black;
+ background: #b9cbf1 none;
+}
+.soria .dijitTimePickerItemHover {
+ background: #60a1ea none;
+ color:white;
+}
+.soria .dijitTimePickerItemHover,
+.soria .dijitTimePickerItemSelected {
+ position: relative;
+ z-index: 10;
+}
+.soria .dijitTimePickerTick .dijitTimePickerItemInner {
+ font-size:0.4em;
+}
+.soria .dijitTimePickerItemHover .dijitTimePickerItemInner,
+.soria .dijitTimePickerItemSelected .dijitTimePickerItemInner {
+ font-size:1em;
+}
+.soria .dijitTimePickerMarkerHover {
+ border-top: 1px solid #94b9ef;
+}
+.soria .dijitTimePickerTickHover,
+.soria .dijitTimePickerTickSelected {
+ margin-top:-0.3em;
+ margin-bottom:-0.3em;
+ border-bottom: none;
+}
+.dijit_a11y .dijitTimePickerTickHover {
+ background-color: #CCC !important;
+ border-top: 1px solid #333 !important;
+ border-bottom: 1px solid #333 !important;
+}
+.dijit_a11y .dijitTimePickerMarkerHover {
+ border-bottom-width: 2px;
+}
+.soria .dijitToolbar {
+ border-bottom: 1px solid #ccc;
+ background:#eaeaea url(images/titleBar.png) repeat-x top left;
+}
+.dj_ie6 .soria .dijitToolbar {
+ height: 10px;
+}
+.soria .dijitToolbar .dijitButtonNode,
+.soria .dijitToolbar .dijitComboButton .dijitButtonContents,
+.soria .dijitToolbar .dijitComboButton .dijitDownArrowButton {
+ background: none;
+ margin: 0px;
+ padding: 0px;
+ border: none;
+ font-size: 12px;
+}
+.soria .dijitToolbar .dijitButton,
+.soria .dijitToolbar .dijitToggleButton,
+.soria .dijitToolbar .dijitDropDownButton,
+.soria .dijitToolbar .dijitComboButton .dijitButtonContents,
+.soria .dijitToolbar .dijitComboButton .dijitDownArrowButton {
+ background: none;
+ padding: 1px;
+}
+.soria .dijitToolbar .dijitButtonChecked,
+.soria .dijitToolbar .dijitToggleButtonChecked {
+ background-color:#d8e5f8;
+ border:1px solid #316ac5;
+ padding: 0px;
+}
+.soria .dijitToolbar .dijitButtonCheckedHover,
+.soria .dijitToolbar .dijitToggleButtonCheckedHover
+ {
+ background-color:#9abbea;
+ border:1px solid #316ac5;
+ padding: 0px;
+}
+.soria .dijitToolbar .dijitButtonHover,
+.soria .dijitToolbar .dijitToggleButtonHover,
+.soria .dijitToolbar .dijitDropDownButtonHover,
+.soria .dijitToolbar .dijitComboButtonHover .dijitButtonContents,
+.soria .dijitToolbar .dijitComboButtonDownArrowHover .dijitDownArrowButton {
+
+ border: 1px solid #316ac5;
+ padding: 0px;
+ background-color:#9abbea;
+}
+.soria .dijitToolbar label {
+ padding: 3px 3px 0 6px;
+}
+.dj_ie .soria .dijitToolbar .dijitComboButton .dijitButtonContentsFocused,
+.dj_ie .soria .dijitToolbar .dijitComboButton .dijitDownArrowButtonFocused {
+
+ border: 1px #777 dotted !important;
+ padding: 0px;
+}
+.soria .dijitDialog {
+ background: #eee;
+ border: 1px solid #cbcbcb;
+ -webkit-box-shadow: 0px 5px 10px #adadad;
+ padding: 0px;
+}
+.soria .dijitDialog .dijitDialogTitle {
+
+ font-weight: bold;
+ padding: 0px 4px;
+ font-size: 0.9em;
+ color: #3243C5F;
+}
+.soria .dijitDialog .dijitDialogPaneContent {
+ background: #ffffff;
+ border:none;
+ border-top: 1px solid #b1badf;
+ padding:10px;
+}
+.soria .dijitDialogTitleBar {
+
+ background: #fafafa url(images/titleBar.png) repeat-x top left;
+ padding: 5px 6px 3px 6px;
+ cursor: move;
+ outline:0;
+}
+.soria .dijitDialogCloseIcon {
+
+ background-image: url(images/spriteRoundedIconsSmallBl.png);
+ background-repeat: no-repeat;
+ background-position: -60px 0px;
+ position: absolute;
+ vertical-align: middle;
+ right: 6px;
+ top: 4px;
+ height: 15px;
+ width: 15px;
+ cursor: pointer;
+}
+.dj_ie6 .soria .dijitDialogCloseIcon {
+ background-image: url(images/spriteRoundedIconsSmallBl.gif);
+}
+.soria .dijitDialogCloseIcon-hover {
+ background-position: -60px -15px;
+}
+.soria .dijitTooltip,
+.soria .dijitTooltipDialog {
+
+ background: transparent;
+}
+.dijitTooltipBelow {
+
+ padding-top: 10px;
+}
+.dijitTooltipAbove {
+
+ padding-bottom: 10px;
+}
+.soria .dijitTooltipContainer {
+
+ background-color: #fff;
+ border:1px solid #cbcbcb;
+ padding:0.45em;
+}
+.soria .dijitTooltipConnector {
+
border:0px;
- background-position:-416px 0px;
- cursor:pointer;
-}
-.soria .dijitHorizontalSliderLeftBumper {
- border:0;
- border-right:1px solid #333;
- background:transparent;
-}
-.soria .dijitHorizontalSliderRightBumper {
- border:0;
- border-left:1px solid #333;
- background:transparent;
-}
-
-.soria .dijitVerticalSliderImageHandle {
- border:0px;
- background-position:-400px 0px;
- cursor:pointer;
-}
-
-.soria .dijitVerticalSliderBottomBumper {
- border-bottom-width: 1px;
- border-color: #333;
- background: #4f8ce5 url("images/gradientLeftBg.png") repeat-y bottom left;
-}
-
-.soria .dijitVerticalSliderTopBumper {
- background: #b7cdee url("images/gradientLeftBg.png") repeat-y top left;
- border-color: #333;
- border-top-width: 1px;
-}
-
-.soria .dijitSliderDisabled {
- opacity:0.5 !important;
-}
-.dj_ie6 .soria .dijitSliderDisabled {
- filter: gray() alpha(opacity=50);
-}
-
-.soria .dijitHorizontalSliderIncrementIcon { background-position:-48px 0px; }
-.soria .dijitHorizontalSliderDecrementIcon { background-position:-16px 0px; }
-.soria .dijitVerticalSliderIncrementIcon { background-position:-32px 0px; }
-.soria .dijitVerticalSliderDecrementIcon { background-position:0px 0px; }
-
-.soria .dijitSliderButtonInner { visibility:hidden; }
-.dijit_a11y .dijitSliderButtonInner { visibility:visible !important; }
-
-/* ICONS */
+ z-index: 2;
+}
+.soria .dijitTooltipABRight .dijitTooltipConnector {
+
+ left: auto !important;
+ right: 6px;
+}
+.soria .dijitTooltipBelow .dijitTooltipConnector {
+
+ top: 0px;
+ left: 6px;
+ background:url(images/tooltipConnectorUp.png) no-repeat top left;
+ width:17px;
+ height:11px;
+}
+.dj_ie .soria .dijitTooltipBelow .dijitTooltipConnector {
+ background-image: url(images/tooltipConnectorUp.gif);
+}
+.soria .dijitTooltipAbove .dijitTooltipConnector {
+
+ bottom: 0px;
+ left: 6px;
+ background:url(images/tooltipConnectorDown.png) no-repeat top left;
+ width:17px;
+ height:11px;
+}
+.dj_ie .soria .dijitTooltipAbove .dijitTooltipConnector {
+ background-image: url(images/tooltipConnectorDown.gif);
+}
+.dj_ie .soria .dijitTooltipAbove .dijitTooltipConnector {
+ background-image: url(images/tooltipConnectorDown.gif);
+}
+.dj_ie6 .soria .dijitTooltipAbove .dijitTooltipConnector {
+ bottom: -5px;
+}
+.soria .dijitTooltipLeft {
+ padding-right: 10px;
+}
+.dj_ie6 .soria .dijitTooltipLeft {
+ padding-left: 11px;
+}
+.soria .dijitTooltipLeft .dijitTooltipConnector {
+
+ right: 0px;
+ bottom: 3px;
+ background:url(images/tooltipConnectorRight.png) no-repeat top left;
+ width:11px;
+ height:17px;
+}
+.dj_ie .soria .dijitTooltipLeft .dijitTooltipConnector {
+ background-image: url(images/tooltipConnectorRight.gif);
+}
+.soria .dijitTooltipRight {
+ padding-left: 10px;
+}
+.soria .dijitTooltipRight .dijitTooltipConnector {
+
+ left: 0px;
+ bottom: 3px;
+ background:url(images/tooltipConnectorLeft.png) no-repeat top left;
+ width:11px;
+ height:17px;
+}
+.dj_ie .soria .dijitTooltipRight .dijitTooltipConnector {
+ background-image: url(images/tooltipConnectorLeft.gif);
+}
+.soria .dijitMenu,
+.soria .dijitMenuBar {
+ border: 1px solid #cbcbcb;
+ margin: 0px;
+ padding: 0px;
+ background-color: #fff;
+}
+.soria .dijitBorderContainer .dijitMenuBar {
+ border:1px solid #B1BADF;
+}
+.soria .dijitMenuItem {
+ font-family: sans-serif;
+ margin: 0px;
+ color: #243C5F;
+}
+.soria .dijitMenuBar .dijitMenuItem {
+ padding: 4px 5px;
+}
+.soria .dijitMenuPreviousButton, .soria .dijitMenuNextButton {
+ font-style: italic;
+}
+.soria .dijitMenuItem TD {
+ padding:1px;
+}
+.soria .dijitMenuPassive .dijitMenuItemHover,
+.soria .dijitMenuItemSelected {
+ background-color: #d9e6f9;
+ color: #243C5F;
+}
+.soria .dijitMenuItemIcon {
+ width: 15px;
+ height: 15px;
+}
+.soria .dijitMenuExpand {
+ width:15px;
+ height:15px;
+ background-image: url(images/spriteRoundedIconsSmall.png);
+ background-position: -30px top;
+}
+.dj_ie6 .soria .dijitMenuExpand {
+ background-image: url(images/spriteRoundedIconsSmall.gif);
+}
+.soria .dijitMenuSeparator {
+ height: 1px;
+}
+.soria .dijitMenuSeparatorTop {
+ border-bottom: 1px solid #fff;
+}
+.soria .dijitMenuSeparatorBottom {
+ border-top: 1px solid #8ba0bd;
+}
+.soria .dijitCheckedMenuItemIconChar {
+ display: none;
+}
+.soria .dijitCheckedMenuItemIcon {
+ background-image: url(images/spriteCheckbox.gif);
+ background-position: -80px;
+}
+.soria .dijitCheckedMenuItemChecked .dijitCheckedMenuItemIcon {
+ background-position: -64px;
+}
+.dijitIEFixedToolbar {
+ position:absolute;
+
+ top: expression(eval((document.documentElement||document.body).scrollTop));
+}
+.soria .dijitToolbar .dijitToolbarSeparator {
+ background: url(images/editor.gif);
+}
.soria .dijitEditorIcon {
- background-image: url('images/editor.gif'); /* editor icons sprite image */
- background-repeat: no-repeat;
+ background-image: url(images/editor.gif);
+ background-repeat: no-repeat;
width: 18px;
height: 18px;
text-align: center;
}
+.soria .dijitDisabled .dijitEditorIcon {
+ background-image: url(images/editorDisabled.gif);
+}
.soria .dijitEditorIconSep { background-position: 0px; }
.soria .dijitEditorIconBackColor { background-position: -18px; }
.soria .dijitEditorIconBold { background-position: -36px; }
.soria .dijitEditorIconCancel { background-position: -54px; }
.soria .dijitEditorIconCopy { background-position: -72px; }
.soria .dijitEditorIconCreateLink { background-position: -90px; }
.soria .dijitEditorIconCut { background-position: -108px; }
.soria .dijitEditorIconDelete { background-position: -126px; }
.soria .dijitEditorIconForeColor { background-position: -144px; }
.soria .dijitEditorIconHiliteColor { background-position: -162px; }
.soria .dijitEditorIconIndent { background-position: -180px; }
.soria .dijitEditorIconInsertHorizontalRule { background-position: -198px; }
.soria .dijitEditorIconInsertImage { background-position: -216px; }
.soria .dijitEditorIconInsertOrderedList { background-position: -234px; }
.soria .dijitEditorIconInsertTable { background-position: -252px; }
.soria .dijitEditorIconInsertUnorderedList { background-position: -270px; }
.soria .dijitEditorIconItalic { background-position: -288px; }
.soria .dijitEditorIconJustifyCenter { background-position: -306px; }
.soria .dijitEditorIconJustifyFull { background-position: -324px; }
.soria .dijitEditorIconJustifyLeft { background-position: -342px; }
.soria .dijitEditorIconJustifyRight { background-position: -360px; }
.soria .dijitEditorIconLeftToRight { background-position: -378px; }
.soria .dijitEditorIconListBulletIndent { background-position: -396px; }
.soria .dijitEditorIconListBulletOutdent { background-position: -414px; }
.soria .dijitEditorIconListNumIndent { background-position: -432px; }
.soria .dijitEditorIconListNumOutdent { background-position: -450px; }
.soria .dijitEditorIconOutdent { background-position: -468px; }
.soria .dijitEditorIconPaste { background-position: -486px; }
.soria .dijitEditorIconRedo { background-position: -504px; }
.soria .dijitEditorIconRemoveFormat { background-position: -522px; }
.soria .dijitEditorIconRightToLeft { background-position: -540px; }
.soria .dijitEditorIconSave { background-position: -558px; }
.soria .dijitEditorIconSpace { background-position: -576px; }
.soria .dijitEditorIconStrikethrough { background-position: -594px; }
.soria .dijitEditorIconSubscript { background-position: -612px; }
.soria .dijitEditorIconSuperscript { background-position: -630px; }
.soria .dijitEditorIconUnderline { background-position: -648px; }
.soria .dijitEditorIconUndo { background-position: -666px; }
.soria .dijitEditorIconWikiword { background-position: -684px; }
-
-.dj_ie6 .soria .dijitInputField
-{
- background:#fff;
- /* FIXME: un-comment when a pretty version of .gif is made */
- /* background-image: url("images/dojoTundraGradientBg.gif"); */
-}
-
-/* Disabled cursor */
-.soria .dijitDisabledClickableRegion, /* a region the user would be able to click on, but it's disabled */
-.soria .dijitSliderDisabled *,
-.soria .dijitSpinnerDisabled *,
-.soria .dijitButtonDisabled *,
-.soria .dijitDropDownButtonDisabled *,
-.soria .dijitComboButtonDisabled *,
-.soria .dijitComboBoxDisabled *
-{
- cursor: not-allowed !important;
-}
-
-/* DnD avatar-specific settings FIXME: need to wrap icon in a span like rest of dijits. */
-/* For now it uses a default set of rules. Some other DnD classes can be modified as well. */
-.soria .dojoDndAvatar { font-size: 75%; color: black; }
-.soria .dojoDndAvatarHeader td {
- padding-left: 20px;
- padding-right: 4px;
-}
-.soria .dojoDndAvatarHeader {
- background: #ccc;
-}
-.soria .dojoDndAvatarItem { background: #eee; }
-.soria.dojoDndMove .dojoDndAvatarHeader { background-position:-432px 0px; }
-.soria.dojoDndCopy .dojoDndAvatarHeader { background-position:-448px 0px; }
-.soria.dojoDndMove .dojoDndAvatarCanDrop .dojoDndAvatarHeader { background-position:-464px 0px; }
-.soria.dojoDndCopy .dojoDndAvatarCanDrop .dojoDndAvatarHeader { background-position:-480px 0px; }
-
-
+.soria .dijitEditorIconToggleDir { background-position: -540px; }
+.soria .dijitEditorIconTabIndent { background-position: -702px; }
+.soria .dijitEditorIconSelectAll { background-position: -720px; }
+.soria .dijitEditorIconUnlink { background-position: -738px; }
+.soria .dijitEditorIconFullScreen { background-position: -756px; }
+.soria .dijitEditorIconViewSource { background-position: -774px; }
+.soria .dijitEditorIconPrint { background-position: -792px; }
+.soria .dijitEditorIconNewPage { background-position: -810px; }
+.dijitColorPalette {
+ border:1px solid #cbcbcb;
+ background:#fff;
+ -moz-border-radius: 0px !important;
+}
diff --git a/js/dojo/dijit/themes/soria/soria_rtl.css b/js/dojo/dijit/themes/soria/soria_rtl.css
--- a/js/dojo/dijit/themes/soria/soria_rtl.css
+++ b/js/dojo/dijit/themes/soria/soria_rtl.css
@@ -1,90 +1,214 @@
-@import url("../dijit_rtl.css");
-/* Dialog */
-.dijitRtl .dijitDialogTitleBar .dijitDialogCloseIcon {
- background-position:-65px -1px;
+.dj_gecko-rtl .dijitInputField {
+ direction: ltr;
+}
+.dj_gecko-rtl .dijitInputField * {
+ direction: rtl;
+}
+.dijitRtl .dijitMenuItem {
+ text-align: right;
+}
+.dijitRtl .dijitComboBox .dijitInputField {
+ border-right-width:1px !important;
+ border-left-width:0 !important;
+}
+.dijitRtl .dijitCalendarNextYear {
+ margin:0 0.55em 0 0;
+}
+.dijitRtl .dijitCalendarPreviousYear {
+ margin:0 0 0 0.55em;
+}
+.dijitRtl .dijitProgressBarFull .dijitProgressBarLabel {
+ right:0;
+}
+.dijitRtl .dijitSliderImageHandleV {
+ left:auto;
+ right:-6px;
+}
+.dj_ie-rtl .dijitSliderImageHandleV {
+ right:-10px;
+}
+.dijitRtl .dijitSliderMoveableH {
+ right:auto;
+ left:0;
+}
+.dijitRtl .dijitRuleContainerV {
+ float:right;
+}
+.dj_gecko-rtl .dijitRuleContainerV {
+ float:left;
+}
+.dj_ie-rtl .dijitRuleContainerV {
+ text-align:right;
+}
+.dj_ie-rtl .dijitRuleLabelV {
+ text-align:left;
+}
+.dj_ie-rtl .dijitRuleLabelH {
+ zoom:1;
+}
+.dj_ie-rtl .dijitSliderProgressBarH {
+ right:0;
+ left:auto;
+}
+.dj_gecko-rtl .dijitSliderProgressBarH {
+ float:right;
+ right:0;
+ left:auto;
+}
+.dijitRtl .dijitSpinner .dijitInputLayoutContainer .dijitArrowButton {
+ right: auto;
+ left: 0;
+ border-width: 0 1px 0 0 !important;
+}
+.dijitRtl .dijitSpinnerButtonContainer {
+ float: left;
+}
+.dijitRtl .dijit_a11y .dijitSpinnerButtonContainer {
+ margin-left: none;
+ margin-right: 2px;
+}
+.dijitRtl DIV.dijitArrowButton, .dijitRtl .dijitValidationIcon, .dijitRtl .dijitValidationIconText {
+ float: left;
+}
+.dijitRtl .dijitContentPaneLoading, .dijitRtl .dijitContentPaneError {
+ background-position:right;
+ padding-right:25px;
+}
+.dijitRtl .dijitTabContainer .tabStripMenuButton {
float: left;
+}
+.dj_iequirks-rtl .dijitComboButton BUTTON {
+ float:left;
+}
+.dijitRtl .soria .dijitTab {
+ margin-right:0;
+ margin-left:2px;
+}
+.dijitRtl .soria .dijitTabContainer .tabStripButton {
+ margin-left: 0;
+}
+.dijitRtl .soria .dijitTabContainerTopStrip,
+.dijitRtl .soria .dijitTabContainerBottomStrip,
+.dijitRtl .soria .dijitTabContainerTop-tabs,
+.dijitRtl .soria .dijitTabContainerBottom-tabs {
+ padding-left: 0;
+ padding-right: 3px;
+}
+.dijitRtl .soria .dijitTabInnerDiv {
+ padding-left: 3px;
+ padding-right: 4px;
+}
+.dijitRtl .soria .dijitTabPaneWrapper {
+ #zoom: 1;
+}
+.dj_ie-rtl .soria .dijitTabContainerLeft-tabs {
+ margin-left: 0px !important;
+}
+.dj_ie-rtl .soria .dijitTabContainerRight-tabs {
+ margin-right: 0px !important;
+}
+.dijitRtl .soria .dijitTabContainerLeft-tabs .dijitTab,
+.dijitRtl .soria .dijitTabContainerRight-tabs .dijitTab {
+ margin-left:0px;
+}
+.dj_ie-rtl .soria .dijitTab .dijitTabInnerDiv{
+ width : 1%;
+}
+.dijitRtl .soria .dijitAccordionArrow {
+ background-position: 0px top;
+}
+.dijitRtl .soria .dijitAccordionTitle-selected .dijitAccordionArrow {
+
+ background-position: -15px top;
+}
+.dijitRtl .soria .dijitSliderProgressBarH,
+.dijitRtl .soria .dijitSliderRemainingBarH,
+.dijitRtl .soria .dijitSliderLeftBumper,
+.dijitRtl .soria .dijitSliderRightBumper,
+.dijitRtl .soria .dijitSliderTopBumper {
+ background-position: top right;
+}
+.dijitRtl .soria .dijitSliderProgressBarV,
+.dijitRtl .soria .dijitSliderRemainingBarV,
+.dijitRtl .soria .dijitSliderBottomBumper {
+ background-position: bottom right;
+}
+.dijitRtl .soria .dijitSliderLeftBumper {
+ border-left-width: 0px;
+ border-right-width: 1px;
+}
+.dijitRtl .soria .dijitSliderRightBumper {
+ border-left-width: 1px;
+ border-right-width: 0px;
+}
+.dijitRtl .soria .dijitSliderIncrementIconH {
+ background:url(images/spriteRoundedIconsSmall.png) no-repeat left top;
+ #background:url(images/spriteRoundedIconsSmall.gif) no-repeat left top;
+}
+.dijitRtl .soria .dijitSliderDecrementIconH {
+ background:url(images/spriteRoundedIconsSmall.png) no-repeat -30px top;
+ #background:url(images/spriteRoundedIconsSmall.gif) no-repeat -30px top;
+}
+.dijitRtl .soria .dijitComboBox .dijitButtonNode {
+ border-width: 0px 0px 0px 1px;
+}
+.dijitRtl .soria .dijitSelect .dijitButtonContents {
+ border-left: none;
+ border-right-width: 1px;
+}
+.dijitRtl .soria .dijitComboBox .dijitButtonNode,
+.dijitRtl .soria .dijitSpinner .dijitButtonNode {
+
+ border-color: #8ba0bd;
+ border-left: 0px solid #8ba0bd;
+ border-right: 1px solid #8ba0bd;
+}
+.dijitRtl .soria .dijitTreeContainer .dijitTreeNode {
+ background-image : none;
+}
+.dijitRtl .soria .dijitTreeContainer .dijitTreeContent {
+ padding-left: auto;
+ padding-right: 1px;
+}
+.dijitRtl .soria .dijitTreeContainer .dijitTreeExpandoOpened {
+ background: url(images/spriteTree_rtl.gif) no-repeat -18px top;
+}
+.dijitRtl .soria .dijitTreeContainer .dijitTreeExpandoClosed {
+ background-image: url(images/spriteTree_rtl.gif);
+}
+.dijitRtl .soria .dijitTreeContainer .dijitTreeExpandoLeaf {
+ background: none;
+}
+.dijitRtl .soria .dijitTitlePane .dijitClosed .dijitArrowNode {
+ background-position: 0px top;
+}
+.dj_ie6-rtl .soria .dijitTitlePane .dijitClosed .dijitArrowNode {
+ background-position: 0px top;
+}
+.dijitRtl .soria .dijitCalendarDecrease {
+ background-position: -30px top;
+}
+.dijitRtl .soria .dijitCalendarIncrease {
+ background-position: 0px top;
+}
+.dijitRtl .soria .dijitDialogTitleBar .dijitDialogCloseIcon {
right: auto;
left: 5px;
- width:16px; height:16px;
}
-
-.dijitRtl .dijitDialogTitleBar {
- padding: 4px 4px 2px 8px;
-}
-
-/* Menu */
-.dijitRtl .dijitMenuItem .dijitMenuItemIcon {
+.dijitRtl .soria .dijitMenuItem .dijitMenuItemIcon {
padding-left: 3px;
padding-right: 0px;
}
-
-.dijitRtl .dijitMenuItem .dijitMenuExpandEnabled {
- background-position:-16px 0px;
-}
-
-/* TitlePane */
-.dijitRtl .dijitTitlePane .dijitClosed .dijitArrowNode {
- background-position:-16px 0px;
-}
-
-/* Tree */
-.dijitRtl .dijitTreeContainer .dijitTreeNode {
- margin-left: auto;
- margin-right: 19px;
+.dijitRtl .soria .dijitMenuItem .dijitMenuExpand {
+ background-position: left top;
}
-
-.dijitRtl .dijitTreeContainer .dijitTreeIsRoot {
- margin-left: auto;
- margin-right: 0;
-}
-
-
-.dijitRtl .dijitTreeContainer .dijitTreeContent {
- margin-left: auto;
- margin-right: 18px;
- padding-left: auto;
- padding-right: 1px;
-}
-
-.dijitRtl .dijitTreeContainer .dijitTreeExpandoOpened {
- background-image: url('images/treeExpand_minus_rtl.gif');
+.dijitRtl .soria .dijitEditorIcon {
+ background-image: url(images/editor_rtl.gif);
}
-
-.dijitRtl .dijitTreeContainer .dijitTreeExpandoClosed {
- background-image: url('images/treeExpand_plus_rtl.gif');
-}
-
-.dijitRtl .dijitTreeContainer .dijitTreeExpandoLeaf {
-
-}
-
-/* ToolTip */
-.dj_ie .dijitRtl .dijitTooltipLeft {
- margin-right: 0px;
- margin-left: 16px;
-}
-
-.dj_ie .dijitRtl .dijitTooltipRight {
- margin-left: 26px;
- margin-right: -16px;
+.dijitRtl .soria .dijitDisabled .dijitEditorIcon {
+ background-image: url(images/editorDisabled_rtl.gif);
}
-.dj_ie .dijitRtl .dijitTooltipDialog {
- zoom:1 !important;
-}
-
-/* Calendar */
-.dijitRtl .dijitCalendarDecrease {
- background-position:-48px 0px;
- margin-left:0;
- margin-right:2px;
+.dijitRtl .soria .dijitToolbar .dijitToolbarSeparator {
+ background-image: url(images/editor_rtl.gif);
}
-.dijitRtl .dijitCalendarIncrease {
- background-position:-16px 0px;
- margin-right:0;
- margin-left:4px;
-}
-
-/* Slider: an attempt, but Slider is broken in RTL in code anyway. */
-.dijitRtl .dijitHorizontalSliderIncrementIcon { background-position:-16px 0px; }
-.dijitRtl .dijitHorizontalSliderDecrementIcon { background-position:-48px 0px; }
\ No newline at end of file
diff --git a/js/dojo/dijit/themes/tundra/images/buttonActive.png b/js/dojo/dijit/themes/tundra/images/buttonActive.png
index 15002b152f4caf7ab20cef32419952e8ffe95eed..09417b1a6c658f762ccf98e0c1ba919d00e4025c
GIT binary patch
literal 129
zc%17D@N?(olHy`uVBq!ia0vp^%s?#4!2~3EjvmefQj#UE5hcO-X(i=}MX3yqDfvmM
z3ZA)%>8U}fi7AzZCsS>Jij+NF977~7C)fP`rppWl+{((zd1AuMJP*R%<7IDrVPYtC
WVRjUq$-4-soWax8&t;ucLK6U{xFH4r
diff --git a/js/dojo/dijit/themes/tundra/images/buttonEnabled.png b/js/dojo/dijit/themes/tundra/images/buttonEnabled.png
index 2a0251a03b7f5ae1d9b9f94aa41aa312ecc62255..cf0eb20544de3c20b8a2082af0f474256b59c0c4
GIT binary patch
literal 120
zc%17D@N?(olHy`uVBq!ia0vp^j6f{L!2~4xmL&cKQk(@Ik;M!Q+`=Ht$S`Y;1W-`R
z)5S4_V`gZNAs2%IPfOqL|I-)G6?&oYDCvsYOQ{uAIn44|>B|mO%6rPCJ~q9`(^K#n
PsEfhV)z4*}Q$iB}Iz%B$
diff --git a/js/dojo/dijit/themes/tundra/images/buttonHover.png b/js/dojo/dijit/themes/tundra/images/buttonHover.png
index 3d2a84ada23eda37ba53cba721e4d7a682985096..b074e4ede889177dedcd80c787fd7fd3fe464f52
GIT binary patch
literal 144
zc%17D@N?(olHy`uVBq!ia0vp^j6f{S!2~3YtcsL@lw^r(L`iUdT1k0gQ7VIDN`6wR
zf@f}GdTLN=VoGJ<$y6JVT2B|p5Q)pNCpYpQFc4^P==m;h*)Q$h6|_Km!KO*sG5dY}
pEcQM!wm<w%pCx7q_xDq}>}rwbzdjzgZvxcK;OXk;vd$@?2>_w`Es6jD
diff --git a/js/dojo/dijit/themes/tundra/images/calendarDayLabel.png b/js/dojo/dijit/themes/tundra/images/calendarDayLabel.png
index 2cbc3ec92757bc4589bd8655938f1b3c99bd337e..c1a1553eb2b4f84d01046b749d81346516ab374a
GIT binary patch
literal 161
zc%17D@N?(olHy`uVBq!ia0vp^%s?#2!2~3yhcs3IDajJoh?3y^w370~qErUQl>DSr
z1<%~X^wgl##FWaylc_d9Mb4fsjv*3~tOpwf4;u)uC{Ee=&-&c@hoJ{1CB#1PZN0wk
z^5<KkS9XP*f2R~FyW#bdjsF&2FLKQ<Zw#CIJ*xGz)&uqj%=0W=zJ4v0SOPST!PC{x
JWt~$(698r%J7fR=
diff --git a/js/dojo/dijit/themes/tundra/images/calendarMonthLabel.png b/js/dojo/dijit/themes/tundra/images/calendarMonthLabel.png
index 87645dbe424d5a2ab1375518e5332a4aa45c2a73..fd2cf0ab360fd39139ac5772bc5567d79433f951
GIT binary patch
literal 162
zc%17D@N?(olHy`uVBq!ia0vp^%s?#2!2~3yhcs3IDajJoh?3y^w370~qErUQl>DSr
z1<%~X^wgl##FWaylc_d9MJ}E$jv*3~tOpqd84NfW6z^@Wzf@Xqp_+e&*DBvBx0fwg
zdmz{M-4@}X+dN6>MH@_;a*Iy-Ek10vGbMQEn=2E;eCNF5`(d9Y=$glWVFl1U22WQ%
Jmvv4FO#q1bHp&11
diff --git a/js/dojo/dijit/themes/tundra/images/calendarYearLabel.png b/js/dojo/dijit/themes/tundra/images/calendarYearLabel.png
index e0abe3ebaa5ff6426911fb81f347219845aeae61..dd344f54c7c6336b64403f1bc54cac3247f5ca5c
GIT binary patch
literal 172
zc%17D@N?(olHy`uVBq!ia0vp^%s?#7!2~4D&M%S!Qj#UE5hcO-X(i=}MX3yqDfvmM
z3ZA)%>8U}fi7AzZCsS>Jiu^oX978ljSr0by9&ivitWb68pYne0cvhJPZAax!(L<`L
z!3U#RqgdB4g)w?JeFc)M8$u7f`k2_dfh*#tNU;BoJptMx+CL-|`3^AtVAP)xz$4$j
R(F<rYgQu&X%Q~loCIF)jG*AEl
diff --git a/js/dojo/dijit/themes/tundra/images/checkmark.gif b/js/dojo/dijit/themes/tundra/images/checkmark.gif
index 77237aa5761c1e28e9bc0d23c5ff239f3c4a59c6..ae6faa95abacc550e7a70e21906d97159167dd6c
GIT binary patch
literal 2060
zc$@(Y2=n(xNk%w1VZZ<o0OtSz|NsC0{{a60|Nj600RR60{{R30{{R30{QUg)_xJVn
z_4D)d@9*#K?(XdD?CI(0=H}+*<>lk!<JHyGo12@OnwocrphrhYR#sR1{QYTaZMwU@
zeSd_^&(^!Y$AE%{N=r@b?(*j7?BnI>a&vXb%FM^h(#6Tpzr)Jg-{#lb;?>#UMN3tl
zsJOYo&bh$Lyu!@M&)Jfdn%dps($(6~)7Z<-)8yyuFF#g!iJ^9eoqUX=e~+etkf(%`
zsfw7baeRznYIl^Ov@$k4nWeXbjGCdWy`-<dr?SF|lc1-uz^t~#qN=vBxy6>8rN_?L
z%Fx-mzQo4L(8bBm($?H>adhD1>fht(#Ky_*@$}{A>JlYB7%D>|GfO2lPAEB0GD28A
zOkqS*XL^gGa)Ov!Xn9>~dwq_if|96(m8yr9tA>@SOjKWuoUoFhvzDW^eu$QHe276t
zO@oV;ueryWp{%sM$+Eb>(AM74*x<Ro#n05+&ePh>(%H+<*T~J(!N$$l-Q?HY<I~vR
z(bnD2)!f+I-|6h|<>>6(-{aff;@RBbbbybcth%kZ#=XYT-Qwub)!WO@)Xmh~vbVgw
zz{84+j_U33=j!d?<L2Gq<MQ<O=jrR)-QSLnkox=lsj92>_xMFdM*aT&`uh6#`1tnr
z_Vo1h^78WV@bK;J?d$97=;-L@=jY_)<l^Gu;o;%n;Naii-`w2X+S=OK*x1+C*VNS1
z)6>(@(b3P(&&|!v%gf8k%F4;f$;QUU#KgqH!otD9!N0%1y}iA=ySur$xwyEvx3{;p
zwzjpkwX?Icv9YnPuCA=Ctg5Q2sHmu?r>CW*rJ|yup`oFlpP!zdo}8SVm6er~larB=
zk&cdzjEszmii(MeiH3%TgoK2Ffq{R2e|vj-d3kwsbaZlZa&K>MYHDg`W@cYsUszaJ
zR8&+@P*6@zPE1TpNJvOTL_{_=HZU+SE-o%6CMF{zBOo9k9v&VY9UU7R8y6QB6ciK@
z5fKIk2LJ#6A^8LW00930EC2ui0Kfnc000R70Lcj)NU-3)f(Qxzo4~N4!-oqWN^JPg
zg2js%Ggi#V@#4RaAVZ2ANwTELlPFWF97zs>%a<@;k~<i)rpuWV9O&H1bLWJGJ%j4}
zX#s%IqezchsF<{=(WN50jWai{8%n8Et)9eM6=kz$(VjI!>Bh$nA8t_cut3HF50<Lp
z%AFe_?o4t*gW}BF^Jh-JKAAc-%IT@#!Ae7Jv-ax&f(O5>Z6mq3@#DyoM^<(WSu)9H
z#dgh#Fl$$_u_J{XfpRIsB`8OPkVNB#&Ll{a=(s@>l3at|z=797_xo<}<H7gx{p%NS
zU<(MMOP8*QQS_zIr)!rE_20H(8It~H7?v62_wY!^m;ZQPJb97Ld_{;E!53<fLQITG
zI?9CXkZ3Fci4_DA2+0z>eMAle3^vH%1ov3O;9U+@=pat3WT>Hr!nl&5UmJ$FAyEmG
zXkv+r;J`$Q*q!L&iQQQfUNhsQGfp!AWMGX*GCHLrkKx_oj5f~PlH-mc6*FH=5fmfR
z5&KPI2NHHn0>CIoh~&nA1r`WNS_-Bj=9sBGAdf%7h<O*8Y?6u718~L(r!U3C>6e^%
z%1M+0eD=ww7+g%jCw6`o>L*m)`~rY87_j3g2F?KRi&p<6irAzeS$c~n+;r-Rk(hqe
z%q}*$w99>NKmoucMzq?hmHtqG`410tbZILcZykinuDqg>jz7xqdRMQ+_WEX?6Vz$v
zLU}ez)G5$LdkPR-cn~di(q=0yRO37VKsxb+8*VxPJTMMO-6Cc#y52g|>AR7x`_VJA
zlnTKt&w%8^B>*7d#=rj}0l+0bfMmfWwstuQROIj~iz}!sbAUF+9<;#47-x(zPOWt8
zaVy5a^08kZmppPs7-yoz0(xvwN5<G`Ec3-snS%fT^wguX&h!9)fH@%9jM&dX->l8M
zooeGV&>uy!q)ib-1JVxRrGduPSErHV4j_@iWx`fKLWY7DJHt;ns@T(x#&>D!Hcl@M
zQ*SW3#N?N~FcG!u{vBQ<feILA5Q|;0gmdd{JN+b{csu2u`%$`s$@@>b?jjwp<NwfW
zFTVQnOGHLQ3|#O>2ZK%E!U~?!fIA25Lry=mWP6vPwBr;(1iBbA3@yXl?t27&{Vx3P
zM2T6(7GD(6MIvls*XHwxDq4*{2UPD*HIh<l>0qH&s_3TgewsZ<quP5aNT~ww1Y2aZ
z^#lO1f<&w7R^X~&pWRfijiGnF=s!-b2%s#C5wZXp&=r0;paKs_lm<Cr3of$|b}U4}
z7=@=A7x2dgu=k^o^r$Hv1WAvCL?k1H@FPlsnv+5TCG`ox0z!BnmbCP>E`13k<Tz0|
z=y8e{-DNxNK*WgzhA07A{DO!`^a~P~n8b<%2M%FCP6MzbMdWm+J?VLmV!-2`^>~Mi
zS@dFjp5~JJ+~*_t*$-0s^B<4|sD@!f5Dv97fgm0PF-Q?26Pc*QJuZ<bJu!q(u;Uz^
zbjLf4;S6RdlgP_>Ml+4<j2A@}n$eWzG$c_CYg_}HHUg+Nx5>?JdV|NK+@+L8vEA^7
z7ra#pk0^M133g)Xl0$xkE0ih;F0V3`uAJm6VL2m7%5oN2m1He#$yIL>l8}Qi6Cn|q
qh(w|(O^0lxBOJLVHZii2ZhG^Z;0&iY$4Sm|n)96KOy@@e0suP?hEx9l
diff --git a/js/dojo/dijit/themes/tundra/images/checkmark.png b/js/dojo/dijit/themes/tundra/images/checkmark.png
index b55e264a2cc885123b69f7775f43f828432824c7..0307109bdd85d2cb7c24da0d82d2d2ece9268558
GIT binary patch
literal 5529
zc$^(rWmME(6aFFHAsv!Z(kV!HBi${#q@=WTBOncnq|)6WA-&|%4I-Tje@YtO_5E;X
z&YijE+?l!0#JMr=H575ND6s$lz*Sa~(?;-a#3H~zLr|$rS5^eWbX79)008Wl{}vJe
z`9=-^Seo{-vhUy9xp=yG*txjUDa*>zxw^Z6?44`@z-Ku}2dt}eKq`Ly`%*?VIyhC;
zMVkbJPFp4}m^g`<ogR}wC7QlqiA1Z1P+lH|YA8P%IUynV3yBs7PAt|U`Zj%GLfH4{
z*pd4U|L>0T9oM_#PfZIFdzBYC4HM|y7&z%l{91y+IAt=g2>*mZ`v*6+xuim{m|PKd
zH+-P?cw|HZZUV)`-Y|5dcL7K~GuRkFw|aIr4|UWt{-I2kDN=AaQnzQ)TUCr;VnE6-
zL8cgxQa}pM$z;|6@=*ZGQ5)+m;5{c`$r7|X0|e*XWcecjCaLr!Ncl+s-AmhOIl%56
zP&uI=D-Rg*0K_2Gei2}i6W~!c04V{rEkHMn0J|Q*zyWx)q9fP<6o0^Sh>_6;2+snD
z70wOB&fZiL?6D&vl~pg+#v~#iVuHcxhHhZM^@<gyO!kIY$m)d^M2f4|H;aNVL;(NK
z#TWqOCy^k$y?FG2;Z?(6LJ7@y7MzE_(4HBrt+$?bCMsN|0ARy2aO#PJyMZ$J9a^yS
zQ{n3q6gzY5{7=_$pn80%CLsS{+2F$UUu@(HzP2qb?QCx^s`Sg4SdAEbeggMebQ?T6
z-3E$1Twnd^+GGmhGYe5fx%tyOcBxiGJ&}wVZoRsjsQA!={ro^P!_cp6-Db#6yro6t
zmLLcDa=}-`5F?Y!Ht>4-`NQTq$33#dx*$;NAc5qc#93-)gZx*Og}~6Wd-ECq&f8sj
zW?3<igYCjLCcK|dB_9>@UjxA)<zzPiFqdQE(j94#gkk`ITz&|9tu)nT4>?CS8g&oq
zY7h2<rBJvGQ-7}vfehA%U}|?uw#rZ$*2wW%8g@(WSt%NUZY{gW6jwa1UcFX4aaa61
zD~#M8){YQN6zL(1msa%4(MZ;@hKvaqWLXh6^gT)_L~%@X!_mZA45~?jO1#>!x^#L<
zH0R>(FGQkD6@DhY8v^)3A0j&xc~e8`wZvy}nq=Ebg(<@o3b7|Yc=AFLN%ONO-5V*z
zzX%oVO;*_9FDFXKLV3FP$<g`yop`tg`(*0ga$u&|jMgz!;#3S$*6LRxx5r%BOw@U!
z5QWHhV+x^o%g|Z9l2$TQGt^jADy5@l5+Gd06vjjj*Xm_qNGVlqWd2Eb+fQ!I#~Wp+
z#KAaEl=zaHz&~2HUzmv~MwXAI?duEWx*xjJMAHh>AGH||ILfjGlqeZfhL=A$)}xE0
za?rgQirCKC?%U?yrrM@IH^IuWmU8=XqqE7XJ>sB3u|u#Uu!Cls$tSJ%9iqKfTA)iP
zm}o3hRnV+mqZL*9Qs5IrWIT*iS+%IDFl~m?j?C`bzGmO^C*fM!D~*gvgXz%&#r=$Z
z<V$ZH+(?ozXf&9WBAXnY98BR&UX!U-OfeHj0oCOZ<~_>X%fioc(KBRkW)C1q8o^3a
zNn=i<V&~Q^D=#kpU5>4Hp*O0VSZ1#CxmrPwUuUZfb2hy~uRQ1dkq(s(xa?hNR5`fR
zMOX4ipwVLtno*xxpQh{&t^7KRt&TxDY#WLO9}ap)+=|FgA%gwPb>m9`UhM6ek2LLZ
z;^k!pBC`A{{00r$7pWjg^sP*{n{S>Pn0u@x85e=Ezll%THrc3(1=QMjZA~4^(=*Zy
zE0ij<Din`8g{t8tImMmw?MC+@c+yZ67E=~Qa3TyfXHREIXRQRQgj8Kz^s1Vx+_8wN
zpk2=U*T<5R%-k;X;9NDAlHb0adw0~IxgT{Oo$pGn6mbmE8gQ7<R&ZeCVgrJ1E@Cv?
z(3LYSS+hPV*&?entBj5Cq_!!s?{f<A3iw~_2Tiw_wwwo@2fs6;G1D`vsvoMKK(y7{
zirI?asl8K!j*pEOj?ZTaW{dMK@a<*qWiMo}w^$nc7;`k2Hn-X;*KZpa8=W+Fe2g#_
zF)A|DGd62bsLH8&J>Oo{UP4&Xrjepikvk9Wt37KTZZ2z~sNGpaTd8h#ZvJcqwk89&
z3{>}>q;#fy{`oonQ5+pNY6-7`#+WA1qtTsMRA2Nr1orJj^7FuD`T;lCaDrfBk$<cC
z<tSUfeU47{j3Sr}+~yH>5giw!8am3AA;FbRHMlm^xvk=P<z}|wH+_|p-H_c2FI}lQ
z5jwFyiCWDY6UbxBHRAV}>>HB(qqQ?7iJh0m<G5ZKs41%%0&d!4<hJ2XGN@XpZ7K3D
zzqUFhllUv)p0_2jB_{lv@3)b~m~eN?P|K)hpG&Sq#JX${<MW4Szvn5SB=|KF7&#_H
zI>h9~{f%D${jUT`(G}aj^-FN+FZpfKB+`kYRiQgQRrGd4$6u@HulF)xNici7i1&f}
z^ONXSyH;_1fjBG?Q4t1_k_oQShLlsh8G_zZtFj*Ja(8m+a=){|yqY34oGOCs66IVD
zV#~rm1%65na)FG-<_vQTm7P?nMY!0jg+4lUtv|poqBe6jvA6umGP#G$Tzv~*y_XRs
zq-9)09HQw`YS9{RQ~#4DU@s;8^7{Ox_v-{K-(H$tFa!6L&{XuItSS2|jdLY-b-(1}
zqz*w}rUCvUj-9q}ma?xMYPf1^*`m3m5HC7sK5@}b-mv7PuWmBs^y(?i;6v~($ZNFH
zHlqG%;A311_p3DYVaJBAm8eFXSj{rU`?|)g3+(9iU|R#wukn}>k@Sk(H{<ZJhLM%8
z!rxBwp5a8jL>tM?MUkoooHT~Jos|wE^<r+mD_C13sBa?m(JIASW1HEX=QJze1{u|X
zoy>mfjv?kfBcVM_NRCI?dRRLVpO01-;AWbJ+(zq7R(Fv(R1zdHvDL&YWEmtui>#|Y
zJ5*6FBfqj%Qya@F`rAHCfTlqQyT3VeP4LpoGj=oZKH@GdH{!1AH^Q&}%CB%|jI*w^
zhc(N#eg7ra+F@HV3>$wZsry6sQuj_*=wy1W$!g)|<J1Y2f5%^e<GB@+j_XH>;jR@u
zBt7*x(46hP@_oa#WOYpW!A<(Tvssmfvl|?WJdON_&WP8%&^9|qGcB&GojCvIND&W8
z+x3)l>dlEOgsT_-ZE%y(RnB+&;2LxN`W3F|vey^?$_?}xS}z(f4Yz{~<Q$@qtpm9?
zu{QasIVLeRfB4()L2-o^|C@lAk*~^y?y&vxLFh~h_<Z6^PFl|AK(5<W%ay`r|2-Sn
zx&yw;=}!XBjcNJkxV?8B?_j3qt)A!gD?2X@S`8pIq884Fo`+&jDKnbT_HXTw>NZoy
zwiCb3CV$ZN0adOrZ0)ks_l)#;elAx;e691s&*ggH`f8nYEzq6i5jNVs<jrzY)uGv8
zaVZ6tUXoplnv*nnT3tL{4RYxA&cB#iRlG)v2%C6Hx=O^CMNP~~9F4?{Jj#75AtJIV
z>Hc`|P$E0=VS+iA?5Xf+w3>{RJMd=iXaP2rIaQExo{{p)IiTqAu=|LjW@WH<@Kx8a
z4?nN@rT#s<$9vVA=JfkIzUFoST@dTD-EG~K&Sc4b3PnoFGYWF%#e)q$=L%xpL;*{y
zO9Mb%LcqON3Sv)Zqol140Di9lAUF&FZl4kS002Jm0KlOo0ElJ+0GUg&#ef20ENxVl
zlh*ZFK8E<KnJmyie{}_#R_FEOapB?#))I!XVHd^DYY>(*#};<GO2z)vP&bqLQ7=$-
zPUmc}T<TE%gWf*15tFS*3!>*ZnoNq8GtE5RU(RFyGNLJ%jb;!FEv!fAn$l)#?@7tk
zskSagHofdtS+O1_P8&2a_4o*T%t5cHtK$t`X{34QRSSVYK4#ZcSA(vuuh)h0va_>!
zp3hfk*Mx$$i@+~;-PWH<29biNr>AYh;Ba_BLWfgVSsB~SeF*w1Lm^3CUN`6sBe!_F
z)6-6i<WC#1xKD5JC@CrbF2euvL5eTFX_R~^WQ~(!I3S6Ua~2d7WZ7LoeG%fH>|$?U
zc77X>-D&PpFtMj<)3EfN8m}a7928VGWe1brv^{D;3!?S^1kKGd0#n%JjeCr@*(x(l
zFp!@4M+B5RKbz2^Tyctz6W%W8to$7lHM7Nw;&*|;)04z<<>~VMZgsUy9uKhNeDHv;
zOcV>M9&M&dDk^uwFw(7EwjUz~HA6vpl0g!q)^)QfOh#RSkA4jN{4e>ka7g1`%hxPO
z7R(&PCeTWDX)&kFIW#R7_{Y1rxEPF$k9X1&U^Hr%rG8an%4fyWD7m1A6w}rlS3y)W
zxE^DfhQo@AiUuPd4uriyMkVkorbL~m|9(=-lzp|)tH)@z_mAzd3$%7!G`!sHa;7R8
zE?my3$ua+7(b6Is2Lc`Xntt^40*Tf!3!)O$5eV?7@CixWhFkUPHdfq~#S_)l{+)cM
zE^B2GJc*G20yR*SXyo)3$VQQhU)%<G4<L<$__y6}X`a`8?j!>~<D6QwhBJO@*Z=T9
z8dubnpKqzErA3GliZMUB<36<G?zC7NvcJE-IK8%p3y@q>N(u{KN6HkGYO@ksJ@xNh
z^z2<EK_DvR@q_H&r!asOvh#U+|Ic0QHlte+ZFJEl4-RE06-7j1$=Cda4HZG7-pGA~
zSN5RdKr{Wj^eg-dsqp<86;g!X<RV9WF}bJc%?~`D;$ITq0BX!Hg`Ahe7c7FrtxXc4
zDU+l4kJJhcPfvj#Y;EP8sPKQK4jevTO<_8%1p-anVpMg`g<CFmc8jvfA8tD?K0n>=
z?H?ZYZf`SbYiqwZG>ndo#Udsl>9OQV6&4UUMsj7Kq#ecxjm|zjI_m501{4$(lhV`C
z(o|5JjA_#TVUGv{WjO*y>%c*ZjTP|%r_avB*ti<$Eg9tRS1}F572emlTX(G_UL|A<
zv0<0GY*@1tJ{>${3(&D0sQDUUu|>Pb%BxoyCS8-aeS;I$R*!w`namtJP48MzeXYAZ
zredL6A^H^&!yjby_4R8dW*-8d>qlkK&C79caeLriVbCqqqx3#S_R)i9SO%Vr^>pZ$
zOF_c>y!{)vm%ovQ2A(tl3YU3D^zJSQ2M@0o)L`Z6N-#b?-s*G4fDtN%IAGPXGFo`1
zY9tn5VL@AM+V&!>2S|h>hxG)%F{sY3so`cny|@)pEz)L~mm9IJqf1l4%$sNtX$%C-
z8>QzI&|!o|xcFb~PsdxX?gsY>M!97poBbpVSgAmluKkM8gFrb}cMTc_S?=&K6hhfN
z%es8idph1DPt@B?r1u5}QMtLV0?r1=SXo)4$$=QrKiY6+78Zn6NqKoeCIN+apQ5NH
zEAH{1eC`MW3!ZLc_h$rhGP1HTfmXjOb_4>(KpwT3YRsmcek8zGgd9;W3eV~|NF{lA
zYFUdAfF>s=j~?;w{4EnBN0iYe#}Kk`#EDa7bKKyoG7vx8Y~j+|*oW$`l;zbrStE=D
zq+*GX-#cY?^=*uqq(F!=o*=WtZ>eD&rEHV4v&24PullWdMMXs?7Z;;bSTwD-2IDb{
zcvP2qDR^hUC@|`>&m}vj`!%l;kMTL9Cys_FNflgJtZ#gucna<N)P6Rqcu|<ZKXvvl
zM<Yv(85!{O^6K4j=X5|+u8+q)Lmym4bL#B^IN}Bp6A~1*caIp)B=Wf93rkxs*<wQx
z6%KpFG|OXD|8*Py-0@P0{T^^EH!8UYX>f-+!f1*m_q;}#tgQl&SV^s6pX2cFUj#f}
zEiBerAxk{`CyTJX<7P8%(oUeXyxjQG*07Aiuw<rZ!<CKz;}4WJDBP3_J!7;JP7xq-
z7t}r<u{pALc9!=XD@7M<fY%u}K0tN0!l_wZDj}~$8aF`n%}N&he9I>(Yr;YLp4c{K
z5L&lro~)^=8aFh)pt!l@^tW{8;EV8L52&H9kRxW>$Z6&;Rh+q-_TsUmg?^mNvBYvQ
zT#3Qg>W(Q9T#%L3dT9?rV>%_J#X$ft44aJ0(!l`>4ExqoX9KltSaQAGpNcM<QmI55
zghDsYe0ccyLbI|cd^*jCcFx1KGj}SHBph$CNLK`4k7cMVRFVS%&d?s@3FvW9;Z}wc
zQ>S0&D<FT$?vHz$)Qo3st0|YA0ECMFhdF+X+%#2uqHUcIBC&<C<5BVO(o{&&_FUhZ
z38+K&f(3B#qGm{pSr9D)SAieMmue!Fs3C)iXx83zm=l-IzW{I)`1=_GGrOdut`g!k
z2a6<yBrrpQ56y@HCgsf(O^KeV?~1&<ydiy2_*;K^!juppq5!-d(9%bDhG4MB75LzP
z|GBy@fQyhVyG}a$(El3@q0B6)e0%l;eOs%Foh8@0dB>1cs$Md4`xq$MXv_)A6^~0!
zCi?F-AT>4h&+$^jq(jqx_m7hYo`Fe9v!wBfX%2&%a}I*Bad8E@>^(c~2&!djiu12*
zfg6@AjH~p6Ds_1XFuEO@?hp@^QE(+AF(>ra>GJ*&N$l^Cs95KLRw@5BT^lum`uNR!
z_c>1b^xr))IknJTL;$;5p62T&3I(;mAe_%ZbU<J9@I*=Sa_@^^x@gO#CP%Wrr|XFi
z4*|M}^cKhFe3SOV?JYHHnhHjQ3;~Lp0rEe*d8fVhvAWlJUo+Y}zy5Gny}vL!`>l4#
zsfvb%CKEq&G=sZu!}ZVk&ZzX>>HdE3ILHxKJSo0k(c{U-x5+quWJKlocPCX^TAK7;
z;-I4d!~>`An=oa(YIO=C3&|rzX#E&)fcy2kKm7t*cJSjvXaK=+;I8sFza2INAI`t<
z_PVlxxHU%RVjxQ)T0Bc8g`(rcHF7j5%99izzK$Q9^?#)Y5InjQxvnMRjxr&BZMs_0
z6~iS%MwvIE=;wE5_HM&$@p)~|<jixYxE1<|Wso~%*rC0>-HL~N#KYZPM$@`r;RrDV
zJP2i1=^<u--*IBf$>=VkH@zvAlLELEbBAE^-G3s+v*{07a762Cl>l)~z}|=FqV!n`
z*tjn4=YgoJ5IX170cSYA?1B}fHucSd1i2s4m%1}$a>N^e2B+8wu^q|QP>nM$kfc6-
z{J6?J0rz6LJhy>c)Cka)JzFDDT(=U@NCK-J=I`Bh$Fe%t11{9<{r&wH&8Q3BFLt@C
zcX^-aJ?&ma!Z|rP7sw-He8@`c>(5OE{>ftRBy~?86<ew=D}H%Ltf3OUSBBTn{36hM
z{-=EWwcgxP;!=CLEcs01MHa21;t<qwFe5K^^yEBw-y$6}GN|H-f8Vv%@(jK|1)|2e
Vml}Gu|9!p!%JLd=)iRc${{w)DqFVp}
diff --git a/js/dojo/dijit/themes/tundra/images/checkmarkNoBorder.gif b/js/dojo/dijit/themes/tundra/images/checkmarkNoBorder.gif
index 11dc80027e917ae21b62c878cff935e4a06e301a..324bfb3cd35ca828bb25b3d690f8a29a902a4cb7
GIT binary patch
literal 1658
zc%1Fi`CHNl0LSq!ihzU(h_~B=h^9VjndB(TzyptZ6q7Qu7HUGVTxwKaB?O*%p_#fo
zKn-<h59RF9N5`RgP@0*f=J3X&<#NuNu551p5BqVi-`+oeo{wJug?KPh0U&`5V8{0M
z_LnbzcgXvC2ghHirv^tR_Z~eJpPI|d{UN7VSbV>}PSV=_O#OU#qDM9K?zi93ww`8=
z-Z-~ow(ddp2dVqLP9HfQ8JkgmnP2A<%KVN~k&sc7R@{73Ac?q`bdHshSKXGHD-zVS
z^NZ_C9(3H7C~I5##ZR6$cMjJ+dRkJ`ax3eev~!?Oy*RG@Fgo`~xu~g3D0$qbXqWY9
zrssc|ntP*}VQ_1&WHqD~OSz>jcZBV1PC=3I(F3V$bbh@|qTKqjV{2<`b93|K$B*ml
z>uYOktE;OkD=Tl`zFk^cT3lRQSXj_%we$1yv$M0))6*J_W@2Jue0+RtZ0z;x*J`zT
zXlQ6~a8RXE_4W1j_V#vlbt#ofxm+%j$vQeZ+S}V(TU%RNTAG`io0^&=5=moYqgX7i
zuCA`CsuBnU1qB6pd3m|Hxj8vGTrM{yB_%mIIVmZL&1NSgB(PX4CX>lvFk)h2!otF6
zG#Zsk4Gs<t3JUV`^Yirdba!`madB~WcDA*(wXw0mVzH*CrWgzcg+dt`8p7dlC=?2T
zK>i&I_}_oW`Y$jD015%8o!I#V0NVzv^{xD+LM0Do<aoAUD(cQe+5}ekKdR}ugPI>`
zciZ#AE6?hPBlu0csGPuhRTjR?<HOLNCdo5WE)SYZy!xxvW`;qjt<Sx<$n{0~P&GNz
z<Uk^(fm#C{%o^U`qrx~xow7K))(rw%BdxYh$4kAlFfQ~qe^d>x+cEJvoEGKlg10>4
zB-3}pbI!}XyPOtO8+++Wy^TK)SS3nHZV?rP^22XbCe6BG1SFlv;Xp3vUnhaI>6b=G
z)V7$cth~v+!P+UJLV>$4V=S+TqU{vOG4Pce5Jajl&WSlup`7bzBe@nigkHyqXAEEH
zovFAOqF67uZ5>#>?P-7qcasZb{gXI`D#*qHf4IRc^B6!#{j|Kqvja>8h3aoK=eG^;
zSd;G+BBAAg@n)IHE8hk^h9?op0oj2?B7F#WhICvfsjw>%FOD<v@?TzqnftG>eN$Gg
zu}XkKBlMv`TI>FNk42OMeHFo;=iCB0;PaXG4O;V~5C^J7sE_?5<`Tk32MlUZbl;2k
z5eb0th^O3L`1~ausD25EWSQXVO2H%yBgqKA(`+aTgo)~}N-;qLs2d3O9zhz!@ue`<
zzL9R3zPpaXKH)ygx6sYT`T!ow!bY(N7|Vz0#sc2u^-3w3%(Ta4qBA!`_E3U2+aV>U
z;Y98T0%IS?*TZ(QZ1U6g;hLmrge1I(0w-K3%GqD;gr`ytnU|c33isMQ9u?758VM)Z
zHHs_4kyrqKq7O&Y-t94?Q$ZQc#G6R6p8j#FE=A|zEDYE>^f)68fcw|+Kogn5B81N2
zLUUxG$1KShLLxzkv<eXD>)WvGtQi>{N2Zvepz_O$ANZK)&c;ymE*~Tp5io<-Sa1pG
ze!1KjuZcSd9WzaM<~p`cdg&Wjd94DqPX}T{cT(H{r~9#zAjTp5ulVW)BMglV>In*v
z#*qhz4x{1G*~YzQQQ-2QpF|guAeUlFjqA*r88=NPNVVBvepM`(L45i-zR?uz1l4t+
zI5g0_l{go7)cxeiu$XJeuy47xqf<4NC8K9zja@!1Lj+)~mpJXGkN|k)T{HvM`k|;7
aHb@)Eu3LKe`F-cc`_HS2cV8m`kADCn#9?s&
diff --git a/js/dojo/dijit/themes/tundra/images/checkmarkNoBorder.png b/js/dojo/dijit/themes/tundra/images/checkmarkNoBorder.png
index f26aa57df4637f93fad361792e7a788feac5cb5a..9cec0c0aa62a3067b98c3fa071965982200e44ed
GIT binary patch
literal 4401
zc$^hhWmuF=6nzn-OS+{5T)Mk<>0Uy*V+koi=~%iEsRe`&q(Qn|N;;)Q8k9y#>E>IX
zXYM^SbAQa8bLP%Wtd5p40WJ+L000E4Dhj$N>_QnaHYUo;t$T2w0LMec*b4ygNdFlc
zko}Pg0C2UPAP^lLM|W>`FGqI|MpX!e(c_J~gVSq!0PtPR)r0Bl?NLZyuAYI_V?xu^
z-F3;a8Fj(&p=2p+ASN7QwHT&?1#)QjGet!V+M)ay^rWQF1ac@BejM&R)+W=Zr0~L+
zxRKjm0fjC<+Ap`q9-8K4c0QlxHcVi3VdH102ttKJ@yo#s&whpv_6_{n<dK8pvU;HM
zZm?tWx@SQHu7ahcIGMY!Isr7_89Z#DOEag7k1qO==r=ga3@tPQt;;(_OdUIv43P6r
z0+#@CN@$_E2sS++9|N!&wYAv*bhrU4_K@uvAT;+XD*z2JO=BWQ%TECqN$q1407psS
z^Tew-MZky;AahXf69?wG0X|hj2Nj^U1?U<l#;XUg@c}+)Oyo-dBLJ`(Vqx(GBC-H7
zr4vJ`zns;?J0KKOS@lv#R&hnRDK@t!mZ2dJ1IM^3B`2AP^%LuCIi4QBENTI`5Yf-m
zZvc>=LXO()>AmkbVfFa9NK!MQCHL>In2*dhHX9FH6O|rv0PxE@c<O<Rw}B>95;N5G
z;nRyF3`YyR{I{3!4)sKGO+fzMqT#8>KW-EY-Xj+lwl+8C)%w7u)+2^N53nA~F2noR
z*TGVEm*+n_*ID5L=5S?<tDimJ&NPbYCO+Uq*eq`+E8n%?J>JpJF!!n2AdNs|8&DF@
zB!%pRQ-NaUSn!9J{V%2;?bg@0Zqa4dgn?RT8MJ^D?lN;*^b2)%Vk7Ua^-BOaX>;%X
z&Vh{{>KOiO!sqc=_Fg&v1rX|>`oR+bEEHII^hX+G2eAP_As-H^m8U)HrsC?tr0agV
z+>Li<B@zK<?dt&(gK_Ob>E2kq{2T`6h#IS<2U+ocm!lWzf;vW}dJyvT7<?g=_8_{k
z#?I^JXourq$PZzYS~D%ipxMM3u_R$rW<_2xb*o^I#IrIE$B;pp)l-C3_;us-84XnE
zPo&>G5sx-gYE6+G0tCYDqS}@D)8O?`>F@YW5M-GsO@z`Xyh%H6{_JFm{G7=*jWp5;
zA_Y5>m5xM<$uf{ZzOG#=EWy6ld^`ia;5soboK)M<I_A&#l>;=juRf!<#h%+v)cIhL
zz!kf2L@<27jMfbDDn=ScTJtJpjC8C*&lYh+anK{6J?zY>W$KM=t<SFesB8rIqm5L!
zSbmTslkyS=#6bE)SxI6c0_@25PgLuQ^ruOtm8RWvS@yWfbA(iASW<@<?Of`y#M8JK
zIfo)Qb2oc81vhConNCb`b8X~2i>~z6Idn&y)u^|Kw}iGZ?GXa<28G$WD`f@x&xDgr
zz*Pm!x;4<~GE$+p+2Uj26sqdQRiDylXdEdWFP&<3y<4BHq%&w`P8v>+?kVqP?xLUh
z;1fiVhY!ZUIH+@|u&7|vK2$XbjS}jac<MoYK2iRC#7-7bmb-xws2LPUo-%@)u9nW0
zP7C7IFRv)6SgpV_I5im6PcFC63#wK!5Y*c!$N8R7X;6`?v#&?12P>B>i>`o`x$Dao
z1smVTVjA~q^lC$jp!s!{8|?#(c(&9HzFbT$1eH;5;lh1vbz=*G??7#cd-}F`>5B3K
zafqOrpkagVX_|v9)&|1!>Z7+7&JIUu=4o);D%tVN^_R3ILK;YZdo!1cjLZz9N|j1z
zrSg7<NcCZ9Zb^q?oAE82P<~L2-HcrsmOTD6cSmnQZ>1EsltNQl;=G!t!ljtDpiRN&
zt6S+2BCpdTG*835bk(n8=Y}qb_g??r^``V(8Q%!A0iP9f34feQs$baCU5cJ}aOp1;
zV%{qUDYj0x&ioaTf}D~noK;FxB1&)?Fxz0=a2;?RC}hKAV`5X+{H=MEt*ePFd08T<
zA*nGq_HFFb*pDpX9BKYJft{S4oVlE}7Aq596Rzg6<}dcD^_wOo#z)QVZjmP9#>GYk
zCgu%FRk>9!ezaA!l|Cy)YNcvb=KX;6*8XiCZZ2=3uHBl)T&iw%Z4R=A*-*k-`m1}7
zQae(ET7werrLhR27YHlqP3VKY8sCsfypmYW9{+eG8`OW6vBwKDnjoH-7u;wj9evs7
zl&hCBqYR^jA-%#+W8!1g!$x^BWq5LE2UdnUHr2e(J<WglPoL-JH01OgmMzsBi5xi{
zMKAyNP3XUudB%cXlf6TbpU|x-S-k(!`CQgM2WvyL;jpG17G7K46vL{y+LmIUic9Nb
zN|_6pH~($OY)FZ&3alDieiQ9#8EP5T?sd<zj9i0+usqs5`aezqrJ*m-VCb=MdARA5
z+bjP-rmsn|5=-_M^$Umc3HeBQa{1)2s<5r@DkjIFgZEWTmph2@lyN7*NS)x_ACp+t
z+t%^D!T9Wv(UFExvPm8>Ml@6WnZiC(%Mh<Mg&Tzoh1DDwzqWV{x0*0Wrh>;=YEiUR
zs8x1=$HDm9tWmC!>T7j6aUM{$h}-MVwY$U9==I!nyo~@#1n-c!hhM>X&sk(CML7=%
zmqdn~MvRtN+8=phP#HzSixX0x7fHB&J@h>=X5J~0shD|)8HhpaL<OYj|KT8|UD%Jc
zU$B^K3mL&){=Qv<Kw~9GB99{b9iyv&v_uDg_=lADp5O{5&D3VtZ`iiOyV1|~k@XM#
zZt*R=4Cz?IE)DNLKQ-pYZ3dU@>YH%Pfw1af_J$5$$6`msGb-~q#}2<Wj4Ztu{doM}
z;~_~8$*&L1#Zl^p-1J7<9iN@W>!m#XmT))7pK?aM!u%}tC9WCdI;&lIXqZ_Y+`;Cr
z=>oUt9trDiLUY;2Gr--74BB6wJ2cle;x%4tvc8GRrIjI%jjJYGqRb=@ndeyc-J*?l
zANiWKoYq)g*@v{7aF}-3+g|0)GbPNZ$lT5(bR$?;Y$RBF)p&S*p}54GImWTn7Tyd&
z7Jilb(r#ZmJU%8Vt6!vlrhlU^ax}ftWIcD~Hg!ZB(0(CwFuP>het9o5+__|cW}rFi
zFl&FSdfRX*TOC`mca?GLYF?$~>UlVbK8=2l#X{IThx|TEKP|1VoBV@wUzu?5dFMm!
zu@5(a2!TQ3$ANVg4+X!?y-S?6O9ldo#diq-pMPP^Jby<Iqvv%7XP;y%<>+PKn%bDQ
zYJZcN`tf_!|4w=7InhTUDPupiQ~hD5#l5hZRM^QxLT-9)P%zK+venY3=71gB@ik{6
z_v2P#?_bl3kMTQ_?ULhWCttiz>X)`i4Zj#>*GO2p{`USY^^iKFJ=pfKExQ_N=7K!(
z?`R5exZI=76CGbU>+t(a@%UplPh5JX<J8~%vj6gYjbbJE4g3B0XxoAh`%zW9cDv=7
z+@bseWF>l5*7RX{{&+dWxyvX2bZS}o5;HP<;vwZcnF#VUIV*WIiXdt~PfSK!d|md<
z{oY+EWWsKOEsyfy)5B;rB?WKr)$IP<_!MHQAoC<M^{Z=O@%`_ved?N}ft~?|&S76c
zev7kLw};(6%RcnSg=<9Gn}LiW9FLCIb?17MrMIcnsi}_`=!nxhTS4w6)PEBLCa)<E
z0Ch=$x6oA7n9){6R}%pIUjRU8H~?HfqHqrY-tqy!Zz}+hKmY)x`v=Q@B>=$GP*srE
z_gy?NvDDBrq&p&I?WBs0l|dj>R47P=7D!U16JB`X5Sez_xp5g^@R8a>GmAw#RXpXC
zy1ezd2=u2O3RH|;wY};bzgWC^O3oWY32rCet@u<d%zaWb`Nt}GjUlZ%fdZj!N^+~-
z*>bxjdAWKldAaNrj0?o!3tZ`>_+gv=deN6=QDay!>nvZa`;<DW0F(|YdsX?g!=fgk
z!>#hfI73<qn@J?cb=tY9vw7ilY6Njl{Xw0=-N*1XCF}NJ(*>&|;)=J2-6yRSCRHv(
zA_z&0jq|0E`F)bVE;;5SUM6i_-;KgbK{dK110+(VO?XXX)nD!s&{|Z0Zw_A7N`;;@
ziAtb2<|lA~IRzW#6`&DQjzu(y15P42UK`YWD|h4L<I)kt=o6><A6R{*7_I_kP+sK&
zM&8a#roPFA1thx#u;_laDPm$aF7hfroW)IJ;u{P2WeIGXUu<28mUB`mesm$YkX_UQ
z;A!+gl1r?AN3?S6F~B))`7f9;pcmoZ$#S;8KcNEclRaCVhQPq!py$b^YSAcbjYUV#
z{JhcP*`xo>6BuYe<ul+YL{rL$ou9^R0aatdej-GZD42&fGsYf4g^7vz^Yr@X<?US8
z&Z)JP6%auTX$OQ*c?A&J>)f!xA83~YI0~oM-wfc%MJ9<=wP5mZoA+IPpQcIhqqOc2
zj=`n(L@j@Dw1OAj{ayt9;^M-_*%`!rLz<^bcXuag*081#*NGAgMOv$k3>bT4WW?j{
z$}=rJ9ZpOlT!3QEzrzB_APaTP;2jm9BgASn;YN8oV~fm*`UC#F9Vh0~!Klz3zY&y*
zMxB3eT<uZ(ke?C_Yj?ks1y@!+e|^b<KdfEI<Y@cUxji@_J=nEDy`2B;l)`p00es-Q
z;y+a%$wDE~giM^Ac+%3+PW)COA+o-C%6wEB$Y3$Lfy}iuo6CpZU0N!wxK5KQ3I!+z
zFn{<iEiLWm?o=TZg<Wnf=>LR91xfyjRwQ24a}{=WGQ55J7W#c|P8mX+tc}g|fwjuz
zfgGjtiO3W*I2;L~qVq%tiUzek`d8!C`M=m4N1k2b09GD-iI`r4pnKF&lWSG}A^eD|
za)~|ebl6k!q_(y;l$2eI5tXQ@`)XfL4|s$?OhN)TZ|4~{hHiC7V<U#WAN{*yS^S5j
znBwB%qJ)1{u(tACO<f(Tqf?8Cngc@R7=d&(a*e*VGLdyjx+H^bOL*@um7x|?H83Q@
z^w9qJO4XwJb$8C@0UrJi48Y`~=kpK*QrPkE3lV_G%TjKt4oa8Nv&D(4579#-wwFcF
zsC($4c_7VnILIcQo1C()Ejt5ok~aR_U7t4YdV!z6Il=Wn_QU)8`->9c)>JgH3aGo}
z`g&+|)HM9=E)bAoB|+=u6M7a>xEND2>%4*aGZ$<9r0UiFeqx4f-6&(_?2SZ*rNtbW
z<v7FAz@KvD?E#Jcp1J$^OGQ8PQP90!y5Zh@{A9@!z6<6E)WB&O5TheJSVoc>7#JY3
zvbsBiZap@KQi?k7jIQp3vBN^s7dDSp+Nc;9qSlVJV;>T$88+!bVJ0vo4ziv>%fRI4
z+7-mOksm6aOQKU!Qrg~L9J=V3ncc|;qR}k*-uXXF2s^&sNPT?D0Rn}A3%aV!+dM7~
zj1T7P(A`=j?Hi6KCyB+9dUGXxe!go%6;+^&<;Ypc)ioE2i9b`N%6|gP1uue5$fZ(O
zi}nYryEWNJ>l+#hbT~c@jgLnS+ublepfRXyh?xfwuveHA{zIaoznc%}5xv%^RyO;4
zH~g#bUmLYd20cAJ--`oku_X1;X_%WEVJqk1&@iW*mIWG5)*&J%NBxHCp##rWAWO%{
zD8_ZExuCX|&-sDKo^ls1L|7Hs%PV|1Y4WA)I<*t8vAsQEYs>zlxECfCA)U&i_L~16
z{|*EKA!lj%yxqcm<QxWr{aw0d3%oejM&#yd#s+WGS;gm~D=<GxNJ=Vkosjh+`6!OF
z`i8xmx~PP*th_unb}oMA`}e-rC6w$dcaKYWcD0@w?G}vTiMAp$c=}!o{eAmSE06~^
n0v&SHcJKEv#~8yy{#*hsyA1X(v-TKKZxEoWsHIR1whH?n+Z8`v
diff --git a/js/dojo/dijit/themes/tundra/images/circleIcon.png b/js/dojo/dijit/themes/tundra/images/circleIcon.png
index ca5bfd292d43304405bcc61db60af7a9fdcfed26..6f059e61ec585985959ae5e373a62f3fee8c501e
GIT binary patch
literal 2975
zc$@*B3t;q#P)<h;3K|Lk000e1NJLTq000aC000aK1^@s6R&`wG000U%X+uL$P-t&-
zZ*ypGa3D!TLm+T+Z)Rz1WdHyu&z+KYR8!d&#?QSsz0eXOozR=1mjKdxlOjbBm6!ww
zC4`XB#D<6pj3^?~Y{;m91CEY>j1^HV3<wI?2V@XX#=%iU#qtteYjn+<_ujnu{y6uy
z_SyT~bN06ZAo&LJ_-U{l0I7VDFwDoDzBD?9j_n07zyl1h0D#5L5Ckpp4hItXd3n$?
zBuU_lAOKzsNml@FGJHembnyR4o-GiHB*%nE*owo=U`x0_!YNrIfiylNVd|=6DZ?l!
z3ndqnu#%J$KJ&s)IiJ~8%A8a_N5axO3plA9DR)VDOQx7BVI)w(g_%5VmV|FfST{wS
z%9HSGX>BT(l>q>XB#n!>>_iEhOPC}K5A%@lA^>otgs*tjS1jUYi=>b8NE74;c?pRk
zx*^+$ZeefFr2BHSQn(@!BZS3HW(hfTkF-<)i=P9)=Qn?ng0#1ENt10Y>}_osmZlb8
zHR``^{!K}}{Y)=HKY0exdcMT|Dle@L0OqWuH`~9&R#gGewg~{GyI*3u`vH)Z_}1F@
z)q7~tc}WzB1P*3qSy@@8JTBW*+R#7rKNJ3jzWSf3^teCTL-*vyv&1PPy0mZXw3IZl
zke(r6vAJ}{pNIG#7yk7<7KU--xk4^qQV}VcG9EucVmF_|6Y<jcbRPddnfMRO{-n=y
zEfJ;u1E8)n1#*2<fc)A6P!u9SV)sg2|HHRHd?W~we4{icKF|FpLH~X#Tq<2McnP2C
zJi@~1Y_Tx&^BzjNpaB8M0xD1j8bAja0tT=IcEAz10x#eXf<ZWl1}gv?B!W~R1X&;t
zYygFz7;Fc-KsDG0>Oli&2FF1gI1Mg<%iub=0S3W6FapNGQ!oQwfq4jmun-xdK+2FN
zqz9QmmJkzihP<FaC=7~*;-CbG4~d~XXd_e%l|j|e0jL4`9y$eGfUZLQ&>d(Lnu30Z
z-ogk>f~l}NtPh*POxO($fWzVCZ~~kT=fVZ>Hn<Y5gO9?k@CEofJP41#PvKbvAVh?Q
zXdw)QiFhEvNDLB>2$8i&5mJHFA<ak!(v93iMv!Ub4GM#zpy((D$`R#@ia@bZ>8Q1+
z5>z$n2&xs;g}R9vMa`f-pvh=8v<cb)?T229PC#d&3(*zmL+F#}OXxxLIQkU^gP~yz
zFm@PUOf)75vl>%^*@J1poX7NI#xS#3ELIt7f_1_MV_8@cwh&u|J&HYt9l(xbU*m{4
zO`Ijp8yAD)<MMG8xJKMr+yHI@H;<RY>){>n!FUcn2VaV>$9LfS@Z<P-f;_>1;6w-~
zBoQ_cDhbVmON9G`7epdan`loACGv>tiIv1-#4E&6;v13z$(ZCpiY19j+en8==Sg=+
zFUVxFKG~HVLl%*@ksHVt$q&h|WhgSHGJY}~nRPNXGOaQLGS6i3vU;*^vMXeBWh-P)
z$o9!j%i-np<viqAa%<&k<W9*A%gxGD<Spcb<x}NL<QwI$%1<g_74#Ln6gUb63I`P~
zDvVJOiVnqt!lrDb)Ke}|#;F*p0o9M1L@lO%NA0D~C@LsgD@H12E7mBUQ5>NmG<}*M
zErnJ}J5C#-y<MQbz-<9{!PW)M3kDX<DXA*CDsh#Hlv<PqmEJ1TmA#acm3Jt&DL+s_
zsTiw-s${9`Rk@@xtx8pORAs9csUBCos|KqXtA(kpRy(NHqc*Fqq3)wDP_I(Is6MSh
z({R;D(kRzBt1+cX(R9}2X_jlA(|kf#q`T2m=#}&?`iz#Emampr>ws3T*1WcXc7%4m
zc8m4{9fA&1Ctjyqr&DJ}S5r4gH&3@o_pTmZkExfaw_C4UZ%*GpKT3bIew+TJfs%or
zL9RiQ!F@xrp^IU<VV&VEBa9K#DA{O_(G6qR*v2@~xW>581U9iX;hF3)>0gLmXupuZ
zux{ZngT!!SWHOo<qoy>|K+}BFHq&Qjx@IwEJIuPxKA78>r<m89-?LD#@VCgf=&<<R
z(%6!1Sz~$2ifrX=wa%*D>bbRvHP?Et^=%u9O_0rIn@*eewsy8c+h*G-J6*dtyIQ+p
zCY2e&EMZ=;N87vGud_dG|Hi@ALF91U;WtNyW3pqT<K!ZPMchU8i^iO^omfr>oJO4K
z&T-EBokv`>Tv#r3E{|MwTsf|XTqoR&+>+dmx;=9@cNe;!bf5EZ@L1z<-V^ck@htM}
z^-}PP@T&HD=&kLY;N9ds<74Bq+ULA4+Bd*=hwreTx*yxG!EeUj&VP-6R{$wsNkDbL
zqd?<8VPHoP9ONIgGwA+ey~X^+ZNVVeFL-D0gAjv|^pGDzF`*%$HKC8gEW+}_x|dLv
ztX$H#<W;zPcxm{(2*U_*L}#RIWNc(Z<Xn_zR9V!>QnRINmR^rmiRMMO$6#Y3V-Cg4
zF7sNpYuR|LO>AN8&~k(2*~_o4P+5_(;>=3fm8_K~;?QwXagA~BSi!71*6b?3Rkf>T
z*dFZN?57-8PB~|a>%=YNPQ*LKm&H#eI3?^%m`Zd>tVo>ZdGM-v&y#$U_9e|F2PYp+
z{+JS#(vpfxjY~bnSKue}yV5k$veWtnCW1o2NV-G%uJjpUfbdWTl(9UcT|^ZLL_K0d
z@h0(TrgLUZ=IgA;tP|Pt+5GID9OIm=ITN|wx!<lvt!A(8%+t!-kT<%<ZOwtT(ArgN
zJJ;!~D_A$a-e>)h4TKHJ8-B_+&o9e=xiM;EM}d05`hu}dKAV~fWeSCb!<!v9@7sdf
z!rRij)oN?i)(=ITqHD$G#TCWxO4udWzOneG@|%y_;<xpd+LrF!j@i!NKD5JS$B{Dm
zvfQ$<ok2TW%jxAs<u7-w+;z3Wx?<mM!fx^Ik;=fz_A1?~?N#rp6RQVn+-q8D)oQoa
z&h6ps8QAN(w|SrXzT$mv_w)AOKHzhpwNAgT;vnW==E2AHk@el*GQVv&q;jbE(EG#u
z!y`w+j&wEHH8eD;HI_EPP2#4hqp?SCeCPRHdo!c?Knty<_!u}QKKA7MxbKIK2ORG_
z!93CYgWeCdCn+b3TA|jQ)|s}%wvqPe_Wo1;r#d?vJ5K&+`s3l#TBmEyD4r=jOE_C_
z_T#zSbF=3K=cg|uTo~(I*?I5c(u=pcLc4k|1zfsv+57UvZny4pSDdb#zUpxG)HUX{
zw(GXnTYGGJPX1)`)5%`j-qt?5zV;jTH#+(k^`9MZ8MtuM^XBDSez&d<E*|V3iWs^*
z96LO6n{#{ePRgC<cQfzK-&=nleZS~|+=GgTY7gsvHu||`#CGJ&sOM<Uqa}~-jj_j`
z{*v*_yYYg@<i`~gniCC^mXoKayr*tFS@vZ7so?4Sbm6b^zt%o8eD=d{uD|unES(vD
zE`0v+_mUUNFAl%7e%U!2GW+mV>Z|#=qSwl=kGx^N>3$pac49v39rj)2d!zRq9|Aty
z|Csvm<G%m{nDhJ|65A61001CkNK#Dz0D2_=0Dyx40Qvs_0D$QL0Cg|`0P0`>06Lfe
z02gnPU&TfM000SaNLh0L01FcU01FcV0GgZ_0002uNkl<ZD9?40I}XAy5Jb61#5p1^
z<%*l+|B;d?pE42>Za7g&3OZP3EH5%56r(7+^VXAf4kB`(mSu?`16gSEvc49nPt7s3
zLNd>@bY15(41=)dd$9vZ!*pqyM%uQOG)*N*63Mbm%CeL^&!2$r9*PK<aU5MUH1nwf
z^ztVe0+umoBA`$x))<jq0voedRrO;G#Xh|b==)xZqS!U+i6LMKXrzAt2Wlkl`76>M
z=vQp?!q)J^)x>uSD}QkHZmr?PaY|j+x_=jgai?jzqJR3_^xm(5i5rYJ=nNgz_XaA(
Vh)^sufq(!2002ovPDHLkV1gMt!eamc
diff --git a/js/dojo/dijit/themes/tundra/images/dndCopy.png b/js/dojo/dijit/themes/tundra/images/dndCopy.png
index 660ca4fb10fc1a0a26bd6235a45395031d7e634e..baecd7cf2dc1dae959492ab965a04bc7059dcbf5
GIT binary patch
literal 777
zc$@(V1NQuhP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00001b5ch_0Itp)
z=>Px#8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?0-i}kK~y-)jg#w3
zlVKRf?@f2`0B&x&<{{_iautdrx20@zks(6b)HO9+1eHRwM9DO*Tyx?f&Dp_(LS-fj
zIcL#_AhYsIAN&v%Bm4*6f8*-eoD&tQ3+_+v`@8Pba}ynuluV?efYN@1)4NMha-$fT
zbr~F~DG>ek7YV3{LJi|}c)C4_o*$jK^wo*_^;$H1szvj<1En54sDwh%e-FW>6rTS6
z1n#Xi*g|HM2aV8qwa^UYqj0VOs+l~fULJ*c{xtX|et5qL%N&85KG&o2tqs;-IjR;a
zu`A<@0XfgJkm=7r>Z25B{c4atS_zYcO!Z@S++>;0G5Ac#0>iQ%-J4x;gSHRXA$u%^
zbV7opVKI0^1W9WeNEVrih5}RD6FB>>0=6|P%H9}Iv~U79H{5Xp*ZUTvj3q-nA_CvX
z2YCo0p9nl18*Fx?g1hsx6PC3y6b&DTWwZ>Ze0tno*{h&^(G7KPKD2!rh}s39hXnF5
zlk*82m39@gX<tOu>%E@;CFP(3<Ru6k%*fDv684WZXkEYh-v-wCif9$WCT5U-P0l$s
zE<ii0!QIUs__ro8`fUWk-@!Pr^lJ(I8~yNn@t|e31$2*rgM?%!aU?WSpqZ_&@KphF
zr?VlSN{4t<1jmXaZcx2g4eFyE@ILL#fVGffW<yNOBa_)*jAOF}$a%(gJ(+=|5iy)A
z&bWbn*$#RT17onLi-juow51IcvMd@Q^QS{Ho`ytU0xIThdp*xt_ZzS^${TkdQbarw
zWV!fZ-3v8@Y}Y(5+jT#|wd#sSwDcIvi@=vDO#FlQz)X}b3aLD45Df`;fPq+eV?Fm0
zlvh}0-r-}4D_KV-MGXaVI}$i~2SLU{af`UjS_-7<4xjTMoj1y)+}<Z{00000NkvXX
Hu0mjfCJ0*J
diff --git a/js/dojo/dijit/themes/tundra/images/dndMove.png b/js/dojo/dijit/themes/tundra/images/dndMove.png
index 74af29c08938f718f4238fb5c4f09f6750ae56dc..07f878cfb2c9c165a354b613b7b2fd352328e4ea
GIT binary patch
literal 726
zc$@*&0xA88P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00001b5ch_0Itp)
z=>Px#8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?0&7V`K~y-)jgwzU
zlTjGPpU-WIVri)r(jSXy<Wy*&ZlYGQp@L=FBvXsZU=b84ji8XOf{=ntO%p+!(naFG
zys*M3D~L?-UlP<+MO#7$dex2J(>dQZo#KV>;o*J1bI$Yo-tXfakVHU+L`Yd8?C8p^
zGkPvG9;eiix<pT;9i3t=BY3~mY9YK)XV8DA_ZlY`KXY)gkInNB+3@E++yAz5V7`a0
zXP4A%<>(cAbwNHrF~G2+Qki@GbC~tN?y_RW!E-a^teAGN?)y!;e|NBI_B5T}s@d?R
zp7E8s*#HF5PGCz3`b)-&ST=r=#bbqZ&0VJqRg4qjxn!b9Q=oQzy2|KM^lAV@LP%z{
zyNm@NY|ML?%PW&k20{Xkj%I6XQpZMfw4DFZMthS*)$c<F!YqpW!H;`Pe|4Cp?~556
z5@3Fj%B+!eP3D(r{yKvNZ}J$Pg-#fqao+Q@RV)~>aidVzjb(M2sn3&{Hk`uU)muF<
z-#*Bkw^nX8BqX6{FZcH)F!pjdVR9W{%CL#kOB0(0#B^<E?9&)VUepu2&PI6?hm2He
zl?@?Ni{qSHT9rH_hBiGzI}8kUzyrmE?v#N;L=zZN8?pwXswz<fDmBU)p#?-Ms82%|
zl%25dxfSo5Y+ehI?cx!9Yf_E=+$NwmM2>?6NQMG41|=~VvhZ&~YgaS1`qdbeGtn;q
z{)j}FnD`pe5U$ZBNNEx6HVZvgXdklsOl^L1Hs<8rS-DIr5YdU=snd*T_ZtFw0_}ew
zUA$T6Gq1mmzR!t+6-nquKD;OuhEqa?qE3PvF``eKZ)?E!A8;2xtQKO7{{R3007*qo
IM6N<$g0T}z8~^|S
diff --git a/js/dojo/dijit/themes/tundra/images/dndNoCopy.png b/js/dojo/dijit/themes/tundra/images/dndNoCopy.png
index 87f3aa0d544d937aca0d0971ca6473536067f8d2..9bf9c33962359c6a769f403a584cf854a098b294
GIT binary patch
literal 699
zc$@*d0!00ZP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00001b5ch_0Itp)
z=>Px#8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?0#HdrK~y-)jZ@!C
zQ(+i>&)JVQH`h!G+uVv7WYM}&v!Eb@F1(6`7b4M}SAhl559m)QiXv|+h@>AP<ZR8E
zGhI{`iXzTUVr@bQr^r9z>G@7)r!=Wvc=!(A`JU%{-{*Zlkqyxy(%vI7a8uWfCtfce
z6Sw$%hI{It{3TrHM3R%CFxC=XFj@|w64{MXLkORVQezb9ni}-+j5_-V`JzbC=<3Gm
z{sUMF1d;dGBI9-=?Q~+s<;FDE55#P30GD}oort<wkt^W{3c)($0|Cs{*P|NKJ|EsX
z9LVW9UW*{-a^d{XOhk^eu8B~HH^)idhNZ1REHKrT);3$<Q}aGdX_|>~3cMm7@%yCm
z<SfluJ9QdG-dqR<vFP(-Zi@%y_(5A>ITphNNm*iyNLy<!xzevYjIS+iD6qD160=;#
zn89Let1U1ek7Jnik1+M8B#v4F*F_8&^48GpUF&N8S7hi#h5~m8dG7JCRShWZZT@e8
z*}9;aMZXews5_1F&M;f$!ph+zSWP7GrLz;?uU@eU-!Al_eC#MHCpwUCiXla!%HXal
z;S!CggroS#UcY0j-q2lT)?%dbmj^qxV}yGt3!|36HDzKqTaohy%nVeor&ymU5RKRZ
z3vBaCi&!NO5k1w>zAajE-XGwgXqaRM%3)P!HD=h}-v!cU{d&@#L=VUEp6JE*EF){(
z@Pf$iX)=-8K)x?pv3BEoutbt+&1p_r^>Eq}R2U{6@Qi1Z$7BbmtNn)P1B2o)21SFy
hGtmvT*SpDc{sGkB$E)6PSyuo6002ovPDHLkV1iVZMK1sV
diff --git a/js/dojo/dijit/themes/tundra/images/dndNoMove.png b/js/dojo/dijit/themes/tundra/images/dndNoMove.png
index d75ed860ad1b1b7bd0ad9627369d733c8d04cb10..cb8bd8bdd521510635377ca88c413267601ae9ec
GIT binary patch
literal 677
zc$@*H0$TlvP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00001b5ch_0Itp)
z=>Px#8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?0y;@VK~y-)jg#L?
z6j2n%zccIpaBJ7CHT+R&h?LYr5p5|1Jr!2c!$J@RK@rtM4?$5`k4XeQWI-W8L6h`D
z64Sq+w$_LW%37+0-F_&u3PMQ+D+}}O+-b(9%?A&BxM$9}=X=jw&IL)h8~_xpUBI0o
zf7DFXHd8Sas4^vXTXGw{`xSp3z<(Xuz{t8SEE@M%Jad-Q$=&?9E6HE`_H+6~C*QOr
ztZUHvWv|au2Q)}=5A@8Bu1lQSwu6ObjVv@a(Uf(vbu*_99p-q$3Qn$S;l$1)d*FNL
ziok$|%fP^BO&!PTmvVGTEhp9|Xq#opcMZo>PH_EiYd5f4I<W=z0-IhgU&$}=IP<X>
z&DCo-Ya)<~#_XITSM|sLDx@NdtvzxlI4w<l-`>G&ILyy=_58;~;A5zg*#!}sPnC|p
zFv8rTI6LKHVd(zCcvCa8qB^IEh!?9=VkQ_8;Sg_WJ`;n1FmsV8=WQbLwxWU~f&rcA
z_XlmYnY(@S7I>v=e68!eDN}$OnqJ5R{OpsDxkQS+_c`N1&B(CqeIZ;0OdJJz-v@(C
zNuXTBlG7eYtej^;S~w;Xiw>aek<Vub{}T~`Cr*KzSF7saq0la4k0XF~92iV{HYt%(
zK5w_1a!yM-Id?rJ!`BYS5<pM_A09jE-V>h+nd-Rh4?D4QKt{ct*~jFHs7?%L({rc5
zi~9eQa&om(T>cvE-;uW34$8$|01Dlbz9L){Ut-2q8T<22*KXZ!PKrDg!)Y^Q00000
LNkvXXu0mjfZgDUm
diff --git a/js/dojo/dijit/themes/tundra/images/doubleArrowDown.png b/js/dojo/dijit/themes/tundra/images/doubleArrowDown.png
index b46108b593c22a7d7daf35f1bcdc94e90e78c764..92678d2f96ab740c6e808f9f37deecad884ec22c
GIT binary patch
literal 152
zc%17D@N?(olHy`uVBq!ia0vp^oFL4>1|%O$WD@{VjKx9jP7LeL$-D$|BuiW)N`mv#
zO3D+9QW+dm@{>{(JaZG%Q-e|yQz{EjrrH1%>3X_2hG?8m{_+36J+r`{<E;ljDKJfU
w+9A`^xK6-TW+roRhhp2&Rc!|!s5wb6WYlatul;xP8K6c6Pgg&ebxsLQ03ly71ONa4
diff --git a/js/dojo/dijit/themes/tundra/images/doubleArrowUp.png b/js/dojo/dijit/themes/tundra/images/doubleArrowUp.png
index 2c1b71cc4acf17a434d7a30fe98ccbc90c8e6f2f..bba30fe958d32ea642d72ad62068678a5bca852f
GIT binary patch
literal 158
zc%17D@N?(olHy`uVBq!ia0vp^oFL4>1|%O$WD@{VjKx9jP7LeL$-D$|BuiW)N`mv#
zO3D+9QW+dm@{>{(JaZG%Q-e|yQz{EjrrH1%8GE`ohG?8m{`3F8J+o0lN(zwizuqmy
zP_2aZgh`uH31^C(uo!Evgc|>z*%BPPIHegFglEbwSTk*#HBdW)r>mdKI;Vst0OBJq
A(EtDd
diff --git a/js/dojo/dijit/themes/tundra/images/editor.gif b/js/dojo/dijit/themes/tundra/images/editor.gif
index 7fe7052c1d60600c6879a9faf3459c5998c0a332..750c6b95d061a534c876c022624d2e01cd14a7ba
GIT binary patch
literal 5409
zc$^i}`6JVh<G}IPW~W`RAy?7n$PqQ7H%ewCbd8*q8mWYOZ*nUQbCbDm%@Lu5N=P;5
zW~ui=aurHBQW25Td_UjkfAIL>dC1Pj#ME=YlngMl2>>V)P=?S7KmdJzDZ{I>l(Sg#
zPyv32#y)oq>cvPyfO3Ed*vIdpg{j*_P!5G=ngd$&SVO1K9j+Ox>PGr*QK}~kcDkj$
z*WbO@HF}?GTmua#wB2stam(`bH4k@3&y%#`V_TQ^94K?Z32FPYPB?1%wv1BkDqR78
zFX~?3TN5-Y)7yM`zauX6v9(`*nFrC`hkeX1`N4@(H+}HeeE+#{`BJ@`*Z#oj9w+(>
zXKNQ$MwZXs0<ZIlEF<@z;@#m(R{~P51s*?twLF7)&^5HWhKUzmBwPr|OuOm?WDHyh
zONk0SR~cZK6G~|e0$35TDdC43gYjkIDsQ}5_OU{}yo>bMwzJU>({I?^3J&Y{cd5Cd
z?8~Wr6e)Wr(k?&7IwCfa6;~b}n;R1IC?+;KK0drAR=X_*7m`>y9R@s!+4}Xemvh!*
z@6;jJ3~_N>Oj>GiO|nH(jNhMs!@F<9=5c*nlkML}L^W|u^D+Y?a~`m>+n!|X;$%IK
z&#4T_7p-0k4J&$HnVFqj!0SxTEHAk9HZlCaq@=?9w6a2GTlU$U!rVK>7ZQ2T{>G$M
zlq6iOe9>0oSj~%C%#+G5ZQz#o-n-4Ht%zv6%_^;|Y%7aSuWqlbDt=Yr9M+ukA+I#D
z@x$Z0!A*B#{$>~U-usu^G@kx=;C-EA*F)CrM{n95H2x_s9(w5W_R;CJ2lCa;eGM&5
zpC8-I)K%Ypwpt)~_4j_$KwHZT{=N1N(RwHO6aV^nC+EA6G~RWyqHn2PC~E4R`tt1g
zm>~bDXy}!o=eyv%P$U@Zt*987``X#u*VkVCw(FCihcEtCJ3KKj7})Idc|7>7v;TAV
zn-BjDzWqE<_xa83;i0iFBdH@}!~O5(Hb*l4PDIU3bpD-4`ZLX0|CGKwF*Wh&%bU5c
ze`iu9pUXeZO#hiJ{Pn5l<yXo2eD(YJ^`ResKYv@D`zqP^-t=cRabsEZWo2VyWq9-V
zt>x7pOKa<rwKsFWH~;>g-uNw9-H>c<eEqw*vAMZPUWY-XflWXU_+S731b~tNn`k}t
zdR}`BN>=x@u)ef29#pq4vTZ2qPFCFGJ1%S}7o?G_lD643R`h0SpQv%N1-;a*DCb0+
z{G|>KTHb8ds6A7w!-*PGIU4%8PgHK3sp}znSUr#|=9m}TKdN!g)Zeb`D0o!s8kA>P
zfI2^)J94(awcuCp{mWx6Rt6<Yg3I=u1_d_wxkgIn#B=s$oxgQ+y=Nzyb=srPZ5o=8
zc6irR*QH+CS)aD^oC`1HYu!IkT-2@2j@%un>g4Wly7%#6$PDZPy}7&ztE9T$*7gKT
z@HPFt_?NEFa`X~LH{-c>N1LxhjC|Sdlq*w=k}t#e_sB^Pdaf>D9!SibD!!$LEnD;}
zuoPAqxe6Yw8=<A-r{$cztoa4;z)ZW-m8DLP5b)>gLpmqKovB*E`dJugwzg3Mz$C%q
zff$pDqk*H^S$6xEygP9J<gfG}-f?JKI@${JaP~v8!sVZDQsPK*cHTG^?;MJpLV;qb
zh(vm_+$BeTI=oA)Xk&7Kqn<8nsq;FO;9&RqsM`fo2+h{%!+A|xZBCEzZAA`3S;o>z
zRN(i)A>QPunVb@NZConFBJ}edff6LsK~&lTOM=Nf(9A-}Jf5m7#LE4R1MxWPnqdo*
zhbD8hi^@(SV;^abl{POUNVL1%Rvl-2&?IY)=KOGezE)CaW8~@qcb?(igMT7Uo(j{0
z@lKV1cevX&76x33@2wPYLveGZc;i7zdV)@$XH@LIOcLxcObTT1Rg2mvY^fsBwDrE(
z%Gx?ve|N9mz0X_WZ>_G255`27h{fC;_PQFtPC4a3G9Mpgz=0QQbI=KSDG7;*c@@KF
z?5B$_zQ@e}oxG`rJ{X*ogIuEa3e}%`HSTI%fp&7!AV12oFq&K-dH36eGRwVVDOX?Z
z{@%Cz5^6ql)zaKzeK^%D<XYfMT-bi2SJ2`gD+im6UUQIM-uiLK{YFtQEPYl6s;Qo7
z@3@q-yX(Tyw8_^oVu}pzW6|}|bC1o}hL6rj%p-kQj=*EpASPBf7Pw>E6{dFdl&60i
zr;l7nIy%l0YF2dwyfoj{LUW#-Gc9p8@+L+9+WYHxP$d6%&DN^z)(hs49~pOP)r0Oc
z#%-`C;xA1T>Q5Sx1~2H_=BH&lk%e-yNn2e{PvJGtriN^YGODY01(9-9+_E0{{ps3*
zs*`=g<?gYZ1(yC`eDvC`JO5f4to%97fo^VHw2+#3F5dgbozi89cHjU=TRvn*m;d&L
z7_&;tRBKAR(wmOx<poAL+`5Bo_5nz{CZ|DWc`LyesaCHnJ7fyP9E549^x?dYEj9JA
zyR1FM*s{1#MGaNoMS;1OtX9_eY_tToUTO_Ca}T<yOFgptfH!2M9^B@Q`#b4m+0kSg
zXB30?Kett9esQnzXg$efkW7I8h(GZ1V@i<O$M;}WI@X&n11CFKVYQ-6M{OLQ=p<ZG
zd<zIXYqmRYJF(@z+jX=iDWw{y1`*zG`ldy+z4XMbr;9%i#5k2=^ZLAZsL!>&f0L-t
zm}y0`HXw`@vsBB5i?wDTB9{ciP$Kz^MaE*(dF^sVaX^o`8HZ~gS{uH}Es;{=naBL%
zsl4-x!{eu(TFvs5ki>5D@kh8zt;vLEnI5`Z8V_8_ibj0<Vr8Xj6t~_DK;#>@Z~Ng|
z8uu$|w+Gb?cshkU$cD-#Nf=UF<yg_ObdX#NO?;3NzyFiL{jhK1&V#6tn>H0MN@t}f
zY*M`QH4Wyr>nlfD3^BOIzs|v|=SvSN$%x|=Un^@Ly<}f}r`m5eM!|29raQz-D+mZA
zkD4Gx>znsFvOgdcyJw+B;U}U(<tk|E<@;V)qC!l5R(~VG&?9;2)bnilMx8<0>@e3#
zQ}-VkhMb%1fJuvIP33QD=aJWZ%yn)xY5b!A^4Z?Cb%!@D^ySWz$-Z{Bk+1F-ISG|U
zbMJFb|4>;7jrWp06~~vi#t(+Jo1dYkzJF?1u-shPPOlcdFAh-6)lXQI_d*0s^JTC4
z^c?XH0M9ypSKS<zbT%i1anF6W%GYwcaG)svl#jf1LC^;z(>yHgvKj{?Z78zvVeTG4
zYnWST3l%}iJ4Gio1@!A^z?RJZDow>GE7R_EC4=VT6NI(XaR+{ikH^Y)p)N+B7Ux|c
zy7y<GPc^rzjxtKZx~3fD15s-~UZcKmX^xP2BUF^8AJfwOO0q~EyH@p?@f-1T`|-s?
z7Np5U<CS(<a5mnegkqDOFld*Ua-S$Ey<I5Rl^~?f`93EdI5YXNXGGYO8nOV7Eh<+W
z6~>$UTO#!&Mn>tqi*frlrogo3t{aL16O`pmmXo_^n#9SfP9jpz^Pt`dsaC<HC^NGP
zW_$!nQt{hoh!g55Fd14(4RhELHSAJ1vHTt)Nxv5z8l}p{KjcMR<Jy=trsE+OpLHd2
zbpvS)To-?>Z9BO_=?|*Wyt`ld4A2?yg61)i`>ek@1v9*$Y&x9AXNXRiWe?PIY?THb
zP&QeU@*4|PYGv(yH<h|_I|tbaH3nNjqXO}DQlJ+ICQxS?n7-guJ*?Nu5a&XI2gyq3
zP&zmrU?l^etGs%aUdQ~ajsU0tN4Y=dYrtb9p*nUmj!D7DmA8cpAFJLpNIf^ZZvtTe
zB_WT^##$@-z;(V}nqekH+*KoHlV0ra<8fuTcA?>Yq0uv^(iP=M@*vBTCh-cTDT*j+
zYPZPJKc;bh4~t5|Xzj6M<3`E5yX<A#TWD<*Cbce)oU9lpj`u{#+JCqOSF+KWY+tF|
zr=kkqEi?@%O}(1(aof5{y#69HMhpx36dK<0;wf<%Q)MaQG{=p;jl}7v#r&gyW{=Mt
zTWi(g^j%P0R(*5Y<)(TU<~ZS+PMibxT#46Kq)?!9gp8sFlDB`brI}&X;9+i(A9=Zl
z1~*>|pR4_DMtbftFFFMtI;7m6X_IjKc>X2dBH|DfVqHvX$G^l!sc`Sel3a>=_RzMh
zmZjP%4lW^mSE!1?vsD&hD!2*^Y?wF+(~G1&4N&30dp`@vwh|C!R$nUAFzK?Su<Rqb
zn-8jr@+_PAsWTf^<H#2F&t0I!yjSi!C>Vu;0pH_%&Y{riU;_ivA&Y!9iDgj;10bZA
z2V+e_cP*a%9&|1zo=~9WgjyqLgakkxPCjyhYVz@a7+UQBM)s|NgO#Vih_KE>R!v7=
ze8{5xB<!;CL`^~V>~U0R089r7#y?GsHNAX6E$e6_nI4vnk0+QDeaMY<1Z8xFM3C2x
z{Z;QpItPYKVouItf+={9Mc^Y{`cMey$i>Yv<9zbsW=U|JK<qF*=pzp|$|OvSrJlt)
znE#3?k>yAz9B4XXtRB~1ugp=zMxjC^3dBoi<+Zmk@kyE&P?i_eR>0HUA^x93vZ~?=
z@^Jocp+e5ZupUB22o9nUdVKBbZKPd1!cK6IAlh=}VZTo?*R3iy9JvIIW=H0)h9jns
z4+MC=VoI~CRwO^7Zq;c4xF$s;(s_7KDmH<HW$~`D_}66Iz&iMmx95P7tDp||x+fK`
zLH7=%LY>%Psm;+jAN24L{MhYCI2rxG5WW}!VyQ|+d?1_RvC;{SKDx2K=7BT7HLHOV
zsQ`p08`aFl&a!*C*t5%LK2y?VM-o*Hu64ha+CxYFVdFeO1f4?YIH8l<2=1IcTb0GW
zI4z|@-V+eOJPMU$8lW=|$a-2Y6F@rt9f0p4VGihEdI0=8Iv%84)goJ)Dljl)xSVPF
zojc%Jz@Arubacrco;+ix1)r+VK9v|ZRUe0Rzzr|PjV{K`@Ng;2fB(tP+&7YGp_FCi
zo|R5UM7iY#U&>7$uz|KGL>V5Ep(H}5wx-A=o<|V<_Tr!hI1D`lPKM7eW?vL$pVEPI
zTtQ)QXppgMdM^HLJqGeNORfcfY{cirZLO@H$ZxJ-g==^>mr%8a@1|bLS#`QM<K!+*
zcFaMwwiG_mIo}-$x=%(3Q7Mm={0I%O`ANbsh<V9Cyjm~%Z{*~F)RF#k0G@sX4uMWe
zY~e^T^nDmG6AEUsQ!**O^iNLLgF$p7=}SuibV?sa0<+o2a7$^5hU7oUGtv&2m0%EQ
zbp}pELZz{~lPDs9r2|;35+u_LhWCZNV<!=8h@ERG30x^t3T6Yypfd?{CefH@r<P=A
zyl6?D2Db`nj=5#rJ5hSR0U9Bhn}F0$23EQr6~aU&^MD>YfkO8(8wSDOJeOfF_!9gH
zx8eziJo8IR8HjtE7icpnow1Ia0P)Ay38RyQi#qY6V0;P_d)TDhIK14nwcPx7xxx;_
zfVgr1+|Hb@9N^|EF5#6H@tceIXcFq|kn=uv!p(q?*mY1c0O;HlSDLV;*3v;65bvU!
zU&nxDU&<eOymNyJD{8@5GePTlo=@KGl!~OAT}eoCTHsVkstdNJwWiko(k7+wk&dqe
z1N30#HYq1uV}TA70$nrZfo~B$s^|~p?gkxU&%Aqn5iJtwc`P0tRX>Gagnna!B>FuP
zzxaJ3WJ0L~ZW+;T8&Pl&!AF^w9<q~;u0c7V#g9N)8U*@3;io#K4B`b4Geg1Y*6a5%
z;J>6Xn1nnCvS!=s6cr^5k1G{gPk6(S@~kIpm-e*p1@*Xu%Mkb#BH~Irbekm#D_<cG
z`A3>gFbb~t$pgsey@*?h`cP}^l!ON^!S8_&?lBNe_AImkHe-_K@*Br%y)9u7&b#M$
znrYCsG^+0e&(a&U{t!GSD?KQ8JHv5D$0`F061K3pP){i(04G~&5-pvFpF)`|0^YTE
z^q)My>!LG#!J*M65)+>{nqL^+wEu-^<WJLE7r`&Rr2EYvo9W|RAAusm)4TCmpK2fK
zRweDMYVidf#I*^SySOOWc`hR76pqfkYY)IhztMz0r{8y^5<v)_0`xS2JaMr;P*M{C
z@E9N$eA2ixrNg!kZs}%3fwyiYPOlO^=YY`3y5BnBk}iN|p@oHQqQW+W!+nf0q>qo)
zWkMuuDHRDDguWnljHcJJkpjxyy>!F|-NAYclpT{lJSjgnCa;WXkZWLEU(PV?G~DZ+
zY466`uU-yqfJ`vJiF$~ach;U?8QV|s@##-dOYpi$={sy`&wAXCrHU~SLG!&0jliyQ
zwWu#pZWv>D`*R6~zc0|!1H`s3R#tL5DqcU_G2X1e!ZQ%{1L7*Vh7cq<QKqyR>EAAA
z3G=P0Ms6#;t5#EERrA=duHhHRo<v4J0cq4H9ojHN6nw|&ZWsS<H%fCEqI-eVow1X6
znAdVx+%o-#&;??<xIH_Hdd3(Bk!;B1I$<0w2uT1F`P~a#RO!rtE#w=|z6c~J19Imn
zaMbudl7;?6$LBKC66&ElnP@5i%N4iHfRF(O0+EE-oF@<`J9acYrEe8=p6r2=tsMtA
zI$Tjro2aJG(8vd}R~xj6)?hpV4Z=a4B=B(`_yqfplAF=DLJnn5OvgCKFkGZG%h_c2
zb?On%iupJ!Tx|GqaIr<&6Bbkp3V67Xa<mH8_=Hs7CLQKH4!_7!*7WaiFCs?s6O!*Z
z6AfJAepC^rP=raq`*72*1t2;6<%k~9nj&3Jc}z><7r7RM$+$JwKA9ag+vJ+ns5isc
z3CB|eXY|0KjMvIfUw`ojx4i6DP`M^gglTy6Yd$5u1SJA!dvTDzpl!V$)qYx@m6p{G
zs6+{q{MB+Ng<QQ}q-QU*ohMnmU%nNh%YMG>M~rD4Jo0W(w9r8Jc(!Y_O!MMZQhMJO
zd7^%f=Am$;xDAHwqKavvVL!35B1XVRg)I&0>VnSt;PiNhUp&n5RCjd-(P+VDaiL+?
zP9mBw#ePX-|ItO1`eYA+viCq)eOSu7;hQS`HFOx8GLq#n!luJ&g2A+>BPfHD4)<gh
z=ZG)%jSBrhT}taFbCi00bko;i=bw>!l`-1}G#fX3^y%QXQncS!Vi$kgv%h0}{jsA{
u8TRA>&{Ac9tRhbw;p4{hQ;8+|<NcudyFrh4L)YI87rz@dcZ5KIeg6lnPO9Gk
diff --git a/js/dojo/dijit/themes/tundra/images/i.gif b/js/dojo/dijit/themes/tundra/images/i.gif
index 1336a9b522dede6c63fe2562e89868e68cd060ee..ebd95a7aa9075cb7b9902aa4b5a6981f6bafaa8a
GIT binary patch
literal 48
zc${<hbhEHb6k=dzXkcX6zkfdi1B2pE7DfgJMg|=qn*k)lz{K9uzmns1KNo{F0O(8!
AaR2}S
diff --git a/js/dojo/dijit/themes/tundra/images/i_half.gif b/js/dojo/dijit/themes/tundra/images/i_half.gif
index add395b492ed87e5233aecc698309b285174a234..2947c4fa17501eaa1b477e6010d122d1e358c3ee
GIT binary patch
literal 63
zc${<hbhEHb6k-r!XkcX6zkfdi1B2pE7DfgJMg|=qn*k)lz$Dfq-*Ecv>UncCF1^;d
Q=l+?$?UBc{5Jm=T0N4Hz=>Px#
diff --git a/js/dojo/dijit/themes/tundra/images/i_half_rtl.gif b/js/dojo/dijit/themes/tundra/images/i_half_rtl.gif
index 8ff8e1d378b79f47c0232eb6a79c7db77b7948b9..4f60ec444d7d5b84976d54505f3e3de038aeb300
GIT binary patch
literal 61
zc${<hbhEHb6k-r!XkcX6zkfdi1B2pE7DfgJMg|=qn*k)lz$DVs-*Ecv>UncIqa@d_
O+x?rr?U9ElgEauS>k(%F
diff --git a/js/dojo/dijit/themes/tundra/images/i_rtl.gif b/js/dojo/dijit/themes/tundra/images/i_rtl.gif
index b8a8f12a5cc3082ebfe9d9b134aab6cb81700b63..7dafaadefc7ac7281911c6c36cacebc5bb718923
GIT binary patch
literal 48
zc${<hbhEHb6k=dzXkcX6zkfdi1B2pE7DfgJMg|=qn*k)lz{K9uzmog4JQssC0Op<v
A1ONa4
diff --git a/js/dojo/dijit/themes/tundra/images/menu.png b/js/dojo/dijit/themes/tundra/images/menu.png
index 4f9f70f0d8625423d5ee10512cd7a91d944dd182..f5b93d1159c7ecb490c7e708f674ee3f25b71bfd
GIT binary patch
literal 140
zc%17D@N?(olHy`uVBq!ia0vp^%s?!{!2~3a&lETfq!^2X+?^QKos)S9<VcpdMwA5S
zr<If^7Ns&crsOB3DtP85rl$s_CZ<#to=mj?DpK@xaSV~Toc!nie|u&y;GT2z2m>>R
hm|0|1hu~^vhN*3GGN1lVnGRIU;OXk;vd$@?2>^%)Cw~9{
diff --git a/js/dojo/dijit/themes/tundra/images/popupMenuBg.gif b/js/dojo/dijit/themes/tundra/images/popupMenuBg.gif
index ae56bf3b439ca410320bba2276bf1c43fd52ab12..15f4f1b8cbe5e43760e98033b66e57d56cc6fbb6
GIT binary patch
literal 151
zc${<hbhEHbWMq(FIKsg2{rmSXU%veM_3PuukMG{S`~Ca(r%#{WzkmPc&6}S;e}4P+
z?Zbx;fB*h{`}Xa>fB$~``0@4Y*FS&${Qv)-fjFS}lLbucfC!MC46GsxR4n;~U0WyE
S@Go!(NZ>i`XyU=aU=09nr9j;P
diff --git a/js/dojo/dijit/themes/tundra/images/preciseSliderThumb.png b/js/dojo/dijit/themes/tundra/images/preciseSliderThumb.png
index 0e06640a2565bd1e82bc3f55bacf6255fa9a18da..f2fc338700f2a2c9f9762e003789168999cdf3d7
GIT binary patch
literal 248
zc%17D@N?(olHy`uVBq!ia0vp^0zk~q!3HGX7W?Z1DaPU;cPEB*=VV?2Ig%x=5hcO-
zX(i=}MX3yqDfvmM3ZA)%>8U}fi7AzZCsS>Jih4a=978Nluf62WbwokHHSqg>mg^5)
z0ty@#Jz`gHy2};1<)_Drk_Rm8`>ZDwp8GAG^Jm5V|4eJQo|O2^ap$<h+NmteOGSiu
zp3Lzym=L6N(4l7{3$sJ^U1yHy$LBsxXc6F0y7$}L;NRU1@2evmj#zGQ`1tXkCWGM8
vknPv}9@m)e<8^THvb@{7ow4K1vBT^yml$;Lep<W(=r9IPS3j3^P6<r_$j@N)
diff --git a/js/dojo/dijit/themes/tundra/images/preciseSliderThumbFocus.png b/js/dojo/dijit/themes/tundra/images/preciseSliderThumbFocus.png
index 5fac318a71022a75dfadbf146cb82177f515e95f..fb063237840e7826e981cb28a06f81d652abb84e
GIT binary patch
literal 281
zc%17D@N?(olHy`uVBq!ia0vp^0zk~q!3HGX7W?Z1DaPU;cPEB*=VV?2ISR=hLB0$O
zRjLdO4b2P;KmP-1pm?bP1H-EX1_rAc3=HD=lj4uM0o8IActjR6FmMZlFeAgPITAp@
zNuDl_Ar`0CUh?KTtRT{wXg)`_M2$1j!Q1@NCYPh^ek{?g#Vd1_o^ET@xA^c!`RJyY
zSNbl$3-|wL_0qh%@BaR#-y$b0HwP#zJ>t|Tq0G(d#Gxbd;ojx|hHY=d<`xIPJ@;Y4
zlpq$t?6-<N@#c?y%CU7wB(q8EzyF^@Vbi+ntG2$o^)sVJ%E86!=G@-pj4o-9pE34#
W@k#yYzu5+K9fPN<pUXO@geCy_xnijR
diff --git a/js/dojo/dijit/themes/tundra/images/progressBarAnim-1.png b/js/dojo/dijit/themes/tundra/images/progressBarAnim-1.png
index 2069a5a2ea0d17e351200286c9ee5d999f155dc1..cfc3fd2c9101ac18a290d59b121d358c790719de
GIT binary patch
literal 288
zc%17D@N?(olHy`uVBq!ia0vp^oFFy_6OjCpbU6@6F%}28J29*~C-V}>kt}hIC<)F_
zD=AMbN@Z|N$xljE@XSq2PYp^<OsOn9nQ8-6wAItaF+@X@_25NEW(E%DgW?NH|Fixr
zXUgU7EdTZIr>|0o>vR<szOrRUTUE?dy(V38GPum}TxE{(RgTWAWiFiBoM!E<yHpID
z^n`rgs5o$zUR4pBqEWQbS7uR3+WA<akifL_+?|uor0d73icXoZW3%t1%Dr}#UrIbX
zG&*aaN1wg_y7qc}|2sX0h>f*n&;I_rGxzTK<0YC3u1EIW{Jie_p6AC)rcPq;J62wP
kGj;pC%XdR3O}_E}+^hM$Wsxe|fgWJ+boFyt=akR{0FwuEod5s;
diff --git a/js/dojo/dijit/themes/tundra/images/progressBarAnim-2.png b/js/dojo/dijit/themes/tundra/images/progressBarAnim-2.png
index 779b22fa808531a8ba6af9d7fcd875af82510daa..d27981d645104333ea84fdaf00cce10d9359fa0f
GIT binary patch
literal 289
zc%17D@N?(olHy`uVBq!ia0vp^oFFy_6OjCpbU6@6F%}28J29*~C-V}>kt}hIC<)F_
zD=AMbN@Z|N$xljE@XSq2PYp^<OsOn9nQ8-6w9V7SF+@X@_25BAW(OYTgHvl7|8YO@
zXBC*V`AE;cef2Fl$0i9ZQMp^hk}IsE<0+-6V4G}~do$#dppcwOpX-%rEvin*o)L2l
zbr*U@A8<<M?px9N(u~u0rIqaKEuuFp?woB6%eA&EPd=HTxN&yNw%qf-YtKhGh2&1Y
z`zG|-^Y1@@)tu>J6f`}lcK2%KzrB-wR?OMR734a3@9oduca;~L_Zx4!#gzH}*`E8~
l<KBHeK2tK<>$b}7{};R#l)mm?)B^MYgQu&X%Q~loCIDBFcHaO1
diff --git a/js/dojo/dijit/themes/tundra/images/progressBarAnim-3.png b/js/dojo/dijit/themes/tundra/images/progressBarAnim-3.png
index 77d4f70d5469495bf415f638897d3e6544438c66..3b92a7dbeb744a7e545441eeed8a418c7e303838
GIT binary patch
literal 288
zc$@(s0pI?KP)<h;3K|Lk000e1NJLTq000R9000dL0ssI2^kUOd00001b5ch_0Itp)
z=>Px#8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?0JTX(K~yLe1;Nol
z0zeQ$!I$h|{}uXe1tM^pIHT{Mr_ERrf|R6N+Mc!v7M3K95Rh&;Qd>5ae1wDt3E)U=
zNmwE@mV|}H84;Sa1uQhSV9c>F-6o+aRi|SKj=;v@ZZ5QH+woYZt-(TKHwkUqc6@eM
zLR4*&-RxD?eav~kKQjhI)Fhj9SG#kbulLvEj8%{-n(W=~?)m-u+|A>Rt+qhgySX>#
m^?KjyuQM~Yl(tEBcl!@~%A#s)(2TbL0000<MNUMnLSTY-h<PCZ
diff --git a/js/dojo/dijit/themes/tundra/images/progressBarAnim-4.png b/js/dojo/dijit/themes/tundra/images/progressBarAnim-4.png
index 8dad7a6b08605ad7da10ff6b8226f01feea89c57..61e4276c26ae149f8a158c42c2be2007a737555e
GIT binary patch
literal 287
zc$@(r0pR|LP)<h;3K|Lk000e1NJLTq000R9000dL0ssI2^kUOd00001b5ch_0Itp)
z=>Px#8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?0JKR&K~yLe1;N2V
z13(M|K}o(q{~hwCfCR!>%Z$IiUlZH1RMfHvuzXr##kM_`C6z_M0k+sVmaU9zN!oHG
zTCHk%Vq39d)f|ZykQB?4SegiQB9^wI2s2D<Db`7p>Ta(D2AE82=|qZUYqzZcfJy8F
zwJ^}`cCWkPF=uk_T}f6=+iltP?tDJxy#MaRNH!Mj-eq^&InST><4j^eQsHjz?cJW|
l>-Xc#Okx*kySvN1`UecrrfaE^#1sGk002ovPDHLkV1k<rc(ecj
diff --git a/js/dojo/dijit/themes/tundra/images/progressBarAnim-5.png b/js/dojo/dijit/themes/tundra/images/progressBarAnim-5.png
index 915f3c79d9008bac5fc9bd8a8bb12b63a255551b..48b189ae2e6138ffd64c6167f7bbed426e96f75c
GIT binary patch
literal 283
zc%17D@N?(olHy`uVBq!ia0vp^oFFy_6OjCpbU6@6F%}28J29*~C-V}>kt}hIC<)F_
zD=AMbN@Z|N$xljE@XSq2PYp^<OsOn9nQ8-6w87KGF+}6M=}E&NW(NW0gBRaP{`>D1
zRK#35iNj#-HaolhDlD3wvA4L+7ToGn$!u--?`Pq+#L_8AjPpR|Y0oUBEy|sO%8RZq
zWp&F)XR+SWGS7_Dcjd0T6BCYHFn(ku9<}xDxz+8)PKW%Q{=exlDR8-Jw(;@mieEQ2
zD;Lh{Sm8P6%Cx=j`|r+8-mMU7^072m{r5ME=dYiiTcJDQo7MMcR@W`hKmY!&XUaCu
foZa7x-v41LY+Rj_y7)~2(CrMKu6{1-oD!M<=5=;s
diff --git a/js/dojo/dijit/themes/tundra/images/progressBarAnim-6.png b/js/dojo/dijit/themes/tundra/images/progressBarAnim-6.png
index 2b607e7b2a6d17c40564420fbd865849c40ee674..af50c4d58d9e713a6c636cecd12e1e80f09c1d2d
GIT binary patch
literal 283
zc%17D@N?(olHy`uVBq!ia0vp^oFFy_6OjCpbU6@6F%}28J29*~C-V}>kt}hIC<)F_
zD=AMbN@Z|N$xljE@XSq2PYp^<OsOn9nQ8-6w87KGF+}6M=}E&NW(NW0gBRc3{PVwm
z$rC*bPnI^n==t&bj$T32w>cTVdBLHwR^Y>ZPG!Ga$|`9S8Rl%WkhS)^<>cNofy=jQ
z9k22h<0jdtPj=S6D|g+Um~bS(eEG@Nu-x6BuODtvPE=o*Z>`MRW05uc#>Y^b+BY{R
z3fL-T38`;QeSbW;oZVt+kgIU~^|DRpkKerbb7vm+lD+5l?mSm2mwx{BSKFXlY8&6)
fJH7X_&2R3`)b%BO=WeG0-Ok|Y>gTe~DWM4fSs8L(
diff --git a/js/dojo/dijit/themes/tundra/images/progressBarAnim-7.png b/js/dojo/dijit/themes/tundra/images/progressBarAnim-7.png
index 00d6b4b636b0218e7401d613d2a3949e484f572c..a4fffa3039be312dfc74363eea9ed25d88e7a8a6
GIT binary patch
literal 284
zc%17D@N?(olHy`uVBq!ia0vp^oFFy_6OjCpbU6@6F%}28J29*~C-V}>kt}hIC<)F_
zD=AMbN@Z|N$xljE@XSq2PYp^<OsOn9nQ8-6w9(VWF+}6MX|G`rGXu}z9Ch9Q^(xBN
z?#Z(kE(qNvY`=eBuuAF0X$x8eJ#|hhay*Dv7f>wfoOGdqg<-kwoJo@=Z*y?%P~bLM
zIoG!Rfd`9QhTxaG?_Z}*ncL^#&=O$I`R&cLT<c$#o0^KvJe&4Oc8c6f&Jnh@JN7EM
z%%w@=cIsq{mA=(>a>mLGF4J@_9(jJt@7d2Ag4{V#44LP5p0<2$Q>OCn_47++ow?un
f%B$X;c_D5VzNUjK<H!P_;~6|%{an^LB{Ts5s6cF%
diff --git a/js/dojo/dijit/themes/tundra/images/progressBarAnim-8.png b/js/dojo/dijit/themes/tundra/images/progressBarAnim-8.png
index e2944efc29a0f8537e39e9e637da6fa0f5f50772..b4c92f31af8eaa1ed67a8dc8520843e993891a6e
GIT binary patch
literal 286
zc%17D@N?(olHy`uVBq!ia0vp^oFFy_6OjCpbU6@6F%}28J29*~C-V}>kt}hIC<)F_
zD=AMbN@Z|N$xljE@XSq2PYp^<OsOn9nQ8-6wAs_eF+}6MX}_Z%GlKwA<K1ij_g`Gi
zZ&1d_e|6_M6_&cXTJ_S4(-yP{dJ5bS<a`jXE}%H+N!Qf|7KY`zb0$S4-JbMbEHPTe
zz^Pzzk4r*}nB(Ma3|rP0FMl5@=yX>lW0$@D_O~zmxw+0+Cd5DAC)p{Y(9|+_@AaP&
ztNSbEl}>Ftspgk;d0zkVGaL+pX5J<rcW#?pX;*fHDMj4jR`I){bC&(Gow?V`Cf_J~
hU$Ff7xgM8)OiOkzoqnn7mIKiF44$rjF6*2UngCZ^Z`=R?
diff --git a/js/dojo/dijit/themes/tundra/images/progressBarAnim-9.png b/js/dojo/dijit/themes/tundra/images/progressBarAnim-9.png
index cf3f37dd7db3fce3f904df42edf937f7600b72ef..d8bff13a459263f35575a972c209ea32819f1ea2
GIT binary patch
literal 289
zc$@(t0p9+JP)<h;3K|Lk000e1NJLTq000R9000dL0ssI2^kUOd00001b5ch_0Itp)
z=>Px#8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?0Jcd)K~yLe1;No#
zLqQM&!IAcC@(+<;5}?exmFU*@&+nGDLN;Sb2vR)O2tnJVZ3U9XI%kjoHf`Bd@(~gT
zYGDzzC1HusScf7Q(-NAr1uS&#?pOi~(`^!(Qk~~+$72a>9PZ{qtMm74+m0<6EF^Z5
za6X?W>%QiUB}COW+0A*LXIH!P^_m$2B5IO7$=>bmCi8xsu?kW}Pujb=H+OS4uQRsV
n0;frKcY81Q`h8}`meT$M4`Q8`(X(k300000NkvXXu0mjf#7A^g
diff --git a/js/dojo/dijit/themes/tundra/images/progressBarEmpty.png b/js/dojo/dijit/themes/tundra/images/progressBarEmpty.png
index 53918650e3c34e81f31f3cd9e0245cc837ed8648..07f4c91e5998d1d8d4095aeb6a92cfb679b68acd
GIT binary patch
literal 164
zc%17D@N?(olHy`uVBq!ia0vp^j6i&XgAGV(e(L@Tq}Y<Y-CY>|gW!U_%O?XxI14-?
ziy0WWg+Z8+Vb&Z8pdfpRr>`sf4K^krQ-hveJ!gSJhMq2tAsXkCE55zCS+B;%#?}^?
zbV681N9P7-T3Q-g+yDRnm5+aUety2;5x34n=LL)m?`H`3C~Ubp0jQb5)78&qol`;+
E0L7;=q5uE@
diff --git a/js/dojo/dijit/themes/tundra/images/progressBarFull.png b/js/dojo/dijit/themes/tundra/images/progressBarFull.png
index dd02ee39f1b8742c52c3fde5c409e19ed46ca742..0ce60f5589c336121add6a9c301f93f5d9ec164c
GIT binary patch
literal 160
zc%17D@N?(olHy`uVBq!ia0vp^%s_mCg9%73N<A|lNJ*BsMwA5Sr<If^7Ns&crsOB3
zDtP85rl$s_CZ<#to=mj?Dsu94aSW-rl~nodjU=;#f#HDz8rf4!Pc1U-Zk;%BBG<A%
z|NqNxmk@e=xSjvV4pw{a{d|Aw7WdV=M=o9yD3&MY(7?!W!b8B(+ho=SplJ-Au6{1-
HoD!M<Lq9f)
diff --git a/js/dojo/dijit/themes/tundra/images/radioButtonActive.png b/js/dojo/dijit/themes/tundra/images/radioButtonActive.png
index c6b4266e720a0c251b8abd4f6462d07e44baba71..60840c7824354cb24b872242011b1ab4198b0991
GIT binary patch
literal 550
zc$@(y0@?kEP)<h;3K|Lk000e1NJLTq000jF000jN1^@s6JJyv-00001b5ch_0Itp)
z=>Px#8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?0lP^=K~y-)os&IF
zLU9zvgCJ-Pf<P3(uqp5Z1T6**(&XS0Hnj>)frCq*KyV0~1VIP{2hqVn6hv_l6*NQ?
z^x{R~;>#5W37^h6DELwi4L>fN|M?xx|GD>`066(C2ZeArd_lYr@5JZ&=_1aL%GB^o
z==ppe&1MswPDh@ZOa@d}i2Gk<I(W@yvltGCSglqEwA*bS@J&4K$W*vXBoY{p$5<|x
zm`<mt)oLgd3aC^nn9t`@?{>R9U_xAO%ZWy#fyH8he!q`$xr}PH%8hWl-3SJQvJsyb
zi$$)#iOfOpI=ZfdiO1t2GJFk#!2rA6j!-Bh8}M-IuWaO-SS%)Duh)am=R+hC5!vhY
zifl5OWCQM*OeQQZHnJ%ijbb*NK~WTVJRT9YVcFquNROsza_^0NN@%0eNT&Mze%Nfb
z9ob^BAP@-1`8xIdc3>ZzET`RSwcvC*VYOOeHk)BI8sT!epsK2za}Lz+-Ifi!O1)l}
zwFZNM1jiwz(`l(OrBaE-FXC+fBYEH;xPf2GKDk_uMU?~o>+`%N3LIc6l@gN4q@+*v
o7;$y<$5;=!UjH1-)4sIf2j4D<03F@E{{R3007*qoM6N<$f+#NVZvX%Q
diff --git a/js/dojo/dijit/themes/tundra/images/radioButtonActiveDisabled.png b/js/dojo/dijit/themes/tundra/images/radioButtonActiveDisabled.png
index 0fdef362ddfa2ba95b8d64637ffe3f3f405c4286..b49724e5fe6f6d9a972dad2e8a6e2eba2140f873
GIT binary patch
literal 517
zc$@(R0{Z=lP)<h;3K|Lk000e1NJLTq000jF000jN1^@s6JJyv-00001b5ch_0Itp)
z=>Px#8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?0h&ofK~y-)os+w2
z0#Oi#g+L%}s#K|jw0VF)+CbX0X@xvPS`h@X5sP3z1sB0oTZoNdv=A1f7P{Uqtgd$h
zfj}S-n9M)yinmy#_*j^k@0_#$o^=qB<G<__(&_Xm<6@qe7wdV)oE(&S;DPxpl}glT
zG^pKf%d=1@5Z6uSdaull$8xz$hGEcbHrt`qYGHwI=5|Bo!c{(>7jZNi$!@7sisJD&
zC6h_&_xn<BHk(-B9j~@7tGce!a5$u5u}F%dP$H3_P$)!hx10QazliALbUg1C89^{V
zrfEtu8jXqwurp*3i^T{tolXbxn=N1DaydCxtyUwC$3u}wMC4#FxRSkIugnYv1ITk*
zKF?;eG?`4O+wHD~xAFOWGK15xGqL3(gfJeDCDm{^yjNCLRr<YN5Ay4JV9y9_u~<m5
zfk0qGL=M;$eJe26x_r)j;MmLMlBUzCq>e1A)vDA$y<Uf?GsoMP<c9geH=fVuJ5(wa
zhz8^Q>v~=?8Un<X1e&H%CX<1vFlPsU3~Ldm^>cvxZOP^rCIztkS-QPs00000NkvXX
Hu0mjfY4PY&
diff --git a/js/dojo/dijit/themes/tundra/images/radioButtonActiveHover.png b/js/dojo/dijit/themes/tundra/images/radioButtonActiveHover.png
index a91dc4e9d4ba8a630e398883b8a6af2ef4d3eb4d..f21d4e5ec48d4b6624bc4f18a50fd56839da5bce
GIT binary patch
literal 646
zc$@)-0(t$3P)<h;3K|Lk000e1NJLTq000jF000jN1^@s6JJyv-00001b5ch_0Itp)
z=>Px#8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?0vkz0K~y+ToswNh
zQ(+v&g&^p*tFF8fx{WTn5~2&Iw7fIBis(jAh)7E>Dk`%f7ABFRkzwD>4`gArEk9Py
z>Dk$K&d%B9wzIR%oz2a$fmjGZ@brHV4$f9rUHo|AIsf1DesJml)cr4i1$~24M~Mz%
zf|xm2+lV8zv$bL;@ng>J0Vl*DMbrBFW_|^fXNlAQl<C9GdB-|(g%Wm3yGUn?P%{N&
z^Cj&4+=m!RvVvcPxk{#>aqRUc<cnn}scp!cD%>6p&acZ@a;+j1OY5aForGq~>}p2Y
z<`rYuR5IWLGI*XxFc`$gFN?VUa16tbN8l48*rtMoC5{yg=rVf<;<uLDff!D}Iz6L{
z49@FggXp<6h@nTrv~vndQe&B~A|D?bpF<+0VT}vmZodW2Ww$O*SwHJ?uVoVL?H8zA
zK`vipS+OG5KX^KgxSD}`LqKQO6<sjW-9L^dlL-Mi4lP$;S-v74BFaiK1HTkQch3!6
z?&_<O&$V5`)oa%wgcL}T1j}5;2Yc>t@gzs}BR4m<;EbsiP3H4Bd8!d-&8={ABGj~o
z_cj-kJB)HYvAf|9VV#$-vg*Z?(Py}QX8;qEujnmANZ~l_v;ob9iNm!&Nei*R_}vFl
zj>6*=@y+80FNC0|DcBrqOxz+Gs(unf!3l!1j9T$>)~WO2gB|xq-ZAklam+YhB^yc_
g*u4(8SSwZd12uhvl*%thvH$=807*qoM6N<$f=7HJ-v9sr
diff --git a/js/dojo/dijit/themes/tundra/images/radioButtonDisabled.png b/js/dojo/dijit/themes/tundra/images/radioButtonDisabled.png
index a2943d52ecfcdd4e50854f54b2cd86321c7fc540..8da7e78f77b7b497e83ad379b218755a74bb25b8
GIT binary patch
literal 403
zc$@)~0c`$>P)<h;3K|Lk000e1NJLTq000jF000jN1^@s6JJyv-00001b5ch_0Itp)
z=>Px#8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?0VqjCK~y-)os+vt
z#84217X-o9%4(|xTOUBM6>M#77kma=UqZ08va%1vq*w?mn<9kV1G$rnAP9mWjQ@lL
zVzS9D79R&D=Nl$Jb7n*|`!9onAPC1`2_C?6b6$g^Nf{Sz!RKbPA=5O;ah&>Guh)cn
z3@*0H_;9DHDg{A6d7cljZJQf>gR4I>3g@fUsuq(Z8O5?JZt%{()|Fp$U8g9DcEZ!)
z{(UWT5a1_{W7-GTby<FE<x^RfC&%p)h9S#EE6*iKqAbhyf=7pwwekUnkf!O@l>7L;
z&+=<GutyH8EX$oVfi1i89DI15M^#mgVi*RCIymev$tC#WjVg*_fTn3I24FF^o@YSe
x0C^=DMNvo;MHZjH$>hUmnk<^f!QAwvmR}Yx+b^|2=7s<O002ovPDHLkV1g`QrJDc%
diff --git a/js/dojo/dijit/themes/tundra/images/radioButtonEnabled.png b/js/dojo/dijit/themes/tundra/images/radioButtonEnabled.png
index 20f2e11abf2de8584350e8c613815ae1f76628f7..4342feafd413d25754ee4ab45e2b47837378085d
GIT binary patch
literal 487
zc$@*}0T}*?P)<h;3K|Lk000e1NJLTq000jF000jN1^@s6JJyv-00001b5ch_0Itp)
z=>Px#8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?0eneBK~y-)os+R@
z!cY{3g+ifgr%p~n*FHd@YoTk`u0o%oYhR++NeBp?GKh;piGl<>xD*9NsTK>tXfzs4
zj5$63!APpcp~J_8n|%Mh=iGY}M3ne1dlQ*V=A210FU;F!yl2ji%KXD4W0%WiYBU<u
z>2zc)7K_C5-^|THnLj*LDis=yM&x-OEtgALEEeRtF0EE8YPZ`6aGAS5GEZEqs!Ef|
zgdE2adA(j!5Cr7=z62l)JK=v#loplMX0y3n3GyzG5nQcS5%4TB8o~JU`CMd-aUh`A
z>p}hq<;z?yw-s&Mjs-G$!j2KjNkviQ!)!K_y5qq1hr=P{pHMzQ6Q<Lt)HEKC4`NxC
zbiLJTL4J=m?6p>_NoNsan&ut|2BlI7aylv}8LQjv$`N6e!C*lBexD4(kaAF#uIms#
znbX}%a?3dNdR<n)E^y8`I)rJO2JwqY#a+)UMn?k+g@TaJ=P8@bLR6TGqYq;flG;2D
d@USa|`~q-w($N5`m{kA(002ovPDHLkV1k`X&}RSu
diff --git a/js/dojo/dijit/themes/tundra/images/radioButtonHover.png b/js/dojo/dijit/themes/tundra/images/radioButtonHover.png
index 7a069737ab1ff5c1f74105a15e9cdab970c342d2..fcb697fbaf1392d9f89f0b64c3cbcd4134ace88f
GIT binary patch
literal 497
zc$@+80S^9&P)<h;3K|Lk000e1NJLTq000jF000jN1^@s6JJyv-00001b5ch_0Itp)
z=>Px#8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?0ftFLK~y-)ozu-r
z!f+hNaUlr0cIwng=-M9;bPc+8?JD#abm$aRM5hiF1rbHh4<bT=Mv(<-KIPhcn9ixW
z&FN5(3LywSeSe~0niD#_82t8oe|0}L3joW1buG-V?hg|i*&&zB>kJt(jcLOi`LMfu
z2t-rh#eCy><ahwBt7P)em~JdM+<s`K3d)rl@~Q#3P=cyg@cvl`m&mdKUu61MObZiR
zhd0oTDx_QyqO5jdLk0RLw71G0tvz-IxfGI80r6D6ry>owz7MbgOO2Qv1o>99GF}t1
zDM8FZ$|@`lx8kw2Z96hK1zcR}OVbS&8?AVBdE)|UxqufT-It=3Sgg0=0d@#dwtxtq
zG8K(U;1d}Zd)g0d*X;?>1`#1H*^``CaO(81*w!A8lG<}527ic$H^6n_<7v3)2WVfM
z40gUGQ>1?P6b2`V@C7+M`XUHLW02$=oNg}*--xx>>p4yWE1TyyxVmlFJ9A-i{e*?b
nWW@BtXb!P9KMrQLGivz(*#@bqv*>A!00000NkvXXu0mjfwNuZV
diff --git a/js/dojo/dijit/themes/tundra/images/sliderEmpty.png b/js/dojo/dijit/themes/tundra/images/sliderEmpty.png
index 0bc245a72031e6e4abe79aa70617cff6476b6b07..070c12f5b69c92c2861eeb6f78a4a7d02cb2bc99
GIT binary patch
literal 124
zc%17D@N?(olHy`uVBq!ia0vp^%s|Y_!2~4vg%5rOQjEnx?oJHr&dIz4awJP!BT9nv
z(@M${i&7aJQ}UBi6+Ckj(^G>|6H_V+Po~-c6$yH}IEF}EPX58q%=06%Jb{5B>XG)$
T{P4}+fRYTJu6{1-oD!M<5ac3H
diff --git a/js/dojo/dijit/themes/tundra/images/sliderEmptyVertical.png b/js/dojo/dijit/themes/tundra/images/sliderEmptyVertical.png
index c91a4e35a6ecdd49a6e38b9ca03bac2b3804d959..45aceb7b5849aead90264670acf83b81de996860
GIT binary patch
literal 88
zc%17D@N?(olHy`uVBq!ia0vp^tU%1n!2~3)gaoYzQjEnx?oJHr&dIz4a)dlx977~7
lC;#YYd3R^$VTT5O201?MnbSAk*#(qk@O1TaS?83{1OQN}7s~(u
diff --git a/js/dojo/dijit/themes/tundra/images/sliderFull.png b/js/dojo/dijit/themes/tundra/images/sliderFull.png
index 6c9d0f87de2eb9ae6c905a582abd6d190dee9666..4b3fcbb0c46a31836d903147ac90ad40ce2fcca5
GIT binary patch
literal 135
zc%17D@N?(olHy`uVBq!ia0vp^%s|Y_!2~4vg%5rOQjEnx?oJHr&dIz4awJP!BT9nv
z(@M${i&7aJQ}UBi6+Ckj(^G>|6H_V+Po~-c70GzIIEF}EPX58q%yU1X;h`muK}<7a
e8*_V~lK_K4n});`?hgV$bqt=aelF{r5}E*o1|%&2
diff --git a/js/dojo/dijit/themes/tundra/images/sliderFullFocus.png b/js/dojo/dijit/themes/tundra/images/sliderFullFocus.png
index 1abdfeea8a662e1f814b17e833eeeafe17f6be07..ee193560dfd02462064dfb81ac4efb3bffe064ec
GIT binary patch
literal 163
zc%17D@N?(olHy`uVBq!ia0vp^%s|Y_!2~4vg%5rOQjEnx?oJHr&dIz4aukw1f_xbm
zs#F;m8k!jxe*Op2K=D!o28LG&3=CE?7#PI!C&eFi1FGdL@Q5sCVBi)8VMc~ob0mO*
zGM+AuArhC9D;Su0%o7?On(!FBX=H4hy84=v0K)<<Weau}cYUBb22WQ%mvv4FO#uCO
BCGP+L
diff --git a/js/dojo/dijit/themes/tundra/images/sliderFullVertical.png b/js/dojo/dijit/themes/tundra/images/sliderFullVertical.png
index 1e72421d82e4f1dc5be9685a53b8924698a4f485..e7618e839236ccbe0d5e9d64286887782beec5fd
GIT binary patch
literal 99
zc%17D@N?(olHy`uVBq!ia0vp^tU%1n!2~3)gaoYzQjEnx?oJHr&dIz4a%4SS977~7
xC;#~W|Nr*<`}6GU>)zhl%G};(B=CTl;nE@viHC>h2Llx{c)I$ztaD0e0s!zKA3p#9
diff --git a/js/dojo/dijit/themes/tundra/images/sliderFullVerticalFocus.png b/js/dojo/dijit/themes/tundra/images/sliderFullVerticalFocus.png
index ad9470519b41f7a82cbfd73a7b83618dd4fb26ae..3ab37e6cc041b558c478063cddef8c1b4288388b
GIT binary patch
literal 164
zc%17D@N?(olHy`uVBq!ia0vp^tU%1n!2~3)gaoYzQjEnx?oJHr&dIz4aukw1f_xbm
zs#F;m8k!jxe*Op2K=D!o28LG&3=CE?7#PI!C&eFi1FGdL@Q5sCVBi)8VMc~ob0mO*
zvYsxEArhC9D?U6p*eh-BH{Wh=`uTZNS6?#{c)-jMy;j*`XR1UhP$7e-tDnm{r-UW|
D-?A$W
diff --git a/js/dojo/dijit/themes/tundra/images/sliderThumb.png b/js/dojo/dijit/themes/tundra/images/sliderThumb.png
index a5a5dd6fb0516d085bbce000e1588c4caa910da1..fe335835c929642a1785a929609a4ffbf8f9929b
GIT binary patch
literal 241
zc%17D@N?(olHy`uVBq!ia0vp^0zk~q!3HGX7W?Z1DaPU;cPEB*=VV?2Ig%x=5hcO-
zX(i=}MX3yqDfvmM3ZA)%>8U}fi7AzZCsS>JirPF~978Nl&%JERbwoj;<>4Kj+;cB7
zbGCnCDLa_!a#TKt<vQn+)z<~(w4cAVnG*E;Q{*$XoO8*s@!4<h*xpF!K9It{%|D^%
z<AtdIPiyrX?^(Mttu^gp$yzJIIVDI#=!9jk%7mar9ty`iCOU95Dlxvdead_1*o>ER
mZa496<B0hoawPxAvtNugtic=~gr<W$#o+1c=d#Wzp$PzJHCw&_
diff --git a/js/dojo/dijit/themes/tundra/images/sliderThumbFocus.png b/js/dojo/dijit/themes/tundra/images/sliderThumbFocus.png
index 6d26e3f6c7ffdab59b3638be4ea143d04240cbce..fe9763a43e9ee1e819dbf2abdaefcc9a4b6ef55e
GIT binary patch
literal 288
zc%17D@N?(olHy`uVBq!ia0vp^0zk~q!3HGX7W?Z1DaPU;cPEB*=VV?2ISR=hLB0$O
zRjLdO4b2P;KmP-1pm?bP1H-EX1_rAc3=HD=lj4uM0o8IActjR6FmMZlFeAgPITAp@
znVv3=Ar`0SPB!FXRuo~~8+j`xWp?XYW<~ZJb=?gcd|$<Ah;I-QE!`-1#!hj6-}}QQ
z=R)k3Zr$f|`R!(%elsSS9a;0<=iR@b`{lub&=nimx3g!hom*P_@96uzEMA%-LKc0^
zPE3~RT%1d$Xs8GzFPY%L(dfi<ubPX~;<<)O!rG-T8b90L&aF00J|j@@U{!Hocu!JE
dZ^45)#^48rEUo);fIeYh@O1TaS?83{1OP!jVnhG{
diff --git a/js/dojo/dijit/themes/tundra/images/smallArrowDown.png b/js/dojo/dijit/themes/tundra/images/smallArrowDown.png
index ac7bbbf441a257fe54723d97e9851c6e796b922d..cabd01cd41bc85e9fccc2356c9b80dd21d6474a5
GIT binary patch
literal 134
zc%17D@N?(olHy`uVBq!ia0vp^tU%1n!3HFw&5r&6QjEnx?oJHr&dIz4awJP!BT9nv
z(@M${i&7aJQ}UBi6+Ckj(^G>|6H_V+Po~-c6-j%#IEF}EPEJTj_|f0^|3CXh4n_lc
emjfyZISh-pOFiS=7gY;X#^CAd=d#Wzp$P!t)+cNL
diff --git a/js/dojo/dijit/themes/tundra/images/smallArrowUp.png b/js/dojo/dijit/themes/tundra/images/smallArrowUp.png
index d26812d0bc795ce848853c042800bd8981edadc4..a4dd67068a9692ca4249a8204b2db00cd77a9aa3
GIT binary patch
literal 134
zc%17D@N?(olHy`uVBq!ia0vp^tU%1n!3HFw&5r&6QjEnx?oJHr&dIz4awJP!BT9nv
z(@M${i&7aJQ}UBi6+Ckj(^G>|6H_V+Po~-c6-j%#IEF}EPX6)#zdbVt^TB!xX*Gt!
e0d`IdZH%AFq@LxdXPy8mWAJqKb6Mw<&;$U)114wy
diff --git a/js/dojo/dijit/themes/tundra/images/splitContainerSizerH-thumb.png b/js/dojo/dijit/themes/tundra/images/splitContainerSizerH-thumb.png
index 87b459cb0f48c609d528e3a0149f5b5a247f5cd0..e7bc204d8ecf5f4191374e9ba9beec2fb7a99ce0
GIT binary patch
literal 127
zc%17D@N?(olHy`uVBq!ia0vp^!a&T-!2~4#Jy{GS85oO$+?^QKos)S9<VcpdMwA5S
zr<If^7Ns&crsOB3DtP85rl$s_CZ<#to=mj?DiZN@aSV~ToczO8FCoHBFX4y39s@%s
W_tXr{2?r*EjP!K%b6Mw<&;$UyyCY`+
diff --git a/js/dojo/dijit/themes/tundra/images/splitContainerSizerH.png b/js/dojo/dijit/themes/tundra/images/splitContainerSizerH.png
index 4b27d8aedc04ae93e262e2ba724bc2a1e51fc34a..0e5e4715fd735985f4101817aa12a9e191d869df
GIT binary patch
literal 140
zc%17D@N?(olHy`uVBq!ia0vp^j6lrJ!2~4T^fnv@2^0spJ29*~C-V}>kt}hIC<)F_
zD=AMbN@Z|N$xljE@XSq2PYp^<OsOn9nQ8-6r0D757$R|*^<X0>gMk3k#z+5{wI9_^
kE-z<d$(Vght23uw`Lf8)ORWo@02MQMy85}Sb4q9e0FT}&t^fc4
diff --git a/js/dojo/dijit/themes/tundra/images/splitContainerSizerV-thumb.png b/js/dojo/dijit/themes/tundra/images/splitContainerSizerV-thumb.png
index 69e02b18484309b27a549647deb94f718cc83962..410a0a7a4267a36ed5d41c271e2b508f2623810d
GIT binary patch
literal 129
zc%17D@N?(olHy`uVBq!ia0vp^%s?#6!2~34%~2=@QjEnx?oJHr&dIz4awJP!BT9nv
z(@M${i&7aJQ}UBi6+Ckj(^G>|6H_V+Po~-c6^VJeIEF}EPX6)r_4Q4ur~m!`f8Ky4
alA-YC)Qp}JabJNd7(8A5T-G@yGywp6!704}
diff --git a/js/dojo/dijit/themes/tundra/images/splitContainerSizerV.png b/js/dojo/dijit/themes/tundra/images/splitContainerSizerV.png
index f1d71952a44f0f95a6bef7d7cd4ee950feb4d7ac..6781f0ea91e0bf2f25d4406d58cadedb65ad9434
GIT binary patch
literal 135
zc%17D@N?(olHy`uVBq!ia0vp^>_E)O!2~4dW-8AFaf*Z7ofy`glX(f`NS3%plmzFe
zm6RtIr7}3C<R_&nc;+Uirv{}arc@T5Otk?jlJRtL43P*={`3F;e|v);zrVkKe}8}d
gzdt`8ALnOya!6#|W%g-%fa(}LUHx3vIVCg!0H|>;r~m)}
diff --git a/js/dojo/dijit/themes/tundra/images/tabActive.png b/js/dojo/dijit/themes/tundra/images/tabActive.png
index 7271066dd3577071d7748c88989c9e7863a1b5be..eaf1ed489d8f5ef92f82d8ecd0298262f7dd36cf
GIT binary patch
literal 155
zc%17D@N?(olHy`uVBq!ia0vp^%s?#7!2~4D&M%S!QjEnx?oJHr&dIz4awJP!BT9nv
z(@M${i&7aJQ}UBi6+Ckj(^G>|6H_V+Po~-c6&ZNCIEHAP-+ESCj6s3t$br58TYriL
zRK^CLUa>=CLE9#)HEbq{TNAb}{F5d-rS#)^xrx)>mt?=0brPtT!PC{xWt~$(69DQo
BG)Mpd
diff --git a/js/dojo/dijit/themes/tundra/images/tabClose.png b/js/dojo/dijit/themes/tundra/images/tabClose.png
index efed5c7b200faefbbe5a473817140083bdda8ad2..136cd220d97f7dbd2fee4c2c49b583d0ce2e0813
GIT binary patch
literal 220
zc%17D@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&k#^NA%Cx&(BWL^R}k|nMYCBgY=
zCFO}lsSJ)O`AMk?p1FzXsX?iUDV2pMQ*D5X3O!vMLp07O|M>sko|$8P#6~Bv4(^5u
zYk~bukKP6tM$WLBk>ss#kKxGw!h{KPR3n(Lq||gxG(BnLu$G0p>A+O&@CRKEIRXxs
zLJlyLs&_F7^qz6Mv|%peD@&f>jT&qZ!&5R9ZhERz&)SlpYWc{+SBk-H_39%VqjOFJ
PEobm_^>bP0l+XkKWrs}L
diff --git a/js/dojo/dijit/themes/tundra/images/tabCloseHover.png b/js/dojo/dijit/themes/tundra/images/tabCloseHover.png
index ee5f2db133be7436944a5c003c693e452553f4fd..290e77f55a765b7f92357da9e9e4514f6af12b0d
GIT binary patch
literal 220
zc%17D@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&k#^NA%Cx&(BWL^R}k|nMYCBgY=
zCFO}lsSJ)O`AMk?p1FzXsX?iUDV2pMQ*D5X3O!vMLp07O|M>sko|$8Mxy}UEM@$O$
z_>Qb!P+=Y7Beslh*$tr%bB2%gG7>83oYxpkCFdul_-^6}&_39tu;KR!)*VU$(kv59
zL=7D7b}nLYQQkb!BqzP0itliUPM6~k(MTzeGNF_6)N~^}`z(ScvoXXTX*u&QU$_Ej
OIfJLGpUXO@geCw8u1C)R
diff --git a/js/dojo/dijit/themes/tundra/images/tabDisabled.png b/js/dojo/dijit/themes/tundra/images/tabDisabled.png
index f891b37b7704303096e76b26d29f7c195f42fa78..ea0f61722a2e19436ae9635f6496ec9a66936ba7
GIT binary patch
literal 139
zc%17D@N?(olHy`uVBq!ia0vp^%s{Nc!2~3?C|;KZQj#UE5hcO-X(i=}MX3yqDfvmM
z3ZA)%>8U}fi7AzZCsS>JigZ0)978H@CDr`;qRA{_V0eJxrOvef|NjT;xyc59=uRxP
kRaRDhn&==a=Fq^%p!!($ch;S}mq3jSp00i_>zopr032N_L;wH)
diff --git a/js/dojo/dijit/themes/tundra/images/tabEnabled.png b/js/dojo/dijit/themes/tundra/images/tabEnabled.png
index fb750a0500f3eff0c4771e9fb109a59cd8ddf46e..d40cf4525b3df2afa80c92a7c9519be7972805f8
GIT binary patch
literal 142
zc%17D@N?(olHy`uVBq!ia0vp^j6kfx!2~2XTwzxLQj#UE5hcO-X(i=}MX3yqDfvmM
z3ZA)%>8U}fi7AzZCsS>JiVQqm978H@CH?yU-(Hx<*ucO*@$<xw`|JNdFfr>{!<Htd
ntgI~2%wTM69MR*#BapzLD`L<8YKqDdpk4+~S3j3^P6<r_UfwBD
diff --git a/js/dojo/dijit/themes/tundra/images/tabHover.gif b/js/dojo/dijit/themes/tundra/images/tabHover.gif
index a0193d45d6fa0083e6d0448c1c4326c42d41043f..471e0eee2fac9c182ac1a7bb89b23da88ebcd002
GIT binary patch
literal 156
zc${<hbhEHbWMt4_IKsg2{?pg5U%x$h_37j1uRnkOc>eb5n-5<fzWn^>&+or~{(S%T
z?ccwDk6wTM{N?MfUqAo-{rmg(uOC0Y-+%e#>6@>w-haLS;`75-U+%s5^8f$;=WjkS
vU;xFREMQs(M1bsMV3kzZX2Z#3>9U07EQ3Udq2aWW*sF>uHSd2bGFSrucP3YR
diff --git a/js/dojo/dijit/themes/tundra/images/tabHover.png b/js/dojo/dijit/themes/tundra/images/tabHover.png
index 259b075f7d0eb3ad655d3796ac25a84608b7afa0..16487f1dc99ef7d15881f9825be27669e0317787
GIT binary patch
literal 154
zc%17D@N?(olHy`uVBq!ia0vp^j6kfx!2~2XTwzxLQj#UE5hcO-X(i=}MX3yqDfvmM
z3ZA)%>8U}fi7AzZCsS>JiflYx978H@O*!Mpb-;j!+0pgq|H-d=y<$0bJ~fEjaFFd!
zka%f%EBDd(pDPzT-skj``#JTY<%ciZcW+^lVCcMOAvU8ddj-%O22WQ%mvv4FO#o^I
BH244j
diff --git a/js/dojo/dijit/themes/tundra/images/titleBar.png b/js/dojo/dijit/themes/tundra/images/titleBar.png
index 1835944f7e050d5595e73a7fa1a2368a8e3a12fb..b2609f37252cee0c40cc9d2477535c2c15042532
GIT binary patch
literal 151
zc%17D@N?(olHy`uVBq!ia0vp^Oh7!114LFUpHl-;>?NMQuIx8CMR^&-B`i(&fkK=G
z9+AZi4BSE>%y{W;-5;Q!nWu|mNX4z>KmY&RGcz-vULU`|K}48YVuJ(g$H4#p{wfCv
ttd_BpvvYKFb8E47Um2J+Wsx8&!%uUMZ;m=gmjO*+@O1TaS?83{1OOzyDbN4_
diff --git a/js/dojo/dijit/themes/tundra/images/tooltipConnectorDown.gif b/js/dojo/dijit/themes/tundra/images/tooltipConnectorDown.gif
index f96fca4aebb1b7bfa8cb370c6649911078b6aa29..18b27951a621432e00f27efc7da9255b450df227
GIT binary patch
literal 179
zc${<hbhEHb6ky<EXklakg8%>j-+ub8Z0V_*m1pW!ovmAawtMrXIeV`!Ja}`}@w;2k
z-amHp`I+0#@4x)`^4+IrZ$G_x^X5O%K=CIF&=PqD9gs~RI~iCF9(<P!%$(J>Lh5Yg
tvQ-v4R0Y>}pFZ&Y#V1?lLrWOg0{6x#7J0A<yFK^tS{t=KB9w!{8UQ_FY~ug`
diff --git a/js/dojo/dijit/themes/tundra/images/tooltipConnectorDown.png b/js/dojo/dijit/themes/tundra/images/tooltipConnectorDown.png
index cc345a6661bcdbf6a0508fcd27281489f62d338d..1aff5a3c9977aa3cb22ed7a4e1eb6ee402305127
GIT binary patch
literal 410
zc$@*60cHM)P)<h;3K|Lk000e1NJLTq000mG000gM1^@s6CNG?d00006VoOIv0RI60
z0RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_000McNliru*aRE~4mfZ6lcxXx0VhdB
zK~yNurIF1_0&x_@e>0J<Qt#j+w1{3o+89W|&@RYD%V^^+NNN><EpidLOc14lsEw6|
zgA!v6iq1&$)y%&|2{w%%;8~t??+@;|k`RJawzLE!)2qvyOi}vcX&uOC5^)_s{`DKc
zO0(y=la>emq66#!*3cUQTtGR$ZCR55C&gL^*Z~G%06@O~>6Y)BrXRIj?|NUlVQawA
zs4s`+whE7$709uFfLuj2fQ_&p20VLyaCrIf_NR;Mdf&1={|dO71_0Q-SG$9r^AmYe
zjAFIz07}$pa%9<oP)^GY1K_Npe)xgd2img&0FHIjt`({s?e*O-frD|M83!N;M6&#%
z$An;e^zUIwLWsy9l`Sm*Yd|h4&m`iL0kcYGPR$MY1{WECu0`!%q5uE@07*qoM6N<$
Ef@)!?%K!iX
diff --git a/js/dojo/dijit/themes/tundra/images/tooltipConnectorLeft.gif b/js/dojo/dijit/themes/tundra/images/tooltipConnectorLeft.gif
index 4d0a88c799afb20b57e22845095c62818f92dc79..3d9cbc5428b5cd1bf2237ca5f355d524b622991a
GIT binary patch
literal 193
zc${<hbhEHb6ky<EIKlt||NsC0{N?NIr|-&^o~l`Srf${Qy47d9H(#2w_xi$vH&-3M
zyY=k-V>h3lx&8e9%a1SLeR}rx)8}vB|NQy$`}gl(zkdDv`SZt*AK$-!|Mu<M*RNlJ
zrZFG^#h)yU3=Gl?Iv@_nP6k%H2WovOne%QJE_f1XBRpG<*Y)U&jUJ)#bJ<;vIO)vd
n>*_9A$s)yeCQXm=V1%KOsPlxACtTQ@oIlI1Je3i`!C(yl#MERO
diff --git a/js/dojo/dijit/themes/tundra/images/tooltipConnectorLeft.png b/js/dojo/dijit/themes/tundra/images/tooltipConnectorLeft.png
index 3026ca56df2a36a876130ba23527f9e6c58be265..e68fec3d86b28fcb75163bef62c2db090fde4bef
GIT binary patch
literal 3106
zc$@(u4BhjIP)<h;3K|Lk000e1NJLTq000mG000gM1^@s6CNG?d00009a7bBm000XU
z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+<Lqi~Na&Km7Y-Iodc-oy)XH-+^7Crag
z^g>IBfRsybQWXdwQbLP>6p<z>Aqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uh<iVD~V
z<RPMtgQJLw%KPDaqifc@_vX$1wbwr9tn;0-&j-K=43<bUQ8j=JsX`tR;Dg7+#^K~H
zK!FM*Z~zbpvt%K2{UZSY_<lS*D<Z%Lz5oGu(+dayz)hRLFdT>f59&ghTmgWD0l;*T
zI7<kC6aYYajzXpYKt=(8otP$50H6c_V9R4-;{Z@C0AMG7=F<Rxo%or10RUT+Ar%3j
zkpLhQWr#!oXgdI`&sK^>09Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p
z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-<?i
z0%4j!F2Z@488U%158(66005wo6%pWr^Zj_v4zAA5HjcIqUoGmt2LB>rV&neh&#Q1i
z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_<lS*MWK+n+1cgf
z<k(8YLR(?VSAG6x!e78w{cQPuJpA|d;J)G{fihizM+Erb!p!tcr5w+a34~(Y=8s4G
zw+sLL9n&JjNn*KJDiq^U5^;`1nvC-@r6P$!k}1U{(*I=Q-z@tBKHoI}uxdU5dyy@u
zU1J0GOD7Ombim^G008p4Z^6_k2m^p<gW=D2|L;HjN1!DDfM!XOaR2~bL?kX$%CkSm
z2mk;?pn)o|K^yeJ7%adB9Ki+L!3+FgHiSYX#KJ-lLJDMn9CBbOtb#%)hRv`YDqt_v
zKpix|QD}yfa1JiQRk#j4a1Z)n2%f<xynzV>LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW
zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_Ifq<Ex{*7`05XF7hP+2Hl!3BQJ=6@fL%FCo
z8iYoo3(#bAF`ADSpqtQgv>H8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X
zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ<AYmRsNLWl*PS{AOARHt#5!wki2?K;t
z!Y3k=s7tgax)J%r7-BLphge7~Bi0g+6E6^Zh(p9TBoc{3GAFr^0!gu?RMHaCM$&Fl
zBk3%un>0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4
z<uv66WtcKSRim0x-Ke2d5jBrmLam{;Qm;{ms1r1GnmNsb7D-E`t)i9F8fX`2_i3-_
zbh;7Ul^#x)&{xvS=|||7=mYe33=M`AgU5(xC>fg=2N-7=cNnjjOr{yriy6mMFgG#l
znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U
zt5vF<Q0r40Q)j6=sE4X&sBct1q<&fbi3VB2Ov6t@q*0);U*o*SAPZv|vv@2aYYnT0
zb%8a+Cb7-ge0D0knEf5Qi#@8Tp*ce{N;6lpQuCB%KL_KOarm5cP6_8Ir<e17iry6O
zDdH&`rZh~sF=bq9s+O0QSgS~@QL9Jmy*94xr=6y~MY~!1fet~(N+(<=M`w@D1)b+p
z*;C!83a1uLJv#NSE~;y#8=<>IcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya?
z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y
zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB
zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt
z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a<fJbF^|4I#xQ~n$Dc=
zKYhjYmgz5NSkDm8*fZm{6U!;YX`NG>(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C
z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB
zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe
zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0
z?2xS?_ve_-k<Mujg;0Lz*3buG=3$G&ehepthlN*$KaOySSQ^nWmo<0M+(UEUMEXRQ
zMBbZcF;6+KElM>iKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$
z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4
z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu
zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu
z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E
ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw
zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX
z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i&
z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01
z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R
z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw
zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD
zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3|
zawq-H%e&ckC+@AhPrP6BK<z=<L*0kfKU@CX*zeqbYQT4(^U>T#_XdT7&;F71j}Joy
zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z
zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot<a{81DF0~rvGr5Xr~8u`lav1h
z1DNytV>2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C`
z008P>0026e000+nl3&F}0003!Nkl<Zc-mt8|NlP&GRU2Glz|Aq!@$76IXTJtH4_8r
zAen)I;Wh&UgC7F}0|N^Q8qF9O7^aExaY)A7sS3&nbI)O5V3<pc0TK)h480tz%pM^Y
z3Vg<jA}D(B8NkWFz)-}@#8_gdDZ%chC&kIm!pr~*v;Y79GcYqV<1`?Uk&&TWS)7kI
z+(JP>h=(1n2_0ZFAcTQ|VTOgO=&xW?c`;lXVE|h!tY=_g@H~0v&9m+;S3f;@`wedZ
zF=8_vDJ>*0GcooWDhTm-=}WWma<ZbR<KW<6B$N&o{QdV|{>;6%Q`$FO`Ev03i@$&V
z{$u$6|3BPY#3ZCI3=9m#zyJO-*>e8r?vBk@Ki+uu@fRruz`#ug1_sZM-+sl-J9zg|
w`HJ%sNll3`u!(_zVFv>PgCfpABn1El07)}w-piGK0ssI207*qoM6N<$f@u%GQvd(}
diff --git a/js/dojo/dijit/themes/tundra/images/tooltipConnectorRight.gif b/js/dojo/dijit/themes/tundra/images/tooltipConnectorRight.gif
index 4e22c1a638ea14c068c22e8645c35da1be27e288..2b887f790414a5e3e0c59ea936e195c22acaa7ed
GIT binary patch
literal 194
zc${<hbhEHb6ky<EIKlt||NsC0{N?NIr|-&^o~l`Srf${Qy47d9H(#2w_xi$vH&-3M
zyY=k-V>h3lx&8e9%a1SLeR}rx)8}vB|NQy$`}gl(zkdDv`SZt*AK$-!|Mu<M*RNlJ
zrZFG^#h)yU3=Gl?Iv@_nP6k%{2WovOnsV(c^DYN3d2JCG(tIp>Y4|0k)zcOjH2s*U
ocS0p7QABehvvY9E$|Qx(ml~4=4e|_on-}Od7QQgiV_~oc09zhqkN^Mx
diff --git a/js/dojo/dijit/themes/tundra/images/tooltipConnectorRight.png b/js/dojo/dijit/themes/tundra/images/tooltipConnectorRight.png
index a7f91130a76a3bb13d12906ab201aaf1e6f0b89c..dc2434a1708ae700ae050e90516e2300bcbe3d1c
GIT binary patch
literal 3121
zc$@(-49@e3P)<h;3K|Lk000e1NJLTq000mG000gM1^@s6CNG?d00009a7bBm000XU
z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+<Lqi~Na&Km7Y-Iodc-oy)XH-+^7Crag
z^g>IBfRsybQWXdwQbLP>6p<z>Aqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uh<iVD~V
z<RPMtgQJLw%KPDaqifc@_vX$1wbwr9tn;0-&j-K=43<bUQ8j=JsX`tR;Dg7+#^K~H
zK!FM*Z~zbpvt%K2{UZSY_<lS*D<Z%Lz5oGu(+dayz)hRLFdT>f59&ghTmgWD0l;*T
zI7<kC6aYYajzXpYKt=(8otP$50H6c_V9R4-;{Z@C0AMG7=F<Rxo%or10RUT+Ar%3j
zkpLhQWr#!oXgdI`&sK^>09Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p
z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-<?i
z0%4j!F2Z@488U%158(66005wo6%pWr^Zj_v4zAA5HjcIqUoGmt2LB>rV&neh&#Q1i
z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_<lS*MWK+n+1cgf
z<k(8YLR(?VSAG6x!e78w{cQPuJpA|d;J)G{fihizM+Erb!p!tcr5w+a34~(Y=8s4G
zw+sLL9n&JjNn*KJDiq^U5^;`1nvC-@r6P$!k}1U{(*I=Q-z@tBKHoI}uxdU5dyy@u
zU1J0GOD7Ombim^G008p4Z^6_k2m^p<gW=D2|L;HjN1!DDfM!XOaR2~bL?kX$%CkSm
z2mk;?pn)o|K^yeJ7%adB9Ki+L!3+FgHiSYX#KJ-lLJDMn9CBbOtb#%)hRv`YDqt_v
zKpix|QD}yfa1JiQRk#j4a1Z)n2%f<xynzV>LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW
zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_Ifq<Ex{*7`05XF7hP+2Hl!3BQJ=6@fL%FCo
z8iYoo3(#bAF`ADSpqtQgv>H8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X
zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ<AYmRsNLWl*PS{AOARHt#5!wki2?K;t
z!Y3k=s7tgax)J%r7-BLphge7~Bi0g+6E6^Zh(p9TBoc{3GAFr^0!gu?RMHaCM$&Fl
zBk3%un>0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4
z<uv66WtcKSRim0x-Ke2d5jBrmLam{;Qm;{ms1r1GnmNsb7D-E`t)i9F8fX`2_i3-_
zbh;7Ul^#x)&{xvS=|||7=mYe33=M`AgU5(xC>fg=2N-7=cNnjjOr{yriy6mMFgG#l
znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U
zt5vF<Q0r40Q)j6=sE4X&sBct1q<&fbi3VB2Ov6t@q*0);U*o*SAPZv|vv@2aYYnT0
zb%8a+Cb7-ge0D0knEf5Qi#@8Tp*ce{N;6lpQuCB%KL_KOarm5cP6_8Ir<e17iry6O
zDdH&`rZh~sF=bq9s+O0QSgS~@QL9Jmy*94xr=6y~MY~!1fet~(N+(<=M`w@D1)b+p
z*;C!83a1uLJv#NSE~;y#8=<>IcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya?
z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y
zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB
zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt
z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a<fJbF^|4I#xQ~n$Dc=
zKYhjYmgz5NSkDm8*fZm{6U!;YX`NG>(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C
z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB
zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe
zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0
z?2xS?_ve_-k<Mujg;0Lz*3buG=3$G&ehepthlN*$KaOySSQ^nWmo<0M+(UEUMEXRQ
zMBbZcF;6+KElM>iKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$
z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4
z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu
zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu
z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E
ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw
zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX
z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i&
z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01
z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R
z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw
zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD
zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3|
zawq-H%e&ckC+@AhPrP6BK<z=<L*0kfKU@CX*zeqbYQT4(^U>T#_XdT7&;F71j}Joy
zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z
zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot<a{81DF0~rvGr5Xr~8u`lav1h
z1DNytV>2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C`
z008P>0026e000+nl3&F}0003@Nkl<Zc-o|ryGw#$6o;Qr?V>@HVc2B|x-1e_QxFZ&
zSV)3nQ!Nz~fkRP)e?v3`1yMuP($Y}01|k$B)ez=TkR>Drsi`U7cUn@g#0&l4@bbQJ
z9?s!?6cJ%@*J}Y%K!P&aoEa&&>wZoL5CmqaGKz?xs;Y#dpI`eI!Du9w4g(9oWi=Df
zVK&vRP1)P0N4xFyHTpB)0I-&uKnI{{8X|&-Fx1sz@VExdW41P@UZ>mx>wvK&AlIC$
zTD^|R!A|3<qra)g+PI`B+yTyt0l8{!sAX=vuXVWBVghym*KdHK)PA98l0)BPED}$@
z0`tIiQGkdPJjPR5PH$c^{-^hZs)-xeEA|6_0IDW<AKujS+i)tYYTJOPoLqT8ARNma
zUp=Qjk{KVc3<N3>$pEl&<lg`$05@<_jfpvtwg6kT&3TpolkWilthAUrNRZsB00000
LNkvXXu0mjfVJ^i<
diff --git a/js/dojo/dijit/themes/tundra/images/tooltipConnectorUp.gif b/js/dojo/dijit/themes/tundra/images/tooltipConnectorUp.gif
index 37729b84aaf929b7a3d0af8093cd70f03b4dc0b4..d0cad8a2c694781f7780013125dc5431e83ad196
GIT binary patch
literal 184
zc${<hbhEHb6ky<EIKlt||NsAg^XdDm4`0ico~l`Srf${Qy47d9H(#2w_xi$vH&-3M
z`|#DrE05mXd-?Ix*Y6*`e*f|77f=fWaX|4W3nK%A5Q7eg1G1BW)pUVMUrOe@j8*HN
z9qej<w8<l31G@;1ag|PE!lLV4EX@2$FCSR2NqYqztW?>;az(+p@`PNvB7-#mm>@@u
diff --git a/js/dojo/dijit/themes/tundra/images/tooltipConnectorUp.png b/js/dojo/dijit/themes/tundra/images/tooltipConnectorUp.png
index bf13c7135d971fa1feeb4567853bd36ec35df4eb..55a378b8959452e791daa6a06166f9d35115a232
GIT binary patch
literal 3092
zc$@(g4D0iWP)<h;3K|Lk000e1NJLTq000mG000gM1^@s6CNG?d00009a7bBm000XU
z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+<Lqi~Na&Km7Y-Iodc-oy)XH-+^7Crag
z^g>IBfRsybQWXdwQbLP>6p<z>Aqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uh<iVD~V
z<RPMtgQJLw%KPDaqifc@_vX$1wbwr9tn;0-&j-K=43<bUQ8j=JsX`tR;Dg7+#^K~H
zK!FM*Z~zbpvt%K2{UZSY_<lS*D<Z%Lz5oGu(+dayz)hRLFdT>f59&ghTmgWD0l;*T
zI7<kC6aYYajzXpYKt=(8otP$50H6c_V9R4-;{Z@C0AMG7=F<Rxo%or10RUT+Ar%3j
zkpLhQWr#!oXgdI`&sK^>09Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p
z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-<?i
z0%4j!F2Z@488U%158(66005wo6%pWr^Zj_v4zAA5HjcIqUoGmt2LB>rV&neh&#Q1i
z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_<lS*MWK+n+1cgf
z<k(8YLR(?VSAG6x!e78w{cQPuJpA|d;J)G{fihizM+Erb!p!tcr5w+a34~(Y=8s4G
zw+sLL9n&JjNn*KJDiq^U5^;`1nvC-@r6P$!k}1U{(*I=Q-z@tBKHoI}uxdU5dyy@u
zU1J0GOD7Ombim^G008p4Z^6_k2m^p<gW=D2|L;HjN1!DDfM!XOaR2~bL?kX$%CkSm
z2mk;?pn)o|K^yeJ7%adB9Ki+L!3+FgHiSYX#KJ-lLJDMn9CBbOtb#%)hRv`YDqt_v
zKpix|QD}yfa1JiQRk#j4a1Z)n2%f<xynzV>LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW
zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_Ifq<Ex{*7`05XF7hP+2Hl!3BQJ=6@fL%FCo
z8iYoo3(#bAF`ADSpqtQgv>H8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X
zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ<AYmRsNLWl*PS{AOARHt#5!wki2?K;t
z!Y3k=s7tgax)J%r7-BLphge7~Bi0g+6E6^Zh(p9TBoc{3GAFr^0!gu?RMHaCM$&Fl
zBk3%un>0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4
z<uv66WtcKSRim0x-Ke2d5jBrmLam{;Qm;{ms1r1GnmNsb7D-E`t)i9F8fX`2_i3-_
zbh;7Ul^#x)&{xvS=|||7=mYe33=M`AgU5(xC>fg=2N-7=cNnjjOr{yriy6mMFgG#l
znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U
zt5vF<Q0r40Q)j6=sE4X&sBct1q<&fbi3VB2Ov6t@q*0);U*o*SAPZv|vv@2aYYnT0
zb%8a+Cb7-ge0D0knEf5Qi#@8Tp*ce{N;6lpQuCB%KL_KOarm5cP6_8Ir<e17iry6O
zDdH&`rZh~sF=bq9s+O0QSgS~@QL9Jmy*94xr=6y~MY~!1fet~(N+(<=M`w@D1)b+p
z*;C!83a1uLJv#NSE~;y#8=<>IcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya?
z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y
zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB
zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt
z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a<fJbF^|4I#xQ~n$Dc=
zKYhjYmgz5NSkDm8*fZm{6U!;YX`NG>(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C
z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB
zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe
zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0
z?2xS?_ve_-k<Mujg;0Lz*3buG=3$G&ehepthlN*$KaOySSQ^nWmo<0M+(UEUMEXRQ
zMBbZcF;6+KElM>iKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$
z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4
z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu
zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu
z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E
ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw
zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX
z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i&
z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01
z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R
z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw
zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD
zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3|
zawq-H%e&ckC+@AhPrP6BK<z=<L*0kfKU@CX*zeqbYQT4(^U>T#_XdT7&;F71j}Joy
zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z
zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot<a{81DF0~rvGr5Xr~8u`lav1h
z1DNytV>2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C`
z008P>0026e000+nl3&F}0003mNkl<Zc-o|r%Sr-a6vuzgI5!z5sWc_Jm}JR7VNeo6
z7!kP&$``09gce^x^a4S<5CWmv^w9$Zt%6o9g0FYzNm|9UENr}hXL&Ba^FNnZ7={dE
z8bjL9fOxN<kV*&kfTyT<JE;Bwgj7*EE5JSQ4LlF5pdC~JID7oK3pR_!!`tU|81mW<
zs$ZQAwQj{is)KaWo?o6B_X-nU5;z}ti9#w@*J7=c?UDy@SSx09Ep{QK$_{#k%ku1~
zJLWk6cnOP*Qq}@meE~wM1w+@GjY{79>))@;IkutKg;Z<(6x{4A<s8?s{*PAoQ^0L6
z!0t%GT(9|)demIg>7<tS?3|G5C<<T#t;Xt<W0^+R=Q^$X8Q=<VI{|s%rCi9Gy}mQ$
i+VSJ9#dp8~_!$7n5jnq~qr|QN0000<MNUMnLSTaNBfl2_
diff --git a/js/dojo/dijit/themes/tundra/images/treeExpand_leaf.gif b/js/dojo/dijit/themes/tundra/images/treeExpand_leaf.gif
index 1a09ebecade5986918117ddd0545e19dda4b50c0..4b1c6c1560194b74d2d2707f527782478cacac89
GIT binary patch
literal 839
zc${<hbhEHb6k-r!_|C|%fB$}lQ7{TdDp35%!pOkD$e;t_fbs+bhYABThm6OD1qYis
igtcN$Y*=`>T|n81MWA8P(Jmq5tUD(*CLeELum%8`$Q6hH
diff --git a/js/dojo/dijit/themes/tundra/images/treeExpand_leaf_rtl.gif b/js/dojo/dijit/themes/tundra/images/treeExpand_leaf_rtl.gif
index 067d534d4cffd068f937ba778c35d9984ad7a89b..b563d7c6c0f906680c0b2abace4d0c57e6c2edfa
GIT binary patch
literal 841
zc${<hbhEHb6k-r!_|C|%fB$}lQ7{TdDp35%!pOkD$e;t_fbs+bhZ+Mjhm6OD1qYis
kgtcN$Y*=`>T|ilnMWA8P(Jmq5tUD(*E_QEXWMr@g0KxSYIsgCw
diff --git a/js/dojo/dijit/themes/tundra/images/treeExpand_loading.gif b/js/dojo/dijit/themes/tundra/images/treeExpand_loading.gif
index b6d53b9da82fc5aad2019f6760448a07a7de1206..424d376ac385822bbd12c175c6a0bd1be2103b3a
GIT binary patch
literal 1944
zc$~G9ZBSEZ8ivma2?P*52yMltyAdd2MMcDx)ov$HU?Z{}5Ibu-lu=99E^D2*t25Z{
z?j%4oI+h|*OD#gq$=5mgfDjlIijsr?If;wZBuIg@P%=;nEGHo!k`LIRKlTrQ_kRAp
z@60>bJlFmH;Yfbg?@q-7@qpI`G&eVk#bU45J2W&T5C}#`NBw?3f*>BR*I+RCd_ILj
zvAn#zV7CtsKaxl!QmNGGaCkf(lgT8Oi09_!>~?z~5FiLbscgeg%wWLXZZ{w1+wBVh
zzh9+l9}eYFXog_~2?m2sr!x@n%VlzvN<}yb6vGU-0fyo6@o~9arW?=^O9UT={Q<v3
zEP1xFVm6!9YIW#=P>7`^1Q8$tflj9r2}N?5Od(gu<?>)K(5_M$3`Pt^4Mu~*=^z{q
zv&ke^C@>5Q1_Bs{DircSAc(+-*W(q6geJ48wN)`OG4AnrWpcT0V8G+`4Cn?X#>bak
z%a0$MtdrKqCeso@==HcnEH;_U7PAF`;rsXRn@whi!|C_=U>H%fDvS?}D=RB*x6AMI
z3j{(KfsIDv-L9^&v9U*whNq^caJ{}?t8L-)dwY8==Jg;5>~Ii5p=f30+5FRaDTYm2
ztzBJRu4UKVdw2W$`^P879S(;;fGiP9E|+U{b*-bLQ_<Smu4?b-?1W+d=#$Y04<6VT
z?EXMte%>yYNCtGeo}M0Ue?Nvv1O9;3`jgw`7K%hJx0@iAo<5x)92&AOEGXOBhKBS~
zDYm${==b|%av98rF{!jq-DkC0CnqOy99Q?LeSW_}(W>t2YhRCQaq&On6BD7es@heZ
z9i44T<xf^?$cacK)N1?nIPP>hX6NQ$KHue9URYcRS+dz|8jYr<rDbx`YBU-M!eKNR
z#3C_@Vham)pWnyl^Sisde;gZIU0t2|Wk%KBE|bY-XJ_YTXPaA^aon)H?6O!afnd<<
z^{lO}0sn{WSc`ry?|8|(*+qF7d(*?f^`jLsB?_<sY3ujv-vpq30pO7|rjoCzwhive
z<rPimT()gu(w=G5jH7YU1$8I$w3^!AM5j2bK{zV8hb}F}9uK_y%5IrWnn)OH_U-<@
z@Ylqm+8bwfe;2!7t3rR^+@L!Tq2(IV&WJmt{k*G#)e#Yj(+4Z3)arLWqFjDIlAp#F
z*bK-=3DEy|KmY``h6bSibDbwOJv<B~$EC<mX2-w64f}wn+^@{3=0w$8PojR@&pQB7
z%9B&0^GQ70^{ctKN_6zSXvV!{Ni|pnK<Gmk8-}(t9oRG2c%(CxbE{-4=~o7uq>IT)
z-Ao4fW5wJPC$fs7PEOTR?vh6h=3~V`_E*>HlOW&|#zsWXH<Zd^+#!XCF66xtk;5ff
zitc5w*wvhvL|zgzkx>^9y-LewC<}pj2>*bQL>C#qNe2No>1Gpq%S?Ganm~~h-cF}H
z-1esqv^Z*CQu5o-R1}pbD(s}8De7n@wEJ6q{YXV#?3O*L7cYGb)LzMps9|orp%*;L
z>W0J+PXk!NjpK%aOd1O6)hAEoKn+y(OS;2J`m^K_Qet=P7p0A*xa#%pmyeacS)|Dh
zSAM$p&UtiNz}x!G;eGdL1sCFsJ0l%6u{(}UbI;FEqm1CW=v=fo(wUtJ^-H#sU{&rf
z;+QzZ2HfFp+mPqna~_DDT}6%E{&r&#{j1l=;qTCR*VUV={&@S-kr5UiRU3AoJl#@P
zdbup2Kw64tWLL$c;h(X-E!WmG9vLiTyDN$c|6JCqqZMSD3-YNy7nanCVNRx$TKnCh
z+SG0=4BIOD@Zw*e)PUed2<#UK?*r?K3fseT0B+ddmFf(Z{x;_|0H9ZfUwLaA6j?Np
zRag5Z1mVT>ksa%bG?gfDv*}&ZrVE+q5z*J%$Umo>X*tn3{}wPQz2<slO;y?^`ZcDy
zVTwYb(reE{M^9bl97-EWKJ%I3C|G*>1fyVc_Ho|EP?uhKQn#%)*>w;HL%lge<)tgt
zJkIx>6#7^sxcx6sM{q2QmEUj*!hifQFCzrCcj(Ilz)c!A3n>2=y6bZ8@cEq;;i+MK
z@ecxO8N#eQjYRP1Wu3`SGPNb#UHK{TEa7S16?#>#>$rNl_-~(-gp)U-`TRwTo1R-b
z>q?$xRL_K$H69$%C6<zR++tOpjeo1^i8g`7JooCGhm%V}mN=YiU)y+1^I(eQ^~Njb
z8Y6Sl5(<BBp=xLa4Kc->u+LKkHWnr3x8#cz88&DbOrXwXZKqCynVd^K*guFlwotI=
L){RY6;P8I|tuwOt
diff --git a/js/dojo/dijit/themes/tundra/images/treeExpand_minus.gif b/js/dojo/dijit/themes/tundra/images/treeExpand_minus.gif
index c8b6cf2c7d15315a3a08cbfc453e7945ea15d666..5977782378ff197130fda60586c23fb92fe6d322
GIT binary patch
literal 211
zc${<hbhEHb6k-r!I3mdK;>C;m_wO?>FdRL4G%_;s*s)`$PMy-z)4Ouz%C~RdZr;54
z_wU~e7cTtz^=tO**`1x8|NsAIAO$G?WMO1r5M<B+aX@x5um&Wk^rd9Z%UHGU#p8V+
zitT)IZ=dUVV>5p?e`|ropQ&<<hY~V5EP9u)GZY9!a0b74G4Vy!-l&U<9rdOko_IXz
ZY}#V^2|Hr?%5J=`Fv&iDzny`>8UPO8QXK#Q
diff --git a/js/dojo/dijit/themes/tundra/images/treeExpand_minus_rtl.gif b/js/dojo/dijit/themes/tundra/images/treeExpand_minus_rtl.gif
index cb09f9eaadd5b8a9707926391871ea1d49858af3..cf50054b6f6ac005e5a3e6f65cab6a9b89f7eb38
GIT binary patch
literal 210
zc${<hbhEHb6k-r!I3mdK;>C;m_wO?>FdRL4G%_;s*s)`$PMy-z)4Ouz%C~RdZr;54
z_wU~e7cTtz^=tO**`1x8|NsAIAO$G?WMO1r5M<B+aX@x5u=*#c^rd9Z%UHGU_2YdX
zimiNdZ*O|3P;>veYI~B03X^AF!zF_ZF{a}anHdx~*0E=WJn^X5e?RxgMUB~Kla42y
YO<S(`p~B|vireqk?5We|Vq~xe0DF{B00000
diff --git a/js/dojo/dijit/themes/tundra/images/treeExpand_plus.gif b/js/dojo/dijit/themes/tundra/images/treeExpand_plus.gif
index f42a84ba8e0726fa9d051c73fed5e6f913dc5623..2b96a555275b95cedd35c2997dd205ce69499972
GIT binary patch
literal 216
zc${<hbhEHb6k-r!I3mjM;>C+^-@ctadsatB=hCH1adB}+j~+ENG)zoPJb3WnqeqX<
zojZ5`{{3ISe%-uz^Y7okSFT*Cs;Zhjdo}|D!~g&P83+NzpDc_F45AD=AP&e*2G-C7
z)xMO>c^RwLt$4C;Ly1>N?(K^;?{{k29$;7c@nWh<Z%Xo_04dK&4i5}giY+-mk>x<F
q4+|5Mg7zeXb3KiWzUw?>3M!QDO>=lxQDc4R{qNg4jZKY;4AuY{Tvwg|
diff --git a/js/dojo/dijit/themes/tundra/images/treeExpand_plus_rtl.gif b/js/dojo/dijit/themes/tundra/images/treeExpand_plus_rtl.gif
index 0863d9cf9e9d97ddd4610318ea5aedfce94e32c0..11f9916748ec622755203971e2ee90e502d08c62
GIT binary patch
literal 215
zc${<hbhEHb6k-r!I3mjM;>C+^-@ctadsatB=hCH1adB}+j~+ENG)zoPJb3WnqeqX<
zojZ5`{{3ISe%-uz^Y7okSFT*Cs;Zhjdo}|D!~g&P83+NzpDc_F45AD=AP&e*2G)=S
z)xMO>c^RwLt$wm^Ly22R?(I#U_siql`X4YW*8K38*cN0MsMWvNLm^;B1b^@f4JHK+
pmdUIMYu36*WE^Jb)pM8mz*6(B?Z*4^@|5%MH~(vBR8nNH1^{8kRk{EG
diff --git a/js/dojo/dijit/themes/tundra/images/validationInputBg.png b/js/dojo/dijit/themes/tundra/images/validationInputBg.png
index 9c4fc2e0377e06e6f3e29bc399d6b00ca4ad4af8..d222fb4e58855251e80bfbedb2b5f9c263412027
GIT binary patch
literal 165
zc%17D@N?(olHy`uVBq!ia0vp^EI=&A!3HFszqfq{q!^2X+?^QKos)S9<VcpdMwA5S
zr<If^7Ns&crsOB3DtP85rl$s_CZ<#to=mj?Dzfr)aSYKopZw>;!^8D#DhCdoIPpWw
zwV|`~rR1(I_7__3Ch2_;h-~<He}6rb2Gjrli+6N4b~5tvBr-B|qzc3eCmfjwG=;&_
L)z4*}Q$iB}9=160
diff --git a/js/dojo/dijit/themes/tundra/images/warning.png b/js/dojo/dijit/themes/tundra/images/warning.png
index c8ca2d193dc8e47e36a5ff3d3a846c786757df1c..c52f83dc3b5ffb880302f50574758a5618bdc1fc
GIT binary patch
literal 1275
zc%0>v`%jx?6vt23a2e1Gw9xnM%>fQ7mkg6SCYq>A86_fM8HyU>bci^~v`!|M;h4@P
z%QnYAGbSUzhFumIBIzcY&>^f7Y(Xi5GB#+}b)~fQLaDvKZ+-a_{MnP7^T~65Ip6br
za!!{P7f@o@F#td*6pJJT>0231CaNHtRz`qyL{hL924}cy#AC-nvE(&?#+?8yUjz8V
z1c`oK4uItVKwbv`>yx&3mHPn5P+GJ<zbl49rBG>98l6T@N=!mn2$#cUqijBpk7M}K
z{Uv~t01+$}lAbQ`2e71lvS%uOzBaNLk#}y@?l-M_tefFAhwp{ML-~!P2ivEs8rtqX
z+E_8W9qs^9(Ixz#GpF)=>8XkOzPaXWi*54zx28>Z7uQX8@0!!M?(##m`lYjrnXlF!
zA2u3oo>hnU>bSnPN9FPcJ^o<Rjj7emK=16D#S;==7*JS(la_y$Tz;!RWOO*YC#Mdz
zwziLtUs5V>8I3ZvdPt)gSy&i*@IYlSXw7B{l~|0fv)LF-CW4|?x0}P|qHMOy=W}_z
z{!j?R@dd5c=yV(%>Ij5_PS*x}wma>ke5lwtVNgjfzXNq}W$KE2Uaoa(pI}c2vk0d+
zTn@@cd3+v*W6jDh?idy6UnbPutQyyil$3~BtRyxYO-)TnPTo;oUY3=WnVFe^2TmWW
z7j}1+;V!8~f5NBRWBPj!ZmGaMH^V`F7;}V;xo1vQ<6gDtUPBo7&y7|;RJCk8?qB(>
zaI!aBem=Xi1}1vmzIgNv#g7+nd{e)XL2`Xu{4f>f_<(smQz#r}Mo#CZXvEKrCct$h
z`nCY^IqZ|=MUP@(I1c(UlBYj>&#l)fBS98PI`?$)FE8fK9&6CHUs#`3f6Iu!ilX|T
z2B{PZokmNDk7qI%2#dw#aM&oy=kah13x~rvP7n))LV-ZQ<MFs$E~nG!a5!u>o7HMH
zo6RPZ$zU+(bh_o`<@xz}jYcy&J3BKoqgJa`DwR^HR45d3xqM(?KqixQbaXT|HA$t?
zs;a8W%1V()Boqn-0zq0@8lO+h<Z-#gd=8s%6GagONlZ*+G6`J_I-Sr+qf!a6l(@LK
zsHiA1dFvwVc02sXP;Yx&PQdxOq_`~n{|fl7x2AyDefy{4w~heBGPaTgKU_wLW^JM9
zmHmRhn*UT$?&L)0zs`F3cd=;OAH&0q5x-t9irsvF_4ed46!hu(<t6&<HI(kLU@KW<
zAB!4qB|R@n>268-zNa#;LK?qIK|Um9JiF@z$s(KUt6m~q>KyEsWbBS!;UT0mcjwQZ
aeDnC)Q^Q@tEWK&#LkjbYMT2_}eDyCckH_!;
diff --git a/js/dojo/dijit/themes/tundra/tundra.css b/js/dojo/dijit/themes/tundra/tundra.css
--- a/js/dojo/dijit/themes/tundra/tundra.css
+++ b/js/dojo/dijit/themes/tundra/tundra.css
@@ -1,1464 +1,3230 @@
-/*
- Adds cosmetic styling to Dijit. Users may swap with a custom theme CSS file.
-*/
-@import url("../dijit.css");
-
-.dj_safari .tundra .dijitPopup {
- /* -webkit-border-radius: 5px; */
- -webkit-box-shadow: 0px 5px 10px #adadad;
-}
-
-/*
- * Control opacity of popups
- */
-.tundra .dijitPopup div,
-.tundra .dijitPopup table {
- opacity: 0.95;
-}
-
-/*****
- dijit.form.Button
- dijit.form.DropDownButton
- dijit.form.ComboButton
- dijit.form.ComboBox (partial)
- *****/
-
+.dijitReset {
+
+ margin:0;
+ border:0;
+ padding:0;
+ line-height:normal;
+ font: inherit;
+ color: inherit;
+}
+.dijitInline {
+
+ display:inline-block;
+ #zoom: 1;
+ #display:inline;
+ border:0;
+ padding:0;
+ vertical-align:middle;
+ #vertical-align: auto;
+}
+.dijitHidden {
+
+ display: none !important;
+}
+.dijitVisible {
+
+ display: block !important;
+ position: relative;
+}
+.dj_ie INPUT.dijitTextBox,
+.dj_ie .dijitInputField INPUT {
+ font-size: 100%;
+}
+.dj_ie .dijitInputField INPUT {
+ margin: -1px 0 !important;
+}
+.dijitInlineTable {
+
+ display:inline-table;
+ display:inline-block;
+ #zoom: 1;
+ #display:inline;
+ box-sizing: content-box; -moz-box-sizing: content-box;
+ border:0;
+ padding:0;
+}
+.dijitTeeny {
+ font-size:1px;
+ line-height:1px;
+}
+.dijitPopup {
+ position: absolute;
+ background-color: transparent;
+ margin: 0;
+ border: 0;
+ padding: 0;
+}
+.dijit_a11y .dijitPopup,
+.dijit_ally .dijitPopup div,
+.dijit_a11y .dijitPopup table,
+.dijit_a11y .dijitTooltipContainer {
+ background-color: white !important;
+}
+.dijitInputField {
+ overflow:hidden;
+ #zoom:1;
+}
+.dijitPositionOnly {
+
+ padding: 0 !important;
+ border: 0 !important;
+ background-color: transparent !important;
+ background-image: none !important;
+ height: auto !important;
+ width: auto !important;
+}
+.dijitNonPositionOnly {
+
+ float: none !important;
+ position: static !important;
+ margin: 0 0 0 0 !important;
+ vertical-align: middle !important;
+}
+.dijitBackgroundIframe {
+
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ z-index: -1;
+ border: 0;
+ padding: 0;
+ margin: 0;
+}
+.dijitClickableRegion {
+
+ background-color: #e2ebf2;
+ cursor: text;
+}
+.dijitDisplayNone {
+
+ display:none !important;
+}
+.dijitContainer {
+
+ overflow: hidden;
+}
+.dijit_a11y * {
+ background-image:none !important;
+}
+.dijit_a11y .dijitCalendarIncrementControl {
+ display: none;
+}
+.dijit_a11y .dijitA11ySideArrow {
+ display: inline !important;
+ cursor: pointer;
+}
+.dijit_a11y .dijitCalendarDateLabel {
+ padding: 1px;
+}
+.dijit_a11y .dijitCalendarSelectedDate .dijitCalendarDateLabel {
+ border: solid 1px black;
+ padding: 0px;
+}
+.dijit_a11y .dijitCalendarDateTemplate {
+ padding-bottom: 0.1em !important;
+}
+.dijit_a11y .dijit * {
+ background:white !important;
+ color:black !important;
+}
+.dijit_a11y .dijitButtonNode {
+ border-color: black!important;
+ border-style: outset!important;
+ border-width: medium!important;
+}
+.dijit_a11y .dijitComboBoxReadOnly .dijitInputField,
+.dijit_a11y .dijitComboBoxReadOnly .dijitButtonNode,
+.dijit_a11y .dijitSpinnerReadOnly .dijitButtonNode,
+.dijit_a11y .dijitSpinnerReadOnly .dijitInputField,
+.dijit_a11y .dijitButtonDisabled .dijitButtonNode,
+.dijit_a11y .dijitDropDownButtonDisabled .dijitButtonNode,
+.dijit_a11y .dijitComboButtonDisabled .dijitButtonNode,
+.dijit_a11y .dijitComboBoxDisabled .dijitInputField,
+.dijit_a11y .dijitComboBoxDisabled .dijitButtonNode,
+.dijit_a11y .dijitSpinnerDisabled .dijitButtonNode,
+.dijit_a11y .dijitSpinnerDisabled .dijitInputField {
+ border-style: outset!important;
+ border-width: medium!important;
+ border-color: #999 !important;
+ color:#999 !important;
+}
+.dijitButtonNode * {
+ vertical-align: middle;
+}
+.dijit_a11y .dijitArrowButtonInner {
+ width: 1em;
+ display: none !important;
+}
+.dijitButtonNode .dijitArrowButtonInner {
+ background:no-repeat center;
+ width: 16px;
+}
+.dijitComboBox .dijitArrowButtonInner {
+ display: block;
+}
+.dijit_a11y .dijitToggleButtonChecked .dijitToggleButtonIconChar {
+ display: inline !important;
+}
+.dijitLeft {
+
+ background-position:left top;
+ background-repeat:no-repeat;
+}
+.dijitStretch {
+
+ white-space:nowrap;
+ background-repeat:repeat-x;
+}
+.dijitRight {
+
+ #display:inline;
+ background-position:right top;
+ background-repeat:no-repeat;
+}
+.dijitToggleButton,
+.dijitButton,
+.dijitDropDownButton,
+.dijitComboButton {
+
+ margin: 0.2em;
+}
+.dijitToolbar .dijitToggleButton,
+.dijitToolbar .dijitButton,
+.dijitToolbar .dijitDropDownButton,
+.dijitToolbar .dijitComboButton {
+ margin: 0;
+}
+.dj_ie8 .dijitToolbar button,
+.dj_webkit .dijitToolbar button {
+
+ padding: 1px 2px;
+}
+.dj_ie .dijitToolbar .dijitComboBox{
+
+ vertical-align: middle;
+}
+.dj_ie .dijitComboButton {
+
+ margin-bottom: -3px;
+}
+.dj_webkit .dijitToolbar .dijitDropDownButton {
+ padding-left: 0.3em;
+}
+.dj_gecko .dijitToolbar .dijitButtonNode::-moz-focus-inner {
+ padding:0;
+}
+.dijitButtonNode {
+
+ border:1px solid gray;
+ margin:0;
+ line-height:normal;
+ vertical-align: middle;
+ #vertical-align: auto;
+ text-align:center;
+ white-space: nowrap;
+}
+.dijitButtonNode, .dijitButtonNode * {
+ cursor: pointer;
+}
+.dijitReadOnly *,
+.dijitDisabled *,
+.dijitReadOnly,
+.dijitDisabled,
+.dijitDisabledClickableRegion {
+ cursor: not-allowed !important;
+}
+.dj_ie .dijitButtonNode {
+
+ zoom: 1;
+}
+.dj_ie .dijitButtonNode button {
+
+ overflow: visible;
+}
+.dijitArrowButton {
+
+
+ padding: 0 .4em;
+}
+DIV.dijitArrowButton {
+ float: right;
+}
+.dijitSpinner .dijitInputLayoutContainer .dijitArrowButton {
+ border-style: solid;
+ border-width: 0 0 0 1px !important;
+ padding: 0;
+ position: absolute;
+ right: 0;
+ float: none;
+}
+.dijitSpinner .dijitInputLayoutContainer .dijitArrowButton {
+ position: absolute;
+ height: 50%;
+}
+.dijitSpinner .dijitInputLayoutContainer .dijitDownArrowButton {
+ top: auto;
+ bottom: 0;
+ border-top-width: 1px !important;
+}
+.dijitSpinner .dijitInputLayoutContainer .dijitUpArrowButton {
+ top: 0;
+ bottom: auto;
+}
+TABLE.dijitComboButton {
+
+ border-collapse: collapse;
+ border:0;
+ padding:0;
+ margin:0;
+}
+.dijitToolbar .dijitComboButton {
+
+ border-collapse: separate;
+}
+.dj_ie BUTTON.dijitButtonNode {
+ overflow: visible;
+}
+table .dijitButton .dijitButtonNode,
+table .dijitComboButton .dijitButtonNode {
+ #overflow:hidden;
+}
+.dijitButtonNode IMG {
+
+ vertical-align:middle;
+
+}
+.dijitTextBox,
+.dijitComboBox,
+.dijitSpinner {
+ border: solid black 1px;
+ #overflow: hidden;
+ width: 15em;
+ vertical-align: middle;
+ #vertical-align: auto;
+}
+.dijitTimeTextBox {
+ width: 8em;
+}
+.dijitTextBox input:focus,
+.dijitComboBox input:focus,
+.dijitSpinner input:focus {
+ outline: none;
+}
+.dijitTextBoxFocused,
+.dijitComboBoxFocused,
+.dijitSpinnerFocused, .dijitSpinnerUpArrowActive, .dijitSpinnerDownArrowActive,
+.dijitTextAreaFocused {
+
+ outline: auto 5px -webkit-focus-ring-color;
+}
+.dijitTextBox INPUT,
+.dijitComboBox INPUT,
+.dijitSpinner INPUT {
+ border-left: solid black 1px;
+ display:inline;
+ position:static !important;
+ border:0 !important;
+ margin:0 !important;
+ vertical-align:top !important;
+ background-color:transparent !important;
+ background-image:none !important;
+ width:100% !important;
+}
+.dijitValidationIcon {
+ visibility: hidden;
+ display: block;
+ padding: 0 2px;
+ float: right;
+ height: auto;
+}
+.dijitValidationIconText {
+ visibility: hidden;
+ display: none;
+ float:right;
+ font-family: sans-serif;
+ font-style:italic;
+ font-size: 0.75em;
+ padding-right: 0.15em;
+ line-height: 160%;
+}
+.dijit_a11y .dijitValidationIcon { display: none !important; }
+.dijit_a11y .dijitValidationIconText { display: block !important; }
+.dijitError .dijitValidationIcon,
+.dijitError .dijitValidationIconText {
+ visibility: visible;
+}
+.dijitTextBox .dijitArrowButton {
+
+ display:none;
+}
+.dijitCheckBox,
+.dijitRadio,
+.dijitCheckBoxInput {
+ padding: 0;
+ border: 0;
+ width: 16px;
+ height: 16px;
+ background-position:center center;
+ background-repeat:no-repeat;
+ overflow: hidden;
+}
+.dijitCheckBox INPUT,
+.dijitRadio INPUT {
+ margin: 0;
+ padding: 0;
+ display: block;
+}
+.dijitCheckBoxInput {
+
+ opacity: 0.01;
+}
+.dj_ie .dijitCheckBoxInput {
+ filter: alpha(opacity=0);
+}
+.dijit_a11y .dijitCheckBox,
+.dijit_a11y .dijitRadio {
+ width: auto;
+ height: auto;
+}
+.dijit_a11y .dijitCheckBoxInput {
+ opacity: 1;
+ filter: none;
+ width: auto;
+ height: auto;
+}
+.dijitProgressBarEmpty{
+
+ position:relative;overflow:hidden;
+ border:1px solid black;
+ z-index:0;
+}
+.dijitProgressBarFull {
+
+ position:absolute;
+ overflow:hidden;
+ z-index:-1;
+ top:0;
+ width:100%;
+}
+.dj_ie6 .dijitProgressBarFull {
+ height:1.6em;
+}
+.dijitProgressBarTile {
+
+ position:absolute;
+ overflow:hidden;
+ top:0;
+ left:0;
+ bottom:0;
+ right:0;
+ margin:0;
+ padding:0;
+ width:auto;
+ height:auto;
+ background-color:#aaa;
+ background-attachment: fixed;
+}
+.dijit_a11y .dijitProgressBarTile{
+
+ border-width:4px;
+ border-style:solid;
+ background-color:transparent !important;
+}
+.dj_ie6 .dijitProgressBarTile {
+
+ position:static;
+
+ height:1.6em;
+}
+.dijitProgressBarIndeterminate .dijitProgressBarLabel {
+ visibility:hidden;
+}
+.dijitProgressBarIndeterminate .dijitProgressBarTile {
+
+}
+.dijitProgressBarIndeterminateHighContrastImage {
+ display:none;
+}
+.dijit_a11y .dijitProgressBarIndeterminate .dijitProgressBarIndeterminateHighContrastImage {
+ display:block;
+ position:absolute;
+ top:0;
+ bottom:0;
+ margin:0;
+ padding:0;
+ width:100%;
+ height:auto;
+}
+.dijitProgressBarLabel {
+ display:block;
+ position:static;
+ width:100%;
+ text-align:center;
+ background-color:transparent !important;
+}
+.dijitTooltip {
+ position: absolute;
+ z-index: 2000;
+ display: block;
+
+ left: 50%;
+ top: -10000px;
+ overflow: visible;
+}
+.dijitTooltipContainer {
+ border: solid black 2px;
+ background: #b8b5b5;
+ color: black;
+ font-size: small;
+}
+.dijitTooltipFocusNode {
+ padding: 2px 2px 2px 2px;
+}
+.dijitTooltipConnector {
+ position: absolute;
+}
+.dijitTooltipData {
+ display:none;
+}
+.dijitLayoutContainer{
+ position: relative;
+ display: block;
+ overflow: hidden;
+}
+body .dijitAlignTop,
+body .dijitAlignBottom,
+body .dijitAlignLeft,
+body .dijitAlignRight {
+ position: absolute;
+ overflow: hidden;
+}
+body .dijitAlignClient { position: absolute; }
+.dijitBorderContainer, .dijitBorderContainerNoGutter {
+ position:relative;
+ overflow: hidden;
+}
+.dijitBorderContainerPane,
+.dijitBorderContainerNoGutterPane {
+ position: absolute !important;
+ z-index: 2;
+}
+.dijitBorderContainer > .dijitTextArea {
+
+ resize: none;
+}
+.dijitGutter {
+
+ position: absolute;
+ font-size: 1px;
+}
+.dijitSplitter {
+ position: absolute;
+ overflow: hidden;
+ z-index: 10;
+ background-color: #fff;
+ border-color: gray;
+ border-style: solid;
+ border-width: 0;
+}
+.dj_ie .dijitSplitter {
+ z-index: 1;
+}
+.dijitSplitterActive {
+ z-index: 11 !important;
+}
+.dijitSplitterCover{
+ position:absolute;
+ z-index:-1;
+ top:0;
+ left:0;
+ width:100%;
+ height:100%;
+}
+.dijitSplitterCoverActive{
+ z-index:3 !important;
+}
+.dj_ie .dijitSplitterCover{
+ background: white;
+ filter: alpha(opacity=0);
+}
+.dijitSplitterH {
+ height: 7px;
+ border-top:1px;
+ border-bottom:1px;
+ cursor: ns-resize;
+}
+.dijitSplitterV {
+ width: 7px;
+ border-left:1px;
+ border-right:1px;
+ cursor: ew-resize;
+}
+.dijitSplitContainer{
+ position: relative;
+ overflow: hidden;
+ display: block;
+}
+.dijitSplitPane{
+ position: absolute;
+}
+.dijitSplitContainerSizerH,
+.dijitSplitContainerSizerV {
+ position:absolute;
+ font-size: 1px;
+ cursor: move;
+ cursor: w-resize;
+ background-color: ThreeDFace;
+ border: 1px solid;
+ border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;
+ margin: 0;
+}
+.dijitSplitContainerSizerH .thumb, .dijitSplitterV .dijitSplitterThumb {
+ overflow:hidden;
+ position:absolute;
+ top:49%;
+}
+.dijitSplitContainerSizerV .thumb, .dijitSplitterH .dijitSplitterThumb {
+ position:absolute;
+ left:49%;
+}
+.dijitSplitterShadow,
+.dijitSplitContainerVirtualSizerH,
+.dijitSplitContainerVirtualSizerV {
+ font-size: 1px;
+ background-color: ThreeDShadow;
+ -moz-opacity: 0.5;
+ opacity: 0.5;
+ filter: Alpha(Opacity=50);
+ margin: 0;
+}
+.dj_ie .dijitSplitterV, .dijitSplitContainerVirtualSizerH {
+ cursor: w-resize;
+}
+.dj_ie .dijitSplitterH, .dijitSplitContainerSizerV, .dijitSplitContainerVirtualSizerV {
+ cursor: n-resize;
+}
+.dijit_a11y .dijitSplitterH {
+ border-top:1px solid #d3d3d3 !important;
+ border-bottom:1px solid #d3d3d3 !important;
+}
+.dijit_a11y .dijitSplitterV {
+ border-left:1px solid #d3d3d3 !important;
+ border-right:1px solid #d3d3d3 !important;
+}
+.dijitContentPane {
+ display: block;
+ overflow: auto;
+}
+.dijitContentPaneSingleChild {
+
+ overflow: hidden;
+}
+.dijitTitlePane {
+ display: block;
+ overflow: hidden;
+}
+.dijitColorPalette {
+ border:1px solid #999;
+ background:#fff;
+ -moz-border-radius:3pt;
+}
+img.dijitColorPaletteUnder {
+ border-style:none;
+ position:absolute;
+ left:0;
+ top:0;
+}
+.dijitColorPaletteInner {
+ position: relative;
+ overflow:hidden;
+ outline:0;
+}
+.dijitPaletteCell {
+ width: 20px;
+ height: 20px;
+ position: absolute;
+ overflow: hidden;
+ z-index: 10;
+ outline-width: 0;
+}
+.dijitPaletteImg {
+ width: 16px;
+ height: 14px;
+ position: absolute;
+ top: 1px;
+ left: 1px;
+ overflow: hidden;
+ cursor: default;
+ border:1px solid #999;
+
+}
+.dijitPaletteCellHighlight img {
+ width: 14px;
+ height: 12px;
+ position: absolute;
+ top: 1px;
+ left: 1px;
+ overflow: hidden;
+ cursor: default;
+ border:2px solid #000;
+ outline:1px solid #dedede;
+
+}
+.dijit_a11y .dijitPaletteCell {
+ background-color:transparent !important;
+}
+.dijit_a11y .dijitPaletteImg {
+ background-color:transparent !important;
+}
+.dijitAccordionContainer {
+ border:1px solid #b7b7b7;
+ border-top:0 !important;
+}
+.dj_webkit .dijitAccordionContainer div:focus {
+ outline:none;
+}
+.dj_ff3 .dijitAccordionContainer div:focus {
+ outline:none;
+}
+.dijitAccordionTitle {
+ cursor: pointer;
+}
+.dijitAccordionFocused {
+ text-decoration: underline;
+}
+.dijitAccordionTitle .arrowTextUp,
+.dijitAccordionTitle .arrowTextDown {
+ display: none;
+ font-size: 0.65em;
+ font-weight: normal !important;
+}
+.dijit_a11y .dijitAccordionTitle .arrowTextUp,
+.dijit_a11y .dijitAccordionTitle-selected .arrowTextDown {
+ display: inline;
+}
+.dijit_a11y .dijitAccordionTitle-selected .arrowTextUp {
+ display: none;
+}
+.dijitCalendarContainer thead tr th, .dijitCalendarContainer thead tr td, .dijitCalendarContainer tbody tr td, .dijitCalendarContainer tfoot tr td {
+ padding: 0;
+}
+.dijitCalendarNextYear {
+ margin:0 0 0 0.55em;
+}
+.dijitCalendarPreviousYear {
+ margin:0 0.55em 0 0;
+}
+.dijitCalendarIncrementControl {
+ vertical-align: middle;
+}
+.dijitCalendarDisabledDate {
+ color:gray !important;
+}
+.dijitCalendarPreviousMonthDisabled,
+.dijitCalendarCurrentMonthDisabled,
+.dijitCalendarNextMonthDisabled {
+ cursor:default !important
+}
+.dijitCalendarIncrementControl,
+.dijitCalendarBodyContainer tbody tr td,
+.dijitCalendarDateTemplate,
+.dijitCalendarContainer .dijitInline {
+ cursor:pointer;
+}
+.dijitSpacer {
+
+ position: relative;
+ height: 1px;
+ overflow: hidden;
+ visibility: hidden;
+}
+.dijitMenu {
+ border:1px solid black;
+ background-color:white;
+}
+.dijitMenuTable {
+ margin:1px 0;
+ border-collapse:collapse;
+ border-width:0;
+ background-color:white;
+}
+.dj_webkit .dijitMenuTable td[colspan="2"]{
+ border-right:hidden;
+}
+.dijitMenuItem{
+ text-align: left;
+ white-space: nowrap;
+ padding:.1em .2em;
+ cursor:pointer;
+}
+.dijitMenuPassive .dijitMenuItemHover,
+.dijitMenuItemSelected {
+
+ background-color:black;
+ color:white;
+}
+.dijitMenuItemIcon, .dijitMenuExpand {
+ background-repeat: no-repeat;
+}
+.dijitMenuItemDisabled * {
+
+ opacity:0.3;
+ cursor:default;
+}
+.dj_ie .dijit_a11y .dijitMenuItemDisabled td,
+.dj_ie .dijitMenuItemDisabled *,
+.dj_ie .dijitMenuItemDisabled td {
+ color:gray !important;
+ filter: alpha(opacity=35);
+}
+.dijitMenuItemLabel {
+ position: relative;
+ vertical-align: middle;
+}
+.dijit_a11y .dijitMenuItemSelected {
+ border: 1px #fff dotted !important;
+}
+.dj_ff3 .dijit_a11y .dijitMenuItem td {
+ padding: none !important;
+ background:none ! important;
+}
+.dijit_a11y .dijitMenuItemSelected .dijitMenuItemLabel {
+ border-width: 1px;
+ border-style: solid;
+}
+.dj_ie8 .dijit_a11y .dijitMenuItemLabel {
+ position:static;
+}
+.dijitMenuExpandA11y {
+ display: none;
+}
+.dijit_a11y .dijitMenuExpandA11y {
+ display: inline;
+}
+.dijitMenuSeparator td {
+ border: 0;
+ padding: 0;
+}
+.dijitMenuSeparatorTop {
+ height: 50%;
+ margin: 0;
+ margin-top:3px;
+ font-size: 1px;
+}
+.dijitMenuSeparatorBottom {
+ height: 50%;
+ margin: 0;
+ margin-bottom:3px;
+ font-size: 1px;
+}
+.dijitCheckedMenuItemIconChar {
+ vertical-align: middle;
+ visibility:hidden;
+}
+.dijitCheckedMenuItemChecked .dijitCheckedMenuItemIconChar {
+ visibility: visible;
+}
+.dijit_a11y .dijitCheckedMenuItemIconChar {
+ display:inline !important;
+}
+.dijit_a11y .dijitCheckedMenuItemIcon {
+ display: none;
+}
+.dijitStackController .dijitToggleButtonChecked * {
+ cursor: default;
+}
+.dijitTabContainerNoLayout {
+ width: 100%;
+}
+.dijitTabContainerBottom-tabs,
+.dijitTabContainerTop-tabs,
+.dijitTabContainerLeft-tabs,
+.dijitTabContainerRight-tabs {
+ overflow: visible !important;
+}
+.dijitTabContainerBottom-container,
+.dijitTabContainerTop-container,
+.dijitTabContainerLeft-container,
+.dijitTabContainerRight-container {
+ z-index:0;
+ overflow: hidden;
+ border: 1px solid black;
+}
+.dijitTabContainer .nowrapTabStrip {
+ width: 50000px;
+ display: block;
+ position: relative;
+}
+.dijitTabContainer .dijitTabListWrapper {
+ overflow: hidden;
+}
+.dijit_a11y .dijitTabContainer .tabStripButton img {
+
+ display: none;
+}
+.dijitTabContainerTop-tabs {
+ border-bottom: 1px solid black;
+}
+.dijitTabContainerTop-container {
+ border-top: 0px;
+}
+.dijitTabContainerLeft-tabs {
+ border-right: 1px solid black;
+ float: left;
+}
+.dijitTabContainerLeft-container {
+ border-left: 0px;
+}
+.dijitTabContainerBottom-tabs {
+ border-top: 1px solid black;
+}
+.dijitTabContainerBottom-container {
+ border-bottom: 0px;
+}
+.dijitTabContainerRight-tabs {
+ border-left: 1px solid black;
+ float: left;
+}
+.dijitTabContainerRight-container {
+ border-right: 0px;
+}
+div.dijitTabBtnDisabled, .dj_ie div.dijitTabBtnDisabled {
+ cursor: auto;
+}
+.dijitTab {
+ position:relative;
+ cursor:pointer;
+ white-space:nowrap;
+ z-index:3;
+}
+.dijitTab * {
+
+ vertical-align: middle;
+}
+.dijitTabChecked {
+ cursor: default;
+}
+.dijitTabButtonIcon {
+ height: 18px;
+}
+.dijitTabContainerTop-tabs .dijitTab {
+ top: 1px;
+}
+.dijitTabContainerBottom-tabs .dijitTab {
+ top: -1px;
+}
+.dijitTabContainerLeft-tabs .dijitTab {
+ left: 1px;
+}
+.dijitTabContainerRight-tabs .dijitTab {
+ left: -1px;
+}
+.dijitTabContainerTop-tabs .dijitTab,
+.dijitTabContainerBottom-tabs .dijitTab {
+
+ display:inline-block;
+ #zoom: 1;
+ #display:inline;
+}
+.dijitTabInnerDiv {
+ position:relative;
+}
+.tabStripButton {
+ z-index: 12;
+}
+.dijitTabButtonDisabled .tabStripButton {
+ display: none;
+}
+.dijitTab .closeButton {
+ margin-left: 1em;
+}
+.dijitTab .closeText {
+ display:none;
+}
+.dijit_a11y .closeText {
+ display:inline;
+ margin: 0px 6px;
+}
+.dijit_a11y .dijitTab .closeImage {
+ display:none;
+}
+.dijit_a11y .closeButton-hover .closeText {
+ border:thin solid;
+}
+.dijit_a11y .dijitTabChecked {
+ border-style:dashed !important;
+}
+.dijit_a11y .dijitTabInnerDiv {
+ border-left:none !important;
+ }
+.dijitTabPane,
+.dijitStackContainer-child,
+.dijitAccordionContainer-child {
+
+ border: none !important;
+}
+.dijitInlineEditor {
+
+ position:relative;
+ vertical-align:bottom;
+}
+.dj_ie .dijitInlineEditor {
+ vertical-align:middle;
+}
+.dijitInlineValue {
+
+}
+.dijitInlineEditor .dijitButtonContainer {
+
+ position:absolute;
+ right:0;
+ overflow:visible;
+}
+.dijitInlineEditor .saveButton,
+.dijitInlineEditor .cancelButton {
+}
+.dijitTreeIndent {
+
+ width: 19px;
+}
+.dijitTreeRow, .dijitTreeContent {
+ white-space: nowrap;
+}
+.dijitTreeRow img {
+
+ vertical-align: middle;
+}
+.dijitTreeContent {
+ cursor: default;
+}
+.dijitExpandoText {
+ display: none;
+}
+.dijit_a11y .dijitExpandoText {
+ display: inline;
+ padding-left: 10px;
+ padding-right: 10px;
+ font-family: monospace;
+ border-style: solid;
+ border-width: thin;
+ cursor: pointer;
+}
+.dijitTreeLabel {
+ margin: 0px 4px;
+}
+.dijitDialog {
+ position: absolute;
+ z-index: 999;
+ padding: 1px;
+ overflow: hidden;
+}
+.dijitDialogFixed div.dijitDialogTitleBar {
+ cursor:default;
+}
+.dijitDialogUnderlayWrapper {
+ position: absolute;
+ left: 0;
+ top: 0;
+ z-index: 998;
+ display: none;
+ background: transparent !important;
+}
+.dijitDialogUnderlay {
+ background: #eee;
+ opacity: 0.5;
+}
+.dj_ie .dijitDialogUnderlay {
+ filter: alpha(opacity=50);
+}
+.dijit_a11y .dijitInputLayoutContainer,
+.dijit_a11y .dijitDialog {
+ opacity: 1 !important;
+ background-color: white !important;
+}
+.dijitDialog .closeText {
+ display:none;
+
+ position:absolute;
+}
+.dijit_a11y .dijitDialog .closeText {
+ display:inline;
+}
+.dijitSliderMoveable {
+ z-index:99;
+ position:absolute !important;
+ display:block;
+ vertical-align:middle;
+}
+.dijitSliderMoveableH {
+ right:0;
+}
+.dijit_a11y div.dijitSliderImageHandle,
+.dijitSliderImageHandle {
+ margin:0;
+ padding:0;
+ position:absolute !important;
+ border:8px solid gray;
+ width:0;
+ height:0;
+}
+.dijit_a11y .dijitSliderFocused .dijitSliderImageHandle {
+ border:4px solid #000;
+ height:8px;
+ width:8px;
+}
+.dijitSliderImageHandleV {
+ top:-8px;
+ left:-6px;
+}
+.dijitSliderImageHandleH {
+ left:-8px;
+ top:-5px;
+ vertical-align:top;
+}
+.dijitSliderBar {
+ border-style:solid;
+ border-color:black;
+}
+.dijitSliderBarContainerV {
+ position:relative;
+ height:100%;
+ z-index:1;
+}
+.dijitSliderBarContainerH {
+ position:relative;
+ z-index:1;
+}
+.dijitSliderBarH {
+ height:4px;
+ border-width:1px 0;
+}
+.dijitSliderBarV {
+ width:4px;
+ border-width:0 1px;
+}
+.dijitSliderProgressBar {
+ background-color:red;
+ z-index:1;
+}
+.dijitSliderProgressBarV {
+ position:static !important;
+ height:0%;
+ vertical-align:top;
+ text-align:left;
+}
+.dijitSliderProgressBarH {
+ position:absolute !important;
+ width:0%;
+ vertical-align:middle;
+ overflow:visible;
+}
+.dijitSliderRemainingBar {
+ overflow:hidden;
+ background-color:transparent;
+ z-index:1;
+}
+.dijitSliderRemainingBarV {
+ height:100%;
+ text-align:left;
+}
+.dijitSliderRemainingBarH {
+ width:100% !important;
+}
+.dijitSliderBumper {
+ overflow:hidden;
+ z-index:1;
+}
+.dijitSliderBumperV {
+ width:4px;
+ height:8px;
+ border-width:0 1px;
+}
+.dijitSliderBumperH {
+ width:8px;
+ height:4px;
+ border-width:1px 0;
+}
+.dijitSliderBottomBumper,
+.dijitSliderLeftBumper {
+ background-color:red;
+}
+.dijitSliderTopBumper,
+.dijitSliderRightBumper {
+ background-color:transparent;
+}
+.dijitSliderDecorationH {
+ text-align:center;
+}
+.dijitSlider .dijitSliderButton {
+ font-family:monospace;
+ margin:0;
+ padding:0;
+ display:block;
+}
+.dijit_a11y .dijitSliderButtonInner {
+ visibility:visible !important;
+}
+.dijitSliderButtonContainer {
+ text-align:center;
+ height:0;
+}
+.dijitSlider .dijitButtonNode {
+ padding:0;
+ display:block;
+}
+.dijitRuleContainer {
+ position:relative;
+ overflow:visible;
+}
+.dijitRuleContainerV {
+ height:100%;
+ line-height:0;
+ float:left;
+ text-align:left;
+}
+.dj_opera .dijitRuleContainerV {
+ line-height:2%;
+}
+.dj_ie .dijitRuleContainerV {
+ line-height:normal;
+}
+.dj_gecko .dijitRuleContainerV {
+ margin:0 0 1px 0;
+}
+.dijitRuleMark {
+ position:absolute;
+ border:1px solid black;
+ line-height:0;
+ height:100%;
+}
+.dijitRuleMarkH {
+ width:0;
+ border-top-width:0 !important;
+ border-bottom-width:0 !important;
+ border-left-width:0 !important;
+}
+.dijitRuleLabelContainer {
+ position:absolute;
+}
+.dijitRuleLabelContainerH {
+ text-align:center;
+ display:inline-block;
+}
+.dijitRuleLabelH {
+ position:relative;
+ left:-50%;
+}
+.dijitRuleMarkV {
+ height:0;
+ border-right-width:0 !important;
+ border-bottom-width:0 !important;
+ border-left-width:0 !important;
+ width:100%;
+ left:0;
+}
+.dj_ie .dijitRuleLabelContainerV {
+ margin-top:-.55em;
+}
+.dijit_a11y .dijitButtonContents .dijitButtonText,
+.dijit_a11y .dijitTab .tabLabel {
+ display: inline !important;
+}
+.dj_ie7 .dijitButtonNode > BUTTON.dijitButtonContents > * {
+ position: relative;
+}
+.dijitTextArea {
+ width:100%;
+ overflow-y: auto;
+}
+.dijitTextArea[cols] {
+ width:auto;
+}
+.dj_ie .dijitTextAreaCols {
+ width:auto;
+}
+.dijitTextArea > DIV {
+ text-decoration:none;
+ overflow:auto;
+ min-height: 1.40em;
+}
+.dj_ie .dijitTextArea p {
+ margin-top:0;
+ margin-bottom:0;
+ line-height: normal !important;
+}
+.dijitToolbarSeparator {
+ height: 18px;
+ width: 5px;
+ padding: 0 1px;
+ margin: 0;
+}
+.dijitIEFixedToolbar {
+ position:absolute;
+
+ top: expression(eval((document.documentElement||document.body).scrollTop));
+}
+.RichTextEditable {
+ display: block;
+}
+.dijitTimePickerItemInner {
+ text-align:center;
+ border:0;
+ padding:2px 8px 2px 8px;
+}
+.dijitTimePickerTick,
+.dijitTimePickerMarker {
+ border-bottom:1px solid gray;
+}
+.dijitTimePicker .dijitDownArrowButton {
+ border-top: none !important;
+}
+.dijitTimePickerTick {
+ color:#CCC;
+}
+.dijitTimePickerMarker {
+ color:black;
+ background-color:#CCC;
+}
+.dijitTimePickerItemSelected {
+ font-weight:bold;
+ color:#333;
+ background-color:#b7cdee;
+}
+.dijitTimePickerItemHover {
+ background-color:gray;
+ color:white;
+ cursor:pointer;
+}
+.dijit_a11y .dijitTimePickerItem {
+ border-bottom:1px solid #333;
+}
+.dijitToggleButtonIconChar {
+ display:none !important;
+}
+.dijit_a11y .dijitToggleButtonIconChar {
+ display:inline !important;
+}
+.dijit_a11y .dijitToggleButtonIconChar {
+ visibility:hidden;
+}
+.dijit_a11y .dijitToggleButtonChecked .dijitToggleButtonIconChar {
+ visibility:visible !important;
+}
+.dijitArrowButtonChar {
+ display:none !important;
+}
+.dijit_a11y .dijitArrowButtonChar {
+ display:inline !important;
+}
+.dijitInputLayoutContainer {
+ position: relative;
+ overflow: hidden;
+}
+.dijitSpinnerButtonContainer {
+ float: right;
+ width: 18px;
+ position: relative;
+ overflow: hidden;
+}
+.dijitSpinner .dijitInputLayoutContainer .dijitArrowButton {
+ height: 50%;
+ width: 16px;
+ overflow: hidden;
+}
+.dijitSpinner .dijitInputLayoutContainer .dijitArrowButtonInner {
+ overflow: hidden;
+ line-height: 50%;
+}
+.dijit_a11y .dijitSpinner .dijitInputLayoutContainer .dijitArrowButton {
+ width: 100%;
+}
+.dijit_a11y .dijitSpinner .dijitArrowButton .dijitArrowButtonChar {
+ font-size: 0.4em;
+ vertical-align: top;
+}
+.dijit_a11y .dijitSpinnerButtonContainer {
+ width: 0.5em;
+ margin-left: 2px;
+ overflow: visible;
+}
+.dijit_a11y .dijitSpinnerButtonContainer .dijitButtonNode {
+ border-width: 1px 0px 0px 1px;
+ border-style: solid !important;
+}
+.dijitSelect {
+ margin: 0.2em;
+}
+.dj_ie .dijitSelect,
+.dj_ie7 .dijitSelect,
+.dj_iequirks .dijitSelect {
+ vertical-align: middle;
+}
+.dj_ie8 .dijitSelect .dijitButtonText {
+ vertical-align: top;
+}
+.dijitSelect .dijitButtonNode {
+ text-align: left;
+}
+.dijitRtl .dijitSelect .dijitButtonNode {
+ text-align: right;
+}
+.dijitToolbar .dijitSelect {
+ margin: 0;
+}
+.dj_webkit .dijitToolbar .dijitSelect {
+ padding-left: 0.3em;
+}
+.dijit_a11y .dijitSelectDisabled .dijitButtonNode {
+ border-style: outset!important;
+ border-width: medium!important;
+ border-color: #999 !important;
+ color:#999 !important;
+}
+.dijitSelect .dijitButtonContents {
+ padding: 0px;
+ background: transparent none;
+}
+.dijitSelectFixedWidth .dijitButtonContents {
+ width: 100%;
+}
+.dijitSelect .dijitArrowButton {
+ width: 16px;
+}
+.dj_ie6 .dijitSelectMenu .dijitMenuItemLabel,
+.dj_ie7 .dijitSelectMenu .dijitMenuItemLabel {
+
+ position: static;
+}
+.dijitSelectLabel *
+{
+ vertical-align: baseline;
+}
+.dijitSelectSelectedOption * {
+ font-weight: bold;
+}
+.dijitSelectMenu {
+ border-width: 1px;
+}
+.dijitSelect .dijitButtonContents {
+ white-space: nowrap;
+}
+.dijitSelectMenu .dijitMenuTable {
+ margin: 0px;
+ background-color: transparent;
+}
+.dijitTextBoxReadOnly,
+.dijitComboBoxReadOnly,
+.dijitSpinnerReadOnly,
+.dijitTextAreaReadOnly,
+.dijitTextBoxDisabled,
+.dijitComboBoxDisabled,
+.dijitSpinnerDisabled,
+.dijitTextAreaDisabled {
+ color: gray;
+}
+.dj_webkit .dijitTextBoxDisabled INPUT,
+.dj_webkit .dijitComboBoxDisabled INPUT,
+.dj_webkit .dijitSpinnerDisabled INPUT {
+ color: #eee;
+}
+.dj_webkit INPUT.dijitTextBoxDisabled,
+.dj_webkit TEXTAREA.dijitTextAreaDisabled {
+ color: #333;
+}
+.dijit_a11y .dijitSliderReadOnly,
+.dijit_a11y .dijitSliderDisabled {
+ opacity:0.6;
+}
+.dj_ie .dijit_a11y .dijitSliderReadOnly .dijitSliderBar,
+.dj_ie .dijit_a11y .dijitSliderDisabled .dijitSliderBar {
+ filter: alpha(opacity=40);
+}
+.dijit_a11y .dijitSlider .dijitSliderButtonContainer DIV {
+ font-family: monospace;
+ font-size: 1em;
+ line-height: 1em;
+ height: auto;
+ width: auto;
+ margin: 0px 4px;
+}
+.dijitForceStatic {
+ position: static !important;
+}
+.tundra .dojoDndItemBefore {
+ border-top: 2px solid #369;
+}
+.tundra .dojoDndItemAfter {
+ border-bottom: 2px solid #369;
+}
+.tundra .dojoDndItemOver {
+ cursor:pointer;
+}
+.tundra table.dojoDndAvatar { -moz-border-radius: 0; border: 1px solid #ccc; border-collapse: collapse; background-color: #fff; font-size: 75%; color: black;}
+.tundra .dojoDndAvatar td { border: none; }
+.tundra .dojoDndAvatar tr { border: none; }
+.tundra .dojoDndAvatarHeader td { height: 20px; padding: 0 0 0 21px; }
+.tundra .dojoDndAvatarItem td { padding: 2px;}
+.tundra.dojoDndMove .dojoDndAvatarHeader {background-color: #f58383; background-image: url(images/dndNoMove.png); background-repeat: no-repeat; background-position: 2px center;}
+.tundra.dojoDndCopy .dojoDndAvatarHeader {background-color: #f58383; background-image: url(images/dndNoCopy.png); background-repeat: no-repeat; background-position: 2px center;}
+.tundra.dojoDndMove .dojoDndAvatarCanDrop .dojoDndAvatarHeader {background-color: #97e68d; background-image: url(images/dndMove.png); background-repeat: no-repeat; background-position: 2px center;}
+.tundra.dojoDndCopy .dojoDndAvatarCanDrop .dojoDndAvatarHeader {background-color: #97e68d; background-image: url(images/dndCopy.png); background-repeat: no-repeat; background-position: 2px center;}
+.tundra .dijitContentPaneLoading {
+ background:url(images/loading.gif) no-repeat left center;
+ padding-left:25px;
+}
+.tundra .dijitContentPaneError {
+ background:url(images/warning.png) no-repeat left center;
+ padding-left:25px;
+}
+.tundra .dijitContentPane {
+ padding: 0px;
+}
+.tundra .dijitTabContainerTop-dijitContentPane,
+.tundra .dijitTabContainerLeft-dijitContentPane,
+.tundra .dijitTabContainerBottom-dijitContentPane,
+.tundra .dijitTabContainerRight-dijitContentPane,
+.tundra .dijitAccordionContainer-dijitContentPane {
+ background-color: #fff;
+ padding: 5px;
+}
+.tundra .dijitSplitContainer-dijitContentPane,
+.tundra .dijitBorderContainer-dijitContentPane {
+ background-color: #fff;
+ padding: 5px;
+}
+.tundra .dijitTabPaneWrapper {
+ background:#fff;
+ border:1px solid #ccc;
+ margin: 0;
+ padding: 0;
+}
+.tundra .dijitTab {
+ line-height:normal;
+ margin-right:4px;
+ padding:0px;
+ border:1px solid #ccc;
+ background:#e2e2e2 url(images/tabEnabled.png) repeat-x;
+}
+.tundra .dijitTabInnerDiv {
+ padding:2px 8px 2px 9px;
+}
+.tundra .dijitTabSpacer {
+ display: none;
+}
+.tundra .dijitTabContainer .tabStripRBtn {
+ margin-right: 20px;
+}
+.tundra .dijitTabContainer .tabStripLBtn {
+ margin-left: 20px;
+}
+.tundra .nowrapTabStrip .dijitTab {
+ top: 2px;
+}
+.tundra .dijitTabContainerBottom .nowrapTabStrip .dijitTab {
+ top: 0px;
+ bottom: 2px;
+}
+.tundra .dijitTabContainer .tabStripMenuButton-Hover {
+ cursor: pointer;
+}
+.tundra .dijitTabChecked {
+
+ background-color:#fff;
+ border-color: #ccc;
+ background-image:none;
+}
+.tundra .dijitTabHover {
+ color: #243C5F;
+ border-top-color:#92a0b3;
+ border-left-color:#92a0b3;
+ border-right-color:#92a0b3;
+ border-bottom-color:#92a0b3;
+ background:#e2e2e2 url(images/tabHover.gif) repeat-x;
+}
+.tundra .dijitTabContainerTop .dijitTabHover {
+ border-bottom-color:#ccc;
+}
+.tundra .dijitTabContainerBottom .dijitTabHover {
+ border-top-color:#ccc;
+}
+.tundra .dijitTabContainerLeft .dijitTabHover {
+ border-right-color:#ccc;
+}
+.tundra .dijitTabContainerRight .dijitTabHover {
+ border-left-color:#ccc;
+}
+.tundra .dijitTabContainer .dijitTabCheckedHover {
+ color: inherit;
+ border:1px solid #ccc;
+ background:#fff;
+}
+.tundra .dijitTab .dijitClosable .closeImage {
+ background: url(images/tabClose.png) no-repeat right top;
+ width: 12px;
+ height: 12px;
+}
+.tundra .dijitTab .tabLabel {
+
+ min-height: 12px;
+ display: inline-block;
+}
+.tundra .dijitTabContainerNested .dijitTabListWrapper {
+ height: auto;
+}
+.tundra .dijitTabContainerNested .dijitTabContainerTop-tabs {
+ border-bottom: 1px solid #CCC;
+}
+.tundra .dijitTabContainerTabListNested .dijitTab {
+ background: none;
+ border: none;
+ top: 0px;
+}
+.tundra .dijitTabContainerTabListNested .dijitTab .dijitTabContent {
+}
+.tundra .dijitTabContainerTabListNested .dijitTabHover .dijitTabContent .tabLabel {
+ text-decoration: underline;
+}
+.tundra .dijitTabContainerTabListNested .dijitTabChecked .dijitTabContent .tabLabel {
+ text-decoration: underline;
+ font-weight: bold;
+
+}
+.tundra .dijitTabContainer .dijitTabPaneWrapperNested {
+ border: none;
+}
+.tundra .dijitTab .closeImage {
+ background-image : url(images/tabClose.png);
+}
+.dj_ie6 .tundra .dijitTab .closeImage {
+ background-image : url(images/tabClose.gif);
+}
+.tundra .dijitTab .closeButton-hover .closeImage {
+ background-image : url(images/tabCloseHover.png);
+}
+.dj_ie6 .tundra .dijitTab .closeButton-hover .closeImage {
+ background-image : url(images/tabCloseHover.gif);
+}
+.tundra .dijitTabContainerTop-tabs {
+ margin-bottom: 0px;
+ border-color: #cccccc;
+ padding-left: 3px;
+ background-position: bottom;
+}
+.tundra .dijitTabContainerTop-tabs .dijitTab {
+ top: 0px;
+ margin-bottom: -1px;
+}
+.tundra .dijitTabContainerTop-container {
+ border-top: none;
+}
+.tundra .dijitTabContainerTop-tabs .dijitTabChecked {
+ border-bottom-color:white;
+}
+.tundra .dijitTabContainerTop-tabs,
+.tundra .dijitTabContainerBottom-tabs {
+ padding-left: 3px;
+ padding-right: 3px;
+}
+.tundra .dijitTabContainerTopStrip {
+ border-top: 1px solid #CCC;
+ border-right: 1px solid #CCC;
+ border-left: 1px solid #CCC;
+ padding-top: 2px;
+ background: #f2f2f2;
+}
+.tundra .dijitTabContainerTopNone {
+ padding-top: 0px;
+}
+.tundra .dijitTabContainerBottom-tabs {
+ margin-top: 0px;
+ border-color: #cccccc;
+ background-position: top;
+ padding-left: 3px;
+}
+.tundra .dijitTabContainerBottom-tabs .dijitTab {
+ bottom: 0px;
+ margin-top: -1px;
+}
+.tundra .dijitTabContainerBottom-container {
+ border-bottom: none;
+}
+.tundra .dijitTabContainerBottom-tabs .dijitTabChecked {
+ border-top-color:white;
+}
+.tundra .dijitTabContainerBottomStrip {
+ padding-bottom: 2px;
+ border: 1px solid #ccc;
+ background: #f2f2f2;
+ border-top: none;
+}
+.tundra .dijitTabContainerRight-tabs {
+ border-color: #ccc;
+ height: 100%;
+ padding-top: 3px;
+}
+.tundra .dijitTabContainerRightStrip {
+ margin-left: -1px;
+}
+.tundra .dijitTabContainerRight-container {
+ border-right: none;
+}
+.tundra .dijitTabContainerRight-tabs .dijitTabChecked {
+ border-left-color:white;
+}
+.tundra .dijitTabContainerRightStrip {
+ padding-right: 2px;
+ border: 1px solid #ccc;
+}
+.tundra .dijitTabContainerRightStrip {
+ background: #f2f2f2;
+}
+.tundra .dijitTabContainerLeft-tabs {
+ border-color: #ccc;
+ padding-top: 3px;
+ height: 100%;
+}
+.tundra .dijitTabContainerLeft .dijitTabListWrapper {
+}
+.tundra .dijitTabContainerLeft-container {
+ border-left: none;
+}
+.tundra .dijitTabContainerLeft-tabs .dijitTabChecked {
+ border-right-color:white;
+}
+.tundra .dijitTabContainerLeftStrip {
+ padding-left: 2px;
+ border: 1px solid #ccc;
+ background: #f2f2f2;
+ border-right: none;
+}
+.tundra .dijitTabContainerLeft-tabs .dijitTab,
+.tundra .dijitTabContainerRight-tabs .dijitTab {
+ margin-right:0px;
+ margin-bottom:4px;
+}
+.tundra .dijitTabContainerTop-dijitContentPane .dijitTabContainerTop-tabs {
+ border-left: 0px solid #ccc;
+ border-top: 0px solid #ccc;
+ border-right: 0px solid #ccc;
+ padding-top: 0px;
+ padding-left: 0px;
+}
+.tundra .dijitTabContainer .tabStripButton {
+ margin-right: 0;
+ padding-top: 2px;
+ z-index: 12;
+}
+.tundra .dijitTabContainerBottom .tabStripButton {
+ padding-top: 2px;
+}
+.tundra .tabStrip-disabled .tabStripButton .dijitTabInnerDiv {
+ padding-bottom: 3px;
+ padding-top: 1px;
+}
+.tundra .tabStripButton .dijitTabInnerDiv {
+ padding: 3px 2px 4px 2px;
+}
+.dj_ie6 .tundra .tabStripButton .dijitTabInnerDiv,
+.dj_ie7 .tundra .tabStripButton .dijitTabInnerDiv,
+.dj_opera .tundra .tabStripButton .dijitTabInnerDiv {
+ padding-bottom: 5px;
+}
+.dj_ie6 .tundra .tabStrip-disabled .tabStripButton .dijitTabInnerDiv,
+.dj_ie7 .tundra .tabStrip-disabled .tabStripButton .dijitTabInnerDiv,
+.dj_opera .tundra .tabStrip-disabled .tabStripButton .dijitTabInnerDiv {
+ padding-bottom: 4px;
+}
+.tundra .dijitTabContainer .tabStripButton {
+
+ width: 21px;
+}
+.tundra .dijitTabContainer .tabStripButton img {
+ height: 14px;
+ background: url(images/spriteRoundedIconsSmall.png) no-repeat;
+}
+.dj_ie6 .tundra .dijitTabContainer .tabStripButton img {
+ background-image: url(images/spriteRoundedIconsSmall.gif);
+}
+.tundra .dijitTabContainer .tabStripMenuButton img {
+ background-position: -15px top;
+}
+.tundra .dijitTabContainer .tabStripSlideButtonLeft img {
+ background-position: 0px top;
+}
+.tundra .dijitTabContainer .tabStripSlideButtonRight img {
+ background-position: -30px top;
+}
+.tundra .dijitAccordionContainer {
+ border-color: #ccc;
+ background-color: #fff;
+}
+.tundra .dijitAccordionTitle {
+ background:#fafafa url(images/titleBar.png) repeat-x bottom left;
+ border-top: 1px solid #bfbfbf;
+ padding: 4px 4px 4px 8px;
+ cursor:pointer;
+}
+.tundra .dijitAccordionTitle-hover {
+ background: #f8fafd url(images/accordionItemHover.gif) bottom repeat-x;
+}
+.tundra .dijitAccordionTitle-selected {
+ background: #f9f9f9 url(images/accordionItemActive.gif) bottom repeat-x;
+ font-weight: bold;
+ border-top: 1px solid #aaaaaa;
+ border-bottom: 1px solid #bfbfbf;
+ padding: 4px 4px 4px 8px;
+ cursor: default;
+}
+.tundra .dijitSplitContainerSizerH {
+ background:url(images/splitContainerSizerV.png) repeat-y #fff;
+ border:0;
+ border-left:1px solid #bfbfbf;
+ border-right:1px solid #bfbfbf;
+ width:7px;
+}
+.tundra .dijitSplitContainerSizerH .thumb {
+ background:url(images/splitContainerSizerV-thumb.png) no-repeat #ccc;
+ left:1px;
+ width:3px;
+ height:19px;
+ overflow: hidden;
+}
+.tundra .dijitSplitContainerSizerV {
+ background:url(images/splitContainerSizerH.png) repeat-x #fff;
+ border:0;
+ border-top:1px solid #bfbfbf;
+ border-bottom:1px solid #bfbfbf;
+ height:7px;
+}
+.tundra .dijitSplitContainerSizerV .thumb {
+ background:url(images/splitContainerSizerH-thumb.png) no-repeat #ccc;
+ top:1px;
+ width:19px;
+ height:3px;
+ overflow: hidden;
+}
+.tundra .dijitSplitter {
+ border-color: #bfbfbf;
+}
+.tundra .dijitBorderContainer {
+ background-color: #fcfcfc;
+ padding: 5px;
+}
+.tundra .dijitSplitContainer-child,
+.tundra .dijitBorderContainer-child {
+
+ border: 1px #ccc solid;
+}
+.tundra .dijitBorderContainer-dijitTabContainerTop,
+.tundra .dijitBorderContainer-dijitTabContainerBottom,
+.tundra .dijitBorderContainer-dijitTabContainerLeft,
+.tundra .dijitBorderContainer-dijitTabContainerRight {
+
+ border: none;
+}
+.tundra .dijitBorderContainer-dijitBorderContainer {
+
+ border: none;
+ padding: 0px;
+}
+.tundra .dijitSplitterH,
+.tundra .dijitGutterH {
+ background:#fcfcfc;
+ border:0;
+ height:5px;
+}
+.tundra .dijitSplitterH .dijitSplitterThumb {
+ background:#B0B0B0 none;
+ height:1px;
+ top:2px;
+ width:19px;
+}
+.tundra .dijitSplitterV,
+.tundra .dijitGutterV {
+ background:#fcfcfc;
+ border:0;
+ width:5px;
+}
+.tundra .dijitSplitterV .dijitSplitterThumb {
+ background:#B0B0B0 none;
+ height:19px;
+ left:2px;
+ width:1px;
+}
+.tundra .dijitSplitterActive {
+ font-size: 1px;
+ background-image: none;
+ background-color: #aaa;
+ -moz-opacity: 0.6;
+ opacity: 0.6;
+ filter: Alpha(Opacity=60);
+ margin: 0;
+}
+.tundra .dijitInputField INPUT,
+.tundra .dijitTextBox,
+.tundra .dijitComboBox,
+.tundra .dijitSpinner {
+ margin: 0em 0.1em;
+}
+.tundra .dijitTextBox,
+.tundra .dijitComboBox,
+.tundra .dijitSpinner,
+.tundra .dijitTextArea {
+ font-family: sans-serif;
+ font-size: 100%;
+}
+.tundra .dijitTextArea {
+ padding: 3px;
+}
+.tundra .dijitTextBox,
+.tundra .dijitComboBox,
+.tundra .dijitSpinner,
+.tundra .dijitTextArea,
+.tundra .dijitInlineEditor input {
+
+ background:#fff url(images/validationInputBg.png) repeat-x top left;
+ #background:#fff url(images/validationInputBg.gif) repeat-x top left;
+ border:1px solid #b3b3b3;
+ line-height: normal;
+}
+.tundra .dijitComboBox .dijitInputField {
+ padding: 1px 0;
+}
+.tundra .dijitComboBox .dijitButtonNode {
+ padding: 1px 0.2em;
+}
+.tundra .dijitComboBox .dijitButtonNode,
+.tundra .dijitSpinner .dijitButtonNode {
+
+ border-color: #9b9b9b;
+ border-width: 0px 0px 0px 1px;
+ border-style: solid;
+}
+.tundra .dijitTextBoxFocused,
+.tundra .dijitComboBoxFocused,
+.tundra .dijitSpinnerFocused, .tundra .dijitSpinnerUpArrowActive, .tundra .dijitSpinnerDownArrowActive,
+.tundra .dijitTextAreaFocused {
+
+ border-color:#406b9b;
+}
+.tundra .dijitComboBoxFocused .dijitButtonNode,
+.tundra .dijitSpinnerFocused .dijitButtonNode,
+.tundra .dijitSpinnerUpArrowActive .dijitButtonNode,
+.tundra .dijitSpinnerDownArrowActive .dijitButtonNode {
+ border-left-color:#366dba;
+}
+.tundra .dijitSpinnerFocused .dijitDownArrowButton,
+.tundra .dijitSpinnerUpArrowActive .dijitDownArrowButton,
+.tundra .dijitSpinnerDownArrowActive .dijitDownArrowButton {
+ border-top-color:#366dba;
+}
+.tundra .dijitError {
+ background-color:#f9f7ba;
+ background-image:none;
+}
+.dj_ie6 .tundra .dijitError INPUT {
+
+ background-color:#f9f7ba !important;
+}
+.tundra .dijitErrorFocused {
+ background-color:#f9f999;
+ background-image:none;
+}
+.dj_ie6 .tundra .dijitErrorFocused INPUT {
+
+ background-color:#f9f999 !important;
+}
+.tundra .dijitValidationIcon {
+
+ width: 16px;
+ background: transparent url(images/warning.png) no-repeat center center;
+}
+.tundra .dijitInlineValue {
+
+ padding:3px;
+ margin:4px;
+}
+.tundra .dijitInlineEditor {
+
+ display: inline-block;
+ #display:inline;
+}
+.dijitInlineEditor .saveButton,
+.dijitInlineEditor .cancelButton {
+ margin:3px 3px 3px 0px;
+}
+.RichTextEditable {
+ border:1px solid #bfbfbf;
+ border-top:0;
+}
+.tundra .dijitComboBoxHighlightMatch {
+ background-color:#a5beda;
+}
+.tundra .dijitFocusedLabel {
+
+ outline: 1px dotted #666666;
+}
.tundra .dijitButtonNode {
- /* enabled state - inner */
- /* border:1px outset #a0a0a0; */
- border:1px solid #9b9b9b;
- vertical-align: middle;
- padding: 0.2em 0.2em;
- background:#e9e9e9 url("images/buttonEnabled.png") repeat-x top;
-}
-.dj_ie .tundra .dijitButtonNode {
- zoom: 1;
- padding-bottom: 0.1em;
-}
-
-/* button inner contents - labels, icons etc. */
-.tundra .dijitButtonNode * {
- display: -moz-inline-box;
- display: inline-block;
- vertical-align: middle;
-}
-.dj_ie .tundra .dijitButtonNode * {
- zoom: 1;
- display:inline;
+
+ border: 1px solid #c0c0c0;
+ border-bottom: 1px solid #9b9b9b;
+ padding: 0.1em 0.2em 0.2em 0.2em;
+ background: #fff url(images/buttonEnabled.png) repeat-x bottom left;
+}
+.tundra .dijitSelect .dijitButtonContents {
+ border-right: none;
+}
+.dijitRtl .tundra .dijitSelect .dijitButtonContents {
+ border-left: none;
+ border-right-width: 1px;
+}
+.tundra .dijitButtonNode button {
+ border: 0px;
+ background-color: transparent;
}
.tundra .dijitButtonText {
+ text-align: center;
padding: 0 0.3em;
}
-
-.tundra .dijitComboBox .dijitButtonNode,
-.tundra .dijitSpinner .dijitButtonNode {
- border: 0px;
- padding: 1px .4em; /* the inner node will be vertically centered automatically because it's in a <td> */
-}
-
-.tundra .dijitA11yDownArrow,
-.tundra .dijitDownArrowButton,
-.tundra .dijitUpArrowButton {
- font-size: 0.75em;
- color: #848484;
-}
-
-
+.tundra .dijitDisabled .dijitButtonText {
+ color: #7F7F7F;
+}
+.tundra .dijitArrowButton {
+ color: #111;
+}
+.tundra .dijitComboButton .dijitDownArrowButton {
+ padding-right:4px;
+}
+.tundra .dijitComboBoxReadOnly,
+.tundra .dijitSpinnerReadOnly,
+.tundra .dijitSpinnerReadOnly .dijitButtonNode,
.tundra .dijitButtonDisabled .dijitButtonNode,
.tundra .dijitToggleButtonDisabled .dijitButtonNode,
.tundra .dijitDropDownButtonDisabled .dijitButtonNode,
.tundra .dijitComboButtonDisabled .dijitButtonNode,
.tundra .dijitComboBoxDisabled,
.tundra .dijitSpinnerDisabled,
.tundra .dijitSpinnerDisabled .dijitButtonNode {
- /* disabled state - inner */
- border: 1px solid #d5d5d5;
- /*color:#b4b4b4;*/
- background:#e4e4e4 url("images/buttonDisabled.png") top repeat-x;
- opacity: 0.60; /* Safari, Opera and Mozilla */
-}
-.tundra .dijitButtonDisabled .dijitButtonNode *,
-.tundra .dijitToggleButtonDisabled .dijitButtonNode *,
-.tundra .dijitDropDownButtonDisabled .dijitButtonNode *,
-.tundra .dijitComboButtonDisabled .dijitButtonNode *,
-.tundra .dijitSpinnerDisabled .dijitButtonNode * {
- filter: gray() alpha(opacity=50); /* IE */
-}
-
+
+
+ border-color: #d5d5d5 #d5d5d5 #bdbdbd #d5d5d5;
+ background:#e4e4e4 url(images/buttonDisabled.png) top repeat-x;
+}
.tundra .dijitButtonHover .dijitButtonNode,
+.tundra .dijitButtonNodeHover,
.tundra .dijitToggleButtonHover .dijitButtonNode,
.tundra .dijitDropDownButtonHover .dijitButtonNode,
.tundra .dijitComboButtonHover .dijitButtonContents,
-.tundra .dijitComboButtonDownArrowHover .dijitDownArrowButton,
+.tundra .dijitComboButtonDownArrowHover .dijitArrowButton {
+
+
+ border-color: #a5beda;
+ border-bottom-color:#5c7590;
+ color:#243C5F;
+ background:#fcfdff url(images/buttonHover.png) repeat-x bottom;
+}
.tundra .dijitComboBoxHover .dijitDownArrowButton,
.tundra .dijitSpinnerUpArrowHover .dijitUpArrowButton,
.tundra .dijitSpinnerDownArrowHover .dijitDownArrowButton {
- /* hover state - inner */
- /* TODO: change from Hover to Selected so that button is still highlighted while drop down is being used */
- border-color:#366dba;
- color:#366dba;
- background:#f1f6fc url("images/buttonHover.png") repeat-x bottom;
-}
-
+
+ color:#243C5F;
+ background:#fcfdff url(images/buttonHover.png) repeat-x bottom;
+}
+.tundra .dijitSpinnerUpArrowActive .dijitUpArrowButton,
+.tundra .dijitSpinnerDownArrowActive .dijitDownArrowButton,
.tundra .dijitButtonActive .dijitButtonNode,
.tundra .dijitToggleButtonActive .dijitButtonNode,
.tundra .dijitDropDownButtonActive .dijitButtonNode,
.tundra .dijitComboButtonActive .dijitButtonContents,
.tundra .dijitDownArrowActive .dijitDownArrowButton,
-.tundra .dijitComboBoxActive .dijitDownArrowButton {
- /* active state - inner (for when you are pressing a normal button, or
- * when a toggle button is in a depressed state
- */
+.tundra .dijitComboBoxActive .dijitDownArrowButton,
+.tundra .dijitStackController .dijitToggleButtonChecked .dijitButtonNode {
+
border-color:#366dba;
- background: #ededed url("images/buttonActive.png") bottom repeat-x;
-}
-
-.tundra .dijitToolbar {
- border: 1px solid #9b9b9b;
- background:#e9e9e9 url("images/buttonEnabled.png") repeat-x top;
-}
-
-.tundra .dijitToolbar * {
- padding: 0px;
- margin: 0px;
- /* #margin-top: -1px; */
- /*IE*/
-}
-.dj_ie .tundra .dijitToolbar {
- padding-bottom: 1px;
-}
-
-.tundra .dijitToolbar .dijitButtonNode {
- padding: 0px;
- margin: 0px;
- border: 1px solid transparent;
- background: none;
- _margin: 1px;
- _padding: 0px 1px 0px 1px;
- _border: 0px;
-}
-
-.tundra .dijitToolbar .dijitToggleButtonChecked .dijitButtonNode {
- background-color:#C1D2EE;
- border:1px solid #316AC5;
-}
-.tundra .dijitToolbar .dijitToggleButtonCheckedHover .dijitButtonContents {
- border-color: #366dba;
- background-color:transparent;
-}
-.dj_ie6 .tundra .dijitToolbar .dijitButtonNode {
- /* workaround no transparent border support in IE6*/
- border-color: #e9e9e9;
-}
-
-.tundra .dijitToolbar .dijitButtonHover .dijitButtonNode,
-.tundra .dijitToolbar .dijitToggleButtonHover .dijitButtonNode,
-.tundra .dijitToolbar .dijitDropDownButtonHover .dijitButtonNode {
- /* TODO: change this from Hover to Selected so that button is still highlighted while drop down is being used */
- border-color: #366dba;
- /* IE hackery */
- _border: 1px solid #366dba;
- _margin: -1px 0px 0px 0px;
- _padding: 0px;
-}
-
-.dijitToolbarSeparator {
- background: url('images/editor.gif');
- height: 18px;
- width: 5px;
- padding: 0px 1px 0px 1px;
- margin: 0px;
-}
-
-.tundra .dijitToolbar .dijitToolbarSeparator {
- background: url('images/editor.gif');
-}
-
-/* ComboBox-icon-specific */
-.tundra .dijitComboBox .dijitDownArrowButtonChar {
- /* visibility:hidden; */
- display:none;
-}
-.dijit_a11y .dijitComboBox .dijitDownArrowButtonChar {
- display:inline;
-}
-.tundra .dijitComboBox .dijitDownArrowButtonInner {
- width:16px;
- height:16px;
- background:url("images/arrowDown.png") no-repeat center center;
-}
-.dj_ie6 .tundra .dijitComboBox .dijitDownArrowButtonInner {
- background-image:url("images/arrowDown.gif");
-}
-.tundra .dijitComboBoxHover .dijitDownArrowButtonInner {
- /* TODO: url("images/arrowDownHover.png") but in IE6 it flickers some? */
-}
-
-
-/*****
- dijit.form.NumberSpinner
- override for the shorter stacked buttons
- *****/
-
-.tundra .dijitSpinner .dijitButtonNode {
- padding: 0 .4em 0 .4em;
-}
-
-
-/****
- dijit.form.TextBox
- dijit.form.ValidationTextBox
- dijit.form.SerializableTextBox
- dijit.form.RangeBoundTextBox
- dijit.form.NumberTextBox
- dijit.form.CurrencyTextBox
- dijit.form.NumberSpinner
- dijit.form.ComboBox (partial)
- ****/
-
-.tundra .dijitInputField INPUT,
-.tundra .dijitTextBox,
-.tundra .dijitComboBox,
-.tundra .dijitSpinner {
- margin: 0em 0.1em 0.0em 0.1em;
-}
-
-.tundra .dijitTextBox,
-.tundra .dijitComboBox,
-.tundra .dijitSpinner,
-.tundra .dijitInlineEditor input,
-.tundra .dijitTextArea {
- /* For all except dijit.form.NumberSpinner: the actual input element.
- For TextBox, ComboBox, Spinner: the table that contains the input.
- Otherwise the actual input element.
- */
- background:#fff url("images/validationInputBg.png") repeat-x top left;
- #background:#fff url('images/validationInputBg.gif') repeat-x top left;
- border:1px solid #9b9b9b;
- line-height: normal;
-}
-
-.dj_safari .tundra INPUT.dijitTextBox {
- padding:0.15em 0em; /* make it roughly the same size as a validation input box */
-}
-
-.dj_ie .tundra INPUT.dijitTextBox,
-.dj_ie .tundra TD.dijitInputField,
-.dj_ie .tundra .dijitInputField INPUT {
- height: 1.2em; /* needed since the INPUT is position:absolute */
-}
-
-.tundra .dijitComboBox .dijitButtonNode,
-.tundra .dijitSpinner .dijitButtonNode {
- /* line between the input area and the drop down button */
- border-left:1px solid #9b9b9b;
-}
-.tundra .dijitSpinner .dijitDownArrowButton {
- border-top:1px solid #9b9b9b; /* line between top and bottom arrow */
-}
-
-.tundra .dijitTextBoxFocused,
-.tundra .dijitComboBoxFocused,
-.tundra .dijitSpinnerFocused {
- /* input field when focused (ie: typing affects it) */
- border-color:#366dba;
-}
-.tundra .dijitComboBoxFocused .dijitButtonNode, .tundra .dijitSpinnerFocused .dijitButtonNode {
- border-left:1px solid #366dba;
-}
-.tundra .dijitSpinnerFocused .dijitDownArrowButton {
- border-top:1px solid #366dba;
-}
-
-.tundra .dijitTextBoxError,
-.tundra .dijitComboBoxError,
-.tundra .dijitSpinnerError {
- border:1px solid #f3d118;
- background-color:#f9f7ba;
- background-image:none;
-}
-.dj_ie6 .tundra .dijitTextBoxError input,
-.dj_ie6 .tundra .dijitComboBoxError input,
-.dj_ie6 .tundra .dijitSpinnerError input {
- /* background-color: transparent on an <input> doesn't work on IE6 */
- background-color:#f9f7ba !important;
-}
-
-.tundra .dijitTextBoxErrorFocused,
-.tundra .dijitComboBoxErrorFocused,
-.tundra .dijitSpinnerErrorFocused {
- background-color:#ff6;
- background-image:none;
-}
-.dj_ie6 .tundra .dijitTextBoxErrorFocused input,
-.dj_ie6 .tundra .dijitComboBoxErrorFocused input,
-.dj_ie6 .tundra .dijitSpinnerErrorFocused input {
- /* background-color: transparent on an <input> doesn't work on IE6 */
- background-color:#ff6 !important;
-}
-
-/* Validation errors */
-.tundra .dijitValidationIcon {
- /* prevent height change when widget goes from valid to invalid state, and
- * workaround browser (FF and safari) sizing bugs when last table column is empty or display:null
- */
- display: block;
+ background: #ededed url(images/buttonActive.png) bottom repeat-x;
+}
+.tundra .dijitArrowButtonInner {
+ background:url(images/spriteArrows.png) no-repeat scroll 0px center;
+ width: 7px;
+ height: 7px;
+ font-size: 1px;
+ margin: 0px 4px 0px 5px;
+}
+.dj_ie6 .tundra .dijitArrowButtonInner {
+ background-image:url(images/spriteArrows.gif);
+}
+.tundra .dijitLeftArrowButton .dijitArrowButtonInner {
+ background-position: -7px center;
+}
+.tundra .dijitRightArrowButton .dijitArrowButtonInner {
+ background-position: -14px center;
+}
+.tundra .dijitUpArrowButton .dijitArrowButtonInner {
+ background-position: -21px center;
+}
+.tundra .dijitDisabled .dijitArrowButtonInner {
+ background-position: -28px center;
+}
+.tundra .dijitDisabled .dijitLeftArrowButton .dijitArrowButtonInner {
+ background-position: -35px center;
+}
+.tundra .dijitDisabled .dijitRightArrowButton .dijitArrowButtonInner {
+ background-position: -42px center;
+}
+.tundra .dijitDisabled .dijitUpArrowButton .dijitArrowButtonInner {
+ background-position: -49px center;
+}
+.tundra .dijitComboBox .dijitArrowButton .dijitArrowButtonInner {
+ height: auto;
+ font-size: 100%;
+ font-size: inherit;
+}
+.tundra .dijitComboBoxHover .dijitArrowButtonInner {
+
+}
+.tundra .dijitSpinner .dijitArrowButtonInner {
+ display: block;
+ position:absolute;
+ top: 50%;
+ margin-top: -4px;
+ left: 50%;
+ margin-left: -4px;
+ line-height: 2px;
+}
+.tundra .dijitToggleButton .dijitCheckBoxIcon {
+ background-image: url(images/checkmarkNoBorder.png);
+}
+.dj_ie6 .tundra .dijitToggleButton .dijitCheckBoxIcon {
+ background-image: url(images/checkmarkNoBorder.gif);
+}
+.tundra .dijitCheckBox,
+.tundra .dijitCheckBoxIcon {
+ background-image: url(images/checkmark.png);
+ background-repeat: no-repeat;
width: 16px;
height: 16px;
- background-repeat: no-repeat;
- background-image: url('images/warning.png');
- visibility: hidden;
-}
-.tundra .dijitValidationIconText {
- display: none;
-}
-
-.tundra .dijitTextBoxError .dijitValidationIcon,
-.tundra .dijitComboBoxError .dijitValidationIcon,
-.tundra .dijitSpinnerError .dijitValidationIcon {
- visibility: visible;
-}
-
-/*
- * CheckBox and Radio Widgets,
- * and the CSS to embed a checkbox or radio icon inside a ToggleButton.
- *
- * Order of images in the default sprite (from L to R, checkbox and radio in same image):
- * checkbox normal - checked
- * - unchecked
- * disabled - checked
- * - unchecked
- * hover - checked
- * - unchecked
- *
- * radio normal - checked
- * - unchecked
- * disabled - checked
- * - unchecked
- * hover - checked
- * - unchecked
-*/
-
-.tundra .dijitToggleButton .dijitCheckBox,
+ margin: 0 2px 0 0;
+ padding: 0;
+}
+.dj_ie6 .tundra .dijitCheckBox,
+.dj_ie6 .tundra .dijitCheckBoxIcon {
+ background-image: url(images/checkmark.gif);
+}
+.tundra .dijitCheckBox,
+.tundra .dijitToggleButton .dijitCheckBoxIcon {
+
+ background-position: -16px;
+}
+.tundra .dijitCheckBoxChecked,
+.tundra .dijitToggleButtonChecked .dijitCheckBoxIcon {
+
+ background-position: 0px;
+}
+.tundra .dijitCheckBoxDisabled {
+
+ background-position: -48px;
+}
+.tundra .dijitCheckBoxCheckedDisabled {
+
+ background-position: -32px;
+}
+.tundra .dijitCheckBoxHover {
+
+ background-position: -80px;
+}
+.tundra .dijitCheckBoxCheckedHover {
+
+ background-position: -64px;
+}
.tundra .dijitToggleButton .dijitRadio,
-.tundra .dijitToggleButton .dijitCheckBoxIcon,
.tundra .dijitToggleButton .dijitRadioIcon {
- background-image: url('images/checkmarkNoBorder.gif');
-}
-
-.tundra .dijitCheckBox,
+ background-image: url(images/checkmarkNoBorder.png);
+}
+.dj_ie6 .tundra .dijitToggleButton .dijitRadio,
+.dj_ie6 .tundra .dijitToggleButton .dijitRadioIcon {
+ background-image: url(images/checkmarkNoBorder.gif);
+}
.tundra .dijitRadio,
-.tundra .dijitCheckBoxIcon, /* inside a toggle button */
-.tundra .dijitRadioIcon { /* inside a toggle button */
- background-image: url('images/checkmark.gif'); /* checkbox sprite image */
+.tundra .dijitRadioIcon {
+ background-image: url(images/checkmark.png);
background-repeat: no-repeat;
width: 16px;
height: 16px;
- overflow: visible;
margin: 0;
- padding: 0;
-}
-
-.tundra .dijitCheckBox,
-.tundra .dijitToggleButton .dijitCheckBoxIcon {
- /* unchecked */
- background-position: -16px;
-}
-
-.tundra .dijitCheckBoxChecked,
-.tundra .dijitToggleButtonChecked .dijitCheckBoxIcon {
- /* checked */
- background-position: 0px;
-}
-
-.tundra .dijitCheckBoxDisabled {
- /* disabled */
- background-position: -48px;
-}
-
-.tundra .dijitCheckBoxCheckedDisabled {
- /* disabled but checked */
- background-position: -32px;
-}
-
-.tundra .dijitCheckBoxHover,
-.tundra .dijitCheckBoxFocused {
- /* hovering over an unchecked enabled checkbox */
- background-position: -80px;
-}
-
-.tundra .dijitCheckBoxCheckedHover,
- .tundra .dijitCheckBoxCheckedFocused {
- /* hovering over a checked enabled checkbox */
- background-position: -64px;
-}
-
+ padding: 0;
+}
+.dj_ie6 .tundra .dijitRadio,
+.dj_ie6 .tundra .dijitRadioIcon {
+ background-image: url(images/checkmark.gif);
+}
.tundra .dijitRadio,
.tundra .dijitToggleButton .dijitRadioIcon {
- /* unselected */
+
background-position: -112px;
}
-
+.tundra .dijitRadioDisabled {
+
+ background-position: -144px;
+}
+.tundra .dijitRadioHover {
+
+ background-position: -176px;
+}
.tundra .dijitRadioChecked,
-.tundra .dijitToggleButtonChecked .dijitRadioIcon {
- /* selected */
- background-position: -96px;
-}
-
-.tundra .dijitRadioCheckedDisabled {
- /* selected but disabled */
- background-position: -128px;
-}
-
-.tundra .dijitRadioDisabled {
- /* unselected and disabled */
- background-position: -144px;
-}
-
-.tundra .dijitRadioHover,
-.tundra .dijitRadioFocused {
- /* hovering over an unselected enabled radio button */
- background-position: -176px;
-}
-
.tundra .dijitRadioCheckedHover,
-.tundra .dijitRadioCheckedFocused {
- /* hovering over a selected enabled radio button */
- background-position: -160px;
-}
-
-/* Menu */
-.tundra .dijitMenu {
- border: 1px solid #9b9b9b;
- margin: 0px;
- padding: 0px;
-}
-
-.tundra .dijitMenuItem {
- background-color: #f7f7f7;
- font: menu;
- margin: 0;
-}
-.tundra .dijitMenuPreviousButton, .tundra .dijitMenuNextButton {
- font-style: italic;
-}
-.tundra .dijitMenuItem TD {
- padding:2px;
-}
-
-.tundra .dijitMenuItemHover {
- background-color: #808080; /* #95a0b0; #555555; #aaaaaa; #646464; #60a1ea; #848484; */
- color:#fff;
-}
-
-.tundra .dijitMenuItemIcon {
- width: 16px;
- height: 16px;
- /* padding-right: 3px; */
-}
-
-.tundra .dijitMenuExpand {
- display:none;
-}
-.tundra .dijitMenuExpandEnabled {
- /* margin-top:4px; */
- width:16px;
- height:16px;
- background:url('images/arrowRight.png') no-repeat center center;
- display:block;
-}
-.dj_ie6 .tundra .dijitMenuExpandEnabled {
- background-image:url('images/arrowRight.gif');
-}
-.tundra .dijitMenuExpandInner {
- display:none;
-}
-
-.tundra .dijitMenuSeparator {
- background-color: #f7f7f7;
-}
-
-/* separator can be two pixels -- set border of either one to 0px to have only one */
-.tundra .dijitMenuSeparatorTop {
- border-bottom: 1px solid #9b9b9b; /*97adcb; */
-}
-
-.tundra .dijitMenuSeparatorBottom {
- border-top: 1px solid #e8e8e8;
-}
-
-/* TitlePane */
-
-.tundra .dijitTitlePane .dijitTitlePaneTitle {
- background: #cccccc;
- background:#fafafa url("images/titleBarBg.gif") repeat-x bottom left;
- border:1px solid #bfbfbf;
- padding:4px 4px 2px 4px;
- cursor: pointer;
-}
-.dj_ie7 .dijitTitlePaneTextNode {
- display:inline;
-}
-
-/* TODO: merge these, and all other icons to a series of background-image:() and background-position: -16*n px styles */
-.tundra .dijitTitlePane .dijitArrowNode {
+.tundra .dijitToggleButtonChecked .dijitRadioIcon {
+
+ background-position: -96px;
+}
+.tundra .dijitRadioCheckedDisabled {
+
+ background-position: -128px;
+}
+.tundra .dijitSliderProgressBarH {
+ border-color: #aab0bb;
+ background: #c0c2c5 url(images/sliderFull.png) repeat-x top left;
+}
+.tundra .dijitSliderProgressBarV {
+ border-color: #aab0bb;
+ background: #c0c2c5 url(images/sliderFullVertical.png) repeat-y bottom left;
+}
+.tundra .dijitSliderFocused .dijitSliderProgressBarH,
+.tundra .dijitSliderFocused .dijitSliderLeftBumper {
+ background-image:url(images/sliderFullFocus.png);
+}
+.tundra .dijitSliderFocused .dijitSliderProgressBarV,
+.tundra .dijitSliderFocused .dijitSliderBottomBumper {
+ background-image:url(images/sliderFullVerticalFocus.png);
+}
+.tundra .dijitSliderRemainingBarV {
+ border-color: #b4b4b4;
+ background: #dcdcdc url(images/sliderEmptyVertical.png) repeat-y bottom left;
+}
+.tundra .dijitSliderRemainingBarH {
+ border-color: #b4b4b4;
+ background: #dcdcdc url(images/sliderEmpty.png) repeat-x top left;
+}
+.tundra .dijitSliderBar {
+ border-style: solid;
+ outline:1px;
+}
+.tundra .dijitSliderFocused .dijitSliderBar {
+ border-color:#888;
+}
+.dijit_a11y .dijitSliderProgressBar {
+ background-color:#888 !important;
+}
+.tundra .dijitSliderImageHandleH {
+ border:0px;
+ width:16px;
+ height:16px;
+ background:url(images/preciseSliderThumb.png) no-repeat center top;
+ cursor:pointer;
+}
+.tundra .dijitSliderFocused .dijitSliderImageHandleH {
+ background-image:url(images/preciseSliderThumbFocus.png);
+ #background-image:url(images/preciseSliderThumbFocus.gif);
+}
+.dj_ie6 .tundra .dijitSliderImageHandleH {
+ background-image:url(images/preciseSliderThumb.gif);
+}
+.tundra .dijitSliderLeftBumper {
+ border-left-width: 1px;
+ border-color: #aab0bb;
+ background: #c0c2c5 url(images/sliderFull.png) repeat-x top left;
+}
+.tundra .dijitSliderRightBumper {
+ background: #dcdcdc url(images/sliderEmpty.png) repeat-x top left;
+ border-color: #b4b4b4;
+ border-right-width: 1px;
+}
+.tundra .dijitSliderImageHandleV {
+ border:0px;
width:16px;
height:16px;
- float:right;
-}
-.tundra .dijitTitlePane .dijitClosed .dijitArrowNode {
- background:url('images/arrowRight.png') no-repeat center center;
-}
-
-.tundra .dijitTitlePaneFocused .dijitTitlePaneTextNode {
- text-decoration:underline;
-}
-
-.dj_ie6 .tundra .dijitTitlePane .dijitClosed .dijitArrowNode {
- background-image:url('images/arrowRight.gif');
-}
-.tundra .dijitTitlePane .dijitOpen .dijitArrowNode {
- background:url('images/arrowDown.png') no-repeat center center;
-}
-.dj_ie6 .tundra .dijitTitlePane .dijitOpen .dijitArrowNode {
- background-image:url('images/arrowDown.gif');
-}
-.tundra .dijitTitlePane .dijitArrowNodeInner {
+ background:url(images/sliderThumb.png) no-repeat center center;
+ cursor:pointer;
+}
+.tundra .dijitSliderFocused .dijitSliderImageHandleV {
+ background-image:url(images/sliderThumbFocus.png);
+}
+.dj_ie6 .tundra .dijitSliderFocused .dijitSliderImageHandleV {
+ background-image:url(images/sliderThumbFocus.gif);
+}
+.tundra .dijitSliderBottomBumper {
+ border-bottom-width: 1px;
+ border-color: #aab0bb;
+ background: #c0c2c5 url(images/sliderFullVertical.png) repeat-y bottom left;
+}
+.tundra .dijitSliderTopBumper {
+ background: #dcdcdc url(images/sliderEmptyVertical.png) repeat-y top left;
+ border-color: #b4b4b4;
+ border-top-width: 1px;
+}
+.tundra .dijitSliderDecrementIconH,
+.tundra .dijitSliderDecrementIconV,
+.tundra .dijitSliderIncrementIconH,
+.tundra .dijitSliderIncrementIconV {
+ cursor: pointer;
+ background-image: url(images/spriteArrows.png);
+ background-repeat: no-repeat;
+ margin: 5px;
+ height: 7px;
+ width: 7px;
+ font-size: 1px;
+}
+.dj_ie6 .tundra .dijitSliderDecrementIconH,
+.dj_ie6 .tundra .dijitSliderDecrementIconV,
+.dj_ie6 .tundra .dijitSliderIncrementIconH,
+.dj_ie6 .tundra .dijitSliderIncrementIconV {
+ background-image: url(images/spriteArrows.gif);
+}
+.tundra .dijitSliderDecrementIconH {
+ background-position: -7px 0px;
+}
+.tundra .dijitSliderIncrementIconH {
+ background-position: -14px 0px;
+}
+.tundra .dijitSliderDecrementIconV {
+ background-position: 0px 0px;
+}
+.tundra .dijitSliderIncrementIconV {
+ background-position: -21px 0px;
+}
+.tundra .dijitSliderButtonInner {
visibility:hidden;
}
-.dijit_a11y .dijitTitlePane .dijitArrowNodeInner {
- visibility:visible;
-}
-
-.tundra .dijitTitlePaneTitle .dijitOpenCloseArrowOuter {
- margin-right:5px;
-}
-
-.tundra .dijitOpen .dijitTitlePaneTitle .dijitOpenCloseArrowOuter {
- position:relative;
- top:2px;
-}
-
-.tundra .dijitTitlePaneContentOuter {
- background: #ffffff;
- border:1px solid #bfbfbf;
- border-top: 1px solid #cddde9; /* w/out this, an <h1> on the top line causes a gap between the .content and .label */
-}
-.tundra .dijitTitlePaneContentInner {
- padding:10px;
-}
-/* force hasLayout to ensure borders etc, show up */
-.dj_ie6 .tundra .dijitTitlePaneContentOuter,
-.dj_ie6 .tundra .dijitTitlePane .dijitTitlePaneTitle {
- zoom: 1;
-}
-.tundra .dijitClickableRegion {
- background-color : #ffc !important;
-}
-
-/* Tabs */
-
-.tundra .dijitTabPaneWrapper {
- /*
- overflow: hidden;
- */
- background:#fff;
- border:1px solid #ccc;
-}
-
-.tundra .dijitTab {
- line-height:normal;
- margin-right:5px; /* space between one tab and the next in top/bottom mode */
- padding:0px;
- border:1px solid #ccc;
- background:#e2e2e2 url("images/tabEnabled.png") repeat-x;
-}
-
-.tundra .dijitAlignLeft .dijitTab,
-.tundra .dijitAlignRight .dijitTab {
- margin-right:0px;
- margin-bottom:5px; /* space between one tab and the next in left/right mode */
-}
-
-.tundra .dijitTabInnerDiv {
- padding:6px 10px 4px 10px;
- border-left:1px solid #fff;
- border-bottom:1px solid #fff;
-}
-
-.tundra .dijitTabHover,
-.tundra .dijitTabCloseButtonHover {
- color: #243C5F;
- border-top-color:#92a0b3;
- border-left-color:#92a0b3;
- border-right-color:#92a0b3;
- background:#e2e2e2 url("images/tabHover.png") repeat-x bottom;
-}
-
-.dj_ie6 .tundra .dijitTabHover,
-.dj_ie6 .tundra .dijitTabCloseButtonHover {
- background-image: url("images/tabHover.gif");
-}
-
-.tundra .dijitTabChecked,
-.tundra .dijitTabCloseButtonChecked
-{
- /* the selected tab (with or without hover) */
- background-color:#fff;
- border-color: #ccc;
- background-image:none;
-}
-
-/* make the active tab white on the side next to the content pane */
-.tundra .dijitAlignTop .dijitTabChecked,
-.tundra .dijitAlignTop .dijitTabCloseButtonChecked
-{
- border-bottom-color:white;
- vertical-align:bottom;
-}
-
-.tundra .dijitAlignBottom .dijitTabChecked,
-.tundra .dijitAlignBottom .dijitTabCloseButtonChecked
-{
- border-top-color:white;
- -moz-border-radius:2px 2px 0px 0px; /* eliminate some border detritrus on moz */
-}
-
-.tundra .dijitAlignLeft .dijitTabChecked,
-.tundra .dijitAlignLeft .dijitTabCloseButtonChecked
-{
- border-right-color:white;
-}
-
-.tundra .dijitAlignRight .dijitTabChecked,
-.tundra .dijitAlignRight .dijitTabCloseButtonChecked
-{
- border-left-color:white;
-}
-
-
-/* make space for a positioned close button */
-.tundra .dijitTab .dijitClosable {
- position: relative;
- padding:6px 20px 4px 10px;
-}
-
-.tundra .dijitTab .dijitClosable .closeImage {
- position:absolute;
- top: 7px;
- right: 3px;
- height: 12px;
- width: 12px;
- padding: 0;
- margin: 0;
- background: url("images/tabClose.png") no-repeat right top;
-}
-.dj_ie6 .dijitTab .dijitClosable .closeImage {
- background-image:url("images/tabClose.gif");
-}
-
-.tundra .dijitTabCloseButton .dijitClosable .closeImage {
- background-image : url("images/tabClose.png");
-}
-.dj_ie6 .tundra .dijitTabCloseButton .dijitClosable .closeImage {
- background-image : url("images/tabClose.gif");
-}
-
-.tundra .dijitTabCloseButtonHover .dijitClosable .closeImage {
- background-image : url("images/tabCloseHover.png");
-}
-.dj_ie6 .tundra .dijitTabCloseButtonHover .dijitClosable .closeImage {
- background-image : url("images/tabCloseHover.gif");
-}
-
-.tundra .dijitAlignLeft .dijitTab .dijitClosable {
- padding:6px 10px 4px 20px;
-}
-
-/* correct for IE6.
- We cant force hasLayout as that blows out the shrink wrapped tabs
- ..so we shim in the closeImage position properties instead
-*/
-.dj_ie6 .tundra .dijitAlignLeft .dijitTab .dijitClosable .closeImage {
- left:-20px;
-}
-
-.tundra .dijitAlignBottom .dijitTab .dijitClosable .closeImage {
- top: auto;
- bottom: 7px;
- right: 3px;
-}
-
-.tundra .dijitAlignLeft .dijitTab .dijitClosable .closeImage {
- top: 7px;
- left: 3px;
-}
-
-/* SplitContainer */
-
-.tundra .dijitSplitContainerSizerH {
- background:url("images/splitContainerSizerH.png") repeat-y #fff;
- border:0;
- border-left:1px solid #bfbfbf;
- border-right:1px solid #bfbfbf;
- width:7px;
-}
-
-.tundra .dijitSplitContainerSizerH .thumb {
- background:url("images/splitContainerSizerH-thumb.png") no-repeat #ccc;
- left:1px;
- width:3px;
- height:19px;
-}
-
-.tundra .dijitSplitContainerSizerV {
- background:url("images/splitContainerSizerV.png") repeat-x #fff;
- border:0;
- border-top:1px solid #bfbfbf;
- border-bottom:1px solid #bfbfbf;
- height:7px;
-}
-
-.tundra .dijitSplitContainerSizerV .thumb {
- background:url("images/splitContainerSizerV-thumb.png") no-repeat #ccc;
- top:1px;
- width:19px;
- height:3px;
-}
-
-
-/* Dialog */
-
-.tundra .dijitDialog {
- background: #eee;
- border: 1px solid #999;
- -webkit-box-shadow: 0px 5px 10px #adadad;
-}
-
-.tundra .dijitDialog .dijitDialogTitle {
- border-top: none;
- border-left: none;
- border-right: none;
-}
-
-.tundra .dijitDialog .dijitDialogPaneContent {
- background: #ffffff;
- border:none;
- border-top: 1px solid #ccc; /* #cddde9; /* w/out this, an <h1> on the top line causes a gap between the .content and .label */
- padding:10px;
-
-}
-
-.tundra .dijitDialogTitleBar {
- /* outer container for the titlebar of the dialog */
- background: #fafafa url("images/titleBarBg.gif") repeat-x bottom left;
- /* border: 1px solid #bfbfbf; */
- padding: 4px 8px 2px 4px;
- cursor: move;
- outline:0; /* remove this line if keyboard focus on dialog startup is an issue. tab still takes you to first focusable element */
-}
-
-.tundra .dijitDialogTitle {
- /* typography and styling of the dialog title */
- font-weight: bold;
- padding: 8px 12px 8px 12px;
- outline:0;
-}
-
-.tundra .dijitDialogCloseIcon {
- /* the default close icon for the dialog */
- background : url("images/tabClose.png") no-repeat right top;
- float: right;
- position: absolute;
- vertical-align: middle;
- right: 5px;
- top: 5px;
- height: 22px;
- width: 22px;
- cursor: pointer;
-}
-.dj_ie6 .tundra .dijitDialogCloseIcon {
- background-image: url("images/tabClose.gif");
-}
-
-.tundra .dijitDialogContent {
- /* the body of the dialog */
- padding: 8px;
-}
-
-/*Tooltip*/
-
-.tundra .dijitTooltip,
-.tundra .dijitTooltipDialog {
- /* the outermost dom node, holding the connector and container */
- opacity: 0.95;
- background: transparent; /* make the area on the sides of the arrow transparent */
-}
-
-.dijitTooltipBelow {
- /* leave room for arrow above content */
- padding-top: 13px;
-}
-
-.dijitTooltipAbove {
- /* leave room for arrow below content */
- padding-bottom: 13px;
-}
-
-.tundra .dijitTooltipContainer {
- /*
- The part with the text.
-
- NOTE:
- FF doesn't clip images used as CSS bgs if you specify a border
- radius. If you use a solid color, it does. Webkit gets it right.
- Sigh.
- background: #ffffff url("images/popupMenuBg.gif") repeat-x bottom left;
- */
- background-color: #fafafa;
- border:1px solid #b6c7d5;
- padding:0.45em;
- border-radius: 6px;
- -moz-border-radius: 7px;
- -webkit-border-radius: 6px;
-}
-
-.tundra .dijitTooltipConnector {
- /* the arrow piece */
- border:0px;
- z-index: 2;
-}
-
-.tundra .dijitTooltipABRight .dijitTooltipConnector {
- left: auto !important;
- right: 3px;
-}
-
-.tundra .dijitTooltipBelow .dijitTooltipConnector {
- /* the arrow piece for tooltips below an element */
- top: 0px;
- left: 3px;
- background:url("images/tooltipConnectorUp.png") no-repeat top left;
- width:16px;
- height:14px;
-}
-
-.dj_ie6 .tundra .dijitTooltipBelow .dijitTooltipConnector {
- background-image: url("images/tooltipConnectorUp.gif");
-}
-
-.tundra .dijitTooltipAbove .dijitTooltipConnector {
- /* the arrow piece for tooltips above an element */
- bottom: 0px;
- left: 3px;
- background:url("images/tooltipConnectorDown.png") no-repeat top left;
- width:16px;
- height:14px;
-}
-.dj_ie6 .tundra .dijitTooltipAbove .dijitTooltipConnector {
- background-image: url("images/tooltipConnectorDown.gif");
-}
-
-.tundra .dijitTooltipLeft {
- padding-right: 13px;
-}
-.dj_ie6 .tundra .dijitTooltipLeft {
- padding-right: 15px;
-}
-.tundra .dijitTooltipLeft .dijitTooltipConnector {
- /* the arrow piece for tooltips to the left of an element, bottom borders aligned */
- right: 0px;
- bottom: 7px;
- background:url("images/tooltipConnectorRight.png") no-repeat top left;
- width:16px;
- height:14px;
-}
-.dj_ie6 .tundra .dijitTooltipLeft .dijitTooltipConnector {
- background-image: url("images/tooltipConnectorRight.gif");
-}
-
-.tundra .dijitTooltipRight {
- padding-left: 13px;
-}
-.tundra .dijitTooltipRight .dijitTooltipConnector {
- /* the arrow piece for tooltips to the right of an element, bottom borders aligned */
- left: 0px;
- bottom: 7px;
- background:url("images/tooltipConnectorLeft.png") no-repeat top left;
- width:16px;
- height:14px;
-}
-.dj_ie6 .tundra .dijitTooltipRight .dijitTooltipConnector {
- background-image: url("images/tooltipConnectorLeft.gif");
-}
-
-/* Accordion */
-
-.tundra .dijitAccordionPane-selected {
- /* background-color:#85aeec; */
- background-color: #e7e7e7;
-}
-
-.tundra .dijitAccordionPane .dijitAccordionTitle {
- background:#fafafa url("images/titleBar.png") repeat-x bottom left;
- border-top: 1px solid #bfbfbf;
- padding:4px 4px 2px 4px;
-}
-
-.tundra .dijitAccordionPane-selected .dijitAccordionTitle {
- background: #ededed url("images/buttonActive.png") bottom repeat-x;
- font-weight: bold;
- border-top: 1px solid #aaaaaa;
- padding: 4px 4px 2px 4px;
-}
-.tundra .dijitAccordionPaneFocused .dijitAccordionText {
- text-decoration:underline !important;
- /*border-left:1px solid #999;
- border-right:1px solid #999;
- border-top:1px solid #999; */
-}
-
-.tundra .dijitAccordionPane .dijitAccordionArrow {
- background:url("images/arrowUp.png") no-repeat;
- width:15px;
- height:15px;
- margin-top:2px;
-}
-.dj_ie6 .tundra .dijitAccordionPane .dijitAccordionArrow {
- background-image: url("images/arrowUp.gif");
-}
-
-.tundra .dijitAccordionPane-selected .dijitAccordionArrow {
- background:url("images/circleIcon.png") no-repeat;
- margin-top:2px;
-}
-.dj_ie6 .tundra .dijitAccordionPane-selected .dijitAccordionArrow {
- background-image: url("images/circleIcon.gif");
-}
-
-.tundra .dijitAccordionPane .dijitAccordionBody {
- background: #fff;
- border-top: 1px solid #bfbfbf;
-}
-
-/* Tree */
-
+.tundra .dijitSliderReadOnly *,
+.tundra .dijitSliderDisabled * {
+ border-color: #d5d5d5 #bdbdbd #bdbdbd #d5d5d5;
+ color: #bdbdbd;
+}
+.tundra .dijitSliderReadOnly .dijitSliderDecrementIconH,
+.tundra .dijitSliderDisabled .dijitSliderDecrementIconH {
+ background-position: -35px 0px;
+}
+.tundra .dijitSliderReadOnly .dijitSliderIncrementIconH,
+.tundra .dijitSliderDisabled .dijitSliderIncrementIconH {
+ background-position: -42px 0px;
+}
+.tundra .dijitSliderReadOnly .dijitSliderDecrementIconV,
+.tundra .dijitSliderDisabled .dijitSliderDecrementIconV {
+ background-position: -28px 0px;
+}
+.tundra .dijitSliderReadOnly .dijitSliderIncrementIconV,
+.tundra .dijitSliderDisabled .dijitSliderIncrementIconV {
+ background-position: -49px 0px;
+}
+.tundra .dijitSelectDisabled * {
+ cursor: not-allowed !important;
+}
+.tundra .dijitSelectReadOnly * {
+ cursor: default !important;
+}
+.tundra .dijitSelect .dijitButtonNode {
+ padding: 0px;
+}
+.tundra .dijitSelect .dijitButtonContents {
+ padding-top: 1px;
+ background:#fff url(images/validationInputBg.png) repeat-x top left;
+ #background:#fff url(images/validationInputBg.gif) repeat-x top left;
+}
+.tundra .dijitSelectHover .dijitButtonContents,
+.tundra .dijitSelectActive .dijitButtonContents,
+.tundra .dijitSelectOpened .dijitButtonContents,
+.tundra .dijitSelectDisabled .dijitButtonContents,
+.tundra .dijitSelectReadOnly .dijitButtonContents{
+ background: transparent none;
+}
+.dj_ie .tundra .dijitSelect .dijitButtonContents {
+ padding-top: 0px;
+}
+.tundra .dijitSelectDisabled .dijitButtonNode {
+ border-color: #d5d5d5 #bdbdbd #bdbdbd #d5d5d5;
+ background:#e4e4e4 url(images/buttonDisabled.png) top repeat-x;
+}
+.dj_ie .tundra .dijitSelectDisabled .dijitButtonNode * {
+ filter: gray() alpha(opacity=50);
+}
+.tundra .dijitSelectHover .dijitButtonNode {
+ border-color:#a5beda;
+ border-bottom-color:#5c7590;
+ border-right-color:#5c7590;
+ color:#243C5F;
+ background:#fcfdff url(images/buttonHover.png) repeat-x bottom;
+}
+.tundra .dijitSelectActive .dijitButtonNode,
+.tundra .dijitSelectOpened .dijitButtonNode {
+ border-color:#366dba;
+ background: #ededed url(images/buttonActive.png) bottom repeat-x;
+}
+.tundra .dijitSelectMenu td {
+ padding: 0em;
+}
+.tundra .dijitSelectMenu .dijitMenuItemIcon {
+ margin: 0.1em 0.2em;
+ display: none;
+}
+.tundra .dijitSelectMenu .dijitMenuItemLabel,
+.tundra .dijitSelectMenu .dijitMenuArrowCell {
+ padding: 0.1em 0.2em;
+}
.tundra .dijitTreeNode {
- background-image : url('images/i.gif');
- background-position : top left;
+ background-image : url(images/i.gif);
background-repeat : repeat-y;
- margin-left: 19px;
- zoom: 1; /* MOW: what the heck is this doing in here? */
-}
-
-/* left vertical line (grid) for all nodes */
+ zoom: 1;
+}
.tundra .dijitTreeIsLast {
- background: url('images/i_half.gif') no-repeat;
-}
-
+ background: url(images/i_half.gif) no-repeat;
+}
.tundra .dijitTreeIsRoot {
margin-left: 0;
background-image: none;
}
-
.tundra .dijitTreeExpando {
width: 18px;
height: 18px;
}
-
+.tundra .dijitTreeRow {
+
+ padding-bottom: 2px;
+}
.tundra .dijitTreeContent {
min-height: 18px;
min-width: 18px;
- margin-left:18px;
- padding-top:3px;
- padding-left:1px;
-}
-
-
+ }
.tundra .dijitTreeExpand {
width: 18px;
height: 18px;
background-repeat : no-repeat;
}
-
-/* same style as IE selection */
.tundra .dijitTreeNodeEmphasized {
background-color: Highlight;
color: HighlightText;
}
-
-/* don't use :focus due to opera and IE's lack of support on div's */
.tundra .dijitTreeLabelFocused {
outline: 1px invert dotted;
}
-
+.tundra .dijitTreeNodeSelected .dijitTreeLabel {
+ background:#e2ebfe;
+}
+.tundra .dijitTreeNodeHover {
+
+
+ background-image: url(images/treeHover.png);
+ background-repeat: repeat;
+ background-color: none !important;
+}
.tundra .dijitTreeExpandoOpened {
- background-image: url('images/treeExpand_minus.gif');
-}
-
+ background-image: url(images/treeExpand_minus.gif);
+}
.tundra .dijitTreeExpandoClosed {
- background-image: url('images/treeExpand_plus.gif');
-}
-
+ background-image: url(images/treeExpand_plus.gif);
+}
.tundra .dijitTreeExpandoLeaf {
- background-image: url('images/treeExpand_leaf.gif');
-}
-
+ background-image: url(images/treeExpand_leaf.gif);
+}
.tundra .dijitTreeExpandoLoading {
- background-image: url('images/treeExpand_loading.gif');
-}
-
-
-/* Calendar*/
-
+ background-image: url(images/treeExpand_loading.gif);
+}
+.tundra .dijitTreeIcon {
+ width: 16px;
+ height: 16px;
+}
+.tundra .dijitFolderOpened {
+ background: url(images/folderOpened.gif) no-repeat;
+}
+.tundra .dijitFolderClosed {
+ background: url(images/folderClosed.gif) no-repeat;
+}
+.tundra .dijitLeaf {
+ background: url(images/leaf.gif) no-repeat;
+}
+.tundra .dijitTreeNode .dojoDndItemBefore,
+.tundra .dijitTreeNode .dojoDndItemAfter {
+ border-bottom: none;
+ border-top: none;
+}
+.tundra .dijitTreeNode .dojoDndItemBefore .dijitTreeContent {
+
+ border-top: 2px solid #369;
+}
+.tundra .dijitTreeNode .dojoDndItemAfter .dijitTreeContent {
+
+ border-bottom: 2px solid #369;
+}
+.tundra .dijitProgressBar {
+ margin:2px 0px 2px 0px;
+}
+.tundra .dijitProgressBarEmpty {
+
+ background:#fff url(images/progressBarEmpty.png) repeat-x center center;
+ border-color: #a2a2a2 #b8b8b8 #b8b8b8 #a2a2a2;
+}
+.tundra .dijitProgressBarTile {
+
+ background:#f0f0f0 url(images/progressBarFull.png) repeat-x center center;
+}
+.tundra .dijitProgressBarFull {
+ border-right:1px solid #b8b8b8;
+}
+.tundra .dijitProgressBarLabel {
+
+ color:#293a4b;
+}
+.tundra .dijitProgressBarIndeterminate .dijitProgressBarTile {
+
+ background:#cad2de url(images/progressBarAnim.gif) repeat-x center center;
+}
+.tundra .dijitTitlePaneTitle {
+ background: #cccccc;
+ background:#fff url(images/titleBar.png) repeat-x bottom left;
+ border:1px solid #bfbfbf;
+ padding:3px 4px;
+}
+.tundra .dijitTitlePaneTitle-hover {
+ background: #f8fafd url(images/accordionItemHover.gif) bottom repeat-x;
+ cursor: pointer;
+}
+.tundra .dijitTitlePaneTitle * {
+ vertical-align: middle;
+}
+.tundra .dijitTitlePane .dijitOpen .dijitArrowNode,
+.tundra .dijitTitlePane .dijitClosed .dijitArrowNode {
+ background-image: url(images/spriteArrows.png);
+ background-repeat: no-repeat;
+ height: 7px;
+ width: 7px;
+}
+.dj_ie6 .tundra .dijitTitlePane .dijitArrowNode {
+ background-image: url(images/spriteArrows.gif);
+}
+.tundra .dijitTitlePane .dijitOpen .dijitArrowNode {
+ background-position: 0px 0px;
+}
+.tundra .dijitTitlePane .dijitClosed .dijitArrowNode {
+ background-position: -14px 0px;
+}
+.tundra .dijitTitlePaneFocused .dijitTitlePaneTextNode {
+ text-decoration:underline;
+}
+.tundra .dijitTitlePane .dijitArrowNodeInner {
+
+ display:none;
+}
+.dijit_a11y .dijitTitlePane .dijitOpen .dijitArrowNodeInner,
+.dijit_a11y .dijitTitlePane .dijitClosed .dijitArrowNodeInner {
+ display:inline !important;
+ font-family:monospace;
+ padding-bottom:.2em;
+}
+.dijit_a11y .dijitTitlePane .dijitArrowNode {
+
+ display:none;
+}
+.tundra .dijitTitlePaneContentOuter {
+ background: #ffffff;
+ border:1px solid #bfbfbf;
+ border-top: 1px solid #ccc;
+}
+.tundra .dijitTitlePaneContentInner {
+ padding:10px;
+}
+.dj_ie6 .tundra .dijitTitlePaneContentOuter,
+.dj_ie6 .tundra .dijitTitlePane .dijitTitlePaneTitle {
+ zoom: 1;
+}
+.tundra .dijitTitlePaneTextNode {
+ margin-left: 4px;
+ margin-right: 4px;
+}
.tundra .dijitCalendarIncrementControl {
- /* next/prev month buttons */
- width:16px;
- height:16px;
+
+ width:15px;
+ height:15px;
+ background-image: url(images/spriteRoundedIconsSmall.png);
+ background-repeat: no-repeat
}
.dj_ie6 .tundra .dijitCalendarIncrementControl {
- padding:.1em;
-}
-
-.tundra .dijitCalendarIncreaseInner,
-.tundra .dijitCalendarDecreaseInner {
- visibility:hidden;
-}
-
+ font-size:.1em;
+ background-image: url(images/spriteRoundedIconsSmall.gif);
+}
+.tundra .dijitA11ySideArrow {
+ display: none;
+}
.tundra .dijitCalendarDecrease {
- background:url("images/arrowLeft.png") no-repeat center center;
-}
-.dj_ie6 .tundra .dijitCalendarDecrease {
- background-image:url("images/arrowLeft.gif");
-}
-
+ background-position: top left;
+}
.tundra .dijitCalendarIncrease {
- background:url(images/arrowRight.png) no-repeat center center;
-}
-.dj_ie6 .tundra .dijitCalendarIncrease {
- background-image:url("images/arrowRight.gif");
-}
-
+ background-position: -30px top;
+}
.tundra table.dijitCalendarContainer {
font-size: 100%;
- border-collapse: collapse;
- border-spacing: 0;
- border: 1px solid #ccc;
+ border-spacing: 0;
+ border-collapse: separate;
+ border: 1px solid #ccc;
margin: 0;
}
-
.tundra .dijitCalendarMonthContainer th {
- /* month header cell */
- background:white url("images/calendarMonthLabel.png") repeat-x top;
+
+ background:#d3d3d3 url(images/titleBar.png) repeat-x top;
padding-top:.3em;
- padding-bottom:.1em;
- text-align:center;
+ padding-bottom:.2em;
+ text-align:center;
}
.dj_ie6 .tundra .dijitCalendarMonthContainer th {
- padding-top:.1em;
- padding-bottom:0em;
-}
-
+ padding-top:.2em;
+ padding-bottom:.1em;
+}
.tundra .dijitCalendarDayLabelTemplate {
- /* day of week labels */
- background:white url("images/calendarDayLabel.png") repeat-x bottom;
+
+ background:white url(images/calendarDayLabel.png) repeat-x bottom;
font-weight:normal;
padding-top:.15em;
padding-bottom:0em;
border-top: 1px solid #eeeeee;
color:#293a4b;
text-align:center;
}
-
+.tundra .dijitCalendarBodyContainer {
+ border-bottom: 1px solid #eeeeee;
+}
.tundra .dijitCalendarMonthLabel {
- /* day of week labels */
color:#293a4b;
- font-size: 0.75em;
font-weight: bold;
- text-align:center;
-}
-
-.dj_ie7 .tundra .dijitCalendarDateTemplate,
-.dj_ie6 .tundra .dijitCalendarDateTemplate {
- font-size: 0.8em;
-}
-
+}
.tundra .dijitCalendarDateTemplate {
- /* style for each day cell */
+
font-size: 0.9em;
font-weight: bold;
text-align: center;
padding: 0.3em 0.3em 0.05em 0.3em;
letter-spacing: 1px;
}
-
-
+.dj_ie .tundra .dijitCalendarDateTemplate {
+ padding: 0.1em .33em 0.02em .33em;
+}
.tundra .dijitCalendarPreviousMonth,
.tundra .dijitCalendarNextMonth {
- /* days that are part of the previous or next month */
+
color:#999999;
background-color:#f8f8f8 !important;
}
-
.tundra .dijitCalendarPreviousMonthDisabled,
.tundra .dijitCalendarNextMonthDisabled {
- /* days that are part of the previous or next month - disabled*/
+
background-color:#a4a5a6 !important;
}
-
.tundra .dijitCalendarCurrentMonth {
- /* days that are part of this month */
+
background-color:white !important;
}
-
.tundra .dijitCalendarCurrentMonthDisabled {
- /* days that are part of this month - disabled */
- background-color:#bbbbbc !important;
-}
-
+
+ background-color:#bbbbbc !important;
+}
.tundra .dijitCalendarDisabledDate {
- /* one or the other? */
- /* background: url(images/noX.gif) no-repeat center center !important; */
- text-decoration:line-through !important;
- cursor:default !important;
-}
-
+ cursor:default !important;
+ text-decoration:line-through !important;
+}
.tundra .dijitCalendarCurrentDate {
- /* cell for today's date */
+
text-decoration:underline;
font-weight:bold;
}
-
+.tundra .dijitCalendarHoveredDate {
+ background-color: #e2ebf2 !important;
+}
.tundra .dijitCalendarSelectedDate {
- /* cell for the selected date */
+
background-color:#bbc4d0 !important;
color:black !important;
}
-
-
.tundra .dijitCalendarYearContainer {
- /* footer of the table that contains the year display/selector */
- background:white url("images/calendarYearLabel.png") repeat-x bottom;
+
+ background:white url(images/calendarYearLabel.png) repeat-x bottom;
border-top:1px solid #ccc;
}
-
.tundra .dijitCalendarYearLabel {
- /* container for all of 3 year labels */
+
margin:0;
padding:0.4em 0 0.25em 0;
text-align:center;
}
-
.tundra .dijitCalendarSelectedYear {
- /* label for selected year */
+
color:black;
padding:0.2em;
padding-bottom:0.1em;
background-color:#bbc4d0 !important;
}
-
-.tundra .dijitCalendarNextYear,
+.tundra .dijitCalendarNextYear,
.tundra .dijitCalendarPreviousYear {
- /* label for next/prev years */
+
color:black !important;
font-weight:normal;
}
-
-
-
-/* inline edit boxen */
-.tundra .dijitInlineValue {
- /* span around an inline-editable value when NOT in edit mode */
- padding:3px;
- margin:4px;
-}
-
-
-/* MOW: trying to get this to look like a mini-dialog. Advised? */
-.tundra .dijitInlineEditor {
- /* fieldset surrounding an inlineEditor in edit mode */
- display: inline-block;
- display: -moz-inline-stack;
- #display:inline;
- /*
- border: solid;
- border-color: #7788a0 #344257 #344257 #7788a0;
- border-width:1px 2px 2px 1px;
- -moz-border-radius:0px 2px 0px 2px; make BL and TR corners indent on Moz so it looks like we have a shadow
- background-color:white;
- */
-}
-
-.dijitInlineEditor .saveButton,
-.dijitInlineEditor .cancelButton {
- margin:3px 3px 3px 0px;
-}
-
-
-/* spinner */
-
-.tundra .dijitSpinner {}
-.tundra .dijitSpinner input {
-}
-
-
-
-
-/****
- dijit.ProgressBar
- ****/
-
-.tundra .dijitProgressBar {
- margin:2px 0px 2px 0px;
-}
-
-.tundra .dijitProgressBarEmpty{
- /* outer container and background of the bar that's not finished yet*/
- background:#ececec url("images/progressBarEmpty.png") repeat-x bottom left;
- border-color: #84a3d1;
-}
-
-.tundra .dijitProgressBarTile{
- /* inner container for finished portion when in 'tile' (image) mode */
- background:#cad2de url("images/progressBarFull.png") repeat-x top left;
-}
-
-.tundra .dijitProgressBarLabel {
- /* Set to a color that contrasts with both the "Empty" and "Full" parts. */
+.tundra .dijitTimePickerTick,
+.tundra .dijitTimePickerMarker {
+ border-color: #ccc;
+}
+.tundra .dijitTimePickerTick {
+ color:white;
+}
+.tundra .dijitTimePickerMarker {
+ background:#d3d3d3 url(images/titleBar.png) repeat-x top;
color:#293a4b;
-}
-
-.tundra .dijitProgressBarIndeterminate .dijitProgressBarTile {
- /* use an animated gif for the progress bar in 'indeterminate' mode */
- background:#cad2de url("images/dijitProgressBarAnim.gif") repeat-x top left;
-}
-
-/****
- SLIDER
-****/
-
-.tundra .dijitHorizontalSliderProgressBar {
- border-color: #aab0bb;
- background: #c0c2c5 url("images/sliderFull.png") repeat-x top left;
-}
-
-.tundra .dijitVerticalSliderProgressBar {
- border-color: #aab0bb;
- background: #c0c2c5 url("images/sliderFullVertical.png") repeat-y bottom left;
-}
-
-.tundra .dijitSliderFocused .dijitHorizontalSliderProgressBar,
-.tundra .dijitSliderFocused .dijitHorizontalSliderLeftBumper {
- background-image:url("images/sliderFullFocus.png");
-}
-
-.tundra .dijitSliderFocused .dijitVerticalSliderProgressBar,
-.tundra .dijitSliderFocused .dijitVerticalSliderBottomBumper {
- background-image:url("images/sliderFullVerticalFocus.png");
-}
-
-.tundra .dijitVerticalSliderRemainingBar {
- border-color: #b4b4b4;
- background: #dcdcdc url("images/sliderEmptyVertical.png") repeat-y bottom left;
-}
-
-.tundra .dijitHorizontalSliderRemainingBar {
- border-color: #b4b4b4;
- background: #dcdcdc url("images/sliderEmpty.png") repeat-x top left;
-}
-
-.tundra .dijitSliderBar {
- border-style: solid;
- outline:1px;
- /* border-color: #b4b4b4; */
-}
-.tundra .dijitSliderFocused .dijitSliderBar {
- border-color:#333;
-}
-
-.dijit_a11y .dijitSliderProgressBar {
- background-color:#333 !important;
-}
-
-.tundra .dijitHorizontalSliderImageHandle {
+ font-weight: bold;
+}
+.tundra .dijitTimePickerItemSelected {
+ color: black;
+ background: #bbc4d0 none;
+}
+.tundra .dijitTimePickerItemHover {
+ background: #60a1ea none;
+ color:white;
+}
+.tundra .dijitTimePickerItemHover,
+.tundra .dijitTimePickerItemSelected {
+ position: relative;
+ z-index: 10;
+}
+.tundra .dijitTimePickerTick .dijitTimePickerItemInner {
+ font-size:0.4em;
+}
+.tundra .dijitTimePickerItemHover .dijitTimePickerItemInner,
+.tundra .dijitTimePickerItemSelected .dijitTimePickerItemInner {
+ font-size:1em;
+}
+.tundra .dijitTimePickerMarkerHover {
+ border-top: 1px solid #ccc;
+}
+.tundra .dijitTimePickerTickHover,
+.tundra .dijitTimePickerTickSelected {
+ margin-top:-0.3em;
+ margin-bottom:-0.3em;
+ border-bottom: none;
+}
+.dijit_a11y .dijitTimePickerTickHover {
+ background-color: #CCC !important;
+ border-top: 1px solid #333 !important;
+ border-bottom: 1px solid #333 !important;
+}
+.dijit_a11y .dijitTimePickerMarkerHover {
+ border-bottom-width: 2px;
+}
+.tundra .dijitToolbar {
+ border-bottom: 1px solid #ccc;
+ background:#eaeaea url(images/titleBar.png) repeat-x top left;
+}
+.dj_ie6 .tundra .dijitToolbar {
+ height: 10px;
+}
+.tundra .dijitToolbar .dijitButtonNode,
+.tundra .dijitToolbar .dijitComboButton .dijitButtonContents,
+.tundra .dijitToolbar .dijitComboButton .dijitDownArrowButton {
+ background: none;
+ margin: 0px;
+ padding: 0px;
+ border: none;
+ font-size: 12px;
+}
+.tundra .dijitToolbar .dijitButton,
+.tundra .dijitToolbar .dijitToggleButton,
+.tundra .dijitToolbar .dijitDropDownButton,
+.tundra .dijitToolbar .dijitComboButton .dijitButtonContents,
+.tundra .dijitToolbar .dijitComboButton .dijitDownArrowButton {
+ background: none;
+ padding: 1px;
+}
+.tundra .dijitToolbar .dijitButtonChecked,
+.tundra .dijitToolbar .dijitToggleButtonChecked {
+ background-color:#d4dff2;
+ border:1px solid #316ac5;
+ padding: 0px;
+}
+.tundra .dijitToolbar .dijitButtonCheckedHover,
+.tundra .dijitToolbar .dijitToggleButtonCheckedHover
+ {
+ background-color:#abc1e5;
+ border:1px solid #316ac5;
+ padding: 0px;
+}
+.tundra .dijitToolbar .dijitButtonHover,
+.tundra .dijitToolbar .dijitToggleButtonHover,
+.tundra .dijitToolbar .dijitDropDownButtonHover,
+.tundra .dijitToolbar .dijitComboButtonHover .dijitButtonContents,
+.tundra .dijitToolbar .dijitComboButtonDownArrowHover .dijitDownArrowButton {
+
+ border: 1px solid #869cbf;
+ padding: 0px;
+ background-color:#e1e5f0;
+}
+.tundra .dijitToolbar label {
+ padding: 3px 3px 0 6px;
+}
+.dj_ie .tundra .dijitToolbar .dijitComboButton .dijitButtonContentsFocused,
+.dj_ie .tundra .dijitToolbar .dijitComboButton .dijitDownArrowButtonFocused {
+
+ border: 1px #555 dotted !important;
+ padding: 0px;
+}
+.tundra .dijitDialog {
+ background: #fff;
+ border: 1px solid #7eabcd;
+
+ padding: 0px;
+ -webkit-box-shadow: 0px 5px 10px #adadad;
+}
+.tundra .dijitDialog .dijitDialogPaneContent {
+ background: #fff;
+ border:none;
+ border-top: 1px solid #d3d3d3;
+ padding:10px;
+}
+.tundra .dijitDialogTitleBar {
+
+ background: #fafafa url(images/titleBar.png) repeat-x top left;
+ padding: 5px 6px 3px 6px;
+ cursor: move;
+ outline:0;
+}
+.tundra .dijitDialogTitle {
+
+ font-weight: bold;
+ padding: 0px 4px;
+}
+.tundra .dijitDialogCloseIcon {
+
+
+ background: url(images/tabClose.png) no-repeat right top;
+ position: absolute;
+ vertical-align: middle;
+ right: 6px;
+ top: 4px;
+ height: 15px;
+ width: 15px;
+ cursor: pointer;
+}
+.dj_ie6 .tundra .dijitDialogCloseIcon {
+ background : url(images/tabClose.gif) no-repeat right top;
+}
+.tundra .dijitDialogCloseIcon-hover {
+ background: url(images/tabCloseHover.png) no-repeat right top;
+}
+.dj_ie6 .tundra .dijitDialogCloseIcon-hover {
+ background : url(images/tabCloseHover.gif) no-repeat right top;
+}
+.tundra .dijitTooltip,
+.tundra .dijitTooltipDialog {
+
+ background: transparent;
+}
+.dijitTooltipBelow {
+
+ padding-top: 13px;
+}
+.dijitTooltipAbove {
+
+ padding-bottom: 13px;
+}
+.tundra .dijitTooltipContainer {
+
+ background: #ffffff url(images/popupMenuBg.gif) repeat-x bottom left;
+ border: 1px solid #7eabcd;
+ padding: 0.45em;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+}
+.tundra .dijitTooltipConnector {
+
border:0px;
+ z-index: 2;
+}
+.tundra .dijitTooltipABRight .dijitTooltipConnector {
+
+ left: auto !important;
+ right: 3px;
+}
+.tundra .dijitTooltipBelow .dijitTooltipConnector {
+
+ top: 0px;
+ left: 3px;
+ background:url(images/tooltipConnectorUp.png) no-repeat top left;
width:16px;
- height:16px;
- background:url("images/preciseSliderThumb.png") no-repeat center top;
- cursor:pointer;
-}
-.tundra .dijitSliderFocused .dijitHorizontalSliderImageHandle {
- background-image:url("images/preciseSliderThumbFocus.png");
- #background-image:url("images/preciseSliderThumbFocus.gif");
-}
-
-.dj_ie6 .tundra .dijitHorizontalSliderImageHandle {
- background-image:url("images/preciseSliderThumb.gif");
-}
-
-.tundra .dijitHorizontalSliderLeftBumper {
- border-left-width: 1px;
- border-color: #aab0bb;
- background: #c0c2c5 url("images/sliderFull.png") repeat-x top left;
-}
-
-.tundra .dijitHorizontalSliderRightBumper {
- background: #dcdcdc url("images/sliderEmpty.png") repeat-x top left;
- border-color: #b4b4b4;
- border-right-width: 1px;
-}
-
-.tundra .dijitVerticalSliderImageHandle {
- border:0px;
+ height:14px;
+}
+.dj_ie .tundra .dijitTooltipBelow .dijitTooltipConnector {
+
+ background-image: url(images/tooltipConnectorUp.gif);
+}
+.tundra .dijitTooltipAbove .dijitTooltipConnector {
+
+ bottom: 0px;
+ left: 3px;
+ background:url(images/tooltipConnectorDown.png) no-repeat top left;
+ width:16px;
+ height:14px;
+}
+.dj_ie .tundra .dijitTooltipAbove .dijitTooltipConnector {
+ background-image: url(images/tooltipConnectorDown.gif);
+}
+.dj_ie6 .tundra .dijitTooltipAbove .dijitTooltipConnector {
+ bottom: -3px;
+}
+.tundra .dijitTooltipLeft {
+ padding-right: 14px;
+}
+.dj_ie6 .tundra .dijitTooltipLeft {
+ padding-left: 15px;
+}
+.tundra .dijitTooltipLeft .dijitTooltipConnector {
+
+ right: 0px;
+ bottom: 3px;
+ background:url(images/tooltipConnectorRight.png) no-repeat top left;
+ width:16px;
+ height:14px;
+}
+.dj_ie .tundra .dijitTooltipLeft .dijitTooltipConnector {
+ background-image: url(images/tooltipConnectorRight.gif);
+}
+.tundra .dijitTooltipRight {
+ padding-left: 14px;
+}
+.tundra .dijitTooltipRight .dijitTooltipConnector {
+
+ left: 0px;
+ bottom: 3px;
+ background:url(images/tooltipConnectorLeft.png) no-repeat top left;
width:16px;
- height:16px;
- background:url("images/sliderThumb.png") no-repeat center center;
- cursor:pointer;
-}
-
-.tundra .dijitSliderFocused .dijitVerticalSliderImageHandle {
- background-image:url("images/sliderThumbFocus.png");
-}
-.dj_ie6 .tundra .dijitSliderFocused .dijitVerticalSliderImageHandle {
- background-image:url("images/sliderThumbFocus.gif");
-}
-
-.tundra .dijitVerticalSliderBottomBumper {
- border-bottom-width: 1px;
- border-color: #aab0bb;
- background: #c0c2c5 url("images/sliderFullVertical.png") repeat-y bottom left;
-}
-
-.tundra .dijitVerticalSliderTopBumper {
- background: #dcdcdc url("images/sliderEmptyVertical.png") repeat-y top left;
- border-color: #b4b4b4;
- border-top-width: 1px;
-}
-
-.tundra .dijitHorizontalSliderIncrementIcon,
-.tundra .dijitVerticalSliderIncrementIcon {
- background:url('images/arrowUp.png') no-repeat center center;
- width:16px; height:16px;
- cursor:pointer;
-}
-.tundra .dijitHorizontalSliderIncrementIcon {
- background-image:url('images/arrowRight.png');
-}
-
-.tundra .dijitHorizontalSliderDecrementIcon,
-.tundra .dijitVerticalSliderDecrementIcon {
- width:16px;
- height:16px;
- cursor:pointer;
- background:url('images/arrowDown.png') no-repeat center center;
-}
-.tundra .dijitHorizontalSliderDecrementIcon { background-image:url('images/arrowLeft.png'); }
-
-.tundra .dijitSliderButtonInner {
- visibility:hidden;
-}
-
-.tundra .dijitSliderDisabled {
- opacity:0.6 !important;
-}
-
-.dj_ie6 .tundra .dijitSliderDisabled,
-.dj_ie6 .tundra .dijitSliderDisabled .RuleContainer,
-.dj_ie6 .tundra .dijitSliderDisabled .dijitSliderRemainingBar,
-.dj_ie6 .tundra .dijitSliderDisabled .dijitSliderProgressBar {
- filter: gray() alpha(opacity=40);
-}
-
-/**** ICONS *****/
-
+ height:14px;
+}
+.dj_ie .tundra .dijitTooltipRight .dijitTooltipConnector {
+ background-image: url(images/tooltipConnectorLeft.gif);
+}
+.dj_webkit .tundra .dijitPopup .dijitTooltipContainer,
+.dj_webkit .tundra .dijitPopup .dijitMenu {
+
+ -webkit-box-shadow: 0px 5px 10px #adadad;
+}
+.tundra .dijitMenu,
+.tundra .dijitMenuBar {
+ border: 1px solid #7eabcd;
+ margin: 0px;
+ padding: 0px;
+ background-color: #f7f7f7;
+
+}
+.tundra .dijitBorderContainer .dijitMenuBar {
+ border:1px solid #ccc;
+}
+.tundra .dijitMenuItem {
+ font-family: sans-serif;
+ margin: 0;
+}
+.tundra .dijitMenuBar .dijitMenuItem {
+ padding: 4px 5px;
+}
+.tundra .dijitMenuPreviousButton, .tundra .dijitMenuNextButton {
+ font-style: italic;
+}
+.tundra .dijitMenuItem td {
+ padding: 2px;
+}
+.tundra .dijitMenuPassive .dijitMenuItemHover,
+.tundra .dijitMenuItemSelected {
+ background-color: #3559ac;
+ color:#fff;
+}
+.tundra .dijitMenuItemIcon {
+ width: 16px;
+ height: 16px;
+}
+.tundra .dijitMenuExpand {
+ width: 7px;
+ height: 7px;
+ background-image: url(images/spriteArrows.png);
+ background-position: -14px 0px;
+}
+.dj_ie6 .tundra .dijitMenuExpand {
+ background-image: url(images/spriteArrows.gif);
+}
+.tundra .dijitMenuSeparatorTop {
+ border-bottom: 1px solid #9b9b9b;
+}
+.tundra .dijitMenuSeparatorBottom {
+ border-top: 1px solid #e8e8e8;
+}
+.tundra .dijitCheckedMenuItemIconChar {
+ display: none;
+}
+.tundra .dijitCheckedMenuItemIcon {
+ background-image: url(images/checkmark.png);
+ background-position: -80px;
+}
+.dj_ie6 .tundra .dijitCheckedMenuItemIcon {
+ background-image: url(images/checkmark.gif);
+}
+.tundra .dijitCheckedMenuItemChecked .dijitCheckedMenuItemIcon {
+ background-position: -64px;
+}
+.dijitIEFixedToolbar {
+ position:absolute;
+
+ top: expression(eval((document.documentElement||document.body).scrollTop));
+}
+.tundra .dijitToolbar .dijitToolbarSeparator {
+ background: url(images/editor.gif);
+}
.tundra .dijitEditorIcon {
- background-image: url('images/editor.gif'); /* editor icons sprite image */
- background-repeat: no-repeat;
+ background-image: url(images/editor.gif);
+ background-repeat: no-repeat;
width: 18px;
height: 18px;
text-align: center;
}
+.tundra .dijitDisabled .dijitEditorIcon {
+ background-image: url(images/editorDisabled.gif);
+}
.tundra .dijitEditorIconSep { background-position: 0px; }
.tundra .dijitEditorIconBackColor { background-position: -18px; }
.tundra .dijitEditorIconBold { background-position: -36px; }
.tundra .dijitEditorIconCancel { background-position: -54px; }
.tundra .dijitEditorIconCopy { background-position: -72px; }
.tundra .dijitEditorIconCreateLink { background-position: -90px; }
.tundra .dijitEditorIconCut { background-position: -108px; }
.tundra .dijitEditorIconDelete { background-position: -126px; }
.tundra .dijitEditorIconForeColor { background-position: -144px; }
.tundra .dijitEditorIconHiliteColor { background-position: -162px; }
.tundra .dijitEditorIconIndent { background-position: -180px; }
.tundra .dijitEditorIconInsertHorizontalRule { background-position: -198px; }
.tundra .dijitEditorIconInsertImage { background-position: -216px; }
.tundra .dijitEditorIconInsertOrderedList { background-position: -234px; }
.tundra .dijitEditorIconInsertTable { background-position: -252px; }
.tundra .dijitEditorIconInsertUnorderedList { background-position: -270px; }
.tundra .dijitEditorIconItalic { background-position: -288px; }
.tundra .dijitEditorIconJustifyCenter { background-position: -306px; }
.tundra .dijitEditorIconJustifyFull { background-position: -324px; }
.tundra .dijitEditorIconJustifyLeft { background-position: -342px; }
.tundra .dijitEditorIconJustifyRight { background-position: -360px; }
.tundra .dijitEditorIconLeftToRight { background-position: -378px; }
.tundra .dijitEditorIconListBulletIndent { background-position: -396px; }
.tundra .dijitEditorIconListBulletOutdent { background-position: -414px; }
.tundra .dijitEditorIconListNumIndent { background-position: -432px; }
.tundra .dijitEditorIconListNumOutdent { background-position: -450px; }
.tundra .dijitEditorIconOutdent { background-position: -468px; }
.tundra .dijitEditorIconPaste { background-position: -486px; }
.tundra .dijitEditorIconRedo { background-position: -504px; }
.tundra .dijitEditorIconRemoveFormat { background-position: -522px; }
.tundra .dijitEditorIconRightToLeft { background-position: -540px; }
.tundra .dijitEditorIconSave { background-position: -558px; }
.tundra .dijitEditorIconSpace { background-position: -576px; }
.tundra .dijitEditorIconStrikethrough { background-position: -594px; }
.tundra .dijitEditorIconSubscript { background-position: -612px; }
.tundra .dijitEditorIconSuperscript { background-position: -630px; }
.tundra .dijitEditorIconUnderline { background-position: -648px; }
.tundra .dijitEditorIconUndo { background-position: -666px; }
.tundra .dijitEditorIconWikiword { background-position: -684px; }
-
-/*
- * IE6: can't display PNG images with gradient transparency.
- * Want to use filter property for those images, but then need to specify a path relative
- * to the main page, rather than relative to this file... using gifs for now
- */
-
-.dj_ie6 .tundra .dijitInputField
-{
- background: url("images/validationInputBg.gif") repeat-x top left #fff;
-}
-
-/**** Disabled cursor *****/
-.tundra .dijitSliderDisabled *,
-.tundra .dijitDisabledClickableRegion, /* a region the user would be able to click on, but it's disabled */
-.tundra .dijitSpinnerDisabled *,
-.tundra .dijitButtonDisabled *,
-.tundra .dijitDropDownButtonDisabled *,
-.tundra .dijitComboButtonDisabled *,
-.tundra .dijitComboBoxDisabled *
-{
- cursor: not-allowed !important;
-}
-
-/* DnD avatar-specific settings */
-/* For now it uses a default set of rules. Some other DnD classes can be modified as well. */
-.tundra .dojoDndAvatar {font-size: 75%; color: black;}
-.tundra .dojoDndAvatarHeader td {padding-left: 20px; padding-right: 4px;}
-.tundra .dojoDndAvatarHeader {background: #ccc;}
-.tundra .dojoDndAvatarItem {background: #eee;}
-.tundra.dojoDndMove .dojoDndAvatarHeader {background-image: url(images/dndNoMove.png); background-repeat: no-repeat;}
-.tundra.dojoDndCopy .dojoDndAvatarHeader {background-image: url(images/dndNoCopy.png); background-repeat: no-repeat;}
-.tundra.dojoDndMove .dojoDndAvatarCanDrop .dojoDndAvatarHeader {background-image: url(images/dndMove.png); background-repeat: no-repeat;}
-.tundra.dojoDndCopy .dojoDndAvatarCanDrop .dojoDndAvatarHeader {background-image: url(images/dndCopy.png); background-repeat: no-repeat;}
-
-.tundra .dijitContentPaneLoading {
- background:url('images/loading.gif') no-repeat left center;
- padding-left:25px;
-}
-
-.tundra .dijitContentPaneError {
- background:url('images/warning.png') no-repeat left center;
- padding-left:25px;
-}
+.tundra .dijitEditorIconToggleDir { background-position: -540px; }
+.tundra .dijitEditorIconTabIndent { background-position: -702px; }
+.tundra .dijitEditorIconSelectAll { background-position: -720px; }
+.tundra .dijitEditorIconUnlink { background-position: -738px; }
+.tundra .dijitEditorIconFullScreen { background-position: -756px; }
+.tundra .dijitEditorIconViewSource { background-position: -774px; }
+.tundra .dijitEditorIconPrint { background-position: -792px; }
+.tundra .dijitEditorIconNewPage { background-position: -810px; }
+.dijitColorPalette {
+ border:1px solid #7eabcd;
+ background:#fff;
+ -moz-border-radius: 0px !important;
+}
+.dj_gecko-rtl .dijitInputField {
+ direction: ltr;
+}
+.dj_gecko-rtl .dijitInputField * {
+ direction: rtl;
+}
+.dijitRtl .dijitMenuItem {
+ text-align: right;
+}
+.dijitRtl .dijitComboBox .dijitInputField {
+ border-right-width:1px !important;
+ border-left-width:0 !important;
+}
+.dijitRtl .dijitCalendarNextYear {
+ margin:0 0.55em 0 0;
+}
+.dijitRtl .dijitCalendarPreviousYear {
+ margin:0 0 0 0.55em;
+}
+.dijitRtl .dijitProgressBarFull .dijitProgressBarLabel {
+ right:0;
+}
+.dijitRtl .dijitSliderImageHandleV {
+ left:auto;
+ right:-6px;
+}
+.dj_ie-rtl .dijitSliderImageHandleV {
+ right:-10px;
+}
+.dijitRtl .dijitSliderMoveableH {
+ right:auto;
+ left:0;
+}
+.dijitRtl .dijitRuleContainerV {
+ float:right;
+}
+.dj_gecko-rtl .dijitRuleContainerV {
+ float:left;
+}
+.dj_ie-rtl .dijitRuleContainerV {
+ text-align:right;
+}
+.dj_ie-rtl .dijitRuleLabelV {
+ text-align:left;
+}
+.dj_ie-rtl .dijitRuleLabelH {
+ zoom:1;
+}
+.dj_ie-rtl .dijitSliderProgressBarH {
+ right:0;
+ left:auto;
+}
+.dj_gecko-rtl .dijitSliderProgressBarH {
+ float:right;
+ right:0;
+ left:auto;
+}
+.dijitRtl .dijitSpinner .dijitInputLayoutContainer .dijitArrowButton {
+ right: auto;
+ left: 0;
+ border-width: 0 1px 0 0 !important;
+}
+.dijitRtl .dijitSpinnerButtonContainer {
+ float: left;
+}
+.dijitRtl .dijit_a11y .dijitSpinnerButtonContainer {
+ margin-left: none;
+ margin-right: 2px;
+}
+.dijitRtl DIV.dijitArrowButton, .dijitRtl .dijitValidationIcon, .dijitRtl .dijitValidationIconText {
+ float: left;
+}
+.dijitRtl .dijitContentPaneLoading, .dijitRtl .dijitContentPaneError {
+ background-position:right;
+ padding-right:25px;
+}
+.dijitRtl .dijitTabContainer .tabStripMenuButton {
+ float: left;
+}
+.dj_iequirks-rtl .dijitComboButton BUTTON {
+ float:left;
+}
+.dijitRtl .tundra .dijitCalendarDecrease {
+ background-position: -30px top;
+}
+.dijitRtl .tundra .dijitCalendarIncrease {
+ background-position: 0px top;
+}
+.dijitRtl .tundra .dijitDialogTitleBar .dijitDialogCloseIcon {
+ right: auto;
+ left: 5px;
+}
+.dijitRtl .tundra .dijitEditorIcon {
+ background-image: url(images/editor_rtl.gif);
+}
+.dijitRtl .tundra .dijitDisabled .dijitEditorIcon {
+ background-image: url(images/editorDisabled_rtl.gif);
+}
+.dijitRtl .tundra .dijitToolbar .dijitToolbarSeparator {
+ background-image: url(images/editor_rtl.gif);
+}
+.dijitRtl .tundra .dijitMenuItem .dijitMenuItemIcon {
+ padding-left: 3px;
+ padding-right: 0px;
+}
+.dijitRtl .tundra .dijitMenuItem .dijitMenuExpand {
+ background-position: -7px 0px;
+}
+.dijitRtl .tundra .dijitTreeContainer .dijitTreeNode {
+ background-image : none;
+}
+.dijitRtl .tundra .dijitTreeContainer .dijitTreeExpandoOpened {
+ background-image: url(images/treeExpand_minus_rtl.gif);
+}
+.dijitRtl .tundra .dijitTreeContainer .dijitTreeExpandoClosed {
+ background-image: url(images/treeExpand_plus_rtl.gif);
+}
+.dijitRtl .tundra .dijitTreeContainer .dijitTreeExpandoLeaf {
+ background-image: none;
+}
+.dijitRtl .tundra .dijitTitlePane .dijitClosed .dijitArrowNode {
+ background-position: -7px 0px;
+}
+.dijitRtl .tundra .dijitTab {
+ -moz-box-orient:horizontal;
+ text-align: right;
+}
+.dijitRtl .tundra .dijitTabInnerDiv {
+ padding:2px 9px 2px 8px;
+}
+.dijitRtl .tundra .tabStrip-disabled .tabStripButton .dijitTabInnerDiv {
+ padding-bottom: 3px;
+ padding-top: 1px;
+}
+.dijitRtl .tundra .tabStripButton .dijitTabInnerDiv {
+ padding: 3px 2px 4px 2px;
+}
+.dijitRtl .tundra .dijitTabPaneWrapper {
+ #zoom: 1;
+}
+.dj_ie-rtl .tundra .dijitTabContainerLeft-tabs {
+ margin-left: 1px !important;
+}
+.dj_ie-rtl .tundra .dijitTabContainerRight-tabs {
+ margin-right: 1px !important;
+}
+.dijitRtl .tundra .dijitTabContainerLeft-tabs .dijitTab,
+.dijitRtl .tundra .dijitTabContainerRight-tabs .dijitTab {
+ margin-left:0px;
+}
+.dj_ie-rtl .tundra .dijitTab .dijitTabInnerDiv {
+
+ width : 0.1% !important;
+}
+.dijitRtl .tundra .dijitSliderProgressBarH,
+.dijitRtl .tundra .dijitSliderRemainingBarH,
+.dijitRtl .tundra .dijitSliderLeftBumper,
+.dijitRtl .tundra .dijitSliderRightBumper,
+.dijitRtl .tundra .dijitSliderTopBumper {
+ background-position: top right;
+}
+.dijitRtl .tundra .dijitSliderProgressBarV,
+.dijitRtl .tundra .dijitSliderRemainingBarV,
+.dijitRtl .tundra .dijitSliderBottomBumper {
+ background-position: bottom right;
+}
+.dijitRtl .tundra .dijitSliderLeftBumper {
+ border-left-width: 0px;
+ border-right-width: 1px;
+}
+.dijitRtl .tundra .dijitSliderRightBumper {
+ border-left-width: 1px;
+ border-right-width: 0px;
+}
+.dijitRtl .tundra .dijitSliderIncrementIconH {
+ background-position: -7px 0px;
+}
+.dijitRtl .tundra .dijitSliderDecrementIconH {
+ background-position: -14px 0px;
+}
+.dijitRtl .tundra .dijitComboBox .dijitButtonNode,
+.dijitRtl .tundra .dijitSpinner .dijitButtonNode {
+
+ border-left-width: 0px;
+ border-right-width: 1px;
+}
diff --git a/js/dojo/dijit/themes/tundra/tundra_rtl.css b/js/dojo/dijit/themes/tundra/tundra_rtl.css
--- a/js/dojo/dijit/themes/tundra/tundra_rtl.css
+++ b/js/dojo/dijit/themes/tundra/tundra_rtl.css
@@ -1,217 +1,187 @@
-@import url("../dijit_rtl.css");
-/* Dialog */
-.dijitRtl .dijitDialogTitleBar .dijitDialogCloseIcon {
- background : url("images/tabClose.png") no-repeat left top;
+.dj_gecko-rtl .dijitInputField {
+ direction: ltr;
+}
+.dj_gecko-rtl .dijitInputField * {
+ direction: rtl;
+}
+.dijitRtl .dijitMenuItem {
+ text-align: right;
+}
+.dijitRtl .dijitComboBox .dijitInputField {
+ border-right-width:1px !important;
+ border-left-width:0 !important;
+}
+.dijitRtl .dijitCalendarNextYear {
+ margin:0 0.55em 0 0;
+}
+.dijitRtl .dijitCalendarPreviousYear {
+ margin:0 0 0 0.55em;
+}
+.dijitRtl .dijitProgressBarFull .dijitProgressBarLabel {
+ right:0;
+}
+.dijitRtl .dijitSliderImageHandleV {
+ left:auto;
+ right:-6px;
+}
+.dj_ie-rtl .dijitSliderImageHandleV {
+ right:-10px;
+}
+.dijitRtl .dijitSliderMoveableH {
+ right:auto;
+ left:0;
+}
+.dijitRtl .dijitRuleContainerV {
+ float:right;
+}
+.dj_gecko-rtl .dijitRuleContainerV {
+ float:left;
+}
+.dj_ie-rtl .dijitRuleContainerV {
+ text-align:right;
+}
+.dj_ie-rtl .dijitRuleLabelV {
+ text-align:left;
+}
+.dj_ie-rtl .dijitRuleLabelH {
+ zoom:1;
+}
+.dj_ie-rtl .dijitSliderProgressBarH {
+ right:0;
+ left:auto;
+}
+.dj_gecko-rtl .dijitSliderProgressBarH {
+ float:right;
+ right:0;
+ left:auto;
+}
+.dijitRtl .dijitSpinner .dijitInputLayoutContainer .dijitArrowButton {
+ right: auto;
+ left: 0;
+ border-width: 0 1px 0 0 !important;
+}
+.dijitRtl .dijitSpinnerButtonContainer {
float: left;
+}
+.dijitRtl .dijit_a11y .dijitSpinnerButtonContainer {
+ margin-left: none;
+ margin-right: 2px;
+}
+.dijitRtl DIV.dijitArrowButton, .dijitRtl .dijitValidationIcon, .dijitRtl .dijitValidationIconText {
+ float: left;
+}
+.dijitRtl .dijitContentPaneLoading, .dijitRtl .dijitContentPaneError {
+ background-position:right;
+ padding-right:25px;
+}
+.dijitRtl .dijitTabContainer .tabStripMenuButton {
+ float: left;
+}
+.dj_iequirks-rtl .dijitComboButton BUTTON {
+ float:left;
+}
+.dijitRtl .tundra .dijitCalendarDecrease {
+ background-position: -30px top;
+}
+.dijitRtl .tundra .dijitCalendarIncrease {
+ background-position: 0px top;
+}
+.dijitRtl .tundra .dijitDialogTitleBar .dijitDialogCloseIcon {
right: auto;
left: 5px;
}
-.dj_ie6 .dijitRtl .dijitDialogTitleBar .dijitDialogCloseIcon {
- background-image: url('images/tabClose.gif');
+.dijitRtl .tundra .dijitEditorIcon {
+ background-image: url(images/editor_rtl.gif);
}
-
-.dijitRtl .dijitDialogTitleBar {
- background: #fafafa url("images/titleBarBg.gif") repeat-x bottom left;
- padding: 4px 4px 2px 8px;
+.dijitRtl .tundra .dijitDisabled .dijitEditorIcon {
+ background-image: url(images/editorDisabled_rtl.gif);
}
-
-/* Menu */
-
-.dijitRtl .dijitMenuItem .dijitMenuItemIcon {
+.dijitRtl .tundra .dijitToolbar .dijitToolbarSeparator {
+ background-image: url(images/editor_rtl.gif);
+}
+.dijitRtl .tundra .dijitMenuItem .dijitMenuItemIcon {
padding-left: 3px;
padding-right: 0px;
}
-
-.dijitRtl .dijitMenuItem .dijitMenuExpandEnabled {
- background:url('images/arrowLeft.png') no-repeat bottom center;
+.dijitRtl .tundra .dijitMenuItem .dijitMenuExpand {
+ background-position: -7px 0px;
}
-.dj_ie6 .dijitRtl .dijitMenuItem .dijitMenuExpandEnabled {
- background-image:url('images/arrowLeft.gif');
+.dijitRtl .tundra .dijitTreeContainer .dijitTreeNode {
+ background-image : none;
}
-
-/* TitlePane */
-.dijitRtl .dijitTitlePane .dijitClosed .dijitArrowNode {
- background:url('images/arrowLeft.png') no-repeat center center;
-}
-.dj_ie6 .dijitRtl .dijitTitlePane .dijitClosed .dijitArrowNode {
- background-image:url('images/arrowLeft.gif');
+.dijitRtl .tundra .dijitTreeContainer .dijitTreeExpandoOpened {
+ background-image: url(images/treeExpand_minus_rtl.gif);
}
-
-/* Tree */
-.dijitRtl .dijitTreeContainer .dijitTreeNode {
- background-image : url('images/i_rtl.gif');
- background-position : top right;
- margin-left: auto;
- margin-right: 19px;
+.dijitRtl .tundra .dijitTreeContainer .dijitTreeExpandoClosed {
+ background-image: url(images/treeExpand_plus_rtl.gif);
}
-
-.dijitRtl .dijitTreeContainer .dijitTreeIsRoot {
- margin-left: auto;
- margin-right: 0;
- background-image: none;
+.dijitRtl .tundra .dijitTreeContainer .dijitTreeExpandoLeaf {
+ background-image: none;
}
-
-.dijitRtl .dijitTreeContainer .dijitTreeIsLast {
- background-image: url('images/i_half_rtl.gif');
+.dijitRtl .tundra .dijitTitlePane .dijitClosed .dijitArrowNode {
+ background-position: -7px 0px;
}
-
-.dijitRtl .dijitTreeContainer .dijitTreeContent {
- margin-left: auto;
- margin-right: 18px;
- padding-left: auto;
- padding-right: 1px;
+.dijitRtl .tundra .dijitTab {
+ -moz-box-orient:horizontal;
+ text-align: right;
}
-
-.dijitRtl .dijitTreeContainer .dijitTreeExpandoOpened {
- background-image: url('images/treeExpand_minus_rtl.gif');
+.dijitRtl .tundra .dijitTabInnerDiv {
+ padding:2px 9px 2px 8px;
}
-
-.dijitRtl .dijitTreeContainer .dijitTreeExpandoClosed {
- background-image: url('images/treeExpand_plus_rtl.gif');
-}
-
-.dijitRtl .dijitTreeContainer .dijitTreeExpandoLeaf {
- background-image: url('images/treeExpand_leaf_rtl.gif');
+.dijitRtl .tundra .tabStrip-disabled .tabStripButton .dijitTabInnerDiv {
+ padding-bottom: 3px;
+ padding-top: 1px;
}
-
-/* ToolTip */
-
-.dj_ie .dijitRtl .dijitTooltipLeft {
- margin-right: 0px;
- margin-left: 13px;
+.dijitRtl .tundra .tabStripButton .dijitTabInnerDiv {
+ padding: 3px 2px 4px 2px;
}
-
-.dj_ie .dijitRtl .dijitTooltipRight {
- margin-left: 26px;
- margin-right: -13px;
+.dijitRtl .tundra .dijitTabPaneWrapper {
+ #zoom: 1;
}
-
-.dj_ie .dijitRtl .dijitTooltipDialog {
- zoom:1 !important;
+.dj_ie-rtl .tundra .dijitTabContainerLeft-tabs {
+ margin-left: 1px !important;
}
-
-/* Calendar */
-
-.dijitRtl .dijitCalendarDecrease {
- background:url(images/arrowRight.png) no-repeat center center;
- margin-left:0;
- margin-right:2px;
+.dj_ie-rtl .tundra .dijitTabContainerRight-tabs {
+ margin-right: 1px !important;
+}
+.dijitRtl .tundra .dijitTabContainerLeft-tabs .dijitTab,
+.dijitRtl .tundra .dijitTabContainerRight-tabs .dijitTab {
+ margin-left:0px;
}
-
-.dijitRtl .dijitCalendarIncrease {
- background:url(images/arrowLeft.png) no-repeat center center;
- margin-right:0;
- margin-left:4px;
-}
-.dj_ie6 .dijitRtl .dijitCalendarIncrease {
- background-image:url(images/arrowLeft.gif);
-}
-.dj_ie6 .dijitRtl .dijitCalendarDecrease {
- background-image:url(images/arrowRight.gif);
+.dj_ie-rtl .tundra .dijitTab .dijitTabInnerDiv {
+
+ width : 0.1% !important;
}
-
-/* Slider */
-
-.dijitRtl .dijitHorizontalSliderProgressBar {
- background: #c0c2c5 url("images/sliderFull.png") repeat-x top right;
-}
-
-.dijitRtl .dijitVerticalSliderProgressBar {
- background: #c0c2c5 url("images/sliderFullVertical.png") repeat-y bottom right;
+.dijitRtl .tundra .dijitSliderProgressBarH,
+.dijitRtl .tundra .dijitSliderRemainingBarH,
+.dijitRtl .tundra .dijitSliderLeftBumper,
+.dijitRtl .tundra .dijitSliderRightBumper,
+.dijitRtl .tundra .dijitSliderTopBumper {
+ background-position: top right;
}
-
-.dijitRtl .dijitVerticalSliderRemainingBar {
- background: #dcdcdc url("images/sliderEmptyVertical.png") repeat-y bottom right;
+.dijitRtl .tundra .dijitSliderProgressBarV,
+.dijitRtl .tundra .dijitSliderRemainingBarV,
+.dijitRtl .tundra .dijitSliderBottomBumper {
+ background-position: bottom right;
}
-
-.dijitRtl .dijitHorizontalSliderRemainingBar {
- background: #dcdcdc url("images/sliderEmpty.png") repeat-x top right;
-}
-
-.dijitRtl .dijitHorizontalSliderLeftBumper {
+.dijitRtl .tundra .dijitSliderLeftBumper {
border-left-width: 0px;
border-right-width: 1px;
- background: #c0c2c5 url("images/sliderFull.png") repeat-x top right;
}
-
-.dijitRtl .dijitHorizontalSliderRightBumper {
- background: #dcdcdc url("images/sliderEmpty.png") repeat-x top right;
+.dijitRtl .tundra .dijitSliderRightBumper {
border-left-width: 1px;
border-right-width: 0px;
}
-
-.dijitRtl .dijitVerticalSliderBottomBumper {
- background: #c0c2c5 url("images/sliderFullVertical.png") repeat-y bottom right;
-}
-
-.dijitRtl .dijitVerticalSliderTopBumper {
- background: #dcdcdc url("images/sliderEmptyVertical.png") repeat-y top right;
-}
-
-/* TabContainer */
-
-.dijitRtl .dijitTab {
- margin-right:0;
- margin-left:5px; /* space between one tab and the next in top/bottom mode */
+.dijitRtl .tundra .dijitSliderIncrementIconH {
+ background-position: -7px 0px;
}
-
-.dijitRtl .dijitTab .dijitTabInnerDiv {
- border-left:none;
- border-right:1px solid #fff;
-}
-
-.dijitRtl .dijitTab .dijitClosable {
- padding:6px 10px 4px 20px;
-}
-
-.dijitRtl .dijitTab .closeImage {
- position:static;
- padding: 0px 12px 0px 0px;
-}
-
-.dj_gecko .dijitTab .closeImage {
- position:relative;
- float:none;
- padding:0;
+.dijitRtl .tundra .dijitSliderDecrementIconH {
+ background-position: -14px 0px;
}
-
-.dijitRtl .dijitTab .dijitClosable .closeImage {
- right:auto;
- left:3px;
- background: url("images/tabClose.png") no-repeat left top;
-}
-
-.dj_ie .dijitRtl .dijitTab .dijitClosable .closeImage {
- width:12px !important;
-}
-
-.dijitRtl .dijitAlignLeft .dijitTab,
-.dijitRtl .dijitAlignRight .dijitTab {
- margin-left:0px;
-}
-
-.dijitRtl .dijitAlignBottom .dijitTab .dijitClosable .closeImage {
- right:auto;
- left:3px;
+.dijitRtl .tundra .dijitComboBox .dijitButtonNode,
+.dijitRtl .tundra .dijitSpinner .dijitButtonNode {
+
+ border-left-width: 0px;
+ border-right-width: 1px;
}
-
-.dijitRtl .dijitAlignRight .dijitTab .dijitTabInnerDiv {
- padding-left:10px;
- padding-right:20px;
-}
-
-.dijitRtl .dijitAlignLeft .dijitTab .dijitTabInnerDiv {
- padding-left:20px;
- padding-right:10px;
-}
-
-.dijitRtl .dijitAlignRight .dijitTab .dijitClosable .closeImage {
- left:auto;
- right:3px;
-}
-
-.dijitRtl .dijitAlignLeft .dijitTab .dijitClosable .closeImage {
- right:auto;
- left:3px;
-}
diff --git a/js/dojo/dojo/AdapterRegistry.js b/js/dojo/dojo/AdapterRegistry.js
--- a/js/dojo/dojo/AdapterRegistry.js
+++ b/js/dojo/dojo/AdapterRegistry.js
@@ -1,99 +1,39 @@
-if(!dojo._hasResource["dojo.AdapterRegistry"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.AdapterRegistry"] = true;
-dojo.provide("dojo.AdapterRegistry");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.AdapterRegistry = function(/*Boolean?*/ returnWrappers){
- // summary:
- // A registry to make contextual calling/searching easier.
- // description:
- // Objects of this class keep list of arrays in the form [name, check,
- // wrap, directReturn] that are used to determine what the contextual
- // result of a set of checked arguments is. All check/wrap functions
- // in this registry should be of the same arity.
- // example:
- // | // create a new registry
- // | var reg = new dojo.AdapterRegistry();
- // | reg.register("handleString",
- // | dojo.isString,
- // | function(str){
- // | // do something with the string here
- // | }
- // | );
- // | reg.register("handleArr",
- // | dojo.isArray,
- // | function(arr){
- // | // do something with the array here
- // | }
- // | );
- // |
- // | // now we can pass reg.match() *either* an array or a string and
- // | // the value we pass will get handled by the right function
- // | reg.match("someValue"); // will call the first function
- // | reg.match(["someValue"]); // will call the second
-
- this.pairs = [];
- this.returnWrappers = returnWrappers || false; // Boolean
-}
-dojo.extend(dojo.AdapterRegistry, {
- register: function(/*String*/ name, /*Function*/ check, /*Function*/ wrap, /*Boolean?*/ directReturn, /*Boolean?*/ override){
- // summary:
- // register a check function to determine if the wrap function or
- // object gets selected
- // name:
- // a way to identify this matcher.
- // check:
- // a function that arguments are passed to from the adapter's
- // match() function. The check function should return true if the
- // given arguments are appropriate for the wrap function.
- // directReturn:
- // If directReturn is true, the value passed in for wrap will be
- // returned instead of being called. Alternately, the
- // AdapterRegistry can be set globally to "return not call" using
- // the returnWrappers property. Either way, this behavior allows
- // the registry to act as a "search" function instead of a
- // function interception library.
- // override:
- // If override is given and true, the check function will be given
- // highest priority. Otherwise, it will be the lowest priority
- // adapter.
- this.pairs[((override) ? "unshift" : "push")]([name, check, wrap, directReturn]);
- },
-
- match: function(/* ... */){
- // summary:
- // Find an adapter for the given arguments. If no suitable adapter
- // is found, throws an exception. match() accepts any number of
- // arguments, all of which are passed to all matching functions
- // from the registered pairs.
- for(var i = 0; i < this.pairs.length; i++){
- var pair = this.pairs[i];
- if(pair[1].apply(this, arguments)){
- if((pair[3])||(this.returnWrappers)){
- return pair[2];
- }else{
- return pair[2].apply(this, arguments);
- }
- }
- }
- throw new Error("No match found");
- },
-
- unregister: function(name){
- // summary: Remove a named adapter from the registry
-
- // FIXME: this is kind of a dumb way to handle this. On a large
- // registry this will be slow-ish and we can use the name as a lookup
- // should we choose to trade memory for speed.
- for(var i = 0; i < this.pairs.length; i++){
- var pair = this.pairs[i];
- if(pair[0] == name){
- this.pairs.splice(i, 1);
- return true;
- }
- }
- return false;
- }
-});
-
+if(!dojo._hasResource["dojo.AdapterRegistry"]){
+dojo._hasResource["dojo.AdapterRegistry"]=true;
+dojo.provide("dojo.AdapterRegistry");
+dojo.AdapterRegistry=function(_1){
+this.pairs=[];
+this.returnWrappers=_1||false;
+};
+dojo.extend(dojo.AdapterRegistry,{register:function(_2,_3,_4,_5,_6){
+this.pairs[((_6)?"unshift":"push")]([_2,_3,_4,_5]);
+},match:function(){
+for(var i=0;i<this.pairs.length;i++){
+var _7=this.pairs[i];
+if(_7[1].apply(this,arguments)){
+if((_7[3])||(this.returnWrappers)){
+return _7[2];
+}else{
+return _7[2].apply(this,arguments);
}
+}
+}
+throw new Error("No match found");
+},unregister:function(_8){
+for(var i=0;i<this.pairs.length;i++){
+var _9=this.pairs[i];
+if(_9[0]==_8){
+this.pairs.splice(i,1);
+return true;
+}
+}
+return false;
+}});
+}
diff --git a/js/dojo/dojo/DeferredList.js b/js/dojo/dojo/DeferredList.js
--- a/js/dojo/dojo/DeferredList.js
+++ b/js/dojo/dojo/DeferredList.js
@@ -1,91 +1,69 @@
-if(!dojo._hasResource["dojo.DeferredList"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.DeferredList"] = true;
-dojo.provide("dojo.DeferredList");
-dojo.declare("dojo.DeferredList", dojo.Deferred, {
- constructor: function(/*Array*/ list, /*Boolean?*/ fireOnOneCallback, /*Boolean?*/ fireOnOneErrback, /*Boolean?*/ consumeErrors, /*Function?*/ canceller){
- // summary:
- // Provides event handling for a group of Deferred objects.
- // description:
- // DeferredList takes an array of existing deferreds and returns a new deferred of its own
- // this new deferred will typically have its callback fired when all of the deferreds in
- // the given list have fired their own deferreds. The parameters `fireOnOneCallback` and
- // fireOnOneErrback, will fire before all the deferreds as appropriate
- //
- // list:
- // The list of deferreds to be synchronizied with this DeferredList
- // fireOnOneCallback:
- // Will cause the DeferredLists callback to be fired as soon as any
- // of the deferreds in its list have been fired instead of waiting until
- // the entire list has finished
- // fireonOneErrback:
- // Will cause the errback to fire upon any of the deferreds errback
- // canceller:
- // A deferred canceller function, see dojo.Deferred
- this.list = list;
- this.resultList = new Array(this.list.length);
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // Deferred init
- this.chain = [];
- this.id = this._nextId();
- this.fired = -1;
- this.paused = 0;
- this.results = [null, null];
- this.canceller = canceller;
- this.silentlyCancelled = false;
-
- if (this.list.length === 0 && !fireOnOneCallback) {
- this.callback(this.resultList);
- }
-
- this.finishedCount = 0;
- this.fireOnOneCallback = fireOnOneCallback;
- this.fireOnOneErrback = fireOnOneErrback;
- this.consumeErrors = consumeErrors;
-
- var index = 0;
- dojo.forEach(this.list, function(d, index) {
- d.addCallback(this, function(r) { this._cbDeferred(index, true, r); return r; });
- d.addErrback(this, function(r) { this._cbDeferred(index, false, r); return r; });
- index++;
- },this);
- },
-
- _cbDeferred: function (index, succeeded, result) {
- // summary:
- // The DeferredLists' callback handler
-
- this.resultList[index] = [succeeded, result]; this.finishedCount += 1;
- if (this.fired !== 0) {
- if (succeeded && this.fireOnOneCallback) {
- this.callback([index, result]);
- } else if (!succeeded && this.fireOnOneErrback) {
- this.errback(result);
- } else if (this.finishedCount == this.list.length) {
- this.callback(this.resultList);
- }
- }
- if (!succeeded && this.consumeErrors) {
- result = null;
- }
- return result;
- },
-
- gatherResults: function (deferredList) {
- // summary:
- // Gathers the results of the deferreds for packaging
- // as the parameters to the Deferred Lists' callback
-
- var d = new dojo.DeferedList(deferredList, false, true, false);
- d.addCallback(function (results) {
- var ret = [];
- for (var i = 0; i < results.length; i++) {
- ret.push(results[i][1]);
- }
- return ret;
- });
- return d;
- }
+if(!dojo._hasResource["dojo.DeferredList"]){
+dojo._hasResource["dojo.DeferredList"]=true;
+dojo.provide("dojo.DeferredList");
+dojo.declare("dojo.DeferredList",dojo.Deferred,{constructor:function(_1,_2,_3,_4,_5){
+this.list=_1;
+this.resultList=new Array(this.list.length);
+this.chain=[];
+this.id=this._nextId();
+this.fired=-1;
+this.paused=0;
+this.results=[null,null];
+this.canceller=_5;
+this.silentlyCancelled=false;
+if(this.list.length===0&&!_2){
+this.callback(this.resultList);
+}
+this.finishedCount=0;
+this.fireOnOneCallback=_2;
+this.fireOnOneErrback=_3;
+this.consumeErrors=_4;
+dojo.forEach(this.list,function(d,_6){
+d.addCallback(this,function(r){
+this._cbDeferred(_6,true,r);
+return r;
+});
+d.addErrback(this,function(r){
+this._cbDeferred(_6,false,r);
+return r;
});
-
+},this);
+},_cbDeferred:function(_7,_8,_9){
+this.resultList[_7]=[_8,_9];
+this.finishedCount+=1;
+if(this.fired!==0){
+if(_8&&this.fireOnOneCallback){
+this.callback([_7,_9]);
+}else{
+if(!_8&&this.fireOnOneErrback){
+this.errback(_9);
+}else{
+if(this.finishedCount==this.list.length){
+this.callback(this.resultList);
+}
+}
+}
}
+if(!_8&&this.consumeErrors){
+_9=null;
+}
+return _9;
+},gatherResults:function(_a){
+var d=new dojo.DeferredList(_a,false,true,false);
+d.addCallback(function(_b){
+var _c=[];
+dojo.forEach(_b,function(_d){
+_c.push(_d[1]);
+});
+return _c;
+});
+return d;
+}});
+}
diff --git a/js/dojo/dojo/LICENSE b/js/dojo/dojo/LICENSE
--- a/js/dojo/dojo/LICENSE
+++ b/js/dojo/dojo/LICENSE
@@ -1,195 +1,195 @@
-Dojo is availble under *either* the terms of the modified BSD license *or* the
+Dojo is available under *either* the terms of the modified BSD license *or* the
Academic Free License version 2.1. As a recipient of Dojo, you may choose which
license to receive this code under (except as noted in per-module LICENSE
files). Some modules may not be the copyright of the Dojo Foundation. These
modules contain explicit declarations of copyright in both the LICENSE files in
the directories in which they reside and in the code itself. No external
contributions are allowed under licenses which are fundamentally incompatible
with the AFL or BSD licenses that Dojo is distributed under.
The text of the AFL and BSD licenses is reproduced below.
-------------------------------------------------------------------------------
The "New" BSD License:
**********************
-Copyright (c) 2005-2007, The Dojo Foundation
+Copyright (c) 2005-2009, The Dojo Foundation
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the Dojo Foundation nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-------------------------------------------------------------------------------
The Academic Free License, v. 2.1:
**********************************
This Academic Free License (the "License") applies to any original work of
authorship (the "Original Work") whose owner (the "Licensor") has placed the
following notice immediately following the copyright notice for the Original
Work:
Licensed under the Academic Free License version 2.1
1) Grant of Copyright License. Licensor hereby grants You a world-wide,
royalty-free, non-exclusive, perpetual, sublicenseable license to do the
following:
a) to reproduce the Original Work in copies;
b) to prepare derivative works ("Derivative Works") based upon the Original
Work;
c) to distribute copies of the Original Work and Derivative Works to the
public;
d) to perform the Original Work publicly; and
e) to display the Original Work publicly.
2) Grant of Patent License. Licensor hereby grants You a world-wide,
royalty-free, non-exclusive, perpetual, sublicenseable license, under patent
claims owned or controlled by the Licensor that are embodied in the Original
Work as furnished by the Licensor, to make, use, sell and offer for sale the
Original Work and Derivative Works.
3) Grant of Source Code License. The term "Source Code" means the preferred
form of the Original Work for making modifications to it and all available
documentation describing how to modify the Original Work. Licensor hereby
agrees to provide a machine-readable copy of the Source Code of the Original
Work along with each copy of the Original Work that Licensor distributes.
Licensor reserves the right to satisfy this obligation by placing a
machine-readable copy of the Source Code in an information repository
reasonably calculated to permit inexpensive and convenient access by You for as
long as Licensor continues to distribute the Original Work, and by publishing
the address of that information repository in a notice immediately following
the copyright notice that applies to the Original Work.
4) Exclusions From License Grant. Neither the names of Licensor, nor the names
of any contributors to the Original Work, nor any of their trademarks or
service marks, may be used to endorse or promote products derived from this
Original Work without express prior written permission of the Licensor. Nothing
in this License shall be deemed to grant any rights to trademarks, copyrights,
patents, trade secrets or any other intellectual property of Licensor except as
expressly stated herein. No patent license is granted to make, use, sell or
offer to sell embodiments of any patent claims other than the licensed claims
defined in Section 2. No right is granted to the trademarks of Licensor even if
such marks are included in the Original Work. Nothing in this License shall be
interpreted to prohibit Licensor from licensing under different terms from this
License any Original Work that Licensor otherwise would have a right to
license.
5) This section intentionally omitted.
6) Attribution Rights. You must retain, in the Source Code of any Derivative
Works that You create, all copyright, patent or trademark notices from the
Source Code of the Original Work, as well as any notices of licensing and any
descriptive text identified therein as an "Attribution Notice." You must cause
the Source Code for any Derivative Works that You create to carry a prominent
Attribution Notice reasonably calculated to inform recipients that You have
modified the Original Work.
7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that
the copyright in and to the Original Work and the patent rights granted herein
by Licensor are owned by the Licensor or are sublicensed to You under the terms
of this License with the permission of the contributor(s) of those copyrights
and patent rights. Except as expressly stated in the immediately proceeding
sentence, the Original Work is provided under this License on an "AS IS" BASIS
and WITHOUT WARRANTY, either express or implied, including, without limitation,
the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU.
This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No
license to Original Work is granted hereunder except under this disclaimer.
8) Limitation of Liability. Under no circumstances and under no legal theory,
whether in tort (including negligence), contract, or otherwise, shall the
Licensor be liable to any person for any direct, indirect, special, incidental,
or consequential damages of any character arising as a result of this License
or the use of the Original Work including, without limitation, damages for loss
of goodwill, work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses. This limitation of liability shall not
apply to liability for death or personal injury resulting from Licensor's
negligence to the extent applicable law prohibits such limitation. Some
jurisdictions do not allow the exclusion or limitation of incidental or
consequential damages, so this exclusion and limitation may not apply to You.
9) Acceptance and Termination. If You distribute copies of the Original Work or
a Derivative Work, You must make a reasonable effort under the circumstances to
obtain the express assent of recipients to the terms of this License. Nothing
else but this License (or another written agreement between Licensor and You)
grants You permission to create Derivative Works based upon the Original Work
or to exercise any of the rights granted in Section 1 herein, and any attempt
to do so except under the terms of this License (or another written agreement
between Licensor and You) is expressly prohibited by U.S. copyright law, the
equivalent laws of other countries, and by international treaty. Therefore, by
exercising any of the rights granted to You in Section 1 herein, You indicate
Your acceptance of this License and all of its terms and conditions.
10) Termination for Patent Action. This License shall terminate automatically
and You may no longer exercise any of the rights granted to You by this License
as of the date You commence an action, including a cross-claim or counterclaim,
against Licensor or any licensee alleging that the Original Work infringes a
patent. This termination provision shall not apply for an action alleging
patent infringement by combinations of the Original Work with other software or
hardware.
11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this
License may be brought only in the courts of a jurisdiction wherein the
Licensor resides or in which Licensor conducts its primary business, and under
the laws of that jurisdiction excluding its conflict-of-law provisions. The
application of the United Nations Convention on Contracts for the International
Sale of Goods is expressly excluded. Any use of the Original Work outside the
scope of this License or after its termination shall be subject to the
requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et
seq., the equivalent laws of other countries, and international treaty. This
section shall survive the termination of this License.
12) Attorneys Fees. In any action to enforce the terms of this License or
seeking damages relating thereto, the prevailing party shall be entitled to
recover its costs and expenses, including, without limitation, reasonable
attorneys' fees and costs incurred in connection with such action, including
any appeal of such action. This section shall survive the termination of this
License.
13) Miscellaneous. This License represents the complete agreement concerning
the subject matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent necessary to
make it enforceable.
14) Definition of "You" in This License. "You" throughout this License, whether
in upper or lower case, means an individual or a legal entity exercising rights
under, and complying with all of the terms of, this License. For legal
entities, "You" includes any entity that controls, is controlled by, or is
under common control with you. For purposes of this definition, "control" means
(i) the power, direct or indirect, to cause the direction or management of such
entity, whether by contract or otherwise, or (ii) ownership of fifty percent
(50%) or more of the outstanding shares, or (iii) beneficial ownership of such
entity.
15) Right to Use. You may use the Original Work in all ways not otherwise
restricted or conditioned by this License or by law, and Licensor promises not
to interfere with or be responsible for such uses by You.
This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved.
Permission is hereby granted to copy and distribute this license without
modification. This license may not be modified without the express written
permission of its copyright owner.
diff --git a/js/dojo/dojo/NodeList-fx.js b/js/dojo/dojo/NodeList-fx.js
--- a/js/dojo/dojo/NodeList-fx.js
+++ b/js/dojo/dojo/NodeList-fx.js
@@ -1,89 +1,40 @@
-if(!dojo._hasResource["dojo.NodeList-fx"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.NodeList-fx"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo.NodeList-fx"]){
+dojo._hasResource["dojo.NodeList-fx"]=true;
dojo.provide("dojo.NodeList-fx");
dojo.require("dojo.fx");
-
-dojo.extend(dojo.NodeList, {
- _anim: function(obj, method, args){
- var anims = [];
- args = args||{};
- this.forEach(function(item){
- var tmpArgs = { node: item };
- dojo.mixin(tmpArgs, args);
- anims.push(obj[method](tmpArgs));
- });
- return dojo.fx.combine(anims); // dojo._Animation
- },
-
- wipeIn: function(args){
- // summary:
- // wipe in all elements of this NodeList. Returns an instance of dojo._Animation
- // example:
- // Fade in all tables with class "blah":
- // | dojo.query("table.blah").wipeIn().play();
- return this._anim(dojo.fx, "wipeIn", args); // dojo._Animation
- },
-
- wipeOut: function(args){
- // summary:
- // wipe out all elements of this NodeList. Returns an instance of dojo._Animation
- // example:
- // Wipe out all tables with class "blah":
- // | dojo.query("table.blah").wipeOut().play();
- return this._anim(dojo.fx, "wipeOut", args); // dojo._Animation
- },
-
- slideTo: function(args){
- // summary:
- // slide all elements of the node list to the specified place.
- // Returns an instance of dojo._Animation
- // example:
- // | Move all tables with class "blah" to 300/300:
- // | dojo.query("table.blah").slideTo({
- // | left: 40,
- // | top: 50
- // | }).play();
- return this._anim(dojo.fx, "slideTo", args); // dojo._Animation
- },
-
-
- fadeIn: function(args){
- // summary:
- // fade in all elements of this NodeList. Returns an instance of dojo._Animation
- // example:
- // Fade in all tables with class "blah":
- // | dojo.query("table.blah").fadeIn().play();
- return this._anim(dojo, "fadeIn", args); // dojo._Animation
- },
-
- fadeOut: function(args){
- // summary:
- // fade out all elements of this NodeList. Returns an instance of dojo._Animation
- // example:
- // Fade out all elements with class "zork":
- // | dojo.query(".zork").fadeOut().play();
- // example:
- // Fade them on a delay and do something at the end:
- // | var fo = dojo.query(".zork").fadeOut();
- // | dojo.connect(fo, "onEnd", function(){ /*...*/ });
- // | fo.play();
- return this._anim(dojo, "fadeOut", args); // dojo._Animation
- },
-
- animateProperty: function(args){
- // summary:
- // see dojo.animateProperty(). Animate all elements of this
- // NodeList across the properties specified.
- // example:
- // | dojo.query(".zork").animateProperty({
- // | duration: 500,
- // | properties: {
- // | color: { start: "black", end: "white" },
- // | left: { end: 300 }
- // | }
- // | }).play();
- return this._anim(dojo, "animateProperty", args); // dojo._Animation
- }
-});
-
+dojo.extend(dojo.NodeList,{_anim:function(_1,_2,_3){
+_3=_3||{};
+return dojo.fx.combine(this.map(function(_4){
+var _5={node:_4};
+dojo.mixin(_5,_3);
+return _1[_2](_5);
+}));
+},wipeIn:function(_6){
+return this._anim(dojo.fx,"wipeIn",_6);
+},wipeOut:function(_7){
+return this._anim(dojo.fx,"wipeOut",_7);
+},slideTo:function(_8){
+return this._anim(dojo.fx,"slideTo",_8);
+},fadeIn:function(_9){
+return this._anim(dojo,"fadeIn",_9);
+},fadeOut:function(_a){
+return this._anim(dojo,"fadeOut",_a);
+},animateProperty:function(_b){
+return this._anim(dojo,"animateProperty",_b);
+},anim:function(_c,_d,_e,_f,_10){
+var _11=dojo.fx.combine(this.map(function(_12){
+return dojo.animateProperty({node:_12,properties:_c,duration:_d||350,easing:_e});
+}));
+if(_f){
+dojo.connect(_11,"onEnd",_f);
}
+return _11.play(_10||0);
+}});
+}
diff --git a/js/dojo/dojo/OpenAjax.js b/js/dojo/dojo/OpenAjax.js
--- a/js/dojo/dojo/OpenAjax.js
+++ b/js/dojo/dojo/OpenAjax.js
@@ -1,191 +1,155 @@
-/*******************************************************************************
- * OpenAjax.js
- *
- * Reference implementation of the OpenAjax Hub, as specified by OpenAjax Alliance.
- * Specification is under development at:
- *
- * http://www.openajax.org/member/wiki/OpenAjax_Hub_Specification
- *
- * Copyright 2006-2007 OpenAjax Alliance
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless
- * required by applicable law or agreed to in writing, software distributed
- * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- *
- ******************************************************************************/
-
-// prevent re-definition of the OpenAjax object
-if(!window["OpenAjax"]){
- OpenAjax = new function(){
- var t = true;
- var f = false;
- var g = window;
- var libs;
- var ooh = "org.openajax.hub.";
-
- var h = {};
- this.hub = h;
- h.implementer = "http://openajax.org";
- h.implVersion = "0.6";
- h.specVersion = "0.6";
- h.implExtraData = {};
- var libs = {};
- h.libraries = libs;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- h.registerLibrary = function(prefix, nsURL, version, extra){
- libs[prefix] = {
- prefix: prefix,
- namespaceURI: nsURL,
- version: version,
- extraData: extra
- };
- this.publish(ooh+"registerLibrary", libs[prefix]);
- }
- h.unregisterLibrary = function(prefix){
- this.publish(ooh+"unregisterLibrary", libs[prefix]);
- delete libs[prefix];
- }
-
- h._subscriptions = { c:{}, s:[] };
- h._cleanup = [];
- h._subIndex = 0;
- h._pubDepth = 0;
-
- h.subscribe = function(name, callback, scope, subscriberData, filter){
- if(!scope){
- scope = window;
- }
- var handle = name + "." + this._subIndex;
- var sub = { scope: scope, cb: callback, fcb: filter, data: subscriberData, sid: this._subIndex++, hdl: handle };
- var path = name.split(".");
- this._subscribe(this._subscriptions, path, 0, sub);
- return handle;
- }
-
- h.publish = function(name, message){
- var path = name.split(".");
- this._pubDepth++;
- this._publish(this._subscriptions, path, 0, name, message);
- this._pubDepth--;
- if((this._cleanup.length > 0) && (this._pubDepth == 0)){
- for(var i = 0; i < this._cleanup.length; i++){
- this.unsubscribe(this._cleanup[i].hdl);
- }
- delete(this._cleanup);
- this._cleanup = [];
- }
- }
- h.unsubscribe = function(sub){
- var path = sub.split(".");
- var sid = path.pop();
- this._unsubscribe(this._subscriptions, path, 0, sid);
- }
-
- h._subscribe = function(tree, path, index, sub){
- var token = path[index];
- if(index == path.length){
- tree.s.push(sub);
- }else{
- if(typeof tree.c == "undefined"){
- tree.c = {};
- }
- if(typeof tree.c[token] == "undefined"){
- tree.c[token] = { c: {}, s: [] };
- this._subscribe(tree.c[token], path, index + 1, sub);
- }else{
- this._subscribe( tree.c[token], path, index + 1, sub);
- }
- }
- }
-
- h._publish = function(tree, path, index, name, msg){
- if(typeof tree != "undefined"){
- var node;
- if(index == path.length) {
- node = tree;
- }else{
- this._publish(tree.c[path[index]], path, index + 1, name, msg);
- this._publish(tree.c["*"], path, index + 1, name, msg);
- node = tree.c["**"];
- }
- if(typeof node != "undefined"){
- var callbacks = node.s;
- var max = callbacks.length;
- for(var i = 0; i < max; i++){
- if(callbacks[i].cb){
- var sc = callbacks[i].scope;
- var cb = callbacks[i].cb;
- var fcb = callbacks[i].fcb;
- var d = callbacks[i].data;
- if(typeof cb == "string"){
- // get a function object
- cb = sc[cb];
- }
- if(typeof fcb == "string"){
- // get a function object
- fcb = sc[fcb];
- }
- if((!fcb) ||
- (fcb.call(sc, name, msg, d))) {
- cb.call(sc, name, msg, d);
- }
- }
- }
- }
- }
- }
-
- h._unsubscribe = function(tree, path, index, sid) {
- if(typeof tree != "undefined") {
- if(index < path.length) {
- var childNode = tree.c[path[index]];
- this._unsubscribe(childNode, path, index + 1, sid);
- if(childNode.s.length == 0) {
- for(var x in childNode.c)
- return;
- delete tree.c[path[index]];
- }
- return;
- }
- else {
- var callbacks = tree.s;
- var max = callbacks.length;
- for(var i = 0; i < max; i++)
- if(sid == callbacks[i].sid) {
- if(this._pubDepth > 0) {
- callbacks[i].cb = null;
- this._cleanup.push(callbacks[i]);
- }
- else
- callbacks.splice(i, 1);
- return;
- }
- }
- }
- }
- // The following function is provided for automatic testing purposes.
- // It is not expected to be deployed in run-time OpenAjax Hub implementations.
- h.reinit = function()
- {
- for (var lib in OpenAjax.hub.libraries) {
- delete OpenAjax.hub.libraries[lib];
- }
- OpenAjax.hub.registerLibrary("OpenAjax", "http://openajax.org/hub", "0.6", {});
-
- delete OpenAjax._subscriptions;
- OpenAjax._subscriptions = {c:{},s:[]};
- delete OpenAjax._cleanup;
- OpenAjax._cleanup = [];
- OpenAjax._subIndex = 0;
- OpenAjax._pubDepth = 0;
- }
- };
- // Register the OpenAjax Hub itself as a library.
- OpenAjax.hub.registerLibrary("OpenAjax", "http://openajax.org/hub", "0.6", {});
-
+if(!window["OpenAjax"]){
+OpenAjax=new function(){
+var t=true;
+var f=false;
+var g=window;
+var _1;
+var _2="org.openajax.hub.";
+var h={};
+this.hub=h;
+h.implementer="http://openajax.org";
+h.implVersion="0.6";
+h.specVersion="0.6";
+h.implExtraData={};
+var _1={};
+h.libraries=_1;
+h.registerLibrary=function(_3,_4,_5,_6){
+_1[_3]={prefix:_3,namespaceURI:_4,version:_5,extraData:_6};
+this.publish(_2+"registerLibrary",_1[_3]);
+};
+h.unregisterLibrary=function(_7){
+this.publish(_2+"unregisterLibrary",_1[_7]);
+delete _1[_7];
+};
+h._subscriptions={c:{},s:[]};
+h._cleanup=[];
+h._subIndex=0;
+h._pubDepth=0;
+h.subscribe=function(_8,_9,_a,_b,_c){
+if(!_a){
+_a=window;
+}
+var _d=_8+"."+this._subIndex;
+var _e={scope:_a,cb:_9,fcb:_c,data:_b,sid:this._subIndex++,hdl:_d};
+var _f=_8.split(".");
+this._subscribe(this._subscriptions,_f,0,_e);
+return _d;
+};
+h.publish=function(_10,_11){
+var _12=_10.split(".");
+this._pubDepth++;
+this._publish(this._subscriptions,_12,0,_10,_11);
+this._pubDepth--;
+if((this._cleanup.length>0)&&(this._pubDepth==0)){
+for(var i=0;i<this._cleanup.length;i++){
+this.unsubscribe(this._cleanup[i].hdl);
+}
+delete (this._cleanup);
+this._cleanup=[];
+}
+};
+h.unsubscribe=function(sub){
+var _13=sub.split(".");
+var sid=_13.pop();
+this._unsubscribe(this._subscriptions,_13,0,sid);
+};
+h._subscribe=function(_14,_15,_16,sub){
+var _17=_15[_16];
+if(_16==_15.length){
+_14.s.push(sub);
+}else{
+if(typeof _14.c=="undefined"){
+_14.c={};
+}
+if(typeof _14.c[_17]=="undefined"){
+_14.c[_17]={c:{},s:[]};
+this._subscribe(_14.c[_17],_15,_16+1,sub);
+}else{
+this._subscribe(_14.c[_17],_15,_16+1,sub);
+}
}
+};
+h._publish=function(_18,_19,_1a,_1b,msg){
+if(typeof _18!="undefined"){
+var _1c;
+if(_1a==_19.length){
+_1c=_18;
+}else{
+this._publish(_18.c[_19[_1a]],_19,_1a+1,_1b,msg);
+this._publish(_18.c["*"],_19,_1a+1,_1b,msg);
+_1c=_18.c["**"];
+}
+if(typeof _1c!="undefined"){
+var _1d=_1c.s;
+var max=_1d.length;
+for(var i=0;i<max;i++){
+if(_1d[i].cb){
+var sc=_1d[i].scope;
+var cb=_1d[i].cb;
+var fcb=_1d[i].fcb;
+var d=_1d[i].data;
+if(typeof cb=="string"){
+cb=sc[cb];
+}
+if(typeof fcb=="string"){
+fcb=sc[fcb];
+}
+if((!fcb)||(fcb.call(sc,_1b,msg,d))){
+cb.call(sc,_1b,msg,d);
+}
+}
+}
+}
+}
+};
+h._unsubscribe=function(_1e,_1f,_20,sid){
+if(typeof _1e!="undefined"){
+if(_20<_1f.length){
+var _21=_1e.c[_1f[_20]];
+this._unsubscribe(_21,_1f,_20+1,sid);
+if(_21.s.length==0){
+for(var x in _21.c){
+return;
+}
+delete _1e.c[_1f[_20]];
+}
+return;
+}else{
+var _22=_1e.s;
+var max=_22.length;
+for(var i=0;i<max;i++){
+if(sid==_22[i].sid){
+if(this._pubDepth>0){
+_22[i].cb=null;
+this._cleanup.push(_22[i]);
+}else{
+_22.splice(i,1);
+}
+return;
+}
+}
+}
+}
+};
+h.reinit=function(){
+for(var lib in OpenAjax.hub.libraries){
+delete OpenAjax.hub.libraries[lib];
+}
+OpenAjax.hub.registerLibrary("OpenAjax","http://openajax.org/hub","0.6",{});
+delete OpenAjax._subscriptions;
+OpenAjax._subscriptions={c:{},s:[]};
+delete OpenAjax._cleanup;
+OpenAjax._cleanup=[];
+OpenAjax._subIndex=0;
+OpenAjax._pubDepth=0;
+};
+};
+OpenAjax.hub.registerLibrary("OpenAjax","http://openajax.org/hub","0.6",{});
+}
diff --git a/js/dojo/dojo/_base.js b/js/dojo/dojo/_base.js
--- a/js/dojo/dojo/_base.js
+++ b/js/dojo/dojo/_base.js
@@ -1,27 +1,19 @@
-if(!dojo._hasResource["dojo._base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo._base"]){
+dojo._hasResource["dojo._base"]=true;
dojo.provide("dojo._base");
dojo.require("dojo._base.lang");
dojo.require("dojo._base.declare");
dojo.require("dojo._base.connect");
dojo.require("dojo._base.Deferred");
dojo.require("dojo._base.json");
dojo.require("dojo._base.array");
dojo.require("dojo._base.Color");
-dojo.requireIf(dojo.isBrowser, "dojo._base.window");
-dojo.requireIf(dojo.isBrowser, "dojo._base.event");
-dojo.requireIf(dojo.isBrowser, "dojo._base.html");
-dojo.requireIf(dojo.isBrowser, "dojo._base.NodeList");
-dojo.requireIf(dojo.isBrowser, "dojo._base.query");
-dojo.requireIf(dojo.isBrowser, "dojo._base.xhr");
-dojo.requireIf(dojo.isBrowser, "dojo._base.fx");
-
-(function(){
- if(djConfig.require){
- for(var x=0; x<djConfig.require.length; x++){
- dojo["require"](djConfig.require[x]);
- }
- }
-})();
-
+dojo.requireIf(dojo.isBrowser,"dojo._base.browser");
}
diff --git a/js/dojo/dojo/_base/Color.js b/js/dojo/dojo/_base/Color.js
--- a/js/dojo/dojo/_base/Color.js
+++ b/js/dojo/dojo/_base/Color.js
@@ -1,156 +1,102 @@
-if(!dojo._hasResource["dojo._base.Color"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.Color"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo._base.Color"]){
+dojo._hasResource["dojo._base.Color"]=true;
dojo.provide("dojo._base.Color");
dojo.require("dojo._base.array");
dojo.require("dojo._base.lang");
-
-dojo.Color = function(/*Array|String|Object*/ color){
- // summary:
- // takes a named string, hex string, array of rgb or rgba values,
- // an object with r, g, b, and a properties, or another dojo.Color object
- if(color){ this.setColor(color); }
-};
-
-// FIXME: there's got to be a more space-efficient way to encode or discover these!! Use hex?
-dojo.Color.named = {
- black: [0,0,0],
- silver: [192,192,192],
- gray: [128,128,128],
- white: [255,255,255],
- maroon: [128,0,0],
- red: [255,0,0],
- purple: [128,0,128],
- fuchsia: [255,0,255],
- green: [0,128,0],
- lime: [0,255,0],
- olive: [128,128,0],
- yellow: [255,255,0],
- navy: [0,0,128],
- blue: [0,0,255],
- teal: [0,128,128],
- aqua: [0,255,255]
+(function(){
+var d=dojo;
+dojo.Color=function(_1){
+if(_1){
+this.setColor(_1);
+}
};
-
-
-dojo.extend(dojo.Color, {
- r: 255, g: 255, b: 255, a: 1,
- _set: function(r, g, b, a){
- var t = this; t.r = r; t.g = g; t.b = b; t.a = a;
- },
- setColor: function(/*Array|String|Object*/ color){
- // summary:
- // takes a named string, hex string, array of rgb or rgba values,
- // an object with r, g, b, and a properties, or another dojo.Color object
- var d = dojo;
- if(d.isString(color)){
- d.colorFromString(color, this);
- }else if(d.isArray(color)){
- d.colorFromArray(color, this);
- }else{
- this._set(color.r, color.g, color.b, color.a);
- if(!(color instanceof d.Color)){ this.sanitize(); }
- }
- return this; // dojo.Color
- },
- sanitize: function(){
- // summary:
- // makes sure that the object has correct attributes
- // description:
- // the default implementation does nothing, include dojo.colors to
- // augment it to real checks
- return this; // dojo.Color
- },
- toRgb: function(){
- // summary: returns 3 component array of rgb values
- var t = this;
- return [t.r, t.g, t.b]; // Array
- },
- toRgba: function(){
- // summary: returns a 4 component array of rgba values
- var t = this;
- return [t.r, t.g, t.b, t.a]; // Array
- },
- toHex: function(){
- // summary: returns a css color string in hexadecimal representation
- var arr = dojo.map(["r", "g", "b"], function(x){
- var s = this[x].toString(16);
- return s.length < 2 ? "0" + s : s;
- }, this);
- return "#" + arr.join(""); // String
- },
- toCss: function(/*Boolean?*/ includeAlpha){
- // summary: returns a css color string in rgb(a) representation
- var t = this, rgb = t.r + ", " + t.g + ", " + t.b;
- return (includeAlpha ? "rgba(" + rgb + ", " + t.a : "rgb(" + rgb) + ")"; // String
- },
- toString: function(){
- // summary: returns a visual representation of the color
- return this.toCss(true); // String
- }
+dojo.Color.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:d.config.transparentColor||[255,255,255]};
+dojo.extend(dojo.Color,{r:255,g:255,b:255,a:1,_set:function(r,g,b,a){
+var t=this;
+t.r=r;
+t.g=g;
+t.b=b;
+t.a=a;
+},setColor:function(_2){
+if(d.isString(_2)){
+d.colorFromString(_2,this);
+}else{
+if(d.isArray(_2)){
+d.colorFromArray(_2,this);
+}else{
+this._set(_2.r,_2.g,_2.b,_2.a);
+if(!(_2 instanceof d.Color)){
+this.sanitize();
+}
+}
+}
+return this;
+},sanitize:function(){
+return this;
+},toRgb:function(){
+var t=this;
+return [t.r,t.g,t.b];
+},toRgba:function(){
+var t=this;
+return [t.r,t.g,t.b,t.a];
+},toHex:function(){
+var _3=d.map(["r","g","b"],function(x){
+var s=this[x].toString(16);
+return s.length<2?"0"+s:s;
+},this);
+return "#"+_3.join("");
+},toCss:function(_4){
+var t=this,_5=t.r+", "+t.g+", "+t.b;
+return (_4?"rgba("+_5+", "+t.a:"rgb("+_5)+")";
+},toString:function(){
+return this.toCss(true);
+}});
+dojo.blendColors=function(_6,_7,_8,_9){
+var t=_9||new d.Color();
+d.forEach(["r","g","b","a"],function(x){
+t[x]=_6[x]+(_7[x]-_6[x])*_8;
+if(x!="a"){
+t[x]=Math.round(t[x]);
+}
});
-
-dojo.blendColors = function(
- /*dojo.Color*/ start,
- /*dojo.Color*/ end,
- /*Number*/ weight,
- /*dojo.Color?*/ obj
-){
- // summary:
- // blend colors end and start with weight from 0 to 1, 0.5 being a 50/50 blend,
- // can reuse a previously allocated dojo.Color object for the result
- var d = dojo, t = obj || new dojo.Color();
- d.forEach(["r", "g", "b", "a"], function(x){
- t[x] = start[x] + (end[x] - start[x]) * weight;
- if(x != "a"){ t[x] = Math.round(t[x]); }
- });
- return t.sanitize(); // dojo.Color
+return t.sanitize();
};
-
-dojo.colorFromRgb = function(/*String*/ color, /*dojo.Color?*/ obj){
- // summary: get rgb(a) array from css-style color declarations
- var m = color.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);
- return m && dojo.colorFromArray(m[1].split(/\s*,\s*/), obj); // dojo.Color
+dojo.colorFromRgb=function(_a,_b){
+var m=_a.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);
+return m&&dojo.colorFromArray(m[1].split(/\s*,\s*/),_b);
};
-
-dojo.colorFromHex = function(/*String*/ color, /*dojo.Color?*/ obj){
- // summary: converts a hex string with a '#' prefix to a color object.
- // Supports 12-bit #rgb shorthand.
- var d = dojo, t = obj || new d.Color(),
- bits = (color.length == 4) ? 4 : 8,
- mask = (1 << bits) - 1;
- color = Number("0x" + color.substr(1));
- if(isNaN(color)){
- return null; // dojo.Color
- }
- d.forEach(["b", "g", "r"], function(x){
- var c = color & mask;
- color >>= bits;
- t[x] = bits == 4 ? 17 * c : c;
- });
- t.a = 1;
- return t; // dojo.Color
+dojo.colorFromHex=function(_c,_d){
+var t=_d||new d.Color(),_e=(_c.length==4)?4:8,_f=(1<<_e)-1;
+_c=Number("0x"+_c.substr(1));
+if(isNaN(_c)){
+return null;
+}
+d.forEach(["b","g","r"],function(x){
+var c=_c&_f;
+_c>>=_e;
+t[x]=_e==4?17*c:c;
+});
+t.a=1;
+return t;
};
-
-dojo.colorFromArray = function(/*Array*/ a, /*dojo.Color?*/ obj){
- // summary: builds a color from 1, 2, 3, or 4 element array
- var t = obj || new dojo.Color();
- t._set(Number(a[0]), Number(a[1]), Number(a[2]), Number(a[3]));
- if(isNaN(t.a)){ t.a = 1; }
- return t.sanitize(); // dojo.Color
+dojo.colorFromArray=function(a,obj){
+var t=obj||new d.Color();
+t._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3]));
+if(isNaN(t.a)){
+t.a=1;
+}
+return t.sanitize();
};
-
-dojo.colorFromString = function(/*String*/ str, /*dojo.Color?*/ obj){
- // summary:
- // parses str for a color value.
- // description:
- // Acceptable input values for str may include arrays of any form
- // accepted by dojo.colorFromArray, hex strings such as "#aaaaaa", or
- // rgb or rgba strings such as "rgb(133, 200, 16)" or "rgba(10, 10,
- // 10, 50)"
- // returns:
- // a dojo.Color object. If obj is passed, it will be the return value.
- var a = dojo.Color.named[str];
- return a && dojo.colorFromArray(a, obj) || dojo.colorFromRgb(str, obj) || dojo.colorFromHex(str, obj);
+dojo.colorFromString=function(str,obj){
+var a=d.Color.named[str];
+return a&&d.colorFromArray(a,obj)||d.colorFromRgb(str,obj)||d.colorFromHex(str,obj);
};
-
+})();
}
diff --git a/js/dojo/dojo/_base/Deferred.js b/js/dojo/dojo/_base/Deferred.js
--- a/js/dojo/dojo/_base/Deferred.js
+++ b/js/dojo/dojo/_base/Deferred.js
@@ -1,418 +1,135 @@
-if(!dojo._hasResource["dojo._base.Deferred"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.Deferred"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo._base.Deferred"]){
+dojo._hasResource["dojo._base.Deferred"]=true;
dojo.provide("dojo._base.Deferred");
dojo.require("dojo._base.lang");
-
-dojo.Deferred = function(/*Function?*/ canceller){
- // summary:
- // Encapsulates a sequence of callbacks in response to a value that
- // may not yet be available. This is modeled after the Deferred class
- // from Twisted <http://twistedmatrix.com>.
- // description:
- // JavaScript has no threads, and even if it did, threads are hard.
- // Deferreds are a way of abstracting non-blocking events, such as the
- // final response to an XMLHttpRequest. Deferreds create a promise to
- // return a response a some point in the future and an easy way to
- // register your interest in receiving that response.
- //
- // The most important methods for Deffered users are:
- //
- // * addCallback(handler)
- // * addErrback(handler)
- // * callback(result)
- // * errback(result)
- //
- // In general, when a function returns a Deferred, users then "fill
- // in" the second half of the contract by registering callbacks and
- // error handlers. You may register as many callback and errback
- // handlers as you like and they will be executed in the order
- // registered when a result is provided. Usually this result is
- // provided as the result of an asynchronous operation. The code
- // "managing" the Deferred (the code that made the promise to provide
- // an answer later) will use the callback() and errback() methods to
- // communicate with registered listeners about the result of the
- // operation. At this time, all registered result handlers are called
- // *with the most recent result value*.
- //
- // Deferred callback handlers are treated as a chain, and each item in
- // the chain is required to return a value that will be fed into
- // successive handlers. The most minimal callback may be registered
- // like this:
- //
- // | var d = new dojo.Deferred();
- // | d.addCallback(function(result){ return result; });
- //
- // Perhaps the most common mistake when first using Deferreds is to
- // forget to return a value (in most cases, the value you were
- // passed).
- //
- // The sequence of callbacks is internally represented as a list of
- // 2-tuples containing the callback/errback pair. For example, the
- // following call sequence:
- //
- // | var d = new dojo.Deferred();
- // | d.addCallback(myCallback);
- // | d.addErrback(myErrback);
- // | d.addBoth(myBoth);
- // | d.addCallbacks(myCallback, myErrback);
- //
- // is translated into a Deferred with the following internal
- // representation:
- //
- // | [
- // | [myCallback, null],
- // | [null, myErrback],
- // | [myBoth, myBoth],
- // | [myCallback, myErrback]
- // | ]
- //
- // The Deferred also keeps track of its current status (fired). Its
- // status may be one of three things:
- //
- // * -1: no value yet (initial condition)
- // * 0: success
- // * 1: error
- //
- // A Deferred will be in the error state if one of the following three
- // conditions are met:
- //
- // 1. The result given to callback or errback is "instanceof" Error
- // 2. The previous callback or errback raised an exception while
- // executing
- // 3. The previous callback or errback returned a value
- // "instanceof" Error
- //
- // Otherwise, the Deferred will be in the success state. The state of
- // the Deferred determines the next element in the callback sequence
- // to run.
- //
- // When a callback or errback occurs with the example deferred chain,
- // something equivalent to the following will happen (imagine
- // that exceptions are caught and returned):
- //
- // | // d.callback(result) or d.errback(result)
- // | if(!(result instanceof Error)){
- // | result = myCallback(result);
- // | }
- // | if(result instanceof Error){
- // | result = myErrback(result);
- // | }
- // | result = myBoth(result);
- // | if(result instanceof Error){
- // | result = myErrback(result);
- // | }else{
- // | result = myCallback(result);
- // | }
- //
- // The result is then stored away in case another step is added to the
- // callback sequence. Since the Deferred already has a value
- // available, any new callbacks added will be called immediately.
- //
- // There are two other "advanced" details about this implementation
- // that are useful:
- //
- // Callbacks are allowed to return Deferred instances themselves, so
- // you can build complicated sequences of events with ease.
- //
- // The creator of the Deferred may specify a canceller. The canceller
- // is a function that will be called if Deferred.cancel is called
- // before the Deferred fires. You can use this to implement clean
- // aborting of an XMLHttpRequest, etc. Note that cancel will fire the
- // deferred with a CancelledError (unless your canceller returns
- // another kind of error), so the errbacks should be prepared to
- // handle that error for cancellable Deferreds.
- // example:
- // | var deferred = new dojo.Deferred();
- // | setTimeout(function(){ deferred.callback({success: true}); }, 1000);
- // | return deferred;
- // example:
- // Deferred objects are often used when making code asynchronous. It
- // may be easiest to write functions in a synchronous manner and then
- // split code using a deferred to trigger a response to a long-lived
- // operation. For example, instead of register a callback function to
- // denote when a rendering operation completes, the function can
- // simply return a deferred:
- //
- // | // callback style:
- // | function renderLotsOfData(data, callback){
- // | var success = false
- // | try{
- // | for(var x in data){
- // | renderDataitem(data[x]);
- // | }
- // | success = true;
- // | }catch(e){ }
- // | if(callback){
- // | callback(success);
- // | }
- // | }
- //
- // | // using callback style
- // | renderLotsOfData(someDataObj, function(success){
- // | // handles success or failure
- // | if(!success){
- // | promptUserToRecover();
- // | }
- // | });
- // | // NOTE: no way to add another callback here!!
- // example:
- // Using a Deferred doesn't simplify the sending code any, but it
- // provides a standard interface for callers and senders alike,
- // providing both with a simple way to service multiple callbacks for
- // an operation and freeing both sides from worrying about details
- // such as "did this get called already?". With Deferreds, new
- // callbacks can be added at any time.
- //
- // | // Deferred style:
- // | function renderLotsOfData(data){
- // | var d = new dojo.Deferred();
- // | try{
- // | for(var x in data){
- // | renderDataitem(data[x]);
- // | }
- // | d.callback(true);
- // | }catch(e){
- // | d.errback(new Error("rendering failed"));
- // | }
- // | return d;
- // | }
- //
- // | // using Deferred style
- // | renderLotsOfData(someDataObj).addErrback(function(){
- // | promptUserToRecover();
- // | });
- // | // NOTE: addErrback and addCallback both return the Deferred
- // | // again, so we could chain adding callbacks or save the
- // | // deferred for later should we need to be notified again.
- // example:
- // In this example, renderLotsOfData is syncrhonous and so both
- // versions are pretty artificial. Putting the data display on a
- // timeout helps show why Deferreds rock:
- //
- // | // Deferred style and async func
- // | function renderLotsOfData(data){
- // | var d = new dojo.Deferred();
- // | setTimeout(function(){
- // | try{
- // | for(var x in data){
- // | renderDataitem(data[x]);
- // | }
- // | d.callback(true);
- // | }catch(e){
- // | d.errback(new Error("rendering failed"));
- // | }
- // | }, 100);
- // | return d;
- // | }
- //
- // | // using Deferred style
- // | renderLotsOfData(someDataObj).addErrback(function(){
- // | promptUserToRecover();
- // | });
- //
- // Note that the caller doesn't have to change his code at all to
- // handle the asynchronous case.
-
- this.chain = [];
- this.id = this._nextId();
- this.fired = -1;
- this.paused = 0;
- this.results = [null, null];
- this.canceller = canceller;
- this.silentlyCancelled = false;
+dojo.Deferred=function(_1){
+this.chain=[];
+this.id=this._nextId();
+this.fired=-1;
+this.paused=0;
+this.results=[null,null];
+this.canceller=_1;
+this.silentlyCancelled=false;
+this.isFiring=false;
+};
+dojo.extend(dojo.Deferred,{_nextId:(function(){
+var n=1;
+return function(){
+return n++;
};
-
-dojo.extend(dojo.Deferred, {
- /*
- makeCalled: function(){
- // summary:
- // returns a new, empty deferred, which is already in the called
- // state. Calling callback() or errback() on this deferred will
- // yeild an error and adding new handlers to it will result in
- // them being called immediately.
- var deferred = new dojo.Deferred();
- deferred.callback();
- return deferred;
- },
-
- toString: function(){
- var state;
- if(this.fired == -1){
- state = 'unfired';
- }else{
- state = this.fired ? 'success' : 'error';
- }
- return 'Deferred(' + this.id + ', ' + state + ')';
- },
- */
-
- _nextId: (function(){
- var n = 1;
- return function(){ return n++; };
- })(),
-
- cancel: function(){
- // summary:
- // Cancels a Deferred that has not yet received a value, or is
- // waiting on another Deferred as its value.
- // description:
- // If a canceller is defined, the canceller is called. If the
- // canceller did not return an error, or there was no canceller,
- // then the errback chain is started.
- var err;
- if(this.fired == -1){
- if(this.canceller){
- err = this.canceller(this);
- }else{
- this.silentlyCancelled = true;
- }
- if(this.fired == -1){
- if(!(err instanceof Error)){
- var res = err;
- err = new Error("Deferred Cancelled");
- err.dojoType = "cancel";
- err.cancelResult = res;
- }
- this.errback(err);
- }
- }else if( (this.fired == 0) &&
- (this.results[0] instanceof dojo.Deferred)
- ){
- this.results[0].cancel();
- }
- },
-
-
- _resback: function(res){
- // summary:
- // The private primitive that means either callback or errback
- this.fired = ((res instanceof Error) ? 1 : 0);
- this.results[this.fired] = res;
- this._fire();
- },
-
- _check: function(){
- if(this.fired != -1){
- if(!this.silentlyCancelled){
- throw new Error("already called!");
- }
- this.silentlyCancelled = false;
- return;
- }
- },
-
- callback: function(res){
- // summary: Begin the callback sequence with a non-error value.
-
- /*
- callback or errback should only be called once on a given
- Deferred.
- */
- this._check();
- this._resback(res);
- },
-
- errback: function(/*Error*/res){
- // summary:
- // Begin the callback sequence with an error result.
- this._check();
- if(!(res instanceof Error)){
- res = new Error(res);
- }
- this._resback(res);
- },
-
- addBoth: function(/*Function||Object*/cb, /*Optional, String*/cbfn){
- // summary:
- // Add the same function as both a callback and an errback as the
- // next element on the callback sequence. This is useful for code
- // that you want to guarantee to run, e.g. a finalizer.
- var enclosed = dojo.hitch(cb, cbfn);
- if(arguments.length > 2){
- enclosed = dojo.partial(enclosed, arguments, 2);
- }
- return this.addCallbacks(enclosed, enclosed);
- },
-
- addCallback: function(cb, cbfn){
- // summary:
- // Add a single callback to the end of the callback sequence.
- var enclosed = dojo.hitch(cb, cbfn);
- if(arguments.length > 2){
- enclosed = dojo.partial(enclosed, arguments, 2);
- }
- return this.addCallbacks(enclosed, null);
- },
-
- addErrback: function(cb, cbfn){
- // summary:
- // Add a single callback to the end of the callback sequence.
- var enclosed = dojo.hitch(cb, cbfn);
- if(arguments.length > 2){
- enclosed = dojo.partial(enclosed, arguments, 2);
- }
- return this.addCallbacks(null, enclosed);
- },
-
- addCallbacks: function(cb, eb){
- // summary:
- // Add separate callback and errback to the end of the callback
- // sequence.
- this.chain.push([cb, eb])
- if(this.fired >= 0){
- this._fire();
- }
- return this;
- },
-
- _fire: function(){
- // summary:
- // Used internally to exhaust the callback sequence when a result
- // is available.
- var chain = this.chain;
- var fired = this.fired;
- var res = this.results[fired];
- var self = this;
- var cb = null;
- while(
- (chain.length > 0) &&
- (this.paused == 0)
- ){
- // Array
- var f = chain.shift()[fired];
- if(!f){ continue; }
- try{
- res = f(res);
- fired = ((res instanceof Error) ? 1 : 0);
- if(res instanceof dojo.Deferred){
- cb = function(res){
- self._resback(res);
- // inlined from _pause()
- self.paused--;
- if(
- (self.paused == 0) &&
- (self.fired >= 0)
- ){
- self._fire();
- }
- }
- // inlined from _unpause
- this.paused++;
- }
- }catch(err){
- console.debug(err);
- fired = 1;
- res = err;
- }
- }
- this.fired = fired;
- this.results[fired] = res;
- if((cb)&&(this.paused)){
- // this is for "tail recursion" in case the dependent
- // deferred is already fired
- res.addBoth(cb);
- }
- }
-});
-
+})(),cancel:function(){
+var _2;
+if(this.fired==-1){
+if(this.canceller){
+_2=this.canceller(this);
+}else{
+this.silentlyCancelled=true;
+}
+if(this.fired==-1){
+if(!(_2 instanceof Error)){
+var _3=_2;
+var _4="Deferred Cancelled";
+if(_2&&_2.toString){
+_4+=": "+_2.toString();
+}
+_2=new Error(_4);
+_2.dojoType="cancel";
+_2.cancelResult=_3;
+}
+this.errback(_2);
+}
+}else{
+if((this.fired==0)&&(this.results[0] instanceof dojo.Deferred)){
+this.results[0].cancel();
+}
+}
+},_resback:function(_5){
+this.fired=((_5 instanceof Error)?1:0);
+this.results[this.fired]=_5;
+this._fire();
+},_check:function(){
+if(this.fired!=-1){
+if(!this.silentlyCancelled){
+throw new Error("already called!");
+}
+this.silentlyCancelled=false;
+return;
+}
+},callback:function(_6){
+this._check();
+this._resback(_6);
+},errback:function(_7){
+this._check();
+if(!(_7 instanceof Error)){
+_7=new Error(_7);
}
+this._resback(_7);
+},addBoth:function(cb,_8){
+var _9=dojo.hitch.apply(dojo,arguments);
+return this.addCallbacks(_9,_9);
+},addCallback:function(cb,_a){
+return this.addCallbacks(dojo.hitch.apply(dojo,arguments));
+},addErrback:function(cb,_b){
+return this.addCallbacks(null,dojo.hitch.apply(dojo,arguments));
+},addCallbacks:function(cb,eb){
+this.chain.push([cb,eb]);
+if(this.fired>=0&&!this.isFiring){
+this._fire();
+}
+return this;
+},_fire:function(){
+this.isFiring=true;
+var _c=this.chain;
+var _d=this.fired;
+var _e=this.results[_d];
+var _f=this;
+var cb=null;
+while((_c.length>0)&&(this.paused==0)){
+var f=_c.shift()[_d];
+if(!f){
+continue;
+}
+var _10=function(){
+var ret=f(_e);
+if(typeof ret!="undefined"){
+_e=ret;
+}
+_d=((_e instanceof Error)?1:0);
+if(_e instanceof dojo.Deferred){
+cb=function(res){
+_f._resback(res);
+_f.paused--;
+if((_f.paused==0)&&(_f.fired>=0)){
+_f._fire();
+}
+};
+this.paused++;
+}
+};
+if(dojo.config.debugAtAllCosts){
+_10.call(this);
+}else{
+try{
+_10.call(this);
+}
+catch(err){
+_d=1;
+_e=err;
+}
+}
+}
+this.fired=_d;
+this.results[_d]=_e;
+this.isFiring=false;
+if((cb)&&(this.paused)){
+_e.addBoth(cb);
+}
+}});
+}
diff --git a/js/dojo/dojo/_base/NodeList.js b/js/dojo/dojo/_base/NodeList.js
--- a/js/dojo/dojo/_base/NodeList.js
+++ b/js/dojo/dojo/_base/NodeList.js
@@ -1,467 +1,229 @@
-if(!dojo._hasResource["dojo._base.NodeList"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.NodeList"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo._base.NodeList"]){
+dojo._hasResource["dojo._base.NodeList"]=true;
dojo.provide("dojo._base.NodeList");
dojo.require("dojo._base.lang");
dojo.require("dojo._base.array");
-
(function(){
-
- var d = dojo;
-
- var tnl = function(arr){
- arr.constructor = dojo.NodeList;
- dojo._mixin(arr, dojo.NodeList.prototype);
- return arr;
- }
-
- dojo.NodeList = function(){
- // summary:
- // dojo.NodeList is as subclass of Array which adds syntactic
- // sugar for chaining, common iteration operations, animation,
- // and node manipulation. NodeLists are most often returned as
- // the result of dojo.query() calls.
- // example:
- // create a node list from a node
- // | new dojo.NodeList(dojo.byId("foo"));
-
- return tnl(Array.apply(null, arguments));
- }
-
- dojo.NodeList._wrap = tnl;
-
- dojo.extend(dojo.NodeList, {
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array#Methods
-
- // FIXME: handle return values for #3244
- // http://trac.dojotoolkit.org/ticket/3244
-
- // FIXME:
- // need to wrap or implement:
- // join (perhaps w/ innerHTML/outerHTML overload for toString() of items?)
- // reduce
- // reduceRight
-
- slice: function(/*===== begin, end =====*/){
- // summary:
- // Returns a new NodeList, maintaining this one in place
- // description:
- // This method behaves exactly like the Array.slice method
- // with the caveat that it returns a dojo.NodeList and not a
- // raw Array. For more details, see:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:slice
- // begin: Integer
- // Can be a positive or negative integer, with positive
- // integers noting the offset to begin at, and negative
- // integers denoting an offset from the end (i.e., to the left
- // of the end)
- // end: Integer?
- // Optional parameter to describe what position relative to
- // the NodeList's zero index to end the slice at. Like begin,
- // can be positive or negative.
- var a = dojo._toArray(arguments);
- return tnl(a.slice.apply(this, a));
- },
-
- splice: function(/*===== index, howmany, item =====*/){
- // summary:
- // Returns a new NodeList, manipulating this NodeList based on
- // the arguments passed, potentially splicing in new elements
- // at an offset, optionally deleting elements
- // description:
- // This method behaves exactly like the Array.splice method
- // with the caveat that it returns a dojo.NodeList and not a
- // raw Array. For more details, see:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:splice
- // index: Integer
- // begin can be a positive or negative integer, with positive
- // integers noting the offset to begin at, and negative
- // integers denoting an offset from the end (i.e., to the left
- // of the end)
- // howmany: Integer?
- // Optional parameter to describe what position relative to
- // the NodeList's zero index to end the slice at. Like begin,
- // can be positive or negative.
- // item: Object...?
- // Any number of optional parameters may be passed in to be
- // spliced into the NodeList
- // returns:
- // dojo.NodeList
- var a = dojo._toArray(arguments);
- return tnl(a.splice.apply(this, a));
- },
-
- concat: function(/*===== item =====*/){
- // summary:
- // Returns a new NodeList comprised of items in this NodeList
- // as well as items passed in as parameters
- // description:
- // This method behaves exactly like the Array.concat method
- // with the caveat that it returns a dojo.NodeList and not a
- // raw Array. For more details, see:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:concat
- // item: Object...?
- // Any number of optional parameters may be passed in to be
- // spliced into the NodeList
- // returns:
- // dojo.NodeList
- var a = dojo._toArray(arguments, 0, [this]);
- return tnl(a.concat.apply([], a));
- },
-
- indexOf: function(/*Object*/ value, /*Integer?*/ fromIndex){
- // summary:
- // see dojo.indexOf(). The primary difference is that the acted-on
- // array is implicitly this NodeList
- // value:
- // The value to search for.
- // fromIndex:
- // The loction to start searching from. Optional. Defaults to 0.
- // description:
- // For more details on the behavior of indexOf, see:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:indexOf
- // returns:
- // Positive Integer or 0 for a match, -1 of not found.
- return d.indexOf(this, value, fromIndex); // Integer
- },
-
- lastIndexOf: function(/*===== value, fromIndex =====*/){
- // summary:
- // see dojo.lastIndexOf(). The primary difference is that the
- // acted-on array is implicitly this NodeList
- // description:
- // For more details on the behavior of lastIndexOf, see:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:lastIndexOf
- // value: Object
- // The value to search for.
- // fromIndex: Integer?
- // The loction to start searching from. Optional. Defaults to 0.
- // returns:
- // Positive Integer or 0 for a match, -1 of not found.
- return d.lastIndexOf.apply(d, d._toArray(arguments, 0, [this])); // Integer
- },
-
- every: function(/*Function*/callback, /*Object?*/thisObject){
- // summary:
- // see dojo.every() and:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:every
- // Takes the same structure of arguments and returns as
- // dojo.every() with the caveat that the passed array is
- // implicitly this NodeList
- return d.every(this, callback, thisObject); // Boolean
- },
-
- some: function(/*Function*/callback, /*Object?*/thisObject){
- // summary:
- // see dojo.some() and:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:some
- // Takes the same structure of arguments and returns as
- // dojo.some() with the caveat that the passed array is
- // implicitly this NodeList
- return d.some(this, callback, thisObject); // Boolean
- },
-
- map: function(/*Function*/ func, /*Function?*/ obj){
- // summary:
- // see dojo.map(). The primary difference is that the acted-on
- // array is implicitly this NodeList and the return is a
- // dojo.NodeList (a subclass of Array)
-
- return d.map(this, func, obj, d.NodeList); // dojo.NodeList
- },
-
- forEach: function(callback, thisObj){
- // summary:
- // see dojo.forEach(). The primary difference is that the acted-on
- // array is implicitly this NodeList
-
- d.forEach(this, callback, thisObj);
- return this; // dojo.NodeList non-standard return to allow easier chaining
- },
-
- // custom methods
-
- coords: function(){
- // summary:
- // Returns the box objects all elements in a node list as
- // an Array (*not* a NodeList)
-
- return d.map(this, d.coords);
- },
-
- style: function(/*===== property, value =====*/){
- // summary:
- // gets or sets the CSS property for every element in the NodeList
- // property: String
- // the CSS property to get/set, in JavaScript notation
- // ("lineHieght" instead of "line-height")
- // value: String?
- // optional. The value to set the property to
- // return:
- // if no value is passed, the result is an array of strings.
- // If a value is passed, the return is this NodeList
- var aa = d._toArray(arguments, 0, [null]);
- var s = this.map(function(i){
- aa[0] = i;
- return d.style.apply(d, aa);
- });
- return (arguments.length > 1) ? this : s; // String||dojo.NodeList
- },
-
- styles: function(/*===== property, value =====*/){
- // summary:
- // Deprecated. Use NodeList.style instead. Will be removed in
- // Dojo 1.1. Gets or sets the CSS property for every element
- // in the NodeList
- // property: String
- // the CSS property to get/set, in JavaScript notation
- // ("lineHieght" instead of "line-height")
- // value: String?
- // optional. The value to set the property to
- // return:
- // if no value is passed, the result is an array of strings.
- // If a value is passed, the return is this NodeList
- d.deprecated("NodeList.styles", "use NodeList.style instead", "1.1");
- return this.style.apply(this, arguments);
- },
-
- addClass: function(/*String*/ className){
- // summary:
- // adds the specified class to every node in the list
- //
- this.forEach(function(i){ d.addClass(i, className); });
- return this;
- },
-
- removeClass: function(/*String*/ className){
- this.forEach(function(i){ d.removeClass(i, className); });
- return this;
- },
-
- // FIXME: toggleClass()? connectPublisher()? connectRunOnce()?
-
- place: function(/*String||Node*/ queryOrNode, /*String*/ position){
- // summary:
- // places elements of this node list relative to the first element matched
- // by queryOrNode. Returns the original NodeList.
- // queryOrNode:
- // may be a string representing any valid CSS3 selector or a DOM node.
- // In the selector case, only the first matching element will be used
- // for relative positioning.
- // position:
- // can be one of:
- // "last"||"end" (default)
- // "first||"start"
- // "before"
- // "after"
- // or an offset in the childNodes property
- var item = d.query(queryOrNode)[0];
- position = position||"last";
-
- for(var x=0; x<this.length; x++){
- d.place(this[x], item, position);
- }
- return this; // dojo.NodeList
- },
-
- connect: function(/*String*/ methodName, /*Object||Function||String*/ objOrFunc, /*String?*/ funcName){
- // summary:
- // attach event handlers to every item of the NodeList. Uses dojo.connect()
- // so event properties are normalized
- // methodName:
- // the name of the method to attach to. For DOM events, this should be
- // the lower-case name of the event
- // objOrFunc:
- // if 2 arguments are passed (methodName, objOrFunc), objOrFunc should
- // reference a function or be the name of the function in the global
- // namespace to attach. If 3 arguments are provided
- // (methodName, objOrFunc, funcName), objOrFunc must be the scope to
- // locate the bound function in
- // funcName:
- // optional. A string naming the function in objOrFunc to bind to the
- // event. May also be a function reference.
- // example:
- // add an onclick handler to every button on the page
- // | dojo.query("onclick", function(e){
- // | console.debug("clicked!");
- // | });
- // example:
- // attach foo.bar() to every odd div's onmouseover
- // | dojo.query("div:nth-child(odd)").onclick("onmouseover", foo, "bar");
- this.forEach(function(item){
- d.connect(item, methodName, objOrFunc, funcName);
- });
- return this; // dojo.NodeList
- },
-
- orphan: function(/*String?*/ simpleFilter){
- // summary:
- // removes elements in this list that match the simple
- // filter from their parents and returns them as a new
- // NodeList.
- // simpleFilter: single-expression CSS filter
- // return: a dojo.NodeList of all of the elements orpahned
- var orphans = (simpleFilter) ? d._filterQueryResult(this, simpleFilter) : this;
- orphans.forEach(function(item){
- if(item["parentNode"]){
- item.parentNode.removeChild(item);
- }
- });
- return orphans; // dojo.NodeList
- },
-
- adopt: function(/*String||Array||DomNode*/ queryOrListOrNode, /*String?*/ position){
- // summary:
- // places any/all elements in queryOrListOrNode at a
- // position relative to the first element in this list.
- // Returns a dojo.NodeList of the adopted elements.
- // queryOrListOrNode:
- // a DOM node or a query string or a query result.
- // Represents the nodes to be adopted relative to the
- // first element of this NodeList.
- // position:
- // optional. One of:
- // "last"||"end" (default)
- // "first||"start"
- // "before"
- // "after"
- // or an offset in the childNodes property
- var item = this[0];
- return d.query(queryOrListOrNode).forEach(function(ai){ d.place(ai, item, (position||"last")); }); // dojo.NodeList
- },
-
- // FIXME: do we need this?
- query: function(/*String*/ queryStr){
- // summary:
- // Returns a new, flattened NodeList. Elements of the new list
- // satisfy the passed query but use elements of the
- // current NodeList as query roots.
-
- queryStr = queryStr||"";
-
- // FIXME: probably slow
- var ret = d.NodeList();
- this.forEach(function(item){
- d.query(queryStr, item).forEach(function(subItem){
- if(typeof subItem != "undefined"){
- ret.push(subItem);
- }
- });
- });
- return ret; // dojo.NodeList
- },
-
- filter: function(/*String*/ simpleQuery){
- // summary:
- // "masks" the built-in javascript filter() method to support
- // passing a simple string filter in addition to supporting
- // filtering function objects.
- // example:
- // "regular" JS filter syntax as exposed in dojo.filter:
- // | dojo.query("*").filter(function(item){
- // | // highlight every paragraph
- // | return (item.nodeName == "p");
- // | }).styles("backgroundColor", "yellow");
- // example:
- // the same filtering using a CSS selector
- // | dojo.query("*").filter("p").styles("backgroundColor", "yellow");
-
- var items = this;
- var _a = arguments;
- var r = d.NodeList();
- var rp = function(t){
- if(typeof t != "undefined"){
- r.push(t);
- }
- }
- if(d.isString(simpleQuery)){
- items = d._filterQueryResult(this, _a[0]);
- if(_a.length == 1){
- // if we only got a string query, pass back the filtered results
- return items; // dojo.NodeList
- }
- // if we got a callback, run it over the filtered items
- d.forEach(d.filter(items, _a[1], _a[2]), rp);
- return r; // dojo.NodeList
- }
- // handle the (callback, [thisObject]) case
- d.forEach(d.filter(items, _a[0], _a[1]), rp);
- return r; // dojo.NodeList
-
- },
-
- /*
- // FIXME: should this be "copyTo" and include parenting info?
- clone: function(){
- // summary:
- // creates node clones of each element of this list
- // and returns a new list containing the clones
- },
- */
-
- addContent: function(/*String*/ content, /*String||Integer?*/ position){
- // summary:
- // add a node or some HTML as a string to every item in the list.
- // Returns the original list.
- // content:
- // the HTML in string format to add at position to every item
- // position:
- // One of:
- // "last"||"end" (default)
- // "first||"start"
- // "before"
- // "after"
- // or an integer offset in the childNodes property
- var ta = d.doc.createElement("span");
- if(d.isString(content)){
- ta.innerHTML = content;
- }else{
- ta.appendChild(content);
- }
- var ct = ((position == "first")||(position == "after")) ? "lastChild" : "firstChild";
- this.forEach(function(item){
- var tn = ta.cloneNode(true);
- while(tn[ct]){
- d.place(tn[ct], item, position);
- }
- });
- return this; // dojo.NodeList
- }
- });
-
- // syntactic sugar for DOM events
- d.forEach([
- "blur", "click", "keydown", "keypress", "keyup", "mousedown", "mouseenter",
- "mouseleave", "mousemove", "mouseout", "mouseover", "mouseup"
- ], function(evt){
- var _oe = "on"+evt;
- dojo.NodeList.prototype[_oe] = function(a, b){
- return this.connect(_oe, a, b);
- }
- // FIXME: should these events trigger publishes?
- /*
- return (a ? this.connect(_oe, a, b) :
- this.forEach(function(n){
- // FIXME:
- // listeners get buried by
- // addEventListener and can't be dug back
- // out to be triggered externally.
- // see:
- // http://developer.mozilla.org/en/docs/DOM:element
-
- console.debug(n, evt, _oe);
-
- // FIXME: need synthetic event support!
- var _e = { target: n, faux: true, type: evt };
- // dojo._event_listener._synthesizeEvent({}, { target: n, faux: true, type: evt });
- try{ n[evt](_e); }catch(e){ console.debug(e); }
- try{ n[_oe](_e); }catch(e){ console.debug(e); }
- })
- );
- }
- */
- }
- );
-
+var d=dojo;
+var ap=Array.prototype,_1=ap.slice,_2=ap.concat;
+var _3=function(a,_4,_5){
+if(!a.sort){
+a=_1.call(a,0);
+}
+var _6=_5||this._NodeListCtor||d._NodeListCtor;
+a.constructor=_6;
+dojo._mixin(a,_6.prototype);
+a._NodeListCtor=_6;
+return _4?a._stash(_4):a;
+};
+var _7=function(f,a,o){
+a=[0].concat(_1.call(a,0));
+o=o||d.global;
+return function(_8){
+a[0]=_8;
+return f.apply(o,a);
+};
+};
+var _9=function(f,o){
+return function(){
+this.forEach(_7(f,arguments,o));
+return this;
+};
+};
+var _a=function(f,o){
+return function(){
+return this.map(_7(f,arguments,o));
+};
+};
+var _b=function(f,o){
+return function(){
+return this.filter(_7(f,arguments,o));
+};
+};
+var _c=function(f,g,o){
+return function(){
+var a=arguments,_d=_7(f,a,o);
+if(g.call(o||d.global,a)){
+return this.map(_d);
+}
+this.forEach(_d);
+return this;
+};
+};
+var _e=function(a){
+return a.length==1&&(typeof a[0]=="string");
+};
+var _f=function(_10){
+var p=_10.parentNode;
+if(p){
+p.removeChild(_10);
+}
+};
+dojo.NodeList=function(){
+return _3(Array.apply(null,arguments));
+};
+d._NodeListCtor=d.NodeList;
+var nl=d.NodeList,nlp=nl.prototype;
+nl._wrap=nlp._wrap=_3;
+nl._adaptAsMap=_a;
+nl._adaptAsForEach=_9;
+nl._adaptAsFilter=_b;
+nl._adaptWithCondition=_c;
+d.forEach(["slice","splice"],function(_11){
+var f=ap[_11];
+nlp[_11]=function(){
+return this._wrap(f.apply(this,arguments),_11=="slice"?this:null);
+};
+});
+d.forEach(["indexOf","lastIndexOf","every","some"],function(_12){
+var f=d[_12];
+nlp[_12]=function(){
+return f.apply(d,[this].concat(_1.call(arguments,0)));
+};
+});
+d.forEach(["attr","style"],function(_13){
+nlp[_13]=_c(d[_13],_e);
+});
+d.forEach(["connect","addClass","removeClass","toggleClass","empty","removeAttr"],function(_14){
+nlp[_14]=_9(d[_14]);
+});
+dojo.extend(dojo.NodeList,{_normalize:function(_15,_16){
+var _17=_15.parse===true?true:false;
+if(typeof _15.template=="string"){
+var _18=_15.templateFunc||(dojo.string&&dojo.string.substitute);
+_15=_18?_18(_15.template,_15):_15;
+}
+var _19=(typeof _15);
+if(_19=="string"||_19=="number"){
+_15=dojo._toDom(_15,(_16&&_16.ownerDocument));
+if(_15.nodeType==11){
+_15=dojo._toArray(_15.childNodes);
+}else{
+_15=[_15];
+}
+}else{
+if(!dojo.isArrayLike(_15)){
+_15=[_15];
+}else{
+if(!dojo.isArray(_15)){
+_15=dojo._toArray(_15);
+}
+}
+}
+if(_17){
+_15._runParse=true;
+}
+return _15;
+},_cloneNode:function(_1a){
+return _1a.cloneNode(true);
+},_place:function(ary,_1b,_1c,_1d){
+if(_1b.nodeType!=1&&_1c=="only"){
+return;
+}
+var _1e=_1b,_1f;
+var _20=ary.length;
+for(var i=_20-1;i>=0;i--){
+var _21=(_1d?this._cloneNode(ary[i]):ary[i]);
+if(ary._runParse&&dojo.parser&&dojo.parser.parse){
+if(!_1f){
+_1f=_1e.ownerDocument.createElement("div");
+}
+_1f.appendChild(_21);
+dojo.parser.parse(_1f);
+_21=_1f.firstChild;
+while(_1f.firstChild){
+_1f.removeChild(_1f.firstChild);
+}
+}
+if(i==_20-1){
+dojo.place(_21,_1e,_1c);
+}else{
+_1e.parentNode.insertBefore(_21,_1e);
+}
+_1e=_21;
+}
+},_stash:function(_22){
+this._parent=_22;
+return this;
+},end:function(){
+if(this._parent){
+return this._parent;
+}else{
+return new this._NodeListCtor();
+}
+},concat:function(_23){
+var t=d.isArray(this)?this:_1.call(this,0),m=d.map(arguments,function(a){
+return a&&!d.isArray(a)&&(typeof NodeList!="undefined"&&a.constructor===NodeList||a.constructor===this._NodeListCtor)?_1.call(a,0):a;
+});
+return this._wrap(_2.apply(t,m),this);
+},map:function(_24,obj){
+return this._wrap(d.map(this,_24,obj),this);
+},forEach:function(_25,_26){
+d.forEach(this,_25,_26);
+return this;
+},coords:_a(d.coords),position:_a(d.position),place:function(_27,_28){
+var _29=d.query(_27)[0];
+return this.forEach(function(_2a){
+d.place(_2a,_29,_28);
+});
+},orphan:function(_2b){
+return (_2b?d._filterQueryResult(this,_2b):this).forEach(_f);
+},adopt:function(_2c,_2d){
+return d.query(_2c).place(this[0],_2d)._stash(this);
+},query:function(_2e){
+if(!_2e){
+return this;
+}
+var ret=this.map(function(_2f){
+return d.query(_2e,_2f).filter(function(_30){
+return _30!==undefined;
+});
+});
+return this._wrap(_2.apply([],ret),this);
+},filter:function(_31){
+var a=arguments,_32=this,_33=0;
+if(typeof _31=="string"){
+_32=d._filterQueryResult(this,a[0]);
+if(a.length==1){
+return _32._stash(this);
+}
+_33=1;
+}
+return this._wrap(d.filter(_32,a[_33],a[_33+1]),this);
+},addContent:function(_34,_35){
+_34=this._normalize(_34,this[0]);
+for(var i=0,_36;_36=this[i];i++){
+this._place(_34,_36,_35,i>0);
+}
+return this;
+},instantiate:function(_37,_38){
+var c=d.isFunction(_37)?_37:d.getObject(_37);
+_38=_38||{};
+return this.forEach(function(_39){
+new c(_38,_39);
+});
+},at:function(){
+var t=new this._NodeListCtor();
+d.forEach(arguments,function(i){
+if(this[i]){
+t.push(this[i]);
+}
+},this);
+return t._stash(this);
+}});
+nl.events=["blur","focus","change","click","error","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","submit"];
+d.forEach(nl.events,function(evt){
+var _3a="on"+evt;
+nlp[_3a]=function(a,b){
+return this.connect(_3a,a,b);
+};
+});
})();
-
}
diff --git a/js/dojo/dojo/_base/_loader/bootstrap.js b/js/dojo/dojo/_base/_loader/bootstrap.js
--- a/js/dojo/dojo/_base/_loader/bootstrap.js
+++ b/js/dojo/dojo/_base/_loader/bootstrap.js
@@ -1,249 +1,120 @@
-// TODOC: HOW TO DOC THE BELOW?
-// @global: djConfig
-// summary:
-// Application code can set the global 'djConfig' prior to loading
-// the library to override certain global settings for how dojo works.
-// description: The variables that can be set are as follows:
-// - isDebug: false
-// - libraryScriptUri: ""
-// - locale: undefined
-// - extraLocale: undefined
-// - preventBackButtonFix: true
-// note:
-// 'djConfig' does not exist under 'dojo.*' so that it can be set before the
-// 'dojo' variable exists.
-// note:
-// Setting any of these variables *after* the library has loaded does
-// nothing at all.
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
(function(){
- // make sure djConfig is defined
- if(typeof this["djConfig"] == "undefined"){
- this.djConfig = {};
- }
-
- // firebug stubs
- if((!this["console"])||(!console["firebug"])){
- this.console = {};
- }
-
- var cn = [
- "assert", "count", "debug", "dir", "dirxml", "error", "group",
- "groupEnd", "info", "log", "profile", "profileEnd", "time",
- "timeEnd", "trace", "warn"
- ];
- var i=0, tn;
- while((tn=cn[i++])){
- if(!console[tn]){
- console[tn] = function(){};
- }
- }
-
- //TODOC: HOW TO DOC THIS?
- // dojo is the root variable of (almost all) our public symbols -- make sure it is defined.
- if(typeof this["dojo"] == "undefined"){
- this.dojo = {};
- }
-
- var d = dojo;
-
- // summary:
- // return the current global context object
- // (e.g., the window object in a browser).
- // description:
- // Refer to 'dojo.global' rather than referring to window to ensure your
- // code runs correctly in contexts other than web browsers (eg: Rhino on a server).
- dojo.global = this;
-
- var _config =/*===== djConfig = =====*/{
- isDebug: false,
- libraryScriptUri: "",
- preventBackButtonFix: true,
- delayMozLoadingFix: false
- };
-
- for(var option in _config){
- if(typeof djConfig[option] == "undefined"){
- djConfig[option] = _config[option];
- }
- }
-
- var _platforms = ["Browser", "Rhino", "Spidermonkey", "Mobile"];
- var t;
- while(t=_platforms.shift()){
- d["is"+t] = false;
- }
-
- // Override locale setting, if specified
- dojo.locale = djConfig.locale;
-
- //TODOC: HOW TO DOC THIS?
- dojo.version = {
- // summary: version number of this instance of dojo.
- major: 1, minor: 0, patch: 2, flag: "",
- revision: Number("$Rev: 11832 $".match(/[0-9]+/)[0]),
- toString: function(){
- with(d.version){
- return major + "." + minor + "." + patch + flag + " (" + revision + ")"; // String
- }
- }
- }
-
- // Register with the OpenAjax hub
- if(typeof OpenAjax != "undefined"){
- OpenAjax.hub.registerLibrary("dojo", "http://dojotoolkit.org", d.version.toString());
- }
-
- dojo._mixin = function(/*Object*/ obj, /*Object*/ props){
- // summary:
- // Adds all properties and methods of props to obj. This addition is
- // "prototype extension safe", so that instances of objects will not
- // pass along prototype defaults.
- var tobj = {};
- for(var x in props){
- // the "tobj" condition avoid copying properties in "props"
- // inherited from Object.prototype. For example, if obj has a custom
- // toString() method, don't overwrite it with the toString() method
- // that props inherited from Object.prototype
- if(tobj[x] === undefined || tobj[x] != props[x]){
- obj[x] = props[x];
- }
- }
- // IE doesn't recognize custom toStrings in for..in
- if(d["isIE"] && props){
- var p = props.toString;
- if(typeof p == "function" && p != obj.toString && p != tobj.toString &&
- p != "\nfunction toString() {\n [native code]\n}\n"){
- obj.toString = props.toString;
- }
- }
- return obj; // Object
- }
-
- dojo.mixin = function(/*Object*/obj, /*Object...*/props){
- // summary: Adds all properties and methods of props to obj.
- for(var i=1, l=arguments.length; i<l; i++){
- d._mixin(obj, arguments[i]);
- }
- return obj; // Object
- }
-
- dojo._getProp = function(/*Array*/parts, /*Boolean*/create, /*Object*/context){
- var obj=context||d.global;
- for(var i=0, p; obj&&(p=parts[i]); i++){
- obj = (p in obj ? obj[p] : (create ? obj[p]={} : undefined));
- }
- return obj; // mixed
- }
-
- dojo.setObject = function(/*String*/name, /*mixed*/value, /*Object*/context){
- // summary:
- // Set a property from a dot-separated string, such as "A.B.C"
- // description:
- // Useful for longer api chains where you have to test each object in
- // the chain, or when you have an object reference in string format.
- // Objects are created as needed along 'path'.
- // name:
- // Path to a property, in the form "A.B.C".
- // context:
- // Optional. Object to use as root of path. Defaults to
- // 'dojo.global'. Null may be passed.
- var parts=name.split("."), p=parts.pop(), obj=d._getProp(parts, true, context);
- return (obj && p ? (obj[p]=value) : undefined); // mixed
- }
-
- dojo.getObject = function(/*String*/name, /*Boolean*/create, /*Object*/context){
- // summary:
- // Get a property from a dot-separated string, such as "A.B.C"
- // description:
- // Useful for longer api chains where you have to test each object in
- // the chain, or when you have an object reference in string format.
- // name:
- // Path to an property, in the form "A.B.C".
- // context:
- // Optional. Object to use as root of path. Defaults to
- // 'dojo.global'. Null may be passed.
- // create:
- // Optional. If true, Objects will be created at any point along the
- // 'path' that is undefined.
- return d._getProp(name.split("."), create, context); // mixed
- }
-
- dojo.exists = function(/*String*/name, /*Object?*/obj){
- // summary:
- // determine if an object supports a given method
- // description:
- // useful for longer api chains where you have to test each object in
- // the chain
- // name:
- // Path to an object, in the form "A.B.C".
- // obj:
- // Object to use as root of path. Defaults to
- // 'dojo.global'. Null may be passed.
- return !!d.getObject(name, false, obj); // Boolean
- }
-
-
- dojo["eval"] = function(/*String*/ scriptFragment){
- // summary:
- // Perform an evaluation in the global scope. Use this rather than
- // calling 'eval()' directly.
- // description:
- // Placed in a separate function to minimize size of trapped
- // evaluation context.
- // note:
- // - JSC eval() takes an optional second argument which can be 'unsafe'.
- // - Mozilla/SpiderMonkey eval() takes an optional second argument which is the
- // scope object for new symbols.
-
- // FIXME: investigate Joseph Smarr's technique for IE:
- // http://josephsmarr.com/2007/01/31/fixing-eval-to-use-global-scope-in-ie/
- // see also:
- // http://trac.dojotoolkit.org/ticket/744
- return d.global.eval ? d.global.eval(scriptFragment) : eval(scriptFragment); // mixed
- }
-
- /*=====
- dojo.deprecated = function(behaviour, extra, removal){
- // summary:
- // Log a debug message to indicate that a behavior has been
- // deprecated.
- // behaviour: String
- // The API or behavior being deprecated. Usually in the form
- // of "myApp.someFunction()".
- // extra: String?
- // Text to append to the message. Often provides advice on a
- // new function or facility to achieve the same goal during
- // the deprecation period.
- // removal: String?
- // Text to indicate when in the future the behavior will be
- // removed. Usually a version number.
- // example:
- // | dojo.deprecated("myApp.getTemp()", "use myApp.getLocaleTemp() instead", "1.0");
- }
-
- dojo.experimental = function(moduleName, extra){
- // summary: Marks code as experimental.
- // description:
- // This can be used to mark a function, file, or module as
- // experimental. Experimental code is not ready to be used, and the
- // APIs are subject to change without notice. Experimental code may be
- // completed deleted without going through the normal deprecation
- // process.
- // moduleName: String
- // The name of a module, or the name of a module file or a specific
- // function
- // extra: String?
- // some additional message for the user
- // example:
- // | dojo.experimental("dojo.data.Result");
- // example:
- // | dojo.experimental("dojo.weather.toKelvin()", "PENDING approval from NOAA");
- }
- =====*/
-
- //Real functions declared in dojo._firebug.firebug.
- d.deprecated = d.experimental = function(){};
-
+if(typeof this["loadFirebugConsole"]=="function"){
+this["loadFirebugConsole"]();
+}else{
+this.console=this.console||{};
+var cn=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"];
+var i=0,tn;
+while((tn=cn[i++])){
+if(!console[tn]){
+(function(){
+var _1=tn+"";
+console[_1]=("log" in console)?function(){
+var a=Array.apply({},arguments);
+a.unshift(_1+":");
+console["log"](a.join(" "));
+}:function(){
+};
+console[_1]._fake=true;
})();
-// vim:ai:ts=4:noet
+}
+}
+}
+if(typeof dojo=="undefined"){
+dojo={_scopeName:"dojo",_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}};
+}
+var d=dojo;
+if(typeof dijit=="undefined"){
+dijit={_scopeName:"dijit"};
+}
+if(typeof dojox=="undefined"){
+dojox={_scopeName:"dojox"};
+}
+if(!d._scopeArgs){
+d._scopeArgs=[dojo,dijit,dojox];
+}
+d.global=this;
+d.config={isDebug:false,debugAtAllCosts:false};
+if(typeof djConfig!="undefined"){
+for(var _2 in djConfig){
+d.config[_2]=djConfig[_2];
+}
+}
+dojo.locale=d.config.locale;
+var _3="$Rev: 21629 $".match(/\d+/);
+dojo.version={major:1,minor:4,patch:3,flag:"",revision:_3?+_3[0]:NaN,toString:function(){
+with(d.version){
+return major+"."+minor+"."+patch+flag+" ("+revision+")";
+}
+}};
+if(typeof OpenAjax!="undefined"){
+OpenAjax.hub.registerLibrary(dojo._scopeName,"http://dojotoolkit.org",d.version.toString());
+}
+var _4,_5,_6={};
+for(var i in {toString:1}){
+_4=[];
+break;
+}
+dojo._extraNames=_4=_4||["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"];
+_5=_4.length;
+dojo._mixin=function(_7,_8){
+var _9,s,i;
+for(_9 in _8){
+s=_8[_9];
+if(!(_9 in _7)||(_7[_9]!==s&&(!(_9 in _6)||_6[_9]!==s))){
+_7[_9]=s;
+}
+}
+if(_5&&_8){
+for(i=0;i<_5;++i){
+_9=_4[i];
+s=_8[_9];
+if(!(_9 in _7)||(_7[_9]!==s&&(!(_9 in _6)||_6[_9]!==s))){
+_7[_9]=s;
+}
+}
+}
+return _7;
+};
+dojo.mixin=function(_a,_b){
+if(!_a){
+_a={};
+}
+for(var i=1,l=arguments.length;i<l;i++){
+d._mixin(_a,arguments[i]);
+}
+return _a;
+};
+dojo._getProp=function(_c,_d,_e){
+var _f=_e||d.global;
+for(var i=0,p;_f&&(p=_c[i]);i++){
+if(i==0&&d._scopeMap[p]){
+p=d._scopeMap[p];
+}
+_f=(p in _f?_f[p]:(_d?_f[p]={}:undefined));
+}
+return _f;
+};
+dojo.setObject=function(_10,_11,_12){
+var _13=_10.split("."),p=_13.pop(),obj=d._getProp(_13,true,_12);
+return obj&&p?(obj[p]=_11):undefined;
+};
+dojo.getObject=function(_14,_15,_16){
+return d._getProp(_14.split("."),_15,_16);
+};
+dojo.exists=function(_17,obj){
+return !!d.getObject(_17,false,obj);
+};
+dojo["eval"]=function(_18){
+return d.global.eval?d.global.eval(_18):eval(_18);
+};
+d.deprecated=d.experimental=function(){
+};
+})();
diff --git a/js/dojo/dojo/_base/_loader/hostenv_browser.js b/js/dojo/dojo/_base/_loader/hostenv_browser.js
--- a/js/dojo/dojo/_base/_loader/hostenv_browser.js
+++ b/js/dojo/dojo/_base/_loader/hostenv_browser.js
@@ -1,303 +1,228 @@
-if(typeof window != 'undefined'){
- dojo.isBrowser = true;
- dojo._name = "browser";
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // attempt to figure out the path to dojo if it isn't set in the config
- (function(){
- var d = dojo;
- // this is a scope protection closure. We set browser versions and grab
- // the URL we were loaded from here.
-
- // grab the node we were loaded from
- if(document && document.getElementsByTagName){
- var scripts = document.getElementsByTagName("script");
- var rePkg = /dojo(\.xd)?\.js([\?\.]|$)/i;
- for(var i = 0; i < scripts.length; i++){
- var src = scripts[i].getAttribute("src");
- if(!src){ continue; }
- var m = src.match(rePkg);
- if(m){
- // find out where we came from
- if(!djConfig["baseUrl"]){
- djConfig["baseUrl"] = src.substring(0, m.index);
- }
- // and find out if we need to modify our behavior
- var cfg = scripts[i].getAttribute("djConfig");
- if(cfg){
- var cfgo = eval("({ "+cfg+" })");
- for(var x in cfgo){
- djConfig[x] = cfgo[x];
- }
- }
- break; // "first Dojo wins"
- }
- }
- }
- d.baseUrl = djConfig["baseUrl"];
-
- // fill in the rendering support information in dojo.render.*
- var n = navigator;
- var dua = n.userAgent;
- var dav = n.appVersion;
- var tv = parseFloat(dav);
-
- d.isOpera = (dua.indexOf("Opera") >= 0) ? tv : 0;
- d.isKhtml = (dav.indexOf("Konqueror") >= 0)||(dav.indexOf("Safari") >= 0) ? tv : 0;
- if(dav.indexOf("Safari") >= 0){
- d.isSafari = parseFloat(dav.split("Version/")[1]) || 2;
- }
- var geckoPos = dua.indexOf("Gecko");
- d.isMozilla = d.isMoz = ((geckoPos >= 0)&&(!d.isKhtml)) ? tv : 0;
- d.isFF = 0;
- d.isIE = 0;
- try{
- if(d.isMoz){
- d.isFF = parseFloat(dua.split("Firefox/")[1].split(" ")[0]);
- }
- if((document.all)&&(!d.isOpera)){
- d.isIE = parseFloat(dav.split("MSIE ")[1].split(";")[0]);
- }
- }catch(e){}
-
- //Workaround to get local file loads of dojo to work on IE 7
- //by forcing to not use native xhr.
- if(dojo.isIE && (window.location.protocol === "file:")){
- djConfig.ieForceActiveXXhr=true;
- }
-
- var cm = document["compatMode"];
- d.isQuirks = (cm == "BackCompat")||(cm == "QuirksMode")||(d.isIE < 6);
-
- // TODO: is the HTML LANG attribute relevant?
- d.locale = djConfig.locale || (d.isIE ? n.userLanguage : n.language).toLowerCase();
-
- d._println = console.debug;
-
- // These are in order of decreasing likelihood; this will change in time.
- d._XMLHTTP_PROGIDS = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'];
-
- d._xhrObj= function(){
- // summary:
- // does the work of portably generating a new XMLHTTPRequest
- // object.
- var http = null;
- var last_e = null;
- if(!dojo.isIE || !djConfig.ieForceActiveXXhr){
- try{ http = new XMLHttpRequest(); }catch(e){}
- }
- if(!http){
- for(var i=0; i<3; ++i){
- var progid = dojo._XMLHTTP_PROGIDS[i];
- try{
- http = new ActiveXObject(progid);
- }catch(e){
- last_e = e;
- }
-
- if(http){
- dojo._XMLHTTP_PROGIDS = [progid]; // so faster next time
- break;
- }
- }
- }
-
- if(!http){
- throw new Error("XMLHTTP not available: "+last_e);
- }
-
- return http; // XMLHTTPRequest instance
- }
-
- d._isDocumentOk = function(http){
- var stat = http.status || 0;
- return ( (stat>=200)&&(stat<300))|| // Boolean
- (stat==304)|| // allow any 2XX response code
- (stat==1223)|| // get it out of the cache
- (!stat && (location.protocol=="file:" || location.protocol=="chrome:") ); // Internet Explorer mangled the status code
- }
-
- //See if base tag is in use.
- //This is to fix http://trac.dojotoolkit.org/ticket/3973,
- //but really, we need to find out how to get rid of the dojo._Url reference
- //below and still have DOH work with the dojo.i18n test following some other
- //test that uses the test frame to load a document (trac #2757).
- //Opera still has problems, but perhaps a larger issue of base tag support
- //with XHR requests (hasBase is true, but the request is still made to document
- //path, not base path).
- var owloc = window.location+"";
- var base = document.getElementsByTagName("base");
- var hasBase = (base && base.length > 0);
-
- d._getText = function(/*URI*/ uri, /*Boolean*/ fail_ok){
- // summary: Read the contents of the specified uri and return those contents.
- // uri:
- // A relative or absolute uri. If absolute, it still must be in
- // the same "domain" as we are.
- // fail_ok:
- // Default false. If fail_ok and loading fails, return null
- // instead of throwing.
- // returns: The response text. null is returned when there is a
- // failure and failure is okay (an exception otherwise)
-
- // alert("_getText: " + uri);
-
- // NOTE: must be declared before scope switches ie. this._xhrObj()
- var http = this._xhrObj();
-
- if(!hasBase && dojo._Url){
- uri = (new dojo._Url(owloc, uri)).toString();
- }
- /*
- console.debug("_getText:", uri);
- console.debug(window.location+"");
- alert(uri);
- */
-
- http.open('GET', uri, false);
- try{
- http.send(null);
- // alert(http);
- if(!d._isDocumentOk(http)){
- var err = Error("Unable to load "+uri+" status:"+ http.status);
- err.status = http.status;
- err.responseText = http.responseText;
- throw err;
- }
- }catch(e){
- if(fail_ok){ return null; } // null
- // rethrow the exception
- throw e;
- }
- return http.responseText; // String
- }
- })();
-
- dojo._initFired = false;
- // BEGIN DOMContentLoaded, from Dean Edwards (http://dean.edwards.name/weblog/2006/06/again/)
- dojo._loadInit = function(e){
- dojo._initFired = true;
- // allow multiple calls, only first one will take effect
- // A bug in khtml calls events callbacks for document for event which isnt supported
- // for example a created contextmenu event calls DOMContentLoaded, workaround
- var type = (e && e.type) ? e.type.toLowerCase() : "load";
- if(arguments.callee.initialized || (type!="domcontentloaded" && type!="load")){ return; }
- arguments.callee.initialized = true;
- if(typeof dojo["_khtmlTimer"] != 'undefined'){
- clearInterval(dojo._khtmlTimer);
- delete dojo._khtmlTimer;
- }
-
- if(dojo._inFlightCount == 0){
- dojo._modulesLoaded();
- }
- }
-
- // START DOMContentLoaded
- // Mozilla and Opera 9 expose the event we could use
- if(document.addEventListener){
- // NOTE:
- // due to a threading issue in Firefox 2.0, we can't enable
- // DOMContentLoaded on that platform. For more information, see:
- // http://trac.dojotoolkit.org/ticket/1704
- if(dojo.isOpera|| (dojo.isMoz && (djConfig["enableMozDomContentLoaded"] === true))){
- document.addEventListener("DOMContentLoaded", dojo._loadInit, null);
- }
-
- // mainly for Opera 8.5, won't be fired if DOMContentLoaded fired already.
- // also used for Mozilla because of trac #1640
- window.addEventListener("load", dojo._loadInit, null);
- }
-
- if(/(WebKit|khtml)/i.test(navigator.userAgent)){ // sniff
- dojo._khtmlTimer = setInterval(function(){
- if(/loaded|complete/.test(document.readyState)){
- dojo._loadInit(); // call the onload handler
- }
- }, 10);
- }
- // END DOMContentLoaded
-
- (function(){
-
- var _w = window;
- var _handleNodeEvent = function(/*String*/evtName, /*Function*/fp){
- // summary:
- // non-destructively adds the specified function to the node's
- // evtName handler.
- // evtName: should be in the form "onclick" for "onclick" handlers.
- // Make sure you pass in the "on" part.
- var oldHandler = _w[evtName] || function(){};
- _w[evtName] = function(){
- fp.apply(_w, arguments);
- oldHandler.apply(_w, arguments);
- }
- }
-
- if(dojo.isIE){
- // for Internet Explorer. readyState will not be achieved on init
- // call, but dojo doesn't need it however, we'll include it
- // because we don't know if there are other functions added that
- // might. Note that this has changed because the build process
- // strips all comments -- including conditional ones.
-
- document.write('<scr'+'ipt defer src="//:" '
- + 'onreadystatechange="if(this.readyState==\'complete\'){dojo._loadInit();}">'
- + '</scr'+'ipt>'
- );
-
- // IE WebControl hosted in an application can fire "beforeunload" and "unload"
- // events when control visibility changes, causing Dojo to unload too soon. The
- // following code fixes the problem
- // Reference: http://support.microsoft.com/default.aspx?scid=kb;en-us;199155
- var _unloading = true;
- _handleNodeEvent("onbeforeunload", function(){
- _w.setTimeout(function(){ _unloading = false; }, 0);
- });
- _handleNodeEvent("onunload", function(){
- if(_unloading){ dojo.unloaded(); }
- });
-
- try{
- document.namespaces.add("v","urn:schemas-microsoft-com:vml");
- document.createStyleSheet().addRule("v\\:*", "behavior:url(#default#VML)");
- }catch(e){}
- }else{
- // FIXME: dojo.unloaded requires dojo scope, so using anon function wrapper.
- _handleNodeEvent("onbeforeunload", function() { dojo.unloaded(); });
- }
-
- })();
-
- /*
- OpenAjax.subscribe("OpenAjax", "onload", function(){
- if(dojo._inFlightCount == 0){
- dojo._modulesLoaded();
- }
- });
-
- OpenAjax.subscribe("OpenAjax", "onunload", function(){
- dojo.unloaded();
- });
- */
-} //if (typeof window != 'undefined')
-
-//Load debug code if necessary.
-// dojo.requireIf((djConfig["isDebug"] || djConfig["debugAtAllCosts"]), "dojo.debug");
-
-//window.widget is for Dashboard detection
-//The full conditionals are spelled out to avoid issues during builds.
-//Builds may be looking for require/requireIf statements and processing them.
-// dojo.requireIf(djConfig["debugAtAllCosts"] && !window.widget && !djConfig["useXDomain"], "dojo.browser_debug");
-// dojo.requireIf(djConfig["debugAtAllCosts"] && !window.widget && djConfig["useXDomain"], "dojo.browser_debug_xd");
-
-if(djConfig.isDebug){
- dojo.require("dojo._firebug.firebug");
+if(typeof window!="undefined"){
+dojo.isBrowser=true;
+dojo._name="browser";
+(function(){
+var d=dojo;
+if(document&&document.getElementsByTagName){
+var _1=document.getElementsByTagName("script");
+var _2=/dojo(\.xd)?\.js(\W|$)/i;
+for(var i=0;i<_1.length;i++){
+var _3=_1[i].getAttribute("src");
+if(!_3){
+continue;
+}
+var m=_3.match(_2);
+if(m){
+if(!d.config.baseUrl){
+d.config.baseUrl=_3.substring(0,m.index);
+}
+var _4=_1[i].getAttribute("djConfig");
+if(_4){
+var _5=eval("({ "+_4+" })");
+for(var x in _5){
+dojo.config[x]=_5[x];
+}
+}
+break;
+}
+}
+}
+d.baseUrl=d.config.baseUrl;
+var n=navigator;
+var _6=n.userAgent,_7=n.appVersion,tv=parseFloat(_7);
+if(_6.indexOf("Opera")>=0){
+d.isOpera=tv;
+}
+if(_6.indexOf("AdobeAIR")>=0){
+d.isAIR=1;
+}
+d.isKhtml=(_7.indexOf("Konqueror")>=0)?tv:0;
+d.isWebKit=parseFloat(_6.split("WebKit/")[1])||undefined;
+d.isChrome=parseFloat(_6.split("Chrome/")[1])||undefined;
+d.isMac=_7.indexOf("Macintosh")>=0;
+var _8=Math.max(_7.indexOf("WebKit"),_7.indexOf("Safari"),0);
+if(_8&&!dojo.isChrome){
+d.isSafari=parseFloat(_7.split("Version/")[1]);
+if(!d.isSafari||parseFloat(_7.substr(_8+7))<=419.3){
+d.isSafari=2;
+}
+}
+if(_6.indexOf("Gecko")>=0&&!d.isKhtml&&!d.isWebKit){
+d.isMozilla=d.isMoz=tv;
+}
+if(d.isMoz){
+d.isFF=parseFloat(_6.split("Firefox/")[1]||_6.split("Minefield/")[1])||undefined;
+}
+if(document.all&&!d.isOpera){
+d.isIE=parseFloat(_7.split("MSIE ")[1])||undefined;
+var _9=document.documentMode;
+if(_9&&_9!=5&&Math.floor(d.isIE)!=_9){
+d.isIE=_9;
+}
+}
+if(dojo.isIE&&window.location.protocol==="file:"){
+dojo.config.ieForceActiveXXhr=true;
+}
+d.isQuirks=document.compatMode=="BackCompat";
+d.locale=dojo.config.locale||(d.isIE?n.userLanguage:n.language).toLowerCase();
+d._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];
+d._xhrObj=function(){
+var _a,_b;
+if(!dojo.isIE||!dojo.config.ieForceActiveXXhr){
+try{
+_a=new XMLHttpRequest();
+}
+catch(e){
+}
+}
+if(!_a){
+for(var i=0;i<3;++i){
+var _c=d._XMLHTTP_PROGIDS[i];
+try{
+_a=new ActiveXObject(_c);
+}
+catch(e){
+_b=e;
+}
+if(_a){
+d._XMLHTTP_PROGIDS=[_c];
+break;
+}
+}
+}
+if(!_a){
+throw new Error("XMLHTTP not available: "+_b);
+}
+return _a;
+};
+d._isDocumentOk=function(_d){
+var _e=_d.status||0,lp=location.protocol;
+return (_e>=200&&_e<300)||_e==304||_e==1223||(!_e&&(lp=="file:"||lp=="chrome:"||lp=="app:"));
+};
+var _f=window.location+"";
+var _10=document.getElementsByTagName("base");
+var _11=(_10&&_10.length>0);
+d._getText=function(uri,_12){
+var _13=d._xhrObj();
+if(!_11&&dojo._Url){
+uri=(new dojo._Url(_f,uri)).toString();
}
-
-if(djConfig.debugAtAllCosts){
- djConfig.useXDomain = true;
- dojo.require("dojo._base._loader.loader_xd");
- dojo.require("dojo._base._loader.loader_debug");
- dojo.require("dojo.i18n");
+if(d.config.cacheBust){
+uri+="";
+uri+=(uri.indexOf("?")==-1?"?":"&")+String(d.config.cacheBust).replace(/\W+/g,"");
+}
+_13.open("GET",uri,false);
+try{
+_13.send(null);
+if(!d._isDocumentOk(_13)){
+var err=Error("Unable to load "+uri+" status:"+_13.status);
+err.status=_13.status;
+err.responseText=_13.responseText;
+throw err;
+}
+}
+catch(e){
+if(_12){
+return null;
+}
+throw e;
+}
+return _13.responseText;
+};
+var _14=window;
+var _15=function(_16,fp){
+var _17=_14.attachEvent||_14.addEventListener;
+_16=_14.attachEvent?_16:_16.substring(2);
+_17(_16,function(){
+fp.apply(_14,arguments);
+},false);
+};
+d._windowUnloaders=[];
+d.windowUnloaded=function(){
+var mll=d._windowUnloaders;
+while(mll.length){
+(mll.pop())();
+}
+};
+var _18=0;
+d.addOnWindowUnload=function(obj,_19){
+d._onto(d._windowUnloaders,obj,_19);
+if(!_18){
+_18=1;
+_15("onunload",d.windowUnloaded);
+}
+};
+var _1a=0;
+d.addOnUnload=function(obj,_1b){
+d._onto(d._unloaders,obj,_1b);
+if(!_1a){
+_1a=1;
+_15("onbeforeunload",dojo.unloaded);
}
+};
+})();
+dojo._initFired=false;
+dojo._loadInit=function(e){
+if(!dojo._initFired){
+dojo._initFired=true;
+if(!dojo.config.afterOnLoad&&window.detachEvent){
+window.detachEvent("onload",dojo._loadInit);
+}
+if(dojo._inFlightCount==0){
+dojo._modulesLoaded();
+}
+}
+};
+if(!dojo.config.afterOnLoad){
+if(document.addEventListener){
+document.addEventListener("DOMContentLoaded",dojo._loadInit,false);
+window.addEventListener("load",dojo._loadInit,false);
+}else{
+if(window.attachEvent){
+window.attachEvent("onload",dojo._loadInit);
+}
+}
+}
+if(dojo.isIE){
+if(!dojo.config.afterOnLoad&&!dojo.config.skipIeDomLoaded){
+document.write("<scr"+"ipt defer src=\"//:\" "+"onreadystatechange=\"if(this.readyState=='complete'){"+dojo._scopeName+"._loadInit();}\">"+"</scr"+"ipt>");
+}
+try{
+document.namespaces.add("v","urn:schemas-microsoft-com:vml");
+var vmlElems=["*","group","roundrect","oval","shape","rect","imagedata"],i=0,l=1,s=document.createStyleSheet();
+if(dojo.isIE>=8){
+i=1;
+l=vmlElems.length;
+}
+for(;i<l;++i){
+s.addRule("v\\:"+vmlElems[i],"behavior:url(#default#VML); display:inline-block");
+}
+}
+catch(e){
+}
+}
+}
+(function(){
+var mp=dojo.config["modulePaths"];
+if(mp){
+for(var _1c in mp){
+dojo.registerModulePath(_1c,mp[_1c]);
+}
+}
+})();
+if(dojo.config.isDebug){
+dojo.require("dojo._firebug.firebug");
+}
+if(dojo.config.debugAtAllCosts){
+dojo.config.useXDomain=true;
+dojo.require("dojo._base._loader.loader_xd");
+dojo.require("dojo._base._loader.loader_debug");
+dojo.require("dojo.i18n");
+}
diff --git a/js/dojo/dojo/_base/_loader/hostenv_rhino.js b/js/dojo/dojo/_base/_loader/hostenv_rhino.js
--- a/js/dojo/dojo/_base/_loader/hostenv_rhino.js
+++ b/js/dojo/dojo/_base/_loader/hostenv_rhino.js
@@ -1,235 +1,153 @@
/*
-* Rhino host environment
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
*/
-if(djConfig["baseUrl"]){
- dojo.baseUrl = djConfig["baseUrl"];
+
+if(dojo.config["baseUrl"]){
+dojo.baseUrl=dojo.config["baseUrl"];
}else{
- dojo.baseUrl = "./";
+dojo.baseUrl="./";
+}
+dojo.locale=dojo.locale||String(java.util.Locale.getDefault().toString().replace("_","-").toLowerCase());
+dojo._name="rhino";
+dojo.isRhino=true;
+if(typeof print=="function"){
+console.debug=print;
}
-
-dojo.locale = dojo.locale || String(java.util.Locale.getDefault().toString().replace('_','-').toLowerCase());
-dojo._name = 'rhino';
-dojo.isRhino = true;
-
-if(typeof print == "function"){
- console.debug = print;
+if(!("byId" in dojo)){
+dojo.byId=function(id,_1){
+if(id&&(typeof id=="string"||id instanceof String)){
+if(!_1){
+_1=document;
+}
+return _1.getElementById(id);
}
-
-if(typeof dojo["byId"] == "undefined"){
- dojo.byId = function(id, doc){
- if(id && (typeof id == "string" || id instanceof String)){
- if(!doc){ doc = document; }
- return doc.getElementById(id);
- }
- return id; // assume it's a node
- }
+return id;
+};
+}
+dojo._isLocalUrl=function(_2){
+var _3=(new java.io.File(_2)).exists();
+if(!_3){
+var _4;
+try{
+_4=(new java.net.URL(_2)).openStream();
+_4.close();
}
-
-// see comments in spidermonkey loadUri
-dojo._loadUri = function(uri, cb){
- try{
- var local = (new java.io.File(uri)).exists();
- if(!local){
- try{
- // try it as a file first, URL second
- var stream = (new java.net.URL(uri)).openStream();
- // close the stream so we don't leak resources
- stream.close();
- }catch(e){
- // no debug output; this failure just means the uri was not found.
- return false;
- }
- }
- //FIXME: Use Rhino 1.6 native readFile/readUrl if available?
- if(cb){
- var contents = (local ? readText : readUri)(uri, "UTF-8");
- cb(eval('('+contents+')'));
- }else{
- load(uri);
- }
- return true;
- }catch(e){
- console.debug("rhino load('" + uri + "') failed. Exception: " + e);
- return false;
- }
+finally{
+if(_4&&_4.close){
+_4.close();
+}
+}
+}
+return _3;
+};
+dojo._loadUri=function(_5,cb){
+try{
+var _6;
+try{
+_6=dojo._isLocalUrl(_5);
}
-
-dojo.exit = function(exitcode){
- quit(exitcode);
+catch(e){
+return false;
+}
+if(cb){
+var _7=(_6?readText:readUri)(_5,"UTF-8");
+if(!eval("'‏'").length){
+_7=String(_7).replace(/[\u200E\u200F\u202A-\u202E]/g,function(_8){
+return "\\u"+_8.charCodeAt(0).toString(16);
+});
+}
+cb(eval("("+_7+")"));
+}else{
+load(_5);
+}
+return true;
+}
+catch(e){
+return false;
}
-
-// Hack to determine current script...
-//
-// These initial attempts failed:
-// 1. get an EcmaError and look at e.getSourceName(): try {eval ("static in return")} catch(e) { ...
-// Won't work because NativeGlobal.java only does a put of "name" and "message", not a wrapped reflecting object.
-// Even if the EcmaError object had the sourceName set.
-//
-// 2. var e = Packages.org.mozilla.javascript.Context.getCurrentContext().reportError('');
-// Won't work because it goes directly to the errorReporter, not the return value.
-// We want context.interpreterSourceFile and context.interpreterLine, which are used in static Context.getSourcePositionFromStack
-// (set by Interpreter.java at interpretation time, if in interpreter mode).
-//
-// 3. var e = Packages.org.mozilla.javascript.Context.getCurrentContext().reportRuntimeError('');
-// This returns an object, but e.message still does not have source info.
-// In compiler mode, perhaps not set; in interpreter mode, perhaps not used by errorReporter?
-//
-// What we found works is to do basically the same hack as is done in getSourcePositionFromStack,
-// making a new java.lang.Exception() and then calling printStackTrace on a string stream.
-// We have to parse the string for the .js files (different from the java files).
-// This only works however in compiled mode (-opt 0 or higher).
-// In interpreter mode, entire stack is java.
-// When compiled, printStackTrace is like:
-// java.lang.Exception
-// at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
-// at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
-// at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
-// at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
-// at org.mozilla.javascript.NativeJavaClass.constructSpecific(NativeJavaClass.java:228)
-// at org.mozilla.javascript.NativeJavaClass.construct(NativeJavaClass.java:185)
-// at org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:1269)
-// at org.mozilla.javascript.gen.c2.call(/Users/mda/Sites/burstproject/testrhino.js:27)
-// ...
-// at org.mozilla.javascript.tools.shell.Main.main(Main.java:76)
-//
-// Note may get different answers based on:
-// Context.setOptimizationLevel(-1)
-// Context.setGeneratingDebug(true)
-// Context.setGeneratingSource(true)
-//
-// Some somewhat helpful posts:
-// http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&selm=9v9n0g%246gr1%40ripley.netscape.com
-// http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&selm=3BAA2DC4.6010702%40atg.com
-//
-// Note that Rhino1.5R5 added source name information in some exceptions.
-// But this seems not to help in command-line Rhino, because Context.java has an error reporter
-// so no EvaluationException is thrown.
-
-// do it by using java java.lang.Exception
-dojo._rhinoCurrentScriptViaJava = function(depth){
- var optLevel = Packages.org.mozilla.javascript.Context.getCurrentContext().getOptimizationLevel();
- var caw = new java.io.CharArrayWriter();
- var pw = new java.io.PrintWriter(caw);
- var exc = new java.lang.Exception();
- var s = caw.toString();
- // we have to exclude the ones with or without line numbers because they put double entries in:
- // at org.mozilla.javascript.gen.c3._c4(/Users/mda/Sites/burstproject/burst/Runtime.js:56)
- // at org.mozilla.javascript.gen.c3.call(/Users/mda/Sites/burstproject/burst/Runtime.js)
- var matches = s.match(/[^\(]*\.js\)/gi);
- if(!matches){
- throw Error("cannot parse printStackTrace output: " + s);
- }
-
- // matches[0] is entire string, matches[1] is this function, matches[2] is caller, ...
- var fname = ((typeof depth != 'undefined')&&(depth)) ? matches[depth + 1] : matches[matches.length - 1];
- var fname = matches[3];
- if(!fname){ fname = matches[1]; }
- // print("got fname '" + fname + "' from stack string '" + s + "'");
- if (!fname){ throw Error("could not find js file in printStackTrace output: " + s); }
- //print("Rhino getCurrentScriptURI returning '" + fname + "' from: " + s);
- return fname;
+};
+dojo.exit=function(_9){
+quit(_9);
+};
+function readText(_a,_b){
+_b=_b||"utf-8";
+var jf=new java.io.File(_a);
+var is=new java.io.FileInputStream(jf);
+return dj_readInputStream(is,_b);
+};
+function readUri(_c,_d){
+var _e=(new java.net.URL(_c)).openConnection();
+_d=_d||_e.getContentEncoding()||"utf-8";
+var is=_e.getInputStream();
+return dj_readInputStream(is,_d);
+};
+function dj_readInputStream(is,_f){
+var _10=new java.io.BufferedReader(new java.io.InputStreamReader(is,_f));
+try{
+var sb=new java.lang.StringBuffer();
+var _11="";
+while((_11=_10.readLine())!==null){
+sb.append(_11);
+sb.append(java.lang.System.getProperty("line.separator"));
}
-
-// reading a file from disk in Java is a humiliating experience by any measure.
-// Lets avoid that and just get the freaking text
-function readText(path, encoding){
- encoding = encoding || "utf-8";
- // NOTE: we intentionally avoid handling exceptions, since the caller will
- // want to know
- var jf = new java.io.File(path);
- var is = new java.io.FileInputStream(jf);
- return dj_readInputStream(is, encoding);
+return sb.toString();
+}
+finally{
+_10.close();
+}
+};
+dojo._getText=function(uri,_12){
+try{
+var _13=dojo._isLocalUrl(uri);
+var _14=(_13?readText:readUri)(uri,"UTF-8");
+if(_14!==null){
+_14+="";
+}
+return _14;
}
-
-function readUri(uri, encoding){
- var conn = (new java.net.URL(uri)).openConnection();
- encoding = encoding || conn.getContentEncoding() || "utf-8";
- var is = conn.getInputStream();
- return dj_readInputStream(is, encoding);
+catch(e){
+if(_12){
+return null;
+}else{
+throw e;
+}
}
-
-function dj_readInputStream(is, encoding){
- var input = new java.io.BufferedReader(new java.io.InputStreamReader(is, encoding));
- try {
- var sb = new java.lang.StringBuffer();
- var line = "";
- while((line = input.readLine()) !== null){
- sb.append(line);
- sb.append(java.lang.System.getProperty("line.separator"));
- }
- return sb.toString();
- } finally {
- input.close();
- }
-}
-
-// call this now because later we may not be on the top of the stack
-if(!djConfig.libraryScriptUri.length){
- try{
- djConfig.libraryScriptUri = dojo._rhinoCurrentScriptViaJava(1);
- }catch(e){
- // otherwise just fake it
- if(djConfig["isDebug"]){
- print("\n");
- print("we have no idea where Dojo is located.");
- print("Please try loading rhino in a non-interpreted mode or set a");
- print("\n\tdjConfig.libraryScriptUri\n");
- print("Setting the dojo path to './'");
- print("This is probably wrong!");
- print("\n");
- print("Dojo will try to load anyway");
- }
- djConfig.libraryScriptUri = "./";
- }
+};
+dojo.doc=typeof document!="undefined"?document:null;
+dojo.body=function(){
+return document.body;
+};
+if(typeof setTimeout=="undefined"||typeof clearTimeout=="undefined"){
+dojo._timeouts=[];
+clearTimeout=function(idx){
+if(!dojo._timeouts[idx]){
+return;
}
-
-// summary:
-// return the document object associated with the dojo.global
-dojo.doc = typeof(document) != "undefined" ? document : null;
-
-dojo.body = function(){
- return document.body;
+dojo._timeouts[idx].stop();
+};
+setTimeout=function(_15,_16){
+var def={sleepTime:_16,hasSlept:false,run:function(){
+if(!this.hasSlept){
+this.hasSlept=true;
+java.lang.Thread.currentThread().sleep(this.sleepTime);
}
-
-dojo._timeouts = [];
-
-function clearTimeout(idx){
- if(!dojo._timeouts[idx]){ return; }
- dojo._timeouts[idx].stop();
+try{
+_15();
+}
+catch(e){
}
-
-function setTimeout(func, delay){
- // summary: provides timed callbacks using Java threads
-
- var def={
- sleepTime:delay,
- hasSlept:false,
-
- run:function(){
- if(!this.hasSlept){
- this.hasSlept=true;
- java.lang.Thread.currentThread().sleep(this.sleepTime);
- }
- try{
- func();
- }catch(e){
- console.debug("Error running setTimeout thread:" + e);
- }
- }
- };
-
- var runnable = new java.lang.Runnable(def);
- var thread = new java.lang.Thread(runnable);
- thread.start();
- return dojo._timeouts.push(thread)-1;
+}};
+var _17=new java.lang.Runnable(def);
+var _18=new java.lang.Thread(_17);
+_18.start();
+return dojo._timeouts.push(_18)-1;
+};
}
-
-//Register any module paths set up in djConfig. Need to do this
-//in the hostenvs since hostenv_browser can read djConfig from a
-//script tag's attribute.
-if(djConfig["modulePaths"]){
- for(var param in djConfig["modulePaths"]){
- dojo.registerModulePath(param, djConfig["modulePaths"][param]);
- }
+if(dojo.config["modulePaths"]){
+for(var param in dojo.config["modulePaths"]){
+dojo.registerModulePath(param,dojo.config["modulePaths"][param]);
}
+}
diff --git a/js/dojo/dojo/_base/_loader/hostenv_spidermonkey.js b/js/dojo/dojo/_base/_loader/hostenv_spidermonkey.js
--- a/js/dojo/dojo/_base/_loader/hostenv_spidermonkey.js
+++ b/js/dojo/dojo/_base/_loader/hostenv_spidermonkey.js
@@ -1,73 +1,50 @@
/*
- * SpiderMonkey host environment
- */
-
-if(djConfig["baseUrl"]){
- dojo.baseUrl = djConfig["baseUrl"];
-}else{
- dojo.baseUrl = "./";
-}
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo._name = 'spidermonkey';
-dojo.isSpidermonkey = true;
-dojo.exit = function(exitcode){
- quit(exitcode);
-}
-
-if(typeof print == "function"){
- console.debug = print;
-}
-
-if(typeof line2pc == 'undefined'){
- throw new Error("attempt to use SpiderMonkey host environment when no 'line2pc' global");
-}
-dojo._spidermonkeyCurrentFile = function(depth){
- //
- // This is a hack that determines the current script file by parsing a
- // generated stack trace (relying on the non-standard "stack" member variable
- // of the SpiderMonkey Error object).
- //
- // If param depth is passed in, it'll return the script file which is that far down
- // the stack, but that does require that you know how deep your stack is when you are
- // calling.
- //
- var s = '';
- try{
- throw Error("whatever");
- }catch(e){
- s = e.stack;
- }
- // lines are like: bu_getCurrentScriptURI_spidermonkey("ScriptLoader.js")@burst/Runtime.js:101
- var matches = s.match(/[^@]*\.js/gi);
- if(!matches){
- throw Error("could not parse stack string: '" + s + "'");
- }
- var fname = (typeof depth != 'undefined' && depth) ? matches[depth + 1] : matches[matches.length - 1];
- if(!fname){
- throw Error("could not find file name in stack string '" + s + "'");
- }
- //print("SpiderMonkeyRuntime got fname '" + fname + "' from stack string '" + s + "'");
- return fname;
+if(dojo.config["baseUrl"]){
+dojo.baseUrl=dojo.config["baseUrl"];
+}else{
+dojo.baseUrl="./";
+}
+dojo._name="spidermonkey";
+dojo.isSpidermonkey=true;
+dojo.exit=function(_1){
+quit(_1);
+};
+if(typeof print=="function"){
+console.debug=print;
+}
+if(typeof line2pc=="undefined"){
+throw new Error("attempt to use SpiderMonkey host environment when no 'line2pc' global");
+}
+dojo._spidermonkeyCurrentFile=function(_2){
+var s="";
+try{
+throw Error("whatever");
}
-
-// print(dojo._spidermonkeyCurrentFile(0));
-
-dojo._loadUri = function(uri){
- // spidermonkey load() evaluates the contents into the global scope (which
- // is what we want).
- // TODO: sigh, load() does not return a useful value.
- // Perhaps it is returning the value of the last thing evaluated?
- var ok = load(uri);
- // console.debug("spidermonkey load(", uri, ") returned ", ok);
- return 1;
+catch(e){
+s=e.stack;
+}
+var _3=s.match(/[^@]*\.js/gi);
+if(!_3){
+throw Error("could not parse stack string: '"+s+"'");
+}
+var _4=(typeof _2!="undefined"&&_2)?_3[_2+1]:_3[_3.length-1];
+if(!_4){
+throw Error("could not find file name in stack string '"+s+"'");
}
-
-//Register any module paths set up in djConfig. Need to do this
-//in the hostenvs since hostenv_browser can read djConfig from a
-//script tag's attribute.
-if(djConfig["modulePaths"]){
- for(var param in djConfig["modulePaths"]){
- dojo.registerModulePath(param, djConfig["modulePaths"][param]);
- }
+return _4;
+};
+dojo._loadUri=function(_5){
+var ok=load(_5);
+return 1;
+};
+if(dojo.config["modulePaths"]){
+for(var param in dojo.config["modulePaths"]){
+dojo.registerModulePath(param,dojo.config["modulePaths"][param]);
}
+}
diff --git a/js/dojo/dojo/_base/_loader/loader.js b/js/dojo/dojo/_base/_loader/loader.js
--- a/js/dojo/dojo/_base/_loader/loader.js
+++ b/js/dojo/dojo/_base/_loader/loader.js
@@ -1,618 +1,300 @@
-if(!dojo._hasResource["dojo.foo"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.foo"] = true;
/*
- * loader.js - A bootstrap module. Runs before the hostenv_*.js file. Contains
- * all of the package loading methods.
- */
-
-(function(){
- var d = dojo;
-
- dojo.mixin(dojo, {
- _loadedModules: {},
- _inFlightCount: 0,
- _hasResource: {},
-
- // FIXME: it should be possible to pull module prefixes in from djConfig
- _modulePrefixes: {
- dojo: {name: "dojo", value: "."},
- doh: {name: "doh", value: "../util/doh"},
- tests: {name: "tests", value: "tests"}
- },
-
- _moduleHasPrefix: function(/*String*/module){
- // summary: checks to see if module has been established
- var mp = this._modulePrefixes;
- return !!(mp[module] && mp[module].value); // Boolean
- },
-
- _getModulePrefix: function(/*String*/module){
- // summary: gets the prefix associated with module
- var mp = this._modulePrefixes;
- if(this._moduleHasPrefix(module)){
- return mp[module].value; // String
- }
- return module; // String
- },
-
- _loadedUrls: [],
-
- //WARNING:
- // This variable is referenced by packages outside of bootstrap:
- // FloatingPane.js and undo/browser.js
- _postLoad: false,
-
- //Egad! Lots of test files push on this directly instead of using dojo.addOnLoad.
- _loaders: [],
- _unloaders: [],
- _loadNotifying: false
- });
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- //>>excludeStart("xdomainExclude", fileName.indexOf("dojo.xd.js") != -1 && kwArgs.loader == "xdomain");
- dojo._loadPath = function(/*String*/relpath, /*String?*/module, /*Function?*/cb){
- // summary:
- // Load a Javascript module given a relative path
- //
- // description:
- // Loads and interprets the script located at relpath, which is
- // relative to the script root directory. If the script is found but
- // its interpretation causes a runtime exception, that exception is
- // not caught by us, so the caller will see it. We return a true
- // value if and only if the script is found.
- //
- // relpath:
- // A relative path to a script (no leading '/', and typically ending
- // in '.js').
- // module:
- // A module whose existance to check for after loading a path. Can be
- // used to determine success or failure of the load.
- // cb:
- // a callback function to pass the result of evaluating the script
-
- var uri = (((relpath.charAt(0) == '/' || relpath.match(/^\w+:/))) ? "" : this.baseUrl) + relpath;
- if(djConfig.cacheBust && d.isBrowser){
- uri += "?" + String(djConfig.cacheBust).replace(/\W+/g,"");
- }
- try{
- return !module ? this._loadUri(uri, cb) : this._loadUriAndCheck(uri, module, cb); // Boolean
- }catch(e){
- console.debug(e);
- return false; // Boolean
- }
- }
-
- dojo._loadUri = function(/*String (URL)*/uri, /*Function?*/cb){
- // summary:
- // Loads JavaScript from a URI
- // description:
- // Reads the contents of the URI, and evaluates the contents. This is
- // used to load modules as well as resource bundles. Returns true if
- // it succeeded. Returns false if the URI reading failed. Throws if
- // the evaluation throws.
- // uri: a uri which points at the script to be loaded
- // cb:
- // a callback function to process the result of evaluating the script
- // as an expression, typically used by the resource bundle loader to
- // load JSON-style resources
-
- if(this._loadedUrls[uri]){
- return true; // Boolean
- }
- var contents = this._getText(uri, true);
- if(!contents){ return false; } // Boolean
- this._loadedUrls[uri] = true;
- this._loadedUrls.push(uri);
- if(cb){ contents = '('+contents+')'; }
- var value = d["eval"](contents+"\r\n//@ sourceURL="+uri);
- if(cb){ cb(value); }
- return true; // Boolean
- }
- //>>excludeEnd("xdomainExclude");
-
- // FIXME: probably need to add logging to this method
- dojo._loadUriAndCheck = function(/*String (URL)*/uri, /*String*/moduleName, /*Function?*/cb){
- // summary: calls loadUri then findModule and returns true if both succeed
- var ok = false;
- try{
- ok = this._loadUri(uri, cb);
- }catch(e){
- console.debug("failed loading " + uri + " with error: " + e);
- }
- return Boolean(ok && this._loadedModules[moduleName]); // Boolean
- }
-
- dojo.loaded = function(){
- // summary:
- // signal fired when initial environment and package loading is
- // complete. You may use dojo.addOnLoad() or dojo.connect() to
- // this method in order to handle initialization tasks that
- // require the environment to be initialized. In a browser host,
- // declarative widgets will be constructed when this function
- // finishes runing.
- this._loadNotifying = true;
- this._postLoad = true;
- var mll = this._loaders;
-
- //Clear listeners so new ones can be added
- //For other xdomain package loads after the initial load.
- this._loaders = [];
-
- for(var x=0; x<mll.length; x++){
- mll[x]();
- }
-
- this._loadNotifying = false;
-
- //Make sure nothing else got added to the onload queue
- //after this first run. If something did, and we are not waiting for any
- //more inflight resources, run again.
- if(d._postLoad && d._inFlightCount == 0 && this._loaders.length > 0){
- d._callLoaded();
- }
- }
-
- dojo.unloaded = function(){
- // summary:
- // signal fired by impending environment destruction. You may use
- // dojo.addOnUnload() or dojo.connect() to this method to perform
- // page/application cleanup methods.
- var mll = this._unloaders;
- while(mll.length){
- (mll.pop())();
- }
- }
-
- dojo.addOnLoad = function(/*Object?*/obj, /*String|Function*/functionName){
- // summary:
- // Registers a function to be triggered after the DOM has finished
- // loading and widgets declared in markup have been instantiated.
- // Images and CSS files may or may not have finished downloading when
- // the specified function is called. (Note that widgets' CSS and HTML
- // code is guaranteed to be downloaded before said widgets are
- // instantiated.)
- // example:
- // | dojo.addOnLoad(functionPointer);
- // | dojo.addOnLoad(object, "functionName");
- if(arguments.length == 1){
- d._loaders.push(obj);
- }else if(arguments.length > 1){
- d._loaders.push(function(){
- obj[functionName]();
- });
- }
-
- //Added for xdomain loading. dojo.addOnLoad is used to
- //indicate callbacks after doing some dojo.require() statements.
- //In the xdomain case, if all the requires are loaded (after initial
- //page load), then immediately call any listeners.
- if(d._postLoad && d._inFlightCount == 0 && !d._loadNotifying){
- d._callLoaded();
- }
- }
-
- dojo.addOnUnload = function(/*Object?*/obj, /*String|Function?*/functionName){
- // summary: registers a function to be triggered when the page unloads
- // example:
- // | dojo.addOnUnload(functionPointer)
- // | dojo.addOnUnload(object, "functionName")
- if(arguments.length == 1){
- d._unloaders.push(obj);
- }else if(arguments.length > 1){
- d._unloaders.push(function(){
- obj[functionName]();
- });
- }
- }
-
- dojo._modulesLoaded = function(){
- if(d._postLoad){ return; }
- if(d._inFlightCount > 0){
- console.debug("files still in flight!");
- return;
- }
- d._callLoaded();
- }
-
- dojo._callLoaded = function(){
- //The "object" check is for IE, and the other opera check fixes an issue
- //in Opera where it could not find the body element in some widget test cases.
- //For 0.9, maybe route all browsers through the setTimeout (need protection
- //still for non-browser environments though). This might also help the issue with
- //FF 2.0 and freezing issues where we try to do sync xhr while background css images
- //are being loaded (trac #2572)? Consider for 0.9.
- if(typeof setTimeout == "object" || (djConfig["useXDomain"] && d.isOpera)){
- setTimeout("dojo.loaded();", 0);
- }else{
- d.loaded();
- }
- }
-
- dojo._getModuleSymbols = function(/*String*/modulename){
- // summary:
- // Converts a module name in dotted JS notation to an array
- // representing the path in the source tree
- var syms = modulename.split(".");
- for(var i = syms.length; i>0; i--){
- var parentModule = syms.slice(0, i).join(".");
- if((i==1) && !this._moduleHasPrefix(parentModule)){
- // Support default module directory (sibling of dojo) for top-level modules
- syms[0] = "../" + syms[0];
- }else{
- var parentModulePath = this._getModulePrefix(parentModule);
- if(parentModulePath != parentModule){
- syms.splice(0, i, parentModulePath);
- break;
- }
- }
- }
- // console.debug(syms);
- return syms; // Array
- }
-
- dojo._global_omit_module_check = false;
-
- dojo._loadModule = dojo.require = function(/*String*/moduleName, /*Boolean?*/omitModuleCheck){
- // summary:
- // loads a Javascript module from the appropriate URI
- // moduleName: String
- // omitModuleCheck: Boolean?
- // description:
- // _loadModule("A.B") first checks to see if symbol A.B is defined. If
- // it is, it is simply returned (nothing to do).
- //
- // If it is not defined, it will look for "A/B.js" in the script root
- // directory.
- //
- // It throws if it cannot find a file to load, or if the symbol A.B is
- // not defined after loading.
- //
- // It returns the object A.B.
- //
- // This does nothing about importing symbols into the current package.
- // It is presumed that the caller will take care of that. For example,
- // to import all symbols:
- //
- // | with (dojo._loadModule("A.B")) {
- // | ...
- // | }
- //
- // And to import just the leaf symbol:
- //
- // | var B = dojo._loadModule("A.B");
- // | ...
- // returns: the required namespace object
- omitModuleCheck = this._global_omit_module_check || omitModuleCheck;
- var module = this._loadedModules[moduleName];
- if(module){
- return module;
- }
-
- // convert periods to slashes
- var relpath = this._getModuleSymbols(moduleName).join("/") + '.js';
-
- var modArg = (!omitModuleCheck) ? moduleName : null;
- var ok = this._loadPath(relpath, modArg);
-
- if((!ok)&&(!omitModuleCheck)){
- throw new Error("Could not load '" + moduleName + "'; last tried '" + relpath + "'");
- }
-
- // check that the symbol was defined
- // Don't bother if we're doing xdomain (asynchronous) loading.
- if((!omitModuleCheck)&&(!this["_isXDomain"])){
- // pass in false so we can give better error
- module = this._loadedModules[moduleName];
- if(!module){
- throw new Error("symbol '" + moduleName + "' is not defined after loading '" + relpath + "'");
- }
- }
-
- return module;
- }
-
- dojo.provide = function(/*String*/ resourceName){
- // summary:
- // Each javascript source file must have (exactly) one dojo.provide()
- // call at the top of the file, corresponding to the file name.
- // For example, js/dojo/foo.js must have dojo.provide("dojo.foo"); at the
- // top of the file.
- // description:
- // Each javascript source file is called a resource. When a resource
- // is loaded by the browser, dojo.provide() registers that it has been
- // loaded.
- //
- // For backwards compatibility reasons, in addition to registering the
- // resource, dojo.provide() also ensures that the javascript object
- // for the module exists. For example,
- // dojo.provide("dojo.io.cometd"), in addition to registering that
- // cometd.js is a resource for the dojo.iomodule, will ensure that
- // the dojo.io javascript object exists, so that calls like
- // dojo.io.foo = function(){ ... } don't fail.
- //
- // In the case of a build (or in the future, a rollup), where multiple
- // javascript source files are combined into one bigger file (similar
- // to a .lib or .jar file), that file will contain multiple
- // dojo.provide() calls, to note that it includes multiple resources.
-
- //Make sure we have a string.
- resourceName = resourceName + "";
- return (d._loadedModules[resourceName] = d.getObject(resourceName, true)); // Object
- }
-
- //Start of old bootstrap2:
-
- dojo.platformRequire = function(/*Object containing Arrays*/modMap){
- // description:
- // This method taks a "map" of arrays which one can use to optionally
- // load dojo modules. The map is indexed by the possible
- // dojo.name_ values, with two additional values: "default"
- // and "common". The items in the "default" array will be loaded if
- // none of the other items have been choosen based on the
- // hostenv.name_ item. The items in the "common" array will _always_
- // be loaded, regardless of which list is chosen. Here's how it's
- // normally called:
- //
- // | dojo.platformRequire({
- // | // an example that passes multiple args to _loadModule()
- // | browser: [
- // | ["foo.bar.baz", true, true],
- // | "foo.sample",
- // | "foo.test,
- // | ],
- // | default: [ "foo.sample.*" ],
- // | common: [ "really.important.module.*" ]
- // | });
-
- // FIXME: dojo.name_ no longer works!!
-
- var common = modMap["common"]||[];
- var result = common.concat(modMap[d._name]||modMap["default"]||[]);
-
- for(var x=0; x<result.length; x++){
- var curr = result[x];
- if(curr.constructor == Array){
- d._loadModule.apply(d, curr);
- }else{
- d._loadModule(curr);
- }
- }
- }
-
-
- dojo.requireIf = function(/*Boolean*/ condition, /*String*/ resourceName){
- // summary:
- // If the condition is true then call dojo.require() for the specified
- // resource
- if(condition === true){
- // FIXME: why do we support chained require()'s here? does the build system?
- var args = [];
- for(var i = 1; i < arguments.length; i++){
- args.push(arguments[i]);
- }
- d.require.apply(d, args);
- }
- }
-
- dojo.requireAfterIf = d.requireIf;
-
- dojo.registerModulePath = function(/*String*/module, /*String*/prefix){
- // summary:
- // maps a module name to a path
- // description:
- // An unregistered module is given the default path of ../<module>,
- // relative to Dojo root. For example, module acme is mapped to
- // ../acme. If you want to use a different module name, use
- // dojo.registerModulePath.
- d._modulePrefixes[module] = { name: module, value: prefix };
- }
-
- dojo.requireLocalization = function(/*String*/moduleName, /*String*/bundleName, /*String?*/locale, /*String?*/availableFlatLocales){
- // summary:
- // Declares translated resources and loads them if necessary, in the
- // same style as dojo.require. Contents of the resource bundle are
- // typically strings, but may be any name/value pair, represented in
- // JSON format. See also dojo.i18n.getLocalization.
- // moduleName:
- // name of the package containing the "nls" directory in which the
- // bundle is found
- // bundleName:
- // bundle name, i.e. the filename without the '.js' suffix
- // locale:
- // the locale to load (optional) By default, the browser's user
- // locale as defined by dojo.locale
- // availableFlatLocales:
- // A comma-separated list of the available, flattened locales for this
- // bundle. This argument should only be set by the build process.
- // description:
- // Load translated resource bundles provided underneath the "nls"
- // directory within a package. Translated resources may be located in
- // different packages throughout the source tree. For example, a
- // particular widget may define one or more resource bundles,
- // structured in a program as follows, where moduleName is
- // mycode.mywidget and bundleNames available include bundleone and
- // bundletwo:
- //
- // ...
- // mycode/
- // mywidget/
- // nls/
- // bundleone.js (the fallback translation, English in this example)
- // bundletwo.js (also a fallback translation)
- // de/
- // bundleone.js
- // bundletwo.js
- // de-at/
- // bundleone.js
- // en/
- // (empty; use the fallback translation)
- // en-us/
- // bundleone.js
- // en-gb/
- // bundleone.js
- // es/
- // bundleone.js
- // bundletwo.js
- // ...etc
- // ...
- //
- // Each directory is named for a locale as specified by RFC 3066,
- // (http://www.ietf.org/rfc/rfc3066.txt), normalized in lowercase.
- // Note that the two bundles in the example do not define all the same
- // variants. For a given locale, bundles will be loaded for that
- // locale and all more general locales above it, including a fallback
- // at the root directory. For example, a declaration for the "de-at"
- // locale will first load nls/de-at/bundleone.js, then
- // nls/de/bundleone.js and finally nls/bundleone.js. The data will be
- // flattened into a single Object so that lookups will follow this
- // cascading pattern. An optional build step can preload the bundles
- // to avoid data redundancy and the multiple network hits normally
- // required to load these resources.
-
- d.require("dojo.i18n");
- d.i18n._requireLocalization.apply(d.hostenv, arguments);
- };
-
-
- var ore = new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$");
- var ire = new RegExp("^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$");
-
- dojo._Url = function(/*dojo._Url||String...*/){
- // summary:
- // Constructor to create an object representing a URL.
- // It is marked as private, since we might consider removing
- // or simplifying it.
- // description:
- // Each argument is evaluated in order relative to the next until
- // a canonical uri is produced. To get an absolute Uri relative to
- // the current document use:
- // new dojo._Url(document.baseURI, url)
-
- var n = null;
-
- // TODO: support for IPv6, see RFC 2732
- var _a = arguments;
- var uri = _a[0];
- // resolve uri components relative to each other
- for(var i = 1; i<_a.length; i++){
- if(!_a[i]){ continue; }
-
- // Safari doesn't support this.constructor so we have to be explicit
- // FIXME: Tracked (and fixed) in Webkit bug 3537.
- // http://bugs.webkit.org/show_bug.cgi?id=3537
- var relobj = new d._Url(_a[i]+"");
- var uriobj = new d._Url(uri+"");
-
- if(
- (relobj.path=="") &&
- (!relobj.scheme) &&
- (!relobj.authority) &&
- (!relobj.query)
- ){
- if(relobj.fragment != n){
- uriobj.fragment = relobj.fragment;
- }
- relobj = uriobj;
- }else if(!relobj.scheme){
- relobj.scheme = uriobj.scheme;
-
- if(!relobj.authority){
- relobj.authority = uriobj.authority;
-
- if(relobj.path.charAt(0) != "/"){
- var path = uriobj.path.substring(0,
- uriobj.path.lastIndexOf("/") + 1) + relobj.path;
-
- var segs = path.split("/");
- for(var j = 0; j < segs.length; j++){
- if(segs[j] == "."){
- if(j == segs.length - 1){
- segs[j] = "";
- }else{
- segs.splice(j, 1);
- j--;
- }
- }else if(j > 0 && !(j == 1 && segs[0] == "") &&
- segs[j] == ".." && segs[j-1] != ".."){
-
- if(j == (segs.length - 1)){
- segs.splice(j, 1);
- segs[j - 1] = "";
- }else{
- segs.splice(j - 1, 2);
- j -= 2;
- }
- }
- }
- relobj.path = segs.join("/");
- }
- }
- }
-
- uri = "";
- if(relobj.scheme){
- uri += relobj.scheme + ":";
- }
- if(relobj.authority){
- uri += "//" + relobj.authority;
- }
- uri += relobj.path;
- if(relobj.query){
- uri += "?" + relobj.query;
- }
- if(relobj.fragment){
- uri += "#" + relobj.fragment;
- }
- }
-
- this.uri = uri.toString();
-
- // break the uri into its main components
- var r = this.uri.match(ore);
-
- this.scheme = r[2] || (r[1] ? "" : n);
- this.authority = r[4] || (r[3] ? "" : n);
- this.path = r[5]; // can never be undefined
- this.query = r[7] || (r[6] ? "" : n);
- this.fragment = r[9] || (r[8] ? "" : n);
-
- if(this.authority != n){
- // server based naming authority
- r = this.authority.match(ire);
-
- this.user = r[3] || n;
- this.password = r[4] || n;
- this.host = r[5];
- this.port = r[7] || n;
- }
- }
-
- dojo._Url.prototype.toString = function(){ return this.uri; };
-
- dojo.moduleUrl = function(/*String*/module, /*dojo._Url||String*/url){
- // summary:
- // Returns a Url object relative to a module
- //
- // example:
- // | dojo.moduleUrl("dojo.widget","templates/template.html");
- // example:
- // | dojo.moduleUrl("acme","images/small.png")
-
- var loc = dojo._getModuleSymbols(module).join('/');
- if(!loc){ return null; }
- if(loc.lastIndexOf("/") != loc.length-1){
- loc += "/";
- }
-
- //If the path is an absolute path (starts with a / or is on another
- //domain/xdomain) then don't add the baseUrl.
- var colonIndex = loc.indexOf(":");
- if(loc.charAt(0) != "/" && (colonIndex == -1 || colonIndex > loc.indexOf("/"))){
- loc = d.baseUrl + loc;
- }
-
- return new d._Url(loc, url); // String
- }
+if(!dojo._hasResource["dojo.foo"]){
+dojo._hasResource["dojo.foo"]=true;
+(function(){
+var d=dojo;
+d.mixin(d,{_loadedModules:{},_inFlightCount:0,_hasResource:{},_modulePrefixes:{dojo:{name:"dojo",value:"."},doh:{name:"doh",value:"../util/doh"},tests:{name:"tests",value:"tests"}},_moduleHasPrefix:function(_1){
+var mp=d._modulePrefixes;
+return !!(mp[_1]&&mp[_1].value);
+},_getModulePrefix:function(_2){
+var mp=d._modulePrefixes;
+if(d._moduleHasPrefix(_2)){
+return mp[_2].value;
+}
+return _2;
+},_loadedUrls:[],_postLoad:false,_loaders:[],_unloaders:[],_loadNotifying:false});
+dojo._loadPath=function(_3,_4,cb){
+var _5=((_3.charAt(0)=="/"||_3.match(/^\w+:/))?"":d.baseUrl)+_3;
+try{
+return !_4?d._loadUri(_5,cb):d._loadUriAndCheck(_5,_4,cb);
+}
+catch(e){
+console.error(e);
+return false;
+}
+};
+dojo._loadUri=function(_6,cb){
+if(d._loadedUrls[_6]){
+return true;
+}
+d._inFlightCount++;
+var _7=d._getText(_6,true);
+if(_7){
+d._loadedUrls[_6]=true;
+d._loadedUrls.push(_6);
+if(cb){
+_7="("+_7+")";
+}else{
+_7=d._scopePrefix+_7+d._scopeSuffix;
+}
+if(!d.isIE){
+_7+="\r\n//@ sourceURL="+_6;
+}
+var _8=d["eval"](_7);
+if(cb){
+cb(_8);
+}
+}
+if(--d._inFlightCount==0&&d._postLoad&&d._loaders.length){
+setTimeout(function(){
+if(d._inFlightCount==0){
+d._callLoaded();
+}
+},0);
+}
+return !!_7;
+};
+dojo._loadUriAndCheck=function(_9,_a,cb){
+var ok=false;
+try{
+ok=d._loadUri(_9,cb);
+}
+catch(e){
+console.error("failed loading "+_9+" with error: "+e);
+}
+return !!(ok&&d._loadedModules[_a]);
+};
+dojo.loaded=function(){
+d._loadNotifying=true;
+d._postLoad=true;
+var _b=d._loaders;
+d._loaders=[];
+for(var x=0;x<_b.length;x++){
+_b[x]();
+}
+d._loadNotifying=false;
+if(d._postLoad&&d._inFlightCount==0&&_b.length){
+d._callLoaded();
+}
+};
+dojo.unloaded=function(){
+var _c=d._unloaders;
+while(_c.length){
+(_c.pop())();
+}
+};
+d._onto=function(_d,_e,fn){
+if(!fn){
+_d.push(_e);
+}else{
+if(fn){
+var _f=(typeof fn=="string")?_e[fn]:fn;
+_d.push(function(){
+_f.call(_e);
+});
+}
+}
+};
+dojo.ready=dojo.addOnLoad=function(obj,_10){
+d._onto(d._loaders,obj,_10);
+if(d._postLoad&&d._inFlightCount==0&&!d._loadNotifying){
+d._callLoaded();
+}
+};
+var dca=d.config.addOnLoad;
+if(dca){
+d.addOnLoad[(dca instanceof Array?"apply":"call")](d,dca);
+}
+dojo._modulesLoaded=function(){
+if(d._postLoad){
+return;
+}
+if(d._inFlightCount>0){
+console.warn("files still in flight!");
+return;
+}
+d._callLoaded();
+};
+dojo._callLoaded=function(){
+if(typeof setTimeout=="object"||(d.config.useXDomain&&d.isOpera)){
+setTimeout(d.isAIR?function(){
+d.loaded();
+}:d._scopeName+".loaded();",0);
+}else{
+d.loaded();
+}
+};
+dojo._getModuleSymbols=function(_11){
+var _12=_11.split(".");
+for(var i=_12.length;i>0;i--){
+var _13=_12.slice(0,i).join(".");
+if(i==1&&!d._moduleHasPrefix(_13)){
+_12[0]="../"+_12[0];
+}else{
+var _14=d._getModulePrefix(_13);
+if(_14!=_13){
+_12.splice(0,i,_14);
+break;
+}
+}
+}
+return _12;
+};
+dojo._global_omit_module_check=false;
+dojo.loadInit=function(_15){
+_15();
+};
+dojo._loadModule=dojo.require=function(_16,_17){
+_17=d._global_omit_module_check||_17;
+var _18=d._loadedModules[_16];
+if(_18){
+return _18;
+}
+var _19=d._getModuleSymbols(_16).join("/")+".js";
+var _1a=!_17?_16:null;
+var ok=d._loadPath(_19,_1a);
+if(!ok&&!_17){
+throw new Error("Could not load '"+_16+"'; last tried '"+_19+"'");
+}
+if(!_17&&!d._isXDomain){
+_18=d._loadedModules[_16];
+if(!_18){
+throw new Error("symbol '"+_16+"' is not defined after loading '"+_19+"'");
+}
+}
+return _18;
+};
+dojo.provide=function(_1b){
+_1b=_1b+"";
+return (d._loadedModules[_1b]=d.getObject(_1b,true));
+};
+dojo.platformRequire=function(_1c){
+var _1d=_1c.common||[];
+var _1e=_1d.concat(_1c[d._name]||_1c["default"]||[]);
+for(var x=0;x<_1e.length;x++){
+var _1f=_1e[x];
+if(_1f.constructor==Array){
+d._loadModule.apply(d,_1f);
+}else{
+d._loadModule(_1f);
+}
+}
+};
+dojo.requireIf=function(_20,_21){
+if(_20===true){
+var _22=[];
+for(var i=1;i<arguments.length;i++){
+_22.push(arguments[i]);
+}
+d.require.apply(d,_22);
+}
+};
+dojo.requireAfterIf=d.requireIf;
+dojo.registerModulePath=function(_23,_24){
+d._modulePrefixes[_23]={name:_23,value:_24};
+};
+dojo.requireLocalization=function(_25,_26,_27,_28){
+d.require("dojo.i18n");
+d.i18n._requireLocalization.apply(d.hostenv,arguments);
+};
+var ore=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),ire=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");
+dojo._Url=function(){
+var n=null,_29=arguments,uri=[_29[0]];
+for(var i=1;i<_29.length;i++){
+if(!_29[i]){
+continue;
+}
+var _2a=new d._Url(_29[i]+""),_2b=new d._Url(uri[0]+"");
+if(_2a.path==""&&!_2a.scheme&&!_2a.authority&&!_2a.query){
+if(_2a.fragment!=n){
+_2b.fragment=_2a.fragment;
+}
+_2a=_2b;
+}else{
+if(!_2a.scheme){
+_2a.scheme=_2b.scheme;
+if(!_2a.authority){
+_2a.authority=_2b.authority;
+if(_2a.path.charAt(0)!="/"){
+var _2c=_2b.path.substring(0,_2b.path.lastIndexOf("/")+1)+_2a.path;
+var _2d=_2c.split("/");
+for(var j=0;j<_2d.length;j++){
+if(_2d[j]=="."){
+if(j==_2d.length-1){
+_2d[j]="";
+}else{
+_2d.splice(j,1);
+j--;
+}
+}else{
+if(j>0&&!(j==1&&_2d[0]=="")&&_2d[j]==".."&&_2d[j-1]!=".."){
+if(j==(_2d.length-1)){
+_2d.splice(j,1);
+_2d[j-1]="";
+}else{
+_2d.splice(j-1,2);
+j-=2;
+}
+}
+}
+}
+_2a.path=_2d.join("/");
+}
+}
+}
+}
+uri=[];
+if(_2a.scheme){
+uri.push(_2a.scheme,":");
+}
+if(_2a.authority){
+uri.push("//",_2a.authority);
+}
+uri.push(_2a.path);
+if(_2a.query){
+uri.push("?",_2a.query);
+}
+if(_2a.fragment){
+uri.push("#",_2a.fragment);
+}
+}
+this.uri=uri.join("");
+var r=this.uri.match(ore);
+this.scheme=r[2]||(r[1]?"":n);
+this.authority=r[4]||(r[3]?"":n);
+this.path=r[5];
+this.query=r[7]||(r[6]?"":n);
+this.fragment=r[9]||(r[8]?"":n);
+if(this.authority!=n){
+r=this.authority.match(ire);
+this.user=r[3]||n;
+this.password=r[4]||n;
+this.host=r[6]||r[7];
+this.port=r[9]||n;
+}
+};
+dojo._Url.prototype.toString=function(){
+return this.uri;
+};
+dojo.moduleUrl=function(_2e,url){
+var loc=d._getModuleSymbols(_2e).join("/");
+if(!loc){
+return null;
+}
+if(loc.lastIndexOf("/")!=loc.length-1){
+loc+="/";
+}
+var _2f=loc.indexOf(":");
+if(loc.charAt(0)!="/"&&(_2f==-1||_2f>loc.indexOf("/"))){
+loc=d.baseUrl+loc;
+}
+return new d._Url(loc,url);
+};
})();
-
}
diff --git a/js/dojo/dojo/_base/_loader/loader_debug.js b/js/dojo/dojo/_base/_loader/loader_debug.js
--- a/js/dojo/dojo/_base/_loader/loader_debug.js
+++ b/js/dojo/dojo/_base/_loader/loader_debug.js
@@ -1,42 +1,59 @@
-if(!dojo._hasResource["dojo._base._loader.loader_debug"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base._loader.loader_debug"] = true;
-dojo.provide("dojo._base._loader.loader_debug");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-//Override dojo.provide, so we can trigger the next
-//script tag for the next local module. We can only add one
-//at a time because there are browsers that execute script tags
-//in the order that the code is received, and not in the DOM order.
-dojo.nonDebugProvide = dojo.provide;
-dojo.provide = function(resourceName){
- var dbgQueue = dojo["_xdDebugQueue"];
- if(dbgQueue && dbgQueue.length > 0 && resourceName == dbgQueue["currentResourceName"]){
- //Set a timeout so the module can be executed into existence. Normally the
- //dojo.provide call in a module is the first line. Don't want to risk attaching
- //another script tag until the current one finishes executing.
- window.setTimeout("dojo._xdDebugFileLoaded('" + resourceName + "')", 1);
- }
-
- return dojo.nonDebugProvide.apply(dojo, arguments);
+if(!dojo._hasResource["dojo._base._loader.loader_debug"]){
+dojo._hasResource["dojo._base._loader.loader_debug"]=true;
+dojo.provide("dojo._base._loader.loader_debug");
+dojo.nonDebugProvide=dojo.provide;
+dojo.provide=function(_1){
+var _2=dojo["_xdDebugQueue"];
+if(_2&&_2.length>0&&_1==_2["currentResourceName"]){
+if(dojo.isAIR){
+window.setTimeout(function(){
+dojo._xdDebugFileLoaded(_1);
+},1);
+}else{
+window.setTimeout(dojo._scopeName+"._xdDebugFileLoaded('"+_1+"')",1);
+}
}
-
-dojo._xdDebugFileLoaded = function(resourceName){
- var dbgQueue = this._xdDebugQueue;
-
- if(resourceName && resourceName == dbgQueue.currentResourceName){
- dbgQueue.shift();
- }
-
- if(dbgQueue.length == 0){
- dbgQueue.currentResourceName = null;
- this._xdNotifyLoaded();
- }else{
- dbgQueue.currentResourceName = dbgQueue[0].resourceName;
- var element = document.createElement("script");
- element.type = "text/javascript";
- element.src = dbgQueue[0].resourcePath;
- document.getElementsByTagName("head")[0].appendChild(element);
- }
+return dojo.nonDebugProvide.apply(dojo,arguments);
+};
+dojo._xdDebugFileLoaded=function(_3){
+if(!dojo._xdDebugScopeChecked){
+if(dojo._scopeName!="dojo"){
+window.dojo=window[dojo.config.scopeMap[0][1]];
+window.dijit=window[dojo.config.scopeMap[1][1]];
+window.dojox=window[dojo.config.scopeMap[2][1]];
+}
+dojo._xdDebugScopeChecked=true;
+}
+var _4=dojo._xdDebugQueue;
+if(_3&&_3==_4.currentResourceName){
+_4.shift();
+}
+if(_4.length==0){
+dojo._xdWatchInFlight();
}
-
+if(_4.length==0){
+_4.currentResourceName=null;
+for(var _5 in dojo._xdInFlight){
+if(dojo._xdInFlight[_5]===true){
+return;
+}
}
+dojo._xdNotifyLoaded();
+}else{
+if(_3==_4.currentResourceName){
+_4.currentResourceName=_4[0].resourceName;
+var _6=document.createElement("script");
+_6.type="text/javascript";
+_6.src=_4[0].resourcePath;
+document.getElementsByTagName("head")[0].appendChild(_6);
+}
+}
+};
+}
diff --git a/js/dojo/dojo/_base/_loader/loader_xd.js b/js/dojo/dojo/_base/_loader/loader_xd.js
--- a/js/dojo/dojo/_base/_loader/loader_xd.js
+++ b/js/dojo/dojo/_base/_loader/loader_xd.js
@@ -1,629 +1,465 @@
-if(!dojo._hasResource["dojo._base._loader.loader_xd"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base._loader.loader_xd"] = true;
-//Cross-domain resource loader.
-dojo.provide("dojo._base._loader.loader_xd");
-
-dojo._xdReset = function(){
- //summary: Internal xd loader function. Resets the xd state.
-
- //This flag indicates where or not we have crossed into xdomain territory. Once any resource says
- //it is cross domain, then the rest of the resources have to be treated as xdomain because we need
- //to evaluate resources in order. If there is a xdomain resource followed by a xhr resource, we can't load
- //the xhr resource until the one before it finishes loading. The text of the xhr resource will be converted
- //to match the format for a xd resource and put in the xd load queue.
- this._isXDomain = djConfig.useXDomain || false;
-
- this._xdTimer = 0;
- this._xdInFlight = {};
- this._xdOrderedReqs = [];
- this._xdDepMap = {};
- this._xdContents = [];
- this._xdDefList = [];
-}
-
-//Call reset immediately to set the state.
-dojo._xdReset();
-
-dojo._xdCreateResource = function(/*String*/contents, /*String*/resourceName, /*String*/resourcePath){
- //summary: Internal xd loader function. Creates an xd module source given an
- //non-xd module contents.
-
- //Remove comments. Not perfect, but good enough for dependency resolution.
- var depContents = contents.replace(/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg , "");
-
- //Find dependencies.
- var deps = [];
- var depRegExp = /dojo.(require|requireIf|provide|requireAfterIf|platformRequire|requireLocalization)\(([\w\W]*?)\)/mg;
- var match;
- while((match = depRegExp.exec(depContents)) != null){
- if(match[1] == "requireLocalization"){
- //Need to load the local bundles asap, since they are not
- //part of the list of modules watched for loading.
- eval(match[0]);
- }else{
- deps.push('"' + match[1] + '", ' + match[2]);
- }
- }
-
- //Create resource object and the call to _xdResourceLoaded.
- var output = [];
- output.push("dojo._xdResourceLoaded({\n");
-
- //Add dependencies
- if(deps.length > 0){
- output.push("depends: [");
- for(var i = 0; i < deps.length; i++){
- if(i > 0){
- output.push(",\n");
- }
- output.push("[" + deps[i] + "]");
- }
- output.push("],");
- }
-
- //Add the contents of the file inside a function.
- //Pass in dojo as an argument to the function to help with
- //allowing multiple versions of dojo in a page.
- output.push("\ndefineResource: function(dojo){");
-
- //Don't put in the contents in the debugAtAllCosts case
- //since the contents may have syntax errors. Let those
- //get pushed up when the script tags are added to the page
- //in the debugAtAllCosts case.
- if(!djConfig["debugAtAllCosts"] || resourceName == "dojo._base._loader.loader_debug"){
- output.push(contents);
- }
- //Add isLocal property so we know if we have to do something different
- //in debugAtAllCosts situations.
- output.push("\n}, resourceName: '" + resourceName + "', resourcePath: '" + resourcePath + "'});");
-
- return output.join(""); //String
-}
-
-dojo._xdIsXDomainPath = function(/*string*/relpath) {
- //summary: Figure out whether the path is local or x-domain
- //If there is a colon before the first / then, we have a URL with a protocol.
-
- var colonIndex = relpath.indexOf(":");
- var slashIndex = relpath.indexOf("/");
-
- if(colonIndex > 0 && colonIndex < slashIndex){
- return true;
- }else{
- //Is the base script URI-based URL a cross domain URL?
- //If so, then the relpath will be evaluated relative to
- //baseUrl, and therefore qualify as xdomain.
- //Only treat it as xdomain if the page does not have a
- //host (file:// url) or if the baseUrl does not match the
- //current window's domain.
- var url = this.baseUrl;
- colonIndex = url.indexOf(":");
- slashIndex = url.indexOf("/");
- if(colonIndex > 0 && colonIndex < slashIndex && (!location.host || url.indexOf("http://" + location.host) != 0)){
- return true;
- }
- }
- return false;
-}
-
-dojo._loadPath = function(/*String*/relpath, /*String?*/module, /*Function?*/cb){
- //summary: Internal xd loader function. Overrides loadPath() from loader.js.
- //xd loading requires slightly different behavior from loadPath().
-
- var currentIsXDomain = this._xdIsXDomainPath(relpath);
- this._isXDomain |= currentIsXDomain;
-
- var uri = this.baseUrl + relpath;
- if(currentIsXDomain){
- // check whether the relpath is an absolute URL itself. If so, we
- // ignore baseUrl
- var colonIndex = relpath.indexOf(":");
- var slashIndex = relpath.indexOf("/");
- if(colonIndex > 0 && colonIndex < slashIndex){
- uri = relpath;
- }
- }
-
- if(djConfig.cacheBust && dojo.isBrowser) { uri += "?" + String(djConfig.cacheBust).replace(/\W+/g,""); }
- try{
- return ((!module || this._isXDomain) ? this._loadUri(uri, cb, currentIsXDomain, module) : this._loadUriAndCheck(uri, module, cb)); //Boolean
- }catch(e){
- console.debug(e);
- return false; //Boolean
- }
-}
-
-dojo._loadUri = function(/*String*/uri, /*Function?*/cb, /*boolean*/currentIsXDomain, /*String?*/module){
- //summary: Internal xd loader function. Overrides loadUri() from loader.js.
- // xd loading requires slightly different behavior from loadPath().
- //description: Wanted to override getText(), but it is used by
- // the widget code in too many, synchronous ways right now.
- if(this._loadedUrls[uri]){
- return 1; //Boolean
- }
-
- //Add the module (resource) to the list of modules.
- //Only do this work if we have a modlue name. Otherwise,
- //it is a non-xd i18n bundle, which can load immediately and does not
- //need to be tracked. Also, don't track dojo.i18n, since it is a prerequisite
- //and will be loaded correctly if we load it right away: it has no dependencies.
- if(this._isXDomain && module && module != "dojo.i18n"){
- this._xdOrderedReqs.push(module);
-
- //Add to waiting resources if it is an xdomain resource.
- //Don't add non-xdomain i18n bundles, those get evaled immediately.
- if(currentIsXDomain || uri.indexOf("/nls/") == -1){
- this._xdInFlight[module] = true;
-
- //Increment inFlightCount
- //This will stop the modulesLoaded from firing all the way.
- this._inFlightCount++;
- }
-
- //Start timer
- if(!this._xdTimer){
- this._xdTimer = setInterval("dojo._xdWatchInFlight();", 100);
- }
- this._xdStartTime = (new Date()).getTime();
- }
-
- if (currentIsXDomain){
- //Fix name to be a .xd.fileextension name.
- var lastIndex = uri.lastIndexOf('.');
- if(lastIndex <= 0){
- lastIndex = uri.length - 1;
- }
-
- var xdUri = uri.substring(0, lastIndex) + ".xd";
- if(lastIndex != uri.length - 1){
- xdUri += uri.substring(lastIndex, uri.length);
- }
-
- //Add to script src
- var element = document.createElement("script");
- element.type = "text/javascript";
- element.src = xdUri;
- if(!this.headElement){
- this._headElement = document.getElementsByTagName("head")[0];
-
- //Head element may not exist, particularly in html
- //html 4 or tag soup cases where the page does not
- //have a head tag in it. Use html element, since that will exist.
- //Seems to be an issue mostly with Opera 9 and to lesser extent Safari 2
- if(!this._headElement){
- this._headElement = document.getElementsByTagName("html")[0];
- }
- }
- this._headElement.appendChild(element);
- }else{
- var contents = this._getText(uri, null, true);
- if(contents == null){ return 0; /*boolean*/}
-
- //If this is not xdomain, or if loading a i18n resource bundle, then send it down
- //the normal eval/callback path.
- if(this._isXDomain
- && uri.indexOf("/nls/") == -1
- && module != "dojo.i18n"){
- var res = this._xdCreateResource(contents, module, uri);
- dojo.eval(res);
- }else{
- if(cb){ contents = '('+contents+')'; }
- var value = dojo.eval(contents);
- if(cb){
- cb(value);
- }
- }
- }
-
- //These steps are done in the non-xd loader version of this function.
- //Maintain these steps to fit in with the existing system.
- this._loadedUrls[uri] = true;
- this._loadedUrls.push(uri);
- return true; //Boolean
-}
-
-dojo._xdResourceLoaded = function(/*Object*/res){
- //summary: Internal xd loader function. Called by an xd module resource when
- //it has been loaded via a script tag.
- var deps = res.depends;
- var requireList = null;
- var requireAfterList = null;
- var provideList = [];
- if(deps && deps.length > 0){
- var dep = null;
- var insertHint = 0;
- var attachedResource = false;
- for(var i = 0; i < deps.length; i++){
- dep = deps[i];
-
- //Look for specific dependency indicators.
- if (dep[0] == "provide"){
- provideList.push(dep[1]);
- }else{
- if(!requireList){
- requireList = [];
- }
- if(!requireAfterList){
- requireAfterList = [];
- }
-
- var unpackedDeps = this._xdUnpackDependency(dep);
- if(unpackedDeps.requires){
- requireList = requireList.concat(unpackedDeps.requires);
- }
- if(unpackedDeps.requiresAfter){
- requireAfterList = requireAfterList.concat(unpackedDeps.requiresAfter);
- }
- }
-
- //Call the dependency indicator to allow for the normal dojo setup.
- //Only allow for one dot reference, for the i18n._preloadLocalizations calls
- //(and maybe future, one-dot things).
- var depType = dep[0];
- var objPath = depType.split(".");
- if(objPath.length == 2){
- dojo[objPath[0]][objPath[1]].apply(dojo[objPath[0]], dep.slice(1));
- }else{
- dojo[depType].apply(dojo, dep.slice(1));
- }
- }
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- //If loading the debugAtAllCosts module, eval it right away since we need
- //its functions to properly load the other modules.
- if(provideList.length == 1 && provideList[0] == "dojo._base._loader.loader_debug"){
- res.defineResource(dojo);
- }else{
- //Save off the resource contents for definition later.
- var contentIndex = this._xdContents.push({
- content: res.defineResource,
- resourceName: res["resourceName"],
- resourcePath: res["resourcePath"],
- isDefined: false
- }) - 1;
-
- //Add provide/requires to dependency map.
- for(var i = 0; i < provideList.length; i++){
- this._xdDepMap[provideList[i]] = { requires: requireList, requiresAfter: requireAfterList, contentIndex: contentIndex };
- }
- }
-
- //Now update the inflight status for any provided resources in this loaded resource.
- //Do this at the very end (in a *separate* for loop) to avoid shutting down the
- //inflight timer check too soon.
- for(var i = 0; i < provideList.length; i++){
- this._xdInFlight[provideList[i]] = false;
- }
- }
+if(!dojo._hasResource["dojo._base._loader.loader_xd"]){
+dojo._hasResource["dojo._base._loader.loader_xd"]=true;
+dojo.provide("dojo._base._loader.loader_xd");
+dojo._xdReset=function(){
+dojo._isXDomain=dojo.config.useXDomain||false;
+dojo._xdClearInterval();
+dojo._xdInFlight={};
+dojo._xdOrderedReqs=[];
+dojo._xdDepMap={};
+dojo._xdContents=[];
+dojo._xdDefList=[];
+};
+dojo._xdClearInterval=function(){
+if(dojo._xdTimer){
+clearInterval(dojo._xdTimer);
+dojo._xdTimer=0;
+}
+};
+dojo._xdReset();
+dojo._xdCreateResource=function(_1,_2,_3){
+var _4=_1.replace(/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,"");
+var _5=[];
+var _6=/dojo.(require|requireIf|provide|requireAfterIf|platformRequire|requireLocalization)\s*\(([\w\W]*?)\)/mg;
+var _7;
+while((_7=_6.exec(_4))!=null){
+if(_7[1]=="requireLocalization"){
+eval(_7[0]);
+}else{
+_5.push("\""+_7[1]+"\", "+_7[2]);
+}
+}
+var _8=[];
+_8.push(dojo._scopeName+"._xdResourceLoaded(function("+dojo._scopePrefixArgs+"){\n");
+var _9=dojo._xdExtractLoadInits(_1);
+if(_9){
+_1=_9[0];
+for(var i=1;i<_9.length;i++){
+_8.push(_9[i]+";\n");
+}
+}
+_8.push("return {");
+if(_5.length>0){
+_8.push("depends: [");
+for(i=0;i<_5.length;i++){
+if(i>0){
+_8.push(",\n");
+}
+_8.push("["+_5[i]+"]");
+}
+_8.push("],");
}
-
-dojo._xdLoadFlattenedBundle = function(/*String*/moduleName, /*String*/bundleName, /*String?*/locale, /*Object*/bundleData){
- //summary: Internal xd loader function. Used when loading
- //a flattened localized bundle via a script tag.
- locale = locale || "root";
- var jsLoc = dojo.i18n.normalizeLocale(locale).replace('-', '_');
- var bundleResource = [moduleName, "nls", bundleName].join(".");
- var bundle = dojo["provide"](bundleResource);
- bundle[jsLoc] = bundleData;
-
- //Assign the bundle for the original locale(s) we wanted.
- var mapName = [moduleName, jsLoc, bundleName].join(".");
- var bundleMap = dojo._xdBundleMap[mapName];
- if(bundleMap){
- for(var param in bundleMap){
- bundle[param] = bundleData;
- }
- }
+_8.push("\ndefineResource: function("+dojo._scopePrefixArgs+"){");
+if(!dojo.config["debugAtAllCosts"]||_2=="dojo._base._loader.loader_debug"){
+_8.push(_1);
+}
+_8.push("\n}, resourceName: '"+_2+"', resourcePath: '"+_3+"'};});");
+return _8.join("");
};
-
-
-dojo._xdInitExtraLocales = function(){
- // Simulate the extra locale work that dojo.requireLocalization does.
-
- var extra = djConfig.extraLocale;
- if(extra){
- if(!extra instanceof Array){
- extra = [extra];
- }
-
- dojo._xdReqLoc = dojo.xdRequireLocalization;
- dojo.xdRequireLocalization = function(m, b, locale, fLocales){
- dojo._xdReqLoc(m,b,locale, fLocales);
- if(locale){return;}
- for(var i=0; i<extra.length; i++){
- dojo._xdReqLoc(m,b,extra[i], fLocales);
- }
- };
- }
+dojo._xdExtractLoadInits=function(_a){
+var _b=/dojo.loadInit\s*\(/g;
+_b.lastIndex=0;
+var _c=/[\(\)]/g;
+_c.lastIndex=0;
+var _d=[];
+var _e;
+while((_e=_b.exec(_a))){
+_c.lastIndex=_b.lastIndex;
+var _f=1;
+var _10;
+while((_10=_c.exec(_a))){
+if(_10[0]==")"){
+_f-=1;
+}else{
+_f+=1;
+}
+if(_f==0){
+break;
+}
+}
+if(_f!=0){
+throw "unmatched paren around character "+_c.lastIndex+" in: "+_a;
+}
+var _11=_b.lastIndex-_e[0].length;
+_d.push(_a.substring(_11,_c.lastIndex));
+var _12=_c.lastIndex-_11;
+_a=_a.substring(0,_11)+_a.substring(_c.lastIndex,_a.length);
+_b.lastIndex=_c.lastIndex-_12;
+_b.lastIndex=_c.lastIndex;
+}
+if(_d.length>0){
+_d.unshift(_a);
+}
+return (_d.length?_d:null);
+};
+dojo._xdIsXDomainPath=function(_13){
+var _14=_13.indexOf(":");
+var _15=_13.indexOf("/");
+if(_14>0&&_14<_15){
+return true;
+}else{
+var url=dojo.baseUrl;
+_14=url.indexOf(":");
+_15=url.indexOf("/");
+if(_14>0&&_14<_15&&(!location.host||url.indexOf("http://"+location.host)!=0)){
+return true;
+}
}
-
-dojo._xdBundleMap = {};
-
-dojo.xdRequireLocalization = function(/*String*/moduleName, /*String*/bundleName, /*String?*/locale, /*String*/availableFlatLocales){
- //summary: Internal xd loader function. The xd version of dojo.requireLocalization.
-
-
- //Account for allowing multiple extra locales. Do this here inside the function
- //since dojo._xdInitExtraLocales() depends on djConfig being set up, but that only
- //happens after hostenv_browser runs. loader_xd has to come before hostenv_browser
- //though since hostenv_browser can do a dojo.require for the debug module.
- if(dojo._xdInitExtraLocales){
- dojo._xdInitExtraLocales();
- dojo._xdInitExtraLocales = null;
- dojo.xdRequireLocalization.apply(dojo, arguments);
- return;
- }
-
- var locales = availableFlatLocales.split(",");
-
- //Find the best-match locale to load.
- //Assumes dojo.i18n has already been loaded. This is true for xdomain builds,
- //since it is included in dojo.xd.js.
- var jsLoc = dojo.i18n.normalizeLocale(locale);
-
- var bestLocale = "";
- for(var i = 0; i < locales.length; i++){
- //Locale must match from start of string.
- if(jsLoc.indexOf(locales[i]) == 0){
- if(locales[i].length > bestLocale.length){
- bestLocale = locales[i];
- }
- }
- }
-
- var fixedBestLocale = bestLocale.replace('-', '_');
- //See if the bundle we are going to use is already loaded.
- var bundleResource = dojo.getObject([moduleName, "nls", bundleName].join("."));
- if(bundleResource && bundleResource[fixedBestLocale]){
- bundle[jsLoc.replace('-', '_')] = bundleResource[fixedBestLocale];
- }else{
- //Need to remember what locale we wanted and which one we actually use.
- //Then when we load the one we are actually using, use that bundle for the one
- //we originally wanted.
- var mapName = [moduleName, (fixedBestLocale||"root"), bundleName].join(".");
- var bundleMap = dojo._xdBundleMap[mapName];
- if(!bundleMap){
- bundleMap = dojo._xdBundleMap[mapName] = {};
- }
- bundleMap[jsLoc.replace('-', '_')] = true;
-
- //Do just a normal dojo.require so the resource tracking stuff works as usual.
- dojo.require(moduleName + ".nls" + (bestLocale ? "." + bestLocale : "") + "." + bundleName);
- }
+return false;
+};
+dojo._loadPath=function(_16,_17,cb){
+var _18=dojo._xdIsXDomainPath(_16);
+dojo._isXDomain|=_18;
+var uri=((_16.charAt(0)=="/"||_16.match(/^\w+:/))?"":dojo.baseUrl)+_16;
+try{
+return ((!_17||dojo._isXDomain)?dojo._loadUri(uri,cb,_18,_17):dojo._loadUriAndCheck(uri,_17,cb));
+}
+catch(e){
+console.error(e);
+return false;
+}
+};
+dojo._xdCharSet="utf-8";
+dojo._loadUri=function(uri,cb,_19,_1a){
+if(dojo._loadedUrls[uri]){
+return 1;
+}
+if(dojo._isXDomain&&_1a&&_1a!="dojo.i18n"){
+dojo._xdOrderedReqs.push(_1a);
+if(_19||uri.indexOf("/nls/")==-1){
+dojo._xdInFlight[_1a]=true;
+dojo._inFlightCount++;
+}
+if(!dojo._xdTimer){
+if(dojo.isAIR){
+dojo._xdTimer=setInterval(function(){
+dojo._xdWatchInFlight();
+},100);
+}else{
+dojo._xdTimer=setInterval(dojo._scopeName+"._xdWatchInFlight();",100);
+}
+}
+dojo._xdStartTime=(new Date()).getTime();
+}
+if(_19){
+var _1b=uri.lastIndexOf(".");
+if(_1b<=0){
+_1b=uri.length-1;
+}
+var _1c=uri.substring(0,_1b)+".xd";
+if(_1b!=uri.length-1){
+_1c+=uri.substring(_1b,uri.length);
+}
+if(dojo.isAIR){
+_1c=_1c.replace("app:/","/");
+}
+var _1d=document.createElement("script");
+_1d.type="text/javascript";
+if(dojo._xdCharSet){
+_1d.charset=dojo._xdCharSet;
+}
+_1d.src=_1c;
+if(!dojo.headElement){
+dojo._headElement=document.getElementsByTagName("head")[0];
+if(!dojo._headElement){
+dojo._headElement=document.getElementsByTagName("html")[0];
+}
}
-
-// Replace dojo.requireLocalization with a wrapper
-dojo._xdRealRequireLocalization = dojo.requireLocalization;
-dojo.requireLocalization = function(/*String*/moduleName, /*String*/bundleName, /*String?*/locale, /*String*/availableFlatLocales){
- // summary: loads a bundle intelligently based on whether the module is
- // local or xd. Overrides the local-case implementation.
-
- var modulePath = this.moduleUrl(moduleName).toString();
- if (this._xdIsXDomainPath(modulePath)) {
- // call cross-domain loader
- return dojo.xdRequireLocalization.apply(dojo, arguments);
- } else {
- // call local-loader
- return dojo._xdRealRequireLocalization.apply(dojo, arguments);
- }
+dojo._headElement.appendChild(_1d);
+}else{
+var _1e=dojo._getText(uri,null,true);
+if(_1e==null){
+return 0;
+}
+if(dojo._isXDomain&&uri.indexOf("/nls/")==-1&&_1a!="dojo.i18n"){
+var res=dojo._xdCreateResource(_1e,_1a,uri);
+dojo.eval(res);
+}else{
+if(cb){
+_1e="("+_1e+")";
+}else{
+_1e=dojo._scopePrefix+_1e+dojo._scopeSuffix;
+}
+var _1f=dojo["eval"](_1e+"\r\n//@ sourceURL="+uri);
+if(cb){
+cb(_1f);
+}
+}
+}
+dojo._loadedUrls[uri]=true;
+dojo._loadedUrls.push(uri);
+return true;
+};
+dojo._xdResourceLoaded=function(res){
+res=res.apply(dojo.global,dojo._scopeArgs);
+var _20=res.depends;
+var _21=null;
+var _22=null;
+var _23=[];
+if(_20&&_20.length>0){
+var dep=null;
+var _24=0;
+var _25=false;
+for(var i=0;i<_20.length;i++){
+dep=_20[i];
+if(dep[0]=="provide"){
+_23.push(dep[1]);
+}else{
+if(!_21){
+_21=[];
+}
+if(!_22){
+_22=[];
+}
+var _26=dojo._xdUnpackDependency(dep);
+if(_26.requires){
+_21=_21.concat(_26.requires);
+}
+if(_26.requiresAfter){
+_22=_22.concat(_26.requiresAfter);
+}
+}
+var _27=dep[0];
+var _28=_27.split(".");
+if(_28.length==2){
+dojo[_28[0]][_28[1]].apply(dojo[_28[0]],dep.slice(1));
+}else{
+dojo[_27].apply(dojo,dep.slice(1));
+}
}
-
-//This is a bit brittle: it has to know about the dojo methods that deal with dependencies
-//It would be ideal to intercept the actual methods and do something fancy at that point,
-//but I have concern about knowing which provide to match to the dependency in that case,
-//since scripts can load whenever they want, and trigger new calls to dojo._xdResourceLoaded().
-dojo._xdUnpackDependency = function(/*Array*/dep){
- //summary: Internal xd loader function. Determines what to do with a dependency
- //that was listed in an xd version of a module contents.
-
- //Extract the dependency(ies).
- var newDeps = null;
- var newAfterDeps = null;
- switch(dep[0]){
- case "requireIf":
- case "requireAfterIf":
- //First arg (dep[1]) is the test. Depedency is dep[2].
- if(dep[1] === true){
- newDeps = [{name: dep[2], content: null}];
- }
- break;
- case "platformRequire":
- var modMap = dep[1];
- var common = modMap["common"]||[];
- var newDeps = (modMap[dojo.hostenv.name_]) ? common.concat(modMap[dojo.hostenv.name_]||[]) : common.concat(modMap["default"]||[]);
- //Flatten the array of arrays into a one-level deep array.
- //Each result could be an array of 3 elements (the 3 arguments to dojo.require).
- //We only need the first one.
- if(newDeps){
- for(var i = 0; i < newDeps.length; i++){
- if(newDeps[i] instanceof Array){
- newDeps[i] = {name: newDeps[i][0], content: null};
- }else{
- newDeps[i] = {name: newDeps[i], content: null};
- }
- }
- }
- break;
- case "require":
- //Just worry about dep[1]
- newDeps = [{name: dep[1], content: null}];
- break;
- case "i18n._preloadLocalizations":
- //We can eval these immediately, since they load i18n bundles.
- //Since i18n bundles have no dependencies, whenever they are loaded
- //in a script tag, they are evaluated immediately, so we do not have to
- //treat them has an explicit dependency for the dependency mapping.
- //We can call it immediately since dojo.i18n is part of dojo.xd.js.
- dojo.i18n._preloadLocalizations.apply(dojo.i18n._preloadLocalizations, dep.slice(1));
- break;
- }
-
- //The requireIf and requireAfterIf needs to be evaluated after the current resource is evaluated.
- if(dep[0] == "requireAfterIf" || dep[0] == "requireIf"){
- newAfterDeps = newDeps;
- newDeps = null;
- }
- return {requires: newDeps, requiresAfter: newAfterDeps}; //Object
+if(_23.length==1&&_23[0]=="dojo._base._loader.loader_debug"){
+res.defineResource(dojo);
+}else{
+var _29=dojo._xdContents.push({content:res.defineResource,resourceName:res["resourceName"],resourcePath:res["resourcePath"],isDefined:false})-1;
+for(i=0;i<_23.length;i++){
+dojo._xdDepMap[_23[i]]={requires:_21,requiresAfter:_22,contentIndex:_29};
+}
+}
+for(i=0;i<_23.length;i++){
+dojo._xdInFlight[_23[i]]=false;
+}
+}
+};
+dojo._xdLoadFlattenedBundle=function(_2a,_2b,_2c,_2d){
+_2c=_2c||"root";
+var _2e=dojo.i18n.normalizeLocale(_2c).replace("-","_");
+var _2f=[_2a,"nls",_2b].join(".");
+var _30=dojo["provide"](_2f);
+_30[_2e]=_2d;
+var _31=[_2a,_2e,_2b].join(".");
+var _32=dojo._xdBundleMap[_31];
+if(_32){
+for(var _33 in _32){
+_30[_33]=_2d;
+}
+}
+};
+dojo._xdInitExtraLocales=function(){
+var _34=dojo.config.extraLocale;
+if(_34){
+if(!_34 instanceof Array){
+_34=[_34];
+}
+dojo._xdReqLoc=dojo.xdRequireLocalization;
+dojo.xdRequireLocalization=function(m,b,_35,_36){
+dojo._xdReqLoc(m,b,_35,_36);
+if(_35){
+return;
+}
+for(var i=0;i<_34.length;i++){
+dojo._xdReqLoc(m,b,_34[i],_36);
+}
+};
+}
+};
+dojo._xdBundleMap={};
+dojo.xdRequireLocalization=function(_37,_38,_39,_3a){
+if(dojo._xdInitExtraLocales){
+dojo._xdInitExtraLocales();
+dojo._xdInitExtraLocales=null;
+dojo.xdRequireLocalization.apply(dojo,arguments);
+return;
}
-
-dojo._xdWalkReqs = function(){
- //summary: Internal xd loader function.
- //Walks the requires and evaluates module resource contents in
- //the right order.
- var reqChain = null;
- var req;
- for(var i = 0; i < this._xdOrderedReqs.length; i++){
- req = this._xdOrderedReqs[i];
- if(this._xdDepMap[req]){
- reqChain = [req];
- reqChain[req] = true; //Allow for fast lookup of the req in the array
- this._xdEvalReqs(reqChain);
- }
- }
+var _3b=_3a.split(",");
+var _3c=dojo.i18n.normalizeLocale(_39);
+var _3d="";
+for(var i=0;i<_3b.length;i++){
+if(_3c.indexOf(_3b[i])==0){
+if(_3b[i].length>_3d.length){
+_3d=_3b[i];
+}
+}
+}
+var _3e=_3d.replace("-","_");
+var _3f=dojo.getObject([_37,"nls",_38].join("."));
+if(!_3f||!_3f[_3e]){
+var _40=[_37,(_3e||"root"),_38].join(".");
+var _41=dojo._xdBundleMap[_40];
+if(!_41){
+_41=dojo._xdBundleMap[_40]={};
+}
+_41[_3c.replace("-","_")]=true;
+dojo.require(_37+".nls"+(_3d?"."+_3d:"")+"."+_38);
+}
+};
+dojo._xdRealRequireLocalization=dojo.requireLocalization;
+dojo.requireLocalization=function(_42,_43,_44,_45){
+var _46=dojo.moduleUrl(_42).toString();
+if(dojo._xdIsXDomainPath(_46)){
+return dojo.xdRequireLocalization.apply(dojo,arguments);
+}else{
+return dojo._xdRealRequireLocalization.apply(dojo,arguments);
+}
+};
+dojo._xdUnpackDependency=function(dep){
+var _47=null;
+var _48=null;
+switch(dep[0]){
+case "requireIf":
+case "requireAfterIf":
+if(dep[1]===true){
+_47=[{name:dep[2],content:null}];
+}
+break;
+case "platformRequire":
+var _49=dep[1];
+var _4a=_49["common"]||[];
+_47=(_49[dojo.hostenv.name_])?_4a.concat(_49[dojo.hostenv.name_]||[]):_4a.concat(_49["default"]||[]);
+if(_47){
+for(var i=0;i<_47.length;i++){
+if(_47[i] instanceof Array){
+_47[i]={name:_47[i][0],content:null};
+}else{
+_47[i]={name:_47[i],content:null};
+}
+}
+}
+break;
+case "require":
+_47=[{name:dep[1],content:null}];
+break;
+case "i18n._preloadLocalizations":
+dojo.i18n._preloadLocalizations.apply(dojo.i18n._preloadLocalizations,dep.slice(1));
+break;
}
-
-dojo._xdEvalReqs = function(/*Array*/reqChain){
- //summary: Internal xd loader function.
- //Does a depth first, breadth second search and eval of required modules.
- while(reqChain.length > 0){
- var req = reqChain[reqChain.length - 1];
- var res = this._xdDepMap[req];
- if(res){
- //Trace down any requires for this resource.
- //START dojo._xdTraceReqs() inlining for small Safari 2.0 call stack
- var reqs = res.requires;
- if(reqs && reqs.length > 0){
- var nextReq;
- for(var i = 0; i < reqs.length; i++){
- nextReq = reqs[i].name;
- if(nextReq && !reqChain[nextReq]){
- //New req depedency. Follow it down.
- reqChain.push(nextReq);
- reqChain[nextReq] = true;
- this._xdEvalReqs(reqChain);
- }
- }
- }
- //END dojo._xdTraceReqs() inlining for small Safari 2.0 call stack
-
- //Evaluate the resource.
- var contents = this._xdContents[res.contentIndex];
- if(!contents.isDefined){
- var content = contents.content;
- content["resourceName"] = contents["resourceName"];
- content["resourcePath"] = contents["resourcePath"];
- this._xdDefList.push(content);
- contents.isDefined = true;
- }
- this._xdDepMap[req] = null;
-
- //Trace down any requireAfters for this resource.
- //START dojo._xdTraceReqs() inlining for small Safari 2.0 call stack
- var reqs = res.requiresAfter;
- if(reqs && reqs.length > 0){
- var nextReq;
- for(var i = 0; i < reqs.length; i++){
- nextReq = reqs[i].name;
- if(nextReq && !reqChain[nextReq]){
- //New req depedency. Follow it down.
- reqChain.push(nextReq);
- reqChain[nextReq] = true;
- this._xdEvalReqs(reqChain);
- }
- }
- }
- //END dojo._xdTraceReqs() inlining for small Safari 2.0 call stack
- }
-
- //Done with that require. Remove it and go to the next one.
- reqChain.pop();
- }
+if(dep[0]=="requireAfterIf"||dep[0]=="requireIf"){
+_48=_47;
+_47=null;
+}
+return {requires:_47,requiresAfter:_48};
+};
+dojo._xdWalkReqs=function(){
+var _4b=null;
+var req;
+for(var i=0;i<dojo._xdOrderedReqs.length;i++){
+req=dojo._xdOrderedReqs[i];
+if(dojo._xdDepMap[req]){
+_4b=[req];
+_4b[req]=true;
+dojo._xdEvalReqs(_4b);
+}
}
-
-dojo._xdClearInterval = function(){
- //summary: Internal xd loader function.
- //Clears the interval timer used to check on the
- //status of in-flight xd module resource requests.
- clearInterval(this._xdTimer);
- this._xdTimer = 0;
+};
+dojo._xdEvalReqs=function(_4c){
+while(_4c.length>0){
+var req=_4c[_4c.length-1];
+var res=dojo._xdDepMap[req];
+var i,_4d,_4e;
+if(res){
+_4d=res.requires;
+if(_4d&&_4d.length>0){
+for(i=0;i<_4d.length;i++){
+_4e=_4d[i].name;
+if(_4e&&!_4c[_4e]){
+_4c.push(_4e);
+_4c[_4e]=true;
+dojo._xdEvalReqs(_4c);
+}
+}
+}
+var _4f=dojo._xdContents[res.contentIndex];
+if(!_4f.isDefined){
+var _50=_4f.content;
+_50["resourceName"]=_4f["resourceName"];
+_50["resourcePath"]=_4f["resourcePath"];
+dojo._xdDefList.push(_50);
+_4f.isDefined=true;
+}
+dojo._xdDepMap[req]=null;
+_4d=res.requiresAfter;
+if(_4d&&_4d.length>0){
+for(i=0;i<_4d.length;i++){
+_4e=_4d[i].name;
+if(_4e&&!_4c[_4e]){
+_4c.push(_4e);
+_4c[_4e]=true;
+dojo._xdEvalReqs(_4c);
+}
+}
+}
}
-
-dojo._xdWatchInFlight = function(){
- //summary: Internal xd loader function.
- //Monitors in-flight requests for xd module resources.
-
- var noLoads = "";
- var waitInterval = (djConfig.xdWaitSeconds || 15) * 1000;
- var expired = (this._xdStartTime + waitInterval) < (new Date()).getTime();
-
- //If any xdInFlight are true, then still waiting for something to load.
- //Come back later. If we timed out, report the things that did not load.
- for(var param in this._xdInFlight){
- if(this._xdInFlight[param] === true){
- if(expired){
- noLoads += param + " ";
- }else{
- return;
- }
- }
- }
-
- //All done. Clean up and notify.
- this._xdClearInterval();
-
- if(expired){
- throw "Could not load cross-domain resources: " + noLoads;
- }
-
- this._xdWalkReqs();
-
- var defLength = this._xdDefList.length;
- for(var i= 0; i < defLength; i++){
- var content = dojo._xdDefList[i];
- if(djConfig["debugAtAllCosts"] && content["resourceName"]){
- if(!this["_xdDebugQueue"]){
- this._xdDebugQueue = [];
- }
- this._xdDebugQueue.push({resourceName: content.resourceName, resourcePath: content.resourcePath});
- }else{
- //Evaluate the resource to bring it into being.
- //Pass dojo in so that later, to support multiple versions of dojo
- //in a page, we can pass which version of dojo to use.
- content(dojo);
- }
- }
-
- //Evaluate any resources that were not evaled before.
- //This normally shouldn't happen with proper dojo.provide and dojo.require
- //usage, but providing it just in case. Note that these may not be executed
- //in the original order that the developer intended.
- //Pass dojo in so that later, to support multiple versions of dojo
- //in a page, we can pass which version of dojo to use.
- for(var i = 0; i < this._xdContents.length; i++){
- var current = this._xdContents[i];
- if(current.content && !current.isDefined){
- current.content(dojo);
- }
- }
-
- //Clean up for the next round of xd loading.
- this._xdReset();
-
- if(this["_xdDebugQueue"] && this._xdDebugQueue.length > 0){
- this._xdDebugFileLoaded();
- }else{
- this._xdNotifyLoaded();
- }
+_4c.pop();
+}
+};
+dojo._xdWatchInFlight=function(){
+var _51="";
+var _52=(dojo.config.xdWaitSeconds||15)*1000;
+var _53=(dojo._xdStartTime+_52)<(new Date()).getTime();
+for(var _54 in dojo._xdInFlight){
+if(dojo._xdInFlight[_54]===true){
+if(_53){
+_51+=_54+" ";
+}else{
+return;
+}
+}
+}
+dojo._xdClearInterval();
+if(_53){
+throw "Could not load cross-domain resources: "+_51;
+}
+dojo._xdWalkReqs();
+var _55=dojo._xdDefList.length;
+for(var i=0;i<_55;i++){
+var _56=dojo._xdDefList[i];
+if(dojo.config["debugAtAllCosts"]&&_56["resourceName"]){
+if(!dojo["_xdDebugQueue"]){
+dojo._xdDebugQueue=[];
}
-
-dojo._xdNotifyLoaded = function(){
- //Clear inflight count so we will finally do finish work.
- this._inFlightCount = 0;
-
- //Only trigger call loaded if dj_load_init has run.
- if(this._initFired && !this._loadNotifying){
- this._callLoaded();
- }
+dojo._xdDebugQueue.push({resourceName:_56.resourceName,resourcePath:_56.resourcePath});
+}else{
+_56.apply(dojo.global,dojo._scopeArgs);
+}
+}
+for(i=0;i<dojo._xdContents.length;i++){
+var _57=dojo._xdContents[i];
+if(_57.content&&!_57.isDefined){
+_57.content.apply(dojo.global,dojo._scopeArgs);
+}
}
-
+dojo._xdReset();
+if(dojo["_xdDebugQueue"]&&dojo._xdDebugQueue.length>0){
+dojo._xdDebugFileLoaded();
+}else{
+dojo._xdNotifyLoaded();
}
+};
+dojo._xdNotifyLoaded=function(){
+for(var _58 in dojo._xdInFlight){
+if(typeof dojo._xdInFlight[_58]=="boolean"){
+return;
+}
+}
+dojo._inFlightCount=0;
+if(dojo._initFired&&!dojo._loadNotifying){
+dojo._callLoaded();
+}
+};
+}
diff --git a/js/dojo/dojo/_base/array.js b/js/dojo/dojo/_base/array.js
--- a/js/dojo/dojo/_base/array.js
+++ b/js/dojo/dojo/_base/array.js
@@ -1,167 +1,79 @@
-if(!dojo._hasResource["dojo._base.array"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.array"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo._base.array"]){
+dojo._hasResource["dojo._base.array"]=true;
dojo.require("dojo._base.lang");
dojo.provide("dojo._base.array");
-
(function(){
- var _getParts = function(arr, obj, cb){
- return [
- (dojo.isString(arr) ? arr.split("") : arr),
- (obj||dojo.global),
- // FIXME: cache the anonymous functions we create here?
- (dojo.isString(cb) ? (new Function("item", "index", "array", cb)) : cb)
- ];
- }
-
- dojo.mixin(dojo, {
- indexOf: function( /*Array*/ array,
- /*Object*/ value,
- /*Integer?*/ fromIndex,
- /*Boolean?*/ findLast){
- // summary:
- // locates the first index of the provided value in the
- // passed array. If the value is not found, -1 is returned.
- // description:
- // For details on this method, see:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:indexOf
-
- var i = 0, step = 1, end = array.length;
- if(findLast){
- i = end - 1;
- step = end = -1;
- }
- for(i = fromIndex || i; i != end; i += step){
- if(array[i] == value){ return i; }
- }
- return -1; // Number
- },
-
- lastIndexOf: function(/*Array*/array, /*Object*/value, /*Integer?*/fromIndex){
- // summary:
- // locates the last index of the provided value in the passed array.
- // If the value is not found, -1 is returned.
- // description:
- // For details on this method, see:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:lastIndexOf
- return dojo.indexOf(array, value, fromIndex, true); // Number
- },
-
- forEach: function(/*Array*/arr, /*Function*/callback, /*Object?*/obj){
- // summary:
- // for every item in arr, call callback with that item as its
- // only parameter.
- // description:
- // Return values are ignored. This function
- // corresponds (and wraps) the JavaScript 1.6 forEach method. For
- // more details, see:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:forEach
-
- // match the behavior of the built-in forEach WRT empty arrs
- if(!arr || !arr.length){ return; }
-
- // FIXME: there are several ways of handilng thisObject. Is
- // dojo.global always the default context?
- var _p = _getParts(arr, obj, callback); arr = _p[0];
- for(var i=0,l=_p[0].length; i<l; i++){
- _p[2].call(_p[1], arr[i], i, arr);
- }
- },
-
- _everyOrSome: function(/*Boolean*/every, /*Array*/arr, /*Function*/callback, /*Object?*/obj){
- var _p = _getParts(arr, obj, callback); arr = _p[0];
- for(var i = 0, l = arr.length; i < l; i++){
- var result = !!_p[2].call(_p[1], arr[i], i, arr);
- if(every ^ result){
- return result; // Boolean
- }
- }
- return every; // Boolean
- },
-
- every: function(/*Array*/arr, /*Function*/callback, /*Object?*/thisObject){
- // summary:
- // Determines whether or not every item in the array satisfies the
- // condition implemented by callback.
- // description:
- // The parameter thisObject may be used to
- // scope the call to callback. The function signature is derived
- // from the JavaScript 1.6 Array.every() function. More
- // information on this can be found here:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:every
- // example:
- // | dojo.every([1, 2, 3, 4], function(item){ return item>1; });
- // returns false
- // example:
- // | dojo.every([1, 2, 3, 4], function(item){ return item>0; });
- // returns true
- return this._everyOrSome(true, arr, callback, thisObject); // Boolean
- },
-
- some: function(/*Array*/arr, /*Function*/callback, /*Object?*/thisObject){
- // summary:
- // Determines whether or not any item in the array satisfies the
- // condition implemented by callback.
- // description:
- // The parameter thisObject may be used to
- // scope the call to callback. The function signature is derived
- // from the JavaScript 1.6 Array.some() function. More
- // information on this can be found here:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:some
- // example:
- // | dojo.some([1, 2, 3, 4], function(item){ return item>1; });
- // returns true
- // example:
- // | dojo.some([1, 2, 3, 4], function(item){ return item<1; });
- // returns false
- return this._everyOrSome(false, arr, callback, thisObject); // Boolean
- },
-
- map: function(/*Array*/arr, /*Function*/func, /*Function?*/obj){
- // summary:
- // applies a function to each element of an Array and creates
- // an Array with the results
- // description:
- // Returns a new array constituted from the return values of
- // passing each element of arr into unary_func. The obj parameter
- // may be passed to enable the passed function to be called in
- // that scope. In environments that support JavaScript 1.6, this
- // function is a passthrough to the built-in map() function
- // provided by Array instances. For details on this, see:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:map
- // example:
- // | dojo.map([1, 2, 3, 4], function(item){ return item+1 });
- // returns [2, 3, 4, 5]
- var _p = _getParts(arr, obj, func); arr = _p[0];
- var outArr = ((arguments[3]) ? (new arguments[3]()) : []);
- for(var i=0;i<arr.length;++i){
- outArr.push(_p[2].call(_p[1], arr[i], i, arr));
- }
- return outArr; // Array
- },
-
- filter: function(/*Array*/arr, /*Function*/callback, /*Object?*/obj){
- // summary:
- // Returns a new Array with those items from arr that match the
- // condition implemented by callback. ob may be used to
- // scope the call to callback. The function signature is derived
- // from the JavaScript 1.6 Array.filter() function.
- //
- // More information on the JS 1.6 API can be found here:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:filter
- // example:
- // | dojo.filter([1, 2, 3, 4], function(item){ return item>1; });
- // returns [2, 3, 4]
-
- var _p = _getParts(arr, obj, callback); arr = _p[0];
- var outArr = [];
- for(var i = 0; i < arr.length; i++){
- if(_p[2].call(_p[1], arr[i], i, arr)){
- outArr.push(arr[i]);
- }
- }
- return outArr; // Array
- }
- });
+var _1=function(_2,_3,cb){
+return [(typeof _2=="string")?_2.split(""):_2,_3||dojo.global,(typeof cb=="string")?new Function("item","index","array",cb):cb];
+};
+var _4=function(_5,_6,_7,_8){
+var _9=_1(_6,_8,_7);
+_6=_9[0];
+for(var i=0,l=_6.length;i<l;++i){
+var _a=!!_9[2].call(_9[1],_6[i],i,_6);
+if(_5^_a){
+return _a;
+}
+}
+return _5;
+};
+dojo.mixin(dojo,{indexOf:function(_b,_c,_d,_e){
+var _f=1,end=_b.length||0,i=0;
+if(_e){
+i=end-1;
+_f=end=-1;
+}
+if(_d!=undefined){
+i=_d;
+}
+if((_e&&i>end)||i<end){
+for(;i!=end;i+=_f){
+if(_b[i]==_c){
+return i;
+}
+}
+}
+return -1;
+},lastIndexOf:function(_10,_11,_12){
+return dojo.indexOf(_10,_11,_12,true);
+},forEach:function(arr,_13,_14){
+if(!arr||!arr.length){
+return;
+}
+var _15=_1(arr,_14,_13);
+arr=_15[0];
+for(var i=0,l=arr.length;i<l;++i){
+_15[2].call(_15[1],arr[i],i,arr);
+}
+},every:function(arr,_16,_17){
+return _4(true,arr,_16,_17);
+},some:function(arr,_18,_19){
+return _4(false,arr,_18,_19);
+},map:function(arr,_1a,_1b){
+var _1c=_1(arr,_1b,_1a);
+arr=_1c[0];
+var _1d=(arguments[3]?(new arguments[3]()):[]);
+for(var i=0,l=arr.length;i<l;++i){
+_1d.push(_1c[2].call(_1c[1],arr[i],i,arr));
+}
+return _1d;
+},filter:function(arr,_1e,_1f){
+var _20=_1(arr,_1f,_1e);
+arr=_20[0];
+var _21=[];
+for(var i=0,l=arr.length;i<l;++i){
+if(_20[2].call(_20[1],arr[i],i,arr)){
+_21.push(arr[i]);
+}
+}
+return _21;
+}});
})();
-
}
diff --git a/js/dojo/dojo/_base/connect.js b/js/dojo/dojo/_base/connect.js
--- a/js/dojo/dojo/_base/connect.js
+++ b/js/dojo/dojo/_base/connect.js
@@ -1,285 +1,85 @@
-if(!dojo._hasResource["dojo._base.connect"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.connect"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo._base.connect"]){
+dojo._hasResource["dojo._base.connect"]=true;
dojo.provide("dojo._base.connect");
dojo.require("dojo._base.lang");
-
-// this file courtesy of the TurboAjax Group, licensed under a Dojo CLA
-
-// low-level delegation machinery
-dojo._listener = {
- // create a dispatcher function
- getDispatcher: function(){
- // following comments pulled out-of-line to prevent cloning them
- // in the returned function.
- // - indices (i) that are really in the array of listeners (ls) will
- // not be in Array.prototype. This is the 'sparse array' trick
- // that keeps us safe from libs that take liberties with built-in
- // objects
- // - listener is invoked with current scope (this)
- return function(){
- var ap=Array.prototype, c=arguments.callee, ls=c._listeners, t=c.target;
- // return value comes from original target function
- var r=t && t.apply(this, arguments);
- // invoke listeners after target function
- for(var i in ls){
- if(!(i in ap)){
- ls[i].apply(this, arguments);
- }
- }
- // return value comes from original target function
- return r;
- }
- },
- // add a listener to an object
- add: function(/*Object*/ source, /*String*/ method, /*Function*/ listener){
- // Whenever 'method' is invoked, 'listener' will have the same scope.
- // Trying to supporting a context object for the listener led to
- // complexity.
- // Non trivial to provide 'once' functionality here
- // because listener could be the result of a dojo.hitch call,
- // in which case two references to the same hitch target would not
- // be equivalent.
- source = source || dojo.global;
- // The source method is either null, a dispatcher, or some other function
- var f = source[method];
- // Ensure a dispatcher
- if(!f||!f._listeners){
- var d = dojo._listener.getDispatcher();
- // original target function is special
- d.target = f;
- // dispatcher holds a list of listeners
- d._listeners = [];
- // redirect source to dispatcher
- f = source[method] = d;
- }
- // The contract is that a handle is returned that can
- // identify this listener for disconnect.
- //
- // The type of the handle is private. Here is it implemented as Integer.
- // DOM event code has this same contract but handle is Function
- // in non-IE browsers.
- //
- // We could have separate lists of before and after listeners.
- return f._listeners.push(listener) ; /*Handle*/
- },
- // remove a listener from an object
- remove: function(/*Object*/ source, /*String*/ method, /*Handle*/ handle){
- var f = (source||dojo.global)[method];
- // remember that handle is the index+1 (0 is not a valid handle)
- if(f && f._listeners && handle--){
- delete f._listeners[handle];
- }
- }
+dojo._listener={getDispatcher:function(){
+return function(){
+var ap=Array.prototype,c=arguments.callee,ls=c._listeners,t=c.target;
+var r=t&&t.apply(this,arguments);
+var _1;
+_1=[].concat(ls);
+for(var i in _1){
+if(!(i in ap)){
+_1[i].apply(this,arguments);
+}
+}
+return r;
};
-
-// Multiple delegation for arbitrary methods.
-
-// This unit knows nothing about DOM,
-// but we include DOM aware
-// documentation and dontFix
-// argument here to help the autodocs.
-// Actual DOM aware code is in event.js.
-
-dojo.connect = function(/*Object|null*/ obj,
- /*String*/ event,
- /*Object|null*/ context,
- /*String|Function*/ method,
- /*Boolean*/ dontFix){
- // summary:
- // Create a link that calls one function when another executes.
- //
- // description:
- // Connects method to event, so that after event fires, method
- // does too. All connected functions are passed the same arguments as
- // the event function was initially called with. You may connect as
- // many methods to event as needed.
- //
- // event must be a string. If obj is null, dojo.global is used.
- //
- // null arguments may simply be omitted.
- //
- // obj[event] can resolve to a function or undefined (null).
- // If obj[event] is null, it is assigned a function.
- //
- // The return value is a handle that is needed to
- // remove this connection with dojo.disconnect.
- //
- // obj:
- // The source object for the event function.
- // Defaults to dojo.global if null.
- // If obj is a DOM node, the connection is delegated
- // to the DOM event manager (unless dontFix is true).
- //
- // event:
- // String name of the event function in obj.
- // I.e. identifies a property obj[event].
- //
- // context:
- // The object that method will receive as "this".
- //
- // If context is null and method is a function, then method
- // inherits the context of event.
- //
- // If method is a string then context must be the source
- // object object for method (context[method]). If context is null,
- // dojo.global is used.
- //
- // method:
- // A function reference, or name of a function in context.
- // The function identified by method fires after event does.
- // method receives the same arguments as the event.
- // See context argument comments for information on method's scope.
- //
- // dontFix:
- // If obj is a DOM node, set dontFix to true to prevent delegation
- // of this connection to the DOM event manager.
- //
- // example:
- // When obj.onchange(), do ui.update():
- // | dojo.connect(obj, "onchange", ui, "update");
- // | dojo.connect(obj, "onchange", ui, ui.update); // same
- //
- // example:
- // Using return value for disconnect:
- // | var link = dojo.connect(obj, "onchange", ui, "update");
- // | ...
- // | dojo.disconnect(link);
- //
- // example:
- // When onglobalevent executes, watcher.handler is invoked:
- // | dojo.connect(null, "onglobalevent", watcher, "handler");
- //
- // example:
- // When ob.onCustomEvent executes, customEventHandler is invoked:
- // | dojo.connect(ob, "onCustomEvent", null, "customEventHandler");
- // | dojo.connect(ob, "onCustomEvent", "customEventHandler"); // same
- //
- // example:
- // When ob.onCustomEvent executes, customEventHandler is invoked
- // with the same scope (this):
- // | dojo.connect(ob, "onCustomEvent", null, customEventHandler);
- // | dojo.connect(ob, "onCustomEvent", customEventHandler); // same
- //
- // example:
- // When globalEvent executes, globalHandler is invoked
- // with the same scope (this):
- // | dojo.connect(null, "globalEvent", null, globalHandler);
- // | dojo.connect("globalEvent", globalHandler); // same
-
- // normalize arguments
- var a=arguments, args=[], i=0;
- // if a[0] is a String, obj was ommited
- args.push(dojo.isString(a[0]) ? null : a[i++], a[i++]);
- // if the arg-after-next is a String or Function, context was NOT omitted
- var a1 = a[i+1];
- args.push(dojo.isString(a1)||dojo.isFunction(a1) ? a[i++] : null, a[i++]);
- // absorb any additional arguments
- for(var l=a.length; i<l; i++){ args.push(a[i]); }
- // do the actual work
- return dojo._connect.apply(this, args); /*Handle*/
+},add:function(_2,_3,_4){
+_2=_2||dojo.global;
+var f=_2[_3];
+if(!f||!f._listeners){
+var d=dojo._listener.getDispatcher();
+d.target=f;
+d._listeners=[];
+f=_2[_3]=d;
+}
+return f._listeners.push(_4);
+},remove:function(_5,_6,_7){
+var f=(_5||dojo.global)[_6];
+if(f&&f._listeners&&_7--){
+delete f._listeners[_7];
+}
+}};
+dojo.connect=function(_8,_9,_a,_b,_c){
+var a=arguments,_d=[],i=0;
+_d.push(dojo.isString(a[0])?null:a[i++],a[i++]);
+var a1=a[i+1];
+_d.push(dojo.isString(a1)||dojo.isFunction(a1)?a[i++]:null,a[i++]);
+for(var l=a.length;i<l;i++){
+_d.push(a[i]);
}
-
-// used by non-browser hostenvs. always overriden by event.js
-dojo._connect = function(obj, event, context, method){
- var l=dojo._listener, h=l.add(obj, event, dojo.hitch(context, method));
- return [obj, event, h, l]; // Handle
-}
-
-dojo.disconnect = function(/*Handle*/ handle){
- // summary:
- // Remove a link created by dojo.connect.
- // description:
- // Removes the connection between event and the method referenced by handle.
- // handle:
- // the return value of the dojo.connect call that created the connection.
- if(handle && handle[0] !== undefined){
- dojo._disconnect.apply(this, handle);
- // let's not keep this reference
- delete handle[0];
- }
-}
-
-dojo._disconnect = function(obj, event, handle, listener){
- listener.remove(obj, event, handle);
-}
-
-// topic publish/subscribe
-
-dojo._topics = {};
-
-dojo.subscribe = function(/*String*/ topic, /*Object|null*/ context, /*String|Function*/ method){
- // summary:
- // Attach a listener to a named topic. The listener function is invoked whenever the
- // named topic is published (see: dojo.publish).
- // Returns a handle which is needed to unsubscribe this listener.
- // context:
- // Scope in which method will be invoked, or null for default scope.
- // method:
- // The name of a function in context, or a function reference. This is the function that
- // is invoked when topic is published.
- // example:
- // | dojo.subscribe("alerts", null, function(caption, message){ alert(caption + "\n" + message); };
- // | dojo.publish("alerts", [ "read this", "hello world" ]);
-
- // support for 2 argument invocation (omitting context) depends on hitch
- return [topic, dojo._listener.add(dojo._topics, topic, dojo.hitch(context, method))]; /*Handle*/
+return dojo._connect.apply(this,_d);
+};
+dojo._connect=function(_e,_f,_10,_11){
+var l=dojo._listener,h=l.add(_e,_f,dojo.hitch(_10,_11));
+return [_e,_f,h,l];
+};
+dojo.disconnect=function(_12){
+if(_12&&_12[0]!==undefined){
+dojo._disconnect.apply(this,_12);
+delete _12[0];
}
-
-dojo.unsubscribe = function(/*Handle*/ handle){
- // summary:
- // Remove a topic listener.
- // handle:
- // The handle returned from a call to subscribe.
- // example:
- // | var alerter = dojo.subscribe("alerts", null, function(caption, message){ alert(caption + "\n" + message); };
- // | ...
- // | dojo.unsubscribe(alerter);
- if(handle){
- dojo._listener.remove(dojo._topics, handle[0], handle[1]);
- }
+};
+dojo._disconnect=function(obj,_13,_14,_15){
+_15.remove(obj,_13,_14);
+};
+dojo._topics={};
+dojo.subscribe=function(_16,_17,_18){
+return [_16,dojo._listener.add(dojo._topics,_16,dojo.hitch(_17,_18))];
+};
+dojo.unsubscribe=function(_19){
+if(_19){
+dojo._listener.remove(dojo._topics,_19[0],_19[1]);
}
-
-dojo.publish = function(/*String*/ topic, /*Array*/ args){
- // summary:
- // Invoke all listener method subscribed to topic.
- // topic:
- // The name of the topic to publish.
- // args:
- // An array of arguments. The arguments will be applied
- // to each topic subscriber (as first class parameters, via apply).
- // example:
- // | dojo.subscribe("alerts", null, function(caption, message){ alert(caption + "\n" + message); };
- // | dojo.publish("alerts", [ "read this", "hello world" ]);
-
- // Note that args is an array, which is more efficient vs variable length
- // argument list. Ideally, var args would be implemented via Array
- // throughout the APIs.
- var f = dojo._topics[topic];
- if(f){
- f.apply(this, args||[]);
- }
+};
+dojo.publish=function(_1a,_1b){
+var f=dojo._topics[_1a];
+if(f){
+f.apply(this,_1b||[]);
}
-
-dojo.connectPublisher = function( /*String*/ topic,
- /*Object|null*/ obj,
- /*String*/ event){
- // summary:
- // Ensure that everytime obj.event() is called, a message is published
- // on the topic. Returns a handle which can be passed to
- // dojo.disconnect() to disable subsequent automatic publication on
- // the topic.
- // topic:
- // The name of the topic to publish.
- // obj:
- // The source object for the event function. Defaults to dojo.global
- // if null.
- // event:
- // The name of the event function in obj.
- // I.e. identifies a property obj[event].
- // example:
- // | dojo.connectPublisher("/ajax/start", dojo, "xhrGet"};
- var pf = function(){ dojo.publish(topic, arguments); }
- return (event) ? dojo.connect(obj, event, pf) : dojo.connect(obj, pf); //Handle
};
-
+dojo.connectPublisher=function(_1c,obj,_1d){
+var pf=function(){
+dojo.publish(_1c,arguments);
+};
+return (_1d)?dojo.connect(obj,_1d,pf):dojo.connect(obj,pf);
+};
}
diff --git a/js/dojo/dojo/_base/declare.js b/js/dojo/dojo/_base/declare.js
--- a/js/dojo/dojo/_base/declare.js
+++ b/js/dojo/dojo/_base/declare.js
@@ -1,186 +1,379 @@
-if(!dojo._hasResource["dojo._base.declare"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.declare"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo._base.declare"]){
+dojo._hasResource["dojo._base.declare"]=true;
dojo.provide("dojo._base.declare");
dojo.require("dojo._base.lang");
-
-// this file courtesy of the TurboAjax group, licensed under a Dojo CLA
-
-dojo.declare = function(/*String*/ className, /*Function|Function[]*/ superclass, /*Object*/ props){
- // summary:
- // Create a feature-rich constructor from compact notation
- // className:
- // The name of the constructor (loosely, a "class")
- // stored in the "declaredClass" property in the created prototype
- // superclass:
- // May be null, a Function, or an Array of Functions. If an array,
- // the first element is used as the prototypical ancestor and
- // any following Functions become mixin ancestors.
- // props:
- // An object whose properties are copied to the
- // created prototype.
- // Add an instance-initialization function by making it a property
- // named "constructor".
- // description:
- // Create a constructor using a compact notation for inheritance and
- // prototype extension.
- //
- // All superclasses (including mixins) must be Functions (not simple Objects).
- //
- // Mixin ancestors provide a type of multiple inheritance. Prototypes of mixin
- // ancestors are copied to the new class: changes to mixin prototypes will
- // not affect classes to which they have been mixed in.
- //
- // "className" is cached in "declaredClass" property of the new class.
- //
- // example:
- // | dojo.declare("my.classes.bar", my.classes.foo, {
- // | // properties to be added to the class prototype
- // | someValue: 2,
- // | // initialization function
- // | constructor: function(){
- // | this.myComplicatedObject = new ReallyComplicatedObject();
- // | },
- // | // other functions
- // | someMethod: function(){
- // | doStuff();
- // | }
- // | );
-
- // argument juggling (deprecated)
- if(dojo.isFunction(props)||(arguments.length>3)){
- dojo.deprecated("dojo.declare: for class '" + className + "' pass initializer function as 'constructor' property instead of as a separate argument.", "", "1.0");
- var c = props;
- props = arguments[3] || {};
- props.constructor = c;
- }
- // process superclass argument
- // var dd=dojo.declare, mixins=null;
- var dd=arguments.callee, mixins=null;
- if(dojo.isArray(superclass)){
- mixins = superclass;
- superclass = mixins.shift();
- }
- // construct intermediate classes for mixins
- if(mixins){
- for(var i=0, m; i<mixins.length; i++){
- m = mixins[i];
- if(!m){throw("Mixin #" + i + " to declaration of " + className + " is null. It's likely a required module is not loaded.")};
- superclass = dd._delegate(superclass, m);
- }
- }
- // prepare values
- var init=(props||0).constructor, ctor=dd._delegate(superclass), fn;
- // name methods (experimental)
- for(var i in props){if(dojo.isFunction(fn=props[i])&&(!0[i])){fn.nom=i;}}
- // decorate prototype
- dojo.extend(ctor, {declaredClass: className, _constructor: init, preamble: null}, props||0);
- // special help for IE
- ctor.prototype.constructor = ctor;
- // create named reference
- return dojo.setObject(className, ctor); // Function
+dojo.require("dojo._base.array");
+(function(){
+var d=dojo,_1=d._mixin,op=Object.prototype,_2=op.toString,_3=new Function,_4=0,_5="constructor";
+function _6(_7){
+throw new Error("declare: "+_7);
+};
+function _8(_9){
+var _a=[],_b=[{cls:0,refs:[]}],_c={},_d=1,l=_9.length,i=0,j,_e,_f,top,_10,rec,_11,_12;
+for(;i<l;++i){
+_f=_9[i];
+if(!_f){
+_6("mixin #"+i+" is null");
+}
+_e=_f._meta?_f._meta.bases:[_f];
+top=0;
+for(j=_e.length-1;j>=0;--j){
+_10=_e[j].prototype;
+if(!_10.hasOwnProperty("declaredClass")){
+_10.declaredClass="uniqName_"+(_4++);
+}
+_11=_10.declaredClass;
+if(!_c.hasOwnProperty(_11)){
+_c[_11]={count:0,refs:[],cls:_e[j]};
+++_d;
+}
+rec=_c[_11];
+if(top&&top!==rec){
+rec.refs.push(top);
+++top.count;
+}
+top=rec;
+}
+++top.count;
+_b[0].refs.push(top);
+}
+while(_b.length){
+top=_b.pop();
+_a.push(top.cls);
+--_d;
+while(_12=top.refs,_12.length==1){
+top=_12[0];
+if(!top||--top.count){
+top=0;
+break;
+}
+_a.push(top.cls);
+--_d;
+}
+if(top){
+for(i=0,l=_12.length;i<l;++i){
+top=_12[i];
+if(!--top.count){
+_b.push(top);
+}
+}
+}
+}
+if(_d){
+_6("can't build consistent linearization");
+}
+_f=_9[0];
+_a[0]=_f?_f._meta&&_f===_a[_a.length-_f._meta.bases.length]?_f._meta.bases.length:1:0;
+return _a;
+};
+function _13(_14,a,f){
+var _15,_16,_17,_18,_19,_1a,_1b,opf,pos,_1c=this._inherited=this._inherited||{};
+if(typeof _14=="string"){
+_15=_14;
+_14=a;
+a=f;
+}
+f=0;
+_18=_14.callee;
+_15=_15||_18.nom;
+if(!_15){
+_6("can't deduce a name to call inherited()");
+}
+_19=this.constructor._meta;
+_17=_19.bases;
+pos=_1c.p;
+if(_15!=_5){
+if(_1c.c!==_18){
+pos=0;
+_1a=_17[0];
+_19=_1a._meta;
+if(_19.hidden[_15]!==_18){
+_16=_19.chains;
+if(_16&&typeof _16[_15]=="string"){
+_6("calling chained method with inherited: "+_15);
+}
+do{
+_19=_1a._meta;
+_1b=_1a.prototype;
+if(_19&&(_1b[_15]===_18&&_1b.hasOwnProperty(_15)||_19.hidden[_15]===_18)){
+break;
+}
+}while(_1a=_17[++pos]);
+pos=_1a?pos:-1;
+}
+}
+_1a=_17[++pos];
+if(_1a){
+_1b=_1a.prototype;
+if(_1a._meta&&_1b.hasOwnProperty(_15)){
+f=_1b[_15];
+}else{
+opf=op[_15];
+do{
+_1b=_1a.prototype;
+f=_1b[_15];
+if(f&&(_1a._meta?_1b.hasOwnProperty(_15):f!==opf)){
+break;
+}
+}while(_1a=_17[++pos]);
+}
+}
+f=_1a&&f||op[_15];
+}else{
+if(_1c.c!==_18){
+pos=0;
+_19=_17[0]._meta;
+if(_19&&_19.ctor!==_18){
+_16=_19.chains;
+if(!_16||_16.constructor!=="manual"){
+_6("calling chained constructor with inherited");
+}
+while(_1a=_17[++pos]){
+_19=_1a._meta;
+if(_19&&_19.ctor===_18){
+break;
+}
+}
+pos=_1a?pos:-1;
+}
+}
+while(_1a=_17[++pos]){
+_19=_1a._meta;
+f=_19?_19.ctor:_1a;
+if(f){
+break;
+}
+}
+f=_1a&&f;
+}
+_1c.c=f;
+_1c.p=pos;
+if(f){
+return a===true?f:f.apply(this,a||_14);
+}
+};
+function _1d(_1e,_1f){
+if(typeof _1e=="string"){
+return this.inherited(_1e,_1f,true);
+}
+return this.inherited(_1e,true);
+};
+function _20(cls){
+var _21=this.constructor._meta.bases;
+for(var i=0,l=_21.length;i<l;++i){
+if(_21[i]===cls){
+return true;
+}
+}
+return this instanceof cls;
+};
+function _22(_23,_24){
+var _25,t,i=0,l=d._extraNames.length;
+for(_25 in _24){
+t=_24[_25];
+if((t!==op[_25]||!(_25 in op))&&_25!=_5){
+if(_2.call(t)=="[object Function]"){
+t.nom=_25;
+}
+_23[_25]=t;
+}
+}
+for(;i<l;++i){
+_25=d._extraNames[i];
+t=_24[_25];
+if((t!==op[_25]||!(_25 in op))&&_25!=_5){
+if(_2.call(t)=="[object Function]"){
+t.nom=_25;
}
-
-dojo.mixin(dojo.declare, {
- _delegate: function(base, mixin){
- var bp = (base||0).prototype, mp = (mixin||0).prototype;
- // fresh constructor, fresh prototype
- var ctor = dojo.declare._makeCtor();
- // cache ancestry
- dojo.mixin(ctor, {superclass: bp, mixin: mp, extend: dojo.declare._extend});
- // chain prototypes
- if(base){ctor.prototype = dojo._delegate(bp);}
- // add mixin and core
- dojo.extend(ctor, dojo.declare._core, mp||0, {_constructor: null, preamble: null});
- // special help for IE
- ctor.prototype.constructor = ctor;
- // name this class for debugging
- ctor.prototype.declaredClass = (bp||0).declaredClass + '_' + (mp||0).declaredClass;
- return ctor;
- },
- _extend: function(props){
- for(var i in props){if(dojo.isFunction(fn=props[i])&&(!0[i])){fn.nom=i;}}
- dojo.extend(this, props);
- },
- _makeCtor: function(){
- // we have to make a function, but don't want to close over anything
- return function(){ this._construct(arguments); }
- },
- _core: {
- _construct: function(args){
- var c=args.callee, s=c.superclass, ct=s&&s.constructor, m=c.mixin, mct=m&&m.constructor, a=args, ii, fn;
- // side-effect of = used on purpose here, lint may complain, don't try this at home
- if(a[0]){
- // FIXME: preambles for each mixin should be allowed
- // FIXME:
- // should we allow the preamble here NOT to modify the
- // default args, but instead to act on each mixin
- // independently of the class instance being constructed
- // (for impdedence matching)?
-
- // allow any first argument w/ a "preamble" property to act as a
- // class preamble (not exclusive of the prototype preamble)
- if(/*dojo.isFunction*/(fn = a[0]["preamble"])){
- a = fn.apply(this, a) || a;
- }
- }
- // prototype preamble
- if(fn=c.prototype.preamble){a = fn.apply(this, a) || a;}
- // FIXME:
- // need to provide an optional prototype-settable
- // "_explicitSuper" property which disables this
- // initialize superclass
- if(ct&&ct.apply){ct.apply(this, a);}
- // initialize mixin
- if(mct&&mct.apply){mct.apply(this, a);}
- // initialize self
- if(ii=c.prototype._constructor){ii.apply(this, args);}
- // post construction
- if(this.constructor.prototype==c.prototype && (ct=this.postscript)){ct.apply(this, args)};
- },
- _findMixin: function(mixin){
- var c = this.constructor, p, m;
- while(c){
- p = c.superclass;
- m = c.mixin;
- if(m==mixin || (m instanceof mixin.constructor)){return p;}
- if(m && (m=m._findMixin(mixin))){return m;}
- c = p && p.constructor;
- }
- },
- _findMethod: function(name, method, ptype, has){
- // consciously trading readability for bytes and speed in this low-level method
- var p=ptype, c, m, f;
- do{
- c = p.constructor;
- m = c.mixin;
- // find method by name in our mixin ancestor
- if(m && (m=this._findMethod(name, method, m, has))){return m};
- // if we found a named method that either exactly-is or exactly-is-not 'method'
- if((f=p[name])&&(has==(f==method))){return p};
- // ascend chain
- p = c.superclass;
- }while(p);
- // if we couldn't find an ancestor in our primary chain, try a mixin chain
- return !has && (p=this._findMixin(ptype)) && this._findMethod(name, method, p, has);
- },
- inherited: function(name, args, newArgs){
- // optionalize name argument (experimental)
- var a = arguments;
- if(!dojo.isString(a[0])){newArgs=args; args=name; name=args.callee.nom;}
- var c=args.callee, p=this.constructor.prototype, a=newArgs||args, fn, mp;
- // if not an instance override
- if(this[name]!=c || p[name]==c){
- mp = this._findMethod(name, c, p, true);
- if(!mp){throw(this.declaredClass + ': name argument ("' + name + '") to inherited must match callee (declare.js)');}
- p = this._findMethod(name, c, mp, false);
- }
- fn = p && p[name];
- // FIXME: perhaps we should throw here?
- if(!fn){console.debug(mp.declaredClass + ': no inherited "' + name + '" was found (declare.js)'); return;}
- // if the function exists, invoke it in our scope
- return fn.apply(this, a);
- }
- }
-});
-
+_23[_25]=t;
+}
+}
+return _23;
+};
+function _26(_27){
+_22(this.prototype,_27);
+return this;
+};
+function _28(_29,_2a){
+return function(){
+var a=arguments,_2b=a,a0=a[0],f,i,m,l=_29.length,_2c;
+if(_2a&&(a0&&a0.preamble||this.preamble)){
+_2c=new Array(_29.length);
+_2c[0]=a;
+for(i=0;;){
+a0=a[0];
+if(a0){
+f=a0.preamble;
+if(f){
+a=f.apply(this,a)||a;
+}
+}
+f=_29[i].prototype;
+f=f.hasOwnProperty("preamble")&&f.preamble;
+if(f){
+a=f.apply(this,a)||a;
+}
+if(++i==l){
+break;
+}
+_2c[i]=a;
+}
+}
+for(i=l-1;i>=0;--i){
+f=_29[i];
+m=f._meta;
+f=m?m.ctor:f;
+if(f){
+f.apply(this,_2c?_2c[i]:a);
+}
+}
+f=this.postscript;
+if(f){
+f.apply(this,_2b);
+}
+};
+};
+function _2d(_2e,_2f){
+return function(){
+var a=arguments,t=a,a0=a[0],f;
+if(_2f){
+if(a0){
+f=a0.preamble;
+if(f){
+t=f.apply(this,t)||t;
+}
+}
+f=this.preamble;
+if(f){
+f.apply(this,t);
+}
+}
+if(_2e){
+_2e.apply(this,a);
+}
+f=this.postscript;
+if(f){
+f.apply(this,a);
+}
+};
+};
+function _30(_31){
+return function(){
+var a=arguments,i=0,f;
+for(;f=_31[i];++i){
+m=f._meta;
+f=m?m.ctor:f;
+if(f){
+f.apply(this,a);
+break;
+}
+}
+f=this.postscript;
+if(f){
+f.apply(this,a);
}
+};
+};
+function _32(_33,_34,_35){
+return function(){
+var b,m,f,i=0,_36=1;
+if(_35){
+i=_34.length-1;
+_36=-1;
+}
+for(;b=_34[i];i+=_36){
+m=b._meta;
+f=(m?m.hidden:b.prototype)[_33];
+if(f){
+f.apply(this,arguments);
+}
+}
+};
+};
+d.declare=function(_37,_38,_39){
+var _3a,i,t,_3b,_3c,_3d,_3e,_3f=1,_40=_38;
+if(typeof _37!="string"){
+_39=_38;
+_38=_37;
+_37="";
+}
+_39=_39||{};
+if(_2.call(_38)=="[object Array]"){
+_3d=_8(_38);
+t=_3d[0];
+_3f=_3d.length-t;
+_38=_3d[_3f];
+}else{
+_3d=[0];
+if(_38){
+t=_38._meta;
+_3d=_3d.concat(t?t.bases:_38);
+}
+}
+if(_38){
+for(i=_3f-1;;--i){
+_3.prototype=_38.prototype;
+_3a=new _3;
+if(!i){
+break;
+}
+t=_3d[i];
+_1(_3a,t._meta?t._meta.hidden:t.prototype);
+_3b=new Function;
+_3b.superclass=_38;
+_3b.prototype=_3a;
+_38=_3a.constructor=_3b;
+}
+}else{
+_3a={};
+}
+_22(_3a,_39);
+t=_39.constructor;
+if(t!==op.constructor){
+t.nom=_5;
+_3a.constructor=t;
+}
+_3.prototype=0;
+for(i=_3f-1;i;--i){
+t=_3d[i]._meta;
+if(t&&t.chains){
+_3e=_1(_3e||{},t.chains);
+}
+}
+if(_3a["-chains-"]){
+_3e=_1(_3e||{},_3a["-chains-"]);
+}
+t=!_3e||!_3e.hasOwnProperty(_5);
+_3d[0]=_3b=(_3e&&_3e.constructor==="manual")?_30(_3d):(_3d.length==1?_2d(_39.constructor,t):_28(_3d,t));
+_3b._meta={bases:_3d,hidden:_39,chains:_3e,parents:_40,ctor:_39.constructor};
+_3b.superclass=_38&&_38.prototype;
+_3b.extend=_26;
+_3b.prototype=_3a;
+_3a.constructor=_3b;
+_3a.getInherited=_1d;
+_3a.inherited=_13;
+_3a.isInstanceOf=_20;
+if(_37){
+_3a.declaredClass=_37;
+d.setObject(_37,_3b);
+}
+if(_3e){
+for(_3c in _3e){
+if(_3a[_3c]&&typeof _3e[_3c]=="string"&&_3c!=_5){
+t=_3a[_3c]=_32(_3c,_3d,_3e[_3c]==="after");
+t.nom=_3c;
+}
+}
+}
+return _3b;
+};
+d.safeMixin=_22;
+})();
+}
diff --git a/js/dojo/dojo/_base/event.js b/js/dojo/dojo/_base/event.js
--- a/js/dojo/dojo/_base/event.js
+++ b/js/dojo/dojo/_base/event.js
@@ -1,519 +1,359 @@
-if(!dojo._hasResource["dojo._base.event"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.event"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo._base.event"]){
+dojo._hasResource["dojo._base.event"]=true;
dojo.provide("dojo._base.event");
dojo.require("dojo._base.connect");
-
-// this file courtesy of the TurboAjax Group, licensed under a Dojo CLA
-
(function(){
- // DOM event listener machinery
- var del = dojo._event_listener = {
- add: function(/*DOMNode*/node, /*String*/name, /*Function*/fp){
- if(!node){return;}
- name = del._normalizeEventName(name);
-
- fp = del._fixCallback(name, fp);
-
- var oname = name;
- if((!dojo.isIE)&&((name == "mouseenter")||(name == "mouseleave"))){
- var oname = name;
- var ofp = fp;
- name = (name == "mouseenter") ? "mouseover" : "mouseout";
- fp = function(e){
- // thanks ben!
- var id = dojo.isDescendant(e.relatedTarget, node);
- if(id == false){
- // e.type = oname; // FIXME: doesn't take?
- return ofp.call(this, e);
- }
- }
- }
-
- node.addEventListener(name, fp, false);
- return fp; /*Handle*/
- },
- remove: function(/*DOMNode*/node, /*String*/event, /*Handle*/handle){
- // summary:
- // clobbers the listener from the node
- // node:
- // DOM node to attach the event to
- // event:
- // the name of the handler to remove the function from
- // handle:
- // the handle returned from add
- (node)&&(node.removeEventListener(del._normalizeEventName(event), handle, false));
- },
- _normalizeEventName: function(/*String*/name){
- // Generally, name should be lower case, unless it is special
- // somehow (e.g. a Mozilla DOM event).
- // Remove 'on'.
- return (name.slice(0,2)=="on" ? name.slice(2) : name);
- },
- _fixCallback: function(/*String*/name, fp){
- // By default, we only invoke _fixEvent for 'keypress'
- // If code is added to _fixEvent for other events, we have
- // to revisit this optimization.
- // This also applies to _fixEvent overrides for Safari and Opera
- // below.
- return (name!="keypress" ? fp : function(e){ return fp.call(this, del._fixEvent(e, this)); });
- },
- _fixEvent: function(evt, sender){
- // _fixCallback only attaches us to keypress.
- // Switch on evt.type anyway because we might
- // be called directly from dojo.fixEvent.
- switch(evt.type){
- case "keypress":
- del._setKeyChar(evt);
- break;
- }
- return evt;
- },
- _setKeyChar: function(evt){
- evt.keyChar = (evt.charCode ? String.fromCharCode(evt.charCode) : '');
- }
- };
-
- // DOM events
-
- dojo.fixEvent = function(/*Event*/evt, /*DOMNode*/sender){
- // summary:
- // normalizes properties on the event object including event
- // bubbling methods, keystroke normalization, and x/y positions
- // evt: Event
- // native event object
- // sender: DOMNode
- // node to treat as "currentTarget"
- return del._fixEvent(evt, sender);
- }
-
- dojo.stopEvent = function(/*Event*/evt){
- // summary:
- // prevents propagation and clobbers the default action of the
- // passed event
- // evt: Event
- // The event object. If omitted, window.event is used on IE.
- evt.preventDefault();
- evt.stopPropagation();
- // NOTE: below, this method is overridden for IE
- }
-
- // the default listener to use on dontFix nodes, overriden for IE
- var node_listener = dojo._listener;
-
- // Unify connect and event listeners
- dojo._connect = function(obj, event, context, method, dontFix){
- // FIXME: need a more strict test
- var isNode = obj && (obj.nodeType||obj.attachEvent||obj.addEventListener);
- // choose one of three listener options: raw (connect.js), DOM event on a Node, custom event on a Node
- // we need the third option to provide leak prevention on broken browsers (IE)
- var lid = !isNode ? 0 : (!dontFix ? 1 : 2), l = [dojo._listener, del, node_listener][lid];
- // create a listener
- var h = l.add(obj, event, dojo.hitch(context, method));
- // formerly, the disconnect package contained "l" directly, but if client code
- // leaks the disconnect package (by connecting it to a node), referencing "l"
- // compounds the problem.
- // instead we return a listener id, which requires custom _disconnect below.
- // return disconnect package
- return [ obj, event, h, lid ];
- }
-
- dojo._disconnect = function(obj, event, handle, listener){
- ([dojo._listener, del, node_listener][listener]).remove(obj, event, handle);
- }
-
- // Constants
-
- // Public: client code should test
- // keyCode against these named constants, as the
- // actual codes can vary by browser.
- dojo.keys = {
- BACKSPACE: 8,
- TAB: 9,
- CLEAR: 12,
- ENTER: 13,
- SHIFT: 16,
- CTRL: 17,
- ALT: 18,
- PAUSE: 19,
- CAPS_LOCK: 20,
- ESCAPE: 27,
- SPACE: 32,
- PAGE_UP: 33,
- PAGE_DOWN: 34,
- END: 35,
- HOME: 36,
- LEFT_ARROW: 37,
- UP_ARROW: 38,
- RIGHT_ARROW: 39,
- DOWN_ARROW: 40,
- INSERT: 45,
- DELETE: 46,
- HELP: 47,
- LEFT_WINDOW: 91,
- RIGHT_WINDOW: 92,
- SELECT: 93,
- NUMPAD_0: 96,
- NUMPAD_1: 97,
- NUMPAD_2: 98,
- NUMPAD_3: 99,
- NUMPAD_4: 100,
- NUMPAD_5: 101,
- NUMPAD_6: 102,
- NUMPAD_7: 103,
- NUMPAD_8: 104,
- NUMPAD_9: 105,
- NUMPAD_MULTIPLY: 106,
- NUMPAD_PLUS: 107,
- NUMPAD_ENTER: 108,
- NUMPAD_MINUS: 109,
- NUMPAD_PERIOD: 110,
- NUMPAD_DIVIDE: 111,
- F1: 112,
- F2: 113,
- F3: 114,
- F4: 115,
- F5: 116,
- F6: 117,
- F7: 118,
- F8: 119,
- F9: 120,
- F10: 121,
- F11: 122,
- F12: 123,
- F13: 124,
- F14: 125,
- F15: 126,
- NUM_LOCK: 144,
- SCROLL_LOCK: 145
- };
-
- // IE event normalization
- if(dojo.isIE){
- var _trySetKeyCode = function(e, code){
- try{
- // squelch errors when keyCode is read-only
- // (e.g. if keyCode is ctrl or shift)
- return (e.keyCode = code);
- }catch(e){
- return 0;
- }
- }
-
- // by default, use the standard listener
- var iel = dojo._listener;
- // dispatcher tracking property
- if(!djConfig._allow_leaks){
- // custom listener that handles leak protection for DOM events
- node_listener = iel = dojo._ie_listener = {
- // support handler indirection: event handler functions are
- // referenced here. Event dispatchers hold only indices.
- handlers: [],
- // add a listener to an object
- add: function(/*Object*/ source, /*String*/ method, /*Function*/ listener){
- source = source || dojo.global;
- var f = source[method];
- if(!f||!f._listeners){
- var d = dojo._getIeDispatcher();
- // original target function is special
- d.target = f && (ieh.push(f) - 1);
- // dispatcher holds a list of indices into handlers table
- d._listeners = [];
- // redirect source to dispatcher
- f = source[method] = d;
- }
- return f._listeners.push(ieh.push(listener) - 1) ; /*Handle*/
- },
- // remove a listener from an object
- remove: function(/*Object*/ source, /*String*/ method, /*Handle*/ handle){
- var f = (source||dojo.global)[method], l = f&&f._listeners;
- if(f && l && handle--){
- delete ieh[l[handle]];
- delete l[handle];
- }
- }
- };
- // alias used above
- var ieh = iel.handlers;
- }
-
- dojo.mixin(del, {
- add: function(/*DOMNode*/node, /*String*/event, /*Function*/fp){
- if(!node){return;} // undefined
- event = del._normalizeEventName(event);
- if(event=="onkeypress"){
- // we need to listen to onkeydown to synthesize
- // keypress events that otherwise won't fire
- // on IE
- var kd = node.onkeydown;
- if(!kd||!kd._listeners||!kd._stealthKeydown){
- // we simply ignore this connection when disconnecting
- // because it's side-effects are harmless
- del.add(node, "onkeydown", del._stealthKeyDown);
- // we only want one stealth listener per node
- node.onkeydown._stealthKeydown = true;
- }
- }
- return iel.add(node, event, del._fixCallback(fp));
- },
- remove: function(/*DOMNode*/node, /*String*/event, /*Handle*/handle){
- iel.remove(node, del._normalizeEventName(event), handle);
- },
- _normalizeEventName: function(/*String*/eventName){
- // Generally, eventName should be lower case, unless it is
- // special somehow (e.g. a Mozilla event)
- // ensure 'on'
- return (eventName.slice(0,2)!="on" ? "on"+eventName : eventName);
- },
- _nop: function(){},
- _fixEvent: function(/*Event*/evt, /*DOMNode*/sender){
- // summary:
- // normalizes properties on the event object including event
- // bubbling methods, keystroke normalization, and x/y positions
- // evt: native event object
- // sender: node to treat as "currentTarget"
- if(!evt){
- var w = (sender)&&((sender.ownerDocument || sender.document || sender).parentWindow)||window;
- evt = w.event;
- }
- if(!evt){return(evt);}
- evt.target = evt.srcElement;
- evt.currentTarget = (sender || evt.srcElement);
- evt.layerX = evt.offsetX;
- evt.layerY = evt.offsetY;
- // FIXME: scroll position query is duped from dojo.html to
- // avoid dependency on that entire module. Now that HTML is in
- // Base, we should convert back to something similar there.
- var se = evt.srcElement, doc = (se && se.ownerDocument) || document;
- // DO NOT replace the following to use dojo.body(), in IE, document.documentElement should be used
- // here rather than document.body
- var docBody = ((dojo.isIE<6)||(doc["compatMode"]=="BackCompat")) ? doc.body : doc.documentElement;
- var offset = dojo._getIeDocumentElementOffset();
- evt.pageX = evt.clientX + dojo._fixIeBiDiScrollLeft(docBody.scrollLeft || 0) - offset.x;
- evt.pageY = evt.clientY + (docBody.scrollTop || 0) - offset.y;
- if(evt.type == "mouseover"){
- evt.relatedTarget = evt.fromElement;
- }
- if(evt.type == "mouseout"){
- evt.relatedTarget = evt.toElement;
- }
- evt.stopPropagation = del._stopPropagation;
- evt.preventDefault = del._preventDefault;
- return del._fixKeys(evt);
- },
- _fixKeys: function(evt){
- switch(evt.type){
- case "keypress":
- var c = ("charCode" in evt ? evt.charCode : evt.keyCode);
- if (c==10){
- // CTRL-ENTER is CTRL-ASCII(10) on IE, but CTRL-ENTER on Mozilla
- c=0;
- evt.keyCode = 13;
- }else if(c==13||c==27){
- c=0; // Mozilla considers ENTER and ESC non-printable
- }else if(c==3){
- c=99; // Mozilla maps CTRL-BREAK to CTRL-c
- }
- // Mozilla sets keyCode to 0 when there is a charCode
- // but that stops the event on IE.
- evt.charCode = c;
- del._setKeyChar(evt);
- break;
- }
- return evt;
- },
- // some ctrl-key combinations (mostly w/punctuation) do not emit a char code in IE
- // we map those virtual key codes to ascii here
- // not valid for all (non-US) keyboards, so maybe we shouldn't bother
- _punctMap: {
- 106:42,
- 111:47,
- 186:59,
- 187:43,
- 188:44,
- 189:45,
- 190:46,
- 191:47,
- 192:96,
- 219:91,
- 220:92,
- 221:93,
- 222:39
- },
- _stealthKeyDown: function(evt){
- // IE doesn't fire keypress for most non-printable characters.
- // other browsers do, we simulate it here.
- var kp=evt.currentTarget.onkeypress;
- // only works if kp exists and is a dispatcher
- if(!kp||!kp._listeners)return;
- // munge key/charCode
- var k=evt.keyCode;
- // These are Windows Virtual Key Codes
- // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/UserInput/VirtualKeyCodes.asp
- var unprintable = (k!=13)&&(k!=32)&&(k!=27)&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);
- // synthesize keypress for most unprintables and CTRL-keys
- if(unprintable||evt.ctrlKey){
- var c = (unprintable ? 0 : k);
- if(evt.ctrlKey){
- if(k==3 || k==13){
- return; // IE will post CTRL-BREAK, CTRL-ENTER as keypress natively
- }else if(c>95 && c<106){
- c -= 48; // map CTRL-[numpad 0-9] to ASCII
- }else if((!evt.shiftKey)&&(c>=65&&c<=90)){
- c += 32; // map CTRL-[A-Z] to lowercase
- }else{
- c = del._punctMap[c] || c; // map other problematic CTRL combinations to ASCII
- }
- }
- // simulate a keypress event
- var faux = del._synthesizeEvent(evt, {type: 'keypress', faux: true, charCode: c});
- kp.call(evt.currentTarget, faux);
- evt.cancelBubble = faux.cancelBubble;
- evt.returnValue = faux.returnValue;
- _trySetKeyCode(evt, faux.keyCode);
- }
- },
- // Called in Event scope
- _stopPropagation: function(){
- this.cancelBubble = true;
- },
- _preventDefault: function(){
- // Setting keyCode to 0 is the only way to prevent certain keypresses (namely
- // ctrl-combinations that correspond to menu accelerator keys).
- // Otoh, it prevents upstream listeners from getting this information
- // Try to split the difference here by clobbering keyCode only for ctrl
- // combinations. If you still need to access the key upstream, bubbledKeyCode is
- // provided as a workaround.
- this.bubbledKeyCode = this.keyCode;
- if(this.ctrlKey){_trySetKeyCode(this, 0);}
- this.returnValue = false;
- }
- });
-
- // override stopEvent for IE
- dojo.stopEvent = function(evt){
- evt = evt || window.event;
- del._stopPropagation.call(evt);
- del._preventDefault.call(evt);
- }
- }
-
- del._synthesizeEvent = function(evt, props){
- var faux = dojo.mixin({}, evt, props);
- del._setKeyChar(faux);
- // FIXME: would prefer to use dojo.hitch: dojo.hitch(evt, evt.preventDefault);
- // but it throws an error when preventDefault is invoked on Safari
- // does Event.preventDefault not support "apply" on Safari?
- faux.preventDefault = function(){ evt.preventDefault(); };
- faux.stopPropagation = function(){ evt.stopPropagation(); };
- return faux;
- }
-
- // Opera event normalization
- if(dojo.isOpera){
- dojo.mixin(del, {
- _fixEvent: function(evt, sender){
- switch(evt.type){
- case "keypress":
- var c = evt.which;
- if(c==3){
- c=99; // Mozilla maps CTRL-BREAK to CTRL-c
- }
- // can't trap some keys at all, like INSERT and DELETE
- // there is no differentiating info between DELETE and ".", or INSERT and "-"
- c = ((c<41)&&(!evt.shiftKey) ? 0 : c);
- if((evt.ctrlKey)&&(!evt.shiftKey)&&(c>=65)&&(c<=90)){
- // lowercase CTRL-[A-Z] keys
- c += 32;
- }
- return del._synthesizeEvent(evt, { charCode: c });
- }
- return evt;
- }
- });
- }
-
- // Safari event normalization
- if(dojo.isSafari){
- dojo.mixin(del, {
- _fixEvent: function(evt, sender){
- switch(evt.type){
- case "keypress":
- var c = evt.charCode, s = evt.shiftKey, k = evt.keyCode;
- // FIXME: This is a hack, suggest we rethink keyboard strategy.
- // Arrow and page keys have 0 "keyCode" in keypress events.on Safari for Windows
- k = k || identifierMap[evt.keyIdentifier] || 0;
- if(evt.keyIdentifier=="Enter"){
- c = 0; // differentiate Enter from CTRL-m (both code 13)
- }else if((evt.ctrlKey)&&(c>0)&&(c<27)){
- c += 96; // map CTRL-[A-Z] codes to ASCII
- } else if (c==dojo.keys.SHIFT_TAB) {
- c = dojo.keys.TAB; // morph SHIFT_TAB into TAB + shiftKey: true
- s = true;
- } else {
- c = (c>=32 && c<63232 ? c : 0); // avoid generating keyChar for non-printables
- }
- return del._synthesizeEvent(evt, {charCode: c, shiftKey: s, keyCode: k});
- }
- return evt;
- }
- });
-
- dojo.mixin(dojo.keys, {
- SHIFT_TAB: 25,
- UP_ARROW: 63232,
- DOWN_ARROW: 63233,
- LEFT_ARROW: 63234,
- RIGHT_ARROW: 63235,
- F1: 63236,
- F2: 63237,
- F3: 63238,
- F4: 63239,
- F5: 63240,
- F6: 63241,
- F7: 63242,
- F8: 63243,
- F9: 63244,
- F10: 63245,
- F11: 63246,
- F12: 63247,
- PAUSE: 63250,
- DELETE: 63272,
- HOME: 63273,
- END: 63275,
- PAGE_UP: 63276,
- PAGE_DOWN: 63277,
- INSERT: 63302,
- PRINT_SCREEN: 63248,
- SCROLL_LOCK: 63249,
- NUM_LOCK: 63289
- });
- var dk = dojo.keys, identifierMap = { "Up": dk.UP_ARROW, "Down": dk.DOWN_ARROW, "Left": dk.LEFT_ARROW, "Right": dk.RIGHT_ARROW, "PageUp": dk.PAGE_UP, "PageDown": dk.PAGE_DOWN };
- }
+var _1=(dojo._event_listener={add:function(_2,_3,fp){
+if(!_2){
+return;
+}
+_3=_1._normalizeEventName(_3);
+fp=_1._fixCallback(_3,fp);
+var _4=_3;
+if(!dojo.isIE&&(_3=="mouseenter"||_3=="mouseleave")){
+var _5=fp;
+_3=(_3=="mouseenter")?"mouseover":"mouseout";
+fp=function(e){
+if(!dojo.isDescendant(e.relatedTarget,_2)){
+return _5.call(this,e);
+}
+};
+}
+_2.addEventListener(_3,fp,false);
+return fp;
+},remove:function(_6,_7,_8){
+if(_6){
+_7=_1._normalizeEventName(_7);
+if(!dojo.isIE&&(_7=="mouseenter"||_7=="mouseleave")){
+_7=(_7=="mouseenter")?"mouseover":"mouseout";
+}
+_6.removeEventListener(_7,_8,false);
+}
+},_normalizeEventName:function(_9){
+return _9.slice(0,2)=="on"?_9.slice(2):_9;
+},_fixCallback:function(_a,fp){
+return _a!="keypress"?fp:function(e){
+return fp.call(this,_1._fixEvent(e,this));
+};
+},_fixEvent:function(_b,_c){
+switch(_b.type){
+case "keypress":
+_1._setKeyChar(_b);
+break;
+}
+return _b;
+},_setKeyChar:function(_d){
+_d.keyChar=_d.charCode?String.fromCharCode(_d.charCode):"";
+_d.charOrCode=_d.keyChar||_d.keyCode;
+},_punctMap:{106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39}});
+dojo.fixEvent=function(_e,_f){
+return _1._fixEvent(_e,_f);
+};
+dojo.stopEvent=function(evt){
+evt.preventDefault();
+evt.stopPropagation();
+};
+var _10=dojo._listener;
+dojo._connect=function(obj,_11,_12,_13,_14){
+var _15=obj&&(obj.nodeType||obj.attachEvent||obj.addEventListener);
+var lid=_15?(_14?2:1):0,l=[dojo._listener,_1,_10][lid];
+var h=l.add(obj,_11,dojo.hitch(_12,_13));
+return [obj,_11,h,lid];
+};
+dojo._disconnect=function(obj,_16,_17,_18){
+([dojo._listener,_1,_10][_18]).remove(obj,_16,_17);
+};
+dojo.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:dojo.isSafari?91:224,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145,copyKey:dojo.isMac&&!dojo.isAIR?(dojo.isSafari?91:224):17};
+var _19=dojo.isMac?"metaKey":"ctrlKey";
+dojo.isCopyKey=function(e){
+return e[_19];
+};
+if(dojo.isIE){
+dojo.mouseButtons={LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(e,_1a){
+return e.button&_1a;
+},isLeft:function(e){
+return e.button&1;
+},isMiddle:function(e){
+return e.button&4;
+},isRight:function(e){
+return e.button&2;
+}};
+}else{
+dojo.mouseButtons={LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(e,_1b){
+return e.button==_1b;
+},isLeft:function(e){
+return e.button==0;
+},isMiddle:function(e){
+return e.button==1;
+},isRight:function(e){
+return e.button==2;
+}};
+}
+if(dojo.isIE){
+var _1c=function(e,_1d){
+try{
+return (e.keyCode=_1d);
+}
+catch(e){
+return 0;
+}
+};
+var iel=dojo._listener;
+var _1e=(dojo._ieListenersName="_"+dojo._scopeName+"_listeners");
+if(!dojo.config._allow_leaks){
+_10=iel=dojo._ie_listener={handlers:[],add:function(_1f,_20,_21){
+_1f=_1f||dojo.global;
+var f=_1f[_20];
+if(!f||!f[_1e]){
+var d=dojo._getIeDispatcher();
+d.target=f&&(ieh.push(f)-1);
+d[_1e]=[];
+f=_1f[_20]=d;
+}
+return f[_1e].push(ieh.push(_21)-1);
+},remove:function(_22,_23,_24){
+var f=(_22||dojo.global)[_23],l=f&&f[_1e];
+if(f&&l&&_24--){
+delete ieh[l[_24]];
+delete l[_24];
+}
+}};
+var ieh=iel.handlers;
+}
+dojo.mixin(_1,{add:function(_25,_26,fp){
+if(!_25){
+return;
+}
+_26=_1._normalizeEventName(_26);
+if(_26=="onkeypress"){
+var kd=_25.onkeydown;
+if(!kd||!kd[_1e]||!kd._stealthKeydownHandle){
+var h=_1.add(_25,"onkeydown",_1._stealthKeyDown);
+kd=_25.onkeydown;
+kd._stealthKeydownHandle=h;
+kd._stealthKeydownRefs=1;
+}else{
+kd._stealthKeydownRefs++;
+}
+}
+return iel.add(_25,_26,_1._fixCallback(fp));
+},remove:function(_27,_28,_29){
+_28=_1._normalizeEventName(_28);
+iel.remove(_27,_28,_29);
+if(_28=="onkeypress"){
+var kd=_27.onkeydown;
+if(--kd._stealthKeydownRefs<=0){
+iel.remove(_27,"onkeydown",kd._stealthKeydownHandle);
+delete kd._stealthKeydownHandle;
+}
+}
+},_normalizeEventName:function(_2a){
+return _2a.slice(0,2)!="on"?"on"+_2a:_2a;
+},_nop:function(){
+},_fixEvent:function(evt,_2b){
+if(!evt){
+var w=_2b&&(_2b.ownerDocument||_2b.document||_2b).parentWindow||window;
+evt=w.event;
+}
+if(!evt){
+return (evt);
+}
+evt.target=evt.srcElement;
+evt.currentTarget=(_2b||evt.srcElement);
+evt.layerX=evt.offsetX;
+evt.layerY=evt.offsetY;
+var se=evt.srcElement,doc=(se&&se.ownerDocument)||document;
+var _2c=((dojo.isIE<6)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;
+var _2d=dojo._getIeDocumentElementOffset();
+evt.pageX=evt.clientX+dojo._fixIeBiDiScrollLeft(_2c.scrollLeft||0)-_2d.x;
+evt.pageY=evt.clientY+(_2c.scrollTop||0)-_2d.y;
+if(evt.type=="mouseover"){
+evt.relatedTarget=evt.fromElement;
+}
+if(evt.type=="mouseout"){
+evt.relatedTarget=evt.toElement;
+}
+evt.stopPropagation=_1._stopPropagation;
+evt.preventDefault=_1._preventDefault;
+return _1._fixKeys(evt);
+},_fixKeys:function(evt){
+switch(evt.type){
+case "keypress":
+var c=("charCode" in evt?evt.charCode:evt.keyCode);
+if(c==10){
+c=0;
+evt.keyCode=13;
+}else{
+if(c==13||c==27){
+c=0;
+}else{
+if(c==3){
+c=99;
+}
+}
+}
+evt.charCode=c;
+_1._setKeyChar(evt);
+break;
+}
+return evt;
+},_stealthKeyDown:function(evt){
+var kp=evt.currentTarget.onkeypress;
+if(!kp||!kp[_1e]){
+return;
+}
+var k=evt.keyCode;
+var _2e=k!=13&&k!=32&&k!=27&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);
+if(_2e||evt.ctrlKey){
+var c=_2e?0:k;
+if(evt.ctrlKey){
+if(k==3||k==13){
+return;
+}else{
+if(c>95&&c<106){
+c-=48;
+}else{
+if((!evt.shiftKey)&&(c>=65&&c<=90)){
+c+=32;
+}else{
+c=_1._punctMap[c]||c;
+}
+}
+}
+}
+var _2f=_1._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});
+kp.call(evt.currentTarget,_2f);
+evt.cancelBubble=_2f.cancelBubble;
+evt.returnValue=_2f.returnValue;
+_1c(evt,_2f.keyCode);
+}
+},_stopPropagation:function(){
+this.cancelBubble=true;
+},_preventDefault:function(){
+this.bubbledKeyCode=this.keyCode;
+if(this.ctrlKey){
+_1c(this,0);
+}
+this.returnValue=false;
+}});
+dojo.stopEvent=function(evt){
+evt=evt||window.event;
+_1._stopPropagation.call(evt);
+_1._preventDefault.call(evt);
+};
+}
+_1._synthesizeEvent=function(evt,_30){
+var _31=dojo.mixin({},evt,_30);
+_1._setKeyChar(_31);
+_31.preventDefault=function(){
+evt.preventDefault();
+};
+_31.stopPropagation=function(){
+evt.stopPropagation();
+};
+return _31;
+};
+if(dojo.isOpera){
+dojo.mixin(_1,{_fixEvent:function(evt,_32){
+switch(evt.type){
+case "keypress":
+var c=evt.which;
+if(c==3){
+c=99;
+}
+c=c<41&&!evt.shiftKey?0:c;
+if(evt.ctrlKey&&!evt.shiftKey&&c>=65&&c<=90){
+c+=32;
+}
+return _1._synthesizeEvent(evt,{charCode:c});
+}
+return evt;
+}});
+}
+if(dojo.isWebKit){
+_1._add=_1.add;
+_1._remove=_1.remove;
+dojo.mixin(_1,{add:function(_33,_34,fp){
+if(!_33){
+return;
+}
+var _35=_1._add(_33,_34,fp);
+if(_1._normalizeEventName(_34)=="keypress"){
+_35._stealthKeyDownHandle=_1._add(_33,"keydown",function(evt){
+var k=evt.keyCode;
+var _36=k!=13&&k!=32&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);
+if(_36||evt.ctrlKey){
+var c=_36?0:k;
+if(evt.ctrlKey){
+if(k==3||k==13){
+return;
+}else{
+if(c>95&&c<106){
+c-=48;
+}else{
+if(!evt.shiftKey&&c>=65&&c<=90){
+c+=32;
+}else{
+c=_1._punctMap[c]||c;
+}
+}
+}
+}
+var _37=_1._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});
+fp.call(evt.currentTarget,_37);
+}
+});
+}
+return _35;
+},remove:function(_38,_39,_3a){
+if(_38){
+if(_3a._stealthKeyDownHandle){
+_1._remove(_38,"keydown",_3a._stealthKeyDownHandle);
+}
+_1._remove(_38,_39,_3a);
+}
+},_fixEvent:function(evt,_3b){
+switch(evt.type){
+case "keypress":
+if(evt.faux){
+return evt;
+}
+var c=evt.charCode;
+c=c>=32?c:0;
+return _1._synthesizeEvent(evt,{charCode:c,faux:true});
+}
+return evt;
+}});
+}
})();
-
if(dojo.isIE){
- // keep this out of the closure
- // closing over 'iel' or 'ieh' b0rks leak prevention
- // ls[i] is an index into the master handler array
- dojo._getIeDispatcher = function(){
- return function(){
- var ap=Array.prototype, h=dojo._ie_listener.handlers, c=arguments.callee, ls=c._listeners, t=h[c.target];
- // return value comes from original target function
- var r = t && t.apply(this, arguments);
- // invoke listeners after target function
- for(var i in ls){
- if(!(i in ap)){
- h[ls[i]].apply(this, arguments);
- }
- }
- return r;
- }
- }
- // keep this out of the closure to reduce RAM allocation
- dojo._event_listener._fixCallback = function(fp){
- var f = dojo._event_listener._fixEvent;
- return function(e){ return fp.call(this, f(e, this)); };
- }
+dojo._ieDispatcher=function(_3c,_3d){
+var ap=Array.prototype,h=dojo._ie_listener.handlers,c=_3c.callee,ls=c[dojo._ieListenersName],t=h[c.target];
+var r=t&&t.apply(_3d,_3c);
+var lls=[].concat(ls);
+for(var i in lls){
+var f=h[lls[i]];
+if(!(i in ap)&&f){
+f.apply(_3d,_3c);
+}
}
-
+return r;
+};
+dojo._getIeDispatcher=function(){
+return new Function(dojo._scopeName+"._ieDispatcher(arguments, this)");
+};
+dojo._event_listener._fixCallback=function(fp){
+var f=dojo._event_listener._fixEvent;
+return function(e){
+return fp.call(this,f(e,this));
+};
+};
}
+}
diff --git a/js/dojo/dojo/_base/fx.js b/js/dojo/dojo/_base/fx.js
--- a/js/dojo/dojo/_base/fx.js
+++ b/js/dojo/dojo/_base/fx.js
@@ -1,464 +1,303 @@
-if(!dojo._hasResource["dojo._base.fx"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.fx"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo._base.fx"]){
+dojo._hasResource["dojo._base.fx"]=true;
dojo.provide("dojo._base.fx");
dojo.require("dojo._base.Color");
dojo.require("dojo._base.connect");
-dojo.require("dojo._base.declare");
dojo.require("dojo._base.lang");
dojo.require("dojo._base.html");
-
-/*
- Animation losely package based on Dan Pupius' work, contributed under CLA:
- http://pupius.co.uk/js/Toolkit.Drawing.js
-*/
-
-dojo._Line = function(/*int*/ start, /*int*/ end){
- // summary:
- // dojo._Line is the object used to generate values from a start value
- // to an end value
- // start: int
- // Beginning value for range
- // end: int
- // Ending value for range
- this.start = start;
- this.end = end;
- this.getValue = function(/*float*/ n){
- // summary: returns the point on the line
- // n: a floating point number greater than 0 and less than 1
- return ((this.end - this.start) * n) + this.start; // Decimal
- }
+(function(){
+var d=dojo;
+var _1=d._mixin;
+dojo._Line=function(_2,_3){
+this.start=_2;
+this.end=_3;
+};
+dojo._Line.prototype.getValue=function(n){
+return ((this.end-this.start)*n)+this.start;
+};
+dojo.Animation=function(_4){
+_1(this,_4);
+if(d.isArray(this.curve)){
+this.curve=new d._Line(this.curve[0],this.curve[1]);
+}
+};
+d._Animation=d.Animation;
+d.extend(dojo.Animation,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,_getStep:function(){
+var _5=this._percent,_6=this.easing;
+return _6?_6(_5):_5;
+},_fire:function(_7,_8){
+var a=_8||[];
+if(this[_7]){
+if(d.config.debugAtAllCosts){
+this[_7].apply(this,a);
+}else{
+try{
+this[_7].apply(this,a);
+}
+catch(e){
+console.error("exception in animation handler for:",_7);
+console.error(e);
+}
+}
+}
+return this;
+},play:function(_9,_a){
+var _b=this;
+if(_b._delayTimer){
+_b._clearTimer();
+}
+if(_a){
+_b._stopTimer();
+_b._active=_b._paused=false;
+_b._percent=0;
+}else{
+if(_b._active&&!_b._paused){
+return _b;
+}
+}
+_b._fire("beforeBegin",[_b.node]);
+var de=_9||_b.delay,_c=dojo.hitch(_b,"_play",_a);
+if(de>0){
+_b._delayTimer=setTimeout(_c,de);
+return _b;
+}
+_c();
+return _b;
+},_play:function(_d){
+var _e=this;
+if(_e._delayTimer){
+_e._clearTimer();
+}
+_e._startTime=new Date().valueOf();
+if(_e._paused){
+_e._startTime-=_e.duration*_e._percent;
+}
+_e._endTime=_e._startTime+_e.duration;
+_e._active=true;
+_e._paused=false;
+var _f=_e.curve.getValue(_e._getStep());
+if(!_e._percent){
+if(!_e._startRepeatCount){
+_e._startRepeatCount=_e.repeat;
+}
+_e._fire("onBegin",[_f]);
+}
+_e._fire("onPlay",[_f]);
+_e._cycle();
+return _e;
+},pause:function(){
+var _10=this;
+if(_10._delayTimer){
+_10._clearTimer();
+}
+_10._stopTimer();
+if(!_10._active){
+return _10;
+}
+_10._paused=true;
+_10._fire("onPause",[_10.curve.getValue(_10._getStep())]);
+return _10;
+},gotoPercent:function(_11,_12){
+var _13=this;
+_13._stopTimer();
+_13._active=_13._paused=true;
+_13._percent=_11;
+if(_12){
+_13.play();
+}
+return _13;
+},stop:function(_14){
+var _15=this;
+if(_15._delayTimer){
+_15._clearTimer();
+}
+if(!_15._timer){
+return _15;
+}
+_15._stopTimer();
+if(_14){
+_15._percent=1;
+}
+_15._fire("onStop",[_15.curve.getValue(_15._getStep())]);
+_15._active=_15._paused=false;
+return _15;
+},status:function(){
+if(this._active){
+return this._paused?"paused":"playing";
+}
+return "stopped";
+},_cycle:function(){
+var _16=this;
+if(_16._active){
+var _17=new Date().valueOf();
+var _18=(_17-_16._startTime)/(_16._endTime-_16._startTime);
+if(_18>=1){
+_18=1;
+}
+_16._percent=_18;
+if(_16.easing){
+_18=_16.easing(_18);
}
-
-dojo.declare("dojo._Animation", null, {
- // summary
- // A generic animation object that fires callbacks into it's handlers
- // object at various states
- //
- constructor: function(/*Object*/ args){
- dojo.mixin(this, args);
- if(dojo.isArray(this.curve)){
- /* curve: Array
- pId: a */
- this.curve = new dojo._Line(this.curve[0], this.curve[1]);
- }
- },
-
- // duration: Integer
- // The time in milliseonds the animation will take to run
- duration: 1000,
-
-/*=====
- // curve: dojo._Line||Array
- // A two element array of start and end values, or a dojo._Line instance to be
- // used in the Animation.
- curve: null,
-
- // easing: Function
- // A Function to adjust the acceleration (or deceleration) of the progress
- // across a dojo._Line
- easing: null,
-=====*/
-
- // repeat: Integer
- // The number of times to loop the animation
- repeat: 0,
-
- // rate: Integer
- // the time in milliseconds to wait before advancing to next frame
- // (used as a fps timer: rate/1000 = fps)
- rate: 10 /* 100 fps */,
-
-/*=====
- // delay: Integer
- // The time in milliseconds to wait before starting animation after it has been .play()'ed
- delay: null,
-
- // events
- //
- // beforeBegin: Event
- // Synthetic event fired before a dojo._Animation begins playing (synhcronous)
- beforeBegin: null,
-
- // onBegin: Event
- // Synthetic event fired as a dojo._Animation begins playing (useful?)
- onBegin: null,
-
- // onAnimate: Event
- // Synthetic event fired at each interval of a dojo._Animation
- onAnimate: null,
-
- // onEnd: Event
- // Synthetic event fired after the final frame of a dojo._Animation
- onEnd: null,
-
- // ???
- onPlay: null,
-
- // onPause: Event
- // Synthetic event fired when a dojo._Animation is paused
- onPause: null,
-
- // onStop: Event
- // Synthetic event fires when a dojo._Animation is stopped
- onStop: null,
-
-=====*/
-
- _percent: 0,
- _startRepeatCount: 0,
-
- fire: function(/*Event*/ evt, /*Array?*/ args){
- // summary:
- // Convenience function. Fire event "evt" and pass it the
- // arguments specified in "args".
- // evt:
- // The event to fire.
- // args:
- // The arguments to pass to the event.
- if(this[evt]){
- this[evt].apply(this, args||[]);
- }
- return this; // dojo._Animation
- },
-
- play: function(/*int?*/ delay, /*Boolean?*/ gotoStart){
- // summary:
- // Start the animation.
- // delay:
- // How many milliseconds to delay before starting.
- // gotoStart:
- // If true, starts the animation from the beginning; otherwise,
- // starts it from its current position.
- var _t = this;
- if(gotoStart){
- _t._stopTimer();
- _t._active = _t._paused = false;
- _t._percent = 0;
- }else if(_t._active && !_t._paused){
- return _t; // dojo._Animation
- }
-
- _t.fire("beforeBegin");
-
- var d = delay||_t.delay;
- var _p = dojo.hitch(_t, "_play", gotoStart);
- if(d > 0){
- setTimeout(_p, d);
- return _t; // dojo._Animation
- }
- _p();
- return _t;
- },
-
- _play: function(gotoStart){
- var _t = this;
- _t._startTime = new Date().valueOf();
- if(_t._paused){
- _t._startTime -= _t.duration * _t._percent;
- }
- _t._endTime = _t._startTime + _t.duration;
-
- _t._active = true;
- _t._paused = false;
-
- var value = _t.curve.getValue(_t._percent);
- if(!_t._percent){
- if(!_t._startRepeatCount){
- _t._startRepeatCount = _t.repeat;
- }
- _t.fire("onBegin", [value]);
- }
-
- _t.fire("onPlay", [value]);
-
- _t._cycle();
- return _t; // dojo._Animation
- },
-
- pause: function(){
- // summary: Pauses a running animation.
- this._stopTimer();
- if(!this._active){ return this; /*dojo._Animation*/}
- this._paused = true;
- this.fire("onPause", [this.curve.getValue(this._percent)]);
- return this; // dojo._Animation
- },
-
- gotoPercent: function(/*Decimal*/ percent, /*Boolean?*/ andPlay){
- // summary:
- // Sets the progress of the animation.
- // percent:
- // A percentage in decimal notation (between and including 0.0 and 1.0).
- // andPlay:
- // If true, play the animation after setting the progress.
- this._stopTimer();
- this._active = this._paused = true;
- this._percent = percent;
- if(andPlay){ this.play(); }
- return this; // dojo._Animation
- },
-
- stop: function(/*boolean?*/ gotoEnd){
- // summary: Stops a running animation.
- // gotoEnd: If true, the animation will end.
- if(!this._timer){ return; }
- this._stopTimer();
- if(gotoEnd){
- this._percent = 1;
- }
- this.fire("onStop", [this.curve.getValue(this._percent)]);
- this._active = this._paused = false;
- return this; // dojo._Animation
- },
-
- status: function(){
- // summary: Returns a string token representation of the status of
- // the animation, one of: "paused", "playing", "stopped"
- if(this._active){
- return this._paused ? "paused" : "playing"; // String
- }
- return "stopped"; // String
- },
-
- _cycle: function(){
- var _t = this;
- if(_t._active){
- var curr = new Date().valueOf();
- var step = (curr - _t._startTime) / (_t._endTime - _t._startTime);
-
- if(step >= 1){
- step = 1;
- }
- _t._percent = step;
-
- // Perform easing
- if(_t.easing){
- step = _t.easing(step);
- }
-
- _t.fire("onAnimate", [_t.curve.getValue(step)]);
-
- if(step < 1){
- _t._startTimer();
- }else{
- _t._active = false;
-
- if(_t.repeat > 0){
- _t.repeat--;
- _t.play(null, true);
- }else if(_t.repeat == -1){
- _t.play(null, true);
- }else{
- if(_t._startRepeatCount){
- _t.repeat = _t._startRepeatCount;
- _t._startRepeatCount = 0;
- }
- }
- _t._percent = 0;
- _t.fire("onEnd");
- }
- }
- return _t; // dojo._Animation
- }
+_16._fire("onAnimate",[_16.curve.getValue(_18)]);
+if(_16._percent<1){
+_16._startTimer();
+}else{
+_16._active=false;
+if(_16.repeat>0){
+_16.repeat--;
+_16.play(null,true);
+}else{
+if(_16.repeat==-1){
+_16.play(null,true);
+}else{
+if(_16._startRepeatCount){
+_16.repeat=_16._startRepeatCount;
+_16._startRepeatCount=0;
+}
+}
+}
+_16._percent=0;
+_16._fire("onEnd",[_16.node]);
+!_16.repeat&&_16._stopTimer();
+}
+}
+return _16;
+},_clearTimer:function(){
+clearTimeout(this._delayTimer);
+delete this._delayTimer;
+}});
+var ctr=0,_19=[],_1a=null,_1b={run:function(){
+}};
+d.extend(d.Animation,{_startTimer:function(){
+if(!this._timer){
+this._timer=d.connect(_1b,"run",this,"_cycle");
+ctr++;
+}
+if(!_1a){
+_1a=setInterval(d.hitch(_1b,"run"),this.rate);
+}
+},_stopTimer:function(){
+if(this._timer){
+d.disconnect(this._timer);
+this._timer=null;
+ctr--;
+}
+if(ctr<=0){
+clearInterval(_1a);
+_1a=null;
+ctr=0;
+}
+}});
+var _1c=d.isIE?function(_1d){
+var ns=_1d.style;
+if(!ns.width.length&&d.style(_1d,"width")=="auto"){
+ns.width="auto";
+}
+}:function(){
+};
+dojo._fade=function(_1e){
+_1e.node=d.byId(_1e.node);
+var _1f=_1({properties:{}},_1e),_20=(_1f.properties.opacity={});
+_20.start=!("start" in _1f)?function(){
+return +d.style(_1f.node,"opacity")||0;
+}:_1f.start;
+_20.end=_1f.end;
+var _21=d.animateProperty(_1f);
+d.connect(_21,"beforeBegin",d.partial(_1c,_1f.node));
+return _21;
+};
+dojo.fadeIn=function(_22){
+return d._fade(_1({end:1},_22));
+};
+dojo.fadeOut=function(_23){
+return d._fade(_1({end:0},_23));
+};
+dojo._defaultEasing=function(n){
+return 0.5+((Math.sin((n+1.5)*Math.PI))/2);
+};
+var _24=function(_25){
+this._properties=_25;
+for(var p in _25){
+var _26=_25[p];
+if(_26.start instanceof d.Color){
+_26.tempColor=new d.Color();
+}
+}
+};
+_24.prototype.getValue=function(r){
+var ret={};
+for(var p in this._properties){
+var _27=this._properties[p],_28=_27.start;
+if(_28 instanceof d.Color){
+ret[p]=d.blendColors(_28,_27.end,r,_27.tempColor).toCss();
+}else{
+if(!d.isArray(_28)){
+ret[p]=((_27.end-_28)*r)+_28+(p!="opacity"?_27.units||"px":0);
+}
+}
+}
+return ret;
+};
+dojo.animateProperty=function(_29){
+var n=_29.node=d.byId(_29.node);
+if(!_29.easing){
+_29.easing=d._defaultEasing;
+}
+var _2a=new d.Animation(_29);
+d.connect(_2a,"beforeBegin",_2a,function(){
+var pm={};
+for(var p in this.properties){
+if(p=="width"||p=="height"){
+this.node.display="block";
+}
+var _2b=this.properties[p];
+if(d.isFunction(_2b)){
+_2b=_2b(n);
+}
+_2b=pm[p]=_1({},(d.isObject(_2b)?_2b:{end:_2b}));
+if(d.isFunction(_2b.start)){
+_2b.start=_2b.start(n);
+}
+if(d.isFunction(_2b.end)){
+_2b.end=_2b.end(n);
+}
+var _2c=(p.toLowerCase().indexOf("color")>=0);
+function _2d(_2e,p){
+var v={height:_2e.offsetHeight,width:_2e.offsetWidth}[p];
+if(v!==undefined){
+return v;
+}
+v=d.style(_2e,p);
+return (p=="opacity")?+v:(_2c?v:parseFloat(v));
+};
+if(!("end" in _2b)){
+_2b.end=_2d(n,p);
+}else{
+if(!("start" in _2b)){
+_2b.start=_2d(n,p);
+}
+}
+if(_2c){
+_2b.start=new d.Color(_2b.start);
+_2b.end=new d.Color(_2b.end);
+}else{
+_2b.start=(p=="opacity")?+_2b.start:parseFloat(_2b.start);
+}
+}
+this.curve=new _24(pm);
});
-
-(function(){
- var d = dojo;
- var ctr = 0;
- var _globalTimerList = [];
- var runner = {
- run: function(){}
- };
- var timer = null;
- dojo._Animation.prototype._startTimer = function(){
- // this._timer = setTimeout(dojo.hitch(this, "_cycle"), this.rate);
- if(!this._timer){
- this._timer = dojo.connect(runner, "run", this, "_cycle");
- ctr++;
- }
- if(!timer){
- timer = setInterval(dojo.hitch(runner, "run"), this.rate);
- }
- };
-
- dojo._Animation.prototype._stopTimer = function(){
- dojo.disconnect(this._timer);
- this._timer = null;
- ctr--;
- if(!ctr){
- clearInterval(timer);
- timer = null;
- }
- };
-
- var _makeFadeable = (d.isIE) ? function(node){
- // only set the zoom if the "tickle" value would be the same as the
- // default
- var ns = node.style;
- if(!ns.zoom.length && d.style(node, "zoom") == "normal"){
- // make sure the node "hasLayout"
- // NOTE: this has been tested with larger and smaller user-set text
- // sizes and works fine
- ns.zoom = "1";
- // node.style.zoom = "normal";
- }
- // don't set the width to auto if it didn't already cascade that way.
- // We don't want to f anyones designs
- if(!ns.width.length && d.style(node, "width") == "auto"){
- ns.width = "auto";
- }
- } : function(){};
-
- dojo._fade = function(/*Object*/ args){
- // summary:
- // Returns an animation that will fade the node defined by
- // args.node from the start to end values passed (args.start
- // args.end) (end is mandatory, start is optional)
-
- args.node = d.byId(args.node);
- var fArgs = d.mixin({ properties: {} }, args);
- var props = (fArgs.properties.opacity = {});
- props.start = !("start" in fArgs) ?
- function(){ return Number(d.style(fArgs.node, "opacity")); } : fArgs.start;
- props.end = fArgs.end;
-
- var anim = d.animateProperty(fArgs);
- d.connect(anim, "beforeBegin", d.partial(_makeFadeable, fArgs.node));
-
- return anim; // dojo._Animation
- }
-
- /*=====
- dojo.__fadeArgs = function(kwArgs){
- // duration: Integer?
- // Duration of the animation in milliseconds.
- // easing: Function?
- // An easing function.
- }
- =====*/
-
- dojo.fadeIn = function(/*dojo.__fadeArgs*/ args){
- // summary:
- // Returns an animation that will fade node defined in 'args' from
- // its current opacity to fully opaque.
- return d._fade(d.mixin({ end: 1 }, args)); // dojo._Animation
- }
-
- dojo.fadeOut = function(/*dojo.__fadeArgs*/ args){
- // summary:
- // Returns an animation that will fade node defined in 'args'
- // from its current opacity to fully transparent.
- return d._fade(d.mixin({ end: 0 }, args)); // dojo._Animation
- }
-
- dojo._defaultEasing = function(/*Decimal?*/ n){
- // summary: The default easing function for dojo._Animation(s)
- return 0.5 + ((Math.sin((n + 1.5) * Math.PI))/2);
- }
-
- var PropLine = function(properties){
- this._properties = properties;
- for(var p in properties){
- var prop = properties[p];
- if(prop.start instanceof d.Color){
- // create a reusable temp color object to keep intermediate results
- prop.tempColor = new d.Color();
- }
- }
- this.getValue = function(r){
- var ret = {};
- for(var p in this._properties){
- var prop = this._properties[p];
- var start = prop.start;
- if(start instanceof d.Color){
- ret[p] = d.blendColors(start, prop.end, r, prop.tempColor).toCss();
- }else if(!d.isArray(start)){
- ret[p] = ((prop.end - start) * r) + start + (p != "opacity" ? prop.units||"px" : "");
- }
- }
- return ret;
- }
- }
-
- dojo.animateProperty = function(/*Object*/ args){
- // summary:
- // Returns an animation that will transition the properties of
- // node defined in 'args' depending how they are defined in
- // 'args.properties'
- //
- // description:
- // The foundation of most dojo.fx animations, dojo.AnimateProperty
- // will take an object of "properties" corresponding to style
- // properties, and animate them in parallel over a set duration.
- //
- // args.node can be a String or a DomNode reference
- //
- // example:
- // | dojo.animateProperty({ node: node, duration:2000,
- // | properties: {
- // | width: { start: '200', end: '400', unit:"px" },
- // | height: { start:'200', end: '400', unit:"px" },
- // | paddingTop: { start:'5', end:'50', unit:"px" }
- // | }
- // | }).play();
- //
-
- args.node = d.byId(args.node);
- if(!args.easing){ args.easing = d._defaultEasing; }
-
- var anim = new d._Animation(args);
- d.connect(anim, "beforeBegin", anim, function(){
- var pm = {};
- for(var p in this.properties){
- // Make shallow copy of properties into pm because we overwrite some values below.
- // In particular if start/end are functions we don't want to overwrite them or
- // the functions won't be called if the animation is reused.
- var prop = (pm[p] = d.mixin({}, this.properties[p]));
-
- if(d.isFunction(prop.start)){
- prop.start = prop.start();
- }
- if(d.isFunction(prop.end)){
- prop.end = prop.end();
- }
-
- var isColor = (p.toLowerCase().indexOf("color") >= 0);
- function getStyle(node, p){
- // dojo.style(node, "height") can return "auto" or "" on IE; this is more reliable:
- var v = ({height: node.offsetHeight, width: node.offsetWidth})[p];
- if(v !== undefined){ return v; }
- v = d.style(node, p);
- return (p=="opacity") ? Number(v) : parseFloat(v);
- }
- if(!("end" in prop)){
- prop.end = getStyle(this.node, p);
- }else if(!("start" in prop)){
- prop.start = getStyle(this.node, p);
- }
-
- if(isColor){
- // console.debug("it's a color!");
- prop.start = new d.Color(prop.start);
- prop.end = new d.Color(prop.end);
- }else{
- prop.start = (p == "opacity") ? Number(prop.start) : parseFloat(prop.start);
- }
- // console.debug("start:", prop.start);
- // console.debug("end:", prop.end);
- }
- this.curve = new PropLine(pm);
- });
- d.connect(anim, "onAnimate", anim, function(propValues){
- // try{
- for(var s in propValues){
- // console.debug(s, propValues[s], this.node.style[s]);
- d.style(this.node, s, propValues[s]);
- // this.node.style[s] = propValues[s];
- }
- // }catch(e){ console.debug(dojo.toJson(e)); }
- });
- return anim; // dojo._Animation
- }
+d.connect(_2a,"onAnimate",d.hitch(d,"style",_2a.node));
+return _2a;
+};
+dojo.anim=function(_2f,_30,_31,_32,_33,_34){
+return d.animateProperty({node:_2f,duration:_31||d.Animation.prototype.duration,properties:_30,easing:_32,onEnd:_33}).play(_34||0);
+};
})();
-
}
diff --git a/js/dojo/dojo/_base/html.js b/js/dojo/dojo/_base/html.js
--- a/js/dojo/dojo/_base/html.js
+++ b/js/dojo/dojo/_base/html.js
@@ -1,994 +1,742 @@
-if(!dojo._hasResource["dojo._base.html"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.html"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo._base.html"]){
+dojo._hasResource["dojo._base.html"]=true;
dojo.require("dojo._base.lang");
dojo.provide("dojo._base.html");
-
-// FIXME: need to add unit tests for all the semi-public methods
-
try{
- document.execCommand("BackgroundImageCache", false, true);
-}catch(e){
- // sane browsers don't have cache "issues"
+document.execCommand("BackgroundImageCache",false,true);
+}
+catch(e){
+}
+if(dojo.isIE||dojo.isOpera){
+dojo.byId=function(id,_1){
+if(typeof id!="string"){
+return id;
}
-
-// =============================
-// DOM Functions
-// =============================
-
-/*=====
-dojo.byId = function(id, doc){
- // summary:
- // similar to other library's "$" function, takes a
- // string representing a DOM id or a DomNode
- // and returns the corresponding DomNode. If a Node is
- // passed, this function is a no-op. Returns a
- // single DOM node or null, working around several
- // browser-specific bugs to do so.
- // id: String|DOMNode
- // DOM id or DOM Node
- // doc: DocumentElement
- // Document to work in. Defaults to the current value of
- // dojo.doc. Can be used to retreive
- // node references from other documents.
-=====*/
-if(dojo.isIE || dojo.isOpera){
- dojo.byId = function(id, doc){
- if(dojo.isString(id)){
- var _d = doc || dojo.doc;
- var te = _d.getElementById(id);
- // attributes.id.value is better than just id in case the
- // user has a name=id inside a form
- if(te && te.attributes.id.value == id){
- return te;
- }else{
- var eles = _d.all[id];
- if(!eles){ return; }
- if(!eles.length){ return eles; }
- // if more than 1, choose first with the correct id
- var i=0;
- while((te=eles[i++])){
- if(te.attributes.id.value == id){ return te; }
- }
- }
- }else{
- return id; // DomNode
- }
- }
+var _2=_1||dojo.doc,te=_2.getElementById(id);
+if(te&&(te.attributes.id.value==id||te.id==id)){
+return te;
}else{
- dojo.byId = function(id, doc){
- if(dojo.isString(id)){
- return (doc || dojo.doc).getElementById(id);
- }else{
- return id; // DomNode
- }
- }
+var _3=_2.all[id];
+if(!_3||_3.nodeName){
+_3=[_3];
+}
+var i=0;
+while((te=_3[i++])){
+if((te.attributes&&te.attributes.id&&te.attributes.id.value==id)||te.id==id){
+return te;
}
-/*=====
+}
}
-=====*/
-
+};
+}else{
+dojo.byId=function(id,_4){
+return (typeof id=="string")?(_4||dojo.doc).getElementById(id):id;
+};
+}
(function(){
- /*
- dojo.createElement = function(obj, parent, position){
- // TODO: need to finish this!
- }
- */
-
- var _destroyContainer = null;
- dojo._destroyElement = function(/*String||DomNode*/node){
- // summary:
- // removes node from its parent, clobbers it and all of its
- // children.
- // node:
- // the element to be destroyed, either as an ID or a reference
-
- node = dojo.byId(node);
- try{
- if(!_destroyContainer){
- _destroyContainer = document.createElement("div");
- }
- _destroyContainer.appendChild(node.parentNode ? node.parentNode.removeChild(node) : node);
- // NOTE: see http://trac.dojotoolkit.org/ticket/2931. This may be a bug and not a feature
- _destroyContainer.innerHTML = "";
- }catch(e){
- /* squelch */
- }
- };
-
- dojo.isDescendant = function(/*DomNode|String*/node, /*DomNode|String*/ancestor){
- // summary:
- // Returns true if node is a descendant of ancestor
- // node: id or node reference to test
- // ancestor: id or node reference of potential parent to test against
- try{
- node = dojo.byId(node);
- ancestor = dojo.byId(ancestor);
- while(node){
- if(node === ancestor){
- return true; // Boolean
- }
- node = node.parentNode;
- }
- }catch(e){ return -1; /* squelch */ }
- return false; // Boolean
- };
-
- dojo.setSelectable = function(/*DomNode|String*/node, /*Boolean*/selectable){
- // summary: enable or disable selection on a node
- // node:
- // id or reference to node
- // selectable:
- node = dojo.byId(node);
- if(dojo.isMozilla){
- node.style.MozUserSelect = selectable ? "" : "none";
- }else if(dojo.isKhtml){
- node.style.KhtmlUserSelect = selectable ? "auto" : "none";
- }else if(dojo.isIE){
- node.unselectable = selectable ? "" : "on";
- dojo.query("*", node).forEach(function(descendant){
- descendant.unselectable = selectable ? "" : "on";
- });
- }
- //FIXME: else? Opera?
- };
-
- var _insertBefore = function(/*Node*/node, /*Node*/ref){
- ref.parentNode.insertBefore(node, ref);
- return true; // boolean
- }
-
- var _insertAfter = function(/*Node*/node, /*Node*/ref){
- // summary:
- // Try to insert node after ref
- var pn = ref.parentNode;
- if(ref == pn.lastChild){
- pn.appendChild(node);
- }else{
- return _insertBefore(node, ref.nextSibling); // boolean
- }
- return true; // boolean
- }
-
- dojo.place = function(/*String|DomNode*/node, /*String|DomNode*/refNode, /*String|Number*/position){
- // summary:
- // attempt to insert node in relation to ref based on position
- // node:
- // id or reference to node to place relative to refNode
- // refNode:
- // id or reference of node to use as basis for placement
- // position:
- // string noting the position of node relative to refNode or a
- // number indicating the location in the childNodes collection of
- // refNode. Accepted string values are:
- // * before
- // * after
- // * first
- // * last
- // "first" and "last" indicate positions as children of refNode.
-
- // FIXME: need to write tests for this!!!!
- if(!node || !refNode || position === undefined){
- return false; // boolean
- }
- node = dojo.byId(node);
- refNode = dojo.byId(refNode);
- if(typeof position == "number"){
- var cn = refNode.childNodes;
- if((position == 0 && cn.length == 0) ||
- cn.length == position){
- refNode.appendChild(node); return true;
- }
- if(position == 0){
- return _insertBefore(node, refNode.firstChild);
- }
- return _insertAfter(node, cn[position-1]);
- }
- switch(position.toLowerCase()){
- case "before":
- return _insertBefore(node, refNode); // boolean
- case "after":
- return _insertAfter(node, refNode); // boolean
- case "first":
- if(refNode.firstChild){
- return _insertBefore(node, refNode.firstChild); // boolean
- }else{
- refNode.appendChild(node);
- return true; // boolean
- }
- break;
- default: // aka: last
- refNode.appendChild(node);
- return true; // boolean
- }
- }
-
- // Box functions will assume this model.
- // On IE/Opera, BORDER_BOX will be set if the primary document is in quirks mode.
- // Can be set to change behavior of box setters.
-
- // can be either:
- // "border-box"
- // "content-box" (default)
- dojo.boxModel = "content-box";
-
- // We punt per-node box mode testing completely.
- // If anybody cares, we can provide an additional (optional) unit
- // that overrides existing code to include per-node box sensitivity.
-
- // Opera documentation claims that Opera 9 uses border-box in BackCompat mode.
- // but experiments (Opera 9.10.8679 on Windows Vista) indicate that it actually continues to use content-box.
- // IIRC, earlier versions of Opera did in fact use border-box.
- // Opera guys, this is really confusing. Opera being broken in quirks mode is not our fault.
-
- if(dojo.isIE /*|| dojo.isOpera*/){
- var _dcm = document.compatMode;
- // client code may have to adjust if compatMode varies across iframes
- dojo.boxModel = (_dcm=="BackCompat")||(_dcm=="QuirksMode")||(dojo.isIE<6) ? "border-box" : "content-box";
- }
-
- // =============================
- // Style Functions
- // =============================
-
- // getComputedStyle drives most of the style code.
- // Wherever possible, reuse the returned object.
- //
- // API functions below that need to access computed styles accept an
- // optional computedStyle parameter.
- //
- // If this parameter is omitted, the functions will call getComputedStyle themselves.
- //
- // This way, calling code can access computedStyle once, and then pass the reference to
- // multiple API functions.
- //
- // This is a faux declaration to take pity on the doc tool
-
-/*=====
- dojo.getComputedStyle = function(node){
- // summary:
- // Returns a "computed style" object.
- // description:
- // get "computed style" object which can be used to gather
- // information about the current state of the rendered node.
- //
- // Note that this may behave differently on different browsers.
- // Values may have different formats and value encodings across
- // browsers.
- //
- // Use the dojo.style() method for more consistent (pixelized)
- // return values.
- // node: DOMNode
- // a reference to a DOM node. Does NOT support taking an
- // ID string for speed reasons.
- // example:
- // | dojo.getComputedStyle(dojo.byId('foo')).borderWidth;
- return; // CSS2Properties
- }
-=====*/
-
- var gcs, dv = document.defaultView;
- if(dojo.isSafari){
- gcs = function(/*DomNode*/node){
- var s = dv.getComputedStyle(node, null);
- if(!s && node.style){
- node.style.display = "";
- s = dv.getComputedStyle(node, null);
- }
- return s || {};
- };
- }else if(dojo.isIE){
- gcs = function(node){
- return node.currentStyle;
- };
- }else{
- gcs = function(node){
- return dv.getComputedStyle(node, null);
- };
- }
- dojo.getComputedStyle = gcs;
-
- if(!dojo.isIE){
- dojo._toPixelValue = function(element, value){
- // style values can be floats, client code may want
- // to round for integer pixels.
- return parseFloat(value) || 0;
- }
- }else{
- dojo._toPixelValue = function(element, avalue){
- if(!avalue){ return 0; }
- // on IE7, medium is usually 4 pixels
- if(avalue=="medium"){ return 4; }
- // style values can be floats, client code may
- // want to round this value for integer pixels.
- if(avalue.slice && (avalue.slice(-2)=='px')){ return parseFloat(avalue); }
- with(element){
- var sLeft = style.left;
- var rsLeft = runtimeStyle.left;
- runtimeStyle.left = currentStyle.left;
- try{
- // 'avalue' may be incompatible with style.left, which can cause IE to throw
- // this has been observed for border widths using "thin", "medium", "thick" constants
- // those particular constants could be trapped by a lookup
- // but perhaps there are more
- style.left = avalue;
- avalue = style.pixelLeft;
- }catch(e){
- avalue = 0;
- }
- style.left = sLeft;
- runtimeStyle.left = rsLeft;
- }
- return avalue;
- }
- }
-
- // FIXME: there opacity quirks on FF that we haven't ported over. Hrm.
- /*=====
- dojo._getOpacity = function(node){
- // summary:
- // Returns the current opacity of the passed node as a
- // floating-point value between 0 and 1.
- // node: DomNode
- // a reference to a DOM node. Does NOT support taking an
- // ID string for speed reasons.
- // return: Number between 0 and 1
- }
- =====*/
-
- dojo._getOpacity = (dojo.isIE ? function(node){
- try{
- return (node.filters.alpha.opacity / 100); // Number
- }catch(e){
- return 1; // Number
- }
- } : function(node){
- return dojo.getComputedStyle(node).opacity;
- }
- );
-
- /*=====
- dojo._setOpacity = function(node, opacity){
- // summary:
- // set the opacity of the passed node portably. Returns the
- // new opacity of the node.
- // node: DOMNode
- // a reference to a DOM node. Does NOT support taking an
- // ID string for performance reasons.
- // opacity: Number
- // A Number between 0 and 1. 0 specifies transparent.
- // return: Number between 0 and 1
- }
- =====*/
-
- dojo._setOpacity = (dojo.isIE ? function(/*DomNode*/node, /*Number*/opacity){
- if(opacity == 1){
- // on IE7 Alpha(Filter opacity=100) makes text look fuzzy so remove it altogether (bug #2661)
- node.style.cssText = node.style.cssText.replace(/FILTER:[^;]*;/i, "");
- if(node.nodeName.toLowerCase() == "tr"){
- dojo.query("> td", node).forEach(function(i){
- i.style.cssText = i.style.cssText.replace(/FILTER:[^;]*;/i, "");
- });
- }
- }else{
- var o = "Alpha(Opacity="+(opacity*100)+")";
- node.style.filter = o;
- }
- if(node.nodeName.toLowerCase() == "tr"){
- dojo.query("> td", node).forEach(function(i){
- i.style.filter = o;
- });
- }
- return opacity;
- } : function(node, opacity){
- return node.style.opacity = opacity;
- }
- );
-
- var _pixelNamesCache = {
- width: true, height: true, left: true, top: true
- };
- var _toStyleValue = function(node, type, value){
- type = type.toLowerCase();
- if(_pixelNamesCache[type] === true){
- return dojo._toPixelValue(node, value)
- }else if(_pixelNamesCache[type] === false){
- return value;
- }else{
- if(dojo.isOpera && type == "cssText"){
- // FIXME: add workaround for #2855 here
- }
- if(
- (type.indexOf("margin") >= 0) ||
- // (type.indexOf("border") >= 0) ||
- (type.indexOf("padding") >= 0) ||
- (type.indexOf("width") >= 0) ||
- (type.indexOf("height") >= 0) ||
- (type.indexOf("max") >= 0) ||
- (type.indexOf("min") >= 0) ||
- (type.indexOf("offset") >= 0)
- ){
- _pixelNamesCache[type] = true;
- return dojo._toPixelValue(node, value)
- }else{
- _pixelNamesCache[type] = false;
- return value;
- }
- }
- }
-
- // public API
-
- dojo.style = function(/*DomNode|String*/ node, /*String*/style, /*String?*/value){
- // summary:
- // gets or sets a style property on node. If 2 arguments are
- // passed, acts as a getter. If value is passed, acts as a setter
- // for the property.
- // node:
- // id or reference to node to get/set style for
- // style:
- // the style property to set in DOM-accessor format
- // ("borderWidth", not "border-width").
- // value:
- // optional. If passed, sets value on the node for style, handling
- // cross-browser concerns.
- var n=dojo.byId(node), args=arguments.length, op=(style=="opacity");
- if(args==3){
- return op ? dojo._setOpacity(n, value) : n.style[style] = value; /*Number*/
- }
- if(args==2 && op){
- return dojo._getOpacity(n);
- }
- var s = dojo.getComputedStyle(n);
- return (args == 1) ? s : _toStyleValue(n, style, s[style]); /* CSS2Properties||String||Number */
- }
-
- // =============================
- // Box Functions
- // =============================
-
- dojo._getPadExtents = function(/*DomNode*/n, /*Object*/computedStyle){
- // summary:
- // Returns object with special values specifically useful for node
- // fitting.
- // l/t = left/top padding (respectively)
- // w = the total of the left and right padding
- // h = the total of the top and bottom padding
- // If 'node' has position, l/t forms the origin for child nodes.
- // The w/h are used for calculating boxes.
- // Normally application code will not need to invoke this
- // directly, and will use the ...box... functions instead.
- var
- s=computedStyle||gcs(n),
- px=dojo._toPixelValue,
- l=px(n, s.paddingLeft),
- t=px(n, s.paddingTop);
- return {
- l: l,
- t: t,
- w: l+px(n, s.paddingRight),
- h: t+px(n, s.paddingBottom)
- };
- }
-
- dojo._getBorderExtents = function(/*DomNode*/n, /*Object*/computedStyle){
- // summary:
- // returns an object with properties useful for noting the border
- // dimensions.
- // l/t = the sum of left/top border (respectively)
- // w = the sum of the left and right border
- // h = the sum of the top and bottom border
- // The w/h are used for calculating boxes.
- // Normally application code will not need to invoke this
- // directly, and will use the ...box... functions instead.
- var
- ne='none',
- px=dojo._toPixelValue,
- s=computedStyle||gcs(n),
- bl=(s.borderLeftStyle!=ne ? px(n, s.borderLeftWidth) : 0),
- bt=(s.borderTopStyle!=ne ? px(n, s.borderTopWidth) : 0);
- return {
- l: bl,
- t: bt,
- w: bl + (s.borderRightStyle!=ne ? px(n, s.borderRightWidth) : 0),
- h: bt + (s.borderBottomStyle!=ne ? px(n, s.borderBottomWidth) : 0)
- };
- }
-
- dojo._getPadBorderExtents = function(/*DomNode*/n, /*Object*/computedStyle){
- // summary:
- // returns object with properties useful for box fitting with
- // regards to padding.
- // l/t = the sum of left/top padding and left/top border (respectively)
- // w = the sum of the left and right padding and border
- // h = the sum of the top and bottom padding and border
- // The w/h are used for calculating boxes.
- // Normally application code will not need to invoke this
- // directly, and will use the ...box... functions instead.
- var
- s=computedStyle||gcs(n),
- p=dojo._getPadExtents(n, s),
- b=dojo._getBorderExtents(n, s);
- return {
- l: p.l + b.l,
- t: p.t + b.t,
- w: p.w + b.w,
- h: p.h + b.h
- };
- }
-
- dojo._getMarginExtents = function(n, computedStyle){
- // summary:
- // returns object with properties useful for box fitting with
- // regards to box margins (i.e., the outer-box).
- // l/t = marginLeft, marginTop, respectively
- // w = total width, margin inclusive
- // h = total height, margin inclusive
- // The w/h are used for calculating boxes.
- // Normally application code will not need to invoke this
- // directly, and will use the ...box... functions instead.
- var
- s=computedStyle||gcs(n),
- px=dojo._toPixelValue,
- l=px(n, s.marginLeft),
- t=px(n, s.marginTop),
- r=px(n, s.marginRight),
- b=px(n, s.marginBottom);
- if (dojo.isSafari && (s.position != "absolute")){
- // FIXME: Safari's version of the computed right margin
- // is the space between our right edge and the right edge
- // of our offsetParent.
- // What we are looking for is the actual margin value as
- // determined by CSS.
- // Hack solution is to assume left/right margins are the same.
- r = l;
- }
- return {
- l: l,
- t: t,
- w: l+r,
- h: t+b
- };
- }
-
- // Box getters work in any box context because offsetWidth/clientWidth
- // are invariant wrt box context
- //
- // They do *not* work for display: inline objects that have padding styles
- // because the user agent ignores padding (it's bogus styling in any case)
- //
- // Be careful with IMGs because they are inline or block depending on
- // browser and browser mode.
-
- // Although it would be easier to read, there are not separate versions of
- // _getMarginBox for each browser because:
- // 1. the branching is not expensive
- // 2. factoring the shared code wastes cycles (function call overhead)
- // 3. duplicating the shared code wastes bytes
-
- dojo._getMarginBox = function(/*DomNode*/node, /*Object*/computedStyle){
- // summary:
- // returns an object that encodes the width, height, left and top
- // positions of the node's margin box.
- var s = computedStyle||gcs(node), me = dojo._getMarginExtents(node, s);
- var l = node.offsetLeft - me.l, t = node.offsetTop - me.t;
- if(dojo.isMoz){
- // Mozilla:
- // If offsetParent has a computed overflow != visible, the offsetLeft is decreased
- // by the parent's border.
- // We don't want to compute the parent's style, so instead we examine node's
- // computed left/top which is more stable.
- var sl = parseFloat(s.left), st = parseFloat(s.top);
- if(!isNaN(sl) && !isNaN(st)){
- l = sl, t = st;
- }else{
- // If child's computed left/top are not parseable as a number (e.g. "auto"), we
- // have no choice but to examine the parent's computed style.
- var p = node.parentNode;
- if(p && p.style){
- var pcs = gcs(p);
- if(pcs.overflow != "visible"){
- var be = dojo._getBorderExtents(p, pcs);
- l += be.l, t += be.t;
- }
- }
- }
- }else if(dojo.isOpera){
- // On Opera, offsetLeft includes the parent's border
- var p = node.parentNode;
- if(p){
- var be = dojo._getBorderExtents(p);
- l -= be.l, t -= be.t;
- }
- }
- return {
- l: l,
- t: t,
- w: node.offsetWidth + me.w,
- h: node.offsetHeight + me.h
- };
- }
-
- dojo._getContentBox = function(node, computedStyle){
- // summary:
- // Returns an object that encodes the width, height, left and top
- // positions of the node's content box, irrespective of the
- // current box model.
-
- // clientWidth/Height are important since the automatically account for scrollbars
- // fallback to offsetWidth/Height for special cases (see #3378)
- var s=computedStyle||gcs(node), pe=dojo._getPadExtents(node, s), be=dojo._getBorderExtents(node, s), w=node.clientWidth, h;
- if(!w){
- w=node.offsetWidth, h=node.offsetHeight;
- }else{
- h=node.clientHeight, be.w = be.h = 0;
- }
- // On Opera, offsetLeft includes the parent's border
- if(dojo.isOpera){ pe.l += be.l; pe.t += be.t; };
- return {
- l: pe.l,
- t: pe.t,
- w: w - pe.w - be.w,
- h: h - pe.h - be.h
- };
- }
-
- dojo._getBorderBox = function(node, computedStyle){
- var s=computedStyle||gcs(node), pe=dojo._getPadExtents(node, s), cb=dojo._getContentBox(node, s);
- return {
- l: cb.l - pe.l,
- t: cb.t - pe.t,
- w: cb.w + pe.w,
- h: cb.h + pe.h
- };
- }
-
- // Box setters depend on box context because interpretation of width/height styles
- // vary wrt box context.
- //
- // The value of dojo.boxModel is used to determine box context.
- // dojo.boxModel can be set directly to change behavior.
- //
- // Beware of display: inline objects that have padding styles
- // because the user agent ignores padding (it's a bogus setup anyway)
- //
- // Be careful with IMGs because they are inline or block depending on
- // browser and browser mode.
- //
- // Elements other than DIV may have special quirks, like built-in
- // margins or padding, or values not detectable via computedStyle.
- // In particular, margins on TABLE do not seems to appear
- // at all in computedStyle on Mozilla.
-
- dojo._setBox = function(/*DomNode*/node, /*Number?*/l, /*Number?*/t, /*Number?*/w, /*Number?*/h, /*String?*/u){
- // summary:
- // sets width/height/left/top in the current (native) box-model
- // dimentions. Uses the unit passed in u.
- // node: DOM Node reference. Id string not supported for performance reasons.
- // l: optional. left offset from parent.
- // t: optional. top offset from parent.
- // w: optional. width in current box model.
- // h: optional. width in current box model.
- // u: optional. unit measure to use for other measures. Defaults to "px".
- u = u || "px";
- with(node.style){
- if(!isNaN(l)){ left = l+u; }
- if(!isNaN(t)){ top = t+u; }
- if(w>=0){ width = w+u; }
- if(h>=0){ height = h+u; }
- }
- }
-
- dojo._usesBorderBox = function(/*DomNode*/node){
- // summary:
- // True if the node uses border-box layout.
-
- // We could test the computed style of node to see if a particular box
- // has been specified, but there are details and we choose not to bother.
- var n = node.tagName;
- // For whatever reason, TABLE and BUTTON are always border-box by default.
- // If you have assigned a different box to either one via CSS then
- // box functions will break.
- return dojo.boxModel=="border-box" || n=="TABLE" || n=="BUTTON"; // boolean
- }
-
- dojo._setContentSize = function(/*DomNode*/node, /*Number*/widthPx, /*Number*/heightPx, /*Object*/computedStyle){
- // summary:
- // Sets the size of the node's contents, irrespective of margins,
- // padding, or borders.
- var bb = dojo._usesBorderBox(node);
- if(bb){
- var pb = dojo._getPadBorderExtents(node, computedStyle);
- if(widthPx>=0){ widthPx += pb.w; }
- if(heightPx>=0){ heightPx += pb.h; }
- }
- dojo._setBox(node, NaN, NaN, widthPx, heightPx);
- }
-
- dojo._setMarginBox = function(/*DomNode*/node, /*Number?*/leftPx, /*Number?*/topPx,
- /*Number?*/widthPx, /*Number?*/heightPx,
- /*Object*/computedStyle){
- // summary:
- // sets the size of the node's margin box and palcement
- // (left/top), irrespective of box model. Think of it as a
- // passthrough to dojo._setBox that handles box-model vagaries for
- // you.
-
- var s = computedStyle || dojo.getComputedStyle(node);
- // Some elements have special padding, margin, and box-model settings.
- // To use box functions you may need to set padding, margin explicitly.
- // Controlling box-model is harder, in a pinch you might set dojo.boxModel.
- var bb=dojo._usesBorderBox(node),
- pb=bb ? _nilExtents : dojo._getPadBorderExtents(node, s),
- mb=dojo._getMarginExtents(node, s);
- if(widthPx>=0){ widthPx = Math.max(widthPx - pb.w - mb.w, 0); }
- if(heightPx>=0){ heightPx = Math.max(heightPx - pb.h - mb.h, 0); }
- dojo._setBox(node, leftPx, topPx, widthPx, heightPx);
- }
-
- var _nilExtents = { l:0, t:0, w:0, h:0 };
-
- // public API
-
- dojo.marginBox = function(/*DomNode|String*/node, /*Object?*/box){
- // summary:
- // getter/setter for the margin-box of node.
- // description:
- // Returns an object in the expected format of box (regardless
- // if box is passed). The object might look like:
- // { l: 50, t: 200, w: 300: h: 150 }
- // for a node offset from its parent 50px to the left, 200px from
- // the top with a margin width of 300px and a margin-height of
- // 150px.
- // node:
- // id or reference to DOM Node to get/set box for
- // box:
- // optional. If passed, denotes that dojo.marginBox() should
- // update/set the margin box for node. Box is an object in the
- // above format. All properties are optional if passed.
- var n=dojo.byId(node), s=gcs(n), b=box;
- return !b ? dojo._getMarginBox(n, s) : dojo._setMarginBox(n, b.l, b.t, b.w, b.h, s); // Object
- }
-
- dojo.contentBox = function(/*DomNode|String*/node, /*Object?*/box){
- // summary:
- // getter/setter for the content-box of node.
- // description:
- // Returns an object in the expected format of box (regardless if box is passed).
- // The object might look like:
- // { l: 50, t: 200, w: 300: h: 150 }
- // for a node offset from its parent 50px to the left, 200px from
- // the top with a content width of 300px and a content-height of
- // 150px. Note that the content box may have a much larger border
- // or margin box, depending on the box model currently in use and
- // CSS values set/inherited for node.
- // node:
- // id or reference to DOM Node to get/set box for
- // box:
- // optional. If passed, denotes that dojo.contentBox() should
- // update/set the content box for node. Box is an object in the
- // above format. All properties are optional if passed.
- var n=dojo.byId(node), s=gcs(n), b=box;
- return !b ? dojo._getContentBox(n, s) : dojo._setContentSize(n, b.w, b.h, s); // Object
- }
-
- // =============================
- // Positioning
- // =============================
-
- var _sumAncestorProperties = function(node, prop){
- if(!(node = (node||0).parentNode)){return 0};
- var val, retVal = 0, _b = dojo.body();
- while(node && node.style){
- if(gcs(node).position == "fixed"){
- return 0;
- }
- val = node[prop];
- if(val){
- retVal += val - 0;
- // opera and khtml #body & #html has the same values, we only
- // need one value
- if(node == _b){ break; }
- }
- node = node.parentNode;
- }
- return retVal; // integer
- }
-
- dojo._docScroll = function(){
- var _b = dojo.body();
- var _w = dojo.global;
- var de = dojo.doc.documentElement;
- return {
- y: (_w.pageYOffset || de.scrollTop || _b.scrollTop || 0),
- x: (_w.pageXOffset || dojo._fixIeBiDiScrollLeft(de.scrollLeft) || _b.scrollLeft || 0)
- };
- };
-
- dojo._isBodyLtr = function(){
- //FIXME: could check html and body tags directly instead of computed style? need to ignore case, accept empty values
- return !("_bodyLtr" in dojo) ?
- dojo._bodyLtr = dojo.getComputedStyle(dojo.body()).direction == "ltr" :
- dojo._bodyLtr; // Boolean
- }
-
- dojo._getIeDocumentElementOffset = function(){
- // summary
- // The following values in IE contain an offset:
- // event.clientX
- // event.clientY
- // node.getBoundingClientRect().left
- // node.getBoundingClientRect().top
- // But other position related values do not contain this offset, such as
- // node.offsetLeft, node.offsetTop, node.style.left and node.style.top.
- // The offset is always (2, 2) in LTR direction. When the body is in RTL
- // direction, the offset counts the width of left scroll bar's width.
- // This function computes the actual offset.
-
- //NOTE: assumes we're being called in an IE browser
-
- var de = dojo.doc.documentElement;
- if(dojo.isIE >= 7){
- return {x: de.getBoundingClientRect().left, y: de.getBoundingClientRect().top}; // Object
- }else{
- // IE 6.0
- return {x: dojo._isBodyLtr() || window.parent == window ?
- de.clientLeft : de.offsetWidth - de.clientWidth - de.clientLeft,
- y: de.clientTop}; // Object
- }
- };
-
- dojo._fixIeBiDiScrollLeft = function(/*Integer*/ scrollLeft){
- // In RTL direction, scrollLeft should be a negative value, but IE
- // returns a positive one. All codes using documentElement.scrollLeft
- // must call this function to fix this error, otherwise the position
- // will offset to right when there is a horizonal scrollbar.
- if(dojo.isIE && !dojo._isBodyLtr()){
- var de = dojo.doc.documentElement;
- return scrollLeft + de.clientWidth - de.scrollWidth; // Integer
- }
- return scrollLeft; // Integer
- }
-
- dojo._abs = function(/*DomNode*/node, /*Boolean?*/includeScroll){
- // summary:
- // Gets the absolute position of the passed element based on the
- // document itself. Returns an object of the form:
- // { x: 100, y: 300 }
- // if includeScroll is passed, the x and y values will include any
- // document offsets that may affect the position relative to the
- // viewport.
-
- // FIXME: need to decide in the brave-new-world if we're going to be
- // margin-box or border-box.
- var ownerDocument = node.ownerDocument;
- var ret = {
- x: 0,
- y: 0
- };
- var hasScroll = false;
-
- // targetBoxType == "border-box"
- var db = dojo.body();
- if(dojo.isIE){
- var client = node.getBoundingClientRect();
- var offset = dojo._getIeDocumentElementOffset();
- ret.x = client.left - offset.x;
- ret.y = client.top - offset.y;
- }else if(ownerDocument["getBoxObjectFor"]){
- // mozilla
- var bo = ownerDocument.getBoxObjectFor(node);
- ret.x = bo.x - _sumAncestorProperties(node, "scrollLeft");
- ret.y = bo.y - _sumAncestorProperties(node, "scrollTop");
- }else{
- if(node["offsetParent"]){
- hasScroll = true;
- var endNode;
- // in Safari, if the node is an absolutely positioned child of
- // the body and the body has a margin the offset of the child
- // and the body contain the body's margins, so we need to end
- // at the body
- // FIXME: getting contrary results to the above in latest WebKit.
- if(dojo.isSafari &&
- //(node.style.getPropertyValue("position") == "absolute") &&
- (gcs(node).position == "absolute") &&
- (node.parentNode == db)){
- endNode = db;
- }else{
- endNode = db.parentNode;
- }
- if(node.parentNode != db){
- var nd = node;
- if(dojo.isOpera || (dojo.isSafari >= 3)){ nd = db; }
- ret.x -= _sumAncestorProperties(nd, "scrollLeft");
- ret.y -= _sumAncestorProperties(nd, "scrollTop");
- }
- var curnode = node;
- do{
- var n = curnode["offsetLeft"];
- //FIXME: ugly hack to workaround the submenu in
- //popupmenu2 does not shown up correctly in opera.
- //Someone have a better workaround?
- if(!dojo.isOpera || n>0){
- ret.x += isNaN(n) ? 0 : n;
- }
- var m = curnode["offsetTop"];
- ret.y += isNaN(m) ? 0 : m;
- curnode = curnode.offsetParent;
- }while((curnode != endNode)&&curnode);
- }else if(node["x"]&&node["y"]){
- ret.x += isNaN(node.x) ? 0 : node.x;
- ret.y += isNaN(node.y) ? 0 : node.y;
- }
- }
- // account for document scrolling
- // if offsetParent is used, ret value already includes scroll position
- // so we may have to actually remove that value if !includeScroll
- if(hasScroll || includeScroll){
- var scroll = dojo._docScroll();
- var m = hasScroll ? (!includeScroll ? -1 : 0) : 1;
- ret.y += m*scroll.y;
- ret.x += m*scroll.x;
- }
-
- return ret; // object
- }
-
- // FIXME: need a setter for coords or a moveTo!!
- dojo.coords = function(/*DomNode|String*/node, /*Boolean?*/includeScroll){
- // summary:
- // Returns an object that measures margin box width/height and
- // absolute positioning data from dojo._abs(). Return value will
- // be in the form:
- // { l: 50, t: 200, w: 300: h: 150, x: 100, y: 300 }
- // does not act as a setter. If includeScroll is passed, the x and
- // y params are affected as one would expect in dojo._abs().
- var n=dojo.byId(node), s=gcs(n), mb=dojo._getMarginBox(n, s);
- var abs = dojo._abs(n, includeScroll);
- mb.x = abs.x;
- mb.y = abs.y;
- return mb;
- }
+var d=dojo;
+var _5=d.byId;
+var _6=null,_7;
+d.addOnWindowUnload(function(){
+_6=null;
+});
+dojo._destroyElement=dojo.destroy=function(_8){
+_8=_5(_8);
+try{
+var _9=_8.ownerDocument;
+if(!_6||_7!=_9){
+_6=_9.createElement("div");
+_7=_9;
+}
+_6.appendChild(_8.parentNode?_8.parentNode.removeChild(_8):_8);
+_6.innerHTML="";
+}
+catch(e){
+}
+};
+dojo.isDescendant=function(_a,_b){
+try{
+_a=_5(_a);
+_b=_5(_b);
+while(_a){
+if(_a==_b){
+return true;
+}
+_a=_a.parentNode;
+}
+}
+catch(e){
+}
+return false;
+};
+dojo.setSelectable=function(_c,_d){
+_c=_5(_c);
+if(d.isMozilla){
+_c.style.MozUserSelect=_d?"":"none";
+}else{
+if(d.isKhtml||d.isWebKit){
+_c.style.KhtmlUserSelect=_d?"auto":"none";
+}else{
+if(d.isIE){
+var v=(_c.unselectable=_d?"":"on");
+d.query("*",_c).forEach("item.unselectable = '"+v+"'");
+}
+}
+}
+};
+var _e=function(_f,ref){
+var _10=ref.parentNode;
+if(_10){
+_10.insertBefore(_f,ref);
+}
+};
+var _11=function(_12,ref){
+var _13=ref.parentNode;
+if(_13){
+if(_13.lastChild==ref){
+_13.appendChild(_12);
+}else{
+_13.insertBefore(_12,ref.nextSibling);
+}
+}
+};
+dojo.place=function(_14,_15,_16){
+_15=_5(_15);
+if(typeof _14=="string"){
+_14=_14.charAt(0)=="<"?d._toDom(_14,_15.ownerDocument):_5(_14);
+}
+if(typeof _16=="number"){
+var cn=_15.childNodes;
+if(!cn.length||cn.length<=_16){
+_15.appendChild(_14);
+}else{
+_e(_14,cn[_16<0?0:_16]);
+}
+}else{
+switch(_16){
+case "before":
+_e(_14,_15);
+break;
+case "after":
+_11(_14,_15);
+break;
+case "replace":
+_15.parentNode.replaceChild(_14,_15);
+break;
+case "only":
+d.empty(_15);
+_15.appendChild(_14);
+break;
+case "first":
+if(_15.firstChild){
+_e(_14,_15.firstChild);
+break;
+}
+default:
+_15.appendChild(_14);
+}
+}
+return _14;
+};
+dojo.boxModel="content-box";
+if(d.isIE){
+d.boxModel=document.compatMode=="BackCompat"?"border-box":"content-box";
+}
+var gcs;
+if(d.isWebKit){
+gcs=function(_17){
+var s;
+if(_17.nodeType==1){
+var dv=_17.ownerDocument.defaultView;
+s=dv.getComputedStyle(_17,null);
+if(!s&&_17.style){
+_17.style.display="";
+s=dv.getComputedStyle(_17,null);
+}
+}
+return s||{};
+};
+}else{
+if(d.isIE){
+gcs=function(_18){
+return _18.nodeType==1?_18.currentStyle:{};
+};
+}else{
+gcs=function(_19){
+return _19.nodeType==1?_19.ownerDocument.defaultView.getComputedStyle(_19,null):{};
+};
+}
+}
+dojo.getComputedStyle=gcs;
+if(!d.isIE){
+d._toPixelValue=function(_1a,_1b){
+return parseFloat(_1b)||0;
+};
+}else{
+d._toPixelValue=function(_1c,_1d){
+if(!_1d){
+return 0;
+}
+if(_1d=="medium"){
+return 4;
+}
+if(_1d.slice&&_1d.slice(-2)=="px"){
+return parseFloat(_1d);
+}
+with(_1c){
+var _1e=style.left;
+var _1f=runtimeStyle.left;
+runtimeStyle.left=currentStyle.left;
+try{
+style.left=_1d;
+_1d=style.pixelLeft;
+}
+catch(e){
+_1d=0;
+}
+style.left=_1e;
+runtimeStyle.left=_1f;
+}
+return _1d;
+};
+}
+var px=d._toPixelValue;
+var _20="DXImageTransform.Microsoft.Alpha";
+var af=function(n,f){
+try{
+return n.filters.item(_20);
+}
+catch(e){
+return f?{}:null;
+}
+};
+dojo._getOpacity=d.isIE?function(_21){
+try{
+return af(_21).Opacity/100;
+}
+catch(e){
+return 1;
+}
+}:function(_22){
+return gcs(_22).opacity;
+};
+dojo._setOpacity=d.isIE?function(_23,_24){
+var ov=_24*100;
+_23.style.zoom=1;
+af(_23,1).Enabled=!(_24==1);
+if(!af(_23)){
+_23.style.filter+=" progid:"+_20+"(Opacity="+ov+")";
+}else{
+af(_23,1).Opacity=ov;
+}
+if(_23.nodeName.toLowerCase()=="tr"){
+d.query("> td",_23).forEach(function(i){
+d._setOpacity(i,_24);
+});
+}
+return _24;
+}:function(_25,_26){
+return _25.style.opacity=_26;
+};
+var _27={left:true,top:true};
+var _28=/margin|padding|width|height|max|min|offset/;
+var _29=function(_2a,_2b,_2c){
+_2b=_2b.toLowerCase();
+if(d.isIE){
+if(_2c=="auto"){
+if(_2b=="height"){
+return _2a.offsetHeight;
+}
+if(_2b=="width"){
+return _2a.offsetWidth;
+}
+}
+if(_2b=="fontweight"){
+switch(_2c){
+case 700:
+return "bold";
+case 400:
+default:
+return "normal";
+}
+}
+}
+if(!(_2b in _27)){
+_27[_2b]=_28.test(_2b);
+}
+return _27[_2b]?px(_2a,_2c):_2c;
+};
+var _2d=d.isIE?"styleFloat":"cssFloat",_2e={"cssFloat":_2d,"styleFloat":_2d,"float":_2d};
+dojo.style=function(_2f,_30,_31){
+var n=_5(_2f),_32=arguments.length,op=(_30=="opacity");
+_30=_2e[_30]||_30;
+if(_32==3){
+return op?d._setOpacity(n,_31):n.style[_30]=_31;
+}
+if(_32==2&&op){
+return d._getOpacity(n);
+}
+var s=gcs(n);
+if(_32==2&&typeof _30!="string"){
+for(var x in _30){
+d.style(_2f,x,_30[x]);
+}
+return s;
+}
+return (_32==1)?s:_29(n,_30,s[_30]||n.style[_30]);
+};
+dojo._getPadExtents=function(n,_33){
+var s=_33||gcs(n),l=px(n,s.paddingLeft),t=px(n,s.paddingTop);
+return {l:l,t:t,w:l+px(n,s.paddingRight),h:t+px(n,s.paddingBottom)};
+};
+dojo._getBorderExtents=function(n,_34){
+var ne="none",s=_34||gcs(n),bl=(s.borderLeftStyle!=ne?px(n,s.borderLeftWidth):0),bt=(s.borderTopStyle!=ne?px(n,s.borderTopWidth):0);
+return {l:bl,t:bt,w:bl+(s.borderRightStyle!=ne?px(n,s.borderRightWidth):0),h:bt+(s.borderBottomStyle!=ne?px(n,s.borderBottomWidth):0)};
+};
+dojo._getPadBorderExtents=function(n,_35){
+var s=_35||gcs(n),p=d._getPadExtents(n,s),b=d._getBorderExtents(n,s);
+return {l:p.l+b.l,t:p.t+b.t,w:p.w+b.w,h:p.h+b.h};
+};
+dojo._getMarginExtents=function(n,_36){
+var s=_36||gcs(n),l=px(n,s.marginLeft),t=px(n,s.marginTop),r=px(n,s.marginRight),b=px(n,s.marginBottom);
+if(d.isWebKit&&(s.position!="absolute")){
+r=l;
+}
+return {l:l,t:t,w:l+r,h:t+b};
+};
+dojo._getMarginBox=function(_37,_38){
+var s=_38||gcs(_37),me=d._getMarginExtents(_37,s);
+var l=_37.offsetLeft-me.l,t=_37.offsetTop-me.t,p=_37.parentNode;
+if(d.isMoz){
+var sl=parseFloat(s.left),st=parseFloat(s.top);
+if(!isNaN(sl)&&!isNaN(st)){
+l=sl,t=st;
+}else{
+if(p&&p.style){
+var pcs=gcs(p);
+if(pcs.overflow!="visible"){
+var be=d._getBorderExtents(p,pcs);
+l+=be.l,t+=be.t;
+}
+}
+}
+}else{
+if(d.isOpera||(d.isIE>7&&!d.isQuirks)){
+if(p){
+be=d._getBorderExtents(p);
+l-=be.l;
+t-=be.t;
+}
+}
+}
+return {l:l,t:t,w:_37.offsetWidth+me.w,h:_37.offsetHeight+me.h};
+};
+dojo._getContentBox=function(_39,_3a){
+var s=_3a||gcs(_39),pe=d._getPadExtents(_39,s),be=d._getBorderExtents(_39,s),w=_39.clientWidth,h;
+if(!w){
+w=_39.offsetWidth,h=_39.offsetHeight;
+}else{
+h=_39.clientHeight,be.w=be.h=0;
+}
+if(d.isOpera){
+pe.l+=be.l;
+pe.t+=be.t;
+}
+return {l:pe.l,t:pe.t,w:w-pe.w-be.w,h:h-pe.h-be.h};
+};
+dojo._getBorderBox=function(_3b,_3c){
+var s=_3c||gcs(_3b),pe=d._getPadExtents(_3b,s),cb=d._getContentBox(_3b,s);
+return {l:cb.l-pe.l,t:cb.t-pe.t,w:cb.w+pe.w,h:cb.h+pe.h};
+};
+dojo._setBox=function(_3d,l,t,w,h,u){
+u=u||"px";
+var s=_3d.style;
+if(!isNaN(l)){
+s.left=l+u;
+}
+if(!isNaN(t)){
+s.top=t+u;
+}
+if(w>=0){
+s.width=w+u;
+}
+if(h>=0){
+s.height=h+u;
+}
+};
+dojo._isButtonTag=function(_3e){
+return _3e.tagName=="BUTTON"||_3e.tagName=="INPUT"&&(_3e.getAttribute("type")||"").toUpperCase()=="BUTTON";
+};
+dojo._usesBorderBox=function(_3f){
+var n=_3f.tagName;
+return d.boxModel=="border-box"||n=="TABLE"||d._isButtonTag(_3f);
+};
+dojo._setContentSize=function(_40,_41,_42,_43){
+if(d._usesBorderBox(_40)){
+var pb=d._getPadBorderExtents(_40,_43);
+if(_41>=0){
+_41+=pb.w;
+}
+if(_42>=0){
+_42+=pb.h;
+}
+}
+d._setBox(_40,NaN,NaN,_41,_42);
+};
+dojo._setMarginBox=function(_44,_45,_46,_47,_48,_49){
+var s=_49||gcs(_44),bb=d._usesBorderBox(_44),pb=bb?_4a:d._getPadBorderExtents(_44,s);
+if(d.isWebKit){
+if(d._isButtonTag(_44)){
+var ns=_44.style;
+if(_47>=0&&!ns.width){
+ns.width="4px";
+}
+if(_48>=0&&!ns.height){
+ns.height="4px";
+}
+}
+}
+var mb=d._getMarginExtents(_44,s);
+if(_47>=0){
+_47=Math.max(_47-pb.w-mb.w,0);
+}
+if(_48>=0){
+_48=Math.max(_48-pb.h-mb.h,0);
+}
+d._setBox(_44,_45,_46,_47,_48);
+};
+var _4a={l:0,t:0,w:0,h:0};
+dojo.marginBox=function(_4b,box){
+var n=_5(_4b),s=gcs(n),b=box;
+return !b?d._getMarginBox(n,s):d._setMarginBox(n,b.l,b.t,b.w,b.h,s);
+};
+dojo.contentBox=function(_4c,box){
+var n=_5(_4c),s=gcs(n),b=box;
+return !b?d._getContentBox(n,s):d._setContentSize(n,b.w,b.h,s);
+};
+var _4d=function(_4e,_4f){
+if(!(_4e=(_4e||0).parentNode)){
+return 0;
+}
+var val,_50=0,_51=d.body();
+while(_4e&&_4e.style){
+if(gcs(_4e).position=="fixed"){
+return 0;
+}
+val=_4e[_4f];
+if(val){
+_50+=val-0;
+if(_4e==_51){
+break;
+}
+}
+_4e=_4e.parentNode;
+}
+return _50;
+};
+dojo._docScroll=function(){
+var n=d.global;
+return "pageXOffset" in n?{x:n.pageXOffset,y:n.pageYOffset}:(n=d.doc.documentElement,n.clientHeight?{x:d._fixIeBiDiScrollLeft(n.scrollLeft),y:n.scrollTop}:(n=d.body(),{x:n.scrollLeft||0,y:n.scrollTop||0}));
+};
+dojo._isBodyLtr=function(){
+return "_bodyLtr" in d?d._bodyLtr:d._bodyLtr=(d.body().dir||d.doc.documentElement.dir||"ltr").toLowerCase()=="ltr";
+};
+dojo._getIeDocumentElementOffset=function(){
+var de=d.doc.documentElement;
+if(d.isIE<8){
+var r=de.getBoundingClientRect();
+var l=r.left,t=r.top;
+if(d.isIE<7){
+l+=de.clientLeft;
+t+=de.clientTop;
+}
+return {x:l<0?0:l,y:t<0?0:t};
+}else{
+return {x:0,y:0};
+}
+};
+dojo._fixIeBiDiScrollLeft=function(_52){
+var dd=d.doc;
+if(d.isIE<8&&!d._isBodyLtr()){
+var de=d.isQuirks?dd.body:dd.documentElement;
+return _52+de.clientWidth-de.scrollWidth;
+}
+return _52;
+};
+dojo._abs=dojo.position=function(_53,_54){
+var db=d.body(),dh=db.parentNode,ret;
+_53=_5(_53);
+if(_53["getBoundingClientRect"]){
+ret=_53.getBoundingClientRect();
+ret={x:ret.left,y:ret.top,w:ret.right-ret.left,h:ret.bottom-ret.top};
+if(d.isIE){
+var _55=d._getIeDocumentElementOffset();
+ret.x-=_55.x+(d.isQuirks?db.clientLeft+db.offsetLeft:0);
+ret.y-=_55.y+(d.isQuirks?db.clientTop+db.offsetTop:0);
+}else{
+if(d.isFF==3){
+var cs=gcs(dh);
+ret.x-=px(dh,cs.marginLeft)+px(dh,cs.borderLeftWidth);
+ret.y-=px(dh,cs.marginTop)+px(dh,cs.borderTopWidth);
+}
+}
+}else{
+ret={x:0,y:0,w:_53.offsetWidth,h:_53.offsetHeight};
+if(_53["offsetParent"]){
+ret.x-=_4d(_53,"scrollLeft");
+ret.y-=_4d(_53,"scrollTop");
+var _56=_53;
+do{
+var n=_56.offsetLeft,t=_56.offsetTop;
+ret.x+=isNaN(n)?0:n;
+ret.y+=isNaN(t)?0:t;
+cs=gcs(_56);
+if(_56!=_53){
+if(d.isMoz){
+ret.x+=2*px(_56,cs.borderLeftWidth);
+ret.y+=2*px(_56,cs.borderTopWidth);
+}else{
+ret.x+=px(_56,cs.borderLeftWidth);
+ret.y+=px(_56,cs.borderTopWidth);
+}
+}
+if(d.isMoz&&cs.position=="static"){
+var _57=_56.parentNode;
+while(_57!=_56.offsetParent){
+var pcs=gcs(_57);
+if(pcs.position=="static"){
+ret.x+=px(_56,pcs.borderLeftWidth);
+ret.y+=px(_56,pcs.borderTopWidth);
+}
+_57=_57.parentNode;
+}
+}
+_56=_56.offsetParent;
+}while((_56!=dh)&&_56);
+}else{
+if(_53.x&&_53.y){
+ret.x+=isNaN(_53.x)?0:_53.x;
+ret.y+=isNaN(_53.y)?0:_53.y;
+}
+}
+}
+if(_54){
+var _58=d._docScroll();
+ret.x+=_58.x;
+ret.y+=_58.y;
+}
+return ret;
+};
+dojo.coords=function(_59,_5a){
+var n=_5(_59),s=gcs(n),mb=d._getMarginBox(n,s);
+var abs=d.position(n,_5a);
+mb.x=abs.x;
+mb.y=abs.y;
+return mb;
+};
+var _5b={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",valuetype:"valueType"},_5c={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"},_5d={innerHTML:1,className:1,htmlFor:d.isIE,value:1};
+var _5e=function(_5f){
+return _5c[_5f.toLowerCase()]||_5f;
+};
+var _60=function(_61,_62){
+var _63=_61.getAttributeNode&&_61.getAttributeNode(_62);
+return _63&&_63.specified;
+};
+dojo.hasAttr=function(_64,_65){
+var lc=_65.toLowerCase();
+return _5d[_5b[lc]||_65]||_60(_5(_64),_5c[lc]||_65);
+};
+var _66={},_67=0,_68=dojo._scopeName+"attrid",_69={col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1};
+dojo.attr=function(_6a,_6b,_6c){
+_6a=_5(_6a);
+var _6d=arguments.length,_6e;
+if(_6d==2&&typeof _6b!="string"){
+for(var x in _6b){
+d.attr(_6a,x,_6b[x]);
+}
+return _6a;
+}
+var lc=_6b.toLowerCase(),_6f=_5b[lc]||_6b,_70=_5d[_6f],_71=_5c[lc]||_6b;
+if(_6d==3){
+do{
+if(_6f=="style"&&typeof _6c!="string"){
+d.style(_6a,_6c);
+break;
+}
+if(_6f=="innerHTML"){
+if(d.isIE&&_6a.tagName.toLowerCase() in _69){
+d.empty(_6a);
+_6a.appendChild(d._toDom(_6c,_6a.ownerDocument));
+}else{
+_6a[_6f]=_6c;
+}
+break;
+}
+if(d.isFunction(_6c)){
+var _72=d.attr(_6a,_68);
+if(!_72){
+_72=_67++;
+d.attr(_6a,_68,_72);
+}
+if(!_66[_72]){
+_66[_72]={};
+}
+var h=_66[_72][_6f];
+if(h){
+d.disconnect(h);
+}else{
+try{
+delete _6a[_6f];
+}
+catch(e){
+}
+}
+_66[_72][_6f]=d.connect(_6a,_6f,_6c);
+break;
+}
+if(_70||typeof _6c=="boolean"){
+_6a[_6f]=_6c;
+break;
+}
+_6a.setAttribute(_71,_6c);
+}while(false);
+return _6a;
+}
+_6c=_6a[_6f];
+if(_70&&typeof _6c!="undefined"){
+return _6c;
+}
+if(_6f!="href"&&(typeof _6c=="boolean"||d.isFunction(_6c))){
+return _6c;
+}
+return _60(_6a,_71)?_6a.getAttribute(_71):null;
+};
+dojo.removeAttr=function(_73,_74){
+_5(_73).removeAttribute(_5e(_74));
+};
+dojo.getNodeProp=function(_75,_76){
+_75=_5(_75);
+var lc=_76.toLowerCase(),_77=_5b[lc]||_76;
+if((_77 in _75)&&_77!="href"){
+return _75[_77];
+}
+var _78=_5c[lc]||_76;
+return _60(_75,_78)?_75.getAttribute(_78):null;
+};
+dojo.create=function(tag,_79,_7a,pos){
+var doc=d.doc;
+if(_7a){
+_7a=_5(_7a);
+doc=_7a.ownerDocument;
+}
+if(typeof tag=="string"){
+tag=doc.createElement(tag);
+}
+if(_79){
+d.attr(tag,_79);
+}
+if(_7a){
+d.place(tag,_7a,pos);
+}
+return tag;
+};
+d.empty=d.isIE?function(_7b){
+_7b=_5(_7b);
+for(var c;c=_7b.lastChild;){
+d.destroy(c);
+}
+}:function(_7c){
+_5(_7c).innerHTML="";
+};
+var _7d={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},_7e=/<\s*([\w\:]+)/,_7f={},_80=0,_81="__"+d._scopeName+"ToDomId";
+for(var _82 in _7d){
+var tw=_7d[_82];
+tw.pre=_82=="option"?"<select multiple=\"multiple\">":"<"+tw.join("><")+">";
+tw.post="</"+tw.reverse().join("></")+">";
+}
+d._toDom=function(_83,doc){
+doc=doc||d.doc;
+var _84=doc[_81];
+if(!_84){
+doc[_81]=_84=++_80+"";
+_7f[_84]=doc.createElement("div");
+}
+_83+="";
+var _85=_83.match(_7e),tag=_85?_85[1].toLowerCase():"",_86=_7f[_84],_87,i,fc,df;
+if(_85&&_7d[tag]){
+_87=_7d[tag];
+_86.innerHTML=_87.pre+_83+_87.post;
+for(i=_87.length;i;--i){
+_86=_86.firstChild;
+}
+}else{
+_86.innerHTML=_83;
+}
+if(_86.childNodes.length==1){
+return _86.removeChild(_86.firstChild);
+}
+df=doc.createDocumentFragment();
+while(fc=_86.firstChild){
+df.appendChild(fc);
+}
+return df;
+};
+var _88="className";
+dojo.hasClass=function(_89,_8a){
+return ((" "+_5(_89)[_88]+" ").indexOf(" "+_8a+" ")>=0);
+};
+var _8b=/\s+/,a1=[""],_8c=function(s){
+if(typeof s=="string"||s instanceof String){
+if(s.indexOf(" ")<0){
+a1[0]=s;
+return a1;
+}else{
+return s.split(_8b);
+}
+}
+return s;
+};
+dojo.addClass=function(_8d,_8e){
+_8d=_5(_8d);
+_8e=_8c(_8e);
+var cls=" "+_8d[_88]+" ";
+for(var i=0,len=_8e.length,c;i<len;++i){
+c=_8e[i];
+if(c&&cls.indexOf(" "+c+" ")<0){
+cls+=c+" ";
+}
+}
+_8d[_88]=d.trim(cls);
+};
+dojo.removeClass=function(_8f,_90){
+_8f=_5(_8f);
+var cls;
+if(_90!==undefined){
+_90=_8c(_90);
+cls=" "+_8f[_88]+" ";
+for(var i=0,len=_90.length;i<len;++i){
+cls=cls.replace(" "+_90[i]+" "," ");
+}
+cls=d.trim(cls);
+}else{
+cls="";
+}
+if(_8f[_88]!=cls){
+_8f[_88]=cls;
+}
+};
+dojo.toggleClass=function(_91,_92,_93){
+if(_93===undefined){
+_93=!d.hasClass(_91,_92);
+}
+d[_93?"addClass":"removeClass"](_91,_92);
+};
})();
-
-// =============================
-// (CSS) Class Functions
-// =============================
-
-dojo.hasClass = function(/*DomNode|String*/node, /*String*/classStr){
- // summary:
- // Returns whether or not the specified classes are a portion of the
- // class list currently applied to the node.
- return ((" "+dojo.byId(node).className+" ").indexOf(" "+classStr+" ") >= 0); // Boolean
-};
-
-dojo.addClass = function(/*DomNode|String*/node, /*String*/classStr){
- // summary:
- // Adds the specified classes to the end of the class list on the
- // passed node.
- node = dojo.byId(node);
- var cls = node.className;
- if((" "+cls+" ").indexOf(" "+classStr+" ") < 0){
- node.className = cls + (cls ? ' ' : '') + classStr;
- }
-};
-
-dojo.removeClass = function(/*DomNode|String*/node, /*String*/classStr){
- // summary: Removes the specified classes from node.
- node = dojo.byId(node);
- var t = dojo.trim((" " + node.className + " ").replace(" " + classStr + " ", " "));
- if(node.className != t){ node.className = t; }
-};
-
-dojo.toggleClass = function(/*DomNode|String*/node, /*String*/classStr, /*Boolean?*/condition){
- // summary:
- // Adds a class to node if not present, or removes if present.
- // Pass a boolean condition if you want to explicitly add or remove.
- // condition:
- // If passed, true means to add the class, false means to remove.
- if(condition === undefined){
- condition = !dojo.hasClass(node, classStr);
- }
- dojo[condition ? "addClass" : "removeClass"](node, classStr);
-};
-
}
diff --git a/js/dojo/dojo/_base/json.js b/js/dojo/dojo/_base/json.js
--- a/js/dojo/dojo/_base/json.js
+++ b/js/dojo/dojo/_base/json.js
@@ -1,144 +1,81 @@
-if(!dojo._hasResource["dojo._base.json"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.json"] = true;
-dojo.provide("dojo._base.json");
-
-dojo.fromJson = function(/*String*/ json){
- // summary:
- // evaluates the passed string-form of a JSON object
- // json:
- // a string literal of a JSON item, for instance:
- // '{ "foo": [ "bar", 1, { "baz": "thud" } ] }'
- // return:
- // An object, the result of the evaluation
-
- // FIXME: should this accept mozilla's optional second arg?
- try {
- return eval("(" + json + ")");
- }catch(e){
- console.debug(e);
- return json;
- }
-}
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo._escapeString = function(/*String*/str){
- //summary:
- // Adds escape sequences for non-visual characters, double quote and
- // backslash and surrounds with double quotes to form a valid string
- // literal.
- 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"); // string
-}
-
-dojo.toJsonIndentStr = "\t";
-dojo.toJson = function(/*Object*/ it, /*Boolean?*/ prettyPrint, /*String?*/ _indentStr){
- // summary:
- // Create a JSON serialization of an object.
- // Note that this doesn't check for infinite recursion, so don't do that!
- //
- // it:
- // an object to be serialized. Objects may define their own
- // serialization via a special "__json__" or "json" function
- // property. If a specialized serializer has been defined, it will
- // be used as a fallback.
- //
- // prettyPrint:
- // if true, we indent objects and arrays to make the output prettier.
- // The variable dojo.toJsonIndentStr is used as the indent string
- // -- to use something other than the default (tab),
- // change that variable before calling dojo.toJson().
- //
- // _indentStr:
- // private variable for recursive calls when pretty printing, do not use.
- //
- // return:
- // a String representing the serialized version of the passed object.
- _indentStr = _indentStr || "";
- var nextIndent = (prettyPrint ? _indentStr + dojo.toJsonIndentStr : "");
- var newLine = (prettyPrint ? "\n" : "");
- var objtype = typeof(it);
- if(objtype == "undefined"){
- return "undefined";
- }else if((objtype == "number")||(objtype == "boolean")){
- return it + "";
- }else if(it === null){
- return "null";
- }
- if(dojo.isString(it)){
- return dojo._escapeString(it);
- }
- if(it.nodeType && it.cloneNode){ // isNode
- return ""; // FIXME: would something like outerHTML be better here?
- }
- // recurse
- var recurse = arguments.callee;
- // short-circuit for objects that support "json" serialization
- // if they return "self" then just pass-through...
- var newObj;
- if(typeof it.__json__ == "function"){
- newObj = it.__json__();
- if(it !== newObj){
- return recurse(newObj, prettyPrint, nextIndent);
- }
- }
- if(typeof it.json == "function"){
- newObj = it.json();
- if(it !== newObj){
- return recurse(newObj, prettyPrint, nextIndent);
- }
- }
- // array
- if(dojo.isArray(it)){
- var res = [];
- for(var i = 0; i < it.length; i++){
- var val = recurse(it[i], prettyPrint, nextIndent);
- if(typeof(val) != "string"){
- val = "undefined";
- }
- res.push(newLine + nextIndent + val);
- }
- return "[" + res.join(", ") + newLine + _indentStr + "]";
- }
- /*
- // look in the registry
- try {
- window.o = it;
- newObj = dojo.json.jsonRegistry.match(it);
- return recurse(newObj, prettyPrint, nextIndent);
- }catch(e){
- // console.debug(e);
- }
- // it's a function with no adapter, skip it
- */
- if(objtype == "function"){
- return null;
- }
- // generic object code path
- var output = [];
- for(var key in it){
- var keyStr;
- if(typeof(key) == "number"){
- keyStr = '"' + key + '"';
- }else if(typeof(key) == "string"){
- keyStr = dojo._escapeString(key);
- }else{
- // skip non-string or number keys
- continue;
- }
- val = recurse(it[key], prettyPrint, nextIndent);
- if(typeof(val) != "string"){
- // skip non-serializable values
- continue;
- }
- // FIXME: use += on Moz!!
- // MOW NOTE: using += is a pain because you have to account for the dangling comma...
- output.push(newLine + nextIndent + keyStr + ": " + val);
- }
- return "{" + output.join(", ") + newLine + _indentStr + "}";
+if(!dojo._hasResource["dojo._base.json"]){
+dojo._hasResource["dojo._base.json"]=true;
+dojo.provide("dojo._base.json");
+dojo.fromJson=function(_1){
+return eval("("+_1+")");
+};
+dojo._escapeString=function(_2){
+return ("\""+_2.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");
+};
+dojo.toJsonIndentStr="\t";
+dojo.toJson=function(it,_3,_4){
+if(it===undefined){
+return "undefined";
+}
+var _5=typeof it;
+if(_5=="number"||_5=="boolean"){
+return it+"";
+}
+if(it===null){
+return "null";
+}
+if(dojo.isString(it)){
+return dojo._escapeString(it);
+}
+var _6=arguments.callee;
+var _7;
+_4=_4||"";
+var _8=_3?_4+dojo.toJsonIndentStr:"";
+var tf=it.__json__||it.json;
+if(dojo.isFunction(tf)){
+_7=tf.call(it);
+if(it!==_7){
+return _6(_7,_3,_8);
+}
}
-
+if(it.nodeType&&it.cloneNode){
+throw new Error("Can't serialize DOM nodes");
+}
+var _9=_3?" ":"";
+var _a=_3?"\n":"";
+if(dojo.isArray(it)){
+var _b=dojo.map(it,function(_c){
+var _d=_6(_c,_3,_8);
+if(typeof _d!="string"){
+_d="undefined";
+}
+return _a+_8+_d;
+});
+return "["+_b.join(","+_9)+_a+_4+"]";
+}
+if(_5=="function"){
+return null;
}
+var _e=[],_f;
+for(_f in it){
+var _10,val;
+if(typeof _f=="number"){
+_10="\""+_f+"\"";
+}else{
+if(typeof _f=="string"){
+_10=dojo._escapeString(_f);
+}else{
+continue;
+}
+}
+val=_6(it[_f],_3,_8);
+if(typeof val!="string"){
+continue;
+}
+_e.push(_a+_8+_10+":"+_9+val);
+}
+return "{"+_e.join(","+_9)+_a+_4+"}";
+};
+}
diff --git a/js/dojo/dojo/_base/lang.js b/js/dojo/dojo/_base/lang.js
--- a/js/dojo/dojo/_base/lang.js
+++ b/js/dojo/dojo/_base/lang.js
@@ -1,252 +1,148 @@
-if(!dojo._hasResource["dojo._base.lang"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.lang"] = true;
-dojo.provide("dojo._base.lang");
-
-// Crockford (ish) functions
-
-dojo.isString = function(/*anything*/ it){
- // summary: Return true if it is a String
- return typeof it == "string" || it instanceof String; // Boolean
-}
-
-dojo.isArray = function(/*anything*/ it){
- // summary: Return true if it is an Array
- return it && it instanceof Array || typeof it == "array"; // Boolean
-}
-
-/*=====
-dojo.isFunction = function(it){
- // summary: Return true if it is a Function
- // it: anything
-}
-=====*/
-
-dojo.isFunction = (function(){
- var _isFunction = function(/*anything*/ it){
- return typeof it == "function" || it instanceof Function; // Boolean
- };
-
- return dojo.isSafari ?
- // only slow this down w/ gratuitious casting in Safari since it's what's b0rken
- function(/*anything*/ it){
- if(typeof it == "function" && it == "[object NodeList]"){ return false; }
- return _isFunction(it); // Boolean
- } : _isFunction;
-})();
-
-dojo.isObject = function(/*anything*/ it){
- // summary:
- // Returns true if it is a JavaScript object (or an Array, a Function or null)
- return it !== undefined &&
- (it === null || typeof it == "object" || dojo.isArray(it) || dojo.isFunction(it)); // Boolean
-}
-
-dojo.isArrayLike = function(/*anything*/ it){
- // summary:
- // similar to dojo.isArray() but more permissive
- // description:
- // Doesn't strongly test for "arrayness". Instead, settles for "isn't
- // a string or number and has a length property". Arguments objects
- // and DOM collections will return true when passed to
- // dojo.isArrayLike(), but will return false when passed to
- // dojo.isArray().
- // return:
- // If it walks like a duck and quicks like a duck, return true
- var d = dojo;
- return it && it !== undefined &&
- // keep out built-in constructors (Number, String, ...) which have length
- // properties
- !d.isString(it) && !d.isFunction(it) &&
- !(it.tagName && it.tagName.toLowerCase() == 'form') &&
- (d.isArray(it) || isFinite(it.length)); // Boolean
-}
-
-dojo.isAlien = function(/*anything*/ it){
- // summary:
- // Returns true if it is a built-in function or some other kind of
- // oddball that *should* report as a function but doesn't
- return it && !dojo.isFunction(it) && /\{\s*\[native code\]\s*\}/.test(String(it)); // Boolean
-}
-
-dojo.extend = function(/*Object*/ constructor, /*Object...*/ props){
- // summary:
- // Adds all properties and methods of props to constructor's
- // prototype, making them available to all instances created with
- // constructor.
- for(var i=1, l=arguments.length; i<l; i++){
- dojo._mixin(constructor.prototype, arguments[i]);
- }
- return constructor; // Object
-}
-
-dojo._hitchArgs = function(scope, method /*,...*/){
- var pre = dojo._toArray(arguments, 2);
- var named = dojo.isString(method);
- return function(){
- // arrayify arguments
- var args = dojo._toArray(arguments);
- // locate our method
- var f = named ? (scope||dojo.global)[method] : method;
- // invoke with collected args
- return f && f.apply(scope || this, pre.concat(args)); // mixed
- } // Function
-}
-
-dojo.hitch = function(/*Object*/scope, /*Function|String*/method /*,...*/){
- // summary:
- // Returns a function that will only ever execute in the a given scope.
- // This allows for easy use of object member functions
- // in callbacks and other places in which the "this" keyword may
- // otherwise not reference the expected scope.
- // Any number of default positional arguments may be passed as parameters
- // beyond "method".
- // Each of these values will be used to "placehold" (similar to curry)
- // for the hitched function.
- // scope:
- // The scope to use when method executes. If method is a string,
- // scope is also the object containing method.
- // method:
- // A function to be hitched to scope, or the name of the method in
- // scope to be hitched.
- // example:
- // | dojo.hitch(foo, "bar")();
- // runs foo.bar() in the scope of foo
- // example:
- // | dojo.hitch(foo, myFunction);
- // returns a function that runs myFunction in the scope of foo
- if(arguments.length > 2){
- return dojo._hitchArgs.apply(dojo, arguments); // Function
- }
- if(!method){
- method = scope;
- scope = null;
- }
- if(dojo.isString(method)){
- scope = scope || dojo.global;
- if(!scope[method]){ throw(['dojo.hitch: scope["', method, '"] is null (scope="', scope, '")'].join('')); }
- return function(){ return scope[method].apply(scope, arguments || []); }; // Function
- }
- return !scope ? method : function(){ return method.apply(scope, arguments || []); }; // Function
-}
-
-/*=====
-dojo.delegate = function(obj, props){
- // summary:
- // returns a new object which "looks" to obj for properties which it
- // does not have a value for. Optionally takes a bag of properties to
- // seed the returned object with initially.
- // description:
- // This is a small implementaton of the Boodman/Crockford delegation
- // pattern in JavaScript. An intermediate object constructor mediates
- // the prototype chain for the returned object, using it to delegate
- // down to obj for property lookup when object-local lookup fails.
- // This can be thought of similarly to ES4's "wrap", save that it does
- // not act on types but rather on pure objects.
- // obj:
- // The object to delegate to for properties not found directly on the
- // return object or in props.
- // props:
- // an object containing properties to assign to the returned object
- // returns:
- // an Object of anonymous type
- // example:
- // | var foo = { bar: "baz" };
- // | var thinger = dojo.delegate(foo, { thud: "xyzzy"});
- // | thinger.bar == "baz"; // delegated to foo
- // | foo.xyzzy == undefined; // by definition
- // | thinger.xyzzy == "xyzzy"; // mixed in from props
- // | foo.bar = "thonk";
- // | thinger.bar == "thonk"; // still delegated to foo's bar
-}
-=====*/
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.delegate = dojo._delegate = function(obj, props){
-
- // boodman/crockford delegation
- function TMP(){};
- TMP.prototype = obj;
- var tmp = new TMP();
- if(props){
- dojo.mixin(tmp, props);
- }
- return tmp; // Object
+if(!dojo._hasResource["dojo._base.lang"]){
+dojo._hasResource["dojo._base.lang"]=true;
+dojo.provide("dojo._base.lang");
+(function(){
+var d=dojo,_1=Object.prototype.toString;
+dojo.isString=function(it){
+return (typeof it=="string"||it instanceof String);
+};
+dojo.isArray=function(it){
+return it&&(it instanceof Array||typeof it=="array");
+};
+dojo.isFunction=function(it){
+return _1.call(it)==="[object Function]";
+};
+dojo.isObject=function(it){
+return it!==undefined&&(it===null||typeof it=="object"||d.isArray(it)||d.isFunction(it));
+};
+dojo.isArrayLike=function(it){
+return it&&it!==undefined&&!d.isString(it)&&!d.isFunction(it)&&!(it.tagName&&it.tagName.toLowerCase()=="form")&&(d.isArray(it)||isFinite(it.length));
+};
+dojo.isAlien=function(it){
+return it&&!d.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));
+};
+dojo.extend=function(_2,_3){
+for(var i=1,l=arguments.length;i<l;i++){
+d._mixin(_2.prototype,arguments[i]);
}
-
-dojo.partial = function(/*Function|String*/method /*, ...*/){
- // summary:
- // similar to hitch() except that the scope object is left to be
- // whatever the execution context eventually becomes.
- // description:
- // Calling dojo.partial is the functional equivalent of calling:
- // | dojo.hitch(null, funcName, ...);
- var arr = [ null ];
- return dojo.hitch.apply(dojo, arr.concat(dojo._toArray(arguments))); // Function
+return _2;
+};
+dojo._hitchArgs=function(_4,_5){
+var _6=d._toArray(arguments,2);
+var _7=d.isString(_5);
+return function(){
+var _8=d._toArray(arguments);
+var f=_7?(_4||d.global)[_5]:_5;
+return f&&f.apply(_4||this,_6.concat(_8));
+};
+};
+dojo.hitch=function(_9,_a){
+if(arguments.length>2){
+return d._hitchArgs.apply(d,arguments);
+}
+if(!_a){
+_a=_9;
+_9=null;
}
-
-dojo._toArray = function(/*Object*/obj, /*Number?*/offset, /*Array?*/ startWith){
- // summary:
- // Converts an array-like object (i.e. arguments, DOMCollection)
- // to an array. Returns a new Array object.
- // obj:
- // the object to "arrayify". We expect the object to have, at a
- // minimum, a length property which corresponds to integer-indexed
- // properties.
- // offset:
- // the location in obj to start iterating from. Defaults to 0. Optional.
- // startWith:
- // An array to pack with the properties of obj. If provided,
- // properties in obj are appended at the end of startWith and
- // startWith is the returned array.
- var arr = startWith||[];
- for(var x = offset || 0; x < obj.length; x++){
- arr.push(obj[x]);
- }
- return arr; // Array
+if(d.isString(_a)){
+_9=_9||d.global;
+if(!_9[_a]){
+throw (["dojo.hitch: scope[\"",_a,"\"] is null (scope=\"",_9,"\")"].join(""));
+}
+return function(){
+return _9[_a].apply(_9,arguments||[]);
+};
+}
+return !_9?_a:function(){
+return _a.apply(_9,arguments||[]);
+};
+};
+dojo.delegate=dojo._delegate=(function(){
+function _b(){
+};
+return function(_c,_d){
+_b.prototype=_c;
+var _e=new _b();
+_b.prototype=null;
+if(_d){
+d._mixin(_e,_d);
}
-
-dojo.clone = function(/*anything*/ o){
- // summary:
- // Clones objects (including DOM nodes) and all children.
- // Warning: do not clone cyclic structures.
- if(!o){ return o; }
- if(dojo.isArray(o)){
- var r = [];
- for(var i = 0; i < o.length; ++i){
- r.push(dojo.clone(o[i]));
- }
- return r; // Array
- }
- if(!dojo.isObject(o)){
- return o; /*anything*/
- }
- if(o.nodeType && o.cloneNode){ // isNode
- return o.cloneNode(true); // Node
- }
- if(o instanceof Date){
- return new Date(o.getTime()); // Date
- }
- // Generic objects
- var r = new o.constructor(); // specific to dojo.declare()'d classes!
- for(var i in o){
- if(!(i in r) || r[i] != o[i]){
- r[i] = dojo.clone(o[i]);
- }
- }
- return r; // Object
+return _e;
+};
+})();
+var _f=function(obj,_10,_11){
+return (_11||[]).concat(Array.prototype.slice.call(obj,_10||0));
+};
+var _12=function(obj,_13,_14){
+var arr=_14||[];
+for(var x=_13||0;x<obj.length;x++){
+arr.push(obj[x]);
+}
+return arr;
+};
+dojo._toArray=d.isIE?function(obj){
+return ((obj.item)?_12:_f).apply(this,arguments);
+}:_f;
+dojo.partial=function(_15){
+var arr=[null];
+return d.hitch.apply(d,arr.concat(d._toArray(arguments)));
+};
+var _16=d._extraNames,_17=_16.length,_18={};
+dojo.clone=function(o){
+if(!o||typeof o!="object"||d.isFunction(o)){
+return o;
+}
+if(o.nodeType&&"cloneNode" in o){
+return o.cloneNode(true);
+}
+if(o instanceof Date){
+return new Date(o.getTime());
}
-
-dojo.trim = function(/*String*/ str){
- // summary:
- // trims whitespaces from both sides of the string
- // description:
- // This version of trim() was selected for inclusion into the base due
- // to its compact size and relatively good performance (see Steven
- // Levithan's blog:
- // http://blog.stevenlevithan.com/archives/faster-trim-javascript).
- // The fastest but longest version of this function is located at
- // dojo.string.trim()
- return str.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); // String
+var r,i,l,s,_19;
+if(d.isArray(o)){
+r=[];
+for(i=0,l=o.length;i<l;++i){
+if(i in o){
+r.push(d.clone(o[i]));
+}
+}
+}else{
+r=o.constructor?new o.constructor():{};
+}
+for(_19 in o){
+s=o[_19];
+if(!(_19 in r)||(r[_19]!==s&&(!(_19 in _18)||_18[_19]!==s))){
+r[_19]=d.clone(s);
+}
}
-
+if(_17){
+for(i=0;i<_17;++i){
+_19=_16[i];
+s=o[_19];
+if(!(_19 in r)||(r[_19]!==s&&(!(_19 in _18)||_18[_19]!==s))){
+r[_19]=s;
+}
+}
}
+return r;
+};
+dojo.trim=String.prototype.trim?function(str){
+return str.trim();
+}:function(str){
+return str.replace(/^\s\s*/,"").replace(/\s\s*$/,"");
+};
+var _1a=/\{([^\}]+)\}/g;
+dojo.replace=function(_1b,map,_1c){
+return _1b.replace(_1c||_1a,d.isFunction(map)?map:function(_1d,k){
+return d.getObject(k,false,map);
+});
+};
+})();
+}
diff --git a/js/dojo/dojo/_base/query.js b/js/dojo/dojo/_base/query.js
--- a/js/dojo/dojo/_base/query.js
+++ b/js/dojo/dojo/_base/query.js
@@ -1,1085 +1,797 @@
-if(!dojo._hasResource["dojo._base.query"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.query"] = true;
-dojo.provide("dojo._base.query");
-dojo.require("dojo._base.NodeList");
-
/*
- dojo.query() architectural overview:
-
- dojo.query is a relatively full-featured CSS3 query library. It is
- designed to take any valid CSS3 selector and return the nodes matching
- the selector. To do this quickly, it processes queries in several
- steps, applying caching where profitable.
-
- The steps (roughly in reverse order of the way they appear in the code):
- 1.) check to see if we already have a "query dispatcher"
- - if so, use that with the given parameterization. Skip to step 4.
- 2.) attempt to determine which branch to dispatch the query to:
- - JS (optimized DOM iteration)
- - xpath (for browsers that support it and where it's fast)
- - native (not available in any browser yet)
- 3.) tokenize and convert to executable "query dispatcher"
- - this is where the lion's share of the complexity in the
- system lies. In the DOM version, the query dispatcher is
- assembled as a chain of "yes/no" test functions pertaining to
- a section of a simple query statement (".blah:nth-child(odd)"
- but not "div div", which is 2 simple statements). Individual
- statement dispatchers are cached (to prevent re-definition)
- as are entire dispatch chains (to make re-execution of the
- same query fast)
- - in the xpath path, tokenization yeilds a concatenation of
- parameterized xpath selectors. As with the DOM version, both
- simple selector blocks and overall evaluators are cached to
- prevent re-defintion
- 4.) the resulting query dispatcher is called in the passed scope (by default the top-level document)
- - for DOM queries, this results in a recursive, top-down
- evaluation of nodes based on each simple query section
- - xpath queries can, thankfully, be executed in one shot
- 5.) matched nodes are pruned to ensure they are unique
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
*/
-;(function(){
- // define everything in a closure for compressability reasons. "d" is an
- // alias to "dojo" since it's so frequently used. This seems a
- // transformation that the build system could perform on a per-file basis.
- ////////////////////////////////////////////////////////////////////////
- // Utility code
- ////////////////////////////////////////////////////////////////////////
-
- var d = dojo;
- var childNodesName = dojo.isIE ? "children" : "childNodes";
-
- var getQueryParts = function(query){
- // summary: state machine for query tokenization
- if(query.charAt(query.length-1) == ">"){
- query += " *"
- }
- query += " "; // ensure that we terminate the state machine
-
- var ts = function(s, e){
- return d.trim(query.slice(s, e));
- }
-
- // the overall data graph of the full query, as represented by queryPart objects
- var qparts = [];
- // state keeping vars
- var inBrackets = -1;
- var inParens = -1;
- var inMatchFor = -1;
- var inPseudo = -1;
- var inClass = -1;
- var inId = -1;
- var inTag = -1;
- var lc = ""; // the last character
- var cc = ""; // the current character
- var pStart;
- // iteration vars
- var x = 0; // index in the query
- var ql = query.length;
- var currentPart = null; // data structure representing the entire clause
- var _cp = null; // the current pseudo or attr matcher
-
- var endTag = function(){
- if(inTag >= 0){
- var tv = (inTag == x) ? null : ts(inTag, x).toLowerCase();
- currentPart[ (">~+".indexOf(tv) < 0)? "tag" : "oper" ] = tv;
- inTag = -1;
- }
- }
-
- var endId = function(){
- if(inId >= 0){
- currentPart.id = ts(inId, x).replace(/\\/g, "");
- inId = -1;
- }
- }
-
- var endClass = function(){
- if(inClass >= 0){
- currentPart.classes.push(ts(inClass+1, x).replace(/\\/g, ""));
- inClass = -1;
- }
- }
-
- var endAll = function(){
- endId(); endTag(); endClass();
- }
-
- for(; x<ql, lc=cc, cc=query.charAt(x); x++){
- if(lc == "\\"){ continue; }
- if(!currentPart){
- // NOTE: I hate all this alloc, but it's shorter than writing tons of if's
- pStart = x;
- currentPart = {
- query: null,
- pseudos: [],
- attrs: [],
- classes: [],
- tag: null,
- oper: null,
- id: null
- };
- inTag = x;
- }
-
- if(inBrackets >= 0){
- // look for a the close first
- if(cc == "]"){
- if(!_cp.attr){
- _cp.attr = ts(inBrackets+1, x);
- }else{
- _cp.matchFor = ts((inMatchFor||inBrackets+1), x);
- }
- var cmf = _cp.matchFor;
- if(cmf){
- if( (cmf.charAt(0) == '"') || (cmf.charAt(0) == "'") ){
- _cp.matchFor = cmf.substring(1, cmf.length-1);
- }
- }
- currentPart.attrs.push(_cp);
- _cp = null; // necessaray?
- inBrackets = inMatchFor = -1;
- }else if(cc == "="){
- var addToCc = ("|~^$*".indexOf(lc) >=0 ) ? lc : "";
- _cp.type = addToCc+cc;
- _cp.attr = ts(inBrackets+1, x-addToCc.length);
- inMatchFor = x+1;
- }
- // now look for other clause parts
- }else if(inParens >= 0){
- if(cc == ")"){
- if(inPseudo >= 0){
- _cp.value = ts(inParens+1, x);
- }
- inPseudo = inParens = -1;
- }
- }else if(cc == "#"){
- endAll();
- inId = x+1;
- }else if(cc == "."){
- endAll();
- inClass = x;
- }else if(cc == ":"){
- endAll();
- inPseudo = x;
- }else if(cc == "["){
- endAll();
- inBrackets = x;
- _cp = {
- /*=====
- attr: null, type: null, matchFor: null
- =====*/
- };
- }else if(cc == "("){
- if(inPseudo >= 0){
- _cp = {
- name: ts(inPseudo+1, x),
- value: null
- }
- currentPart.pseudos.push(_cp);
- }
- inParens = x;
- }else if(cc == " " && lc != cc){
- // note that we expect the string to be " " terminated
- endAll();
- if(inPseudo >= 0){
- currentPart.pseudos.push({ name: ts(inPseudo+1, x) });
- }
- currentPart.hasLoops = (
- currentPart.pseudos.length ||
- currentPart.attrs.length ||
- currentPart.classes.length );
- currentPart.query = ts(pStart, x);
- currentPart.tag = (currentPart["oper"]) ? null : (currentPart.tag || "*");
- qparts.push(currentPart);
- currentPart = null;
- }
- }
- return qparts;
- };
-
-
- ////////////////////////////////////////////////////////////////////////
- // XPath query code
- ////////////////////////////////////////////////////////////////////////
-
- // this array is a lookup used to generate an attribute matching function.
- // There is a similar lookup/generator list for the DOM branch with similar
- // calling semantics.
- var xPathAttrs = {
- "*=": function(attr, value){
- return "[contains(@"+attr+", '"+ value +"')]";
- },
- "^=": function(attr, value){
- return "[starts-with(@"+attr+", '"+ value +"')]";
- },
- "$=": function(attr, value){
- return "[substring(@"+attr+", string-length(@"+attr+")-"+(value.length-1)+")='"+value+"']";
- },
- "~=": function(attr, value){
- return "[contains(concat(' ',@"+attr+",' '), ' "+ value +" ')]";
- },
- "|=": function(attr, value){
- return "[contains(concat(' ',@"+attr+",' '), ' "+ value +"-')]";
- },
- "=": function(attr, value){
- return "[@"+attr+"='"+ value +"']";
- }
- };
-
- // takes a list of attribute searches, the overall query, a function to
- // generate a default matcher, and a closure-bound method for providing a
- // matching function that generates whatever type of yes/no distinguisher
- // the query method needs. The method is a bit tortured and hard to read
- // because it needs to be used in both the XPath and DOM branches.
- var handleAttrs = function( attrList,
- query,
- getDefault,
- handleMatch){
- d.forEach(query.attrs, function(attr){
- var matcher;
- // type, attr, matchFor
- if(attr.type && attrList[attr.type]){
- matcher = attrList[attr.type](attr.attr, attr.matchFor);
- }else if(attr.attr.length){
- matcher = getDefault(attr.attr);
- }
- if(matcher){ handleMatch(matcher); }
- });
- }
-
- var buildPath = function(query){
- var xpath = ".";
- var qparts = getQueryParts(d.trim(query));
- while(qparts.length){
- var tqp = qparts.shift();
- var prefix;
- // FIXME: need to add support for ~ and +
- if(tqp.oper == ">"){
- prefix = "/";
- // prefix = "/child::node()";
- tqp = qparts.shift();
- }else{
- prefix = "//";
- // prefix = "/descendant::node()"
- }
-
- // get the tag name (if any)
-
- xpath += prefix + tqp.tag;
-
- // check to see if it's got an id. Needs to come first in xpath.
- if(tqp.id){
- xpath += "[@id='"+tqp.id+"'][1]";
- }
-
- d.forEach(tqp.classes, function(cn){
- var cnl = cn.length;
- var padding = " ";
- if(cn.charAt(cnl-1) == "*"){
- padding = ""; cn = cn.substr(0, cnl-1);
- }
- xpath +=
- "[contains(concat(' ',@class,' '), ' "+
- cn + padding + "')]";
- });
-
- handleAttrs(xPathAttrs, tqp,
- function(condition){
- return "[@"+condition+"]";
- },
- function(matcher){
- xpath += matcher;
- }
- );
-
- // FIXME: need to implement pseudo-class checks!!
- };
- return xpath;
- };
-
- var _xpathFuncCache = {};
- var getXPathFunc = function(path){
- if(_xpathFuncCache[path]){
- return _xpathFuncCache[path];
- }
-
- var doc = d.doc;
- // var parent = d.body(); // FIXME
- // FIXME: don't need to memoize. The closure scope handles it for us.
- var xpath = buildPath(path);
-
- var tf = function(parent){
- // XPath query strings are memoized.
- var ret = [];
- var xpathResult;
- try{
- xpathResult = doc.evaluate(xpath, parent, null,
- // XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null);
- XPathResult.ANY_TYPE, null);
- }catch(e){
- console.debug("failure in exprssion:", xpath, "under:", parent);
- console.debug(e);
- }
- var result = xpathResult.iterateNext();
- while(result){
- ret.push(result);
- result = xpathResult.iterateNext();
- }
- return ret;
- }
- return _xpathFuncCache[path] = tf;
- };
-
- /*
- d.xPathMatch = function(query){
- // XPath based DOM query system. Handles a small subset of CSS
- // selectors, subset is identical to the non-XPath version of this
- // function.
-
- // FIXME: need to add support for alternate roots
- return getXPathFunc(query)();
- }
- */
-
- ////////////////////////////////////////////////////////////////////////
- // DOM query code
- ////////////////////////////////////////////////////////////////////////
-
- var _filtersCache = {};
- var _simpleFiltersCache = {};
-
- // the basic building block of the yes/no chaining system. agree(f1, f2)
- // generates a new function which returns the boolean results of both of
- // the passed functions to a single logical-anded result.
- var agree = function(first, second){
- if(!first){ return second; }
- if(!second){ return first; }
-
- return function(){
- return first.apply(window, arguments) && second.apply(window, arguments);
- }
- }
-
- var _filterDown = function(element, queryParts, matchArr, idx){
- var nidx = idx+1;
- var isFinal = (queryParts.length == nidx);
- var tqp = queryParts[idx];
-
- // see if we can constrain our next level to direct children
- if(tqp.oper == ">"){
- var ecn = element[childNodesName];
- if(!ecn || !ecn.length){
- return;
- }
- nidx++;
- isFinal = (queryParts.length == nidx);
- // kinda janky, too much array alloc
- var tf = getFilterFunc(queryParts[idx+1]);
- // for(var x=ecn.length-1, te; x>=0, te=ecn[x]; x--){
- for(var x=0, ecnl=ecn.length, te; x<ecnl, te=ecn[x]; x++){
- if(tf(te)){
- if(isFinal){
- matchArr.push(te);
- }else{
- _filterDown(te, queryParts, matchArr, nidx);
- }
- }
- /*
- if(x==0){
- break;
- }
- */
- }
- }
-
- // otherwise, keep going down, unless we'er at the end
- var candidates = getElementsFunc(tqp)(element);
- if(isFinal){
- while(candidates.length){
- matchArr.push(candidates.shift());
- }
- /*
- candidates.unshift(0, matchArr.length-1);
- matchArr.splice.apply(matchArr, candidates);
- */
- }else{
- // if we're not yet at the bottom, keep going!
- while(candidates.length){
- _filterDown(candidates.shift(), queryParts, matchArr, nidx);
- }
- }
- }
-
- var filterDown = function(elements, queryParts){
- var ret = [];
-
- // for every root, get the elements that match the descendant selector
- // for(var x=elements.length-1, te; x>=0, te=elements[x]; x--){
- var x = elements.length - 1, te;
- while(te = elements[x--]){
- _filterDown(te, queryParts, ret, 0);
- }
- return ret;
- }
-
- var getFilterFunc = function(q){
- // note: query can't have spaces!
- if(_filtersCache[q.query]){
- return _filtersCache[q.query];
- }
- var ff = null;
-
- // does it have a tagName component?
- if(q.tag){
- if(q.tag == "*"){
- ff = agree(ff,
- function(elem){
- return (elem.nodeType == 1);
- }
- );
- }else{
- // tag name match
- ff = agree(ff,
- function(elem){
- return (
- (elem.nodeType == 1) &&
- (q.tag == elem.tagName.toLowerCase())
- );
- // return isTn;
- }
- );
- }
- }
-
- // does the node have an ID?
- if(q.id){
- ff = agree(ff,
- function(elem){
- return (
- (elem.nodeType == 1) &&
- (elem.id == q.id)
- );
- }
- );
- }
-
- if(q.hasLoops){
- // if we have other query param parts, make sure we add them to the
- // filter chain
- ff = agree(ff, getSimpleFilterFunc(q));
- }
-
- return _filtersCache[q.query] = ff;
- }
-
- var getNodeIndex = function(node){
- // NOTE:
- // we could have a more accurate caching mechanism by invalidating
- // caches after the query has finished, but I think that'd lead to
- // significantly more cache churn than the cache would provide
- // value for in the common case. Generally, we're more
- // conservative (and therefore, more accurate) than jQuery and
- // DomQuery WRT node node indexes, but there may be corner cases
- // in which we fall down. How much we care about them is TBD.
-
- var pn = node.parentNode;
- var pnc = pn.childNodes;
-
- // check to see if we can trust the cache. If not, re-key the whole
- // thing and return our node match from that.
-
- var nidx = -1;
- var child = pn.firstChild;
- if(!child){
- return nidx;
- }
-
- var ci = node["__cachedIndex"];
- var cl = pn["__cachedLength"];
-
- // only handle cache building if we've gone out of sync
- if(((typeof cl == "number")&&(cl != pnc.length))||(typeof ci != "number")){
- // rip though the whole set, building cache indexes as we go
- pn["__cachedLength"] = pnc.length;
- var idx = 1;
- do{
- // we only assign indexes for nodes with nodeType == 1, as per:
- // http://www.w3.org/TR/css3-selectors/#nth-child-pseudo
- // only elements are counted in the search order, and they
- // begin at 1 for the first child's index
-
- if(child === node){
- nidx = idx;
- }
- if(child.nodeType == 1){
- child["__cachedIndex"] = idx;
- idx++;
- }
- child = child.nextSibling;
- }while(child);
- }else{
- // NOTE:
- // could be incorrect in some cases (node swaps involving the
- // passed node, etc.), but we ignore those due to the relative
- // unlikelihood of that occuring
- nidx = ci;
- }
- return nidx;
- }
-
- var firedCount = 0;
-
- var blank = "";
- var _getAttr = function(elem, attr){
- if(attr == "class"){
- return elem.className || blank;
- }
- if(attr == "for"){
- return elem.htmlFor || blank;
- }
- return elem.getAttribute(attr, 2) || blank;
- }
-
- var attrs = {
- "*=": function(attr, value){
- return function(elem){
- // E[foo*="bar"]
- // an E element whose "foo" attribute value contains
- // the substring "bar"
- return (_getAttr(elem, attr).indexOf(value)>=0);
- }
- },
- "^=": function(attr, value){
- // E[foo^="bar"]
- // an E element whose "foo" attribute value begins exactly
- // with the string "bar"
- return function(elem){
- return (_getAttr(elem, attr).indexOf(value)==0);
- }
- },
- "$=": function(attr, value){
- // E[foo$="bar"]
- // an E element whose "foo" attribute value ends exactly
- // with the string "bar"
- var tval = " "+value;
- return function(elem){
- var ea = " "+_getAttr(elem, attr);
- return (ea.lastIndexOf(value)==(ea.length-value.length));
- }
- },
- "~=": function(attr, value){
- // E[foo~="bar"]
- // an E element whose "foo" attribute value is a list of
- // space-separated values, one of which is exactly equal
- // to "bar"
-
- // return "[contains(concat(' ',@"+attr+",' '), ' "+ value +" ')]";
- var tval = " "+value+" ";
- return function(elem){
- var ea = " "+_getAttr(elem, attr)+" ";
- return (ea.indexOf(tval)>=0);
- }
- },
- "|=": function(attr, value){
- // E[hreflang|="en"]
- // an E element whose "hreflang" attribute has a
- // hyphen-separated list of values beginning (from the
- // left) with "en"
- var valueDash = " "+value+"-";
- return function(elem){
- var ea = " "+(elem.getAttribute(attr, 2) || "");
- return (
- (ea == value) ||
- (ea.indexOf(valueDash)==0)
- );
- }
- },
- "=": function(attr, value){
- return function(elem){
- return (_getAttr(elem, attr) == value);
- }
- }
- };
-
- var pseudos = {
- "first-child": function(name, condition){
- return function(elem){
- if(elem.nodeType != 1){ return false; }
- // check to see if any of the previous siblings are elements
- var fc = elem.previousSibling;
- while(fc && (fc.nodeType != 1)){
- fc = fc.previousSibling;
- }
- return (!fc);
- }
- },
- "last-child": function(name, condition){
- return function(elem){
- if(elem.nodeType != 1){ return false; }
- // check to see if any of the next siblings are elements
- var nc = elem.nextSibling;
- while(nc && (nc.nodeType != 1)){
- nc = nc.nextSibling;
- }
- return (!nc);
- }
- },
- "empty": function(name, condition){
- return function(elem){
- // DomQuery and jQuery get this wrong, oddly enough.
- // The CSS 3 selectors spec is pretty explicit about
- // it, too.
- var cn = elem.childNodes;
- var cnl = elem.childNodes.length;
- // if(!cnl){ return true; }
- for(var x=cnl-1; x >= 0; x--){
- var nt = cn[x].nodeType;
- if((nt == 1)||(nt == 3)){ return false; }
- }
- return true;
- }
- },
- /* non standard!
- "contains": function(name, condition){
- return function(elem){
- // FIXME: I dislike this version of "contains", as
- // whimsical attribute could set it off. An inner-text
- // based version might be more accurate, but since
- // jQuery and DomQuery also potentially get this wrong,
- // I'm leaving it for now.
- return (elem.innerHTML.indexOf(condition) >= 0);
- }
- },
- */
- "not": function(name, condition){
- var ntf = getFilterFunc(getQueryParts(condition)[0]);
- return function(elem){
- return (!ntf(elem));
- }
- },
- "nth-child": function(name, condition){
- var pi = parseInt;
- if(condition == "odd"){
- return function(elem){
- return (
- ((getNodeIndex(elem)) % 2) == 1
- );
- }
- }else if((condition == "2n")||
- (condition == "even")){
- return function(elem){
- return ((getNodeIndex(elem) % 2) == 0);
- }
- }else if(condition.indexOf("0n+") == 0){
- var ncount = pi(condition.substr(3));
- return function(elem){
- return (elem.parentNode[childNodesName][ncount-1] === elem);
- }
- }else if( (condition.indexOf("n+") > 0) &&
- (condition.length > 3) ){
- var tparts = condition.split("n+", 2);
- var pred = pi(tparts[0]);
- var idx = pi(tparts[1]);
- return function(elem){
- return ((getNodeIndex(elem) % pred) == idx);
- }
- }else if(condition.indexOf("n") == -1){
- var ncount = pi(condition);
- return function(elem){
- return (getNodeIndex(elem) == ncount);
- }
- }
- }
- };
-
- var defaultGetter = (d.isIE) ? function(cond){
- var clc = cond.toLowerCase();
- return function(elem){
- return elem[cond]||elem[clc];
- }
- } : function(cond){
- return function(elem){
- return (elem && elem.getAttribute && elem.hasAttribute(cond));
- }
- };
-
- var getSimpleFilterFunc = function(query){
-
- var fcHit = (_simpleFiltersCache[query.query]||_filtersCache[query.query]);
- if(fcHit){ return fcHit; }
-
- var ff = null;
-
- // the only case where we'll need the tag name is if we came from an ID query
- if(query.id){ // do we have an ID component?
- if(query.tag != "*"){
- ff = agree(ff, function(elem){
- return (elem.tagName.toLowerCase() == query.tag);
- });
- }
- }
-
- // if there's a class in our query, generate a match function for it
- d.forEach(query.classes, function(cname, idx, arr){
- // get the class name
- var isWildcard = cname.charAt(cname.length-1) == "*";
- if(isWildcard){
- cname = cname.substr(0, cname.length-1);
- }
- // I dislike the regex thing, even if memozied in a cache, but it's VERY short
- var re = new RegExp("(?:^|\\s)" + cname + (isWildcard ? ".*" : "") + "(?:\\s|$)");
- ff = agree(ff, function(elem){
- return re.test(elem.className);
- });
- ff.count = idx;
- });
-
- d.forEach(query.pseudos, function(pseudo){
- if(pseudos[pseudo.name]){
- ff = agree(ff, pseudos[pseudo.name](pseudo.name, pseudo.value));
- }
- });
-
- handleAttrs(attrs, query, defaultGetter,
- function(tmatcher){ ff = agree(ff, tmatcher); }
- );
- if(!ff){
- ff = function(){ return true; };
- }
- return _simpleFiltersCache[query.query] = ff;
- }
-
- var _getElementsFuncCache = { };
-
- var getElementsFunc = function(query, root){
- var fHit = _getElementsFuncCache[query.query];
- if(fHit){ return fHit; }
-
- // NOTE: this function is in the fast path! not memoized!!!
-
- // the query doesn't contain any spaces, so there's only so many
- // things it could be
-
- if(query.id && !query.hasLoops && !query.tag){
- // ID-only query. Easy.
- return _getElementsFuncCache[query.query] = function(root){
- // FIXME: if root != document, check for parenting!
- return [ d.byId(query.id) ];
- }
- }
-
- var filterFunc = getSimpleFilterFunc(query);
-
- var retFunc;
- if(query.tag && query.id && !query.hasLoops){
- // we got a filtered ID search (e.g., "h4#thinger")
- retFunc = function(root){
- var te = d.byId(query.id);
- if(filterFunc(te)){
- return [ te ];
- }
- }
- }else{
- var tret;
-
- if(!query.hasLoops){
- // it's just a plain-ol elements-by-tag-name query from the root
- retFunc = function(root){
- var ret = [];
- var te, x=0, tret = root.getElementsByTagName(query.tag);
- while(te=tret[x++]){
- ret.push(te);
- }
- return ret;
- }
- }else{
- retFunc = function(root){
- var ret = [];
- var te, x=0, tret = root.getElementsByTagName(query.tag);
- while(te=tret[x++]){
- if(filterFunc(te)){
- ret.push(te);
- }
- }
- return ret;
- }
- }
- }
- return _getElementsFuncCache[query.query] = retFunc;
- }
-
- var _partsCache = {};
-
- ////////////////////////////////////////////////////////////////////////
- // the query runner
- ////////////////////////////////////////////////////////////////////////
-
- // this is the second level of spliting, from full-length queries (e.g.,
- // "div.foo .bar") into simple query expressions (e.g., ["div.foo",
- // ".bar"])
- var _queryFuncCache = {
- "*": d.isIE ?
- function(root){
- return root.all;
- } :
- function(root){
- return root.getElementsByTagName("*");
- },
- ">": function(root){
- var ret = [];
- var te, x=0, tret = root[childNodesName];
- while(te=tret[x++]){
- if(te.nodeType == 1){ ret.push(te); }
- }
- return ret;
- }
- };
-
- var getStepQueryFunc = function(query){
- // if it's trivial, get a fast-path dispatcher
- var qparts = getQueryParts(d.trim(query));
- // if(query[query.length-1] == ">"){ query += " *"; }
- if(qparts.length == 1){
- var tt = getElementsFunc(qparts[0]);
- tt.nozip = true;
- return tt;
- }
-
- // otherwise, break it up and return a runner that iterates over the parts recursively
- var sqf = function(root){
- var localQueryParts = qparts.slice(0); // clone the src arr
- var candidates;
- if(localQueryParts[0].oper == ">"){
- candidates = [ root ];
- // root = document;
- }else{
- candidates = getElementsFunc(localQueryParts.shift())(root);
- }
- return filterDown(candidates, localQueryParts);
- }
- return sqf;
- }
-
- // a specialized method that implements our primoridal "query optimizer".
- // This allows us to dispatch queries to the fastest subsystem we can get.
- var _getQueryFunc = (
- // NOTE:
- // XPath on the Webkit nighlies is slower than it's DOM iteration
- // for most test cases
- // FIXME:
- // we should try to capture some runtime speed data for each query
- // function to determine on the fly if we should stick w/ the
- // potentially optimized variant or if we should try something
- // new.
- (document["evaluate"] && !d.isSafari) ?
- function(query){
- // has xpath support that's faster than DOM
- var qparts = query.split(" ");
- // can we handle it?
- if( (document["evaluate"])&&
- (query.indexOf(":") == -1)&&
- (
- (true) // ||
- // (query.indexOf("[") == -1) ||
- // (query.indexOf("=") == -1)
- )
- ){
- // dojo.debug(query);
- // should we handle it?
-
- // kind of a lame heuristic, but it works
- if(
- // a "div div div" style query
- ((qparts.length > 2)&&(query.indexOf(">") == -1))||
- // or something else with moderate complexity. kinda janky
- (qparts.length > 3)||
- (query.indexOf("[")>=0)||
- // or if it's a ".thinger" query
- ((1 == qparts.length)&&(0 <= query.indexOf(".")))
-
- ){
- // use get and cache a xpath runner for this selector
- return getXPathFunc(query);
- }
- }
-
- // fallthrough
- return getStepQueryFunc(query);
- } : getStepQueryFunc
- );
- // uncomment to disable XPath for testing and tuning the DOM path
- // _getQueryFunc = getStepQueryFunc;
-
- // FIXME: we've got problems w/ the NodeList query()/filter() functions if we go XPath for everything
-
- // uncomment to disable DOM queries for testing and tuning XPath
- // _getQueryFunc = getXPathFunc;
-
- // this is the primary caching for full-query results. The query dispatcher
- // functions are generated here and then pickled for hash lookup in the
- // future
- var getQueryFunc = function(query){
- // return a cached version if one is available
- if(_queryFuncCache[query]){ return _queryFuncCache[query]; }
- if(0 > query.indexOf(",")){
- // if it's not a compound query (e.g., ".foo, .bar"), cache and return a dispatcher
- return _queryFuncCache[query] = _getQueryFunc(query);
- }else{
- // if it's a complex query, break it up into it's constituent parts
- // and return a dispatcher that will merge the parts when run
-
- // var parts = query.split(", ");
- var parts = query.split(/\s*,\s*/);
- var tf = function(root){
- var pindex = 0; // avoid array alloc for every invocation
- var ret = [];
- var tp;
- while(tp = parts[pindex++]){
- ret = ret.concat(_getQueryFunc(tp, tp.indexOf(" "))(root));
- }
- return ret;
- }
- // ...cache and return
- return _queryFuncCache[query] = tf;
- }
- }
-
- // FIXME:
- // Dean's new Base2 uses a system whereby queries themselves note if
- // they'll need duplicate filtering. We need to get on that plan!!
-
- // attempt to efficiently determine if an item in a list is a dupe,
- // returning a list of "uniques", hopefully in doucment order
- var _zipIdx = 0;
- var _zip = function(arr){
- if(arr && arr.nozip){ return d.NodeList._wrap(arr); }
- var ret = new d.NodeList();
- if(!arr){ return ret; }
- if(arr[0]){
- ret.push(arr[0]);
- }
- if(arr.length < 2){ return ret; }
- _zipIdx++;
- arr[0]["_zipIdx"] = _zipIdx;
- for(var x=1, te; te = arr[x]; x++){
- if(arr[x]["_zipIdx"] != _zipIdx){
- ret.push(te);
- }
- te["_zipIdx"] = _zipIdx;
- }
- // FIXME: should we consider stripping these properties?
- return ret;
- }
-
- // the main exectuor
- d.query = function(query, root){
- // summary:
- // returns nodes which match the given CSS3 selector, searching the
- // entire document by default but optionally taking a node to scope
- // the search by. Returns an instance of dojo.NodeList.
- // description:
- // dojo.query() is the swiss army knife of DOM node manipulation in
- // Dojo. Much like Prototype's "$$" (bling-bling) function or JQuery's
- // "$" function, dojo.query provides robust, high-performance
- // CSS-based node selector support with the option of scoping searches
- // to a particular sub-tree of a document.
- //
- // Supported Selectors:
- // --------------------
- //
- // dojo.query() supports a rich set of CSS3 selectors, including:
- //
- // * class selectors (e.g., ".foo")
- // * node type selectors like "span"
- // * " " descendant selectors
- // * ">" child element selectors
- // * "#foo" style ID selectors
- // * "*" universal selector
- // * attribute queries:
- // * "[foo]" attribute presence selector
- // * "[foo='bar']" attribute value exact match
- // * "[foo~='bar']" attribute value list item match
- // * "[foo^='bar']" attribute start match
- // * "[foo$='bar']" attribute end match
- // * "[foo*='bar']" attribute substring match
- // * ":first-child", ":last-child" positional selectors
- // * ":nth-child(n)", ":nth-child(2n+1)" style positional calculations
- // * ":nth-child(even)", ":nth-child(odd)" positional selectors
- // * ":not(...)" negation pseudo selectors
- //
- // Any legal combination of those selector types as per the CSS 3 sepc
- // will work with dojo.query(), including compound selectors (","
- // delimited). Very complex and useful searches can be constructed
- // with this palette of selectors and when combined with functions for
- // maniplation presented by dojo.NodeList, many types of DOM
- // manipulation operations become very straightforward.
- //
- // Unsupported Selectors:
- // --------------------
- //
- // While dojo.query handles many CSS3 selectors, some fall outside of
- // what's resaonable for a programmatic node querying engine to
- // handle. Currently unsupported selectors include:
- //
- // * namespace-differentiated selectors of any form
- // * "~", the immediately preceeded-by sibling selector
- // * "+", the preceeded-by sibling selector
- // * all "::" pseduo-element selectors
- // * certain pseduo-selectors which don't get a lot of day-to-day use:
- // * :root, :lang(), :target, :focus
- // * all visual and state selectors:
- // * :root, :active, :hover, :visisted, :link, :enabled, :disabled, :checked
- // * :*-of-type pseudo selectors
- //
- // dojo.query and XML Documents:
- // -----------------------------
- // FIXME
- //
- // query: String
- // The CSS3 expression to match against. For details on the syntax of
- // CSS3 selectors, see:
- // http://www.w3.org/TR/css3-selectors/#selectors
- // root: String|DOMNode?
- // A node (or string ID of a node) to scope the search from. Optional.
- // returns:
- // An instance of dojo.NodeList. Many methods are available on
- // NodeLists for searching, iterating, manipulating, and handling
- // events on the matched nodes in the returned list.
-
- // return is always an array
- // NOTE: elementsById is not currently supported
- // NOTE: ignores xpath-ish queries for now
- if(query.constructor == d.NodeList){
- return query;
- }
- if(!d.isString(query)){
- return new d.NodeList(query); // dojo.NodeList
- }
- if(d.isString(root)){
- root = d.byId(root);
- }
-
- // FIXME: should support more methods on the return than the stock array.
- return _zip(getQueryFunc(query)(root||d.doc));
- }
-
- /*
- // exposing these was a mistake
- d.query.attrs = attrs;
- d.query.pseudos = pseudos;
- */
-
- // one-off function for filtering a NodeList based on a simple selector
- d._filterQueryResult = function(nodeList, simpleFilter){
- var tnl = new d.NodeList();
- var ff = (simpleFilter) ? getFilterFunc(getQueryParts(simpleFilter)[0]) : function(){ return true; };
- for(var x=0, te; te = nodeList[x]; x++){
- if(ff(te)){ tnl.push(te); }
- }
- return tnl;
- }
-})();
-
+if(!dojo._hasResource["dojo._base.query"]){
+dojo._hasResource["dojo._base.query"]=true;
+if(typeof dojo!="undefined"){
+dojo.provide("dojo._base.query");
+dojo.require("dojo._base.NodeList");
+dojo.require("dojo._base.lang");
+}
+(function(d){
+var _1=d.trim;
+var _2=d.forEach;
+var _3=d._NodeListCtor=d.NodeList;
+var _4=function(){
+return d.doc;
+};
+var _5=((d.isWebKit||d.isMozilla)&&((_4().compatMode)=="BackCompat"));
+var _6=!!_4().firstChild["children"]?"children":"childNodes";
+var _7=">~+";
+var _8=false;
+var _9=function(){
+return true;
+};
+var _a=function(_b){
+if(_7.indexOf(_b.slice(-1))>=0){
+_b+=" * ";
+}else{
+_b+=" ";
+}
+var ts=function(s,e){
+return _1(_b.slice(s,e));
+};
+var _c=[];
+var _d=-1,_e=-1,_f=-1,_10=-1,_11=-1,_12=-1,_13=-1,lc="",cc="",_14;
+var x=0,ql=_b.length,_15=null,_16=null;
+var _17=function(){
+if(_13>=0){
+var tv=(_13==x)?null:ts(_13,x);
+_15[(_7.indexOf(tv)<0)?"tag":"oper"]=tv;
+_13=-1;
+}
+};
+var _18=function(){
+if(_12>=0){
+_15.id=ts(_12,x).replace(/\\/g,"");
+_12=-1;
+}
+};
+var _19=function(){
+if(_11>=0){
+_15.classes.push(ts(_11+1,x).replace(/\\/g,""));
+_11=-1;
+}
+};
+var _1a=function(){
+_18();
+_17();
+_19();
+};
+var _1b=function(){
+_1a();
+if(_10>=0){
+_15.pseudos.push({name:ts(_10+1,x)});
+}
+_15.loops=(_15.pseudos.length||_15.attrs.length||_15.classes.length);
+_15.oquery=_15.query=ts(_14,x);
+_15.otag=_15.tag=(_15["oper"])?null:(_15.tag||"*");
+if(_15.tag){
+_15.tag=_15.tag.toUpperCase();
+}
+if(_c.length&&(_c[_c.length-1].oper)){
+_15.infixOper=_c.pop();
+_15.query=_15.infixOper.query+" "+_15.query;
+}
+_c.push(_15);
+_15=null;
+};
+for(;lc=cc,cc=_b.charAt(x),x<ql;x++){
+if(lc=="\\"){
+continue;
+}
+if(!_15){
+_14=x;
+_15={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){
+return (_8)?this.otag:this.tag;
+}};
+_13=x;
+}
+if(_d>=0){
+if(cc=="]"){
+if(!_16.attr){
+_16.attr=ts(_d+1,x);
+}else{
+_16.matchFor=ts((_f||_d+1),x);
+}
+var cmf=_16.matchFor;
+if(cmf){
+if((cmf.charAt(0)=="\"")||(cmf.charAt(0)=="'")){
+_16.matchFor=cmf.slice(1,-1);
+}
+}
+_15.attrs.push(_16);
+_16=null;
+_d=_f=-1;
+}else{
+if(cc=="="){
+var _1c=("|~^$*".indexOf(lc)>=0)?lc:"";
+_16.type=_1c+cc;
+_16.attr=ts(_d+1,x-_1c.length);
+_f=x+1;
+}
+}
+}else{
+if(_e>=0){
+if(cc==")"){
+if(_10>=0){
+_16.value=ts(_e+1,x);
+}
+_10=_e=-1;
+}
+}else{
+if(cc=="#"){
+_1a();
+_12=x+1;
+}else{
+if(cc=="."){
+_1a();
+_11=x;
+}else{
+if(cc==":"){
+_1a();
+_10=x;
+}else{
+if(cc=="["){
+_1a();
+_d=x;
+_16={};
+}else{
+if(cc=="("){
+if(_10>=0){
+_16={name:ts(_10+1,x),value:null};
+_15.pseudos.push(_16);
+}
+_e=x;
+}else{
+if((cc==" ")&&(lc!=cc)){
+_1b();
+}
+}
+}
+}
+}
+}
+}
+}
+}
+return _c;
+};
+var _1d=function(_1e,_1f){
+if(!_1e){
+return _1f;
+}
+if(!_1f){
+return _1e;
+}
+return function(){
+return _1e.apply(window,arguments)&&_1f.apply(window,arguments);
+};
+};
+var _20=function(i,arr){
+var r=arr||[];
+if(i){
+r.push(i);
+}
+return r;
+};
+var _21=function(n){
+return (1==n.nodeType);
+};
+var _22="";
+var _23=function(_24,_25){
+if(!_24){
+return _22;
+}
+if(_25=="class"){
+return _24.className||_22;
+}
+if(_25=="for"){
+return _24.htmlFor||_22;
+}
+if(_25=="style"){
+return _24.style.cssText||_22;
+}
+return (_8?_24.getAttribute(_25):_24.getAttribute(_25,2))||_22;
+};
+var _26={"*=":function(_27,_28){
+return function(_29){
+return (_23(_29,_27).indexOf(_28)>=0);
+};
+},"^=":function(_2a,_2b){
+return function(_2c){
+return (_23(_2c,_2a).indexOf(_2b)==0);
+};
+},"$=":function(_2d,_2e){
+var _2f=" "+_2e;
+return function(_30){
+var ea=" "+_23(_30,_2d);
+return (ea.lastIndexOf(_2e)==(ea.length-_2e.length));
+};
+},"~=":function(_31,_32){
+var _33=" "+_32+" ";
+return function(_34){
+var ea=" "+_23(_34,_31)+" ";
+return (ea.indexOf(_33)>=0);
+};
+},"|=":function(_35,_36){
+var _37=" "+_36+"-";
+return function(_38){
+var ea=" "+_23(_38,_35);
+return ((ea==_36)||(ea.indexOf(_37)==0));
+};
+},"=":function(_39,_3a){
+return function(_3b){
+return (_23(_3b,_39)==_3a);
+};
+}};
+var _3c=(typeof _4().firstChild.nextElementSibling=="undefined");
+var _3d=!_3c?"nextElementSibling":"nextSibling";
+var _3e=!_3c?"previousElementSibling":"previousSibling";
+var _3f=(_3c?_21:_9);
+var _40=function(_41){
+while(_41=_41[_3e]){
+if(_3f(_41)){
+return false;
+}
+}
+return true;
+};
+var _42=function(_43){
+while(_43=_43[_3d]){
+if(_3f(_43)){
+return false;
+}
+}
+return true;
+};
+var _44=function(_45){
+var _46=_45.parentNode;
+var i=0,_47=_46[_6],ci=(_45["_i"]||-1),cl=(_46["_l"]||-1);
+if(!_47){
+return -1;
+}
+var l=_47.length;
+if(cl==l&&ci>=0&&cl>=0){
+return ci;
+}
+_46["_l"]=l;
+ci=-1;
+for(var te=_46["firstElementChild"]||_46["firstChild"];te;te=te[_3d]){
+if(_3f(te)){
+te["_i"]=++i;
+if(_45===te){
+ci=i;
+}
+}
+}
+return ci;
+};
+var _48=function(_49){
+return !((_44(_49))%2);
+};
+var _4a=function(_4b){
+return ((_44(_4b))%2);
+};
+var _4c={"checked":function(_4d,_4e){
+return function(_4f){
+return !!("checked" in _4f?_4f.checked:_4f.selected);
+};
+},"first-child":function(){
+return _40;
+},"last-child":function(){
+return _42;
+},"only-child":function(_50,_51){
+return function(_52){
+if(!_40(_52)){
+return false;
+}
+if(!_42(_52)){
+return false;
+}
+return true;
+};
+},"empty":function(_53,_54){
+return function(_55){
+var cn=_55.childNodes;
+var cnl=_55.childNodes.length;
+for(var x=cnl-1;x>=0;x--){
+var nt=cn[x].nodeType;
+if((nt===1)||(nt==3)){
+return false;
+}
+}
+return true;
+};
+},"contains":function(_56,_57){
+var cz=_57.charAt(0);
+if(cz=="\""||cz=="'"){
+_57=_57.slice(1,-1);
+}
+return function(_58){
+return (_58.innerHTML.indexOf(_57)>=0);
+};
+},"not":function(_59,_5a){
+var p=_a(_5a)[0];
+var _5b={el:1};
+if(p.tag!="*"){
+_5b.tag=1;
+}
+if(!p.classes.length){
+_5b.classes=1;
+}
+var ntf=_5c(p,_5b);
+return function(_5d){
+return (!ntf(_5d));
+};
+},"nth-child":function(_5e,_5f){
+var pi=parseInt;
+if(_5f=="odd"){
+return _4a;
+}else{
+if(_5f=="even"){
+return _48;
+}
+}
+if(_5f.indexOf("n")!=-1){
+var _60=_5f.split("n",2);
+var _61=_60[0]?((_60[0]=="-")?-1:pi(_60[0])):1;
+var idx=_60[1]?pi(_60[1]):0;
+var lb=0,ub=-1;
+if(_61>0){
+if(idx<0){
+idx=(idx%_61)&&(_61+(idx%_61));
+}else{
+if(idx>0){
+if(idx>=_61){
+lb=idx-idx%_61;
+}
+idx=idx%_61;
+}
+}
+}else{
+if(_61<0){
+_61*=-1;
+if(idx>0){
+ub=idx;
+idx=idx%_61;
+}
+}
+}
+if(_61>0){
+return function(_62){
+var i=_44(_62);
+return (i>=lb)&&(ub<0||i<=ub)&&((i%_61)==idx);
+};
+}else{
+_5f=idx;
+}
+}
+var _63=pi(_5f);
+return function(_64){
+return (_44(_64)==_63);
+};
+}};
+var _65=(d.isIE)?function(_66){
+var clc=_66.toLowerCase();
+if(clc=="class"){
+_66="className";
+}
+return function(_67){
+return (_8?_67.getAttribute(_66):_67[_66]||_67[clc]);
+};
+}:function(_68){
+return function(_69){
+return (_69&&_69.getAttribute&&_69.hasAttribute(_68));
+};
+};
+var _5c=function(_6a,_6b){
+if(!_6a){
+return _9;
+}
+_6b=_6b||{};
+var ff=null;
+if(!("el" in _6b)){
+ff=_1d(ff,_21);
}
+if(!("tag" in _6b)){
+if(_6a.tag!="*"){
+ff=_1d(ff,function(_6c){
+return (_6c&&(_6c.tagName==_6a.getTag()));
+});
+}
+}
+if(!("classes" in _6b)){
+_2(_6a.classes,function(_6d,idx,arr){
+var re=new RegExp("(?:^|\\s)"+_6d+"(?:\\s|$)");
+ff=_1d(ff,function(_6e){
+return re.test(_6e.className);
+});
+ff.count=idx;
+});
+}
+if(!("pseudos" in _6b)){
+_2(_6a.pseudos,function(_6f){
+var pn=_6f.name;
+if(_4c[pn]){
+ff=_1d(ff,_4c[pn](pn,_6f.value));
+}
+});
+}
+if(!("attrs" in _6b)){
+_2(_6a.attrs,function(_70){
+var _71;
+var a=_70.attr;
+if(_70.type&&_26[_70.type]){
+_71=_26[_70.type](a,_70.matchFor);
+}else{
+if(a.length){
+_71=_65(a);
+}
+}
+if(_71){
+ff=_1d(ff,_71);
+}
+});
+}
+if(!("id" in _6b)){
+if(_6a.id){
+ff=_1d(ff,function(_72){
+return (!!_72&&(_72.id==_6a.id));
+});
+}
+}
+if(!ff){
+if(!("default" in _6b)){
+ff=_9;
+}
+}
+return ff;
+};
+var _73=function(_74){
+return function(_75,ret,bag){
+while(_75=_75[_3d]){
+if(_3c&&(!_21(_75))){
+continue;
+}
+if((!bag||_76(_75,bag))&&_74(_75)){
+ret.push(_75);
+}
+break;
+}
+return ret;
+};
+};
+var _77=function(_78){
+return function(_79,ret,bag){
+var te=_79[_3d];
+while(te){
+if(_3f(te)){
+if(bag&&!_76(te,bag)){
+break;
+}
+if(_78(te)){
+ret.push(te);
+}
+}
+te=te[_3d];
+}
+return ret;
+};
+};
+var _7a=function(_7b){
+_7b=_7b||_9;
+return function(_7c,ret,bag){
+var te,x=0,_7d=_7c[_6];
+while(te=_7d[x++]){
+if(_3f(te)&&(!bag||_76(te,bag))&&(_7b(te,x))){
+ret.push(te);
+}
+}
+return ret;
+};
+};
+var _7e=function(_7f,_80){
+var pn=_7f.parentNode;
+while(pn){
+if(pn==_80){
+break;
+}
+pn=pn.parentNode;
+}
+return !!pn;
+};
+var _81={};
+var _82=function(_83){
+var _84=_81[_83.query];
+if(_84){
+return _84;
+}
+var io=_83.infixOper;
+var _85=(io?io.oper:"");
+var _86=_5c(_83,{el:1});
+var qt=_83.tag;
+var _87=("*"==qt);
+var ecs=_4()["getElementsByClassName"];
+if(!_85){
+if(_83.id){
+_86=(!_83.loops&&_87)?_9:_5c(_83,{el:1,id:1});
+_84=function(_88,arr){
+var te=d.byId(_83.id,(_88.ownerDocument||_88));
+if(!te||!_86(te)){
+return;
+}
+if(9==_88.nodeType){
+return _20(te,arr);
+}else{
+if(_7e(te,_88)){
+return _20(te,arr);
+}
+}
+};
+}else{
+if(ecs&&/\{\s*\[native code\]\s*\}/.test(String(ecs))&&_83.classes.length&&!_5){
+_86=_5c(_83,{el:1,classes:1,id:1});
+var _89=_83.classes.join(" ");
+_84=function(_8a,arr,bag){
+var ret=_20(0,arr),te,x=0;
+var _8b=_8a.getElementsByClassName(_89);
+while((te=_8b[x++])){
+if(_86(te,_8a)&&_76(te,bag)){
+ret.push(te);
+}
+}
+return ret;
+};
+}else{
+if(!_87&&!_83.loops){
+_84=function(_8c,arr,bag){
+var ret=_20(0,arr),te,x=0;
+var _8d=_8c.getElementsByTagName(_83.getTag());
+while((te=_8d[x++])){
+if(_76(te,bag)){
+ret.push(te);
+}
+}
+return ret;
+};
+}else{
+_86=_5c(_83,{el:1,tag:1,id:1});
+_84=function(_8e,arr,bag){
+var ret=_20(0,arr),te,x=0;
+var _8f=_8e.getElementsByTagName(_83.getTag());
+while((te=_8f[x++])){
+if(_86(te,_8e)&&_76(te,bag)){
+ret.push(te);
+}
+}
+return ret;
+};
+}
+}
+}
+}else{
+var _90={el:1};
+if(_87){
+_90.tag=1;
+}
+_86=_5c(_83,_90);
+if("+"==_85){
+_84=_73(_86);
+}else{
+if("~"==_85){
+_84=_77(_86);
+}else{
+if(">"==_85){
+_84=_7a(_86);
+}
+}
+}
+}
+return _81[_83.query]=_84;
+};
+var _91=function(_92,_93){
+var _94=_20(_92),qp,x,te,qpl=_93.length,bag,ret;
+for(var i=0;i<qpl;i++){
+ret=[];
+qp=_93[i];
+x=_94.length-1;
+if(x>0){
+bag={};
+ret.nozip=true;
+}
+var gef=_82(qp);
+for(var j=0;(te=_94[j]);j++){
+gef(te,ret,bag);
+}
+if(!ret.length){
+break;
+}
+_94=ret;
+}
+return ret;
+};
+var _95={},_96={};
+var _97=function(_98){
+var _99=_a(_1(_98));
+if(_99.length==1){
+var tef=_82(_99[0]);
+return function(_9a){
+var r=tef(_9a,new _3());
+if(r){
+r.nozip=true;
+}
+return r;
+};
+}
+return function(_9b){
+return _91(_9b,_99);
+};
+};
+var nua=navigator.userAgent;
+var wk="WebKit/";
+var _9c=(d.isWebKit&&(nua.indexOf(wk)>0)&&(parseFloat(nua.split(wk)[1])>528));
+var _9d=d.isIE?"commentStrip":"nozip";
+var qsa="querySelectorAll";
+var _9e=(!!_4()[qsa]&&(!d.isSafari||(d.isSafari>3.1)||_9c));
+var _9f=/n\+\d|([^ ])?([>~+])([^ =])?/g;
+var _a0=function(_a1,pre,ch,_a2){
+return ch?(pre?pre+" ":"")+ch+(_a2?" "+_a2:""):_a1;
+};
+var _a3=function(_a4,_a5){
+_a4=_a4.replace(_9f,_a0);
+if(_9e){
+var _a6=_96[_a4];
+if(_a6&&!_a5){
+return _a6;
+}
+}
+var _a7=_95[_a4];
+if(_a7){
+return _a7;
+}
+var qcz=_a4.charAt(0);
+var _a8=(-1==_a4.indexOf(" "));
+if((_a4.indexOf("#")>=0)&&(_a8)){
+_a5=true;
+}
+var _a9=(_9e&&(!_a5)&&(_7.indexOf(qcz)==-1)&&(!d.isIE||(_a4.indexOf(":")==-1))&&(!(_5&&(_a4.indexOf(".")>=0)))&&(_a4.indexOf(":contains")==-1)&&(_a4.indexOf(":checked")==-1)&&(_a4.indexOf("|=")==-1));
+if(_a9){
+var tq=(_7.indexOf(_a4.charAt(_a4.length-1))>=0)?(_a4+" *"):_a4;
+return _96[_a4]=function(_aa){
+try{
+if(!((9==_aa.nodeType)||_a8)){
+throw "";
+}
+var r=_aa[qsa](tq);
+r[_9d]=true;
+return r;
+}
+catch(e){
+return _a3(_a4,true)(_aa);
+}
+};
+}else{
+var _ab=_a4.split(/\s*,\s*/);
+return _95[_a4]=((_ab.length<2)?_97(_a4):function(_ac){
+var _ad=0,ret=[],tp;
+while((tp=_ab[_ad++])){
+ret=ret.concat(_97(tp)(_ac));
+}
+return ret;
+});
+}
+};
+var _ae=0;
+var _af=d.isIE?function(_b0){
+if(_8){
+return (_b0.getAttribute("_uid")||_b0.setAttribute("_uid",++_ae)||_ae);
+}else{
+return _b0.uniqueID;
+}
+}:function(_b1){
+return (_b1._uid||(_b1._uid=++_ae));
+};
+var _76=function(_b2,bag){
+if(!bag){
+return 1;
+}
+var id=_af(_b2);
+if(!bag[id]){
+return bag[id]=1;
+}
+return 0;
+};
+var _b3="_zipIdx";
+var _b4=function(arr){
+if(arr&&arr.nozip){
+return (_3._wrap)?_3._wrap(arr):arr;
+}
+var ret=new _3();
+if(!arr||!arr.length){
+return ret;
+}
+if(arr[0]){
+ret.push(arr[0]);
+}
+if(arr.length<2){
+return ret;
+}
+_ae++;
+if(d.isIE&&_8){
+var _b5=_ae+"";
+arr[0].setAttribute(_b3,_b5);
+for(var x=1,te;te=arr[x];x++){
+if(arr[x].getAttribute(_b3)!=_b5){
+ret.push(te);
+}
+te.setAttribute(_b3,_b5);
+}
+}else{
+if(d.isIE&&arr.commentStrip){
+try{
+for(var x=1,te;te=arr[x];x++){
+if(_21(te)){
+ret.push(te);
+}
+}
+}
+catch(e){
+}
+}else{
+if(arr[0]){
+arr[0][_b3]=_ae;
+}
+for(var x=1,te;te=arr[x];x++){
+if(arr[x][_b3]!=_ae){
+ret.push(te);
+}
+te[_b3]=_ae;
+}
+}
+}
+return ret;
+};
+d.query=function(_b6,_b7){
+_3=d._NodeListCtor;
+if(!_b6){
+return new _3();
+}
+if(_b6.constructor==_3){
+return _b6;
+}
+if(typeof _b6!="string"){
+return new _3(_b6);
+}
+if(typeof _b7=="string"){
+_b7=d.byId(_b7);
+if(!_b7){
+return new _3();
+}
+}
+_b7=_b7||_4();
+var od=_b7.ownerDocument||_b7.documentElement;
+_8=(_b7.contentType&&_b7.contentType=="application/xml")||(d.isOpera&&(_b7.doctype||od.toString()=="[object XMLDocument]"))||(!!od)&&(d.isIE?od.xml:(_b7.xmlVersion||od.xmlVersion));
+var r=_a3(_b6)(_b7);
+if(r&&r.nozip&&!_3._wrap){
+return r;
+}
+return _b4(r);
+};
+d.query.pseudos=_4c;
+d._filterQueryResult=function(_b8,_b9){
+var _ba=new d._NodeListCtor();
+var _bb=_5c(_a(_b9)[0]);
+for(var x=0,te;te=_b8[x];x++){
+if(_bb(te)){
+_ba.push(te);
+}
+}
+return _ba;
+};
+})(this["queryPortability"]||this["acme"]||dojo);
+}
diff --git a/js/dojo/dojo/_base/window.js b/js/dojo/dojo/_base/window.js
--- a/js/dojo/dojo/_base/window.js
+++ b/js/dojo/dojo/_base/window.js
@@ -1,145 +1,49 @@
-if(!dojo._hasResource["dojo._base.window"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.window"] = true;
-dojo.provide("dojo._base.window");
-
-dojo._gearsObject = function(){
- // summary:
- // factory method to get a Google Gears plugin instance to
- // expose in the browser runtime environment, if present
- var factory;
- var results;
-
- var gearsObj = dojo.getObject("google.gears");
- if(gearsObj){ return gearsObj; } // already defined elsewhere
-
- if(typeof GearsFactory != "undefined"){ // Firefox
- factory = new GearsFactory();
- }else{
- if(dojo.isIE){
- // IE
- try{
- factory = new ActiveXObject("Gears.Factory");
- }catch(e){
- // ok to squelch; there's no gears factory. move on.
- }
- }else if(navigator.mimeTypes["application/x-googlegears"]){
- // Safari?
- factory = document.createElement("object");
- factory.setAttribute("type", "application/x-googlegears");
- factory.setAttribute("width", 0);
- factory.setAttribute("height", 0);
- factory.style.display = "none";
- document.documentElement.appendChild(factory);
- }
- }
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // still nothing?
- if(!factory){ return null; }
-
- // define the global objects now; don't overwrite them though if they
- // were somehow set internally by the Gears plugin, which is on their
- // dev roadmap for the future
- dojo.setObject("google.gears.factory", factory);
- return dojo.getObject("google.gears");
-};
-
-// see if we have Google Gears installed, and if
-// so, make it available in the runtime environment
-// and in the Google standard 'google.gears' global object
-dojo.isGears = (!!dojo._gearsObject())||0;
-
-// @global: dojo.doc
-
-// summary:
-// Current document object. 'dojo.doc' can be modified
-// for temporary context shifting. Also see dojo.withDoc().
-// description:
-// Refer to dojo.doc rather
-// than referring to 'window.document' to ensure your code runs
-// correctly in managed contexts.
-dojo.doc = window["document"] || null;
-
-dojo.body = function(){
- // summary:
- // return the body object associated with dojo.doc
-
- // Note: document.body is not defined for a strict xhtml document
- // Would like to memoize this, but dojo.doc can change vi dojo.withDoc().
- return dojo.doc.body || dojo.doc.getElementsByTagName("body")[0];
-}
-dojo.setContext = function(/*Object*/globalObject, /*DocumentElement*/globalDocument){
- // summary:
- // changes the behavior of many core Dojo functions that deal with
- // namespace and DOM lookup, changing them to work in a new global
- // context. The varibles dojo.global and dojo.doc
- // are modified as a result of calling this function.
- dojo.global = globalObject;
- dojo.doc = globalDocument;
+if(!dojo._hasResource["dojo._base.window"]){
+dojo._hasResource["dojo._base.window"]=true;
+dojo.provide("dojo._base.window");
+dojo.doc=window["document"]||null;
+dojo.body=function(){
+return dojo.doc.body||dojo.doc.getElementsByTagName("body")[0];
};
-
-dojo._fireCallback = function(callback, context, cbArguments){
- // FIXME: should migrate to using "dojo.isString"!
- if(context && dojo.isString(callback)){
- callback = context[callback];
- }
- return (context ? callback.apply(context, cbArguments || [ ]) : callback());
+dojo.setContext=function(_1,_2){
+dojo.global=_1;
+dojo.doc=_2;
+};
+dojo.withGlobal=function(_3,_4,_5,_6){
+var _7=dojo.global;
+try{
+dojo.global=_3;
+return dojo.withDoc.call(null,_3.document,_4,_5,_6);
+}
+finally{
+dojo.global=_7;
}
-
-dojo.withGlobal = function( /*Object*/globalObject,
- /*Function*/callback,
- /*Object?*/thisObject,
- /*Array?*/cbArguments){
- // summary:
- // Call callback with globalObject as dojo.global and
- // globalObject.document as dojo.doc. If provided, globalObject
- // will be executed in the context of object thisObject
- // description:
- // When callback() returns or throws an error, the dojo.global
- // and dojo.doc will be restored to its previous state.
- var rval;
- var oldGlob = dojo.global;
- var oldDoc = dojo.doc;
- try{
- dojo.setContext(globalObject, globalObject.document);
- rval = dojo._fireCallback(callback, thisObject, cbArguments);
- }finally{
- dojo.setContext(oldGlob, oldDoc);
- }
- return rval;
+};
+dojo.withDoc=function(_8,_9,_a,_b){
+var _c=dojo.doc,_d=dojo._bodyLtr,_e=dojo.isQuirks;
+try{
+dojo.doc=_8;
+delete dojo._bodyLtr;
+dojo.isQuirks=dojo.doc.compatMode=="BackCompat";
+if(_a&&typeof _9=="string"){
+_9=_a[_9];
}
-
-dojo.withDoc = function( /*Object*/documentObject,
- /*Function*/callback,
- /*Object?*/thisObject,
- /*Array?*/cbArguments){
- // summary:
- // Call callback with documentObject as dojo.doc. If provided,
- // callback will be executed in the context of object thisObject
- // description:
- // When callback() returns or throws an error, the dojo.doc will
- // be restored to its previous state.
- var rval;
- var oldDoc = dojo.doc;
- try{
- dojo.doc = documentObject;
- rval = dojo._fireCallback(callback, thisObject, cbArguments);
- }finally{
- dojo.doc = oldDoc;
- }
- return rval;
+return _9.apply(_a,_b||[]);
+}
+finally{
+dojo.doc=_c;
+delete dojo._bodyLtr;
+if(_d!==undefined){
+dojo._bodyLtr=_d;
+}
+dojo.isQuirks=_e;
+}
};
-
-//Register any module paths set up in djConfig. Need to do this
-//in the hostenvs since hostenv_browser can read djConfig from a
-//script tag's attribute.
-(function(){
- var mp = djConfig["modulePaths"];
- if(mp){
- for(var param in mp){
- dojo.registerModulePath(param, mp[param]);
- }
- }
-})();
-
}
diff --git a/js/dojo/dojo/_base/xhr.js b/js/dojo/dojo/_base/xhr.js
--- a/js/dojo/dojo/_base/xhr.js
+++ b/js/dojo/dojo/_base/xhr.js
@@ -1,695 +1,437 @@
-if(!dojo._hasResource["dojo._base.xhr"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.xhr"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo._base.xhr"]){
+dojo._hasResource["dojo._base.xhr"]=true;
dojo.provide("dojo._base.xhr");
dojo.require("dojo._base.Deferred");
dojo.require("dojo._base.json");
dojo.require("dojo._base.lang");
dojo.require("dojo._base.query");
-
(function(){
- var _d = dojo;
- function setValue(/*Object*/obj, /*String*/name, /*String*/value){
- //summary:
- // For the nameed property in object, set the value. If a value
- // already exists and it is a string, convert the value to be an
- // array of values.
- var val = obj[name];
- if(_d.isString(val)){
- obj[name] = [val, value];
- }else if(_d.isArray(val)){
- val.push(value);
- }else{
- obj[name] = value;
- }
- }
-
- dojo.formToObject = function(/*DOMNode||String*/ formNode){
- // summary:
- // dojo.formToObject returns the values encoded in an HTML form as
- // string properties in an object which it then returns. Disabled form
- // elements, buttons, and other non-value form elements are skipped.
- // Multi-select elements are returned as an array of string values.
- // description:
- // This form:
- //
- // <form id="test_form">
- // <input type="text" name="blah" value="blah">
- // <input type="text" name="no_value" value="blah" disabled>
- // <input type="button" name="no_value2" value="blah">
- // <select type="select" multiple name="multi" size="5">
- // <option value="blah">blah</option>
- // <option value="thud" selected>thud</option>
- // <option value="thonk" selected>thonk</option>
- // </select>
- // </form>
- //
- // yields this object structure as the result of a call to
- // formToObject():
- //
- // {
- // blah: "blah",
- // multi: [
- // "thud",
- // "thonk"
- // ]
- // };
-
- var ret = {};
- var iq = "input:not([type=file]):not([type=submit]):not([type=image]):not([type=reset]):not([type=button]), select, textarea";
- _d.query(iq, formNode).filter(function(node){
- return (!node.disabled);
- }).forEach(function(item){
- var _in = item.name;
- var type = (item.type||"").toLowerCase();
- if(type == "radio" || type == "checkbox"){
- if(item.checked){ setValue(ret, _in, item.value); }
- }else if(item.multiple){
- ret[_in] = [];
- _d.query("option", item).forEach(function(opt){
- if(opt.selected){
- setValue(ret, _in, opt.value);
- }
- });
- }else{
- setValue(ret, _in, item.value);
- if(type == "image"){
- ret[_in+".x"] = ret[_in+".y"] = ret[_in].x = ret[_in].y = 0;
- }
- }
- });
- return ret; // Object
- }
-
- dojo.objectToQuery = function(/*Object*/ map){
- // summary:
- // takes a key/value mapping object and returns a string representing
- // a URL-encoded version of that object.
- // example:
- // this object:
- //
- // | {
- // | blah: "blah",
- // | multi: [
- // | "thud",
- // | "thonk"
- // | ]
- // | };
- //
- // yeilds the following query string:
- //
- // | "blah=blah&multi=thud&multi=thonk"
-
-
- // FIXME: need to implement encodeAscii!!
- var ec = encodeURIComponent;
- var ret = "";
- var backstop = {};
- for(var x in map){
- if(map[x] != backstop[x]){
- if(_d.isArray(map[x])){
- for(var y=0; y<map[x].length; y++){
- ret += ec(x) + "=" + ec(map[x][y]) + "&";
- }
- }else{
- ret += ec(x) + "=" + ec(map[x]) + "&";
- }
- }
- }
- if(ret.length && ret.charAt(ret.length-1) == "&"){
- ret = ret.substr(0, ret.length-1);
- }
- return ret; // String
- }
-
- dojo.formToQuery = function(/*DOMNode||String*/ formNode){
- // summary:
- // return URL-encoded string representing the form passed as either a
- // node or string ID identifying the form to serialize
- return _d.objectToQuery(_d.formToObject(formNode)); // String
- }
-
- dojo.formToJson = function(/*DOMNode||String*/ formNode, /*Boolean?*/prettyPrint){
- // summary:
- // return a serialized JSON string from a form node or string
- // ID identifying the form to serialize
- return _d.toJson(_d.formToObject(formNode), prettyPrint); // String
- }
-
- dojo.queryToObject = function(/*String*/ str){
- // summary:
- // returns an object representing a de-serialized query section of a
- // URL. Query keys with multiple values are returned in an array.
- // description:
- // This string:
- //
- // "foo=bar&foo=baz&thinger=%20spaces%20=blah&zonk=blarg&"
- //
- // returns this object structure:
- //
- // {
- // foo: [ "bar", "baz" ],
- // thinger: " spaces =blah",
- // zonk: "blarg"
- // }
- //
- // Note that spaces and other urlencoded entities are correctly
- // handled.
-
- // FIXME: should we grab the URL string if we're not passed one?
- var ret = {};
- var qp = str.split("&");
- var dc = decodeURIComponent;
- _d.forEach(qp, function(item){
- if(item.length){
- var parts = item.split("=");
- var name = dc(parts.shift());
- var val = dc(parts.join("="));
- if(_d.isString(ret[name])){
- ret[name] = [ret[name]];
- }
- if(_d.isArray(ret[name])){
- ret[name].push(val);
- }else{
- ret[name] = val;
- }
- }
- });
- return ret; // Object
- }
-
- /*
- from refactor.txt:
-
- all bind() replacement APIs take the following argument structure:
-
- {
- url: "blah.html",
-
- // all below are optional, but must be supported in some form by
- // every IO API
- timeout: 1000, // milliseconds
- handleAs: "text", // replaces the always-wrong "mimetype"
- content: {
- key: "value"
- },
-
- // browser-specific, MAY be unsupported
- sync: true, // defaults to false
- form: dojo.byId("someForm")
- }
- */
-
- // need to block async callbacks from snatching this thread as the result
- // of an async callback might call another sync XHR, this hangs khtml forever
- // must checked by watchInFlight()
-
- dojo._blockAsync = false;
-
- dojo._contentHandlers = {
- "text": function(xhr){ return xhr.responseText; },
- "json": function(xhr){
- if(!djConfig.usePlainJson){
- console.debug("Consider using mimetype:text/json-comment-filtered"
- + " to avoid potential security issues with JSON endpoints"
- + " (use djConfig.usePlainJson=true to turn off this message)");
- }
- return _d.fromJson(xhr.responseText);
- },
- "json-comment-filtered": function(xhr){
- // NOTE: we provide the json-comment-filtered option as one solution to
- // the "JavaScript Hijacking" issue noted by Fortify and others. It is
- // not appropriate for all circumstances.
-
- var value = xhr.responseText;
- var cStartIdx = value.indexOf("\/*");
- var cEndIdx = value.lastIndexOf("*\/");
- if(cStartIdx == -1 || cEndIdx == -1){
- throw new Error("JSON was not comment filtered");
- }
- return _d.fromJson(value.substring(cStartIdx+2, cEndIdx));
- },
- "javascript": function(xhr){
- // FIXME: try Moz and IE specific eval variants?
- return _d.eval(xhr.responseText);
- },
- "xml": function(xhr){
- if(_d.isIE && !xhr.responseXML){
- _d.forEach(["MSXML2", "Microsoft", "MSXML", "MSXML3"], function(i){
- try{
- var doc = new ActiveXObject(prefixes[i]+".XMLDOM");
- doc.async = false;
- doc.loadXML(xhr.responseText);
- return doc; // DOMDocument
- }catch(e){ /* squelch */ };
- });
- }else{
- return xhr.responseXML;
- }
- }
- };
-
- dojo._contentHandlers["json-comment-optional"] = function(xhr){
- var handlers = _d._contentHandlers;
- try{
- return handlers["json-comment-filtered"](xhr);
- }catch(e){
- return handlers["json"](xhr);
- }
- };
-
- /*=====
- dojo.__ioArgs = function(kwArgs){
- // url: String
- // URL to server endpoint.
- // content: Object?
- // Contains properties with string values. These
- // properties will be serialized as name1=value2 and
- // passed in the request.
- // timeout: Integer?
- // Milliseconds to wait for the response. If this time
- // passes, the then error callbacks are called.
- // form: DOMNode?
- // DOM node for a form. Used to extract the form values
- // and send to the server.
- // preventCache: Boolean?
- // Default is false. If true, then a
- // "dojo.preventCache" parameter is sent in the request
- // with a value that changes with each request
- // (timestamp). Useful only with GET-type requests.
- // handleAs: String?
- // Acceptable values depend on the type of IO
- // transport (see specific IO calls for more information).
- // load: Function?
- // function(response, ioArgs){}. response is an Object, ioArgs
- // is of type dojo.__ioCallbackArgs. The load function will be
- // called on a successful response.
- // error: Function?
- // function(response, ioArgs){}. response is an Object, ioArgs
- // is of type dojo.__ioCallbackArgs. The error function will
- // be called in an error case.
- // handle: Function
- // function(response, ioArgs){}. response is an Object, ioArgs
- // is of type dojo.__ioCallbackArgs. The handle function will
- // be called in either the successful or error case. For
- // the load, error and handle functions, the ioArgs object
- // will contain the following properties:
- }
- =====*/
-
- /*=====
- dojo.__ioCallbackArgs = function(kwArgs){
- // args: Object
- // the original object argument to the IO call.
- // xhr: XMLHttpRequest
- // For XMLHttpRequest calls only, the
- // XMLHttpRequest object that was used for the
- // request.
- // url: String
- // The final URL used for the call. Many times it
- // will be different than the original args.url
- // value.
- // query: String
- // For non-GET requests, the
- // name1=value1&name2=value2 parameters sent up in
- // the request.
- // handleAs: String
- // The final indicator on how the response will be
- // handled.
- // id: String
- // For dojo.io.script calls only, the internal
- // script ID used for the request.
- // canDelete: Boolean
- // For dojo.io.script calls only, indicates
- // whether the script tag that represents the
- // request can be deleted after callbacks have
- // been called. Used internally to know when
- // cleanup can happen on JSONP-type requests.
- // json: Object
- // For dojo.io.script calls only: holds the JSON
- // response for JSONP-type requests. Used
- // internally to hold on to the JSON responses.
- // You should not need to access it directly --
- // the same object should be passed to the success
- // callbacks directly.
- }
- =====*/
-
-
-
- dojo._ioSetArgs = function(/*dojo.__ioArgs*/args,
- /*Function*/canceller,
- /*Function*/okHandler,
- /*Function*/errHandler){
- // summary:
- // sets up the Deferred and ioArgs property on the Deferred so it
- // can be used in an io call.
- // args:
- // The args object passed into the public io call. Recognized properties on
- // the args object are:
- // canceller:
- // The canceller function used for the Deferred object. The function
- // will receive one argument, the Deferred object that is related to the
- // canceller.
- // okHandler:
- // The first OK callback to be registered with Deferred. It has the opportunity
- // to transform the OK response. It will receive one argument -- the Deferred
- // object returned from this function.
- // errHandler:
- // The first error callback to be registered with Deferred. It has the opportunity
- // to do cleanup on an error. It will receive two arguments: error (the
- // Error object) and dfd, the Deferred object returned from this function.
-
- var ioArgs = {args: args, url: args.url};
-
- //Get values from form if requestd.
- var formObject = null;
- if(args.form){
- var form = _d.byId(args.form);
- //IE requires going through getAttributeNode instead of just getAttribute in some form cases,
- //so use it for all. See #2844
- var actnNode = form.getAttributeNode("action");
- ioArgs.url = ioArgs.url || (actnNode ? actnNode.value : null);
- formObject = _d.formToObject(form);
- }
-
- // set up the query params
- var miArgs = [{}];
-
- if(formObject){
- // potentially over-ride url-provided params w/ form values
- miArgs.push(formObject);
- }
- if(args.content){
- // stuff in content over-rides what's set by form
- miArgs.push(args.content);
- }
- if(args.preventCache){
- miArgs.push({"dojo.preventCache": new Date().valueOf()});
- }
- ioArgs.query = _d.objectToQuery(_d.mixin.apply(null, miArgs));
-
- // .. and the real work of getting the deferred in order, etc.
- ioArgs.handleAs = args.handleAs || "text";
- var d = new _d.Deferred(canceller);
- d.addCallbacks(okHandler, function(error){
- return errHandler(error, d);
- });
-
- //Support specifying load, error and handle callback functions from the args.
- //For those callbacks, the "this" object will be the args object.
- //The callbacks will get the deferred result value as the
- //first argument and the ioArgs object as the second argument.
- var ld = args.load;
- if(ld && _d.isFunction(ld)){
- d.addCallback(function(value){
- return ld.call(args, value, ioArgs);
- });
- }
- var err = args.error;
- if(err && _d.isFunction(err)){
- d.addErrback(function(value){
- return err.call(args, value, ioArgs);
- });
- }
- var handle = args.handle;
- if(handle && _d.isFunction(handle)){
- d.addBoth(function(value){
- return handle.call(args, value, ioArgs);
- });
- }
-
- d.ioArgs = ioArgs;
-
- // FIXME: need to wire up the xhr object's abort method to something
- // analagous in the Deferred
- return d;
- }
-
- var _deferredCancel = function(/*Deferred*/dfd){
- //summary: canceller function for dojo._ioSetArgs call.
-
- dfd.canceled = true;
- var xhr = dfd.ioArgs.xhr;
- var _at = (typeof xhr.abort);
- if((_at == "function")||(_at == "unknown")){
- xhr.abort();
- }
- var err = new Error("xhr cancelled");
- err.dojoType = "cancel";
- return err;
- }
- var _deferredOk = function(/*Deferred*/dfd){
- //summary: okHandler function for dojo._ioSetArgs call.
-
- return _d._contentHandlers[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);
- }
- var _deferError = function(/*Error*/error, /*Deferred*/dfd){
- //summary: errHandler function for dojo._ioSetArgs call.
-
- // console.debug("xhr error in:", dfd.ioArgs.xhr);
- console.debug(error);
- return error;
- }
-
- var _makeXhrDeferred = function(/*dojo.__xhrArgs*/args){
- //summary: makes the Deferred object for this xhr request.
- var dfd = _d._ioSetArgs(args, _deferredCancel, _deferredOk, _deferError);
- //Pass the args to _xhrObj, to allow xhr iframe proxy interceptions.
- dfd.ioArgs.xhr = _d._xhrObj(dfd.ioArgs.args);
- return dfd;
- }
-
- // avoid setting a timer per request. It degrades performance on IE
- // something fierece if we don't use unified loops.
- var _inFlightIntvl = null;
- var _inFlight = [];
- var _watchInFlight = function(){
- //summary:
- // internal method that checks each inflight XMLHttpRequest to see
- // if it has completed or if the timeout situation applies.
-
- var now = (new Date()).getTime();
- // make sure sync calls stay thread safe, if this callback is called
- // during a sync call and this results in another sync call before the
- // first sync call ends the browser hangs
- if(!_d._blockAsync){
- // we need manual loop because we often modify _inFlight (and therefore 'i') while iterating
- // note: the second clause is an assigment on purpose, lint may complain
- for(var i=0, tif; (i<_inFlight.length)&&(tif=_inFlight[i]); i++){
- var dfd = tif.dfd;
- try{
- if(!dfd || dfd.canceled || !tif.validCheck(dfd)){
- _inFlight.splice(i--, 1);
- }else if(tif.ioCheck(dfd)){
- _inFlight.splice(i--, 1);
- tif.resHandle(dfd);
- }else if(dfd.startTime){
- //did we timeout?
- if(dfd.startTime + (dfd.ioArgs.args.timeout||0) < now){
- _inFlight.splice(i--, 1);
- var err = new Error("timeout exceeded");
- err.dojoType = "timeout";
- dfd.errback(err);
- //Cancel the request so the io module can do appropriate cleanup.
- dfd.cancel();
- }
- }
- }catch(e){
- // FIXME: make sure we errback!
- console.debug(e);
- dfd.errback(new Error("_watchInFlightError!"));
- }
- }
- }
-
- if(!_inFlight.length){
- clearInterval(_inFlightIntvl);
- _inFlightIntvl = null;
- return;
- }
-
- }
-
- dojo._ioCancelAll = function(){
- //summary: Cancels all pending IO requests, regardless of IO type
- //(xhr, script, iframe).
- try{
- _d.forEach(_inFlight, function(i){
- i.dfd.cancel();
- });
- }catch(e){/*squelch*/}
- }
-
- //Automatically call cancel all io calls on unload
- //in IE for trac issue #2357.
- if(_d.isIE){
- _d.addOnUnload(_d._ioCancelAll);
- }
-
- _d._ioWatch = function(/*Deferred*/dfd,
- /*Function*/validCheck,
- /*Function*/ioCheck,
- /*Function*/resHandle){
- //summary: watches the io request represented by dfd to see if it completes.
- //dfd:
- // The Deferred object to watch.
- //validCheck:
- // Function used to check if the IO request is still valid. Gets the dfd
- // object as its only argument.
- //ioCheck:
- // Function used to check if basic IO call worked. Gets the dfd
- // object as its only argument.
- //resHandle:
- // Function used to process response. Gets the dfd
- // object as its only argument.
- if(dfd.ioArgs.args.timeout){
- dfd.startTime = (new Date()).getTime();
- }
- _inFlight.push({dfd: dfd, validCheck: validCheck, ioCheck: ioCheck, resHandle: resHandle});
- if(!_inFlightIntvl){
- _inFlightIntvl = setInterval(_watchInFlight, 50);
- }
- _watchInFlight(); // handle sync requests
- }
-
- var _defaultContentType = "application/x-www-form-urlencoded";
-
- var _validCheck = function(/*Deferred*/dfd){
- return dfd.ioArgs.xhr.readyState; //boolean
- }
- var _ioCheck = function(/*Deferred*/dfd){
- return 4 == dfd.ioArgs.xhr.readyState; //boolean
- }
- var _resHandle = function(/*Deferred*/dfd){
- if(_d._isDocumentOk(dfd.ioArgs.xhr)){
- dfd.callback(dfd);
- }else{
- dfd.errback(new Error("bad http response code:" + dfd.ioArgs.xhr.status));
- }
- }
-
- var _doIt = function(/*String*/type, /*Deferred*/dfd){
- // IE 6 is a steaming pile. It won't let you call apply() on the native function (xhr.open).
- // workaround for IE6's apply() "issues"
- var ioArgs = dfd.ioArgs;
- var args = ioArgs.args;
- ioArgs.xhr.open(type, ioArgs.url, args.sync !== true, args.user || undefined, args.password || undefined);
- if(args.headers){
- for(var hdr in args.headers){
- if(hdr.toLowerCase() === "content-type" && !args.contentType){
- args.contentType = args.headers[hdr];
- }else{
- ioArgs.xhr.setRequestHeader(hdr, args.headers[hdr]);
- }
- }
- }
- // FIXME: is this appropriate for all content types?
- ioArgs.xhr.setRequestHeader("Content-Type", (args.contentType||_defaultContentType));
- // FIXME: set other headers here!
- try{
- ioArgs.xhr.send(ioArgs.query);
- }catch(e){
- dfd.cancel();
- }
- _d._ioWatch(dfd, _validCheck, _ioCheck, _resHandle);
- return dfd; //Deferred
- }
-
- dojo._ioAddQueryToUrl = function(/*dojo.__ioCallbackArgs*/ioArgs){
- //summary: Adds query params discovered by the io deferred construction to the URL.
- //Only use this for operations which are fundamentally GET-type operations.
- if(ioArgs.query.length){
- ioArgs.url += (ioArgs.url.indexOf("?") == -1 ? "?" : "&") + ioArgs.query;
- ioArgs.query = null;
- }
- }
-
- /*=====
- dojo.__xhrArgs = function(kwArgs){
- // summary:
- // In addition to the properties listed for the dojo.__ioArgs type,
- // the following properties are allowed for dojo.xhr* methods.
- // handleAs:
- // String. Acceptable values are:
- // "text" (default)
- // "json"
- // "json-comment-optional"
- // "json-comment-filtered"
- // "javascript"
- // "xml"
- // sync:
- // Boolean. false is default. Indicates whether the request should
- // be a synchronous (blocking) request.
- // headers:
- // Object. Additional HTTP headers to send in the request.
- }
- =====*/
-
- dojo.xhrGet = function(/*dojo.__xhrArgs*/ args){
- // summary:
- // Sends an HTTP GET request to the server.
- var dfd = _makeXhrDeferred(args);
- _d._ioAddQueryToUrl(dfd.ioArgs);
- return _doIt("GET", dfd); // dojo.Deferred
- }
-
- dojo.xhrPost = function(/*dojo.__xhrArgs*/ args){
- //summary:
- // Sends an HTTP POST request to the server.
- return _doIt("POST", _makeXhrDeferred(args)); // dojo.Deferred
- }
-
- dojo.rawXhrPost = function(/*dojo.__xhrArgs*/ args){
- // summary:
- // Sends an HTTP POST request to the server. In addtion to the properties
- // listed for the dojo.__xhrArgs type, the following property is allowed:
- // postData:
- // String. The raw data to send in the body of the POST request.
- var dfd = _makeXhrDeferred(args);
- dfd.ioArgs.query = args.postData;
- return _doIt("POST", dfd); // dojo.Deferred
- }
-
- dojo.xhrPut = function(/*dojo.__xhrArgs*/ args){
- // summary:
- // Sends an HTTP PUT request to the server.
- return _doIt("PUT", _makeXhrDeferred(args)); // dojo.Deferred
- }
-
- dojo.rawXhrPut = function(/*dojo.__xhrArgs*/ args){
- // summary:
- // Sends an HTTP PUT request to the server. In addtion to the properties
- // listed for the dojo.__xhrArgs type, the following property is allowed:
- // putData:
- // String. The raw data to send in the body of the PUT request.
- var dfd = _makeXhrDeferred(args);
- var ioArgs = dfd.ioArgs;
- if(args["putData"]){
- ioArgs.query = args.putData;
- args.putData = null;
- }
- return _doIt("PUT", dfd); // dojo.Deferred
- }
-
- dojo.xhrDelete = function(/*dojo.__xhrArgs*/ args){
- // summary:
- // Sends an HTTP DELETE request to the server.
- var dfd = _makeXhrDeferred(args);
- _d._ioAddQueryToUrl(dfd.ioArgs);
- return _doIt("DELETE", dfd); // dojo.Deferred
- }
-
- /*
- dojo.wrapForm = function(formNode){
- //summary:
- // A replacement for FormBind, but not implemented yet.
-
- // FIXME: need to think harder about what extensions to this we might
- // want. What should we allow folks to do w/ this? What events to
- // set/send?
- throw new Error("dojo.wrapForm not yet implemented");
- }
- */
+var _1=dojo,_2=_1.config;
+function _3(_4,_5,_6){
+if(_6===null){
+return;
+}
+var _7=_4[_5];
+if(typeof _7=="string"){
+_4[_5]=[_7,_6];
+}else{
+if(_1.isArray(_7)){
+_7.push(_6);
+}else{
+_4[_5]=_6;
+}
+}
+};
+dojo.fieldToObject=function(_8){
+var _9=null;
+var _a=_1.byId(_8);
+if(_a){
+var _b=_a.name;
+var _c=(_a.type||"").toLowerCase();
+if(_b&&_c&&!_a.disabled){
+if(_c=="radio"||_c=="checkbox"){
+if(_a.checked){
+_9=_a.value;
+}
+}else{
+if(_a.multiple){
+_9=[];
+_1.query("option",_a).forEach(function(_d){
+if(_d.selected){
+_9.push(_d.value);
+}
+});
+}else{
+_9=_a.value;
+}
+}
+}
+}
+return _9;
+};
+dojo.formToObject=function(_e){
+var _f={};
+var _10="file|submit|image|reset|button|";
+_1.forEach(dojo.byId(_e).elements,function(_11){
+var _12=_11.name;
+var _13=(_11.type||"").toLowerCase();
+if(_12&&_13&&_10.indexOf(_13)==-1&&!_11.disabled){
+_3(_f,_12,_1.fieldToObject(_11));
+if(_13=="image"){
+_f[_12+".x"]=_f[_12+".y"]=_f[_12].x=_f[_12].y=0;
+}
+}
+});
+return _f;
+};
+dojo.objectToQuery=function(map){
+var enc=encodeURIComponent;
+var _14=[];
+var _15={};
+for(var _16 in map){
+var _17=map[_16];
+if(_17!=_15[_16]){
+var _18=enc(_16)+"=";
+if(_1.isArray(_17)){
+for(var i=0;i<_17.length;i++){
+_14.push(_18+enc(_17[i]));
+}
+}else{
+_14.push(_18+enc(_17));
+}
+}
+}
+return _14.join("&");
+};
+dojo.formToQuery=function(_19){
+return _1.objectToQuery(_1.formToObject(_19));
+};
+dojo.formToJson=function(_1a,_1b){
+return _1.toJson(_1.formToObject(_1a),_1b);
+};
+dojo.queryToObject=function(str){
+var ret={};
+var qp=str.split("&");
+var dec=decodeURIComponent;
+_1.forEach(qp,function(_1c){
+if(_1c.length){
+var _1d=_1c.split("=");
+var _1e=dec(_1d.shift());
+var val=dec(_1d.join("="));
+if(typeof ret[_1e]=="string"){
+ret[_1e]=[ret[_1e]];
+}
+if(_1.isArray(ret[_1e])){
+ret[_1e].push(val);
+}else{
+ret[_1e]=val;
+}
+}
+});
+return ret;
+};
+dojo._blockAsync=false;
+var _1f=_1._contentHandlers=dojo.contentHandlers={text:function(xhr){
+return xhr.responseText;
+},json:function(xhr){
+return _1.fromJson(xhr.responseText||null);
+},"json-comment-filtered":function(xhr){
+if(!dojo.config.useCommentedJson){
+console.warn("Consider using the standard mimetype:application/json."+" json-commenting can introduce security issues. To"+" decrease the chances of hijacking, use the standard the 'json' handler and"+" prefix your json with: {}&&\n"+"Use djConfig.useCommentedJson=true to turn off this message.");
+}
+var _20=xhr.responseText;
+var _21=_20.indexOf("/*");
+var _22=_20.lastIndexOf("*/");
+if(_21==-1||_22==-1){
+throw new Error("JSON was not comment filtered");
+}
+return _1.fromJson(_20.substring(_21+2,_22));
+},javascript:function(xhr){
+return _1.eval(xhr.responseText);
+},xml:function(xhr){
+var _23=xhr.responseXML;
+if(_1.isIE&&(!_23||!_23.documentElement)){
+var ms=function(n){
+return "MSXML"+n+".DOMDocument";
+};
+var dp=["Microsoft.XMLDOM",ms(6),ms(4),ms(3),ms(2)];
+_1.some(dp,function(p){
+try{
+var dom=new ActiveXObject(p);
+dom.async=false;
+dom.loadXML(xhr.responseText);
+_23=dom;
+}
+catch(e){
+return false;
+}
+return true;
+});
+}
+return _23;
+},"json-comment-optional":function(xhr){
+if(xhr.responseText&&/^[^{\[]*\/\*/.test(xhr.responseText)){
+return _1f["json-comment-filtered"](xhr);
+}else{
+return _1f["json"](xhr);
+}
+}};
+dojo._ioSetArgs=function(_24,_25,_26,_27){
+var _28={args:_24,url:_24.url};
+var _29=null;
+if(_24.form){
+var _2a=_1.byId(_24.form);
+var _2b=_2a.getAttributeNode("action");
+_28.url=_28.url||(_2b?_2b.value:null);
+_29=_1.formToObject(_2a);
+}
+var _2c=[{}];
+if(_29){
+_2c.push(_29);
+}
+if(_24.content){
+_2c.push(_24.content);
+}
+if(_24.preventCache){
+_2c.push({"dojo.preventCache":new Date().valueOf()});
+}
+_28.query=_1.objectToQuery(_1.mixin.apply(null,_2c));
+_28.handleAs=_24.handleAs||"text";
+var d=new _1.Deferred(_25);
+d.addCallbacks(_26,function(_2d){
+return _27(_2d,d);
+});
+var ld=_24.load;
+if(ld&&_1.isFunction(ld)){
+d.addCallback(function(_2e){
+return ld.call(_24,_2e,_28);
+});
+}
+var err=_24.error;
+if(err&&_1.isFunction(err)){
+d.addErrback(function(_2f){
+return err.call(_24,_2f,_28);
+});
+}
+var _30=_24.handle;
+if(_30&&_1.isFunction(_30)){
+d.addBoth(function(_31){
+return _30.call(_24,_31,_28);
+});
+}
+if(_2.ioPublish&&_1.publish&&_28.args.ioPublish!==false){
+d.addCallbacks(function(res){
+_1.publish("/dojo/io/load",[d,res]);
+return res;
+},function(res){
+_1.publish("/dojo/io/error",[d,res]);
+return res;
+});
+d.addBoth(function(res){
+_1.publish("/dojo/io/done",[d,res]);
+return res;
+});
+}
+d.ioArgs=_28;
+return d;
+};
+var _32=function(dfd){
+dfd.canceled=true;
+var xhr=dfd.ioArgs.xhr;
+var _33=typeof xhr.abort;
+if(_33=="function"||_33=="object"||_33=="unknown"){
+xhr.abort();
+}
+var err=dfd.ioArgs.error;
+if(!err){
+err=new Error("xhr cancelled");
+err.dojoType="cancel";
+}
+return err;
+};
+var _34=function(dfd){
+var ret=_1f[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);
+return ret===undefined?null:ret;
+};
+var _35=function(_36,dfd){
+if(!dfd.ioArgs.args.failOk){
+console.error(_36);
+}
+return _36;
+};
+var _37=null;
+var _38=[];
+var _39=0;
+var _3a=function(dfd){
+if(_39<=0){
+_39=0;
+if(_2.ioPublish&&_1.publish&&(!dfd||dfd&&dfd.ioArgs.args.ioPublish!==false)){
+_1.publish("/dojo/io/stop");
+}
+}
+};
+var _3b=function(){
+var now=(new Date()).getTime();
+if(!_1._blockAsync){
+for(var i=0,tif;i<_38.length&&(tif=_38[i]);i++){
+var dfd=tif.dfd;
+var _3c=function(){
+if(!dfd||dfd.canceled||!tif.validCheck(dfd)){
+_38.splice(i--,1);
+_39-=1;
+}else{
+if(tif.ioCheck(dfd)){
+_38.splice(i--,1);
+tif.resHandle(dfd);
+_39-=1;
+}else{
+if(dfd.startTime){
+if(dfd.startTime+(dfd.ioArgs.args.timeout||0)<now){
+_38.splice(i--,1);
+var err=new Error("timeout exceeded");
+err.dojoType="timeout";
+dfd.errback(err);
+dfd.cancel();
+_39-=1;
+}
+}
+}
+}
+};
+if(dojo.config.debugAtAllCosts){
+_3c.call(this);
+}else{
+try{
+_3c.call(this);
+}
+catch(e){
+dfd.errback(e);
+}
+}
+}
+}
+_3a(dfd);
+if(!_38.length){
+clearInterval(_37);
+_37=null;
+return;
+}
+};
+dojo._ioCancelAll=function(){
+try{
+_1.forEach(_38,function(i){
+try{
+i.dfd.cancel();
+}
+catch(e){
+}
+});
+}
+catch(e){
+}
+};
+if(_1.isIE){
+_1.addOnWindowUnload(_1._ioCancelAll);
+}
+_1._ioNotifyStart=function(dfd){
+if(_2.ioPublish&&_1.publish&&dfd.ioArgs.args.ioPublish!==false){
+if(!_39){
+_1.publish("/dojo/io/start");
+}
+_39+=1;
+_1.publish("/dojo/io/send",[dfd]);
+}
+};
+_1._ioWatch=function(dfd,_3d,_3e,_3f){
+var _40=dfd.ioArgs.args;
+if(_40.timeout){
+dfd.startTime=(new Date()).getTime();
+}
+_38.push({dfd:dfd,validCheck:_3d,ioCheck:_3e,resHandle:_3f});
+if(!_37){
+_37=setInterval(_3b,50);
+}
+if(_40.sync){
+_3b();
+}
+};
+var _41="application/x-www-form-urlencoded";
+var _42=function(dfd){
+return dfd.ioArgs.xhr.readyState;
+};
+var _43=function(dfd){
+return 4==dfd.ioArgs.xhr.readyState;
+};
+var _44=function(dfd){
+var xhr=dfd.ioArgs.xhr;
+if(_1._isDocumentOk(xhr)){
+dfd.callback(dfd);
+}else{
+var err=new Error("Unable to load "+dfd.ioArgs.url+" status:"+xhr.status);
+err.status=xhr.status;
+err.responseText=xhr.responseText;
+dfd.errback(err);
+}
+};
+dojo._ioAddQueryToUrl=function(_45){
+if(_45.query.length){
+_45.url+=(_45.url.indexOf("?")==-1?"?":"&")+_45.query;
+_45.query=null;
+}
+};
+dojo.xhr=function(_46,_47,_48){
+var dfd=_1._ioSetArgs(_47,_32,_34,_35);
+var _49=dfd.ioArgs;
+var xhr=_49.xhr=_1._xhrObj(_49.args);
+if(!xhr){
+dfd.cancel();
+return dfd;
+}
+if("postData" in _47){
+_49.query=_47.postData;
+}else{
+if("putData" in _47){
+_49.query=_47.putData;
+}else{
+if("rawBody" in _47){
+_49.query=_47.rawBody;
+}else{
+if((arguments.length>2&&!_48)||"POST|PUT".indexOf(_46.toUpperCase())==-1){
+_1._ioAddQueryToUrl(_49);
+}
+}
+}
+}
+xhr.open(_46,_49.url,_47.sync!==true,_47.user||undefined,_47.password||undefined);
+if(_47.headers){
+for(var hdr in _47.headers){
+if(hdr.toLowerCase()==="content-type"&&!_47.contentType){
+_47.contentType=_47.headers[hdr];
+}else{
+if(_47.headers[hdr]){
+xhr.setRequestHeader(hdr,_47.headers[hdr]);
+}
+}
+}
+}
+xhr.setRequestHeader("Content-Type",_47.contentType||_41);
+if(!_47.headers||!("X-Requested-With" in _47.headers)){
+xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");
+}
+_1._ioNotifyStart(dfd);
+if(dojo.config.debugAtAllCosts){
+xhr.send(_49.query);
+}else{
+try{
+xhr.send(_49.query);
+}
+catch(e){
+_49.error=e;
+dfd.cancel();
+}
+}
+_1._ioWatch(dfd,_42,_43,_44);
+xhr=null;
+return dfd;
+};
+dojo.xhrGet=function(_4a){
+return _1.xhr("GET",_4a);
+};
+dojo.rawXhrPost=dojo.xhrPost=function(_4b){
+return _1.xhr("POST",_4b,true);
+};
+dojo.rawXhrPut=dojo.xhrPut=function(_4c){
+return _1.xhr("PUT",_4c,true);
+};
+dojo.xhrDelete=function(_4d){
+return _1.xhr("DELETE",_4d);
+};
})();
-
}
diff --git a/js/dojo/dojo/_firebug/firebug.css b/js/dojo/dojo/_firebug/firebug.css
--- a/js/dojo/dojo/_firebug/firebug.css
+++ b/js/dojo/dojo/_firebug/firebug.css
@@ -1,222 +1,208 @@
.firebug {
margin: 0;
background:#fff;
font-family: Lucida Grande, Tahoma, sans-serif;
font-size: 11px;
overflow: hidden;
border: 1px solid black;
position: relative;
}
-
.firebug a {
text-decoration: none;
}
-
.firebug a:hover {
text-decoration: underline;
}
.firebug a:visited{
color:#0000FF;
}
.firebug #firebugToolbar {
- height: 14px;
+ height: 18px;
+ line-height:18px;
border-top: 1px solid ThreeDHighlight;
border-bottom: 1px solid ThreeDShadow;
padding: 2px 6px;
- background: ThreeDFace;
+
+ background:#f0f0f0;
}
-
-.firebug .firebugToolbarRight {
- position: absolute;
- top: 4px;
- right: 6px;
-}
-
.firebug #firebugLog, .firebug #objectLog {
overflow: auto;
position: absolute;
left: 0;
width: 100%;
}
#objectLog{
overflow:scroll;
height:258px;
}
.firebug #firebugCommandLine {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 18px;
border: none;
border-top: 1px solid ThreeDShadow;
}
-
-/************************************************************************************************/
-
.firebug .logRow {
position: relative;
border-bottom: 1px solid #D7D7D7;
padding: 2px 4px 1px 6px;
background-color: #FFFFFF;
}
-
.firebug .logRow-command {
font-family: Monaco, monospace;
color: blue;
}
-
.firebug .objectBox-null {
padding: 0 2px;
border: 1px solid #666666;
background-color: #888888;
color: #FFFFFF;
}
-
.firebug .objectBox-string {
font-family: Monaco, monospace;
color: red;
white-space: pre;
}
-
.firebug .objectBox-number {
color: #000088;
}
-
.firebug .objectBox-function {
font-family: Monaco, monospace;
color: DarkGreen;
}
-
.firebug .objectBox-object {
color: DarkGreen;
font-weight: bold;
}
-
-/************************************************************************************************/
-
.firebug .logRow-info,
.firebug .logRow-error,
.firebug .logRow-warning
{
background: #00FFFF no-repeat 2px 2px;
padding-left: 20px;
padding-bottom: 3px;
}
-
.firebug .logRow-info {
background: #FFF url(infoIcon.png) no-repeat 2px 2px;
padding-left: 20px;
padding-bottom: 3px;
}
-
.firebug .logRow-warning {
background: #00FFFF url(warningIcon.png) no-repeat 2px 2px;
padding-left: 20px;
padding-bottom: 3px;
}
-
.firebug .logRow-error {
-
background: LightYellow url(errorIcon.png) no-repeat 2px 2px;
padding-left: 20px;
padding-bottom: 3px;
}
-
.firebug .errorMessage {
vertical-align: top;
color: #FF0000;
}
-
.firebug .objectBox-sourceLink {
position: absolute;
right: 4px;
top: 2px;
padding-left: 8px;
font-family: Lucida Grande, sans-serif;
font-weight: bold;
color: #0000FF;
}
-
-/************************************************************************************************/
-
.firebug .logRow-group {
background: #EEEEEE;
border-bottom: none;
}
-
.firebug .logGroup {
background: #EEEEEE;
}
-
.firebug .logGroupBox {
margin-left: 24px;
border-top: 1px solid #D7D7D7;
border-left: 1px solid #D7D7D7;
}
-
-/************************************************************************************************/
-
.firebug .selectorTag,
.firebug .selectorId,
.firebug .selectorClass {
font-family: Monaco, monospace;
font-weight: normal;
}
-
.firebug .selectorTag {
color: #0000FF;
}
-
.firebug .selectorId {
color: DarkBlue;
}
-
.firebug .selectorClass {
color: red;
}
-
-/************************************************************************************************/
-
.firebug .objectBox-element {
font-family: Monaco, monospace;
color: #000088;
}
-
.firebug .nodeChildren {
margin-left: 16px;
}
-
.firebug .nodeTag {
color: blue;
}
-
.firebug .nodeValue {
color: #FF0000;
font-weight: normal;
}
-
.firebug .nodeText,
.firebug .nodeComment {
margin: 0 2px;
vertical-align: top;
}
-
.firebug .nodeText {
color: #333333;
}
-
.firebug .nodeComment {
color: DarkGreen;
}
-
-/************************************************************************************************/
-
.firebug .propertyNameCell {
vertical-align: top;
}
-
.firebug .propertyName {
font-weight: bold;
-}
\ No newline at end of file
+}
+#firebugToolbar ul.tabs{
+ margin:0 !important;
+ padding:0;
+}
+#firebugToolbar ul.tabs li{
+ list-style:none;
+ background:transparent url(tab_lft_norm.png) no-repeat left;
+ line-height:18px;
+ float:left;
+ margin-left:5px;
+}
+#firebugToolbar ul.tabs li.right{
+ float:right;
+ margin-right:5px;
+ margin-left:0;
+}
+#firebugToolbar ul.tabs li.gap{
+ margin-left:20px;
+}
+#firebugToolbar .tabs a{
+ text-decoration:none;
+ background:transparent url(tab_rgt_norm.png) no-repeat right;
+ line-height:18px;
+ padding:3px 9px 4px 0px;
+ margin-left:9px;
+ color:#333333;
+}
+#firebugToolbar .tabs li:hover{
+ background:transparent url(tab_lft_over.png) no-repeat left;
+}
+#firebugToolbar .tabs a:hover{
+ text-decoration:none;
+ background:transparent url(tab_rgt_over.png) no-repeat right;
+ color:#FFFFFF;
+}
diff --git a/js/dojo/dojo/_firebug/firebug.js b/js/dojo/dojo/_firebug/firebug.js
--- a/js/dojo/dojo/_firebug/firebug.js
+++ b/js/dojo/dojo/_firebug/firebug.js
@@ -1,911 +1,914 @@
-if(!dojo._hasResource["dojo._firebug.firebug"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._firebug.firebug"] = true;
-dojo.provide("dojo._firebug.firebug");
-
-dojo.deprecated = function(/*String*/ behaviour, /*String?*/ extra, /*String?*/ removal){
- // summary:
- // Log a debug message to indicate that a behavior has been
- // deprecated.
- // extra: Text to append to the message.
- // removal:
- // Text to indicate when in the future the behavior will be removed.
- var message = "DEPRECATED: " + behaviour;
- if(extra){ message += " " + extra; }
- if(removal){ message += " -- will be removed in version: " + removal; }
- console.debug(message);
-}
-
-dojo.experimental = function(/* String */ moduleName, /* String? */ extra){
- // summary: Marks code as experimental.
- // description:
- // This can be used to mark a function, file, or module as
- // experimental. Experimental code is not ready to be used, and the
- // APIs are subject to change without notice. Experimental code may be
- // completed deleted without going through the normal deprecation
- // process.
- // moduleName:
- // The name of a module, or the name of a module file or a specific
- // function
- // extra:
- // some additional message for the user
- // example:
- // | dojo.experimental("dojo.data.Result");
- // example:
- // | dojo.experimental("dojo.weather.toKelvin()", "PENDING approval from NOAA");
- var message = "EXPERIMENTAL: " + moduleName + " -- APIs subject to change without notice.";
- if(extra){ message += " " + extra; }
- console.debug(message);
-}
-
-// FIREBUG LITE
- // summary: Firebug Lite, the baby brother to Joe Hewitt's Firebug for Mozilla Firefox
- // description:
- // Opens a console for logging, debugging, and error messages.
- // Contains partial functionality to Firebug. See function list below.
- // NOTE:
- // Firebug is a Firefox extension created by Joe Hewitt (see license). You do not need Dojo to run Firebug.
- // Firebug Lite is included in Dojo by permission from Joe Hewitt
- // If you are new to Firebug, or used to the Dojo 0.4 dojo.debug, you can learn Firebug
- // functionality by reading the function comments below or visiting http://www.getfirebug.com/docs.html
- // NOTE:
- // To test Firebug Lite in Firefox, set console = null;
- //
- // example:
- // Supports inline objects in object inspector window (only simple trace of dom nodes, however)
- // | console.log("my object", {foo:"bar"})
- // example:
- // Option for console to open in popup window
- // | var djConfig = {isDebug: true, popup:true };
- // example:
- // Option for console height (ignored for popup)
- // | var djConfig = {isDebug: true, debugHeight:100 };
-
-if(
- (
- (!("console" in window)) ||
- (!("firebug" in console))
- )&&
- (
- (djConfig["noFirebugLite"] !== true)
- )
-){
-(function(){
- // don't build a firebug frame in iframes
- try{
- if(window != window.parent){
- // but if we've got a parent logger, connect to it
- if(window.parent["console"]){
- window.console = window.parent.console;
- }
- return;
- }
- }catch(e){}
-
- window.console = {
- log: function(){
- // summary:
- // Sends arguments to console.
- logFormatted(arguments, "");
- },
-
- debug: function(){
- // summary:
- // Sends arguments to console. Missing finctionality to show script line of trace.
- logFormatted(arguments, "debug");
- },
-
- info: function(){
- // summary:
- // Sends arguments to console, highlighted with (I) icon.
- logFormatted(arguments, "info");
- },
-
- warn: function(){
- // summary:
- // Sends warning arguments to console, highlighted with (!) icon and blue style.
- logFormatted(arguments, "warning");
- },
-
- error: function(){
- // summary:
- // Sends error arguments (object) to console, highlighted with (X) icon and yellow style
- // NEW: error object now displays in object inspector
- logFormatted(arguments, "error");
- },
-
- assert: function(truth, message){
- // summary:
- // Tests for true. Throws exception if false.
- if(!truth){
- var args = [];
- for(var i = 1; i < arguments.length; ++i){
- args.push(arguments[i]);
- }
-
- logFormatted(args.length ? args : ["Assertion Failure"], "error");
- throw message ? message : "Assertion Failure";
- }
- },
-
- dir: function(object){
- // summary:
- // Traces object. Only partially implemented.
- var html = [];
-
- var pairs = [];
- for(var name in object){
- try{
- pairs.push([name, object[name]]);
- }catch(e){
- /* squelch */
- }
- }
-
- pairs.sort(function(a, b){
- return a[0] < b[0] ? -1 : 1;
- });
-
- html.push('<table>');
- for(var i = 0; i < pairs.length; ++i){
- var name = pairs[i][0], value = pairs[i][1];
-
- html.push('<tr>',
- '<td class="propertyNameCell"><span class="propertyName">',
- escapeHTML(name), '</span></td>', '<td><span class="propertyValue">');
- appendObject(value, html);
- html.push('</span></td></tr>');
- }
- html.push('</table>');
-
- logRow(html, "dir");
- },
-
- dirxml: function(node){
- // summary:
- //
- var html = [];
-
- appendNode(node, html);
- logRow(html, "dirxml");
- },
-
- group: function(){
- // summary:
- // collects log messages into a group, starting with this call and ending with
- // groupEnd(). Missing collapse functionality
- logRow(arguments, "group", pushGroup);
- },
-
- groupEnd: function(){
- // summary:
- // Closes group. See above
- logRow(arguments, "", popGroup);
- },
-
- time: function(name){
- // summary:
- // Starts timers assigned to name given in argument. Timer stops and displays on timeEnd(title);
- // example:
- // | console.time("load");
- // | console.time("myFunction");
- // | console.timeEnd("load");
- // | console.timeEnd("myFunction");
- timeMap[name] = (new Date()).getTime();
- },
-
- timeEnd: function(name){
- // summary:
- // See above.
- if(name in timeMap){
- var delta = (new Date()).getTime() - timeMap[name];
- logFormatted([name+ ":", delta+"ms"]);
- delete timeMap[name];
- }
- },
-
- count: function(){
- // summary:
- // Not supported
- this.warn(["count() not supported."]);
- },
-
- trace: function(){
- // summary:
- // Not supported
- this.warn(["trace() not supported."]);
- },
-
- profile: function(){
- // summary:
- // Not supported
- this.warn(["profile() not supported."]);
- },
-
- profileEnd: function(){ },
-
- clear: function(){
- // summary:
- // Clears message console. Do not call this directly
- consoleBody.innerHTML = "";
- },
-
- open: function(){
- // summary:
- // Opens message console. Do not call this directly
- toggleConsole(true);
- },
-
- close: function(){
- // summary:
- // Closes message console. Do not call this directly
- if(frameVisible){
- toggleConsole();
- }
- },
- closeObjectInspector:function(){
- // summary:
- // Closes object inspector and opens message console. Do not call this directly
- consoleObjectInspector.innerHTML = "";
- consoleObjectInspector.style.display = "none";
- consoleBody.style.display = "block";
- }
- };
-
- // ***************************************************************************
-
- // using global objects so they can be accessed
- // most of the objects in this script are run anonomously
- var _firebugDoc = document;
- var _firebugWin = window;
- var __consoleAnchorId__ = 0;
-
- var consoleFrame = null;
- var consoleBody = null;
- var commandLine = null;
-
- var frameVisible = false;
- var messageQueue = [];
- var groupStack = [];
- var timeMap = {};
-
- var clPrefix = ">>> ";
-
- // ***************************************************************************
-
- function toggleConsole(forceOpen){
- frameVisible = forceOpen || !frameVisible;
- if(consoleFrame){
- consoleFrame.style.display = frameVisible ? "block" : "none";
- }
- }
-
- function focusCommandLine(){
- toggleConsole(true);
- if(commandLine){
- commandLine.focus();
- }
- }
-
- openWin = function(){
- var win = window.open("","_firebug","status=0,menubar=0,resizable=1,width=640,height=480,scrollbars=1,addressbar=0");
- var newDoc=win.document;
- HTMLstring='<html><head><title>Firebug Lite</title></head>\n';
- HTMLstring+='<body bgColor="#CCCCCC">\n';
- //Testing access to dojo from the popup window
- /*HTMLstring+='<button onclick="(function(){ console.log(dojo.version.toString()); })()">Test Parent Dojo</button>\n';*/
- HTMLstring+='<div id="fb"></div>';
- HTMLstring+='</body></html>';
-
-
- newDoc.write(HTMLstring);
- newDoc.close();
- return win;
-
- }
-
- function createFrame(){
- if(consoleFrame){
- return;
- }
-
- if(djConfig.popup){
- _firebugWin = openWin();
- _firebugDoc = _firebugWin.document;
- djConfig.debugContainerId = 'fb';
- var containerHeight = "100%";
-
- // connecting popup
- _firebugWin.console = window.console;
- _firebugWin.dojo = window.dojo;
-
- }else{
- _firebugDoc = document;
- var containerHeight = (djConfig.debugHeight) ? djConfig.debugHeight + "px" :"300px";
- }
-
- var styleElement = _firebugDoc.createElement("link");
- styleElement.href = dojo.moduleUrl("dojo._firebug", "firebug.css");
- styleElement.rel = "stylesheet";
- styleElement.type = "text/css";
- var styleParent = _firebugDoc.getElementsByTagName("head");
- if(styleParent){
- styleParent = styleParent[0];
- }
- if(!styleParent){
- styleParent = _firebugDoc.getElementsByTagName("html")[0];
- }
- if(dojo.isIE){
- window.setTimeout(function(){ styleParent.appendChild(styleElement); }, 0);
- }else{
- styleParent.appendChild(styleElement);
- }
-
- if(typeof djConfig != "undefined" && djConfig["debugContainerId"]){
- consoleFrame = _firebugDoc.getElementById(djConfig.debugContainerId);
- }
- if(!consoleFrame){
- consoleFrame = _firebugDoc.createElement("div");
- _firebugDoc.body.appendChild(consoleFrame);
- }
- consoleFrame.className += " firebug";
- consoleFrame.style.height = containerHeight;
- consoleFrame.style.display = (frameVisible ? "block" : "none");
-
- var closeStr = (djConfig.popup) ? "" : ' <a href="#" onclick="console.close(); return false;">Close</a>';
- consoleFrame.innerHTML =
- '<div id="firebugToolbar">'
- + ' <a href="#" onclick="console.clear(); return false;">Clear</a>'
- + ' <span class="firebugToolbarRight">'
- + closeStr
- + ' </span>'
- + '</div>'
- + '<input type="text" id="firebugCommandLine">'
- + '<div id="firebugLog"></div>'
- + '<div id="objectLog" style="display:none;"></div>';
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- var toolbar = _firebugDoc.getElementById("firebugToolbar");
- toolbar.onmousedown = onSplitterMouseDown;
-
- commandLine = _firebugDoc.getElementById("firebugCommandLine");
- addEvent(commandLine, "keydown", onCommandLineKeyDown);
-
- addEvent(_firebugDoc, dojo.isIE || dojo.isSafari ? "keydown" : "keypress", onKeyDown);
-
- consoleBody = _firebugDoc.getElementById("firebugLog");
- consoleObjectInspector = _firebugDoc.getElementById("objectLog");
-
- layout();
- flush();
- }
-
- dojo.addOnLoad(createFrame);
-
- function evalCommandLine(){
- var text = commandLine.value;
- commandLine.value = "";
-
- logRow([clPrefix, text], "command");
-
- var value;
- try{
- value = eval(text);
- }catch(e){
- console.debug(e);
- /* squelch */
- }
-
- console.log(value);
- }
-
- function layout(){
- var toolbar = consoleBody.ownerDocument.getElementById("firebugToolbar");
- var height = consoleFrame.offsetHeight - (toolbar.offsetHeight + commandLine.offsetHeight);
- consoleBody.style.top = toolbar.offsetHeight + "px";
- consoleBody.style.height = height + "px";
-
- commandLine.style.top = (consoleFrame.offsetHeight - commandLine.offsetHeight) + "px";
- }
-
- function logRow(message, className, handler){
- if(consoleBody){
- writeMessage(message, className, handler);
- }else{
- messageQueue.push([message, className, handler]);
- }
- }
-
- function flush(){
- var queue = messageQueue;
- messageQueue = [];
-
- for(var i = 0; i < queue.length; ++i){
- writeMessage(queue[i][0], queue[i][1], queue[i][2]);
- }
- }
-
- function writeMessage(message, className, handler){
- var isScrolledToBottom =
- consoleBody.scrollTop + consoleBody.offsetHeight >= consoleBody.scrollHeight;
-
- handler = handler||writeRow;
-
- handler(message, className);
-
- if(isScrolledToBottom){
- consoleBody.scrollTop = consoleBody.scrollHeight - consoleBody.offsetHeight;
- }
- }
-
- function appendRow(row){
- var container = groupStack.length ? groupStack[groupStack.length-1] : consoleBody;
- container.appendChild(row);
- }
-
- function writeRow(message, className){
- var row = consoleBody.ownerDocument.createElement("div");
- row.className = "logRow" + (className ? " logRow-"+className : "");
- row.innerHTML = message.join("");
- appendRow(row);
- }
-
- function pushGroup(message, className){
- logFormatted(message, className);
-
- var groupRow = consoleBody.ownerDocument.createElement("div");
- groupRow.className = "logGroup";
- var groupRowBox = consoleBody.ownerDocument.createElement("div");
- groupRowBox.className = "logGroupBox";
- groupRow.appendChild(groupRowBox);
- appendRow(groupRowBox);
- groupStack.push(groupRowBox);
- }
-
- function popGroup(){
- groupStack.pop();
- }
-
- // ***************************************************************************
-
- function logFormatted(objects, className){
- var html = [];
-
- var format = objects[0];
- var objIndex = 0;
-
- if(typeof(format) != "string"){
- format = "";
- objIndex = -1;
- }
-
- var parts = parseFormat(format);
-
- for(var i = 0; i < parts.length; ++i){
- var part = parts[i];
- if(part && typeof(part) == "object"){
- var object = objects[++objIndex];
- part.appender(object, html);
- }else{
- appendText(part, html);
- }
- }
-
-
- var ids = [];
- var obs = [];
- for(var i = objIndex+1; i < objects.length; ++i){
- appendText(" ", html);
-
- var object = objects[i];
- if(!object){ continue; }
- if(typeof(object) == "string"){
- appendText(object, html);
-
- }else if(object.nodeType == 1){
- // simple tracing of dom nodes
- appendText("< "+object.tagName+" id=\""+ object.id+"\" />", html);
-
- }else{
- // Create link for object inspector
- // need to create an ID for this link, since it is currently text
- var id = "_a" + __consoleAnchorId__++;
- ids.push(id);
- // need to save the object, so the arrays line up
- obs.push(object)
- var str = '<a id="'+id+'" href="javascript:void(0);">'+getObjectAbbr(object)+'</a>';
-
- appendLink( str , html);
- }
- }
-
- logRow(html, className);
-
- // Now that the row is inserted in the DOM, loop through all of the links that were just created
- for(var i=0; i<ids.length; i++){
- var btn = _firebugDoc.getElementById(ids[i]);
- if(!btn){ continue; }
-
- // store the object in the dom btn for reference later
- // avoid parsing these objects unless necessary
- btn.obj = obs[i];
-
- dojo.connect(btn, "onclick", function(){
- // hide rows
- consoleBody.style.display = "none";
- consoleObjectInspector.style.display = "block";
- // create a back button
- var bkBtn = '<a href="javascript:console.closeObjectInspector();">&nbsp;<<&nbsp;Back</a>';
- consoleObjectInspector.innerHTML = bkBtn + "<pre>" + printObject( this.obj ) + "</pre>";
-
- })
-
- }
- }
-
- function parseFormat(format){
- var parts = [];
-
- var reg = /((^%|[^\\]%)(\d+)?(\.)([a-zA-Z]))|((^%|[^\\]%)([a-zA-Z]))/;
- var appenderMap = {s: appendText, d: appendInteger, i: appendInteger, f: appendFloat};
-
- for(var m = reg.exec(format); m; m = reg.exec(format)){
- var type = m[8] ? m[8] : m[5];
- var appender = type in appenderMap ? appenderMap[type] : appendObject;
- var precision = m[3] ? parseInt(m[3]) : (m[4] == "." ? -1 : 0);
-
- parts.push(format.substr(0, m[0][0] == "%" ? m.index : m.index+1));
- parts.push({appender: appender, precision: precision});
-
- format = format.substr(m.index+m[0].length);
- }
-
- parts.push(format);
-
- return parts;
- }
-
- function escapeHTML(value){
- function replaceChars(ch){
- switch(ch){
- case "<":
- return "&lt;";
- case ">":
- return "&gt;";
- case "&":
- return "&amp;";
- case "'":
- return "&#39;";
- case '"':
- return "&quot;";
- }
- return "?";
- };
- return String(value).replace(/[<>&"']/g, replaceChars);
- }
-
- function objectToString(object){
- try{
- return object+"";
- }catch(e){
- return null;
- }
- }
-
- // ***************************************************************************
- function appendLink(object, html){
- // needed for object links - no HTML escaping
- html.push( objectToString(object) );
- }
-
- function appendText(object, html){
- html.push(escapeHTML(objectToString(object)));
- }
-
- function appendNull(object, html){
- html.push('<span class="objectBox-null">', escapeHTML(objectToString(object)), '</span>');
- }
-
- function appendString(object, html){
- html.push('<span class="objectBox-string">&quot;', escapeHTML(objectToString(object)),
- '&quot;</span>');
- }
-
- function appendInteger(object, html){
- html.push('<span class="objectBox-number">', escapeHTML(objectToString(object)), '</span>');
- }
-
- function appendFloat(object, html){
- html.push('<span class="objectBox-number">', escapeHTML(objectToString(object)), '</span>');
- }
-
- function appendFunction(object, html){
- var reName = /function ?(.*?)\(/;
- var m = reName.exec(objectToString(object));
- var name = m ? m[1] : "function";
- html.push('<span class="objectBox-function">', escapeHTML(name), '()</span>');
- }
-
- function appendObject(object, html){
- try{
- if(object == undefined){
- appendNull("undefined", html);
- }else if(object == null){
- appendNull("null", html);
- }else if(typeof object == "string"){
- appendString(object, html);
- }else if(typeof object == "number"){
- appendInteger(object, html);
- }else if(typeof object == "function"){
- appendFunction(object, html);
- }else if(object.nodeType == 1){
- appendSelector(object, html);
- }else if(typeof object == "object"){
- appendObjectFormatted(object, html);
- }else{
- appendText(object, html);
- }
- }catch(e){
- /* squelch */
- }
- }
-
- function appendObjectFormatted(object, html){
- var text = objectToString(object);
- var reObject = /\[object (.*?)\]/;
-
- var m = reObject.exec(text);
- html.push('<span class="objectBox-object">', m ? m[1] : text, '</span>')
- }
-
- function appendSelector(object, html){
- html.push('<span class="objectBox-selector">');
-
- html.push('<span class="selectorTag">', escapeHTML(object.nodeName.toLowerCase()), '</span>');
- if(object.id){
- html.push('<span class="selectorId">#', escapeHTML(object.id), '</span>');
- }
- if(object.className){
- html.push('<span class="selectorClass">.', escapeHTML(object.className), '</span>');
- }
-
- html.push('</span>');
- }
-
- function appendNode(node, html){
- if(node.nodeType == 1){
- html.push(
- '<div class="objectBox-element">',
- '&lt;<span class="nodeTag">', node.nodeName.toLowerCase(), '</span>');
-
- for(var i = 0; i < node.attributes.length; ++i){
- var attr = node.attributes[i];
- if(!attr.specified){ continue; }
-
- html.push('&nbsp;<span class="nodeName">', attr.nodeName.toLowerCase(),
- '</span>=&quot;<span class="nodeValue">', escapeHTML(attr.nodeValue),
- '</span>&quot;')
- }
-
- if(node.firstChild){
- html.push('&gt;</div><div class="nodeChildren">');
-
- for(var child = node.firstChild; child; child = child.nextSibling){
- appendNode(child, html);
- }
-
- html.push('</div><div class="objectBox-element">&lt;/<span class="nodeTag">',
- node.nodeName.toLowerCase(), '&gt;</span></div>');
- }else{
- html.push('/&gt;</div>');
- }
- }else if (node.nodeType == 3){
- html.push('<div class="nodeText">', escapeHTML(node.nodeValue),
- '</div>');
- }
- }
-
- // ***************************************************************************
-
- function addEvent(object, name, handler){
- if(document.all){
- object.attachEvent("on"+name, handler);
- }else{
- object.addEventListener(name, handler, false);
- }
- }
-
- function removeEvent(object, name, handler){
- if(document.all){
- object.detachEvent("on"+name, handler);
- }else{
- object.removeEventListener(name, handler, false);
- }
- }
-
- function cancelEvent(event){
- if(document.all){
- event.cancelBubble = true;
- }else{
- event.stopPropagation();
- }
- }
-
- function onError(msg, href, lineNo){
- var html = [];
-
- var lastSlash = href.lastIndexOf("/");
- var fileName = lastSlash == -1 ? href : href.substr(lastSlash+1);
-
- html.push(
- '<span class="errorMessage">', msg, '</span>',
- '<div class="objectBox-sourceLink">', fileName, ' (line ', lineNo, ')</div>'
- );
-
- logRow(html, "error");
- };
-
-
- //After converting to div instead of iframe, now getting two keydowns right away in IE 6.
- //Make sure there is a little bit of delay.
- var onKeyDownTime = (new Date()).getTime();
-
- function onKeyDown(event){
- var timestamp = (new Date()).getTime();
- if(timestamp > onKeyDownTime + 200){
- var event = dojo.fixEvent(event);
- var keys = dojo.keys;
- var ekc = event.keyCode;
- onKeyDownTime = timestamp;
- if(ekc == keys.F12){
- toggleConsole();
- }else if(
- (ekc == keys.NUMPAD_ENTER || ekc == 76) &&
- event.shiftKey &&
- (event.metaKey || event.ctrlKey)
- ){
- focusCommandLine();
- }else{
- return;
- }
- cancelEvent(event);
- }
- }
-
-
- function onSplitterMouseDown(event){
- if(dojo.isSafari || dojo.isOpera){
- return;
- }
-
- addEvent(document, "mousemove", onSplitterMouseMove);
- addEvent(document, "mouseup", onSplitterMouseUp);
-
- for(var i = 0; i < frames.length; ++i){
- addEvent(frames[i].document, "mousemove", onSplitterMouseMove);
- addEvent(frames[i].document, "mouseup", onSplitterMouseUp);
- }
- }
-
- function onSplitterMouseMove(event){
- var win = document.all
- ? event.srcElement.ownerDocument.parentWindow
- : event.target.ownerDocument.defaultView;
-
- var clientY = event.clientY;
- if(win != win.parent){
- clientY += win.frameElement ? win.frameElement.offsetTop : 0;
- }
-
- var height = consoleFrame.offsetTop + consoleFrame.clientHeight;
- var y = height - clientY;
-
- consoleFrame.style.height = y + "px";
- layout();
- }
-
- function onSplitterMouseUp(event){
- removeEvent(document, "mousemove", onSplitterMouseMove);
- removeEvent(document, "mouseup", onSplitterMouseUp);
-
- for(var i = 0; i < frames.length; ++i){
- removeEvent(frames[i].document, "mousemove", onSplitterMouseMove);
- removeEvent(frames[i].document, "mouseup", onSplitterMouseUp);
- }
- }
-
- function onCommandLineKeyDown(event){
- if(event.keyCode == 13){
- evalCommandLine();
- }else if(event.keyCode == 27){
- commandLine.value = "";
- }
- }
- //***************************************************************************************************
- // Print Object Helpers
- getAtts = function(o){
- //Get amount of items in an object
- if(dojo.isArray(o)) {
- return "[array with " + o.length + " slots]";
- }else{
- var i = 0;
- for(var nm in o){
- i++;
- }
- return "{object with " + i + " items}";
- }
- }
-
- printObject = function(o, i, txt){
-
- // Recursively trace object, indenting to represent depth for display in object inspector
- // TODO: counter to prevent overly complex or looped objects (will probably help with dom nodes)
- var br = "\n"; // using a <pre>... otherwise we'd need a <br />
- var ind = " ";
- txt = (txt) ? txt : "";
- i = (i) ? i : ind;
- for(var nm in o){
- if(typeof(o[nm]) == "object"){
- txt += i+nm +" -> " + getAtts(o[nm]) + br;
- txt += printObject(o[nm], i+ind);
- }else{
- txt += i+nm +" : "+o[nm] + br;
- }
- }
- return txt;
- }
-
-
- getObjectAbbr = function(obj){
- // Gets an abbreviation of an object for display in log
- // X items in object, including id
- // X items in an array
- // TODO: Firebug Sr. actually goes by char count
- var isError = (obj instanceof Error);
- var nm = obj.id || obj.name || obj.ObjectID || obj.widgetId;
- if(!isError && nm){ return "{"+nm+"}"; }
-
- var obCnt = 2;
- var arCnt = 4;
- var cnt = 0;
-
- if(isError){
- nm = "[ Error: "+(obj["message"]||obj["description"]||obj)+" ]";
- }else if(dojo.isArray(obj)){
- nm ="[";
- for(var i=0;i<obj.length;i++){
- nm+=obj[i]+","
- if(i>arCnt){
- nm+=" ... ("+obj.length+" items)";
- break;
- }
- }
- nm+="]";
- }else if((!dojo.isObject(obj))||dojo.isString(obj)){
- nm = obj+"";
- }else{
- nm = "{";
- for(var i in obj){
- cnt++
- if(cnt > obCnt) break;
- nm += i+"="+obj[i]+" ";
- }
- nm+="}"
- }
-
- return nm;
- }
-
- //*************************************************************************************
-
- window.onerror = onError;
- addEvent(document, dojo.isIE || dojo.isSafari ? "keydown" : "keypress", onKeyDown);
-
- if( (document.documentElement.getAttribute("debug") == "true")||
- (djConfig.isDebug)
- ){
- toggleConsole(true);
- }
+if(!dojo._hasResource["dojo._firebug.firebug"]){
+dojo._hasResource["dojo._firebug.firebug"]=true;
+dojo.provide("dojo._firebug.firebug");
+dojo.deprecated=function(_1,_2,_3){
+var _4="DEPRECATED: "+_1;
+if(_2){
+_4+=" "+_2;
+}
+if(_3){
+_4+=" -- will be removed in version: "+_3;
+}
+console.warn(_4);
+};
+dojo.experimental=function(_5,_6){
+var _7="EXPERIMENTAL: "+_5+" -- APIs subject to change without notice.";
+if(_6){
+_7+=" "+_6;
+}
+console.warn(_7);
+};
+(function(){
+var _8=(/Trident/.test(window.navigator.userAgent));
+if(_8){
+var _9=["log","info","debug","warn","error"];
+for(var i=0;i<_9.length;i++){
+var m=_9[i];
+var n="_"+_9[i];
+console[n]=console[m];
+console[m]=(function(){
+var _a=n;
+return function(){
+console[_a](Array.prototype.slice.call(arguments).join(" "));
+};
})();
}
-
+try{
+console.clear();
+}
+catch(e){
+}
+}
+if(!dojo.isFF&&(!dojo.isChrome||dojo.isChrome<3)&&(!dojo.isSafari||dojo.isSafari<4)&&!_8&&!window.firebug&&(typeof console!="undefined"&&!console.firebug)&&!dojo.config.useCustomLogger&&!dojo.isAIR){
+try{
+if(window!=window.parent){
+if(window.parent["console"]){
+window.console=window.parent.console;
+}
+return;
+}
+}
+catch(e){
+}
+var _b=document;
+var _c=window;
+var _d=0;
+var _e=null;
+var _f=null;
+var _10=null;
+var _11=null;
+var _12=null;
+var _13=null;
+var _14=false;
+var _15=[];
+var _16=[];
+var _17={};
+var _18={};
+var _19=null;
+var _1a;
+var _1b;
+var _1c=false;
+var _1d=null;
+var _1e=document.createElement("div");
+var _1f;
+var _20;
+window.console={_connects:[],log:function(){
+_21(arguments,"");
+},debug:function(){
+_21(arguments,"debug");
+},info:function(){
+_21(arguments,"info");
+},warn:function(){
+_21(arguments,"warning");
+},error:function(){
+_21(arguments,"error");
+},assert:function(_22,_23){
+if(!_22){
+var _24=[];
+for(var i=1;i<arguments.length;++i){
+_24.push(arguments[i]);
+}
+_21(_24.length?_24:["Assertion Failure"],"error");
+throw _23?_23:"Assertion Failure";
+}
+},dir:function(obj){
+var str=_25(obj);
+str=str.replace(/\n/g,"<br />");
+str=str.replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;");
+_26([str],"dir");
+},dirxml:function(_27){
+var _28=[];
+_29(_27,_28);
+_26(_28,"dirxml");
+},group:function(){
+_26(arguments,"group",_2a);
+},groupEnd:function(){
+_26(arguments,"",_2b);
+},time:function(_2c){
+_17[_2c]=new Date().getTime();
+},timeEnd:function(_2d){
+if(_2d in _17){
+var _2e=(new Date()).getTime()-_17[_2d];
+_21([_2d+":",_2e+"ms"]);
+delete _17[_2d];
+}
+},count:function(_2f){
+if(!_18[_2f]){
+_18[_2f]=0;
+}
+_18[_2f]++;
+_21([_2f+": "+_18[_2f]]);
+},trace:function(_30){
+var _31=_30||3;
+var f=console.trace.caller;
+for(var i=0;i<_31;i++){
+var _32=f.toString();
+var _33=[];
+for(var a=0;a<f.arguments.length;a++){
+_33.push(f.arguments[a]);
+}
+if(f.arguments.length){
+}else{
+}
+f=f.caller;
+}
+},profile:function(){
+this.warn(["profile() not supported."]);
+},profileEnd:function(){
+},clear:function(){
+if(_f){
+while(_f.childNodes.length){
+dojo.destroy(_f.firstChild);
+}
+}
+dojo.forEach(this._connects,dojo.disconnect);
+},open:function(){
+_34(true);
+},close:function(){
+if(_14){
+_34();
+}
+},_restoreBorder:function(){
+if(_1f){
+_1f.style.border=_20;
+}
+},openDomInspector:function(){
+_1c=true;
+_f.style.display="none";
+_19.style.display="block";
+_10.style.display="none";
+document.body.style.cursor="pointer";
+_1a=dojo.connect(document,"mousemove",function(evt){
+if(!_1c){
+return;
+}
+if(!_1d){
+_1d=setTimeout(function(){
+_1d=null;
+},50);
+}else{
+return;
+}
+var _35=evt.target;
+if(_35&&(_1f!==_35)){
+var _36=true;
+console._restoreBorder();
+var _37=[];
+_29(_35,_37);
+_19.innerHTML=_37.join("");
+_1f=_35;
+_20=_1f.style.border;
+_1f.style.border="#0000FF 1px solid";
+}
+});
+setTimeout(function(){
+_1b=dojo.connect(document,"click",function(evt){
+document.body.style.cursor="";
+_1c=!_1c;
+dojo.disconnect(_1b);
+});
+},30);
+},_closeDomInspector:function(){
+document.body.style.cursor="";
+dojo.disconnect(_1a);
+dojo.disconnect(_1b);
+_1c=false;
+console._restoreBorder();
+},openConsole:function(){
+_f.style.display="block";
+_19.style.display="none";
+_10.style.display="none";
+console._closeDomInspector();
+},openObjectInspector:function(){
+_f.style.display="none";
+_19.style.display="none";
+_10.style.display="block";
+console._closeDomInspector();
+},recss:function(){
+var i,a,s;
+a=document.getElementsByTagName("link");
+for(i=0;i<a.length;i++){
+s=a[i];
+if(s.rel.toLowerCase().indexOf("stylesheet")>=0&&s.href){
+var h=s.href.replace(/(&|%5C?)forceReload=\d+/,"");
+s.href=h+(h.indexOf("?")>=0?"&":"?")+"forceReload="+new Date().valueOf();
+}
+}
+}};
+function _34(_38){
+_14=_38||!_14;
+if(_e){
+_e.style.display=_14?"block":"none";
+}
+};
+function _39(){
+_34(true);
+if(_12){
+_12.focus();
+}
+};
+function _3a(x,y,w,h){
+var win=window.open("","_firebug","status=0,menubar=0,resizable=1,top="+y+",left="+x+",width="+w+",height="+h+",scrollbars=1,addressbar=0");
+if(!win){
+var msg="Firebug Lite could not open a pop-up window, most likely because of a blocker.\n"+"Either enable pop-ups for this domain, or change the djConfig to popup=false.";
+alert(msg);
+}
+_3b(win);
+var _3c=win.document;
+var _3d="<html style=\"height:100%;\"><head><title>Firebug Lite</title></head>\n"+"<body bgColor=\"#ccc\" style=\"height:97%;\" onresize=\"opener.onFirebugResize()\">\n"+"<div id=\"fb\"></div>"+"</body></html>";
+_3c.write(_3d);
+_3c.close();
+return win;
+};
+function _3b(wn){
+var d=new Date();
+d.setTime(d.getTime()+(60*24*60*60*1000));
+d=d.toUTCString();
+var dc=wn.document,_3e;
+if(wn.innerWidth){
+_3e=function(){
+return {w:wn.innerWidth,h:wn.innerHeight};
+};
+}else{
+if(dc.documentElement&&dc.documentElement.clientWidth){
+_3e=function(){
+return {w:dc.documentElement.clientWidth,h:dc.documentElement.clientHeight};
+};
+}else{
+if(dc.body){
+_3e=function(){
+return {w:dc.body.clientWidth,h:dc.body.clientHeight};
+};
+}
+}
+}
+window.onFirebugResize=function(){
+_4c(_3e().h);
+clearInterval(wn._firebugWin_resize);
+wn._firebugWin_resize=setTimeout(function(){
+var x=wn.screenLeft,y=wn.screenTop,w=wn.outerWidth||wn.document.body.offsetWidth,h=wn.outerHeight||wn.document.body.offsetHeight;
+document.cookie="_firebugPosition="+[x,y,w,h].join(",")+"; expires="+d+"; path=/";
+},5000);
+};
+};
+function _3f(){
+if(_e){
+return;
+}
+if(dojo.config.popup){
+var _40="100%";
+var _41=document.cookie.match(/(?:^|; )_firebugPosition=([^;]*)/);
+var p=_41?_41[1].split(","):[2,2,320,480];
+_c=_3a(p[0],p[1],p[2],p[3]);
+_b=_c.document;
+dojo.config.debugContainerId="fb";
+_c.console=window.console;
+_c.dojo=window.dojo;
+}else{
+_b=document;
+_40=(dojo.config.debugHeight||300)+"px";
+}
+var _42=_b.createElement("link");
+_42.href=dojo.moduleUrl("dojo._firebug","firebug.css");
+_42.rel="stylesheet";
+_42.type="text/css";
+var _43=_b.getElementsByTagName("head");
+if(_43){
+_43=_43[0];
+}
+if(!_43){
+_43=_b.getElementsByTagName("html")[0];
+}
+if(dojo.isIE){
+window.setTimeout(function(){
+_43.appendChild(_42);
+},0);
+}else{
+_43.appendChild(_42);
+}
+if(dojo.config.debugContainerId){
+_e=_b.getElementById(dojo.config.debugContainerId);
+}
+if(!_e){
+_e=_b.createElement("div");
+_b.body.appendChild(_e);
+}
+_e.className+=" firebug";
+_e.style.height=_40;
+_e.style.display=(_14?"block":"none");
+var _44=function(_45,_46,_47,_48){
+return "<li class=\""+_48+"\"><a href=\"javascript:void(0);\" onclick=\"console."+_47+"(); return false;\" title=\""+_46+"\">"+_45+"</a></li>";
+};
+_e.innerHTML="<div id=\"firebugToolbar\">"+" <ul id=\"fireBugTabs\" class=\"tabs\">"+_44("Clear","Remove All Console Logs","clear","")+_44("ReCSS","Refresh CSS without reloading page","recss","")+_44("Console","Show Console Logs","openConsole","gap")+_44("DOM","Show DOM Inspector","openDomInspector","")+_44("Object","Show Object Inspector","openObjectInspector","")+((dojo.config.popup)?"":_44("Close","Close the console","close","gap"))+"\t</ul>"+"</div>"+"<input type=\"text\" id=\"firebugCommandLine\" />"+"<div id=\"firebugLog\"></div>"+"<div id=\"objectLog\" style=\"display:none;\">Click on an object in the Log display</div>"+"<div id=\"domInspect\" style=\"display:none;\">Hover over HTML elements in the main page. Click to hold selection.</div>";
+_13=_b.getElementById("firebugToolbar");
+_12=_b.getElementById("firebugCommandLine");
+_49(_12,"keydown",_4a);
+_49(_b,dojo.isIE||dojo.isSafari?"keydown":"keypress",_4b);
+_f=_b.getElementById("firebugLog");
+_10=_b.getElementById("objectLog");
+_19=_b.getElementById("domInspect");
+_11=_b.getElementById("fireBugTabs");
+_4c();
+_4d();
+};
+dojo.addOnLoad(_3f);
+function _4e(){
+_b=null;
+if(_c.console){
+_c.console.clear();
+}
+_c=null;
+_e=null;
+_f=null;
+_10=null;
+_19=null;
+_12=null;
+_15=[];
+_16=[];
+_17={};
+};
+function _4f(){
+var _50=_12.value;
+_12.value="";
+_26(["> ",_50],"command");
+var _51;
+try{
+_51=eval(_50);
+}
+catch(e){
+}
+};
+function _4c(h){
+var _52=25;
+var _53=h?h-(_52+_12.offsetHeight+25+(h*0.01))+"px":(_e.offsetHeight-_52-_12.offsetHeight)+"px";
+_f.style.top=_52+"px";
+_f.style.height=_53;
+_10.style.height=_53;
+_10.style.top=_52+"px";
+_19.style.height=_53;
+_19.style.top=_52+"px";
+_12.style.bottom=0;
+dojo.addOnWindowUnload(_4e);
+};
+function _26(_54,_55,_56){
+if(_f){
+_57(_54,_55,_56);
+}else{
+_15.push([_54,_55,_56]);
+}
+};
+function _4d(){
+var _58=_15;
+_15=[];
+for(var i=0;i<_58.length;++i){
+_57(_58[i][0],_58[i][1],_58[i][2]);
+}
+};
+function _57(_59,_5a,_5b){
+var _5c=_f.scrollTop+_f.offsetHeight>=_f.scrollHeight;
+_5b=_5b||_5d;
+_5b(_59,_5a);
+if(_5c){
+_f.scrollTop=_f.scrollHeight-_f.offsetHeight;
+}
+};
+function _5e(row){
+var _5f=_16.length?_16[_16.length-1]:_f;
+_5f.appendChild(row);
+};
+function _5d(_60,_61){
+var row=_f.ownerDocument.createElement("div");
+row.className="logRow"+(_61?" logRow-"+_61:"");
+row.innerHTML=_60.join("");
+_5e(row);
+};
+function _2a(_62,_63){
+_21(_62,_63);
+var _64=_f.ownerDocument.createElement("div");
+_64.className="logGroupBox";
+_5e(_64);
+_16.push(_64);
+};
+function _2b(){
+_16.pop();
+};
+function _21(_65,_66){
+var _67=[];
+var _68=_65[0];
+var _69=0;
+if(typeof (_68)!="string"){
+_68="";
+_69=-1;
+}
+var _6a=_6b(_68);
+for(var i=0;i<_6a.length;++i){
+var _6c=_6a[i];
+if(_6c&&typeof _6c=="object"){
+_6c.appender(_65[++_69],_67);
+}else{
+_6d(_6c,_67);
+}
+}
+var ids=[];
+var obs=[];
+for(i=_69+1;i<_65.length;++i){
+_6d(" ",_67);
+var _6e=_65[i];
+if(_6e===undefined||_6e===null){
+_6f(_6e,_67);
+}else{
+if(typeof (_6e)=="string"){
+_6d(_6e,_67);
+}else{
+if(_6e instanceof Date){
+_6d(_6e.toString(),_67);
+}else{
+if(_6e.nodeType==9){
+_6d("[ XmlDoc ]",_67);
+}else{
+var id="_a"+_d++;
+ids.push(id);
+obs.push(_6e);
+var str="<a id=\""+id+"\" href=\"javascript:void(0);\">"+_70(_6e)+"</a>";
+_71(str,_67);
+}
+}
+}
+}
+}
+_26(_67,_66);
+for(i=0;i<ids.length;i++){
+var btn=_b.getElementById(ids[i]);
+if(!btn){
+continue;
+}
+btn.obj=obs[i];
+_c.console._connects.push(dojo.connect(btn,"onclick",function(){
+console.openObjectInspector();
+try{
+_25(this.obj);
}
+catch(e){
+this.obj=e;
+}
+_10.innerHTML="<pre>"+_25(this.obj)+"</pre>";
+}));
+}
+};
+function _6b(_72){
+var _73=[];
+var reg=/((^%|[^\\]%)(\d+)?(\.)([a-zA-Z]))|((^%|[^\\]%)([a-zA-Z]))/;
+var _74={s:_6d,d:_75,i:_75,f:_76};
+for(var m=reg.exec(_72);m;m=reg.exec(_72)){
+var _77=m[8]?m[8]:m[5];
+var _78=_77 in _74?_74[_77]:_79;
+var _7a=m[3]?parseInt(m[3]):(m[4]=="."?-1:0);
+_73.push(_72.substr(0,m[0][0]=="%"?m.index:m.index+1));
+_73.push({appender:_78,precision:_7a});
+_72=_72.substr(m.index+m[0].length);
+}
+_73.push(_72);
+return _73;
+};
+function _7b(_7c){
+function _7d(ch){
+switch(ch){
+case "<":
+return "&lt;";
+case ">":
+return "&gt;";
+case "&":
+return "&amp;";
+case "'":
+return "&#39;";
+case "\"":
+return "&quot;";
+}
+return "?";
+};
+return String(_7c).replace(/[<>&"']/g,_7d);
+};
+function _7e(_7f){
+try{
+return _7f+"";
+}
+catch(e){
+return null;
+}
+};
+function _71(_80,_81){
+_81.push(_7e(_80));
+};
+function _6d(_82,_83){
+_83.push(_7b(_7e(_82)));
+};
+function _6f(_84,_85){
+_85.push("<span class=\"objectBox-null\">",_7b(_7e(_84)),"</span>");
+};
+function _86(_87,_88){
+_88.push("<span class=\"objectBox-string\">&quot;",_7b(_7e(_87)),"&quot;</span>");
+};
+function _75(_89,_8a){
+_8a.push("<span class=\"objectBox-number\">",_7b(_7e(_89)),"</span>");
+};
+function _76(_8b,_8c){
+_8c.push("<span class=\"objectBox-number\">",_7b(_7e(_8b)),"</span>");
+};
+function _8d(_8e,_8f){
+_8f.push("<span class=\"objectBox-function\">",_70(_8e),"</span>");
+};
+function _79(_90,_91){
+try{
+if(_90===undefined){
+_6f("undefined",_91);
+}else{
+if(_90===null){
+_6f("null",_91);
+}else{
+if(typeof _90=="string"){
+_86(_90,_91);
+}else{
+if(typeof _90=="number"){
+_75(_90,_91);
+}else{
+if(typeof _90=="function"){
+_8d(_90,_91);
+}else{
+if(_90.nodeType==1){
+_92(_90,_91);
+}else{
+if(typeof _90=="object"){
+_93(_90,_91);
+}else{
+_6d(_90,_91);
+}
+}
+}
+}
+}
+}
+}
+}
+catch(e){
+}
+};
+function _93(_94,_95){
+var _96=_7e(_94);
+var _97=/\[object (.*?)\]/;
+var m=_97.exec(_96);
+_95.push("<span class=\"objectBox-object\">",m?m[1]:_96,"</span>");
+};
+function _92(_98,_99){
+_99.push("<span class=\"objectBox-selector\">");
+_99.push("<span class=\"selectorTag\">",_7b(_98.nodeName.toLowerCase()),"</span>");
+if(_98.id){
+_99.push("<span class=\"selectorId\">#",_7b(_98.id),"</span>");
+}
+if(_98.className){
+_99.push("<span class=\"selectorClass\">.",_7b(_98.className),"</span>");
+}
+_99.push("</span>");
+};
+function _29(_9a,_9b){
+if(_9a.nodeType==1){
+_9b.push("<div class=\"objectBox-element\">","&lt;<span class=\"nodeTag\">",_9a.nodeName.toLowerCase(),"</span>");
+for(var i=0;i<_9a.attributes.length;++i){
+var _9c=_9a.attributes[i];
+if(!_9c.specified){
+continue;
+}
+_9b.push("&nbsp;<span class=\"nodeName\">",_9c.nodeName.toLowerCase(),"</span>=&quot;<span class=\"nodeValue\">",_7b(_9c.nodeValue),"</span>&quot;");
+}
+if(_9a.firstChild){
+_9b.push("&gt;</div><div class=\"nodeChildren\">");
+for(var _9d=_9a.firstChild;_9d;_9d=_9d.nextSibling){
+_29(_9d,_9b);
+}
+_9b.push("</div><div class=\"objectBox-element\">&lt;/<span class=\"nodeTag\">",_9a.nodeName.toLowerCase(),"&gt;</span></div>");
+}else{
+_9b.push("/&gt;</div>");
+}
+}else{
+if(_9a.nodeType==3){
+_9b.push("<div class=\"nodeText\">",_7b(_9a.nodeValue),"</div>");
+}
+}
+};
+function _49(_9e,_9f,_a0){
+if(document.all){
+_9e.attachEvent("on"+_9f,_a0);
+}else{
+_9e.addEventListener(_9f,_a0,false);
+}
+};
+function _a1(_a2,_a3,_a4){
+if(document.all){
+_a2.detachEvent("on"+_a3,_a4);
+}else{
+_a2.removeEventListener(_a3,_a4,false);
+}
+};
+function _a5(_a6){
+if(document.all){
+_a6.cancelBubble=true;
+}else{
+_a6.stopPropagation();
+}
+};
+function _a7(msg,_a8,_a9){
+var _aa=_a8.lastIndexOf("/");
+var _ab=_aa==-1?_a8:_a8.substr(_aa+1);
+var _ac=["<span class=\"errorMessage\">",msg,"</span>","<div class=\"objectBox-sourceLink\">",_ab," (line ",_a9,")</div>"];
+_26(_ac,"error");
+};
+var _ad=new Date().getTime();
+function _4b(_ae){
+var _af=(new Date()).getTime();
+if(_af>_ad+200){
+_ae=dojo.fixEvent(_ae);
+var _b0=dojo.keys;
+var ekc=_ae.keyCode;
+_ad=_af;
+if(ekc==_b0.F12){
+_34();
+}else{
+if((ekc==_b0.NUMPAD_ENTER||ekc==76)&&_ae.shiftKey&&(_ae.metaKey||_ae.ctrlKey)){
+_39();
+}else{
+return;
+}
+}
+_a5(_ae);
+}
+};
+function _4a(e){
+var dk=dojo.keys;
+if(e.keyCode==13&&_12.value){
+_b1(_12.value);
+_4f();
+}else{
+if(e.keyCode==27){
+_12.value="";
+}else{
+if(e.keyCode==dk.UP_ARROW||e.charCode==dk.UP_ARROW){
+_b2("older");
+}else{
+if(e.keyCode==dk.DOWN_ARROW||e.charCode==dk.DOWN_ARROW){
+_b2("newer");
+}else{
+if(e.keyCode==dk.HOME||e.charCode==dk.HOME){
+_b3=1;
+_b2("older");
+}else{
+if(e.keyCode==dk.END||e.charCode==dk.END){
+_b3=999999;
+_b2("newer");
+}
+}
+}
+}
+}
+}
+};
+var _b3=-1;
+var _b4=null;
+function _b1(_b5){
+var _b6=_b7("firebug_history");
+_b6=(_b6)?dojo.fromJson(_b6):[];
+var pos=dojo.indexOf(_b6,_b5);
+if(pos!=-1){
+_b6.splice(pos,1);
+}
+_b6.push(_b5);
+_b7("firebug_history",dojo.toJson(_b6),30);
+while(_b6.length&&!_b7("firebug_history")){
+_b6.shift();
+_b7("firebug_history",dojo.toJson(_b6),30);
+}
+_b4=null;
+_b3=-1;
+};
+function _b2(_b8){
+var _b9=_b7("firebug_history");
+_b9=(_b9)?dojo.fromJson(_b9):[];
+if(!_b9.length){
+return;
+}
+if(_b4===null){
+_b4=_12.value;
+}
+if(_b3==-1){
+_b3=_b9.length;
+}
+if(_b8=="older"){
+--_b3;
+if(_b3<0){
+_b3=0;
+}
+}else{
+if(_b8=="newer"){
+++_b3;
+if(_b3>_b9.length){
+_b3=_b9.length;
+}
+}
+}
+if(_b3==_b9.length){
+_12.value=_b4;
+_b4=null;
+}else{
+_12.value=_b9[_b3];
+}
+};
+function _b7(_ba,_bb){
+var c=document.cookie;
+if(arguments.length==1){
+var _bc=c.match(new RegExp("(?:^|; )"+_ba+"=([^;]*)"));
+return _bc?decodeURIComponent(_bc[1]):undefined;
+}else{
+var d=new Date();
+d.setMonth(d.getMonth()+1);
+document.cookie=_ba+"="+encodeURIComponent(_bb)+((d.toUtcString)?"; expires="+d.toUTCString():"");
+}
+};
+function _bd(it){
+return it&&it instanceof Array||typeof it=="array";
+};
+function _be(o){
+var cnt=0;
+for(var nm in o){
+cnt++;
+}
+return cnt;
+};
+function _25(o,i,txt,_bf){
+var ind=" \t";
+txt=txt||"";
+i=i||ind;
+_bf=_bf||[];
+var _c0;
+if(o&&o.nodeType==1){
+var _c1=[];
+_29(o,_c1);
+return _c1.join("");
+}
+var br=",\n",cnt=0,_c2=_be(o);
+if(o instanceof Date){
+return i+o.toString()+br;
+}
+looking:
+for(var nm in o){
+cnt++;
+if(cnt==_c2){
+br="\n";
+}
+if(o[nm]===window||o[nm]===document){
+continue;
+}else{
+if(o[nm]===null){
+txt+=i+nm+" : NULL"+br;
+}else{
+if(o[nm]&&o[nm].nodeType){
+if(o[nm].nodeType==1){
+}else{
+if(o[nm].nodeType==3){
+txt+=i+nm+" : [ TextNode "+o[nm].data+" ]"+br;
+}
+}
+}else{
+if(typeof o[nm]=="object"&&(o[nm] instanceof String||o[nm] instanceof Number||o[nm] instanceof Boolean)){
+txt+=i+nm+" : "+o[nm]+","+br;
+}else{
+if(o[nm] instanceof Date){
+txt+=i+nm+" : "+o[nm].toString()+br;
+}else{
+if(typeof (o[nm])=="object"&&o[nm]){
+for(var j=0,_c3;_c3=_bf[j];j++){
+if(o[nm]===_c3){
+txt+=i+nm+" : RECURSION"+br;
+continue looking;
+}
+}
+_bf.push(o[nm]);
+_c0=(_bd(o[nm]))?["[","]"]:["{","}"];
+txt+=i+nm+" : "+_c0[0]+"\n";
+txt+=_25(o[nm],i+ind,"",_bf);
+txt+=i+_c0[1]+br;
+}else{
+if(typeof o[nm]=="undefined"){
+txt+=i+nm+" : undefined"+br;
+}else{
+if(nm=="toString"&&typeof o[nm]=="function"){
+var _c4=o[nm]();
+if(typeof _c4=="string"&&_c4.match(/function ?(.*?)\(/)){
+_c4=_7b(_70(o[nm]));
+}
+txt+=i+nm+" : "+_c4+br;
+}else{
+txt+=i+nm+" : "+_7b(_70(o[nm]))+br;
+}
+}
+}
+}
+}
+}
+}
+}
+}
+return txt;
+};
+function _70(obj){
+var _c5=(obj instanceof Error);
+if(obj.nodeType==1){
+return _7b("< "+obj.tagName.toLowerCase()+" id=\""+obj.id+"\" />");
+}
+if(obj.nodeType==3){
+return _7b("[TextNode: \""+obj.nodeValue+"\"]");
+}
+var nm=(obj&&(obj.id||obj.name||obj.ObjectID||obj.widgetId));
+if(!_c5&&nm){
+return "{"+nm+"}";
+}
+var _c6=2;
+var _c7=4;
+var cnt=0;
+if(_c5){
+nm="[ Error: "+(obj.message||obj.description||obj)+" ]";
+}else{
+if(_bd(obj)){
+nm="["+obj.slice(0,_c7).join(",");
+if(obj.length>_c7){
+nm+=" ... ("+obj.length+" items)";
+}
+nm+="]";
+}else{
+if(typeof obj=="function"){
+nm=obj+"";
+var reg=/function\s*([^\(]*)(\([^\)]*\))[^\{]*\{/;
+var m=reg.exec(nm);
+if(m){
+if(!m[1]){
+m[1]="function";
+}
+nm=m[1]+m[2];
+}else{
+nm="function()";
+}
+}else{
+if(typeof obj!="object"||typeof obj=="string"){
+nm=obj+"";
+}else{
+nm="{";
+for(var i in obj){
+cnt++;
+if(cnt>_c6){
+break;
+}
+nm+=i+":"+_7b(obj[i])+" ";
+}
+nm+="}";
+}
+}
+}
+}
+return nm;
+};
+_49(document,dojo.isIE||dojo.isSafari?"keydown":"keypress",_4b);
+if((document.documentElement.getAttribute("debug")=="true")||(dojo.config.isDebug)){
+_34(true);
+}
+dojo.addOnWindowUnload(function(){
+_a1(document,dojo.isIE||dojo.isSafari?"keydown":"keypress",_4b);
+window.onFirebugResize=null;
+window.console=null;
+});
+}
+})();
+}
diff --git a/js/dojo/dojo/back.js b/js/dojo/dojo/back.js
--- a/js/dojo/dojo/back.js
+++ b/js/dojo/dojo/back.js
@@ -1,389 +1,258 @@
-if(!dojo._hasResource["dojo.back"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.back"] = true;
-dojo.provide("dojo.back");
-
-(function() {
-
- var back = dojo.back;
-
- // everyone deals with encoding the hash slightly differently
-
- function getHash(){
- var h = window.location.hash;
- if(h.charAt(0) == "#") { h = h.substring(1); }
- return dojo.isMozilla ? h : decodeURIComponent(h);
- }
-
- function setHash(h){
- if(!h) { h = "" };
- window.location.hash = encodeURIComponent(h);
- historyCounter = history.length;
- }
-
- // if we're in the test for these methods, expose them on dojo.back. ok'd with alex.
- if(dojo.exists("tests.back-hash")){
- back.getHash = getHash;
- back.setHash = setHash;
- }
-
- var initialHref = (typeof(window) !== "undefined") ? window.location.href : "";
- var initialHash = (typeof(window) !== "undefined") ? getHash() : "";
- var initialState = null;
-
- var locationTimer = null;
- var bookmarkAnchor = null;
- var historyIframe = null;
- var forwardStack = [];
- var historyStack = [];
- var moveForward = false;
- var changingUrl = false;
- var historyCounter;
-
- function handleBackButton(){
- //summary: private method. Do not call this directly.
-
- //The "current" page is always at the top of the history stack.
- //console.debug("handlingBackButton");
- var current = historyStack.pop();
- if(!current){ return; }
- var last = historyStack[historyStack.length-1];
- if(!last && historyStack.length == 0){
- last = initialState;
- }
- if(last){
- if(last.kwArgs["back"]){
- last.kwArgs["back"]();
- }else if(last.kwArgs["backButton"]){
- last.kwArgs["backButton"]();
- }else if(last.kwArgs["handle"]){
- last.kwArgs.handle("back");
- }
- }
- forwardStack.push(current);
- //console.debug("done handling back");
- }
-
- back.goBack = handleBackButton;
-
- function handleForwardButton(){
- //summary: private method. Do not call this directly.
- //console.debug("handling forward");
- var last = forwardStack.pop();
- if(!last){ return; }
- if(last.kwArgs["forward"]){
- last.kwArgs.forward();
- }else if(last.kwArgs["forwardButton"]){
- last.kwArgs.forwardButton();
- }else if(last.kwArgs["handle"]){
- last.kwArgs.handle("forward");
- }
- historyStack.push(last);
- //console.debug("done handling forward");
- }
-
- back.goForward = handleForwardButton;
-
- function createState(url, args, hash){
- //summary: private method. Do not call this directly.
- return {"url": url, "kwArgs": args, "urlHash": hash}; //Object
- }
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- function getUrlQuery(url){
- //summary: private method. Do not call this directly.
- var segments = url.split("?");
- if (segments.length < 2){
- return null; //null
- }
- else{
- return segments[1]; //String
- }
- }
-
- function loadIframeHistory(){
- //summary: private method. Do not call this directly.
- var url = (djConfig["dojoIframeHistoryUrl"] || dojo.moduleUrl("dojo", "resources/iframe_history.html")) + "?" + (new Date()).getTime();
- moveForward = true;
- if (historyIframe) {
- (dojo.isSafari) ? historyIframe.location = url : window.frames[historyIframe.name].location = url;
- } else {
- //console.warn("dojo.back: Not initialised. You need to call dojo.back.init() from a <script> block that lives inside the <body> tag.");
- }
- return url; //String
- }
-
- function checkLocation(){
- //console.debug("checking url");
- if(!changingUrl){
- var hsl = historyStack.length;
-
- var hash = getHash();
-
- if((hash === initialHash||window.location.href == initialHref)&&(hsl == 1)){
- // FIXME: could this ever be a forward button?
- // we can't clear it because we still need to check for forwards. Ugg.
- // clearInterval(this.locationTimer);
- handleBackButton();
- return;
- }
-
- // first check to see if we could have gone forward. We always halt on
- // a no-hash item.
- if(forwardStack.length > 0){
- if(forwardStack[forwardStack.length-1].urlHash === hash){
- handleForwardButton();
- return;
- }
- }
-
- // ok, that didn't work, try someplace back in the history stack
- if((hsl >= 2)&&(historyStack[hsl-2])){
- if(historyStack[hsl-2].urlHash === hash){
- handleBackButton();
- return;
- }
- }
-
- if(dojo.isSafari && dojo.isSafari < 3){
- var hisLen = history.length;
- if(hisLen > historyCounter) handleForwardButton();
- else if(hisLen < historyCounter) handleBackButton();
- historyCounter = hisLen;
- }
- }
- //console.debug("done checking");
- };
-
- back.init = function(){
- //summary: Initializes the undo stack. This must be called from a <script>
- // block that lives inside the <body> tag to prevent bugs on IE.
- if(dojo.byId("dj_history")){ return; } // prevent reinit
- var src = djConfig["dojoIframeHistoryUrl"] || dojo.moduleUrl("dojo", "resources/iframe_history.html");
- document.write('<iframe style="border:0;width:1px;height:1px;position:absolute;visibility:hidden;bottom:0;right:0;" name="dj_history" id="dj_history" src="' + src + '"></iframe>');
- };
-
- back.setInitialState = function(/*Object*/args){
- //summary:
- // Sets the state object and back callback for the very first page
- // that is loaded.
- //description:
- // It is recommended that you call this method as part of an event
- // listener that is registered via dojo.addOnLoad().
- //args: Object
- // See the addToHistory() function for the list of valid args properties.
- initialState = createState(initialHref, args, initialHash);
- };
-
- //FIXME: Make these doc comments not be awful. At least they're not wrong.
- //FIXME: Would like to support arbitrary back/forward jumps. Have to rework iframeLoaded among other things.
- //FIXME: is there a slight race condition in moz using change URL with the timer check and when
- // the hash gets set? I think I have seen a back/forward call in quick succession, but not consistent.
-
- /*=====
- dojo.__backArgs = function(kwArgs){
- // back: Function?
- // A function to be called when this state is reached via the user
- // clicking the back button.
- // forward: Function?
- // Upon return to this state from the "back, forward" combination
- // of navigation steps, this function will be called. Somewhat
- // analgous to the semantic of an "onRedo" event handler.
- // changeUrl: Boolean?|String?
- // Boolean indicating whether or not to create a unique hash for
- // this state. If a string is passed instead, it is used as the
- // hash.
- }
- =====*/
-
- back.addToHistory = function(/*dojo.__backArgs*/ args){
- // summary:
- // adds a state object (args) to the history list.
- // description:
- // To support getting back button notifications, the object
- // argument should implement a function called either "back",
- // "backButton", or "handle". The string "back" will be passed as
- // the first and only argument to this callback.
- //
- // To support getting forward button notifications, the object
- // argument should implement a function called either "forward",
- // "forwardButton", or "handle". The string "forward" will be
- // passed as the first and only argument to this callback.
- //
- // If you want the browser location string to change, define "changeUrl" on the object. If the
- // value of "changeUrl" is true, then a unique number will be appended to the URL as a fragment
- // identifier (http://some.domain.com/path#uniquenumber). If it is any other value that does
- // not evaluate to false, that value will be used as the fragment identifier. For example,
- // if changeUrl: 'page1', then the URL will look like: http://some.domain.com/path#page1
- //
- // example:
- // | dojo.back.addToHistory({
- // | back: function(){ console.debug('back pressed'); },
- // | forward: function(){ console.debug('forward pressed'); },
- // | changeUrl: true
- // | });
-
- // BROWSER NOTES:
- // Safari 1.2:
- // back button "works" fine, however it's not possible to actually
- // DETECT that you've moved backwards by inspecting window.location.
- // Unless there is some other means of locating.
- // FIXME: perhaps we can poll on history.length?
- // Safari 2.0.3+ (and probably 1.3.2+):
- // works fine, except when changeUrl is used. When changeUrl is used,
- // Safari jumps all the way back to whatever page was shown before
- // the page that uses dojo.undo.browser support.
- // IE 5.5 SP2:
- // back button behavior is macro. It does not move back to the
- // previous hash value, but to the last full page load. This suggests
- // that the iframe is the correct way to capture the back button in
- // these cases.
- // Don't test this page using local disk for MSIE. MSIE will not create
- // a history list for iframe_history.html if served from a file: URL.
- // The XML served back from the XHR tests will also not be properly
- // created if served from local disk. Serve the test pages from a web
- // server to test in that browser.
- // IE 6.0:
- // same behavior as IE 5.5 SP2
- // Firefox 1.0+:
- // the back button will return us to the previous hash on the same
- // page, thereby not requiring an iframe hack, although we do then
- // need to run a timer to detect inter-page movement.
-
- //If addToHistory is called, then that means we prune the
- //forward stack -- the user went back, then wanted to
- //start a new forward path.
- forwardStack = [];
-
- var hash = null;
- var url = null;
- if(!historyIframe){
- if(djConfig["useXDomain"] && !djConfig["dojoIframeHistoryUrl"]){
- console.debug("dojo.back: 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");
- }
- historyIframe = window.frames["dj_history"];
- }
- if(!bookmarkAnchor){
- bookmarkAnchor = document.createElement("a");
- dojo.body().appendChild(bookmarkAnchor);
- bookmarkAnchor.style.display = "none";
- }
- if(args["changeUrl"]){
- hash = ""+ ((args["changeUrl"]!==true) ? args["changeUrl"] : (new Date()).getTime());
-
- //If the current hash matches the new one, just replace the history object with
- //this new one. It doesn't make sense to track different state objects for the same
- //logical URL. This matches the browser behavior of only putting in one history
- //item no matter how many times you click on the same #hash link, at least in Firefox
- //and Safari, and there is no reliable way in those browsers to know if a #hash link
- //has been clicked on multiple times. So making this the standard behavior in all browsers
- //so that dojo.back's behavior is the same in all browsers.
- if(historyStack.length == 0 && initialState.urlHash == hash){
- initialState = createState(url, args, hash);
- return;
- }else if(historyStack.length > 0 && historyStack[historyStack.length - 1].urlHash == hash){
- historyStack[historyStack.length - 1] = createState(url, args, hash);
- return;
- }
-
- changingUrl = true;
- setTimeout(function() {
- setHash(hash);
- changingUrl = false;
- }, 1);
- bookmarkAnchor.href = hash;
-
- if(dojo.isIE){
- url = loadIframeHistory();
-
- var oldCB = args["back"]||args["backButton"]||args["handle"];
-
- //The function takes handleName as a parameter, in case the
- //callback we are overriding was "handle". In that case,
- //we will need to pass the handle name to handle.
- var tcb = function(handleName){
- if(getHash() != ""){
- setTimeout(function() { setHash(hash); }, 1);
- }
- //Use apply to set "this" to args, and to try to avoid memory leaks.
- oldCB.apply(this, [handleName]);
- };
-
- //Set interceptor function in the right place.
- if(args["back"]){
- args.back = tcb;
- }else if(args["backButton"]){
- args.backButton = tcb;
- }else if(args["handle"]){
- args.handle = tcb;
- }
-
- var oldFW = args["forward"]||args["forwardButton"]||args["handle"];
-
- //The function takes handleName as a parameter, in case the
- //callback we are overriding was "handle". In that case,
- //we will need to pass the handle name to handle.
- var tfw = function(handleName){
- if(getHash() != ""){
- setHash(hash);
- }
- if(oldFW){ // we might not actually have one
- //Use apply to set "this" to args, and to try to avoid memory leaks.
- oldFW.apply(this, [handleName]);
- }
- };
-
- //Set interceptor function in the right place.
- if(args["forward"]){
- args.forward = tfw;
- }else if(args["forwardButton"]){
- args.forwardButton = tfw;
- }else if(args["handle"]){
- args.handle = tfw;
- }
-
- }else if(!dojo.isIE){
- // start the timer
- if(!locationTimer){
- locationTimer = setInterval(checkLocation, 200);
- }
-
- }
- }else{
- url = loadIframeHistory();
- }
-
- historyStack.push(createState(url, args, hash));
- };
-
- back._iframeLoaded = function(evt, ifrLoc){
- //summary:
- // private method. Do not call this directly.
- var query = getUrlQuery(ifrLoc.href);
- if(query == null){
- // alert("iframeLoaded");
- // we hit the end of the history, so we should go back
- if(historyStack.length == 1){
- handleBackButton();
- }
- return;
- }
- if(moveForward){
- // we were expecting it, so it's not either a forward or backward movement
- moveForward = false;
- return;
- }
-
- //Check the back stack first, since it is more likely.
- //Note that only one step back or forward is supported.
- if(historyStack.length >= 2 && query == getUrlQuery(historyStack[historyStack.length-2].url)){
- handleBackButton();
- }
- else if(forwardStack.length > 0 && query == getUrlQuery(forwardStack[forwardStack.length-1].url)){
- handleForwardButton();
- }
- };
- })();
-
+if(!dojo._hasResource["dojo.back"]){
+dojo._hasResource["dojo.back"]=true;
+dojo.provide("dojo.back");
+(function(){
+var _1=dojo.back;
+function _2(){
+var h=window.location.hash;
+if(h.charAt(0)=="#"){
+h=h.substring(1);
+}
+return dojo.isMozilla?h:decodeURIComponent(h);
+};
+function _3(h){
+if(!h){
+h="";
+}
+window.location.hash=encodeURIComponent(h);
+_4=history.length;
+};
+if(dojo.exists("tests.back-hash")){
+_1.getHash=_2;
+_1.setHash=_3;
+}
+var _5=(typeof (window)!=="undefined")?window.location.href:"";
+var _6=(typeof (window)!=="undefined")?_2():"";
+var _7=null;
+var _8=null;
+var _9=null;
+var _a=null;
+var _b=[];
+var _c=[];
+var _d=false;
+var _e=false;
+var _4;
+function _f(){
+var _10=_c.pop();
+if(!_10){
+return;
+}
+var _11=_c[_c.length-1];
+if(!_11&&_c.length==0){
+_11=_7;
+}
+if(_11){
+if(_11.kwArgs["back"]){
+_11.kwArgs["back"]();
+}else{
+if(_11.kwArgs["backButton"]){
+_11.kwArgs["backButton"]();
+}else{
+if(_11.kwArgs["handle"]){
+_11.kwArgs.handle("back");
+}
+}
+}
+}
+_b.push(_10);
+};
+_1.goBack=_f;
+function _12(){
+var _13=_b.pop();
+if(!_13){
+return;
+}
+if(_13.kwArgs["forward"]){
+_13.kwArgs.forward();
+}else{
+if(_13.kwArgs["forwardButton"]){
+_13.kwArgs.forwardButton();
+}else{
+if(_13.kwArgs["handle"]){
+_13.kwArgs.handle("forward");
+}
+}
+}
+_c.push(_13);
+};
+_1.goForward=_12;
+function _14(url,_15,_16){
+return {"url":url,"kwArgs":_15,"urlHash":_16};
+};
+function _17(url){
+var _18=url.split("?");
+if(_18.length<2){
+return null;
+}else{
+return _18[1];
+}
+};
+function _19(){
+var url=(dojo.config["dojoIframeHistoryUrl"]||dojo.moduleUrl("dojo","resources/iframe_history.html"))+"?"+(new Date()).getTime();
+_d=true;
+if(_a){
+dojo.isWebKit?_a.location=url:window.frames[_a.name].location=url;
+}else{
+}
+return url;
+};
+function _1a(){
+if(!_e){
+var hsl=_c.length;
+var _1b=_2();
+if((_1b===_6||window.location.href==_5)&&(hsl==1)){
+_f();
+return;
+}
+if(_b.length>0){
+if(_b[_b.length-1].urlHash===_1b){
+_12();
+return;
+}
+}
+if((hsl>=2)&&(_c[hsl-2])){
+if(_c[hsl-2].urlHash===_1b){
+_f();
+return;
+}
+}
+if(dojo.isSafari&&dojo.isSafari<3){
+var _1c=history.length;
+if(_1c>_4){
+_12();
+}else{
+if(_1c<_4){
+_f();
}
+}
+_4=_1c;
+}
+}
+};
+_1.init=function(){
+if(dojo.byId("dj_history")){
+return;
+}
+var src=dojo.config["dojoIframeHistoryUrl"]||dojo.moduleUrl("dojo","resources/iframe_history.html");
+if(dojo._postLoad){
+console.error("dojo.back.init() must be called before the DOM has loaded. "+"If using xdomain loading or djConfig.debugAtAllCosts, include dojo.back "+"in a build layer.");
+}else{
+document.write("<iframe style=\"border:0;width:1px;height:1px;position:absolute;visibility:hidden;bottom:0;right:0;\" name=\"dj_history\" id=\"dj_history\" src=\""+src+"\"></iframe>");
+}
+};
+_1.setInitialState=function(_1d){
+_7=_14(_5,_1d,_6);
+};
+_1.addToHistory=function(_1e){
+_b=[];
+var _1f=null;
+var url=null;
+if(!_a){
+if(dojo.config["useXDomain"]&&!dojo.config["dojoIframeHistoryUrl"]){
+console.warn("dojo.back: 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");
+}
+_a=window.frames["dj_history"];
+}
+if(!_9){
+_9=dojo.create("a",{style:{display:"none"}},dojo.body());
+}
+if(_1e["changeUrl"]){
+_1f=""+((_1e["changeUrl"]!==true)?_1e["changeUrl"]:(new Date()).getTime());
+if(_c.length==0&&_7.urlHash==_1f){
+_7=_14(url,_1e,_1f);
+return;
+}else{
+if(_c.length>0&&_c[_c.length-1].urlHash==_1f){
+_c[_c.length-1]=_14(url,_1e,_1f);
+return;
+}
+}
+_e=true;
+setTimeout(function(){
+_3(_1f);
+_e=false;
+},1);
+_9.href=_1f;
+if(dojo.isIE){
+url=_19();
+var _20=_1e["back"]||_1e["backButton"]||_1e["handle"];
+var tcb=function(_21){
+if(_2()!=""){
+setTimeout(function(){
+_3(_1f);
+},1);
+}
+_20.apply(this,[_21]);
+};
+if(_1e["back"]){
+_1e.back=tcb;
+}else{
+if(_1e["backButton"]){
+_1e.backButton=tcb;
+}else{
+if(_1e["handle"]){
+_1e.handle=tcb;
+}
+}
+}
+var _22=_1e["forward"]||_1e["forwardButton"]||_1e["handle"];
+var tfw=function(_23){
+if(_2()!=""){
+_3(_1f);
+}
+if(_22){
+_22.apply(this,[_23]);
+}
+};
+if(_1e["forward"]){
+_1e.forward=tfw;
+}else{
+if(_1e["forwardButton"]){
+_1e.forwardButton=tfw;
+}else{
+if(_1e["handle"]){
+_1e.handle=tfw;
+}
+}
+}
+}else{
+if(!dojo.isIE){
+if(!_8){
+_8=setInterval(_1a,200);
+}
+}
+}
+}else{
+url=_19();
+}
+_c.push(_14(url,_1e,_1f));
+};
+_1._iframeLoaded=function(evt,_24){
+var _25=_17(_24.href);
+if(_25==null){
+if(_c.length==1){
+_f();
+}
+return;
+}
+if(_d){
+_d=false;
+return;
+}
+if(_c.length>=2&&_25==_17(_c[_c.length-2].url)){
+_f();
+}else{
+if(_b.length>0&&_25==_17(_b[_b.length-1].url)){
+_12();
+}
+}
+};
+})();
+}
diff --git a/js/dojo/dojo/behavior.js b/js/dojo/dojo/behavior.js
--- a/js/dojo/dojo/behavior.js
+++ b/js/dojo/dojo/behavior.js
@@ -1,185 +1,94 @@
-if(!dojo._hasResource["dojo.behavior"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.behavior"] = true;
-dojo.provide("dojo.behavior");
-
-dojo.behavior = new function(){
- function arrIn(obj, name){
- if(!obj[name]){ obj[name] = []; }
- return obj[name];
- }
-
- var _inc = 0;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- function forIn(obj, scope, func){
- var tmpObj = {};
- for(var x in obj){
- if(typeof tmpObj[x] == "undefined"){
- if(!func){
- scope(obj[x], x);
- }else{
- func.call(scope, obj[x], x);
- }
- }
- }
- }
- // FIXME: need a better test so we don't exclude nightly Safari's!
- this._behaviors = {};
- this.add = function(behaviorObj){
- // summary:
- // add the specified behavior to the list of behaviors which will
- // be applied the next time apply() is called. Calls to add() for
- // an already existing behavior do not replace the previous rules,
- // but are instead additive. New nodes which match the rule will
- // have all add()-ed behaviors applied to them when matched.
- //
- // description:
- // behavior objects are specified in the following format(s):
- //
- // {
- // "#id": {
- // "found": function(element){
- // // ...
- // },
- //
- // "onblah": {targetObj: foo, targetFunc: "bar"},
- //
- // "onblarg": "/foo/bar/baz/blarg",
- //
- // "onevent": function(evt){
- // },
- //
- // "onotherevent: function(evt){
- // // ...
- // }
- // },
- //
- // "#id2": {
- // // ...
- // },
- //
- // "#id3": function(element){
- // // ...
- // },
- //
- // // publish the match on a topic
- // "#id4": "/found/topic/name",
- //
- // // match all direct descendants
- // "#id4 > *": function(element){
- // // ...
- // },
- //
- // // match the first child node that's an element
- // "#id4 > :first-child": { ... },
- //
- // // match the last child node that's an element
- // "#id4 > :last-child": { ... },
- //
- // // all elements of type tagname
- // "tagname": {
- // // ...
- // },
- //
- // "tagname1 tagname2 tagname3": {
- // // ...
- // },
- //
- // ".classname": {
- // // ...
- // },
- //
- // "tagname.classname": {
- // // ...
- // },
- // }
- //
- // The "found" method is a generalized handler that's called as soon
- // as the node matches the selector. Rules for values that follow also
- // apply to the "found" key.
- //
- // The "on*" handlers are attached with dojo.connect().
- //
- // If the value corresponding to the ID key is a function and not a
- // list, it's treated as though it was the value of "found".
-
- var tmpObj = {};
- forIn(behaviorObj, this, function(behavior, name){
- var tBehavior = arrIn(this._behaviors, name);
- if(typeof tBehavior["id"] != "number"){
- tBehavior.id = _inc++;
- }
- var cversion = [];
- tBehavior.push(cversion);
- if((dojo.isString(behavior))||(dojo.isFunction(behavior))){
- behavior = { found: behavior };
- }
- forIn(behavior, function(rule, ruleName){
- arrIn(cversion, ruleName).push(rule);
- });
- });
- }
-
- var _applyToNode = function(node, action, ruleSetName){
- if(dojo.isString(action)){
- if(ruleSetName == "found"){
- dojo.publish(action, [ node ]);
- }else{
- dojo.connect(node, ruleSetName, function(){
- dojo.publish(action, arguments);
- });
- }
- }else if(dojo.isFunction(action)){
- if(ruleSetName == "found"){
- action(node);
- }else{
- dojo.connect(node, ruleSetName, action);
- }
- }
- }
-
- this.apply = function(){
- // summary:
- // applies all currently registered behaviors to the document,
- // taking care to ensure that only incremental updates are made
- // since the last time add() or apply() were called. If new
- // matching nodes have been added, all rules in a behavior will be
- // applied to that node. For previously matched nodes, only
- // behaviors which have been added since the last call to apply()
- // will be added to the nodes.
- forIn(this._behaviors, function(tBehavior, id){
- dojo.query(id).forEach(
- function(elem){
- var runFrom = 0;
- var bid = "_dj_behavior_"+tBehavior.id;
- if(typeof elem[bid] == "number"){
- runFrom = elem[bid];
- // console.debug(bid, runFrom);
- if(runFrom == (tBehavior.length)){
- return;
- }
- }
- // run through the versions, applying newer rules at each step
-
- for(var x=runFrom, tver; tver = tBehavior[x]; x++){
- // console.debug(tver);
- forIn(tver, function(ruleSet, ruleSetName){
- if(dojo.isArray(ruleSet)){
- dojo.forEach(ruleSet, function(action){
- _applyToNode(elem, action, ruleSetName);
- });
- }
- });
- }
-
- // ensure that re-application only adds new rules to the node
- elem[bid] = tBehavior.length;
- }
- );
- });
- }
+if(!dojo._hasResource["dojo.behavior"]){
+dojo._hasResource["dojo.behavior"]=true;
+dojo.provide("dojo.behavior");
+dojo.behavior=new function(){
+function _1(_2,_3){
+if(!_2[_3]){
+_2[_3]=[];
+}
+return _2[_3];
+};
+var _4=0;
+function _5(_6,_7,_8){
+var _9={};
+for(var x in _6){
+if(typeof _9[x]=="undefined"){
+if(!_8){
+_7(_6[x],x);
+}else{
+_8.call(_7,_6[x],x);
+}
+}
+}
+};
+this._behaviors={};
+this.add=function(_a){
+var _b={};
+_5(_a,this,function(_c,_d){
+var _e=_1(this._behaviors,_d);
+if(typeof _e["id"]!="number"){
+_e.id=_4++;
+}
+var _f=[];
+_e.push(_f);
+if((dojo.isString(_c))||(dojo.isFunction(_c))){
+_c={found:_c};
}
-
-dojo.addOnLoad(dojo.behavior, "apply");
-
+_5(_c,function(_10,_11){
+_1(_f,_11).push(_10);
+});
+});
+};
+var _12=function(_13,_14,_15){
+if(dojo.isString(_14)){
+if(_15=="found"){
+dojo.publish(_14,[_13]);
+}else{
+dojo.connect(_13,_15,function(){
+dojo.publish(_14,arguments);
+});
+}
+}else{
+if(dojo.isFunction(_14)){
+if(_15=="found"){
+_14(_13);
+}else{
+dojo.connect(_13,_15,_14);
+}
+}
}
+};
+this.apply=function(){
+_5(this._behaviors,function(_16,id){
+dojo.query(id).forEach(function(_17){
+var _18=0;
+var bid="_dj_behavior_"+_16.id;
+if(typeof _17[bid]=="number"){
+_18=_17[bid];
+if(_18==(_16.length)){
+return;
+}
+}
+for(var x=_18,_19;_19=_16[x];x++){
+_5(_19,function(_1a,_1b){
+if(dojo.isArray(_1a)){
+dojo.forEach(_1a,function(_1c){
+_12(_17,_1c,_1b);
+});
+}
+});
+}
+_17[bid]=_16.length;
+});
+});
+};
+};
+dojo.addOnLoad(dojo.behavior,"apply");
+}
diff --git a/js/dojo/dojo/build.txt b/js/dojo/dojo/build.txt
--- a/js/dojo/dojo/build.txt
+++ b/js/dojo/dojo/build.txt
@@ -1,122 +1,308 @@
Files baked into this build:
dojo.js:
./jslib/dojoGuardStart.jsfrag
./../../dojo/_base/_loader/bootstrap.js
./../../dojo/_base/_loader/loader.js
./../../dojo/_base/_loader/hostenv_browser.js
+./../../release/dojo-release-1.4.3/dojo/_base/lang.js
+./../../release/dojo-release-1.4.3/dojo/_base/array.js
+./../../release/dojo-release-1.4.3/dojo/_base/declare.js
+./../../release/dojo-release-1.4.3/dojo/_base/connect.js
+./../../release/dojo-release-1.4.3/dojo/_base/Deferred.js
+./../../release/dojo-release-1.4.3/dojo/_base/json.js
+./../../release/dojo-release-1.4.3/dojo/_base/Color.js
+./../../release/dojo-release-1.4.3/dojo/_base.js
+./../../release/dojo-release-1.4.3/dojo/_base/window.js
+./../../release/dojo-release-1.4.3/dojo/_base/event.js
+./../../release/dojo-release-1.4.3/dojo/_base/html.js
+./../../release/dojo-release-1.4.3/dojo/_base/NodeList.js
+./../../release/dojo-release-1.4.3/dojo/_base/query.js
+./../../release/dojo-release-1.4.3/dojo/_base/xhr.js
+./../../release/dojo-release-1.4.3/dojo/_base/fx.js
+./../../release/dojo-release-1.4.3/dojo/_base/browser.js
./jslib/dojoGuardEnd.jsfrag
-./../../release/dojo-release-1.0.2/dojo/_base/lang.js
-./../../release/dojo-release-1.0.2/dojo/_base/declare.js
-./../../release/dojo-release-1.0.2/dojo/_base/connect.js
-./../../release/dojo-release-1.0.2/dojo/_base/Deferred.js
-./../../release/dojo-release-1.0.2/dojo/_base/json.js
-./../../release/dojo-release-1.0.2/dojo/_base/array.js
-./../../release/dojo-release-1.0.2/dojo/_base/Color.js
-./../../release/dojo-release-1.0.2/dojo/_base.js
-./../../release/dojo-release-1.0.2/dojo/_base/window.js
-./../../release/dojo-release-1.0.2/dojo/_base/event.js
-./../../release/dojo-release-1.0.2/dojo/_base/html.js
-./../../release/dojo-release-1.0.2/dojo/_base/NodeList.js
-./../../release/dojo-release-1.0.2/dojo/_base/query.js
-./../../release/dojo-release-1.0.2/dojo/_base/xhr.js
-./../../release/dojo-release-1.0.2/dojo/_base/fx.js
../dijit/dijit.js:
-./../../release/dojo-release-1.0.2/dijit/_base/focus.js
-./../../release/dojo-release-1.0.2/dijit/_base/manager.js
-./../../release/dojo-release-1.0.2/dijit/_base/place.js
-./../../release/dojo-release-1.0.2/dijit/_base/window.js
-./../../release/dojo-release-1.0.2/dijit/_base/popup.js
-./../../release/dojo-release-1.0.2/dijit/_base/scroll.js
-./../../release/dojo-release-1.0.2/dijit/_base/sniff.js
-./../../release/dojo-release-1.0.2/dijit/_base/bidi.js
-./../../release/dojo-release-1.0.2/dijit/_base/typematic.js
-./../../release/dojo-release-1.0.2/dijit/_base/wai.js
-./../../release/dojo-release-1.0.2/dijit/_base.js
-./../../release/dojo-release-1.0.2/dojo/date/stamp.js
-./../../release/dojo-release-1.0.2/dojo/parser.js
-./../../release/dojo-release-1.0.2/dijit/_Widget.js
-./../../release/dojo-release-1.0.2/dojo/string.js
-./../../release/dojo-release-1.0.2/dijit/_Templated.js
-./../../release/dojo-release-1.0.2/dijit/_Container.js
-./../../release/dojo-release-1.0.2/dijit/layout/_LayoutWidget.js
-./../../release/dojo-release-1.0.2/dijit/form/_FormWidget.js
-./../../release/dojo-release-1.0.2/dijit/dijit.js
+./../../release/dojo-release-1.4.3/dijit/_base/manager.js
+./../../release/dojo-release-1.4.3/dijit/_base/focus.js
+./../../release/dojo-release-1.4.3/dojo/AdapterRegistry.js
+./../../release/dojo-release-1.4.3/dijit/_base/place.js
+./../../release/dojo-release-1.4.3/dijit/_base/window.js
+./../../release/dojo-release-1.4.3/dijit/_base/popup.js
+./../../release/dojo-release-1.4.3/dijit/_base/scroll.js
+./../../release/dojo-release-1.4.3/dijit/_base/sniff.js
+./../../release/dojo-release-1.4.3/dijit/_base/typematic.js
+./../../release/dojo-release-1.4.3/dijit/_base/wai.js
+./../../release/dojo-release-1.4.3/dijit/_base.js
+./../../release/dojo-release-1.4.3/dojo/date/stamp.js
+./../../release/dojo-release-1.4.3/dojo/parser.js
+./../../release/dojo-release-1.4.3/dijit/_Widget.js
+./../../release/dojo-release-1.4.3/dojo/string.js
+./../../release/dojo-release-1.4.3/dojo/cache.js
+./../../release/dojo-release-1.4.3/dijit/_Templated.js
+./../../release/dojo-release-1.4.3/dijit/_Container.js
+./../../release/dojo-release-1.4.3/dijit/_Contained.js
+./../../release/dojo-release-1.4.3/dijit/layout/_LayoutWidget.js
+./../../release/dojo-release-1.4.3/dijit/form/_FormWidget.js
+./../../release/dojo-release-1.4.3/dijit/dijit.js
../dijit/dijit-all.js:
-./../../release/dojo-release-1.0.2/dojo/colors.js
-./../../release/dojo-release-1.0.2/dojo/i18n.js
-./../../release/dojo-release-1.0.2/dijit/ColorPalette.js
-./../../release/dojo-release-1.0.2/dijit/Declaration.js
-./../../release/dojo-release-1.0.2/dojo/dnd/common.js
-./../../release/dojo-release-1.0.2/dojo/dnd/autoscroll.js
-./../../release/dojo-release-1.0.2/dojo/dnd/Mover.js
-./../../release/dojo-release-1.0.2/dojo/dnd/Moveable.js
-./../../release/dojo-release-1.0.2/dojo/dnd/move.js
-./../../release/dojo-release-1.0.2/dojo/fx.js
-./../../release/dojo-release-1.0.2/dijit/layout/ContentPane.js
-./../../release/dojo-release-1.0.2/dijit/form/Form.js
-./../../release/dojo-release-1.0.2/dijit/Dialog.js
-./../../release/dojo-release-1.0.2/dijit/_editor/selection.js
-./../../release/dojo-release-1.0.2/dijit/_editor/RichText.js
-./../../release/dojo-release-1.0.2/dijit/Toolbar.js
-./../../release/dojo-release-1.0.2/dijit/form/Button.js
-./../../release/dojo-release-1.0.2/dijit/_editor/_Plugin.js
-./../../release/dojo-release-1.0.2/dijit/Editor.js
-./../../release/dojo-release-1.0.2/dijit/Menu.js
-./../../release/dojo-release-1.0.2/dojo/regexp.js
-./../../release/dojo-release-1.0.2/dojo/number.js
-./../../release/dojo-release-1.0.2/dijit/ProgressBar.js
-./../../release/dojo-release-1.0.2/dijit/TitlePane.js
-./../../release/dojo-release-1.0.2/dijit/Tooltip.js
-./../../release/dojo-release-1.0.2/dojo/cookie.js
-./../../release/dojo-release-1.0.2/dijit/Tree.js
-./../../release/dojo-release-1.0.2/dijit/form/TextBox.js
-./../../release/dojo-release-1.0.2/dijit/InlineEditBox.js
-./../../release/dojo-release-1.0.2/dijit/form/CheckBox.js
-./../../release/dojo-release-1.0.2/dojo/data/util/filter.js
-./../../release/dojo-release-1.0.2/dojo/data/util/sorter.js
-./../../release/dojo-release-1.0.2/dojo/data/util/simpleFetch.js
-./../../release/dojo-release-1.0.2/dojo/data/ItemFileReadStore.js
-./../../release/dojo-release-1.0.2/dijit/form/ValidationTextBox.js
-./../../release/dojo-release-1.0.2/dijit/form/ComboBox.js
-./../../release/dojo-release-1.0.2/dojo/cldr/monetary.js
-./../../release/dojo-release-1.0.2/dojo/currency.js
-./../../release/dojo-release-1.0.2/dijit/form/NumberTextBox.js
-./../../release/dojo-release-1.0.2/dijit/form/CurrencyTextBox.js
-./../../release/dojo-release-1.0.2/dojo/cldr/supplemental.js
-./../../release/dojo-release-1.0.2/dojo/date.js
-./../../release/dojo-release-1.0.2/dojo/date/locale.js
-./../../release/dojo-release-1.0.2/dijit/_Calendar.js
-./../../release/dojo-release-1.0.2/dijit/_TimePicker.js
-./../../release/dojo-release-1.0.2/dijit/form/TimeTextBox.js
-./../../release/dojo-release-1.0.2/dijit/form/DateTextBox.js
-./../../release/dojo-release-1.0.2/dijit/form/FilteringSelect.js
-./../../release/dojo-release-1.0.2/dijit/form/_Spinner.js
-./../../release/dojo-release-1.0.2/dijit/form/NumberSpinner.js
-./../../release/dojo-release-1.0.2/dijit/form/Slider.js
-./../../release/dojo-release-1.0.2/dijit/form/Textarea.js
-./../../release/dojo-release-1.0.2/dijit/layout/StackContainer.js
-./../../release/dojo-release-1.0.2/dijit/layout/AccordionContainer.js
-./../../release/dojo-release-1.0.2/dijit/layout/LayoutContainer.js
-./../../release/dojo-release-1.0.2/dijit/layout/LinkPane.js
-./../../release/dojo-release-1.0.2/dijit/layout/SplitContainer.js
-./../../release/dojo-release-1.0.2/dijit/layout/TabContainer.js
-./../../release/dojo-release-1.0.2/dijit/dijit-all.js
+./../../release/dojo-release-1.4.3/dojo/colors.js
+./../../release/dojo-release-1.4.3/dojo/i18n.js
+./../../release/dojo-release-1.4.3/dijit/ColorPalette.js
+./../../release/dojo-release-1.4.3/dijit/Declaration.js
+./../../release/dojo-release-1.4.3/dojo/dnd/common.js
+./../../release/dojo-release-1.4.3/dojo/dnd/autoscroll.js
+./../../release/dojo-release-1.4.3/dojo/dnd/Mover.js
+./../../release/dojo-release-1.4.3/dojo/dnd/Moveable.js
+./../../release/dojo-release-1.4.3/dojo/dnd/move.js
+./../../release/dojo-release-1.4.3/dojo/dnd/TimedMoveable.js
+./../../release/dojo-release-1.4.3/dojo/fx/Toggler.js
+./../../release/dojo-release-1.4.3/dojo/fx.js
+./../../release/dojo-release-1.4.3/dijit/form/_FormMixin.js
+./../../release/dojo-release-1.4.3/dijit/_DialogMixin.js
+./../../release/dojo-release-1.4.3/dijit/DialogUnderlay.js
+./../../release/dojo-release-1.4.3/dojo/html.js
+./../../release/dojo-release-1.4.3/dijit/layout/ContentPane.js
+./../../release/dojo-release-1.4.3/dijit/TooltipDialog.js
+./../../release/dojo-release-1.4.3/dijit/Dialog.js
+./../../release/dojo-release-1.4.3/dijit/_editor/selection.js
+./../../release/dojo-release-1.4.3/dijit/_editor/range.js
+./../../release/dojo-release-1.4.3/dijit/_editor/html.js
+./../../release/dojo-release-1.4.3/dijit/_editor/RichText.js
+./../../release/dojo-release-1.4.3/dijit/_KeyNavContainer.js
+./../../release/dojo-release-1.4.3/dijit/ToolbarSeparator.js
+./../../release/dojo-release-1.4.3/dijit/Toolbar.js
+./../../release/dojo-release-1.4.3/dijit/_HasDropDown.js
+./../../release/dojo-release-1.4.3/dijit/form/Button.js
+./../../release/dojo-release-1.4.3/dijit/_editor/_Plugin.js
+./../../release/dojo-release-1.4.3/dijit/_editor/plugins/EnterKeyHandling.js
+./../../release/dojo-release-1.4.3/dijit/Editor.js
+./../../release/dojo-release-1.4.3/dijit/MenuItem.js
+./../../release/dojo-release-1.4.3/dijit/PopupMenuItem.js
+./../../release/dojo-release-1.4.3/dijit/CheckedMenuItem.js
+./../../release/dojo-release-1.4.3/dijit/MenuSeparator.js
+./../../release/dojo-release-1.4.3/dijit/Menu.js
+./../../release/dojo-release-1.4.3/dijit/MenuBar.js
+./../../release/dojo-release-1.4.3/dijit/MenuBarItem.js
+./../../release/dojo-release-1.4.3/dijit/PopupMenuBarItem.js
+./../../release/dojo-release-1.4.3/dojo/regexp.js
+./../../release/dojo-release-1.4.3/dojo/number.js
+./../../release/dojo-release-1.4.3/dijit/ProgressBar.js
+./../../release/dojo-release-1.4.3/dijit/TitlePane.js
+./../../release/dojo-release-1.4.3/dijit/Tooltip.js
+./../../release/dojo-release-1.4.3/dojo/DeferredList.js
+./../../release/dojo-release-1.4.3/dojo/cookie.js
+./../../release/dojo-release-1.4.3/dijit/tree/TreeStoreModel.js
+./../../release/dojo-release-1.4.3/dijit/tree/ForestStoreModel.js
+./../../release/dojo-release-1.4.3/dijit/Tree.js
+./../../release/dojo-release-1.4.3/dijit/form/TextBox.js
+./../../release/dojo-release-1.4.3/dijit/InlineEditBox.js
+./../../release/dojo-release-1.4.3/dijit/form/Form.js
+./../../release/dojo-release-1.4.3/dijit/form/DropDownButton.js
+./../../release/dojo-release-1.4.3/dijit/form/ComboButton.js
+./../../release/dojo-release-1.4.3/dijit/form/ToggleButton.js
+./../../release/dojo-release-1.4.3/dijit/form/CheckBox.js
+./../../release/dojo-release-1.4.3/dijit/form/RadioButton.js
+./../../release/dojo-release-1.4.3/dijit/form/ValidationTextBox.js
+./../../release/dojo-release-1.4.3/dojo/cldr/monetary.js
+./../../release/dojo-release-1.4.3/dojo/currency.js
+./../../release/dojo-release-1.4.3/dijit/form/NumberTextBox.js
+./../../release/dojo-release-1.4.3/dijit/form/CurrencyTextBox.js
+./../../release/dojo-release-1.4.3/dojo/cldr/supplemental.js
+./../../release/dojo-release-1.4.3/dojo/date.js
+./../../release/dojo-release-1.4.3/dojo/date/locale.js
+./../../release/dojo-release-1.4.3/dijit/Calendar.js
+./../../release/dojo-release-1.4.3/dijit/form/_DateTimeTextBox.js
+./../../release/dojo-release-1.4.3/dijit/form/DateTextBox.js
+./../../release/dojo-release-1.4.3/dijit/form/_Spinner.js
+./../../release/dojo-release-1.4.3/dijit/form/NumberSpinner.js
+./../../release/dojo-release-1.4.3/dojo/data/util/sorter.js
+./../../release/dojo-release-1.4.3/dojo/data/util/simpleFetch.js
+./../../release/dojo-release-1.4.3/dojo/data/util/filter.js
+./../../release/dojo-release-1.4.3/dijit/form/ComboBox.js
+./../../release/dojo-release-1.4.3/dijit/form/FilteringSelect.js
+./../../release/dojo-release-1.4.3/dijit/form/MultiSelect.js
+./../../release/dojo-release-1.4.3/dijit/form/HorizontalSlider.js
+./../../release/dojo-release-1.4.3/dijit/form/VerticalSlider.js
+./../../release/dojo-release-1.4.3/dijit/form/HorizontalRule.js
+./../../release/dojo-release-1.4.3/dijit/form/VerticalRule.js
+./../../release/dojo-release-1.4.3/dijit/form/HorizontalRuleLabels.js
+./../../release/dojo-release-1.4.3/dijit/form/VerticalRuleLabels.js
+./../../release/dojo-release-1.4.3/dijit/form/SimpleTextarea.js
+./../../release/dojo-release-1.4.3/dijit/form/Textarea.js
+./../../release/dojo-release-1.4.3/dijit/layout/StackController.js
+./../../release/dojo-release-1.4.3/dijit/layout/StackContainer.js
+./../../release/dojo-release-1.4.3/dijit/layout/AccordionPane.js
+./../../release/dojo-release-1.4.3/dijit/layout/AccordionContainer.js
+./../../release/dojo-release-1.4.3/dijit/layout/BorderContainer.js
+./../../release/dojo-release-1.4.3/dijit/layout/LayoutContainer.js
+./../../release/dojo-release-1.4.3/dijit/layout/LinkPane.js
+./../../release/dojo-release-1.4.3/dijit/layout/SplitContainer.js
+./../../release/dojo-release-1.4.3/dijit/layout/_TabContainerBase.js
+./../../release/dojo-release-1.4.3/dijit/layout/TabController.js
+./../../release/dojo-release-1.4.3/dijit/layout/ScrollingTabController.js
+./../../release/dojo-release-1.4.3/dijit/layout/TabContainer.js
+./../../release/dojo-release-1.4.3/dijit/dijit-all.js
-../dojox/off/offline.js:
-./../../release/dojo-release-1.0.2/dojox/storage/Provider.js
-./../../release/dojo-release-1.0.2/dojox/storage/manager.js
-./../../release/dojo-release-1.0.2/dojox/_sql/_crypto.js
-./../../release/dojo-release-1.0.2/dojox/_sql/common.js
-./../../release/dojo-release-1.0.2/dojox/sql.js
-./../../release/dojo-release-1.0.2/dojox/storage/GearsStorageProvider.js
-./../../release/dojo-release-1.0.2/dojox/storage/_common.js
-./../../release/dojo-release-1.0.2/dojox/storage.js
-./../../release/dojo-release-1.0.2/dojox/off/files.js
-./../../release/dojo-release-1.0.2/dojox/off/sync.js
-./../../release/dojo-release-1.0.2/dojox/off/_common.js
-./../../release/dojo-release-1.0.2/dojox/off.js
-./../../release/dojo-release-1.0.2/dojox/off/ui.js
-./../../release/dojo-release-1.0.2/dojox/off/offline.js
+../dojox/grid/DataGrid.js:
+./../../release/dojo-release-1.4.3/dijit/_base/manager.js
+./../../release/dojo-release-1.4.3/dijit/_base/focus.js
+./../../release/dojo-release-1.4.3/dojo/AdapterRegistry.js
+./../../release/dojo-release-1.4.3/dijit/_base/place.js
+./../../release/dojo-release-1.4.3/dijit/_base/window.js
+./../../release/dojo-release-1.4.3/dijit/_base/popup.js
+./../../release/dojo-release-1.4.3/dijit/_base/scroll.js
+./../../release/dojo-release-1.4.3/dijit/_base/sniff.js
+./../../release/dojo-release-1.4.3/dijit/_base/typematic.js
+./../../release/dojo-release-1.4.3/dijit/_base/wai.js
+./../../release/dojo-release-1.4.3/dijit/_base.js
+./../../release/dojo-release-1.4.3/dojo/date/stamp.js
+./../../release/dojo-release-1.4.3/dojo/parser.js
+./../../release/dojo-release-1.4.3/dijit/_Widget.js
+./../../release/dojo-release-1.4.3/dojo/string.js
+./../../release/dojo-release-1.4.3/dojo/cache.js
+./../../release/dojo-release-1.4.3/dijit/_Templated.js
+./../../release/dojo-release-1.4.3/dijit/_Container.js
+./../../release/dojo-release-1.4.3/dijit/_Contained.js
+./../../release/dojo-release-1.4.3/dijit/layout/_LayoutWidget.js
+./../../release/dojo-release-1.4.3/dijit/form/_FormWidget.js
+./../../release/dojo-release-1.4.3/dijit/dijit.js
+./../../release/dojo-release-1.4.3/dijit/_KeyNavContainer.js
+./../../release/dojo-release-1.4.3/dijit/MenuItem.js
+./../../release/dojo-release-1.4.3/dijit/PopupMenuItem.js
+./../../release/dojo-release-1.4.3/dijit/CheckedMenuItem.js
+./../../release/dojo-release-1.4.3/dijit/MenuSeparator.js
+./../../release/dojo-release-1.4.3/dijit/Menu.js
+./../../release/dojo-release-1.4.3/dojox/html/metrics.js
+./../../release/dojo-release-1.4.3/dojox/grid/util.js
+./../../release/dojo-release-1.4.3/dojox/grid/_Scroller.js
+./../../release/dojo-release-1.4.3/dojox/grid/cells/_base.js
+./../../release/dojo-release-1.4.3/dojox/grid/cells.js
+./../../release/dojo-release-1.4.3/dojo/dnd/common.js
+./../../release/dojo-release-1.4.3/dojo/dnd/autoscroll.js
+./../../release/dojo-release-1.4.3/dojo/dnd/Mover.js
+./../../release/dojo-release-1.4.3/dojo/dnd/Moveable.js
+./../../release/dojo-release-1.4.3/dojox/grid/_Builder.js
+./../../release/dojo-release-1.4.3/dojo/dnd/Container.js
+./../../release/dojo-release-1.4.3/dojo/dnd/Selector.js
+./../../release/dojo-release-1.4.3/dojo/dnd/Avatar.js
+./../../release/dojo-release-1.4.3/dojo/dnd/Manager.js
+./../../release/dojo-release-1.4.3/dojo/dnd/Source.js
+./../../release/dojo-release-1.4.3/dojox/grid/_View.js
+./../../release/dojo-release-1.4.3/dojox/grid/_RowSelector.js
+./../../release/dojo-release-1.4.3/dojox/grid/_Layout.js
+./../../release/dojo-release-1.4.3/dojox/grid/_ViewManager.js
+./../../release/dojo-release-1.4.3/dojox/grid/_RowManager.js
+./../../release/dojo-release-1.4.3/dojox/grid/_FocusManager.js
+./../../release/dojo-release-1.4.3/dojox/grid/_EditManager.js
+./../../release/dojo-release-1.4.3/dojox/grid/Selection.js
+./../../release/dojo-release-1.4.3/dojox/grid/_Events.js
+./../../release/dojo-release-1.4.3/dojo/i18n.js
+./../../release/dojo-release-1.4.3/dojox/grid/_Grid.js
+./../../release/dojo-release-1.4.3/dojox/grid/DataSelection.js
+./../../release/dojo-release-1.4.3/dojox/grid/DataGrid.js
+
+../dojox/gfx.js:
+./../../release/dojo-release-1.4.3/dojox/gfx/matrix.js
+./../../release/dojo-release-1.4.3/dojox/gfx/_base.js
+./../../release/dojo-release-1.4.3/dojox/gfx.js
+
+../dojox/charting/widget/Chart2D.js:
+./../../release/dojo-release-1.4.3/dijit/_base/manager.js
+./../../release/dojo-release-1.4.3/dijit/_base/focus.js
+./../../release/dojo-release-1.4.3/dojo/AdapterRegistry.js
+./../../release/dojo-release-1.4.3/dijit/_base/place.js
+./../../release/dojo-release-1.4.3/dijit/_base/window.js
+./../../release/dojo-release-1.4.3/dijit/_base/popup.js
+./../../release/dojo-release-1.4.3/dijit/_base/scroll.js
+./../../release/dojo-release-1.4.3/dijit/_base/sniff.js
+./../../release/dojo-release-1.4.3/dijit/_base/typematic.js
+./../../release/dojo-release-1.4.3/dijit/_base/wai.js
+./../../release/dojo-release-1.4.3/dijit/_base.js
+./../../release/dojo-release-1.4.3/dijit/_Widget.js
+./../../release/dojo-release-1.4.3/dojox/gfx/matrix.js
+./../../release/dojo-release-1.4.3/dojox/gfx/_base.js
+./../../release/dojo-release-1.4.3/dojox/gfx.js
+./../../release/dojo-release-1.4.3/dojox/lang/functional/lambda.js
+./../../release/dojo-release-1.4.3/dojox/lang/functional/array.js
+./../../release/dojo-release-1.4.3/dojox/lang/functional/object.js
+./../../release/dojo-release-1.4.3/dojox/lang/functional.js
+./../../release/dojo-release-1.4.3/dojox/lang/functional/fold.js
+./../../release/dojo-release-1.4.3/dojox/lang/functional/reversed.js
+./../../release/dojo-release-1.4.3/dojo/colors.js
+./../../release/dojo-release-1.4.3/dojox/color/_base.js
+./../../release/dojo-release-1.4.3/dojox/color.js
+./../../release/dojo-release-1.4.3/dojox/color/Palette.js
+./../../release/dojo-release-1.4.3/dojox/charting/Theme.js
+./../../release/dojo-release-1.4.3/dojox/charting/Element.js
+./../../release/dojo-release-1.4.3/dojox/charting/Series.js
+./../../release/dojo-release-1.4.3/dojox/charting/scaler/common.js
+./../../release/dojo-release-1.4.3/dojox/charting/scaler/linear.js
+./../../release/dojo-release-1.4.3/dojox/charting/axis2d/common.js
+./../../release/dojo-release-1.4.3/dojox/charting/axis2d/Base.js
+./../../release/dojo-release-1.4.3/dojo/string.js
+./../../release/dojo-release-1.4.3/dojox/lang/utils.js
+./../../release/dojo-release-1.4.3/dojox/charting/axis2d/Default.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/common.js
+./../../release/dojo-release-1.4.3/dojox/charting/scaler/primitive.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/Base.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/Default.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/Lines.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/Areas.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/Markers.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/MarkersOnly.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/Scatter.js
+./../../release/dojo-release-1.4.3/dojox/lang/functional/sequence.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/Stacked.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/StackedLines.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/StackedAreas.js
+./../../release/dojo-release-1.4.3/dojox/gfx/fx.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/Columns.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/StackedColumns.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/ClusteredColumns.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/Bars.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/StackedBars.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/ClusteredBars.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/Grid.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/Pie.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/Bubble.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/Candlesticks.js
+./../../release/dojo-release-1.4.3/dojox/charting/plot2d/OHLC.js
+./../../release/dojo-release-1.4.3/dojox/charting/Chart2D.js
+./../../release/dojo-release-1.4.3/dojo/fx/easing.js
+./../../release/dojo-release-1.4.3/dojox/charting/action2d/Base.js
+./../../release/dojo-release-1.4.3/dojox/charting/action2d/Highlight.js
+./../../release/dojo-release-1.4.3/dojo/fx/Toggler.js
+./../../release/dojo-release-1.4.3/dojo/fx.js
+./../../release/dojo-release-1.4.3/dojox/charting/action2d/Magnify.js
+./../../release/dojo-release-1.4.3/dojox/lang/functional/scan.js
+./../../release/dojo-release-1.4.3/dojox/charting/action2d/MoveSlice.js
+./../../release/dojo-release-1.4.3/dojox/charting/action2d/Shake.js
+./../../release/dojo-release-1.4.3/dojo/date/stamp.js
+./../../release/dojo-release-1.4.3/dojo/parser.js
+./../../release/dojo-release-1.4.3/dojo/cache.js
+./../../release/dojo-release-1.4.3/dijit/_Templated.js
+./../../release/dojo-release-1.4.3/dijit/Tooltip.js
+./../../release/dojo-release-1.4.3/dojox/charting/action2d/Tooltip.js
+./../../release/dojo-release-1.4.3/dojox/charting/widget/Chart2D.js
+./../../release/dojo-release-1.4.3/dojox/charting/themes/ET/greys.js
+./../../release/dojo-release-1.4.3/dojox/charting/widget/Sparkline.js
+./../../release/dojo-release-1.4.3/dojox/charting/widget/Legend.js
+
+../dojox/dtl.js:
+./../../release/dojo-release-1.4.3/dojox/string/Builder.js
+./../../release/dojo-release-1.4.3/dojox/string/tokenize.js
+./../../release/dojo-release-1.4.3/dojox/dtl/_base.js
+./../../release/dojo-release-1.4.3/dojox/dtl.js
+./../../release/dojo-release-1.4.3/dojox/dtl/Context.js
+./../../release/dojo-release-1.4.3/dojox/dtl/tag/logic.js
+./../../release/dojo-release-1.4.3/dojox/dtl/tag/loop.js
+./../../release/dojo-release-1.4.3/dojo/date.js
+./../../release/dojo-release-1.4.3/dojox/date/php.js
+./../../release/dojo-release-1.4.3/dojox/dtl/utils/date.js
+./../../release/dojo-release-1.4.3/dojox/dtl/tag/date.js
+./../../release/dojo-release-1.4.3/dojox/dtl/tag/loader.js
+./../../release/dojo-release-1.4.3/dojox/dtl/tag/misc.js
+./../../release/dojo-release-1.4.3/dojox/dtl/ext-dojo/NodeList.js
diff --git a/js/dojo/dojo/cldr/monetary.js b/js/dojo/dojo/cldr/monetary.js
--- a/js/dojo/dojo/cldr/monetary.js
+++ b/js/dojo/dojo/cldr/monetary.js
@@ -1,27 +1,23 @@
-if(!dojo._hasResource["dojo.cldr.monetary"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.cldr.monetary"] = true;
-dojo.provide("dojo.cldr.monetary");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.cldr.monetary.getData = function(code){
-// summary: A mapping of currency code to currency-specific formatting information. Returns a unique object with properties: places, round.
-// code: an iso4217 currency code
-
-// from http://www.unicode.org/cldr/data/common/supplemental/supplementalData.xml:supplementalData/currencyData/fractions
- var placesData = {
- ADP:0,BHD:3,BIF:0,BYR:0,CLF:0,CLP:0,DJF:0,ESP:0,GNF:0,
- IQD:3,ITL:0,JOD:3,JPY:0,KMF:0,KRW:0,KWD:3,LUF:0,LYD:3,
- MGA:0,MGF:0,OMR:3,PYG:0,RWF:0,TND:3,TRL:0,VUV:0,XAF:0,
- XOF:0,XPF:0
- };
-
- var roundingData = {CHF:5};
-
- var places = placesData[code], round = roundingData[code];
- if(typeof places == "undefined"){ places = 2; }
- if(typeof round == "undefined"){ round = 0; }
-
- return {places: places, round: round}; // Object
+if(!dojo._hasResource["dojo.cldr.monetary"]){
+dojo._hasResource["dojo.cldr.monetary"]=true;
+dojo.provide("dojo.cldr.monetary");
+dojo.cldr.monetary.getData=function(_1){
+var _2={ADP:0,BHD:3,BIF:0,BYR:0,CLF:0,CLP:0,DJF:0,ESP:0,GNF:0,IQD:3,ITL:0,JOD:3,JPY:0,KMF:0,KRW:0,KWD:3,LUF:0,LYD:3,MGA:0,MGF:0,OMR:3,PYG:0,RWF:0,TND:3,TRL:0,VUV:0,XAF:0,XOF:0,XPF:0};
+var _3={CHF:5};
+var _4=_2[_1],_5=_3[_1];
+if(typeof _4=="undefined"){
+_4=2;
+}
+if(typeof _5=="undefined"){
+_5=0;
+}
+return {places:_4,round:_5};
};
-
}
diff --git a/js/dojo/dojo/cldr/nls/currency.js b/js/dojo/dojo/cldr/nls/currency.js
--- a/js/dojo/dojo/cldr/nls/currency.js
+++ b/js/dojo/dojo/cldr/nls/currency.js
@@ -1,1 +1,1 @@
-({"USD_symbol": "$", "EUR_displayName": "EUR", "GBP_displayName": "GBP", "JPY_displayName": "JPY", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€", "USD_displayName": "USD"})
\ No newline at end of file
+({"CHF_symbol":"Fr.","JPY_symbol":"JP¥","HKD_symbol":"HK$","USD_symbol":"US$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/de-de/number.js b/js/dojo/dojo/cldr/nls/de-de/number.js
--- a/js/dojo/dojo/cldr/nls/de-de/number.js
+++ b/js/dojo/dojo/cldr/nls/de-de/number.js
@@ -1,1 +1,1 @@
-({"currencyFormat": "#,##0.00 ¤", "group": ".", "percentFormat": "#,##0 %", "decimal": ",", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "decimalFormat": "#,##0.###", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"})
\ No newline at end of file
+({"currencyFormat":"#,##0.00 ¤","group":".","percentSign":"%","exponential":"E","percentFormat":"#,##0 %","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":",","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/de/currency.js b/js/dojo/dojo/cldr/nls/de/currency.js
--- a/js/dojo/dojo/cldr/nls/de/currency.js
+++ b/js/dojo/dojo/cldr/nls/de/currency.js
@@ -1,1 +1,1 @@
-({"HKD_displayName": "Hongkong Dollar", "CHF_displayName": "Schweizer Franken", "CHF_symbol": "SFr.", "CAD_displayName": "Kanadischer Dollar", "AUD_displayName": "Australischer Dollar", "JPY_displayName": "Yen", "USD_displayName": "US Dollar", "GBP_displayName": "Pfund Sterling", "EUR_displayName": "Euro", "USD_symbol": "$", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"})
\ No newline at end of file
+({"HKD_displayName":"Hongkong-Dollar","CHF_displayName":"Schweizer Franken","JPY_symbol":"¥","CAD_displayName":"Kanadischer Dollar","CNY_displayName":"Renminbi Yuan","USD_symbol":"$","AUD_displayName":"Australischer Dollar","JPY_displayName":"Yen","USD_displayName":"US-Dollar","GBP_displayName":"Pfund Sterling","EUR_displayName":"Euro","CHF_symbol":"Fr.","HKD_symbol":"HK$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/de/gregorian.js b/js/dojo/dojo/cldr/nls/de/gregorian.js
--- a/js/dojo/dojo/cldr/nls/de/gregorian.js
+++ b/js/dojo/dojo/cldr/nls/de/gregorian.js
@@ -1,1 +1,1 @@
-({"eraNames": ["v. Chr.", "n. Chr."], "timeFormat-full": "H:mm' Uhr 'z", "eraAbbr": ["v. Chr.", "n. Chr."], "dateFormat-medium": "dd.MM.yyyy", "am": "vorm.", "months-format-abbr": ["Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"], "dateFormat-full": "EEEE, d. MMMM yyyy", "days-format-abbr": ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], "quarters-format-wide": ["1. Quartal", "2. Quartal", "3. Quartal", "4. Quartal"], "pm": "nachm.", "dateFormat-short": "dd.MM.yy", "months-format-wide": ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], "months-standAlone-narrow": ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], "days-standAlone-narrow": ["S", "M", "D", "M", "D", "F", "S"], "dateFormat-long": "d. MMMM yyyy", "days-format-wide": ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "timeFormat-medium": "HH:mm:ss", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "timeFormat-long": "HH:mm:ss z", "timeFormat-short": "HH:mm", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Era": "{0} {1}"})
\ No newline at end of file
+({"months-format-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Wochentag","dateFormatItem-yyQQQQ":"QQQQ yy","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"EEE, yyyy-M-d","dateFormatItem-MMMEd":"E d. MMM","eraNarrow":["v. Chr.","n. Chr."],"dateFormat-long":"d. MMMM y","months-format-wide":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],"dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d. EEE","dateFormat-full":"EEEE, d. MMMM y","dateFormatItem-Md":"d.M.","dateFormatItem-yyMMdd":"dd.MM.yy","field-era":"Epoche","dateFormatItem-yM":"yyyy-M","months-standAlone-wide":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],"timeFormat-short":"HH:mm","quarters-format-wide":["1. Quartal","2. Quartal","3. Quartal","4. Quartal"],"timeFormat-long":"HH:mm:ss z","field-year":"Jahr","dateFormatItem-yMMM":"MMM y","dateFormatItem-yQ":"Q yyyy","dateFormatItem-yyyyMMMM":"MMMM y","field-hour":"Stunde","dateFormatItem-MMdd":"dd.MM.","months-format-abbr":["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],"dateFormatItem-yyQ":"Q yy","timeFormat-full":"HH:mm:ss zzzz","am":"vorm.","dateFormatItem-H":"H","months-standAlone-abbr":["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["1. Quartal","2. Quartal","3. Quartal","4. Quartal"],"dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"L","days-standAlone-wide":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dateFormatItem-MMMMd":"d. MMMM","dateFormatItem-yyMMM":"MMM yy","timeFormat-medium":"HH:mm:ss","dateFormatItem-Hm":"H:mm","eraAbbr":["v. Chr.","n. Chr."],"field-minute":"Minute","field-dayperiod":"Tageshälfte","days-standAlone-abbr":["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","dateTimeFormat-long":"{1} {0}","dateFormatItem-MMMd":"d. MMM","dateFormatItem-MEd":"E, d.M.","dateTimeFormat-full":"{1} {0}","dateFormatItem-yMMMM":"MMMM y","field-day":"Tag","days-format-wide":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"field-zone":"Zone","dateFormatItem-y":"y","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-yyMM":"MM.yy","days-format-abbr":["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],"eraNames":["v. Chr.","n. Chr."],"days-format-narrow":["S","M","D","M","D","F","S"],"field-month":"Monat","days-standAlone-narrow":["S","M","D","M","D","F","S"],"dateFormatItem-MMM":"LLL","dateFormatItem-HHmm":"HH:mm","pm":"nachm.","dateFormatItem-MMMMEd":"E d. MMMM","dateFormatItem-MMMMdd":"dd. MMMM","dateFormat-short":"dd.MM.yy","dateFormatItem-MMd":"d.MM.","field-second":"Sekunde","dateFormatItem-yMMMEd":"EEE, d. MMM y","dateFormatItem-Ed":"E d.","field-week":"Woche","dateFormat-medium":"dd.MM.yyyy","dateFormatItem-mmss":"mm:ss","dateTimeFormat-short":"{1} {0}","dateFormatItem-yyyy":"y","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/de/number.js b/js/dojo/dojo/cldr/nls/de/number.js
--- a/js/dojo/dojo/cldr/nls/de/number.js
+++ b/js/dojo/dojo/cldr/nls/de/number.js
@@ -1,1 +1,1 @@
-({"group": ".", "percentFormat": "#,##0 %", "decimal": ",", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencyFormat": "¤ #,##0.00", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "decimalFormat": "#,##0.###", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"})
\ No newline at end of file
+({"group":".","percentSign":"%","exponential":"E","percentFormat":"#,##0 %","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":",","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","currencyFormat":"#,##0.00 ¤","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/en-au/currency.js b/js/dojo/dojo/cldr/nls/en-au/currency.js
--- a/js/dojo/dojo/cldr/nls/en-au/currency.js
+++ b/js/dojo/dojo/cldr/nls/en-au/currency.js
@@ -1,1 +1,1 @@
-({"AUD_symbol": "$", "HKD_displayName": "Hong Kong Dollar", "CHF_displayName": "Swiss Franc", "CHF_symbol": "SwF", "HKD_symbol": "HK$", "CAD_displayName": "Canadian Dollar", "USD_symbol": "US$", "AUD_displayName": "Australian Dollar", "JPY_displayName": "Japanese Yen", "CAD_symbol": "Can$", "USD_displayName": "US Dollar", "GBP_displayName": "British Pound Sterling", "EUR_displayName": "Euro", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"})
\ No newline at end of file
+({"AUD_symbol":"$","USD_symbol":"US$","HKD_displayName":"Hong Kong Dollar","CHF_displayName":"Swiss Franc","JPY_symbol":"¥","CAD_displayName":"Canadian Dollar","CNY_displayName":"Chinese Yuan Renminbi","AUD_displayName":"Australian Dollar","JPY_displayName":"Japanese Yen","USD_displayName":"US Dollar","GBP_displayName":"British Pound Sterling","EUR_displayName":"Euro","CHF_symbol":"Fr.","HKD_symbol":"HK$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/en-au/gregorian.js b/js/dojo/dojo/cldr/nls/en-au/gregorian.js
--- a/js/dojo/dojo/cldr/nls/en-au/gregorian.js
+++ b/js/dojo/dojo/cldr/nls/en-au/gregorian.js
@@ -1,1 +1,1 @@
-({"dateFormat-short": "d/MM/yy", "timeFormat-long": "h:mm:ss a", "dateFormat-medium": "dd/MM/yyyy", "dateFormat-long": "d MMMM yyyy", "dateFormat-full": "EEEE, d MMMM yyyy", "timeFormat-full": "h:mm:ss a v", "months-standAlone-narrow": ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], "eraNames": ["Before Christ", "Anno Domini"], "days-standAlone-narrow": ["S", "M", "T", "W", "T", "F", "S"], "timeFormat-medium": "h:mm:ss a", "field-dayperiod": "AM/PM", "months-format-wide": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], "timeFormat-short": "h:mm a", "months-format-abbr": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], "days-format-wide": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], "eraAbbr": ["BC", "AD"], "quarters-format-wide": ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"], "days-format-abbr": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-minute": "Minute", "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "pm": "PM", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "am": "AM", "dateTimeFormats-appendItem-Era": "{0} {1}"})
\ No newline at end of file
+({"dateFormat-short":"d/MM/yy","dateFormatItem-MMdd":"dd/MM","dateFormat-medium":"dd/MM/yyyy","dateFormat-long":"d MMMM y","dateFormatItem-MMMMd":"d MMMM","dateFormat-full":"EEEE, d MMMM y","dateFormatItem-yyyyMM":"MM/yyyy","dateFormatItem-yyyyMMMM":"MMMM y","dateFormatItem-yM":"M/yyyy","field-dayperiod":"AM/PM","dateFormatItem-yQ":"Q yyyy","field-minute":"Minute","eraNames":["Before Christ","Anno Domini"],"dateFormatItem-MMMEd":"E, MMM d","dateTimeFormat-full":"{1} {0}","field-weekday":"Day of the Week","dateFormatItem-yQQQ":"QQQ y","days-standAlone-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dateFormatItem-MMM":"LLL","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateTimeFormat-short":"{1} {0}","field-era":"Era","field-hour":"Hour","dateTimeFormat-medium":"{1} {0}","dateFormatItem-y":"y","timeFormat-full":"h:mm:ss a zzzz","months-standAlone-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"dateFormatItem-yMMM":"MMM y","days-standAlone-narrow":["S","M","T","W","T","F","S"],"eraAbbr":["BC","AD"],"timeFormat-medium":"h:mm:ss a","dateFormatItem-EEEd":"d EEE","field-zone":"Zone","dateFormatItem-Hm":"H:mm","dateFormatItem-Hms":"H:mm:ss","quarters-standAlone-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"dateFormatItem-yMMMM":"MMMM y","dateFormatItem-ms":"mm:ss","field-year":"Year","quarters-standAlone-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","field-week":"Week","months-standAlone-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"dateFormatItem-MMMMEd":"E, MMMM d","dateFormatItem-MMMd":"MMM d","timeFormat-long":"h:mm:ss a z","months-format-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"timeFormat-short":"h:mm a","field-month":"Month","quarters-format-abbr":["Q1","Q2","Q3","Q4"],"days-format-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"pm":"PM","dateFormatItem-M":"L","days-format-narrow":["S","M","T","W","T","F","S"],"field-second":"Second","field-day":"Day","dateFormatItem-MEd":"E, M/d","months-format-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-hm":"h:mm a","am":"AM","days-standAlone-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"dateFormatItem-yMMMEd":"EEE, MMM d, y","dateFormatItem-Md":"M/d","dateFormatItem-yMEd":"EEE, M/d/yyyy","months-format-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"dateFormatItem-d":"d","quarters-format-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"days-format-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"eraNarrow":["B","A"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-hms":"h:mm:ss a"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/en-ca/currency.js b/js/dojo/dojo/cldr/nls/en-ca/currency.js
--- a/js/dojo/dojo/cldr/nls/en-ca/currency.js
+++ b/js/dojo/dojo/cldr/nls/en-ca/currency.js
@@ -1,1 +1,1 @@
-({"CAD_symbol": "$", "HKD_displayName": "Hong Kong Dollar", "CHF_displayName": "Swiss Franc", "CHF_symbol": "SwF", "HKD_symbol": "HK$", "CAD_displayName": "Canadian Dollar", "USD_symbol": "US$", "AUD_displayName": "Australian Dollar", "JPY_displayName": "Japanese Yen", "USD_displayName": "US Dollar", "GBP_displayName": "British Pound Sterling", "AUD_symbol": "$A", "EUR_displayName": "Euro", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"})
\ No newline at end of file
+({"CAD_symbol":"$","USD_symbol":"US$","HKD_displayName":"Hong Kong Dollar","CHF_displayName":"Swiss Franc","JPY_symbol":"¥","CAD_displayName":"Canadian Dollar","CNY_displayName":"Chinese Yuan Renminbi","AUD_displayName":"Australian Dollar","JPY_displayName":"Japanese Yen","USD_displayName":"US Dollar","GBP_displayName":"British Pound Sterling","EUR_displayName":"Euro","CHF_symbol":"Fr.","HKD_symbol":"HK$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/en-ca/gregorian.js b/js/dojo/dojo/cldr/nls/en-ca/gregorian.js
--- a/js/dojo/dojo/cldr/nls/en-ca/gregorian.js
+++ b/js/dojo/dojo/cldr/nls/en-ca/gregorian.js
@@ -1,1 +1,1 @@
-({"dateFormat-medium": "d-MMM-yy", "dateFormat-short": "dd/MM/yy", "timeFormat-full": "h:mm:ss a v", "months-standAlone-narrow": ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], "eraNames": ["Before Christ", "Anno Domini"], "days-standAlone-narrow": ["S", "M", "T", "W", "T", "F", "S"], "timeFormat-medium": "h:mm:ss a", "dateFormat-long": "MMMM d, yyyy", "field-dayperiod": "AM/PM", "months-format-wide": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], "timeFormat-short": "h:mm a", "months-format-abbr": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], "days-format-wide": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], "timeFormat-long": "h:mm:ss a z", "eraAbbr": ["BC", "AD"], "quarters-format-wide": ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"], "dateFormat-full": "EEEE, MMMM d, yyyy", "days-format-abbr": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-minute": "Minute", "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "pm": "PM", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "am": "AM", "dateTimeFormats-appendItem-Era": "{0} {1}"})
\ No newline at end of file
+({"dateFormat-short":"yy-MM-dd","dateFormatItem-MMdd":"MM-dd","dateFormat-medium":"yyyy-MM-dd","dateFormatItem-yyMMM":"MMM-yy","dateFormatItem-yM":"M/yyyy","field-dayperiod":"AM/PM","dateFormatItem-yQ":"Q yyyy","field-minute":"Minute","eraNames":["Before Christ","Anno Domini"],"dateFormatItem-MMMEd":"E, MMM d","dateTimeFormat-full":"{1} {0}","field-weekday":"Day of the Week","dateFormatItem-yQQQ":"QQQ y","days-standAlone-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dateFormatItem-MMM":"LLL","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateTimeFormat-short":"{1} {0}","field-era":"Era","field-hour":"Hour","dateTimeFormat-medium":"{1} {0}","dateFormatItem-y":"y","timeFormat-full":"h:mm:ss a zzzz","months-standAlone-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"dateFormatItem-yMMM":"MMM y","days-standAlone-narrow":["S","M","T","W","T","F","S"],"eraAbbr":["BC","AD"],"dateFormat-long":"MMMM d, y","timeFormat-medium":"h:mm:ss a","dateFormatItem-EEEd":"d EEE","field-zone":"Zone","dateFormatItem-Hm":"H:mm","dateFormatItem-Hms":"H:mm:ss","quarters-standAlone-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"dateFormatItem-yMMMM":"MMMM y","dateFormatItem-ms":"mm:ss","field-year":"Year","quarters-standAlone-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","field-week":"Week","months-standAlone-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"dateFormatItem-MMMMEd":"E, MMMM d","dateFormatItem-MMMd":"MMM d","timeFormat-long":"h:mm:ss a z","months-format-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"timeFormat-short":"h:mm a","field-month":"Month","quarters-format-abbr":["Q1","Q2","Q3","Q4"],"dateFormatItem-MMMMd":"MMMM d","days-format-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"pm":"PM","dateFormatItem-M":"L","days-format-narrow":["S","M","T","W","T","F","S"],"field-second":"Second","field-day":"Day","dateFormatItem-MEd":"E, M/d","months-format-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-hm":"h:mm a","am":"AM","days-standAlone-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"dateFormatItem-yMMMEd":"EEE, MMM d, y","dateFormat-full":"EEEE, MMMM d, y","dateFormatItem-Md":"M/d","dateFormatItem-yMEd":"EEE, M/d/yyyy","months-format-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"dateFormatItem-d":"d","quarters-format-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"days-format-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"eraNarrow":["B","A"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-hms":"h:mm:ss a"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/en-gb/gregorian.js b/js/dojo/dojo/cldr/nls/en-gb/gregorian.js
--- a/js/dojo/dojo/cldr/nls/en-gb/gregorian.js
+++ b/js/dojo/dojo/cldr/nls/en-gb/gregorian.js
@@ -1,1 +1,1 @@
-({"dateFormat-short": "dd/MM/yyyy", "timeFormat-long": "HH:mm:ss z", "dateFormat-medium": "d MMM yyyy", "dateFormat-long": "d MMMM yyyy", "timeFormat-medium": "HH:mm:ss", "timeFormat-short": "HH:mm", "timeFormat-full": "HH:mm:ss z", "dateFormat-full": "EEEE, d MMMM yyyy", "months-standAlone-narrow": ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], "eraNames": ["Before Christ", "Anno Domini"], "days-standAlone-narrow": ["S", "M", "T", "W", "T", "F", "S"], "field-dayperiod": "AM/PM", "months-format-wide": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], "months-format-abbr": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], "days-format-wide": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], "eraAbbr": ["BC", "AD"], "quarters-format-wide": ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"], "days-format-abbr": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-minute": "Minute", "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "pm": "PM", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "am": "AM", "dateTimeFormats-appendItem-Era": "{0} {1}"})
\ No newline at end of file
+({"dateFormatItem-yyMMM":"MMM yy","dateFormatItem-Md":"d/M","dateFormatItem-yMEd":"EEE, d/M/yyyy","dateFormatItem-yyyyMMMM":"MMMM y","timeFormat-full":"HH:mm:ss zzzz","timeFormat-medium":"HH:mm:ss","dateFormatItem-MEd":"E, d/M","dateFormat-medium":"d MMM y","dateFormatItem-MMdd":"dd/MM","dateFormatItem-yyyyMM":"MM/yyyy","dateFormat-full":"EEEE, d MMMM y","timeFormat-long":"HH:mm:ss z","timeFormat-short":"HH:mm","dateFormat-short":"dd/MM/yyyy","dateFormatItem-MMMMd":"d MMMM","dateFormat-long":"d MMMM y","dateFormatItem-MMMEd":"E d MMM","dateFormatItem-yM":"M/yyyy","field-dayperiod":"AM/PM","dateFormatItem-yQ":"Q yyyy","field-minute":"Minute","eraNames":["Before Christ","Anno Domini"],"dateTimeFormat-full":"{1} {0}","field-weekday":"Day of the Week","dateFormatItem-yQQQ":"QQQ y","days-standAlone-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dateFormatItem-MMM":"LLL","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateTimeFormat-short":"{1} {0}","field-era":"Era","field-hour":"Hour","dateTimeFormat-medium":"{1} {0}","dateFormatItem-y":"y","months-standAlone-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"dateFormatItem-yMMM":"MMM y","days-standAlone-narrow":["S","M","T","W","T","F","S"],"eraAbbr":["BC","AD"],"dateFormatItem-EEEd":"d EEE","field-zone":"Zone","dateFormatItem-Hm":"H:mm","dateFormatItem-Hms":"H:mm:ss","quarters-standAlone-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"dateFormatItem-yMMMM":"MMMM y","dateFormatItem-ms":"mm:ss","field-year":"Year","quarters-standAlone-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","field-week":"Week","months-standAlone-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"dateFormatItem-MMMMEd":"E, MMMM d","dateFormatItem-MMMd":"MMM d","months-format-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"field-month":"Month","quarters-format-abbr":["Q1","Q2","Q3","Q4"],"days-format-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"pm":"PM","dateFormatItem-M":"L","days-format-narrow":["S","M","T","W","T","F","S"],"field-second":"Second","field-day":"Day","months-format-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-hm":"h:mm a","am":"AM","days-standAlone-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"dateFormatItem-yMMMEd":"EEE, MMM d, y","months-format-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"dateFormatItem-d":"d","quarters-format-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"days-format-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"eraNarrow":["B","A"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-hms":"h:mm:ss a"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/en-us/currency.js b/js/dojo/dojo/cldr/nls/en-us/currency.js
--- a/js/dojo/dojo/cldr/nls/en-us/currency.js
+++ b/js/dojo/dojo/cldr/nls/en-us/currency.js
@@ -1,1 +1,1 @@
-({"USD_symbol": "$", "HKD_displayName": "Hong Kong Dollar", "CHF_displayName": "Swiss Franc", "CHF_symbol": "SwF", "HKD_symbol": "HK$", "CAD_displayName": "Canadian Dollar", "AUD_displayName": "Australian Dollar", "JPY_displayName": "Japanese Yen", "CAD_symbol": "Can$", "USD_displayName": "US Dollar", "GBP_displayName": "British Pound Sterling", "AUD_symbol": "$A", "EUR_displayName": "Euro", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"})
\ No newline at end of file
+({"USD_symbol":"$","HKD_displayName":"Hong Kong Dollar","CHF_displayName":"Swiss Franc","JPY_symbol":"¥","CAD_displayName":"Canadian Dollar","CNY_displayName":"Chinese Yuan Renminbi","AUD_displayName":"Australian Dollar","JPY_displayName":"Japanese Yen","USD_displayName":"US Dollar","GBP_displayName":"British Pound Sterling","EUR_displayName":"Euro","CHF_symbol":"Fr.","HKD_symbol":"HK$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/en-us/number.js b/js/dojo/dojo/cldr/nls/en-us/number.js
--- a/js/dojo/dojo/cldr/nls/en-us/number.js
+++ b/js/dojo/dojo/cldr/nls/en-us/number.js
@@ -1,1 +1,1 @@
-({"currencyFormat": "¤#,##0.00;(¤#,##0.00)", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"})
\ No newline at end of file
+({"currencyFormat":"¤#,##0.00;(¤#,##0.00)","group":",","percentSign":"%","exponential":"E","percentFormat":"#,##0%","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":".","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/en/currency.js b/js/dojo/dojo/cldr/nls/en/currency.js
--- a/js/dojo/dojo/cldr/nls/en/currency.js
+++ b/js/dojo/dojo/cldr/nls/en/currency.js
@@ -1,1 +1,1 @@
-({"HKD_displayName": "Hong Kong Dollar", "CHF_displayName": "Swiss Franc", "CHF_symbol": "SwF", "HKD_symbol": "HK$", "CAD_displayName": "Canadian Dollar", "USD_symbol": "US$", "AUD_displayName": "Australian Dollar", "JPY_displayName": "Japanese Yen", "CAD_symbol": "Can$", "USD_displayName": "US Dollar", "GBP_displayName": "British Pound Sterling", "AUD_symbol": "$A", "EUR_displayName": "Euro", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"})
\ No newline at end of file
+({"HKD_displayName":"Hong Kong Dollar","CHF_displayName":"Swiss Franc","JPY_symbol":"¥","CAD_displayName":"Canadian Dollar","CNY_displayName":"Chinese Yuan Renminbi","USD_symbol":"$","AUD_displayName":"Australian Dollar","JPY_displayName":"Japanese Yen","USD_displayName":"US Dollar","GBP_displayName":"British Pound Sterling","EUR_displayName":"Euro","CHF_symbol":"Fr.","HKD_symbol":"HK$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/en/gregorian.js b/js/dojo/dojo/cldr/nls/en/gregorian.js
--- a/js/dojo/dojo/cldr/nls/en/gregorian.js
+++ b/js/dojo/dojo/cldr/nls/en/gregorian.js
@@ -1,1 +1,1 @@
-({"dateFormat-medium": "MMM d, yyyy", "timeFormat-full": "h:mm:ss a v", "months-standAlone-narrow": ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], "eraNames": ["Before Christ", "Anno Domini"], "days-standAlone-narrow": ["S", "M", "T", "W", "T", "F", "S"], "timeFormat-medium": "h:mm:ss a", "dateFormat-long": "MMMM d, yyyy", "field-dayperiod": "AM/PM", "dateFormat-short": "M/d/yy", "months-format-wide": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], "timeFormat-short": "h:mm a", "months-format-abbr": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], "days-format-wide": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], "timeFormat-long": "h:mm:ss a z", "eraAbbr": ["BC", "AD"], "quarters-format-wide": ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"], "dateFormat-full": "EEEE, MMMM d, yyyy", "days-format-abbr": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-minute": "Minute", "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "pm": "PM", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "am": "AM", "dateTimeFormats-appendItem-Era": "{0} {1}"})
\ No newline at end of file
+({"dateFormatItem-yM":"M/yyyy","field-dayperiod":"AM/PM","dateFormatItem-yQ":"Q yyyy","field-minute":"Minute","eraNames":["Before Christ","Anno Domini"],"dateFormatItem-MMMEd":"E, MMM d","dateTimeFormat-full":"{1} {0}","field-weekday":"Day of the Week","dateFormatItem-yQQQ":"QQQ y","days-standAlone-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dateFormatItem-MMM":"LLL","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateTimeFormat-short":"{1} {0}","field-era":"Era","field-hour":"Hour","dateTimeFormat-medium":"{1} {0}","dateFormatItem-y":"y","timeFormat-full":"h:mm:ss a zzzz","months-standAlone-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"dateFormatItem-yMMM":"MMM y","days-standAlone-narrow":["S","M","T","W","T","F","S"],"eraAbbr":["BC","AD"],"dateFormat-long":"MMMM d, y","timeFormat-medium":"h:mm:ss a","dateFormatItem-EEEd":"d EEE","field-zone":"Zone","dateFormatItem-Hm":"H:mm","dateFormat-medium":"MMM d, y","dateFormatItem-Hms":"H:mm:ss","quarters-standAlone-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"dateFormatItem-yMMMM":"MMMM y","dateFormatItem-ms":"mm:ss","field-year":"Year","quarters-standAlone-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","field-week":"Week","months-standAlone-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"dateFormatItem-MMMMEd":"E, MMMM d","dateFormatItem-MMMd":"MMM d","timeFormat-long":"h:mm:ss a z","months-format-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"timeFormat-short":"h:mm a","field-month":"Month","quarters-format-abbr":["Q1","Q2","Q3","Q4"],"dateFormatItem-MMMMd":"MMMM d","days-format-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"pm":"PM","dateFormatItem-M":"L","days-format-narrow":["S","M","T","W","T","F","S"],"field-second":"Second","field-day":"Day","dateFormatItem-MEd":"E, M/d","months-format-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-hm":"h:mm a","am":"AM","days-standAlone-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"dateFormat-short":"M/d/yy","dateFormatItem-yMMMEd":"EEE, MMM d, y","dateFormat-full":"EEEE, MMMM d, y","dateFormatItem-Md":"M/d","dateFormatItem-yMEd":"EEE, M/d/yyyy","months-format-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"dateFormatItem-d":"d","quarters-format-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"days-format-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"eraNarrow":["B","A"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-hms":"h:mm:ss a"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/en/number.js b/js/dojo/dojo/cldr/nls/en/number.js
--- a/js/dojo/dojo/cldr/nls/en/number.js
+++ b/js/dojo/dojo/cldr/nls/en/number.js
@@ -1,1 +1,1 @@
-({"currencyFormat": "¤#,##0.00", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"})
\ No newline at end of file
+({"group":",","percentSign":"%","exponential":"E","percentFormat":"#,##0%","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":".","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","currencyFormat":"¤#,##0.00;(¤#,##0.00)","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/es-es/gregorian.js b/js/dojo/dojo/cldr/nls/es-es/gregorian.js
--- a/js/dojo/dojo/cldr/nls/es-es/gregorian.js
+++ b/js/dojo/dojo/cldr/nls/es-es/gregorian.js
@@ -1,1 +1,1 @@
-({"dateFormat-short": "dd/MM/yy", "dateFormat-medium": "dd/MM/yyyy", "timeFormat-medium": "H:mm:ss", "timeFormat-short": "H:mm", "quarters-format-abbreviated": ["T1", "T2", "T3", "T4"], "field-second": "segundo", "field-week": "semana", "pm": "p.m.", "timeFormat-full": "HH'H'mm''ss\" z", "months-standAlone-narrow": ["E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], "am": "a.m.", "days-standAlone-narrow": ["D", "L", "M", "M", "J", "V", "S"], "field-year": "año", "field-minute": "minuto", "field-hour": "hora", "dateFormat-long": "d' de 'MMMM' de 'yyyy", "field-day": "día", "field-dayperiod": "periodo del día", "field-month": "mes", "months-format-wide": ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"], "field-era": "era", "months-format-abbr": ["ene", "feb", "mar", "abr", "may", "jun", "jul", "ago", "sep", "oct", "nov", "dic"], "days-format-wide": ["domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"], "eraAbbr": ["a.C.", "d.C."], "quarters-format-wide": ["1er trimestre", "2º trimestre", "3er trimestre", "4º trimestre"], "dateFormat-full": "EEEE d' de 'MMMM' de 'yyyy", "field-weekday": "día de la semana", "days-format-abbr": ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"], "field-zone": "zona", "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "eraNames": ["BCE", "CE"], "dateTimeFormats-appendItem-Year": "{0} {1}", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateTimeFormat": "{1} {0}", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "timeFormat-long": "HH:mm:ss z", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Era": "{0} {1}"})
\ No newline at end of file
+({"timeFormat-medium":"H:mm:ss","timeFormat-full":"HH'H'mm''ss\" v","timeFormat-short":"H:mm","months-format-narrow":["E","F","M","A","M","J","J","A","S","O","N","D"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"día de la semana","dateFormatItem-yyQQQQ":"QQQQ 'de' yy","dateFormatItem-yQQQ":"QQQ yyyy","dateFormatItem-yMEd":"EEE d/M/yyyy","dateFormatItem-MMMEd":"E d MMM","eraNarrow":["a.C.","d.C."],"dateFormatItem-MMMdd":"dd-MMM","dateFormat-long":"d 'de' MMMM 'de' y","months-format-wide":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],"dateFormatItem-EEEd":"EEE d","dateFormat-full":"EEEE d 'de' MMMM 'de' y","dateFormatItem-Md":"d/M","field-era":"era","dateFormatItem-yM":"M/yyyy","months-standAlone-wide":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],"quarters-format-wide":["1er trimestre","2º trimestre","3er trimestre","4º trimestre"],"timeFormat-long":"HH:mm:ss z","field-year":"año","dateFormatItem-yMMM":"MMM y","dateFormatItem-yQ":"Q yyyy","field-hour":"hora","months-format-abbr":["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],"dateFormatItem-yyQ":"Q yy","am":"a.m.","months-standAlone-abbr":["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],"quarters-format-abbr":["T1","T2","T3","T4"],"quarters-standAlone-wide":["1er trimestre","2º trimestre","3er trimestre","4º trimestre"],"dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-hhmmss":"hh:mm:ss a","dateFormatItem-M":"L","days-standAlone-wide":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"dateFormatItem-MMMMd":"d 'de' MMMM","dateFormatItem-yyMMM":"MMM-yy","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["T1","T2","T3","T4"],"eraAbbr":["a.C.","d.C."],"field-minute":"minuto","field-dayperiod":"periodo del día","days-standAlone-abbr":["dom","lun","mar","mié","jue","vie","sáb"],"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E, d-M","dateFormatItem-yMMMM":"MMMM 'de' y","field-day":"día","days-format-wide":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"field-zone":"zona","dateFormatItem-yyyyMM":"MM/yyyy","dateFormatItem-y":"y","months-standAlone-narrow":["E","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-yyMM":"MM/yy","days-format-abbr":["dom","lun","mar","mié","jue","vie","sáb"],"eraNames":["antes de Cristo","anno Dómini"],"days-format-narrow":["D","L","M","M","J","V","S"],"field-month":"mes","days-standAlone-narrow":["D","L","M","M","J","V","S"],"dateFormatItem-MMM":"LLL","dateFormatItem-HHmm":"HH:mm","pm":"p.m.","dateFormatItem-MMMMEd":"E d MMMM","dateFormat-short":"dd/MM/yy","dateFormatItem-MMd":"d/MM","field-second":"segundo","dateFormatItem-yMMMEd":"EEE, d MMM y","dateFormatItem-hhmm":"hh:mm a","field-week":"semana","dateFormat-medium":"dd/MM/yyyy","dateFormatItem-mmss":"mm:ss","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormat-medium":"{1} {0}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","dateTimeFormat-full":"{1} {0}","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/es-es/number.js b/js/dojo/dojo/cldr/nls/es-es/number.js
--- a/js/dojo/dojo/cldr/nls/es-es/number.js
+++ b/js/dojo/dojo/cldr/nls/es-es/number.js
@@ -1,1 +1,1 @@
-({"currencyFormat": "#,##0.00 ¤", "group": ".", "decimal": ",", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"})
\ No newline at end of file
+({"currencyFormat":"#,##0.00 ¤","group":".","percentSign":"%","exponential":"E","percentFormat":"#,##0%","scientificFormat":"#E0","list":";","infinity":"∞","minusSign":"-","decimal":",","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","patternDigit":"#","currencySpacing-beforeCurrency-insertBetween":" "})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/es/currency.js b/js/dojo/dojo/cldr/nls/es/currency.js
--- a/js/dojo/dojo/cldr/nls/es/currency.js
+++ b/js/dojo/dojo/cldr/nls/es/currency.js
@@ -1,1 +1,1 @@
-({"HKD_displayName": "dólar de Hong Kong", "CHF_displayName": "franco suizo", "CHF_symbol": "SwF", "HKD_symbol": "HK$", "CAD_displayName": "dólar canadiense", "USD_symbol": "US$", "AUD_displayName": "dólar australiano", "JPY_displayName": "yen japonés", "CAD_symbol": "Can$", "USD_displayName": "dólar estadounidense", "GBP_displayName": "libra esterlina británica", "AUD_symbol": "$A", "EUR_displayName": "euro", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"})
\ No newline at end of file
+({"HKD_displayName":"dólar de Hong Kong","CHF_displayName":"franco suizo","CAD_displayName":"dólar canadiense","CNY_displayName":"yuan renminbi chino","AUD_displayName":"dólar australiano","JPY_displayName":"yen japonés","USD_displayName":"dólar estadounidense","GBP_displayName":"libra esterlina británica","EUR_displayName":"euro","CHF_symbol":"Fr.","JPY_symbol":"JP¥","HKD_symbol":"HK$","USD_symbol":"US$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/es/gregorian.js b/js/dojo/dojo/cldr/nls/es/gregorian.js
--- a/js/dojo/dojo/cldr/nls/es/gregorian.js
+++ b/js/dojo/dojo/cldr/nls/es/gregorian.js
@@ -1,1 +1,1 @@
-({"quarters-format-abbreviated": ["T1", "T2", "T3", "T4"], "dateFormat-medium": "dd-MMM-yy", "field-second": "segundo", "field-week": "semana", "pm": "p.m.", "timeFormat-full": "HH'H'mm''ss\" z", "months-standAlone-narrow": ["E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], "am": "a.m.", "days-standAlone-narrow": ["D", "L", "M", "M", "J", "V", "S"], "field-year": "año", "field-minute": "minuto", "field-hour": "hora", "dateFormat-long": "d' de 'MMMM' de 'yyyy", "field-day": "día", "field-dayperiod": "periodo del día", "field-month": "mes", "dateFormat-short": "d/MM/yy", "months-format-wide": ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"], "field-era": "era", "months-format-abbr": ["ene", "feb", "mar", "abr", "may", "jun", "jul", "ago", "sep", "oct", "nov", "dic"], "days-format-wide": ["domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"], "eraAbbr": ["a.C.", "d.C."], "quarters-format-wide": ["1er trimestre", "2º trimestre", "3er trimestre", "4º trimestre"], "dateFormat-full": "EEEE d' de 'MMMM' de 'yyyy", "field-weekday": "día de la semana", "days-format-abbr": ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"], "field-zone": "zona", "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "eraNames": ["BCE", "CE"], "dateTimeFormats-appendItem-Year": "{0} {1}", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "timeFormat-medium": "HH:mm:ss", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateTimeFormat": "{1} {0}", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "timeFormat-long": "HH:mm:ss z", "timeFormat-short": "HH:mm", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Era": "{0} {1}"})
\ No newline at end of file
+({"months-format-narrow":["E","F","M","A","M","J","J","A","S","O","N","D"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"día de la semana","dateFormatItem-yyQQQQ":"QQQQ 'de' yy","dateFormatItem-yQQQ":"QQQ yyyy","dateFormatItem-yMEd":"EEE d/M/yyyy","dateFormatItem-MMMEd":"E d MMM","eraNarrow":["a.C.","d.C."],"dateFormatItem-MMMdd":"dd-MMM","dateFormat-long":"d 'de' MMMM 'de' y","months-format-wide":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],"dateFormatItem-EEEd":"EEE d","dateFormat-full":"EEEE d 'de' MMMM 'de' y","dateFormatItem-Md":"d/M","field-era":"era","dateFormatItem-yM":"M/yyyy","months-standAlone-wide":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],"timeFormat-short":"HH:mm","quarters-format-wide":["1er trimestre","2º trimestre","3er trimestre","4º trimestre"],"timeFormat-long":"HH:mm:ss z","field-year":"año","dateFormatItem-yMMM":"MMM y","dateFormatItem-yQ":"Q yyyy","field-hour":"hora","months-format-abbr":["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],"dateFormatItem-yyQ":"Q yy","timeFormat-full":"HH:mm:ss zzzz","am":"a.m.","months-standAlone-abbr":["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],"quarters-format-abbr":["T1","T2","T3","T4"],"quarters-standAlone-wide":["1er trimestre","2º trimestre","3er trimestre","4º trimestre"],"dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-hhmmss":"hh:mm:ss a","dateFormatItem-M":"L","days-standAlone-wide":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"dateFormatItem-MMMMd":"d 'de' MMMM","dateFormatItem-yyMMM":"MMM-yy","timeFormat-medium":"HH:mm:ss","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["T1","T2","T3","T4"],"eraAbbr":["a.C.","d.C."],"field-minute":"minuto","field-dayperiod":"periodo del día","days-standAlone-abbr":["dom","lun","mar","mié","jue","vie","sáb"],"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E, d-M","dateFormatItem-yMMMM":"MMMM 'de' y","field-day":"día","days-format-wide":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"field-zone":"zona","dateFormatItem-yyyyMM":"MM/yyyy","dateFormatItem-y":"y","months-standAlone-narrow":["E","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-yyMM":"MM/yy","days-format-abbr":["dom","lun","mar","mié","jue","vie","sáb"],"eraNames":["antes de Cristo","anno Dómini"],"days-format-narrow":["D","L","M","M","J","V","S"],"field-month":"mes","days-standAlone-narrow":["D","L","M","M","J","V","S"],"dateFormatItem-MMM":"LLL","dateFormatItem-HHmm":"HH:mm","pm":"p.m.","dateFormatItem-MMMMEd":"E d MMMM","dateFormat-short":"dd/MM/yy","dateFormatItem-MMd":"d/MM","field-second":"segundo","dateFormatItem-yMMMEd":"EEE, d MMM y","dateFormatItem-hhmm":"hh:mm a","field-week":"semana","dateFormat-medium":"dd/MM/yyyy","dateFormatItem-mmss":"mm:ss","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormat-medium":"{1} {0}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","dateTimeFormat-full":"{1} {0}","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/es/number.js b/js/dojo/dojo/cldr/nls/es/number.js
--- a/js/dojo/dojo/cldr/nls/es/number.js
+++ b/js/dojo/dojo/cldr/nls/es/number.js
@@ -1,1 +1,1 @@
-({"currencyFormat": "¤#,##0.00;(¤#,##0.00)", "group": ".", "decimal": ",", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"})
\ No newline at end of file
+({"group":".","percentSign":"%","exponential":"E","percentFormat":"#,##0%","scientificFormat":"#E0","list":";","infinity":"∞","minusSign":"-","decimal":",","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","currencyFormat":"¤ #,##0.00","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","patternDigit":"#","currencySpacing-beforeCurrency-insertBetween":" "})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/fr/currency.js b/js/dojo/dojo/cldr/nls/fr/currency.js
--- a/js/dojo/dojo/cldr/nls/fr/currency.js
+++ b/js/dojo/dojo/cldr/nls/fr/currency.js
@@ -1,1 +1,1 @@
-({"HKD_displayName": "dollar de Hong Kong", "CHF_displayName": "franc suisse", "CHF_symbol": "sFr.", "CAD_displayName": "dollar canadien", "AUD_displayName": "dollar australien", "JPY_displayName": "yen", "USD_displayName": "dollar des États-Unis", "GBP_displayName": "livre sterling", "EUR_displayName": "euro", "USD_symbol": "$", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"})
\ No newline at end of file
+({"HKD_displayName":"dollar de Hong Kong","CHF_displayName":"franc suisse","CHF_symbol":"CHF","JPY_symbol":"¥JP","HKD_symbol":"$HK","CAD_displayName":"dollar canadien","CNY_displayName":"yuan renminbi chinois","USD_symbol":"$US","AUD_displayName":"dollar australien","JPY_displayName":"yen japonais","CAD_symbol":"$CA","USD_displayName":"dollar des États-Unis","CNY_symbol":"Ұ","GBP_displayName":"livre sterling","GBP_symbol":"£UK","AUD_symbol":"$AU","EUR_displayName":"euro","EUR_symbol":"€"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/fr/gregorian.js b/js/dojo/dojo/cldr/nls/fr/gregorian.js
--- a/js/dojo/dojo/cldr/nls/fr/gregorian.js
+++ b/js/dojo/dojo/cldr/nls/fr/gregorian.js
@@ -1,1 +1,1 @@
-({"eraNames": ["av. J.-C.", "ap. J.-C."], "timeFormat-full": "HH' h 'mm z", "eraAbbr": ["av. J.-C.", "apr. J.-C."], "dateFormat-medium": "d MMM yy", "months-format-abbr": ["janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."], "dateFormat-full": "EEEE d MMMM yyyy", "days-format-abbr": ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."], "quarters-format-wide": ["1er trimestre", "2e trimestre", "3e trimestre", "4e trimestre"], "dateFormat-short": "dd/MM/yy", "quarters-format-abbreviated": ["T1", "T2", "T3", "T4"], "months-format-wide": ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"], "months-standAlone-narrow": ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], "days-standAlone-narrow": ["D", "L", "M", "M", "J", "V", "S"], "dateFormat-long": "d MMMM yyyy", "days-format-wide": ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "timeFormat-medium": "HH:mm:ss", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "timeFormat-long": "HH:mm:ss z", "timeFormat-short": "HH:mm", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "pm": "PM", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "am": "AM", "dateTimeFormats-appendItem-Era": "{0} {1}"})
\ No newline at end of file
+({"months-format-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"jour de la semaine","dateFormatItem-yyQQQQ":"QQQQ yy","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"EEE d/M/yyyy","dateFormatItem-MMMEd":"E d MMM","eraNarrow":["av. J.-C.","ap. J.-C."],"dateFormatItem-MMMdd":"dd MMM","dateFormat-long":"d MMMM y","months-format-wide":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],"dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d EEE","dateFormat-full":"EEEE d MMMM y","dateFormatItem-Md":"d/M","field-era":"ère","dateFormatItem-yM":"M/yyyy","months-standAlone-wide":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],"timeFormat-short":"HH:mm","quarters-format-wide":["1er trimestre","2e trimestre","3e trimestre","4e trimestre"],"timeFormat-long":"HH:mm:ss z","field-year":"année","dateFormatItem-yMMM":"MMM y","dateFormatItem-yQ":"'T'Q y","dateFormatItem-yyyyMMMM":"MMMM y","field-hour":"heure","dateFormatItem-MMdd":"dd/MM","months-format-abbr":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],"dateFormatItem-yyQ":"'T'Q yy","timeFormat-full":"HH:mm:ss zzzz","am":"AM","months-standAlone-abbr":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],"quarters-format-abbr":["T1","T2","T3","T4"],"quarters-standAlone-wide":["1er trimestre","2e trimestre","3e trimestre","4e trimestre"],"dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"L","days-standAlone-wide":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dateFormatItem-MMMMd":"d MMMM","dateFormatItem-yyMMMEEEd":"EEE d MMM yy","dateFormatItem-yyMMM":"MMM yy","timeFormat-medium":"HH:mm:ss","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["T1","T2","T3","T4"],"eraAbbr":["av. J.-C.","ap. J.-C."],"field-minute":"minute","field-dayperiod":"cadran","days-standAlone-abbr":["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],"dateFormatItem-yyMMMd":"d MMM yy","dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["T1","T2","T3","T4"],"dateTimeFormat-long":"{1} {0}","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"EEE d/M","dateFormatItem-yMMMM":"MMMM y","field-day":"jour","days-format-wide":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"field-zone":"fuseau horaire","dateFormatItem-y":"y","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-yyMM":"MM/yy","days-format-abbr":["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],"eraNames":["avant Jésus-Christ","après Jésus-Christ"],"days-format-narrow":["D","L","M","M","J","V","S"],"field-month":"mois","days-standAlone-narrow":["D","L","M","M","J","V","S"],"dateFormatItem-MMM":"LLL","dateFormatItem-HHmm":"HH:mm","pm":"PM","dateFormatItem-MMMMEd":"EEE d MMMM","dateFormat-short":"dd/MM/yy","dateFormatItem-MMd":"d/MM","field-second":"seconde","dateFormatItem-yMMMEd":"EEE d MMM y","field-week":"semaine","dateFormat-medium":"d MMM y","dateFormatItem-mmss":"mm:ss","dateTimeFormat-short":"{1} {0}","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","dateTimeFormat-full":"{1} {0}","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/fr/number.js b/js/dojo/dojo/cldr/nls/fr/number.js
--- a/js/dojo/dojo/cldr/nls/fr/number.js
+++ b/js/dojo/dojo/cldr/nls/fr/number.js
@@ -1,1 +1,1 @@
-({"group": " ", "percentFormat": "#,##0 %", "currencyFormat": "#,##0.00 ¤", "decimal": ",", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "decimalFormat": "#,##0.###", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"})
\ No newline at end of file
+({"group":" ","percentSign":"%","exponential":"E","percentFormat":"#,##0 %","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":",","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","currencyFormat":"#,##0.00 ¤","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/gregorian.js b/js/dojo/dojo/cldr/nls/gregorian.js
--- a/js/dojo/dojo/cldr/nls/gregorian.js
+++ b/js/dojo/dojo/cldr/nls/gregorian.js
@@ -1,1 +1,1 @@
-({"dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "eraNames": ["BCE", "CE"], "field-weekday": "Day of the Week", "months-standAlone-narrow": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "timeFormat-full": "HH:mm:ss z", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "days-standAlone-narrow": ["1", "2", "3", "4", "5", "6", "7"], "eraAbbr": ["BCE", "CE"], "dateFormat-long": "yyyy MMMM d", "timeFormat-medium": "HH:mm:ss", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateFormat-medium": "yyyy MMM d", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "timeFormat-long": "HH:mm:ss z", "months-format-abbr": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "timeFormat-short": "HH:mm", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "days-format-abbr": ["1", "2", "3", "4", "5", "6", "7"], "pm": "PM", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "am": "AM", "dateFormat-short": "yy/MM/dd", "dateFormat-full": "EEEE, yyyy MMMM dd", "months-format-wide": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "dateTimeFormats-appendItem-Era": "{0} {1}", "quarters-format-wide": ["Q1", "Q2", "Q3", "Q4"], "days-format-wide": ["1", "2", "3", "4", "5", "6", "7"]})
\ No newline at end of file
+({"months-format-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Day of the Week","dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"EEE, y-M-d","dateFormatItem-MMMEd":"E MMM d","eraNarrow":["BCE","CE"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"y MMMM d","months-format-wide":["1","2","3","4","5","6","7","8","9","10","11","12"],"dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d EEE","dateFormat-full":"EEEE, y MMMM dd","dateFormatItem-Md":"M-d","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","field-era":"Era","dateFormatItem-yM":"y-M","months-standAlone-wide":["1","2","3","4","5","6","7","8","9","10","11","12"],"timeFormat-short":"HH:mm","quarters-format-wide":["Q1","Q2","Q3","Q4"],"timeFormat-long":"HH:mm:ss z","field-year":"Year","dateFormatItem-yMMM":"y MMM","dateFormatItem-yQ":"y Q","dateTimeFormats-appendItem-Era":"{0} {1}","field-hour":"Hour","months-format-abbr":["1","2","3","4","5","6","7","8","9","10","11","12"],"timeFormat-full":"HH:mm:ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","am":"AM","months-standAlone-abbr":["1","2","3","4","5","6","7","8","9","10","11","12"],"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["Q1","Q2","Q3","Q4"],"dateFormatItem-M":"L","days-standAlone-wide":["1","2","3","4","5","6","7"],"dateFormatItem-MMMMd":"MMMM d","timeFormat-medium":"HH:mm:ss","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"eraAbbr":["BCE","CE"],"field-minute":"Minute","field-dayperiod":"Dayperiod","days-standAlone-abbr":["1","2","3","4","5","6","7"],"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","dateFormatItem-MMMd":"MMM d","dateFormatItem-MEd":"E, M-d","dateTimeFormat-full":"{1} {0}","dateFormatItem-yMMMM":"y MMMM","field-day":"Day","days-format-wide":["1","2","3","4","5","6","7"],"field-zone":"Zone","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-y":"y","months-standAlone-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","days-format-abbr":["1","2","3","4","5","6","7"],"eraNames":["BCE","CE"],"days-format-narrow":["1","2","3","4","5","6","7"],"field-month":"Month","days-standAlone-narrow":["1","2","3","4","5","6","7"],"dateFormatItem-MMM":"LLL","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","pm":"PM","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateFormatItem-MMMMEd":"E MMMM d","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormat-short":"yyyy-MM-dd","field-second":"Second","dateFormatItem-yMMMEd":"EEE, y MMM d","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"Week","dateFormat-medium":"y MMM d","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/it-it/gregorian.js b/js/dojo/dojo/cldr/nls/it-it/gregorian.js
--- a/js/dojo/dojo/cldr/nls/it-it/gregorian.js
+++ b/js/dojo/dojo/cldr/nls/it-it/gregorian.js
@@ -1,1 +1,1 @@
-({"timeFormat-long": "H:mm:ss z", "quarters-format-abbreviated": ["T1", "T2", "T3", "T4"], "dateFormat-medium": "dd/MMM/yy", "field-second": "secondo", "field-week": "settimana", "pm": "p.", "months-standAlone-narrow": ["G", "F", "M", "A", "M", "G", "L", "A", "S", "O", "N", "D"], "am": "m.", "days-standAlone-narrow": ["D", "L", "M", "M", "G", "V", "S"], "field-year": "anno", "field-minute": "minuto", "field-hour": "ora", "dateFormat-long": "dd MMMM yyyy", "field-day": "giorno", "field-dayperiod": "periodo del giorno", "field-month": "mese", "dateFormat-short": "dd/MM/yy", "months-format-wide": ["gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"], "field-era": "era", "months-format-abbr": ["gen", "feb", "mar", "apr", "mag", "giu", "lug", "ago", "set", "ott", "nov", "dic"], "days-format-wide": ["domenica", "lunedì", "martedì", "mercoledì", "giovedì", "venerdì", "sabato"], "eraAbbr": ["aC", "dC"], "quarters-format-wide": ["1o trimestre", "2o trimestre", "3o trimestre", "4o trimestre"], "dateFormat-full": "EEEE d MMMM yyyy", "field-weekday": "giorno della settimana", "days-format-abbr": ["dom", "lun", "mar", "mer", "gio", "ven", "sab"], "field-zone": "zona", "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "eraNames": ["BCE", "CE"], "dateTimeFormats-appendItem-Year": "{0} {1}", "timeFormat-full": "HH:mm:ss z", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "timeFormat-medium": "HH:mm:ss", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateTimeFormat": "{1} {0}", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "timeFormat-short": "HH:mm", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Era": "{0} {1}"})
\ No newline at end of file
+({"timeFormat-long":"H:mm:ss z","dateFormatItem-yM":"M/yyyy","field-dayperiod":"periodo del giorno","dateFormatItem-yQ":"Q-yyyy","field-minute":"minuto","eraNames":["a.C.","d.C"],"dateFormatItem-MMMEd":"EEE d MMM","field-weekday":"giorno della settimana","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-MMdd":"dd/MM","days-standAlone-wide":["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],"dateFormatItem-MMM":"LLL","months-standAlone-narrow":["G","F","M","A","M","G","L","A","S","O","N","D"],"field-era":"era","field-hour":"ora","dateFormatItem-hhmm":"hh.mm a","quarters-standAlone-abbr":["T1","T2","T3","T4"],"dateFormatItem-y":"y","timeFormat-full":"HH.mm.ss zzzz","months-standAlone-abbr":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],"dateFormatItem-yMMM":"MMM y","days-standAlone-narrow":["D","L","M","M","G","V","S"],"eraAbbr":["aC","dC"],"dateFormatItem-yyyyMMMM":"MMMM y","dateFormat-long":"dd MMMM y","timeFormat-medium":"HH.mm.ss","field-zone":"zona","dateFormatItem-Hm":"HH:mm","dateFormatItem-yyMM":"MM/yy","dateFormat-medium":"dd/MMM/y","dateFormatItem-yyQQQQ":"QQQQ yy","quarters-standAlone-wide":["1o trimestre","2o trimestre","3o trimestre","4o trimestre"],"dateFormatItem-yMMMM":"MMMM y","dateFormatItem-ms":"mm:ss","field-year":"anno","quarters-standAlone-narrow":["1","2","3","4"],"dateFormatItem-HHmmss":"HH.mm.ss","months-standAlone-wide":["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],"field-week":"settimana","dateFormatItem-MMMMEd":"EEE d MMMM","dateFormatItem-MMMd":"d MMM","dateFormatItem-HHmm":"HH.mm","dateFormatItem-yyQ":"Q yy","months-format-abbr":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],"timeFormat-short":"HH.mm","field-month":"mese","quarters-format-abbr":["T1","T2","T3","T4"],"dateFormatItem-MMMMd":"d MMMM","days-format-abbr":["dom","lun","mar","mer","gio","ven","sab"],"dateFormatItem-MMMMdd":"dd MMMM","pm":"p.","dateFormatItem-M":"L","days-format-narrow":["D","L","M","M","G","V","S"],"field-second":"secondo","field-day":"giorno","dateFormatItem-MEd":"EEE d/M","months-format-narrow":["G","F","M","A","M","G","L","A","S","O","N","D"],"dateFormatItem-hhmmss":"hh.mm.ss a","am":"m.","days-standAlone-abbr":["dom","lun","mar","mer","gio","ven","sab"],"dateFormat-short":"dd/MM/yy","dateFormatItem-yMMMEd":"EEE d MMM y","dateFormat-full":"EEEE d MMMM y","dateFormatItem-Md":"d/M","dateFormatItem-yMEd":"EEE, d-M-yyyy","months-format-wide":["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],"dateFormatItem-d":"d","quarters-format-wide":["1o trimestre","2o trimestre","3o trimestre","4o trimestre"],"days-format-wide":["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],"eraNarrow":["aC","dC"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d EEE","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","dateTimeFormat-full":"{1} {0}","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/it/currency.js b/js/dojo/dojo/cldr/nls/it/currency.js
--- a/js/dojo/dojo/cldr/nls/it/currency.js
+++ b/js/dojo/dojo/cldr/nls/it/currency.js
@@ -1,1 +1,1 @@
-({"HKD_displayName": "Dollaro di Hong Kong", "CHF_displayName": "Franco Svizzero", "CHF_symbol": "SFr.", "CAD_displayName": "Dollaro Canadese", "AUD_displayName": "Dollaro Australiano", "JPY_displayName": "Yen Giapponese", "USD_displayName": "Dollaro Statunitense", "GBP_displayName": "Sterlina Inglese", "EUR_displayName": "Euro", "USD_symbol": "$", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"})
\ No newline at end of file
+({"HKD_displayName":"Dollaro di Hong Kong","CHF_displayName":"Franco Svizzero","CAD_displayName":"Dollaro Canadese","CNY_displayName":"Renmimbi Cinese","AUD_displayName":"Dollaro Australiano","JPY_displayName":"Yen Giapponese","USD_displayName":"Dollaro Statunitense","GBP_displayName":"Sterlina Inglese","EUR_displayName":"Euro","CHF_symbol":"Fr.","JPY_symbol":"JP¥","HKD_symbol":"HK$","USD_symbol":"US$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/it/gregorian.js b/js/dojo/dojo/cldr/nls/it/gregorian.js
--- a/js/dojo/dojo/cldr/nls/it/gregorian.js
+++ b/js/dojo/dojo/cldr/nls/it/gregorian.js
@@ -1,1 +1,1 @@
-({"quarters-format-abbreviated": ["T1", "T2", "T3", "T4"], "dateFormat-medium": "dd/MMM/yy", "field-second": "secondo", "field-week": "settimana", "pm": "p.", "months-standAlone-narrow": ["G", "F", "M", "A", "M", "G", "L", "A", "S", "O", "N", "D"], "am": "m.", "days-standAlone-narrow": ["D", "L", "M", "M", "G", "V", "S"], "field-year": "anno", "field-minute": "minuto", "field-hour": "ora", "dateFormat-long": "dd MMMM yyyy", "field-day": "giorno", "field-dayperiod": "periodo del giorno", "field-month": "mese", "dateFormat-short": "dd/MM/yy", "months-format-wide": ["gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"], "field-era": "era", "months-format-abbr": ["gen", "feb", "mar", "apr", "mag", "giu", "lug", "ago", "set", "ott", "nov", "dic"], "days-format-wide": ["domenica", "lunedì", "martedì", "mercoledì", "giovedì", "venerdì", "sabato"], "eraAbbr": ["aC", "dC"], "quarters-format-wide": ["1o trimestre", "2o trimestre", "3o trimestre", "4o trimestre"], "dateFormat-full": "EEEE d MMMM yyyy", "field-weekday": "giorno della settimana", "days-format-abbr": ["dom", "lun", "mar", "mer", "gio", "ven", "sab"], "field-zone": "zona", "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "eraNames": ["BCE", "CE"], "dateTimeFormats-appendItem-Year": "{0} {1}", "timeFormat-full": "HH:mm:ss z", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "timeFormat-medium": "HH:mm:ss", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateTimeFormat": "{1} {0}", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "timeFormat-long": "HH:mm:ss z", "timeFormat-short": "HH:mm", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Era": "{0} {1}"})
\ No newline at end of file
+({"dateFormatItem-yM":"M/yyyy","field-dayperiod":"periodo del giorno","dateFormatItem-yQ":"Q-yyyy","field-minute":"minuto","eraNames":["a.C.","d.C"],"dateFormatItem-MMMEd":"EEE d MMM","field-weekday":"giorno della settimana","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-MMdd":"dd/MM","days-standAlone-wide":["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],"dateFormatItem-MMM":"LLL","months-standAlone-narrow":["G","F","M","A","M","G","L","A","S","O","N","D"],"field-era":"era","field-hour":"ora","dateFormatItem-hhmm":"hh.mm a","quarters-standAlone-abbr":["T1","T2","T3","T4"],"dateFormatItem-y":"y","timeFormat-full":"HH.mm.ss zzzz","months-standAlone-abbr":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],"dateFormatItem-yMMM":"MMM y","days-standAlone-narrow":["D","L","M","M","G","V","S"],"eraAbbr":["aC","dC"],"dateFormatItem-yyyyMMMM":"MMMM y","dateFormat-long":"dd MMMM y","timeFormat-medium":"HH.mm.ss","field-zone":"zona","dateFormatItem-Hm":"HH:mm","dateFormatItem-yyMM":"MM/yy","dateFormat-medium":"dd/MMM/y","dateFormatItem-yyQQQQ":"QQQQ yy","quarters-standAlone-wide":["1o trimestre","2o trimestre","3o trimestre","4o trimestre"],"dateFormatItem-yMMMM":"MMMM y","dateFormatItem-ms":"mm:ss","field-year":"anno","quarters-standAlone-narrow":["1","2","3","4"],"dateFormatItem-HHmmss":"HH.mm.ss","months-standAlone-wide":["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],"field-week":"settimana","dateFormatItem-MMMMEd":"EEE d MMMM","dateFormatItem-MMMd":"d MMM","dateFormatItem-HHmm":"HH.mm","dateFormatItem-yyQ":"Q yy","timeFormat-long":"HH.mm.ss z","months-format-abbr":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],"timeFormat-short":"HH.mm","field-month":"mese","quarters-format-abbr":["T1","T2","T3","T4"],"dateFormatItem-MMMMd":"d MMMM","days-format-abbr":["dom","lun","mar","mer","gio","ven","sab"],"dateFormatItem-MMMMdd":"dd MMMM","pm":"p.","dateFormatItem-M":"L","days-format-narrow":["D","L","M","M","G","V","S"],"field-second":"secondo","field-day":"giorno","dateFormatItem-MEd":"EEE d/M","months-format-narrow":["G","F","M","A","M","G","L","A","S","O","N","D"],"dateFormatItem-hhmmss":"hh.mm.ss a","am":"m.","days-standAlone-abbr":["dom","lun","mar","mer","gio","ven","sab"],"dateFormat-short":"dd/MM/yy","dateFormatItem-yMMMEd":"EEE d MMM y","dateFormat-full":"EEEE d MMMM y","dateFormatItem-Md":"d/M","dateFormatItem-yMEd":"EEE, d-M-yyyy","months-format-wide":["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],"dateFormatItem-d":"d","quarters-format-wide":["1o trimestre","2o trimestre","3o trimestre","4o trimestre"],"days-format-wide":["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],"eraNarrow":["aC","dC"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d EEE","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","dateTimeFormat-full":"{1} {0}","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/it/number.js b/js/dojo/dojo/cldr/nls/it/number.js
--- a/js/dojo/dojo/cldr/nls/it/number.js
+++ b/js/dojo/dojo/cldr/nls/it/number.js
@@ -1,1 +1,1 @@
-({"group": ".", "decimal": ",", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencyFormat": "¤ #,##0.00", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"})
\ No newline at end of file
+({"decimalFormat":"#,##0.###","group":".","scientificFormat":"#E0","percentFormat":"#,##0%","currencyFormat":"¤ #,##0.00","decimal":",","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","infinity":"∞","list":";","percentSign":"%","minusSign":"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","nan":"NaN","nativeZeroDigit":"0","plusSign":"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","perMille":"‰","patternDigit":"#","currencySpacing-beforeCurrency-insertBetween":" ","exponential":"E"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/ja-jp/number.js b/js/dojo/dojo/cldr/nls/ja-jp/number.js
--- a/js/dojo/dojo/cldr/nls/ja-jp/number.js
+++ b/js/dojo/dojo/cldr/nls/ja-jp/number.js
@@ -1,1 +1,1 @@
-({"currencyFormat": "¤#,##0.00", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"})
\ No newline at end of file
+({"currencyFormat":"¤#,##0.00","decimalFormat":"#,##0.###","group":",","scientificFormat":"#E0","percentFormat":"#,##0%","decimal":".","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","infinity":"∞","list":";","percentSign":"%","minusSign":"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","nan":"NaN","nativeZeroDigit":"0","plusSign":"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","perMille":"‰","patternDigit":"#","currencySpacing-beforeCurrency-insertBetween":" ","exponential":"E"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/ja/currency.js b/js/dojo/dojo/cldr/nls/ja/currency.js
--- a/js/dojo/dojo/cldr/nls/ja/currency.js
+++ b/js/dojo/dojo/cldr/nls/ja/currency.js
@@ -1,1 +1,1 @@
-({"HKD_displayName": "香港ドル", "CHF_displayName": "スイス フラン", "JPY_symbol": "¥", "CAD_displayName": "カナダ ドル", "AUD_displayName": "オーストラリア ドル", "JPY_displayName": "日本円", "USD_displayName": "米ドル", "GBP_displayName": "英国ポンド", "EUR_displayName": "ユーロ", "USD_symbol": "$", "GBP_symbol": "£", "EUR_symbol": "€"})
\ No newline at end of file
+({"HKD_displayName":"香港ドル","CHF_displayName":"スイス フラン","JPY_symbol":"¥","CAD_displayName":"カナダ ドル","CNY_displayName":"中国人民元","USD_symbol":"$","AUD_displayName":"オーストラリア ドル","JPY_displayName":"日本円","USD_displayName":"米ドル","CNY_symbol":"元","GBP_displayName":"英国ポンド","EUR_displayName":"ユーロ","CHF_symbol":"Fr.","HKD_symbol":"HK$","CAD_symbol":"CA$","EUR_symbol":"€","GBP_symbol":"£","AUD_symbol":"AU$"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/ja/gregorian.js b/js/dojo/dojo/cldr/nls/ja/gregorian.js
--- a/js/dojo/dojo/cldr/nls/ja/gregorian.js
+++ b/js/dojo/dojo/cldr/nls/ja/gregorian.js
@@ -1,1 +1,1 @@
-({"eraNames": ["紀元前", "西暦"], "timeFormat-full": "H'時'mm'分'ss'秒'z", "timeFormat-medium": "H:mm:ss", "eraAbbr": ["紀元前", "西暦"], "dateFormat-medium": "yyyy/MM/dd", "am": "午前", "months-format-abbr": ["1 月", "2 月", "3 月", "4 月", "5 月", "6 月", "7 月", "8 月", "9 月", "10 月", "11 月", "12 月"], "dateFormat-full": "yyyy'年'M'月'd'日'EEEE", "days-format-abbr": ["日", "月", "火", "水", "木", "金", "土"], "timeFormat-long": "H:mm:ss:z", "quarters-format-wide": ["第 1 四半期", "第 2 四半期", "第 3 四半期", "第 4 四半期"], "pm": "午後", "timeFormat-short": "H:mm", "months-format-wide": ["1 月", "2 月", "3 月", "4 月", "5 月", "6 月", "7 月", "8 月", "9 月", "10 月", "11 月", "12 月"], "days-standAlone-narrow": ["日", "月", "火", "水", "木", "金", "土"], "dateFormat-long": "yyyy'年'M'月'd'日'", "days-format-wide": ["日曜日", "月曜日", "火曜日", "水曜日", "木曜日", "金曜日", "土曜日"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "field-weekday": "Day of the Week", "months-standAlone-narrow": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateFormat-short": "yy/MM/dd", "dateTimeFormats-appendItem-Era": "{0} {1}"})
\ No newline at end of file
+({"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"曜日","dateFormatItem-yQQQ":"yQQQ","dateFormatItem-yMEd":"y/M/d(EEE)","dateFormatItem-MMMEd":"M月d日(E)","eraNarrow":["紀元前","西暦"],"dateFormat-long":"y年M月d日","months-format-wide":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"dateTimeFormat-medium":"{1} {0}","dateFormat-full":"y年M月d日EEEE","dateFormatItem-Md":"M/d","dateFormatItem-yMd":"y/M/d","field-era":"時代","dateFormatItem-yM":"y/M","months-standAlone-wide":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"timeFormat-short":"H:mm","quarters-format-wide":["第1四半期","第2四半期","第3四半期","第4四半期"],"timeFormat-long":"HH:mm:ss z","field-year":"年","dateFormatItem-yMMM":"y年M月","dateFormatItem-yQ":"y/Q","field-hour":"時","dateFormatItem-MMdd":"MM/dd","months-format-abbr":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"dateFormatItem-yyQ":"yy/Q","timeFormat-full":"H時mm分ss秒 zzzz","am":"午前","dateFormatItem-H":"H時","months-standAlone-abbr":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["第1四半期","第2四半期","第3四半期","第4四半期"],"dateFormatItem-M":"L","days-standAlone-wide":["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],"dateFormatItem-MMMMd":"M月d日","dateFormatItem-yyMMM":"y年M月","timeFormat-medium":"H:mm:ss","dateFormatItem-Hm":"H:mm","eraAbbr":["紀元前","西暦"],"field-minute":"分","field-dayperiod":"午前/午後","days-standAlone-abbr":["日","月","火","水","木","金","土"],"dateFormatItem-d":"d日","dateFormatItem-ms":"mm:ss","dateTimeFormat-long":"{1}{0}","dateFormatItem-MMMd":"M月d日","dateFormatItem-MEd":"M/d(E)","dateTimeFormat-full":"{1}{0}","dateFormatItem-yMMMM":"y年M月","field-day":"日","days-format-wide":["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],"field-zone":"タイムゾーン","dateFormatItem-yyyyMM":"yyyy/MM","dateFormatItem-y":"y","months-standAlone-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"dateFormatItem-hm":"ah:mm","dateFormatItem-GGGGyMd":"GGGGy年M月d日","days-format-abbr":["日","月","火","水","木","金","土"],"dateFormatItem-yMMMd":"y年M月d日","eraNames":["紀元前","西暦"],"days-format-narrow":["日","月","火","水","木","金","土"],"field-month":"月","days-standAlone-narrow":["日","月","火","水","木","金","土"],"dateFormatItem-MMM":"LLL","pm":"午後","dateFormatItem-MMMMEd":"M月d日(E)","dateFormat-short":"yy/MM/dd","field-second":"秒","dateFormatItem-yMMMEd":"y年M月d日(EEE)","dateFormatItem-Ed":"d日(EEE)","field-week":"週","dateFormat-medium":"yyyy/MM/dd","dateTimeFormat-short":"{1} {0}","dateFormatItem-hms":"ah:mm:ss","dateFormatItem-yyyy":"y年","months-format-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormatItem-EEEd":"d EEE","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Hms":"H:mm:ss"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/ko-kr/gregorian.js b/js/dojo/dojo/cldr/nls/ko-kr/gregorian.js
--- a/js/dojo/dojo/cldr/nls/ko-kr/gregorian.js
+++ b/js/dojo/dojo/cldr/nls/ko-kr/gregorian.js
@@ -1,1 +1,1 @@
-({"timeFormat-medium": "a h:mm:ss", "timeFormat-short": "a h:mm", "dateFormat-medium": "yyyy. MM. dd", "pm": "오후", "timeFormat-full": "a hh'시' mm'분' ss'초' z", "months-standAlone-narrow": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], "eraNames": ["서력기원전", "서력기원"], "am": "오전", "days-standAlone-narrow": ["일", "월", "화", "수", "목", "금", "토"], "dateFormat-long": "yyyy'년' M'월' d'일'", "dateFormat-short": "yy. MM. dd", "months-format-wide": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], "months-format-abbr": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], "days-format-wide": ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"], "timeFormat-long": "a hh'시' mm'분' ss'초'", "eraAbbr": ["기원전", "서기"], "dateFormat-full": "yyyy'년' M'월' d'일' EEEE", "days-format-abbr": ["일", "월", "화", "수", "목", "금", "토"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Era": "{0} {1}", "quarters-format-wide": ["Q1", "Q2", "Q3", "Q4"]})
\ No newline at end of file
+({"timeFormat-medium":"a h:mm:ss","timeFormat-short":"a h:mm","months-format-narrow":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"요일","dateFormatItem-yQQQ":"y년 QQQ","dateFormatItem-yMEd":"yyyy. M. d. EEE","dateFormatItem-MMMEd":"MMM d일 (E)","eraNarrow":["기원전","서기"],"dateFormat-long":"y년 M월 d일","months-format-wide":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d일 EEE","dateFormat-full":"y년 M월 d일 EEEE","dateFormatItem-Md":"M. d.","field-era":"연호","dateFormatItem-yM":"yyyy. M.","months-standAlone-wide":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"quarters-format-wide":["제 1/4분기","제 2/4분기","제 3/4분기","제 4/4분기"],"timeFormat-long":"a hh시 mm분 ss초 z","field-year":"년","dateFormatItem-yMMM":"y년 MMM","dateFormatItem-yQ":"y년 Q분기","field-hour":"시","dateFormatItem-MMdd":"MM. dd","months-format-abbr":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"dateFormatItem-yyQ":"yy년 Q분기","timeFormat-full":"a hh시 mm분 ss초 zzzz","am":"오전","months-standAlone-abbr":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"quarters-format-abbr":["1분기","2분기","3분기","4분기"],"quarters-standAlone-wide":["제 1/4분기","제 2/4분기","제 3/4분기","제 4/4분기"],"dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"L","days-standAlone-wide":["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],"dateFormatItem-MMMMd":"MMMM d일","dateFormatItem-yyMMM":"yy년 MMM","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["1분기","2분기","3분기","4분기"],"eraAbbr":["기원전","서기"],"field-minute":"분","field-dayperiod":"오전/오후","days-standAlone-abbr":["일","월","화","수","목","금","토"],"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","dateTimeFormat-long":"{1}{0}","dateFormatItem-MMMd":"MMM d일","dateFormatItem-MEd":"M. d. (E)","dateTimeFormat-full":"{1}{0}","dateFormatItem-yMMMM":"y년 MMMM","field-day":"일","days-format-wide":["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],"field-zone":"시간대","dateFormatItem-yyyyMM":"yyyy. MM","dateFormatItem-y":"y","months-standAlone-narrow":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"dateFormatItem-yyMM":"YY. M.","days-format-abbr":["일","월","화","수","목","금","토"],"dateFormatItem-yMMMd":"y년 MMM d일","eraNames":["서력기원전","서력기원"],"days-format-narrow":["일","월","화","수","목","금","토"],"field-month":"월","days-standAlone-narrow":["일","월","화","수","목","금","토"],"dateFormatItem-MMM":"LLL","dateFormatItem-HHmm":"HH:mm","pm":"오후","dateFormatItem-MMMMEd":"MMMM d일 (E)","dateFormat-short":"yy. M. d.","field-second":"초","dateFormatItem-yMMMEd":"y년 MMM d일 EEE","dateFormatItem-Ed":"d일 (E)","field-week":"주","dateFormat-medium":"yyyy. M. d.","dateFormatItem-mmss":"mm:ss","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H시 m분 s초","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-hms":"h:mm:ss a"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/ko-kr/number.js b/js/dojo/dojo/cldr/nls/ko-kr/number.js
--- a/js/dojo/dojo/cldr/nls/ko-kr/number.js
+++ b/js/dojo/dojo/cldr/nls/ko-kr/number.js
@@ -1,1 +1,1 @@
-({"currencyFormat": "¤#,##0.00", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"})
\ No newline at end of file
+({"currencyFormat":"¤#,##0.00","group":",","percentSign":"%","exponential":"E","percentFormat":"#,##0%","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":".","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/ko/currency.js b/js/dojo/dojo/cldr/nls/ko/currency.js
--- a/js/dojo/dojo/cldr/nls/ko/currency.js
+++ b/js/dojo/dojo/cldr/nls/ko/currency.js
@@ -1,1 +1,1 @@
-({"HKD_displayName": "홍콩 달러", "CHF_displayName": "스위스 프랑달러", "JPY_symbol": "¥", "CAD_displayName": "캐나다 달러", "USD_symbol": "US$", "AUD_displayName": "호주 달러", "JPY_displayName": "일본 엔화", "USD_displayName": "미국 달러", "GBP_displayName": "영국령 파운드 스털링", "EUR_displayName": "유로화", "GBP_symbol": "£", "EUR_symbol": "€"})
\ No newline at end of file
+({"HKD_displayName":"홍콩 달러","CHF_displayName":"스위스 프랑","CAD_displayName":"캐나다 달러","CNY_displayName":"중국 위안 인민폐","AUD_displayName":"호주 달러","JPY_displayName":"일본 엔화","USD_displayName":"미국 달러","GBP_displayName":"영국령 파운드 스털링","EUR_displayName":"유로화","CHF_symbol":"Fr.","JPY_symbol":"JP¥","HKD_symbol":"HK$","USD_symbol":"US$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/ko/gregorian.js b/js/dojo/dojo/cldr/nls/ko/gregorian.js
--- a/js/dojo/dojo/cldr/nls/ko/gregorian.js
+++ b/js/dojo/dojo/cldr/nls/ko/gregorian.js
@@ -1,1 +1,1 @@
-({"dateFormat-medium": "yyyy. MM. dd", "pm": "오후", "timeFormat-full": "a hh'시' mm'분' ss'초' z", "months-standAlone-narrow": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], "eraNames": ["서력기원전", "서력기원"], "am": "오전", "days-standAlone-narrow": ["일", "월", "화", "수", "목", "금", "토"], "timeFormat-medium": "a hh'시' mm'분'", "dateFormat-long": "yyyy'년' M'월' d'일'", "dateFormat-short": "yy. MM. dd", "months-format-wide": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], "timeFormat-short": "a hh'시' mm'분'", "months-format-abbr": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], "days-format-wide": ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"], "timeFormat-long": "a hh'시' mm'분' ss'초'", "eraAbbr": ["기원전", "서기"], "dateFormat-full": "yyyy'년' M'월' d'일' EEEE", "days-format-abbr": ["일", "월", "화", "수", "목", "금", "토"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Era": "{0} {1}", "quarters-format-wide": ["Q1", "Q2", "Q3", "Q4"]})
\ No newline at end of file
+({"months-format-narrow":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"요일","dateFormatItem-yQQQ":"y년 QQQ","dateFormatItem-yMEd":"yyyy. M. d. EEE","dateFormatItem-MMMEd":"MMM d일 (E)","eraNarrow":["기원전","서기"],"dateFormat-long":"y년 M월 d일","months-format-wide":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d일 EEE","dateFormat-full":"y년 M월 d일 EEEE","dateFormatItem-Md":"M. d.","field-era":"연호","dateFormatItem-yM":"yyyy. M.","months-standAlone-wide":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"timeFormat-short":"a h:mm","quarters-format-wide":["제 1/4분기","제 2/4분기","제 3/4분기","제 4/4분기"],"timeFormat-long":"a hh시 mm분 ss초 z","field-year":"년","dateFormatItem-yMMM":"y년 MMM","dateFormatItem-yQ":"y년 Q분기","field-hour":"시","dateFormatItem-MMdd":"MM. dd","months-format-abbr":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"dateFormatItem-yyQ":"yy년 Q분기","timeFormat-full":"a hh시 mm분 ss초 zzzz","am":"오전","months-standAlone-abbr":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"quarters-format-abbr":["1분기","2분기","3분기","4분기"],"quarters-standAlone-wide":["제 1/4분기","제 2/4분기","제 3/4분기","제 4/4분기"],"dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"L","days-standAlone-wide":["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],"dateFormatItem-MMMMd":"MMMM d일","dateFormatItem-yyMMM":"yy년 MMM","timeFormat-medium":"a h:mm:ss","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["1분기","2분기","3분기","4분기"],"eraAbbr":["기원전","서기"],"field-minute":"분","field-dayperiod":"오전/오후","days-standAlone-abbr":["일","월","화","수","목","금","토"],"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","dateTimeFormat-long":"{1}{0}","dateFormatItem-MMMd":"MMM d일","dateFormatItem-MEd":"M. d. (E)","dateTimeFormat-full":"{1}{0}","dateFormatItem-yMMMM":"y년 MMMM","field-day":"일","days-format-wide":["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],"field-zone":"시간대","dateFormatItem-yyyyMM":"yyyy. MM","dateFormatItem-y":"y","months-standAlone-narrow":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],"dateFormatItem-yyMM":"YY. M.","days-format-abbr":["일","월","화","수","목","금","토"],"dateFormatItem-yMMMd":"y년 MMM d일","eraNames":["서력기원전","서력기원"],"days-format-narrow":["일","월","화","수","목","금","토"],"field-month":"월","days-standAlone-narrow":["일","월","화","수","목","금","토"],"dateFormatItem-MMM":"LLL","dateFormatItem-HHmm":"HH:mm","pm":"오후","dateFormatItem-MMMMEd":"MMMM d일 (E)","dateFormat-short":"yy. M. d.","field-second":"초","dateFormatItem-yMMMEd":"y년 MMM d일 EEE","dateFormatItem-Ed":"d일 (E)","field-week":"주","dateFormat-medium":"yyyy. M. d.","dateFormatItem-mmss":"mm:ss","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H시 m분 s초","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-hms":"h:mm:ss a"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/number.js b/js/dojo/dojo/cldr/nls/number.js
--- a/js/dojo/dojo/cldr/nls/number.js
+++ b/js/dojo/dojo/cldr/nls/number.js
@@ -1,1 +1,1 @@
-({"scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencyFormat": "¤ #,##0.00", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"})
\ No newline at end of file
+({"scientificFormat":"#E0","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","infinity":"∞","list":";","percentSign":"%","minusSign":"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","nan":"NaN","nativeZeroDigit":"0","plusSign":"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencyFormat":"¤ #,##0.00","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","perMille":"‰","group":",","percentFormat":"#,##0%","decimalFormat":"#,##0.###","decimal":".","patternDigit":"#","currencySpacing-beforeCurrency-insertBetween":" ","exponential":"E"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/pt-br/gregorian.js b/js/dojo/dojo/cldr/nls/pt-br/gregorian.js
--- a/js/dojo/dojo/cldr/nls/pt-br/gregorian.js
+++ b/js/dojo/dojo/cldr/nls/pt-br/gregorian.js
@@ -1,1 +1,1 @@
-({"field-hour": "Hora", "field-dayperiod": "Período do dia", "field-minute": "Minuto", "timeFormat-full": "HH'h'mm'min'ss's' z", "field-week": "Semana", "field-weekday": "Dia da semana", "field-second": "Segundo", "dateFormat-medium": "dd/MM/yyyy", "field-day": "Dia", "timeFormat-long": "H'h'm'min's's' z", "field-month": "Mês", "field-year": "Ano", "dateFormat-short": "dd/MM/yy", "field-zone": "Fuso", "eraAbbr": ["a.C.", "d.C."], "months-format-abbr": ["jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez"], "dateFormat-full": "EEEE, d' de 'MMMM' de 'yyyy", "days-format-abbr": ["dom", "seg", "ter", "qua", "qui", "sex", "sáb"], "quarters-format-wide": ["1º trimestre", "2º trimestre", "3º trimestre", "4º trimestre"], "quarters-format-abbreviated": ["T1", "T2", "T3", "T4"], "months-format-wide": ["janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"], "months-standAlone-narrow": ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], "days-standAlone-narrow": ["D", "S", "T", "Q", "Q", "S", "S"], "dateFormat-long": "d' de 'MMMM' de 'yyyy", "days-format-wide": ["domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "eraNames": ["BCE", "CE"], "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "timeFormat-medium": "HH:mm:ss", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateTimeFormat": "{1} {0}", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "timeFormat-short": "HH:mm", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "pm": "PM", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "am": "AM", "dateTimeFormats-appendItem-Era": "{0} {1}"})
\ No newline at end of file
+({"field-hour":"Hora","field-dayperiod":"Período do dia","field-minute":"Minuto","timeFormat-full":"HH'h'mm'min'ss's' z","field-week":"Semana","field-weekday":"Dia da semana","field-second":"Segundo","dateFormat-medium":"dd/MM/yyyy","field-day":"Dia","timeFormat-long":"H'h'm'min's's' z","field-month":"Mês","field-year":"Ano","dateFormat-short":"dd/MM/yy","field-zone":"Fuso","months-format-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"quarters-standAlone-narrow":["1","2","3","4"],"dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"EEE, dd/MM/yyyy","dateFormatItem-MMMEd":"EEE, d 'de' MMM","eraNarrow":["a.C.","d.C."],"dateFormat-long":"d 'de' MMMM 'de' y","months-format-wide":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],"dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"EEE, d","dateFormat-full":"EEEE, d 'de' MMMM 'de' y","dateFormatItem-Md":"d/M","field-era":"Era","dateFormatItem-yM":"MM/yyyy","months-standAlone-wide":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],"timeFormat-short":"HH:mm","quarters-format-wide":["1º trimestre","2º trimestre","3º trimestre","4º trimestre"],"dateFormatItem-yMMM":"MMM 'de' y","dateFormatItem-yQ":"yyyy Q","dateFormatItem-MMdd":"dd/MM","months-format-abbr":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],"dateFormatItem-yyQ":"Q yy","am":"AM","months-standAlone-abbr":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],"quarters-format-abbr":["T1","T2","T3","T4"],"quarters-standAlone-wide":["1º trimestre","2º trimestre","3º trimestre","4º trimestre"],"dateFormatItem-HHmmss":"H'h'mm'min'ss's'","dateFormatItem-M":"L","days-standAlone-wide":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"dateFormatItem-yyyyMMM":"MMM 'de' y","dateFormatItem-MMMMd":"d 'de' MMMM","dateFormatItem-yyMMMEEEd":"EEE, d 'de' MMM 'de' yy","dateFormatItem-yyMMM":"MMM 'de' yy","timeFormat-medium":"HH:mm:ss","dateFormatItem-Hm":"H'h'mm","quarters-standAlone-abbr":["T1","T2","T3","T4"],"eraAbbr":["a.C.","d.C."],"days-standAlone-abbr":["dom","seg","ter","qua","qui","sex","sáb"],"dateFormatItem-yyMMMd":"d 'de' MMM 'de' yy","dateFormatItem-d":"d","dateFormatItem-ms":"mm'min'ss's'","dateFormatItem-MMMd":"d 'de' MMM","dateFormatItem-MEd":"EEE, dd/MM","dateFormatItem-yMMMM":"MMMM 'de' y","days-format-wide":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"dateFormatItem-yyyyMM":"MM/yyyy","dateFormatItem-y":"y","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-yyMM":"MM/yy","days-format-abbr":["dom","seg","ter","qua","qui","sex","sáb"],"eraNames":["Antes de Cristo","Ano do Senhor"],"days-format-narrow":["D","S","T","Q","Q","S","S"],"days-standAlone-narrow":["D","S","T","Q","Q","S","S"],"dateFormatItem-MMM":"LLL","dateFormatItem-HHmm":"HH'h'mm","pm":"PM","dateFormatItem-MMMMEd":"EEE, d 'de' MMMM","dateFormatItem-yMMMEd":"EEE, d 'de' MMM 'de' y","dateFormatItem-mmss":"mm'min'ss's'","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","dateTimeFormat-full":"{1} {0}","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/pt/currency.js b/js/dojo/dojo/cldr/nls/pt/currency.js
--- a/js/dojo/dojo/cldr/nls/pt/currency.js
+++ b/js/dojo/dojo/cldr/nls/pt/currency.js
@@ -1,1 +1,1 @@
-({"EUR_displayName": "Euro", "CHF_displayName": "Franco suíço", "HKD_displayName": "Dólar de Hong Kong", "CAD_displayName": "Dólar canadense", "GBP_displayName": "Libra esterlina britânica", "JPY_displayName": "Iene japonês", "AUD_displayName": "Dólar australiano", "USD_displayName": "Dólar norte-americano", "USD_symbol": "$", "GBP_symbol": "£", "JPY_symbol": "¥", "EUR_symbol": "€"})
\ No newline at end of file
+({"HKD_displayName":"Dólar de Hong Kong","CHF_displayName":"Franco suíço","CAD_displayName":"Dólar canadense","CNY_displayName":"Yuan Renminbi chinês","AUD_displayName":"Dólar australiano","JPY_displayName":"Iene japonês","USD_displayName":"Dólar norte-americano","GBP_displayName":"Libra esterlina britânica","EUR_displayName":"Euro","CHF_symbol":"Fr.","JPY_symbol":"JP¥","HKD_symbol":"HK$","USD_symbol":"US$","CAD_symbol":"CA$","EUR_symbol":"€","CNY_symbol":"CN¥","GBP_symbol":"£","AUD_symbol":"AU$"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/pt/gregorian.js b/js/dojo/dojo/cldr/nls/pt/gregorian.js
--- a/js/dojo/dojo/cldr/nls/pt/gregorian.js
+++ b/js/dojo/dojo/cldr/nls/pt/gregorian.js
@@ -1,1 +1,1 @@
-({"timeFormat-full": "HH'H'mm'm'ss's' z", "eraAbbr": ["a.C.", "d.C."], "dateFormat-medium": "d/MMM/yyyy", "months-format-abbr": ["jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez"], "dateFormat-full": "EEEE, d' de 'MMMM' de 'yyyy", "days-format-abbr": ["dom", "seg", "ter", "qua", "qui", "sex", "sáb"], "quarters-format-wide": ["1º trimestre", "2º trimestre", "3º trimestre", "4º trimestre"], "dateFormat-short": "dd-MM-yyyy", "quarters-format-abbreviated": ["T1", "T2", "T3", "T4"], "months-format-wide": ["janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"], "months-standAlone-narrow": ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], "days-standAlone-narrow": ["D", "S", "T", "Q", "Q", "S", "S"], "dateFormat-long": "d' de 'MMMM' de 'yyyy", "days-format-wide": ["domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "eraNames": ["BCE", "CE"], "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "timeFormat-medium": "HH:mm:ss", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "timeFormat-long": "HH:mm:ss z", "timeFormat-short": "HH:mm", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "pm": "PM", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "am": "AM", "dateTimeFormats-appendItem-Era": "{0} {1}"})
\ No newline at end of file
+({"months-format-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Dia da semana","dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"EEE, dd/MM/yyyy","dateFormatItem-MMMEd":"EEE, d 'de' MMM","eraNarrow":["a.C.","d.C."],"dateFormat-long":"d 'de' MMMM 'de' y","months-format-wide":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],"dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"EEE, d","dateFormat-full":"EEEE, d 'de' MMMM 'de' y","dateFormatItem-Md":"d/M","field-era":"Era","dateFormatItem-yM":"MM/yyyy","months-standAlone-wide":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],"timeFormat-short":"HH:mm","quarters-format-wide":["1º trimestre","2º trimestre","3º trimestre","4º trimestre"],"timeFormat-long":"HH'h'mm'min'ss's' z","field-year":"Ano","dateFormatItem-yMMM":"MMM 'de' y","dateFormatItem-yQ":"yyyy Q","field-hour":"Hora","dateFormatItem-MMdd":"dd/MM","months-format-abbr":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],"dateFormatItem-yyQ":"Q yy","timeFormat-full":"HH'h'mm'min'ss's' zzzz","am":"AM","months-standAlone-abbr":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],"quarters-format-abbr":["T1","T2","T3","T4"],"quarters-standAlone-wide":["1º trimestre","2º trimestre","3º trimestre","4º trimestre"],"dateFormatItem-HHmmss":"H'h'mm'min'ss's'","dateFormatItem-M":"L","days-standAlone-wide":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"dateFormatItem-yyyyMMM":"MMM 'de' y","dateFormatItem-MMMMd":"d 'de' MMMM","dateFormatItem-yyMMMEEEd":"EEE, d 'de' MMM 'de' yy","dateFormatItem-yyMMM":"MMM 'de' yy","timeFormat-medium":"HH:mm:ss","dateFormatItem-Hm":"H'h'mm","quarters-standAlone-abbr":["T1","T2","T3","T4"],"eraAbbr":["a.C.","d.C."],"field-minute":"Minuto","field-dayperiod":"Período do dia","days-standAlone-abbr":["dom","seg","ter","qua","qui","sex","sáb"],"dateFormatItem-yyMMMd":"d 'de' MMM 'de' yy","dateFormatItem-d":"d","dateFormatItem-ms":"mm'min'ss's'","dateFormatItem-MMMd":"d 'de' MMM","dateFormatItem-MEd":"EEE, dd/MM","dateFormatItem-yMMMM":"MMMM 'de' y","field-day":"Dia","days-format-wide":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"field-zone":"Fuso","dateFormatItem-yyyyMM":"MM/yyyy","dateFormatItem-y":"y","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-yyMM":"MM/yy","days-format-abbr":["dom","seg","ter","qua","qui","sex","sáb"],"eraNames":["Antes de Cristo","Ano do Senhor"],"days-format-narrow":["D","S","T","Q","Q","S","S"],"field-month":"Mês","days-standAlone-narrow":["D","S","T","Q","Q","S","S"],"dateFormatItem-MMM":"LLL","dateFormatItem-HHmm":"HH'h'mm","pm":"PM","dateFormatItem-MMMMEd":"EEE, d 'de' MMMM","dateFormat-short":"dd/MM/yy","field-second":"Segundo","dateFormatItem-yMMMEd":"EEE, d 'de' MMM 'de' y","field-week":"Semana","dateFormat-medium":"dd/MM/yyyy","dateFormatItem-mmss":"mm'min'ss's'","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","dateTimeFormat-full":"{1} {0}","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/pt/number.js b/js/dojo/dojo/cldr/nls/pt/number.js
--- a/js/dojo/dojo/cldr/nls/pt/number.js
+++ b/js/dojo/dojo/cldr/nls/pt/number.js
@@ -1,1 +1,1 @@
-({"group": ".", "decimal": ",", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencyFormat": "¤ #,##0.00", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"})
\ No newline at end of file
+({"group":".","percentSign":"%","exponential":"E","percentFormat":"#,##0%","scientificFormat":"#E0","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":",","nan":"NaN","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","currencyFormat":"¤#,##0.00;(¤#,##0.00)","plusSign":"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/zh-cn/gregorian.js b/js/dojo/dojo/cldr/nls/zh-cn/gregorian.js
--- a/js/dojo/dojo/cldr/nls/zh-cn/gregorian.js
+++ b/js/dojo/dojo/cldr/nls/zh-cn/gregorian.js
@@ -1,1 +1,1 @@
-({"dateFormat-short": "yy-M-d", "timeFormat-long": "ahh'时'mm'分'ss'秒'", "dateFormat-medium": "yyyy-M-d", "dateFormat-long": "yyyy'年'M'月'd'日'", "timeFormat-medium": "ahh:mm:ss", "timeFormat-short": "ah:mm", "timeFormat-full": "ahh'时'mm'分'ss'秒' z", "dateFormat-full": "yyyy'年'M'月'd'日'EEEE", "eraAbbr": ["公元前", "公元"], "am": "上午", "months-format-abbr": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], "days-format-abbr": ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], "pm": "下午", "months-format-wide": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], "months-standAlone-narrow": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], "days-standAlone-narrow": ["日", "一", "二", "三", "四", "五", "六"], "days-format-wide": ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "eraNames": ["BCE", "CE"], "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Era": "{0} {1}", "quarters-format-wide": ["Q1", "Q2", "Q3", "Q4"]})
\ No newline at end of file
+({"dateFormat-short":"yy-M-d","timeFormat-long":"ahh'时'mm'分'ss'秒'","dateFormat-medium":"yyyy-M-d","dateFormat-long":"yyyy'年'M'月'd'日'","timeFormat-medium":"ahh:mm:ss","timeFormat-short":"ah:mm","timeFormat-full":"ahh'时'mm'分'ss'秒' z","dateFormat-full":"yyyy'年'M'月'd'日'EEEE","months-format-narrow":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"周天","dateFormatItem-yQQQ":"y年QQQ","dateFormatItem-yMEd":"y年M月d日,E","dateFormatItem-MMMEd":"MMMd日E","eraNarrow":["公元前","公元"],"months-format-wide":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"dateTimeFormat-medium":"{1} {0}","dateFormatItem-Md":"M-d","field-era":"时期","dateFormatItem-yM":"yyyy-M","months-standAlone-wide":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],"quarters-format-wide":["第1季度","第2季度","第3季度","第4季度"],"field-year":"年","dateFormatItem-yMMM":"y年MMM","dateFormatItem-yQ":"y年QQQ","dateFormatItem-yyyyMMMM":"y年MMMM","field-hour":"小时","dateFormatItem-MMdd":"MM-dd","months-format-abbr":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"dateFormatItem-yyQ":"yy年第Q季度","am":"上午","dateFormatItem-H":"H时","months-standAlone-abbr":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],"quarters-format-abbr":["1季","2季","3季","4季"],"quarters-standAlone-wide":["第1季度","第2季度","第3季度","第4季度"],"dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"L","days-standAlone-wide":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],"dateFormatItem-MMMMd":"MMMMd日","dateFormatItem-yyMMM":"yy年MMM","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["1季","2季","3季","4季"],"eraAbbr":["公元前","公元"],"field-minute":"分钟","field-dayperiod":"上午/下午","days-standAlone-abbr":["周日","周一","周二","周三","周四","周五","周六"],"dateFormatItem-d":"d日","dateFormatItem-ms":"mm:ss","dateTimeFormat-long":"{1}{0}","dateFormatItem-MMMd":"MMMd日","dateFormatItem-MEd":"M-dE","dateTimeFormat-full":"{1}{0}","dateFormatItem-yMMMM":"y年MMMM","field-day":"日","days-format-wide":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],"field-zone":"区域","dateFormatItem-y":"y年","months-standAlone-narrow":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"dateFormatItem-yyMM":"yy-MM","dateFormatItem-hm":"ah:mm","days-format-abbr":["周日","周一","周二","周三","周四","周五","周六"],"dateFormatItem-yMMMd":"y年MMMd日","eraNames":["公元前","公元"],"days-format-narrow":["日","一","二","三","四","五","六"],"field-month":"月","days-standAlone-narrow":["日","一","二","三","四","五","六"],"dateFormatItem-MMM":"LLL","pm":"下午","dateFormatItem-MMMMEd":"MMMMd日E","dateFormatItem-MMMMdd":"MMMMdd日","field-second":"秒钟","dateFormatItem-yMMMEd":"y年MMMd日EEE","dateFormatItem-Ed":"d日E","field-week":"周","dateFormatItem-yyyyM":"y年M月","dateTimeFormat-short":"{1} {0}","dateFormatItem-hms":"ah:mm:ss","dateFormatItem-yyyy":"y年","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormatItem-EEEd":"d EEE","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Hms":"H:mm:ss"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/zh-cn/number.js b/js/dojo/dojo/cldr/nls/zh-cn/number.js
--- a/js/dojo/dojo/cldr/nls/zh-cn/number.js
+++ b/js/dojo/dojo/cldr/nls/zh-cn/number.js
@@ -1,1 +1,1 @@
-({"currencyFormat": "¤#,##0.00", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"})
\ No newline at end of file
+({"currencyFormat":"¤#,##0.00","decimalFormat":"#,##0.###","group":",","scientificFormat":"#E0","percentFormat":"#,##0%","decimal":".","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","infinity":"∞","list":";","percentSign":"%","minusSign":"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","nan":"NaN","nativeZeroDigit":"0","plusSign":"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","perMille":"‰","patternDigit":"#","currencySpacing-beforeCurrency-insertBetween":" ","exponential":"E"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/zh-tw/number.js b/js/dojo/dojo/cldr/nls/zh-tw/number.js
--- a/js/dojo/dojo/cldr/nls/zh-tw/number.js
+++ b/js/dojo/dojo/cldr/nls/zh-tw/number.js
@@ -1,1 +1,1 @@
-({"currencyFormat": "¤#,##0.00", "scientificFormat": "#E0", "currencySpacing-afterCurrency-currencyMatch": "[:letter:]", "infinity": "∞", "list": ";", "percentSign": "%", "minusSign": "-", "currencySpacing-beforeCurrency-surroundingMatch": "[:digit:]", "currencySpacing-afterCurrency-insertBetween": " ", "nan": "NaN", "nativeZeroDigit": "0", "plusSign": "+", "currencySpacing-afterCurrency-surroundingMatch": "[:digit:]", "currencySpacing-beforeCurrency-currencyMatch": "[:letter:]", "perMille": "‰", "group": ",", "percentFormat": "#,##0%", "decimalFormat": "#,##0.###", "decimal": ".", "patternDigit": "#", "currencySpacing-beforeCurrency-insertBetween": " ", "exponential": "E"})
\ No newline at end of file
+({"currencyFormat":"¤#,##0.00","group":",","list":";","decimalFormat":"#,##0.###","scientificFormat":"#E0","percentFormat":"#,##0%","decimal":".","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","infinity":"∞","percentSign":"%","minusSign":"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","nan":"NaN","nativeZeroDigit":"0","plusSign":"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","perMille":"‰","patternDigit":"#","currencySpacing-beforeCurrency-insertBetween":" ","exponential":"E"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/zh/currency.js b/js/dojo/dojo/cldr/nls/zh/currency.js
--- a/js/dojo/dojo/cldr/nls/zh/currency.js
+++ b/js/dojo/dojo/cldr/nls/zh/currency.js
@@ -1,1 +1,1 @@
-({"HKD_displayName": "港元", "CHF_displayName": "瑞士法郎", "JPY_symbol": "JP¥", "HKD_symbol": "HK$", "CAD_displayName": "加拿大元", "USD_symbol": "US$", "AUD_displayName": "澳大利亚元", "JPY_displayName": "日元", "USD_displayName": "美元", "GBP_displayName": "英磅", "EUR_displayName": "欧元", "GBP_symbol": "£", "EUR_symbol": "€"})
\ No newline at end of file
+({"HKD_displayName":"港元","CHF_displayName":"瑞士法郎","CAD_displayName":"加拿大元","CNY_displayName":"人民币","AUD_displayName":"澳大利亚元","JPY_displayName":"日元","USD_displayName":"美元","CNY_symbol":"¥","GBP_displayName":"英镑","EUR_displayName":"欧元","CHF_symbol":"Fr.","JPY_symbol":"JP¥","HKD_symbol":"HK$","USD_symbol":"US$","CAD_symbol":"CA$","EUR_symbol":"€","GBP_symbol":"£","AUD_symbol":"AU$"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/nls/zh/gregorian.js b/js/dojo/dojo/cldr/nls/zh/gregorian.js
--- a/js/dojo/dojo/cldr/nls/zh/gregorian.js
+++ b/js/dojo/dojo/cldr/nls/zh/gregorian.js
@@ -1,1 +1,1 @@
-({"eraAbbr": ["公元前", "公元"], "am": "上午", "months-format-abbr": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], "days-format-abbr": ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], "pm": "下午", "months-format-wide": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], "months-standAlone-narrow": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], "days-standAlone-narrow": ["日", "一", "二", "三", "四", "五", "六"], "days-format-wide": ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], "dateTimeFormats-appendItem-Second": "{0} ({2}: {1})", "field-dayperiod": "Dayperiod", "field-minute": "Minute", "eraNames": ["BCE", "CE"], "field-weekday": "Day of the Week", "dateTimeFormats-appendItem-Year": "{0} {1}", "field-era": "Era", "field-hour": "Hour", "timeFormat-full": "HH:mm:ss z", "dateTimeFormats-appendItem-Week": "{0} ({2}: {1})", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "dateTimeFormats-appendItem-Month": "{0} ({2}: {1})", "dateFormat-long": "yyyy MMMM d", "timeFormat-medium": "HH:mm:ss", "field-zone": "Zone", "dateTimeFormats-appendItem-Minute": "{0} ({2}: {1})", "dateFormat-medium": "yyyy MMM d", "quarters-format-abbreviated": ["Q1", "Q2", "Q3", "Q4"], "dateTimeFormat": "{1} {0}", "field-year": "Year", "dateTimeFormats-appendItem-Day": "{0} ({2}: {1})", "field-week": "Week", "timeFormat-long": "HH:mm:ss z", "timeFormat-short": "HH:mm", "field-month": "Month", "dateTimeFormats-appendItem-Quarter": "{0} ({2}: {1})", "field-second": "Second", "field-day": "Day", "dateTimeFormats-appendItem-Day-Of-Week": "{0} {1}", "dateTimeFormats-appendItem-Hour": "{0} ({2}: {1})", "dateFormat-short": "yy/MM/dd", "dateFormat-full": "EEEE, yyyy MMMM dd", "dateTimeFormats-appendItem-Era": "{0} {1}", "quarters-format-wide": ["Q1", "Q2", "Q3", "Q4"]})
\ No newline at end of file
+({"months-format-narrow":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"周天","dateFormatItem-yQQQ":"y年QQQ","dateFormatItem-yMEd":"y年M月d日,E","dateFormatItem-MMMEd":"MMMd日E","eraNarrow":["公元前","公元"],"dateFormat-long":"y年M月d日","months-format-wide":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"dateTimeFormat-medium":"{1} {0}","dateFormat-full":"y年M月d日EEEE","dateFormatItem-Md":"M-d","field-era":"时期","dateFormatItem-yM":"yyyy-M","months-standAlone-wide":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],"timeFormat-short":"ah:mm","quarters-format-wide":["第1季度","第2季度","第3季度","第4季度"],"timeFormat-long":"zah时mm分ss秒","field-year":"年","dateFormatItem-yMMM":"y年MMM","dateFormatItem-yQ":"y年QQQ","dateFormatItem-yyyyMMMM":"y年MMMM","field-hour":"小时","dateFormatItem-MMdd":"MM-dd","months-format-abbr":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"dateFormatItem-yyQ":"yy年第Q季度","timeFormat-full":"zzzzah时mm分ss秒","am":"上午","dateFormatItem-H":"H时","months-standAlone-abbr":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],"quarters-format-abbr":["1季","2季","3季","4季"],"quarters-standAlone-wide":["第1季度","第2季度","第3季度","第4季度"],"dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"L","days-standAlone-wide":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],"dateFormatItem-MMMMd":"MMMMd日","dateFormatItem-yyMMM":"yy年MMM","timeFormat-medium":"ahh:mm:ss","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["1季","2季","3季","4季"],"eraAbbr":["公元前","公元"],"field-minute":"分钟","field-dayperiod":"上午/下午","days-standAlone-abbr":["周日","周一","周二","周三","周四","周五","周六"],"dateFormatItem-d":"d日","dateFormatItem-ms":"mm:ss","dateTimeFormat-long":"{1}{0}","dateFormatItem-MMMd":"MMMd日","dateFormatItem-MEd":"M-dE","dateTimeFormat-full":"{1}{0}","dateFormatItem-yMMMM":"y年MMMM","field-day":"日","days-format-wide":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],"field-zone":"区域","dateFormatItem-y":"y年","months-standAlone-narrow":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"dateFormatItem-yyMM":"yy-MM","dateFormatItem-hm":"ah:mm","days-format-abbr":["周日","周一","周二","周三","周四","周五","周六"],"dateFormatItem-yMMMd":"y年MMMd日","eraNames":["公元前","公元"],"days-format-narrow":["日","一","二","三","四","五","六"],"field-month":"月","days-standAlone-narrow":["日","一","二","三","四","五","六"],"dateFormatItem-MMM":"LLL","pm":"下午","dateFormatItem-MMMMEd":"MMMMd日E","dateFormatItem-MMMMdd":"MMMMdd日","dateFormat-short":"yy-M-d","field-second":"秒钟","dateFormatItem-yMMMEd":"y年MMMd日EEE","dateFormatItem-Ed":"d日E","field-week":"周","dateFormat-medium":"yyyy-M-d","dateFormatItem-yyyyM":"y年M月","dateTimeFormat-short":"{1} {0}","dateFormatItem-hms":"ah:mm:ss","dateFormatItem-yyyy":"y年","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormatItem-EEEd":"d EEE","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Hms":"H:mm:ss"})
\ No newline at end of file
diff --git a/js/dojo/dojo/cldr/supplemental.js b/js/dojo/dojo/cldr/supplemental.js
--- a/js/dojo/dojo/cldr/supplemental.js
+++ b/js/dojo/dojo/cldr/supplemental.js
@@ -1,74 +1,45 @@
-if(!dojo._hasResource["dojo.cldr.supplemental"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.cldr.supplemental"] = true;
-dojo.provide("dojo.cldr.supplemental");
-
-dojo.require("dojo.i18n");
-
-dojo.cldr.supplemental.getFirstDayOfWeek = function(/*String?*/locale){
-// summary: Returns a zero-based index for first day of the week
-// description:
-// Returns a zero-based index for first day of the week, as used by the local (Gregorian) calendar.
-// e.g. Sunday (returns 0), or Monday (returns 1)
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // from http://www.unicode.org/cldr/data/common/supplemental/supplementalData.xml:supplementalData/weekData/firstDay
- var firstDay = {/*default is 1=Monday*/
- mv:5,
- ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,lb:6,ly:6,ma:6,om:6,qa:6,sa:6,
- sd:6,so:6,tn:6,ye:6,
- as:0,au:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,ie:0,il:0,is:0,jm:0,jp:0,kg:0,kr:0,la:0,
- mh:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,za:0,zw:0,
- et:0,mw:0,ng:0,tj:0,
- gb:0,
- sy:4
- };
-
- var country = dojo.cldr.supplemental._region(locale);
- var dow = firstDay[country];
- return (typeof dow == 'undefined') ? 1 : dow; /*Number*/
-};
-dojo.cldr.supplemental._region = function(/*String?*/locale){
- locale = dojo.i18n.normalizeLocale(locale);
- var tags = locale.split('-');
- var region = tags[1];
- if(!region){
- // IE often gives language only (#2269)
- // Arbitrary mappings of language-only locales to a country:
- region = {de:"de", en:"us", es:"es", fi:"fi", fr:"fr", hu:"hu", it:"it",
- ja:"jp", ko:"kr", nl:"nl", pt:"br", sv:"se", zh:"cn"}[tags[0]];
- }else if(region.length == 4){
- // The ISO 3166 country code is usually in the second position, unless a
- // 4-letter script is given. See http://www.ietf.org/rfc/rfc4646.txt
- region = tags[2];
- }
- return region;
+if(!dojo._hasResource["dojo.cldr.supplemental"]){
+dojo._hasResource["dojo.cldr.supplemental"]=true;
+dojo.provide("dojo.cldr.supplemental");
+dojo.require("dojo.i18n");
+dojo.cldr.supplemental.getFirstDayOfWeek=function(_1){
+var _2={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,lb:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,tn:6,ye:6,as:0,au:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,ie:0,il:0,is:0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,za:0,zw:0,et:0,mw:0,ng:0,tj:0,sy:4};
+var _3=dojo.cldr.supplemental._region(_1);
+var _4=_2[_3];
+return (_4===undefined)?1:_4;
+};
+dojo.cldr.supplemental._region=function(_5){
+_5=dojo.i18n.normalizeLocale(_5);
+var _6=_5.split("-");
+var _7=_6[1];
+if(!_7){
+_7={de:"de",en:"us",es:"es",fi:"fi",fr:"fr",he:"il",hu:"hu",it:"it",ja:"jp",ko:"kr",nl:"nl",pt:"br",sv:"se",zh:"cn"}[_6[0]];
+}else{
+if(_7.length==4){
+_7=_6[2];
}
-
-dojo.cldr.supplemental.getWeekend = function(/*String?*/locale){
-// summary: Returns a hash containing the start and end days of the weekend
-// description:
-// Returns a hash containing the start and end days of the weekend according to local custom using locale,
-// or by default in the user's locale.
-// e.g. {start:6, end:0}
-
- // from http://www.unicode.org/cldr/data/common/supplemental/supplementalData.xml:supplementalData/weekData/weekend{Start,End}
- var weekendStart = {/*default is 6=Saturday*/
- eg:5,il:5,sy:5,
- 'in':0,
- ae:4,bh:4,dz:4,iq:4,jo:4,kw:4,lb:4,ly:4,ma:4,om:4,qa:4,sa:4,sd:4,tn:4,ye:4
- };
-
- var weekendEnd = {/*default is 0=Sunday*/
- ae:5,bh:5,dz:5,iq:5,jo:5,kw:5,lb:5,ly:5,ma:5,om:5,qa:5,sa:5,sd:5,tn:5,ye:5,af:5,ir:5,
- eg:6,il:6,sy:6
- };
-
- var country = dojo.cldr.supplemental._region(locale);
- var start = weekendStart[country];
- var end = weekendEnd[country];
- if(typeof start == 'undefined'){start=6;}
- if(typeof end == 'undefined'){end=0;}
- return {start:start, end:end}; /*Object {start,end}*/
+}
+return _7;
};
-
+dojo.cldr.supplemental.getWeekend=function(_8){
+var _9={eg:5,il:5,sy:5,"in":0,ae:4,bh:4,dz:4,iq:4,jo:4,kw:4,lb:4,ly:4,ma:4,om:4,qa:4,sa:4,sd:4,tn:4,ye:4};
+var _a={ae:5,bh:5,dz:5,iq:5,jo:5,kw:5,lb:5,ly:5,ma:5,om:5,qa:5,sa:5,sd:5,tn:5,ye:5,af:5,ir:5,eg:6,il:6,sy:6};
+var _b=dojo.cldr.supplemental._region(_8);
+var _c=_9[_b];
+var _d=_a[_b];
+if(_c===undefined){
+_c=6;
}
+if(_d===undefined){
+_d=0;
+}
+return {start:_c,end:_d};
+};
+}
diff --git a/js/dojo/dojo/colors.js b/js/dojo/dojo/colors.js
--- a/js/dojo/dojo/colors.js
+++ b/js/dojo/dojo/colors.js
@@ -1,218 +1,76 @@
-if(!dojo._hasResource["dojo.colors"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.colors"] = true;
-dojo.provide("dojo.colors");
-
-(function(){
- // this is a standard convertion prescribed by the CSS3 Color Module
- var hue2rgb = function(m1, m2, h){
- if(h < 0){ ++h; }
- if(h > 1){ --h; }
- var h6 = 6 * h;
- if(h6 < 1){ return m1 + (m2 - m1) * h6; }
- if(2 * h < 1){ return m2; }
- if(3 * h < 2){ return m1 + (m2 - m1) * (2 / 3 - h) * 6; }
- return m1;
- };
-
- dojo.colorFromRgb = function(/*String*/ color, /*dojo.Color?*/ obj){
- // summary:
- // get rgb(a) array from css-style color declarations
- // description:
- // this function can handle all 4 CSS3 Color Module formats: rgb,
- // rgba, hsl, hsla, including rgb(a) with percentage values.
- var m = color.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);
- if(m){
- var c = m[2].split(/\s*,\s*/), l = c.length, t = m[1];
- if((t == "rgb" && l == 3) || (t == "rgba" && l == 4)){
- var r = c[0];
- if(r.charAt(r.length - 1) == "%"){
- // 3 rgb percentage values
- var a = dojo.map(c, function(x){
- return parseFloat(x) * 2.56;
- });
- if(l == 4){ a[3] = c[3]; }
- return dojo.colorFromArray(a, obj); // dojo.Color
- }
- return dojo.colorFromArray(c, obj); // dojo.Color
- }
- if((t == "hsl" && l == 3) || (t == "hsla" && l == 4)){
- // normalize hsl values
- var H = ((parseFloat(c[0]) % 360) + 360) % 360 / 360,
- S = parseFloat(c[1]) / 100,
- L = parseFloat(c[2]) / 100,
- // calculate rgb according to the algorithm
- // recommended by the CSS3 Color Module
- m2 = L <= 0.5 ? L * (S + 1) : L + S - L * S,
- m1 = 2 * L - m2,
- a = [hue2rgb(m1, m2, H + 1 / 3) * 256,
- hue2rgb(m1, m2, H) * 256, hue2rgb(m1, m2, H - 1 / 3) * 256, 1];
- if(l == 4){ a[3] = c[3]; }
- return dojo.colorFromArray(a, obj); // dojo.Color
- }
- }
- return null; // dojo.Color
- };
-
- var confine = function(c, low, high){
- // summary:
- // sanitize a color component by making sure it is a number,
- // and clamping it to valid values
- c = Number(c);
- return isNaN(c) ? high : c < low ? low : c > high ? high : c; // Number
- };
-
- dojo.Color.prototype.sanitize = function(){
- // summary: makes sure that the object has correct attributes
- var t = this;
- t.r = Math.round(confine(t.r, 0, 255));
- t.g = Math.round(confine(t.g, 0, 255));
- t.b = Math.round(confine(t.b, 0, 255));
- t.a = confine(t.a, 0, 1);
- return this; // dojo.Color
- };
-})();
-
-
-dojo.colors.makeGrey = function(/*Number*/ g, /*Number?*/ a){
- // summary: creates a greyscale color with an optional alpha
- return dojo.colorFromArray([g, g, g, a]);
-};
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-// mixin all CSS3 named colors not already in _base, along with SVG 1.0 variant spellings
-dojo.Color.named = dojo.mixin({
- aliceblue: [240,248,255],
- antiquewhite: [250,235,215],
- aquamarine: [127,255,212],
- azure: [240,255,255],
- beige: [245,245,220],
- bisque: [255,228,196],
- blanchedalmond: [255,235,205],
- blueviolet: [138,43,226],
- brown: [165,42,42],
- burlywood: [222,184,135],
- cadetblue: [95,158,160],
- chartreuse: [127,255,0],
- chocolate: [210,105,30],
- coral: [255,127,80],
- cornflowerblue: [100,149,237],
- cornsilk: [255,248,220],
- crimson: [220,20,60],
- cyan: [0,255,255],
- darkblue: [0,0,139],
- darkcyan: [0,139,139],
- darkgoldenrod: [184,134,11],
- darkgray: [169,169,169],
- darkgreen: [0,100,0],
- darkgrey: [169,169,169],
- darkkhaki: [189,183,107],
- darkmagenta: [139,0,139],
- darkolivegreen: [85,107,47],
- darkorange: [255,140,0],
- darkorchid: [153,50,204],
- darkred: [139,0,0],
- darksalmon: [233,150,122],
- darkseagreen: [143,188,143],
- darkslateblue: [72,61,139],
- darkslategray: [47,79,79],
- darkslategrey: [47,79,79],
- darkturquoise: [0,206,209],
- darkviolet: [148,0,211],
- deeppink: [255,20,147],
- deepskyblue: [0,191,255],
- dimgray: [105,105,105],
- dimgrey: [105,105,105],
- dodgerblue: [30,144,255],
- firebrick: [178,34,34],
- floralwhite: [255,250,240],
- forestgreen: [34,139,34],
- gainsboro: [220,220,220],
- ghostwhite: [248,248,255],
- gold: [255,215,0],
- goldenrod: [218,165,32],
- greenyellow: [173,255,47],
- grey: [128,128,128],
- honeydew: [240,255,240],
- hotpink: [255,105,180],
- indianred: [205,92,92],
- indigo: [75,0,130],
- ivory: [255,255,240],
- khaki: [240,230,140],
- lavender: [230,230,250],
- lavenderblush: [255,240,245],
- lawngreen: [124,252,0],
- lemonchiffon: [255,250,205],
- lightblue: [173,216,230],
- lightcoral: [240,128,128],
- lightcyan: [224,255,255],
- lightgoldenrodyellow: [250,250,210],
- lightgray: [211,211,211],
- lightgreen: [144,238,144],
- lightgrey: [211,211,211],
- lightpink: [255,182,193],
- lightsalmon: [255,160,122],
- lightseagreen: [32,178,170],
- lightskyblue: [135,206,250],
- lightslategray: [119,136,153],
- lightslategrey: [119,136,153],
- lightsteelblue: [176,196,222],
- lightyellow: [255,255,224],
- limegreen: [50,205,50],
- linen: [250,240,230],
- magenta: [255,0,255],
- mediumaquamarine: [102,205,170],
- mediumblue: [0,0,205],
- mediumorchid: [186,85,211],
- mediumpurple: [147,112,219],
- mediumseagreen: [60,179,113],
- mediumslateblue: [123,104,238],
- mediumspringgreen: [0,250,154],
- mediumturquoise: [72,209,204],
- mediumvioletred: [199,21,133],
- midnightblue: [25,25,112],
- mintcream: [245,255,250],
- mistyrose: [255,228,225],
- moccasin: [255,228,181],
- navajowhite: [255,222,173],
- oldlace: [253,245,230],
- olivedrab: [107,142,35],
- orange: [255,165,0],
- orangered: [255,69,0],
- orchid: [218,112,214],
- palegoldenrod: [238,232,170],
- palegreen: [152,251,152],
- paleturquoise: [175,238,238],
- palevioletred: [219,112,147],
- papayawhip: [255,239,213],
- peachpuff: [255,218,185],
- peru: [205,133,63],
- pink: [255,192,203],
- plum: [221,160,221],
- powderblue: [176,224,230],
- rosybrown: [188,143,143],
- royalblue: [65,105,225],
- saddlebrown: [139,69,19],
- salmon: [250,128,114],
- sandybrown: [244,164,96],
- seagreen: [46,139,87],
- seashell: [255,245,238],
- sienna: [160,82,45],
- skyblue: [135,206,235],
- slateblue: [106,90,205],
- slategray: [112,128,144],
- slategrey: [112,128,144],
- snow: [255,250,250],
- springgreen: [0,255,127],
- steelblue: [70,130,180],
- tan: [210,180,140],
- thistle: [216,191,216],
- tomato: [255,99,71],
- transparent: [0, 0, 0, 0],
- turquoise: [64,224,208],
- violet: [238,130,238],
- wheat: [245,222,179],
- whitesmoke: [245,245,245],
- yellowgreen: [154,205,50]
-}, dojo.Color.named);
-
+if(!dojo._hasResource["dojo.colors"]){
+dojo._hasResource["dojo.colors"]=true;
+dojo.provide("dojo.colors");
+(function(){
+var _1=function(m1,m2,h){
+if(h<0){
+++h;
+}
+if(h>1){
+--h;
+}
+var h6=6*h;
+if(h6<1){
+return m1+(m2-m1)*h6;
+}
+if(2*h<1){
+return m2;
+}
+if(3*h<2){
+return m1+(m2-m1)*(2/3-h)*6;
}
+return m1;
+};
+dojo.colorFromRgb=function(_2,_3){
+var m=_2.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);
+if(m){
+var c=m[2].split(/\s*,\s*/),l=c.length,t=m[1],a;
+if((t=="rgb"&&l==3)||(t=="rgba"&&l==4)){
+var r=c[0];
+if(r.charAt(r.length-1)=="%"){
+a=dojo.map(c,function(x){
+return parseFloat(x)*2.56;
+});
+if(l==4){
+a[3]=c[3];
+}
+return dojo.colorFromArray(a,_3);
+}
+return dojo.colorFromArray(c,_3);
+}
+if((t=="hsl"&&l==3)||(t=="hsla"&&l==4)){
+var H=((parseFloat(c[0])%360)+360)%360/360,S=parseFloat(c[1])/100,L=parseFloat(c[2])/100,m2=L<=0.5?L*(S+1):L+S-L*S,m1=2*L-m2;
+a=[_1(m1,m2,H+1/3)*256,_1(m1,m2,H)*256,_1(m1,m2,H-1/3)*256,1];
+if(l==4){
+a[3]=c[3];
+}
+return dojo.colorFromArray(a,_3);
+}
+}
+return null;
+};
+var _4=function(c,_5,_6){
+c=Number(c);
+return isNaN(c)?_6:c<_5?_5:c>_6?_6:c;
+};
+dojo.Color.prototype.sanitize=function(){
+var t=this;
+t.r=Math.round(_4(t.r,0,255));
+t.g=Math.round(_4(t.g,0,255));
+t.b=Math.round(_4(t.b,0,255));
+t.a=_4(t.a,0,1);
+return this;
+};
+})();
+dojo.colors.makeGrey=function(g,a){
+return dojo.colorFromArray([g,g,g,a]);
+};
+dojo.mixin(dojo.Color.named,{aliceblue:[240,248,255],antiquewhite:[250,235,215],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],blanchedalmond:[255,235,205],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],oldlace:[253,245,230],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],thistle:[216,191,216],tomato:[255,99,71],transparent:[0,0,0,0],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],whitesmoke:[245,245,245],yellowgreen:[154,205,50]});
+}
diff --git a/js/dojo/dojo/cookie.js b/js/dojo/dojo/cookie.js
--- a/js/dojo/dojo/cookie.js
+++ b/js/dojo/dojo/cookie.js
@@ -1,77 +1,50 @@
-if(!dojo._hasResource["dojo.cookie"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.cookie"] = true;
-dojo.provide("dojo.cookie");
-
-/*=====
-dojo.__cookieProps = function(kwArgs){
- // expires: Date|Number?
- // If a number, seen as the number of days from today. If a date, the
- // date past which the cookie is invalid. If expires is in the past,
- // the cookie will be deleted If expires is left out or is 0, the
- // cookie will expire when the browser closes.
- // path: String?
- // The path to use for the cookie.
- // domain: String?
- // The domain to use for the cookie.
- // secure: Boolean?
- // Whether to only send the cookie on secure connections
-}
-=====*/
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.cookie = function(/*String*/name, /*String?*/value, /*dojo.__cookieProps?*/props){
- // summary:
- // Get or set a cookie.
- // description:
- // If you pass in one argument, the the value of the cookie is returned
- //
- // If you pass in two arguments, the cookie value is set to the second
- // argument.
- //
- // If you pass in three arguments, the cookie value is set to the
- // second argument, and the options on the third argument are used for
- // extended properties on the cookie
- // name:
- // The name of the cookie
- // value:
- // Optional. The value for the cookie.
- // props:
- // Optional additional properties for the cookie
- // example:
- // set a cookie with the JSON-serialized contents of an object which
- // will expire 5 days from now:
- // | dojo.cookie("configObj", dojo.toJson(config), { expires: 5 });
- //
- // example:
- // de-serialize a cookie back into a JavaScript object:
- // | var config = dojo.fromJson(dojo.cookie("configObj"));
- //
- // example:
- // delete a cookie:
- // | dojo.cookie("configObj", null);
- var c = document.cookie;
- if(arguments.length == 1){
- var idx = c.lastIndexOf(name+'=');
- if(idx == -1){ return null; }
- var start = idx+name.length+1;
- var end = c.indexOf(';', idx+name.length+1);
- if(end == -1){ end = c.length; }
- return decodeURIComponent(c.substring(start, end));
- }else{
- props = props || {};
- value = encodeURIComponent(value);
- if(typeof(props.expires) == "number"){
- var d = new Date();
- d.setTime(d.getTime()+(props.expires*24*60*60*1000));
- props.expires = d;
- }
- document.cookie = name + "=" + value
- + (props.expires ? "; expires=" + props.expires.toUTCString() : "")
- + (props.path ? "; path=" + props.path : "")
- + (props.domain ? "; domain=" + props.domain : "")
- + (props.secure ? "; secure" : "");
- return null;
- }
+if(!dojo._hasResource["dojo.cookie"]){
+dojo._hasResource["dojo.cookie"]=true;
+dojo.provide("dojo.cookie");
+dojo.require("dojo.regexp");
+dojo.cookie=function(_1,_2,_3){
+var c=document.cookie;
+if(arguments.length==1){
+var _4=c.match(new RegExp("(?:^|; )"+dojo.regexp.escapeString(_1)+"=([^;]*)"));
+return _4?decodeURIComponent(_4[1]):undefined;
+}else{
+_3=_3||{};
+var _5=_3.expires;
+if(typeof _5=="number"){
+var d=new Date();
+d.setTime(d.getTime()+_5*24*60*60*1000);
+_5=_3.expires=d;
+}
+if(_5&&_5.toUTCString){
+_3.expires=_5.toUTCString();
+}
+_2=encodeURIComponent(_2);
+var _6=_1+"="+_2,_7;
+for(_7 in _3){
+_6+="; "+_7;
+var _8=_3[_7];
+if(_8!==true){
+_6+="="+_8;
+}
+}
+document.cookie=_6;
+}
};
-
+dojo.cookie.isSupported=function(){
+if(!("cookieEnabled" in navigator)){
+this("__djCookieTest__","CookiesAllowed");
+navigator.cookieEnabled=this("__djCookieTest__")=="CookiesAllowed";
+if(navigator.cookieEnabled){
+this("__djCookieTest__","",{expires:-1});
}
+}
+return navigator.cookieEnabled;
+};
+}
diff --git a/js/dojo/dojo/currency.js b/js/dojo/dojo/currency.js
--- a/js/dojo/dojo/currency.js
+++ b/js/dojo/dojo/currency.js
@@ -1,103 +1,36 @@
-if(!dojo._hasResource["dojo.currency"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.currency"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo.currency"]){
+dojo._hasResource["dojo.currency"]=true;
dojo.provide("dojo.currency");
-
dojo.require("dojo.number");
dojo.require("dojo.i18n");
-dojo.requireLocalization("dojo.cldr", "currency", null, "ko,zh,ja,en,en-ca,en-au,ROOT,en-us,it,fr,pt,es,de");
+dojo.requireLocalization("dojo.cldr","currency",null,"ROOT,ar,ca,cs,da,de,el,en,en-au,en-ca,en-us,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,ru,sk,sl,sv,th,tr,zh,zh-tw");
dojo.require("dojo.cldr.monetary");
-
-dojo.currency._mixInDefaults = function(options){
- options = options || {};
- options.type = "currency";
-
- // Get locale-depenent currency data, like the symbol
- var bundle = dojo.i18n.getLocalization("dojo.cldr", "currency", options.locale) || {};
-
- // Mixin locale-independent currency data, like # of places
- var iso = options.currency;
- var data = dojo.cldr.monetary.getData(iso);
-
- dojo.forEach(["displayName","symbol","group","decimal"], function(prop){
- data[prop] = bundle[iso+"_"+prop];
- });
-
- data.fractional = [true, false];
-
- // Mixin with provided options
- return dojo.mixin(data, options);
-}
-
-dojo.currency.format = function(/*Number*/value, /*Object?*/options){
-// summary:
-// Format a Number as a String, using locale-specific settings
-//
-// description:
-// Create a string from a Number using a known localized pattern.
-// Formatting patterns appropriate to the locale are chosen from the CLDR http://unicode.org/cldr
-// as well as the appropriate symbols and delimiters. See http://www.unicode.org/reports/tr35/#Number_Elements
-//
-// value:
-// the number to be formatted.
-//
-// options: object {currency: String, pattern: String?, places: Number?, round: Number?, symbol: String?, locale: String?}
-// currency- the ISO4217 currency code, a three letter sequence like "USD"
-// See http://en.wikipedia.org/wiki/ISO_4217
-// symbol- override currency symbol. Normally, will be looked up in table of supported currencies, and ISO currency code will
-// be used if not found. See dojo.i18n.cldr.nls->currency.js
-// pattern- override formatting pattern with this string (see dojo.number.applyPattern)
-// places- fixed number of decimal places to show. Default is defined by the currency.
-// round- 5 rounds to nearest .5; 0 rounds to nearest whole (default). -1 means don't round.
-// locale- override the locale used to determine formatting rules
-
- return dojo.number.format(value, dojo.currency._mixInDefaults(options));
+dojo.currency._mixInDefaults=function(_1){
+_1=_1||{};
+_1.type="currency";
+var _2=dojo.i18n.getLocalization("dojo.cldr","currency",_1.locale)||{};
+var _3=_1.currency;
+var _4=dojo.cldr.monetary.getData(_3);
+dojo.forEach(["displayName","symbol","group","decimal"],function(_5){
+_4[_5]=_2[_3+"_"+_5];
+});
+_4.fractional=[true,false];
+return dojo.mixin(_4,_1);
+};
+dojo.currency.format=function(_6,_7){
+return dojo.number.format(_6,dojo.currency._mixInDefaults(_7));
+};
+dojo.currency.regexp=function(_8){
+return dojo.number.regexp(dojo.currency._mixInDefaults(_8));
+};
+dojo.currency.parse=function(_9,_a){
+return dojo.number.parse(_9,dojo.currency._mixInDefaults(_a));
+};
}
-
-dojo.currency.regexp = function(/*Object?*/options){
-//
-// summary:
-// Builds the regular needed to parse a number
-//
-// description:
-// Returns regular expression with positive and negative match, group and decimal separators
-//
-// options: object {pattern: String, locale: String, strict: Boolean, places: mixed}
-// currency- the ISO4217 currency code, a three letter sequence like "USD"
-// See http://en.wikipedia.org/wiki/ISO_4217
-// symbol- override currency symbol. Normally, will be looked up in table of supported currencies, and ISO currency code will
-// be used if not found. See dojo.i18n.cldr.nls->currency.js
-// pattern- override pattern with this string
-// locale- override the locale used to determine formatting rules
-// strict- strict parsing, false by default
-// places- number of decimal places to accept. Default is defined by currency.
- return dojo.number.regexp(dojo.currency._mixInDefaults(options)); // String
-}
-
-dojo.currency.parse = function(/*String*/expression, /*Object?*/options){
-//
-// summary:
-// Convert a properly formatted string to a primitive Number,
-// using locale-specific settings.
-//
-// description:
-// Create a Number from a string using a known localized pattern.
-// Formatting patterns are chosen appropriate to the locale.
-// Formatting patterns are implemented using the syntax described at *URL*
-//
-// expression: A string representation of a Number
-//
-// options: object {pattern: string, locale: string, strict: boolean}
-// currency- the ISO4217 currency code, a three letter sequence like "USD"
-// See http://en.wikipedia.org/wiki/ISO_4217
-// symbol- override currency symbol. Normally, will be looked up in table of supported currencies, and ISO currency code will
-// be used if not found. See dojo.i18n.cldr.nls->currency.js
-// pattern- override pattern with this string
-// locale- override the locale used to determine formatting rules
-// strict- strict parsing, false by default
-// places- number of decimal places to accept. Default is defined by currency.
-// fractional- where places are implied by pattern or explicit 'places' parameter, whether to include the fractional portion.
-// By default for currencies, it the fractional portion is optional.
- return dojo.number.parse(expression, dojo.currency._mixInDefaults(options));
-}
-
-}
diff --git a/js/dojo/dojo/data/ItemFileReadStore.js b/js/dojo/dojo/data/ItemFileReadStore.js
--- a/js/dojo/dojo/data/ItemFileReadStore.js
+++ b/js/dojo/dojo/data/ItemFileReadStore.js
@@ -1,733 +1,572 @@
-if(!dojo._hasResource["dojo.data.ItemFileReadStore"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.data.ItemFileReadStore"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo.data.ItemFileReadStore"]){
+dojo._hasResource["dojo.data.ItemFileReadStore"]=true;
dojo.provide("dojo.data.ItemFileReadStore");
-
dojo.require("dojo.data.util.filter");
dojo.require("dojo.data.util.simpleFetch");
dojo.require("dojo.date.stamp");
-
-dojo.declare("dojo.data.ItemFileReadStore", null,{
- // summary:
- // The ItemFileReadStore implements the dojo.data.api.Read API and reads
- // data from JSON files that have contents in this format --
- // { items: [
- // { name:'Kermit', color:'green', age:12, friends:['Gonzo', {_reference:{name:'Fozzie Bear'}}]},
- // { name:'Fozzie Bear', wears:['hat', 'tie']},
- // { name:'Miss Piggy', pets:'Foo-Foo'}
- // ]}
- // Note that it can also contain an 'identifer' property that specified which attribute on the items
- // in the array of items that acts as the unique identifier for that item.
- //
- constructor: function(/* Object */ keywordParameters){
- // summary: constructor
- // keywordParameters: {url: String}
- // keywordParameters: {data: jsonObject}
- // keywordParameters: {typeMap: object)
- // The structure of the typeMap object is as follows:
- // {
- // type0: function || object,
- // type1: function || object,
- // ...
- // typeN: function || object
- // }
- // Where if it is a function, it is assumed to be an object constructor that takes the
- // value of _value as the initialization parameters. If it is an object, then it is assumed
- // to be an object of general form:
- // {
- // type: function, //constructor.
- // deserialize: function(value) //The function that parses the value and constructs the object defined by type appropriately.
- // }
-
- this._arrayOfAllItems = [];
- this._arrayOfTopLevelItems = [];
- this._loadFinished = false;
- this._jsonFileUrl = keywordParameters.url;
- this._jsonData = keywordParameters.data;
- this._datatypeMap = keywordParameters.typeMap || {};
- if(!this._datatypeMap['Date']){
- //If no default mapping for dates, then set this as default.
- //We use the dojo.date.stamp here because the ISO format is the 'dojo way'
- //of generically representing dates.
- this._datatypeMap['Date'] = {
- type: Date,
- deserialize: function(value){
- return dojo.date.stamp.fromISOString(value);
- }
- };
- }
- this._features = {'dojo.data.api.Read':true, 'dojo.data.api.Identity':true};
- this._itemsByIdentity = null;
- this._storeRefPropName = "_S"; // Default name for the store reference to attach to every item.
- this._itemNumPropName = "_0"; // Default Item Id for isItem to attach to every item.
- this._rootItemPropName = "_RI"; // Default Item Id for isItem to attach to every item.
- this._loadInProgress = false; //Got to track the initial load to prevent duelling loads of the dataset.
- this._queuedFetches = [];
- },
-
- url: "", // use "" rather than undefined for the benefit of the parser (#3539)
-
- _assertIsItem: function(/* item */ item){
- // summary:
- // This function tests whether the item passed in is indeed an item in the store.
- // item:
- // The item to test for being contained by the store.
- if(!this.isItem(item)){
- throw new Error("dojo.data.ItemFileReadStore: Invalid item argument.");
- }
- },
-
- _assertIsAttribute: function(/* attribute-name-string */ attribute){
- // summary:
- // This function tests whether the item passed in is indeed a valid 'attribute' like type for the store.
- // attribute:
- // The attribute to test for being contained by the store.
- if(typeof attribute !== "string"){
- throw new Error("dojo.data.ItemFileReadStore: Invalid attribute argument.");
- }
- },
-
- getValue: function( /* item */ item,
- /* attribute-name-string */ attribute,
- /* value? */ defaultValue){
- // summary:
- // See dojo.data.api.Read.getValue()
- var values = this.getValues(item, attribute);
- return (values.length > 0)?values[0]:defaultValue; // mixed
- },
-
- getValues: function(/* item */ item,
- /* attribute-name-string */ attribute){
- // summary:
- // See dojo.data.api.Read.getValues()
-
- this._assertIsItem(item);
- this._assertIsAttribute(attribute);
- return item[attribute] || []; // Array
- },
-
- getAttributes: function(/* item */ item){
- // summary:
- // See dojo.data.api.Read.getAttributes()
- this._assertIsItem(item);
- var attributes = [];
- for(var key in item){
- // Save off only the real item attributes, not the special id marks for O(1) isItem.
- if((key !== this._storeRefPropName) && (key !== this._itemNumPropName) && (key !== this._rootItemPropName)){
- attributes.push(key);
- }
- }
- return attributes; // Array
- },
-
- hasAttribute: function( /* item */ item,
- /* attribute-name-string */ attribute) {
- // summary:
- // See dojo.data.api.Read.hasAttribute()
- return this.getValues(item, attribute).length > 0;
- },
-
- containsValue: function(/* item */ item,
- /* attribute-name-string */ attribute,
- /* anything */ value){
- // summary:
- // See dojo.data.api.Read.containsValue()
- var regexp = undefined;
- if(typeof value === "string"){
- regexp = dojo.data.util.filter.patternToRegExp(value, false);
- }
- return this._containsValue(item, attribute, value, regexp); //boolean.
- },
-
- _containsValue: function( /* item */ item,
- /* attribute-name-string */ attribute,
- /* anything */ value,
- /* RegExp?*/ regexp){
- // summary:
- // Internal function for looking at the values contained by the item.
- // description:
- // Internal function for looking at the values contained by the item. This
- // function allows for denoting if the comparison should be case sensitive for
- // strings or not (for handling filtering cases where string case should not matter)
- //
- // item:
- // The data item to examine for attribute values.
- // attribute:
- // The attribute to inspect.
- // value:
- // The value to match.
- // regexp:
- // Optional regular expression generated off value if value was of string type to handle wildcarding.
- // If present and attribute values are string, then it can be used for comparison instead of 'value'
- return dojo.some(this.getValues(item, attribute), function(possibleValue){
- if(possibleValue !== null && !dojo.isObject(possibleValue) && regexp){
- if(possibleValue.toString().match(regexp)){
- return true; // Boolean
- }
- }else if(value === possibleValue){
- return true; // Boolean
- }
- });
- },
-
- isItem: function(/* anything */ something){
- // summary:
- // See dojo.data.api.Read.isItem()
- if(something && something[this._storeRefPropName] === this){
- if(this._arrayOfAllItems[something[this._itemNumPropName]] === something){
- return true;
- }
- }
- return false; // Boolean
- },
-
- isItemLoaded: function(/* anything */ something){
- // summary:
- // See dojo.data.api.Read.isItemLoaded()
- return this.isItem(something); //boolean
- },
-
- loadItem: function(/* object */ keywordArgs){
- // summary:
- // See dojo.data.api.Read.loadItem()
- this._assertIsItem(keywordArgs.item);
- },
-
- getFeatures: function(){
- // summary:
- // See dojo.data.api.Read.getFeatures()
- return this._features; //Object
- },
-
- getLabel: function(/* item */ item){
- // summary:
- // See dojo.data.api.Read.getLabel()
- if(this._labelAttr && this.isItem(item)){
- return this.getValue(item,this._labelAttr); //String
- }
- return undefined; //undefined
- },
-
- getLabelAttributes: function(/* item */ item){
- // summary:
- // See dojo.data.api.Read.getLabelAttributes()
- if(this._labelAttr){
- return [this._labelAttr]; //array
- }
- return null; //null
- },
-
- _fetchItems: function( /* Object */ keywordArgs,
- /* Function */ findCallback,
- /* Function */ errorCallback){
- // summary:
- // See dojo.data.util.simpleFetch.fetch()
- var self = this;
- var filter = function(requestArgs, arrayOfItems){
- var items = [];
- if(requestArgs.query){
- var ignoreCase = requestArgs.queryOptions ? requestArgs.queryOptions.ignoreCase : false;
-
- //See if there are any string values that can be regexp parsed first to avoid multiple regexp gens on the
- //same value for each item examined. Much more efficient.
- var regexpList = {};
- for(var key in requestArgs.query){
- var value = requestArgs.query[key];
- if(typeof value === "string"){
- regexpList[key] = dojo.data.util.filter.patternToRegExp(value, ignoreCase);
- }
- }
-
- for(var i = 0; i < arrayOfItems.length; ++i){
- var match = true;
- var candidateItem = arrayOfItems[i];
- if(candidateItem === null){
- match = false;
- }else{
- for(var key in requestArgs.query) {
- var value = requestArgs.query[key];
- if (!self._containsValue(candidateItem, key, value, regexpList[key])){
- match = false;
- }
- }
- }
- if(match){
- items.push(candidateItem);
- }
- }
- findCallback(items, requestArgs);
- }else{
- // We want a copy to pass back in case the parent wishes to sort the array.
- // We shouldn't allow resort of the internal list, so that multiple callers
- // can get lists and sort without affecting each other. We also need to
- // filter out any null values that have been left as a result of deleteItem()
- // calls in ItemFileWriteStore.
- for(var i = 0; i < arrayOfItems.length; ++i){
- var item = arrayOfItems[i];
- if(item !== null){
- items.push(item);
- }
- }
- findCallback(items, requestArgs);
- }
- };
-
- if(this._loadFinished){
- filter(keywordArgs, this._getItemsArray(keywordArgs.queryOptions));
- }else{
-
- if(this._jsonFileUrl){
- //If fetches come in before the loading has finished, but while
- //a load is in progress, we have to defer the fetching to be
- //invoked in the callback.
- if(this._loadInProgress){
- this._queuedFetches.push({args: keywordArgs, filter: filter});
- }else{
- this._loadInProgress = true;
- var getArgs = {
- url: self._jsonFileUrl,
- handleAs: "json-comment-optional"
- };
- var getHandler = dojo.xhrGet(getArgs);
- getHandler.addCallback(function(data){
- try{
- self._getItemsFromLoadedData(data);
- self._loadFinished = true;
- self._loadInProgress = false;
-
- filter(keywordArgs, self._getItemsArray(keywordArgs.queryOptions));
- self._handleQueuedFetches();
- }catch(e){
- self._loadFinished = true;
- self._loadInProgress = false;
- errorCallback(e, keywordArgs);
- }
- });
- getHandler.addErrback(function(error){
- self._loadInProgress = false;
- errorCallback(error, keywordArgs);
- });
- }
- }else if(this._jsonData){
- try{
- this._loadFinished = true;
- this._getItemsFromLoadedData(this._jsonData);
- this._jsonData = null;
- filter(keywordArgs, this._getItemsArray(keywordArgs.queryOptions));
- }catch(e){
- errorCallback(e, keywordArgs);
- }
- }else{
- errorCallback(new Error("dojo.data.ItemFileReadStore: No JSON source data was provided as either URL or a nested Javascript object."), keywordArgs);
- }
- }
- },
-
- _handleQueuedFetches: function(){
- // summary:
- // Internal function to execute delayed request in the store.
- //Execute any deferred fetches now.
- if (this._queuedFetches.length > 0) {
- for(var i = 0; i < this._queuedFetches.length; i++){
- var fData = this._queuedFetches[i];
- var delayedQuery = fData.args;
- var delayedFilter = fData.filter;
- if(delayedFilter){
- delayedFilter(delayedQuery, this._getItemsArray(delayedQuery.queryOptions));
- }else{
- this.fetchItemByIdentity(delayedQuery);
- }
- }
- this._queuedFetches = [];
- }
- },
-
- _getItemsArray: function(/*object?*/queryOptions){
- // summary:
- // Internal function to determine which list of items to search over.
- // queryOptions: The query options parameter, if any.
- if(queryOptions && queryOptions.deep) {
- return this._arrayOfAllItems;
- }
- return this._arrayOfTopLevelItems;
- },
-
- close: function(/*dojo.data.api.Request || keywordArgs || null */ request){
- // summary:
- // See dojo.data.api.Read.close()
- },
-
- _getItemsFromLoadedData: function(/* Object */ dataObject){
- // summary:
- // Function to parse the loaded data into item format and build the internal items array.
- // description:
- // Function to parse the loaded data into item format and build the internal items array.
- //
- // dataObject:
- // The JS data object containing the raw data to convery into item format.
- //
- // returns: array
- // Array of items in store item format.
-
- // First, we define a couple little utility functions...
-
- function valueIsAnItem(/* anything */ aValue){
- // summary:
- // Given any sort of value that could be in the raw json data,
- // return true if we should interpret the value as being an
- // item itself, rather than a literal value or a reference.
- // example:
- // | false == valueIsAnItem("Kermit");
- // | false == valueIsAnItem(42);
- // | false == valueIsAnItem(new Date());
- // | false == valueIsAnItem({_type:'Date', _value:'May 14, 1802'});
- // | false == valueIsAnItem({_reference:'Kermit'});
- // | true == valueIsAnItem({name:'Kermit', color:'green'});
- // | true == valueIsAnItem({iggy:'pop'});
- // | true == valueIsAnItem({foo:42});
- var isItem = (
- (aValue != null) &&
- (typeof aValue == "object") &&
- (!dojo.isArray(aValue)) &&
- (!dojo.isFunction(aValue)) &&
- (aValue.constructor == Object) &&
- (typeof aValue._reference == "undefined") &&
- (typeof aValue._type == "undefined") &&
- (typeof aValue._value == "undefined")
- );
- return isItem;
- }
-
- var self = this;
- function addItemAndSubItemsToArrayOfAllItems(/* Item */ anItem){
- self._arrayOfAllItems.push(anItem);
- for(var attribute in anItem){
- var valueForAttribute = anItem[attribute];
- if(valueForAttribute){
- if(dojo.isArray(valueForAttribute)){
- var valueArray = valueForAttribute;
- for(var k = 0; k < valueArray.length; ++k){
- var singleValue = valueArray[k];
- if(valueIsAnItem(singleValue)){
- addItemAndSubItemsToArrayOfAllItems(singleValue);
- }
- }
- }else{
- if(valueIsAnItem(valueForAttribute)){
- addItemAndSubItemsToArrayOfAllItems(valueForAttribute);
- }
- }
- }
- }
- }
-
- this._labelAttr = dataObject.label;
-
- // We need to do some transformations to convert the data structure
- // that we read from the file into a format that will be convenient
- // to work with in memory.
-
- // Step 1: Walk through the object hierarchy and build a list of all items
- var i;
- var item;
- this._arrayOfAllItems = [];
- this._arrayOfTopLevelItems = dataObject.items;
-
- for(i = 0; i < this._arrayOfTopLevelItems.length; ++i){
- item = this._arrayOfTopLevelItems[i];
- addItemAndSubItemsToArrayOfAllItems(item);
- item[this._rootItemPropName]=true;
- }
-
- // Step 2: Walk through all the attribute values of all the items,
- // and replace single values with arrays. For example, we change this:
- // { name:'Miss Piggy', pets:'Foo-Foo'}
- // into this:
- // { name:['Miss Piggy'], pets:['Foo-Foo']}
- //
- // We also store the attribute names so we can validate our store
- // reference and item id special properties for the O(1) isItem
- var allAttributeNames = {};
- var key;
-
- for(i = 0; i < this._arrayOfAllItems.length; ++i){
- item = this._arrayOfAllItems[i];
- for(key in item){
- if (key !== this._rootItemPropName)
- {
- var value = item[key];
- if(value !== null){
- if(!dojo.isArray(value)){
- item[key] = [value];
- }
- }else{
- item[key] = [null];
- }
- }
- allAttributeNames[key]=key;
- }
- }
-
- // Step 3: Build unique property names to use for the _storeRefPropName and _itemNumPropName
- // This should go really fast, it will generally never even run the loop.
- while(allAttributeNames[this._storeRefPropName]){
- this._storeRefPropName += "_";
- }
- while(allAttributeNames[this._itemNumPropName]){
- this._itemNumPropName += "_";
- }
-
- // Step 4: Some data files specify an optional 'identifier', which is
- // the name of an attribute that holds the identity of each item.
- // If this data file specified an identifier attribute, then build a
- // hash table of items keyed by the identity of the items.
- var arrayOfValues;
-
- var identifier = dataObject.identifier;
- if(identifier){
- this._itemsByIdentity = {};
- this._features['dojo.data.api.Identity'] = identifier;
- for(i = 0; i < this._arrayOfAllItems.length; ++i){
- item = this._arrayOfAllItems[i];
- arrayOfValues = item[identifier];
- var identity = arrayOfValues[0];
- if(!this._itemsByIdentity[identity]){
- this._itemsByIdentity[identity] = item;
- }else{
- if(this._jsonFileUrl){
- throw new Error("dojo.data.ItemFileReadStore: The json data as specified by: [" + this._jsonFileUrl + "] is malformed. Items within the list have identifier: [" + identifier + "]. Value collided: [" + identity + "]");
- }else if(this._jsonData){
- throw new Error("dojo.data.ItemFileReadStore: The json data provided by the creation arguments is malformed. Items within the list have identifier: [" + identifier + "]. Value collided: [" + identity + "]");
- }
- }
- }
- }else{
- this._features['dojo.data.api.Identity'] = Number;
- }
-
- // Step 5: Walk through all the items, and set each item's properties
- // for _storeRefPropName and _itemNumPropName, so that store.isItem() will return true.
- for(i = 0; i < this._arrayOfAllItems.length; ++i){
- item = this._arrayOfAllItems[i];
- item[this._storeRefPropName] = this;
- item[this._itemNumPropName] = i;
- }
-
- // Step 6: We walk through all the attribute values of all the items,
- // looking for type/value literals and item-references.
- //
- // We replace item-references with pointers to items. For example, we change:
- // { name:['Kermit'], friends:[{_reference:{name:'Miss Piggy'}}] }
- // into this:
- // { name:['Kermit'], friends:[miss_piggy] }
- // (where miss_piggy is the object representing the 'Miss Piggy' item).
- //
- // We replace type/value pairs with typed-literals. For example, we change:
- // { name:['Nelson Mandela'], born:[{_type:'Date', _value:'July 18, 1918'}] }
- // into this:
- // { name:['Kermit'], born:(new Date('July 18, 1918')) }
- //
- // We also generate the associate map for all items for the O(1) isItem function.
- for(i = 0; i < this._arrayOfAllItems.length; ++i){
- item = this._arrayOfAllItems[i]; // example: { name:['Kermit'], friends:[{_reference:{name:'Miss Piggy'}}] }
- for(key in item){
- arrayOfValues = item[key]; // example: [{_reference:{name:'Miss Piggy'}}]
- for(var j = 0; j < arrayOfValues.length; ++j) {
- value = arrayOfValues[j]; // example: {_reference:{name:'Miss Piggy'}}
- if(value !== null && typeof value == "object"){
- if(value._type && value._value){
- var type = value._type; // examples: 'Date', 'Color', or 'ComplexNumber'
- var mappingObj = this._datatypeMap[type]; // examples: Date, dojo.Color, foo.math.ComplexNumber, {type: dojo.Color, deserialize(value){ return new dojo.Color(value)}}
- if(!mappingObj){
- throw new Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '" + type + "'");
- }else if(dojo.isFunction(mappingObj)){
- arrayOfValues[j] = new mappingObj(value._value);
- }else if(dojo.isFunction(mappingObj.deserialize)){
- arrayOfValues[j] = mappingObj.deserialize(value._value);
- }else{
- throw new Error("dojo.data.ItemFileReadStore: Value provided in typeMap was neither a constructor, nor a an object with a deserialize function");
- }
- }
- if(value._reference){
- var referenceDescription = value._reference; // example: {name:'Miss Piggy'}
- if(dojo.isString(referenceDescription)){
- // example: 'Miss Piggy'
- // from an item like: { name:['Kermit'], friends:[{_reference:'Miss Piggy'}]}
- arrayOfValues[j] = this._itemsByIdentity[referenceDescription];
- }else{
- // example: {name:'Miss Piggy'}
- // from an item like: { name:['Kermit'], friends:[{_reference:{name:'Miss Piggy'}}] }
- for(var k = 0; k < this._arrayOfAllItems.length; ++k){
- var candidateItem = this._arrayOfAllItems[k];
- var found = true;
- for(var refKey in referenceDescription){
- if(candidateItem[refKey] != referenceDescription[refKey]){
- found = false;
- }
- }
- if(found){
- arrayOfValues[j] = candidateItem;
- }
- }
- }
- }
- }
- }
- }
- }
- },
-
- getIdentity: function(/* item */ item){
- // summary:
- // See dojo.data.api.Identity.getIdentity()
- var identifier = this._features['dojo.data.api.Identity'];
- if(identifier === Number){
- return item[this._itemNumPropName]; // Number
- }else{
- var arrayOfValues = item[identifier];
- if(arrayOfValues){
- return arrayOfValues[0]; // Object || String
- }
- }
- return null; // null
- },
-
- fetchItemByIdentity: function(/* Object */ keywordArgs){
- // summary:
- // See dojo.data.api.Identity.fetchItemByIdentity()
-
- // Hasn't loaded yet, we have to trigger the load.
- if(!this._loadFinished){
- var self = this;
- if(this._jsonFileUrl){
-
- if(this._loadInProgress){
- this._queuedFetches.push({args: keywordArgs});
- }else{
- this._loadInProgress = true;
- var getArgs = {
- url: self._jsonFileUrl,
- handleAs: "json-comment-optional"
- };
- var getHandler = dojo.xhrGet(getArgs);
- getHandler.addCallback(function(data){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- try{
- self._getItemsFromLoadedData(data);
- self._loadFinished = true;
- self._loadInProgress = false;
- var item = self._getItemByIdentity(keywordArgs.identity);
- if(keywordArgs.onItem){
- keywordArgs.onItem.call(scope, item);
- }
- self._handleQueuedFetches();
- }catch(error){
- self._loadInProgress = false;
- if(keywordArgs.onError){
- keywordArgs.onError.call(scope, error);
- }
- }
- });
- getHandler.addErrback(function(error){
- self._loadInProgress = false;
- if(keywordArgs.onError){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- keywordArgs.onError.call(scope, error);
- }
- });
- }
-
- }else if(this._jsonData){
- // Passed in data, no need to xhr.
- self._getItemsFromLoadedData(self._jsonData);
- self._jsonData = null;
- self._loadFinished = true;
- var item = self._getItemByIdentity(keywordArgs.identity);
- if(keywordArgs.onItem){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- keywordArgs.onItem.call(scope, item);
- }
- }
- }else{
- // Already loaded. We can just look it up and call back.
- var item = this._getItemByIdentity(keywordArgs.identity);
- if(keywordArgs.onItem){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- keywordArgs.onItem.call(scope, item);
- }
- }
- },
-
- _getItemByIdentity: function(/* Object */ identity){
- // summary:
- // Internal function to look an item up by its identity map.
- var item = null;
- if(this._itemsByIdentity){
- item = this._itemsByIdentity[identity];
- }else{
- item = this._arrayOfAllItems[identity];
- }
- if(item === undefined){
- item = null;
- }
- return item; // Object
- },
-
- getIdentityAttributes: function(/* item */ item){
- // summary:
- // See dojo.data.api.Identity.getIdentifierAttributes()
-
- var identifier = this._features['dojo.data.api.Identity'];
- if(identifier === Number){
- // If (identifier === Number) it means getIdentity() just returns
- // an integer item-number for each item. The dojo.data.api.Identity
- // spec says we need to return null if the identity is not composed
- // of attributes
- return null; // null
- }else{
- return [identifier]; // Array
- }
- },
-
- _forceLoad: function(){
- // summary:
- // Internal function to force a load of the store if it hasn't occurred yet. This is required
- // for specific functions to work properly.
- var self = this;
- if(this._jsonFileUrl){
- var getArgs = {
- url: self._jsonFileUrl,
- handleAs: "json-comment-optional",
- sync: true
- };
- var getHandler = dojo.xhrGet(getArgs);
- getHandler.addCallback(function(data){
- try{
- //Check to be sure there wasn't another load going on concurrently
- //So we don't clobber data that comes in on it. If there is a load going on
- //then do not save this data. It will potentially clobber current data.
- //We mainly wanted to sync/wait here.
- //TODO: Revisit the loading scheme of this store to improve multi-initial
- //request handling.
- if (self._loadInProgress !== true && !self._loadFinished) {
- self._getItemsFromLoadedData(data);
- self._loadFinished = true;
- }
- }catch(e){
- console.log(e);
- throw e;
- }
- });
- getHandler.addErrback(function(error){
- throw error;
- });
- }else if(this._jsonData){
- self._getItemsFromLoadedData(self._jsonData);
- self._jsonData = null;
- self._loadFinished = true;
- }
- }
+dojo.declare("dojo.data.ItemFileReadStore",null,{constructor:function(_1){
+this._arrayOfAllItems=[];
+this._arrayOfTopLevelItems=[];
+this._loadFinished=false;
+this._jsonFileUrl=_1.url;
+this._ccUrl=_1.url;
+this.url=_1.url;
+this._jsonData=_1.data;
+this.data=null;
+this._datatypeMap=_1.typeMap||{};
+if(!this._datatypeMap["Date"]){
+this._datatypeMap["Date"]={type:Date,deserialize:function(_2){
+return dojo.date.stamp.fromISOString(_2);
+}};
+}
+this._features={"dojo.data.api.Read":true,"dojo.data.api.Identity":true};
+this._itemsByIdentity=null;
+this._storeRefPropName="_S";
+this._itemNumPropName="_0";
+this._rootItemPropName="_RI";
+this._reverseRefMap="_RRM";
+this._loadInProgress=false;
+this._queuedFetches=[];
+if(_1.urlPreventCache!==undefined){
+this.urlPreventCache=_1.urlPreventCache?true:false;
+}
+if(_1.hierarchical!==undefined){
+this.hierarchical=_1.hierarchical?true:false;
+}
+if(_1.clearOnClose){
+this.clearOnClose=true;
+}
+if("failOk" in _1){
+this.failOk=_1.failOk?true:false;
+}
+},url:"",_ccUrl:"",data:null,typeMap:null,clearOnClose:false,urlPreventCache:false,failOk:false,hierarchical:true,_assertIsItem:function(_3){
+if(!this.isItem(_3)){
+throw new Error("dojo.data.ItemFileReadStore: Invalid item argument.");
+}
+},_assertIsAttribute:function(_4){
+if(typeof _4!=="string"){
+throw new Error("dojo.data.ItemFileReadStore: Invalid attribute argument.");
+}
+},getValue:function(_5,_6,_7){
+var _8=this.getValues(_5,_6);
+return (_8.length>0)?_8[0]:_7;
+},getValues:function(_9,_a){
+this._assertIsItem(_9);
+this._assertIsAttribute(_a);
+return _9[_a]||[];
+},getAttributes:function(_b){
+this._assertIsItem(_b);
+var _c=[];
+for(var _d in _b){
+if((_d!==this._storeRefPropName)&&(_d!==this._itemNumPropName)&&(_d!==this._rootItemPropName)&&(_d!==this._reverseRefMap)){
+_c.push(_d);
+}
+}
+return _c;
+},hasAttribute:function(_e,_f){
+this._assertIsItem(_e);
+this._assertIsAttribute(_f);
+return (_f in _e);
+},containsValue:function(_10,_11,_12){
+var _13=undefined;
+if(typeof _12==="string"){
+_13=dojo.data.util.filter.patternToRegExp(_12,false);
+}
+return this._containsValue(_10,_11,_12,_13);
+},_containsValue:function(_14,_15,_16,_17){
+return dojo.some(this.getValues(_14,_15),function(_18){
+if(_18!==null&&!dojo.isObject(_18)&&_17){
+if(_18.toString().match(_17)){
+return true;
+}
+}else{
+if(_16===_18){
+return true;
+}
+}
+});
+},isItem:function(_19){
+if(_19&&_19[this._storeRefPropName]===this){
+if(this._arrayOfAllItems[_19[this._itemNumPropName]]===_19){
+return true;
+}
+}
+return false;
+},isItemLoaded:function(_1a){
+return this.isItem(_1a);
+},loadItem:function(_1b){
+this._assertIsItem(_1b.item);
+},getFeatures:function(){
+return this._features;
+},getLabel:function(_1c){
+if(this._labelAttr&&this.isItem(_1c)){
+return this.getValue(_1c,this._labelAttr);
+}
+return undefined;
+},getLabelAttributes:function(_1d){
+if(this._labelAttr){
+return [this._labelAttr];
+}
+return null;
+},_fetchItems:function(_1e,_1f,_20){
+var _21=this;
+var _22=function(_23,_24){
+var _25=[];
+var i,key;
+if(_23.query){
+var _26;
+var _27=_23.queryOptions?_23.queryOptions.ignoreCase:false;
+var _28={};
+for(key in _23.query){
+_26=_23.query[key];
+if(typeof _26==="string"){
+_28[key]=dojo.data.util.filter.patternToRegExp(_26,_27);
+}else{
+if(_26 instanceof RegExp){
+_28[key]=_26;
+}
+}
+}
+for(i=0;i<_24.length;++i){
+var _29=true;
+var _2a=_24[i];
+if(_2a===null){
+_29=false;
+}else{
+for(key in _23.query){
+_26=_23.query[key];
+if(!_21._containsValue(_2a,key,_26,_28[key])){
+_29=false;
+}
+}
+}
+if(_29){
+_25.push(_2a);
+}
+}
+_1f(_25,_23);
+}else{
+for(i=0;i<_24.length;++i){
+var _2b=_24[i];
+if(_2b!==null){
+_25.push(_2b);
+}
+}
+_1f(_25,_23);
+}
+};
+if(this._loadFinished){
+_22(_1e,this._getItemsArray(_1e.queryOptions));
+}else{
+if(this._jsonFileUrl!==this._ccUrl){
+dojo.deprecated("dojo.data.ItemFileReadStore: ","To change the url, set the url property of the store,"+" not _jsonFileUrl. _jsonFileUrl support will be removed in 2.0");
+this._ccUrl=this._jsonFileUrl;
+this.url=this._jsonFileUrl;
+}else{
+if(this.url!==this._ccUrl){
+this._jsonFileUrl=this.url;
+this._ccUrl=this.url;
+}
+}
+if(this.data!=null&&this._jsonData==null){
+this._jsonData=this.data;
+this.data=null;
+}
+if(this._jsonFileUrl){
+if(this._loadInProgress){
+this._queuedFetches.push({args:_1e,filter:_22});
+}else{
+this._loadInProgress=true;
+var _2c={url:_21._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk};
+var _2d=dojo.xhrGet(_2c);
+_2d.addCallback(function(_2e){
+try{
+_21._getItemsFromLoadedData(_2e);
+_21._loadFinished=true;
+_21._loadInProgress=false;
+_22(_1e,_21._getItemsArray(_1e.queryOptions));
+_21._handleQueuedFetches();
+}
+catch(e){
+_21._loadFinished=true;
+_21._loadInProgress=false;
+_20(e,_1e);
+}
+});
+_2d.addErrback(function(_2f){
+_21._loadInProgress=false;
+_20(_2f,_1e);
});
-//Mix in the simple fetch implementation to this class.
+var _30=null;
+if(_1e.abort){
+_30=_1e.abort;
+}
+_1e.abort=function(){
+var df=_2d;
+if(df&&df.fired===-1){
+df.cancel();
+df=null;
+}
+if(_30){
+_30.call(_1e);
+}
+};
+}
+}else{
+if(this._jsonData){
+try{
+this._loadFinished=true;
+this._getItemsFromLoadedData(this._jsonData);
+this._jsonData=null;
+_22(_1e,this._getItemsArray(_1e.queryOptions));
+}
+catch(e){
+_20(e,_1e);
+}
+}else{
+_20(new Error("dojo.data.ItemFileReadStore: No JSON source data was provided as either URL or a nested Javascript object."),_1e);
+}
+}
+}
+},_handleQueuedFetches:function(){
+if(this._queuedFetches.length>0){
+for(var i=0;i<this._queuedFetches.length;i++){
+var _31=this._queuedFetches[i];
+var _32=_31.args;
+var _33=_31.filter;
+if(_33){
+_33(_32,this._getItemsArray(_32.queryOptions));
+}else{
+this.fetchItemByIdentity(_32);
+}
+}
+this._queuedFetches=[];
+}
+},_getItemsArray:function(_34){
+if(_34&&_34.deep){
+return this._arrayOfAllItems;
+}
+return this._arrayOfTopLevelItems;
+},close:function(_35){
+if(this.clearOnClose&&this._loadFinished&&!this._loadInProgress){
+if(((this._jsonFileUrl==""||this._jsonFileUrl==null)&&(this.url==""||this.url==null))&&this.data==null){
+}
+this._arrayOfAllItems=[];
+this._arrayOfTopLevelItems=[];
+this._loadFinished=false;
+this._itemsByIdentity=null;
+this._loadInProgress=false;
+this._queuedFetches=[];
+}
+},_getItemsFromLoadedData:function(_36){
+var _37=false;
+var _38=this;
+function _39(_3a){
+var _3b=((_3a!==null)&&(typeof _3a==="object")&&(!dojo.isArray(_3a)||_37)&&(!dojo.isFunction(_3a))&&(_3a.constructor==Object||dojo.isArray(_3a))&&(typeof _3a._reference==="undefined")&&(typeof _3a._type==="undefined")&&(typeof _3a._value==="undefined")&&_38.hierarchical);
+return _3b;
+};
+function _3c(_3d){
+_38._arrayOfAllItems.push(_3d);
+for(var _3e in _3d){
+var _3f=_3d[_3e];
+if(_3f){
+if(dojo.isArray(_3f)){
+var _40=_3f;
+for(var k=0;k<_40.length;++k){
+var _41=_40[k];
+if(_39(_41)){
+_3c(_41);
+}
+}
+}else{
+if(_39(_3f)){
+_3c(_3f);
+}
+}
+}
+}
+};
+this._labelAttr=_36.label;
+var i;
+var _42;
+this._arrayOfAllItems=[];
+this._arrayOfTopLevelItems=_36.items;
+for(i=0;i<this._arrayOfTopLevelItems.length;++i){
+_42=this._arrayOfTopLevelItems[i];
+if(dojo.isArray(_42)){
+_37=true;
+}
+_3c(_42);
+_42[this._rootItemPropName]=true;
+}
+var _43={};
+var key;
+for(i=0;i<this._arrayOfAllItems.length;++i){
+_42=this._arrayOfAllItems[i];
+for(key in _42){
+if(key!==this._rootItemPropName){
+var _44=_42[key];
+if(_44!==null){
+if(!dojo.isArray(_44)){
+_42[key]=[_44];
+}
+}else{
+_42[key]=[null];
+}
+}
+_43[key]=key;
+}
+}
+while(_43[this._storeRefPropName]){
+this._storeRefPropName+="_";
+}
+while(_43[this._itemNumPropName]){
+this._itemNumPropName+="_";
+}
+while(_43[this._reverseRefMap]){
+this._reverseRefMap+="_";
+}
+var _45;
+var _46=_36.identifier;
+if(_46){
+this._itemsByIdentity={};
+this._features["dojo.data.api.Identity"]=_46;
+for(i=0;i<this._arrayOfAllItems.length;++i){
+_42=this._arrayOfAllItems[i];
+_45=_42[_46];
+var _47=_45[0];
+if(!this._itemsByIdentity[_47]){
+this._itemsByIdentity[_47]=_42;
+}else{
+if(this._jsonFileUrl){
+throw new Error("dojo.data.ItemFileReadStore: The json data as specified by: ["+this._jsonFileUrl+"] is malformed. Items within the list have identifier: ["+_46+"]. Value collided: ["+_47+"]");
+}else{
+if(this._jsonData){
+throw new Error("dojo.data.ItemFileReadStore: The json data provided by the creation arguments is malformed. Items within the list have identifier: ["+_46+"]. Value collided: ["+_47+"]");
+}
+}
+}
+}
+}else{
+this._features["dojo.data.api.Identity"]=Number;
+}
+for(i=0;i<this._arrayOfAllItems.length;++i){
+_42=this._arrayOfAllItems[i];
+_42[this._storeRefPropName]=this;
+_42[this._itemNumPropName]=i;
+}
+for(i=0;i<this._arrayOfAllItems.length;++i){
+_42=this._arrayOfAllItems[i];
+for(key in _42){
+_45=_42[key];
+for(var j=0;j<_45.length;++j){
+_44=_45[j];
+if(_44!==null&&typeof _44=="object"){
+if(("_type" in _44)&&("_value" in _44)){
+var _48=_44._type;
+var _49=this._datatypeMap[_48];
+if(!_49){
+throw new Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+_48+"'");
+}else{
+if(dojo.isFunction(_49)){
+_45[j]=new _49(_44._value);
+}else{
+if(dojo.isFunction(_49.deserialize)){
+_45[j]=_49.deserialize(_44._value);
+}else{
+throw new Error("dojo.data.ItemFileReadStore: Value provided in typeMap was neither a constructor, nor a an object with a deserialize function");
+}
+}
+}
+}
+if(_44._reference){
+var _4a=_44._reference;
+if(!dojo.isObject(_4a)){
+_45[j]=this._itemsByIdentity[_4a];
+}else{
+for(var k=0;k<this._arrayOfAllItems.length;++k){
+var _4b=this._arrayOfAllItems[k];
+var _4c=true;
+for(var _4d in _4a){
+if(_4b[_4d]!=_4a[_4d]){
+_4c=false;
+}
+}
+if(_4c){
+_45[j]=_4b;
+}
+}
+}
+if(this.referenceIntegrity){
+var _4e=_45[j];
+if(this.isItem(_4e)){
+this._addReferenceToMap(_4e,_42,key);
+}
+}
+}else{
+if(this.isItem(_44)){
+if(this.referenceIntegrity){
+this._addReferenceToMap(_44,_42,key);
+}
+}
+}
+}
+}
+}
+}
+},_addReferenceToMap:function(_4f,_50,_51){
+},getIdentity:function(_52){
+var _53=this._features["dojo.data.api.Identity"];
+if(_53===Number){
+return _52[this._itemNumPropName];
+}else{
+var _54=_52[_53];
+if(_54){
+return _54[0];
+}
+}
+return null;
+},fetchItemByIdentity:function(_55){
+var _56;
+var _57;
+if(!this._loadFinished){
+var _58=this;
+if(this._jsonFileUrl!==this._ccUrl){
+dojo.deprecated("dojo.data.ItemFileReadStore: ","To change the url, set the url property of the store,"+" not _jsonFileUrl. _jsonFileUrl support will be removed in 2.0");
+this._ccUrl=this._jsonFileUrl;
+this.url=this._jsonFileUrl;
+}else{
+if(this.url!==this._ccUrl){
+this._jsonFileUrl=this.url;
+this._ccUrl=this.url;
+}
+}
+if(this.data!=null&&this._jsonData==null){
+this._jsonData=this.data;
+this.data=null;
+}
+if(this._jsonFileUrl){
+if(this._loadInProgress){
+this._queuedFetches.push({args:_55});
+}else{
+this._loadInProgress=true;
+var _59={url:_58._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk};
+var _5a=dojo.xhrGet(_59);
+_5a.addCallback(function(_5b){
+var _5c=_55.scope?_55.scope:dojo.global;
+try{
+_58._getItemsFromLoadedData(_5b);
+_58._loadFinished=true;
+_58._loadInProgress=false;
+_56=_58._getItemByIdentity(_55.identity);
+if(_55.onItem){
+_55.onItem.call(_5c,_56);
+}
+_58._handleQueuedFetches();
+}
+catch(error){
+_58._loadInProgress=false;
+if(_55.onError){
+_55.onError.call(_5c,error);
+}
+}
+});
+_5a.addErrback(function(_5d){
+_58._loadInProgress=false;
+if(_55.onError){
+var _5e=_55.scope?_55.scope:dojo.global;
+_55.onError.call(_5e,_5d);
+}
+});
+}
+}else{
+if(this._jsonData){
+_58._getItemsFromLoadedData(_58._jsonData);
+_58._jsonData=null;
+_58._loadFinished=true;
+_56=_58._getItemByIdentity(_55.identity);
+if(_55.onItem){
+_57=_55.scope?_55.scope:dojo.global;
+_55.onItem.call(_57,_56);
+}
+}
+}
+}else{
+_56=this._getItemByIdentity(_55.identity);
+if(_55.onItem){
+_57=_55.scope?_55.scope:dojo.global;
+_55.onItem.call(_57,_56);
+}
+}
+},_getItemByIdentity:function(_5f){
+var _60=null;
+if(this._itemsByIdentity){
+_60=this._itemsByIdentity[_5f];
+}else{
+_60=this._arrayOfAllItems[_5f];
+}
+if(_60===undefined){
+_60=null;
+}
+return _60;
+},getIdentityAttributes:function(_61){
+var _62=this._features["dojo.data.api.Identity"];
+if(_62===Number){
+return null;
+}else{
+return [_62];
+}
+},_forceLoad:function(){
+var _63=this;
+if(this._jsonFileUrl!==this._ccUrl){
+dojo.deprecated("dojo.data.ItemFileReadStore: ","To change the url, set the url property of the store,"+" not _jsonFileUrl. _jsonFileUrl support will be removed in 2.0");
+this._ccUrl=this._jsonFileUrl;
+this.url=this._jsonFileUrl;
+}else{
+if(this.url!==this._ccUrl){
+this._jsonFileUrl=this.url;
+this._ccUrl=this.url;
+}
+}
+if(this.data!=null&&this._jsonData==null){
+this._jsonData=this.data;
+this.data=null;
+}
+if(this._jsonFileUrl){
+var _64={url:this._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk,sync:true};
+var _65=dojo.xhrGet(_64);
+_65.addCallback(function(_66){
+try{
+if(_63._loadInProgress!==true&&!_63._loadFinished){
+_63._getItemsFromLoadedData(_66);
+_63._loadFinished=true;
+}else{
+if(_63._loadInProgress){
+throw new Error("dojo.data.ItemFileReadStore: Unable to perform a synchronous load, an async load is in progress.");
+}
+}
+}
+catch(e){
+throw e;
+}
+});
+_65.addErrback(function(_67){
+throw _67;
+});
+}else{
+if(this._jsonData){
+_63._getItemsFromLoadedData(_63._jsonData);
+_63._jsonData=null;
+_63._loadFinished=true;
+}
+}
+}});
dojo.extend(dojo.data.ItemFileReadStore,dojo.data.util.simpleFetch);
-
}
diff --git a/js/dojo/dojo/data/ItemFileWriteStore.js b/js/dojo/dojo/data/ItemFileWriteStore.js
--- a/js/dojo/dojo/data/ItemFileWriteStore.js
+++ b/js/dojo/dojo/data/ItemFileWriteStore.js
@@ -1,547 +1,511 @@
-if(!dojo._hasResource["dojo.data.ItemFileWriteStore"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.data.ItemFileWriteStore"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo.data.ItemFileWriteStore"]){
+dojo._hasResource["dojo.data.ItemFileWriteStore"]=true;
dojo.provide("dojo.data.ItemFileWriteStore");
dojo.require("dojo.data.ItemFileReadStore");
-
-dojo.declare("dojo.data.ItemFileWriteStore", dojo.data.ItemFileReadStore, {
- constructor: function(/* object */ keywordParameters){
- // keywordParameters: {typeMap: object)
- // The structure of the typeMap object is as follows:
- // {
- // type0: function || object,
- // type1: function || object,
- // ...
- // typeN: function || object
- // }
- // Where if it is a function, it is assumed to be an object constructor that takes the
- // value of _value as the initialization parameters. It is serialized assuming object.toString()
- // serialization. If it is an object, then it is assumed
- // to be an object of general form:
- // {
- // type: function, //constructor.
- // deserialize: function(value) //The function that parses the value and constructs the object defined by type appropriately.
- // serialize: function(object) //The function that converts the object back into the proper file format form.
- // }
-
- // ItemFileWriteStore extends ItemFileReadStore to implement these additional dojo.data APIs
- this._features['dojo.data.api.Write'] = true;
- this._features['dojo.data.api.Notification'] = true;
-
- // For keeping track of changes so that we can implement isDirty and revert
- this._pending = {
- _newItems:{},
- _modifiedItems:{},
- _deletedItems:{}
- };
-
- if(!this._datatypeMap['Date'].serialize){
- this._datatypeMap['Date'].serialize = function(obj){
- return dojo.date.stamp.toISOString(obj, {zulu:true});
- }
- }
-
- // this._saveInProgress is set to true, briefly, from when save() is first called to when it completes
- this._saveInProgress = false;
- },
-
- _assert: function(/* boolean */ condition){
- if(!condition) {
- throw new Error("assertion failed in ItemFileWriteStore");
- }
- },
-
- _getIdentifierAttribute: function(){
- var identifierAttribute = this.getFeatures()['dojo.data.api.Identity'];
- // this._assert((identifierAttribute === Number) || (dojo.isString(identifierAttribute)));
- return identifierAttribute;
- },
-
-
-/* dojo.data.api.Write */
-
- newItem: function(/* Object? */ keywordArgs, /* Object? */ parentInfo){
- // summary: See dojo.data.api.Write.newItem()
-
- this._assert(!this._saveInProgress);
-
- if (!this._loadFinished){
- // We need to do this here so that we'll be able to find out what
- // identifierAttribute was specified in the data file.
- this._forceLoad();
- }
-
- if(typeof keywordArgs != "object" && typeof keywordArgs != "undefined"){
- throw new Error("newItem() was passed something other than an object");
- }
- var newIdentity = null;
- var identifierAttribute = this._getIdentifierAttribute();
- if(identifierAttribute === Number){
- newIdentity = this._arrayOfAllItems.length;
- }else{
- newIdentity = keywordArgs[identifierAttribute];
- if (typeof newIdentity === "undefined"){
- throw new Error("newItem() was not passed an identity for the new item");
- }
- if (dojo.isArray(newIdentity)){
- throw new Error("newItem() was not passed an single-valued identity");
- }
- }
-
- // make sure this identity is not already in use by another item, if identifiers were
- // defined in the file. Otherwise it would be the item count,
- // which should always be unique in this case.
- if(this._itemsByIdentity){
- this._assert(typeof this._itemsByIdentity[newIdentity] === "undefined");
- }
- this._assert(typeof this._pending._newItems[newIdentity] === "undefined");
- this._assert(typeof this._pending._deletedItems[newIdentity] === "undefined");
-
- var newItem = {};
- newItem[this._storeRefPropName] = this;
- newItem[this._itemNumPropName] = this._arrayOfAllItems.length;
- if(this._itemsByIdentity){
- this._itemsByIdentity[newIdentity] = newItem;
- }
- this._arrayOfAllItems.push(newItem);
-
- //We need to construct some data for the onNew call too...
- var pInfo = null;
-
- // Now we need to check to see where we want to assign this thingm if any.
- if(parentInfo && parentInfo.parent && parentInfo.attribute){
- pInfo = {
- item: parentInfo.parent,
- attribute: parentInfo.attribute,
- oldValue: undefined
- };
-
- //See if it is multi-valued or not and handle appropriately
- //Generally, all attributes are multi-valued for this store
- //So, we only need to append if there are already values present.
- var values = this.getValues(parentInfo.parent, parentInfo.attribute);
- if(values && values.length > 0){
- var tempValues = values.slice(0, values.length);
- if(values.length === 1){
- pInfo.oldValue = values[0];
- }else{
- pInfo.oldValue = values.slice(0, values.length);
- }
- tempValues.push(newItem);
- this._setValueOrValues(parentInfo.parent, parentInfo.attribute, tempValues, false);
- pInfo.newValue = this.getValues(parentInfo.parent, parentInfo.attribute);
- }else{
- this._setValueOrValues(parentInfo.parent, parentInfo.attribute, newItem, false);
- pInfo.newValue = newItem;
- }
- }else{
- //Toplevel item, add to both top list as well as all list.
- newItem[this._rootItemPropName]=true;
- this._arrayOfTopLevelItems.push(newItem);
- }
-
- this._pending._newItems[newIdentity] = newItem;
-
- //Clone over the properties to the new item
- for(var key in keywordArgs){
- if(key === this._storeRefPropName || key === this._itemNumPropName){
- // Bummer, the user is trying to do something like
- // newItem({_S:"foo"}). Unfortunately, our superclass,
- // ItemFileReadStore, is already using _S in each of our items
- // to hold private info. To avoid a naming collision, we
- // need to move all our private info to some other property
- // of all the items/objects. So, we need to iterate over all
- // the items and do something like:
- // item.__S = item._S;
- // item._S = undefined;
- // But first we have to make sure the new "__S" variable is
- // not in use, which means we have to iterate over all the
- // items checking for that.
- throw new Error("encountered bug in ItemFileWriteStore.newItem");
- }
- var value = keywordArgs[key];
- if(!dojo.isArray(value)){
- value = [value];
- }
- newItem[key] = value;
- }
- this.onNew(newItem, pInfo); // dojo.data.api.Notification call
- return newItem; // item
- },
-
- _removeArrayElement: function(/* Array */ array, /* anything */ element){
- var index = dojo.indexOf(array, element);
- if (index != -1){
- array.splice(index, 1);
- return true;
- }
- return false;
- },
-
- deleteItem: function(/* item */ item){
- // summary: See dojo.data.api.Write.deleteItem()
- this._assert(!this._saveInProgress);
- this._assertIsItem(item);
-
- // remove this item from the _arrayOfAllItems, but leave a null value in place
- // of the item, so as not to change the length of the array, so that in newItem()
- // we can still safely do: newIdentity = this._arrayOfAllItems.length;
- var indexInArrayOfAllItems = item[this._itemNumPropName];
- this._arrayOfAllItems[indexInArrayOfAllItems] = null;
-
- var identity = this.getIdentity(item);
- item[this._storeRefPropName] = null;
- if(this._itemsByIdentity){
- delete this._itemsByIdentity[identity];
- }
- this._pending._deletedItems[identity] = item;
-
- //Remove from the toplevel items, if necessary...
- if(item[this._rootItemPropName]){
- this._removeArrayElement(this._arrayOfTopLevelItems, item);
- }
- this.onDelete(item); // dojo.data.api.Notification call
- return true;
- },
-
- setValue: function(/* item */ item, /* attribute-name-string */ attribute, /* almost anything */ value){
- // summary: See dojo.data.api.Write.set()
- return this._setValueOrValues(item, attribute, value, true); // boolean
- },
-
- setValues: function(/* item */ item, /* attribute-name-string */ attribute, /* array */ values){
- // summary: See dojo.data.api.Write.setValues()
- return this._setValueOrValues(item, attribute, values, true); // boolean
- },
-
- unsetAttribute: function(/* item */ item, /* attribute-name-string */ attribute){
- // summary: See dojo.data.api.Write.unsetAttribute()
- return this._setValueOrValues(item, attribute, [], true);
- },
-
- _setValueOrValues: function(/* item */ item, /* attribute-name-string */ attribute, /* anything */ newValueOrValues, /*boolean?*/ callOnSet){
- this._assert(!this._saveInProgress);
-
- // Check for valid arguments
- this._assertIsItem(item);
- this._assert(dojo.isString(attribute));
- this._assert(typeof newValueOrValues !== "undefined");
-
- // Make sure the user isn't trying to change the item's identity
- var identifierAttribute = this._getIdentifierAttribute();
- if(attribute == identifierAttribute){
- throw new Error("ItemFileWriteStore does not have support for changing the value of an item's identifier.");
- }
-
- // To implement the Notification API, we need to make a note of what
- // the old attribute value was, so that we can pass that info when
- // we call the onSet method.
- var oldValueOrValues = this._getValueOrValues(item, attribute);
-
- var identity = this.getIdentity(item);
- if(!this._pending._modifiedItems[identity]){
- // Before we actually change the item, we make a copy of it to
- // record the original state, so that we'll be able to revert if
- // the revert method gets called. If the item has already been
- // modified then there's no need to do this now, since we already
- // have a record of the original state.
- var copyOfItemState = {};
- for(var key in item){
- if((key === this._storeRefPropName) || (key === this._itemNumPropName) || (key === this._rootItemPropName)){
- copyOfItemState[key] = item[key];
- }else{
- var valueArray = item[key];
- var copyOfValueArray = [];
- for(var i = 0; i < valueArray.length; ++i){
- copyOfValueArray.push(valueArray[i]);
- }
- copyOfItemState[key] = copyOfValueArray;
- }
- }
- // Now mark the item as dirty, and save the copy of the original state
- this._pending._modifiedItems[identity] = copyOfItemState;
- }
-
- // Okay, now we can actually change this attribute on the item
- var success = false;
- if(dojo.isArray(newValueOrValues) && newValueOrValues.length === 0){
- // If we were passed an empty array as the value, that counts
- // as "unsetting" the attribute, so we need to remove this
- // attribute from the item.
- success = delete item[attribute];
- newValueOrValues = undefined; // used in the onSet Notification call below
- }else{
- var newValueArray = [];
- if(dojo.isArray(newValueOrValues)){
- var newValues = newValueOrValues;
- // Unforunately, it's not safe to just do this:
- // newValueArray = newValues;
- // Instead, we need to take each value in the values array and copy
- // it into the new array, so that our internal data structure won't
- // get corrupted if the user mucks with the values array *after*
- // calling setValues().
- for(var j = 0; j < newValues.length; ++j){
- newValueArray.push(newValues[j]);
- }
- }else{
- var newValue = newValueOrValues;
- newValueArray.push(newValue);
- }
- item[attribute] = newValueArray;
- success = true;
- }
-
- // Now we make the dojo.data.api.Notification call
- if(callOnSet){
- this.onSet(item, attribute, oldValueOrValues, newValueOrValues);
- }
- return success; // boolean
- },
-
- _getValueOrValues: function(/* item */ item, /* attribute-name-string */ attribute){
- var valueOrValues = undefined;
- if(this.hasAttribute(item, attribute)){
- var valueArray = this.getValues(item, attribute);
- if(valueArray.length == 1){
- valueOrValues = valueArray[0];
- }else{
- valueOrValues = valueArray;
- }
- }
- return valueOrValues;
- },
-
- _flatten: function(/* anything */ value){
- if(this.isItem(value)){
- var item = value;
- // Given an item, return an serializable object that provides a
- // reference to the item.
- // For example, given kermit:
- // var kermit = store.newItem({id:2, name:"Kermit"});
- // we want to return
- // {_reference:2}
- var identity = this.getIdentity(item);
- var referenceObject = {_reference: identity};
- return referenceObject;
- }else{
- if(typeof value === "object"){
- for(type in this._datatypeMap){
- var typeMap = this._datatypeMap[type];
- if (dojo.isObject(typeMap) && !dojo.isFunction(typeMap)){
- if(value instanceof typeMap.type){
- if(!typeMap.serialize){
- throw new Error("ItemFileWriteStore: No serializer defined for type mapping: [" + type + "]");
- }
- return {_type: type, _value: typeMap.serialize(value)};
- }
- } else if(value instanceof typeMap){
- //SImple mapping, therefore, return as a toString serialization.
- return {_type: type, _value: value.toString()};
- }
- }
- }
- return value;
- }
- },
-
- _getNewFileContentString: function(){
- // summary:
- // Generate a string that can be saved to a file.
- // The result should look similar to:
- // http://trac.dojotoolkit.org/browser/dojo/trunk/tests/data/countries.json
- var serializableStructure = {};
-
- var identifierAttribute = this._getIdentifierAttribute();
- if(identifierAttribute !== Number){
- serializableStructure.identifier = identifierAttribute;
- }
- if(this._labelAttr){
- serializableStructure.label = this._labelAttr;
- }
- serializableStructure.items = [];
- for(var i = 0; i < this._arrayOfAllItems.length; ++i){
- var item = this._arrayOfAllItems[i];
- if(item !== null){
- serializableItem = {};
- for(var key in item){
- if(key !== this._storeRefPropName && key !== this._itemNumPropName){
- var attribute = key;
- var valueArray = this.getValues(item, attribute);
- if(valueArray.length == 1){
- serializableItem[attribute] = this._flatten(valueArray[0]);
- }else{
- var serializableArray = [];
- for(var j = 0; j < valueArray.length; ++j){
- serializableArray.push(this._flatten(valueArray[j]));
- serializableItem[attribute] = serializableArray;
- }
- }
- }
- }
- serializableStructure.items.push(serializableItem);
- }
- }
- var prettyPrint = true;
- return dojo.toJson(serializableStructure, prettyPrint);
- },
-
- save: function(/* object */ keywordArgs){
- // summary: See dojo.data.api.Write.save()
- this._assert(!this._saveInProgress);
-
- // this._saveInProgress is set to true, briefly, from when save is first called to when it completes
- this._saveInProgress = true;
-
- var self = this;
- var saveCompleteCallback = function(){
- self._pending = {
- _newItems:{},
- _modifiedItems:{},
- _deletedItems:{}
- };
- self._saveInProgress = false; // must come after this._pending is cleared, but before any callbacks
- if(keywordArgs && keywordArgs.onComplete){
- var scope = keywordArgs.scope || dojo.global;
- keywordArgs.onComplete.call(scope);
- }
- };
- var saveFailedCallback = function(){
- self._saveInProgress = false;
- if(keywordArgs && keywordArgs.onError){
- var scope = keywordArgs.scope || dojo.global;
- keywordArgs.onError.call(scope);
- }
- };
-
- if(this._saveEverything){
- var newFileContentString = this._getNewFileContentString();
- this._saveEverything(saveCompleteCallback, saveFailedCallback, newFileContentString);
- }
- if(this._saveCustom){
- this._saveCustom(saveCompleteCallback, saveFailedCallback);
- }
- if(!this._saveEverything && !this._saveCustom){
- // Looks like there is no user-defined save-handler function.
- // That's fine, it just means the datastore is acting as a "mock-write"
- // store -- changes get saved in memory but don't get saved to disk.
- saveCompleteCallback();
- }
- },
-
- revert: function(){
- // summary: See dojo.data.api.Write.revert()
- this._assert(!this._saveInProgress);
-
- var identity;
- for(identity in this._pending._newItems){
- var newItem = this._pending._newItems[identity];
- newItem[this._storeRefPropName] = null;
- // null out the new item, but don't change the array index so
- // so we can keep using _arrayOfAllItems.length.
- this._arrayOfAllItems[newItem[this._itemNumPropName]] = null;
- if(newItem[this._rootItemPropName]){
- this._removeArrayElement(this._arrayOfTopLevelItems, newItem);
- }
- if(this._itemsByIdentity){
- delete this._itemsByIdentity[identity];
- }
- }
- for(identity in this._pending._modifiedItems){
- // find the original item and the modified item that replaced it
- var originalItem = this._pending._modifiedItems[identity];
- var modifiedItem = null;
- if(this._itemsByIdentity){
- modifiedItem = this._itemsByIdentity[identity];
- }else{
- modifiedItem = this._arrayOfAllItems[identity];
- }
-
- // make the original item into a full-fledged item again
- originalItem[this._storeRefPropName] = this;
- modifiedItem[this._storeRefPropName] = null;
-
- // replace the modified item with the original one
- var arrayIndex = modifiedItem[this._itemNumPropName];
- this._arrayOfAllItems[arrayIndex] = originalItem;
-
- if(modifiedItem[this._rootItemPropName]){
- arrayIndex = modifiedItem[this._itemNumPropName];
- this._arrayOfTopLevelItems[arrayIndex] = originalItem;
- }
- if(this._itemsByIdentity){
- this._itemsByIdentity[identity] = originalItem;
- }
- }
- for(identity in this._pending._deletedItems){
- var deletedItem = this._pending._deletedItems[identity];
- deletedItem[this._storeRefPropName] = this;
- var index = deletedItem[this._itemNumPropName];
- this._arrayOfAllItems[index] = deletedItem;
- if (this._itemsByIdentity) {
- this._itemsByIdentity[identity] = deletedItem;
- }
- if(deletedItem[this._rootItemPropName]){
- this._arrayOfTopLevelItems.push(deletedItem);
- }
- }
- this._pending = {
- _newItems:{},
- _modifiedItems:{},
- _deletedItems:{}
- };
- return true; // boolean
- },
-
- isDirty: function(/* item? */ item){
- // summary: See dojo.data.api.Write.isDirty()
- if(item){
- // return true if the item is dirty
- var identity = this.getIdentity(item);
- return new Boolean(this._pending._newItems[identity] ||
- this._pending._modifiedItems[identity] ||
- this._pending._deletedItems[identity]); // boolean
- }else{
- // return true if the store is dirty -- which means return true
- // if there are any new items, dirty items, or modified items
- var key;
- for(key in this._pending._newItems){
- return true;
- }
- for(key in this._pending._modifiedItems){
- return true;
- }
- for(key in this._pending._deletedItems){
- return true;
- }
- return false; // boolean
- }
- },
-
-/* dojo.data.api.Notification */
-
- onSet: function(/* item */ item,
- /*attribute-name-string*/ attribute,
- /*object | array*/ oldValue,
- /*object | array*/ newValue){
- // summary: See dojo.data.api.Notification.onSet()
-
- // No need to do anything. This method is here just so that the
- // client code can connect observers to it.
- },
-
- onNew: function(/* item */ newItem, /*object?*/ parentInfo){
- // summary: See dojo.data.api.Notification.onNew()
-
- // No need to do anything. This method is here just so that the
- // client code can connect observers to it.
- },
-
- onDelete: function(/* item */ deletedItem){
- // summary: See dojo.data.api.Notification.onDelete()
-
- // No need to do anything. This method is here just so that the
- // client code can connect observers to it.
- }
-
-});
-
+dojo.declare("dojo.data.ItemFileWriteStore",dojo.data.ItemFileReadStore,{constructor:function(_1){
+this._features["dojo.data.api.Write"]=true;
+this._features["dojo.data.api.Notification"]=true;
+this._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};
+if(!this._datatypeMap["Date"].serialize){
+this._datatypeMap["Date"].serialize=function(_2){
+return dojo.date.stamp.toISOString(_2,{zulu:true});
+};
+}
+if(_1&&(_1.referenceIntegrity===false)){
+this.referenceIntegrity=false;
+}
+this._saveInProgress=false;
+},referenceIntegrity:true,_assert:function(_3){
+if(!_3){
+throw new Error("assertion failed in ItemFileWriteStore");
+}
+},_getIdentifierAttribute:function(){
+var _4=this.getFeatures()["dojo.data.api.Identity"];
+return _4;
+},newItem:function(_5,_6){
+this._assert(!this._saveInProgress);
+if(!this._loadFinished){
+this._forceLoad();
+}
+if(typeof _5!="object"&&typeof _5!="undefined"){
+throw new Error("newItem() was passed something other than an object");
+}
+var _7=null;
+var _8=this._getIdentifierAttribute();
+if(_8===Number){
+_7=this._arrayOfAllItems.length;
+}else{
+_7=_5[_8];
+if(typeof _7==="undefined"){
+throw new Error("newItem() was not passed an identity for the new item");
+}
+if(dojo.isArray(_7)){
+throw new Error("newItem() was not passed an single-valued identity");
+}
+}
+if(this._itemsByIdentity){
+this._assert(typeof this._itemsByIdentity[_7]==="undefined");
+}
+this._assert(typeof this._pending._newItems[_7]==="undefined");
+this._assert(typeof this._pending._deletedItems[_7]==="undefined");
+var _9={};
+_9[this._storeRefPropName]=this;
+_9[this._itemNumPropName]=this._arrayOfAllItems.length;
+if(this._itemsByIdentity){
+this._itemsByIdentity[_7]=_9;
+_9[_8]=[_7];
+}
+this._arrayOfAllItems.push(_9);
+var _a=null;
+if(_6&&_6.parent&&_6.attribute){
+_a={item:_6.parent,attribute:_6.attribute,oldValue:undefined};
+var _b=this.getValues(_6.parent,_6.attribute);
+if(_b&&_b.length>0){
+var _c=_b.slice(0,_b.length);
+if(_b.length===1){
+_a.oldValue=_b[0];
+}else{
+_a.oldValue=_b.slice(0,_b.length);
+}
+_c.push(_9);
+this._setValueOrValues(_6.parent,_6.attribute,_c,false);
+_a.newValue=this.getValues(_6.parent,_6.attribute);
+}else{
+this._setValueOrValues(_6.parent,_6.attribute,_9,false);
+_a.newValue=_9;
+}
+}else{
+_9[this._rootItemPropName]=true;
+this._arrayOfTopLevelItems.push(_9);
+}
+this._pending._newItems[_7]=_9;
+for(var _d in _5){
+if(_d===this._storeRefPropName||_d===this._itemNumPropName){
+throw new Error("encountered bug in ItemFileWriteStore.newItem");
+}
+var _e=_5[_d];
+if(!dojo.isArray(_e)){
+_e=[_e];
+}
+_9[_d]=_e;
+if(this.referenceIntegrity){
+for(var i=0;i<_e.length;i++){
+var _f=_e[i];
+if(this.isItem(_f)){
+this._addReferenceToMap(_f,_9,_d);
+}
+}
+}
+}
+this.onNew(_9,_a);
+return _9;
+},_removeArrayElement:function(_10,_11){
+var _12=dojo.indexOf(_10,_11);
+if(_12!=-1){
+_10.splice(_12,1);
+return true;
+}
+return false;
+},deleteItem:function(_13){
+this._assert(!this._saveInProgress);
+this._assertIsItem(_13);
+var _14=_13[this._itemNumPropName];
+var _15=this.getIdentity(_13);
+if(this.referenceIntegrity){
+var _16=this.getAttributes(_13);
+if(_13[this._reverseRefMap]){
+_13["backup_"+this._reverseRefMap]=dojo.clone(_13[this._reverseRefMap]);
+}
+dojo.forEach(_16,function(_17){
+dojo.forEach(this.getValues(_13,_17),function(_18){
+if(this.isItem(_18)){
+if(!_13["backupRefs_"+this._reverseRefMap]){
+_13["backupRefs_"+this._reverseRefMap]=[];
+}
+_13["backupRefs_"+this._reverseRefMap].push({id:this.getIdentity(_18),attr:_17});
+this._removeReferenceFromMap(_18,_13,_17);
+}
+},this);
+},this);
+var _19=_13[this._reverseRefMap];
+if(_19){
+for(var _1a in _19){
+var _1b=null;
+if(this._itemsByIdentity){
+_1b=this._itemsByIdentity[_1a];
+}else{
+_1b=this._arrayOfAllItems[_1a];
+}
+if(_1b){
+for(var _1c in _19[_1a]){
+var _1d=this.getValues(_1b,_1c)||[];
+var _1e=dojo.filter(_1d,function(_1f){
+return !(this.isItem(_1f)&&this.getIdentity(_1f)==_15);
+},this);
+this._removeReferenceFromMap(_13,_1b,_1c);
+if(_1e.length<_1d.length){
+this._setValueOrValues(_1b,_1c,_1e,true);
+}
+}
+}
+}
+}
+}
+this._arrayOfAllItems[_14]=null;
+_13[this._storeRefPropName]=null;
+if(this._itemsByIdentity){
+delete this._itemsByIdentity[_15];
+}
+this._pending._deletedItems[_15]=_13;
+if(_13[this._rootItemPropName]){
+this._removeArrayElement(this._arrayOfTopLevelItems,_13);
+}
+this.onDelete(_13);
+return true;
+},setValue:function(_20,_21,_22){
+return this._setValueOrValues(_20,_21,_22,true);
+},setValues:function(_23,_24,_25){
+return this._setValueOrValues(_23,_24,_25,true);
+},unsetAttribute:function(_26,_27){
+return this._setValueOrValues(_26,_27,[],true);
+},_setValueOrValues:function(_28,_29,_2a,_2b){
+this._assert(!this._saveInProgress);
+this._assertIsItem(_28);
+this._assert(dojo.isString(_29));
+this._assert(typeof _2a!=="undefined");
+var _2c=this._getIdentifierAttribute();
+if(_29==_2c){
+throw new Error("ItemFileWriteStore does not have support for changing the value of an item's identifier.");
+}
+var _2d=this._getValueOrValues(_28,_29);
+var _2e=this.getIdentity(_28);
+if(!this._pending._modifiedItems[_2e]){
+var _2f={};
+for(var key in _28){
+if((key===this._storeRefPropName)||(key===this._itemNumPropName)||(key===this._rootItemPropName)){
+_2f[key]=_28[key];
+}else{
+if(key===this._reverseRefMap){
+_2f[key]=dojo.clone(_28[key]);
+}else{
+_2f[key]=_28[key].slice(0,_28[key].length);
+}
+}
+}
+this._pending._modifiedItems[_2e]=_2f;
+}
+var _30=false;
+if(dojo.isArray(_2a)&&_2a.length===0){
+_30=delete _28[_29];
+_2a=undefined;
+if(this.referenceIntegrity&&_2d){
+var _31=_2d;
+if(!dojo.isArray(_31)){
+_31=[_31];
+}
+for(var i=0;i<_31.length;i++){
+var _32=_31[i];
+if(this.isItem(_32)){
+this._removeReferenceFromMap(_32,_28,_29);
+}
+}
+}
+}else{
+var _33;
+if(dojo.isArray(_2a)){
+var _34=_2a;
+_33=_2a.slice(0,_2a.length);
+}else{
+_33=[_2a];
+}
+if(this.referenceIntegrity){
+if(_2d){
+var _31=_2d;
+if(!dojo.isArray(_31)){
+_31=[_31];
+}
+var map={};
+dojo.forEach(_31,function(_35){
+if(this.isItem(_35)){
+var id=this.getIdentity(_35);
+map[id.toString()]=true;
+}
+},this);
+dojo.forEach(_33,function(_36){
+if(this.isItem(_36)){
+var id=this.getIdentity(_36);
+if(map[id.toString()]){
+delete map[id.toString()];
+}else{
+this._addReferenceToMap(_36,_28,_29);
+}
+}
+},this);
+for(var rId in map){
+var _37;
+if(this._itemsByIdentity){
+_37=this._itemsByIdentity[rId];
+}else{
+_37=this._arrayOfAllItems[rId];
+}
+this._removeReferenceFromMap(_37,_28,_29);
}
+}else{
+for(var i=0;i<_33.length;i++){
+var _32=_33[i];
+if(this.isItem(_32)){
+this._addReferenceToMap(_32,_28,_29);
+}
+}
+}
+}
+_28[_29]=_33;
+_30=true;
+}
+if(_2b){
+this.onSet(_28,_29,_2d,_2a);
+}
+return _30;
+},_addReferenceToMap:function(_38,_39,_3a){
+var _3b=this.getIdentity(_39);
+var _3c=_38[this._reverseRefMap];
+if(!_3c){
+_3c=_38[this._reverseRefMap]={};
+}
+var _3d=_3c[_3b];
+if(!_3d){
+_3d=_3c[_3b]={};
+}
+_3d[_3a]=true;
+},_removeReferenceFromMap:function(_3e,_3f,_40){
+var _41=this.getIdentity(_3f);
+var _42=_3e[this._reverseRefMap];
+var _43;
+if(_42){
+for(_43 in _42){
+if(_43==_41){
+delete _42[_43][_40];
+if(this._isEmpty(_42[_43])){
+delete _42[_43];
+}
+}
+}
+if(this._isEmpty(_42)){
+delete _3e[this._reverseRefMap];
+}
+}
+},_dumpReferenceMap:function(){
+var i;
+for(i=0;i<this._arrayOfAllItems.length;i++){
+var _44=this._arrayOfAllItems[i];
+if(_44&&_44[this._reverseRefMap]){
+}
+}
+},_getValueOrValues:function(_45,_46){
+var _47=undefined;
+if(this.hasAttribute(_45,_46)){
+var _48=this.getValues(_45,_46);
+if(_48.length==1){
+_47=_48[0];
+}else{
+_47=_48;
+}
+}
+return _47;
+},_flatten:function(_49){
+if(this.isItem(_49)){
+var _4a=_49;
+var _4b=this.getIdentity(_4a);
+var _4c={_reference:_4b};
+return _4c;
+}else{
+if(typeof _49==="object"){
+for(var _4d in this._datatypeMap){
+var _4e=this._datatypeMap[_4d];
+if(dojo.isObject(_4e)&&!dojo.isFunction(_4e)){
+if(_49 instanceof _4e.type){
+if(!_4e.serialize){
+throw new Error("ItemFileWriteStore: No serializer defined for type mapping: ["+_4d+"]");
+}
+return {_type:_4d,_value:_4e.serialize(_49)};
+}
+}else{
+if(_49 instanceof _4e){
+return {_type:_4d,_value:_49.toString()};
+}
+}
+}
+}
+return _49;
+}
+},_getNewFileContentString:function(){
+var _4f={};
+var _50=this._getIdentifierAttribute();
+if(_50!==Number){
+_4f.identifier=_50;
+}
+if(this._labelAttr){
+_4f.label=this._labelAttr;
+}
+_4f.items=[];
+for(var i=0;i<this._arrayOfAllItems.length;++i){
+var _51=this._arrayOfAllItems[i];
+if(_51!==null){
+var _52={};
+for(var key in _51){
+if(key!==this._storeRefPropName&&key!==this._itemNumPropName&&key!==this._reverseRefMap&&key!==this._rootItemPropName){
+var _53=key;
+var _54=this.getValues(_51,_53);
+if(_54.length==1){
+_52[_53]=this._flatten(_54[0]);
+}else{
+var _55=[];
+for(var j=0;j<_54.length;++j){
+_55.push(this._flatten(_54[j]));
+_52[_53]=_55;
+}
+}
+}
+}
+_4f.items.push(_52);
+}
+}
+var _56=true;
+return dojo.toJson(_4f,_56);
+},_isEmpty:function(_57){
+var _58=true;
+if(dojo.isObject(_57)){
+var i;
+for(i in _57){
+_58=false;
+break;
+}
+}else{
+if(dojo.isArray(_57)){
+if(_57.length>0){
+_58=false;
+}
+}
+}
+return _58;
+},save:function(_59){
+this._assert(!this._saveInProgress);
+this._saveInProgress=true;
+var _5a=this;
+var _5b=function(){
+_5a._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};
+_5a._saveInProgress=false;
+if(_59&&_59.onComplete){
+var _5c=_59.scope||dojo.global;
+_59.onComplete.call(_5c);
+}
+};
+var _5d=function(err){
+_5a._saveInProgress=false;
+if(_59&&_59.onError){
+var _5e=_59.scope||dojo.global;
+_59.onError.call(_5e,err);
+}
+};
+if(this._saveEverything){
+var _5f=this._getNewFileContentString();
+this._saveEverything(_5b,_5d,_5f);
+}
+if(this._saveCustom){
+this._saveCustom(_5b,_5d);
+}
+if(!this._saveEverything&&!this._saveCustom){
+_5b();
+}
+},revert:function(){
+this._assert(!this._saveInProgress);
+var _60;
+for(_60 in this._pending._modifiedItems){
+var _61=this._pending._modifiedItems[_60];
+var _62=null;
+if(this._itemsByIdentity){
+_62=this._itemsByIdentity[_60];
+}else{
+_62=this._arrayOfAllItems[_60];
+}
+_61[this._storeRefPropName]=this;
+for(key in _62){
+delete _62[key];
+}
+dojo.mixin(_62,_61);
+}
+var _63;
+for(_60 in this._pending._deletedItems){
+_63=this._pending._deletedItems[_60];
+_63[this._storeRefPropName]=this;
+var _64=_63[this._itemNumPropName];
+if(_63["backup_"+this._reverseRefMap]){
+_63[this._reverseRefMap]=_63["backup_"+this._reverseRefMap];
+delete _63["backup_"+this._reverseRefMap];
+}
+this._arrayOfAllItems[_64]=_63;
+if(this._itemsByIdentity){
+this._itemsByIdentity[_60]=_63;
+}
+if(_63[this._rootItemPropName]){
+this._arrayOfTopLevelItems.push(_63);
+}
+}
+for(_60 in this._pending._deletedItems){
+_63=this._pending._deletedItems[_60];
+if(_63["backupRefs_"+this._reverseRefMap]){
+dojo.forEach(_63["backupRefs_"+this._reverseRefMap],function(_65){
+var _66;
+if(this._itemsByIdentity){
+_66=this._itemsByIdentity[_65.id];
+}else{
+_66=this._arrayOfAllItems[_65.id];
+}
+this._addReferenceToMap(_66,_63,_65.attr);
+},this);
+delete _63["backupRefs_"+this._reverseRefMap];
+}
+}
+for(_60 in this._pending._newItems){
+var _67=this._pending._newItems[_60];
+_67[this._storeRefPropName]=null;
+this._arrayOfAllItems[_67[this._itemNumPropName]]=null;
+if(_67[this._rootItemPropName]){
+this._removeArrayElement(this._arrayOfTopLevelItems,_67);
+}
+if(this._itemsByIdentity){
+delete this._itemsByIdentity[_60];
+}
+}
+this._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};
+return true;
+},isDirty:function(_68){
+if(_68){
+var _69=this.getIdentity(_68);
+return new Boolean(this._pending._newItems[_69]||this._pending._modifiedItems[_69]||this._pending._deletedItems[_69]).valueOf();
+}else{
+if(!this._isEmpty(this._pending._newItems)||!this._isEmpty(this._pending._modifiedItems)||!this._isEmpty(this._pending._deletedItems)){
+return true;
+}
+return false;
+}
+},onSet:function(_6a,_6b,_6c,_6d){
+},onNew:function(_6e,_6f){
+},onDelete:function(_70){
+},close:function(_71){
+if(this.clearOnClose){
+if(!this.isDirty()){
+this.inherited(arguments);
+}else{
+throw new Error("dojo.data.ItemFileWriteStore: There are unsaved changes present in the store. Please save or revert the changes before invoking close.");
+}
+}
+}});
+}
diff --git a/js/dojo/dojo/data/api/Identity.js b/js/dojo/dojo/data/api/Identity.js
--- a/js/dojo/dojo/data/api/Identity.js
+++ b/js/dojo/dojo/data/api/Identity.js
@@ -1,107 +1,26 @@
-if(!dojo._hasResource["dojo.data.api.Identity"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.data.api.Identity"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo.data.api.Identity"]){
+dojo._hasResource["dojo.data.api.Identity"]=true;
dojo.provide("dojo.data.api.Identity");
dojo.require("dojo.data.api.Read");
-
-dojo.declare("dojo.data.api.Identity", dojo.data.api.Read, {
- // summary:
- // This is an abstract API that data provider implementations conform to.
- // This file defines methods signatures and intentionally leaves all the
- // methods unimplemented.
-
- getFeatures: function(){
- // summary:
- // See dojo.data.api.Read.getFeatures()
- return {
- 'dojo.data.api.Read': true,
- 'dojo.data.api.Identity': true
- };
- },
-
- getIdentity: function(/* item */ item){
- // summary:
- // Returns a unique identifier for an item. The return value will be
- // either a string or something that has a toString() method (such as,
- // for example, a dojox.uuid.Uuid object).
- // item:
- // The item from the store from which to obtain its identifier.
- // exceptions:
- // Conforming implementations may throw an exception or return null if
- // item is not an item.
- // example:
- // | var itemId = store.getIdentity(kermit);
- // | assert(kermit === store.findByIdentity(store.getIdentity(kermit)));
- throw new Error('Unimplemented API: dojo.data.api.Identity.getIdentity');
- var itemIdentityString = null;
- return itemIdentityString; // string
- },
-
- getIdentityAttributes: function(/* item */ item){
- // summary:
- // Returns an array of attribute names that are used to generate the identity.
- // For most stores, this is a single attribute, but for some complex stores
- // such as RDB backed stores that use compound (multi-attribute) identifiers
- // it can be more than one. If the identity is not composed of attributes
- // on the item, it will return null. This function is intended to identify
- // the attributes that comprise the identity so that so that during a render
- // of all attributes, the UI can hide the the identity information if it
- // chooses.
- // item:
- // The item from the store from which to obtain the array of public attributes that
- // compose the identifier, if any.
- // example:
- // | var itemId = store.getIdentity(kermit);
- // | var identifiers = store.getIdentityAttributes(itemId);
- // | assert(typeof identifiers === "array" || identifiers === null);
- throw new Error('Unimplemented API: dojo.data.api.Identity.getIdentityAttributes');
- return null; // string
- },
-
-
- fetchItemByIdentity: function(/* object */ keywordArgs){
- // summary:
- // Given the identity of an item, this method returns the item that has
- // that identity through the onItem callback. Conforming implementations
- // should return null if there is no item with the given identity.
- // Implementations of fetchItemByIdentity() may sometimes return an item
- // from a local cache and may sometimes fetch an item from a remote server,
- //
- // keywordArgs:
- // An anonymous object that defines the item to locate and callbacks to invoke when the
- // item has been located and load has completed. The format of the object is as follows:
- // {
- // identity: string|object,
- // onItem: Function,
- // onError: Function,
- // scope: object
- // }
- // The *identity* parameter.
- // The identity parameter is the identity of the item you wish to locate and load
- // This attribute is required. It should be a string or an object that toString()
- // can be called on.
- //
- // The *onItem* parameter.
- // Function(item)
- // The onItem parameter is the callback to invoke when the item has been loaded. It takes only one
- // parameter, the item located, or null if none found.
- //
- // The *onError* parameter.
- // Function(error)
- // The onError parameter is the callback to invoke when the item load encountered an error. It takes only one
- // parameter, the error object
- //
- // The *scope* parameter.
- // If a scope object is provided, all of the callback functions (onItem,
- // onError, etc) will be invoked in the context of the scope object.
- // In the body of the callback function, the value of the "this"
- // keyword will be the scope object. If no scope object is provided,
- // the callback functions will be called in the context of dojo.global.
- // For example, onItem.call(scope, item, request) vs.
- // onItem.call(dojo.global, item, request)
- if (!this.isItemLoaded(keywordArgs.item)) {
- throw new Error('Unimplemented API: dojo.data.api.Identity.fetchItemByIdentity');
- }
- }
-});
-
+dojo.declare("dojo.data.api.Identity",dojo.data.api.Read,{getFeatures:function(){
+return {"dojo.data.api.Read":true,"dojo.data.api.Identity":true};
+},getIdentity:function(_1){
+throw new Error("Unimplemented API: dojo.data.api.Identity.getIdentity");
+var _2=null;
+return _2;
+},getIdentityAttributes:function(_3){
+throw new Error("Unimplemented API: dojo.data.api.Identity.getIdentityAttributes");
+return null;
+},fetchItemByIdentity:function(_4){
+if(!this.isItemLoaded(_4.item)){
+throw new Error("Unimplemented API: dojo.data.api.Identity.fetchItemByIdentity");
}
+}});
+}
diff --git a/js/dojo/dojo/data/api/Notification.js b/js/dojo/dojo/data/api/Notification.js
--- a/js/dojo/dojo/data/api/Notification.js
+++ b/js/dojo/dojo/data/api/Notification.js
@@ -1,119 +1,21 @@
-if(!dojo._hasResource["dojo.data.api.Notification"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.data.api.Notification"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo.data.api.Notification"]){
+dojo._hasResource["dojo.data.api.Notification"]=true;
dojo.provide("dojo.data.api.Notification");
dojo.require("dojo.data.api.Read");
-
-dojo.declare("dojo.data.api.Notification", dojo.data.api.Read, {
- // summary:
- // This is an abstract API that data provider implementations conform to.
- // This file defines functions signatures and intentionally leaves all the
- // functions unimplemented.
- //
- // description:
- // This API defines a set of APIs that all datastores that conform to the
- // Notifications API must implement. In general, most stores will implement
- // these APIs as no-op functions for users who wish to monitor them to be able
- // to connect to then via dojo.connect(). For non-users of dojo.connect,
- // they should be able to just replace the function on the store to obtain
- // notifications. Both read-only and read-write stores may implement
- // this feature. In the case of a read-only store, this feature makes sense if
- // the store itself does internal polling to a back-end server and periodically updates
- // its cache of items (deletes, adds, and updates).
- //
- // example:
- //
- // | function onSet(item, attribute, oldValue, newValue) {
- // | //Do something with the information...
- // | };
- // | var store = new some.newStore();
- // | dojo.connect(store, "onSet", onSet);
-
- getFeatures: function(){
- // summary:
- // See dojo.data.api.Read.getFeatures()
- return {
- 'dojo.data.api.Read': true,
- 'dojo.data.api.Notification': true
- };
- },
-
- onSet: function(/* item */ item,
- /* attribute-name-string */ attribute,
- /* object | array */ oldValue,
- /* object | array */ newValue){
- // summary:
- // This function is called any time an item is modified via setValue, setValues, unsetAttribute, etc.
- // description:
- // This function is called any time an item is modified via setValue, setValues, unsetAttribute, etc.
- // Its purpose is to provide a hook point for those who wish to monitor actions on items in the store
- // in a simple manner. The general expected usage is to dojo.connect() to the store's
- // implementation and be called after the store function is called.
- //
- // item:
- // The item being modified.
- // attribute:
- // The attribute being changed represented as a string name.
- // oldValue:
- // The old value of the attribute. In the case of single value calls, such as setValue, unsetAttribute, etc,
- // this value will be generally be an atomic value of some sort (string, int, etc, object). In the case of
- // multi-valued attributes, it will be an array.
- // newValue:
- // The new value of the attribute. In the case of single value calls, such as setValue, this value will be
- // generally be an atomic value of some sort (string, int, etc, object). In the case of multi-valued attributes,
- // it will be an array. In the case of unsetAttribute, the new value will be 'undefined'.
- //
- // returns:
- // Nothing.
- throw new Error('Unimplemented API: dojo.data.api.Notification.onSet');
- },
-
- onNew: function(/* item */ newItem, /*object?*/ parentInfo){
- // summary:
- // This function is called any time a new item is created in the store.
- // It is called immediately after the store newItem processing has completed.
- // description:
- // This function is called any time a new item is created in the store.
- // It is called immediately after the store newItem processing has completed.
- //
- // newItem:
- // The item created.
- // parentInfo:
- // An optional javascript object that is passed when the item created was placed in the store
- // hierarchy as a value f another item's attribute, instead of a root level item. Note that if this
- // function is invoked with a value for parentInfo, then onSet is not invoked stating the attribute of
- // the parent item was modified. This is to avoid getting two notification events occurring when a new item
- // with a parent is created. The structure passed in is as follows:
- // {
- // item: someItem, //The parent item
- // attribute: "attribute-name-string", //The attribute the new item was assigned to.
- // oldValue: something //Whatever was the previous value for the attribute.
- // //If it is a single-value attribute only, then this value will be a single value.
- // //If it was a multi-valued attribute, then this will be an array of all the values minues the new one.
- // newValue: something //The new value of the attribute. In the case of single value calls, such as setValue, this value will be
- // //generally be an atomic value of some sort (string, int, etc, object). In the case of multi-valued attributes,
- // //it will be an array.
- // }
- //
- // returns:
- // Nothing.
- throw new Error('Unimplemented API: dojo.data.api.Notification.onNew');
- },
-
- onDelete: function(/* item */ deletedItem){
- // summary:
- // This function is called any time an item is deleted from the store.
- // It is called immediately after the store deleteItem processing has completed.
- // description:
- // This function is called any time an item is deleted from the store.
- // It is called immediately after the store deleteItem processing has completed.
- //
- // deletedItem:
- // The item deleted.
- //
- // returns:
- // Nothing.
- throw new Error('Unimplemented API: dojo.data.api.Notification.onDelete');
- }
-});
-
+dojo.declare("dojo.data.api.Notification",dojo.data.api.Read,{getFeatures:function(){
+return {"dojo.data.api.Read":true,"dojo.data.api.Notification":true};
+},onSet:function(_1,_2,_3,_4){
+throw new Error("Unimplemented API: dojo.data.api.Notification.onSet");
+},onNew:function(_5,_6){
+throw new Error("Unimplemented API: dojo.data.api.Notification.onNew");
+},onDelete:function(_7){
+throw new Error("Unimplemented API: dojo.data.api.Notification.onDelete");
+}});
}
diff --git a/js/dojo/dojo/data/api/Read.js b/js/dojo/dojo/data/api/Read.js
--- a/js/dojo/dojo/data/api/Read.js
+++ b/js/dojo/dojo/data/api/Read.js
@@ -1,499 +1,55 @@
-if(!dojo._hasResource["dojo.data.api.Read"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.data.api.Read"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo.data.api.Read"]){
+dojo._hasResource["dojo.data.api.Read"]=true;
dojo.provide("dojo.data.api.Read");
dojo.require("dojo.data.api.Request");
-
-dojo.declare("dojo.data.api.Read", null, {
- // summary:
- // This is an abstract API that data provider implementations conform to.
- // This file defines methods signatures and intentionally leaves all the
- // methods unimplemented. For more information on the dojo.data APIs,
- // please visit: http://www.dojotoolkit.org/node/98
-
- getValue: function( /* item */ item,
- /* attribute-name-string */ attribute,
- /* value? */ defaultValue){
- // summary:
- // Returns a single attribute value.
- // Returns defaultValue if and only if *item* does not have a value for *attribute*.
- // Returns null if and only if null was explicitly set as the attribute value.
- // Returns undefined if and only if the item does not have a value for the given
- // attribute (which is the same as saying the item does not have the attribute).
- // description:
- // Saying that an "item x does not have a value for an attribute y"
- // is identical to saying that an "item x does not have attribute y".
- // It is an oxymoron to say "that attribute is present but has no values"
- // or "the item has that attribute but does not have any attribute values".
- // If store.hasAttribute(item, attribute) returns false, then
- // store.getValue(item, attribute) will return undefined.
- //
- // item:
- // The item to access values on.
- // attribute:
- // The attribute to access represented as a string.
- // defaultValue:
- // Optional. A default value to use for the getValue return in the attribute does not exist or has no value.
- //
- // exceptions:
- // Throws an exception if *item* is not an item, or *attribute* is not a string
- // example:
- // | var darthVader = store.getValue(lukeSkywalker, "father");
- var attributeValue = null;
- throw new Error('Unimplemented API: dojo.data.api.Read.getValue');
- return attributeValue; // a literal, an item, null, or undefined (never an array)
- },
-
- getValues: function(/* item */ item,
- /* attribute-name-string */ attribute){
- // summary:
- // This getValues() method works just like the getValue() method, but getValues()
- // always returns an array rather than a single attribute value. The array
- // may be empty, may contain a single attribute value, or may contain many
- // attribute values.
- // If the item does not have a value for the given attribute, then getValues()
- // will return an empty array: []. (So, if store.hasAttribute(item, attribute)
- // returns false, then store.getValues(item, attribute) will return [].)
- //
- // item:
- // The item to access values on.
- // attribute:
- // The attribute to access represented as a string.
- //
- // exceptions:
- // Throws an exception if *item* is not an item, or *attribute* is not a string
- // example:
- // | var friendsOfLuke = store.getValues(lukeSkywalker, "friends");
- var array = [];
- throw new Error('Unimplemented API: dojo.data.api.Read.getValues');
- return array; // an array that may contain literals and items
- },
-
- getAttributes: function(/* item */ item){
- // summary:
- // Returns an array with all the attributes that this item has. This
- // method will always return an array; if the item has no attributes
- // at all, getAttributes() will return an empty array: [].
- //
- // item:
- // The item to access attributes on.
- //
- // exceptions:
- // Throws an exception if *item* is not an item, or *attribute* is not a string
- // example:
- // | var array = store.getAttributes(kermit);
- var array = [];
- throw new Error('Unimplemented API: dojo.data.api.Read.getAttributes');
- return array; // array
- },
-
- hasAttribute: function( /* item */ item,
- /* attribute-name-string */ attribute){
- // summary:
- // Returns true if the given *item* has a value for the given *attribute*.
- //
- // item:
- // The item to access attributes on.
- // attribute:
- // The attribute to access represented as a string.
- //
- // exceptions:
- // Throws an exception if *item* is not an item, or *attribute* is not a string
- // example:
- // | var trueOrFalse = store.hasAttribute(kermit, "color");
- throw new Error('Unimplemented API: dojo.data.api.Read.hasAttribute');
- return false; // boolean
- },
-
- containsValue: function(/* item */ item,
- /* attribute-name-string */ attribute,
- /* anything */ value){
- // summary:
- // Returns true if the given *value* is one of the values that getValues()
- // would return.
- //
- // item:
- // The item to access values on.
- // attribute:
- // The attribute to access represented as a string.
- // value:
- // The value to match as a value for the attribute.
- //
- // exceptions:
- // Throws an exception if *item* is not an item, or *attribute* is not a string
- // example:
- // | var trueOrFalse = store.containsValue(kermit, "color", "green");
- throw new Error('Unimplemented API: dojo.data.api.Read.containsValue');
- return false; // boolean
- },
-
- isItem: function(/* anything */ something){
- // summary:
- // Returns true if *something* is an item and came from the store instance.
- // Returns false if *something* is a literal, an item from another store instance,
- // or is any object other than an item.
- //
- // something:
- // Can be anything.
- //
- // example:
- // | var yes = store.isItem(store.newItem());
- // | var no = store.isItem("green");
- throw new Error('Unimplemented API: dojo.data.api.Read.isItem');
- return false; // boolean
- },
-
- isItemLoaded: function(/* anything */ something) {
- // summary:
- // Returns false if isItem(something) is false. Returns false if
- // if isItem(something) is true but the the item is not yet loaded
- // in local memory (for example, if the item has not yet been read
- // from the server).
- //
- // something:
- // Can be anything.
- //
- // example:
- // | var yes = store.isItemLoaded(store.newItem());
- // | var no = store.isItemLoaded("green");
- throw new Error('Unimplemented API: dojo.data.api.Read.isItemLoaded');
- return false; // boolean
- },
-
- loadItem: function(/* object */ keywordArgs){
- // summary:
- // Given an item, this method loads the item so that a subsequent call
- // to store.isItemLoaded(item) will return true. If a call to
- // isItemLoaded() returns true before loadItem() is even called,
- // then loadItem() need not do any work at all and will not even invoke
- // the callback handlers. So, before invoking this method, check that
- // the item has not already been loaded.
- // keywordArgs:
- // An anonymous object that defines the item to load and callbacks to invoke when the
- // load has completed. The format of the object is as follows:
- // {
- // item: object,
- // onItem: Function,
- // onError: Function,
- // scope: object
- // }
- // The *item* parameter.
- // The item parameter is an object that represents the item in question that should be
- // contained by the store. This attribute is required.
-
- // The *onItem* parameter.
- // Function(item)
- // The onItem parameter is the callback to invoke when the item has been loaded. It takes only one
- // parameter, the fully loaded item.
- //
- // The *onError* parameter.
- // Function(error)
- // The onError parameter is the callback to invoke when the item load encountered an error. It takes only one
- // parameter, the error object
- //
- // The *scope* parameter.
- // If a scope object is provided, all of the callback functions (onItem,
- // onError, etc) will be invoked in the context of the scope object.
- // In the body of the callback function, the value of the "this"
- // keyword will be the scope object. If no scope object is provided,
- // the callback functions will be called in the context of dojo.global().
- // For example, onItem.call(scope, item, request) vs.
- // onItem.call(dojo.global(), item, request)
- if (!this.isItemLoaded(keywordArgs.item)) {
- throw new Error('Unimplemented API: dojo.data.api.Read.loadItem');
- }
- },
-
- fetch: function(/* Object */ keywordArgs){
- // summary:
- // Given a query and set of defined options, such as a start and count of items to return,
- // this method executes the query and makes the results available as data items.
- // The format and expectations of stores is that they operate in a generally asynchronous
- // manner, therefore callbacks are always used to return items located by the fetch parameters.
- //
- // description:
- // A Request object will always be returned and is returned immediately.
- // The basic request is nothing more than the keyword args passed to fetch and
- // an additional function attached, abort(). The returned request object may then be used
- // to cancel a fetch. All data items returns are passed through the callbacks defined in the
- // fetch parameters and are not present on the 'request' object.
- //
- // This does not mean that custom stores can not add methods and properties to the request object
- // returned, only that the API does not require it. For more info about the Request API,
- // see dojo.data.api.Request
- //
- // keywordArgs:
- // The keywordArgs parameter may either be an instance of
- // conforming to dojo.data.api.Request or may be a simple anonymous object
- // that may contain any of the following:
- // {
- // query: query-string or query-object,
- // queryOptions: object,
- // onBegin: Function,
- // onItem: Function,
- // onComplete: Function,
- // onError: Function,
- // scope: object,
- // start: int
- // count: int
- // sort: array
- // }
- // All implementations should accept keywordArgs objects with any of
- // the 9 standard properties: query, onBegin, onItem, onComplete, onError
- // scope, sort, start, and count. Some implementations may accept additional
- // properties in the keywordArgs object as valid parameters, such as
- // {includeOutliers:true}.
- //
- // The *query* parameter.
- // The query may be optional in some data store implementations.
- // The dojo.data.api.Read API does not specify the syntax or semantics
- // of the query itself -- each different data store implementation
- // may have its own notion of what a query should look like.
- // In most implementations the query will probably be a string, but
- // in some implementations the query might be a Date, or a number,
- // or some complex keyword parameter object. The dojo.data.api.Read
- // API is completely agnostic about what the query actually is.
- // In general for query objects that accept strings as attribute value matches,
- // the store should support basic filtering capability, such as * (match any character)
- // and ? (match single character).
- //
- // The *queryOptions* parameter
- // The queryOptions parameter is an optional parameter used to specify optiosn that may modify
- // the query in some fashion, such as doing a case insensitive search, or doing a deep search
- // where all items in a hierarchical representation of data are scanned instead of just the root
- // items. It currently defines two options that all datastores should attempt to honor if possible:
- // {
- // ignoreCase: boolean, //Whether or not the query should match case sensitively or not. Default behaviour is false.
- // deep: boolean //Whether or not a fetch should do a deep search of items and all child
- // //items instead of just root-level items in a datastore. Default is false.
- // }
- //
- // The *onBegin* parameter.
- // function(size, request);
- // If an onBegin callback function is provided, the callback function
- // will be called just once, before the first onItem callback is called.
- // The onBegin callback function will be passed two arguments, the
- // the total number of items identified and the Request object. If the total number is
- // unknown, then size will be -1. Note that size is not necessarily the size of the
- // collection of items returned from the query, as the request may have specified to return only a
- // subset of the total set of items through the use of the start and count parameters.
- //
- // The *onItem* parameter.
- // function(item, request);
- // If an onItem callback function is provided, the callback function
- // will be called as each item in the result is received. The callback
- // function will be passed two arguments: the item itself, and the
- // Request object.
- //
- // The *onComplete* parameter.
- // function(items, request);
- //
- // If an onComplete callback function is provided, the callback function
- // will be called just once, after the last onItem callback is called.
- // Note that if the onItem callback is not present, then onComplete will be passed
- // an array containing all items which matched the query and the request object.
- // If the onItem callback is present, then onComplete is called as:
- // onComplete(null, request).
- //
- // The *onError* parameter.
- // function(errorData, request);
- // If an onError callback function is provided, the callback function
- // will be called if there is any sort of error while attempting to
- // execute the query.
- // The onError callback function will be passed two arguments:
- // an Error object and the Request object.
- //
- // The *scope* parameter.
- // If a scope object is provided, all of the callback functions (onItem,
- // onComplete, onError, etc) will be invoked in the context of the scope
- // object. In the body of the callback function, the value of the "this"
- // keyword will be the scope object. If no scope object is provided,
- // the callback functions will be called in the context of dojo.global().
- // For example, onItem.call(scope, item, request) vs.
- // onItem.call(dojo.global(), item, request)
- //
- // The *start* parameter.
- // If a start parameter is specified, this is a indication to the datastore to
- // only start returning items once the start number of items have been located and
- // skipped. When this parameter is paired withh 'count', the store should be able
- // to page across queries with millions of hits by only returning subsets of the
- // hits for each query
- //
- // The *count* parameter.
- // If a count parameter is specified, this is a indication to the datastore to
- // only return up to that many items. This allows a fetch call that may have
- // millions of item matches to be paired down to something reasonable.
- //
- // The *sort* parameter.
- // If a sort parameter is specified, this is a indication to the datastore to
- // sort the items in some manner before returning the items. The array is an array of
- // javascript objects that must conform to the following format to be applied to the
- // fetching of items:
- // {
- // attribute: attribute || attribute-name-string,
- // descending: true|false; // Optional. Default is false.
- // }
- // Note that when comparing attributes, if an item contains no value for the attribute
- // (undefined), then it the default ascending sort logic should push it to the bottom
- // of the list. In the descending order case, it such items should appear at the top of the list.
- //
- // returns:
- // The fetch() method will return a javascript object conforming to the API
- // defined in dojo.data.api.Request. In general, it will be the keywordArgs
- // object returned with the required functions in Request.js attached.
- // Its general purpose is to provide a convenient way for a caller to abort an
- // ongoing fetch.
- //
- // The Request object may also have additional properties when it is returned
- // such as request.store property, which is a pointer to the datastore object that
- // fetch() is a method of.
- //
- // exceptions:
- // Throws an exception if the query is not valid, or if the query
- // is required but was not supplied.
- //
- // example:
- // Fetch all books identified by the query and call 'showBooks' when complete
- // | var request = store.fetch({query:"all books", onComplete: showBooks});
- // example:
- // Fetch all items in the story and call 'showEverything' when complete.
- // | var request = store.fetch(onComplete: showEverything);
- // example:
- // Fetch only 10 books that match the query 'all books', starting at the fifth book found during the search.
- // This demonstrates how paging can be done for specific queries.
- // | var request = store.fetch({query:"all books", start: 4, count: 10, onComplete: showBooks});
- // example:
- // Fetch all items that match the query, calling 'callback' each time an item is located.
- // | var request = store.fetch({query:"foo/bar", onItem:callback});
- // example:
- // Fetch the first 100 books by author King, call showKing when up to 100 items have been located.
- // | var request = store.fetch({query:{author:"King"}, start: 0, count:100, onComplete: showKing});
- // example:
- // Locate the books written by Author King, sort it on title and publisher, then return the first 100 items from the sorted items.
- // | var request = store.fetch({query:{author:"King"}, sort: [{ attribute: "title", descending: true}, {attribute: "publisher"}], ,start: 0, count:100, onComplete: 'showKing'});
- // example:
- // Fetch the first 100 books by authors starting with the name King, then call showKing when up to 100 items have been located.
- // | var request = store.fetch({query:{author:"King*"}, start: 0, count:100, onComplete: showKing});
- // example:
- // Fetch the first 100 books by authors ending with 'ing', but only have one character before it (King, Bing, Ling, Sing, etc.), then call showBooks when up to 100 items have been located.
- // | var request = store.fetch({query:{author:"?ing"}, start: 0, count:100, onComplete: showBooks});
- // example:
- // Fetch the first 100 books by author King, where the name may appear as King, king, KING, kInG, and so on, then call showKing when up to 100 items have been located.
- // | var request = store.fetch({query:{author:"King"}, queryOptions:(ignoreCase: true}, start: 0, count:100, onComplete: showKing});
- // example:
- // Paging
- // | var store = new dojo.data.LargeRdbmsStore({url:"jdbc:odbc:foobar"});
- // | var fetchArgs = {
- // | query: {type:"employees", name:"Hillary *"}, // string matching
- // | sort: [{attribute:"department", descending:true}],
- // | start: 0,
- // | count: 20,
- // | scope: displayer,
- // | onBegin: showThrobber,
- // | onItem: displayItem,
- // | onComplete: stopThrobber,
- // | onError: handleFetchError,
- // | };
- // | store.fetch(fetchArgs);
- // | ...
- // and then when the user presses the "Next Page" button...
- // | fetchArgs.start += 20;
- // | store.fetch(fetchArgs); // get the next 20 items
- var request = null;
- throw new Error('Unimplemented API: dojo.data.api.Read.fetch');
- return request; // an object conforming to the dojo.data.api.Request API
- },
-
- getFeatures: function(){
- // summary:
- // The getFeatures() method returns an simple keyword values object
- // that specifies what interface features the datastore implements.
- // A simple CsvStore may be read-only, and the only feature it
- // implements will be the 'dojo.data.api.Read' interface, so the
- // getFeatures() method will return an object like this one:
- // {'dojo.data.api.Read': true}.
- // A more sophisticated datastore might implement a variety of
- // interface features, like 'dojo.data.api.Read', 'dojo.data.api.Write',
- // 'dojo.data.api.Identity', and 'dojo.data.api.Attribution'.
- return {
- 'dojo.data.api.Read': true
- };
- },
-
- close: function(/*dojo.data.api.Request || keywordArgs || null */ request){
- // summary:
- // The close() method is intended for instructing the store to 'close' out
- // any information associated with a particular request.
- //
- // description:
- // The close() method is intended for instructing the store to 'close' out
- // any information associated with a particular request. In general, this API
- // expects to recieve as a parameter a request object returned from a fetch.
- // It will then close out anything associated with that request, such as
- // clearing any internal datastore caches and closing any 'open' connections.
- // For some store implementations, this call may be a no-op.
- //
- // request:
- // An instance of a request for the store to use to identify what to close out.
- // If no request is passed, then the store should clear all internal caches (if any)
- // and close out all 'open' connections. It does not render the store unusable from
- // there on, it merely cleans out any current data and resets the store to initial
- // state.
- //
- // example:
- // | var request = store.fetch({onComplete: doSomething});
- // | ...
- // | store.close(request);
- throw new Error('Unimplemented API: dojo.data.api.Read.close');
- },
-
- getLabel: function(/* item */ item){
- // summary:
- // Method to inspect the item and return a user-readable 'label' for the item
- // that provides a general/adequate description of what the item is.
- //
- // description:
- // Method to inspect the item and return a user-readable 'label' for the item
- // that provides a general/adequate description of what the item is. In general
- // most labels will be a specific attribute value or collection of the attribute
- // values that combine to label the item in some manner. For example for an item
- // that represents a person it may return the label as: "firstname lastlame" where
- // the firstname and lastname are attributes on the item. If the store is unable
- // to determine an adequate human readable label, it should return undefined. Users that wish
- // to customize how a store instance labels items should replace the getLabel() function on
- // their instance of the store, or extend the store and replace the function in
- // the extension class.
- //
- // item:
- // The item to return the label for.
- //
- // returns:
- // A user-readable string representing the item or undefined if no user-readable label can
- // be generated.
- throw new Error('Unimplemented API: dojo.data.api.Read.getLabel');
- return undefined;
- },
-
- getLabelAttributes: function(/* item */ item){
- // summary:
- // Method to inspect the item and return an array of what attributes of the item were used
- // to generate its label, if any.
- //
- // description:
- // Method to inspect the item and return an array of what attributes of the item were used
- // to generate its label, if any. This function is to assist UI developers in knowing what
- // attributes can be ignored out of the attributes an item has when displaying it, in cases
- // where the UI is using the label as an overall identifer should they wish to hide
- // redundant information.
- //
- // item:
- // The item to return the list of label attributes for.
- //
- // returns:
- // An array of attribute names that were used to generate the label, or null if public attributes
- // were not used to generate the label.
- throw new Error('Unimplemented API: dojo.data.api.Read.getLabelAttributes');
- return null;
- }
-});
-
+dojo.declare("dojo.data.api.Read",null,{getValue:function(_1,_2,_3){
+var _4=null;
+throw new Error("Unimplemented API: dojo.data.api.Read.getValue");
+return _4;
+},getValues:function(_5,_6){
+var _7=[];
+throw new Error("Unimplemented API: dojo.data.api.Read.getValues");
+return _7;
+},getAttributes:function(_8){
+var _9=[];
+throw new Error("Unimplemented API: dojo.data.api.Read.getAttributes");
+return _9;
+},hasAttribute:function(_a,_b){
+throw new Error("Unimplemented API: dojo.data.api.Read.hasAttribute");
+return false;
+},containsValue:function(_c,_d,_e){
+throw new Error("Unimplemented API: dojo.data.api.Read.containsValue");
+return false;
+},isItem:function(_f){
+throw new Error("Unimplemented API: dojo.data.api.Read.isItem");
+return false;
+},isItemLoaded:function(_10){
+throw new Error("Unimplemented API: dojo.data.api.Read.isItemLoaded");
+return false;
+},loadItem:function(_11){
+if(!this.isItemLoaded(_11.item)){
+throw new Error("Unimplemented API: dojo.data.api.Read.loadItem");
}
+},fetch:function(_12){
+var _13=null;
+throw new Error("Unimplemented API: dojo.data.api.Read.fetch");
+return _13;
+},getFeatures:function(){
+return {"dojo.data.api.Read":true};
+},close:function(_14){
+throw new Error("Unimplemented API: dojo.data.api.Read.close");
+},getLabel:function(_15){
+throw new Error("Unimplemented API: dojo.data.api.Read.getLabel");
+return undefined;
+},getLabelAttributes:function(_16){
+throw new Error("Unimplemented API: dojo.data.api.Read.getLabelAttributes");
+return null;
+}});
+}
diff --git a/js/dojo/dojo/data/api/Request.js b/js/dojo/dojo/data/api/Request.js
--- a/js/dojo/dojo/data/api/Request.js
+++ b/js/dojo/dojo/data/api/Request.js
@@ -1,32 +1,14 @@
-if(!dojo._hasResource["dojo.data.api.Request"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.data.api.Request"] = true;
-dojo.provide("dojo.data.api.Request");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
-dojo.declare("dojo.data.api.Request", null, {
- // summary:
- // This class defines out the semantics of what a 'Request' object looks like
- // when returned from a fetch() method. In general, a request object is
- // nothing more than the original keywordArgs from fetch with an abort function
- // attached to it to allow users to abort a particular request if they so choose.
- // No other functions are required on a general Request object return. That does not
- // inhibit other store implementations from adding extentions to it, of course.
- //
- // This is an abstract API that data provider implementations conform to.
- // This file defines methods signatures and intentionally leaves all the
- // methods unimplemented.
- //
- // For more details on fetch, see dojo.data.api.Read.fetch().
-
- abort: function(){
- // summary:
- // This function is a hook point for stores to provide as a way for
- // a fetch to be halted mid-processing.
- // description:
- // This function is a hook point for stores to provide as a way for
- // a fetch to be halted mid-processing. For more details on the fetch() api,
- // please see dojo.data.api.Read.fetch().
- throw new Error('Unimplemented API: dojo.data.api.Request.abort');
- }
-});
-
+if(!dojo._hasResource["dojo.data.api.Request"]){
+dojo._hasResource["dojo.data.api.Request"]=true;
+dojo.provide("dojo.data.api.Request");
+dojo.declare("dojo.data.api.Request",null,{abort:function(){
+throw new Error("Unimplemented API: dojo.data.api.Request.abort");
+}});
}
diff --git a/js/dojo/dojo/data/api/Write.js b/js/dojo/dojo/data/api/Write.js
--- a/js/dojo/dojo/data/api/Write.js
+++ b/js/dojo/dojo/data/api/Write.js
@@ -1,226 +1,39 @@
-if(!dojo._hasResource["dojo.data.api.Write"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.data.api.Write"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo.data.api.Write"]){
+dojo._hasResource["dojo.data.api.Write"]=true;
dojo.provide("dojo.data.api.Write");
dojo.require("dojo.data.api.Read");
-
-dojo.declare("dojo.data.api.Write", dojo.data.api.Read, {
- // summary:
- // This is an abstract API that data provider implementations conform to.
- // This file defines function signatures and intentionally leaves all the
- // functionss unimplemented.
-
- getFeatures: function(){
- // summary:
- // See dojo.data.api.Read.getFeatures()
- return {
- 'dojo.data.api.Read': true,
- 'dojo.data.api.Write': true
- };
- },
-
- newItem: function(/* Object? */ keywordArgs, /*Object?*/ parentInfo){
- // summary:
- // Returns a newly created item. Sets the attributes of the new
- // item based on the *keywordArgs* provided. In general, the attribute
- // names in the keywords become the attributes in the new item and as for
- // the attribute values in keywordArgs, they become the values of the attributes
- // in the new item. In addition, for stores that support hierarchical item
- // creation, an optional second parameter is accepted that defines what item is the parent
- // of the new item and what attribute of that item should the new item be assigned to.
- // In general, this will assume that the attribute targetted is multi-valued and a new item
- // is appended onto the list of values for that attribute.
- //
- // keywordArgs:
- // A javascript object defining the initial content of the item as a set of JavaScript 'property name: value' pairs.
- // parentInfo:
- // An optional javascript object defining what item is the parent of this item (in a hierarchical store. Not all stores do hierarchical items),
- // and what attribute of that parent to assign the new item to. If this is present, and the attribute specified
- // is a multi-valued attribute, it will append this item into the array of values for that attribute. The structure
- // of the object is as follows:
- // {
- // parent: someItem,
- // attribute: "attribute-name-string"
- // }
- //
- // exceptions:
- // Throws an exception if *keywordArgs* is a string or a number or
- // anything other than a simple anonymous object.
- // Throws an exception if the item in parentInfo is not an item from the store
- // or if the attribute isn't an attribute name string.
- // example:
- // | var kermit = store.newItem({name: "Kermit", color:[blue, green]});
-
- var newItem;
- throw new Error('Unimplemented API: dojo.data.api.Write.newItem');
- return newItem; // item
- },
-
- deleteItem: function(/* item */ item){
- // summary:
- // Deletes an item from the store.
- //
- // item:
- // The item to delete.
- //
- // exceptions:
- // Throws an exception if the argument *item* is not an item
- // (if store.isItem(item) returns false).
- // example:
- // | var success = store.deleteItem(kermit);
- throw new Error('Unimplemented API: dojo.data.api.Write.deleteItem');
- return false; // boolean
- },
-
- setValue: function( /* item */ item,
- /* string */ attribute,
- /* almost anything */ value){
- // summary:
- // Sets the value of an attribute on an item.
- // Replaces any previous value or values.
- //
- // item:
- // The item to modify.
- // attribute:
- // The attribute of the item to change represented as a string name.
- // value:
- // The value to assign to the item.
- //
- // exceptions:
- // Throws an exception if *item* is not an item, or if *attribute*
- // is neither an attribute object or a string.
- // Throws an exception if *value* is undefined.
- // example:
- // | var success = store.set(kermit, "color", "green");
- throw new Error('Unimplemented API: dojo.data.api.Write.setValue');
- return false; // boolean
- },
-
- setValues: function(/* item */ item,
- /* string */ attribute,
- /* array */ values){
- // summary:
- // Adds each value in the *values* array as a value of the given
- // attribute on the given item.
- // Replaces any previous value or values.
- // Calling store.setValues(x, y, []) (with *values* as an empty array) has
- // the same effect as calling store.unsetAttribute(x, y).
- //
- // item:
- // The item to modify.
- // attribute:
- // The attribute of the item to change represented as a string name.
- // values:
- // An array of values to assign to the attribute..
- //
- // exceptions:
- // Throws an exception if *values* is not an array, if *item* is not an
- // item, or if *attribute* is neither an attribute object or a string.
- // example:
- // | var success = store.setValues(kermit, "color", ["green", "aqua"]);
- // | success = store.setValues(kermit, "color", []);
- // | if (success) {assert(!store.hasAttribute(kermit, "color"));}
- throw new Error('Unimplemented API: dojo.data.api.Write.setValues');
- return false; // boolean
- },
-
- unsetAttribute: function( /* item */ item,
- /* string */ attribute){
- // summary:
- // Deletes all the values of an attribute on an item.
- //
- // item:
- // The item to modify.
- // attribute:
- // The attribute of the item to unset represented as a string.
- //
- // exceptions:
- // Throws an exception if *item* is not an item, or if *attribute*
- // is neither an attribute object or a string.
- // example:
- // | var success = store.unsetAttribute(kermit, "color");
- // | if (success) {assert(!store.hasAttribute(kermit, "color"));}
- throw new Error('Unimplemented API: dojo.data.api.Write.clear');
- return false; // boolean
- },
-
- save: function(/* object */ keywordArgs){
- // summary:
- // Saves to the server all the changes that have been made locally.
- // The save operation may take some time and is generally performed
- // in an asynchronous fashion. The outcome of the save action is
- // is passed into the set of supported callbacks for the save.
- //
- // keywordArgs:
- // {
- // onComplete: function
- // onError: function
- // scope: object
- // }
- //
- // The *onComplete* parameter.
- // function();
- //
- // If an onComplete callback function is provided, the callback function
- // will be called just once, after the save has completed. No parameters
- // are generally passed to the onComplete.
- //
- // The *onError* parameter.
- // function(errorData);
- //
- // If an onError callback function is provided, the callback function
- // will be called if there is any sort of error while attempting to
- // execute the save. The onError function will be based one parameter, the
- // error.
- //
- // The *scope* parameter.
- // If a scope object is provided, all of the callback function (
- // onComplete, onError, etc) will be invoked in the context of the scope
- // object. In the body of the callback function, the value of the "this"
- // keyword will be the scope object. If no scope object is provided,
- // the callback functions will be called in the context of dojo.global.
- // For example, onComplete.call(scope) vs.
- // onComplete.call(dojo.global)
- //
- // returns:
- // Nothing. Since the saves are generally asynchronous, there is
- // no need to return anything. All results are passed via callbacks.
- // example:
- // | store.save({onComplete: onSave});
- // | store.save({scope: fooObj, onComplete: onSave, onError: saveFailed});
- throw new Error('Unimplemented API: dojo.data.api.Write.save');
- },
-
- revert: function(){
- // summary:
- // Discards any unsaved changes.
- // description:
- // Discards any unsaved changes.
- //
- // example:
- // | var success = store.revert();
- throw new Error('Unimplemented API: dojo.data.api.Write.revert');
- return false; // boolean
- },
-
- isDirty: function(/* item? */ item){
- // summary:
- // Given an item, isDirty() returns true if the item has been modified
- // since the last save(). If isDirty() is called with no *item* argument,
- // then this function returns true if any item has been modified since
- // the last save().
- //
- // item:
- // The item to check.
- //
- // exceptions:
- // Throws an exception if isDirty() is passed an argument and the
- // argument is not an item.
- // example:
- // | var trueOrFalse = store.isDirty(kermit); // true if kermit is dirty
- // | var trueOrFalse = store.isDirty(); // true if any item is dirty
- throw new Error('Unimplemented API: dojo.data.api.Write.isDirty');
- return false; // boolean
- }
-});
-
+dojo.declare("dojo.data.api.Write",dojo.data.api.Read,{getFeatures:function(){
+return {"dojo.data.api.Read":true,"dojo.data.api.Write":true};
+},newItem:function(_1,_2){
+var _3;
+throw new Error("Unimplemented API: dojo.data.api.Write.newItem");
+return _3;
+},deleteItem:function(_4){
+throw new Error("Unimplemented API: dojo.data.api.Write.deleteItem");
+return false;
+},setValue:function(_5,_6,_7){
+throw new Error("Unimplemented API: dojo.data.api.Write.setValue");
+return false;
+},setValues:function(_8,_9,_a){
+throw new Error("Unimplemented API: dojo.data.api.Write.setValues");
+return false;
+},unsetAttribute:function(_b,_c){
+throw new Error("Unimplemented API: dojo.data.api.Write.clear");
+return false;
+},save:function(_d){
+throw new Error("Unimplemented API: dojo.data.api.Write.save");
+},revert:function(){
+throw new Error("Unimplemented API: dojo.data.api.Write.revert");
+return false;
+},isDirty:function(_e){
+throw new Error("Unimplemented API: dojo.data.api.Write.isDirty");
+return false;
+}});
}
diff --git a/js/dojo/dojo/data/util/filter.js b/js/dojo/dojo/data/util/filter.js
--- a/js/dojo/dojo/data/util/filter.js
+++ b/js/dojo/dojo/data/util/filter.js
@@ -1,69 +1,52 @@
-if(!dojo._hasResource["dojo.data.util.filter"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.data.util.filter"] = true;
-dojo.provide("dojo.data.util.filter");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.data.util.filter.patternToRegExp = function(/*String*/pattern, /*boolean?*/ ignoreCase){
- // summary:
- // Helper function to convert a simple pattern to a regular expression for matching.
- // description:
- // Returns a regular expression object that conforms to the defined conversion rules.
- // For example:
- // ca* -> /^ca.*$/
- // *ca* -> /^.*ca.*$/
- // *c\*a* -> /^.*c\*a.*$/
- // *c\*a?* -> /^.*c\*a..*$/
- // and so on.
- //
- // pattern: string
- // A simple matching pattern to convert that follows basic rules:
- // * Means match anything, so ca* means match anything starting with ca
- // ? Means match single character. So, b?b will match to bob and bab, and so on.
- // \ is an escape character. So for example, \* means do not treat * as a match, but literal character *.
- // To use a \ as a character in the string, it must be escaped. So in the pattern it should be
- // represented by \\ to be treated as an ordinary \ character instead of an escape.
- //
- // ignoreCase:
- // An optional flag to indicate if the pattern matching should be treated as case-sensitive or not when comparing
- // By default, it is assumed case sensitive.
- var rxp = "^";
- var c = null;
- for(var i = 0; i < pattern.length; i++){
- c = pattern.charAt(i);
- switch (c) {
- case '\\':
- rxp += c;
- i++;
- rxp += pattern.charAt(i);
- break;
- case '*':
- rxp += ".*"; break;
- case '?':
- rxp += "."; break;
- case '$':
- case '^':
- case '/':
- case '+':
- case '.':
- case '|':
- case '(':
- case ')':
- case '{':
- case '}':
- case '[':
- case ']':
- rxp += "\\"; //fallthrough
- default:
- rxp += c;
- }
- }
- rxp += "$";
- if(ignoreCase){
- return new RegExp(rxp,"i"); //RegExp
- }else{
- return new RegExp(rxp); //RegExp
- }
-
+if(!dojo._hasResource["dojo.data.util.filter"]){
+dojo._hasResource["dojo.data.util.filter"]=true;
+dojo.provide("dojo.data.util.filter");
+dojo.data.util.filter.patternToRegExp=function(_1,_2){
+var _3="^";
+var c=null;
+for(var i=0;i<_1.length;i++){
+c=_1.charAt(i);
+switch(c){
+case "\\":
+_3+=c;
+i++;
+_3+=_1.charAt(i);
+break;
+case "*":
+_3+=".*";
+break;
+case "?":
+_3+=".";
+break;
+case "$":
+case "^":
+case "/":
+case "+":
+case ".":
+case "|":
+case "(":
+case ")":
+case "{":
+case "}":
+case "[":
+case "]":
+_3+="\\";
+default:
+_3+=c;
+}
+}
+_3+="$";
+if(_2){
+return new RegExp(_3,"mi");
+}else{
+return new RegExp(_3,"m");
+}
};
-
}
diff --git a/js/dojo/dojo/data/util/simpleFetch.js b/js/dojo/dojo/data/util/simpleFetch.js
--- a/js/dojo/dojo/data/util/simpleFetch.js
+++ b/js/dojo/dojo/data/util/simpleFetch.js
@@ -1,90 +1,64 @@
-if(!dojo._hasResource["dojo.data.util.simpleFetch"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.data.util.simpleFetch"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo.data.util.simpleFetch"]){
+dojo._hasResource["dojo.data.util.simpleFetch"]=true;
dojo.provide("dojo.data.util.simpleFetch");
dojo.require("dojo.data.util.sorter");
-
-dojo.data.util.simpleFetch.fetch = function(/* Object? */ request){
- // summary:
- // The simpleFetch mixin is designed to serve as a set of function(s) that can
- // be mixed into other datastore implementations to accelerate their development.
- // The simpleFetch mixin should work well for any datastore that can respond to a _fetchItems()
- // call by returning an array of all the found items that matched the query. The simpleFetch mixin
- // is not designed to work for datastores that respond to a fetch() call by incrementally
- // loading items, or sequentially loading partial batches of the result
- // set. For datastores that mixin simpleFetch, simpleFetch
- // implements a fetch method that automatically handles eight of the fetch()
- // arguments -- onBegin, onItem, onComplete, onError, start, count, sort and scope
- // The class mixing in simpleFetch should not implement fetch(),
- // but should instead implement a _fetchItems() method. The _fetchItems()
- // method takes three arguments, the keywordArgs object that was passed
- // to fetch(), a callback function to be called when the result array is
- // available, and an error callback to be called if something goes wrong.
- // The _fetchItems() method should ignore any keywordArgs parameters for
- // start, count, onBegin, onItem, onComplete, onError, sort, and scope.
- // The _fetchItems() method needs to correctly handle any other keywordArgs
- // parameters, including the query parameter and any optional parameters
- // (such as includeChildren). The _fetchItems() method should create an array of
- // result items and pass it to the fetchHandler along with the original request object
- // -- or, the _fetchItems() method may, if it wants to, create an new request object
- // with other specifics about the request that are specific to the datastore and pass
- // that as the request object to the handler.
- //
- // For more information on this specific function, see dojo.data.api.Read.fetch()
- request = request || {};
- if(!request.store){
- request.store = this;
- }
- var self = this;
-
- var _errorHandler = function(errorData, requestObject){
- if(requestObject.onError){
- var scope = requestObject.scope || dojo.global;
- requestObject.onError.call(scope, errorData, requestObject);
- }
- };
-
- var _fetchHandler = function(items, requestObject){
- var oldAbortFunction = requestObject.abort || null;
- var aborted = false;
-
- var startIndex = requestObject.start?requestObject.start:0;
- var endIndex = requestObject.count?(startIndex + requestObject.count):items.length;
-
- requestObject.abort = function(){
- aborted = true;
- if(oldAbortFunction){
- oldAbortFunction.call(requestObject);
- }
- };
-
- var scope = requestObject.scope || dojo.global;
- if(!requestObject.store){
- requestObject.store = self;
- }
- if(requestObject.onBegin){
- requestObject.onBegin.call(scope, items.length, requestObject);
- }
- if(requestObject.sort){
- items.sort(dojo.data.util.sorter.createSortFunction(requestObject.sort, self));
- }
- if(requestObject.onItem){
- for(var i = startIndex; (i < items.length) && (i < endIndex); ++i){
- var item = items[i];
- if(!aborted){
- requestObject.onItem.call(scope, item, requestObject);
- }
- }
- }
- if(requestObject.onComplete && !aborted){
- var subset = null;
- if (!requestObject.onItem) {
- subset = items.slice(startIndex, endIndex);
- }
- requestObject.onComplete.call(scope, subset, requestObject);
- }
- };
- this._fetchItems(request, _fetchHandler, _errorHandler);
- return request; // Object
+dojo.data.util.simpleFetch.fetch=function(_1){
+_1=_1||{};
+if(!_1.store){
+_1.store=this;
+}
+var _2=this;
+var _3=function(_4,_5){
+if(_5.onError){
+var _6=_5.scope||dojo.global;
+_5.onError.call(_6,_4,_5);
+}
+};
+var _7=function(_8,_9){
+var _a=_9.abort||null;
+var _b=false;
+var _c=_9.start?_9.start:0;
+var _d=(_9.count&&(_9.count!==Infinity))?(_c+_9.count):_8.length;
+_9.abort=function(){
+_b=true;
+if(_a){
+_a.call(_9);
+}
};
-
+var _e=_9.scope||dojo.global;
+if(!_9.store){
+_9.store=_2;
+}
+if(_9.onBegin){
+_9.onBegin.call(_e,_8.length,_9);
+}
+if(_9.sort){
+_8.sort(dojo.data.util.sorter.createSortFunction(_9.sort,_2));
}
+if(_9.onItem){
+for(var i=_c;(i<_8.length)&&(i<_d);++i){
+var _f=_8[i];
+if(!_b){
+_9.onItem.call(_e,_f,_9);
+}
+}
+}
+if(_9.onComplete&&!_b){
+var _10=null;
+if(!_9.onItem){
+_10=_8.slice(_c,_d);
+}
+_9.onComplete.call(_e,_10,_9);
+}
+};
+this._fetchItems(_1,_7,_3);
+return _1;
+};
+}
diff --git a/js/dojo/dojo/data/util/sorter.js b/js/dojo/dojo/data/util/sorter.js
--- a/js/dojo/dojo/data/util/sorter.js
+++ b/js/dojo/dojo/data/util/sorter.js
@@ -1,81 +1,66 @@
-if(!dojo._hasResource["dojo.data.util.sorter"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.data.util.sorter"] = true;
-dojo.provide("dojo.data.util.sorter");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.data.util.sorter.basicComparator = function( /*anything*/ a,
- /*anything*/ b){
- // summary:
- // Basic comparision function that compares if an item is greater or less than another item
- // description:
- // returns 1 if a > b, -1 if a < b, 0 if equal.
- // undefined values are treated as larger values so that they're pushed to the end of the list.
-
- var ret = 0;
- if(a > b || typeof a === "undefined" || a === null){
- ret = 1;
- }else if(a < b || typeof b === "undefined" || b === null){
- ret = -1;
- }
- return ret; //int, {-1,0,1}
-};
-dojo.data.util.sorter.createSortFunction = function( /* attributes array */sortSpec,
- /*dojo.data.core.Read*/ store){
- // summary:
- // Helper function to generate the sorting function based off the list of sort attributes.
- // description:
- // The sort function creation will look for a property on the store called 'comparatorMap'. If it exists
- // it will look in the mapping for comparisons function for the attributes. If one is found, it will
- // use it instead of the basic comparator, which is typically used for strings, ints, booleans, and dates.
- // Returns the sorting function for this particular list of attributes and sorting directions.
- //
- // sortSpec: array
- // A JS object that array that defines out what attribute names to sort on and whether it should be descenting or asending.
- // The objects should be formatted as follows:
- // {
- // attribute: "attributeName-string" || attribute,
- // descending: true|false; // Default is false.
- // }
- // store: object
- // The datastore object to look up item values from.
- //
- var sortFunctions=[];
-
- function createSortFunction(attr, dir){
- return function(itemA, itemB){
- var a = store.getValue(itemA, attr);
- var b = store.getValue(itemB, attr);
- //See if we have a override for an attribute comparison.
- var comparator = null;
- if(store.comparatorMap){
- if(typeof attr !== "string"){
- attr = store.getIdentity(attr);
- }
- comparator = store.comparatorMap[attr]||dojo.data.util.sorter.basicComparator;
- }
- comparator = comparator||dojo.data.util.sorter.basicComparator;
- return dir * comparator(a,b); //int
- };
- }
-
- for(var i = 0; i < sortSpec.length; i++){
- sortAttribute = sortSpec[i];
- if(sortAttribute.attribute){
- var direction = (sortAttribute.descending) ? -1 : 1;
- sortFunctions.push(createSortFunction(sortAttribute.attribute, direction));
- }
- }
-
- return function(rowA, rowB){
- var i=0;
- while(i < sortFunctions.length){
- var ret = sortFunctions[i++](rowA, rowB);
- if(ret !== 0){
- return ret;//int
- }
- }
- return 0; //int
- }; // Function
+if(!dojo._hasResource["dojo.data.util.sorter"]){
+dojo._hasResource["dojo.data.util.sorter"]=true;
+dojo.provide("dojo.data.util.sorter");
+dojo.data.util.sorter.basicComparator=function(a,b){
+var r=-1;
+if(a===null){
+a=undefined;
+}
+if(b===null){
+b=undefined;
+}
+if(a==b){
+r=0;
+}else{
+if(a>b||a==null){
+r=1;
+}
+}
+return r;
+};
+dojo.data.util.sorter.createSortFunction=function(_1,_2){
+var _3=[];
+function _4(_5,_6,_7,s){
+return function(_8,_9){
+var a=s.getValue(_8,_5);
+var b=s.getValue(_9,_5);
+return _6*_7(a,b);
+};
};
-
+var _a;
+var _b=_2.comparatorMap;
+var bc=dojo.data.util.sorter.basicComparator;
+for(var i=0;i<_1.length;i++){
+_a=_1[i];
+var _c=_a.attribute;
+if(_c){
+var _d=(_a.descending)?-1:1;
+var _e=bc;
+if(_b){
+if(typeof _c!=="string"&&("toString" in _c)){
+_c=_c.toString();
+}
+_e=_b[_c]||bc;
}
+_3.push(_4(_c,_d,_e,_2));
+}
+}
+return function(_f,_10){
+var i=0;
+while(i<_3.length){
+var ret=_3[i++](_f,_10);
+if(ret!==0){
+return ret;
+}
+}
+return 0;
+};
+};
+}
diff --git a/js/dojo/dojo/date.js b/js/dojo/dojo/date.js
--- a/js/dojo/dojo/date.js
+++ b/js/dojo/dojo/date.js
@@ -1,336 +1,213 @@
-if(!dojo._hasResource["dojo.date"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.date"] = true;
-dojo.provide("dojo.date");
-
-dojo.date.getDaysInMonth = function(/*Date*/dateObject){
- // summary:
- // Returns the number of days in the month used by dateObject
- var month = dateObject.getMonth();
- var days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
- if(month == 1 && dojo.date.isLeapYear(dateObject)){ return 29; } // Number
- return days[month]; // Number
-}
-
-dojo.date.isLeapYear = function(/*Date*/dateObject){
- // summary:
- // Determines if the year of the dateObject is a leap year
- // description:
- // Leap years are years with an additional day YYYY-02-29, where the
- // year number is a multiple of four with the following exception: If
- // a year is a multiple of 100, then it is only a leap year if it is
- // also a multiple of 400. For example, 1900 was not a leap year, but
- // 2000 is one.
-
- var year = dateObject.getFullYear();
- return !(year%400) || (!(year%4) && !!(year%100)); // Boolean
-}
-
-// FIXME: This is not localized
-dojo.date.getTimezoneName = function(/*Date*/dateObject){
- // summary:
- // Get the user's time zone as provided by the browser
- // dateObject:
- // Needed because the timezone may vary with time (daylight savings)
- // description:
- // Try to get time zone info from toString or toLocaleString method of
- // the Date object -- UTC offset is not a time zone. See
- // http://www.twinsun.com/tz/tz-link.htm Note: results may be
- // inconsistent across browsers.
-
- var str = dateObject.toString(); // Start looking in toString
- var tz = ''; // The result -- return empty string if nothing found
- var match;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // First look for something in parentheses -- fast lookup, no regex
- var pos = str.indexOf('(');
- if(pos > -1){
- tz = str.substring(++pos, str.indexOf(')'));
- }else{
- // If at first you don't succeed ...
- // If IE knows about the TZ, it appears before the year
- // Capital letters or slash before a 4-digit year
- // at the end of string
- var pat = /([A-Z\/]+) \d{4}$/;
- if((match = str.match(pat))){
- tz = match[1];
- }else{
- // Some browsers (e.g. Safari) glue the TZ on the end
- // of toLocaleString instead of putting it in toString
- str = dateObject.toLocaleString();
- // Capital letters or slash -- end of string,
- // after space
- pat = / ([A-Z\/]+)$/;
- if((match = str.match(pat))){
- tz = match[1];
- }
- }
- }
-
- // Make sure it doesn't somehow end up return AM or PM
- return (tz == 'AM' || tz == 'PM') ? '' : tz; // String
-}
-
-// Utility methods to do arithmetic calculations with Dates
-
-dojo.date.compare = function(/*Date*/date1, /*Date?*/date2, /*String?*/portion){
- // summary:
- // Compare two date objects by date, time, or both.
- // description:
- // Returns 0 if equal, positive if a > b, else negative.
- // date1:
- // Date object
- // date2:
- // Date object. If not specified, the current Date is used.
- // portion:
- // A string indicating the "date" or "time" portion of a Date object.
- // Compares both "date" and "time" by default. One of the following:
- // "date", "time", "datetime"
-
- // Extra step required in copy for IE - see #3112
- date1 = new Date(Number(date1));
- date2 = new Date(Number(date2 || new Date()));
-
- if(typeof portion !== "undefined"){
- if(portion == "date"){
- // Ignore times and compare dates.
- date1.setHours(0, 0, 0, 0);
- date2.setHours(0, 0, 0, 0);
- }else if(portion == "time"){
- // Ignore dates and compare times.
- date1.setFullYear(0, 0, 0);
- date2.setFullYear(0, 0, 0);
- }
- }
-
- if(date1 > date2){ return 1; } // int
- if(date1 < date2){ return -1; } // int
- return 0; // int
-};
-
-dojo.date.add = function(/*Date*/date, /*String*/interval, /*int*/amount){
- // summary:
- // Add to a Date in intervals of different size, from milliseconds to years
- // date: Date
- // Date object to start with
- // interval:
- // A string representing the interval. One of the following:
- // "year", "month", "day", "hour", "minute", "second",
- // "millisecond", "quarter", "week", "weekday"
- // amount:
- // How much to add to the date.
-
- var sum = new Date(Number(date)); // convert to Number before copying to accomodate IE (#3112)
- var fixOvershoot = false;
- var property = "Date";
- switch(interval){
- case "day":
- break;
- case "weekday":
- //i18n FIXME: assumes Saturday/Sunday weekend, but even this is not standard. There are CLDR entries to localize this.
- var days, weeks;
- var adj = 0;
- // Divide the increment time span into weekspans plus leftover days
- // e.g., 8 days is one 5-day weekspan / and two leftover days
- // Can't have zero leftover days, so numbers divisible by 5 get
- // a days value of 5, and the remaining days make up the number of weeks
- var mod = amount % 5;
- if(!mod){
- days = (amount > 0) ? 5 : -5;
- weeks = (amount > 0) ? ((amount-5)/5) : ((amount+5)/5);
- }else{
- days = mod;
- weeks = parseInt(amount/5);
- }
- // Get weekday value for orig date param
- var strt = date.getDay();
- // Orig date is Sat / positive incrementer
- // Jump over Sun
- if(strt == 6 && amount > 0){
- adj = 1;
- }else if(strt == 0 && amount < 0){
- // Orig date is Sun / negative incrementer
- // Jump back over Sat
- adj = -1;
- }
- // Get weekday val for the new date
- var trgt = strt + days;
- // New date is on Sat or Sun
- if(trgt == 0 || trgt == 6){
- adj = (amount > 0) ? 2 : -2;
- }
- // Increment by number of weeks plus leftover days plus
- // weekend adjustments
- amount = 7 * weeks + days + adj;
- break;
- case "year":
- property = "FullYear";
- // Keep increment/decrement from 2/29 out of March
- fixOvershoot = true;
- break;
- case "week":
- amount *= 7;
- break;
- case "quarter":
- // Naive quarter is just three months
- amount *= 3;
- // fallthrough...
- case "month":
- // Reset to last day of month if you overshoot
- fixOvershoot = true;
- property = "Month";
- break;
- case "hour":
- case "minute":
- case "second":
- case "millisecond":
- property = "UTC" + interval.charAt(0).toUpperCase() + interval.substring(1) + "s";
- }
-
- if(property){
- sum["set"+property](sum["get"+property]()+amount);
- }
-
- if(fixOvershoot && (sum.getDate() < date.getDate())){
- sum.setDate(0);
- }
-
- return sum; // Date
+if(!dojo._hasResource["dojo.date"]){
+dojo._hasResource["dojo.date"]=true;
+dojo.provide("dojo.date");
+dojo.date.getDaysInMonth=function(_1){
+var _2=_1.getMonth();
+var _3=[31,28,31,30,31,30,31,31,30,31,30,31];
+if(_2==1&&dojo.date.isLeapYear(_1)){
+return 29;
+}
+return _3[_2];
+};
+dojo.date.isLeapYear=function(_4){
+var _5=_4.getFullYear();
+return !(_5%400)||(!(_5%4)&&!!(_5%100));
+};
+dojo.date.getTimezoneName=function(_6){
+var _7=_6.toString();
+var tz="";
+var _8;
+var _9=_7.indexOf("(");
+if(_9>-1){
+tz=_7.substring(++_9,_7.indexOf(")"));
+}else{
+var _a=/([A-Z\/]+) \d{4}$/;
+if((_8=_7.match(_a))){
+tz=_8[1];
+}else{
+_7=_6.toLocaleString();
+_a=/ ([A-Z\/]+)$/;
+if((_8=_7.match(_a))){
+tz=_8[1];
+}
+}
+}
+return (tz=="AM"||tz=="PM")?"":tz;
+};
+dojo.date.compare=function(_b,_c,_d){
+_b=new Date(+_b);
+_c=new Date(+(_c||new Date()));
+if(_d=="date"){
+_b.setHours(0,0,0,0);
+_c.setHours(0,0,0,0);
+}else{
+if(_d=="time"){
+_b.setFullYear(0,0,0);
+_c.setFullYear(0,0,0);
+}
+}
+if(_b>_c){
+return 1;
+}
+if(_b<_c){
+return -1;
+}
+return 0;
};
-
-dojo.date.difference = function(/*Date*/date1, /*Date?*/date2, /*String?*/interval){
- // summary:
- // Get the difference in a specific unit of time (e.g., number of
- // months, weeks, days, etc.) between two dates, rounded to the
- // nearest integer.
- // date1:
- // Date object
- // date2:
- // Date object. If not specified, the current Date is used.
- // interval:
- // A string representing the interval. One of the following:
- // "year", "month", "day", "hour", "minute", "second",
- // "millisecond", "quarter", "week", "weekday"
- // Defaults to "day".
-
- date2 = date2 || new Date();
- interval = interval || "day";
- var yearDiff = date2.getFullYear() - date1.getFullYear();
- var delta = 1; // Integer return value
-
- switch(interval){
- case "quarter":
- var m1 = date1.getMonth();
- var m2 = date2.getMonth();
- // Figure out which quarter the months are in
- var q1 = Math.floor(m1/3) + 1;
- var q2 = Math.floor(m2/3) + 1;
- // Add quarters for any year difference between the dates
- q2 += (yearDiff * 4);
- delta = q2 - q1;
- break;
- case "weekday":
- var days = Math.round(dojo.date.difference(date1, date2, "day"));
- var weeks = parseInt(dojo.date.difference(date1, date2, "week"));
- var mod = days % 7;
-
- // Even number of weeks
- if(mod == 0){
- days = weeks*5;
- }else{
- // Weeks plus spare change (< 7 days)
- var adj = 0;
- var aDay = date1.getDay();
- var bDay = date2.getDay();
-
- weeks = parseInt(days/7);
- mod = days % 7;
- // Mark the date advanced by the number of
- // round weeks (may be zero)
- var dtMark = new Date(date1);
- dtMark.setDate(dtMark.getDate()+(weeks*7));
- var dayMark = dtMark.getDay();
-
- // Spare change days -- 6 or less
- if(days > 0){
- switch(true){
- // Range starts on Sat
- case aDay == 6:
- adj = -1;
- break;
- // Range starts on Sun
- case aDay == 0:
- adj = 0;
- break;
- // Range ends on Sat
- case bDay == 6:
- adj = -1;
- break;
- // Range ends on Sun
- case bDay == 0:
- adj = -2;
- break;
- // Range contains weekend
- case (dayMark + mod) > 5:
- adj = -2;
- }
- }else if(days < 0){
- switch(true){
- // Range starts on Sat
- case aDay == 6:
- adj = 0;
- break;
- // Range starts on Sun
- case aDay == 0:
- adj = 1;
- break;
- // Range ends on Sat
- case bDay == 6:
- adj = 2;
- break;
- // Range ends on Sun
- case bDay == 0:
- adj = 1;
- break;
- // Range contains weekend
- case (dayMark + mod) < 0:
- adj = 2;
- }
- }
- days += adj;
- days -= (weeks*2);
- }
- delta = days;
- break;
- case "year":
- delta = yearDiff;
- break;
- case "month":
- delta = (date2.getMonth() - date1.getMonth()) + (yearDiff * 12);
- break;
- case "week":
- // Truncate instead of rounding
- // Don't use Math.floor -- value may be negative
- delta = parseInt(dojo.date.difference(date1, date2, "day")/7);
- break;
- case "day":
- delta /= 24;
- // fallthrough
- case "hour":
- delta /= 60;
- // fallthrough
- case "minute":
- delta /= 60;
- // fallthrough
- case "second":
- delta /= 1000;
- // fallthrough
- case "millisecond":
- delta *= date2.getTime() - date1.getTime();
- }
-
- // Round for fractional values and DST leaps
- return Math.round(delta); // Number (integer)
+dojo.date.add=function(_e,_f,_10){
+var sum=new Date(+_e);
+var _11=false;
+var _12="Date";
+switch(_f){
+case "day":
+break;
+case "weekday":
+var _13,_14;
+var mod=_10%5;
+if(!mod){
+_13=(_10>0)?5:-5;
+_14=(_10>0)?((_10-5)/5):((_10+5)/5);
+}else{
+_13=mod;
+_14=parseInt(_10/5);
+}
+var _15=_e.getDay();
+var adj=0;
+if(_15==6&&_10>0){
+adj=1;
+}else{
+if(_15==0&&_10<0){
+adj=-1;
+}
+}
+var _16=_15+_13;
+if(_16==0||_16==6){
+adj=(_10>0)?2:-2;
+}
+_10=(7*_14)+_13+adj;
+break;
+case "year":
+_12="FullYear";
+_11=true;
+break;
+case "week":
+_10*=7;
+break;
+case "quarter":
+_10*=3;
+case "month":
+_11=true;
+_12="Month";
+break;
+default:
+_12="UTC"+_f.charAt(0).toUpperCase()+_f.substring(1)+"s";
+}
+if(_12){
+sum["set"+_12](sum["get"+_12]()+_10);
+}
+if(_11&&(sum.getDate()<_e.getDate())){
+sum.setDate(0);
+}
+return sum;
};
-
+dojo.date.difference=function(_17,_18,_19){
+_18=_18||new Date();
+_19=_19||"day";
+var _1a=_18.getFullYear()-_17.getFullYear();
+var _1b=1;
+switch(_19){
+case "quarter":
+var m1=_17.getMonth();
+var m2=_18.getMonth();
+var q1=Math.floor(m1/3)+1;
+var q2=Math.floor(m2/3)+1;
+q2+=(_1a*4);
+_1b=q2-q1;
+break;
+case "weekday":
+var _1c=Math.round(dojo.date.difference(_17,_18,"day"));
+var _1d=parseInt(dojo.date.difference(_17,_18,"week"));
+var mod=_1c%7;
+if(mod==0){
+_1c=_1d*5;
+}else{
+var adj=0;
+var _1e=_17.getDay();
+var _1f=_18.getDay();
+_1d=parseInt(_1c/7);
+mod=_1c%7;
+var _20=new Date(_17);
+_20.setDate(_20.getDate()+(_1d*7));
+var _21=_20.getDay();
+if(_1c>0){
+switch(true){
+case _1e==6:
+adj=-1;
+break;
+case _1e==0:
+adj=0;
+break;
+case _1f==6:
+adj=-1;
+break;
+case _1f==0:
+adj=-2;
+break;
+case (_21+mod)>5:
+adj=-2;
}
+}else{
+if(_1c<0){
+switch(true){
+case _1e==6:
+adj=0;
+break;
+case _1e==0:
+adj=1;
+break;
+case _1f==6:
+adj=2;
+break;
+case _1f==0:
+adj=1;
+break;
+case (_21+mod)<0:
+adj=2;
+}
+}
+}
+_1c+=adj;
+_1c-=(_1d*2);
+}
+_1b=_1c;
+break;
+case "year":
+_1b=_1a;
+break;
+case "month":
+_1b=(_18.getMonth()-_17.getMonth())+(_1a*12);
+break;
+case "week":
+_1b=parseInt(dojo.date.difference(_17,_18,"day")/7);
+break;
+case "day":
+_1b/=24;
+case "hour":
+_1b/=60;
+case "minute":
+_1b/=60;
+case "second":
+_1b/=1000;
+case "millisecond":
+_1b*=_18.getTime()-_17.getTime();
+}
+return Math.round(_1b);
+};
+}
diff --git a/js/dojo/dojo/date/locale.js b/js/dojo/dojo/date/locale.js
--- a/js/dojo/dojo/date/locale.js
+++ b/js/dojo/dojo/date/locale.js
@@ -1,644 +1,466 @@
-if(!dojo._hasResource["dojo.date.locale"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.date.locale"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo.date.locale"]){
+dojo._hasResource["dojo.date.locale"]=true;
dojo.provide("dojo.date.locale");
-
-// Localization methods for Date. Honor local customs using locale-dependent dojo.cldr data.
-
dojo.require("dojo.date");
dojo.require("dojo.cldr.supplemental");
dojo.require("dojo.regexp");
dojo.require("dojo.string");
dojo.require("dojo.i18n");
-
-// Load the bundles containing localization information for
-// names and formats
-dojo.requireLocalization("dojo.cldr", "gregorian", null, "ko,zh-cn,zh,ja,en,it-it,en-ca,en-au,it,en-gb,es-es,fr,pt,ROOT,ko-kr,es,de,pt-br");
-
-//NOTE: Everything in this module assumes Gregorian calendars.
-// Other calendars will be implemented in separate modules.
-
+dojo.requireLocalization("dojo.cldr","gregorian",null,"ROOT,ar,ca,cs,da,de,el,en,en-au,en-ca,en-gb,es,es-es,fi,fr,he,hu,it,it-it,ja,ko,ko-kr,nb,nl,pl,pt,pt-br,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-cn,zh-tw");
(function(){
- // Format a pattern without literals
- function formatPattern(dateObject, bundle, pattern){
- return pattern.replace(/([a-z])\1*/ig, function(match){
- var s;
- var c = match.charAt(0);
- var l = match.length;
- var pad;
- var widthList = ["abbr", "wide", "narrow"];
- switch(c){
- case 'G':
- s = bundle[(l < 4) ? "eraAbbr" : "eraNames"][dateObject.getFullYear() < 0 ? 0 : 1];
- break;
- case 'y':
- s = dateObject.getFullYear();
- switch(l){
- case 1:
- break;
- case 2:
- s = String(s); s = s.substr(s.length - 2);
- break;
- default:
- pad = true;
- }
- break;
- case 'Q':
- case 'q':
- s = Math.ceil((dateObject.getMonth()+1)/3);
-// switch(l){
-// case 1: case 2:
- pad = true;
-// break;
-// case 3: case 4: // unimplemented
-// }
- break;
- case 'M':
- case 'L':
- var m = dateObject.getMonth();
- var width;
- switch(l){
- case 1: case 2:
- s = m+1; pad = true;
- break;
- case 3: case 4: case 5:
- width = widthList[l-3];
- break;
- }
- if(width){
- var type = (c == "L") ? "standalone" : "format";
- var prop = ["months",type,width].join("-");
- s = bundle[prop][m];
- }
- break;
- case 'w':
- var firstDay = 0;
- s = dojo.date.locale._getWeekOfYear(dateObject, firstDay); pad = true;
- break;
- case 'd':
- s = dateObject.getDate(); pad = true;
- break;
- case 'D':
- s = dojo.date.locale._getDayOfYear(dateObject); pad = true;
- break;
- case 'E':
- case 'e':
- case 'c': // REVIEW: don't see this in the spec?
- var d = dateObject.getDay();
- var width;
- switch(l){
- case 1: case 2:
- if(c == 'e'){
- var first = dojo.cldr.supplemental.getFirstDayOfWeek(options.locale);
- d = (d-first+7)%7;
- }
- if(c != 'c'){
- s = d+1; pad = true;
- break;
- }
- // else fallthrough...
- case 3: case 4: case 5:
- width = widthList[l-3];
- break;
- }
- if(width){
- var type = (c == "c") ? "standalone" : "format";
- var prop = ["days",type,width].join("-");
- s = bundle[prop][d];
- }
- break;
- case 'a':
- var timePeriod = (dateObject.getHours() < 12) ? 'am' : 'pm';
- s = bundle[timePeriod];
- break;
- case 'h':
- case 'H':
- case 'K':
- case 'k':
- var h = dateObject.getHours();
- // strange choices in the date format make it impossible to write this succinctly
- switch (c) {
- case 'h': // 1-12
- s = (h % 12) || 12;
- break;
- case 'H': // 0-23
- s = h;
- break;
- case 'K': // 0-11
- s = (h % 12);
- break;
- case 'k': // 1-24
- s = h || 24;
- break;
- }
- pad = true;
- break;
- case 'm':
- s = dateObject.getMinutes(); pad = true;
- break;
- case 's':
- s = dateObject.getSeconds(); pad = true;
- break;
- case 'S':
- s = Math.round(dateObject.getMilliseconds() * Math.pow(10, l-3));
- break;
- case 'v': // FIXME: don't know what this is. seems to be same as z?
- case 'z':
- // We only have one timezone to offer; the one from the browser
- s = dojo.date.getTimezoneName(dateObject);
- if(s){break;}
- l=4;
- // fallthrough... use GMT if tz not available
- case 'Z':
- var offset = dateObject.getTimezoneOffset();
- var tz = [
- (offset<=0 ? "+" : "-"),
- dojo.string.pad(Math.floor(Math.abs(offset)/60), 2),
- dojo.string.pad(Math.abs(offset)% 60, 2)
- ];
- if(l==4){
- tz.splice(0, 0, "GMT");
- tz.splice(3, 0, ":");
- }
- s = tz.join("");
- break;
-// case 'Y': case 'u': case 'W': case 'F': case 'g': case 'A':
-// console.debug(match+" modifier unimplemented");
- default:
- throw new Error("dojo.date.locale.format: invalid pattern char: "+pattern);
- }
- if(pad){ s = dojo.string.pad(s, l); }
- return s;
- });
- }
-
-dojo.date.locale.format = function(/*Date*/dateObject, /*Object?*/options){
- // summary:
- // Format a Date object as a String, using locale-specific settings.
- //
- // description:
- // Create a string from a Date object using a known localized pattern.
- // By default, this method formats both date and time from dateObject.
- // Formatting patterns are chosen appropriate to the locale. Different
- // formatting lengths may be chosen, with "full" used by default.
- // Custom patterns may be used or registered with translations using
- // the addCustomFormats method.
- // Formatting patterns are implemented using the syntax described at
- // http://www.unicode.org/reports/tr35/tr35-4.html#Date_Format_Patterns
- //
- // dateObject:
- // the date and/or time to be formatted. If a time only is formatted,
- // the values in the year, month, and day fields are irrelevant. The
- // opposite is true when formatting only dates.
- //
- // options: object {selector: string, formatLength: string, datePattern: string, timePattern: string, locale: string}
- // selector- choice of 'time','date' (default: date and time)
- // formatLength- choice of long, short, medium or full (plus any custom additions). Defaults to 'short'
- // datePattern,timePattern- override pattern with this string
- // am,pm- override strings for am/pm in times
- // locale- override the locale used to determine formatting rules
-
- options = options || {};
-
- var locale = dojo.i18n.normalizeLocale(options.locale);
- var formatLength = options.formatLength || 'short';
- var bundle = dojo.date.locale._getGregorianBundle(locale);
- var str = [];
- var sauce = dojo.hitch(this, formatPattern, dateObject, bundle);
- if(options.selector == "year"){
- // Special case as this is not yet driven by CLDR data
- var year = dateObject.getFullYear();
- if(locale.match(/^zh|^ja/)){
- year += "\u5E74";
- }
- return year;
- }
- if(options.selector != "time"){
- var datePattern = options.datePattern || bundle["dateFormat-"+formatLength];
- if(datePattern){str.push(_processPattern(datePattern, sauce));}
- }
- if(options.selector != "date"){
- var timePattern = options.timePattern || bundle["timeFormat-"+formatLength];
- if(timePattern){str.push(_processPattern(timePattern, sauce));}
- }
- var result = str.join(" "); //TODO: use locale-specific pattern to assemble date + time
- return result; // String
+function _1(_2,_3,_4,_5){
+return _5.replace(/([a-z])\1*/ig,function(_6){
+var s,_7,c=_6.charAt(0),l=_6.length,_8=["abbr","wide","narrow"];
+switch(c){
+case "G":
+s=_3[(l<4)?"eraAbbr":"eraNames"][_2.getFullYear()<0?0:1];
+break;
+case "y":
+s=_2.getFullYear();
+switch(l){
+case 1:
+break;
+case 2:
+if(!_4.fullYear){
+s=String(s);
+s=s.substr(s.length-2);
+break;
+}
+default:
+_7=true;
+}
+break;
+case "Q":
+case "q":
+s=Math.ceil((_2.getMonth()+1)/3);
+_7=true;
+break;
+case "M":
+var m=_2.getMonth();
+if(l<3){
+s=m+1;
+_7=true;
+}else{
+var _9=["months","format",_8[l-3]].join("-");
+s=_3[_9][m];
+}
+break;
+case "w":
+var _a=0;
+s=dojo.date.locale._getWeekOfYear(_2,_a);
+_7=true;
+break;
+case "d":
+s=_2.getDate();
+_7=true;
+break;
+case "D":
+s=dojo.date.locale._getDayOfYear(_2);
+_7=true;
+break;
+case "E":
+var d=_2.getDay();
+if(l<3){
+s=d+1;
+_7=true;
+}else{
+var _b=["days","format",_8[l-3]].join("-");
+s=_3[_b][d];
+}
+break;
+case "a":
+var _c=(_2.getHours()<12)?"am":"pm";
+s=_3[_c];
+break;
+case "h":
+case "H":
+case "K":
+case "k":
+var h=_2.getHours();
+switch(c){
+case "h":
+s=(h%12)||12;
+break;
+case "H":
+s=h;
+break;
+case "K":
+s=(h%12);
+break;
+case "k":
+s=h||24;
+break;
+}
+_7=true;
+break;
+case "m":
+s=_2.getMinutes();
+_7=true;
+break;
+case "s":
+s=_2.getSeconds();
+_7=true;
+break;
+case "S":
+s=Math.round(_2.getMilliseconds()*Math.pow(10,l-3));
+_7=true;
+break;
+case "v":
+case "z":
+s=dojo.date.locale._getZone(_2,true,_4);
+if(s){
+break;
+}
+l=4;
+case "Z":
+var _d=dojo.date.locale._getZone(_2,false,_4);
+var tz=[(_d<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_d)/60),2),dojo.string.pad(Math.abs(_d)%60,2)];
+if(l==4){
+tz.splice(0,0,"GMT");
+tz.splice(3,0,":");
+}
+s=tz.join("");
+break;
+default:
+throw new Error("dojo.date.locale.format: invalid pattern char: "+_5);
+}
+if(_7){
+s=dojo.string.pad(s,l);
+}
+return s;
+});
};
-
-dojo.date.locale.regexp = function(/*Object?*/options){
- // summary:
- // Builds the regular needed to parse a localized date
- //
- // options: object {selector: string, formatLength: string, datePattern: string, timePattern: string, locale: string, strict: boolean}
- // selector- choice of 'time', 'date' (default: date and time)
- // formatLength- choice of long, short, medium or full (plus any custom additions). Defaults to 'short'
- // datePattern,timePattern- override pattern with this string
- // locale- override the locale used to determine formatting rules
-
- return dojo.date.locale._parseInfo(options).regexp; // String
+dojo.date.locale._getZone=function(_e,_f,_10){
+if(_f){
+return dojo.date.getTimezoneName(_e);
+}else{
+return _e.getTimezoneOffset();
+}
};
-
-dojo.date.locale._parseInfo = function(/*Object?*/options){
- options = options || {};
- var locale = dojo.i18n.normalizeLocale(options.locale);
- var bundle = dojo.date.locale._getGregorianBundle(locale);
- var formatLength = options.formatLength || 'short';
- var datePattern = options.datePattern || bundle["dateFormat-" + formatLength];
- var timePattern = options.timePattern || bundle["timeFormat-" + formatLength];
- var pattern;
- if(options.selector == 'date'){
- pattern = datePattern;
- }else if(options.selector == 'time'){
- pattern = timePattern;
- }else{
- pattern = datePattern + ' ' + timePattern; //TODO: use locale-specific pattern to assemble date + time
- }
-
- var tokens = [];
- var re = _processPattern(pattern, dojo.hitch(this, _buildDateTimeRE, tokens, bundle, options));
- return {regexp: re, tokens: tokens, bundle: bundle};
+dojo.date.locale.format=function(_11,_12){
+_12=_12||{};
+var _13=dojo.i18n.normalizeLocale(_12.locale),_14=_12.formatLength||"short",_15=dojo.date.locale._getGregorianBundle(_13),str=[],_16=dojo.hitch(this,_1,_11,_15,_12);
+if(_12.selector=="year"){
+return _17(_15["dateFormatItem-yyyy"]||"yyyy",_16);
+}
+var _18;
+if(_12.selector!="date"){
+_18=_12.timePattern||_15["timeFormat-"+_14];
+if(_18){
+str.push(_17(_18,_16));
+}
+}
+if(_12.selector!="time"){
+_18=_12.datePattern||_15["dateFormat-"+_14];
+if(_18){
+str.push(_17(_18,_16));
+}
+}
+return str.length==1?str[0]:_15["dateTimeFormat-"+_14].replace(/\{(\d+)\}/g,function(_19,key){
+return str[key];
+});
+};
+dojo.date.locale.regexp=function(_1a){
+return dojo.date.locale._parseInfo(_1a).regexp;
+};
+dojo.date.locale._parseInfo=function(_1b){
+_1b=_1b||{};
+var _1c=dojo.i18n.normalizeLocale(_1b.locale),_1d=dojo.date.locale._getGregorianBundle(_1c),_1e=_1b.formatLength||"short",_1f=_1b.datePattern||_1d["dateFormat-"+_1e],_20=_1b.timePattern||_1d["timeFormat-"+_1e],_21;
+if(_1b.selector=="date"){
+_21=_1f;
+}else{
+if(_1b.selector=="time"){
+_21=_20;
+}else{
+_21=_1d["dateTimeFormat-"+_1e].replace(/\{(\d+)\}/g,function(_22,key){
+return [_20,_1f][key];
+});
+}
+}
+var _23=[],re=_17(_21,dojo.hitch(this,_24,_23,_1d,_1b));
+return {regexp:re,tokens:_23,bundle:_1d};
};
-
-dojo.date.locale.parse = function(/*String*/value, /*Object?*/options){
- // summary:
- // Convert a properly formatted string to a primitive Date object,
- // using locale-specific settings.
- //
- // description:
- // Create a Date object from a string using a known localized pattern.
- // By default, this method parses looking for both date and time in the string.
- // Formatting patterns are chosen appropriate to the locale. Different
- // formatting lengths may be chosen, with "full" used by default.
- // Custom patterns may be used or registered with translations using
- // the addCustomFormats method.
- // Formatting patterns are implemented using the syntax described at
- // http://www.unicode.org/reports/tr35/#Date_Format_Patterns
- //
- // value:
- // A string representation of a date
- //
- // options: object {selector: string, formatLength: string, datePattern: string, timePattern: string, locale: string, strict: boolean}
- // selector- choice of 'time', 'date' (default: date and time)
- // formatLength- choice of long, short, medium or full (plus any custom additions). Defaults to 'short'
- // datePattern,timePattern- override pattern with this string
- // am,pm- override strings for am/pm in times
- // locale- override the locale used to determine formatting rules
- // strict- strict parsing, off by default
-
- var info = dojo.date.locale._parseInfo(options);
- var tokens = info.tokens, bundle = info.bundle;
- var re = new RegExp("^" + info.regexp + "$");
- var match = re.exec(value);
- if(!match){ return null; } // null
-
- var widthList = ['abbr', 'wide', 'narrow'];
- //1972 is a leap year. We want to avoid Feb 29 rolling over into Mar 1,
- //in the cases where the year is parsed after the month and day.
- var result = new Date(1972, 0);
- var expected = {};
- var amPm = "";
- dojo.forEach(match, function(v, i){
- if(!i){return;}
- var token=tokens[i-1];
- var l=token.length;
- switch(token.charAt(0)){
- case 'y':
- if(l != 2){
- //interpret year literally, so '5' would be 5 A.D.
- result.setFullYear(v);
- expected.year = v;
- }else{
- if(v<100){
- v = Number(v);
- //choose century to apply, according to a sliding window
- //of 80 years before and 20 years after present year
- var year = '' + new Date().getFullYear();
- var century = year.substring(0, 2) * 100;
- var yearPart = Number(year.substring(2, 4));
- var cutoff = Math.min(yearPart + 20, 99);
- var num = (v < cutoff) ? century + v : century - 100 + v;
- result.setFullYear(num);
- expected.year = num;
- }else{
- //we expected 2 digits and got more...
- if(options.strict){
- return null;
- }
- //interpret literally, so '150' would be 150 A.D.
- //also tolerate '1950', if 'yyyy' input passed to 'yy' format
- result.setFullYear(v);
- expected.year = v;
- }
- }
- break;
- case 'M':
- if(l>2){
- var months = bundle['months-format-' + widthList[l-3]].concat();
- if(!options.strict){
- //Tolerate abbreviating period in month part
- //Case-insensitive comparison
- v = v.replace(".","").toLowerCase();
- months = dojo.map(months, function(s){ return s.replace(".","").toLowerCase(); } );
- }
- v = dojo.indexOf(months, v);
- if(v == -1){
-// console.debug("dojo.date.locale.parse: Could not parse month name: '" + v + "'.");
- return null;
- }
- }else{
- v--;
- }
- result.setMonth(v);
- expected.month = v;
- break;
- case 'E':
- case 'e':
- var days = bundle['days-format-' + widthList[l-3]].concat();
- if(!options.strict){
- //Case-insensitive comparison
- v = v.toLowerCase();
- days = dojo.map(days, "".toLowerCase);
- }
- v = dojo.indexOf(days, v);
- if(v == -1){
-// console.debug("dojo.date.locale.parse: Could not parse weekday name: '" + v + "'.");
- return null;
- }
-
- //TODO: not sure what to actually do with this input,
- //in terms of setting something on the Date obj...?
- //without more context, can't affect the actual date
- //TODO: just validate?
- break;
- case 'd':
- result.setDate(v);
- expected.date = v;
- break;
- case 'D':
- //FIXME: need to defer this until after the year is set for leap-year?
- result.setMonth(0);
- result.setDate(v);
- break;
- case 'a': //am/pm
- var am = options.am || bundle.am;
- var pm = options.pm || bundle.pm;
- if(!options.strict){
- var period = /\./g;
- v = v.replace(period,'').toLowerCase();
- am = am.replace(period,'').toLowerCase();
- pm = pm.replace(period,'').toLowerCase();
- }
- if(options.strict && v != am && v != pm){
-// console.debug("dojo.date.locale.parse: Could not parse am/pm part.");
- return null;
- }
-
- // we might not have seen the hours field yet, so store the state and apply hour change later
- amPm = (v == pm) ? 'p' : (v == am) ? 'a' : '';
- break;
- case 'K': //hour (1-24)
- if(v==24){v=0;}
- // fallthrough...
- case 'h': //hour (1-12)
- case 'H': //hour (0-23)
- case 'k': //hour (0-11)
- //TODO: strict bounds checking, padding
- if(v > 23){
-// console.debug("dojo.date.locale.parse: Illegal hours value");
- return null;
- }
-
- //in the 12-hour case, adjusting for am/pm requires the 'a' part
- //which could come before or after the hour, so we will adjust later
- result.setHours(v);
- break;
- case 'm': //minutes
- result.setMinutes(v);
- break;
- case 's': //seconds
- result.setSeconds(v);
- break;
- case 'S': //milliseconds
- result.setMilliseconds(v);
-// break;
-// case 'w':
-//TODO var firstDay = 0;
-// default:
-//TODO: throw?
-// console.debug("dojo.date.locale.parse: unsupported pattern char=" + token.charAt(0));
- }
- });
-
- var hours = result.getHours();
- if(amPm === 'p' && hours < 12){
- result.setHours(hours + 12); //e.g., 3pm -> 15
- }else if(amPm === 'a' && hours == 12){
- result.setHours(0); //12am -> 0
- }
-
- //validate parse date fields versus input date fields
- if(expected.year && result.getFullYear() != expected.year){
-// console.debug("dojo.date.locale.parse: Parsed year: '" + result.getFullYear() + "' did not match input year: '" + expected.year + "'.");
- return null;
- }
- if(expected.month && result.getMonth() != expected.month){
-// console.debug("dojo.date.locale.parse: Parsed month: '" + result.getMonth() + "' did not match input month: '" + expected.month + "'.");
- return null;
- }
- if(expected.date && result.getDate() != expected.date){
-// console.debug("dojo.date.locale.parse: Parsed day of month: '" + result.getDate() + "' did not match input day of month: '" + expected.date + "'.");
- return null;
- }
-
- //TODO: implement a getWeekday() method in order to test
- //validity of input strings containing 'EEE' or 'EEEE'...
- return result; // Date
+dojo.date.locale.parse=function(_25,_26){
+var _27=dojo.date.locale._parseInfo(_26),_28=_27.tokens,_29=_27.bundle,re=new RegExp("^"+_27.regexp+"$",_27.strict?"":"i"),_2a=re.exec(_25);
+if(!_2a){
+return null;
+}
+var _2b=["abbr","wide","narrow"],_2c=[1970,0,1,0,0,0,0],_2d="",_2e=dojo.every(_2a,function(v,i){
+if(!i){
+return true;
+}
+var _2f=_28[i-1];
+var l=_2f.length;
+switch(_2f.charAt(0)){
+case "y":
+if(l!=2&&_26.strict){
+_2c[0]=v;
+}else{
+if(v<100){
+v=Number(v);
+var _30=""+new Date().getFullYear(),_31=_30.substring(0,2)*100,_32=Math.min(Number(_30.substring(2,4))+20,99),num=(v<_32)?_31+v:_31-100+v;
+_2c[0]=num;
+}else{
+if(_26.strict){
+return false;
+}
+_2c[0]=v;
+}
+}
+break;
+case "M":
+if(l>2){
+var _33=_29["months-format-"+_2b[l-3]].concat();
+if(!_26.strict){
+v=v.replace(".","").toLowerCase();
+_33=dojo.map(_33,function(s){
+return s.replace(".","").toLowerCase();
+});
+}
+v=dojo.indexOf(_33,v);
+if(v==-1){
+return false;
+}
+}else{
+v--;
+}
+_2c[1]=v;
+break;
+case "E":
+case "e":
+var _34=_29["days-format-"+_2b[l-3]].concat();
+if(!_26.strict){
+v=v.toLowerCase();
+_34=dojo.map(_34,function(d){
+return d.toLowerCase();
+});
+}
+v=dojo.indexOf(_34,v);
+if(v==-1){
+return false;
+}
+break;
+case "D":
+_2c[1]=0;
+case "d":
+_2c[2]=v;
+break;
+case "a":
+var am=_26.am||_29.am;
+var pm=_26.pm||_29.pm;
+if(!_26.strict){
+var _35=/\./g;
+v=v.replace(_35,"").toLowerCase();
+am=am.replace(_35,"").toLowerCase();
+pm=pm.replace(_35,"").toLowerCase();
+}
+if(_26.strict&&v!=am&&v!=pm){
+return false;
+}
+_2d=(v==pm)?"p":(v==am)?"a":"";
+break;
+case "K":
+if(v==24){
+v=0;
+}
+case "h":
+case "H":
+case "k":
+if(v>23){
+return false;
+}
+_2c[3]=v;
+break;
+case "m":
+_2c[4]=v;
+break;
+case "s":
+_2c[5]=v;
+break;
+case "S":
+_2c[6]=v;
+}
+return true;
+});
+var _36=+_2c[3];
+if(_2d==="p"&&_36<12){
+_2c[3]=_36+12;
+}else{
+if(_2d==="a"&&_36==12){
+_2c[3]=0;
+}
+}
+var _37=new Date(_2c[0],_2c[1],_2c[2],_2c[3],_2c[4],_2c[5],_2c[6]);
+if(_26.strict){
+_37.setFullYear(_2c[0]);
+}
+var _38=_28.join(""),_39=_38.indexOf("d")!=-1,_3a=_38.indexOf("M")!=-1;
+if(!_2e||(_3a&&_37.getMonth()>_2c[1])||(_39&&_37.getDate()>_2c[2])){
+return null;
+}
+if((_3a&&_37.getMonth()<_2c[1])||(_39&&_37.getDate()<_2c[2])){
+_37=dojo.date.add(_37,"hour",1);
+}
+return _37;
};
-
-function _processPattern(pattern, applyPattern, applyLiteral, applyAll){
- //summary: Process a pattern with literals in it
-
- // Break up on single quotes, treat every other one as a literal, except '' which becomes '
- var identity = function(x){return x;};
- applyPattern = applyPattern || identity;
- applyLiteral = applyLiteral || identity;
- applyAll = applyAll || identity;
-
- //split on single quotes (which escape literals in date format strings)
- //but preserve escaped single quotes (e.g., o''clock)
- var chunks = pattern.match(/(''|[^'])+/g);
- var literal = false;
-
- dojo.forEach(chunks, function(chunk, i){
- if(!chunk){
- chunks[i]='';
- }else{
- chunks[i]=(literal ? applyLiteral : applyPattern)(chunk);
- literal = !literal;
- }
- });
- return applyAll(chunks.join(''));
+function _17(_3b,_3c,_3d,_3e){
+var _3f=function(x){
+return x;
+};
+_3c=_3c||_3f;
+_3d=_3d||_3f;
+_3e=_3e||_3f;
+var _40=_3b.match(/(''|[^'])+/g),_41=_3b.charAt(0)=="'";
+dojo.forEach(_40,function(_42,i){
+if(!_42){
+_40[i]="";
+}else{
+_40[i]=(_41?_3d:_3c)(_42);
+_41=!_41;
+}
+});
+return _3e(_40.join(""));
+};
+function _24(_43,_44,_45,_46){
+_46=dojo.regexp.escapeString(_46);
+if(!_45.strict){
+_46=_46.replace(" a"," ?a");
+}
+return _46.replace(/([a-z])\1*/ig,function(_47){
+var s,c=_47.charAt(0),l=_47.length,p2="",p3="";
+if(_45.strict){
+if(l>1){
+p2="0"+"{"+(l-1)+"}";
+}
+if(l>2){
+p3="0"+"{"+(l-2)+"}";
+}
+}else{
+p2="0?";
+p3="0{0,2}";
}
-
-function _buildDateTimeRE(tokens, bundle, options, pattern){
- pattern = dojo.regexp.escapeString(pattern);
- if(!options.strict){ pattern = pattern.replace(" a", " ?a"); } // kludge to tolerate no space before am/pm
- return pattern.replace(/([a-z])\1*/ig, function(match){
- // Build a simple regexp. Avoid captures, which would ruin the tokens list
- var s;
- var c = match.charAt(0);
- var l = match.length;
- var p2 = '', p3 = '';
- if(options.strict){
- if(l > 1){ p2 = '0' + '{'+(l-1)+'}'; }
- if(l > 2){ p3 = '0' + '{'+(l-2)+'}'; }
- }else{
- p2 = '0?'; p3 = '0{0,2}';
- }
- switch(c){
- case 'y':
- s = '\\d{2,4}';
- break;
- case 'M':
- s = (l>2) ? '\\S+' : p2+'[1-9]|1[0-2]';
- break;
- case 'D':
- s = p2+'[1-9]|'+p3+'[1-9][0-9]|[12][0-9][0-9]|3[0-5][0-9]|36[0-6]';
- break;
- case 'd':
- s = p2+'[1-9]|[12]\\d|3[01]';
- break;
- case 'w':
- s = p2+'[1-9]|[1-4][0-9]|5[0-3]';
- break;
- case 'E':
- s = '\\S+';
- break;
- case 'h': //hour (1-12)
- s = p2+'[1-9]|1[0-2]';
- break;
- case 'k': //hour (0-11)
- s = p2+'\\d|1[01]';
- break;
- case 'H': //hour (0-23)
- s = p2+'\\d|1\\d|2[0-3]';
- break;
- case 'K': //hour (1-24)
- s = p2+'[1-9]|1\\d|2[0-4]';
- break;
- case 'm':
- case 's':
- s = '[0-5]\\d';
- break;
- case 'S':
- s = '\\d{'+l+'}';
- break;
- case 'a':
- var am = options.am || bundle.am || 'AM';
- var pm = options.pm || bundle.pm || 'PM';
- if(options.strict){
- s = am + '|' + pm;
- }else{
- s = am + '|' + pm;
- if(am != am.toLowerCase()){ s += '|' + am.toLowerCase(); }
- if(pm != pm.toLowerCase()){ s += '|' + pm.toLowerCase(); }
- }
- break;
- default:
- // case 'v':
- // case 'z':
- // case 'Z':
- s = ".*";
-// console.debug("parse of date format, pattern=" + pattern);
- }
-
- if(tokens){ tokens.push(match); }
-
- return "(" + s + ")"; // add capture
- }).replace(/[\xa0 ]/g, "[\\s\\xa0]"); // normalize whitespace. Need explicit handling of \xa0 for IE.
+switch(c){
+case "y":
+s="\\d{2,4}";
+break;
+case "M":
+s=(l>2)?"\\S+?":p2+"[1-9]|1[0-2]";
+break;
+case "D":
+s=p2+"[1-9]|"+p3+"[1-9][0-9]|[12][0-9][0-9]|3[0-5][0-9]|36[0-6]";
+break;
+case "d":
+s="[12]\\d|"+p2+"[1-9]|3[01]";
+break;
+case "w":
+s=p2+"[1-9]|[1-4][0-9]|5[0-3]";
+break;
+case "E":
+s="\\S+";
+break;
+case "h":
+s=p2+"[1-9]|1[0-2]";
+break;
+case "k":
+s=p2+"\\d|1[01]";
+break;
+case "H":
+s=p2+"\\d|1\\d|2[0-3]";
+break;
+case "K":
+s=p2+"[1-9]|1\\d|2[0-4]";
+break;
+case "m":
+case "s":
+s="[0-5]\\d";
+break;
+case "S":
+s="\\d{"+l+"}";
+break;
+case "a":
+var am=_45.am||_44.am||"AM";
+var pm=_45.pm||_44.pm||"PM";
+if(_45.strict){
+s=am+"|"+pm;
+}else{
+s=am+"|"+pm;
+if(am!=am.toLowerCase()){
+s+="|"+am.toLowerCase();
}
-})();
-
-(function(){
-var _customFormats = [];
-dojo.date.locale.addCustomFormats = function(/*String*/packageName, /*String*/bundleName){
- // summary:
- // Add a reference to a bundle containing localized custom formats to be
- // used by date/time formatting and parsing routines.
- //
- // description:
- // The user may add custom localized formats where the bundle has properties following the
- // same naming convention used by dojo for the CLDR data: dateFormat-xxxx / timeFormat-xxxx
- // The pattern string should match the format used by the CLDR.
- // See dojo.date.format for details.
- // The resources must be loaded by dojo.requireLocalization() prior to use
-
- _customFormats.push({pkg:packageName,name:bundleName});
-};
-
-dojo.date.locale._getGregorianBundle = function(/*String*/locale){
- var gregorian = {};
- dojo.forEach(_customFormats, function(desc){
- var bundle = dojo.i18n.getLocalization(desc.pkg, desc.name, locale);
- gregorian = dojo.mixin(gregorian, bundle);
- }, this);
- return gregorian; /*Object*/
+if(pm!=pm.toLowerCase()){
+s+="|"+pm.toLowerCase();
+}
+if(s.indexOf(".")!=-1){
+s+="|"+s.replace(/\./g,"");
+}
+}
+s=s.replace(/\./g,"\\.");
+break;
+default:
+s=".*";
+}
+if(_43){
+_43.push(_47);
+}
+return "("+s+")";
+}).replace(/[\xa0 ]/g,"[\\s\\xa0]");
};
})();
-
-dojo.date.locale.addCustomFormats("dojo.cldr","gregorian");
-
-dojo.date.locale.getNames = function(/*String*/item, /*String*/type, /*String?*/use, /*String?*/locale){
- // summary:
- // Used to get localized strings from dojo.cldr for day or month names.
- //
- // item: 'months' || 'days'
- // type: 'wide' || 'narrow' || 'abbr' (e.g. "Monday", "Mon", or "M" respectively, in English)
- // use: 'standAlone' || 'format' (default)
- // locale: override locale used to find the names
-
- var label;
- var lookup = dojo.date.locale._getGregorianBundle(locale);
- var props = [item, use, type];
- if(use == 'standAlone'){
- label = lookup[props.join('-')];
- }
- props[1] = 'format';
-
- // return by copy so changes won't be made accidentally to the in-memory model
- return (label || lookup[props.join('-')]).concat(); /*Array*/
+(function(){
+var _48=[];
+dojo.date.locale.addCustomFormats=function(_49,_4a){
+_48.push({pkg:_49,name:_4a});
+};
+dojo.date.locale._getGregorianBundle=function(_4b){
+var _4c={};
+dojo.forEach(_48,function(_4d){
+var _4e=dojo.i18n.getLocalization(_4d.pkg,_4d.name,_4b);
+_4c=dojo.mixin(_4c,_4e);
+},this);
+return _4c;
};
-
-dojo.date.locale.isWeekend = function(/*Date?*/dateObject, /*String?*/locale){
- // summary:
- // Determines if the date falls on a weekend, according to local custom.
-
- var weekend = dojo.cldr.supplemental.getWeekend(locale);
- var day = (dateObject || new Date()).getDay();
- if(weekend.end < weekend.start){
- weekend.end += 7;
- if(day < weekend.start){ day += 7; }
- }
- return day >= weekend.start && day <= weekend.end; // Boolean
+})();
+dojo.date.locale.addCustomFormats("dojo.cldr","gregorian");
+dojo.date.locale.getNames=function(_4f,_50,_51,_52){
+var _53,_54=dojo.date.locale._getGregorianBundle(_52),_55=[_4f,_51,_50];
+if(_51=="standAlone"){
+var key=_55.join("-");
+_53=_54[key];
+if(_53[0]==1){
+_53=undefined;
+}
+}
+_55[1]="format";
+return (_53||_54[_55.join("-")]).concat();
};
-
-// These are used only by format and strftime. Do they need to be public? Which module should they go in?
-
-dojo.date.locale._getDayOfYear = function(/*Date*/dateObject){
- // summary: gets the day of the year as represented by dateObject
- return dojo.date.difference(new Date(dateObject.getFullYear(), 0, 1), dateObject) + 1; // Number
+dojo.date.locale.isWeekend=function(_56,_57){
+var _58=dojo.cldr.supplemental.getWeekend(_57),day=(_56||new Date()).getDay();
+if(_58.end<_58.start){
+_58.end+=7;
+if(day<_58.start){
+day+=7;
+}
+}
+return day>=_58.start&&day<=_58.end;
};
-
-dojo.date.locale._getWeekOfYear = function(/*Date*/dateObject, /*Number*/firstDayOfWeek){
- if(arguments.length == 1){ firstDayOfWeek = 0; } // Sunday
-
- var firstDayOfYear = new Date(dateObject.getFullYear(), 0, 1).getDay();
- var adj = (firstDayOfYear - firstDayOfWeek + 7) % 7;
- var week = Math.floor((dojo.date.locale._getDayOfYear(dateObject) + adj - 1) / 7);
-
- // if year starts on the specified day, start counting weeks at 1
- if(firstDayOfYear == firstDayOfWeek){ week++; }
-
- return week; // Number
+dojo.date.locale._getDayOfYear=function(_59){
+return dojo.date.difference(new Date(_59.getFullYear(),0,1,_59.getHours()),_59)+1;
};
-
+dojo.date.locale._getWeekOfYear=function(_5a,_5b){
+if(arguments.length==1){
+_5b=0;
}
+var _5c=new Date(_5a.getFullYear(),0,1).getDay(),adj=(_5c-_5b+7)%7,_5d=Math.floor((dojo.date.locale._getDayOfYear(_5a)+adj-1)/7);
+if(_5c==_5b){
+_5d++;
+}
+return _5d;
+};
+}
diff --git a/js/dojo/dojo/date/stamp.js b/js/dojo/dojo/date/stamp.js
--- a/js/dojo/dojo/date/stamp.js
+++ b/js/dojo/dojo/date/stamp.js
@@ -1,127 +1,84 @@
-if(!dojo._hasResource["dojo.date.stamp"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.date.stamp"] = true;
-dojo.provide("dojo.date.stamp");
-
-// Methods to convert dates to or from a wire (string) format using well-known conventions
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.date.stamp.fromISOString = function(/*String*/formattedString, /*Number?*/defaultTime){
- // summary:
- // Returns a Date object given a string formatted according to a subset of the ISO-8601 standard.
- //
- // description:
- // Accepts a string formatted according to a profile of ISO8601 as defined by
- // RFC3339 (http://www.ietf.org/rfc/rfc3339.txt), except that partial input is allowed.
- // Can also process dates as specified by http://www.w3.org/TR/NOTE-datetime
- // The following combinations are valid:
- // * dates only
- // yyyy
- // yyyy-MM
- // yyyy-MM-dd
- // * times only, with an optional time zone appended
- // THH:mm
- // THH:mm:ss
- // THH:mm:ss.SSS
- // * and "datetimes" which could be any combination of the above
- // timezones may be specified as Z (for UTC) or +/- followed by a time expression HH:mm
- // Assumes the local time zone if not specified. Does not validate. Improperly formatted
- // input may return null. Arguments which are out of bounds will be handled
- // by the Date constructor (e.g. January 32nd typically gets resolved to February 1st)
- //
- // formattedString:
- // A string such as 2005-06-30T08:05:00-07:00 or 2005-06-30 or T08:05:00
- //
- // defaultTime:
- // Used for defaults for fields omitted in the formattedString.
- // Uses 1970-01-01T00:00:00.0Z by default.
-
- if(!dojo.date.stamp._isoRegExp){
- dojo.date.stamp._isoRegExp =
-//TODO: could be more restrictive and check for 00-59, etc.
- /^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;
- }
-
- var match = dojo.date.stamp._isoRegExp.exec(formattedString);
- var result = null;
-
- if(match){
- match.shift();
- match[1] && match[1]--; // Javascript Date months are 0-based
- match[6] && (match[6] *= 1000); // Javascript Date expects fractional seconds as milliseconds
-
- if(defaultTime){
- // mix in defaultTime. Relatively expensive, so use || operators for the fast path of defaultTime === 0
- defaultTime = new Date(defaultTime);
- dojo.map(["FullYear", "Month", "Date", "Hours", "Minutes", "Seconds", "Milliseconds"], function(prop){
- return defaultTime["get" + prop]();
- }).forEach(function(value, index){
- if(match[index] === undefined){
- match[index] = value;
- }
- });
- }
- result = new Date(match[0]||1970, match[1]||0, match[2]||0, match[3]||0, match[4]||0, match[5]||0, match[6]||0);
- var offset = 0;
- var zoneSign = match[7] && match[7].charAt(0);
- if(zoneSign != 'Z'){
- offset = ((match[8] || 0) * 60) + (Number(match[9]) || 0);
- if(zoneSign != '-'){ offset *= -1; }
- }
- if(zoneSign){
- offset -= result.getTimezoneOffset();
- }
- if(offset){
- result.setTime(result.getTime() + offset * 60000);
- }
- }
-
- return result; // Date or null
+if(!dojo._hasResource["dojo.date.stamp"]){
+dojo._hasResource["dojo.date.stamp"]=true;
+dojo.provide("dojo.date.stamp");
+dojo.date.stamp.fromISOString=function(_1,_2){
+if(!dojo.date.stamp._isoRegExp){
+dojo.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;
+}
+var _3=dojo.date.stamp._isoRegExp.exec(_1),_4=null;
+if(_3){
+_3.shift();
+if(_3[1]){
+_3[1]--;
+}
+if(_3[6]){
+_3[6]*=1000;
+}
+if(_2){
+_2=new Date(_2);
+dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(_5){
+return _2["get"+_5]();
+}).forEach(function(_6,_7){
+if(_3[_7]===undefined){
+_3[_7]=_6;
+}
+});
+}
+_4=new Date(_3[0]||1970,_3[1]||0,_3[2]||1,_3[3]||0,_3[4]||0,_3[5]||0,_3[6]||0);
+if(_3[0]<100){
+_4.setFullYear(_3[0]||1970);
+}
+var _8=0,_9=_3[7]&&_3[7].charAt(0);
+if(_9!="Z"){
+_8=((_3[8]||0)*60)+(Number(_3[9])||0);
+if(_9!="-"){
+_8*=-1;
+}
}
-
-dojo.date.stamp.toISOString = function(/*Date*/dateObject, /*Object?*/options){
- // summary:
- // Format a Date object as a string according a subset of the ISO-8601 standard
- //
- // description:
- // When options.selector is omitted, output follows RFC3339 (http://www.ietf.org/rfc/rfc3339.txt)
- // The local time zone is included as an offset from GMT, except when selector=='time' (time without a date)
- // Does not check bounds.
- //
- // dateObject:
- // A Date object
- //
- // object {selector: string, zulu: boolean, milliseconds: boolean}
- // selector- "date" or "time" for partial formatting of the Date object.
- // Both date and time will be formatted by default.
- // zulu- if true, UTC/GMT is used for a timezone
- // milliseconds- if true, output milliseconds
-
- var _ = function(n){ return (n < 10) ? "0" + n : n; }
- options = options || {};
- var formattedDate = [];
- var getter = options.zulu ? "getUTC" : "get";
- var date = "";
- if(options.selector != "time"){
- date = [dateObject[getter+"FullYear"](), _(dateObject[getter+"Month"]()+1), _(dateObject[getter+"Date"]())].join('-');
- }
- formattedDate.push(date);
- if(options.selector != "date"){
- var time = [_(dateObject[getter+"Hours"]()), _(dateObject[getter+"Minutes"]()), _(dateObject[getter+"Seconds"]())].join(':');
- var millis = dateObject[getter+"Milliseconds"]();
- if(options.milliseconds){
- time += "."+ (millis < 100 ? "0" : "") + _(millis);
- }
- if(options.zulu){
- time += "Z";
- }else if(options.selector != "time"){
- var timezoneOffset = dateObject.getTimezoneOffset();
- var absOffset = Math.abs(timezoneOffset);
- time += (timezoneOffset > 0 ? "-" : "+") +
- _(Math.floor(absOffset/60)) + ":" + _(absOffset%60);
- }
- formattedDate.push(time);
- }
- return formattedDate.join('T'); // String
+if(_9){
+_8-=_4.getTimezoneOffset();
+}
+if(_8){
+_4.setTime(_4.getTime()+_8*60000);
+}
+}
+return _4;
+};
+dojo.date.stamp.toISOString=function(_a,_b){
+var _c=function(n){
+return (n<10)?"0"+n:n;
+};
+_b=_b||{};
+var _d=[],_e=_b.zulu?"getUTC":"get",_f="";
+if(_b.selector!="time"){
+var _10=_a[_e+"FullYear"]();
+_f=["0000".substr((_10+"").length)+_10,_c(_a[_e+"Month"]()+1),_c(_a[_e+"Date"]())].join("-");
}
-
+_d.push(_f);
+if(_b.selector!="date"){
+var _11=[_c(_a[_e+"Hours"]()),_c(_a[_e+"Minutes"]()),_c(_a[_e+"Seconds"]())].join(":");
+var _12=_a[_e+"Milliseconds"]();
+if(_b.milliseconds){
+_11+="."+(_12<100?"0":"")+_c(_12);
}
+if(_b.zulu){
+_11+="Z";
+}else{
+if(_b.selector!="time"){
+var _13=_a.getTimezoneOffset();
+var _14=Math.abs(_13);
+_11+=(_13>0?"-":"+")+_c(Math.floor(_14/60))+":"+_c(_14%60);
+}
+}
+_d.push(_11);
+}
+return _d.join("T");
+};
+}
diff --git a/js/dojo/dojo/dnd/Avatar.js b/js/dojo/dojo/dnd/Avatar.js
--- a/js/dojo/dojo/dnd/Avatar.js
+++ b/js/dojo/dojo/dnd/Avatar.js
@@ -1,75 +1,64 @@
-if(!dojo._hasResource["dojo.dnd.Avatar"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.dnd.Avatar"] = true;
-dojo.provide("dojo.dnd.Avatar");
-
-dojo.require("dojo.dnd.common");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.dnd.Avatar = function(manager){
- // summary: an object, which represents transferred DnD items visually
- // manager: Object: a DnD manager object
- this.manager = manager;
- this.construct();
-};
-dojo.extend(dojo.dnd.Avatar, {
- construct: function(){
- // summary: a constructor function;
- // it is separate so it can be (dynamically) overwritten in case of need
- var a = dojo.doc.createElement("table");
- a.className = "dojoDndAvatar";
- a.style.position = "absolute";
- a.style.zIndex = 1999;
- a.style.margin = "0px"; // to avoid dojo.marginBox() problems with table's margins
- var b = dojo.doc.createElement("tbody");
- var tr = dojo.doc.createElement("tr");
- tr.className = "dojoDndAvatarHeader";
- var td = dojo.doc.createElement("td");
- td.innerHTML = this._generateText();
- tr.appendChild(td);
- dojo.style(tr, "opacity", 0.9);
- b.appendChild(tr);
- var k = Math.min(5, this.manager.nodes.length);
- var source = this.manager.source;
- for(var i = 0; i < k; ++i){
- tr = dojo.doc.createElement("tr");
- tr.className = "dojoDndAvatarItem";
- td = dojo.doc.createElement("td");
- var node = source.creator ?
- // create an avatar representation of the node
- node = source._normalizedCreator(source.getItem(this.manager.nodes[i].id).data, "avatar").node :
- // or just clone the node and hope it works
- node = this.manager.nodes[i].cloneNode(true);
- node.id = "";
- td.appendChild(node);
- tr.appendChild(td);
- dojo.style(tr, "opacity", (9 - i) / 10);
- b.appendChild(tr);
- }
- a.appendChild(b);
- this.node = a;
- },
- destroy: function(){
- // summary: a desctructor for the avatar, called to remove all references so it can be garbage-collected
- dojo._destroyElement(this.node);
- this.node = false;
- },
- update: function(){
- // summary: updates the avatar to reflect the current DnD state
- dojo[(this.manager.canDropFlag ? "add" : "remove") + "Class"](this.node, "dojoDndAvatarCanDrop");
- // replace text
- var t = this.node.getElementsByTagName("td");
- for(var i = 0; i < t.length; ++i){
- var n = t[i];
- if(dojo.hasClass(n.parentNode, "dojoDndAvatarHeader")){
- n.innerHTML = this._generateText();
- break;
- }
- }
- },
- _generateText: function(){
- // summary: generates a proper text to reflect copying or moving of items
- return this.manager.nodes.length.toString();
- }
-});
-
+if(!dojo._hasResource["dojo.dnd.Avatar"]){
+dojo._hasResource["dojo.dnd.Avatar"]=true;
+dojo.provide("dojo.dnd.Avatar");
+dojo.require("dojo.dnd.common");
+dojo.declare("dojo.dnd.Avatar",null,{constructor:function(_1){
+this.manager=_1;
+this.construct();
+},construct:function(){
+this.isA11y=dojo.hasClass(dojo.body(),"dijit_a11y");
+var a=dojo.create("table",{"class":"dojoDndAvatar",style:{position:"absolute",zIndex:"1999",margin:"0px"}}),_2=this.manager.source,_3,b=dojo.create("tbody",null,a),tr=dojo.create("tr",null,b),td=dojo.create("td",null,tr),_4=this.isA11y?dojo.create("span",{id:"a11yIcon",innerHTML:this.manager.copy?"+":"<"},td):null,_5=dojo.create("span",{innerHTML:_2.generateText?this._generateText():""},td),k=Math.min(5,this.manager.nodes.length),i=0;
+dojo.attr(tr,{"class":"dojoDndAvatarHeader",style:{opacity:0.9}});
+for(;i<k;++i){
+if(_2.creator){
+_3=_2._normalizedCreator(_2.getItem(this.manager.nodes[i].id).data,"avatar").node;
+}else{
+_3=this.manager.nodes[i].cloneNode(true);
+if(_3.tagName.toLowerCase()=="tr"){
+var _6=dojo.create("table"),_7=dojo.create("tbody",null,_6);
+_7.appendChild(_3);
+_3=_6;
+}
+}
+_3.id="";
+tr=dojo.create("tr",null,b);
+td=dojo.create("td",null,tr);
+td.appendChild(_3);
+dojo.attr(tr,{"class":"dojoDndAvatarItem",style:{opacity:(9-i)/10}});
}
+this.node=a;
+},destroy:function(){
+dojo.destroy(this.node);
+this.node=false;
+},update:function(){
+dojo[(this.manager.canDropFlag?"add":"remove")+"Class"](this.node,"dojoDndAvatarCanDrop");
+if(this.isA11y){
+var _8=dojo.byId("a11yIcon");
+var _9="+";
+if(this.manager.canDropFlag&&!this.manager.copy){
+_9="< ";
+}else{
+if(!this.manager.canDropFlag&&!this.manager.copy){
+_9="o";
+}else{
+if(!this.manager.canDropFlag){
+_9="x";
+}
+}
+}
+_8.innerHTML=_9;
+}
+dojo.query(("tr.dojoDndAvatarHeader td span"+(this.isA11y?" span":"")),this.node).forEach(function(_a){
+_a.innerHTML=this._generateText();
+},this);
+},_generateText:function(){
+return this.manager.nodes.length.toString();
+}});
+}
diff --git a/js/dojo/dojo/dnd/Container.js b/js/dojo/dojo/dnd/Container.js
--- a/js/dojo/dojo/dnd/Container.js
+++ b/js/dojo/dojo/dnd/Container.js
@@ -1,311 +1,233 @@
-if(!dojo._hasResource["dojo.dnd.Container"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.dnd.Container"] = true;
-dojo.provide("dojo.dnd.Container");
-
-dojo.require("dojo.dnd.common");
-dojo.require("dojo.parser");
-
/*
- Container states:
- "" - normal state
- "Over" - mouse over a container
- Container item states:
- "" - normal state
- "Over" - mouse over a container item
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
*/
-dojo.declare("dojo.dnd.Container", null, {
- // summary: a Container object, which knows when mouse hovers over it,
- // and know over which element it hovers
-
- // object attributes (for markup)
- skipForm: false,
-
- constructor: function(node, params){
- // summary: a constructor of the Container
- // node: Node: node or node's id to build the container on
- // params: Object: a dict of parameters, recognized parameters are:
- // creator: Function: a creator function, which takes a data item, and returns an object like that:
- // {node: newNode, data: usedData, type: arrayOfStrings}
- // skipForm: Boolean: don't start the drag operation, if clicked on form elements
- // _skipStartup: Boolean: skip startup(), which collects children, for deferred initialization
- // (this is used in the markup mode)
- this.node = dojo.byId(node);
- if(!params){ params = {}; }
- this.creator = params.creator || null;
- this.skipForm = params.skipForm;
- this.defaultCreator = dojo.dnd._defaultCreator(this.node);
- // class-specific variables
- this.map = {};
- this.current = null;
-
- // states
- this.containerState = "";
- dojo.addClass(this.node, "dojoDndContainer");
-
- // mark up children
- if(!(params && params._skipStartup)){
- this.startup();
- }
-
- // set up events
- this.events = [
- dojo.connect(this.node, "onmouseover", this, "onMouseOver"),
- dojo.connect(this.node, "onmouseout", this, "onMouseOut"),
- // cancel text selection and text dragging
- dojo.connect(this.node, "ondragstart", this, "onSelectStart"),
- dojo.connect(this.node, "onselectstart", this, "onSelectStart")
- ];
- },
-
- // object attributes (for markup)
- creator: function(){}, // creator function, dummy at the moment
-
- // abstract access to the map
- getItem: function(/*String*/ key){
- // summary: returns a data item by its key (id)
- return this.map[key]; // Object
- },
- setItem: function(/*String*/ key, /*Object*/ data){
- // summary: associates a data item with its key (id)
- this.map[key] = data;
- },
- delItem: function(/*String*/ key){
- // summary: removes a data item from the map by its key (id)
- delete this.map[key];
- },
- forInItems: function(/*Function*/ f, /*Object?*/ o){
- // summary: iterates over a data map skipping members, which
- // are present in the empty object (IE and/or 3rd-party libraries).
- o = o || dojo.global;
- var m = this.map, e = dojo.dnd._empty;
- for(var i in this.map){
- if(i in e){ continue; }
- f.call(o, m[i], i, m);
- }
- },
- clearItems: function(){
- // summary: removes all data items from the map
- this.map = {};
- },
-
- // methods
- getAllNodes: function(){
- // summary: returns a list (an array) of all valid child nodes
- return dojo.query("> .dojoDndItem", this.parent); // NodeList
- },
- insertNodes: function(data, before, anchor){
- // summary: inserts an array of new nodes before/after an anchor node
- // data: Array: a list of data items, which should be processed by the creator function
- // before: Boolean: insert before the anchor, if true, and after the anchor otherwise
- // anchor: Node: the anchor node to be used as a point of insertion
- if(!this.parent.firstChild){
- anchor = null;
- }else if(before){
- if(!anchor){
- anchor = this.parent.firstChild;
- }
- }else{
- if(anchor){
- anchor = anchor.nextSibling;
- }
- }
- if(anchor){
- for(var i = 0; i < data.length; ++i){
- var t = this._normalizedCreator(data[i]);
- this.setItem(t.node.id, {data: t.data, type: t.type});
- this.parent.insertBefore(t.node, anchor);
- }
- }else{
- for(var i = 0; i < data.length; ++i){
- var t = this._normalizedCreator(data[i]);
- this.setItem(t.node.id, {data: t.data, type: t.type});
- this.parent.appendChild(t.node);
- }
- }
- return this; // self
- },
- destroy: function(){
- // summary: prepares the object to be garbage-collected
- dojo.forEach(this.events, dojo.disconnect);
- this.clearItems();
- this.node = this.parent = this.current;
- },
-
- // markup methods
- markupFactory: function(params, node){
- params._skipStartup = true;
- return new dojo.dnd.Container(node, params);
- },
- startup: function(){
- // summary: collects valid child items and populate the map
-
- // set up the real parent node
- this.parent = this.node;
- if(this.parent.tagName.toLowerCase() == "table"){
- var c = this.parent.getElementsByTagName("tbody");
- if(c && c.length){ this.parent = c[0]; }
- }
-
- // process specially marked children
- dojo.query("> .dojoDndItem", this.parent).forEach(function(node){
- if(!node.id){ node.id = dojo.dnd.getUniqueId(); }
- var type = node.getAttribute("dndType"),
- data = node.getAttribute("dndData");
- this.setItem(node.id, {
- data: data ? data : node.innerHTML,
- type: type ? type.split(/\s*,\s*/) : ["text"]
- });
- }, this);
- },
-
- // mouse events
- onMouseOver: function(e){
- // summary: event processor for onmouseover
- // e: Event: mouse event
- var n = e.relatedTarget;
- while(n){
- if(n == this.node){ break; }
- try{
- n = n.parentNode;
- }catch(x){
- n = null;
- }
- }
- if(!n){
- this._changeState("Container", "Over");
- this.onOverEvent();
- }
- n = this._getChildByEvent(e);
- if(this.current == n){ return; }
- if(this.current){ this._removeItemClass(this.current, "Over"); }
- if(n){ this._addItemClass(n, "Over"); }
- this.current = n;
- },
- onMouseOut: function(e){
- // summary: event processor for onmouseout
- // e: Event: mouse event
- for(var n = e.relatedTarget; n;){
- if(n == this.node){ return; }
- try{
- n = n.parentNode;
- }catch(x){
- n = null;
- }
- }
- if(this.current){
- this._removeItemClass(this.current, "Over");
- this.current = null;
- }
- this._changeState("Container", "");
- this.onOutEvent();
- },
- onSelectStart: function(e){
- // summary: event processor for onselectevent and ondragevent
- // e: Event: mouse event
- if(!this.skipForm || !dojo.dnd.isFormElement(e)){
- dojo.stopEvent(e);
- }
- },
-
- // utilities
- onOverEvent: function(){
- // summary: this function is called once, when mouse is over our container
- },
- onOutEvent: function(){
- // summary: this function is called once, when mouse is out of our container
- },
- _changeState: function(type, newState){
- // summary: changes a named state to new state value
- // type: String: a name of the state to change
- // newState: String: new state
- var prefix = "dojoDnd" + type;
- var state = type.toLowerCase() + "State";
- //dojo.replaceClass(this.node, prefix + newState, prefix + this[state]);
- dojo.removeClass(this.node, prefix + this[state]);
- dojo.addClass(this.node, prefix + newState);
- this[state] = newState;
- },
- _addItemClass: function(node, type){
- // summary: adds a class with prefix "dojoDndItem"
- // node: Node: a node
- // type: String: a variable suffix for a class name
- dojo.addClass(node, "dojoDndItem" + type);
- },
- _removeItemClass: function(node, type){
- // summary: removes a class with prefix "dojoDndItem"
- // node: Node: a node
- // type: String: a variable suffix for a class name
- dojo.removeClass(node, "dojoDndItem" + type);
- },
- _getChildByEvent: function(e){
- // summary: gets a child, which is under the mouse at the moment, or null
- // e: Event: a mouse event
- var node = e.target;
- if(node){
- for(var parent = node.parentNode; parent; node = parent, parent = node.parentNode){
- if(parent == this.parent && dojo.hasClass(node, "dojoDndItem")){ return node; }
- }
- }
- return null;
- },
- _normalizedCreator: function(item, hint){
- // summary: adds all necessary data to the output of the user-supplied creator function
- var t = (this.creator ? this.creator : this.defaultCreator)(item, hint);
- if(!dojo.isArray(t.type)){ t.type = ["text"]; }
- if(!t.node.id){ t.node.id = dojo.dnd.getUniqueId(); }
- dojo.addClass(t.node, "dojoDndItem");
- return t;
- }
-});
-
-dojo.dnd._createNode = function(tag){
- // summary: returns a function, which creates an element of given tag
- // (SPAN by default) and sets its innerHTML to given text
- // tag: String: a tag name or empty for SPAN
- if(!tag){ return dojo.dnd._createSpan; }
- return function(text){ // Function
- var n = dojo.doc.createElement(tag);
- n.innerHTML = text;
- return n;
- };
+if(!dojo._hasResource["dojo.dnd.Container"]){
+dojo._hasResource["dojo.dnd.Container"]=true;
+dojo.provide("dojo.dnd.Container");
+dojo.require("dojo.dnd.common");
+dojo.require("dojo.parser");
+dojo.declare("dojo.dnd.Container",null,{skipForm:false,constructor:function(_1,_2){
+this.node=dojo.byId(_1);
+if(!_2){
+_2={};
+}
+this.creator=_2.creator||null;
+this.skipForm=_2.skipForm;
+this.parent=_2.dropParent&&dojo.byId(_2.dropParent);
+this.map={};
+this.current=null;
+this.containerState="";
+dojo.addClass(this.node,"dojoDndContainer");
+if(!(_2&&_2._skipStartup)){
+this.startup();
+}
+this.events=[dojo.connect(this.node,"onmouseover",this,"onMouseOver"),dojo.connect(this.node,"onmouseout",this,"onMouseOut"),dojo.connect(this.node,"ondragstart",this,"onSelectStart"),dojo.connect(this.node,"onselectstart",this,"onSelectStart")];
+},creator:function(){
+},getItem:function(_3){
+return this.map[_3];
+},setItem:function(_4,_5){
+this.map[_4]=_5;
+},delItem:function(_6){
+delete this.map[_6];
+},forInItems:function(f,o){
+o=o||dojo.global;
+var m=this.map,e=dojo.dnd._empty;
+for(var i in m){
+if(i in e){
+continue;
+}
+f.call(o,m[i],i,this);
+}
+return o;
+},clearItems:function(){
+this.map={};
+},getAllNodes:function(){
+return dojo.query("> .dojoDndItem",this.parent);
+},sync:function(){
+var _7={};
+this.getAllNodes().forEach(function(_8){
+if(_8.id){
+var _9=this.getItem(_8.id);
+if(_9){
+_7[_8.id]=_9;
+return;
+}
+}else{
+_8.id=dojo.dnd.getUniqueId();
+}
+var _a=_8.getAttribute("dndType"),_b=_8.getAttribute("dndData");
+_7[_8.id]={data:_b||_8.innerHTML,type:_a?_a.split(/\s*,\s*/):["text"]};
+},this);
+this.map=_7;
+return this;
+},insertNodes:function(_c,_d,_e){
+if(!this.parent.firstChild){
+_e=null;
+}else{
+if(_d){
+if(!_e){
+_e=this.parent.firstChild;
+}
+}else{
+if(_e){
+_e=_e.nextSibling;
+}
+}
+}
+if(_e){
+for(var i=0;i<_c.length;++i){
+var t=this._normalizedCreator(_c[i]);
+this.setItem(t.node.id,{data:t.data,type:t.type});
+this.parent.insertBefore(t.node,_e);
+}
+}else{
+for(var i=0;i<_c.length;++i){
+var t=this._normalizedCreator(_c[i]);
+this.setItem(t.node.id,{data:t.data,type:t.type});
+this.parent.appendChild(t.node);
+}
+}
+return this;
+},destroy:function(){
+dojo.forEach(this.events,dojo.disconnect);
+this.clearItems();
+this.node=this.parent=this.current=null;
+},markupFactory:function(_f,_10){
+_f._skipStartup=true;
+return new dojo.dnd.Container(_10,_f);
+},startup:function(){
+if(!this.parent){
+this.parent=this.node;
+if(this.parent.tagName.toLowerCase()=="table"){
+var c=this.parent.getElementsByTagName("tbody");
+if(c&&c.length){
+this.parent=c[0];
+}
+}
+}
+this.defaultCreator=dojo.dnd._defaultCreator(this.parent);
+this.sync();
+},onMouseOver:function(e){
+var n=e.relatedTarget;
+while(n){
+if(n==this.node){
+break;
+}
+try{
+n=n.parentNode;
+}
+catch(x){
+n=null;
+}
+}
+if(!n){
+this._changeState("Container","Over");
+this.onOverEvent();
+}
+n=this._getChildByEvent(e);
+if(this.current==n){
+return;
+}
+if(this.current){
+this._removeItemClass(this.current,"Over");
+}
+if(n){
+this._addItemClass(n,"Over");
+}
+this.current=n;
+},onMouseOut:function(e){
+for(var n=e.relatedTarget;n;){
+if(n==this.node){
+return;
+}
+try{
+n=n.parentNode;
+}
+catch(x){
+n=null;
+}
+}
+if(this.current){
+this._removeItemClass(this.current,"Over");
+this.current=null;
+}
+this._changeState("Container","");
+this.onOutEvent();
+},onSelectStart:function(e){
+if(!this.skipForm||!dojo.dnd.isFormElement(e)){
+dojo.stopEvent(e);
+}
+},onOverEvent:function(){
+},onOutEvent:function(){
+},_changeState:function(_11,_12){
+var _13="dojoDnd"+_11;
+var _14=_11.toLowerCase()+"State";
+dojo.removeClass(this.node,_13+this[_14]);
+dojo.addClass(this.node,_13+_12);
+this[_14]=_12;
+},_addItemClass:function(_15,_16){
+dojo.addClass(_15,"dojoDndItem"+_16);
+},_removeItemClass:function(_17,_18){
+dojo.removeClass(_17,"dojoDndItem"+_18);
+},_getChildByEvent:function(e){
+var _19=e.target;
+if(_19){
+for(var _1a=_19.parentNode;_1a;_19=_1a,_1a=_19.parentNode){
+if(_1a==this.parent&&dojo.hasClass(_19,"dojoDndItem")){
+return _19;
+}
+}
+}
+return null;
+},_normalizedCreator:function(_1b,_1c){
+var t=(this.creator||this.defaultCreator).call(this,_1b,_1c);
+if(!dojo.isArray(t.type)){
+t.type=["text"];
+}
+if(!t.node.id){
+t.node.id=dojo.dnd.getUniqueId();
+}
+dojo.addClass(t.node,"dojoDndItem");
+return t;
+}});
+dojo.dnd._createNode=function(tag){
+if(!tag){
+return dojo.dnd._createSpan;
+}
+return function(_1d){
+return dojo.create(tag,{innerHTML:_1d});
};
-
-dojo.dnd._createTrTd = function(text){
- // summary: creates a TR/TD structure with given text as an innerHTML of TD
- // text: String: a text for TD
- var tr = dojo.doc.createElement("tr");
- var td = dojo.doc.createElement("td");
- td.innerHTML = text;
- tr.appendChild(td);
- return tr; // Node
};
-
-dojo.dnd._createSpan = function(text){
- // summary: creates a SPAN element with given text as its innerHTML
- // text: String: a text for SPAN
- var n = dojo.doc.createElement("span");
- n.innerHTML = text;
- return n; // Node
+dojo.dnd._createTrTd=function(_1e){
+var tr=dojo.create("tr");
+dojo.create("td",{innerHTML:_1e},tr);
+return tr;
+};
+dojo.dnd._createSpan=function(_1f){
+return dojo.create("span",{innerHTML:_1f});
};
-
-// dojo.dnd._defaultCreatorNodes: Object: a dicitionary, which maps container tag names to child tag names
-dojo.dnd._defaultCreatorNodes = {ul: "li", ol: "li", div: "div", p: "div"};
-
-dojo.dnd._defaultCreator = function(node){
- // summary: takes a container node, and returns an appropriate creator function
- // node: Node: a container node
- var tag = node.tagName.toLowerCase();
- var c = tag == "table" ? dojo.dnd._createTrTd : dojo.dnd._createNode(dojo.dnd._defaultCreatorNodes[tag]);
- return function(item, hint){ // Function
- var isObj = dojo.isObject(item) && item;
- var data = (isObj && item.data) ? item.data : item;
- var type = (isObj && item.type) ? item.type : ["text"];
- var t = String(data), n = (hint == "avatar" ? dojo.dnd._createSpan : c)(t);
- n.id = dojo.dnd.getUniqueId();
- return {node: n, data: data, type: type};
- };
+dojo.dnd._defaultCreatorNodes={ul:"li",ol:"li",div:"div",p:"div"};
+dojo.dnd._defaultCreator=function(_20){
+var tag=_20.tagName.toLowerCase();
+var c=tag=="tbody"||tag=="thead"?dojo.dnd._createTrTd:dojo.dnd._createNode(dojo.dnd._defaultCreatorNodes[tag]);
+return function(_21,_22){
+var _23=_21&&dojo.isObject(_21),_24,_25,n;
+if(_23&&_21.tagName&&_21.nodeType&&_21.getAttribute){
+_24=_21.getAttribute("dndData")||_21.innerHTML;
+_25=_21.getAttribute("dndType");
+_25=_25?_25.split(/\s*,\s*/):["text"];
+n=_21;
+}else{
+_24=(_23&&_21.data)?_21.data:_21;
+_25=(_23&&_21.type)?_21.type:["text"];
+n=(_22=="avatar"?dojo.dnd._createSpan:c)(String(_24));
+}
+n.id=dojo.dnd.getUniqueId();
+return {node:n,data:_24,type:_25};
};
-
+};
}
diff --git a/js/dojo/dojo/dnd/Manager.js b/js/dojo/dojo/dnd/Manager.js
--- a/js/dojo/dojo/dnd/Manager.js
+++ b/js/dojo/dojo/dnd/Manager.js
@@ -1,177 +1,128 @@
-if(!dojo._hasResource["dojo.dnd.Manager"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.dnd.Manager"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo.dnd.Manager"]){
+dojo._hasResource["dojo.dnd.Manager"]=true;
dojo.provide("dojo.dnd.Manager");
-
dojo.require("dojo.dnd.common");
dojo.require("dojo.dnd.autoscroll");
dojo.require("dojo.dnd.Avatar");
-
-dojo.dnd.Manager = function(){
- // summary: the manager of DnD operations (usually a singleton)
- this.avatar = null;
- this.source = null;
- this.nodes = [];
- this.copy = true;
- this.target = null;
- this.canDropFlag = false;
- this.events = [];
+dojo.declare("dojo.dnd.Manager",null,{constructor:function(){
+this.avatar=null;
+this.source=null;
+this.nodes=[];
+this.copy=true;
+this.target=null;
+this.canDropFlag=false;
+this.events=[];
+},OFFSET_X:16,OFFSET_Y:16,overSource:function(_1){
+if(this.avatar){
+this.target=(_1&&_1.targetState!="Disabled")?_1:null;
+this.canDropFlag=Boolean(this.target);
+this.avatar.update();
+}
+dojo.publish("/dnd/source/over",[_1]);
+},outSource:function(_2){
+if(this.avatar){
+if(this.target==_2){
+this.target=null;
+this.canDropFlag=false;
+this.avatar.update();
+dojo.publish("/dnd/source/over",[null]);
+}
+}else{
+dojo.publish("/dnd/source/over",[null]);
+}
+},startDrag:function(_3,_4,_5){
+this.source=_3;
+this.nodes=_4;
+this.copy=Boolean(_5);
+this.avatar=this.makeAvatar();
+dojo.body().appendChild(this.avatar.node);
+dojo.publish("/dnd/start",[_3,_4,this.copy]);
+this.events=[dojo.connect(dojo.doc,"onmousemove",this,"onMouseMove"),dojo.connect(dojo.doc,"onmouseup",this,"onMouseUp"),dojo.connect(dojo.doc,"onkeydown",this,"onKeyDown"),dojo.connect(dojo.doc,"onkeyup",this,"onKeyUp"),dojo.connect(dojo.doc,"ondragstart",dojo.stopEvent),dojo.connect(dojo.body(),"onselectstart",dojo.stopEvent)];
+var c="dojoDnd"+(_5?"Copy":"Move");
+dojo.addClass(dojo.body(),c);
+},canDrop:function(_6){
+var _7=Boolean(this.target&&_6);
+if(this.canDropFlag!=_7){
+this.canDropFlag=_7;
+this.avatar.update();
+}
+},stopDrag:function(){
+dojo.removeClass(dojo.body(),"dojoDndCopy");
+dojo.removeClass(dojo.body(),"dojoDndMove");
+dojo.forEach(this.events,dojo.disconnect);
+this.events=[];
+this.avatar.destroy();
+this.avatar=null;
+this.source=this.target=null;
+this.nodes=[];
+},makeAvatar:function(){
+return new dojo.dnd.Avatar(this);
+},updateAvatar:function(){
+this.avatar.update();
+},onMouseMove:function(e){
+var a=this.avatar;
+if(a){
+dojo.dnd.autoScrollNodes(e);
+var s=a.node.style;
+s.left=(e.pageX+this.OFFSET_X)+"px";
+s.top=(e.pageY+this.OFFSET_Y)+"px";
+var _8=Boolean(this.source.copyState(dojo.isCopyKey(e)));
+if(this.copy!=_8){
+this._setCopyStatus(_8);
+}
+}
+},onMouseUp:function(e){
+if(this.avatar){
+if(this.target&&this.canDropFlag){
+var _9=Boolean(this.source.copyState(dojo.isCopyKey(e))),_a=[this.source,this.nodes,_9,this.target];
+dojo.publish("/dnd/drop/before",_a);
+dojo.publish("/dnd/drop",_a);
+}else{
+dojo.publish("/dnd/cancel");
+}
+this.stopDrag();
+}
+},onKeyDown:function(e){
+if(this.avatar){
+switch(e.keyCode){
+case dojo.keys.CTRL:
+var _b=Boolean(this.source.copyState(true));
+if(this.copy!=_b){
+this._setCopyStatus(_b);
+}
+break;
+case dojo.keys.ESCAPE:
+dojo.publish("/dnd/cancel");
+this.stopDrag();
+break;
+}
+}
+},onKeyUp:function(e){
+if(this.avatar&&e.keyCode==dojo.keys.CTRL){
+var _c=Boolean(this.source.copyState(false));
+if(this.copy!=_c){
+this._setCopyStatus(_c);
+}
+}
+},_setCopyStatus:function(_d){
+this.copy=_d;
+this.source._markDndStatus(this.copy);
+this.updateAvatar();
+dojo.removeClass(dojo.body(),"dojoDnd"+(this.copy?"Move":"Copy"));
+dojo.addClass(dojo.body(),"dojoDnd"+(this.copy?"Copy":"Move"));
+}});
+dojo.dnd._manager=null;
+dojo.dnd.manager=function(){
+if(!dojo.dnd._manager){
+dojo.dnd._manager=new dojo.dnd.Manager();
+}
+return dojo.dnd._manager;
};
-
-dojo.extend(dojo.dnd.Manager, {
- // avatar's offset from the mouse
- OFFSET_X: 16,
- OFFSET_Y: 16,
- // methods
- overSource: function(source){
- // summary: called when a source detected a mouse-over conditiion
- // source: Object: the reporter
- if(this.avatar){
- this.target = (source && source.targetState != "Disabled") ? source : null;
- this.avatar.update();
- }
- dojo.publish("/dnd/source/over", [source]);
- },
- outSource: function(source){
- // summary: called when a source detected a mouse-out conditiion
- // source: Object: the reporter
- if(this.avatar){
- if(this.target == source){
- this.target = null;
- this.canDropFlag = false;
- this.avatar.update();
- dojo.publish("/dnd/source/over", [null]);
- }
- }else{
- dojo.publish("/dnd/source/over", [null]);
- }
- },
- startDrag: function(source, nodes, copy){
- // summary: called to initiate the DnD operation
- // source: Object: the source which provides items
- // nodes: Array: the list of transferred items
- // copy: Boolean: copy items, if true, move items otherwise
- this.source = source;
- this.nodes = nodes;
- this.copy = Boolean(copy); // normalizing to true boolean
- this.avatar = this.makeAvatar();
- dojo.body().appendChild(this.avatar.node);
- dojo.publish("/dnd/start", [source, nodes, this.copy]);
- this.events = [
- dojo.connect(dojo.doc, "onmousemove", this, "onMouseMove"),
- dojo.connect(dojo.doc, "onmouseup", this, "onMouseUp"),
- dojo.connect(dojo.doc, "onkeydown", this, "onKeyDown"),
- dojo.connect(dojo.doc, "onkeyup", this, "onKeyUp")
- ];
- var c = "dojoDnd" + (copy ? "Copy" : "Move");
- dojo.addClass(dojo.body(), c);
- },
- canDrop: function(flag){
- // summary: called to notify if the current target can accept items
- var canDropFlag = this.target && flag;
- if(this.canDropFlag != canDropFlag){
- this.canDropFlag = canDropFlag;
- this.avatar.update();
- }
- },
- stopDrag: function(){
- // summary: stop the DnD in progress
- dojo.removeClass(dojo.body(), "dojoDndCopy");
- dojo.removeClass(dojo.body(), "dojoDndMove");
- dojo.forEach(this.events, dojo.disconnect);
- this.events = [];
- this.avatar.destroy();
- this.avatar = null;
- this.source = null;
- this.nodes = [];
- },
- makeAvatar: function(){
- // summary: makes the avatar, it is separate to be overwritten dynamically, if needed
- return new dojo.dnd.Avatar(this);
- },
- updateAvatar: function(){
- // summary: updates the avatar, it is separate to be overwritten dynamically, if needed
- this.avatar.update();
- },
- // mouse event processors
- onMouseMove: function(e){
- // summary: event processor for onmousemove
- // e: Event: mouse event
- var a = this.avatar;
- if(a){
- //dojo.dnd.autoScrollNodes(e);
- dojo.dnd.autoScroll(e);
- dojo.marginBox(a.node, {l: e.pageX + this.OFFSET_X, t: e.pageY + this.OFFSET_Y});
- var copy = Boolean(this.source.copyState(dojo.dnd.getCopyKeyState(e)));
- if(this.copy != copy){
- this._setCopyStatus(copy);
- }
- }
- },
- onMouseUp: function(e){
- // summary: event processor for onmouseup
- // e: Event: mouse event
- if(this.avatar && (!("mouseButton" in this.source) || this.source.mouseButton == e.button)){
- if(this.target && this.canDropFlag){
- var params = [this.source, this.nodes, Boolean(this.source.copyState(dojo.dnd.getCopyKeyState(e))), this.target];
- dojo.publish("/dnd/drop/before", params);
- dojo.publish("/dnd/drop", params);
- }else{
- dojo.publish("/dnd/cancel");
- }
- this.stopDrag();
- }
- },
- // keyboard event processors
- onKeyDown: function(e){
- // summary: event processor for onkeydown:
- // watching for CTRL for copy/move status, watching for ESCAPE to cancel the drag
- // e: Event: keyboard event
- if(this.avatar){
- switch(e.keyCode){
- case dojo.keys.CTRL:
- var copy = Boolean(this.source.copyState(true));
- if(this.copy != copy){
- this._setCopyStatus(copy);
- }
- break;
- case dojo.keys.ESCAPE:
- dojo.publish("/dnd/cancel");
- this.stopDrag();
- break;
- }
- }
- },
- onKeyUp: function(e){
- // summary: event processor for onkeyup, watching for CTRL for copy/move status
- // e: Event: keyboard event
- if(this.avatar && e.keyCode == dojo.keys.CTRL){
- var copy = Boolean(this.source.copyState(false));
- if(this.copy != copy){
- this._setCopyStatus(copy);
- }
- }
- },
- // utilities
- _setCopyStatus: function(copy){
- // summary: changes the copy status
- // copy: Boolean: the copy status
- this.copy = copy;
- this.source._markDndStatus(this.copy);
- this.updateAvatar();
- dojo.removeClass(dojo.body(), "dojoDnd" + (this.copy ? "Move" : "Copy"));
- dojo.addClass(dojo.body(), "dojoDnd" + (this.copy ? "Copy" : "Move"));
- }
-});
-
-// summary: the manager singleton variable, can be overwritten, if needed
-dojo.dnd._manager = null;
-
-dojo.dnd.manager = function(){
- // summary: returns the current DnD manager, creates one if it is not created yet
- if(!dojo.dnd._manager){
- dojo.dnd._manager = new dojo.dnd.Manager();
- }
- return dojo.dnd._manager; // Object
-};
-
}
diff --git a/js/dojo/dojo/dnd/Moveable.js b/js/dojo/dojo/dnd/Moveable.js
--- a/js/dojo/dojo/dnd/Moveable.js
+++ b/js/dojo/dojo/dnd/Moveable.js
@@ -1,128 +1,77 @@
-if(!dojo._hasResource["dojo.dnd.Moveable"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.dnd.Moveable"] = true;
-dojo.provide("dojo.dnd.Moveable");
-
-dojo.require("dojo.dnd.Mover");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.declare("dojo.dnd.Moveable", null, {
- // object attributes (for markup)
- handle: "",
- delay: 0,
- skip: false,
-
- constructor: function(node, params){
- // summary: an object, which makes a node moveable
- // node: Node: a node (or node's id) to be moved
- // params: Object: an optional object with additional parameters;
- // following parameters are recognized:
- // handle: Node: a node (or node's id), which is used as a mouse handle
- // if omitted, the node itself is used as a handle
- // delay: Number: delay move by this number of pixels
- // skip: Boolean: skip move of form elements
- // mover: Object: a constructor of custom Mover
- this.node = dojo.byId(node);
- if(!params){ params = {}; }
- this.handle = params.handle ? dojo.byId(params.handle) : null;
- if(!this.handle){ this.handle = this.node; }
- this.delay = params.delay > 0 ? params.delay : 0;
- this.skip = params.skip;
- this.mover = params.mover ? params.mover : dojo.dnd.Mover;
- this.events = [
- dojo.connect(this.handle, "onmousedown", this, "onMouseDown"),
- // cancel text selection and text dragging
- dojo.connect(this.handle, "ondragstart", this, "onSelectStart"),
- dojo.connect(this.handle, "onselectstart", this, "onSelectStart")
- ];
- },
-
- // markup methods
- markupFactory: function(params, node){
- return new dojo.dnd.Moveable(node, params);
- },
- // methods
- destroy: function(){
- // summary: stops watching for possible move, deletes all references, so the object can be garbage-collected
- dojo.forEach(this.events, dojo.disconnect);
- this.events = this.node = this.handle = null;
- },
-
- // mouse event processors
- onMouseDown: function(e){
- // summary: event processor for onmousedown, creates a Mover for the node
- // e: Event: mouse event
- if(this.skip && dojo.dnd.isFormElement(e)){ return; }
- if(this.delay){
- this.events.push(dojo.connect(this.handle, "onmousemove", this, "onMouseMove"));
- this.events.push(dojo.connect(this.handle, "onmouseup", this, "onMouseUp"));
- this._lastX = e.pageX;
- this._lastY = e.pageY;
- }else{
- new this.mover(this.node, e, this);
- }
- dojo.stopEvent(e);
- },
- onMouseMove: function(e){
- // summary: event processor for onmousemove, used only for delayed drags
- // e: Event: mouse event
- if(Math.abs(e.pageX - this._lastX) > this.delay || Math.abs(e.pageY - this._lastY) > this.delay){
- this.onMouseUp(e);
- new this.mover(this.node, e, this);
- }
- dojo.stopEvent(e);
- },
- onMouseUp: function(e){
- // summary: event processor for onmouseup, used only for delayed delayed drags
- // e: Event: mouse event
- dojo.disconnect(this.events.pop());
- dojo.disconnect(this.events.pop());
- },
- onSelectStart: function(e){
- // summary: event processor for onselectevent and ondragevent
- // e: Event: mouse event
- if(!this.skip || !dojo.dnd.isFormElement(e)){
- dojo.stopEvent(e);
- }
- },
-
- // local events
- onMoveStart: function(/* dojo.dnd.Mover */ mover){
- // summary: called before every move operation
- dojo.publish("/dnd/move/start", [mover]);
- dojo.addClass(dojo.body(), "dojoMove");
- dojo.addClass(this.node, "dojoMoveItem");
- },
- onMoveStop: function(/* dojo.dnd.Mover */ mover){
- // summary: called after every move operation
- dojo.publish("/dnd/move/stop", [mover]);
- dojo.removeClass(dojo.body(), "dojoMove");
- dojo.removeClass(this.node, "dojoMoveItem");
- },
- onFirstMove: function(/* dojo.dnd.Mover */ mover){
- // summary: called during the very first move notification,
- // can be used to initialize coordinates, can be overwritten.
-
- // default implementation does nothing
- },
- onMove: function(/* dojo.dnd.Mover */ mover, /* Object */ leftTop){
- // summary: called during every move notification,
- // should actually move the node, can be overwritten.
- this.onMoving(mover, leftTop);
- dojo.marginBox(mover.node, leftTop);
- this.onMoved(mover, leftTop);
- },
- onMoving: function(/* dojo.dnd.Mover */ mover, /* Object */ leftTop){
- // summary: called before every incremental move,
- // can be overwritten.
-
- // default implementation does nothing
- },
- onMoved: function(/* dojo.dnd.Mover */ mover, /* Object */ leftTop){
- // summary: called after every incremental move,
- // can be overwritten.
-
- // default implementation does nothing
- }
-});
-
+if(!dojo._hasResource["dojo.dnd.Moveable"]){
+dojo._hasResource["dojo.dnd.Moveable"]=true;
+dojo.provide("dojo.dnd.Moveable");
+dojo.require("dojo.dnd.Mover");
+dojo.declare("dojo.dnd.Moveable",null,{handle:"",delay:0,skip:false,constructor:function(_1,_2){
+this.node=dojo.byId(_1);
+if(!_2){
+_2={};
+}
+this.handle=_2.handle?dojo.byId(_2.handle):null;
+if(!this.handle){
+this.handle=this.node;
+}
+this.delay=_2.delay>0?_2.delay:0;
+this.skip=_2.skip;
+this.mover=_2.mover?_2.mover:dojo.dnd.Mover;
+this.events=[dojo.connect(this.handle,"onmousedown",this,"onMouseDown"),dojo.connect(this.handle,"ondragstart",this,"onSelectStart"),dojo.connect(this.handle,"onselectstart",this,"onSelectStart")];
+},markupFactory:function(_3,_4){
+return new dojo.dnd.Moveable(_4,_3);
+},destroy:function(){
+dojo.forEach(this.events,dojo.disconnect);
+this.events=this.node=this.handle=null;
+},onMouseDown:function(e){
+if(this.skip&&dojo.dnd.isFormElement(e)){
+return;
+}
+if(this.delay){
+this.events.push(dojo.connect(this.handle,"onmousemove",this,"onMouseMove"),dojo.connect(this.handle,"onmouseup",this,"onMouseUp"));
+this._lastX=e.pageX;
+this._lastY=e.pageY;
+}else{
+this.onDragDetected(e);
}
+dojo.stopEvent(e);
+},onMouseMove:function(e){
+if(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay){
+this.onMouseUp(e);
+this.onDragDetected(e);
+}
+dojo.stopEvent(e);
+},onMouseUp:function(e){
+for(var i=0;i<2;++i){
+dojo.disconnect(this.events.pop());
+}
+dojo.stopEvent(e);
+},onSelectStart:function(e){
+if(!this.skip||!dojo.dnd.isFormElement(e)){
+dojo.stopEvent(e);
+}
+},onDragDetected:function(e){
+new this.mover(this.node,e,this);
+},onMoveStart:function(_5){
+dojo.publish("/dnd/move/start",[_5]);
+dojo.addClass(dojo.body(),"dojoMove");
+dojo.addClass(this.node,"dojoMoveItem");
+},onMoveStop:function(_6){
+dojo.publish("/dnd/move/stop",[_6]);
+dojo.removeClass(dojo.body(),"dojoMove");
+dojo.removeClass(this.node,"dojoMoveItem");
+},onFirstMove:function(_7){
+},onMove:function(_8,_9){
+this.onMoving(_8,_9);
+var s=_8.node.style;
+s.left=_9.l+"px";
+s.top=_9.t+"px";
+this.onMoved(_8,_9);
+},onMoving:function(_a,_b){
+},onMoved:function(_c,_d){
+}});
+}
diff --git a/js/dojo/dojo/dnd/Mover.js b/js/dojo/dojo/dnd/Mover.js
--- a/js/dojo/dojo/dnd/Mover.js
+++ b/js/dojo/dojo/dnd/Mover.js
@@ -1,72 +1,65 @@
-if(!dojo._hasResource["dojo.dnd.Mover"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.dnd.Mover"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo.dnd.Mover"]){
+dojo._hasResource["dojo.dnd.Mover"]=true;
dojo.provide("dojo.dnd.Mover");
-
dojo.require("dojo.dnd.common");
dojo.require("dojo.dnd.autoscroll");
-
-dojo.declare("dojo.dnd.Mover", null, {
- constructor: function(node, e, host){
- // summary: an object, which makes a node follow the mouse,
- // used as a default mover, and as a base class for custom movers
- // node: Node: a node (or node's id) to be moved
- // e: Event: a mouse event, which started the move;
- // only pageX and pageY properties are used
- // host: Object?: object which implements the functionality of the move,
- // and defines proper events (onMoveStart and onMoveStop)
- this.node = dojo.byId(node);
- this.marginBox = {l: e.pageX, t: e.pageY};
- this.mouseButton = e.button;
- var h = this.host = host, d = node.ownerDocument,
- firstEvent = dojo.connect(d, "onmousemove", this, "onFirstMove");
- this.events = [
- dojo.connect(d, "onmousemove", this, "onMouseMove"),
- dojo.connect(d, "onmouseup", this, "onMouseUp"),
- // cancel text selection and text dragging
- dojo.connect(d, "ondragstart", dojo, "stopEvent"),
- dojo.connect(d, "onselectstart", dojo, "stopEvent"),
- firstEvent
- ];
- // notify that the move has started
- if(h && h.onMoveStart){
- h.onMoveStart(this);
- }
- },
- // mouse event processors
- onMouseMove: function(e){
- // summary: event processor for onmousemove
- // e: Event: mouse event
- dojo.dnd.autoScroll(e);
- var m = this.marginBox;
- this.host.onMove(this, {l: m.l + e.pageX, t: m.t + e.pageY});
- },
- onMouseUp: function(e){
- if(this.mouseButton == e.button){
- this.destroy();
- }
- },
- // utilities
- onFirstMove: function(){
- // summary: makes the node absolute; it is meant to be called only once
- this.node.style.position = "absolute"; // enforcing the absolute mode
- var m = dojo.marginBox(this.node);
- m.l -= this.marginBox.l;
- m.t -= this.marginBox.t;
- this.marginBox = m;
- this.host.onFirstMove(this);
- dojo.disconnect(this.events.pop());
- },
- destroy: function(){
- // summary: stops the move, deletes all references, so the object can be garbage-collected
- dojo.forEach(this.events, dojo.disconnect);
- // undo global settings
- var h = this.host;
- if(h && h.onMoveStop){
- h.onMoveStop(this);
- }
- // destroy objects
- this.events = this.node = null;
- }
-});
-
+dojo.declare("dojo.dnd.Mover",null,{constructor:function(_1,e,_2){
+this.node=dojo.byId(_1);
+this.marginBox={l:e.pageX,t:e.pageY};
+this.mouseButton=e.button;
+var h=this.host=_2,d=_1.ownerDocument,_3=dojo.connect(d,"onmousemove",this,"onFirstMove");
+this.events=[dojo.connect(d,"onmousemove",this,"onMouseMove"),dojo.connect(d,"onmouseup",this,"onMouseUp"),dojo.connect(d,"ondragstart",dojo.stopEvent),dojo.connect(d.body,"onselectstart",dojo.stopEvent),_3];
+if(h&&h.onMoveStart){
+h.onMoveStart(this);
+}
+},onMouseMove:function(e){
+dojo.dnd.autoScroll(e);
+var m=this.marginBox;
+this.host.onMove(this,{l:m.l+e.pageX,t:m.t+e.pageY});
+dojo.stopEvent(e);
+},onMouseUp:function(e){
+if(dojo.isWebKit&&dojo.isMac&&this.mouseButton==2?e.button==0:this.mouseButton==e.button){
+this.destroy();
}
+dojo.stopEvent(e);
+},onFirstMove:function(){
+var s=this.node.style,l,t,h=this.host;
+switch(s.position){
+case "relative":
+case "absolute":
+l=Math.round(parseFloat(s.left));
+t=Math.round(parseFloat(s.top));
+break;
+default:
+s.position="absolute";
+var m=dojo.marginBox(this.node);
+var b=dojo.doc.body;
+var bs=dojo.getComputedStyle(b);
+var bm=dojo._getMarginBox(b,bs);
+var bc=dojo._getContentBox(b,bs);
+l=m.l-(bc.l-bm.l);
+t=m.t-(bc.t-bm.t);
+break;
+}
+this.marginBox.l=l-this.marginBox.l;
+this.marginBox.t=t-this.marginBox.t;
+if(h&&h.onFirstMove){
+h.onFirstMove(this);
+}
+dojo.disconnect(this.events.pop());
+},destroy:function(){
+dojo.forEach(this.events,dojo.disconnect);
+var h=this.host;
+if(h&&h.onMoveStop){
+h.onMoveStop(this);
+}
+this.events=this.node=this.host=null;
+}});
+}
diff --git a/js/dojo/dojo/dnd/Selector.js b/js/dojo/dojo/dnd/Selector.js
--- a/js/dojo/dojo/dnd/Selector.js
+++ b/js/dojo/dojo/dnd/Selector.js
@@ -1,244 +1,239 @@
-if(!dojo._hasResource["dojo.dnd.Selector"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.dnd.Selector"] = true;
-dojo.provide("dojo.dnd.Selector");
-
-dojo.require("dojo.dnd.common");
-dojo.require("dojo.dnd.Container");
-
/*
- Container item states:
- "" - an item is not selected
- "Selected" - an item is selected
- "Anchor" - an item is selected, and is an anchor for a "shift" selection
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
*/
-dojo.declare("dojo.dnd.Selector", dojo.dnd.Container, {
- // summary: a Selector object, which knows how to select its children
-
- constructor: function(node, params){
- // summary: a constructor of the Selector
- // node: Node: node or node's id to build the selector on
- // params: Object: a dict of parameters, recognized parameters are:
- // singular: Boolean: allows selection of only one element, if true
- // the rest of parameters are passed to the container
- if(!params){ params = {}; }
- this.singular = params.singular;
- // class-specific variables
- this.selection = {};
- this.anchor = null;
- this.simpleSelection = false;
- // set up events
- this.events.push(
- dojo.connect(this.node, "onmousedown", this, "onMouseDown"),
- dojo.connect(this.node, "onmouseup", this, "onMouseUp"));
- },
-
- // object attributes (for markup)
- singular: false, // is singular property
-
- // methods
- getSelectedNodes: function(){
- // summary: returns a list (an array) of selected nodes
- var t = new dojo.NodeList();
- var e = dojo.dnd._empty;
- for(var i in this.selection){
- if(i in e){ continue; }
- t.push(dojo.byId(i));
- }
- return t; // Array
- },
- selectNone: function(){
- // summary: unselects all items
- return this._removeSelection()._removeAnchor(); // self
- },
- selectAll: function(){
- // summary: selects all items
- this.forInItems(function(data, id){
- this._addItemClass(dojo.byId(id), "Selected");
- this.selection[id] = 1;
- }, this);
- return this._removeAnchor(); // self
- },
- deleteSelectedNodes: function(){
- // summary: deletes all selected items
- var e = dojo.dnd._empty;
- for(var i in this.selection){
- if(i in e){ continue; }
- var n = dojo.byId(i);
- this.delItem(i);
- dojo._destroyElement(n);
- }
- this.anchor = null;
- this.selection = {};
- return this; // self
- },
- insertNodes: function(addSelected, data, before, anchor){
- // summary: inserts new data items (see Container's insertNodes method for details)
- // addSelected: Boolean: all new nodes will be added to selected items, if true, no selection change otherwise
- // data: Array: a list of data items, which should be processed by the creator function
- // before: Boolean: insert before the anchor, if true, and after the anchor otherwise
- // anchor: Node: the anchor node to be used as a point of insertion
- var oldCreator = this._normalizedCreator;
- this._normalizedCreator = function(item, hint){
- var t = oldCreator.call(this, item, hint);
- if(addSelected){
- if(!this.anchor){
- this.anchor = t.node;
- this._removeItemClass(t.node, "Selected");
- this._addItemClass(this.anchor, "Anchor");
- }else if(this.anchor != t.node){
- this._removeItemClass(t.node, "Anchor");
- this._addItemClass(t.node, "Selected");
- }
- this.selection[t.node.id] = 1;
- }else{
- this._removeItemClass(t.node, "Selected");
- this._removeItemClass(t.node, "Anchor");
- }
- return t;
- };
- dojo.dnd.Selector.superclass.insertNodes.call(this, data, before, anchor);
- this._normalizedCreator = oldCreator;
- return this; // self
- },
- destroy: function(){
- // summary: prepares the object to be garbage-collected
- dojo.dnd.Selector.superclass.destroy.call(this);
- this.selection = this.anchor = null;
- },
- // markup methods
- markupFactory: function(params, node){
- params._skipStartup = true;
- return new dojo.dnd.Selector(node, params);
- },
-
- // mouse events
- onMouseDown: function(e){
- // summary: event processor for onmousedown
- // e: Event: mouse event
- if(!this.current){ return; }
- if(!this.singular && !dojo.dnd.getCopyKeyState(e) && !e.shiftKey && (this.current.id in this.selection)){
- this.simpleSelection = true;
- dojo.stopEvent(e);
- return;
- }
- if(!this.singular && e.shiftKey){
- if(!dojo.dnd.getCopyKeyState(e)){
- this._removeSelection();
- }
- var c = dojo.query("> .dojoDndItem", this.parent);
- if(c.length){
- if(!this.anchor){
- this.anchor = c[0];
- this._addItemClass(this.anchor, "Anchor");
- }
- this.selection[this.anchor.id] = 1;
- if(this.anchor != this.current){
- var i = 0;
- for(; i < c.length; ++i){
- var node = c[i];
- if(node == this.anchor || node == this.current){ break; }
- }
- for(++i; i < c.length; ++i){
- var node = c[i];
- if(node == this.anchor || node == this.current){ break; }
- this._addItemClass(node, "Selected");
- this.selection[node.id] = 1;
- }
- this._addItemClass(this.current, "Selected");
- this.selection[this.current.id] = 1;
- }
- }
- }else{
- if(this.singular){
- if(this.anchor == this.current){
- if(dojo.dnd.getCopyKeyState(e)){
- this.selectNone();
- }
- }else{
- this.selectNone();
- this.anchor = this.current;
- this._addItemClass(this.anchor, "Anchor");
- this.selection[this.current.id] = 1;
- }
- }else{
- if(dojo.dnd.getCopyKeyState(e)){
- if(this.anchor == this.current){
- delete this.selection[this.anchor.id];
- this._removeAnchor();
- }else{
- if(this.current.id in this.selection){
- this._removeItemClass(this.current, "Selected");
- delete this.selection[this.current.id];
- }else{
- if(this.anchor){
- this._removeItemClass(this.anchor, "Anchor");
- this._addItemClass(this.anchor, "Selected");
- }
- this.anchor = this.current;
- this._addItemClass(this.current, "Anchor");
- this.selection[this.current.id] = 1;
- }
- }
- }else{
- if(!(this.current.id in this.selection)){
- this.selectNone();
- this.anchor = this.current;
- this._addItemClass(this.current, "Anchor");
- this.selection[this.current.id] = 1;
- }
- }
- }
- }
- dojo.stopEvent(e);
- },
- onMouseUp: function(e){
- // summary: event processor for onmouseup
- // e: Event: mouse event
- if(!this.simpleSelection){ return; }
- this.simpleSelection = false;
- this.selectNone();
- if(this.current){
- this.anchor = this.current;
- this._addItemClass(this.anchor, "Anchor");
- this.selection[this.current.id] = 1;
- }
- },
- onMouseMove: function(e){
- // summary: event processor for onmousemove
- // e: Event: mouse event
- this.simpleSelection = false;
- },
-
- // utilities
- onOverEvent: function(){
- // summary: this function is called once, when mouse is over our container
- this.onmousemoveEvent = dojo.connect(this.node, "onmousemove", this, "onMouseMove");
- },
- onOutEvent: function(){
- // summary: this function is called once, when mouse is out of our container
- dojo.disconnect(this.onmousemoveEvent);
- delete this.onmousemoveEvent;
- },
- _removeSelection: function(){
- // summary: unselects all items
- var e = dojo.dnd._empty;
- for(var i in this.selection){
- if(i in e){ continue; }
- var node = dojo.byId(i);
- if(node){ this._removeItemClass(node, "Selected"); }
- }
- this.selection = {};
- return this; // self
- },
- _removeAnchor: function(){
- if(this.anchor){
- this._removeItemClass(this.anchor, "Anchor");
- this.anchor = null;
- }
- return this; // self
- }
-});
-
+if(!dojo._hasResource["dojo.dnd.Selector"]){
+dojo._hasResource["dojo.dnd.Selector"]=true;
+dojo.provide("dojo.dnd.Selector");
+dojo.require("dojo.dnd.common");
+dojo.require("dojo.dnd.Container");
+dojo.declare("dojo.dnd.Selector",dojo.dnd.Container,{constructor:function(_1,_2){
+if(!_2){
+_2={};
+}
+this.singular=_2.singular;
+this.autoSync=_2.autoSync;
+this.selection={};
+this.anchor=null;
+this.simpleSelection=false;
+this.events.push(dojo.connect(this.node,"onmousedown",this,"onMouseDown"),dojo.connect(this.node,"onmouseup",this,"onMouseUp"));
+},singular:false,getSelectedNodes:function(){
+var t=new dojo.NodeList();
+var e=dojo.dnd._empty;
+for(var i in this.selection){
+if(i in e){
+continue;
+}
+t.push(dojo.byId(i));
+}
+return t;
+},selectNone:function(){
+return this._removeSelection()._removeAnchor();
+},selectAll:function(){
+this.forInItems(function(_3,id){
+this._addItemClass(dojo.byId(id),"Selected");
+this.selection[id]=1;
+},this);
+return this._removeAnchor();
+},deleteSelectedNodes:function(){
+var e=dojo.dnd._empty;
+for(var i in this.selection){
+if(i in e){
+continue;
+}
+var n=dojo.byId(i);
+this.delItem(i);
+dojo.destroy(n);
+}
+this.anchor=null;
+this.selection={};
+return this;
+},forInSelectedItems:function(f,o){
+o=o||dojo.global;
+var s=this.selection,e=dojo.dnd._empty;
+for(var i in s){
+if(i in e){
+continue;
+}
+f.call(o,this.getItem(i),i,this);
+}
+},sync:function(){
+dojo.dnd.Selector.superclass.sync.call(this);
+if(this.anchor){
+if(!this.getItem(this.anchor.id)){
+this.anchor=null;
+}
+}
+var t=[],e=dojo.dnd._empty;
+for(var i in this.selection){
+if(i in e){
+continue;
+}
+if(!this.getItem(i)){
+t.push(i);
+}
+}
+dojo.forEach(t,function(i){
+delete this.selection[i];
+},this);
+return this;
+},insertNodes:function(_4,_5,_6,_7){
+var _8=this._normalizedCreator;
+this._normalizedCreator=function(_9,_a){
+var t=_8.call(this,_9,_a);
+if(_4){
+if(!this.anchor){
+this.anchor=t.node;
+this._removeItemClass(t.node,"Selected");
+this._addItemClass(this.anchor,"Anchor");
+}else{
+if(this.anchor!=t.node){
+this._removeItemClass(t.node,"Anchor");
+this._addItemClass(t.node,"Selected");
+}
+}
+this.selection[t.node.id]=1;
+}else{
+this._removeItemClass(t.node,"Selected");
+this._removeItemClass(t.node,"Anchor");
+}
+return t;
+};
+dojo.dnd.Selector.superclass.insertNodes.call(this,_5,_6,_7);
+this._normalizedCreator=_8;
+return this;
+},destroy:function(){
+dojo.dnd.Selector.superclass.destroy.call(this);
+this.selection=this.anchor=null;
+},markupFactory:function(_b,_c){
+_b._skipStartup=true;
+return new dojo.dnd.Selector(_c,_b);
+},onMouseDown:function(e){
+if(this.autoSync){
+this.sync();
+}
+if(!this.current){
+return;
}
+if(!this.singular&&!dojo.isCopyKey(e)&&!e.shiftKey&&(this.current.id in this.selection)){
+this.simpleSelection=true;
+if(e.button===dojo.mouseButtons.LEFT){
+dojo.stopEvent(e);
+}
+return;
+}
+if(!this.singular&&e.shiftKey){
+if(!dojo.isCopyKey(e)){
+this._removeSelection();
+}
+var c=this.getAllNodes();
+if(c.length){
+if(!this.anchor){
+this.anchor=c[0];
+this._addItemClass(this.anchor,"Anchor");
+}
+this.selection[this.anchor.id]=1;
+if(this.anchor!=this.current){
+var i=0;
+for(;i<c.length;++i){
+var _d=c[i];
+if(_d==this.anchor||_d==this.current){
+break;
+}
+}
+for(++i;i<c.length;++i){
+var _d=c[i];
+if(_d==this.anchor||_d==this.current){
+break;
+}
+this._addItemClass(_d,"Selected");
+this.selection[_d.id]=1;
+}
+this._addItemClass(this.current,"Selected");
+this.selection[this.current.id]=1;
+}
+}
+}else{
+if(this.singular){
+if(this.anchor==this.current){
+if(dojo.isCopyKey(e)){
+this.selectNone();
+}
+}else{
+this.selectNone();
+this.anchor=this.current;
+this._addItemClass(this.anchor,"Anchor");
+this.selection[this.current.id]=1;
+}
+}else{
+if(dojo.isCopyKey(e)){
+if(this.anchor==this.current){
+delete this.selection[this.anchor.id];
+this._removeAnchor();
+}else{
+if(this.current.id in this.selection){
+this._removeItemClass(this.current,"Selected");
+delete this.selection[this.current.id];
+}else{
+if(this.anchor){
+this._removeItemClass(this.anchor,"Anchor");
+this._addItemClass(this.anchor,"Selected");
+}
+this.anchor=this.current;
+this._addItemClass(this.current,"Anchor");
+this.selection[this.current.id]=1;
+}
+}
+}else{
+if(!(this.current.id in this.selection)){
+this.selectNone();
+this.anchor=this.current;
+this._addItemClass(this.current,"Anchor");
+this.selection[this.current.id]=1;
+}
+}
+}
+}
+dojo.stopEvent(e);
+},onMouseUp:function(e){
+if(!this.simpleSelection){
+return;
+}
+this.simpleSelection=false;
+this.selectNone();
+if(this.current){
+this.anchor=this.current;
+this._addItemClass(this.anchor,"Anchor");
+this.selection[this.current.id]=1;
+}
+},onMouseMove:function(e){
+this.simpleSelection=false;
+},onOverEvent:function(){
+this.onmousemoveEvent=dojo.connect(this.node,"onmousemove",this,"onMouseMove");
+},onOutEvent:function(){
+dojo.disconnect(this.onmousemoveEvent);
+delete this.onmousemoveEvent;
+},_removeSelection:function(){
+var e=dojo.dnd._empty;
+for(var i in this.selection){
+if(i in e){
+continue;
+}
+var _e=dojo.byId(i);
+if(_e){
+this._removeItemClass(_e,"Selected");
+}
+}
+this.selection={};
+return this;
+},_removeAnchor:function(){
+if(this.anchor){
+this._removeItemClass(this.anchor,"Anchor");
+this.anchor=null;
+}
+return this;
+}});
+}
diff --git a/js/dojo/dojo/dnd/Source.js b/js/dojo/dojo/dnd/Source.js
--- a/js/dojo/dojo/dnd/Source.js
+++ b/js/dojo/dojo/dnd/Source.js
@@ -1,375 +1,297 @@
-if(!dojo._hasResource["dojo.dnd.Source"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.dnd.Source"] = true;
-dojo.provide("dojo.dnd.Source");
-
-dojo.require("dojo.dnd.Selector");
-dojo.require("dojo.dnd.Manager");
-
/*
- Container property:
- "Horizontal"- if this is the horizontal container
- Source states:
- "" - normal state
- "Moved" - this source is being moved
- "Copied" - this source is being copied
- Target states:
- "" - normal state
- "Disabled" - the target cannot accept an avatar
- Target anchor state:
- "" - item is not selected
- "Before" - insert point is before the anchor
- "After" - insert point is after the anchor
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
*/
-dojo.declare("dojo.dnd.Source", dojo.dnd.Selector, {
- // summary: a Source object, which can be used as a DnD source, or a DnD target
-
- // object attributes (for markup)
- isSource: true,
- horizontal: false,
- copyOnly: false,
- skipForm: false,
- withHandles: false,
- accept: ["text"],
-
- constructor: function(node, params){
- // summary: a constructor of the Source
- // node: Node: node or node's id to build the source on
- // params: Object: a dict of parameters, recognized parameters are:
- // isSource: Boolean: can be used as a DnD source, if true; assumed to be "true" if omitted
- // accept: Array: list of accepted types (text strings) for a target; assumed to be ["text"] if omitted
- // horizontal: Boolean: a horizontal container, if true, vertical otherwise or when omitted
- // copyOnly: Boolean: always copy items, if true, use a state of Ctrl key otherwise
- // withHandles: Boolean: allows dragging only by handles
- // the rest of parameters are passed to the selector
- if(!params){ params = {}; }
- this.isSource = typeof params.isSource == "undefined" ? true : params.isSource;
- var type = params.accept instanceof Array ? params.accept : ["text"];
- this.accept = null;
- if(type.length){
- this.accept = {};
- for(var i = 0; i < type.length; ++i){
- this.accept[type[i]] = 1;
- }
- }
- this.horizontal = params.horizontal;
- this.copyOnly = params.copyOnly;
- this.withHandles = params.withHandles;
- // class-specific variables
- this.isDragging = false;
- this.mouseDown = false;
- this.targetAnchor = null;
- this.targetBox = null;
- this.before = true;
- // states
- this.sourceState = "";
- if(this.isSource){
- dojo.addClass(this.node, "dojoDndSource");
- }
- this.targetState = "";
- if(this.accept){
- dojo.addClass(this.node, "dojoDndTarget");
- }
- if(this.horizontal){
- dojo.addClass(this.node, "dojoDndHorizontal");
- }
- // set up events
- this.topics = [
- dojo.subscribe("/dnd/source/over", this, "onDndSourceOver"),
- dojo.subscribe("/dnd/start", this, "onDndStart"),
- dojo.subscribe("/dnd/drop", this, "onDndDrop"),
- dojo.subscribe("/dnd/cancel", this, "onDndCancel")
- ];
- },
-
- // methods
- checkAcceptance: function(source, nodes){
- // summary: checks, if the target can accept nodes from this source
- // source: Object: the source which provides items
- // nodes: Array: the list of transferred items
- if(this == source){ return true; }
- for(var i = 0; i < nodes.length; ++i){
- var type = source.getItem(nodes[i].id).type;
- // type instanceof Array
- var flag = false;
- for(var j = 0; j < type.length; ++j){
- if(type[j] in this.accept){
- flag = true;
- break;
- }
- }
- if(!flag){
- return false; // Boolean
- }
- }
- return true; // Boolean
- },
- copyState: function(keyPressed){
- // summary: Returns true, if we need to copy items, false to move.
- // It is separated to be overwritten dynamically, if needed.
- // keyPressed: Boolean: the "copy" was pressed
- return this.copyOnly || keyPressed; // Boolean
- },
- destroy: function(){
- // summary: prepares the object to be garbage-collected
- dojo.dnd.Source.superclass.destroy.call(this);
- dojo.forEach(this.topics, dojo.unsubscribe);
- this.targetAnchor = null;
- },
- // markup methods
- markupFactory: function(params, node){
- params._skipStartup = true;
- return new dojo.dnd.Source(node, params);
- },
-
- // mouse event processors
- onMouseMove: function(e){
- // summary: event processor for onmousemove
- // e: Event: mouse event
- if(this.isDragging && this.targetState == "Disabled"){ return; }
- dojo.dnd.Source.superclass.onMouseMove.call(this, e);
- var m = dojo.dnd.manager();
- if(this.isDragging){
- // calculate before/after
- var before = false;
- if(this.current){
- if(!this.targetBox || this.targetAnchor != this.current){
- this.targetBox = {
- xy: dojo.coords(this.current, true),
- w: this.current.offsetWidth,
- h: this.current.offsetHeight
- };
- }
- if(this.horizontal){
- before = (e.pageX - this.targetBox.xy.x) < (this.targetBox.w / 2);
- }else{
- before = (e.pageY - this.targetBox.xy.y) < (this.targetBox.h / 2);
- }
- }
- if(this.current != this.targetAnchor || before != this.before){
- this._markTargetAnchor(before);
- m.canDrop(!this.current || m.source != this || !(this.current.id in this.selection));
- }
- }else{
- if(this.mouseDown && this.isSource){
- var nodes = this.getSelectedNodes();
- if(nodes.length){
- m.startDrag(this, nodes, this.copyState(dojo.dnd.getCopyKeyState(e)));
- }
- }
- }
- },
- onMouseDown: function(e){
- // summary: event processor for onmousedown
- // e: Event: mouse event
- if(this._legalMouseDown(e) && (!this.skipForm || !dojo.dnd.isFormElement(e))){
- this.mouseDown = true;
- this.mouseButton = e.button;
- dojo.dnd.Source.superclass.onMouseDown.call(this, e);
- }
- },
- onMouseUp: function(e){
- // summary: event processor for onmouseup
- // e: Event: mouse event
- if(this.mouseDown){
- this.mouseDown = false;
- dojo.dnd.Source.superclass.onMouseUp.call(this, e);
- }
- },
-
- // topic event processors
- onDndSourceOver: function(source){
- // summary: topic event processor for /dnd/source/over, called when detected a current source
- // source: Object: the source which has the mouse over it
- if(this != source){
- this.mouseDown = false;
- if(this.targetAnchor){
- this._unmarkTargetAnchor();
- }
- }else if(this.isDragging){
- var m = dojo.dnd.manager();
- m.canDrop(this.targetState != "Disabled" && (!this.current || m.source != this || !(this.current.id in this.selection)));
- }
- },
- onDndStart: function(source, nodes, copy){
- // summary: topic event processor for /dnd/start, called to initiate the DnD operation
- // source: Object: the source which provides items
- // nodes: Array: the list of transferred items
- // copy: Boolean: copy items, if true, move items otherwise
- if(this.isSource){
- this._changeState("Source", this == source ? (copy ? "Copied" : "Moved") : "");
- }
- var accepted = this.accept && this.checkAcceptance(source, nodes);
- this._changeState("Target", accepted ? "" : "Disabled");
- if(accepted && this == source){
- dojo.dnd.manager().overSource(this);
- }
- this.isDragging = true;
- },
- onDndDrop: function(source, nodes, copy){
- // summary: topic event processor for /dnd/drop, called to finish the DnD operation
- // source: Object: the source which provides items
- // nodes: Array: the list of transferred items
- // copy: Boolean: copy items, if true, move items otherwise
- do{ //break box
- if(this.containerState != "Over"){ break; }
- var oldCreator = this._normalizedCreator;
- if(this != source){
- // transferring nodes from the source to the target
- if(this.creator){
- // use defined creator
- this._normalizedCreator = function(node, hint){
- return oldCreator.call(this, source.getItem(node.id).data, hint);
- };
- }else{
- // we have no creator defined => move/clone nodes
- if(copy){
- // clone nodes
- this._normalizedCreator = function(node, hint){
- var t = source.getItem(node.id);
- var n = node.cloneNode(true);
- n.id = dojo.dnd.getUniqueId();
- return {node: n, data: t.data, type: t.type};
- };
- }else{
- // move nodes
- this._normalizedCreator = function(node, hint){
- var t = source.getItem(node.id);
- source.delItem(node.id);
- return {node: node, data: t.data, type: t.type};
- };
- }
- }
- }else{
- // transferring nodes within the single source
- if(this.current && this.current.id in this.selection){ break; }
- if(this.creator){
- // use defined creator
- if(copy){
- // create new copies of data items
- this._normalizedCreator = function(node, hint){
- return oldCreator.call(this, source.getItem(node.id).data, hint);
- };
- }else{
- // move nodes
- if(!this.current){ break; }
- this._normalizedCreator = function(node, hint){
- var t = source.getItem(node.id);
- return {node: node, data: t.data, type: t.type};
- };
- }
- }else{
- // we have no creator defined => move/clone nodes
- if(copy){
- // clone nodes
- this._normalizedCreator = function(node, hint){
- var t = source.getItem(node.id);
- var n = node.cloneNode(true);
- n.id = dojo.dnd.getUniqueId();
- return {node: n, data: t.data, type: t.type};
- };
- }else{
- // move nodes
- if(!this.current){ break; }
- this._normalizedCreator = function(node, hint){
- var t = source.getItem(node.id);
- return {node: node, data: t.data, type: t.type};
- };
- }
- }
- }
- this._removeSelection();
- if(this != source){
- this._removeAnchor();
- }
- if(this != source && !copy && !this.creator){
- source.selectNone();
- }
- this.insertNodes(true, nodes, this.before, this.current);
- if(this != source && !copy && this.creator){
- source.deleteSelectedNodes();
- }
- this._normalizedCreator = oldCreator;
- }while(false);
- this.onDndCancel();
- },
- onDndCancel: function(){
- // summary: topic event processor for /dnd/cancel, called to cancel the DnD operation
- if(this.targetAnchor){
- this._unmarkTargetAnchor();
- this.targetAnchor = null;
- }
- this.before = true;
- this.isDragging = false;
- this.mouseDown = false;
- delete this.mouseButton;
- this._changeState("Source", "");
- this._changeState("Target", "");
- },
-
- // utilities
- onOverEvent: function(){
- // summary: this function is called once, when mouse is over our container
- dojo.dnd.Source.superclass.onOverEvent.call(this);
- dojo.dnd.manager().overSource(this);
- },
- onOutEvent: function(){
- // summary: this function is called once, when mouse is out of our container
- dojo.dnd.Source.superclass.onOutEvent.call(this);
- dojo.dnd.manager().outSource(this);
- },
- _markTargetAnchor: function(before){
- // summary: assigns a class to the current target anchor based on "before" status
- // before: Boolean: insert before, if true, after otherwise
- if(this.current == this.targetAnchor && this.before == before){ return; }
- if(this.targetAnchor){
- this._removeItemClass(this.targetAnchor, this.before ? "Before" : "After");
- }
- this.targetAnchor = this.current;
- this.targetBox = null;
- this.before = before;
- if(this.targetAnchor){
- this._addItemClass(this.targetAnchor, this.before ? "Before" : "After");
- }
- },
- _unmarkTargetAnchor: function(){
- // summary: removes a class of the current target anchor based on "before" status
- if(!this.targetAnchor){ return; }
- this._removeItemClass(this.targetAnchor, this.before ? "Before" : "After");
- this.targetAnchor = null;
- this.targetBox = null;
- this.before = true;
- },
- _markDndStatus: function(copy){
- // summary: changes source's state based on "copy" status
- this._changeState("Source", copy ? "Copied" : "Moved");
- },
- _legalMouseDown: function(e){
- // summary: checks if user clicked on "approved" items
- // e: Event: mouse event
- if(!this.withHandles){ return true; }
- for(var node = e.target; node && !dojo.hasClass(node, "dojoDndItem"); node = node.parentNode){
- if(dojo.hasClass(node, "dojoDndHandle")){ return true; }
- }
- return false; // Boolean
- }
-});
-
-dojo.declare("dojo.dnd.Target", dojo.dnd.Source, {
- // summary: a Target object, which can be used as a DnD target
-
- constructor: function(node, params){
- // summary: a constructor of the Target --- see the Source constructor for details
- this.isSource = false;
- dojo.removeClass(this.node, "dojoDndSource");
- },
-
- // markup methods
- markupFactory: function(params, node){
- params._skipStartup = true;
- return new dojo.dnd.Target(node, params);
- }
-});
-
+if(!dojo._hasResource["dojo.dnd.Source"]){
+dojo._hasResource["dojo.dnd.Source"]=true;
+dojo.provide("dojo.dnd.Source");
+dojo.require("dojo.dnd.Selector");
+dojo.require("dojo.dnd.Manager");
+dojo.declare("dojo.dnd.Source",dojo.dnd.Selector,{isSource:true,horizontal:false,copyOnly:false,selfCopy:false,selfAccept:true,skipForm:false,withHandles:false,autoSync:false,delay:0,accept:["text"],generateText:true,constructor:function(_1,_2){
+dojo.mixin(this,dojo.mixin({},_2));
+var _3=this.accept;
+if(_3.length){
+this.accept={};
+for(var i=0;i<_3.length;++i){
+this.accept[_3[i]]=1;
+}
+}
+this.isDragging=false;
+this.mouseDown=false;
+this.targetAnchor=null;
+this.targetBox=null;
+this.before=true;
+this._lastX=0;
+this._lastY=0;
+this.sourceState="";
+if(this.isSource){
+dojo.addClass(this.node,"dojoDndSource");
+}
+this.targetState="";
+if(this.accept){
+dojo.addClass(this.node,"dojoDndTarget");
+}
+if(this.horizontal){
+dojo.addClass(this.node,"dojoDndHorizontal");
+}
+this.topics=[dojo.subscribe("/dnd/source/over",this,"onDndSourceOver"),dojo.subscribe("/dnd/start",this,"onDndStart"),dojo.subscribe("/dnd/drop",this,"onDndDrop"),dojo.subscribe("/dnd/cancel",this,"onDndCancel")];
+},checkAcceptance:function(_4,_5){
+if(this==_4){
+return !this.copyOnly||this.selfAccept;
+}
+for(var i=0;i<_5.length;++i){
+var _6=_4.getItem(_5[i].id).type;
+var _7=false;
+for(var j=0;j<_6.length;++j){
+if(_6[j] in this.accept){
+_7=true;
+break;
+}
+}
+if(!_7){
+return false;
+}
+}
+return true;
+},copyState:function(_8,_9){
+if(_8){
+return true;
+}
+if(arguments.length<2){
+_9=this==dojo.dnd.manager().target;
+}
+if(_9){
+if(this.copyOnly){
+return this.selfCopy;
+}
+}else{
+return this.copyOnly;
+}
+return false;
+},destroy:function(){
+dojo.dnd.Source.superclass.destroy.call(this);
+dojo.forEach(this.topics,dojo.unsubscribe);
+this.targetAnchor=null;
+},markupFactory:function(_a,_b){
+_a._skipStartup=true;
+return new dojo.dnd.Source(_b,_a);
+},onMouseMove:function(e){
+if(this.isDragging&&this.targetState=="Disabled"){
+return;
+}
+dojo.dnd.Source.superclass.onMouseMove.call(this,e);
+var m=dojo.dnd.manager();
+if(this.isDragging){
+var _c=false;
+if(this.current){
+if(!this.targetBox||this.targetAnchor!=this.current){
+this.targetBox=dojo.position(this.current,true);
+}
+if(this.horizontal){
+_c=(e.pageX-this.targetBox.x)<(this.targetBox.w/2);
+}else{
+_c=(e.pageY-this.targetBox.y)<(this.targetBox.h/2);
+}
+}
+if(this.current!=this.targetAnchor||_c!=this.before){
+this._markTargetAnchor(_c);
+m.canDrop(!this.current||m.source!=this||!(this.current.id in this.selection));
+}
+}else{
+if(this.mouseDown&&this.isSource&&(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay)){
+var _d=this.getSelectedNodes();
+if(_d.length){
+m.startDrag(this,_d,this.copyState(dojo.isCopyKey(e),true));
+}
+}
+}
+},onMouseDown:function(e){
+if(!this.mouseDown&&this._legalMouseDown(e)&&(!this.skipForm||!dojo.dnd.isFormElement(e))){
+this.mouseDown=true;
+this._lastX=e.pageX;
+this._lastY=e.pageY;
+dojo.dnd.Source.superclass.onMouseDown.call(this,e);
+}
+},onMouseUp:function(e){
+if(this.mouseDown){
+this.mouseDown=false;
+dojo.dnd.Source.superclass.onMouseUp.call(this,e);
+}
+},onDndSourceOver:function(_e){
+if(this!=_e){
+this.mouseDown=false;
+if(this.targetAnchor){
+this._unmarkTargetAnchor();
+}
+}else{
+if(this.isDragging){
+var m=dojo.dnd.manager();
+m.canDrop(this.targetState!="Disabled"&&(!this.current||m.source!=this||!(this.current.id in this.selection)));
+}
+}
+},onDndStart:function(_f,_10,_11){
+if(this.autoSync){
+this.sync();
+}
+if(this.isSource){
+this._changeState("Source",this==_f?(_11?"Copied":"Moved"):"");
+}
+var _12=this.accept&&this.checkAcceptance(_f,_10);
+this._changeState("Target",_12?"":"Disabled");
+if(this==_f){
+dojo.dnd.manager().overSource(this);
+}
+this.isDragging=true;
+},onDndDrop:function(_13,_14,_15,_16){
+if(this==_16){
+this.onDrop(_13,_14,_15);
}
+this.onDndCancel();
+},onDndCancel:function(){
+if(this.targetAnchor){
+this._unmarkTargetAnchor();
+this.targetAnchor=null;
+}
+this.before=true;
+this.isDragging=false;
+this.mouseDown=false;
+this._changeState("Source","");
+this._changeState("Target","");
+},onDrop:function(_17,_18,_19){
+if(this!=_17){
+this.onDropExternal(_17,_18,_19);
+}else{
+this.onDropInternal(_18,_19);
+}
+},onDropExternal:function(_1a,_1b,_1c){
+var _1d=this._normalizedCreator;
+if(this.creator){
+this._normalizedCreator=function(_1e,_1f){
+return _1d.call(this,_1a.getItem(_1e.id).data,_1f);
+};
+}else{
+if(_1c){
+this._normalizedCreator=function(_20,_21){
+var t=_1a.getItem(_20.id);
+var n=_20.cloneNode(true);
+n.id=dojo.dnd.getUniqueId();
+return {node:n,data:t.data,type:t.type};
+};
+}else{
+this._normalizedCreator=function(_22,_23){
+var t=_1a.getItem(_22.id);
+_1a.delItem(_22.id);
+return {node:_22,data:t.data,type:t.type};
+};
+}
+}
+this.selectNone();
+if(!_1c&&!this.creator){
+_1a.selectNone();
+}
+this.insertNodes(true,_1b,this.before,this.current);
+if(!_1c&&this.creator){
+_1a.deleteSelectedNodes();
+}
+this._normalizedCreator=_1d;
+},onDropInternal:function(_24,_25){
+var _26=this._normalizedCreator;
+if(this.current&&this.current.id in this.selection){
+return;
+}
+if(_25){
+if(this.creator){
+this._normalizedCreator=function(_27,_28){
+return _26.call(this,this.getItem(_27.id).data,_28);
+};
+}else{
+this._normalizedCreator=function(_29,_2a){
+var t=this.getItem(_29.id);
+var n=_29.cloneNode(true);
+n.id=dojo.dnd.getUniqueId();
+return {node:n,data:t.data,type:t.type};
+};
+}
+}else{
+if(!this.current){
+return;
+}
+this._normalizedCreator=function(_2b,_2c){
+var t=this.getItem(_2b.id);
+return {node:_2b,data:t.data,type:t.type};
+};
+}
+this._removeSelection();
+this.insertNodes(true,_24,this.before,this.current);
+this._normalizedCreator=_26;
+},onDraggingOver:function(){
+},onDraggingOut:function(){
+},onOverEvent:function(){
+dojo.dnd.Source.superclass.onOverEvent.call(this);
+dojo.dnd.manager().overSource(this);
+if(this.isDragging&&this.targetState!="Disabled"){
+this.onDraggingOver();
+}
+},onOutEvent:function(){
+dojo.dnd.Source.superclass.onOutEvent.call(this);
+dojo.dnd.manager().outSource(this);
+if(this.isDragging&&this.targetState!="Disabled"){
+this.onDraggingOut();
+}
+},_markTargetAnchor:function(_2d){
+if(this.current==this.targetAnchor&&this.before==_2d){
+return;
+}
+if(this.targetAnchor){
+this._removeItemClass(this.targetAnchor,this.before?"Before":"After");
+}
+this.targetAnchor=this.current;
+this.targetBox=null;
+this.before=_2d;
+if(this.targetAnchor){
+this._addItemClass(this.targetAnchor,this.before?"Before":"After");
+}
+},_unmarkTargetAnchor:function(){
+if(!this.targetAnchor){
+return;
+}
+this._removeItemClass(this.targetAnchor,this.before?"Before":"After");
+this.targetAnchor=null;
+this.targetBox=null;
+this.before=true;
+},_markDndStatus:function(_2e){
+this._changeState("Source",_2e?"Copied":"Moved");
+},_legalMouseDown:function(e){
+if(!dojo.mouseButtons.isLeft(e)){
+return false;
+}
+if(!this.withHandles){
+return true;
+}
+for(var _2f=e.target;_2f&&_2f!==this.node;_2f=_2f.parentNode){
+if(dojo.hasClass(_2f,"dojoDndHandle")){
+return true;
+}
+if(dojo.hasClass(_2f,"dojoDndItem")||dojo.hasClass(_2f,"dojoDndIgnore")){
+break;
+}
+}
+return false;
+}});
+dojo.declare("dojo.dnd.Target",dojo.dnd.Source,{constructor:function(_30,_31){
+this.isSource=false;
+dojo.removeClass(this.node,"dojoDndSource");
+},markupFactory:function(_32,_33){
+_32._skipStartup=true;
+return new dojo.dnd.Target(_33,_32);
+}});
+dojo.declare("dojo.dnd.AutoSource",dojo.dnd.Source,{constructor:function(_34,_35){
+this.autoSync=true;
+},markupFactory:function(_36,_37){
+_36._skipStartup=true;
+return new dojo.dnd.AutoSource(_37,_36);
+}});
+}
diff --git a/js/dojo/dojo/dnd/autoscroll.js b/js/dojo/dojo/dnd/autoscroll.js
--- a/js/dojo/dojo/dnd/autoscroll.js
+++ b/js/dojo/dojo/dnd/autoscroll.js
@@ -1,103 +1,99 @@
-if(!dojo._hasResource["dojo.dnd.autoscroll"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.dnd.autoscroll"] = true;
-dojo.provide("dojo.dnd.autoscroll");
-
-dojo.dnd.getViewport = function(){
- // summary: returns a viewport size (visible part of the window)
-
- // FIXME: need more docs!!
- var d = dojo.doc, dd = d.documentElement, w = window, b = dojo.body();
- if(dojo.isMozilla){
- return {w: dd.clientWidth, h: w.innerHeight}; // Object
- }else if(!dojo.isOpera && w.innerWidth){
- return {w: w.innerWidth, h: w.innerHeight}; // Object
- }else if (!dojo.isOpera && dd && dd.clientWidth){
- return {w: dd.clientWidth, h: dd.clientHeight}; // Object
- }else if (b.clientWidth){
- return {w: b.clientWidth, h: b.clientHeight}; // Object
- }
- return null; // Object
-};
-
-dojo.dnd.V_TRIGGER_AUTOSCROLL = 32;
-dojo.dnd.H_TRIGGER_AUTOSCROLL = 32;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.dnd.V_AUTOSCROLL_VALUE = 16;
-dojo.dnd.H_AUTOSCROLL_VALUE = 16;
-
-dojo.dnd.autoScroll = function(e){
- // summary:
- // a handler for onmousemove event, which scrolls the window, if
- // necesary
- // e: Event:
- // onmousemove event
-
- // FIXME: needs more docs!
- var v = dojo.dnd.getViewport(), dx = 0, dy = 0;
- if(e.clientX < dojo.dnd.H_TRIGGER_AUTOSCROLL){
- dx = -dojo.dnd.H_AUTOSCROLL_VALUE;
- }else if(e.clientX > v.w - dojo.dnd.H_TRIGGER_AUTOSCROLL){
- dx = dojo.dnd.H_AUTOSCROLL_VALUE;
- }
- if(e.clientY < dojo.dnd.V_TRIGGER_AUTOSCROLL){
- dy = -dojo.dnd.V_AUTOSCROLL_VALUE;
- }else if(e.clientY > v.h - dojo.dnd.V_TRIGGER_AUTOSCROLL){
- dy = dojo.dnd.V_AUTOSCROLL_VALUE;
- }
- window.scrollBy(dx, dy);
-};
-
-dojo.dnd._validNodes = {"div": 1, "p": 1, "td": 1};
-dojo.dnd._validOverflow = {"auto": 1, "scroll": 1};
-dojo.dnd.autoScrollNodes = function(e){
- // summary:
- // a handler for onmousemove event, which scrolls the first avaialble
- // Dom element, it falls back to dojo.dnd.autoScroll()
- // e: Event:
- // onmousemove event
-
- // FIXME: needs more docs!
- for(var n = e.target; n;){
- if(n.nodeType == 1 && (n.tagName.toLowerCase() in dojo.dnd._validNodes)){
- var s = dojo.getComputedStyle(n);
- if(s.overflow.toLowerCase() in dojo.dnd._validOverflow){
- var b = dojo._getContentBox(n, s), t = dojo._abs(n, true);
- // console.debug(b.l, b.t, t.x, t.y, n.scrollLeft, n.scrollTop);
- b.l += t.x + n.scrollLeft;
- b.t += t.y + n.scrollTop;
- var w = Math.min(dojo.dnd.H_TRIGGER_AUTOSCROLL, b.w / 2),
- h = Math.min(dojo.dnd.V_TRIGGER_AUTOSCROLL, b.h / 2),
- rx = e.pageX - b.l, ry = e.pageY - b.t, dx = 0, dy = 0;
- if(rx > 0 && rx < b.w){
- if(rx < w){
- dx = -dojo.dnd.H_AUTOSCROLL_VALUE;
- }else if(rx > b.w - w){
- dx = dojo.dnd.H_AUTOSCROLL_VALUE;
- }
- }
- //console.debug("ry =", ry, "b.h =", b.h, "h =", h);
- if(ry > 0 && ry < b.h){
- if(ry < h){
- dy = -dojo.dnd.V_AUTOSCROLL_VALUE;
- }else if(ry > b.h - h){
- dy = dojo.dnd.V_AUTOSCROLL_VALUE;
- }
- }
- var oldLeft = n.scrollLeft, oldTop = n.scrollTop;
- n.scrollLeft = n.scrollLeft + dx;
- n.scrollTop = n.scrollTop + dy;
- // if(dx || dy){ console.debug(oldLeft + ", " + oldTop + "\n" + dx + ", " + dy + "\n" + n.scrollLeft + ", " + n.scrollTop); }
- if(oldLeft != n.scrollLeft || oldTop != n.scrollTop){ return; }
- }
- }
- try{
- n = n.parentNode;
- }catch(x){
- n = null;
- }
- }
- dojo.dnd.autoScroll(e);
+if(!dojo._hasResource["dojo.dnd.autoscroll"]){
+dojo._hasResource["dojo.dnd.autoscroll"]=true;
+dojo.provide("dojo.dnd.autoscroll");
+dojo.dnd.getViewport=function(){
+var d=dojo.doc,dd=d.documentElement,w=window,b=dojo.body();
+if(dojo.isMozilla){
+return {w:dd.clientWidth,h:w.innerHeight};
+}else{
+if(!dojo.isOpera&&w.innerWidth){
+return {w:w.innerWidth,h:w.innerHeight};
+}else{
+if(!dojo.isOpera&&dd&&dd.clientWidth){
+return {w:dd.clientWidth,h:dd.clientHeight};
+}else{
+if(b.clientWidth){
+return {w:b.clientWidth,h:b.clientHeight};
+}
+}
+}
+}
+return null;
+};
+dojo.dnd.V_TRIGGER_AUTOSCROLL=32;
+dojo.dnd.H_TRIGGER_AUTOSCROLL=32;
+dojo.dnd.V_AUTOSCROLL_VALUE=16;
+dojo.dnd.H_AUTOSCROLL_VALUE=16;
+dojo.dnd.autoScroll=function(e){
+var v=dojo.dnd.getViewport(),dx=0,dy=0;
+if(e.clientX<dojo.dnd.H_TRIGGER_AUTOSCROLL){
+dx=-dojo.dnd.H_AUTOSCROLL_VALUE;
+}else{
+if(e.clientX>v.w-dojo.dnd.H_TRIGGER_AUTOSCROLL){
+dx=dojo.dnd.H_AUTOSCROLL_VALUE;
+}
+}
+if(e.clientY<dojo.dnd.V_TRIGGER_AUTOSCROLL){
+dy=-dojo.dnd.V_AUTOSCROLL_VALUE;
+}else{
+if(e.clientY>v.h-dojo.dnd.V_TRIGGER_AUTOSCROLL){
+dy=dojo.dnd.V_AUTOSCROLL_VALUE;
+}
+}
+window.scrollBy(dx,dy);
};
-
+dojo.dnd._validNodes={"div":1,"p":1,"td":1};
+dojo.dnd._validOverflow={"auto":1,"scroll":1};
+dojo.dnd.autoScrollNodes=function(e){
+for(var n=e.target;n;){
+if(n.nodeType==1&&(n.tagName.toLowerCase() in dojo.dnd._validNodes)){
+var s=dojo.getComputedStyle(n);
+if(s.overflow.toLowerCase() in dojo.dnd._validOverflow){
+var b=dojo._getContentBox(n,s),t=dojo.position(n,true);
+var w=Math.min(dojo.dnd.H_TRIGGER_AUTOSCROLL,b.w/2),h=Math.min(dojo.dnd.V_TRIGGER_AUTOSCROLL,b.h/2),rx=e.pageX-t.x,ry=e.pageY-t.y,dx=0,dy=0;
+if(dojo.isWebKit||dojo.isOpera){
+rx+=dojo.body().scrollLeft,ry+=dojo.body().scrollTop;
+}
+if(rx>0&&rx<b.w){
+if(rx<w){
+dx=-w;
+}else{
+if(rx>b.w-w){
+dx=w;
+}
+}
}
+if(ry>0&&ry<b.h){
+if(ry<h){
+dy=-h;
+}else{
+if(ry>b.h-h){
+dy=h;
+}
+}
+}
+var _1=n.scrollLeft,_2=n.scrollTop;
+n.scrollLeft=n.scrollLeft+dx;
+n.scrollTop=n.scrollTop+dy;
+if(_1!=n.scrollLeft||_2!=n.scrollTop){
+return;
+}
+}
+}
+try{
+n=n.parentNode;
+}
+catch(x){
+n=null;
+}
+}
+dojo.dnd.autoScroll(e);
+};
+}
diff --git a/js/dojo/dojo/dnd/common.js b/js/dojo/dojo/dnd/common.js
--- a/js/dojo/dojo/dnd/common.js
+++ b/js/dojo/dojo/dnd/common.js
@@ -1,35 +1,28 @@
-if(!dojo._hasResource["dojo.dnd.common"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.dnd.common"] = true;
-dojo.provide("dojo.dnd.common");
-
-dojo.dnd._copyKey = navigator.appVersion.indexOf("Macintosh") < 0 ? "ctrlKey" : "metaKey";
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.dnd.getCopyKeyState = function(e) {
- // summary: abstracts away the difference between selection on Mac and PC,
- // and returns the state of the "copy" key to be pressed.
- // e: Event: mouse event
- return e[dojo.dnd._copyKey]; // Boolean
-};
-dojo.dnd._uniqueId = 0;
-dojo.dnd.getUniqueId = function(){
- // summary: returns a unique string for use with any DOM element
- var id;
- do{
- id = "dojoUnique" + (++dojo.dnd._uniqueId);
- }while(dojo.byId(id));
- return id;
+if(!dojo._hasResource["dojo.dnd.common"]){
+dojo._hasResource["dojo.dnd.common"]=true;
+dojo.provide("dojo.dnd.common");
+dojo.dnd.getCopyKeyState=dojo.isCopyKeyPressed;
+dojo.dnd._uniqueId=0;
+dojo.dnd.getUniqueId=function(){
+var id;
+do{
+id=dojo._scopeName+"Unique"+(++dojo.dnd._uniqueId);
+}while(dojo.byId(id));
+return id;
};
-
-dojo.dnd._empty = {};
-
-dojo.dnd.isFormElement = function(/*Event*/ e){
- // summary: returns true, if user clicked on a form element
- var t = e.target;
- if(t.nodeType == 3 /*TEXT_NODE*/){
- t = t.parentNode;
- }
- return " button textarea input select option ".indexOf(" " + t.tagName.toLowerCase() + " ") >= 0; // Boolean
+dojo.dnd._empty={};
+dojo.dnd.isFormElement=function(e){
+var t=e.target;
+if(t.nodeType==3){
+t=t.parentNode;
+}
+return " button textarea input select option ".indexOf(" "+t.tagName.toLowerCase()+" ")>=0;
};
-
}
diff --git a/js/dojo/dojo/dnd/move.js b/js/dojo/dojo/dnd/move.js
--- a/js/dojo/dojo/dnd/move.js
+++ b/js/dojo/dojo/dnd/move.js
@@ -1,190 +1,125 @@
-if(!dojo._hasResource["dojo.dnd.move"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.dnd.move"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo.dnd.move"]){
+dojo._hasResource["dojo.dnd.move"]=true;
dojo.provide("dojo.dnd.move");
-
dojo.require("dojo.dnd.Mover");
dojo.require("dojo.dnd.Moveable");
-
-dojo.declare("dojo.dnd.move.constrainedMoveable", dojo.dnd.Moveable, {
- // object attributes (for markup)
- constraints: function(){},
- within: false,
-
- // markup methods
- markupFactory: function(params, node){
- return new dojo.dnd.move.constrainedMoveable(node, params);
- },
-
- constructor: function(node, params){
- // summary: an object, which makes a node moveable
- // node: Node: a node (or node's id) to be moved
- // params: Object: an optional object with additional parameters;
- // following parameters are recognized:
- // constraints: Function: a function, which calculates a constraint box,
- // it is called in a context of the moveable object.
- // within: Boolean: restrict move within boundaries.
- // the rest is passed to the base class
- if(!params){ params = {}; }
- this.constraints = params.constraints;
- this.within = params.within;
- },
- onFirstMove: function(/* dojo.dnd.Mover */ mover){
- // summary: called during the very first move notification,
- // can be used to initialize coordinates, can be overwritten.
- var c = this.constraintBox = this.constraints.call(this, mover), m = mover.marginBox;
- c.r = c.l + c.w - (this.within ? m.w : 0);
- c.b = c.t + c.h - (this.within ? m.h : 0);
- },
- onMove: function(/* dojo.dnd.Mover */ mover, /* Object */ leftTop){
- // summary: called during every move notification,
- // should actually move the node, can be overwritten.
- var c = this.constraintBox;
- leftTop.l = leftTop.l < c.l ? c.l : c.r < leftTop.l ? c.r : leftTop.l;
- leftTop.t = leftTop.t < c.t ? c.t : c.b < leftTop.t ? c.b : leftTop.t;
- dojo.marginBox(mover.node, leftTop);
- }
-});
-
-dojo.declare("dojo.dnd.move.boxConstrainedMoveable", dojo.dnd.move.constrainedMoveable, {
- // object attributes (for markup)
- box: {},
-
- // markup methods
- markupFactory: function(params, node){
- return new dojo.dnd.move.boxConstrainedMoveable(node, params);
- },
-
- constructor: function(node, params){
- // summary: an object, which makes a node moveable
- // node: Node: a node (or node's id) to be moved
- // params: Object: an optional object with additional parameters;
- // following parameters are recognized:
- // box: Object: a constraint box
- // the rest is passed to the base class
- var box = params && params.box;
- this.constraints = function(){ return box; };
- }
-});
-
-dojo.declare("dojo.dnd.move.parentConstrainedMoveable", dojo.dnd.move.constrainedMoveable, {
- // object attributes (for markup)
- area: "content",
-
- // markup methods
- markupFactory: function(params, node){
- return new dojo.dnd.move.parentConstrainedMoveable(node, params);
- },
-
- constructor: function(node, params){
- // summary: an object, which makes a node moveable
- // node: Node: a node (or node's id) to be moved
- // params: Object: an optional object with additional parameters;
- // following parameters are recognized:
- // area: String: a parent's area to restrict the move,
- // can be "margin", "border", "padding", or "content".
- // the rest is passed to the base class
- var area = params && params.area;
- this.constraints = function(){
- var n = this.node.parentNode,
- s = dojo.getComputedStyle(n),
- mb = dojo._getMarginBox(n, s);
- if(area == "margin"){
- return mb; // Object
- }
- var t = dojo._getMarginExtents(n, s);
- mb.l += t.l, mb.t += t.t, mb.w -= t.w, mb.h -= t.h;
- if(area == "border"){
- return mb; // Object
- }
- t = dojo._getBorderExtents(n, s);
- mb.l += t.l, mb.t += t.t, mb.w -= t.w, mb.h -= t.h;
- if(area == "padding"){
- return mb; // Object
- }
- t = dojo._getPadExtents(n, s);
- mb.l += t.l, mb.t += t.t, mb.w -= t.w, mb.h -= t.h;
- return mb; // Object
- };
- }
-});
-
-// WARNING: below are obsolete objects, instead of custom movers use custom moveables (above)
-
-dojo.dnd.move.constrainedMover = function(fun, within){
- // summary: returns a constrained version of dojo.dnd.Mover
- // description: this function produces n object, which will put a constraint on
- // the margin box of dragged object in absolute coordinates
- // fun: Function: called on drag, and returns a constraint box
- // within: Boolean: if true, constraints the whole dragged object withtin the rectangle,
- // otherwise the constraint is applied to the left-top corner
- var mover = function(node, e, notifier){
- dojo.dnd.Mover.call(this, node, e, notifier);
- };
- dojo.extend(mover, dojo.dnd.Mover.prototype);
- dojo.extend(mover, {
- onMouseMove: function(e){
- // summary: event processor for onmousemove
- // e: Event: mouse event
- dojo.dnd.autoScroll(e);
- var m = this.marginBox, c = this.constraintBox,
- l = m.l + e.pageX, t = m.t + e.pageY;
- l = l < c.l ? c.l : c.r < l ? c.r : l;
- t = t < c.t ? c.t : c.b < t ? c.b : t;
- this.host.onMove(this, {l: l, t: t});
- },
- onFirstMove: function(){
- // summary: called once to initialize things; it is meant to be called only once
- dojo.dnd.Mover.prototype.onFirstMove.call(this);
- var c = this.constraintBox = fun.call(this), m = this.marginBox;
- c.r = c.l + c.w - (within ? m.w : 0);
- c.b = c.t + c.h - (within ? m.h : 0);
- }
- });
- return mover; // Object
+dojo.declare("dojo.dnd.move.constrainedMoveable",dojo.dnd.Moveable,{constraints:function(){
+},within:false,markupFactory:function(_1,_2){
+return new dojo.dnd.move.constrainedMoveable(_2,_1);
+},constructor:function(_3,_4){
+if(!_4){
+_4={};
+}
+this.constraints=_4.constraints;
+this.within=_4.within;
+},onFirstMove:function(_5){
+var c=this.constraintBox=this.constraints.call(this,_5);
+c.r=c.l+c.w;
+c.b=c.t+c.h;
+if(this.within){
+var mb=dojo.marginBox(_5.node);
+c.r-=mb.w;
+c.b-=mb.h;
+}
+},onMove:function(_6,_7){
+var c=this.constraintBox,s=_6.node.style;
+s.left=(_7.l<c.l?c.l:c.r<_7.l?c.r:_7.l)+"px";
+s.top=(_7.t<c.t?c.t:c.b<_7.t?c.b:_7.t)+"px";
+}});
+dojo.declare("dojo.dnd.move.boxConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{box:{},markupFactory:function(_8,_9){
+return new dojo.dnd.move.boxConstrainedMoveable(_9,_8);
+},constructor:function(_a,_b){
+var _c=_b&&_b.box;
+this.constraints=function(){
+return _c;
+};
+}});
+dojo.declare("dojo.dnd.move.parentConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(_d,_e){
+return new dojo.dnd.move.parentConstrainedMoveable(_e,_d);
+},constructor:function(_f,_10){
+var _11=_10&&_10.area;
+this.constraints=function(){
+var n=this.node.parentNode,s=dojo.getComputedStyle(n),mb=dojo._getMarginBox(n,s);
+if(_11=="margin"){
+return mb;
+}
+var t=dojo._getMarginExtents(n,s);
+mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;
+if(_11=="border"){
+return mb;
+}
+t=dojo._getBorderExtents(n,s);
+mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;
+if(_11=="padding"){
+return mb;
+}
+t=dojo._getPadExtents(n,s);
+mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;
+return mb;
};
-
-dojo.dnd.move.boxConstrainedMover = function(box, within){
- // summary: a specialization of dojo.dnd.constrainedMover, which constrains to the specified box
- // box: Object: a constraint box (l, t, w, h)
- // within: Boolean: if true, constraints the whole dragged object withtin the rectangle,
- // otherwise the constraint is applied to the left-top corner
- return dojo.dnd.move.constrainedMover(function(){ return box; }, within); // Object
+}});
+dojo.dnd.move.constrainedMover=function(fun,_12){
+dojo.deprecated("dojo.dnd.move.constrainedMover, use dojo.dnd.move.constrainedMoveable instead");
+var _13=function(_14,e,_15){
+dojo.dnd.Mover.call(this,_14,e,_15);
+};
+dojo.extend(_13,dojo.dnd.Mover.prototype);
+dojo.extend(_13,{onMouseMove:function(e){
+dojo.dnd.autoScroll(e);
+var m=this.marginBox,c=this.constraintBox,l=m.l+e.pageX,t=m.t+e.pageY;
+l=l<c.l?c.l:c.r<l?c.r:l;
+t=t<c.t?c.t:c.b<t?c.b:t;
+this.host.onMove(this,{l:l,t:t});
+},onFirstMove:function(){
+dojo.dnd.Mover.prototype.onFirstMove.call(this);
+var c=this.constraintBox=fun.call(this);
+c.r=c.l+c.w;
+c.b=c.t+c.h;
+if(_12){
+var mb=dojo.marginBox(this.node);
+c.r-=mb.w;
+c.b-=mb.h;
+}
+}});
+return _13;
};
-
-dojo.dnd.move.parentConstrainedMover = function(area, within){
- // summary: a specialization of dojo.dnd.constrainedMover, which constrains to the parent node
- // area: String: "margin" to constrain within the parent's margin box, "border" for the border box,
- // "padding" for the padding box, and "content" for the content box; "content" is the default value.
- // within: Boolean: if true, constraints the whole dragged object withtin the rectangle,
- // otherwise the constraint is applied to the left-top corner
- var fun = function(){
- var n = this.node.parentNode,
- s = dojo.getComputedStyle(n),
- mb = dojo._getMarginBox(n, s);
- if(area == "margin"){
- return mb; // Object
- }
- var t = dojo._getMarginExtents(n, s);
- mb.l += t.l, mb.t += t.t, mb.w -= t.w, mb.h -= t.h;
- if(area == "border"){
- return mb; // Object
- }
- t = dojo._getBorderExtents(n, s);
- mb.l += t.l, mb.t += t.t, mb.w -= t.w, mb.h -= t.h;
- if(area == "padding"){
- return mb; // Object
- }
- t = dojo._getPadExtents(n, s);
- mb.l += t.l, mb.t += t.t, mb.w -= t.w, mb.h -= t.h;
- return mb; // Object
- };
- return dojo.dnd.move.constrainedMover(fun, within); // Object
+dojo.dnd.move.boxConstrainedMover=function(box,_16){
+dojo.deprecated("dojo.dnd.move.boxConstrainedMover, use dojo.dnd.move.boxConstrainedMoveable instead");
+return dojo.dnd.move.constrainedMover(function(){
+return box;
+},_16);
};
-
-// patching functions one level up for compatibility
-
-dojo.dnd.constrainedMover = dojo.dnd.move.constrainedMover;
-dojo.dnd.boxConstrainedMover = dojo.dnd.move.boxConstrainedMover;
-dojo.dnd.parentConstrainedMover = dojo.dnd.move.parentConstrainedMover;
-
+dojo.dnd.move.parentConstrainedMover=function(_17,_18){
+dojo.deprecated("dojo.dnd.move.parentConstrainedMover, use dojo.dnd.move.parentConstrainedMoveable instead");
+var fun=function(){
+var n=this.node.parentNode,s=dojo.getComputedStyle(n),mb=dojo._getMarginBox(n,s);
+if(_17=="margin"){
+return mb;
+}
+var t=dojo._getMarginExtents(n,s);
+mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;
+if(_17=="border"){
+return mb;
}
+t=dojo._getBorderExtents(n,s);
+mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;
+if(_17=="padding"){
+return mb;
+}
+t=dojo._getPadExtents(n,s);
+mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;
+return mb;
+};
+return dojo.dnd.move.constrainedMover(fun,_18);
+};
+dojo.dnd.constrainedMover=dojo.dnd.move.constrainedMover;
+dojo.dnd.boxConstrainedMover=dojo.dnd.move.boxConstrainedMover;
+dojo.dnd.parentConstrainedMover=dojo.dnd.move.parentConstrainedMover;
+}
diff --git a/js/dojo/dojo/dojo.js b/js/dojo/dojo/dojo.js
--- a/js/dojo/dojo/dojo.js
+++ b/js/dojo/dojo/dojo.js
@@ -1,20 +1,16 @@
/*
- Copyright (c) 2004-2007, The Dojo Foundation
- All Rights Reserved.
-
- Licensed under the Academic Free License version 2.1 or above OR the
- modified BSD license. For more information on Dojo licensing, see:
-
- http://dojotoolkit.org/book/dojo-book-0-9/introduction/licensing
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
*/
/*
This is a compiled version of Dojo, built for deployment and not for
development. To get an editable version, please visit:
http://dojotoolkit.org
for documentation and information on getting the source.
*/
-if(typeof dojo=="undefined"){(function(){if(typeof this["djConfig"]=="undefined"){this.djConfig={};}if((!this["console"])||(!console["firebug"])){this.console={};}var cn=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","log","profile","profileEnd","time","timeEnd","trace","warn"];var i=0,tn;while((tn=cn[i++])){if(!console[tn]){console[tn]=function(){};}}if(typeof this["dojo"]=="undefined"){this.dojo={};}var d=dojo;dojo.global=this;var _5={isDebug:false,libraryScriptUri:"",preventBackButtonFix:true,delayMozLoadingFix:false};for(var _6 in _5){if(typeof djConfig[_6]=="undefined"){djConfig[_6]=_5[_6];}}var _7=["Browser","Rhino","Spidermonkey","Mobile"];var t;while(t=_7.shift()){d["is"+t]=false;}dojo.locale=djConfig.locale;dojo.version={major:1,minor:0,patch:2,flag:"",revision:Number("$Rev: 11832 $".match(/[0-9]+/)[0]),toString:function(){with(d.version){return major+"."+minor+"."+patch+flag+" ("+revision+")";}}};if(typeof OpenAjax!="undefined"){OpenAjax.hub.registerLibrary("dojo","http://dojotoolkit.org",d.version.toString());}dojo._mixin=function(_9,_a){var _b={};for(var x in _a){if(_b[x]===undefined||_b[x]!=_a[x]){_9[x]=_a[x];}}if(d["isIE"]&&_a){var p=_a.toString;if(typeof p=="function"&&p!=_9.toString&&p!=_b.toString&&p!="\nfunction toString() {\n [native code]\n}\n"){_9.toString=_a.toString;}}return _9;};dojo.mixin=function(_e,_f){for(var i=1,l=arguments.length;i<l;i++){d._mixin(_e,arguments[i]);}return _e;};dojo._getProp=function(_12,_13,_14){var obj=_14||d.global;for(var i=0,p;obj&&(p=_12[i]);i++){obj=(p in obj?obj[p]:(_13?obj[p]={}:undefined));}return obj;};dojo.setObject=function(_18,_19,_1a){var _1b=_18.split("."),p=_1b.pop(),obj=d._getProp(_1b,true,_1a);return (obj&&p?(obj[p]=_19):undefined);};dojo.getObject=function(_1e,_1f,_20){return d._getProp(_1e.split("."),_1f,_20);};dojo.exists=function(_21,obj){return !!d.getObject(_21,false,obj);};dojo["eval"]=function(_23){return d.global.eval?d.global.eval(_23):eval(_23);};d.deprecated=d.experimental=function(){};})();(function(){var d=dojo;dojo.mixin(dojo,{_loadedModules:{},_inFlightCount:0,_hasResource:{},_modulePrefixes:{dojo:{name:"dojo",value:"."},doh:{name:"doh",value:"../util/doh"},tests:{name:"tests",value:"tests"}},_moduleHasPrefix:function(_25){var mp=this._modulePrefixes;return !!(mp[_25]&&mp[_25].value);},_getModulePrefix:function(_27){var mp=this._modulePrefixes;if(this._moduleHasPrefix(_27)){return mp[_27].value;}return _27;},_loadedUrls:[],_postLoad:false,_loaders:[],_unloaders:[],_loadNotifying:false});dojo._loadPath=function(_29,_2a,cb){var uri=(((_29.charAt(0)=="/"||_29.match(/^\w+:/)))?"":this.baseUrl)+_29;if(djConfig.cacheBust&&d.isBrowser){uri+="?"+String(djConfig.cacheBust).replace(/\W+/g,"");}try{return !_2a?this._loadUri(uri,cb):this._loadUriAndCheck(uri,_2a,cb);}catch(e){console.debug(e);return false;}};dojo._loadUri=function(uri,cb){if(this._loadedUrls[uri]){return true;}var _2f=this._getText(uri,true);if(!_2f){return false;}this._loadedUrls[uri]=true;this._loadedUrls.push(uri);if(cb){_2f="("+_2f+")";}var _30=d["eval"](_2f+"\r\n//@ sourceURL="+uri);if(cb){cb(_30);}return true;};dojo._loadUriAndCheck=function(uri,_32,cb){var ok=false;try{ok=this._loadUri(uri,cb);}catch(e){console.debug("failed loading "+uri+" with error: "+e);}return Boolean(ok&&this._loadedModules[_32]);};dojo.loaded=function(){this._loadNotifying=true;this._postLoad=true;var mll=this._loaders;this._loaders=[];for(var x=0;x<mll.length;x++){mll[x]();}this._loadNotifying=false;if(d._postLoad&&d._inFlightCount==0&&this._loaders.length>0){d._callLoaded();}};dojo.unloaded=function(){var mll=this._unloaders;while(mll.length){(mll.pop())();}};dojo.addOnLoad=function(obj,_39){if(arguments.length==1){d._loaders.push(obj);}else{if(arguments.length>1){d._loaders.push(function(){obj[_39]();});}}if(d._postLoad&&d._inFlightCount==0&&!d._loadNotifying){d._callLoaded();}};dojo.addOnUnload=function(obj,_3b){if(arguments.length==1){d._unloaders.push(obj);}else{if(arguments.length>1){d._unloaders.push(function(){obj[_3b]();});}}};dojo._modulesLoaded=function(){if(d._postLoad){return;}if(d._inFlightCount>0){console.debug("files still in flight!");return;}d._callLoaded();};dojo._callLoaded=function(){if(typeof setTimeout=="object"||(djConfig["useXDomain"]&&d.isOpera)){setTimeout("dojo.loaded();",0);}else{d.loaded();}};dojo._getModuleSymbols=function(_3c){var _3d=_3c.split(".");for(var i=_3d.length;i>0;i--){var _3f=_3d.slice(0,i).join(".");if((i==1)&&!this._moduleHasPrefix(_3f)){_3d[0]="../"+_3d[0];}else{var _40=this._getModulePrefix(_3f);if(_40!=_3f){_3d.splice(0,i,_40);break;}}}return _3d;};dojo._global_omit_module_check=false;dojo._loadModule=dojo.require=function(_41,_42){_42=this._global_omit_module_check||_42;var _43=this._loadedModules[_41];if(_43){return _43;}var _44=this._getModuleSymbols(_41).join("/")+".js";var _45=(!_42)?_41:null;var ok=this._loadPath(_44,_45);if((!ok)&&(!_42)){throw new Error("Could not load '"+_41+"'; last tried '"+_44+"'");}if((!_42)&&(!this["_isXDomain"])){_43=this._loadedModules[_41];if(!_43){throw new Error("symbol '"+_41+"' is not defined after loading '"+_44+"'");}}return _43;};dojo.provide=function(_47){_47=_47+"";return (d._loadedModules[_47]=d.getObject(_47,true));};dojo.platformRequire=function(_48){var _49=_48["common"]||[];var _4a=_49.concat(_48[d._name]||_48["default"]||[]);for(var x=0;x<_4a.length;x++){var _4c=_4a[x];if(_4c.constructor==Array){d._loadModule.apply(d,_4c);}else{d._loadModule(_4c);}}};dojo.requireIf=function(_4d,_4e){if(_4d===true){var _4f=[];for(var i=1;i<arguments.length;i++){_4f.push(arguments[i]);}d.require.apply(d,_4f);}};dojo.requireAfterIf=d.requireIf;dojo.registerModulePath=function(_51,_52){d._modulePrefixes[_51]={name:_51,value:_52};};dojo.requireLocalization=function(_53,_54,_55,_56){d.require("dojo.i18n");d.i18n._requireLocalization.apply(d.hostenv,arguments);};var ore=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$");var ire=new RegExp("^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$");dojo._Url=function(){var n=null;var _a=arguments;var uri=_a[0];for(var i=1;i<_a.length;i++){if(!_a[i]){continue;}var _5d=new d._Url(_a[i]+"");var _5e=new d._Url(uri+"");if((_5d.path=="")&&(!_5d.scheme)&&(!_5d.authority)&&(!_5d.query)){if(_5d.fragment!=n){_5e.fragment=_5d.fragment;}_5d=_5e;}else{if(!_5d.scheme){_5d.scheme=_5e.scheme;if(!_5d.authority){_5d.authority=_5e.authority;if(_5d.path.charAt(0)!="/"){var _5f=_5e.path.substring(0,_5e.path.lastIndexOf("/")+1)+_5d.path;var _60=_5f.split("/");for(var j=0;j<_60.length;j++){if(_60[j]=="."){if(j==_60.length-1){_60[j]="";}else{_60.splice(j,1);j--;}}else{if(j>0&&!(j==1&&_60[0]=="")&&_60[j]==".."&&_60[j-1]!=".."){if(j==(_60.length-1)){_60.splice(j,1);_60[j-1]="";}else{_60.splice(j-1,2);j-=2;}}}}_5d.path=_60.join("/");}}}}uri="";if(_5d.scheme){uri+=_5d.scheme+":";}if(_5d.authority){uri+="//"+_5d.authority;}uri+=_5d.path;if(_5d.query){uri+="?"+_5d.query;}if(_5d.fragment){uri+="#"+_5d.fragment;}}this.uri=uri.toString();var r=this.uri.match(ore);this.scheme=r[2]||(r[1]?"":n);this.authority=r[4]||(r[3]?"":n);this.path=r[5];this.query=r[7]||(r[6]?"":n);this.fragment=r[9]||(r[8]?"":n);if(this.authority!=n){r=this.authority.match(ire);this.user=r[3]||n;this.password=r[4]||n;this.host=r[5];this.port=r[7]||n;}};dojo._Url.prototype.toString=function(){return this.uri;};dojo.moduleUrl=function(_63,url){var loc=dojo._getModuleSymbols(_63).join("/");if(!loc){return null;}if(loc.lastIndexOf("/")!=loc.length-1){loc+="/";}var _66=loc.indexOf(":");if(loc.charAt(0)!="/"&&(_66==-1||_66>loc.indexOf("/"))){loc=d.baseUrl+loc;}return new d._Url(loc,url);};})();if(typeof window!="undefined"){dojo.isBrowser=true;dojo._name="browser";(function(){var d=dojo;if(document&&document.getElementsByTagName){var _68=document.getElementsByTagName("script");var _69=/dojo(\.xd)?\.js([\?\.]|$)/i;for(var i=0;i<_68.length;i++){var src=_68[i].getAttribute("src");if(!src){continue;}var m=src.match(_69);if(m){if(!djConfig["baseUrl"]){djConfig["baseUrl"]=src.substring(0,m.index);}var cfg=_68[i].getAttribute("djConfig");if(cfg){var _6e=eval("({ "+cfg+" })");for(var x in _6e){djConfig[x]=_6e[x];}}break;}}}d.baseUrl=djConfig["baseUrl"];var n=navigator;var dua=n.userAgent;var dav=n.appVersion;var tv=parseFloat(dav);d.isOpera=(dua.indexOf("Opera")>=0)?tv:0;d.isKhtml=(dav.indexOf("Konqueror")>=0)||(dav.indexOf("Safari")>=0)?tv:0;if(dav.indexOf("Safari")>=0){d.isSafari=parseFloat(dav.split("Version/")[1])||2;}var _74=dua.indexOf("Gecko");d.isMozilla=d.isMoz=((_74>=0)&&(!d.isKhtml))?tv:0;d.isFF=0;d.isIE=0;try{if(d.isMoz){d.isFF=parseFloat(dua.split("Firefox/")[1].split(" ")[0]);}if((document.all)&&(!d.isOpera)){d.isIE=parseFloat(dav.split("MSIE ")[1].split(";")[0]);}}catch(e){}if(dojo.isIE&&(window.location.protocol==="file:")){djConfig.ieForceActiveXXhr=true;}var cm=document["compatMode"];d.isQuirks=(cm=="BackCompat")||(cm=="QuirksMode")||(d.isIE<6);d.locale=djConfig.locale||(d.isIE?n.userLanguage:n.language).toLowerCase();d._println=console.debug;d._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];d._xhrObj=function(){var _76=null;var _77=null;if(!dojo.isIE||!djConfig.ieForceActiveXXhr){try{_76=new XMLHttpRequest();}catch(e){}}if(!_76){for(var i=0;i<3;++i){var _79=dojo._XMLHTTP_PROGIDS[i];try{_76=new ActiveXObject(_79);}catch(e){_77=e;}if(_76){dojo._XMLHTTP_PROGIDS=[_79];break;}}}if(!_76){throw new Error("XMLHTTP not available: "+_77);}return _76;};d._isDocumentOk=function(_7a){var _7b=_7a.status||0;return ((_7b>=200)&&(_7b<300))||(_7b==304)||(_7b==1223)||(!_7b&&(location.protocol=="file:"||location.protocol=="chrome:"));};var _7c=window.location+"";var _7d=document.getElementsByTagName("base");var _7e=(_7d&&_7d.length>0);d._getText=function(uri,_80){var _81=this._xhrObj();if(!_7e&&dojo._Url){uri=(new dojo._Url(_7c,uri)).toString();}_81.open("GET",uri,false);try{_81.send(null);if(!d._isDocumentOk(_81)){var err=Error("Unable to load "+uri+" status:"+_81.status);err.status=_81.status;err.responseText=_81.responseText;throw err;}}catch(e){if(_80){return null;}throw e;}return _81.responseText;};})();dojo._initFired=false;dojo._loadInit=function(e){dojo._initFired=true;var _84=(e&&e.type)?e.type.toLowerCase():"load";if(arguments.callee.initialized||(_84!="domcontentloaded"&&_84!="load")){return;}arguments.callee.initialized=true;if(typeof dojo["_khtmlTimer"]!="undefined"){clearInterval(dojo._khtmlTimer);delete dojo._khtmlTimer;}if(dojo._inFlightCount==0){dojo._modulesLoaded();}};if(document.addEventListener){if(dojo.isOpera||(dojo.isMoz&&(djConfig["enableMozDomContentLoaded"]===true))){document.addEventListener("DOMContentLoaded",dojo._loadInit,null);}window.addEventListener("load",dojo._loadInit,null);}if(/(WebKit|khtml)/i.test(navigator.userAgent)){dojo._khtmlTimer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){dojo._loadInit();}},10);}(function(){var _w=window;var _86=function(_87,fp){var _89=_w[_87]||function(){};_w[_87]=function(){fp.apply(_w,arguments);_89.apply(_w,arguments);};};if(dojo.isIE){document.write("<scr"+"ipt defer src=\"//:\" "+"onreadystatechange=\"if(this.readyState=='complete'){dojo._loadInit();}\">"+"</scr"+"ipt>");var _8a=true;_86("onbeforeunload",function(){_w.setTimeout(function(){_8a=false;},0);});_86("onunload",function(){if(_8a){dojo.unloaded();}});try{document.namespaces.add("v","urn:schemas-microsoft-com:vml");document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML)");}catch(e){}}else{_86("onbeforeunload",function(){dojo.unloaded();});}})();}if(djConfig.isDebug){dojo.require("dojo._firebug.firebug");}if(djConfig.debugAtAllCosts){djConfig.useXDomain=true;dojo.require("dojo._base._loader.loader_xd");dojo.require("dojo._base._loader.loader_debug");dojo.require("dojo.i18n");}}if(!dojo._hasResource["dojo._base.lang"]){dojo._hasResource["dojo._base.lang"]=true;dojo.provide("dojo._base.lang");dojo.isString=function(it){return typeof it=="string"||it instanceof String;};dojo.isArray=function(it){return it&&it instanceof Array||typeof it=="array";};dojo.isFunction=(function(){var _8d=function(it){return typeof it=="function"||it instanceof Function;};return dojo.isSafari?function(it){if(typeof it=="function"&&it=="[object NodeList]"){return false;}return _8d(it);}:_8d;})();dojo.isObject=function(it){return it!==undefined&&(it===null||typeof it=="object"||dojo.isArray(it)||dojo.isFunction(it));};dojo.isArrayLike=function(it){var d=dojo;return it&&it!==undefined&&!d.isString(it)&&!d.isFunction(it)&&!(it.tagName&&it.tagName.toLowerCase()=="form")&&(d.isArray(it)||isFinite(it.length));};dojo.isAlien=function(it){return it&&!dojo.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));};dojo.extend=function(_94,_95){for(var i=1,l=arguments.length;i<l;i++){dojo._mixin(_94.prototype,arguments[i]);}return _94;};dojo._hitchArgs=function(_98,_99){var pre=dojo._toArray(arguments,2);var _9b=dojo.isString(_99);return function(){var _9c=dojo._toArray(arguments);var f=_9b?(_98||dojo.global)[_99]:_99;return f&&f.apply(_98||this,pre.concat(_9c));};};dojo.hitch=function(_9e,_9f){if(arguments.length>2){return dojo._hitchArgs.apply(dojo,arguments);}if(!_9f){_9f=_9e;_9e=null;}if(dojo.isString(_9f)){_9e=_9e||dojo.global;if(!_9e[_9f]){throw (["dojo.hitch: scope[\"",_9f,"\"] is null (scope=\"",_9e,"\")"].join(""));}return function(){return _9e[_9f].apply(_9e,arguments||[]);};}return !_9e?_9f:function(){return _9f.apply(_9e,arguments||[]);};};dojo.delegate=dojo._delegate=function(obj,_a1){function TMP(){};TMP.prototype=obj;var tmp=new TMP();if(_a1){dojo.mixin(tmp,_a1);}return tmp;};dojo.partial=function(_a3){var arr=[null];return dojo.hitch.apply(dojo,arr.concat(dojo._toArray(arguments)));};dojo._toArray=function(obj,_a6,_a7){var arr=_a7||[];for(var x=_a6||0;x<obj.length;x++){arr.push(obj[x]);}return arr;};dojo.clone=function(o){if(!o){return o;}if(dojo.isArray(o)){var r=[];for(var i=0;i<o.length;++i){r.push(dojo.clone(o[i]));}return r;}if(!dojo.isObject(o)){return o;}if(o.nodeType&&o.cloneNode){return o.cloneNode(true);}if(o instanceof Date){return new Date(o.getTime());}var r=new o.constructor();for(var i in o){if(!(i in r)||r[i]!=o[i]){r[i]=dojo.clone(o[i]);}}return r;};dojo.trim=function(str){return str.replace(/^\s\s*/,"").replace(/\s\s*$/,"");};}if(!dojo._hasResource["dojo._base.declare"]){dojo._hasResource["dojo._base.declare"]=true;dojo.provide("dojo._base.declare");dojo.declare=function(_ae,_af,_b0){if(dojo.isFunction(_b0)||(arguments.length>3)){dojo.deprecated("dojo.declare: for class '"+_ae+"' pass initializer function as 'constructor' property instead of as a separate argument.","","1.0");var c=_b0;_b0=arguments[3]||{};_b0.constructor=c;}var dd=arguments.callee,_b3=null;if(dojo.isArray(_af)){_b3=_af;_af=_b3.shift();}if(_b3){for(var i=0,m;i<_b3.length;i++){m=_b3[i];if(!m){throw ("Mixin #"+i+" to declaration of "+_ae+" is null. It's likely a required module is not loaded.");}_af=dd._delegate(_af,m);}}var _b6=(_b0||0).constructor,_b7=dd._delegate(_af),fn;for(var i in _b0){if(dojo.isFunction(fn=_b0[i])&&(!0[i])){fn.nom=i;}}dojo.extend(_b7,{declaredClass:_ae,_constructor:_b6,preamble:null},_b0||0);_b7.prototype.constructor=_b7;return dojo.setObject(_ae,_b7);};dojo.mixin(dojo.declare,{_delegate:function(_b9,_ba){var bp=(_b9||0).prototype,mp=(_ba||0).prototype;var _bd=dojo.declare._makeCtor();dojo.mixin(_bd,{superclass:bp,mixin:mp,extend:dojo.declare._extend});if(_b9){_bd.prototype=dojo._delegate(bp);}dojo.extend(_bd,dojo.declare._core,mp||0,{_constructor:null,preamble:null});_bd.prototype.constructor=_bd;_bd.prototype.declaredClass=(bp||0).declaredClass+"_"+(mp||0).declaredClass;return _bd;},_extend:function(_be){for(var i in _be){if(dojo.isFunction(fn=_be[i])&&(!0[i])){fn.nom=i;}}dojo.extend(this,_be);},_makeCtor:function(){return function(){this._construct(arguments);};},_core:{_construct:function(_c0){var c=_c0.callee,s=c.superclass,ct=s&&s.constructor,m=c.mixin,mct=m&&m.constructor,a=_c0,ii,fn;if(a[0]){if((fn=a[0]["preamble"])){a=fn.apply(this,a)||a;}}if(fn=c.prototype.preamble){a=fn.apply(this,a)||a;}if(ct&&ct.apply){ct.apply(this,a);}if(mct&&mct.apply){mct.apply(this,a);}if(ii=c.prototype._constructor){ii.apply(this,_c0);}if(this.constructor.prototype==c.prototype&&(ct=this.postscript)){ct.apply(this,_c0);}},_findMixin:function(_c9){var c=this.constructor,p,m;while(c){p=c.superclass;m=c.mixin;if(m==_c9||(m instanceof _c9.constructor)){return p;}if(m&&(m=m._findMixin(_c9))){return m;}c=p&&p.constructor;}},_findMethod:function(_cd,_ce,_cf,has){var p=_cf,c,m,f;do{c=p.constructor;m=c.mixin;if(m&&(m=this._findMethod(_cd,_ce,m,has))){return m;}if((f=p[_cd])&&(has==(f==_ce))){return p;}p=c.superclass;}while(p);return !has&&(p=this._findMixin(_cf))&&this._findMethod(_cd,_ce,p,has);},inherited:function(_d5,_d6,_d7){var a=arguments;if(!dojo.isString(a[0])){_d7=_d6;_d6=_d5;_d5=_d6.callee.nom;}var c=_d6.callee,p=this.constructor.prototype,a=_d7||_d6,fn,mp;if(this[_d5]!=c||p[_d5]==c){mp=this._findMethod(_d5,c,p,true);if(!mp){throw (this.declaredClass+": name argument (\""+_d5+"\") to inherited must match callee (declare.js)");}p=this._findMethod(_d5,c,mp,false);}fn=p&&p[_d5];if(!fn){console.debug(mp.declaredClass+": no inherited \""+_d5+"\" was found (declare.js)");return;}return fn.apply(this,a);}}});}if(!dojo._hasResource["dojo._base.connect"]){dojo._hasResource["dojo._base.connect"]=true;dojo.provide("dojo._base.connect");dojo._listener={getDispatcher:function(){return function(){var ap=Array.prototype,c=arguments.callee,ls=c._listeners,t=c.target;var r=t&&t.apply(this,arguments);for(var i in ls){if(!(i in ap)){ls[i].apply(this,arguments);}}return r;};},add:function(_e3,_e4,_e5){_e3=_e3||dojo.global;var f=_e3[_e4];if(!f||!f._listeners){var d=dojo._listener.getDispatcher();d.target=f;d._listeners=[];f=_e3[_e4]=d;}return f._listeners.push(_e5);},remove:function(_e8,_e9,_ea){var f=(_e8||dojo.global)[_e9];if(f&&f._listeners&&_ea--){delete f._listeners[_ea];}}};dojo.connect=function(obj,_ed,_ee,_ef,_f0){var a=arguments,_f2=[],i=0;_f2.push(dojo.isString(a[0])?null:a[i++],a[i++]);var a1=a[i+1];_f2.push(dojo.isString(a1)||dojo.isFunction(a1)?a[i++]:null,a[i++]);for(var l=a.length;i<l;i++){_f2.push(a[i]);}return dojo._connect.apply(this,_f2);};dojo._connect=function(obj,_f7,_f8,_f9){var l=dojo._listener,h=l.add(obj,_f7,dojo.hitch(_f8,_f9));return [obj,_f7,h,l];};dojo.disconnect=function(_fc){if(_fc&&_fc[0]!==undefined){dojo._disconnect.apply(this,_fc);delete _fc[0];}};dojo._disconnect=function(obj,_fe,_ff,_100){_100.remove(obj,_fe,_ff);};dojo._topics={};dojo.subscribe=function(_101,_102,_103){return [_101,dojo._listener.add(dojo._topics,_101,dojo.hitch(_102,_103))];};dojo.unsubscribe=function(_104){if(_104){dojo._listener.remove(dojo._topics,_104[0],_104[1]);}};dojo.publish=function(_105,args){var f=dojo._topics[_105];if(f){f.apply(this,args||[]);}};dojo.connectPublisher=function(_108,obj,_10a){var pf=function(){dojo.publish(_108,arguments);};return (_10a)?dojo.connect(obj,_10a,pf):dojo.connect(obj,pf);};}if(!dojo._hasResource["dojo._base.Deferred"]){dojo._hasResource["dojo._base.Deferred"]=true;dojo.provide("dojo._base.Deferred");dojo.Deferred=function(_10c){this.chain=[];this.id=this._nextId();this.fired=-1;this.paused=0;this.results=[null,null];this.canceller=_10c;this.silentlyCancelled=false;};dojo.extend(dojo.Deferred,{_nextId:(function(){var n=1;return function(){return n++;};})(),cancel:function(){var err;if(this.fired==-1){if(this.canceller){err=this.canceller(this);}else{this.silentlyCancelled=true;}if(this.fired==-1){if(!(err instanceof Error)){var res=err;err=new Error("Deferred Cancelled");err.dojoType="cancel";err.cancelResult=res;}this.errback(err);}}else{if((this.fired==0)&&(this.results[0] instanceof dojo.Deferred)){this.results[0].cancel();}}},_resback:function(res){this.fired=((res instanceof Error)?1:0);this.results[this.fired]=res;this._fire();},_check:function(){if(this.fired!=-1){if(!this.silentlyCancelled){throw new Error("already called!");}this.silentlyCancelled=false;return;}},callback:function(res){this._check();this._resback(res);},errback:function(res){this._check();if(!(res instanceof Error)){res=new Error(res);}this._resback(res);},addBoth:function(cb,cbfn){var _115=dojo.hitch(cb,cbfn);if(arguments.length>2){_115=dojo.partial(_115,arguments,2);}return this.addCallbacks(_115,_115);},addCallback:function(cb,cbfn){var _118=dojo.hitch(cb,cbfn);if(arguments.length>2){_118=dojo.partial(_118,arguments,2);}return this.addCallbacks(_118,null);},addErrback:function(cb,cbfn){var _11b=dojo.hitch(cb,cbfn);if(arguments.length>2){_11b=dojo.partial(_11b,arguments,2);}return this.addCallbacks(null,_11b);},addCallbacks:function(cb,eb){this.chain.push([cb,eb]);if(this.fired>=0){this._fire();}return this;},_fire:function(){var _11e=this.chain;var _11f=this.fired;var res=this.results[_11f];var self=this;var cb=null;while((_11e.length>0)&&(this.paused==0)){var f=_11e.shift()[_11f];if(!f){continue;}try{res=f(res);_11f=((res instanceof Error)?1:0);if(res instanceof dojo.Deferred){cb=function(res){self._resback(res);self.paused--;if((self.paused==0)&&(self.fired>=0)){self._fire();}};this.paused++;}}catch(err){console.debug(err);_11f=1;res=err;}}this.fired=_11f;this.results[_11f]=res;if((cb)&&(this.paused)){res.addBoth(cb);}}});}if(!dojo._hasResource["dojo._base.json"]){dojo._hasResource["dojo._base.json"]=true;dojo.provide("dojo._base.json");dojo.fromJson=function(json){try{return eval("("+json+")");}catch(e){console.debug(e);return json;}};dojo._escapeString=function(str){return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");};dojo.toJsonIndentStr="\t";dojo.toJson=function(it,_128,_129){_129=_129||"";var _12a=(_128?_129+dojo.toJsonIndentStr:"");var _12b=(_128?"\n":"");var _12c=typeof (it);if(_12c=="undefined"){return "undefined";}else{if((_12c=="number")||(_12c=="boolean")){return it+"";}else{if(it===null){return "null";}}}if(dojo.isString(it)){return dojo._escapeString(it);}if(it.nodeType&&it.cloneNode){return "";}var _12d=arguments.callee;var _12e;if(typeof it.__json__=="function"){_12e=it.__json__();if(it!==_12e){return _12d(_12e,_128,_12a);}}if(typeof it.json=="function"){_12e=it.json();if(it!==_12e){return _12d(_12e,_128,_12a);}}if(dojo.isArray(it)){var res=[];for(var i=0;i<it.length;i++){var val=_12d(it[i],_128,_12a);if(typeof (val)!="string"){val="undefined";}res.push(_12b+_12a+val);}return "["+res.join(", ")+_12b+_129+"]";}if(_12c=="function"){return null;}var _132=[];for(var key in it){var _134;if(typeof (key)=="number"){_134="\""+key+"\"";}else{if(typeof (key)=="string"){_134=dojo._escapeString(key);}else{continue;}}val=_12d(it[key],_128,_12a);if(typeof (val)!="string"){continue;}_132.push(_12b+_12a+_134+": "+val);}return "{"+_132.join(", ")+_12b+_129+"}";};}if(!dojo._hasResource["dojo._base.array"]){dojo._hasResource["dojo._base.array"]=true;dojo.provide("dojo._base.array");(function(){var _135=function(arr,obj,cb){return [(dojo.isString(arr)?arr.split(""):arr),(obj||dojo.global),(dojo.isString(cb)?(new Function("item","index","array",cb)):cb)];};dojo.mixin(dojo,{indexOf:function(_139,_13a,_13b,_13c){var i=0,step=1,end=_139.length;if(_13c){i=end-1;step=end=-1;}for(i=_13b||i;i!=end;i+=step){if(_139[i]==_13a){return i;}}return -1;},lastIndexOf:function(_140,_141,_142){return dojo.indexOf(_140,_141,_142,true);},forEach:function(arr,_144,obj){if(!arr||!arr.length){return;}var _p=_135(arr,obj,_144);arr=_p[0];for(var i=0,l=_p[0].length;i<l;i++){_p[2].call(_p[1],arr[i],i,arr);}},_everyOrSome:function(_149,arr,_14b,obj){var _p=_135(arr,obj,_14b);arr=_p[0];for(var i=0,l=arr.length;i<l;i++){var _150=!!_p[2].call(_p[1],arr[i],i,arr);if(_149^_150){return _150;}}return _149;},every:function(arr,_152,_153){return this._everyOrSome(true,arr,_152,_153);},some:function(arr,_155,_156){return this._everyOrSome(false,arr,_155,_156);},map:function(arr,func,obj){var _p=_135(arr,obj,func);arr=_p[0];var _15b=((arguments[3])?(new arguments[3]()):[]);for(var i=0;i<arr.length;++i){_15b.push(_p[2].call(_p[1],arr[i],i,arr));}return _15b;},filter:function(arr,_15e,obj){var _p=_135(arr,obj,_15e);arr=_p[0];var _161=[];for(var i=0;i<arr.length;i++){if(_p[2].call(_p[1],arr[i],i,arr)){_161.push(arr[i]);}}return _161;}});})();}if(!dojo._hasResource["dojo._base.Color"]){dojo._hasResource["dojo._base.Color"]=true;dojo.provide("dojo._base.Color");dojo.Color=function(_163){if(_163){this.setColor(_163);}};dojo.Color.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255]};dojo.extend(dojo.Color,{r:255,g:255,b:255,a:1,_set:function(r,g,b,a){var t=this;t.r=r;t.g=g;t.b=b;t.a=a;},setColor:function(_169){var d=dojo;if(d.isString(_169)){d.colorFromString(_169,this);}else{if(d.isArray(_169)){d.colorFromArray(_169,this);}else{this._set(_169.r,_169.g,_169.b,_169.a);if(!(_169 instanceof d.Color)){this.sanitize();}}}return this;},sanitize:function(){return this;},toRgb:function(){var t=this;return [t.r,t.g,t.b];},toRgba:function(){var t=this;return [t.r,t.g,t.b,t.a];},toHex:function(){var arr=dojo.map(["r","g","b"],function(x){var s=this[x].toString(16);return s.length<2?"0"+s:s;},this);return "#"+arr.join("");},toCss:function(_170){var t=this,rgb=t.r+", "+t.g+", "+t.b;return (_170?"rgba("+rgb+", "+t.a:"rgb("+rgb)+")";},toString:function(){return this.toCss(true);}});dojo.blendColors=function(_173,end,_175,obj){var d=dojo,t=obj||new dojo.Color();d.forEach(["r","g","b","a"],function(x){t[x]=_173[x]+(end[x]-_173[x])*_175;if(x!="a"){t[x]=Math.round(t[x]);}});return t.sanitize();};dojo.colorFromRgb=function(_17a,obj){var m=_17a.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return m&&dojo.colorFromArray(m[1].split(/\s*,\s*/),obj);};dojo.colorFromHex=function(_17d,obj){var d=dojo,t=obj||new d.Color(),bits=(_17d.length==4)?4:8,mask=(1<<bits)-1;_17d=Number("0x"+_17d.substr(1));if(isNaN(_17d)){return null;}d.forEach(["b","g","r"],function(x){var c=_17d&mask;_17d>>=bits;t[x]=bits==4?17*c:c;});t.a=1;return t;};dojo.colorFromArray=function(a,obj){var t=obj||new dojo.Color();t._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3]));if(isNaN(t.a)){t.a=1;}return t.sanitize();};dojo.colorFromString=function(str,obj){var a=dojo.Color.named[str];return a&&dojo.colorFromArray(a,obj)||dojo.colorFromRgb(str,obj)||dojo.colorFromHex(str,obj);};}if(!dojo._hasResource["dojo._base"]){dojo._hasResource["dojo._base"]=true;dojo.provide("dojo._base");(function(){if(djConfig.require){for(var x=0;x<djConfig.require.length;x++){dojo["require"](djConfig.require[x]);}}})();}if(!dojo._hasResource["dojo._base.window"]){dojo._hasResource["dojo._base.window"]=true;dojo.provide("dojo._base.window");dojo._gearsObject=function(){var _18c;var _18d;var _18e=dojo.getObject("google.gears");if(_18e){return _18e;}if(typeof GearsFactory!="undefined"){_18c=new GearsFactory();}else{if(dojo.isIE){try{_18c=new ActiveXObject("Gears.Factory");}catch(e){}}else{if(navigator.mimeTypes["application/x-googlegears"]){_18c=document.createElement("object");_18c.setAttribute("type","application/x-googlegears");_18c.setAttribute("width",0);_18c.setAttribute("height",0);_18c.style.display="none";document.documentElement.appendChild(_18c);}}}if(!_18c){return null;}dojo.setObject("google.gears.factory",_18c);return dojo.getObject("google.gears");};dojo.isGears=(!!dojo._gearsObject())||0;dojo.doc=window["document"]||null;dojo.body=function(){return dojo.doc.body||dojo.doc.getElementsByTagName("body")[0];};dojo.setContext=function(_18f,_190){dojo.global=_18f;dojo.doc=_190;};dojo._fireCallback=function(_191,_192,_193){if(_192&&dojo.isString(_191)){_191=_192[_191];}return (_192?_191.apply(_192,_193||[]):_191());};dojo.withGlobal=function(_194,_195,_196,_197){var rval;var _199=dojo.global;var _19a=dojo.doc;try{dojo.setContext(_194,_194.document);rval=dojo._fireCallback(_195,_196,_197);}finally{dojo.setContext(_199,_19a);}return rval;};dojo.withDoc=function(_19b,_19c,_19d,_19e){var rval;var _1a0=dojo.doc;try{dojo.doc=_19b;rval=dojo._fireCallback(_19c,_19d,_19e);}finally{dojo.doc=_1a0;}return rval;};(function(){var mp=djConfig["modulePaths"];if(mp){for(var _1a2 in mp){dojo.registerModulePath(_1a2,mp[_1a2]);}}})();}if(!dojo._hasResource["dojo._base.event"]){dojo._hasResource["dojo._base.event"]=true;dojo.provide("dojo._base.event");(function(){var del=dojo._event_listener={add:function(node,name,fp){if(!node){return;}name=del._normalizeEventName(name);fp=del._fixCallback(name,fp);var _1a7=name;if((!dojo.isIE)&&((name=="mouseenter")||(name=="mouseleave"))){var _1a7=name;var ofp=fp;name=(name=="mouseenter")?"mouseover":"mouseout";fp=function(e){var id=dojo.isDescendant(e.relatedTarget,node);if(id==false){return ofp.call(this,e);}};}node.addEventListener(name,fp,false);return fp;},remove:function(node,_1ac,_1ad){(node)&&(node.removeEventListener(del._normalizeEventName(_1ac),_1ad,false));},_normalizeEventName:function(name){return (name.slice(0,2)=="on"?name.slice(2):name);},_fixCallback:function(name,fp){return (name!="keypress"?fp:function(e){return fp.call(this,del._fixEvent(e,this));});},_fixEvent:function(evt,_1b3){switch(evt.type){case "keypress":del._setKeyChar(evt);break;}return evt;},_setKeyChar:function(evt){evt.keyChar=(evt.charCode?String.fromCharCode(evt.charCode):"");}};dojo.fixEvent=function(evt,_1b6){return del._fixEvent(evt,_1b6);};dojo.stopEvent=function(evt){evt.preventDefault();evt.stopPropagation();};var _1b8=dojo._listener;dojo._connect=function(obj,_1ba,_1bb,_1bc,_1bd){var _1be=obj&&(obj.nodeType||obj.attachEvent||obj.addEventListener);var lid=!_1be?0:(!_1bd?1:2),l=[dojo._listener,del,_1b8][lid];var h=l.add(obj,_1ba,dojo.hitch(_1bb,_1bc));return [obj,_1ba,h,lid];};dojo._disconnect=function(obj,_1c3,_1c4,_1c5){([dojo._listener,del,_1b8][_1c5]).remove(obj,_1c3,_1c4);};dojo.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145};if(dojo.isIE){var _1c6=function(e,code){try{return (e.keyCode=code);}catch(e){return 0;}};var iel=dojo._listener;if(!djConfig._allow_leaks){_1b8=iel=dojo._ie_listener={handlers:[],add:function(_1ca,_1cb,_1cc){_1ca=_1ca||dojo.global;var f=_1ca[_1cb];if(!f||!f._listeners){var d=dojo._getIeDispatcher();d.target=f&&(ieh.push(f)-1);d._listeners=[];f=_1ca[_1cb]=d;}return f._listeners.push(ieh.push(_1cc)-1);},remove:function(_1d0,_1d1,_1d2){var f=(_1d0||dojo.global)[_1d1],l=f&&f._listeners;if(f&&l&&_1d2--){delete ieh[l[_1d2]];delete l[_1d2];}}};var ieh=iel.handlers;}dojo.mixin(del,{add:function(node,_1d6,fp){if(!node){return;}_1d6=del._normalizeEventName(_1d6);if(_1d6=="onkeypress"){var kd=node.onkeydown;if(!kd||!kd._listeners||!kd._stealthKeydown){del.add(node,"onkeydown",del._stealthKeyDown);node.onkeydown._stealthKeydown=true;}}return iel.add(node,_1d6,del._fixCallback(fp));},remove:function(node,_1da,_1db){iel.remove(node,del._normalizeEventName(_1da),_1db);},_normalizeEventName:function(_1dc){return (_1dc.slice(0,2)!="on"?"on"+_1dc:_1dc);},_nop:function(){},_fixEvent:function(evt,_1de){if(!evt){var w=(_1de)&&((_1de.ownerDocument||_1de.document||_1de).parentWindow)||window;evt=w.event;}if(!evt){return (evt);}evt.target=evt.srcElement;evt.currentTarget=(_1de||evt.srcElement);evt.layerX=evt.offsetX;evt.layerY=evt.offsetY;var se=evt.srcElement,doc=(se&&se.ownerDocument)||document;var _1e2=((dojo.isIE<6)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;var _1e3=dojo._getIeDocumentElementOffset();evt.pageX=evt.clientX+dojo._fixIeBiDiScrollLeft(_1e2.scrollLeft||0)-_1e3.x;evt.pageY=evt.clientY+(_1e2.scrollTop||0)-_1e3.y;if(evt.type=="mouseover"){evt.relatedTarget=evt.fromElement;}if(evt.type=="mouseout"){evt.relatedTarget=evt.toElement;}evt.stopPropagation=del._stopPropagation;evt.preventDefault=del._preventDefault;return del._fixKeys(evt);},_fixKeys:function(evt){switch(evt.type){case "keypress":var c=("charCode" in evt?evt.charCode:evt.keyCode);if(c==10){c=0;evt.keyCode=13;}else{if(c==13||c==27){c=0;}else{if(c==3){c=99;}}}evt.charCode=c;del._setKeyChar(evt);break;}return evt;},_punctMap:{106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39},_stealthKeyDown:function(evt){var kp=evt.currentTarget.onkeypress;if(!kp||!kp._listeners){return;}var k=evt.keyCode;var _1e9=(k!=13)&&(k!=32)&&(k!=27)&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(_1e9||evt.ctrlKey){var c=(_1e9?0:k);if(evt.ctrlKey){if(k==3||k==13){return;}else{if(c>95&&c<106){c-=48;}else{if((!evt.shiftKey)&&(c>=65&&c<=90)){c+=32;}else{c=del._punctMap[c]||c;}}}}var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});kp.call(evt.currentTarget,faux);evt.cancelBubble=faux.cancelBubble;evt.returnValue=faux.returnValue;_1c6(evt,faux.keyCode);}},_stopPropagation:function(){this.cancelBubble=true;},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;if(this.ctrlKey){_1c6(this,0);}this.returnValue=false;}});dojo.stopEvent=function(evt){evt=evt||window.event;del._stopPropagation.call(evt);del._preventDefault.call(evt);};}del._synthesizeEvent=function(evt,_1ee){var faux=dojo.mixin({},evt,_1ee);del._setKeyChar(faux);faux.preventDefault=function(){evt.preventDefault();};faux.stopPropagation=function(){evt.stopPropagation();};return faux;};if(dojo.isOpera){dojo.mixin(del,{_fixEvent:function(evt,_1f1){switch(evt.type){case "keypress":var c=evt.which;if(c==3){c=99;}c=((c<41)&&(!evt.shiftKey)?0:c);if((evt.ctrlKey)&&(!evt.shiftKey)&&(c>=65)&&(c<=90)){c+=32;}return del._synthesizeEvent(evt,{charCode:c});}return evt;}});}if(dojo.isSafari){dojo.mixin(del,{_fixEvent:function(evt,_1f4){switch(evt.type){case "keypress":var c=evt.charCode,s=evt.shiftKey,k=evt.keyCode;k=k||_1f8[evt.keyIdentifier]||0;if(evt.keyIdentifier=="Enter"){c=0;}else{if((evt.ctrlKey)&&(c>0)&&(c<27)){c+=96;}else{if(c==dojo.keys.SHIFT_TAB){c=dojo.keys.TAB;s=true;}else{c=(c>=32&&c<63232?c:0);}}}return del._synthesizeEvent(evt,{charCode:c,shiftKey:s,keyCode:k});}return evt;}});dojo.mixin(dojo.keys,{SHIFT_TAB:25,UP_ARROW:63232,DOWN_ARROW:63233,LEFT_ARROW:63234,RIGHT_ARROW:63235,F1:63236,F2:63237,F3:63238,F4:63239,F5:63240,F6:63241,F7:63242,F8:63243,F9:63244,F10:63245,F11:63246,F12:63247,PAUSE:63250,DELETE:63272,HOME:63273,END:63275,PAGE_UP:63276,PAGE_DOWN:63277,INSERT:63302,PRINT_SCREEN:63248,SCROLL_LOCK:63249,NUM_LOCK:63289});var dk=dojo.keys,_1f8={"Up":dk.UP_ARROW,"Down":dk.DOWN_ARROW,"Left":dk.LEFT_ARROW,"Right":dk.RIGHT_ARROW,"PageUp":dk.PAGE_UP,"PageDown":dk.PAGE_DOWN};}})();if(dojo.isIE){dojo._getIeDispatcher=function(){return function(){var ap=Array.prototype,h=dojo._ie_listener.handlers,c=arguments.callee,ls=c._listeners,t=h[c.target];var r=t&&t.apply(this,arguments);for(var i in ls){if(!(i in ap)){h[ls[i]].apply(this,arguments);}}return r;};};dojo._event_listener._fixCallback=function(fp){var f=dojo._event_listener._fixEvent;return function(e){return fp.call(this,f(e,this));};};}}if(!dojo._hasResource["dojo._base.html"]){dojo._hasResource["dojo._base.html"]=true;dojo.provide("dojo._base.html");try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}if(dojo.isIE||dojo.isOpera){dojo.byId=function(id,doc){if(dojo.isString(id)){var _d=doc||dojo.doc;var te=_d.getElementById(id);if(te&&te.attributes.id.value==id){return te;}else{var eles=_d.all[id];if(!eles){return;}if(!eles.length){return eles;}var i=0;while((te=eles[i++])){if(te.attributes.id.value==id){return te;}}}}else{return id;}};}else{dojo.byId=function(id,doc){if(dojo.isString(id)){return (doc||dojo.doc).getElementById(id);}else{return id;}};}(function(){var _20c=null;dojo._destroyElement=function(node){node=dojo.byId(node);try{if(!_20c){_20c=document.createElement("div");}_20c.appendChild(node.parentNode?node.parentNode.removeChild(node):node);_20c.innerHTML="";}catch(e){}};dojo.isDescendant=function(node,_20f){try{node=dojo.byId(node);_20f=dojo.byId(_20f);while(node){if(node===_20f){return true;}node=node.parentNode;}}catch(e){return -1;}return false;};dojo.setSelectable=function(node,_211){node=dojo.byId(node);if(dojo.isMozilla){node.style.MozUserSelect=_211?"":"none";}else{if(dojo.isKhtml){node.style.KhtmlUserSelect=_211?"auto":"none";}else{if(dojo.isIE){node.unselectable=_211?"":"on";dojo.query("*",node).forEach(function(_212){_212.unselectable=_211?"":"on";});}}}};var _213=function(node,ref){ref.parentNode.insertBefore(node,ref);return true;};var _216=function(node,ref){var pn=ref.parentNode;if(ref==pn.lastChild){pn.appendChild(node);}else{return _213(node,ref.nextSibling);}return true;};dojo.place=function(node,_21b,_21c){if(!node||!_21b||_21c===undefined){return false;}node=dojo.byId(node);_21b=dojo.byId(_21b);if(typeof _21c=="number"){var cn=_21b.childNodes;if((_21c==0&&cn.length==0)||cn.length==_21c){_21b.appendChild(node);return true;}if(_21c==0){return _213(node,_21b.firstChild);}return _216(node,cn[_21c-1]);}switch(_21c.toLowerCase()){case "before":return _213(node,_21b);case "after":return _216(node,_21b);case "first":if(_21b.firstChild){return _213(node,_21b.firstChild);}else{_21b.appendChild(node);return true;}break;default:_21b.appendChild(node);return true;}};dojo.boxModel="content-box";if(dojo.isIE){var _dcm=document.compatMode;dojo.boxModel=(_dcm=="BackCompat")||(_dcm=="QuirksMode")||(dojo.isIE<6)?"border-box":"content-box";}var gcs,dv=document.defaultView;if(dojo.isSafari){gcs=function(node){var s=dv.getComputedStyle(node,null);if(!s&&node.style){node.style.display="";s=dv.getComputedStyle(node,null);}return s||{};};}else{if(dojo.isIE){gcs=function(node){return node.currentStyle;};}else{gcs=function(node){return dv.getComputedStyle(node,null);};}}dojo.getComputedStyle=gcs;if(!dojo.isIE){dojo._toPixelValue=function(_225,_226){return parseFloat(_226)||0;};}else{dojo._toPixelValue=function(_227,_228){if(!_228){return 0;}if(_228=="medium"){return 4;}if(_228.slice&&(_228.slice(-2)=="px")){return parseFloat(_228);}with(_227){var _229=style.left;var _22a=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=_228;_228=style.pixelLeft;}catch(e){_228=0;}style.left=_229;runtimeStyle.left=_22a;}return _228;};}dojo._getOpacity=(dojo.isIE?function(node){try{return (node.filters.alpha.opacity/100);}catch(e){return 1;}}:function(node){return dojo.getComputedStyle(node).opacity;});dojo._setOpacity=(dojo.isIE?function(node,_22e){if(_22e==1){node.style.cssText=node.style.cssText.replace(/FILTER:[^;]*;/i,"");if(node.nodeName.toLowerCase()=="tr"){dojo.query("> td",node).forEach(function(i){i.style.cssText=i.style.cssText.replace(/FILTER:[^;]*;/i,"");});}}else{var o="Alpha(Opacity="+(_22e*100)+")";node.style.filter=o;}if(node.nodeName.toLowerCase()=="tr"){dojo.query("> td",node).forEach(function(i){i.style.filter=o;});}return _22e;}:function(node,_233){return node.style.opacity=_233;});var _234={width:true,height:true,left:true,top:true};var _235=function(node,type,_238){type=type.toLowerCase();if(_234[type]===true){return dojo._toPixelValue(node,_238);}else{if(_234[type]===false){return _238;}else{if(dojo.isOpera&&type=="cssText"){}if((type.indexOf("margin")>=0)||(type.indexOf("padding")>=0)||(type.indexOf("width")>=0)||(type.indexOf("height")>=0)||(type.indexOf("max")>=0)||(type.indexOf("min")>=0)||(type.indexOf("offset")>=0)){_234[type]=true;return dojo._toPixelValue(node,_238);}else{_234[type]=false;return _238;}}}};dojo.style=function(node,_23a,_23b){var n=dojo.byId(node),args=arguments.length,op=(_23a=="opacity");if(args==3){return op?dojo._setOpacity(n,_23b):n.style[_23a]=_23b;}if(args==2&&op){return dojo._getOpacity(n);}var s=dojo.getComputedStyle(n);return (args==1)?s:_235(n,_23a,s[_23a]);};dojo._getPadExtents=function(n,_241){var s=_241||gcs(n),px=dojo._toPixelValue,l=px(n,s.paddingLeft),t=px(n,s.paddingTop);return {l:l,t:t,w:l+px(n,s.paddingRight),h:t+px(n,s.paddingBottom)};};dojo._getBorderExtents=function(n,_247){var ne="none",px=dojo._toPixelValue,s=_247||gcs(n),bl=(s.borderLeftStyle!=ne?px(n,s.borderLeftWidth):0),bt=(s.borderTopStyle!=ne?px(n,s.borderTopWidth):0);return {l:bl,t:bt,w:bl+(s.borderRightStyle!=ne?px(n,s.borderRightWidth):0),h:bt+(s.borderBottomStyle!=ne?px(n,s.borderBottomWidth):0)};};dojo._getPadBorderExtents=function(n,_24e){var s=_24e||gcs(n),p=dojo._getPadExtents(n,s),b=dojo._getBorderExtents(n,s);return {l:p.l+b.l,t:p.t+b.t,w:p.w+b.w,h:p.h+b.h};};dojo._getMarginExtents=function(n,_253){var s=_253||gcs(n),px=dojo._toPixelValue,l=px(n,s.marginLeft),t=px(n,s.marginTop),r=px(n,s.marginRight),b=px(n,s.marginBottom);if(dojo.isSafari&&(s.position!="absolute")){r=l;}return {l:l,t:t,w:l+r,h:t+b};};dojo._getMarginBox=function(node,_25b){var s=_25b||gcs(node),me=dojo._getMarginExtents(node,s);var l=node.offsetLeft-me.l,t=node.offsetTop-me.t;if(dojo.isMoz){var sl=parseFloat(s.left),st=parseFloat(s.top);if(!isNaN(sl)&&!isNaN(st)){l=sl,t=st;}else{var p=node.parentNode;if(p&&p.style){var pcs=gcs(p);if(pcs.overflow!="visible"){var be=dojo._getBorderExtents(p,pcs);l+=be.l,t+=be.t;}}}}else{if(dojo.isOpera){var p=node.parentNode;if(p){var be=dojo._getBorderExtents(p);l-=be.l,t-=be.t;}}}return {l:l,t:t,w:node.offsetWidth+me.w,h:node.offsetHeight+me.h};};dojo._getContentBox=function(node,_266){var s=_266||gcs(node),pe=dojo._getPadExtents(node,s),be=dojo._getBorderExtents(node,s),w=node.clientWidth,h;if(!w){w=node.offsetWidth,h=node.offsetHeight;}else{h=node.clientHeight,be.w=be.h=0;}if(dojo.isOpera){pe.l+=be.l;pe.t+=be.t;}return {l:pe.l,t:pe.t,w:w-pe.w-be.w,h:h-pe.h-be.h};};dojo._getBorderBox=function(node,_26d){var s=_26d||gcs(node),pe=dojo._getPadExtents(node,s),cb=dojo._getContentBox(node,s);return {l:cb.l-pe.l,t:cb.t-pe.t,w:cb.w+pe.w,h:cb.h+pe.h};};dojo._setBox=function(node,l,t,w,h,u){u=u||"px";with(node.style){if(!isNaN(l)){left=l+u;}if(!isNaN(t)){top=t+u;}if(w>=0){width=w+u;}if(h>=0){height=h+u;}}};dojo._usesBorderBox=function(node){var n=node.tagName;return dojo.boxModel=="border-box"||n=="TABLE"||n=="BUTTON";};dojo._setContentSize=function(node,_27a,_27b,_27c){var bb=dojo._usesBorderBox(node);if(bb){var pb=dojo._getPadBorderExtents(node,_27c);if(_27a>=0){_27a+=pb.w;}if(_27b>=0){_27b+=pb.h;}}dojo._setBox(node,NaN,NaN,_27a,_27b);};dojo._setMarginBox=function(node,_280,_281,_282,_283,_284){var s=_284||dojo.getComputedStyle(node);var bb=dojo._usesBorderBox(node),pb=bb?_288:dojo._getPadBorderExtents(node,s),mb=dojo._getMarginExtents(node,s);if(_282>=0){_282=Math.max(_282-pb.w-mb.w,0);}if(_283>=0){_283=Math.max(_283-pb.h-mb.h,0);}dojo._setBox(node,_280,_281,_282,_283);};var _288={l:0,t:0,w:0,h:0};dojo.marginBox=function(node,box){var n=dojo.byId(node),s=gcs(n),b=box;return !b?dojo._getMarginBox(n,s):dojo._setMarginBox(n,b.l,b.t,b.w,b.h,s);};dojo.contentBox=function(node,box){var n=dojo.byId(node),s=gcs(n),b=box;return !b?dojo._getContentBox(n,s):dojo._setContentSize(n,b.w,b.h,s);};var _294=function(node,prop){if(!(node=(node||0).parentNode)){return 0;}var val,_298=0,_b=dojo.body();while(node&&node.style){if(gcs(node).position=="fixed"){return 0;}val=node[prop];if(val){_298+=val-0;if(node==_b){break;}}node=node.parentNode;}return _298;};dojo._docScroll=function(){var _b=dojo.body();var _w=dojo.global;var de=dojo.doc.documentElement;return {y:(_w.pageYOffset||de.scrollTop||_b.scrollTop||0),x:(_w.pageXOffset||dojo._fixIeBiDiScrollLeft(de.scrollLeft)||_b.scrollLeft||0)};};dojo._isBodyLtr=function(){return !("_bodyLtr" in dojo)?dojo._bodyLtr=dojo.getComputedStyle(dojo.body()).direction=="ltr":dojo._bodyLtr;};dojo._getIeDocumentElementOffset=function(){var de=dojo.doc.documentElement;if(dojo.isIE>=7){return {x:de.getBoundingClientRect().left,y:de.getBoundingClientRect().top};}else{return {x:dojo._isBodyLtr()||window.parent==window?de.clientLeft:de.offsetWidth-de.clientWidth-de.clientLeft,y:de.clientTop};}};dojo._fixIeBiDiScrollLeft=function(_29e){if(dojo.isIE&&!dojo._isBodyLtr()){var de=dojo.doc.documentElement;return _29e+de.clientWidth-de.scrollWidth;}return _29e;};dojo._abs=function(node,_2a1){var _2a2=node.ownerDocument;var ret={x:0,y:0};var _2a4=false;var db=dojo.body();if(dojo.isIE){var _2a6=node.getBoundingClientRect();var _2a7=dojo._getIeDocumentElementOffset();ret.x=_2a6.left-_2a7.x;ret.y=_2a6.top-_2a7.y;}else{if(_2a2["getBoxObjectFor"]){var bo=_2a2.getBoxObjectFor(node);ret.x=bo.x-_294(node,"scrollLeft");ret.y=bo.y-_294(node,"scrollTop");}else{if(node["offsetParent"]){_2a4=true;var _2a9;if(dojo.isSafari&&(gcs(node).position=="absolute")&&(node.parentNode==db)){_2a9=db;}else{_2a9=db.parentNode;}if(node.parentNode!=db){var nd=node;if(dojo.isOpera||(dojo.isSafari>=3)){nd=db;}ret.x-=_294(nd,"scrollLeft");ret.y-=_294(nd,"scrollTop");}var _2ab=node;do{var n=_2ab["offsetLeft"];if(!dojo.isOpera||n>0){ret.x+=isNaN(n)?0:n;}var m=_2ab["offsetTop"];ret.y+=isNaN(m)?0:m;_2ab=_2ab.offsetParent;}while((_2ab!=_2a9)&&_2ab);}else{if(node["x"]&&node["y"]){ret.x+=isNaN(node.x)?0:node.x;ret.y+=isNaN(node.y)?0:node.y;}}}}if(_2a4||_2a1){var _2ae=dojo._docScroll();var m=_2a4?(!_2a1?-1:0):1;ret.y+=m*_2ae.y;ret.x+=m*_2ae.x;}return ret;};dojo.coords=function(node,_2b0){var n=dojo.byId(node),s=gcs(n),mb=dojo._getMarginBox(n,s);var abs=dojo._abs(n,_2b0);mb.x=abs.x;mb.y=abs.y;return mb;};})();dojo.hasClass=function(node,_2b6){return ((" "+dojo.byId(node).className+" ").indexOf(" "+_2b6+" ")>=0);};dojo.addClass=function(node,_2b8){node=dojo.byId(node);var cls=node.className;if((" "+cls+" ").indexOf(" "+_2b8+" ")<0){node.className=cls+(cls?" ":"")+_2b8;}};dojo.removeClass=function(node,_2bb){node=dojo.byId(node);var t=dojo.trim((" "+node.className+" ").replace(" "+_2bb+" "," "));if(node.className!=t){node.className=t;}};dojo.toggleClass=function(node,_2be,_2bf){if(_2bf===undefined){_2bf=!dojo.hasClass(node,_2be);}dojo[_2bf?"addClass":"removeClass"](node,_2be);};}if(!dojo._hasResource["dojo._base.NodeList"]){dojo._hasResource["dojo._base.NodeList"]=true;dojo.provide("dojo._base.NodeList");(function(){var d=dojo;var tnl=function(arr){arr.constructor=dojo.NodeList;dojo._mixin(arr,dojo.NodeList.prototype);return arr;};dojo.NodeList=function(){return tnl(Array.apply(null,arguments));};dojo.NodeList._wrap=tnl;dojo.extend(dojo.NodeList,{slice:function(){var a=dojo._toArray(arguments);return tnl(a.slice.apply(this,a));},splice:function(){var a=dojo._toArray(arguments);return tnl(a.splice.apply(this,a));},concat:function(){var a=dojo._toArray(arguments,0,[this]);return tnl(a.concat.apply([],a));},indexOf:function(_2c6,_2c7){return d.indexOf(this,_2c6,_2c7);},lastIndexOf:function(){return d.lastIndexOf.apply(d,d._toArray(arguments,0,[this]));},every:function(_2c8,_2c9){return d.every(this,_2c8,_2c9);},some:function(_2ca,_2cb){return d.some(this,_2ca,_2cb);},map:function(func,obj){return d.map(this,func,obj,d.NodeList);},forEach:function(_2ce,_2cf){d.forEach(this,_2ce,_2cf);return this;},coords:function(){return d.map(this,d.coords);},style:function(){var aa=d._toArray(arguments,0,[null]);var s=this.map(function(i){aa[0]=i;return d.style.apply(d,aa);});return (arguments.length>1)?this:s;},styles:function(){d.deprecated("NodeList.styles","use NodeList.style instead","1.1");return this.style.apply(this,arguments);},addClass:function(_2d3){this.forEach(function(i){d.addClass(i,_2d3);});return this;},removeClass:function(_2d5){this.forEach(function(i){d.removeClass(i,_2d5);});return this;},place:function(_2d7,_2d8){var item=d.query(_2d7)[0];_2d8=_2d8||"last";for(var x=0;x<this.length;x++){d.place(this[x],item,_2d8);}return this;},connect:function(_2db,_2dc,_2dd){this.forEach(function(item){d.connect(item,_2db,_2dc,_2dd);});return this;},orphan:function(_2df){var _2e0=(_2df)?d._filterQueryResult(this,_2df):this;_2e0.forEach(function(item){if(item["parentNode"]){item.parentNode.removeChild(item);}});return _2e0;},adopt:function(_2e2,_2e3){var item=this[0];return d.query(_2e2).forEach(function(ai){d.place(ai,item,(_2e3||"last"));});},query:function(_2e6){_2e6=_2e6||"";var ret=d.NodeList();this.forEach(function(item){d.query(_2e6,item).forEach(function(_2e9){if(typeof _2e9!="undefined"){ret.push(_2e9);}});});return ret;},filter:function(_2ea){var _2eb=this;var _a=arguments;var r=d.NodeList();var rp=function(t){if(typeof t!="undefined"){r.push(t);}};if(d.isString(_2ea)){_2eb=d._filterQueryResult(this,_a[0]);if(_a.length==1){return _2eb;}d.forEach(d.filter(_2eb,_a[1],_a[2]),rp);return r;}d.forEach(d.filter(_2eb,_a[0],_a[1]),rp);return r;},addContent:function(_2f0,_2f1){var ta=d.doc.createElement("span");if(d.isString(_2f0)){ta.innerHTML=_2f0;}else{ta.appendChild(_2f0);}var ct=((_2f1=="first")||(_2f1=="after"))?"lastChild":"firstChild";this.forEach(function(item){var tn=ta.cloneNode(true);while(tn[ct]){d.place(tn[ct],item,_2f1);}});return this;}});d.forEach(["blur","click","keydown","keypress","keyup","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup"],function(evt){var _oe="on"+evt;dojo.NodeList.prototype[_oe]=function(a,b){return this.connect(_oe,a,b);};});})();}if(!dojo._hasResource["dojo._base.query"]){dojo._hasResource["dojo._base.query"]=true;dojo.provide("dojo._base.query");(function(){var d=dojo;var _2fb=dojo.isIE?"children":"childNodes";var _2fc=function(_2fd){if(_2fd.charAt(_2fd.length-1)==">"){_2fd+=" *";}_2fd+=" ";var ts=function(s,e){return d.trim(_2fd.slice(s,e));};var _301=[];var _302=-1;var _303=-1;var _304=-1;var _305=-1;var _306=-1;var inId=-1;var _308=-1;var lc="";var cc="";var _30b;var x=0;var ql=_2fd.length;var _30e=null;var _cp=null;var _310=function(){if(_308>=0){var tv=(_308==x)?null:ts(_308,x).toLowerCase();_30e[(">~+".indexOf(tv)<0)?"tag":"oper"]=tv;_308=-1;}};var _312=function(){if(inId>=0){_30e.id=ts(inId,x).replace(/\\/g,"");inId=-1;}};var _313=function(){if(_306>=0){_30e.classes.push(ts(_306+1,x).replace(/\\/g,""));_306=-1;}};var _314=function(){_312();_310();_313();};for(;x<ql,lc=cc,cc=_2fd.charAt(x);x++){if(lc=="\\"){continue;}if(!_30e){_30b=x;_30e={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null};_308=x;}if(_302>=0){if(cc=="]"){if(!_cp.attr){_cp.attr=ts(_302+1,x);}else{_cp.matchFor=ts((_304||_302+1),x);}var cmf=_cp.matchFor;if(cmf){if((cmf.charAt(0)=="\"")||(cmf.charAt(0)=="'")){_cp.matchFor=cmf.substring(1,cmf.length-1);}}_30e.attrs.push(_cp);_cp=null;_302=_304=-1;}else{if(cc=="="){var _316=("|~^$*".indexOf(lc)>=0)?lc:"";_cp.type=_316+cc;_cp.attr=ts(_302+1,x-_316.length);_304=x+1;}}}else{if(_303>=0){if(cc==")"){if(_305>=0){_cp.value=ts(_303+1,x);}_305=_303=-1;}}else{if(cc=="#"){_314();inId=x+1;}else{if(cc=="."){_314();_306=x;}else{if(cc==":"){_314();_305=x;}else{if(cc=="["){_314();_302=x;_cp={};}else{if(cc=="("){if(_305>=0){_cp={name:ts(_305+1,x),value:null};_30e.pseudos.push(_cp);}_303=x;}else{if(cc==" "&&lc!=cc){_314();if(_305>=0){_30e.pseudos.push({name:ts(_305+1,x)});}_30e.hasLoops=(_30e.pseudos.length||_30e.attrs.length||_30e.classes.length);_30e.query=ts(_30b,x);_30e.tag=(_30e["oper"])?null:(_30e.tag||"*");_301.push(_30e);_30e=null;}}}}}}}}}return _301;};var _317={"*=":function(attr,_319){return "[contains(@"+attr+", '"+_319+"')]";},"^=":function(attr,_31b){return "[starts-with(@"+attr+", '"+_31b+"')]";},"$=":function(attr,_31d){return "[substring(@"+attr+", string-length(@"+attr+")-"+(_31d.length-1)+")='"+_31d+"']";},"~=":function(attr,_31f){return "[contains(concat(' ',@"+attr+",' '), ' "+_31f+" ')]";},"|=":function(attr,_321){return "[contains(concat(' ',@"+attr+",' '), ' "+_321+"-')]";},"=":function(attr,_323){return "[@"+attr+"='"+_323+"']";}};var _324=function(_325,_326,_327,_328){d.forEach(_326.attrs,function(attr){var _32a;if(attr.type&&_325[attr.type]){_32a=_325[attr.type](attr.attr,attr.matchFor);}else{if(attr.attr.length){_32a=_327(attr.attr);}}if(_32a){_328(_32a);}});};var _32b=function(_32c){var _32d=".";var _32e=_2fc(d.trim(_32c));while(_32e.length){var tqp=_32e.shift();var _330;if(tqp.oper==">"){_330="/";tqp=_32e.shift();}else{_330="//";}_32d+=_330+tqp.tag;if(tqp.id){_32d+="[@id='"+tqp.id+"'][1]";}d.forEach(tqp.classes,function(cn){var cnl=cn.length;var _333=" ";if(cn.charAt(cnl-1)=="*"){_333="";cn=cn.substr(0,cnl-1);}_32d+="[contains(concat(' ',@class,' '), ' "+cn+_333+"')]";});_324(_317,tqp,function(_334){return "[@"+_334+"]";},function(_335){_32d+=_335;});}return _32d;};var _336={};var _337=function(path){if(_336[path]){return _336[path];}var doc=d.doc;var _33a=_32b(path);var tf=function(_33c){var ret=[];var _33e;try{_33e=doc.evaluate(_33a,_33c,null,XPathResult.ANY_TYPE,null);}catch(e){console.debug("failure in exprssion:",_33a,"under:",_33c);console.debug(e);}var _33f=_33e.iterateNext();while(_33f){ret.push(_33f);_33f=_33e.iterateNext();}return ret;};return _336[path]=tf;};var _340={};var _341={};var _342=function(_343,_344){if(!_343){return _344;}if(!_344){return _343;}return function(){return _343.apply(window,arguments)&&_344.apply(window,arguments);};};var _345=function(_346,_347,_348,idx){var nidx=idx+1;var _34b=(_347.length==nidx);var tqp=_347[idx];if(tqp.oper==">"){var ecn=_346[_2fb];if(!ecn||!ecn.length){return;}nidx++;_34b=(_347.length==nidx);var tf=_34f(_347[idx+1]);for(var x=0,ecnl=ecn.length,te;x<ecnl,te=ecn[x];x++){if(tf(te)){if(_34b){_348.push(te);}else{_345(te,_347,_348,nidx);}}}}var _353=_354(tqp)(_346);if(_34b){while(_353.length){_348.push(_353.shift());}}else{while(_353.length){_345(_353.shift(),_347,_348,nidx);}}};var _355=function(_356,_357){var ret=[];var x=_356.length-1,te;while(te=_356[x--]){_345(te,_357,ret,0);}return ret;};var _34f=function(q){if(_340[q.query]){return _340[q.query];}var ff=null;if(q.tag){if(q.tag=="*"){ff=_342(ff,function(elem){return (elem.nodeType==1);});}else{ff=_342(ff,function(elem){return ((elem.nodeType==1)&&(q.tag==elem.tagName.toLowerCase()));});}}if(q.id){ff=_342(ff,function(elem){return ((elem.nodeType==1)&&(elem.id==q.id));});}if(q.hasLoops){ff=_342(ff,_360(q));}return _340[q.query]=ff;};var _361=function(node){var pn=node.parentNode;var pnc=pn.childNodes;var nidx=-1;var _366=pn.firstChild;if(!_366){return nidx;}var ci=node["__cachedIndex"];var cl=pn["__cachedLength"];if(((typeof cl=="number")&&(cl!=pnc.length))||(typeof ci!="number")){pn["__cachedLength"]=pnc.length;var idx=1;do{if(_366===node){nidx=idx;}if(_366.nodeType==1){_366["__cachedIndex"]=idx;idx++;}_366=_366.nextSibling;}while(_366);}else{nidx=ci;}return nidx;};var _36a=0;var _36b="";var _36c=function(elem,attr){if(attr=="class"){return elem.className||_36b;}if(attr=="for"){return elem.htmlFor||_36b;}return elem.getAttribute(attr,2)||_36b;};var _36f={"*=":function(attr,_371){return function(elem){return (_36c(elem,attr).indexOf(_371)>=0);};},"^=":function(attr,_374){return function(elem){return (_36c(elem,attr).indexOf(_374)==0);};},"$=":function(attr,_377){var tval=" "+_377;return function(elem){var ea=" "+_36c(elem,attr);return (ea.lastIndexOf(_377)==(ea.length-_377.length));};},"~=":function(attr,_37c){var tval=" "+_37c+" ";return function(elem){var ea=" "+_36c(elem,attr)+" ";return (ea.indexOf(tval)>=0);};},"|=":function(attr,_381){var _382=" "+_381+"-";return function(elem){var ea=" "+(elem.getAttribute(attr,2)||"");return ((ea==_381)||(ea.indexOf(_382)==0));};},"=":function(attr,_386){return function(elem){return (_36c(elem,attr)==_386);};}};var _388={"first-child":function(name,_38a){return function(elem){if(elem.nodeType!=1){return false;}var fc=elem.previousSibling;while(fc&&(fc.nodeType!=1)){fc=fc.previousSibling;}return (!fc);};},"last-child":function(name,_38e){return function(elem){if(elem.nodeType!=1){return false;}var nc=elem.nextSibling;while(nc&&(nc.nodeType!=1)){nc=nc.nextSibling;}return (!nc);};},"empty":function(name,_392){return function(elem){var cn=elem.childNodes;var cnl=elem.childNodes.length;for(var x=cnl-1;x>=0;x--){var nt=cn[x].nodeType;if((nt==1)||(nt==3)){return false;}}return true;};},"not":function(name,_399){var ntf=_34f(_2fc(_399)[0]);return function(elem){return (!ntf(elem));};},"nth-child":function(name,_39d){var pi=parseInt;if(_39d=="odd"){return function(elem){return (((_361(elem))%2)==1);};}else{if((_39d=="2n")||(_39d=="even")){return function(elem){return ((_361(elem)%2)==0);};}else{if(_39d.indexOf("0n+")==0){var _3a1=pi(_39d.substr(3));return function(elem){return (elem.parentNode[_2fb][_3a1-1]===elem);};}else{if((_39d.indexOf("n+")>0)&&(_39d.length>3)){var _3a3=_39d.split("n+",2);var pred=pi(_3a3[0]);var idx=pi(_3a3[1]);return function(elem){return ((_361(elem)%pred)==idx);};}else{if(_39d.indexOf("n")==-1){var _3a1=pi(_39d);return function(elem){return (_361(elem)==_3a1);};}}}}}}};var _3a8=(d.isIE)?function(cond){var clc=cond.toLowerCase();return function(elem){return elem[cond]||elem[clc];};}:function(cond){return function(elem){return (elem&&elem.getAttribute&&elem.hasAttribute(cond));};};var _360=function(_3ae){var _3af=(_341[_3ae.query]||_340[_3ae.query]);if(_3af){return _3af;}var ff=null;if(_3ae.id){if(_3ae.tag!="*"){ff=_342(ff,function(elem){return (elem.tagName.toLowerCase()==_3ae.tag);});}}d.forEach(_3ae.classes,function(_3b2,idx,arr){var _3b5=_3b2.charAt(_3b2.length-1)=="*";if(_3b5){_3b2=_3b2.substr(0,_3b2.length-1);}var re=new RegExp("(?:^|\\s)"+_3b2+(_3b5?".*":"")+"(?:\\s|$)");ff=_342(ff,function(elem){return re.test(elem.className);});ff.count=idx;});d.forEach(_3ae.pseudos,function(_3b8){if(_388[_3b8.name]){ff=_342(ff,_388[_3b8.name](_3b8.name,_3b8.value));}});_324(_36f,_3ae,_3a8,function(_3b9){ff=_342(ff,_3b9);});if(!ff){ff=function(){return true;};}return _341[_3ae.query]=ff;};var _3ba={};var _354=function(_3bb,root){var fHit=_3ba[_3bb.query];if(fHit){return fHit;}if(_3bb.id&&!_3bb.hasLoops&&!_3bb.tag){return _3ba[_3bb.query]=function(root){return [d.byId(_3bb.id)];};}var _3bf=_360(_3bb);var _3c0;if(_3bb.tag&&_3bb.id&&!_3bb.hasLoops){_3c0=function(root){var te=d.byId(_3bb.id);if(_3bf(te)){return [te];}};}else{var tret;if(!_3bb.hasLoops){_3c0=function(root){var ret=[];var te,x=0,tret=root.getElementsByTagName(_3bb.tag);while(te=tret[x++]){ret.push(te);}return ret;};}else{_3c0=function(root){var ret=[];var te,x=0,tret=root.getElementsByTagName(_3bb.tag);while(te=tret[x++]){if(_3bf(te)){ret.push(te);}}return ret;};}}return _3ba[_3bb.query]=_3c0;};var _3cc={};var _3cd={"*":d.isIE?function(root){return root.all;}:function(root){return root.getElementsByTagName("*");},">":function(root){var ret=[];var te,x=0,tret=root[_2fb];while(te=tret[x++]){if(te.nodeType==1){ret.push(te);}}return ret;}};var _3d5=function(_3d6){var _3d7=_2fc(d.trim(_3d6));if(_3d7.length==1){var tt=_354(_3d7[0]);tt.nozip=true;return tt;}var sqf=function(root){var _3db=_3d7.slice(0);var _3dc;if(_3db[0].oper==">"){_3dc=[root];}else{_3dc=_354(_3db.shift())(root);}return _355(_3dc,_3db);};return sqf;};var _3dd=((document["evaluate"]&&!d.isSafari)?function(_3de){var _3df=_3de.split(" ");if((document["evaluate"])&&(_3de.indexOf(":")==-1)&&((true))){if(((_3df.length>2)&&(_3de.indexOf(">")==-1))||(_3df.length>3)||(_3de.indexOf("[")>=0)||((1==_3df.length)&&(0<=_3de.indexOf(".")))){return _337(_3de);}}return _3d5(_3de);}:_3d5);var _3e0=function(_3e1){if(_3cd[_3e1]){return _3cd[_3e1];}if(0>_3e1.indexOf(",")){return _3cd[_3e1]=_3dd(_3e1);}else{var _3e2=_3e1.split(/\s*,\s*/);var tf=function(root){var _3e5=0;var ret=[];var tp;while(tp=_3e2[_3e5++]){ret=ret.concat(_3dd(tp,tp.indexOf(" "))(root));}return ret;};return _3cd[_3e1]=tf;}};var _3e8=0;var _zip=function(arr){if(arr&&arr.nozip){return d.NodeList._wrap(arr);}var ret=new d.NodeList();if(!arr){return ret;}if(arr[0]){ret.push(arr[0]);}if(arr.length<2){return ret;}_3e8++;arr[0]["_zipIdx"]=_3e8;for(var x=1,te;te=arr[x];x++){if(arr[x]["_zipIdx"]!=_3e8){ret.push(te);}te["_zipIdx"]=_3e8;}return ret;};d.query=function(_3ee,root){if(_3ee.constructor==d.NodeList){return _3ee;}if(!d.isString(_3ee)){return new d.NodeList(_3ee);}if(d.isString(root)){root=d.byId(root);}return _zip(_3e0(_3ee)(root||d.doc));};d._filterQueryResult=function(_3f0,_3f1){var tnl=new d.NodeList();var ff=(_3f1)?_34f(_2fc(_3f1)[0]):function(){return true;};for(var x=0,te;te=_3f0[x];x++){if(ff(te)){tnl.push(te);}}return tnl;};})();}if(!dojo._hasResource["dojo._base.xhr"]){dojo._hasResource["dojo._base.xhr"]=true;dojo.provide("dojo._base.xhr");(function(){var _d=dojo;function setValue(obj,name,_3f9){var val=obj[name];if(_d.isString(val)){obj[name]=[val,_3f9];}else{if(_d.isArray(val)){val.push(_3f9);}else{obj[name]=_3f9;}}};dojo.formToObject=function(_3fb){var ret={};var iq="input:not([type=file]):not([type=submit]):not([type=image]):not([type=reset]):not([type=button]), select, textarea";_d.query(iq,_3fb).filter(function(node){return (!node.disabled);}).forEach(function(item){var _in=item.name;var type=(item.type||"").toLowerCase();if(type=="radio"||type=="checkbox"){if(item.checked){setValue(ret,_in,item.value);}}else{if(item.multiple){ret[_in]=[];_d.query("option",item).forEach(function(opt){if(opt.selected){setValue(ret,_in,opt.value);}});}else{setValue(ret,_in,item.value);if(type=="image"){ret[_in+".x"]=ret[_in+".y"]=ret[_in].x=ret[_in].y=0;}}}});return ret;};dojo.objectToQuery=function(map){var ec=encodeURIComponent;var ret="";var _406={};for(var x in map){if(map[x]!=_406[x]){if(_d.isArray(map[x])){for(var y=0;y<map[x].length;y++){ret+=ec(x)+"="+ec(map[x][y])+"&";}}else{ret+=ec(x)+"="+ec(map[x])+"&";}}}if(ret.length&&ret.charAt(ret.length-1)=="&"){ret=ret.substr(0,ret.length-1);}return ret;};dojo.formToQuery=function(_409){return _d.objectToQuery(_d.formToObject(_409));};dojo.formToJson=function(_40a,_40b){return _d.toJson(_d.formToObject(_40a),_40b);};dojo.queryToObject=function(str){var ret={};var qp=str.split("&");var dc=decodeURIComponent;_d.forEach(qp,function(item){if(item.length){var _411=item.split("=");var name=dc(_411.shift());var val=dc(_411.join("="));if(_d.isString(ret[name])){ret[name]=[ret[name]];}if(_d.isArray(ret[name])){ret[name].push(val);}else{ret[name]=val;}}});return ret;};dojo._blockAsync=false;dojo._contentHandlers={"text":function(xhr){return xhr.responseText;},"json":function(xhr){if(!djConfig.usePlainJson){console.debug("Consider using mimetype:text/json-comment-filtered"+" to avoid potential security issues with JSON endpoints"+" (use djConfig.usePlainJson=true to turn off this message)");}return _d.fromJson(xhr.responseText);},"json-comment-filtered":function(xhr){var _417=xhr.responseText;var _418=_417.indexOf("/*");var _419=_417.lastIndexOf("*/");if(_418==-1||_419==-1){throw new Error("JSON was not comment filtered");}return _d.fromJson(_417.substring(_418+2,_419));},"javascript":function(xhr){return _d.eval(xhr.responseText);},"xml":function(xhr){if(_d.isIE&&!xhr.responseXML){_d.forEach(["MSXML2","Microsoft","MSXML","MSXML3"],function(i){try{var doc=new ActiveXObject(prefixes[i]+".XMLDOM");doc.async=false;doc.loadXML(xhr.responseText);return doc;}catch(e){}});}else{return xhr.responseXML;}}};dojo._contentHandlers["json-comment-optional"]=function(xhr){var _41f=_d._contentHandlers;try{return _41f["json-comment-filtered"](xhr);}catch(e){return _41f["json"](xhr);}};dojo._ioSetArgs=function(args,_421,_422,_423){var _424={args:args,url:args.url};var _425=null;if(args.form){var form=_d.byId(args.form);var _427=form.getAttributeNode("action");_424.url=_424.url||(_427?_427.value:null);_425=_d.formToObject(form);}var _428=[{}];if(_425){_428.push(_425);}if(args.content){_428.push(args.content);}if(args.preventCache){_428.push({"dojo.preventCache":new Date().valueOf()});}_424.query=_d.objectToQuery(_d.mixin.apply(null,_428));_424.handleAs=args.handleAs||"text";var d=new _d.Deferred(_421);d.addCallbacks(_422,function(_42a){return _423(_42a,d);});var ld=args.load;if(ld&&_d.isFunction(ld)){d.addCallback(function(_42c){return ld.call(args,_42c,_424);});}var err=args.error;if(err&&_d.isFunction(err)){d.addErrback(function(_42e){return err.call(args,_42e,_424);});}var _42f=args.handle;if(_42f&&_d.isFunction(_42f)){d.addBoth(function(_430){return _42f.call(args,_430,_424);});}d.ioArgs=_424;return d;};var _431=function(dfd){dfd.canceled=true;var xhr=dfd.ioArgs.xhr;var _at=(typeof xhr.abort);if((_at=="function")||(_at=="unknown")){xhr.abort();}var err=new Error("xhr cancelled");err.dojoType="cancel";return err;};var _436=function(dfd){return _d._contentHandlers[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);};var _438=function(_439,dfd){console.debug(_439);return _439;};var _43b=function(args){var dfd=_d._ioSetArgs(args,_431,_436,_438);dfd.ioArgs.xhr=_d._xhrObj(dfd.ioArgs.args);return dfd;};var _43e=null;var _43f=[];var _440=function(){var now=(new Date()).getTime();if(!_d._blockAsync){for(var i=0,tif;(i<_43f.length)&&(tif=_43f[i]);i++){var dfd=tif.dfd;try{if(!dfd||dfd.canceled||!tif.validCheck(dfd)){_43f.splice(i--,1);}else{if(tif.ioCheck(dfd)){_43f.splice(i--,1);tif.resHandle(dfd);}else{if(dfd.startTime){if(dfd.startTime+(dfd.ioArgs.args.timeout||0)<now){_43f.splice(i--,1);var err=new Error("timeout exceeded");err.dojoType="timeout";dfd.errback(err);dfd.cancel();}}}}}catch(e){console.debug(e);dfd.errback(new Error("_watchInFlightError!"));}}}if(!_43f.length){clearInterval(_43e);_43e=null;return;}};dojo._ioCancelAll=function(){try{_d.forEach(_43f,function(i){i.dfd.cancel();});}catch(e){}};if(_d.isIE){_d.addOnUnload(_d._ioCancelAll);}_d._ioWatch=function(dfd,_448,_449,_44a){if(dfd.ioArgs.args.timeout){dfd.startTime=(new Date()).getTime();}_43f.push({dfd:dfd,validCheck:_448,ioCheck:_449,resHandle:_44a});if(!_43e){_43e=setInterval(_440,50);}_440();};var _44b="application/x-www-form-urlencoded";var _44c=function(dfd){return dfd.ioArgs.xhr.readyState;};var _44e=function(dfd){return 4==dfd.ioArgs.xhr.readyState;};var _450=function(dfd){if(_d._isDocumentOk(dfd.ioArgs.xhr)){dfd.callback(dfd);}else{dfd.errback(new Error("bad http response code:"+dfd.ioArgs.xhr.status));}};var _452=function(type,dfd){var _455=dfd.ioArgs;var args=_455.args;_455.xhr.open(type,_455.url,args.sync!==true,args.user||undefined,args.password||undefined);if(args.headers){for(var hdr in args.headers){if(hdr.toLowerCase()==="content-type"&&!args.contentType){args.contentType=args.headers[hdr];}else{_455.xhr.setRequestHeader(hdr,args.headers[hdr]);}}}_455.xhr.setRequestHeader("Content-Type",(args.contentType||_44b));try{_455.xhr.send(_455.query);}catch(e){dfd.cancel();}_d._ioWatch(dfd,_44c,_44e,_450);return dfd;};dojo._ioAddQueryToUrl=function(_458){if(_458.query.length){_458.url+=(_458.url.indexOf("?")==-1?"?":"&")+_458.query;_458.query=null;}};dojo.xhrGet=function(args){var dfd=_43b(args);_d._ioAddQueryToUrl(dfd.ioArgs);return _452("GET",dfd);};dojo.xhrPost=function(args){return _452("POST",_43b(args));};dojo.rawXhrPost=function(args){var dfd=_43b(args);dfd.ioArgs.query=args.postData;return _452("POST",dfd);};dojo.xhrPut=function(args){return _452("PUT",_43b(args));};dojo.rawXhrPut=function(args){var dfd=_43b(args);var _461=dfd.ioArgs;if(args["putData"]){_461.query=args.putData;args.putData=null;}return _452("PUT",dfd);};dojo.xhrDelete=function(args){var dfd=_43b(args);_d._ioAddQueryToUrl(dfd.ioArgs);return _452("DELETE",dfd);};})();}if(!dojo._hasResource["dojo._base.fx"]){dojo._hasResource["dojo._base.fx"]=true;dojo.provide("dojo._base.fx");dojo._Line=function(_464,end){this.start=_464;this.end=end;this.getValue=function(n){return ((this.end-this.start)*n)+this.start;};};dojo.declare("dojo._Animation",null,{constructor:function(args){dojo.mixin(this,args);if(dojo.isArray(this.curve)){this.curve=new dojo._Line(this.curve[0],this.curve[1]);}},duration:1000,repeat:0,rate:10,_percent:0,_startRepeatCount:0,fire:function(evt,args){if(this[evt]){this[evt].apply(this,args||[]);}return this;},play:function(_46a,_46b){var _t=this;if(_46b){_t._stopTimer();_t._active=_t._paused=false;_t._percent=0;}else{if(_t._active&&!_t._paused){return _t;}}_t.fire("beforeBegin");var d=_46a||_t.delay;var _p=dojo.hitch(_t,"_play",_46b);if(d>0){setTimeout(_p,d);return _t;}_p();return _t;},_play:function(_46f){var _t=this;_t._startTime=new Date().valueOf();if(_t._paused){_t._startTime-=_t.duration*_t._percent;}_t._endTime=_t._startTime+_t.duration;_t._active=true;_t._paused=false;var _471=_t.curve.getValue(_t._percent);if(!_t._percent){if(!_t._startRepeatCount){_t._startRepeatCount=_t.repeat;}_t.fire("onBegin",[_471]);}_t.fire("onPlay",[_471]);_t._cycle();return _t;},pause:function(){this._stopTimer();if(!this._active){return this;}this._paused=true;this.fire("onPause",[this.curve.getValue(this._percent)]);return this;},gotoPercent:function(_472,_473){this._stopTimer();this._active=this._paused=true;this._percent=_472;if(_473){this.play();}return this;},stop:function(_474){if(!this._timer){return;}this._stopTimer();if(_474){this._percent=1;}this.fire("onStop",[this.curve.getValue(this._percent)]);this._active=this._paused=false;return this;},status:function(){if(this._active){return this._paused?"paused":"playing";}return "stopped";},_cycle:function(){var _t=this;if(_t._active){var curr=new Date().valueOf();var step=(curr-_t._startTime)/(_t._endTime-_t._startTime);if(step>=1){step=1;}_t._percent=step;if(_t.easing){step=_t.easing(step);}_t.fire("onAnimate",[_t.curve.getValue(step)]);if(step<1){_t._startTimer();}else{_t._active=false;if(_t.repeat>0){_t.repeat--;_t.play(null,true);}else{if(_t.repeat==-1){_t.play(null,true);}else{if(_t._startRepeatCount){_t.repeat=_t._startRepeatCount;_t._startRepeatCount=0;}}}_t._percent=0;_t.fire("onEnd");}}return _t;}});(function(){var d=dojo;var ctr=0;var _47a=[];var _47b={run:function(){}};var _47c=null;dojo._Animation.prototype._startTimer=function(){if(!this._timer){this._timer=dojo.connect(_47b,"run",this,"_cycle");ctr++;}if(!_47c){_47c=setInterval(dojo.hitch(_47b,"run"),this.rate);}};dojo._Animation.prototype._stopTimer=function(){dojo.disconnect(this._timer);this._timer=null;ctr--;if(!ctr){clearInterval(_47c);_47c=null;}};var _47d=(d.isIE)?function(node){var ns=node.style;if(!ns.zoom.length&&d.style(node,"zoom")=="normal"){ns.zoom="1";}if(!ns.width.length&&d.style(node,"width")=="auto"){ns.width="auto";}}:function(){};dojo._fade=function(args){args.node=d.byId(args.node);var _481=d.mixin({properties:{}},args);var _482=(_481.properties.opacity={});_482.start=!("start" in _481)?function(){return Number(d.style(_481.node,"opacity"));}:_481.start;_482.end=_481.end;var anim=d.animateProperty(_481);d.connect(anim,"beforeBegin",d.partial(_47d,_481.node));return anim;};dojo.fadeIn=function(args){return d._fade(d.mixin({end:1},args));};dojo.fadeOut=function(args){return d._fade(d.mixin({end:0},args));};dojo._defaultEasing=function(n){return 0.5+((Math.sin((n+1.5)*Math.PI))/2);};var _487=function(_488){this._properties=_488;for(var p in _488){var prop=_488[p];if(prop.start instanceof d.Color){prop.tempColor=new d.Color();}}this.getValue=function(r){var ret={};for(var p in this._properties){var prop=this._properties[p];var _48f=prop.start;if(_48f instanceof d.Color){ret[p]=d.blendColors(_48f,prop.end,r,prop.tempColor).toCss();}else{if(!d.isArray(_48f)){ret[p]=((prop.end-_48f)*r)+_48f+(p!="opacity"?prop.units||"px":"");}}}return ret;};};dojo.animateProperty=function(args){args.node=d.byId(args.node);if(!args.easing){args.easing=d._defaultEasing;}var anim=new d._Animation(args);d.connect(anim,"beforeBegin",anim,function(){var pm={};for(var p in this.properties){var prop=(pm[p]=d.mixin({},this.properties[p]));if(d.isFunction(prop.start)){prop.start=prop.start();}if(d.isFunction(prop.end)){prop.end=prop.end();}var _495=(p.toLowerCase().indexOf("color")>=0);function getStyle(node,p){var v=({height:node.offsetHeight,width:node.offsetWidth})[p];if(v!==undefined){return v;}v=d.style(node,p);return (p=="opacity")?Number(v):parseFloat(v);};if(!("end" in prop)){prop.end=getStyle(this.node,p);}else{if(!("start" in prop)){prop.start=getStyle(this.node,p);}}if(_495){prop.start=new d.Color(prop.start);prop.end=new d.Color(prop.end);}else{prop.start=(p=="opacity")?Number(prop.start):parseFloat(prop.start);}}this.curve=new _487(pm);});d.connect(anim,"onAnimate",anim,function(_499){for(var s in _499){d.style(this.node,s,_499[s]);}});return anim;};})();}
+(function(){var _1=null;if((_1||(typeof djConfig!="undefined"&&djConfig.scopeMap))&&(typeof window!="undefined")){var _2="",_3="",_4="",_5={},_6={};_1=_1||djConfig.scopeMap;for(var i=0;i<_1.length;i++){var _7=_1[i];_2+="var "+_7[0]+" = {}; "+_7[1]+" = "+_7[0]+";"+_7[1]+"._scopeName = '"+_7[1]+"';";_3+=(i==0?"":",")+_7[0];_4+=(i==0?"":",")+_7[1];_5[_7[0]]=_7[1];_6[_7[1]]=_7[0];}eval(_2+"dojo._scopeArgs = ["+_4+"];");dojo._scopePrefixArgs=_3;dojo._scopePrefix="(function("+_3+"){";dojo._scopeSuffix="})("+_4+")";dojo._scopeMap=_5;dojo._scopeMapRev=_6;}(function(){if(typeof this["loadFirebugConsole"]=="function"){this["loadFirebugConsole"]();}else{this.console=this.console||{};var cn=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"];var i=0,tn;while((tn=cn[i++])){if(!console[tn]){(function(){var _8=tn+"";console[_8]=("log" in console)?function(){var a=Array.apply({},arguments);a.unshift(_8+":");console["log"](a.join(" "));}:function(){};console[_8]._fake=true;})();}}}if(typeof dojo=="undefined"){dojo={_scopeName:"dojo",_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}};}var d=dojo;if(typeof dijit=="undefined"){dijit={_scopeName:"dijit"};}if(typeof dojox=="undefined"){dojox={_scopeName:"dojox"};}if(!d._scopeArgs){d._scopeArgs=[dojo,dijit,dojox];}d.global=this;d.config={isDebug:false,debugAtAllCosts:false};if(typeof djConfig!="undefined"){for(var _9 in djConfig){d.config[_9]=djConfig[_9];}}dojo.locale=d.config.locale;var _a="$Rev: 21629 $".match(/\d+/);dojo.version={major:1,minor:4,patch:3,flag:"",revision:_a?+_a[0]:NaN,toString:function(){with(d.version){return major+"."+minor+"."+patch+flag+" ("+revision+")";}}};if(typeof OpenAjax!="undefined"){OpenAjax.hub.registerLibrary(dojo._scopeName,"http://dojotoolkit.org",d.version.toString());}var _b,_c,_d={};for(var i in {toString:1}){_b=[];break;}dojo._extraNames=_b=_b||["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"];_c=_b.length;dojo._mixin=function(_e,_f){var _10,s,i;for(_10 in _f){s=_f[_10];if(!(_10 in _e)||(_e[_10]!==s&&(!(_10 in _d)||_d[_10]!==s))){_e[_10]=s;}}if(_c&&_f){for(i=0;i<_c;++i){_10=_b[i];s=_f[_10];if(!(_10 in _e)||(_e[_10]!==s&&(!(_10 in _d)||_d[_10]!==s))){_e[_10]=s;}}}return _e;};dojo.mixin=function(obj,_11){if(!obj){obj={};}for(var i=1,l=arguments.length;i<l;i++){d._mixin(obj,arguments[i]);}return obj;};dojo._getProp=function(_12,_13,_14){var obj=_14||d.global;for(var i=0,p;obj&&(p=_12[i]);i++){if(i==0&&d._scopeMap[p]){p=d._scopeMap[p];}obj=(p in obj?obj[p]:(_13?obj[p]={}:undefined));}return obj;};dojo.setObject=function(_15,_16,_17){var _18=_15.split("."),p=_18.pop(),obj=d._getProp(_18,true,_17);return obj&&p?(obj[p]=_16):undefined;};dojo.getObject=function(_19,_1a,_1b){return d._getProp(_19.split("."),_1a,_1b);};dojo.exists=function(_1c,obj){return !!d.getObject(_1c,false,obj);};dojo["eval"]=function(_1d){return d.global.eval?d.global.eval(_1d):eval(_1d);};d.deprecated=d.experimental=function(){};})();(function(){var d=dojo;d.mixin(d,{_loadedModules:{},_inFlightCount:0,_hasResource:{},_modulePrefixes:{dojo:{name:"dojo",value:"."},doh:{name:"doh",value:"../util/doh"},tests:{name:"tests",value:"tests"}},_moduleHasPrefix:function(_1e){var mp=d._modulePrefixes;return !!(mp[_1e]&&mp[_1e].value);},_getModulePrefix:function(_1f){var mp=d._modulePrefixes;if(d._moduleHasPrefix(_1f)){return mp[_1f].value;}return _1f;},_loadedUrls:[],_postLoad:false,_loaders:[],_unloaders:[],_loadNotifying:false});dojo._loadPath=function(_20,_21,cb){var uri=((_20.charAt(0)=="/"||_20.match(/^\w+:/))?"":d.baseUrl)+_20;try{return !_21?d._loadUri(uri,cb):d._loadUriAndCheck(uri,_21,cb);}catch(e){console.error(e);return false;}};dojo._loadUri=function(uri,cb){if(d._loadedUrls[uri]){return true;}d._inFlightCount++;var _22=d._getText(uri,true);if(_22){d._loadedUrls[uri]=true;d._loadedUrls.push(uri);if(cb){_22="("+_22+")";}else{_22=d._scopePrefix+_22+d._scopeSuffix;}if(!d.isIE){_22+="\r\n//@ sourceURL="+uri;}var _23=d["eval"](_22);if(cb){cb(_23);}}if(--d._inFlightCount==0&&d._postLoad&&d._loaders.length){setTimeout(function(){if(d._inFlightCount==0){d._callLoaded();}},0);}return !!_22;};dojo._loadUriAndCheck=function(uri,_24,cb){var ok=false;try{ok=d._loadUri(uri,cb);}catch(e){console.error("failed loading "+uri+" with error: "+e);}return !!(ok&&d._loadedModules[_24]);};dojo.loaded=function(){d._loadNotifying=true;d._postLoad=true;var mll=d._loaders;d._loaders=[];for(var x=0;x<mll.length;x++){mll[x]();}d._loadNotifying=false;if(d._postLoad&&d._inFlightCount==0&&mll.length){d._callLoaded();}};dojo.unloaded=function(){var mll=d._unloaders;while(mll.length){(mll.pop())();}};d._onto=function(arr,obj,fn){if(!fn){arr.push(obj);}else{if(fn){var _25=(typeof fn=="string")?obj[fn]:fn;arr.push(function(){_25.call(obj);});}}};dojo.ready=dojo.addOnLoad=function(obj,_26){d._onto(d._loaders,obj,_26);if(d._postLoad&&d._inFlightCount==0&&!d._loadNotifying){d._callLoaded();}};var dca=d.config.addOnLoad;if(dca){d.addOnLoad[(dca instanceof Array?"apply":"call")](d,dca);}dojo._modulesLoaded=function(){if(d._postLoad){return;}if(d._inFlightCount>0){console.warn("files still in flight!");return;}d._callLoaded();};dojo._callLoaded=function(){if(typeof setTimeout=="object"||(d.config.useXDomain&&d.isOpera)){setTimeout(d.isAIR?function(){d.loaded();}:d._scopeName+".loaded();",0);}else{d.loaded();}};dojo._getModuleSymbols=function(_27){var _28=_27.split(".");for(var i=_28.length;i>0;i--){var _29=_28.slice(0,i).join(".");if(i==1&&!d._moduleHasPrefix(_29)){_28[0]="../"+_28[0];}else{var _2a=d._getModulePrefix(_29);if(_2a!=_29){_28.splice(0,i,_2a);break;}}}return _28;};dojo._global_omit_module_check=false;dojo.loadInit=function(_2b){_2b();};dojo._loadModule=dojo.require=function(_2c,_2d){_2d=d._global_omit_module_check||_2d;var _2e=d._loadedModules[_2c];if(_2e){return _2e;}var _2f=d._getModuleSymbols(_2c).join("/")+".js";var _30=!_2d?_2c:null;var ok=d._loadPath(_2f,_30);if(!ok&&!_2d){throw new Error("Could not load '"+_2c+"'; last tried '"+_2f+"'");}if(!_2d&&!d._isXDomain){_2e=d._loadedModules[_2c];if(!_2e){throw new Error("symbol '"+_2c+"' is not defined after loading '"+_2f+"'");}}return _2e;};dojo.provide=function(_31){_31=_31+"";return (d._loadedModules[_31]=d.getObject(_31,true));};dojo.platformRequire=function(_32){var _33=_32.common||[];var _34=_33.concat(_32[d._name]||_32["default"]||[]);for(var x=0;x<_34.length;x++){var _35=_34[x];if(_35.constructor==Array){d._loadModule.apply(d,_35);}else{d._loadModule(_35);}}};dojo.requireIf=function(_36,_37){if(_36===true){var _38=[];for(var i=1;i<arguments.length;i++){_38.push(arguments[i]);}d.require.apply(d,_38);}};dojo.requireAfterIf=d.requireIf;dojo.registerModulePath=function(_39,_3a){d._modulePrefixes[_39]={name:_39,value:_3a};};dojo.requireLocalization=function(_3b,_3c,_3d,_3e){d.require("dojo.i18n");d.i18n._requireLocalization.apply(d.hostenv,arguments);};var ore=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),ire=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");dojo._Url=function(){var n=null,_3f=arguments,uri=[_3f[0]];for(var i=1;i<_3f.length;i++){if(!_3f[i]){continue;}var _40=new d._Url(_3f[i]+""),_41=new d._Url(uri[0]+"");if(_40.path==""&&!_40.scheme&&!_40.authority&&!_40.query){if(_40.fragment!=n){_41.fragment=_40.fragment;}_40=_41;}else{if(!_40.scheme){_40.scheme=_41.scheme;if(!_40.authority){_40.authority=_41.authority;if(_40.path.charAt(0)!="/"){var _42=_41.path.substring(0,_41.path.lastIndexOf("/")+1)+_40.path;var _43=_42.split("/");for(var j=0;j<_43.length;j++){if(_43[j]=="."){if(j==_43.length-1){_43[j]="";}else{_43.splice(j,1);j--;}}else{if(j>0&&!(j==1&&_43[0]=="")&&_43[j]==".."&&_43[j-1]!=".."){if(j==(_43.length-1)){_43.splice(j,1);_43[j-1]="";}else{_43.splice(j-1,2);j-=2;}}}}_40.path=_43.join("/");}}}}uri=[];if(_40.scheme){uri.push(_40.scheme,":");}if(_40.authority){uri.push("//",_40.authority);}uri.push(_40.path);if(_40.query){uri.push("?",_40.query);}if(_40.fragment){uri.push("#",_40.fragment);}}this.uri=uri.join("");var r=this.uri.match(ore);this.scheme=r[2]||(r[1]?"":n);this.authority=r[4]||(r[3]?"":n);this.path=r[5];this.query=r[7]||(r[6]?"":n);this.fragment=r[9]||(r[8]?"":n);if(this.authority!=n){r=this.authority.match(ire);this.user=r[3]||n;this.password=r[4]||n;this.host=r[6]||r[7];this.port=r[9]||n;}};dojo._Url.prototype.toString=function(){return this.uri;};dojo.moduleUrl=function(_44,url){var loc=d._getModuleSymbols(_44).join("/");if(!loc){return null;}if(loc.lastIndexOf("/")!=loc.length-1){loc+="/";}var _45=loc.indexOf(":");if(loc.charAt(0)!="/"&&(_45==-1||_45>loc.indexOf("/"))){loc=d.baseUrl+loc;}return new d._Url(loc,url);};})();if(typeof window!="undefined"){dojo.isBrowser=true;dojo._name="browser";(function(){var d=dojo;if(document&&document.getElementsByTagName){var _46=document.getElementsByTagName("script");var _47=/dojo(\.xd)?\.js(\W|$)/i;for(var i=0;i<_46.length;i++){var src=_46[i].getAttribute("src");if(!src){continue;}var m=src.match(_47);if(m){if(!d.config.baseUrl){d.config.baseUrl=src.substring(0,m.index);}var cfg=_46[i].getAttribute("djConfig");if(cfg){var _48=eval("({ "+cfg+" })");for(var x in _48){dojo.config[x]=_48[x];}}break;}}}d.baseUrl=d.config.baseUrl;var n=navigator;var dua=n.userAgent,dav=n.appVersion,tv=parseFloat(dav);if(dua.indexOf("Opera")>=0){d.isOpera=tv;}if(dua.indexOf("AdobeAIR")>=0){d.isAIR=1;}d.isKhtml=(dav.indexOf("Konqueror")>=0)?tv:0;d.isWebKit=parseFloat(dua.split("WebKit/")[1])||undefined;d.isChrome=parseFloat(dua.split("Chrome/")[1])||undefined;d.isMac=dav.indexOf("Macintosh")>=0;var _49=Math.max(dav.indexOf("WebKit"),dav.indexOf("Safari"),0);if(_49&&!dojo.isChrome){d.isSafari=parseFloat(dav.split("Version/")[1]);if(!d.isSafari||parseFloat(dav.substr(_49+7))<=419.3){d.isSafari=2;}}if(dua.indexOf("Gecko")>=0&&!d.isKhtml&&!d.isWebKit){d.isMozilla=d.isMoz=tv;}if(d.isMoz){d.isFF=parseFloat(dua.split("Firefox/")[1]||dua.split("Minefield/")[1])||undefined;}if(document.all&&!d.isOpera){d.isIE=parseFloat(dav.split("MSIE ")[1])||undefined;var _4a=document.documentMode;if(_4a&&_4a!=5&&Math.floor(d.isIE)!=_4a){d.isIE=_4a;}}if(dojo.isIE&&window.location.protocol==="file:"){dojo.config.ieForceActiveXXhr=true;}d.isQuirks=document.compatMode=="BackCompat";d.locale=dojo.config.locale||(d.isIE?n.userLanguage:n.language).toLowerCase();d._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];d._xhrObj=function(){var _4b,_4c;if(!dojo.isIE||!dojo.config.ieForceActiveXXhr){try{_4b=new XMLHttpRequest();}catch(e){}}if(!_4b){for(var i=0;i<3;++i){var _4d=d._XMLHTTP_PROGIDS[i];try{_4b=new ActiveXObject(_4d);}catch(e){_4c=e;}if(_4b){d._XMLHTTP_PROGIDS=[_4d];break;}}}if(!_4b){throw new Error("XMLHTTP not available: "+_4c);}return _4b;};d._isDocumentOk=function(_4e){var _4f=_4e.status||0,lp=location.protocol;return (_4f>=200&&_4f<300)||_4f==304||_4f==1223||(!_4f&&(lp=="file:"||lp=="chrome:"||lp=="app:"));};var _50=window.location+"";var _51=document.getElementsByTagName("base");var _52=(_51&&_51.length>0);d._getText=function(uri,_53){var _54=d._xhrObj();if(!_52&&dojo._Url){uri=(new dojo._Url(_50,uri)).toString();}if(d.config.cacheBust){uri+="";uri+=(uri.indexOf("?")==-1?"?":"&")+String(d.config.cacheBust).replace(/\W+/g,"");}_54.open("GET",uri,false);try{_54.send(null);if(!d._isDocumentOk(_54)){var err=Error("Unable to load "+uri+" status:"+_54.status);err.status=_54.status;err.responseText=_54.responseText;throw err;}}catch(e){if(_53){return null;}throw e;}return _54.responseText;};var _55=window;var _56=function(_57,fp){var _58=_55.attachEvent||_55.addEventListener;_57=_55.attachEvent?_57:_57.substring(2);_58(_57,function(){fp.apply(_55,arguments);},false);};d._windowUnloaders=[];d.windowUnloaded=function(){var mll=d._windowUnloaders;while(mll.length){(mll.pop())();}};var _59=0;d.addOnWindowUnload=function(obj,_5a){d._onto(d._windowUnloaders,obj,_5a);if(!_59){_59=1;_56("onunload",d.windowUnloaded);}};var _5b=0;d.addOnUnload=function(obj,_5c){d._onto(d._unloaders,obj,_5c);if(!_5b){_5b=1;_56("onbeforeunload",dojo.unloaded);}};})();dojo._initFired=false;dojo._loadInit=function(e){if(!dojo._initFired){dojo._initFired=true;if(!dojo.config.afterOnLoad&&window.detachEvent){window.detachEvent("onload",dojo._loadInit);}if(dojo._inFlightCount==0){dojo._modulesLoaded();}}};if(!dojo.config.afterOnLoad){if(document.addEventListener){document.addEventListener("DOMContentLoaded",dojo._loadInit,false);window.addEventListener("load",dojo._loadInit,false);}else{if(window.attachEvent){window.attachEvent("onload",dojo._loadInit);}}}if(dojo.isIE){if(!dojo.config.afterOnLoad&&!dojo.config.skipIeDomLoaded){document.write("<scr"+"ipt defer src=\"//:\" "+"onreadystatechange=\"if(this.readyState=='complete'){"+dojo._scopeName+"._loadInit();}\">"+"</scr"+"ipt>");}try{document.namespaces.add("v","urn:schemas-microsoft-com:vml");var _5d=["*","group","roundrect","oval","shape","rect","imagedata"],i=0,l=1,s=document.createStyleSheet();if(dojo.isIE>=8){i=1;l=_5d.length;}for(;i<l;++i){s.addRule("v\\:"+_5d[i],"behavior:url(#default#VML); display:inline-block");}}catch(e){}}}(function(){var mp=dojo.config["modulePaths"];if(mp){for(var _5e in mp){dojo.registerModulePath(_5e,mp[_5e]);}}})();if(dojo.config.isDebug){dojo.require("dojo._firebug.firebug");}if(dojo.config.debugAtAllCosts){dojo.config.useXDomain=true;dojo.require("dojo._base._loader.loader_xd");dojo.require("dojo._base._loader.loader_debug");dojo.require("dojo.i18n");}if(!dojo._hasResource["dojo._base.lang"]){dojo._hasResource["dojo._base.lang"]=true;dojo.provide("dojo._base.lang");(function(){var d=dojo,_5f=Object.prototype.toString;dojo.isString=function(it){return (typeof it=="string"||it instanceof String);};dojo.isArray=function(it){return it&&(it instanceof Array||typeof it=="array");};dojo.isFunction=function(it){return _5f.call(it)==="[object Function]";};dojo.isObject=function(it){return it!==undefined&&(it===null||typeof it=="object"||d.isArray(it)||d.isFunction(it));};dojo.isArrayLike=function(it){return it&&it!==undefined&&!d.isString(it)&&!d.isFunction(it)&&!(it.tagName&&it.tagName.toLowerCase()=="form")&&(d.isArray(it)||isFinite(it.length));};dojo.isAlien=function(it){return it&&!d.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));};dojo.extend=function(_60,_61){for(var i=1,l=arguments.length;i<l;i++){d._mixin(_60.prototype,arguments[i]);}return _60;};dojo._hitchArgs=function(_62,_63){var pre=d._toArray(arguments,2);var _64=d.isString(_63);return function(){var _65=d._toArray(arguments);var f=_64?(_62||d.global)[_63]:_63;return f&&f.apply(_62||this,pre.concat(_65));};};dojo.hitch=function(_66,_67){if(arguments.length>2){return d._hitchArgs.apply(d,arguments);}if(!_67){_67=_66;_66=null;}if(d.isString(_67)){_66=_66||d.global;if(!_66[_67]){throw (["dojo.hitch: scope[\"",_67,"\"] is null (scope=\"",_66,"\")"].join(""));}return function(){return _66[_67].apply(_66,arguments||[]);};}return !_66?_67:function(){return _67.apply(_66,arguments||[]);};};dojo.delegate=dojo._delegate=(function(){function TMP(){};return function(obj,_68){TMP.prototype=obj;var tmp=new TMP();TMP.prototype=null;if(_68){d._mixin(tmp,_68);}return tmp;};})();var _69=function(obj,_6a,_6b){return (_6b||[]).concat(Array.prototype.slice.call(obj,_6a||0));};var _6c=function(obj,_6d,_6e){var arr=_6e||[];for(var x=_6d||0;x<obj.length;x++){arr.push(obj[x]);}return arr;};dojo._toArray=d.isIE?function(obj){return ((obj.item)?_6c:_69).apply(this,arguments);}:_69;dojo.partial=function(_6f){var arr=[null];return d.hitch.apply(d,arr.concat(d._toArray(arguments)));};var _70=d._extraNames,_71=_70.length,_72={};dojo.clone=function(o){if(!o||typeof o!="object"||d.isFunction(o)){return o;}if(o.nodeType&&"cloneNode" in o){return o.cloneNode(true);}if(o instanceof Date){return new Date(o.getTime());}var r,i,l,s,_73;if(d.isArray(o)){r=[];for(i=0,l=o.length;i<l;++i){if(i in o){r.push(d.clone(o[i]));}}}else{r=o.constructor?new o.constructor():{};}for(_73 in o){s=o[_73];if(!(_73 in r)||(r[_73]!==s&&(!(_73 in _72)||_72[_73]!==s))){r[_73]=d.clone(s);}}if(_71){for(i=0;i<_71;++i){_73=_70[i];s=o[_73];if(!(_73 in r)||(r[_73]!==s&&(!(_73 in _72)||_72[_73]!==s))){r[_73]=s;}}}return r;};dojo.trim=String.prototype.trim?function(str){return str.trim();}:function(str){return str.replace(/^\s\s*/,"").replace(/\s\s*$/,"");};var _74=/\{([^\}]+)\}/g;dojo.replace=function(_75,map,_76){return _75.replace(_76||_74,d.isFunction(map)?map:function(_77,k){return d.getObject(k,false,map);});};})();}if(!dojo._hasResource["dojo._base.array"]){dojo._hasResource["dojo._base.array"]=true;dojo.provide("dojo._base.array");(function(){var _78=function(arr,obj,cb){return [(typeof arr=="string")?arr.split(""):arr,obj||dojo.global,(typeof cb=="string")?new Function("item","index","array",cb):cb];};var _79=function(_7a,arr,_7b,_7c){var _7d=_78(arr,_7c,_7b);arr=_7d[0];for(var i=0,l=arr.length;i<l;++i){var _7e=!!_7d[2].call(_7d[1],arr[i],i,arr);if(_7a^_7e){return _7e;}}return _7a;};dojo.mixin(dojo,{indexOf:function(_7f,_80,_81,_82){var _83=1,end=_7f.length||0,i=0;if(_82){i=end-1;_83=end=-1;}if(_81!=undefined){i=_81;}if((_82&&i>end)||i<end){for(;i!=end;i+=_83){if(_7f[i]==_80){return i;}}}return -1;},lastIndexOf:function(_84,_85,_86){return dojo.indexOf(_84,_85,_86,true);},forEach:function(arr,_87,_88){if(!arr||!arr.length){return;}var _89=_78(arr,_88,_87);arr=_89[0];for(var i=0,l=arr.length;i<l;++i){_89[2].call(_89[1],arr[i],i,arr);}},every:function(arr,_8a,_8b){return _79(true,arr,_8a,_8b);},some:function(arr,_8c,_8d){return _79(false,arr,_8c,_8d);},map:function(arr,_8e,_8f){var _90=_78(arr,_8f,_8e);arr=_90[0];var _91=(arguments[3]?(new arguments[3]()):[]);for(var i=0,l=arr.length;i<l;++i){_91.push(_90[2].call(_90[1],arr[i],i,arr));}return _91;},filter:function(arr,_92,_93){var _94=_78(arr,_93,_92);arr=_94[0];var _95=[];for(var i=0,l=arr.length;i<l;++i){if(_94[2].call(_94[1],arr[i],i,arr)){_95.push(arr[i]);}}return _95;}});})();}if(!dojo._hasResource["dojo._base.declare"]){dojo._hasResource["dojo._base.declare"]=true;dojo.provide("dojo._base.declare");(function(){var d=dojo,mix=d._mixin,op=Object.prototype,_96=op.toString,_97=new Function,_98=0,_99="constructor";function err(msg){throw new Error("declare: "+msg);};function _9a(_9b){var _9c=[],_9d=[{cls:0,refs:[]}],_9e={},_9f=1,l=_9b.length,i=0,j,lin,_a0,top,_a1,rec,_a2,_a3;for(;i<l;++i){_a0=_9b[i];if(!_a0){err("mixin #"+i+" is null");}lin=_a0._meta?_a0._meta.bases:[_a0];top=0;for(j=lin.length-1;j>=0;--j){_a1=lin[j].prototype;if(!_a1.hasOwnProperty("declaredClass")){_a1.declaredClass="uniqName_"+(_98++);}_a2=_a1.declaredClass;if(!_9e.hasOwnProperty(_a2)){_9e[_a2]={count:0,refs:[],cls:lin[j]};++_9f;}rec=_9e[_a2];if(top&&top!==rec){rec.refs.push(top);++top.count;}top=rec;}++top.count;_9d[0].refs.push(top);}while(_9d.length){top=_9d.pop();_9c.push(top.cls);--_9f;while(_a3=top.refs,_a3.length==1){top=_a3[0];if(!top||--top.count){top=0;break;}_9c.push(top.cls);--_9f;}if(top){for(i=0,l=_a3.length;i<l;++i){top=_a3[i];if(!--top.count){_9d.push(top);}}}}if(_9f){err("can't build consistent linearization");}_a0=_9b[0];_9c[0]=_a0?_a0._meta&&_a0===_9c[_9c.length-_a0._meta.bases.length]?_a0._meta.bases.length:1:0;return _9c;};function _a4(_a5,a,f){var _a6,_a7,_a8,_a9,_aa,_ab,_ac,opf,pos,_ad=this._inherited=this._inherited||{};if(typeof _a5=="string"){_a6=_a5;_a5=a;a=f;}f=0;_a9=_a5.callee;_a6=_a6||_a9.nom;if(!_a6){err("can't deduce a name to call inherited()");}_aa=this.constructor._meta;_a8=_aa.bases;pos=_ad.p;if(_a6!=_99){if(_ad.c!==_a9){pos=0;_ab=_a8[0];_aa=_ab._meta;if(_aa.hidden[_a6]!==_a9){_a7=_aa.chains;if(_a7&&typeof _a7[_a6]=="string"){err("calling chained method with inherited: "+_a6);}do{_aa=_ab._meta;_ac=_ab.prototype;if(_aa&&(_ac[_a6]===_a9&&_ac.hasOwnProperty(_a6)||_aa.hidden[_a6]===_a9)){break;}}while(_ab=_a8[++pos]);pos=_ab?pos:-1;}}_ab=_a8[++pos];if(_ab){_ac=_ab.prototype;if(_ab._meta&&_ac.hasOwnProperty(_a6)){f=_ac[_a6];}else{opf=op[_a6];do{_ac=_ab.prototype;f=_ac[_a6];if(f&&(_ab._meta?_ac.hasOwnProperty(_a6):f!==opf)){break;}}while(_ab=_a8[++pos]);}}f=_ab&&f||op[_a6];}else{if(_ad.c!==_a9){pos=0;_aa=_a8[0]._meta;if(_aa&&_aa.ctor!==_a9){_a7=_aa.chains;if(!_a7||_a7.constructor!=="manual"){err("calling chained constructor with inherited");}while(_ab=_a8[++pos]){_aa=_ab._meta;if(_aa&&_aa.ctor===_a9){break;}}pos=_ab?pos:-1;}}while(_ab=_a8[++pos]){_aa=_ab._meta;f=_aa?_aa.ctor:_ab;if(f){break;}}f=_ab&&f;}_ad.c=f;_ad.p=pos;if(f){return a===true?f:f.apply(this,a||_a5);}};function _ae(_af,_b0){if(typeof _af=="string"){return this.inherited(_af,_b0,true);}return this.inherited(_af,true);};function _b1(cls){var _b2=this.constructor._meta.bases;for(var i=0,l=_b2.length;i<l;++i){if(_b2[i]===cls){return true;}}return this instanceof cls;};function _b3(_b4,_b5){var _b6,t,i=0,l=d._extraNames.length;for(_b6 in _b5){t=_b5[_b6];if((t!==op[_b6]||!(_b6 in op))&&_b6!=_99){if(_96.call(t)=="[object Function]"){t.nom=_b6;}_b4[_b6]=t;}}for(;i<l;++i){_b6=d._extraNames[i];t=_b5[_b6];if((t!==op[_b6]||!(_b6 in op))&&_b6!=_99){if(_96.call(t)=="[object Function]"){t.nom=_b6;}_b4[_b6]=t;}}return _b4;};function _b7(_b8){_b3(this.prototype,_b8);return this;};function _b9(_ba,_bb){return function(){var a=arguments,_bc=a,a0=a[0],f,i,m,l=_ba.length,_bd;if(_bb&&(a0&&a0.preamble||this.preamble)){_bd=new Array(_ba.length);_bd[0]=a;for(i=0;;){a0=a[0];if(a0){f=a0.preamble;if(f){a=f.apply(this,a)||a;}}f=_ba[i].prototype;f=f.hasOwnProperty("preamble")&&f.preamble;if(f){a=f.apply(this,a)||a;}if(++i==l){break;}_bd[i]=a;}}for(i=l-1;i>=0;--i){f=_ba[i];m=f._meta;f=m?m.ctor:f;if(f){f.apply(this,_bd?_bd[i]:a);}}f=this.postscript;if(f){f.apply(this,_bc);}};};function _be(_bf,_c0){return function(){var a=arguments,t=a,a0=a[0],f;if(_c0){if(a0){f=a0.preamble;if(f){t=f.apply(this,t)||t;}}f=this.preamble;if(f){f.apply(this,t);}}if(_bf){_bf.apply(this,a);}f=this.postscript;if(f){f.apply(this,a);}};};function _c1(_c2){return function(){var a=arguments,i=0,f;for(;f=_c2[i];++i){m=f._meta;f=m?m.ctor:f;if(f){f.apply(this,a);break;}}f=this.postscript;if(f){f.apply(this,a);}};};function _c3(_c4,_c5,_c6){return function(){var b,m,f,i=0,_c7=1;if(_c6){i=_c5.length-1;_c7=-1;}for(;b=_c5[i];i+=_c7){m=b._meta;f=(m?m.hidden:b.prototype)[_c4];if(f){f.apply(this,arguments);}}};};d.declare=function(_c8,_c9,_ca){var _cb,i,t,_cc,_cd,_ce,_cf,_d0=1,_d1=_c9;if(typeof _c8!="string"){_ca=_c9;_c9=_c8;_c8="";}_ca=_ca||{};if(_96.call(_c9)=="[object Array]"){_ce=_9a(_c9);t=_ce[0];_d0=_ce.length-t;_c9=_ce[_d0];}else{_ce=[0];if(_c9){t=_c9._meta;_ce=_ce.concat(t?t.bases:_c9);}}if(_c9){for(i=_d0-1;;--i){_97.prototype=_c9.prototype;_cb=new _97;if(!i){break;}t=_ce[i];mix(_cb,t._meta?t._meta.hidden:t.prototype);_cc=new Function;_cc.superclass=_c9;_cc.prototype=_cb;_c9=_cb.constructor=_cc;}}else{_cb={};}_b3(_cb,_ca);t=_ca.constructor;if(t!==op.constructor){t.nom=_99;_cb.constructor=t;}_97.prototype=0;for(i=_d0-1;i;--i){t=_ce[i]._meta;if(t&&t.chains){_cf=mix(_cf||{},t.chains);}}if(_cb["-chains-"]){_cf=mix(_cf||{},_cb["-chains-"]);}t=!_cf||!_cf.hasOwnProperty(_99);_ce[0]=_cc=(_cf&&_cf.constructor==="manual")?_c1(_ce):(_ce.length==1?_be(_ca.constructor,t):_b9(_ce,t));_cc._meta={bases:_ce,hidden:_ca,chains:_cf,parents:_d1,ctor:_ca.constructor};_cc.superclass=_c9&&_c9.prototype;_cc.extend=_b7;_cc.prototype=_cb;_cb.constructor=_cc;_cb.getInherited=_ae;_cb.inherited=_a4;_cb.isInstanceOf=_b1;if(_c8){_cb.declaredClass=_c8;d.setObject(_c8,_cc);}if(_cf){for(_cd in _cf){if(_cb[_cd]&&typeof _cf[_cd]=="string"&&_cd!=_99){t=_cb[_cd]=_c3(_cd,_ce,_cf[_cd]==="after");t.nom=_cd;}}}return _cc;};d.safeMixin=_b3;})();}if(!dojo._hasResource["dojo._base.connect"]){dojo._hasResource["dojo._base.connect"]=true;dojo.provide("dojo._base.connect");dojo._listener={getDispatcher:function(){return function(){var ap=Array.prototype,c=arguments.callee,ls=c._listeners,t=c.target;var r=t&&t.apply(this,arguments);var lls;lls=[].concat(ls);for(var i in lls){if(!(i in ap)){lls[i].apply(this,arguments);}}return r;};},add:function(_d2,_d3,_d4){_d2=_d2||dojo.global;var f=_d2[_d3];if(!f||!f._listeners){var d=dojo._listener.getDispatcher();d.target=f;d._listeners=[];f=_d2[_d3]=d;}return f._listeners.push(_d4);},remove:function(_d5,_d6,_d7){var f=(_d5||dojo.global)[_d6];if(f&&f._listeners&&_d7--){delete f._listeners[_d7];}}};dojo.connect=function(obj,_d8,_d9,_da,_db){var a=arguments,_dc=[],i=0;_dc.push(dojo.isString(a[0])?null:a[i++],a[i++]);var a1=a[i+1];_dc.push(dojo.isString(a1)||dojo.isFunction(a1)?a[i++]:null,a[i++]);for(var l=a.length;i<l;i++){_dc.push(a[i]);}return dojo._connect.apply(this,_dc);};dojo._connect=function(obj,_dd,_de,_df){var l=dojo._listener,h=l.add(obj,_dd,dojo.hitch(_de,_df));return [obj,_dd,h,l];};dojo.disconnect=function(_e0){if(_e0&&_e0[0]!==undefined){dojo._disconnect.apply(this,_e0);delete _e0[0];}};dojo._disconnect=function(obj,_e1,_e2,_e3){_e3.remove(obj,_e1,_e2);};dojo._topics={};dojo.subscribe=function(_e4,_e5,_e6){return [_e4,dojo._listener.add(dojo._topics,_e4,dojo.hitch(_e5,_e6))];};dojo.unsubscribe=function(_e7){if(_e7){dojo._listener.remove(dojo._topics,_e7[0],_e7[1]);}};dojo.publish=function(_e8,_e9){var f=dojo._topics[_e8];if(f){f.apply(this,_e9||[]);}};dojo.connectPublisher=function(_ea,obj,_eb){var pf=function(){dojo.publish(_ea,arguments);};return (_eb)?dojo.connect(obj,_eb,pf):dojo.connect(obj,pf);};}if(!dojo._hasResource["dojo._base.Deferred"]){dojo._hasResource["dojo._base.Deferred"]=true;dojo.provide("dojo._base.Deferred");dojo.Deferred=function(_ec){this.chain=[];this.id=this._nextId();this.fired=-1;this.paused=0;this.results=[null,null];this.canceller=_ec;this.silentlyCancelled=false;this.isFiring=false;};dojo.extend(dojo.Deferred,{_nextId:(function(){var n=1;return function(){return n++;};})(),cancel:function(){var err;if(this.fired==-1){if(this.canceller){err=this.canceller(this);}else{this.silentlyCancelled=true;}if(this.fired==-1){if(!(err instanceof Error)){var res=err;var msg="Deferred Cancelled";if(err&&err.toString){msg+=": "+err.toString();}err=new Error(msg);err.dojoType="cancel";err.cancelResult=res;}this.errback(err);}}else{if((this.fired==0)&&(this.results[0] instanceof dojo.Deferred)){this.results[0].cancel();}}},_resback:function(res){this.fired=((res instanceof Error)?1:0);this.results[this.fired]=res;this._fire();},_check:function(){if(this.fired!=-1){if(!this.silentlyCancelled){throw new Error("already called!");}this.silentlyCancelled=false;return;}},callback:function(res){this._check();this._resback(res);},errback:function(res){this._check();if(!(res instanceof Error)){res=new Error(res);}this._resback(res);},addBoth:function(cb,_ed){var _ee=dojo.hitch.apply(dojo,arguments);return this.addCallbacks(_ee,_ee);},addCallback:function(cb,_ef){return this.addCallbacks(dojo.hitch.apply(dojo,arguments));},addErrback:function(cb,_f0){return this.addCallbacks(null,dojo.hitch.apply(dojo,arguments));},addCallbacks:function(cb,eb){this.chain.push([cb,eb]);if(this.fired>=0&&!this.isFiring){this._fire();}return this;},_fire:function(){this.isFiring=true;var _f1=this.chain;var _f2=this.fired;var res=this.results[_f2];var _f3=this;var cb=null;while((_f1.length>0)&&(this.paused==0)){var f=_f1.shift()[_f2];if(!f){continue;}var _f4=function(){var ret=f(res);if(typeof ret!="undefined"){res=ret;}_f2=((res instanceof Error)?1:0);if(res instanceof dojo.Deferred){cb=function(res){_f3._resback(res);_f3.paused--;if((_f3.paused==0)&&(_f3.fired>=0)){_f3._fire();}};this.paused++;}};if(dojo.config.debugAtAllCosts){_f4.call(this);}else{try{_f4.call(this);}catch(err){_f2=1;res=err;}}}this.fired=_f2;this.results[_f2]=res;this.isFiring=false;if((cb)&&(this.paused)){res.addBoth(cb);}}});}if(!dojo._hasResource["dojo._base.json"]){dojo._hasResource["dojo._base.json"]=true;dojo.provide("dojo._base.json");dojo.fromJson=function(_f5){return eval("("+_f5+")");};dojo._escapeString=function(str){return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");};dojo.toJsonIndentStr="\t";dojo.toJson=function(it,_f6,_f7){if(it===undefined){return "undefined";}var _f8=typeof it;if(_f8=="number"||_f8=="boolean"){return it+"";}if(it===null){return "null";}if(dojo.isString(it)){return dojo._escapeString(it);}var _f9=arguments.callee;var _fa;_f7=_f7||"";var _fb=_f6?_f7+dojo.toJsonIndentStr:"";var tf=it.__json__||it.json;if(dojo.isFunction(tf)){_fa=tf.call(it);if(it!==_fa){return _f9(_fa,_f6,_fb);}}if(it.nodeType&&it.cloneNode){throw new Error("Can't serialize DOM nodes");}var sep=_f6?" ":"";var _fc=_f6?"\n":"";if(dojo.isArray(it)){var res=dojo.map(it,function(obj){var val=_f9(obj,_f6,_fb);if(typeof val!="string"){val="undefined";}return _fc+_fb+val;});return "["+res.join(","+sep)+_fc+_f7+"]";}if(_f8=="function"){return null;}var _fd=[],key;for(key in it){var _fe,val;if(typeof key=="number"){_fe="\""+key+"\"";}else{if(typeof key=="string"){_fe=dojo._escapeString(key);}else{continue;}}val=_f9(it[key],_f6,_fb);if(typeof val!="string"){continue;}_fd.push(_fc+_fb+_fe+":"+sep+val);}return "{"+_fd.join(","+sep)+_fc+_f7+"}";};}if(!dojo._hasResource["dojo._base.Color"]){dojo._hasResource["dojo._base.Color"]=true;dojo.provide("dojo._base.Color");(function(){var d=dojo;dojo.Color=function(_ff){if(_ff){this.setColor(_ff);}};dojo.Color.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:d.config.transparentColor||[255,255,255]};dojo.extend(dojo.Color,{r:255,g:255,b:255,a:1,_set:function(r,g,b,a){var t=this;t.r=r;t.g=g;t.b=b;t.a=a;},setColor:function(_100){if(d.isString(_100)){d.colorFromString(_100,this);}else{if(d.isArray(_100)){d.colorFromArray(_100,this);}else{this._set(_100.r,_100.g,_100.b,_100.a);if(!(_100 instanceof d.Color)){this.sanitize();}}}return this;},sanitize:function(){return this;},toRgb:function(){var t=this;return [t.r,t.g,t.b];},toRgba:function(){var t=this;return [t.r,t.g,t.b,t.a];},toHex:function(){var arr=d.map(["r","g","b"],function(x){var s=this[x].toString(16);return s.length<2?"0"+s:s;},this);return "#"+arr.join("");},toCss:function(_101){var t=this,rgb=t.r+", "+t.g+", "+t.b;return (_101?"rgba("+rgb+", "+t.a:"rgb("+rgb)+")";},toString:function(){return this.toCss(true);}});dojo.blendColors=function(_102,end,_103,obj){var t=obj||new d.Color();d.forEach(["r","g","b","a"],function(x){t[x]=_102[x]+(end[x]-_102[x])*_103;if(x!="a"){t[x]=Math.round(t[x]);}});return t.sanitize();};dojo.colorFromRgb=function(_104,obj){var m=_104.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return m&&dojo.colorFromArray(m[1].split(/\s*,\s*/),obj);};dojo.colorFromHex=function(_105,obj){var t=obj||new d.Color(),bits=(_105.length==4)?4:8,mask=(1<<bits)-1;_105=Number("0x"+_105.substr(1));if(isNaN(_105)){return null;}d.forEach(["b","g","r"],function(x){var c=_105&mask;_105>>=bits;t[x]=bits==4?17*c:c;});t.a=1;return t;};dojo.colorFromArray=function(a,obj){var t=obj||new d.Color();t._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3]));if(isNaN(t.a)){t.a=1;}return t.sanitize();};dojo.colorFromString=function(str,obj){var a=d.Color.named[str];return a&&d.colorFromArray(a,obj)||d.colorFromRgb(str,obj)||d.colorFromHex(str,obj);};})();}if(!dojo._hasResource["dojo._base"]){dojo._hasResource["dojo._base"]=true;dojo.provide("dojo._base");}if(!dojo._hasResource["dojo._base.window"]){dojo._hasResource["dojo._base.window"]=true;dojo.provide("dojo._base.window");dojo.doc=window["document"]||null;dojo.body=function(){return dojo.doc.body||dojo.doc.getElementsByTagName("body")[0];};dojo.setContext=function(_106,_107){dojo.global=_106;dojo.doc=_107;};dojo.withGlobal=function(_108,_109,_10a,_10b){var _10c=dojo.global;try{dojo.global=_108;return dojo.withDoc.call(null,_108.document,_109,_10a,_10b);}finally{dojo.global=_10c;}};dojo.withDoc=function(_10d,_10e,_10f,_110){var _111=dojo.doc,_112=dojo._bodyLtr,oldQ=dojo.isQuirks;try{dojo.doc=_10d;delete dojo._bodyLtr;dojo.isQuirks=dojo.doc.compatMode=="BackCompat";if(_10f&&typeof _10e=="string"){_10e=_10f[_10e];}return _10e.apply(_10f,_110||[]);}finally{dojo.doc=_111;delete dojo._bodyLtr;if(_112!==undefined){dojo._bodyLtr=_112;}dojo.isQuirks=oldQ;}};}if(!dojo._hasResource["dojo._base.event"]){dojo._hasResource["dojo._base.event"]=true;dojo.provide("dojo._base.event");(function(){var del=(dojo._event_listener={add:function(node,name,fp){if(!node){return;}name=del._normalizeEventName(name);fp=del._fixCallback(name,fp);var _113=name;if(!dojo.isIE&&(name=="mouseenter"||name=="mouseleave")){var ofp=fp;name=(name=="mouseenter")?"mouseover":"mouseout";fp=function(e){if(!dojo.isDescendant(e.relatedTarget,node)){return ofp.call(this,e);}};}node.addEventListener(name,fp,false);return fp;},remove:function(node,_114,_115){if(node){_114=del._normalizeEventName(_114);if(!dojo.isIE&&(_114=="mouseenter"||_114=="mouseleave")){_114=(_114=="mouseenter")?"mouseover":"mouseout";}node.removeEventListener(_114,_115,false);}},_normalizeEventName:function(name){return name.slice(0,2)=="on"?name.slice(2):name;},_fixCallback:function(name,fp){return name!="keypress"?fp:function(e){return fp.call(this,del._fixEvent(e,this));};},_fixEvent:function(evt,_116){switch(evt.type){case "keypress":del._setKeyChar(evt);break;}return evt;},_setKeyChar:function(evt){evt.keyChar=evt.charCode?String.fromCharCode(evt.charCode):"";evt.charOrCode=evt.keyChar||evt.keyCode;},_punctMap:{106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39}});dojo.fixEvent=function(evt,_117){return del._fixEvent(evt,_117);};dojo.stopEvent=function(evt){evt.preventDefault();evt.stopPropagation();};var _118=dojo._listener;dojo._connect=function(obj,_119,_11a,_11b,_11c){var _11d=obj&&(obj.nodeType||obj.attachEvent||obj.addEventListener);var lid=_11d?(_11c?2:1):0,l=[dojo._listener,del,_118][lid];var h=l.add(obj,_119,dojo.hitch(_11a,_11b));return [obj,_119,h,lid];};dojo._disconnect=function(obj,_11e,_11f,_120){([dojo._listener,del,_118][_120]).remove(obj,_11e,_11f);};dojo.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:dojo.isSafari?91:224,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145,copyKey:dojo.isMac&&!dojo.isAIR?(dojo.isSafari?91:224):17};var _121=dojo.isMac?"metaKey":"ctrlKey";dojo.isCopyKey=function(e){return e[_121];};if(dojo.isIE){dojo.mouseButtons={LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(e,_122){return e.button&_122;},isLeft:function(e){return e.button&1;},isMiddle:function(e){return e.button&4;},isRight:function(e){return e.button&2;}};}else{dojo.mouseButtons={LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(e,_123){return e.button==_123;},isLeft:function(e){return e.button==0;},isMiddle:function(e){return e.button==1;},isRight:function(e){return e.button==2;}};}if(dojo.isIE){var _124=function(e,code){try{return (e.keyCode=code);}catch(e){return 0;}};var iel=dojo._listener;var _125=(dojo._ieListenersName="_"+dojo._scopeName+"_listeners");if(!dojo.config._allow_leaks){_118=iel=dojo._ie_listener={handlers:[],add:function(_126,_127,_128){_126=_126||dojo.global;var f=_126[_127];if(!f||!f[_125]){var d=dojo._getIeDispatcher();d.target=f&&(ieh.push(f)-1);d[_125]=[];f=_126[_127]=d;}return f[_125].push(ieh.push(_128)-1);},remove:function(_129,_12a,_12b){var f=(_129||dojo.global)[_12a],l=f&&f[_125];if(f&&l&&_12b--){delete ieh[l[_12b]];delete l[_12b];}}};var ieh=iel.handlers;}dojo.mixin(del,{add:function(node,_12c,fp){if(!node){return;}_12c=del._normalizeEventName(_12c);if(_12c=="onkeypress"){var kd=node.onkeydown;if(!kd||!kd[_125]||!kd._stealthKeydownHandle){var h=del.add(node,"onkeydown",del._stealthKeyDown);kd=node.onkeydown;kd._stealthKeydownHandle=h;kd._stealthKeydownRefs=1;}else{kd._stealthKeydownRefs++;}}return iel.add(node,_12c,del._fixCallback(fp));},remove:function(node,_12d,_12e){_12d=del._normalizeEventName(_12d);iel.remove(node,_12d,_12e);if(_12d=="onkeypress"){var kd=node.onkeydown;if(--kd._stealthKeydownRefs<=0){iel.remove(node,"onkeydown",kd._stealthKeydownHandle);delete kd._stealthKeydownHandle;}}},_normalizeEventName:function(_12f){return _12f.slice(0,2)!="on"?"on"+_12f:_12f;},_nop:function(){},_fixEvent:function(evt,_130){if(!evt){var w=_130&&(_130.ownerDocument||_130.document||_130).parentWindow||window;evt=w.event;}if(!evt){return (evt);}evt.target=evt.srcElement;evt.currentTarget=(_130||evt.srcElement);evt.layerX=evt.offsetX;evt.layerY=evt.offsetY;var se=evt.srcElement,doc=(se&&se.ownerDocument)||document;var _131=((dojo.isIE<6)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;var _132=dojo._getIeDocumentElementOffset();evt.pageX=evt.clientX+dojo._fixIeBiDiScrollLeft(_131.scrollLeft||0)-_132.x;evt.pageY=evt.clientY+(_131.scrollTop||0)-_132.y;if(evt.type=="mouseover"){evt.relatedTarget=evt.fromElement;}if(evt.type=="mouseout"){evt.relatedTarget=evt.toElement;}evt.stopPropagation=del._stopPropagation;evt.preventDefault=del._preventDefault;return del._fixKeys(evt);},_fixKeys:function(evt){switch(evt.type){case "keypress":var c=("charCode" in evt?evt.charCode:evt.keyCode);if(c==10){c=0;evt.keyCode=13;}else{if(c==13||c==27){c=0;}else{if(c==3){c=99;}}}evt.charCode=c;del._setKeyChar(evt);break;}return evt;},_stealthKeyDown:function(evt){var kp=evt.currentTarget.onkeypress;if(!kp||!kp[_125]){return;}var k=evt.keyCode;var _133=k!=13&&k!=32&&k!=27&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(_133||evt.ctrlKey){var c=_133?0:k;if(evt.ctrlKey){if(k==3||k==13){return;}else{if(c>95&&c<106){c-=48;}else{if((!evt.shiftKey)&&(c>=65&&c<=90)){c+=32;}else{c=del._punctMap[c]||c;}}}}var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});kp.call(evt.currentTarget,faux);evt.cancelBubble=faux.cancelBubble;evt.returnValue=faux.returnValue;_124(evt,faux.keyCode);}},_stopPropagation:function(){this.cancelBubble=true;},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;if(this.ctrlKey){_124(this,0);}this.returnValue=false;}});dojo.stopEvent=function(evt){evt=evt||window.event;del._stopPropagation.call(evt);del._preventDefault.call(evt);};}del._synthesizeEvent=function(evt,_134){var faux=dojo.mixin({},evt,_134);del._setKeyChar(faux);faux.preventDefault=function(){evt.preventDefault();};faux.stopPropagation=function(){evt.stopPropagation();};return faux;};if(dojo.isOpera){dojo.mixin(del,{_fixEvent:function(evt,_135){switch(evt.type){case "keypress":var c=evt.which;if(c==3){c=99;}c=c<41&&!evt.shiftKey?0:c;if(evt.ctrlKey&&!evt.shiftKey&&c>=65&&c<=90){c+=32;}return del._synthesizeEvent(evt,{charCode:c});}return evt;}});}if(dojo.isWebKit){del._add=del.add;del._remove=del.remove;dojo.mixin(del,{add:function(node,_136,fp){if(!node){return;}var _137=del._add(node,_136,fp);if(del._normalizeEventName(_136)=="keypress"){_137._stealthKeyDownHandle=del._add(node,"keydown",function(evt){var k=evt.keyCode;var _138=k!=13&&k!=32&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(_138||evt.ctrlKey){var c=_138?0:k;if(evt.ctrlKey){if(k==3||k==13){return;}else{if(c>95&&c<106){c-=48;}else{if(!evt.shiftKey&&c>=65&&c<=90){c+=32;}else{c=del._punctMap[c]||c;}}}}var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});fp.call(evt.currentTarget,faux);}});}return _137;},remove:function(node,_139,_13a){if(node){if(_13a._stealthKeyDownHandle){del._remove(node,"keydown",_13a._stealthKeyDownHandle);}del._remove(node,_139,_13a);}},_fixEvent:function(evt,_13b){switch(evt.type){case "keypress":if(evt.faux){return evt;}var c=evt.charCode;c=c>=32?c:0;return del._synthesizeEvent(evt,{charCode:c,faux:true});}return evt;}});}})();if(dojo.isIE){dojo._ieDispatcher=function(args,_13c){var ap=Array.prototype,h=dojo._ie_listener.handlers,c=args.callee,ls=c[dojo._ieListenersName],t=h[c.target];var r=t&&t.apply(_13c,args);var lls=[].concat(ls);for(var i in lls){var f=h[lls[i]];if(!(i in ap)&&f){f.apply(_13c,args);}}return r;};dojo._getIeDispatcher=function(){return new Function(dojo._scopeName+"._ieDispatcher(arguments, this)");};dojo._event_listener._fixCallback=function(fp){var f=dojo._event_listener._fixEvent;return function(e){return fp.call(this,f(e,this));};};}}if(!dojo._hasResource["dojo._base.html"]){dojo._hasResource["dojo._base.html"]=true;dojo.provide("dojo._base.html");try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}if(dojo.isIE||dojo.isOpera){dojo.byId=function(id,doc){if(typeof id!="string"){return id;}var _13d=doc||dojo.doc,te=_13d.getElementById(id);if(te&&(te.attributes.id.value==id||te.id==id)){return te;}else{var eles=_13d.all[id];if(!eles||eles.nodeName){eles=[eles];}var i=0;while((te=eles[i++])){if((te.attributes&&te.attributes.id&&te.attributes.id.value==id)||te.id==id){return te;}}}};}else{dojo.byId=function(id,doc){return (typeof id=="string")?(doc||dojo.doc).getElementById(id):id;};}(function(){var d=dojo;var byId=d.byId;var _13e=null,_13f;d.addOnWindowUnload(function(){_13e=null;});dojo._destroyElement=dojo.destroy=function(node){node=byId(node);try{var doc=node.ownerDocument;if(!_13e||_13f!=doc){_13e=doc.createElement("div");_13f=doc;}_13e.appendChild(node.parentNode?node.parentNode.removeChild(node):node);_13e.innerHTML="";}catch(e){}};dojo.isDescendant=function(node,_140){try{node=byId(node);_140=byId(_140);while(node){if(node==_140){return true;}node=node.parentNode;}}catch(e){}return false;};dojo.setSelectable=function(node,_141){node=byId(node);if(d.isMozilla){node.style.MozUserSelect=_141?"":"none";}else{if(d.isKhtml||d.isWebKit){node.style.KhtmlUserSelect=_141?"auto":"none";}else{if(d.isIE){var v=(node.unselectable=_141?"":"on");d.query("*",node).forEach("item.unselectable = '"+v+"'");}}}};var _142=function(node,ref){var _143=ref.parentNode;if(_143){_143.insertBefore(node,ref);}};var _144=function(node,ref){var _145=ref.parentNode;if(_145){if(_145.lastChild==ref){_145.appendChild(node);}else{_145.insertBefore(node,ref.nextSibling);}}};dojo.place=function(node,_146,_147){_146=byId(_146);if(typeof node=="string"){node=node.charAt(0)=="<"?d._toDom(node,_146.ownerDocument):byId(node);}if(typeof _147=="number"){var cn=_146.childNodes;if(!cn.length||cn.length<=_147){_146.appendChild(node);}else{_142(node,cn[_147<0?0:_147]);}}else{switch(_147){case "before":_142(node,_146);break;case "after":_144(node,_146);break;case "replace":_146.parentNode.replaceChild(node,_146);break;case "only":d.empty(_146);_146.appendChild(node);break;case "first":if(_146.firstChild){_142(node,_146.firstChild);break;}default:_146.appendChild(node);}}return node;};dojo.boxModel="content-box";if(d.isIE){d.boxModel=document.compatMode=="BackCompat"?"border-box":"content-box";}var gcs;if(d.isWebKit){gcs=function(node){var s;if(node.nodeType==1){var dv=node.ownerDocument.defaultView;s=dv.getComputedStyle(node,null);if(!s&&node.style){node.style.display="";s=dv.getComputedStyle(node,null);}}return s||{};};}else{if(d.isIE){gcs=function(node){return node.nodeType==1?node.currentStyle:{};};}else{gcs=function(node){return node.nodeType==1?node.ownerDocument.defaultView.getComputedStyle(node,null):{};};}}dojo.getComputedStyle=gcs;if(!d.isIE){d._toPixelValue=function(_148,_149){return parseFloat(_149)||0;};}else{d._toPixelValue=function(_14a,_14b){if(!_14b){return 0;}if(_14b=="medium"){return 4;}if(_14b.slice&&_14b.slice(-2)=="px"){return parseFloat(_14b);}with(_14a){var _14c=style.left;var _14d=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=_14b;_14b=style.pixelLeft;}catch(e){_14b=0;}style.left=_14c;runtimeStyle.left=_14d;}return _14b;};}var px=d._toPixelValue;var astr="DXImageTransform.Microsoft.Alpha";var af=function(n,f){try{return n.filters.item(astr);}catch(e){return f?{}:null;}};dojo._getOpacity=d.isIE?function(node){try{return af(node).Opacity/100;}catch(e){return 1;}}:function(node){return gcs(node).opacity;};dojo._setOpacity=d.isIE?function(node,_14e){var ov=_14e*100;node.style.zoom=1;af(node,1).Enabled=!(_14e==1);if(!af(node)){node.style.filter+=" progid:"+astr+"(Opacity="+ov+")";}else{af(node,1).Opacity=ov;}if(node.nodeName.toLowerCase()=="tr"){d.query("> td",node).forEach(function(i){d._setOpacity(i,_14e);});}return _14e;}:function(node,_14f){return node.style.opacity=_14f;};var _150={left:true,top:true};var _151=/margin|padding|width|height|max|min|offset/;var _152=function(node,type,_153){type=type.toLowerCase();if(d.isIE){if(_153=="auto"){if(type=="height"){return node.offsetHeight;}if(type=="width"){return node.offsetWidth;}}if(type=="fontweight"){switch(_153){case 700:return "bold";case 400:default:return "normal";}}}if(!(type in _150)){_150[type]=_151.test(type);}return _150[type]?px(node,_153):_153;};var _154=d.isIE?"styleFloat":"cssFloat",_155={"cssFloat":_154,"styleFloat":_154,"float":_154};dojo.style=function(node,_156,_157){var n=byId(node),args=arguments.length,op=(_156=="opacity");_156=_155[_156]||_156;if(args==3){return op?d._setOpacity(n,_157):n.style[_156]=_157;}if(args==2&&op){return d._getOpacity(n);}var s=gcs(n);if(args==2&&typeof _156!="string"){for(var x in _156){d.style(node,x,_156[x]);}return s;}return (args==1)?s:_152(n,_156,s[_156]||n.style[_156]);};dojo._getPadExtents=function(n,_158){var s=_158||gcs(n),l=px(n,s.paddingLeft),t=px(n,s.paddingTop);return {l:l,t:t,w:l+px(n,s.paddingRight),h:t+px(n,s.paddingBottom)};};dojo._getBorderExtents=function(n,_159){var ne="none",s=_159||gcs(n),bl=(s.borderLeftStyle!=ne?px(n,s.borderLeftWidth):0),bt=(s.borderTopStyle!=ne?px(n,s.borderTopWidth):0);return {l:bl,t:bt,w:bl+(s.borderRightStyle!=ne?px(n,s.borderRightWidth):0),h:bt+(s.borderBottomStyle!=ne?px(n,s.borderBottomWidth):0)};};dojo._getPadBorderExtents=function(n,_15a){var s=_15a||gcs(n),p=d._getPadExtents(n,s),b=d._getBorderExtents(n,s);return {l:p.l+b.l,t:p.t+b.t,w:p.w+b.w,h:p.h+b.h};};dojo._getMarginExtents=function(n,_15b){var s=_15b||gcs(n),l=px(n,s.marginLeft),t=px(n,s.marginTop),r=px(n,s.marginRight),b=px(n,s.marginBottom);if(d.isWebKit&&(s.position!="absolute")){r=l;}return {l:l,t:t,w:l+r,h:t+b};};dojo._getMarginBox=function(node,_15c){var s=_15c||gcs(node),me=d._getMarginExtents(node,s);var l=node.offsetLeft-me.l,t=node.offsetTop-me.t,p=node.parentNode;if(d.isMoz){var sl=parseFloat(s.left),st=parseFloat(s.top);if(!isNaN(sl)&&!isNaN(st)){l=sl,t=st;}else{if(p&&p.style){var pcs=gcs(p);if(pcs.overflow!="visible"){var be=d._getBorderExtents(p,pcs);l+=be.l,t+=be.t;}}}}else{if(d.isOpera||(d.isIE>7&&!d.isQuirks)){if(p){be=d._getBorderExtents(p);l-=be.l;t-=be.t;}}}return {l:l,t:t,w:node.offsetWidth+me.w,h:node.offsetHeight+me.h};};dojo._getContentBox=function(node,_15d){var s=_15d||gcs(node),pe=d._getPadExtents(node,s),be=d._getBorderExtents(node,s),w=node.clientWidth,h;if(!w){w=node.offsetWidth,h=node.offsetHeight;}else{h=node.clientHeight,be.w=be.h=0;}if(d.isOpera){pe.l+=be.l;pe.t+=be.t;}return {l:pe.l,t:pe.t,w:w-pe.w-be.w,h:h-pe.h-be.h};};dojo._getBorderBox=function(node,_15e){var s=_15e||gcs(node),pe=d._getPadExtents(node,s),cb=d._getContentBox(node,s);return {l:cb.l-pe.l,t:cb.t-pe.t,w:cb.w+pe.w,h:cb.h+pe.h};};dojo._setBox=function(node,l,t,w,h,u){u=u||"px";var s=node.style;if(!isNaN(l)){s.left=l+u;}if(!isNaN(t)){s.top=t+u;}if(w>=0){s.width=w+u;}if(h>=0){s.height=h+u;}};dojo._isButtonTag=function(node){return node.tagName=="BUTTON"||node.tagName=="INPUT"&&(node.getAttribute("type")||"").toUpperCase()=="BUTTON";};dojo._usesBorderBox=function(node){var n=node.tagName;return d.boxModel=="border-box"||n=="TABLE"||d._isButtonTag(node);};dojo._setContentSize=function(node,_15f,_160,_161){if(d._usesBorderBox(node)){var pb=d._getPadBorderExtents(node,_161);if(_15f>=0){_15f+=pb.w;}if(_160>=0){_160+=pb.h;}}d._setBox(node,NaN,NaN,_15f,_160);};dojo._setMarginBox=function(node,_162,_163,_164,_165,_166){var s=_166||gcs(node),bb=d._usesBorderBox(node),pb=bb?_167:d._getPadBorderExtents(node,s);if(d.isWebKit){if(d._isButtonTag(node)){var ns=node.style;if(_164>=0&&!ns.width){ns.width="4px";}if(_165>=0&&!ns.height){ns.height="4px";}}}var mb=d._getMarginExtents(node,s);if(_164>=0){_164=Math.max(_164-pb.w-mb.w,0);}if(_165>=0){_165=Math.max(_165-pb.h-mb.h,0);}d._setBox(node,_162,_163,_164,_165);};var _167={l:0,t:0,w:0,h:0};dojo.marginBox=function(node,box){var n=byId(node),s=gcs(n),b=box;return !b?d._getMarginBox(n,s):d._setMarginBox(n,b.l,b.t,b.w,b.h,s);};dojo.contentBox=function(node,box){var n=byId(node),s=gcs(n),b=box;return !b?d._getContentBox(n,s):d._setContentSize(n,b.w,b.h,s);};var _168=function(node,prop){if(!(node=(node||0).parentNode)){return 0;}var val,_169=0,_16a=d.body();while(node&&node.style){if(gcs(node).position=="fixed"){return 0;}val=node[prop];if(val){_169+=val-0;if(node==_16a){break;}}node=node.parentNode;}return _169;};dojo._docScroll=function(){var n=d.global;return "pageXOffset" in n?{x:n.pageXOffset,y:n.pageYOffset}:(n=d.doc.documentElement,n.clientHeight?{x:d._fixIeBiDiScrollLeft(n.scrollLeft),y:n.scrollTop}:(n=d.body(),{x:n.scrollLeft||0,y:n.scrollTop||0}));};dojo._isBodyLtr=function(){return "_bodyLtr" in d?d._bodyLtr:d._bodyLtr=(d.body().dir||d.doc.documentElement.dir||"ltr").toLowerCase()=="ltr";};dojo._getIeDocumentElementOffset=function(){var de=d.doc.documentElement;if(d.isIE<8){var r=de.getBoundingClientRect();var l=r.left,t=r.top;if(d.isIE<7){l+=de.clientLeft;t+=de.clientTop;}return {x:l<0?0:l,y:t<0?0:t};}else{return {x:0,y:0};}};dojo._fixIeBiDiScrollLeft=function(_16b){var dd=d.doc;if(d.isIE<8&&!d._isBodyLtr()){var de=d.isQuirks?dd.body:dd.documentElement;return _16b+de.clientWidth-de.scrollWidth;}return _16b;};dojo._abs=dojo.position=function(node,_16c){var db=d.body(),dh=db.parentNode,ret;node=byId(node);if(node["getBoundingClientRect"]){ret=node.getBoundingClientRect();ret={x:ret.left,y:ret.top,w:ret.right-ret.left,h:ret.bottom-ret.top};if(d.isIE){var _16d=d._getIeDocumentElementOffset();ret.x-=_16d.x+(d.isQuirks?db.clientLeft+db.offsetLeft:0);ret.y-=_16d.y+(d.isQuirks?db.clientTop+db.offsetTop:0);}else{if(d.isFF==3){var cs=gcs(dh);ret.x-=px(dh,cs.marginLeft)+px(dh,cs.borderLeftWidth);ret.y-=px(dh,cs.marginTop)+px(dh,cs.borderTopWidth);}}}else{ret={x:0,y:0,w:node.offsetWidth,h:node.offsetHeight};if(node["offsetParent"]){ret.x-=_168(node,"scrollLeft");ret.y-=_168(node,"scrollTop");var _16e=node;do{var n=_16e.offsetLeft,t=_16e.offsetTop;ret.x+=isNaN(n)?0:n;ret.y+=isNaN(t)?0:t;cs=gcs(_16e);if(_16e!=node){if(d.isMoz){ret.x+=2*px(_16e,cs.borderLeftWidth);ret.y+=2*px(_16e,cs.borderTopWidth);}else{ret.x+=px(_16e,cs.borderLeftWidth);ret.y+=px(_16e,cs.borderTopWidth);}}if(d.isMoz&&cs.position=="static"){var _16f=_16e.parentNode;while(_16f!=_16e.offsetParent){var pcs=gcs(_16f);if(pcs.position=="static"){ret.x+=px(_16e,pcs.borderLeftWidth);ret.y+=px(_16e,pcs.borderTopWidth);}_16f=_16f.parentNode;}}_16e=_16e.offsetParent;}while((_16e!=dh)&&_16e);}else{if(node.x&&node.y){ret.x+=isNaN(node.x)?0:node.x;ret.y+=isNaN(node.y)?0:node.y;}}}if(_16c){var _170=d._docScroll();ret.x+=_170.x;ret.y+=_170.y;}return ret;};dojo.coords=function(node,_171){var n=byId(node),s=gcs(n),mb=d._getMarginBox(n,s);var abs=d.position(n,_171);mb.x=abs.x;mb.y=abs.y;return mb;};var _172={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",valuetype:"valueType"},_173={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"},_174={innerHTML:1,className:1,htmlFor:d.isIE,value:1};var _175=function(name){return _173[name.toLowerCase()]||name;};var _176=function(node,name){var attr=node.getAttributeNode&&node.getAttributeNode(name);return attr&&attr.specified;};dojo.hasAttr=function(node,name){var lc=name.toLowerCase();return _174[_172[lc]||name]||_176(byId(node),_173[lc]||name);};var _177={},_178=0,_179=dojo._scopeName+"attrid",_17a={col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1};dojo.attr=function(node,name,_17b){node=byId(node);var args=arguments.length,prop;if(args==2&&typeof name!="string"){for(var x in name){d.attr(node,x,name[x]);}return node;}var lc=name.toLowerCase(),_17c=_172[lc]||name,_17d=_174[_17c],_17e=_173[lc]||name;if(args==3){do{if(_17c=="style"&&typeof _17b!="string"){d.style(node,_17b);break;}if(_17c=="innerHTML"){if(d.isIE&&node.tagName.toLowerCase() in _17a){d.empty(node);node.appendChild(d._toDom(_17b,node.ownerDocument));}else{node[_17c]=_17b;}break;}if(d.isFunction(_17b)){var _17f=d.attr(node,_179);if(!_17f){_17f=_178++;d.attr(node,_179,_17f);}if(!_177[_17f]){_177[_17f]={};}var h=_177[_17f][_17c];if(h){d.disconnect(h);}else{try{delete node[_17c];}catch(e){}}_177[_17f][_17c]=d.connect(node,_17c,_17b);break;}if(_17d||typeof _17b=="boolean"){node[_17c]=_17b;break;}node.setAttribute(_17e,_17b);}while(false);return node;}_17b=node[_17c];if(_17d&&typeof _17b!="undefined"){return _17b;}if(_17c!="href"&&(typeof _17b=="boolean"||d.isFunction(_17b))){return _17b;}return _176(node,_17e)?node.getAttribute(_17e):null;};dojo.removeAttr=function(node,name){byId(node).removeAttribute(_175(name));};dojo.getNodeProp=function(node,name){node=byId(node);var lc=name.toLowerCase(),_180=_172[lc]||name;if((_180 in node)&&_180!="href"){return node[_180];}var _181=_173[lc]||name;return _176(node,_181)?node.getAttribute(_181):null;};dojo.create=function(tag,_182,_183,pos){var doc=d.doc;if(_183){_183=byId(_183);doc=_183.ownerDocument;}if(typeof tag=="string"){tag=doc.createElement(tag);}if(_182){d.attr(tag,_182);}if(_183){d.place(tag,_183,pos);}return tag;};d.empty=d.isIE?function(node){node=byId(node);for(var c;c=node.lastChild;){d.destroy(c);}}:function(node){byId(node).innerHTML="";};var _184={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},_185=/<\s*([\w\:]+)/,_186={},_187=0,_188="__"+d._scopeName+"ToDomId";for(var _189 in _184){var tw=_184[_189];tw.pre=_189=="option"?"<select multiple=\"multiple\">":"<"+tw.join("><")+">";tw.post="</"+tw.reverse().join("></")+">";}d._toDom=function(frag,doc){doc=doc||d.doc;var _18a=doc[_188];if(!_18a){doc[_188]=_18a=++_187+"";_186[_18a]=doc.createElement("div");}frag+="";var _18b=frag.match(_185),tag=_18b?_18b[1].toLowerCase():"",_18c=_186[_18a],wrap,i,fc,df;if(_18b&&_184[tag]){wrap=_184[tag];_18c.innerHTML=wrap.pre+frag+wrap.post;for(i=wrap.length;i;--i){_18c=_18c.firstChild;}}else{_18c.innerHTML=frag;}if(_18c.childNodes.length==1){return _18c.removeChild(_18c.firstChild);}df=doc.createDocumentFragment();while(fc=_18c.firstChild){df.appendChild(fc);}return df;};var _18d="className";dojo.hasClass=function(node,_18e){return ((" "+byId(node)[_18d]+" ").indexOf(" "+_18e+" ")>=0);};var _18f=/\s+/,a1=[""],_190=function(s){if(typeof s=="string"||s instanceof String){if(s.indexOf(" ")<0){a1[0]=s;return a1;}else{return s.split(_18f);}}return s;};dojo.addClass=function(node,_191){node=byId(node);_191=_190(_191);var cls=" "+node[_18d]+" ";for(var i=0,len=_191.length,c;i<len;++i){c=_191[i];if(c&&cls.indexOf(" "+c+" ")<0){cls+=c+" ";}}node[_18d]=d.trim(cls);};dojo.removeClass=function(node,_192){node=byId(node);var cls;if(_192!==undefined){_192=_190(_192);cls=" "+node[_18d]+" ";for(var i=0,len=_192.length;i<len;++i){cls=cls.replace(" "+_192[i]+" "," ");}cls=d.trim(cls);}else{cls="";}if(node[_18d]!=cls){node[_18d]=cls;}};dojo.toggleClass=function(node,_193,_194){if(_194===undefined){_194=!d.hasClass(node,_193);}d[_194?"addClass":"removeClass"](node,_193);};})();}if(!dojo._hasResource["dojo._base.NodeList"]){dojo._hasResource["dojo._base.NodeList"]=true;dojo.provide("dojo._base.NodeList");(function(){var d=dojo;var ap=Array.prototype,aps=ap.slice,apc=ap.concat;var tnl=function(a,_195,_196){if(!a.sort){a=aps.call(a,0);}var ctor=_196||this._NodeListCtor||d._NodeListCtor;a.constructor=ctor;dojo._mixin(a,ctor.prototype);a._NodeListCtor=ctor;return _195?a._stash(_195):a;};var _197=function(f,a,o){a=[0].concat(aps.call(a,0));o=o||d.global;return function(node){a[0]=node;return f.apply(o,a);};};var _198=function(f,o){return function(){this.forEach(_197(f,arguments,o));return this;};};var _199=function(f,o){return function(){return this.map(_197(f,arguments,o));};};var _19a=function(f,o){return function(){return this.filter(_197(f,arguments,o));};};var _19b=function(f,g,o){return function(){var a=arguments,body=_197(f,a,o);if(g.call(o||d.global,a)){return this.map(body);}this.forEach(body);return this;};};var _19c=function(a){return a.length==1&&(typeof a[0]=="string");};var _19d=function(node){var p=node.parentNode;if(p){p.removeChild(node);}};dojo.NodeList=function(){return tnl(Array.apply(null,arguments));};d._NodeListCtor=d.NodeList;var nl=d.NodeList,nlp=nl.prototype;nl._wrap=nlp._wrap=tnl;nl._adaptAsMap=_199;nl._adaptAsForEach=_198;nl._adaptAsFilter=_19a;nl._adaptWithCondition=_19b;d.forEach(["slice","splice"],function(name){var f=ap[name];nlp[name]=function(){return this._wrap(f.apply(this,arguments),name=="slice"?this:null);};});d.forEach(["indexOf","lastIndexOf","every","some"],function(name){var f=d[name];nlp[name]=function(){return f.apply(d,[this].concat(aps.call(arguments,0)));};});d.forEach(["attr","style"],function(name){nlp[name]=_19b(d[name],_19c);});d.forEach(["connect","addClass","removeClass","toggleClass","empty","removeAttr"],function(name){nlp[name]=_198(d[name]);});dojo.extend(dojo.NodeList,{_normalize:function(_19e,_19f){var _1a0=_19e.parse===true?true:false;if(typeof _19e.template=="string"){var _1a1=_19e.templateFunc||(dojo.string&&dojo.string.substitute);_19e=_1a1?_1a1(_19e.template,_19e):_19e;}var type=(typeof _19e);if(type=="string"||type=="number"){_19e=dojo._toDom(_19e,(_19f&&_19f.ownerDocument));if(_19e.nodeType==11){_19e=dojo._toArray(_19e.childNodes);}else{_19e=[_19e];}}else{if(!dojo.isArrayLike(_19e)){_19e=[_19e];}else{if(!dojo.isArray(_19e)){_19e=dojo._toArray(_19e);}}}if(_1a0){_19e._runParse=true;}return _19e;},_cloneNode:function(node){return node.cloneNode(true);},_place:function(ary,_1a2,_1a3,_1a4){if(_1a2.nodeType!=1&&_1a3=="only"){return;}var _1a5=_1a2,_1a6;var _1a7=ary.length;for(var i=_1a7-1;i>=0;i--){var node=(_1a4?this._cloneNode(ary[i]):ary[i]);if(ary._runParse&&dojo.parser&&dojo.parser.parse){if(!_1a6){_1a6=_1a5.ownerDocument.createElement("div");}_1a6.appendChild(node);dojo.parser.parse(_1a6);node=_1a6.firstChild;while(_1a6.firstChild){_1a6.removeChild(_1a6.firstChild);}}if(i==_1a7-1){dojo.place(node,_1a5,_1a3);}else{_1a5.parentNode.insertBefore(node,_1a5);}_1a5=node;}},_stash:function(_1a8){this._parent=_1a8;return this;},end:function(){if(this._parent){return this._parent;}else{return new this._NodeListCtor();}},concat:function(item){var t=d.isArray(this)?this:aps.call(this,0),m=d.map(arguments,function(a){return a&&!d.isArray(a)&&(typeof NodeList!="undefined"&&a.constructor===NodeList||a.constructor===this._NodeListCtor)?aps.call(a,0):a;});return this._wrap(apc.apply(t,m),this);},map:function(func,obj){return this._wrap(d.map(this,func,obj),this);},forEach:function(_1a9,_1aa){d.forEach(this,_1a9,_1aa);return this;},coords:_199(d.coords),position:_199(d.position),place:function(_1ab,_1ac){var item=d.query(_1ab)[0];return this.forEach(function(node){d.place(node,item,_1ac);});},orphan:function(_1ad){return (_1ad?d._filterQueryResult(this,_1ad):this).forEach(_19d);},adopt:function(_1ae,_1af){return d.query(_1ae).place(this[0],_1af)._stash(this);},query:function(_1b0){if(!_1b0){return this;}var ret=this.map(function(node){return d.query(_1b0,node).filter(function(_1b1){return _1b1!==undefined;});});return this._wrap(apc.apply([],ret),this);},filter:function(_1b2){var a=arguments,_1b3=this,_1b4=0;if(typeof _1b2=="string"){_1b3=d._filterQueryResult(this,a[0]);if(a.length==1){return _1b3._stash(this);}_1b4=1;}return this._wrap(d.filter(_1b3,a[_1b4],a[_1b4+1]),this);},addContent:function(_1b5,_1b6){_1b5=this._normalize(_1b5,this[0]);for(var i=0,node;node=this[i];i++){this._place(_1b5,node,_1b6,i>0);}return this;},instantiate:function(_1b7,_1b8){var c=d.isFunction(_1b7)?_1b7:d.getObject(_1b7);_1b8=_1b8||{};return this.forEach(function(node){new c(_1b8,node);});},at:function(){var t=new this._NodeListCtor();d.forEach(arguments,function(i){if(this[i]){t.push(this[i]);}},this);return t._stash(this);}});nl.events=["blur","focus","change","click","error","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","submit"];d.forEach(nl.events,function(evt){var _1b9="on"+evt;nlp[_1b9]=function(a,b){return this.connect(_1b9,a,b);};});})();}if(!dojo._hasResource["dojo._base.query"]){dojo._hasResource["dojo._base.query"]=true;if(typeof dojo!="undefined"){dojo.provide("dojo._base.query");}(function(d){var trim=d.trim;var each=d.forEach;var qlc=d._NodeListCtor=d.NodeList;var _1ba=function(){return d.doc;};var _1bb=((d.isWebKit||d.isMozilla)&&((_1ba().compatMode)=="BackCompat"));var _1bc=!!_1ba().firstChild["children"]?"children":"childNodes";var _1bd=">~+";var _1be=false;var _1bf=function(){return true;};var _1c0=function(_1c1){if(_1bd.indexOf(_1c1.slice(-1))>=0){_1c1+=" * ";}else{_1c1+=" ";}var ts=function(s,e){return trim(_1c1.slice(s,e));};var _1c2=[];var _1c3=-1,_1c4=-1,_1c5=-1,_1c6=-1,_1c7=-1,inId=-1,_1c8=-1,lc="",cc="",_1c9;var x=0,ql=_1c1.length,_1ca=null,_1cb=null;var _1cc=function(){if(_1c8>=0){var tv=(_1c8==x)?null:ts(_1c8,x);_1ca[(_1bd.indexOf(tv)<0)?"tag":"oper"]=tv;_1c8=-1;}};var _1cd=function(){if(inId>=0){_1ca.id=ts(inId,x).replace(/\\/g,"");inId=-1;}};var _1ce=function(){if(_1c7>=0){_1ca.classes.push(ts(_1c7+1,x).replace(/\\/g,""));_1c7=-1;}};var _1cf=function(){_1cd();_1cc();_1ce();};var _1d0=function(){_1cf();if(_1c6>=0){_1ca.pseudos.push({name:ts(_1c6+1,x)});}_1ca.loops=(_1ca.pseudos.length||_1ca.attrs.length||_1ca.classes.length);_1ca.oquery=_1ca.query=ts(_1c9,x);_1ca.otag=_1ca.tag=(_1ca["oper"])?null:(_1ca.tag||"*");if(_1ca.tag){_1ca.tag=_1ca.tag.toUpperCase();}if(_1c2.length&&(_1c2[_1c2.length-1].oper)){_1ca.infixOper=_1c2.pop();_1ca.query=_1ca.infixOper.query+" "+_1ca.query;}_1c2.push(_1ca);_1ca=null;};for(;lc=cc,cc=_1c1.charAt(x),x<ql;x++){if(lc=="\\"){continue;}if(!_1ca){_1c9=x;_1ca={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return (_1be)?this.otag:this.tag;}};_1c8=x;}if(_1c3>=0){if(cc=="]"){if(!_1cb.attr){_1cb.attr=ts(_1c3+1,x);}else{_1cb.matchFor=ts((_1c5||_1c3+1),x);}var cmf=_1cb.matchFor;if(cmf){if((cmf.charAt(0)=="\"")||(cmf.charAt(0)=="'")){_1cb.matchFor=cmf.slice(1,-1);}}_1ca.attrs.push(_1cb);_1cb=null;_1c3=_1c5=-1;}else{if(cc=="="){var _1d1=("|~^$*".indexOf(lc)>=0)?lc:"";_1cb.type=_1d1+cc;_1cb.attr=ts(_1c3+1,x-_1d1.length);_1c5=x+1;}}}else{if(_1c4>=0){if(cc==")"){if(_1c6>=0){_1cb.value=ts(_1c4+1,x);}_1c6=_1c4=-1;}}else{if(cc=="#"){_1cf();inId=x+1;}else{if(cc=="."){_1cf();_1c7=x;}else{if(cc==":"){_1cf();_1c6=x;}else{if(cc=="["){_1cf();_1c3=x;_1cb={};}else{if(cc=="("){if(_1c6>=0){_1cb={name:ts(_1c6+1,x),value:null};_1ca.pseudos.push(_1cb);}_1c4=x;}else{if((cc==" ")&&(lc!=cc)){_1d0();}}}}}}}}}return _1c2;};var _1d2=function(_1d3,_1d4){if(!_1d3){return _1d4;}if(!_1d4){return _1d3;}return function(){return _1d3.apply(window,arguments)&&_1d4.apply(window,arguments);};};var _1d5=function(i,arr){var r=arr||[];if(i){r.push(i);}return r;};var _1d6=function(n){return (1==n.nodeType);};var _1d7="";var _1d8=function(elem,attr){if(!elem){return _1d7;}if(attr=="class"){return elem.className||_1d7;}if(attr=="for"){return elem.htmlFor||_1d7;}if(attr=="style"){return elem.style.cssText||_1d7;}return (_1be?elem.getAttribute(attr):elem.getAttribute(attr,2))||_1d7;};var _1d9={"*=":function(attr,_1da){return function(elem){return (_1d8(elem,attr).indexOf(_1da)>=0);};},"^=":function(attr,_1db){return function(elem){return (_1d8(elem,attr).indexOf(_1db)==0);};},"$=":function(attr,_1dc){var tval=" "+_1dc;return function(elem){var ea=" "+_1d8(elem,attr);return (ea.lastIndexOf(_1dc)==(ea.length-_1dc.length));};},"~=":function(attr,_1dd){var tval=" "+_1dd+" ";return function(elem){var ea=" "+_1d8(elem,attr)+" ";return (ea.indexOf(tval)>=0);};},"|=":function(attr,_1de){var _1df=" "+_1de+"-";return function(elem){var ea=" "+_1d8(elem,attr);return ((ea==_1de)||(ea.indexOf(_1df)==0));};},"=":function(attr,_1e0){return function(elem){return (_1d8(elem,attr)==_1e0);};}};var _1e1=(typeof _1ba().firstChild.nextElementSibling=="undefined");var _1e2=!_1e1?"nextElementSibling":"nextSibling";var _1e3=!_1e1?"previousElementSibling":"previousSibling";var _1e4=(_1e1?_1d6:_1bf);var _1e5=function(node){while(node=node[_1e3]){if(_1e4(node)){return false;}}return true;};var _1e6=function(node){while(node=node[_1e2]){if(_1e4(node)){return false;}}return true;};var _1e7=function(node){var root=node.parentNode;var i=0,tret=root[_1bc],ci=(node["_i"]||-1),cl=(root["_l"]||-1);if(!tret){return -1;}var l=tret.length;if(cl==l&&ci>=0&&cl>=0){return ci;}root["_l"]=l;ci=-1;for(var te=root["firstElementChild"]||root["firstChild"];te;te=te[_1e2]){if(_1e4(te)){te["_i"]=++i;if(node===te){ci=i;}}}return ci;};var _1e8=function(elem){return !((_1e7(elem))%2);};var _1e9=function(elem){return ((_1e7(elem))%2);};var _1ea={"checked":function(name,_1eb){return function(elem){return !!("checked" in elem?elem.checked:elem.selected);};},"first-child":function(){return _1e5;},"last-child":function(){return _1e6;},"only-child":function(name,_1ec){return function(node){if(!_1e5(node)){return false;}if(!_1e6(node)){return false;}return true;};},"empty":function(name,_1ed){return function(elem){var cn=elem.childNodes;var cnl=elem.childNodes.length;for(var x=cnl-1;x>=0;x--){var nt=cn[x].nodeType;if((nt===1)||(nt==3)){return false;}}return true;};},"contains":function(name,_1ee){var cz=_1ee.charAt(0);if(cz=="\""||cz=="'"){_1ee=_1ee.slice(1,-1);}return function(elem){return (elem.innerHTML.indexOf(_1ee)>=0);};},"not":function(name,_1ef){var p=_1c0(_1ef)[0];var _1f0={el:1};if(p.tag!="*"){_1f0.tag=1;}if(!p.classes.length){_1f0.classes=1;}var ntf=_1f1(p,_1f0);return function(elem){return (!ntf(elem));};},"nth-child":function(name,_1f2){var pi=parseInt;if(_1f2=="odd"){return _1e9;}else{if(_1f2=="even"){return _1e8;}}if(_1f2.indexOf("n")!=-1){var _1f3=_1f2.split("n",2);var pred=_1f3[0]?((_1f3[0]=="-")?-1:pi(_1f3[0])):1;var idx=_1f3[1]?pi(_1f3[1]):0;var lb=0,ub=-1;if(pred>0){if(idx<0){idx=(idx%pred)&&(pred+(idx%pred));}else{if(idx>0){if(idx>=pred){lb=idx-idx%pred;}idx=idx%pred;}}}else{if(pred<0){pred*=-1;if(idx>0){ub=idx;idx=idx%pred;}}}if(pred>0){return function(elem){var i=_1e7(elem);return (i>=lb)&&(ub<0||i<=ub)&&((i%pred)==idx);};}else{_1f2=idx;}}var _1f4=pi(_1f2);return function(elem){return (_1e7(elem)==_1f4);};}};var _1f5=(d.isIE)?function(cond){var clc=cond.toLowerCase();if(clc=="class"){cond="className";}return function(elem){return (_1be?elem.getAttribute(cond):elem[cond]||elem[clc]);};}:function(cond){return function(elem){return (elem&&elem.getAttribute&&elem.hasAttribute(cond));};};var _1f1=function(_1f6,_1f7){if(!_1f6){return _1bf;}_1f7=_1f7||{};var ff=null;if(!("el" in _1f7)){ff=_1d2(ff,_1d6);}if(!("tag" in _1f7)){if(_1f6.tag!="*"){ff=_1d2(ff,function(elem){return (elem&&(elem.tagName==_1f6.getTag()));});}}if(!("classes" in _1f7)){each(_1f6.classes,function(_1f8,idx,arr){var re=new RegExp("(?:^|\\s)"+_1f8+"(?:\\s|$)");ff=_1d2(ff,function(elem){return re.test(elem.className);});ff.count=idx;});}if(!("pseudos" in _1f7)){each(_1f6.pseudos,function(_1f9){var pn=_1f9.name;if(_1ea[pn]){ff=_1d2(ff,_1ea[pn](pn,_1f9.value));}});}if(!("attrs" in _1f7)){each(_1f6.attrs,function(attr){var _1fa;var a=attr.attr;if(attr.type&&_1d9[attr.type]){_1fa=_1d9[attr.type](a,attr.matchFor);}else{if(a.length){_1fa=_1f5(a);}}if(_1fa){ff=_1d2(ff,_1fa);}});}if(!("id" in _1f7)){if(_1f6.id){ff=_1d2(ff,function(elem){return (!!elem&&(elem.id==_1f6.id));});}}if(!ff){if(!("default" in _1f7)){ff=_1bf;}}return ff;};var _1fb=function(_1fc){return function(node,ret,bag){while(node=node[_1e2]){if(_1e1&&(!_1d6(node))){continue;}if((!bag||_1fd(node,bag))&&_1fc(node)){ret.push(node);}break;}return ret;};};var _1fe=function(_1ff){return function(root,ret,bag){var te=root[_1e2];while(te){if(_1e4(te)){if(bag&&!_1fd(te,bag)){break;}if(_1ff(te)){ret.push(te);}}te=te[_1e2];}return ret;};};var _200=function(_201){_201=_201||_1bf;return function(root,ret,bag){var te,x=0,tret=root[_1bc];while(te=tret[x++]){if(_1e4(te)&&(!bag||_1fd(te,bag))&&(_201(te,x))){ret.push(te);}}return ret;};};var _202=function(node,root){var pn=node.parentNode;while(pn){if(pn==root){break;}pn=pn.parentNode;}return !!pn;};var _203={};var _204=function(_205){var _206=_203[_205.query];if(_206){return _206;}var io=_205.infixOper;var oper=(io?io.oper:"");var _207=_1f1(_205,{el:1});var qt=_205.tag;var _208=("*"==qt);var ecs=_1ba()["getElementsByClassName"];if(!oper){if(_205.id){_207=(!_205.loops&&_208)?_1bf:_1f1(_205,{el:1,id:1});_206=function(root,arr){var te=d.byId(_205.id,(root.ownerDocument||root));if(!te||!_207(te)){return;}if(9==root.nodeType){return _1d5(te,arr);}else{if(_202(te,root)){return _1d5(te,arr);}}};}else{if(ecs&&/\{\s*\[native code\]\s*\}/.test(String(ecs))&&_205.classes.length&&!_1bb){_207=_1f1(_205,{el:1,classes:1,id:1});var _209=_205.classes.join(" ");_206=function(root,arr,bag){var ret=_1d5(0,arr),te,x=0;var tret=root.getElementsByClassName(_209);while((te=tret[x++])){if(_207(te,root)&&_1fd(te,bag)){ret.push(te);}}return ret;};}else{if(!_208&&!_205.loops){_206=function(root,arr,bag){var ret=_1d5(0,arr),te,x=0;var tret=root.getElementsByTagName(_205.getTag());while((te=tret[x++])){if(_1fd(te,bag)){ret.push(te);}}return ret;};}else{_207=_1f1(_205,{el:1,tag:1,id:1});_206=function(root,arr,bag){var ret=_1d5(0,arr),te,x=0;var tret=root.getElementsByTagName(_205.getTag());while((te=tret[x++])){if(_207(te,root)&&_1fd(te,bag)){ret.push(te);}}return ret;};}}}}else{var _20a={el:1};if(_208){_20a.tag=1;}_207=_1f1(_205,_20a);if("+"==oper){_206=_1fb(_207);}else{if("~"==oper){_206=_1fe(_207);}else{if(">"==oper){_206=_200(_207);}}}}return _203[_205.query]=_206;};var _20b=function(root,_20c){var _20d=_1d5(root),qp,x,te,qpl=_20c.length,bag,ret;for(var i=0;i<qpl;i++){ret=[];qp=_20c[i];x=_20d.length-1;if(x>0){bag={};ret.nozip=true;}var gef=_204(qp);for(var j=0;(te=_20d[j]);j++){gef(te,ret,bag);}if(!ret.length){break;}_20d=ret;}return ret;};var _20e={},_20f={};var _210=function(_211){var _212=_1c0(trim(_211));if(_212.length==1){var tef=_204(_212[0]);return function(root){var r=tef(root,new qlc());if(r){r.nozip=true;}return r;};}return function(root){return _20b(root,_212);};};var nua=navigator.userAgent;var wk="WebKit/";var _213=(d.isWebKit&&(nua.indexOf(wk)>0)&&(parseFloat(nua.split(wk)[1])>528));var _214=d.isIE?"commentStrip":"nozip";var qsa="querySelectorAll";var _215=(!!_1ba()[qsa]&&(!d.isSafari||(d.isSafari>3.1)||_213));var _216=/n\+\d|([^ ])?([>~+])([^ =])?/g;var _217=function(_218,pre,ch,post){return ch?(pre?pre+" ":"")+ch+(post?" "+post:""):_218;};var _219=function(_21a,_21b){_21a=_21a.replace(_216,_217);if(_215){var _21c=_20f[_21a];if(_21c&&!_21b){return _21c;}}var _21d=_20e[_21a];if(_21d){return _21d;}var qcz=_21a.charAt(0);var _21e=(-1==_21a.indexOf(" "));if((_21a.indexOf("#")>=0)&&(_21e)){_21b=true;}var _21f=(_215&&(!_21b)&&(_1bd.indexOf(qcz)==-1)&&(!d.isIE||(_21a.indexOf(":")==-1))&&(!(_1bb&&(_21a.indexOf(".")>=0)))&&(_21a.indexOf(":contains")==-1)&&(_21a.indexOf(":checked")==-1)&&(_21a.indexOf("|=")==-1));if(_21f){var tq=(_1bd.indexOf(_21a.charAt(_21a.length-1))>=0)?(_21a+" *"):_21a;return _20f[_21a]=function(root){try{if(!((9==root.nodeType)||_21e)){throw "";}var r=root[qsa](tq);r[_214]=true;return r;}catch(e){return _219(_21a,true)(root);}};}else{var _220=_21a.split(/\s*,\s*/);return _20e[_21a]=((_220.length<2)?_210(_21a):function(root){var _221=0,ret=[],tp;while((tp=_220[_221++])){ret=ret.concat(_210(tp)(root));}return ret;});}};var _222=0;var _223=d.isIE?function(node){if(_1be){return (node.getAttribute("_uid")||node.setAttribute("_uid",++_222)||_222);}else{return node.uniqueID;}}:function(node){return (node._uid||(node._uid=++_222));};var _1fd=function(node,bag){if(!bag){return 1;}var id=_223(node);if(!bag[id]){return bag[id]=1;}return 0;};var _224="_zipIdx";var _225=function(arr){if(arr&&arr.nozip){return (qlc._wrap)?qlc._wrap(arr):arr;}var ret=new qlc();if(!arr||!arr.length){return ret;}if(arr[0]){ret.push(arr[0]);}if(arr.length<2){return ret;}_222++;if(d.isIE&&_1be){var _226=_222+"";arr[0].setAttribute(_224,_226);for(var x=1,te;te=arr[x];x++){if(arr[x].getAttribute(_224)!=_226){ret.push(te);}te.setAttribute(_224,_226);}}else{if(d.isIE&&arr.commentStrip){try{for(var x=1,te;te=arr[x];x++){if(_1d6(te)){ret.push(te);}}}catch(e){}}else{if(arr[0]){arr[0][_224]=_222;}for(var x=1,te;te=arr[x];x++){if(arr[x][_224]!=_222){ret.push(te);}te[_224]=_222;}}}return ret;};d.query=function(_227,root){qlc=d._NodeListCtor;if(!_227){return new qlc();}if(_227.constructor==qlc){return _227;}if(typeof _227!="string"){return new qlc(_227);}if(typeof root=="string"){root=d.byId(root);if(!root){return new qlc();}}root=root||_1ba();var od=root.ownerDocument||root.documentElement;_1be=(root.contentType&&root.contentType=="application/xml")||(d.isOpera&&(root.doctype||od.toString()=="[object XMLDocument]"))||(!!od)&&(d.isIE?od.xml:(root.xmlVersion||od.xmlVersion));var r=_219(_227)(root);if(r&&r.nozip&&!qlc._wrap){return r;}return _225(r);};d.query.pseudos=_1ea;d._filterQueryResult=function(_228,_229){var _22a=new d._NodeListCtor();var _22b=_1f1(_1c0(_229)[0]);for(var x=0,te;te=_228[x];x++){if(_22b(te)){_22a.push(te);}}return _22a;};})(this["queryPortability"]||this["acme"]||dojo);}if(!dojo._hasResource["dojo._base.xhr"]){dojo._hasResource["dojo._base.xhr"]=true;dojo.provide("dojo._base.xhr");(function(){var _22c=dojo,cfg=_22c.config;function _22d(obj,name,_22e){if(_22e===null){return;}var val=obj[name];if(typeof val=="string"){obj[name]=[val,_22e];}else{if(_22c.isArray(val)){val.push(_22e);}else{obj[name]=_22e;}}};dojo.fieldToObject=function(_22f){var ret=null;var item=_22c.byId(_22f);if(item){var _230=item.name;var type=(item.type||"").toLowerCase();if(_230&&type&&!item.disabled){if(type=="radio"||type=="checkbox"){if(item.checked){ret=item.value;}}else{if(item.multiple){ret=[];_22c.query("option",item).forEach(function(opt){if(opt.selected){ret.push(opt.value);}});}else{ret=item.value;}}}}return ret;};dojo.formToObject=function(_231){var ret={};var _232="file|submit|image|reset|button|";_22c.forEach(dojo.byId(_231).elements,function(item){var _233=item.name;var type=(item.type||"").toLowerCase();if(_233&&type&&_232.indexOf(type)==-1&&!item.disabled){_22d(ret,_233,_22c.fieldToObject(item));if(type=="image"){ret[_233+".x"]=ret[_233+".y"]=ret[_233].x=ret[_233].y=0;}}});return ret;};dojo.objectToQuery=function(map){var enc=encodeURIComponent;var _234=[];var _235={};for(var name in map){var _236=map[name];if(_236!=_235[name]){var _237=enc(name)+"=";if(_22c.isArray(_236)){for(var i=0;i<_236.length;i++){_234.push(_237+enc(_236[i]));}}else{_234.push(_237+enc(_236));}}}return _234.join("&");};dojo.formToQuery=function(_238){return _22c.objectToQuery(_22c.formToObject(_238));};dojo.formToJson=function(_239,_23a){return _22c.toJson(_22c.formToObject(_239),_23a);};dojo.queryToObject=function(str){var ret={};var qp=str.split("&");var dec=decodeURIComponent;_22c.forEach(qp,function(item){if(item.length){var _23b=item.split("=");var name=dec(_23b.shift());var val=dec(_23b.join("="));if(typeof ret[name]=="string"){ret[name]=[ret[name]];}if(_22c.isArray(ret[name])){ret[name].push(val);}else{ret[name]=val;}}});return ret;};dojo._blockAsync=false;var _23c=_22c._contentHandlers=dojo.contentHandlers={text:function(xhr){return xhr.responseText;},json:function(xhr){return _22c.fromJson(xhr.responseText||null);},"json-comment-filtered":function(xhr){if(!dojo.config.useCommentedJson){console.warn("Consider using the standard mimetype:application/json."+" json-commenting can introduce security issues. To"+" decrease the chances of hijacking, use the standard the 'json' handler and"+" prefix your json with: {}&&\n"+"Use djConfig.useCommentedJson=true to turn off this message.");}var _23d=xhr.responseText;var _23e=_23d.indexOf("/*");var _23f=_23d.lastIndexOf("*/");if(_23e==-1||_23f==-1){throw new Error("JSON was not comment filtered");}return _22c.fromJson(_23d.substring(_23e+2,_23f));},javascript:function(xhr){return _22c.eval(xhr.responseText);},xml:function(xhr){var _240=xhr.responseXML;if(_22c.isIE&&(!_240||!_240.documentElement)){var ms=function(n){return "MSXML"+n+".DOMDocument";};var dp=["Microsoft.XMLDOM",ms(6),ms(4),ms(3),ms(2)];_22c.some(dp,function(p){try{var dom=new ActiveXObject(p);dom.async=false;dom.loadXML(xhr.responseText);_240=dom;}catch(e){return false;}return true;});}return _240;},"json-comment-optional":function(xhr){if(xhr.responseText&&/^[^{\[]*\/\*/.test(xhr.responseText)){return _23c["json-comment-filtered"](xhr);}else{return _23c["json"](xhr);}}};dojo._ioSetArgs=function(args,_241,_242,_243){var _244={args:args,url:args.url};var _245=null;if(args.form){var form=_22c.byId(args.form);var _246=form.getAttributeNode("action");_244.url=_244.url||(_246?_246.value:null);_245=_22c.formToObject(form);}var _247=[{}];if(_245){_247.push(_245);}if(args.content){_247.push(args.content);}if(args.preventCache){_247.push({"dojo.preventCache":new Date().valueOf()});}_244.query=_22c.objectToQuery(_22c.mixin.apply(null,_247));_244.handleAs=args.handleAs||"text";var d=new _22c.Deferred(_241);d.addCallbacks(_242,function(_248){return _243(_248,d);});var ld=args.load;if(ld&&_22c.isFunction(ld)){d.addCallback(function(_249){return ld.call(args,_249,_244);});}var err=args.error;if(err&&_22c.isFunction(err)){d.addErrback(function(_24a){return err.call(args,_24a,_244);});}var _24b=args.handle;if(_24b&&_22c.isFunction(_24b)){d.addBoth(function(_24c){return _24b.call(args,_24c,_244);});}if(cfg.ioPublish&&_22c.publish&&_244.args.ioPublish!==false){d.addCallbacks(function(res){_22c.publish("/dojo/io/load",[d,res]);return res;},function(res){_22c.publish("/dojo/io/error",[d,res]);return res;});d.addBoth(function(res){_22c.publish("/dojo/io/done",[d,res]);return res;});}d.ioArgs=_244;return d;};var _24d=function(dfd){dfd.canceled=true;var xhr=dfd.ioArgs.xhr;var _24e=typeof xhr.abort;if(_24e=="function"||_24e=="object"||_24e=="unknown"){xhr.abort();}var err=dfd.ioArgs.error;if(!err){err=new Error("xhr cancelled");err.dojoType="cancel";}return err;};var _24f=function(dfd){var ret=_23c[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);return ret===undefined?null:ret;};var _250=function(_251,dfd){if(!dfd.ioArgs.args.failOk){console.error(_251);}return _251;};var _252=null;var _253=[];var _254=0;var _255=function(dfd){if(_254<=0){_254=0;if(cfg.ioPublish&&_22c.publish&&(!dfd||dfd&&dfd.ioArgs.args.ioPublish!==false)){_22c.publish("/dojo/io/stop");}}};var _256=function(){var now=(new Date()).getTime();if(!_22c._blockAsync){for(var i=0,tif;i<_253.length&&(tif=_253[i]);i++){var dfd=tif.dfd;var func=function(){if(!dfd||dfd.canceled||!tif.validCheck(dfd)){_253.splice(i--,1);_254-=1;}else{if(tif.ioCheck(dfd)){_253.splice(i--,1);tif.resHandle(dfd);_254-=1;}else{if(dfd.startTime){if(dfd.startTime+(dfd.ioArgs.args.timeout||0)<now){_253.splice(i--,1);var err=new Error("timeout exceeded");err.dojoType="timeout";dfd.errback(err);dfd.cancel();_254-=1;}}}}};if(dojo.config.debugAtAllCosts){func.call(this);}else{try{func.call(this);}catch(e){dfd.errback(e);}}}}_255(dfd);if(!_253.length){clearInterval(_252);_252=null;return;}};dojo._ioCancelAll=function(){try{_22c.forEach(_253,function(i){try{i.dfd.cancel();}catch(e){}});}catch(e){}};if(_22c.isIE){_22c.addOnWindowUnload(_22c._ioCancelAll);}_22c._ioNotifyStart=function(dfd){if(cfg.ioPublish&&_22c.publish&&dfd.ioArgs.args.ioPublish!==false){if(!_254){_22c.publish("/dojo/io/start");}_254+=1;_22c.publish("/dojo/io/send",[dfd]);}};_22c._ioWatch=function(dfd,_257,_258,_259){var args=dfd.ioArgs.args;if(args.timeout){dfd.startTime=(new Date()).getTime();}_253.push({dfd:dfd,validCheck:_257,ioCheck:_258,resHandle:_259});if(!_252){_252=setInterval(_256,50);}if(args.sync){_256();}};var _25a="application/x-www-form-urlencoded";var _25b=function(dfd){return dfd.ioArgs.xhr.readyState;};var _25c=function(dfd){return 4==dfd.ioArgs.xhr.readyState;};var _25d=function(dfd){var xhr=dfd.ioArgs.xhr;if(_22c._isDocumentOk(xhr)){dfd.callback(dfd);}else{var err=new Error("Unable to load "+dfd.ioArgs.url+" status:"+xhr.status);err.status=xhr.status;err.responseText=xhr.responseText;dfd.errback(err);}};dojo._ioAddQueryToUrl=function(_25e){if(_25e.query.length){_25e.url+=(_25e.url.indexOf("?")==-1?"?":"&")+_25e.query;_25e.query=null;}};dojo.xhr=function(_25f,args,_260){var dfd=_22c._ioSetArgs(args,_24d,_24f,_250);var _261=dfd.ioArgs;var xhr=_261.xhr=_22c._xhrObj(_261.args);if(!xhr){dfd.cancel();return dfd;}if("postData" in args){_261.query=args.postData;}else{if("putData" in args){_261.query=args.putData;}else{if("rawBody" in args){_261.query=args.rawBody;}else{if((arguments.length>2&&!_260)||"POST|PUT".indexOf(_25f.toUpperCase())==-1){_22c._ioAddQueryToUrl(_261);}}}}xhr.open(_25f,_261.url,args.sync!==true,args.user||undefined,args.password||undefined);if(args.headers){for(var hdr in args.headers){if(hdr.toLowerCase()==="content-type"&&!args.contentType){args.contentType=args.headers[hdr];}else{if(args.headers[hdr]){xhr.setRequestHeader(hdr,args.headers[hdr]);}}}}xhr.setRequestHeader("Content-Type",args.contentType||_25a);if(!args.headers||!("X-Requested-With" in args.headers)){xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");}_22c._ioNotifyStart(dfd);if(dojo.config.debugAtAllCosts){xhr.send(_261.query);}else{try{xhr.send(_261.query);}catch(e){_261.error=e;dfd.cancel();}}_22c._ioWatch(dfd,_25b,_25c,_25d);xhr=null;return dfd;};dojo.xhrGet=function(args){return _22c.xhr("GET",args);};dojo.rawXhrPost=dojo.xhrPost=function(args){return _22c.xhr("POST",args,true);};dojo.rawXhrPut=dojo.xhrPut=function(args){return _22c.xhr("PUT",args,true);};dojo.xhrDelete=function(args){return _22c.xhr("DELETE",args);};})();}if(!dojo._hasResource["dojo._base.fx"]){dojo._hasResource["dojo._base.fx"]=true;dojo.provide("dojo._base.fx");(function(){var d=dojo;var _262=d._mixin;dojo._Line=function(_263,end){this.start=_263;this.end=end;};dojo._Line.prototype.getValue=function(n){return ((this.end-this.start)*n)+this.start;};dojo.Animation=function(args){_262(this,args);if(d.isArray(this.curve)){this.curve=new d._Line(this.curve[0],this.curve[1]);}};d._Animation=d.Animation;d.extend(dojo.Animation,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,_getStep:function(){var _264=this._percent,_265=this.easing;return _265?_265(_264):_264;},_fire:function(evt,args){var a=args||[];if(this[evt]){if(d.config.debugAtAllCosts){this[evt].apply(this,a);}else{try{this[evt].apply(this,a);}catch(e){console.error("exception in animation handler for:",evt);console.error(e);}}}return this;},play:function(_266,_267){var _268=this;if(_268._delayTimer){_268._clearTimer();}if(_267){_268._stopTimer();_268._active=_268._paused=false;_268._percent=0;}else{if(_268._active&&!_268._paused){return _268;}}_268._fire("beforeBegin",[_268.node]);var de=_266||_268.delay,_269=dojo.hitch(_268,"_play",_267);if(de>0){_268._delayTimer=setTimeout(_269,de);return _268;}_269();return _268;},_play:function(_26a){var _26b=this;if(_26b._delayTimer){_26b._clearTimer();}_26b._startTime=new Date().valueOf();if(_26b._paused){_26b._startTime-=_26b.duration*_26b._percent;}_26b._endTime=_26b._startTime+_26b.duration;_26b._active=true;_26b._paused=false;var _26c=_26b.curve.getValue(_26b._getStep());if(!_26b._percent){if(!_26b._startRepeatCount){_26b._startRepeatCount=_26b.repeat;}_26b._fire("onBegin",[_26c]);}_26b._fire("onPlay",[_26c]);_26b._cycle();return _26b;},pause:function(){var _26d=this;if(_26d._delayTimer){_26d._clearTimer();}_26d._stopTimer();if(!_26d._active){return _26d;}_26d._paused=true;_26d._fire("onPause",[_26d.curve.getValue(_26d._getStep())]);return _26d;},gotoPercent:function(_26e,_26f){var _270=this;_270._stopTimer();_270._active=_270._paused=true;_270._percent=_26e;if(_26f){_270.play();}return _270;},stop:function(_271){var _272=this;if(_272._delayTimer){_272._clearTimer();}if(!_272._timer){return _272;}_272._stopTimer();if(_271){_272._percent=1;}_272._fire("onStop",[_272.curve.getValue(_272._getStep())]);_272._active=_272._paused=false;return _272;},status:function(){if(this._active){return this._paused?"paused":"playing";}return "stopped";},_cycle:function(){var _273=this;if(_273._active){var curr=new Date().valueOf();var step=(curr-_273._startTime)/(_273._endTime-_273._startTime);if(step>=1){step=1;}_273._percent=step;if(_273.easing){step=_273.easing(step);}_273._fire("onAnimate",[_273.curve.getValue(step)]);if(_273._percent<1){_273._startTimer();}else{_273._active=false;if(_273.repeat>0){_273.repeat--;_273.play(null,true);}else{if(_273.repeat==-1){_273.play(null,true);}else{if(_273._startRepeatCount){_273.repeat=_273._startRepeatCount;_273._startRepeatCount=0;}}}_273._percent=0;_273._fire("onEnd",[_273.node]);!_273.repeat&&_273._stopTimer();}}return _273;},_clearTimer:function(){clearTimeout(this._delayTimer);delete this._delayTimer;}});var ctr=0,_274=[],_275=null,_276={run:function(){}};d.extend(d.Animation,{_startTimer:function(){if(!this._timer){this._timer=d.connect(_276,"run",this,"_cycle");ctr++;}if(!_275){_275=setInterval(d.hitch(_276,"run"),this.rate);}},_stopTimer:function(){if(this._timer){d.disconnect(this._timer);this._timer=null;ctr--;}if(ctr<=0){clearInterval(_275);_275=null;ctr=0;}}});var _277=d.isIE?function(node){var ns=node.style;if(!ns.width.length&&d.style(node,"width")=="auto"){ns.width="auto";}}:function(){};dojo._fade=function(args){args.node=d.byId(args.node);var _278=_262({properties:{}},args),_279=(_278.properties.opacity={});_279.start=!("start" in _278)?function(){return +d.style(_278.node,"opacity")||0;}:_278.start;_279.end=_278.end;var anim=d.animateProperty(_278);d.connect(anim,"beforeBegin",d.partial(_277,_278.node));return anim;};dojo.fadeIn=function(args){return d._fade(_262({end:1},args));};dojo.fadeOut=function(args){return d._fade(_262({end:0},args));};dojo._defaultEasing=function(n){return 0.5+((Math.sin((n+1.5)*Math.PI))/2);};var _27a=function(_27b){this._properties=_27b;for(var p in _27b){var prop=_27b[p];if(prop.start instanceof d.Color){prop.tempColor=new d.Color();}}};_27a.prototype.getValue=function(r){var ret={};for(var p in this._properties){var prop=this._properties[p],_27c=prop.start;if(_27c instanceof d.Color){ret[p]=d.blendColors(_27c,prop.end,r,prop.tempColor).toCss();}else{if(!d.isArray(_27c)){ret[p]=((prop.end-_27c)*r)+_27c+(p!="opacity"?prop.units||"px":0);}}}return ret;};dojo.animateProperty=function(args){var n=args.node=d.byId(args.node);if(!args.easing){args.easing=d._defaultEasing;}var anim=new d.Animation(args);d.connect(anim,"beforeBegin",anim,function(){var pm={};for(var p in this.properties){if(p=="width"||p=="height"){this.node.display="block";}var prop=this.properties[p];if(d.isFunction(prop)){prop=prop(n);}prop=pm[p]=_262({},(d.isObject(prop)?prop:{end:prop}));if(d.isFunction(prop.start)){prop.start=prop.start(n);}if(d.isFunction(prop.end)){prop.end=prop.end(n);}var _27d=(p.toLowerCase().indexOf("color")>=0);function _27e(node,p){var v={height:node.offsetHeight,width:node.offsetWidth}[p];if(v!==undefined){return v;}v=d.style(node,p);return (p=="opacity")?+v:(_27d?v:parseFloat(v));};if(!("end" in prop)){prop.end=_27e(n,p);}else{if(!("start" in prop)){prop.start=_27e(n,p);}}if(_27d){prop.start=new d.Color(prop.start);prop.end=new d.Color(prop.end);}else{prop.start=(p=="opacity")?+prop.start:parseFloat(prop.start);}}this.curve=new _27a(pm);});d.connect(anim,"onAnimate",d.hitch(d,"style",anim.node));return anim;};dojo.anim=function(node,_27f,_280,_281,_282,_283){return d.animateProperty({node:node,duration:_280||d.Animation.prototype.duration,properties:_27f,easing:_281,onEnd:_282}).play(_283||0);};})();}if(!dojo._hasResource["dojo._base.browser"]){dojo._hasResource["dojo._base.browser"]=true;dojo.provide("dojo._base.browser");dojo.forEach(dojo.config.require,function(i){dojo["require"](i);});}if(dojo.config.afterOnLoad&&dojo.isBrowser){window.setTimeout(dojo._loadInit,1000);}})();
diff --git a/js/dojo/dojo/dojo.js.uncompressed.js b/js/dojo/dojo/dojo.js.uncompressed.js
--- a/js/dojo/dojo/dojo.js.uncompressed.js
+++ b/js/dojo/dojo/dojo.js.uncompressed.js
@@ -1,7209 +1,11239 @@
/*
- Copyright (c) 2004-2007, The Dojo Foundation
- All Rights Reserved.
-
- Licensed under the Academic Free License version 2.1 or above OR the
- modified BSD license. For more information on Dojo licensing, see:
-
- http://dojotoolkit.org/book/dojo-book-0-9/introduction/licensing
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
*/
/*
This is a compiled version of Dojo, built for deployment and not for
development. To get an editable version, please visit:
http://dojotoolkit.org
for documentation and information on getting the source.
*/
-if(typeof dojo == "undefined"){
-
-// TODOC: HOW TO DOC THE BELOW?
-// @global: djConfig
-// summary:
-// Application code can set the global 'djConfig' prior to loading
-// the library to override certain global settings for how dojo works.
-// description: The variables that can be set are as follows:
-// - isDebug: false
-// - libraryScriptUri: ""
-// - locale: undefined
-// - extraLocale: undefined
-// - preventBackButtonFix: true
+;(function(){
+
+ /*
+ dojo, dijit, and dojox must always be the first three, and in that order.
+ djConfig.scopeMap = [
+ ["dojo", "fojo"],
+ ["dijit", "fijit"],
+ ["dojox", "fojox"]
+
+ ]
+ */
+
+ /**Build will replace this comment with a scoped djConfig **/
+
+ //The null below can be relaced by a build-time value used instead of djConfig.scopeMap.
+ var sMap = null;
+
+ //See if new scopes need to be defined.
+ if((sMap || (typeof djConfig != "undefined" && djConfig.scopeMap)) && (typeof window != "undefined")){
+ var scopeDef = "", scopePrefix = "", scopeSuffix = "", scopeMap = {}, scopeMapRev = {};
+ sMap = sMap || djConfig.scopeMap;
+ for(var i = 0; i < sMap.length; i++){
+ //Make local variables, then global variables that use the locals.
+ var newScope = sMap[i];
+ scopeDef += "var " + newScope[0] + " = {}; " + newScope[1] + " = " + newScope[0] + ";" + newScope[1] + "._scopeName = '" + newScope[1] + "';";
+ scopePrefix += (i == 0 ? "" : ",") + newScope[0];
+ scopeSuffix += (i == 0 ? "" : ",") + newScope[1];
+ scopeMap[newScope[0]] = newScope[1];
+ scopeMapRev[newScope[1]] = newScope[0];
+ }
+
+ eval(scopeDef + "dojo._scopeArgs = [" + scopeSuffix + "];");
+
+ dojo._scopePrefixArgs = scopePrefix;
+ dojo._scopePrefix = "(function(" + scopePrefix + "){";
+ dojo._scopeSuffix = "})(" + scopeSuffix + ")";
+ dojo._scopeMap = scopeMap;
+ dojo._scopeMapRev = scopeMapRev;
+ }
+
+/*=====
// note:
// 'djConfig' does not exist under 'dojo.*' so that it can be set before the
// 'dojo' variable exists.
// note:
// Setting any of these variables *after* the library has loaded does
// nothing at all.
+djConfig = {
+ // summary:
+ // Application code can set the global 'djConfig' prior to loading
+ // the library to override certain global settings for how dojo works.
+ //
+ // isDebug: Boolean
+ // Defaults to `false`. If set to `true`, ensures that Dojo provides
+ // extended debugging feedback via Firebug. If Firebug is not available
+ // on your platform, setting `isDebug` to `true` will force Dojo to
+ // pull in (and display) the version of Firebug Lite which is
+ // integrated into the Dojo distribution, thereby always providing a
+ // debugging/logging console when `isDebug` is enabled. Note that
+ // Firebug's `console.*` methods are ALWAYS defined by Dojo. If
+ // `isDebug` is false and you are on a platform without Firebug, these
+ // methods will be defined as no-ops.
+ isDebug: false,
+ // debugAtAllCosts: Boolean
+ // Defaults to `false`. If set to `true`, this triggers an alternate
+ // mode of the package system in which dependencies are detected and
+ // only then are resources evaluated in dependency order via
+ // `<script>` tag inclusion. This may double-request resources and
+ // cause problems with scripts which expect `dojo.require()` to
+ // preform synchronously. `debugAtAllCosts` can be an invaluable
+ // debugging aid, but when using it, ensure that all code which
+ // depends on Dojo modules is wrapped in `dojo.addOnLoad()` handlers.
+ // Due to the somewhat unpredictable side-effects of using
+ // `debugAtAllCosts`, it is strongly recommended that you enable this
+ // flag as a last resort. `debugAtAllCosts` has no effect when loading
+ // resources across domains. For usage information, see the
+ // [Dojo Book](http://dojotoolkit.org/book/book-dojo/part-4-meta-dojo-making-your-dojo-code-run-faster-and-better/debugging-facilities/deb)
+ debugAtAllCosts: false,
+ // locale: String
+ // The locale to assume for loading localized resources in this page,
+ // specified according to [RFC 3066](http://www.ietf.org/rfc/rfc3066.txt).
+ // Must be specified entirely in lowercase, e.g. `en-us` and `zh-cn`.
+ // See the documentation for `dojo.i18n` and `dojo.requireLocalization`
+ // for details on loading localized resources. If no locale is specified,
+ // Dojo assumes the locale of the user agent, according to `navigator.userLanguage`
+ // or `navigator.language` properties.
+ locale: undefined,
+ // extraLocale: Array
+ // No default value. Specifies additional locales whose
+ // resources should also be loaded alongside the default locale when
+ // calls to `dojo.requireLocalization()` are processed.
+ extraLocale: undefined,
+ // baseUrl: String
+ // The directory in which `dojo.js` is located. Under normal
+ // conditions, Dojo auto-detects the correct location from which it
+ // was loaded. You may need to manually configure `baseUrl` in cases
+ // where you have renamed `dojo.js` or in which `<base>` tags confuse
+ // some browsers (e.g. IE 6). The variable `dojo.baseUrl` is assigned
+ // either the value of `djConfig.baseUrl` if one is provided or the
+ // auto-detected root if not. Other modules are located relative to
+ // this path. The path should end in a slash.
+ baseUrl: undefined,
+ // modulePaths: Object
+ // A map of module names to paths relative to `dojo.baseUrl`. The
+ // key/value pairs correspond directly to the arguments which
+ // `dojo.registerModulePath` accepts. Specifiying
+ // `djConfig.modulePaths = { "foo": "../../bar" }` is the equivalent
+ // of calling `dojo.registerModulePath("foo", "../../bar");`. Multiple
+ // modules may be configured via `djConfig.modulePaths`.
+ modulePaths: {},
+ // afterOnLoad: Boolean
+ // Indicates Dojo was added to the page after the page load. In this case
+ // Dojo will not wait for the page DOMContentLoad/load events and fire
+ // its dojo.addOnLoad callbacks after making sure all outstanding
+ // dojo.required modules have loaded. Only works with a built dojo.js,
+ // it does not work the dojo.js directly from source control.
+ afterOnLoad: false,
+ // addOnLoad: Function or Array
+ // Adds a callback via dojo.addOnLoad. Useful when Dojo is added after
+ // the page loads and djConfig.afterOnLoad is true. Supports the same
+ // arguments as dojo.addOnLoad. When using a function reference, use
+ // `djConfig.addOnLoad = function(){};`. For object with function name use
+ // `djConfig.addOnLoad = [myObject, "functionName"];` and for object with
+ // function reference use
+ // `djConfig.addOnLoad = [myObject, function(){}];`
+ addOnLoad: null,
+ // require: Array
+ // An array of module names to be loaded immediately after dojo.js has been included
+ // in a page.
+ require: [],
+ // defaultDuration: Array
+ // Default duration, in milliseconds, for wipe and fade animations within dijits.
+ // Assigned to dijit.defaultDuration.
+ defaultDuration: 200,
+ // dojoBlankHtmlUrl: String
+ // Used by some modules to configure an empty iframe. Used by dojo.io.iframe and
+ // dojo.back, and dijit popup support in IE where an iframe is needed to make sure native
+ // controls do not bleed through the popups. Normally this configuration variable
+ // does not need to be set, except when using cross-domain/CDN Dojo builds.
+ // Save dojo/resources/blank.html to your domain and set `djConfig.dojoBlankHtmlUrl`
+ // to the path on your domain your copy of blank.html.
+ dojoBlankHtmlUrl: undefined,
+ // ioPublish: Boolean?
+ // Set this to true to enable publishing of topics for the different phases of
+ // IO operations. Publishing is done via dojo.publish. See dojo.__IoPublish for a list
+ // of topics that are published.
+ ioPublish: false,
+ // useCustomLogger: Anything?
+ // If set to a value that evaluates to true such as a string or array and
+ // isDebug is true and Firebug is not available or running, then it bypasses
+ // the creation of Firebug Lite allowing you to define your own console object.
+ useCustomLogger: undefined,
+ // transparentColor: Array
+ // Array containing the r, g, b components used as transparent color in dojo.Color;
+ // if undefined, [255,255,255] (white) will be used.
+ transparentColor: undefined,
+ // skipIeDomLoaded: Boolean
+ // For IE only, skip the DOMContentLoaded hack used. Sometimes it can cause an Operation
+ // Aborted error if the rest of the page triggers script defers before the DOM is ready.
+ // If this is config value is set to true, then dojo.addOnLoad callbacks will not be
+ // triggered until the page load event, which is after images and iframes load. If you
+ // want to trigger the callbacks sooner, you can put a script block in the bottom of
+ // your HTML that calls dojo._loadInit();. If you are using multiversion support, change
+ // "dojo." to the appropriate scope name for dojo.
+ skipIeDomLoaded: false
+}
+=====*/
+
(function(){
- // make sure djConfig is defined
- if(typeof this["djConfig"] == "undefined"){
- this.djConfig = {};
- }
-
// firebug stubs
- if((!this["console"])||(!console["firebug"])){
- this.console = {};
- }
-
- var cn = [
- "assert", "count", "debug", "dir", "dirxml", "error", "group",
- "groupEnd", "info", "log", "profile", "profileEnd", "time",
- "timeEnd", "trace", "warn"
- ];
- var i=0, tn;
- while((tn=cn[i++])){
- if(!console[tn]){
- console[tn] = function(){};
+
+ if(typeof this["loadFirebugConsole"] == "function"){
+ // for Firebug 1.2
+ this["loadFirebugConsole"]();
+ }else{
+ this.console = this.console || {};
+
+ // Be careful to leave 'log' always at the end
+ var cn = [
+ "assert", "count", "debug", "dir", "dirxml", "error", "group",
+ "groupEnd", "info", "profile", "profileEnd", "time", "timeEnd",
+ "trace", "warn", "log"
+ ];
+ var i=0, tn;
+ while((tn=cn[i++])){
+ if(!console[tn]){
+ (function(){
+ var tcn = tn+"";
+ console[tcn] = ('log' in console) ? function(){
+ var a = Array.apply({}, arguments);
+ a.unshift(tcn+":");
+ console["log"](a.join(" "));
+ } : function(){}
+ console[tcn]._fake = true;
+ })();
+ }
}
}
//TODOC: HOW TO DOC THIS?
// dojo is the root variable of (almost all) our public symbols -- make sure it is defined.
- if(typeof this["dojo"] == "undefined"){
- this.dojo = {};
+ if(typeof dojo == "undefined"){
+ dojo = {
+ _scopeName: "dojo",
+ _scopePrefix: "",
+ _scopePrefixArgs: "",
+ _scopeSuffix: "",
+ _scopeMap: {},
+ _scopeMapRev: {}
+ };
}
var d = dojo;
- // summary:
- // return the current global context object
- // (e.g., the window object in a browser).
- // description:
+ //Need placeholders for dijit and dojox for scoping code.
+ if(typeof dijit == "undefined"){
+ dijit = {_scopeName: "dijit"};
+ }
+ if(typeof dojox == "undefined"){
+ dojox = {_scopeName: "dojox"};
+ }
+
+ if(!d._scopeArgs){
+ d._scopeArgs = [dojo, dijit, dojox];
+ }
+
+/*=====
+dojo.global = {
+ // summary:
+ // Alias for the global scope
+ // (e.g. the window object in a browser).
+ // description:
// Refer to 'dojo.global' rather than referring to window to ensure your
- // code runs correctly in contexts other than web browsers (eg: Rhino on a server).
- dojo.global = this;
-
- var _config =/*===== djConfig = =====*/{
+ // code runs correctly in contexts other than web browsers (e.g. Rhino on a server).
+}
+=====*/
+ d.global = this;
+
+ d.config =/*===== djConfig = =====*/{
isDebug: false,
- libraryScriptUri: "",
- preventBackButtonFix: true,
- delayMozLoadingFix: false
- };
-
- for(var option in _config){
- if(typeof djConfig[option] == "undefined"){
- djConfig[option] = _config[option];
- }
- }
-
- var _platforms = ["Browser", "Rhino", "Spidermonkey", "Mobile"];
- var t;
- while(t=_platforms.shift()){
- d["is"+t] = false;
- }
-
+ debugAtAllCosts: false
+ };
+
+ if(typeof djConfig != "undefined"){
+ for(var opt in djConfig){
+ d.config[opt] = djConfig[opt];
+ }
+ }
+
+/*=====
// Override locale setting, if specified
- dojo.locale = djConfig.locale;
-
- //TODOC: HOW TO DOC THIS?
+ dojo.locale = {
+ // summary: the locale as defined by Dojo (read-only)
+ };
+=====*/
+ dojo.locale = d.config.locale;
+
+ var rev = "$Rev: 21629 $".match(/\d+/);
+
+/*=====
+ dojo.version = function(){
+ // summary:
+ // Version number of the Dojo Toolkit
+ // major: Integer
+ // Major version. If total version is "1.2.0beta1", will be 1
+ // minor: Integer
+ // Minor version. If total version is "1.2.0beta1", will be 2
+ // patch: Integer
+ // Patch version. If total version is "1.2.0beta1", will be 0
+ // flag: String
+ // Descriptor flag. If total version is "1.2.0beta1", will be "beta1"
+ // revision: Number
+ // The SVN rev from which dojo was pulled
+ this.major = 0;
+ this.minor = 0;
+ this.patch = 0;
+ this.flag = "";
+ this.revision = 0;
+ }
+=====*/
dojo.version = {
- // summary: version number of this instance of dojo.
- major: 1, minor: 0, patch: 2, flag: "",
- revision: Number("$Rev: 11832 $".match(/[0-9]+/)[0]),
+ major: 1, minor: 4, patch: 3, flag: "",
+ revision: rev ? +rev[0] : NaN,
toString: function(){
with(d.version){
return major + "." + minor + "." + patch + flag + " (" + revision + ")"; // String
}
}
}
- // Register with the OpenAjax hub
+ // Register with the OpenAjax hub
if(typeof OpenAjax != "undefined"){
- OpenAjax.hub.registerLibrary("dojo", "http://dojotoolkit.org", d.version.toString());
- }
-
- dojo._mixin = function(/*Object*/ obj, /*Object*/ props){
+ OpenAjax.hub.registerLibrary(dojo._scopeName, "http://dojotoolkit.org", d.version.toString());
+ }
+
+ var extraNames, extraLen, empty = {};
+ for(var i in {toString: 1}){ extraNames = []; break; }
+ dojo._extraNames = extraNames = extraNames || ["hasOwnProperty", "valueOf", "isPrototypeOf",
+ "propertyIsEnumerable", "toLocaleString", "toString", "constructor"];
+ extraLen = extraNames.length;
+
+ dojo._mixin = function(/*Object*/ target, /*Object*/ source){
// summary:
- // Adds all properties and methods of props to obj. This addition is
- // "prototype extension safe", so that instances of objects will not
- // pass along prototype defaults.
- var tobj = {};
- for(var x in props){
- // the "tobj" condition avoid copying properties in "props"
- // inherited from Object.prototype. For example, if obj has a custom
+ // Adds all properties and methods of source to target. This addition
+ // is "prototype extension safe", so that instances of objects
+ // will not pass along prototype defaults.
+ var name, s, i;
+ for(name in source){
+ // the "tobj" condition avoid copying properties in "source"
+ // inherited from Object.prototype. For example, if target has a custom
// toString() method, don't overwrite it with the toString() method
- // that props inherited from Object.prototype
- if(tobj[x] === undefined || tobj[x] != props[x]){
- obj[x] = props[x];
- }
- }
- // IE doesn't recognize custom toStrings in for..in
- if(d["isIE"] && props){
- var p = props.toString;
- if(typeof p == "function" && p != obj.toString && p != tobj.toString &&
- p != "\nfunction toString() {\n [native code]\n}\n"){
- obj.toString = props.toString;
- }
- }
- return obj; // Object
+ // that source inherited from Object.prototype
+ s = source[name];
+ if(!(name in target) || (target[name] !== s && (!(name in empty) || empty[name] !== s))){
+ target[name] = s;
+ }
+ }
+ // IE doesn't recognize some custom functions in for..in
+ if(extraLen && source){
+ for(i = 0; i < extraLen; ++i){
+ name = extraNames[i];
+ s = source[name];
+ if(!(name in target) || (target[name] !== s && (!(name in empty) || empty[name] !== s))){
+ target[name] = s;
+ }
+ }
+ }
+ return target; // Object
}
dojo.mixin = function(/*Object*/obj, /*Object...*/props){
- // summary: Adds all properties and methods of props to obj.
+ // summary:
+ // Adds all properties and methods of props to obj and returns the
+ // (now modified) obj.
+ // description:
+ // `dojo.mixin` can mix multiple source objects into a
+ // destination object which is then returned. Unlike regular
+ // `for...in` iteration, `dojo.mixin` is also smart about avoiding
+ // extensions which other toolkits may unwisely add to the root
+ // object prototype
+ // obj:
+ // The object to mix properties into. Also the return value.
+ // props:
+ // One or more objects whose values are successively copied into
+ // obj. If more than one of these objects contain the same value,
+ // the one specified last in the function call will "win".
+ // example:
+ // make a shallow copy of an object
+ // | var copy = dojo.mixin({}, source);
+ // example:
+ // many class constructors often take an object which specifies
+ // values to be configured on the object. In this case, it is
+ // often simplest to call `dojo.mixin` on the `this` object:
+ // | dojo.declare("acme.Base", null, {
+ // | constructor: function(properties){
+ // | // property configuration:
+ // | dojo.mixin(this, properties);
+ // |
+ // | console.log(this.quip);
+ // | // ...
+ // | },
+ // | quip: "I wasn't born yesterday, you know - I've seen movies.",
+ // | // ...
+ // | });
+ // |
+ // | // create an instance of the class and configure it
+ // | var b = new acme.Base({quip: "That's what it does!" });
+ // example:
+ // copy in properties from multiple objects
+ // | var flattened = dojo.mixin(
+ // | {
+ // | name: "Frylock",
+ // | braces: true
+ // | },
+ // | {
+ // | name: "Carl Brutanananadilewski"
+ // | }
+ // | );
+ // |
+ // | // will print "Carl Brutanananadilewski"
+ // | console.log(flattened.name);
+ // | // will print "true"
+ // | console.log(flattened.braces);
+ if(!obj){ obj = {}; }
for(var i=1, l=arguments.length; i<l; i++){
d._mixin(obj, arguments[i]);
}
return obj; // Object
}
dojo._getProp = function(/*Array*/parts, /*Boolean*/create, /*Object*/context){
- var obj=context||d.global;
- for(var i=0, p; obj&&(p=parts[i]); i++){
+ var obj=context || d.global;
+ for(var i=0, p; obj && (p=parts[i]); i++){
+ if(i == 0 && d._scopeMap[p]){
+ p = d._scopeMap[p];
+ }
obj = (p in obj ? obj[p] : (create ? obj[p]={} : undefined));
}
return obj; // mixed
}
- dojo.setObject = function(/*String*/name, /*mixed*/value, /*Object*/context){
- // summary:
+ dojo.setObject = function(/*String*/name, /*Object*/value, /*Object?*/context){
+ // summary:
// Set a property from a dot-separated string, such as "A.B.C"
- // description:
+ // description:
// Useful for longer api chains where you have to test each object in
// the chain, or when you have an object reference in string format.
- // Objects are created as needed along 'path'.
- // name:
+ // Objects are created as needed along `path`. Returns the passed
+ // value if setting is successful or `undefined` if not.
+ // name:
// Path to a property, in the form "A.B.C".
// context:
// Optional. Object to use as root of path. Defaults to
+ // `dojo.global`.
+ // example:
+ // set the value of `foo.bar.baz`, regardless of whether
+ // intermediate objects already exist:
+ // | dojo.setObject("foo.bar.baz", value);
+ // example:
+ // without `dojo.setObject`, we often see code like this:
+ // | // ensure that intermediate objects are available
+ // | if(!obj["parent"]){ obj.parent = {}; }
+ // | if(!obj.parent["child"]){ obj.parent.child= {}; }
+ // | // now we can safely set the property
+ // | obj.parent.child.prop = "some value";
+ // wheras with `dojo.setObject`, we can shorten that to:
+ // | dojo.setObject("parent.child.prop", "some value", obj);
+ var parts=name.split("."), p=parts.pop(), obj=d._getProp(parts, true, context);
+ return obj && p ? (obj[p]=value) : undefined; // Object
+ }
+
+ dojo.getObject = function(/*String*/name, /*Boolean?*/create, /*Object?*/context){
+ // summary:
+ // Get a property from a dot-separated string, such as "A.B.C"
+ // description:
+ // Useful for longer api chains where you have to test each object in
+ // the chain, or when you have an object reference in string format.
+ // name:
+ // Path to an property, in the form "A.B.C".
+ // create:
+ // Optional. Defaults to `false`. If `true`, Objects will be
+ // created at any point along the 'path' that is undefined.
+ // context:
+ // Optional. Object to use as root of path. Defaults to
// 'dojo.global'. Null may be passed.
- var parts=name.split("."), p=parts.pop(), obj=d._getProp(parts, true, context);
- return (obj && p ? (obj[p]=value) : undefined); // mixed
- }
-
- dojo.getObject = function(/*String*/name, /*Boolean*/create, /*Object*/context){
- // summary:
- // Get a property from a dot-separated string, such as "A.B.C"
- // description:
- // Useful for longer api chains where you have to test each object in
- // the chain, or when you have an object reference in string format.
- // name:
- // Path to an property, in the form "A.B.C".
- // context:
- // Optional. Object to use as root of path. Defaults to
- // 'dojo.global'. Null may be passed.
- // create:
- // Optional. If true, Objects will be created at any point along the
- // 'path' that is undefined.
- return d._getProp(name.split("."), create, context); // mixed
+ return d._getProp(name.split("."), create, context); // Object
}
dojo.exists = function(/*String*/name, /*Object?*/obj){
- // summary:
+ // summary:
// determine if an object supports a given method
- // description:
+ // description:
// useful for longer api chains where you have to test each object in
- // the chain
- // name:
+ // the chain. Useful only for object and method detection.
+ // Not useful for testing generic properties on an object.
+ // In particular, dojo.exists("foo.bar") when foo.bar = ""
+ // will return false. Use ("bar" in foo) to test for those cases.
+ // name:
// Path to an object, in the form "A.B.C".
- // obj:
+ // obj:
// Object to use as root of path. Defaults to
// 'dojo.global'. Null may be passed.
+ // example:
+ // | // define an object
+ // | var foo = {
+ // | bar: { }
+ // | };
+ // |
+ // | // search the global scope
+ // | dojo.exists("foo.bar"); // true
+ // | dojo.exists("foo.bar.baz"); // false
+ // |
+ // | // search from a particular scope
+ // | dojo.exists("bar", foo); // true
+ // | dojo.exists("bar.baz", foo); // false
return !!d.getObject(name, false, obj); // Boolean
}
dojo["eval"] = function(/*String*/ scriptFragment){
- // summary:
- // Perform an evaluation in the global scope. Use this rather than
+ // summary:
+ // Perform an evaluation in the global scope. Use this rather than
// calling 'eval()' directly.
- // description:
+ // description:
// Placed in a separate function to minimize size of trapped
- // evaluation context.
+ // exceptions. Calling eval() directly from some other scope may
+ // complicate tracebacks on some platforms.
+ // returns:
+ // The result of the evaluation. Often `undefined`
+
+
// note:
// - JSC eval() takes an optional second argument which can be 'unsafe'.
// - Mozilla/SpiderMonkey eval() takes an optional second argument which is the
// scope object for new symbols.
// FIXME: investigate Joseph Smarr's technique for IE:
// http://josephsmarr.com/2007/01/31/fixing-eval-to-use-global-scope-in-ie/
// see also:
// http://trac.dojotoolkit.org/ticket/744
- return d.global.eval ? d.global.eval(scriptFragment) : eval(scriptFragment); // mixed
+ return d.global.eval ? d.global.eval(scriptFragment) : eval(scriptFragment); // Object
}
/*=====
dojo.deprecated = function(behaviour, extra, removal){
- // summary:
+ // summary:
// Log a debug message to indicate that a behavior has been
// deprecated.
// behaviour: String
// The API or behavior being deprecated. Usually in the form
// of "myApp.someFunction()".
// extra: String?
// Text to append to the message. Often provides advice on a
// new function or facility to achieve the same goal during
// the deprecation period.
// removal: String?
// Text to indicate when in the future the behavior will be
// removed. Usually a version number.
// example:
// | dojo.deprecated("myApp.getTemp()", "use myApp.getLocaleTemp() instead", "1.0");
}
dojo.experimental = function(moduleName, extra){
// summary: Marks code as experimental.
- // description:
+ // description:
// This can be used to mark a function, file, or module as
// experimental. Experimental code is not ready to be used, and the
// APIs are subject to change without notice. Experimental code may be
// completed deleted without going through the normal deprecation
// process.
// moduleName: String
// The name of a module, or the name of a module file or a specific
// function
// extra: String?
// some additional message for the user
// example:
// | dojo.experimental("dojo.data.Result");
// example:
// | dojo.experimental("dojo.weather.toKelvin()", "PENDING approval from NOAA");
}
=====*/
//Real functions declared in dojo._firebug.firebug.
d.deprecated = d.experimental = function(){};
})();
// vim:ai:ts=4:noet
/*
* loader.js - A bootstrap module. Runs before the hostenv_*.js file. Contains
* all of the package loading methods.
*/
(function(){
var d = dojo;
- dojo.mixin(dojo, {
+ d.mixin(d, {
_loadedModules: {},
_inFlightCount: 0,
_hasResource: {},
- // FIXME: it should be possible to pull module prefixes in from djConfig
_modulePrefixes: {
- dojo: {name: "dojo", value: "."},
- doh: {name: "doh", value: "../util/doh"},
- tests: {name: "tests", value: "tests"}
+ dojo: { name: "dojo", value: "." },
+ // dojox: { name: "dojox", value: "../dojox" },
+ // dijit: { name: "dijit", value: "../dijit" },
+ doh: { name: "doh", value: "../util/doh" },
+ tests: { name: "tests", value: "tests" }
},
_moduleHasPrefix: function(/*String*/module){
// summary: checks to see if module has been established
- var mp = this._modulePrefixes;
+ var mp = d._modulePrefixes;
return !!(mp[module] && mp[module].value); // Boolean
},
_getModulePrefix: function(/*String*/module){
// summary: gets the prefix associated with module
- var mp = this._modulePrefixes;
- if(this._moduleHasPrefix(module)){
+ var mp = d._modulePrefixes;
+ if(d._moduleHasPrefix(module)){
return mp[module].value; // String
}
return module; // String
},
_loadedUrls: [],
//WARNING:
// This variable is referenced by packages outside of bootstrap:
// FloatingPane.js and undo/browser.js
_postLoad: false,
//Egad! Lots of test files push on this directly instead of using dojo.addOnLoad.
_loaders: [],
_unloaders: [],
_loadNotifying: false
});
dojo._loadPath = function(/*String*/relpath, /*String?*/module, /*Function?*/cb){
// summary:
// Load a Javascript module given a relative path
//
// description:
// Loads and interprets the script located at relpath, which is
// relative to the script root directory. If the script is found but
// its interpretation causes a runtime exception, that exception is
// not caught by us, so the caller will see it. We return a true
// value if and only if the script is found.
//
// relpath:
// A relative path to a script (no leading '/', and typically ending
// in '.js').
// module:
// A module whose existance to check for after loading a path. Can be
// used to determine success or failure of the load.
// cb:
// a callback function to pass the result of evaluating the script
- var uri = (((relpath.charAt(0) == '/' || relpath.match(/^\w+:/))) ? "" : this.baseUrl) + relpath;
- if(djConfig.cacheBust && d.isBrowser){
- uri += "?" + String(djConfig.cacheBust).replace(/\W+/g,"");
- }
+ var uri = ((relpath.charAt(0) == '/' || relpath.match(/^\w+:/)) ? "" : d.baseUrl) + relpath;
try{
- return !module ? this._loadUri(uri, cb) : this._loadUriAndCheck(uri, module, cb); // Boolean
+ return !module ? d._loadUri(uri, cb) : d._loadUriAndCheck(uri, module, cb); // Boolean
}catch(e){
- console.debug(e);
+ console.error(e);
return false; // Boolean
}
}
- dojo._loadUri = function(/*String (URL)*/uri, /*Function?*/cb){
+ dojo._loadUri = function(/*String*/uri, /*Function?*/cb){
// summary:
// Loads JavaScript from a URI
// description:
// Reads the contents of the URI, and evaluates the contents. This is
// used to load modules as well as resource bundles. Returns true if
// it succeeded. Returns false if the URI reading failed. Throws if
// the evaluation throws.
// uri: a uri which points at the script to be loaded
// cb:
// a callback function to process the result of evaluating the script
// as an expression, typically used by the resource bundle loader to
// load JSON-style resources
- if(this._loadedUrls[uri]){
+ if(d._loadedUrls[uri]){
return true; // Boolean
}
- var contents = this._getText(uri, true);
- if(!contents){ return false; } // Boolean
- this._loadedUrls[uri] = true;
- this._loadedUrls.push(uri);
- if(cb){ contents = '('+contents+')'; }
- var value = d["eval"](contents+"\r\n//@ sourceURL="+uri);
- if(cb){ cb(value); }
- return true; // Boolean
+ d._inFlightCount++; // block addOnLoad calls that arrive while we're busy downloading
+ var contents = d._getText(uri, true);
+ if(contents){ // not 404, et al
+ d._loadedUrls[uri] = true;
+ d._loadedUrls.push(uri);
+ if(cb){
+ contents = '('+contents+')';
+ }else{
+ //Only do the scoping if no callback. If a callback is specified,
+ //it is most likely the i18n bundle stuff.
+ contents = d._scopePrefix + contents + d._scopeSuffix;
+ }
+ if(!d.isIE){ contents += "\r\n//@ sourceURL=" + uri; } // debugging assist for Firebug
+ var value = d["eval"](contents);
+ if(cb){ cb(value); }
+ }
+ // Check to see if we need to call _callLoaded() due to an addOnLoad() that arrived while we were busy downloading
+ if(--d._inFlightCount == 0 && d._postLoad && d._loaders.length){
+ // We shouldn't be allowed to get here but Firefox allows an event
+ // (mouse, keybd, async xhrGet) to interrupt a synchronous xhrGet.
+ // If the current script block contains multiple require() statements, then after each
+ // require() returns, inFlightCount == 0, but we want to hold the _callLoaded() until
+ // all require()s are done since the out-of-sequence addOnLoad() presumably needs them all.
+ // setTimeout allows the next require() to start (if needed), and then we check this again.
+ setTimeout(function(){
+ // If inFlightCount > 0, then multiple require()s are running sequentially and
+ // the next require() started after setTimeout() was executed but before we got here.
+ if(d._inFlightCount == 0){
+ d._callLoaded();
+ }
+ }, 0);
+ }
+ return !!contents; // Boolean: contents? true : false
}
// FIXME: probably need to add logging to this method
- dojo._loadUriAndCheck = function(/*String (URL)*/uri, /*String*/moduleName, /*Function?*/cb){
+ dojo._loadUriAndCheck = function(/*String*/uri, /*String*/moduleName, /*Function?*/cb){
// summary: calls loadUri then findModule and returns true if both succeed
var ok = false;
try{
- ok = this._loadUri(uri, cb);
+ ok = d._loadUri(uri, cb);
}catch(e){
- console.debug("failed loading " + uri + " with error: " + e);
- }
- return Boolean(ok && this._loadedModules[moduleName]); // Boolean
+ console.error("failed loading " + uri + " with error: " + e);
+ }
+ return !!(ok && d._loadedModules[moduleName]); // Boolean
}
dojo.loaded = function(){
// summary:
// signal fired when initial environment and package loading is
- // complete. You may use dojo.addOnLoad() or dojo.connect() to
- // this method in order to handle initialization tasks that
- // require the environment to be initialized. In a browser host,
- // declarative widgets will be constructed when this function
- // finishes runing.
- this._loadNotifying = true;
- this._postLoad = true;
- var mll = this._loaders;
-
+ // complete. You should use dojo.addOnLoad() instead of doing a
+ // direct dojo.connect() to this method in order to handle
+ // initialization tasks that require the environment to be
+ // initialized. In a browser host, declarative widgets will
+ // be constructed when this function finishes runing.
+ d._loadNotifying = true;
+ d._postLoad = true;
+ var mll = d._loaders;
+
//Clear listeners so new ones can be added
//For other xdomain package loads after the initial load.
- this._loaders = [];
-
- for(var x=0; x<mll.length; x++){
+ d._loaders = [];
+
+ for(var x = 0; x < mll.length; x++){
mll[x]();
}
- this._loadNotifying = false;
+ d._loadNotifying = false;
//Make sure nothing else got added to the onload queue
//after this first run. If something did, and we are not waiting for any
//more inflight resources, run again.
- if(d._postLoad && d._inFlightCount == 0 && this._loaders.length > 0){
+ if(d._postLoad && d._inFlightCount == 0 && mll.length){
d._callLoaded();
}
}
dojo.unloaded = function(){
// summary:
- // signal fired by impending environment destruction. You may use
- // dojo.addOnUnload() or dojo.connect() to this method to perform
- // page/application cleanup methods.
- var mll = this._unloaders;
+ // signal fired by impending environment destruction. You should use
+ // dojo.addOnUnload() instead of doing a direct dojo.connect() to this
+ // method to perform page/application cleanup methods. See
+ // dojo.addOnUnload for more info.
+ var mll = d._unloaders;
while(mll.length){
(mll.pop())();
}
}
- dojo.addOnLoad = function(/*Object?*/obj, /*String|Function*/functionName){
+ d._onto = function(arr, obj, fn){
+ if(!fn){
+ arr.push(obj);
+ }else if(fn){
+ var func = (typeof fn == "string") ? obj[fn] : fn;
+ arr.push(function(){ func.call(obj); });
+ }
+ }
+
+ dojo.ready = dojo.addOnLoad = function(/*Object*/obj, /*String|Function?*/functionName){
// summary:
+ // Registers a function to be triggered after the DOM and dojo.require() calls
+ // have finished loading.
+ //
+ // description:
// Registers a function to be triggered after the DOM has finished
- // loading and widgets declared in markup have been instantiated.
+ // loading and `dojo.require` modules have loaded. Widgets declared in markup
+ // have been instantiated if `djConfig.parseOnLoad` is true when this fires.
+ //
// Images and CSS files may or may not have finished downloading when
// the specified function is called. (Note that widgets' CSS and HTML
// code is guaranteed to be downloaded before said widgets are
- // instantiated.)
+ // instantiated, though including css resouces BEFORE any script elements
+ // is highly recommended).
+ //
// example:
- // | dojo.addOnLoad(functionPointer);
+ // Register an anonymous function to run when everything is ready
+ // | dojo.addOnLoad(function(){ doStuff(); });
+ //
+ // example:
+ // Register a function to run when everything is ready by pointer:
+ // | var init = function(){ doStuff(); }
+ // | dojo.addOnLoad(init);
+ //
+ // example:
+ // Register a function to run scoped to `object`, either by name or anonymously:
// | dojo.addOnLoad(object, "functionName");
- if(arguments.length == 1){
- d._loaders.push(obj);
- }else if(arguments.length > 1){
- d._loaders.push(function(){
- obj[functionName]();
- });
- }
+ // | dojo.addOnLoad(object, function(){ doStuff(); });
+
+ d._onto(d._loaders, obj, functionName);
//Added for xdomain loading. dojo.addOnLoad is used to
//indicate callbacks after doing some dojo.require() statements.
//In the xdomain case, if all the requires are loaded (after initial
//page load), then immediately call any listeners.
if(d._postLoad && d._inFlightCount == 0 && !d._loadNotifying){
d._callLoaded();
}
}
- dojo.addOnUnload = function(/*Object?*/obj, /*String|Function?*/functionName){
- // summary: registers a function to be triggered when the page unloads
- // example:
- // | dojo.addOnUnload(functionPointer)
- // | dojo.addOnUnload(object, "functionName")
- if(arguments.length == 1){
- d._unloaders.push(obj);
- }else if(arguments.length > 1){
- d._unloaders.push(function(){
- obj[functionName]();
- });
- }
+ //Support calling dojo.addOnLoad via djConfig.addOnLoad. Support all the
+ //call permutations of dojo.addOnLoad. Mainly useful when dojo is added
+ //to the page after the page has loaded.
+ var dca = d.config.addOnLoad;
+ if(dca){
+ d.addOnLoad[(dca instanceof Array ? "apply" : "call")](d, dca);
}
dojo._modulesLoaded = function(){
if(d._postLoad){ return; }
if(d._inFlightCount > 0){
- console.debug("files still in flight!");
+ console.warn("files still in flight!");
return;
}
d._callLoaded();
}
dojo._callLoaded = function(){
- //The "object" check is for IE, and the other opera check fixes an issue
- //in Opera where it could not find the body element in some widget test cases.
- //For 0.9, maybe route all browsers through the setTimeout (need protection
- //still for non-browser environments though). This might also help the issue with
- //FF 2.0 and freezing issues where we try to do sync xhr while background css images
- //are being loaded (trac #2572)? Consider for 0.9.
- if(typeof setTimeout == "object" || (djConfig["useXDomain"] && d.isOpera)){
- setTimeout("dojo.loaded();", 0);
+
+ // The "object" check is for IE, and the other opera check fixes an
+ // issue in Opera where it could not find the body element in some
+ // widget test cases. For 0.9, maybe route all browsers through the
+ // setTimeout (need protection still for non-browser environments
+ // though). This might also help the issue with FF 2.0 and freezing
+ // issues where we try to do sync xhr while background css images are
+ // being loaded (trac #2572)? Consider for 0.9.
+ if(typeof setTimeout == "object" || (d.config.useXDomain && d.isOpera)){
+ setTimeout(
+ d.isAIR ? function(){ d.loaded(); } : d._scopeName + ".loaded();",
+ 0);
}else{
d.loaded();
}
}
dojo._getModuleSymbols = function(/*String*/modulename){
// summary:
// Converts a module name in dotted JS notation to an array
// representing the path in the source tree
var syms = modulename.split(".");
for(var i = syms.length; i>0; i--){
var parentModule = syms.slice(0, i).join(".");
- if((i==1) && !this._moduleHasPrefix(parentModule)){
+ if(i == 1 && !d._moduleHasPrefix(parentModule)){
// Support default module directory (sibling of dojo) for top-level modules
syms[0] = "../" + syms[0];
}else{
- var parentModulePath = this._getModulePrefix(parentModule);
+ var parentModulePath = d._getModulePrefix(parentModule);
if(parentModulePath != parentModule){
syms.splice(0, i, parentModulePath);
break;
}
}
}
- // console.debug(syms);
return syms; // Array
}
dojo._global_omit_module_check = false;
+ dojo.loadInit = function(/*Function*/init){
+ // summary:
+ // Executes a function that needs to be executed for the loader's dojo.requireIf
+ // resolutions to work. This is needed mostly for the xdomain loader case where
+ // a function needs to be executed to set up the possible values for a dojo.requireIf
+ // call.
+ // init:
+ // a function reference. Executed immediately.
+ // description: This function is mainly a marker for the xdomain loader to know parts of
+ // code that needs be executed outside the function wrappper that is placed around modules.
+ // The init function could be executed more than once, and it should make no assumptions
+ // on what is loaded, or what modules are available. Only the functionality in Dojo Base
+ // is allowed to be used. Avoid using this method. For a valid use case,
+ // see the source for dojox.gfx.
+ init();
+ }
+
dojo._loadModule = dojo.require = function(/*String*/moduleName, /*Boolean?*/omitModuleCheck){
// summary:
// loads a Javascript module from the appropriate URI
- // moduleName: String
- // omitModuleCheck: Boolean?
+ // moduleName:
+ // module name to load, using periods for separators,
+ // e.g. "dojo.date.locale". Module paths are de-referenced by dojo's
+ // internal mapping of locations to names and are disambiguated by
+ // longest prefix. See `dojo.registerModulePath()` for details on
+ // registering new modules.
+ // omitModuleCheck:
+ // if `true`, omitModuleCheck skips the step of ensuring that the
+ // loaded file actually defines the symbol it is referenced by.
+ // For example if it called as `dojo.require("a.b.c")` and the
+ // file located at `a/b/c.js` does not define an object `a.b.c`,
+ // and exception will be throws whereas no exception is raised
+ // when called as `dojo.require("a.b.c", true)`
// description:
- // _loadModule("A.B") first checks to see if symbol A.B is defined. If
- // it is, it is simply returned (nothing to do).
+ // Modules are loaded via dojo.require by using one of two loaders: the normal loader
+ // and the xdomain loader. The xdomain loader is used when dojo was built with a
+ // custom build that specified loader=xdomain and the module lives on a modulePath
+ // that is a whole URL, with protocol and a domain. The versions of Dojo that are on
+ // the Google and AOL CDNs use the xdomain loader.
+ //
+ // If the module is loaded via the xdomain loader, it is an asynchronous load, since
+ // the module is added via a dynamically created script tag. This
+ // means that dojo.require() can return before the module has loaded. However, this
+ // should only happen in the case where you do dojo.require calls in the top-level
+ // HTML page, or if you purposely avoid the loader checking for dojo.require
+ // dependencies in your module by using a syntax like dojo["require"] to load the module.
+ //
+ // Sometimes it is useful to not have the loader detect the dojo.require calls in the
+ // module so that you can dynamically load the modules as a result of an action on the
+ // page, instead of right at module load time.
+ //
+ // Also, for script blocks in an HTML page, the loader does not pre-process them, so
+ // it does not know to download the modules before the dojo.require calls occur.
+ //
+ // So, in those two cases, when you want on-the-fly module loading or for script blocks
+ // in the HTML page, special care must be taken if the dojo.required code is loaded
+ // asynchronously. To make sure you can execute code that depends on the dojo.required
+ // modules, be sure to add the code that depends on the modules in a dojo.addOnLoad()
+ // callback. dojo.addOnLoad waits for all outstanding modules to finish loading before
+ // executing. Example:
+ //
+ // | <script type="text/javascript">
+ // | dojo.require("foo");
+ // | dojo.require("bar");
+ // | dojo.addOnLoad(function(){
+ // | //you can now safely do something with foo and bar
+ // | });
+ // | </script>
+ //
+ // This type of syntax works with both xdomain and normal loaders, so it is good
+ // practice to always use this idiom for on-the-fly code loading and in HTML script
+ // blocks. If at some point you change loaders and where the code is loaded from,
+ // it will all still work.
+ //
+ // More on how dojo.require
+ // `dojo.require("A.B")` first checks to see if symbol A.B is
+ // defined. If it is, it is simply returned (nothing to do).
//
- // If it is not defined, it will look for "A/B.js" in the script root
+ // If it is not defined, it will look for `A/B.js` in the script root
// directory.
//
- // It throws if it cannot find a file to load, or if the symbol A.B is
- // not defined after loading.
+ // `dojo.require` throws an excpetion if it cannot find a file
+ // to load, or if the symbol `A.B` is not defined after loading.
//
- // It returns the object A.B.
+ // It returns the object `A.B`, but note the caveats above about on-the-fly loading and
+ // HTML script blocks when the xdomain loader is loading a module.
//
- // This does nothing about importing symbols into the current package.
- // It is presumed that the caller will take care of that. For example,
- // to import all symbols:
+ // `dojo.require()` does nothing about importing symbols into
+ // the current namespace. It is presumed that the caller will
+ // take care of that. For example, to import all symbols into a
+ // local block, you might write:
//
- // | with (dojo._loadModule("A.B")) {
+ // | with (dojo.require("A.B")) {
// | ...
// | }
//
- // And to import just the leaf symbol:
+ // And to import just the leaf symbol to a local variable:
//
- // | var B = dojo._loadModule("A.B");
+ // | var B = dojo.require("A.B");
// | ...
// returns: the required namespace object
- omitModuleCheck = this._global_omit_module_check || omitModuleCheck;
- var module = this._loadedModules[moduleName];
+ omitModuleCheck = d._global_omit_module_check || omitModuleCheck;
+
+ //Check if it is already loaded.
+ var module = d._loadedModules[moduleName];
if(module){
return module;
}
// convert periods to slashes
- var relpath = this._getModuleSymbols(moduleName).join("/") + '.js';
-
- var modArg = (!omitModuleCheck) ? moduleName : null;
- var ok = this._loadPath(relpath, modArg);
-
- if((!ok)&&(!omitModuleCheck)){
+ var relpath = d._getModuleSymbols(moduleName).join("/") + '.js';
+
+ var modArg = !omitModuleCheck ? moduleName : null;
+ var ok = d._loadPath(relpath, modArg);
+
+ if(!ok && !omitModuleCheck){
throw new Error("Could not load '" + moduleName + "'; last tried '" + relpath + "'");
}
// check that the symbol was defined
// Don't bother if we're doing xdomain (asynchronous) loading.
- if((!omitModuleCheck)&&(!this["_isXDomain"])){
+ if(!omitModuleCheck && !d._isXDomain){
// pass in false so we can give better error
- module = this._loadedModules[moduleName];
+ module = d._loadedModules[moduleName];
if(!module){
throw new Error("symbol '" + moduleName + "' is not defined after loading '" + relpath + "'");
}
}
return module;
}
dojo.provide = function(/*String*/ resourceName){
// summary:
- // Each javascript source file must have (exactly) one dojo.provide()
- // call at the top of the file, corresponding to the file name.
- // For example, js/dojo/foo.js must have dojo.provide("dojo.foo"); at the
- // top of the file.
+ // Register a resource with the package system. Works in conjunction with `dojo.require`
+ //
// description:
- // Each javascript source file is called a resource. When a resource
- // is loaded by the browser, dojo.provide() registers that it has been
- // loaded.
+ // Each javascript source file is called a resource. When a
+ // resource is loaded by the browser, `dojo.provide()` registers
+ // that it has been loaded.
+ //
+ // Each javascript source file must have at least one
+ // `dojo.provide()` call at the top of the file, corresponding to
+ // the file name. For example, `js/dojo/foo.js` must have
+ // `dojo.provide("dojo.foo");` before any calls to
+ // `dojo.require()` are made.
//
- // For backwards compatibility reasons, in addition to registering the
- // resource, dojo.provide() also ensures that the javascript object
- // for the module exists. For example,
- // dojo.provide("dojo.io.cometd"), in addition to registering that
- // cometd.js is a resource for the dojo.iomodule, will ensure that
- // the dojo.io javascript object exists, so that calls like
- // dojo.io.foo = function(){ ... } don't fail.
- //
- // In the case of a build (or in the future, a rollup), where multiple
- // javascript source files are combined into one bigger file (similar
- // to a .lib or .jar file), that file will contain multiple
- // dojo.provide() calls, to note that it includes multiple resources.
+ // For backwards compatibility reasons, in addition to registering
+ // the resource, `dojo.provide()` also ensures that the javascript
+ // object for the module exists. For example,
+ // `dojo.provide("dojox.data.FlickrStore")`, in addition to
+ // registering that `FlickrStore.js` is a resource for the
+ // `dojox.data` module, will ensure that the `dojox.data`
+ // javascript object exists, so that calls like
+ // `dojo.data.foo = function(){ ... }` don't fail.
+ //
+ // In the case of a build where multiple javascript source files
+ // are combined into one bigger file (similar to a .lib or .jar
+ // file), that file may contain multiple dojo.provide() calls, to
+ // note that it includes multiple resources.
+ //
+ // resourceName: String
+ // A dot-sperated string identifying a resource.
+ //
+ // example:
+ // Safely create a `my` object, and make dojo.require("my.CustomModule") work
+ // | dojo.provide("my.CustomModule");
//Make sure we have a string.
resourceName = resourceName + "";
return (d._loadedModules[resourceName] = d.getObject(resourceName, true)); // Object
}
//Start of old bootstrap2:
- dojo.platformRequire = function(/*Object containing Arrays*/modMap){
+ dojo.platformRequire = function(/*Object*/modMap){
+ // summary:
+ // require one or more modules based on which host environment
+ // Dojo is currently operating in
// description:
- // This method taks a "map" of arrays which one can use to optionally
- // load dojo modules. The map is indexed by the possible
- // dojo.name_ values, with two additional values: "default"
- // and "common". The items in the "default" array will be loaded if
- // none of the other items have been choosen based on the
- // hostenv.name_ item. The items in the "common" array will _always_
- // be loaded, regardless of which list is chosen. Here's how it's
- // normally called:
- //
+ // This method takes a "map" of arrays which one can use to
+ // optionally load dojo modules. The map is indexed by the
+ // possible dojo.name_ values, with two additional values:
+ // "default" and "common". The items in the "default" array will
+ // be loaded if none of the other items have been choosen based on
+ // dojo.name_, set by your host environment. The items in the
+ // "common" array will *always* be loaded, regardless of which
+ // list is chosen.
+ // example:
// | dojo.platformRequire({
- // | // an example that passes multiple args to _loadModule()
// | browser: [
- // | ["foo.bar.baz", true, true],
- // | "foo.sample",
- // | "foo.test,
+ // | "foo.sample", // simple module
+ // | "foo.test",
+ // | ["foo.bar.baz", true] // skip object check in _loadModule (dojo.require)
// | ],
- // | default: [ "foo.sample.*" ],
- // | common: [ "really.important.module.*" ]
+ // | default: [ "foo.sample._base" ],
+ // | common: [ "important.module.common" ]
// | });
- // FIXME: dojo.name_ no longer works!!
-
- var common = modMap["common"]||[];
- var result = common.concat(modMap[d._name]||modMap["default"]||[]);
+ var common = modMap.common || [];
+ var result = common.concat(modMap[d._name] || modMap["default"] || []);
for(var x=0; x<result.length; x++){
var curr = result[x];
if(curr.constructor == Array){
d._loadModule.apply(d, curr);
}else{
d._loadModule(curr);
}
}
}
-
dojo.requireIf = function(/*Boolean*/ condition, /*String*/ resourceName){
// summary:
- // If the condition is true then call dojo.require() for the specified
+ // If the condition is true then call `dojo.require()` for the specified
// resource
+ //
+ // example:
+ // | dojo.requireIf(dojo.isBrowser, "my.special.Module");
+
if(condition === true){
// FIXME: why do we support chained require()'s here? does the build system?
var args = [];
for(var i = 1; i < arguments.length; i++){
args.push(arguments[i]);
}
d.require.apply(d, args);
}
}
dojo.requireAfterIf = d.requireIf;
dojo.registerModulePath = function(/*String*/module, /*String*/prefix){
// summary:
- // maps a module name to a path
+ // Maps a module name to a path
// description:
- // An unregistered module is given the default path of ../<module>,
+ // An unregistered module is given the default path of ../[module],
// relative to Dojo root. For example, module acme is mapped to
// ../acme. If you want to use a different module name, use
// dojo.registerModulePath.
+ // example:
+ // If your dojo.js is located at this location in the web root:
+ // | /myapp/js/dojo/dojo/dojo.js
+ // and your modules are located at:
+ // | /myapp/js/foo/bar.js
+ // | /myapp/js/foo/baz.js
+ // | /myapp/js/foo/thud/xyzzy.js
+ // Your application can tell Dojo to locate the "foo" namespace by calling:
+ // | dojo.registerModulePath("foo", "../../foo");
+ // At which point you can then use dojo.require() to load the
+ // modules (assuming they provide() the same things which are
+ // required). The full code might be:
+ // | <script type="text/javascript"
+ // | src="/myapp/js/dojo/dojo/dojo.js"></script>
+ // | <script type="text/javascript">
+ // | dojo.registerModulePath("foo", "../../foo");
+ // | dojo.require("foo.bar");
+ // | dojo.require("foo.baz");
+ // | dojo.require("foo.thud.xyzzy");
+ // | </script>
d._modulePrefixes[module] = { name: module, value: prefix };
}
dojo.requireLocalization = function(/*String*/moduleName, /*String*/bundleName, /*String?*/locale, /*String?*/availableFlatLocales){
// summary:
// Declares translated resources and loads them if necessary, in the
// same style as dojo.require. Contents of the resource bundle are
// typically strings, but may be any name/value pair, represented in
- // JSON format. See also dojo.i18n.getLocalization.
+ // JSON format. See also `dojo.i18n.getLocalization`.
+ //
+ // description:
+ // Load translated resource bundles provided underneath the "nls"
+ // directory within a package. Translated resources may be located in
+ // different packages throughout the source tree.
+ //
+ // Each directory is named for a locale as specified by RFC 3066,
+ // (http://www.ietf.org/rfc/rfc3066.txt), normalized in lowercase.
+ // Note that the two bundles in the example do not define all the
+ // same variants. For a given locale, bundles will be loaded for
+ // that locale and all more general locales above it, including a
+ // fallback at the root directory. For example, a declaration for
+ // the "de-at" locale will first load `nls/de-at/bundleone.js`,
+ // then `nls/de/bundleone.js` and finally `nls/bundleone.js`. The
+ // data will be flattened into a single Object so that lookups
+ // will follow this cascading pattern. An optional build step can
+ // preload the bundles to avoid data redundancy and the multiple
+ // network hits normally required to load these resources.
+ //
// moduleName:
// name of the package containing the "nls" directory in which the
// bundle is found
+ //
// bundleName:
- // bundle name, i.e. the filename without the '.js' suffix
+ // bundle name, i.e. the filename without the '.js' suffix. Using "nls" as a
+ // a bundle name is not supported, since "nls" is the name of the folder
+ // that holds bundles. Using "nls" as the bundle name will cause problems
+ // with the custom build.
+ //
// locale:
// the locale to load (optional) By default, the browser's user
// locale as defined by dojo.locale
+ //
// availableFlatLocales:
// A comma-separated list of the available, flattened locales for this
// bundle. This argument should only be set by the build process.
- // description:
- // Load translated resource bundles provided underneath the "nls"
- // directory within a package. Translated resources may be located in
- // different packages throughout the source tree. For example, a
- // particular widget may define one or more resource bundles,
+ //
+ // example:
+ // A particular widget may define one or more resource bundles,
// structured in a program as follows, where moduleName is
// mycode.mywidget and bundleNames available include bundleone and
// bundletwo:
- //
- // ...
- // mycode/
- // mywidget/
- // nls/
- // bundleone.js (the fallback translation, English in this example)
- // bundletwo.js (also a fallback translation)
- // de/
- // bundleone.js
- // bundletwo.js
- // de-at/
- // bundleone.js
- // en/
- // (empty; use the fallback translation)
- // en-us/
- // bundleone.js
- // en-gb/
- // bundleone.js
- // es/
- // bundleone.js
- // bundletwo.js
- // ...etc
- // ...
- //
- // Each directory is named for a locale as specified by RFC 3066,
- // (http://www.ietf.org/rfc/rfc3066.txt), normalized in lowercase.
- // Note that the two bundles in the example do not define all the same
- // variants. For a given locale, bundles will be loaded for that
- // locale and all more general locales above it, including a fallback
- // at the root directory. For example, a declaration for the "de-at"
- // locale will first load nls/de-at/bundleone.js, then
- // nls/de/bundleone.js and finally nls/bundleone.js. The data will be
- // flattened into a single Object so that lookups will follow this
- // cascading pattern. An optional build step can preload the bundles
- // to avoid data redundancy and the multiple network hits normally
- // required to load these resources.
+ // | ...
+ // | mycode/
+ // | mywidget/
+ // | nls/
+ // | bundleone.js (the fallback translation, English in this example)
+ // | bundletwo.js (also a fallback translation)
+ // | de/
+ // | bundleone.js
+ // | bundletwo.js
+ // | de-at/
+ // | bundleone.js
+ // | en/
+ // | (empty; use the fallback translation)
+ // | en-us/
+ // | bundleone.js
+ // | en-gb/
+ // | bundleone.js
+ // | es/
+ // | bundleone.js
+ // | bundletwo.js
+ // | ...etc
+ // | ...
+ //
d.require("dojo.i18n");
d.i18n._requireLocalization.apply(d.hostenv, arguments);
};
- var ore = new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$");
- var ire = new RegExp("^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$");
-
- dojo._Url = function(/*dojo._Url||String...*/){
+ var ore = new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),
+ ire = new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");
+
+ dojo._Url = function(/*dojo._Url|String...*/){
// summary:
// Constructor to create an object representing a URL.
// It is marked as private, since we might consider removing
// or simplifying it.
// description:
// Each argument is evaluated in order relative to the next until
// a canonical uri is produced. To get an absolute Uri relative to
// the current document use:
// new dojo._Url(document.baseURI, url)
- var n = null;
-
- // TODO: support for IPv6, see RFC 2732
- var _a = arguments;
- var uri = _a[0];
+ var n = null,
+ _a = arguments,
+ uri = [_a[0]];
// resolve uri components relative to each other
for(var i = 1; i<_a.length; i++){
if(!_a[i]){ continue; }
// Safari doesn't support this.constructor so we have to be explicit
// FIXME: Tracked (and fixed) in Webkit bug 3537.
// http://bugs.webkit.org/show_bug.cgi?id=3537
- var relobj = new d._Url(_a[i]+"");
- var uriobj = new d._Url(uri+"");
+ var relobj = new d._Url(_a[i]+""),
+ uriobj = new d._Url(uri[0]+"");
if(
- (relobj.path=="") &&
- (!relobj.scheme) &&
- (!relobj.authority) &&
- (!relobj.query)
+ relobj.path == "" &&
+ !relobj.scheme &&
+ !relobj.authority &&
+ !relobj.query
){
if(relobj.fragment != n){
uriobj.fragment = relobj.fragment;
}
relobj = uriobj;
}else if(!relobj.scheme){
relobj.scheme = uriobj.scheme;
if(!relobj.authority){
relobj.authority = uriobj.authority;
if(relobj.path.charAt(0) != "/"){
var path = uriobj.path.substring(0,
uriobj.path.lastIndexOf("/") + 1) + relobj.path;
var segs = path.split("/");
for(var j = 0; j < segs.length; j++){
if(segs[j] == "."){
+ // flatten "./" references
if(j == segs.length - 1){
segs[j] = "";
}else{
segs.splice(j, 1);
j--;
}
}else if(j > 0 && !(j == 1 && segs[0] == "") &&
segs[j] == ".." && segs[j-1] != ".."){
-
+ // flatten "../" references
if(j == (segs.length - 1)){
segs.splice(j, 1);
segs[j - 1] = "";
}else{
segs.splice(j - 1, 2);
j -= 2;
}
}
}
relobj.path = segs.join("/");
}
}
}
- uri = "";
+ uri = [];
if(relobj.scheme){
- uri += relobj.scheme + ":";
+ uri.push(relobj.scheme, ":");
}
if(relobj.authority){
- uri += "//" + relobj.authority;
- }
- uri += relobj.path;
+ uri.push("//", relobj.authority);
+ }
+ uri.push(relobj.path);
if(relobj.query){
- uri += "?" + relobj.query;
+ uri.push("?", relobj.query);
}
if(relobj.fragment){
- uri += "#" + relobj.fragment;
- }
- }
-
- this.uri = uri.toString();
+ uri.push("#", relobj.fragment);
+ }
+ }
+
+ this.uri = uri.join("");
// break the uri into its main components
var r = this.uri.match(ore);
this.scheme = r[2] || (r[1] ? "" : n);
this.authority = r[4] || (r[3] ? "" : n);
this.path = r[5]; // can never be undefined
this.query = r[7] || (r[6] ? "" : n);
this.fragment = r[9] || (r[8] ? "" : n);
if(this.authority != n){
// server based naming authority
r = this.authority.match(ire);
this.user = r[3] || n;
this.password = r[4] || n;
- this.host = r[5];
- this.port = r[7] || n;
+ this.host = r[6] || r[7]; // ipv6 || ipv4
+ this.port = r[9] || n;
}
}
dojo._Url.prototype.toString = function(){ return this.uri; };
dojo.moduleUrl = function(/*String*/module, /*dojo._Url||String*/url){
- // summary:
- // Returns a Url object relative to a module
- //
- // example:
- // | dojo.moduleUrl("dojo.widget","templates/template.html");
- // example:
- // | dojo.moduleUrl("acme","images/small.png")
-
- var loc = dojo._getModuleSymbols(module).join('/');
+ // summary:
+ // Returns a `dojo._Url` object relative to a module.
+ // example:
+ // | var pngPath = dojo.moduleUrl("acme","images/small.png");
+ // | console.dir(pngPath); // list the object properties
+ // | // create an image and set it's source to pngPath's value:
+ // | var img = document.createElement("img");
+ // | // NOTE: we assign the string representation of the url object
+ // | img.src = pngPath.toString();
+ // | // add our image to the document
+ // | dojo.body().appendChild(img);
+ // example:
+ // you may de-reference as far as you like down the package
+ // hierarchy. This is sometimes handy to avoid lenghty relative
+ // urls or for building portable sub-packages. In this example,
+ // the `acme.widget` and `acme.util` directories may be located
+ // under different roots (see `dojo.registerModulePath`) but the
+ // the modules which reference them can be unaware of their
+ // relative locations on the filesystem:
+ // | // somewhere in a configuration block
+ // | dojo.registerModulePath("acme.widget", "../../acme/widget");
+ // | dojo.registerModulePath("acme.util", "../../util");
+ // |
+ // | // ...
+ // |
+ // | // code in a module using acme resources
+ // | var tmpltPath = dojo.moduleUrl("acme.widget","templates/template.html");
+ // | var dataPath = dojo.moduleUrl("acme.util","resources/data.json");
+
+ var loc = d._getModuleSymbols(module).join('/');
if(!loc){ return null; }
if(loc.lastIndexOf("/") != loc.length-1){
loc += "/";
}
//If the path is an absolute path (starts with a / or is on another
//domain/xdomain) then don't add the baseUrl.
var colonIndex = loc.indexOf(":");
if(loc.charAt(0) != "/" && (colonIndex == -1 || colonIndex > loc.indexOf("/"))){
loc = d.baseUrl + loc;
}
- return new d._Url(loc, url); // String
+ return new d._Url(loc, url); // dojo._Url
}
})();
+/*=====
+dojo.isBrowser = {
+ // example:
+ // | if(dojo.isBrowser){ ... }
+};
+
+dojo.isFF = {
+ // example:
+ // | if(dojo.isFF > 1){ ... }
+};
+
+dojo.isIE = {
+ // example:
+ // | if(dojo.isIE > 6){
+ // | // we are IE7
+ // | }
+};
+
+dojo.isSafari = {
+ // example:
+ // | if(dojo.isSafari){ ... }
+ // example:
+ // Detect iPhone:
+ // | if(dojo.isSafari && navigator.userAgent.indexOf("iPhone") != -1){
+ // | // we are iPhone. Note, iPod touch reports "iPod" above and fails this test.
+ // | }
+};
+
+dojo = {
+ // isBrowser: Boolean
+ // True if the client is a web-browser
+ isBrowser: true,
+ // isFF: Number | undefined
+ // Version as a Number if client is FireFox. undefined otherwise. Corresponds to
+ // major detected FireFox version (1.5, 2, 3, etc.)
+ isFF: 2,
+ // isIE: Number | undefined
+ // Version as a Number if client is MSIE(PC). undefined otherwise. Corresponds to
+ // major detected IE version (6, 7, 8, etc.)
+ isIE: 6,
+ // isKhtml: Number | undefined
+ // Version as a Number if client is a KHTML browser. undefined otherwise. Corresponds to major
+ // detected version.
+ isKhtml: 0,
+ // isWebKit: Number | undefined
+ // Version as a Number if client is a WebKit-derived browser (Konqueror,
+ // Safari, Chrome, etc.). undefined otherwise.
+ isWebKit: 0,
+ // isMozilla: Number | undefined
+ // Version as a Number if client is a Mozilla-based browser (Firefox,
+ // SeaMonkey). undefined otherwise. Corresponds to major detected version.
+ isMozilla: 0,
+ // isOpera: Number | undefined
+ // Version as a Number if client is Opera. undefined otherwise. Corresponds to
+ // major detected version.
+ isOpera: 0,
+ // isSafari: Number | undefined
+ // Version as a Number if client is Safari or iPhone. undefined otherwise.
+ isSafari: 0,
+ // isChrome: Number | undefined
+ // Version as a Number if client is Chrome browser. undefined otherwise.
+ isChrome: 0
+ // isMac: Boolean
+ // True if the client runs on Mac
+}
+=====*/
+
if(typeof window != 'undefined'){
dojo.isBrowser = true;
dojo._name = "browser";
// attempt to figure out the path to dojo if it isn't set in the config
(function(){
var d = dojo;
+
// this is a scope protection closure. We set browser versions and grab
// the URL we were loaded from here.
// grab the node we were loaded from
if(document && document.getElementsByTagName){
var scripts = document.getElementsByTagName("script");
- var rePkg = /dojo(\.xd)?\.js([\?\.]|$)/i;
+ var rePkg = /dojo(\.xd)?\.js(\W|$)/i;
for(var i = 0; i < scripts.length; i++){
var src = scripts[i].getAttribute("src");
if(!src){ continue; }
var m = src.match(rePkg);
if(m){
// find out where we came from
- if(!djConfig["baseUrl"]){
- djConfig["baseUrl"] = src.substring(0, m.index);
+ if(!d.config.baseUrl){
+ d.config.baseUrl = src.substring(0, m.index);
}
// and find out if we need to modify our behavior
var cfg = scripts[i].getAttribute("djConfig");
if(cfg){
var cfgo = eval("({ "+cfg+" })");
for(var x in cfgo){
- djConfig[x] = cfgo[x];
+ dojo.config[x] = cfgo[x];
}
}
break; // "first Dojo wins"
}
}
}
- d.baseUrl = djConfig["baseUrl"];
+ d.baseUrl = d.config.baseUrl;
// fill in the rendering support information in dojo.render.*
var n = navigator;
- var dua = n.userAgent;
- var dav = n.appVersion;
- var tv = parseFloat(dav);
-
- d.isOpera = (dua.indexOf("Opera") >= 0) ? tv : 0;
- d.isKhtml = (dav.indexOf("Konqueror") >= 0)||(dav.indexOf("Safari") >= 0) ? tv : 0;
- if(dav.indexOf("Safari") >= 0){
- d.isSafari = parseFloat(dav.split("Version/")[1]) || 2;
- }
- var geckoPos = dua.indexOf("Gecko");
- d.isMozilla = d.isMoz = ((geckoPos >= 0)&&(!d.isKhtml)) ? tv : 0;
- d.isFF = 0;
- d.isIE = 0;
- try{
- if(d.isMoz){
- d.isFF = parseFloat(dua.split("Firefox/")[1].split(" ")[0]);
- }
- if((document.all)&&(!d.isOpera)){
- d.isIE = parseFloat(dav.split("MSIE ")[1].split(";")[0]);
- }
- }catch(e){}
+ var dua = n.userAgent,
+ dav = n.appVersion,
+ tv = parseFloat(dav);
+
+ if(dua.indexOf("Opera") >= 0){ d.isOpera = tv; }
+ if(dua.indexOf("AdobeAIR") >= 0){ d.isAIR = 1; }
+ d.isKhtml = (dav.indexOf("Konqueror") >= 0) ? tv : 0;
+ d.isWebKit = parseFloat(dua.split("WebKit/")[1]) || undefined;
+ d.isChrome = parseFloat(dua.split("Chrome/")[1]) || undefined;
+ d.isMac = dav.indexOf("Macintosh") >= 0;
+
+ // safari detection derived from:
+ // http://developer.apple.com/internet/safari/faq.html#anchor2
+ // http://developer.apple.com/internet/safari/uamatrix.html
+ var index = Math.max(dav.indexOf("WebKit"), dav.indexOf("Safari"), 0);
+ if(index && !dojo.isChrome){
+ // try to grab the explicit Safari version first. If we don't get
+ // one, look for less than 419.3 as the indication that we're on something
+ // "Safari 2-ish".
+ d.isSafari = parseFloat(dav.split("Version/")[1]);
+ if(!d.isSafari || parseFloat(dav.substr(index + 7)) <= 419.3){
+ d.isSafari = 2;
+ }
+ }
+
+ if(dua.indexOf("Gecko") >= 0 && !d.isKhtml && !d.isWebKit){ d.isMozilla = d.isMoz = tv; }
+ if(d.isMoz){
+ //We really need to get away from this. Consider a sane isGecko approach for the future.
+ d.isFF = parseFloat(dua.split("Firefox/")[1] || dua.split("Minefield/")[1]) || undefined;
+ }
+ if(document.all && !d.isOpera){
+ d.isIE = parseFloat(dav.split("MSIE ")[1]) || undefined;
+ //In cases where the page has an HTTP header or META tag with
+ //X-UA-Compatible, then it is in emulation mode.
+ //Make sure isIE reflects the desired version.
+ //document.documentMode of 5 means quirks mode.
+ //Only switch the value if documentMode's major version
+ //is different from isIE's major version.
+ var mode = document.documentMode;
+ if(mode && mode != 5 && Math.floor(d.isIE) != mode){
+ d.isIE = mode;
+ }
+ }
//Workaround to get local file loads of dojo to work on IE 7
//by forcing to not use native xhr.
- if(dojo.isIE && (window.location.protocol === "file:")){
- djConfig.ieForceActiveXXhr=true;
- }
-
- var cm = document["compatMode"];
- d.isQuirks = (cm == "BackCompat")||(cm == "QuirksMode")||(d.isIE < 6);
+ if(dojo.isIE && window.location.protocol === "file:"){
+ dojo.config.ieForceActiveXXhr=true;
+ }
+
+ d.isQuirks = document.compatMode == "BackCompat";
// TODO: is the HTML LANG attribute relevant?
- d.locale = djConfig.locale || (d.isIE ? n.userLanguage : n.language).toLowerCase();
-
- d._println = console.debug;
+ d.locale = dojo.config.locale || (d.isIE ? n.userLanguage : n.language).toLowerCase();
// These are in order of decreasing likelihood; this will change in time.
- d._XMLHTTP_PROGIDS = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'];
-
- d._xhrObj= function(){
+ d._XMLHTTP_PROGIDS = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'];
+
+ d._xhrObj = function(){
// summary:
- // does the work of portably generating a new XMLHTTPRequest
- // object.
- var http = null;
- var last_e = null;
- if(!dojo.isIE || !djConfig.ieForceActiveXXhr){
- try{ http = new XMLHttpRequest(); }catch(e){}
- }
+ // does the work of portably generating a new XMLHTTPRequest object.
+ var http, last_e;
+ if(!dojo.isIE || !dojo.config.ieForceActiveXXhr){
+ try{ http = new XMLHttpRequest(); }catch(e){}
+ }
if(!http){
for(var i=0; i<3; ++i){
- var progid = dojo._XMLHTTP_PROGIDS[i];
+ var progid = d._XMLHTTP_PROGIDS[i];
try{
http = new ActiveXObject(progid);
}catch(e){
last_e = e;
}
if(http){
- dojo._XMLHTTP_PROGIDS = [progid]; // so faster next time
+ d._XMLHTTP_PROGIDS = [progid]; // so faster next time
break;
}
}
}
-
+
if(!http){
throw new Error("XMLHTTP not available: "+last_e);
}
return http; // XMLHTTPRequest instance
}
d._isDocumentOk = function(http){
- var stat = http.status || 0;
- return ( (stat>=200)&&(stat<300))|| // Boolean
- (stat==304)|| // allow any 2XX response code
- (stat==1223)|| // get it out of the cache
- (!stat && (location.protocol=="file:" || location.protocol=="chrome:") ); // Internet Explorer mangled the status code
+ var stat = http.status || 0,
+ lp = location.protocol;
+ return (stat >= 200 && stat < 300) || // Boolean
+ stat == 304 || // allow any 2XX response code
+ stat == 1223 || // get it out of the cache
+ (!stat && (lp == "file:" || lp == "chrome:" || lp == "app:") ); // Internet Explorer mangled the status code OR we're Titanium requesting a local file
}
//See if base tag is in use.
//This is to fix http://trac.dojotoolkit.org/ticket/3973,
//but really, we need to find out how to get rid of the dojo._Url reference
//below and still have DOH work with the dojo.i18n test following some other
//test that uses the test frame to load a document (trac #2757).
//Opera still has problems, but perhaps a larger issue of base tag support
//with XHR requests (hasBase is true, but the request is still made to document
//path, not base path).
var owloc = window.location+"";
var base = document.getElementsByTagName("base");
var hasBase = (base && base.length > 0);
d._getText = function(/*URI*/ uri, /*Boolean*/ fail_ok){
// summary: Read the contents of the specified uri and return those contents.
// uri:
// A relative or absolute uri. If absolute, it still must be in
// the same "domain" as we are.
// fail_ok:
// Default false. If fail_ok and loading fails, return null
// instead of throwing.
// returns: The response text. null is returned when there is a
// failure and failure is okay (an exception otherwise)
- // alert("_getText: " + uri);
-
// NOTE: must be declared before scope switches ie. this._xhrObj()
- var http = this._xhrObj();
+ var http = d._xhrObj();
if(!hasBase && dojo._Url){
uri = (new dojo._Url(owloc, uri)).toString();
}
- /*
- console.debug("_getText:", uri);
- console.debug(window.location+"");
- alert(uri);
- */
+
+ if(d.config.cacheBust){
+ //Make sure we have a string before string methods are used on uri
+ uri += "";
+ uri += (uri.indexOf("?") == -1 ? "?" : "&") + String(d.config.cacheBust).replace(/\W+/g,"");
+ }
http.open('GET', uri, false);
try{
http.send(null);
- // alert(http);
if(!d._isDocumentOk(http)){
var err = Error("Unable to load "+uri+" status:"+ http.status);
err.status = http.status;
err.responseText = http.responseText;
throw err;
}
}catch(e){
if(fail_ok){ return null; } // null
// rethrow the exception
throw e;
}
return http.responseText; // String
}
- })();
-
- dojo._initFired = false;
- // BEGIN DOMContentLoaded, from Dean Edwards (http://dean.edwards.name/weblog/2006/06/again/)
- dojo._loadInit = function(e){
- dojo._initFired = true;
- // allow multiple calls, only first one will take effect
- // A bug in khtml calls events callbacks for document for event which isnt supported
- // for example a created contextmenu event calls DOMContentLoaded, workaround
- var type = (e && e.type) ? e.type.toLowerCase() : "load";
- if(arguments.callee.initialized || (type!="domcontentloaded" && type!="load")){ return; }
- arguments.callee.initialized = true;
- if(typeof dojo["_khtmlTimer"] != 'undefined'){
- clearInterval(dojo._khtmlTimer);
- delete dojo._khtmlTimer;
- }
-
- if(dojo._inFlightCount == 0){
- dojo._modulesLoaded();
- }
- }
-
- // START DOMContentLoaded
- // Mozilla and Opera 9 expose the event we could use
- if(document.addEventListener){
- // NOTE:
- // due to a threading issue in Firefox 2.0, we can't enable
- // DOMContentLoaded on that platform. For more information, see:
- // http://trac.dojotoolkit.org/ticket/1704
- if(dojo.isOpera|| (dojo.isMoz && (djConfig["enableMozDomContentLoaded"] === true))){
- document.addEventListener("DOMContentLoaded", dojo._loadInit, null);
- }
-
- // mainly for Opera 8.5, won't be fired if DOMContentLoaded fired already.
- // also used for Mozilla because of trac #1640
- window.addEventListener("load", dojo._loadInit, null);
- }
-
- if(/(WebKit|khtml)/i.test(navigator.userAgent)){ // sniff
- dojo._khtmlTimer = setInterval(function(){
- if(/loaded|complete/.test(document.readyState)){
- dojo._loadInit(); // call the onload handler
- }
- }, 10);
- }
- // END DOMContentLoaded
-
- (function(){
+
var _w = window;
var _handleNodeEvent = function(/*String*/evtName, /*Function*/fp){
// summary:
// non-destructively adds the specified function to the node's
// evtName handler.
// evtName: should be in the form "onclick" for "onclick" handlers.
// Make sure you pass in the "on" part.
- var oldHandler = _w[evtName] || function(){};
- _w[evtName] = function(){
+ var _a = _w.attachEvent || _w.addEventListener;
+ evtName = _w.attachEvent ? evtName : evtName.substring(2);
+ _a(evtName, function(){
fp.apply(_w, arguments);
- oldHandler.apply(_w, arguments);
- }
- }
+ }, false);
+ };
+
+
+ d._windowUnloaders = [];
+
+ d.windowUnloaded = function(){
+ // summary:
+ // signal fired by impending window destruction. You may use
+ // dojo.addOnWindowUnload() to register a listener for this
+ // event. NOTE: if you wish to dojo.connect() to this method
+ // to perform page/application cleanup, be aware that this
+ // event WILL NOT fire if no handler has been registered with
+ // dojo.addOnWindowUnload. This behavior started in Dojo 1.3.
+ // Previous versions always triggered dojo.windowUnloaded. See
+ // dojo.addOnWindowUnload for more info.
+ var mll = d._windowUnloaders;
+ while(mll.length){
+ (mll.pop())();
+ }
+ };
+
+ var _onWindowUnloadAttached = 0;
+ d.addOnWindowUnload = function(/*Object?|Function?*/obj, /*String|Function?*/functionName){
+ // summary:
+ // registers a function to be triggered when window.onunload
+ // fires.
+ // description:
+ // The first time that addOnWindowUnload is called Dojo
+ // will register a page listener to trigger your unload
+ // handler with. Note that registering these handlers may
+ // destory "fastback" page caching in browsers that support
+ // it. Be careful trying to modify the DOM or access
+ // JavaScript properties during this phase of page unloading:
+ // they may not always be available. Consider
+ // dojo.addOnUnload() if you need to modify the DOM or do
+ // heavy JavaScript work since it fires at the eqivalent of
+ // the page's "onbeforeunload" event.
+ // example:
+ // | dojo.addOnWindowUnload(functionPointer)
+ // | dojo.addOnWindowUnload(object, "functionName");
+ // | dojo.addOnWindowUnload(object, function(){ /* ... */});
+
+ d._onto(d._windowUnloaders, obj, functionName);
+ if(!_onWindowUnloadAttached){
+ _onWindowUnloadAttached = 1;
+ _handleNodeEvent("onunload", d.windowUnloaded);
+ }
+ };
+
+ var _onUnloadAttached = 0;
+ d.addOnUnload = function(/*Object?|Function?*/obj, /*String|Function?*/functionName){
+ // summary:
+ // registers a function to be triggered when the page unloads.
+ // description:
+ // The first time that addOnUnload is called Dojo will
+ // register a page listener to trigger your unload handler
+ // with.
+ //
+ // In a browser enviroment, the functions will be triggered
+ // during the window.onbeforeunload event. Be careful of doing
+ // too much work in an unload handler. onbeforeunload can be
+ // triggered if a link to download a file is clicked, or if
+ // the link is a javascript: link. In these cases, the
+ // onbeforeunload event fires, but the document is not
+ // actually destroyed. So be careful about doing destructive
+ // operations in a dojo.addOnUnload callback.
+ //
+ // Further note that calling dojo.addOnUnload will prevent
+ // browsers from using a "fast back" cache to make page
+ // loading via back button instantaneous.
+ // example:
+ // | dojo.addOnUnload(functionPointer)
+ // | dojo.addOnUnload(object, "functionName")
+ // | dojo.addOnUnload(object, function(){ /* ... */});
+
+ d._onto(d._unloaders, obj, functionName);
+ if(!_onUnloadAttached){
+ _onUnloadAttached = 1;
+ _handleNodeEvent("onbeforeunload", dojo.unloaded);
+ }
+ };
+
+ })();
+
+ //START DOMContentLoaded
+ dojo._initFired = false;
+ dojo._loadInit = function(e){
+ if(!dojo._initFired){
+ dojo._initFired = true;
+
+ //Help out IE to avoid memory leak.
+ if(!dojo.config.afterOnLoad && window.detachEvent){
+ window.detachEvent("onload", dojo._loadInit);
+ }
+
+ if(dojo._inFlightCount == 0){
+ dojo._modulesLoaded();
+ }
+ }
+ }
+
+ if(!dojo.config.afterOnLoad){
+ if(document.addEventListener){
+ //Standards. Hooray! Assumption here that if standards based,
+ //it knows about DOMContentLoaded. It is OK if it does not, the fall through
+ //to window onload should be good enough.
+ document.addEventListener("DOMContentLoaded", dojo._loadInit, false);
+ window.addEventListener("load", dojo._loadInit, false);
+ }else if(window.attachEvent){
+ window.attachEvent("onload", dojo._loadInit);
+ }
+ }
if(dojo.isIE){
- // for Internet Explorer. readyState will not be achieved on init
- // call, but dojo doesn't need it however, we'll include it
- // because we don't know if there are other functions added that
- // might. Note that this has changed because the build process
- // strips all comments -- including conditional ones.
-
+ // for Internet Explorer. readyState will not be achieved on init
+ // call, but dojo doesn't need it however, we'll include it
+ // because we don't know if there are other functions added that
+ // might. Note that this has changed because the build process
+ // strips all comments -- including conditional ones.
+ if(!dojo.config.afterOnLoad && !dojo.config.skipIeDomLoaded){
document.write('<scr'+'ipt defer src="//:" '
- + 'onreadystatechange="if(this.readyState==\'complete\'){dojo._loadInit();}">'
+ + 'onreadystatechange="if(this.readyState==\'complete\'){' + dojo._scopeName + '._loadInit();}">'
+ '</scr'+'ipt>'
);
-
- // IE WebControl hosted in an application can fire "beforeunload" and "unload"
- // events when control visibility changes, causing Dojo to unload too soon. The
- // following code fixes the problem
- // Reference: http://support.microsoft.com/default.aspx?scid=kb;en-us;199155
- var _unloading = true;
- _handleNodeEvent("onbeforeunload", function(){
- _w.setTimeout(function(){ _unloading = false; }, 0);
- });
- _handleNodeEvent("onunload", function(){
- if(_unloading){ dojo.unloaded(); }
- });
-
- try{
- document.namespaces.add("v","urn:schemas-microsoft-com:vml");
- document.createStyleSheet().addRule("v\\:*", "behavior:url(#default#VML)");
- }catch(e){}
- }else{
- // FIXME: dojo.unloaded requires dojo scope, so using anon function wrapper.
- _handleNodeEvent("onbeforeunload", function() { dojo.unloaded(); });
- }
-
- })();
+ }
+
+ try{
+ document.namespaces.add("v","urn:schemas-microsoft-com:vml");
+ var vmlElems = ["*", "group", "roundrect", "oval", "shape", "rect", "imagedata"],
+ i = 0, l = 1, s = document.createStyleSheet();
+ if(dojo.isIE >= 8){
+ i = 1;
+ l = vmlElems.length;
+ }
+ for(; i < l; ++i){
+ s.addRule("v\\:" + vmlElems[i], "behavior:url(#default#VML); display:inline-block");
+ }
+ }catch(e){}
+ }
+ //END DOMContentLoaded
+
/*
OpenAjax.subscribe("OpenAjax", "onload", function(){
if(dojo._inFlightCount == 0){
dojo._modulesLoaded();
}
});
OpenAjax.subscribe("OpenAjax", "onunload", function(){
dojo.unloaded();
});
*/
} //if (typeof window != 'undefined')
+//Register any module paths set up in djConfig. Need to do this
+//in the hostenvs since hostenv_browser can read djConfig from a
+//script tag's attribute.
+(function(){
+ var mp = dojo.config["modulePaths"];
+ if(mp){
+ for(var param in mp){
+ dojo.registerModulePath(param, mp[param]);
+ }
+ }
+})();
+
//Load debug code if necessary.
-// dojo.requireIf((djConfig["isDebug"] || djConfig["debugAtAllCosts"]), "dojo.debug");
-
-//window.widget is for Dashboard detection
-//The full conditionals are spelled out to avoid issues during builds.
-//Builds may be looking for require/requireIf statements and processing them.
-// dojo.requireIf(djConfig["debugAtAllCosts"] && !window.widget && !djConfig["useXDomain"], "dojo.browser_debug");
-// dojo.requireIf(djConfig["debugAtAllCosts"] && !window.widget && djConfig["useXDomain"], "dojo.browser_debug_xd");
-
-if(djConfig.isDebug){
- dojo.require("dojo._firebug.firebug");
+if(dojo.config.isDebug){
+ dojo.require("dojo._firebug.firebug");
}
-if(djConfig.debugAtAllCosts){
- djConfig.useXDomain = true;
+if(dojo.config.debugAtAllCosts){
+ dojo.config.useXDomain = true;
dojo.require("dojo._base._loader.loader_xd");
dojo.require("dojo._base._loader.loader_debug");
dojo.require("dojo.i18n");
}
-};
-
if(!dojo._hasResource["dojo._base.lang"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo._base.lang"] = true;
dojo.provide("dojo._base.lang");
-// Crockford (ish) functions
-
-dojo.isString = function(/*anything*/ it){
- // summary: Return true if it is a String
- return typeof it == "string" || it instanceof String; // Boolean
-}
-
-dojo.isArray = function(/*anything*/ it){
- // summary: Return true if it is an Array
- return it && it instanceof Array || typeof it == "array"; // Boolean
-}
-
-/*=====
-dojo.isFunction = function(it){
- // summary: Return true if it is a Function
- // it: anything
-}
-=====*/
-
-dojo.isFunction = (function(){
- var _isFunction = function(/*anything*/ it){
- return typeof it == "function" || it instanceof Function; // Boolean
- };
-
- return dojo.isSafari ?
- // only slow this down w/ gratuitious casting in Safari since it's what's b0rken
- function(/*anything*/ it){
- if(typeof it == "function" && it == "[object NodeList]"){ return false; }
- return _isFunction(it); // Boolean
- } : _isFunction;
+(function(){
+ var d = dojo, opts = Object.prototype.toString;
+
+ // Crockford (ish) functions
+
+ dojo.isString = function(/*anything*/ it){
+ // summary:
+ // Return true if it is a String
+ return (typeof it == "string" || it instanceof String); // Boolean
+ }
+
+ dojo.isArray = function(/*anything*/ it){
+ // summary:
+ // Return true if it is an Array.
+ // Does not work on Arrays created in other windows.
+ return it && (it instanceof Array || typeof it == "array"); // Boolean
+ }
+
+ dojo.isFunction = function(/*anything*/ it){
+ // summary:
+ // Return true if it is a Function
+ return opts.call(it) === "[object Function]";
+ };
+
+ dojo.isObject = function(/*anything*/ it){
+ // summary:
+ // Returns true if it is a JavaScript object (or an Array, a Function
+ // or null)
+ return it !== undefined &&
+ (it === null || typeof it == "object" || d.isArray(it) || d.isFunction(it)); // Boolean
+ }
+
+ dojo.isArrayLike = function(/*anything*/ it){
+ // summary:
+ // similar to dojo.isArray() but more permissive
+ // description:
+ // Doesn't strongly test for "arrayness". Instead, settles for "isn't
+ // a string or number and has a length property". Arguments objects
+ // and DOM collections will return true when passed to
+ // dojo.isArrayLike(), but will return false when passed to
+ // dojo.isArray().
+ // returns:
+ // If it walks like a duck and quacks like a duck, return `true`
+ return it && it !== undefined && // Boolean
+ // keep out built-in constructors (Number, String, ...) which have length
+ // properties
+ !d.isString(it) && !d.isFunction(it) &&
+ !(it.tagName && it.tagName.toLowerCase() == 'form') &&
+ (d.isArray(it) || isFinite(it.length));
+ }
+
+ dojo.isAlien = function(/*anything*/ it){
+ // summary:
+ // Returns true if it is a built-in function or some other kind of
+ // oddball that *should* report as a function but doesn't
+ return it && !d.isFunction(it) && /\{\s*\[native code\]\s*\}/.test(String(it)); // Boolean
+ }
+
+ dojo.extend = function(/*Object*/ constructor, /*Object...*/ props){
+ // summary:
+ // Adds all properties and methods of props to constructor's
+ // prototype, making them available to all instances created with
+ // constructor.
+ for(var i=1, l=arguments.length; i<l; i++){
+ d._mixin(constructor.prototype, arguments[i]);
+ }
+ return constructor; // Object
+ }
+
+ dojo._hitchArgs = function(scope, method /*,...*/){
+ var pre = d._toArray(arguments, 2);
+ var named = d.isString(method);
+ return function(){
+ // arrayify arguments
+ var args = d._toArray(arguments);
+ // locate our method
+ var f = named ? (scope||d.global)[method] : method;
+ // invoke with collected args
+ return f && f.apply(scope || this, pre.concat(args)); // mixed
+ } // Function
+ }
+
+ dojo.hitch = function(/*Object*/scope, /*Function|String*/method /*,...*/){
+ // summary:
+ // Returns a function that will only ever execute in the a given scope.
+ // This allows for easy use of object member functions
+ // in callbacks and other places in which the "this" keyword may
+ // otherwise not reference the expected scope.
+ // Any number of default positional arguments may be passed as parameters
+ // beyond "method".
+ // Each of these values will be used to "placehold" (similar to curry)
+ // for the hitched function.
+ // scope:
+ // The scope to use when method executes. If method is a string,
+ // scope is also the object containing method.
+ // method:
+ // A function to be hitched to scope, or the name of the method in
+ // scope to be hitched.
+ // example:
+ // | dojo.hitch(foo, "bar")();
+ // runs foo.bar() in the scope of foo
+ // example:
+ // | dojo.hitch(foo, myFunction);
+ // returns a function that runs myFunction in the scope of foo
+ // example:
+ // Expansion on the default positional arguments passed along from
+ // hitch. Passed args are mixed first, additional args after.
+ // | var foo = { bar: function(a, b, c){ console.log(a, b, c); } };
+ // | var fn = dojo.hitch(foo, "bar", 1, 2);
+ // | fn(3); // logs "1, 2, 3"
+ // example:
+ // | var foo = { bar: 2 };
+ // | dojo.hitch(foo, function(){ this.bar = 10; })();
+ // execute an anonymous function in scope of foo
+
+ if(arguments.length > 2){
+ return d._hitchArgs.apply(d, arguments); // Function
+ }
+ if(!method){
+ method = scope;
+ scope = null;
+ }
+ if(d.isString(method)){
+ scope = scope || d.global;
+ if(!scope[method]){ throw(['dojo.hitch: scope["', method, '"] is null (scope="', scope, '")'].join('')); }
+ return function(){ return scope[method].apply(scope, arguments || []); }; // Function
+ }
+ return !scope ? method : function(){ return method.apply(scope, arguments || []); }; // Function
+ }
+
+ /*=====
+ dojo.delegate = function(obj, props){
+ // summary:
+ // Returns a new object which "looks" to obj for properties which it
+ // does not have a value for. Optionally takes a bag of properties to
+ // seed the returned object with initially.
+ // description:
+ // This is a small implementaton of the Boodman/Crockford delegation
+ // pattern in JavaScript. An intermediate object constructor mediates
+ // the prototype chain for the returned object, using it to delegate
+ // down to obj for property lookup when object-local lookup fails.
+ // This can be thought of similarly to ES4's "wrap", save that it does
+ // not act on types but rather on pure objects.
+ // obj:
+ // The object to delegate to for properties not found directly on the
+ // return object or in props.
+ // props:
+ // an object containing properties to assign to the returned object
+ // returns:
+ // an Object of anonymous type
+ // example:
+ // | var foo = { bar: "baz" };
+ // | var thinger = dojo.delegate(foo, { thud: "xyzzy"});
+ // | thinger.bar == "baz"; // delegated to foo
+ // | foo.thud == undefined; // by definition
+ // | thinger.thud == "xyzzy"; // mixed in from props
+ // | foo.bar = "thonk";
+ // | thinger.bar == "thonk"; // still delegated to foo's bar
+ }
+ =====*/
+
+ dojo.delegate = dojo._delegate = (function(){
+ // boodman/crockford delegation w/ cornford optimization
+ function TMP(){}
+ return function(obj, props){
+ TMP.prototype = obj;
+ var tmp = new TMP();
+ TMP.prototype = null;
+ if(props){
+ d._mixin(tmp, props);
+ }
+ return tmp; // Object
+ }
+ })();
+
+ /*=====
+ dojo._toArray = function(obj, offset, startWith){
+ // summary:
+ // Converts an array-like object (i.e. arguments, DOMCollection) to an
+ // array. Returns a new Array with the elements of obj.
+ // obj: Object
+ // the object to "arrayify". We expect the object to have, at a
+ // minimum, a length property which corresponds to integer-indexed
+ // properties.
+ // offset: Number?
+ // the location in obj to start iterating from. Defaults to 0.
+ // Optional.
+ // startWith: Array?
+ // An array to pack with the properties of obj. If provided,
+ // properties in obj are appended at the end of startWith and
+ // startWith is the returned array.
+ }
+ =====*/
+
+ var efficient = function(obj, offset, startWith){
+ return (startWith||[]).concat(Array.prototype.slice.call(obj, offset||0));
+ };
+
+ var slow = function(obj, offset, startWith){
+ var arr = startWith||[];
+ for(var x = offset || 0; x < obj.length; x++){
+ arr.push(obj[x]);
+ }
+ return arr;
+ };
+
+ dojo._toArray =
+ d.isIE ? function(obj){
+ return ((obj.item) ? slow : efficient).apply(this, arguments);
+ } :
+ efficient;
+
+ dojo.partial = function(/*Function|String*/method /*, ...*/){
+ // summary:
+ // similar to hitch() except that the scope object is left to be
+ // whatever the execution context eventually becomes.
+ // description:
+ // Calling dojo.partial is the functional equivalent of calling:
+ // | dojo.hitch(null, funcName, ...);
+ var arr = [ null ];
+ return d.hitch.apply(d, arr.concat(d._toArray(arguments))); // Function
+ }
+
+ var extraNames = d._extraNames, extraLen = extraNames.length, empty = {};
+
+ dojo.clone = function(/*anything*/ o){
+ // summary:
+ // Clones objects (including DOM nodes) and all children.
+ // Warning: do not clone cyclic structures.
+ if(!o || typeof o != "object" || d.isFunction(o)){
+ // null, undefined, any non-object, or function
+ return o; // anything
+ }
+ if(o.nodeType && "cloneNode" in o){
+ // DOM Node
+ return o.cloneNode(true); // Node
+ }
+ if(o instanceof Date){
+ // Date
+ return new Date(o.getTime()); // Date
+ }
+ var r, i, l, s, name;
+ if(d.isArray(o)){
+ // array
+ r = [];
+ for(i = 0, l = o.length; i < l; ++i){
+ if(i in o){
+ r.push(d.clone(o[i]));
+ }
+ }
+// we don't clone functions for performance reasons
+// }else if(d.isFunction(o)){
+// // function
+// r = function(){ return o.apply(this, arguments); };
+ }else{
+ // generic objects
+ r = o.constructor ? new o.constructor() : {};
+ }
+ for(name in o){
+ // the "tobj" condition avoid copying properties in "source"
+ // inherited from Object.prototype. For example, if target has a custom
+ // toString() method, don't overwrite it with the toString() method
+ // that source inherited from Object.prototype
+ s = o[name];
+ if(!(name in r) || (r[name] !== s && (!(name in empty) || empty[name] !== s))){
+ r[name] = d.clone(s);
+ }
+ }
+ // IE doesn't recognize some custom functions in for..in
+ if(extraLen){
+ for(i = 0; i < extraLen; ++i){
+ name = extraNames[i];
+ s = o[name];
+ if(!(name in r) || (r[name] !== s && (!(name in empty) || empty[name] !== s))){
+ r[name] = s; // functions only, we don't clone them
+ }
+ }
+ }
+ return r; // Object
+ }
+
+ /*=====
+ dojo.trim = function(str){
+ // summary:
+ // Trims whitespace from both sides of the string
+ // str: String
+ // String to be trimmed
+ // returns: String
+ // Returns the trimmed string
+ // description:
+ // This version of trim() was selected for inclusion into the base due
+ // to its compact size and relatively good performance
+ // (see [Steven Levithan's blog](http://blog.stevenlevithan.com/archives/faster-trim-javascript)
+ // Uses String.prototype.trim instead, if available.
+ // The fastest but longest version of this function is located at
+ // dojo.string.trim()
+ return ""; // String
+ }
+ =====*/
+
+ dojo.trim = String.prototype.trim ?
+ function(str){ return str.trim(); } :
+ function(str){ return str.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); };
+
+ /*=====
+ dojo.replace = function(tmpl, map, pattern){
+ // summary:
+ // Performs parameterized substitutions on a string. Throws an
+ // exception if any parameter is unmatched.
+ // tmpl: String
+ // String to be used as a template.
+ // map: Object|Function
+ // If an object, it is used as a dictionary to look up substitutions.
+ // If a function, it is called for every substitution with following
+ // parameters: a whole match, a name, an offset, and the whole template
+ // string (see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/replace
+ // for more details).
+ // pattern: RegEx?
+ // Optional regular expression objects that overrides the default pattern.
+ // Must be global and match one item. The default is: /\{([^\}]+)\}/g,
+ // which matches patterns like that: "{xxx}", where "xxx" is any sequence
+ // of characters, which doesn't include "}".
+ // returns: String
+ // Returns the substituted string.
+ // example:
+ // | // uses a dictionary for substitutions:
+ // | dojo.replace("Hello, {name.first} {name.last} AKA {nick}!",
+ // | {
+ // | nick: "Bob",
+ // | name: {
+ // | first: "Robert",
+ // | middle: "X",
+ // | last: "Cringely"
+ // | }
+ // | });
+ // | // returns: Hello, Robert Cringely AKA Bob!
+ // example:
+ // | // uses an array for substitutions:
+ // | dojo.replace("Hello, {0} {2}!",
+ // | ["Robert", "X", "Cringely"]);
+ // | // returns: Hello, Robert Cringely!
+ // example:
+ // | // uses a function for substitutions:
+ // | function sum(a){
+ // | var t = 0;
+ // | dojo.forEach(a, function(x){ t += x; });
+ // | return t;
+ // | }
+ // | dojo.replace(
+ // | "{count} payments averaging {avg} USD per payment.",
+ // | dojo.hitch(
+ // | { payments: [11, 16, 12] },
+ // | function(_, key){
+ // | switch(key){
+ // | case "count": return this.payments.length;
+ // | case "min": return Math.min.apply(Math, this.payments);
+ // | case "max": return Math.max.apply(Math, this.payments);
+ // | case "sum": return sum(this.payments);
+ // | case "avg": return sum(this.payments) / this.payments.length;
+ // | }
+ // | }
+ // | )
+ // | );
+ // | // prints: 3 payments averaging 13 USD per payment.
+ // example:
+ // | // uses an alternative PHP-like pattern for substitutions:
+ // | dojo.replace("Hello, ${0} ${2}!",
+ // | ["Robert", "X", "Cringely"], /\$\{([^\}]+)\}/g);
+ // | // returns: Hello, Robert Cringely!
+ return ""; // String
+ }
+ =====*/
+
+ var _pattern = /\{([^\}]+)\}/g;
+ dojo.replace = function(tmpl, map, pattern){
+ return tmpl.replace(pattern || _pattern, d.isFunction(map) ?
+ map : function(_, k){ return d.getObject(k, false, map); });
+ };
})();
-dojo.isObject = function(/*anything*/ it){
- // summary:
- // Returns true if it is a JavaScript object (or an Array, a Function or null)
- return it !== undefined &&
- (it === null || typeof it == "object" || dojo.isArray(it) || dojo.isFunction(it)); // Boolean
-}
-
-dojo.isArrayLike = function(/*anything*/ it){
- // summary:
- // similar to dojo.isArray() but more permissive
- // description:
- // Doesn't strongly test for "arrayness". Instead, settles for "isn't
- // a string or number and has a length property". Arguments objects
- // and DOM collections will return true when passed to
- // dojo.isArrayLike(), but will return false when passed to
- // dojo.isArray().
- // return:
- // If it walks like a duck and quicks like a duck, return true
- var d = dojo;
- return it && it !== undefined &&
- // keep out built-in constructors (Number, String, ...) which have length
- // properties
- !d.isString(it) && !d.isFunction(it) &&
- !(it.tagName && it.tagName.toLowerCase() == 'form') &&
- (d.isArray(it) || isFinite(it.length)); // Boolean
-}
-
-dojo.isAlien = function(/*anything*/ it){
- // summary:
- // Returns true if it is a built-in function or some other kind of
- // oddball that *should* report as a function but doesn't
- return it && !dojo.isFunction(it) && /\{\s*\[native code\]\s*\}/.test(String(it)); // Boolean
-}
-
-dojo.extend = function(/*Object*/ constructor, /*Object...*/ props){
- // summary:
- // Adds all properties and methods of props to constructor's
- // prototype, making them available to all instances created with
- // constructor.
- for(var i=1, l=arguments.length; i<l; i++){
- dojo._mixin(constructor.prototype, arguments[i]);
- }
- return constructor; // Object
-}
-
-dojo._hitchArgs = function(scope, method /*,...*/){
- var pre = dojo._toArray(arguments, 2);
- var named = dojo.isString(method);
- return function(){
- // arrayify arguments
- var args = dojo._toArray(arguments);
- // locate our method
- var f = named ? (scope||dojo.global)[method] : method;
- // invoke with collected args
- return f && f.apply(scope || this, pre.concat(args)); // mixed
- } // Function
}
-dojo.hitch = function(/*Object*/scope, /*Function|String*/method /*,...*/){
- // summary:
- // Returns a function that will only ever execute in the a given scope.
- // This allows for easy use of object member functions
- // in callbacks and other places in which the "this" keyword may
- // otherwise not reference the expected scope.
- // Any number of default positional arguments may be passed as parameters
- // beyond "method".
- // Each of these values will be used to "placehold" (similar to curry)
- // for the hitched function.
- // scope:
- // The scope to use when method executes. If method is a string,
- // scope is also the object containing method.
- // method:
- // A function to be hitched to scope, or the name of the method in
- // scope to be hitched.
- // example:
- // | dojo.hitch(foo, "bar")();
- // runs foo.bar() in the scope of foo
- // example:
- // | dojo.hitch(foo, myFunction);
- // returns a function that runs myFunction in the scope of foo
- if(arguments.length > 2){
- return dojo._hitchArgs.apply(dojo, arguments); // Function
- }
- if(!method){
- method = scope;
- scope = null;
- }
- if(dojo.isString(method)){
- scope = scope || dojo.global;
- if(!scope[method]){ throw(['dojo.hitch: scope["', method, '"] is null (scope="', scope, '")'].join('')); }
- return function(){ return scope[method].apply(scope, arguments || []); }; // Function
- }
- return !scope ? method : function(){ return method.apply(scope, arguments || []); }; // Function
-}
-
-/*=====
-dojo.delegate = function(obj, props){
- // summary:
- // returns a new object which "looks" to obj for properties which it
- // does not have a value for. Optionally takes a bag of properties to
- // seed the returned object with initially.
- // description:
- // This is a small implementaton of the Boodman/Crockford delegation
- // pattern in JavaScript. An intermediate object constructor mediates
- // the prototype chain for the returned object, using it to delegate
- // down to obj for property lookup when object-local lookup fails.
- // This can be thought of similarly to ES4's "wrap", save that it does
- // not act on types but rather on pure objects.
- // obj:
- // The object to delegate to for properties not found directly on the
- // return object or in props.
- // props:
- // an object containing properties to assign to the returned object
- // returns:
- // an Object of anonymous type
- // example:
- // | var foo = { bar: "baz" };
- // | var thinger = dojo.delegate(foo, { thud: "xyzzy"});
- // | thinger.bar == "baz"; // delegated to foo
- // | foo.xyzzy == undefined; // by definition
- // | thinger.xyzzy == "xyzzy"; // mixed in from props
- // | foo.bar = "thonk";
- // | thinger.bar == "thonk"; // still delegated to foo's bar
-}
-=====*/
-
-
-dojo.delegate = dojo._delegate = function(obj, props){
-
- // boodman/crockford delegation
- function TMP(){};
- TMP.prototype = obj;
- var tmp = new TMP();
- if(props){
- dojo.mixin(tmp, props);
- }
- return tmp; // Object
-}
-
-dojo.partial = function(/*Function|String*/method /*, ...*/){
- // summary:
- // similar to hitch() except that the scope object is left to be
- // whatever the execution context eventually becomes.
- // description:
- // Calling dojo.partial is the functional equivalent of calling:
- // | dojo.hitch(null, funcName, ...);
- var arr = [ null ];
- return dojo.hitch.apply(dojo, arr.concat(dojo._toArray(arguments))); // Function
-}
-
-dojo._toArray = function(/*Object*/obj, /*Number?*/offset, /*Array?*/ startWith){
- // summary:
- // Converts an array-like object (i.e. arguments, DOMCollection)
- // to an array. Returns a new Array object.
- // obj:
- // the object to "arrayify". We expect the object to have, at a
- // minimum, a length property which corresponds to integer-indexed
- // properties.
- // offset:
- // the location in obj to start iterating from. Defaults to 0. Optional.
- // startWith:
- // An array to pack with the properties of obj. If provided,
- // properties in obj are appended at the end of startWith and
- // startWith is the returned array.
- var arr = startWith||[];
- for(var x = offset || 0; x < obj.length; x++){
- arr.push(obj[x]);
- }
- return arr; // Array
-}
-
-dojo.clone = function(/*anything*/ o){
- // summary:
- // Clones objects (including DOM nodes) and all children.
- // Warning: do not clone cyclic structures.
- if(!o){ return o; }
- if(dojo.isArray(o)){
- var r = [];
- for(var i = 0; i < o.length; ++i){
- r.push(dojo.clone(o[i]));
- }
- return r; // Array
- }
- if(!dojo.isObject(o)){
- return o; /*anything*/
- }
- if(o.nodeType && o.cloneNode){ // isNode
- return o.cloneNode(true); // Node
- }
- if(o instanceof Date){
- return new Date(o.getTime()); // Date
- }
- // Generic objects
- var r = new o.constructor(); // specific to dojo.declare()'d classes!
- for(var i in o){
- if(!(i in r) || r[i] != o[i]){
- r[i] = dojo.clone(o[i]);
- }
- }
- return r; // Object
-}
-
-dojo.trim = function(/*String*/ str){
- // summary:
- // trims whitespaces from both sides of the string
- // description:
- // This version of trim() was selected for inclusion into the base due
- // to its compact size and relatively good performance (see Steven
- // Levithan's blog:
- // http://blog.stevenlevithan.com/archives/faster-trim-javascript).
- // The fastest but longest version of this function is located at
- // dojo.string.trim()
- return str.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); // String
-}
+if(!dojo._hasResource["dojo._base.array"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojo._base.array"] = true;
+
+dojo.provide("dojo._base.array");
+
+(function(){
+ var _getParts = function(arr, obj, cb){
+ return [
+ (typeof arr == "string") ? arr.split("") : arr,
+ obj || dojo.global,
+ // FIXME: cache the anonymous functions we create here?
+ (typeof cb == "string") ? new Function("item", "index", "array", cb) : cb
+ ];
+ };
+
+ var everyOrSome = function(/*Boolean*/every, /*Array|String*/arr, /*Function|String*/callback, /*Object?*/thisObject){
+ var _p = _getParts(arr, thisObject, callback); arr = _p[0];
+ for(var i=0,l=arr.length; i<l; ++i){
+ var result = !!_p[2].call(_p[1], arr[i], i, arr);
+ if(every ^ result){
+ return result; // Boolean
+ }
+ }
+ return every; // Boolean
+ };
+
+ dojo.mixin(dojo, {
+ indexOf: function( /*Array*/ array,
+ /*Object*/ value,
+ /*Integer?*/ fromIndex,
+ /*Boolean?*/ findLast){
+ // summary:
+ // locates the first index of the provided value in the
+ // passed array. If the value is not found, -1 is returned.
+ // description:
+ // This method corresponds to the JavaScript 1.6 Array.indexOf method, with one difference: when
+ // run over sparse arrays, the Dojo function invokes the callback for every index whereas JavaScript
+ // 1.6's indexOf skips the holes in the sparse array.
+ // For details on this method, see:
+ // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/indexOf
+
+ var step = 1, end = array.length || 0, i = 0;
+ if(findLast){
+ i = end - 1;
+ step = end = -1;
+ }
+ if(fromIndex != undefined){ i = fromIndex; }
+ if((findLast && i > end) || i < end){
+ for(; i != end; i += step){
+ if(array[i] == value){ return i; }
+ }
+ }
+ return -1; // Number
+ },
+
+ lastIndexOf: function(/*Array*/array, /*Object*/value, /*Integer?*/fromIndex){
+ // summary:
+ // locates the last index of the provided value in the passed
+ // array. If the value is not found, -1 is returned.
+ // description:
+ // This method corresponds to the JavaScript 1.6 Array.lastIndexOf method, with one difference: when
+ // run over sparse arrays, the Dojo function invokes the callback for every index whereas JavaScript
+ // 1.6's lastIndexOf skips the holes in the sparse array.
+ // For details on this method, see:
+ // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/lastIndexOf
+ return dojo.indexOf(array, value, fromIndex, true); // Number
+ },
+
+ forEach: function(/*Array|String*/arr, /*Function|String*/callback, /*Object?*/thisObject){
+ // summary:
+ // for every item in arr, callback is invoked. Return values are ignored.
+ // If you want to break out of the loop, consider using dojo.every() or dojo.some().
+ // forEach does not allow breaking out of the loop over the items in arr.
+ // arr:
+ // the array to iterate over. If a string, operates on individual characters.
+ // callback:
+ // a function is invoked with three arguments: item, index, and array
+ // thisObject:
+ // may be used to scope the call to callback
+ // description:
+ // This function corresponds to the JavaScript 1.6 Array.forEach() method, with one difference: when
+ // run over sparse arrays, this implemenation passes the "holes" in the sparse array to
+ // the callback function with a value of undefined. JavaScript 1.6's forEach skips the holes in the sparse array.
+ // For more details, see:
+ // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/forEach
+ // example:
+ // | // log out all members of the array:
+ // | dojo.forEach(
+ // | [ "thinger", "blah", "howdy", 10 ],
+ // | function(item){
+ // | console.log(item);
+ // | }
+ // | );
+ // example:
+ // | // log out the members and their indexes
+ // | dojo.forEach(
+ // | [ "thinger", "blah", "howdy", 10 ],
+ // | function(item, idx, arr){
+ // | console.log(item, "at index:", idx);
+ // | }
+ // | );
+ // example:
+ // | // use a scoped object member as the callback
+ // |
+ // | var obj = {
+ // | prefix: "logged via obj.callback:",
+ // | callback: function(item){
+ // | console.log(this.prefix, item);
+ // | }
+ // | };
+ // |
+ // | // specifying the scope function executes the callback in that scope
+ // | dojo.forEach(
+ // | [ "thinger", "blah", "howdy", 10 ],
+ // | obj.callback,
+ // | obj
+ // | );
+ // |
+ // | // alternately, we can accomplish the same thing with dojo.hitch()
+ // | dojo.forEach(
+ // | [ "thinger", "blah", "howdy", 10 ],
+ // | dojo.hitch(obj, "callback")
+ // | );
+
+ // match the behavior of the built-in forEach WRT empty arrs
+ if(!arr || !arr.length){ return; }
+
+ // FIXME: there are several ways of handilng thisObject. Is
+ // dojo.global always the default context?
+ var _p = _getParts(arr, thisObject, callback); arr = _p[0];
+ for(var i=0,l=arr.length; i<l; ++i){
+ _p[2].call(_p[1], arr[i], i, arr);
+ }
+ },
+
+ every: function(/*Array|String*/arr, /*Function|String*/callback, /*Object?*/thisObject){
+ // summary:
+ // Determines whether or not every item in arr satisfies the
+ // condition implemented by callback.
+ // arr:
+ // the array to iterate on. If a string, operates on individual characters.
+ // callback:
+ // a function is invoked with three arguments: item, index,
+ // and array and returns true if the condition is met.
+ // thisObject:
+ // may be used to scope the call to callback
+ // description:
+ // This function corresponds to the JavaScript 1.6 Array.every() method, with one difference: when
+ // run over sparse arrays, this implemenation passes the "holes" in the sparse array to
+ // the callback function with a value of undefined. JavaScript 1.6's every skips the holes in the sparse array.
+ // For more details, see:
+ // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/every
+ // example:
+ // | // returns false
+ // | dojo.every([1, 2, 3, 4], function(item){ return item>1; });
+ // example:
+ // | // returns true
+ // | dojo.every([1, 2, 3, 4], function(item){ return item>0; });
+ return everyOrSome(true, arr, callback, thisObject); // Boolean
+ },
+
+ some: function(/*Array|String*/arr, /*Function|String*/callback, /*Object?*/thisObject){
+ // summary:
+ // Determines whether or not any item in arr satisfies the
+ // condition implemented by callback.
+ // arr:
+ // the array to iterate over. If a string, operates on individual characters.
+ // callback:
+ // a function is invoked with three arguments: item, index,
+ // and array and returns true if the condition is met.
+ // thisObject:
+ // may be used to scope the call to callback
+ // description:
+ // This function corresponds to the JavaScript 1.6 Array.some() method, with one difference: when
+ // run over sparse arrays, this implemenation passes the "holes" in the sparse array to
+ // the callback function with a value of undefined. JavaScript 1.6's some skips the holes in the sparse array.
+ // For more details, see:
+ // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/some
+ // example:
+ // | // is true
+ // | dojo.some([1, 2, 3, 4], function(item){ return item>1; });
+ // example:
+ // | // is false
+ // | dojo.some([1, 2, 3, 4], function(item){ return item<1; });
+ return everyOrSome(false, arr, callback, thisObject); // Boolean
+ },
+
+ map: function(/*Array|String*/arr, /*Function|String*/callback, /*Function?*/thisObject){
+ // summary:
+ // applies callback to each element of arr and returns
+ // an Array with the results
+ // arr:
+ // the array to iterate on. If a string, operates on
+ // individual characters.
+ // callback:
+ // a function is invoked with three arguments, (item, index,
+ // array), and returns a value
+ // thisObject:
+ // may be used to scope the call to callback
+ // description:
+ // This function corresponds to the JavaScript 1.6 Array.map() method, with one difference: when
+ // run over sparse arrays, this implemenation passes the "holes" in the sparse array to
+ // the callback function with a value of undefined. JavaScript 1.6's map skips the holes in the sparse array.
+ // For more details, see:
+ // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map
+ // example:
+ // | // returns [2, 3, 4, 5]
+ // | dojo.map([1, 2, 3, 4], function(item){ return item+1 });
+
+ var _p = _getParts(arr, thisObject, callback); arr = _p[0];
+ var outArr = (arguments[3] ? (new arguments[3]()) : []);
+ for(var i=0,l=arr.length; i<l; ++i){
+ outArr.push(_p[2].call(_p[1], arr[i], i, arr));
+ }
+ return outArr; // Array
+ },
+
+ filter: function(/*Array*/arr, /*Function|String*/callback, /*Object?*/thisObject){
+ // summary:
+ // Returns a new Array with those items from arr that match the
+ // condition implemented by callback.
+ // arr:
+ // the array to iterate over.
+ // callback:
+ // a function that is invoked with three arguments (item,
+ // index, array). The return of this function is expected to
+ // be a boolean which determines whether the passed-in item
+ // will be included in the returned array.
+ // thisObject:
+ // may be used to scope the call to callback
+ // description:
+ // This function corresponds to the JavaScript 1.6 Array.filter() method, with one difference: when
+ // run over sparse arrays, this implemenation passes the "holes" in the sparse array to
+ // the callback function with a value of undefined. JavaScript 1.6's filter skips the holes in the sparse array.
+ // For more details, see:
+ // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter
+ // example:
+ // | // returns [2, 3, 4]
+ // | dojo.filter([1, 2, 3, 4], function(item){ return item>1; });
+
+ var _p = _getParts(arr, thisObject, callback); arr = _p[0];
+ var outArr = [];
+ for(var i=0,l=arr.length; i<l; ++i){
+ if(_p[2].call(_p[1], arr[i], i, arr)){
+ outArr.push(arr[i]);
+ }
+ }
+ return outArr; // Array
+ }
+ });
+})();
+/*
+*/
}
if(!dojo._hasResource["dojo._base.declare"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo._base.declare"] = true;
dojo.provide("dojo._base.declare");
-// this file courtesy of the TurboAjax group, licensed under a Dojo CLA
-
-dojo.declare = function(/*String*/ className, /*Function|Function[]*/ superclass, /*Object*/ props){
- // summary:
- // Create a feature-rich constructor from compact notation
- // className:
- // The name of the constructor (loosely, a "class")
- // stored in the "declaredClass" property in the created prototype
- // superclass:
- // May be null, a Function, or an Array of Functions. If an array,
- // the first element is used as the prototypical ancestor and
- // any following Functions become mixin ancestors.
- // props:
- // An object whose properties are copied to the
- // created prototype.
- // Add an instance-initialization function by making it a property
- // named "constructor".
- // description:
- // Create a constructor using a compact notation for inheritance and
- // prototype extension.
- //
- // All superclasses (including mixins) must be Functions (not simple Objects).
- //
- // Mixin ancestors provide a type of multiple inheritance. Prototypes of mixin
- // ancestors are copied to the new class: changes to mixin prototypes will
- // not affect classes to which they have been mixed in.
- //
- // "className" is cached in "declaredClass" property of the new class.
- //
- // example:
- // | dojo.declare("my.classes.bar", my.classes.foo, {
- // | // properties to be added to the class prototype
- // | someValue: 2,
- // | // initialization function
- // | constructor: function(){
- // | this.myComplicatedObject = new ReallyComplicatedObject();
- // | },
- // | // other functions
- // | someMethod: function(){
- // | doStuff();
- // | }
- // | );
-
- // argument juggling (deprecated)
- if(dojo.isFunction(props)||(arguments.length>3)){
- dojo.deprecated("dojo.declare: for class '" + className + "' pass initializer function as 'constructor' property instead of as a separate argument.", "", "1.0");
- var c = props;
- props = arguments[3] || {};
- props.constructor = c;
- }
- // process superclass argument
- // var dd=dojo.declare, mixins=null;
- var dd=arguments.callee, mixins=null;
- if(dojo.isArray(superclass)){
- mixins = superclass;
- superclass = mixins.shift();
- }
- // construct intermediate classes for mixins
- if(mixins){
- for(var i=0, m; i<mixins.length; i++){
- m = mixins[i];
- if(!m){throw("Mixin #" + i + " to declaration of " + className + " is null. It's likely a required module is not loaded.")};
- superclass = dd._delegate(superclass, m);
- }
- }
- // prepare values
- var init=(props||0).constructor, ctor=dd._delegate(superclass), fn;
- // name methods (experimental)
- for(var i in props){if(dojo.isFunction(fn=props[i])&&(!0[i])){fn.nom=i;}}
- // decorate prototype
- dojo.extend(ctor, {declaredClass: className, _constructor: init, preamble: null}, props||0);
- // special help for IE
- ctor.prototype.constructor = ctor;
- // create named reference
- return dojo.setObject(className, ctor); // Function
-}
-
-dojo.mixin(dojo.declare, {
- _delegate: function(base, mixin){
- var bp = (base||0).prototype, mp = (mixin||0).prototype;
- // fresh constructor, fresh prototype
- var ctor = dojo.declare._makeCtor();
- // cache ancestry
- dojo.mixin(ctor, {superclass: bp, mixin: mp, extend: dojo.declare._extend});
- // chain prototypes
- if(base){ctor.prototype = dojo._delegate(bp);}
- // add mixin and core
- dojo.extend(ctor, dojo.declare._core, mp||0, {_constructor: null, preamble: null});
- // special help for IE
- ctor.prototype.constructor = ctor;
- // name this class for debugging
- ctor.prototype.declaredClass = (bp||0).declaredClass + '_' + (mp||0).declaredClass;
- return ctor;
- },
- _extend: function(props){
- for(var i in props){if(dojo.isFunction(fn=props[i])&&(!0[i])){fn.nom=i;}}
- dojo.extend(this, props);
- },
- _makeCtor: function(){
- // we have to make a function, but don't want to close over anything
- return function(){ this._construct(arguments); }
- },
- _core: {
- _construct: function(args){
- var c=args.callee, s=c.superclass, ct=s&&s.constructor, m=c.mixin, mct=m&&m.constructor, a=args, ii, fn;
- // side-effect of = used on purpose here, lint may complain, don't try this at home
- if(a[0]){
- // FIXME: preambles for each mixin should be allowed
- // FIXME:
- // should we allow the preamble here NOT to modify the
- // default args, but instead to act on each mixin
- // independently of the class instance being constructed
- // (for impdedence matching)?
-
- // allow any first argument w/ a "preamble" property to act as a
- // class preamble (not exclusive of the prototype preamble)
- if(/*dojo.isFunction*/(fn = a[0]["preamble"])){
- a = fn.apply(this, a) || a;
- }
- }
- // prototype preamble
- if(fn=c.prototype.preamble){a = fn.apply(this, a) || a;}
- // FIXME:
- // need to provide an optional prototype-settable
- // "_explicitSuper" property which disables this
- // initialize superclass
- if(ct&&ct.apply){ct.apply(this, a);}
- // initialize mixin
- if(mct&&mct.apply){mct.apply(this, a);}
- // initialize self
- if(ii=c.prototype._constructor){ii.apply(this, args);}
- // post construction
- if(this.constructor.prototype==c.prototype && (ct=this.postscript)){ct.apply(this, args)};
- },
- _findMixin: function(mixin){
- var c = this.constructor, p, m;
- while(c){
- p = c.superclass;
- m = c.mixin;
- if(m==mixin || (m instanceof mixin.constructor)){return p;}
- if(m && (m=m._findMixin(mixin))){return m;}
- c = p && p.constructor;
- }
- },
- _findMethod: function(name, method, ptype, has){
- // consciously trading readability for bytes and speed in this low-level method
- var p=ptype, c, m, f;
- do{
- c = p.constructor;
- m = c.mixin;
- // find method by name in our mixin ancestor
- if(m && (m=this._findMethod(name, method, m, has))){return m};
- // if we found a named method that either exactly-is or exactly-is-not 'method'
- if((f=p[name])&&(has==(f==method))){return p};
- // ascend chain
- p = c.superclass;
- }while(p);
- // if we couldn't find an ancestor in our primary chain, try a mixin chain
- return !has && (p=this._findMixin(ptype)) && this._findMethod(name, method, p, has);
- },
- inherited: function(name, args, newArgs){
- // optionalize name argument (experimental)
- var a = arguments;
- if(!dojo.isString(a[0])){newArgs=args; args=name; name=args.callee.nom;}
- var c=args.callee, p=this.constructor.prototype, a=newArgs||args, fn, mp;
- // if not an instance override
- if(this[name]!=c || p[name]==c){
- mp = this._findMethod(name, c, p, true);
- if(!mp){throw(this.declaredClass + ': name argument ("' + name + '") to inherited must match callee (declare.js)');}
- p = this._findMethod(name, c, mp, false);
- }
- fn = p && p[name];
- // FIXME: perhaps we should throw here?
- if(!fn){console.debug(mp.declaredClass + ': no inherited "' + name + '" was found (declare.js)'); return;}
- // if the function exists, invoke it in our scope
- return fn.apply(this, a);
- }
- }
-});
+
+
+(function(){
+ var d = dojo, mix = d._mixin, op = Object.prototype, opts = op.toString,
+ xtor = new Function, counter = 0, cname = "constructor";
+
+ function err(msg){ throw new Error("declare: " + msg); }
+
+ // C3 Method Resolution Order (see http://www.python.org/download/releases/2.3/mro/)
+ function c3mro(bases){
+ var result = [], roots = [{cls: 0, refs: []}], nameMap = {}, clsCount = 1,
+ l = bases.length, i = 0, j, lin, base, top, proto, rec, name, refs;
+
+ // build a list of bases naming them if needed
+ for(; i < l; ++i){
+ base = bases[i];
+ if(!base){
+ err("mixin #" + i + " is null");
+ }
+ lin = base._meta ? base._meta.bases : [base];
+ top = 0;
+ // add bases to the name map
+ for(j = lin.length - 1; j >= 0; --j){
+ proto = lin[j].prototype;
+ if(!proto.hasOwnProperty("declaredClass")){
+ proto.declaredClass = "uniqName_" + (counter++);
+ }
+ name = proto.declaredClass;
+ if(!nameMap.hasOwnProperty(name)){
+ nameMap[name] = {count: 0, refs: [], cls: lin[j]};
+ ++clsCount;
+ }
+ rec = nameMap[name];
+ if(top && top !== rec){
+ rec.refs.push(top);
+ ++top.count;
+ }
+ top = rec;
+ }
+ ++top.count;
+ roots[0].refs.push(top);
+ }
+
+ // remove classes without external references recursively
+ while(roots.length){
+ top = roots.pop();
+ result.push(top.cls);
+ --clsCount;
+ // optimization: follow a single-linked chain
+ while(refs = top.refs, refs.length == 1){
+ top = refs[0];
+ if(!top || --top.count){
+ // branch or end of chain => do not end to roots
+ top = 0;
+ break;
+ }
+ result.push(top.cls);
+ --clsCount;
+ }
+ if(top){
+ // branch
+ for(i = 0, l = refs.length; i < l; ++i){
+ top = refs[i];
+ if(!--top.count){
+ roots.push(top);
+ }
+ }
+ }
+ }
+ if(clsCount){
+ err("can't build consistent linearization");
+ }
+
+ // calculate the superclass offset
+ base = bases[0];
+ result[0] = base ?
+ base._meta && base === result[result.length - base._meta.bases.length] ?
+ base._meta.bases.length : 1 : 0;
+
+ return result;
+ }
+
+ function inherited(args, a, f){
+ var name, chains, bases, caller, meta, base, proto, opf, pos,
+ cache = this._inherited = this._inherited || {};
+
+ // crack arguments
+ if(typeof args == "string"){
+ name = args;
+ args = a;
+ a = f;
+ }
+ f = 0;
+
+ caller = args.callee;
+ name = name || caller.nom;
+ if(!name){
+ err("can't deduce a name to call inherited()");
+ }
+
+ meta = this.constructor._meta;
+ bases = meta.bases;
+
+ pos = cache.p;
+ if(name != cname){
+ // method
+ if(cache.c !== caller){
+ // cache bust
+ pos = 0;
+ base = bases[0];
+ meta = base._meta;
+ if(meta.hidden[name] !== caller){
+ // error detection
+ chains = meta.chains;
+ if(chains && typeof chains[name] == "string"){
+ err("calling chained method with inherited: " + name);
+ }
+ // find caller
+ do{
+ meta = base._meta;
+ proto = base.prototype;
+ if(meta && (proto[name] === caller && proto.hasOwnProperty(name) || meta.hidden[name] === caller)){
+ break;
+ }
+ }while(base = bases[++pos]); // intentional assignment
+ pos = base ? pos : -1;
+ }
+ }
+ // find next
+ base = bases[++pos];
+ if(base){
+ proto = base.prototype;
+ if(base._meta && proto.hasOwnProperty(name)){
+ f = proto[name];
+ }else{
+ opf = op[name];
+ do{
+ proto = base.prototype;
+ f = proto[name];
+ if(f && (base._meta ? proto.hasOwnProperty(name) : f !== opf)){
+ break;
+ }
+ }while(base = bases[++pos]); // intentional assignment
+ }
+ }
+ f = base && f || op[name];
+ }else{
+ // constructor
+ if(cache.c !== caller){
+ // cache bust
+ pos = 0;
+ meta = bases[0]._meta;
+ if(meta && meta.ctor !== caller){
+ // error detection
+ chains = meta.chains;
+ if(!chains || chains.constructor !== "manual"){
+ err("calling chained constructor with inherited");
+ }
+ // find caller
+ while(base = bases[++pos]){ // intentional assignment
+ meta = base._meta;
+ if(meta && meta.ctor === caller){
+ break;
+ }
+ };
+ pos = base ? pos : -1;
+ }
+ }
+ // find next
+ while(base = bases[++pos]){ // intentional assignment
+ meta = base._meta;
+ f = meta ? meta.ctor : base;
+ if(f){
+ break;
+ }
+ }
+ f = base && f;
+ }
+
+ // cache the found super method
+ cache.c = f;
+ cache.p = pos;
+
+ // now we have the result
+ if(f){
+ return a === true ? f : f.apply(this, a || args);
+ }
+ // intentionally if a super method was not found
+ }
+
+ function getInherited(name, args){
+ if(typeof name == "string"){
+ return this.inherited(name, args, true);
+ }
+ return this.inherited(name, true);
+ }
+
+ // emulation of "instanceof"
+ function isInstanceOf(cls){
+ var bases = this.constructor._meta.bases;
+ for(var i = 0, l = bases.length; i < l; ++i){
+ if(bases[i] === cls){
+ return true;
+ }
+ }
+ return this instanceof cls;
+ }
+
+ // imlementation of safe mixin function
+ function safeMixin(target, source){
+ var name, t, i = 0, l = d._extraNames.length;
+ // add props adding metadata for incoming functions skipping a constructor
+ for(name in source){
+ t = source[name];
+ if((t !== op[name] || !(name in op)) && name != cname){
+ if(opts.call(t) == "[object Function]"){
+ // non-trivial function method => attach its name
+ t.nom = name;
+ }
+ target[name] = t;
+ }
+ }
+ // process unenumerable methods on IE
+ for(; i < l; ++i){
+ name = d._extraNames[i];
+ t = source[name];
+ if((t !== op[name] || !(name in op)) && name != cname){
+ if(opts.call(t) == "[object Function]"){
+ // non-trivial function method => attach its name
+ t.nom = name;
+ }
+ target[name] = t;
+ }
+ }
+ return target;
+ }
+
+ function extend(source){
+ safeMixin(this.prototype, source);
+ return this;
+ }
+
+ // chained constructor compatible with the legacy dojo.declare()
+ function chainedConstructor(bases, ctorSpecial){
+ return function(){
+ var a = arguments, args = a, a0 = a[0], f, i, m,
+ l = bases.length, preArgs;
+ //this._inherited = {};
+ // perform the shaman's rituals of the original dojo.declare()
+ // 1) call two types of the preamble
+ if(ctorSpecial && (a0 && a0.preamble || this.preamble)){
+ // full blown ritual
+ preArgs = new Array(bases.length);
+ // prepare parameters
+ preArgs[0] = a;
+ for(i = 0;;){
+ // process the preamble of the 1st argument
+ a0 = a[0];
+ if(a0){
+ f = a0.preamble;
+ if(f){
+ a = f.apply(this, a) || a;
+ }
+ }
+ // process the preamble of this class
+ f = bases[i].prototype;
+ f = f.hasOwnProperty("preamble") && f.preamble;
+ if(f){
+ a = f.apply(this, a) || a;
+ }
+ // one pecularity of the preamble:
+ // it is called if it is not needed,
+ // e.g., there is no constructor to call
+ // let's watch for the last constructor
+ // (see ticket #9795)
+ if(++i == l){
+ break;
+ }
+ preArgs[i] = a;
+ }
+ }
+ // 2) call all non-trivial constructors using prepared arguments
+ for(i = l - 1; i >= 0; --i){
+ f = bases[i];
+ m = f._meta;
+ f = m ? m.ctor : f;
+ if(f){
+ f.apply(this, preArgs ? preArgs[i] : a);
+ }
+ }
+ // 3) continue the original ritual: call the postscript
+ f = this.postscript;
+ if(f){
+ f.apply(this, args);
+ }
+ };
+ }
+
+
+ // chained constructor compatible with the legacy dojo.declare()
+ function singleConstructor(ctor, ctorSpecial){
+ return function(){
+ var a = arguments, t = a, a0 = a[0], f;
+ //this._inherited = {};
+ // perform the shaman's rituals of the original dojo.declare()
+ // 1) call two types of the preamble
+ if(ctorSpecial){
+ // full blown ritual
+ if(a0){
+ // process the preamble of the 1st argument
+ f = a0.preamble;
+ if(f){
+ t = f.apply(this, t) || t;
+ }
+ }
+ f = this.preamble;
+ if(f){
+ // process the preamble of this class
+ f.apply(this, t);
+ // one pecularity of the preamble:
+ // it is called even if it is not needed,
+ // e.g., there is no constructor to call
+ // let's watch for the last constructor
+ // (see ticket #9795)
+ }
+ }
+ // 2) call a constructor
+ if(ctor){
+ ctor.apply(this, a);
+ }
+ // 3) continue the original ritual: call the postscript
+ f = this.postscript;
+ if(f){
+ f.apply(this, a);
+ }
+ };
+ }
+
+ // plain vanilla constructor (can use inherited() to call its base constructor)
+ function simpleConstructor(bases){
+ return function(){
+ var a = arguments, i = 0, f;
+ //this._inherited = {};
+ // perform the shaman's rituals of the original dojo.declare()
+ // 1) do not call the preamble
+ // 2) call the top constructor (it can use this.inherited())
+ for(; f = bases[i]; ++i){ // intentional assignment
+ m = f._meta;
+ f = m ? m.ctor : f;
+ if(f){
+ f.apply(this, a);
+ break;
+ }
+ }
+ // 3) call the postscript
+ f = this.postscript;
+ if(f){
+ f.apply(this, a);
+ }
+ };
+ }
+
+ function chain(name, bases, reversed){
+ return function(){
+ var b, m, f, i = 0, step = 1;
+ if(reversed){
+ i = bases.length - 1;
+ step = -1;
+ }
+ for(; b = bases[i]; i += step){ // intentional assignment
+ m = b._meta;
+ f = (m ? m.hidden : b.prototype)[name];
+ if(f){
+ f.apply(this, arguments);
+ }
+ }
+ };
+ }
+
+ d.declare = function(className, superclass, props){
+ var proto, i, t, ctor, name, bases, chains, mixins = 1, parents = superclass;
+
+ // crack parameters
+ if(typeof className != "string"){
+ props = superclass;
+ superclass = className;
+ className = "";
+ }
+ props = props || {};
+
+ // build a prototype
+ if(opts.call(superclass) == "[object Array]"){
+ // C3 MRO
+ bases = c3mro(superclass);
+ t = bases[0];
+ mixins = bases.length - t;
+ superclass = bases[mixins];
+ }else{
+ bases = [0];
+ if(superclass){
+ t = superclass._meta;
+ bases = bases.concat(t ? t.bases : superclass);
+ }
+ }
+ if(superclass){
+ for(i = mixins - 1;; --i){
+ // delegation
+ xtor.prototype = superclass.prototype;
+ proto = new xtor;
+ if(!i){
+ // stop if nothing to add (the last base)
+ break;
+ }
+ // mix in properties
+ t = bases[i];
+ mix(proto, t._meta ? t._meta.hidden : t.prototype);
+ // chain in new constructor
+ ctor = new Function;
+ ctor.superclass = superclass;
+ ctor.prototype = proto;
+ superclass = proto.constructor = ctor;
+ }
+ }else{
+ proto = {};
+ }
+ // add all properties
+ safeMixin(proto, props);
+ // add constructor
+ t = props.constructor;
+ if(t !== op.constructor){
+ t.nom = cname;
+ proto.constructor = t;
+ }
+ xtor.prototype = 0; // cleanup
+
+ // collect chains and flags
+ for(i = mixins - 1; i; --i){ // intentional assignment
+ t = bases[i]._meta;
+ if(t && t.chains){
+ chains = mix(chains || {}, t.chains);
+ }
+ }
+ if(proto["-chains-"]){
+ chains = mix(chains || {}, proto["-chains-"]);
+ }
+
+ // build ctor
+ t = !chains || !chains.hasOwnProperty(cname);
+ bases[0] = ctor = (chains && chains.constructor === "manual") ? simpleConstructor(bases) :
+ (bases.length == 1 ? singleConstructor(props.constructor, t) : chainedConstructor(bases, t));
+
+ // add meta information to the constructor
+ ctor._meta = {bases: bases, hidden: props, chains: chains,
+ parents: parents, ctor: props.constructor};
+ ctor.superclass = superclass && superclass.prototype;
+ ctor.extend = extend;
+ ctor.prototype = proto;
+ proto.constructor = ctor;
+
+ // add "standard" methods to the ptototype
+ proto.getInherited = getInherited;
+ proto.inherited = inherited;
+ proto.isInstanceOf = isInstanceOf;
+
+ // add name if specified
+ if(className){
+ proto.declaredClass = className;
+ d.setObject(className, ctor);
+ }
+
+ // build chains and add them to the prototype
+ if(chains){
+ for(name in chains){
+ if(proto[name] && typeof chains[name] == "string" && name != cname){
+ t = proto[name] = chain(name, bases, chains[name] === "after");
+ t.nom = name;
+ }
+ }
+ }
+ // chained methods do not return values
+ // no need to chain "invisible" functions
+
+ return ctor; // Function
+ };
+
+ d.safeMixin = safeMixin;
+
+ /*=====
+ dojo.declare = function(className, superclass, props){
+ // summary:
+ // Create a feature-rich constructor from compact notation.
+ // className: String?:
+ // The optional name of the constructor (loosely, a "class")
+ // stored in the "declaredClass" property in the created prototype.
+ // It will be used as a global name for a created constructor.
+ // superclass: Function|Function[]:
+ // May be null, a Function, or an Array of Functions. This argument
+ // specifies a list of bases (the left-most one is the most deepest
+ // base).
+ // props: Object:
+ // An object whose properties are copied to the created prototype.
+ // Add an instance-initialization function by making it a property
+ // named "constructor".
+ // returns:
+ // New constructor function.
+ // description:
+ // Create a constructor using a compact notation for inheritance and
+ // prototype extension.
+ //
+ // Mixin ancestors provide a type of multiple inheritance.
+ // Prototypes of mixin ancestors are copied to the new class:
+ // changes to mixin prototypes will not affect classes to which
+ // they have been mixed in.
+ //
+ // Ancestors can be compound classes created by this version of
+ // dojo.declare. In complex cases all base classes are going to be
+ // linearized according to C3 MRO algorithm
+ // (see http://www.python.org/download/releases/2.3/mro/ for more
+ // details).
+ //
+ // "className" is cached in "declaredClass" property of the new class,
+ // if it was supplied. The immediate super class will be cached in
+ // "superclass" property of the new class.
+ //
+ // Methods in "props" will be copied and modified: "nom" property
+ // (the declared name of the method) will be added to all copied
+ // functions to help identify them for the internal machinery. Be
+ // very careful, while reusing methods: if you use the same
+ // function under different names, it can produce errors in some
+ // cases.
+ //
+ // It is possible to use constructors created "manually" (without
+ // dojo.declare) as bases. They will be called as usual during the
+ // creation of an instance, their methods will be chained, and even
+ // called by "this.inherited()".
+ //
+ // Special property "-chains-" governs how to chain methods. It is
+ // a dictionary, which uses method names as keys, and hint strings
+ // as values. If a hint string is "after", this method will be
+ // called after methods of its base classes. If a hint string is
+ // "before", this method will be called before methods of its base
+ // classes.
+ //
+ // If "constructor" is not mentioned in "-chains-" property, it will
+ // be chained using the legacy mode: using "after" chaining,
+ // calling preamble() method before each constructor, if available,
+ // and calling postscript() after all constructors were executed.
+ // If the hint is "after", it is chained as a regular method, but
+ // postscript() will be called after the chain of constructors.
+ // "constructor" cannot be chained "before", but it allows
+ // a special hint string: "manual", which means that constructors
+ // are not going to be chained in any way, and programmer will call
+ // them manually using this.inherited(). In the latter case
+ // postscript() will be called after the construction.
+ //
+ // All chaining hints are "inherited" from base classes and
+ // potentially can be overridden. Be very careful when overriding
+ // hints! Make sure that all chained methods can work in a proposed
+ // manner of chaining.
+ //
+ // Once a method was chained, it is impossible to unchain it. The
+ // only exception is "constructor". You don't need to define a
+ // method in order to supply a chaining hint.
+ //
+ // If a method is chained, it cannot use this.inherited() because
+ // all other methods in the hierarchy will be called automatically.
+ //
+ // Usually constructors and initializers of any kind are chained
+ // using "after" and destructors of any kind are chained as
+ // "before". Note that chaining assumes that chained methods do not
+ // return any value: any returned value will be discarded.
+ //
+ // example:
+ // | dojo.declare("my.classes.bar", my.classes.foo, {
+ // | // properties to be added to the class prototype
+ // | someValue: 2,
+ // | // initialization function
+ // | constructor: function(){
+ // | this.myComplicatedObject = new ReallyComplicatedObject();
+ // | },
+ // | // other functions
+ // | someMethod: function(){
+ // | doStuff();
+ // | }
+ // | });
+ //
+ // example:
+ // | var MyBase = dojo.declare(null, {
+ // | // constructor, properties, and methods go here
+ // | // ...
+ // | });
+ // | var MyClass1 = dojo.declare(MyBase, {
+ // | // constructor, properties, and methods go here
+ // | // ...
+ // | });
+ // | var MyClass2 = dojo.declare(MyBase, {
+ // | // constructor, properties, and methods go here
+ // | // ...
+ // | });
+ // | var MyDiamond = dojo.declare([MyClass1, MyClass2], {
+ // | // constructor, properties, and methods go here
+ // | // ...
+ // | });
+ //
+ // example:
+ // | var F = function(){ console.log("raw constructor"); };
+ // | F.prototype.method = function(){
+ // | console.log("raw method");
+ // | };
+ // | var A = dojo.declare(F, {
+ // | constructor: function(){
+ // | console.log("A.constructor");
+ // | },
+ // | method: function(){
+ // | console.log("before calling F.method...");
+ // | this.inherited(arguments);
+ // | console.log("...back in A");
+ // | }
+ // | });
+ // | new A().method();
+ // | // will print:
+ // | // raw constructor
+ // | // A.constructor
+ // | // before calling F.method...
+ // | // raw method
+ // | // ...back in A
+ //
+ // example:
+ // | var A = dojo.declare(null, {
+ // | "-chains-": {
+ // | destroy: "before"
+ // | }
+ // | });
+ // | var B = dojo.declare(A, {
+ // | constructor: function(){
+ // | console.log("B.constructor");
+ // | },
+ // | destroy: function(){
+ // | console.log("B.destroy");
+ // | }
+ // | });
+ // | var C = dojo.declare(B, {
+ // | constructor: function(){
+ // | console.log("C.constructor");
+ // | },
+ // | destroy: function(){
+ // | console.log("C.destroy");
+ // | }
+ // | });
+ // | new C().destroy();
+ // | // prints:
+ // | // B.constructor
+ // | // C.constructor
+ // | // C.destroy
+ // | // B.destroy
+ //
+ // example:
+ // | var A = dojo.declare(null, {
+ // | "-chains-": {
+ // | constructor: "manual"
+ // | }
+ // | });
+ // | var B = dojo.declare(A, {
+ // | constructor: function(){
+ // | // ...
+ // | // call the base constructor with new parameters
+ // | this.inherited(arguments, [1, 2, 3]);
+ // | // ...
+ // | }
+ // | });
+ //
+ // example:
+ // | var A = dojo.declare(null, {
+ // | "-chains-": {
+ // | m1: "before"
+ // | },
+ // | m1: function(){
+ // | console.log("A.m1");
+ // | },
+ // | m2: function(){
+ // | console.log("A.m2");
+ // | }
+ // | });
+ // | var B = dojo.declare(A, {
+ // | "-chains-": {
+ // | m2: "after"
+ // | },
+ // | m1: function(){
+ // | console.log("B.m1");
+ // | },
+ // | m2: function(){
+ // | console.log("B.m2");
+ // | }
+ // | });
+ // | var x = new B();
+ // | x.m1();
+ // | // prints:
+ // | // B.m1
+ // | // A.m1
+ // | x.m2();
+ // | // prints:
+ // | // A.m2
+ // | // B.m2
+ return new Function(); // Function
+ };
+ =====*/
+
+ /*=====
+ dojo.safeMixin = function(target, source){
+ // summary:
+ // Mix in properties skipping a constructor and decorating functions
+ // like it is done by dojo.declare.
+ // target: Object
+ // Target object to accept new properties.
+ // source: Object
+ // Source object for new properties.
+ // description:
+ // This function is used to mix in properties like dojo._mixin does,
+ // but it skips a constructor property and decorates functions like
+ // dojo.declare does.
+ //
+ // It is meant to be used with classes and objects produced with
+ // dojo.declare. Functions mixed in with dojo.safeMixin can use
+ // this.inherited() like normal methods.
+ //
+ // This function is used to implement extend() method of a constructor
+ // produced with dojo.declare().
+ //
+ // example:
+ // | var A = dojo.declare(null, {
+ // | m1: function(){
+ // | console.log("A.m1");
+ // | },
+ // | m2: function(){
+ // | console.log("A.m2");
+ // | }
+ // | });
+ // | var B = dojo.declare(A, {
+ // | m1: function(){
+ // | this.inherited(arguments);
+ // | console.log("B.m1");
+ // | }
+ // | });
+ // | B.extend({
+ // | m2: function(){
+ // | this.inherited(arguments);
+ // | console.log("B.m2");
+ // | }
+ // | });
+ // | var x = new B();
+ // | dojo.safeMixin(x, {
+ // | m1: function(){
+ // | this.inherited(arguments);
+ // | console.log("X.m1");
+ // | },
+ // | m2: function(){
+ // | this.inherited(arguments);
+ // | console.log("X.m2");
+ // | }
+ // | });
+ // | x.m2();
+ // | // prints:
+ // | // A.m1
+ // | // B.m1
+ // | // X.m1
+ };
+ =====*/
+
+ /*=====
+ Object.inherited = function(name, args, newArgs){
+ // summary:
+ // Calls a super method.
+ // name: String?
+ // The optional method name. Should be the same as the caller's
+ // name. Usually "name" is specified in complex dynamic cases, when
+ // the calling method was dynamically added, undecorated by
+ // dojo.declare, and it cannot be determined.
+ // args: Arguments
+ // The caller supply this argument, which should be the original
+ // "arguments".
+ // newArgs: Object?
+ // If "true", the found function will be returned without
+ // executing it.
+ // If Array, it will be used to call a super method. Otherwise
+ // "args" will be used.
+ // returns:
+ // Whatever is returned by a super method, or a super method itself,
+ // if "true" was specified as newArgs.
+ // description:
+ // This method is used inside method of classes produced with
+ // dojo.declare to call a super method (next in the chain). It is
+ // used for manually controlled chaining. Consider using the regular
+ // chaining, because it is faster. Use "this.inherited()" only in
+ // complex cases.
+ //
+ // This method cannot me called from automatically chained
+ // constructors including the case of a special (legacy)
+ // constructor chaining. It cannot be called from chained methods.
+ //
+ // If "this.inherited()" cannot find the next-in-chain method, it
+ // does nothing and returns "undefined". The last method in chain
+ // can be a default method implemented in Object, which will be
+ // called last.
+ //
+ // If "name" is specified, it is assumed that the method that
+ // received "args" is the parent method for this call. It is looked
+ // up in the chain list and if it is found the next-in-chain method
+ // is called. If it is not found, the first-in-chain method is
+ // called.
+ //
+ // If "name" is not specified, it will be derived from the calling
+ // method (using a methoid property "nom").
+ //
+ // example:
+ // | var B = dojo.declare(A, {
+ // | method1: function(a, b, c){
+ // | this.inherited(arguments);
+ // | },
+ // | method2: function(a, b){
+ // | return this.inherited(arguments, [a + b]);
+ // | }
+ // | });
+ // | // next method is not in the chain list because it is added
+ // | // manually after the class was created.
+ // | B.prototype.method3 = function(){
+ // | console.log("This is a dynamically-added method.");
+ // | this.inherited("method3", arguments);
+ // | };
+ // example:
+ // | var B = dojo.declare(A, {
+ // | method: function(a, b){
+ // | var super = this.inherited(arguments, true);
+ // | // ...
+ // | if(!super){
+ // | console.log("there is no super method");
+ // | return 0;
+ // | }
+ // | return super.apply(this, arguments);
+ // | }
+ // | });
+ return {}; // Object
+ }
+ =====*/
+
+ /*=====
+ Object.getInherited = function(name, args){
+ // summary:
+ // Returns a super method.
+ // name: String?
+ // The optional method name. Should be the same as the caller's
+ // name. Usually "name" is specified in complex dynamic cases, when
+ // the calling method was dynamically added, undecorated by
+ // dojo.declare, and it cannot be determined.
+ // args: Arguments
+ // The caller supply this argument, which should be the original
+ // "arguments".
+ // returns:
+ // Returns a super method (Function) or "undefined".
+ // description:
+ // This method is a convenience method for "this.inherited()".
+ // It uses the same algorithm but instead of executing a super
+ // method, it returns it, or "undefined" if not found.
+ //
+ // example:
+ // | var B = dojo.declare(A, {
+ // | method: function(a, b){
+ // | var super = this.getInherited(arguments);
+ // | // ...
+ // | if(!super){
+ // | console.log("there is no super method");
+ // | return 0;
+ // | }
+ // | return super.apply(this, arguments);
+ // | }
+ // | });
+ return {}; // Object
+ }
+ =====*/
+
+ /*=====
+ Object.isInstanceOf = function(cls){
+ // summary:
+ // Checks the inheritance cahin to see if it is inherited from this
+ // class.
+ // cls: Function
+ // Class constructor.
+ // returns:
+ // "true", if this object is inherited from this class, "false"
+ // otherwise.
+ // description:
+ // This method is used with instances of classes produced with
+ // dojo.declare to determine of they support a certain interface or
+ // not. It models "instanceof" operator.
+ //
+ // example:
+ // | var A = dojo.declare(null, {
+ // | // constructor, properties, and methods go here
+ // | // ...
+ // | });
+ // | var B = dojo.declare(null, {
+ // | // constructor, properties, and methods go here
+ // | // ...
+ // | });
+ // | var C = dojo.declare([A, B], {
+ // | // constructor, properties, and methods go here
+ // | // ...
+ // | });
+ // | var D = dojo.declare(A, {
+ // | // constructor, properties, and methods go here
+ // | // ...
+ // | });
+ // |
+ // | var a = new A(), b = new B(), c = new C(), d = new D();
+ // |
+ // | console.log(a.isInstanceOf(A)); // true
+ // | console.log(b.isInstanceOf(A)); // false
+ // | console.log(c.isInstanceOf(A)); // true
+ // | console.log(d.isInstanceOf(A)); // true
+ // |
+ // | console.log(a.isInstanceOf(B)); // false
+ // | console.log(b.isInstanceOf(B)); // true
+ // | console.log(c.isInstanceOf(B)); // true
+ // | console.log(d.isInstanceOf(B)); // false
+ // |
+ // | console.log(a.isInstanceOf(C)); // false
+ // | console.log(b.isInstanceOf(C)); // false
+ // | console.log(c.isInstanceOf(C)); // true
+ // | console.log(d.isInstanceOf(C)); // false
+ // |
+ // | console.log(a.isInstanceOf(D)); // false
+ // | console.log(b.isInstanceOf(D)); // false
+ // | console.log(c.isInstanceOf(D)); // false
+ // | console.log(d.isInstanceOf(D)); // true
+ return {}; // Object
+ }
+ =====*/
+
+ /*=====
+ Object.extend = function(source){
+ // summary:
+ // Adds all properties and methods of source to constructor's
+ // prototype, making them available to all instances created with
+ // constructor. This method is specific to constructors created with
+ // dojo.declare.
+ // source: Object
+ // Source object which properties are going to be copied to the
+ // constructor's prototype.
+ // description:
+ // Adds source properties to the constructor's prototype. It can
+ // override existing properties.
+ //
+ // This method is similar to dojo.extend function, but it is specific
+ // to constructors produced by dojo.declare. It is implemented
+ // using dojo.safeMixin, and it skips a constructor property,
+ // and properly decorates copied functions.
+ //
+ // example:
+ // | var A = dojo.declare(null, {
+ // | m1: function(){},
+ // | s1: "Popokatepetl"
+ // | });
+ // | A.extend({
+ // | m1: function(){},
+ // | m2: function(){},
+ // | f1: true,
+ // | d1: 42
+ // | });
+ };
+ =====*/
+})();
}
if(!dojo._hasResource["dojo._base.connect"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo._base.connect"] = true;
dojo.provide("dojo._base.connect");
// this file courtesy of the TurboAjax Group, licensed under a Dojo CLA
// low-level delegation machinery
dojo._listener = {
// create a dispatcher function
getDispatcher: function(){
// following comments pulled out-of-line to prevent cloning them
// in the returned function.
// - indices (i) that are really in the array of listeners (ls) will
// not be in Array.prototype. This is the 'sparse array' trick
// that keeps us safe from libs that take liberties with built-in
// objects
// - listener is invoked with current scope (this)
return function(){
var ap=Array.prototype, c=arguments.callee, ls=c._listeners, t=c.target;
// return value comes from original target function
- var r=t && t.apply(this, arguments);
+ var r = t && t.apply(this, arguments);
+ // make local copy of listener array so it is immutable during processing
+ var lls;
+ lls = [].concat(ls);
+
// invoke listeners after target function
- for(var i in ls){
+ for(var i in lls){
if(!(i in ap)){
- ls[i].apply(this, arguments);
+ lls[i].apply(this, arguments);
}
}
// return value comes from original target function
return r;
}
},
// add a listener to an object
add: function(/*Object*/ source, /*String*/ method, /*Function*/ listener){
// Whenever 'method' is invoked, 'listener' will have the same scope.
// Trying to supporting a context object for the listener led to
// complexity.
// Non trivial to provide 'once' functionality here
// because listener could be the result of a dojo.hitch call,
// in which case two references to the same hitch target would not
// be equivalent.
source = source || dojo.global;
// The source method is either null, a dispatcher, or some other function
var f = source[method];
// Ensure a dispatcher
if(!f||!f._listeners){
var d = dojo._listener.getDispatcher();
// original target function is special
d.target = f;
// dispatcher holds a list of listeners
d._listeners = [];
// redirect source to dispatcher
f = source[method] = d;
}
// The contract is that a handle is returned that can
// identify this listener for disconnect.
//
// The type of the handle is private. Here is it implemented as Integer.
// DOM event code has this same contract but handle is Function
// in non-IE browsers.
//
// We could have separate lists of before and after listeners.
return f._listeners.push(listener) ; /*Handle*/
},
// remove a listener from an object
remove: function(/*Object*/ source, /*String*/ method, /*Handle*/ handle){
var f = (source||dojo.global)[method];
// remember that handle is the index+1 (0 is not a valid handle)
if(f && f._listeners && handle--){
- delete f._listeners[handle];
+ delete f._listeners[handle];
}
}
};
// Multiple delegation for arbitrary methods.
-// This unit knows nothing about DOM,
-// but we include DOM aware
-// documentation and dontFix
-// argument here to help the autodocs.
-// Actual DOM aware code is in event.js.
+// This unit knows nothing about DOM, but we include DOM aware documentation
+// and dontFix argument here to help the autodocs. Actual DOM aware code is in
+// event.js.
dojo.connect = function(/*Object|null*/ obj,
/*String*/ event,
/*Object|null*/ context,
/*String|Function*/ method,
- /*Boolean*/ dontFix){
+ /*Boolean?*/ dontFix){
// summary:
- // Create a link that calls one function when another executes.
+ // `dojo.connect` is the core event handling and delegation method in
+ // Dojo. It allows one function to "listen in" on the execution of
+ // any other, triggering the second whenever the first is called. Many
+ // listeners may be attached to a function, and source functions may
+ // be either regular function calls or DOM events.
//
// description:
- // Connects method to event, so that after event fires, method
- // does too. All connected functions are passed the same arguments as
- // the event function was initially called with. You may connect as
- // many methods to event as needed.
+ // Connects listeners to actions, so that after event fires, a
+ // listener is called with the same arguments passed to the orginal
+ // function.
+ //
+ // Since `dojo.connect` allows the source of events to be either a
+ // "regular" JavaScript function or a DOM event, it provides a uniform
+ // interface for listening to all the types of events that an
+ // application is likely to deal with though a single, unified
+ // interface. DOM programmers may want to think of it as
+ // "addEventListener for everything and anything".
//
- // event must be a string. If obj is null, dojo.global is used.
+ // When setting up a connection, the `event` parameter must be a
+ // string that is the name of the method/event to be listened for. If
+ // `obj` is null, `dojo.global` is assumed, meaning that connections
+ // to global methods are supported but also that you may inadvertantly
+ // connect to a global by passing an incorrect object name or invalid
+ // reference.
//
- // null arguments may simply be omitted.
- //
- // obj[event] can resolve to a function or undefined (null).
- // If obj[event] is null, it is assigned a function.
+ // `dojo.connect` generally is forgiving. If you pass the name of a
+ // function or method that does not yet exist on `obj`, connect will
+ // not fail, but will instead set up a stub method. Similarly, null
+ // arguments may simply be omitted such that fewer than 4 arguments
+ // may be required to set up a connection See the examples for deails.
//
// The return value is a handle that is needed to
- // remove this connection with dojo.disconnect.
+ // remove this connection with `dojo.disconnect`.
//
// obj:
// The source object for the event function.
- // Defaults to dojo.global if null.
+ // Defaults to `dojo.global` if null.
// If obj is a DOM node, the connection is delegated
// to the DOM event manager (unless dontFix is true).
//
// event:
// String name of the event function in obj.
- // I.e. identifies a property obj[event].
+ // I.e. identifies a property `obj[event]`.
//
// context:
// The object that method will receive as "this".
//
// If context is null and method is a function, then method
// inherits the context of event.
//
// If method is a string then context must be the source
// object object for method (context[method]). If context is null,
// dojo.global is used.
//
// method:
// A function reference, or name of a function in context.
// The function identified by method fires after event does.
// method receives the same arguments as the event.
// See context argument comments for information on method's scope.
//
// dontFix:
// If obj is a DOM node, set dontFix to true to prevent delegation
- // of this connection to the DOM event manager.
+ // of this connection to the DOM event manager.
//
// example:
// When obj.onchange(), do ui.update():
// | dojo.connect(obj, "onchange", ui, "update");
// | dojo.connect(obj, "onchange", ui, ui.update); // same
//
// example:
// Using return value for disconnect:
// | var link = dojo.connect(obj, "onchange", ui, "update");
// | ...
// | dojo.disconnect(link);
//
// example:
// When onglobalevent executes, watcher.handler is invoked:
// | dojo.connect(null, "onglobalevent", watcher, "handler");
//
// example:
// When ob.onCustomEvent executes, customEventHandler is invoked:
// | dojo.connect(ob, "onCustomEvent", null, "customEventHandler");
// | dojo.connect(ob, "onCustomEvent", "customEventHandler"); // same
//
// example:
// When ob.onCustomEvent executes, customEventHandler is invoked
// with the same scope (this):
// | dojo.connect(ob, "onCustomEvent", null, customEventHandler);
// | dojo.connect(ob, "onCustomEvent", customEventHandler); // same
//
// example:
// When globalEvent executes, globalHandler is invoked
// with the same scope (this):
// | dojo.connect(null, "globalEvent", null, globalHandler);
// | dojo.connect("globalEvent", globalHandler); // same
// normalize arguments
var a=arguments, args=[], i=0;
// if a[0] is a String, obj was ommited
args.push(dojo.isString(a[0]) ? null : a[i++], a[i++]);
// if the arg-after-next is a String or Function, context was NOT omitted
var a1 = a[i+1];
args.push(dojo.isString(a1)||dojo.isFunction(a1) ? a[i++] : null, a[i++]);
// absorb any additional arguments
for(var l=a.length; i<l; i++){ args.push(a[i]); }
// do the actual work
return dojo._connect.apply(this, args); /*Handle*/
}
// used by non-browser hostenvs. always overriden by event.js
dojo._connect = function(obj, event, context, method){
var l=dojo._listener, h=l.add(obj, event, dojo.hitch(context, method));
return [obj, event, h, l]; // Handle
}
dojo.disconnect = function(/*Handle*/ handle){
// summary:
// Remove a link created by dojo.connect.
// description:
// Removes the connection between event and the method referenced by handle.
// handle:
// the return value of the dojo.connect call that created the connection.
if(handle && handle[0] !== undefined){
dojo._disconnect.apply(this, handle);
// let's not keep this reference
delete handle[0];
}
}
dojo._disconnect = function(obj, event, handle, listener){
listener.remove(obj, event, handle);
}
// topic publish/subscribe
dojo._topics = {};
dojo.subscribe = function(/*String*/ topic, /*Object|null*/ context, /*String|Function*/ method){
// summary:
// Attach a listener to a named topic. The listener function is invoked whenever the
// named topic is published (see: dojo.publish).
// Returns a handle which is needed to unsubscribe this listener.
// context:
// Scope in which method will be invoked, or null for default scope.
// method:
// The name of a function in context, or a function reference. This is the function that
// is invoked when topic is published.
// example:
- // | dojo.subscribe("alerts", null, function(caption, message){ alert(caption + "\n" + message); };
+ // | dojo.subscribe("alerts", null, function(caption, message){ alert(caption + "\n" + message); });
// | dojo.publish("alerts", [ "read this", "hello world" ]);
// support for 2 argument invocation (omitting context) depends on hitch
return [topic, dojo._listener.add(dojo._topics, topic, dojo.hitch(context, method))]; /*Handle*/
}
dojo.unsubscribe = function(/*Handle*/ handle){
// summary:
// Remove a topic listener.
// handle:
// The handle returned from a call to subscribe.
// example:
// | var alerter = dojo.subscribe("alerts", null, function(caption, message){ alert(caption + "\n" + message); };
// | ...
// | dojo.unsubscribe(alerter);
if(handle){
dojo._listener.remove(dojo._topics, handle[0], handle[1]);
}
}
dojo.publish = function(/*String*/ topic, /*Array*/ args){
// summary:
// Invoke all listener method subscribed to topic.
// topic:
// The name of the topic to publish.
// args:
// An array of arguments. The arguments will be applied
// to each topic subscriber (as first class parameters, via apply).
// example:
// | dojo.subscribe("alerts", null, function(caption, message){ alert(caption + "\n" + message); };
// | dojo.publish("alerts", [ "read this", "hello world" ]);
// Note that args is an array, which is more efficient vs variable length
// argument list. Ideally, var args would be implemented via Array
// throughout the APIs.
var f = dojo._topics[topic];
if(f){
f.apply(this, args||[]);
}
}
dojo.connectPublisher = function( /*String*/ topic,
/*Object|null*/ obj,
/*String*/ event){
// summary:
// Ensure that everytime obj.event() is called, a message is published
// on the topic. Returns a handle which can be passed to
// dojo.disconnect() to disable subsequent automatic publication on
// the topic.
// topic:
// The name of the topic to publish.
// obj:
// The source object for the event function. Defaults to dojo.global
// if null.
// event:
// The name of the event function in obj.
// I.e. identifies a property obj[event].
// example:
- // | dojo.connectPublisher("/ajax/start", dojo, "xhrGet"};
+ // | dojo.connectPublisher("/ajax/start", dojo, "xhrGet");
var pf = function(){ dojo.publish(topic, arguments); }
return (event) ? dojo.connect(obj, event, pf) : dojo.connect(obj, pf); //Handle
};
}
if(!dojo._hasResource["dojo._base.Deferred"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo._base.Deferred"] = true;
dojo.provide("dojo._base.Deferred");
dojo.Deferred = function(/*Function?*/ canceller){
// summary:
// Encapsulates a sequence of callbacks in response to a value that
// may not yet be available. This is modeled after the Deferred class
// from Twisted <http://twistedmatrix.com>.
// description:
// JavaScript has no threads, and even if it did, threads are hard.
// Deferreds are a way of abstracting non-blocking events, such as the
// final response to an XMLHttpRequest. Deferreds create a promise to
// return a response a some point in the future and an easy way to
// register your interest in receiving that response.
//
// The most important methods for Deffered users are:
//
// * addCallback(handler)
// * addErrback(handler)
// * callback(result)
// * errback(result)
//
// In general, when a function returns a Deferred, users then "fill
// in" the second half of the contract by registering callbacks and
// error handlers. You may register as many callback and errback
// handlers as you like and they will be executed in the order
// registered when a result is provided. Usually this result is
// provided as the result of an asynchronous operation. The code
// "managing" the Deferred (the code that made the promise to provide
// an answer later) will use the callback() and errback() methods to
// communicate with registered listeners about the result of the
// operation. At this time, all registered result handlers are called
// *with the most recent result value*.
//
// Deferred callback handlers are treated as a chain, and each item in
// the chain is required to return a value that will be fed into
// successive handlers. The most minimal callback may be registered
// like this:
//
// | var d = new dojo.Deferred();
// | d.addCallback(function(result){ return result; });
//
// Perhaps the most common mistake when first using Deferreds is to
// forget to return a value (in most cases, the value you were
// passed).
//
// The sequence of callbacks is internally represented as a list of
// 2-tuples containing the callback/errback pair. For example, the
// following call sequence:
//
// | var d = new dojo.Deferred();
// | d.addCallback(myCallback);
// | d.addErrback(myErrback);
// | d.addBoth(myBoth);
// | d.addCallbacks(myCallback, myErrback);
//
// is translated into a Deferred with the following internal
// representation:
//
// | [
// | [myCallback, null],
// | [null, myErrback],
// | [myBoth, myBoth],
// | [myCallback, myErrback]
// | ]
//
// The Deferred also keeps track of its current status (fired). Its
// status may be one of three things:
//
// * -1: no value yet (initial condition)
// * 0: success
// * 1: error
//
// A Deferred will be in the error state if one of the following three
// conditions are met:
//
// 1. The result given to callback or errback is "instanceof" Error
// 2. The previous callback or errback raised an exception while
// executing
// 3. The previous callback or errback returned a value
// "instanceof" Error
//
// Otherwise, the Deferred will be in the success state. The state of
// the Deferred determines the next element in the callback sequence
// to run.
//
// When a callback or errback occurs with the example deferred chain,
// something equivalent to the following will happen (imagine
// that exceptions are caught and returned):
//
// | // d.callback(result) or d.errback(result)
// | if(!(result instanceof Error)){
// | result = myCallback(result);
// | }
// | if(result instanceof Error){
// | result = myErrback(result);
// | }
// | result = myBoth(result);
// | if(result instanceof Error){
// | result = myErrback(result);
// | }else{
// | result = myCallback(result);
// | }
//
// The result is then stored away in case another step is added to the
// callback sequence. Since the Deferred already has a value
// available, any new callbacks added will be called immediately.
//
// There are two other "advanced" details about this implementation
// that are useful:
//
// Callbacks are allowed to return Deferred instances themselves, so
// you can build complicated sequences of events with ease.
//
// The creator of the Deferred may specify a canceller. The canceller
// is a function that will be called if Deferred.cancel is called
// before the Deferred fires. You can use this to implement clean
// aborting of an XMLHttpRequest, etc. Note that cancel will fire the
// deferred with a CancelledError (unless your canceller returns
// another kind of error), so the errbacks should be prepared to
// handle that error for cancellable Deferreds.
// example:
// | var deferred = new dojo.Deferred();
// | setTimeout(function(){ deferred.callback({success: true}); }, 1000);
// | return deferred;
// example:
// Deferred objects are often used when making code asynchronous. It
// may be easiest to write functions in a synchronous manner and then
// split code using a deferred to trigger a response to a long-lived
// operation. For example, instead of register a callback function to
// denote when a rendering operation completes, the function can
// simply return a deferred:
//
// | // callback style:
// | function renderLotsOfData(data, callback){
// | var success = false
// | try{
// | for(var x in data){
// | renderDataitem(data[x]);
// | }
// | success = true;
// | }catch(e){ }
// | if(callback){
// | callback(success);
// | }
// | }
//
// | // using callback style
// | renderLotsOfData(someDataObj, function(success){
// | // handles success or failure
// | if(!success){
// | promptUserToRecover();
// | }
// | });
// | // NOTE: no way to add another callback here!!
// example:
// Using a Deferred doesn't simplify the sending code any, but it
// provides a standard interface for callers and senders alike,
// providing both with a simple way to service multiple callbacks for
// an operation and freeing both sides from worrying about details
// such as "did this get called already?". With Deferreds, new
// callbacks can be added at any time.
//
// | // Deferred style:
// | function renderLotsOfData(data){
// | var d = new dojo.Deferred();
// | try{
// | for(var x in data){
// | renderDataitem(data[x]);
// | }
// | d.callback(true);
// | }catch(e){
// | d.errback(new Error("rendering failed"));
// | }
// | return d;
// | }
//
// | // using Deferred style
// | renderLotsOfData(someDataObj).addErrback(function(){
// | promptUserToRecover();
// | });
// | // NOTE: addErrback and addCallback both return the Deferred
// | // again, so we could chain adding callbacks or save the
// | // deferred for later should we need to be notified again.
// example:
// In this example, renderLotsOfData is syncrhonous and so both
// versions are pretty artificial. Putting the data display on a
// timeout helps show why Deferreds rock:
//
// | // Deferred style and async func
// | function renderLotsOfData(data){
// | var d = new dojo.Deferred();
// | setTimeout(function(){
// | try{
// | for(var x in data){
// | renderDataitem(data[x]);
// | }
// | d.callback(true);
// | }catch(e){
// | d.errback(new Error("rendering failed"));
// | }
// | }, 100);
// | return d;
// | }
//
// | // using Deferred style
// | renderLotsOfData(someDataObj).addErrback(function(){
// | promptUserToRecover();
// | });
//
// Note that the caller doesn't have to change his code at all to
// handle the asynchronous case.
this.chain = [];
this.id = this._nextId();
this.fired = -1;
this.paused = 0;
this.results = [null, null];
this.canceller = canceller;
this.silentlyCancelled = false;
+ this.isFiring = false;
};
dojo.extend(dojo.Deferred, {
/*
makeCalled: function(){
// summary:
// returns a new, empty deferred, which is already in the called
// state. Calling callback() or errback() on this deferred will
// yeild an error and adding new handlers to it will result in
// them being called immediately.
var deferred = new dojo.Deferred();
deferred.callback();
return deferred;
},
toString: function(){
var state;
if(this.fired == -1){
state = 'unfired';
}else{
state = this.fired ? 'success' : 'error';
}
return 'Deferred(' + this.id + ', ' + state + ')';
},
*/
_nextId: (function(){
var n = 1;
return function(){ return n++; };
})(),
cancel: function(){
// summary:
// Cancels a Deferred that has not yet received a value, or is
// waiting on another Deferred as its value.
// description:
// If a canceller is defined, the canceller is called. If the
// canceller did not return an error, or there was no canceller,
// then the errback chain is started.
var err;
if(this.fired == -1){
if(this.canceller){
err = this.canceller(this);
}else{
this.silentlyCancelled = true;
}
if(this.fired == -1){
if(!(err instanceof Error)){
var res = err;
- err = new Error("Deferred Cancelled");
+ var msg = "Deferred Cancelled";
+ if(err && err.toString){
+ msg += ": " + err.toString();
+ }
+ err = new Error(msg);
err.dojoType = "cancel";
err.cancelResult = res;
}
this.errback(err);
}
}else if( (this.fired == 0) &&
(this.results[0] instanceof dojo.Deferred)
){
this.results[0].cancel();
}
},
_resback: function(res){
// summary:
// The private primitive that means either callback or errback
this.fired = ((res instanceof Error) ? 1 : 0);
this.results[this.fired] = res;
this._fire();
},
_check: function(){
if(this.fired != -1){
if(!this.silentlyCancelled){
throw new Error("already called!");
}
this.silentlyCancelled = false;
return;
}
},
callback: function(res){
- // summary: Begin the callback sequence with a non-error value.
+ // summary:
+ // Begin the callback sequence with a non-error value.
/*
callback or errback should only be called once on a given
Deferred.
*/
this._check();
this._resback(res);
},
errback: function(/*Error*/res){
- // summary:
+ // summary:
// Begin the callback sequence with an error result.
this._check();
if(!(res instanceof Error)){
res = new Error(res);
}
this._resback(res);
},
- addBoth: function(/*Function||Object*/cb, /*Optional, String*/cbfn){
- // summary:
+ addBoth: function(/*Function|Object*/cb, /*String?*/cbfn){
+ // summary:
// Add the same function as both a callback and an errback as the
- // next element on the callback sequence. This is useful for code
+ // next element on the callback sequence.This is useful for code
// that you want to guarantee to run, e.g. a finalizer.
- var enclosed = dojo.hitch(cb, cbfn);
- if(arguments.length > 2){
- enclosed = dojo.partial(enclosed, arguments, 2);
- }
- return this.addCallbacks(enclosed, enclosed);
+ var enclosed = dojo.hitch.apply(dojo, arguments);
+ return this.addCallbacks(enclosed, enclosed); // dojo.Deferred
},
- addCallback: function(cb, cbfn){
- // summary:
+ addCallback: function(/*Function|Object*/cb, /*String?*/cbfn /*...*/){
+ // summary:
// Add a single callback to the end of the callback sequence.
- var enclosed = dojo.hitch(cb, cbfn);
- if(arguments.length > 2){
- enclosed = dojo.partial(enclosed, arguments, 2);
- }
- return this.addCallbacks(enclosed, null);
+ return this.addCallbacks(dojo.hitch.apply(dojo, arguments)); // dojo.Deferred
},
addErrback: function(cb, cbfn){
- // summary:
+ // summary:
// Add a single callback to the end of the callback sequence.
- var enclosed = dojo.hitch(cb, cbfn);
- if(arguments.length > 2){
- enclosed = dojo.partial(enclosed, arguments, 2);
- }
- return this.addCallbacks(null, enclosed);
+ return this.addCallbacks(null, dojo.hitch.apply(dojo, arguments)); // dojo.Deferred
},
addCallbacks: function(cb, eb){
// summary:
// Add separate callback and errback to the end of the callback
// sequence.
this.chain.push([cb, eb])
- if(this.fired >= 0){
+ if(this.fired >= 0 && !this.isFiring){
this._fire();
}
- return this;
+ return this; // dojo.Deferred
},
_fire: function(){
// summary:
// Used internally to exhaust the callback sequence when a result
// is available.
+ this.isFiring = true;
var chain = this.chain;
var fired = this.fired;
var res = this.results[fired];
var self = this;
var cb = null;
while(
(chain.length > 0) &&
(this.paused == 0)
){
// Array
var f = chain.shift()[fired];
if(!f){ continue; }
- try{
- res = f(res);
+ var func = function(){
+ var ret = f(res);
+ //If no response, then use previous response.
+ if(typeof ret != "undefined"){
+ res = ret;
+ }
fired = ((res instanceof Error) ? 1 : 0);
if(res instanceof dojo.Deferred){
cb = function(res){
self._resback(res);
// inlined from _pause()
self.paused--;
if(
(self.paused == 0) &&
(self.fired >= 0)
){
self._fire();
}
}
// inlined from _unpause
this.paused++;
}
- }catch(err){
- console.debug(err);
- fired = 1;
- res = err;
+ };
+ if(dojo.config.debugAtAllCosts){
+ func.call(this);
+ }else{
+ try{
+ func.call(this);
+ }catch(err){
+ fired = 1;
+ res = err;
+ }
}
}
this.fired = fired;
this.results[fired] = res;
+ this.isFiring = false;
if((cb)&&(this.paused)){
// this is for "tail recursion" in case the dependent
// deferred is already fired
res.addBoth(cb);
}
}
});
}
if(!dojo._hasResource["dojo._base.json"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo._base.json"] = true;
dojo.provide("dojo._base.json");
dojo.fromJson = function(/*String*/ json){
// summary:
- // evaluates the passed string-form of a JSON object
+ // Parses a [JSON](http://json.org) string to return a JavaScript object.
+ // description:
+ // Throws for invalid JSON strings, but it does not use a strict JSON parser. It
+ // delegates to eval().
// json:
// a string literal of a JSON item, for instance:
- // '{ "foo": [ "bar", 1, { "baz": "thud" } ] }'
- // return:
- // An object, the result of the evaluation
-
- // FIXME: should this accept mozilla's optional second arg?
- try {
- return eval("(" + json + ")");
- }catch(e){
- console.debug(e);
- return json;
- }
+ // `'{ "foo": [ "bar", 1, { "baz": "thud" } ] }'`
+
+ return eval("(" + json + ")"); // Object
}
dojo._escapeString = function(/*String*/str){
//summary:
// Adds escape sequences for non-visual characters, double quote and
// backslash and surrounds with double quotes to form a valid string
// literal.
- 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"); // string
+ 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"); // string
}
dojo.toJsonIndentStr = "\t";
dojo.toJson = function(/*Object*/ it, /*Boolean?*/ prettyPrint, /*String?*/ _indentStr){
- // summary:
- // Create a JSON serialization of an object.
+ // summary:
+ // Returns a [JSON](http://json.org) serialization of an object.
+ // description:
+ // Returns a [JSON](http://json.org) serialization of an object.
// Note that this doesn't check for infinite recursion, so don't do that!
- //
- // it:
+ // it:
// an object to be serialized. Objects may define their own
// serialization via a special "__json__" or "json" function
// property. If a specialized serializer has been defined, it will
// be used as a fallback.
- //
- // prettyPrint:
+ // prettyPrint:
// if true, we indent objects and arrays to make the output prettier.
- // The variable dojo.toJsonIndentStr is used as the indent string
- // -- to use something other than the default (tab),
- // change that variable before calling dojo.toJson().
- //
- // _indentStr:
+ // The variable `dojo.toJsonIndentStr` is used as the indent string --
+ // to use something other than the default (tab), change that variable
+ // before calling dojo.toJson().
+ // _indentStr:
// private variable for recursive calls when pretty printing, do not use.
- //
- // return:
- // a String representing the serialized version of the passed object.
-
- _indentStr = _indentStr || "";
- var nextIndent = (prettyPrint ? _indentStr + dojo.toJsonIndentStr : "");
- var newLine = (prettyPrint ? "\n" : "");
- var objtype = typeof(it);
- if(objtype == "undefined"){
+ // example:
+ // simple serialization of a trivial object
+ // | var jsonStr = dojo.toJson({ howdy: "stranger!", isStrange: true });
+ // | doh.is('{"howdy":"stranger!","isStrange":true}', jsonStr);
+ // example:
+ // a custom serializer for an objects of a particular class:
+ // | dojo.declare("Furby", null, {
+ // | furbies: "are strange",
+ // | furbyCount: 10,
+ // | __json__: function(){
+ // | },
+ // | });
+
+ if(it === undefined){
return "undefined";
- }else if((objtype == "number")||(objtype == "boolean")){
+ }
+ var objtype = typeof it;
+ if(objtype == "number" || objtype == "boolean"){
return it + "";
- }else if(it === null){
+ }
+ if(it === null){
return "null";
}
if(dojo.isString(it)){
return dojo._escapeString(it);
}
- if(it.nodeType && it.cloneNode){ // isNode
- return ""; // FIXME: would something like outerHTML be better here?
- }
// recurse
var recurse = arguments.callee;
// short-circuit for objects that support "json" serialization
// if they return "self" then just pass-through...
var newObj;
- if(typeof it.__json__ == "function"){
- newObj = it.__json__();
- if(it !== newObj){
- return recurse(newObj, prettyPrint, nextIndent);
- }
- }
- if(typeof it.json == "function"){
- newObj = it.json();
+ _indentStr = _indentStr || "";
+ var nextIndent = prettyPrint ? _indentStr + dojo.toJsonIndentStr : "";
+ var tf = it.__json__||it.json;
+ if(dojo.isFunction(tf)){
+ newObj = tf.call(it);
if(it !== newObj){
return recurse(newObj, prettyPrint, nextIndent);
}
}
+ if(it.nodeType && it.cloneNode){ // isNode
+ // we can't seriailize DOM nodes as regular objects because they have cycles
+ // DOM nodes could be serialized with something like outerHTML, but
+ // that can be provided by users in the form of .json or .__json__ function.
+ throw new Error("Can't serialize DOM nodes");
+ }
+
+ var sep = prettyPrint ? " " : "";
+ var newLine = prettyPrint ? "\n" : "";
+
// array
if(dojo.isArray(it)){
- var res = [];
- for(var i = 0; i < it.length; i++){
- var val = recurse(it[i], prettyPrint, nextIndent);
- if(typeof(val) != "string"){
+ var res = dojo.map(it, function(obj){
+ var val = recurse(obj, prettyPrint, nextIndent);
+ if(typeof val != "string"){
val = "undefined";
}
- res.push(newLine + nextIndent + val);
- }
- return "[" + res.join(", ") + newLine + _indentStr + "]";
+ return newLine + nextIndent + val;
+ });
+ return "[" + res.join("," + sep) + newLine + _indentStr + "]";
}
/*
// look in the registry
try {
window.o = it;
newObj = dojo.json.jsonRegistry.match(it);
return recurse(newObj, prettyPrint, nextIndent);
}catch(e){
- // console.debug(e);
+ // console.log(e);
}
// it's a function with no adapter, skip it
*/
if(objtype == "function"){
- return null;
+ return null; // null
}
// generic object code path
- var output = [];
- for(var key in it){
- var keyStr;
- if(typeof(key) == "number"){
+ var output = [], key;
+ for(key in it){
+ var keyStr, val;
+ if(typeof key == "number"){
keyStr = '"' + key + '"';
- }else if(typeof(key) == "string"){
+ }else if(typeof key == "string"){
keyStr = dojo._escapeString(key);
}else{
// skip non-string or number keys
continue;
}
val = recurse(it[key], prettyPrint, nextIndent);
- if(typeof(val) != "string"){
+ if(typeof val != "string"){
// skip non-serializable values
continue;
}
// FIXME: use += on Moz!!
// MOW NOTE: using += is a pain because you have to account for the dangling comma...
- output.push(newLine + nextIndent + keyStr + ": " + val);
- }
- return "{" + output.join(", ") + newLine + _indentStr + "}";
-}
-
+ output.push(newLine + nextIndent + keyStr + ":" + sep + val);
+ }
+ return "{" + output.join("," + sep) + newLine + _indentStr + "}"; // String
}
-if(!dojo._hasResource["dojo._base.array"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.array"] = true;
-
-dojo.provide("dojo._base.array");
-
-(function(){
- var _getParts = function(arr, obj, cb){
- return [
- (dojo.isString(arr) ? arr.split("") : arr),
- (obj||dojo.global),
- // FIXME: cache the anonymous functions we create here?
- (dojo.isString(cb) ? (new Function("item", "index", "array", cb)) : cb)
- ];
- }
-
- dojo.mixin(dojo, {
- indexOf: function( /*Array*/ array,
- /*Object*/ value,
- /*Integer?*/ fromIndex,
- /*Boolean?*/ findLast){
- // summary:
- // locates the first index of the provided value in the
- // passed array. If the value is not found, -1 is returned.
- // description:
- // For details on this method, see:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:indexOf
-
- var i = 0, step = 1, end = array.length;
- if(findLast){
- i = end - 1;
- step = end = -1;
- }
- for(i = fromIndex || i; i != end; i += step){
- if(array[i] == value){ return i; }
- }
- return -1; // Number
- },
-
- lastIndexOf: function(/*Array*/array, /*Object*/value, /*Integer?*/fromIndex){
- // summary:
- // locates the last index of the provided value in the passed array.
- // If the value is not found, -1 is returned.
- // description:
- // For details on this method, see:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:lastIndexOf
- return dojo.indexOf(array, value, fromIndex, true); // Number
- },
-
- forEach: function(/*Array*/arr, /*Function*/callback, /*Object?*/obj){
- // summary:
- // for every item in arr, call callback with that item as its
- // only parameter.
- // description:
- // Return values are ignored. This function
- // corresponds (and wraps) the JavaScript 1.6 forEach method. For
- // more details, see:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:forEach
-
- // match the behavior of the built-in forEach WRT empty arrs
- if(!arr || !arr.length){ return; }
-
- // FIXME: there are several ways of handilng thisObject. Is
- // dojo.global always the default context?
- var _p = _getParts(arr, obj, callback); arr = _p[0];
- for(var i=0,l=_p[0].length; i<l; i++){
- _p[2].call(_p[1], arr[i], i, arr);
- }
- },
-
- _everyOrSome: function(/*Boolean*/every, /*Array*/arr, /*Function*/callback, /*Object?*/obj){
- var _p = _getParts(arr, obj, callback); arr = _p[0];
- for(var i = 0, l = arr.length; i < l; i++){
- var result = !!_p[2].call(_p[1], arr[i], i, arr);
- if(every ^ result){
- return result; // Boolean
- }
- }
- return every; // Boolean
- },
-
- every: function(/*Array*/arr, /*Function*/callback, /*Object?*/thisObject){
- // summary:
- // Determines whether or not every item in the array satisfies the
- // condition implemented by callback.
- // description:
- // The parameter thisObject may be used to
- // scope the call to callback. The function signature is derived
- // from the JavaScript 1.6 Array.every() function. More
- // information on this can be found here:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:every
- // example:
- // | dojo.every([1, 2, 3, 4], function(item){ return item>1; });
- // returns false
- // example:
- // | dojo.every([1, 2, 3, 4], function(item){ return item>0; });
- // returns true
- return this._everyOrSome(true, arr, callback, thisObject); // Boolean
- },
-
- some: function(/*Array*/arr, /*Function*/callback, /*Object?*/thisObject){
- // summary:
- // Determines whether or not any item in the array satisfies the
- // condition implemented by callback.
- // description:
- // The parameter thisObject may be used to
- // scope the call to callback. The function signature is derived
- // from the JavaScript 1.6 Array.some() function. More
- // information on this can be found here:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:some
- // example:
- // | dojo.some([1, 2, 3, 4], function(item){ return item>1; });
- // returns true
- // example:
- // | dojo.some([1, 2, 3, 4], function(item){ return item<1; });
- // returns false
- return this._everyOrSome(false, arr, callback, thisObject); // Boolean
- },
-
- map: function(/*Array*/arr, /*Function*/func, /*Function?*/obj){
- // summary:
- // applies a function to each element of an Array and creates
- // an Array with the results
- // description:
- // Returns a new array constituted from the return values of
- // passing each element of arr into unary_func. The obj parameter
- // may be passed to enable the passed function to be called in
- // that scope. In environments that support JavaScript 1.6, this
- // function is a passthrough to the built-in map() function
- // provided by Array instances. For details on this, see:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:map
- // example:
- // | dojo.map([1, 2, 3, 4], function(item){ return item+1 });
- // returns [2, 3, 4, 5]
- var _p = _getParts(arr, obj, func); arr = _p[0];
- var outArr = ((arguments[3]) ? (new arguments[3]()) : []);
- for(var i=0;i<arr.length;++i){
- outArr.push(_p[2].call(_p[1], arr[i], i, arr));
- }
- return outArr; // Array
- },
-
- filter: function(/*Array*/arr, /*Function*/callback, /*Object?*/obj){
- // summary:
- // Returns a new Array with those items from arr that match the
- // condition implemented by callback. ob may be used to
- // scope the call to callback. The function signature is derived
- // from the JavaScript 1.6 Array.filter() function.
- //
- // More information on the JS 1.6 API can be found here:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:filter
- // example:
- // | dojo.filter([1, 2, 3, 4], function(item){ return item>1; });
- // returns [2, 3, 4]
-
- var _p = _getParts(arr, obj, callback); arr = _p[0];
- var outArr = [];
- for(var i = 0; i < arr.length; i++){
- if(_p[2].call(_p[1], arr[i], i, arr)){
- outArr.push(arr[i]);
- }
- }
- return outArr; // Array
- }
- });
-})();
-
}
if(!dojo._hasResource["dojo._base.Color"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo._base.Color"] = true;
dojo.provide("dojo._base.Color");
-dojo.Color = function(/*Array|String|Object*/ color){
- // summary:
- // takes a named string, hex string, array of rgb or rgba values,
- // an object with r, g, b, and a properties, or another dojo.Color object
- if(color){ this.setColor(color); }
-};
-
-// FIXME: there's got to be a more space-efficient way to encode or discover these!! Use hex?
-dojo.Color.named = {
- black: [0,0,0],
- silver: [192,192,192],
- gray: [128,128,128],
- white: [255,255,255],
- maroon: [128,0,0],
- red: [255,0,0],
- purple: [128,0,128],
- fuchsia: [255,0,255],
- green: [0,128,0],
- lime: [0,255,0],
- olive: [128,128,0],
- yellow: [255,255,0],
- navy: [0,0,128],
- blue: [0,0,255],
- teal: [0,128,128],
- aqua: [0,255,255]
-};
-
-
-dojo.extend(dojo.Color, {
- r: 255, g: 255, b: 255, a: 1,
- _set: function(r, g, b, a){
- var t = this; t.r = r; t.g = g; t.b = b; t.a = a;
- },
- setColor: function(/*Array|String|Object*/ color){
- // summary:
- // takes a named string, hex string, array of rgb or rgba values,
- // an object with r, g, b, and a properties, or another dojo.Color object
- var d = dojo;
- if(d.isString(color)){
- d.colorFromString(color, this);
- }else if(d.isArray(color)){
- d.colorFromArray(color, this);
- }else{
- this._set(color.r, color.g, color.b, color.a);
- if(!(color instanceof d.Color)){ this.sanitize(); }
- }
- return this; // dojo.Color
- },
- sanitize: function(){
+(function(){
+
+ var d = dojo;
+
+ dojo.Color = function(/*Array|String|Object*/ color){
// summary:
- // makes sure that the object has correct attributes
- // description:
- // the default implementation does nothing, include dojo.colors to
- // augment it to real checks
- return this; // dojo.Color
- },
- toRgb: function(){
- // summary: returns 3 component array of rgb values
- var t = this;
- return [t.r, t.g, t.b]; // Array
- },
- toRgba: function(){
- // summary: returns a 4 component array of rgba values
- var t = this;
- return [t.r, t.g, t.b, t.a]; // Array
- },
- toHex: function(){
- // summary: returns a css color string in hexadecimal representation
- var arr = dojo.map(["r", "g", "b"], function(x){
- var s = this[x].toString(16);
- return s.length < 2 ? "0" + s : s;
- }, this);
- return "#" + arr.join(""); // String
- },
- toCss: function(/*Boolean?*/ includeAlpha){
- // summary: returns a css color string in rgb(a) representation
- var t = this, rgb = t.r + ", " + t.g + ", " + t.b;
- return (includeAlpha ? "rgba(" + rgb + ", " + t.a : "rgb(" + rgb) + ")"; // String
- },
- toString: function(){
- // summary: returns a visual representation of the color
- return this.toCss(true); // String
- }
-});
-
-dojo.blendColors = function(
- /*dojo.Color*/ start,
- /*dojo.Color*/ end,
- /*Number*/ weight,
- /*dojo.Color?*/ obj
-){
- // summary:
- // blend colors end and start with weight from 0 to 1, 0.5 being a 50/50 blend,
- // can reuse a previously allocated dojo.Color object for the result
- var d = dojo, t = obj || new dojo.Color();
- d.forEach(["r", "g", "b", "a"], function(x){
- t[x] = start[x] + (end[x] - start[x]) * weight;
- if(x != "a"){ t[x] = Math.round(t[x]); }
+ // Takes a named string, hex string, array of rgb or rgba values,
+ // an object with r, g, b, and a properties, or another `dojo.Color` object
+ // and creates a new Color instance to work from.
+ //
+ // example:
+ // Work with a Color instance:
+ // | var c = new dojo.Color();
+ // | c.setColor([0,0,0]); // black
+ // | var hex = c.toHex(); // #000000
+ //
+ // example:
+ // Work with a node's color:
+ // | var color = dojo.style("someNode", "backgroundColor");
+ // | var n = new dojo.Color(color);
+ // | // adjust the color some
+ // | n.r *= .5;
+ // | console.log(n.toString()); // rgb(128, 255, 255);
+ if(color){ this.setColor(color); }
+ };
+
+ // FIXME:
+ // there's got to be a more space-efficient way to encode or discover
+ // these!! Use hex?
+ dojo.Color.named = {
+ black: [0,0,0],
+ silver: [192,192,192],
+ gray: [128,128,128],
+ white: [255,255,255],
+ maroon: [128,0,0],
+ red: [255,0,0],
+ purple: [128,0,128],
+ fuchsia: [255,0,255],
+ green: [0,128,0],
+ lime: [0,255,0],
+ olive: [128,128,0],
+ yellow: [255,255,0],
+ navy: [0,0,128],
+ blue: [0,0,255],
+ teal: [0,128,128],
+ aqua: [0,255,255],
+ transparent: d.config.transparentColor || [255,255,255]
+ };
+
+ dojo.extend(dojo.Color, {
+ r: 255, g: 255, b: 255, a: 1,
+ _set: function(r, g, b, a){
+ var t = this; t.r = r; t.g = g; t.b = b; t.a = a;
+ },
+ setColor: function(/*Array|String|Object*/ color){
+ // summary:
+ // Takes a named string, hex string, array of rgb or rgba values,
+ // an object with r, g, b, and a properties, or another `dojo.Color` object
+ // and sets this color instance to that value.
+ //
+ // example:
+ // | var c = new dojo.Color(); // no color
+ // | c.setColor("#ededed"); // greyish
+ if(d.isString(color)){
+ d.colorFromString(color, this);
+ }else if(d.isArray(color)){
+ d.colorFromArray(color, this);
+ }else{
+ this._set(color.r, color.g, color.b, color.a);
+ if(!(color instanceof d.Color)){ this.sanitize(); }
+ }
+ return this; // dojo.Color
+ },
+ sanitize: function(){
+ // summary:
+ // Ensures the object has correct attributes
+ // description:
+ // the default implementation does nothing, include dojo.colors to
+ // augment it with real checks
+ return this; // dojo.Color
+ },
+ toRgb: function(){
+ // summary:
+ // Returns 3 component array of rgb values
+ // example:
+ // | var c = new dojo.Color("#000000");
+ // | console.log(c.toRgb()); // [0,0,0]
+ var t = this;
+ return [t.r, t.g, t.b]; // Array
+ },
+ toRgba: function(){
+ // summary:
+ // Returns a 4 component array of rgba values from the color
+ // represented by this object.
+ var t = this;
+ return [t.r, t.g, t.b, t.a]; // Array
+ },
+ toHex: function(){
+ // summary:
+ // Returns a CSS color string in hexadecimal representation
+ // example:
+ // | console.log(new dojo.Color([0,0,0]).toHex()); // #000000
+ var arr = d.map(["r", "g", "b"], function(x){
+ var s = this[x].toString(16);
+ return s.length < 2 ? "0" + s : s;
+ }, this);
+ return "#" + arr.join(""); // String
+ },
+ toCss: function(/*Boolean?*/ includeAlpha){
+ // summary:
+ // Returns a css color string in rgb(a) representation
+ // example:
+ // | var c = new dojo.Color("#FFF").toCss();
+ // | console.log(c); // rgb('255','255','255')
+ var t = this, rgb = t.r + ", " + t.g + ", " + t.b;
+ return (includeAlpha ? "rgba(" + rgb + ", " + t.a : "rgb(" + rgb) + ")"; // String
+ },
+ toString: function(){
+ // summary:
+ // Returns a visual representation of the color
+ return this.toCss(true); // String
+ }
});
- return t.sanitize(); // dojo.Color
-};
-
-dojo.colorFromRgb = function(/*String*/ color, /*dojo.Color?*/ obj){
- // summary: get rgb(a) array from css-style color declarations
- var m = color.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);
- return m && dojo.colorFromArray(m[1].split(/\s*,\s*/), obj); // dojo.Color
-};
-
-dojo.colorFromHex = function(/*String*/ color, /*dojo.Color?*/ obj){
- // summary: converts a hex string with a '#' prefix to a color object.
- // Supports 12-bit #rgb shorthand.
- var d = dojo, t = obj || new d.Color(),
- bits = (color.length == 4) ? 4 : 8,
- mask = (1 << bits) - 1;
- color = Number("0x" + color.substr(1));
- if(isNaN(color)){
- return null; // dojo.Color
- }
- d.forEach(["b", "g", "r"], function(x){
- var c = color & mask;
- color >>= bits;
- t[x] = bits == 4 ? 17 * c : c;
- });
- t.a = 1;
- return t; // dojo.Color
-};
-
-dojo.colorFromArray = function(/*Array*/ a, /*dojo.Color?*/ obj){
- // summary: builds a color from 1, 2, 3, or 4 element array
- var t = obj || new dojo.Color();
- t._set(Number(a[0]), Number(a[1]), Number(a[2]), Number(a[3]));
- if(isNaN(t.a)){ t.a = 1; }
- return t.sanitize(); // dojo.Color
-};
-
-dojo.colorFromString = function(/*String*/ str, /*dojo.Color?*/ obj){
- // summary:
- // parses str for a color value.
- // description:
- // Acceptable input values for str may include arrays of any form
- // accepted by dojo.colorFromArray, hex strings such as "#aaaaaa", or
- // rgb or rgba strings such as "rgb(133, 200, 16)" or "rgba(10, 10,
- // 10, 50)"
- // returns:
- // a dojo.Color object. If obj is passed, it will be the return value.
- var a = dojo.Color.named[str];
- return a && dojo.colorFromArray(a, obj) || dojo.colorFromRgb(str, obj) || dojo.colorFromHex(str, obj);
-};
+
+ dojo.blendColors = function(
+ /*dojo.Color*/ start,
+ /*dojo.Color*/ end,
+ /*Number*/ weight,
+ /*dojo.Color?*/ obj
+ ){
+ // summary:
+ // Blend colors end and start with weight from 0 to 1, 0.5 being a 50/50 blend,
+ // can reuse a previously allocated dojo.Color object for the result
+ var t = obj || new d.Color();
+ d.forEach(["r", "g", "b", "a"], function(x){
+ t[x] = start[x] + (end[x] - start[x]) * weight;
+ if(x != "a"){ t[x] = Math.round(t[x]); }
+ });
+ return t.sanitize(); // dojo.Color
+ };
+
+ dojo.colorFromRgb = function(/*String*/ color, /*dojo.Color?*/ obj){
+ // summary:
+ // Returns a `dojo.Color` instance from a string of the form
+ // "rgb(...)" or "rgba(...)". Optionally accepts a `dojo.Color`
+ // object to update with the parsed value and return instead of
+ // creating a new object.
+ // returns:
+ // A dojo.Color object. If obj is passed, it will be the return value.
+ var m = color.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);
+ return m && dojo.colorFromArray(m[1].split(/\s*,\s*/), obj); // dojo.Color
+ };
+
+ dojo.colorFromHex = function(/*String*/ color, /*dojo.Color?*/ obj){
+ // summary:
+ // Converts a hex string with a '#' prefix to a color object.
+ // Supports 12-bit #rgb shorthand. Optionally accepts a
+ // `dojo.Color` object to update with the parsed value.
+ //
+ // returns:
+ // A dojo.Color object. If obj is passed, it will be the return value.
+ //
+ // example:
+ // | var thing = dojo.colorFromHex("#ededed"); // grey, longhand
+ //
+ // example:
+ // | var thing = dojo.colorFromHex("#000"); // black, shorthand
+ var t = obj || new d.Color(),
+ bits = (color.length == 4) ? 4 : 8,
+ mask = (1 << bits) - 1;
+ color = Number("0x" + color.substr(1));
+ if(isNaN(color)){
+ return null; // dojo.Color
+ }
+ d.forEach(["b", "g", "r"], function(x){
+ var c = color & mask;
+ color >>= bits;
+ t[x] = bits == 4 ? 17 * c : c;
+ });
+ t.a = 1;
+ return t; // dojo.Color
+ };
+
+ dojo.colorFromArray = function(/*Array*/ a, /*dojo.Color?*/ obj){
+ // summary:
+ // Builds a `dojo.Color` from a 3 or 4 element array, mapping each
+ // element in sequence to the rgb(a) values of the color.
+ // example:
+ // | var myColor = dojo.colorFromArray([237,237,237,0.5]); // grey, 50% alpha
+ // returns:
+ // A dojo.Color object. If obj is passed, it will be the return value.
+ var t = obj || new d.Color();
+ t._set(Number(a[0]), Number(a[1]), Number(a[2]), Number(a[3]));
+ if(isNaN(t.a)){ t.a = 1; }
+ return t.sanitize(); // dojo.Color
+ };
+
+ dojo.colorFromString = function(/*String*/ str, /*dojo.Color?*/ obj){
+ // summary:
+ // Parses `str` for a color value. Accepts hex, rgb, and rgba
+ // style color values.
+ // description:
+ // Acceptable input values for str may include arrays of any form
+ // accepted by dojo.colorFromArray, hex strings such as "#aaaaaa", or
+ // rgb or rgba strings such as "rgb(133, 200, 16)" or "rgba(10, 10,
+ // 10, 50)"
+ // returns:
+ // A dojo.Color object. If obj is passed, it will be the return value.
+ var a = d.Color.named[str];
+ return a && d.colorFromArray(a, obj) || d.colorFromRgb(str, obj) || d.colorFromHex(str, obj);
+ };
+})();
}
if(!dojo._hasResource["dojo._base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo._base"] = true;
dojo.provide("dojo._base");
-
-
-
-
-
-
-(function(){
- if(djConfig.require){
- for(var x=0; x<djConfig.require.length; x++){
- dojo["require"](djConfig.require[x]);
- }
- }
-})();
-
}
if(!dojo._hasResource["dojo._base.window"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo._base.window"] = true;
dojo.provide("dojo._base.window");
-dojo._gearsObject = function(){
- // summary:
- // factory method to get a Google Gears plugin instance to
- // expose in the browser runtime environment, if present
- var factory;
- var results;
-
- var gearsObj = dojo.getObject("google.gears");
- if(gearsObj){ return gearsObj; } // already defined elsewhere
-
- if(typeof GearsFactory != "undefined"){ // Firefox
- factory = new GearsFactory();
- }else{
- if(dojo.isIE){
- // IE
- try{
- factory = new ActiveXObject("Gears.Factory");
- }catch(e){
- // ok to squelch; there's no gears factory. move on.
- }
- }else if(navigator.mimeTypes["application/x-googlegears"]){
- // Safari?
- factory = document.createElement("object");
- factory.setAttribute("type", "application/x-googlegears");
- factory.setAttribute("width", 0);
- factory.setAttribute("height", 0);
- factory.style.display = "none";
- document.documentElement.appendChild(factory);
- }
- }
-
- // still nothing?
- if(!factory){ return null; }
-
- // define the global objects now; don't overwrite them though if they
- // were somehow set internally by the Gears plugin, which is on their
- // dev roadmap for the future
- dojo.setObject("google.gears.factory", factory);
- return dojo.getObject("google.gears");
-};
-
-// see if we have Google Gears installed, and if
-// so, make it available in the runtime environment
-// and in the Google standard 'google.gears' global object
-dojo.isGears = (!!dojo._gearsObject())||0;
-
-// @global: dojo.doc
-
-// summary:
-// Current document object. 'dojo.doc' can be modified
-// for temporary context shifting. Also see dojo.withDoc().
-// description:
-// Refer to dojo.doc rather
-// than referring to 'window.document' to ensure your code runs
-// correctly in managed contexts.
+/*=====
+dojo.doc = {
+ // summary:
+ // Alias for the current document. 'dojo.doc' can be modified
+ // for temporary context shifting. Also see dojo.withDoc().
+ // description:
+ // Refer to dojo.doc rather
+ // than referring to 'window.document' to ensure your code runs
+ // correctly in managed contexts.
+ // example:
+ // | n.appendChild(dojo.doc.createElement('div'));
+}
+=====*/
dojo.doc = window["document"] || null;
dojo.body = function(){
// summary:
+ // Return the body element of the document
// return the body object associated with dojo.doc
+ // example:
+ // | dojo.body().appendChild(dojo.doc.createElement('div'));
// Note: document.body is not defined for a strict xhtml document
// Would like to memoize this, but dojo.doc can change vi dojo.withDoc().
- return dojo.doc.body || dojo.doc.getElementsByTagName("body")[0];
+ return dojo.doc.body || dojo.doc.getElementsByTagName("body")[0]; // Node
}
dojo.setContext = function(/*Object*/globalObject, /*DocumentElement*/globalDocument){
// summary:
// changes the behavior of many core Dojo functions that deal with
// namespace and DOM lookup, changing them to work in a new global
- // context. The varibles dojo.global and dojo.doc
- // are modified as a result of calling this function.
+ // context (e.g., an iframe). The varibles dojo.global and dojo.doc
+ // are modified as a result of calling this function and the result of
+ // `dojo.body()` likewise differs.
dojo.global = globalObject;
dojo.doc = globalDocument;
};
-dojo._fireCallback = function(callback, context, cbArguments){
- // FIXME: should migrate to using "dojo.isString"!
- if(context && dojo.isString(callback)){
- callback = context[callback];
- }
- return (context ? callback.apply(context, cbArguments || [ ]) : callback());
-}
-
dojo.withGlobal = function( /*Object*/globalObject,
/*Function*/callback,
/*Object?*/thisObject,
/*Array?*/cbArguments){
// summary:
- // Call callback with globalObject as dojo.global and
+ // Invoke callback with globalObject as dojo.global and
+ // globalObject.document as dojo.doc.
+ // description:
+ // Invoke callback with globalObject as dojo.global and
// globalObject.document as dojo.doc. If provided, globalObject
// will be executed in the context of object thisObject
- // description:
// When callback() returns or throws an error, the dojo.global
// and dojo.doc will be restored to its previous state.
- var rval;
+
var oldGlob = dojo.global;
- var oldDoc = dojo.doc;
try{
- dojo.setContext(globalObject, globalObject.document);
- rval = dojo._fireCallback(callback, thisObject, cbArguments);
+ dojo.global = globalObject;
+ return dojo.withDoc.call(null, globalObject.document, callback, thisObject, cbArguments);
}finally{
- dojo.setContext(oldGlob, oldDoc);
- }
- return rval;
+ dojo.global = oldGlob;
+ }
}
-dojo.withDoc = function( /*Object*/documentObject,
+dojo.withDoc = function( /*DocumentElement*/documentObject,
/*Function*/callback,
/*Object?*/thisObject,
/*Array?*/cbArguments){
// summary:
- // Call callback with documentObject as dojo.doc. If provided,
+ // Invoke callback with documentObject as dojo.doc.
+ // description:
+ // Invoke callback with documentObject as dojo.doc. If provided,
// callback will be executed in the context of object thisObject
- // description:
// When callback() returns or throws an error, the dojo.doc will
// be restored to its previous state.
- var rval;
- var oldDoc = dojo.doc;
+
+ var oldDoc = dojo.doc,
+ oldLtr = dojo._bodyLtr,
+ oldQ = dojo.isQuirks;
+
try{
dojo.doc = documentObject;
- rval = dojo._fireCallback(callback, thisObject, cbArguments);
+ delete dojo._bodyLtr; // uncache
+ dojo.isQuirks = dojo.doc.compatMode == "BackCompat"; // no need to check for QuirksMode which was Opera 7 only
+
+ if(thisObject && typeof callback == "string"){
+ callback = thisObject[callback];
+ }
+
+ return callback.apply(thisObject, cbArguments || []);
}finally{
dojo.doc = oldDoc;
- }
- return rval;
+ delete dojo._bodyLtr; // in case it was undefined originally, and set to true/false by the alternate document
+ if(oldLtr !== undefined){ dojo._bodyLtr = oldLtr; }
+ dojo.isQuirks = oldQ;
+ }
};
-
-//Register any module paths set up in djConfig. Need to do this
-//in the hostenvs since hostenv_browser can read djConfig from a
-//script tag's attribute.
-(function(){
- var mp = djConfig["modulePaths"];
- if(mp){
- for(var param in mp){
- dojo.registerModulePath(param, mp[param]);
- }
- }
-})();
+
}
if(!dojo._hasResource["dojo._base.event"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo._base.event"] = true;
dojo.provide("dojo._base.event");
// this file courtesy of the TurboAjax Group, licensed under a Dojo CLA
(function(){
// DOM event listener machinery
- var del = dojo._event_listener = {
- add: function(/*DOMNode*/node, /*String*/name, /*Function*/fp){
+ var del = (dojo._event_listener = {
+ add: function(/*DOMNode*/ node, /*String*/ name, /*Function*/ fp){
if(!node){return;}
name = del._normalizeEventName(name);
-
fp = del._fixCallback(name, fp);
-
var oname = name;
- if((!dojo.isIE)&&((name == "mouseenter")||(name == "mouseleave"))){
- var oname = name;
+ if(
+ !dojo.isIE &&
+ (name == "mouseenter" || name == "mouseleave")
+ ){
var ofp = fp;
+ //oname = name;
name = (name == "mouseenter") ? "mouseover" : "mouseout";
fp = function(e){
- // thanks ben!
- var id = dojo.isDescendant(e.relatedTarget, node);
- if(id == false){
- // e.type = oname; // FIXME: doesn't take?
- return ofp.call(this, e);
+ if(!dojo.isDescendant(e.relatedTarget, node)){
+ // e.type = oname; // FIXME: doesn't take? SJM: event.type is generally immutable.
+ return ofp.call(this, e);
}
}
}
-
node.addEventListener(name, fp, false);
return fp; /*Handle*/
},
- remove: function(/*DOMNode*/node, /*String*/event, /*Handle*/handle){
+ remove: function(/*DOMNode*/ node, /*String*/ event, /*Handle*/ handle){
// summary:
// clobbers the listener from the node
// node:
// DOM node to attach the event to
// event:
// the name of the handler to remove the function from
// handle:
// the handle returned from add
- (node)&&(node.removeEventListener(del._normalizeEventName(event), handle, false));
+ if(node){
+ event = del._normalizeEventName(event);
+ if(!dojo.isIE && (event == "mouseenter" || event == "mouseleave")){
+ event = (event == "mouseenter") ? "mouseover" : "mouseout";
+ }
+
+ node.removeEventListener(event, handle, false);
+ }
},
- _normalizeEventName: function(/*String*/name){
+ _normalizeEventName: function(/*String*/ name){
// Generally, name should be lower case, unless it is special
// somehow (e.g. a Mozilla DOM event).
// Remove 'on'.
- return (name.slice(0,2)=="on" ? name.slice(2) : name);
+ return name.slice(0,2) =="on" ? name.slice(2) : name;
},
- _fixCallback: function(/*String*/name, fp){
+ _fixCallback: function(/*String*/ name, fp){
// By default, we only invoke _fixEvent for 'keypress'
// If code is added to _fixEvent for other events, we have
// to revisit this optimization.
// This also applies to _fixEvent overrides for Safari and Opera
// below.
- return (name!="keypress" ? fp : function(e){ return fp.call(this, del._fixEvent(e, this)); });
+ return name != "keypress" ? fp : function(e){ return fp.call(this, del._fixEvent(e, this)); };
},
_fixEvent: function(evt, sender){
// _fixCallback only attaches us to keypress.
// Switch on evt.type anyway because we might
// be called directly from dojo.fixEvent.
switch(evt.type){
case "keypress":
del._setKeyChar(evt);
break;
}
return evt;
},
_setKeyChar: function(evt){
- evt.keyChar = (evt.charCode ? String.fromCharCode(evt.charCode) : '');
- }
- };
+ evt.keyChar = evt.charCode ? String.fromCharCode(evt.charCode) : '';
+ evt.charOrCode = evt.keyChar || evt.keyCode;
+ },
+ // For IE and Safari: some ctrl-key combinations (mostly w/punctuation) do not emit a char code in IE
+ // we map those virtual key codes to ascii here
+ // not valid for all (non-US) keyboards, so maybe we shouldn't bother
+ _punctMap: {
+ 106:42,
+ 111:47,
+ 186:59,
+ 187:43,
+ 188:44,
+ 189:45,
+ 190:46,
+ 191:47,
+ 192:96,
+ 219:91,
+ 220:92,
+ 221:93,
+ 222:39
+ }
+ });
// DOM events
- dojo.fixEvent = function(/*Event*/evt, /*DOMNode*/sender){
+ dojo.fixEvent = function(/*Event*/ evt, /*DOMNode*/ sender){
// summary:
// normalizes properties on the event object including event
// bubbling methods, keystroke normalization, and x/y positions
// evt: Event
// native event object
// sender: DOMNode
// node to treat as "currentTarget"
return del._fixEvent(evt, sender);
}
- dojo.stopEvent = function(/*Event*/evt){
+ dojo.stopEvent = function(/*Event*/ evt){
// summary:
// prevents propagation and clobbers the default action of the
// passed event
// evt: Event
// The event object. If omitted, window.event is used on IE.
evt.preventDefault();
evt.stopPropagation();
// NOTE: below, this method is overridden for IE
}
// the default listener to use on dontFix nodes, overriden for IE
var node_listener = dojo._listener;
// Unify connect and event listeners
dojo._connect = function(obj, event, context, method, dontFix){
// FIXME: need a more strict test
var isNode = obj && (obj.nodeType||obj.attachEvent||obj.addEventListener);
// choose one of three listener options: raw (connect.js), DOM event on a Node, custom event on a Node
// we need the third option to provide leak prevention on broken browsers (IE)
- var lid = !isNode ? 0 : (!dontFix ? 1 : 2), l = [dojo._listener, del, node_listener][lid];
+ var lid = isNode ? (dontFix ? 2 : 1) : 0, l = [dojo._listener, del, node_listener][lid];
// create a listener
var h = l.add(obj, event, dojo.hitch(context, method));
// formerly, the disconnect package contained "l" directly, but if client code
// leaks the disconnect package (by connecting it to a node), referencing "l"
// compounds the problem.
// instead we return a listener id, which requires custom _disconnect below.
// return disconnect package
return [ obj, event, h, lid ];
}
dojo._disconnect = function(obj, event, handle, listener){
([dojo._listener, del, node_listener][listener]).remove(obj, event, handle);
}
// Constants
// Public: client code should test
// keyCode against these named constants, as the
// actual codes can vary by browser.
dojo.keys = {
+ // summary:
+ // Definitions for common key values
BACKSPACE: 8,
TAB: 9,
CLEAR: 12,
ENTER: 13,
SHIFT: 16,
CTRL: 17,
ALT: 18,
+ META: dojo.isSafari ? 91 : 224, // the apple key on macs
PAUSE: 19,
CAPS_LOCK: 20,
ESCAPE: 27,
SPACE: 32,
PAGE_UP: 33,
PAGE_DOWN: 34,
END: 35,
HOME: 36,
LEFT_ARROW: 37,
UP_ARROW: 38,
RIGHT_ARROW: 39,
DOWN_ARROW: 40,
INSERT: 45,
DELETE: 46,
HELP: 47,
LEFT_WINDOW: 91,
RIGHT_WINDOW: 92,
SELECT: 93,
NUMPAD_0: 96,
NUMPAD_1: 97,
NUMPAD_2: 98,
NUMPAD_3: 99,
NUMPAD_4: 100,
NUMPAD_5: 101,
NUMPAD_6: 102,
NUMPAD_7: 103,
NUMPAD_8: 104,
NUMPAD_9: 105,
NUMPAD_MULTIPLY: 106,
NUMPAD_PLUS: 107,
NUMPAD_ENTER: 108,
NUMPAD_MINUS: 109,
NUMPAD_PERIOD: 110,
NUMPAD_DIVIDE: 111,
F1: 112,
F2: 113,
F3: 114,
F4: 115,
F5: 116,
F6: 117,
F7: 118,
F8: 119,
F9: 120,
F10: 121,
F11: 122,
F12: 123,
F13: 124,
F14: 125,
F15: 126,
NUM_LOCK: 144,
- SCROLL_LOCK: 145
+ SCROLL_LOCK: 145,
+ // virtual key mapping
+ copyKey: dojo.isMac && !dojo.isAIR ? (dojo.isSafari ? 91 : 224 ) : 17
};
- // IE event normalization
+ var evtCopyKey = dojo.isMac ? "metaKey" : "ctrlKey";
+
+ dojo.isCopyKey = function(e){
+ // summary:
+ // Checks an event for the copy key (meta on Mac, and ctrl anywhere else)
+ // e: Event
+ // Event object to examine
+ return e[evtCopyKey]; // Boolean
+ };
+
+ // Public: decoding mouse buttons from events
+
+/*=====
+ dojo.mouseButtons = {
+ // LEFT: Number
+ // Numeric value of the left mouse button for the platform.
+ LEFT: 0,
+ // MIDDLE: Number
+ // Numeric value of the middle mouse button for the platform.
+ MIDDLE: 1,
+ // RIGHT: Number
+ // Numeric value of the right mouse button for the platform.
+ RIGHT: 2,
+
+ isButton: function(e, button){
+ // summary:
+ // Checks an event object for a pressed button
+ // e: Event
+ // Event object to examine
+ // button: Number
+ // The button value (example: dojo.mouseButton.LEFT)
+ return e.button == button; // Boolean
+ },
+ isLeft: function(e){
+ // summary:
+ // Checks an event object for the pressed left button
+ // e: Event
+ // Event object to examine
+ return e.button == 0; // Boolean
+ },
+ isMiddle: function(e){
+ // summary:
+ // Checks an event object for the pressed middle button
+ // e: Event
+ // Event object to examine
+ return e.button == 1; // Boolean
+ },
+ isRight: function(e){
+ // summary:
+ // Checks an event object for the pressed right button
+ // e: Event
+ // Event object to examine
+ return e.button == 2; // Boolean
+ }
+ };
+=====*/
+
+ if(dojo.isIE){
+ dojo.mouseButtons = {
+ LEFT: 1,
+ MIDDLE: 4,
+ RIGHT: 2,
+ // helper functions
+ isButton: function(e, button){ return e.button & button; },
+ isLeft: function(e){ return e.button & 1; },
+ isMiddle: function(e){ return e.button & 4; },
+ isRight: function(e){ return e.button & 2; }
+ };
+ }else{
+ dojo.mouseButtons = {
+ LEFT: 0,
+ MIDDLE: 1,
+ RIGHT: 2,
+ // helper functions
+ isButton: function(e, button){ return e.button == button; },
+ isLeft: function(e){ return e.button == 0; },
+ isMiddle: function(e){ return e.button == 1; },
+ isRight: function(e){ return e.button == 2; }
+ };
+ }
+
+ // IE event normalization
if(dojo.isIE){
var _trySetKeyCode = function(e, code){
try{
// squelch errors when keyCode is read-only
// (e.g. if keyCode is ctrl or shift)
return (e.keyCode = code);
}catch(e){
return 0;
}
}
// by default, use the standard listener
var iel = dojo._listener;
+ var listenersName = (dojo._ieListenersName = "_" + dojo._scopeName + "_listeners");
// dispatcher tracking property
- if(!djConfig._allow_leaks){
+ if(!dojo.config._allow_leaks){
// custom listener that handles leak protection for DOM events
node_listener = iel = dojo._ie_listener = {
// support handler indirection: event handler functions are
// referenced here. Event dispatchers hold only indices.
handlers: [],
// add a listener to an object
add: function(/*Object*/ source, /*String*/ method, /*Function*/ listener){
source = source || dojo.global;
var f = source[method];
- if(!f||!f._listeners){
+ if(!f||!f[listenersName]){
var d = dojo._getIeDispatcher();
// original target function is special
d.target = f && (ieh.push(f) - 1);
// dispatcher holds a list of indices into handlers table
- d._listeners = [];
+ d[listenersName] = [];
// redirect source to dispatcher
f = source[method] = d;
}
- return f._listeners.push(ieh.push(listener) - 1) ; /*Handle*/
+ return f[listenersName].push(ieh.push(listener) - 1) ; /*Handle*/
},
// remove a listener from an object
remove: function(/*Object*/ source, /*String*/ method, /*Handle*/ handle){
- var f = (source||dojo.global)[method], l = f&&f._listeners;
+ var f = (source||dojo.global)[method], l = f && f[listenersName];
if(f && l && handle--){
delete ieh[l[handle]];
- delete l[handle];
+ delete l[handle];
}
}
};
// alias used above
var ieh = iel.handlers;
}
dojo.mixin(del, {
- add: function(/*DOMNode*/node, /*String*/event, /*Function*/fp){
+ add: function(/*DOMNode*/ node, /*String*/ event, /*Function*/ fp){
if(!node){return;} // undefined
event = del._normalizeEventName(event);
if(event=="onkeypress"){
- // we need to listen to onkeydown to synthesize
+ // we need to listen to onkeydown to synthesize
// keypress events that otherwise won't fire
// on IE
var kd = node.onkeydown;
- if(!kd||!kd._listeners||!kd._stealthKeydown){
- // we simply ignore this connection when disconnecting
- // because it's side-effects are harmless
- del.add(node, "onkeydown", del._stealthKeyDown);
- // we only want one stealth listener per node
- node.onkeydown._stealthKeydown = true;
- }
+ if(!kd || !kd[listenersName] || !kd._stealthKeydownHandle){
+ var h = del.add(node, "onkeydown", del._stealthKeyDown);
+ kd = node.onkeydown;
+ kd._stealthKeydownHandle = h;
+ kd._stealthKeydownRefs = 1;
+ }else{
+ kd._stealthKeydownRefs++;
+ }
}
return iel.add(node, event, del._fixCallback(fp));
},
- remove: function(/*DOMNode*/node, /*String*/event, /*Handle*/handle){
- iel.remove(node, del._normalizeEventName(event), handle);
+ remove: function(/*DOMNode*/ node, /*String*/ event, /*Handle*/ handle){
+ event = del._normalizeEventName(event);
+ iel.remove(node, event, handle);
+ if(event=="onkeypress"){
+ var kd = node.onkeydown;
+ if(--kd._stealthKeydownRefs <= 0){
+ iel.remove(node, "onkeydown", kd._stealthKeydownHandle);
+ delete kd._stealthKeydownHandle;
+ }
+ }
},
- _normalizeEventName: function(/*String*/eventName){
+ _normalizeEventName: function(/*String*/ eventName){
// Generally, eventName should be lower case, unless it is
// special somehow (e.g. a Mozilla event)
// ensure 'on'
- return (eventName.slice(0,2)!="on" ? "on"+eventName : eventName);
+ return eventName.slice(0,2) != "on" ? "on" + eventName : eventName;
},
_nop: function(){},
- _fixEvent: function(/*Event*/evt, /*DOMNode*/sender){
+ _fixEvent: function(/*Event*/ evt, /*DOMNode*/ sender){
// summary:
// normalizes properties on the event object including event
// bubbling methods, keystroke normalization, and x/y positions
- // evt: native event object
- // sender: node to treat as "currentTarget"
+ // evt:
+ // native event object
+ // sender:
+ // node to treat as "currentTarget"
if(!evt){
- var w = (sender)&&((sender.ownerDocument || sender.document || sender).parentWindow)||window;
+ var w = sender && (sender.ownerDocument || sender.document || sender).parentWindow || window;
evt = w.event;
}
if(!evt){return(evt);}
evt.target = evt.srcElement;
evt.currentTarget = (sender || evt.srcElement);
evt.layerX = evt.offsetX;
evt.layerY = evt.offsetY;
// FIXME: scroll position query is duped from dojo.html to
// avoid dependency on that entire module. Now that HTML is in
// Base, we should convert back to something similar there.
var se = evt.srcElement, doc = (se && se.ownerDocument) || document;
// DO NOT replace the following to use dojo.body(), in IE, document.documentElement should be used
// here rather than document.body
- var docBody = ((dojo.isIE<6)||(doc["compatMode"]=="BackCompat")) ? doc.body : doc.documentElement;
+ var docBody = ((dojo.isIE < 6) || (doc["compatMode"] == "BackCompat")) ? doc.body : doc.documentElement;
var offset = dojo._getIeDocumentElementOffset();
evt.pageX = evt.clientX + dojo._fixIeBiDiScrollLeft(docBody.scrollLeft || 0) - offset.x;
evt.pageY = evt.clientY + (docBody.scrollTop || 0) - offset.y;
if(evt.type == "mouseover"){
evt.relatedTarget = evt.fromElement;
}
if(evt.type == "mouseout"){
evt.relatedTarget = evt.toElement;
}
evt.stopPropagation = del._stopPropagation;
evt.preventDefault = del._preventDefault;
return del._fixKeys(evt);
},
_fixKeys: function(evt){
switch(evt.type){
case "keypress":
var c = ("charCode" in evt ? evt.charCode : evt.keyCode);
if (c==10){
// CTRL-ENTER is CTRL-ASCII(10) on IE, but CTRL-ENTER on Mozilla
c=0;
evt.keyCode = 13;
}else if(c==13||c==27){
c=0; // Mozilla considers ENTER and ESC non-printable
}else if(c==3){
c=99; // Mozilla maps CTRL-BREAK to CTRL-c
}
// Mozilla sets keyCode to 0 when there is a charCode
// but that stops the event on IE.
evt.charCode = c;
del._setKeyChar(evt);
break;
}
return evt;
},
- // some ctrl-key combinations (mostly w/punctuation) do not emit a char code in IE
- // we map those virtual key codes to ascii here
- // not valid for all (non-US) keyboards, so maybe we shouldn't bother
- _punctMap: {
- 106:42,
- 111:47,
- 186:59,
- 187:43,
- 188:44,
- 189:45,
- 190:46,
- 191:47,
- 192:96,
- 219:91,
- 220:92,
- 221:93,
- 222:39
- },
_stealthKeyDown: function(evt){
// IE doesn't fire keypress for most non-printable characters.
// other browsers do, we simulate it here.
- var kp=evt.currentTarget.onkeypress;
+ var kp = evt.currentTarget.onkeypress;
// only works if kp exists and is a dispatcher
- if(!kp||!kp._listeners)return;
+ if(!kp || !kp[listenersName]){ return; }
// munge key/charCode
var k=evt.keyCode;
// These are Windows Virtual Key Codes
// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/UserInput/VirtualKeyCodes.asp
- var unprintable = (k!=13)&&(k!=32)&&(k!=27)&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);
+ var unprintable = k!=13 && k!=32 && k!=27 && (k<48||k>90) && (k<96||k>111) && (k<186||k>192) && (k<219||k>222);
// synthesize keypress for most unprintables and CTRL-keys
if(unprintable||evt.ctrlKey){
- var c = (unprintable ? 0 : k);
+ var c = unprintable ? 0 : k;
if(evt.ctrlKey){
if(k==3 || k==13){
return; // IE will post CTRL-BREAK, CTRL-ENTER as keypress natively
}else if(c>95 && c<106){
c -= 48; // map CTRL-[numpad 0-9] to ASCII
}else if((!evt.shiftKey)&&(c>=65&&c<=90)){
c += 32; // map CTRL-[A-Z] to lowercase
}else{
c = del._punctMap[c] || c; // map other problematic CTRL combinations to ASCII
}
}
// simulate a keypress event
var faux = del._synthesizeEvent(evt, {type: 'keypress', faux: true, charCode: c});
kp.call(evt.currentTarget, faux);
evt.cancelBubble = faux.cancelBubble;
evt.returnValue = faux.returnValue;
_trySetKeyCode(evt, faux.keyCode);
}
},
// Called in Event scope
_stopPropagation: function(){
this.cancelBubble = true;
},
_preventDefault: function(){
// Setting keyCode to 0 is the only way to prevent certain keypresses (namely
// ctrl-combinations that correspond to menu accelerator keys).
// Otoh, it prevents upstream listeners from getting this information
// Try to split the difference here by clobbering keyCode only for ctrl
// combinations. If you still need to access the key upstream, bubbledKeyCode is
// provided as a workaround.
this.bubbledKeyCode = this.keyCode;
if(this.ctrlKey){_trySetKeyCode(this, 0);}
this.returnValue = false;
}
});
// override stopEvent for IE
dojo.stopEvent = function(evt){
evt = evt || window.event;
del._stopPropagation.call(evt);
del._preventDefault.call(evt);
}
}
-
+
del._synthesizeEvent = function(evt, props){
var faux = dojo.mixin({}, evt, props);
del._setKeyChar(faux);
// FIXME: would prefer to use dojo.hitch: dojo.hitch(evt, evt.preventDefault);
// but it throws an error when preventDefault is invoked on Safari
// does Event.preventDefault not support "apply" on Safari?
faux.preventDefault = function(){ evt.preventDefault(); };
faux.stopPropagation = function(){ evt.stopPropagation(); };
return faux;
}
- // Opera event normalization
+ // Opera event normalization
if(dojo.isOpera){
dojo.mixin(del, {
_fixEvent: function(evt, sender){
switch(evt.type){
case "keypress":
var c = evt.which;
if(c==3){
c=99; // Mozilla maps CTRL-BREAK to CTRL-c
}
// can't trap some keys at all, like INSERT and DELETE
// there is no differentiating info between DELETE and ".", or INSERT and "-"
- c = ((c<41)&&(!evt.shiftKey) ? 0 : c);
- if((evt.ctrlKey)&&(!evt.shiftKey)&&(c>=65)&&(c<=90)){
+ c = c<41 && !evt.shiftKey ? 0 : c;
+ if(evt.ctrlKey && !evt.shiftKey && c>=65 && c<=90){
// lowercase CTRL-[A-Z] keys
c += 32;
}
return del._synthesizeEvent(evt, { charCode: c });
}
return evt;
}
});
}
-
- // Safari event normalization
- if(dojo.isSafari){
+
+ // Webkit event normalization
+ if(dojo.isWebKit){
+ del._add = del.add;
+ del._remove = del.remove;
+
dojo.mixin(del, {
+ add: function(/*DOMNode*/ node, /*String*/ event, /*Function*/ fp){
+ if(!node){return;} // undefined
+ var handle = del._add(node, event, fp);
+ if(del._normalizeEventName(event) == "keypress"){
+ // we need to listen to onkeydown to synthesize
+ // keypress events that otherwise won't fire
+ // in Safari 3.1+: https://lists.webkit.org/pipermail/webkit-dev/2007-December/002992.html
+ handle._stealthKeyDownHandle = del._add(node, "keydown", function(evt){
+ //A variation on the IE _stealthKeydown function
+ //Synthesize an onkeypress event, but only for unprintable characters.
+ var k=evt.keyCode;
+ // These are Windows Virtual Key Codes
+ // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/UserInput/VirtualKeyCodes.asp
+ var unprintable = k!=13 && k!=32 && (k<48 || k>90) && (k<96 || k>111) && (k<186 || k>192) && (k<219 || k>222);
+ // synthesize keypress for most unprintables and CTRL-keys
+ if(unprintable || evt.ctrlKey){
+ var c = unprintable ? 0 : k;
+ if(evt.ctrlKey){
+ if(k==3 || k==13){
+ return; // IE will post CTRL-BREAK, CTRL-ENTER as keypress natively
+ }else if(c>95 && c<106){
+ c -= 48; // map CTRL-[numpad 0-9] to ASCII
+ }else if(!evt.shiftKey && c>=65 && c<=90){
+ c += 32; // map CTRL-[A-Z] to lowercase
+ }else{
+ c = del._punctMap[c] || c; // map other problematic CTRL combinations to ASCII
+ }
+ }
+ // simulate a keypress event
+ var faux = del._synthesizeEvent(evt, {type: 'keypress', faux: true, charCode: c});
+ fp.call(evt.currentTarget, faux);
+ }
+ });
+ }
+ return handle; /*Handle*/
+ },
+
+ remove: function(/*DOMNode*/ node, /*String*/ event, /*Handle*/ handle){
+ if(node){
+ if(handle._stealthKeyDownHandle){
+ del._remove(node, "keydown", handle._stealthKeyDownHandle);
+ }
+ del._remove(node, event, handle);
+ }
+ },
_fixEvent: function(evt, sender){
switch(evt.type){
case "keypress":
- var c = evt.charCode, s = evt.shiftKey, k = evt.keyCode;
- // FIXME: This is a hack, suggest we rethink keyboard strategy.
- // Arrow and page keys have 0 "keyCode" in keypress events.on Safari for Windows
- k = k || identifierMap[evt.keyIdentifier] || 0;
- if(evt.keyIdentifier=="Enter"){
- c = 0; // differentiate Enter from CTRL-m (both code 13)
- }else if((evt.ctrlKey)&&(c>0)&&(c<27)){
- c += 96; // map CTRL-[A-Z] codes to ASCII
- } else if (c==dojo.keys.SHIFT_TAB) {
- c = dojo.keys.TAB; // morph SHIFT_TAB into TAB + shiftKey: true
- s = true;
- } else {
- c = (c>=32 && c<63232 ? c : 0); // avoid generating keyChar for non-printables
- }
- return del._synthesizeEvent(evt, {charCode: c, shiftKey: s, keyCode: k});
+ if(evt.faux){ return evt; }
+ var c = evt.charCode;
+ c = c>=32 ? c : 0;
+ return del._synthesizeEvent(evt, {charCode: c, faux: true});
}
return evt;
}
});
-
- dojo.mixin(dojo.keys, {
- SHIFT_TAB: 25,
- UP_ARROW: 63232,
- DOWN_ARROW: 63233,
- LEFT_ARROW: 63234,
- RIGHT_ARROW: 63235,
- F1: 63236,
- F2: 63237,
- F3: 63238,
- F4: 63239,
- F5: 63240,
- F6: 63241,
- F7: 63242,
- F8: 63243,
- F9: 63244,
- F10: 63245,
- F11: 63246,
- F12: 63247,
- PAUSE: 63250,
- DELETE: 63272,
- HOME: 63273,
- END: 63275,
- PAGE_UP: 63276,
- PAGE_DOWN: 63277,
- INSERT: 63302,
- PRINT_SCREEN: 63248,
- SCROLL_LOCK: 63249,
- NUM_LOCK: 63289
- });
- var dk = dojo.keys, identifierMap = { "Up": dk.UP_ARROW, "Down": dk.DOWN_ARROW, "Left": dk.LEFT_ARROW, "Right": dk.RIGHT_ARROW, "PageUp": dk.PAGE_UP, "PageDown": dk.PAGE_DOWN };
- }
-})();
+ }
+ })();
if(dojo.isIE){
// keep this out of the closure
// closing over 'iel' or 'ieh' b0rks leak prevention
// ls[i] is an index into the master handler array
+ dojo._ieDispatcher = function(args, sender){
+ var ap = Array.prototype,
+ h = dojo._ie_listener.handlers,
+ c = args.callee,
+ ls = c[dojo._ieListenersName],
+ t = h[c.target];
+ // return value comes from original target function
+ var r = t && t.apply(sender, args);
+ // make local copy of listener array so it's immutable during processing
+ var lls = [].concat(ls);
+ // invoke listeners after target function
+ for(var i in lls){
+ var f = h[lls[i]];
+ if(!(i in ap) && f){
+ f.apply(sender, args);
+ }
+ }
+ return r;
+ }
dojo._getIeDispatcher = function(){
- return function(){
- var ap=Array.prototype, h=dojo._ie_listener.handlers, c=arguments.callee, ls=c._listeners, t=h[c.target];
- // return value comes from original target function
- var r = t && t.apply(this, arguments);
- // invoke listeners after target function
- for(var i in ls){
- if(!(i in ap)){
- h[ls[i]].apply(this, arguments);
- }
- }
- return r;
- }
+ // ensure the returned function closes over nothing ("new Function" apparently doesn't close)
+ return new Function(dojo._scopeName + "._ieDispatcher(arguments, this)"); // function
}
// keep this out of the closure to reduce RAM allocation
dojo._event_listener._fixCallback = function(fp){
var f = dojo._event_listener._fixEvent;
return function(e){ return fp.call(this, f(e, this)); };
}
}
}
if(!dojo._hasResource["dojo._base.html"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo._base.html"] = true;
dojo.provide("dojo._base.html");
// FIXME: need to add unit tests for all the semi-public methods
try{
document.execCommand("BackgroundImageCache", false, true);
}catch(e){
// sane browsers don't have cache "issues"
}
// =============================
// DOM Functions
// =============================
/*=====
dojo.byId = function(id, doc){
// summary:
- // similar to other library's "$" function, takes a
- // string representing a DOM id or a DomNode
- // and returns the corresponding DomNode. If a Node is
- // passed, this function is a no-op. Returns a
- // single DOM node or null, working around several
- // browser-specific bugs to do so.
+ // Returns DOM node with matching `id` attribute or `null`
+ // if not found. If `id` is a DomNode, this function is a no-op.
+ //
// id: String|DOMNode
- // DOM id or DOM Node
- // doc: DocumentElement
+ // A string to match an HTML id attribute or a reference to a DOM Node
+ //
+ // doc: Document?
// Document to work in. Defaults to the current value of
- // dojo.doc. Can be used to retreive
+ // dojo.doc. Can be used to retrieve
// node references from other documents.
+ //
+ // example:
+ // Look up a node by ID:
+ // | var n = dojo.byId("foo");
+ //
+ // example:
+ // Check if a node exists, and use it.
+ // | var n = dojo.byId("bar");
+ // | if(n){ doStuff() ... }
+ //
+ // example:
+ // Allow string or DomNode references to be passed to a custom function:
+ // | var foo = function(nodeOrId){
+ // | nodeOrId = dojo.byId(nodeOrId);
+ // | // ... more stuff
+ // | }
=====*/
+
if(dojo.isIE || dojo.isOpera){
dojo.byId = function(id, doc){
- if(dojo.isString(id)){
- var _d = doc || dojo.doc;
- var te = _d.getElementById(id);
- // attributes.id.value is better than just id in case the
- // user has a name=id inside a form
- if(te && te.attributes.id.value == id){
- return te;
- }else{
- var eles = _d.all[id];
- if(!eles){ return; }
- if(!eles.length){ return eles; }
- // if more than 1, choose first with the correct id
- var i=0;
- while((te=eles[i++])){
- if(te.attributes.id.value == id){ return te; }
- }
- }
+ if(typeof id != "string"){
+ return id;
+ }
+ var _d = doc || dojo.doc, te = _d.getElementById(id);
+ // attributes.id.value is better than just id in case the
+ // user has a name=id inside a form
+ if(te && (te.attributes.id.value == id || te.id == id)){
+ return te;
}else{
- return id; // DomNode
- }
- }
+ var eles = _d.all[id];
+ if(!eles || eles.nodeName){
+ eles = [eles];
+ }
+ // if more than 1, choose first with the correct id
+ var i=0;
+ while((te=eles[i++])){
+ if((te.attributes && te.attributes.id && te.attributes.id.value == id)
+ || te.id == id){
+ return te;
+ }
+ }
+ }
+ };
}else{
dojo.byId = function(id, doc){
- if(dojo.isString(id)){
- return (doc || dojo.doc).getElementById(id);
- }else{
- return id; // DomNode
- }
- }
+ // inline'd type check
+ return (typeof id == "string") ? (doc || dojo.doc).getElementById(id) : id; // DomNode
+ };
}
/*=====
-}
+};
=====*/
(function(){
- /*
- dojo.createElement = function(obj, parent, position){
- // TODO: need to finish this!
- }
- */
-
- var _destroyContainer = null;
- dojo._destroyElement = function(/*String||DomNode*/node){
+ var d = dojo;
+ var byId = d.byId;
+
+ var _destroyContainer = null,
+ _destroyDoc;
+ d.addOnWindowUnload(function(){
+ _destroyContainer = null; //prevent IE leak
+ });
+
+/*=====
+ dojo._destroyElement = function(node){
// summary:
- // removes node from its parent, clobbers it and all of its
+ // Existing alias for `dojo.destroy`. Deprecated, will be removed
+ // in 2.0
+ }
+=====*/
+ dojo._destroyElement = dojo.destroy = function(/*String|DomNode*/node){
+ // summary:
+ // Removes a node from its parent, clobbering it and all of its
// children.
+ //
+ // description:
+ // Removes a node from its parent, clobbering it and all of its
+ // children. Function only works with DomNodes, and returns nothing.
+ //
// node:
- // the element to be destroyed, either as an ID or a reference
-
- node = dojo.byId(node);
+ // A String ID or DomNode reference of the element to be destroyed
+ //
+ // example:
+ // Destroy a node byId:
+ // | dojo.destroy("someId");
+ //
+ // example:
+ // Destroy all nodes in a list by reference:
+ // | dojo.query(".someNode").forEach(dojo.destroy);
+
+ node = byId(node);
try{
- if(!_destroyContainer){
- _destroyContainer = document.createElement("div");
+ var doc = node.ownerDocument;
+ // cannot use _destroyContainer.ownerDocument since this can throw an exception on IE
+ if(!_destroyContainer || _destroyDoc != doc){
+ _destroyContainer = doc.createElement("div");
+ _destroyDoc = doc;
}
_destroyContainer.appendChild(node.parentNode ? node.parentNode.removeChild(node) : node);
// NOTE: see http://trac.dojotoolkit.org/ticket/2931. This may be a bug and not a feature
- _destroyContainer.innerHTML = "";
+ _destroyContainer.innerHTML = "";
}catch(e){
/* squelch */
}
};
dojo.isDescendant = function(/*DomNode|String*/node, /*DomNode|String*/ancestor){
// summary:
// Returns true if node is a descendant of ancestor
- // node: id or node reference to test
- // ancestor: id or node reference of potential parent to test against
+ // node: string id or node reference to test
+ // ancestor: string id or node reference of potential parent to test against
+ //
+ // example:
+ // Test is node id="bar" is a descendant of node id="foo"
+ // | if(dojo.isDescendant("bar", "foo")){ ... }
try{
- node = dojo.byId(node);
- ancestor = dojo.byId(ancestor);
+ node = byId(node);
+ ancestor = byId(ancestor);
while(node){
- if(node === ancestor){
+ if(node == ancestor){
return true; // Boolean
}
node = node.parentNode;
}
- }catch(e){ return -1; /* squelch */ }
+ }catch(e){ /* squelch, return false */ }
return false; // Boolean
};
dojo.setSelectable = function(/*DomNode|String*/node, /*Boolean*/selectable){
- // summary: enable or disable selection on a node
+ // summary:
+ // Enable or disable selection on a node
// node:
// id or reference to node
// selectable:
- node = dojo.byId(node);
- if(dojo.isMozilla){
+ // state to put the node in. false indicates unselectable, true
+ // allows selection.
+ // example:
+ // Make the node id="bar" unselectable
+ // | dojo.setSelectable("bar");
+ // example:
+ // Make the node id="bar" selectable
+ // | dojo.setSelectable("bar", true);
+ node = byId(node);
+ if(d.isMozilla){
node.style.MozUserSelect = selectable ? "" : "none";
- }else if(dojo.isKhtml){
- node.style.KhtmlUserSelect = selectable ? "auto" : "none";
- }else if(dojo.isIE){
- node.unselectable = selectable ? "" : "on";
- dojo.query("*", node).forEach(function(descendant){
- descendant.unselectable = selectable ? "" : "on";
- });
- }
- //FIXME: else? Opera?
- };
-
- var _insertBefore = function(/*Node*/node, /*Node*/ref){
- ref.parentNode.insertBefore(node, ref);
- return true; // boolean
- }
-
- var _insertAfter = function(/*Node*/node, /*Node*/ref){
+ }else if(d.isKhtml || d.isWebKit){
+ node.style.KhtmlUserSelect = selectable ? "auto" : "none";
+ }else if(d.isIE){
+ var v = (node.unselectable = selectable ? "" : "on");
+ d.query("*", node).forEach("item.unselectable = '"+v+"'");
+ }
+ //FIXME: else? Opera?
+ };
+
+ var _insertBefore = function(/*DomNode*/node, /*DomNode*/ref){
+ var parent = ref.parentNode;
+ if(parent){
+ parent.insertBefore(node, ref);
+ }
+ };
+
+ var _insertAfter = function(/*DomNode*/node, /*DomNode*/ref){
// summary:
// Try to insert node after ref
- var pn = ref.parentNode;
- if(ref == pn.lastChild){
- pn.appendChild(node);
- }else{
- return _insertBefore(node, ref.nextSibling); // boolean
- }
- return true; // boolean
- }
-
- dojo.place = function(/*String|DomNode*/node, /*String|DomNode*/refNode, /*String|Number*/position){
+ var parent = ref.parentNode;
+ if(parent){
+ if(parent.lastChild == ref){
+ parent.appendChild(node);
+ }else{
+ parent.insertBefore(node, ref.nextSibling);
+ }
+ }
+ };
+
+ dojo.place = function(node, refNode, position){
// summary:
- // attempt to insert node in relation to ref based on position
- // node:
- // id or reference to node to place relative to refNode
- // refNode:
- // id or reference of node to use as basis for placement
- // position:
+ // Attempt to insert node into the DOM, choosing from various positioning options.
+ // Returns the first argument resolved to a DOM node.
+ //
+ // node: String|DomNode
+ // id or node reference, or HTML fragment starting with "<" to place relative to refNode
+ //
+ // refNode: String|DomNode
+ // id or node reference to use as basis for placement
+ //
+ // position: String|Number?
// string noting the position of node relative to refNode or a
- // number indicating the location in the childNodes collection of
- // refNode. Accepted string values are:
- // * before
- // * after
- // * first
- // * last
- // "first" and "last" indicate positions as children of refNode.
-
- // FIXME: need to write tests for this!!!!
- if(!node || !refNode || position === undefined){
- return false; // boolean
- }
- node = dojo.byId(node);
- refNode = dojo.byId(refNode);
- if(typeof position == "number"){
+ // number indicating the location in the childNodes collection of refNode.
+ // Accepted string values are:
+ // | * before
+ // | * after
+ // | * replace
+ // | * only
+ // | * first
+ // | * last
+ // "first" and "last" indicate positions as children of refNode, "replace" replaces refNode,
+ // "only" replaces all children. position defaults to "last" if not specified
+ //
+ // returns: DomNode
+ // Returned values is the first argument resolved to a DOM node.
+ //
+ // .place() is also a method of `dojo.NodeList`, allowing `dojo.query` node lookups.
+ //
+ // example:
+ // Place a node by string id as the last child of another node by string id:
+ // | dojo.place("someNode", "anotherNode");
+ //
+ // example:
+ // Place a node by string id before another node by string id
+ // | dojo.place("someNode", "anotherNode", "before");
+ //
+ // example:
+ // Create a Node, and place it in the body element (last child):
+ // | dojo.place("<div></div>", dojo.body());
+ //
+ // example:
+ // Put a new LI as the first child of a list by id:
+ // | dojo.place("<li></li>", "someUl", "first");
+
+ refNode = byId(refNode);
+ if(typeof node == "string"){ // inline'd type check
+ node = node.charAt(0) == "<" ? d._toDom(node, refNode.ownerDocument) : byId(node);
+ }
+ if(typeof position == "number"){ // inline'd type check
var cn = refNode.childNodes;
- if((position == 0 && cn.length == 0) ||
- cn.length == position){
- refNode.appendChild(node); return true;
- }
- if(position == 0){
- return _insertBefore(node, refNode.firstChild);
- }
- return _insertAfter(node, cn[position-1]);
- }
- switch(position.toLowerCase()){
- case "before":
- return _insertBefore(node, refNode); // boolean
- case "after":
- return _insertAfter(node, refNode); // boolean
- case "first":
- if(refNode.firstChild){
- return _insertBefore(node, refNode.firstChild); // boolean
- }else{
+ if(!cn.length || cn.length <= position){
+ refNode.appendChild(node);
+ }else{
+ _insertBefore(node, cn[position < 0 ? 0 : position]);
+ }
+ }else{
+ switch(position){
+ case "before":
+ _insertBefore(node, refNode);
+ break;
+ case "after":
+ _insertAfter(node, refNode);
+ break;
+ case "replace":
+ refNode.parentNode.replaceChild(node, refNode);
+ break;
+ case "only":
+ d.empty(refNode);
refNode.appendChild(node);
- return true; // boolean
- }
- break;
- default: // aka: last
- refNode.appendChild(node);
- return true; // boolean
- }
+ break;
+ case "first":
+ if(refNode.firstChild){
+ _insertBefore(node, refNode.firstChild);
+ break;
+ }
+ // else fallthrough...
+ default: // aka: last
+ refNode.appendChild(node);
+ }
+ }
+ return node; // DomNode
}
// Box functions will assume this model.
// On IE/Opera, BORDER_BOX will be set if the primary document is in quirks mode.
// Can be set to change behavior of box setters.
-
+
// can be either:
// "border-box"
// "content-box" (default)
dojo.boxModel = "content-box";
-
+
// We punt per-node box mode testing completely.
// If anybody cares, we can provide an additional (optional) unit
// that overrides existing code to include per-node box sensitivity.
// Opera documentation claims that Opera 9 uses border-box in BackCompat mode.
// but experiments (Opera 9.10.8679 on Windows Vista) indicate that it actually continues to use content-box.
// IIRC, earlier versions of Opera did in fact use border-box.
// Opera guys, this is really confusing. Opera being broken in quirks mode is not our fault.
- if(dojo.isIE /*|| dojo.isOpera*/){
- var _dcm = document.compatMode;
+ if(d.isIE /*|| dojo.isOpera*/){
// client code may have to adjust if compatMode varies across iframes
- dojo.boxModel = (_dcm=="BackCompat")||(_dcm=="QuirksMode")||(dojo.isIE<6) ? "border-box" : "content-box";
- }
-
+ d.boxModel = document.compatMode == "BackCompat" ? "border-box" : "content-box";
+ }
+
// =============================
// Style Functions
// =============================
-
+
// getComputedStyle drives most of the style code.
// Wherever possible, reuse the returned object.
//
// API functions below that need to access computed styles accept an
// optional computedStyle parameter.
- //
// If this parameter is omitted, the functions will call getComputedStyle themselves.
- //
// This way, calling code can access computedStyle once, and then pass the reference to
- // multiple API functions.
- //
- // This is a faux declaration to take pity on the doc tool
+ // multiple API functions.
/*=====
dojo.getComputedStyle = function(node){
// summary:
// Returns a "computed style" object.
+ //
// description:
- // get "computed style" object which can be used to gather
- // information about the current state of the rendered node.
+ // Gets a "computed style" object which can be used to gather
+ // information about the current state of the rendered node.
//
// Note that this may behave differently on different browsers.
// Values may have different formats and value encodings across
- // browsers.
+ // browsers.
+ //
+ // Note also that this method is expensive. Wherever possible,
+ // reuse the returned object.
//
// Use the dojo.style() method for more consistent (pixelized)
// return values.
+ //
// node: DOMNode
- // a reference to a DOM node. Does NOT support taking an
+ // A reference to a DOM node. Does NOT support taking an
// ID string for speed reasons.
// example:
// | dojo.getComputedStyle(dojo.byId('foo')).borderWidth;
+ //
+ // example:
+ // Reusing the returned object, avoiding multiple lookups:
+ // | var cs = dojo.getComputedStyle(dojo.byId("someNode"));
+ // | var w = cs.width, h = cs.height;
return; // CSS2Properties
}
=====*/
- var gcs, dv = document.defaultView;
- if(dojo.isSafari){
- gcs = function(/*DomNode*/node){
- var s = dv.getComputedStyle(node, null);
- if(!s && node.style){
- node.style.display = "";
+ // Although we normally eschew argument validation at this
+ // level, here we test argument 'node' for (duck)type,
+ // by testing nodeType, ecause 'document' is the 'parentNode' of 'body'
+ // it is frequently sent to this function even
+ // though it is not Element.
+ var gcs;
+ if(d.isWebKit){
+ gcs = function(/*DomNode*/node){
+ var s;
+ if(node.nodeType == 1){
+ var dv = node.ownerDocument.defaultView;
s = dv.getComputedStyle(node, null);
+ if(!s && node.style){
+ node.style.display = "";
+ s = dv.getComputedStyle(node, null);
+ }
}
return s || {};
- };
- }else if(dojo.isIE){
+ };
+ }else if(d.isIE){
gcs = function(node){
- return node.currentStyle;
+ // IE (as of 7) doesn't expose Element like sane browsers
+ return node.nodeType == 1 /* ELEMENT_NODE*/ ? node.currentStyle : {};
};
}else{
gcs = function(node){
- return dv.getComputedStyle(node, null);
+ return node.nodeType == 1 ?
+ node.ownerDocument.defaultView.getComputedStyle(node, null) : {};
};
}
- dojo.getComputedStyle = gcs;
-
- if(!dojo.isIE){
- dojo._toPixelValue = function(element, value){
+ dojo.getComputedStyle = gcs;
+
+ if(!d.isIE){
+ d._toPixelValue = function(element, value){
// style values can be floats, client code may want
// to round for integer pixels.
- return parseFloat(value) || 0;
- }
- }else{
- dojo._toPixelValue = function(element, avalue){
+ return parseFloat(value) || 0;
+ };
+ }else{
+ d._toPixelValue = function(element, avalue){
if(!avalue){ return 0; }
// on IE7, medium is usually 4 pixels
- if(avalue=="medium"){ return 4; }
+ if(avalue == "medium"){ return 4; }
// style values can be floats, client code may
// want to round this value for integer pixels.
- if(avalue.slice && (avalue.slice(-2)=='px')){ return parseFloat(avalue); }
+ if(avalue.slice && avalue.slice(-2) == 'px'){ return parseFloat(avalue); }
with(element){
var sLeft = style.left;
var rsLeft = runtimeStyle.left;
runtimeStyle.left = currentStyle.left;
try{
// 'avalue' may be incompatible with style.left, which can cause IE to throw
// this has been observed for border widths using "thin", "medium", "thick" constants
// those particular constants could be trapped by a lookup
// but perhaps there are more
style.left = avalue;
avalue = style.pixelLeft;
}catch(e){
avalue = 0;
}
style.left = sLeft;
runtimeStyle.left = rsLeft;
}
return avalue;
}
}
+ var px = d._toPixelValue;
// FIXME: there opacity quirks on FF that we haven't ported over. Hrm.
/*=====
dojo._getOpacity = function(node){
// summary:
// Returns the current opacity of the passed node as a
// floating-point value between 0 and 1.
// node: DomNode
// a reference to a DOM node. Does NOT support taking an
// ID string for speed reasons.
- // return: Number between 0 and 1
+ // returns: Number between 0 and 1
+ return; // Number
}
=====*/
- dojo._getOpacity = (dojo.isIE ? function(node){
+ var astr = "DXImageTransform.Microsoft.Alpha";
+ var af = function(n, f){
+ try{
+ return n.filters.item(astr);
+ }catch(e){
+ return f ? {} : null;
+ }
+ };
+
+ dojo._getOpacity =
+ d.isIE ? function(node){
try{
- return (node.filters.alpha.opacity / 100); // Number
+ return af(node).Opacity / 100; // Number
}catch(e){
return 1; // Number
}
- } : function(node){
- return dojo.getComputedStyle(node).opacity;
- }
- );
+ } :
+ function(node){
+ return gcs(node).opacity;
+ };
/*=====
dojo._setOpacity = function(node, opacity){
// summary:
// set the opacity of the passed node portably. Returns the
// new opacity of the node.
// node: DOMNode
// a reference to a DOM node. Does NOT support taking an
// ID string for performance reasons.
// opacity: Number
// A Number between 0 and 1. 0 specifies transparent.
- // return: Number between 0 and 1
+ // returns: Number between 0 and 1
+ return; // Number
}
=====*/
- dojo._setOpacity = (dojo.isIE ? function(/*DomNode*/node, /*Number*/opacity){
- if(opacity == 1){
- // on IE7 Alpha(Filter opacity=100) makes text look fuzzy so remove it altogether (bug #2661)
- node.style.cssText = node.style.cssText.replace(/FILTER:[^;]*;/i, "");
- if(node.nodeName.toLowerCase() == "tr"){
- dojo.query("> td", node).forEach(function(i){
- i.style.cssText = i.style.cssText.replace(/FILTER:[^;]*;/i, "");
- });
- }
+ dojo._setOpacity =
+ d.isIE ? function(/*DomNode*/node, /*Number*/opacity){
+ var ov = opacity * 100;
+ node.style.zoom = 1.0;
+
+ // on IE7 Alpha(Filter opacity=100) makes text look fuzzy so disable it altogether (bug #2661),
+ //but still update the opacity value so we can get a correct reading if it is read later.
+ af(node, 1).Enabled = !(opacity == 1);
+
+ if(!af(node)){
+ node.style.filter += " progid:" + astr + "(Opacity=" + ov + ")";
}else{
- var o = "Alpha(Opacity="+(opacity*100)+")";
- node.style.filter = o;
- }
+ af(node, 1).Opacity = ov;
+ }
+
if(node.nodeName.toLowerCase() == "tr"){
- dojo.query("> td", node).forEach(function(i){
- i.style.filter = o;
+ d.query("> td", node).forEach(function(i){
+ d._setOpacity(i, opacity);
});
}
return opacity;
- } : function(node, opacity){
+ } :
+ function(node, opacity){
return node.style.opacity = opacity;
- }
- );
+ };
var _pixelNamesCache = {
- width: true, height: true, left: true, top: true
- };
+ left: true, top: true
+ };
+ var _pixelRegExp = /margin|padding|width|height|max|min|offset/; // |border
var _toStyleValue = function(node, type, value){
- type = type.toLowerCase();
- if(_pixelNamesCache[type] === true){
- return dojo._toPixelValue(node, value)
- }else if(_pixelNamesCache[type] === false){
- return value;
- }else{
- if(dojo.isOpera && type == "cssText"){
- // FIXME: add workaround for #2855 here
- }
- if(
- (type.indexOf("margin") >= 0) ||
- // (type.indexOf("border") >= 0) ||
- (type.indexOf("padding") >= 0) ||
- (type.indexOf("width") >= 0) ||
- (type.indexOf("height") >= 0) ||
- (type.indexOf("max") >= 0) ||
- (type.indexOf("min") >= 0) ||
- (type.indexOf("offset") >= 0)
- ){
- _pixelNamesCache[type] = true;
- return dojo._toPixelValue(node, value)
- }else{
- _pixelNamesCache[type] = false;
- return value;
- }
- }
- }
+ type = type.toLowerCase(); // FIXME: should we really be doing string case conversion here? Should we cache it? Need to profile!
+ if(d.isIE){
+ if(value == "auto"){
+ if(type == "height"){ return node.offsetHeight; }
+ if(type == "width"){ return node.offsetWidth; }
+ }
+ if(type == "fontweight"){
+ switch(value){
+ case 700: return "bold";
+ case 400:
+ default: return "normal";
+ }
+ }
+ }
+ if(!(type in _pixelNamesCache)){
+ _pixelNamesCache[type] = _pixelRegExp.test(type);
+ }
+ return _pixelNamesCache[type] ? px(node, value) : value;
+ };
+
+ var _floatStyle = d.isIE ? "styleFloat" : "cssFloat",
+ _floatAliases = { "cssFloat": _floatStyle, "styleFloat": _floatStyle, "float": _floatStyle }
+ ;
// public API
-
- dojo.style = function(/*DomNode|String*/ node, /*String*/style, /*String?*/value){
+
+ dojo.style = function( /*DomNode|String*/ node,
+ /*String?|Object?*/ style,
+ /*String?*/ value){
// summary:
- // gets or sets a style property on node. If 2 arguments are
- // passed, acts as a getter. If value is passed, acts as a setter
- // for the property.
+ // Accesses styles on a node. If 2 arguments are
+ // passed, acts as a getter. If 3 arguments are passed, acts
+ // as a setter.
+ // description:
+ // Getting the style value uses the computed style for the node, so the value
+ // will be a calculated value, not just the immediate node.style value.
+ // Also when getting values, use specific style names,
+ // like "borderBottomWidth" instead of "border" since compound values like
+ // "border" are not necessarily reflected as expected.
+ // If you want to get node dimensions, use `dojo.marginBox()`,
+ // `dojo.contentBox()` or `dojo.position()`.
// node:
// id or reference to node to get/set style for
// style:
// the style property to set in DOM-accessor format
- // ("borderWidth", not "border-width").
+ // ("borderWidth", not "border-width") or an object with key/value
+ // pairs suitable for setting each property.
// value:
- // optional. If passed, sets value on the node for style, handling
- // cross-browser concerns.
- var n=dojo.byId(node), args=arguments.length, op=(style=="opacity");
- if(args==3){
- return op ? dojo._setOpacity(n, value) : n.style[style] = value; /*Number*/
- }
- if(args==2 && op){
- return dojo._getOpacity(n);
- }
- var s = dojo.getComputedStyle(n);
- return (args == 1) ? s : _toStyleValue(n, style, s[style]); /* CSS2Properties||String||Number */
+ // If passed, sets value on the node for style, handling
+ // cross-browser concerns. When setting a pixel value,
+ // be sure to include "px" in the value. For instance, top: "200px".
+ // Otherwise, in some cases, some browsers will not apply the style.
+ // example:
+ // Passing only an ID or node returns the computed style object of
+ // the node:
+ // | dojo.style("thinger");
+ // example:
+ // Passing a node and a style property returns the current
+ // normalized, computed value for that property:
+ // | dojo.style("thinger", "opacity"); // 1 by default
+ //
+ // example:
+ // Passing a node, a style property, and a value changes the
+ // current display of the node and returns the new computed value
+ // | dojo.style("thinger", "opacity", 0.5); // == 0.5
+ //
+ // example:
+ // Passing a node, an object-style style property sets each of the values in turn and returns the computed style object of the node:
+ // | dojo.style("thinger", {
+ // | "opacity": 0.5,
+ // | "border": "3px solid black",
+ // | "height": "300px"
+ // | });
+ //
+ // example:
+ // When the CSS style property is hyphenated, the JavaScript property is camelCased.
+ // font-size becomes fontSize, and so on.
+ // | dojo.style("thinger",{
+ // | fontSize:"14pt",
+ // | letterSpacing:"1.2em"
+ // | });
+ //
+ // example:
+ // dojo.NodeList implements .style() using the same syntax, omitting the "node" parameter, calling
+ // dojo.style() on every element of the list. See: `dojo.query()` and `dojo.NodeList()`
+ // | dojo.query(".someClassName").style("visibility","hidden");
+ // | // or
+ // | dojo.query("#baz > div").style({
+ // | opacity:0.75,
+ // | fontSize:"13pt"
+ // | });
+
+ var n = byId(node), args = arguments.length, op = (style == "opacity");
+ style = _floatAliases[style] || style;
+ if(args == 3){
+ return op ? d._setOpacity(n, value) : n.style[style] = value; /*Number*/
+ }
+ if(args == 2 && op){
+ return d._getOpacity(n);
+ }
+ var s = gcs(n);
+ if(args == 2 && typeof style != "string"){ // inline'd type check
+ for(var x in style){
+ d.style(node, x, style[x]);
+ }
+ return s;
+ }
+ return (args == 1) ? s : _toStyleValue(n, style, s[style] || n.style[style]); /* CSS2Properties||String||Number */
}
// =============================
// Box Functions
// =============================
dojo._getPadExtents = function(/*DomNode*/n, /*Object*/computedStyle){
// summary:
// Returns object with special values specifically useful for node
// fitting.
- // l/t = left/top padding (respectively)
- // w = the total of the left and right padding
- // h = the total of the top and bottom padding
- // If 'node' has position, l/t forms the origin for child nodes.
+ // description:
+ // Returns an object with `w`, `h`, `l`, `t` properties:
+ // | l/t = left/top padding (respectively)
+ // | w = the total of the left and right padding
+ // | h = the total of the top and bottom padding
+ // If 'node' has position, l/t forms the origin for child nodes.
// The w/h are used for calculating boxes.
// Normally application code will not need to invoke this
// directly, and will use the ...box... functions instead.
var
- s=computedStyle||gcs(n),
- px=dojo._toPixelValue,
- l=px(n, s.paddingLeft),
- t=px(n, s.paddingTop);
- return {
+ s = computedStyle||gcs(n),
+ l = px(n, s.paddingLeft),
+ t = px(n, s.paddingTop);
+ return {
l: l,
t: t,
w: l+px(n, s.paddingRight),
h: t+px(n, s.paddingBottom)
};
}
dojo._getBorderExtents = function(/*DomNode*/n, /*Object*/computedStyle){
// summary:
// returns an object with properties useful for noting the border
// dimensions.
- // l/t = the sum of left/top border (respectively)
- // w = the sum of the left and right border
- // h = the sum of the top and bottom border
+ // description:
+ // * l/t = the sum of left/top border (respectively)
+ // * w = the sum of the left and right border
+ // * h = the sum of the top and bottom border
+ //
// The w/h are used for calculating boxes.
// Normally application code will not need to invoke this
// directly, and will use the ...box... functions instead.
var
- ne='none',
- px=dojo._toPixelValue,
- s=computedStyle||gcs(n),
- bl=(s.borderLeftStyle!=ne ? px(n, s.borderLeftWidth) : 0),
- bt=(s.borderTopStyle!=ne ? px(n, s.borderTopWidth) : 0);
- return {
+ ne = "none",
+ s = computedStyle||gcs(n),
+ bl = (s.borderLeftStyle != ne ? px(n, s.borderLeftWidth) : 0),
+ bt = (s.borderTopStyle != ne ? px(n, s.borderTopWidth) : 0);
+ return {
l: bl,
t: bt,
w: bl + (s.borderRightStyle!=ne ? px(n, s.borderRightWidth) : 0),
h: bt + (s.borderBottomStyle!=ne ? px(n, s.borderBottomWidth) : 0)
};
}
dojo._getPadBorderExtents = function(/*DomNode*/n, /*Object*/computedStyle){
// summary:
- // returns object with properties useful for box fitting with
+ // Returns object with properties useful for box fitting with
// regards to padding.
- // l/t = the sum of left/top padding and left/top border (respectively)
- // w = the sum of the left and right padding and border
- // h = the sum of the top and bottom padding and border
+ // description:
+ // * l/t = the sum of left/top padding and left/top border (respectively)
+ // * w = the sum of the left and right padding and border
+ // * h = the sum of the top and bottom padding and border
+ //
// The w/h are used for calculating boxes.
// Normally application code will not need to invoke this
// directly, and will use the ...box... functions instead.
var
- s=computedStyle||gcs(n),
- p=dojo._getPadExtents(n, s),
- b=dojo._getBorderExtents(n, s);
- return {
+ s = computedStyle||gcs(n),
+ p = d._getPadExtents(n, s),
+ b = d._getBorderExtents(n, s);
+ return {
l: p.l + b.l,
t: p.t + b.t,
w: p.w + b.w,
h: p.h + b.h
};
}
dojo._getMarginExtents = function(n, computedStyle){
// summary:
// returns object with properties useful for box fitting with
// regards to box margins (i.e., the outer-box).
- // l/t = marginLeft, marginTop, respectively
- // w = total width, margin inclusive
- // h = total height, margin inclusive
+ //
+ // * l/t = marginLeft, marginTop, respectively
+ // * w = total width, margin inclusive
+ // * h = total height, margin inclusive
+ //
// The w/h are used for calculating boxes.
// Normally application code will not need to invoke this
// directly, and will use the ...box... functions instead.
var
- s=computedStyle||gcs(n),
- px=dojo._toPixelValue,
- l=px(n, s.marginLeft),
- t=px(n, s.marginTop),
- r=px(n, s.marginRight),
- b=px(n, s.marginBottom);
- if (dojo.isSafari && (s.position != "absolute")){
+ s = computedStyle||gcs(n),
+ l = px(n, s.marginLeft),
+ t = px(n, s.marginTop),
+ r = px(n, s.marginRight),
+ b = px(n, s.marginBottom);
+ if(d.isWebKit && (s.position != "absolute")){
// FIXME: Safari's version of the computed right margin
// is the space between our right edge and the right edge
- // of our offsetParent.
+ // of our offsetParent.
// What we are looking for is the actual margin value as
// determined by CSS.
// Hack solution is to assume left/right margins are the same.
r = l;
}
- return {
+ return {
l: l,
t: t,
w: l+r,
h: t+b
};
}
// Box getters work in any box context because offsetWidth/clientWidth
// are invariant wrt box context
//
// They do *not* work for display: inline objects that have padding styles
// because the user agent ignores padding (it's bogus styling in any case)
//
// Be careful with IMGs because they are inline or block depending on
// browser and browser mode.
// Although it would be easier to read, there are not separate versions of
// _getMarginBox for each browser because:
// 1. the branching is not expensive
// 2. factoring the shared code wastes cycles (function call overhead)
// 3. duplicating the shared code wastes bytes
-
+
dojo._getMarginBox = function(/*DomNode*/node, /*Object*/computedStyle){
// summary:
// returns an object that encodes the width, height, left and top
// positions of the node's margin box.
- var s = computedStyle||gcs(node), me = dojo._getMarginExtents(node, s);
- var l = node.offsetLeft - me.l, t = node.offsetTop - me.t;
- if(dojo.isMoz){
+ var s = computedStyle || gcs(node), me = d._getMarginExtents(node, s);
+ var l = node.offsetLeft - me.l, t = node.offsetTop - me.t, p = node.parentNode;
+ if(d.isMoz){
// Mozilla:
// If offsetParent has a computed overflow != visible, the offsetLeft is decreased
// by the parent's border.
// We don't want to compute the parent's style, so instead we examine node's
// computed left/top which is more stable.
var sl = parseFloat(s.left), st = parseFloat(s.top);
if(!isNaN(sl) && !isNaN(st)){
l = sl, t = st;
}else{
// If child's computed left/top are not parseable as a number (e.g. "auto"), we
// have no choice but to examine the parent's computed style.
- var p = node.parentNode;
if(p && p.style){
var pcs = gcs(p);
if(pcs.overflow != "visible"){
- var be = dojo._getBorderExtents(p, pcs);
+ var be = d._getBorderExtents(p, pcs);
l += be.l, t += be.t;
}
}
}
- }else if(dojo.isOpera){
- // On Opera, offsetLeft includes the parent's border
- var p = node.parentNode;
+ }else if(d.isOpera || (d.isIE > 7 && !d.isQuirks)){
+ // On Opera and IE 8, offsetLeft/Top includes the parent's border
if(p){
- var be = dojo._getBorderExtents(p);
- l -= be.l, t -= be.t;
- }
- }
- return {
- l: l,
- t: t,
- w: node.offsetWidth + me.w,
+ be = d._getBorderExtents(p);
+ l -= be.l;
+ t -= be.t;
+ }
+ }
+ return {
+ l: l,
+ t: t,
+ w: node.offsetWidth + me.w,
h: node.offsetHeight + me.h
};
}
-
+
dojo._getContentBox = function(node, computedStyle){
// summary:
// Returns an object that encodes the width, height, left and top
// positions of the node's content box, irrespective of the
// current box model.
// clientWidth/Height are important since the automatically account for scrollbars
// fallback to offsetWidth/Height for special cases (see #3378)
- var s=computedStyle||gcs(node), pe=dojo._getPadExtents(node, s), be=dojo._getBorderExtents(node, s), w=node.clientWidth, h;
+ var s = computedStyle || gcs(node),
+ pe = d._getPadExtents(node, s),
+ be = d._getBorderExtents(node, s),
+ w = node.clientWidth,
+ h
+ ;
if(!w){
- w=node.offsetWidth, h=node.offsetHeight;
+ w = node.offsetWidth, h = node.offsetHeight;
}else{
- h=node.clientHeight, be.w = be.h = 0;
+ h = node.clientHeight, be.w = be.h = 0;
}
// On Opera, offsetLeft includes the parent's border
- if(dojo.isOpera){ pe.l += be.l; pe.t += be.t; };
- return {
- l: pe.l,
- t: pe.t,
- w: w - pe.w - be.w,
+ if(d.isOpera){ pe.l += be.l; pe.t += be.t; };
+ return {
+ l: pe.l,
+ t: pe.t,
+ w: w - pe.w - be.w,
h: h - pe.h - be.h
};
}
dojo._getBorderBox = function(node, computedStyle){
- var s=computedStyle||gcs(node), pe=dojo._getPadExtents(node, s), cb=dojo._getContentBox(node, s);
- return {
- l: cb.l - pe.l,
- t: cb.t - pe.t,
- w: cb.w + pe.w,
+ var s = computedStyle || gcs(node),
+ pe = d._getPadExtents(node, s),
+ cb = d._getContentBox(node, s)
+ ;
+ return {
+ l: cb.l - pe.l,
+ t: cb.t - pe.t,
+ w: cb.w + pe.w,
h: cb.h + pe.h
};
}
// Box setters depend on box context because interpretation of width/height styles
// vary wrt box context.
//
// The value of dojo.boxModel is used to determine box context.
// dojo.boxModel can be set directly to change behavior.
//
// Beware of display: inline objects that have padding styles
// because the user agent ignores padding (it's a bogus setup anyway)
//
// Be careful with IMGs because they are inline or block depending on
// browser and browser mode.
- //
+ //
// Elements other than DIV may have special quirks, like built-in
// margins or padding, or values not detectable via computedStyle.
// In particular, margins on TABLE do not seems to appear
// at all in computedStyle on Mozilla.
-
+
dojo._setBox = function(/*DomNode*/node, /*Number?*/l, /*Number?*/t, /*Number?*/w, /*Number?*/h, /*String?*/u){
// summary:
// sets width/height/left/top in the current (native) box-model
// dimentions. Uses the unit passed in u.
- // node: DOM Node reference. Id string not supported for performance reasons.
- // l: optional. left offset from parent.
- // t: optional. top offset from parent.
- // w: optional. width in current box model.
- // h: optional. width in current box model.
- // u: optional. unit measure to use for other measures. Defaults to "px".
+ // node:
+ // DOM Node reference. Id string not supported for performance
+ // reasons.
+ // l:
+ // left offset from parent.
+ // t:
+ // top offset from parent.
+ // w:
+ // width in current box model.
+ // h:
+ // width in current box model.
+ // u:
+ // unit measure to use for other measures. Defaults to "px".
u = u || "px";
- with(node.style){
- if(!isNaN(l)){ left = l+u; }
- if(!isNaN(t)){ top = t+u; }
- if(w>=0){ width = w+u; }
- if(h>=0){ height = h+u; }
- }
+ var s = node.style;
+ if(!isNaN(l)){ s.left = l + u; }
+ if(!isNaN(t)){ s.top = t + u; }
+ if(w >= 0){ s.width = w + u; }
+ if(h >= 0){ s.height = h + u; }
+ }
+
+ dojo._isButtonTag = function(/*DomNode*/node) {
+ // summary:
+ // True if the node is BUTTON or INPUT.type="button".
+ return node.tagName == "BUTTON"
+ || node.tagName=="INPUT" && (node.getAttribute("type")||'').toUpperCase() == "BUTTON"; // boolean
}
dojo._usesBorderBox = function(/*DomNode*/node){
- // summary:
+ // summary:
// True if the node uses border-box layout.
// We could test the computed style of node to see if a particular box
// has been specified, but there are details and we choose not to bother.
- var n = node.tagName;
- // For whatever reason, TABLE and BUTTON are always border-box by default.
+
+ // TABLE and BUTTON (and INPUT type=button) are always border-box by default.
// If you have assigned a different box to either one via CSS then
// box functions will break.
- return dojo.boxModel=="border-box" || n=="TABLE" || n=="BUTTON"; // boolean
+
+ var n = node.tagName;
+ return d.boxModel=="border-box" || n=="TABLE" || d._isButtonTag(node); // boolean
}
dojo._setContentSize = function(/*DomNode*/node, /*Number*/widthPx, /*Number*/heightPx, /*Object*/computedStyle){
// summary:
// Sets the size of the node's contents, irrespective of margins,
// padding, or borders.
- var bb = dojo._usesBorderBox(node);
- if(bb){
- var pb = dojo._getPadBorderExtents(node, computedStyle);
- if(widthPx>=0){ widthPx += pb.w; }
- if(heightPx>=0){ heightPx += pb.h; }
- }
- dojo._setBox(node, NaN, NaN, widthPx, heightPx);
- }
-
- dojo._setMarginBox = function(/*DomNode*/node, /*Number?*/leftPx, /*Number?*/topPx,
- /*Number?*/widthPx, /*Number?*/heightPx,
+ if(d._usesBorderBox(node)){
+ var pb = d._getPadBorderExtents(node, computedStyle);
+ if(widthPx >= 0){ widthPx += pb.w; }
+ if(heightPx >= 0){ heightPx += pb.h; }
+ }
+ d._setBox(node, NaN, NaN, widthPx, heightPx);
+ }
+
+ dojo._setMarginBox = function(/*DomNode*/node, /*Number?*/leftPx, /*Number?*/topPx,
+ /*Number?*/widthPx, /*Number?*/heightPx,
/*Object*/computedStyle){
// summary:
- // sets the size of the node's margin box and palcement
+ // sets the size of the node's margin box and placement
// (left/top), irrespective of box model. Think of it as a
// passthrough to dojo._setBox that handles box-model vagaries for
// you.
- var s = computedStyle || dojo.getComputedStyle(node);
- // Some elements have special padding, margin, and box-model settings.
+ var s = computedStyle || gcs(node),
+ // Some elements have special padding, margin, and box-model settings.
// To use box functions you may need to set padding, margin explicitly.
// Controlling box-model is harder, in a pinch you might set dojo.boxModel.
- var bb=dojo._usesBorderBox(node),
- pb=bb ? _nilExtents : dojo._getPadBorderExtents(node, s),
- mb=dojo._getMarginExtents(node, s);
- if(widthPx>=0){ widthPx = Math.max(widthPx - pb.w - mb.w, 0); }
- if(heightPx>=0){ heightPx = Math.max(heightPx - pb.h - mb.h, 0); }
- dojo._setBox(node, leftPx, topPx, widthPx, heightPx);
- }
-
+ bb = d._usesBorderBox(node),
+ pb = bb ? _nilExtents : d._getPadBorderExtents(node, s)
+ ;
+ if(d.isWebKit){
+ // on Safari (3.1.2), button nodes with no explicit size have a default margin
+ // setting an explicit size eliminates the margin.
+ // We have to swizzle the width to get correct margin reading.
+ if(d._isButtonTag(node)){
+ var ns = node.style;
+ if(widthPx >= 0 && !ns.width) { ns.width = "4px"; }
+ if(heightPx >= 0 && !ns.height) { ns.height = "4px"; }
+ }
+ }
+ var mb = d._getMarginExtents(node, s);
+ if(widthPx >= 0){ widthPx = Math.max(widthPx - pb.w - mb.w, 0); }
+ if(heightPx >= 0){ heightPx = Math.max(heightPx - pb.h - mb.h, 0); }
+ d._setBox(node, leftPx, topPx, widthPx, heightPx);
+ }
+
var _nilExtents = { l:0, t:0, w:0, h:0 };
// public API
-
+
dojo.marginBox = function(/*DomNode|String*/node, /*Object?*/box){
// summary:
- // getter/setter for the margin-box of node.
- // description:
+ // Getter/setter for the margin-box of node.
+ // description:
+ // Getter/setter for the margin-box of node.
// Returns an object in the expected format of box (regardless
// if box is passed). The object might look like:
- // { l: 50, t: 200, w: 300: h: 150 }
+ // `{ l: 50, t: 200, w: 300: h: 150 }`
// for a node offset from its parent 50px to the left, 200px from
// the top with a margin width of 300px and a margin-height of
// 150px.
// node:
// id or reference to DOM Node to get/set box for
// box:
- // optional. If passed, denotes that dojo.marginBox() should
+ // If passed, denotes that dojo.marginBox() should
// update/set the margin box for node. Box is an object in the
// above format. All properties are optional if passed.
- var n=dojo.byId(node), s=gcs(n), b=box;
- return !b ? dojo._getMarginBox(n, s) : dojo._setMarginBox(n, b.l, b.t, b.w, b.h, s); // Object
+ // example:
+ // Retrieve the marginbox of a passed node
+ // | var box = dojo.marginBox("someNodeId");
+ // | console.dir(box);
+ //
+ // example:
+ // Set a node's marginbox to the size of another node
+ // | var box = dojo.marginBox("someNodeId");
+ // | dojo.marginBox("someOtherNode", box);
+
+ var n = byId(node), s = gcs(n), b = box;
+ return !b ? d._getMarginBox(n, s) : d._setMarginBox(n, b.l, b.t, b.w, b.h, s); // Object
}
dojo.contentBox = function(/*DomNode|String*/node, /*Object?*/box){
// summary:
- // getter/setter for the content-box of node.
+ // Getter/setter for the content-box of node.
// description:
// Returns an object in the expected format of box (regardless if box is passed).
// The object might look like:
- // { l: 50, t: 200, w: 300: h: 150 }
+ // `{ l: 50, t: 200, w: 300: h: 150 }`
// for a node offset from its parent 50px to the left, 200px from
// the top with a content width of 300px and a content-height of
// 150px. Note that the content box may have a much larger border
// or margin box, depending on the box model currently in use and
// CSS values set/inherited for node.
// node:
// id or reference to DOM Node to get/set box for
// box:
- // optional. If passed, denotes that dojo.contentBox() should
+ // If passed, denotes that dojo.contentBox() should
// update/set the content box for node. Box is an object in the
// above format. All properties are optional if passed.
- var n=dojo.byId(node), s=gcs(n), b=box;
- return !b ? dojo._getContentBox(n, s) : dojo._setContentSize(n, b.w, b.h, s); // Object
- }
-
+ var n = byId(node), s = gcs(n), b = box;
+ return !b ? d._getContentBox(n, s) : d._setContentSize(n, b.w, b.h, s); // Object
+ }
+
// =============================
// Positioning
// =============================
-
+
var _sumAncestorProperties = function(node, prop){
- if(!(node = (node||0).parentNode)){return 0};
- var val, retVal = 0, _b = dojo.body();
+ if(!(node = (node||0).parentNode)){return 0}
+ var val, retVal = 0, _b = d.body();
while(node && node.style){
if(gcs(node).position == "fixed"){
return 0;
}
val = node[prop];
if(val){
retVal += val - 0;
// opera and khtml #body & #html has the same values, we only
// need one value
if(node == _b){ break; }
}
node = node.parentNode;
}
return retVal; // integer
}
dojo._docScroll = function(){
- var _b = dojo.body();
- var _w = dojo.global;
- var de = dojo.doc.documentElement;
- return {
- y: (_w.pageYOffset || de.scrollTop || _b.scrollTop || 0),
- x: (_w.pageXOffset || dojo._fixIeBiDiScrollLeft(de.scrollLeft) || _b.scrollLeft || 0)
- };
- };
-
+ var n = d.global;
+ return "pageXOffset" in n? { x:n.pageXOffset, y:n.pageYOffset } :
+ (n=d.doc.documentElement, n.clientHeight? { x:d._fixIeBiDiScrollLeft(n.scrollLeft), y:n.scrollTop } :
+ (n=d.body(), { x:n.scrollLeft||0, y:n.scrollTop||0 }));
+ };
+
dojo._isBodyLtr = function(){
- //FIXME: could check html and body tags directly instead of computed style? need to ignore case, accept empty values
- return !("_bodyLtr" in dojo) ?
- dojo._bodyLtr = dojo.getComputedStyle(dojo.body()).direction == "ltr" :
- dojo._bodyLtr; // Boolean
- }
-
- dojo._getIeDocumentElementOffset = function(){
- // summary
+ return "_bodyLtr" in d? d._bodyLtr :
+ d._bodyLtr = (d.body().dir || d.doc.documentElement.dir || "ltr").toLowerCase() == "ltr"; // Boolean
+ }
+
+ dojo._getIeDocumentElementOffset = function(){
+ // summary:
+ // returns the offset in x and y from the document body to the
+ // visual edge of the page
+ // description:
// The following values in IE contain an offset:
- // event.clientX
- // event.clientY
- // node.getBoundingClientRect().left
- // node.getBoundingClientRect().top
- // But other position related values do not contain this offset, such as
- // node.offsetLeft, node.offsetTop, node.style.left and node.style.top.
- // The offset is always (2, 2) in LTR direction. When the body is in RTL
- // direction, the offset counts the width of left scroll bar's width.
- // This function computes the actual offset.
+ // | event.clientX
+ // | event.clientY
+ // | node.getBoundingClientRect().left
+ // | node.getBoundingClientRect().top
+ // But other position related values do not contain this offset,
+ // such as node.offsetLeft, node.offsetTop, node.style.left and
+ // node.style.top. The offset is always (2, 2) in LTR direction.
+ // When the body is in RTL direction, the offset counts the width
+ // of left scroll bar's width. This function computes the actual
+ // offset.
//NOTE: assumes we're being called in an IE browser
- var de = dojo.doc.documentElement;
- if(dojo.isIE >= 7){
- return {x: de.getBoundingClientRect().left, y: de.getBoundingClientRect().top}; // Object
+ var de = d.doc.documentElement; // only deal with HTML element here, _abs handles body/quirks
+
+ if(d.isIE < 8){
+ var r = de.getBoundingClientRect(); // works well for IE6+
+ //console.debug('rect left,top = ' + r.left+','+r.top + ', html client left/top = ' + de.clientLeft+','+de.clientTop + ', rtl = ' + (!d._isBodyLtr()) + ', quirks = ' + d.isQuirks);
+ var l = r.left,
+ t = r.top;
+ if(d.isIE < 7){
+ l += de.clientLeft; // scrollbar size in strict/RTL, or,
+ t += de.clientTop; // HTML border size in strict
+ }
+ return {
+ x: l < 0? 0 : l, // FRAME element border size can lead to inaccurate negative values
+ y: t < 0? 0 : t
+ };
}else{
- // IE 6.0
- return {x: dojo._isBodyLtr() || window.parent == window ?
- de.clientLeft : de.offsetWidth - de.clientWidth - de.clientLeft,
- y: de.clientTop}; // Object
- }
+ return {
+ x: 0,
+ y: 0
+ };
+ }
+
};
dojo._fixIeBiDiScrollLeft = function(/*Integer*/ scrollLeft){
- // In RTL direction, scrollLeft should be a negative value, but IE
+ // In RTL direction, scrollLeft should be a negative value, but IE < 8
// returns a positive one. All codes using documentElement.scrollLeft
// must call this function to fix this error, otherwise the position
- // will offset to right when there is a horizonal scrollbar.
- if(dojo.isIE && !dojo._isBodyLtr()){
- var de = dojo.doc.documentElement;
+ // will offset to right when there is a horizontal scrollbar.
+
+ var dd = d.doc;
+ if(d.isIE < 8 && !d._isBodyLtr()){
+ var de = d.isQuirks ? dd.body : dd.documentElement;
return scrollLeft + de.clientWidth - de.scrollWidth; // Integer
}
- return scrollLeft; // Integer
- }
-
- dojo._abs = function(/*DomNode*/node, /*Boolean?*/includeScroll){
+ return scrollLeft; // Integer
+ }
+
+ // FIXME: need a setter for coords or a moveTo!!
+ dojo._abs = dojo.position = function(/*DomNode*/node, /*Boolean?*/includeScroll){
// summary:
- // Gets the absolute position of the passed element based on the
- // document itself. Returns an object of the form:
- // { x: 100, y: 300 }
- // if includeScroll is passed, the x and y values will include any
+ // Gets the position and size of the passed element relative to
+ // the viewport (if includeScroll==false), or relative to the
+ // document root (if includeScroll==true).
+ //
+ // description:
+ // Returns an object of the form:
+ // { x: 100, y: 300, w: 20, h: 15 }
+ // If includeScroll==true, the x and y values will include any
// document offsets that may affect the position relative to the
// viewport.
-
- // FIXME: need to decide in the brave-new-world if we're going to be
- // margin-box or border-box.
- var ownerDocument = node.ownerDocument;
- var ret = {
- x: 0,
- y: 0
- };
- var hasScroll = false;
-
- // targetBoxType == "border-box"
- var db = dojo.body();
- if(dojo.isIE){
- var client = node.getBoundingClientRect();
- var offset = dojo._getIeDocumentElementOffset();
- ret.x = client.left - offset.x;
- ret.y = client.top - offset.y;
- }else if(ownerDocument["getBoxObjectFor"]){
- // mozilla
- var bo = ownerDocument.getBoxObjectFor(node);
- ret.x = bo.x - _sumAncestorProperties(node, "scrollLeft");
- ret.y = bo.y - _sumAncestorProperties(node, "scrollTop");
- }else{
+ // Uses the border-box model (inclusive of border and padding but
+ // not margin). Does not act as a setter.
+
+ var db = d.body(), dh = db.parentNode, ret;
+ node = byId(node);
+ if(node["getBoundingClientRect"]){
+ // IE6+, FF3+, super-modern WebKit, and Opera 9.6+ all take this branch
+ ret = node.getBoundingClientRect();
+ ret = { x: ret.left, y: ret.top, w: ret.right - ret.left, h: ret.bottom - ret.top };
+ if(d.isIE){
+ // On IE there's a 2px offset that we need to adjust for, see _getIeDocumentElementOffset()
+ var offset = d._getIeDocumentElementOffset();
+
+ // fixes the position in IE, quirks mode
+ ret.x -= offset.x + (d.isQuirks ? db.clientLeft+db.offsetLeft : 0);
+ ret.y -= offset.y + (d.isQuirks ? db.clientTop+db.offsetTop : 0);
+ }else if(d.isFF == 3){
+ // In FF3 you have to subtract the document element margins.
+ // Fixed in FF3.5 though.
+ var cs = gcs(dh);
+ ret.x -= px(dh, cs.marginLeft) + px(dh, cs.borderLeftWidth);
+ ret.y -= px(dh, cs.marginTop) + px(dh, cs.borderTopWidth);
+ }
+ }else{
+ // FF2 and older WebKit
+ ret = {
+ x: 0,
+ y: 0,
+ w: node.offsetWidth,
+ h: node.offsetHeight
+ };
if(node["offsetParent"]){
- hasScroll = true;
- var endNode;
- // in Safari, if the node is an absolutely positioned child of
- // the body and the body has a margin the offset of the child
- // and the body contain the body's margins, so we need to end
- // at the body
- // FIXME: getting contrary results to the above in latest WebKit.
- if(dojo.isSafari &&
- //(node.style.getPropertyValue("position") == "absolute") &&
- (gcs(node).position == "absolute") &&
- (node.parentNode == db)){
- endNode = db;
- }else{
- endNode = db.parentNode;
- }
- if(node.parentNode != db){
- var nd = node;
- if(dojo.isOpera || (dojo.isSafari >= 3)){ nd = db; }
- ret.x -= _sumAncestorProperties(nd, "scrollLeft");
- ret.y -= _sumAncestorProperties(nd, "scrollTop");
- }
+ ret.x -= _sumAncestorProperties(node, "scrollLeft");
+ ret.y -= _sumAncestorProperties(node, "scrollTop");
+
var curnode = node;
do{
- var n = curnode["offsetLeft"];
- //FIXME: ugly hack to workaround the submenu in
- //popupmenu2 does not shown up correctly in opera.
- //Someone have a better workaround?
- if(!dojo.isOpera || n>0){
- ret.x += isNaN(n) ? 0 : n;
+ var n = curnode.offsetLeft,
+ t = curnode.offsetTop;
+ ret.x += isNaN(n) ? 0 : n;
+ ret.y += isNaN(t) ? 0 : t;
+
+ cs = gcs(curnode);
+ if(curnode != node){
+ if(d.isMoz){
+ // tried left+right with differently sized left/right borders
+ // it really is 2xleft border in FF, not left+right, even in RTL!
+ ret.x += 2 * px(curnode,cs.borderLeftWidth);
+ ret.y += 2 * px(curnode,cs.borderTopWidth);
+ }else{
+ ret.x += px(curnode, cs.borderLeftWidth);
+ ret.y += px(curnode, cs.borderTopWidth);
+ }
+ }
+ // static children in a static div in FF2 are affected by the div's border as well
+ // but offsetParent will skip this div!
+ if(d.isMoz && cs.position=="static"){
+ var parent=curnode.parentNode;
+ while(parent!=curnode.offsetParent){
+ var pcs=gcs(parent);
+ if(pcs.position=="static"){
+ ret.x += px(curnode,pcs.borderLeftWidth);
+ ret.y += px(curnode,pcs.borderTopWidth);
+ }
+ parent=parent.parentNode;
+ }
}
- var m = curnode["offsetTop"];
- ret.y += isNaN(m) ? 0 : m;
- curnode = curnode.offsetParent;
- }while((curnode != endNode)&&curnode);
- }else if(node["x"]&&node["y"]){
+ curnode = curnode.offsetParent;
+ }while((curnode != dh) && curnode);
+ }else if(node.x && node.y){
ret.x += isNaN(node.x) ? 0 : node.x;
ret.y += isNaN(node.y) ? 0 : node.y;
}
}
// account for document scrolling
// if offsetParent is used, ret value already includes scroll position
// so we may have to actually remove that value if !includeScroll
- if(hasScroll || includeScroll){
- var scroll = dojo._docScroll();
- var m = hasScroll ? (!includeScroll ? -1 : 0) : 1;
- ret.y += m*scroll.y;
- ret.x += m*scroll.x;
- }
-
- return ret; // object
- }
-
- // FIXME: need a setter for coords or a moveTo!!
+ if(includeScroll){
+ var scroll = d._docScroll();
+ ret.x += scroll.x;
+ ret.y += scroll.y;
+ }
+
+ return ret; // Object
+ }
+
dojo.coords = function(/*DomNode|String*/node, /*Boolean?*/includeScroll){
// summary:
- // Returns an object that measures margin box width/height and
- // absolute positioning data from dojo._abs(). Return value will
- // be in the form:
- // { l: 50, t: 200, w: 300: h: 150, x: 100, y: 300 }
- // does not act as a setter. If includeScroll is passed, the x and
- // y params are affected as one would expect in dojo._abs().
- var n=dojo.byId(node), s=gcs(n), mb=dojo._getMarginBox(n, s);
- var abs = dojo._abs(n, includeScroll);
+ // Deprecated: Use position() for border-box x/y/w/h
+ // or marginBox() for margin-box w/h/l/t.
+ // Returns an object representing a node's size and position.
+ //
+ // description:
+ // Returns an object that measures margin-box (w)idth/(h)eight
+ // and absolute position x/y of the border-box. Also returned
+ // is computed (l)eft and (t)op values in pixels from the
+ // node's offsetParent as returned from marginBox().
+ // Return value will be in the form:
+ //| { l: 50, t: 200, w: 300: h: 150, x: 100, y: 300 }
+ // Does not act as a setter. If includeScroll is passed, the x and
+ // y params are affected as one would expect in dojo.position().
+ var n = byId(node), s = gcs(n), mb = d._getMarginBox(n, s);
+ var abs = d.position(n, includeScroll);
mb.x = abs.x;
mb.y = abs.y;
return mb;
}
+
+ // =============================
+ // Element attribute Functions
+ // =============================
+
+ // dojo.attr() should conform to http://www.w3.org/TR/DOM-Level-2-Core/
+
+ var _propNames = {
+ // properties renamed to avoid clashes with reserved words
+ "class": "className",
+ "for": "htmlFor",
+ // properties written as camelCase
+ tabindex: "tabIndex",
+ readonly: "readOnly",
+ colspan: "colSpan",
+ frameborder: "frameBorder",
+ rowspan: "rowSpan",
+ valuetype: "valueType"
+ },
+ _attrNames = {
+ // original attribute names
+ classname: "class",
+ htmlfor: "for",
+ // for IE
+ tabindex: "tabIndex",
+ readonly: "readOnly"
+ },
+ _forcePropNames = {
+ innerHTML: 1,
+ className: 1,
+ htmlFor: d.isIE,
+ value: 1
+ };
+
+ var _fixAttrName = function(/*String*/ name){
+ return _attrNames[name.toLowerCase()] || name;
+ };
+
+ var _hasAttr = function(node, name){
+ var attr = node.getAttributeNode && node.getAttributeNode(name);
+ return attr && attr.specified; // Boolean
+ };
+
+ // There is a difference in the presence of certain properties and their default values
+ // between browsers. For example, on IE "disabled" is present on all elements,
+ // but it is value is "false"; "tabIndex" of <div> returns 0 by default on IE, yet other browsers
+ // can return -1.
+
+ dojo.hasAttr = function(/*DomNode|String*/node, /*String*/name){
+ // summary:
+ // Returns true if the requested attribute is specified on the
+ // given element, and false otherwise.
+ // node:
+ // id or reference to the element to check
+ // name:
+ // the name of the attribute
+ // returns:
+ // true if the requested attribute is specified on the
+ // given element, and false otherwise
+ var lc = name.toLowerCase();
+ return _forcePropNames[_propNames[lc] || name] || _hasAttr(byId(node), _attrNames[lc] || name); // Boolean
+ }
+
+ var _evtHdlrMap = {}, _ctr = 0,
+ _attrId = dojo._scopeName + "attrid",
+ // the next dictionary lists elements with read-only innerHTML on IE
+ _roInnerHtml = {col: 1, colgroup: 1,
+ // frameset: 1, head: 1, html: 1, style: 1,
+ table: 1, tbody: 1, tfoot: 1, thead: 1, tr: 1, title: 1};
+
+ dojo.attr = function(/*DomNode|String*/node, /*String|Object*/name, /*String?*/value){
+ // summary:
+ // Gets or sets an attribute on an HTML element.
+ // description:
+ // Handles normalized getting and setting of attributes on DOM
+ // Nodes. If 2 arguments are passed, and a the second argumnt is a
+ // string, acts as a getter.
+ //
+ // If a third argument is passed, or if the second argument is a
+ // map of attributes, acts as a setter.
+ //
+ // When passing functions as values, note that they will not be
+ // directly assigned to slots on the node, but rather the default
+ // behavior will be removed and the new behavior will be added
+ // using `dojo.connect()`, meaning that event handler properties
+ // will be normalized and that some caveats with regards to
+ // non-standard behaviors for onsubmit apply. Namely that you
+ // should cancel form submission using `dojo.stopEvent()` on the
+ // passed event object instead of returning a boolean value from
+ // the handler itself.
+ // node:
+ // id or reference to the element to get or set the attribute on
+ // name:
+ // the name of the attribute to get or set.
+ // value:
+ // The value to set for the attribute
+ // returns:
+ // when used as a getter, the value of the requested attribute
+ // or null if that attribute does not have a specified or
+ // default value;
+ //
+ // when used as a setter, the DOM node
+ //
+ // example:
+ // | // get the current value of the "foo" attribute on a node
+ // | dojo.attr(dojo.byId("nodeId"), "foo");
+ // | // or we can just pass the id:
+ // | dojo.attr("nodeId", "foo");
+ //
+ // example:
+ // | // use attr() to set the tab index
+ // | dojo.attr("nodeId", "tabIndex", 3);
+ // |
+ //
+ // example:
+ // Set multiple values at once, including event handlers:
+ // | dojo.attr("formId", {
+ // | "foo": "bar",
+ // | "tabIndex": -1,
+ // | "method": "POST",
+ // | "onsubmit": function(e){
+ // | // stop submitting the form. Note that the IE behavior
+ // | // of returning true or false will have no effect here
+ // | // since our handler is connect()ed to the built-in
+ // | // onsubmit behavior and so we need to use
+ // | // dojo.stopEvent() to ensure that the submission
+ // | // doesn't proceed.
+ // | dojo.stopEvent(e);
+ // |
+ // | // submit the form with Ajax
+ // | dojo.xhrPost({ form: "formId" });
+ // | }
+ // | });
+ //
+ // example:
+ // Style is s special case: Only set with an object hash of styles
+ // | dojo.attr("someNode",{
+ // | id:"bar",
+ // | style:{
+ // | width:"200px", height:"100px", color:"#000"
+ // | }
+ // | });
+ //
+ // example:
+ // Again, only set style as an object hash of styles:
+ // | var obj = { color:"#fff", backgroundColor:"#000" };
+ // | dojo.attr("someNode", "style", obj);
+ // |
+ // | // though shorter to use `dojo.style()` in this case:
+ // | dojo.style("someNode", obj);
+
+ node = byId(node);
+ var args = arguments.length, prop;
+ if(args == 2 && typeof name != "string"){ // inline'd type check
+ // the object form of setter: the 2nd argument is a dictionary
+ for(var x in name){
+ d.attr(node, x, name[x]);
+ }
+ return node; // DomNode
+ }
+ var lc = name.toLowerCase(),
+ propName = _propNames[lc] || name,
+ forceProp = _forcePropNames[propName],
+ attrName = _attrNames[lc] || name;
+ if(args == 3){
+ // setter
+ do{
+ if(propName == "style" && typeof value != "string"){ // inline'd type check
+ // special case: setting a style
+ d.style(node, value);
+ break;
+ }
+ if(propName == "innerHTML"){
+ // special case: assigning HTML
+ if(d.isIE && node.tagName.toLowerCase() in _roInnerHtml){
+ d.empty(node);
+ node.appendChild(d._toDom(value, node.ownerDocument));
+ }else{
+ node[propName] = value;
+ }
+ break;
+ }
+ if(d.isFunction(value)){
+ // special case: assigning an event handler
+ // clobber if we can
+ var attrId = d.attr(node, _attrId);
+ if(!attrId){
+ attrId = _ctr++;
+ d.attr(node, _attrId, attrId);
+ }
+ if(!_evtHdlrMap[attrId]){
+ _evtHdlrMap[attrId] = {};
+ }
+ var h = _evtHdlrMap[attrId][propName];
+ if(h){
+ d.disconnect(h);
+ }else{
+ try{
+ delete node[propName];
+ }catch(e){}
+ }
+ // ensure that event objects are normalized, etc.
+ _evtHdlrMap[attrId][propName] = d.connect(node, propName, value);
+ break;
+ }
+ if(forceProp || typeof value == "boolean"){
+ // special case: forcing assignment to the property
+ // special case: setting boolean to a property instead of attribute
+ node[propName] = value;
+ break;
+ }
+ // node's attribute
+ node.setAttribute(attrName, value);
+ }while(false);
+ return node; // DomNode
+ }
+ // getter
+ // should we access this attribute via a property or
+ // via getAttribute()?
+ value = node[propName];
+ if(forceProp && typeof value != "undefined"){
+ // node's property
+ return value; // Anything
+ }
+ if(propName != "href" && (typeof value == "boolean" || d.isFunction(value))){
+ // node's property
+ return value; // Anything
+ }
+ // node's attribute
+ // we need _hasAttr() here to guard against IE returning a default value
+ return _hasAttr(node, attrName) ? node.getAttribute(attrName) : null; // Anything
+ }
+
+ dojo.removeAttr = function(/*DomNode|String*/ node, /*String*/ name){
+ // summary:
+ // Removes an attribute from an HTML element.
+ // node:
+ // id or reference to the element to remove the attribute from
+ // name:
+ // the name of the attribute to remove
+ byId(node).removeAttribute(_fixAttrName(name));
+ }
+
+ dojo.getNodeProp = function(/*DomNode|String*/ node, /*String*/ name){
+ // summary:
+ // Returns an effective value of a property or an attribute.
+ // node:
+ // id or reference to the element to remove the attribute from
+ // name:
+ // the name of the attribute
+ node = byId(node);
+ var lc = name.toLowerCase(),
+ propName = _propNames[lc] || name;
+ if((propName in node) && propName != "href"){
+ // node's property
+ return node[propName]; // Anything
+ }
+ // node's attribute
+ var attrName = _attrNames[lc] || name;
+ return _hasAttr(node, attrName) ? node.getAttribute(attrName) : null; // Anything
+ }
+
+ dojo.create = function(tag, attrs, refNode, pos){
+ // summary:
+ // Create an element, allowing for optional attribute decoration
+ // and placement.
+ //
+ // description:
+ // A DOM Element creation function. A shorthand method for creating a node or
+ // a fragment, and allowing for a convenient optional attribute setting step,
+ // as well as an optional DOM placement reference.
+ //|
+ // Attributes are set by passing the optional object through `dojo.attr`.
+ // See `dojo.attr` for noted caveats and nuances, and API if applicable.
+ //|
+ // Placement is done via `dojo.place`, assuming the new node to be the action
+ // node, passing along the optional reference node and position.
+ //
+ // tag: String|DomNode
+ // A string of the element to create (eg: "div", "a", "p", "li", "script", "br"),
+ // or an existing DOM node to process.
+ //
+ // attrs: Object
+ // An object-hash of attributes to set on the newly created node.
+ // Can be null, if you don't want to set any attributes/styles.
+ // See: `dojo.attr` for a description of available attributes.
+ //
+ // refNode: String?|DomNode?
+ // Optional reference node. Used by `dojo.place` to place the newly created
+ // node somewhere in the dom relative to refNode. Can be a DomNode reference
+ // or String ID of a node.
+ //
+ // pos: String?
+ // Optional positional reference. Defaults to "last" by way of `dojo.place`,
+ // though can be set to "first","after","before","last", "replace" or "only"
+ // to further control the placement of the new node relative to the refNode.
+ // 'refNode' is required if a 'pos' is specified.
+ //
+ // returns: DomNode
+ //
+ // example:
+ // Create a DIV:
+ // | var n = dojo.create("div");
+ //
+ // example:
+ // Create a DIV with content:
+ // | var n = dojo.create("div", { innerHTML:"<p>hi</p>" });
+ //
+ // example:
+ // Place a new DIV in the BODY, with no attributes set
+ // | var n = dojo.create("div", null, dojo.body());
+ //
+ // example:
+ // Create an UL, and populate it with LI's. Place the list as the first-child of a
+ // node with id="someId":
+ // | var ul = dojo.create("ul", null, "someId", "first");
+ // | var items = ["one", "two", "three", "four"];
+ // | dojo.forEach(items, function(data){
+ // | dojo.create("li", { innerHTML: data }, ul);
+ // | });
+ //
+ // example:
+ // Create an anchor, with an href. Place in BODY:
+ // | dojo.create("a", { href:"foo.html", title:"Goto FOO!" }, dojo.body());
+ //
+ // example:
+ // Create a `dojo.NodeList()` from a new element (for syntatic sugar):
+ // | dojo.query(dojo.create('div'))
+ // | .addClass("newDiv")
+ // | .onclick(function(e){ console.log('clicked', e.target) })
+ // | .place("#someNode"); // redundant, but cleaner.
+
+ var doc = d.doc;
+ if(refNode){
+ refNode = byId(refNode);
+ doc = refNode.ownerDocument;
+ }
+ if(typeof tag == "string"){ // inline'd type check
+ tag = doc.createElement(tag);
+ }
+ if(attrs){ d.attr(tag, attrs); }
+ if(refNode){ d.place(tag, refNode, pos); }
+ return tag; // DomNode
+ }
+
+ /*=====
+ dojo.empty = function(node){
+ // summary:
+ // safely removes all children of the node.
+ // node: DOMNode|String
+ // a reference to a DOM node or an id.
+ // example:
+ // Destroy node's children byId:
+ // | dojo.empty("someId");
+ //
+ // example:
+ // Destroy all nodes' children in a list by reference:
+ // | dojo.query(".someNode").forEach(dojo.empty);
+ }
+ =====*/
+
+ d.empty =
+ d.isIE ? function(node){
+ node = byId(node);
+ for(var c; c = node.lastChild;){ // intentional assignment
+ d.destroy(c);
+ }
+ } :
+ function(node){
+ byId(node).innerHTML = "";
+ };
+
+ /*=====
+ dojo._toDom = function(frag, doc){
+ // summary:
+ // instantiates an HTML fragment returning the corresponding DOM.
+ // frag: String
+ // the HTML fragment
+ // doc: DocumentNode?
+ // optional document to use when creating DOM nodes, defaults to
+ // dojo.doc if not specified.
+ // returns: DocumentFragment
+ //
+ // example:
+ // Create a table row:
+ // | var tr = dojo._toDom("<tr><td>First!</td></tr>");
+ }
+ =====*/
+
+ // support stuff for dojo._toDom
+ var tagWrap = {
+ option: ["select"],
+ tbody: ["table"],
+ thead: ["table"],
+ tfoot: ["table"],
+ tr: ["table", "tbody"],
+ td: ["table", "tbody", "tr"],
+ th: ["table", "thead", "tr"],
+ legend: ["fieldset"],
+ caption: ["table"],
+ colgroup: ["table"],
+ col: ["table", "colgroup"],
+ li: ["ul"]
+ },
+ reTag = /<\s*([\w\:]+)/,
+ masterNode = {}, masterNum = 0,
+ masterName = "__" + d._scopeName + "ToDomId";
+
+ // generate start/end tag strings to use
+ // for the injection for each special tag wrap case.
+ for(var param in tagWrap){
+ var tw = tagWrap[param];
+ tw.pre = param == "option" ? '<select multiple="multiple">' : "<" + tw.join("><") + ">";
+ tw.post = "</" + tw.reverse().join("></") + ">";
+ // the last line is destructive: it reverses the array,
+ // but we don't care at this point
+ }
+
+ d._toDom = function(frag, doc){
+ // summary:
+ // converts HTML string into DOM nodes.
+
+ doc = doc || d.doc;
+ var masterId = doc[masterName];
+ if(!masterId){
+ doc[masterName] = masterId = ++masterNum + "";
+ masterNode[masterId] = doc.createElement("div");
+ }
+
+ // make sure the frag is a string.
+ frag += "";
+
+ // find the starting tag, and get node wrapper
+ var match = frag.match(reTag),
+ tag = match ? match[1].toLowerCase() : "",
+ master = masterNode[masterId],
+ wrap, i, fc, df;
+ if(match && tagWrap[tag]){
+ wrap = tagWrap[tag];
+ master.innerHTML = wrap.pre + frag + wrap.post;
+ for(i = wrap.length; i; --i){
+ master = master.firstChild;
+ }
+ }else{
+ master.innerHTML = frag;
+ }
+
+ // one node shortcut => return the node itself
+ if(master.childNodes.length == 1){
+ return master.removeChild(master.firstChild); // DOMNode
+ }
+
+ // return multiple nodes as a document fragment
+ df = doc.createDocumentFragment();
+ while(fc = master.firstChild){ // intentional assignment
+ df.appendChild(fc);
+ }
+ return df; // DOMNode
+ }
+
+ // =============================
+ // (CSS) Class Functions
+ // =============================
+ var _className = "className";
+
+ dojo.hasClass = function(/*DomNode|String*/node, /*String*/classStr){
+ // summary:
+ // Returns whether or not the specified classes are a portion of the
+ // class list currently applied to the node.
+ //
+ // node:
+ // String ID or DomNode reference to check the class for.
+ //
+ // classStr:
+ // A string class name to look for.
+ //
+ // example:
+ // Do something if a node with id="someNode" has class="aSillyClassName" present
+ // | if(dojo.hasClass("someNode","aSillyClassName")){ ... }
+
+ return ((" "+ byId(node)[_className] +" ").indexOf(" " + classStr + " ") >= 0); // Boolean
+ };
+
+ var spaces = /\s+/, a1 = [""],
+ str2array = function(s){
+ if(typeof s == "string" || s instanceof String){
+ if(s.indexOf(" ") < 0){
+ a1[0] = s;
+ return a1;
+ }else{
+ return s.split(spaces);
+ }
+ }
+ // assumed to be an array
+ return s;
+ };
+
+ dojo.addClass = function(/*DomNode|String*/node, /*String|Array*/classStr){
+ // summary:
+ // Adds the specified classes to the end of the class list on the
+ // passed node. Will not re-apply duplicate classes.
+ //
+ // node:
+ // String ID or DomNode reference to add a class string too
+ //
+ // classStr:
+ // A String class name to add, or several space-separated class names,
+ // or an array of class names.
+ //
+ // example:
+ // Add a class to some node:
+ // | dojo.addClass("someNode", "anewClass");
+ //
+ // example:
+ // Add two classes at once:
+ // | dojo.addClass("someNode", "firstClass secondClass");
+ //
+ // example:
+ // Add two classes at once (using array):
+ // | dojo.addClass("someNode", ["firstClass", "secondClass"]);
+ //
+ // example:
+ // Available in `dojo.NodeList` for multiple additions
+ // | dojo.query("ul > li").addClass("firstLevel");
+
+ node = byId(node);
+ classStr = str2array(classStr);
+ var cls = " " + node[_className] + " ";
+ for(var i = 0, len = classStr.length, c; i < len; ++i){
+ c = classStr[i];
+ if(c && cls.indexOf(" " + c + " ") < 0){
+ cls += c + " ";
+ }
+ }
+ node[_className] = d.trim(cls);
+ };
+
+ dojo.removeClass = function(/*DomNode|String*/node, /*String|Array?*/classStr){
+ // summary:
+ // Removes the specified classes from node. No `dojo.hasClass`
+ // check is required.
+ //
+ // node:
+ // String ID or DomNode reference to remove the class from.
+ //
+ // classStr:
+ // An optional String class name to remove, or several space-separated
+ // class names, or an array of class names. If omitted, all class names
+ // will be deleted.
+ //
+ // example:
+ // Remove a class from some node:
+ // | dojo.removeClass("someNode", "firstClass");
+ //
+ // example:
+ // Remove two classes from some node:
+ // | dojo.removeClass("someNode", "firstClass secondClass");
+ //
+ // example:
+ // Remove two classes from some node (using array):
+ // | dojo.removeClass("someNode", ["firstClass", "secondClass"]);
+ //
+ // example:
+ // Remove all classes from some node:
+ // | dojo.removeClass("someNode");
+ //
+ // example:
+ // Available in `dojo.NodeList()` for multiple removal
+ // | dojo.query(".foo").removeClass("foo");
+
+ node = byId(node);
+ var cls;
+ if(classStr !== undefined){
+ classStr = str2array(classStr);
+ cls = " " + node[_className] + " ";
+ for(var i = 0, len = classStr.length; i < len; ++i){
+ cls = cls.replace(" " + classStr[i] + " ", " ");
+ }
+ cls = d.trim(cls);
+ }else{
+ cls = "";
+ }
+ if(node[_className] != cls){ node[_className] = cls; }
+ };
+
+ dojo.toggleClass = function(/*DomNode|String*/node, /*String|Array*/classStr, /*Boolean?*/condition){
+ // summary:
+ // Adds a class to node if not present, or removes if present.
+ // Pass a boolean condition if you want to explicitly add or remove.
+ // condition:
+ // If passed, true means to add the class, false means to remove.
+ //
+ // example:
+ // | dojo.toggleClass("someNode", "hovered");
+ //
+ // example:
+ // Forcefully add a class
+ // | dojo.toggleClass("someNode", "hovered", true);
+ //
+ // example:
+ // Available in `dojo.NodeList()` for multiple toggles
+ // | dojo.query(".toggleMe").toggleClass("toggleMe");
+
+ if(condition === undefined){
+ condition = !d.hasClass(node, classStr);
+ }
+ d[condition ? "addClass" : "removeClass"](node, classStr);
+ };
+
})();
-// =============================
-// (CSS) Class Functions
-// =============================
-
-dojo.hasClass = function(/*DomNode|String*/node, /*String*/classStr){
- // summary:
- // Returns whether or not the specified classes are a portion of the
- // class list currently applied to the node.
- return ((" "+dojo.byId(node).className+" ").indexOf(" "+classStr+" ") >= 0); // Boolean
-};
-
-dojo.addClass = function(/*DomNode|String*/node, /*String*/classStr){
- // summary:
- // Adds the specified classes to the end of the class list on the
- // passed node.
- node = dojo.byId(node);
- var cls = node.className;
- if((" "+cls+" ").indexOf(" "+classStr+" ") < 0){
- node.className = cls + (cls ? ' ' : '') + classStr;
- }
-};
-
-dojo.removeClass = function(/*DomNode|String*/node, /*String*/classStr){
- // summary: Removes the specified classes from node.
- node = dojo.byId(node);
- var t = dojo.trim((" " + node.className + " ").replace(" " + classStr + " ", " "));
- if(node.className != t){ node.className = t; }
-};
-
-dojo.toggleClass = function(/*DomNode|String*/node, /*String*/classStr, /*Boolean?*/condition){
- // summary:
- // Adds a class to node if not present, or removes if present.
- // Pass a boolean condition if you want to explicitly add or remove.
- // condition:
- // If passed, true means to add the class, false means to remove.
- if(condition === undefined){
- condition = !dojo.hasClass(node, classStr);
- }
- dojo[condition ? "addClass" : "removeClass"](node, classStr);
-};
-
}
if(!dojo._hasResource["dojo._base.NodeList"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo._base.NodeList"] = true;
dojo.provide("dojo._base.NodeList");
(function(){
var d = dojo;
- var tnl = function(arr){
- arr.constructor = dojo.NodeList;
- dojo._mixin(arr, dojo.NodeList.prototype);
- return arr;
- }
+ var ap = Array.prototype, aps = ap.slice, apc = ap.concat;
+
+ var tnl = function(/*Array*/ a, /*dojo.NodeList?*/ parent, /*Function?*/ NodeListCtor){
+ // summary:
+ // decorate an array to make it look like a `dojo.NodeList`.
+ // a:
+ // Array of nodes to decorate.
+ // parent:
+ // An optional parent NodeList that generated the current
+ // list of nodes. Used to call _stash() so the parent NodeList
+ // can be accessed via end() later.
+ // NodeListCtor:
+ // An optional constructor function to use for any
+ // new NodeList calls. This allows a certain chain of
+ // NodeList calls to use a different object than dojo.NodeList.
+ if(!a.sort){
+ // make sure it's a real array before we pass it on to be wrapped
+ a = aps.call(a, 0);
+ }
+ var ctor = NodeListCtor || this._NodeListCtor || d._NodeListCtor;
+ a.constructor = ctor;
+ dojo._mixin(a, ctor.prototype);
+ a._NodeListCtor = ctor;
+ return parent ? a._stash(parent) : a;
+ };
+
+ var loopBody = function(f, a, o){
+ a = [0].concat(aps.call(a, 0));
+ o = o || d.global;
+ return function(node){
+ a[0] = node;
+ return f.apply(o, a);
+ };
+ };
+
+ // adapters
+
+ var adaptAsForEach = function(f, o){
+ // summary:
+ // adapts a single node function to be used in the forEach-type
+ // actions. The initial object is returned from the specialized
+ // function.
+ // f: Function
+ // a function to adapt
+ // o: Object?
+ // an optional context for f
+ return function(){
+ this.forEach(loopBody(f, arguments, o));
+ return this; // Object
+ };
+ };
+
+ var adaptAsMap = function(f, o){
+ // summary:
+ // adapts a single node function to be used in the map-type
+ // actions. The return is a new array of values, as via `dojo.map`
+ // f: Function
+ // a function to adapt
+ // o: Object?
+ // an optional context for f
+ return function(){
+ return this.map(loopBody(f, arguments, o));
+ };
+ };
+
+ var adaptAsFilter = function(f, o){
+ // summary:
+ // adapts a single node function to be used in the filter-type actions
+ // f: Function
+ // a function to adapt
+ // o: Object?
+ // an optional context for f
+ return function(){
+ return this.filter(loopBody(f, arguments, o));
+ };
+ };
+
+ var adaptWithCondition = function(f, g, o){
+ // summary:
+ // adapts a single node function to be used in the map-type
+ // actions, behaves like forEach() or map() depending on arguments
+ // f: Function
+ // a function to adapt
+ // g: Function
+ // a condition function, if true runs as map(), otherwise runs as forEach()
+ // o: Object?
+ // an optional context for f and g
+ return function(){
+ var a = arguments, body = loopBody(f, a, o);
+ if(g.call(o || d.global, a)){
+ return this.map(body); // self
+ }
+ this.forEach(body);
+ return this; // self
+ };
+ };
+
+ var magicGuard = function(a){
+ // summary:
+ // the guard function for dojo.attr() and dojo.style()
+ return a.length == 1 && (typeof a[0] == "string"); // inline'd type check
+ };
+
+ var orphan = function(node){
+ // summary:
+ // function to orphan nodes
+ var p = node.parentNode;
+ if(p){
+ p.removeChild(node);
+ }
+ };
+ // FIXME: should we move orphan() to dojo.html?
dojo.NodeList = function(){
// summary:
- // dojo.NodeList is as subclass of Array which adds syntactic
- // sugar for chaining, common iteration operations, animation,
- // and node manipulation. NodeLists are most often returned as
- // the result of dojo.query() calls.
+ // dojo.NodeList is an of Array subclass which adds syntactic
+ // sugar for chaining, common iteration operations, animation, and
+ // node manipulation. NodeLists are most often returned as the
+ // result of dojo.query() calls.
+ // description:
+ // dojo.NodeList instances provide many utilities that reflect
+ // core Dojo APIs for Array iteration and manipulation, DOM
+ // manipulation, and event handling. Instead of needing to dig up
+ // functions in the dojo.* namespace, NodeLists generally make the
+ // full power of Dojo available for DOM manipulation tasks in a
+ // simple, chainable way.
// example:
// create a node list from a node
// | new dojo.NodeList(dojo.byId("foo"));
+ // example:
+ // get a NodeList from a CSS query and iterate on it
+ // | var l = dojo.query(".thinger");
+ // | l.forEach(function(node, index, nodeList){
+ // | console.log(index, node.innerHTML);
+ // | });
+ // example:
+ // use native and Dojo-provided array methods to manipulate a
+ // NodeList without needing to use dojo.* functions explicitly:
+ // | var l = dojo.query(".thinger");
+ // | // since NodeLists are real arrays, they have a length
+ // | // property that is both readable and writable and
+ // | // push/pop/shift/unshift methods
+ // | console.log(l.length);
+ // | l.push(dojo.create("span"));
+ // |
+ // | // dojo's normalized array methods work too:
+ // | console.log( l.indexOf(dojo.byId("foo")) );
+ // | // ...including the special "function as string" shorthand
+ // | console.log( l.every("item.nodeType == 1") );
+ // |
+ // | // NodeLists can be [..] indexed, or you can use the at()
+ // | // function to get specific items wrapped in a new NodeList:
+ // | var node = l[3]; // the 4th element
+ // | var newList = l.at(1, 3); // the 2nd and 4th elements
+ // example:
+ // the style functions you expect are all there too:
+ // | // style() as a getter...
+ // | var borders = dojo.query(".thinger").style("border");
+ // | // ...and as a setter:
+ // | dojo.query(".thinger").style("border", "1px solid black");
+ // | // class manipulation
+ // | dojo.query("li:nth-child(even)").addClass("even");
+ // | // even getting the coordinates of all the items
+ // | var coords = dojo.query(".thinger").coords();
+ // example:
+ // DOM manipulation functions from the dojo.* namespace area also
+ // available:
+ // | // remove all of the elements in the list from their
+ // | // parents (akin to "deleting" them from the document)
+ // | dojo.query(".thinger").orphan();
+ // | // place all elements in the list at the front of #foo
+ // | dojo.query(".thinger").place("foo", "first");
+ // example:
+ // Event handling couldn't be easier. `dojo.connect` is mapped in,
+ // and shortcut handlers are provided for most DOM events:
+ // | // like dojo.connect(), but with implicit scope
+ // | dojo.query("li").connect("onclick", console, "log");
+ // |
+ // | // many common event handlers are already available directly:
+ // | dojo.query("li").onclick(console, "log");
+ // | var toggleHovered = dojo.hitch(dojo, "toggleClass", "hovered");
+ // | dojo.query("p")
+ // | .onmouseenter(toggleHovered)
+ // | .onmouseleave(toggleHovered);
+ // example:
+ // chainability is a key advantage of NodeLists:
+ // | dojo.query(".thinger")
+ // | .onclick(function(e){ /* ... */ })
+ // | .at(1, 3, 8) // get a subset
+ // | .style("padding", "5px")
+ // | .forEach(console.log);
return tnl(Array.apply(null, arguments));
- }
-
- dojo.NodeList._wrap = tnl;
+ };
+
+ //Allow things that new up a NodeList to use a delegated or alternate NodeList implementation.
+ d._NodeListCtor = d.NodeList;
+
+ var nl = d.NodeList, nlp = nl.prototype;
+
+ // expose adapters and the wrapper as private functions
+
+ nl._wrap = nlp._wrap = tnl;
+ nl._adaptAsMap = adaptAsMap;
+ nl._adaptAsForEach = adaptAsForEach;
+ nl._adaptAsFilter = adaptAsFilter;
+ nl._adaptWithCondition = adaptWithCondition;
+
+ // mass assignment
+
+ // add array redirectors
+ d.forEach(["slice", "splice"], function(name){
+ var f = ap[name];
+ //Use a copy of the this array via this.slice() to allow .end() to work right in the splice case.
+ // CANNOT apply ._stash()/end() to splice since it currently modifies
+ // the existing this array -- it would break backward compatibility if we copy the array before
+ // the splice so that we can use .end(). So only doing the stash option to this._wrap for slice.
+ nlp[name] = function(){ return this._wrap(f.apply(this, arguments), name == "slice" ? this : null); };
+ });
+ // concat should be here but some browsers with native NodeList have problems with it
+
+ // add array.js redirectors
+ d.forEach(["indexOf", "lastIndexOf", "every", "some"], function(name){
+ var f = d[name];
+ nlp[name] = function(){ return f.apply(d, [this].concat(aps.call(arguments, 0))); };
+ });
+
+ // add conditional methods
+ d.forEach(["attr", "style"], function(name){
+ nlp[name] = adaptWithCondition(d[name], magicGuard);
+ });
+
+ // add forEach actions
+ d.forEach(["connect", "addClass", "removeClass", "toggleClass", "empty", "removeAttr"], function(name){
+ nlp[name] = adaptAsForEach(d[name]);
+ });
dojo.extend(dojo.NodeList, {
+ _normalize: function(/*String||Element||Object||NodeList*/content, /*DOMNode?*/refNode){
+ // summary:
+ // normalizes data to an array of items to insert.
+ // description:
+ // If content is an object, it can have special properties "template" and
+ // "parse". If "template" is defined, then the template value is run through
+ // dojo.string.substitute (if dojo.string.substitute has been dojo.required elsewhere),
+ // or if templateFunc is a function on the content, that function will be used to
+ // transform the template into a final string to be used for for passing to dojo._toDom.
+ // If content.parse is true, then it is remembered for later, for when the content
+ // nodes are inserted into the DOM. At that point, the nodes will be parsed for widgets
+ // (if dojo.parser has been dojo.required elsewhere).
+
+ //Wanted to just use a DocumentFragment, but for the array/NodeList
+ //case that meant using cloneNode, but we may not want that.
+ //Cloning should only happen if the node operations span
+ //multiple refNodes. Also, need a real array, not a NodeList from the
+ //DOM since the node movements could change those NodeLists.
+
+ var parse = content.parse === true ? true : false;
+
+ //Do we have an object that needs to be run through a template?
+ if(typeof content.template == "string"){
+ var templateFunc = content.templateFunc || (dojo.string && dojo.string.substitute);
+ content = templateFunc ? templateFunc(content.template, content) : content;
+ }
+
+ var type = (typeof content);
+ if(type == "string" || type == "number"){
+ content = dojo._toDom(content, (refNode && refNode.ownerDocument));
+ if(content.nodeType == 11){
+ //DocumentFragment. It cannot handle cloneNode calls, so pull out the children.
+ content = dojo._toArray(content.childNodes);
+ }else{
+ content = [content];
+ }
+ }else if(!dojo.isArrayLike(content)){
+ content = [content];
+ }else if(!dojo.isArray(content)){
+ //To get to this point, content is array-like, but
+ //not an array, which likely means a DOM NodeList. Convert it now.
+ content = dojo._toArray(content);
+ }
+
+ //Pass around the parse info
+ if(parse){
+ content._runParse = true;
+ }
+ return content; //Array
+ },
+
+ _cloneNode: function(/*DOMNode*/ node){
+ // summary:
+ // private utiltity to clone a node. Not very interesting in the vanilla
+ // dojo.NodeList case, but delegates could do interesting things like
+ // clone event handlers if that is derivable from the node.
+ return node.cloneNode(true);
+ },
+
+ _place: function(/*Array*/ary, /*DOMNode*/refNode, /*String*/position, /*Boolean*/useClone){
+ // summary:
+ // private utility to handle placing an array of nodes relative to another node.
+ // description:
+ // Allows for cloning the nodes in the array, and for
+ // optionally parsing widgets, if ary._runParse is true.
+
+ //Avoid a disallowed operation if trying to do an innerHTML on a non-element node.
+ if(refNode.nodeType != 1 && position == "only"){
+ return;
+ }
+ var rNode = refNode, tempNode;
+
+ //Always cycle backwards in case the array is really a
+ //DOM NodeList and the DOM operations take it out of the live collection.
+ var length = ary.length;
+ for(var i = length - 1; i >= 0; i--){
+ var node = (useClone ? this._cloneNode(ary[i]) : ary[i]);
+
+ //If need widget parsing, use a temp node, instead of waiting after inserting into
+ //real DOM because we need to start widget parsing at one node up from current node,
+ //which could cause some already parsed widgets to be parsed again.
+ if(ary._runParse && dojo.parser && dojo.parser.parse){
+ if(!tempNode){
+ tempNode = rNode.ownerDocument.createElement("div");
+ }
+ tempNode.appendChild(node);
+ dojo.parser.parse(tempNode);
+ node = tempNode.firstChild;
+ while(tempNode.firstChild){
+ tempNode.removeChild(tempNode.firstChild);
+ }
+ }
+
+ if(i == length - 1){
+ dojo.place(node, rNode, position);
+ }else{
+ rNode.parentNode.insertBefore(node, rNode);
+ }
+ rNode = node;
+ }
+ },
+
+ _stash: function(parent){
+ // summary:
+ // private function to hold to a parent NodeList. end() to return the parent NodeList.
+ //
+ // example:
+ // How to make a `dojo.NodeList` method that only returns the third node in
+ // the dojo.NodeList but allows access to the original NodeList by using this._stash:
+ // | dojo.extend(dojo.NodeList, {
+ // | third: function(){
+ // | var newNodeList = dojo.NodeList(this[2]);
+ // | return newNodeList._stash(this);
+ // | }
+ // | });
+ // | // then see how _stash applies a sub-list, to be .end()'ed out of
+ // | dojo.query(".foo")
+ // | .third()
+ // | .addClass("thirdFoo")
+ // | .end()
+ // | // access to the orig .foo list
+ // | .removeClass("foo")
+ // |
+ //
+ this._parent = parent;
+ return this; //dojo.NodeList
+ },
+
+ end: function(){
+ // summary:
+ // Ends use of the current `dojo.NodeList` by returning the previous dojo.NodeList
+ // that generated the current dojo.NodeList.
+ // description:
+ // Returns the `dojo.NodeList` that generated the current `dojo.NodeList`. If there
+ // is no parent dojo.NodeList, an empty dojo.NodeList is returned.
+ // example:
+ // | dojo.query("a")
+ // | .filter(".disabled")
+ // | // operate on the anchors that only have a disabled class
+ // | .style("color", "grey")
+ // | .end()
+ // | // jump back to the list of anchors
+ // | .style(...)
+ //
+ if(this._parent){
+ return this._parent;
+ }else{
+ //Just return empy list.
+ return new this._NodeListCtor();
+ }
+ },
+
// http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array#Methods
// FIXME: handle return values for #3244
// http://trac.dojotoolkit.org/ticket/3244
-
+
// FIXME:
// need to wrap or implement:
// join (perhaps w/ innerHTML/outerHTML overload for toString() of items?)
// reduce
// reduceRight
- slice: function(/*===== begin, end =====*/){
+ /*=====
+ slice: function(begin, end){
// summary:
// Returns a new NodeList, maintaining this one in place
// description:
// This method behaves exactly like the Array.slice method
// with the caveat that it returns a dojo.NodeList and not a
- // raw Array. For more details, see:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:slice
+ // raw Array. For more details, see Mozilla's (slice
+ // documentation)[http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:slice]
// begin: Integer
// Can be a positive or negative integer, with positive
// integers noting the offset to begin at, and negative
// integers denoting an offset from the end (i.e., to the left
// of the end)
// end: Integer?
// Optional parameter to describe what position relative to
// the NodeList's zero index to end the slice at. Like begin,
// can be positive or negative.
- var a = dojo._toArray(arguments);
- return tnl(a.slice.apply(this, a));
+ return this._wrap(a.slice.apply(this, arguments));
},
- splice: function(/*===== index, howmany, item =====*/){
+ splice: function(index, howmany, item){
// summary:
// Returns a new NodeList, manipulating this NodeList based on
// the arguments passed, potentially splicing in new elements
// at an offset, optionally deleting elements
// description:
// This method behaves exactly like the Array.splice method
// with the caveat that it returns a dojo.NodeList and not a
- // raw Array. For more details, see:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:splice
+ // raw Array. For more details, see Mozilla's (splice
+ // documentation)[http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:splice]
+ // For backwards compatibility, calling .end() on the spliced NodeList
+ // does not return the original NodeList -- splice alters the NodeList in place.
// index: Integer
// begin can be a positive or negative integer, with positive
// integers noting the offset to begin at, and negative
// integers denoting an offset from the end (i.e., to the left
// of the end)
// howmany: Integer?
// Optional parameter to describe what position relative to
// the NodeList's zero index to end the slice at. Like begin,
// can be positive or negative.
// item: Object...?
// Any number of optional parameters may be passed in to be
// spliced into the NodeList
// returns:
// dojo.NodeList
- var a = dojo._toArray(arguments);
- return tnl(a.splice.apply(this, a));
+ return this._wrap(a.splice.apply(this, arguments));
},
- concat: function(/*===== item =====*/){
- // summary:
- // Returns a new NodeList comprised of items in this NodeList
- // as well as items passed in as parameters
- // description:
- // This method behaves exactly like the Array.concat method
- // with the caveat that it returns a dojo.NodeList and not a
- // raw Array. For more details, see:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:concat
- // item: Object...?
- // Any number of optional parameters may be passed in to be
- // spliced into the NodeList
- // returns:
- // dojo.NodeList
- var a = dojo._toArray(arguments, 0, [this]);
- return tnl(a.concat.apply([], a));
- },
-
- indexOf: function(/*Object*/ value, /*Integer?*/ fromIndex){
+ indexOf: function(value, fromIndex){
// summary:
// see dojo.indexOf(). The primary difference is that the acted-on
// array is implicitly this NodeList
- // value:
+ // value: Object:
// The value to search for.
- // fromIndex:
+ // fromIndex: Integer?:
// The loction to start searching from. Optional. Defaults to 0.
// description:
- // For more details on the behavior of indexOf, see:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:indexOf
+ // For more details on the behavior of indexOf, see Mozilla's
+ // (indexOf
+ // docs)[http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:indexOf]
// returns:
// Positive Integer or 0 for a match, -1 of not found.
return d.indexOf(this, value, fromIndex); // Integer
},
- lastIndexOf: function(/*===== value, fromIndex =====*/){
+ lastIndexOf: function(value, fromIndex){
// summary:
// see dojo.lastIndexOf(). The primary difference is that the
// acted-on array is implicitly this NodeList
// description:
- // For more details on the behavior of lastIndexOf, see:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:lastIndexOf
+ // For more details on the behavior of lastIndexOf, see
+ // Mozilla's (lastIndexOf
+ // docs)[http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:lastIndexOf]
// value: Object
// The value to search for.
// fromIndex: Integer?
// The loction to start searching from. Optional. Defaults to 0.
// returns:
// Positive Integer or 0 for a match, -1 of not found.
- return d.lastIndexOf.apply(d, d._toArray(arguments, 0, [this])); // Integer
+ return d.lastIndexOf(this, value, fromIndex); // Integer
},
- every: function(/*Function*/callback, /*Object?*/thisObject){
+ every: function(callback, thisObject){
// summary:
- // see dojo.every() and:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:every
+ // see `dojo.every()` and the (Array.every
+ // docs)[http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:every].
// Takes the same structure of arguments and returns as
// dojo.every() with the caveat that the passed array is
// implicitly this NodeList
+ // callback: Function: the callback
+ // thisObject: Object?: the context
return d.every(this, callback, thisObject); // Boolean
},
- some: function(/*Function*/callback, /*Object?*/thisObject){
+ some: function(callback, thisObject){
// summary:
- // see dojo.some() and:
- // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:some
// Takes the same structure of arguments and returns as
- // dojo.some() with the caveat that the passed array is
- // implicitly this NodeList
+ // `dojo.some()` with the caveat that the passed array is
+ // implicitly this NodeList. See `dojo.some()` and Mozilla's
+ // (Array.some
+ // documentation)[http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:some].
+ // callback: Function: the callback
+ // thisObject: Object?: the context
return d.some(this, callback, thisObject); // Boolean
},
+ =====*/
+
+ concat: function(item){
+ // summary:
+ // Returns a new NodeList comprised of items in this NodeList
+ // as well as items passed in as parameters
+ // description:
+ // This method behaves exactly like the Array.concat method
+ // with the caveat that it returns a `dojo.NodeList` and not a
+ // raw Array. For more details, see the (Array.concat
+ // docs)[http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:concat]
+ // item: Object?
+ // Any number of optional parameters may be passed in to be
+ // spliced into the NodeList
+ // returns:
+ // dojo.NodeList
+
+ //return this._wrap(apc.apply(this, arguments));
+ // the line above won't work for the native NodeList :-(
+
+ // implementation notes:
+ // 1) Native NodeList is not an array, and cannot be used directly
+ // in concat() --- the latter doesn't recognize it as an array, and
+ // does not inline it, but append as a single entity.
+ // 2) On some browsers (e.g., Safari) the "constructor" property is
+ // read-only and cannot be changed. So we have to test for both
+ // native NodeList and dojo.NodeList in this property to recognize
+ // the node list.
+
+ var t = d.isArray(this) ? this : aps.call(this, 0),
+ m = d.map(arguments, function(a){
+ return a && !d.isArray(a) &&
+ (typeof NodeList != "undefined" && a.constructor === NodeList || a.constructor === this._NodeListCtor) ?
+ aps.call(a, 0) : a;
+ });
+ return this._wrap(apc.apply(t, m), this); // dojo.NodeList
+ },
map: function(/*Function*/ func, /*Function?*/ obj){
// summary:
// see dojo.map(). The primary difference is that the acted-on
// array is implicitly this NodeList and the return is a
// dojo.NodeList (a subclass of Array)
-
- return d.map(this, func, obj, d.NodeList); // dojo.NodeList
+ ///return d.map(this, func, obj, d.NodeList); // dojo.NodeList
+ return this._wrap(d.map(this, func, obj), this); // dojo.NodeList
},
forEach: function(callback, thisObj){
// summary:
- // see dojo.forEach(). The primary difference is that the acted-on
- // array is implicitly this NodeList
-
+ // see `dojo.forEach()`. The primary difference is that the acted-on
+ // array is implicitly this NodeList. If you want the option to break out
+ // of the forEach loop, use every() or some() instead.
d.forEach(this, callback, thisObj);
- return this; // dojo.NodeList non-standard return to allow easier chaining
+ // non-standard return to allow easier chaining
+ return this; // dojo.NodeList
},
- // custom methods
-
+ /*=====
coords: function(){
// summary:
- // Returns the box objects all elements in a node list as
- // an Array (*not* a NodeList)
-
- return d.map(this, d.coords);
+ // Returns the box objects of all elements in a node list as
+ // an Array (*not* a NodeList). Acts like `dojo.coords`, though assumes
+ // the node passed is each node in this list.
+
+ return d.map(this, d.coords); // Array
+ },
+
+ position: function(){
+ // summary:
+ // Returns border-box objects (x/y/w/h) of all elements in a node list
+ // as an Array (*not* a NodeList). Acts like `dojo.position`, though
+ // assumes the node passed is each node in this list.
+
+ return d.map(this, d.position); // Array
},
- style: function(/*===== property, value =====*/){
+ attr: function(property, value){
+ // summary:
+ // gets or sets the DOM attribute for every element in the
+ // NodeList. See also `dojo.attr`
+ // property: String
+ // the attribute to get/set
+ // value: String?
+ // optional. The value to set the property to
+ // returns:
+ // if no value is passed, the result is an array of attribute values
+ // If a value is passed, the return is this NodeList
+ // example:
+ // Make all nodes with a particular class focusabl:
+ // | dojo.query(".focusable").attr("tabIndex", -1);
+ // example:
+ // Disable a group of buttons:
+ // | dojo.query("button.group").attr("disalbed", true);
+ // example:
+ // innerHTML can be assigned or retreived as well:
+ // | // get the innerHTML (as an array) for each list item
+ // | var ih = dojo.query("li.replaceable").attr("innerHTML");
+ return; // dojo.NodeList
+ return; // Array
+ },
+
+ style: function(property, value){
// summary:
// gets or sets the CSS property for every element in the NodeList
// property: String
// the CSS property to get/set, in JavaScript notation
- // ("lineHieght" instead of "line-height")
+ // ("lineHieght" instead of "line-height")
// value: String?
// optional. The value to set the property to
- // return:
+ // returns:
// if no value is passed, the result is an array of strings.
// If a value is passed, the return is this NodeList
- var aa = d._toArray(arguments, 0, [null]);
- var s = this.map(function(i){
- aa[0] = i;
- return d.style.apply(d, aa);
- });
- return (arguments.length > 1) ? this : s; // String||dojo.NodeList
+ return; // dojo.NodeList
+ return; // Array
+ },
+
+ addClass: function(className){
+ // summary:
+ // adds the specified class to every node in the list
+ // className: String|Array
+ // A String class name to add, or several space-separated class names,
+ // or an array of class names.
+ return; // dojo.NodeList
},
- styles: function(/*===== property, value =====*/){
+ removeClass: function(className){
+ // summary:
+ // removes the specified class from every node in the list
+ // className: String|Array?
+ // An optional String class name to remove, or several space-separated
+ // class names, or an array of class names. If omitted, all class names
+ // will be deleted.
+ // returns:
+ // dojo.NodeList, this list
+ return; // dojo.NodeList
+ },
+
+ toggleClass: function(className, condition){
+ // summary:
+ // Adds a class to node if not present, or removes if present.
+ // Pass a boolean condition if you want to explicitly add or remove.
+ // condition: Boolean?
+ // If passed, true means to add the class, false means to remove.
+ // className: String
+ // the CSS class to add
+ return; // dojo.NodeList
+ },
+
+ connect: function(methodName, objOrFunc, funcName){
// summary:
- // Deprecated. Use NodeList.style instead. Will be removed in
- // Dojo 1.1. Gets or sets the CSS property for every element
- // in the NodeList
- // property: String
- // the CSS property to get/set, in JavaScript notation
- // ("lineHieght" instead of "line-height")
- // value: String?
- // optional. The value to set the property to
- // return:
- // if no value is passed, the result is an array of strings.
- // If a value is passed, the return is this NodeList
- d.deprecated("NodeList.styles", "use NodeList.style instead", "1.1");
- return this.style.apply(this, arguments);
+ // attach event handlers to every item of the NodeList. Uses dojo.connect()
+ // so event properties are normalized
+ // methodName: String
+ // the name of the method to attach to. For DOM events, this should be
+ // the lower-case name of the event
+ // objOrFunc: Object|Function|String
+ // if 2 arguments are passed (methodName, objOrFunc), objOrFunc should
+ // reference a function or be the name of the function in the global
+ // namespace to attach. If 3 arguments are provided
+ // (methodName, objOrFunc, funcName), objOrFunc must be the scope to
+ // locate the bound function in
+ // funcName: String?
+ // optional. A string naming the function in objOrFunc to bind to the
+ // event. May also be a function reference.
+ // example:
+ // add an onclick handler to every button on the page
+ // | dojo.query("div:nth-child(odd)").connect("onclick", function(e){
+ // | console.log("clicked!");
+ // | });
+ // example:
+ // attach foo.bar() to every odd div's onmouseover
+ // | dojo.query("div:nth-child(odd)").connect("onmouseover", foo, "bar");
},
- addClass: function(/*String*/ className){
- // summary:
- // adds the specified class to every node in the list
- //
- this.forEach(function(i){ d.addClass(i, className); });
- return this;
+ empty: function(){
+ // summary:
+ // clears all content from each node in the list. Effectively
+ // equivalent to removing all child nodes from every item in
+ // the list.
+ return this.forEach("item.innerHTML='';"); // dojo.NodeList
+ // FIXME: should we be checking for and/or disposing of widgets below these nodes?
},
-
- removeClass: function(/*String*/ className){
- this.forEach(function(i){ d.removeClass(i, className); });
- return this;
+ =====*/
+
+ // useful html methods
+ coords: adaptAsMap(d.coords),
+ position: adaptAsMap(d.position),
+
+ // FIXME: connectPublisher()? connectRunOnce()?
+
+ /*
+ destroy: function(){
+ // summary:
+ // destroys every item in the list.
+ this.forEach(d.destroy);
+ // FIXME: should we be checking for and/or disposing of widgets below these nodes?
},
-
- // FIXME: toggleClass()? connectPublisher()? connectRunOnce()?
+ */
place: function(/*String||Node*/ queryOrNode, /*String*/ position){
// summary:
// places elements of this node list relative to the first element matched
- // by queryOrNode. Returns the original NodeList.
+ // by queryOrNode. Returns the original NodeList. See: `dojo.place`
// queryOrNode:
// may be a string representing any valid CSS3 selector or a DOM node.
// In the selector case, only the first matching element will be used
// for relative positioning.
// position:
// can be one of:
- // "last"||"end" (default)
- // "first||"start"
- // "before"
- // "after"
+ // | "last" (default)
+ // | "first"
+ // | "before"
+ // | "after"
+ // | "only"
+ // | "replace"
// or an offset in the childNodes property
var item = d.query(queryOrNode)[0];
- position = position||"last";
-
- for(var x=0; x<this.length; x++){
- d.place(this[x], item, position);
- }
- return this; // dojo.NodeList
- },
-
- connect: function(/*String*/ methodName, /*Object||Function||String*/ objOrFunc, /*String?*/ funcName){
- // summary:
- // attach event handlers to every item of the NodeList. Uses dojo.connect()
- // so event properties are normalized
- // methodName:
- // the name of the method to attach to. For DOM events, this should be
- // the lower-case name of the event
- // objOrFunc:
- // if 2 arguments are passed (methodName, objOrFunc), objOrFunc should
- // reference a function or be the name of the function in the global
- // namespace to attach. If 3 arguments are provided
- // (methodName, objOrFunc, funcName), objOrFunc must be the scope to
- // locate the bound function in
- // funcName:
- // optional. A string naming the function in objOrFunc to bind to the
- // event. May also be a function reference.
- // example:
- // add an onclick handler to every button on the page
- // | dojo.query("onclick", function(e){
- // | console.debug("clicked!");
- // | });
- // example:
- // attach foo.bar() to every odd div's onmouseover
- // | dojo.query("div:nth-child(odd)").onclick("onmouseover", foo, "bar");
- this.forEach(function(item){
- d.connect(item, methodName, objOrFunc, funcName);
- });
- return this; // dojo.NodeList
+ return this.forEach(function(node){ d.place(node, item, position); }); // dojo.NodeList
},
orphan: function(/*String?*/ simpleFilter){
// summary:
- // removes elements in this list that match the simple
- // filter from their parents and returns them as a new
- // NodeList.
- // simpleFilter: single-expression CSS filter
- // return: a dojo.NodeList of all of the elements orpahned
- var orphans = (simpleFilter) ? d._filterQueryResult(this, simpleFilter) : this;
- orphans.forEach(function(item){
- if(item["parentNode"]){
- item.parentNode.removeChild(item);
- }
- });
- return orphans; // dojo.NodeList
+ // removes elements in this list that match the simple filter
+ // from their parents and returns them as a new NodeList.
+ // simpleFilter:
+ // single-expression CSS rule. For example, ".thinger" or
+ // "#someId[attrName='value']" but not "div > span". In short,
+ // anything which does not invoke a descent to evaluate but
+ // can instead be used to test a single node is acceptable.
+ // returns:
+ // `dojo.NodeList` containing the orpahned elements
+ return (simpleFilter ? d._filterQueryResult(this, simpleFilter) : this).forEach(orphan); // dojo.NodeList
},
adopt: function(/*String||Array||DomNode*/ queryOrListOrNode, /*String?*/ position){
// summary:
// places any/all elements in queryOrListOrNode at a
// position relative to the first element in this list.
// Returns a dojo.NodeList of the adopted elements.
// queryOrListOrNode:
// a DOM node or a query string or a query result.
// Represents the nodes to be adopted relative to the
// first element of this NodeList.
// position:
- // optional. One of:
- // "last"||"end" (default)
- // "first||"start"
- // "before"
- // "after"
+ // can be one of:
+ // | "last" (default)
+ // | "first"
+ // | "before"
+ // | "after"
+ // | "only"
+ // | "replace"
// or an offset in the childNodes property
- var item = this[0];
- return d.query(queryOrListOrNode).forEach(function(ai){ d.place(ai, item, (position||"last")); }); // dojo.NodeList
+ return d.query(queryOrListOrNode).place(this[0], position)._stash(this); // dojo.NodeList
},
// FIXME: do we need this?
query: function(/*String*/ queryStr){
// summary:
- // Returns a new, flattened NodeList. Elements of the new list
- // satisfy the passed query but use elements of the
- // current NodeList as query roots.
-
- queryStr = queryStr||"";
+ // Returns a new list whose memebers match the passed query,
+ // assuming elements of the current NodeList as the root for
+ // each search.
+ // example:
+ // assume a DOM created by this markup:
+ // | <div id="foo">
+ // | <p>
+ // | bacon is tasty, <span>dontcha think?</span>
+ // | </p>
+ // | </div>
+ // | <div id="bar">
+ // | <p>great commedians may not be funny <span>in person</span></p>
+ // | </div>
+ // If we are presented with the following defintion for a NodeList:
+ // | var l = new dojo.NodeList(dojo.byId("foo"), dojo.byId("bar"));
+ // it's possible to find all span elements under paragraphs
+ // contained by these elements with this sub-query:
+ // | var spans = l.query("p span");
// FIXME: probably slow
- var ret = d.NodeList();
- this.forEach(function(item){
- d.query(queryStr, item).forEach(function(subItem){
- if(typeof subItem != "undefined"){
- ret.push(subItem);
- }
- });
+ if(!queryStr){ return this; }
+ var ret = this.map(function(node){
+ // FIXME: why would we ever get undefined here?
+ return d.query(queryStr, node).filter(function(subNode){ return subNode !== undefined; });
});
- return ret; // dojo.NodeList
+ return this._wrap(apc.apply([], ret), this); // dojo.NodeList
},
- filter: function(/*String*/ simpleQuery){
+ filter: function(/*String|Function*/ simpleFilter){
// summary:
- // "masks" the built-in javascript filter() method to support
- // passing a simple string filter in addition to supporting
- // filtering function objects.
+ // "masks" the built-in javascript filter() method (supported
+ // in Dojo via `dojo.filter`) to support passing a simple
+ // string filter in addition to supporting filtering function
+ // objects.
+ // simpleFilter:
+ // If a string, a single-expression CSS rule. For example,
+ // ".thinger" or "#someId[attrName='value']" but not "div >
+ // span". In short, anything which does not invoke a descent
+ // to evaluate but can instead be used to test a single node
+ // is acceptable.
// example:
// "regular" JS filter syntax as exposed in dojo.filter:
// | dojo.query("*").filter(function(item){
// | // highlight every paragraph
// | return (item.nodeName == "p");
- // | }).styles("backgroundColor", "yellow");
+ // | }).style("backgroundColor", "yellow");
// example:
// the same filtering using a CSS selector
// | dojo.query("*").filter("p").styles("backgroundColor", "yellow");
- var items = this;
- var _a = arguments;
- var r = d.NodeList();
- var rp = function(t){
- if(typeof t != "undefined"){
- r.push(t);
- }
- }
- if(d.isString(simpleQuery)){
- items = d._filterQueryResult(this, _a[0]);
- if(_a.length == 1){
+ var a = arguments, items = this, start = 0;
+ if(typeof simpleFilter == "string"){ // inline'd type check
+ items = d._filterQueryResult(this, a[0]);
+ if(a.length == 1){
// if we only got a string query, pass back the filtered results
- return items; // dojo.NodeList
+ return items._stash(this); // dojo.NodeList
}
// if we got a callback, run it over the filtered items
- d.forEach(d.filter(items, _a[1], _a[2]), rp);
- return r; // dojo.NodeList
- }
- // handle the (callback, [thisObject]) case
- d.forEach(d.filter(items, _a[0], _a[1]), rp);
- return r; // dojo.NodeList
-
+ start = 1;
+ }
+ return this._wrap(d.filter(items, a[start], a[start + 1]), this); // dojo.NodeList
},
-
+
/*
// FIXME: should this be "copyTo" and include parenting info?
clone: function(){
// summary:
// creates node clones of each element of this list
// and returns a new list containing the clones
},
*/
- addContent: function(/*String*/ content, /*String||Integer?*/ position){
+ addContent: function(/*String||DomNode||Object||dojo.NodeList*/ content, /*String||Integer?*/ position){
// summary:
- // add a node or some HTML as a string to every item in the list.
- // Returns the original list.
+ // add a node, NodeList or some HTML as a string to every item in the
+ // list. Returns the original list.
+ // description:
+ // a copy of the HTML content is added to each item in the
+ // list, with an optional position argument. If no position
+ // argument is provided, the content is appended to the end of
+ // each item.
// content:
- // the HTML in string format to add at position to every item
+ // DOM node, HTML in string format, a NodeList or an Object. If a DOM node or
+ // NodeList, the content will be cloned if the current NodeList has more than one
+ // element. Only the DOM nodes are cloned, no event handlers. If it is an Object,
+ // it should be an object with at "template" String property that has the HTML string
+ // to insert. If dojo.string has already been dojo.required, then dojo.string.substitute
+ // will be used on the "template" to generate the final HTML string. Other allowed
+ // properties on the object are: "parse" if the HTML
+ // string should be parsed for widgets (dojo.require("dojo.parser") to get that
+ // option to work), and "templateFunc" if a template function besides dojo.string.substitute
+ // should be used to transform the "template".
// position:
- // One of:
- // "last"||"end" (default)
- // "first||"start"
- // "before"
- // "after"
- // or an integer offset in the childNodes property
- var ta = d.doc.createElement("span");
- if(d.isString(content)){
- ta.innerHTML = content;
- }else{
- ta.appendChild(content);
- }
- var ct = ((position == "first")||(position == "after")) ? "lastChild" : "firstChild";
- this.forEach(function(item){
- var tn = ta.cloneNode(true);
- while(tn[ct]){
- d.place(tn[ct], item, position);
- }
- });
- return this; // dojo.NodeList
- }
+ // can be one of:
+ // | "last"||"end" (default)
+ // | "first||"start"
+ // | "before"
+ // | "after"
+ // | "replace" (replaces nodes in this NodeList with new content)
+ // | "only" (removes other children of the nodes so new content is hte only child)
+ // or an offset in the childNodes property
+ // example:
+ // appends content to the end if the position is ommitted
+ // | dojo.query("h3 > p").addContent("hey there!");
+ // example:
+ // add something to the front of each element that has a
+ // "thinger" property:
+ // | dojo.query("[thinger]").addContent("...", "first");
+ // example:
+ // adds a header before each element of the list
+ // | dojo.query(".note").addContent("<h4>NOTE:</h4>", "before");
+ // example:
+ // add a clone of a DOM node to the end of every element in
+ // the list, removing it from its existing parent.
+ // | dojo.query(".note").addContent(dojo.byId("foo"));
+ // example:
+ // Append nodes from a templatized string.
+ // dojo.require("dojo.string");
+ // dojo.query(".note").addContent({
+ // template: '<b>${id}: </b><span>${name}</span>',
+ // id: "user332",
+ // name: "Mr. Anderson"
+ // });
+ // example:
+ // Append nodes from a templatized string that also has widgets parsed.
+ // dojo.require("dojo.string");
+ // dojo.require("dojo.parser");
+ // var notes = dojo.query(".note").addContent({
+ // template: '<button dojoType="dijit.form.Button">${text}</button>',
+ // parse: true,
+ // text: "Send"
+ // });
+ content = this._normalize(content, this[0]);
+ for(var i = 0, node; node = this[i]; i++){
+ this._place(content, node, position, i > 0);
+ }
+ return this; //dojo.NodeList
+ },
+
+ instantiate: function(/*String|Object*/ declaredClass, /*Object?*/ properties){
+ // summary:
+ // Create a new instance of a specified class, using the
+ // specified properties and each node in the nodeList as a
+ // srcNodeRef.
+ // example:
+ // Grabs all buttons in the page and converts them to diji.form.Buttons.
+ // | var buttons = dojo.query("button").instantiate("dijit.form.Button", {showLabel: true});
+ var c = d.isFunction(declaredClass) ? declaredClass : d.getObject(declaredClass);
+ properties = properties || {};
+ return this.forEach(function(node){
+ new c(properties, node);
+ }); // dojo.NodeList
+ },
+
+ at: function(/*===== index =====*/){
+ // summary:
+ // Returns a new NodeList comprised of items in this NodeList
+ // at the given index or indices.
+ // index: Integer...
+ // One or more 0-based indices of items in the current
+ // NodeList.
+ // returns:
+ // dojo.NodeList
+ var t = new this._NodeListCtor();
+ d.forEach(arguments, function(i){ if(this[i]){ t.push(this[i]); }}, this);
+ return t._stash(this); // dojo.NodeList
+ }
+
});
+ nl.events = [
+ // summary: list of all DOM events used in NodeList
+ "blur", "focus", "change", "click", "error", "keydown", "keypress",
+ "keyup", "load", "mousedown", "mouseenter", "mouseleave", "mousemove",
+ "mouseout", "mouseover", "mouseup", "submit"
+ ];
+
// syntactic sugar for DOM events
- d.forEach([
- "blur", "click", "keydown", "keypress", "keyup", "mousedown", "mouseenter",
- "mouseleave", "mousemove", "mouseout", "mouseover", "mouseup"
- ], function(evt){
+ d.forEach(nl.events, function(evt){
var _oe = "on"+evt;
- dojo.NodeList.prototype[_oe] = function(a, b){
+ nlp[_oe] = function(a, b){
return this.connect(_oe, a, b);
}
// FIXME: should these events trigger publishes?
/*
- return (a ? this.connect(_oe, a, b) :
- this.forEach(function(n){
+ return (a ? this.connect(_oe, a, b) :
+ this.forEach(function(n){
// FIXME:
// listeners get buried by
// addEventListener and can't be dug back
// out to be triggered externally.
// see:
// http://developer.mozilla.org/en/docs/DOM:element
- console.debug(n, evt, _oe);
+ console.log(n, evt, _oe);
// FIXME: need synthetic event support!
var _e = { target: n, faux: true, type: evt };
// dojo._event_listener._synthesizeEvent({}, { target: n, faux: true, type: evt });
- try{ n[evt](_e); }catch(e){ console.debug(e); }
- try{ n[_oe](_e); }catch(e){ console.debug(e); }
+ try{ n[evt](_e); }catch(e){ console.log(e); }
+ try{ n[_oe](_e); }catch(e){ console.log(e); }
})
);
- }
- */
+ */
}
);
})();
}
if(!dojo._hasResource["dojo._base.query"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo._base.query"] = true;
-dojo.provide("dojo._base.query");
-
+if(typeof dojo != "undefined"){
+ dojo.provide("dojo._base.query");
+
+
+
+}
/*
dojo.query() architectural overview:
dojo.query is a relatively full-featured CSS3 query library. It is
designed to take any valid CSS3 selector and return the nodes matching
the selector. To do this quickly, it processes queries in several
steps, applying caching where profitable.
The steps (roughly in reverse order of the way they appear in the code):
1.) check to see if we already have a "query dispatcher"
- if so, use that with the given parameterization. Skip to step 4.
2.) attempt to determine which branch to dispatch the query to:
- JS (optimized DOM iteration)
- - xpath (for browsers that support it and where it's fast)
- - native (not available in any browser yet)
+ - native (FF3.1+, Safari 3.1+, IE 8+)
3.) tokenize and convert to executable "query dispatcher"
- this is where the lion's share of the complexity in the
system lies. In the DOM version, the query dispatcher is
assembled as a chain of "yes/no" test functions pertaining to
a section of a simple query statement (".blah:nth-child(odd)"
but not "div div", which is 2 simple statements). Individual
statement dispatchers are cached (to prevent re-definition)
as are entire dispatch chains (to make re-execution of the
same query fast)
- - in the xpath path, tokenization yeilds a concatenation of
- parameterized xpath selectors. As with the DOM version, both
- simple selector blocks and overall evaluators are cached to
- prevent re-defintion
- 4.) the resulting query dispatcher is called in the passed scope (by default the top-level document)
+ 4.) the resulting query dispatcher is called in the passed scope
+ (by default the top-level document)
- for DOM queries, this results in a recursive, top-down
evaluation of nodes based on each simple query section
- - xpath queries can, thankfully, be executed in one shot
- 5.) matched nodes are pruned to ensure they are unique
+ - for native implementations, this may mean working around spec
+ bugs. So be it.
+ 5.) matched nodes are pruned to ensure they are unique (if necessary)
*/
-;(function(){
+;(function(d){
// define everything in a closure for compressability reasons. "d" is an
- // alias to "dojo" since it's so frequently used. This seems a
- // transformation that the build system could perform on a per-file basis.
+ // alias to "dojo" (or the toolkit alias object, e.g., "acme").
+
+ ////////////////////////////////////////////////////////////////////////
+ // Toolkit aliases
+ ////////////////////////////////////////////////////////////////////////
+
+ // if you are extracing dojo.query for use in your own system, you will
+ // need to provide these methods and properties. No other porting should be
+ // necessary, save for configuring the system to use a class other than
+ // dojo.NodeList as the return instance instantiator
+ var trim = d.trim;
+ var each = d.forEach;
+ // d.isIE; // float
+ // d.isSafari; // float
+ // d.isOpera; // float
+ // d.isWebKit; // float
+ // d.doc ; // document element
+ var qlc = d._NodeListCtor = d.NodeList;
+
+ var getDoc = function(){ return d.doc; };
+ // NOTE(alex): the spec is idiotic. CSS queries should ALWAYS be case-sensitive, but nooooooo
+ var cssCaseBug = ((d.isWebKit||d.isMozilla) && ((getDoc().compatMode) == "BackCompat"));
////////////////////////////////////////////////////////////////////////
- // Utility code
+ // Global utilities
////////////////////////////////////////////////////////////////////////
- var d = dojo;
- var childNodesName = dojo.isIE ? "children" : "childNodes";
+
+ // on browsers that support the "children" collection we can avoid a lot of
+ // iteration on chaff (non-element) nodes.
+ // why.
+ var childNodesName = !!getDoc().firstChild["children"] ? "children" : "childNodes";
+
+ var specials = ">~+";
+
+ // global thunk to determine whether we should treat the current query as
+ // case sensitive or not. This switch is flipped by the query evaluator
+ // based on the document passed as the context to search.
+ var caseSensitive = false;
+
+ // how high?
+ var yesman = function(){ return true; };
+
+ ////////////////////////////////////////////////////////////////////////
+ // Tokenizer
+ ////////////////////////////////////////////////////////////////////////
var getQueryParts = function(query){
- // summary: state machine for query tokenization
- if(query.charAt(query.length-1) == ">"){
- query += " *"
- }
- query += " "; // ensure that we terminate the state machine
-
- var ts = function(s, e){
- return d.trim(query.slice(s, e));
+ // summary:
+ // state machine for query tokenization
+ // description:
+ // instead of using a brittle and slow regex-based CSS parser,
+ // dojo.query implements an AST-style query representation. This
+ // representation is only generated once per query. For example,
+ // the same query run multiple times or under different root nodes
+ // does not re-parse the selector expression but instead uses the
+ // cached data structure. The state machine implemented here
+ // terminates on the last " " (space) charachter and returns an
+ // ordered array of query component structures (or "parts"). Each
+ // part represents an operator or a simple CSS filtering
+ // expression. The structure for parts is documented in the code
+ // below.
+
+
+ // NOTE:
+ // this code is designed to run fast and compress well. Sacrifices
+ // to readibility and maintainability have been made. Your best
+ // bet when hacking the tokenizer is to put The Donnas on *really*
+ // loud (may we recommend their "Spend The Night" release?) and
+ // just assume you're gonna make mistakes. Keep the unit tests
+ // open and run them frequently. Knowing is half the battle ;-)
+ if(specials.indexOf(query.slice(-1)) >= 0){
+ // if we end with a ">", "+", or "~", that means we're implicitly
+ // searching all children, so make it explicit
+ query += " * "
+ }else{
+ // if you have not provided a terminator, one will be provided for
+ // you...
+ query += " ";
+ }
+
+ var ts = function(/*Integer*/ s, /*Integer*/ e){
+ // trim and slice.
+
+ // take an index to start a string slice from and an end position
+ // and return a trimmed copy of that sub-string
+ return trim(query.slice(s, e));
}
// the overall data graph of the full query, as represented by queryPart objects
- var qparts = [];
+ var queryParts = [];
+
+
// state keeping vars
- var inBrackets = -1;
- var inParens = -1;
- var inMatchFor = -1;
- var inPseudo = -1;
- var inClass = -1;
- var inId = -1;
- var inTag = -1;
- var lc = ""; // the last character
- var cc = ""; // the current character
- var pStart;
+ var inBrackets = -1, inParens = -1, inMatchFor = -1,
+ inPseudo = -1, inClass = -1, inId = -1, inTag = -1,
+ lc = "", cc = "", pStart;
+
// iteration vars
- var x = 0; // index in the query
- var ql = query.length;
- var currentPart = null; // data structure representing the entire clause
- var _cp = null; // the current pseudo or attr matcher
+ var x = 0, // index in the query
+ ql = query.length,
+ currentPart = null, // data structure representing the entire clause
+ _cp = null; // the current pseudo or attr matcher
+
+ // several temporary variables are assigned to this structure durring a
+ // potential sub-expression match:
+ // attr:
+ // a string representing the current full attribute match in a
+ // bracket expression
+ // type:
+ // if there's an operator in a bracket expression, this is
+ // used to keep track of it
+ // value:
+ // the internals of parenthetical expression for a pseudo. for
+ // :nth-child(2n+1), value might be "2n+1"
var endTag = function(){
+ // called when the tokenizer hits the end of a particular tag name.
+ // Re-sets state variables for tag matching and sets up the matcher
+ // to handle the next type of token (tag or operator).
if(inTag >= 0){
- var tv = (inTag == x) ? null : ts(inTag, x).toLowerCase();
- currentPart[ (">~+".indexOf(tv) < 0)? "tag" : "oper" ] = tv;
+ var tv = (inTag == x) ? null : ts(inTag, x); // .toLowerCase();
+ currentPart[ (specials.indexOf(tv) < 0) ? "tag" : "oper" ] = tv;
inTag = -1;
}
}
var endId = function(){
+ // called when the tokenizer might be at the end of an ID portion of a match
if(inId >= 0){
currentPart.id = ts(inId, x).replace(/\\/g, "");
inId = -1;
}
}
var endClass = function(){
+ // called when the tokenizer might be at the end of a class name
+ // match. CSS allows for multiple classes, so we augment the
+ // current item with another class in its list
if(inClass >= 0){
currentPart.classes.push(ts(inClass+1, x).replace(/\\/g, ""));
inClass = -1;
}
}
var endAll = function(){
+ // at the end of a simple fragment, so wall off the matches
endId(); endTag(); endClass();
}
- for(; x<ql, lc=cc, cc=query.charAt(x); x++){
- if(lc == "\\"){ continue; }
- if(!currentPart){
+ var endPart = function(){
+ endAll();
+ if(inPseudo >= 0){
+ currentPart.pseudos.push({ name: ts(inPseudo+1, x) });
+ }
+ // hint to the selector engine to tell it whether or not it
+ // needs to do any iteration. Many simple selectors don't, and
+ // we can avoid significant construction-time work by advising
+ // the system to skip them
+ currentPart.loops = (
+ currentPart.pseudos.length ||
+ currentPart.attrs.length ||
+ currentPart.classes.length );
+
+ currentPart.oquery = currentPart.query = ts(pStart, x); // save the full expression as a string
+
+
+ // otag/tag are hints to suggest to the system whether or not
+ // it's an operator or a tag. We save a copy of otag since the
+ // tag name is cast to upper-case in regular HTML matches. The
+ // system has a global switch to figure out if the current
+ // expression needs to be case sensitive or not and it will use
+ // otag or tag accordingly
+ currentPart.otag = currentPart.tag = (currentPart["oper"]) ? null : (currentPart.tag || "*");
+
+ if(currentPart.tag){
+ // if we're in a case-insensitive HTML doc, we likely want
+ // the toUpperCase when matching on element.tagName. If we
+ // do it here, we can skip the string op per node
+ // comparison
+ currentPart.tag = currentPart.tag.toUpperCase();
+ }
+
+ // add the part to the list
+ if(queryParts.length && (queryParts[queryParts.length-1].oper)){
+ // operators are always infix, so we remove them from the
+ // list and attach them to the next match. The evaluator is
+ // responsible for sorting out how to handle them.
+ currentPart.infixOper = queryParts.pop();
+ currentPart.query = currentPart.infixOper.query + " " + currentPart.query;
+ /*
+ console.debug( "swapping out the infix",
+ currentPart.infixOper,
+ "and attaching it to",
+ currentPart);
+ */
+ }
+ queryParts.push(currentPart);
+
+ currentPart = null;
+ }
+
+ // iterate over the query, charachter by charachter, building up a
+ // list of query part objects
+ for(; lc=cc, cc=query.charAt(x), x < ql; x++){
+ // cc: the current character in the match
+ // lc: the last charachter (if any)
+
+ // someone is trying to escape something, so don't try to match any
+ // fragments. We assume we're inside a literal.
+ if(lc == "\\"){ continue; }
+ if(!currentPart){ // a part was just ended or none has yet been created
// NOTE: I hate all this alloc, but it's shorter than writing tons of if's
pStart = x;
+ // rules describe full CSS sub-expressions, like:
+ // #someId
+ // .className:first-child
+ // but not:
+ // thinger > div.howdy[type=thinger]
+ // the indidual components of the previous query would be
+ // split into 3 parts that would be represented a structure
+ // like:
+ // [
+ // {
+ // query: "thinger",
+ // tag: "thinger",
+ // },
+ // {
+ // query: "div.howdy[type=thinger]",
+ // classes: ["howdy"],
+ // infixOper: {
+ // query: ">",
+ // oper: ">",
+ // }
+ // },
+ // ]
currentPart = {
- query: null,
- pseudos: [],
- attrs: [],
- classes: [],
- tag: null,
- oper: null,
- id: null
+ query: null, // the full text of the part's rule
+ pseudos: [], // CSS supports multiple pseud-class matches in a single rule
+ attrs: [], // CSS supports multi-attribute match, so we need an array
+ classes: [], // class matches may be additive, e.g.: .thinger.blah.howdy
+ tag: null, // only one tag...
+ oper: null, // ...or operator per component. Note that these wind up being exclusive.
+ id: null, // the id component of a rule
+ getTag: function(){
+ return (caseSensitive) ? this.otag : this.tag;
+ }
};
- inTag = x;
+
+ // if we don't have a part, we assume we're going to start at
+ // the beginning of a match, which should be a tag name. This
+ // might fault a little later on, but we detect that and this
+ // iteration will still be fine.
+ inTag = x;
}
if(inBrackets >= 0){
// look for a the close first
- if(cc == "]"){
+ if(cc == "]"){ // if we're in a [...] clause and we end, do assignment
if(!_cp.attr){
+ // no attribute match was previously begun, so we
+ // assume this is an attribute existance match in the
+ // form of [someAttributeName]
_cp.attr = ts(inBrackets+1, x);
}else{
+ // we had an attribute already, so we know that we're
+ // matching some sort of value, as in [attrName=howdy]
_cp.matchFor = ts((inMatchFor||inBrackets+1), x);
}
var cmf = _cp.matchFor;
if(cmf){
+ // try to strip quotes from the matchFor value. We want
+ // [attrName=howdy] to match the same
+ // as [attrName = 'howdy' ]
if( (cmf.charAt(0) == '"') || (cmf.charAt(0) == "'") ){
- _cp.matchFor = cmf.substring(1, cmf.length-1);
+ _cp.matchFor = cmf.slice(1, -1);
}
}
+ // end the attribute by adding it to the list of attributes.
currentPart.attrs.push(_cp);
- _cp = null; // necessaray?
+ _cp = null; // necessary?
inBrackets = inMatchFor = -1;
}else if(cc == "="){
+ // if the last char was an operator prefix, make sure we
+ // record it along with the "=" operator.
var addToCc = ("|~^$*".indexOf(lc) >=0 ) ? lc : "";
_cp.type = addToCc+cc;
_cp.attr = ts(inBrackets+1, x-addToCc.length);
inMatchFor = x+1;
}
// now look for other clause parts
}else if(inParens >= 0){
+ // if we're in a parenthetical expression, we need to figure
+ // out if it's attached to a pseduo-selector rule like
+ // :nth-child(1)
if(cc == ")"){
if(inPseudo >= 0){
_cp.value = ts(inParens+1, x);
}
inPseudo = inParens = -1;
}
}else if(cc == "#"){
+ // start of an ID match
endAll();
inId = x+1;
}else if(cc == "."){
+ // start of a class match
endAll();
inClass = x;
}else if(cc == ":"){
+ // start of a pseudo-selector match
endAll();
inPseudo = x;
}else if(cc == "["){
+ // start of an attribute match.
endAll();
inBrackets = x;
+ // provide a new structure for the attribute match to fill-in
_cp = {
/*=====
attr: null, type: null, matchFor: null
=====*/
};
}else if(cc == "("){
+ // we really only care if we've entered a parenthetical
+ // expression if we're already inside a pseudo-selector match
if(inPseudo >= 0){
+ // provide a new structure for the pseudo match to fill-in
_cp = {
name: ts(inPseudo+1, x),
value: null
}
currentPart.pseudos.push(_cp);
}
inParens = x;
- }else if(cc == " " && lc != cc){
- // note that we expect the string to be " " terminated
- endAll();
- if(inPseudo >= 0){
- currentPart.pseudos.push({ name: ts(inPseudo+1, x) });
- }
- currentPart.hasLoops = (
- currentPart.pseudos.length ||
- currentPart.attrs.length ||
- currentPart.classes.length );
- currentPart.query = ts(pStart, x);
- currentPart.tag = (currentPart["oper"]) ? null : (currentPart.tag || "*");
- qparts.push(currentPart);
- currentPart = null;
- }
- }
- return qparts;
+ }else if(
+ (cc == " ") &&
+ // if it's a space char and the last char is too, consume the
+ // current one without doing more work
+ (lc != cc)
+ ){
+ endPart();
+ }
+ }
+ return queryParts;
};
////////////////////////////////////////////////////////////////////////
- // XPath query code
+ // DOM query infrastructure
////////////////////////////////////////////////////////////////////////
- // this array is a lookup used to generate an attribute matching function.
- // There is a similar lookup/generator list for the DOM branch with similar
- // calling semantics.
- var xPathAttrs = {
- "*=": function(attr, value){
- return "[contains(@"+attr+", '"+ value +"')]";
- },
- "^=": function(attr, value){
- return "[starts-with(@"+attr+", '"+ value +"')]";
- },
- "$=": function(attr, value){
- return "[substring(@"+attr+", string-length(@"+attr+")-"+(value.length-1)+")='"+value+"']";
- },
- "~=": function(attr, value){
- return "[contains(concat(' ',@"+attr+",' '), ' "+ value +" ')]";
- },
- "|=": function(attr, value){
- return "[contains(concat(' ',@"+attr+",' '), ' "+ value +"-')]";
- },
- "=": function(attr, value){
- return "[@"+attr+"='"+ value +"']";
- }
- };
-
- // takes a list of attribute searches, the overall query, a function to
- // generate a default matcher, and a closure-bound method for providing a
- // matching function that generates whatever type of yes/no distinguisher
- // the query method needs. The method is a bit tortured and hard to read
- // because it needs to be used in both the XPath and DOM branches.
- var handleAttrs = function( attrList,
- query,
- getDefault,
- handleMatch){
- d.forEach(query.attrs, function(attr){
- var matcher;
- // type, attr, matchFor
- if(attr.type && attrList[attr.type]){
- matcher = attrList[attr.type](attr.attr, attr.matchFor);
- }else if(attr.attr.length){
- matcher = getDefault(attr.attr);
- }
- if(matcher){ handleMatch(matcher); }
- });
- }
-
- var buildPath = function(query){
- var xpath = ".";
- var qparts = getQueryParts(d.trim(query));
- while(qparts.length){
- var tqp = qparts.shift();
- var prefix;
- // FIXME: need to add support for ~ and +
- if(tqp.oper == ">"){
- prefix = "/";
- // prefix = "/child::node()";
- tqp = qparts.shift();
- }else{
- prefix = "//";
- // prefix = "/descendant::node()"
- }
-
- // get the tag name (if any)
-
- xpath += prefix + tqp.tag;
-
- // check to see if it's got an id. Needs to come first in xpath.
- if(tqp.id){
- xpath += "[@id='"+tqp.id+"'][1]";
- }
-
- d.forEach(tqp.classes, function(cn){
- var cnl = cn.length;
- var padding = " ";
- if(cn.charAt(cnl-1) == "*"){
- padding = ""; cn = cn.substr(0, cnl-1);
- }
- xpath +=
- "[contains(concat(' ',@class,' '), ' "+
- cn + padding + "')]";
- });
-
- handleAttrs(xPathAttrs, tqp,
- function(condition){
- return "[@"+condition+"]";
- },
- function(matcher){
- xpath += matcher;
- }
- );
-
- // FIXME: need to implement pseudo-class checks!!
- };
- return xpath;
- };
-
- var _xpathFuncCache = {};
- var getXPathFunc = function(path){
- if(_xpathFuncCache[path]){
- return _xpathFuncCache[path];
- }
-
- var doc = d.doc;
- // var parent = d.body(); // FIXME
- // FIXME: don't need to memoize. The closure scope handles it for us.
- var xpath = buildPath(path);
-
- var tf = function(parent){
- // XPath query strings are memoized.
- var ret = [];
- var xpathResult;
- try{
- xpathResult = doc.evaluate(xpath, parent, null,
- // XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null);
- XPathResult.ANY_TYPE, null);
- }catch(e){
- console.debug("failure in exprssion:", xpath, "under:", parent);
- console.debug(e);
- }
- var result = xpathResult.iterateNext();
- while(result){
- ret.push(result);
- result = xpathResult.iterateNext();
- }
- return ret;
- }
- return _xpathFuncCache[path] = tf;
- };
-
- /*
- d.xPathMatch = function(query){
- // XPath based DOM query system. Handles a small subset of CSS
- // selectors, subset is identical to the non-XPath version of this
- // function.
-
- // FIXME: need to add support for alternate roots
- return getXPathFunc(query)();
- }
- */
-
- ////////////////////////////////////////////////////////////////////////
- // DOM query code
- ////////////////////////////////////////////////////////////////////////
-
- var _filtersCache = {};
- var _simpleFiltersCache = {};
-
- // the basic building block of the yes/no chaining system. agree(f1, f2)
- // generates a new function which returns the boolean results of both of
- // the passed functions to a single logical-anded result.
var agree = function(first, second){
+ // the basic building block of the yes/no chaining system. agree(f1,
+ // f2) generates a new function which returns the boolean results of
+ // both of the passed functions to a single logical-anded result. If
+ // either are not possed, the other is used exclusively.
if(!first){ return second; }
if(!second){ return first; }
return function(){
return first.apply(window, arguments) && second.apply(window, arguments);
}
- }
-
- var _filterDown = function(element, queryParts, matchArr, idx){
- var nidx = idx+1;
- var isFinal = (queryParts.length == nidx);
- var tqp = queryParts[idx];
-
- // see if we can constrain our next level to direct children
- if(tqp.oper == ">"){
- var ecn = element[childNodesName];
- if(!ecn || !ecn.length){
- return;
- }
- nidx++;
- isFinal = (queryParts.length == nidx);
- // kinda janky, too much array alloc
- var tf = getFilterFunc(queryParts[idx+1]);
- // for(var x=ecn.length-1, te; x>=0, te=ecn[x]; x--){
- for(var x=0, ecnl=ecn.length, te; x<ecnl, te=ecn[x]; x++){
- if(tf(te)){
- if(isFinal){
- matchArr.push(te);
- }else{
- _filterDown(te, queryParts, matchArr, nidx);
- }
- }
- /*
- if(x==0){
- break;
- }
- */
- }
- }
-
- // otherwise, keep going down, unless we'er at the end
- var candidates = getElementsFunc(tqp)(element);
- if(isFinal){
- while(candidates.length){
- matchArr.push(candidates.shift());
- }
- /*
- candidates.unshift(0, matchArr.length-1);
- matchArr.splice.apply(matchArr, candidates);
- */
- }else{
- // if we're not yet at the bottom, keep going!
- while(candidates.length){
- _filterDown(candidates.shift(), queryParts, matchArr, nidx);
- }
- }
- }
-
- var filterDown = function(elements, queryParts){
- var ret = [];
-
- // for every root, get the elements that match the descendant selector
- // for(var x=elements.length-1, te; x>=0, te=elements[x]; x--){
- var x = elements.length - 1, te;
- while(te = elements[x--]){
- _filterDown(te, queryParts, ret, 0);
- }
- return ret;
- }
-
- var getFilterFunc = function(q){
- // note: query can't have spaces!
- if(_filtersCache[q.query]){
- return _filtersCache[q.query];
- }
- var ff = null;
-
- // does it have a tagName component?
- if(q.tag){
- if(q.tag == "*"){
- ff = agree(ff,
- function(elem){
- return (elem.nodeType == 1);
- }
- );
- }else{
- // tag name match
- ff = agree(ff,
- function(elem){
- return (
- (elem.nodeType == 1) &&
- (q.tag == elem.tagName.toLowerCase())
- );
- // return isTn;
- }
- );
- }
- }
-
- // does the node have an ID?
- if(q.id){
- ff = agree(ff,
- function(elem){
- return (
- (elem.nodeType == 1) &&
- (elem.id == q.id)
- );
- }
- );
- }
-
- if(q.hasLoops){
- // if we have other query param parts, make sure we add them to the
- // filter chain
- ff = agree(ff, getSimpleFilterFunc(q));
- }
-
- return _filtersCache[q.query] = ff;
- }
-
- var getNodeIndex = function(node){
- // NOTE:
- // we could have a more accurate caching mechanism by invalidating
- // caches after the query has finished, but I think that'd lead to
- // significantly more cache churn than the cache would provide
- // value for in the common case. Generally, we're more
- // conservative (and therefore, more accurate) than jQuery and
- // DomQuery WRT node node indexes, but there may be corner cases
- // in which we fall down. How much we care about them is TBD.
-
- var pn = node.parentNode;
- var pnc = pn.childNodes;
-
- // check to see if we can trust the cache. If not, re-key the whole
- // thing and return our node match from that.
-
- var nidx = -1;
- var child = pn.firstChild;
- if(!child){
- return nidx;
- }
-
- var ci = node["__cachedIndex"];
- var cl = pn["__cachedLength"];
-
- // only handle cache building if we've gone out of sync
- if(((typeof cl == "number")&&(cl != pnc.length))||(typeof ci != "number")){
- // rip though the whole set, building cache indexes as we go
- pn["__cachedLength"] = pnc.length;
- var idx = 1;
- do{
- // we only assign indexes for nodes with nodeType == 1, as per:
- // http://www.w3.org/TR/css3-selectors/#nth-child-pseudo
- // only elements are counted in the search order, and they
- // begin at 1 for the first child's index
-
- if(child === node){
- nidx = idx;
- }
- if(child.nodeType == 1){
- child["__cachedIndex"] = idx;
- idx++;
- }
- child = child.nextSibling;
- }while(child);
- }else{
- // NOTE:
- // could be incorrect in some cases (node swaps involving the
- // passed node, etc.), but we ignore those due to the relative
- // unlikelihood of that occuring
- nidx = ci;
- }
- return nidx;
- }
-
- var firedCount = 0;
-
+ };
+
+ var getArr = function(i, arr){
+ // helps us avoid array alloc when we don't need it
+ var r = arr||[]; // FIXME: should this be 'new d._NodeListCtor()' ?
+ if(i){ r.push(i); }
+ return r;
+ };
+
+ var _isElement = function(n){ return (1 == n.nodeType); };
+
+ // FIXME: need to coalesce _getAttr with defaultGetter
var blank = "";
var _getAttr = function(elem, attr){
+ if(!elem){ return blank; }
if(attr == "class"){
return elem.className || blank;
}
if(attr == "for"){
return elem.htmlFor || blank;
}
- return elem.getAttribute(attr, 2) || blank;
- }
+ if(attr == "style"){
+ return elem.style.cssText || blank;
+ }
+ return (caseSensitive ? elem.getAttribute(attr) : elem.getAttribute(attr, 2)) || blank;
+ };
var attrs = {
"*=": function(attr, value){
return function(elem){
// E[foo*="bar"]
// an E element whose "foo" attribute value contains
// the substring "bar"
return (_getAttr(elem, attr).indexOf(value)>=0);
}
},
"^=": function(attr, value){
// E[foo^="bar"]
// an E element whose "foo" attribute value begins exactly
// with the string "bar"
return function(elem){
return (_getAttr(elem, attr).indexOf(value)==0);
}
},
"$=": function(attr, value){
// E[foo$="bar"]
// an E element whose "foo" attribute value ends exactly
// with the string "bar"
var tval = " "+value;
return function(elem){
var ea = " "+_getAttr(elem, attr);
return (ea.lastIndexOf(value)==(ea.length-value.length));
}
},
"~=": function(attr, value){
// E[foo~="bar"]
// an E element whose "foo" attribute value is a list of
// space-separated values, one of which is exactly equal
// to "bar"
// return "[contains(concat(' ',@"+attr+",' '), ' "+ value +" ')]";
var tval = " "+value+" ";
return function(elem){
var ea = " "+_getAttr(elem, attr)+" ";
return (ea.indexOf(tval)>=0);
}
},
"|=": function(attr, value){
// E[hreflang|="en"]
// an E element whose "hreflang" attribute has a
// hyphen-separated list of values beginning (from the
// left) with "en"
var valueDash = " "+value+"-";
return function(elem){
- var ea = " "+(elem.getAttribute(attr, 2) || "");
+ var ea = " "+_getAttr(elem, attr);
return (
(ea == value) ||
(ea.indexOf(valueDash)==0)
);
}
},
"=": function(attr, value){
return function(elem){
return (_getAttr(elem, attr) == value);
}
}
};
+ // avoid testing for node type if we can. Defining this in the negative
+ // here to avoid negation in the fast path.
+ var _noNES = (typeof getDoc().firstChild.nextElementSibling == "undefined");
+ var _ns = !_noNES ? "nextElementSibling" : "nextSibling";
+ var _ps = !_noNES ? "previousElementSibling" : "previousSibling";
+ var _simpleNodeTest = (_noNES ? _isElement : yesman);
+
+ var _lookLeft = function(node){
+ // look left
+ while(node = node[_ps]){
+ if(_simpleNodeTest(node)){ return false; }
+ }
+ return true;
+ };
+
+ var _lookRight = function(node){
+ // look right
+ while(node = node[_ns]){
+ if(_simpleNodeTest(node)){ return false; }
+ }
+ return true;
+ };
+
+ var getNodeIndex = function(node){
+ var root = node.parentNode;
+ var i = 0,
+ tret = root[childNodesName],
+ ci = (node["_i"]||-1),
+ cl = (root["_l"]||-1);
+
+ if(!tret){ return -1; }
+ var l = tret.length;
+
+ // we calcuate the parent length as a cheap way to invalidate the
+ // cache. It's not 100% accurate, but it's much more honest than what
+ // other libraries do
+ if( cl == l && ci >= 0 && cl >= 0 ){
+ // if it's legit, tag and release
+ return ci;
+ }
+
+ // else re-key things
+ root["_l"] = l;
+ ci = -1;
+ for(var te = root["firstElementChild"]||root["firstChild"]; te; te = te[_ns]){
+ if(_simpleNodeTest(te)){
+ te["_i"] = ++i;
+ if(node === te){
+ // NOTE:
+ // shortcuting the return at this step in indexing works
+ // very well for benchmarking but we avoid it here since
+ // it leads to potential O(n^2) behavior in sequential
+ // getNodexIndex operations on a previously un-indexed
+ // parent. We may revisit this at a later time, but for
+ // now we just want to get the right answer more often
+ // than not.
+ ci = i;
+ }
+ }
+ }
+ return ci;
+ };
+
+ var isEven = function(elem){
+ return !((getNodeIndex(elem)) % 2);
+ };
+
+ var isOdd = function(elem){
+ return ((getNodeIndex(elem)) % 2);
+ };
+
var pseudos = {
- "first-child": function(name, condition){
+ "checked": function(name, condition){
return function(elem){
- if(elem.nodeType != 1){ return false; }
- // check to see if any of the previous siblings are elements
- var fc = elem.previousSibling;
- while(fc && (fc.nodeType != 1)){
- fc = fc.previousSibling;
- }
- return (!fc);
+ return !!("checked" in elem ? elem.checked : elem.selected);
}
},
- "last-child": function(name, condition){
- return function(elem){
- if(elem.nodeType != 1){ return false; }
- // check to see if any of the next siblings are elements
- var nc = elem.nextSibling;
- while(nc && (nc.nodeType != 1)){
- nc = nc.nextSibling;
- }
- return (!nc);
- }
+ "first-child": function(){ return _lookLeft; },
+ "last-child": function(){ return _lookRight; },
+ "only-child": function(name, condition){
+ return function(node){
+ if(!_lookLeft(node)){ return false; }
+ if(!_lookRight(node)){ return false; }
+ return true;
+ };
},
"empty": function(name, condition){
return function(elem){
// DomQuery and jQuery get this wrong, oddly enough.
- // The CSS 3 selectors spec is pretty explicit about
- // it, too.
+ // The CSS 3 selectors spec is pretty explicit about it, too.
var cn = elem.childNodes;
var cnl = elem.childNodes.length;
// if(!cnl){ return true; }
for(var x=cnl-1; x >= 0; x--){
var nt = cn[x].nodeType;
- if((nt == 1)||(nt == 3)){ return false; }
+ if((nt === 1)||(nt == 3)){ return false; }
}
return true;
}
},
- /* non standard!
"contains": function(name, condition){
+ var cz = condition.charAt(0);
+ if( cz == '"' || cz == "'" ){ //remove quote
+ condition = condition.slice(1, -1);
+ }
return function(elem){
- // FIXME: I dislike this version of "contains", as
- // whimsical attribute could set it off. An inner-text
- // based version might be more accurate, but since
- // jQuery and DomQuery also potentially get this wrong,
- // I'm leaving it for now.
return (elem.innerHTML.indexOf(condition) >= 0);
}
},
- */
"not": function(name, condition){
- var ntf = getFilterFunc(getQueryParts(condition)[0]);
+ var p = getQueryParts(condition)[0];
+ var ignores = { el: 1 };
+ if(p.tag != "*"){
+ ignores.tag = 1;
+ }
+ if(!p.classes.length){
+ ignores.classes = 1;
+ }
+ var ntf = getSimpleFilterFunc(p, ignores);
return function(elem){
return (!ntf(elem));
}
},
"nth-child": function(name, condition){
var pi = parseInt;
+ // avoid re-defining function objects if we can
if(condition == "odd"){
- return function(elem){
- return (
- ((getNodeIndex(elem)) % 2) == 1
- );
- }
- }else if((condition == "2n")||
- (condition == "even")){
- return function(elem){
- return ((getNodeIndex(elem) % 2) == 0);
- }
- }else if(condition.indexOf("0n+") == 0){
- var ncount = pi(condition.substr(3));
- return function(elem){
- return (elem.parentNode[childNodesName][ncount-1] === elem);
- }
- }else if( (condition.indexOf("n+") > 0) &&
- (condition.length > 3) ){
- var tparts = condition.split("n+", 2);
- var pred = pi(tparts[0]);
- var idx = pi(tparts[1]);
- return function(elem){
- return ((getNodeIndex(elem) % pred) == idx);
- }
- }else if(condition.indexOf("n") == -1){
- var ncount = pi(condition);
- return function(elem){
- return (getNodeIndex(elem) == ncount);
- }
+ return isOdd;
+ }else if(condition == "even"){
+ return isEven;
+ }
+ // FIXME: can we shorten this?
+ if(condition.indexOf("n") != -1){
+ var tparts = condition.split("n", 2);
+ var pred = tparts[0] ? ((tparts[0] == '-') ? -1 : pi(tparts[0])) : 1;
+ var idx = tparts[1] ? pi(tparts[1]) : 0;
+ var lb = 0, ub = -1;
+ if(pred > 0){
+ if(idx < 0){
+ idx = (idx % pred) && (pred + (idx % pred));
+ }else if(idx>0){
+ if(idx >= pred){
+ lb = idx - idx % pred;
+ }
+ idx = idx % pred;
+ }
+ }else if(pred<0){
+ pred *= -1;
+ // idx has to be greater than 0 when pred is negative;
+ // shall we throw an error here?
+ if(idx > 0){
+ ub = idx;
+ idx = idx % pred;
+ }
+ }
+ if(pred > 0){
+ return function(elem){
+ var i = getNodeIndex(elem);
+ return (i>=lb) && (ub<0 || i<=ub) && ((i % pred) == idx);
+ }
+ }else{
+ condition = idx;
+ }
+ }
+ var ncount = pi(condition);
+ return function(elem){
+ return (getNodeIndex(elem) == ncount);
}
}
};
var defaultGetter = (d.isIE) ? function(cond){
var clc = cond.toLowerCase();
+ if(clc == "class"){ cond = "className"; }
return function(elem){
- return elem[cond]||elem[clc];
+ return (caseSensitive ? elem.getAttribute(cond) : elem[cond]||elem[clc]);
}
} : function(cond){
return function(elem){
return (elem && elem.getAttribute && elem.hasAttribute(cond));
}
};
- var getSimpleFilterFunc = function(query){
-
- var fcHit = (_simpleFiltersCache[query.query]||_filtersCache[query.query]);
- if(fcHit){ return fcHit; }
+ var getSimpleFilterFunc = function(query, ignores){
+ // generates a node tester function based on the passed query part. The
+ // query part is one of the structures generatd by the query parser
+ // when it creates the query AST. The "ignores" object specifies which
+ // (if any) tests to skip, allowing the system to avoid duplicating
+ // work where it may have already been taken into account by other
+ // factors such as how the nodes to test were fetched in the first
+ // place
+ if(!query){ return yesman; }
+ ignores = ignores||{};
var ff = null;
- // the only case where we'll need the tag name is if we came from an ID query
- if(query.id){ // do we have an ID component?
+ if(!("el" in ignores)){
+ ff = agree(ff, _isElement);
+ }
+
+ if(!("tag" in ignores)){
if(query.tag != "*"){
ff = agree(ff, function(elem){
- return (elem.tagName.toLowerCase() == query.tag);
+ return (elem && (elem.tagName == query.getTag()));
+ });
+ }
+ }
+
+ if(!("classes" in ignores)){
+ each(query.classes, function(cname, idx, arr){
+ // get the class name
+ /*
+ var isWildcard = cname.charAt(cname.length-1) == "*";
+ if(isWildcard){
+ cname = cname.substr(0, cname.length-1);
+ }
+ // I dislike the regex thing, even if memozied in a cache, but it's VERY short
+ var re = new RegExp("(?:^|\\s)" + cname + (isWildcard ? ".*" : "") + "(?:\\s|$)");
+ */
+ var re = new RegExp("(?:^|\\s)" + cname + "(?:\\s|$)");
+ ff = agree(ff, function(elem){
+ return re.test(elem.className);
});
- }
- }
-
- // if there's a class in our query, generate a match function for it
- d.forEach(query.classes, function(cname, idx, arr){
- // get the class name
- var isWildcard = cname.charAt(cname.length-1) == "*";
- if(isWildcard){
- cname = cname.substr(0, cname.length-1);
- }
- // I dislike the regex thing, even if memozied in a cache, but it's VERY short
- var re = new RegExp("(?:^|\\s)" + cname + (isWildcard ? ".*" : "") + "(?:\\s|$)");
- ff = agree(ff, function(elem){
- return re.test(elem.className);
+ ff.count = idx;
+ });
+ }
+
+ if(!("pseudos" in ignores)){
+ each(query.pseudos, function(pseudo){
+ var pn = pseudo.name;
+ if(pseudos[pn]){
+ ff = agree(ff, pseudos[pn](pn, pseudo.value));
+ }
});
- ff.count = idx;
- });
-
- d.forEach(query.pseudos, function(pseudo){
- if(pseudos[pseudo.name]){
- ff = agree(ff, pseudos[pseudo.name](pseudo.name, pseudo.value));
- }
- });
-
- handleAttrs(attrs, query, defaultGetter,
- function(tmatcher){ ff = agree(ff, tmatcher); }
- );
+ }
+
+ if(!("attrs" in ignores)){
+ each(query.attrs, function(attr){
+ var matcher;
+ var a = attr.attr;
+ // type, attr, matchFor
+ if(attr.type && attrs[attr.type]){
+ matcher = attrs[attr.type](a, attr.matchFor);
+ }else if(a.length){
+ matcher = defaultGetter(a);
+ }
+ if(matcher){
+ ff = agree(ff, matcher);
+ }
+ });
+ }
+
+ if(!("id" in ignores)){
+ if(query.id){
+ ff = agree(ff, function(elem){
+ return (!!elem && (elem.id == query.id));
+ });
+ }
+ }
+
if(!ff){
- ff = function(){ return true; };
- }
- return _simpleFiltersCache[query.query] = ff;
- }
-
- var _getElementsFuncCache = { };
-
- var getElementsFunc = function(query, root){
- var fHit = _getElementsFuncCache[query.query];
- if(fHit){ return fHit; }
-
- // NOTE: this function is in the fast path! not memoized!!!
-
- // the query doesn't contain any spaces, so there's only so many
- // things it could be
-
- if(query.id && !query.hasLoops && !query.tag){
- // ID-only query. Easy.
- return _getElementsFuncCache[query.query] = function(root){
- // FIXME: if root != document, check for parenting!
- return [ d.byId(query.id) ];
- }
- }
-
- var filterFunc = getSimpleFilterFunc(query);
-
- var retFunc;
- if(query.tag && query.id && !query.hasLoops){
- // we got a filtered ID search (e.g., "h4#thinger")
- retFunc = function(root){
- var te = d.byId(query.id);
- if(filterFunc(te)){
- return [ te ];
- }
- }
- }else{
- var tret;
-
- if(!query.hasLoops){
- // it's just a plain-ol elements-by-tag-name query from the root
- retFunc = function(root){
- var ret = [];
- var te, x=0, tret = root.getElementsByTagName(query.tag);
- while(te=tret[x++]){
+ if(!("default" in ignores)){
+ ff = yesman;
+ }
+ }
+ return ff;
+ };
+
+ var _nextSibling = function(filterFunc){
+ return function(node, ret, bag){
+ while(node = node[_ns]){
+ if(_noNES && (!_isElement(node))){ continue; }
+ if(
+ (!bag || _isUnique(node, bag)) &&
+ filterFunc(node)
+ ){
+ ret.push(node);
+ }
+ break;
+ }
+ return ret;
+ }
+ };
+
+ var _nextSiblings = function(filterFunc){
+ return function(root, ret, bag){
+ var te = root[_ns];
+ while(te){
+ if(_simpleNodeTest(te)){
+ if(bag && !_isUnique(te, bag)){
+ break;
+ }
+ if(filterFunc(te)){
ret.push(te);
}
- return ret;
- }
- }else{
- retFunc = function(root){
- var ret = [];
- var te, x=0, tret = root.getElementsByTagName(query.tag);
- while(te=tret[x++]){
- if(filterFunc(te)){
+ }
+ te = te[_ns];
+ }
+ return ret;
+ }
+ };
+
+ // get an array of child *elements*, skipping text and comment nodes
+ var _childElements = function(filterFunc){
+ filterFunc = filterFunc||yesman;
+ return function(root, ret, bag){
+ // get an array of child elements, skipping text and comment nodes
+ var te, x = 0, tret = root[childNodesName];
+ while(te = tret[x++]){
+ if(
+ _simpleNodeTest(te) &&
+ (!bag || _isUnique(te, bag)) &&
+ (filterFunc(te, x))
+ ){
+ ret.push(te);
+ }
+ }
+ return ret;
+ };
+ };
+
+ /*
+ // thanks, Dean!
+ var itemIsAfterRoot = d.isIE ? function(item, root){
+ return (item.sourceIndex > root.sourceIndex);
+ } : function(item, root){
+ return (item.compareDocumentPosition(root) == 2);
+ };
+ */
+
+ // test to see if node is below root
+ var _isDescendant = function(node, root){
+ var pn = node.parentNode;
+ while(pn){
+ if(pn == root){
+ break;
+ }
+ pn = pn.parentNode;
+ }
+ return !!pn;
+ };
+
+ var _getElementsFuncCache = {};
+
+ var getElementsFunc = function(query){
+ var retFunc = _getElementsFuncCache[query.query];
+ // if we've got a cached dispatcher, just use that
+ if(retFunc){ return retFunc; }
+ // else, generate a new on
+
+ // NOTE:
+ // this function returns a function that searches for nodes and
+ // filters them. The search may be specialized by infix operators
+ // (">", "~", or "+") else it will default to searching all
+ // descendants (the " " selector). Once a group of children is
+ // founde, a test function is applied to weed out the ones we
+ // don't want. Many common cases can be fast-pathed. We spend a
+ // lot of cycles to create a dispatcher that doesn't do more work
+ // than necessary at any point since, unlike this function, the
+ // dispatchers will be called every time. The logic of generating
+ // efficient dispatchers looks like this in pseudo code:
+ //
+ // # if it's a purely descendant query (no ">", "+", or "~" modifiers)
+ // if infixOperator == " ":
+ // if only(id):
+ // return def(root):
+ // return d.byId(id, root);
+ //
+ // elif id:
+ // return def(root):
+ // return filter(d.byId(id, root));
+ //
+ // elif cssClass && getElementsByClassName:
+ // return def(root):
+ // return filter(root.getElementsByClassName(cssClass));
+ //
+ // elif only(tag):
+ // return def(root):
+ // return root.getElementsByTagName(tagName);
+ //
+ // else:
+ // # search by tag name, then filter
+ // return def(root):
+ // return filter(root.getElementsByTagName(tagName||"*"));
+ //
+ // elif infixOperator == ">":
+ // # search direct children
+ // return def(root):
+ // return filter(root.children);
+ //
+ // elif infixOperator == "+":
+ // # search next sibling
+ // return def(root):
+ // return filter(root.nextElementSibling);
+ //
+ // elif infixOperator == "~":
+ // # search rightward siblings
+ // return def(root):
+ // return filter(nextSiblings(root));
+
+ var io = query.infixOper;
+ var oper = (io ? io.oper : "");
+ // the default filter func which tests for all conditions in the query
+ // part. This is potentially inefficient, so some optimized paths may
+ // re-define it to test fewer things.
+ var filterFunc = getSimpleFilterFunc(query, { el: 1 });
+ var qt = query.tag;
+ var wildcardTag = ("*" == qt);
+ var ecs = getDoc()["getElementsByClassName"];
+
+ if(!oper){
+ // if there's no infix operator, then it's a descendant query. ID
+ // and "elements by class name" variants can be accelerated so we
+ // call them out explicitly:
+ if(query.id){
+ // testing shows that the overhead of yesman() is acceptable
+ // and can save us some bytes vs. re-defining the function
+ // everywhere.
+ filterFunc = (!query.loops && wildcardTag) ?
+ yesman :
+ getSimpleFilterFunc(query, { el: 1, id: 1 });
+
+ retFunc = function(root, arr){
+ var te = d.byId(query.id, (root.ownerDocument||root));
+ if(!te || !filterFunc(te)){ return; }
+ if(9 == root.nodeType){ // if root's a doc, we just return directly
+ return getArr(te, arr);
+ }else{ // otherwise check ancestry
+ if(_isDescendant(te, root)){
+ return getArr(te, arr);
+ }
+ }
+ }
+ }else if(
+ ecs &&
+ // isAlien check. Workaround for Prototype.js being totally evil/dumb.
+ /\{\s*\[native code\]\s*\}/.test(String(ecs)) &&
+ query.classes.length &&
+ !cssCaseBug
+ ){
+ // it's a class-based query and we've got a fast way to run it.
+
+ // ignore class and ID filters since we will have handled both
+ filterFunc = getSimpleFilterFunc(query, { el: 1, classes: 1, id: 1 });
+ var classesString = query.classes.join(" ");
+ retFunc = function(root, arr, bag){
+ var ret = getArr(0, arr), te, x=0;
+ var tret = root.getElementsByClassName(classesString);
+ while((te = tret[x++])){
+ if(filterFunc(te, root) && _isUnique(te, bag)){
ret.push(te);
}
}
return ret;
- }
- }
- }
+ };
+
+ }else if(!wildcardTag && !query.loops){
+ // it's tag only. Fast-path it.
+ retFunc = function(root, arr, bag){
+ var ret = getArr(0, arr), te, x=0;
+ var tret = root.getElementsByTagName(query.getTag());
+ while((te = tret[x++])){
+ if(_isUnique(te, bag)){
+ ret.push(te);
+ }
+ }
+ return ret;
+ };
+ }else{
+ // the common case:
+ // a descendant selector without a fast path. By now it's got
+ // to have a tag selector, even if it's just "*" so we query
+ // by that and filter
+ filterFunc = getSimpleFilterFunc(query, { el: 1, tag: 1, id: 1 });
+ retFunc = function(root, arr, bag){
+ var ret = getArr(0, arr), te, x=0;
+ // we use getTag() to avoid case sensitivity issues
+ var tret = root.getElementsByTagName(query.getTag());
+ while((te = tret[x++])){
+ if(filterFunc(te, root) && _isUnique(te, bag)){
+ ret.push(te);
+ }
+ }
+ return ret;
+ };
+ }
+ }else{
+ // the query is scoped in some way. Instead of querying by tag we
+ // use some other collection to find candidate nodes
+ var skipFilters = { el: 1 };
+ if(wildcardTag){
+ skipFilters.tag = 1;
+ }
+ filterFunc = getSimpleFilterFunc(query, skipFilters);
+ if("+" == oper){
+ retFunc = _nextSibling(filterFunc);
+ }else if("~" == oper){
+ retFunc = _nextSiblings(filterFunc);
+ }else if(">" == oper){
+ retFunc = _childElements(filterFunc);
+ }
+ }
+ // cache it and return
return _getElementsFuncCache[query.query] = retFunc;
- }
-
- var _partsCache = {};
+ };
+
+ var filterDown = function(root, queryParts){
+ // NOTE:
+ // this is the guts of the DOM query system. It takes a list of
+ // parsed query parts and a root and finds children which match
+ // the selector represented by the parts
+ var candidates = getArr(root), qp, x, te, qpl = queryParts.length, bag, ret;
+
+ for(var i = 0; i < qpl; i++){
+ ret = [];
+ qp = queryParts[i];
+ x = candidates.length - 1;
+ if(x > 0){
+ // if we have more than one root at this level, provide a new
+ // hash to use for checking group membership but tell the
+ // system not to post-filter us since we will already have been
+ // gauranteed to be unique
+ bag = {};
+ ret.nozip = true;
+ }
+ var gef = getElementsFunc(qp);
+ for(var j = 0; (te = candidates[j]); j++){
+ // for every root, get the elements that match the descendant
+ // selector, adding them to the "ret" array and filtering them
+ // via membership in this level's bag. If there are more query
+ // parts, then this level's return will be used as the next
+ // level's candidates
+ gef(te, ret, bag);
+ }
+ if(!ret.length){ break; }
+ candidates = ret;
+ }
+ return ret;
+ };
////////////////////////////////////////////////////////////////////////
// the query runner
////////////////////////////////////////////////////////////////////////
+ // these are the primary caches for full-query results. The query
+ // dispatcher functions are generated then stored here for hash lookup in
+ // the future
+ var _queryFuncCacheDOM = {},
+ _queryFuncCacheQSA = {};
+
// this is the second level of spliting, from full-length queries (e.g.,
// "div.foo .bar") into simple query expressions (e.g., ["div.foo",
// ".bar"])
- var _queryFuncCache = {
- "*": d.isIE ?
- function(root){
- return root.all;
- } :
- function(root){
- return root.getElementsByTagName("*");
- },
- ">": function(root){
- var ret = [];
- var te, x=0, tret = root[childNodesName];
- while(te=tret[x++]){
- if(te.nodeType == 1){ ret.push(te); }
- }
- return ret;
- }
- };
-
var getStepQueryFunc = function(query){
- // if it's trivial, get a fast-path dispatcher
- var qparts = getQueryParts(d.trim(query));
- // if(query[query.length-1] == ">"){ query += " *"; }
+ var qparts = getQueryParts(trim(query));
+
+ // if it's trivial, avoid iteration and zipping costs
if(qparts.length == 1){
- var tt = getElementsFunc(qparts[0]);
- tt.nozip = true;
- return tt;
+ // we optimize this case here to prevent dispatch further down the
+ // chain, potentially slowing things down. We could more elegantly
+ // handle this in filterDown(), but it's slower for simple things
+ // that need to be fast (e.g., "#someId").
+ var tef = getElementsFunc(qparts[0]);
+ return function(root){
+ var r = tef(root, new qlc());
+ if(r){ r.nozip = true; }
+ return r;
+ }
}
// otherwise, break it up and return a runner that iterates over the parts recursively
- var sqf = function(root){
- var localQueryParts = qparts.slice(0); // clone the src arr
- var candidates;
- if(localQueryParts[0].oper == ">"){
- candidates = [ root ];
- // root = document;
- }else{
- candidates = getElementsFunc(localQueryParts.shift())(root);
- }
- return filterDown(candidates, localQueryParts);
- }
- return sqf;
- }
-
- // a specialized method that implements our primoridal "query optimizer".
- // This allows us to dispatch queries to the fastest subsystem we can get.
- var _getQueryFunc = (
- // NOTE:
- // XPath on the Webkit nighlies is slower than it's DOM iteration
- // for most test cases
- // FIXME:
- // we should try to capture some runtime speed data for each query
- // function to determine on the fly if we should stick w/ the
- // potentially optimized variant or if we should try something
- // new.
- (document["evaluate"] && !d.isSafari) ?
- function(query){
- // has xpath support that's faster than DOM
- var qparts = query.split(" ");
- // can we handle it?
- if( (document["evaluate"])&&
- (query.indexOf(":") == -1)&&
- (
- (true) // ||
- // (query.indexOf("[") == -1) ||
- // (query.indexOf("=") == -1)
- )
- ){
- // dojo.debug(query);
- // should we handle it?
-
- // kind of a lame heuristic, but it works
- if(
- // a "div div div" style query
- ((qparts.length > 2)&&(query.indexOf(">") == -1))||
- // or something else with moderate complexity. kinda janky
- (qparts.length > 3)||
- (query.indexOf("[")>=0)||
- // or if it's a ".thinger" query
- ((1 == qparts.length)&&(0 <= query.indexOf(".")))
-
- ){
- // use get and cache a xpath runner for this selector
- return getXPathFunc(query);
- }
- }
-
- // fallthrough
- return getStepQueryFunc(query);
- } : getStepQueryFunc
+ return function(root){
+ return filterDown(root, qparts);
+ }
+ };
+
+ // NOTES:
+ // * we can't trust QSA for anything but document-rooted queries, so
+ // caching is split into DOM query evaluators and QSA query evaluators
+ // * caching query results is dirty and leak-prone (or, at a minimum,
+ // prone to unbounded growth). Other toolkits may go this route, but
+ // they totally destroy their own ability to manage their memory
+ // footprint. If we implement it, it should only ever be with a fixed
+ // total element reference # limit and an LRU-style algorithm since JS
+ // has no weakref support. Caching compiled query evaluators is also
+ // potentially problematic, but even on large documents the size of the
+ // query evaluators is often < 100 function objects per evaluator (and
+ // LRU can be applied if it's ever shown to be an issue).
+ // * since IE's QSA support is currently only for HTML documents and even
+ // then only in IE 8's "standards mode", we have to detect our dispatch
+ // route at query time and keep 2 separate caches. Ugg.
+
+ // we need to determine if we think we can run a given query via
+ // querySelectorAll or if we'll need to fall back on DOM queries to get
+ // there. We need a lot of information about the environment and the query
+ // to make the determiniation (e.g. does it support QSA, does the query in
+ // question work in the native QSA impl, etc.).
+ var nua = navigator.userAgent;
+ // some versions of Safari provided QSA, but it was buggy and crash-prone.
+ // We need te detect the right "internal" webkit version to make this work.
+ var wk = "WebKit/";
+ var is525 = (
+ d.isWebKit &&
+ (nua.indexOf(wk) > 0) &&
+ (parseFloat(nua.split(wk)[1]) > 528)
+ );
+
+ // IE QSA queries may incorrectly include comment nodes, so we throw the
+ // zipping function into "remove" comments mode instead of the normal "skip
+ // it" which every other QSA-clued browser enjoys
+ var noZip = d.isIE ? "commentStrip" : "nozip";
+
+ var qsa = "querySelectorAll";
+ var qsaAvail = (
+ !!getDoc()[qsa] &&
+ // see #5832
+ (!d.isSafari || (d.isSafari > 3.1) || is525 )
);
- // uncomment to disable XPath for testing and tuning the DOM path
- // _getQueryFunc = getStepQueryFunc;
-
- // FIXME: we've got problems w/ the NodeList query()/filter() functions if we go XPath for everything
-
- // uncomment to disable DOM queries for testing and tuning XPath
- // _getQueryFunc = getXPathFunc;
-
- // this is the primary caching for full-query results. The query dispatcher
- // functions are generated here and then pickled for hash lookup in the
- // future
- var getQueryFunc = function(query){
- // return a cached version if one is available
- if(_queryFuncCache[query]){ return _queryFuncCache[query]; }
- if(0 > query.indexOf(",")){
- // if it's not a compound query (e.g., ".foo, .bar"), cache and return a dispatcher
- return _queryFuncCache[query] = _getQueryFunc(query);
+
+ //Don't bother with n+3 type of matches, IE complains if we modify those.
+ var infixSpaceRe = /n\+\d|([^ ])?([>~+])([^ =])?/g;
+ var infixSpaceFunc = function(match, pre, ch, post) {
+ return ch ? (pre ? pre + " " : "") + ch + (post ? " " + post : "") : /*n+3*/ match;
+ };
+
+ var getQueryFunc = function(query, forceDOM){
+ //Normalize query. The CSS3 selectors spec allows for omitting spaces around
+ //infix operators, >, ~ and +
+ //Do the work here since detection for spaces is used as a simple "not use QSA"
+ //test below.
+ query = query.replace(infixSpaceRe, infixSpaceFunc);
+
+ if(qsaAvail){
+ // if we've got a cached variant and we think we can do it, run it!
+ var qsaCached = _queryFuncCacheQSA[query];
+ if(qsaCached && !forceDOM){ return qsaCached; }
+ }
+
+ // else if we've got a DOM cached variant, assume that we already know
+ // all we need to and use it
+ var domCached = _queryFuncCacheDOM[query];
+ if(domCached){ return domCached; }
+
+ // TODO:
+ // today we're caching DOM and QSA branches separately so we
+ // recalc useQSA every time. If we had a way to tag root+query
+ // efficiently, we'd be in good shape to do a global cache.
+
+ var qcz = query.charAt(0);
+ var nospace = (-1 == query.indexOf(" "));
+
+ // byId searches are wicked fast compared to QSA, even when filtering
+ // is required
+ if( (query.indexOf("#") >= 0) && (nospace) ){
+ forceDOM = true;
+ }
+
+ var useQSA = (
+ qsaAvail && (!forceDOM) &&
+ // as per CSS 3, we can't currently start w/ combinator:
+ // http://www.w3.org/TR/css3-selectors/#w3cselgrammar
+ (specials.indexOf(qcz) == -1) &&
+ // IE's QSA impl sucks on pseudos
+ (!d.isIE || (query.indexOf(":") == -1)) &&
+
+ (!(cssCaseBug && (query.indexOf(".") >= 0))) &&
+
+ // FIXME:
+ // need to tighten up browser rules on ":contains" and "|=" to
+ // figure out which aren't good
+ // Latest webkit (around 531.21.8) does not seem to do well with :checked on option
+ // elements, even though according to spec, selected options should
+ // match :checked. So go nonQSA for it:
+ // http://bugs.dojotoolkit.org/ticket/5179
+ (query.indexOf(":contains") == -1) && (query.indexOf(":checked") == -1) &&
+ (query.indexOf("|=") == -1) // some browsers don't grok it
+ );
+
+ // TODO:
+ // if we've got a descendant query (e.g., "> .thinger" instead of
+ // just ".thinger") in a QSA-able doc, but are passed a child as a
+ // root, it should be possible to give the item a synthetic ID and
+ // trivially rewrite the query to the form "#synid > .thinger" to
+ // use the QSA branch
+
+
+ if(useQSA){
+ var tq = (specials.indexOf(query.charAt(query.length-1)) >= 0) ?
+ (query + " *") : query;
+ return _queryFuncCacheQSA[query] = function(root){
+ try{
+ // the QSA system contains an egregious spec bug which
+ // limits us, effectively, to only running QSA queries over
+ // entire documents. See:
+ // http://ejohn.org/blog/thoughts-on-queryselectorall/
+ // despite this, we can also handle QSA runs on simple
+ // selectors, but we don't want detection to be expensive
+ // so we're just checking for the presence of a space char
+ // right now. Not elegant, but it's cheaper than running
+ // the query parser when we might not need to
+ if(!((9 == root.nodeType) || nospace)){ throw ""; }
+ var r = root[qsa](tq);
+ // skip expensive duplication checks and just wrap in a NodeList
+ r[noZip] = true;
+ return r;
+ }catch(e){
+ // else run the DOM branch on this query, ensuring that we
+ // default that way in the future
+ return getQueryFunc(query, true)(root);
+ }
+ }
}else{
- // if it's a complex query, break it up into it's constituent parts
- // and return a dispatcher that will merge the parts when run
-
- // var parts = query.split(", ");
+ // DOM branch
var parts = query.split(/\s*,\s*/);
- var tf = function(root){
- var pindex = 0; // avoid array alloc for every invocation
- var ret = [];
- var tp;
- while(tp = parts[pindex++]){
- ret = ret.concat(_getQueryFunc(tp, tp.indexOf(" "))(root));
- }
- return ret;
- }
- // ...cache and return
- return _queryFuncCache[query] = tf;
- }
- }
-
- // FIXME:
- // Dean's new Base2 uses a system whereby queries themselves note if
- // they'll need duplicate filtering. We need to get on that plan!!
+ return _queryFuncCacheDOM[query] = ((parts.length < 2) ?
+ // if not a compound query (e.g., ".foo, .bar"), cache and return a dispatcher
+ getStepQueryFunc(query) :
+ // if it *is* a complex query, break it up into its
+ // constituent parts and return a dispatcher that will
+ // merge the parts when run
+ function(root){
+ var pindex = 0, // avoid array alloc for every invocation
+ ret = [],
+ tp;
+ while((tp = parts[pindex++])){
+ ret = ret.concat(getStepQueryFunc(tp)(root));
+ }
+ return ret;
+ }
+ );
+ }
+ };
+
+ var _zipIdx = 0;
+
+ // NOTE:
+ // this function is Moo inspired, but our own impl to deal correctly
+ // with XML in IE
+ var _nodeUID = d.isIE ? function(node){
+ if(caseSensitive){
+ // XML docs don't have uniqueID on their nodes
+ return (node.getAttribute("_uid") || node.setAttribute("_uid", ++_zipIdx) || _zipIdx);
+
+ }else{
+ return node.uniqueID;
+ }
+ } :
+ function(node){
+ return (node._uid || (node._uid = ++_zipIdx));
+ };
+
+ // determine if a node in is unique in a "bag". In this case we don't want
+ // to flatten a list of unique items, but rather just tell if the item in
+ // question is already in the bag. Normally we'd just use hash lookup to do
+ // this for us but IE's DOM is busted so we can't really count on that. On
+ // the upside, it gives us a built in unique ID function.
+ var _isUnique = function(node, bag){
+ if(!bag){ return 1; }
+ var id = _nodeUID(node);
+ if(!bag[id]){ return bag[id] = 1; }
+ return 0;
+ };
// attempt to efficiently determine if an item in a list is a dupe,
// returning a list of "uniques", hopefully in doucment order
- var _zipIdx = 0;
+ var _zipIdxName = "_zipIdx";
var _zip = function(arr){
- if(arr && arr.nozip){ return d.NodeList._wrap(arr); }
- var ret = new d.NodeList();
- if(!arr){ return ret; }
+ if(arr && arr.nozip){
+ return (qlc._wrap) ? qlc._wrap(arr) : arr;
+ }
+ // var ret = new d._NodeListCtor();
+ var ret = new qlc();
+ if(!arr || !arr.length){ return ret; }
if(arr[0]){
ret.push(arr[0]);
}
if(arr.length < 2){ return ret; }
+
_zipIdx++;
- arr[0]["_zipIdx"] = _zipIdx;
- for(var x=1, te; te = arr[x]; x++){
- if(arr[x]["_zipIdx"] != _zipIdx){
- ret.push(te);
- }
- te["_zipIdx"] = _zipIdx;
- }
- // FIXME: should we consider stripping these properties?
+
+ // we have to fork here for IE and XML docs because we can't set
+ // expandos on their nodes (apparently). *sigh*
+ if(d.isIE && caseSensitive){
+ var szidx = _zipIdx+"";
+ arr[0].setAttribute(_zipIdxName, szidx);
+ for(var x = 1, te; te = arr[x]; x++){
+ if(arr[x].getAttribute(_zipIdxName) != szidx){
+ ret.push(te);
+ }
+ te.setAttribute(_zipIdxName, szidx);
+ }
+ }else if(d.isIE && arr.commentStrip){
+ try{
+ for(var x = 1, te; te = arr[x]; x++){
+ if(_isElement(te)){
+ ret.push(te);
+ }
+ }
+ }catch(e){ /* squelch */ }
+ }else{
+ if(arr[0]){ arr[0][_zipIdxName] = _zipIdx; }
+ for(var x = 1, te; te = arr[x]; x++){
+ if(arr[x][_zipIdxName] != _zipIdx){
+ ret.push(te);
+ }
+ te[_zipIdxName] = _zipIdx;
+ }
+ }
return ret;
- }
-
- // the main exectuor
- d.query = function(query, root){
+ };
+
+ // the main executor
+ d.query = function(/*String*/ query, /*String|DOMNode?*/ root){
// summary:
- // returns nodes which match the given CSS3 selector, searching the
+ // Returns nodes which match the given CSS3 selector, searching the
// entire document by default but optionally taking a node to scope
// the search by. Returns an instance of dojo.NodeList.
// description:
// dojo.query() is the swiss army knife of DOM node manipulation in
// Dojo. Much like Prototype's "$$" (bling-bling) function or JQuery's
// "$" function, dojo.query provides robust, high-performance
// CSS-based node selector support with the option of scoping searches
// to a particular sub-tree of a document.
//
// Supported Selectors:
// --------------------
//
// dojo.query() supports a rich set of CSS3 selectors, including:
//
- // * class selectors (e.g., ".foo")
- // * node type selectors like "span"
- // * " " descendant selectors
- // * ">" child element selectors
- // * "#foo" style ID selectors
- // * "*" universal selector
+ // * class selectors (e.g., `.foo`)
+ // * node type selectors like `span`
+ // * ` ` descendant selectors
+ // * `>` child element selectors
+ // * `#foo` style ID selectors
+ // * `*` universal selector
+ // * `~`, the immediately preceeded-by sibling selector
+ // * `+`, the preceeded-by sibling selector
// * attribute queries:
- // * "[foo]" attribute presence selector
- // * "[foo='bar']" attribute value exact match
- // * "[foo~='bar']" attribute value list item match
- // * "[foo^='bar']" attribute start match
- // * "[foo$='bar']" attribute end match
- // * "[foo*='bar']" attribute substring match
- // * ":first-child", ":last-child" positional selectors
- // * ":nth-child(n)", ":nth-child(2n+1)" style positional calculations
- // * ":nth-child(even)", ":nth-child(odd)" positional selectors
- // * ":not(...)" negation pseudo selectors
- //
- // Any legal combination of those selector types as per the CSS 3 sepc
- // will work with dojo.query(), including compound selectors (","
- // delimited). Very complex and useful searches can be constructed
- // with this palette of selectors and when combined with functions for
- // maniplation presented by dojo.NodeList, many types of DOM
+ // | * `[foo]` attribute presence selector
+ // | * `[foo='bar']` attribute value exact match
+ // | * `[foo~='bar']` attribute value list item match
+ // | * `[foo^='bar']` attribute start match
+ // | * `[foo$='bar']` attribute end match
+ // | * `[foo*='bar']` attribute substring match
+ // * `:first-child`, `:last-child`, and `:only-child` positional selectors
+ // * `:empty` content emtpy selector
+ // * `:checked` pseudo selector
+ // * `:nth-child(n)`, `:nth-child(2n+1)` style positional calculations
+ // * `:nth-child(even)`, `:nth-child(odd)` positional selectors
+ // * `:not(...)` negation pseudo selectors
+ //
+ // Any legal combination of these selectors will work with
+ // `dojo.query()`, including compound selectors ("," delimited).
+ // Very complex and useful searches can be constructed with this
+ // palette of selectors and when combined with functions for
+ // manipulation presented by dojo.NodeList, many types of DOM
// manipulation operations become very straightforward.
//
// Unsupported Selectors:
- // --------------------
+ // ----------------------
//
// While dojo.query handles many CSS3 selectors, some fall outside of
// what's resaonable for a programmatic node querying engine to
// handle. Currently unsupported selectors include:
//
// * namespace-differentiated selectors of any form
- // * "~", the immediately preceeded-by sibling selector
- // * "+", the preceeded-by sibling selector
- // * all "::" pseduo-element selectors
+ // * all `::` pseduo-element selectors
// * certain pseduo-selectors which don't get a lot of day-to-day use:
- // * :root, :lang(), :target, :focus
+ // | * `:root`, `:lang()`, `:target`, `:focus`
// * all visual and state selectors:
- // * :root, :active, :hover, :visisted, :link, :enabled, :disabled, :checked
- // * :*-of-type pseudo selectors
+ // | * `:root`, `:active`, `:hover`, `:visisted`, `:link`,
+ // `:enabled`, `:disabled`
+ // * `:*-of-type` pseudo selectors
//
// dojo.query and XML Documents:
// -----------------------------
- // FIXME
//
- // query: String
+ // `dojo.query` (as of dojo 1.2) supports searching XML documents
+ // in a case-sensitive manner. If an HTML document is served with
+ // a doctype that forces case-sensitivity (e.g., XHTML 1.1
+ // Strict), dojo.query() will detect this and "do the right
+ // thing". Case sensitivity is dependent upon the document being
+ // searched and not the query used. It is therefore possible to
+ // use case-sensitive queries on strict sub-documents (iframes,
+ // etc.) or XML documents while still assuming case-insensitivity
+ // for a host/root document.
+ //
+ // Non-selector Queries:
+ // ---------------------
+ //
+ // If something other than a String is passed for the query,
+ // `dojo.query` will return a new `dojo.NodeList` instance
+ // constructed from that parameter alone and all further
+ // processing will stop. This means that if you have a reference
+ // to a node or NodeList, you can quickly construct a new NodeList
+ // from the original by calling `dojo.query(node)` or
+ // `dojo.query(list)`.
+ //
+ // query:
// The CSS3 expression to match against. For details on the syntax of
- // CSS3 selectors, see:
- // http://www.w3.org/TR/css3-selectors/#selectors
- // root: String|DOMNode?
- // A node (or string ID of a node) to scope the search from. Optional.
- // returns:
- // An instance of dojo.NodeList. Many methods are available on
+ // CSS3 selectors, see <http://www.w3.org/TR/css3-selectors/#selectors>
+ // root:
+ // A DOMNode (or node id) to scope the search from. Optional.
+ // returns: dojo.NodeList
+ // An instance of `dojo.NodeList`. Many methods are available on
// NodeLists for searching, iterating, manipulating, and handling
// events on the matched nodes in the returned list.
-
- // return is always an array
- // NOTE: elementsById is not currently supported
- // NOTE: ignores xpath-ish queries for now
- if(query.constructor == d.NodeList){
+ // example:
+ // search the entire document for elements with the class "foo":
+ // | dojo.query(".foo");
+ // these elements will match:
+ // | <span class="foo"></span>
+ // | <span class="foo bar"></span>
+ // | <p class="thud foo"></p>
+ // example:
+ // search the entire document for elements with the classes "foo" *and* "bar":
+ // | dojo.query(".foo.bar");
+ // these elements will match:
+ // | <span class="foo bar"></span>
+ // while these will not:
+ // | <span class="foo"></span>
+ // | <p class="thud foo"></p>
+ // example:
+ // find `<span>` elements which are descendants of paragraphs and
+ // which have a "highlighted" class:
+ // | dojo.query("p span.highlighted");
+ // the innermost span in this fragment matches:
+ // | <p class="foo">
+ // | <span>...
+ // | <span class="highlighted foo bar">...</span>
+ // | </span>
+ // | </p>
+ // example:
+ // set an "odd" class on all odd table rows inside of the table
+ // `#tabular_data`, using the `>` (direct child) selector to avoid
+ // affecting any nested tables:
+ // | dojo.query("#tabular_data > tbody > tr:nth-child(odd)").addClass("odd");
+ // example:
+ // remove all elements with the class "error" from the document
+ // and store them in a list:
+ // | var errors = dojo.query(".error").orphan();
+ // example:
+ // add an onclick handler to every submit button in the document
+ // which causes the form to be sent via Ajax instead:
+ // | dojo.query("input[type='submit']").onclick(function(e){
+ // | dojo.stopEvent(e); // prevent sending the form
+ // | var btn = e.target;
+ // | dojo.xhrPost({
+ // | form: btn.form,
+ // | load: function(data){
+ // | // replace the form with the response
+ // | var div = dojo.doc.createElement("div");
+ // | dojo.place(div, btn.form, "after");
+ // | div.innerHTML = data;
+ // | dojo.style(btn.form, "display", "none");
+ // | }
+ // | });
+ // | });
+
+ //Set list constructor to desired value. This can change
+ //between calls, so always re-assign here.
+ qlc = d._NodeListCtor;
+
+ if(!query){
+ return new qlc();
+ }
+
+ if(query.constructor == qlc){
return query;
}
- if(!d.isString(query)){
- return new d.NodeList(query); // dojo.NodeList
- }
- if(d.isString(root)){
+ if(typeof query != "string"){ // inline'd type check
+ return new qlc(query); // dojo.NodeList
+ }
+ if(typeof root == "string"){ // inline'd type check
root = d.byId(root);
- }
-
- // FIXME: should support more methods on the return than the stock array.
- return _zip(getQueryFunc(query)(root||d.doc));
- }
-
- /*
- // exposing these was a mistake
- d.query.attrs = attrs;
+ if(!root){ return new qlc(); }
+ }
+
+ root = root||getDoc();
+ var od = root.ownerDocument||root.documentElement;
+
+ // throw the big case sensitivity switch
+
+ // NOTE:
+ // Opera in XHTML mode doesn't detect case-sensitivity correctly
+ // and it's not clear that there's any way to test for it
+ caseSensitive = (root.contentType && root.contentType=="application/xml") ||
+ (d.isOpera && (root.doctype || od.toString() == "[object XMLDocument]")) ||
+ (!!od) &&
+ (d.isIE ? od.xml : (root.xmlVersion||od.xmlVersion));
+
+ // NOTE:
+ // adding "true" as the 2nd argument to getQueryFunc is useful for
+ // testing the DOM branch without worrying about the
+ // behavior/performance of the QSA branch.
+ var r = getQueryFunc(query)(root);
+
+ // FIXME:
+ // need to investigate this branch WRT #8074 and #8075
+ if(r && r.nozip && !qlc._wrap){
+ return r;
+ }
+ return _zip(r); // dojo.NodeList
+ }
+
+ // FIXME: need to add infrastructure for post-filtering pseudos, ala :last
d.query.pseudos = pseudos;
- */
// one-off function for filtering a NodeList based on a simple selector
d._filterQueryResult = function(nodeList, simpleFilter){
- var tnl = new d.NodeList();
- var ff = (simpleFilter) ? getFilterFunc(getQueryParts(simpleFilter)[0]) : function(){ return true; };
- for(var x=0, te; te = nodeList[x]; x++){
- if(ff(te)){ tnl.push(te); }
- }
- return tnl;
- }
-})();
+ var tmpNodeList = new d._NodeListCtor();
+ var filterFunc = getSimpleFilterFunc(getQueryParts(simpleFilter)[0]);
+ for(var x = 0, te; te = nodeList[x]; x++){
+ if(filterFunc(te)){ tmpNodeList.push(te); }
+ }
+ return tmpNodeList;
+ }
+})(this["queryPortability"]||this["acme"]||dojo);
+
+/*
+*/
}
if(!dojo._hasResource["dojo._base.xhr"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo._base.xhr"] = true;
dojo.provide("dojo._base.xhr");
(function(){
- var _d = dojo;
+ var _d = dojo, cfg = _d.config;
+
function setValue(/*Object*/obj, /*String*/name, /*String*/value){
//summary:
- // For the nameed property in object, set the value. If a value
+ // For the named property in object, set the value. If a value
// already exists and it is a string, convert the value to be an
// array of values.
+
+ //Skip it if there is no value
+ if(value === null){
+ return;
+ }
+
var val = obj[name];
- if(_d.isString(val)){
+ if(typeof val == "string"){ // inline'd type check
obj[name] = [val, value];
}else if(_d.isArray(val)){
val.push(value);
}else{
obj[name] = value;
}
}
+
+ dojo.fieldToObject = function(/*DOMNode||String*/ inputNode){
+ // summary:
+ // Serialize a form field to a JavaScript object.
+ //
+ // description:
+ // Returns the value encoded in a form field as
+ // as a string or an array of strings. Disabled form elements
+ // and unchecked radio and checkboxes are skipped. Multi-select
+ // elements are returned as an array of string values.
+ var ret = null;
+ var item = _d.byId(inputNode);
+ if(item){
+ var _in = item.name;
+ var type = (item.type||"").toLowerCase();
+ if(_in && type && !item.disabled){
+ if(type == "radio" || type == "checkbox"){
+ if(item.checked){ ret = item.value }
+ }else if(item.multiple){
+ ret = [];
+ _d.query("option", item).forEach(function(opt){
+ if(opt.selected){
+ ret.push(opt.value);
+ }
+ });
+ }else{
+ ret = item.value;
+ }
+ }
+ }
+ return ret; // Object
+ }
dojo.formToObject = function(/*DOMNode||String*/ formNode){
// summary:
- // dojo.formToObject returns the values encoded in an HTML form as
+ // Serialize a form node to a JavaScript object.
+ // description:
+ // Returns the values encoded in an HTML form as
// string properties in an object which it then returns. Disabled form
// elements, buttons, and other non-value form elements are skipped.
// Multi-select elements are returned as an array of string values.
- // description:
+ //
+ // example:
// This form:
- //
- // <form id="test_form">
- // <input type="text" name="blah" value="blah">
- // <input type="text" name="no_value" value="blah" disabled>
- // <input type="button" name="no_value2" value="blah">
- // <select type="select" multiple name="multi" size="5">
- // <option value="blah">blah</option>
- // <option value="thud" selected>thud</option>
- // <option value="thonk" selected>thonk</option>
- // </select>
- // </form>
+ // | <form id="test_form">
+ // | <input type="text" name="blah" value="blah">
+ // | <input type="text" name="no_value" value="blah" disabled>
+ // | <input type="button" name="no_value2" value="blah">
+ // | <select type="select" multiple name="multi" size="5">
+ // | <option value="blah">blah</option>
+ // | <option value="thud" selected>thud</option>
+ // | <option value="thonk" selected>thonk</option>
+ // | </select>
+ // | </form>
//
// yields this object structure as the result of a call to
// formToObject():
//
- // {
- // blah: "blah",
- // multi: [
- // "thud",
- // "thonk"
- // ]
- // };
-
+ // | {
+ // | blah: "blah",
+ // | multi: [
+ // | "thud",
+ // | "thonk"
+ // | ]
+ // | };
+
var ret = {};
- var iq = "input:not([type=file]):not([type=submit]):not([type=image]):not([type=reset]):not([type=button]), select, textarea";
- _d.query(iq, formNode).filter(function(node){
- return (!node.disabled);
- }).forEach(function(item){
+ var exclude = "file|submit|image|reset|button|";
+ _d.forEach(dojo.byId(formNode).elements, function(item){
var _in = item.name;
var type = (item.type||"").toLowerCase();
- if(type == "radio" || type == "checkbox"){
- if(item.checked){ setValue(ret, _in, item.value); }
- }else if(item.multiple){
- ret[_in] = [];
- _d.query("option", item).forEach(function(opt){
- if(opt.selected){
- setValue(ret, _in, opt.value);
- }
- });
- }else{
- setValue(ret, _in, item.value);
+ if(_in && type && exclude.indexOf(type) == -1 && !item.disabled){
+ setValue(ret, _in, _d.fieldToObject(item));
if(type == "image"){
ret[_in+".x"] = ret[_in+".y"] = ret[_in].x = ret[_in].y = 0;
}
}
});
return ret; // Object
}
dojo.objectToQuery = function(/*Object*/ map){
// summary:
- // takes a key/value mapping object and returns a string representing
+ // takes a name/value mapping object and returns a string representing
// a URL-encoded version of that object.
// example:
// this object:
//
// | {
// | blah: "blah",
// | multi: [
// | "thud",
// | "thonk"
// | ]
// | };
//
- // yeilds the following query string:
+ // yields the following query string:
//
// | "blah=blah&multi=thud&multi=thonk"
-
// FIXME: need to implement encodeAscii!!
- var ec = encodeURIComponent;
- var ret = "";
+ var enc = encodeURIComponent;
+ var pairs = [];
var backstop = {};
- for(var x in map){
- if(map[x] != backstop[x]){
- if(_d.isArray(map[x])){
- for(var y=0; y<map[x].length; y++){
- ret += ec(x) + "=" + ec(map[x][y]) + "&";
+ for(var name in map){
+ var value = map[name];
+ if(value != backstop[name]){
+ var assign = enc(name) + "=";
+ if(_d.isArray(value)){
+ for(var i=0; i < value.length; i++){
+ pairs.push(assign + enc(value[i]));
}
}else{
- ret += ec(x) + "=" + ec(map[x]) + "&";
- }
- }
- }
- if(ret.length && ret.charAt(ret.length-1) == "&"){
- ret = ret.substr(0, ret.length-1);
- }
- return ret; // String
+ pairs.push(assign + enc(value));
+ }
+ }
+ }
+ return pairs.join("&"); // String
}
dojo.formToQuery = function(/*DOMNode||String*/ formNode){
// summary:
- // return URL-encoded string representing the form passed as either a
+ // Returns a URL-encoded string representing the form passed as either a
// node or string ID identifying the form to serialize
return _d.objectToQuery(_d.formToObject(formNode)); // String
}
dojo.formToJson = function(/*DOMNode||String*/ formNode, /*Boolean?*/prettyPrint){
// summary:
- // return a serialized JSON string from a form node or string
+ // Create a serialized JSON string from a form node or string
// ID identifying the form to serialize
return _d.toJson(_d.formToObject(formNode), prettyPrint); // String
}
dojo.queryToObject = function(/*String*/ str){
// summary:
- // returns an object representing a de-serialized query section of a
+ // Create an object representing a de-serialized query section of a
// URL. Query keys with multiple values are returned in an array.
- // description:
+ //
+ // example:
// This string:
//
- // "foo=bar&foo=baz&thinger=%20spaces%20=blah&zonk=blarg&"
+ // | "foo=bar&foo=baz&thinger=%20spaces%20=blah&zonk=blarg&"
//
- // returns this object structure:
- //
- // {
- // foo: [ "bar", "baz" ],
- // thinger: " spaces =blah",
- // zonk: "blarg"
- // }
+ // results in this object structure:
+ //
+ // | {
+ // | foo: [ "bar", "baz" ],
+ // | thinger: " spaces =blah",
+ // | zonk: "blarg"
+ // | }
//
// Note that spaces and other urlencoded entities are correctly
// handled.
// FIXME: should we grab the URL string if we're not passed one?
var ret = {};
var qp = str.split("&");
- var dc = decodeURIComponent;
+ var dec = decodeURIComponent;
_d.forEach(qp, function(item){
if(item.length){
var parts = item.split("=");
- var name = dc(parts.shift());
- var val = dc(parts.join("="));
- if(_d.isString(ret[name])){
+ var name = dec(parts.shift());
+ var val = dec(parts.join("="));
+ if(typeof ret[name] == "string"){ // inline'd type check
ret[name] = [ret[name]];
}
+
if(_d.isArray(ret[name])){
ret[name].push(val);
}else{
ret[name] = val;
}
}
});
return ret; // Object
}
- /*
- from refactor.txt:
-
- all bind() replacement APIs take the following argument structure:
-
- {
- url: "blah.html",
-
- // all below are optional, but must be supported in some form by
- // every IO API
- timeout: 1000, // milliseconds
- handleAs: "text", // replaces the always-wrong "mimetype"
- content: {
- key: "value"
- },
-
- // browser-specific, MAY be unsupported
- sync: true, // defaults to false
- form: dojo.byId("someForm")
- }
- */
-
// need to block async callbacks from snatching this thread as the result
// of an async callback might call another sync XHR, this hangs khtml forever
// must checked by watchInFlight()
dojo._blockAsync = false;
- dojo._contentHandlers = {
- "text": function(xhr){ return xhr.responseText; },
- "json": function(xhr){
- if(!djConfig.usePlainJson){
- console.debug("Consider using mimetype:text/json-comment-filtered"
- + " to avoid potential security issues with JSON endpoints"
- + " (use djConfig.usePlainJson=true to turn off this message)");
- }
- return _d.fromJson(xhr.responseText);
+ // MOW: remove dojo._contentHandlers alias in 2.0
+ var handlers = _d._contentHandlers = dojo.contentHandlers = {
+ // summary:
+ // A map of availble XHR transport handle types. Name matches the
+ // `handleAs` attribute passed to XHR calls.
+ //
+ // description:
+ // A map of availble XHR transport handle types. Name matches the
+ // `handleAs` attribute passed to XHR calls. Each contentHandler is
+ // called, passing the xhr object for manipulation. The return value
+ // from the contentHandler will be passed to the `load` or `handle`
+ // functions defined in the original xhr call.
+ //
+ // example:
+ // Creating a custom content-handler:
+ // | dojo.contentHandlers.makeCaps = function(xhr){
+ // | return xhr.responseText.toUpperCase();
+ // | }
+ // | // and later:
+ // | dojo.xhrGet({
+ // | url:"foo.txt",
+ // | handleAs:"makeCaps",
+ // | load: function(data){ /* data is a toUpper version of foo.txt */ }
+ // | });
+
+ text: function(xhr){
+ // summary: A contentHandler which simply returns the plaintext response data
+ return xhr.responseText;
+ },
+ json: function(xhr){
+ // summary: A contentHandler which returns a JavaScript object created from the response data
+ return _d.fromJson(xhr.responseText || null);
},
"json-comment-filtered": function(xhr){
- // NOTE: we provide the json-comment-filtered option as one solution to
- // the "JavaScript Hijacking" issue noted by Fortify and others. It is
- // not appropriate for all circumstances.
+ // summary: A contentHandler which expects comment-filtered JSON.
+ // description:
+ // A contentHandler which expects comment-filtered JSON.
+ // the json-comment-filtered option was implemented to prevent
+ // "JavaScript Hijacking", but it is less secure than standard JSON. Use
+ // standard JSON instead. JSON prefixing can be used to subvert hijacking.
+ //
+ // Will throw a notice suggesting to use application/json mimetype, as
+ // json-commenting can introduce security issues. To decrease the chances of hijacking,
+ // use the standard `json` contentHandler, and prefix your "JSON" with: {}&&
+ //
+ // use djConfig.useCommentedJson = true to turn off the notice
+ if(!dojo.config.useCommentedJson){
+ console.warn("Consider using the standard mimetype:application/json."
+ + " json-commenting can introduce security issues. To"
+ + " decrease the chances of hijacking, use the standard the 'json' handler and"
+ + " prefix your json with: {}&&\n"
+ + "Use djConfig.useCommentedJson=true to turn off this message.");
+ }
var value = xhr.responseText;
var cStartIdx = value.indexOf("\/*");
var cEndIdx = value.lastIndexOf("*\/");
if(cStartIdx == -1 || cEndIdx == -1){
throw new Error("JSON was not comment filtered");
}
return _d.fromJson(value.substring(cStartIdx+2, cEndIdx));
},
- "javascript": function(xhr){
+ javascript: function(xhr){
+ // summary: A contentHandler which evaluates the response data, expecting it to be valid JavaScript
+
// FIXME: try Moz and IE specific eval variants?
return _d.eval(xhr.responseText);
},
- "xml": function(xhr){
- if(_d.isIE && !xhr.responseXML){
- _d.forEach(["MSXML2", "Microsoft", "MSXML", "MSXML3"], function(i){
+ xml: function(xhr){
+ // summary: A contentHandler returning an XML Document parsed from the response data
+ var result = xhr.responseXML;
+ if(_d.isIE && (!result || !result.documentElement)){
+ //WARNING: this branch used by the xml handling in dojo.io.iframe,
+ //so be sure to test dojo.io.iframe if making changes below.
+ var ms = function(n){ return "MSXML" + n + ".DOMDocument"; }
+ var dp = ["Microsoft.XMLDOM", ms(6), ms(4), ms(3), ms(2)];
+ _d.some(dp, function(p){
try{
- var doc = new ActiveXObject(prefixes[i]+".XMLDOM");
- doc.async = false;
- doc.loadXML(xhr.responseText);
- return doc; // DOMDocument
- }catch(e){ /* squelch */ };
+ var dom = new ActiveXObject(p);
+ dom.async = false;
+ dom.loadXML(xhr.responseText);
+ result = dom;
+ }catch(e){ return false; }
+ return true;
});
+ }
+ return result; // DOMDocument
+ },
+ "json-comment-optional": function(xhr){
+ // summary: A contentHandler which checks the presence of comment-filtered JSON and
+ // alternates between the `json` and `json-comment-filtered` contentHandlers.
+ if(xhr.responseText && /^[^{\[]*\/\*/.test(xhr.responseText)){
+ return handlers["json-comment-filtered"](xhr);
}else{
- return xhr.responseXML;
- }
- }
- };
-
- dojo._contentHandlers["json-comment-optional"] = function(xhr){
- var handlers = _d._contentHandlers;
- try{
- return handlers["json-comment-filtered"](xhr);
- }catch(e){
- return handlers["json"](xhr);
+ return handlers["json"](xhr);
+ }
}
};
/*=====
- dojo.__ioArgs = function(kwArgs){
+ dojo.__IoArgs = function(){
// url: String
// URL to server endpoint.
// content: Object?
// Contains properties with string values. These
// properties will be serialized as name1=value2 and
// passed in the request.
// timeout: Integer?
// Milliseconds to wait for the response. If this time
// passes, the then error callbacks are called.
// form: DOMNode?
// DOM node for a form. Used to extract the form values
// and send to the server.
// preventCache: Boolean?
// Default is false. If true, then a
// "dojo.preventCache" parameter is sent in the request
// with a value that changes with each request
// (timestamp). Useful only with GET-type requests.
// handleAs: String?
// Acceptable values depend on the type of IO
// transport (see specific IO calls for more information).
+ // rawBody: String?
+ // Sets the raw body for an HTTP request. If this is used, then the content
+ // property is ignored. This is mostly useful for HTTP methods that have
+ // a body to their requests, like PUT or POST. This property can be used instead
+ // of postData and putData for dojo.rawXhrPost and dojo.rawXhrPut respectively.
+ // ioPublish: Boolean?
+ // Set this explicitly to false to prevent publishing of topics related to
+ // IO operations. Otherwise, if djConfig.ioPublish is set to true, topics
+ // will be published via dojo.publish for different phases of an IO operation.
+ // See dojo.__IoPublish for a list of topics that are published.
// load: Function?
- // function(response, ioArgs){}. response is an Object, ioArgs
- // is of type dojo.__ioCallbackArgs. The load function will be
- // called on a successful response.
+ // This function will be
+ // called on a successful HTTP response code.
// error: Function?
- // function(response, ioArgs){}. response is an Object, ioArgs
- // is of type dojo.__ioCallbackArgs. The error function will
- // be called in an error case.
- // handle: Function
- // function(response, ioArgs){}. response is an Object, ioArgs
- // is of type dojo.__ioCallbackArgs. The handle function will
- // be called in either the successful or error case. For
- // the load, error and handle functions, the ioArgs object
- // will contain the following properties:
+ // This function will
+ // be called when the request fails due to a network or server error, the url
+ // is invalid, etc. It will also be called if the load or handle callback throws an
+ // exception, unless djConfig.debugAtAllCosts is true. This allows deployed applications
+ // to continue to run even when a logic error happens in the callback, while making
+ // it easier to troubleshoot while in debug mode.
+ // handle: Function?
+ // This function will
+ // be called at the end of every request, whether or not an error occurs.
+ this.url = url;
+ this.content = content;
+ this.timeout = timeout;
+ this.form = form;
+ this.preventCache = preventCache;
+ this.handleAs = handleAs;
+ this.ioPublish = ioPublish;
+ this.load = function(response, ioArgs){
+ // ioArgs: dojo.__IoCallbackArgs
+ // Provides additional information about the request.
+ // response: Object
+ // The response in the format as defined with handleAs.
+ }
+ this.error = function(response, ioArgs){
+ // ioArgs: dojo.__IoCallbackArgs
+ // Provides additional information about the request.
+ // response: Object
+ // The response in the format as defined with handleAs.
+ }
+ this.handle = function(loadOrError, response, ioArgs){
+ // loadOrError: String
+ // Provides a string that tells you whether this function
+ // was called because of success (load) or failure (error).
+ // response: Object
+ // The response in the format as defined with handleAs.
+ // ioArgs: dojo.__IoCallbackArgs
+ // Provides additional information about the request.
+ }
}
=====*/
/*=====
- dojo.__ioCallbackArgs = function(kwArgs){
+ dojo.__IoCallbackArgs = function(args, xhr, url, query, handleAs, id, canDelete, json){
// args: Object
// the original object argument to the IO call.
// xhr: XMLHttpRequest
// For XMLHttpRequest calls only, the
// XMLHttpRequest object that was used for the
// request.
// url: String
// The final URL used for the call. Many times it
// will be different than the original args.url
// value.
// query: String
// For non-GET requests, the
// name1=value1&name2=value2 parameters sent up in
// the request.
// handleAs: String
// The final indicator on how the response will be
// handled.
// id: String
// For dojo.io.script calls only, the internal
// script ID used for the request.
// canDelete: Boolean
// For dojo.io.script calls only, indicates
// whether the script tag that represents the
// request can be deleted after callbacks have
// been called. Used internally to know when
// cleanup can happen on JSONP-type requests.
// json: Object
// For dojo.io.script calls only: holds the JSON
// response for JSONP-type requests. Used
// internally to hold on to the JSON responses.
// You should not need to access it directly --
// the same object should be passed to the success
// callbacks directly.
+ this.args = args;
+ this.xhr = xhr;
+ this.url = url;
+ this.query = query;
+ this.handleAs = handleAs;
+ this.id = id;
+ this.canDelete = canDelete;
+ this.json = json;
}
=====*/
-
- dojo._ioSetArgs = function(/*dojo.__ioArgs*/args,
+ /*=====
+ dojo.__IoPublish = function(){
+ // summary:
+ // This is a list of IO topics that can be published
+ // if djConfig.ioPublish is set to true. IO topics can be
+ // published for any Input/Output, network operation. So,
+ // dojo.xhr, dojo.io.script and dojo.io.iframe can all
+ // trigger these topics to be published.
+ // start: String
+ // "/dojo/io/start" is sent when there are no outstanding IO
+ // requests, and a new IO request is started. No arguments
+ // are passed with this topic.
+ // send: String
+ // "/dojo/io/send" is sent whenever a new IO request is started.
+ // It passes the dojo.Deferred for the request with the topic.
+ // load: String
+ // "/dojo/io/load" is sent whenever an IO request has loaded
+ // successfully. It passes the response and the dojo.Deferred
+ // for the request with the topic.
+ // error: String
+ // "/dojo/io/error" is sent whenever an IO request has errored.
+ // It passes the error and the dojo.Deferred
+ // for the request with the topic.
+ // done: String
+ // "/dojo/io/done" is sent whenever an IO request has completed,
+ // either by loading or by erroring. It passes the error and
+ // the dojo.Deferred for the request with the topic.
+ // stop: String
+ // "/dojo/io/stop" is sent when all outstanding IO requests have
+ // finished. No arguments are passed with this topic.
+ this.start = "/dojo/io/start";
+ this.send = "/dojo/io/send";
+ this.load = "/dojo/io/load";
+ this.error = "/dojo/io/error";
+ this.done = "/dojo/io/done";
+ this.stop = "/dojo/io/stop";
+ }
+ =====*/
+
+
+ dojo._ioSetArgs = function(/*dojo.__IoArgs*/args,
/*Function*/canceller,
/*Function*/okHandler,
/*Function*/errHandler){
// summary:
// sets up the Deferred and ioArgs property on the Deferred so it
// can be used in an io call.
// args:
// The args object passed into the public io call. Recognized properties on
// the args object are:
// canceller:
// The canceller function used for the Deferred object. The function
// will receive one argument, the Deferred object that is related to the
// canceller.
// okHandler:
// The first OK callback to be registered with Deferred. It has the opportunity
// to transform the OK response. It will receive one argument -- the Deferred
// object returned from this function.
// errHandler:
// The first error callback to be registered with Deferred. It has the opportunity
// to do cleanup on an error. It will receive two arguments: error (the
// Error object) and dfd, the Deferred object returned from this function.
var ioArgs = {args: args, url: args.url};
//Get values from form if requestd.
var formObject = null;
if(args.form){
var form = _d.byId(args.form);
//IE requires going through getAttributeNode instead of just getAttribute in some form cases,
//so use it for all. See #2844
var actnNode = form.getAttributeNode("action");
ioArgs.url = ioArgs.url || (actnNode ? actnNode.value : null);
formObject = _d.formToObject(form);
}
// set up the query params
var miArgs = [{}];
if(formObject){
// potentially over-ride url-provided params w/ form values
miArgs.push(formObject);
}
if(args.content){
// stuff in content over-rides what's set by form
miArgs.push(args.content);
}
if(args.preventCache){
miArgs.push({"dojo.preventCache": new Date().valueOf()});
}
ioArgs.query = _d.objectToQuery(_d.mixin.apply(null, miArgs));
// .. and the real work of getting the deferred in order, etc.
ioArgs.handleAs = args.handleAs || "text";
var d = new _d.Deferred(canceller);
d.addCallbacks(okHandler, function(error){
return errHandler(error, d);
});
//Support specifying load, error and handle callback functions from the args.
//For those callbacks, the "this" object will be the args object.
//The callbacks will get the deferred result value as the
//first argument and the ioArgs object as the second argument.
var ld = args.load;
if(ld && _d.isFunction(ld)){
d.addCallback(function(value){
return ld.call(args, value, ioArgs);
});
}
var err = args.error;
if(err && _d.isFunction(err)){
d.addErrback(function(value){
return err.call(args, value, ioArgs);
});
}
var handle = args.handle;
if(handle && _d.isFunction(handle)){
d.addBoth(function(value){
return handle.call(args, value, ioArgs);
});
}
-
+
+ //Plug in topic publishing, if dojo.publish is loaded.
+ if(cfg.ioPublish && _d.publish && ioArgs.args.ioPublish !== false){
+ d.addCallbacks(
+ function(res){
+ _d.publish("/dojo/io/load", [d, res]);
+ return res;
+ },
+ function(res){
+ _d.publish("/dojo/io/error", [d, res]);
+ return res;
+ }
+ );
+ d.addBoth(function(res){
+ _d.publish("/dojo/io/done", [d, res]);
+ return res;
+ });
+ }
+
d.ioArgs = ioArgs;
// FIXME: need to wire up the xhr object's abort method to something
// analagous in the Deferred
return d;
}
var _deferredCancel = function(/*Deferred*/dfd){
- //summary: canceller function for dojo._ioSetArgs call.
+ // summary: canceller function for dojo._ioSetArgs call.
dfd.canceled = true;
var xhr = dfd.ioArgs.xhr;
- var _at = (typeof xhr.abort);
- if((_at == "function")||(_at == "unknown")){
+ var _at = typeof xhr.abort;
+ if(_at == "function" || _at == "object" || _at == "unknown"){
xhr.abort();
}
- var err = new Error("xhr cancelled");
- err.dojoType = "cancel";
+ var err = dfd.ioArgs.error;
+ if(!err){
+ err = new Error("xhr cancelled");
+ err.dojoType="cancel";
+ }
return err;
}
var _deferredOk = function(/*Deferred*/dfd){
- //summary: okHandler function for dojo._ioSetArgs call.
-
- return _d._contentHandlers[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);
+ // summary: okHandler function for dojo._ioSetArgs call.
+
+ var ret = handlers[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);
+ return ret === undefined ? null : ret;
}
var _deferError = function(/*Error*/error, /*Deferred*/dfd){
- //summary: errHandler function for dojo._ioSetArgs call.
-
- // console.debug("xhr error in:", dfd.ioArgs.xhr);
- console.debug(error);
+ // summary: errHandler function for dojo._ioSetArgs call.
+
+ if(!dfd.ioArgs.args.failOk){
+ console.error(error);
+ }
return error;
}
- var _makeXhrDeferred = function(/*dojo.__xhrArgs*/args){
- //summary: makes the Deferred object for this xhr request.
- var dfd = _d._ioSetArgs(args, _deferredCancel, _deferredOk, _deferError);
- //Pass the args to _xhrObj, to allow xhr iframe proxy interceptions.
- dfd.ioArgs.xhr = _d._xhrObj(dfd.ioArgs.args);
- return dfd;
- }
-
// avoid setting a timer per request. It degrades performance on IE
// something fierece if we don't use unified loops.
var _inFlightIntvl = null;
var _inFlight = [];
+
+
+ //Use a separate count for knowing if we are starting/stopping io calls.
+ //Cannot use _inFlight.length since it can change at a different time than
+ //when we want to do this kind of test. We only want to decrement the count
+ //after a callback/errback has finished, since the callback/errback should be
+ //considered as part of finishing a request.
+ var _pubCount = 0;
+ var _checkPubCount = function(dfd){
+ if(_pubCount <= 0){
+ _pubCount = 0;
+ if(cfg.ioPublish && _d.publish && (!dfd || dfd && dfd.ioArgs.args.ioPublish !== false)){
+ _d.publish("/dojo/io/stop");
+ }
+ }
+ };
+
var _watchInFlight = function(){
//summary:
// internal method that checks each inflight XMLHttpRequest to see
// if it has completed or if the timeout situation applies.
var now = (new Date()).getTime();
// make sure sync calls stay thread safe, if this callback is called
// during a sync call and this results in another sync call before the
// first sync call ends the browser hangs
if(!_d._blockAsync){
// we need manual loop because we often modify _inFlight (and therefore 'i') while iterating
// note: the second clause is an assigment on purpose, lint may complain
- for(var i=0, tif; (i<_inFlight.length)&&(tif=_inFlight[i]); i++){
+ for(var i = 0, tif; i < _inFlight.length && (tif = _inFlight[i]); i++){
var dfd = tif.dfd;
- try{
+ var func = function(){
if(!dfd || dfd.canceled || !tif.validCheck(dfd)){
_inFlight.splice(i--, 1);
+ _pubCount -= 1;
}else if(tif.ioCheck(dfd)){
_inFlight.splice(i--, 1);
tif.resHandle(dfd);
+ _pubCount -= 1;
}else if(dfd.startTime){
//did we timeout?
- if(dfd.startTime + (dfd.ioArgs.args.timeout||0) < now){
+ if(dfd.startTime + (dfd.ioArgs.args.timeout || 0) < now){
_inFlight.splice(i--, 1);
var err = new Error("timeout exceeded");
err.dojoType = "timeout";
dfd.errback(err);
//Cancel the request so the io module can do appropriate cleanup.
dfd.cancel();
+ _pubCount -= 1;
}
}
- }catch(e){
- // FIXME: make sure we errback!
- console.debug(e);
- dfd.errback(new Error("_watchInFlightError!"));
- }
- }
- }
+ };
+ if(dojo.config.debugAtAllCosts){
+ func.call(this);
+ }else{
+ try{
+ func.call(this);
+ }catch(e){
+ dfd.errback(e);
+ }
+ }
+ }
+ }
+
+ _checkPubCount(dfd);
if(!_inFlight.length){
clearInterval(_inFlightIntvl);
_inFlightIntvl = null;
return;
}
-
}
dojo._ioCancelAll = function(){
//summary: Cancels all pending IO requests, regardless of IO type
//(xhr, script, iframe).
try{
_d.forEach(_inFlight, function(i){
- i.dfd.cancel();
+ try{
+ i.dfd.cancel();
+ }catch(e){/*squelch*/}
});
}catch(e){/*squelch*/}
}
//Automatically call cancel all io calls on unload
//in IE for trac issue #2357.
- if(_d.isIE){
- _d.addOnUnload(_d._ioCancelAll);
- }
-
- _d._ioWatch = function(/*Deferred*/dfd,
- /*Function*/validCheck,
- /*Function*/ioCheck,
- /*Function*/resHandle){
- //summary: watches the io request represented by dfd to see if it completes.
- //dfd:
+ if(_d.isIE){
+ _d.addOnWindowUnload(_d._ioCancelAll);
+ }
+
+ _d._ioNotifyStart = function(/*Deferred*/dfd){
+ // summary:
+ // If dojo.publish is available, publish topics
+ // about the start of a request queue and/or the
+ // the beginning of request.
+ // description:
+ // Used by IO transports. An IO transport should
+ // call this method before making the network connection.
+ if(cfg.ioPublish && _d.publish && dfd.ioArgs.args.ioPublish !== false){
+ if(!_pubCount){
+ _d.publish("/dojo/io/start");
+ }
+ _pubCount += 1;
+ _d.publish("/dojo/io/send", [dfd]);
+ }
+ }
+
+ _d._ioWatch = function(dfd, validCheck, ioCheck, resHandle){
+ // summary:
+ // Watches the io request represented by dfd to see if it completes.
+ // dfd: Deferred
// The Deferred object to watch.
- //validCheck:
+ // validCheck: Function
// Function used to check if the IO request is still valid. Gets the dfd
// object as its only argument.
- //ioCheck:
+ // ioCheck: Function
// Function used to check if basic IO call worked. Gets the dfd
// object as its only argument.
- //resHandle:
+ // resHandle: Function
// Function used to process response. Gets the dfd
// object as its only argument.
- if(dfd.ioArgs.args.timeout){
+ var args = dfd.ioArgs.args;
+ if(args.timeout){
dfd.startTime = (new Date()).getTime();
}
+
_inFlight.push({dfd: dfd, validCheck: validCheck, ioCheck: ioCheck, resHandle: resHandle});
if(!_inFlightIntvl){
_inFlightIntvl = setInterval(_watchInFlight, 50);
}
- _watchInFlight(); // handle sync requests
+ // handle sync requests
+ //A weakness: async calls in flight
+ //could have their handlers called as part of the
+ //_watchInFlight call, before the sync's callbacks
+ // are called.
+ if(args.sync){
+ _watchInFlight();
+ }
}
var _defaultContentType = "application/x-www-form-urlencoded";
var _validCheck = function(/*Deferred*/dfd){
return dfd.ioArgs.xhr.readyState; //boolean
}
var _ioCheck = function(/*Deferred*/dfd){
return 4 == dfd.ioArgs.xhr.readyState; //boolean
}
var _resHandle = function(/*Deferred*/dfd){
- if(_d._isDocumentOk(dfd.ioArgs.xhr)){
+ var xhr = dfd.ioArgs.xhr;
+ if(_d._isDocumentOk(xhr)){
dfd.callback(dfd);
}else{
- dfd.errback(new Error("bad http response code:" + dfd.ioArgs.xhr.status));
- }
- }
-
- var _doIt = function(/*String*/type, /*Deferred*/dfd){
- // IE 6 is a steaming pile. It won't let you call apply() on the native function (xhr.open).
- // workaround for IE6's apply() "issues"
- var ioArgs = dfd.ioArgs;
- var args = ioArgs.args;
- ioArgs.xhr.open(type, ioArgs.url, args.sync !== true, args.user || undefined, args.password || undefined);
- if(args.headers){
- for(var hdr in args.headers){
- if(hdr.toLowerCase() === "content-type" && !args.contentType){
- args.contentType = args.headers[hdr];
- }else{
- ioArgs.xhr.setRequestHeader(hdr, args.headers[hdr]);
- }
- }
- }
- // FIXME: is this appropriate for all content types?
- ioArgs.xhr.setRequestHeader("Content-Type", (args.contentType||_defaultContentType));
- // FIXME: set other headers here!
- try{
- ioArgs.xhr.send(ioArgs.query);
- }catch(e){
- dfd.cancel();
- }
- _d._ioWatch(dfd, _validCheck, _ioCheck, _resHandle);
- return dfd; //Deferred
- }
-
- dojo._ioAddQueryToUrl = function(/*dojo.__ioCallbackArgs*/ioArgs){
+ var err = new Error("Unable to load " + dfd.ioArgs.url + " status:" + xhr.status);
+ err.status = xhr.status;
+ err.responseText = xhr.responseText;
+ dfd.errback(err);
+ }
+ }
+
+ dojo._ioAddQueryToUrl = function(/*dojo.__IoCallbackArgs*/ioArgs){
//summary: Adds query params discovered by the io deferred construction to the URL.
//Only use this for operations which are fundamentally GET-type operations.
if(ioArgs.query.length){
ioArgs.url += (ioArgs.url.indexOf("?") == -1 ? "?" : "&") + ioArgs.query;
ioArgs.query = null;
}
}
/*=====
- dojo.__xhrArgs = function(kwArgs){
+ dojo.declare("dojo.__XhrArgs", dojo.__IoArgs, {
+ constructor: function(){
+ // summary:
+ // In addition to the properties listed for the dojo._IoArgs type,
+ // the following properties are allowed for dojo.xhr* methods.
+ // handleAs: String?
+ // Acceptable values are: text (default), json, json-comment-optional,
+ // json-comment-filtered, javascript, xml. See `dojo.contentHandlers`
+ // sync: Boolean?
+ // false is default. Indicates whether the request should
+ // be a synchronous (blocking) request.
+ // headers: Object?
+ // Additional HTTP headers to send in the request.
+ // failOk: Boolean?
+ // false is default. Indicates whether a request should be
+ // allowed to fail (and therefore no console error message in
+ // the event of a failure)
+ this.handleAs = handleAs;
+ this.sync = sync;
+ this.headers = headers;
+ this.failOk = failOk;
+ }
+ });
+ =====*/
+
+ dojo.xhr = function(/*String*/ method, /*dojo.__XhrArgs*/ args, /*Boolean?*/ hasBody){
// summary:
- // In addition to the properties listed for the dojo.__ioArgs type,
- // the following properties are allowed for dojo.xhr* methods.
- // handleAs:
- // String. Acceptable values are:
- // "text" (default)
- // "json"
- // "json-comment-optional"
- // "json-comment-filtered"
- // "javascript"
- // "xml"
- // sync:
- // Boolean. false is default. Indicates whether the request should
- // be a synchronous (blocking) request.
- // headers:
- // Object. Additional HTTP headers to send in the request.
- }
- =====*/
-
- dojo.xhrGet = function(/*dojo.__xhrArgs*/ args){
+ // Sends an HTTP request with the given method.
+ // description:
+ // Sends an HTTP request with the given method.
+ // See also dojo.xhrGet(), xhrPost(), xhrPut() and dojo.xhrDelete() for shortcuts
+ // for those HTTP methods. There are also methods for "raw" PUT and POST methods
+ // via dojo.rawXhrPut() and dojo.rawXhrPost() respectively.
+ // method:
+ // HTTP method to be used, such as GET, POST, PUT, DELETE. Should be uppercase.
+ // hasBody:
+ // If the request has an HTTP body, then pass true for hasBody.
+
+ //Make the Deferred object for this xhr request.
+ var dfd = _d._ioSetArgs(args, _deferredCancel, _deferredOk, _deferError);
+ var ioArgs = dfd.ioArgs;
+
+ //Pass the args to _xhrObj, to allow alternate XHR calls based specific calls, like
+ //the one used for iframe proxies.
+ var xhr = ioArgs.xhr = _d._xhrObj(ioArgs.args);
+ //If XHR factory fails, cancel the deferred.
+ if(!xhr){
+ dfd.cancel();
+ return dfd;
+ }
+
+ //Allow for specifying the HTTP body completely.
+ if("postData" in args){
+ ioArgs.query = args.postData;
+ }else if("putData" in args){
+ ioArgs.query = args.putData;
+ }else if("rawBody" in args){
+ ioArgs.query = args.rawBody;
+ }else if((arguments.length > 2 && !hasBody) || "POST|PUT".indexOf(method.toUpperCase()) == -1){
+ //Check for hasBody being passed. If no hasBody,
+ //then only append query string if not a POST or PUT request.
+ _d._ioAddQueryToUrl(ioArgs);
+ }
+
+ // IE 6 is a steaming pile. It won't let you call apply() on the native function (xhr.open).
+ // workaround for IE6's apply() "issues"
+ xhr.open(method, ioArgs.url, args.sync !== true, args.user || undefined, args.password || undefined);
+ if(args.headers){
+ for(var hdr in args.headers){
+ if(hdr.toLowerCase() === "content-type" && !args.contentType){
+ args.contentType = args.headers[hdr];
+ }else if(args.headers[hdr]){
+ //Only add header if it has a value. This allows for instnace, skipping
+ //insertion of X-Requested-With by specifying empty value.
+ xhr.setRequestHeader(hdr, args.headers[hdr]);
+ }
+ }
+ }
+ // FIXME: is this appropriate for all content types?
+ xhr.setRequestHeader("Content-Type", args.contentType || _defaultContentType);
+ if(!args.headers || !("X-Requested-With" in args.headers)){
+ xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
+ }
+ // FIXME: set other headers here!
+ _d._ioNotifyStart(dfd);
+ if(dojo.config.debugAtAllCosts){
+ xhr.send(ioArgs.query);
+ }else{
+ try{
+ xhr.send(ioArgs.query);
+ }catch(e){
+ ioArgs.error = e;
+ dfd.cancel();
+ }
+ }
+ _d._ioWatch(dfd, _validCheck, _ioCheck, _resHandle);
+ xhr = null;
+ return dfd; // dojo.Deferred
+ }
+
+ dojo.xhrGet = function(/*dojo.__XhrArgs*/ args){
// summary:
// Sends an HTTP GET request to the server.
- var dfd = _makeXhrDeferred(args);
- _d._ioAddQueryToUrl(dfd.ioArgs);
- return _doIt("GET", dfd); // dojo.Deferred
- }
-
- dojo.xhrPost = function(/*dojo.__xhrArgs*/ args){
- //summary:
- // Sends an HTTP POST request to the server.
- return _doIt("POST", _makeXhrDeferred(args)); // dojo.Deferred
- }
-
- dojo.rawXhrPost = function(/*dojo.__xhrArgs*/ args){
+ return _d.xhr("GET", args); // dojo.Deferred
+ }
+
+ dojo.rawXhrPost = dojo.xhrPost = function(/*dojo.__XhrArgs*/ args){
// summary:
// Sends an HTTP POST request to the server. In addtion to the properties
- // listed for the dojo.__xhrArgs type, the following property is allowed:
+ // listed for the dojo.__XhrArgs type, the following property is allowed:
// postData:
- // String. The raw data to send in the body of the POST request.
- var dfd = _makeXhrDeferred(args);
- dfd.ioArgs.query = args.postData;
- return _doIt("POST", dfd); // dojo.Deferred
- }
-
- dojo.xhrPut = function(/*dojo.__xhrArgs*/ args){
- // summary:
- // Sends an HTTP PUT request to the server.
- return _doIt("PUT", _makeXhrDeferred(args)); // dojo.Deferred
- }
-
- dojo.rawXhrPut = function(/*dojo.__xhrArgs*/ args){
+ // String. Send raw data in the body of the POST request.
+ return _d.xhr("POST", args, true); // dojo.Deferred
+ }
+
+ dojo.rawXhrPut = dojo.xhrPut = function(/*dojo.__XhrArgs*/ args){
// summary:
// Sends an HTTP PUT request to the server. In addtion to the properties
- // listed for the dojo.__xhrArgs type, the following property is allowed:
+ // listed for the dojo.__XhrArgs type, the following property is allowed:
// putData:
- // String. The raw data to send in the body of the PUT request.
- var dfd = _makeXhrDeferred(args);
- var ioArgs = dfd.ioArgs;
- if(args["putData"]){
- ioArgs.query = args.putData;
- args.putData = null;
- }
- return _doIt("PUT", dfd); // dojo.Deferred
- }
-
- dojo.xhrDelete = function(/*dojo.__xhrArgs*/ args){
+ // String. Send raw data in the body of the PUT request.
+ return _d.xhr("PUT", args, true); // dojo.Deferred
+ }
+
+ dojo.xhrDelete = function(/*dojo.__XhrArgs*/ args){
// summary:
// Sends an HTTP DELETE request to the server.
- var dfd = _makeXhrDeferred(args);
- _d._ioAddQueryToUrl(dfd.ioArgs);
- return _doIt("DELETE", dfd); // dojo.Deferred
+ return _d.xhr("DELETE", args); //dojo.Deferred
}
/*
dojo.wrapForm = function(formNode){
//summary:
// A replacement for FormBind, but not implemented yet.
// FIXME: need to think harder about what extensions to this we might
// want. What should we allow folks to do w/ this? What events to
// set/send?
throw new Error("dojo.wrapForm not yet implemented");
}
*/
})();
}
if(!dojo._hasResource["dojo._base.fx"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo._base.fx"] = true;
dojo.provide("dojo._base.fx");
-
/*
- Animation losely package based on Dan Pupius' work, contributed under CLA:
+ Animation loosely package based on Dan Pupius' work, contributed under CLA:
http://pupius.co.uk/js/Toolkit.Drawing.js
*/
-
-dojo._Line = function(/*int*/ start, /*int*/ end){
- // summary:
- // dojo._Line is the object used to generate values from a start value
- // to an end value
- // start: int
- // Beginning value for range
- // end: int
- // Ending value for range
- this.start = start;
- this.end = end;
- this.getValue = function(/*float*/ n){
- // summary: returns the point on the line
+(function(){
+ var d = dojo;
+ var _mixin = d._mixin;
+
+ dojo._Line = function(/*int*/ start, /*int*/ end){
+ // summary:
+ // dojo._Line is the object used to generate values from a start value
+ // to an end value
+ // start: int
+ // Beginning value for range
+ // end: int
+ // Ending value for range
+ this.start = start;
+ this.end = end;
+ };
+
+ dojo._Line.prototype.getValue = function(/*float*/ n){
+ // summary: Returns the point on the line
// n: a floating point number greater than 0 and less than 1
return ((this.end - this.start) * n) + this.start; // Decimal
- }
-}
-
-dojo.declare("dojo._Animation", null, {
- // summary
- // A generic animation object that fires callbacks into it's handlers
- // object at various states
- //
- constructor: function(/*Object*/ args){
- dojo.mixin(this, args);
- if(dojo.isArray(this.curve)){
- /* curve: Array
- pId: a */
- this.curve = new dojo._Line(this.curve[0], this.curve[1]);
- }
- },
+ };
+
+ dojo.Animation = function(args){
+ // summary:
+ // A generic animation class that fires callbacks into its handlers
+ // object at various states.
+ // description:
+ // A generic animation class that fires callbacks into its handlers
+ // object at various states. Nearly all dojo animation functions
+ // return an instance of this method, usually without calling the
+ // .play() method beforehand. Therefore, you will likely need to
+ // call .play() on instances of `dojo.Animation` when one is
+ // returned.
+ // args: Object
+ // The 'magic argument', mixing all the properties into this
+ // animation instance.
+
+ _mixin(this, args);
+ if(d.isArray(this.curve)){
+ this.curve = new d._Line(this.curve[0], this.curve[1]);
+ }
+
+ };
+
+ // Alias to drop come 2.0:
+ d._Animation = d.Animation;
+
+ d.extend(dojo.Animation, {
+ // duration: Integer
+ // The time in milliseonds the animation will take to run
+ duration: 350,
+
+ /*=====
+ // curve: dojo._Line|Array
+ // A two element array of start and end values, or a `dojo._Line` instance to be
+ // used in the Animation.
+ curve: null,
+
+ // easing: Function?
+ // A Function to adjust the acceleration (or deceleration) of the progress
+ // across a dojo._Line
+ easing: null,
+ =====*/
+
+ // repeat: Integer?
+ // The number of times to loop the animation
+ repeat: 0,
+
+ // rate: Integer?
+ // the time in milliseconds to wait before advancing to next frame
+ // (used as a fps timer: 1000/rate = fps)
+ rate: 20 /* 50 fps */,
+
+ /*=====
+ // delay: Integer?
+ // The time in milliseconds to wait before starting animation after it
+ // has been .play()'ed
+ delay: null,
+
+ // beforeBegin: Event?
+ // Synthetic event fired before a dojo.Animation begins playing (synchronous)
+ beforeBegin: null,
+
+ // onBegin: Event?
+ // Synthetic event fired as a dojo.Animation begins playing (useful?)
+ onBegin: null,
+
+ // onAnimate: Event?
+ // Synthetic event fired at each interval of a `dojo.Animation`
+ onAnimate: null,
+
+ // onEnd: Event?
+ // Synthetic event fired after the final frame of a `dojo.Animation`
+ onEnd: null,
+
+ // onPlay: Event?
+ // Synthetic event fired any time a `dojo.Animation` is play()'ed
+ onPlay: null,
+
+ // onPause: Event?
+ // Synthetic event fired when a `dojo.Animation` is paused
+ onPause: null,
+
+ // onStop: Event
+ // Synthetic event fires when a `dojo.Animation` is stopped
+ onStop: null,
+
+ =====*/
- // duration: Integer
- // The time in milliseonds the animation will take to run
- duration: 1000,
-
-/*=====
- // curve: dojo._Line||Array
- // A two element array of start and end values, or a dojo._Line instance to be
- // used in the Animation.
- curve: null,
-
- // easing: Function
- // A Function to adjust the acceleration (or deceleration) of the progress
- // across a dojo._Line
- easing: null,
-=====*/
-
- // repeat: Integer
- // The number of times to loop the animation
- repeat: 0,
-
- // rate: Integer
- // the time in milliseconds to wait before advancing to next frame
- // (used as a fps timer: rate/1000 = fps)
- rate: 10 /* 100 fps */,
-
-/*=====
- // delay: Integer
- // The time in milliseconds to wait before starting animation after it has been .play()'ed
- delay: null,
-
- // events
- //
- // beforeBegin: Event
- // Synthetic event fired before a dojo._Animation begins playing (synhcronous)
- beforeBegin: null,
-
- // onBegin: Event
- // Synthetic event fired as a dojo._Animation begins playing (useful?)
- onBegin: null,
-
- // onAnimate: Event
- // Synthetic event fired at each interval of a dojo._Animation
- onAnimate: null,
-
- // onEnd: Event
- // Synthetic event fired after the final frame of a dojo._Animation
- onEnd: null,
-
- // ???
- onPlay: null,
-
- // onPause: Event
- // Synthetic event fired when a dojo._Animation is paused
- onPause: null,
-
- // onStop: Event
- // Synthetic event fires when a dojo._Animation is stopped
- onStop: null,
-
-=====*/
-
- _percent: 0,
- _startRepeatCount: 0,
-
- fire: function(/*Event*/ evt, /*Array?*/ args){
- // summary:
- // Convenience function. Fire event "evt" and pass it the
- // arguments specified in "args".
- // evt:
- // The event to fire.
- // args:
- // The arguments to pass to the event.
- if(this[evt]){
- this[evt].apply(this, args||[]);
- }
- return this; // dojo._Animation
- },
-
- play: function(/*int?*/ delay, /*Boolean?*/ gotoStart){
- // summary:
- // Start the animation.
- // delay:
- // How many milliseconds to delay before starting.
- // gotoStart:
- // If true, starts the animation from the beginning; otherwise,
- // starts it from its current position.
- var _t = this;
- if(gotoStart){
+ _percent: 0,
+ _startRepeatCount: 0,
+
+ _getStep: function(){
+ var _p = this._percent,
+ _e = this.easing
+ ;
+ return _e ? _e(_p) : _p;
+ },
+ _fire: function(/*Event*/ evt, /*Array?*/ args){
+ // summary:
+ // Convenience function. Fire event "evt" and pass it the
+ // arguments specified in "args".
+ // description:
+ // Convenience function. Fire event "evt" and pass it the
+ // arguments specified in "args".
+ // Fires the callback in the scope of the `dojo.Animation`
+ // instance.
+ // evt:
+ // The event to fire.
+ // args:
+ // The arguments to pass to the event.
+ var a = args||[];
+ if(this[evt]){
+ if(d.config.debugAtAllCosts){
+ this[evt].apply(this, a);
+ }else{
+ try{
+ this[evt].apply(this, a);
+ }catch(e){
+ // squelch and log because we shouldn't allow exceptions in
+ // synthetic event handlers to cause the internal timer to run
+ // amuck, potentially pegging the CPU. I'm not a fan of this
+ // squelch, but hopefully logging will make it clear what's
+ // going on
+ console.error("exception in animation handler for:", evt);
+ console.error(e);
+ }
+ }
+ }
+ return this; // dojo.Animation
+ },
+
+ play: function(/*int?*/ delay, /*Boolean?*/ gotoStart){
+ // summary:
+ // Start the animation.
+ // delay:
+ // How many milliseconds to delay before starting.
+ // gotoStart:
+ // If true, starts the animation from the beginning; otherwise,
+ // starts it from its current position.
+ // returns: dojo.Animation
+ // The instance to allow chaining.
+
+ var _t = this;
+ if(_t._delayTimer){ _t._clearTimer(); }
+ if(gotoStart){
+ _t._stopTimer();
+ _t._active = _t._paused = false;
+ _t._percent = 0;
+ }else if(_t._active && !_t._paused){
+ return _t;
+ }
+
+ _t._fire("beforeBegin", [_t.node]);
+
+ var de = delay || _t.delay,
+ _p = dojo.hitch(_t, "_play", gotoStart);
+
+ if(de > 0){
+ _t._delayTimer = setTimeout(_p, de);
+ return _t;
+ }
+ _p();
+ return _t;
+ },
+
+ _play: function(gotoStart){
+ var _t = this;
+ if(_t._delayTimer){ _t._clearTimer(); }
+ _t._startTime = new Date().valueOf();
+ if(_t._paused){
+ _t._startTime -= _t.duration * _t._percent;
+ }
+ _t._endTime = _t._startTime + _t.duration;
+
+ _t._active = true;
+ _t._paused = false;
+ var value = _t.curve.getValue(_t._getStep());
+ if(!_t._percent){
+ if(!_t._startRepeatCount){
+ _t._startRepeatCount = _t.repeat;
+ }
+ _t._fire("onBegin", [value]);
+ }
+
+ _t._fire("onPlay", [value]);
+
+ _t._cycle();
+ return _t; // dojo.Animation
+ },
+
+ pause: function(){
+ // summary: Pauses a running animation.
+ var _t = this;
+ if(_t._delayTimer){ _t._clearTimer(); }
_t._stopTimer();
+ if(!_t._active){ return _t; /*dojo.Animation*/ }
+ _t._paused = true;
+ _t._fire("onPause", [_t.curve.getValue(_t._getStep())]);
+ return _t; // dojo.Animation
+ },
+
+ gotoPercent: function(/*Decimal*/ percent, /*Boolean?*/ andPlay){
+ // summary:
+ // Sets the progress of the animation.
+ // percent:
+ // A percentage in decimal notation (between and including 0.0 and 1.0).
+ // andPlay:
+ // If true, play the animation after setting the progress.
+ var _t = this;
+ _t._stopTimer();
+ _t._active = _t._paused = true;
+ _t._percent = percent;
+ if(andPlay){ _t.play(); }
+ return _t; // dojo.Animation
+ },
+
+ stop: function(/*boolean?*/ gotoEnd){
+ // summary: Stops a running animation.
+ // gotoEnd: If true, the animation will end.
+ var _t = this;
+ if(_t._delayTimer){ _t._clearTimer(); }
+ if(!_t._timer){ return _t; /* dojo.Animation */ }
+ _t._stopTimer();
+ if(gotoEnd){
+ _t._percent = 1;
+ }
+ _t._fire("onStop", [_t.curve.getValue(_t._getStep())]);
_t._active = _t._paused = false;
- _t._percent = 0;
- }else if(_t._active && !_t._paused){
- return _t; // dojo._Animation
- }
-
- _t.fire("beforeBegin");
-
- var d = delay||_t.delay;
- var _p = dojo.hitch(_t, "_play", gotoStart);
- if(d > 0){
- setTimeout(_p, d);
- return _t; // dojo._Animation
- }
- _p();
- return _t;
- },
-
- _play: function(gotoStart){
- var _t = this;
- _t._startTime = new Date().valueOf();
- if(_t._paused){
- _t._startTime -= _t.duration * _t._percent;
- }
- _t._endTime = _t._startTime + _t.duration;
-
- _t._active = true;
- _t._paused = false;
-
- var value = _t.curve.getValue(_t._percent);
- if(!_t._percent){
- if(!_t._startRepeatCount){
- _t._startRepeatCount = _t.repeat;
- }
- _t.fire("onBegin", [value]);
- }
-
- _t.fire("onPlay", [value]);
-
- _t._cycle();
- return _t; // dojo._Animation
- },
-
- pause: function(){
- // summary: Pauses a running animation.
- this._stopTimer();
- if(!this._active){ return this; /*dojo._Animation*/}
- this._paused = true;
- this.fire("onPause", [this.curve.getValue(this._percent)]);
- return this; // dojo._Animation
- },
-
- gotoPercent: function(/*Decimal*/ percent, /*Boolean?*/ andPlay){
- // summary:
- // Sets the progress of the animation.
- // percent:
- // A percentage in decimal notation (between and including 0.0 and 1.0).
- // andPlay:
- // If true, play the animation after setting the progress.
- this._stopTimer();
- this._active = this._paused = true;
- this._percent = percent;
- if(andPlay){ this.play(); }
- return this; // dojo._Animation
- },
-
- stop: function(/*boolean?*/ gotoEnd){
- // summary: Stops a running animation.
- // gotoEnd: If true, the animation will end.
- if(!this._timer){ return; }
- this._stopTimer();
- if(gotoEnd){
- this._percent = 1;
- }
- this.fire("onStop", [this.curve.getValue(this._percent)]);
- this._active = this._paused = false;
- return this; // dojo._Animation
- },
-
- status: function(){
- // summary: Returns a string token representation of the status of
- // the animation, one of: "paused", "playing", "stopped"
- if(this._active){
- return this._paused ? "paused" : "playing"; // String
- }
- return "stopped"; // String
- },
-
- _cycle: function(){
- var _t = this;
- if(_t._active){
- var curr = new Date().valueOf();
- var step = (curr - _t._startTime) / (_t._endTime - _t._startTime);
-
- if(step >= 1){
- step = 1;
- }
- _t._percent = step;
-
- // Perform easing
- if(_t.easing){
- step = _t.easing(step);
- }
-
- _t.fire("onAnimate", [_t.curve.getValue(step)]);
-
- if(step < 1){
- _t._startTimer();
- }else{
- _t._active = false;
-
- if(_t.repeat > 0){
- _t.repeat--;
- _t.play(null, true);
- }else if(_t.repeat == -1){
- _t.play(null, true);
+ return _t; // dojo.Animation
+ },
+
+ status: function(){
+ // summary:
+ // Returns a string token representation of the status of
+ // the animation, one of: "paused", "playing", "stopped"
+ if(this._active){
+ return this._paused ? "paused" : "playing"; // String
+ }
+ return "stopped"; // String
+ },
+
+ _cycle: function(){
+ var _t = this;
+ if(_t._active){
+ var curr = new Date().valueOf();
+ var step = (curr - _t._startTime) / (_t._endTime - _t._startTime);
+
+ if(step >= 1){
+ step = 1;
+ }
+ _t._percent = step;
+
+ // Perform easing
+ if(_t.easing){
+ step = _t.easing(step);
+ }
+
+ _t._fire("onAnimate", [_t.curve.getValue(step)]);
+
+ if(_t._percent < 1){
+ _t._startTimer();
}else{
- if(_t._startRepeatCount){
- _t.repeat = _t._startRepeatCount;
- _t._startRepeatCount = 0;
+ _t._active = false;
+
+ if(_t.repeat > 0){
+ _t.repeat--;
+ _t.play(null, true);
+ }else if(_t.repeat == -1){
+ _t.play(null, true);
+ }else{
+ if(_t._startRepeatCount){
+ _t.repeat = _t._startRepeatCount;
+ _t._startRepeatCount = 0;
+ }
}
- }
- _t._percent = 0;
- _t.fire("onEnd");
- }
- }
- return _t; // dojo._Animation
- }
-});
-
-(function(){
- var d = dojo;
- var ctr = 0;
- var _globalTimerList = [];
- var runner = {
- run: function(){}
- };
- var timer = null;
- dojo._Animation.prototype._startTimer = function(){
- // this._timer = setTimeout(dojo.hitch(this, "_cycle"), this.rate);
- if(!this._timer){
- this._timer = dojo.connect(runner, "run", this, "_cycle");
- ctr++;
- }
- if(!timer){
- timer = setInterval(dojo.hitch(runner, "run"), this.rate);
- }
- };
-
- dojo._Animation.prototype._stopTimer = function(){
- dojo.disconnect(this._timer);
- this._timer = null;
- ctr--;
- if(!ctr){
- clearInterval(timer);
- timer = null;
- }
- };
-
- var _makeFadeable = (d.isIE) ? function(node){
- // only set the zoom if the "tickle" value would be the same as the
- // default
- var ns = node.style;
- if(!ns.zoom.length && d.style(node, "zoom") == "normal"){
- // make sure the node "hasLayout"
- // NOTE: this has been tested with larger and smaller user-set text
- // sizes and works fine
- ns.zoom = "1";
- // node.style.zoom = "normal";
- }
- // don't set the width to auto if it didn't already cascade that way.
- // We don't want to f anyones designs
- if(!ns.width.length && d.style(node, "width") == "auto"){
- ns.width = "auto";
- }
- } : function(){};
+ _t._percent = 0;
+ _t._fire("onEnd", [_t.node]);
+ !_t.repeat && _t._stopTimer();
+ }
+ }
+ return _t; // dojo.Animation
+ },
+
+ _clearTimer: function(){
+ // summary: Clear the play delay timer
+ clearTimeout(this._delayTimer);
+ delete this._delayTimer;
+ }
+
+ });
+
+ // the local timer, stubbed into all Animation instances
+ var ctr = 0,
+ _globalTimerList = [],
+ timer = null,
+ runner = {
+ run: function(){}
+ };
+
+ d.extend(d.Animation, {
+
+ _startTimer: function(){
+ if(!this._timer){
+ this._timer = d.connect(runner, "run", this, "_cycle");
+ ctr++;
+ }
+ if(!timer){
+ timer = setInterval(d.hitch(runner, "run"), this.rate);
+ }
+ },
+
+ _stopTimer: function(){
+ if(this._timer){
+ d.disconnect(this._timer);
+ this._timer = null;
+ ctr--;
+ }
+ if(ctr <= 0){
+ clearInterval(timer);
+ timer = null;
+ ctr = 0;
+ }
+ }
+
+ });
+
+ var _makeFadeable =
+ d.isIE ? function(node){
+ // only set the zoom if the "tickle" value would be the same as the
+ // default
+ var ns = node.style;
+ // don't set the width to auto if it didn't already cascade that way.
+ // We don't want to f anyones designs
+ if(!ns.width.length && d.style(node, "width") == "auto"){
+ ns.width = "auto";
+ }
+ } :
+ function(){};
dojo._fade = function(/*Object*/ args){
// summary:
// Returns an animation that will fade the node defined by
// args.node from the start to end values passed (args.start
// args.end) (end is mandatory, start is optional)
args.node = d.byId(args.node);
- var fArgs = d.mixin({ properties: {} }, args);
- var props = (fArgs.properties.opacity = {});
+ var fArgs = _mixin({ properties: {} }, args),
+ props = (fArgs.properties.opacity = {});
+
props.start = !("start" in fArgs) ?
- function(){ return Number(d.style(fArgs.node, "opacity")); } : fArgs.start;
+ function(){
+ return +d.style(fArgs.node, "opacity")||0;
+ } : fArgs.start;
props.end = fArgs.end;
var anim = d.animateProperty(fArgs);
d.connect(anim, "beforeBegin", d.partial(_makeFadeable, fArgs.node));
- return anim; // dojo._Animation
- }
+ return anim; // dojo.Animation
+ };
/*=====
- dojo.__fadeArgs = function(kwArgs){
+ dojo.__FadeArgs = function(node, duration, easing){
+ // node: DOMNode|String
+ // The node referenced in the animation
// duration: Integer?
// Duration of the animation in milliseconds.
- // easing: Function?
+ // easing: Function?
// An easing function.
+ this.node = node;
+ this.duration = duration;
+ this.easing = easing;
}
=====*/
- dojo.fadeIn = function(/*dojo.__fadeArgs*/ args){
+ dojo.fadeIn = function(/*dojo.__FadeArgs*/ args){
// summary:
// Returns an animation that will fade node defined in 'args' from
// its current opacity to fully opaque.
- return d._fade(d.mixin({ end: 1 }, args)); // dojo._Animation
- }
-
- dojo.fadeOut = function(/*dojo.__fadeArgs*/ args){
+ return d._fade(_mixin({ end: 1 }, args)); // dojo.Animation
+ };
+
+ dojo.fadeOut = function(/*dojo.__FadeArgs*/ args){
// summary:
// Returns an animation that will fade node defined in 'args'
// from its current opacity to fully transparent.
- return d._fade(d.mixin({ end: 0 }, args)); // dojo._Animation
- }
+ return d._fade(_mixin({ end: 0 }, args)); // dojo.Animation
+ };
dojo._defaultEasing = function(/*Decimal?*/ n){
- // summary: The default easing function for dojo._Animation(s)
- return 0.5 + ((Math.sin((n + 1.5) * Math.PI))/2);
- }
+ // summary: The default easing function for dojo.Animation(s)
+ return 0.5 + ((Math.sin((n + 1.5) * Math.PI)) / 2);
+ };
var PropLine = function(properties){
+ // PropLine is an internal class which is used to model the values of
+ // an a group of CSS properties across an animation lifecycle. In
+ // particular, the "getValue" function handles getting interpolated
+ // values between start and end for a particular CSS value.
this._properties = properties;
for(var p in properties){
var prop = properties[p];
if(prop.start instanceof d.Color){
// create a reusable temp color object to keep intermediate results
prop.tempColor = new d.Color();
}
}
- this.getValue = function(r){
- var ret = {};
- for(var p in this._properties){
- var prop = this._properties[p];
- var start = prop.start;
- if(start instanceof d.Color){
- ret[p] = d.blendColors(start, prop.end, r, prop.tempColor).toCss();
- }else if(!d.isArray(start)){
- ret[p] = ((prop.end - start) * r) + start + (p != "opacity" ? prop.units||"px" : "");
- }
- }
- return ret;
- }
- }
-
- dojo.animateProperty = function(/*Object*/ args){
- // summary:
+ };
+
+ PropLine.prototype.getValue = function(r){
+ var ret = {};
+ for(var p in this._properties){
+ var prop = this._properties[p],
+ start = prop.start;
+ if(start instanceof d.Color){
+ ret[p] = d.blendColors(start, prop.end, r, prop.tempColor).toCss();
+ }else if(!d.isArray(start)){
+ ret[p] = ((prop.end - start) * r) + start + (p != "opacity" ? prop.units || "px" : 0);
+ }
+ }
+ return ret;
+ };
+
+ /*=====
+ dojo.declare("dojo.__AnimArgs", [dojo.__FadeArgs], {
+ // Properties: Object?
+ // A hash map of style properties to Objects describing the transition,
+ // such as the properties of dojo._Line with an additional 'units' property
+ properties: {}
+
+ //TODOC: add event callbacks
+ });
+ =====*/
+
+ dojo.animateProperty = function(/*dojo.__AnimArgs*/ args){
+ // summary:
// Returns an animation that will transition the properties of
- // node defined in 'args' depending how they are defined in
- // 'args.properties'
+ // node defined in `args` depending how they are defined in
+ // `args.properties`
//
// description:
- // The foundation of most dojo.fx animations, dojo.AnimateProperty
- // will take an object of "properties" corresponding to style
- // properties, and animate them in parallel over a set duration.
+ // `dojo.animateProperty` is the foundation of most `dojo.fx`
+ // animations. It takes an object of "properties" corresponding to
+ // style properties, and animates them in parallel over a set
+ // duration.
//
- // args.node can be a String or a DomNode reference
- //
- // example:
+ // example:
+ // A simple animation that changes the width of the specified node.
+ // | dojo.animateProperty({
+ // | node: "nodeId",
+ // | properties: { width: 400 },
+ // | }).play();
+ // Dojo figures out the start value for the width and converts the
+ // integer specified for the width to the more expressive but
+ // verbose form `{ width: { end: '400', units: 'px' } }` which you
+ // can also specify directly. Defaults to 'px' if ommitted.
+ //
+ // example:
+ // Animate width, height, and padding over 2 seconds... the
+ // pedantic way:
// | dojo.animateProperty({ node: node, duration:2000,
// | properties: {
- // | width: { start: '200', end: '400', unit:"px" },
- // | height: { start:'200', end: '400', unit:"px" },
- // | paddingTop: { start:'5', end:'50', unit:"px" }
+ // | width: { start: '200', end: '400', units:"px" },
+ // | height: { start:'200', end: '400', units:"px" },
+ // | paddingTop: { start:'5', end:'50', units:"px" }
// | }
// | }).play();
- //
-
- args.node = d.byId(args.node);
+ // Note 'paddingTop' is used over 'padding-top'. Multi-name CSS properties
+ // are written using "mixed case", as the hyphen is illegal as an object key.
+ //
+ // example:
+ // Plug in a different easing function and register a callback for
+ // when the animation ends. Easing functions accept values between
+ // zero and one and return a value on that basis. In this case, an
+ // exponential-in curve.
+ // | dojo.animateProperty({
+ // | node: "nodeId",
+ // | // dojo figures out the start value
+ // | properties: { width: { end: 400 } },
+ // | easing: function(n){
+ // | return (n==0) ? 0 : Math.pow(2, 10 * (n - 1));
+ // | },
+ // | onEnd: function(node){
+ // | // called when the animation finishes. The animation
+ // | // target is passed to this function
+ // | }
+ // | }).play(500); // delay playing half a second
+ //
+ // example:
+ // Like all `dojo.Animation`s, animateProperty returns a handle to the
+ // Animation instance, which fires the events common to Dojo FX. Use `dojo.connect`
+ // to access these events outside of the Animation definiton:
+ // | var anim = dojo.animateProperty({
+ // | node:"someId",
+ // | properties:{
+ // | width:400, height:500
+ // | }
+ // | });
+ // | dojo.connect(anim,"onEnd", function(){
+ // | console.log("animation ended");
+ // | });
+ // | // play the animation now:
+ // | anim.play();
+ //
+ // example:
+ // Each property can be a function whose return value is substituted along.
+ // Additionally, each measurement (eg: start, end) can be a function. The node
+ // reference is passed direcly to callbacks.
+ // | dojo.animateProperty({
+ // | node:"mine",
+ // | properties:{
+ // | height:function(node){
+ // | // shrink this node by 50%
+ // | return dojo.position(node).h / 2
+ // | },
+ // | width:{
+ // | start:function(node){ return 100; },
+ // | end:function(node){ return 200; }
+ // | }
+ // | }
+ // | }).play();
+ //
+
+ var n = args.node = d.byId(args.node);
if(!args.easing){ args.easing = d._defaultEasing; }
- var anim = new d._Animation(args);
+ var anim = new d.Animation(args);
d.connect(anim, "beforeBegin", anim, function(){
var pm = {};
for(var p in this.properties){
- // Make shallow copy of properties into pm because we overwrite some values below.
- // In particular if start/end are functions we don't want to overwrite them or
- // the functions won't be called if the animation is reused.
- var prop = (pm[p] = d.mixin({}, this.properties[p]));
+ // Make shallow copy of properties into pm because we overwrite
+ // some values below. In particular if start/end are functions
+ // we don't want to overwrite them or the functions won't be
+ // called if the animation is reused.
+ if(p == "width" || p == "height"){
+ this.node.display = "block";
+ }
+ var prop = this.properties[p];
+ if(d.isFunction(prop)){
+ prop = prop(n);
+ }
+ prop = pm[p] = _mixin({}, (d.isObject(prop) ? prop: { end: prop }));
if(d.isFunction(prop.start)){
- prop.start = prop.start();
+ prop.start = prop.start(n);
}
if(d.isFunction(prop.end)){
- prop.end = prop.end();
- }
-
+ prop.end = prop.end(n);
+ }
var isColor = (p.toLowerCase().indexOf("color") >= 0);
function getStyle(node, p){
// dojo.style(node, "height") can return "auto" or "" on IE; this is more reliable:
- var v = ({height: node.offsetHeight, width: node.offsetWidth})[p];
+ var v = { height: node.offsetHeight, width: node.offsetWidth }[p];
if(v !== undefined){ return v; }
v = d.style(node, p);
- return (p=="opacity") ? Number(v) : parseFloat(v);
+ return (p == "opacity") ? +v : (isColor ? v : parseFloat(v));
}
if(!("end" in prop)){
- prop.end = getStyle(this.node, p);
+ prop.end = getStyle(n, p);
}else if(!("start" in prop)){
- prop.start = getStyle(this.node, p);
+ prop.start = getStyle(n, p);
}
if(isColor){
- // console.debug("it's a color!");
prop.start = new d.Color(prop.start);
prop.end = new d.Color(prop.end);
}else{
- prop.start = (p == "opacity") ? Number(prop.start) : parseFloat(prop.start);
- }
- // console.debug("start:", prop.start);
- // console.debug("end:", prop.end);
+ prop.start = (p == "opacity") ? +prop.start : parseFloat(prop.start);
+ }
}
this.curve = new PropLine(pm);
});
- d.connect(anim, "onAnimate", anim, function(propValues){
- // try{
- for(var s in propValues){
- // console.debug(s, propValues[s], this.node.style[s]);
- d.style(this.node, s, propValues[s]);
- // this.node.style[s] = propValues[s];
- }
- // }catch(e){ console.debug(dojo.toJson(e)); }
- });
- return anim; // dojo._Animation
- }
+ d.connect(anim, "onAnimate", d.hitch(d, "style", anim.node));
+ return anim; // dojo.Animation
+ };
+
+ dojo.anim = function( /*DOMNode|String*/ node,
+ /*Object*/ properties,
+ /*Integer?*/ duration,
+ /*Function?*/ easing,
+ /*Function?*/ onEnd,
+ /*Integer?*/ delay){
+ // summary:
+ // A simpler interface to `dojo.animateProperty()`, also returns
+ // an instance of `dojo.Animation` but begins the animation
+ // immediately, unlike nearly every other Dojo animation API.
+ // description:
+ // `dojo.anim` is a simpler (but somewhat less powerful) version
+ // of `dojo.animateProperty`. It uses defaults for many basic properties
+ // and allows for positional parameters to be used in place of the
+ // packed "property bag" which is used for other Dojo animation
+ // methods.
+ //
+ // The `dojo.Animation` object returned from `dojo.anim` will be
+ // already playing when it is returned from this function, so
+ // calling play() on it again is (usually) a no-op.
+ // node:
+ // a DOM node or the id of a node to animate CSS properties on
+ // duration:
+ // The number of milliseconds over which the animation
+ // should run. Defaults to the global animation default duration
+ // (350ms).
+ // easing:
+ // An easing function over which to calculate acceleration
+ // and deceleration of the animation through its duration.
+ // A default easing algorithm is provided, but you may
+ // plug in any you wish. A large selection of easing algorithms
+ // are available in `dojo.fx.easing`.
+ // onEnd:
+ // A function to be called when the animation finishes
+ // running.
+ // delay:
+ // The number of milliseconds to delay beginning the
+ // animation by. The default is 0.
+ // example:
+ // Fade out a node
+ // | dojo.anim("id", { opacity: 0 });
+ // example:
+ // Fade out a node over a full second
+ // | dojo.anim("id", { opacity: 0 }, 1000);
+ return d.animateProperty({ // dojo.Animation
+ node: node,
+ duration: duration || d.Animation.prototype.duration,
+ properties: properties,
+ easing: easing,
+ onEnd: onEnd
+ }).play(delay || 0);
+ };
})();
}
+if(!dojo._hasResource["dojo._base.browser"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojo._base.browser"] = true;
+dojo.provide("dojo._base.browser");
+
+
+
+
+
+
+
+
+
+
+//Need this to be the last code segment in base, so do not place any
+//dojo.requireIf calls in this file. Otherwise, due to how the build system
+//puts all requireIf dependencies after the current file, the require calls
+//could be called before all of base is defined.
+dojo.forEach(dojo.config.require, function(i){
+ dojo["require"](i);
+});
+
+}
+
+ //INSERT dojo.i18n._preloadLocalizations HERE
+
+ if(dojo.config.afterOnLoad && dojo.isBrowser){
+ //Dojo is being added to the page after page load, so just trigger
+ //the init sequence after a timeout. Using a timeout so the rest of this
+ //script gets evaluated properly. This work needs to happen after the
+ //dojo.config.require work done in dojo._base.
+ window.setTimeout(dojo._loadInit, 1000);
+ }
+
+})();
+
diff --git a/js/dojo/dojo/fx.js b/js/dojo/dojo/fx.js
--- a/js/dojo/dojo/fx.js
+++ b/js/dojo/dojo/fx.js
@@ -1,239 +1,252 @@
-if(!dojo._hasResource["dojo.fx"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.fx"] = true;
-dojo.provide("dojo.fx");
-dojo.provide("dojo.fx.Toggler");
-
-dojo.fx.chain = function(/*dojo._Animation[]*/ animations){
- // summary: Chain a list of dojo._Animation s to run in sequence
- // example:
- // | dojo.fx.chain([
- // | dojo.fadeIn({ node:node }),
- // | dojo.fadeOut({ node:otherNode })
- // | ]).play();
- //
- var first = animations.shift();
- var previous = first;
- dojo.forEach(animations, function(current){
- dojo.connect(previous, "onEnd", current, "play");
- previous = current;
- });
- return first; // dojo._Animation
-};
-
-dojo.fx.combine = function(/*dojo._Animation[]*/ animations){
- // summary: Combine a list of dojo._Animation s to run in parallel
- // example:
- // | dojo.fx.combine([
- // | dojo.fadeIn({ node:node }),
- // | dojo.fadeOut({ node:otherNode })
- // | ]).play();
- var ctr = new dojo._Animation({ curve: [0, 1] });
- if(!animations.length){ return ctr; }
- // animations.sort(function(a, b){ return a.duration-b.duration; });
- ctr.duration = animations[0].duration;
- dojo.forEach(animations, function(current){
- dojo.forEach([ "play", "pause", "stop" ],
- function(e){
- if(current[e]){
- dojo.connect(ctr, e, current, e);
- }
- }
- );
- });
- return ctr; // dojo._Animation
-};
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.declare("dojo.fx.Toggler", null, {
- // summary:
- // class constructor for an animation toggler. It accepts a packed
- // set of arguments about what type of animation to use in each
- // direction, duration, etc.
- //
- // example:
- // | var t = new dojo.fx.Toggler({
- // | node: "nodeId",
- // | showDuration: 500,
- // | // hideDuration will default to "200"
- // | showFunc: dojo.wipeIn,
- // | // hideFunc will default to "fadeOut"
- // | });
- // | t.show(100); // delay showing for 100ms
- // | // ...time passes...
- // | t.hide();
-
- // FIXME: need a policy for where the toggler should "be" the next
- // time show/hide are called if we're stopped somewhere in the
- // middle.
-
- constructor: function(args){
- var _t = this;
-
- dojo.mixin(_t, args);
- _t.node = args.node;
- _t._showArgs = dojo.mixin({}, args);
- _t._showArgs.node = _t.node;
- _t._showArgs.duration = _t.showDuration;
- _t.showAnim = _t.showFunc(_t._showArgs);
-
- _t._hideArgs = dojo.mixin({}, args);
- _t._hideArgs.node = _t.node;
- _t._hideArgs.duration = _t.hideDuration;
- _t.hideAnim = _t.hideFunc(_t._hideArgs);
-
- dojo.connect(_t.showAnim, "beforeBegin", dojo.hitch(_t.hideAnim, "stop", true));
- dojo.connect(_t.hideAnim, "beforeBegin", dojo.hitch(_t.showAnim, "stop", true));
- },
-
- // node: DomNode
- // the node to toggle
- node: null,
-
- // showFunc: Function
- // The function that returns the dojo._Animation to show the node
- showFunc: dojo.fadeIn,
-
- // hideFunc: Function
- // The function that returns the dojo._Animation to hide the node
- hideFunc: dojo.fadeOut,
-
- // showDuration:
- // Time in milliseconds to run the show Animation
- showDuration: 200,
-
- // hideDuration:
- // Time in milliseconds to run the hide Animation
- hideDuration: 200,
-
- /*=====
- _showArgs: null,
- _showAnim: null,
-
- _hideArgs: null,
- _hideAnim: null,
-
- _isShowing: false,
- _isHiding: false,
- =====*/
- show: function(delay){
- // summary: Toggle the node to showing
- return this.showAnim.play(delay || 0);
- },
-
- hide: function(delay){
- // summary: Toggle the node to hidden
- return this.hideAnim.play(delay || 0);
- }
+if(!dojo._hasResource["dojo.fx"]){
+dojo._hasResource["dojo.fx"]=true;
+dojo.provide("dojo.fx");
+dojo.require("dojo.fx.Toggler");
+(function(){
+var d=dojo,_1={_fire:function(_2,_3){
+if(this[_2]){
+this[_2].apply(this,_3||[]);
+}
+return this;
+}};
+var _4=function(_5){
+this._index=-1;
+this._animations=_5||[];
+this._current=this._onAnimateCtx=this._onEndCtx=null;
+this.duration=0;
+d.forEach(this._animations,function(a){
+this.duration+=a.duration;
+if(a.delay){
+this.duration+=a.delay;
+}
+},this);
+};
+d.extend(_4,{_onAnimate:function(){
+this._fire("onAnimate",arguments);
+},_onEnd:function(){
+d.disconnect(this._onAnimateCtx);
+d.disconnect(this._onEndCtx);
+this._onAnimateCtx=this._onEndCtx=null;
+if(this._index+1==this._animations.length){
+this._fire("onEnd");
+}else{
+this._current=this._animations[++this._index];
+this._onAnimateCtx=d.connect(this._current,"onAnimate",this,"_onAnimate");
+this._onEndCtx=d.connect(this._current,"onEnd",this,"_onEnd");
+this._current.play(0,true);
+}
+},play:function(_6,_7){
+if(!this._current){
+this._current=this._animations[this._index=0];
+}
+if(!_7&&this._current.status()=="playing"){
+return this;
+}
+var _8=d.connect(this._current,"beforeBegin",this,function(){
+this._fire("beforeBegin");
+}),_9=d.connect(this._current,"onBegin",this,function(_a){
+this._fire("onBegin",arguments);
+}),_b=d.connect(this._current,"onPlay",this,function(_c){
+this._fire("onPlay",arguments);
+d.disconnect(_8);
+d.disconnect(_9);
+d.disconnect(_b);
});
-
-dojo.fx.wipeIn = function(/*Object*/ args){
- // summary
- // Returns an animation that will expand the
- // node defined in 'args' object from it's current height to
- // it's natural height (with no scrollbar).
- // Node must have no margin/border/padding.
- args.node = dojo.byId(args.node);
- var node = args.node, s = node.style;
-
- var anim = dojo.animateProperty(dojo.mixin({
- properties: {
- height: {
- // wrapped in functions so we wait till the last second to query (in case value has changed)
- start: function(){
- // start at current [computed] height, but use 1px rather than 0
- // because 0 causes IE to display the whole panel
- s.overflow="hidden";
- if(s.visibility=="hidden"||s.display=="none"){
- s.height="1px";
- s.display="";
- s.visibility="";
- return 1;
- }else{
- var height = dojo.style(node, "height");
- return Math.max(height, 1);
- }
- },
- end: function(){
- return node.scrollHeight;
- }
- }
- }
- }, args));
-
- dojo.connect(anim, "onEnd", function(){
- s.height = "auto";
- });
-
- return anim; // dojo._Animation
+if(this._onAnimateCtx){
+d.disconnect(this._onAnimateCtx);
+}
+this._onAnimateCtx=d.connect(this._current,"onAnimate",this,"_onAnimate");
+if(this._onEndCtx){
+d.disconnect(this._onEndCtx);
+}
+this._onEndCtx=d.connect(this._current,"onEnd",this,"_onEnd");
+this._current.play.apply(this._current,arguments);
+return this;
+},pause:function(){
+if(this._current){
+var e=d.connect(this._current,"onPause",this,function(_d){
+this._fire("onPause",arguments);
+d.disconnect(e);
+});
+this._current.pause();
+}
+return this;
+},gotoPercent:function(_e,_f){
+this.pause();
+var _10=this.duration*_e;
+this._current=null;
+d.some(this._animations,function(a){
+if(a.duration<=_10){
+this._current=a;
+return true;
+}
+_10-=a.duration;
+return false;
+});
+if(this._current){
+this._current.gotoPercent(_10/this._current.duration,_f);
+}
+return this;
+},stop:function(_11){
+if(this._current){
+if(_11){
+for(;this._index+1<this._animations.length;++this._index){
+this._animations[this._index].stop(true);
+}
+this._current=this._animations[this._index];
+}
+var e=d.connect(this._current,"onStop",this,function(arg){
+this._fire("onStop",arguments);
+d.disconnect(e);
+});
+this._current.stop();
+}
+return this;
+},status:function(){
+return this._current?this._current.status():"stopped";
+},destroy:function(){
+if(this._onAnimateCtx){
+d.disconnect(this._onAnimateCtx);
+}
+if(this._onEndCtx){
+d.disconnect(this._onEndCtx);
}
-
-dojo.fx.wipeOut = function(/*Object*/ args){
- // summary
- // Returns an animation that will shrink node defined in "args"
- // from it's current height to 1px, and then hide it.
- var node = args.node = dojo.byId(args.node);
- var s = node.style;
-
- var anim = dojo.animateProperty(dojo.mixin({
- properties: {
- height: {
- end: 1 // 0 causes IE to display the whole panel
- }
- }
- }, args));
-
- dojo.connect(anim, "beforeBegin", function(){
- s.overflow = "hidden";
- s.display = "";
- });
- dojo.connect(anim, "onEnd", function(){
- s.height = "auto";
- s.display = "none";
- });
-
- return anim; // dojo._Animation
+}});
+d.extend(_4,_1);
+dojo.fx.chain=function(_12){
+return new _4(_12);
+};
+var _13=function(_14){
+this._animations=_14||[];
+this._connects=[];
+this._finished=0;
+this.duration=0;
+d.forEach(_14,function(a){
+var _15=a.duration;
+if(a.delay){
+_15+=a.delay;
+}
+if(this.duration<_15){
+this.duration=_15;
+}
+this._connects.push(d.connect(a,"onEnd",this,"_onEnd"));
+},this);
+this._pseudoAnimation=new d.Animation({curve:[0,1],duration:this.duration});
+var _16=this;
+d.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop","onEnd"],function(evt){
+_16._connects.push(d.connect(_16._pseudoAnimation,evt,function(){
+_16._fire(evt,arguments);
+}));
+});
+};
+d.extend(_13,{_doAction:function(_17,_18){
+d.forEach(this._animations,function(a){
+a[_17].apply(a,_18);
+});
+return this;
+},_onEnd:function(){
+if(++this._finished>this._animations.length){
+this._fire("onEnd");
}
-
-dojo.fx.slideTo = function(/*Object?*/ args){
- // summary
- // Returns an animation that will slide "node"
- // defined in args Object from its current position to
- // the position defined by (args.left, args.top).
- // example:
- // | dojo.fx.slideTo({ node: node, left:"40", top:"50", unit:"px" }).play()
-
- var node = (args.node = dojo.byId(args.node));
-
- var top = null;
- var left = null;
-
- var init = (function(n){
- return function(){
- var cs = dojo.getComputedStyle(n);
- var pos = cs.position;
- top = (pos == 'absolute' ? n.offsetTop : parseInt(cs.top) || 0);
- left = (pos == 'absolute' ? n.offsetLeft : parseInt(cs.left) || 0);
- if(pos != 'absolute' && pos != 'relative'){
- var ret = dojo.coords(n, true);
- top = ret.y;
- left = ret.x;
- n.style.position="absolute";
- n.style.top=top+"px";
- n.style.left=left+"px";
- }
- };
- })(node);
- init();
-
- var anim = dojo.animateProperty(dojo.mixin({
- properties: {
- top: { end: args.top||0 },
- left: { end: args.left||0 }
- }
- }, args));
- dojo.connect(anim, "beforeBegin", anim, init);
-
- return anim; // dojo._Animation
+},_call:function(_19,_1a){
+var t=this._pseudoAnimation;
+t[_19].apply(t,_1a);
+},play:function(_1b,_1c){
+this._finished=0;
+this._doAction("play",arguments);
+this._call("play",arguments);
+return this;
+},pause:function(){
+this._doAction("pause",arguments);
+this._call("pause",arguments);
+return this;
+},gotoPercent:function(_1d,_1e){
+var ms=this.duration*_1d;
+d.forEach(this._animations,function(a){
+a.gotoPercent(a.duration<ms?1:(ms/a.duration),_1e);
+});
+this._call("gotoPercent",arguments);
+return this;
+},stop:function(_1f){
+this._doAction("stop",arguments);
+this._call("stop",arguments);
+return this;
+},status:function(){
+return this._pseudoAnimation.status();
+},destroy:function(){
+d.forEach(this._connects,dojo.disconnect);
+}});
+d.extend(_13,_1);
+dojo.fx.combine=function(_20){
+return new _13(_20);
+};
+dojo.fx.wipeIn=function(_21){
+var _22=_21.node=d.byId(_21.node),s=_22.style,o;
+var _23=d.animateProperty(d.mixin({properties:{height:{start:function(){
+o=s.overflow;
+s.overflow="hidden";
+if(s.visibility=="hidden"||s.display=="none"){
+s.height="1px";
+s.display="";
+s.visibility="";
+return 1;
+}else{
+var _24=d.style(_22,"height");
+return Math.max(_24,1);
}
-
+},end:function(){
+return _22.scrollHeight;
+}}}},_21));
+d.connect(_23,"onEnd",function(){
+s.height="auto";
+s.overflow=o;
+});
+return _23;
+};
+dojo.fx.wipeOut=function(_25){
+var _26=_25.node=d.byId(_25.node),s=_26.style,o;
+var _27=d.animateProperty(d.mixin({properties:{height:{end:1}}},_25));
+d.connect(_27,"beforeBegin",function(){
+o=s.overflow;
+s.overflow="hidden";
+s.display="";
+});
+d.connect(_27,"onEnd",function(){
+s.overflow=o;
+s.height="auto";
+s.display="none";
+});
+return _27;
+};
+dojo.fx.slideTo=function(_28){
+var _29=_28.node=d.byId(_28.node),top=null,_2a=null;
+var _2b=(function(n){
+return function(){
+var cs=d.getComputedStyle(n);
+var pos=cs.position;
+top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);
+_2a=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);
+if(pos!="absolute"&&pos!="relative"){
+var ret=d.position(n,true);
+top=ret.y;
+_2a=ret.x;
+n.style.position="absolute";
+n.style.top=top+"px";
+n.style.left=_2a+"px";
}
+};
+})(_29);
+_2b();
+var _2c=d.animateProperty(d.mixin({properties:{top:_28.top||0,left:_28.left||0}},_28));
+d.connect(_2c,"beforeBegin",_2c,_2b);
+return _2c;
+};
+})();
+}
diff --git a/js/dojo/dojo/i18n.js b/js/dojo/dojo/i18n.js
--- a/js/dojo/dojo/i18n.js
+++ b/js/dojo/dojo/i18n.js
@@ -1,243 +1,171 @@
-if(!dojo._hasResource["dojo.i18n"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.i18n"] = true;
-dojo.provide("dojo.i18n");
-
-dojo.i18n.getLocalization = function(/*String*/packageName, /*String*/bundleName, /*String?*/locale){
- // summary:
- // Returns an Object containing the localization for a given resource
- // bundle in a package, matching the specified locale.
- // description:
- // Returns a hash containing name/value pairs in its prototypesuch
- // that values can be easily overridden. Throws an exception if the
- // bundle is not found. Bundle must have already been loaded by
- // dojo.requireLocalization() or by a build optimization step. NOTE:
- // try not to call this method as part of an object property
- // definition (var foo = { bar: dojo.i18n.getLocalization() }). In
- // some loading situations, the bundle may not be available in time
- // for the object definition. Instead, call this method inside a
- // function that is run after all modules load or the page loads (like
- // in dojo.adOnLoad()), or in a widget lifecycle method.
- // packageName:
- // package which is associated with this resource
- // bundleName:
- // the base filename of the resource bundle (without the ".js" suffix)
- // locale:
- // the variant to load (optional). By default, the locale defined by
- // the host environment: dojo.locale
-
- locale = dojo.i18n.normalizeLocale(locale);
-
- // look for nearest locale match
- var elements = locale.split('-');
- var module = [packageName,"nls",bundleName].join('.');
- var bundle = dojo._loadedModules[module];
- if(bundle){
- var localization;
- for(var i = elements.length; i > 0; i--){
- var loc = elements.slice(0, i).join('_');
- if(bundle[loc]){
- localization = bundle[loc];
- break;
- }
- }
- if(!localization){
- localization = bundle.ROOT;
- }
-
- // make a singleton prototype so that the caller won't accidentally change the values globally
- if(localization){
- var clazz = function(){};
- clazz.prototype = localization;
- return new clazz(); // Object
- }
- }
-
- throw new Error("Bundle not found: " + bundleName + " in " + packageName+" , locale=" + locale);
-};
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.i18n.normalizeLocale = function(/*String?*/locale){
- // summary:
- // Returns canonical form of locale, as used by Dojo.
- //
- // description:
- // All variants are case-insensitive and are separated by '-' as specified in RFC 3066.
- // If no locale is specified, the dojo.locale is returned. dojo.locale is defined by
- // the user agent's locale unless overridden by djConfig.
-
- var result = locale ? locale.toLowerCase() : dojo.locale;
- if(result == "root"){
- result = "ROOT";
- }
- return result; // String
-};
-
-dojo.i18n._requireLocalization = function(/*String*/moduleName, /*String*/bundleName, /*String?*/locale, /*String?*/availableFlatLocales){
- // summary:
- // See dojo.requireLocalization()
- // description:
- // Called by the bootstrap, but factored out so that it is only
- // included in the build when needed.
-
- var targetLocale = dojo.i18n.normalizeLocale(locale);
- var bundlePackage = [moduleName, "nls", bundleName].join(".");
- // NOTE:
- // When loading these resources, the packaging does not match what is
- // on disk. This is an implementation detail, as this is just a
- // private data structure to hold the loaded resources. e.g.
- // tests/hello/nls/en-us/salutations.js is loaded as the object
- // tests.hello.nls.salutations.en_us={...} The structure on disk is
- // intended to be most convenient for developers and translators, but
- // in memory it is more logical and efficient to store in a different
- // order. Locales cannot use dashes, since the resulting path will
- // not evaluate as valid JS, so we translate them to underscores.
-
- //Find the best-match locale to load if we have available flat locales.
- var bestLocale = "";
- if(availableFlatLocales){
- var flatLocales = availableFlatLocales.split(",");
- for(var i = 0; i < flatLocales.length; i++){
- //Locale must match from start of string.
- if(targetLocale.indexOf(flatLocales[i]) == 0){
- if(flatLocales[i].length > bestLocale.length){
- bestLocale = flatLocales[i];
- }
- }
- }
- if(!bestLocale){
- bestLocale = "ROOT";
- }
- }
-
- //See if the desired locale is already loaded.
- var tempLocale = availableFlatLocales ? bestLocale : targetLocale;
- var bundle = dojo._loadedModules[bundlePackage];
- var localizedBundle = null;
- if(bundle){
- if(djConfig.localizationComplete && bundle._built){return;}
- var jsLoc = tempLocale.replace(/-/g, '_');
- var translationPackage = bundlePackage+"."+jsLoc;
- localizedBundle = dojo._loadedModules[translationPackage];
- }
- if(!localizedBundle){
- bundle = dojo["provide"](bundlePackage);
- var syms = dojo._getModuleSymbols(moduleName);
- var modpath = syms.concat("nls").join("/");
- var parent;
-
- dojo.i18n._searchLocalePath(tempLocale, availableFlatLocales, function(loc){
- var jsLoc = loc.replace(/-/g, '_');
- var translationPackage = bundlePackage + "." + jsLoc;
- var loaded = false;
- if(!dojo._loadedModules[translationPackage]){
- // Mark loaded whether it's found or not, so that further load attempts will not be made
- dojo["provide"](translationPackage);
- var module = [modpath];
- if(loc != "ROOT"){module.push(loc);}
- module.push(bundleName);
- var filespec = module.join("/") + '.js';
- loaded = dojo._loadPath(filespec, null, function(hash){
- // Use singleton with prototype to point to parent bundle, then mix-in result from loadPath
- var clazz = function(){};
- clazz.prototype = parent;
- bundle[jsLoc] = new clazz();
- for(var j in hash){ bundle[jsLoc][j] = hash[j]; }
- });
- }else{
- loaded = true;
- }
- if(loaded && bundle[jsLoc]){
- parent = bundle[jsLoc];
- }else{
- bundle[jsLoc] = parent;
- }
-
- if(availableFlatLocales){
- //Stop the locale path searching if we know the availableFlatLocales, since
- //the first call to this function will load the only bundle that is needed.
- return true;
- }
- });
- }
-
- //Save the best locale bundle as the target locale bundle when we know the
- //the available bundles.
- if(availableFlatLocales && targetLocale != bestLocale){
- bundle[targetLocale.replace(/-/g, '_')] = bundle[bestLocale.replace(/-/g, '_')];
- }
+if(!dojo._hasResource["dojo.i18n"]){
+dojo._hasResource["dojo.i18n"]=true;
+dojo.provide("dojo.i18n");
+dojo.i18n.getLocalization=function(_1,_2,_3){
+_3=dojo.i18n.normalizeLocale(_3);
+var _4=_3.split("-");
+var _5=[_1,"nls",_2].join(".");
+var _6=dojo._loadedModules[_5];
+if(_6){
+var _7;
+for(var i=_4.length;i>0;i--){
+var _8=_4.slice(0,i).join("_");
+if(_6[_8]){
+_7=_6[_8];
+break;
+}
+}
+if(!_7){
+_7=_6.ROOT;
+}
+if(_7){
+var _9=function(){
+};
+_9.prototype=_7;
+return new _9();
+}
+}
+throw new Error("Bundle not found: "+_2+" in "+_1+" , locale="+_3);
+};
+dojo.i18n.normalizeLocale=function(_a){
+var _b=_a?_a.toLowerCase():dojo.locale;
+if(_b=="root"){
+_b="ROOT";
+}
+return _b;
};
-
+dojo.i18n._requireLocalization=function(_c,_d,_e,_f){
+var _10=dojo.i18n.normalizeLocale(_e);
+var _11=[_c,"nls",_d].join(".");
+var _12="";
+if(_f){
+var _13=_f.split(",");
+for(var i=0;i<_13.length;i++){
+if(_10["indexOf"](_13[i])==0){
+if(_13[i].length>_12.length){
+_12=_13[i];
+}
+}
+}
+if(!_12){
+_12="ROOT";
+}
+}
+var _14=_f?_12:_10;
+var _15=dojo._loadedModules[_11];
+var _16=null;
+if(_15){
+if(dojo.config.localizationComplete&&_15._built){
+return;
+}
+var _17=_14.replace(/-/g,"_");
+var _18=_11+"."+_17;
+_16=dojo._loadedModules[_18];
+}
+if(!_16){
+_15=dojo["provide"](_11);
+var _19=dojo._getModuleSymbols(_c);
+var _1a=_19.concat("nls").join("/");
+var _1b;
+dojo.i18n._searchLocalePath(_14,_f,function(loc){
+var _1c=loc.replace(/-/g,"_");
+var _1d=_11+"."+_1c;
+var _1e=false;
+if(!dojo._loadedModules[_1d]){
+dojo["provide"](_1d);
+var _1f=[_1a];
+if(loc!="ROOT"){
+_1f.push(loc);
+}
+_1f.push(_d);
+var _20=_1f.join("/")+".js";
+_1e=dojo._loadPath(_20,null,function(_21){
+var _22=function(){
+};
+_22.prototype=_1b;
+_15[_1c]=new _22();
+for(var j in _21){
+_15[_1c][j]=_21[j];
+}
+});
+}else{
+_1e=true;
+}
+if(_1e&&_15[_1c]){
+_1b=_15[_1c];
+}else{
+_15[_1c]=_1b;
+}
+if(_f){
+return true;
+}
+});
+}
+if(_f&&_10!=_12){
+_15[_10.replace(/-/g,"_")]=_15[_12.replace(/-/g,"_")];
+}
+};
(function(){
- // If other locales are used, dojo.requireLocalization should load them as
- // well, by default.
- //
- // Override dojo.requireLocalization to do load the default bundle, then
- // iterate through the extraLocale list and load those translations as
- // well, unless a particular locale was requested.
-
- var extra = djConfig.extraLocale;
- if(extra){
- if(!extra instanceof Array){
- extra = [extra];
- }
-
- var req = dojo.i18n._requireLocalization;
- dojo.i18n._requireLocalization = function(m, b, locale, availableFlatLocales){
- req(m,b,locale, availableFlatLocales);
- if(locale){return;}
- for(var i=0; i<extra.length; i++){
- req(m,b,extra[i], availableFlatLocales);
- }
- };
- }
+var _23=dojo.config.extraLocale;
+if(_23){
+if(!_23 instanceof Array){
+_23=[_23];
+}
+var req=dojo.i18n._requireLocalization;
+dojo.i18n._requireLocalization=function(m,b,_24,_25){
+req(m,b,_24,_25);
+if(_24){
+return;
+}
+for(var i=0;i<_23.length;i++){
+req(m,b,_23[i],_25);
+}
+};
+}
})();
-
-dojo.i18n._searchLocalePath = function(/*String*/locale, /*Boolean*/down, /*Function*/searchFunc){
- // summary:
- // A helper method to assist in searching for locale-based resources.
- // Will iterate through the variants of a particular locale, either up
- // or down, executing a callback function. For example, "en-us" and
- // true will try "en-us" followed by "en" and finally "ROOT".
-
- locale = dojo.i18n.normalizeLocale(locale);
-
- var elements = locale.split('-');
- var searchlist = [];
- for(var i = elements.length; i > 0; i--){
- searchlist.push(elements.slice(0, i).join('-'));
- }
- searchlist.push(false);
- if(down){searchlist.reverse();}
-
- for(var j = searchlist.length - 1; j >= 0; j--){
- var loc = searchlist[j] || "ROOT";
- var stop = searchFunc(loc);
- if(stop){ break; }
- }
+dojo.i18n._searchLocalePath=function(_26,_27,_28){
+_26=dojo.i18n.normalizeLocale(_26);
+var _29=_26.split("-");
+var _2a=[];
+for(var i=_29.length;i>0;i--){
+_2a.push(_29.slice(0,i).join("-"));
+}
+_2a.push(false);
+if(_27){
+_2a.reverse();
+}
+for(var j=_2a.length-1;j>=0;j--){
+var loc=_2a[j]||"ROOT";
+var _2b=_28(loc);
+if(_2b){
+break;
+}
+}
};
-
-dojo.i18n._preloadLocalizations = function(/*String*/bundlePrefix, /*Array*/localesGenerated){
- // summary:
- // Load built, flattened resource bundles, if available for all
- // locales used in the page. Only called by built layer files.
-
- function preload(locale){
- locale = dojo.i18n.normalizeLocale(locale);
- dojo.i18n._searchLocalePath(locale, true, function(loc){
- for(var i=0; i<localesGenerated.length;i++){
- if(localesGenerated[i] == loc){
- dojo["require"](bundlePrefix+"_"+loc);
- return true; // Boolean
- }
- }
- return false; // Boolean
- });
- }
- preload();
- var extra = djConfig.extraLocale||[];
- for(var i=0; i<extra.length; i++){
- preload(extra[i]);
- }
+dojo.i18n._preloadLocalizations=function(_2c,_2d){
+function _2e(_2f){
+_2f=dojo.i18n.normalizeLocale(_2f);
+dojo.i18n._searchLocalePath(_2f,true,function(loc){
+for(var i=0;i<_2d.length;i++){
+if(_2d[i]==loc){
+dojo["require"](_2c+"_"+loc);
+return true;
+}
+}
+return false;
+});
};
-
+_2e();
+var _30=dojo.config.extraLocale||[];
+for(var i=0;i<_30.length;i++){
+_2e(_30[i]);
}
+};
+}
diff --git a/js/dojo/dojo/io/iframe.js b/js/dojo/dojo/io/iframe.js
--- a/js/dojo/dojo/io/iframe.js
+++ b/js/dojo/dojo/io/iframe.js
@@ -1,354 +1,265 @@
-if(!dojo._hasResource["dojo.io.iframe"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.io.iframe"] = true;
-dojo.provide("dojo.io.iframe");
-
-dojo.io.iframe = {
- create: function(/*String*/fname, /*String*/onloadstr, /*String?*/uri){
- // summary:
- // Creates a hidden iframe in the page. Used mostly for IO
- // transports. You do not need to call this to start a
- // dojo.io.iframe request. Just call send().
- // fname: String
- // The name of the iframe. Used for the name attribute on the
- // iframe.
- // onloadstr: String
- // A string of JavaScript that will be executed when the content
- // in the iframe loads.
- // uri: String
- // The value of the src attribute on the iframe element. If a
- // value is not given, then dojo/resources/blank.html will be
- // used.
- if(window[fname]){ return window[fname]; }
- if(window.frames[fname]){ return window.frames[fname]; }
- var cframe = null;
- var turi = uri;
- if(!turi){
- if(djConfig["useXDomain"] && !djConfig["dojoBlankHtmlUrl"]){
- console.debug("dojo.io.iframe.create: When using cross-domain Dojo builds,"
- + " please save dojo/resources/blank.html to your domain and set djConfig.dojoBlankHtmlUrl"
- + " to the path on your domain to blank.html");
- }
- turi = (djConfig["dojoBlankHtmlUrl"]||dojo.moduleUrl("dojo", "resources/blank.html"));
- }
- var ifrstr = dojo.isIE ? '<iframe name="'+fname+'" src="'+turi+'" onload="'+onloadstr+'">' : 'iframe';
- cframe = dojo.doc.createElement(ifrstr);
- with(cframe){
- name = fname;
- setAttribute("name", fname);
- id = fname;
- }
- dojo.body().appendChild(cframe);
- window[fname] = cframe;
-
- with(cframe.style){
- if(dojo.isSafari < 3){
- //We can't change the src in Safari 2.0.3 if absolute position. Bizarro.
- position = "absolute";
- }
- left = top = "1px";
- height = width = "1px";
- visibility = "hidden";
- }
-
- if(!dojo.isIE){
- this.setSrc(cframe, turi, true);
- cframe.onload = new Function(onloadstr);
- }
-
- return cframe;
- },
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- setSrc: function(/*DOMNode*/iframe, /*String*/src, /*Boolean*/replace){
- //summary:
- // Sets the URL that is loaded in an IFrame. The replace parameter
- // indicates whether location.replace() should be used when
- // changing the location of the iframe.
- try{
- if(!replace){
- if(dojo.isSafari){
- iframe.location = src;
- }else{
- frames[iframe.name].location = src;
- }
- }else{
- // Fun with DOM 0 incompatibilities!
- var idoc;
- if(dojo.isIE || dojo.isSafari > 2){
- idoc = iframe.contentWindow.document;
- }else if(dojo.isSafari){
- idoc = iframe.document;
- }else{ // if(d.isMozilla){
- idoc = iframe.contentWindow;
- }
-
- //For Safari (at least 2.0.3) and Opera, if the iframe
- //has just been created but it doesn't have content
- //yet, then iframe.document may be null. In that case,
- //use iframe.location and return.
- if(!idoc){
- iframe.location = src;
- return;
- }else{
- idoc.location.replace(src);
- }
- }
- }catch(e){
- console.debug("dojo.io.iframe.setSrc: ", e);
- }
- },
-
- doc: function(/*DOMNode*/iframeNode){
- //summary: Returns the document object associated with the iframe DOM Node argument.
- var doc = iframeNode.contentDocument || // W3
- (
- (iframeNode.contentWindow)&&(iframeNode.contentWindow.document)
- ) || // IE
- (
- (iframeNode.name)&&(document.frames[iframeNode.name])&&
- (document.frames[iframeNode.name].document)
- ) || null;
- return doc;
- },
-
- /*=====
- dojo.io.iframe.__ioArgs = function(kwArgs){
- // summary:
- // All the properties described in the dojo.__ioArgs type, apply
- // to this type. The following additional properties are allowed
- // for dojo.io.iframe.send():
- // method: String?
- // The HTTP method to use. "GET" or "POST" are the only supported
- // values. It will try to read the value from the form node's
- // method, then try this argument. If neither one exists, then it
- // defaults to POST.
- // handleAs: String?
- // Specifies what format the result data should be given to the
- // load/handle callback. Valid values are: text, html, javascript,
- // json. IMPORTANT: For all values EXCEPT html, The server
- // response should be an HTML file with a textarea element. The
- // response data should be inside the textarea element. Using an
- // HTML document the only reliable, cross-browser way this
- // transport can know when the response has loaded. For the html
- // handleAs value, just return a normal HTML document. NOTE: xml
- // or any other XML type is NOT supported by this transport.
- // content: Object?
- // If "form" is one of the other args properties, then the content
- // object properties become hidden form form elements. For
- // instance, a content object of {name1 : "value1"} is converted
- // to a hidden form element with a name of "name1" and a value of
- // "value1". If there is not a "form" property, then the content
- // object is converted into a name=value&name=value string, by
- // using dojo.objectToQuery().
- }
- =====*/
-
- send: function(/*dojo.io.iframe.__ioArgs*/args){
- //summary: function that sends the request to the server.
- //This transport can only process one send() request at a time, so if send() is called
- //multiple times, it will queue up the calls and only process one at a time.
- if(!this["_frame"]){
- this._frame = this.create(this._iframeName, "dojo.io.iframe._iframeOnload();");
- }
-
- //Set up the deferred.
- var dfd = dojo._ioSetArgs(
- args,
- function(/*Deferred*/dfd){
- //summary: canceller function for dojo._ioSetArgs call.
- dfd.canceled = true;
- dfd.ioArgs._callNext();
- },
- function(/*Deferred*/dfd){
- //summary: okHandler function for dojo._ioSetArgs call.
- var value = null;
- try{
- var ioArgs = dfd.ioArgs;
- var dii = dojo.io.iframe;
- var ifd = dii.doc(dii._frame);
- var handleAs = ioArgs.handleAs;
- //Assign correct value based on handleAs value.
- value = ifd; //html
- if(handleAs != "html"){
- value = ifd.getElementsByTagName("textarea")[0].value; //text
- if(handleAs == "json"){
- value = dojo.fromJson(value); //json
- }else if(handleAs == "javascript"){
- value = dojo.eval(value); //javascript
- }
- }
- }catch(e){
- value = e;
- }finally{
- ioArgs._callNext();
- }
- return value;
- },
- function(/*Error*/error, /*Deferred*/dfd){
- //summary: errHandler function for dojo._ioSetArgs call.
- dfd.ioArgs._hasError = true;
- dfd.ioArgs._callNext();
- return error;
- }
- );
-
- //Set up a function that will fire the next iframe request. Make sure it only
- //happens once per deferred.
- dfd.ioArgs._callNext = function(){
- if(!this["_calledNext"]){
- this._calledNext = true;
- dojo.io.iframe._currentDfd = null;
- dojo.io.iframe._fireNextRequest();
- }
- }
-
- this._dfdQueue.push(dfd);
- this._fireNextRequest();
-
- //Add it the IO watch queue, to get things like timeout support.
- dojo._ioWatch(
- dfd,
- function(/*Deferred*/dfd){
- //validCheck
- return !dfd.ioArgs["_hasError"];
- },
- function(dfd){
- //ioCheck
- return (!!dfd.ioArgs["_finished"]);
- },
- function(dfd){
- //resHandle
- if(dfd.ioArgs._finished){
- dfd.callback(dfd);
- }else{
- dfd.errback(new Error("Invalid dojo.io.iframe request state"));
- }
- }
- );
-
- return dfd;
- },
-
- _currentDfd: null,
- _dfdQueue: [],
- _iframeName: "dojoIoIframe",
-
- _fireNextRequest: function(){
- //summary: Internal method used to fire the next request in the bind queue.
- try{
- if((this._currentDfd)||(this._dfdQueue.length == 0)){ return; }
- var dfd = this._currentDfd = this._dfdQueue.shift();
- var ioArgs = dfd.ioArgs;
- var args = ioArgs.args;
-
- ioArgs._contentToClean = [];
- var fn = args["form"];
- var content = args["content"] || {};
- if(fn){
- if(content){
- // if we have things in content, we need to add them to the form
- // before submission
- for(var x in content){
- if(!fn[x]){
- var tn;
- if(dojo.isIE){
- tn = dojo.doc.createElement("<input type='hidden' name='"+x+"'>");
- }else{
- tn = dojo.doc.createElement("input");
- tn.type = "hidden";
- tn.name = x;
- }
- tn.value = content[x];
- fn.appendChild(tn);
- ioArgs._contentToClean.push(x);
- }else{
- fn[x].value = content[x];
- }
- }
- }
- //IE requires going through getAttributeNode instead of just getAttribute in some form cases,
- //so use it for all. See #2844
- var actnNode = fn.getAttributeNode("action");
- var mthdNode = fn.getAttributeNode("method");
- var trgtNode = fn.getAttributeNode("target");
- if(args["url"]){
- ioArgs._originalAction = actnNode ? actnNode.value : null;
- if(actnNode){
- actnNode.value = args.url;
- }else{
- fn.setAttribute("action",args.url);
- }
- }
- if(!mthdNode || !mthdNode.value){
- if(mthdNode){
- mthdNode.value= (args["method"]) ? args["method"] : "post";
- }else{
- fn.setAttribute("method", (args["method"]) ? args["method"] : "post");
- }
- }
- ioArgs._originalTarget = trgtNode ? trgtNode.value: null;
- if(trgtNode){
- trgtNode.value = this._iframeName;
- }else{
- fn.setAttribute("target", this._iframeName);
- }
- fn.target = this._iframeName;
- fn.submit();
- }else{
- // otherwise we post a GET string by changing URL location for the
- // iframe
- var tmpUrl = args.url + (args.url.indexOf("?") > -1 ? "&" : "?") + ioArgs.query;
- this.setSrc(this._frame, tmpUrl, true);
- }
- }catch(e){
- dfd.errback(e);
- }
- },
-
- _iframeOnload: function(){
- var dfd = this._currentDfd;
- if(!dfd){
- this._fireNextRequest();
- return;
- }
-
- var ioArgs = dfd.ioArgs;
- var args = ioArgs.args;
- var fNode = args.form;
-
- if(fNode){
- // remove all the hidden content inputs
- var toClean = ioArgs._contentToClean;
- for(var i = 0; i < toClean.length; i++) {
- var key = toClean[i];
- if(dojo.isSafari < 3){
- //In Safari (at least 2.0.3), can't use form[key] syntax to find the node,
- //for nodes that were dynamically added.
- for(var j = 0; j < fNode.childNodes.length; j++){
- var chNode = fNode.childNodes[j];
- if(chNode.name == key){
- dojo._destroyElement(chNode);
- break;
- }
- }
- }else{
- dojo._destroyElement(fNode[key]);
- fNode[key] = null;
- }
- }
-
- // restore original action + target
- if(ioArgs["_originalAction"]){
- fNode.setAttribute("action", ioArgs._originalAction);
- }
- if(ioArgs["_originalTarget"]){
- fNode.setAttribute("target", ioArgs._originalTarget);
- fNode.target = ioArgs._originalTarget;
- }
- }
-
- ioArgs._finished = true;
- }
+if(!dojo._hasResource["dojo.io.iframe"]){
+dojo._hasResource["dojo.io.iframe"]=true;
+dojo.provide("dojo.io.iframe");
+dojo.io.iframe={create:function(_1,_2,_3){
+if(window[_1]){
+return window[_1];
+}
+if(window.frames[_1]){
+return window.frames[_1];
+}
+var _4=null;
+var _5=_3;
+if(!_5){
+if(dojo.config["useXDomain"]&&!dojo.config["dojoBlankHtmlUrl"]){
+console.warn("dojo.io.iframe.create: When using cross-domain Dojo builds,"+" please save dojo/resources/blank.html to your domain and set djConfig.dojoBlankHtmlUrl"+" to the path on your domain to blank.html");
+}
+_5=(dojo.config["dojoBlankHtmlUrl"]||dojo.moduleUrl("dojo","resources/blank.html"));
+}
+var _6=dojo.isIE?"<iframe name=\""+_1+"\" src=\""+_5+"\" onload=\""+_2+"\">":"iframe";
+_4=dojo.doc.createElement(_6);
+with(_4){
+name=_1;
+setAttribute("name",_1);
+id=_1;
+}
+dojo.body().appendChild(_4);
+window[_1]=_4;
+with(_4.style){
+if(!(dojo.isSafari<3)){
+position="absolute";
+}
+left=top="1px";
+height=width="1px";
+visibility="hidden";
+}
+if(!dojo.isIE){
+this.setSrc(_4,_5,true);
+_4.onload=new Function(_2);
+}
+return _4;
+},setSrc:function(_7,_8,_9){
+try{
+if(!_9){
+if(dojo.isWebKit){
+_7.location=_8;
+}else{
+frames[_7.name].location=_8;
+}
+}else{
+var _a;
+if(dojo.isIE||dojo.isWebKit>521){
+_a=_7.contentWindow.document;
+}else{
+if(dojo.isSafari){
+_a=_7.document;
+}else{
+_a=_7.contentWindow;
+}
+}
+if(!_a){
+_7.location=_8;
+return;
+}else{
+_a.location.replace(_8);
+}
+}
+}
+catch(e){
+}
+},doc:function(_b){
+var _c=_b.contentDocument||(((_b.name)&&(_b.document)&&(dojo.doc.getElementsByTagName("iframe")[_b.name].contentWindow)&&(dojo.doc.getElementsByTagName("iframe")[_b.name].contentWindow.document)))||((_b.name)&&(dojo.doc.frames[_b.name])&&(dojo.doc.frames[_b.name].document))||null;
+return _c;
+},send:function(_d){
+if(!this["_frame"]){
+this._frame=this.create(this._iframeName,dojo._scopeName+".io.iframe._iframeOnload();");
+}
+var _e=dojo._ioSetArgs(_d,function(_f){
+_f.canceled=true;
+_f.ioArgs._callNext();
+},function(dfd){
+var _10=null;
+try{
+var _11=dfd.ioArgs;
+var dii=dojo.io.iframe;
+var ifd=dii.doc(dii._frame);
+var _12=_11.handleAs;
+_10=ifd;
+if(_12!="html"){
+if(_12=="xml"){
+if(dojo.isIE){
+dojo.query("a",dii._frame.contentWindow.document.documentElement).orphan();
+var _13=(dii._frame.contentWindow.document).documentElement.innerText;
+_13=_13.replace(/>\s+</g,"><");
+_13=dojo.trim(_13);
+var _14={responseText:_13};
+_10=dojo._contentHandlers["xml"](_14);
+}
+}else{
+_10=ifd.getElementsByTagName("textarea")[0].value;
+if(_12=="json"){
+_10=dojo.fromJson(_10);
+}else{
+if(_12=="javascript"){
+_10=dojo.eval(_10);
+}
+}
+}
+}
+}
+catch(e){
+_10=e;
+}
+finally{
+_11._callNext();
+}
+return _10;
+},function(_15,dfd){
+dfd.ioArgs._hasError=true;
+dfd.ioArgs._callNext();
+return _15;
+});
+_e.ioArgs._callNext=function(){
+if(!this["_calledNext"]){
+this._calledNext=true;
+dojo.io.iframe._currentDfd=null;
+dojo.io.iframe._fireNextRequest();
}
-
+};
+this._dfdQueue.push(_e);
+this._fireNextRequest();
+dojo._ioWatch(_e,function(dfd){
+return !dfd.ioArgs["_hasError"];
+},function(dfd){
+return (!!dfd.ioArgs["_finished"]);
+},function(dfd){
+if(dfd.ioArgs._finished){
+dfd.callback(dfd);
+}else{
+dfd.errback(new Error("Invalid dojo.io.iframe request state"));
+}
+});
+return _e;
+},_currentDfd:null,_dfdQueue:[],_iframeName:dojo._scopeName+"IoIframe",_fireNextRequest:function(){
+try{
+if((this._currentDfd)||(this._dfdQueue.length==0)){
+return;
+}
+do{
+var dfd=this._currentDfd=this._dfdQueue.shift();
+}while(dfd&&dfd.canceled&&this._dfdQueue.length);
+if(!dfd||dfd.canceled){
+this._currentDfd=null;
+return;
+}
+var _16=dfd.ioArgs;
+var _17=_16.args;
+_16._contentToClean=[];
+var fn=dojo.byId(_17["form"]);
+var _18=_17["content"]||{};
+if(fn){
+if(_18){
+var _19=function(_1a,_1b){
+var tn;
+if(dojo.isIE){
+tn=dojo.doc.createElement("<input type='hidden' name='"+_1a+"'>");
+}else{
+tn=dojo.doc.createElement("input");
+tn.type="hidden";
+tn.name=_1a;
+}
+tn.value=_1b;
+fn.appendChild(tn);
+_16._contentToClean.push(_1a);
+};
+for(var x in _18){
+var val=_18[x];
+if(dojo.isArray(val)&&val.length>1){
+var i;
+for(i=0;i<val.length;i++){
+_19(x,val[i]);
+}
+}else{
+if(!fn[x]){
+_19(x,val);
+}else{
+fn[x].value=val;
+}
+}
+}
}
+var _1c=fn.getAttributeNode("action");
+var _1d=fn.getAttributeNode("method");
+var _1e=fn.getAttributeNode("target");
+if(_17["url"]){
+_16._originalAction=_1c?_1c.value:null;
+if(_1c){
+_1c.value=_17.url;
+}else{
+fn.setAttribute("action",_17.url);
+}
+}
+if(!_1d||!_1d.value){
+if(_1d){
+_1d.value=(_17["method"])?_17["method"]:"post";
+}else{
+fn.setAttribute("method",(_17["method"])?_17["method"]:"post");
+}
+}
+_16._originalTarget=_1e?_1e.value:null;
+if(_1e){
+_1e.value=this._iframeName;
+}else{
+fn.setAttribute("target",this._iframeName);
+}
+fn.target=this._iframeName;
+dojo._ioNotifyStart(dfd);
+fn.submit();
+}else{
+var _1f=_17.url+(_17.url.indexOf("?")>-1?"&":"?")+_16.query;
+dojo._ioNotifyStart(dfd);
+this.setSrc(this._frame,_1f,true);
+}
+}
+catch(e){
+dfd.errback(e);
+}
+},_iframeOnload:function(){
+var dfd=this._currentDfd;
+if(!dfd){
+this._fireNextRequest();
+return;
+}
+var _20=dfd.ioArgs;
+var _21=_20.args;
+var _22=dojo.byId(_21.form);
+if(_22){
+var _23=_20._contentToClean;
+for(var i=0;i<_23.length;i++){
+var key=_23[i];
+for(var j=0;j<_22.childNodes.length;j++){
+var _24=_22.childNodes[j];
+if(_24.name==key){
+dojo.destroy(_24);
+break;
+}
+}
+}
+if(_20["_originalAction"]){
+_22.setAttribute("action",_20._originalAction);
+}
+if(_20["_originalTarget"]){
+_22.setAttribute("target",_20._originalTarget);
+_22.target=_20._originalTarget;
+}
+}
+_20._finished=true;
+}};
+}
diff --git a/js/dojo/dojo/io/script.js b/js/dojo/dojo/io/script.js
--- a/js/dojo/dojo/io/script.js
+++ b/js/dojo/dojo/io/script.js
@@ -1,203 +1,118 @@
-if(!dojo._hasResource["dojo.io.script"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.io.script"] = true;
-dojo.provide("dojo.io.script");
-
-/*=====
-dojo.io.script.__ioArgs = function(kwArgs){
- // summary:
- // All the properties described in the dojo.__ioArgs type, apply to this
- // type as well, EXCEPT "handleAs". It is not applicable to
- // dojo.io.script.get() calls, since it is implied by the usage of
- // "callbackParamName" (response will be a JSONP call returning JSON)
- // or "checkString" (response is pure JavaScript defined in
- // the body of the script that was attached). The following additional
- // properties are allowed for dojo.io.script.get():
- // callbackParamName: String
- // The URL parameter name that indicates the JSONP callback string.
- // For instance, when using Yahoo JSONP calls it is normally,
- // callbackParamName: "callback". For AOL JSONP calls it is normally
- // callbackParamName: "c".
- // checkString: String
- // A string of JavaScript that when evaluated like so:
- // "typeof(" + checkString + ") != 'undefined'"
- // being true means that the script fetched has been loaded.
- // Do not use this if doing a JSONP type of call (use callbackParamName instead).
-}
-=====*/
-
-dojo.io.script = {
- get: function(/*dojo.io.script.__ioArgs*/args){
- // summary:
- // sends a get request using a dynamically created script tag.
- var dfd = this._makeScriptDeferred(args);
- var ioArgs = dfd.ioArgs;
- dojo._ioAddQueryToUrl(ioArgs);
-
- this.attach(ioArgs.id, ioArgs.url);
- dojo._ioWatch(dfd, this._validCheck, this._ioCheck, this._resHandle);
- return dfd;
- },
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- attach: function(/*String*/id, /*String*/url){
- // summary:
- // creates a new <script> tag pointing to the specified URL and
- // adds it to the document.
- // description:
- // Attaches the script element to the DOM. Use this method if you
- // just want to attach a script to the DOM and do not care when or
- // if it loads.
- var element = dojo.doc.createElement("script");
- element.type = "text/javascript";
- element.src = url;
- element.id = id;
- dojo.doc.getElementsByTagName("head")[0].appendChild(element);
- },
-
- remove: function(/*String*/id){
- //summary: removes the script element with the given id.
- dojo._destroyElement(dojo.byId(id));
-
- //Remove the jsonp callback on dojo.io.script, if it exists.
- if(this["jsonp_" + id]){
- delete this["jsonp_" + id];
- }
- },
-
- _makeScriptDeferred: function(/*Object*/args){
- //summary:
- // sets up a Deferred object for an IO request.
- var dfd = dojo._ioSetArgs(args, this._deferredCancel, this._deferredOk, this._deferredError);
-
- var ioArgs = dfd.ioArgs;
- ioArgs.id = "dojoIoScript" + (this._counter++);
- ioArgs.canDelete = false;
-
- //Special setup for jsonp case
- if(args.callbackParamName){
- //Add the jsonp parameter.
- ioArgs.query = ioArgs.query || "";
- if(ioArgs.query.length > 0){
- ioArgs.query += "&";
- }
- ioArgs.query += args.callbackParamName + "=dojo.io.script.jsonp_" + ioArgs.id + "._jsonpCallback";
-
- //Setup the Deferred to have the jsonp callback.
- ioArgs.canDelete = true;
- dfd._jsonpCallback = this._jsonpCallback;
- this["jsonp_" + ioArgs.id] = dfd;
- }
- return dfd; // dojo.Deferred
- },
-
- _deferredCancel: function(/*Deferred*/dfd){
- //summary: canceller function for dojo._ioSetArgs call.
-
- //DO NOT use "this" and expect it to be dojo.io.script.
- dfd.canceled = true;
- if(dfd.ioArgs.canDelete){
- dojo.io.script._deadScripts.push(dfd.ioArgs.id);
- }
- },
- _deferredOk: function(/*Deferred*/dfd){
- //summary: okHandler function for dojo._ioSetArgs call.
-
- //DO NOT use "this" and expect it to be dojo.io.script.
-
- //Add script to list of things that can be removed.
- if(dfd.ioArgs.canDelete){
- dojo.io.script._deadScripts.push(dfd.ioArgs.id);
- }
-
- if(dfd.ioArgs.json){
- //Make sure to *not* remove the json property from the
- //Deferred, so that the Deferred can still function correctly
- //after the response is received.
- return dfd.ioArgs.json;
- }else{
- //FIXME: cannot return the dfd here, otherwise that stops
- //the callback chain in Deferred. So return the ioArgs instead.
- //This doesn't feel right.
- return dfd.ioArgs;
- }
- },
-
- _deferredError: function(/*Error*/error, /*Deferred*/dfd){
- //summary: errHandler function for dojo._ioSetArgs call.
-
- if(dfd.ioArgs.canDelete){
- //DO NOT use "this" and expect it to be dojo.io.script.
- if(error.dojoType == "timeout"){
- //For timeouts, remove the script element immediately to
- //avoid a response from it coming back later and causing trouble.
- dojo.io.script.remove(dfd.ioArgs.id);
- }else{
- dojo.io.script._deadScripts.push(dfd.ioArgs.id);
- }
- }
- console.debug("dojo.io.script error", error);
- return error;
- },
-
- _deadScripts: [],
- _counter: 1,
-
- _validCheck: function(/*Deferred*/dfd){
- //summary: inflight check function to see if dfd is still valid.
-
- //Do script cleanup here. We wait for one inflight pass
- //to make sure we don't get any weird things by trying to remove a script
- //tag that is part of the call chain (IE 6 has been known to
- //crash in that case).
- var _self = dojo.io.script;
- var deadScripts = _self._deadScripts;
- if(deadScripts && deadScripts.length > 0){
- for(var i = 0; i < deadScripts.length; i++){
- //Remove the script tag
- _self.remove(deadScripts[i]);
- }
- dojo.io.script._deadScripts = [];
- }
-
- return true;
- },
-
- _ioCheck: function(/*Deferred*/dfd){
- //summary: inflight check function to see if IO finished.
-
- //Check for finished jsonp
- if(dfd.ioArgs.json){
- return true;
- }
-
- //Check for finished "checkString" case.
- var checkString = dfd.ioArgs.args.checkString;
- if(checkString && eval("typeof(" + checkString + ") != 'undefined'")){
- return true;
- }
-
- return false;
- },
-
- _resHandle: function(/*Deferred*/dfd){
- //summary: inflight function to handle a completed response.
- if(dojo.io.script._ioCheck(dfd)){
- dfd.callback(dfd);
- }else{
- //This path should never happen since the only way we can get
- //to _resHandle is if _ioCheck is true.
- dfd.errback(new Error("inconceivable dojo.io.script._resHandle error"));
- }
- },
-
- _jsonpCallback: function(/*JSON Object*/json){
- //summary:
- // generic handler for jsonp callback. A pointer to this function
- // is used for all jsonp callbacks. NOTE: the "this" in this
- // function will be the Deferred object that represents the script
- // request.
- this.ioArgs.json = json;
- }
+if(!dojo._hasResource["dojo.io.script"]){
+dojo._hasResource["dojo.io.script"]=true;
+dojo.provide("dojo.io.script");
+(function(){
+var _1=dojo.isIE?"onreadystatechange":"load",_2=/complete|loaded/;
+dojo.io.script={get:function(_3){
+var _4=this._makeScriptDeferred(_3);
+var _5=_4.ioArgs;
+dojo._ioAddQueryToUrl(_5);
+dojo._ioNotifyStart(_4);
+if(this._canAttach(_5)){
+var _6=this.attach(_5.id,_5.url,_3.frameDoc);
+if(!_5.jsonp&&!_5.args.checkString){
+var _7=dojo.connect(_6,_1,function(_8){
+if(_8.type=="load"||_2.test(_6.readyState)){
+dojo.disconnect(_7);
+_5.scriptLoaded=_8;
+}
+});
+}
+}
+dojo._ioWatch(_4,this._validCheck,this._ioCheck,this._resHandle);
+return _4;
+},attach:function(id,_9,_a){
+var _b=(_a||dojo.doc);
+var _c=_b.createElement("script");
+_c.type="text/javascript";
+_c.src=_9;
+_c.id=id;
+_c.charset="utf-8";
+return _b.getElementsByTagName("head")[0].appendChild(_c);
+},remove:function(id,_d){
+dojo.destroy(dojo.byId(id,_d));
+if(this["jsonp_"+id]){
+delete this["jsonp_"+id];
+}
+},_makeScriptDeferred:function(_e){
+var _f=dojo._ioSetArgs(_e,this._deferredCancel,this._deferredOk,this._deferredError);
+var _10=_f.ioArgs;
+_10.id=dojo._scopeName+"IoScript"+(this._counter++);
+_10.canDelete=false;
+_10.jsonp=_e.callbackParamName||_e.jsonp;
+if(_10.jsonp){
+_10.query=_10.query||"";
+if(_10.query.length>0){
+_10.query+="&";
+}
+_10.query+=_10.jsonp+"="+(_e.frameDoc?"parent.":"")+dojo._scopeName+".io.script.jsonp_"+_10.id+"._jsonpCallback";
+_10.frameDoc=_e.frameDoc;
+_10.canDelete=true;
+_f._jsonpCallback=this._jsonpCallback;
+this["jsonp_"+_10.id]=_f;
}
-
+return _f;
+},_deferredCancel:function(dfd){
+dfd.canceled=true;
+if(dfd.ioArgs.canDelete){
+dojo.io.script._addDeadScript(dfd.ioArgs);
+}
+},_deferredOk:function(dfd){
+var _11=dfd.ioArgs;
+if(_11.canDelete){
+dojo.io.script._addDeadScript(_11);
+}
+return _11.json||_11.scriptLoaded||_11;
+},_deferredError:function(_12,dfd){
+if(dfd.ioArgs.canDelete){
+if(_12.dojoType=="timeout"){
+dojo.io.script.remove(dfd.ioArgs.id,dfd.ioArgs.frameDoc);
+}else{
+dojo.io.script._addDeadScript(dfd.ioArgs);
+}
}
+return _12;
+},_deadScripts:[],_counter:1,_addDeadScript:function(_13){
+dojo.io.script._deadScripts.push({id:_13.id,frameDoc:_13.frameDoc});
+_13.frameDoc=null;
+},_validCheck:function(dfd){
+var _14=dojo.io.script;
+var _15=_14._deadScripts;
+if(_15&&_15.length>0){
+for(var i=0;i<_15.length;i++){
+_14.remove(_15[i].id,_15[i].frameDoc);
+_15[i].frameDoc=null;
+}
+dojo.io.script._deadScripts=[];
+}
+return true;
+},_ioCheck:function(dfd){
+var _16=dfd.ioArgs;
+if(_16.json||(_16.scriptLoaded&&!_16.args.checkString)){
+return true;
+}
+var _17=_16.args.checkString;
+if(_17&&eval("typeof("+_17+") != 'undefined'")){
+return true;
+}
+return false;
+},_resHandle:function(dfd){
+if(dojo.io.script._ioCheck(dfd)){
+dfd.callback(dfd);
+}else{
+dfd.errback(new Error("inconceivable dojo.io.script._resHandle error"));
+}
+},_canAttach:function(_18){
+return true;
+},_jsonpCallback:function(_19){
+this.ioArgs.json=_19;
+}};
+})();
+}
diff --git a/js/dojo/dojo/nls/colors.js b/js/dojo/dojo/nls/colors.js
--- a/js/dojo/dojo/nls/colors.js
+++ b/js/dojo/dojo/nls/colors.js
@@ -1,1 +1,1 @@
-({"lightsteelblue": "light steel blue", "orangered": "orange red", "midnightblue": "midnight blue", "cadetblue": "cadet blue", "seashell": "seashell", "slategrey": "slate gray", "coral": "coral", "darkturquoise": "dark turquoise", "antiquewhite": "antique white", "mediumspringgreen": "medium spring green", "salmon": "salmon", "darkgrey": "dark gray", "ivory": "ivory", "greenyellow": "green-yellow", "mistyrose": "misty rose", "lightsalmon": "light salmon", "silver": "silver", "dimgrey": "dim gray", "orange": "orange", "white": "white", "navajowhite": "navajo white", "royalblue": "royal blue", "deeppink": "deep pink", "lime": "lime", "oldlace": "old lace", "chartreuse": "chartreuse", "darkcyan": "dark cyan", "yellow": "yellow", "linen": "linen", "olive": "olive", "gold": "gold", "lawngreen": "lawn green", "lightyellow": "light yellow", "tan": "tan", "darkviolet": "dark violet", "lightslategrey": "light slate gray", "grey": "gray", "darkkhaki": "dark khaki", "green": "green", "deepskyblue": "deep sky blue", "aqua": "aqua", "sienna": "sienna", "mintcream": "mint cream", "rosybrown": "rosy brown", "mediumslateblue": "medium slate blue", "magenta": "magenta", "lightseagreen": "light sea green", "cyan": "cyan", "olivedrab": "olive drab", "darkgoldenrod": "dark goldenrod", "slateblue": "slate blue", "mediumaquamarine": "medium aquamarine", "lavender": "lavender", "mediumseagreen": "medium sea green", "maroon": "maroon", "darkslategray": "dark slate gray", "mediumturquoise": "medium turquoise", "ghostwhite": "ghost white", "darkblue": "dark blue", "mediumvioletred": "medium violet-red", "brown": "brown", "lightgray": "light gray", "sandybrown": "sandy brown", "pink": "pink", "firebrick": "fire brick", "indigo": "indigo", "snow": "snow", "darkorchid": "dark orchid", "turquoise": "turquoise", "chocolate": "chocolate", "springgreen": "spring green", "moccasin": "moccasin", "navy": "navy", "lemonchiffon": "lemon chiffon", "teal": "teal", "floralwhite": "floral white", "cornflowerblue": "cornflower blue", "paleturquoise": "pale turquoise", "purple": "purple", "gainsboro": "gainsboro", "plum": "plum", "red": "red", "blue": "blue", "forestgreen": "forest green", "darkgreen": "dark green", "honeydew": "honeydew", "darkseagreen": "dark sea green", "lightcoral": "light coral", "palevioletred": "pale violet-red", "mediumpurple": "medium purple", "saddlebrown": "saddle brown", "darkmagenta": "dark magenta", "thistle": "thistle", "whitesmoke": "white smoke", "wheat": "wheat", "violet": "violet", "lightskyblue": "light sky blue", "goldenrod": "goldenrod", "mediumblue": "medium blue", "skyblue": "sky blue", "crimson": "crimson", "darksalmon": "dark salmon", "darkred": "dark red", "darkslategrey": "dark slate gray", "peru": "peru", "lightgrey": "light gray", "lightgoldenrodyellow": "light goldenrod yellow", "blanchedalmond": "blanched almond", "aliceblue": "alice blue", "bisque": "bisque", "slategray": "slate gray", "palegoldenrod": "pale goldenrod", "darkorange": "dark orange", "aquamarine": "aquamarine", "lightgreen": "light green", "burlywood": "burlywood", "dodgerblue": "dodger blue", "darkgray": "dark gray", "lightcyan": "light cyan", "powderblue": "powder blue", "blueviolet": "blue-violet", "orchid": "orchid", "dimgray": "dim gray", "beige": "beige", "fuchsia": "fuchsia", "lavenderblush": "lavender blush", "hotpink": "hot pink", "steelblue": "steel blue", "tomato": "tomato", "lightpink": "light pink", "limegreen": "lime green", "indianred": "indian red", "papayawhip": "papaya whip", "lightslategray": "light slate gray", "gray": "gray", "mediumorchid": "medium orchid", "cornsilk": "cornsilk", "black": "black", "seagreen": "sea green", "darkslateblue": "dark slate blue", "khaki": "khaki", "lightblue": "light blue", "palegreen": "pale green", "azure": "azure", "peachpuff": "peach puff", "darkolivegreen": "dark olive green", "yellowgreen": "yellow green"})
\ No newline at end of file
+({"lightsteelblue":"light steel blue","orangered":"orange red","midnightblue":"midnight blue","cadetblue":"cadet blue","seashell":"seashell","slategrey":"slate gray","coral":"coral","darkturquoise":"dark turquoise","antiquewhite":"antique white","mediumspringgreen":"medium spring green","salmon":"salmon","darkgrey":"dark gray","ivory":"ivory","greenyellow":"green-yellow","mistyrose":"misty rose","lightsalmon":"light salmon","silver":"silver","dimgrey":"dim gray","orange":"orange","white":"white","navajowhite":"navajo white","royalblue":"royal blue","deeppink":"deep pink","lime":"lime","oldlace":"old lace","chartreuse":"chartreuse","darkcyan":"dark cyan","yellow":"yellow","linen":"linen","olive":"olive","gold":"gold","lawngreen":"lawn green","lightyellow":"light yellow","tan":"tan","darkviolet":"dark violet","lightslategrey":"light slate gray","grey":"gray","darkkhaki":"dark khaki","green":"green","deepskyblue":"deep sky blue","aqua":"aqua","sienna":"sienna","mintcream":"mint cream","rosybrown":"rosy brown","mediumslateblue":"medium slate blue","magenta":"magenta","lightseagreen":"light sea green","cyan":"cyan","olivedrab":"olive drab","darkgoldenrod":"dark goldenrod","slateblue":"slate blue","mediumaquamarine":"medium aquamarine","lavender":"lavender","mediumseagreen":"medium sea green","maroon":"maroon","darkslategray":"dark slate gray","mediumturquoise":"medium turquoise","ghostwhite":"ghost white","darkblue":"dark blue","mediumvioletred":"medium violet-red","brown":"brown","lightgray":"light gray","sandybrown":"sandy brown","pink":"pink","firebrick":"fire brick","indigo":"indigo","snow":"snow","darkorchid":"dark orchid","turquoise":"turquoise","chocolate":"chocolate","springgreen":"spring green","moccasin":"moccasin","navy":"navy","lemonchiffon":"lemon chiffon","teal":"teal","floralwhite":"floral white","cornflowerblue":"cornflower blue","paleturquoise":"pale turquoise","purple":"purple","gainsboro":"gainsboro","plum":"plum","red":"red","blue":"blue","forestgreen":"forest green","darkgreen":"dark green","honeydew":"honeydew","darkseagreen":"dark sea green","lightcoral":"light coral","palevioletred":"pale violet-red","mediumpurple":"medium purple","saddlebrown":"saddle brown","darkmagenta":"dark magenta","thistle":"thistle","whitesmoke":"white smoke","wheat":"wheat","violet":"violet","lightskyblue":"light sky blue","goldenrod":"goldenrod","mediumblue":"medium blue","skyblue":"sky blue","crimson":"crimson","darksalmon":"dark salmon","darkred":"dark red","darkslategrey":"dark slate gray","peru":"peru","lightgrey":"light gray","lightgoldenrodyellow":"light goldenrod yellow","blanchedalmond":"blanched almond","aliceblue":"alice blue","bisque":"bisque","slategray":"slate gray","palegoldenrod":"pale goldenrod","darkorange":"dark orange","aquamarine":"aquamarine","lightgreen":"light green","burlywood":"burlywood","dodgerblue":"dodger blue","darkgray":"dark gray","lightcyan":"light cyan","powderblue":"powder blue","blueviolet":"blue-violet","orchid":"orchid","dimgray":"dim gray","beige":"beige","fuchsia":"fuchsia","lavenderblush":"lavender blush","hotpink":"hot pink","steelblue":"steel blue","tomato":"tomato","lightpink":"light pink","limegreen":"lime green","indianred":"indian red","papayawhip":"papaya whip","lightslategray":"light slate gray","gray":"gray","mediumorchid":"medium orchid","cornsilk":"cornsilk","black":"black","seagreen":"sea green","darkslateblue":"dark slate blue","khaki":"khaki","lightblue":"light blue","palegreen":"pale green","azure":"azure","peachpuff":"peach puff","darkolivegreen":"dark olive green","yellowgreen":"yellow green"})
\ No newline at end of file
diff --git a/js/dojo/dojo/nls/cs/colors.js b/js/dojo/dojo/nls/cs/colors.js
--- a/js/dojo/dojo/nls/cs/colors.js
+++ b/js/dojo/dojo/nls/cs/colors.js
@@ -1,1 +1,1 @@
-({"lightsteelblue": "světlá ocelová modrá", "orangered": "oranžovočervená", "midnightblue": "temně modrá", "cadetblue": "šedomodrá", "seashell": "lasturová", "slategrey": "břidlicová šedá", "coral": "korálová červená", "darkturquoise": "tmavě tyrkysová", "antiquewhite": "krémově bílá", "mediumspringgreen": "střední jarní zelená", "salmon": "lososová", "darkgrey": "tmavě šedá", "ivory": "slonovinová", "greenyellow": "zelenožlutá", "mistyrose": "růžovobílá", "lightsalmon": "světle lososová", "silver": "stříbrná", "dimgrey": "kouřově šedá", "orange": "oranžová", "white": "bílá", "navajowhite": "světle krémová", "royalblue": "královská modrá", "deeppink": "sytě růžová", "lime": "limetková", "oldlace": "světle béžová", "chartreuse": "chartreuska", "darkcyan": "tmavě azurová", "yellow": "žlutá", "linen": "bledě šedobéžová", "olive": "olivová", "gold": "zlatá", "lawngreen": "jasně zelená", "lightyellow": "bledě žlutá", "tan": "šedobéžová", "darkviolet": "tmavě fialová", "lightslategrey": "světlá břidlicová šedá", "grey": "šedá", "darkkhaki": "pískově hnědá", "green": "zelená", "deepskyblue": "sytá nebeská modrá", "aqua": "azurová", "sienna": "siena", "mintcream": "mentolová", "rosybrown": "růžovohnědá", "mediumslateblue": "střední břidlicová modrá", "magenta": "purpurová", "lightseagreen": "světlá mořská zelená", "cyan": "azurová", "olivedrab": "khaki", "darkgoldenrod": "tmavě béžová", "slateblue": "břidlicová modrá", "mediumaquamarine": "střední akvamarínová", "lavender": "levandulová", "mediumseagreen": "střední mořská zelená", "maroon": "kaštanová", "darkslategray": "tmavá břidlicová šedá", "mediumturquoise": "středně tyrkysová", "ghostwhite": "modravě bílá", "darkblue": "tmavě modrá", "mediumvioletred": "středně fialovočervená", "brown": "červenohnědá", "lightgray": "světle šedá", "sandybrown": "oranžovohnědá", "pink": "růžová", "firebrick": "cihlová", "indigo": "indigově modrá", "snow": "sněhobílá", "darkorchid": "tmavě orchidejová", "turquoise": "tyrkysová", "chocolate": "hnědobéžová", "springgreen": "jarní zelená", "moccasin": "bledě krémová", "navy": "námořnická modrá", "lemonchiffon": "světle citrónová", "teal": "šedozelená", "floralwhite": "květinově bílá", "cornflowerblue": "chrpově modrá", "paleturquoise": "bledě tyrkysová", "purple": "nachová", "gainsboro": "bledě šedá", "plum": "švestková", "red": "červená", "blue": "modrá", "forestgreen": "lesní zelená", "darkgreen": "tmavě zelená", "honeydew": "nazelenalá", "darkseagreen": "tmavá mořská zelená", "lightcoral": "světle korálová", "palevioletred": "bledě fialovočervená", "mediumpurple": "středně nachová", "saddlebrown": "hnědá", "darkmagenta": "tmavě purpurová", "thistle": "bodláková", "whitesmoke": "kouřově bílá", "wheat": "zlatohnědá", "violet": "fialová", "lightskyblue": "světlá nebeská modrá", "goldenrod": "béžová", "mediumblue": "středně modrá", "skyblue": "nebeská modrá", "crimson": "karmínová", "darksalmon": "tmavě lososová", "darkred": "tmavě červená", "darkslategrey": "tmavá břidlicová šedá", "peru": "karamelová", "lightgrey": "světle šedá", "lightgoldenrodyellow": "světle žlutá", "blanchedalmond": "mandlová", "aliceblue": "modravá", "bisque": "bledě oranžová", "slategray": "břidlicová šedá", "palegoldenrod": "bledě písková", "darkorange": "tmavě oranžová", "aquamarine": "akvamarínová", "lightgreen": "světle zelená", "burlywood": "krémová", "dodgerblue": "jasně modrá", "darkgray": "tmavě šedá", "lightcyan": "světle azurová", "powderblue": "bledě modrá", "blueviolet": "modrofialová", "orchid": "orchidejová", "dimgray": "kouřově šedá", "beige": "bledě béžová", "fuchsia": "fuchsiová", "lavenderblush": "levandulová růžová", "hotpink": "jasně růžová", "steelblue": "ocelová modrá", "tomato": "tomatová", "lightpink": "světle růžová", "limegreen": "limetkově zelená", "indianred": "indiánská červená", "papayawhip": "papájová", "lightslategray": "světlá břidlicová šedá", "gray": "šedá", "mediumorchid": "středně orchidejová", "cornsilk": "režná", "black": "černá", "seagreen": "mořská zelená", "darkslateblue": "tmavá břidlicová modrá", "khaki": "písková", "lightblue": "světle modrá", "palegreen": "bledě zelená", "azure": "bledě azurová", "peachpuff": "broskvová", "darkolivegreen": "tmavě olivová", "yellowgreen": "žlutozelená"})
\ No newline at end of file
+({"lightsteelblue":"světlá ocelová modrá","orangered":"oranžovočervená","midnightblue":"temně modrá","cadetblue":"šedomodrá","seashell":"lasturová","slategrey":"břidlicová šedá","coral":"korálová červená","darkturquoise":"tmavě tyrkysová","antiquewhite":"krémově bílá","mediumspringgreen":"střední jarní zelená","salmon":"lososová","darkgrey":"tmavě šedá","ivory":"slonovinová","greenyellow":"zelenožlutá","mistyrose":"růžovobílá","lightsalmon":"světle lososová","silver":"stříbrná","dimgrey":"kouřově šedá","orange":"oranžová","white":"bílá","navajowhite":"světle krémová","royalblue":"královská modrá","deeppink":"sytě růžová","lime":"limetková","oldlace":"světle béžová","chartreuse":"chartreuska","darkcyan":"tmavě azurová","yellow":"žlutá","linen":"bledě šedobéžová","olive":"olivová","gold":"zlatá","lawngreen":"jasně zelená","lightyellow":"bledě žlutá","tan":"šedobéžová","darkviolet":"tmavě fialová","lightslategrey":"světlá břidlicová šedá","grey":"šedá","darkkhaki":"pískově hnědá","green":"zelená","deepskyblue":"sytá nebeská modrá","aqua":"azurová","sienna":"siena","mintcream":"mentolová","rosybrown":"růžovohnědá","mediumslateblue":"střední břidlicová modrá","magenta":"purpurová","lightseagreen":"světlá mořská zelená","cyan":"azurová","olivedrab":"khaki","darkgoldenrod":"tmavě béžová","slateblue":"břidlicová modrá","mediumaquamarine":"střední akvamarínová","lavender":"levandulová","mediumseagreen":"střední mořská zelená","maroon":"kaštanová","darkslategray":"tmavá břidlicová šedá","mediumturquoise":"středně tyrkysová","ghostwhite":"modravě bílá","darkblue":"tmavě modrá","mediumvioletred":"středně fialovočervená","brown":"červenohnědá","lightgray":"světle šedá","sandybrown":"oranžovohnědá","pink":"růžová","firebrick":"cihlová","indigo":"indigově modrá","snow":"sněhobílá","darkorchid":"tmavě orchidejová","turquoise":"tyrkysová","chocolate":"hnědobéžová","springgreen":"jarní zelená","moccasin":"bledě krémová","navy":"námořnická modrá","lemonchiffon":"světle citrónová","teal":"šedozelená","floralwhite":"květinově bílá","cornflowerblue":"chrpově modrá","paleturquoise":"bledě tyrkysová","purple":"nachová","gainsboro":"bledě šedá","plum":"švestková","red":"červená","blue":"modrá","forestgreen":"lesní zelená","darkgreen":"tmavě zelená","honeydew":"nazelenalá","darkseagreen":"tmavá mořská zelená","lightcoral":"světle korálová","palevioletred":"bledě fialovočervená","mediumpurple":"středně nachová","saddlebrown":"hnědá","darkmagenta":"tmavě purpurová","thistle":"bodláková","whitesmoke":"kouřově bílá","wheat":"zlatohnědá","violet":"fialová","lightskyblue":"světlá nebeská modrá","goldenrod":"béžová","mediumblue":"středně modrá","skyblue":"nebeská modrá","crimson":"karmínová","darksalmon":"tmavě lososová","darkred":"tmavě červená","darkslategrey":"tmavá břidlicová šedá","peru":"karamelová","lightgrey":"světle šedá","lightgoldenrodyellow":"světle žlutá","blanchedalmond":"mandlová","aliceblue":"modravá","bisque":"bledě oranžová","slategray":"břidlicová šedá","palegoldenrod":"bledě písková","darkorange":"tmavě oranžová","aquamarine":"akvamarínová","lightgreen":"světle zelená","burlywood":"krémová","dodgerblue":"jasně modrá","darkgray":"tmavě šedá","lightcyan":"světle azurová","powderblue":"bledě modrá","blueviolet":"modrofialová","orchid":"orchidejová","dimgray":"kouřově šedá","beige":"bledě béžová","fuchsia":"fuchsiová","lavenderblush":"levandulová růžová","hotpink":"jasně růžová","steelblue":"ocelová modrá","tomato":"tomatová","lightpink":"světle růžová","limegreen":"limetkově zelená","indianred":"indiánská červená","papayawhip":"papájová","lightslategray":"světlá břidlicová šedá","gray":"šedá","mediumorchid":"středně orchidejová","cornsilk":"režná","black":"černá","seagreen":"mořská zelená","darkslateblue":"tmavá břidlicová modrá","khaki":"písková","lightblue":"světle modrá","palegreen":"bledě zelená","azure":"bledě azurová","peachpuff":"broskvová","darkolivegreen":"tmavě olivová","yellowgreen":"žlutozelená"})
\ No newline at end of file
diff --git a/js/dojo/dojo/nls/de/colors.js b/js/dojo/dojo/nls/de/colors.js
--- a/js/dojo/dojo/nls/de/colors.js
+++ b/js/dojo/dojo/nls/de/colors.js
@@ -1,1 +1,1 @@
-({"lightsteelblue": "Helles Stahlblau", "orangered": "Orangerot", "midnightblue": "Mitternachtblau", "cadetblue": "Kadettenblau", "seashell": "Muschelweiß", "slategrey": "Schiefergrau", "coral": "Koralle", "darkturquoise": "Dunkeltürkis", "antiquewhite": "Antikweiß", "mediumspringgreen": "Mittelfrühlingsgrün", "salmon": "Lachs", "darkgrey": "Dunkelgrau", "ivory": "Elfenbein", "greenyellow": "Grüngelb", "mistyrose": "Blassrose", "lightsalmon": "Helllachs", "silver": "Silbergrau", "dimgrey": "Blassgrau", "orange": "Orange", "white": "Weiß", "navajowhite": "Navajo-weiß", "royalblue": "Königsblau", "deeppink": "Tiefrosa", "lime": "Limone", "oldlace": "Alte Spitze", "chartreuse": "Helles Gelbgrün", "darkcyan": "Dunkelzyan", "yellow": "Gelb", "linen": "Leinen", "olive": "Oliv", "gold": "Gold", "lawngreen": "Grasgrün", "lightyellow": "Hellgelb", "tan": "Hautfarben", "darkviolet": "Dunkelviolett", "lightslategrey": "Helles Schiefergrau", "grey": "Grau", "darkkhaki": "Dunkelkhaki", "green": "Grün", "deepskyblue": "Dunkles Himmelblau", "aqua": "Wasserblau", "sienna": "Sienna", "mintcream": "Mintcreme", "rosybrown": "Rosigbraun", "mediumslateblue": "Mittelschieferblau ", "magenta": "Magenta", "lightseagreen": "Helles Meergrün", "cyan": "Zyan", "olivedrab": "Olivgrau", "darkgoldenrod": "Dunkelgoldgelb", "slateblue": "Schieferblau", "mediumaquamarine": "Mittelaquamarin", "lavender": "Lavendelblau", "mediumseagreen": "Mittelmeeresgrün", "maroon": "Kastanienbraun", "darkslategray": "Dunkelschiefergrau", "mediumturquoise": "Mitteltürkis ", "ghostwhite": "Geisterweiß", "darkblue": "Dunkelblau", "mediumvioletred": "Mittelviolettrot ", "brown": "Braun", "lightgray": "Hellgrau", "sandybrown": "Sandbraun", "pink": "Rosa", "firebrick": "Schamottestein", "indigo": "Indigoblau", "snow": "Schneeweiß", "darkorchid": "Dunkelorchidee", "turquoise": "Türkis", "chocolate": "Schokoladenbraun", "springgreen": "Frühlingsgrün", "moccasin": "Mokassin", "navy": "Marineblau", "lemonchiffon": "Zitronenchiffon", "teal": "Smaragdgrün", "floralwhite": "Blütenweiß", "cornflowerblue": "Kornblumenblau", "paleturquoise": "Blasstürkis", "purple": "Purpurrot", "gainsboro": "Gainsboro", "plum": "Pflaume", "red": "Rot", "blue": "Blau", "forestgreen": "Forstgrün", "darkgreen": "Dunkelgrün", "honeydew": "Honigtau", "darkseagreen": "Dunkles Meergrün", "lightcoral": "Hellkoralle", "palevioletred": "Blassviolettrot ", "mediumpurple": "Mittelpurpur", "saddlebrown": "Sattelbraun", "darkmagenta": "Dunkelmagenta", "thistle": "Distel", "whitesmoke": "Rauchweiß", "wheat": "Weizen", "violet": "Violett", "lightskyblue": "Helles Himmelblau", "goldenrod": "Goldgelb", "mediumblue": "Mittelblau", "skyblue": "Himmelblau", "crimson": "Karmesinrot", "darksalmon": "Dunkellachs", "darkred": "Dunkelrot", "darkslategrey": "Dunkelschiefergrau", "peru": "Peru", "lightgrey": "Hellgrau", "lightgoldenrodyellow": "Hellgoldgelb", "blanchedalmond": "Mandelweiß", "aliceblue": "Alice-blau", "bisque": "Bisquit", "slategray": "Schiefergrau", "palegoldenrod": "Blassgoldgelb", "darkorange": "Dunkelorange", "aquamarine": "Aquamarin", "lightgreen": "Hellgrün", "burlywood": "Burlywood", "dodgerblue": "Dodger-blau", "darkgray": "Dunkelgrau", "lightcyan": "Hellzyan", "powderblue": "Pulverblau", "blueviolet": "Blauviolett", "orchid": "Orchidee", "dimgray": "Blassgrau", "beige": "Beige", "fuchsia": "Fuchsia", "lavenderblush": "Lavendelhauch", "hotpink": "Knallrosa", "steelblue": "Stahlblau", "tomato": "Tomatenrot", "lightpink": "Hellrosa", "limegreen": "Limonengrün", "indianred": "Indischrot", "papayawhip": "Papayacreme", "lightslategray": "Helles Schiefergrau", "gray": "Grau", "mediumorchid": "Mittelorchidee", "cornsilk": "Kornseide", "black": "Schwarz", "seagreen": "Meeresgrün", "darkslateblue": "Dunkelschieferblau", "khaki": "Khaki", "lightblue": "Hellblau", "palegreen": "Blassgrün", "azure": "Azur", "peachpuff": "Pfirsich", "darkolivegreen": "Dunkelolivgrün", "yellowgreen": "Gelbgrün"})
\ No newline at end of file
+({"lightsteelblue":"Helles Stahlblau","orangered":"Orangerot","midnightblue":"Mitternachtblau","cadetblue":"Kadettenblau","seashell":"Muschelweiß","slategrey":"Schiefergrau","coral":"Koralle","darkturquoise":"Dunkeltürkis","antiquewhite":"Antikweiß","mediumspringgreen":"Mittelfrühlingsgrün","salmon":"Lachs","darkgrey":"Dunkelgrau","ivory":"Elfenbein","greenyellow":"Grüngelb","mistyrose":"Blassrose","lightsalmon":"Helllachs","silver":"Silbergrau","dimgrey":"Blassgrau","orange":"Orange","white":"Weiß","navajowhite":"Navajo-weiß","royalblue":"Königsblau","deeppink":"Tiefrosa","lime":"Limone","oldlace":"Alte Spitze","chartreuse":"Helles Gelbgrün","darkcyan":"Dunkelzyan","yellow":"Gelb","linen":"Leinen","olive":"Oliv","gold":"Gold","lawngreen":"Grasgrün","lightyellow":"Hellgelb","tan":"Hautfarben","darkviolet":"Dunkelviolett","lightslategrey":"Helles Schiefergrau","grey":"Grau","darkkhaki":"Dunkelkhaki","green":"Grün","deepskyblue":"Dunkles Himmelblau","aqua":"Wasserblau","sienna":"Sienna","mintcream":"Mintcreme","rosybrown":"Rosigbraun","mediumslateblue":"Mittelschieferblau ","magenta":"Magenta","lightseagreen":"Helles Meergrün","cyan":"Zyan","olivedrab":"Olivgrau","darkgoldenrod":"Dunkelgoldgelb","slateblue":"Schieferblau","mediumaquamarine":"Mittelaquamarin","lavender":"Lavendelblau","mediumseagreen":"Mittelmeeresgrün","maroon":"Kastanienbraun","darkslategray":"Dunkelschiefergrau","mediumturquoise":"Mitteltürkis ","ghostwhite":"Geisterweiß","darkblue":"Dunkelblau","mediumvioletred":"Mittelviolettrot ","brown":"Braun","lightgray":"Hellgrau","sandybrown":"Sandbraun","pink":"Rosa","firebrick":"Schamottestein","indigo":"Indigoblau","snow":"Schneeweiß","darkorchid":"Dunkelorchidee","turquoise":"Türkis","chocolate":"Schokoladenbraun","springgreen":"Frühlingsgrün","moccasin":"Mokassin","navy":"Marineblau","lemonchiffon":"Zitronenchiffon","teal":"Smaragdgrün","floralwhite":"Blütenweiß","cornflowerblue":"Kornblumenblau","paleturquoise":"Blasstürkis","purple":"Purpurrot","gainsboro":"Gainsboro","plum":"Pflaume","red":"Rot","blue":"Blau","forestgreen":"Forstgrün","darkgreen":"Dunkelgrün","honeydew":"Honigtau","darkseagreen":"Dunkles Meergrün","lightcoral":"Hellkoralle","palevioletred":"Blassviolettrot ","mediumpurple":"Mittelpurpur","saddlebrown":"Sattelbraun","darkmagenta":"Dunkelmagenta","thistle":"Distel","whitesmoke":"Rauchweiß","wheat":"Weizen","violet":"Violett","lightskyblue":"Helles Himmelblau","goldenrod":"Goldgelb","mediumblue":"Mittelblau","skyblue":"Himmelblau","crimson":"Karmesinrot","darksalmon":"Dunkellachs","darkred":"Dunkelrot","darkslategrey":"Dunkelschiefergrau","peru":"Peru","lightgrey":"Hellgrau","lightgoldenrodyellow":"Hellgoldgelb","blanchedalmond":"Mandelweiß","aliceblue":"Alice-blau","bisque":"Bisquit","slategray":"Schiefergrau","palegoldenrod":"Blassgoldgelb","darkorange":"Dunkelorange","aquamarine":"Aquamarin","lightgreen":"Hellgrün","burlywood":"Burlywood","dodgerblue":"Dodger-blau","darkgray":"Dunkelgrau","lightcyan":"Hellzyan","powderblue":"Pulverblau","blueviolet":"Blauviolett","orchid":"Orchidee","dimgray":"Blassgrau","beige":"Beige","fuchsia":"Fuchsia","lavenderblush":"Lavendelhauch","hotpink":"Knallrosa","steelblue":"Stahlblau","tomato":"Tomatenrot","lightpink":"Hellrosa","limegreen":"Limonengrün","indianred":"Indischrot","papayawhip":"Papayacreme","lightslategray":"Helles Schiefergrau","gray":"Grau","mediumorchid":"Mittelorchidee","cornsilk":"Kornseide","black":"Schwarz","seagreen":"Meeresgrün","darkslateblue":"Dunkelschieferblau","khaki":"Khaki","lightblue":"Hellblau","palegreen":"Blassgrün","azure":"Azur","peachpuff":"Pfirsich","darkolivegreen":"Dunkelolivgrün","yellowgreen":"Gelbgrün"})
\ No newline at end of file
diff --git a/js/dojo/dojo/nls/es/colors.js b/js/dojo/dojo/nls/es/colors.js
--- a/js/dojo/dojo/nls/es/colors.js
+++ b/js/dojo/dojo/nls/es/colors.js
@@ -1,1 +1,1 @@
-({"lightsteelblue": "azul acero claro", "orangered": "rojo anaranjado", "midnightblue": "azul medianoche", "cadetblue": "azul cadete", "seashell": "blanco marfil", "slategrey": "gris pizarra", "coral": "coral", "darkturquoise": "turquesa oscuro", "antiquewhite": "blanco antiguo", "mediumspringgreen": "verde primavera medio", "salmon": "salmón", "darkgrey": "gris oscuro", "ivory": "marfil", "greenyellow": "amarillo verdoso", "mistyrose": "rosa difuminado", "lightsalmon": "salmón claro", "silver": "plateado", "dimgrey": "gris marengo", "orange": "naranja", "white": "blanco", "navajowhite": "blanco navajo", "royalblue": "azul real", "deeppink": "rosa fuerte", "lime": "lima", "oldlace": "encaje antiguo", "chartreuse": "verde pálido 2", "darkcyan": "cian oscuro", "yellow": "amarillo", "linen": "blanco arena", "olive": "verde oliva", "gold": "oro", "lawngreen": "verde césped", "lightyellow": "amarillo claro", "tan": "canela", "darkviolet": "violeta oscuro", "lightslategrey": "gris pizarra claro", "grey": "gris", "darkkhaki": "caqui oscuro", "green": "verde", "deepskyblue": "azul cielo fuerte", "aqua": "aguamarina", "sienna": "siena", "mintcream": "crema menta", "rosybrown": "marrón rosáceo", "mediumslateblue": "azul pizarra medio", "magenta": "magenta", "lightseagreen": "verde mar claro", "cyan": "cian", "olivedrab": "verde oliva pardusco", "darkgoldenrod": "ocre oscuro", "slateblue": "azul pizarra", "mediumaquamarine": "aguamarina medio", "lavender": "lavanda", "mediumseagreen": "verde mar medio", "maroon": "granate", "darkslategray": "gris pizarra oscuro", "mediumturquoise": "turquesa medio", "ghostwhite": "blanco ligero", "darkblue": "azul oscuro", "mediumvioletred": "rojo violáceo medio", "brown": "marrón", "lightgray": "gris claro", "sandybrown": "marrón arcilla", "pink": "rosa", "firebrick": "teja", "indigo": "añil", "snow": "nieve", "darkorchid": "orquídea oscuro", "turquoise": "turquesa", "chocolate": "chocolate", "springgreen": "verde fuerte", "moccasin": "arena", "navy": "azul marino", "lemonchiffon": "amarillo pastel", "teal": "verde azulado", "floralwhite": "blanco manteca", "cornflowerblue": "azul aciano", "paleturquoise": "turquesa pálido", "purple": "púrpura", "gainsboro": "azul gainsboro", "plum": "ciruela", "red": "rojo", "blue": "azul", "forestgreen": "verde pino", "darkgreen": "verde oscuro", "honeydew": "flor de rocío", "darkseagreen": "verde mar oscuro", "lightcoral": "coral claro", "palevioletred": "rojo violáceo pálido", "mediumpurple": "púrpura medio", "saddlebrown": "cuero", "darkmagenta": "magenta oscuro", "thistle": "cardo", "whitesmoke": "blanco ahumado", "wheat": "trigo", "violet": "violeta", "lightskyblue": "azul cielo claro", "goldenrod": "ocre", "mediumblue": "azul medio", "skyblue": "azul cielo", "crimson": "carmesí", "darksalmon": "salmón oscuro", "darkred": "rojo oscuro", "darkslategrey": "gris pizarra oscuro", "peru": "perú", "lightgrey": "gris claro", "lightgoldenrodyellow": "ocre claro", "blanchedalmond": "almendra pálido", "aliceblue": "blanco azulado", "bisque": "miel", "slategray": "gris pizarra", "palegoldenrod": "ocre pálido", "darkorange": "naranja oscuro", "aquamarine": "aguamarina 2", "lightgreen": "verde claro", "burlywood": "madera", "dodgerblue": "azul fuerte", "darkgray": "gris oscuro", "lightcyan": "cian claro", "powderblue": "azul suave", "blueviolet": "azul violáceo", "orchid": "orquídea", "dimgray": "gris marengo", "beige": "beige", "fuchsia": "fucsia", "lavenderblush": "lavanda rosácea", "hotpink": "rosa oscuro", "steelblue": "azul acero", "tomato": "tomate", "lightpink": "rosa claro", "limegreen": "lima limón", "indianred": "rojo teja", "papayawhip": "papaya claro", "lightslategray": "gris pizarra claro", "gray": "gris", "mediumorchid": "orquídea medio", "cornsilk": "crudo", "black": "negro", "seagreen": "verde mar", "darkslateblue": "azul pizarra oscuro", "khaki": "caqui", "lightblue": "azul claro", "palegreen": "verde pálido", "azure": "blanco cielo", "peachpuff": "melocotón", "darkolivegreen": "verde oliva oscuro", "yellowgreen": "verde amarillento"})
\ No newline at end of file
+({"lightsteelblue":"azul acero claro","orangered":"rojo anaranjado","midnightblue":"azul medianoche","cadetblue":"azul cadete","seashell":"blanco marfil","slategrey":"gris pizarra","coral":"coral","darkturquoise":"turquesa oscuro","antiquewhite":"blanco antiguo","mediumspringgreen":"verde primavera medio","salmon":"salmón","darkgrey":"gris oscuro","ivory":"marfil","greenyellow":"amarillo verdoso","mistyrose":"rosa difuminado","lightsalmon":"salmón claro","silver":"plateado","dimgrey":"gris marengo","orange":"naranja","white":"blanco","navajowhite":"blanco navajo","royalblue":"azul real","deeppink":"rosa fuerte","lime":"lima","oldlace":"encaje antiguo","chartreuse":"verde pálido 2","darkcyan":"cian oscuro","yellow":"amarillo","linen":"blanco arena","olive":"verde oliva","gold":"oro","lawngreen":"verde césped","lightyellow":"amarillo claro","tan":"canela","darkviolet":"violeta oscuro","lightslategrey":"gris pizarra claro","grey":"gris","darkkhaki":"caqui oscuro","green":"verde","deepskyblue":"azul cielo fuerte","aqua":"aguamarina","sienna":"siena","mintcream":"crema menta","rosybrown":"marrón rosáceo","mediumslateblue":"azul pizarra medio","magenta":"magenta","lightseagreen":"verde mar claro","cyan":"cian","olivedrab":"verde oliva pardusco","darkgoldenrod":"ocre oscuro","slateblue":"azul pizarra","mediumaquamarine":"aguamarina medio","lavender":"lavanda","mediumseagreen":"verde mar medio","maroon":"granate","darkslategray":"gris pizarra oscuro","mediumturquoise":"turquesa medio","ghostwhite":"blanco ligero","darkblue":"azul oscuro","mediumvioletred":"rojo violáceo medio","brown":"marrón","lightgray":"gris claro","sandybrown":"marrón arcilla","pink":"rosa","firebrick":"teja","indigo":"añil","snow":"nieve","darkorchid":"orquídea oscuro","turquoise":"turquesa","chocolate":"chocolate","springgreen":"verde fuerte","moccasin":"arena","navy":"azul marino","lemonchiffon":"amarillo pastel","teal":"verde azulado","floralwhite":"blanco manteca","cornflowerblue":"azul aciano","paleturquoise":"turquesa pálido","purple":"púrpura","gainsboro":"azul gainsboro","plum":"ciruela","red":"rojo","blue":"azul","forestgreen":"verde pino","darkgreen":"verde oscuro","honeydew":"flor de rocío","darkseagreen":"verde mar oscuro","lightcoral":"coral claro","palevioletred":"rojo violáceo pálido","mediumpurple":"púrpura medio","saddlebrown":"cuero","darkmagenta":"magenta oscuro","thistle":"cardo","whitesmoke":"blanco ahumado","wheat":"trigo","violet":"violeta","lightskyblue":"azul cielo claro","goldenrod":"ocre","mediumblue":"azul medio","skyblue":"azul cielo","crimson":"carmesí","darksalmon":"salmón oscuro","darkred":"rojo oscuro","darkslategrey":"gris pizarra oscuro","peru":"perú","lightgrey":"gris claro","lightgoldenrodyellow":"ocre claro","blanchedalmond":"almendra pálido","aliceblue":"blanco azulado","bisque":"miel","slategray":"gris pizarra","palegoldenrod":"ocre pálido","darkorange":"naranja oscuro","aquamarine":"aguamarina 2","lightgreen":"verde claro","burlywood":"madera","dodgerblue":"azul fuerte","darkgray":"gris oscuro","lightcyan":"cian claro","powderblue":"azul suave","blueviolet":"azul violáceo","orchid":"orquídea","dimgray":"gris marengo","beige":"beige","fuchsia":"fucsia","lavenderblush":"lavanda rosácea","hotpink":"rosa oscuro","steelblue":"azul acero","tomato":"tomate","lightpink":"rosa claro","limegreen":"lima limón","indianred":"rojo teja","papayawhip":"papaya claro","lightslategray":"gris pizarra claro","gray":"gris","mediumorchid":"orquídea medio","cornsilk":"crudo","black":"negro","seagreen":"verde mar","darkslateblue":"azul pizarra oscuro","khaki":"caqui","lightblue":"azul claro","palegreen":"verde pálido","azure":"blanco cielo","peachpuff":"melocotón","darkolivegreen":"verde oliva oscuro","yellowgreen":"verde amarillento"})
\ No newline at end of file
diff --git a/js/dojo/dojo/nls/fr/colors.js b/js/dojo/dojo/nls/fr/colors.js
--- a/js/dojo/dojo/nls/fr/colors.js
+++ b/js/dojo/dojo/nls/fr/colors.js
@@ -1,1 +1,1 @@
-({"lightsteelblue": "bleu acier clair", "orangered": "rouge orangé", "midnightblue": "bleu nuit", "cadetblue": "bleu pétrole", "seashell": "coquillage", "slategrey": "gris ardoise", "coral": "corail", "darkturquoise": "turquoise foncé", "antiquewhite": "blanc antique", "mediumspringgreen": "vert printemps moyen", "salmon": "saumon", "darkgrey": "gris foncé", "ivory": "ivoire", "greenyellow": "vert-jaune", "mistyrose": "rose pâle", "lightsalmon": "saumon clair", "silver": "argent", "dimgrey": "gris soutenu", "orange": "orange", "white": "blanc", "navajowhite": "chair", "royalblue": "bleu roi", "deeppink": "rose soutenu", "lime": "vert citron", "oldlace": "blanc cassé", "chartreuse": "vert vif", "darkcyan": "cyan foncé", "yellow": "jaune", "linen": "écru", "olive": "olive", "gold": "or", "lawngreen": "vert prairie", "lightyellow": "jaune clair", "tan": "grège", "darkviolet": "violet foncé", "lightslategrey": "gris ardoise clair", "grey": "gris", "darkkhaki": "kaki foncé", "green": "vert", "deepskyblue": "bleu ciel soutenu", "aqua": "bleu-vert", "sienna": "terre de sienne", "mintcream": "crème de menthe", "rosybrown": "vieux rose", "mediumslateblue": "bleu ardoise moyen", "magenta": "magenta", "lightseagreen": "vert d'eau clair", "cyan": "cyan", "olivedrab": "brun verdâtre", "darkgoldenrod": "jaune paille foncé", "slateblue": "bleu ardoise", "mediumaquamarine": "aigue-marine moyen", "lavender": "lavande", "mediumseagreen": "vert d'eau moyen ", "maroon": "marron", "darkslategray": "gris ardoise foncé", "mediumturquoise": "turquoise moyen", "ghostwhite": "blanc laiteux", "darkblue": "bleu foncé", "mediumvioletred": "rouge violacé moyen", "brown": "brun", "lightgray": "gris clair", "sandybrown": "sable", "pink": "rose", "firebrick": "rouge brique", "indigo": "indigo", "snow": "neige", "darkorchid": "lilas foncé", "turquoise": "turquoise", "chocolate": "chocolat", "springgreen": "vert printemps", "moccasin": "chamois", "navy": "bleu marine", "lemonchiffon": "mousse de citron", "teal": "sarcelle", "floralwhite": "lys", "cornflowerblue": "bleuet", "paleturquoise": "turquoise pâle", "purple": "pourpre", "gainsboro": "gris souris", "plum": "prune", "red": "rouge", "blue": "bleu", "forestgreen": "vert sapin", "darkgreen": "vert foncé", "honeydew": "opalin", "darkseagreen": "vert d'eau foncé", "lightcoral": "corail clair", "palevioletred": "rouge violacé pâle", "mediumpurple": "pourpre moyen", "saddlebrown": "brun cuir", "darkmagenta": "magenta foncé", "thistle": "chardon", "whitesmoke": "blanc cendré", "wheat": "blé", "violet": "violet", "lightskyblue": "bleu ciel clair", "goldenrod": "jaune paille", "mediumblue": "bleu moyen", "skyblue": "bleu ciel", "crimson": "cramoisi", "darksalmon": "saumon foncé", "darkred": "rouge foncé", "darkslategrey": "gris ardoise foncé", "peru": "caramel", "lightgrey": "gris clair", "lightgoldenrodyellow": "jaune paille clair", "blanchedalmond": "coquille d'oeuf", "aliceblue": "bleu gris", "bisque": "beige rosé", "slategray": "gris ardoise", "palegoldenrod": "jaune paille pâle", "darkorange": "orange foncé", "aquamarine": "aigue-marine", "lightgreen": "vert clair", "burlywood": "bois précieux", "dodgerblue": "bleu France", "darkgray": "gris foncé", "lightcyan": "cyan clair", "powderblue": "bleu de smalt", "blueviolet": "bleu-violet", "orchid": "lilas", "dimgray": "gris soutenu", "beige": "beige", "fuchsia": "fuchsia", "lavenderblush": "lavandin", "hotpink": "rose intense", "steelblue": "bleu acier", "tomato": "tomate", "lightpink": "rose clair", "limegreen": "citron vert", "indianred": "rose indien", "papayawhip": "crème de papaye", "lightslategray": "gris ardoise clair", "gray": "gris", "mediumorchid": "lilas moyen", "cornsilk": "vanille", "black": "noir", "seagreen": "vert d'eau", "darkslateblue": "bleu ardoise foncé", "khaki": "kaki", "lightblue": "bleu clair", "palegreen": "vert pâle", "azure": "bleu azur", "peachpuff": "pêche", "darkolivegreen": "olive foncé", "yellowgreen": "vert jaunâtre"})
\ No newline at end of file
+({"lightsteelblue":"bleu acier clair","orangered":"rouge orangé","midnightblue":"bleu nuit","cadetblue":"bleu pétrole","seashell":"coquillage","slategrey":"gris ardoise","coral":"corail","darkturquoise":"turquoise foncé","antiquewhite":"blanc antique","mediumspringgreen":"vert printemps moyen","salmon":"saumon","darkgrey":"gris foncé","ivory":"ivoire","greenyellow":"vert-jaune","mistyrose":"rose pâle","lightsalmon":"saumon clair","silver":"argent","dimgrey":"gris soutenu","orange":"orange","white":"blanc","navajowhite":"chair","royalblue":"bleu roi","deeppink":"rose soutenu","lime":"vert citron","oldlace":"blanc cassé","chartreuse":"vert vif","darkcyan":"cyan foncé","yellow":"jaune","linen":"écru","olive":"olive","gold":"or","lawngreen":"vert prairie","lightyellow":"jaune clair","tan":"grège","darkviolet":"violet foncé","lightslategrey":"gris ardoise clair","grey":"gris","darkkhaki":"kaki foncé","green":"vert","deepskyblue":"bleu ciel soutenu","aqua":"bleu-vert","sienna":"terre de sienne","mintcream":"crème de menthe","rosybrown":"vieux rose","mediumslateblue":"bleu ardoise moyen","magenta":"magenta","lightseagreen":"vert d'eau clair","cyan":"cyan","olivedrab":"brun verdâtre","darkgoldenrod":"jaune paille foncé","slateblue":"bleu ardoise","mediumaquamarine":"aigue-marine moyen","lavender":"lavande","mediumseagreen":"vert d'eau moyen","maroon":"marron","darkslategray":"gris ardoise foncé","mediumturquoise":"turquoise moyen","ghostwhite":"blanc laiteux","darkblue":"bleu foncé","mediumvioletred":"rouge violacé moyen","brown":"brun","lightgray":"gris clair","sandybrown":"sable","pink":"rose","firebrick":"rouge brique","indigo":"indigo","snow":"neige","darkorchid":"lilas foncé","turquoise":"turquoise","chocolate":"chocolat","springgreen":"vert printemps","moccasin":"chamois","navy":"bleu marine","lemonchiffon":"mousse de citron","teal":"sarcelle","floralwhite":"lys","cornflowerblue":"bleuet","paleturquoise":"turquoise pâle","purple":"pourpre","gainsboro":"gris souris","plum":"prune","red":"rouge","blue":"bleu","forestgreen":"vert sapin","darkgreen":"vert foncé","honeydew":"opalin","darkseagreen":"vert d'eau foncé","lightcoral":"corail clair","palevioletred":"rouge violacé pâle","mediumpurple":"pourpre moyen","saddlebrown":"brun cuir","darkmagenta":"magenta foncé","thistle":"chardon","whitesmoke":"blanc cendré","wheat":"blé","violet":"violet","lightskyblue":"bleu ciel clair","goldenrod":"jaune paille","mediumblue":"bleu moyen","skyblue":"bleu ciel","crimson":"cramoisi","darksalmon":"saumon foncé","darkred":"rouge foncé","darkslategrey":"gris ardoise foncé","peru":"caramel","lightgrey":"gris clair","lightgoldenrodyellow":"jaune paille clair","blanchedalmond":"coquille d'oeuf","aliceblue":"bleu gris","bisque":"beige rosé","slategray":"gris ardoise","palegoldenrod":"jaune paille pâle","darkorange":"orange foncé","aquamarine":"aigue-marine","lightgreen":"vert clair","burlywood":"bois précieux","dodgerblue":"bleu France","darkgray":"gris foncé","lightcyan":"cyan clair","powderblue":"bleu de smalt","blueviolet":"bleu-violet","orchid":"lilas","dimgray":"gris soutenu","beige":"beige","fuchsia":"fuchsia","lavenderblush":"lavandin","hotpink":"rose intense","steelblue":"bleu acier","tomato":"tomate","lightpink":"rose clair","limegreen":"citron vert","indianred":"rose indien","papayawhip":"crème de papaye","lightslategray":"gris ardoise clair","gray":"gris","mediumorchid":"lilas moyen","cornsilk":"vanille","black":"noir","seagreen":"vert d'eau","darkslateblue":"bleu ardoise foncé","khaki":"kaki","lightblue":"bleu clair","palegreen":"vert pâle","azure":"bleu azur","peachpuff":"pêche","darkolivegreen":"olive foncé","yellowgreen":"vert jaunâtre"})
\ No newline at end of file
diff --git a/js/dojo/dojo/nls/hu/colors.js b/js/dojo/dojo/nls/hu/colors.js
--- a/js/dojo/dojo/nls/hu/colors.js
+++ b/js/dojo/dojo/nls/hu/colors.js
@@ -1,1 +1,1 @@
-({"lightsteelblue": "világos acélkék", "orangered": "narancsvörös", "midnightblue": "éjkék", "cadetblue": "kadétkék", "seashell": "kagyló", "slategrey": "palaszürke", "coral": "korall", "darkturquoise": "sötét türkizkék", "antiquewhite": "antik fehér", "mediumspringgreen": "közepes tavaszzöld", "salmon": "lazacszín", "darkgrey": "sötétszürke", "ivory": "elefántcsont", "greenyellow": "zöldessárga", "mistyrose": "halvány rózsaszín", "lightsalmon": "világos lazacszín", "silver": "ezüst", "dimgrey": "halványszürke", "orange": "narancssárga", "white": "fehér", "navajowhite": "navajo fehér", "royalblue": "királykék", "deeppink": "sötétrózsaszín", "lime": "lime", "oldlace": "régi csipke", "chartreuse": "chartreuse", "darkcyan": "sötét ciánkék", "yellow": "sárga", "linen": "vászonfehér", "olive": "olajzöld", "gold": "arany", "lawngreen": "fűzöld", "lightyellow": "világossárga", "tan": "rozsdabarna", "darkviolet": "sötét ibolyaszín", "lightslategrey": "világos palaszürke", "grey": "szürke", "darkkhaki": "sötét khakiszín", "green": "zöld", "deepskyblue": "sötét égszínkék", "aqua": "vízszín", "sienna": "vörösesbarna", "mintcream": "mentaszósz", "rosybrown": "barnásrózsaszín", "mediumslateblue": "közepes palakék", "magenta": "bíbor", "lightseagreen": "világos tengerzöld", "cyan": "ciánkék", "olivedrab": "olajzöld drapp", "darkgoldenrod": "sötét aranyvessző", "slateblue": "palakék", "mediumaquamarine": "közepes akvamarin", "lavender": "levendula", "mediumseagreen": "közepes tengerzöld", "maroon": "gesztenyebarna", "darkslategray": "sötét palaszürke", "mediumturquoise": "közepes türkizkék", "ghostwhite": "szellemfehér", "darkblue": "sötétkék", "mediumvioletred": "közepes ibolyavörös", "brown": "barna", "lightgray": "világosszürke", "sandybrown": "homokbarna", "pink": "rózsaszín", "firebrick": "téglavörös", "indigo": "indigó", "snow": "hó", "darkorchid": "sötét orchidea", "turquoise": "türkizkék", "chocolate": "csokoládé", "springgreen": "tavaszzöld", "moccasin": "mokkaszín", "navy": "tengerészkék", "lemonchiffon": "sárga műselyem", "teal": "pávakék", "floralwhite": "virágfehér", "cornflowerblue": "búzavirágkék", "paleturquoise": "halvány türkizkék", "purple": "lila", "gainsboro": "gainsboro", "plum": "szilvakék", "red": "vörös", "blue": "kék", "forestgreen": "erdőzöld", "darkgreen": "sötétzöld", "honeydew": "mézharmat", "darkseagreen": "sötét tengerzöld", "lightcoral": "világos korall", "palevioletred": "halvány ibolyavörös", "mediumpurple": "közepes lila", "saddlebrown": "nyeregbarna", "darkmagenta": "sötétbíbor", "thistle": "bogáncs", "whitesmoke": "fehér füst", "wheat": "búza", "violet": "ibolyaszín", "lightskyblue": "világos égszínkék", "goldenrod": "aranyvessző", "mediumblue": "közepes kék", "skyblue": "égszínkék", "crimson": "karmazsinvörös", "darksalmon": "sötét lazacszín", "darkred": "sötétvörös", "darkslategrey": "sötét palaszürke", "peru": "peru", "lightgrey": "világosszürke", "lightgoldenrodyellow": "világos aranyvessző sárga", "blanchedalmond": "hámozott mandula", "aliceblue": "Alice kék", "bisque": "porcelán", "slategray": "palaszürke", "palegoldenrod": "halvány aranyvessző", "darkorange": "sötét narancssárga", "aquamarine": "akvamarin", "lightgreen": "világoszöld", "burlywood": "nyersfa", "dodgerblue": "dodger kék", "darkgray": "sötétszürke", "lightcyan": "világos ciánkék", "powderblue": "púderkék", "blueviolet": "ibolyakék", "orchid": "orchidea", "dimgray": "halványszürke", "beige": "bézs", "fuchsia": "fukszia", "lavenderblush": "pirosas levendula", "hotpink": "meleg rózsaszín", "steelblue": "acélkék", "tomato": "paradicsom", "lightpink": "világos rózsaszín", "limegreen": "limezöld", "indianred": "indiánvörös", "papayawhip": "papayahab", "lightslategray": "világos palaszürke", "gray": "szürke", "mediumorchid": "közepes orchidea", "cornsilk": "kukoricahaj", "black": "fekete", "seagreen": "tengerzöld", "darkslateblue": "sötét palakék", "khaki": "khakiszín", "lightblue": "világoskék", "palegreen": "halványzöld", "azure": "azúrkék", "peachpuff": "barackszín", "darkolivegreen": "sötét olajzöld", "yellowgreen": "sárgászöld"})
\ No newline at end of file
+({"lightsteelblue":"világos acélkék","orangered":"narancsvörös","midnightblue":"éjkék","cadetblue":"kadétkék","seashell":"kagyló","slategrey":"palaszürke","coral":"korall","darkturquoise":"sötét türkizkék","antiquewhite":"antik fehér","mediumspringgreen":"közepes tavaszzöld","salmon":"lazacszín","darkgrey":"sötétszürke","ivory":"elefántcsont","greenyellow":"zöldessárga","mistyrose":"halvány rózsaszín","lightsalmon":"világos lazacszín","silver":"ezüst","dimgrey":"halványszürke","orange":"narancssárga","white":"fehér","navajowhite":"navajo fehér","royalblue":"királykék","deeppink":"sötétrózsaszín","lime":"lime","oldlace":"régi csipke","chartreuse":"chartreuse","darkcyan":"sötét ciánkék","yellow":"sárga","linen":"vászonfehér","olive":"olajzöld","gold":"arany","lawngreen":"fűzöld","lightyellow":"világossárga","tan":"rozsdabarna","darkviolet":"sötét ibolyaszín","lightslategrey":"világos palaszürke","grey":"szürke","darkkhaki":"sötét khakiszín","green":"zöld","deepskyblue":"sötét égszínkék","aqua":"vízszín","sienna":"vörösesbarna","mintcream":"mentaszósz","rosybrown":"barnásrózsaszín","mediumslateblue":"közepes palakék","magenta":"bíbor","lightseagreen":"világos tengerzöld","cyan":"ciánkék","olivedrab":"olajzöld drapp","darkgoldenrod":"sötét aranyvessző","slateblue":"palakék","mediumaquamarine":"közepes akvamarin","lavender":"levendula","mediumseagreen":"közepes tengerzöld","maroon":"gesztenyebarna","darkslategray":"sötét palaszürke","mediumturquoise":"közepes türkizkék","ghostwhite":"szellemfehér","darkblue":"sötétkék","mediumvioletred":"közepes ibolyavörös","brown":"barna","lightgray":"világosszürke","sandybrown":"homokbarna","pink":"rózsaszín","firebrick":"téglavörös","indigo":"indigó","snow":"hó","darkorchid":"sötét orchidea","turquoise":"türkizkék","chocolate":"csokoládé","springgreen":"tavaszzöld","moccasin":"mokkaszín","navy":"tengerészkék","lemonchiffon":"sárga műselyem","teal":"pávakék","floralwhite":"virágfehér","cornflowerblue":"búzavirágkék","paleturquoise":"halvány türkizkék","purple":"lila","gainsboro":"gainsboro","plum":"szilvakék","red":"vörös","blue":"kék","forestgreen":"erdőzöld","darkgreen":"sötétzöld","honeydew":"mézharmat","darkseagreen":"sötét tengerzöld","lightcoral":"világos korall","palevioletred":"halvány ibolyavörös","mediumpurple":"közepes lila","saddlebrown":"nyeregbarna","darkmagenta":"sötétbíbor","thistle":"bogáncs","whitesmoke":"fehér füst","wheat":"búza","violet":"ibolyaszín","lightskyblue":"világos égszínkék","goldenrod":"aranyvessző","mediumblue":"közepes kék","skyblue":"égszínkék","crimson":"karmazsinvörös","darksalmon":"sötét lazacszín","darkred":"sötétvörös","darkslategrey":"sötét palaszürke","peru":"peru","lightgrey":"világosszürke","lightgoldenrodyellow":"világos aranyvessző sárga","blanchedalmond":"hámozott mandula","aliceblue":"Alice kék","bisque":"porcelán","slategray":"palaszürke","palegoldenrod":"halvány aranyvessző","darkorange":"sötét narancssárga","aquamarine":"akvamarin","lightgreen":"világoszöld","burlywood":"nyersfa","dodgerblue":"dodger kék","darkgray":"sötétszürke","lightcyan":"világos ciánkék","powderblue":"púderkék","blueviolet":"ibolyakék","orchid":"orchidea","dimgray":"halványszürke","beige":"bézs","fuchsia":"fukszia","lavenderblush":"pirosas levendula","hotpink":"meleg rózsaszín","steelblue":"acélkék","tomato":"paradicsom","lightpink":"világos rózsaszín","limegreen":"limezöld","indianred":"indiánvörös","papayawhip":"papayahab","lightslategray":"világos palaszürke","gray":"szürke","mediumorchid":"közepes orchidea","cornsilk":"kukoricahaj","black":"fekete","seagreen":"tengerzöld","darkslateblue":"sötét palakék","khaki":"khakiszín","lightblue":"világoskék","palegreen":"halványzöld","azure":"azúrkék","peachpuff":"barackszín","darkolivegreen":"sötét olajzöld","yellowgreen":"sárgászöld"})
\ No newline at end of file
diff --git a/js/dojo/dojo/nls/it/colors.js b/js/dojo/dojo/nls/it/colors.js
--- a/js/dojo/dojo/nls/it/colors.js
+++ b/js/dojo/dojo/nls/it/colors.js
@@ -1,1 +1,1 @@
-({"lightsteelblue": "blu acciao chiaro", "orangered": "vermiglio", "midnightblue": "blu melanzana scuro", "cadetblue": "verde acqua", "seashell": "sabbia rosa", "slategrey": "grigio ardesia", "coral": "corallo", "darkturquoise": "turchese scuro", "antiquewhite": "bianco antico", "mediumspringgreen": "verde primavera medio", "salmon": "salmone", "darkgrey": "grigio scuro", "ivory": "avorio", "greenyellow": "giallo verde", "mistyrose": "rosa pallido", "lightsalmon": "salmone chiaro", "silver": "grigio 25%", "dimgrey": "grigio 80%", "orange": "arancione", "white": "bianco", "navajowhite": "pesca chiaro", "royalblue": "blu reale", "deeppink": "ciclamino", "lime": "verde fluorescente", "oldlace": "mandorla", "chartreuse": "verde brillante", "darkcyan": "ciano scuro", "yellow": "giallo", "linen": "lino", "olive": "verde oliva", "gold": "oro", "lawngreen": "verde prato", "lightyellow": "giallo chiaro", "tan": "grigio bruno", "darkviolet": "viola scuro", "lightslategrey": "grigio ardesia chiaro", "grey": "grigio", "darkkhaki": "kaki scuro", "green": "verde", "deepskyblue": "azzurro cielo scuro", "aqua": "acqua", "sienna": "cuoio", "mintcream": "bianco nuvola", "rosybrown": "marrone rosato", "mediumslateblue": "blu ardesia medio", "magenta": "magenta", "lightseagreen": "verde mare chiaro", "cyan": "ciano", "olivedrab": "marrone oliva", "darkgoldenrod": "ocra scuro", "slateblue": "blu ardesia", "mediumaquamarine": "acquamarina medio", "lavender": "lavanda", "mediumseagreen": "verde mare medio", "maroon": "scarlatto", "darkslategray": "grigio ardesia scuro", "mediumturquoise": "turchese medio", "ghostwhite": "bianco gesso", "darkblue": "blu scuro", "mediumvioletred": "vinaccia", "brown": "marrone", "lightgray": "grigio chiaro", "sandybrown": "marrone sabbia", "pink": "rosa", "firebrick": "rosso mattone", "indigo": "indaco", "snow": "neve", "darkorchid": "orchidea scuro", "turquoise": "turchese", "chocolate": "cioccolato", "springgreen": "verde primavera", "moccasin": "mocassino", "navy": "blu notte", "lemonchiffon": "caffelatte chiaro", "teal": "verde turchese", "floralwhite": "bianco giglio", "cornflowerblue": "blu fiordaliso", "paleturquoise": "turchese pallido", "purple": "porpora", "gainsboro": "grigio 10%", "plum": "prugna", "red": "rosso", "blue": "blu", "forestgreen": "verde foresta", "darkgreen": "verde scuro", "honeydew": "bianco germoglio", "darkseagreen": "verde mare scuro", "lightcoral": "rosa corallo", "palevioletred": "vinaccia chiaro", "mediumpurple": "porpora medio", "saddlebrown": "cacao", "darkmagenta": "magenta scuro", "thistle": "rosa cenere", "whitesmoke": "bianco fumo", "wheat": "sabbia", "violet": "viola", "lightskyblue": "azzurro cielo chiaro", "goldenrod": "ocra gialla", "mediumblue": "blu medio", "skyblue": "azzurro cielo", "crimson": "cremisi", "darksalmon": "salmone scuro", "darkred": "rosso scuro", "darkslategrey": "grigio ardesia scuro", "peru": "marrone terra bruciata", "lightgrey": "grigio chiaro", "lightgoldenrodyellow": "giallo tenue", "blanchedalmond": "mandorla chiaro", "aliceblue": "blu alice", "bisque": "incarnato", "slategray": "grigio ardesia", "palegoldenrod": "giallo zolfo chiaro", "darkorange": "arancione scuro", "aquamarine": "acquamarina", "lightgreen": "verde chiaro", "burlywood": "tabacco", "dodgerblue": "blu d'oriente", "darkgray": "grigio scuro", "lightcyan": "ciano chiaro", "powderblue": "azzurro polvere", "blueviolet": "blu violetto", "orchid": "orchidea", "dimgray": "grigio 80%", "beige": "beige", "fuchsia": "fucsia", "lavenderblush": "bianco rosato", "hotpink": "rosa acceso", "steelblue": "blu acciao", "tomato": "pomodoro", "lightpink": "rosa chiaro", "limegreen": "verde lime", "indianred": "terra indiana", "papayawhip": "cipria", "lightslategray": "grigio ardesia chiaro", "gray": "grigio", "mediumorchid": "orchidea medio", "cornsilk": "crema", "black": "nero", "seagreen": "verde mare", "darkslateblue": "blu ardesia scuro", "khaki": "kaki", "lightblue": "azzurro", "palegreen": "verde pallido", "azure": "azzurro ghiaccio", "peachpuff": "pesca", "darkolivegreen": "verde oliva scuro", "yellowgreen": "giallo verde"})
\ No newline at end of file
+({"lightsteelblue":"blu acciao chiaro","orangered":"vermiglio","midnightblue":"blu melanzana scuro","cadetblue":"verde acqua","seashell":"sabbia rosa","slategrey":"grigio ardesia","coral":"corallo","darkturquoise":"turchese scuro","antiquewhite":"bianco antico","mediumspringgreen":"verde primavera medio","salmon":"salmone","darkgrey":"grigio scuro","ivory":"avorio","greenyellow":"giallo verde","mistyrose":"rosa pallido","lightsalmon":"salmone chiaro","silver":"grigio 25%","dimgrey":"grigio 80%","orange":"arancione","white":"bianco","navajowhite":"pesca chiaro","royalblue":"blu reale","deeppink":"ciclamino","lime":"verde fluorescente","oldlace":"mandorla","chartreuse":"verde brillante","darkcyan":"ciano scuro","yellow":"giallo","linen":"lino","olive":"verde oliva","gold":"oro","lawngreen":"verde prato","lightyellow":"giallo chiaro","tan":"grigio bruno","darkviolet":"viola scuro","lightslategrey":"grigio ardesia chiaro","grey":"grigio","darkkhaki":"kaki scuro","green":"verde","deepskyblue":"azzurro cielo scuro","aqua":"acqua","sienna":"cuoio","mintcream":"bianco nuvola","rosybrown":"marrone rosato","mediumslateblue":"blu ardesia medio","magenta":"magenta","lightseagreen":"verde mare chiaro","cyan":"ciano","olivedrab":"marrone oliva","darkgoldenrod":"ocra scuro","slateblue":"blu ardesia","mediumaquamarine":"acquamarina medio","lavender":"lavanda","mediumseagreen":"verde mare medio","maroon":"scarlatto","darkslategray":"grigio ardesia scuro","mediumturquoise":"turchese medio","ghostwhite":"bianco gesso","darkblue":"blu scuro","mediumvioletred":"vinaccia","brown":"marrone","lightgray":"grigio chiaro","sandybrown":"marrone sabbia","pink":"rosa","firebrick":"rosso mattone","indigo":"indaco","snow":"neve","darkorchid":"orchidea scuro","turquoise":"turchese","chocolate":"cioccolato","springgreen":"verde primavera","moccasin":"mocassino","navy":"blu notte","lemonchiffon":"caffelatte chiaro","teal":"verde turchese","floralwhite":"bianco giglio","cornflowerblue":"blu fiordaliso","paleturquoise":"turchese pallido","purple":"porpora","gainsboro":"grigio 10%","plum":"prugna","red":"rosso","blue":"blu","forestgreen":"verde foresta","darkgreen":"verde scuro","honeydew":"bianco germoglio","darkseagreen":"verde mare scuro","lightcoral":"rosa corallo","palevioletred":"vinaccia chiaro","mediumpurple":"porpora medio","saddlebrown":"cacao","darkmagenta":"magenta scuro","thistle":"rosa cenere","whitesmoke":"bianco fumo","wheat":"sabbia","violet":"viola","lightskyblue":"azzurro cielo chiaro","goldenrod":"ocra gialla","mediumblue":"blu medio","skyblue":"azzurro cielo","crimson":"cremisi","darksalmon":"salmone scuro","darkred":"rosso scuro","darkslategrey":"grigio ardesia scuro","peru":"marrone terra bruciata","lightgrey":"grigio chiaro","lightgoldenrodyellow":"giallo tenue","blanchedalmond":"mandorla chiaro","aliceblue":"blu alice","bisque":"incarnato","slategray":"grigio ardesia","palegoldenrod":"giallo zolfo chiaro","darkorange":"arancione scuro","aquamarine":"acquamarina","lightgreen":"verde chiaro","burlywood":"tabacco","dodgerblue":"blu d'oriente","darkgray":"grigio scuro","lightcyan":"ciano chiaro","powderblue":"azzurro polvere","blueviolet":"blu violetto","orchid":"orchidea","dimgray":"grigio 80%","beige":"beige","fuchsia":"fucsia","lavenderblush":"bianco rosato","hotpink":"rosa acceso","steelblue":"blu acciao","tomato":"pomodoro","lightpink":"rosa chiaro","limegreen":"verde lime","indianred":"terra indiana","papayawhip":"cipria","lightslategray":"grigio ardesia chiaro","gray":"grigio","mediumorchid":"orchidea medio","cornsilk":"crema","black":"nero","seagreen":"verde mare","darkslateblue":"blu ardesia scuro","khaki":"kaki","lightblue":"azzurro","palegreen":"verde pallido","azure":"azzurro ghiaccio","peachpuff":"pesca","darkolivegreen":"verde oliva scuro","yellowgreen":"giallo verde"})
\ No newline at end of file
diff --git a/js/dojo/dojo/nls/ja/colors.js b/js/dojo/dojo/nls/ja/colors.js
--- a/js/dojo/dojo/nls/ja/colors.js
+++ b/js/dojo/dojo/nls/ja/colors.js
@@ -1,1 +1,1 @@
-({"lightsteelblue": "ライト・スチール・ブルー", "orangered": "オレンジ・レッド", "midnightblue": "ミッドナイト・ブルー", "cadetblue": "くすんだ青", "seashell": "シーシェル", "slategrey": "スレート・グレイ", "coral": "珊瑚", "darkturquoise": "ダーク・ターコイズ", "antiquewhite": "アンティーク・ホワイト", "mediumspringgreen": "ミディアム・スプリング・グリーン", "salmon": "サーモン", "darkgrey": "ダーク・グレイ", "ivory": "アイボリー", "greenyellow": "緑黄色", "mistyrose": "ミスティ・ローズ", "lightsalmon": "ライト・サーモン", "silver": "銀", "dimgrey": "くすんだグレイ", "orange": "オレンジ", "white": "白", "navajowhite": "ナバホ・ホワイト", "royalblue": "藤色", "deeppink": "濃いピンク", "lime": "ライム", "oldlace": "オールド・レイス", "chartreuse": "淡黄緑", "darkcyan": "ダーク・シアン・ブルー", "yellow": "黄", "linen": "亜麻色", "olive": "オリーブ", "gold": "金", "lawngreen": "ローン・グリーン", "lightyellow": "ライト・イエロー", "tan": "茶褐色", "darkviolet": "ダーク・バイオレット", "lightslategrey": "ライト・スレート・グレイ", "grey": "グレイ", "darkkhaki": "ダーク・カーキー", "green": "緑", "deepskyblue": "濃い空色", "aqua": "アクア", "sienna": "黄褐色", "mintcream": "ミント・クリーム", "rosybrown": "ロージー・ブラウン", "mediumslateblue": "ミディアム・スレート・ブルー", "magenta": "赤紫", "lightseagreen": "ライト・シー・グリーン", "cyan": "シアン・ブルー", "olivedrab": "濃黄緑", "darkgoldenrod": "ダーク・ゴールデン・ロッド", "slateblue": "スレート・ブルー", "mediumaquamarine": "ミディアム・アクアマリーン", "lavender": "ラベンダー", "mediumseagreen": "ミディアム・シー・グリーン", "maroon": "えび茶", "darkslategray": "ダーク・スレート・グレイ", "mediumturquoise": "ミディアム・ターコイズ", "ghostwhite": "ゴースト・ホワイト", "darkblue": "ダーク・ブルー", "mediumvioletred": "ミディアム・バイオレット・レッド", "brown": "茶", "lightgray": "ライト・グレイ", "sandybrown": "砂褐色", "pink": "ピンク", "firebrick": "赤煉瓦色", "indigo": "藍色", "snow": "雪色", "darkorchid": "ダーク・オーキッド", "turquoise": "ターコイズ", "chocolate": "チョコレート", "springgreen": "スプリング・グリーン", "moccasin": "モカシン", "navy": "濃紺", "lemonchiffon": "レモン・シフォン", "teal": "ティール", "floralwhite": "フローラル・ホワイト", "cornflowerblue": "コーンフラワー・ブルー", "paleturquoise": "ペイル・ターコイズ", "purple": "紫", "gainsboro": "ゲインズボーロ", "plum": "深紫", "red": "赤", "blue": "青", "forestgreen": "フォレスト・グリーン", "darkgreen": "ダーク・グリーン", "honeydew": "ハニーデュー", "darkseagreen": "ダーク・シー・グリーン", "lightcoral": "ライト・コーラル", "palevioletred": "ペイル・バイオレット・レッド", "mediumpurple": "ミディアム・パープル", "saddlebrown": "サドル・ブラウン", "darkmagenta": "ダーク・マジェンタ", "thistle": "シスル", "whitesmoke": "ホワイト・スモーク", "wheat": "小麦色", "violet": "すみれ色", "lightskyblue": "ライト・スカイ・ブルー", "goldenrod": "ゴールデン・ロッド", "mediumblue": "ミディアム・ブルー", "skyblue": "スカイ・ブルー", "crimson": "深紅", "darksalmon": "ダーク・サーモン", "darkred": "ダーク・レッド", "darkslategrey": "ダーク・スレート・グレイ", "peru": "ペルー", "lightgrey": "ライト・グレイ", "lightgoldenrodyellow": "ライト・ゴールデン・ロッド・イエロー", "blanchedalmond": "皮なしアーモンド", "aliceblue": "アリス・ブルー", "bisque": "ビスク", "slategray": "スレート・グレイ", "palegoldenrod": "ペイル・ゴールデン・ロッド", "darkorange": "ダーク・オレンジ", "aquamarine": "碧緑", "lightgreen": "ライト・グリーン", "burlywood": "バーリーウッド", "dodgerblue": "ドッジャー・ブルー", "darkgray": "ダーク・グレイ", "lightcyan": "ライト・シアン", "powderblue": "淡青", "blueviolet": "青紫", "orchid": "薄紫", "dimgray": "くすんだグレイ", "beige": "ベージュ", "fuchsia": "紫紅色", "lavenderblush": "ラベンダー・ブラッシ", "hotpink": "ホット・ピンク", "steelblue": "鋼色", "tomato": "トマト色", "lightpink": "ライト・ピンク", "limegreen": "ライム・グリーン", "indianred": "インディアン・レッド", "papayawhip": "パパイア・ホイップ", "lightslategray": "ライト・スレート・グレイ", "gray": "グレイ", "mediumorchid": "ミディアム・オーキッド", "cornsilk": "コーンシルク", "black": "黒", "seagreen": "シー・グリーン", "darkslateblue": "ダーク・スレート・ブルー", "khaki": "カーキー", "lightblue": "ライト・ブルー", "palegreen": "ペイル・グリーン", "azure": "薄い空色", "peachpuff": "ピーチ・パフ", "darkolivegreen": "ダーク・オリーブ・グリーン", "yellowgreen": "黄緑"})
\ No newline at end of file
+({"lightsteelblue":"ライト・スチール・ブルー","orangered":"オレンジ・レッド","midnightblue":"ミッドナイト・ブルー","cadetblue":"くすんだ青","seashell":"シーシェル","slategrey":"スレート・グレイ","coral":"珊瑚","darkturquoise":"ダーク・ターコイズ","antiquewhite":"アンティーク・ホワイト","mediumspringgreen":"ミディアム・スプリング・グリーン","salmon":"サーモン","darkgrey":"ダーク・グレイ","ivory":"アイボリー","greenyellow":"緑黄色","mistyrose":"ミスティ・ローズ","lightsalmon":"ライト・サーモン","silver":"銀","dimgrey":"くすんだグレイ","orange":"オレンジ","white":"白","navajowhite":"ナバホ・ホワイト","royalblue":"藤色","deeppink":"濃いピンク","lime":"ライム","oldlace":"オールド・レイス","chartreuse":"淡黄緑","darkcyan":"ダーク・シアン・ブルー","yellow":"黄","linen":"亜麻色","olive":"オリーブ","gold":"金","lawngreen":"ローン・グリーン","lightyellow":"ライト・イエロー","tan":"茶褐色","darkviolet":"ダーク・バイオレット","lightslategrey":"ライト・スレート・グレイ","grey":"グレイ","darkkhaki":"ダーク・カーキー","green":"緑","deepskyblue":"濃い空色","aqua":"アクア","sienna":"黄褐色","mintcream":"ミント・クリーム","rosybrown":"ロージー・ブラウン","mediumslateblue":"ミディアム・スレート・ブルー","magenta":"赤紫","lightseagreen":"ライト・シー・グリーン","cyan":"シアン・ブルー","olivedrab":"濃黄緑","darkgoldenrod":"ダーク・ゴールデン・ロッド","slateblue":"スレート・ブルー","mediumaquamarine":"ミディアム・アクアマリーン","lavender":"ラベンダー","mediumseagreen":"ミディアム・シー・グリーン","maroon":"えび茶","darkslategray":"ダーク・スレート・グレイ","mediumturquoise":"ミディアム・ターコイズ","ghostwhite":"ゴースト・ホワイト","darkblue":"ダーク・ブルー","mediumvioletred":"ミディアム・バイオレット・レッド","brown":"茶","lightgray":"ライト・グレイ","sandybrown":"砂褐色","pink":"ピンク","firebrick":"赤煉瓦色","indigo":"藍色","snow":"雪色","darkorchid":"ダーク・オーキッド","turquoise":"ターコイズ","chocolate":"チョコレート","springgreen":"スプリング・グリーン","moccasin":"モカシン","navy":"濃紺","lemonchiffon":"レモン・シフォン","teal":"ティール","floralwhite":"フローラル・ホワイト","cornflowerblue":"コーンフラワー・ブルー","paleturquoise":"ペイル・ターコイズ","purple":"紫","gainsboro":"ゲインズボーロ","plum":"深紫","red":"赤","blue":"青","forestgreen":"フォレスト・グリーン","darkgreen":"ダーク・グリーン","honeydew":"ハニーデュー","darkseagreen":"ダーク・シー・グリーン","lightcoral":"ライト・コーラル","palevioletred":"ペイル・バイオレット・レッド","mediumpurple":"ミディアム・パープル","saddlebrown":"サドル・ブラウン","darkmagenta":"ダーク・マジェンタ","thistle":"シスル","whitesmoke":"ホワイト・スモーク","wheat":"小麦色","violet":"すみれ色","lightskyblue":"ライト・スカイ・ブルー","goldenrod":"ゴールデン・ロッド","mediumblue":"ミディアム・ブルー","skyblue":"スカイ・ブルー","crimson":"深紅","darksalmon":"ダーク・サーモン","darkred":"ダーク・レッド","darkslategrey":"ダーク・スレート・グレイ","peru":"ペルー","lightgrey":"ライト・グレイ","lightgoldenrodyellow":"ライト・ゴールデン・ロッド・イエロー","blanchedalmond":"皮なしアーモンド","aliceblue":"アリス・ブルー","bisque":"ビスク","slategray":"スレート・グレイ","palegoldenrod":"ペイル・ゴールデン・ロッド","darkorange":"ダーク・オレンジ","aquamarine":"碧緑","lightgreen":"ライト・グリーン","burlywood":"バーリーウッド","dodgerblue":"ドッジャー・ブルー","darkgray":"ダーク・グレイ","lightcyan":"ライト・シアン","powderblue":"淡青","blueviolet":"青紫","orchid":"薄紫","dimgray":"くすんだグレイ","beige":"ベージュ","fuchsia":"紫紅色","lavenderblush":"ラベンダー・ブラッシ","hotpink":"ホット・ピンク","steelblue":"鋼色","tomato":"トマト色","lightpink":"ライト・ピンク","limegreen":"ライム・グリーン","indianred":"インディアン・レッド","papayawhip":"パパイア・ホイップ","lightslategray":"ライト・スレート・グレイ","gray":"グレイ","mediumorchid":"ミディアム・オーキッド","cornsilk":"コーンシルク","black":"黒","seagreen":"シー・グリーン","darkslateblue":"ダーク・スレート・ブルー","khaki":"カーキー","lightblue":"ライト・ブルー","palegreen":"ペイル・グリーン","azure":"薄い空色","peachpuff":"ピーチ・パフ","darkolivegreen":"ダーク・オリーブ・グリーン","yellowgreen":"黄緑"})
\ No newline at end of file
diff --git a/js/dojo/dojo/nls/ko/colors.js b/js/dojo/dojo/nls/ko/colors.js
--- a/js/dojo/dojo/nls/ko/colors.js
+++ b/js/dojo/dojo/nls/ko/colors.js
@@ -1,1 +1,1 @@
-({"lightsteelblue": "라이트 스틸 블루(light steel blue)", "orangered": "오렌지 레드(orange red)", "midnightblue": "미드나잇 블루(midnight blue)", "cadetblue": "카뎃 블루(cadet blue)", "seashell": "씨쉘(seashell)", "slategrey": "슬레이트 그레이(slate gray)", "coral": "코랄(coral)", "darkturquoise": "다크 터콰즈(dark turquoise)", "antiquewhite": "앤틱 화이트(antique white)", "mediumspringgreen": "미디엄 스프링 그린(medium spring green)", "salmon": "샐몬(salmon)", "darkgrey": "다크 그레이(dark gray)", "ivory": "아이보리(ivory)", "greenyellow": "그린 옐로우(green-yellow)", "mistyrose": "미스티 로즈(misty rose)", "lightsalmon": "라이트 샐몬(light salmon)", "silver": "실버(silver)", "dimgrey": "딤 그레이(dim gray)", "orange": "오렌지(orange)", "white": "화이트(white)", "navajowhite": "나바호 화이트(navajo white)", "royalblue": "로얄 블루(royal blue)", "deeppink": "딥 핑크(deep pink)", "lime": "라임(lime)", "oldlace": "올드 레이스(old lace)", "chartreuse": "샤르트뢰즈(chartreuse)", "darkcyan": "다크 시안(dark cyan)", "yellow": "옐로우(yellow)", "linen": "리넨(linen)", "olive": "올리브(olive)", "gold": "골드(gold)", "lawngreen": "론 그린(lawn green)", "lightyellow": "라이트 옐로우(light yellow)", "tan": "탠(tan)", "darkviolet": "다크 바이올렛(dark violet)", "lightslategrey": "라이트 슬레이트 그레이(light slate gray)", "grey": "그레이(gray)", "darkkhaki": "다크 카키(dark khaki)", "green": "그린(green)", "deepskyblue": "딥 스카이 블루(deep sky blue)", "aqua": "아쿠아(aqua)", "sienna": "시에나(sienna)", "mintcream": "민트 크림(mint cream)", "rosybrown": "로지 브라운(rosy brown)", "mediumslateblue": "미디엄 슬레이트 블루(medium slate blue)", "magenta": "마젠타(magenta)", "lightseagreen": "라이트 씨 그린(light sea green)", "cyan": "시안(cyan)", "olivedrab": "올리브 드랩(olive drab)", "darkgoldenrod": "다크 골든로드(dark goldenrod)", "slateblue": "슬레이트 블루(slate blue)", "mediumaquamarine": "미디엄 아쿠아마린(medium aquamarine)", "lavender": "라벤더(lavender)", "mediumseagreen": "미디엄 씨 그린(medium sea green)", "maroon": "마룬(maroon)", "darkslategray": "다크 슬레이트 그레이(dark slate gray)", "mediumturquoise": "미디엄 터콰즈(medium turquoise)", "ghostwhite": "고스트 화이트(ghost white)", "darkblue": "다크 블루(dark blue)", "mediumvioletred": "미디엄 바이올렛 레드(medium violet-red)", "brown": "브라운(brown)", "lightgray": "라이트 그레이(light gray)", "sandybrown": "샌디 브라운(sandy brown)", "pink": "핑크(pink)", "firebrick": "파이어 브릭(fire brick)", "indigo": "인디고(indigo)", "snow": "스노우(snow)", "darkorchid": "다크 오키드(dark orchid)", "turquoise": "터콰즈(turquoise)", "chocolate": "초콜렛(chocolate)", "springgreen": "스프링 그린(spring green)", "moccasin": "모카신(moccasin)", "navy": "네이비(navy)", "lemonchiffon": "레몬 쉬폰(lemon chiffon)", "teal": "틸(teal)", "floralwhite": "플로랄 화이트(floral white)", "cornflowerblue": "콘플라워 블루(cornflower blue)", "paleturquoise": "페일 터콰즈(pale turquoise)", "purple": "퍼플(purple)", "gainsboro": "게인스브로(gainsboro)", "plum": "플럼(plum)", "red": "레드(red)", "blue": "블루(blue)", "forestgreen": "포레스트 그린(forest green)", "darkgreen": "다크 그린(dark green)", "honeydew": "허니듀(honeydew)", "darkseagreen": "다크 씨 그린(dark sea green)", "lightcoral": "라이트 코랄(light coral)", "palevioletred": "페일 바이올렛 레드(pale violet-red)", "mediumpurple": "미디엄 퍼플(medium purple)", "saddlebrown": "새들 브라운(saddle brown)", "darkmagenta": "다크 마젠타(dark magenta)", "thistle": "시슬(thistle)", "whitesmoke": "화이트 스모크(white smoke)", "wheat": "휘트(wheat)", "violet": "바이올렛(violet)", "lightskyblue": "라이트 스카이 블루(light sky blue)", "goldenrod": "골든로드(goldenrod)", "mediumblue": "미디엄 블루(medium blue)", "skyblue": "스카이 블루(sky blue)", "crimson": "크림슨(crimson)", "darksalmon": "다크 샐몬(dark salmon)", "darkred": "다크 레드(dark red)", "darkslategrey": "다크 슬레이트 그레이(dark slate gray)", "peru": "페루(peru)", "lightgrey": "라이트 그레이(light gray)", "lightgoldenrodyellow": "라이트 골든로드 옐로우(light goldenrod yellow)", "blanchedalmond": "블랜치 아몬드(blanched almond)", "aliceblue": "앨리스 블루(alice blue)", "bisque": "비스크(bisque)", "slategray": "슬레이트 그레이(slate gray)", "palegoldenrod": "페일 골든로드(pale goldenrod)", "darkorange": "다크 오렌지(dark orange)", "aquamarine": "아쿠아마린(aquamarine)", "lightgreen": "라이트 그린(light green)", "burlywood": "벌리우드(burlywood)", "dodgerblue": "다저 블루(dodger blue)", "darkgray": "다크 그레이(dark gray)", "lightcyan": "라이트 시안(light cyan)", "powderblue": "파우더 블루(powder blue)", "blueviolet": "블루 바이올렛(blue-violet)", "orchid": "오키드(orchid)", "dimgray": "딤 그레이(dim gray)", "beige": "베이지(beige)", "fuchsia": "후크샤(fuchsia)", "lavenderblush": "라벤더 블러쉬(lavender blush)", "hotpink": "핫 핑크(hot pink)", "steelblue": "스틸 블루(steel blue)", "tomato": "토마토(tomato)", "lightpink": "라이트 핑크(light pink)", "limegreen": "라임 그린(lime green)", "indianred": "인디안 레드(indian red)", "papayawhip": "파파야 휩(papaya whip)", "lightslategray": "라이트 슬레이트 그레이(light slate gray)", "gray": "그레이(gray)", "mediumorchid": "미디엄 오키드(medium orchid)", "cornsilk": "콘실크(cornsilk)", "black": "블랙(black)", "seagreen": "씨 그린(sea green)", "darkslateblue": "다크 슬레이트 블루(dark slate blue)", "khaki": "카키(khaki)", "lightblue": "라이트 블루(light blue)", "palegreen": "페일 그린(pale green)", "azure": "애쥬어(azure)", "peachpuff": "피치 퍼프(peach puff)", "darkolivegreen": "다크 올리브 그린(dark olive green)", "yellowgreen": "옐로우 그린(yellow green)"})
\ No newline at end of file
+({"lightsteelblue":"라이트 스틸 블루(light steel blue)","orangered":"오렌지 레드(orange red)","midnightblue":"미드나잇 블루(midnight blue)","cadetblue":"카뎃 블루(cadet blue)","seashell":"씨쉘(seashell)","slategrey":"슬레이트 그레이(slate gray)","coral":"코랄(coral)","darkturquoise":"다크 터콰즈(dark turquoise)","antiquewhite":"앤틱 화이트(antique white)","mediumspringgreen":"미디엄 스프링 그린(medium spring green)","salmon":"샐몬(salmon)","darkgrey":"다크 그레이(dark gray)","ivory":"아이보리(ivory)","greenyellow":"그린 옐로우(green-yellow)","mistyrose":"미스티 로즈(misty rose)","lightsalmon":"라이트 샐몬(light salmon)","silver":"실버(silver)","dimgrey":"딤 그레이(dim gray)","orange":"오렌지(orange)","white":"화이트(white)","navajowhite":"나바호 화이트(navajo white)","royalblue":"로얄 블루(royal blue)","deeppink":"딥 핑크(deep pink)","lime":"라임(lime)","oldlace":"올드 레이스(old lace)","chartreuse":"샤르트뢰즈(chartreuse)","darkcyan":"다크 시안(dark cyan)","yellow":"옐로우(yellow)","linen":"리넨(linen)","olive":"올리브(olive)","gold":"골드(gold)","lawngreen":"론 그린(lawn green)","lightyellow":"라이트 옐로우(light yellow)","tan":"탠(tan)","darkviolet":"다크 바이올렛(dark violet)","lightslategrey":"라이트 슬레이트 그레이(light slate gray)","grey":"그레이(gray)","darkkhaki":"다크 카키(dark khaki)","green":"그린(green)","deepskyblue":"딥 스카이 블루(deep sky blue)","aqua":"아쿠아(aqua)","sienna":"시에나(sienna)","mintcream":"민트 크림(mint cream)","rosybrown":"로지 브라운(rosy brown)","mediumslateblue":"미디엄 슬레이트 블루(medium slate blue)","magenta":"마젠타(magenta)","lightseagreen":"라이트 씨 그린(light sea green)","cyan":"시안(cyan)","olivedrab":"올리브 드랩(olive drab)","darkgoldenrod":"다크 골든로드(dark goldenrod)","slateblue":"슬레이트 블루(slate blue)","mediumaquamarine":"미디엄 아쿠아마린(medium aquamarine)","lavender":"라벤더(lavender)","mediumseagreen":"미디엄 씨 그린(medium sea green)","maroon":"마룬(maroon)","darkslategray":"다크 슬레이트 그레이(dark slate gray)","mediumturquoise":"미디엄 터콰즈(medium turquoise)","ghostwhite":"고스트 화이트(ghost white)","darkblue":"다크 블루(dark blue)","mediumvioletred":"미디엄 바이올렛 레드(medium violet-red)","brown":"브라운(brown)","lightgray":"라이트 그레이(light gray)","sandybrown":"샌디 브라운(sandy brown)","pink":"핑크(pink)","firebrick":"파이어 브릭(fire brick)","indigo":"인디고(indigo)","snow":"스노우(snow)","darkorchid":"다크 오키드(dark orchid)","turquoise":"터콰즈(turquoise)","chocolate":"초콜렛(chocolate)","springgreen":"스프링 그린(spring green)","moccasin":"모카신(moccasin)","navy":"네이비(navy)","lemonchiffon":"레몬 쉬폰(lemon chiffon)","teal":"틸(teal)","floralwhite":"플로랄 화이트(floral white)","cornflowerblue":"콘플라워 블루(cornflower blue)","paleturquoise":"페일 터콰즈(pale turquoise)","purple":"퍼플(purple)","gainsboro":"게인스브로(gainsboro)","plum":"플럼(plum)","red":"레드(red)","blue":"블루(blue)","forestgreen":"포레스트 그린(forest green)","darkgreen":"다크 그린(dark green)","honeydew":"허니듀(honeydew)","darkseagreen":"다크 씨 그린(dark sea green)","lightcoral":"라이트 코랄(light coral)","palevioletred":"페일 바이올렛 레드(pale violet-red)","mediumpurple":"미디엄 퍼플(medium purple)","saddlebrown":"새들 브라운(saddle brown)","darkmagenta":"다크 마젠타(dark magenta)","thistle":"시슬(thistle)","whitesmoke":"화이트 스모크(white smoke)","wheat":"휘트(wheat)","violet":"바이올렛(violet)","lightskyblue":"라이트 스카이 블루(light sky blue)","goldenrod":"골든로드(goldenrod)","mediumblue":"미디엄 블루(medium blue)","skyblue":"스카이 블루(sky blue)","crimson":"크림슨(crimson)","darksalmon":"다크 샐몬(dark salmon)","darkred":"다크 레드(dark red)","darkslategrey":"다크 슬레이트 그레이(dark slate gray)","peru":"페루(peru)","lightgrey":"라이트 그레이(light gray)","lightgoldenrodyellow":"라이트 골든로드 옐로우(light goldenrod yellow)","blanchedalmond":"블랜치 아몬드(blanched almond)","aliceblue":"앨리스 블루(alice blue)","bisque":"비스크(bisque)","slategray":"슬레이트 그레이(slate gray)","palegoldenrod":"페일 골든로드(pale goldenrod)","darkorange":"다크 오렌지(dark orange)","aquamarine":"아쿠아마린(aquamarine)","lightgreen":"라이트 그린(light green)","burlywood":"벌리우드(burlywood)","dodgerblue":"다저 블루(dodger blue)","darkgray":"다크 그레이(dark gray)","lightcyan":"라이트 시안(light cyan)","powderblue":"파우더 블루(powder blue)","blueviolet":"블루 바이올렛(blue-violet)","orchid":"오키드(orchid)","dimgray":"딤 그레이(dim gray)","beige":"베이지(beige)","fuchsia":"후크샤(fuchsia)","lavenderblush":"라벤더 블러쉬(lavender blush)","hotpink":"핫 핑크(hot pink)","steelblue":"스틸 블루(steel blue)","tomato":"토마토(tomato)","lightpink":"라이트 핑크(light pink)","limegreen":"라임 그린(lime green)","indianred":"인디안 레드(indian red)","papayawhip":"파파야 휩(papaya whip)","lightslategray":"라이트 슬레이트 그레이(light slate gray)","gray":"그레이(gray)","mediumorchid":"미디엄 오키드(medium orchid)","cornsilk":"콘실크(cornsilk)","black":"블랙(black)","seagreen":"씨 그린(sea green)","darkslateblue":"다크 슬레이트 블루(dark slate blue)","khaki":"카키(khaki)","lightblue":"라이트 블루(light blue)","palegreen":"페일 그린(pale green)","azure":"애쥬어(azure)","peachpuff":"피치 퍼프(peach puff)","darkolivegreen":"다크 올리브 그린(dark olive green)","yellowgreen":"옐로우 그린(yellow green)"})
\ No newline at end of file
diff --git a/js/dojo/dojo/nls/pl/colors.js b/js/dojo/dojo/nls/pl/colors.js
--- a/js/dojo/dojo/nls/pl/colors.js
+++ b/js/dojo/dojo/nls/pl/colors.js
@@ -1,1 +1,1 @@
-({"lightsteelblue": "jasny stalowoniebieski", "orangered": "pomarańczowoczerwony", "midnightblue": "ciemnogranatowy", "cadetblue": "niebieskoszary", "seashell": "muszla", "slategrey": "łupkowy szary", "coral": "koralowy", "darkturquoise": "ciemnoturkusowy", "antiquewhite": "biel antyczna", "mediumspringgreen": "średnia wiosenna zieleń", "salmon": "łososiowy", "darkgrey": "ciemnoszary", "ivory": "kość słoniowa", "greenyellow": "zielonożółty", "mistyrose": "bladoróżany", "lightsalmon": "jasnołososiowy", "silver": "srebrny", "dimgrey": "przytłumiony szary", "orange": "pomarańczowy", "white": "biały", "navajowhite": "piaskowy", "royalblue": "błękit królewski", "deeppink": "głęboki różowy", "lime": "limetkowy", "oldlace": "bladopomarańczowy", "chartreuse": "jaskrawozielony", "darkcyan": "ciemny cyjan", "yellow": "żółty", "linen": "lniany", "olive": "oliwkowy", "gold": "złoty", "lawngreen": "trawiasty", "lightyellow": "jasnożółty", "tan": "kawowy", "darkviolet": "ciemnofioletowy", "lightslategrey": "jasny łupkowy szary", "grey": "szary", "darkkhaki": "ciemny khaki", "green": "zielony", "deepskyblue": "intensywny błękit nieba", "aqua": "wodny", "sienna": "siena", "mintcream": "jasnomiętowy", "rosybrown": "różowobrązowy", "mediumslateblue": "średni łupkowy niebieski", "magenta": "magenta", "lightseagreen": "jasna morska zieleń", "cyan": "cyjan", "olivedrab": "oliwkowa zieleń", "darkgoldenrod": "ciemnogliniany", "slateblue": "łupkowy niebieski", "mediumaquamarine": "średnia akwamaryna", "lavender": "lawendowy", "mediumseagreen": "średnia morska zieleń", "maroon": "bordowy", "darkslategray": "ciemny łupkowy szary", "mediumturquoise": "średni turkusowy", "ghostwhite": "bladobiały", "darkblue": "ciemnoniebieski", "mediumvioletred": "średni fioletowoczerwony", "brown": "brązowy", "lightgray": "jasnoszary", "sandybrown": "piaskowy brąz", "pink": "różowy", "firebrick": "ceglasty", "indigo": "indygo", "snow": "śnieżny", "darkorchid": "ciemna orchidea", "turquoise": "turkusowy", "chocolate": "czekoladowy", "springgreen": "wiosenna zieleń", "moccasin": "mokasynowy", "navy": "granatowy", "lemonchiffon": "cytrynowy", "teal": "cyrankowy", "floralwhite": "kwiatowa biel", "cornflowerblue": "chabrowy", "paleturquoise": "bladoturkusowy", "purple": "purpurowy", "gainsboro": "bladoszary", "plum": "śliwkowy", "red": "czerwony", "blue": "niebieski", "forestgreen": "leśna zieleń", "darkgreen": "ciemnozielony", "honeydew": "melon", "darkseagreen": "ciemna morska zieleń", "lightcoral": "jasnokoralowy", "palevioletred": "blady fioletowoczerwony", "mediumpurple": "średnia purpura", "saddlebrown": "skórzany brązowy", "darkmagenta": "ciemna magenta", "thistle": "bladofioletowy", "whitesmoke": "przydymiony biały", "wheat": "pszeniczny", "violet": "fioletowy", "lightskyblue": "jasny błękit nieba", "goldenrod": "gliniany", "mediumblue": "średni niebieski", "skyblue": "błękit nieba", "crimson": "karmazynowy", "darksalmon": "ciemnołososiowy", "darkred": "ciemnoczerwony", "darkslategrey": "ciemny łupkowy szary", "peru": "jasnobrązowy", "lightgrey": "jasnoszary", "lightgoldenrodyellow": "jasnogliniana żółć", "blanchedalmond": "migdałowy", "aliceblue": "bladoniebieski", "bisque": "biszkoptowy", "slategray": "łupkowy szary", "palegoldenrod": "bladogliniany", "darkorange": "ciemnopomarańczowy", "aquamarine": "akwamaryna", "lightgreen": "jasnozielony", "burlywood": "kolor drewna", "dodgerblue": "błękit Dodgers", "darkgray": "ciemnoszary", "lightcyan": "jasny cyjan", "powderblue": "pudrowy niebieski", "blueviolet": "niebieskofioletowy", "orchid": "orchidea", "dimgray": "przytłumiony szary", "beige": "beżowy", "fuchsia": "fuksja", "lavenderblush": "lawendoworóżowy", "hotpink": "intensywny różowy", "steelblue": "stalowy niebieski", "tomato": "pomidorowy", "lightpink": "jasnoróżowy", "limegreen": "limetkowozielony", "indianred": "kasztanowy", "papayawhip": "papaja", "lightslategray": "jasny łupkowy szary", "gray": "szary", "mediumorchid": "średnia orchidea", "cornsilk": "kukurydziany", "black": "czarny", "seagreen": "morska zieleń", "darkslateblue": "ciemny łupkowy niebieski", "khaki": "khaki", "lightblue": "jasnoniebieski", "palegreen": "bladozielony", "azure": "lazur", "peachpuff": "brzoskwiniowy", "darkolivegreen": "ciemnooliwkowy", "yellowgreen": "żółtozielony"})
\ No newline at end of file
+({"lightsteelblue":"jasny stalowoniebieski","orangered":"pomarańczowoczerwony","midnightblue":"ciemnogranatowy","cadetblue":"niebieskoszary","seashell":"muszla","slategrey":"łupkowy szary","coral":"koralowy","darkturquoise":"ciemnoturkusowy","antiquewhite":"biel antyczna","mediumspringgreen":"średnia wiosenna zieleń","salmon":"łososiowy","darkgrey":"ciemnoszary","ivory":"kość słoniowa","greenyellow":"zielonożółty","mistyrose":"bladoróżany","lightsalmon":"jasnołososiowy","silver":"srebrny","dimgrey":"przytłumiony szary","orange":"pomarańczowy","white":"biały","navajowhite":"piaskowy","royalblue":"błękit królewski","deeppink":"głęboki różowy","lime":"limetkowy","oldlace":"bladopomarańczowy","chartreuse":"jaskrawozielony","darkcyan":"ciemny cyjan","yellow":"żółty","linen":"lniany","olive":"oliwkowy","gold":"złoty","lawngreen":"trawiasty","lightyellow":"jasnożółty","tan":"kawowy","darkviolet":"ciemnofioletowy","lightslategrey":"jasny łupkowy szary","grey":"szary","darkkhaki":"ciemny khaki","green":"zielony","deepskyblue":"intensywny błękit nieba","aqua":"wodny","sienna":"siena","mintcream":"jasnomiętowy","rosybrown":"różowobrązowy","mediumslateblue":"średni łupkowy niebieski","magenta":"magenta","lightseagreen":"jasna morska zieleń","cyan":"cyjan","olivedrab":"oliwkowa zieleń","darkgoldenrod":"ciemnogliniany","slateblue":"łupkowy niebieski","mediumaquamarine":"średnia akwamaryna","lavender":"lawendowy","mediumseagreen":"średnia morska zieleń","maroon":"bordowy","darkslategray":"ciemny łupkowy szary","mediumturquoise":"średni turkusowy","ghostwhite":"bladobiały","darkblue":"ciemnoniebieski","mediumvioletred":"średni fioletowoczerwony","brown":"brązowy","lightgray":"jasnoszary","sandybrown":"piaskowy brąz","pink":"różowy","firebrick":"ceglasty","indigo":"indygo","snow":"śnieżny","darkorchid":"ciemna orchidea","turquoise":"turkusowy","chocolate":"czekoladowy","springgreen":"wiosenna zieleń","moccasin":"mokasynowy","navy":"granatowy","lemonchiffon":"cytrynowy","teal":"cyrankowy","floralwhite":"kwiatowa biel","cornflowerblue":"chabrowy","paleturquoise":"bladoturkusowy","purple":"purpurowy","gainsboro":"bladoszary","plum":"śliwkowy","red":"czerwony","blue":"niebieski","forestgreen":"leśna zieleń","darkgreen":"ciemnozielony","honeydew":"melon","darkseagreen":"ciemna morska zieleń","lightcoral":"jasnokoralowy","palevioletred":"blady fioletowoczerwony","mediumpurple":"średnia purpura","saddlebrown":"skórzany brązowy","darkmagenta":"ciemna magenta","thistle":"bladofioletowy","whitesmoke":"przydymiony biały","wheat":"pszeniczny","violet":"fioletowy","lightskyblue":"jasny błękit nieba","goldenrod":"gliniany","mediumblue":"średni niebieski","skyblue":"błękit nieba","crimson":"karmazynowy","darksalmon":"ciemnołososiowy","darkred":"ciemnoczerwony","darkslategrey":"ciemny łupkowy szary","peru":"jasnobrązowy","lightgrey":"jasnoszary","lightgoldenrodyellow":"jasnogliniana żółć","blanchedalmond":"migdałowy","aliceblue":"bladoniebieski","bisque":"biszkoptowy","slategray":"łupkowy szary","palegoldenrod":"bladogliniany","darkorange":"ciemnopomarańczowy","aquamarine":"akwamaryna","lightgreen":"jasnozielony","burlywood":"kolor drewna","dodgerblue":"błękit Dodgers","darkgray":"ciemnoszary","lightcyan":"jasny cyjan","powderblue":"pudrowy niebieski","blueviolet":"niebieskofioletowy","orchid":"orchidea","dimgray":"przytłumiony szary","beige":"beżowy","fuchsia":"fuksja","lavenderblush":"lawendoworóżowy","hotpink":"intensywny różowy","steelblue":"stalowy niebieski","tomato":"pomidorowy","lightpink":"jasnoróżowy","limegreen":"limetkowozielony","indianred":"kasztanowy","papayawhip":"papaja","lightslategray":"jasny łupkowy szary","gray":"szary","mediumorchid":"średnia orchidea","cornsilk":"kukurydziany","black":"czarny","seagreen":"morska zieleń","darkslateblue":"ciemny łupkowy niebieski","khaki":"khaki","lightblue":"jasnoniebieski","palegreen":"bladozielony","azure":"lazur","peachpuff":"brzoskwiniowy","darkolivegreen":"ciemnooliwkowy","yellowgreen":"żółtozielony"})
\ No newline at end of file
diff --git a/js/dojo/dojo/nls/pt/colors.js b/js/dojo/dojo/nls/pt/colors.js
--- a/js/dojo/dojo/nls/pt/colors.js
+++ b/js/dojo/dojo/nls/pt/colors.js
@@ -1,1 +1,1 @@
-({"lightsteelblue": "azul metálico claro", "orangered": "vermelho-alaranjado", "midnightblue": "azul noturno", "cadetblue": "azul-cadete", "seashell": "concha marinha", "slategrey": "ardósia cinza", "coral": "coral", "darkturquoise": "turquesa-escuro", "antiquewhite": "branco velho", "mediumspringgreen": "verde primavera médio", "salmon": "salmão", "darkgrey": "cinza-escuro", "ivory": "marfim", "greenyellow": "verde-amarelado", "mistyrose": "rosa nublado", "lightsalmon": "salmão claro", "silver": "prata", "dimgrey": "cinza-escuro", "orange": "laranja", "white": "branco", "navajowhite": "branco navajo", "royalblue": "azul real", "deeppink": "rosa profundo", "lime": "lima", "oldlace": "fita velha", "chartreuse": "verde-amarelado", "darkcyan": "ciano-escuro", "yellow": "amarelo", "linen": "linho", "olive": "verde-oliva", "gold": "dourado", "lawngreen": "verde grama", "lightyellow": "amarelo-claro", "tan": "canela", "darkviolet": "violeta-escuro", "lightslategrey": "ardósia cinza-claro", "grey": "cinza", "darkkhaki": "cáqui-escuro", "green": "verde", "deepskyblue": "azul celeste profundo", "aqua": "azul-água", "sienna": "marrom-avermelhado", "mintcream": "menta", "rosybrown": "marrom rosado", "mediumslateblue": "ardósia azul médio", "magenta": "magenta", "lightseagreen": "verde-mar claro", "cyan": "ciano", "olivedrab": "verde-acastanhado", "darkgoldenrod": "ouro-escuro", "slateblue": "ardósia azul", "mediumaquamarine": "verde-azulado temperado", "lavender": "lavanda", "mediumseagreen": "verde mar temperado", "maroon": "castanho", "darkslategray": "ardósia cinza-escuro", "mediumturquoise": "turquesa médio", "ghostwhite": "branco sombreado", "darkblue": "azul-escuro", "mediumvioletred": "violeta avermelhado médio", "brown": "marrom", "lightgray": "cinza-claro", "sandybrown": "marrom arenoso", "pink": "rosado", "firebrick": "tijolo queimado", "indigo": "índigo", "snow": "branco neve", "darkorchid": "orquídea-escuro", "turquoise": "turquesa", "chocolate": "chocolate", "springgreen": "verde primavera", "moccasin": "mocassim", "navy": "marinho", "lemonchiffon": "gaze limão", "teal": "azul-esverdeado", "floralwhite": "branco floral", "cornflowerblue": "centáurea azul", "paleturquoise": "turquesa pálida", "purple": "púrpura", "gainsboro": "gainsboro", "plum": "ameixa", "red": "vermelho", "blue": "azul", "forestgreen": "verde floresta", "darkgreen": "verde-escuro", "honeydew": "verde mel", "darkseagreen": "verde-mar escuro", "lightcoral": "coral-claro", "palevioletred": "violeta pálida", "mediumpurple": "púrpura temperado", "saddlebrown": "marrom couro", "darkmagenta": "magenta-escuro", "thistle": "cardo", "whitesmoke": "branco esfumaçado", "wheat": "trigo", "violet": "violeta", "lightskyblue": "azul celeste claro", "goldenrod": "ouro", "mediumblue": "azul temperado", "skyblue": "azul celeste", "crimson": "carmim", "darksalmon": "salmão escuro", "darkred": "vermelho-escuro", "darkslategrey": "ardósia cinza-escuro", "peru": "peru", "lightgrey": "cinza-claro", "lightgoldenrodyellow": "amarelo-claro", "blanchedalmond": "branco-amêndoa", "aliceblue": "azul-bebê", "bisque": "biscuit", "slategray": "ardósia cinza", "palegoldenrod": "ouro pálido", "darkorange": "laranja-escuro", "aquamarine": "água-marinha", "lightgreen": "verde-claro", "burlywood": "madeira", "dodgerblue": "azul fugidio", "darkgray": "cinza-escuro", "lightcyan": "ciano-claro", "powderblue": "azul pólvora", "blueviolet": "violeta azulado", "orchid": "orquídea", "dimgray": "cinza-escuro", "beige": "bege", "fuchsia": "fúcsia", "lavenderblush": "lavanda avermelhada", "hotpink": "rosa quente", "steelblue": "azul metálico", "tomato": "vermelho tomate", "lightpink": "rosa-claro", "limegreen": "verde lima", "indianred": "vermelho oriental", "papayawhip": "mamão papaia", "lightslategray": "ardósia cinza-claro", "gray": "cinza", "mediumorchid": "orquídea temperado", "cornsilk": "fios de milho", "black": "preto", "seagreen": "verde-mar", "darkslateblue": "ardósia azul-escuro", "khaki": "cáqui", "lightblue": "azul-claro", "palegreen": "verde pálido", "azure": "azul-celeste", "peachpuff": "pêssego", "darkolivegreen": "verde-oliva escuro", "yellowgreen": "amarelo esverdeado"})
\ No newline at end of file
+({"lightsteelblue":"azul-aço claro","orangered":"vermelho alaranjado","midnightblue":"azul meia-noite","cadetblue":"azul cadet","seashell":"seashell","slategrey":"cinza-ardósia","coral":"coral","darkturquoise":"turquesa escuro","antiquewhite":"branco antigo","mediumspringgreen":"verde-primavera médio","salmon":"salmão","darkgrey":"cinza escuro","ivory":"marfim","greenyellow":"amarelo esverdeado","mistyrose":"rosa enevoado","lightsalmon":"salmão claro","silver":"prateado","dimgrey":"cinza turvo","orange":"laranja","white":"branco","navajowhite":"branco navajo","royalblue":"azul royal","deeppink":"rosa profundo","lime":"lima","oldlace":"cadarço velho","chartreuse":"chartreuse","darkcyan":"ciano escuro","yellow":"amarelo","linen":"linho","olive":"oliva","gold":"dourado","lawngreen":"verde grama","lightyellow":"amarelo claro","tan":"tan","darkviolet":"violeta escuro","lightslategrey":"cinza-ardósia claro","grey":"cinza","darkkhaki":"cáqui escuro","green":"verde","deepskyblue":"azul-céu intenso","aqua":"aqua","sienna":"sienna","mintcream":"creme de menta","rosybrown":"marrom rosado","mediumslateblue":"azul-ardósia médio","magenta":"magenta","lightseagreen":"verde marinho claro","cyan":"ciano","olivedrab":"verde oliva","darkgoldenrod":"goldenrod escuro","slateblue":"azul-ardósia","mediumaquamarine":"água-marinha médio","lavender":"lavanda","mediumseagreen":"verde-marinho médio","maroon":"marrom","darkslategray":"cinza-ardósia escuro","mediumturquoise":"turquesa médio","ghostwhite":"branco ghost","darkblue":"azul escuro","mediumvioletred":"vermelho-violeta médio","brown":"marrom","lightgray":"cinza claro","sandybrown":"marrom cor de areia","pink":"rosa","firebrick":"firebrick","indigo":"índigo","snow":"branco neve","darkorchid":"orquídea escuro","turquoise":"turquesa","chocolate":"chocolate","springgreen":"verde primavera","moccasin":"moccasin","navy":"marinho","lemonchiffon":"limão chiffon","teal":"azul esverdeado","floralwhite":"branco floral","cornflowerblue":"azul centaurea","paleturquoise":"turquesa esbranquiçado","purple":"roxo","gainsboro":"gainsboro","plum":"ameixa","red":"vermelho","blue":"azul","forestgreen":"verde floresta","darkgreen":"verde escuro","honeydew":"honeydew","darkseagreen":"verde marinho escuro","lightcoral":"coral claro","palevioletred":"vermelho-violeta esbranquiçado","mediumpurple":"roxo médio","saddlebrown":"marrom saddle","darkmagenta":"magenta escuro","thistle":"thistle","whitesmoke":"fumaça branca","wheat":"trigo","violet":"violeta","lightskyblue":"azul-céu claro","goldenrod":"goldenrod","mediumblue":"azul médio","skyblue":"azul-céu","crimson":"carmesim","darksalmon":"salmão escuro","darkred":"vermelho escuro","darkslategrey":"cinza-ardósia escuro","peru":"peru","lightgrey":"cinza claro","lightgoldenrodyellow":"amarelo goldenrod claro","blanchedalmond":"amêndoa pelada","aliceblue":"azul alice","bisque":"bisque","slategray":"cinza-ardósia","palegoldenrod":"goldenrod esbranquiçado","darkorange":"laranja escuro","aquamarine":"água-marinha","lightgreen":"verde claro","burlywood":"burlywood","dodgerblue":"azul dodger","darkgray":"cinza escuro","lightcyan":"ciano claro","powderblue":"azul-talco","blueviolet":"azul-violeta","orchid":"orquídea","dimgray":"cinza turvo","beige":"bege","fuchsia":"fúcsia","lavenderblush":"lavanda avermelhada","hotpink":"rosa quente","steelblue":"azul-aço","tomato":"tomate","lightpink":"rosa claro","limegreen":"verde-lima","indianred":"vermelho indiano","papayawhip":"creme de papaya","lightslategray":"cinza-ardósia claro","gray":"cinza","mediumorchid":"orquídea médio","cornsilk":"cornsilk","black":"preto","seagreen":"verde-marinho","darkslateblue":"azul-ardósia escuro","khaki":"cáqui","lightblue":"azul claro","palegreen":"verde esbranquiçado","azure":"azul-celeste","peachpuff":"peach puff","darkolivegreen":"verde oliva escuro","yellowgreen":"verde amarelado"})
\ No newline at end of file
diff --git a/js/dojo/dojo/nls/ru/colors.js b/js/dojo/dojo/nls/ru/colors.js
--- a/js/dojo/dojo/nls/ru/colors.js
+++ b/js/dojo/dojo/nls/ru/colors.js
@@ -1,1 +1,1 @@
-({"lightsteelblue": "светлый стальной", "orangered": "оранжево-красный", "midnightblue": "полуночно-синий", "cadetblue": "серо-синий", "seashell": "морская раковина", "slategrey": "грифельно-серый", "coral": "коралловый", "darkturquoise": "темный бирюзовый", "antiquewhite": "белый антик", "mediumspringgreen": "нейтральный весенне-зеленый", "salmon": "лососевый", "darkgrey": "темно-серый", "ivory": "слоновой кости", "greenyellow": "зелено-желтый", "mistyrose": "блекло-розовый", "lightsalmon": "светло-лососевый", "silver": "серебристый", "dimgrey": "тускло-серый", "orange": "оранжевый", "white": "белый", "navajowhite": "белый навахо", "royalblue": "королевский голубой", "deeppink": "темно-розовый", "lime": "лайм", "oldlace": "матово-белый", "chartreuse": "желто-салатный", "darkcyan": "темный циан", "yellow": "желтый", "linen": "хлопковый", "olive": "оливковый", "gold": "золотой", "lawngreen": "зеленая лужайка", "lightyellow": "светло-желтый", "tan": "рыжевато-коричневый", "darkviolet": "темно-фиолетовый", "lightslategrey": "светлый грифельно-серый", "grey": "серый", "darkkhaki": "темный хаки", "green": "зеленый", "deepskyblue": "темный небесно-голубой", "aqua": "зеленовато-голубой", "sienna": "охра", "mintcream": "мятно-кремовый", "rosybrown": "розово-коричневый", "mediumslateblue": "нейтральный грифельно-синий", "magenta": "пурпурный", "lightseagreen": "светлый морской волны", "cyan": "циан", "olivedrab": "желтовато-серый", "darkgoldenrod": "темно-золотистый", "slateblue": "грифельно-синий", "mediumaquamarine": "нейтральный аквамарин", "lavender": "бледно-лиловый", "mediumseagreen": "нейтральный морской волны", "maroon": "темно-бордовый", "darkslategray": "темный грифельно-серый", "mediumturquoise": "нейтральный бирюзовый", "ghostwhite": "призрачно-белый", "darkblue": "темно-синий", "mediumvioletred": "нейтральный фиолетово-красный", "brown": "коричневый", "lightgray": "светло-серый", "sandybrown": "коричнево-песчаный", "pink": "розовый", "firebrick": "кирпичный", "indigo": "индиго", "snow": "белоснежный", "darkorchid": "темный орсель", "turquoise": "бирюзовый", "chocolate": "шоколадный", "springgreen": "весенний зеленый", "moccasin": "мокасин", "navy": "темно-синий", "lemonchiffon": "бледно-лимонный", "teal": "чирок", "floralwhite": "цветочно-белый", "cornflowerblue": "фиолетово-синий", "paleturquoise": "бледно-бирюзовый", "purple": "фиолетовый", "gainsboro": "бледно-серый", "plum": "сливовый", "red": "красный", "blue": "синий", "forestgreen": "зеленый лесной", "darkgreen": "темно-зеленый", "honeydew": "медовый", "darkseagreen": "темный морской волны", "lightcoral": "светло-коралловый", "palevioletred": "бледный фиолетово-красный", "mediumpurple": "нейтральный фиолетовый", "saddlebrown": "кожано-коричневый", "darkmagenta": "темно-пурпурный", "thistle": "чертополох", "whitesmoke": "дымчато-белый", "wheat": "пшеница", "violet": "фиолетовый", "lightskyblue": "светлый небесно-голубой", "goldenrod": "золотистый", "mediumblue": "нейтральный синий", "skyblue": "небесно-голубой", "crimson": "малиновый", "darksalmon": "темно-лососевый", "darkred": "темно-красный", "darkslategrey": "темный грифельно-серый", "peru": "перу", "lightgrey": "светло-серый", "lightgoldenrodyellow": "светло-золотистый", "blanchedalmond": "светло-миндальный", "aliceblue": "серо-голубой", "bisque": "бисквитный", "slategray": "грифельно-серый", "palegoldenrod": "бледно-золотистый", "darkorange": "темно-оранжевый", "aquamarine": "аквамарин", "lightgreen": "светло-зеленый", "burlywood": "светло-коричневый", "dodgerblue": "бледно-синий", "darkgray": "темно-серый", "lightcyan": "светлый циан", "powderblue": "пороховой", "blueviolet": "сине-фиолетовый", "orchid": "орсель", "dimgray": "тускло-серый", "beige": "бежевый", "fuchsia": "фуксин", "lavenderblush": "розовато-лиловый", "hotpink": "красно-розовый", "steelblue": "стальной", "tomato": "помидор", "lightpink": "светло-розовый", "limegreen": "зеленый лайм", "indianred": "индийский красный", "papayawhip": "черенок папайи", "lightslategray": "светлый грифельно-серый", "gray": "серый", "mediumorchid": "нейтральный орсель", "cornsilk": "шелковый оттенок", "black": "черный", "seagreen": "морской волны", "darkslateblue": "темный грифельно-синий", "khaki": "хаки", "lightblue": "светло-синий", "palegreen": "бледно-зеленый", "azure": "лазурный", "peachpuff": "персиковый", "darkolivegreen": "темно-оливковый", "yellowgreen": "желто-зеленый"})
\ No newline at end of file
+({"lightsteelblue":"светлый стальной","orangered":"оранжево-красный","midnightblue":"полуночно-синий","cadetblue":"серо-синий","seashell":"морская раковина","slategrey":"грифельно-серый","coral":"коралловый","darkturquoise":"темный бирюзовый","antiquewhite":"белый антик","mediumspringgreen":"нейтральный весенне-зеленый","salmon":"лососевый","darkgrey":"темно-серый","ivory":"слоновой кости","greenyellow":"зелено-желтый","mistyrose":"блекло-розовый","lightsalmon":"светло-лососевый","silver":"серебристый","dimgrey":"тускло-серый","orange":"оранжевый","white":"белый","navajowhite":"белый навахо","royalblue":"королевский голубой","deeppink":"темно-розовый","lime":"лайм","oldlace":"матово-белый","chartreuse":"желто-салатный","darkcyan":"темный циан","yellow":"желтый","linen":"хлопковый","olive":"оливковый","gold":"золотой","lawngreen":"зеленая лужайка","lightyellow":"светло-желтый","tan":"рыжевато-коричневый","darkviolet":"темно-фиолетовый","lightslategrey":"светлый грифельно-серый","grey":"серый","darkkhaki":"темный хаки","green":"зеленый","deepskyblue":"темный небесно-голубой","aqua":"зеленовато-голубой","sienna":"охра","mintcream":"мятно-кремовый","rosybrown":"розово-коричневый","mediumslateblue":"нейтральный грифельно-синий","magenta":"пурпурный","lightseagreen":"светлый морской волны","cyan":"циан","olivedrab":"желтовато-серый","darkgoldenrod":"темно-золотистый","slateblue":"грифельно-синий","mediumaquamarine":"нейтральный аквамарин","lavender":"бледно-лиловый","mediumseagreen":"нейтральный морской волны","maroon":"темно-бордовый","darkslategray":"темный грифельно-серый","mediumturquoise":"нейтральный бирюзовый","ghostwhite":"призрачно-белый","darkblue":"темно-синий","mediumvioletred":"нейтральный фиолетово-красный","brown":"коричневый","lightgray":"светло-серый","sandybrown":"коричнево-песчаный","pink":"розовый","firebrick":"кирпичный","indigo":"индиго","snow":"белоснежный","darkorchid":"темный орсель","turquoise":"бирюзовый","chocolate":"шоколадный","springgreen":"весенний зеленый","moccasin":"мокасин","navy":"темно-синий","lemonchiffon":"бледно-лимонный","teal":"чирок","floralwhite":"цветочно-белый","cornflowerblue":"фиолетово-синий","paleturquoise":"бледно-бирюзовый","purple":"фиолетовый","gainsboro":"бледно-серый","plum":"сливовый","red":"красный","blue":"синий","forestgreen":"зеленый лесной","darkgreen":"темно-зеленый","honeydew":"медовый","darkseagreen":"темный морской волны","lightcoral":"светло-коралловый","palevioletred":"бледный фиолетово-красный","mediumpurple":"нейтральный фиолетовый","saddlebrown":"кожано-коричневый","darkmagenta":"темно-пурпурный","thistle":"чертополох","whitesmoke":"дымчато-белый","wheat":"пшеница","violet":"фиолетовый","lightskyblue":"светлый небесно-голубой","goldenrod":"золотистый","mediumblue":"нейтральный синий","skyblue":"небесно-голубой","crimson":"малиновый","darksalmon":"темно-лососевый","darkred":"темно-красный","darkslategrey":"темный грифельно-серый","peru":"перу","lightgrey":"светло-серый","lightgoldenrodyellow":"светло-золотистый","blanchedalmond":"светло-миндальный","aliceblue":"серо-голубой","bisque":"бисквитный","slategray":"грифельно-серый","palegoldenrod":"бледно-золотистый","darkorange":"темно-оранжевый","aquamarine":"аквамарин","lightgreen":"светло-зеленый","burlywood":"светло-коричневый","dodgerblue":"бледно-синий","darkgray":"темно-серый","lightcyan":"светлый циан","powderblue":"пороховой","blueviolet":"сине-фиолетовый","orchid":"орсель","dimgray":"тускло-серый","beige":"бежевый","fuchsia":"фуксин","lavenderblush":"розовато-лиловый","hotpink":"красно-розовый","steelblue":"стальной","tomato":"помидор","lightpink":"светло-розовый","limegreen":"зеленый лайм","indianred":"индийский красный","papayawhip":"черенок папайи","lightslategray":"светлый грифельно-серый","gray":"серый","mediumorchid":"нейтральный орсель","cornsilk":"шелковый оттенок","black":"черный","seagreen":"морской волны","darkslateblue":"темный грифельно-синий","khaki":"хаки","lightblue":"светло-синий","palegreen":"бледно-зеленый","azure":"лазурный","peachpuff":"персиковый","darkolivegreen":"темно-оливковый","yellowgreen":"желто-зеленый"})
\ No newline at end of file
diff --git a/js/dojo/dojo/nls/zh-tw/colors.js b/js/dojo/dojo/nls/zh-tw/colors.js
--- a/js/dojo/dojo/nls/zh-tw/colors.js
+++ b/js/dojo/dojo/nls/zh-tw/colors.js
@@ -1,1 +1,1 @@
-({"lightsteelblue": "淡鐵藍色", "orangered": "橙紅色", "midnightblue": "午夜藍", "cadetblue": "軍服藍", "seashell": "海貝色", "slategrey": "岩灰色", "coral": "珊瑚紅", "darkturquoise": "暗松石綠", "antiquewhite": "米白色", "mediumspringgreen": "中春綠色", "salmon": "鮭紅色", "darkgrey": "暗灰色", "ivory": "象牙色", "greenyellow": "綠黃色", "mistyrose": "霧玫瑰色", "lightsalmon": "淡鮭紅", "silver": "銀色", "dimgrey": "昏灰色", "orange": "橙色", "white": "白色", "navajowhite": "印地安黃色", "royalblue": "品藍色", "deeppink": "深粉紅色", "lime": "檸檬色", "oldlace": "舊蕾絲色", "chartreuse": "淡黃綠色", "darkcyan": "暗青色", "yellow": "黃色", "linen": "亞麻色", "olive": "橄欖色", "gold": "金色", "lawngreen": "草綠色", "lightyellow": "淡黃色", "tan": "皮革色", "darkviolet": "暗紫羅蘭色", "lightslategrey": "淡岩灰色", "grey": "灰色", "darkkhaki": "暗卡其色", "green": "綠色", "deepskyblue": "深天藍色", "aqua": "水色", "sienna": "黃土赭色", "mintcream": "薄荷乳白色", "rosybrown": "玫瑰褐", "mediumslateblue": "中岩藍色", "magenta": "紫紅色", "lightseagreen": "淡海綠色", "cyan": "青色", "olivedrab": "橄欖綠", "darkgoldenrod": "暗金菊色", "slateblue": "岩藍色", "mediumaquamarine": "中碧綠色", "lavender": "薰衣草紫", "mediumseagreen": "中海綠色", "maroon": "栗色", "darkslategray": "暗岩灰色", "mediumturquoise": "中松石綠", "ghostwhite": "幽靈色", "darkblue": "暗藍色", "mediumvioletred": "中紫羅蘭紅", "brown": "褐色", "lightgray": "淡灰色", "sandybrown": "沙褐色", "pink": "粉紅色", "firebrick": "紅磚色", "indigo": "靛藍色", "snow": "雪白色", "darkorchid": "暗蘭花色", "turquoise": "松石綠", "chocolate": "巧克力色", "springgreen": "春綠色", "moccasin": "鹿皮黃色", "navy": "海軍藍", "lemonchiffon": "奶油黃", "teal": "深藍綠色", "floralwhite": "花卉白", "cornflowerblue": "矢車菊藍", "paleturquoise": "灰松石綠", "purple": "紫色", "gainsboro": "石板灰", "plum": "李紫色", "red": "紅色", "blue": "藍色", "forestgreen": "森綠色", "darkgreen": "暗綠色", "honeydew": "密瓜色", "darkseagreen": "暗海綠色", "lightcoral": "淡珊瑚紅", "palevioletred": "灰紫羅蘭紅", "mediumpurple": "中紫色", "saddlebrown": "鞍褐色", "darkmagenta": "暗紫紅色", "thistle": "薊色", "whitesmoke": "白煙色", "wheat": "小麥色", "violet": "紫羅蘭色", "lightskyblue": "淡天藍色", "goldenrod": "金菊色", "mediumblue": "中藍色", "skyblue": "天藍色", "crimson": "暗深紅色", "darksalmon": "暗鮭紅", "darkred": "暗紅色", "darkslategrey": "暗岩灰色", "peru": "祕魯色", "lightgrey": "淡灰色", "lightgoldenrodyellow": "淡金菊黃", "blanchedalmond": "杏仁白", "aliceblue": "愛麗絲藍", "bisque": "橘黃色", "slategray": "岩灰色", "palegoldenrod": "灰金菊色", "darkorange": "暗橙色", "aquamarine": "碧綠色", "lightgreen": "淡綠色", "burlywood": "實木色", "dodgerblue": "道奇藍", "darkgray": "暗灰色", "lightcyan": "淡青色", "powderblue": "粉藍色", "blueviolet": "藍紫色", "orchid": "蘭花色", "dimgray": "昏灰色", "beige": "灰棕色", "fuchsia": "海棠紅", "lavenderblush": "薰衣草紫紅", "hotpink": "暖粉紅色", "steelblue": "鐵藍色", "tomato": "蕃茄紅", "lightpink": "淡粉紅色", "limegreen": "檸檬綠", "indianred": "印度紅", "papayawhip": "番木瓜色", "lightslategray": "淡岩灰色", "gray": "灰色", "mediumorchid": "中蘭紫色", "cornsilk": "玉米黃", "black": "黑色", "seagreen": "海綠色", "darkslateblue": "暗岩藍色", "khaki": "卡其色", "lightblue": "淡藍色", "palegreen": "灰綠色", "azure": "天藍色", "peachpuff": "粉撲桃色", "darkolivegreen": "暗橄欖綠", "yellowgreen": "黃綠色"})
\ No newline at end of file
+({"lightsteelblue":"淡鐵藍色","orangered":"橙紅色","midnightblue":"午夜藍","cadetblue":"軍服藍","seashell":"海貝色","slategrey":"岩灰色","coral":"珊瑚紅","darkturquoise":"暗松石綠","antiquewhite":"米白色","mediumspringgreen":"中春綠色","salmon":"鮭紅色","darkgrey":"暗灰色","ivory":"象牙色","greenyellow":"綠黃色","mistyrose":"霧玫瑰色","lightsalmon":"淡鮭紅","silver":"銀色","dimgrey":"昏灰色","orange":"橙色","white":"白色","navajowhite":"印地安黃色","royalblue":"品藍色","deeppink":"深粉紅色","lime":"檸檬色","oldlace":"舊蕾絲色","chartreuse":"淡黃綠色","darkcyan":"暗青色","yellow":"黃色","linen":"亞麻色","olive":"橄欖色","gold":"金色","lawngreen":"草綠色","lightyellow":"淡黃色","tan":"皮革色","darkviolet":"暗紫羅蘭色","lightslategrey":"淡岩灰色","grey":"灰色","darkkhaki":"暗卡其色","green":"綠色","deepskyblue":"深天藍色","aqua":"水色","sienna":"黃土赭色","mintcream":"薄荷乳白色","rosybrown":"玫瑰褐","mediumslateblue":"中岩藍色","magenta":"紫紅色","lightseagreen":"淡海綠色","cyan":"青色","olivedrab":"橄欖綠","darkgoldenrod":"暗金菊色","slateblue":"岩藍色","mediumaquamarine":"中碧綠色","lavender":"薰衣草紫","mediumseagreen":"中海綠色","maroon":"栗色","darkslategray":"暗岩灰色","mediumturquoise":"中松石綠","ghostwhite":"幽靈色","darkblue":"暗藍色","mediumvioletred":"中紫羅蘭紅","brown":"褐色","lightgray":"淡灰色","sandybrown":"沙褐色","pink":"粉紅色","firebrick":"紅磚色","indigo":"靛藍色","snow":"雪白色","darkorchid":"暗蘭花色","turquoise":"松石綠","chocolate":"巧克力色","springgreen":"春綠色","moccasin":"鹿皮黃色","navy":"海軍藍","lemonchiffon":"奶油黃","teal":"深藍綠色","floralwhite":"花卉白","cornflowerblue":"矢車菊藍","paleturquoise":"灰松石綠","purple":"紫色","gainsboro":"石板灰","plum":"李紫色","red":"紅色","blue":"藍色","forestgreen":"森綠色","darkgreen":"暗綠色","honeydew":"密瓜色","darkseagreen":"暗海綠色","lightcoral":"淡珊瑚紅","palevioletred":"灰紫羅蘭紅","mediumpurple":"中紫色","saddlebrown":"鞍褐色","darkmagenta":"暗紫紅色","thistle":"薊色","whitesmoke":"白煙色","wheat":"小麥色","violet":"紫羅蘭色","lightskyblue":"淡天藍色","goldenrod":"金菊色","mediumblue":"中藍色","skyblue":"天藍色","crimson":"暗深紅色","darksalmon":"暗鮭紅","darkred":"暗紅色","darkslategrey":"暗岩灰色","peru":"祕魯色","lightgrey":"淡灰色","lightgoldenrodyellow":"淡金菊黃","blanchedalmond":"杏仁白","aliceblue":"愛麗絲藍","bisque":"橘黃色","slategray":"岩灰色","palegoldenrod":"灰金菊色","darkorange":"暗橙色","aquamarine":"碧綠色","lightgreen":"淡綠色","burlywood":"實木色","dodgerblue":"道奇藍","darkgray":"暗灰色","lightcyan":"淡青色","powderblue":"粉藍色","blueviolet":"藍紫色","orchid":"蘭花色","dimgray":"昏灰色","beige":"灰棕色","fuchsia":"海棠紅","lavenderblush":"薰衣草紫紅","hotpink":"暖粉紅色","steelblue":"鐵藍色","tomato":"蕃茄紅","lightpink":"淡粉紅色","limegreen":"檸檬綠","indianred":"印度紅","papayawhip":"番木瓜色","lightslategray":"淡岩灰色","gray":"灰色","mediumorchid":"中蘭紫色","cornsilk":"玉米黃","black":"黑色","seagreen":"海綠色","darkslateblue":"暗岩藍色","khaki":"卡其色","lightblue":"淡藍色","palegreen":"灰綠色","azure":"天藍色","peachpuff":"粉撲桃色","darkolivegreen":"暗橄欖綠","yellowgreen":"黃綠色"})
\ No newline at end of file
diff --git a/js/dojo/dojo/nls/zh/colors.js b/js/dojo/dojo/nls/zh/colors.js
--- a/js/dojo/dojo/nls/zh/colors.js
+++ b/js/dojo/dojo/nls/zh/colors.js
@@ -1,1 +1,1 @@
-({"lightsteelblue": "浅钢蓝色", "orangered": "橙红色", "midnightblue": "深蓝色", "cadetblue": "灰蓝色", "seashell": "海贝色", "slategrey": "灰石色", "coral": "珊瑚色", "darkturquoise": "深粉蓝", "antiquewhite": "古董白", "mediumspringgreen": "间春绿色", "salmon": "橙红", "darkgrey": "深灰色", "ivory": "象牙色", "greenyellow": "绿黄色", "mistyrose": "浅玫瑰色", "lightsalmon": "淡橙色", "silver": "银白色", "dimgrey": "暗灰色", "orange": "橙色", "white": "白色", "navajowhite": "纳瓦白", "royalblue": "品蓝", "deeppink": "深粉红色", "lime": "淡黄绿色", "oldlace": "老白色", "chartreuse": "黄绿色", "darkcyan": "深青绿", "yellow": "黄色", "linen": "亚麻色", "olive": "橄榄绿", "gold": "金黄色", "lawngreen": "草绿色", "lightyellow": "浅黄色", "tan": "棕褐色", "darkviolet": "深紫色", "lightslategrey": "浅青灰", "grey": "灰色", "darkkhaki": "深卡其色", "green": "绿色", "deepskyblue": "深天蓝色", "aqua": "浅绿色", "sienna": "赭色", "mintcream": "薄荷色", "rosybrown": "褐玫瑰红", "mediumslateblue": "间暗蓝色", "magenta": "洋红色", "lightseagreen": "浅海藻绿", "cyan": "青蓝色", "olivedrab": "草绿色", "darkgoldenrod": "深金黄", "slateblue": "石蓝色", "mediumaquamarine": "间绿色", "lavender": "淡紫色", "mediumseagreen": "间海蓝色", "maroon": "栗色", "darkslategray": "深青灰", "mediumturquoise": "间绿宝石色", "ghostwhite": "苍白", "darkblue": "深蓝", "mediumvioletred": "间紫罗兰色", "brown": "棕色", "lightgray": "浅灰色", "sandybrown": "沙褐色", "pink": "粉红色", "firebrick": "砖红", "indigo": "靛青", "snow": "雪白色", "darkorchid": "深紫色", "turquoise": "绿宝石色", "chocolate": "巧克力色", "springgreen": "春绿色", "moccasin": "鹿皮色", "navy": "深蓝色", "lemonchiffon": "柠檬绸色", "teal": "水鸭色", "floralwhite": "花白色", "cornflowerblue": "浅蓝色", "paleturquoise": "苍绿色", "purple": "紫色", "gainsboro": "淡灰色", "plum": "杨李色", "red": "红色", "blue": "蓝色", "forestgreen": "森林绿", "darkgreen": "深绿色", "honeydew": "蜜汁色", "darkseagreen": "深海藻绿", "lightcoral": "浅珊瑚色", "palevioletred": "苍紫罗兰色", "mediumpurple": "间紫色", "saddlebrown": "重褐色", "darkmagenta": "深洋红色", "thistle": "蓟色", "whitesmoke": "烟白色", "wheat": "浅黄色", "violet": "紫色", "lightskyblue": "浅天蓝色", "goldenrod": "金麒麟色", "mediumblue": "间蓝色", "skyblue": "天蓝色", "crimson": "深红色", "darksalmon": "深橙红", "darkred": "深红色", "darkslategrey": "深青灰", "peru": "秘鲁色", "lightgrey": "浅灰色", "lightgoldenrodyellow": "浅金黄色", "blanchedalmond": "白杏色", "aliceblue": "爱丽丝蓝", "bisque": "桔黄色", "slategray": "灰石色", "palegoldenrod": "淡金黄色", "darkorange": "深橙色", "aquamarine": "碧绿色", "lightgreen": "浅绿色", "burlywood": "实木色", "dodgerblue": "闪蓝色", "darkgray": "深灰色", "lightcyan": "浅青色", "powderblue": "铁蓝", "blueviolet": "紫罗兰色", "orchid": "紫色", "dimgray": "暗灰色", "beige": "米色", "fuchsia": "紫红色", "lavenderblush": "淡紫红", "hotpink": "深粉红", "steelblue": "钢蓝色", "tomato": "西红柿色", "lightpink": "浅粉红色", "limegreen": "橙绿色", "indianred": "印度红", "papayawhip": "木瓜色", "lightslategray": "浅青灰", "gray": "灰色", "mediumorchid": "间紫色", "cornsilk": "米绸色", "black": "黑色", "seagreen": "海绿色", "darkslateblue": "深青蓝", "khaki": "卡其色", "lightblue": "淡蓝色", "palegreen": "淡绿色", "azure": "天蓝色", "peachpuff": "桃色", "darkolivegreen": "深橄榄绿", "yellowgreen": "黄绿色"})
\ No newline at end of file
+({"lightsteelblue":"浅钢蓝色","orangered":"橙红色","midnightblue":"深蓝色","cadetblue":"灰蓝色","seashell":"海贝色","slategrey":"灰石色","coral":"珊瑚色","darkturquoise":"深粉蓝","antiquewhite":"古董白","mediumspringgreen":"间春绿色","salmon":"橙红","darkgrey":"深灰色","ivory":"象牙色","greenyellow":"绿黄色","mistyrose":"浅玫瑰色","lightsalmon":"淡橙色","silver":"银白色","dimgrey":"暗灰色","orange":"橙色","white":"白色","navajowhite":"纳瓦白","royalblue":"品蓝","deeppink":"深粉红色","lime":"淡黄绿色","oldlace":"老白色","chartreuse":"黄绿色","darkcyan":"深青绿","yellow":"黄色","linen":"亚麻色","olive":"橄榄绿","gold":"金黄色","lawngreen":"草绿色","lightyellow":"浅黄色","tan":"棕褐色","darkviolet":"深紫色","lightslategrey":"浅青灰","grey":"灰色","darkkhaki":"深卡其色","green":"绿色","deepskyblue":"深天蓝色","aqua":"浅绿色","sienna":"赭色","mintcream":"薄荷色","rosybrown":"褐玫瑰红","mediumslateblue":"间暗蓝色","magenta":"洋红色","lightseagreen":"浅海藻绿","cyan":"青蓝色","olivedrab":"草绿色","darkgoldenrod":"深金黄","slateblue":"石蓝色","mediumaquamarine":"间绿色","lavender":"淡紫色","mediumseagreen":"间海蓝色","maroon":"栗色","darkslategray":"深青灰","mediumturquoise":"间绿宝石色","ghostwhite":"苍白","darkblue":"深蓝","mediumvioletred":"间紫罗兰色","brown":"棕色","lightgray":"浅灰色","sandybrown":"沙褐色","pink":"粉红色","firebrick":"砖红","indigo":"靛青","snow":"雪白色","darkorchid":"深紫色","turquoise":"绿宝石色","chocolate":"巧克力色","springgreen":"春绿色","moccasin":"鹿皮色","navy":"藏青色","lemonchiffon":"柠檬绸色","teal":"水鸭色","floralwhite":"花白色","cornflowerblue":"浅蓝色","paleturquoise":"苍绿色","purple":"紫色","gainsboro":"淡灰色","plum":"杨李色","red":"红色","blue":"蓝色","forestgreen":"森林绿","darkgreen":"深绿色","honeydew":"蜜汁色","darkseagreen":"深海藻绿","lightcoral":"浅珊瑚色","palevioletred":"苍紫罗兰色","mediumpurple":"间紫色","saddlebrown":"重褐色","darkmagenta":"深洋红色","thistle":"蓟色","whitesmoke":"烟白色","wheat":"浅黄色","violet":"紫色","lightskyblue":"浅天蓝色","goldenrod":"金麒麟色","mediumblue":"间蓝色","skyblue":"天蓝色","crimson":"绯红色","darksalmon":"深橙红","darkred":"深红色","darkslategrey":"深青灰","peru":"秘鲁色","lightgrey":"浅灰色","lightgoldenrodyellow":"浅金黄色","blanchedalmond":"白杏色","aliceblue":"爱丽丝蓝","bisque":"桔黄色","slategray":"灰石色","palegoldenrod":"淡金黄色","darkorange":"深橙色","aquamarine":"碧绿色","lightgreen":"浅绿色","burlywood":"实木色","dodgerblue":"闪蓝色","darkgray":"深灰色","lightcyan":"浅青色","powderblue":"铁蓝","blueviolet":"蓝紫色","orchid":"紫色","dimgray":"暗灰色","beige":"米色","fuchsia":"紫红色","lavenderblush":"淡紫红","hotpink":"深粉红","steelblue":"钢蓝色","tomato":"西红柿色","lightpink":"浅粉红色","limegreen":"橙绿色","indianred":"印度红","papayawhip":"木瓜色","lightslategray":"浅青灰","gray":"灰色","mediumorchid":"间紫色","cornsilk":"米绸色","black":"黑色","seagreen":"海绿色","darkslateblue":"深青蓝","khaki":"卡其色","lightblue":"淡蓝色","palegreen":"淡绿色","azure":"天蓝色","peachpuff":"桃色","darkolivegreen":"深橄榄绿","yellowgreen":"黄绿色"})
\ No newline at end of file
diff --git a/js/dojo/dojo/number.js b/js/dojo/dojo/number.js
--- a/js/dojo/dojo/number.js
+++ b/js/dojo/dojo/number.js
@@ -1,520 +1,324 @@
-if(!dojo._hasResource["dojo.number"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.number"] = true;
-dojo.provide("dojo.number");
-
-dojo.require("dojo.i18n");
-dojo.requireLocalization("dojo.cldr", "number", null, "zh-cn,en,en-ca,zh-tw,en-us,it,ja-jp,ROOT,de-de,es-es,fr,pt,ko-kr,es,de");
-dojo.require("dojo.string");
-dojo.require("dojo.regexp");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-/*=====
-dojo.number.__formatOptions = function(kwArgs){
- // pattern: String?
- // override formatting pattern with this string (see
- // dojo.number._applyPattern)
- // type: String?
- // choose a format type based on the locale from the following:
- // decimal, scientific, percent, currency. decimal by default.
- // places: Number?
- // fixed number of decimal places to show. This overrides any
- // information in the provided pattern.
- // round: NUmber?
- // 5 rounds to nearest .5; 0 rounds to nearest whole (default). -1
- // means don't round.
- // currency: String?
- // iso4217 currency code
- // symbol: String?
- // localized currency symbol
- // locale: String?
- // override the locale used to determine formatting rules
+if(!dojo._hasResource["dojo.number"]){
+dojo._hasResource["dojo.number"]=true;
+dojo.provide("dojo.number");
+dojo.require("dojo.i18n");
+dojo.requireLocalization("dojo.cldr","number",null,"ROOT,ar,ca,cs,da,de,de-de,el,en,en-au,en-gb,en-us,es,es-es,fi,fr,he,hu,it,ja,ja-jp,ko,ko-kr,nb,nl,pl,pt,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-cn,zh-tw");
+dojo.require("dojo.string");
+dojo.require("dojo.regexp");
+dojo.number.format=function(_1,_2){
+_2=dojo.mixin({},_2||{});
+var _3=dojo.i18n.normalizeLocale(_2.locale);
+var _4=dojo.i18n.getLocalization("dojo.cldr","number",_3);
+_2.customs=_4;
+var _5=_2.pattern||_4[(_2.type||"decimal")+"Format"];
+if(isNaN(_1)||Math.abs(_1)==Infinity){
+return null;
}
-=====*/
-
-dojo.number.format = function(/*Number*/value, /*dojo.number.__formatOptions?*/options){
- // summary:
- // Format a Number as a String, using locale-specific settings
- // description:
- // Create a string from a Number using a known localized pattern.
- // Formatting patterns appropriate to the locale are chosen from the
- // CLDR http://unicode.org/cldr as well as the appropriate symbols and
- // delimiters. See http://www.unicode.org/reports/tr35/#Number_Elements
- // value:
- // the number to be formatted. If not a valid JavaScript number,
- // return null.
-
- options = dojo.mixin({}, options || {});
- var locale = dojo.i18n.normalizeLocale(options.locale);
- var bundle = dojo.i18n.getLocalization("dojo.cldr", "number", locale);
- options.customs = bundle;
- var pattern = options.pattern || bundle[(options.type || "decimal") + "Format"];
- if(isNaN(value)){ return null; } // null
- return dojo.number._applyPattern(value, pattern, options); // String
+return dojo.number._applyPattern(_1,_5,_2);
};
-
-//dojo.number._numberPatternRE = /(?:[#0]*,?)*[#0](?:\.0*#*)?/; // not precise, but good enough
-dojo.number._numberPatternRE = /[#0,]*[#0](?:\.0*#*)?/; // not precise, but good enough
-
-dojo.number._applyPattern = function(/*Number*/value, /*String*/pattern, /*dojo.number.__formatOptions?*/options){
- // summary:
- // Apply pattern to format value as a string using options. Gives no
- // consideration to local customs.
- // value:
- // the number to be formatted.
- // pattern:
- // a pattern string as described in
- // http://www.unicode.org/reports/tr35/#Number_Format_Patterns
- // options: dojo.number.__formatOptions?
- // _applyPattern is usually called via dojo.number.format() which
- // populates an extra property in the options parameter, "customs".
- // The customs object specifies group and decimal parameters if set.
-
- //TODO: support escapes
- options = options || {};
- var group = options.customs.group;
- var decimal = options.customs.decimal;
-
- var patternList = pattern.split(';');
- var positivePattern = patternList[0];
- pattern = patternList[(value < 0) ? 1 : 0] || ("-" + positivePattern);
-
- //TODO: only test against unescaped
- if(pattern.indexOf('%') != -1){
- value *= 100;
- }else if(pattern.indexOf('\u2030') != -1){
- value *= 1000; // per mille
- }else if(pattern.indexOf('\u00a4') != -1){
- group = options.customs.currencyGroup || group;//mixins instead?
- decimal = options.customs.currencyDecimal || decimal;// Should these be mixins instead?
- pattern = pattern.replace(/\u00a4{1,3}/, function(match){
- var prop = ["symbol", "currency", "displayName"][match.length-1];
- return options[prop] || options.currency || "";
- });
- }else if(pattern.indexOf('E') != -1){
- throw new Error("exponential notation not supported");
- }
-
- //TODO: support @ sig figs?
- var numberPatternRE = dojo.number._numberPatternRE;
- var numberPattern = positivePattern.match(numberPatternRE);
- if(!numberPattern){
- throw new Error("unable to find a number expression in pattern: "+pattern);
- }
- return pattern.replace(numberPatternRE,
- dojo.number._formatAbsolute(value, numberPattern[0], {decimal: decimal, group: group, places: options.places}));
+dojo.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;
+dojo.number._applyPattern=function(_6,_7,_8){
+_8=_8||{};
+var _9=_8.customs.group;
+var _a=_8.customs.decimal;
+var _b=_7.split(";");
+var _c=_b[0];
+_7=_b[(_6<0)?1:0]||("-"+_c);
+if(_7.indexOf("%")!=-1){
+_6*=100;
+}else{
+if(_7.indexOf("‰")!=-1){
+_6*=1000;
+}else{
+if(_7.indexOf("¤")!=-1){
+_9=_8.customs.currencyGroup||_9;
+_a=_8.customs.currencyDecimal||_a;
+_7=_7.replace(/\u00a4{1,3}/,function(_d){
+var _e=["symbol","currency","displayName"][_d.length-1];
+return _8[_e]||_8.currency||"";
+});
+}else{
+if(_7.indexOf("E")!=-1){
+throw new Error("exponential notation not supported");
+}
+}
+}
+}
+var _f=dojo.number._numberPatternRE;
+var _10=_c.match(_f);
+if(!_10){
+throw new Error("unable to find a number expression in pattern: "+_7);
+}
+if(_8.fractional===false){
+_8.places=0;
+}
+return _7.replace(_f,dojo.number._formatAbsolute(_6,_10[0],{decimal:_a,group:_9,places:_8.places,round:_8.round}));
+};
+dojo.number.round=function(_11,_12,_13){
+var _14=10/(_13||10);
+return (_14*+_11).toFixed(_12)/_14;
+};
+if((0.9).toFixed()==0){
+(function(){
+var _15=dojo.number.round;
+dojo.number.round=function(v,p,m){
+var d=Math.pow(10,-p||0),a=Math.abs(v);
+if(!v||a>=d||a*Math.pow(10,p+1)<5){
+d=0;
}
-
-dojo.number.round = function(/*Number*/value, /*Number*/places, /*Number?*/multiple){
- // summary:
- // Rounds the number at the given number of places
- // value:
- // the number to round
- // places:
- // the number of decimal places where rounding takes place
- // multiple:
- // rounds next place to nearest multiple
-
- var pieces = String(value).split(".");
- var length = (pieces[1] && pieces[1].length) || 0;
- if(length > places){
- var factor = Math.pow(10, places);
- if(multiple > 0){factor *= 10/multiple;places++;} //FIXME
- value = Math.round(value * factor)/factor;
-
- // truncate to remove any residual floating point values
- pieces = String(value).split(".");
- length = (pieces[1] && pieces[1].length) || 0;
- if(length > places){
- pieces[1] = pieces[1].substr(0, places);
- value = Number(pieces.join("."));
- }
- }
- return value; //Number
+return _15(v,p,m)+(v>0?d:-d);
+};
+})();
+}
+dojo.number._formatAbsolute=function(_16,_17,_18){
+_18=_18||{};
+if(_18.places===true){
+_18.places=0;
+}
+if(_18.places===Infinity){
+_18.places=6;
+}
+var _19=_17.split(".");
+var _1a=(_18.places>=0)?_18.places:(_19[1]&&_19[1].length)||0;
+if(!(_18.round<0)){
+_16=dojo.number.round(_16,_1a,_18.round);
}
-
-/*=====
-dojo.number.__formatAbsoluteOptions = function(kwArgs){
- // decimal: String?
- // the decimal separator
- // group: String?
- // the group separator
- // places: Integer?
- // number of decimal places
- // round: Number?
- // 5 rounds to nearest .5; 0 rounds to nearest whole (default). -1
- // means don't round.
+var _1b=String(Math.abs(_16)).split(".");
+var _1c=_1b[1]||"";
+if(_18.places){
+var _1d=dojo.isString(_18.places)&&_18.places.indexOf(",");
+if(_1d){
+_18.places=_18.places.substring(_1d+1);
+}
+_1b[1]=dojo.string.pad(_1c.substr(0,_18.places),_18.places,"0",true);
+}else{
+if(_19[1]&&_18.places!==0){
+var pad=_19[1].lastIndexOf("0")+1;
+if(pad>_1c.length){
+_1b[1]=dojo.string.pad(_1c,pad,"0",true);
+}
+var _1e=_19[1].length;
+if(_1e<_1c.length){
+_1b[1]=_1c.substr(0,_1e);
}
-=====*/
-
-dojo.number._formatAbsolute = function(/*Number*/value, /*String*/pattern, /*dojo.number.__formatAbsoluteOptions?*/options){
- // summary:
- // Apply numeric pattern to absolute value using options. Gives no
- // consideration to local customs.
- // value:
- // the number to be formatted, ignores sign
- // pattern:
- // the number portion of a pattern (e.g. #,##0.00)
- options = options || {};
- if(options.places === true){options.places=0;}
- if(options.places === Infinity){options.places=6;} // avoid a loop; pick a limit
-
- var patternParts = pattern.split(".");
- var maxPlaces = (options.places >= 0) ? options.places : (patternParts[1] && patternParts[1].length) || 0;
- if(!(options.round < 0)){
- value = dojo.number.round(value, maxPlaces, options.round);
- }
-
- var valueParts = String(Math.abs(value)).split(".");
- var fractional = valueParts[1] || "";
- if(options.places){
- valueParts[1] = dojo.string.pad(fractional.substr(0, options.places), options.places, '0', true);
- }else if(patternParts[1] && options.places !== 0){
- // Pad fractional with trailing zeros
- var pad = patternParts[1].lastIndexOf("0") + 1;
- if(pad > fractional.length){
- valueParts[1] = dojo.string.pad(fractional, pad, '0', true);
- }
-
- // Truncate fractional
- var places = patternParts[1].length;
- if(places < fractional.length){
- valueParts[1] = fractional.substr(0, places);
- }
- }else{
- if(valueParts[1]){ valueParts.pop(); }
- }
-
- // Pad whole with leading zeros
- var patternDigits = patternParts[0].replace(',', '');
- pad = patternDigits.indexOf("0");
- if(pad != -1){
- pad = patternDigits.length - pad;
- if(pad > valueParts[0].length){
- valueParts[0] = dojo.string.pad(valueParts[0], pad);
- }
-
- // Truncate whole
- if(patternDigits.indexOf("#") == -1){
- valueParts[0] = valueParts[0].substr(valueParts[0].length - pad);
- }
- }
-
- // Add group separators
- var index = patternParts[0].lastIndexOf(',');
- var groupSize, groupSize2;
- if(index != -1){
- groupSize = patternParts[0].length - index - 1;
- var remainder = patternParts[0].substr(0, index);
- index = remainder.lastIndexOf(',');
- if(index != -1){
- groupSize2 = remainder.length - index - 1;
- }
- }
- var pieces = [];
- for(var whole = valueParts[0]; whole;){
- var off = whole.length - groupSize;
- pieces.push((off > 0) ? whole.substr(off) : whole);
- whole = (off > 0) ? whole.slice(0, off) : "";
- if(groupSize2){
- groupSize = groupSize2;
- delete groupSize2;
- }
- }
- valueParts[0] = pieces.reverse().join(options.group || ",");
-
- return valueParts.join(options.decimal || ".");
-};
-
-/*=====
-dojo.number.__regexpOptions = function(kwArgs){
- // pattern: String?
- // override pattern with this string. Default is provided based on
- // locale.
- // type: String?
- // choose a format type based on the locale from the following:
- // decimal, scientific, percent, currency. decimal by default.
- // locale: String?
- // override the locale used to determine formatting rules
- // strict: Boolean?
- // strict parsing, false by default
- // places: Number|String?
- // number of decimal places to accept: Infinity, a positive number, or
- // a range "n,m". By default, defined by pattern.
+}else{
+if(_1b[1]){
+_1b.pop();
+}
+}
+}
+var _1f=_19[0].replace(",","");
+pad=_1f.indexOf("0");
+if(pad!=-1){
+pad=_1f.length-pad;
+if(pad>_1b[0].length){
+_1b[0]=dojo.string.pad(_1b[0],pad);
+}
+if(_1f.indexOf("#")==-1){
+_1b[0]=_1b[0].substr(_1b[0].length-pad);
+}
}
-=====*/
-dojo.number.regexp = function(/*dojo.number.__regexpOptions?*/options){
- // summary:
- // Builds the regular needed to parse a number
- // description:
- // Returns regular expression with positive and negative match, group
- // and decimal separators
- return dojo.number._parseInfo(options).regexp; // String
+var _20=_19[0].lastIndexOf(",");
+var _21,_22;
+if(_20!=-1){
+_21=_19[0].length-_20-1;
+var _23=_19[0].substr(0,_20);
+_20=_23.lastIndexOf(",");
+if(_20!=-1){
+_22=_23.length-_20-1;
+}
+}
+var _24=[];
+for(var _25=_1b[0];_25;){
+var off=_25.length-_21;
+_24.push((off>0)?_25.substr(off):_25);
+_25=(off>0)?_25.slice(0,off):"";
+if(_22){
+_21=_22;
+delete _22;
+}
}
-
-dojo.number._parseInfo = function(/*Object?*/options){
- options = options || {};
- var locale = dojo.i18n.normalizeLocale(options.locale);
- var bundle = dojo.i18n.getLocalization("dojo.cldr", "number", locale);
- var pattern = options.pattern || bundle[(options.type || "decimal") + "Format"];
-//TODO: memoize?
- var group = bundle.group;
- var decimal = bundle.decimal;
- var factor = 1;
-
- if(pattern.indexOf('%') != -1){
- factor /= 100;
- }else if(pattern.indexOf('\u2030') != -1){
- factor /= 1000; // per mille
- }else{
- var isCurrency = pattern.indexOf('\u00a4') != -1;
- if(isCurrency){
- group = bundle.currencyGroup || group;
- decimal = bundle.currencyDecimal || decimal;
- }
- }
-
- //TODO: handle quoted escapes
- var patternList = pattern.split(';');
- if(patternList.length == 1){
- patternList.push("-" + patternList[0]);
- }
-
- var re = dojo.regexp.buildGroupRE(patternList, function(pattern){
- pattern = "(?:"+dojo.regexp.escapeString(pattern, '.')+")";
- return pattern.replace(dojo.number._numberPatternRE, function(format){
- var flags = {
- signed: false,
- separator: options.strict ? group : [group,""],
- fractional: options.fractional,
- decimal: decimal,
- exponent: false};
- var parts = format.split('.');
- var places = options.places;
- if(parts.length == 1 || places === 0){flags.fractional = false;}
- else{
- if(typeof places == "undefined"){ places = parts[1].lastIndexOf('0')+1; }
- if(places && options.fractional == undefined){flags.fractional = true;} // required fractional, unless otherwise specified
- if(!options.places && (places < parts[1].length)){ places += "," + parts[1].length; }
- flags.places = places;
- }
- var groups = parts[0].split(',');
- if(groups.length>1){
- flags.groupSize = groups.pop().length;
- if(groups.length>1){
- flags.groupSize2 = groups.pop().length;
- }
- }
- return "("+dojo.number._realNumberRegexp(flags)+")";
- });
- }, true);
-
- if(isCurrency){
- // substitute the currency symbol for the placeholder in the pattern
- re = re.replace(/(\s*)(\u00a4{1,3})(\s*)/g, function(match, before, target, after){
- var prop = ["symbol", "currency", "displayName"][target.length-1];
- var symbol = dojo.regexp.escapeString(options[prop] || options.currency || "");
- before = before ? "\\s" : "";
- after = after ? "\\s" : "";
- if(!options.strict){
- if(before){before += "*";}
- if(after){after += "*";}
- return "(?:"+before+symbol+after+")?";
- }
- return before+symbol+after;
- });
- }
-
-//TODO: substitute localized sign/percent/permille/etc.?
-
- // normalize whitespace and return
- return {regexp: re.replace(/[\xa0 ]/g, "[\\s\\xa0]"), group: group, decimal: decimal, factor: factor}; // Object
+_1b[0]=_24.reverse().join(_18.group||",");
+return _1b.join(_18.decimal||".");
+};
+dojo.number.regexp=function(_26){
+return dojo.number._parseInfo(_26).regexp;
+};
+dojo.number._parseInfo=function(_27){
+_27=_27||{};
+var _28=dojo.i18n.normalizeLocale(_27.locale);
+var _29=dojo.i18n.getLocalization("dojo.cldr","number",_28);
+var _2a=_27.pattern||_29[(_27.type||"decimal")+"Format"];
+var _2b=_29.group;
+var _2c=_29.decimal;
+var _2d=1;
+if(_2a.indexOf("%")!=-1){
+_2d/=100;
+}else{
+if(_2a.indexOf("‰")!=-1){
+_2d/=1000;
+}else{
+var _2e=_2a.indexOf("¤")!=-1;
+if(_2e){
+_2b=_29.currencyGroup||_2b;
+_2c=_29.currencyDecimal||_2c;
+}
+}
+}
+var _2f=_2a.split(";");
+if(_2f.length==1){
+_2f.push("-"+_2f[0]);
}
-
-/*=====
-dojo.number.__parseOptions = function(kwArgs){
- // pattern: String
- // override pattern with this string. Default is provided based on
- // locale.
- // type: String?
- // choose a format type based on the locale from the following:
- // decimal, scientific, percent, currency. decimal by default.
- // locale: String
- // override the locale used to determine formatting rules
- // strict: Boolean?
- // strict parsing, false by default
- // currency: Object
- // object with currency information
+var re=dojo.regexp.buildGroupRE(_2f,function(_30){
+_30="(?:"+dojo.regexp.escapeString(_30,".")+")";
+return _30.replace(dojo.number._numberPatternRE,function(_31){
+var _32={signed:false,separator:_27.strict?_2b:[_2b,""],fractional:_27.fractional,decimal:_2c,exponent:false};
+var _33=_31.split(".");
+var _34=_27.places;
+if(_33.length==1||_34===0){
+_32.fractional=false;
+}else{
+if(_34===undefined){
+_34=_27.pattern?_33[1].lastIndexOf("0")+1:Infinity;
+}
+if(_34&&_27.fractional==undefined){
+_32.fractional=true;
+}
+if(!_27.places&&(_34<_33[1].length)){
+_34+=","+_33[1].length;
+}
+_32.places=_34;
}
-=====*/
-dojo.number.parse = function(/*String*/expression, /*dojo.number.__parseOptions?*/options){
- // summary:
- // Convert a properly formatted string to a primitive Number, using
- // locale-specific settings.
- // description:
- // Create a Number from a string using a known localized pattern.
- // Formatting patterns are chosen appropriate to the locale.
- // Formatting patterns are implemented using the syntax described at
- // *URL*
- // expression:
- // A string representation of a Number
- var info = dojo.number._parseInfo(options);
- var results = (new RegExp("^"+info.regexp+"$")).exec(expression);
- if(!results){
- return NaN; //NaN
- }
- var absoluteMatch = results[1]; // match for the positive expression
- if(!results[1]){
- if(!results[2]){
- return NaN; //NaN
- }
- // matched the negative pattern
- absoluteMatch =results[2];
- info.factor *= -1;
- }
-
- // Transform it to something Javascript can parse as a number. Normalize
- // decimal point and strip out group separators or alternate forms of whitespace
- absoluteMatch = absoluteMatch.
- replace(new RegExp("["+info.group + "\\s\\xa0"+"]", "g"), "").
- replace(info.decimal, ".");
- // Adjust for negative sign, percent, etc. as necessary
- return Number(absoluteMatch) * info.factor; //Number
+var _35=_33[0].split(",");
+if(_35.length>1){
+_32.groupSize=_35.pop().length;
+if(_35.length>1){
+_32.groupSize2=_35.pop().length;
+}
+}
+return "("+dojo.number._realNumberRegexp(_32)+")";
+});
+},true);
+if(_2e){
+re=re.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(_36,_37,_38,_39){
+var _3a=["symbol","currency","displayName"][_38.length-1];
+var _3b=dojo.regexp.escapeString(_27[_3a]||_27.currency||"");
+_37=_37?"[\\s\\xa0]":"";
+_39=_39?"[\\s\\xa0]":"";
+if(!_27.strict){
+if(_37){
+_37+="*";
+}
+if(_39){
+_39+="*";
+}
+return "(?:"+_37+_3b+_39+")?";
+}
+return _37+_3b+_39;
+});
+}
+return {regexp:re.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:_2b,decimal:_2c,factor:_2d};
};
-
-/*=====
-dojo.number.__realNumberRegexpFlags = function(kwArgs){
- // places: Number?
- // The integer number of decimal places or a range given as "n,m". If
- // not given, the decimal part is optional and the number of places is
- // unlimited.
- // decimal: String?
- // A string for the character used as the decimal point. Default
- // is ".".
- // fractional: Boolean|Array?
- // Whether decimal places are allowed. Can be true, false, or [true,
- // false]. Default is [true, false]
- // exponent: Boolean|Array?
- // Express in exponential notation. Can be true, false, or [true,
- // false]. Default is [true, false], (i.e. will match if the
- // exponential part is present are not).
- // eSigned: Boolean|Array?
- // The leading plus-or-minus sign on the exponent. Can be true,
- // false, or [true, false]. Default is [true, false], (i.e. will
- // match if it is signed or unsigned). flags in regexp.integer can be
- // applied.
+dojo.number.parse=function(_3c,_3d){
+var _3e=dojo.number._parseInfo(_3d);
+var _3f=(new RegExp("^"+_3e.regexp+"$")).exec(_3c);
+if(!_3f){
+return NaN;
+}
+var _40=_3f[1];
+if(!_3f[1]){
+if(!_3f[2]){
+return NaN;
+}
+_40=_3f[2];
+_3e.factor*=-1;
+}
+_40=_40.replace(new RegExp("["+_3e.group+"\\s\\xa0"+"]","g"),"").replace(_3e.decimal,".");
+return _40*_3e.factor;
+};
+dojo.number._realNumberRegexp=function(_41){
+_41=_41||{};
+if(!("places" in _41)){
+_41.places=Infinity;
+}
+if(typeof _41.decimal!="string"){
+_41.decimal=".";
+}
+if(!("fractional" in _41)||/^0/.test(_41.places)){
+_41.fractional=[true,false];
+}
+if(!("exponent" in _41)){
+_41.exponent=[true,false];
+}
+if(!("eSigned" in _41)){
+_41.eSigned=[true,false];
+}
+var _42=dojo.number._integerRegexp(_41);
+var _43=dojo.regexp.buildGroupRE(_41.fractional,function(q){
+var re="";
+if(q&&(_41.places!==0)){
+re="\\"+_41.decimal;
+if(_41.places==Infinity){
+re="(?:"+re+"\\d+)?";
+}else{
+re+="\\d{"+_41.places+"}";
+}
}
-=====*/
-
-dojo.number._realNumberRegexp = function(/*dojo.number.__realNumberRegexpFlags?*/flags){
- // summary:
- // Builds a regular expression to match a real number in exponential
- // notation
- // flags:
- // An object
-
- // assign default values to missing paramters
- flags = flags || {};
- if(typeof flags.places == "undefined"){ flags.places = Infinity; }
- if(typeof flags.decimal != "string"){ flags.decimal = "."; }
- if(typeof flags.fractional == "undefined" || /^0/.test(flags.places)){ flags.fractional = [true, false]; }
- if(typeof flags.exponent == "undefined"){ flags.exponent = [true, false]; }
- if(typeof flags.eSigned == "undefined"){ flags.eSigned = [true, false]; }
-
- // integer RE
- var integerRE = dojo.number._integerRegexp(flags);
-
- // decimal RE
- var decimalRE = dojo.regexp.buildGroupRE(flags.fractional,
- function(q){
- var re = "";
- if(q && (flags.places!==0)){
- re = "\\" + flags.decimal;
- if(flags.places == Infinity){
- re = "(?:" + re + "\\d+)?";
- }else{
- re += "\\d{" + flags.places + "}";
- }
- }
- return re;
- },
- true
- );
-
- // exponent RE
- var exponentRE = dojo.regexp.buildGroupRE(flags.exponent,
- function(q){
- if(q){ return "([eE]" + dojo.number._integerRegexp({ signed: flags.eSigned}) + ")"; }
- return "";
- }
- );
-
- // real number RE
- var realRE = integerRE + decimalRE;
- // allow for decimals without integers, e.g. .25
- if(decimalRE){realRE = "(?:(?:"+ realRE + ")|(?:" + decimalRE + "))";}
- return realRE + exponentRE; // String
+return re;
+},true);
+var _44=dojo.regexp.buildGroupRE(_41.exponent,function(q){
+if(q){
+return "([eE]"+dojo.number._integerRegexp({signed:_41.eSigned})+")";
+}
+return "";
+});
+var _45=_42+_43;
+if(_43){
+_45="(?:(?:"+_45+")|(?:"+_43+"))";
+}
+return _45+_44;
};
-
-/*=====
-dojo.number.__integerRegexpFlags = function(kwArgs){
- // signed: Boolean?
- // The leading plus-or-minus sign. Can be true, false, or [true,
- // false]. Default is [true, false], (i.e. will match if it is signed
- // or unsigned).
- // separator: String?
- // The character used as the thousands separator. Default is no
- // separator. For more than one symbol use an array, e.g. [",", ""],
- // makes ',' optional.
- // groupSize: Number?
- // group size between separators
- // flags.groupSize2: Number?
- // second grouping (for India)
+dojo.number._integerRegexp=function(_46){
+_46=_46||{};
+if(!("signed" in _46)){
+_46.signed=[true,false];
+}
+if(!("separator" in _46)){
+_46.separator="";
+}else{
+if(!("groupSize" in _46)){
+_46.groupSize=3;
+}
+}
+var _47=dojo.regexp.buildGroupRE(_46.signed,function(q){
+return q?"[-+]":"";
+},true);
+var _48=dojo.regexp.buildGroupRE(_46.separator,function(sep){
+if(!sep){
+return "(?:\\d+)";
}
-=====*/
-
-dojo.number._integerRegexp = function(/*dojo.number.__integerRegexpFlags?*/flags){
- // summary:
- // Builds a regular expression that matches an integer
- // flags:
- // An object
-
- // assign default values to missing paramters
- flags = flags || {};
- if(typeof flags.signed == "undefined"){ flags.signed = [true, false]; }
- if(typeof flags.separator == "undefined"){
- flags.separator = "";
- }else if(typeof flags.groupSize == "undefined"){
- flags.groupSize = 3;
- }
- // build sign RE
- var signRE = dojo.regexp.buildGroupRE(flags.signed,
- function(q) { return q ? "[-+]" : ""; },
- true
- );
-
- // number RE
- var numberRE = dojo.regexp.buildGroupRE(flags.separator,
- function(sep){
- if(!sep){
- return "(?:0|[1-9]\\d*)";
- }
-
- sep = dojo.regexp.escapeString(sep);
- if(sep == " "){ sep = "\\s"; }
- else if(sep == "\xa0"){ sep = "\\s\\xa0"; }
-
- var grp = flags.groupSize, grp2 = flags.groupSize2;
- if(grp2){
- var grp2RE = "(?:0|[1-9]\\d{0," + (grp2-1) + "}(?:[" + sep + "]\\d{" + grp2 + "})*[" + sep + "]\\d{" + grp + "})";
- return ((grp-grp2) > 0) ? "(?:" + grp2RE + "|(?:0|[1-9]\\d{0," + (grp-1) + "}))" : grp2RE;
- }
- return "(?:0|[1-9]\\d{0," + (grp-1) + "}(?:[" + sep + "]\\d{" + grp + "})*)";
- },
- true
- );
-
- // integer RE
- return signRE + numberRE; // String
+sep=dojo.regexp.escapeString(sep);
+if(sep==" "){
+sep="\\s";
+}else{
+if(sep==" "){
+sep="\\s\\xa0";
+}
}
-
+var grp=_46.groupSize,_49=_46.groupSize2;
+if(_49){
+var _4a="(?:0|[1-9]\\d{0,"+(_49-1)+"}(?:["+sep+"]\\d{"+_49+"})*["+sep+"]\\d{"+grp+"})";
+return ((grp-_49)>0)?"(?:"+_4a+"|(?:0|[1-9]\\d{0,"+(grp-1)+"}))":_4a;
}
+return "(?:0|[1-9]\\d{0,"+(grp-1)+"}(?:["+sep+"]\\d{"+grp+"})*)";
+},true);
+return _47+_48;
+};
+}
diff --git a/js/dojo/dojo/parser.js b/js/dojo/dojo/parser.js
--- a/js/dojo/dojo/parser.js
+++ b/js/dojo/dojo/parser.js
@@ -1,272 +1,222 @@
-if(!dojo._hasResource["dojo.parser"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.parser"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo.parser"]){
+dojo._hasResource["dojo.parser"]=true;
dojo.provide("dojo.parser");
dojo.require("dojo.date.stamp");
-
-dojo.parser = new function(){
-
- var d = dojo;
-
- function val2type(/*Object*/ value){
- // summary:
- // Returns name of type of given value.
-
- if(d.isString(value)){ return "string"; }
- if(typeof value == "number"){ return "number"; }
- if(typeof value == "boolean"){ return "boolean"; }
- if(d.isFunction(value)){ return "function"; }
- if(d.isArray(value)){ return "array"; } // typeof [] == "object"
- if(value instanceof Date) { return "date"; } // assume timestamp
- if(value instanceof d._Url){ return "url"; }
- return "object";
- }
-
- function str2obj(/*String*/ value, /*String*/ type){
- // summary:
- // Convert given string value to given type
- switch(type){
- case "string":
- return value;
- case "number":
- return value.length ? Number(value) : NaN;
- case "boolean":
- // for checked/disabled value might be "" or "checked". interpret as true.
- return typeof value == "boolean" ? value : !(value.toLowerCase()=="false");
- case "function":
- if(d.isFunction(value)){
- // IE gives us a function, even when we say something like onClick="foo"
- // (in which case it gives us an invalid function "function(){ foo }").
- // Therefore, convert to string
- value=value.toString();
- value=d.trim(value.substring(value.indexOf('{')+1, value.length-1));
- }
- try{
- if(value.search(/[^\w\.]+/i) != -1){
- // TODO: "this" here won't work
- value = d.parser._nameAnonFunc(new Function(value), this);
- }
- return d.getObject(value, false);
- }catch(e){ return new Function(); }
- case "array":
- return value.split(/\s*,\s*/);
- case "date":
- switch(value){
- case "": return new Date(""); // the NaN of dates
- case "now": return new Date(); // current date
- default: return d.date.stamp.fromISOString(value);
- }
- case "url":
- return d.baseUrl + value;
- default:
- return d.fromJson(value);
- }
- }
-
- var instanceClasses = {
- // map from fully qualified name (like "dijit.Button") to structure like
- // { cls: dijit.Button, params: {label: "string", disabled: "boolean"} }
- };
-
- function getClassInfo(/*String*/ className){
- // className:
- // fully qualified name (like "dijit.Button")
- // returns:
- // structure like
- // {
- // cls: dijit.Button,
- // params: { label: "string", disabled: "boolean"}
- // }
-
- if(!instanceClasses[className]){
- // get pointer to widget class
- var cls = d.getObject(className);
- if(!d.isFunction(cls)){
- throw new Error("Could not load class '" + className +
- "'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");
- }
- var proto = cls.prototype;
-
- // get table of parameter names & types
- var params={};
- for(var name in proto){
- if(name.charAt(0)=="_"){ continue; } // skip internal properties
- var defVal = proto[name];
- params[name]=val2type(defVal);
- }
-
- instanceClasses[className] = { cls: cls, params: params };
- }
- return instanceClasses[className];
- }
-
- this._functionFromScript = function(script){
- var preamble = "";
- var suffix = "";
- var argsStr = script.getAttribute("args");
- if(argsStr){
- d.forEach(argsStr.split(/\s*,\s*/), function(part, idx){
- preamble += "var "+part+" = arguments["+idx+"]; ";
- });
- }
- var withStr = script.getAttribute("with");
- if(withStr && withStr.length){
- d.forEach(withStr.split(/\s*,\s*/), function(part){
- preamble += "with("+part+"){";
- suffix += "}";
- });
- }
- return new Function(preamble+script.innerHTML+suffix);
- }
-
- this.instantiate = function(/* Array */nodes){
- // summary:
- // Takes array of nodes, and turns them into class instances and
- // potentially calls a layout method to allow them to connect with
- // any children
- var thelist = [];
- d.forEach(nodes, function(node){
- if(!node){ return; }
- var type = node.getAttribute("dojoType");
- if((!type)||(!type.length)){ return; }
- var clsInfo = getClassInfo(type);
- var clazz = clsInfo.cls;
- var ps = clazz._noScript||clazz.prototype._noScript;
-
- // read parameters (ie, attributes).
- // clsInfo.params lists expected params like {"checked": "boolean", "n": "number"}
- var params = {};
- var attributes = node.attributes;
- for(var name in clsInfo.params){
- var item = attributes.getNamedItem(name);
- if(!item || (!item.specified && (!dojo.isIE || name.toLowerCase()!="value"))){ continue; }
- var value = item.value;
- // Deal with IE quirks for 'class' and 'style'
- switch(name){
- case "class":
- value = node.className;
- break;
- case "style":
- value = node.style && node.style.cssText; // FIXME: Opera?
- }
- var _type = clsInfo.params[name];
- params[name] = str2obj(value, _type);
- }
-
- // Process <script type="dojo/*"> script tags
- // <script type="dojo/method" event="foo"> tags are added to params, and passed to
- // the widget on instantiation.
- // <script type="dojo/method"> tags (with no event) are executed after instantiation
- // <script type="dojo/connect" event="foo"> tags are dojo.connected after instantiation
- if(!ps){
- var connects = [], // functions to connect after instantiation
- calls = []; // functions to call after instantiation
-
- d.query("> script[type^='dojo/']", node).orphan().forEach(function(script){
- var event = script.getAttribute("event"),
- type = script.getAttribute("type"),
- nf = d.parser._functionFromScript(script);
- if(event){
- if(type == "dojo/connect"){
- connects.push({event: event, func: nf});
- }else{
- params[event] = nf;
- }
- }else{
- calls.push(nf);
- }
- });
- }
-
- var markupFactory = clazz["markupFactory"];
- if(!markupFactory && clazz["prototype"]){
- markupFactory = clazz.prototype["markupFactory"];
- }
- // create the instance
- var instance = markupFactory ? markupFactory(params, node, clazz) : new clazz(params, node);
- thelist.push(instance);
-
- // map it to the JS namespace if that makes sense
- var jsname = node.getAttribute("jsId");
- if(jsname){
- d.setObject(jsname, instance);
- }
-
- // process connections and startup functions
- if(!ps){
- dojo.forEach(connects, function(connect){
- dojo.connect(instance, connect.event, null, connect.func);
- });
- dojo.forEach(calls, function(func){
- func.call(instance);
- });
- }
- });
-
- // Call startup on each top level instance if it makes sense (as for
- // widgets). Parent widgets will recursively call startup on their
- // (non-top level) children
- d.forEach(thelist, function(instance){
- if( instance &&
- (instance.startup) &&
- ((!instance.getParent) || (!instance.getParent()))
- ){
- instance.startup();
- }
- });
- return thelist;
- };
-
- this.parse = function(/*DomNode?*/ rootNode){
- // summary:
- // Search specified node (or root node) recursively for class instances,
- // and instantiate them Searches for
- // dojoType="qualified.class.name"
- var list = d.query('[dojoType]', rootNode);
- // go build the object instances
- var instances = this.instantiate(list);
- return instances;
- };
+dojo.parser=new function(){
+var d=dojo;
+this._attrName=d._scopeName+"Type";
+this._query="["+this._attrName+"]";
+function _1(_2){
+if(d.isString(_2)){
+return "string";
+}
+if(typeof _2=="number"){
+return "number";
+}
+if(typeof _2=="boolean"){
+return "boolean";
+}
+if(d.isFunction(_2)){
+return "function";
+}
+if(d.isArray(_2)){
+return "array";
+}
+if(_2 instanceof Date){
+return "date";
+}
+if(_2 instanceof d._Url){
+return "url";
+}
+return "object";
+};
+function _3(_4,_5){
+switch(_5){
+case "string":
+return _4;
+case "number":
+return _4.length?Number(_4):NaN;
+case "boolean":
+return typeof _4=="boolean"?_4:!(_4.toLowerCase()=="false");
+case "function":
+if(d.isFunction(_4)){
+_4=_4.toString();
+_4=d.trim(_4.substring(_4.indexOf("{")+1,_4.length-1));
+}
+try{
+if(_4.search(/[^\w\.]+/i)!=-1){
+return new Function(_4);
+}else{
+return d.getObject(_4,false);
+}
+}
+catch(e){
+return new Function();
+}
+case "array":
+return _4?_4.split(/\s*,\s*/):[];
+case "date":
+switch(_4){
+case "":
+return new Date("");
+case "now":
+return new Date();
+default:
+return d.date.stamp.fromISOString(_4);
+}
+case "url":
+return d.baseUrl+_4;
+default:
+return d.fromJson(_4);
+}
+};
+var _6={};
+dojo.connect(dojo,"extend",function(){
+_6={};
+});
+function _7(_8){
+if(!_6[_8]){
+var _9=d.getObject(_8);
+if(!d.isFunction(_9)){
+throw new Error("Could not load class '"+_8+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");
+}
+var _a=_9.prototype;
+var _b={},_c={};
+for(var _d in _a){
+if(_d.charAt(0)=="_"){
+continue;
+}
+if(_d in _c){
+continue;
+}
+var _e=_a[_d];
+_b[_d]=_1(_e);
+}
+_6[_8]={cls:_9,params:_b};
+}
+return _6[_8];
+};
+this._functionFromScript=function(_f){
+var _10="";
+var _11="";
+var _12=_f.getAttribute("args");
+if(_12){
+d.forEach(_12.split(/\s*,\s*/),function(_13,idx){
+_10+="var "+_13+" = arguments["+idx+"]; ";
+});
+}
+var _14=_f.getAttribute("with");
+if(_14&&_14.length){
+d.forEach(_14.split(/\s*,\s*/),function(_15){
+_10+="with("+_15+"){";
+_11+="}";
+});
+}
+return new Function(_10+_f.innerHTML+_11);
+};
+this.instantiate=function(_16,_17,_18){
+var _19=[],dp=dojo.parser;
+_17=_17||{};
+_18=_18||{};
+d.forEach(_16,function(_1a){
+if(!_1a){
+return;
+}
+var _1b=dp._attrName in _17?_17[dp._attrName]:_1a.getAttribute(dp._attrName);
+if(!_1b||!_1b.length){
+return;
+}
+var _1c=_7(_1b),_1d=_1c.cls,ps=_1d._noScript||_1d.prototype._noScript;
+var _1e={},_1f=_1a.attributes;
+for(var _20 in _1c.params){
+var _21=_20 in _17?{value:_17[_20],specified:true}:_1f.getNamedItem(_20);
+if(!_21||(!_21.specified&&(!dojo.isIE||_20.toLowerCase()!="value"))){
+continue;
+}
+var _22=_21.value;
+switch(_20){
+case "class":
+_22="className" in _17?_17.className:_1a.className;
+break;
+case "style":
+_22="style" in _17?_17.style:(_1a.style&&_1a.style.cssText);
+}
+var _23=_1c.params[_20];
+if(typeof _22=="string"){
+_1e[_20]=_3(_22,_23);
+}else{
+_1e[_20]=_22;
+}
+}
+if(!ps){
+var _24=[],_25=[];
+d.query("> script[type^='dojo/']",_1a).orphan().forEach(function(_26){
+var _27=_26.getAttribute("event"),_1b=_26.getAttribute("type"),nf=d.parser._functionFromScript(_26);
+if(_27){
+if(_1b=="dojo/connect"){
+_24.push({event:_27,func:nf});
+}else{
+_1e[_27]=nf;
+}
+}else{
+_25.push(nf);
+}
+});
+}
+var _28=_1d.markupFactory||_1d.prototype&&_1d.prototype.markupFactory;
+var _29=_28?_28(_1e,_1a,_1d):new _1d(_1e,_1a);
+_19.push(_29);
+var _2a=_1a.getAttribute("jsId");
+if(_2a){
+d.setObject(_2a,_29);
+}
+if(!ps){
+d.forEach(_24,function(_2b){
+d.connect(_29,_2b.event,null,_2b.func);
+});
+d.forEach(_25,function(_2c){
+_2c.call(_29);
+});
+}
+});
+if(!_17._started){
+d.forEach(_19,function(_2d){
+if(!_18.noStart&&_2d&&_2d.startup&&!_2d._started&&(!_2d.getParent||!_2d.getParent())){
+_2d.startup();
+}
+});
+}
+return _19;
+};
+this.parse=function(_2e,_2f){
+var _30;
+if(!_2f&&_2e&&_2e.rootNode){
+_2f=_2e;
+_30=_2f.rootNode;
+}else{
+_30=_2e;
+}
+var _31=d.query(this._query,_30);
+return this.instantiate(_31,null,_2f);
+};
}();
-
-//Register the parser callback. It should be the first callback
-//after the a11y test.
-
(function(){
- var parseRunner = function(){
- if(djConfig["parseOnLoad"] == true){
- dojo.parser.parse();
- }
- };
-
- // FIXME: need to clobber cross-dependency!!
- if(dojo.exists("dijit.wai.onload") && (dijit.wai.onload === dojo._loaders[0])){
- dojo._loaders.splice(1, 0, parseRunner);
- }else{
- dojo._loaders.unshift(parseRunner);
- }
+var _32=function(){
+if(dojo.config.parseOnLoad){
+dojo.parser.parse();
+}
+};
+if(dojo.exists("dijit.wai.onload")&&(dijit.wai.onload===dojo._loaders[0])){
+dojo._loaders.splice(1,0,_32);
+}else{
+dojo._loaders.unshift(_32);
+}
})();
-
-//TODO: ported from 0.4.x Dojo. Can we reduce this?
-dojo.parser._anonCtr = 0;
-dojo.parser._anon = {}; // why is this property required?
-dojo.parser._nameAnonFunc = function(/*Function*/anonFuncPtr, /*Object*/thisObj){
- // summary:
- // Creates a reference to anonFuncPtr in thisObj with a completely
- // unique name. The new name is returned as a String.
- var jpn = "$joinpoint";
- var nso = (thisObj|| dojo.parser._anon);
- if(dojo.isIE){
- var cn = anonFuncPtr["__dojoNameCache"];
- if(cn && nso[cn] === anonFuncPtr){
- return anonFuncPtr["__dojoNameCache"];
- }
- }
- var ret = "__"+dojo.parser._anonCtr++;
- while(typeof nso[ret] != "undefined"){
- ret = "__"+dojo.parser._anonCtr++;
- }
- nso[ret] = anonFuncPtr;
- return ret; // String
}
-
-}
diff --git a/js/dojo/dojo/regexp.js b/js/dojo/dojo/regexp.js
--- a/js/dojo/dojo/regexp.js
+++ b/js/dojo/dojo/regexp.js
@@ -1,63 +1,32 @@
-if(!dojo._hasResource["dojo.regexp"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.regexp"] = true;
-dojo.provide("dojo.regexp");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.regexp.escapeString = function(/*String*/str, /*String?*/except){
- // summary:
- // Adds escape sequences for special characters in regular expressions
- // except:
- // a String with special characters to be left unescaped
-
-// return str.replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm, "\\$1"); // string
- return str.replace(/([\.$?*!=:|{}\(\)\[\]\\\/^])/g, function(ch){
- if(except && except.indexOf(ch) != -1){
- return ch;
- }
- return "\\" + ch;
- }); // String
-}
-dojo.regexp.buildGroupRE = function(/*Object|Array*/arr, /*Function*/re, /*Boolean?*/nonCapture){
- // summary:
- // Builds a regular expression that groups subexpressions
- // description:
- // A utility function used by some of the RE generators. The
- // subexpressions are constructed by the function, re, in the second
- // parameter. re builds one subexpression for each elem in the array
- // a, in the first parameter. Returns a string for a regular
- // expression that groups all the subexpressions.
- // arr:
- // A single value or an array of values.
- // re:
- // A function. Takes one parameter and converts it to a regular
- // expression.
- // nonCapture:
- // If true, uses non-capturing match, otherwise matches are retained
- // by regular expression. Defaults to false
-
- // case 1: a is a single value.
- if(!(arr instanceof Array)){
- return re(arr); // String
- }
-
- // case 2: a is an array
- var b = [];
- for(var i = 0; i < arr.length; i++){
- // convert each elem to a RE
- b.push(re(arr[i]));
- }
-
- // join the REs as alternatives in a RE group.
- return dojo.regexp.group(b.join("|"), nonCapture); // String
+if(!dojo._hasResource["dojo.regexp"]){
+dojo._hasResource["dojo.regexp"]=true;
+dojo.provide("dojo.regexp");
+dojo.regexp.escapeString=function(_1,_2){
+return _1.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(ch){
+if(_2&&_2.indexOf(ch)!=-1){
+return ch;
}
-
-dojo.regexp.group = function(/*String*/expression, /*Boolean?*/nonCapture){
- // summary:
- // adds group match to expression
- // nonCapture:
- // If true, uses non-capturing match, otherwise matches are retained
- // by regular expression.
- return "(" + (nonCapture ? "?:":"") + expression + ")"; // String
+return "\\"+ch;
+});
+};
+dojo.regexp.buildGroupRE=function(_3,re,_4){
+if(!(_3 instanceof Array)){
+return re(_3);
}
-
+var b=[];
+for(var i=0;i<_3.length;i++){
+b.push(re(_3[i]));
}
+return dojo.regexp.group(b.join("|"),_4);
+};
+dojo.regexp.group=function(_5,_6){
+return "("+(_6?"?:":"")+_5+")";
+};
+}
diff --git a/js/dojo/dojo/resources/blank.html b/js/dojo/dojo/resources/blank.html
--- a/js/dojo/dojo/resources/blank.html
+++ b/js/dojo/dojo/resources/blank.html
@@ -1,1 +1,1 @@
-<html><head></head><body></body></html>
+<html><head><script>isLoaded = true;</script></head><body></body></html>
diff --git a/js/dojo/dojo/resources/dnd.css b/js/dojo/dojo/resources/dnd.css
--- a/js/dojo/dojo/resources/dnd.css
+++ b/js/dojo/dojo/resources/dnd.css
@@ -1,9 +1,14 @@
-/* DnD avatar-specific settings */
+
.dojoDndAvatar {font-size: 75%; color: black;}
.dojoDndAvatarHeader td {padding-left: 20px; padding-right: 4px;}
.dojoDndAvatarHeader {background: #ccc;}
.dojoDndAvatarItem {background: #eee;}
.dojoDndMove .dojoDndAvatarHeader {background-image: url(images/dndNoMove.png); background-repeat: no-repeat;}
.dojoDndCopy .dojoDndAvatarHeader {background-image: url(images/dndNoCopy.png); background-repeat: no-repeat;}
.dojoDndMove .dojoDndAvatarCanDrop .dojoDndAvatarHeader {background-image: url(images/dndMove.png); background-repeat: no-repeat;}
.dojoDndCopy .dojoDndAvatarCanDrop .dojoDndAvatarHeader {background-image: url(images/dndCopy.png); background-repeat: no-repeat;}
+.dojoDndHandle {cursor: move;}
+.dojoDndIgnore {cursor: default;}
+.dijit_a11y .dojoDndAvatar { font-size: 1em; font-weight:bold;}
+.dijit_a11y .dojoDndAvatarHeader td {padding-left:2px !important;}
+.dijit_a11y .dojoDndAvatarHeader td span {padding-right: 5px;}
diff --git a/js/dojo/dojo/resources/dojo.css b/js/dojo/dojo/resources/dojo.css
--- a/js/dojo/dojo/resources/dojo.css
+++ b/js/dojo/dojo/resources/dojo.css
@@ -1,198 +1,99 @@
-/*
- dojo.css
- Baseline CSS file for general usage.
-
- This file is intended to be a "quick and dirty" stylesheet you can use to give
- a straight-up web page some basic styling without having to do the dirty work
- yourself. It includes a modified version of YUI's reset.css (we pulled some
- of the list reset definitions, among other things), and then provides some very
- basic style rules to be applied to general HTML elements.
-
- This stylesheet is NOT intended to serve as the foundation for more complex things--
- including the use of a TABLE for layout purposes. The table definitions in this
- file make the assumption that you will be using tables for thier declared purpose:
- displaying tabular data.
-
- If you are looking for a baseline stylesheet using tables for grid layout, you will
- need to supply your own layout rules to override the ones in this stylesheet.
-
- Applications using Dojo will function correctly without including this
- file, but it should provide sane defaults for many common things that page
- authors often need to set up manually.
-
- The Dojo Core uses this stylesheet to quickly style HTML-based tests and demos. Feel
- free to use it as you will.
-*/
-
-/*****************************************************************************************/
-
-/*
- The below are borrowed from YUI's reset style sheets for pages and fonts.
- We've verified w/ the YUI development team that these are entirely
- copyright Yahoo, written entirely by Nate Koechley and Matt Sweeney without
- external contributions.
-
- Copyright (c) 2007, Yahoo! Inc. All rights reserved.
- Code licensed under the BSD License:
- http://developer.yahoo.net/yui/license.txt
- version: 2.2.1
-*/
body, div, dl, dt, dd, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td {
margin: 0;
padding: 0;
}
-
fieldset, img {
border: 0 none;
}
-
address, caption, cite, code, dfn, th, var {
font-style: normal;
font-weight: normal;
}
-
caption, th {
text-align: left;
}
-
q:before, q:after {
content:"";
}
-
abbr, acronym {
border:0;
}
-/* End YUI imported code. */
-
-/*****************************************************************************************/
-
-/*
- Begin Dojo additions.
-
- Style definitions, based loosely on the Dijit Tundra theme.
- Relative unit calculations based on "Compose to a Vertical Rhythm",
- by Richard Rutter (http://24ways.org/2006/compose-to-a-vertical-rhythm)
-
- If changing the font size, make sure you do it in both
- percent and px (% for IE, px for everything else).
- % value based on default size of 16px (in most browsers).
- So if you want the default size to be 14px, set the
- % to 87% (14 / 16 = 0.875).
-
- Typical values:
- 10px: 62.5%
- 11px: 69% (68.75)
- 12px: 75%
- 13px: 81.25%
- 14px: 87.5%
- 16px: 100%
-
- Default: 13px, specified by the YUI imports.
-*/
body {
- font: 13px Myriad,Arial,Helvetica,clean,sans-serif;
- *font-size: small;
- *font: x-small;
+ font: 12px Myriad,Helvetica,Tahoma,Arial,clean,sans-serif;
+ *font-size: 75%;
}
-
-/* Headings */
h1 {
font-size: 1.5em;
font-weight: normal;
line-height: 1em;
margin-top: 1em;
margin-bottom:0;
}
-
h2 {
font-size: 1.1667em;
font-weight: bold;
line-height: 1.286em;
margin-top: 1.929em;
margin-bottom:0.643em;
}
-
h3, h4, h5, h6 {
font-size: 1em;
font-weight: bold;
line-height: 1.5em;
margin-top: 1.5em;
margin-bottom: 0;
}
-
-/* paragraphs, quotes and lists */
p {
font-size: 1em;
margin-top: 1.5em;
margin-bottom: 1.5em;
line-height: 1.5em;
}
-
blockquote {
font-size: 0.916em;
margin-top: 3.272em;
margin-bottom: 3.272em;
line-height: 1.636em;
padding: 1.636em;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}
-
ol li, ul li {
font-size: 1em;
line-height: 1.5em;
margin: 0;
}
-
-/* pre and code */
pre, code {
font-size:115%;
*font-size:100%;
font-family: Courier, "Courier New";
background-color: #efefef;
border: 1px solid #ccc;
}
-
pre {
border-width: 1px 0;
padding: 1.5em;
}
-
-/*
- Tables
-
- Note that these table definitions make the assumption that you are using tables
- to display tabular data, and NOT using tables as layout mechanisms. If you are
- using tables for layout, you will probably want to override these rules with
- more specific ones.
-
- These definitions make tabular data look presentable, particularly when presented
- inline with paragraphs.
-*/
table { font-size:100%; }
-
table.dojoTabular {
border-collapse: collapse;
border-spacing: 0;
border: 1px solid #ccc;
margin: 0 1.5em;
}
-
.dojoTabular th {
text-align: center;
font-weight: bold;
}
-
table.dojoTabular thead, table.dojoTabular tfoot {
background-color: #efefef;
border: 1px solid #ccc;
border-width: 1px 0;
}
-
table.dojoTabular thead tr th,
table.dojoTabular thead tr td,
table.dojoTabular tbody tr td,
table.dojoTabular tfoot tr td {
padding: 0.25em 0.5em;
}
diff --git a/js/dojo/dojo/resources/iframe_history.html b/js/dojo/dojo/resources/iframe_history.html
--- a/js/dojo/dojo/resources/iframe_history.html
+++ b/js/dojo/dojo/resources/iframe_history.html
@@ -1,79 +1,44 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
// <!--
var noInit = false;
-
- function defineParams(sparams){
- if(sparams){
- var ss = (sparams.indexOf("&amp;") >= 0) ? "&amp;" : "&";
- sparams = sparams.split(ss);
- for(var x=0; x<sparams.length; x++){
- var tp = sparams[x].split("=");
- if(typeof window[tp[0]] != "undefined"){
- window[tp[0]] = ((tp[1]=="true")||(tp[1]=="false")) ? eval(tp[1]) : tp[1];
- }
- }
- }
- }
-
+
function init(){
- // parse the query string if there is one to try to get params that
- // we can act on. Also allow params to be in a fragment identifier.
- var query = null;
- var frag = null;
- var url = document.location.href;
- var hashIndex = url.indexOf("#");
-
- //Extract fragment identifier
- if(hashIndex != -1){
- frag = url.substring(hashIndex + 1, url.length);
- url = url.substring(0, hashIndex);
- }
-
- //Extract querystring
- var parts = url.split("?");
- if(parts.length == 2){
- query = parts[1];
- }
-
- defineParams(query);
- defineParams(frag);
-
if(noInit){ return; }
var hasParentDojo = false;
try{
hasParentDojo = window.parent != window && window.parent["dojo"];
}catch(e){
alert("Initializing iframe_history.html failed. If you are using a cross-domain Dojo build,"
+ " please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl"
+ " to the path on your domain to iframe_history.html");
throw e;
}
if(hasParentDojo){
//Set the page title so IE history shows up with a somewhat correct name.
document.title = window.parent.document.title;
//Notify parent that we are loaded.
var pdj = window.parent.dojo;
if(pdj["back"]){
pdj.back._iframeLoaded(null, window.location);
}
}
}
// -->
</script>
</head>
<body onload="try{ init(); }catch(e){ alert(e); }">
<h4>The Dojo Toolkit -- iframe_history.html</h4>
<p>This file is used in Dojo's back/fwd button management.</p>
</body>
</html>
diff --git a/js/dojo/dojo/resources/images/dndNoCopy.png b/js/dojo/dojo/resources/images/dndNoCopy.png
index 87f3aa0d544d937aca0d0971ca6473536067f8d2..998c2f2692201457b3c310e24b13e834b5b9c4c9
GIT binary patch
literal 1332
zc%02s`A^e#82)^FU@4^*nX?B)22-)hHY1uXa{&$Nn8SUGBs$G^C=+$=@K_CwWR5J^
z5?2xAD3ntK%26l<N`V$=ffib5DJ`Wyp+!InQWQZ@z#i-Vi@nL4H&62X@;=9X`1DC%
zJQWWB@Qwa5D%NvJ|1Ay;02I%NP<jA`b^ILb%#ACoq)WFG!O_b%5)y-=f4+1zF*fni
z<=<|p6ORCZ2JqK$$K7ss69Ai=n_>V&05k(20iXc@lS<WvMz;W<@%L9_v9`E#<0_RH
z`OffRh*hQP^CNXYP$hu4Fx&`$7=<#DNCqNthRGZz`HArOW;|Z(<z)^C)P{wLVP**g
z)#7~2dqRz*ZKmMhd>F2z(S;ORFV>4oqv^xLXBc4;U!oF&;UWm1vA^0IZ}cV39XupM
zp$cG_k03%URt`ZN1d(B}Z2;Jran?^iGlT>eBFJdyUI73C3?`38v(N(T0VwnK?m(f2
zh@^2c)k33Zd-&hPW_VtMnK=m3x&>EH31|gCN~Q7u7}`n_VK5V6AN|8%n91aBG<t@y
zU*=7e0?-aYdLP2X7e}U|qszU$)mX103Pt<=b`i|9h9BzlC61_6e8xW8!Nc=6e^HZ2
z?NnMd00x3@1%ha{;3g<EApjQoPA!3`qf$8(ikVDZxSOO8q>CVo6lN;0UOGHpPY<xr
zgNkVZN*^C1$uE_`upB$ugTcs9kjEW1oBiOygVfa2hYug7rKP2(r$2i1C?g{yGcz+Q
zD=RxYo5SJc<mBY$=5o2*yu7^p{QQD~g2KYWqN1YW;^N1TAD5JrJbCh@w6wIWtgO7e
zoX6u;R8&+}R#sJ2RaaN@`TUxin%df0fk04KS0@w->+9<q8X6iK8$}{fQ&W>zEN*UY
zZfR+0ZEclEBvPrgt*x!Sy}hHOLnf2S<?_zX&aSSm?(S}dLZMVDdwP0$dwW$Xm0GRt
z>+9?9@7HKFTCH|qU_htS4Gs?K^?HNBFf=q|G#ZD8hfOBa$jHd(=;+wknAvO|A0MBX
zn6OwZR;zV#a`NfZr&Ci?)6>&4Gc(VgJ)51Kwb^WQb93|a^Ut3@UszbM+wF^si!WZh
zc=__>($dnaSFe_rmseI+UcY|5y1Kfyw)W=Do40S@uCK3eY;1UP{_fp7hr{7?I$bW8
zN8Z5Tk5fE_VY6aSpK<?h2K?2%eaTbjgV9k(<L;Uh=5JqxT@Wdf5P%SFnE<4aFMm~$
zSHiEl?-!IpmWa?2GK=pHJrMpo|H|di8`rO+aY26zRJpvHPE9;P8`Bo?$0Ymv#8AWL
z?%ee~IouNa*{~3wUoY&41P54mzTG9g$+~mEF`b(E<H9w20<Owc80X~dV}Br+wT?tM
zVzLR$!dnqCd-%pDEy<25e@D-?fkBhnJT|5<C<kYC%C5y#zE6-m#pc+iZPxx!y^@i`
zbYsKoPGy~~kVpjgYXy??dUFlCQ+_tjJ)5?3`15<t<jzUOg8X8f$@t!gYg3n&bcY@j
zqq#?*?mCh@9Ph^AUCzCg{=Ef#@*Vx9!c(wJZ9WgfDXl46=NHAvhiyFG!0r<#IO6!o
l3n`K5vY4`%%y^Q*3*@i;lt4~Ghj?5C(Z^3m365R-^Iude>S6!@
diff --git a/js/dojo/dojo/resources/images/dndNoMove.png b/js/dojo/dojo/resources/images/dndNoMove.png
index d75ed860ad1b1b7bd0ad9627369d733c8d04cb10..e909173e0df652ae3585c6f9e5024749761bfc60
GIT binary patch
literal 991
zc%17D@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!WQl7;NpOBzNqJ&XDuZK6ep0G}
zXKrG8YEWuoN@d~6R2v2c#w!6nA+G=b|3AXOaEyWBC<DVv28RFt{vBdqcp@(ObIFQd
zzkVHNV7S4-af_Sx$D-vwfBbkLEd1xspF<KV_l1P!`1w7Tkzb{ww?azhftc8@^_x~|
z>D)eX;zLXK#<;kx%E~vncuq1fy!Z4uz`$_t<jFS{HkVjft{*!#QA_J<blj$ZfX{wG
z>-hMtpE$8FCgv&|>%xG5v#RP(q@>R%D9)9XoEIIvJs|M+uU{`iLgz9tJd2FHz{`6_
zPX0@A<yCf$U2<ywe*b<fD*iYrc?|=@o#V%!np<4Z(0nW|`D^3WU)y#bu(f^U;<|yE
z`7STtc~jFX?CekE6ecn-?2=P|p`>z`U*Msz@IzbMZK|rbxVX+TF|CS=yT!$QT2^fW
z1H+FcD;|qV{9L*ArIG1#d8IoiPu>z1zAGraGB$RJq|`(SiAzpSvtwi5B&8f@V0a;?
zaK+vIrFYPeimLq#40{+Dz66Ed*VdU89leo_>%5lM@8c)msB0`@U|20BdrLs@A`8pM
zl(g%|k6$}>?2LxSGa31A4UHpAOdDci9_r}c6A(NhA@R}8>lP31Q5M!+Mn($)0?sfo
z-sI#w#3y`DK;V(G$|VE)NBSlgG|kqsvTqLx-VzkNh=J)82ghj<(a91LzzALM63Gor
z1anG){DS`vUcj(FJzg5<&Yzwxjv*Ddl4kI-_?_L>)Wm4yrC@gW&CNM#!j+%7Os}q0
z_ZMa0oZ;oQy<5dZ<9f>U=UrS3tR^wMNso>H-ne=5?M-#x*=H3*kKWIJX5$#+vBI>&
zeuw@<MOVc&M>n5X<<+OYY5H<y%cg}!2Azy75se4VwMF+VJYwC#$QH3WbeXZw!)*>6
zUs`4xFL`A(#dF8*qelx03O*Q}ls1(3J*}#x>}1x)1_tHLe9f!GlcTHr_VSA>D~l^n
zPS!n~llaWfxpw-@GiT1^oXM$jnEuIB%gE5k?Cge=<fP!oER}u!JDPO6J2m$=ES)X<
r=Jw6aue&ZU`kS7b(R_n}k&S^j&{;=*MaU~)ATW5k`njxgN@xNA@^tnL
diff --git a/js/dojo/dojo/rpc/JsonService.js b/js/dojo/dojo/rpc/JsonService.js
--- a/js/dojo/dojo/rpc/JsonService.js
+++ b/js/dojo/dojo/rpc/JsonService.js
@@ -1,83 +1,37 @@
-if(!dojo._hasResource["dojo.rpc.JsonService"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.rpc.JsonService"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo.rpc.JsonService"]){
+dojo._hasResource["dojo.rpc.JsonService"]=true;
dojo.provide("dojo.rpc.JsonService");
dojo.require("dojo.rpc.RpcService");
-
-dojo.declare("dojo.rpc.JsonService", dojo.rpc.RpcService, {
- bustCache: false,
- contentType: "application/json-rpc",
- lastSubmissionId: 0,
-
- callRemote: function(method, params){
- // summary:
- // call an arbitrary remote method without requiring it to be
- // predefined with SMD
- // method: string
- // the name of the remote method you want to call.
- // params: array
- // array of parameters to pass to method
-
- var deferred = new dojo.Deferred();
- this.bind(method, params, deferred);
- return deferred;
- },
-
- bind: function(method, parameters, deferredRequestHandler, url){
- //summary:
- // JSON-RPC bind method. Takes remote method, parameters,
- // deferred, and a url, calls createRequest to make a JSON-RPC
- // envelope and passes that off with bind.
- // method: string
- // The name of the method we are calling
- // parameters: array
- // The parameters we are passing off to the method
- // deferredRequestHandler: deferred
- // The Deferred object for this particular request
-
- var def = dojo.rawXhrPost({
- url: url||this.serviceUrl,
- postData: this.createRequest(method, parameters),
- contentType: this.contentType,
- timeout: this.timeout,
- handleAs: "json-comment-optional"
- });
- def.addCallbacks(this.resultCallback(deferredRequestHandler), this.errorCallback(deferredRequestHandler));
- },
-
- createRequest: function(method, params){
- // summary:
- // create a JSON-RPC envelope for the request
- // method: string
- // The name of the method we are creating the requst for
- // params: array
- // The array of parameters for this request;
-
- var req = { "params": params, "method": method, "id": ++this.lastSubmissionId };
- var data = dojo.toJson(req);
- return data;
- },
-
- parseResults: function(/*anything*/obj){
- //summary:
- // parse the result envelope and pass the results back to
- // the callback function
- // obj: Object
- // Object containing envelope of data we recieve from the server
-
- if(dojo.isObject(obj)){
- if("result" in obj){
- return obj.result;
- }
- if("Result" in obj){
- return obj.Result;
- }
- if("ResultSet" in obj){
- return obj.ResultSet;
- }
- }
- return obj;
- }
- }
-);
-
+dojo.declare("dojo.rpc.JsonService",dojo.rpc.RpcService,{bustCache:false,contentType:"application/json-rpc",lastSubmissionId:0,callRemote:function(_1,_2){
+var _3=new dojo.Deferred();
+this.bind(_1,_2,_3);
+return _3;
+},bind:function(_4,_5,_6,_7){
+var _8=dojo.rawXhrPost({url:_7||this.serviceUrl,postData:this.createRequest(_4,_5),contentType:this.contentType,timeout:this.timeout,handleAs:"json-comment-optional"});
+_8.addCallbacks(this.resultCallback(_6),this.errorCallback(_6));
+},createRequest:function(_9,_a){
+var _b={"params":_a,"method":_9,"id":++this.lastSubmissionId};
+var _c=dojo.toJson(_b);
+return _c;
+},parseResults:function(_d){
+if(dojo.isObject(_d)){
+if("result" in _d){
+return _d.result;
}
+if("Result" in _d){
+return _d.Result;
+}
+if("ResultSet" in _d){
+return _d.ResultSet;
+}
+}
+return _d;
+}});
+}
diff --git a/js/dojo/dojo/rpc/JsonpService.js b/js/dojo/dojo/rpc/JsonpService.js
--- a/js/dojo/dojo/rpc/JsonpService.js
+++ b/js/dojo/dojo/rpc/JsonpService.js
@@ -1,65 +1,32 @@
-if(!dojo._hasResource["dojo.rpc.JsonpService"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.rpc.JsonpService"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojo.rpc.JsonpService"]){
+dojo._hasResource["dojo.rpc.JsonpService"]=true;
dojo.provide("dojo.rpc.JsonpService");
dojo.require("dojo.rpc.RpcService");
dojo.require("dojo.io.script");
-
-dojo.declare("dojo.rpc.JsonpService", dojo.rpc.RpcService, {
- // summary:
- // Generic JSONP service. Minimally extends RpcService to allow
- // easy definition of nearly any JSONP style service. Example
- // SMD files exist in dojox.data
-
- constructor: function(args, requiredArgs){
- if(this.required) {
- if(requiredArgs){
- dojo.mixin(this.required, requiredArgs);
- }
-
- dojo.forEach(this.required, function(req){
- if(req=="" || req==undefined){
- throw new Error("Required Service Argument not found: "+req);
- }
- });
- }
- },
-
- strictArgChecks: false,
-
- bind: function(method, parameters, deferredRequestHandler, url){
- //summary:
- // JSONP bind method. Takes remote method, parameters,
- // deferred, and a url, calls createRequest to make a JSON-RPC
- // envelope and passes that off with bind.
- // method: string
- // The name of the method we are calling
- // parameters: array
- // The parameters we are passing off to the method
- // deferredRequestHandler: deferred
- // The Deferred object for this particular request
-
- var def = dojo.io.script.get({
- url: url||this.serviceUrl,
- callbackParamName: this.callbackParamName||"callback",
- content: this.createRequest(parameters),
- timeout: this.timeout,
- handleAs: "json",
- preventCache: true
- });
- def.addCallbacks(this.resultCallback(deferredRequestHandler), this.errorCallback(deferredRequestHandler));
- },
-
- createRequest: function(parameters){
- // summary:
- // create a JSONP req
- // params: array
- // The array of parameters for this request;
-
- var params = (dojo.isArrayLike(parameters) && parameters.length==1) ?
- parameters[0] : {};
- dojo.mixin(params,this.required);
- return params;
- }
+dojo.declare("dojo.rpc.JsonpService",dojo.rpc.RpcService,{constructor:function(_1,_2){
+if(this.required){
+if(_2){
+dojo.mixin(this.required,_2);
+}
+dojo.forEach(this.required,function(_3){
+if(_3==""||_3==undefined){
+throw new Error("Required Service Argument not found: "+_3);
+}
});
-
}
+},strictArgChecks:false,bind:function(_4,_5,_6,_7){
+var _8=dojo.io.script.get({url:_7||this.serviceUrl,callbackParamName:this.callbackParamName||"callback",content:this.createRequest(_5),timeout:this.timeout,handleAs:"json",preventCache:true});
+_8.addCallbacks(this.resultCallback(_6),this.errorCallback(_6));
+},createRequest:function(_9){
+var _a=(dojo.isArrayLike(_9)&&_9.length==1)?_9[0]:{};
+dojo.mixin(_a,this.required);
+return _a;
+}});
+}
diff --git a/js/dojo/dojo/rpc/RpcService.js b/js/dojo/dojo/rpc/RpcService.js
--- a/js/dojo/dojo/rpc/RpcService.js
+++ b/js/dojo/dojo/rpc/RpcService.js
@@ -1,172 +1,89 @@
-if(!dojo._hasResource["dojo.rpc.RpcService"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.rpc.RpcService"] = true;
-dojo.provide("dojo.rpc.RpcService");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.declare("dojo.rpc.RpcService", null, {
- constructor: function(args){
- //summary:
- //Take a string as a url to retrieve an smd or an object that is an smd or partial smd to use
- //as a definition for the service
- //
- // args: object
- // Takes a number of properties as kwArgs for defining the service. It also
- // accepts a string. When passed a string, it is treated as a url from
- // which it should synchronously retrieve an smd file. Otherwise it is a kwArgs
- // object. It accepts serviceUrl, to manually define a url for the rpc service
- // allowing the rpc system to be used without an smd definition. strictArgChecks
- // forces the system to verify that the # of arguments provided in a call
- // matches those defined in the smd. smdString allows a developer to pass
- // a jsonString directly, which will be converted into an object or alternatively
- // smdObject is accepts an smdObject directly.
- //
- if(args){
- //if the arg is a string, we assume it is a url to retrieve an smd definition from
- if( (dojo.isString(args)) || (args instanceof dojo._Url)){
- if (args instanceof dojo._Url){
- var url = args + "";
- }else{
- url = args;
- }
- var def = dojo.xhrGet({
- url: url,
- handleAs: "json-comment-optional",
- sync: true
- });
-
- def.addCallback(this, "processSmd");
- def.addErrback(function() {
- throw new Error("Unable to load SMD from " + args);
- });
-
- }else if(args.smdStr){
- this.processSmd(dojo.eval("("+args.smdStr+")"));
- }else{
- // otherwise we assume it's an arguments object with the following
- // (optional) properties:
- // - serviceUrl
- // - strictArgChecks
- // - smdStr
- // - smdObj
-
- if(args.serviceUrl){
- this.serviceUrl = args.serviceUrl;
- }
-
- this.timeout = args.timeout || 3000;
-
- if("strictArgChecks" in args){
- this.strictArgChecks = args.strictArgChecks;
- }
-
- this.processSmd(args);
- }
- }
- },
-
- strictArgChecks: true,
- serviceUrl: "",
-
- parseResults: function(obj){
- // summary
- // parse the results coming back from an rpc request. this
- // base implementation, just returns the full object
- // subclasses should parse and only return the actual results
- // obj: Object
- // Object that is the return results from an rpc request
- return obj;
- },
- errorCallback: function(/* dojo.Deferred */ deferredRequestHandler){
- // summary:
- // create callback that calls the Deferres errback method
- // deferredRequestHandler: Deferred
- // The deferred object handling a request.
- return function(data){
- deferredRequestHandler.errback(new Error(data.message));
- };
- },
-
- resultCallback: function(/* dojo.Deferred */ deferredRequestHandler){
- // summary:
- // create callback that calls the Deferred's callback method
- // deferredRequestHandler: Deferred
- // The deferred object handling a request.
-
- var tf = dojo.hitch(this,
- function(obj){
- if(obj.error!=null){
- var err;
- if(typeof obj.error == 'object'){
- err = new Error(obj.error.message);
- err.code = obj.error.code;
- err.error = obj.error.error;
- }else{
- err = new Error(obj.error);
- }
- err.id = obj.id;
- err.errorObject = obj;
- deferredRequestHandler.errback(err);
- }else{
- deferredRequestHandler.callback(this.parseResults(obj));
- }
- }
- );
- return tf;
- },
-
- generateMethod: function(/*string*/ method, /*array*/ parameters, /*string*/ url){
- // summary:
- // generate the local bind methods for the remote object
- // method: string
- // The name of the method we are generating
- // parameters: array
- // the array of parameters for this call.
- // url: string
- // the service url for this call
-
- return dojo.hitch(this, function(){
- var deferredRequestHandler = new dojo.Deferred();
-
- // if params weren't specified, then we can assume it's varargs
- if( (this.strictArgChecks) &&
- (parameters != null) &&
- (arguments.length != parameters.length)
- ){
- // put error stuff here, no enough params
- throw new Error("Invalid number of parameters for remote method.");
- }else{
- this.bind(method, dojo._toArray(arguments), deferredRequestHandler, url);
- }
-
- return deferredRequestHandler;
- });
- },
-
- processSmd: function(object){
- // summary:
- // callback method for reciept of a smd object. Parse the smd
- // and generate functions based on the description
- // object:
- // smd object defining this service.
-
- if(object.methods){
- dojo.forEach(object.methods, function(m){
- if(m && m.name){
- this[m.name] = this.generateMethod( m.name,
- m.parameters,
- m.url||m.serviceUrl||m.serviceURL);
- if(!dojo.isFunction(this[m.name])){
- throw new Error("RpcService: Failed to create" + m.name + "()");
- /*console.debug("RpcService: Failed to create", m.name, "()");*/
- }
- }
- }, this);
- }
-
- this.serviceUrl = object.serviceUrl||object.serviceURL;
- this.required = object.required;
- this.smd = object;
- }
+if(!dojo._hasResource["dojo.rpc.RpcService"]){
+dojo._hasResource["dojo.rpc.RpcService"]=true;
+dojo.provide("dojo.rpc.RpcService");
+dojo.declare("dojo.rpc.RpcService",null,{constructor:function(_1){
+if(_1){
+if((dojo.isString(_1))||(_1 instanceof dojo._Url)){
+if(_1 instanceof dojo._Url){
+var _2=_1+"";
+}else{
+_2=_1;
+}
+var _3=dojo.xhrGet({url:_2,handleAs:"json-comment-optional",sync:true});
+_3.addCallback(this,"processSmd");
+_3.addErrback(function(){
+throw new Error("Unable to load SMD from "+_1);
});
-
+}else{
+if(_1.smdStr){
+this.processSmd(dojo.eval("("+_1.smdStr+")"));
+}else{
+if(_1.serviceUrl){
+this.serviceUrl=_1.serviceUrl;
+}
+this.timeout=_1.timeout||3000;
+if("strictArgChecks" in _1){
+this.strictArgChecks=_1.strictArgChecks;
+}
+this.processSmd(_1);
+}
+}
+}
+},strictArgChecks:true,serviceUrl:"",parseResults:function(_4){
+return _4;
+},errorCallback:function(_5){
+return function(_6){
+_5.errback(_6.message);
+};
+},resultCallback:function(_7){
+var tf=dojo.hitch(this,function(_8){
+if(_8.error!=null){
+var _9;
+if(typeof _8.error=="object"){
+_9=new Error(_8.error.message);
+_9.code=_8.error.code;
+_9.error=_8.error.error;
+}else{
+_9=new Error(_8.error);
}
+_9.id=_8.id;
+_9.errorObject=_8;
+_7.errback(_9);
+}else{
+_7.callback(this.parseResults(_8));
+}
+});
+return tf;
+},generateMethod:function(_a,_b,_c){
+return dojo.hitch(this,function(){
+var _d=new dojo.Deferred();
+if((this.strictArgChecks)&&(_b!=null)&&(arguments.length!=_b.length)){
+throw new Error("Invalid number of parameters for remote method.");
+}else{
+this.bind(_a,dojo._toArray(arguments),_d,_c);
+}
+return _d;
+});
+},processSmd:function(_e){
+if(_e.methods){
+dojo.forEach(_e.methods,function(m){
+if(m&&m.name){
+this[m.name]=this.generateMethod(m.name,m.parameters,m.url||m.serviceUrl||m.serviceURL);
+if(!dojo.isFunction(this[m.name])){
+throw new Error("RpcService: Failed to create"+m.name+"()");
+}
+}
+},this);
+}
+this.serviceUrl=_e.serviceUrl||_e.serviceURL;
+this.required=_e.required;
+this.smd=_e;
+}});
+}
diff --git a/js/dojo/dojo/string.js b/js/dojo/dojo/string.js
--- a/js/dojo/dojo/string.js
+++ b/js/dojo/dojo/string.js
@@ -1,79 +1,57 @@
-if(!dojo._hasResource["dojo.string"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.string"] = true;
-dojo.provide("dojo.string");
-
-dojo.string.pad = function(/*String*/text, /*int*/size, /*String?*/ch, /*boolean?*/end){
- // summary:
- // Pad a string to guarantee that it is at least 'size' length by
- // filling with the character 'c' at either the start or end of the
- // string. Pads at the start, by default.
- // text: the string to pad
- // size: length to provide padding
- // ch: character to pad, defaults to '0'
- // end: adds padding at the end if true, otherwise pads at start
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- var out = String(text);
- if(!ch){
- ch = '0';
- }
- while(out.length < size){
- if(end){
- out += ch;
- }else{
- out = ch + out;
- }
- }
- return out; // String
-};
-dojo.string.substitute = function( /*String*/template,
- /*Object or Array*/map,
- /*Function?*/transform,
- /*Object?*/thisObject){
- // summary:
- // Performs parameterized substitutions on a string. Throws an
- // exception if any parameter is unmatched.
- // description:
- // For example,
- // | dojo.string.substitute("File '${0}' is not found in directory '${1}'.",["foo.html","/temp"]);
- // | dojo.string.substitute("File '${name}' is not found in directory '${info.dir}'.",{name: "foo.html", info: {dir: "/temp"}});
- // both return
- // "File 'foo.html' is not found in directory '/temp'."
- // template:
- // a string with expressions in the form ${key} to be replaced or
- // ${key:format} which specifies a format function. NOTE syntax has
- // changed from %{key}
- // map: where to look for substitutions
- // transform:
- // a function to process all parameters before substitution takes
- // place, e.g. dojo.string.encodeXML
- // thisObject:
- // where to look for optional format function; default to the global
- // namespace
-
- return template.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g, function(match, key, format){
- var value = dojo.getObject(key,false,map);
- if(format){ value = dojo.getObject(format,false,thisObject)(value);}
- if(transform){ value = transform(value, key); }
- return value.toString();
- }); // string
+if(!dojo._hasResource["dojo.string"]){
+dojo._hasResource["dojo.string"]=true;
+dojo.provide("dojo.string");
+dojo.string.rep=function(_1,_2){
+if(_2<=0||!_1){
+return "";
+}
+var _3=[];
+for(;;){
+if(_2&1){
+_3.push(_1);
+}
+if(!(_2>>=1)){
+break;
+}
+_1+=_1;
+}
+return _3.join("");
};
-
-dojo.string.trim = function(/*String*/ str){
- // summary: trims whitespaces from both sides of the string
- // description:
- // This version of trim() was taken from Steven Levithan's blog:
- // http://blog.stevenlevithan.com/archives/faster-trim-javascript.
- // The short yet good-performing version of this function is
- // dojo.trim(), which is part of the base.
- str = str.replace(/^\s+/, '');
- for(var i = str.length - 1; i > 0; i--){
- if(/\S/.test(str.charAt(i))){
- str = str.substring(0, i + 1);
- break;
- }
- }
- return str; // String
+dojo.string.pad=function(_4,_5,ch,_6){
+if(!ch){
+ch="0";
+}
+var _7=String(_4),_8=dojo.string.rep(ch,Math.ceil((_5-_7.length)/ch.length));
+return _6?_7+_8:_8+_7;
+};
+dojo.string.substitute=function(_9,_a,_b,_c){
+_c=_c||dojo.global;
+_b=_b?dojo.hitch(_c,_b):function(v){
+return v;
};
-
+return _9.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_d,_e,_f){
+var _10=dojo.getObject(_e,false,_a);
+if(_f){
+_10=dojo.getObject(_f,false,_c).call(_c,_10,_e);
}
+return _b(_10,_e).toString();
+});
+};
+dojo.string.trim=String.prototype.trim?dojo.trim:function(str){
+str=str.replace(/^\s+/,"");
+for(var i=str.length-1;i>=0;i--){
+if(/\S/.test(str.charAt(i))){
+str=str.substring(0,i+1);
+break;
+}
+}
+return str;
+};
+}
diff --git a/js/dojo/dojox/LICENSE b/js/dojo/dojox/LICENSE
--- a/js/dojo/dojox/LICENSE
+++ b/js/dojo/dojox/LICENSE
@@ -1,195 +1,195 @@
-Dojo is availble under *either* the terms of the modified BSD license *or* the
+Dojo is available under *either* the terms of the modified BSD license *or* the
Academic Free License version 2.1. As a recipient of Dojo, you may choose which
license to receive this code under (except as noted in per-module LICENSE
files). Some modules may not be the copyright of the Dojo Foundation. These
modules contain explicit declarations of copyright in both the LICENSE files in
the directories in which they reside and in the code itself. No external
contributions are allowed under licenses which are fundamentally incompatible
with the AFL or BSD licenses that Dojo is distributed under.
The text of the AFL and BSD licenses is reproduced below.
-------------------------------------------------------------------------------
The "New" BSD License:
**********************
-Copyright (c) 2005-2007, The Dojo Foundation
+Copyright (c) 2005-2009, The Dojo Foundation
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the Dojo Foundation nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-------------------------------------------------------------------------------
The Academic Free License, v. 2.1:
**********************************
This Academic Free License (the "License") applies to any original work of
authorship (the "Original Work") whose owner (the "Licensor") has placed the
following notice immediately following the copyright notice for the Original
Work:
Licensed under the Academic Free License version 2.1
1) Grant of Copyright License. Licensor hereby grants You a world-wide,
royalty-free, non-exclusive, perpetual, sublicenseable license to do the
following:
a) to reproduce the Original Work in copies;
b) to prepare derivative works ("Derivative Works") based upon the Original
Work;
c) to distribute copies of the Original Work and Derivative Works to the
public;
d) to perform the Original Work publicly; and
e) to display the Original Work publicly.
2) Grant of Patent License. Licensor hereby grants You a world-wide,
royalty-free, non-exclusive, perpetual, sublicenseable license, under patent
claims owned or controlled by the Licensor that are embodied in the Original
Work as furnished by the Licensor, to make, use, sell and offer for sale the
Original Work and Derivative Works.
3) Grant of Source Code License. The term "Source Code" means the preferred
form of the Original Work for making modifications to it and all available
documentation describing how to modify the Original Work. Licensor hereby
agrees to provide a machine-readable copy of the Source Code of the Original
Work along with each copy of the Original Work that Licensor distributes.
Licensor reserves the right to satisfy this obligation by placing a
machine-readable copy of the Source Code in an information repository
reasonably calculated to permit inexpensive and convenient access by You for as
long as Licensor continues to distribute the Original Work, and by publishing
the address of that information repository in a notice immediately following
the copyright notice that applies to the Original Work.
4) Exclusions From License Grant. Neither the names of Licensor, nor the names
of any contributors to the Original Work, nor any of their trademarks or
service marks, may be used to endorse or promote products derived from this
Original Work without express prior written permission of the Licensor. Nothing
in this License shall be deemed to grant any rights to trademarks, copyrights,
patents, trade secrets or any other intellectual property of Licensor except as
expressly stated herein. No patent license is granted to make, use, sell or
offer to sell embodiments of any patent claims other than the licensed claims
defined in Section 2. No right is granted to the trademarks of Licensor even if
such marks are included in the Original Work. Nothing in this License shall be
interpreted to prohibit Licensor from licensing under different terms from this
License any Original Work that Licensor otherwise would have a right to
license.
5) This section intentionally omitted.
6) Attribution Rights. You must retain, in the Source Code of any Derivative
Works that You create, all copyright, patent or trademark notices from the
Source Code of the Original Work, as well as any notices of licensing and any
descriptive text identified therein as an "Attribution Notice." You must cause
the Source Code for any Derivative Works that You create to carry a prominent
Attribution Notice reasonably calculated to inform recipients that You have
modified the Original Work.
7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that
the copyright in and to the Original Work and the patent rights granted herein
by Licensor are owned by the Licensor or are sublicensed to You under the terms
of this License with the permission of the contributor(s) of those copyrights
and patent rights. Except as expressly stated in the immediately proceeding
sentence, the Original Work is provided under this License on an "AS IS" BASIS
and WITHOUT WARRANTY, either express or implied, including, without limitation,
the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU.
This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No
license to Original Work is granted hereunder except under this disclaimer.
8) Limitation of Liability. Under no circumstances and under no legal theory,
whether in tort (including negligence), contract, or otherwise, shall the
Licensor be liable to any person for any direct, indirect, special, incidental,
or consequential damages of any character arising as a result of this License
or the use of the Original Work including, without limitation, damages for loss
of goodwill, work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses. This limitation of liability shall not
apply to liability for death or personal injury resulting from Licensor's
negligence to the extent applicable law prohibits such limitation. Some
jurisdictions do not allow the exclusion or limitation of incidental or
consequential damages, so this exclusion and limitation may not apply to You.
9) Acceptance and Termination. If You distribute copies of the Original Work or
a Derivative Work, You must make a reasonable effort under the circumstances to
obtain the express assent of recipients to the terms of this License. Nothing
else but this License (or another written agreement between Licensor and You)
grants You permission to create Derivative Works based upon the Original Work
or to exercise any of the rights granted in Section 1 herein, and any attempt
to do so except under the terms of this License (or another written agreement
between Licensor and You) is expressly prohibited by U.S. copyright law, the
equivalent laws of other countries, and by international treaty. Therefore, by
exercising any of the rights granted to You in Section 1 herein, You indicate
Your acceptance of this License and all of its terms and conditions.
10) Termination for Patent Action. This License shall terminate automatically
and You may no longer exercise any of the rights granted to You by this License
as of the date You commence an action, including a cross-claim or counterclaim,
against Licensor or any licensee alleging that the Original Work infringes a
patent. This termination provision shall not apply for an action alleging
patent infringement by combinations of the Original Work with other software or
hardware.
11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this
License may be brought only in the courts of a jurisdiction wherein the
Licensor resides or in which Licensor conducts its primary business, and under
the laws of that jurisdiction excluding its conflict-of-law provisions. The
application of the United Nations Convention on Contracts for the International
Sale of Goods is expressly excluded. Any use of the Original Work outside the
scope of this License or after its termination shall be subject to the
requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et
seq., the equivalent laws of other countries, and international treaty. This
section shall survive the termination of this License.
12) Attorneys Fees. In any action to enforce the terms of this License or
seeking damages relating thereto, the prevailing party shall be entitled to
recover its costs and expenses, including, without limitation, reasonable
attorneys' fees and costs incurred in connection with such action, including
any appeal of such action. This section shall survive the termination of this
License.
13) Miscellaneous. This License represents the complete agreement concerning
the subject matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent necessary to
make it enforceable.
14) Definition of "You" in This License. "You" throughout this License, whether
in upper or lower case, means an individual or a legal entity exercising rights
under, and complying with all of the terms of, this License. For legal
entities, "You" includes any entity that controls, is controlled by, or is
under common control with you. For purposes of this definition, "control" means
(i) the power, direct or indirect, to cause the direction or management of such
entity, whether by contract or otherwise, or (ii) ownership of fifty percent
(50%) or more of the outstanding shares, or (iii) beneficial ownership of such
entity.
15) Right to Use. You may use the Original Work in all ways not otherwise
restricted or conditioned by this License or by law, and Licensor promises not
to interfere with or be responsible for such uses by You.
This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved.
Permission is hereby granted to copy and distribute this license without
modification. This license may not be modified without the express written
permission of its copyright owner.
diff --git a/js/dojo/dojox/charting/Chart2D.js b/js/dojo/dojox/charting/Chart2D.js
--- a/js/dojo/dojox/charting/Chart2D.js
+++ b/js/dojo/dojox/charting/Chart2D.js
@@ -1,339 +1,375 @@
-if(!dojo._hasResource["dojox.charting.Chart2D"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.Chart2D"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.Chart2D"]){
+dojo._hasResource["dojox.charting.Chart2D"]=true;
dojo.provide("dojox.charting.Chart2D");
-
dojo.require("dojox.gfx");
dojo.require("dojox.lang.functional");
-
+dojo.require("dojox.lang.functional.fold");
+dojo.require("dojox.lang.functional.reversed");
dojo.require("dojox.charting.Theme");
dojo.require("dojox.charting.Series");
-
dojo.require("dojox.charting.axis2d.Default");
-
dojo.require("dojox.charting.plot2d.Default");
dojo.require("dojox.charting.plot2d.Lines");
dojo.require("dojox.charting.plot2d.Areas");
dojo.require("dojox.charting.plot2d.Markers");
dojo.require("dojox.charting.plot2d.MarkersOnly");
dojo.require("dojox.charting.plot2d.Scatter");
dojo.require("dojox.charting.plot2d.Stacked");
dojo.require("dojox.charting.plot2d.StackedLines");
dojo.require("dojox.charting.plot2d.StackedAreas");
dojo.require("dojox.charting.plot2d.Columns");
dojo.require("dojox.charting.plot2d.StackedColumns");
dojo.require("dojox.charting.plot2d.ClusteredColumns");
dojo.require("dojox.charting.plot2d.Bars");
dojo.require("dojox.charting.plot2d.StackedBars");
dojo.require("dojox.charting.plot2d.ClusteredBars");
dojo.require("dojox.charting.plot2d.Grid");
dojo.require("dojox.charting.plot2d.Pie");
-
+dojo.require("dojox.charting.plot2d.Bubble");
+dojo.require("dojox.charting.plot2d.Candlesticks");
+dojo.require("dojox.charting.plot2d.OHLC");
(function(){
- var df = dojox.lang.functional, dc = dojox.charting,
- clear = df.lambda("item.clear()"),
- purge = df.lambda("item.purgeGroup()"),
- destroy = df.lambda("item.destroy()"),
- makeClean = df.lambda("item.dirty = false"),
- makeDirty = df.lambda("item.dirty = true");
-
- dojo.declare("dojox.charting.Chart2D", null, {
- constructor: function(node, kwArgs){
- // initialize parameters
- if(!kwArgs){ kwArgs = {}; }
- this.margins = kwArgs.margins ? kwArgs.margins : {l: 10, t: 10, r: 10, b: 10};
- this.stroke = kwArgs.stroke;
- this.fill = kwArgs.fill;
-
- // default initialization
- this.theme = null;
- this.axes = {}; // map of axes
- this.stack = []; // stack of plotters
- this.plots = {}; // map of plotter indices
- this.series = []; // stack of data runs
- this.runs = {}; // map of data run indices
- this.dirty = true;
- this.coords = null;
-
- // create a surface
- this.node = dojo.byId(node);
- var box = dojo.marginBox(node);
- this.surface = dojox.gfx.createSurface(this.node, box.w, box.h);
- },
- destroy: function(){
- dojo.forEach(this.series, destroy);
- dojo.forEach(this.stack, destroy);
- df.forIn(this.axes, destroy);
- },
- getCoords: function(){
- if(!this.coords){
- this.coords = dojo.coords(this.node, true);
- }
- return this.coords;
- },
- setTheme: function(theme){
- this.theme = theme;
- this.dirty = true;
- return this;
- },
- addAxis: function(name, kwArgs){
- var axis;
- if(!kwArgs || !("type" in kwArgs)){
- axis = new dc.axis2d.Default(this, kwArgs);
- }else{
- axis = typeof kwArgs.type == "string" ?
- new dc.axis2d[kwArgs.type](this, kwArgs) :
- new kwArgs.type(this, kwArgs);
- }
- axis.name = name;
- axis.dirty = true;
- if(name in this.axes){
- this.axes[name].destroy();
- }
- this.axes[name] = axis;
- this.dirty = true;
- return this;
- },
- addPlot: function(name, kwArgs){
- var plot;
- if(!kwArgs || !("type" in kwArgs)){
- plot = new dc.plot2d.Default(this, kwArgs);
- }else{
- plot = typeof kwArgs.type == "string" ?
- new dc.plot2d[kwArgs.type](this, kwArgs) :
- new kwArgs.type(this, kwArgs);
- }
- plot.name = name;
- plot.dirty = true;
- if(name in this.plots){
- this.stack[this.plots[name]].destroy();
- this.stack[this.plots[name]] = plot;
- }else{
- this.plots[name] = this.stack.length;
- this.stack.push(plot);
- }
- this.dirty = true;
- return this;
- },
- addSeries: function(name, data, kwArgs){
- var run = new dc.Series(this, data, kwArgs);
- if(name in this.runs){
- this.series[this.runs[name]].destroy();
- this.series[this.runs[name]] = run;
- }else{
- this.runs[name] = this.series.length;
- this.series.push(run);
- }
- this.dirty = true;
- // fix min/max
- if(!("ymin" in run) && "min" in run){ run.ymin = run.min; }
- if(!("ymax" in run) && "max" in run){ run.ymax = run.max; }
- return this;
- },
- updateSeries: function(name, data){
- if(name in this.runs){
- var run = this.series[this.runs[name]],
- plot = this.stack[this.plots[run.plot]], axis;
- run.data = data;
- run.dirty = true;
- // check to see if axes and plot should be updated
- if(plot.hAxis){
- axis = this.axes[plot.hAxis];
- if(axis.dependOnData()){
- axis.dirty = true;
- // find all plots and mark them dirty
- dojo.forEach(this.stack, function(p){
- if(p.hAxis && p.hAxis == plot.hAxis){
- p.dirty = true;
- }
- });
- }
- }else{
- plot.dirty = true;
- }
- if(plot.vAxis){
- axis = this.axes[plot.vAxis];
- if(axis.dependOnData()){
- axis.dirty = true;
- // find all plots and mark them dirty
- dojo.forEach(this.stack, function(p){
- if(p.vAxis && p.vAxis == plot.vAxis){
- p.dirty = true;
- }
- });
- }
- }else{
- plot.dirty = true;
- }
- }
- return this;
- },
- resize: function(width, height){
- var box;
- switch(arguments.length){
- case 0:
- box = dojo.marginBox(this.node);
- break;
- case 1:
- box = width;
- break;
- default:
- box = {w: width, h: height};
- break;
- }
- dojo.marginBox(this.node, box);
- this.surface.setDimensions(box.w, box.h);
- this.dirty = true;
- this.coords = null;
- return this.render();
- },
- render: function(){
- if(this.dirty){
- return this.fullRender();
- }
-
- // calculate geometry
- dojo.forEach(this.stack, function(plot){
- if(plot.dirty || (plot.hAxis && this.axes[plot.hAxis].dirty) ||
- (plot.vAxis && this.axes[plot.vAxis].dirty)){
- plot.calculateAxes(this.plotArea);
- }
- }, this);
-
- // go over the stack backwards
- df.forEachReversed(this.stack, function(plot){ plot.render(this.dim, this.offsets); }, this);
-
- // go over axes
- df.forIn(this.axes, function(axis){ axis.render(this.dim, this.offsets); }, this);
-
- this._makeClean();
-
- // BEGIN FOR HTML CANVAS
- if(this.surface.render){ this.surface.render(); };
- // END FOR HTML CANVAS
-
- return this;
- },
- fullRender: function(){
- this._makeDirty();
-
- // clear old values
- dojo.forEach(this.stack, clear);
- dojo.forEach(this.series, purge);
- df.forIn(this.axes, purge);
- dojo.forEach(this.stack, purge);
- this.surface.clear();
-
- // rebuild new connections, and add defaults
-
- // assign series
- dojo.forEach(this.series, function(run){
- if(!(run.plot in this.plots)){
- var plot = new dc.plot2d.Default(this, {});
- plot.name = run.plot;
- this.plots[run.plot] = this.stack.length;
- this.stack.push(plot);
- }
- this.stack[this.plots[run.plot]].addSeries(run);
- }, this);
- // assign axes
- dojo.forEach(this.stack, function(plot){
- if(plot.hAxis){
- plot.setAxis(this.axes[plot.hAxis]);
- }
- if(plot.vAxis){
- plot.setAxis(this.axes[plot.vAxis]);
- }
- }, this);
- // set up a theme
- if(!this.theme){
- this.theme = new dojox.charting.Theme(dojox.charting._def);
- }
- var requiredColors = df.foldl(this.stack, "z + plot.getRequiredColors()", 0);
- this.theme.defineColors({num: requiredColors, cache: false});
-
- // calculate geometry
-
- // 1st pass
- var dim = this.dim = this.surface.getDimensions();
- dim.width = dojox.gfx.normalizedLength(dim.width);
- dim.height = dojox.gfx.normalizedLength(dim.height);
- df.forIn(this.axes, clear);
- dojo.forEach(this.stack, function(plot){ plot.calculateAxes(dim); });
-
- // assumption: we don't have stacked axes yet
- var offsets = this.offsets = {l: 0, r: 0, t: 0, b: 0};
- df.forIn(this.axes, function(axis){
- df.forIn(axis.getOffsets(), function(o, i){ offsets[i] += o; });
- });
- // add margins
- df.forIn(this.margins, function(o, i){ offsets[i] += o; });
-
- // 2nd pass with realistic dimensions
- this.plotArea = {width: dim.width - offsets.l - offsets.r, height: dim.height - offsets.t - offsets.b};
- df.forIn(this.axes, clear);
- dojo.forEach(this.stack, function(plot){ plot.calculateAxes(this.plotArea); }, this);
-
- // generate shapes
-
- // draw a chart background
- var t = this.theme,
- fill = this.fill ? this.fill : (t.chart && t.chart.fill),
- stroke = this.stroke ? this.stroke : (t.chart && t.chart.stroke);
- if(fill){
- this.surface.createRect({
- width: dim.width,
- height: dim.height
- }).setFill(fill);
- }
- if(stroke){
- this.surface.createRect({
- width: dim.width - 1,
- height: dim.height - 1
- }).setStroke(stroke);
- }
- // draw a plot background
- fill = t.plotarea && t.plotarea.fill;
- stroke = t.plotarea && t.plotarea.stroke;
- if(fill){
- this.surface.createRect({
- x: offsets.l, y: offsets.t,
- width: dim.width - offsets.l - offsets.r,
- height: dim.height - offsets.t - offsets.b
- }).setFill(fill);
- }
- if(stroke){
- this.surface.createRect({
- x: offsets.l, y: offsets.t,
- width: dim.width - offsets.l - offsets.r - 1,
- height: dim.height - offsets.t - offsets.b - 1
- }).setStroke(stroke);
- }
-
- // go over the stack backwards
- df.foldr(this.stack, function(z, plot){ return plot.render(dim, offsets), 0; }, 0);
-
- // go over axes
- df.forIn(this.axes, function(axis){ axis.render(dim, offsets); });
-
- this._makeClean();
-
- return this;
- },
- _makeClean: function(){
- // reset dirty flags
- dojo.forEach(this.axes, makeClean);
- dojo.forEach(this.stack, makeClean);
- dojo.forEach(this.series, makeClean);
- this.dirty = false;
- },
- _makeDirty: function(){
- // reset dirty flags
- dojo.forEach(this.axes, makeDirty);
- dojo.forEach(this.stack, makeDirty);
- dojo.forEach(this.series, makeDirty);
- this.dirty = true;
- }
- });
+var df=dojox.lang.functional,dc=dojox.charting,_1=df.lambda("item.clear()"),_2=df.lambda("item.purgeGroup()"),_3=df.lambda("item.destroy()"),_4=df.lambda("item.dirty = false"),_5=df.lambda("item.dirty = true");
+dojo.declare("dojox.charting.Chart2D",null,{constructor:function(_6,_7){
+if(!_7){
+_7={};
+}
+this.margins=_7.margins?_7.margins:{l:10,t:10,r:10,b:10};
+this.stroke=_7.stroke;
+this.fill=_7.fill;
+this.theme=null;
+this.axes={};
+this.stack=[];
+this.plots={};
+this.series=[];
+this.runs={};
+this.dirty=true;
+this.coords=null;
+this.node=dojo.byId(_6);
+var _8=dojo.marginBox(_6);
+this.surface=dojox.gfx.createSurface(this.node,_8.w,_8.h);
+},destroy:function(){
+dojo.forEach(this.series,_3);
+dojo.forEach(this.stack,_3);
+df.forIn(this.axes,_3);
+this.surface.destroy();
+},getCoords:function(){
+if(!this.coords){
+this.coords=dojo.coords(this.node,true);
+}
+return this.coords;
+},setTheme:function(_9){
+this.theme=_9._clone();
+this.dirty=true;
+return this;
+},addAxis:function(_a,_b){
+var _c;
+if(!_b||!("type" in _b)){
+_c=new dc.axis2d.Default(this,_b);
+}else{
+_c=typeof _b.type=="string"?new dc.axis2d[_b.type](this,_b):new _b.type(this,_b);
+}
+_c.name=_a;
+_c.dirty=true;
+if(_a in this.axes){
+this.axes[_a].destroy();
+}
+this.axes[_a]=_c;
+this.dirty=true;
+return this;
+},getAxis:function(_d){
+return this.axes[_d];
+},removeAxis:function(_e){
+if(_e in this.axes){
+this.axes[_e].destroy();
+delete this.axes[_e];
+this.dirty=true;
+}
+return this;
+},addPlot:function(_f,_10){
+var _11;
+if(!_10||!("type" in _10)){
+_11=new dc.plot2d.Default(this,_10);
+}else{
+_11=typeof _10.type=="string"?new dc.plot2d[_10.type](this,_10):new _10.type(this,_10);
+}
+_11.name=_f;
+_11.dirty=true;
+if(_f in this.plots){
+this.stack[this.plots[_f]].destroy();
+this.stack[this.plots[_f]]=_11;
+}else{
+this.plots[_f]=this.stack.length;
+this.stack.push(_11);
+}
+this.dirty=true;
+return this;
+},removePlot:function(_12){
+if(_12 in this.plots){
+var _13=this.plots[_12];
+delete this.plots[_12];
+this.stack[_13].destroy();
+this.stack.splice(_13,1);
+df.forIn(this.plots,function(idx,_14,_15){
+if(idx>_13){
+_15[_14]=idx-1;
+}
+});
+this.dirty=true;
+}
+return this;
+},addSeries:function(_16,_17,_18){
+var run=new dc.Series(this,_17,_18);
+if(_16 in this.runs){
+this.series[this.runs[_16]].destroy();
+this.series[this.runs[_16]]=run;
+}else{
+this.runs[_16]=this.series.length;
+this.series.push(run);
+}
+run.name=_16;
+this.dirty=true;
+if(!("ymin" in run)&&"min" in run){
+run.ymin=run.min;
+}
+if(!("ymax" in run)&&"max" in run){
+run.ymax=run.max;
+}
+return this;
+},removeSeries:function(_19){
+if(_19 in this.runs){
+var _1a=this.runs[_19],_1b=this.series[_1a].plot;
+delete this.runs[_19];
+this.series[_1a].destroy();
+this.series.splice(_1a,1);
+df.forIn(this.runs,function(idx,_1c,_1d){
+if(idx>_1a){
+_1d[_1c]=idx-1;
+}
+});
+this.dirty=true;
+}
+return this;
+},updateSeries:function(_1e,_1f){
+if(_1e in this.runs){
+var run=this.series[this.runs[_1e]];
+run.data=_1f;
+run.dirty=true;
+this._invalidateDependentPlots(run.plot,false);
+this._invalidateDependentPlots(run.plot,true);
+}
+return this;
+},resize:function(_20,_21){
+var box;
+switch(arguments.length){
+case 0:
+box=dojo.marginBox(this.node);
+break;
+case 1:
+box=_20;
+break;
+default:
+box={w:_20,h:_21};
+break;
+}
+dojo.marginBox(this.node,box);
+this.surface.setDimensions(box.w,box.h);
+this.dirty=true;
+this.coords=null;
+return this.render();
+},getGeometry:function(){
+var ret={};
+df.forIn(this.axes,function(_22){
+if(_22.initialized()){
+ret[_22.name]={name:_22.name,vertical:_22.vertical,scaler:_22.scaler,ticks:_22.ticks};
+}
+});
+return ret;
+},setAxisWindow:function(_23,_24,_25){
+var _26=this.axes[_23];
+if(_26){
+_26.setWindow(_24,_25);
+}
+return this;
+},setWindow:function(sx,sy,dx,dy){
+if(!("plotArea" in this)){
+this.calculateGeometry();
+}
+df.forIn(this.axes,function(_27){
+var _28,_29,_2a=_27.getScaler().bounds,s=_2a.span/(_2a.upper-_2a.lower);
+if(_27.vertical){
+_28=sy;
+_29=dy/s/_28;
+}else{
+_28=sx;
+_29=dx/s/_28;
+}
+_27.setWindow(_28,_29);
+});
+return this;
+},calculateGeometry:function(){
+if(this.dirty){
+return this.fullGeometry();
+}
+dojo.forEach(this.stack,function(_2b){
+if(_2b.dirty||(_2b.hAxis&&this.axes[_2b.hAxis].dirty)||(_2b.vAxis&&this.axes[_2b.vAxis].dirty)){
+_2b.calculateAxes(this.plotArea);
+}
+},this);
+return this;
+},fullGeometry:function(){
+this._makeDirty();
+dojo.forEach(this.stack,_1);
+if(!this.theme){
+this.setTheme(new dojox.charting.Theme(dojox.charting._def));
+}
+dojo.forEach(this.series,function(run){
+if(!(run.plot in this.plots)){
+var _2c=new dc.plot2d.Default(this,{});
+_2c.name=run.plot;
+this.plots[run.plot]=this.stack.length;
+this.stack.push(_2c);
+}
+this.stack[this.plots[run.plot]].addSeries(run);
+},this);
+dojo.forEach(this.stack,function(_2d){
+if(_2d.hAxis){
+_2d.setAxis(this.axes[_2d.hAxis]);
+}
+if(_2d.vAxis){
+_2d.setAxis(this.axes[_2d.vAxis]);
+}
+},this);
+var dim=this.dim=this.surface.getDimensions();
+dim.width=dojox.gfx.normalizedLength(dim.width);
+dim.height=dojox.gfx.normalizedLength(dim.height);
+df.forIn(this.axes,_1);
+dojo.forEach(this.stack,function(p){
+p.calculateAxes(dim);
+});
+var _2e=this.offsets={l:0,r:0,t:0,b:0};
+df.forIn(this.axes,function(_2f){
+df.forIn(_2f.getOffsets(),function(o,i){
+_2e[i]+=o;
+});
+});
+df.forIn(this.margins,function(o,i){
+_2e[i]+=o;
+});
+this.plotArea={width:dim.width-_2e.l-_2e.r,height:dim.height-_2e.t-_2e.b};
+df.forIn(this.axes,_1);
+dojo.forEach(this.stack,function(_30){
+_30.calculateAxes(this.plotArea);
+},this);
+return this;
+},render:function(){
+if(this.theme){
+this.theme.clear();
+}
+if(this.dirty){
+return this.fullRender();
+}
+this.calculateGeometry();
+df.forEachRev(this.stack,function(_31){
+_31.render(this.dim,this.offsets);
+},this);
+df.forIn(this.axes,function(_32){
+_32.render(this.dim,this.offsets);
+},this);
+this._makeClean();
+if(this.surface.render){
+this.surface.render();
+}
+return this;
+},fullRender:function(){
+this.fullGeometry();
+var _33=this.offsets,dim=this.dim;
+var _34=df.foldl(this.stack,"z + plot.getRequiredColors()",0);
+this.theme.defineColors({num:_34,cache:false});
+dojo.forEach(this.series,_2);
+df.forIn(this.axes,_2);
+dojo.forEach(this.stack,_2);
+this.surface.clear();
+var t=this.theme,_35=t.plotarea&&t.plotarea.fill,_36=t.plotarea&&t.plotarea.stroke;
+if(_35){
+this.surface.createRect({x:_33.l,y:_33.t,width:dim.width-_33.l-_33.r,height:dim.height-_33.t-_33.b}).setFill(_35);
+}
+if(_36){
+this.surface.createRect({x:_33.l,y:_33.t,width:dim.width-_33.l-_33.r-1,height:dim.height-_33.t-_33.b-1}).setStroke(_36);
+}
+df.foldr(this.stack,function(z,_37){
+return _37.render(dim,_33),0;
+},0);
+_35=this.fill?this.fill:(t.chart&&t.chart.fill);
+_36=this.stroke?this.stroke:(t.chart&&t.chart.stroke);
+if(_35=="inherit"){
+var _38=this.node,_35=new dojo.Color(dojo.style(_38,"backgroundColor"));
+while(_35.a==0&&_38!=document.documentElement){
+_35=new dojo.Color(dojo.style(_38,"backgroundColor"));
+_38=_38.parentNode;
+}
+}
+if(_35){
+if(_33.l){
+this.surface.createRect({width:_33.l,height:dim.height+1}).setFill(_35);
+}
+if(_33.r){
+this.surface.createRect({x:dim.width-_33.r,width:_33.r+1,height:dim.height+1}).setFill(_35);
+}
+if(_33.t){
+this.surface.createRect({width:dim.width+1,height:_33.t}).setFill(_35);
+}
+if(_33.b){
+this.surface.createRect({y:dim.height-_33.b,width:dim.width+1,height:_33.b+2}).setFill(_35);
+}
+}
+if(_36){
+this.surface.createRect({width:dim.width-1,height:dim.height-1}).setStroke(_36);
+}
+df.forIn(this.axes,function(_39){
+_39.render(dim,_33);
+});
+this._makeClean();
+if(this.surface.render){
+this.surface.render();
+}
+return this;
+},connectToPlot:function(_3a,_3b,_3c){
+return _3a in this.plots?this.stack[this.plots[_3a]].connect(_3b,_3c):null;
+},_makeClean:function(){
+dojo.forEach(this.axes,_4);
+dojo.forEach(this.stack,_4);
+dojo.forEach(this.series,_4);
+this.dirty=false;
+},_makeDirty:function(){
+dojo.forEach(this.axes,_5);
+dojo.forEach(this.stack,_5);
+dojo.forEach(this.series,_5);
+this.dirty=true;
+},_invalidateDependentPlots:function(_3d,_3e){
+if(_3d in this.plots){
+var _3f=this.stack[this.plots[_3d]],_40,_41=_3e?"vAxis":"hAxis";
+if(_3f[_41]){
+_40=this.axes[_3f[_41]];
+if(_40&&_40.dependOnData()){
+_40.dirty=true;
+dojo.forEach(this.stack,function(p){
+if(p[_41]&&p[_41]==_3f[_41]){
+p.dirty=true;
+}
+});
+}
+}else{
+_3f.dirty=true;
+}
+}
+}});
})();
-
}
diff --git a/js/dojo/dojox/charting/Chart3D.js b/js/dojo/dojox/charting/Chart3D.js
--- a/js/dojo/dojox/charting/Chart3D.js
+++ b/js/dojo/dojox/charting/Chart3D.js
@@ -1,86 +1,73 @@
-if(!dojo._hasResource["dojox.charting.Chart3D"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.Chart3D"] = true;
-dojo.provide("dojox.charting.Chart3D");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.require("dojox.gfx3d");
-
-(function(){
- var observerVector = {x: 0, y: 0, z: 1}, v = dojox.gfx3d.vector, n = dojox.gfx.normalizedLength;
- dojo.declare("dojox.charting.Chart3D", null, {
- constructor: function(node, lights, camera, theme){
- // setup a view
- this.node = dojo.byId(node);
- this.surface = dojox.gfx.createSurface(this.node, n(this.node.style.width), n(this.node.style.height));
- this.view = this.surface.createViewport();
- this.view.setLights(lights.lights, lights.ambient, lights.specular);
- this.view.setCameraTransform(camera);
- this.theme = theme;
-
- // initialize internal variables
- this.walls = [];
- this.plots = [];
- },
-
- // public API
- generate: function(){
- return this._generateWalls()._generatePlots();
- },
- invalidate: function(){
- this.view.invalidate();
- return this;
- },
- render: function(){
- this.view.render();
- return this;
- },
- addPlot: function(plot){
- return this._add(this.plots, plot);
- },
- removePlot: function(plot){
- return this._remove(this.plots, plot);
- },
- addWall: function(wall){
- return this._add(this.walls, wall);
- },
- removeWall: function(wall){
- return this._remove(this.walls, wall);
- },
-
- // internal API
- _add: function(array, item){
- if(!dojo.some(array, function(i){ return i == item; })){
- array.push(item);
- this.view.invalidate();
- }
- return this;
- },
- _remove: function(array, item){
- var a = dojo.filter(array, function(i){ return i != item; });
- return a.length < array.length ? (array = a, this.invalidate()) : this;
- },
- _generateWalls: function(){
- for(var i = 0; i < this.walls.length; ++i){
- if(v.dotProduct(observerVector, this.walls[i].normal) > 0){
- this.walls[i].generate(this);
- }
- }
- return this;
- },
- _generatePlots: function(){
- var depth = 0, m = dojox.gfx3d.matrix, i = 0;
- for(; i < this.plots.length; ++i){
- depth += this.plots[i].getDepth();
- }
- for(--i; i >= 0; --i){
- var scene = this.view.createScene();
- scene.setTransform(m.translate(0, 0, -depth));
- this.plots[i].generate(this, scene);
- depth -= this.plots[i].getDepth();
- }
- return this;
- }
- });
+if(!dojo._hasResource["dojox.charting.Chart3D"]){
+dojo._hasResource["dojox.charting.Chart3D"]=true;
+dojo.provide("dojox.charting.Chart3D");
+dojo.require("dojox.gfx3d");
+(function(){
+var _1={x:0,y:0,z:1},v=dojox.gfx3d.vector,n=dojox.gfx.normalizedLength;
+dojo.declare("dojox.charting.Chart3D",null,{constructor:function(_2,_3,_4,_5){
+this.node=dojo.byId(_2);
+this.surface=dojox.gfx.createSurface(this.node,n(this.node.style.width),n(this.node.style.height));
+this.view=this.surface.createViewport();
+this.view.setLights(_3.lights,_3.ambient,_3.specular);
+this.view.setCameraTransform(_4);
+this.theme=_5;
+this.walls=[];
+this.plots=[];
+},generate:function(){
+return this._generateWalls()._generatePlots();
+},invalidate:function(){
+this.view.invalidate();
+return this;
+},render:function(){
+this.view.render();
+return this;
+},addPlot:function(_6){
+return this._add(this.plots,_6);
+},removePlot:function(_7){
+return this._remove(this.plots,_7);
+},addWall:function(_8){
+return this._add(this.walls,_8);
+},removeWall:function(_9){
+return this._remove(this.walls,_9);
+},_add:function(_a,_b){
+if(!dojo.some(_a,function(i){
+return i==_b;
+})){
+_a.push(_b);
+this.view.invalidate();
+}
+return this;
+},_remove:function(_c,_d){
+var a=dojo.filter(_c,function(i){
+return i!=_d;
+});
+return a.length<_c.length?(_c=a,this.invalidate()):this;
+},_generateWalls:function(){
+for(var i=0;i<this.walls.length;++i){
+if(v.dotProduct(_1,this.walls[i].normal)>0){
+this.walls[i].generate(this);
+}
+}
+return this;
+},_generatePlots:function(){
+var _e=0,m=dojox.gfx3d.matrix,i=0;
+for(;i<this.plots.length;++i){
+_e+=this.plots[i].getDepth();
+}
+for(--i;i>=0;--i){
+var _f=this.view.createScene();
+_f.setTransform(m.translate(0,0,-_e));
+this.plots[i].generate(this,_f);
+_e-=this.plots[i].getDepth();
+}
+return this;
+}});
})();
-
}
diff --git a/js/dojo/dojox/charting/Element.js b/js/dojo/dojox/charting/Element.js
--- a/js/dojo/dojox/charting/Element.js
+++ b/js/dojo/dojox/charting/Element.js
@@ -1,49 +1,53 @@
-if(!dojo._hasResource["dojox.charting.Element"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.Element"] = true;
-dojo.provide("dojox.charting.Element");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
-dojo.declare("dojox.charting.Element", null, {
- constructor: function(chart){
- this.chart = chart;
- this.group = null;
- this.htmlElements = [];
- this.dirty = true;
- },
- createGroup: function(creator){
- if(!creator){ creator = this.chart.surface; }
- if(!this.group){
- this.group = creator.createGroup();
- }
- return this;
- },
- purgeGroup: function(){
- this.destroyHtmlElements();
- if(this.group){
- this.group.clear();
- this.group.removeShape();
- this.group = null;
- }
- this.dirty = true;
- return this;
- },
- cleanGroup: function(creator){
- this.destroyHtmlElements();
- if(!creator){ creator = this.chart.surface; }
- if(this.group){
- this.group.clear();
- }else{
- this.group = creator.createGroup();
- }
- this.dirty = true;
- return this;
- },
- destroyHtmlElements: function(){
- dojo.forEach(this.htmlElements, dojo._destroyElement);
- this.htmlElements = [];
- },
- destroy: function(){
- this.purgeGroup();
- }
-});
-
+if(!dojo._hasResource["dojox.charting.Element"]){
+dojo._hasResource["dojox.charting.Element"]=true;
+dojo.provide("dojox.charting.Element");
+dojo.declare("dojox.charting.Element",null,{constructor:function(_1){
+this.chart=_1;
+this.group=null;
+this.htmlElements=[];
+this.dirty=true;
+},createGroup:function(_2){
+if(!_2){
+_2=this.chart.surface;
+}
+if(!this.group){
+this.group=_2.createGroup();
+}
+return this;
+},purgeGroup:function(){
+this.destroyHtmlElements();
+if(this.group){
+this.group.clear();
+this.group.removeShape();
+this.group=null;
}
+this.dirty=true;
+return this;
+},cleanGroup:function(_3){
+this.destroyHtmlElements();
+if(!_3){
+_3=this.chart.surface;
+}
+if(this.group){
+this.group.clear();
+}else{
+this.group=_3.createGroup();
+}
+this.dirty=true;
+return this;
+},destroyHtmlElements:function(){
+if(this.htmlElements.length){
+dojo.forEach(this.htmlElements,dojo.destroy);
+this.htmlElements=[];
+}
+},destroy:function(){
+this.purgeGroup();
+}});
+}
diff --git a/js/dojo/dojox/charting/Series.js b/js/dojo/dojox/charting/Series.js
--- a/js/dojo/dojox/charting/Series.js
+++ b/js/dojo/dojox/charting/Series.js
@@ -1,20 +1,23 @@
-if(!dojo._hasResource["dojox.charting.Series"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.Series"] = true;
-dojo.provide("dojox.charting.Series");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.require("dojox.charting.Element");
-dojo.declare("dojox.charting.Series", dojox.charting.Element, {
- constructor: function(chart, data, kwArgs){
- dojo.mixin(this, kwArgs);
- if(typeof this.plot != "string"){ this.plot = "default"; }
- this.data = data;
- this.dirty = true;
- this.clear();
- },
- clear: function(){
- this.dyn = {};
- }
-});
-
+if(!dojo._hasResource["dojox.charting.Series"]){
+dojo._hasResource["dojox.charting.Series"]=true;
+dojo.provide("dojox.charting.Series");
+dojo.require("dojox.charting.Element");
+dojo.declare("dojox.charting.Series",dojox.charting.Element,{constructor:function(_1,_2,_3){
+dojo.mixin(this,_3);
+if(typeof this.plot!="string"){
+this.plot="default";
}
+this.data=_2;
+this.dirty=true;
+this.clear();
+},clear:function(){
+this.dyn={};
+}});
+}
diff --git a/js/dojo/dojox/charting/Theme.js b/js/dojo/dojox/charting/Theme.js
--- a/js/dojo/dojox/charting/Theme.js
+++ b/js/dojo/dojox/charting/Theme.js
@@ -1,235 +1,82 @@
-if(!dojo._hasResource["dojox.charting.Theme"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.Theme"] = true;
-dojo.provide("dojox.charting.Theme");
-dojo.require("dojox.charting._color");
-
-(function(){
- var dxc=dojox.charting;
- // TODO: Legend information
- dxc.Theme=function(/*object?*/kwArgs){
- kwArgs=kwArgs||{};
- this.chart=dojo.mixin(dojo.clone(dxc.Theme._def.chart), kwArgs.chart||{});
- this.plotarea=dojo.mixin(dojo.clone(dxc.Theme._def.plotarea), kwArgs.plotarea||{});
- this.axis=dojo.mixin(dojo.clone(dxc.Theme._def.axis), kwArgs.axis||{});
- this.series=dojo.mixin(dojo.clone(dxc.Theme._def.series), kwArgs.series||{});
- this.marker=dojo.mixin(dojo.clone(dxc.Theme._def.marker), kwArgs.marker||{});
- this.markers=dojo.mixin(dojo.clone(dxc.Theme.Markers), kwArgs.markers||{});
- this.colors=[];
- this.antiAlias=("antiAlias" in kwArgs)?kwArgs.antiAlias:true;
- this.assignColors=("assignColors" in kwArgs)?kwArgs.assignColors:true;
- this.assignMarkers=("assignMarkers" in kwArgs)?kwArgs.assignMarkers:true;
- this._colorCache=null;
-
- // push the colors, use _def colors if none passed.
- kwArgs.colors=kwArgs.colors||dxc.Theme._def.colors;
- dojo.forEach(kwArgs.colors, function(item){
- this.colors.push(item);
- }, this);
-
- // private variables for color and marker indexing
- this._current={ color:0, marker: 0 };
- this._markers=[];
- this._buildMarkerArray();
- };
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // "static" fields
- // default markers.
- // A marker is defined by an SVG path segment; it should be defined as
- // relative motion, and with the assumption that the path segment
- // will be moved to the value point (i.e prepend Mx,y)
- dxc.Theme.Markers={
- CIRCLE:"m-3,0 c0,-4 6,-4 6,0 m-6,0 c0,4 6,4 6,0",
- SQUARE:"m-3,-3 l0,6 6,0 0,-6 z",
- DIAMOND:"m0,-3 l3,3 -3,3 -3,-3 z",
- CROSS:"m0,-3 l0,6 m-3,-3 l6,0",
- X:"m-3,-3 l6,6 m0,-6 l-6,6",
- TRIANGLE:"m-3,3 l3,-6 3,6 z",
- TRIANGLE_INVERTED:"m-3,-3 l3,6 3,-6 z"
- };
- dxc.Theme._def={
- // all objects are structs used directly in dojox.gfx
- chart:{
- stroke:null,
- fill: "white"
- },
- plotarea:{
- stroke:null,
- fill: "white"
- },
- // TODO: label rotation on axis
- axis:{
- stroke:{ color:"#333",width:1 }, // the axis itself
- line:{ color:"#ccc",width:1,style:"Dot",cap:"round" }, // gridlines
- majorTick:{ color:"#666", width:1, length:6, position:"center" }, // major ticks on axis
- minorTick:{ color:"#666", width:0.8, length:3, position:"center" }, // minor ticks on axis
- font:"normal normal normal 7pt Tahoma", // labels on axis
- fontColor:"#333" // color of labels
- },
- series:{
- outline: {width: 2, color: "#ccc"}, // line or outline
- stroke: {width: 2, color: "#333"}, // line or outline
- fill: "#ccc", // fill, if appropriate
- font: "normal normal normal 7pt Tahoma", // if there's a label
- fontColor: "#000" // color of labels
- },
- marker:{ // any markers on a series.
- stroke: {width:1}, // stroke or outline
- fill: "#333", // fill if needed
- font: "normal normal normal 7pt Tahoma", // label
- fontColor: "#000"
- },
- colors:[
- "#000","#111","#222","#333",
- "#444","#555","#666","#777",
- "#888","#999","#aaa","#bbb",
- "#ccc"
- ]
- };
-
- // prototype methods
- dojo.extend(dxc.Theme, {
- defineColors: function(obj){
- // we can generate a set of colors based on keyword arguments
- var kwArgs=obj||{};
-
- // deal with caching
- var cache=false;
- if(kwArgs.cache===undefined){ cache=true; }
- if(kwArgs.cache==true){ cache=true; }
-
- if(cache){
- this._colorCache=kwArgs;
- } else {
- var mix=this._colorCache||{};
- kwArgs=dojo.mixin(dojo.clone(mix), kwArgs);
- }
- var c=[], n=kwArgs.num||32; // the number of colors to generate
- if(kwArgs.colors){
- // we have an array of colors predefined, so fix for the number of series.
- var l=kwArgs.colors.length;
- for(var i=0; i<n; i++){
- c.push(kwArgs.colors[i%l]);
- }
- this.colors=c;
- }
- else if(kwArgs.hue){
- // single hue, generate a set based on brightness
- var s=kwArgs.saturation||100; // saturation
- var st=kwArgs.low||30;
- var end=kwArgs.high||90;
- var step=(end-st)/n; // brightness steps
- for(var i=0; i<n; i++){
- c.push(dxc._color.fromHsb(kwArgs.hue, s, st+(step*i)).toHex());
- }
- this.colors=c;
- }
- else if(kwArgs.stops){
- // create color ranges that are either equally distributed, or
- // (optionally) based on a passed "offset" property. If you
- // pass an array of Colors, it will equally distribute, if
- // you pass an array of structs { color, offset }, it will
- // use the offset (0.0 - 1.0) to distribute. Note that offset
- // values should be plotted on a line from 0.0 to 1.0--i.e.
- // they should be additive. For example:
- // [ {color, offset:0}, { color, offset:0.2 }, { color, offset:0.5 }, { color, offset:1.0 } ]
- //
- // If you use stops for colors, you MUST have a color at 0.0 and one
- // at 1.0.
-
- // figure out how many stops we have
- var l=kwArgs.stops.length;
- if(l<2){
- throw new Error(
- "dojox.charting.Theme::defineColors: when using stops to "
- + "define a color range, you MUST specify at least 2 colors."
- );
- }
-
- // figure out if the distribution is equal or not. Note that
- // colors may not exactly match the stops you define; because
- // color generation is linear (i.e. evenly divided on a linear
- // axis), it's very possible that a color will land in between
- // two stops and not exactly *at* a stop.
- //
- // The only two colors guaranteed will be the end stops (i.e.
- // the first and last stop), which will *always* be set as
- // the end stops.
- if(typeof(kwArgs.stops[0].offset)=="undefined"){
- // set up equal offsets
- var off=1/(l-1);
- for(var i=0; i<l; i++){
- kwArgs.stops[i]={
- color:kwArgs.stops[i],
- offset:off*i
- };
- }
- }
- // ensure the ends.
- kwArgs.stops[0].offset=0;
- kwArgs.stops[l-1].offset=1;
- kwArgs.stops.sort(function(a,b){ return a.offset-b.offset; });
-
- // create the colors.
- // first stop.
- c.push(kwArgs.stops[0].color.toHex());
-
- // TODO: calculate the blend at n/steps and set the color
-
- // last stop
- c.push(kwArgs.stops[l-1].color.toHex());
- this.colors=c;
- }
- },
-
- _buildMarkerArray: function(){
- this._markers=[];
- for(var p in this.markers){ this._markers.push(this.markers[p]); }
- // reset the position
- this._current.marker=0;
- },
-
- addMarker:function(/* string */name, /*string*/segment){
- // summary
- // Add a custom marker to this theme.
- //
- // example
- // myTheme.addMarker("Ellipse", foo);
- this.markers[name]=segment;
- this._buildMarkerArray();
- },
- setMarkers:function(/* object */obj){
- // summary
- // Set all the markers of this theme at once. obj should be
- // a dictionary of keys and path segments.
- //
- // example
- // myTheme.setMarkers({ "CIRCLE": foo });
- this.markers=obj;
- this._buildMarkerArray();
- },
-
- next: function(/* string? */type){
- // summary
- // get either the next color or the next marker, depending on what was
- // passed. If type is not passed, it assumes color.
- //
- // example
- // var color=myTheme.next();
- // var color=myTheme.next("color");
- // var marker=myTheme.next("marker");
- if(!type) type="color";
- if(type=="color"){
- return this.colors[this._current.color++%this.colors.length];
- }
- else if(type=="marker"){
- return this._markers[this._current.marker++%this._markers.length];
- }
- },
- clear: function(){
- this._current = {color: 0, marker: 0};
- }
- });
+if(!dojo._hasResource["dojox.charting.Theme"]){
+dojo._hasResource["dojox.charting.Theme"]=true;
+dojo.provide("dojox.charting.Theme");
+dojo.require("dojox.color");
+dojo.require("dojox.color.Palette");
+(function(){
+var _1=dojox.charting;
+_1.Theme=function(_2){
+_2=_2||{};
+var _3=_1.Theme._def;
+dojo.forEach(["chart","plotarea","axis","series","marker"],function(n){
+this[n]=dojo.delegate(_3[n],_2[n]||{});
+},this);
+this.markers=dojo.delegate(_1.Theme.Markers,_2.markers||{});
+this.colors=[];
+this.antiAlias=("antiAlias" in _2)?_2.antiAlias:true;
+this.assignColors=("assignColors" in _2)?_2.assignColors:true;
+this.assignMarkers=("assignMarkers" in _2)?_2.assignMarkers:true;
+_2.colors=_2.colors||_3.colors;
+dojo.forEach(_2.colors,function(_4){
+this.colors.push(_4);
+},this);
+this._current={color:0,marker:0};
+this._markers=[];
+this._buildMarkerArray();
+};
+_1.Theme.Markers={CIRCLE:"m-3,0 c0,-4 6,-4 6,0 m-6,0 c0,4 6,4 6,0",SQUARE:"m-3,-3 l0,6 6,0 0,-6 z",DIAMOND:"m0,-3 l3,3 -3,3 -3,-3 z",CROSS:"m0,-3 l0,6 m-3,-3 l6,0",X:"m-3,-3 l6,6 m0,-6 l-6,6",TRIANGLE:"m-3,3 l3,-6 3,6 z",TRIANGLE_INVERTED:"m-3,-3 l3,6 3,-6 z"};
+_1.Theme._def={chart:{stroke:null,fill:"white"},plotarea:{stroke:null,fill:"white"},axis:{stroke:{color:"#333",width:1},majorTick:{color:"#666",width:1,length:6,position:"center"},minorTick:{color:"#666",width:0.8,length:3,position:"center"},microTick:{color:"#666",width:0.5,length:1,position:"center"},font:"normal normal normal 7pt Tahoma",fontColor:"#333"},series:{outline:{width:0.1,color:"#ccc"},stroke:{width:1.5,color:"#333"},fill:"#ccc",font:"normal normal normal 7pt Tahoma",fontColor:"#000"},marker:{stroke:{width:1},fill:"#333",font:"normal normal normal 7pt Tahoma",fontColor:"#000"},colors:["#54544c","#858e94","#6e767a","#948585","#474747"]};
+dojo.extend(_1.Theme,{defineColors:function(_5){
+var _6=_5||{};
+var c=[],n=_6.num||5;
+if(_6.colors){
+var l=_6.colors.length;
+for(var i=0;i<n;i++){
+c.push(_6.colors[i%l]);
+}
+this.colors=c;
+}else{
+if(_6.hue){
+var s=_6.saturation||100;
+var st=_6.low||30;
+var _7=_6.high||90;
+var l=(_7+st)/2;
+this.colors=dojox.color.Palette.generate(dojox.color.fromHsv(_6.hue,s,l),"monochromatic").colors;
+}else{
+if(_6.generator){
+this.colors=dojox.color.Palette.generate(_6.base,_6.generator).colors;
+}
+}
+}
+},_buildMarkerArray:function(){
+this._markers=[];
+for(var p in this.markers){
+this._markers.push(this.markers[p]);
+}
+this._current.marker=0;
+},_clone:function(){
+return new _1.Theme({chart:this.chart,plotarea:this.plotarea,axis:this.axis,series:this.series,marker:this.marker,antiAlias:this.antiAlias,assignColors:this.assignColors,assignMarkers:this.assigneMarkers,colors:dojo.delegate(this.colors)});
+},addMarker:function(_8,_9){
+this.markers[_8]=_9;
+this._buildMarkerArray();
+},setMarkers:function(_a){
+this.markers=_a;
+this._buildMarkerArray();
+},next:function(_b){
+if(_b=="marker"){
+return this._markers[this._current.marker++%this._markers.length];
+}else{
+return this.colors[this._current.color++%this.colors.length];
+}
+},clear:function(){
+this._current={color:0,marker:0};
+}});
})();
-
}
diff --git a/js/dojo/dojox/charting/axis2d/Base.js b/js/dojo/dojox/charting/axis2d/Base.js
--- a/js/dojo/dojox/charting/axis2d/Base.js
+++ b/js/dojo/dojox/charting/axis2d/Base.js
@@ -1,31 +1,29 @@
-if(!dojo._hasResource["dojox.charting.axis2d.Base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.axis2d.Base"] = true;
-dojo.provide("dojox.charting.axis2d.Base");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.require("dojox.charting.Element");
-dojo.declare("dojox.charting.axis2d.Base", dojox.charting.Element, {
- constructor: function(chart, kwArgs){
- this.vertical = kwArgs && kwArgs.vertical;
- },
- clear: function(){
- return this;
- },
- initialized: function(){
- return false;
- },
- calculate: function(min, max, span){
- return this;
- },
- getScaler: function(){
- return null;
- },
- getOffsets: function(){
- return {l: 0, r: 0, t: 0, b: 0};
- },
- render: function(dim, offsets){
- return this;
- }
-});
-
+if(!dojo._hasResource["dojox.charting.axis2d.Base"]){
+dojo._hasResource["dojox.charting.axis2d.Base"]=true;
+dojo.provide("dojox.charting.axis2d.Base");
+dojo.require("dojox.charting.Element");
+dojo.declare("dojox.charting.axis2d.Base",dojox.charting.Element,{constructor:function(_1,_2){
+this.vertical=_2&&_2.vertical;
+},clear:function(){
+return this;
+},initialized:function(){
+return false;
+},calculate:function(_3,_4,_5){
+return this;
+},getScaler:function(){
+return null;
+},getTicks:function(){
+return null;
+},getOffsets:function(){
+return {l:0,r:0,t:0,b:0};
+},render:function(_6,_7){
+return this;
+}});
}
diff --git a/js/dojo/dojox/charting/axis2d/Default.js b/js/dojo/dojox/charting/axis2d/Default.js
--- a/js/dojo/dojox/charting/axis2d/Default.js
+++ b/js/dojo/dojox/charting/axis2d/Default.js
@@ -1,307 +1,245 @@
-if(!dojo._hasResource["dojox.charting.axis2d.Default"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.axis2d.Default"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.axis2d.Default"]){
+dojo._hasResource["dojox.charting.axis2d.Default"]=true;
dojo.provide("dojox.charting.axis2d.Default");
-
-dojo.require("dojox.charting.scaler");
+dojo.require("dojox.charting.scaler.linear");
dojo.require("dojox.charting.axis2d.common");
dojo.require("dojox.charting.axis2d.Base");
-
dojo.require("dojo.colors");
+dojo.require("dojo.string");
dojo.require("dojox.gfx");
dojo.require("dojox.lang.functional");
dojo.require("dojox.lang.utils");
-
(function(){
- var dc = dojox.charting,
- df = dojox.lang.functional,
- du = dojox.lang.utils,
- g = dojox.gfx,
- labelGap = 4, // in pixels
- labelFudgeFactor = 0.8; // in percents (to convert font's heigth to label width)
-
- var eq = function(/* Number */ a, /* Number */ b){
- // summary: compare two FP numbers for equality
- return Math.abs(a - b) <= 1e-6 * (Math.abs(a) + Math.abs(b)); // Boolean
- };
-
- dojo.declare("dojox.charting.axis2d.Default", dojox.charting.axis2d.Base, {
- defaultParams: {
- vertical: false, // true for vertical axis
- fixUpper: "none", // align the upper on ticks: "major", "minor", "micro", "none"
- fixLower: "none", // align the lower on ticks: "major", "minor", "micro", "none"
- natural: false, // all tick marks should be made on natural numbers
- leftBottom: true, // position of the axis, used with "vertical"
- includeZero: false, // 0 should be included
- fixed: true, // all labels are fixed numbers
- majorLabels: true, // draw major labels
- minorTicks: true, // draw minor ticks
- minorLabels: true, // draw minor labels
- microTicks: false, // draw micro ticks
- htmlLabels: true // use HTML to draw labels
- },
- optionalParams: {
- "min": 0, // minimal value on this axis
- "max": 1, // maximal value on this axis
- "majorTickStep": 4, // major tick step
- "minorTickStep": 2, // minor tick step
- "microTickStep": 1, // micro tick step
- "labels": [], // array of labels for major ticks
- // with corresponding numeric values
- // ordered by values
- // theme components
- "stroke": {}, // stroke for an axis
- "majorTick": {}, // stroke + length for a tick
- "minorTick": {}, // stroke + length for a tick
- "font": "", // font for labels
- "fontColor": "" // color for labels as a string
- },
-
- constructor: function(chart, kwArgs){
- this.opt = dojo.clone(this.defaultParams);
- du.updateWithObject(this.opt, kwArgs);
- du.updateWithPattern(this.opt, kwArgs, this.optionalParams);
- },
- dependOnData: function(){
- return !("min" in this.opt) || !("max" in this.opt);
- },
- clear: function(){
- delete this.scaler;
- this.dirty = true;
- return this;
- },
- initialized: function(){
- return "scaler" in this;
- },
- calculate: function(min, max, span, labels){
- if(this.initialized()){ return this; }
- this.labels = "labels" in this.opt ? this.opt.labels : labels;
- if("min" in this.opt){ min = this.opt.min; }
- if("max" in this.opt){ max = this.opt.max; }
- if(this.opt.includeZero){
- if(min > 0){ min = 0; }
- if(max < 0){ max = 0; }
- }
- var minMinorStep = 0, ta = this.chart.theme.axis,
- taFont = "font" in this.opt ? this.opt.font : ta.font,
- size = taFont ? g.normalizedLength(g.splitFontString(taFont).size) : 0;
- if(this.vertical){
- if(size){
- minMinorStep = size + labelGap;
- }
- }else{
- if(size){
- var labelLength = Math.ceil(Math.log(Math.max(Math.abs(min), Math.abs(max))) / Math.LN10);
- if(min < 0 || max < 0){ ++labelLength; }
- var precision = Math.floor(Math.log(max - min) / Math.LN10);
- if(precision > 0){ labelLength += precision; }
- if(this.labels){
- labelLength = df.foldl(df.map(this.labels, "x.text.length"), "Math.max(a, b)", labelLength);
- }
- minMinorStep = Math.floor(size * labelLength * labelFudgeFactor) + labelGap;
- }
- }
- var kwArgs = {
- fixUpper: this.opt.fixUpper,
- fixLower: this.opt.fixLower,
- natural: this.opt.natural
- };
- if("majorTickStep" in this.opt){ kwArgs.majorTick = this.opt.majorTickStep; }
- if("minorTickStep" in this.opt){ kwArgs.minorTick = this.opt.minorTickStep; }
- if("microTickStep" in this.opt){ kwArgs.microTick = this.opt.microTickStep; }
- this.scaler = dojox.charting.scaler(min, max, span, kwArgs);
- this.scaler.minMinorStep = minMinorStep;
- return this;
- },
- getScaler: function(){
- return this.scaler;
- },
- getOffsets: function(){
- var offsets = {l: 0, r: 0, t: 0, b: 0};
- var offset = 0, ta = this.chart.theme.axis,
- taFont = "font" in this.opt ? this.opt.font : ta.font,
- taMajorTick = "majorTick" in this.opt ? this.opt.majorTick : ta.majorTick,
- taMinorTick = "minorTick" in this.opt ? this.opt.minorTick : ta.minorTick,
- size = taFont ? g.normalizedLength(g.splitFontString(taFont).size) : 0;
- if(this.vertical){
- if(size){
- var s = this.scaler,
- a = this._getLabel(s.major.start, s.major.prec).length,
- b = this._getLabel(s.major.start + s.major.count * s.major.tick, s.major.prec).length,
- c = this._getLabel(s.minor.start, s.minor.prec).length,
- d = this._getLabel(s.minor.start + s.minor.count * s.minor.tick, s.minor.prec).length,
- labelLength = Math.max(a, b, c, d);
- if(this.labels){
- labelLength = df.foldl(df.map(this.labels, "x.text.length"), "Math.max(a, b)", labelLength);
- }
- offset = Math.floor(size * labelLength * labelFudgeFactor) + labelGap;
- }
- offset += labelGap + Math.max(taMajorTick.length, taMinorTick.length);
- offsets[this.opt.leftBottom ? "l" : "r"] = offset;
- offsets.t = offsets.b = size / 2;
- }else{
- if(size){
- offset = size + labelGap;
- }
- offset += labelGap + Math.max(taMajorTick.length, taMinorTick.length);
- offsets[this.opt.leftBottom ? "b" : "t"] = offset;
- if(size){
- var s = this.scaler,
- a = this._getLabel(s.major.start, s.major.prec).length,
- b = this._getLabel(s.major.start + s.major.count * s.major.tick, s.major.prec).length,
- c = this._getLabel(s.minor.start, s.minor.prec).length,
- d = this._getLabel(s.minor.start + s.minor.count * s.minor.tick, s.minor.prec).length,
- labelLength = Math.max(a, b, c, d);
- if(this.labels){
- labelLength = df.foldl(df.map(this.labels, "x.text.length"), "Math.max(a, b)", labelLength);
- }
- offsets.l = offsets.r = Math.floor(size * labelLength * labelFudgeFactor) / 2;
- }
- }
- return offsets;
- },
- render: function(dim, offsets){
- if(!this.dirty){ return this; }
- // prepare variable
- var start, stop, axisVector, tickVector, labelOffset, labelAlign,
- ta = this.chart.theme.axis,
- taStroke = "stroke" in this.opt ? this.opt.stroke : ta.stroke,
- taMajorTick = "majorTick" in this.opt ? this.opt.majorTick : ta.majorTick,
- taMinorTick = "minorTick" in this.opt ? this.opt.minorTick : ta.minorTick,
- taFont = "font" in this.opt ? this.opt.font : ta.font,
- taFontColor = "fontColor" in this.opt ? this.opt.fontColor : ta.fontColor,
- tickSize = Math.max(taMajorTick.length, taMinorTick.length),
- size = taFont ? g.normalizedLength(g.splitFontString(taFont).size) : 0;
- if(this.vertical){
- start = {y: dim.height - offsets.b};
- stop = {y: offsets.t};
- axisVector = {x: 0, y: -1};
- if(this.opt.leftBottom){
- start.x = stop.x = offsets.l;
- tickVector = {x: -1, y: 0};
- labelAlign = "end";
- }else{
- start.x = stop.x = dim.width - offsets.r;
- tickVector = {x: 1, y: 0};
- labelAlign = "start";
- }
- labelOffset = {x: tickVector.x * (tickSize + labelGap), y: size * 0.4};
- }else{
- start = {x: offsets.l};
- stop = {x: dim.width - offsets.r};
- axisVector = {x: 1, y: 0};
- labelAlign = "middle";
- if(this.opt.leftBottom){
- start.y = stop.y = dim.height - offsets.b;
- tickVector = {x: 0, y: 1};
- labelOffset = {y: tickSize + labelGap + size};
- }else{
- start.y = stop.y = offsets.t;
- tickVector = {x: 0, y: -1};
- labelOffset = {y: -tickSize - labelGap};
- }
- labelOffset.x = 0;
- }
-
- // render shapes
- this.cleanGroup();
- var s = this.group, c = this.scaler, step, next,
- nextMajor = c.major.start, nextMinor = c.minor.start, nextMicro = c.micro.start;
- s.createLine({x1: start.x, y1: start.y, x2: stop.x, y2: stop.y}).setStroke(taStroke);
- if(this.opt.microTicks && c.micro.tick){
- step = c.micro.tick, next = nextMicro;
- }else if(this.opt.minorTicks && c.minor.tick){
- step = c.minor.tick, next = nextMinor;
- }else if(c.major.tick){
- step = c.major.tick, next = nextMajor;
- }else{
- // don't draw anything
- return this;
- }
- while(next <= c.bounds.upper + 1/c.scale){
- var offset = (next - c.bounds.lower) * c.scale,
- x = start.x + axisVector.x * offset,
- y = start.y + axisVector.y * offset;
- if(Math.abs(nextMajor - next) < step / 2){
- // major tick
- s.createLine({
- x1: x, y1: y,
- x2: x + tickVector.x * taMajorTick.length,
- y2: y + tickVector.y * taMajorTick.length
- }).setStroke(taMajorTick);
- if(this.opt.majorLabels){
- var elem = dc.axis2d.common.createText[this.opt.htmlLabels ? "html" : "gfx"]
- (this.chart, s, x + labelOffset.x, y + labelOffset.y, labelAlign,
- this._getLabel(nextMajor, c.major.prec), taFont, taFontColor);
- if(this.opt.htmlLabels){ this.htmlElements.push(elem); }
- }
- nextMajor += c.major.tick;
- nextMinor += c.minor.tick;
- nextMicro += c.micro.tick;
- }else if(Math.abs(nextMinor - next) < step / 2){
- // minor tick
- if(this.opt.minorTicks){
- s.createLine({
- x1: x, y1: y,
- x2: x + tickVector.x * taMinorTick.length,
- y2: y + tickVector.y * taMinorTick.length
- }).setStroke(taMinorTick);
- if(this.opt.minorLabels && (c.minMinorStep <= c.minor.tick * c.scale)){
- var elem = dc.axis2d.common.createText[this.opt.htmlLabels ? "html" : "gfx"]
- (this.chart, s, x + labelOffset.x, y + labelOffset.y, labelAlign,
- this._getLabel(nextMinor, c.minor.prec), taFont, taFontColor);
- if(this.opt.htmlLabels){ this.htmlElements.push(elem); }
- }
- }
- nextMinor += c.minor.tick;
- nextMicro += c.micro.tick;
- }else{
- // micro tick
- if(this.opt.microTicks){
- s.createLine({
- x1: x, y1: y,
- // use minor ticks for now
- x2: x + tickVector.x * taMinorTick.length,
- y2: y + tickVector.y * taMinorTick.length
- }).setStroke(taMinorTick);
- }
- nextMicro += c.micro.tick;
- }
- next += step;
- }
- this.dirty = false;
- return this;
- },
-
- // utilities
- _getLabel: function(number, precision){
- if(this.opt.labels){
- // classic binary search
- var l = this.opt.labels, lo = 0, hi = l.length;
- while(lo < hi){
- var mid = Math.floor((lo + hi) / 2), val = l[mid].value;
- if(val < number){
- lo = mid + 1;
- }else{
- hi = mid;
- }
- }
- // lets take into account FP errors
- if(lo < l.length && eq(l[lo].value, number)){
- return l[lo].text;
- }
- --lo;
- if(lo < l.length && eq(l[lo].value, number)){
- return l[lo].text;
- }
- lo += 2;
- if(lo < l.length && eq(l[lo].value, number)){
- return l[lo].text;
- }
- // otherwise we will produce a number
- }
- return this.opt.fixed ? number.toFixed(precision < 0 ? -precision : 0) : number.toString();
- }
- });
+var dc=dojox.charting,df=dojox.lang.functional,du=dojox.lang.utils,g=dojox.gfx,_1=dc.scaler.linear,_2=4;
+dojo.declare("dojox.charting.axis2d.Default",dojox.charting.axis2d.Base,{defaultParams:{vertical:false,fixUpper:"none",fixLower:"none",natural:false,leftBottom:true,includeZero:false,fixed:true,majorLabels:true,minorTicks:true,minorLabels:true,microTicks:false,htmlLabels:true},optionalParams:{min:0,max:1,from:0,to:1,majorTickStep:4,minorTickStep:2,microTickStep:1,labels:[],labelFunc:null,maxLabelSize:0,stroke:{},majorTick:{},minorTick:{},microTick:{},font:"",fontColor:""},constructor:function(_3,_4){
+this.opt=dojo.delegate(this.defaultParams,_4);
+du.updateWithPattern(this.opt,_4,this.optionalParams);
+},dependOnData:function(){
+return !("min" in this.opt)||!("max" in this.opt);
+},clear:function(){
+delete this.scaler;
+delete this.ticks;
+this.dirty=true;
+return this;
+},initialized:function(){
+return "scaler" in this&&!(this.dirty&&this.dependOnData());
+},setWindow:function(_5,_6){
+this.scale=_5;
+this.offset=_6;
+return this.clear();
+},getWindowScale:function(){
+return "scale" in this?this.scale:1;
+},getWindowOffset:function(){
+return "offset" in this?this.offset:0;
+},_groupLabelWidth:function(_7,_8){
+if(_7[0]["text"]){
+_7=df.map(_7,function(_9){
+return _9.text;
+});
+}
+var s=_7.join("<br>");
+return dojox.gfx._base._getTextBox(s,{font:_8}).w||0;
+},calculate:function(_a,_b,_c,_d){
+if(this.initialized()){
+return this;
+}
+var o=this.opt;
+this.labels="labels" in o?o.labels:_d;
+this.scaler=_1.buildScaler(_a,_b,_c,o);
+var _e=this.scaler.bounds;
+if("scale" in this){
+o.from=_e.lower+this.offset;
+o.to=(_e.upper-_e.lower)/this.scale+o.from;
+if(!isFinite(o.from)||isNaN(o.from)||!isFinite(o.to)||isNaN(o.to)||o.to-o.from>=_e.upper-_e.lower){
+delete o.from;
+delete o.to;
+delete this.scale;
+delete this.offset;
+}else{
+if(o.from<_e.lower){
+o.to+=_e.lower-o.from;
+o.from=_e.lower;
+}else{
+if(o.to>_e.upper){
+o.from+=_e.upper-o.to;
+o.to=_e.upper;
+}
+}
+this.offset=o.from-_e.lower;
+}
+this.scaler=_1.buildScaler(_a,_b,_c,o);
+_e=this.scaler.bounds;
+if(this.scale==1&&this.offset==0){
+delete this.scale;
+delete this.offset;
+}
+}
+var _f=0,ta=this.chart.theme.axis,_10="font" in o?o.font:ta.font,_11=_10?g.normalizedLength(g.splitFontString(_10).size):0;
+if(this.vertical){
+if(_11){
+_f=_11+_2;
+}
+}else{
+if(_11){
+var _12,i;
+if(o.labelFunc&&o.maxLabelSize){
+_12=o.maxLabelSize;
+}else{
+if(this.labels){
+_12=this._groupLabelWidth(this.labels,_10);
+}else{
+var _13=Math.ceil(Math.log(Math.max(Math.abs(_e.from),Math.abs(_e.to)))/Math.LN10),t=[];
+if(_e.from<0||_e.to<0){
+t.push("-");
+}
+t.push(dojo.string.rep("9",_13));
+var _14=Math.floor(Math.log(_e.to-_e.from)/Math.LN10);
+if(_14>0){
+t.push(".");
+for(i=0;i<_14;++i){
+t.push("9");
+}
+}
+_12=dojox.gfx._base._getTextBox(t.join(""),{font:_10}).w;
+}
+}
+_f=_12+_2;
+}
+}
+this.scaler.minMinorStep=_f;
+this.ticks=_1.buildTicks(this.scaler,o);
+return this;
+},getScaler:function(){
+return this.scaler;
+},getTicks:function(){
+return this.ticks;
+},getOffsets:function(){
+var o=this.opt;
+var _15={l:0,r:0,t:0,b:0},_16,a,b,c,d,gl=dc.scaler.common.getNumericLabel,_17=0,ta=this.chart.theme.axis,_18="font" in o?o.font:ta.font,_19="majorTick" in o?o.majorTick:ta.majorTick,_1a="minorTick" in o?o.minorTick:ta.minorTick,_1b=_18?g.normalizedLength(g.splitFontString(_18).size):0,s=this.scaler;
+if(!s){
+return _15;
+}
+var ma=s.major,mi=s.minor;
+if(this.vertical){
+if(_1b){
+if(o.labelFunc&&o.maxLabelSize){
+_16=o.maxLabelSize;
+}else{
+if(this.labels){
+_16=this._groupLabelWidth(this.labels,_18);
+}else{
+_16=this._groupLabelWidth([gl(ma.start,ma.prec,o),gl(ma.start+ma.count*ma.tick,ma.prec,o),gl(mi.start,mi.prec,o),gl(mi.start+mi.count*mi.tick,mi.prec,o)],_18);
+}
+}
+_17=_16+_2;
+}
+_17+=_2+Math.max(_19.length,_1a.length);
+_15[o.leftBottom?"l":"r"]=_17;
+_15.t=_15.b=_1b/2;
+}else{
+if(_1b){
+_17=_1b+_2;
+}
+_17+=_2+Math.max(_19.length,_1a.length);
+_15[o.leftBottom?"b":"t"]=_17;
+if(_1b){
+if(o.labelFunc&&o.maxLabelSize){
+_16=o.maxLabelSize;
+}else{
+if(this.labels){
+_16=this._groupLabelWidth(this.labels,_18);
+}else{
+_16=this._groupLabelWidth([gl(ma.start,ma.prec,o),gl(ma.start+ma.count*ma.tick,ma.prec,o),gl(mi.start,mi.prec,o),gl(mi.start+mi.count*mi.tick,mi.prec,o)],_18);
+}
+}
+_15.l=_15.r=_16/2;
+}
+}
+if(_16){
+this._cachedLabelWidth=_16;
+}
+return _15;
+},render:function(dim,_1c){
+if(!this.dirty){
+return this;
+}
+var o=this.opt;
+var _1d,_1e,_1f,_20,_21,_22,ta=this.chart.theme.axis,_23="stroke" in o?o.stroke:ta.stroke,_24="majorTick" in o?o.majorTick:ta.majorTick,_25="minorTick" in o?o.minorTick:ta.minorTick,_26="microTick" in o?o.microTick:ta.minorTick,_27="font" in o?o.font:ta.font,_28="fontColor" in o?o.fontColor:ta.fontColor,_29=Math.max(_24.length,_25.length),_2a=_27?g.normalizedLength(g.splitFontString(_27).size):0;
+if(this.vertical){
+_1d={y:dim.height-_1c.b};
+_1e={y:_1c.t};
+_1f={x:0,y:-1};
+if(o.leftBottom){
+_1d.x=_1e.x=_1c.l;
+_20={x:-1,y:0};
+_22="end";
+}else{
+_1d.x=_1e.x=dim.width-_1c.r;
+_20={x:1,y:0};
+_22="start";
+}
+_21={x:_20.x*(_29+_2),y:_2a*0.4};
+}else{
+_1d={x:_1c.l};
+_1e={x:dim.width-_1c.r};
+_1f={x:1,y:0};
+_22="middle";
+if(o.leftBottom){
+_1d.y=_1e.y=dim.height-_1c.b;
+_20={x:0,y:1};
+_21={y:_29+_2+_2a};
+}else{
+_1d.y=_1e.y=_1c.t;
+_20={x:0,y:-1};
+_21={y:-_29-_2};
+}
+_21.x=0;
+}
+this.cleanGroup();
+try{
+var s=this.group,c=this.scaler,t=this.ticks,_2b,f=_1.getTransformerFromModel(this.scaler),_2c=(dojox.gfx.renderer=="canvas"),_2d=_2c||this.opt.htmlLabels&&!dojo.isIE&&!dojo.isOpera?"html":"gfx",dx=_20.x*_24.length,dy=_20.y*_24.length;
+s.createLine({x1:_1d.x,y1:_1d.y,x2:_1e.x,y2:_1e.y}).setStroke(_23);
+dojo.forEach(t.major,function(_2e){
+var _2f=f(_2e.value),_30,x=_1d.x+_1f.x*_2f,y=_1d.y+_1f.y*_2f;
+s.createLine({x1:x,y1:y,x2:x+dx,y2:y+dy}).setStroke(_24);
+if(_2e.label){
+_30=dc.axis2d.common.createText[_2d](this.chart,s,x+_21.x,y+_21.y,_22,_2e.label,_27,_28,this._cachedLabelWidth);
+if(_2d=="html"){
+this.htmlElements.push(_30);
+}
+}
+},this);
+dx=_20.x*_25.length;
+dy=_20.y*_25.length;
+_2b=c.minMinorStep<=c.minor.tick*c.bounds.scale;
+dojo.forEach(t.minor,function(_31){
+var _32=f(_31.value),_33,x=_1d.x+_1f.x*_32,y=_1d.y+_1f.y*_32;
+s.createLine({x1:x,y1:y,x2:x+dx,y2:y+dy}).setStroke(_25);
+if(_2b&&_31.label){
+_33=dc.axis2d.common.createText[_2d](this.chart,s,x+_21.x,y+_21.y,_22,_31.label,_27,_28,this._cachedLabelWidth);
+if(_2d=="html"){
+this.htmlElements.push(_33);
+}
+}
+},this);
+dx=_20.x*_26.length;
+dy=_20.y*_26.length;
+dojo.forEach(t.micro,function(_34){
+var _35=f(_34.value),_36,x=_1d.x+_1f.x*_35,y=_1d.y+_1f.y*_35;
+s.createLine({x1:x,y1:y,x2:x+dx,y2:y+dy}).setStroke(_26);
+},this);
+}
+catch(e){
+}
+this.dirty=false;
+return this;
+}});
})();
-
}
diff --git a/js/dojo/dojox/charting/axis2d/common.js b/js/dojo/dojox/charting/axis2d/common.js
--- a/js/dojo/dojox/charting/axis2d/common.js
+++ b/js/dojo/dojox/charting/axis2d/common.js
@@ -1,58 +1,92 @@
-if(!dojo._hasResource["dojox.charting.axis2d.common"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.axis2d.common"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.axis2d.common"]){
+dojo._hasResource["dojox.charting.axis2d.common"]=true;
dojo.provide("dojox.charting.axis2d.common");
-
dojo.require("dojox.gfx");
-
(function(){
- var g = dojox.gfx;
-
- dojo.mixin(dojox.charting.axis2d.common, {
- createText: {
- gfx: function(chart, creator, x, y, align, text, font, fontColor){
- return creator.createText({
- x: x, y: y, text: text, align: align
- }).setFont(font).setFill(fontColor);
- },
- html: function(chart, creator, x, y, align, text, font, fontColor){
- var p = dojo.doc.createElement("div"), s = p.style;
- s.marginLeft = "0px";
- s.marginTop = "0px";
- s.marginRight = "0px";
- s.marginBottom = "0px";
- s.paddingLeft = "0px";
- s.paddingTop = "0px";
- s.paddingRight = "0px";
- s.paddingBottom = "0px";
- s.borderLeftWidth = "0px";
- s.borderTopWidth = "0px";
- s.borderRightWidth = "0px";
- s.borderBottomWidth = "0px";
- s.position = "absolute";
- s.font = font;
- p.innerHTML = text;
- s.color = fontColor;
- chart.node.appendChild(p);
- var parent = chart.getCoords(),
- box = dojo.marginBox(p),
- size = g.normalizedLength(g.splitFontString(font).size),
- top = parent.y + Math.floor(y - size);
- switch(align){
- case "middle":
- dojo.marginBox(p, {l: parent.x + Math.floor(x - box.w / 2), t: top});
- break;
- case "end":
- dojo.marginBox(p, {l: parent.x + Math.floor(x - box.w), t: top});
- break;
- //case "start":
- default:
- dojo.marginBox(p, {l: parent.x + Math.floor(x), t: top});
- break;
- }
- return p;
- }
- }
- });
+var g=dojox.gfx;
+var _1=function(s){
+s.marginLeft="0px";
+s.marginTop="0px";
+s.marginRight="0px";
+s.marginBottom="0px";
+s.paddingLeft="0px";
+s.paddingTop="0px";
+s.paddingRight="0px";
+s.paddingBottom="0px";
+s.borderLeftWidth="0px";
+s.borderTopWidth="0px";
+s.borderRightWidth="0px";
+s.borderBottomWidth="0px";
+};
+var _2=function(n){
+if(n["getBoundingClientRect"]){
+var _3=n.getBoundingClientRect();
+return _3.width||(_3.right-_3.left);
+}else{
+return dojo.marginBox(n).w;
+}
+};
+dojo.mixin(dojox.charting.axis2d.common,{createText:{gfx:function(_4,_5,x,y,_6,_7,_8,_9){
+return _5.createText({x:x,y:y,text:_7,align:_6}).setFont(_8).setFill(_9);
+},html:function(_a,_b,x,y,_c,_d,_e,_f,_10){
+var p=dojo.doc.createElement("div"),s=p.style,_11;
+_1(s);
+s.font=_e;
+p.innerHTML=String(_d).replace(/\s/g,"&nbsp;");
+s.color=_f;
+s.position="absolute";
+s.left="-10000px";
+dojo.body().appendChild(p);
+var _12=g.normalizedLength(g.splitFontString(_e).size);
+if(!_10){
+_11=_2(p);
+}
+dojo.body().removeChild(p);
+s.position="relative";
+if(_10){
+s.width=_10+"px";
+switch(_c){
+case "middle":
+s.textAlign="center";
+s.left=(x-_10/2)+"px";
+break;
+case "end":
+s.textAlign="right";
+s.left=(x-_10)+"px";
+break;
+default:
+s.left=x+"px";
+s.textAlign="left";
+break;
+}
+}else{
+switch(_c){
+case "middle":
+s.left=Math.floor(x-_11/2)+"px";
+break;
+case "end":
+s.left=Math.floor(x-_11)+"px";
+break;
+default:
+s.left=Math.floor(x)+"px";
+break;
+}
+}
+s.top=Math.floor(y-_12)+"px";
+var _13=dojo.doc.createElement("div"),w=_13.style;
+_1(w);
+w.width="0px";
+w.height="0px";
+_13.appendChild(p);
+_a.node.insertBefore(_13,_a.node.firstChild);
+return _13;
+}}});
})();
-
}
diff --git a/js/dojo/dojox/charting/plot2d/Areas.js b/js/dojo/dojox/charting/plot2d/Areas.js
--- a/js/dojo/dojox/charting/plot2d/Areas.js
+++ b/js/dojo/dojox/charting/plot2d/Areas.js
@@ -1,14 +1,16 @@
-if(!dojo._hasResource["dojox.charting.plot2d.Areas"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot2d.Areas"] = true;
-dojo.provide("dojox.charting.plot2d.Areas");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.require("dojox.charting.plot2d.Default");
-dojo.declare("dojox.charting.plot2d.Areas", dojox.charting.plot2d.Default, {
- constructor: function(){
- this.opt.lines = true;
- this.opt.areas = true;
- }
-});
-
+if(!dojo._hasResource["dojox.charting.plot2d.Areas"]){
+dojo._hasResource["dojox.charting.plot2d.Areas"]=true;
+dojo.provide("dojox.charting.plot2d.Areas");
+dojo.require("dojox.charting.plot2d.Default");
+dojo.declare("dojox.charting.plot2d.Areas",dojox.charting.plot2d.Default,{constructor:function(){
+this.opt.lines=true;
+this.opt.areas=true;
+}});
}
diff --git a/js/dojo/dojox/charting/plot2d/Bars.js b/js/dojo/dojox/charting/plot2d/Bars.js
--- a/js/dojo/dojox/charting/plot2d/Bars.js
+++ b/js/dojo/dojox/charting/plot2d/Bars.js
@@ -1,88 +1,104 @@
-if(!dojo._hasResource["dojox.charting.plot2d.Bars"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot2d.Bars"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.plot2d.Bars"]){
+dojo._hasResource["dojox.charting.plot2d.Bars"]=true;
dojo.provide("dojox.charting.plot2d.Bars");
-
dojo.require("dojox.charting.plot2d.common");
dojo.require("dojox.charting.plot2d.Base");
-
+dojo.require("dojox.gfx.fx");
dojo.require("dojox.lang.utils");
dojo.require("dojox.lang.functional");
-
+dojo.require("dojox.lang.functional.reversed");
(function(){
- var df = dojox.lang.functional, du = dojox.lang.utils,
- dc = dojox.charting.plot2d.common,
- purgeGroup = df.lambda("item.purgeGroup()");
-
- dojo.declare("dojox.charting.plot2d.Bars", dojox.charting.plot2d.Base, {
- defaultParams: {
- hAxis: "x", // use a horizontal axis named "x"
- vAxis: "y", // use a vertical axis named "y"
- gap: 0, // gap between columns in pixels
- shadows: null // draw shadows
- },
- optionalParams: {}, // no optional parameters
-
- constructor: function(chart, kwArgs){
- this.opt = dojo.clone(this.defaultParams);
- du.updateWithObject(this.opt, kwArgs);
- this.series = [];
- this.hAxis = this.opt.hAxis;
- this.vAxis = this.opt.vAxis;
- },
-
- calculateAxes: function(dim){
- var stats = dc.collectSimpleStats(this.series), t;
- stats.hmin -= 0.5;
- stats.hmax += 0.5;
- t = stats.hmin, stats.hmin = stats.vmin, stats.vmin = t;
- t = stats.hmax, stats.hmax = stats.vmax, stats.vmax = t;
- this._calc(dim, stats);
- return this;
- },
- render: function(dim, offsets){
- if(this.dirty){
- dojo.forEach(this.series, purgeGroup);
- this.cleanGroup();
- var s = this.group;
- df.forEachReversed(this.series, function(item){ item.cleanGroup(s); });
- }
- var t = this.chart.theme, color, stroke, fill, f,
- gap = this.opt.gap < this._vScaler.scale / 3 ? this.opt.gap : 0;
- for(var i = this.series.length - 1; i >= 0; --i){
- var run = this.series[i];
- if(!this.dirty && !run.dirty){ continue; }
- run.cleanGroup();
- var s = run.group;
- if(!run.fill || !run.stroke){
- // need autogenerated color
- color = run.dyn.color = new dojo.Color(t.next("color"));
- }
- stroke = run.stroke ? run.stroke : dc.augmentStroke(t.series.stroke, color);
- fill = run.fill ? run.fill : dc.augmentFill(t.series.fill, color);
- var baseline = Math.max(0, this._hScaler.bounds.lower),
- xoff = offsets.l + this._hScaler.scale * (baseline - this._hScaler.bounds.lower),
- yoff = dim.height - offsets.b - this._vScaler.scale * (1.5 - this._vScaler.bounds.lower) + gap;
- for(var j = 0; j < run.data.length; ++j){
- var v = run.data[j],
- width = this._hScaler.scale * (v - baseline),
- height = this._vScaler.scale - 2 * gap,
- w = Math.abs(width);
- if(w >= 1 && height >= 1){
- var shape = s.createRect({
- x: xoff + (width < 0 ? width : 0),
- y: yoff - this._vScaler.scale * j,
- width: w, height: height
- }).setFill(fill).setStroke(stroke);
- run.dyn.fill = shape.getFill();
- run.dyn.stroke = shape.getStroke();
- }
- }
- run.dirty = false;
- }
- this.dirty = false;
- return this;
- }
- });
+var df=dojox.lang.functional,du=dojox.lang.utils,dc=dojox.charting.plot2d.common,_1=df.lambda("item.purgeGroup()");
+dojo.declare("dojox.charting.plot2d.Bars",dojox.charting.plot2d.Base,{defaultParams:{hAxis:"x",vAxis:"y",gap:0,shadows:null,animate:null},optionalParams:{minBarSize:1,maxBarSize:1},constructor:function(_2,_3){
+this.opt=dojo.clone(this.defaultParams);
+du.updateWithObject(this.opt,_3);
+du.updateWithPattern(this.opt,_3,this.optionalParams);
+this.series=[];
+this.hAxis=this.opt.hAxis;
+this.vAxis=this.opt.vAxis;
+this.animate=this.opt.animate;
+},calculateAxes:function(_4){
+var _5=dc.collectSimpleStats(this.series),t;
+_5.hmin-=0.5;
+_5.hmax+=0.5;
+t=_5.hmin,_5.hmin=_5.vmin,_5.vmin=t;
+t=_5.hmax,_5.hmax=_5.vmax,_5.vmax=t;
+this._calc(_4,_5);
+return this;
+},render:function(_6,_7){
+this.dirty=this.isDirty();
+if(this.dirty){
+dojo.forEach(this.series,_1);
+this.cleanGroup();
+var s=this.group;
+df.forEachRev(this.series,function(_8){
+_8.cleanGroup(s);
+});
+}
+var t=this.chart.theme,_9,_a,_b,f,_c,_d,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_e=Math.max(0,this._hScaler.bounds.lower),_f=ht(_e),_10=this.events();
+f=dc.calculateBarSize(this._vScaler.bounds.scale,this.opt);
+_c=f.gap;
+_d=f.size;
+this.resetEvents();
+for(var i=this.series.length-1;i>=0;--i){
+var run=this.series[i];
+if(!this.dirty&&!run.dirty){
+continue;
+}
+run.cleanGroup();
+var s=run.group;
+if(!run.fill||!run.stroke){
+_9=run.dyn.color=new dojo.Color(t.next("color"));
+}
+_a=run.stroke?run.stroke:dc.augmentStroke(t.series.stroke,_9);
+_b=run.fill?run.fill:dc.augmentFill(t.series.fill,_9);
+for(var j=0;j<run.data.length;++j){
+var _11=run.data[j],v=typeof _11=="number"?_11:_11.y,hv=ht(v),_12=hv-_f,w=Math.abs(_12),_13=_9,_14=_b,_15=_a;
+if(typeof _11!="number"){
+if(_11.color){
+_13=new dojo.Color(_11.color);
+}
+if("fill" in _11){
+_14=_11.fill;
+}else{
+if(_11.color){
+_14=dc.augmentFill(t.series.fill,_13);
+}
+}
+if("stroke" in _11){
+_15=_11.stroke;
+}else{
+if(_11.color){
+_15=dc.augmentStroke(t.series.stroke,_13);
+}
+}
+}
+if(w>=1&&_d>=1){
+var _16=s.createRect({x:_7.l+(v<_e?hv:_f),y:_6.height-_7.b-vt(j+1.5)+_c,width:w,height:_d}).setFill(_14).setStroke(_15);
+run.dyn.fill=_16.getFill();
+run.dyn.stroke=_16.getStroke();
+if(_10){
+var o={element:"bar",index:j,run:run,plot:this,hAxis:this.hAxis||null,vAxis:this.vAxis||null,shape:_16,x:v,y:j+1.5};
+this._connectEvents(_16,o);
+}
+if(this.animate){
+this._animateBar(_16,_7.l+_f,-w);
+}
+}
+}
+run.dirty=false;
+}
+this.dirty=false;
+return this;
+},_animateBar:function(_17,_18,_19){
+dojox.gfx.fx.animateTransform(dojo.delegate({shape:_17,duration:1200,transform:[{name:"translate",start:[_18-(_18/_19),0],end:[0,0]},{name:"scale",start:[1/_19,1],end:[1,1]},{name:"original"}]},this.animate)).play();
+}});
})();
-
}
diff --git a/js/dojo/dojox/charting/plot2d/Base.js b/js/dojo/dojox/charting/plot2d/Base.js
--- a/js/dojo/dojox/charting/plot2d/Base.js
+++ b/js/dojo/dojox/charting/plot2d/Base.js
@@ -1,60 +1,90 @@
-if(!dojo._hasResource["dojox.charting.plot2d.Base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot2d.Base"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.plot2d.Base"]){
+dojo._hasResource["dojox.charting.plot2d.Base"]=true;
dojo.provide("dojox.charting.plot2d.Base");
-
+dojo.require("dojox.charting.scaler.primitive");
dojo.require("dojox.charting.Element");
dojo.require("dojox.charting.plot2d.common");
-
-dojo.declare("dojox.charting.plot2d.Base", dojox.charting.Element, {
- clear: function(){
- this.series = [];
- this._hAxis = null;
- this._vAxis = null;
- this.dirty = true;
- return this;
- },
- setAxis: function(axis){
- if(axis){
- this[axis.vertical ? "_vAxis" : "_hAxis"] = axis;
- }
- return this;
- },
- addSeries: function(run){
- this.series.push(run);
- return this;
- },
- calculateAxes: function(dim){
- return this;
- },
- render: function(dim, offsets){
- return this;
- },
- getRequiredColors: function(){
- return this.series.length;
- },
-
- // utilities
- _calc: function(dim, stats){
- // calculate scaler
- if(this._hAxis){
- if(!this._hAxis.initialized()){
- this._hAxis.calculate(stats.hmin, stats.hmax, dim.width);
- }
- this._hScaler = this._hAxis.getScaler();
- }else{
- this._hScaler = {bounds: {lower: stats.hmin, upper: stats.hmax},
- scale: dim.width / (stats.hmax - stats.hmin)};
- }
- if(this._vAxis){
- if(!this._vAxis.initialized()){
- this._vAxis.calculate(stats.vmin, stats.vmax, dim.height);
- }
- this._vScaler = this._vAxis.getScaler();
- }else{
- this._vScaler = {bounds: {lower: stats.vmin, upper: stats.vmax},
- scale: dim.height / (stats.vmax - stats.vmin)};
- }
- }
+dojo.declare("dojox.charting.plot2d.Base",dojox.charting.Element,{destroy:function(){
+this.resetEvents();
+this.inherited(arguments);
+},clear:function(){
+this.series=[];
+this._hAxis=null;
+this._vAxis=null;
+this.dirty=true;
+return this;
+},setAxis:function(_1){
+if(_1){
+this[_1.vertical?"_vAxis":"_hAxis"]=_1;
+}
+return this;
+},addSeries:function(_2){
+this.series.push(_2);
+return this;
+},calculateAxes:function(_3){
+return this;
+},isDirty:function(){
+return this.dirty||this._hAxis&&this._hAxis.dirty||this._vAxis&&this._vAxis.dirty;
+},render:function(_4,_5){
+return this;
+},getRequiredColors:function(){
+return this.series.length;
+},plotEvent:function(o){
+},connect:function(_6,_7){
+this.dirty=true;
+return dojo.connect(this,"plotEvent",_6,_7);
+},events:function(){
+var ls=this.plotEvent._listeners;
+if(!ls||!ls.length){
+return false;
+}
+for(var i in ls){
+if(!(i in Array.prototype)){
+return true;
+}
+}
+return false;
+},resetEvents:function(){
+this.plotEvent({type:"onplotreset",plot:this});
+},_calc:function(_8,_9){
+if(this._hAxis){
+if(!this._hAxis.initialized()){
+this._hAxis.calculate(_9.hmin,_9.hmax,_8.width);
+}
+this._hScaler=this._hAxis.getScaler();
+}else{
+this._hScaler=dojox.charting.scaler.primitive.buildScaler(_9.hmin,_9.hmax,_8.width);
+}
+if(this._vAxis){
+if(!this._vAxis.initialized()){
+this._vAxis.calculate(_9.vmin,_9.vmax,_8.height);
+}
+this._vScaler=this._vAxis.getScaler();
+}else{
+this._vScaler=dojox.charting.scaler.primitive.buildScaler(_9.vmin,_9.vmax,_8.height);
+}
+},_connectEvents:function(_a,o){
+_a.connect("onmouseover",this,function(e){
+o.type="onmouseover";
+o.event=e;
+this.plotEvent(o);
});
-
+_a.connect("onmouseout",this,function(e){
+o.type="onmouseout";
+o.event=e;
+this.plotEvent(o);
+});
+_a.connect("onclick",this,function(e){
+o.type="onclick";
+o.event=e;
+this.plotEvent(o);
+});
+}});
}
diff --git a/js/dojo/dojox/charting/plot2d/ClusteredBars.js b/js/dojo/dojox/charting/plot2d/ClusteredBars.js
--- a/js/dojo/dojox/charting/plot2d/ClusteredBars.js
+++ b/js/dojo/dojox/charting/plot2d/ClusteredBars.js
@@ -1,62 +1,84 @@
-if(!dojo._hasResource["dojox.charting.plot2d.ClusteredBars"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot2d.ClusteredBars"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.plot2d.ClusteredBars"]){
+dojo._hasResource["dojox.charting.plot2d.ClusteredBars"]=true;
dojo.provide("dojox.charting.plot2d.ClusteredBars");
-
dojo.require("dojox.charting.plot2d.common");
dojo.require("dojox.charting.plot2d.Bars");
-
dojo.require("dojox.lang.functional");
-
+dojo.require("dojox.lang.functional.reversed");
(function(){
- var df = dojox.lang.functional, dc = dojox.charting.plot2d.common,
- purgeGroup = df.lambda("item.purgeGroup()");
-
- dojo.declare("dojox.charting.plot2d.ClusteredBars", dojox.charting.plot2d.Bars, {
- render: function(dim, offsets){
- if(this.dirty){
- dojo.forEach(this.series, purgeGroup);
- this.cleanGroup();
- var s = this.group;
- df.forEachReversed(this.series, function(item){ item.cleanGroup(s); });
- }
- var t = this.chart.theme, color, stroke, fill, f,
- gap = this.opt.gap < this._vScaler.scale / 3 ? this.opt.gap : 0,
- thickness = (this._vScaler.scale - 2 * gap) / this.series.length;
- for(var i = this.series.length - 1; i >= 0; --i){
- var run = this.series[i];
- if(!this.dirty && !run.dirty){ continue; }
- run.cleanGroup();
- var s = run.group;
- if(!run.fill || !run.stroke){
- // need autogenerated color
- color = run.dyn.color = new dojo.Color(t.next("color"));
- }
- stroke = run.stroke ? run.stroke : dc.augmentStroke(t.series.stroke, color);
- fill = run.fill ? run.fill : dc.augmentFill(t.series.fill, color);
- var baseline = Math.max(0, this._hScaler.bounds.lower),
- xoff = offsets.l + this._hScaler.scale * (baseline - this._hScaler.bounds.lower),
- yoff = dim.height - offsets.b - this._vScaler.scale * (1.5 - this._vScaler.bounds.lower) +
- gap + thickness * (this.series.length - i - 1);
- for(var j = 0; j < run.data.length; ++j){
- var v = run.data[j],
- width = this._hScaler.scale * (v - baseline),
- height = thickness, w = Math.abs(width);
- if(w >= 1 && height >= 1){
- var shape = s.createRect({
- x: xoff + (width < 0 ? width : 0),
- y: yoff - this._vScaler.scale * j,
- width: w, height: height
- }).setFill(fill).setStroke(stroke);
- run.dyn.fill = shape.getFill();
- run.dyn.stroke = shape.getStroke();
- }
- }
- run.dirty = false;
- }
- this.dirty = false;
- return this;
- }
- });
+var df=dojox.lang.functional,dc=dojox.charting.plot2d.common,_1=df.lambda("item.purgeGroup()");
+dojo.declare("dojox.charting.plot2d.ClusteredBars",dojox.charting.plot2d.Bars,{render:function(_2,_3){
+this.dirty=this.isDirty();
+if(this.dirty){
+dojo.forEach(this.series,_1);
+this.cleanGroup();
+var s=this.group;
+df.forEachRev(this.series,function(_4){
+_4.cleanGroup(s);
+});
+}
+var t=this.chart.theme,_5,_6,_7,f,_8,_9,_a,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_b=Math.max(0,this._hScaler.bounds.lower),_c=ht(_b),_d=this.events();
+f=dc.calculateBarSize(this._vScaler.bounds.scale,this.opt,this.series.length);
+_8=f.gap;
+_9=_a=f.size;
+this.resetEvents();
+for(var i=this.series.length-1;i>=0;--i){
+var _e=this.series[i],_f=_a*(this.series.length-i-1);
+if(!this.dirty&&!_e.dirty){
+continue;
+}
+_e.cleanGroup();
+var s=_e.group;
+if(!_e.fill||!_e.stroke){
+_5=_e.dyn.color=new dojo.Color(t.next("color"));
+}
+_6=_e.stroke?_e.stroke:dc.augmentStroke(t.series.stroke,_5);
+_7=_e.fill?_e.fill:dc.augmentFill(t.series.fill,_5);
+for(var j=0;j<_e.data.length;++j){
+var _10=_e.data[j],v=typeof _10=="number"?_10:_10.y,hv=ht(v),_11=hv-_c,w=Math.abs(_11),_12=_5,_13=_7,_14=_6;
+if(typeof _10!="number"){
+if(_10.color){
+_12=new dojo.Color(_10.color);
+}
+if("fill" in _10){
+_13=_10.fill;
+}else{
+if(_10.color){
+_13=dc.augmentFill(t.series.fill,_12);
+}
+}
+if("stroke" in _10){
+_14=_10.stroke;
+}else{
+if(_10.color){
+_14=dc.augmentStroke(t.series.stroke,_12);
+}
+}
+}
+if(w>=1&&_9>=1){
+var _15=s.createRect({x:_3.l+(v<_b?hv:_c),y:_2.height-_3.b-vt(j+1.5)+_8+_f,width:w,height:_9}).setFill(_13).setStroke(_14);
+_e.dyn.fill=_15.getFill();
+_e.dyn.stroke=_15.getStroke();
+if(_d){
+var o={element:"bar",index:j,run:_e,plot:this,hAxis:this.hAxis||null,vAxis:this.vAxis||null,shape:_15,x:v,y:j+1.5};
+this._connectEvents(_15,o);
+}
+if(this.animate){
+this._animateBar(_15,_3.l+_c,-_11);
+}
+}
+}
+_e.dirty=false;
+}
+this.dirty=false;
+return this;
+}});
})();
-
}
diff --git a/js/dojo/dojox/charting/plot2d/ClusteredColumns.js b/js/dojo/dojox/charting/plot2d/ClusteredColumns.js
--- a/js/dojo/dojox/charting/plot2d/ClusteredColumns.js
+++ b/js/dojo/dojox/charting/plot2d/ClusteredColumns.js
@@ -1,62 +1,84 @@
-if(!dojo._hasResource["dojox.charting.plot2d.ClusteredColumns"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot2d.ClusteredColumns"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.plot2d.ClusteredColumns"]){
+dojo._hasResource["dojox.charting.plot2d.ClusteredColumns"]=true;
dojo.provide("dojox.charting.plot2d.ClusteredColumns");
-
dojo.require("dojox.charting.plot2d.common");
dojo.require("dojox.charting.plot2d.Columns");
-
dojo.require("dojox.lang.functional");
-
+dojo.require("dojox.lang.functional.reversed");
(function(){
- var df = dojox.lang.functional, dc = dojox.charting.plot2d.common,
- purgeGroup = df.lambda("item.purgeGroup()");
-
- dojo.declare("dojox.charting.plot2d.ClusteredColumns", dojox.charting.plot2d.Columns, {
- render: function(dim, offsets){
- if(this.dirty){
- dojo.forEach(this.series, purgeGroup);
- this.cleanGroup();
- var s = this.group;
- df.forEachReversed(this.series, function(item){ item.cleanGroup(s); });
- }
- var t = this.chart.theme, color, stroke, fill, f,
- gap = this.opt.gap < this._hScaler.scale / 3 ? this.opt.gap : 0,
- thickness = (this._hScaler.scale - 2 * gap) / this.series.length;
- for(var i = 0; i < this.series.length; ++i){
- var run = this.series[i];
- if(!this.dirty && !run.dirty){ continue; }
- run.cleanGroup();
- var s = run.group;
- if(!run.fill || !run.stroke){
- // need autogenerated color
- color = run.dyn.color = new dojo.Color(t.next("color"));
- }
- stroke = run.stroke ? run.stroke : dc.augmentStroke(t.series.stroke, color);
- fill = run.fill ? run.fill : dc.augmentFill(t.series.fill, color);
- var baseline = Math.max(0, this._vScaler.bounds.lower),
- xoff = offsets.l + this._hScaler.scale * (0.5 - this._hScaler.bounds.lower) + gap + thickness * i,
- yoff = dim.height - offsets.b - this._vScaler.scale * (baseline - this._vScaler.bounds.lower);
- for(var j = 0; j < run.data.length; ++j){
- var v = run.data[j],
- width = thickness,
- height = this._vScaler.scale * (v - baseline),
- h = Math.abs(height);
- if(width >= 1 && h >= 1){
- var shape = s.createRect({
- x: xoff + this._hScaler.scale * j,
- y: yoff - (height < 0 ? 0 : height),
- width: width, height: h
- }).setFill(fill).setStroke(stroke);
- run.dyn.fill = shape.getFill();
- run.dyn.stroke = shape.getStroke();
- }
- }
- run.dirty = false;
- }
- this.dirty = false;
- return this;
- }
- });
+var df=dojox.lang.functional,dc=dojox.charting.plot2d.common,_1=df.lambda("item.purgeGroup()");
+dojo.declare("dojox.charting.plot2d.ClusteredColumns",dojox.charting.plot2d.Columns,{render:function(_2,_3){
+this.dirty=this.isDirty();
+if(this.dirty){
+dojo.forEach(this.series,_1);
+this.cleanGroup();
+var s=this.group;
+df.forEachRev(this.series,function(_4){
+_4.cleanGroup(s);
+});
+}
+var t=this.chart.theme,_5,_6,_7,f,_8,_9,_a,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_b=Math.max(0,this._vScaler.bounds.lower),_c=vt(_b),_d=this.events();
+f=dc.calculateBarSize(this._hScaler.bounds.scale,this.opt,this.series.length);
+_8=f.gap;
+_9=_a=f.size;
+this.resetEvents();
+for(var i=0;i<this.series.length;++i){
+var _e=this.series[i],_f=_a*i;
+if(!this.dirty&&!_e.dirty){
+continue;
+}
+_e.cleanGroup();
+var s=_e.group;
+if(!_e.fill||!_e.stroke){
+_5=_e.dyn.color=new dojo.Color(t.next("color"));
+}
+_6=_e.stroke?_e.stroke:dc.augmentStroke(t.series.stroke,_5);
+_7=_e.fill?_e.fill:dc.augmentFill(t.series.fill,_5);
+for(var j=0;j<_e.data.length;++j){
+var _10=_e.data[j],v=typeof _10=="number"?_10:_10.y,vv=vt(v),_11=vv-_c,h=Math.abs(_11),_12=_5,_13=_7,_14=_6;
+if(typeof _10!="number"){
+if(_10.color){
+_12=new dojo.Color(_10.color);
+}
+if("fill" in _10){
+_13=_10.fill;
+}else{
+if(_10.color){
+_13=dc.augmentFill(t.series.fill,_12);
+}
+}
+if("stroke" in _10){
+_14=_10.stroke;
+}else{
+if(_10.color){
+_14=dc.augmentStroke(t.series.stroke,_12);
+}
+}
+}
+if(_9>=1&&h>=1){
+var _15=s.createRect({x:_3.l+ht(j+0.5)+_8+_f,y:_2.height-_3.b-(v>_b?vv:_c),width:_9,height:h}).setFill(_13).setStroke(_14);
+_e.dyn.fill=_15.getFill();
+_e.dyn.stroke=_15.getStroke();
+if(_d){
+var o={element:"column",index:j,run:_e,plot:this,hAxis:this.hAxis||null,vAxis:this.vAxis||null,shape:_15,x:j+0.5,y:v};
+this._connectEvents(_15,o);
+}
+if(this.animate){
+this._animateColumn(_15,_2.height-_3.b-_c,h);
+}
+}
+}
+_e.dirty=false;
+}
+this.dirty=false;
+return this;
+}});
})();
-
}
diff --git a/js/dojo/dojox/charting/plot2d/Columns.js b/js/dojo/dojox/charting/plot2d/Columns.js
--- a/js/dojo/dojox/charting/plot2d/Columns.js
+++ b/js/dojo/dojox/charting/plot2d/Columns.js
@@ -1,87 +1,102 @@
-if(!dojo._hasResource["dojox.charting.plot2d.Columns"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot2d.Columns"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.plot2d.Columns"]){
+dojo._hasResource["dojox.charting.plot2d.Columns"]=true;
dojo.provide("dojox.charting.plot2d.Columns");
-
dojo.require("dojox.charting.plot2d.common");
dojo.require("dojox.charting.plot2d.Base");
-
+dojo.require("dojox.gfx.fx");
dojo.require("dojox.lang.utils");
dojo.require("dojox.lang.functional");
-
+dojo.require("dojox.lang.functional.reversed");
(function(){
- var df = dojox.lang.functional, du = dojox.lang.utils,
- dc = dojox.charting.plot2d.common,
- purgeGroup = df.lambda("item.purgeGroup()");
-
- dojo.declare("dojox.charting.plot2d.Columns", dojox.charting.plot2d.Base, {
- defaultParams: {
- hAxis: "x", // use a horizontal axis named "x"
- vAxis: "y", // use a vertical axis named "y"
- gap: 0, // gap between columns in pixels
- shadows: null // draw shadows
- },
- optionalParams: {}, // no optional parameters
-
- constructor: function(chart, kwArgs){
- this.opt = dojo.clone(this.defaultParams);
- du.updateWithObject(this.opt, kwArgs);
- this.series = [];
- this.hAxis = this.opt.hAxis;
- this.vAxis = this.opt.vAxis;
- },
-
- calculateAxes: function(dim){
- var stats = dc.collectSimpleStats(this.series);
- stats.hmin -= 0.5;
- stats.hmax += 0.5;
- this._calc(dim, stats);
- return this;
- },
- render: function(dim, offsets){
- if(this.dirty){
- dojo.forEach(this.series, purgeGroup);
- this.cleanGroup();
- var s = this.group;
- df.forEachReversed(this.series, function(item){ item.cleanGroup(s); });
- }
- var t = this.chart.theme, color, stroke, fill, f,
- gap = this.opt.gap < this._hScaler.scale / 3 ? this.opt.gap : 0;
- for(var i = this.series.length - 1; i >= 0; --i){
- var run = this.series[i];
- if(!this.dirty && !run.dirty){ continue; }
- run.cleanGroup();
- var s = run.group;
- if(!run.fill || !run.stroke){
- // need autogenerated color
- color = run.dyn.color = new dojo.Color(t.next("color"));
- }
- stroke = run.stroke ? run.stroke : dc.augmentStroke(t.series.stroke, color);
- fill = run.fill ? run.fill : dc.augmentFill(t.series.fill, color);
- var baseline = Math.max(0, this._vScaler.bounds.lower),
- xoff = offsets.l + this._hScaler.scale * (0.5 - this._hScaler.bounds.lower) + gap,
- yoff = dim.height - offsets.b - this._vScaler.scale * (baseline - this._vScaler.bounds.lower);
- for(var j = 0; j < run.data.length; ++j){
- var v = run.data[j],
- width = this._hScaler.scale - 2 * gap,
- height = this._vScaler.scale * (v - baseline),
- h = Math.abs(height);
- if(width >= 1 && h >= 1){
- var rect = {
- x: xoff + this._hScaler.scale * j,
- y: yoff - (height < 0 ? 0 : height),
- width: width, height: h
- },
- shape = s.createRect(rect).setFill(fill).setStroke(stroke);
- run.dyn.fill = shape.getFill();
- run.dyn.stroke = shape.getStroke();
- }
- }
- run.dirty = false;
- }
- this.dirty = false;
- return this;
- }
- });
+var df=dojox.lang.functional,du=dojox.lang.utils,dc=dojox.charting.plot2d.common,_1=df.lambda("item.purgeGroup()");
+dojo.declare("dojox.charting.plot2d.Columns",dojox.charting.plot2d.Base,{defaultParams:{hAxis:"x",vAxis:"y",gap:0,shadows:null,animate:null},optionalParams:{minBarSize:1,maxBarSize:1},constructor:function(_2,_3){
+this.opt=dojo.clone(this.defaultParams);
+du.updateWithObject(this.opt,_3);
+du.updateWithPattern(this.opt,_3,this.optionalParams);
+this.series=[];
+this.hAxis=this.opt.hAxis;
+this.vAxis=this.opt.vAxis;
+this.animate=this.opt.animate;
+},calculateAxes:function(_4){
+var _5=dc.collectSimpleStats(this.series);
+_5.hmin-=0.5;
+_5.hmax+=0.5;
+this._calc(_4,_5);
+return this;
+},render:function(_6,_7){
+this.dirty=this.isDirty();
+if(this.dirty){
+dojo.forEach(this.series,_1);
+this.cleanGroup();
+var s=this.group;
+df.forEachRev(this.series,function(_8){
+_8.cleanGroup(s);
+});
+}
+var t=this.chart.theme,_9,_a,_b,f,_c,_d,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_e=Math.max(0,this._vScaler.bounds.lower),_f=vt(_e),_10=this.events();
+f=dc.calculateBarSize(this._hScaler.bounds.scale,this.opt);
+_c=f.gap;
+_d=f.size;
+this.resetEvents();
+for(var i=this.series.length-1;i>=0;--i){
+var run=this.series[i];
+if(!this.dirty&&!run.dirty){
+continue;
+}
+run.cleanGroup();
+var s=run.group;
+if(!run.fill||!run.stroke){
+_9=run.dyn.color=new dojo.Color(t.next("color"));
+}
+_a=run.stroke?run.stroke:dc.augmentStroke(t.series.stroke,_9);
+_b=run.fill?run.fill:dc.augmentFill(t.series.fill,_9);
+for(var j=0;j<run.data.length;++j){
+var _11=run.data[j],v=typeof _11=="number"?_11:_11.y,vv=vt(v),_12=vv-_f,h=Math.abs(_12),_13=_9,_14=_b,_15=_a;
+if(typeof _11!="number"){
+if(_11.color){
+_13=new dojo.Color(_11.color);
+}
+if("fill" in _11){
+_14=_11.fill;
+}else{
+if(_11.color){
+_14=dc.augmentFill(t.series.fill,_13);
+}
+}
+if("stroke" in _11){
+_15=_11.stroke;
+}else{
+if(_11.color){
+_15=dc.augmentStroke(t.series.stroke,_13);
+}
+}
+}
+if(_d>=1&&h>=1){
+var _16=s.createRect({x:_7.l+ht(j+0.5)+_c,y:_6.height-_7.b-(v>_e?vv:_f),width:_d,height:h}).setFill(_14).setStroke(_15);
+run.dyn.fill=_16.getFill();
+run.dyn.stroke=_16.getStroke();
+if(_10){
+var o={element:"column",index:j,run:run,plot:this,hAxis:this.hAxis||null,vAxis:this.vAxis||null,shape:_16,x:j+0.5,y:v};
+this._connectEvents(_16,o);
+}
+if(this.animate){
+this._animateColumn(_16,_6.height-_7.b-_f,h);
+}
+}
+}
+run.dirty=false;
+}
+this.dirty=false;
+return this;
+},_animateColumn:function(_17,_18,_19){
+dojox.gfx.fx.animateTransform(dojo.delegate({shape:_17,duration:1200,transform:[{name:"translate",start:[0,_18-(_18/_19)],end:[0,0]},{name:"scale",start:[1,1/_19],end:[1,1]},{name:"original"}]},this.animate)).play();
+}});
})();
-
}
diff --git a/js/dojo/dojox/charting/plot2d/Default.js b/js/dojo/dojox/charting/plot2d/Default.js
--- a/js/dojo/dojox/charting/plot2d/Default.js
+++ b/js/dojo/dojox/charting/plot2d/Default.js
@@ -1,135 +1,150 @@
-if(!dojo._hasResource["dojox.charting.plot2d.Default"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot2d.Default"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.plot2d.Default"]){
+dojo._hasResource["dojox.charting.plot2d.Default"]=true;
dojo.provide("dojox.charting.plot2d.Default");
-
dojo.require("dojox.charting.plot2d.common");
dojo.require("dojox.charting.plot2d.Base");
-
dojo.require("dojox.lang.utils");
dojo.require("dojox.lang.functional");
-
+dojo.require("dojox.lang.functional.reversed");
(function(){
- var df = dojox.lang.functional, du = dojox.lang.utils,
- dc = dojox.charting.plot2d.common,
- purgeGroup = df.lambda("item.purgeGroup()");
-
- dojo.declare("dojox.charting.plot2d.Default", dojox.charting.plot2d.Base, {
- defaultParams: {
- hAxis: "x", // use a horizontal axis named "x"
- vAxis: "y", // use a vertical axis named "y"
- lines: true, // draw lines
- areas: false, // draw areas
- markers: false, // draw markers
- shadows: 0 // draw shadows
- },
- optionalParams: {}, // no optional parameters
-
- constructor: function(chart, kwArgs){
- this.opt = dojo.clone(this.defaultParams);
- du.updateWithObject(this.opt, kwArgs);
- this.series = [];
- this.hAxis = this.opt.hAxis;
- this.vAxis = this.opt.vAxis;
- },
-
- calculateAxes: function(dim){
- this._calc(dim, dc.collectSimpleStats(this.series));
- return this;
- },
- render: function(dim, offsets){
- if(this.dirty){
- dojo.forEach(this.series, purgeGroup);
- this.cleanGroup();
- var s = this.group;
- df.forEachReversed(this.series, function(item){ item.cleanGroup(s); });
- }
- var t = this.chart.theme, stroke, outline, color, marker;
- for(var i = this.series.length - 1; i >= 0; --i){
- var run = this.series[i];
- if(!this.dirty && !run.dirty){ continue; }
- run.cleanGroup();
- if(!run.data.length){
- run.dirty = false;
- continue;
- }
- var s = run.group, lpoly;
- if(typeof run.data[0] == "number"){
- lpoly = dojo.map(run.data, function(v, i){
- return {
- x: this._hScaler.scale * (i + 1 - this._hScaler.bounds.lower) + offsets.l,
- y: dim.height - offsets.b - this._vScaler.scale * (v - this._vScaler.bounds.lower)
- };
- }, this);
- }else{
- lpoly = dojo.map(run.data, function(v, i){
- return {
- x: this._hScaler.scale * (v.x - this._hScaler.bounds.lower) + offsets.l,
- y: dim.height - offsets.b - this._vScaler.scale * (v.y - this._vScaler.bounds.lower)
- };
- }, this);
- }
- if(!run.fill || !run.stroke){
- // need autogenerated color
- color = run.dyn.color = new dojo.Color(t.next("color"));
- }
- if(this.opt.areas){
- var apoly = dojo.clone(lpoly);
- apoly.push({x: lpoly[lpoly.length - 1].x, y: dim.height - offsets.b});
- apoly.push({x: lpoly[0].x, y: dim.height - offsets.b});
- apoly.push(lpoly[0]);
- var fill = run.fill ? run.fill : dc.augmentFill(t.series.fill, color);
- run.dyn.fill = s.createPolyline(apoly).setFill(fill).getFill();
- }
- if(this.opt.lines || this.opt.markers){
- // need a stroke
- stroke = run.stroke ? dc.makeStroke(run.stroke) : dc.augmentStroke(t.series.stroke, color);
- if(run.outline || t.series.outline){
- outline = dc.makeStroke(run.outline ? run.outline : t.series.outline);
- outline.width = 2 * outline.width + stroke.width;
- }
- }
- if(this.opt.markers){
- // need a marker
- marker = run.dyn.marker = run.marker ? run.marker : t.next("marker");
- }
- if(this.opt.shadows && stroke){
- var sh = this.opt.shadows, shadowColor = new dojo.Color([0, 0, 0, 0.3]),
- spoly = dojo.map(lpoly, function(c){
- return {x: c.x + sh.dx, y: c.y + sh.dy};
- }),
- shadowStroke = dojo.clone(outline ? outline : stroke);
- shadowStroke.color = shadowColor;
- shadowStroke.width += sh.dw ? sh.dw : 0;
- if(this.opt.lines){
- s.createPolyline(spoly).setStroke(shadowStroke);
- }
- if(this.opt.markers){
- dojo.forEach(spoly, function(c){
- s.createPath("M" + c.x + " " + c.y + " " + marker).setStroke(shadowStroke).setFill(shadowColor);
- }, this);
- }
- }
- if(this.opt.lines){
- if(outline){
- run.dyn.outline = s.createPolyline(lpoly).setStroke(outline).getStroke();
- }
- run.dyn.stroke = s.createPolyline(lpoly).setStroke(stroke).getStroke();
- }
- if(this.opt.markers){
- dojo.forEach(lpoly, function(c){
- var path = "M" + c.x + " " + c.y + " " + marker;
- if(outline){
- s.createPath(path).setStroke(outline);
- }
- s.createPath(path).setStroke(stroke).setFill(stroke.color);
- }, this);
- }
- run.dirty = false;
- }
- this.dirty = false;
- return this;
- }
- });
+var df=dojox.lang.functional,du=dojox.lang.utils,dc=dojox.charting.plot2d.common,_1=df.lambda("item.purgeGroup()");
+dojo.declare("dojox.charting.plot2d.Default",dojox.charting.plot2d.Base,{defaultParams:{hAxis:"x",vAxis:"y",lines:true,areas:false,markers:false,shadows:0,tension:0},optionalParams:{},constructor:function(_2,_3){
+this.opt=dojo.clone(this.defaultParams);
+du.updateWithObject(this.opt,_3);
+this.series=[];
+this.hAxis=this.opt.hAxis;
+this.vAxis=this.opt.vAxis;
+},calculateAxes:function(_4){
+this._calc(_4,dc.collectSimpleStats(this.series));
+return this;
+},render:function(_5,_6){
+this.dirty=this.isDirty();
+if(this.dirty){
+dojo.forEach(this.series,_1);
+this.cleanGroup();
+var s=this.group;
+df.forEachRev(this.series,function(_7){
+_7.cleanGroup(s);
+});
+}
+var t=this.chart.theme,_8,_9,_a,_b,_c=this.events();
+this.resetEvents();
+for(var i=this.series.length-1;i>=0;--i){
+var _d=this.series[i];
+if(!this.dirty&&!_d.dirty){
+continue;
+}
+_d.cleanGroup();
+if(!_d.data.length){
+_d.dirty=false;
+continue;
+}
+var s=_d.group,_e,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler);
+if(typeof _d.data[0]=="number"){
+_e=dojo.map(_d.data,function(v,i){
+return {x:ht(i+1)+_6.l,y:_5.height-_6.b-vt(v)};
+},this);
+}else{
+_e=dojo.map(_d.data,function(v,i){
+return {x:ht(v.x)+_6.l,y:_5.height-_6.b-vt(v.y)};
+},this);
+}
+if(!_d.fill||!_d.stroke){
+_a=_d.dyn.color=new dojo.Color(t.next("color"));
+}
+var _f=this.opt.tension?dc.curve(_e,this.opt.tension):"";
+if(this.opt.areas){
+var _10=_d.fill?_d.fill:dc.augmentFill(t.series.fill,_a);
+var _11=dojo.clone(_e);
+if(this.opt.tension){
+var _12="L"+_11[_11.length-1].x+","+(_5.height-_6.b)+" L"+_11[0].x+","+(_5.height-_6.b)+" L"+_11[0].x+","+_11[0].y;
+_d.dyn.fill=s.createPath(_f+" "+_12).setFill(_10).getFill();
+}else{
+_11.push({x:_e[_e.length-1].x,y:_5.height-_6.b});
+_11.push({x:_e[0].x,y:_5.height-_6.b});
+_11.push(_e[0]);
+_d.dyn.fill=s.createPolyline(_11).setFill(_10).getFill();
+}
+}
+if(this.opt.lines||this.opt.markers){
+_8=_d.dyn.stroke=_d.stroke?dc.makeStroke(_d.stroke):dc.augmentStroke(t.series.stroke,_a);
+if(_d.outline||t.series.outline){
+_9=_d.dyn.outline=dc.makeStroke(_d.outline?_d.outline:t.series.outline);
+_9.width=2*_9.width+_8.width;
+}
+}
+if(this.opt.markers){
+_b=_d.dyn.marker=_d.marker?_d.marker:t.next("marker");
+}
+var _13=null,_14=null,_15=null;
+if(this.opt.shadows&&_8){
+var sh=this.opt.shadows,_16=new dojo.Color([0,0,0,0.3]),_17=dojo.map(_e,function(c){
+return {x:c.x+sh.dx,y:c.y+sh.dy};
+}),_18=dojo.clone(_9?_9:_8);
+_18.color=_16;
+_18.width+=sh.dw?sh.dw:0;
+if(this.opt.lines){
+if(this.opt.tension){
+_d.dyn.shadow=s.createPath(dc.curve(_17,this.opt.tension)).setStroke(_18).getStroke();
+}else{
+_d.dyn.shadow=s.createPolyline(_17).setStroke(_18).getStroke();
+}
+}
+if(this.opt.markers){
+_15=dojo.map(_17,function(c){
+return s.createPath("M"+c.x+" "+c.y+" "+_b).setStroke(_18).setFill(_16);
+},this);
+}
+}
+if(this.opt.lines){
+if(_9){
+if(this.opt.tension){
+_d.dyn.outline=s.createPath(_f).setStroke(_9).getStroke();
+}else{
+_d.dyn.outline=s.createPolyline(_e).setStroke(_9).getStroke();
+}
+}
+if(this.opt.tension){
+_d.dyn.stroke=s.createPath(_f).setStroke(_8).getStroke();
+}else{
+_d.dyn.stroke=s.createPolyline(_e).setStroke(_8).getStroke();
+}
+}
+if(this.opt.markers){
+_13=new Array(_e.length);
+_14=new Array(_e.length);
+dojo.forEach(_e,function(c,i){
+var _19="M"+c.x+" "+c.y+" "+_b;
+if(_9){
+_14[i]=s.createPath(_19).setStroke(_9);
+}
+_13[i]=s.createPath(_19).setStroke(_8).setFill(_8.color);
+},this);
+if(_c){
+dojo.forEach(_13,function(s,i){
+var o={element:"marker",index:i,run:_d,plot:this,hAxis:this.hAxis||null,vAxis:this.vAxis||null,shape:s,outline:_14[i]||null,shadow:_15&&_15[i]||null,cx:_e[i].x,cy:_e[i].y};
+if(typeof _d.data[0]=="number"){
+o.x=i+1;
+o.y=_d.data[i];
+}else{
+o.x=_d.data[i].x;
+o.y=_d.data[i].y;
+}
+this._connectEvents(s,o);
+},this);
+}
+}
+_d.dirty=false;
+}
+this.dirty=false;
+return this;
+}});
})();
-
}
diff --git a/js/dojo/dojox/charting/plot2d/Grid.js b/js/dojo/dojox/charting/plot2d/Grid.js
--- a/js/dojo/dojox/charting/plot2d/Grid.js
+++ b/js/dojo/dojox/charting/plot2d/Grid.js
@@ -1,116 +1,85 @@
-if(!dojo._hasResource["dojox.charting.plot2d.Grid"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot2d.Grid"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.plot2d.Grid"]){
+dojo._hasResource["dojox.charting.plot2d.Grid"]=true;
dojo.provide("dojox.charting.plot2d.Grid");
-
dojo.require("dojox.charting.Element");
dojo.require("dojox.charting.plot2d.common");
dojo.require("dojox.lang.functional");
-
(function(){
- var du = dojox.lang.utils;
-
- dojo.declare("dojox.charting.plot2d.Grid", dojox.charting.Element, {
- defaultParams: {
- hAxis: "x", // use a horizontal axis named "x"
- vAxis: "y", // use a vertical axis named "y"
- hMajorLines: true, // draw horizontal major lines
- hMinorLines: false, // draw horizontal minor lines
- vMajorLines: true, // draw vertical major lines
- vMinorLines: false, // draw vertical minor lines
- hStripes: "none", // TBD
- vStripes: "none" // TBD
- },
- optionalParams: {}, // no optional parameters
-
- constructor: function(chart, kwArgs){
- this.opt = dojo.clone(this.defaultParams);
- du.updateWithObject(this.opt, kwArgs);
- this.hAxis = this.opt.hAxis;
- this.vAxis = this.opt.vAxis;
- },
- clear: function(){
- this._hAxis = null;
- this._vAxis = null;
- this.dirty = true;
- return this;
- },
- setAxis: function(axis){
- if(axis){
- this[axis.vertical ? "_vAxis" : "_hAxis"] = axis;
- }
- return this;
- },
- addSeries: function(run){
- // nothing
- return this;
- },
- calculateAxes: function(dim){
- // nothing
- return this;
- },
- getRequiredColors: function(){
- return 0;
- },
- render: function(dim, offsets){
- // draw horizontal stripes and lines
- if(!this.dirty){ return this; }
- this.cleanGroup();
- var s = this.group, ta = this.chart.theme.axis,
- scaler = this._vAxis.getScaler();
- if(this.opt.hMinorLines && scaler.minor.tick){
- for(var i = 0; i < scaler.minor.count; ++i){
- var y = dim.height - offsets.b - scaler.scale *
- (scaler.minor.start - scaler.bounds.lower + i * scaler.minor.tick);
- s.createLine({
- x1: offsets.l,
- y1: y,
- x2: dim.width - offsets.r,
- y2: y
- }).setStroke(ta.minorTick);
- }
- }
- if(this.opt.hMajorLines && scaler.major.tick){
- for(var i = 0; i < scaler.major.count; ++i){
- var y = dim.height - offsets.b - scaler.scale *
- (scaler.major.start - scaler.bounds.lower + i * scaler.major.tick);
- s.createLine({
- x1: offsets.l,
- y1: y,
- x2: dim.width - offsets.r,
- y2: y
- }).setStroke(ta.majorTick);
- }
- }
- // draw vertical stripes and lines
- scaler = this._hAxis.getScaler();
- if(this.opt.vMinorLines && scaler.minor.tick){
- for(var i = 0; i < scaler.minor.count; ++i){
- var x = offsets.l + scaler.scale *
- (scaler.minor.start - scaler.bounds.lower + i * scaler.minor.tick);
- s.createLine({
- x1: x,
- y1: offsets.t,
- x2: x,
- y2: dim.height - offsets.b
- }).setStroke(ta.minorTick);
- }
- }
- if(this.opt.vMajorLines && scaler.major.tick){
- for(var i = 0; i < scaler.major.count; ++i){
- var x = offsets.l + scaler.scale *
- (scaler.major.start - scaler.bounds.lower + i * scaler.major.tick);
- s.createLine({
- x1: x,
- y1: offsets.t,
- x2: x,
- y2: dim.height - offsets.b
- }).setStroke(ta.majorTick);
- }
- }
- this.dirty = false;
- return this;
- }
- });
+var du=dojox.lang.utils;
+dojo.declare("dojox.charting.plot2d.Grid",dojox.charting.Element,{defaultParams:{hAxis:"x",vAxis:"y",hMajorLines:true,hMinorLines:false,vMajorLines:true,vMinorLines:false,hStripes:"none",vStripes:"none"},optionalParams:{},constructor:function(_1,_2){
+this.opt=dojo.clone(this.defaultParams);
+du.updateWithObject(this.opt,_2);
+this.hAxis=this.opt.hAxis;
+this.vAxis=this.opt.vAxis;
+this.dirty=true;
+},clear:function(){
+this._hAxis=null;
+this._vAxis=null;
+this.dirty=true;
+return this;
+},setAxis:function(_3){
+if(_3){
+this[_3.vertical?"_vAxis":"_hAxis"]=_3;
+}
+return this;
+},addSeries:function(_4){
+return this;
+},calculateAxes:function(_5){
+return this;
+},isDirty:function(){
+return this.dirty||this._hAxis&&this._hAxis.dirty||this._vAxis&&this._vAxis.dirty;
+},getRequiredColors:function(){
+return 0;
+},render:function(_6,_7){
+this.dirty=this.isDirty();
+if(!this.dirty){
+return this;
+}
+this.cleanGroup();
+var s=this.group,ta=this.chart.theme.axis;
+try{
+var _8=this._vAxis.getScaler(),vt=_8.scaler.getTransformerFromModel(_8),_9=this._vAxis.getTicks();
+if(this.opt.hMinorLines){
+dojo.forEach(_9.minor,function(_a){
+var y=_6.height-_7.b-vt(_a.value);
+s.createLine({x1:_7.l,y1:y,x2:_6.width-_7.r,y2:y}).setStroke(ta.minorTick);
+});
+}
+if(this.opt.hMajorLines){
+dojo.forEach(_9.major,function(_b){
+var y=_6.height-_7.b-vt(_b.value);
+s.createLine({x1:_7.l,y1:y,x2:_6.width-_7.r,y2:y}).setStroke(ta.majorTick);
+});
+}
+}
+catch(e){
+}
+try{
+var _c=this._hAxis.getScaler(),ht=_c.scaler.getTransformerFromModel(_c),_9=this._hAxis.getTicks();
+if(_9&&this.opt.vMinorLines){
+dojo.forEach(_9.minor,function(_d){
+var x=_7.l+ht(_d.value);
+s.createLine({x1:x,y1:_7.t,x2:x,y2:_6.height-_7.b}).setStroke(ta.minorTick);
+});
+}
+if(_9&&this.opt.vMajorLines){
+dojo.forEach(_9.major,function(_e){
+var x=_7.l+ht(_e.value);
+s.createLine({x1:x,y1:_7.t,x2:x,y2:_6.height-_7.b}).setStroke(ta.majorTick);
+});
+}
+}
+catch(e){
+}
+this.dirty=false;
+return this;
+}});
})();
-
}
diff --git a/js/dojo/dojox/charting/plot2d/Lines.js b/js/dojo/dojox/charting/plot2d/Lines.js
--- a/js/dojo/dojox/charting/plot2d/Lines.js
+++ b/js/dojo/dojox/charting/plot2d/Lines.js
@@ -1,13 +1,15 @@
-if(!dojo._hasResource["dojox.charting.plot2d.Lines"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot2d.Lines"] = true;
-dojo.provide("dojox.charting.plot2d.Lines");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.require("dojox.charting.plot2d.Default");
-dojo.declare("dojox.charting.plot2d.Lines", dojox.charting.plot2d.Default, {
- constructor: function(){
- this.opt.lines = true;
- }
-});
-
+if(!dojo._hasResource["dojox.charting.plot2d.Lines"]){
+dojo._hasResource["dojox.charting.plot2d.Lines"]=true;
+dojo.provide("dojox.charting.plot2d.Lines");
+dojo.require("dojox.charting.plot2d.Default");
+dojo.declare("dojox.charting.plot2d.Lines",dojox.charting.plot2d.Default,{constructor:function(){
+this.opt.lines=true;
+}});
}
diff --git a/js/dojo/dojox/charting/plot2d/Markers.js b/js/dojo/dojox/charting/plot2d/Markers.js
--- a/js/dojo/dojox/charting/plot2d/Markers.js
+++ b/js/dojo/dojox/charting/plot2d/Markers.js
@@ -1,13 +1,15 @@
-if(!dojo._hasResource["dojox.charting.plot2d.Markers"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot2d.Markers"] = true;
-dojo.provide("dojox.charting.plot2d.Markers");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.require("dojox.charting.plot2d.Default");
-dojo.declare("dojox.charting.plot2d.Markers", dojox.charting.plot2d.Default, {
- constructor: function(){
- this.opt.markers = true;
- }
-});
-
+if(!dojo._hasResource["dojox.charting.plot2d.Markers"]){
+dojo._hasResource["dojox.charting.plot2d.Markers"]=true;
+dojo.provide("dojox.charting.plot2d.Markers");
+dojo.require("dojox.charting.plot2d.Default");
+dojo.declare("dojox.charting.plot2d.Markers",dojox.charting.plot2d.Default,{constructor:function(){
+this.opt.markers=true;
+}});
}
diff --git a/js/dojo/dojox/charting/plot2d/MarkersOnly.js b/js/dojo/dojox/charting/plot2d/MarkersOnly.js
--- a/js/dojo/dojox/charting/plot2d/MarkersOnly.js
+++ b/js/dojo/dojox/charting/plot2d/MarkersOnly.js
@@ -1,14 +1,16 @@
-if(!dojo._hasResource["dojox.charting.plot2d.MarkersOnly"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot2d.MarkersOnly"] = true;
-dojo.provide("dojox.charting.plot2d.MarkersOnly");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.require("dojox.charting.plot2d.Default");
-dojo.declare("dojox.charting.plot2d.MarkersOnly", dojox.charting.plot2d.Default, {
- constructor: function(){
- this.opt.lines = false;
- this.opt.markers = true;
- }
-});
-
+if(!dojo._hasResource["dojox.charting.plot2d.MarkersOnly"]){
+dojo._hasResource["dojox.charting.plot2d.MarkersOnly"]=true;
+dojo.provide("dojox.charting.plot2d.MarkersOnly");
+dojo.require("dojox.charting.plot2d.Default");
+dojo.declare("dojox.charting.plot2d.MarkersOnly",dojox.charting.plot2d.Default,{constructor:function(){
+this.opt.lines=false;
+this.opt.markers=true;
+}});
}
diff --git a/js/dojo/dojox/charting/plot2d/Pie.js b/js/dojo/dojox/charting/plot2d/Pie.js
--- a/js/dojo/dojox/charting/plot2d/Pie.js
+++ b/js/dojo/dojox/charting/plot2d/Pie.js
@@ -1,179 +1,207 @@
-if(!dojo._hasResource["dojox.charting.plot2d.Pie"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot2d.Pie"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.plot2d.Pie"]){
+dojo._hasResource["dojox.charting.plot2d.Pie"]=true;
dojo.provide("dojox.charting.plot2d.Pie");
-
dojo.require("dojox.charting.Element");
dojo.require("dojox.charting.axis2d.common");
dojo.require("dojox.charting.plot2d.common");
-
dojo.require("dojox.lang.functional");
dojo.require("dojox.gfx");
-
(function(){
- var df = dojox.lang.functional, du = dojox.lang.utils,
- dc = dojox.charting.plot2d.common,
- da = dojox.charting.axis2d.common,
- g = dojox.gfx,
- labelFudgeFactor = 0.8; // in percents (to convert font's heigth to label width)
-
- dojo.declare("dojox.charting.plot2d.Pie", dojox.charting.Element, {
- defaultParams: {
- labels: true,
- ticks: false,
- fixed: true,
- precision: 1,
- labelOffset: 20,
- labelStyle: "default", // default/rows/auto
- htmlLabels: true // use HTML to draw labels
- },
- optionalParams: {
- font: "",
- fontColor: "",
- radius: 0
- },
-
- constructor: function(chart, kwArgs){
- this.opt = dojo.clone(this.defaultParams);
- du.updateWithObject(this.opt, kwArgs);
- du.updateWithPattern(this.opt, kwArgs, this.optionalParams);
- this.run = null;
- this.dyn = [];
- },
- clear: function(){
- this.dirty = true;
- this.dyn = [];
- return this;
- },
- setAxis: function(axis){
- // nothing
- return this;
- },
- addSeries: function(run){
- this.run = run;
- return this;
- },
- calculateAxes: function(dim){
- // nothing
- return this;
- },
- getRequiredColors: function(){
- return this.run ? this.run.data.length : 0;
- },
- render: function(dim, offsets){
- if(!this.dirty){ return this; }
- this.dirty = false;
- this.cleanGroup();
- var s = this.group, color, t = this.chart.theme;
-
- // calculate the geometry
- var rx = (dim.width - offsets.l - offsets.r) / 2,
- ry = (dim.height - offsets.t - offsets.b) / 2,
- r = Math.min(rx, ry),
- taFont = "font" in this.opt ? this.opt.font : t.axis.font,
- taFontColor = "fontColor" in this.opt ? this.opt.fontColor : t.axis.fontColor,
- sum = df.foldl1(this.run.data, "+"), start = 0, step,
- slices = dojo.map(this.run.data, function(x){ return x / sum; }),
- shift, size, labelR;
- if(this.opt.labels){
- var labels = dojo.map(slices, function(x){
- return this._getLabel(x * 100) + "%";
- }, this);
- shift = df.foldl1(dojo.map(labels, df.pluck("length")), "x, y -> Math.max(x, y)");
- size = taFont ? g.normalizedLength(g.splitFontString(taFont).size) : 0;
- shift = Math.max(shift * labelFudgeFactor, 1) / 2 * size;
- if(this.opt.labelOffset < 0){
- r = Math.min(rx - 2 * shift, ry - size) + this.opt.labelOffset;
- }
- labelR = r - this.opt.labelOffset;
- }
- if("radius" in this.opt){
- r = this.opt.radius;
- labelR = r - this.opt.labelOffset;
- }
- var circle = {
- cx: offsets.l + rx,
- cy: offsets.t + ry,
- r: r
- };
-
- this.dyn = [];
- if(!this.run || !this.run.data.length){
- return this;
- }
- if(this.run.data.length == 1){
- // need autogenerated color
- color = new dojo.Color(t.next("color"));
- var shape = s.createCircle(circle).
- setFill(dc.augmentFill(t.run.fill, color)).
- setStroke(dc.augmentStroke(t.series.stroke, color));
- this.dyn.push({color: color, fill: shape.getFill(), stroke: shape.getStroke()});
- if(this.opt.labels){
- var shift = 4,
- taFont = "font" in this.opt ? this.opt.font : t.axis.font,
- taFontColor = "fontColor" in this.opt ? this.opt.fontColor : t.axis.fontColor,
- size = taFont ? g.normalizedLength(g.splitFontString(taFont).size) : 0;
- shift = Math.max(shift * labelFudgeFactor, 1) / 2 * size;
- // draw the label
- var elem = da.createText[this.opt.htmlLabels ? "html" : "gfx"]
- (this.chart, s, circle.cx, circle.cy + size / 2, "middle",
- "100%", taFont, taFontColor);
- if(this.opt.htmlLabels){ this.htmlElements.push(elem); }
- }
- return this;
- }
- // draw slices
- dojo.forEach(slices, function(x, i){
- // calculate the geometry of the slice
- var end = start + x * 2 * Math.PI;
- if(i + 1 == slices.length){
- end = 2 * Math.PI;
- }
- var step = end - start,
- x1 = circle.cx + r * Math.cos(start),
- y1 = circle.cy + r * Math.sin(start),
- x2 = circle.cx + r * Math.cos(end),
- y2 = circle.cy + r * Math.sin(end);
- // draw the slice
- color = new dojo.Color(t.next("color"));
- var shape = s.createPath({}).
- moveTo(circle.cx, circle.cy).
- lineTo(x1, y1).
- arcTo(r, r, 0, step > Math.PI, true, x2, y2).
- lineTo(circle.cx, circle.cy).
- closePath().
- setFill(dc.augmentFill(t.series.fill, color)).
- setStroke(dc.augmentStroke(t.series.stroke, color));
- this.dyn.push({color: color, fill: shape.getFill(), stroke: shape.getStroke()});
- start = end;
- }, this);
- // draw labels
- if(this.opt.labels){
- start = 0;
- dojo.forEach(slices, function(x, i){
- // calculate the geometry of the slice
- var end = start + x * 2 * Math.PI;
- if(i + 1 == slices.length){
- end = 2 * Math.PI;
- }
- var labelAngle = (start + end) / 2,
- x = circle.cx + labelR * Math.cos(labelAngle),
- y = circle.cy + labelR * Math.sin(labelAngle) + size / 2;
- // draw the label
- var elem = da.createText[this.opt.htmlLabels ? "html" : "gfx"]
- (this.chart, s, x, y, "middle",
- labels[i], taFont, taFontColor);
- if(this.opt.htmlLabels){ this.htmlElements.push(elem); }
- start = end;
- }, this);
- }
- return this;
- },
-
- // utilities
- _getLabel: function(number){
- return this.opt.fixed ? number.toFixed(this.opt.precision) : number.toString();
- }
- });
+var df=dojox.lang.functional,du=dojox.lang.utils,dc=dojox.charting.plot2d.common,da=dojox.charting.axis2d.common,g=dojox.gfx;
+dojo.declare("dojox.charting.plot2d.Pie",dojox.charting.Element,{defaultParams:{labels:true,ticks:false,fixed:true,precision:1,labelOffset:20,labelStyle:"default",htmlLabels:true},optionalParams:{font:"",fontColor:"",radius:0},constructor:function(_1,_2){
+this.opt=dojo.clone(this.defaultParams);
+du.updateWithObject(this.opt,_2);
+du.updateWithPattern(this.opt,_2,this.optionalParams);
+this.run=null;
+this.dyn=[];
+},destroy:function(){
+this.resetEvents();
+this.inherited(arguments);
+},clear:function(){
+this.dirty=true;
+this.dyn=[];
+this.run=null;
+return this;
+},setAxis:function(_3){
+return this;
+},addSeries:function(_4){
+this.run=_4;
+return this;
+},calculateAxes:function(_5){
+return this;
+},getRequiredColors:function(){
+return this.run?this.run.data.length:0;
+},plotEvent:function(o){
+},connect:function(_6,_7){
+this.dirty=true;
+return dojo.connect(this,"plotEvent",_6,_7);
+},events:function(){
+var ls=this.plotEvent._listeners;
+if(!ls||!ls.length){
+return false;
+}
+for(var i in ls){
+if(!(i in Array.prototype)){
+return true;
+}
+}
+return false;
+},resetEvents:function(){
+this.plotEvent({type:"onplotreset",plot:this});
+},_connectEvents:function(_8,o){
+_8.connect("onmouseover",this,function(e){
+o.type="onmouseover";
+o.event=e;
+this.plotEvent(o);
+});
+_8.connect("onmouseout",this,function(e){
+o.type="onmouseout";
+o.event=e;
+this.plotEvent(o);
+});
+_8.connect("onclick",this,function(e){
+o.type="onclick";
+o.event=e;
+this.plotEvent(o);
+});
+},render:function(_9,_a){
+if(!this.dirty){
+return this;
+}
+this.dirty=false;
+this.cleanGroup();
+var s=this.group,_b,t=this.chart.theme;
+this.resetEvents();
+if(!this.run||!this.run.data.length){
+return this;
+}
+var rx=(_9.width-_a.l-_a.r)/2,ry=(_9.height-_a.t-_a.b)/2,r=Math.min(rx,ry),_c="font" in this.opt?this.opt.font:t.axis.font,_d=_c?g.normalizedLength(g.splitFontString(_c).size):0,_e="fontColor" in this.opt?this.opt.fontColor:t.axis.fontColor,_f=0,_10,_11,_12,_13,_14,_15,run=this.run.data,_16=this.events();
+if(typeof run[0]=="number"){
+_11=df.map(run,"Math.max(x, 0)");
+if(df.every(_11,"<= 0")){
+return this;
+}
+_12=df.map(_11,"/this",df.foldl(_11,"+",0));
+if(this.opt.labels){
+_13=dojo.map(_12,function(x){
+return x>0?this._getLabel(x*100)+"%":"";
+},this);
+}
+}else{
+_11=df.map(run,"Math.max(x.y, 0)");
+if(df.every(_11,"<= 0")){
+return this;
+}
+_12=df.map(_11,"/this",df.foldl(_11,"+",0));
+if(this.opt.labels){
+_13=dojo.map(_12,function(x,i){
+if(x<=0){
+return "";
+}
+var v=run[i];
+return "text" in v?v.text:this._getLabel(x*100)+"%";
+},this);
+}
+}
+if(this.opt.labels){
+_14=df.foldl1(df.map(_13,function(_17){
+return dojox.gfx._base._getTextBox(_17,{font:_c}).w;
+},this),"Math.max(a, b)")/2;
+if(this.opt.labelOffset<0){
+r=Math.min(rx-2*_14,ry-_d)+this.opt.labelOffset;
+}
+_15=r-this.opt.labelOffset;
+}
+if("radius" in this.opt){
+r=this.opt.radius;
+_15=r-this.opt.labelOffset;
+}
+var _18={cx:_a.l+rx,cy:_a.t+ry,r:r};
+this.dyn=[];
+dojo.some(_12,function(_19,i){
+if(_19<=0){
+return false;
+}
+var v=run[i];
+if(_19>=1){
+var _1a,_1b,_1c;
+if(typeof v=="object"){
+_1a="color" in v?v.color:new dojo.Color(t.next("color"));
+_1b="fill" in v?v.fill:dc.augmentFill(t.series.fill,_1a);
+_1c="stroke" in v?v.stroke:dc.augmentStroke(t.series.stroke,_1a);
+}else{
+_1a=new dojo.Color(t.next("color"));
+_1b=dc.augmentFill(t.series.fill,_1a);
+_1c=dc.augmentStroke(t.series.stroke,_1a);
+}
+var _1d=s.createCircle(_18).setFill(_1b).setStroke(_1c);
+this.dyn.push({color:_1a,fill:_1b,stroke:_1c});
+if(_16){
+var o={element:"slice",index:i,run:this.run,plot:this,shape:_1d,x:i,y:typeof v=="number"?v:v.y,cx:_18.cx,cy:_18.cy,cr:r};
+this._connectEvents(_1d,o);
+}
+return true;
+}
+var end=_f+_19*2*Math.PI;
+if(i+1==_12.length){
+end=2*Math.PI;
+}
+var _1e=end-_f,x1=_18.cx+r*Math.cos(_f),y1=_18.cy+r*Math.sin(_f),x2=_18.cx+r*Math.cos(end),y2=_18.cy+r*Math.sin(end);
+var _1a,_1b,_1c;
+if(typeof v=="object"){
+_1a="color" in v?v.color:new dojo.Color(t.next("color"));
+_1b="fill" in v?v.fill:dc.augmentFill(t.series.fill,_1a);
+_1c="stroke" in v?v.stroke:dc.augmentStroke(t.series.stroke,_1a);
+}else{
+_1a=new dojo.Color(t.next("color"));
+_1b=dc.augmentFill(t.series.fill,_1a);
+_1c=dc.augmentStroke(t.series.stroke,_1a);
+}
+var _1d=s.createPath({}).moveTo(_18.cx,_18.cy).lineTo(x1,y1).arcTo(r,r,0,_1e>Math.PI,true,x2,y2).lineTo(_18.cx,_18.cy).closePath().setFill(_1b).setStroke(_1c);
+this.dyn.push({color:_1a,fill:_1b,stroke:_1c});
+if(_16){
+var o={element:"slice",index:i,run:this.run,plot:this,shape:_1d,x:i,y:typeof v=="number"?v:v.y,cx:_18.cx,cy:_18.cy,cr:r};
+this._connectEvents(_1d,o);
+}
+_f=end;
+return false;
+},this);
+if(this.opt.labels){
+_f=0;
+dojo.some(_12,function(_1f,i){
+if(_1f<=0){
+return false;
+}
+if(_1f>=1){
+var v=run[i],_20=da.createText[this.opt.htmlLabels&&dojox.gfx.renderer!="vml"?"html":"gfx"](this.chart,s,_18.cx,_18.cy+_d/2,"middle",_13[i],_c,(typeof v=="object"&&"fontColor" in v)?v.fontColor:_e);
+if(this.opt.htmlLabels){
+this.htmlElements.push(_20);
+}
+return true;
+}
+var end=_f+_1f*2*Math.PI,v=run[i];
+if(i+1==_12.length){
+end=2*Math.PI;
+}
+var _21=(_f+end)/2,x=_18.cx+_15*Math.cos(_21),y=_18.cy+_15*Math.sin(_21)+_d/2;
+var _20=da.createText[this.opt.htmlLabels&&dojox.gfx.renderer!="vml"?"html":"gfx"](this.chart,s,x,y,"middle",_13[i],_c,(typeof v=="object"&&"fontColor" in v)?v.fontColor:_e);
+if(this.opt.htmlLabels){
+this.htmlElements.push(_20);
+}
+_f=end;
+return false;
+},this);
+}
+return this;
+},_getLabel:function(_22){
+return this.opt.fixed?_22.toFixed(this.opt.precision):_22.toString();
+}});
})();
-
}
diff --git a/js/dojo/dojox/charting/plot2d/Scatter.js b/js/dojo/dojox/charting/plot2d/Scatter.js
--- a/js/dojo/dojox/charting/plot2d/Scatter.js
+++ b/js/dojo/dojox/charting/plot2d/Scatter.js
@@ -1,14 +1,16 @@
-if(!dojo._hasResource["dojox.charting.plot2d.Scatter"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot2d.Scatter"] = true;
-dojo.provide("dojox.charting.plot2d.Scatter");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.require("dojox.charting.plot2d.Default");
-dojo.declare("dojox.charting.plot2d.Scatter", dojox.charting.plot2d.Default, {
- constructor: function(){
- this.opt.lines = false;
- this.opt.markers = true;
- }
-});
-
+if(!dojo._hasResource["dojox.charting.plot2d.Scatter"]){
+dojo._hasResource["dojox.charting.plot2d.Scatter"]=true;
+dojo.provide("dojox.charting.plot2d.Scatter");
+dojo.require("dojox.charting.plot2d.Default");
+dojo.declare("dojox.charting.plot2d.Scatter",dojox.charting.plot2d.Default,{constructor:function(){
+this.opt.lines=false;
+this.opt.markers=true;
+}});
}
diff --git a/js/dojo/dojox/charting/plot2d/Stacked.js b/js/dojo/dojox/charting/plot2d/Stacked.js
--- a/js/dojo/dojox/charting/plot2d/Stacked.js
+++ b/js/dojo/dojox/charting/plot2d/Stacked.js
@@ -1,121 +1,150 @@
-if(!dojo._hasResource["dojox.charting.plot2d.Stacked"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot2d.Stacked"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.plot2d.Stacked"]){
+dojo._hasResource["dojox.charting.plot2d.Stacked"]=true;
dojo.provide("dojox.charting.plot2d.Stacked");
-
dojo.require("dojox.charting.plot2d.common");
dojo.require("dojox.charting.plot2d.Default");
-
dojo.require("dojox.lang.functional");
-
+dojo.require("dojox.lang.functional.sequence");
+dojo.require("dojox.lang.functional.reversed");
(function(){
- var df = dojox.lang.functional, dc = dojox.charting.plot2d.common,
- purgeGroup = df.lambda("item.purgeGroup()");
-
- dojo.declare("dojox.charting.plot2d.Stacked", dojox.charting.plot2d.Default, {
- calculateAxes: function(dim){
- var stats = dc.collectStackedStats(this.series);
- this._maxRunLength = stats.hmax;
- this._calc(dim, stats);
- return this;
- },
- render: function(dim, offsets){
- // stack all values
- var acc = df.repeat(this._maxRunLength, "-> 0", 0);
- for(var i = 0; i < this.series.length; ++i){
- var run = this.series[i];
- for(var j = 0; j < run.data.length; ++j){
- var v = run.data[j];
- if(isNaN(v)){ v = 0; }
- acc[j] += v;
- }
- }
- // draw runs in backwards
- if(this.dirty){
- dojo.forEach(this.series, purgeGroup);
- this.cleanGroup();
- var s = this.group;
- df.forEachReversed(this.series, function(item){ item.cleanGroup(s); });
- }
- var t = this.chart.theme, stroke, outline, color, marker;
- for(var i = this.series.length - 1; i >= 0; --i){
- var run = this.series[i];
- if(!this.dirty && !run.dirty){ continue; }
- run.cleanGroup();
- var s = run.group,
- lpoly = dojo.map(acc, function(v, i){
- return {
- x: this._hScaler.scale * (i + 1 - this._hScaler.bounds.lower) + offsets.l,
- y: dim.height - offsets.b - this._vScaler.scale * (v - this._vScaler.bounds.lower)
- };
- }, this);
- if(!run.fill || !run.stroke){
- // need autogenerated color
- color = new dojo.Color(t.next("color"));
- }
- if(this.opt.areas){
- var apoly = dojo.clone(lpoly);
- apoly.push({x: lpoly[lpoly.length - 1].x, y: dim.height - offsets.b});
- apoly.push({x: lpoly[0].x, y: dim.height - offsets.b});
- apoly.push(lpoly[0]);
- var fill = run.fill ? run.fill : dc.augmentFill(t.series.fill, color);
- s.createPolyline(apoly).setFill(fill);
- }
- if(this.opt.lines || this.opt.markers){
- // need a stroke
- stroke = run.stroke ? dc.makeStroke(run.stroke) : dc.augmentStroke(t.series.stroke, color);
- if(run.outline || t.series.outline){
- outline = dc.makeStroke(run.outline ? run.outline : t.series.outline);
- outline.width = 2 * outline.width + stroke.width;
- }
- }
- if(this.opt.markers){
- // need a marker
- marker = run.marker ? run.marker : t.next("marker");
- }
- if(this.opt.shadows && stroke){
- var sh = this.opt.shadows, shadowColor = new dojo.Color([0, 0, 0, 0.3]),
- spoly = dojo.map(lpoly, function(c){
- return {x: c.x + sh.dx, y: c.y + sh.dy};
- }),
- shadowStroke = dojo.clone(outline ? outline : stroke);
- shadowStroke.color = shadowColor;
- shadowStroke.width += sh.dw ? sh.dw : 0;
- if(this.opt.lines){
- s.createPolyline(spoly).setStroke(shadowStroke);
- }
- if(this.opt.markers){
- dojo.forEach(spoly, function(c){
- s.createPath("M" + c.x + " " + c.y + " " + marker).setStroke(shadowStroke).setFill(shadowColor);
- }, this);
- }
- }
- if(this.opt.lines){
- if(outline){
- s.createPolyline(lpoly).setStroke(outline);
- }
- s.createPolyline(lpoly).setStroke(stroke);
- }
- if(this.opt.markers){
- dojo.forEach(lpoly, function(c){
- var path = "M" + c.x + " " + c.y + " " + marker;
- if(outline){
- s.createPath(path).setStroke(outline);
- }
- s.createPath(path).setStroke(stroke).setFill(stroke.color);
- }, this);
- }
- run.dirty = false;
- // update the accumulator
- for(var j = 0; j < run.data.length; ++j){
- var v = run.data[j];
- if(isNaN(v)){ v = 0; }
- acc[j] -= v;
- }
- }
- this.dirty = false;
- return this;
- }
- });
+var df=dojox.lang.functional,dc=dojox.charting.plot2d.common,_1=df.lambda("item.purgeGroup()");
+dojo.declare("dojox.charting.plot2d.Stacked",dojox.charting.plot2d.Default,{calculateAxes:function(_2){
+var _3=dc.collectStackedStats(this.series);
+this._maxRunLength=_3.hmax;
+this._calc(_2,_3);
+return this;
+},render:function(_4,_5){
+if(this._maxRunLength<=0){
+return this;
+}
+var _6=df.repeat(this._maxRunLength,"-> 0",0);
+for(var i=0;i<this.series.length;++i){
+var _7=this.series[i];
+for(var j=0;j<_7.data.length;++j){
+var v=_7.data[j];
+if(isNaN(v)){
+v=0;
+}
+_6[j]+=v;
+}
+}
+this.dirty=this.isDirty();
+if(this.dirty){
+dojo.forEach(this.series,_1);
+this.cleanGroup();
+var s=this.group;
+df.forEachRev(this.series,function(_8){
+_8.cleanGroup(s);
+});
+}
+var t=this.chart.theme,_9,_a,_b,_c,_d=this.events(),ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler);
+this.resetEvents();
+for(var i=this.series.length-1;i>=0;--i){
+var _7=this.series[i];
+if(!this.dirty&&!_7.dirty){
+continue;
+}
+_7.cleanGroup();
+var s=_7.group,_e=dojo.map(_6,function(v,i){
+return {x:ht(i+1)+_5.l,y:_4.height-_5.b-vt(v)};
+},this);
+if(!_7.fill||!_7.stroke){
+_b=new dojo.Color(t.next("color"));
+}
+var _f=this.opt.tension?dc.curve(_e,this.opt.tension):"";
+if(this.opt.areas){
+var _10=dojo.clone(_e);
+var _11=_7.fill?_7.fill:dc.augmentFill(t.series.fill,_b);
+if(this.opt.tension){
+var p=dc.curve(_10,this.opt.tension);
+p+=" L"+_e[_e.length-1].x+","+(_4.height-_5.b)+" L"+_e[0].x+","+(_4.height-_5.b)+" L"+_e[0].x+","+_e[0].y;
+_7.dyn.fill=s.createPath(p).setFill(_11).getFill();
+}else{
+_10.push({x:_e[_e.length-1].x,y:_4.height-_5.b});
+_10.push({x:_e[0].x,y:_4.height-_5.b});
+_10.push(_e[0]);
+_7.dyn.fill=s.createPolyline(_10).setFill(_11).getFill();
+}
+}
+if(this.opt.lines||this.opt.markers){
+_9=_7.stroke?dc.makeStroke(_7.stroke):dc.augmentStroke(t.series.stroke,_b);
+if(_7.outline||t.series.outline){
+_a=dc.makeStroke(_7.outline?_7.outline:t.series.outline);
+_a.width=2*_a.width+_9.width;
+}
+}
+if(this.opt.markers){
+_c=_7.dyn.marker=_7.marker?_7.marker:t.next("marker");
+}
+var _12,_13,_14;
+if(this.opt.shadows&&_9){
+var sh=this.opt.shadows,_15=new dojo.Color([0,0,0,0.3]),_16=dojo.map(_e,function(c){
+return {x:c.x+sh.dx,y:c.y+sh.dy};
+}),_17=dojo.clone(_a?_a:_9);
+_17.color=_15;
+_17.width+=sh.dw?sh.dw:0;
+if(this.opt.lines){
+if(this.opt.tension){
+_7.dyn.shadow=s.createPath(dc.curve(_16,this.opt.tension)).setStroke(_17).getStroke();
+}else{
+_7.dyn.shadow=s.createPolyline(_16).setStroke(_17).getStroke();
+}
+}
+if(this.opt.markers){
+_14=dojo.map(_16,function(c){
+return s.createPath("M"+c.x+" "+c.y+" "+_c).setStroke(_17).setFill(_15);
+},this);
+}
+}
+if(this.opt.lines){
+if(_a){
+if(this.opt.tension){
+_7.dyn.outline=s.createPath(_f).setStroke(_a).getStroke();
+}else{
+_7.dyn.outline=s.createPolyline(_e).setStroke(_a).getStroke();
+}
+}
+if(this.opt.tension){
+_7.dyn.stroke=s.createPath(_f).setStroke(_9).getStroke();
+}else{
+_7.dyn.stroke=s.createPolyline(_e).setStroke(_9).getStroke();
+}
+}
+if(this.opt.markers){
+_12=new Array(_e.length);
+_13=new Array(_e.length);
+dojo.forEach(_e,function(c,i){
+var _18="M"+c.x+" "+c.y+" "+_c;
+if(_a){
+_13[i]=s.createPath(_18).setStroke(_a);
+}
+_12[i]=s.createPath(_18).setStroke(_9).setFill(_9.color);
+},this);
+if(_d){
+dojo.forEach(_12,function(s,i){
+var o={element:"marker",index:i,run:_7,plot:this,hAxis:this.hAxis||null,vAxis:this.vAxis||null,shape:s,outline:_13[i]||null,shadow:_14&&_14[i]||null,cx:_e[i].x,cy:_e[i].y,x:i+1,y:_7.data[i]};
+this._connectEvents(s,o);
+},this);
+}
+}
+_7.dirty=false;
+for(var j=0;j<_7.data.length;++j){
+var v=_7.data[j];
+if(isNaN(v)){
+v=0;
+}
+_6[j]-=v;
+}
+}
+this.dirty=false;
+return this;
+}});
})();
-
}
diff --git a/js/dojo/dojox/charting/plot2d/StackedAreas.js b/js/dojo/dojox/charting/plot2d/StackedAreas.js
--- a/js/dojo/dojox/charting/plot2d/StackedAreas.js
+++ b/js/dojo/dojox/charting/plot2d/StackedAreas.js
@@ -1,14 +1,16 @@
-if(!dojo._hasResource["dojox.charting.plot2d.StackedAreas"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot2d.StackedAreas"] = true;
-dojo.provide("dojox.charting.plot2d.StackedAreas");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.require("dojox.charting.plot2d.Stacked");
-dojo.declare("dojox.charting.plot2d.StackedAreas", dojox.charting.plot2d.Stacked, {
- constructor: function(){
- this.opt.lines = true;
- this.opt.areas = true;
- }
-});
-
+if(!dojo._hasResource["dojox.charting.plot2d.StackedAreas"]){
+dojo._hasResource["dojox.charting.plot2d.StackedAreas"]=true;
+dojo.provide("dojox.charting.plot2d.StackedAreas");
+dojo.require("dojox.charting.plot2d.Stacked");
+dojo.declare("dojox.charting.plot2d.StackedAreas",dojox.charting.plot2d.Stacked,{constructor:function(){
+this.opt.lines=true;
+this.opt.areas=true;
+}});
}
diff --git a/js/dojo/dojox/charting/plot2d/StackedBars.js b/js/dojo/dojox/charting/plot2d/StackedBars.js
--- a/js/dojo/dojox/charting/plot2d/StackedBars.js
+++ b/js/dojo/dojox/charting/plot2d/StackedBars.js
@@ -1,84 +1,114 @@
-if(!dojo._hasResource["dojox.charting.plot2d.StackedBars"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot2d.StackedBars"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.plot2d.StackedBars"]){
+dojo._hasResource["dojox.charting.plot2d.StackedBars"]=true;
dojo.provide("dojox.charting.plot2d.StackedBars");
-
dojo.require("dojox.charting.plot2d.common");
dojo.require("dojox.charting.plot2d.Bars");
-
dojo.require("dojox.lang.functional");
-
+dojo.require("dojox.lang.functional.reversed");
(function(){
- var df = dojox.lang.functional, dc = dojox.charting.plot2d.common,
- purgeGroup = df.lambda("item.purgeGroup()");
-
- dojo.declare("dojox.charting.plot2d.StackedBars", dojox.charting.plot2d.Bars, {
- calculateAxes: function(dim){
- var stats = dc.collectStackedStats(this.series), t;
- this._maxRunLength = stats.hmax;
- stats.hmin -= 0.5;
- stats.hmax += 0.5;
- t = stats.hmin, stats.hmin = stats.vmin, stats.vmin = t;
- t = stats.hmax, stats.hmax = stats.vmax, stats.vmax = t;
- this._calc(dim, stats);
- return this;
- },
- render: function(dim, offsets){
- // stack all values
- var acc = df.repeat(this._maxRunLength, "-> 0", 0);
- for(var i = 0; i < this.series.length; ++i){
- var run = this.series[i];
- for(var j = 0; j < run.data.length; ++j){
- var v = run.data[j];
- if(isNaN(v)){ v = 0; }
- acc[j] += v;
- }
- }
- // draw runs in backwards
- if(this.dirty){
- dojo.forEach(this.series, purgeGroup);
- this.cleanGroup();
- var s = this.group;
- df.forEachReversed(this.series, function(item){ item.cleanGroup(s); });
- }
- var t = this.chart.theme, color, stroke, fill, f,
- gap = this.opt.gap < this._vScaler.scale / 3 ? this.opt.gap : 0;
- for(var i = this.series.length - 1; i >= 0; --i){
- var run = this.series[i];
- if(!this.dirty && !run.dirty){ continue; }
- run.cleanGroup();
- var s = run.group;
- if(!run.fill || !run.stroke){
- // need autogenerated color
- color = run.dyn.color = new dojo.Color(t.next("color"));
- }
- stroke = run.stroke ? run.stroke : dc.augmentStroke(t.series.stroke, color);
- fill = run.fill ? run.fill : dc.augmentFill(t.series.fill, color);
- for(var j = 0; j < acc.length; ++j){
- var v = acc[j],
- width = this._hScaler.scale * (v - this._hScaler.bounds.lower),
- height = this._vScaler.scale - 2 * gap;
- if(width >= 1 && height >= 1){
- var shape = s.createRect({
- x: offsets.l,
- y: dim.height - offsets.b - this._vScaler.scale * (j + 1.5 - this._vScaler.bounds.lower) + gap,
- width: width, height: height
- }).setFill(fill).setStroke(stroke);
- run.dyn.fill = shape.getFill();
- run.dyn.stroke = shape.getStroke();
- }
- }
- run.dirty = false;
- // update the accumulator
- for(var j = 0; j < run.data.length; ++j){
- var v = run.data[j];
- if(isNaN(v)){ v = 0; }
- acc[j] -= v;
- }
- }
- this.dirty = false;
- return this;
- }
- });
+var df=dojox.lang.functional,dc=dojox.charting.plot2d.common,_1=df.lambda("item.purgeGroup()");
+dojo.declare("dojox.charting.plot2d.StackedBars",dojox.charting.plot2d.Bars,{calculateAxes:function(_2){
+var _3=dc.collectStackedStats(this.series),t;
+this._maxRunLength=_3.hmax;
+_3.hmin-=0.5;
+_3.hmax+=0.5;
+t=_3.hmin,_3.hmin=_3.vmin,_3.vmin=t;
+t=_3.hmax,_3.hmax=_3.vmax,_3.vmax=t;
+this._calc(_2,_3);
+return this;
+},render:function(_4,_5){
+if(this._maxRunLength<=0){
+return this;
+}
+var _6=df.repeat(this._maxRunLength,"-> 0",0);
+for(var i=0;i<this.series.length;++i){
+var _7=this.series[i];
+for(var j=0;j<_7.data.length;++j){
+var _8=_7.data[j],v=typeof _8=="number"?_8:_8.y;
+if(isNaN(v)){
+v=0;
+}
+_6[j]+=v;
+}
+}
+this.dirty=this.isDirty();
+if(this.dirty){
+dojo.forEach(this.series,_1);
+this.cleanGroup();
+var s=this.group;
+df.forEachRev(this.series,function(_9){
+_9.cleanGroup(s);
+});
+}
+var t=this.chart.theme,_a,_b,_c,f,_d,_e,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_f=this.events();
+f=dc.calculateBarSize(this._vScaler.bounds.scale,this.opt);
+_d=f.gap;
+_e=f.size;
+this.resetEvents();
+for(var i=this.series.length-1;i>=0;--i){
+var _7=this.series[i];
+if(!this.dirty&&!_7.dirty){
+continue;
+}
+_7.cleanGroup();
+var s=_7.group;
+if(!_7.fill||!_7.stroke){
+_a=_7.dyn.color=new dojo.Color(t.next("color"));
+}
+_b=_7.stroke?_7.stroke:dc.augmentStroke(t.series.stroke,_a);
+_c=_7.fill?_7.fill:dc.augmentFill(t.series.fill,_a);
+for(var j=0;j<_6.length;++j){
+var v=_6[j],_10=ht(v),_8=_7.data[j],_11=_a,_12=_c,_13=_b;
+if(typeof _8!="number"){
+if(_8.color){
+_11=new dojo.Color(_8.color);
+}
+if("fill" in _8){
+_12=_8.fill;
+}else{
+if(_8.color){
+_12=dc.augmentFill(t.series.fill,_11);
+}
+}
+if("stroke" in _8){
+_13=_8.stroke;
+}else{
+if(_8.color){
+_13=dc.augmentStroke(t.series.stroke,_11);
+}
+}
+}
+if(_10>=1&&_e>=1){
+var _14=s.createRect({x:_5.l,y:_4.height-_5.b-vt(j+1.5)+_d,width:_10,height:_e}).setFill(_12).setStroke(_13);
+_7.dyn.fill=_14.getFill();
+_7.dyn.stroke=_14.getStroke();
+if(_f){
+var o={element:"bar",index:j,run:_7,plot:this,hAxis:this.hAxis||null,vAxis:this.vAxis||null,shape:_14,x:v,y:j+1.5};
+this._connectEvents(_14,o);
+}
+if(this.animate){
+this._animateBar(_14,_5.l,-_10);
+}
+}
+}
+_7.dirty=false;
+for(var j=0;j<_7.data.length;++j){
+var _8=_7.data[j],v=typeof _8=="number"?_8:_8.y;
+if(isNaN(v)){
+v=0;
+}
+_6[j]-=v;
+}
+}
+this.dirty=false;
+return this;
+}});
})();
-
}
diff --git a/js/dojo/dojox/charting/plot2d/StackedColumns.js b/js/dojo/dojox/charting/plot2d/StackedColumns.js
--- a/js/dojo/dojox/charting/plot2d/StackedColumns.js
+++ b/js/dojo/dojox/charting/plot2d/StackedColumns.js
@@ -1,82 +1,112 @@
-if(!dojo._hasResource["dojox.charting.plot2d.StackedColumns"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot2d.StackedColumns"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.plot2d.StackedColumns"]){
+dojo._hasResource["dojox.charting.plot2d.StackedColumns"]=true;
dojo.provide("dojox.charting.plot2d.StackedColumns");
-
dojo.require("dojox.charting.plot2d.common");
dojo.require("dojox.charting.plot2d.Columns");
-
dojo.require("dojox.lang.functional");
-
+dojo.require("dojox.lang.functional.reversed");
(function(){
- var df = dojox.lang.functional, dc = dojox.charting.plot2d.common,
- purgeGroup = df.lambda("item.purgeGroup()");
-
- dojo.declare("dojox.charting.plot2d.StackedColumns", dojox.charting.plot2d.Columns, {
- calculateAxes: function(dim){
- var stats = dc.collectStackedStats(this.series);
- this._maxRunLength = stats.hmax;
- stats.hmin -= 0.5;
- stats.hmax += 0.5;
- this._calc(dim, stats);
- return this;
- },
- render: function(dim, offsets){
- // stack all values
- var acc = df.repeat(this._maxRunLength, "-> 0", 0);
- for(var i = 0; i < this.series.length; ++i){
- var run = this.series[i];
- for(var j = 0; j < run.data.length; ++j){
- var v = run.data[j];
- if(isNaN(v)){ v = 0; }
- acc[j] += v;
- }
- }
- // draw runs in backwards
- if(this.dirty){
- dojo.forEach(this.series, purgeGroup);
- this.cleanGroup();
- var s = this.group;
- df.forEachReversed(this.series, function(item){ item.cleanGroup(s); });
- }
- var t = this.chart.theme, color, stroke, fill, f,
- gap = this.opt.gap < this._hScaler.scale / 3 ? this.opt.gap : 0;
- for(var i = this.series.length - 1; i >= 0; --i){
- var run = this.series[i];
- if(!this.dirty && !run.dirty){ continue; }
- run.cleanGroup();
- var s = run.group;
- if(!run.fill || !run.stroke){
- // need autogenerated color
- color = run.dyn.color = new dojo.Color(t.next("color"));
- }
- stroke = run.stroke ? run.stroke : dc.augmentStroke(t.series.stroke, color);
- fill = run.fill ? run.fill : dc.augmentFill(t.series.fill, color);
- for(var j = 0; j < acc.length; ++j){
- var v = acc[j],
- width = this._hScaler.scale - 2 * gap,
- height = this._vScaler.scale * (v - this._vScaler.bounds.lower);
- if(width >= 1 && height >= 1){
- var shape = s.createRect({
- x: offsets.l + this._hScaler.scale * (j + 0.5 - this._hScaler.bounds.lower) + gap,
- y: dim.height - offsets.b - this._vScaler.scale * (v - this._vScaler.bounds.lower),
- width: width, height: height
- }).setFill(fill).setStroke(stroke);
- run.dyn.fill = shape.getFill();
- run.dyn.stroke = shape.getStroke();
- }
- }
- run.dirty = false;
- // update the accumulator
- for(var j = 0; j < run.data.length; ++j){
- var v = run.data[j];
- if(isNaN(v)){ v = 0; }
- acc[j] -= v;
- }
- }
- this.dirty = false;
- return this;
- }
- });
+var df=dojox.lang.functional,dc=dojox.charting.plot2d.common,_1=df.lambda("item.purgeGroup()");
+dojo.declare("dojox.charting.plot2d.StackedColumns",dojox.charting.plot2d.Columns,{calculateAxes:function(_2){
+var _3=dc.collectStackedStats(this.series);
+this._maxRunLength=_3.hmax;
+_3.hmin-=0.5;
+_3.hmax+=0.5;
+this._calc(_2,_3);
+return this;
+},render:function(_4,_5){
+if(this._maxRunLength<=0){
+return this;
+}
+var _6=df.repeat(this._maxRunLength,"-> 0",0);
+for(var i=0;i<this.series.length;++i){
+var _7=this.series[i];
+for(var j=0;j<_7.data.length;++j){
+var _8=_7.data[j],v=typeof _8=="number"?_8:_8.y;
+if(isNaN(v)){
+v=0;
+}
+_6[j]+=v;
+}
+}
+this.dirty=this.isDirty();
+if(this.dirty){
+dojo.forEach(this.series,_1);
+this.cleanGroup();
+var s=this.group;
+df.forEachRev(this.series,function(_9){
+_9.cleanGroup(s);
+});
+}
+var t=this.chart.theme,_a,_b,_c,f,_d,_e,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_f=this.events();
+f=dc.calculateBarSize(this._hScaler.bounds.scale,this.opt);
+_d=f.gap;
+_e=f.size;
+this.resetEvents();
+for(var i=this.series.length-1;i>=0;--i){
+var _7=this.series[i];
+if(!this.dirty&&!_7.dirty){
+continue;
+}
+_7.cleanGroup();
+var s=_7.group;
+if(!_7.fill||!_7.stroke){
+_a=_7.dyn.color=new dojo.Color(t.next("color"));
+}
+_b=_7.stroke?_7.stroke:dc.augmentStroke(t.series.stroke,_a);
+_c=_7.fill?_7.fill:dc.augmentFill(t.series.fill,_a);
+for(var j=0;j<_6.length;++j){
+var v=_6[j],_10=vt(v),_8=_7.data[j],_11=_a,_12=_c,_13=_b;
+if(typeof _8!="number"){
+if(_8.color){
+_11=new dojo.Color(_8.color);
+}
+if("fill" in _8){
+_12=_8.fill;
+}else{
+if(_8.color){
+_12=dc.augmentFill(t.series.fill,_11);
+}
+}
+if("stroke" in _8){
+_13=_8.stroke;
+}else{
+if(_8.color){
+_13=dc.augmentStroke(t.series.stroke,_11);
+}
+}
+}
+if(_e>=1&&_10>=1){
+var _14=s.createRect({x:_5.l+ht(j+0.5)+_d,y:_4.height-_5.b-vt(v),width:_e,height:_10}).setFill(_12).setStroke(_13);
+_7.dyn.fill=_14.getFill();
+_7.dyn.stroke=_14.getStroke();
+if(_f){
+var o={element:"column",index:j,run:_7,plot:this,hAxis:this.hAxis||null,vAxis:this.vAxis||null,shape:_14,x:j+0.5,y:v};
+this._connectEvents(_14,o);
+}
+if(this.animate){
+this._animateColumn(_14,_4.height-_5.b,_10);
+}
+}
+}
+_7.dirty=false;
+for(var j=0;j<_7.data.length;++j){
+var _8=_7.data[j],v=typeof _8=="number"?_8:_8.y;
+if(isNaN(v)){
+v=0;
+}
+_6[j]-=v;
+}
+}
+this.dirty=false;
+return this;
+}});
})();
-
}
diff --git a/js/dojo/dojox/charting/plot2d/StackedLines.js b/js/dojo/dojox/charting/plot2d/StackedLines.js
--- a/js/dojo/dojox/charting/plot2d/StackedLines.js
+++ b/js/dojo/dojox/charting/plot2d/StackedLines.js
@@ -1,13 +1,15 @@
-if(!dojo._hasResource["dojox.charting.plot2d.StackedLines"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot2d.StackedLines"] = true;
-dojo.provide("dojox.charting.plot2d.StackedLines");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.require("dojox.charting.plot2d.Stacked");
-dojo.declare("dojox.charting.plot2d.StackedLines", dojox.charting.plot2d.Stacked, {
- constructor: function(){
- this.opt.lines = true;
- }
-});
-
+if(!dojo._hasResource["dojox.charting.plot2d.StackedLines"]){
+dojo._hasResource["dojox.charting.plot2d.StackedLines"]=true;
+dojo.provide("dojox.charting.plot2d.StackedLines");
+dojo.require("dojox.charting.plot2d.Stacked");
+dojo.declare("dojox.charting.plot2d.StackedLines",dojox.charting.plot2d.Stacked,{constructor:function(){
+this.opt.lines=true;
+}});
}
diff --git a/js/dojo/dojox/charting/plot2d/common.js b/js/dojo/dojox/charting/plot2d/common.js
--- a/js/dojo/dojox/charting/plot2d/common.js
+++ b/js/dojo/dojox/charting/plot2d/common.js
@@ -1,113 +1,210 @@
-if(!dojo._hasResource["dojox.charting.plot2d.common"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot2d.common"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.plot2d.common"]){
+dojo._hasResource["dojox.charting.plot2d.common"]=true;
dojo.provide("dojox.charting.plot2d.common");
-
dojo.require("dojo.colors");
dojo.require("dojox.gfx");
dojo.require("dojox.lang.functional");
-
(function(){
- var df = dojox.lang.functional, dc = dojox.charting.plot2d.common;
-
- dojo.mixin(dojox.charting.plot2d.common, {
- makeStroke: function(stroke){
- if(!stroke){ return stroke; }
- if(typeof stroke == "string" || stroke instanceof dojo.Color){
- stroke = {color: stroke};
- }
- return dojox.gfx.makeParameters(dojox.gfx.defaultStroke, stroke);
- },
- augmentColor: function(target, color){
- var t = new dojo.Color(target),
- c = new dojo.Color(color);
- c.a = t.a;
- return c;
- },
- augmentStroke: function(stroke, color){
- var s = dc.makeStroke(stroke);
- if(s){
- s.color = dc.augmentColor(s.color, color);
- }
- return s;
- },
- augmentFill: function(fill, color){
- var fc, c = new dojo.Color(color);
- if(typeof fill == "string" || fill instanceof dojo.Color){
- return dc.augmentColor(fill, color);
- }
- return fill;
- },
-
- defaultStats: {hmin: Number.POSITIVE_INFINITY, hmax: Number.NEGATIVE_INFINITY,
- vmin: Number.POSITIVE_INFINITY, vmax: Number.NEGATIVE_INFINITY},
-
- collectSimpleStats: function(series){
- var stats = dojo.clone(dc.defaultStats);
- for(var i = 0; i < series.length; ++i){
- var run = series[i];
- if(!run.data.length){ continue; }
- if(typeof run.data[0] == "number"){
- // 1D case
- var old_vmin = stats.vmin, old_vmax = stats.vmax;
- if(!("ymin" in run) || !("ymax" in run)){
- dojo.forEach(run.data, function(val, i){
- var x = i + 1, y = val;
- if(isNaN(y)){ y = 0; }
- stats.hmin = Math.min(stats.hmin, x);
- stats.hmax = Math.max(stats.hmax, x);
- stats.vmin = Math.min(stats.vmin, y);
- stats.vmax = Math.max(stats.vmax, y);
- });
- }
- if("ymin" in run){ stats.vmin = Math.min(old_vmin, run.ymin); }
- if("ymax" in run){ stats.vmax = Math.max(old_vmax, run.ymax); }
- }else{
- // 2D case
- var old_hmin = stats.hmin, old_hmax = stats.hmax,
- old_vmin = stats.vmin, old_vmax = stats.vmax;
- if(!("xmin" in run) || !("xmax" in run) || !("ymin" in run) || !("ymax" in run)){
- dojo.forEach(run.data, function(val, i){
- var x = val.x, y = val.y;
- if(isNaN(x)){ x = 0; }
- if(isNaN(y)){ y = 0; }
- stats.hmin = Math.min(stats.hmin, x);
- stats.hmax = Math.max(stats.hmax, x);
- stats.vmin = Math.min(stats.vmin, y);
- stats.vmax = Math.max(stats.vmax, y);
- });
- }
- if("xmin" in run){ stats.hmin = Math.min(old_hmin, run.xmin); }
- if("xmax" in run){ stats.hmax = Math.max(old_hmax, run.xmax); }
- if("ymin" in run){ stats.vmin = Math.min(old_vmin, run.ymin); }
- if("ymax" in run){ stats.vmax = Math.max(old_vmax, run.ymax); }
- }
- }
- return stats;
- },
-
- collectStackedStats: function(series){
- // collect statistics
- var stats = dojo.clone(dc.defaultStats);
- if(series.length){
- // 1st pass: find the maximal length of runs
- stats.hmin = Math.min(stats.hmin, 1);
- stats.hmax = df.foldl(series, "seed, run -> Math.max(seed, run.data.length)", stats.hmax);
- // 2nd pass: stack values
- for(var i = 0; i < stats.hmax; ++i){
- var v = series[0].data[i];
- if(isNaN(v)){ v = 0; }
- stats.vmin = Math.min(stats.vmin, v);
- for(var j = 1; j < series.length; ++j){
- var t = series[j].data[i];
- if(isNaN(t)){ t = 0; }
- v += t;
- }
- stats.vmax = Math.max(stats.vmax, v);
- }
- }
- return stats;
- }
- });
+var df=dojox.lang.functional,dc=dojox.charting.plot2d.common;
+dojo.mixin(dojox.charting.plot2d.common,{makeStroke:function(_1){
+if(!_1){
+return _1;
+}
+if(typeof _1=="string"||_1 instanceof dojo.Color){
+_1={color:_1};
+}
+return dojox.gfx.makeParameters(dojox.gfx.defaultStroke,_1);
+},augmentColor:function(_2,_3){
+var t=new dojo.Color(_2),c=new dojo.Color(_3);
+c.a=t.a;
+return c;
+},augmentStroke:function(_4,_5){
+var s=dc.makeStroke(_4);
+if(s){
+s.color=dc.augmentColor(s.color,_5);
+}
+return s;
+},augmentFill:function(_6,_7){
+var fc,c=new dojo.Color(_7);
+if(typeof _6=="string"||_6 instanceof dojo.Color){
+return dc.augmentColor(_6,_7);
+}
+return _6;
+},defaultStats:{hmin:Number.POSITIVE_INFINITY,hmax:Number.NEGATIVE_INFINITY,vmin:Number.POSITIVE_INFINITY,vmax:Number.NEGATIVE_INFINITY},collectSimpleStats:function(_8){
+var _9=dojo.clone(dc.defaultStats);
+for(var i=0;i<_8.length;++i){
+var _a=_8[i];
+if(!_a.data.length){
+continue;
+}
+if(typeof _a.data[0]=="number"){
+var _b=_9.vmin,_c=_9.vmax;
+if(!("ymin" in _a)||!("ymax" in _a)){
+dojo.forEach(_a.data,function(_d,i){
+var x=i+1,y=_d;
+if(isNaN(y)){
+y=0;
+}
+_9.hmin=Math.min(_9.hmin,x);
+_9.hmax=Math.max(_9.hmax,x);
+_9.vmin=Math.min(_9.vmin,y);
+_9.vmax=Math.max(_9.vmax,y);
+});
+}
+if("ymin" in _a){
+_9.vmin=Math.min(_b,_a.ymin);
+}
+if("ymax" in _a){
+_9.vmax=Math.max(_c,_a.ymax);
+}
+}else{
+var _e=_9.hmin,_f=_9.hmax,_b=_9.vmin,_c=_9.vmax;
+if(!("xmin" in _a)||!("xmax" in _a)||!("ymin" in _a)||!("ymax" in _a)){
+dojo.forEach(_a.data,function(val,i){
+var x="x" in val?val.x:i+1,y=val.y;
+if(isNaN(x)){
+x=0;
+}
+if(isNaN(y)){
+y=0;
+}
+_9.hmin=Math.min(_9.hmin,x);
+_9.hmax=Math.max(_9.hmax,x);
+_9.vmin=Math.min(_9.vmin,y);
+_9.vmax=Math.max(_9.vmax,y);
+});
+}
+if("xmin" in _a){
+_9.hmin=Math.min(_e,_a.xmin);
+}
+if("xmax" in _a){
+_9.hmax=Math.max(_f,_a.xmax);
+}
+if("ymin" in _a){
+_9.vmin=Math.min(_b,_a.ymin);
+}
+if("ymax" in _a){
+_9.vmax=Math.max(_c,_a.ymax);
+}
+}
+}
+return _9;
+},calculateBarSize:function(_10,opt,_11){
+if(!_11){
+_11=1;
+}
+var gap=opt.gap,_12=(_10-2*gap)/_11;
+if("minBarSize" in opt){
+_12=Math.max(_12,opt.minBarSize);
+}
+if("maxBarSize" in opt){
+_12=Math.min(_12,opt.maxBarSize);
+}
+_12=Math.max(_12,1);
+gap=(_10-_12*_11)/2;
+return {size:_12,gap:gap};
+},collectStackedStats:function(_13){
+var _14=dojo.clone(dc.defaultStats);
+if(_13.length){
+_14.hmin=Math.min(_14.hmin,1);
+_14.hmax=df.foldl(_13,"seed, run -> Math.max(seed, run.data.length)",_14.hmax);
+for(var i=0;i<_14.hmax;++i){
+var v=_13[0].data[i];
+if(isNaN(v)){
+v=0;
+}
+_14.vmin=Math.min(_14.vmin,v);
+for(var j=1;j<_13.length;++j){
+var t=_13[j].data[i];
+if(isNaN(t)){
+t=0;
+}
+v+=t;
+}
+_14.vmax=Math.max(_14.vmax,v);
+}
+}
+return _14;
+},curve:function(a,_15){
+var arr=a.slice(0);
+if(_15=="x"){
+arr[arr.length]=arr[0];
+}
+var p=dojo.map(arr,function(_16,i){
+if(i==0){
+return "M"+_16.x+","+_16.y;
+}
+if(!isNaN(_15)){
+var dx=_16.x-arr[i-1].x,dy=arr[i-1].y;
+return "C"+(_16.x-(_15-1)*(dx/_15))+","+dy+" "+(_16.x-(dx/_15))+","+_16.y+" "+_16.x+","+_16.y;
+}else{
+if(_15=="X"||_15=="x"||_15=="S"){
+var p0,p1=arr[i-1],p2=arr[i],p3;
+var _17,_18,_19,_1a;
+var f=1/6;
+if(i==1){
+if(_15=="x"){
+p0=arr[arr.length-2];
+}else{
+p0=p1;
+}
+f=1/3;
+}else{
+p0=arr[i-2];
+}
+if(i==(arr.length-1)){
+if(_15=="x"){
+p3=arr[1];
+}else{
+p3=p2;
+}
+f=1/3;
+}else{
+p3=arr[i+1];
+}
+var _1b=Math.sqrt((p2.x-p1.x)*(p2.x-p1.x)+(p2.y-p1.y)*(p2.y-p1.y));
+var _1c=Math.sqrt((p2.x-p0.x)*(p2.x-p0.x)+(p2.y-p0.y)*(p2.y-p0.y));
+var _1d=Math.sqrt((p3.x-p1.x)*(p3.x-p1.x)+(p3.y-p1.y)*(p3.y-p1.y));
+var _1e=_1c*f;
+var _1f=_1d*f;
+if(_1e>_1b/2&&_1f>_1b/2){
+_1e=_1b/2;
+_1f=_1b/2;
+}else{
+if(_1e>_1b/2){
+_1e=_1b/2;
+_1f=_1b/2*_1d/_1c;
+}else{
+if(_1f>_1b/2){
+_1f=_1b/2;
+_1e=_1b/2*_1c/_1d;
+}
+}
+}
+if(_15=="S"){
+if(p0==p1){
+_1e=0;
+}
+if(p2==p3){
+_1f=0;
+}
+}
+_17=p1.x+_1e*(p2.x-p0.x)/_1c;
+_18=p1.y+_1e*(p2.y-p0.y)/_1c;
+_19=p2.x-_1f*(p3.x-p1.x)/_1d;
+_1a=p2.y-_1f*(p3.y-p1.y)/_1d;
+}
+}
+return "C"+(_17+","+_18+" "+_19+","+_1a+" "+p2.x+","+p2.y);
+});
+return p.join(" ");
+}});
})();
-
}
diff --git a/js/dojo/dojox/charting/plot3d/Bars.js b/js/dojo/dojox/charting/plot3d/Bars.js
--- a/js/dojo/dojox/charting/plot3d/Bars.js
+++ b/js/dojo/dojox/charting/plot3d/Bars.js
@@ -1,66 +1,64 @@
-if(!dojo._hasResource["dojox.charting.plot3d.Bars"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot3d.Bars"] = true;
-dojo.provide("dojox.charting.plot3d.Bars");
-
-dojo.require("dojox.charting.plot3d.Base");
-
-(function(){
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // reduce function borrowed from dojox.fun
- var reduce = function(/*Array*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
- // summary: repeatedly applies a binary function to an array from left
- // to right; returns the final value.
- a = typeof a == "string" ? a.split("") : a; o = o || dojo.global;
- var z = a[0];
- for(var i = 1; i < a.length; z = f.call(o, z, a[i++]));
- return z; // Object
- };
- dojo.declare("dojox.charting.plot3d.Bars", dojox.charting.plot3d.Base, {
- constructor: function(width, height, kwArgs){
- this.depth = "auto";
- this.gap = 0;
- this.data = [];
- this.material = {type: "plastic", finish: "dull", color: "lime"};
- if(kwArgs){
- if("depth" in kwArgs){ this.depth = kwArgs.depth; }
- if("gap" in kwArgs){ this.gap = kwArgs.gap; }
- if("material" in kwArgs){
- var m = kwArgs.material;
- if(typeof m == "string" || m instanceof dojo.Color){
- this.material.color = m;
- }else{
- this.material = m;
- }
- }
- }
- },
- getDepth: function(){
- if(this.depth == "auto"){
- var w = this.width;
- if(this.data && this.data.length){
- w = w / this.data.length;
- }
- return w - 2 * this.gap;
- }
- return this.depth;
- },
- generate: function(chart, creator){
- if(!this.data){ return this; }
- var step = this.width / this.data.length, org = 0,
- depth = this.depth == "auto" ? step - 2 * this.gap : this.depth,
- scale = this.height / reduce(this.data, Math.max);
- if(!creator){ creator = chart.view; }
- for(var i = 0; i < this.data.length; ++i, org += step){
- creator
- .createCube({
- bottom: {x: org + this.gap, y: 0, z: 0},
- top: {x: org + step - this.gap, y: this.data[i] * scale, z: depth}
- })
- .setFill(this.material);
- }
- }
- });
+if(!dojo._hasResource["dojox.charting.plot3d.Bars"]){
+dojo._hasResource["dojox.charting.plot3d.Bars"]=true;
+dojo.provide("dojox.charting.plot3d.Bars");
+dojo.require("dojox.charting.plot3d.Base");
+(function(){
+var _1=function(a,f,o){
+a=typeof a=="string"?a.split(""):a;
+o=o||dojo.global;
+var z=a[0];
+for(var i=1;i<a.length;z=f.call(o,z,a[i++])){
+}
+return z;
+};
+dojo.declare("dojox.charting.plot3d.Bars",dojox.charting.plot3d.Base,{constructor:function(_2,_3,_4){
+this.depth="auto";
+this.gap=0;
+this.data=[];
+this.material={type:"plastic",finish:"dull",color:"lime"};
+if(_4){
+if("depth" in _4){
+this.depth=_4.depth;
+}
+if("gap" in _4){
+this.gap=_4.gap;
+}
+if("material" in _4){
+var m=_4.material;
+if(typeof m=="string"||m instanceof dojo.Color){
+this.material.color=m;
+}else{
+this.material=m;
+}
+}
+}
+},getDepth:function(){
+if(this.depth=="auto"){
+var w=this.width;
+if(this.data&&this.data.length){
+w=w/this.data.length;
+}
+return w-2*this.gap;
+}
+return this.depth;
+},generate:function(_5,_6){
+if(!this.data){
+return this;
+}
+var _7=this.width/this.data.length,_8=0,_9=this.depth=="auto"?_7-2*this.gap:this.depth,_a=this.height/_1(this.data,Math.max);
+if(!_6){
+_6=_5.view;
+}
+for(var i=0;i<this.data.length;++i,_8+=_7){
+_6.createCube({bottom:{x:_8+this.gap,y:0,z:0},top:{x:_8+_7-this.gap,y:this.data[i]*_a,z:_9}}).setFill(this.material);
+}
+}});
})();
-
}
diff --git a/js/dojo/dojox/charting/plot3d/Base.js b/js/dojo/dojox/charting/plot3d/Base.js
--- a/js/dojo/dojox/charting/plot3d/Base.js
+++ b/js/dojo/dojox/charting/plot3d/Base.js
@@ -1,23 +1,22 @@
-if(!dojo._hasResource["dojox.charting.plot3d.Base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot3d.Base"] = true;
-dojo.provide("dojox.charting.plot3d.Base");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.require("dojox.charting.Chart3D");
-dojo.declare("dojox.charting.plot3d.Base", null, {
- constructor: function(width, height, kwArgs){
- this.width = width;
- this.height = height;
- },
- setData: function(data){
- this.data = data ? data : [];
- return this;
- },
- getDepth: function(){
- return this.depth;
- },
- generate: function(chart, creator){
- }
-});
-
+if(!dojo._hasResource["dojox.charting.plot3d.Base"]){
+dojo._hasResource["dojox.charting.plot3d.Base"]=true;
+dojo.provide("dojox.charting.plot3d.Base");
+dojo.require("dojox.charting.Chart3D");
+dojo.declare("dojox.charting.plot3d.Base",null,{constructor:function(_1,_2,_3){
+this.width=_1;
+this.height=_2;
+},setData:function(_4){
+this.data=_4?_4:[];
+return this;
+},getDepth:function(){
+return this.depth;
+},generate:function(_5,_6){
+}});
}
diff --git a/js/dojo/dojox/charting/plot3d/Cylinders.js b/js/dojo/dojox/charting/plot3d/Cylinders.js
--- a/js/dojo/dojox/charting/plot3d/Cylinders.js
+++ b/js/dojo/dojox/charting/plot3d/Cylinders.js
@@ -1,69 +1,68 @@
-if(!dojo._hasResource["dojox.charting.plot3d.Cylinders"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.plot3d.Cylinders"] = true;
-dojo.provide("dojox.charting.plot3d.Cylinders");
-
-dojo.require("dojox.charting.plot3d.Base");
-
-(function(){
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // reduce function borrowed from dojox.fun
- var reduce = function(/*Array*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
- // summary: repeatedly applies a binary function to an array from left
- // to right; returns the final value.
- a = typeof a == "string" ? a.split("") : a; o = o || dojo.global;
- var z = a[0];
- for(var i = 1; i < a.length; z = f.call(o, z, a[i++]));
- return z; // Object
- };
- dojo.declare("dojox.charting.plot3d.Cylinders", dojox.charting.plot3d.Base, {
- constructor: function(width, height, kwArgs){
- this.depth = "auto";
- this.gap = 0;
- this.data = [];
- this.material = {type: "plastic", finish: "shiny", color: "lime"};
- this.outline = null;
- if(kwArgs){
- if("depth" in kwArgs){ this.depth = kwArgs.depth; }
- if("gap" in kwArgs){ this.gap = kwArgs.gap; }
- if("material" in kwArgs){
- var m = kwArgs.material;
- if(typeof m == "string" || m instanceof dojo.Color){
- this.material.color = m;
- }else{
- this.material = m;
- }
- }
- if("outline" in kwArgs){ this.outline = kwArgs.outline; }
- }
- },
- getDepth: function(){
- if(this.depth == "auto"){
- var w = this.width;
- if(this.data && this.data.length){
- w = w / this.data.length;
- }
- return w - 2 * this.gap;
- }
- return this.depth;
- },
- generate: function(chart, creator){
- if(!this.data){ return this; }
- var step = this.width / this.data.length, org = 0,
- scale = this.height / reduce(this.data, Math.max);
- if(!creator){ creator = chart.view; }
- for(var i = 0; i < this.data.length; ++i, org += step){
- creator
- .createCylinder({
- center: {x: org + step / 2, y: 0, z: 0},
- radius: step / 2 - this.gap,
- height: this.data[i] * scale
- })
- .setTransform(dojox.gfx3d.matrix.rotateXg(-90))
- .setFill(this.material).setStroke(this.outline);
- }
- }
- });
+if(!dojo._hasResource["dojox.charting.plot3d.Cylinders"]){
+dojo._hasResource["dojox.charting.plot3d.Cylinders"]=true;
+dojo.provide("dojox.charting.plot3d.Cylinders");
+dojo.require("dojox.charting.plot3d.Base");
+(function(){
+var _1=function(a,f,o){
+a=typeof a=="string"?a.split(""):a;
+o=o||dojo.global;
+var z=a[0];
+for(var i=1;i<a.length;z=f.call(o,z,a[i++])){
+}
+return z;
+};
+dojo.declare("dojox.charting.plot3d.Cylinders",dojox.charting.plot3d.Base,{constructor:function(_2,_3,_4){
+this.depth="auto";
+this.gap=0;
+this.data=[];
+this.material={type:"plastic",finish:"shiny",color:"lime"};
+this.outline=null;
+if(_4){
+if("depth" in _4){
+this.depth=_4.depth;
+}
+if("gap" in _4){
+this.gap=_4.gap;
+}
+if("material" in _4){
+var m=_4.material;
+if(typeof m=="string"||m instanceof dojo.Color){
+this.material.color=m;
+}else{
+this.material=m;
+}
+}
+if("outline" in _4){
+this.outline=_4.outline;
+}
+}
+},getDepth:function(){
+if(this.depth=="auto"){
+var w=this.width;
+if(this.data&&this.data.length){
+w=w/this.data.length;
+}
+return w-2*this.gap;
+}
+return this.depth;
+},generate:function(_5,_6){
+if(!this.data){
+return this;
+}
+var _7=this.width/this.data.length,_8=0,_9=this.height/_1(this.data,Math.max);
+if(!_6){
+_6=_5.view;
+}
+for(var i=0;i<this.data.length;++i,_8+=_7){
+_6.createCylinder({center:{x:_8+_7/2,y:0,z:0},radius:_7/2-this.gap,height:this.data[i]*_9}).setTransform(dojox.gfx3d.matrix.rotateXg(-90)).setFill(this.material).setStroke(this.outline);
+}
+}});
})();
-
}
diff --git a/js/dojo/dojox/charting/themes/GreySkies.js b/js/dojo/dojox/charting/themes/GreySkies.js
--- a/js/dojo/dojox/charting/themes/GreySkies.js
+++ b/js/dojo/dojox/charting/themes/GreySkies.js
@@ -1,11 +1,16 @@
-if(!dojo._hasResource["dojox.charting.themes.GreySkies"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.themes.GreySkies"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.themes.GreySkies"]){
+dojo._hasResource["dojox.charting.themes.GreySkies"]=true;
dojo.provide("dojox.charting.themes.GreySkies");
dojo.require("dojox.charting.Theme");
-
(function(){
- var dxc=dojox.charting;
- dxc.themes.GreySkies=new dxc.Theme(dxc.Theme._def);
+var _1=dojox.charting;
+_1.themes.GreySkies=new _1.Theme(_1.Theme._def);
})();
-
}
diff --git a/js/dojo/dojox/charting/themes/PlotKit/blue.js b/js/dojo/dojox/charting/themes/PlotKit/blue.js
--- a/js/dojo/dojox/charting/themes/PlotKit/blue.js
+++ b/js/dojo/dojox/charting/themes/PlotKit/blue.js
@@ -1,43 +1,17 @@
-if(!dojo._hasResource["dojox.charting.themes.PlotKit.blue"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.themes.PlotKit.blue"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.themes.PlotKit.blue"]){
+dojo._hasResource["dojox.charting.themes.PlotKit.blue"]=true;
dojo.provide("dojox.charting.themes.PlotKit.blue");
dojo.require("dojox.charting.Theme");
-
(function(){
- var dxc=dojox.charting;
- dxc.themes.PlotKit.blue=new dxc.Theme({
- chart:{
- stroke:null,
- fill: "white"
- },
- plotarea:{
- stroke:null,
- fill: "#e7eef6"
- },
- axis:{
- stroke:{ color:"#fff",width:2 },
- line:{ color:"#fff",width:1 },
- majorTick:{ color:"#fff", width:2, length:12 },
- minorTick:{ color:"#fff", width:1, length:8 },
- font:"normal normal normal 8pt Tahoma",
- fontColor:"#999"
- },
- series:{
- outline:{ width:1, color:"#fff" },
- stroke:{ width:2, color:"#666" },
- fill:new dojo.Color([0x66, 0x66, 0x66, 0.8]),
- font:"normal normal normal 7pt Tahoma", // label
- fontColor:"#000"
- },
- marker:{ // any markers on a series.
- stroke:{ width:2 },
- fill:"#333",
- font:"normal normal normal 7pt Tahoma", // label
- fontColor:"#000"
- },
- colors:[]
- });
- dxc.themes.PlotKit.blue.defineColors({ hue:217, saturation:60, low:40, high:88 });
+var _1=dojox.charting;
+_1.themes.PlotKit.blue=new _1.Theme({chart:{stroke:null,fill:"white"},plotarea:{stroke:null,fill:"#e7eef6"},axis:{stroke:{color:"#fff",width:2},line:{color:"#fff",width:1},majorTick:{color:"#fff",width:2,length:12},minorTick:{color:"#fff",width:1,length:8},font:"normal normal normal 8pt Tahoma",fontColor:"#999"},series:{outline:{width:0.1,color:"#fff"},stroke:{width:1.5,color:"#666"},fill:new dojo.Color([102,102,102,0.8]),font:"normal normal normal 7pt Tahoma",fontColor:"#000"},marker:{stroke:{width:2},fill:"#333",font:"normal normal normal 7pt Tahoma",fontColor:"#000"},colors:[]});
+_1.themes.PlotKit.blue.defineColors({hue:217,saturation:60,low:40,high:88});
})();
-
}
diff --git a/js/dojo/dojox/charting/themes/PlotKit/cyan.js b/js/dojo/dojox/charting/themes/PlotKit/cyan.js
--- a/js/dojo/dojox/charting/themes/PlotKit/cyan.js
+++ b/js/dojo/dojox/charting/themes/PlotKit/cyan.js
@@ -1,43 +1,17 @@
-if(!dojo._hasResource["dojox.charting.themes.PlotKit.cyan"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.themes.PlotKit.cyan"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.themes.PlotKit.cyan"]){
+dojo._hasResource["dojox.charting.themes.PlotKit.cyan"]=true;
dojo.provide("dojox.charting.themes.PlotKit.cyan");
dojo.require("dojox.charting.Theme");
-
(function(){
- var dxc=dojox.charting;
- dxc.themes.PlotKit.cyan=new dxc.Theme({
- chart:{
- stroke:null,
- fill: "white"
- },
- plotarea:{
- stroke:null,
- fill: "#e6f1f5"
- },
- axis:{
- stroke:{ color:"#fff",width:2 },
- line:{ color:"#fff",width:1 },
- majorTick:{ color:"#fff", width:2, length:12 },
- minorTick:{ color:"#fff", width:1, length:8 },
- font:"normal normal normal 8pt Tahoma",
- fontColor:"#999"
- },
- series:{
- outline:{ width:1, color:"#fff" },
- stroke:{ width:2, color:"#666" },
- fill:new dojo.Color([0x66, 0x66, 0x66, 0.8]),
- font:"normal normal normal 7pt Tahoma", // label
- fontColor:"#000"
- },
- marker:{ // any markers on a series.
- stroke:{ width:2 },
- fill:"#333",
- font:"normal normal normal 7pt Tahoma", // label
- fontColor:"#000"
- },
- colors:[]
- });
- dxc.themes.PlotKit.cyan.defineColors({ hue:194, saturation:60, low:40, high:88 });
+var _1=dojox.charting;
+_1.themes.PlotKit.cyan=new _1.Theme({chart:{stroke:null,fill:"white"},plotarea:{stroke:null,fill:"#e6f1f5"},axis:{stroke:{color:"#fff",width:2},line:{color:"#fff",width:1},majorTick:{color:"#fff",width:2,length:12},minorTick:{color:"#fff",width:1,length:8},font:"normal normal normal 8pt Tahoma",fontColor:"#999"},series:{outline:{width:1,color:"#fff"},stroke:{width:2,color:"#666"},fill:new dojo.Color([102,102,102,0.8]),font:"normal normal normal 7pt Tahoma",fontColor:"#000"},marker:{stroke:{width:2},fill:"#333",font:"normal normal normal 7pt Tahoma",fontColor:"#000"},colors:[]});
+_1.themes.PlotKit.cyan.defineColors({hue:194,saturation:60,low:40,high:88});
})();
-
}
diff --git a/js/dojo/dojox/charting/themes/PlotKit/green.js b/js/dojo/dojox/charting/themes/PlotKit/green.js
--- a/js/dojo/dojox/charting/themes/PlotKit/green.js
+++ b/js/dojo/dojox/charting/themes/PlotKit/green.js
@@ -1,43 +1,17 @@
-if(!dojo._hasResource["dojox.charting.themes.PlotKit.green"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.themes.PlotKit.green"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.themes.PlotKit.green"]){
+dojo._hasResource["dojox.charting.themes.PlotKit.green"]=true;
dojo.provide("dojox.charting.themes.PlotKit.green");
dojo.require("dojox.charting.Theme");
-
(function(){
- var dxc=dojox.charting;
- dxc.themes.PlotKit.green=new dxc.Theme({
- chart:{
- stroke:null,
- fill: "white"
- },
- plotarea:{
- stroke:null,
- fill: "#eff5e6"
- },
- axis:{
- stroke:{ color:"#fff",width:2 },
- line:{ color:"#fff",width:1 },
- majorTick:{ color:"#fff", width:2, length:12 },
- minorTick:{ color:"#fff", width:1, length:8 },
- font:"normal normal normal 8pt Tahoma",
- fontColor:"#999"
- },
- series:{
- outline:{ width:1, color:"#fff" },
- stroke:{ width:2, color:"#666" },
- fill:new dojo.Color([0x66, 0x66, 0x66, 0.8]),
- font:"normal normal normal 7pt Tahoma", // label
- fontColor:"#000"
- },
- marker:{ // any markers on a series.
- stroke:{ width:2 },
- fill:"#333",
- font:"normal normal normal 7pt Tahoma", // label
- fontColor:"#000"
- },
- colors:[]
- });
- dxc.themes.PlotKit.green.defineColors({ hue:82, saturation:60, low:40, high:88 });
+var _1=dojox.charting;
+_1.themes.PlotKit.green=new _1.Theme({chart:{stroke:null,fill:"white"},plotarea:{stroke:null,fill:"#eff5e6"},axis:{stroke:{color:"#fff",width:2},line:{color:"#fff",width:1},majorTick:{color:"#fff",width:2,length:12},minorTick:{color:"#fff",width:1,length:8},font:"normal normal normal 8pt Tahoma",fontColor:"#999"},series:{outline:{width:1,color:"#fff"},stroke:{width:2,color:"#666"},fill:new dojo.Color([102,102,102,0.8]),font:"normal normal normal 7pt Tahoma",fontColor:"#000"},marker:{stroke:{width:2},fill:"#333",font:"normal normal normal 7pt Tahoma",fontColor:"#000"},colors:[]});
+_1.themes.PlotKit.green.defineColors({hue:82,saturation:60,low:40,high:88});
})();
-
}
diff --git a/js/dojo/dojox/charting/themes/PlotKit/orange.js b/js/dojo/dojox/charting/themes/PlotKit/orange.js
--- a/js/dojo/dojox/charting/themes/PlotKit/orange.js
+++ b/js/dojo/dojox/charting/themes/PlotKit/orange.js
@@ -1,43 +1,17 @@
-if(!dojo._hasResource["dojox.charting.themes.PlotKit.orange"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.themes.PlotKit.orange"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.themes.PlotKit.orange"]){
+dojo._hasResource["dojox.charting.themes.PlotKit.orange"]=true;
dojo.provide("dojox.charting.themes.PlotKit.orange");
dojo.require("dojox.charting.Theme");
-
(function(){
- var dxc=dojox.charting;
- dxc.themes.PlotKit.orange=new dxc.Theme({
- chart:{
- stroke:null,
- fill: "white"
- },
- plotarea:{
- stroke:null,
- fill: "#f5eee6"
- },
- axis:{
- stroke:{ color:"#fff",width:2 },
- line:{ color:"#fff",width:1 },
- majorTick:{ color:"#fff", width:2, length:12 },
- minorTick:{ color:"#fff", width:1, length:8 },
- font:"normal normal normal 8pt Tahoma",
- fontColor:"#999"
- },
- series:{
- outline:{ width:1, color:"#fff" },
- stroke:{ width:2, color:"#666" },
- fill:new dojo.Color([0x66, 0x66, 0x66, 0.8]),
- font:"normal normal normal 7pt Tahoma", // label
- fontColor:"#000"
- },
- marker:{ // any markers on a series.
- stroke:{ width:2 },
- fill:"#333",
- font:"normal normal normal 7pt Tahoma", // label
- fontColor:"#000"
- },
- colors:[]
- });
- dxc.themes.PlotKit.orange.defineColors({ hue:31, saturation:60, low:40, high:88 });
+var _1=dojox.charting;
+_1.themes.PlotKit.orange=new _1.Theme({chart:{stroke:null,fill:"white"},plotarea:{stroke:null,fill:"#f5eee6"},axis:{stroke:{color:"#fff",width:2},line:{color:"#fff",width:1},majorTick:{color:"#fff",width:2,length:12},minorTick:{color:"#fff",width:1,length:8},font:"normal normal normal 8pt Tahoma",fontColor:"#999"},series:{outline:{width:0.15,color:"#fff"},stroke:{width:1.5,color:"#666"},fill:new dojo.Color([102,102,102,0.8]),font:"normal normal normal 7pt Tahoma",fontColor:"#000"},marker:{stroke:{width:2},fill:"#333",font:"normal normal normal 7pt Tahoma",fontColor:"#000"},colors:[]});
+_1.themes.PlotKit.orange.defineColors({hue:31,saturation:60,low:40,high:88});
})();
-
}
diff --git a/js/dojo/dojox/charting/themes/PlotKit/purple.js b/js/dojo/dojox/charting/themes/PlotKit/purple.js
--- a/js/dojo/dojox/charting/themes/PlotKit/purple.js
+++ b/js/dojo/dojox/charting/themes/PlotKit/purple.js
@@ -1,43 +1,17 @@
-if(!dojo._hasResource["dojox.charting.themes.PlotKit.purple"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.themes.PlotKit.purple"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.themes.PlotKit.purple"]){
+dojo._hasResource["dojox.charting.themes.PlotKit.purple"]=true;
dojo.provide("dojox.charting.themes.PlotKit.purple");
dojo.require("dojox.charting.Theme");
-
(function(){
- var dxc=dojox.charting;
- dxc.themes.PlotKit.purple=new dxc.Theme({
- chart:{
- stroke:null,
- fill: "white"
- },
- plotarea:{
- stroke:null,
- fill: "#eee6f5"
- },
- axis:{
- stroke:{ color:"#fff",width:2 },
- line:{ color:"#fff",width:1 },
- majorTick:{ color:"#fff", width:2, length:12 },
- minorTick:{ color:"#fff", width:1, length:8 },
- font:"normal normal normal 8pt Tahoma",
- fontColor:"#999"
- },
- series:{
- outline:{ width:1, color:"#fff" },
- stroke:{ width:2, color:"#666" },
- fill:new dojo.Color([0x66, 0x66, 0x66, 0.8]),
- font:"normal normal normal 7pt Tahoma", // label
- fontColor:"#000"
- },
- marker:{ // any markers on a series.
- stroke:{ width:2 },
- fill:"#333",
- font:"normal normal normal 7pt Tahoma", // label
- fontColor:"#000"
- },
- colors:[]
- });
- dxc.themes.PlotKit.purple.defineColors({ hue:271, saturation:60, low:40, high:88 });
+var _1=dojox.charting;
+_1.themes.PlotKit.purple=new _1.Theme({chart:{stroke:null,fill:"white"},plotarea:{stroke:null,fill:"#eee6f5"},axis:{stroke:{color:"#fff",width:2},line:{color:"#fff",width:1},majorTick:{color:"#fff",width:2,length:12},minorTick:{color:"#fff",width:1,length:8},font:"normal normal normal 8pt Tahoma",fontColor:"#999"},series:{outline:{width:1,color:"#fff"},stroke:{width:2,color:"#666"},fill:new dojo.Color([102,102,102,0.8]),font:"normal normal normal 7pt Tahoma",fontColor:"#000"},marker:{stroke:{width:2},fill:"#333",font:"normal normal normal 7pt Tahoma",fontColor:"#000"},colors:[]});
+_1.themes.PlotKit.purple.defineColors({hue:271,saturation:60,low:40,high:88});
})();
-
}
diff --git a/js/dojo/dojox/charting/themes/PlotKit/red.js b/js/dojo/dojox/charting/themes/PlotKit/red.js
--- a/js/dojo/dojox/charting/themes/PlotKit/red.js
+++ b/js/dojo/dojox/charting/themes/PlotKit/red.js
@@ -1,43 +1,17 @@
-if(!dojo._hasResource["dojox.charting.themes.PlotKit.red"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.themes.PlotKit.red"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.charting.themes.PlotKit.red"]){
+dojo._hasResource["dojox.charting.themes.PlotKit.red"]=true;
dojo.provide("dojox.charting.themes.PlotKit.red");
dojo.require("dojox.charting.Theme");
-
(function(){
- var dxc=dojox.charting;
- dxc.themes.PlotKit.red=new dxc.Theme({
- chart:{
- stroke:null,
- fill: "white"
- },
- plotarea:{
- stroke:null,
- fill: "#f5e6e6"
- },
- axis:{
- stroke:{ color:"#fff",width:2 },
- line:{ color:"#fff",width:1 },
- majorTick:{ color:"#fff", width:2, length:12 },
- minorTick:{ color:"#fff", width:1, length:8 },
- font:"normal normal normal 8pt Tahoma",
- fontColor:"#999"
- },
- series:{
- outline:{ width:1, color:"#fff" },
- stroke:{ width:2, color:"#666" },
- fill:new dojo.Color([0x66, 0x66, 0x66, 0.8]),
- font:"normal normal normal 7pt Tahoma", // label
- fontColor:"#000"
- },
- marker:{ // any markers on a series.
- stroke:{ width:2 },
- fill:"#333",
- font:"normal normal normal 7pt Tahoma", // label
- fontColor:"#000"
- },
- colors:[]
- });
- dxc.themes.PlotKit.red.defineColors({ hue:1, saturation:60, low:40, high:88 });
+var _1=dojox.charting;
+_1.themes.PlotKit.red=new _1.Theme({chart:{stroke:null,fill:"white"},plotarea:{stroke:null,fill:"#f5e6e6"},axis:{stroke:{color:"#fff",width:2},line:{color:"#fff",width:1},majorTick:{color:"#fff",width:2,length:12},minorTick:{color:"#fff",width:1,length:8},font:"normal normal normal 8pt Tahoma",fontColor:"#999"},series:{outline:{width:1,color:"#fff"},stroke:{width:2,color:"#666"},fill:new dojo.Color([102,102,102,0.8]),font:"normal normal normal 7pt Tahoma",fontColor:"#000"},marker:{stroke:{width:2},fill:"#333",font:"normal normal normal 7pt Tahoma",fontColor:"#000"},colors:[]});
+_1.themes.PlotKit.red.defineColors({hue:1,saturation:60,low:40,high:88});
})();
-
}
diff --git a/js/dojo/dojox/charting/widget/Chart2D.js b/js/dojo/dojox/charting/widget/Chart2D.js
--- a/js/dojo/dojox/charting/widget/Chart2D.js
+++ b/js/dojo/dojox/charting/widget/Chart2D.js
@@ -1,200 +1,16 @@
-if(!dojo._hasResource["dojox.charting.widget.Chart2D"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.charting.widget.Chart2D"] = true;
-dojo.provide("dojox.charting.widget.Chart2D");
-
-dojo.require("dijit._Widget");
-dojo.require("dojox.charting.Chart2D");
-dojo.require("dojox.lang.functional");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-(function(){
- var collectAxisParams, collectPlotParams, collectDataParams,
- notNull = function(o){ return o; },
- df = dojox.lang.functional,
- du = dojox.lang.utils;
-
- dojo.declare("dojox.charting.widget.Chart2D", dijit._Widget, {
- // parameters for the markup
-
- // theme for the chart
- theme: null,
-
- // margins for the chart: {l: 10, r: 10, t: 10, b: 10}
- margins: null,
-
- // chart area
- stroke: null,
- fill: null,
-
- // methods
-
- buildRendering: function(){
- var n = this.domNode = this.srcNodeRef;
-
- // collect chart parameters
- var axes = dojo.filter(dojo.query("> .axis", n).map(collectAxisParams), notNull);
- var plots = dojo.filter(dojo.query("> .plot", n).map(collectPlotParams), notNull);
- var series = dojo.filter(dojo.query("> .series", n).map(collectDataParams), notNull);
-
- // build the chart
- n.innerHTML = "";
- var c = this.chart = new dojox.charting.Chart2D(n, {
- margins: this.margins,
- stroke: this.stroke,
- fill: this.fill
- });
-
- // add collected parameters
- if(this.theme){
- c.setTheme(this.theme);
- }
- dojo.forEach(axes, function(axis){
- c.addAxis(axis.name, axis.kwArgs);
- });
- dojo.forEach(plots, function(plot){
- c.addPlot(plot.name, plot.kwArgs);
- });
- var render = df.foldl(series, function(render, series){
- if(series.type == "data"){
- c.addSeries(series.name, series.data, series.kwArgs);
- render = true;
- }else{
- c.addSeries(series.name, [0], series.kwArgs);
- var kw = {};
- du.updateWithPattern(kw, series.kwArgs, {"query": "", "queryOptions": null, "start": 0, "count": 1, "sort": []}, true);
- dojo.mixin(kw, {
- onComplete: function(data){
- var values;
- if("valueFn" in series.kwArgs){
- var fn = series.kwArgs.valueFn;
- values = dojo.map(data, function(x){
- return fn(series.data.getValue(x, series.field, 0));
- });
- }else{
- values = dojo.map(data, function(x){
- return series.data.getValue(x, series.field, 0);
- });
- }
- c.addSeries(series.name, values, series.kwArgs).render();
- }
- });
- series.data.fetch(kw);
- }
- return render;
- }, false);
- if(render){ c.render(); }
- },
- resize: function(box){
- dojo.marginBox(this.domNode, box);
- this.chart.resize();
- }
- });
-
- collectAxisParams = function(node){
- var name = node.getAttribute("name"), type = node.getAttribute("type");
- if(!name){ return null; }
- var o = {name: name, kwArgs: {}}, kw = o.kwArgs;
- if(type){
- if(dojox.charting.axis2d[type]){
- type = "dojox.charting.axis2d." + type;
- }
- var axis = eval("(" + type + ")");
- if(axis){ kw.type = axis; }
- }else{
- type = "dojox.charting.axis2d.Default";
- }
- var dp = eval("(" + type + ".prototype.defaultParams)");
- for(var x in dp){
- if(x in kw){ continue; }
- var attr = node.getAttribute(x);
- kw[x] = du.coerceType(dp[x], attr == null ? dp[x] : attr);
- }
- var op = eval("(" + type + ".prototype.optionalParams)");
- for(var x in op){
- if(x in kw){ continue; }
- var attr = node.getAttribute(x);
- if(attr != null){
- kw[x] = du.coerceType(op[x], attr);
- }
- }
- return o;
- };
-
- collectPlotParams = function(node){
- var name = node.getAttribute("name"), type = node.getAttribute("type");
- if(!name){ return null; }
- var o = {name: name, kwArgs: {}}, kw = o.kwArgs;
- if(type){
- if(dojox.charting.plot2d[type]){
- type = "dojox.charting.plot2d." + type;
- }
- var plot = eval("(" + type + ")");
- if(plot){ kw.type = plot; }
- }else{
- type = "dojox.charting.plot2d.Default";
- }
- var dp = eval("(" + type + ".prototype.defaultParams)");
- for(var x in dp){
- if(x in kw){ continue; }
- var attr = node.getAttribute(x);
- kw[x] = du.coerceType(dp[x], attr == null ? dp[x] : attr);
- }
- var op = eval("(" + type + ".prototype.optionalParams)");
- for(var x in op){
- if(x in kw){ continue; }
- var attr = node.getAttribute(x);
- if(attr != null){
- kw[x] = du.coerceType(op[x], attr);
- }
- }
- return o;
- };
-
- collectDataParams = function(node){
- var name = node.getAttribute("name");
- if(!name){ return null; }
- var o = {name: name, kwArgs: {}}, kw = o.kwArgs, t;
- t = node.getAttribute("plot");
- if(t != null){ kw.plot = t; }
- t = node.getAttribute("marker");
- if(t != null){ kw.marker = t; }
- t = node.getAttribute("stroke");
- if(t != null){ kw.stroke = eval("(" + t + ")"); }
- t = node.getAttribute("fill");
- if(t != null){ kw.fill = eval("(" + t + ")"); }
- t = node.getAttribute("data");
- if(t != null){
- o.type = "data";
- o.data = dojo.map(String(t).split(','), Number);
- return o;
- }
- t = node.getAttribute("array");
- if(t != null){
- o.type = "data";
- o.data = eval("(" + t + ")");
- return o;
- }
- t = node.getAttribute("store");
- if(t != null){
- o.type = "store";
- o.data = eval("(" + t + ")");
- t = node.getAttribute("field");
- o.field = t != null ? t : "value";
- t = node.getAttribute("query");
- if(t != null){ kw.query = t; }
- t = node.getAttribute("queryOptions");
- if(t != null){ kw.queryOptions = eval("(" + t + ")"); }
- t = node.getAttribute("start");
- if(t != null){ kw.start = Number(t); }
- t = node.getAttribute("count");
- if(t != null){ kw.count = Number(t); }
- t = node.getAttribute("sort");
- if(t != null){ kw.sort = eval("(" + t + ")"); }
- t = node.getAttribute("valueFn");
- if(t != null){ kw.valueFn = df.lambda(t); }
- return o;
- }
- return null;
- };
-})();
+/*
+ This is a compiled version of Dojo, built for deployment and not for
+ development. To get an editable version, please visit:
-}
+ http://dojotoolkit.org
+
+ for documentation and information on getting the source.
+*/
+
+if(!dojo._hasResource["dijit._base.manager"]){dojo._hasResource["dijit._base.manager"]=true;dojo.provide("dijit._base.manager");dojo.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={};this.length=0;},add:function(_1){if(this._hash[_1.id]){throw new Error("Tried to register widget with id=="+_1.id+" but that id is already registered");}this._hash[_1.id]=_1;this.length++;},remove:function(id){if(this._hash[id]){delete this._hash[id];this.length--;}},forEach:function(_2,_3){_3=_3||dojo.global;var i=0,id;for(id in this._hash){_2.call(_3,this._hash[id],i++,this._hash);}return this;},filter:function(_4,_5){_5=_5||dojo.global;var _6=new dijit.WidgetSet(),i=0,id;for(id in this._hash){var w=this._hash[id];if(_4.call(_5,w,i++,this._hash)){_6.add(w);}}return _6;},byId:function(id){return this._hash[id];},byClass:function(_7){var _8=new dijit.WidgetSet(),id,_9;for(id in this._hash){_9=this._hash[id];if(_9.declaredClass==_7){_8.add(_9);}}return _8;},toArray:function(){var ar=[];for(var id in this._hash){ar.push(this._hash[id]);}return ar;},map:function(_a,_b){return dojo.map(this.toArray(),_a,_b);},every:function(_c,_d){_d=_d||dojo.global;var x=0,i;for(i in this._hash){if(!_c.call(_d,this._hash[i],x++,this._hash)){return false;}}return true;},some:function(_e,_f){_f=_f||dojo.global;var x=0,i;for(i in this._hash){if(_e.call(_f,this._hash[i],x++,this._hash)){return true;}}return false;}});dijit.registry=new dijit.WidgetSet();dijit._widgetTypeCtr={};dijit.getUniqueId=function(_10){var id;do{id=_10+"_"+(_10 in dijit._widgetTypeCtr?++dijit._widgetTypeCtr[_10]:dijit._widgetTypeCtr[_10]=0);}while(dijit.byId(id));return dijit._scopeName=="dijit"?id:dijit._scopeName+"_"+id;};dijit.findWidgets=function(_11){var _12=[];function _13(_14){for(var _15=_14.firstChild;_15;_15=_15.nextSibling){if(_15.nodeType==1){var _16=_15.getAttribute("widgetId");if(_16){var _17=dijit.byId(_16);_12.push(_17);}else{_13(_15);}}}};_13(_11);return _12;};dijit._destroyAll=function(){dijit._curFocus=null;dijit._prevFocus=null;dijit._activeStack=[];dojo.forEach(dijit.findWidgets(dojo.body()),function(_18){if(!_18._destroyed){if(_18.destroyRecursive){_18.destroyRecursive();}else{if(_18.destroy){_18.destroy();}}}});};if(dojo.isIE){dojo.addOnWindowUnload(function(){dijit._destroyAll();});}dijit.byId=function(id){return typeof id=="string"?dijit.registry._hash[id]:id;};dijit.byNode=function(_19){return dijit.registry.byId(_19.getAttribute("widgetId"));};dijit.getEnclosingWidget=function(_1a){while(_1a){var id=_1a.getAttribute&&_1a.getAttribute("widgetId");if(id){return dijit.byId(id);}_1a=_1a.parentNode;}return null;};dijit._isElementShown=function(_1b){var _1c=dojo.style(_1b);return (_1c.visibility!="hidden")&&(_1c.visibility!="collapsed")&&(_1c.display!="none")&&(dojo.attr(_1b,"type")!="hidden");};dijit.isTabNavigable=function(_1d){if(dojo.attr(_1d,"disabled")){return false;}else{if(dojo.hasAttr(_1d,"tabIndex")){return dojo.attr(_1d,"tabIndex")>=0;}else{switch(_1d.nodeName.toLowerCase()){case "a":return dojo.hasAttr(_1d,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return true;case "iframe":if(dojo.isMoz){return _1d.contentDocument.designMode=="on";}else{if(dojo.isWebKit){var doc=_1d.contentDocument,_1e=doc&&doc.body;return _1e&&_1e.contentEditable=="true";}else{try{doc=_1d.contentWindow.document;_1e=doc&&doc.body;return _1e&&_1e.firstChild&&_1e.firstChild.contentEditable=="true";}catch(e){return false;}}}default:return _1d.contentEditable=="true";}}}};dijit._getTabNavigable=function(_1f){var _20,_21,_22,_23,_24,_25;var _26=function(_27){dojo.query("> *",_27).forEach(function(_28){var _29=dijit._isElementShown(_28);if(_29&&dijit.isTabNavigable(_28)){var _2a=dojo.attr(_28,"tabIndex");if(!dojo.hasAttr(_28,"tabIndex")||_2a==0){if(!_20){_20=_28;}_21=_28;}else{if(_2a>0){if(!_22||_2a<_23){_23=_2a;_22=_28;}if(!_24||_2a>=_25){_25=_2a;_24=_28;}}}}if(_29&&_28.nodeName.toUpperCase()!="SELECT"){_26(_28);}});};if(dijit._isElementShown(_1f)){_26(_1f);}return {first:_20,last:_21,lowest:_22,highest:_24};};dijit.getFirstInTabbingOrder=function(_2b){var _2c=dijit._getTabNavigable(dojo.byId(_2b));return _2c.lowest?_2c.lowest:_2c.first;};dijit.getLastInTabbingOrder=function(_2d){var _2e=dijit._getTabNavigable(dojo.byId(_2d));return _2e.last?_2e.last:_2e.highest;};dijit.defaultDuration=dojo.config["defaultDuration"]||200;}if(!dojo._hasResource["dijit._base.focus"]){dojo._hasResource["dijit._base.focus"]=true;dojo.provide("dijit._base.focus");dojo.mixin(dijit,{_curFocus:null,_prevFocus:null,isCollapsed:function(){return dijit.getBookmark().isCollapsed;},getBookmark:function(){var bm,rg,tg,sel=dojo.doc.selection,cf=dijit._curFocus;if(dojo.global.getSelection){sel=dojo.global.getSelection();if(sel){if(sel.isCollapsed){tg=cf?cf.tagName:"";if(tg){tg=tg.toLowerCase();if(tg=="textarea"||(tg=="input"&&(!cf.type||cf.type.toLowerCase()=="text"))){sel={start:cf.selectionStart,end:cf.selectionEnd,node:cf,pRange:true};return {isCollapsed:(sel.end<=sel.start),mark:sel};}}bm={isCollapsed:true};}else{rg=sel.getRangeAt(0);bm={isCollapsed:false,mark:rg.cloneRange()};}}}else{if(sel){tg=cf?cf.tagName:"";tg=tg.toLowerCase();if(cf&&tg&&(tg=="button"||tg=="textarea"||tg=="input")){if(sel.type&&sel.type.toLowerCase()=="none"){return {isCollapsed:true,mark:null};}else{rg=sel.createRange();return {isCollapsed:rg.text&&rg.text.length?false:true,mark:{range:rg,pRange:true}};}}bm={};try{rg=sel.createRange();bm.isCollapsed=!(sel.type=="Text"?rg.htmlText.length:rg.length);}catch(e){bm.isCollapsed=true;return bm;}if(sel.type.toUpperCase()=="CONTROL"){if(rg.length){bm.mark=[];var i=0,len=rg.length;while(i<len){bm.mark.push(rg.item(i++));}}else{bm.isCollapsed=true;bm.mark=null;}}else{bm.mark=rg.getBookmark();}}else{console.warn("No idea how to store the current selection for this browser!");}}return bm;},moveToBookmark:function(_2f){var _30=dojo.doc,_31=_2f.mark;if(_31){if(dojo.global.getSelection){var sel=dojo.global.getSelection();if(sel&&sel.removeAllRanges){if(_31.pRange){var r=_31;var n=r.node;n.selectionStart=r.start;n.selectionEnd=r.end;}else{sel.removeAllRanges();sel.addRange(_31);}}else{console.warn("No idea how to restore selection for this browser!");}}else{if(_30.selection&&_31){var rg;if(_31.pRange){rg=_31.range;}else{if(dojo.isArray(_31)){rg=_30.body.createControlRange();dojo.forEach(_31,function(n){rg.addElement(n);});}else{rg=_30.body.createTextRange();rg.moveToBookmark(_31);}}rg.select();}}}},getFocus:function(_32,_33){var _34=!dijit._curFocus||(_32&&dojo.isDescendant(dijit._curFocus,_32.domNode))?dijit._prevFocus:dijit._curFocus;return {node:_34,bookmark:(_34==dijit._curFocus)&&dojo.withGlobal(_33||dojo.global,dijit.getBookmark),openedForWindow:_33};},focus:function(_35){if(!_35){return;}var _36="node" in _35?_35.node:_35,_37=_35.bookmark,_38=_35.openedForWindow,_39=_37?_37.isCollapsed:false;if(_36){var _3a=(_36.tagName.toLowerCase()=="iframe")?_36.contentWindow:_36;if(_3a&&_3a.focus){try{_3a.focus();}catch(e){}}dijit._onFocusNode(_36);}if(_37&&dojo.withGlobal(_38||dojo.global,dijit.isCollapsed)&&!_39){if(_38){_38.focus();}try{dojo.withGlobal(_38||dojo.global,dijit.moveToBookmark,null,[_37]);}catch(e2){}}},_activeStack:[],registerIframe:function(_3b){return dijit.registerWin(_3b.contentWindow,_3b);},unregisterIframe:function(_3c){dijit.unregisterWin(_3c);},registerWin:function(_3d,_3e){var _3f=function(evt){dijit._justMouseDowned=true;setTimeout(function(){dijit._justMouseDowned=false;},0);dijit._onTouchNode(_3e||evt.target||evt.srcElement,"mouse");};var doc=dojo.isIE?_3d.document.documentElement:_3d.document;if(doc){if(dojo.isIE){doc.attachEvent("onmousedown",_3f);var _40=function(evt){if(evt.srcElement.tagName.toLowerCase()!="#document"&&dijit.isTabNavigable(evt.srcElement)){dijit._onFocusNode(_3e||evt.srcElement);}else{dijit._onTouchNode(_3e||evt.srcElement);}};doc.attachEvent("onactivate",_40);var _41=function(evt){dijit._onBlurNode(_3e||evt.srcElement);};doc.attachEvent("ondeactivate",_41);return function(){doc.detachEvent("onmousedown",_3f);doc.detachEvent("onactivate",_40);doc.detachEvent("ondeactivate",_41);doc=null;};}else{doc.addEventListener("mousedown",_3f,true);var _42=function(evt){dijit._onFocusNode(_3e||evt.target);};doc.addEventListener("focus",_42,true);var _43=function(evt){dijit._onBlurNode(_3e||evt.target);};doc.addEventListener("blur",_43,true);return function(){doc.removeEventListener("mousedown",_3f,true);doc.removeEventListener("focus",_42,true);doc.removeEventListener("blur",_43,true);doc=null;};}}},unregisterWin:function(_44){_44&&_44();},_onBlurNode:function(_45){dijit._prevFocus=dijit._curFocus;dijit._curFocus=null;if(dijit._justMouseDowned){return;}if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);}dijit._clearActiveWidgetsTimer=setTimeout(function(){delete dijit._clearActiveWidgetsTimer;dijit._setStack([]);dijit._prevFocus=null;},100);},_onTouchNode:function(_46,by){if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);delete dijit._clearActiveWidgetsTimer;}var _47=[];try{while(_46){var _48=dojo.attr(_46,"dijitPopupParent");if(_48){_46=dijit.byId(_48).domNode;}else{if(_46.tagName&&_46.tagName.toLowerCase()=="body"){if(_46===dojo.body()){break;}_46=dijit.getDocumentWindow(_46.ownerDocument).frameElement;}else{var id=_46.getAttribute&&_46.getAttribute("widgetId");if(id){_47.unshift(id);}_46=_46.parentNode;}}}}catch(e){}dijit._setStack(_47,by);},_onFocusNode:function(_49){if(!_49){return;}if(_49.nodeType==9){return;}dijit._onTouchNode(_49);if(_49==dijit._curFocus){return;}if(dijit._curFocus){dijit._prevFocus=dijit._curFocus;}dijit._curFocus=_49;dojo.publish("focusNode",[_49]);},_setStack:function(_4a,by){var _4b=dijit._activeStack;dijit._activeStack=_4a;for(var _4c=0;_4c<Math.min(_4b.length,_4a.length);_4c++){if(_4b[_4c]!=_4a[_4c]){break;}}var _4d;for(var i=_4b.length-1;i>=_4c;i--){_4d=dijit.byId(_4b[i]);if(_4d){_4d._focused=false;_4d._hasBeenBlurred=true;if(_4d._onBlur){_4d._onBlur(by);}if(_4d._setStateClass){_4d._setStateClass();}dojo.publish("widgetBlur",[_4d,by]);}}for(i=_4c;i<_4a.length;i++){_4d=dijit.byId(_4a[i]);if(_4d){_4d._focused=true;if(_4d._onFocus){_4d._onFocus(by);}if(_4d._setStateClass){_4d._setStateClass();}dojo.publish("widgetFocus",[_4d,by]);}}}});dojo.addOnLoad(function(){var _4e=dijit.registerWin(window);if(dojo.isIE){dojo.addOnWindowUnload(function(){dijit.unregisterWin(_4e);_4e=null;});}});}if(!dojo._hasResource["dojo.AdapterRegistry"]){dojo._hasResource["dojo.AdapterRegistry"]=true;dojo.provide("dojo.AdapterRegistry");dojo.AdapterRegistry=function(_4f){this.pairs=[];this.returnWrappers=_4f||false;};dojo.extend(dojo.AdapterRegistry,{register:function(_50,_51,_52,_53,_54){this.pairs[((_54)?"unshift":"push")]([_50,_51,_52,_53]);},match:function(){for(var i=0;i<this.pairs.length;i++){var _55=this.pairs[i];if(_55[1].apply(this,arguments)){if((_55[3])||(this.returnWrappers)){return _55[2];}else{return _55[2].apply(this,arguments);}}}throw new Error("No match found");},unregister:function(_56){for(var i=0;i<this.pairs.length;i++){var _57=this.pairs[i];if(_57[0]==_56){this.pairs.splice(i,1);return true;}}return false;}});}if(!dojo._hasResource["dijit._base.place"]){dojo._hasResource["dijit._base.place"]=true;dojo.provide("dijit._base.place");dijit.getViewport=function(){var _58=(dojo.doc.compatMode=="BackCompat")?dojo.body():dojo.doc.documentElement;var _59=dojo._docScroll();return {w:_58.clientWidth,h:_58.clientHeight,l:_59.x,t:_59.y};};dijit.placeOnScreen=function(_5a,pos,_5b,_5c){var _5d=dojo.map(_5b,function(_5e){var c={corner:_5e,pos:{x:pos.x,y:pos.y}};if(_5c){c.pos.x+=_5e.charAt(1)=="L"?_5c.x:-_5c.x;c.pos.y+=_5e.charAt(0)=="T"?_5c.y:-_5c.y;}return c;});return dijit._place(_5a,_5d);};dijit._place=function(_5f,_60,_61){var _62=dijit.getViewport();if(!_5f.parentNode||String(_5f.parentNode.tagName).toLowerCase()!="body"){dojo.body().appendChild(_5f);}var _63=null;dojo.some(_60,function(_64){var _65=_64.corner;var pos=_64.pos;if(_61){_61(_5f,_64.aroundCorner,_65);}var _66=_5f.style;var _67=_66.display;var _68=_66.visibility;_66.visibility="hidden";_66.display="";var mb=dojo.marginBox(_5f);_66.display=_67;_66.visibility=_68;var _69=Math.max(_62.l,_65.charAt(1)=="L"?pos.x:(pos.x-mb.w)),_6a=Math.max(_62.t,_65.charAt(0)=="T"?pos.y:(pos.y-mb.h)),_6b=Math.min(_62.l+_62.w,_65.charAt(1)=="L"?(_69+mb.w):pos.x),_6c=Math.min(_62.t+_62.h,_65.charAt(0)=="T"?(_6a+mb.h):pos.y),_6d=_6b-_69,_6e=_6c-_6a,_6f=(mb.w-_6d)+(mb.h-_6e);if(_63==null||_6f<_63.overflow){_63={corner:_65,aroundCorner:_64.aroundCorner,x:_69,y:_6a,w:_6d,h:_6e,overflow:_6f};}return !_6f;});_5f.style.left=_63.x+"px";_5f.style.top=_63.y+"px";if(_63.overflow&&_61){_61(_5f,_63.aroundCorner,_63.corner);}return _63;};dijit.placeOnScreenAroundNode=function(_70,_71,_72,_73){_71=dojo.byId(_71);var _74=_71.style.display;_71.style.display="";var _75=dojo.position(_71,true);_71.style.display=_74;return dijit._placeOnScreenAroundRect(_70,_75.x,_75.y,_75.w,_75.h,_72,_73);};dijit.placeOnScreenAroundRectangle=function(_76,_77,_78,_79){return dijit._placeOnScreenAroundRect(_76,_77.x,_77.y,_77.width,_77.height,_78,_79);};dijit._placeOnScreenAroundRect=function(_7a,x,y,_7b,_7c,_7d,_7e){var _7f=[];for(var _80 in _7d){_7f.push({aroundCorner:_80,corner:_7d[_80],pos:{x:x+(_80.charAt(1)=="L"?0:_7b),y:y+(_80.charAt(0)=="T"?0:_7c)}});}return dijit._place(_7a,_7f,_7e);};dijit.placementRegistry=new dojo.AdapterRegistry();dijit.placementRegistry.register("node",function(n,x){return typeof x=="object"&&typeof x.offsetWidth!="undefined"&&typeof x.offsetHeight!="undefined";},dijit.placeOnScreenAroundNode);dijit.placementRegistry.register("rect",function(n,x){return typeof x=="object"&&"x" in x&&"y" in x&&"width" in x&&"height" in x;},dijit.placeOnScreenAroundRectangle);dijit.placeOnScreenAroundElement=function(_81,_82,_83,_84){return dijit.placementRegistry.match.apply(dijit.placementRegistry,arguments);};dijit.getPopupAlignment=function(_85,_86){var _87={};dojo.forEach(_85,function(pos){switch(pos){case "after":_87[_86?"BR":"BL"]=_86?"BL":"BR";break;case "before":_87[_86?"BL":"BR"]=_86?"BR":"BL";break;case "below":_87[_86?"BL":"BR"]=_86?"TL":"TR";_87[_86?"BR":"BL"]=_86?"TR":"TL";break;case "above":default:_87[_86?"TL":"TR"]=_86?"BL":"BR";_87[_86?"TR":"TL"]=_86?"BR":"BL";break;}});return _87;};dijit.getPopupAroundAlignment=function(_88,_89){var _8a={};dojo.forEach(_88,function(pos){switch(pos){case "after":_8a[_89?"BR":"BL"]=_89?"BL":"BR";break;case "before":_8a[_89?"BL":"BR"]=_89?"BR":"BL";break;case "below":_8a[_89?"BL":"BR"]=_89?"TL":"TR";_8a[_89?"BR":"BL"]=_89?"TR":"TL";break;case "above":default:_8a[_89?"TL":"TR"]=_89?"BL":"BR";_8a[_89?"TR":"TL"]=_89?"BR":"BL";break;}});return _8a;};}if(!dojo._hasResource["dijit._base.window"]){dojo._hasResource["dijit._base.window"]=true;dojo.provide("dijit._base.window");dijit.getDocumentWindow=function(doc){if(dojo.isIE&&window!==document.parentWindow&&!doc._parentWindow){doc.parentWindow.execScript("document._parentWindow = window;","Javascript");var win=doc._parentWindow;doc._parentWindow=null;return win;}return doc._parentWindow||doc.parentWindow||doc.defaultView;};}if(!dojo._hasResource["dijit._base.popup"]){dojo._hasResource["dijit._base.popup"]=true;dojo.provide("dijit._base.popup");dijit.popup=new function(){var _8b=[],_8c=1000,_8d=1;this.moveOffScreen=function(_8e){var s=_8e.style;s.visibility="hidden";s.position="absolute";s.top="-9999px";if(s.display=="none"){s.display="";}dojo.body().appendChild(_8e);};var _8f=function(){for(var pi=_8b.length-1;pi>0&&_8b[pi].parent===_8b[pi-1].widget;pi--){}return _8b[pi];};var _90=[];this.open=function(_91){var _92=_91.popup,_93=_91.orient||(dojo._isBodyLtr()?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"}),_94=_91.around,id=(_91.around&&_91.around.id)?(_91.around.id+"_dropdown"):("popup_"+_8d++);var _95=_90.pop(),_96,_97;if(!_95){_96=dojo.create("div",{"class":"dijitPopup"},dojo.body());dijit.setWaiRole(_96,"presentation");}else{_96=_95[0];_97=_95[1];}dojo.attr(_96,{id:id,style:{zIndex:_8c+_8b.length,visibility:"hidden",top:"-9999px"},dijitPopupParent:_91.parent?_91.parent.id:""});var s=_92.domNode.style;s.display="";s.visibility="";s.position="";s.top="0px";_96.appendChild(_92.domNode);if(!_97){_97=new dijit.BackgroundIframe(_96);}else{_97.resize(_96);}var _98=_94?dijit.placeOnScreenAroundElement(_96,_94,_93,_92.orient?dojo.hitch(_92,"orient"):null):dijit.placeOnScreen(_96,_91,_93=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],_91.padding);_96.style.visibility="visible";var _99=[];_99.push(dojo.connect(_96,"onkeypress",this,function(evt){if(evt.charOrCode==dojo.keys.ESCAPE&&_91.onCancel){dojo.stopEvent(evt);_91.onCancel();}else{if(evt.charOrCode===dojo.keys.TAB){dojo.stopEvent(evt);var _9a=_8f();if(_9a&&_9a.onCancel){_9a.onCancel();}}}}));if(_92.onCancel){_99.push(dojo.connect(_92,"onCancel",_91.onCancel));}_99.push(dojo.connect(_92,_92.onExecute?"onExecute":"onChange",function(){var _9b=_8f();if(_9b&&_9b.onExecute){_9b.onExecute();}}));_8b.push({wrapper:_96,iframe:_97,widget:_92,parent:_91.parent,onExecute:_91.onExecute,onCancel:_91.onCancel,onClose:_91.onClose,handlers:_99});if(_92.onOpen){_92.onOpen(_98);}return _98;};this.close=function(_9c){while(dojo.some(_8b,function(_9d){return _9d.widget==_9c;})){var top=_8b.pop(),_9e=top.wrapper,_9f=top.iframe,_a0=top.widget,_a1=top.onClose;if(_a0.onClose){_a0.onClose();}dojo.forEach(top.handlers,dojo.disconnect);if(_a0&&_a0.domNode){this.moveOffScreen(_a0.domNode);}_9e.style.top="-9999px";_9e.style.visibility="hidden";_90.push([_9e,_9f]);if(_a1){_a1();}}};}();dijit._frames=new function(){var _a2=[];this.pop=function(){var _a3;if(_a2.length){_a3=_a2.pop();_a3.style.display="";}else{if(dojo.isIE){var _a4=dojo.config["dojoBlankHtmlUrl"]||(dojo.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\"";var _a5="<iframe src='"+_a4+"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";_a3=dojo.doc.createElement(_a5);}else{_a3=dojo.create("iframe");_a3.src="javascript:\"\"";_a3.className="dijitBackgroundIframe";dojo.style(_a3,"opacity",0.1);}_a3.tabIndex=-1;}return _a3;};this.push=function(_a6){_a6.style.display="none";_a2.push(_a6);};}();dijit.BackgroundIframe=function(_a7){if(!_a7.id){throw new Error("no id");}if(dojo.isIE||dojo.isMoz){var _a8=dijit._frames.pop();_a7.appendChild(_a8);if(dojo.isIE<7){this.resize(_a7);this._conn=dojo.connect(_a7,"onresize",this,function(){this.resize(_a7);});}else{dojo.style(_a8,{width:"100%",height:"100%"});}this.iframe=_a8;}};dojo.extend(dijit.BackgroundIframe,{resize:function(_a9){if(this.iframe&&dojo.isIE<7){dojo.style(this.iframe,{width:_a9.offsetWidth+"px",height:_a9.offsetHeight+"px"});}},destroy:function(){if(this._conn){dojo.disconnect(this._conn);this._conn=null;}if(this.iframe){dijit._frames.push(this.iframe);delete this.iframe;}}});}if(!dojo._hasResource["dijit._base.scroll"]){dojo._hasResource["dijit._base.scroll"]=true;dojo.provide("dijit._base.scroll");dijit.scrollIntoView=function(_aa,pos){try{_aa=dojo.byId(_aa);var doc=_aa.ownerDocument||dojo.doc,_ab=doc.body||dojo.body(),_ac=doc.documentElement||_ab.parentNode,_ad=dojo.isIE,_ae=dojo.isWebKit;if((!(dojo.isMoz||_ad||_ae)||_aa==_ab||_aa==_ac)&&(typeof _aa.scrollIntoView!="undefined")){_aa.scrollIntoView(false);return;}var _af=doc.compatMode=="BackCompat",_b0=_af?_ab:_ac,_b1=_ae?_ab:_b0,_b2=_b0.clientWidth,_b3=_b0.clientHeight,rtl=!dojo._isBodyLtr(),_b4=pos||dojo.position(_aa),el=_aa.parentNode,_b5=function(el){return ((_ad<=6||(_ad&&_af))?false:(dojo.style(el,"position").toLowerCase()=="fixed"));};if(_b5(_aa)){return;}while(el){if(el==_ab){el=_b1;}var _b6=dojo.position(el),_b7=_b5(el);with(_b6){if(el==_b1){w=_b2,h=_b3;if(_b1==_ac&&_ad&&rtl){x+=_b1.offsetWidth-w;}if(x<0||!_ad){x=0;}if(y<0||!_ad){y=0;}}else{var pb=dojo._getPadBorderExtents(el);w-=pb.w;h-=pb.h;x+=pb.l;y+=pb.t;}with(el){if(el!=_b1){var _b8=clientWidth,_b9=w-_b8;if(_b8>0&&_b9>0){w=_b8;if(_ad&&rtl){x+=_b9;}}_b8=clientHeight;_b9=h-_b8;if(_b8>0&&_b9>0){h=_b8;}}if(_b7){if(y<0){h+=y,y=0;}if(x<0){w+=x,x=0;}if(y+h>_b3){h=_b3-y;}if(x+w>_b2){w=_b2-x;}}var l=_b4.x-x,t=_b4.y-Math.max(y,0),r=l+_b4.w-w,bot=t+_b4.h-h;if(r*l>0){var s=Math[l<0?"max":"min"](l,r);_b4.x+=scrollLeft;scrollLeft+=(_ad>=8&&!_af&&rtl)?-s:s;_b4.x-=scrollLeft;}if(bot*t>0){_b4.y+=scrollTop;scrollTop+=Math[t<0?"max":"min"](t,bot);_b4.y-=scrollTop;}}}el=(el!=_b1)&&!_b7&&el.parentNode;}}catch(error){console.error("scrollIntoView: "+error);_aa.scrollIntoView(false);}};}if(!dojo._hasResource["dijit._base.sniff"]){dojo._hasResource["dijit._base.sniff"]=true;dojo.provide("dijit._base.sniff");(function(){var d=dojo,_ba=d.doc.documentElement,ie=d.isIE,_bb=d.isOpera,maj=Math.floor,ff=d.isFF,_bc=d.boxModel.replace(/-/,""),_bd={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_ie8:maj(ie)==8,dj_iequirks:ie&&d.isQuirks,dj_opera:_bb,dj_khtml:d.isKhtml,dj_webkit:d.isWebKit,dj_safari:d.isSafari,dj_chrome:d.isChrome,dj_gecko:d.isMozilla,dj_ff3:maj(ff)==3};_bd["dj_"+_bc]=true;for(var p in _bd){if(_bd[p]){if(_ba.className){_ba.className+=" "+p;}else{_ba.className=p;}}}dojo._loaders.unshift(function(){if(!dojo._isBodyLtr()){_ba.className+=" dijitRtl";for(var p in _bd){if(_bd[p]){_ba.className+=" "+p+"-rtl";}}}});})();}if(!dojo._hasResource["dijit._base.typematic"]){dojo._hasResource["dijit._base.typematic"]=true;dojo.provide("dijit._base.typematic");dijit.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=Math.max(this._currentTimeout<0?this._initialDelay:(this._subsequentDelay>1?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay)),10);this._timer=setTimeout(dojo.hitch(this,"_fireEventAndReload"),this._currentTimeout);},trigger:function(evt,_be,_bf,_c0,obj,_c1,_c2){if(obj!=this._obj){this.stop();this._initialDelay=_c2||500;this._subsequentDelay=_c1||0.9;this._obj=obj;this._evt=evt;this._node=_bf;this._currentTimeout=-1;this._count=-1;this._callback=dojo.hitch(_be,_c0);this._fireEventAndReload();}},stop:function(){if(this._timer){clearTimeout(this._timer);this._timer=null;}if(this._obj){this._callback(-1,this._node,this._evt);this._obj=null;}},addKeyListener:function(_c3,_c4,_c5,_c6,_c7,_c8){if(_c4.keyCode){_c4.charOrCode=_c4.keyCode;dojo.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}else{if(_c4.charCode){_c4.charOrCode=String.fromCharCode(_c4.charCode);dojo.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}}return [dojo.connect(_c3,"onkeypress",this,function(evt){if(evt.charOrCode==_c4.charOrCode&&(_c4.ctrlKey===undefined||_c4.ctrlKey==evt.ctrlKey)&&(_c4.altKey===undefined||_c4.altKey==evt.altKey)&&(_c4.metaKey===undefined||_c4.metaKey==(evt.metaKey||false))&&(_c4.shiftKey===undefined||_c4.shiftKey==evt.shiftKey)){dojo.stopEvent(evt);dijit.typematic.trigger(_c4,_c5,_c3,_c6,_c4,_c7,_c8);}else{if(dijit.typematic._obj==_c4){dijit.typematic.stop();}}}),dojo.connect(_c3,"onkeyup",this,function(evt){if(dijit.typematic._obj==_c4){dijit.typematic.stop();}})];},addMouseListener:function(_c9,_ca,_cb,_cc,_cd){var dc=dojo.connect;return [dc(_c9,"mousedown",this,function(evt){dojo.stopEvent(evt);dijit.typematic.trigger(evt,_ca,_c9,_cb,_c9,_cc,_cd);}),dc(_c9,"mouseup",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(_c9,"mouseout",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(_c9,"mousemove",this,function(evt){dojo.stopEvent(evt);}),dc(_c9,"dblclick",this,function(evt){dojo.stopEvent(evt);if(dojo.isIE){dijit.typematic.trigger(evt,_ca,_c9,_cb,_c9,_cc,_cd);setTimeout(dojo.hitch(this,dijit.typematic.stop),50);}})];},addListener:function(_ce,_cf,_d0,_d1,_d2,_d3,_d4){return this.addKeyListener(_cf,_d0,_d1,_d2,_d3,_d4).concat(this.addMouseListener(_ce,_d1,_d2,_d3,_d4));}};}if(!dojo._hasResource["dijit._base.wai"]){dojo._hasResource["dijit._base.wai"]=true;dojo.provide("dijit._base.wai");dijit.wai={onload:function(){var div=dojo.create("div",{id:"a11yTestNode",style:{cssText:"border: 1px solid;"+"border-color:red green;"+"position: absolute;"+"height: 5px;"+"top: -999px;"+"background-image: url(\""+(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif"))+"\");"}},dojo.body());var cs=dojo.getComputedStyle(div);if(cs){var _d5=cs.backgroundImage;var _d6=(cs.borderTopColor==cs.borderRightColor)||(_d5!=null&&(_d5=="none"||_d5=="url(invalid-url:)"));dojo[_d6?"addClass":"removeClass"](dojo.body(),"dijit_a11y");if(dojo.isIE){div.outerHTML="";}else{dojo.body().removeChild(div);}}}};if(dojo.isIE||dojo.isMoz){dojo._loaders.unshift(dijit.wai.onload);}dojo.mixin(dijit,{_XhtmlRoles:/banner|contentinfo|definition|main|navigation|search|note|secondary|seealso/,hasWaiRole:function(_d7,_d8){var _d9=this.getWaiRole(_d7);return _d8?(_d9.indexOf(_d8)>-1):(_d9.length>0);},getWaiRole:function(_da){return dojo.trim((dojo.attr(_da,"role")||"").replace(this._XhtmlRoles,"").replace("wairole:",""));},setWaiRole:function(_db,_dc){var _dd=dojo.attr(_db,"role")||"";if(!this._XhtmlRoles.test(_dd)){dojo.attr(_db,"role",_dc);}else{if((" "+_dd+" ").indexOf(" "+_dc+" ")<0){var _de=dojo.trim(_dd.replace(this._XhtmlRoles,""));var _df=dojo.trim(_dd.replace(_de,""));dojo.attr(_db,"role",_df+(_df?" ":"")+_dc);}}},removeWaiRole:function(_e0,_e1){var _e2=dojo.attr(_e0,"role");if(!_e2){return;}if(_e1){var t=dojo.trim((" "+_e2+" ").replace(" "+_e1+" "," "));dojo.attr(_e0,"role",t);}else{_e0.removeAttribute("role");}},hasWaiState:function(_e3,_e4){return _e3.hasAttribute?_e3.hasAttribute("aria-"+_e4):!!_e3.getAttribute("aria-"+_e4);},getWaiState:function(_e5,_e6){return _e5.getAttribute("aria-"+_e6)||"";},setWaiState:function(_e7,_e8,_e9){_e7.setAttribute("aria-"+_e8,_e9);},removeWaiState:function(_ea,_eb){_ea.removeAttribute("aria-"+_eb);}});}if(!dojo._hasResource["dijit._base"]){dojo._hasResource["dijit._base"]=true;dojo.provide("dijit._base");}if(!dojo._hasResource["dijit._Widget"]){dojo._hasResource["dijit._Widget"]=true;dojo.provide("dijit._Widget");dojo.require("dijit._base");dojo.connect(dojo,"_connect",function(_ec,_ed){if(_ec&&dojo.isFunction(_ec._onConnect)){_ec._onConnect(_ed);}});dijit._connectOnUseEventHandler=function(_ee){};dijit._lastKeyDownNode=null;if(dojo.isIE){(function(){var _ef=function(evt){dijit._lastKeyDownNode=evt.srcElement;};dojo.doc.attachEvent("onkeydown",_ef);dojo.addOnWindowUnload(function(){dojo.doc.detachEvent("onkeydown",_ef);});})();}else{dojo.doc.addEventListener("keydown",function(evt){dijit._lastKeyDownNode=evt.target;},true);}(function(){var _f0={},_f1=function(_f2){var dc=_f2.declaredClass;if(!_f0[dc]){var r=[],_f3,_f4=_f2.constructor.prototype;for(var _f5 in _f4){if(dojo.isFunction(_f4[_f5])&&(_f3=_f5.match(/^_set([a-zA-Z]*)Attr$/))&&_f3[1]){r.push(_f3[1].charAt(0).toLowerCase()+_f3[1].substr(1));}}_f0[dc]=r;}return _f0[dc]||[];};dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",tooltip:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:dijit._connectOnUseEventHandler,onDblClick:dijit._connectOnUseEventHandler,onKeyDown:dijit._connectOnUseEventHandler,onKeyPress:dijit._connectOnUseEventHandler,onKeyUp:dijit._connectOnUseEventHandler,onMouseDown:dijit._connectOnUseEventHandler,onMouseMove:dijit._connectOnUseEventHandler,onMouseOut:dijit._connectOnUseEventHandler,onMouseOver:dijit._connectOnUseEventHandler,onMouseLeave:dijit._connectOnUseEventHandler,onMouseEnter:dijit._connectOnUseEventHandler,onMouseUp:dijit._connectOnUseEventHandler,_blankGif:(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif")).toString(),postscript:function(_f6,_f7){this.create(_f6,_f7);},create:function(_f8,_f9){this.srcNodeRef=dojo.byId(_f9);this._connects=[];this._subscribes=[];this._deferredConnects=dojo.clone(this._deferredConnects);for(var _fa in this.attributeMap){delete this._deferredConnects[_fa];}for(_fa in this._deferredConnects){if(this[_fa]!==dijit._connectOnUseEventHandler){delete this._deferredConnects[_fa];}}if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_f8){this.params=_f8;dojo.mixin(this,_f8);}this.postMixInProperties();if(!this.id){this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));}dijit.registry.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();var _fb=this.srcNodeRef;if(_fb&&_fb.parentNode){_fb.parentNode.replaceChild(this.domNode,_fb);}for(_fa in this.params){this._onConnect(_fa);}}if(this.domNode){this.domNode.setAttribute("widgetId",this.id);}this.postCreate();if(this.srcNodeRef&&!this.srcNodeRef.parentNode){delete this.srcNodeRef;}this._created=true;},_applyAttributes:function(){var _fc=function(_fd,_fe){if((_fe.params&&_fd in _fe.params)||_fe[_fd]){_fe.attr(_fd,_fe[_fd]);}};for(var _ff in this.attributeMap){_fc(_ff,this);}dojo.forEach(_f1(this),function(a){if(!(a in this.attributeMap)){_fc(a,this);}},this);},postMixInProperties:function(){},buildRendering:function(){this.domNode=this.srcNodeRef||dojo.create("div");},postCreate:function(){},startup:function(){this._started=true;},destroyRecursive:function(_100){this._beingDestroyed=true;this.destroyDescendants(_100);this.destroy(_100);},destroy:function(_101){this._beingDestroyed=true;this.uninitialize();var d=dojo,dfe=d.forEach,dun=d.unsubscribe;dfe(this._connects,function(_102){dfe(_102,d.disconnect);});dfe(this._subscribes,function(_103){dun(_103);});dfe(this._supportingWidgets||[],function(w){if(w.destroyRecursive){w.destroyRecursive();}else{if(w.destroy){w.destroy();}}});this.destroyRendering(_101);dijit.registry.remove(this.id);this._destroyed=true;},destroyRendering:function(_104){if(this.bgIframe){this.bgIframe.destroy(_104);delete this.bgIframe;}if(this.domNode){if(_104){dojo.removeAttr(this.domNode,"widgetId");}else{dojo.destroy(this.domNode);}delete this.domNode;}if(this.srcNodeRef){if(!_104){dojo.destroy(this.srcNodeRef);}delete this.srcNodeRef;}},destroyDescendants:function(_105){dojo.forEach(this.getChildren(),function(_106){if(_106.destroyRecursive){_106.destroyRecursive(_105);}});},uninitialize:function(){return false;},onFocus:function(){},onBlur:function(){},_onFocus:function(e){this.onFocus();},_onBlur:function(){this.onBlur();},_onConnect:function(_107){if(_107 in this._deferredConnects){var _108=this[this._deferredConnects[_107]||"domNode"];this.connect(_108,_107.toLowerCase(),_107);delete this._deferredConnects[_107];}},_setClassAttr:function(_109){var _10a=this[this.attributeMap["class"]||"domNode"];dojo.removeClass(_10a,this["class"]);this["class"]=_109;dojo.addClass(_10a,_109);},_setStyleAttr:function(_10b){var _10c=this[this.attributeMap.style||"domNode"];if(dojo.isObject(_10b)){dojo.style(_10c,_10b);}else{if(_10c.style.cssText){_10c.style.cssText+="; "+_10b;}else{_10c.style.cssText=_10b;}}this.style=_10b;},setAttribute:function(attr,_10d){dojo.deprecated(this.declaredClass+"::setAttribute() is deprecated. Use attr() instead.","","2.0");this.attr(attr,_10d);},_attrToDom:function(attr,_10e){var _10f=this.attributeMap[attr];dojo.forEach(dojo.isArray(_10f)?_10f:[_10f],function(_110){var _111=this[_110.node||_110||"domNode"];var type=_110.type||"attribute";switch(type){case "attribute":if(dojo.isFunction(_10e)){_10e=dojo.hitch(this,_10e);}var _112=_110.attribute?_110.attribute:(/^on[A-Z][a-zA-Z]*$/.test(attr)?attr.toLowerCase():attr);dojo.attr(_111,_112,_10e);break;case "innerText":_111.innerHTML="";_111.appendChild(dojo.doc.createTextNode(_10e));break;case "innerHTML":_111.innerHTML=_10e;break;case "class":dojo.removeClass(_111,this[attr]);dojo.addClass(_111,_10e);break;}},this);this[attr]=_10e;},attr:function(name,_113){var args=arguments.length;if(args==1&&!dojo.isString(name)){for(var x in name){this.attr(x,name[x]);}return this;}var _114=this._getAttrNames(name);if(args>=2){if(this[_114.s]){args=dojo._toArray(arguments,1);return this[_114.s].apply(this,args)||this;}else{if(name in this.attributeMap){this._attrToDom(name,_113);}this[name]=_113;}return this;}else{return this[_114.g]?this[_114.g]():this[name];}},_attrPairNames:{},_getAttrNames:function(name){var apn=this._attrPairNames;if(apn[name]){return apn[name];}var uc=name.charAt(0).toUpperCase()+name.substr(1);return (apn[name]={n:name+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"});},toString:function(){return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";},getDescendants:function(){return this.containerNode?dojo.query("[widgetId]",this.containerNode).map(dijit.byNode):[];},getChildren:function(){return this.containerNode?dijit.findWidgets(this.containerNode):[];},nodesWithKeyClick:["input","button"],connect:function(obj,_115,_116){var d=dojo,dc=d._connect,_117=[];if(_115=="ondijitclick"){if(!this.nodesWithKeyClick[obj.tagName.toLowerCase()]){var m=d.hitch(this,_116);_117.push(dc(obj,"onkeydown",this,function(e){if((e.keyCode==d.keys.ENTER||e.keyCode==d.keys.SPACE)&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){dijit._lastKeyDownNode=e.target;d.stopEvent(e);}}),dc(obj,"onkeyup",this,function(e){if((e.keyCode==d.keys.ENTER||e.keyCode==d.keys.SPACE)&&e.target===dijit._lastKeyDownNode&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){dijit._lastKeyDownNode=null;return m(e);}}));}_115="onclick";}_117.push(dc(obj,_115,this,_116));this._connects.push(_117);return _117;},disconnect:function(_118){for(var i=0;i<this._connects.length;i++){if(this._connects[i]==_118){dojo.forEach(_118,dojo.disconnect);this._connects.splice(i,1);return;}}},subscribe:function(_119,_11a){var d=dojo,_11b=d.subscribe(_119,this,_11a);this._subscribes.push(_11b);return _11b;},unsubscribe:function(_11c){for(var i=0;i<this._subscribes.length;i++){if(this._subscribes[i]==_11c){dojo.unsubscribe(_11c);this._subscribes.splice(i,1);return;}}},isLeftToRight:function(){return dojo._isBodyLtr();},isFocusable:function(){return this.focus&&(dojo.style(this.domNode,"display")!="none");},placeAt:function(_11d,_11e){if(_11d.declaredClass&&_11d.addChild){_11d.addChild(this,_11e);}else{dojo.place(this.domNode,_11d,_11e);}return this;},_onShow:function(){this.onShow();},onShow:function(){},onHide:function(){}});})();}if(!dojo._hasResource["dojox.gfx.matrix"]){dojo._hasResource["dojox.gfx.matrix"]=true;dojo.provide("dojox.gfx.matrix");(function(){var m=dojox.gfx.matrix;var _11f={};m._degToRad=function(_120){return _11f[_120]||(_11f[_120]=(Math.PI*_120/180));};m._radToDeg=function(_121){return _121/Math.PI*180;};m.Matrix2D=function(arg){if(arg){if(typeof arg=="number"){this.xx=this.yy=arg;}else{if(arg instanceof Array){if(arg.length>0){var _122=m.normalize(arg[0]);for(var i=1;i<arg.length;++i){var l=_122,r=dojox.gfx.matrix.normalize(arg[i]);_122=new m.Matrix2D();_122.xx=l.xx*r.xx+l.xy*r.yx;_122.xy=l.xx*r.xy+l.xy*r.yy;_122.yx=l.yx*r.xx+l.yy*r.yx;_122.yy=l.yx*r.xy+l.yy*r.yy;_122.dx=l.xx*r.dx+l.xy*r.dy+l.dx;_122.dy=l.yx*r.dx+l.yy*r.dy+l.dy;}dojo.mixin(this,_122);}}else{dojo.mixin(this,arg);}}}};dojo.extend(m.Matrix2D,{xx:1,xy:0,yx:0,yy:1,dx:0,dy:0});dojo.mixin(m,{identity:new m.Matrix2D(),flipX:new m.Matrix2D({xx:-1}),flipY:new m.Matrix2D({yy:-1}),flipXY:new m.Matrix2D({xx:-1,yy:-1}),translate:function(a,b){if(arguments.length>1){return new m.Matrix2D({dx:a,dy:b});}return new m.Matrix2D({dx:a.x,dy:a.y});},scale:function(a,b){if(arguments.length>1){return new m.Matrix2D({xx:a,yy:b});}if(typeof a=="number"){return new m.Matrix2D({xx:a,yy:a});}return new m.Matrix2D({xx:a.x,yy:a.y});},rotate:function(_123){var c=Math.cos(_123);var s=Math.sin(_123);return new m.Matrix2D({xx:c,xy:-s,yx:s,yy:c});},rotateg:function(_124){return m.rotate(m._degToRad(_124));},skewX:function(_125){return new m.Matrix2D({xy:Math.tan(_125)});},skewXg:function(_126){return m.skewX(m._degToRad(_126));},skewY:function(_127){return new m.Matrix2D({yx:Math.tan(_127)});},skewYg:function(_128){return m.skewY(m._degToRad(_128));},reflect:function(a,b){if(arguments.length==1){b=a.y;a=a.x;}var a2=a*a,b2=b*b,n2=a2+b2,xy=2*a*b/n2;return new m.Matrix2D({xx:2*a2/n2-1,xy:xy,yx:xy,yy:2*b2/n2-1});},project:function(a,b){if(arguments.length==1){b=a.y;a=a.x;}var a2=a*a,b2=b*b,n2=a2+b2,xy=a*b/n2;return new m.Matrix2D({xx:a2/n2,xy:xy,yx:xy,yy:b2/n2});},normalize:function(_129){return (_129 instanceof m.Matrix2D)?_129:new m.Matrix2D(_129);},clone:function(_12a){var obj=new m.Matrix2D();for(var i in _12a){if(typeof (_12a[i])=="number"&&typeof (obj[i])=="number"&&obj[i]!=_12a[i]){obj[i]=_12a[i];}}return obj;},invert:function(_12b){var M=m.normalize(_12b),D=M.xx*M.yy-M.xy*M.yx,M=new m.Matrix2D({xx:M.yy/D,xy:-M.xy/D,yx:-M.yx/D,yy:M.xx/D,dx:(M.xy*M.dy-M.yy*M.dx)/D,dy:(M.yx*M.dx-M.xx*M.dy)/D});return M;},_multiplyPoint:function(_12c,x,y){return {x:_12c.xx*x+_12c.xy*y+_12c.dx,y:_12c.yx*x+_12c.yy*y+_12c.dy};},multiplyPoint:function(_12d,a,b){var M=m.normalize(_12d);if(typeof a=="number"&&typeof b=="number"){return m._multiplyPoint(M,a,b);}return m._multiplyPoint(M,a.x,a.y);},multiply:function(_12e){var M=m.normalize(_12e);for(var i=1;i<arguments.length;++i){var l=M,r=m.normalize(arguments[i]);M=new m.Matrix2D();M.xx=l.xx*r.xx+l.xy*r.yx;M.xy=l.xx*r.xy+l.xy*r.yy;M.yx=l.yx*r.xx+l.yy*r.yx;M.yy=l.yx*r.xy+l.yy*r.yy;M.dx=l.xx*r.dx+l.xy*r.dy+l.dx;M.dy=l.yx*r.dx+l.yy*r.dy+l.dy;}return M;},_sandwich:function(_12f,x,y){return m.multiply(m.translate(x,y),_12f,m.translate(-x,-y));},scaleAt:function(a,b,c,d){switch(arguments.length){case 4:return m._sandwich(m.scale(a,b),c,d);case 3:if(typeof c=="number"){return m._sandwich(m.scale(a),b,c);}return m._sandwich(m.scale(a,b),c.x,c.y);}return m._sandwich(m.scale(a),b.x,b.y);},rotateAt:function(_130,a,b){if(arguments.length>2){return m._sandwich(m.rotate(_130),a,b);}return m._sandwich(m.rotate(_130),a.x,a.y);},rotategAt:function(_131,a,b){if(arguments.length>2){return m._sandwich(m.rotateg(_131),a,b);}return m._sandwich(m.rotateg(_131),a.x,a.y);},skewXAt:function(_132,a,b){if(arguments.length>2){return m._sandwich(m.skewX(_132),a,b);}return m._sandwich(m.skewX(_132),a.x,a.y);},skewXgAt:function(_133,a,b){if(arguments.length>2){return m._sandwich(m.skewXg(_133),a,b);}return m._sandwich(m.skewXg(_133),a.x,a.y);},skewYAt:function(_134,a,b){if(arguments.length>2){return m._sandwich(m.skewY(_134),a,b);}return m._sandwich(m.skewY(_134),a.x,a.y);},skewYgAt:function(_135,a,b){if(arguments.length>2){return m._sandwich(m.skewYg(_135),a,b);}return m._sandwich(m.skewYg(_135),a.x,a.y);}});})();dojox.gfx.Matrix2D=dojox.gfx.matrix.Matrix2D;}if(!dojo._hasResource["dojox.gfx._base"]){dojo._hasResource["dojox.gfx._base"]=true;dojo.provide("dojox.gfx._base");(function(){var g=dojox.gfx,b=g._base;g._hasClass=function(node,_136){var cls=node.getAttribute("className");return cls&&(" "+cls+" ").indexOf(" "+_136+" ")>=0;};g._addClass=function(node,_137){var cls=node.getAttribute("className")||"";if(!cls||(" "+cls+" ").indexOf(" "+_137+" ")<0){node.setAttribute("className",cls+(cls?" ":"")+_137);}};g._removeClass=function(node,_138){var cls=node.getAttribute("className");if(cls){node.setAttribute("className",cls.replace(new RegExp("(^|\\s+)"+_138+"(\\s+|$)"),"$1$2"));}};b._getFontMeasurements=function(){var _139={"1em":0,"1ex":0,"100%":0,"12pt":0,"16px":0,"xx-small":0,"x-small":0,"small":0,"medium":0,"large":0,"x-large":0,"xx-large":0};if(dojo.isIE){dojo.doc.documentElement.style.fontSize="100%";}var div=dojo.doc.createElement("div");var s=div.style;s.position="absolute";s.left="-100px";s.top="0px";s.width="30px";s.height="1000em";s.border="0px";s.margin="0px";s.padding="0px";s.outline="none";s.lineHeight="1";s.overflow="hidden";dojo.body().appendChild(div);for(var p in _139){div.style.fontSize=p;_139[p]=Math.round(div.offsetHeight*12/16)*16/12/1000;}dojo.body().removeChild(div);div=null;return _139;};var _13a=null;b._getCachedFontMeasurements=function(_13b){if(_13b||!_13a){_13a=b._getFontMeasurements();}return _13a;};var _13c=null,_13d={};b._getTextBox=function(text,_13e,_13f){var m,s,al=arguments.length;if(!_13c){m=_13c=dojo.doc.createElement("div");s=m.style;s.position="absolute";s.left="-10000px";s.top="0";dojo.body().appendChild(m);}else{m=_13c;s=m.style;}m.className="";s.border="0";s.margin="0";s.padding="0";s.outline="0";if(al>1&&_13e){for(var i in _13e){if(i in _13d){continue;}s[i]=_13e[i];}}if(al>2&&_13f){m.className=_13f;}m.innerHTML=text;if(m["getBoundingClientRect"]){var bcr=m.getBoundingClientRect();return {l:bcr.left,t:bcr.top,w:bcr.width||(bcr.right-bcr.left),h:bcr.height||(bcr.bottom-bcr.top)};}else{return dojo.marginBox(m);}};var _140=0;b._getUniqueId=function(){var id;do{id=dojo._scopeName+"Unique"+(++_140);}while(dojo.byId(id));return id;};})();dojo.mixin(dojox.gfx,{defaultPath:{type:"path",path:""},defaultPolyline:{type:"polyline",points:[]},defaultRect:{type:"rect",x:0,y:0,width:100,height:100,r:0},defaultEllipse:{type:"ellipse",cx:0,cy:0,rx:200,ry:100},defaultCircle:{type:"circle",cx:0,cy:0,r:100},defaultLine:{type:"line",x1:0,y1:0,x2:100,y2:100},defaultImage:{type:"image",x:0,y:0,width:0,height:0,src:""},defaultText:{type:"text",x:0,y:0,text:"",align:"start",decoration:"none",rotated:false,kerning:true},defaultTextPath:{type:"textpath",text:"",align:"start",decoration:"none",rotated:false,kerning:true},defaultStroke:{type:"stroke",color:"black",style:"solid",width:1,cap:"butt",join:4},defaultLinearGradient:{type:"linear",x1:0,y1:0,x2:100,y2:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultRadialGradient:{type:"radial",cx:0,cy:0,r:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultPattern:{type:"pattern",x:0,y:0,width:0,height:0,src:""},defaultFont:{type:"font",style:"normal",variant:"normal",weight:"normal",size:"10pt",family:"serif"},getDefault:(function(){var _141={};return function(type){var t=_141[type];if(t){return new t();}t=_141[type]=new Function;t.prototype=dojox.gfx["default"+type];return new t();};})(),normalizeColor:function(_142){return (_142 instanceof dojo.Color)?_142:new dojo.Color(_142);},normalizeParameters:function(_143,_144){if(_144){var _145={};for(var x in _143){if(x in _144&&!(x in _145)){_143[x]=_144[x];}}}return _143;},makeParameters:function(_146,_147){if(!_147){return dojo.delegate(_146);}var _148={};for(var i in _146){if(!(i in _148)){_148[i]=dojo.clone((i in _147)?_147[i]:_146[i]);}}return _148;},formatNumber:function(x,_149){var val=x.toString();if(val.indexOf("e")>=0){val=x.toFixed(4);}else{var _14a=val.indexOf(".");if(_14a>=0&&val.length-_14a>5){val=x.toFixed(4);}}if(x<0){return val;}return _149?" "+val:val;},makeFontString:function(font){return font.style+" "+font.variant+" "+font.weight+" "+font.size+" "+font.family;},splitFontString:function(str){var font=dojox.gfx.getDefault("Font");var t=str.split(/\s+/);do{if(t.length<5){break;}font.style=t[0];font.variant=t[1];font.weight=t[2];var i=t[3].indexOf("/");font.size=i<0?t[3]:t[3].substring(0,i);var j=4;if(i<0){if(t[4]=="/"){j=6;}else{if(t[4].charAt(0)=="/"){j=5;}}}if(j<t.length){font.family=t.slice(j).join(" ");}}while(false);return font;},cm_in_pt:72/2.54,mm_in_pt:7.2/2.54,px_in_pt:function(){return dojox.gfx._base._getCachedFontMeasurements()["12pt"]/12;},pt2px:function(len){return len*dojox.gfx.px_in_pt();},px2pt:function(len){return len/dojox.gfx.px_in_pt();},normalizedLength:function(len){if(len.length==0){return 0;}if(len.length>2){var _14b=dojox.gfx.px_in_pt();var val=parseFloat(len);switch(len.slice(-2)){case "px":return val;case "pt":return val*_14b;case "in":return val*72*_14b;case "pc":return val*12*_14b;case "mm":return val*dojox.gfx.mm_in_pt*_14b;case "cm":return val*dojox.gfx.cm_in_pt*_14b;}}return parseFloat(len);},pathVmlRegExp:/([A-Za-z]+)|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,pathSvgRegExp:/([A-Za-z])|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,equalSources:function(a,b){return a&&b&&a==b;}});}if(!dojo._hasResource["dojox.gfx"]){dojo._hasResource["dojox.gfx"]=true;dojo.provide("dojox.gfx");dojo.loadInit(function(){var gfx=dojo.getObject("dojox.gfx",true),sl,flag,_14c;if(!gfx.renderer){if(dojo.config.forceGfxRenderer){dojox.gfx.renderer=dojo.config.forceGfxRenderer;return;}var _14d=(typeof dojo.config.gfxRenderer=="string"?dojo.config.gfxRenderer:"svg,vml,silverlight,canvas").split(",");var ua=navigator.userAgent,_14e=0,_14f=0;if(dojo.isSafari>=3){if(ua.indexOf("iPhone")>=0||ua.indexOf("iPod")>=0){_14c=ua.match(/Version\/(\d(\.\d)?(\.\d)?)\sMobile\/([^\s]*)\s?/);if(_14c){_14e=parseInt(_14c[4].substr(0,3),16);}}}if(dojo.isWebKit){if(!_14e){_14c=ua.match(/Android\s+(\d+\.\d+)/);if(_14c){_14f=parseFloat(_14c[1]);}}}for(var i=0;i<_14d.length;++i){switch(_14d[i]){case "svg":if(!dojo.isIE&&(!_14e||_14e>=1521)&&!_14f&&!dojo.isAIR){dojox.gfx.renderer="svg";}break;case "vml":if(dojo.isIE){dojox.gfx.renderer="vml";}break;case "silverlight":try{if(dojo.isIE){sl=new ActiveXObject("AgControl.AgControl");if(sl&&sl.IsVersionSupported("1.0")){flag=true;}}else{if(navigator.plugins["Silverlight Plug-In"]){flag=true;}}}catch(e){flag=false;}finally{sl=null;}if(flag){dojox.gfx.renderer="silverlight";}break;case "canvas":if(!dojo.isIE){dojox.gfx.renderer="canvas";}break;}if(dojox.gfx.renderer){break;}}if(dojo.config.isDebug){}}});dojo.requireIf(dojox.gfx.renderer=="svg","dojox.gfx.svg");dojo.requireIf(dojox.gfx.renderer=="vml","dojox.gfx.vml");dojo.requireIf(dojox.gfx.renderer=="silverlight","dojox.gfx.silverlight");dojo.requireIf(dojox.gfx.renderer=="canvas","dojox.gfx.canvas");}if(!dojo._hasResource["dojox.lang.functional.lambda"]){dojo._hasResource["dojox.lang.functional.lambda"]=true;dojo.provide("dojox.lang.functional.lambda");(function(){var df=dojox.lang.functional,_150={};var _151="ab".split(/a*/).length>1?String.prototype.split:function(sep){var r=this.split.call(this,sep),m=sep.exec(this);if(m&&m.index==0){r.unshift("");}return r;};var _152=function(s){var args=[],_153=_151.call(s,/\s*->\s*/m);if(_153.length>1){while(_153.length){s=_153.pop();args=_153.pop().split(/\s*,\s*|\s+/m);if(_153.length){_153.push("(function("+args+"){return ("+s+")})");}}}else{if(s.match(/\b_\b/)){args=["_"];}else{var l=s.match(/^\s*(?:[+*\/%&|\^\.=<>]|!=)/m),r=s.match(/[+\-*\/%&|\^\.=<>!]\s*$/m);if(l||r){if(l){args.push("$1");s="$1"+s;}if(r){args.push("$2");s=s+"$2";}}else{var vars=s.replace(/(?:\b[A-Z]|\.[a-zA-Z_$])[a-zA-Z_$\d]*|[a-zA-Z_$][a-zA-Z_$\d]*:|this|true|false|null|undefined|typeof|instanceof|in|delete|new|void|arguments|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|isFinite|isNaN|parseFloat|parseInt|unescape|dojo|dijit|dojox|window|document|'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"/g,"").match(/([a-z_$][a-z_$\d]*)/gi)||[],t={};dojo.forEach(vars,function(v){if(!(v in t)){args.push(v);t[v]=1;}});}}}return {args:args,body:s};};var _154=function(a){return a.length?function(){var i=a.length-1,x=df.lambda(a[i]).apply(this,arguments);for(--i;i>=0;--i){x=df.lambda(a[i]).call(this,x);}return x;}:function(x){return x;};};dojo.mixin(df,{rawLambda:function(s){return _152(s);},buildLambda:function(s){s=_152(s);return "function("+s.args.join(",")+"){return ("+s.body+");}";},lambda:function(s){if(typeof s=="function"){return s;}if(s instanceof Array){return _154(s);}if(s in _150){return _150[s];}s=_152(s);return _150[s]=new Function(s.args,"return ("+s.body+");");},clearLambdaCache:function(){_150={};}});})();}if(!dojo._hasResource["dojox.lang.functional.array"]){dojo._hasResource["dojox.lang.functional.array"]=true;dojo.provide("dojox.lang.functional.array");(function(){var d=dojo,df=dojox.lang.functional,_155={};d.mixin(df,{filter:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var t=[],v,i,n;if(d.isArray(a)){for(i=0,n=a.length;i<n;++i){v=a[i];if(f.call(o,v,i,a)){t.push(v);}}}else{if(typeof a.hasNext=="function"&&typeof a.next=="function"){for(i=0;a.hasNext();){v=a.next();if(f.call(o,v,i++,a)){t.push(v);}}}else{for(i in a){if(!(i in _155)){v=a[i];if(f.call(o,v,i,a)){t.push(v);}}}}}return t;},forEach:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var i,n;if(d.isArray(a)){for(i=0,n=a.length;i<n;f.call(o,a[i],i,a),++i){}}else{if(typeof a.hasNext=="function"&&typeof a.next=="function"){for(i=0;a.hasNext();f.call(o,a.next(),i++,a)){}}else{for(i in a){if(!(i in _155)){f.call(o,a[i],i,a);}}}}return o;},map:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var t,n,i;if(d.isArray(a)){t=new Array(n=a.length);for(i=0;i<n;t[i]=f.call(o,a[i],i,a),++i){}}else{if(typeof a.hasNext=="function"&&typeof a.next=="function"){t=[];for(i=0;a.hasNext();t.push(f.call(o,a.next(),i++,a))){}}else{t=[];for(i in a){if(!(i in _155)){t.push(f.call(o,a[i],i,a));}}}}return t;},every:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var i,n;if(d.isArray(a)){for(i=0,n=a.length;i<n;++i){if(!f.call(o,a[i],i,a)){return false;}}}else{if(typeof a.hasNext=="function"&&typeof a.next=="function"){for(i=0;a.hasNext();){if(!f.call(o,a.next(),i++,a)){return false;}}}else{for(i in a){if(!(i in _155)){if(!f.call(o,a[i],i,a)){return false;}}}}}return true;},some:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var i,n;if(d.isArray(a)){for(i=0,n=a.length;i<n;++i){if(f.call(o,a[i],i,a)){return true;}}}else{if(typeof a.hasNext=="function"&&typeof a.next=="function"){for(i=0;a.hasNext();){if(f.call(o,a.next(),i++,a)){return true;}}}else{for(i in a){if(!(i in _155)){if(f.call(o,a[i],i,a)){return true;}}}}}return false;}});})();}if(!dojo._hasResource["dojox.lang.functional.object"]){dojo._hasResource["dojox.lang.functional.object"]=true;dojo.provide("dojox.lang.functional.object");(function(){var d=dojo,df=dojox.lang.functional,_156={};d.mixin(df,{keys:function(obj){var t=[];for(var i in obj){if(!(i in _156)){t.push(i);}}return t;},values:function(obj){var t=[];for(var i in obj){if(!(i in _156)){t.push(obj[i]);}}return t;},filterIn:function(obj,f,o){o=o||d.global;f=df.lambda(f);var t={},v,i;for(i in obj){if(!(i in _156)){v=obj[i];if(f.call(o,v,i,obj)){t[i]=v;}}}return t;},forIn:function(obj,f,o){o=o||d.global;f=df.lambda(f);for(var i in obj){if(!(i in _156)){f.call(o,obj[i],i,obj);}}return o;},mapIn:function(obj,f,o){o=o||d.global;f=df.lambda(f);var t={},i;for(i in obj){if(!(i in _156)){t[i]=f.call(o,obj[i],i,obj);}}return t;}});})();}if(!dojo._hasResource["dojox.lang.functional"]){dojo._hasResource["dojox.lang.functional"]=true;dojo.provide("dojox.lang.functional");}if(!dojo._hasResource["dojox.lang.functional.fold"]){dojo._hasResource["dojox.lang.functional.fold"]=true;dojo.provide("dojox.lang.functional.fold");(function(){var d=dojo,df=dojox.lang.functional,_157={};d.mixin(df,{foldl:function(a,f,z,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var i,n;if(d.isArray(a)){for(i=0,n=a.length;i<n;z=f.call(o,z,a[i],i,a),++i){}}else{if(typeof a.hasNext=="function"&&typeof a.next=="function"){for(i=0;a.hasNext();z=f.call(o,z,a.next(),i++,a)){}}else{for(i in a){if(!(i in _157)){z=f.call(o,z,a[i],i,a);}}}}return z;},foldl1:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var z,i,n;if(d.isArray(a)){z=a[0];for(i=1,n=a.length;i<n;z=f.call(o,z,a[i],i,a),++i){}}else{if(typeof a.hasNext=="function"&&typeof a.next=="function"){if(a.hasNext()){z=a.next();for(i=1;a.hasNext();z=f.call(o,z,a.next(),i++,a)){}}}else{var _158=true;for(i in a){if(!(i in _157)){if(_158){z=a[i];_158=false;}else{z=f.call(o,z,a[i],i,a);}}}}}return z;},foldr:function(a,f,z,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);for(var i=a.length;i>0;--i,z=f.call(o,z,a[i],i,a)){}return z;},foldr1:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var n=a.length,z=a[n-1],i=n-1;for(;i>0;--i,z=f.call(o,z,a[i],i,a)){}return z;},reduce:function(a,f,z){return arguments.length<3?df.foldl1(a,f):df.foldl(a,f,z);},reduceRight:function(a,f,z){return arguments.length<3?df.foldr1(a,f):df.foldr(a,f,z);},unfold:function(pr,f,g,z,o){o=o||d.global;f=df.lambda(f);g=df.lambda(g);pr=df.lambda(pr);var t=[];for(;!pr.call(o,z);t.push(f.call(o,z)),z=g.call(o,z)){}return t;}});})();}if(!dojo._hasResource["dojox.lang.functional.reversed"]){dojo._hasResource["dojox.lang.functional.reversed"]=true;dojo.provide("dojox.lang.functional.reversed");(function(){var d=dojo,df=dojox.lang.functional;d.mixin(df,{filterRev:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var t=[],v,i=a.length-1;for(;i>=0;--i){v=a[i];if(f.call(o,v,i,a)){t.push(v);}}return t;},forEachRev:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);for(var i=a.length-1;i>=0;f.call(o,a[i],i,a),--i){}},mapRev:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var n=a.length,t=new Array(n),i=n-1,j=0;for(;i>=0;t[j++]=f.call(o,a[i],i,a),--i){}return t;},everyRev:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);for(var i=a.length-1;i>=0;--i){if(!f.call(o,a[i],i,a)){return false;}}return true;},someRev:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);for(var i=a.length-1;i>=0;--i){if(f.call(o,a[i],i,a)){return true;}}return false;}});})();}if(!dojo._hasResource["dojo.colors"]){dojo._hasResource["dojo.colors"]=true;dojo.provide("dojo.colors");(function(){var _159=function(m1,m2,h){if(h<0){++h;}if(h>1){--h;}var h6=6*h;if(h6<1){return m1+(m2-m1)*h6;}if(2*h<1){return m2;}if(3*h<2){return m1+(m2-m1)*(2/3-h)*6;}return m1;};dojo.colorFromRgb=function(_15a,obj){var m=_15a.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(m){var c=m[2].split(/\s*,\s*/),l=c.length,t=m[1],a;if((t=="rgb"&&l==3)||(t=="rgba"&&l==4)){var r=c[0];if(r.charAt(r.length-1)=="%"){a=dojo.map(c,function(x){return parseFloat(x)*2.56;});if(l==4){a[3]=c[3];}return dojo.colorFromArray(a,obj);}return dojo.colorFromArray(c,obj);}if((t=="hsl"&&l==3)||(t=="hsla"&&l==4)){var H=((parseFloat(c[0])%360)+360)%360/360,S=parseFloat(c[1])/100,L=parseFloat(c[2])/100,m2=L<=0.5?L*(S+1):L+S-L*S,m1=2*L-m2;a=[_159(m1,m2,H+1/3)*256,_159(m1,m2,H)*256,_159(m1,m2,H-1/3)*256,1];if(l==4){a[3]=c[3];}return dojo.colorFromArray(a,obj);}}return null;};var _15b=function(c,low,high){c=Number(c);return isNaN(c)?high:c<low?low:c>high?high:c;};dojo.Color.prototype.sanitize=function(){var t=this;t.r=Math.round(_15b(t.r,0,255));t.g=Math.round(_15b(t.g,0,255));t.b=Math.round(_15b(t.b,0,255));t.a=_15b(t.a,0,1);return this;};})();dojo.colors.makeGrey=function(g,a){return dojo.colorFromArray([g,g,g,a]);};dojo.mixin(dojo.Color.named,{aliceblue:[240,248,255],antiquewhite:[250,235,215],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],blanchedalmond:[255,235,205],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],oldlace:[253,245,230],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],thistle:[216,191,216],tomato:[255,99,71],transparent:[0,0,0,0],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],whitesmoke:[245,245,245],yellowgreen:[154,205,50]});}if(!dojo._hasResource["dojox.color._base"]){dojo._hasResource["dojox.color._base"]=true;dojo.provide("dojox.color._base");dojox.color.Color=dojo.Color;dojox.color.blend=dojo.blendColors;dojox.color.fromRgb=dojo.colorFromRgb;dojox.color.fromHex=dojo.colorFromHex;dojox.color.fromArray=dojo.colorFromArray;dojox.color.fromString=dojo.colorFromString;dojox.color.greyscale=dojo.colors.makeGrey;dojo.mixin(dojox.color,{fromCmy:function(cyan,_15c,_15d){if(dojo.isArray(cyan)){_15c=cyan[1],_15d=cyan[2],cyan=cyan[0];}else{if(dojo.isObject(cyan)){_15c=cyan.m,_15d=cyan.y,cyan=cyan.c;}}cyan/=100,_15c/=100,_15d/=100;var r=1-cyan,g=1-_15c,b=1-_15d;return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});},fromCmyk:function(cyan,_15e,_15f,_160){if(dojo.isArray(cyan)){_15e=cyan[1],_15f=cyan[2],_160=cyan[3],cyan=cyan[0];}else{if(dojo.isObject(cyan)){_15e=cyan.m,_15f=cyan.y,_160=cyan.b,cyan=cyan.c;}}cyan/=100,_15e/=100,_15f/=100,_160/=100;var r,g,b;r=1-Math.min(1,cyan*(1-_160)+_160);g=1-Math.min(1,_15e*(1-_160)+_160);b=1-Math.min(1,_15f*(1-_160)+_160);return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});},fromHsl:function(hue,_161,_162){if(dojo.isArray(hue)){_161=hue[1],_162=hue[2],hue=hue[0];}else{if(dojo.isObject(hue)){_161=hue.s,_162=hue.l,hue=hue.h;}}_161/=100;_162/=100;while(hue<0){hue+=360;}while(hue>=360){hue-=360;}var r,g,b;if(hue<120){r=(120-hue)/60,g=hue/60,b=0;}else{if(hue<240){r=0,g=(240-hue)/60,b=(hue-120)/60;}else{r=(hue-240)/60,g=0,b=(360-hue)/60;}}r=2*_161*Math.min(r,1)+(1-_161);g=2*_161*Math.min(g,1)+(1-_161);b=2*_161*Math.min(b,1)+(1-_161);if(_162<0.5){r*=_162,g*=_162,b*=_162;}else{r=(1-_162)*r+2*_162-1;g=(1-_162)*g+2*_162-1;b=(1-_162)*b+2*_162-1;}return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});},fromHsv:function(hue,_163,_164){if(dojo.isArray(hue)){_163=hue[1],_164=hue[2],hue=hue[0];}else{if(dojo.isObject(hue)){_163=hue.s,_164=hue.v,hue=hue.h;}}if(hue==360){hue=0;}_163/=100;_164/=100;var r,g,b;if(_163==0){r=_164,b=_164,g=_164;}else{var _165=hue/60,i=Math.floor(_165),f=_165-i;var p=_164*(1-_163);var q=_164*(1-(_163*f));var t=_164*(1-(_163*(1-f)));switch(i){case 0:r=_164,g=t,b=p;break;case 1:r=q,g=_164,b=p;break;case 2:r=p,g=_164,b=t;break;case 3:r=p,g=q,b=_164;break;case 4:r=t,g=p,b=_164;break;case 5:r=_164,g=p,b=q;break;}}return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});}});dojo.extend(dojox.color.Color,{toCmy:function(){var cyan=1-(this.r/255),_166=1-(this.g/255),_167=1-(this.b/255);return {c:Math.round(cyan*100),m:Math.round(_166*100),y:Math.round(_167*100)};},toCmyk:function(){var cyan,_168,_169,_16a;var r=this.r/255,g=this.g/255,b=this.b/255;_16a=Math.min(1-r,1-g,1-b);cyan=(1-r-_16a)/(1-_16a);_168=(1-g-_16a)/(1-_16a);_169=(1-b-_16a)/(1-_16a);return {c:Math.round(cyan*100),m:Math.round(_168*100),y:Math.round(_169*100),b:Math.round(_16a*100)};},toHsl:function(){var r=this.r/255,g=this.g/255,b=this.b/255;var min=Math.min(r,b,g),max=Math.max(r,g,b);var _16b=max-min;var h=0,s=0,l=(min+max)/2;if(l>0&&l<1){s=_16b/((l<0.5)?(2*l):(2-2*l));}if(_16b>0){if(max==r&&max!=g){h+=(g-b)/_16b;}if(max==g&&max!=b){h+=(2+(b-r)/_16b);}if(max==b&&max!=r){h+=(4+(r-g)/_16b);}h*=60;}return {h:h,s:Math.round(s*100),l:Math.round(l*100)};},toHsv:function(){var r=this.r/255,g=this.g/255,b=this.b/255;var min=Math.min(r,b,g),max=Math.max(r,g,b);var _16c=max-min;var h=null,s=(max==0)?0:(_16c/max);if(s==0){h=0;}else{if(r==max){h=60*(g-b)/_16c;}else{if(g==max){h=120+60*(b-r)/_16c;}else{h=240+60*(r-g)/_16c;}}if(h<0){h+=360;}}return {h:h,s:Math.round(s*100),v:Math.round(max*100)};}});}if(!dojo._hasResource["dojox.color"]){dojo._hasResource["dojox.color"]=true;dojo.provide("dojox.color");}if(!dojo._hasResource["dojox.color.Palette"]){dojo._hasResource["dojox.color.Palette"]=true;dojo.provide("dojox.color.Palette");(function(){var dxc=dojox.color;dxc.Palette=function(base){this.colors=[];if(base instanceof dojox.color.Palette){this.colors=base.colors.slice(0);}else{if(base instanceof dojox.color.Color){this.colors=[null,null,base,null,null];}else{if(dojo.isArray(base)){this.colors=dojo.map(base.slice(0),function(item){if(dojo.isString(item)){return new dojox.color.Color(item);}return item;});}else{if(dojo.isString(base)){this.colors=[null,null,new dojox.color.Color(base),null,null];}}}}};function _16d(p,_16e,val){var ret=new dojox.color.Palette();ret.colors=[];dojo.forEach(p.colors,function(item){var r=(_16e=="dr")?item.r+val:item.r,g=(_16e=="dg")?item.g+val:item.g,b=(_16e=="db")?item.b+val:item.b,a=(_16e=="da")?item.a+val:item.a;ret.colors.push(new dojox.color.Color({r:Math.min(255,Math.max(0,r)),g:Math.min(255,Math.max(0,g)),b:Math.min(255,Math.max(0,b)),a:Math.min(1,Math.max(0,a))}));});return ret;};function tCMY(p,_16f,val){var ret=new dojox.color.Palette();ret.colors=[];dojo.forEach(p.colors,function(item){var o=item.toCmy(),c=(_16f=="dc")?o.c+val:o.c,m=(_16f=="dm")?o.m+val:o.m,y=(_16f=="dy")?o.y+val:o.y;ret.colors.push(dojox.color.fromCmy(Math.min(100,Math.max(0,c)),Math.min(100,Math.max(0,m)),Math.min(100,Math.max(0,y))));});return ret;};function _170(p,_171,val){var ret=new dojox.color.Palette();ret.colors=[];dojo.forEach(p.colors,function(item){var o=item.toCmyk(),c=(_171=="dc")?o.c+val:o.c,m=(_171=="dm")?o.m+val:o.m,y=(_171=="dy")?o.y+val:o.y,k=(_171=="dk")?o.b+val:o.b;ret.colors.push(dojox.color.fromCmyk(Math.min(100,Math.max(0,c)),Math.min(100,Math.max(0,m)),Math.min(100,Math.max(0,y)),Math.min(100,Math.max(0,k))));});return ret;};function tHSL(p,_172,val){var ret=new dojox.color.Palette();ret.colors=[];dojo.forEach(p.colors,function(item){var o=item.toHsl(),h=(_172=="dh")?o.h+val:o.h,s=(_172=="ds")?o.s+val:o.s,l=(_172=="dl")?o.l+val:o.l;ret.colors.push(dojox.color.fromHsl(h%360,Math.min(100,Math.max(0,s)),Math.min(100,Math.max(0,l))));});return ret;};function tHSV(p,_173,val){var ret=new dojox.color.Palette();ret.colors=[];dojo.forEach(p.colors,function(item){var o=item.toHsv(),h=(_173=="dh")?o.h+val:o.h,s=(_173=="ds")?o.s+val:o.s,v=(_173=="dv")?o.v+val:o.v;ret.colors.push(dojox.color.fromHsv(h%360,Math.min(100,Math.max(0,s)),Math.min(100,Math.max(0,v))));});return ret;};function _174(val,low,high){return high-((high-val)*((high-low)/high));};dojo.extend(dxc.Palette,{transform:function(_175){var fn=_16d;if(_175.use){var use=_175.use.toLowerCase();if(use.indexOf("hs")==0){if(use.charAt(2)=="l"){fn=tHSL;}else{fn=tHSV;}}else{if(use.indexOf("cmy")==0){if(use.charAt(3)=="k"){fn=_170;}else{fn=tCMY;}}}}else{if("dc" in _175||"dm" in _175||"dy" in _175){if("dk" in _175){fn=_170;}else{fn=tCMY;}}else{if("dh" in _175||"ds" in _175){if("dv" in _175){fn=tHSV;}else{fn=tHSL;}}}}var _176=this;for(var p in _175){if(p=="use"){continue;}_176=fn(_176,p,_175[p]);}return _176;},clone:function(){return new dxc.Palette(this);}});dojo.mixin(dxc.Palette,{generators:{analogous:function(args){var high=args.high||60,low=args.low||18,base=dojo.isString(args.base)?new dojox.color.Color(args.base):args.base,hsv=base.toHsv();var h=[(hsv.h+low+360)%360,(hsv.h+Math.round(low/2)+360)%360,hsv.h,(hsv.h-Math.round(high/2)+360)%360,(hsv.h-high+360)%360];var s1=Math.max(10,(hsv.s<=95)?hsv.s+5:(100-(hsv.s-95))),s2=(hsv.s>1)?hsv.s-1:21-hsv.s,v1=(hsv.v>=92)?hsv.v-9:Math.max(hsv.v+9,20),v2=(hsv.v<=90)?Math.max(hsv.v+5,20):(95+Math.ceil((hsv.v-90)/2)),s=[s1,s2,hsv.s,s1,s1],v=[v1,v2,hsv.v,v1,v2];return new dxc.Palette(dojo.map(h,function(hue,i){return dojox.color.fromHsv(hue,s[i],v[i]);}));},monochromatic:function(args){var base=dojo.isString(args.base)?new dojox.color.Color(args.base):args.base,hsv=base.toHsv();var s1=(hsv.s-30>9)?hsv.s-30:hsv.s+30,s2=hsv.s,v1=_174(hsv.v,20,100),v2=(hsv.v-20>20)?hsv.v-20:hsv.v+60,v3=(hsv.v-50>20)?hsv.v-50:hsv.v+30;return new dxc.Palette([dojox.color.fromHsv(hsv.h,s1,v1),dojox.color.fromHsv(hsv.h,s2,v3),base,dojox.color.fromHsv(hsv.h,s1,v3),dojox.color.fromHsv(hsv.h,s2,v2)]);},triadic:function(args){var base=dojo.isString(args.base)?new dojox.color.Color(args.base):args.base,hsv=base.toHsv();var h1=(hsv.h+57+360)%360,h2=(hsv.h-157+360)%360,s1=(hsv.s>20)?hsv.s-10:hsv.s+10,s2=(hsv.s>90)?hsv.s-10:hsv.s+10,s3=(hsv.s>95)?hsv.s-5:hsv.s+5,v1=(hsv.v-20>20)?hsv.v-20:hsv.v+20,v2=(hsv.v-30>20)?hsv.v-30:hsv.v+30,v3=(hsv.v-30>70)?hsv.v-30:hsv.v+30;return new dxc.Palette([dojox.color.fromHsv(h1,s1,hsv.v),dojox.color.fromHsv(hsv.h,s2,v2),base,dojox.color.fromHsv(h2,s2,v1),dojox.color.fromHsv(h2,s3,v3)]);},complementary:function(args){var base=dojo.isString(args.base)?new dojox.color.Color(args.base):args.base,hsv=base.toHsv();var h1=((hsv.h*2)+137<360)?(hsv.h*2)+137:Math.floor(hsv.h/2)-137,s1=Math.max(hsv.s-10,0),s2=_174(hsv.s,10,100),s3=Math.min(100,hsv.s+20),v1=Math.min(100,hsv.v+30),v2=(hsv.v>20)?hsv.v-30:hsv.v+30;return new dxc.Palette([dojox.color.fromHsv(hsv.h,s1,v1),dojox.color.fromHsv(hsv.h,s2,v2),base,dojox.color.fromHsv(h1,s3,v2),dojox.color.fromHsv(h1,hsv.s,hsv.v)]);},splitComplementary:function(args){var base=dojo.isString(args.base)?new dojox.color.Color(args.base):args.base,_177=args.da||30,hsv=base.toHsv();var _178=((hsv.h*2)+137<360)?(hsv.h*2)+137:Math.floor(hsv.h/2)-137,h1=(_178-_177+360)%360,h2=(_178+_177)%360,s1=Math.max(hsv.s-10,0),s2=_174(hsv.s,10,100),s3=Math.min(100,hsv.s+20),v1=Math.min(100,hsv.v+30),v2=(hsv.v>20)?hsv.v-30:hsv.v+30;return new dxc.Palette([dojox.color.fromHsv(h1,s1,v1),dojox.color.fromHsv(h1,s2,v2),base,dojox.color.fromHsv(h2,s3,v2),dojox.color.fromHsv(h2,hsv.s,hsv.v)]);},compound:function(args){var base=dojo.isString(args.base)?new dojox.color.Color(args.base):args.base,hsv=base.toHsv();var h1=((hsv.h*2)+18<360)?(hsv.h*2)+18:Math.floor(hsv.h/2)-18,h2=((hsv.h*2)+120<360)?(hsv.h*2)+120:Math.floor(hsv.h/2)-120,h3=((hsv.h*2)+99<360)?(hsv.h*2)+99:Math.floor(hsv.h/2)-99,s1=(hsv.s-40>10)?hsv.s-40:hsv.s+40,s2=(hsv.s-10>80)?hsv.s-10:hsv.s+10,s3=(hsv.s-25>10)?hsv.s-25:hsv.s+25,v1=(hsv.v-40>10)?hsv.v-40:hsv.v+40,v2=(hsv.v-20>80)?hsv.v-20:hsv.v+20,v3=Math.max(hsv.v,20);return new dxc.Palette([dojox.color.fromHsv(h1,s1,v1),dojox.color.fromHsv(h1,s2,v2),base,dojox.color.fromHsv(h2,s3,v3),dojox.color.fromHsv(h3,s2,v2)]);},shades:function(args){var base=dojo.isString(args.base)?new dojox.color.Color(args.base):args.base,hsv=base.toHsv();var s=(hsv.s==100&&hsv.v==0)?0:hsv.s,v1=(hsv.v-50>20)?hsv.v-50:hsv.v+30,v2=(hsv.v-25>=20)?hsv.v-25:hsv.v+55,v3=(hsv.v-75>=20)?hsv.v-75:hsv.v+5,v4=Math.max(hsv.v-10,20);return new dxc.Palette([new dojox.color.fromHsv(hsv.h,s,v1),new dojox.color.fromHsv(hsv.h,s,v2),base,new dojox.color.fromHsv(hsv.h,s,v3),new dojox.color.fromHsv(hsv.h,s,v4)]);}},generate:function(base,type){if(dojo.isFunction(type)){return type({base:base});}else{if(dxc.Palette.generators[type]){return dxc.Palette.generators[type]({base:base});}}throw new Error("dojox.color.Palette.generate: the specified generator ('"+type+"') does not exist.");}});})();}if(!dojo._hasResource["dojox.charting.Theme"]){dojo._hasResource["dojox.charting.Theme"]=true;dojo.provide("dojox.charting.Theme");(function(){var dxc=dojox.charting;dxc.Theme=function(_179){_179=_179||{};var def=dxc.Theme._def;dojo.forEach(["chart","plotarea","axis","series","marker"],function(n){this[n]=dojo.delegate(def[n],_179[n]||{});},this);this.markers=dojo.delegate(dxc.Theme.Markers,_179.markers||{});this.colors=[];this.antiAlias=("antiAlias" in _179)?_179.antiAlias:true;this.assignColors=("assignColors" in _179)?_179.assignColors:true;this.assignMarkers=("assignMarkers" in _179)?_179.assignMarkers:true;_179.colors=_179.colors||def.colors;dojo.forEach(_179.colors,function(item){this.colors.push(item);},this);this._current={color:0,marker:0};this._markers=[];this._buildMarkerArray();};dxc.Theme.Markers={CIRCLE:"m-3,0 c0,-4 6,-4 6,0 m-6,0 c0,4 6,4 6,0",SQUARE:"m-3,-3 l0,6 6,0 0,-6 z",DIAMOND:"m0,-3 l3,3 -3,3 -3,-3 z",CROSS:"m0,-3 l0,6 m-3,-3 l6,0",X:"m-3,-3 l6,6 m0,-6 l-6,6",TRIANGLE:"m-3,3 l3,-6 3,6 z",TRIANGLE_INVERTED:"m-3,-3 l3,6 3,-6 z"};dxc.Theme._def={chart:{stroke:null,fill:"white"},plotarea:{stroke:null,fill:"white"},axis:{stroke:{color:"#333",width:1},majorTick:{color:"#666",width:1,length:6,position:"center"},minorTick:{color:"#666",width:0.8,length:3,position:"center"},microTick:{color:"#666",width:0.5,length:1,position:"center"},font:"normal normal normal 7pt Tahoma",fontColor:"#333"},series:{outline:{width:0.1,color:"#ccc"},stroke:{width:1.5,color:"#333"},fill:"#ccc",font:"normal normal normal 7pt Tahoma",fontColor:"#000"},marker:{stroke:{width:1},fill:"#333",font:"normal normal normal 7pt Tahoma",fontColor:"#000"},colors:["#54544c","#858e94","#6e767a","#948585","#474747"]};dojo.extend(dxc.Theme,{defineColors:function(obj){var _17a=obj||{};var c=[],n=_17a.num||5;if(_17a.colors){var l=_17a.colors.length;for(var i=0;i<n;i++){c.push(_17a.colors[i%l]);}this.colors=c;}else{if(_17a.hue){var s=_17a.saturation||100;var st=_17a.low||30;var end=_17a.high||90;var l=(end+st)/2;this.colors=dojox.color.Palette.generate(dojox.color.fromHsv(_17a.hue,s,l),"monochromatic").colors;}else{if(_17a.generator){this.colors=dojox.color.Palette.generate(_17a.base,_17a.generator).colors;}}}},_buildMarkerArray:function(){this._markers=[];for(var p in this.markers){this._markers.push(this.markers[p]);}this._current.marker=0;},_clone:function(){return new dxc.Theme({chart:this.chart,plotarea:this.plotarea,axis:this.axis,series:this.series,marker:this.marker,antiAlias:this.antiAlias,assignColors:this.assignColors,assignMarkers:this.assigneMarkers,colors:dojo.delegate(this.colors)});},addMarker:function(name,_17b){this.markers[name]=_17b;this._buildMarkerArray();},setMarkers:function(obj){this.markers=obj;this._buildMarkerArray();},next:function(type){if(type=="marker"){return this._markers[this._current.marker++%this._markers.length];}else{return this.colors[this._current.color++%this.colors.length];}},clear:function(){this._current={color:0,marker:0};}});})();}if(!dojo._hasResource["dojox.charting.Element"]){dojo._hasResource["dojox.charting.Element"]=true;dojo.provide("dojox.charting.Element");dojo.declare("dojox.charting.Element",null,{constructor:function(_17c){this.chart=_17c;this.group=null;this.htmlElements=[];this.dirty=true;},createGroup:function(_17d){if(!_17d){_17d=this.chart.surface;}if(!this.group){this.group=_17d.createGroup();}return this;},purgeGroup:function(){this.destroyHtmlElements();if(this.group){this.group.clear();this.group.removeShape();this.group=null;}this.dirty=true;return this;},cleanGroup:function(_17e){this.destroyHtmlElements();if(!_17e){_17e=this.chart.surface;}if(this.group){this.group.clear();}else{this.group=_17e.createGroup();}this.dirty=true;return this;},destroyHtmlElements:function(){if(this.htmlElements.length){dojo.forEach(this.htmlElements,dojo.destroy);this.htmlElements=[];}},destroy:function(){this.purgeGroup();}});}if(!dojo._hasResource["dojox.charting.Series"]){dojo._hasResource["dojox.charting.Series"]=true;dojo.provide("dojox.charting.Series");dojo.declare("dojox.charting.Series",dojox.charting.Element,{constructor:function(_17f,data,_180){dojo.mixin(this,_180);if(typeof this.plot!="string"){this.plot="default";}this.data=data;this.dirty=true;this.clear();},clear:function(){this.dyn={};}});}if(!dojo._hasResource["dojox.charting.scaler.common"]){dojo._hasResource["dojox.charting.scaler.common"]=true;dojo.provide("dojox.charting.scaler.common");(function(){var eq=function(a,b){return Math.abs(a-b)<=0.000001*(Math.abs(a)+Math.abs(b));};dojo.mixin(dojox.charting.scaler.common,{findString:function(val,text){val=val.toLowerCase();for(var i=0;i<text.length;++i){if(val==text[i]){return true;}}return false;},getNumericLabel:function(_181,_182,_183){var def=_183.fixed?_181.toFixed(_182<0?-_182:0):_181.toString();if(_183.labelFunc){var r=_183.labelFunc(def,_181,_182);if(r){return r;}}if(_183.labels){var l=_183.labels,lo=0,hi=l.length;while(lo<hi){var mid=Math.floor((lo+hi)/2),val=l[mid].value;if(val<_181){lo=mid+1;}else{hi=mid;}}if(lo<l.length&&eq(l[lo].value,_181)){return l[lo].text;}--lo;if(lo>=0&&lo<l.length&&eq(l[lo].value,_181)){return l[lo].text;}lo+=2;if(lo<l.length&&eq(l[lo].value,_181)){return l[lo].text;}}return def;}});})();}if(!dojo._hasResource["dojox.charting.scaler.linear"]){dojo._hasResource["dojox.charting.scaler.linear"]=true;dojo.provide("dojox.charting.scaler.linear");(function(){var _184=3,dc=dojox.charting,dcs=dc.scaler,dcsc=dcs.common,_185=dcsc.findString,_186=dcsc.getNumericLabel;var _187=function(min,max,_188,_189,_18a,_18b,span){_188=dojo.delegate(_188);if(!_189){if(_188.fixUpper=="major"){_188.fixUpper="minor";}if(_188.fixLower=="major"){_188.fixLower="minor";}}if(!_18a){if(_188.fixUpper=="minor"){_188.fixUpper="micro";}if(_188.fixLower=="minor"){_188.fixLower="micro";}}if(!_18b){if(_188.fixUpper=="micro"){_188.fixUpper="none";}if(_188.fixLower=="micro"){_188.fixLower="none";}}var _18c=_185(_188.fixLower,["major"])?Math.floor(_188.min/_189)*_189:_185(_188.fixLower,["minor"])?Math.floor(_188.min/_18a)*_18a:_185(_188.fixLower,["micro"])?Math.floor(_188.min/_18b)*_18b:_188.min,_18d=_185(_188.fixUpper,["major"])?Math.ceil(_188.max/_189)*_189:_185(_188.fixUpper,["minor"])?Math.ceil(_188.max/_18a)*_18a:_185(_188.fixUpper,["micro"])?Math.ceil(_188.max/_18b)*_18b:_188.max;if(_188.useMin){min=_18c;}if(_188.useMax){max=_18d;}var _18e=(!_189||_188.useMin&&_185(_188.fixLower,["major"]))?min:Math.ceil(min/_189)*_189,_18f=(!_18a||_188.useMin&&_185(_188.fixLower,["major","minor"]))?min:Math.ceil(min/_18a)*_18a,_190=(!_18b||_188.useMin&&_185(_188.fixLower,["major","minor","micro"]))?min:Math.ceil(min/_18b)*_18b,_191=!_189?0:(_188.useMax&&_185(_188.fixUpper,["major"])?Math.round((max-_18e)/_189):Math.floor((max-_18e)/_189))+1,_192=!_18a?0:(_188.useMax&&_185(_188.fixUpper,["major","minor"])?Math.round((max-_18f)/_18a):Math.floor((max-_18f)/_18a))+1,_193=!_18b?0:(_188.useMax&&_185(_188.fixUpper,["major","minor","micro"])?Math.round((max-_190)/_18b):Math.floor((max-_190)/_18b))+1,_194=_18a?Math.round(_189/_18a):0,_195=_18b?Math.round(_18a/_18b):0,_196=_189?Math.floor(Math.log(_189)/Math.LN10):0,_197=_18a?Math.floor(Math.log(_18a)/Math.LN10):0,_198=span/(max-min);if(!isFinite(_198)){_198=1;}return {bounds:{lower:_18c,upper:_18d,from:min,to:max,scale:_198,span:span},major:{tick:_189,start:_18e,count:_191,prec:_196},minor:{tick:_18a,start:_18f,count:_192,prec:_197},micro:{tick:_18b,start:_190,count:_193,prec:0},minorPerMajor:_194,microPerMinor:_195,scaler:dcs.linear};};dojo.mixin(dojox.charting.scaler.linear,{buildScaler:function(min,max,span,_199){var h={fixUpper:"none",fixLower:"none",natural:false};if(_199){if("fixUpper" in _199){h.fixUpper=String(_199.fixUpper);}if("fixLower" in _199){h.fixLower=String(_199.fixLower);}if("natural" in _199){h.natural=Boolean(_199.natural);}}if("min" in _199){min=_199.min;}if("max" in _199){max=_199.max;}if(_199.includeZero){if(min>0){min=0;}if(max<0){max=0;}}h.min=min;h.useMin=true;h.max=max;h.useMax=true;if("from" in _199){min=_199.from;h.useMin=false;}if("to" in _199){max=_199.to;h.useMax=false;}if(max<=min){return _187(min,max,h,0,0,0,span);}var mag=Math.floor(Math.log(max-min)/Math.LN10),_19a=_199&&("majorTickStep" in _199)?_199.majorTickStep:Math.pow(10,mag),_19b=0,_19c=0,_19d;if(_199&&("minorTickStep" in _199)){_19b=_199.minorTickStep;}else{do{_19b=_19a/10;if(!h.natural||_19b>0.9){_19d=_187(min,max,h,_19a,_19b,0,span);if(_19d.bounds.scale*_19d.minor.tick>_184){break;}}_19b=_19a/5;if(!h.natural||_19b>0.9){_19d=_187(min,max,h,_19a,_19b,0,span);if(_19d.bounds.scale*_19d.minor.tick>_184){break;}}_19b=_19a/2;if(!h.natural||_19b>0.9){_19d=_187(min,max,h,_19a,_19b,0,span);if(_19d.bounds.scale*_19d.minor.tick>_184){break;}}return _187(min,max,h,_19a,0,0,span);}while(false);}if(_199&&("microTickStep" in _199)){_19c=_199.microTickStep;_19d=_187(min,max,h,_19a,_19b,_19c,span);}else{do{_19c=_19b/10;if(!h.natural||_19c>0.9){_19d=_187(min,max,h,_19a,_19b,_19c,span);if(_19d.bounds.scale*_19d.micro.tick>_184){break;}}_19c=_19b/5;if(!h.natural||_19c>0.9){_19d=_187(min,max,h,_19a,_19b,_19c,span);if(_19d.bounds.scale*_19d.micro.tick>_184){break;}}_19c=_19b/2;if(!h.natural||_19c>0.9){_19d=_187(min,max,h,_19a,_19b,_19c,span);if(_19d.bounds.scale*_19d.micro.tick>_184){break;}}_19c=0;}while(false);}return _19c?_19d:_187(min,max,h,_19a,_19b,0,span);},buildTicks:function(_19e,_19f){var step,next,tick,_1a0=_19e.major.start,_1a1=_19e.minor.start,_1a2=_19e.micro.start;if(_19f.microTicks&&_19e.micro.tick){step=_19e.micro.tick,next=_1a2;}else{if(_19f.minorTicks&&_19e.minor.tick){step=_19e.minor.tick,next=_1a1;}else{if(_19e.major.tick){step=_19e.major.tick,next=_1a0;}else{return null;}}}var _1a3=1/_19e.bounds.scale;if(_19e.bounds.to<=_19e.bounds.from||isNaN(_1a3)||!isFinite(_1a3)||step<=0||isNaN(step)||!isFinite(step)){return null;}var _1a4=[],_1a5=[],_1a6=[];while(next<=_19e.bounds.to+_1a3){if(Math.abs(_1a0-next)<step/2){tick={value:_1a0};if(_19f.majorLabels){tick.label=_186(_1a0,_19e.major.prec,_19f);}_1a4.push(tick);_1a0+=_19e.major.tick;_1a1+=_19e.minor.tick;_1a2+=_19e.micro.tick;}else{if(Math.abs(_1a1-next)<step/2){if(_19f.minorTicks){tick={value:_1a1};if(_19f.minorLabels&&(_19e.minMinorStep<=_19e.minor.tick*_19e.bounds.scale)){tick.label=_186(_1a1,_19e.minor.prec,_19f);}_1a5.push(tick);}_1a1+=_19e.minor.tick;_1a2+=_19e.micro.tick;}else{if(_19f.microTicks){_1a6.push({value:_1a2});}_1a2+=_19e.micro.tick;}}next+=step;}return {major:_1a4,minor:_1a5,micro:_1a6};},getTransformerFromModel:function(_1a7){var _1a8=_1a7.bounds.from,_1a9=_1a7.bounds.scale;return function(x){return (x-_1a8)*_1a9;};},getTransformerFromPlot:function(_1aa){var _1ab=_1aa.bounds.from,_1ac=_1aa.bounds.scale;return function(x){return x/_1ac+_1ab;};}});})();}if(!dojo._hasResource["dojox.charting.axis2d.common"]){dojo._hasResource["dojox.charting.axis2d.common"]=true;dojo.provide("dojox.charting.axis2d.common");(function(){var g=dojox.gfx;var _1ad=function(s){s.marginLeft="0px";s.marginTop="0px";s.marginRight="0px";s.marginBottom="0px";s.paddingLeft="0px";s.paddingTop="0px";s.paddingRight="0px";s.paddingBottom="0px";s.borderLeftWidth="0px";s.borderTopWidth="0px";s.borderRightWidth="0px";s.borderBottomWidth="0px";};var _1ae=function(n){if(n["getBoundingClientRect"]){var bcr=n.getBoundingClientRect();return bcr.width||(bcr.right-bcr.left);}else{return dojo.marginBox(n).w;}};dojo.mixin(dojox.charting.axis2d.common,{createText:{gfx:function(_1af,_1b0,x,y,_1b1,text,font,_1b2){return _1b0.createText({x:x,y:y,text:text,align:_1b1}).setFont(font).setFill(_1b2);},html:function(_1b3,_1b4,x,y,_1b5,text,font,_1b6,_1b7){var p=dojo.doc.createElement("div"),s=p.style,_1b8;_1ad(s);s.font=font;p.innerHTML=String(text).replace(/\s/g,"&nbsp;");s.color=_1b6;s.position="absolute";s.left="-10000px";dojo.body().appendChild(p);var size=g.normalizedLength(g.splitFontString(font).size);if(!_1b7){_1b8=_1ae(p);}dojo.body().removeChild(p);s.position="relative";if(_1b7){s.width=_1b7+"px";switch(_1b5){case "middle":s.textAlign="center";s.left=(x-_1b7/2)+"px";break;case "end":s.textAlign="right";s.left=(x-_1b7)+"px";break;default:s.left=x+"px";s.textAlign="left";break;}}else{switch(_1b5){case "middle":s.left=Math.floor(x-_1b8/2)+"px";break;case "end":s.left=Math.floor(x-_1b8)+"px";break;default:s.left=Math.floor(x)+"px";break;}}s.top=Math.floor(y-size)+"px";var wrap=dojo.doc.createElement("div"),w=wrap.style;_1ad(w);w.width="0px";w.height="0px";wrap.appendChild(p);_1b3.node.insertBefore(wrap,_1b3.node.firstChild);return wrap;}}});})();}if(!dojo._hasResource["dojox.charting.axis2d.Base"]){dojo._hasResource["dojox.charting.axis2d.Base"]=true;dojo.provide("dojox.charting.axis2d.Base");dojo.declare("dojox.charting.axis2d.Base",dojox.charting.Element,{constructor:function(_1b9,_1ba){this.vertical=_1ba&&_1ba.vertical;},clear:function(){return this;},initialized:function(){return false;},calculate:function(min,max,span){return this;},getScaler:function(){return null;},getTicks:function(){return null;},getOffsets:function(){return {l:0,r:0,t:0,b:0};},render:function(dim,_1bb){return this;}});}if(!dojo._hasResource["dojo.string"]){dojo._hasResource["dojo.string"]=true;dojo.provide("dojo.string");dojo.string.rep=function(str,num){if(num<=0||!str){return "";}var buf=[];for(;;){if(num&1){buf.push(str);}if(!(num>>=1)){break;}str+=str;}return buf.join("");};dojo.string.pad=function(text,size,ch,end){if(!ch){ch="0";}var out=String(text),pad=dojo.string.rep(ch,Math.ceil((size-out.length)/ch.length));return end?out+pad:pad+out;};dojo.string.substitute=function(_1bc,map,_1bd,_1be){_1be=_1be||dojo.global;_1bd=_1bd?dojo.hitch(_1be,_1bd):function(v){return v;};return _1bc.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_1bf,key,_1c0){var _1c1=dojo.getObject(key,false,map);if(_1c0){_1c1=dojo.getObject(_1c0,false,_1be).call(_1be,_1c1,key);}return _1bd(_1c1,key).toString();});};dojo.string.trim=String.prototype.trim?dojo.trim:function(str){str=str.replace(/^\s+/,"");for(var i=str.length-1;i>=0;i--){if(/\S/.test(str.charAt(i))){str=str.substring(0,i+1);break;}}return str;};}if(!dojo._hasResource["dojox.lang.utils"]){dojo._hasResource["dojox.lang.utils"]=true;dojo.provide("dojox.lang.utils");(function(){var _1c2={},du=dojox.lang.utils;var _1c3=function(o){if(dojo.isArray(o)){return dojo._toArray(o);}if(!dojo.isObject(o)||dojo.isFunction(o)){return o;}return dojo.delegate(o);};dojo.mixin(du,{coerceType:function(_1c4,_1c5){switch(typeof _1c4){case "number":return Number(eval("("+_1c5+")"));case "string":return String(_1c5);case "boolean":return Boolean(eval("("+_1c5+")"));}return eval("("+_1c5+")");},updateWithObject:function(_1c6,_1c7,conv){if(!_1c7){return _1c6;}for(var x in _1c6){if(x in _1c7&&!(x in _1c2)){var t=_1c6[x];if(t&&typeof t=="object"){du.updateWithObject(t,_1c7[x],conv);}else{_1c6[x]=conv?du.coerceType(t,_1c7[x]):_1c3(_1c7[x]);}}}return _1c6;},updateWithPattern:function(_1c8,_1c9,_1ca,conv){if(!_1c9||!_1ca){return _1c8;}for(var x in _1ca){if(x in _1c9&&!(x in _1c2)){_1c8[x]=conv?du.coerceType(_1ca[x],_1c9[x]):_1c3(_1c9[x]);}}return _1c8;}});})();}if(!dojo._hasResource["dojox.charting.axis2d.Default"]){dojo._hasResource["dojox.charting.axis2d.Default"]=true;dojo.provide("dojox.charting.axis2d.Default");(function(){var dc=dojox.charting,df=dojox.lang.functional,du=dojox.lang.utils,g=dojox.gfx,lin=dc.scaler.linear,_1cb=4;dojo.declare("dojox.charting.axis2d.Default",dojox.charting.axis2d.Base,{defaultParams:{vertical:false,fixUpper:"none",fixLower:"none",natural:false,leftBottom:true,includeZero:false,fixed:true,majorLabels:true,minorTicks:true,minorLabels:true,microTicks:false,htmlLabels:true},optionalParams:{min:0,max:1,from:0,to:1,majorTickStep:4,minorTickStep:2,microTickStep:1,labels:[],labelFunc:null,maxLabelSize:0,stroke:{},majorTick:{},minorTick:{},microTick:{},font:"",fontColor:""},constructor:function(_1cc,_1cd){this.opt=dojo.delegate(this.defaultParams,_1cd);du.updateWithPattern(this.opt,_1cd,this.optionalParams);},dependOnData:function(){return !("min" in this.opt)||!("max" in this.opt);},clear:function(){delete this.scaler;delete this.ticks;this.dirty=true;return this;},initialized:function(){return "scaler" in this&&!(this.dirty&&this.dependOnData());},setWindow:function(_1ce,_1cf){this.scale=_1ce;this.offset=_1cf;return this.clear();},getWindowScale:function(){return "scale" in this?this.scale:1;},getWindowOffset:function(){return "offset" in this?this.offset:0;},_groupLabelWidth:function(_1d0,font){if(_1d0[0]["text"]){_1d0=df.map(_1d0,function(_1d1){return _1d1.text;});}var s=_1d0.join("<br>");return dojox.gfx._base._getTextBox(s,{font:font}).w||0;},calculate:function(min,max,span,_1d2){if(this.initialized()){return this;}var o=this.opt;this.labels="labels" in o?o.labels:_1d2;this.scaler=lin.buildScaler(min,max,span,o);var tsb=this.scaler.bounds;if("scale" in this){o.from=tsb.lower+this.offset;o.to=(tsb.upper-tsb.lower)/this.scale+o.from;if(!isFinite(o.from)||isNaN(o.from)||!isFinite(o.to)||isNaN(o.to)||o.to-o.from>=tsb.upper-tsb.lower){delete o.from;delete o.to;delete this.scale;delete this.offset;}else{if(o.from<tsb.lower){o.to+=tsb.lower-o.from;o.from=tsb.lower;}else{if(o.to>tsb.upper){o.from+=tsb.upper-o.to;o.to=tsb.upper;}}this.offset=o.from-tsb.lower;}this.scaler=lin.buildScaler(min,max,span,o);tsb=this.scaler.bounds;if(this.scale==1&&this.offset==0){delete this.scale;delete this.offset;}}var _1d3=0,ta=this.chart.theme.axis,_1d4="font" in o?o.font:ta.font,size=_1d4?g.normalizedLength(g.splitFontString(_1d4).size):0;if(this.vertical){if(size){_1d3=size+_1cb;}}else{if(size){var _1d5,i;if(o.labelFunc&&o.maxLabelSize){_1d5=o.maxLabelSize;}else{if(this.labels){_1d5=this._groupLabelWidth(this.labels,_1d4);}else{var _1d6=Math.ceil(Math.log(Math.max(Math.abs(tsb.from),Math.abs(tsb.to)))/Math.LN10),t=[];if(tsb.from<0||tsb.to<0){t.push("-");}t.push(dojo.string.rep("9",_1d6));var _1d7=Math.floor(Math.log(tsb.to-tsb.from)/Math.LN10);if(_1d7>0){t.push(".");for(i=0;i<_1d7;++i){t.push("9");}}_1d5=dojox.gfx._base._getTextBox(t.join(""),{font:_1d4}).w;}}_1d3=_1d5+_1cb;}}this.scaler.minMinorStep=_1d3;this.ticks=lin.buildTicks(this.scaler,o);return this;},getScaler:function(){return this.scaler;},getTicks:function(){return this.ticks;},getOffsets:function(){var o=this.opt;var _1d8={l:0,r:0,t:0,b:0},_1d9,a,b,c,d,gl=dc.scaler.common.getNumericLabel,_1da=0,ta=this.chart.theme.axis,_1db="font" in o?o.font:ta.font,_1dc="majorTick" in o?o.majorTick:ta.majorTick,_1dd="minorTick" in o?o.minorTick:ta.minorTick,size=_1db?g.normalizedLength(g.splitFontString(_1db).size):0,s=this.scaler;if(!s){return _1d8;}var ma=s.major,mi=s.minor;if(this.vertical){if(size){if(o.labelFunc&&o.maxLabelSize){_1d9=o.maxLabelSize;}else{if(this.labels){_1d9=this._groupLabelWidth(this.labels,_1db);}else{_1d9=this._groupLabelWidth([gl(ma.start,ma.prec,o),gl(ma.start+ma.count*ma.tick,ma.prec,o),gl(mi.start,mi.prec,o),gl(mi.start+mi.count*mi.tick,mi.prec,o)],_1db);}}_1da=_1d9+_1cb;}_1da+=_1cb+Math.max(_1dc.length,_1dd.length);_1d8[o.leftBottom?"l":"r"]=_1da;_1d8.t=_1d8.b=size/2;}else{if(size){_1da=size+_1cb;}_1da+=_1cb+Math.max(_1dc.length,_1dd.length);_1d8[o.leftBottom?"b":"t"]=_1da;if(size){if(o.labelFunc&&o.maxLabelSize){_1d9=o.maxLabelSize;}else{if(this.labels){_1d9=this._groupLabelWidth(this.labels,_1db);}else{_1d9=this._groupLabelWidth([gl(ma.start,ma.prec,o),gl(ma.start+ma.count*ma.tick,ma.prec,o),gl(mi.start,mi.prec,o),gl(mi.start+mi.count*mi.tick,mi.prec,o)],_1db);}}_1d8.l=_1d8.r=_1d9/2;}}if(_1d9){this._cachedLabelWidth=_1d9;}return _1d8;},render:function(dim,_1de){if(!this.dirty){return this;}var o=this.opt;var _1df,stop,_1e0,_1e1,_1e2,_1e3,ta=this.chart.theme.axis,_1e4="stroke" in o?o.stroke:ta.stroke,_1e5="majorTick" in o?o.majorTick:ta.majorTick,_1e6="minorTick" in o?o.minorTick:ta.minorTick,_1e7="microTick" in o?o.microTick:ta.minorTick,_1e8="font" in o?o.font:ta.font,_1e9="fontColor" in o?o.fontColor:ta.fontColor,_1ea=Math.max(_1e5.length,_1e6.length),size=_1e8?g.normalizedLength(g.splitFontString(_1e8).size):0;if(this.vertical){_1df={y:dim.height-_1de.b};stop={y:_1de.t};_1e0={x:0,y:-1};if(o.leftBottom){_1df.x=stop.x=_1de.l;_1e1={x:-1,y:0};_1e3="end";}else{_1df.x=stop.x=dim.width-_1de.r;_1e1={x:1,y:0};_1e3="start";}_1e2={x:_1e1.x*(_1ea+_1cb),y:size*0.4};}else{_1df={x:_1de.l};stop={x:dim.width-_1de.r};_1e0={x:1,y:0};_1e3="middle";if(o.leftBottom){_1df.y=stop.y=dim.height-_1de.b;_1e1={x:0,y:1};_1e2={y:_1ea+_1cb+size};}else{_1df.y=stop.y=_1de.t;_1e1={x:0,y:-1};_1e2={y:-_1ea-_1cb};}_1e2.x=0;}this.cleanGroup();try{var s=this.group,c=this.scaler,t=this.ticks,_1eb,f=lin.getTransformerFromModel(this.scaler),_1ec=(dojox.gfx.renderer=="canvas"),_1ed=_1ec||this.opt.htmlLabels&&!dojo.isIE&&!dojo.isOpera?"html":"gfx",dx=_1e1.x*_1e5.length,dy=_1e1.y*_1e5.length;s.createLine({x1:_1df.x,y1:_1df.y,x2:stop.x,y2:stop.y}).setStroke(_1e4);dojo.forEach(t.major,function(tick){var _1ee=f(tick.value),elem,x=_1df.x+_1e0.x*_1ee,y=_1df.y+_1e0.y*_1ee;s.createLine({x1:x,y1:y,x2:x+dx,y2:y+dy}).setStroke(_1e5);if(tick.label){elem=dc.axis2d.common.createText[_1ed](this.chart,s,x+_1e2.x,y+_1e2.y,_1e3,tick.label,_1e8,_1e9,this._cachedLabelWidth);if(_1ed=="html"){this.htmlElements.push(elem);}}},this);dx=_1e1.x*_1e6.length;dy=_1e1.y*_1e6.length;_1eb=c.minMinorStep<=c.minor.tick*c.bounds.scale;dojo.forEach(t.minor,function(tick){var _1ef=f(tick.value),elem,x=_1df.x+_1e0.x*_1ef,y=_1df.y+_1e0.y*_1ef;s.createLine({x1:x,y1:y,x2:x+dx,y2:y+dy}).setStroke(_1e6);if(_1eb&&tick.label){elem=dc.axis2d.common.createText[_1ed](this.chart,s,x+_1e2.x,y+_1e2.y,_1e3,tick.label,_1e8,_1e9,this._cachedLabelWidth);if(_1ed=="html"){this.htmlElements.push(elem);}}},this);dx=_1e1.x*_1e7.length;dy=_1e1.y*_1e7.length;dojo.forEach(t.micro,function(tick){var _1f0=f(tick.value),elem,x=_1df.x+_1e0.x*_1f0,y=_1df.y+_1e0.y*_1f0;s.createLine({x1:x,y1:y,x2:x+dx,y2:y+dy}).setStroke(_1e7);},this);}catch(e){}this.dirty=false;return this;}});})();}if(!dojo._hasResource["dojox.charting.plot2d.common"]){dojo._hasResource["dojox.charting.plot2d.common"]=true;dojo.provide("dojox.charting.plot2d.common");(function(){var df=dojox.lang.functional,dc=dojox.charting.plot2d.common;dojo.mixin(dojox.charting.plot2d.common,{makeStroke:function(_1f1){if(!_1f1){return _1f1;}if(typeof _1f1=="string"||_1f1 instanceof dojo.Color){_1f1={color:_1f1};}return dojox.gfx.makeParameters(dojox.gfx.defaultStroke,_1f1);},augmentColor:function(_1f2,_1f3){var t=new dojo.Color(_1f2),c=new dojo.Color(_1f3);c.a=t.a;return c;},augmentStroke:function(_1f4,_1f5){var s=dc.makeStroke(_1f4);if(s){s.color=dc.augmentColor(s.color,_1f5);}return s;},augmentFill:function(fill,_1f6){var fc,c=new dojo.Color(_1f6);if(typeof fill=="string"||fill instanceof dojo.Color){return dc.augmentColor(fill,_1f6);}return fill;},defaultStats:{hmin:Number.POSITIVE_INFINITY,hmax:Number.NEGATIVE_INFINITY,vmin:Number.POSITIVE_INFINITY,vmax:Number.NEGATIVE_INFINITY},collectSimpleStats:function(_1f7){var _1f8=dojo.clone(dc.defaultStats);for(var i=0;i<_1f7.length;++i){var run=_1f7[i];if(!run.data.length){continue;}if(typeof run.data[0]=="number"){var _1f9=_1f8.vmin,_1fa=_1f8.vmax;if(!("ymin" in run)||!("ymax" in run)){dojo.forEach(run.data,function(val,i){var x=i+1,y=val;if(isNaN(y)){y=0;}_1f8.hmin=Math.min(_1f8.hmin,x);_1f8.hmax=Math.max(_1f8.hmax,x);_1f8.vmin=Math.min(_1f8.vmin,y);_1f8.vmax=Math.max(_1f8.vmax,y);});}if("ymin" in run){_1f8.vmin=Math.min(_1f9,run.ymin);}if("ymax" in run){_1f8.vmax=Math.max(_1fa,run.ymax);}}else{var _1fb=_1f8.hmin,_1fc=_1f8.hmax,_1f9=_1f8.vmin,_1fa=_1f8.vmax;if(!("xmin" in run)||!("xmax" in run)||!("ymin" in run)||!("ymax" in run)){dojo.forEach(run.data,function(val,i){var x="x" in val?val.x:i+1,y=val.y;if(isNaN(x)){x=0;}if(isNaN(y)){y=0;}_1f8.hmin=Math.min(_1f8.hmin,x);_1f8.hmax=Math.max(_1f8.hmax,x);_1f8.vmin=Math.min(_1f8.vmin,y);_1f8.vmax=Math.max(_1f8.vmax,y);});}if("xmin" in run){_1f8.hmin=Math.min(_1fb,run.xmin);}if("xmax" in run){_1f8.hmax=Math.max(_1fc,run.xmax);}if("ymin" in run){_1f8.vmin=Math.min(_1f9,run.ymin);}if("ymax" in run){_1f8.vmax=Math.max(_1fa,run.ymax);}}}return _1f8;},calculateBarSize:function(_1fd,opt,_1fe){if(!_1fe){_1fe=1;}var gap=opt.gap,size=(_1fd-2*gap)/_1fe;if("minBarSize" in opt){size=Math.max(size,opt.minBarSize);}if("maxBarSize" in opt){size=Math.min(size,opt.maxBarSize);}size=Math.max(size,1);gap=(_1fd-size*_1fe)/2;return {size:size,gap:gap};},collectStackedStats:function(_1ff){var _200=dojo.clone(dc.defaultStats);if(_1ff.length){_200.hmin=Math.min(_200.hmin,1);_200.hmax=df.foldl(_1ff,"seed, run -> Math.max(seed, run.data.length)",_200.hmax);for(var i=0;i<_200.hmax;++i){var v=_1ff[0].data[i];if(isNaN(v)){v=0;}_200.vmin=Math.min(_200.vmin,v);for(var j=1;j<_1ff.length;++j){var t=_1ff[j].data[i];if(isNaN(t)){t=0;}v+=t;}_200.vmax=Math.max(_200.vmax,v);}}return _200;},curve:function(a,_201){var arr=a.slice(0);if(_201=="x"){arr[arr.length]=arr[0];}var p=dojo.map(arr,function(item,i){if(i==0){return "M"+item.x+","+item.y;}if(!isNaN(_201)){var dx=item.x-arr[i-1].x,dy=arr[i-1].y;return "C"+(item.x-(_201-1)*(dx/_201))+","+dy+" "+(item.x-(dx/_201))+","+item.y+" "+item.x+","+item.y;}else{if(_201=="X"||_201=="x"||_201=="S"){var p0,p1=arr[i-1],p2=arr[i],p3;var bz1x,bz1y,bz2x,bz2y;var f=1/6;if(i==1){if(_201=="x"){p0=arr[arr.length-2];}else{p0=p1;}f=1/3;}else{p0=arr[i-2];}if(i==(arr.length-1)){if(_201=="x"){p3=arr[1];}else{p3=p2;}f=1/3;}else{p3=arr[i+1];}var p1p2=Math.sqrt((p2.x-p1.x)*(p2.x-p1.x)+(p2.y-p1.y)*(p2.y-p1.y));var p0p2=Math.sqrt((p2.x-p0.x)*(p2.x-p0.x)+(p2.y-p0.y)*(p2.y-p0.y));var p1p3=Math.sqrt((p3.x-p1.x)*(p3.x-p1.x)+(p3.y-p1.y)*(p3.y-p1.y));var _202=p0p2*f;var _203=p1p3*f;if(_202>p1p2/2&&_203>p1p2/2){_202=p1p2/2;_203=p1p2/2;}else{if(_202>p1p2/2){_202=p1p2/2;_203=p1p2/2*p1p3/p0p2;}else{if(_203>p1p2/2){_203=p1p2/2;_202=p1p2/2*p0p2/p1p3;}}}if(_201=="S"){if(p0==p1){_202=0;}if(p2==p3){_203=0;}}bz1x=p1.x+_202*(p2.x-p0.x)/p0p2;bz1y=p1.y+_202*(p2.y-p0.y)/p0p2;bz2x=p2.x-_203*(p3.x-p1.x)/p1p3;bz2y=p2.y-_203*(p3.y-p1.y)/p1p3;}}return "C"+(bz1x+","+bz1y+" "+bz2x+","+bz2y+" "+p2.x+","+p2.y);});return p.join(" ");}});})();}if(!dojo._hasResource["dojox.charting.scaler.primitive"]){dojo._hasResource["dojox.charting.scaler.primitive"]=true;dojo.provide("dojox.charting.scaler.primitive");dojox.charting.scaler.primitive={buildScaler:function(min,max,span,_204){return {bounds:{lower:min,upper:max,from:min,to:max,scale:span/(max-min),span:span},scaler:dojox.charting.scaler.primitive};},buildTicks:function(_205,_206){return {major:[],minor:[],micro:[]};},getTransformerFromModel:function(_207){var _208=_207.bounds.from,_209=_207.bounds.scale;return function(x){return (x-_208)*_209;};},getTransformerFromPlot:function(_20a){var _20b=_20a.bounds.from,_20c=_20a.bounds.scale;return function(x){return x/_20c+_20b;};}};}if(!dojo._hasResource["dojox.charting.plot2d.Base"]){dojo._hasResource["dojox.charting.plot2d.Base"]=true;dojo.provide("dojox.charting.plot2d.Base");dojo.declare("dojox.charting.plot2d.Base",dojox.charting.Element,{destroy:function(){this.resetEvents();this.inherited(arguments);},clear:function(){this.series=[];this._hAxis=null;this._vAxis=null;this.dirty=true;return this;},setAxis:function(axis){if(axis){this[axis.vertical?"_vAxis":"_hAxis"]=axis;}return this;},addSeries:function(run){this.series.push(run);return this;},calculateAxes:function(dim){return this;},isDirty:function(){return this.dirty||this._hAxis&&this._hAxis.dirty||this._vAxis&&this._vAxis.dirty;},render:function(dim,_20d){return this;},getRequiredColors:function(){return this.series.length;},plotEvent:function(o){},connect:function(_20e,_20f){this.dirty=true;return dojo.connect(this,"plotEvent",_20e,_20f);},events:function(){var ls=this.plotEvent._listeners;if(!ls||!ls.length){return false;}for(var i in ls){if(!(i in Array.prototype)){return true;}}return false;},resetEvents:function(){this.plotEvent({type:"onplotreset",plot:this});},_calc:function(dim,_210){if(this._hAxis){if(!this._hAxis.initialized()){this._hAxis.calculate(_210.hmin,_210.hmax,dim.width);}this._hScaler=this._hAxis.getScaler();}else{this._hScaler=dojox.charting.scaler.primitive.buildScaler(_210.hmin,_210.hmax,dim.width);}if(this._vAxis){if(!this._vAxis.initialized()){this._vAxis.calculate(_210.vmin,_210.vmax,dim.height);}this._vScaler=this._vAxis.getScaler();}else{this._vScaler=dojox.charting.scaler.primitive.buildScaler(_210.vmin,_210.vmax,dim.height);}},_connectEvents:function(_211,o){_211.connect("onmouseover",this,function(e){o.type="onmouseover";o.event=e;this.plotEvent(o);});_211.connect("onmouseout",this,function(e){o.type="onmouseout";o.event=e;this.plotEvent(o);});_211.connect("onclick",this,function(e){o.type="onclick";o.event=e;this.plotEvent(o);});}});}if(!dojo._hasResource["dojox.charting.plot2d.Default"]){dojo._hasResource["dojox.charting.plot2d.Default"]=true;dojo.provide("dojox.charting.plot2d.Default");(function(){var df=dojox.lang.functional,du=dojox.lang.utils,dc=dojox.charting.plot2d.common,_212=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.Default",dojox.charting.plot2d.Base,{defaultParams:{hAxis:"x",vAxis:"y",lines:true,areas:false,markers:false,shadows:0,tension:0},optionalParams:{},constructor:function(_213,_214){this.opt=dojo.clone(this.defaultParams);du.updateWithObject(this.opt,_214);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;},calculateAxes:function(dim){this._calc(dim,dc.collectSimpleStats(this.series));return this;},render:function(dim,_215){this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_212);this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,_216,_217,_218,_219,_21a=this.events();this.resetEvents();for(var i=this.series.length-1;i>=0;--i){var run=this.series[i];if(!this.dirty&&!run.dirty){continue;}run.cleanGroup();if(!run.data.length){run.dirty=false;continue;}var s=run.group,_21b,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler);if(typeof run.data[0]=="number"){_21b=dojo.map(run.data,function(v,i){return {x:ht(i+1)+_215.l,y:dim.height-_215.b-vt(v)};},this);}else{_21b=dojo.map(run.data,function(v,i){return {x:ht(v.x)+_215.l,y:dim.height-_215.b-vt(v.y)};},this);}if(!run.fill||!run.stroke){_218=run.dyn.color=new dojo.Color(t.next("color"));}var _21c=this.opt.tension?dc.curve(_21b,this.opt.tension):"";if(this.opt.areas){var fill=run.fill?run.fill:dc.augmentFill(t.series.fill,_218);var _21d=dojo.clone(_21b);if(this.opt.tension){var _21e="L"+_21d[_21d.length-1].x+","+(dim.height-_215.b)+" L"+_21d[0].x+","+(dim.height-_215.b)+" L"+_21d[0].x+","+_21d[0].y;run.dyn.fill=s.createPath(_21c+" "+_21e).setFill(fill).getFill();}else{_21d.push({x:_21b[_21b.length-1].x,y:dim.height-_215.b});_21d.push({x:_21b[0].x,y:dim.height-_215.b});_21d.push(_21b[0]);run.dyn.fill=s.createPolyline(_21d).setFill(fill).getFill();}}if(this.opt.lines||this.opt.markers){_216=run.dyn.stroke=run.stroke?dc.makeStroke(run.stroke):dc.augmentStroke(t.series.stroke,_218);if(run.outline||t.series.outline){_217=run.dyn.outline=dc.makeStroke(run.outline?run.outline:t.series.outline);_217.width=2*_217.width+_216.width;}}if(this.opt.markers){_219=run.dyn.marker=run.marker?run.marker:t.next("marker");}var _21f=null,_220=null,_221=null;if(this.opt.shadows&&_216){var sh=this.opt.shadows,_222=new dojo.Color([0,0,0,0.3]),_223=dojo.map(_21b,function(c){return {x:c.x+sh.dx,y:c.y+sh.dy};}),_224=dojo.clone(_217?_217:_216);_224.color=_222;_224.width+=sh.dw?sh.dw:0;if(this.opt.lines){if(this.opt.tension){run.dyn.shadow=s.createPath(dc.curve(_223,this.opt.tension)).setStroke(_224).getStroke();}else{run.dyn.shadow=s.createPolyline(_223).setStroke(_224).getStroke();}}if(this.opt.markers){_221=dojo.map(_223,function(c){return s.createPath("M"+c.x+" "+c.y+" "+_219).setStroke(_224).setFill(_222);},this);}}if(this.opt.lines){if(_217){if(this.opt.tension){run.dyn.outline=s.createPath(_21c).setStroke(_217).getStroke();}else{run.dyn.outline=s.createPolyline(_21b).setStroke(_217).getStroke();}}if(this.opt.tension){run.dyn.stroke=s.createPath(_21c).setStroke(_216).getStroke();}else{run.dyn.stroke=s.createPolyline(_21b).setStroke(_216).getStroke();}}if(this.opt.markers){_21f=new Array(_21b.length);_220=new Array(_21b.length);dojo.forEach(_21b,function(c,i){var path="M"+c.x+" "+c.y+" "+_219;if(_217){_220[i]=s.createPath(path).setStroke(_217);}_21f[i]=s.createPath(path).setStroke(_216).setFill(_216.color);},this);if(_21a){dojo.forEach(_21f,function(s,i){var o={element:"marker",index:i,run:run,plot:this,hAxis:this.hAxis||null,vAxis:this.vAxis||null,shape:s,outline:_220[i]||null,shadow:_221&&_221[i]||null,cx:_21b[i].x,cy:_21b[i].y};if(typeof run.data[0]=="number"){o.x=i+1;o.y=run.data[i];}else{o.x=run.data[i].x;o.y=run.data[i].y;}this._connectEvents(s,o);},this);}}run.dirty=false;}this.dirty=false;return this;}});})();}if(!dojo._hasResource["dojox.charting.plot2d.Lines"]){dojo._hasResource["dojox.charting.plot2d.Lines"]=true;dojo.provide("dojox.charting.plot2d.Lines");dojo.declare("dojox.charting.plot2d.Lines",dojox.charting.plot2d.Default,{constructor:function(){this.opt.lines=true;}});}if(!dojo._hasResource["dojox.charting.plot2d.Areas"]){dojo._hasResource["dojox.charting.plot2d.Areas"]=true;dojo.provide("dojox.charting.plot2d.Areas");dojo.declare("dojox.charting.plot2d.Areas",dojox.charting.plot2d.Default,{constructor:function(){this.opt.lines=true;this.opt.areas=true;}});}if(!dojo._hasResource["dojox.charting.plot2d.Markers"]){dojo._hasResource["dojox.charting.plot2d.Markers"]=true;dojo.provide("dojox.charting.plot2d.Markers");dojo.declare("dojox.charting.plot2d.Markers",dojox.charting.plot2d.Default,{constructor:function(){this.opt.markers=true;}});}if(!dojo._hasResource["dojox.charting.plot2d.MarkersOnly"]){dojo._hasResource["dojox.charting.plot2d.MarkersOnly"]=true;dojo.provide("dojox.charting.plot2d.MarkersOnly");dojo.declare("dojox.charting.plot2d.MarkersOnly",dojox.charting.plot2d.Default,{constructor:function(){this.opt.lines=false;this.opt.markers=true;}});}if(!dojo._hasResource["dojox.charting.plot2d.Scatter"]){dojo._hasResource["dojox.charting.plot2d.Scatter"]=true;dojo.provide("dojox.charting.plot2d.Scatter");dojo.declare("dojox.charting.plot2d.Scatter",dojox.charting.plot2d.Default,{constructor:function(){this.opt.lines=false;this.opt.markers=true;}});}if(!dojo._hasResource["dojox.lang.functional.sequence"]){dojo._hasResource["dojox.lang.functional.sequence"]=true;dojo.provide("dojox.lang.functional.sequence");(function(){var d=dojo,df=dojox.lang.functional;d.mixin(df,{repeat:function(n,f,z,o){o=o||d.global;f=df.lambda(f);var t=new Array(n),i=1;t[0]=z;for(;i<n;t[i]=z=f.call(o,z),++i){}return t;},until:function(pr,f,z,o){o=o||d.global;f=df.lambda(f);pr=df.lambda(pr);var t=[];for(;!pr.call(o,z);t.push(z),z=f.call(o,z)){}return t;}});})();}if(!dojo._hasResource["dojox.charting.plot2d.Stacked"]){dojo._hasResource["dojox.charting.plot2d.Stacked"]=true;dojo.provide("dojox.charting.plot2d.Stacked");(function(){var df=dojox.lang.functional,dc=dojox.charting.plot2d.common,_225=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.Stacked",dojox.charting.plot2d.Default,{calculateAxes:function(dim){var _226=dc.collectStackedStats(this.series);this._maxRunLength=_226.hmax;this._calc(dim,_226);return this;},render:function(dim,_227){if(this._maxRunLength<=0){return this;}var acc=df.repeat(this._maxRunLength,"-> 0",0);for(var i=0;i<this.series.length;++i){var run=this.series[i];for(var j=0;j<run.data.length;++j){var v=run.data[j];if(isNaN(v)){v=0;}acc[j]+=v;}}this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_225);this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,_228,_229,_22a,_22b,_22c=this.events(),ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler);this.resetEvents();for(var i=this.series.length-1;i>=0;--i){var run=this.series[i];if(!this.dirty&&!run.dirty){continue;}run.cleanGroup();var s=run.group,_22d=dojo.map(acc,function(v,i){return {x:ht(i+1)+_227.l,y:dim.height-_227.b-vt(v)};},this);if(!run.fill||!run.stroke){_22a=new dojo.Color(t.next("color"));}var _22e=this.opt.tension?dc.curve(_22d,this.opt.tension):"";if(this.opt.areas){var _22f=dojo.clone(_22d);var fill=run.fill?run.fill:dc.augmentFill(t.series.fill,_22a);if(this.opt.tension){var p=dc.curve(_22f,this.opt.tension);p+=" L"+_22d[_22d.length-1].x+","+(dim.height-_227.b)+" L"+_22d[0].x+","+(dim.height-_227.b)+" L"+_22d[0].x+","+_22d[0].y;run.dyn.fill=s.createPath(p).setFill(fill).getFill();}else{_22f.push({x:_22d[_22d.length-1].x,y:dim.height-_227.b});_22f.push({x:_22d[0].x,y:dim.height-_227.b});_22f.push(_22d[0]);run.dyn.fill=s.createPolyline(_22f).setFill(fill).getFill();}}if(this.opt.lines||this.opt.markers){_228=run.stroke?dc.makeStroke(run.stroke):dc.augmentStroke(t.series.stroke,_22a);if(run.outline||t.series.outline){_229=dc.makeStroke(run.outline?run.outline:t.series.outline);_229.width=2*_229.width+_228.width;}}if(this.opt.markers){_22b=run.dyn.marker=run.marker?run.marker:t.next("marker");}var _230,_231,_232;if(this.opt.shadows&&_228){var sh=this.opt.shadows,_233=new dojo.Color([0,0,0,0.3]),_234=dojo.map(_22d,function(c){return {x:c.x+sh.dx,y:c.y+sh.dy};}),_235=dojo.clone(_229?_229:_228);_235.color=_233;_235.width+=sh.dw?sh.dw:0;if(this.opt.lines){if(this.opt.tension){run.dyn.shadow=s.createPath(dc.curve(_234,this.opt.tension)).setStroke(_235).getStroke();}else{run.dyn.shadow=s.createPolyline(_234).setStroke(_235).getStroke();}}if(this.opt.markers){_232=dojo.map(_234,function(c){return s.createPath("M"+c.x+" "+c.y+" "+_22b).setStroke(_235).setFill(_233);},this);}}if(this.opt.lines){if(_229){if(this.opt.tension){run.dyn.outline=s.createPath(_22e).setStroke(_229).getStroke();}else{run.dyn.outline=s.createPolyline(_22d).setStroke(_229).getStroke();}}if(this.opt.tension){run.dyn.stroke=s.createPath(_22e).setStroke(_228).getStroke();}else{run.dyn.stroke=s.createPolyline(_22d).setStroke(_228).getStroke();}}if(this.opt.markers){_230=new Array(_22d.length);_231=new Array(_22d.length);dojo.forEach(_22d,function(c,i){var path="M"+c.x+" "+c.y+" "+_22b;if(_229){_231[i]=s.createPath(path).setStroke(_229);}_230[i]=s.createPath(path).setStroke(_228).setFill(_228.color);},this);if(_22c){dojo.forEach(_230,function(s,i){var o={element:"marker",index:i,run:run,plot:this,hAxis:this.hAxis||null,vAxis:this.vAxis||null,shape:s,outline:_231[i]||null,shadow:_232&&_232[i]||null,cx:_22d[i].x,cy:_22d[i].y,x:i+1,y:run.data[i]};this._connectEvents(s,o);},this);}}run.dirty=false;for(var j=0;j<run.data.length;++j){var v=run.data[j];if(isNaN(v)){v=0;}acc[j]-=v;}}this.dirty=false;return this;}});})();}if(!dojo._hasResource["dojox.charting.plot2d.StackedLines"]){dojo._hasResource["dojox.charting.plot2d.StackedLines"]=true;dojo.provide("dojox.charting.plot2d.StackedLines");dojo.declare("dojox.charting.plot2d.StackedLines",dojox.charting.plot2d.Stacked,{constructor:function(){this.opt.lines=true;}});}if(!dojo._hasResource["dojox.charting.plot2d.StackedAreas"]){dojo._hasResource["dojox.charting.plot2d.StackedAreas"]=true;dojo.provide("dojox.charting.plot2d.StackedAreas");dojo.declare("dojox.charting.plot2d.StackedAreas",dojox.charting.plot2d.Stacked,{constructor:function(){this.opt.lines=true;this.opt.areas=true;}});}if(!dojo._hasResource["dojox.gfx.fx"]){dojo._hasResource["dojox.gfx.fx"]=true;dojo.provide("dojox.gfx.fx");(function(){var d=dojo,g=dojox.gfx,m=g.matrix;var _236=function(_237,end){this.start=_237,this.end=end;};d.extend(_236,{getValue:function(r){return (this.end-this.start)*r+this.start;}});var _238=function(_239,end,_23a){this.start=_239,this.end=end;this.units=_23a;};d.extend(_238,{getValue:function(r){return (this.end-this.start)*r+this.start+this.units;}});var _23b=function(_23c,end){this.start=_23c,this.end=end;this.temp=new dojo.Color();};d.extend(_23b,{getValue:function(r){return d.blendColors(this.start,this.end,r,this.temp);}});var _23d=function(_23e){this.values=_23e;this.length=_23e.length;};d.extend(_23d,{getValue:function(r){return this.values[Math.min(Math.floor(r*this.length),this.length-1)];}});var _23f=function(_240,def){this.values=_240;this.def=def?def:{};};d.extend(_23f,{getValue:function(r){var ret=dojo.clone(this.def);for(var i in this.values){ret[i]=this.values[i].getValue(r);}return ret;}});var _241=function(_242,_243){this.stack=_242;this.original=_243;};d.extend(_241,{getValue:function(r){var ret=[];dojo.forEach(this.stack,function(t){if(t instanceof m.Matrix2D){ret.push(t);return;}if(t.name=="original"&&this.original){ret.push(this.original);return;}if(!(t.name in m)){return;}var f=m[t.name];if(typeof f!="function"){ret.push(f);return;}var val=dojo.map(t.start,function(v,i){return (t.end[i]-v)*r+v;}),_244=f.apply(m,val);if(_244 instanceof m.Matrix2D){ret.push(_244);}},this);return ret;}});var _245=new d.Color(0,0,0,0);var _246=function(prop,obj,name,def){if(prop.values){return new _23d(prop.values);}var _247,_248,end;if(prop.start){_248=g.normalizeColor(prop.start);}else{_248=_247=obj?(name?obj[name]:obj):def;}if(prop.end){end=g.normalizeColor(prop.end);}else{if(!_247){_247=obj?(name?obj[name]:obj):def;}end=_247;}return new _23b(_248,end);};var _249=function(prop,obj,name,def){if(prop.values){return new _23d(prop.values);}var _24a,_24b,end;if(prop.start){_24b=prop.start;}else{_24b=_24a=obj?obj[name]:def;}if(prop.end){end=prop.end;}else{if(typeof _24a!="number"){_24a=obj?obj[name]:def;}end=_24a;}return new _236(_24b,end);};g.fx.animateStroke=function(args){if(!args.easing){args.easing=d._defaultEasing;}var anim=new d.Animation(args),_24c=args.shape,_24d;d.connect(anim,"beforeBegin",anim,function(){_24d=_24c.getStroke();var prop=args.color,_24e={},_24f,_250,end;if(prop){_24e.color=_246(prop,_24d,"color",_245);}prop=args.style;if(prop&&prop.values){_24e.style=new _23d(prop.values);}prop=args.width;if(prop){_24e.width=_249(prop,_24d,"width",1);}prop=args.cap;if(prop&&prop.values){_24e.cap=new _23d(prop.values);}prop=args.join;if(prop){if(prop.values){_24e.join=new _23d(prop.values);}else{_250=prop.start?prop.start:(_24d&&_24d.join||0);end=prop.end?prop.end:(_24d&&_24d.join||0);if(typeof _250=="number"&&typeof end=="number"){_24e.join=new _236(_250,end);}}}this.curve=new _23f(_24e,_24d);});d.connect(anim,"onAnimate",_24c,"setStroke");return anim;};g.fx.animateFill=function(args){if(!args.easing){args.easing=d._defaultEasing;}var anim=new d.Animation(args),_251=args.shape,fill;d.connect(anim,"beforeBegin",anim,function(){fill=_251.getFill();var prop=args.color,_252={};if(prop){this.curve=_246(prop,fill,"",_245);}});d.connect(anim,"onAnimate",_251,"setFill");return anim;};g.fx.animateFont=function(args){if(!args.easing){args.easing=d._defaultEasing;}var anim=new d.Animation(args),_253=args.shape,font;d.connect(anim,"beforeBegin",anim,function(){font=_253.getFont();var prop=args.style,_254={},_255,_256,end;if(prop&&prop.values){_254.style=new _23d(prop.values);}prop=args.variant;if(prop&&prop.values){_254.variant=new _23d(prop.values);}prop=args.weight;if(prop&&prop.values){_254.weight=new _23d(prop.values);}prop=args.family;if(prop&&prop.values){_254.family=new _23d(prop.values);}prop=args.size;if(prop&&prop.units){_256=parseFloat(prop.start?prop.start:(_253.font&&_253.font.size||"0"));end=parseFloat(prop.end?prop.end:(_253.font&&_253.font.size||"0"));_254.size=new _238(_256,end,prop.units);}this.curve=new _23f(_254,font);});d.connect(anim,"onAnimate",_253,"setFont");return anim;};g.fx.animateTransform=function(args){if(!args.easing){args.easing=d._defaultEasing;}var anim=new d.Animation(args),_257=args.shape,_258;d.connect(anim,"beforeBegin",anim,function(){_258=_257.getTransform();this.curve=new _241(args.transform,_258);});d.connect(anim,"onAnimate",_257,"setTransform");return anim;};})();}if(!dojo._hasResource["dojox.charting.plot2d.Columns"]){dojo._hasResource["dojox.charting.plot2d.Columns"]=true;dojo.provide("dojox.charting.plot2d.Columns");(function(){var df=dojox.lang.functional,du=dojox.lang.utils,dc=dojox.charting.plot2d.common,_259=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.Columns",dojox.charting.plot2d.Base,{defaultParams:{hAxis:"x",vAxis:"y",gap:0,shadows:null,animate:null},optionalParams:{minBarSize:1,maxBarSize:1},constructor:function(_25a,_25b){this.opt=dojo.clone(this.defaultParams);du.updateWithObject(this.opt,_25b);du.updateWithPattern(this.opt,_25b,this.optionalParams);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;this.animate=this.opt.animate;},calculateAxes:function(dim){var _25c=dc.collectSimpleStats(this.series);_25c.hmin-=0.5;_25c.hmax+=0.5;this._calc(dim,_25c);return this;},render:function(dim,_25d){this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_259);this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,_25e,_25f,fill,f,gap,_260,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_261=Math.max(0,this._vScaler.bounds.lower),_262=vt(_261),_263=this.events();f=dc.calculateBarSize(this._hScaler.bounds.scale,this.opt);gap=f.gap;_260=f.size;this.resetEvents();for(var i=this.series.length-1;i>=0;--i){var run=this.series[i];if(!this.dirty&&!run.dirty){continue;}run.cleanGroup();var s=run.group;if(!run.fill||!run.stroke){_25e=run.dyn.color=new dojo.Color(t.next("color"));}_25f=run.stroke?run.stroke:dc.augmentStroke(t.series.stroke,_25e);fill=run.fill?run.fill:dc.augmentFill(t.series.fill,_25e);for(var j=0;j<run.data.length;++j){var _264=run.data[j],v=typeof _264=="number"?_264:_264.y,vv=vt(v),_265=vv-_262,h=Math.abs(_265),_266=_25e,_267=fill,_268=_25f;if(typeof _264!="number"){if(_264.color){_266=new dojo.Color(_264.color);}if("fill" in _264){_267=_264.fill;}else{if(_264.color){_267=dc.augmentFill(t.series.fill,_266);}}if("stroke" in _264){_268=_264.stroke;}else{if(_264.color){_268=dc.augmentStroke(t.series.stroke,_266);}}}if(_260>=1&&h>=1){var _269=s.createRect({x:_25d.l+ht(j+0.5)+gap,y:dim.height-_25d.b-(v>_261?vv:_262),width:_260,height:h}).setFill(_267).setStroke(_268);run.dyn.fill=_269.getFill();run.dyn.stroke=_269.getStroke();if(_263){var o={element:"column",index:j,run:run,plot:this,hAxis:this.hAxis||null,vAxis:this.vAxis||null,shape:_269,x:j+0.5,y:v};this._connectEvents(_269,o);}if(this.animate){this._animateColumn(_269,dim.height-_25d.b-_262,h);}}}run.dirty=false;}this.dirty=false;return this;},_animateColumn:function(_26a,_26b,_26c){dojox.gfx.fx.animateTransform(dojo.delegate({shape:_26a,duration:1200,transform:[{name:"translate",start:[0,_26b-(_26b/_26c)],end:[0,0]},{name:"scale",start:[1,1/_26c],end:[1,1]},{name:"original"}]},this.animate)).play();}});})();}if(!dojo._hasResource["dojox.charting.plot2d.StackedColumns"]){dojo._hasResource["dojox.charting.plot2d.StackedColumns"]=true;dojo.provide("dojox.charting.plot2d.StackedColumns");(function(){var df=dojox.lang.functional,dc=dojox.charting.plot2d.common,_26d=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.StackedColumns",dojox.charting.plot2d.Columns,{calculateAxes:function(dim){var _26e=dc.collectStackedStats(this.series);this._maxRunLength=_26e.hmax;_26e.hmin-=0.5;_26e.hmax+=0.5;this._calc(dim,_26e);return this;},render:function(dim,_26f){if(this._maxRunLength<=0){return this;}var acc=df.repeat(this._maxRunLength,"-> 0",0);for(var i=0;i<this.series.length;++i){var run=this.series[i];for(var j=0;j<run.data.length;++j){var _270=run.data[j],v=typeof _270=="number"?_270:_270.y;if(isNaN(v)){v=0;}acc[j]+=v;}}this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_26d);this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,_271,_272,fill,f,gap,_273,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_274=this.events();f=dc.calculateBarSize(this._hScaler.bounds.scale,this.opt);gap=f.gap;_273=f.size;this.resetEvents();for(var i=this.series.length-1;i>=0;--i){var run=this.series[i];if(!this.dirty&&!run.dirty){continue;}run.cleanGroup();var s=run.group;if(!run.fill||!run.stroke){_271=run.dyn.color=new dojo.Color(t.next("color"));}_272=run.stroke?run.stroke:dc.augmentStroke(t.series.stroke,_271);fill=run.fill?run.fill:dc.augmentFill(t.series.fill,_271);for(var j=0;j<acc.length;++j){var v=acc[j],_275=vt(v),_270=run.data[j],_276=_271,_277=fill,_278=_272;if(typeof _270!="number"){if(_270.color){_276=new dojo.Color(_270.color);}if("fill" in _270){_277=_270.fill;}else{if(_270.color){_277=dc.augmentFill(t.series.fill,_276);}}if("stroke" in _270){_278=_270.stroke;}else{if(_270.color){_278=dc.augmentStroke(t.series.stroke,_276);}}}if(_273>=1&&_275>=1){var _279=s.createRect({x:_26f.l+ht(j+0.5)+gap,y:dim.height-_26f.b-vt(v),width:_273,height:_275}).setFill(_277).setStroke(_278);run.dyn.fill=_279.getFill();run.dyn.stroke=_279.getStroke();if(_274){var o={element:"column",index:j,run:run,plot:this,hAxis:this.hAxis||null,vAxis:this.vAxis||null,shape:_279,x:j+0.5,y:v};this._connectEvents(_279,o);}if(this.animate){this._animateColumn(_279,dim.height-_26f.b,_275);}}}run.dirty=false;for(var j=0;j<run.data.length;++j){var _270=run.data[j],v=typeof _270=="number"?_270:_270.y;if(isNaN(v)){v=0;}acc[j]-=v;}}this.dirty=false;return this;}});})();}if(!dojo._hasResource["dojox.charting.plot2d.ClusteredColumns"]){dojo._hasResource["dojox.charting.plot2d.ClusteredColumns"]=true;dojo.provide("dojox.charting.plot2d.ClusteredColumns");(function(){var df=dojox.lang.functional,dc=dojox.charting.plot2d.common,_27a=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.ClusteredColumns",dojox.charting.plot2d.Columns,{render:function(dim,_27b){this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_27a);this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,_27c,_27d,fill,f,gap,_27e,_27f,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_280=Math.max(0,this._vScaler.bounds.lower),_281=vt(_280),_282=this.events();f=dc.calculateBarSize(this._hScaler.bounds.scale,this.opt,this.series.length);gap=f.gap;_27e=_27f=f.size;this.resetEvents();for(var i=0;i<this.series.length;++i){var run=this.series[i],_283=_27f*i;if(!this.dirty&&!run.dirty){continue;}run.cleanGroup();var s=run.group;if(!run.fill||!run.stroke){_27c=run.dyn.color=new dojo.Color(t.next("color"));}_27d=run.stroke?run.stroke:dc.augmentStroke(t.series.stroke,_27c);fill=run.fill?run.fill:dc.augmentFill(t.series.fill,_27c);for(var j=0;j<run.data.length;++j){var _284=run.data[j],v=typeof _284=="number"?_284:_284.y,vv=vt(v),_285=vv-_281,h=Math.abs(_285),_286=_27c,_287=fill,_288=_27d;if(typeof _284!="number"){if(_284.color){_286=new dojo.Color(_284.color);}if("fill" in _284){_287=_284.fill;}else{if(_284.color){_287=dc.augmentFill(t.series.fill,_286);}}if("stroke" in _284){_288=_284.stroke;}else{if(_284.color){_288=dc.augmentStroke(t.series.stroke,_286);}}}if(_27e>=1&&h>=1){var _289=s.createRect({x:_27b.l+ht(j+0.5)+gap+_283,y:dim.height-_27b.b-(v>_280?vv:_281),width:_27e,height:h}).setFill(_287).setStroke(_288);run.dyn.fill=_289.getFill();run.dyn.stroke=_289.getStroke();if(_282){var o={element:"column",index:j,run:run,plot:this,hAxis:this.hAxis||null,vAxis:this.vAxis||null,shape:_289,x:j+0.5,y:v};this._connectEvents(_289,o);}if(this.animate){this._animateColumn(_289,dim.height-_27b.b-_281,h);}}}run.dirty=false;}this.dirty=false;return this;}});})();}if(!dojo._hasResource["dojox.charting.plot2d.Bars"]){dojo._hasResource["dojox.charting.plot2d.Bars"]=true;dojo.provide("dojox.charting.plot2d.Bars");(function(){var df=dojox.lang.functional,du=dojox.lang.utils,dc=dojox.charting.plot2d.common,_28a=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.Bars",dojox.charting.plot2d.Base,{defaultParams:{hAxis:"x",vAxis:"y",gap:0,shadows:null,animate:null},optionalParams:{minBarSize:1,maxBarSize:1},constructor:function(_28b,_28c){this.opt=dojo.clone(this.defaultParams);du.updateWithObject(this.opt,_28c);du.updateWithPattern(this.opt,_28c,this.optionalParams);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;this.animate=this.opt.animate;},calculateAxes:function(dim){var _28d=dc.collectSimpleStats(this.series),t;_28d.hmin-=0.5;_28d.hmax+=0.5;t=_28d.hmin,_28d.hmin=_28d.vmin,_28d.vmin=t;t=_28d.hmax,_28d.hmax=_28d.vmax,_28d.vmax=t;this._calc(dim,_28d);return this;},render:function(dim,_28e){this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_28a);this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,_28f,_290,fill,f,gap,_291,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_292=Math.max(0,this._hScaler.bounds.lower),_293=ht(_292),_294=this.events();f=dc.calculateBarSize(this._vScaler.bounds.scale,this.opt);gap=f.gap;_291=f.size;this.resetEvents();for(var i=this.series.length-1;i>=0;--i){var run=this.series[i];if(!this.dirty&&!run.dirty){continue;}run.cleanGroup();var s=run.group;if(!run.fill||!run.stroke){_28f=run.dyn.color=new dojo.Color(t.next("color"));}_290=run.stroke?run.stroke:dc.augmentStroke(t.series.stroke,_28f);fill=run.fill?run.fill:dc.augmentFill(t.series.fill,_28f);for(var j=0;j<run.data.length;++j){var _295=run.data[j],v=typeof _295=="number"?_295:_295.y,hv=ht(v),_296=hv-_293,w=Math.abs(_296),_297=_28f,_298=fill,_299=_290;if(typeof _295!="number"){if(_295.color){_297=new dojo.Color(_295.color);}if("fill" in _295){_298=_295.fill;}else{if(_295.color){_298=dc.augmentFill(t.series.fill,_297);}}if("stroke" in _295){_299=_295.stroke;}else{if(_295.color){_299=dc.augmentStroke(t.series.stroke,_297);}}}if(w>=1&&_291>=1){var _29a=s.createRect({x:_28e.l+(v<_292?hv:_293),y:dim.height-_28e.b-vt(j+1.5)+gap,width:w,height:_291}).setFill(_298).setStroke(_299);run.dyn.fill=_29a.getFill();run.dyn.stroke=_29a.getStroke();if(_294){var o={element:"bar",index:j,run:run,plot:this,hAxis:this.hAxis||null,vAxis:this.vAxis||null,shape:_29a,x:v,y:j+1.5};this._connectEvents(_29a,o);}if(this.animate){this._animateBar(_29a,_28e.l+_293,-w);}}}run.dirty=false;}this.dirty=false;return this;},_animateBar:function(_29b,_29c,_29d){dojox.gfx.fx.animateTransform(dojo.delegate({shape:_29b,duration:1200,transform:[{name:"translate",start:[_29c-(_29c/_29d),0],end:[0,0]},{name:"scale",start:[1/_29d,1],end:[1,1]},{name:"original"}]},this.animate)).play();}});})();}if(!dojo._hasResource["dojox.charting.plot2d.StackedBars"]){dojo._hasResource["dojox.charting.plot2d.StackedBars"]=true;dojo.provide("dojox.charting.plot2d.StackedBars");(function(){var df=dojox.lang.functional,dc=dojox.charting.plot2d.common,_29e=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.StackedBars",dojox.charting.plot2d.Bars,{calculateAxes:function(dim){var _29f=dc.collectStackedStats(this.series),t;this._maxRunLength=_29f.hmax;_29f.hmin-=0.5;_29f.hmax+=0.5;t=_29f.hmin,_29f.hmin=_29f.vmin,_29f.vmin=t;t=_29f.hmax,_29f.hmax=_29f.vmax,_29f.vmax=t;this._calc(dim,_29f);return this;},render:function(dim,_2a0){if(this._maxRunLength<=0){return this;}var acc=df.repeat(this._maxRunLength,"-> 0",0);for(var i=0;i<this.series.length;++i){var run=this.series[i];for(var j=0;j<run.data.length;++j){var _2a1=run.data[j],v=typeof _2a1=="number"?_2a1:_2a1.y;if(isNaN(v)){v=0;}acc[j]+=v;}}this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_29e);this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,_2a2,_2a3,fill,f,gap,_2a4,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_2a5=this.events();f=dc.calculateBarSize(this._vScaler.bounds.scale,this.opt);gap=f.gap;_2a4=f.size;this.resetEvents();for(var i=this.series.length-1;i>=0;--i){var run=this.series[i];if(!this.dirty&&!run.dirty){continue;}run.cleanGroup();var s=run.group;if(!run.fill||!run.stroke){_2a2=run.dyn.color=new dojo.Color(t.next("color"));}_2a3=run.stroke?run.stroke:dc.augmentStroke(t.series.stroke,_2a2);fill=run.fill?run.fill:dc.augmentFill(t.series.fill,_2a2);for(var j=0;j<acc.length;++j){var v=acc[j],_2a6=ht(v),_2a1=run.data[j],_2a7=_2a2,_2a8=fill,_2a9=_2a3;if(typeof _2a1!="number"){if(_2a1.color){_2a7=new dojo.Color(_2a1.color);}if("fill" in _2a1){_2a8=_2a1.fill;}else{if(_2a1.color){_2a8=dc.augmentFill(t.series.fill,_2a7);}}if("stroke" in _2a1){_2a9=_2a1.stroke;}else{if(_2a1.color){_2a9=dc.augmentStroke(t.series.stroke,_2a7);}}}if(_2a6>=1&&_2a4>=1){var _2aa=s.createRect({x:_2a0.l,y:dim.height-_2a0.b-vt(j+1.5)+gap,width:_2a6,height:_2a4}).setFill(_2a8).setStroke(_2a9);run.dyn.fill=_2aa.getFill();run.dyn.stroke=_2aa.getStroke();if(_2a5){var o={element:"bar",index:j,run:run,plot:this,hAxis:this.hAxis||null,vAxis:this.vAxis||null,shape:_2aa,x:v,y:j+1.5};this._connectEvents(_2aa,o);}if(this.animate){this._animateBar(_2aa,_2a0.l,-_2a6);}}}run.dirty=false;for(var j=0;j<run.data.length;++j){var _2a1=run.data[j],v=typeof _2a1=="number"?_2a1:_2a1.y;if(isNaN(v)){v=0;}acc[j]-=v;}}this.dirty=false;return this;}});})();}if(!dojo._hasResource["dojox.charting.plot2d.ClusteredBars"]){dojo._hasResource["dojox.charting.plot2d.ClusteredBars"]=true;dojo.provide("dojox.charting.plot2d.ClusteredBars");(function(){var df=dojox.lang.functional,dc=dojox.charting.plot2d.common,_2ab=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.ClusteredBars",dojox.charting.plot2d.Bars,{render:function(dim,_2ac){this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_2ab);this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,_2ad,_2ae,fill,f,gap,_2af,_2b0,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_2b1=Math.max(0,this._hScaler.bounds.lower),_2b2=ht(_2b1),_2b3=this.events();f=dc.calculateBarSize(this._vScaler.bounds.scale,this.opt,this.series.length);gap=f.gap;_2af=_2b0=f.size;this.resetEvents();for(var i=this.series.length-1;i>=0;--i){var run=this.series[i],_2b4=_2b0*(this.series.length-i-1);if(!this.dirty&&!run.dirty){continue;}run.cleanGroup();var s=run.group;if(!run.fill||!run.stroke){_2ad=run.dyn.color=new dojo.Color(t.next("color"));}_2ae=run.stroke?run.stroke:dc.augmentStroke(t.series.stroke,_2ad);fill=run.fill?run.fill:dc.augmentFill(t.series.fill,_2ad);for(var j=0;j<run.data.length;++j){var _2b5=run.data[j],v=typeof _2b5=="number"?_2b5:_2b5.y,hv=ht(v),_2b6=hv-_2b2,w=Math.abs(_2b6),_2b7=_2ad,_2b8=fill,_2b9=_2ae;if(typeof _2b5!="number"){if(_2b5.color){_2b7=new dojo.Color(_2b5.color);}if("fill" in _2b5){_2b8=_2b5.fill;}else{if(_2b5.color){_2b8=dc.augmentFill(t.series.fill,_2b7);}}if("stroke" in _2b5){_2b9=_2b5.stroke;}else{if(_2b5.color){_2b9=dc.augmentStroke(t.series.stroke,_2b7);}}}if(w>=1&&_2af>=1){var _2ba=s.createRect({x:_2ac.l+(v<_2b1?hv:_2b2),y:dim.height-_2ac.b-vt(j+1.5)+gap+_2b4,width:w,height:_2af}).setFill(_2b8).setStroke(_2b9);run.dyn.fill=_2ba.getFill();run.dyn.stroke=_2ba.getStroke();if(_2b3){var o={element:"bar",index:j,run:run,plot:this,hAxis:this.hAxis||null,vAxis:this.vAxis||null,shape:_2ba,x:v,y:j+1.5};this._connectEvents(_2ba,o);}if(this.animate){this._animateBar(_2ba,_2ac.l+_2b2,-_2b6);}}}run.dirty=false;}this.dirty=false;return this;}});})();}if(!dojo._hasResource["dojox.charting.plot2d.Grid"]){dojo._hasResource["dojox.charting.plot2d.Grid"]=true;dojo.provide("dojox.charting.plot2d.Grid");(function(){var du=dojox.lang.utils;dojo.declare("dojox.charting.plot2d.Grid",dojox.charting.Element,{defaultParams:{hAxis:"x",vAxis:"y",hMajorLines:true,hMinorLines:false,vMajorLines:true,vMinorLines:false,hStripes:"none",vStripes:"none"},optionalParams:{},constructor:function(_2bb,_2bc){this.opt=dojo.clone(this.defaultParams);du.updateWithObject(this.opt,_2bc);this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;this.dirty=true;},clear:function(){this._hAxis=null;this._vAxis=null;this.dirty=true;return this;},setAxis:function(axis){if(axis){this[axis.vertical?"_vAxis":"_hAxis"]=axis;}return this;},addSeries:function(run){return this;},calculateAxes:function(dim){return this;},isDirty:function(){return this.dirty||this._hAxis&&this._hAxis.dirty||this._vAxis&&this._vAxis.dirty;},getRequiredColors:function(){return 0;},render:function(dim,_2bd){this.dirty=this.isDirty();if(!this.dirty){return this;}this.cleanGroup();var s=this.group,ta=this.chart.theme.axis;try{var _2be=this._vAxis.getScaler(),vt=_2be.scaler.getTransformerFromModel(_2be),_2bf=this._vAxis.getTicks();if(this.opt.hMinorLines){dojo.forEach(_2bf.minor,function(tick){var y=dim.height-_2bd.b-vt(tick.value);s.createLine({x1:_2bd.l,y1:y,x2:dim.width-_2bd.r,y2:y}).setStroke(ta.minorTick);});}if(this.opt.hMajorLines){dojo.forEach(_2bf.major,function(tick){var y=dim.height-_2bd.b-vt(tick.value);s.createLine({x1:_2bd.l,y1:y,x2:dim.width-_2bd.r,y2:y}).setStroke(ta.majorTick);});}}catch(e){}try{var _2c0=this._hAxis.getScaler(),ht=_2c0.scaler.getTransformerFromModel(_2c0),_2bf=this._hAxis.getTicks();if(_2bf&&this.opt.vMinorLines){dojo.forEach(_2bf.minor,function(tick){var x=_2bd.l+ht(tick.value);s.createLine({x1:x,y1:_2bd.t,x2:x,y2:dim.height-_2bd.b}).setStroke(ta.minorTick);});}if(_2bf&&this.opt.vMajorLines){dojo.forEach(_2bf.major,function(tick){var x=_2bd.l+ht(tick.value);s.createLine({x1:x,y1:_2bd.t,x2:x,y2:dim.height-_2bd.b}).setStroke(ta.majorTick);});}}catch(e){}this.dirty=false;return this;}});})();}if(!dojo._hasResource["dojox.charting.plot2d.Pie"]){dojo._hasResource["dojox.charting.plot2d.Pie"]=true;dojo.provide("dojox.charting.plot2d.Pie");(function(){var df=dojox.lang.functional,du=dojox.lang.utils,dc=dojox.charting.plot2d.common,da=dojox.charting.axis2d.common,g=dojox.gfx;dojo.declare("dojox.charting.plot2d.Pie",dojox.charting.Element,{defaultParams:{labels:true,ticks:false,fixed:true,precision:1,labelOffset:20,labelStyle:"default",htmlLabels:true},optionalParams:{font:"",fontColor:"",radius:0},constructor:function(_2c1,_2c2){this.opt=dojo.clone(this.defaultParams);du.updateWithObject(this.opt,_2c2);du.updateWithPattern(this.opt,_2c2,this.optionalParams);this.run=null;this.dyn=[];},destroy:function(){this.resetEvents();this.inherited(arguments);},clear:function(){this.dirty=true;this.dyn=[];this.run=null;return this;},setAxis:function(axis){return this;},addSeries:function(run){this.run=run;return this;},calculateAxes:function(dim){return this;},getRequiredColors:function(){return this.run?this.run.data.length:0;},plotEvent:function(o){},connect:function(_2c3,_2c4){this.dirty=true;return dojo.connect(this,"plotEvent",_2c3,_2c4);},events:function(){var ls=this.plotEvent._listeners;if(!ls||!ls.length){return false;}for(var i in ls){if(!(i in Array.prototype)){return true;}}return false;},resetEvents:function(){this.plotEvent({type:"onplotreset",plot:this});},_connectEvents:function(_2c5,o){_2c5.connect("onmouseover",this,function(e){o.type="onmouseover";o.event=e;this.plotEvent(o);});_2c5.connect("onmouseout",this,function(e){o.type="onmouseout";o.event=e;this.plotEvent(o);});_2c5.connect("onclick",this,function(e){o.type="onclick";o.event=e;this.plotEvent(o);});},render:function(dim,_2c6){if(!this.dirty){return this;}this.dirty=false;this.cleanGroup();var s=this.group,_2c7,t=this.chart.theme;this.resetEvents();if(!this.run||!this.run.data.length){return this;}var rx=(dim.width-_2c6.l-_2c6.r)/2,ry=(dim.height-_2c6.t-_2c6.b)/2,r=Math.min(rx,ry),_2c8="font" in this.opt?this.opt.font:t.axis.font,size=_2c8?g.normalizedLength(g.splitFontString(_2c8).size):0,_2c9="fontColor" in this.opt?this.opt.fontColor:t.axis.fontColor,_2ca=0,step,_2cb,_2cc,_2cd,_2ce,_2cf,run=this.run.data,_2d0=this.events();if(typeof run[0]=="number"){_2cb=df.map(run,"Math.max(x, 0)");if(df.every(_2cb,"<= 0")){return this;}_2cc=df.map(_2cb,"/this",df.foldl(_2cb,"+",0));if(this.opt.labels){_2cd=dojo.map(_2cc,function(x){return x>0?this._getLabel(x*100)+"%":"";},this);}}else{_2cb=df.map(run,"Math.max(x.y, 0)");if(df.every(_2cb,"<= 0")){return this;}_2cc=df.map(_2cb,"/this",df.foldl(_2cb,"+",0));if(this.opt.labels){_2cd=dojo.map(_2cc,function(x,i){if(x<=0){return "";}var v=run[i];return "text" in v?v.text:this._getLabel(x*100)+"%";},this);}}if(this.opt.labels){_2ce=df.foldl1(df.map(_2cd,function(_2d1){return dojox.gfx._base._getTextBox(_2d1,{font:_2c8}).w;},this),"Math.max(a, b)")/2;if(this.opt.labelOffset<0){r=Math.min(rx-2*_2ce,ry-size)+this.opt.labelOffset;}_2cf=r-this.opt.labelOffset;}if("radius" in this.opt){r=this.opt.radius;_2cf=r-this.opt.labelOffset;}var _2d2={cx:_2c6.l+rx,cy:_2c6.t+ry,r:r};this.dyn=[];dojo.some(_2cc,function(_2d3,i){if(_2d3<=0){return false;}var v=run[i];if(_2d3>=1){var _2d4,fill,_2d5;if(typeof v=="object"){_2d4="color" in v?v.color:new dojo.Color(t.next("color"));fill="fill" in v?v.fill:dc.augmentFill(t.series.fill,_2d4);_2d5="stroke" in v?v.stroke:dc.augmentStroke(t.series.stroke,_2d4);}else{_2d4=new dojo.Color(t.next("color"));fill=dc.augmentFill(t.series.fill,_2d4);_2d5=dc.augmentStroke(t.series.stroke,_2d4);}var _2d6=s.createCircle(_2d2).setFill(fill).setStroke(_2d5);this.dyn.push({color:_2d4,fill:fill,stroke:_2d5});if(_2d0){var o={element:"slice",index:i,run:this.run,plot:this,shape:_2d6,x:i,y:typeof v=="number"?v:v.y,cx:_2d2.cx,cy:_2d2.cy,cr:r};this._connectEvents(_2d6,o);}return true;}var end=_2ca+_2d3*2*Math.PI;if(i+1==_2cc.length){end=2*Math.PI;}var step=end-_2ca,x1=_2d2.cx+r*Math.cos(_2ca),y1=_2d2.cy+r*Math.sin(_2ca),x2=_2d2.cx+r*Math.cos(end),y2=_2d2.cy+r*Math.sin(end);var _2d4,fill,_2d5;if(typeof v=="object"){_2d4="color" in v?v.color:new dojo.Color(t.next("color"));fill="fill" in v?v.fill:dc.augmentFill(t.series.fill,_2d4);_2d5="stroke" in v?v.stroke:dc.augmentStroke(t.series.stroke,_2d4);}else{_2d4=new dojo.Color(t.next("color"));fill=dc.augmentFill(t.series.fill,_2d4);_2d5=dc.augmentStroke(t.series.stroke,_2d4);}var _2d6=s.createPath({}).moveTo(_2d2.cx,_2d2.cy).lineTo(x1,y1).arcTo(r,r,0,step>Math.PI,true,x2,y2).lineTo(_2d2.cx,_2d2.cy).closePath().setFill(fill).setStroke(_2d5);this.dyn.push({color:_2d4,fill:fill,stroke:_2d5});if(_2d0){var o={element:"slice",index:i,run:this.run,plot:this,shape:_2d6,x:i,y:typeof v=="number"?v:v.y,cx:_2d2.cx,cy:_2d2.cy,cr:r};this._connectEvents(_2d6,o);}_2ca=end;return false;},this);if(this.opt.labels){_2ca=0;dojo.some(_2cc,function(_2d7,i){if(_2d7<=0){return false;}if(_2d7>=1){var v=run[i],elem=da.createText[this.opt.htmlLabels&&dojox.gfx.renderer!="vml"?"html":"gfx"](this.chart,s,_2d2.cx,_2d2.cy+size/2,"middle",_2cd[i],_2c8,(typeof v=="object"&&"fontColor" in v)?v.fontColor:_2c9);if(this.opt.htmlLabels){this.htmlElements.push(elem);}return true;}var end=_2ca+_2d7*2*Math.PI,v=run[i];if(i+1==_2cc.length){end=2*Math.PI;}var _2d8=(_2ca+end)/2,x=_2d2.cx+_2cf*Math.cos(_2d8),y=_2d2.cy+_2cf*Math.sin(_2d8)+size/2;var elem=da.createText[this.opt.htmlLabels&&dojox.gfx.renderer!="vml"?"html":"gfx"](this.chart,s,x,y,"middle",_2cd[i],_2c8,(typeof v=="object"&&"fontColor" in v)?v.fontColor:_2c9);if(this.opt.htmlLabels){this.htmlElements.push(elem);}_2ca=end;return false;},this);}return this;},_getLabel:function(_2d9){return this.opt.fixed?_2d9.toFixed(this.opt.precision):_2d9.toString();}});})();}if(!dojo._hasResource["dojox.charting.plot2d.Bubble"]){dojo._hasResource["dojox.charting.plot2d.Bubble"]=true;dojo.provide("dojox.charting.plot2d.Bubble");(function(){var df=dojox.lang.functional,du=dojox.lang.utils,dc=dojox.charting.plot2d.common,_2da=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.Bubble",dojox.charting.plot2d.Base,{defaultParams:{hAxis:"x",vAxis:"y"},optionalParams:{},constructor:function(_2db,_2dc){this.opt=dojo.clone(this.defaultParams);du.updateWithObject(this.opt,_2dc);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;},calculateAxes:function(dim){this._calc(dim,dc.collectSimpleStats(this.series));return this;},render:function(dim,_2dd){this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_2da);this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,_2de,_2df,_2e0,_2e1,_2e2,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_2e3=this.events();this.resetEvents();for(var i=this.series.length-1;i>=0;--i){var run=this.series[i];if(!this.dirty&&!run.dirty){continue;}run.cleanGroup();if(!run.data.length){run.dirty=false;continue;}if(typeof run.data[0]=="number"){console.warn("dojox.charting.plot2d.Bubble: the data in the following series cannot be rendered as a bubble chart; ",run);continue;}var s=run.group,_2e4=dojo.map(run.data,function(v,i){return {x:ht(v.x)+_2dd.l,y:dim.height-_2dd.b-vt(v.y),radius:this._vScaler.bounds.scale*(v.size/2)};},this);if(run.fill){_2e0=run.fill;}else{if(run.stroke){_2e0=run.stroke;}else{_2e0=run.dyn.color=new dojo.Color(t.next("color"));}}run.dyn.fill=_2e0;_2de=run.dyn.stroke=run.stroke?dc.makeStroke(run.stroke):dc.augmentStroke(t.series.stroke,_2e0);var _2e5=null,_2e6=null,_2e7=null;if(this.opt.shadows&&_2de){var sh=this.opt.shadows,_2e2=new dojo.Color([0,0,0,0.2]),_2e1=dojo.clone(_2df?_2df:_2de);_2e1.color=_2e2;_2e1.width+=sh.dw?sh.dw:0;run.dyn.shadow=_2e1;var _2e8=dojo.map(_2e4,function(item){var sh=this.opt.shadows;return s.createCircle({cx:item.x+sh.dx,cy:item.y+sh.dy,r:item.radius}).setStroke(_2e1).setFill(_2e2);},this);}if(run.outline||t.series.outline){_2df=dc.makeStroke(run.outline?run.outline:t.series.outline);_2df.width=2*_2df.width+_2de.width;run.dyn.outline=_2df;_2e6=dojo.map(_2e4,function(item){s.createCircle({cx:item.x,cy:item.y,r:item.radius}).setStroke(_2df);},this);}_2e5=dojo.map(_2e4,function(item){return s.createCircle({cx:item.x,cy:item.y,r:item.radius}).setStroke(_2de).setFill(_2e0);},this);if(_2e3){dojo.forEach(_2e5,function(s,i){var o={element:"circle",index:i,run:run,plot:this,hAxis:this.hAxis||null,vAxis:this.vAxis||null,shape:s,outline:_2e6&&_2e6[i]||null,shadow:_2e7&&_2e7[i]||null,x:run.data[i].x,y:run.data[i].y,r:run.data[i].size/2,cx:_2e4[i].x,cy:_2e4[i].y,cr:_2e4[i].radius};this._connectEvents(s,o);},this);}run.dirty=false;}this.dirty=false;return this;}});})();}if(!dojo._hasResource["dojox.charting.plot2d.Candlesticks"]){dojo._hasResource["dojox.charting.plot2d.Candlesticks"]=true;dojo.provide("dojox.charting.plot2d.Candlesticks");(function(){var df=dojox.lang.functional,du=dojox.lang.utils,dc=dojox.charting.plot2d.common,_2e9=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.Candlesticks",dojox.charting.plot2d.Base,{defaultParams:{hAxis:"x",vAxis:"y",gap:2,shadows:null},optionalParams:{minBarSize:1,maxBarSize:1},constructor:function(_2ea,_2eb){this.opt=dojo.clone(this.defaultParams);du.updateWithObject(this.opt,_2eb);du.updateWithPattern(this.opt,_2eb,this.optionalParams);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;},collectStats:function(_2ec){var _2ed=dojo.clone(dc.defaultStats);for(var i=0;i<_2ec.length;i++){var run=_2ec[i];if(!run.data.length){continue;}var _2ee=_2ed.vmin,_2ef=_2ed.vmax;if(!("ymin" in run)||!("ymax" in run)){dojo.forEach(run.data,function(val,idx){var x=val.x||idx+1;_2ed.hmin=Math.min(_2ed.hmin,x);_2ed.hmax=Math.max(_2ed.hmax,x);_2ed.vmin=Math.min(_2ed.vmin,val.open,val.close,val.high,val.low);_2ed.vmax=Math.max(_2ed.vmax,val.open,val.close,val.high,val.low);});}if("ymin" in run){_2ed.vmin=Math.min(_2ee,run.ymin);}if("ymax" in run){_2ed.vmax=Math.max(_2ef,run.ymax);}}return _2ed;},calculateAxes:function(dim){var _2f0=this.collectStats(this.series),t;_2f0.hmin-=0.5;_2f0.hmax+=0.5;this._calc(dim,_2f0);return this;},render:function(dim,_2f1){this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_2e9);this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,_2f2,_2f3,fill,f,gap,_2f4,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_2f5=Math.max(0,this._vScaler.bounds.lower),_2f6=vt(_2f5),_2f7=this.events();f=dc.calculateBarSize(this._hScaler.bounds.scale,this.opt);gap=f.gap;_2f4=f.size;this.resetEvents();for(var i=this.series.length-1;i>=0;--i){var run=this.series[i];if(!this.dirty&&!run.dirty){continue;}run.cleanGroup();var s=run.group;if(!run.fill||!run.stroke){_2f2=run.dyn.color=new dojo.Color(t.next("color"));}_2f3=run.stroke?run.stroke:dc.augmentStroke(t.series.stroke,_2f2);fill=run.fill?run.fill:dc.augmentFill(t.series.fill,_2f2);for(var j=0;j<run.data.length;++j){var v=run.data[j];var x=ht(v.x||(j+0.5))+_2f1.l+gap,y=dim.height-_2f1.b,open=vt(v.open),_2f8=vt(v.close),high=vt(v.high),low=vt(v.low);if("mid" in v){var mid=vt(v.mid);}if(low>high){var tmp=high;high=low;low=tmp;}if(_2f4>=1){var _2f9=open>_2f8;var line={x1:_2f4/2,x2:_2f4/2,y1:y-high,y2:y-low},rect={x:0,y:y-Math.max(open,_2f8),width:_2f4,height:Math.max(_2f9?open-_2f8:_2f8-open,1)};shape=s.createGroup();shape.setTransform({dx:x,dy:0});var _2fa=shape.createGroup();_2fa.createLine(line).setStroke(_2f3);_2fa.createRect(rect).setStroke(_2f3).setFill(_2f9?fill:"white");if("mid" in v){_2fa.createLine({x1:(_2f3.width||1),x2:_2f4-(_2f3.width||1),y1:y-mid,y2:y-mid}).setStroke(_2f9?{color:"white"}:_2f3);}run.dyn.fill=fill;run.dyn.stroke=_2f3;if(_2f7){var o={element:"candlestick",index:j,run:run,plot:this,hAxis:this.hAxis||null,vAxis:this.vAxis||null,shape:_2fa,x:x,y:y-Math.max(open,_2f8),cx:_2f4/2,cy:(y-Math.max(open,_2f8))+(Math.max(_2f9?open-_2f8:_2f8-open,1)/2),width:_2f4,height:Math.max(_2f9?open-_2f8:_2f8-open,1),data:v};this._connectEvents(shape,o);}}}run.dirty=false;}this.dirty=false;return this;}});})();}if(!dojo._hasResource["dojox.charting.plot2d.OHLC"]){dojo._hasResource["dojox.charting.plot2d.OHLC"]=true;dojo.provide("dojox.charting.plot2d.OHLC");(function(){var df=dojox.lang.functional,du=dojox.lang.utils,dc=dojox.charting.plot2d.common,_2fb=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.OHLC",dojox.charting.plot2d.Base,{defaultParams:{hAxis:"x",vAxis:"y",gap:2,shadows:null},optionalParams:{minBarSize:1,maxBarSize:1},constructor:function(_2fc,_2fd){this.opt=dojo.clone(this.defaultParams);du.updateWithObject(this.opt,_2fd);du.updateWithPattern(this.opt,_2fd,this.optionalParams);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;},collectStats:function(_2fe){var _2ff=dojo.clone(dc.defaultStats);for(var i=0;i<_2fe.length;i++){var run=_2fe[i];if(!run.data.length){continue;}var _300=_2ff.vmin,_301=_2ff.vmax;if(!("ymin" in run)||!("ymax" in run)){dojo.forEach(run.data,function(val,idx){var x=val.x||idx+1;_2ff.hmin=Math.min(_2ff.hmin,x);_2ff.hmax=Math.max(_2ff.hmax,x);_2ff.vmin=Math.min(_2ff.vmin,val.open,val.close,val.high,val.low);_2ff.vmax=Math.max(_2ff.vmax,val.open,val.close,val.high,val.low);});}if("ymin" in run){_2ff.vmin=Math.min(_300,run.ymin);}if("ymax" in run){_2ff.vmax=Math.max(_301,run.ymax);}}return _2ff;},calculateAxes:function(dim){var _302=this.collectStats(this.series),t;_302.hmin-=0.5;_302.hmax+=0.5;this._calc(dim,_302);return this;},render:function(dim,_303){this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_2fb);this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,_304,_305,fill,f,gap,_306,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_307=Math.max(0,this._vScaler.bounds.lower),_308=vt(_307),_309=this.events();f=dc.calculateBarSize(this._hScaler.bounds.scale,this.opt);gap=f.gap;_306=f.size;this.resetEvents();for(var i=this.series.length-1;i>=0;--i){var run=this.series[i];if(!this.dirty&&!run.dirty){continue;}run.cleanGroup();var s=run.group;if(!run.fill||!run.stroke){_304=run.dyn.color=new dojo.Color(t.next("color"));}_305=run.stroke?run.stroke:dc.augmentStroke(t.series.stroke,_304);fill=run.fill?run.fill:dc.augmentFill(t.series.fill,_304);for(var j=0;j<run.data.length;++j){var v=run.data[j];var x=ht(v.x||(j+0.5))+_303.l+gap,y=dim.height-_303.b,open=vt(v.open),_30a=vt(v.close),high=vt(v.high),low=vt(v.low);if(low>high){var tmp=high;high=low;low=tmp;}if(_306>=1){var hl={x1:_306/2,x2:_306/2,y1:y-high,y2:y-low},op={x1:0,x2:((_306/2)+((_305.width||1)/2)),y1:y-open,y2:y-open},cl={x1:((_306/2)-((_305.width||1)/2)),x2:_306,y1:y-_30a,y2:y-_30a};shape=s.createGroup();shape.setTransform({dx:x,dy:0});var _30b=shape.createGroup();_30b.createLine(hl).setStroke(_305);_30b.createLine(op).setStroke(_305);_30b.createLine(cl).setStroke(_305);run.dyn.fill=fill;run.dyn.stroke=_305;if(_309){var o={element:"candlestick",index:j,run:run,plot:this,hAxis:this.hAxis||null,vAxis:this.vAxis||null,shape:_30b,x:x,y:y-Math.max(open,_30a),cx:_306/2,cy:(y-Math.max(open,_30a))+(Math.max(open>_30a?open-_30a:_30a-open,1)/2),width:_306,height:Math.max(open>_30a?open-_30a:_30a-open,1),data:v};this._connectEvents(shape,o);}}}run.dirty=false;}this.dirty=false;return this;}});})();}if(!dojo._hasResource["dojox.charting.Chart2D"]){dojo._hasResource["dojox.charting.Chart2D"]=true;dojo.provide("dojox.charting.Chart2D");(function(){var df=dojox.lang.functional,dc=dojox.charting,_30c=df.lambda("item.clear()"),_30d=df.lambda("item.purgeGroup()"),_30e=df.lambda("item.destroy()"),_30f=df.lambda("item.dirty = false"),_310=df.lambda("item.dirty = true");dojo.declare("dojox.charting.Chart2D",null,{constructor:function(node,_311){if(!_311){_311={};}this.margins=_311.margins?_311.margins:{l:10,t:10,r:10,b:10};this.stroke=_311.stroke;this.fill=_311.fill;this.theme=null;this.axes={};this.stack=[];this.plots={};this.series=[];this.runs={};this.dirty=true;this.coords=null;this.node=dojo.byId(node);var box=dojo.marginBox(node);this.surface=dojox.gfx.createSurface(this.node,box.w,box.h);},destroy:function(){dojo.forEach(this.series,_30e);dojo.forEach(this.stack,_30e);df.forIn(this.axes,_30e);this.surface.destroy();},getCoords:function(){if(!this.coords){this.coords=dojo.coords(this.node,true);}return this.coords;},setTheme:function(_312){this.theme=_312._clone();this.dirty=true;return this;},addAxis:function(name,_313){var axis;if(!_313||!("type" in _313)){axis=new dc.axis2d.Default(this,_313);}else{axis=typeof _313.type=="string"?new dc.axis2d[_313.type](this,_313):new _313.type(this,_313);}axis.name=name;axis.dirty=true;if(name in this.axes){this.axes[name].destroy();}this.axes[name]=axis;this.dirty=true;return this;},getAxis:function(name){return this.axes[name];},removeAxis:function(name){if(name in this.axes){this.axes[name].destroy();delete this.axes[name];this.dirty=true;}return this;},addPlot:function(name,_314){var plot;if(!_314||!("type" in _314)){plot=new dc.plot2d.Default(this,_314);}else{plot=typeof _314.type=="string"?new dc.plot2d[_314.type](this,_314):new _314.type(this,_314);}plot.name=name;plot.dirty=true;if(name in this.plots){this.stack[this.plots[name]].destroy();this.stack[this.plots[name]]=plot;}else{this.plots[name]=this.stack.length;this.stack.push(plot);}this.dirty=true;return this;},removePlot:function(name){if(name in this.plots){var _315=this.plots[name];delete this.plots[name];this.stack[_315].destroy();this.stack.splice(_315,1);df.forIn(this.plots,function(idx,name,_316){if(idx>_315){_316[name]=idx-1;}});this.dirty=true;}return this;},addSeries:function(name,data,_317){var run=new dc.Series(this,data,_317);if(name in this.runs){this.series[this.runs[name]].destroy();this.series[this.runs[name]]=run;}else{this.runs[name]=this.series.length;this.series.push(run);}run.name=name;this.dirty=true;if(!("ymin" in run)&&"min" in run){run.ymin=run.min;}if(!("ymax" in run)&&"max" in run){run.ymax=run.max;}return this;},removeSeries:function(name){if(name in this.runs){var _318=this.runs[name],_319=this.series[_318].plot;delete this.runs[name];this.series[_318].destroy();this.series.splice(_318,1);df.forIn(this.runs,function(idx,name,runs){if(idx>_318){runs[name]=idx-1;}});this.dirty=true;}return this;},updateSeries:function(name,data){if(name in this.runs){var run=this.series[this.runs[name]];run.data=data;run.dirty=true;this._invalidateDependentPlots(run.plot,false);this._invalidateDependentPlots(run.plot,true);}return this;},resize:function(_31a,_31b){var box;switch(arguments.length){case 0:box=dojo.marginBox(this.node);break;case 1:box=_31a;break;default:box={w:_31a,h:_31b};break;}dojo.marginBox(this.node,box);this.surface.setDimensions(box.w,box.h);this.dirty=true;this.coords=null;return this.render();},getGeometry:function(){var ret={};df.forIn(this.axes,function(axis){if(axis.initialized()){ret[axis.name]={name:axis.name,vertical:axis.vertical,scaler:axis.scaler,ticks:axis.ticks};}});return ret;},setAxisWindow:function(name,_31c,_31d){var axis=this.axes[name];if(axis){axis.setWindow(_31c,_31d);}return this;},setWindow:function(sx,sy,dx,dy){if(!("plotArea" in this)){this.calculateGeometry();}df.forIn(this.axes,function(axis){var _31e,_31f,_320=axis.getScaler().bounds,s=_320.span/(_320.upper-_320.lower);if(axis.vertical){_31e=sy;_31f=dy/s/_31e;}else{_31e=sx;_31f=dx/s/_31e;}axis.setWindow(_31e,_31f);});return this;},calculateGeometry:function(){if(this.dirty){return this.fullGeometry();}dojo.forEach(this.stack,function(plot){if(plot.dirty||(plot.hAxis&&this.axes[plot.hAxis].dirty)||(plot.vAxis&&this.axes[plot.vAxis].dirty)){plot.calculateAxes(this.plotArea);}},this);return this;},fullGeometry:function(){this._makeDirty();dojo.forEach(this.stack,_30c);if(!this.theme){this.setTheme(new dojox.charting.Theme(dojox.charting._def));}dojo.forEach(this.series,function(run){if(!(run.plot in this.plots)){var plot=new dc.plot2d.Default(this,{});plot.name=run.plot;this.plots[run.plot]=this.stack.length;this.stack.push(plot);}this.stack[this.plots[run.plot]].addSeries(run);},this);dojo.forEach(this.stack,function(plot){if(plot.hAxis){plot.setAxis(this.axes[plot.hAxis]);}if(plot.vAxis){plot.setAxis(this.axes[plot.vAxis]);}},this);var dim=this.dim=this.surface.getDimensions();dim.width=dojox.gfx.normalizedLength(dim.width);dim.height=dojox.gfx.normalizedLength(dim.height);df.forIn(this.axes,_30c);dojo.forEach(this.stack,function(p){p.calculateAxes(dim);});var _321=this.offsets={l:0,r:0,t:0,b:0};df.forIn(this.axes,function(axis){df.forIn(axis.getOffsets(),function(o,i){_321[i]+=o;});});df.forIn(this.margins,function(o,i){_321[i]+=o;});this.plotArea={width:dim.width-_321.l-_321.r,height:dim.height-_321.t-_321.b};df.forIn(this.axes,_30c);dojo.forEach(this.stack,function(plot){plot.calculateAxes(this.plotArea);},this);return this;},render:function(){if(this.theme){this.theme.clear();}if(this.dirty){return this.fullRender();}this.calculateGeometry();df.forEachRev(this.stack,function(plot){plot.render(this.dim,this.offsets);},this);df.forIn(this.axes,function(axis){axis.render(this.dim,this.offsets);},this);this._makeClean();if(this.surface.render){this.surface.render();}return this;},fullRender:function(){this.fullGeometry();var _322=this.offsets,dim=this.dim;var _323=df.foldl(this.stack,"z + plot.getRequiredColors()",0);this.theme.defineColors({num:_323,cache:false});dojo.forEach(this.series,_30d);df.forIn(this.axes,_30d);dojo.forEach(this.stack,_30d);this.surface.clear();var t=this.theme,fill=t.plotarea&&t.plotarea.fill,_324=t.plotarea&&t.plotarea.stroke;if(fill){this.surface.createRect({x:_322.l,y:_322.t,width:dim.width-_322.l-_322.r,height:dim.height-_322.t-_322.b}).setFill(fill);}if(_324){this.surface.createRect({x:_322.l,y:_322.t,width:dim.width-_322.l-_322.r-1,height:dim.height-_322.t-_322.b-1}).setStroke(_324);}df.foldr(this.stack,function(z,plot){return plot.render(dim,_322),0;},0);fill=this.fill?this.fill:(t.chart&&t.chart.fill);_324=this.stroke?this.stroke:(t.chart&&t.chart.stroke);if(fill=="inherit"){var node=this.node,fill=new dojo.Color(dojo.style(node,"backgroundColor"));while(fill.a==0&&node!=document.documentElement){fill=new dojo.Color(dojo.style(node,"backgroundColor"));node=node.parentNode;}}if(fill){if(_322.l){this.surface.createRect({width:_322.l,height:dim.height+1}).setFill(fill);}if(_322.r){this.surface.createRect({x:dim.width-_322.r,width:_322.r+1,height:dim.height+1}).setFill(fill);}if(_322.t){this.surface.createRect({width:dim.width+1,height:_322.t}).setFill(fill);}if(_322.b){this.surface.createRect({y:dim.height-_322.b,width:dim.width+1,height:_322.b+2}).setFill(fill);}}if(_324){this.surface.createRect({width:dim.width-1,height:dim.height-1}).setStroke(_324);}df.forIn(this.axes,function(axis){axis.render(dim,_322);});this._makeClean();if(this.surface.render){this.surface.render();}return this;},connectToPlot:function(name,_325,_326){return name in this.plots?this.stack[this.plots[name]].connect(_325,_326):null;},_makeClean:function(){dojo.forEach(this.axes,_30f);dojo.forEach(this.stack,_30f);dojo.forEach(this.series,_30f);this.dirty=false;},_makeDirty:function(){dojo.forEach(this.axes,_310);dojo.forEach(this.stack,_310);dojo.forEach(this.series,_310);this.dirty=true;},_invalidateDependentPlots:function(_327,_328){if(_327 in this.plots){var plot=this.stack[this.plots[_327]],axis,_329=_328?"vAxis":"hAxis";if(plot[_329]){axis=this.axes[plot[_329]];if(axis&&axis.dependOnData()){axis.dirty=true;dojo.forEach(this.stack,function(p){if(p[_329]&&p[_329]==plot[_329]){p.dirty=true;}});}}else{plot.dirty=true;}}}});})();}if(!dojo._hasResource["dojo.fx.easing"]){dojo._hasResource["dojo.fx.easing"]=true;dojo.provide("dojo.fx.easing");dojo.fx.easing={linear:function(n){return n;},quadIn:function(n){return Math.pow(n,2);},quadOut:function(n){return n*(n-2)*-1;},quadInOut:function(n){n=n*2;if(n<1){return Math.pow(n,2)/2;}return -1*((--n)*(n-2)-1)/2;},cubicIn:function(n){return Math.pow(n,3);},cubicOut:function(n){return Math.pow(n-1,3)+1;},cubicInOut:function(n){n=n*2;if(n<1){return Math.pow(n,3)/2;}n-=2;return (Math.pow(n,3)+2)/2;},quartIn:function(n){return Math.pow(n,4);},quartOut:function(n){return -1*(Math.pow(n-1,4)-1);},quartInOut:function(n){n=n*2;if(n<1){return Math.pow(n,4)/2;}n-=2;return -1/2*(Math.pow(n,4)-2);},quintIn:function(n){return Math.pow(n,5);},quintOut:function(n){return Math.pow(n-1,5)+1;},quintInOut:function(n){n=n*2;if(n<1){return Math.pow(n,5)/2;}n-=2;return (Math.pow(n,5)+2)/2;},sineIn:function(n){return -1*Math.cos(n*(Math.PI/2))+1;},sineOut:function(n){return Math.sin(n*(Math.PI/2));},sineInOut:function(n){return -1*(Math.cos(Math.PI*n)-1)/2;},expoIn:function(n){return (n==0)?0:Math.pow(2,10*(n-1));},expoOut:function(n){return (n==1)?1:(-1*Math.pow(2,-10*n)+1);},expoInOut:function(n){if(n==0){return 0;}if(n==1){return 1;}n=n*2;if(n<1){return Math.pow(2,10*(n-1))/2;}--n;return (-1*Math.pow(2,-10*n)+2)/2;},circIn:function(n){return -1*(Math.sqrt(1-Math.pow(n,2))-1);},circOut:function(n){n=n-1;return Math.sqrt(1-Math.pow(n,2));},circInOut:function(n){n=n*2;if(n<1){return -1/2*(Math.sqrt(1-Math.pow(n,2))-1);}n-=2;return 1/2*(Math.sqrt(1-Math.pow(n,2))+1);},backIn:function(n){var s=1.70158;return Math.pow(n,2)*((s+1)*n-s);},backOut:function(n){n=n-1;var s=1.70158;return Math.pow(n,2)*((s+1)*n+s)+1;},backInOut:function(n){var s=1.70158*1.525;n=n*2;if(n<1){return (Math.pow(n,2)*((s+1)*n-s))/2;}n-=2;return (Math.pow(n,2)*((s+1)*n+s)+2)/2;},elasticIn:function(n){if(n==0||n==1){return n;}var p=0.3;var s=p/4;n=n-1;return -1*Math.pow(2,10*n)*Math.sin((n-s)*(2*Math.PI)/p);},elasticOut:function(n){if(n==0||n==1){return n;}var p=0.3;var s=p/4;return Math.pow(2,-10*n)*Math.sin((n-s)*(2*Math.PI)/p)+1;},elasticInOut:function(n){if(n==0){return 0;}n=n*2;if(n==2){return 1;}var p=0.3*1.5;var s=p/4;if(n<1){n-=1;return -0.5*(Math.pow(2,10*n)*Math.sin((n-s)*(2*Math.PI)/p));}n-=1;return 0.5*(Math.pow(2,-10*n)*Math.sin((n-s)*(2*Math.PI)/p))+1;},bounceIn:function(n){return (1-dojo.fx.easing.bounceOut(1-n));},bounceOut:function(n){var s=7.5625;var p=2.75;var l;if(n<(1/p)){l=s*Math.pow(n,2);}else{if(n<(2/p)){n-=(1.5/p);l=s*Math.pow(n,2)+0.75;}else{if(n<(2.5/p)){n-=(2.25/p);l=s*Math.pow(n,2)+0.9375;}else{n-=(2.625/p);l=s*Math.pow(n,2)+0.984375;}}}return l;},bounceInOut:function(n){if(n<0.5){return dojo.fx.easing.bounceIn(n*2)/2;}return (dojo.fx.easing.bounceOut(n*2-1)/2)+0.5;}};}if(!dojo._hasResource["dojox.charting.action2d.Base"]){dojo._hasResource["dojox.charting.action2d.Base"]=true;dojo.provide("dojox.charting.action2d.Base");(function(){var _32a=400,_32b=dojo.fx.easing.backOut,df=dojox.lang.functional;dojo.declare("dojox.charting.action2d.Base",null,{overOutEvents:{onmouseover:1,onmouseout:1},constructor:function(_32c,plot,_32d){this.chart=_32c;this.plot=plot?plot:"default";this.anim={};if(!_32d){_32d={};}this.duration=_32d.duration?_32d.duration:_32a;this.easing=_32d.easing?_32d.easing:_32b;},connect:function(){this.handle=this.chart.connectToPlot(this.plot,this,"process");},disconnect:function(){if(this.handle){dojo.disconnect(this.handle);this.handle=null;}},reset:function(){},destroy:function(){if(this.handle){this.disconnect();}df.forIn(this.anim,function(o){df.forIn(o,function(anim){anim.action.stop(true);});});this.anim={};}});})();}if(!dojo._hasResource["dojox.charting.action2d.Highlight"]){dojo._hasResource["dojox.charting.action2d.Highlight"]=true;dojo.provide("dojox.charting.action2d.Highlight");(function(){var _32e=100,_32f=75,_330=50,c=dojox.color,cc=function(_331){return function(){return _331;};},hl=function(_332){var a=new c.Color(_332),x=a.toHsl();if(x.s==0){x.l=x.l<50?100:0;}else{x.s=_32e;if(x.l<_330){x.l=_32f;}else{if(x.l>_32f){x.l=_330;}else{x.l=x.l-_330>_32f-x.l?_330:_32f;}}}return c.fromHsl(x);};dojo.declare("dojox.charting.action2d.Highlight",dojox.charting.action2d.Base,{defaultParams:{duration:400,easing:dojo.fx.easing.backOut},optionalParams:{highlight:"red"},constructor:function(_333,plot,_334){var a=_334&&_334.highlight;this.colorFun=a?(dojo.isFunction(a)?a:cc(a)):hl;this.connect();},process:function(o){if(!o.shape||!(o.type in this.overOutEvents)){return;}var _335=o.run.name,_336=o.index,anim,_337,_338;if(_335 in this.anim){anim=this.anim[_335][_336];}else{this.anim[_335]={};}if(anim){anim.action.stop(true);}else{var _339=o.shape.getFill();if(!_339||!(_339 instanceof dojo.Color)){return;}this.anim[_335][_336]=anim={start:_339,end:this.colorFun(_339)};}var _33a=anim.start,end=anim.end;if(o.type=="onmouseout"){var t=_33a;_33a=end;end=t;}anim.action=dojox.gfx.fx.animateFill({shape:o.shape,duration:this.duration,easing:this.easing,color:{start:_33a,end:end}});if(o.type=="onmouseout"){dojo.connect(anim.action,"onEnd",this,function(){if(this.anim[_335]){delete this.anim[_335][_336];}});}anim.action.play();}});})();}if(!dojo._hasResource["dojo.fx.Toggler"]){dojo._hasResource["dojo.fx.Toggler"]=true;dojo.provide("dojo.fx.Toggler");dojo.declare("dojo.fx.Toggler",null,{node:null,showFunc:dojo.fadeIn,hideFunc:dojo.fadeOut,showDuration:200,hideDuration:200,constructor:function(args){var _33b=this;dojo.mixin(_33b,args);_33b.node=args.node;_33b._showArgs=dojo.mixin({},args);_33b._showArgs.node=_33b.node;_33b._showArgs.duration=_33b.showDuration;_33b.showAnim=_33b.showFunc(_33b._showArgs);_33b._hideArgs=dojo.mixin({},args);_33b._hideArgs.node=_33b.node;_33b._hideArgs.duration=_33b.hideDuration;_33b.hideAnim=_33b.hideFunc(_33b._hideArgs);dojo.connect(_33b.showAnim,"beforeBegin",dojo.hitch(_33b.hideAnim,"stop",true));dojo.connect(_33b.hideAnim,"beforeBegin",dojo.hitch(_33b.showAnim,"stop",true));},show:function(_33c){return this.showAnim.play(_33c||0);},hide:function(_33d){return this.hideAnim.play(_33d||0);}});}if(!dojo._hasResource["dojo.fx"]){dojo._hasResource["dojo.fx"]=true;dojo.provide("dojo.fx");(function(){var d=dojo,_33e={_fire:function(evt,args){if(this[evt]){this[evt].apply(this,args||[]);}return this;}};var _33f=function(_340){this._index=-1;this._animations=_340||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;d.forEach(this._animations,function(a){this.duration+=a.duration;if(a.delay){this.duration+=a.delay;}},this);};d.extend(_33f,{_onAnimate:function(){this._fire("onAnimate",arguments);},_onEnd:function(){d.disconnect(this._onAnimateCtx);d.disconnect(this._onEndCtx);this._onAnimateCtx=this._onEndCtx=null;if(this._index+1==this._animations.length){this._fire("onEnd");}else{this._current=this._animations[++this._index];this._onAnimateCtx=d.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx=d.connect(this._current,"onEnd",this,"_onEnd");this._current.play(0,true);}},play:function(_341,_342){if(!this._current){this._current=this._animations[this._index=0];}if(!_342&&this._current.status()=="playing"){return this;}var _343=d.connect(this._current,"beforeBegin",this,function(){this._fire("beforeBegin");}),_344=d.connect(this._current,"onBegin",this,function(arg){this._fire("onBegin",arguments);}),_345=d.connect(this._current,"onPlay",this,function(arg){this._fire("onPlay",arguments);d.disconnect(_343);d.disconnect(_344);d.disconnect(_345);});if(this._onAnimateCtx){d.disconnect(this._onAnimateCtx);}this._onAnimateCtx=d.connect(this._current,"onAnimate",this,"_onAnimate");if(this._onEndCtx){d.disconnect(this._onEndCtx);}this._onEndCtx=d.connect(this._current,"onEnd",this,"_onEnd");this._current.play.apply(this._current,arguments);return this;},pause:function(){if(this._current){var e=d.connect(this._current,"onPause",this,function(arg){this._fire("onPause",arguments);d.disconnect(e);});this._current.pause();}return this;},gotoPercent:function(_346,_347){this.pause();var _348=this.duration*_346;this._current=null;d.some(this._animations,function(a){if(a.duration<=_348){this._current=a;return true;}_348-=a.duration;return false;});if(this._current){this._current.gotoPercent(_348/this._current.duration,_347);}return this;},stop:function(_349){if(this._current){if(_349){for(;this._index+1<this._animations.length;++this._index){this._animations[this._index].stop(true);}this._current=this._animations[this._index];}var e=d.connect(this._current,"onStop",this,function(arg){this._fire("onStop",arguments);d.disconnect(e);});this._current.stop();}return this;},status:function(){return this._current?this._current.status():"stopped";},destroy:function(){if(this._onAnimateCtx){d.disconnect(this._onAnimateCtx);}if(this._onEndCtx){d.disconnect(this._onEndCtx);}}});d.extend(_33f,_33e);dojo.fx.chain=function(_34a){return new _33f(_34a);};var _34b=function(_34c){this._animations=_34c||[];this._connects=[];this._finished=0;this.duration=0;d.forEach(_34c,function(a){var _34d=a.duration;if(a.delay){_34d+=a.delay;}if(this.duration<_34d){this.duration=_34d;}this._connects.push(d.connect(a,"onEnd",this,"_onEnd"));},this);this._pseudoAnimation=new d.Animation({curve:[0,1],duration:this.duration});var self=this;d.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop","onEnd"],function(evt){self._connects.push(d.connect(self._pseudoAnimation,evt,function(){self._fire(evt,arguments);}));});};d.extend(_34b,{_doAction:function(_34e,args){d.forEach(this._animations,function(a){a[_34e].apply(a,args);});return this;},_onEnd:function(){if(++this._finished>this._animations.length){this._fire("onEnd");}},_call:function(_34f,args){var t=this._pseudoAnimation;t[_34f].apply(t,args);},play:function(_350,_351){this._finished=0;this._doAction("play",arguments);this._call("play",arguments);return this;},pause:function(){this._doAction("pause",arguments);this._call("pause",arguments);return this;},gotoPercent:function(_352,_353){var ms=this.duration*_352;d.forEach(this._animations,function(a){a.gotoPercent(a.duration<ms?1:(ms/a.duration),_353);});this._call("gotoPercent",arguments);return this;},stop:function(_354){this._doAction("stop",arguments);this._call("stop",arguments);return this;},status:function(){return this._pseudoAnimation.status();},destroy:function(){d.forEach(this._connects,dojo.disconnect);}});d.extend(_34b,_33e);dojo.fx.combine=function(_355){return new _34b(_355);};dojo.fx.wipeIn=function(args){var node=args.node=d.byId(args.node),s=node.style,o;var anim=d.animateProperty(d.mixin({properties:{height:{start:function(){o=s.overflow;s.overflow="hidden";if(s.visibility=="hidden"||s.display=="none"){s.height="1px";s.display="";s.visibility="";return 1;}else{var _356=d.style(node,"height");return Math.max(_356,1);}},end:function(){return node.scrollHeight;}}}},args));d.connect(anim,"onEnd",function(){s.height="auto";s.overflow=o;});return anim;};dojo.fx.wipeOut=function(args){var node=args.node=d.byId(args.node),s=node.style,o;var anim=d.animateProperty(d.mixin({properties:{height:{end:1}}},args));d.connect(anim,"beforeBegin",function(){o=s.overflow;s.overflow="hidden";s.display="";});d.connect(anim,"onEnd",function(){s.overflow=o;s.height="auto";s.display="none";});return anim;};dojo.fx.slideTo=function(args){var node=args.node=d.byId(args.node),top=null,left=null;var init=(function(n){return function(){var cs=d.getComputedStyle(n);var pos=cs.position;top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);left=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);if(pos!="absolute"&&pos!="relative"){var ret=d.position(n,true);top=ret.y;left=ret.x;n.style.position="absolute";n.style.top=top+"px";n.style.left=left+"px";}};})(node);init();var anim=d.animateProperty(d.mixin({properties:{top:args.top||0,left:args.left||0}},args));d.connect(anim,"beforeBegin",anim,init);return anim;};})();}if(!dojo._hasResource["dojox.charting.action2d.Magnify"]){dojo._hasResource["dojox.charting.action2d.Magnify"]=true;dojo.provide("dojox.charting.action2d.Magnify");(function(){var _357=2,m=dojox.gfx.matrix,gf=dojox.gfx.fx;dojo.declare("dojox.charting.action2d.Magnify",dojox.charting.action2d.Base,{defaultParams:{duration:400,easing:dojo.fx.easing.backOut,scale:_357},optionalParams:{},constructor:function(_358,plot,_359){this.scale=_359&&typeof _359.scale=="number"?_359.scale:_357;this.connect();},process:function(o){if(!o.shape||!(o.type in this.overOutEvents)||!("cx" in o)||!("cy" in o)){return;}var _35a=o.run.name,_35b=o.index,_35c=[],anim,init,_35d;if(_35a in this.anim){anim=this.anim[_35a][_35b];}else{this.anim[_35a]={};}if(anim){anim.action.stop(true);}else{this.anim[_35a][_35b]=anim={};}if(o.type=="onmouseover"){init=m.identity;_35d=this.scale;}else{init=m.scaleAt(this.scale,o.cx,o.cy);_35d=1/this.scale;}var _35e={shape:o.shape,duration:this.duration,easing:this.easing,transform:[{name:"scaleAt",start:[1,o.cx,o.cy],end:[_35d,o.cx,o.cy]},init]};if(o.shape){_35c.push(gf.animateTransform(_35e));}if(o.oultine){_35e.shape=o.outline;_35c.push(gf.animateTransform(_35e));}if(o.shadow){_35e.shape=o.shadow;_35c.push(gf.animateTransform(_35e));}if(!_35c.length){delete this.anim[_35a][_35b];return;}anim.action=dojo.fx.combine(_35c);if(o.type=="onmouseout"){dojo.connect(anim.action,"onEnd",this,function(){if(this.anim[_35a]){delete this.anim[_35a][_35b];}});}anim.action.play();}});})();}if(!dojo._hasResource["dojox.lang.functional.scan"]){dojo._hasResource["dojox.lang.functional.scan"]=true;dojo.provide("dojox.lang.functional.scan");(function(){var d=dojo,df=dojox.lang.functional,_35f={};d.mixin(df,{scanl:function(a,f,z,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var t,n,i;if(d.isArray(a)){t=new Array((n=a.length)+1);t[0]=z;for(i=0;i<n;z=f.call(o,z,a[i],i,a),t[++i]=z){}}else{if(typeof a.hasNext=="function"&&typeof a.next=="function"){t=[z];for(i=0;a.hasNext();t.push(z=f.call(o,z,a.next(),i++,a))){}}else{t=[z];for(i in a){if(!(i in _35f)){t.push(z=f.call(o,z,a[i],i,a));}}}}return t;},scanl1:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var t,n,z,_360=true;if(d.isArray(a)){t=new Array(n=a.length);t[0]=z=a[0];for(var i=1;i<n;t[i]=z=f.call(o,z,a[i],i,a),++i){}}else{if(typeof a.hasNext=="function"&&typeof a.next=="function"){if(a.hasNext()){t=[z=a.next()];for(var i=1;a.hasNext();t.push(z=f.call(o,z,a.next(),i++,a))){}}}else{for(var i in a){if(!(i in _35f)){if(_360){t=[z=a[i]];_360=false;}else{t.push(z=f.call(o,z,a[i],i,a));}}}}}return t;},scanr:function(a,f,z,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var n=a.length,t=new Array(n+1),i=n;t[n]=z;for(;i>0;--i,z=f.call(o,z,a[i],i,a),t[i]=z){}return t;},scanr1:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var n=a.length,t=new Array(n),z=a[n-1],i=n-1;t[i]=z;for(;i>0;--i,z=f.call(o,z,a[i],i,a),t[i]=z){}return t;}});})();}if(!dojo._hasResource["dojox.charting.action2d.MoveSlice"]){dojo._hasResource["dojox.charting.action2d.MoveSlice"]=true;dojo.provide("dojox.charting.action2d.MoveSlice");(function(){var _361=1.05,_362=7,m=dojox.gfx.matrix,gf=dojox.gfx.fx,df=dojox.lang.functional;dojo.declare("dojox.charting.action2d.MoveSlice",dojox.charting.action2d.Base,{defaultParams:{duration:400,easing:dojo.fx.easing.backOut,scale:_361,shift:_362},optionalParams:{},constructor:function(_363,plot,_364){if(!_364){_364={};}this.scale=typeof _364.scale=="number"?_364.scale:_361;this.shift=typeof _364.shift=="number"?_364.shift:_362;this.connect();},process:function(o){if(!o.shape||o.element!="slice"||!(o.type in this.overOutEvents)){return;}if(!this.angles){if(typeof o.run.data[0]=="number"){this.angles=df.map(df.scanl(o.run.data,"+",0),"* 2 * Math.PI / this",df.foldl(o.run.data,"+",0));}else{this.angles=df.map(df.scanl(o.run.data,"a + b.y",0),"* 2 * Math.PI / this",df.foldl(o.run.data,"a + b.y",0));}}var _365=o.index,anim,_366,_367,_368,_369,_36a=(this.angles[_365]+this.angles[_365+1])/2,_36b=m.rotateAt(-_36a,o.cx,o.cy),_36c=m.rotateAt(_36a,o.cx,o.cy);anim=this.anim[_365];if(anim){anim.action.stop(true);}else{this.anim[_365]=anim={};}if(o.type=="onmouseover"){_368=0;_369=this.shift;_366=1;_367=this.scale;}else{_368=this.shift;_369=0;_366=this.scale;_367=1;}anim.action=dojox.gfx.fx.animateTransform({shape:o.shape,duration:this.duration,easing:this.easing,transform:[_36c,{name:"translate",start:[_368,0],end:[_369,0]},{name:"scaleAt",start:[_366,o.cx,o.cy],end:[_367,o.cx,o.cy]},_36b]});if(o.type=="onmouseout"){dojo.connect(anim.action,"onEnd",this,function(){delete this.anim[_365];});}anim.action.play();},reset:function(){delete this.angles;}});})();}if(!dojo._hasResource["dojox.charting.action2d.Shake"]){dojo._hasResource["dojox.charting.action2d.Shake"]=true;dojo.provide("dojox.charting.action2d.Shake");(function(){var _36d=3,m=dojox.gfx.matrix,gf=dojox.gfx.fx;dojo.declare("dojox.charting.action2d.Shake",dojox.charting.action2d.Base,{defaultParams:{duration:400,easing:dojo.fx.easing.backOut,shiftX:_36d,shiftY:_36d},optionalParams:{},constructor:function(_36e,plot,_36f){if(!_36f){_36f={};}this.shiftX=typeof _36f.shiftX=="number"?_36f.shiftX:_36d;this.shiftY=typeof _36f.shiftY=="number"?_36f.shiftY:_36d;this.connect();},process:function(o){if(!o.shape||!(o.type in this.overOutEvents)){return;}var _370=o.run.name,_371=o.index,_372=[],anim,_373=o.type=="onmouseover"?this.shiftX:-this.shiftX,_374=o.type=="onmouseover"?this.shiftY:-this.shiftY;if(_370 in this.anim){anim=this.anim[_370][_371];}else{this.anim[_370]={};}if(anim){anim.action.stop(true);}else{this.anim[_370][_371]=anim={};}var _375={shape:o.shape,duration:this.duration,easing:this.easing,transform:[{name:"translate",start:[this.shiftX,this.shiftY],end:[0,0]},m.identity]};if(o.shape){_372.push(gf.animateTransform(_375));}if(o.oultine){_375.shape=o.outline;_372.push(gf.animateTransform(_375));}if(o.shadow){_375.shape=o.shadow;_372.push(gf.animateTransform(_375));}if(!_372.length){delete this.anim[_370][_371];return;}anim.action=dojo.fx.combine(_372);if(o.type=="onmouseout"){dojo.connect(anim.action,"onEnd",this,function(){if(this.anim[_370]){delete this.anim[_370][_371];}});}anim.action.play();}});})();}if(!dojo._hasResource["dojo.date.stamp"]){dojo._hasResource["dojo.date.stamp"]=true;dojo.provide("dojo.date.stamp");dojo.date.stamp.fromISOString=function(_376,_377){if(!dojo.date.stamp._isoRegExp){dojo.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;}var _378=dojo.date.stamp._isoRegExp.exec(_376),_379=null;if(_378){_378.shift();if(_378[1]){_378[1]--;}if(_378[6]){_378[6]*=1000;}if(_377){_377=new Date(_377);dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){return _377["get"+prop]();}).forEach(function(_37a,_37b){if(_378[_37b]===undefined){_378[_37b]=_37a;}});}_379=new Date(_378[0]||1970,_378[1]||0,_378[2]||1,_378[3]||0,_378[4]||0,_378[5]||0,_378[6]||0);if(_378[0]<100){_379.setFullYear(_378[0]||1970);}var _37c=0,_37d=_378[7]&&_378[7].charAt(0);if(_37d!="Z"){_37c=((_378[8]||0)*60)+(Number(_378[9])||0);if(_37d!="-"){_37c*=-1;}}if(_37d){_37c-=_379.getTimezoneOffset();}if(_37c){_379.setTime(_379.getTime()+_37c*60000);}}return _379;};dojo.date.stamp.toISOString=function(_37e,_37f){var _380=function(n){return (n<10)?"0"+n:n;};_37f=_37f||{};var _381=[],_382=_37f.zulu?"getUTC":"get",date="";if(_37f.selector!="time"){var year=_37e[_382+"FullYear"]();date=["0000".substr((year+"").length)+year,_380(_37e[_382+"Month"]()+1),_380(_37e[_382+"Date"]())].join("-");}_381.push(date);if(_37f.selector!="date"){var time=[_380(_37e[_382+"Hours"]()),_380(_37e[_382+"Minutes"]()),_380(_37e[_382+"Seconds"]())].join(":");var _383=_37e[_382+"Milliseconds"]();if(_37f.milliseconds){time+="."+(_383<100?"0":"")+_380(_383);}if(_37f.zulu){time+="Z";}else{if(_37f.selector!="time"){var _384=_37e.getTimezoneOffset();var _385=Math.abs(_384);time+=(_384>0?"-":"+")+_380(Math.floor(_385/60))+":"+_380(_385%60);}}_381.push(time);}return _381.join("T");};}if(!dojo._hasResource["dojo.parser"]){dojo._hasResource["dojo.parser"]=true;dojo.provide("dojo.parser");dojo.parser=new function(){var d=dojo;this._attrName=d._scopeName+"Type";this._query="["+this._attrName+"]";function _386(_387){if(d.isString(_387)){return "string";}if(typeof _387=="number"){return "number";}if(typeof _387=="boolean"){return "boolean";}if(d.isFunction(_387)){return "function";}if(d.isArray(_387)){return "array";}if(_387 instanceof Date){return "date";}if(_387 instanceof d._Url){return "url";}return "object";};function _388(_389,type){switch(type){case "string":return _389;case "number":return _389.length?Number(_389):NaN;case "boolean":return typeof _389=="boolean"?_389:!(_389.toLowerCase()=="false");case "function":if(d.isFunction(_389)){_389=_389.toString();_389=d.trim(_389.substring(_389.indexOf("{")+1,_389.length-1));}try{if(_389.search(/[^\w\.]+/i)!=-1){return new Function(_389);}else{return d.getObject(_389,false);}}catch(e){return new Function();}case "array":return _389?_389.split(/\s*,\s*/):[];case "date":switch(_389){case "":return new Date("");case "now":return new Date();default:return d.date.stamp.fromISOString(_389);}case "url":return d.baseUrl+_389;default:return d.fromJson(_389);}};var _38a={};dojo.connect(dojo,"extend",function(){_38a={};});function _38b(_38c){if(!_38a[_38c]){var cls=d.getObject(_38c);if(!d.isFunction(cls)){throw new Error("Could not load class '"+_38c+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");}var _38d=cls.prototype;var _38e={},_38f={};for(var name in _38d){if(name.charAt(0)=="_"){continue;}if(name in _38f){continue;}var _390=_38d[name];_38e[name]=_386(_390);}_38a[_38c]={cls:cls,params:_38e};}return _38a[_38c];};this._functionFromScript=function(_391){var _392="";var _393="";var _394=_391.getAttribute("args");if(_394){d.forEach(_394.split(/\s*,\s*/),function(part,idx){_392+="var "+part+" = arguments["+idx+"]; ";});}var _395=_391.getAttribute("with");if(_395&&_395.length){d.forEach(_395.split(/\s*,\s*/),function(part){_392+="with("+part+"){";_393+="}";});}return new Function(_392+_391.innerHTML+_393);};this.instantiate=function(_396,_397,args){var _398=[],dp=dojo.parser;_397=_397||{};args=args||{};d.forEach(_396,function(node){if(!node){return;}var type=dp._attrName in _397?_397[dp._attrName]:node.getAttribute(dp._attrName);if(!type||!type.length){return;}var _399=_38b(type),_39a=_399.cls,ps=_39a._noScript||_39a.prototype._noScript;var _39b={},_39c=node.attributes;for(var name in _399.params){var item=name in _397?{value:_397[name],specified:true}:_39c.getNamedItem(name);if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){continue;}var _39d=item.value;switch(name){case "class":_39d="className" in _397?_397.className:node.className;break;case "style":_39d="style" in _397?_397.style:(node.style&&node.style.cssText);}var _39e=_399.params[name];if(typeof _39d=="string"){_39b[name]=_388(_39d,_39e);}else{_39b[name]=_39d;}}if(!ps){var _39f=[],_3a0=[];d.query("> script[type^='dojo/']",node).orphan().forEach(function(_3a1){var _3a2=_3a1.getAttribute("event"),type=_3a1.getAttribute("type"),nf=d.parser._functionFromScript(_3a1);if(_3a2){if(type=="dojo/connect"){_39f.push({event:_3a2,func:nf});}else{_39b[_3a2]=nf;}}else{_3a0.push(nf);}});}var _3a3=_39a.markupFactory||_39a.prototype&&_39a.prototype.markupFactory;var _3a4=_3a3?_3a3(_39b,node,_39a):new _39a(_39b,node);_398.push(_3a4);var _3a5=node.getAttribute("jsId");if(_3a5){d.setObject(_3a5,_3a4);}if(!ps){d.forEach(_39f,function(_3a6){d.connect(_3a4,_3a6.event,null,_3a6.func);});d.forEach(_3a0,function(func){func.call(_3a4);});}});if(!_397._started){d.forEach(_398,function(_3a7){if(!args.noStart&&_3a7&&_3a7.startup&&!_3a7._started&&(!_3a7.getParent||!_3a7.getParent())){_3a7.startup();}});}return _398;};this.parse=function(_3a8,args){var root;if(!args&&_3a8&&_3a8.rootNode){args=_3a8;root=args.rootNode;}else{root=_3a8;}var list=d.query(this._query,root);return this.instantiate(list,null,args);};}();(function(){var _3a9=function(){if(dojo.config.parseOnLoad){dojo.parser.parse();}};if(dojo.exists("dijit.wai.onload")&&(dijit.wai.onload===dojo._loaders[0])){dojo._loaders.splice(1,0,_3a9);}else{dojo._loaders.unshift(_3a9);}})();}if(!dojo._hasResource["dojo.cache"]){dojo._hasResource["dojo.cache"]=true;dojo.provide("dojo.cache");(function(){var _3aa={};dojo.cache=function(_3ab,url,_3ac){if(typeof _3ab=="string"){var _3ad=dojo.moduleUrl(_3ab,url);}else{_3ad=_3ab;_3ac=url;}var key=_3ad.toString();var val=_3ac;if(_3ac!==undefined&&!dojo.isString(_3ac)){val=("value" in _3ac?_3ac.value:undefined);}var _3ae=_3ac&&_3ac.sanitize?true:false;if(val||val===null){if(val==null){delete _3aa[key];}else{val=_3aa[key]=_3ae?dojo.cache._sanitize(val):val;}}else{if(!(key in _3aa)){val=dojo._getText(key);_3aa[key]=_3ae?dojo.cache._sanitize(val):val;}val=_3aa[key];}return val;};dojo.cache._sanitize=function(val){if(val){val=val.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var _3af=val.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_3af){val=_3af[1];}}else{val="";}return val;};})();}if(!dojo._hasResource["dijit._Templated"]){dojo._hasResource["dijit._Templated"]=true;dojo.provide("dijit._Templated");dojo.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_earlyTemplatedStartup:false,constructor:function(){this._attachPoints=[];},_stringRepl:function(tmpl){var _3b0=this.declaredClass,_3b1=this;return dojo.string.substitute(tmpl,this,function(_3b2,key){if(key.charAt(0)=="!"){_3b2=dojo.getObject(key.substr(1),false,_3b1);}if(typeof _3b2=="undefined"){throw new Error(_3b0+" template:"+key);}if(_3b2==null){return "";}return key.charAt(0)=="!"?_3b2:_3b2.toString().replace(/"/g,"&quot;");},this);},buildRendering:function(){var _3b3=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);var node;if(dojo.isString(_3b3)){node=dojo._toDom(this._stringRepl(_3b3));if(node.nodeType!=1){throw new Error("Invalid template: "+_3b3);}}else{node=_3b3.cloneNode(true);}this.domNode=node;this._attachTemplateNodes(node);if(this.widgetsInTemplate){var _3b4=dojo.parser,qry,attr;if(_3b4._query!="[dojoType]"){qry=_3b4._query;attr=_3b4._attrName;_3b4._query="[dojoType]";_3b4._attrName="dojoType";}var cw=(this._startupWidgets=dojo.parser.parse(node,{noStart:!this._earlyTemplatedStartup}));if(qry){_3b4._query=qry;_3b4._attrName=attr;}this._supportingWidgets=dijit.findWidgets(node);this._attachTemplateNodes(cw,function(n,p){return n[p];});}this._fillContent(this.srcNodeRef);},_fillContent:function(_3b5){var dest=this.containerNode;if(_3b5&&dest){while(_3b5.hasChildNodes()){dest.appendChild(_3b5.firstChild);}}},_attachTemplateNodes:function(_3b6,_3b7){_3b7=_3b7||function(n,p){return n.getAttribute(p);};var _3b8=dojo.isArray(_3b6)?_3b6:(_3b6.all||_3b6.getElementsByTagName("*"));var x=dojo.isArray(_3b6)?0:-1;for(;x<_3b8.length;x++){var _3b9=(x==-1)?_3b6:_3b8[x];if(this.widgetsInTemplate&&_3b7(_3b9,"dojoType")){continue;}var _3ba=_3b7(_3b9,"dojoAttachPoint");if(_3ba){var _3bb,_3bc=_3ba.split(/\s*,\s*/);while((_3bb=_3bc.shift())){if(dojo.isArray(this[_3bb])){this[_3bb].push(_3b9);}else{this[_3bb]=_3b9;}this._attachPoints.push(_3bb);}}var _3bd=_3b7(_3b9,"dojoAttachEvent");if(_3bd){var _3be,_3bf=_3bd.split(/\s*,\s*/);var trim=dojo.trim;while((_3be=_3bf.shift())){if(_3be){var _3c0=null;if(_3be.indexOf(":")!=-1){var _3c1=_3be.split(":");_3be=trim(_3c1[0]);_3c0=trim(_3c1[1]);}else{_3be=trim(_3be);}if(!_3c0){_3c0=_3be;}this.connect(_3b9,_3be,_3c0);}}}var role=_3b7(_3b9,"waiRole");if(role){dijit.setWaiRole(_3b9,role);}var _3c2=_3b7(_3b9,"waiState");if(_3c2){dojo.forEach(_3c2.split(/\s*,\s*/),function(_3c3){if(_3c3.indexOf("-")!=-1){var pair=_3c3.split("-");dijit.setWaiState(_3b9,pair[0],pair[1]);}});}}},startup:function(){dojo.forEach(this._startupWidgets,function(w){if(w&&!w._started&&w.startup){w.startup();}});this.inherited(arguments);},destroyRendering:function(){dojo.forEach(this._attachPoints,function(_3c4){delete this[_3c4];},this);this._attachPoints=[];this.inherited(arguments);}});dijit._Templated._templateCache={};dijit._Templated.getCachedTemplate=function(_3c5,_3c6,_3c7){var _3c8=dijit._Templated._templateCache;var key=_3c6||_3c5;var _3c9=_3c8[key];if(_3c9){try{if(!_3c9.ownerDocument||_3c9.ownerDocument==dojo.doc){return _3c9;}}catch(e){}dojo.destroy(_3c9);}if(!_3c6){_3c6=dojo.cache(_3c5,{sanitize:true});}_3c6=dojo.string.trim(_3c6);if(_3c7||_3c6.match(/\$\{([^\}]+)\}/g)){return (_3c8[key]=_3c6);}else{var node=dojo._toDom(_3c6);if(node.nodeType!=1){throw new Error("Invalid template: "+_3c6);}return (_3c8[key]=node);}};if(dojo.isIE){dojo.addOnWindowUnload(function(){var _3ca=dijit._Templated._templateCache;for(var key in _3ca){var _3cb=_3ca[key];if(typeof _3cb=="object"){dojo.destroy(_3cb);}delete _3ca[key];}});}dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});}if(!dojo._hasResource["dijit.Tooltip"]){dojo._hasResource["dijit.Tooltip"]=true;dojo.provide("dijit.Tooltip");dojo.declare("dijit._MasterTooltip",[dijit._Widget,dijit._Templated],{duration:dijit.defaultDuration,templateString:dojo.cache("dijit","templates/Tooltip.html","<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\">\n\t<div class=\"dijitTooltipContainer dijitTooltipContents\" dojoAttachPoint=\"containerNode\" waiRole='alert'></div>\n\t<div class=\"dijitTooltipConnector\"></div>\n</div>\n"),postCreate:function(){dojo.body().appendChild(this.domNode);this.bgIframe=new dijit.BackgroundIframe(this.domNode);this.fadeIn=dojo.fadeIn({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onShow")});this.fadeOut=dojo.fadeOut({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onHide")});},show:function(_3cc,_3cd,_3ce){if(this.aroundNode&&this.aroundNode===_3cd){return;}if(this.fadeOut.status()=="playing"){this._onDeck=arguments;return;}this.containerNode.innerHTML=_3cc;this.domNode.style.top=(this.domNode.offsetTop+1)+"px";var pos=dijit.placeOnScreenAroundElement(this.domNode,_3cd,dijit.getPopupAroundAlignment((_3ce&&_3ce.length)?_3ce:dijit.Tooltip.defaultPosition,this.isLeftToRight()),dojo.hitch(this,"orient"));dojo.style(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=true;this.aroundNode=_3cd;},orient:function(node,_3cf,_3d0){node.className="dijitTooltip "+{"BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[_3cf+"-"+_3d0];},_onShow:function(){if(dojo.isIE){this.domNode.style.filter="";}},hide:function(_3d1){if(this._onDeck&&this._onDeck[1]==_3d1){this._onDeck=null;}else{if(this.aroundNode===_3d1){this.fadeIn.stop();this.isShowingNow=false;this.aroundNode=null;this.fadeOut.play();}else{}}},_onHide:function(){this.domNode.style.cssText="";if(this._onDeck){this.show.apply(this,this._onDeck);this._onDeck=null;}}});dijit.showTooltip=function(_3d2,_3d3,_3d4){if(!dijit._masterTT){dijit._masterTT=new dijit._MasterTooltip();}return dijit._masterTT.show(_3d2,_3d3,_3d4);};dijit.hideTooltip=function(_3d5){if(!dijit._masterTT){dijit._masterTT=new dijit._MasterTooltip();}return dijit._masterTT.hide(_3d5);};dojo.declare("dijit.Tooltip",dijit._Widget,{label:"",showDelay:400,connectId:[],position:[],constructor:function(){this._nodeConnectionsById={};},_setConnectIdAttr:function(_3d6){for(var _3d7 in this._nodeConnectionsById){this.removeTarget(_3d7);}dojo.forEach(dojo.isArrayLike(_3d6)?_3d6:[_3d6],this.addTarget,this);},_getConnectIdAttr:function(){var ary=[];for(var id in this._nodeConnectionsById){ary.push(id);}return ary;},addTarget:function(id){var node=dojo.byId(id);if(!node){return;}if(node.id in this._nodeConnectionsById){return;}this._nodeConnectionsById[node.id]=[this.connect(node,"onmouseenter","_onTargetMouseEnter"),this.connect(node,"onmouseleave","_onTargetMouseLeave"),this.connect(node,"onfocus","_onTargetFocus"),this.connect(node,"onblur","_onTargetBlur")];if(dojo.isIE&&!node.style.zoom){node.style.zoom=1;}},removeTarget:function(node){var id=node.id||node;if(id in this._nodeConnectionsById){dojo.forEach(this._nodeConnectionsById[id],this.disconnect,this);delete this._nodeConnectionsById[id];}},postCreate:function(){dojo.addClass(this.domNode,"dijitTooltipData");},startup:function(){this.inherited(arguments);var ids=this.connectId;dojo.forEach(dojo.isArrayLike(ids)?ids:[ids],this.addTarget,this);},_onTargetMouseEnter:function(e){this._onHover(e);},_onTargetMouseLeave:function(e){this._onUnHover(e);},_onTargetFocus:function(e){this._focus=true;this._onHover(e);},_onTargetBlur:function(e){this._focus=false;this._onUnHover(e);},_onHover:function(e){if(!this._showTimer){var _3d8=e.target;this._showTimer=setTimeout(dojo.hitch(this,function(){this.open(_3d8);}),this.showDelay);}},_onUnHover:function(e){if(this._focus){return;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}this.close();},open:function(_3d9){if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}dijit.showTooltip(this.label||this.domNode.innerHTML,_3d9,this.position);this._connectNode=_3d9;this.onShow(_3d9,this.position);},close:function(){if(this._connectNode){dijit.hideTooltip(this._connectNode);delete this._connectNode;this.onHide();}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}},onShow:function(_3da,_3db){},onHide:function(){},uninitialize:function(){this.close();this.inherited(arguments);}});dijit.Tooltip.defaultPosition=["after","before"];}if(!dojo._hasResource["dojox.charting.action2d.Tooltip"]){dojo._hasResource["dojox.charting.action2d.Tooltip"]=true;dojo.provide("dojox.charting.action2d.Tooltip");(function(){var _3dc=function(o){var t=o.run&&o.run.data&&o.run.data[o.index];if(t&&typeof t!="number"&&(t.tooltip||t.text)){return t.tooltip||t.text;}if(o.element=="candlestick"){return "<table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" style=\"font-size:0.9em;\">"+"<tr><td>Open:</td><td align=\"right\"><strong>"+o.data.open+"</strong></td></tr>"+"<tr><td>High:</td><td align=\"right\"><strong>"+o.data.high+"</strong></td></tr>"+"<tr><td>Low:</td><td align=\"right\"><strong>"+o.data.low+"</strong></td></tr>"+"<tr><td>Close:</td><td align=\"right\"><strong>"+o.data.close+"</strong></td></tr>"+(o.data.mid!==undefined?"<tr><td>Mid:</td><td align=\"right\"><strong>"+o.data.mid+"</strong></td></tr>":"")+"</table>";}return o.element=="bar"?o.x:o.y;};var df=dojox.lang.functional,pi4=Math.PI/4,pi2=Math.PI/2;dojo.declare("dojox.charting.action2d.Tooltip",dojox.charting.action2d.Base,{defaultParams:{text:_3dc},optionalParams:{},constructor:function(_3dd,plot,_3de){this.text=_3de&&_3de.text?_3de.text:_3dc;this.connect();},process:function(o){if(o.type==="onplotreset"||o.type==="onmouseout"){dijit.hideTooltip(this.aroundRect);this.aroundRect=null;return;}if(!o.shape||o.type!=="onmouseover"){return;}var _3df={type:"rect"},_3e0=["after","before"];switch(o.element){case "marker":_3df.x=o.cx;_3df.y=o.cy;_3df.width=_3df.height=1;break;case "circle":_3df.x=o.cx-o.cr;_3df.y=o.cy-o.cr;_3df.width=_3df.height=2*o.cr;break;case "column":_3e0=["above","below"];case "bar":_3df=dojo.clone(o.shape.getShape());break;case "candlestick":_3df.x=o.x;_3df.y=o.y;_3df.width=o.width;_3df.height=o.height;break;default:if(!this.angles){if(typeof o.run.data[0]=="number"){this.angles=df.map(df.scanl(o.run.data,"+",0),"* 2 * Math.PI / this",df.foldl(o.run.data,"+",0));}else{this.angles=df.map(df.scanl(o.run.data,"a + b.y",0),"* 2 * Math.PI / this",df.foldl(o.run.data,"a + b.y",0));}}var _3e1=(this.angles[o.index]+this.angles[o.index+1])/2;_3df.x=o.cx+o.cr*Math.cos(_3e1);_3df.y=o.cy+o.cr*Math.sin(_3e1);_3df.width=_3df.height=1;if(_3e1<pi4){}else{if(_3e1<pi2+pi4){_3e0=["below","above"];}else{if(_3e1<Math.PI+pi4){_3e0=["before","after"];}else{if(_3e1<2*Math.PI-pi4){_3e0=["above","below"];}}}}break;}var lt=dojo.coords(this.chart.node,true);_3df.x+=lt.x;_3df.y+=lt.y;_3df.x=Math.round(_3df.x);_3df.y=Math.round(_3df.y);_3df.width=Math.ceil(_3df.width);_3df.height=Math.ceil(_3df.height);this.aroundRect=_3df;dijit.showTooltip(this.text(o),this.aroundRect,_3e0);}});})();}if(!dojo._hasResource["dojox.charting.widget.Chart2D"]){dojo._hasResource["dojox.charting.widget.Chart2D"]=true;dojo.provide("dojox.charting.widget.Chart2D");(function(){var _3e2,_3e3,_3e4,_3e5,_3e6,_3e7=function(o){return o;},df=dojox.lang.functional,du=dojox.lang.utils,dc=dojox.charting,d=dojo;dojo.declare("dojox.charting.widget.Chart2D",dijit._Widget,{theme:null,margins:null,stroke:null,fill:null,buildRendering:function(){var n=this.domNode=this.srcNodeRef;var axes=d.query("> .axis",n).map(_3e3).filter(_3e7),_3e8=d.query("> .plot",n).map(_3e4).filter(_3e7),_3e9=d.query("> .action",n).map(_3e5).filter(_3e7),_3ea=d.query("> .series",n).map(_3e6).filter(_3e7);n.innerHTML="";var c=this.chart=new dc.Chart2D(n,{margins:this.margins,stroke:this.stroke,fill:this.fill});if(this.theme){c.setTheme(this.theme);}axes.forEach(function(axis){c.addAxis(axis.name,axis.kwArgs);});_3e8.forEach(function(plot){c.addPlot(plot.name,plot.kwArgs);});this.actions=_3e9.map(function(_3eb){return new _3eb.action(c,_3eb.plot,_3eb.kwArgs);});var _3ec=df.foldl(_3ea,function(_3ed,_3ee){if(_3ee.type=="data"){c.addSeries(_3ee.name,_3ee.data,_3ee.kwArgs);_3ed=true;}else{c.addSeries(_3ee.name,[0],_3ee.kwArgs);var kw={};du.updateWithPattern(kw,_3ee.kwArgs,{"query":"","queryOptions":null,"start":0,"count":1},true);if(_3ee.kwArgs.sort){kw.sort=dojo.clone(_3ee.kwArgs.sort);}d.mixin(kw,{onComplete:function(data){var _3ef;if("valueFn" in _3ee.kwArgs){var fn=_3ee.kwArgs.valueFn;_3ef=d.map(data,function(x){return fn(_3ee.data.getValue(x,_3ee.field,0));});}else{_3ef=d.map(data,function(x){return _3ee.data.getValue(x,_3ee.field,0);});}c.addSeries(_3ee.name,_3ef,_3ee.kwArgs).render();}});_3ee.data.fetch(kw);}return _3ed;},false);if(_3ec){c.render();}},destroy:function(){this.chart.destroy();this.inherited(arguments);},resize:function(box){if(box.w>0&&box.h>0){dojo.marginBox(this.domNode,box);this.chart.resize();}}});_3e2=function(node,type,kw){var dp=eval("("+type+".prototype.defaultParams)");var x,attr;for(x in dp){if(x in kw){continue;}attr=node.getAttribute(x);kw[x]=du.coerceType(dp[x],attr==null||typeof attr=="undefined"?dp[x]:attr);}var op=eval("("+type+".prototype.optionalParams)");for(x in op){if(x in kw){continue;}attr=node.getAttribute(x);if(attr!=null){kw[x]=du.coerceType(op[x],attr);}}};_3e3=function(node){var name=node.getAttribute("name"),type=node.getAttribute("type");if(!name){return null;}var o={name:name,kwArgs:{}},kw=o.kwArgs;if(type){if(dc.axis2d[type]){type=dojox._scopeName+".charting.axis2d."+type;}var axis=eval("("+type+")");if(axis){kw.type=axis;}}else{type=dojox._scopeName+".charting.axis2d.Default";}_3e2(node,type,kw);return o;};_3e4=function(node){var name=node.getAttribute("name"),type=node.getAttribute("type");if(!name){return null;}var o={name:name,kwArgs:{}},kw=o.kwArgs;if(type){if(dc.plot2d[type]){type=dojox._scopeName+".charting.plot2d."+type;}var plot=eval("("+type+")");if(plot){kw.type=plot;}}else{type=dojox._scopeName+".charting.plot2d.Default";}_3e2(node,type,kw);return o;};_3e5=function(node){var plot=node.getAttribute("plot"),type=node.getAttribute("type");if(!plot){plot="default";}var o={plot:plot,kwArgs:{}},kw=o.kwArgs;if(type){if(dc.action2d[type]){type=dojox._scopeName+".charting.action2d."+type;}var _3f0=eval("("+type+")");if(!_3f0){return null;}o.action=_3f0;}else{return null;}_3e2(node,type,kw);return o;};_3e6=function(node){var ga=d.partial(d.attr,node);var name=ga("name");if(!name){return null;}var o={name:name,kwArgs:{}},kw=o.kwArgs,t;t=ga("plot");if(t!=null){kw.plot=t;}t=ga("marker");if(t!=null){kw.marker=t;}t=ga("stroke");if(t!=null){kw.stroke=eval("("+t+")");}t=ga("fill");if(t!=null){kw.fill=eval("("+t+")");}t=ga("legend");if(t!=null){kw.legend=t;}t=ga("data");if(t!=null){o.type="data";o.data=dojo.map(String(t).split(","),Number);return o;}t=ga("array");if(t!=null){o.type="data";o.data=eval("("+t+")");return o;}t=ga("store");if(t!=null){o.type="store";o.data=eval("("+t+")");t=ga("field");o.field=t!=null?t:"value";t=ga("query");if(!!t){kw.query=t;}t=ga("queryOptions");if(!!t){kw.queryOptions=eval("("+t+")");}t=ga("start");if(!!t){kw.start=Number(t);}t=ga("count");if(!!t){kw.count=Number(t);}t=ga("sort");if(!!t){kw.sort=eval("("+t+")");}t=ga("valueFn");if(!!t){kw.valueFn=df.lambda(t);}return o;}return null;};})();}if(!dojo._hasResource["dojox.charting.themes.ET.greys"]){dojo._hasResource["dojox.charting.themes.ET.greys"]=true;dojo.provide("dojox.charting.themes.ET.greys");dojo.deprecated("dojox.charting.themes.ET.greys","1.3");(function(){var dxc=dojox.charting;dxc.themes.ET.greys=new dxc.Theme({antiAlias:false,chart:{stroke:null,fill:"inherit"},plotarea:{stroke:null,fill:"transparent"},axis:{stroke:{width:0},line:{width:0},majorTick:{color:"#666666",width:1,length:5},minorTick:{color:"black",width:0.5,length:2},font:"normal normal normal 8pt Tahoma",fontColor:"#999999"},series:{outline:{width:0,color:"black"},stroke:{width:1,color:"black"},fill:dojo.colorFromHex("#3b444b"),font:"normal normal normal 7pt Tahoma",fontColor:"#717171"},marker:{stroke:{width:1},fill:"#333",font:"normal normal normal 7pt Tahoma",fontColor:"#000"},colors:[dojo.colorFromHex("#8a8c8f"),dojo.colorFromHex("#4b4b4b"),dojo.colorFromHex("#3b444b"),dojo.colorFromHex("#2e2d30"),dojo.colorFromHex("#000000")]});})();}if(!dojo._hasResource["dojox.charting.widget.Sparkline"]){dojo._hasResource["dojox.charting.widget.Sparkline"]=true;dojo.provide("dojox.charting.widget.Sparkline");(function(){var d=dojo;dojo.declare("dojox.charting.widget.Sparkline",dojox.charting.widget.Chart2D,{theme:dojox.charting.themes.ET.greys,margins:{l:0,r:0,t:0,b:0},type:"Lines",valueFn:"Number(x)",store:"",field:"",query:"",queryOptions:"",start:"0",count:"Infinity",sort:"",data:"",name:"default",buildRendering:function(){var n=this.srcNodeRef;if(!n.childNodes.length||!d.query("> .axis, > .plot, > .action, > .series",n).length){var plot=document.createElement("div");d.attr(plot,{"class":"plot","name":"default","type":this.type});n.appendChild(plot);var _3f1=document.createElement("div");d.attr(_3f1,{"class":"series",plot:"default",name:this.name,start:this.start,count:this.count,valueFn:this.valueFn});d.forEach(["store","field","query","queryOptions","sort","data"],function(i){if(this[i].length){d.attr(_3f1,i,this[i]);}},this);n.appendChild(_3f1);}this.inherited(arguments);}});})();}if(!dojo._hasResource["dojox.charting.widget.Legend"]){dojo._hasResource["dojox.charting.widget.Legend"]=true;dojo.provide("dojox.charting.widget.Legend");dojo.declare("dojox.charting.widget.Legend",[dijit._Widget,dijit._Templated],{chartRef:"",horizontal:true,swatchSize:18,templateString:"<table dojoAttachPoint='legendNode' class='dojoxLegendNode'><tbody dojoAttachPoint='legendBody'></tbody></table>",legendNode:null,legendBody:null,postCreate:function(){if(!this.chart){if(!this.chartRef){return;}this.chart=dijit.byId(this.chartRef);if(!this.chart){var node=dojo.byId(this.chartRef);if(node){this.chart=dijit.byNode(node);}else{return;}}this.series=this.chart.chart.series;}else{this.series=this.chart.series;}this.refresh();},refresh:function(){var df=dojox.lang.functional;if(this._surfaces){dojo.forEach(this._surfaces,function(_3f2){_3f2.destroy();});}this._surfaces=[];while(this.legendBody.lastChild){dojo.destroy(this.legendBody.lastChild);}if(this.horizontal){dojo.addClass(this.legendNode,"dojoxLegendHorizontal");this._tr=dojo.doc.createElement("tr");this.legendBody.appendChild(this._tr);}var s=this.series;if(s.length==0){return;}if(s[0].chart.stack[0].declaredClass=="dojox.charting.plot2d.Pie"){var t=s[0].chart.stack[0];if(typeof t.run.data[0]=="number"){var _3f3=df.map(t.run.data,"Math.max(x, 0)");if(df.every(_3f3,"<= 0")){return;}var _3f4=df.map(_3f3,"/this",df.foldl(_3f3,"+",0));dojo.forEach(_3f4,function(x,i){this._addLabel(t.dyn[i],t._getLabel(x*100)+"%");},this);}else{dojo.forEach(t.run.data,function(x,i){this._addLabel(t.dyn[i],x.legend||x.text||x.y);},this);}}else{dojo.forEach(s,function(x){this._addLabel(x.dyn,x.legend||x.name);},this);}},_addLabel:function(dyn,_3f5){var icon=dojo.doc.createElement("td"),text=dojo.doc.createElement("td"),div=dojo.doc.createElement("div");dojo.addClass(icon,"dojoxLegendIcon");dojo.addClass(text,"dojoxLegendText");div.style.width=this.swatchSize+"px";div.style.height=this.swatchSize+"px";icon.appendChild(div);if(this._tr){this._tr.appendChild(icon);this._tr.appendChild(text);}else{var tr=dojo.doc.createElement("tr");this.legendBody.appendChild(tr);tr.appendChild(icon);tr.appendChild(text);}this._makeIcon(div,dyn);text.innerHTML=String(_3f5);},_makeIcon:function(div,dyn){var mb={h:this.swatchSize,w:this.swatchSize};var _3f6=dojox.gfx.createSurface(div,mb.w,mb.h);this._surfaces.push(_3f6);if(dyn.fill){_3f6.createRect({x:2,y:2,width:mb.w-4,height:mb.h-4}).setFill(dyn.fill).setStroke(dyn.stroke);}else{if(dyn.stroke||dyn.marker){var line={x1:0,y1:mb.h/2,x2:mb.w,y2:mb.h/2};if(dyn.stroke){_3f6.createLine(line).setStroke(dyn.stroke);}if(dyn.marker){var c={x:mb.w/2,y:mb.h/2};if(dyn.stroke){_3f6.createPath({path:"M"+c.x+" "+c.y+" "+dyn.marker}).setFill(dyn.stroke.color).setStroke(dyn.stroke);}else{_3f6.createPath({path:"M"+c.x+" "+c.y+" "+dyn.marker}).setFill(dyn.color).setStroke(dyn.color);}}}else{_3f6.createRect({x:2,y:2,width:mb.w-4,height:mb.h-4}).setStroke("black");_3f6.createLine({x1:2,y1:2,x2:mb.w-2,y2:mb.h-2}).setStroke("black");_3f6.createLine({x1:2,y1:mb.h-2,x2:mb.w-2,y2:2}).setStroke("black");}}}});}
diff --git a/js/dojo/dojox/collections.js b/js/dojo/dojox/collections.js
--- a/js/dojo/dojox/collections.js
+++ b/js/dojo/dojox/collections.js
@@ -1,6 +1,12 @@
-if(!dojo._hasResource["dojox.collections"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.collections"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.collections"]){
+dojo._hasResource["dojox.collections"]=true;
dojo.provide("dojox.collections");
dojo.require("dojox.collections._base");
-
}
diff --git a/js/dojo/dojox/collections/ArrayList.js b/js/dojo/dojox/collections/ArrayList.js
--- a/js/dojo/dojox/collections/ArrayList.js
+++ b/js/dojo/dojox/collections/ArrayList.js
@@ -1,133 +1,104 @@
-if(!dojo._hasResource["dojox.collections.ArrayList"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.collections.ArrayList"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.collections.ArrayList"]){
+dojo._hasResource["dojox.collections.ArrayList"]=true;
dojo.provide("dojox.collections.ArrayList");
dojo.require("dojox.collections._base");
-
-dojox.collections.ArrayList=function(/* array? */arr){
- // summary
- // Returns a new object of type dojox.collections.ArrayList
- var items=[];
- if(arr) items=items.concat(arr);
- this.count=items.length;
- this.add=function(/* object */obj){
- // summary
- // Add an element to the collection.
- items.push(obj);
- this.count=items.length;
- };
- this.addRange=function(/* array */a){
- // summary
- // Add a range of objects to the ArrayList
- if(a.getIterator){
- var e=a.getIterator();
- while(!e.atEnd()){
- this.add(e.get());
- }
- this.count=items.length;
- }else{
- for(var i=0; i<a.length; i++){
- items.push(a[i]);
- }
- this.count=items.length;
- }
- };
- this.clear=function(){
- // summary
- // Clear all elements out of the collection, and reset the count.
- items.splice(0, items.length);
- this.count=0;
- };
- this.clone=function(){
- // summary
- // Clone the array list
- return new dojox.collections.ArrayList(items); // dojox.collections.ArrayList
- };
- this.contains=function(/* object */obj){
- // summary
- // Check to see if the passed object is a member in the ArrayList
- for(var i=0; i < items.length; i++){
- if(items[i] == obj) {
- return true; // bool
- }
- }
- return false; // bool
- };
- this.forEach=function(/* function */ fn, /* object? */ scope){
- // summary
- // functional iterator, following the mozilla spec.
- dojo.forEach(items, fn, scope);
- };
- this.getIterator=function(){
- // summary
- // Get an Iterator for this object
- return new dojox.collections.Iterator(items); // dojox.collections.Iterator
- };
- this.indexOf=function(/* object */obj){
- // summary
- // Return the numeric index of the passed object; will return -1 if not found.
- for(var i=0; i < items.length; i++){
- if(items[i] == obj) {
- return i; // int
- }
- }
- return -1; // int
- };
- this.insert=function(/* int */ i, /* object */ obj){
- // summary
- // Insert the passed object at index i
- items.splice(i,0,obj);
- this.count=items.length;
- };
- this.item=function(/* int */ i){
- // summary
- // return the element at index i
- return items[i]; // object
- };
- this.remove=function(/* object */obj){
- // summary
- // Look for the passed object, and if found, remove it from the internal array.
- var i=this.indexOf(obj);
- if(i >=0) {
- items.splice(i,1);
- }
- this.count=items.length;
- };
- this.removeAt=function(/* int */ i){
- // summary
- // return an array with function applied to all elements
- items.splice(i,1);
- this.count=items.length;
- };
- this.reverse=function(){
- // summary
- // Reverse the internal array
- items.reverse();
- };
- this.sort=function(/* function? */ fn){
- // summary
- // sort the internal array
- if(fn){
- items.sort(fn);
- }else{
- items.sort();
- }
- };
- this.setByIndex=function(/* int */ i, /* object */ obj){
- // summary
- // Set an element in the array by the passed index.
- items[i]=obj;
- this.count=items.length;
- };
- this.toArray=function(){
- // summary
- // Return a new array with all of the items of the internal array concatenated.
- return [].concat(items);
- }
- this.toString=function(/* string */ delim){
- // summary
- // implementation of toString, follows [].toString();
- return items.join((delim||","));
- };
+dojox.collections.ArrayList=function(_1){
+var _2=[];
+if(_1){
+_2=_2.concat(_1);
+}
+this.count=_2.length;
+this.add=function(_3){
+_2.push(_3);
+this.count=_2.length;
+};
+this.addRange=function(a){
+if(a.getIterator){
+var e=a.getIterator();
+while(!e.atEnd()){
+this.add(e.get());
+}
+this.count=_2.length;
+}else{
+for(var i=0;i<a.length;i++){
+_2.push(a[i]);
+}
+this.count=_2.length;
+}
+};
+this.clear=function(){
+_2.splice(0,_2.length);
+this.count=0;
+};
+this.clone=function(){
+return new dojox.collections.ArrayList(_2);
+};
+this.contains=function(_4){
+for(var i=0;i<_2.length;i++){
+if(_2[i]==_4){
+return true;
+}
+}
+return false;
+};
+this.forEach=function(fn,_5){
+dojo.forEach(_2,fn,_5);
+};
+this.getIterator=function(){
+return new dojox.collections.Iterator(_2);
};
-
+this.indexOf=function(_6){
+for(var i=0;i<_2.length;i++){
+if(_2[i]==_6){
+return i;
+}
+}
+return -1;
+};
+this.insert=function(i,_7){
+_2.splice(i,0,_7);
+this.count=_2.length;
+};
+this.item=function(i){
+return _2[i];
+};
+this.remove=function(_8){
+var i=this.indexOf(_8);
+if(i>=0){
+_2.splice(i,1);
}
+this.count=_2.length;
+};
+this.removeAt=function(i){
+_2.splice(i,1);
+this.count=_2.length;
+};
+this.reverse=function(){
+_2.reverse();
+};
+this.sort=function(fn){
+if(fn){
+_2.sort(fn);
+}else{
+_2.sort();
+}
+};
+this.setByIndex=function(i,_9){
+_2[i]=_9;
+this.count=_2.length;
+};
+this.toArray=function(){
+return [].concat(_2);
+};
+this.toString=function(_a){
+return _2.join((_a||","));
+};
+};
+}
diff --git a/js/dojo/dojox/collections/BinaryTree.js b/js/dojo/dojox/collections/BinaryTree.js
--- a/js/dojo/dojox/collections/BinaryTree.js
+++ b/js/dojo/dojox/collections/BinaryTree.js
@@ -1,211 +1,255 @@
-if(!dojo._hasResource["dojox.collections.BinaryTree"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.collections.BinaryTree"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.collections.BinaryTree"]){
+dojo._hasResource["dojox.collections.BinaryTree"]=true;
dojo.provide("dojox.collections.BinaryTree");
dojo.require("dojox.collections._base");
-
-dojox.collections.BinaryTree=function(data){
- function node(data, rnode, lnode){
- this.value=data||null;
- this.right=rnode||null;
- this.left=lnode||null;
- this.clone=function(){
- var c=new node();
- if(this.value.value){
- c.value=this.value.clone();
- }else{
- c.value=this.value;
- }
- if(this.left!=null){
- c.left=this.left.clone();
- }
- if(this.right!=null){
- c.right=this.right.clone();
- }
- return c;
- }
- this.compare=function(n){
- if(this.value>n.value){ return 1; }
- if(this.value<n.value){ return -1; }
- return 0;
- }
- this.compareData=function(d){
- if(this.value>d){ return 1; }
- if(this.value<d){ return -1; }
- return 0;
- }
- }
-
- function inorderTraversalBuildup(current, a){
- if(current){
- inorderTraversalBuildup(current.left, a);
- a.push(current.value);
- inorderTraversalBuildup(current.right, a);
- }
- }
-
- function preorderTraversal(current, sep){
- var s="";
- if (current){
- s=current.value.toString() + sep;
- s+=preorderTraversal(current.left, sep);
- s+=preorderTraversal(current.right, sep);
- }
- return s;
- }
- function inorderTraversal(current, sep){
- var s="";
- if (current){
- s=inorderTraversal(current.left, sep);
- s+=current.value.toString() + sep;
- s+=inorderTraversal(current.right, sep);
- }
- return s;
- }
- function postorderTraversal(current, sep){
- var s="";
- if (current){
- s=postorderTraversal(current.left, sep);
- s+=postorderTraversal(current.right, sep);
- s+=current.value.toString() + sep;
- }
- return s;
- }
-
- function searchHelper(current, data){
- if(!current){ return null; }
- var i=current.compareData(data);
- if(i==0){ return current; }
- if(i>0){ return searchHelper(current.left, data); }
- else{ return searchHelper(current.right, data); }
- }
-
- this.add=function(data){
- var n=new node(data);
- var i;
- var current=root;
- var parent=null;
- while(current){
- i=current.compare(n);
- if(i==0){ return; }
- parent=current;
- if(i>0){ current=current.left; }
- else{ current=current.right; }
- }
- this.count++;
- if(!parent){
- root=n;
- }else{
- i=parent.compare(n);
- if(i>0){
- parent.left=n;
- }else{
- parent.right=n;
- }
- }
- };
- this.clear=function(){
- root=null;
- this.count=0;
- };
- this.clone=function(){
- var c=new dojox.collections.BinaryTree();
- var itr=this.getIterator();
- while(!itr.atEnd()){
- c.add(itr.get());
- }
- return c;
- };
- this.contains=function(data){
- return this.search(data) != null;
- };
- this.deleteData=function(data){
- var current=root;
- var parent=null;
- var i=current.compareData(data);
- while(i!=0&&current!=null){
- if(i>0){
- parent=current;
- current=current.left;
- }else if(i<0){
- parent=current;
- current=current.right;
- }
- i=current.compareData(data);
- }
- if(!current){ return; }
- this.count--;
- if(!current.right){
- if(!parent){
- root=current.left;
- }else{
- i=parent.compare(current);
- if(i>0){ parent.left=current.left; }
- else if(i<0){ parent.right=current.left; }
- }
- }
- else if(!current.right.left){
- if(!parent){
- root=current.right;
- }else{
- i=parent.compare(current);
- if(i>0){ parent.left=current.right; }
- else if(i<0){ parent.right=current.right; }
- }
- }
- else{
- var leftmost=current.right.left;
- var lmParent=current.right;
- while(leftmost.left!=null){
- lmParent=leftmost;
- leftmost=leftmost.left;
- }
- lmParent.left=leftmost.right;
- leftmost.left=current.left;
- leftmost.right=current.right;
- if(!parent){
- root=leftmost;
- }else{
- i=parent.compare(current);
- if(i>0){ parent.left=leftmost; }
- else if(i<0){ parent.right=leftmost; }
- }
- }
- };
- this.getIterator=function(){
- var a=[];
- inorderTraversalBuildup(root, a);
- return new dojox.collections.Iterator(a);
- };
- this.search=function(data){
- return searchHelper(root, data);
- };
- this.toString=function(order, sep){
- if(!order){ order=dojox.collections.BinaryTree.TraversalMethods.Inorder; }
- if(!sep){ sep=","; }
- var s="";
- switch(order){
- case dojox.collections.BinaryTree.TraversalMethods.Preorder:
- s=preorderTraversal(root, sep);
- break;
- case dojox.collections.BinaryTree.TraversalMethods.Inorder:
- s=inorderTraversal(root, sep);
- break;
- case dojox.collections.BinaryTree.TraversalMethods.Postorder:
- s=postorderTraversal(root, sep);
- break;
- };
- if(s.length==0){ return ""; }
- else{ return s.substring(0, s.length - sep.length); }
- };
-
- this.count=0;
- var root=this.root=null;
- if(data){
- this.add(data);
- }
+dojox.collections.BinaryTree=function(_1){
+function _2(_3,_4,_5){
+this.value=_3||null;
+this.right=_4||null;
+this.left=_5||null;
+this.clone=function(){
+var c=new _2();
+if(this.value.value){
+c.value=this.value.clone();
+}else{
+c.value=this.value;
+}
+if(this.left!=null){
+c.left=this.left.clone();
+}
+if(this.right!=null){
+c.right=this.right.clone();
+}
+return c;
+};
+this.compare=function(n){
+if(this.value>n.value){
+return 1;
+}
+if(this.value<n.value){
+return -1;
+}
+return 0;
+};
+this.compareData=function(d){
+if(this.value>d){
+return 1;
+}
+if(this.value<d){
+return -1;
+}
+return 0;
+};
+};
+function _6(_7,a){
+if(_7){
+_6(_7.left,a);
+a.push(_7.value);
+_6(_7.right,a);
+}
+};
+function _8(_9,_a){
+var s="";
+if(_9){
+s=_9.value.toString()+_a;
+s+=_8(_9.left,_a);
+s+=_8(_9.right,_a);
+}
+return s;
+};
+function _b(_c,_d){
+var s="";
+if(_c){
+s=_b(_c.left,_d);
+s+=_c.value.toString()+_d;
+s+=_b(_c.right,_d);
+}
+return s;
+};
+function _e(_f,sep){
+var s="";
+if(_f){
+s=_e(_f.left,sep);
+s+=_e(_f.right,sep);
+s+=_f.value.toString()+sep;
+}
+return s;
+};
+function _10(_11,_12){
+if(!_11){
+return null;
+}
+var i=_11.compareData(_12);
+if(i==0){
+return _11;
+}
+if(i>0){
+return _10(_11.left,_12);
+}else{
+return _10(_11.right,_12);
+}
+};
+this.add=function(_13){
+var n=new _2(_13);
+var i;
+var _14=_15;
+var _16=null;
+while(_14){
+i=_14.compare(n);
+if(i==0){
+return;
+}
+_16=_14;
+if(i>0){
+_14=_14.left;
+}else{
+_14=_14.right;
+}
+}
+this.count++;
+if(!_16){
+_15=n;
+}else{
+i=_16.compare(n);
+if(i>0){
+_16.left=n;
+}else{
+_16.right=n;
+}
}
-dojox.collections.BinaryTree.TraversalMethods={
- Preorder: 1, Inorder: 2, Postorder: 3
+};
+this.clear=function(){
+_15=null;
+this.count=0;
+};
+this.clone=function(){
+var c=new dojox.collections.BinaryTree();
+var itr=this.getIterator();
+while(!itr.atEnd()){
+c.add(itr.get());
+}
+return c;
+};
+this.contains=function(_17){
+return this.search(_17)!=null;
};
-
+this.deleteData=function(_18){
+var _19=_15;
+var _1a=null;
+var i=_19.compareData(_18);
+while(i!=0&&_19!=null){
+if(i>0){
+_1a=_19;
+_19=_19.left;
+}else{
+if(i<0){
+_1a=_19;
+_19=_19.right;
+}
+}
+i=_19.compareData(_18);
+}
+if(!_19){
+return;
+}
+this.count--;
+if(!_19.right){
+if(!_1a){
+_15=_19.left;
+}else{
+i=_1a.compare(_19);
+if(i>0){
+_1a.left=_19.left;
+}else{
+if(i<0){
+_1a.right=_19.left;
+}
+}
+}
+}else{
+if(!_19.right.left){
+if(!_1a){
+_15=_19.right;
+}else{
+i=_1a.compare(_19);
+if(i>0){
+_1a.left=_19.right;
+}else{
+if(i<0){
+_1a.right=_19.right;
+}
+}
+}
+}else{
+var _1b=_19.right.left;
+var _1c=_19.right;
+while(_1b.left!=null){
+_1c=_1b;
+_1b=_1b.left;
}
+_1c.left=_1b.right;
+_1b.left=_19.left;
+_1b.right=_19.right;
+if(!_1a){
+_15=_1b;
+}else{
+i=_1a.compare(_19);
+if(i>0){
+_1a.left=_1b;
+}else{
+if(i<0){
+_1a.right=_1b;
+}
+}
+}
+}
+}
+};
+this.getIterator=function(){
+var a=[];
+_6(_15,a);
+return new dojox.collections.Iterator(a);
+};
+this.search=function(_1d){
+return _10(_15,_1d);
+};
+this.toString=function(_1e,sep){
+if(!_1e){
+_1e=dojox.collections.BinaryTree.TraversalMethods.Inorder;
+}
+if(!sep){
+sep=",";
+}
+var s="";
+switch(_1e){
+case dojox.collections.BinaryTree.TraversalMethods.Preorder:
+s=_8(_15,sep);
+break;
+case dojox.collections.BinaryTree.TraversalMethods.Inorder:
+s=_b(_15,sep);
+break;
+case dojox.collections.BinaryTree.TraversalMethods.Postorder:
+s=_e(_15,sep);
+break;
+}
+if(s.length==0){
+return "";
+}else{
+return s.substring(0,s.length-sep.length);
+}
+};
+this.count=0;
+var _15=this.root=null;
+if(_1){
+this.add(_1);
+}
+};
+dojox.collections.BinaryTree.TraversalMethods={Preorder:1,Inorder:2,Postorder:3};
+}
diff --git a/js/dojo/dojox/collections/Dictionary.js b/js/dojo/dojox/collections/Dictionary.js
--- a/js/dojo/dojox/collections/Dictionary.js
+++ b/js/dojo/dojox/collections/Dictionary.js
@@ -1,116 +1,91 @@
-if(!dojo._hasResource["dojox.collections.Dictionary"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.collections.Dictionary"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.collections.Dictionary"]){
+dojo._hasResource["dojox.collections.Dictionary"]=true;
dojo.provide("dojox.collections.Dictionary");
dojo.require("dojox.collections._base");
-
-dojox.collections.Dictionary=function(/* dojox.collections.Dictionary? */dictionary){
- // summary
- // Returns an object of type dojox.collections.Dictionary
- var items={};
- this.count=0;
-
- // comparator for property addition and access.
- var testObject={};
-
- this.add=function(/* string */k, /* object */v){
- // summary
- // Add a new item to the Dictionary.
- var b=(k in items);
- items[k]=new dojox.collections.DictionaryEntry(k,v);
- if(!b){
- this.count++;
- }
- };
- this.clear=function(){
- // summary
- // Clears the internal dictionary.
- items={};
- this.count=0;
- };
- this.clone=function(){
- // summary
- // Returns a new instance of dojox.collections.Dictionary; note the the dictionary is a clone but items might not be.
- return new dojox.collections.Dictionary(this); // dojox.collections.Dictionary
- };
- this.contains=this.containsKey=function(/* string */k){
- // summary
- // Check to see if the dictionary has an entry at key "k".
- if(testObject[k]){
- return false; // bool
- }
- return (items[k]!=null); // bool
- };
- this.containsValue=function(/* object */v){
- // summary
- // Check to see if the dictionary has an entry with value "v".
- var e=this.getIterator();
- while(e.get()){
- if(e.element.value==v){
- return true; // bool
- }
- }
- return false; // bool
- };
- this.entry=function(/* string */k){
- // summary
- // Accessor method; similar to dojox.collections.Dictionary.item but returns the actual Entry object.
- return items[k]; // dojox.collections.DictionaryEntry
- };
- this.forEach=function(/* function */ fn, /* object? */ scope){
- // summary
- // functional iterator, following the mozilla spec.
- var a=[]; // Create an indexing array
- for(var p in items) {
- if(!testObject[p]){
- a.push(items[p]); // fill it up
- }
- }
- dojo.forEach(a, fn, scope);
- };
- this.getKeyList=function(){
- // summary
- // Returns an array of the keys in the dictionary.
- return (this.getIterator()).map(function(entry){
- return entry.key;
- }); // array
- };
- this.getValueList=function(){
- // summary
- // Returns an array of the values in the dictionary.
- return (this.getIterator()).map(function(entry){
- return entry.value;
- }); // array
- };
- this.item=function(/* string */k){
- // summary
- // Accessor method.
- if(k in items){
- return items[k].valueOf(); // object
- }
- return undefined; // object
- };
- this.getIterator=function(){
- // summary
- // Gets a dojox.collections.DictionaryIterator for iteration purposes.
- return new dojox.collections.DictionaryIterator(items); // dojox.collections.DictionaryIterator
- };
- this.remove=function(/* string */k){
- // summary
- // Removes the item at k from the internal collection.
- if(k in items && !testObject[k]){
- delete items[k];
- this.count--;
- return true; // bool
- }
- return false; // bool
- };
-
- if (dictionary){
- var e=dictionary.getIterator();
- while(e.get()) {
- this.add(e.element.key, e.element.value);
- }
- }
+dojox.collections.Dictionary=function(_1){
+var _2={};
+this.count=0;
+var _3={};
+this.add=function(k,v){
+var b=(k in _2);
+_2[k]=new dojox.collections.DictionaryEntry(k,v);
+if(!b){
+this.count++;
+}
+};
+this.clear=function(){
+_2={};
+this.count=0;
+};
+this.clone=function(){
+return new dojox.collections.Dictionary(this);
+};
+this.contains=this.containsKey=function(k){
+if(_3[k]){
+return false;
+}
+return (_2[k]!=null);
+};
+this.containsValue=function(v){
+var e=this.getIterator();
+while(e.get()){
+if(e.element.value==v){
+return true;
+}
+}
+return false;
+};
+this.entry=function(k){
+return _2[k];
};
-
+this.forEach=function(fn,_4){
+var a=[];
+for(var p in _2){
+if(!_3[p]){
+a.push(_2[p]);
+}
}
+dojo.forEach(a,fn,_4);
+};
+this.getKeyList=function(){
+return (this.getIterator()).map(function(_5){
+return _5.key;
+});
+};
+this.getValueList=function(){
+return (this.getIterator()).map(function(_6){
+return _6.value;
+});
+};
+this.item=function(k){
+if(k in _2){
+return _2[k].valueOf();
+}
+return undefined;
+};
+this.getIterator=function(){
+return new dojox.collections.DictionaryIterator(_2);
+};
+this.remove=function(k){
+if(k in _2&&!_3[k]){
+delete _2[k];
+this.count--;
+return true;
+}
+return false;
+};
+if(_1){
+var e=_1.getIterator();
+while(e.get()){
+this.add(e.element.key,e.element.value);
+}
+}
+};
+}
diff --git a/js/dojo/dojox/collections/Queue.js b/js/dojo/dojox/collections/Queue.js
--- a/js/dojo/dojox/collections/Queue.js
+++ b/js/dojo/dojox/collections/Queue.js
@@ -1,74 +1,57 @@
-if(!dojo._hasResource["dojox.collections.Queue"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.collections.Queue"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.collections.Queue"]){
+dojo._hasResource["dojox.collections.Queue"]=true;
dojo.provide("dojox.collections.Queue");
dojo.require("dojox.collections._base");
-
-dojox.collections.Queue=function(/* array? */arr){
- // summary
- // return an object of type dojox.collections.Queue
- var q=[];
- if (arr){
- q=q.concat(arr);
- }
- this.count=q.length;
- this.clear=function(){
- // summary
- // clears the internal collection
- q=[];
- this.count=q.length;
- };
- this.clone=function(){
- // summary
- // creates a new Queue based on this one
- return new dojox.collections.Queue(q); // dojox.collections.Queue
- };
- this.contains=function(/* object */ o){
- // summary
- // Check to see if the passed object is an element in this queue
- for(var i=0; i<q.length; i++){
- if (q[i]==o){
- return true; // bool
- }
- }
- return false; // bool
- };
- this.copyTo=function(/* array */ arr, /* int */ i){
- // summary
- // Copy the contents of this queue into the passed array at index i.
- arr.splice(i,0,q);
- };
- this.dequeue=function(){
- // summary
- // shift the first element off the queue and return it
- var r=q.shift();
- this.count=q.length;
- return r; // object
- };
- this.enqueue=function(/* object */ o){
- // summary
- // put the passed object at the end of the queue
- this.count=q.push(o);
- };
- this.forEach=function(/* function */ fn, /* object? */ scope){
- // summary
- // functional iterator, following the mozilla spec.
- dojo.forEach(q, fn, scope);
- };
- this.getIterator=function(){
- // summary
- // get an Iterator based on this queue.
- return new dojox.collections.Iterator(q); // dojox.collections.Iterator
- };
- this.peek=function(){
- // summary
- // get the next element in the queue without altering the queue.
- return q[0];
- };
- this.toArray=function(){
- // summary
- // return an array based on the internal array of the queue.
- return [].concat(q);
- };
+dojox.collections.Queue=function(_1){
+var q=[];
+if(_1){
+q=q.concat(_1);
+}
+this.count=q.length;
+this.clear=function(){
+q=[];
+this.count=q.length;
+};
+this.clone=function(){
+return new dojox.collections.Queue(q);
+};
+this.contains=function(o){
+for(var i=0;i<q.length;i++){
+if(q[i]==o){
+return true;
+}
+}
+return false;
};
-
+this.copyTo=function(_2,i){
+_2.splice(i,0,q);
+};
+this.dequeue=function(){
+var r=q.shift();
+this.count=q.length;
+return r;
+};
+this.enqueue=function(o){
+this.count=q.push(o);
+};
+this.forEach=function(fn,_3){
+dojo.forEach(q,fn,_3);
+};
+this.getIterator=function(){
+return new dojox.collections.Iterator(q);
+};
+this.peek=function(){
+return q[0];
+};
+this.toArray=function(){
+return [].concat(q);
+};
+};
}
diff --git a/js/dojo/dojox/collections/README b/js/dojo/dojox/collections/README
--- a/js/dojo/dojox/collections/README
+++ b/js/dojo/dojox/collections/README
@@ -1,39 +1,39 @@
-------------------------------------------------------------------------------
DojoX Collections
-------------------------------------------------------------------------------
Version 0.9
Release date: 05/27/2007
-------------------------------------------------------------------------------
-Project state: stable
+Project state: production
-------------------------------------------------------------------------------
Project authors
Tom Trenka (ttrenka@gmail.com)
-------------------------------------------------------------------------------
Project description
DojoX Collections is the port of the original Dojo 0.4.x collection classes.
It is intended for use by people who are looking for a little bit more
functionality out of common collections, like ArrayLists or Dictionaries.
Included are the Iterator and DictionaryIterator classes, both of which can
operate on standard arrays and objects (respectively).
-------------------------------------------------------------------------------
Dependencies:
DojoX Collections has no dependencies, outside of Dojo Core.
-------------------------------------------------------------------------------
Documentation
See the API documentation for Dojo (http://dojotoolkit.org/api).
-------------------------------------------------------------------------------
Installation instructions
Grab the following from the Dojo SVN Repository:
http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/collections.js
http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/collections/*
Install into the following directory structure:
/dojox/collections/
...which should be at the same level as your Dojo checkout.
-------------------------------------------------------------------------------
diff --git a/js/dojo/dojox/collections/Set.js b/js/dojo/dojox/collections/Set.js
--- a/js/dojo/dojox/collections/Set.js
+++ b/js/dojo/dojox/collections/Set.js
@@ -1,89 +1,84 @@
-if(!dojo._hasResource["dojox.collections.Set"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.collections.Set"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.collections.Set"]){
+dojo._hasResource["dojox.collections.Set"]=true;
dojo.provide("dojox.collections.Set");
dojo.require("dojox.collections.ArrayList");
-
(function(){
- var dxc=dojox.collections;
- dxc.Set=new (function(){
- function conv(arr){
- if(arr.constructor==Array){
- return new dojox.collections.ArrayList(arr); // dojox.collections.ArrayList
- }
- return arr; // dojox.collections.ArrayList
- }
- this.union = function(/* array */setA, /* array */setB){
- // summary
- // Return the union of the two passed sets.
- setA=conv(setA);
- setB=conv(setB);
- var result = new dojox.collections.ArrayList(setA.toArray());
- var e = setB.getIterator();
- while(!e.atEnd()){
- var item=e.get();
- if(!result.contains(item)){
- result.add(item);
- }
- }
- return result; // dojox.collections.ArrayList
- };
- this.intersection = function(/* array */setA, /* array */setB){
- // summary
- // Return the intersection of the two passed sets.
- setA=conv(setA);
- setB=conv(setB);
- var result = new dojox.collections.ArrayList();
- var e = setB.getIterator();
- while(!e.atEnd()){
- var item=e.get();
- if(setA.contains(item)){
- result.add(item);
- }
- }
- return result; // dojox.collections.ArrayList
- };
- this.difference = function(/* array */setA, /* array */setB){
- // summary
- // Returns everything in setA that is not in setB.
- setA=conv(setA);
- setB=conv(setB);
- var result = new dojox.collections.ArrayList();
- var e=setA.getIterator();
- while(!e.atEnd()){
- var item=e.get();
- if(!setB.contains(item)){
- result.add(item);
- }
- }
- return result; // dojox.collections.ArrayList
- };
- this.isSubSet = function(/* array */setA, /* array */setB) {
- // summary
- // Returns if set B is a subset of set A.
- setA=conv(setA);
- setB=conv(setB);
- var e = setA.getIterator();
- while(!e.atEnd()){
- if(!setB.contains(e.get())){
- return false; // boolean
- }
- }
- return true; // boolean
- };
- this.isSuperSet = function(/* array */setA, /* array */setB){
- // summary
- // Returns if set B is a superset of set A.
- setA=conv(setA);
- setB=conv(setB);
- var e = setB.getIterator();
- while(!e.atEnd()){
- if(!setA.contains(e.get())){
- return false; // boolean
- }
- }
- return true; // boolean
- };
- })();
+var _1=dojox.collections;
+_1.Set=new (function(){
+function _2(_3){
+if(_3.constructor==Array){
+return new dojox.collections.ArrayList(_3);
+}
+return _3;
+};
+this.union=function(_4,_5){
+_4=_2(_4);
+_5=_2(_5);
+var _6=new dojox.collections.ArrayList(_4.toArray());
+var e=_5.getIterator();
+while(!e.atEnd()){
+var _7=e.get();
+if(!_6.contains(_7)){
+_6.add(_7);
+}
+}
+return _6;
+};
+this.intersection=function(_8,_9){
+_8=_2(_8);
+_9=_2(_9);
+var _a=new dojox.collections.ArrayList();
+var e=_9.getIterator();
+while(!e.atEnd()){
+var _b=e.get();
+if(_8.contains(_b)){
+_a.add(_b);
+}
+}
+return _a;
+};
+this.difference=function(_c,_d){
+_c=_2(_c);
+_d=_2(_d);
+var _e=new dojox.collections.ArrayList();
+var e=_c.getIterator();
+while(!e.atEnd()){
+var _f=e.get();
+if(!_d.contains(_f)){
+_e.add(_f);
+}
+}
+return _e;
+};
+this.isSubSet=function(_10,_11){
+_10=_2(_10);
+_11=_2(_11);
+var e=_10.getIterator();
+while(!e.atEnd()){
+if(!_11.contains(e.get())){
+return false;
+}
+}
+return true;
+};
+this.isSuperSet=function(_12,_13){
+_12=_2(_12);
+_13=_2(_13);
+var e=_13.getIterator();
+while(!e.atEnd()){
+if(!_12.contains(e.get())){
+return false;
+}
+}
+return true;
+};
})();
-
+})();
}
diff --git a/js/dojo/dojox/collections/SortedList.js b/js/dojo/dojox/collections/SortedList.js
--- a/js/dojo/dojox/collections/SortedList.js
+++ b/js/dojo/dojox/collections/SortedList.js
@@ -1,198 +1,161 @@
-if(!dojo._hasResource["dojox.collections.SortedList"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.collections.SortedList"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.collections.SortedList"]){
+dojo._hasResource["dojox.collections.SortedList"]=true;
dojo.provide("dojox.collections.SortedList");
dojo.require("dojox.collections._base");
-
-dojox.collections.SortedList=function(/* object? */ dictionary){
- // summary
- // creates a collection that acts like a dictionary but is also internally sorted.
- // Note that the act of adding any elements forces an internal resort, making this object potentially slow.
- var _this=this;
- var items={};
- var q=[];
- var sorter=function(a,b){
- if (a.key > b.key) return 1;
- if (a.key < b.key) return -1;
- return 0;
- };
- var build=function(){
- q=[];
- var e=_this.getIterator();
- while (!e.atEnd()){
- q.push(e.get());
- }
- q.sort(sorter);
- };
- var testObject={};
-
- this.count=q.length;
- this.add=function(/* string */ k,/* object */v){
- // summary
- // add the passed value to the dictionary at location k
- if (!items[k]) {
- items[k]=new dojox.collections.DictionaryEntry(k,v);
- this.count=q.push(items[k]);
- q.sort(sorter);
- }
- };
- this.clear=function(){
- // summary
- // clear the internal collections
- items={};
- q=[];
- this.count=q.length;
- };
- this.clone=function(){
- // summary
- // create a clone of this sorted list
- return new dojox.collections.SortedList(this); // dojox.collections.SortedList
- };
- this.contains=this.containsKey=function(/* string */ k){
- // summary
- // Check to see if the list has a location k
- if(testObject[k]){
- return false; // bool
- }
- return (items[k]!=null); // bool
- };
- this.containsValue=function(/* object */ o){
- // summary
- // Check to see if this list contains the passed object
- var e=this.getIterator();
- while (!e.atEnd()){
- var item=e.get();
- if(item.value==o){
- return true; // bool
- }
- }
- return false; // bool
- };
- this.copyTo=function(/* array */ arr, /* int */ i){
- // summary
- // copy the contents of the list into array arr at index i
- var e=this.getIterator();
- var idx=i;
- while(!e.atEnd()){
- arr.splice(idx,0,e.get());
- idx++;
- }
- };
- this.entry=function(/* string */ k){
- // summary
- // return the object at location k
- return items[k]; // dojox.collections.DictionaryEntry
- };
- this.forEach=function(/* function */ fn, /* object? */ scope){
- // summary
- // functional iterator, following the mozilla spec.
- dojo.forEach(q, fn, scope);
- };
- this.getByIndex=function(/* int */ i){
- // summary
- // return the item at index i
- return q[i].valueOf(); // object
- };
- this.getIterator=function(){
- // summary
- // get an iterator for this object
- return new dojox.collections.DictionaryIterator(items); // dojox.collections.DictionaryIterator
- };
- this.getKey=function(/* int */ i){
- // summary
- // return the key of the item at index i
- return q[i].key;
- };
- this.getKeyList=function(){
- // summary
- // return an array of the keys set in this list
- var arr=[];
- var e=this.getIterator();
- while (!e.atEnd()){
- arr.push(e.get().key);
- }
- return arr; // array
- };
- this.getValueList=function(){
- // summary
- // return an array of values in this list
- var arr=[];
- var e=this.getIterator();
- while (!e.atEnd()){
- arr.push(e.get().value);
- }
- return arr; // array
- };
- this.indexOfKey=function(/* string */ k){
- // summary
- // return the index of the passed key.
- for (var i=0; i<q.length; i++){
- if (q[i].key==k){
- return i; // int
- }
- }
- return -1; // int
- };
- this.indexOfValue=function(/* object */ o){
- // summary
- // return the first index of object o
- for (var i=0; i<q.length; i++){
- if (q[i].value==o){
- return i; // int
- }
- }
- return -1; // int
- };
- this.item=function(/* string */ k){
- // summary
- // return the value of the object at location k.
- if(k in items && !testObject[k]){
- return items[k].valueOf(); // object
- }
- return undefined; // object
- };
- this.remove=function(/* string */k){
- // summary
- // remove the item at location k and rebuild the internal collections.
- delete items[k];
- build();
- this.count=q.length;
- };
- this.removeAt=function(/* int */ i){
- // summary
- // remove the item at index i, and rebuild the internal collections.
- delete items[q[i].key];
- build();
- this.count=q.length;
- };
- this.replace=function(/* string */ k, /* object */ v){
- // summary
- // Replace an existing item if it's there, and add a new one if not.
- if (!items[k]){
- // we're adding a new object, return false
- this.add(k,v);
- return false; // bool
- }else{
- // we're replacing an object, return true
- items[k]=new dojox.collections.DictionaryEntry(k,v);
- build();
- return true; // bool
- }
- };
- this.setByIndex=function(/* int */ i, /* object */ o){
- // summary
- // set an item by index
- items[q[i].key].value=o;
- build();
- this.count=q.length;
- };
- if (dictionary){
- var e=dictionary.getIterator();
- while (!e.atEnd()){
- var item=e.get();
- q[q.length]=items[item.key]=new dojox.collections.DictionaryEntry(item.key,item.value);
- }
- q.sort(sorter);
- }
+dojox.collections.SortedList=function(_1){
+var _2=this;
+var _3={};
+var q=[];
+var _4=function(a,b){
+if(a.key>b.key){
+return 1;
+}
+if(a.key<b.key){
+return -1;
+}
+return 0;
+};
+var _5=function(){
+q=[];
+var e=_2.getIterator();
+while(!e.atEnd()){
+q.push(e.get());
+}
+q.sort(_4);
+};
+var _6={};
+this.count=q.length;
+this.add=function(k,v){
+if(!_3[k]){
+_3[k]=new dojox.collections.DictionaryEntry(k,v);
+this.count=q.push(_3[k]);
+q.sort(_4);
+}
+};
+this.clear=function(){
+_3={};
+q=[];
+this.count=q.length;
+};
+this.clone=function(){
+return new dojox.collections.SortedList(this);
+};
+this.contains=this.containsKey=function(k){
+if(_6[k]){
+return false;
+}
+return (_3[k]!=null);
+};
+this.containsValue=function(o){
+var e=this.getIterator();
+while(!e.atEnd()){
+var _7=e.get();
+if(_7.value==o){
+return true;
+}
+}
+return false;
+};
+this.copyTo=function(_8,i){
+var e=this.getIterator();
+var _9=i;
+while(!e.atEnd()){
+_8.splice(_9,0,e.get());
+_9++;
}
-
+};
+this.entry=function(k){
+return _3[k];
+};
+this.forEach=function(fn,_a){
+dojo.forEach(q,fn,_a);
+};
+this.getByIndex=function(i){
+return q[i].valueOf();
+};
+this.getIterator=function(){
+return new dojox.collections.DictionaryIterator(_3);
+};
+this.getKey=function(i){
+return q[i].key;
+};
+this.getKeyList=function(){
+var _b=[];
+var e=this.getIterator();
+while(!e.atEnd()){
+_b.push(e.get().key);
+}
+return _b;
+};
+this.getValueList=function(){
+var _c=[];
+var e=this.getIterator();
+while(!e.atEnd()){
+_c.push(e.get().value);
+}
+return _c;
+};
+this.indexOfKey=function(k){
+for(var i=0;i<q.length;i++){
+if(q[i].key==k){
+return i;
+}
+}
+return -1;
+};
+this.indexOfValue=function(o){
+for(var i=0;i<q.length;i++){
+if(q[i].value==o){
+return i;
}
+}
+return -1;
+};
+this.item=function(k){
+if(k in _3&&!_6[k]){
+return _3[k].valueOf();
+}
+return undefined;
+};
+this.remove=function(k){
+delete _3[k];
+_5();
+this.count=q.length;
+};
+this.removeAt=function(i){
+delete _3[q[i].key];
+_5();
+this.count=q.length;
+};
+this.replace=function(k,v){
+if(!_3[k]){
+this.add(k,v);
+return false;
+}else{
+_3[k]=new dojox.collections.DictionaryEntry(k,v);
+_5();
+return true;
+}
+};
+this.setByIndex=function(i,o){
+_3[q[i].key].value=o;
+_5();
+this.count=q.length;
+};
+if(_1){
+var e=_1.getIterator();
+while(!e.atEnd()){
+var _d=e.get();
+q[q.length]=_3[_d.key]=new dojox.collections.DictionaryEntry(_d.key,_d.value);
+}
+q.sort(_4);
+}
+};
+}
diff --git a/js/dojo/dojox/collections/Stack.js b/js/dojo/dojox/collections/Stack.js
--- a/js/dojo/dojox/collections/Stack.js
+++ b/js/dojo/dojox/collections/Stack.js
@@ -1,72 +1,57 @@
-if(!dojo._hasResource["dojox.collections.Stack"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.collections.Stack"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.collections.Stack"]){
+dojo._hasResource["dojox.collections.Stack"]=true;
dojo.provide("dojox.collections.Stack");
dojo.require("dojox.collections._base");
-
-dojox.collections.Stack=function(/* array? */arr){
- // summary
- // returns an object of type dojox.collections.Stack
- var q=[];
- if (arr) q=q.concat(arr);
- this.count=q.length;
- this.clear=function(){
- // summary
- // Clear the internal array and reset the count
- q=[];
- this.count=q.length;
- };
- this.clone=function(){
- // summary
- // Create and return a clone of this Stack
- return new dojox.collections.Stack(q);
- };
- this.contains=function(/* object */o){
- // summary
- // check to see if the stack contains object o
- for (var i=0; i<q.length; i++){
- if (q[i] == o){
- return true; // bool
- }
- }
- return false; // bool
- };
- this.copyTo=function(/* array */ arr, /* int */ i){
- // summary
- // copy the stack into array arr at index i
- arr.splice(i,0,q);
- };
- this.forEach=function(/* function */ fn, /* object? */ scope){
- // summary
- // functional iterator, following the mozilla spec.
- dojo.forEach(q, fn, scope);
- };
- this.getIterator=function(){
- // summary
- // get an iterator for this collection
- return new dojox.collections.Iterator(q); // dojox.collections.Iterator
- };
- this.peek=function(){
- // summary
- // Return the next item without altering the stack itself.
- return q[(q.length-1)]; // object
- };
- this.pop=function(){
- // summary
- // pop and return the next item on the stack
- var r=q.pop();
- this.count=q.length;
- return r; // object
- };
- this.push=function(/* object */ o){
- // summary
- // Push object o onto the stack
- this.count=q.push(o);
- };
- this.toArray=function(){
- // summary
- // create and return an array based on the internal collection
- return [].concat(q); // array
- };
+dojox.collections.Stack=function(_1){
+var q=[];
+if(_1){
+q=q.concat(_1);
+}
+this.count=q.length;
+this.clear=function(){
+q=[];
+this.count=q.length;
+};
+this.clone=function(){
+return new dojox.collections.Stack(q);
+};
+this.contains=function(o){
+for(var i=0;i<q.length;i++){
+if(q[i]==o){
+return true;
+}
}
-
+return false;
+};
+this.copyTo=function(_2,i){
+_2.splice(i,0,q);
+};
+this.forEach=function(fn,_3){
+dojo.forEach(q,fn,_3);
+};
+this.getIterator=function(){
+return new dojox.collections.Iterator(q);
+};
+this.peek=function(){
+return q[(q.length-1)];
+};
+this.pop=function(){
+var r=q.pop();
+this.count=q.length;
+return r;
+};
+this.push=function(o){
+this.count=q.push(o);
+};
+this.toArray=function(){
+return [].concat(q);
+};
+};
}
diff --git a/js/dojo/dojox/collections/_base.js b/js/dojo/dojox/collections/_base.js
--- a/js/dojo/dojox/collections/_base.js
+++ b/js/dojo/dojox/collections/_base.js
@@ -1,100 +1,71 @@
-if(!dojo._hasResource["dojox.collections._base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.collections._base"] = true;
-dojo.provide("dojox.collections._base");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojox.collections.DictionaryEntry=function(/* string */k, /* object */v){
- // summary
- // return an object of type dojox.collections.DictionaryEntry
- this.key=k;
- this.value=v;
- this.valueOf=function(){
- return this.value; // object
- };
- this.toString=function(){
- return String(this.value); // string
- };
-}
-/* Iterators
- * The collections.Iterators (Iterator and DictionaryIterator) are built to
- * work with the Collections included in this module. However, they *can*
- * be used with arrays and objects, respectively, should one choose to do so.
- */
-dojox.collections.Iterator=function(/* array */arr){
- // summary
- // return an object of type dojox.collections.Iterator
- var a=arr;
- var position=0;
- this.element=a[position]||null;
- this.atEnd=function(){
- // summary
- // Test to see if the internal cursor has reached the end of the internal collection.
- return (position>=a.length); // bool
- };
- this.get=function(){
- // summary
- // Get the next member in the collection.
- if(this.atEnd()){
- return null; // object
- }
- this.element=a[position++];
- return this.element; // object
- };
- this.map=function(/* function */fn, /* object? */scope){
- // summary
- // Functional iteration with optional scope.
- return dojo.map(a, fn, scope);
- };
- this.reset=function(){
- // summary
- // reset the internal cursor.
- position=0;
- this.element=a[position];
- };
+if(!dojo._hasResource["dojox.collections._base"]){
+dojo._hasResource["dojox.collections._base"]=true;
+dojo.provide("dojox.collections._base");
+dojox.collections.DictionaryEntry=function(k,v){
+this.key=k;
+this.value=v;
+this.valueOf=function(){
+return this.value;
+};
+this.toString=function(){
+return String(this.value);
+};
+};
+dojox.collections.Iterator=function(_1){
+var a=_1;
+var _2=0;
+this.element=a[_2]||null;
+this.atEnd=function(){
+return (_2>=a.length);
+};
+this.get=function(){
+if(this.atEnd()){
+return null;
}
-
-/* Notes:
- * The DictionaryIterator no longer supports a key and value property;
- * the reality is that you can use this to iterate over a JS object
- * being used as a hashtable.
- */
-dojox.collections.DictionaryIterator=function(/* object */obj){
- // summary
- // return an object of type dojox.collections.DictionaryIterator
- var a=[]; // Create an indexing array
- var testObject={};
- for(var p in obj){
- if(!testObject[p]){
- a.push(obj[p]); // fill it up
- }
- }
- var position=0;
- this.element=a[position]||null;
- this.atEnd=function(){
- // summary
- // Test to see if the internal cursor has reached the end of the internal collection.
- return (position>=a.length); // bool
- };
- this.get=function(){
- // summary
- // Get the next member in the collection.
- if(this.atEnd()){
- return null; // object
- }
- this.element=a[position++];
- return this.element; // object
- };
- this.map=function(/* function */fn, /* object? */scope){
- // summary
- // Functional iteration with optional scope.
- return dojo.map(a, fn, scope);
- };
- this.reset=function() {
- // summary
- // reset the internal cursor.
- position=0;
- this.element=a[position];
- };
+this.element=a[_2++];
+return this.element;
+};
+this.map=function(fn,_3){
+return dojo.map(a,fn,_3);
+};
+this.reset=function(){
+_2=0;
+this.element=a[_2];
+};
};
-
+dojox.collections.DictionaryIterator=function(_4){
+var a=[];
+var _5={};
+for(var p in _4){
+if(!_5[p]){
+a.push(_4[p]);
+}
}
+var _6=0;
+this.element=a[_6]||null;
+this.atEnd=function(){
+return (_6>=a.length);
+};
+this.get=function(){
+if(this.atEnd()){
+return null;
+}
+this.element=a[_6++];
+return this.element;
+};
+this.map=function(fn,_7){
+return dojo.map(a,fn,_7);
+};
+this.reset=function(){
+_6=0;
+this.element=a[_6];
+};
+};
+}
diff --git a/js/dojo/dojox/color.js b/js/dojo/dojox/color.js
--- a/js/dojo/dojox/color.js
+++ b/js/dojo/dojox/color.js
@@ -1,6 +1,12 @@
-if(!dojo._hasResource["dojox.color"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.color"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.color"]){
+dojo._hasResource["dojox.color"]=true;
dojo.provide("dojox.color");
dojo.require("dojox.color._base");
-
}
diff --git a/js/dojo/dojox/color/Colorspace.js b/js/dojo/dojox/color/Colorspace.js
--- a/js/dojo/dojox/color/Colorspace.js
+++ b/js/dojo/dojox/color/Colorspace.js
@@ -1,556 +1,472 @@
-if(!dojo._hasResource["dojox.color.Colorspace"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.color.Colorspace"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.color.Colorspace"]){
+dojo._hasResource["dojox.color.Colorspace"]=true;
dojo.provide("dojox.color.Colorspace");
dojo.require("dojox.math.matrix");
-
dojox.color.Colorspace=new (function(){
- var dxc=dojox.color;
- var dxm=dojox.math.matrix;
- var self=this;
- var wpMap={
- "2":{
- "E": { x:1/3, y:1/3, t:5400 },
- "D50": { x:0.34567, y:0.3585, t:5000 },
- "D55": { x:0.33242, y:0.34743, t:5500 },
- "D65": { x:0.31271, y:0.32902, t:6500 },
- "D75": { x:0.29902, y:0.31485, t:7500 },
- "A": { x:0.44757, y:0.40745, t:2856 },
- "B": { x:0.34842, y:0.35161, t:4874 },
- "C": { x:0.31006, y:0.31616, t:6774 },
- "9300": { x:0.2848, y:0.2932, t:9300 },
- "F2": { x:0.37207, y:0.37512, t:4200 },
- "F7": { x:0.31285, y:0.32918, t:6500 },
- "F11": { x:0.38054, y:0.37691, t:4000 }
- },
- "10":{
- "E": { x:1/3, y:1/3, t:5400 },
- "D50": { x:0.34773, y:0.35952, t:5000 },
- "D55": { x:0.33411, y:0.34877, t:5500 },
- "D65": { x:0.31382, y:0.331, t:6500 },
- "D75": { x:0.29968, y:0.3174, t:7500 },
- "A": { x:0.45117, y:0.40594, t:2856 },
- "B": { x:0.3498, y:0.3527, t:4874 },
- "C": { x:0.31039, y:0.31905, t:6774 },
- "F2": { x:0.37928, y:0.36723, t:4200 },
- "F7": { x:0.31565, y:0.32951, t:6500 },
- "F11": { x:0.38543, y:0.3711, t:4000 }
- }
- };
-
- var profiles={
- "Adobe RGB 98":[2.2, "D65", 0.64, 0.33, 0.297361, 0.21, 0.71, 0.627355, 0.15, 0.06, 0.075285],
- "Apple RGB":[1.8, "D65", 0.625, 0.34, 0.244634, 0.28, 0.595, 0.672034, 0.155, 0.07, 0.083332],
- "Best RGB":[2.2, "D50", 0.7347, 0.2653, 0.228457, 0.215, 0.775, 0.737352, 0.13, 0.035, 0.034191],
- "Beta RGB":[2.2, "D50", 0.6888, 0.3112, 0.303273, 0.1986, 0.7551, 0.663786, 0.1265, 0.0352, 0.032941],
- "Bruce RGB":[2.2, "D65", 0.64, 0.33, 0.240995, 0.28, 0.65, 0.683554, 0.15, 0.06, 0.075452],
- "CIE RGB":[2.2, "E", 0.735, 0.265, 0.176204, 0.274, 0.717, 0.812985, 0.167, 0.009, 0.010811],
- "ColorMatch RGB":[1.8, "D50", 0.63, 0.34, 0.274884, 0.295, 0.605, 0.658132, 0.15, 0.075, 0.066985],
- "DON RGB 4":[2.2, "D50", 0.696, 0.3, 0.27835, 0.215, 0.765, 0.68797, 0.13, 0.035, 0.03368],
- "ECI RGB":[1.8, "D50", 0.67, 0.33, 0.32025, 0.21, 0.71, 0.602071, 0.14, 0.08, 0.077679],
- "EktaSpace PS5":[2.2, "D50", 0.695, 0.305, 0.260629, 0.26, 0.7, 0.734946, 0.11, 0.005, 0.004425],
- "NTSC RGB":[2.2, "C", 0.67, 0.33, 0.298839, 0.21, 0.71, 0.586811, 0.14, 0.08, 0.11435],
- "PAL/SECAM RGB":[2.2, "D65", 0.64, 0.33, 0.222021, 0.29, 0.6, 0.706645, 0.15, 0.06, 0.071334],
- "Pro Photo RGB":[1.8, "D50", 0.7347, 0.2653, 0.28804, 0.1596, 0.8404, 0.711874, 0.0366, 0.0001, 0.000086],
- "SMPTE/C RGB":[2.2, "D65", 0.63, 0.34, 0.212395, 0.31, 0.595, 0.701049, 0.155, 0.07, 0.086556],
- "sRGB":[2.2, "D65", 0.64, 0.33, 0.212656, 0.3, 0.6, 0.715158, 0.15, 0.06, 0.072186],
- "Wide Gamut RGB":[2.2, "D50", 0.735, 0.265, 0.258187, 0.115, 0.826, 0.724938, 0.157, 0.018, 0.016875]
- };
-
- var adaptors={
- "XYZ scaling":{
- ma: [[1,0,0], [0,1,0], [0,0,1]],
- mai: [[1,0,0], [0,1,0], [0,0,1]]
- },
- "Bradford":{
- ma: [[0.8951, -0.7502, 0.0389], [0.2664, 1.7135, -0.0685], [-0.1614, 0.0367, 1.0296]],
- mai: [[0.986993, 0.432305, -0.008529], [-0.147054, 0.51836, 0.040043], [0.159963, 0.049291, 0.968487]]
- },
- "Von Kries":{
- ma: [[0.40024, -0.2263, 0], [0.7076, 1.16532, 0], [-0.08081, 0.0457, 0.91822]],
- mai: [[1.859936, 0.361191, 0], [-1.129382, 0.638812, 0], [0.219897, -0.000006, 1.089064]]
- }
- };
-
- var cMaps={
- "XYZ":{
- "xyY":function(xyz, kwArgs){
- kwArgs=dojo.mixin({
- whitepoint:"D65",
- observer:"10",
- useApproximation:true
- }, kwArgs||{});
- var wp=self.whitepoint(kwArgs.whitepoint, kwArgs.observer);
- var sum=xyz.X+xyz.Y+xyz.Z;
- if(sum==0){ var x=wp.x, y=wp.y; }
- else{ var x=xyz.X/sum, y=xyz.Y/sum; }
- return { x:x, y:y, Y:xyz.Y };
- },
- "Lab":function(xyz, kwArgs){
- kwArgs=dojo.mixin({
- whitepoint:"D65",
- observer:"10",
- useApproximation:true
- }, kwArgs||{});
-
- var kappa=self.kappa(kwArgs.useApproximation), epsilon=self.epsilon(kwArgs.useApproximation);
- var wp=self.whitepoint(kwArgs.whitepoint, kwArgs.observer);
- var xr=xyz.X/wp.x, yr=xyz.Y/wp.y, zr=xyz.z/wp.z;
- var fx=(xr>epsilon)?Math.pow(xr,1/3):(kappa*xr+16)/116;
- var fy=(yr>epsilon)?Math.pow(yr,1/3):(kappa*yr+16)/116;
- var fz=(zr>epsilon)?Math.pow(zr,1/3):(kappa*zr+16)/116;
- var L=116*fy-16, a=500*(fx-fy), b=200*(fy-fz);
- return { L:L, a:a, b:b };
- },
- "Luv": function(xyz, kwArgs){
- kwArgs=dojo.mixin({
- whitepoint:"D65",
- observer:"10",
- useApproximation:true
- }, kwArgs||{});
-
- var kappa=self.kappa(kwArgs.useApproximation), epsilon=self.epsilon(kwArgs.useApproximation);
- var wp=self.whitepoint(kwArgs.whitepoint, kwArgs.observer);
- var ud=(4*xyz.X)/(xyz.X+15*xyz.Y+3*xyz.Z);
- var vd=(9*xyz.Y)/(xyz.X+15*xyz.Y+3*xyz.Z);
- var udr=(4*wp.x)/(wp.x+15*wp.y+3*wp.z);
- var vdr=(9*wp.y)/(wp.x+15*wp.y+3*wp.z);
- var yr=xyz.Y/wp.y;
- var L=(yr>epsilon)?116*Math.pow(yr, 1/3)-16:kappa*yr;
- var u=13*L*(ud-udr);
- var v=13*L*(vd-vdr);
- return { L:L, u:u, v:v };
- }
- },
- "xyY":{
- "XYZ":function(xyY){
- if(xyY.y==0){ var X=0, Y=0, Z=0; }
- else{
- var X=(xyY.x*xyY.Y)/xyY.y;
- var Y=xyY.Y;
- var Z=((1-xyY.x-xyY.y)*xyY.Y)/xyY.y;
- }
- return { X:X, Y:Y, Z:Z };
- }
- },
- "Lab":{
- "XYZ": function(lab, kwArgs){
- kwArgs=dojo.mixin({
- whitepoint:"D65",
- observer:"10",
- useApproximation:true
- }, kwArgs||{});
-
- var b=kwArgs.useApproximation, kappa=self.kappa(b), epsilon=self.epsilon(b);
- var wp=self.whitepoint(kwArgs.whitepoint, kwArgs.observer);
- var yr=(lab.L>(kappa*epsilon))?Math.pow((lab.L+16)/116, 3):lab.L/kappa;
- var fy=(yr>epsilon)?(lab.L+16)/116:(kappa*yr+16)/116;
- var fx=(lab.a/500)+fy;
- var fz=fy-(lab.b/200);
- var fxcube=Math.pow(fx, 3), fzcube=Math.pow(fz, 3);
- var xr=(fxcube>epsilon)?fxcube:(116*fx-16)/kappa;
- var zr=(fzcube>epsilon)?fzcube:(116*fz-16)/kappa;
- return { X: xr*wp.x, Y: yr*wp.y, Z: zr*wp.z };
- },
- "LCHab": function(lab){
- var L=lab.L, C=Math.pow(lab.a*lab.a+lab.b*lab.b, 0.5), H=Math.atan(lab.b, lab.a)*(180/Math.PI);
- if(H<0){ H+=360; }
- if(H<360){ H-=360; }
- return { L:L, C:C, H:H };
- }
- },
- "LCHab":{
- "Lab":function(lch){
- var hRad=lch.H*(Math.PI/180), L=lch.L, a=lch.C/Math.pow(Math.pow(Math.tan(hRad),2)+1, 0.5);
- if(90<lchH && lch.H<270){ a = -a; }
- var b=Math.pow(Math.pow(lch.C,2)-Math.pow(a, 2), 0.5);
- if(lch.H>180){ b = -b; }
- return { L: L, a:a, b:b };
- }
- },
- "Luv":{
- "XYZ": function(Luv, kwArgs){
- kwArgs=dojo.mixin({
- whitepoint:"D65",
- observer:"10",
- useApproximation:true
- }, kwArgs||{});
-
- var b=kwArgs.useApproximation, kappa=self.kappa(b), epsilon=self.epsilon(b);
- var wp=self.whitepoint(kwArgs.whitepoint, kwArgs.observer);
- var uz=(4*wp.x)/(wp.x+15*wp.y+3*wp.z);
- var vz=(9*wp.y)/(wp.x+15*wp.y+3*wp.z);
- var Y=(Luv.L>kappa*epsilon)?Math.pow((Luv.L+16)/116, 3):Luv.L/kappa;
- var a=(1/3)*(((52*Luv.L)/(Luv.u+13*Luv.L*uz))-1);
- var b=-5*Y, c=-(1/3), d=Y*(((39*Luv.L)/(Luv.v+13*Luv.L*vz))-5);
- var X=(d-b)/(a-c), Z=X*a+b;
- return { X:X, Y:Y, Z:Z };
- },
- "LCHuv": function(Luv){
- var L=Luv.L, C=Math.pow(Luv.u*Luv.u+Luv.v*Luv*v, 0.5), H=Math.atan(Luv.v, Luv.u)*(180/Math.PI);
- if(H<0){ H+=360; }
- if(H>360){ H-=360; }
- return { L:L, C:C, H:H };
- }
- },
- "LCHuv":{
- "Luv": function(LCH){
- var hRad=LCH.H*(Math.PI/180);
- var L=LCH.L, u=LCH.C/Math.pow(Math.pow(Math.tan(hRad),2)+1, 0.5);
- var v=Math.pow(LCH.C*LCH.C-u*u, 0.5);
- if(90<LCH.H && LCH.H>270){ u*=-1; }
- if(LCH.H>180){ v*=-1; }
- return { L:L, u:u, v:v };
- }
- }
- };
- var converters={
- "CMY":{
- "CMYK":function(obj, kwArgs){ return dxc.fromCmy(obj).toCmyk(); },
- "HSL":function(obj, kwArgs){ return dxc.fromCmy(obj).toHsl(); },
- "HSV":function(obj, kwArgs){ return dxc.fromCmy(obj).toHsv(); },
- "Lab":function(obj, kwArgs){ return cMaps["XYZ"]["Lab"](dxc.fromCmy(obj).toXYZ(kwArgs)); },
- "LCHab":function(obj, kwArgs){ return cMaps["Lab"]["LCHab"](converters["CMY"]["Lab"](obj)); },
- "LCHuv":function(obj, kwArgs){ return cMaps["LCHuv"]["Luv"](cMaps["Luv"]["XYZ"](dxc.fromCmy(obj).toXYZ(kwArgs))); },
- "Luv":function(obj, kwArgs){ return cMaps["Luv"]["XYZ"](dxc.fromCmy(obj).toXYZ(kwArgs)); },
- "RGB":function(obj, kwArgs){ return dxc.fromCmy(obj); },
- "XYZ":function(obj, kwArgs){ return dxc.fromCmy(obj).toXYZ(kwArgs); },
- "xyY":function(obj, kwArgs){ return cMaps["XYZ"]["xyY"](dxc.fromCmy(obj).toXYZ(kwArgs)); }
- },
- "CMYK":{
- "CMY":function(obj, kwArgs){ return dxc.fromCmyk(obj).toCmy(); },
- "HSL":function(obj, kwArgs){ return dxc.fromCmyk(obj).toHsl(); },
- "HSV":function(obj, kwArgs){ return dxc.fromCmyk(obj).toHsv(); },
- "Lab":function(obj, kwArgs){ return cMaps["XYZ"]["Lab"](dxc.fromCmyk(obj).toXYZ(kwArgs)); },
- "LCHab":function(obj, kwArgs){ return cMaps["Lab"]["LCHab"](converters["CMYK"]["Lab"](obj)); },
- "LCHuv":function(obj, kwArgs){ return cMaps["LCHuv"]["Luv"](cMaps["Luv"]["XYZ"](dxc.fromCmyk(obj).toXYZ(kwArgs))); },
- "Luv":function(obj, kwArgs){ return cMaps["Luv"]["XYZ"](dxc.fromCmyk(obj).toXYZ(kwArgs)); },
- "RGB":function(obj, kwArgs){ return dxc.fromCmyk(obj); },
- "XYZ":function(obj, kwArgs){ return dxc.fromCmyk(obj).toXYZ(kwArgs); },
- "xyY":function(obj, kwArgs){ return cMaps["XYZ"]["xyY"](dxc.fromCmyk(obj).toXYZ(kwArgs)); }
- },
- "HSL":{
- "CMY":function(obj, kwArgs){ return dxc.fromHsl(obj).toCmy(); },
- "CMYK":function(obj, kwArgs){ return dxc.fromHsl(obj).toCmyk(); },
- "HSV":function(obj, kwArgs){ return dxc.fromHsl(obj).toHsv(); },
- "Lab":function(obj, kwArgs){ return cMaps["XYZ"]["Lab"](dxc.fromHsl(obj).toXYZ(kwArgs)); },
- "LCHab":function(obj, kwArgs){ return cMaps["Lab"]["LCHab"](converters["CMYK"]["Lab"](obj)); },
- "LCHuv":function(obj, kwArgs){ return cMaps["LCHuv"]["Luv"](cMaps["Luv"]["XYZ"](dxc.fromHsl(obj).toXYZ(kwArgs))); },
- "Luv":function(obj, kwArgs){ return cMaps["Luv"]["XYZ"](dxc.fromHsl(obj).toXYZ(kwArgs)); },
- "RGB":function(obj, kwArgs){ return dxc.fromHsl(obj); },
- "XYZ":function(obj, kwArgs){ return dxc.fromHsl(obj).toXYZ(kwArgs); },
- "xyY":function(obj, kwArgs){ return cMaps["XYZ"]["xyY"](dxc.fromHsl(obj).toXYZ(kwArgs)); }
- },
- "HSV":{
- "CMY":function(obj, kwArgs){ return dxc.fromHsv(obj).toCmy(); },
- "CMYK":function(obj, kwArgs){ return dxc.fromHsv(obj).toCmyk(); },
- "HSL":function(obj, kwArgs){ return dxc.fromHsv(obj).toHsl(); },
- "Lab":function(obj, kwArgs){ return cMaps["XYZ"]["Lab"](dxc.fromHsv(obj).toXYZ(kwArgs)); },
- "LCHab":function(obj, kwArgs){ return cMaps["Lab"]["LCHab"](converters["CMYK"]["Lab"](obj)); },
- "LCHuv":function(obj, kwArgs){ return cMaps["LCHuv"]["Luv"](cMaps["Luv"]["XYZ"](dxc.fromHsv(obj).toXYZ(kwArgs))); },
- "Luv":function(obj, kwArgs){ return cMaps["Luv"]["XYZ"](dxc.fromHsv(obj).toXYZ(kwArgs)); },
- "RGB":function(obj, kwArgs){ return dxc.fromHsv(obj); },
- "XYZ":function(obj, kwArgs){ return dxc.fromHsv(obj).toXYZ(kwArgs); },
- "xyY":function(obj, kwArgs){ return cMaps["XYZ"]["xyY"](dxc.fromHsv(obj).toXYZ(kwArgs)); }
- },
- "Lab":{
- "CMY":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["Lab"]["XYZ"](obj, kwArgs)).toCmy(); },
- "CMYK":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["Lab"]["XYZ"](obj, kwArgs)).toCmyk(); },
- "HSL":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["Lab"]["XYZ"](obj, kwArgs)).toHsl(); },
- "HSV":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["Lab"]["XYZ"](obj, kwArgs)).toHsv(); },
- "LCHab":function(obj, kwArgs){ return cMaps["Lab"]["LCHab"](obj, kwArgs); },
- "LCHuv":function(obj, kwArgs){ return cMaps["Luv"]["LCHuv"](cMaps["Lab"]["XYZ"](obj, kwArgs), kwArgs); },
- "Luv":function(obj, kwArgs){ return cMaps["XYZ"]["Luv"](cMaps["Lab"]["XYZ"](obj, kwArgs), kwArgs); },
- "RGB":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["Lab"]["XYZ"](obj, kwArgs)); },
- "XYZ":function(obj, kwArgs){ return cMaps["Lab"]["XYZ"](obj, kwArgs); },
- "xyY":function(obj, kwArgs){ return cMaps["XYZ"]["xyY"](cMaps["Lab"]["XYZ"](obj, kwArgs), kwArgs); }
- },
- "LCHab":{
- "CMY":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["Lab"]["XYZ"](cMaps["LCHab"]["Lab"](obj), kwArgs), kwArgs).toCmy(); },
- "CMYK":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["Lab"]["XYZ"](cMaps["LCHab"]["Lab"](obj), kwArgs), kwArgs).toCmyk(); },
- "HSL":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["Lab"]["XYZ"](cMaps["LCHab"]["Lab"](obj), kwArgs), kwArgs).toHsl(); },
- "HSV":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["Lab"]["XYZ"](cMaps["LCHab"]["Lab"](obj), kwArgs), kwArgs).toHsv(); },
- "Lab":function(obj, kwArgs){ return cMaps["Lab"]["LCHab"](obj, kwArgs); },
- "LCHuv":function(obj, kwArgs){ return cMaps["Luv"]["LCHuv"](cMaps["XYZ"]["Luv"](cMaps["Lab"]["XYZ"](cMaps["LCHab"]["Lab"](obj), kwArgs), kwArgs), kwArgs);},
- "Luv":function(obj, kwArgs){ return cMaps["XYZ"]["Luv"](cMaps["Lab"]["XYZ"](cMaps["LCHab"]["Lab"](obj), kwArgs), kwArgs);},
- "RGB":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["Lab"]["XYZ"](cMaps["LCHab"]["Lab"](obj), kwArgs), kwArgs); },
- "XYZ":function(obj, kwArgs){ return cMaps["Lab"]["XYZ"](cMaps["LCHab"]["Lab"](obj, kwArgs), kwArgs); },
- "xyY":function(obj, kwArgs){ return cMaps["XYZ"]["xyY"](cMaps["Lab"]["XYZ"](cMaps["LCHab"]["Lab"](obj), kwArgs), kwArgs); }
- },
- "LCHuv":{
- "CMY":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["Luv"]["XYZ"](cMaps["LCHuv"]["Luv"](obj), kwArgs), kwArgs).toCmy(); },
- "CMYK":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["Luv"]["XYZ"](cMaps["LCHuv"]["Luv"](obj), kwArgs), kwArgs).toCmyk(); },
- "HSL":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["Luv"]["XYZ"](cMaps["LCHuv"]["Luv"](obj), kwArgs), kwArgs).toHsl(); },
- "HSV":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["Luv"]["XYZ"](cMaps["LCHuv"]["Luv"](obj), kwArgs), kwArgs).toHsv(); },
- "Lab":function(obj, kwArgs){ return cMaps["XYZ"]["Lab"](cMaps["Luv"]["XYZ"](cMaps["LCHuv"]["Luv"](obj), kwArgs), kwArgs); },
- "LCHab":function(obj, kwArgs){ return cMaps["Lab"]["LCHab"](cMaps["XYZ"]["Lab"](cMaps["Luv"]["XYZ"](cMaps["LCHuv"]["Luv"](obj), kwArgs), kwArgs), kwArgs); },
- "Luv":function(obj, kwArgs){ return cMaps["LCHuv"]["Luv"](obj, kwArgs); },
- "RGB":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["Luv"]["XYZ"](cMaps["LCHuv"]["Luv"](obj), kwArgs), kwArgs); },
- "XYZ":function(obj, kwArgs){ return cMaps["Luv"]["XYZ"](cMaps["LCHuv"]["Luv"](obj), kwArgs); },
- "xyY":function(obj, kwArgs){ return cMaps["XYZ"]["xyY"](cMaps["Luv"]["XYZ"](cMaps["LCHuv"]["Luv"](obj), kwArgs), kwArgs); },
- },
- "Luv":{
- "CMY":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["Luv"]["XYZ"](obj, kwArgs), kwArgs).toCmy(); },
- "CMYK":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["Luv"]["XYZ"](obj, kwArgs), kwArgs).toCmyk(); },
- "HSL":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["Luv"]["XYZ"](obj, kwArgs), kwArgs).toHsl(); },
- "HSV":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["Luv"]["XYZ"](obj, kwArgs), kwArgs).toHsv(); },
- "Lab":function(obj, kwArgs){ return cMaps["XYZ"]["Lab"](cMaps["Luv"]["XYZ"](obj, kwArgs), kwArgs); },
- "LCHab":function(obj, kwArgs){ return cMaps["Lab"]["LCHab"](cMaps["XYZ"]["Lab"](cMaps["Luv"]["XYZ"](obj, kwArgs), kwArgs), kwArgs); },
- "LCHuv":function(obj, kwArgs){ return cMaps["Luv"]["LCHuv"](obj, kwArgs); },
- "RGB":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["Luv"]["XYZ"](obj, kwArgs), kwArgs); },
- "XYZ":function(obj, kwArgs){ return cMaps["Luv"]["XYZ"](obj, kwArgs); },
- "xyY":function(obj, kwArgs){ return cMaps["XYZ"]["xyY"](cMaps["Luv"]["XYZ"](obj, kwArgs), kwArgs); },
- },
- "RGB":{
- "CMY":function(obj, kwArgs){ return obj.toCmy(); },
- "CMYK":function(obj, kwArgs){ return obj.toCmyk(); },
- "HSL":function(obj, kwArgs){ return obj.toHsl(); },
- "HSV":function(obj, kwArgs){ return obj.toHsv(); },
- "Lab":function(obj, kwArgs){ return cMaps["XYZ"]["Lab"](obj.toXYZ(kwArgs), kwArgs); },
- "LCHab":function(obj, kwArgs){ return cMaps["LCHab"]["Lab"](cMaps["XYZ"]["Lab"](obj.toXYZ(kwArgs), kwArgs), kwArgs);},
- "LCHuv":function(obj, kwArgs){ return cMaps["LCHuv"]["Luv"](cMaps["XYZ"]["Luv"](obj.toXYZ(kwArgs), kwArgs), kwArgs);},
- "Luv":function(obj, kwArgs){ return cMaps["XYZ"]["Luv"](obj.toXYZ(kwArgs), kwArgs); },
- "XYZ":function(obj, kwArgs){ return obj.toXYZ(kwArgs); },
- "xyY":function(obj, kwArgs){ return cMaps["XYZ"]["xyY"](obj.toXYZ(kwArgs), kwArgs); }
- },
- "XYZ":{
- "CMY":function(obj, kwArgs){ return dxc.fromXYZ(obj, kwArgs).toCmy(); },
- "CMYK":function(obj, kwArgs){ return dxc.fromXYZ(obj, kwArgs).toCmyk(); },
- "HSL":function(obj, kwArgs){ return dxc.fromXYZ(obj, kwArgs).toHsl(); },
- "HSV":function(obj, kwArgs){ return dxc.fromXYZ(obj, kwArgs).toHsv(); },
- "Lab":function(obj, kwArgs){ return cMaps["XYZ"]["Lab"](obj, kwArgs); },
- "LCHab":function(obj, kwArgs){ return cMaps["Lab"]["LCHab"](cMaps["XYZ"]["Lab"](obj, kwArgs), kwArgs); },
- "LCHuv":function(obj, kwArgs){ return cMaps["Luv"]["LCHuv"](cMaps["XYZ"]["Luv"](obj, kwArgs), kwArgs); },
- "Luv":function(obj, kwArgs){ return cMaps["XYZ"]["Luv"](obj, kwArgs); },
- "RGB":function(obj, kwArgs){ return dxc.fromXYZ(obj, kwArgs); },
- "xyY":function(obj, kwArgs){ return cMaps["XYZ"]["xyY"](dxc.fromXYZ(obj, kwArgs), kwArgs); }
- },
- // TODO: revisit this. xyY represents a single color, not a spectrum of colors.
- "xyY":{
- "CMY":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["xyY"]["XYZ"](obj, kwArgs), kwArgs).toCmy(); },
- "CMYK":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["xyY"]["XYZ"](obj, kwArgs), kwArgs).toCmyk(); },
- "HSL":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["xyY"]["XYZ"](obj, kwArgs), kwArgs).toHsl(); },
- "HSV":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["xyY"]["XYZ"](obj, kwArgs), kwArgs).toHsv(); },
- "Lab":function(obj, kwArgs){ return cMaps["Lab"]["XYZ"](cMaps["xyY"]["XYZ"](obj, kwArgs), kwArgs); },
- "LCHab":function(obj, kwArgs){ return cMaps["LCHab"]["Lab"](cMaps["Lab"]["XYZ"](cMaps["xyY"]["XYZ"](obj, kwArgs), kwArgs), kwArgs); },
- "LCHuv":function(obj, kwArgs){ return cMaps["LCHuv"]["Luv"](cMaps["Luv"]["XYZ"](cMaps["xyY"]["XYZ"](obj, kwArgs), kwArgs), kwArgs); },
- "Luv":function(obj, kwArgs){ return cMaps["Luv"]["XYZ"](cMaps["xyY"]["XYZ"](obj, kwArgs), kwArgs); },
- "RGB":function(obj, kwArgs){ return dxc.fromXYZ(cMaps["xyY"]["XYZ"](obj, kwArgs), kwArgs); },
- "XYZ":function(obj, kwArgs){ return cMaps["xyY"]["XYZ"](obj, kwArgs); }
- }
- };
-
- this.whitepoint=function(/* String */wpName, /* String? */observer){
- observer=observer||"10";
- var x=0, y=0, t=0;
- if(wpMap[observer] && wpMap[observer][wpName]){
- x=wpMap[observer][wpName].x;
- y=wpMap[observer][wpName].y;
- t=wpMap[observer][wpName].t;
- } else {
- console.warn(
- "dojox.color.Colorspace::whitepoint: either the observer or the whitepoint name was not found. ",
- observer, wpName
- );
- }
- var wp={ x:x, y:y, z:(1-x-y), t:t, Y:1 };
- return this.convert(wp, "xyY", "XYZ");
- };
-
- this.tempToWhitepoint=function(/* Number */t){
- if(t<4000){
- console.warn("dojox.color.Colorspace::tempToWhitepoint: can't find a white point for temperatures less than 4000K. (Passed ", t, ").");
- return { x:0, y:0 };
- }
- if(t>25000){
- console.warn("dojox.color.Colorspace::tempToWhitepoint: can't find a white point for temperatures greater than 25000K. (Passed ", t, ").");
- return { x:0, y:0 };
- }
- var t1=t, t2=t*t, t3=t2*t;
- var ten9=Math.pow(10, 9), ten6=Math.pow(10, 6), ten3=Math.pow(10,3);
- if(t<=7000){
- var x=(-4.607*ten9/t3)+(2.9678*ten6/t2)+(0.09911*ten3/t)+0.2444063;
- } else {
- var x=(-2.0064*ten9/t3)+(1.9018*ten6/t2)+(0.24748*ten3/t)+0.23704;
- }
- var y=-3*x*x+2.87*x-0.275;
- return { x:x, y:y };
- };
-
- this.primaries=function(/* Object */kwArgs){
- // mix in the defaults.
- kwArgs=dojo.mixin({
- profile:"sRGB",
- whitepoint:"D65",
- observer:"10",
- adaptor:"Bradford"
- }, kwArgs||{});
-
- var m=[];
- if(profiles[kwArgs.profile]){
- m=profiles[kwArgs.profile].slice(0);
- } else {
- console.warn(
- "dojox.color.Colorspace::primaries: the passed profile was not found. ",
- "Available profiles include: ", profiles,
- ". The profile passed was ", kwArgs.profile
- );
- }
- var primary={
- name:kwArgs.profile,
- gamma:m[0], whitepoint:m[1],
- xr:m[2], yr:m[3], Yr:m[4],
- xg:m[5], yg:m[6], Yg:m[7],
- xb:m[8], yb:m[9], Yb:m[10]
- };
-
- // convert for the whitepoint
- if(kwArgs.whitepoint!=primary.whitepoint){
- var r=this.convert(
- this.adapt({
- color:this.convert({ x:xr, y:yr, Y:Yr }, "xyY", "XYZ"),
- adaptor:kwArgs.adaptor,
- source:primary.whitepoint,
- destination:kwArgs.whitepoint
- }),
- "XYZ",
- "xyY"
- );
- var g=this.convert(
- this.adapt({
- color:this.convert({ x:xg, y:yg, Y:Yg }, "xyY", "XYZ"),
- adaptor:kwArgs.adaptor,
- source:primary.whitepoint,
- destination:kwArgs.whitepoint
- }),
- "XYZ",
- "xyY"
- );
- var b=this.convert(
- this.adapt({
- color:this.convert({ x:xb, y:yb, Y:Yb }, "xyY", "XYZ"),
- adaptor:kwArgs.adaptor,
- source:primary.whitepoint,
- destination:kwArgs.whitepoint
- }),
- "XYZ",
- "xyY"
- );
- primary=dojo.mixin(primary, {
- xr: r.x, yr: r.y, Yr: r.Y,
- xg: g.x, yg: g.y, Yg: g.Y,
- xb: b.x, yb: b.y, Yb: b.Y,
- whitepoint: kwArgs.whitepoint
- });
- }
- return dojo.mixin(primary, {
- zr: 1-primary.xr-primary.yr,
- zg: 1-primary.xg-primary.yg,
- zb: 1-primary.xb-primary.yb
- }); // Object
- };
-
- this.adapt=function(/* Object */kwArgs){
- // color is required in the form of XYZ, source whitepoint name is required.
- if(!kwArgs.color || !kwArgs.source){
- console.error("dojox.color.Colorspace::adapt: color and source arguments are required. ", kwArgs);
- }
-
- // defaults
- kwArgs=dojo.mixin({
- adaptor:"Bradford",
- destination:"D65"
- }, kwArgs);
-
- // adapt
- var swp = this.whitepoint(kwArgs.source);
- var dwp = this.whitepoint(kwArgs.destination);
- if(adaptors[kwArgs.adaptor]){
- var ma=adaptors[kwArgs.adaptor].ma;
- var mai=adaptors[kwArgs.adaptor].mai;
- }else{
- console.warn("dojox.color.Colorspace::adapt: the passed adaptor '", kwArgs.adaptor, "' was not found.");
- }
- var dSrc=dxm.multiply([[swp.x, swp.y, swp.z]], ma);
- var dDest=dxm.multiply([[dwp.x, dwp.y, dwp.z]], ma);
- var center=[
- [dDest[0][0]/dSrc[0][0], 0, 0],
- [0, dDest[0][1]/dSrc[0][1], 0],
- [0, 0, dDest[0][2]/dSrc[0][2]]
- ];
- var m=dxm.multiply(dxm.multiply(ma, center), mai);
- var r=dxm.multiply([[ kwArgs.color.X, kwArgs.color.Y, kwArgs.color.Z ]], m)[0];
- return { X:r[0], Y:r[1], Z:r[2] };
- };
-
- this.matrix=function(/* String */to, /* Object */primary){
- var wp=this.whitepoint(primary.whitepoint);
- var Xr = p.xr/p.yr, Yr = 1, Zr = (1-p.xr-p.yr)/p.yr;
- var Xg = p.xg/p.yg, Yg = 1, Zg = (1-p.xg-p.yg)/p.yg;
- var Xb = p.xb/p.yb, Yb = 1, Zr = (1-p.xb-p.yb)/p.yb;
-
- var m1 = [[ Xr, Yr, Zr ], [ Xg, Yg, Zg ], [ Xb, Yb, Zb ]];
- var m2 = [[ wp.X, wp.Y, wp.Z ]];
- var sm = dojox.math.matrix.multiply(m2, dojox.math.matrix.inverse(m1));
- var Sr = sm[0][0], Sg = sm[0][1], Sb = sm[0][2];
- var result=[
- [Sr*Xr, Sr*Yr, Sr*Zr],
- [Sg*Xg, Sg*Yg, Sg*Zg],
- [Sb*Xb, Sb*Yb, Sb*Zb]
- ];
- if(to=="RGB"){ return dojox.math.inverse(result); }
- return result;
- };
-
- this.epsilon=function(/* bool? */useApprox){
- return (useApprox || typeof(useApprox)=="undefined")? 0.008856: 216/24289;
- };
- this.kappa=function(/* bool? */useApprox){
- return (useApprox || typeof(useApprox)=="undefined")? 903.3: 24389/27;
- };
-
- this.convert=function(/* Object */color, /* string */from, /* string */to, /* Object? */kwArgs){
- if(converters[from] && converters[from][to]){
- return converters[from][to](obj, kwArgs);
- }
- console.warn("dojox.color.Colorspace::convert: Can't convert ", color, " from ", from, " to ", to, ".");
- };
+var _1=dojox.color;
+var _2=dojox.math.matrix;
+var _3=this;
+var _4={"2":{"E":{x:1/3,y:1/3,t:5400},"D50":{x:0.34567,y:0.3585,t:5000},"D55":{x:0.33242,y:0.34743,t:5500},"D65":{x:0.31271,y:0.32902,t:6500},"D75":{x:0.29902,y:0.31485,t:7500},"A":{x:0.44757,y:0.40745,t:2856},"B":{x:0.34842,y:0.35161,t:4874},"C":{x:0.31006,y:0.31616,t:6774},"9300":{x:0.2848,y:0.2932,t:9300},"F2":{x:0.37207,y:0.37512,t:4200},"F7":{x:0.31285,y:0.32918,t:6500},"F11":{x:0.38054,y:0.37691,t:4000}},"10":{"E":{x:1/3,y:1/3,t:5400},"D50":{x:0.34773,y:0.35952,t:5000},"D55":{x:0.33411,y:0.34877,t:5500},"D65":{x:0.31382,y:0.331,t:6500},"D75":{x:0.29968,y:0.3174,t:7500},"A":{x:0.45117,y:0.40594,t:2856},"B":{x:0.3498,y:0.3527,t:4874},"C":{x:0.31039,y:0.31905,t:6774},"F2":{x:0.37928,y:0.36723,t:4200},"F7":{x:0.31565,y:0.32951,t:6500},"F11":{x:0.38543,y:0.3711,t:4000}}};
+var _5={"Adobe RGB 98":[2.2,"D65",0.64,0.33,0.297361,0.21,0.71,0.627355,0.15,0.06,0.075285],"Apple RGB":[1.8,"D65",0.625,0.34,0.244634,0.28,0.595,0.672034,0.155,0.07,0.083332],"Best RGB":[2.2,"D50",0.7347,0.2653,0.228457,0.215,0.775,0.737352,0.13,0.035,0.034191],"Beta RGB":[2.2,"D50",0.6888,0.3112,0.303273,0.1986,0.7551,0.663786,0.1265,0.0352,0.032941],"Bruce RGB":[2.2,"D65",0.64,0.33,0.240995,0.28,0.65,0.683554,0.15,0.06,0.075452],"CIE RGB":[2.2,"E",0.735,0.265,0.176204,0.274,0.717,0.812985,0.167,0.009,0.010811],"ColorMatch RGB":[1.8,"D50",0.63,0.34,0.274884,0.295,0.605,0.658132,0.15,0.075,0.066985],"DON RGB 4":[2.2,"D50",0.696,0.3,0.27835,0.215,0.765,0.68797,0.13,0.035,0.03368],"ECI RGB":[1.8,"D50",0.67,0.33,0.32025,0.21,0.71,0.602071,0.14,0.08,0.077679],"EktaSpace PS5":[2.2,"D50",0.695,0.305,0.260629,0.26,0.7,0.734946,0.11,0.005,0.004425],"NTSC RGB":[2.2,"C",0.67,0.33,0.298839,0.21,0.71,0.586811,0.14,0.08,0.11435],"PAL/SECAM RGB":[2.2,"D65",0.64,0.33,0.222021,0.29,0.6,0.706645,0.15,0.06,0.071334],"Pro Photo RGB":[1.8,"D50",0.7347,0.2653,0.28804,0.1596,0.8404,0.711874,0.0366,0.0001,0.000086],"SMPTE/C RGB":[2.2,"D65",0.63,0.34,0.212395,0.31,0.595,0.701049,0.155,0.07,0.086556],"sRGB":[2.2,"D65",0.64,0.33,0.212656,0.3,0.6,0.715158,0.15,0.06,0.072186],"Wide Gamut RGB":[2.2,"D50",0.735,0.265,0.258187,0.115,0.826,0.724938,0.157,0.018,0.016875]};
+var _6={"XYZ scaling":{ma:[[1,0,0],[0,1,0],[0,0,1]],mai:[[1,0,0],[0,1,0],[0,0,1]]},"Bradford":{ma:[[0.8951,-0.7502,0.0389],[0.2664,1.7135,-0.0685],[-0.1614,0.0367,1.0296]],mai:[[0.986993,0.432305,-0.008529],[-0.147054,0.51836,0.040043],[0.159963,0.049291,0.968487]]},"Von Kries":{ma:[[0.40024,-0.2263,0],[0.7076,1.16532,0],[-0.08081,0.0457,0.91822]],mai:[[1.859936,0.361191,0],[-1.129382,0.638812,0],[0.219897,-0.000006,1.089064]]}};
+var _7={"XYZ":{"xyY":function(_8,_9){
+_9=dojo.mixin({whitepoint:"D65",observer:"10",useApproximation:true},_9||{});
+var wp=_3.whitepoint(_9.whitepoint,_9.observer);
+var _a=_8.X+_8.Y+_8.Z;
+if(_a==0){
+var x=wp.x,y=wp.y;
+}else{
+var x=_8.X/_a,y=_8.Y/_a;
+}
+return {x:x,y:y,Y:_8.Y};
+},"Lab":function(_b,_c){
+_c=dojo.mixin({whitepoint:"D65",observer:"10",useApproximation:true},_c||{});
+var _d=_3.kappa(_c.useApproximation),_e=_3.epsilon(_c.useApproximation);
+var wp=_3.whitepoint(_c.whitepoint,_c.observer);
+var xr=_b.X/wp.x,yr=_b.Y/wp.y,zr=_b.z/wp.z;
+var fx=(xr>_e)?Math.pow(xr,1/3):(_d*xr+16)/116;
+var fy=(yr>_e)?Math.pow(yr,1/3):(_d*yr+16)/116;
+var fz=(zr>_e)?Math.pow(zr,1/3):(_d*zr+16)/116;
+var L=116*fy-16,a=500*(fx-fy),b=200*(fy-fz);
+return {L:L,a:a,b:b};
+},"Luv":function(_f,_10){
+_10=dojo.mixin({whitepoint:"D65",observer:"10",useApproximation:true},_10||{});
+var _11=_3.kappa(_10.useApproximation),_12=_3.epsilon(_10.useApproximation);
+var wp=_3.whitepoint(_10.whitepoint,_10.observer);
+var ud=(4*_f.X)/(_f.X+15*_f.Y+3*_f.Z);
+var vd=(9*_f.Y)/(_f.X+15*_f.Y+3*_f.Z);
+var udr=(4*wp.x)/(wp.x+15*wp.y+3*wp.z);
+var vdr=(9*wp.y)/(wp.x+15*wp.y+3*wp.z);
+var yr=_f.Y/wp.y;
+var L=(yr>_12)?116*Math.pow(yr,1/3)-16:_11*yr;
+var u=13*L*(ud-udr);
+var v=13*L*(vd-vdr);
+return {L:L,u:u,v:v};
+}},"xyY":{"XYZ":function(xyY){
+if(xyY.y==0){
+var X=0,Y=0,Z=0;
+}else{
+var X=(xyY.x*xyY.Y)/xyY.y;
+var Y=xyY.Y;
+var Z=((1-xyY.x-xyY.y)*xyY.Y)/xyY.y;
+}
+return {X:X,Y:Y,Z:Z};
+}},"Lab":{"XYZ":function(lab,_13){
+_13=dojo.mixin({whitepoint:"D65",observer:"10",useApproximation:true},_13||{});
+var b=_13.useApproximation,_14=_3.kappa(b),_15=_3.epsilon(b);
+var wp=_3.whitepoint(_13.whitepoint,_13.observer);
+var yr=(lab.L>(_14*_15))?Math.pow((lab.L+16)/116,3):lab.L/_14;
+var fy=(yr>_15)?(lab.L+16)/116:(_14*yr+16)/116;
+var fx=(lab.a/500)+fy;
+var fz=fy-(lab.b/200);
+var _16=Math.pow(fx,3),_17=Math.pow(fz,3);
+var xr=(_16>_15)?_16:(116*fx-16)/_14;
+var zr=(_17>_15)?_17:(116*fz-16)/_14;
+return {X:xr*wp.x,Y:yr*wp.y,Z:zr*wp.z};
+},"LCHab":function(lab){
+var L=lab.L,C=Math.pow(lab.a*lab.a+lab.b*lab.b,0.5),H=Math.atan(lab.b,lab.a)*(180/Math.PI);
+if(H<0){
+H+=360;
+}
+if(H<360){
+H-=360;
+}
+return {L:L,C:C,H:H};
+}},"LCHab":{"Lab":function(lch){
+var _18=lch.H*(Math.PI/180),L=lch.L,a=lch.C/Math.pow(Math.pow(Math.tan(_18),2)+1,0.5);
+if(90<lchH&&lch.H<270){
+a=-a;
+}
+var b=Math.pow(Math.pow(lch.C,2)-Math.pow(a,2),0.5);
+if(lch.H>180){
+b=-b;
+}
+return {L:L,a:a,b:b};
+}},"Luv":{"XYZ":function(Luv,_19){
+_19=dojo.mixin({whitepoint:"D65",observer:"10",useApproximation:true},_19||{});
+var b=_19.useApproximation,_1a=_3.kappa(b),_1b=_3.epsilon(b);
+var wp=_3.whitepoint(_19.whitepoint,_19.observer);
+var uz=(4*wp.x)/(wp.x+15*wp.y+3*wp.z);
+var vz=(9*wp.y)/(wp.x+15*wp.y+3*wp.z);
+var Y=(Luv.L>_1a*_1b)?Math.pow((Luv.L+16)/116,3):Luv.L/_1a;
+var a=(1/3)*(((52*Luv.L)/(Luv.u+13*Luv.L*uz))-1);
+var b=-5*Y,c=-(1/3),d=Y*(((39*Luv.L)/(Luv.v+13*Luv.L*vz))-5);
+var X=(d-b)/(a-c),Z=X*a+b;
+return {X:X,Y:Y,Z:Z};
+},"LCHuv":function(Luv){
+var L=Luv.L,C=Math.pow(Luv.u*Luv.u+Luv.v*Luv*v,0.5),H=Math.atan(Luv.v,Luv.u)*(180/Math.PI);
+if(H<0){
+H+=360;
+}
+if(H>360){
+H-=360;
+}
+return {L:L,C:C,H:H};
+}},"LCHuv":{"Luv":function(LCH){
+var _1c=LCH.H*(Math.PI/180);
+var L=LCH.L,u=LCH.C/Math.pow(Math.pow(Math.tan(_1c),2)+1,0.5);
+var v=Math.pow(LCH.C*LCH.C-u*u,0.5);
+if(90<LCH.H&&LCH.H>270){
+u*=-1;
+}
+if(LCH.H>180){
+v*=-1;
+}
+return {L:L,u:u,v:v};
+}}};
+var _1d={"CMY":{"CMYK":function(obj,_1e){
+return _1.fromCmy(obj).toCmyk();
+},"HSL":function(obj,_1f){
+return _1.fromCmy(obj).toHsl();
+},"HSV":function(obj,_20){
+return _1.fromCmy(obj).toHsv();
+},"Lab":function(obj,_21){
+return _7["XYZ"]["Lab"](_1.fromCmy(obj).toXYZ(_21));
+},"LCHab":function(obj,_22){
+return _7["Lab"]["LCHab"](_1d["CMY"]["Lab"](obj));
+},"LCHuv":function(obj,_23){
+return _7["LCHuv"]["Luv"](_7["Luv"]["XYZ"](_1.fromCmy(obj).toXYZ(_23)));
+},"Luv":function(obj,_24){
+return _7["Luv"]["XYZ"](_1.fromCmy(obj).toXYZ(_24));
+},"RGB":function(obj,_25){
+return _1.fromCmy(obj);
+},"XYZ":function(obj,_26){
+return _1.fromCmy(obj).toXYZ(_26);
+},"xyY":function(obj,_27){
+return _7["XYZ"]["xyY"](_1.fromCmy(obj).toXYZ(_27));
+}},"CMYK":{"CMY":function(obj,_28){
+return _1.fromCmyk(obj).toCmy();
+},"HSL":function(obj,_29){
+return _1.fromCmyk(obj).toHsl();
+},"HSV":function(obj,_2a){
+return _1.fromCmyk(obj).toHsv();
+},"Lab":function(obj,_2b){
+return _7["XYZ"]["Lab"](_1.fromCmyk(obj).toXYZ(_2b));
+},"LCHab":function(obj,_2c){
+return _7["Lab"]["LCHab"](_1d["CMYK"]["Lab"](obj));
+},"LCHuv":function(obj,_2d){
+return _7["LCHuv"]["Luv"](_7["Luv"]["XYZ"](_1.fromCmyk(obj).toXYZ(_2d)));
+},"Luv":function(obj,_2e){
+return _7["Luv"]["XYZ"](_1.fromCmyk(obj).toXYZ(_2e));
+},"RGB":function(obj,_2f){
+return _1.fromCmyk(obj);
+},"XYZ":function(obj,_30){
+return _1.fromCmyk(obj).toXYZ(_30);
+},"xyY":function(obj,_31){
+return _7["XYZ"]["xyY"](_1.fromCmyk(obj).toXYZ(_31));
+}},"HSL":{"CMY":function(obj,_32){
+return _1.fromHsl(obj).toCmy();
+},"CMYK":function(obj,_33){
+return _1.fromHsl(obj).toCmyk();
+},"HSV":function(obj,_34){
+return _1.fromHsl(obj).toHsv();
+},"Lab":function(obj,_35){
+return _7["XYZ"]["Lab"](_1.fromHsl(obj).toXYZ(_35));
+},"LCHab":function(obj,_36){
+return _7["Lab"]["LCHab"](_1d["CMYK"]["Lab"](obj));
+},"LCHuv":function(obj,_37){
+return _7["LCHuv"]["Luv"](_7["Luv"]["XYZ"](_1.fromHsl(obj).toXYZ(_37)));
+},"Luv":function(obj,_38){
+return _7["Luv"]["XYZ"](_1.fromHsl(obj).toXYZ(_38));
+},"RGB":function(obj,_39){
+return _1.fromHsl(obj);
+},"XYZ":function(obj,_3a){
+return _1.fromHsl(obj).toXYZ(_3a);
+},"xyY":function(obj,_3b){
+return _7["XYZ"]["xyY"](_1.fromHsl(obj).toXYZ(_3b));
+}},"HSV":{"CMY":function(obj,_3c){
+return _1.fromHsv(obj).toCmy();
+},"CMYK":function(obj,_3d){
+return _1.fromHsv(obj).toCmyk();
+},"HSL":function(obj,_3e){
+return _1.fromHsv(obj).toHsl();
+},"Lab":function(obj,_3f){
+return _7["XYZ"]["Lab"](_1.fromHsv(obj).toXYZ(_3f));
+},"LCHab":function(obj,_40){
+return _7["Lab"]["LCHab"](_1d["CMYK"]["Lab"](obj));
+},"LCHuv":function(obj,_41){
+return _7["LCHuv"]["Luv"](_7["Luv"]["XYZ"](_1.fromHsv(obj).toXYZ(_41)));
+},"Luv":function(obj,_42){
+return _7["Luv"]["XYZ"](_1.fromHsv(obj).toXYZ(_42));
+},"RGB":function(obj,_43){
+return _1.fromHsv(obj);
+},"XYZ":function(obj,_44){
+return _1.fromHsv(obj).toXYZ(_44);
+},"xyY":function(obj,_45){
+return _7["XYZ"]["xyY"](_1.fromHsv(obj).toXYZ(_45));
+}},"Lab":{"CMY":function(obj,_46){
+return _1.fromXYZ(_7["Lab"]["XYZ"](obj,_46)).toCmy();
+},"CMYK":function(obj,_47){
+return _1.fromXYZ(_7["Lab"]["XYZ"](obj,_47)).toCmyk();
+},"HSL":function(obj,_48){
+return _1.fromXYZ(_7["Lab"]["XYZ"](obj,_48)).toHsl();
+},"HSV":function(obj,_49){
+return _1.fromXYZ(_7["Lab"]["XYZ"](obj,_49)).toHsv();
+},"LCHab":function(obj,_4a){
+return _7["Lab"]["LCHab"](obj,_4a);
+},"LCHuv":function(obj,_4b){
+return _7["Luv"]["LCHuv"](_7["Lab"]["XYZ"](obj,_4b),_4b);
+},"Luv":function(obj,_4c){
+return _7["XYZ"]["Luv"](_7["Lab"]["XYZ"](obj,_4c),_4c);
+},"RGB":function(obj,_4d){
+return _1.fromXYZ(_7["Lab"]["XYZ"](obj,_4d));
+},"XYZ":function(obj,_4e){
+return _7["Lab"]["XYZ"](obj,_4e);
+},"xyY":function(obj,_4f){
+return _7["XYZ"]["xyY"](_7["Lab"]["XYZ"](obj,_4f),_4f);
+}},"LCHab":{"CMY":function(obj,_50){
+return _1.fromXYZ(_7["Lab"]["XYZ"](_7["LCHab"]["Lab"](obj),_50),_50).toCmy();
+},"CMYK":function(obj,_51){
+return _1.fromXYZ(_7["Lab"]["XYZ"](_7["LCHab"]["Lab"](obj),_51),_51).toCmyk();
+},"HSL":function(obj,_52){
+return _1.fromXYZ(_7["Lab"]["XYZ"](_7["LCHab"]["Lab"](obj),_52),_52).toHsl();
+},"HSV":function(obj,_53){
+return _1.fromXYZ(_7["Lab"]["XYZ"](_7["LCHab"]["Lab"](obj),_53),_53).toHsv();
+},"Lab":function(obj,_54){
+return _7["Lab"]["LCHab"](obj,_54);
+},"LCHuv":function(obj,_55){
+return _7["Luv"]["LCHuv"](_7["XYZ"]["Luv"](_7["Lab"]["XYZ"](_7["LCHab"]["Lab"](obj),_55),_55),_55);
+},"Luv":function(obj,_56){
+return _7["XYZ"]["Luv"](_7["Lab"]["XYZ"](_7["LCHab"]["Lab"](obj),_56),_56);
+},"RGB":function(obj,_57){
+return _1.fromXYZ(_7["Lab"]["XYZ"](_7["LCHab"]["Lab"](obj),_57),_57);
+},"XYZ":function(obj,_58){
+return _7["Lab"]["XYZ"](_7["LCHab"]["Lab"](obj,_58),_58);
+},"xyY":function(obj,_59){
+return _7["XYZ"]["xyY"](_7["Lab"]["XYZ"](_7["LCHab"]["Lab"](obj),_59),_59);
+}},"LCHuv":{"CMY":function(obj,_5a){
+return _1.fromXYZ(_7["Luv"]["XYZ"](_7["LCHuv"]["Luv"](obj),_5a),_5a).toCmy();
+},"CMYK":function(obj,_5b){
+return _1.fromXYZ(_7["Luv"]["XYZ"](_7["LCHuv"]["Luv"](obj),_5b),_5b).toCmyk();
+},"HSL":function(obj,_5c){
+return _1.fromXYZ(_7["Luv"]["XYZ"](_7["LCHuv"]["Luv"](obj),_5c),_5c).toHsl();
+},"HSV":function(obj,_5d){
+return _1.fromXYZ(_7["Luv"]["XYZ"](_7["LCHuv"]["Luv"](obj),_5d),_5d).toHsv();
+},"Lab":function(obj,_5e){
+return _7["XYZ"]["Lab"](_7["Luv"]["XYZ"](_7["LCHuv"]["Luv"](obj),_5e),_5e);
+},"LCHab":function(obj,_5f){
+return _7["Lab"]["LCHab"](_7["XYZ"]["Lab"](_7["Luv"]["XYZ"](_7["LCHuv"]["Luv"](obj),_5f),_5f),_5f);
+},"Luv":function(obj,_60){
+return _7["LCHuv"]["Luv"](obj,_60);
+},"RGB":function(obj,_61){
+return _1.fromXYZ(_7["Luv"]["XYZ"](_7["LCHuv"]["Luv"](obj),_61),_61);
+},"XYZ":function(obj,_62){
+return _7["Luv"]["XYZ"](_7["LCHuv"]["Luv"](obj),_62);
+},"xyY":function(obj,_63){
+return _7["XYZ"]["xyY"](_7["Luv"]["XYZ"](_7["LCHuv"]["Luv"](obj),_63),_63);
+}},"Luv":{"CMY":function(obj,_64){
+return _1.fromXYZ(_7["Luv"]["XYZ"](obj,_64),_64).toCmy();
+},"CMYK":function(obj,_65){
+return _1.fromXYZ(_7["Luv"]["XYZ"](obj,_65),_65).toCmyk();
+},"HSL":function(obj,_66){
+return _1.fromXYZ(_7["Luv"]["XYZ"](obj,_66),_66).toHsl();
+},"HSV":function(obj,_67){
+return _1.fromXYZ(_7["Luv"]["XYZ"](obj,_67),_67).toHsv();
+},"Lab":function(obj,_68){
+return _7["XYZ"]["Lab"](_7["Luv"]["XYZ"](obj,_68),_68);
+},"LCHab":function(obj,_69){
+return _7["Lab"]["LCHab"](_7["XYZ"]["Lab"](_7["Luv"]["XYZ"](obj,_69),_69),_69);
+},"LCHuv":function(obj,_6a){
+return _7["Luv"]["LCHuv"](obj,_6a);
+},"RGB":function(obj,_6b){
+return _1.fromXYZ(_7["Luv"]["XYZ"](obj,_6b),_6b);
+},"XYZ":function(obj,_6c){
+return _7["Luv"]["XYZ"](obj,_6c);
+},"xyY":function(obj,_6d){
+return _7["XYZ"]["xyY"](_7["Luv"]["XYZ"](obj,_6d),_6d);
+}},"RGB":{"CMY":function(obj,_6e){
+return obj.toCmy();
+},"CMYK":function(obj,_6f){
+return obj.toCmyk();
+},"HSL":function(obj,_70){
+return obj.toHsl();
+},"HSV":function(obj,_71){
+return obj.toHsv();
+},"Lab":function(obj,_72){
+return _7["XYZ"]["Lab"](obj.toXYZ(_72),_72);
+},"LCHab":function(obj,_73){
+return _7["LCHab"]["Lab"](_7["XYZ"]["Lab"](obj.toXYZ(_73),_73),_73);
+},"LCHuv":function(obj,_74){
+return _7["LCHuv"]["Luv"](_7["XYZ"]["Luv"](obj.toXYZ(_74),_74),_74);
+},"Luv":function(obj,_75){
+return _7["XYZ"]["Luv"](obj.toXYZ(_75),_75);
+},"XYZ":function(obj,_76){
+return obj.toXYZ(_76);
+},"xyY":function(obj,_77){
+return _7["XYZ"]["xyY"](obj.toXYZ(_77),_77);
+}},"XYZ":{"CMY":function(obj,_78){
+return _1.fromXYZ(obj,_78).toCmy();
+},"CMYK":function(obj,_79){
+return _1.fromXYZ(obj,_79).toCmyk();
+},"HSL":function(obj,_7a){
+return _1.fromXYZ(obj,_7a).toHsl();
+},"HSV":function(obj,_7b){
+return _1.fromXYZ(obj,_7b).toHsv();
+},"Lab":function(obj,_7c){
+return _7["XYZ"]["Lab"](obj,_7c);
+},"LCHab":function(obj,_7d){
+return _7["Lab"]["LCHab"](_7["XYZ"]["Lab"](obj,_7d),_7d);
+},"LCHuv":function(obj,_7e){
+return _7["Luv"]["LCHuv"](_7["XYZ"]["Luv"](obj,_7e),_7e);
+},"Luv":function(obj,_7f){
+return _7["XYZ"]["Luv"](obj,_7f);
+},"RGB":function(obj,_80){
+return _1.fromXYZ(obj,_80);
+},"xyY":function(obj,_81){
+return _7["XYZ"]["xyY"](_1.fromXYZ(obj,_81),_81);
+}},"xyY":{"CMY":function(obj,_82){
+return _1.fromXYZ(_7["xyY"]["XYZ"](obj,_82),_82).toCmy();
+},"CMYK":function(obj,_83){
+return _1.fromXYZ(_7["xyY"]["XYZ"](obj,_83),_83).toCmyk();
+},"HSL":function(obj,_84){
+return _1.fromXYZ(_7["xyY"]["XYZ"](obj,_84),_84).toHsl();
+},"HSV":function(obj,_85){
+return _1.fromXYZ(_7["xyY"]["XYZ"](obj,_85),_85).toHsv();
+},"Lab":function(obj,_86){
+return _7["Lab"]["XYZ"](_7["xyY"]["XYZ"](obj,_86),_86);
+},"LCHab":function(obj,_87){
+return _7["LCHab"]["Lab"](_7["Lab"]["XYZ"](_7["xyY"]["XYZ"](obj,_87),_87),_87);
+},"LCHuv":function(obj,_88){
+return _7["LCHuv"]["Luv"](_7["Luv"]["XYZ"](_7["xyY"]["XYZ"](obj,_88),_88),_88);
+},"Luv":function(obj,_89){
+return _7["Luv"]["XYZ"](_7["xyY"]["XYZ"](obj,_89),_89);
+},"RGB":function(obj,_8a){
+return _1.fromXYZ(_7["xyY"]["XYZ"](obj,_8a),_8a);
+},"XYZ":function(obj,_8b){
+return _7["xyY"]["XYZ"](obj,_8b);
+}}};
+this.whitepoint=function(_8c,_8d){
+_8d=_8d||"10";
+var x=0,y=0,t=0;
+if(_4[_8d]&&_4[_8d][_8c]){
+x=_4[_8d][_8c].x;
+y=_4[_8d][_8c].y;
+t=_4[_8d][_8c].t;
+}else{
+console.warn("dojox.color.Colorspace::whitepoint: either the observer or the whitepoint name was not found. ",_8d,_8c);
+}
+var wp={x:x,y:y,z:(1-x-y),t:t,Y:1};
+return this.convert(wp,"xyY","XYZ");
+};
+this.tempToWhitepoint=function(t){
+if(t<4000){
+console.warn("dojox.color.Colorspace::tempToWhitepoint: can't find a white point for temperatures less than 4000K. (Passed ",t,").");
+return {x:0,y:0};
+}
+if(t>25000){
+console.warn("dojox.color.Colorspace::tempToWhitepoint: can't find a white point for temperatures greater than 25000K. (Passed ",t,").");
+return {x:0,y:0};
+}
+var t1=t,t2=t*t,t3=t2*t;
+var _8e=Math.pow(10,9),_8f=Math.pow(10,6),_90=Math.pow(10,3);
+if(t<=7000){
+var x=(-4.607*_8e/t3)+(2.9678*_8f/t2)+(0.09911*_90/t)+0.2444063;
+}else{
+var x=(-2.0064*_8e/t3)+(1.9018*_8f/t2)+(0.24748*_90/t)+0.23704;
+}
+var y=-3*x*x+2.87*x-0.275;
+return {x:x,y:y};
+};
+this.primaries=function(_91){
+_91=dojo.mixin({profile:"sRGB",whitepoint:"D65",observer:"10",adaptor:"Bradford"},_91||{});
+var m=[];
+if(_5[_91.profile]){
+m=_5[_91.profile].slice(0);
+}else{
+console.warn("dojox.color.Colorspace::primaries: the passed profile was not found. ","Available profiles include: ",_5,". The profile passed was ",_91.profile);
+}
+var _92={name:_91.profile,gamma:m[0],whitepoint:m[1],xr:m[2],yr:m[3],Yr:m[4],xg:m[5],yg:m[6],Yg:m[7],xb:m[8],yb:m[9],Yb:m[10]};
+if(_91.whitepoint!=_92.whitepoint){
+var r=this.convert(this.adapt({color:this.convert({x:xr,y:yr,Y:Yr},"xyY","XYZ"),adaptor:_91.adaptor,source:_92.whitepoint,destination:_91.whitepoint}),"XYZ","xyY");
+var g=this.convert(this.adapt({color:this.convert({x:xg,y:yg,Y:Yg},"xyY","XYZ"),adaptor:_91.adaptor,source:_92.whitepoint,destination:_91.whitepoint}),"XYZ","xyY");
+var b=this.convert(this.adapt({color:this.convert({x:xb,y:yb,Y:Yb},"xyY","XYZ"),adaptor:_91.adaptor,source:_92.whitepoint,destination:_91.whitepoint}),"XYZ","xyY");
+_92=dojo.mixin(_92,{xr:r.x,yr:r.y,Yr:r.Y,xg:g.x,yg:g.y,Yg:g.Y,xb:b.x,yb:b.y,Yb:b.Y,whitepoint:_91.whitepoint});
+}
+return dojo.mixin(_92,{zr:1-_92.xr-_92.yr,zg:1-_92.xg-_92.yg,zb:1-_92.xb-_92.yb});
+};
+this.adapt=function(_93){
+if(!_93.color||!_93.source){
+console.error("dojox.color.Colorspace::adapt: color and source arguments are required. ",_93);
+}
+_93=dojo.mixin({adaptor:"Bradford",destination:"D65"},_93);
+var swp=this.whitepoint(_93.source);
+var dwp=this.whitepoint(_93.destination);
+if(_6[_93.adaptor]){
+var ma=_6[_93.adaptor].ma;
+var mai=_6[_93.adaptor].mai;
+}else{
+console.warn("dojox.color.Colorspace::adapt: the passed adaptor '",_93.adaptor,"' was not found.");
+}
+var _94=_2.multiply([[swp.x,swp.y,swp.z]],ma);
+var _95=_2.multiply([[dwp.x,dwp.y,dwp.z]],ma);
+var _96=[[_95[0][0]/_94[0][0],0,0],[0,_95[0][1]/_94[0][1],0],[0,0,_95[0][2]/_94[0][2]]];
+var m=_2.multiply(_2.multiply(ma,_96),mai);
+var r=_2.multiply([[_93.color.X,_93.color.Y,_93.color.Z]],m)[0];
+return {X:r[0],Y:r[1],Z:r[2]};
+};
+this.matrix=function(to,_97){
+var wp=this.whitepoint(_97.whitepoint);
+var Xr=p.xr/p.yr,Yr=1,Zr=(1-p.xr-p.yr)/p.yr;
+var Xg=p.xg/p.yg,Yg=1,Zg=(1-p.xg-p.yg)/p.yg;
+var Xb=p.xb/p.yb,Yb=1,Zr=(1-p.xb-p.yb)/p.yb;
+var m1=[[Xr,Yr,Zr],[Xg,Yg,Zg],[Xb,Yb,Zb]];
+var m2=[[wp.X,wp.Y,wp.Z]];
+var sm=dojox.math.matrix.multiply(m2,dojox.math.matrix.inverse(m1));
+var Sr=sm[0][0],Sg=sm[0][1],Sb=sm[0][2];
+var _98=[[Sr*Xr,Sr*Yr,Sr*Zr],[Sg*Xg,Sg*Yg,Sg*Zg],[Sb*Xb,Sb*Yb,Sb*Zb]];
+if(to=="RGB"){
+return dojox.math.inverse(_98);
+}
+return _98;
+};
+this.epsilon=function(_99){
+return (_99||typeof (_99)=="undefined")?0.008856:216/24289;
+};
+this.kappa=function(_9a){
+return (_9a||typeof (_9a)=="undefined")?903.3:24389/27;
+};
+this.convert=function(_9b,_9c,to,_9d){
+if(_1d[_9c]&&_1d[_9c][to]){
+return _1d[_9c][to](obj,_9d);
+}
+console.warn("dojox.color.Colorspace::convert: Can't convert ",_9b," from ",_9c," to ",to,".");
+};
})();
-
-// More dojox.color and dojox.color.Color extensions
-dojo.mixin(dojox.color, {
- fromXYZ: function(/* Object */xyz, /* Object?*/kwArgs){
- kwArgs=kwArgs||{};
- var p=dojox.color.Colorspace.primaries(kwArgs);
- var m=dojox.color.Colorspace.matrix("RGB", p);
- var rgb=dojox.math.matrix.mutliply([[ xyz.X, xyz.Y, xyz.Z ]], m);
- var r=rgb[0][0], g=rgb[0][1], b=rgb[0][2];
- if(p.profile=="sRGB"){
- var R = (r>0.0031308)?(1.055*Math.pow(r, 1/2.4))-0.055: 12.92*r;
- var G = (g>0.0031308)?(1.055*Math.pow(g, 1/2.4))-0.055: 12.92*g;
- var B = (b>0.0031308)?(1.055*Math.pow(b, 1/2.4))-0.055: 12.92*b;
- }else{
- var R=Math.pow(r, 1/p.gamma), G=Math.pow(g, 1/p.gamma), B=Math.pow(b, 1/p.gamma);
- }
- return new dojox.color.Color({ r:Math.floor(R*255), g:Math.floor(G*255), b:Math.floor(B*255) });
- }
-});
-
-dojo.extend(dojox.color.Color, {
- toXYZ: function(/* Object */kwArgs){
- kwArgs=kwArgs||{};
- var p=dojox.color.Colorspace.primaries(kwArgs);
- var m=dojox.color.Colorspace.matrix("XYZ", p);
- var _r=this.r/255, _g=this.g/255, _b=this.b/255;
- if(p.profile=="sRGB"){
- var r=(_r>0.04045) ? Math.pow(((_r+0.055)/1.055), 2.4):_r/12.92;
- var g=(_g>0.04045) ? Math.pow(((_g+0.055)/1.055), 2.4):_g/12.92;
- var b=(_b>0.04045) ? Math.pow(((_b+0.055)/1.055), 2.4):_b/12.92;
- } else {
- var r=Math.pow(_r, p.gamma), g=Math.pow(_g, p.gamma), b=Math.pow(_b, p.gamma);
- }
- var xyz=dojox.math.matrix([[ r, g, b ]], m);
- return { X: xyz[0][0], Y: xyz[0][1], Z: xyz[0][2] }; // Object
- }
-});
-
+dojo.mixin(dojox.color,{fromXYZ:function(xyz,_9e){
+_9e=_9e||{};
+var p=dojox.color.Colorspace.primaries(_9e);
+var m=dojox.color.Colorspace.matrix("RGB",p);
+var rgb=dojox.math.matrix.mutliply([[xyz.X,xyz.Y,xyz.Z]],m);
+var r=rgb[0][0],g=rgb[0][1],b=rgb[0][2];
+if(p.profile=="sRGB"){
+var R=(r>0.0031308)?(1.055*Math.pow(r,1/2.4))-0.055:12.92*r;
+var G=(g>0.0031308)?(1.055*Math.pow(g,1/2.4))-0.055:12.92*g;
+var B=(b>0.0031308)?(1.055*Math.pow(b,1/2.4))-0.055:12.92*b;
+}else{
+var R=Math.pow(r,1/p.gamma),G=Math.pow(g,1/p.gamma),B=Math.pow(b,1/p.gamma);
}
+return new dojox.color.Color({r:Math.floor(R*255),g:Math.floor(G*255),b:Math.floor(B*255)});
+}});
+dojo.extend(dojox.color.Color,{toXYZ:function(_9f){
+_9f=_9f||{};
+var p=dojox.color.Colorspace.primaries(_9f);
+var m=dojox.color.Colorspace.matrix("XYZ",p);
+var _a0=this.r/255,_a1=this.g/255,_a2=this.b/255;
+if(p.profile=="sRGB"){
+var r=(_a0>0.04045)?Math.pow(((_a0+0.055)/1.055),2.4):_a0/12.92;
+var g=(_a1>0.04045)?Math.pow(((_a1+0.055)/1.055),2.4):_a1/12.92;
+var b=(_a2>0.04045)?Math.pow(((_a2+0.055)/1.055),2.4):_a2/12.92;
+}else{
+var r=Math.pow(_a0,p.gamma),g=Math.pow(_a1,p.gamma),b=Math.pow(_a2,p.gamma);
+}
+var xyz=dojox.math.matrix([[r,g,b]],m);
+return {X:xyz[0][0],Y:xyz[0][1],Z:xyz[0][2]};
+}});
+}
diff --git a/js/dojo/dojox/color/README b/js/dojo/dojox/color/README
--- a/js/dojo/dojox/color/README
+++ b/js/dojo/dojox/color/README
@@ -1,41 +1,41 @@
--------------------------------------------------------------------------------
-DojoX Color
--------------------------------------------------------------------------------
-Version 0.9
-Release date: 10/20/2007
--------------------------------------------------------------------------------
-Project state:
-dojox.color._base: stable
-dojox.color.Colorspace: experimental
-dojox.color.Generator: beta
--------------------------------------------------------------------------------
-Credits
- Cal Henderson
- Tom Trenka (ttrenka AT gmail.com)
--------------------------------------------------------------------------------
-Project description
-
-Both a port of the older dojo.gfx.color work (Cal Henderson) as well as some
-new additions (Generator, Tom Trenka). Everything is applied to an alias of
-dojo.Color or dojo.color, so that you can just use dojox.color.Color instead
-with extended methods.
--------------------------------------------------------------------------------
-Dependencies:
-
-Depends on the Dojo Core, v1.0
--------------------------------------------------------------------------------
-Documentation
-
-See the API documentation.
--------------------------------------------------------------------------------
-Installation instructions
-
-Grab the following from the Dojo SVN Repository:
-http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/color.js
-http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/color/*
-
-Install into the following directory structure:
-/dojox/color/
-
-...which should be at the same level as your Dojo checkout.
--------------------------------------------------------------------------------
+-------------------------------------------------------------------------------
+DojoX Color
+-------------------------------------------------------------------------------
+Version 0.9
+Release date: 10/20/2007
+-------------------------------------------------------------------------------
+Project state:
+dojox.color._base: production
+dojox.color.Colorspace: experimental
+dojox.color.Generator: beta
+-------------------------------------------------------------------------------
+Credits
+ Cal Henderson
+ Tom Trenka (ttrenka AT gmail.com)
+-------------------------------------------------------------------------------
+Project description
+
+Both a port of the older dojo.gfx.color work (Cal Henderson) as well as some
+new additions (Generator, Tom Trenka). Everything is applied to an alias of
+dojo.Color or dojo.color, so that you can just use dojox.color.Color instead
+with extended methods.
+-------------------------------------------------------------------------------
+Dependencies:
+
+Depends on the Dojo Core, v1.0
+-------------------------------------------------------------------------------
+Documentation
+
+See the API documentation.
+-------------------------------------------------------------------------------
+Installation instructions
+
+Grab the following from the Dojo SVN Repository:
+http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/color.js
+http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/color/*
+
+Install into the following directory structure:
+/dojox/color/
+
+...which should be at the same level as your Dojo checkout.
+-------------------------------------------------------------------------------
diff --git a/js/dojo/dojox/color/_base.js b/js/dojo/dojox/color/_base.js
--- a/js/dojo/dojox/color/_base.js
+++ b/js/dojo/dojox/color/_base.js
@@ -1,197 +1,180 @@
-if(!dojo._hasResource["dojox.color._base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.color._base"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.color._base"]){
+dojo._hasResource["dojox.color._base"]=true;
dojo.provide("dojox.color._base");
dojo.require("dojo.colors");
-
-// alias all the dojo.Color mechanisms
dojox.color.Color=dojo.Color;
dojox.color.blend=dojo.blendColors;
dojox.color.fromRgb=dojo.colorFromRgb;
dojox.color.fromHex=dojo.colorFromHex;
dojox.color.fromArray=dojo.colorFromArray;
dojox.color.fromString=dojo.colorFromString;
-
-// alias the dojo.colors mechanisms
dojox.color.greyscale=dojo.colors.makeGrey;
-
-// static methods
-dojo.mixin(dojox.color, {
- fromCmy: function(/* Object|Array|int */cyan, /*int*/magenta, /*int*/yellow){
- // summary
- // Create a dojox.color.Color from a CMY defined color.
- // All colors should be expressed as 0-100 (percentage)
-
- if(dojo.isArray(cyan)){
- magenta=cyan[1], yellow=cyan[2], cyan=cyan[0];
- } else if(dojo.isObject(cyan)){
- magenta=cyan.m, yellow=cyan.y, cyan=cyan.c;
- }
- cyan/=100, magenta/=100, yellow/=100;
-
- var r=1-cyan, g=1-magenta, b=1-yellow;
- return new dojox.color.Color({ r:Math.round(r*255), g:Math.round(g*255), b:Math.round(b*255) }); // dojox.color.Color
- },
-
- fromCmyk: function(/* Object|Array|int */cyan, /*int*/magenta, /*int*/yellow, /*int*/black){
- // summary
- // Create a dojox.color.Color from a CMYK defined color.
- // All colors should be expressed as 0-100 (percentage)
-
- if(dojo.isArray(cyan)){
- magenta=cyan[1], yellow=cyan[2], black=cyan[3], cyan=cyan[0];
- } else if(dojo.isObject(cyan)){
- magenta=cyan.m, yellow=cyan.y, black=cyan.b, cyan=cyan.c;
- }
- cyan/=100, magenta/=100, yellow/=100, black/=100;
- var r,g,b;
- r = 1-Math.min(1, cyan*(1-black)+black);
- g = 1-Math.min(1, magenta*(1-black)+black);
- b = 1-Math.min(1, yellow*(1-black)+black);
- return new dojox.color.Color({ r:Math.round(r*255), g:Math.round(g*255), b:Math.round(b*255) }); // dojox.color.Color
- },
-
- fromHsl: function(/* Object|Array|int */hue, /* int */saturation, /* int */luminosity){
- // summary
- // Create a dojox.color.Color from an HSL defined color.
- // hue from 0-359 (degrees), saturation and luminosity 0-100.
-
- if(dojo.isArray(hue)){
- saturation=hue[1], luminosity=hue[2], hue=hue[0];
- } else if(dojo.isObject(hue)){
- saturation=hue.s, luminosity=hue.l, hue=hue.h;
- }
- saturation/=100;
- luminosity/=100;
-
- while(hue<0){ hue+=360; }
- while(hue>=360){ hue-=360; }
-
- var r, g, b;
- if(hue<120){
- r=(120-hue)/60, g=hue/60, b=0;
- } else if (hue<240){
- r=0, g=(240-hue)/60, b=(hue-120)/60;
- } else {
- r=(hue-240)/60, g=0, b=(360-hue)/60;
- }
-
- r=2*saturation*Math.min(r, 1)+(1-saturation);
- g=2*saturation*Math.min(g, 1)+(1-saturation);
- b=2*saturation*Math.min(b, 1)+(1-saturation);
- if(luminosity<0.5){
- r*=luminosity, g*=luminosity, b*=luminosity;
- }else{
- r=(1-luminosity)*r+2*luminosity-1;
- g=(1-luminosity)*g+2*luminosity-1;
- b=(1-luminosity)*b+2*luminosity-1;
- }
- return new dojox.color.Color({ r:Math.round(r*255), g:Math.round(g*255), b:Math.round(b*255) }); // dojox.color.Color
- },
-
- fromHsv: function(/* Object|Array|int */hue, /* int */saturation, /* int */value){
- // summary
- // Create a dojox.color.Color from an HSV defined color.
- // hue from 0-359 (degrees), saturation and value 0-100.
-
- if(dojo.isArray(hue)){
- saturation=hue[1], value=hue[2], hue=hue[0];
- } else if (dojo.isObject(hue)){
- saturation=hue.s, value=hue.v, hue=hue.h;
- }
-
- if(hue==360){ hue=0; }
- saturation/=100;
- value/=100;
-
- var r, g, b;
- if(saturation==0){
- r=value, b=value, g=value;
- }else{
- var hTemp=hue/60, i=Math.floor(hTemp), f=hTemp-i;
- var p=value*(1-saturation);
- var q=value*(1-(saturation*f));
- var t=value*(1-(saturation*(1-f)));
- switch(i){
- case 0:{ r=value, g=t, b=p; break; }
- case 1:{ r=q, g=value, b=p; break; }
- case 2:{ r=p, g=value, b=t; break; }
- case 3:{ r=p, g=q, b=value; break; }
- case 4:{ r=t, g=p, b=value; break; }
- case 5:{ r=value, g=p, b=q; break; }
- }
- }
- return new dojox.color.Color({ r:Math.round(r*255), g:Math.round(g*255), b:Math.round(b*255) }); // dojox.color.Color
- }
-});
-
-// Conversions directly on dojox.color.Color
-dojo.extend(dojox.color.Color, {
- toCmy: function(){
- // summary
- // Convert this Color to a CMY definition.
- var cyan=1-(this.r/255), magenta=1-(this.g/255), yellow=1-(this.b/255);
- return { c:Math.round(cyan*100), m:Math.round(magenta*100), y:Math.round(yellow*100) }; // Object
- },
-
- toCmyk: function(){
- // summary
- // Convert this Color to a CMYK definition.
- var cyan, magenta, yellow, black;
- var r=this.r/255, g=this.g/255, b=this.b/255;
- black = Math.min(1-r, 1-g, 1-b);
- cyan = (1-r-black)/(1-black);
- magenta = (1-g-black)/(1-black);
- yellow = (1-b-black)/(1-black);
- return { c:Math.round(cyan*100), m:Math.round(magenta*100), y:Math.round(yellow*100), b:Math.round(black*100) }; // Object
- },
-
- toHsl: function(){
- // summary
- // Convert this Color to an HSL definition.
- var r=this.r/255, g=this.g/255, b=this.b/255;
- var min = Math.min(r, b, g), max = Math.max(r, g, b);
- var delta = max-min;
- var h=0, s=0, l=(min+max)/2;
- if(l>0 && l<1){
- s = delta/((l<0.5)?(2*l):(2-2*l));
- }
- if(delta>0){
- if(max==r && max!=g){
- h+=(g-b)/delta;
- }
- if(max==g && max!=b){
- h+=(2+(b-r)/delta);
- }
- if(max==b && max!=r){
- h+=(4+(r-g)/delta);
- }
- h*=60;
- }
- return { h:h, s:Math.round(s*100), l:Math.round(l*100) }; // Object
- },
-
- toHsv: function(){
- // summary
- // Convert this Color to an HSV definition.
- var r=this.r/255, g=this.g/255, b=this.b/255;
- var min = Math.min(r, b, g), max = Math.max(r, g, b);
- var delta = max-min;
- var h = null, s = (max==0)?0:(delta/max);
- if(s==0){
- h = 0;
- }else{
- if(r==max){
- h = 60*(g-b)/delta;
- }else if(g==max){
- h = 120 + 60*(b-r)/delta;
- }else{
- h = 240 + 60*(r-g)/delta;
- }
-
- if(h<0){ h+=360; }
- }
- return { h:h, s:Math.round(s*100), v:Math.round(max*100) }; // Object
- }
-});
-
+dojo.mixin(dojox.color,{fromCmy:function(_1,_2,_3){
+if(dojo.isArray(_1)){
+_2=_1[1],_3=_1[2],_1=_1[0];
+}else{
+if(dojo.isObject(_1)){
+_2=_1.m,_3=_1.y,_1=_1.c;
+}
+}
+_1/=100,_2/=100,_3/=100;
+var r=1-_1,g=1-_2,b=1-_3;
+return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});
+},fromCmyk:function(_4,_5,_6,_7){
+if(dojo.isArray(_4)){
+_5=_4[1],_6=_4[2],_7=_4[3],_4=_4[0];
+}else{
+if(dojo.isObject(_4)){
+_5=_4.m,_6=_4.y,_7=_4.b,_4=_4.c;
+}
+}
+_4/=100,_5/=100,_6/=100,_7/=100;
+var r,g,b;
+r=1-Math.min(1,_4*(1-_7)+_7);
+g=1-Math.min(1,_5*(1-_7)+_7);
+b=1-Math.min(1,_6*(1-_7)+_7);
+return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});
+},fromHsl:function(_8,_9,_a){
+if(dojo.isArray(_8)){
+_9=_8[1],_a=_8[2],_8=_8[0];
+}else{
+if(dojo.isObject(_8)){
+_9=_8.s,_a=_8.l,_8=_8.h;
+}
+}
+_9/=100;
+_a/=100;
+while(_8<0){
+_8+=360;
+}
+while(_8>=360){
+_8-=360;
+}
+var r,g,b;
+if(_8<120){
+r=(120-_8)/60,g=_8/60,b=0;
+}else{
+if(_8<240){
+r=0,g=(240-_8)/60,b=(_8-120)/60;
+}else{
+r=(_8-240)/60,g=0,b=(360-_8)/60;
+}
+}
+r=2*_9*Math.min(r,1)+(1-_9);
+g=2*_9*Math.min(g,1)+(1-_9);
+b=2*_9*Math.min(b,1)+(1-_9);
+if(_a<0.5){
+r*=_a,g*=_a,b*=_a;
+}else{
+r=(1-_a)*r+2*_a-1;
+g=(1-_a)*g+2*_a-1;
+b=(1-_a)*b+2*_a-1;
+}
+return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});
+},fromHsv:function(_b,_c,_d){
+if(dojo.isArray(_b)){
+_c=_b[1],_d=_b[2],_b=_b[0];
+}else{
+if(dojo.isObject(_b)){
+_c=_b.s,_d=_b.v,_b=_b.h;
+}
+}
+if(_b==360){
+_b=0;
}
+_c/=100;
+_d/=100;
+var r,g,b;
+if(_c==0){
+r=_d,b=_d,g=_d;
+}else{
+var _e=_b/60,i=Math.floor(_e),f=_e-i;
+var p=_d*(1-_c);
+var q=_d*(1-(_c*f));
+var t=_d*(1-(_c*(1-f)));
+switch(i){
+case 0:
+r=_d,g=t,b=p;
+break;
+case 1:
+r=q,g=_d,b=p;
+break;
+case 2:
+r=p,g=_d,b=t;
+break;
+case 3:
+r=p,g=q,b=_d;
+break;
+case 4:
+r=t,g=p,b=_d;
+break;
+case 5:
+r=_d,g=p,b=q;
+break;
+}
+}
+return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});
+}});
+dojo.extend(dojox.color.Color,{toCmy:function(){
+var _f=1-(this.r/255),_10=1-(this.g/255),_11=1-(this.b/255);
+return {c:Math.round(_f*100),m:Math.round(_10*100),y:Math.round(_11*100)};
+},toCmyk:function(){
+var _12,_13,_14,_15;
+var r=this.r/255,g=this.g/255,b=this.b/255;
+_15=Math.min(1-r,1-g,1-b);
+_12=(1-r-_15)/(1-_15);
+_13=(1-g-_15)/(1-_15);
+_14=(1-b-_15)/(1-_15);
+return {c:Math.round(_12*100),m:Math.round(_13*100),y:Math.round(_14*100),b:Math.round(_15*100)};
+},toHsl:function(){
+var r=this.r/255,g=this.g/255,b=this.b/255;
+var min=Math.min(r,b,g),max=Math.max(r,g,b);
+var _16=max-min;
+var h=0,s=0,l=(min+max)/2;
+if(l>0&&l<1){
+s=_16/((l<0.5)?(2*l):(2-2*l));
+}
+if(_16>0){
+if(max==r&&max!=g){
+h+=(g-b)/_16;
+}
+if(max==g&&max!=b){
+h+=(2+(b-r)/_16);
+}
+if(max==b&&max!=r){
+h+=(4+(r-g)/_16);
+}
+h*=60;
+}
+return {h:h,s:Math.round(s*100),l:Math.round(l*100)};
+},toHsv:function(){
+var r=this.r/255,g=this.g/255,b=this.b/255;
+var min=Math.min(r,b,g),max=Math.max(r,g,b);
+var _17=max-min;
+var h=null,s=(max==0)?0:(_17/max);
+if(s==0){
+h=0;
+}else{
+if(r==max){
+h=60*(g-b)/_17;
+}else{
+if(g==max){
+h=120+60*(b-r)/_17;
+}else{
+h=240+60*(r-g)/_17;
+}
+}
+if(h<0){
+h+=360;
+}
+}
+return {h:h,s:Math.round(s*100),v:Math.round(max*100)};
+}});
+}
diff --git a/js/dojo/dojox/cometd.js b/js/dojo/dojox/cometd.js
--- a/js/dojo/dojox/cometd.js
+++ b/js/dojo/dojox/cometd.js
@@ -1,7 +1,14 @@
-if(!dojo._hasResource["dojox.cometd"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.cometd"] = true;
-// stub loader for the cometd module since no implementation code is allowed to live in top-level files
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.cometd"]){
+dojo._hasResource["dojox.cometd"]=true;
dojo.provide("dojox.cometd");
-dojo.require("dojox._cometd.cometd");
-
+dojo.require("dojox.cometd._base");
+dojo.require("dojox.cometd.longPollTransport");
+dojo.require("dojox.cometd.callbackPollTransport");
}
diff --git a/js/dojo/dojox/data/CsvStore.js b/js/dojo/dojox/data/CsvStore.js
--- a/js/dojo/dojox/data/CsvStore.js
+++ b/js/dojo/dojox/data/CsvStore.js
@@ -1,552 +1,444 @@
-if(!dojo._hasResource["dojox.data.CsvStore"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.data.CsvStore"] = true;
-dojo.provide("dojox.data.CsvStore");
-
-dojo.require("dojo.data.util.filter");
-dojo.require("dojo.data.util.simpleFetch");
-
-dojo.declare("dojox.data.CsvStore", null, {
- // summary:
- // The CsvStore implements the dojo.data.api.Read API and reads
- // data from files in CSV (Comma Separated Values) format.
- // All values are simple string values. References to other items
- // are not supported as attribute values in this datastore.
- //
- // Example data file:
- // name, color, age, tagline
- // Kermit, green, 12, "Hi, I'm Kermit the Frog."
- // Fozzie Bear, orange, 10, "Wakka Wakka Wakka!"
- // Miss Piggy, pink, 11, "Kermie!"
- //
- // Note that values containing a comma must be enclosed with quotes ("")
- // Also note that values containing quotes must be escaped with two consecutive quotes (""quoted"")
-
- /* examples:
- * var csvStore = new dojox.data.CsvStore({url:"movies.csv");
- * var csvStore = new dojox.data.CsvStore({url:"http://example.com/movies.csv");
- */
-
- constructor: function(/* Object */ keywordParameters){
- // summary: initializer
- // keywordParameters: {url: String}
- // keywordParameters: {data: String}
- // keywordParameters: {label: String} The column label for the column to use for the label returned by getLabel.
-
- this._attributes = []; // e.g. ["Title", "Year", "Producer"]
- this._attributeIndexes = {}; // e.g. {Title: 0, Year: 1, Producer: 2}
- this._dataArray = []; // e.g. [[<Item0>],[<Item1>],[<Item2>]]
- this._arrayOfAllItems = []; // e.g. [{_csvId:0,_csvStore:store},...]
- this._loadFinished = false;
- if(keywordParameters.url){
- this.url = keywordParameters.url;
- }
- this._csvData = keywordParameters.data;
- if(keywordParameters.label){
- this.label = keywordParameters.label;
- }else if(this.label === ""){
- this.label = undefined;
- }
- this._storeProp = "_csvStore"; // Property name for the store reference on every item.
- this._idProp = "_csvId"; // Property name for the Item Id on every item.
- this._features = {
- 'dojo.data.api.Read': true,
- 'dojo.data.api.Identity': true
- };
- this._loadInProgress = false; //Got to track the initial load to prevent duelling loads of the dataset.
- this._queuedFetches = [];
- },
-
- url: "", //Declarative hook for setting Csv source url.
-
- label: "", //Declarative hook for setting the label attribute.
-
- _assertIsItem: function(/* item */ item){
- // summary:
- // This function tests whether the item passed in is indeed an item in the store.
- // item:
- // The item to test for being contained by the store.
- if(!this.isItem(item)){
- throw new Error("dojox.data.CsvStore: a function was passed an item argument that was not an item");
- }
- },
-
- _assertIsAttribute: function(/* item || String */ attribute){
- // summary:
- // This function tests whether the item passed in is indeed a valid 'attribute' like type for the store.
- // attribute:
- // The attribute to test for being contained by the store.
- if(!dojo.isString(attribute)){
- throw new Error("dojox.data.CsvStore: a function was passed an attribute argument that was not an attribute object nor an attribute name string");
- }
- },
-
-/***************************************
- dojo.data.api.Read API
-***************************************/
- getValue: function( /* item */ item,
- /* attribute || attribute-name-string */ attribute,
- /* value? */ defaultValue){
- // summary:
- // See dojo.data.api.Read.getValue()
- // Note that for the CsvStore, an empty string value is the same as no value,
- // so the defaultValue would be returned instead of an empty string.
- this._assertIsItem(item);
- this._assertIsAttribute(attribute);
- var itemValue = defaultValue;
- if(this.hasAttribute(item, attribute)){
- var itemData = this._dataArray[this.getIdentity(item)];
- itemValue = itemData[this._attributeIndexes[attribute]];
- }
- return itemValue; //String
- },
-
- getValues: function(/* item */ item,
- /* attribute || attribute-name-string */ attribute){
- // summary:
- // See dojo.data.api.Read.getValues()
- // CSV syntax does not support multi-valued attributes, so this is just a
- // wrapper function for getValue().
- var value = this.getValue(item, attribute);
- return (value ? [value] : []); //Array
- },
-
- getAttributes: function(/* item */ item){
- // summary:
- // See dojo.data.api.Read.getAttributes()
- this._assertIsItem(item);
- var attributes = [];
- var itemData = this._dataArray[this.getIdentity(item)];
- for(var i=0; i<itemData.length; i++){
- // Check for empty string values. CsvStore treats empty strings as no value.
- if(itemData[i] != ""){
- attributes.push(this._attributes[i]);
- }
- }
- return attributes; //Array
- },
-
- hasAttribute: function( /* item */ item,
- /* attribute || attribute-name-string */ attribute){
- // summary:
- // See dojo.data.api.Read.hasAttribute()
- // The hasAttribute test is true if attribute has an index number within the item's array length
- // AND if the item has a value for that attribute. Note that for the CsvStore, an
- // empty string value is the same as no value.
- this._assertIsItem(item);
- this._assertIsAttribute(attribute);
- var attributeIndex = this._attributeIndexes[attribute];
- var itemData = this._dataArray[this.getIdentity(item)];
- return (typeof attributeIndex != "undefined" && attributeIndex < itemData.length && itemData[attributeIndex] != ""); //Boolean
- },
-
- containsValue: function(/* item */ item,
- /* attribute || attribute-name-string */ attribute,
- /* anything */ value){
- // summary:
- // See dojo.data.api.Read.containsValue()
- var regexp = undefined;
- if(typeof value === "string"){
- regexp = dojo.data.util.filter.patternToRegExp(value, false);
- }
- return this._containsValue(item, attribute, value, regexp); //boolean.
- },
-
- _containsValue: function( /* item */ item,
- /* attribute || attribute-name-string */ attribute,
- /* anything */ value,
- /* RegExp?*/ regexp){
- // summary:
- // Internal function for looking at the values contained by the item.
- // description:
- // Internal function for looking at the values contained by the item. This
- // function allows for denoting if the comparison should be case sensitive for
- // strings or not (for handling filtering cases where string case should not matter)
- //
- // item:
- // The data item to examine for attribute values.
- // attribute:
- // The attribute to inspect.
- // value:
- // The value to match.
- // regexp:
- // Optional regular expression generated off value if value was of string type to handle wildcarding.
- // If present and attribute values are string, then it can be used for comparison instead of 'value'
- var values = this.getValues(item, attribute);
- for(var i = 0; i < values.length; ++i){
- var possibleValue = values[i];
- if(typeof possibleValue === "string" && regexp){
- return (possibleValue.match(regexp) !== null);
- }else{
- //Non-string matching.
- if(value === possibleValue){
- return true; // Boolean
- }
- }
- }
- return false; // Boolean
- },
-
- isItem: function(/* anything */ something){
- // summary:
- // See dojo.data.api.Read.isItem()
- if(something && something[this._storeProp] === this){
- var identity = something[this._idProp];
- if(identity >= 0 && identity < this._dataArray.length){
- return true; //Boolean
- }
- }
- return false; //Boolean
- },
-
- isItemLoaded: function(/* anything */ something){
- // summary:
- // See dojo.data.api.Read.isItemLoaded()
- // The CsvStore always loads all items, so if it's an item, then it's loaded.
- return this.isItem(something); //Boolean
- },
-
- loadItem: function(/* item */ item){
- // summary:
- // See dojo.data.api.Read.loadItem()
- // description:
- // The CsvStore always loads all items, so if it's an item, then it's loaded.
- // From the dojo.data.api.Read.loadItem docs:
- // If a call to isItemLoaded() returns true before loadItem() is even called,
- // then loadItem() need not do any work at all and will not even invoke
- // the callback handlers.
- },
-
- getFeatures: function(){
- // summary:
- // See dojo.data.api.Read.getFeatures()
- return this._features; //Object
- },
-
- getLabel: function(/* item */ item){
- // summary:
- // See dojo.data.api.Read.getLabel()
- if(this.label && this.isItem(item)){
- return this.getValue(item,this.label); //String
- }
- return undefined; //undefined
- },
-
- getLabelAttributes: function(/* item */ item){
- // summary:
- // See dojo.data.api.Read.getLabelAttributes()
- if(this.label){
- return [this.label]; //array
- }
- return null; //null
- },
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // The dojo.data.api.Read.fetch() function is implemented as
- // a mixin from dojo.data.util.simpleFetch.
- // That mixin requires us to define _fetchItems().
- _fetchItems: function( /* Object */ keywordArgs,
- /* Function */ findCallback,
- /* Function */ errorCallback){
- // summary:
- // See dojo.data.util.simpleFetch.fetch()
-
- var self = this;
-
- var filter = function(requestArgs, arrayOfAllItems){
- var items = null;
- if(requestArgs.query){
- items = [];
- var ignoreCase = requestArgs.queryOptions ? requestArgs.queryOptions.ignoreCase : false;
-
- //See if there are any string values that can be regexp parsed first to avoid multiple regexp gens on the
- //same value for each item examined. Much more efficient.
- var regexpList = {};
- for(var key in requestArgs.query){
- var value = requestArgs.query[key];
- if(typeof value === "string"){
- regexpList[key] = dojo.data.util.filter.patternToRegExp(value, ignoreCase);
- }
- }
-
- for(var i = 0; i < arrayOfAllItems.length; ++i){
- var match = true;
- var candidateItem = arrayOfAllItems[i];
- for(var key in requestArgs.query){
- var value = requestArgs.query[key];
- if(!self._containsValue(candidateItem, key, value, regexpList[key])){
- match = false;
- }
- }
- if(match){
- items.push(candidateItem);
- }
- }
- }else{
- // We want a copy to pass back in case the parent wishes to sort the array. We shouldn't allow resort
- // of the internal list so that multiple callers can get lists and sort without affecting each other.
- if(arrayOfAllItems.length> 0){
- items = arrayOfAllItems.slice(0,arrayOfAllItems.length);
- }
- }
- findCallback(items, requestArgs);
- };
-
- if(this._loadFinished){
- filter(keywordArgs, this._arrayOfAllItems);
- }else{
- if(this.url !== ""){
- //If fetches come in before the loading has finished, but while
- //a load is in progress, we have to defer the fetching to be
- //invoked in the callback.
- if(this._loadInProgress){
- this._queuedFetches.push({args: keywordArgs, filter: filter});
- }else{
- this._loadInProgress = true;
- var getArgs = {
- url: self.url,
- handleAs: "text"
- };
- var getHandler = dojo.xhrGet(getArgs);
- getHandler.addCallback(function(data){
- self._processData(data);
- filter(keywordArgs, self._arrayOfAllItems);
- self._handleQueuedFetches();
- });
- getHandler.addErrback(function(error){
- self._loadInProgress = false;
- throw error;
- });
- }
- }else if(this._csvData){
- this._processData(this._csvData);
- this._csvData = null;
- filter(keywordArgs, this._arrayOfAllItems);
- }else{
- throw new Error("dojox.data.CsvStore: No CSV source data was provided as either URL or String data input.");
- }
- }
- },
-
- close: function(/*dojo.data.api.Request || keywordArgs || null */ request){
- // summary:
- // See dojo.data.api.Read.close()
- },
-
-
- // -------------------------------------------------------------------
- // Private methods
- _getArrayOfArraysFromCsvFileContents: function(/* string */ csvFileContents){
- /* summary:
- * Parses a string of CSV records into a nested array structure.
- * description:
- * Given a string containing CSV records, this method parses
- * the string and returns a data structure containing the parsed
- * content. The data structure we return is an array of length
- * R, where R is the number of rows (lines) in the CSV data. The
- * return array contains one sub-array for each CSV line, and each
- * sub-array contains C string values, where C is the number of
- * columns in the CSV data.
- */
-
- /* example:
- * For example, given this CSV string as input:
- * "Title, Year, Producer \n Alien, 1979, Ridley Scott \n Blade Runner, 1982, Ridley Scott"
- * this._dataArray will be set to:
- * [["Alien", "1979", "Ridley Scott"],
- * ["Blade Runner", "1982", "Ridley Scott"]]
- * And this._attributes will be set to:
- * ["Title", "Year", "Producer"]
- * And this._attributeIndexes will be set to:
- * { "Title":0, "Year":1, "Producer":2 }
- */
- if(dojo.isString(csvFileContents)){
- var lineEndingCharacters = new RegExp("\r\n|\n|\r");
- var leadingWhiteSpaceCharacters = new RegExp("^\\s+",'g');
- var trailingWhiteSpaceCharacters = new RegExp("\\s+$",'g');
- var doubleQuotes = new RegExp('""','g');
- var arrayOfOutputRecords = [];
-
- var arrayOfInputLines = csvFileContents.split(lineEndingCharacters);
- for(var i = 0; i < arrayOfInputLines.length; ++i){
- var singleLine = arrayOfInputLines[i];
- if(singleLine.length > 0){
- var listOfFields = singleLine.split(',');
- var j = 0;
- while(j < listOfFields.length){
- var space_field_space = listOfFields[j];
- var field_space = space_field_space.replace(leadingWhiteSpaceCharacters, ''); // trim leading whitespace
- var field = field_space.replace(trailingWhiteSpaceCharacters, ''); // trim trailing whitespace
- var firstChar = field.charAt(0);
- var lastChar = field.charAt(field.length - 1);
- var secondToLastChar = field.charAt(field.length - 2);
- var thirdToLastChar = field.charAt(field.length - 3);
- if(field.length === 2 && field == "\"\""){
- listOfFields[j] = ""; //Special case empty string field.
- }else if((firstChar == '"') &&
- ((lastChar != '"') ||
- ((lastChar == '"') && (secondToLastChar == '"') && (thirdToLastChar != '"')))){
- if(j+1 === listOfFields.length){
- // alert("The last field in record " + i + " is corrupted:\n" + field);
- return null; //null
- }
- var nextField = listOfFields[j+1];
- listOfFields[j] = field_space + ',' + nextField;
- listOfFields.splice(j+1, 1); // delete element [j+1] from the list
- }else{
- if((firstChar == '"') && (lastChar == '"')){
- field = field.slice(1, (field.length - 1)); // trim the " characters off the ends
- field = field.replace(doubleQuotes, '"'); // replace "" with "
- }
- listOfFields[j] = field;
- j += 1;
- }
- }
- arrayOfOutputRecords.push(listOfFields);
- }
- }
-
- // The first item of the array must be the header row with attribute names.
- this._attributes = arrayOfOutputRecords.shift();
- for(var i=0; i<this._attributes.length; i++){
- // Store the index of each attribute
- this._attributeIndexes[this._attributes[i]] = i;
- }
- this._dataArray = arrayOfOutputRecords; //Array
- }
- },
-
- _processData: function(/* String */ data){
- this._getArrayOfArraysFromCsvFileContents(data);
- this._arrayOfAllItems = [];
- for(var i=0; i<this._dataArray.length; i++){
- this._arrayOfAllItems.push(this._createItemFromIdentity(i));
- }
- this._loadFinished = true;
- this._loadInProgress = false;
- },
-
- _createItemFromIdentity: function(/* String */ identity){
- var item = {};
- item[this._storeProp] = this;
- item[this._idProp] = identity;
- return item; //Object
- },
-
-
-/***************************************
- dojo.data.api.Identity API
-***************************************/
- getIdentity: function(/* item */ item){
- // summary:
- // See dojo.data.api.Identity.getIdentity()
- if(this.isItem(item)){
- return item[this._idProp]; //String
- }
- return null; //null
- },
-
- fetchItemByIdentity: function(/* Object */ keywordArgs){
- // summary:
- // See dojo.data.api.Identity.fetchItemByIdentity()
-
- //Hasn't loaded yet, we have to trigger the load.
-
-
- if(!this._loadFinished){
- var self = this;
- if(this.url !== ""){
- //If fetches come in before the loading has finished, but while
- //a load is in progress, we have to defer the fetching to be
- //invoked in the callback.
- if(this._loadInProgress){
- this._queuedFetches.push({args: keywordArgs});
- }else{
- this._loadInProgress = true;
- var getArgs = {
- url: self.url,
- handleAs: "text"
- };
- var getHandler = dojo.xhrGet(getArgs);
- getHandler.addCallback(function(data){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- try{
- self._processData(data);
- var item = self._createItemFromIdentity(keywordArgs.identity);
- if(!self.isItem(item)){
- item = null;
- }
- if(keywordArgs.onItem){
- keywordArgs.onItem.call(scope, item);
- }
- self._handleQueuedFetches();
- }catch(error){
- if(keywordArgs.onError){
- keywordArgs.onError.call(scope, error);
- }
- }
- });
- getHandler.addErrback(function(error){
- this._loadInProgress = false;
- if(keywordArgs.onError){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- keywordArgs.onError.call(scope, error);
- }
- });
- }
- }else if(this._csvData){
- self._processData(self._csvData);
- self._csvData = null;
- var item = self._createItemFromIdentity(keywordArgs.identity);
- if(!self.isItem(item)){
- item = null;
- }
- if(keywordArgs.onItem){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- keywordArgs.onItem.call(scope, item);
- }
- }
- }else{
- //Already loaded. We can just look it up and call back.
- var item = this._createItemFromIdentity(keywordArgs.identity);
- if(!this.isItem(item)){
- item = null;
- }
- if(keywordArgs.onItem){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- keywordArgs.onItem.call(scope, item);
- }
- }
- },
-
- getIdentityAttributes: function(/* item */ item){
- // summary:
- // See dojo.data.api.Identity.getIdentifierAttributes()
-
- //Identity isn't a public attribute in the item, it's the row position index.
- //So, return null.
- return null;
- },
-
- _handleQueuedFetches: function(){
- // summary:
- // Internal function to execute delayed request in the store.
- //Execute any deferred fetches now.
- if (this._queuedFetches.length > 0) {
- for(var i = 0; i < this._queuedFetches.length; i++){
- var fData = this._queuedFetches[i];
- var delayedFilter = fData.filter;
- var delayedQuery = fData.args;
- if(delayedFilter){
- delayedFilter(delayedQuery, this._arrayOfAllItems);
- }else{
- this.fetchItemByIdentity(fData.args);
- }
- }
- this._queuedFetches = [];
- }
- }
+if(!dojo._hasResource["dojox.data.CsvStore"]){
+dojo._hasResource["dojox.data.CsvStore"]=true;
+dojo.provide("dojox.data.CsvStore");
+dojo.require("dojo.data.util.filter");
+dojo.require("dojo.data.util.simpleFetch");
+dojo.declare("dojox.data.CsvStore",null,{constructor:function(_1){
+this._attributes=[];
+this._attributeIndexes={};
+this._dataArray=[];
+this._arrayOfAllItems=[];
+this._loadFinished=false;
+if(_1.url){
+this.url=_1.url;
+}
+this._csvData=_1.data;
+if(_1.label){
+this.label=_1.label;
+}else{
+if(this.label===""){
+this.label=undefined;
+}
+}
+this._storeProp="_csvStore";
+this._idProp="_csvId";
+this._features={"dojo.data.api.Read":true,"dojo.data.api.Identity":true};
+this._loadInProgress=false;
+this._queuedFetches=[];
+this.identifier=_1.identifier;
+if(this.identifier===""){
+delete this.identifier;
+}else{
+this._idMap={};
+}
+if("separator" in _1){
+this.separator=_1.separator;
+}
+if("urlPreventCache" in _1){
+this.urlPreventCache=_1.urlPreventCache?true:false;
+}
+},url:"",label:"",identifier:"",separator:",",urlPreventCache:false,_assertIsItem:function(_2){
+if(!this.isItem(_2)){
+throw new Error(this.declaredClass+": a function was passed an item argument that was not an item");
+}
+},_getIndex:function(_3){
+var _4=this.getIdentity(_3);
+if(this.identifier){
+_4=this._idMap[_4];
+}
+return _4;
+},getValue:function(_5,_6,_7){
+this._assertIsItem(_5);
+var _8=_7;
+if(typeof _6==="string"){
+var ai=this._attributeIndexes[_6];
+if(ai!=null){
+var _9=this._dataArray[this._getIndex(_5)];
+_8=_9[ai]||_7;
+}
+}else{
+throw new Error(this.declaredClass+": a function was passed an attribute argument that was not a string");
+}
+return _8;
+},getValues:function(_a,_b){
+var _c=this.getValue(_a,_b);
+return (_c?[_c]:[]);
+},getAttributes:function(_d){
+this._assertIsItem(_d);
+var _e=[];
+var _f=this._dataArray[this._getIndex(_d)];
+for(var i=0;i<_f.length;i++){
+if(_f[i]!==""){
+_e.push(this._attributes[i]);
+}
+}
+return _e;
+},hasAttribute:function(_10,_11){
+this._assertIsItem(_10);
+if(typeof _11==="string"){
+var _12=this._attributeIndexes[_11];
+var _13=this._dataArray[this._getIndex(_10)];
+return (typeof _12!=="undefined"&&_12<_13.length&&_13[_12]!=="");
+}else{
+throw new Error(this.declaredClass+": a function was passed an attribute argument that was not a string");
+}
+},containsValue:function(_14,_15,_16){
+var _17=undefined;
+if(typeof _16==="string"){
+_17=dojo.data.util.filter.patternToRegExp(_16,false);
+}
+return this._containsValue(_14,_15,_16,_17);
+},_containsValue:function(_18,_19,_1a,_1b){
+var _1c=this.getValues(_18,_19);
+for(var i=0;i<_1c.length;++i){
+var _1d=_1c[i];
+if(typeof _1d==="string"&&_1b){
+return (_1d.match(_1b)!==null);
+}else{
+if(_1a===_1d){
+return true;
+}
+}
+}
+return false;
+},isItem:function(_1e){
+if(_1e&&_1e[this._storeProp]===this){
+var _1f=_1e[this._idProp];
+if(this.identifier){
+var _20=this._dataArray[this._idMap[_1f]];
+if(_20){
+return true;
+}
+}else{
+if(_1f>=0&&_1f<this._dataArray.length){
+return true;
+}
+}
+}
+return false;
+},isItemLoaded:function(_21){
+return this.isItem(_21);
+},loadItem:function(_22){
+},getFeatures:function(){
+return this._features;
+},getLabel:function(_23){
+if(this.label&&this.isItem(_23)){
+return this.getValue(_23,this.label);
+}
+return undefined;
+},getLabelAttributes:function(_24){
+if(this.label){
+return [this.label];
+}
+return null;
+},_fetchItems:function(_25,_26,_27){
+var _28=this;
+var _29=function(_2a,_2b){
+var _2c=null;
+if(_2a.query){
+var key,_2d;
+_2c=[];
+var _2e=_2a.queryOptions?_2a.queryOptions.ignoreCase:false;
+var _2f={};
+for(key in _2a.query){
+_2d=_2a.query[key];
+if(typeof _2d==="string"){
+_2f[key]=dojo.data.util.filter.patternToRegExp(_2d,_2e);
+}
+}
+for(var i=0;i<_2b.length;++i){
+var _30=true;
+var _31=_2b[i];
+for(key in _2a.query){
+_2d=_2a.query[key];
+if(!_28._containsValue(_31,key,_2d,_2f[key])){
+_30=false;
+}
+}
+if(_30){
+_2c.push(_31);
+}
+}
+}else{
+_2c=_2b.slice(0,_2b.length);
+}
+_26(_2c,_2a);
+};
+if(this._loadFinished){
+_29(_25,this._arrayOfAllItems);
+}else{
+if(this.url!==""){
+if(this._loadInProgress){
+this._queuedFetches.push({args:_25,filter:_29});
+}else{
+this._loadInProgress=true;
+var _32={url:_28.url,handleAs:"text",preventCache:_28.urlPreventCache};
+var _33=dojo.xhrGet(_32);
+_33.addCallback(function(_34){
+try{
+_28._processData(_34);
+_29(_25,_28._arrayOfAllItems);
+_28._handleQueuedFetches();
+}
+catch(e){
+_27(e,_25);
+}
+});
+_33.addErrback(function(_35){
+_28._loadInProgress=false;
+if(_27){
+_27(_35,_25);
+}else{
+throw _35;
+}
});
-//Mix in the simple fetch implementation to this class.
+var _36=null;
+if(_25.abort){
+_36=_25.abort;
+}
+_25.abort=function(){
+var df=_33;
+if(df&&df.fired===-1){
+df.cancel();
+df=null;
+}
+if(_36){
+_36.call(_25);
+}
+};
+}
+}else{
+if(this._csvData){
+try{
+this._processData(this._csvData);
+this._csvData=null;
+_29(_25,this._arrayOfAllItems);
+}
+catch(e){
+_27(e,_25);
+}
+}else{
+var _37=new Error(this.declaredClass+": No CSV source data was provided as either URL or String data input.");
+if(_27){
+_27(_37,_25);
+}else{
+throw _37;
+}
+}
+}
+}
+},close:function(_38){
+},_getArrayOfArraysFromCsvFileContents:function(_39){
+if(dojo.isString(_39)){
+var _3a=new RegExp("^\\s+","g");
+var _3b=new RegExp("\\s+$","g");
+var _3c=new RegExp("\"\"","g");
+var _3d=[];
+var i;
+var _3e=this._splitLines(_39);
+for(i=0;i<_3e.length;++i){
+var _3f=_3e[i];
+if(_3f.length>0){
+var _40=_3f.split(this.separator);
+var j=0;
+while(j<_40.length){
+var _41=_40[j];
+var _42=_41.replace(_3a,"");
+var _43=_42.replace(_3b,"");
+var _44=_43.charAt(0);
+var _45=_43.charAt(_43.length-1);
+var _46=_43.charAt(_43.length-2);
+var _47=_43.charAt(_43.length-3);
+if(_43.length===2&&_43=="\"\""){
+_40[j]="";
+}else{
+if((_44=="\"")&&((_45!="\"")||((_45=="\"")&&(_46=="\"")&&(_47!="\"")))){
+if(j+1===_40.length){
+return;
+}
+var _48=_40[j+1];
+_40[j]=_42+this.separator+_48;
+_40.splice(j+1,1);
+}else{
+if((_44=="\"")&&(_45=="\"")){
+_43=_43.slice(1,(_43.length-1));
+_43=_43.replace(_3c,"\"");
+}
+_40[j]=_43;
+j+=1;
+}
+}
+}
+_3d.push(_40);
+}
+}
+this._attributes=_3d.shift();
+for(i=0;i<this._attributes.length;i++){
+this._attributeIndexes[this._attributes[i]]=i;
+}
+this._dataArray=_3d;
+}
+},_splitLines:function(_49){
+var _4a=[];
+var i;
+var _4b="";
+var _4c=false;
+for(i=0;i<_49.length;i++){
+var c=_49.charAt(i);
+switch(c){
+case "\"":
+_4c=!_4c;
+_4b+=c;
+break;
+case "\r":
+if(_4c){
+_4b+=c;
+}else{
+_4a.push(_4b);
+_4b="";
+if(i<(_49.length-1)&&_49.charAt(i+1)=="\n"){
+i++;
+}
+}
+break;
+case "\n":
+if(_4c){
+_4b+=c;
+}else{
+_4a.push(_4b);
+_4b="";
+}
+break;
+default:
+_4b+=c;
+}
+}
+if(_4b!==""){
+_4a.push(_4b);
+}
+return _4a;
+},_processData:function(_4d){
+this._getArrayOfArraysFromCsvFileContents(_4d);
+this._arrayOfAllItems=[];
+if(this.identifier){
+if(this._attributeIndexes[this.identifier]===undefined){
+throw new Error(this.declaredClass+": Identity specified is not a column header in the data set.");
+}
+}
+for(var i=0;i<this._dataArray.length;i++){
+var id=i;
+if(this.identifier){
+var _4e=this._dataArray[i];
+id=_4e[this._attributeIndexes[this.identifier]];
+this._idMap[id]=i;
+}
+this._arrayOfAllItems.push(this._createItemFromIdentity(id));
+}
+this._loadFinished=true;
+this._loadInProgress=false;
+},_createItemFromIdentity:function(_4f){
+var _50={};
+_50[this._storeProp]=this;
+_50[this._idProp]=_4f;
+return _50;
+},getIdentity:function(_51){
+if(this.isItem(_51)){
+return _51[this._idProp];
+}
+return null;
+},fetchItemByIdentity:function(_52){
+var _53;
+var _54=_52.scope?_52.scope:dojo.global;
+if(!this._loadFinished){
+var _55=this;
+if(this.url!==""){
+if(this._loadInProgress){
+this._queuedFetches.push({args:_52});
+}else{
+this._loadInProgress=true;
+var _56={url:_55.url,handleAs:"text"};
+var _57=dojo.xhrGet(_56);
+_57.addCallback(function(_58){
+try{
+_55._processData(_58);
+var _59=_55._createItemFromIdentity(_52.identity);
+if(!_55.isItem(_59)){
+_59=null;
+}
+if(_52.onItem){
+_52.onItem.call(_54,_59);
+}
+_55._handleQueuedFetches();
+}
+catch(error){
+if(_52.onError){
+_52.onError.call(_54,error);
+}
+}
+});
+_57.addErrback(function(_5a){
+this._loadInProgress=false;
+if(_52.onError){
+_52.onError.call(_54,_5a);
+}
+});
+}
+}else{
+if(this._csvData){
+try{
+_55._processData(_55._csvData);
+_55._csvData=null;
+_53=_55._createItemFromIdentity(_52.identity);
+if(!_55.isItem(_53)){
+_53=null;
+}
+if(_52.onItem){
+_52.onItem.call(_54,_53);
+}
+}
+catch(e){
+if(_52.onError){
+_52.onError.call(_54,e);
+}
+}
+}
+}
+}else{
+_53=this._createItemFromIdentity(_52.identity);
+if(!this.isItem(_53)){
+_53=null;
+}
+if(_52.onItem){
+_52.onItem.call(_54,_53);
+}
+}
+},getIdentityAttributes:function(_5b){
+if(this.identifier){
+return [this.identifier];
+}else{
+return null;
+}
+},_handleQueuedFetches:function(){
+if(this._queuedFetches.length>0){
+for(var i=0;i<this._queuedFetches.length;i++){
+var _5c=this._queuedFetches[i];
+var _5d=_5c.filter;
+var _5e=_5c.args;
+if(_5d){
+_5d(_5e,this._arrayOfAllItems);
+}else{
+this.fetchItemByIdentity(_5c.args);
+}
+}
+this._queuedFetches=[];
+}
+}});
dojo.extend(dojox.data.CsvStore,dojo.data.util.simpleFetch);
-
}
diff --git a/js/dojo/dojox/data/FlickrRestStore.js b/js/dojo/dojox/data/FlickrRestStore.js
--- a/js/dojo/dojox/data/FlickrRestStore.js
+++ b/js/dojo/dojox/data/FlickrRestStore.js
@@ -1,471 +1,296 @@
-if(!dojo._hasResource["dojox.data.FlickrRestStore"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.data.FlickrRestStore"] = true;
-dojo.provide("dojox.data.FlickrRestStore");
-
-dojo.require("dojox.data.FlickrStore");
-
-dojo.declare("dojox.data.FlickrRestStore",
- dojox.data.FlickrStore, {
- constructor: function(/*Object*/args){
- // summary:
- // Initializer for the FlickrRestStore store.
- // description:
- // The FlickrRestStore is a Datastore interface to one of the basic services
- // of the Flickr service, the public photo feed. This does not provide
- // access to all the services of Flickr.
- // This store cannot do * and ? filtering as the flickr service
- // provides no interface for wildcards.
- if(args && args.label){
- if(args.label) {
- this.label = args.label;
- }
- if(args.apikey) {
- this._apikey = args.apikey;
- }
- }
- this._cache = [];
- this._prevRequests = {};
- this._handlers = {};
- this._prevRequestRanges = [];
- this._maxPhotosPerUser = {};
- this._id = dojox.data.FlickrRestStore.prototype._id++;
- },
-
- // _id: Integer
- // A unique identifier for this store.
- _id: 0,
-
- // _requestCount: Integer
- // A counter for the number of requests made. This is used to define
- // the callback function that Flickr will use.
- _requestCount: 0,
-
- // _flickrRestUrl: String
- // The URL to the Flickr REST services.
- _flickrRestUrl: "http://www.flickr.com/services/rest/",
-
- // _apikey: String
- // The users API key to be used when accessing Flickr REST services.
- _apikey: null,
-
- // _storeRef: String
- // A key used to mark an data store item as belonging to this store.
- _storeRef: "_S",
-
- // _cache: Array
- // An Array of all previously downloaded picture info.
- _cache: null,
-
- // _prevRequests: Object
- // A HashMap used to record the signature of a request to prevent duplicate
- // request being made.
- _prevRequests: null,
-
- // _handlers: Object
- // A HashMap used to record the handlers registered for a single remote request. Multiple
- // requests may be made for the same information before the first request has finished.
- // Each element of this Object is an array of handlers to call back when the request finishes.
- // This prevents multiple requests being made for the same information.
- _handlers: null,
-
- // _sortAttributes: Object
- // A quick lookup of valid attribute names in a sort query.
- _sortAttributes: {
- "date-posted": true,
- "date-taken": true,
- "interestingness": true
- },
-
- _fetchItems: function(request, fetchHandler, errorHandler){
- // summary: Fetch flickr items that match to a query
- // request:
- // A request object
- // fetchHandler:
- // A function to call for fetched items
- // errorHandler:
- // A function to call on error
- var query = {};
- if(!request.query){
- request.query = query = {};
- } else {
- dojo.mixin(query, request.query);
- }
-
- var primaryKey = [];
- var secondaryKey = [];
-
- //Generate a unique function to be called back
- var callbackFn = "FlickrRestStoreCallback_" + this._id + "_" + (++this._requestCount);
- //Build up the content to send the request for.
- var content = {
- format: "json",
- method: "flickr.photos.search",
- api_key: this._apikey,
- extras: "owner_name,date_upload,date_taken",
- jsoncallback: callbackFn
- };
- var isRest = false;
- if(query.userid){
- isRest = true;
- content.user_id = request.query.userid;
- primaryKey.push("userid"+request.query.userid);
- }
- if(query.apikey){
- isRest = true;
- content.api_key = request.query.apikey;
- secondaryKey.push("api"+request.query.apikey);
- } else{
- throw Error("dojox.data.FlickrRestStore: An API key must be specified.");
- }
- request._curCount = request.count;
- if(query.page){
- content.page = request.query.page;
- secondaryKey.push("page" + content.page);
- }else if(typeof(request.start) != "undefined" && request.start != null) {
- if(!request.count){
- request.count = 20;
- }
- var diff = request.start % request.count;
- var start = request.start, count = request.count;
- //If the count does not divide cleanly into the start number,
- //more work has to be done to figure out the best page to request
- if(diff != 0) {
- if(start < count / 2) {
- //If the first record requested is less than half the amount requested,
- //then request from 0 to the count record
- count = start + count;
- start = 0;
- } else {
- var divLimit = 20, div = 2;
- for(var i = divLimit; i > 0; i--) {
- if(start % i == 0 && (start/i) >= count){
- div = i;
- break;
- }
- }
- count = start/div;
- }
- request._realStart = request.start;
- request._realCount = request.count;
- request._curStart = start;
- request._curCount = count;
- } else {
- request._realStart = request._realCount = null;
- request._curStart = request.start;
- request._curCount = request.count;
- }
-
- content.page = (start / count) + 1;
- secondaryKey.push("page" + content.page);
- }
- if(request._curCount){
- content.per_page = request._curCount;
- secondaryKey.push("count" + request._curCount);
- }
-
- if(query.lang){
- content.lang = request.query.lang;
- primaryKey.push("lang" + request.lang);
- }
- var url = this._flickrRestUrl;
-
- if(query.setid){
- content.method = "flickr.photosets.getPhotos";
- content.photoset_id = request.query.set;
- primaryKey.push("set" + request.query.set);
- }
-
- if(query.tags){
- if(query.tags instanceof Array){
- content.tags = query.tags.join(",");
- } else {
- content.tags=query.tags;
- }
- primaryKey.push("tags" + content.tags);
-
- if(query["tag_mode"] && (query.tag_mode.toLowerCase() == "any"
- || query.tag_mode.toLowerCase() == "all")){
- content.tag_mode = query.tag_mode;
- }
- }
- if(query.text){
- content.text=query.text;
- primaryKey.push("text:"+query.text);
- }
-
- //The store only supports a single sort attribute, even though the
- //Read API technically allows multiple sort attributes
- if(query.sort && query.sort.length > 0){
- //The default sort attribute is 'date-posted'
- if(!query.sort[0].attribute){
- query.sort[0].attribute = "date-posted";
- }
-
- //If the sort attribute is valid, check if it is ascending or
- //descending.
- if(this._sortAttributes[query.sort[0].attribute]) {
- if(query.sort[0].descending){
- content.sort = query.sort[0].attribute + "-desc";
- } else {
- content.sort = query.sort[0].attribute + "-asc";
- }
- }
- } else {
- //The default sort in the Dojo Data API is ascending.
- content.sort = "date-posted-asc";
- }
- primaryKey.push("sort:"+content.sort);
-
- //Generate a unique key for this request, so the store can
- //detect duplicate requests.
- primaryKey = primaryKey.join(".");
- secondaryKey = secondaryKey.length > 0 ? "." + secondaryKey.join(".") : "";
- var requestKey = primaryKey + secondaryKey;
-
- //Make a copy of the request, in case the source object is modified
- //before the request completes
- request = {
- query: query,
- count: request._curCount,
- start: request._curStart,
- _realCount: request._realCount,
- _realStart: request._realStart,
- onBegin: request.onBegin,
- onComplete: request.onComplete,
- onItem: request.onItem
- };
-
- var thisHandler = {
- request: request,
- fetchHandler: fetchHandler,
- errorHandler: errorHandler
- };
-
- //If the request has already been made, but not yet completed,
- //then add the callback handler to the list of handlers
- //for this request, and finish.
- if(this._handlers[requestKey]){
- this._handlers[requestKey].push(thisHandler);
- return;
- }
-
- this._handlers[requestKey] = [thisHandler];
-
- //Linking this up to Flickr is a PAIN!
- var self = this;
- var handle = null;
- var getArgs = {
- url: this._flickrRestUrl,
- preventCache: true,
- content: content
- };
-
- var doHandle = function(processedData, data, handler){
- var onBegin = handler.request.onBegin;
- handler.request.onBegin = null;
- var maxPhotos;
- var req = handler.request;
-
- if(typeof(req._realStart) != undefined && req._realStart != null) {
- req.start = req._realStart;
- req.count = req._realCount;
- req._realStart = req._realCount = null;
- }
-
- //If the request contains an onBegin method, the total number
- //of photos must be calculated.
- if(onBegin){
- if(data && typeof(data.photos.perpage) != "undefined" && typeof(data.photos.pages) != "undefined"){
- if(data.photos.perpage * data.photos.pages <= handler.request.start + handler.request.count){
- //If the final page of results has been received, it is possible to
- //know exactly how many photos there are
- maxPhotos = handler.request.start + data.photos.photo.length;
- }else{
- //If the final page of results has not yet been received,
- //it is not possible to tell exactly how many photos exist, so
- //return the number of pages multiplied by the number of photos per page.
- maxPhotos = data.photos.perpage * data.photos.pages;
- }
- self._maxPhotosPerUser[primaryKey] = maxPhotos;
- onBegin(maxPhotos, handler.request);
- } else if(self._maxPhotosPerUser[primaryKey]) {
- onBegin(self._maxPhotosPerUser[primaryKey], handler.request);
- }
- }
- //Call whatever functions the caller has defined on the request object, except for onBegin
- handler.fetchHandler(processedData, handler.request);
- if(onBegin){
- //Replace the onBegin function, if it existed.
- handler.request.onBegin = onBegin;
- }
- };
-
- //Define a callback for the script that iterates through a list of
- //handlers for this piece of data. Multiple requests can come into
- //the store for the same data.
- var myHandler = function(data){
- //The handler should not be called more than once, so disconnect it.
- //if(handle !== null){ dojo.disconnect(handle); }
- if(data.stat != "ok"){
- errorHandler(null, request);
- }else{ //Process the items...
- var handlers = self._handlers[requestKey];
- if(!handlers){
- console.log("FlickrRestStore: no handlers for data", data);
- return;
- }
-
- self._handlers[requestKey] = null;
- self._prevRequests[requestKey] = data;
-
- //Process the data once.
- var processedData = self._processFlickrData(data, request, primaryKey);
- if(!self._prevRequestRanges[primaryKey]) {
- self._prevRequestRanges[primaryKey] = [];
- }
- self._prevRequestRanges[primaryKey].push({
- start: request.start,
- end: request.start + data.photos.photo.length
- });
-
- //Iterate through the array of handlers, calling each one.
- for(var i = 0; i < handlers.length; i++ ){
- doHandle(processedData, data, handlers[i]);
- }
- }
- };
-
- var data = this._prevRequests[requestKey];
-
- //If the data was previously retrieved, there is no need to fetch it again.
- if(data){
- this._handlers[requestKey] = null;
- doHandle(this._cache[primaryKey], data, thisHandler);
- return;
- } else if(this._checkPrevRanges(primaryKey, request.start, request.count)) {
- //If this range of data has already been retrieved, reuse it.
- this._handlers[requestKey] = null;
- doHandle(this._cache[primaryKey], null, thisHandler);
- return;
- }
-
- dojo.global[callbackFn] = function(data){
- myHandler(data);
- //Clean up the function, it should never be called again
- dojo.global[callbackFn] = null;
- };
-
- var deferred = dojo.io.script.get(getArgs);
-
- //We only set up the errback, because the callback isn't ever really used because we have
- //to link to the jsonFlickrFeed function....
- deferred.addErrback(function(error){
- dojo.disconnect(handle);
- errorHandler(error, request);
- });
- },
-
- getAttributes: function(item){
- // summary:
- // See dojo.data.api.Read.getAttributes()
- return ["title", "author", "imageUrl", "imageUrlSmall",
- "imageUrlMedium", "imageUrlThumb", "link",
- "dateTaken", "datePublished"];
- },
-
- getValues: function(item, attribute){
- // summary:
- // See dojo.data.api.Read.getValue()
- this._assertIsItem(item);
- this._assertIsAttribute(attribute);
- if(attribute === "title"){
- return [this._unescapeHtml(item.title)]; // String
- }else if(attribute === "author"){
- return [item.ownername]; // String
- }else if(attribute === "imageUrlSmall"){
- return [item.media.s]; // String
- }else if(attribute === "imageUrl"){
- return [item.media.l]; // String
- }else if(attribute === "imageUrlMedium"){
- return [item.media.m]; // String
- }else if(attribute === "imageUrlThumb"){
- return [item.media.t]; // String
- }else if(attribute === "link"){
- return ["http://www.flickr.com/photos/" + item.owner + "/" + item.id]; // String
- }else if(attribute === "dateTaken"){
- return item.datetaken;
- }else if(attribute === "datePublished"){
- return item.datepublished;
- }
-
- return undefined;
- },
-
- _processFlickrData: function(/* Object */data, /* Object */request, /* String */ cacheKey){
- // summary: Processes the raw data from Flickr and updates the internal cache.
- // data:
- // Data returned from Flickr
- // request:
- // The original dojo.data.Request object passed in by the user.
-
- //If the data contains an 'item' object, it has not come from the REST services,
- //so process it using the FlickrStore.
- if(data.items){
- return dojox.data.FlickrStore.prototype._processFlickrData.apply(this,arguments);
- }
-
- var template = ["http://farm", null, ".static.flickr.com/", null, "/", null, "_", null];
-
- var items = [];
- if(data.stat == "ok" && data.photos && data.photos.photo){
- items = data.photos.photo;
-
- //Add on the store ref so that isItem can work.
- for(var i = 0; i < items.length; i++){
- var item = items[i];
- item[this._storeRef] = this;
-
- template[1] = item.farm;
- template[3] = item.server;
- template[5] = item.id;
- template[7] = item.secret;
-
- var base = template.join("");
- item.media = {
- s: base + "_s.jpg",
- m: base + "_m.jpg",
- l: base + ".jpg",
- t: base + "_t.jpg"
- };
- }
- }
- var start = request.start ? request.start : 0;
- var arr = this._cache[cacheKey];
- if(!arr) {
- this._cache[cacheKey] = arr = [];
- }
- for(var count = 0; count < items.length; count++){
- arr[count + start] = items[count];
- }
-
- return arr; // Array
- },
-
- _checkPrevRanges: function(primaryKey, start, count) {
- var end = start + count;
- var arr = this._prevRequestRanges[primaryKey];
- if(!arr) {
- return false;
- }
- for(var i = 0; i< arr.length; i++) {
- if(start >= arr[i].start &&
- end <= arr[i].end) {
- return true;
- }
- }
- return false;
- }
-});
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+if(!dojo._hasResource["dojox.data.FlickrRestStore"]){
+dojo._hasResource["dojox.data.FlickrRestStore"]=true;
+dojo.provide("dojox.data.FlickrRestStore");
+dojo.require("dojox.data.FlickrStore");
+dojo.declare("dojox.data.FlickrRestStore",dojox.data.FlickrStore,{constructor:function(_1){
+if(_1){
+if(_1.label){
+this.label=_1.label;
}
+if(_1.apikey){
+this._apikey=_1.apikey;
+}
+}
+this._cache=[];
+this._prevRequests={};
+this._handlers={};
+this._prevRequestRanges=[];
+this._maxPhotosPerUser={};
+this._id=dojox.data.FlickrRestStore.prototype._id++;
+},_id:0,_requestCount:0,_flickrRestUrl:"http://www.flickr.com/services/rest/",_apikey:null,_storeRef:"_S",_cache:null,_prevRequests:null,_handlers:null,_sortAttributes:{"date-posted":true,"date-taken":true,"interestingness":true},_fetchItems:function(_2,_3,_4){
+var _5={};
+if(!_2.query){
+_2.query=_5={};
+}else{
+dojo.mixin(_5,_2.query);
+}
+var _6=[];
+var _7=[];
+var _8={format:"json",method:"flickr.photos.search",api_key:this._apikey,extras:"owner_name,date_upload,date_taken"};
+var _9=false;
+if(_5.userid){
+_9=true;
+_8.user_id=_2.query.userid;
+_6.push("userid"+_2.query.userid);
+}
+if(_5.groupid){
+_9=true;
+_8.group_id=_5.groupid;
+_6.push("groupid"+_5.groupid);
+}
+if(_5.apikey){
+_9=true;
+_8.api_key=_2.query.apikey;
+_7.push("api"+_2.query.apikey);
+}else{
+if(_8.api_key){
+_9=true;
+_2.query.apikey=_8.api_key;
+_7.push("api"+_8.api_key);
+}else{
+throw Error("dojox.data.FlickrRestStore: An API key must be specified.");
+}
+}
+_2._curCount=_2.count;
+if(_5.page){
+_8.page=_2.query.page;
+_7.push("page"+_8.page);
+}else{
+if(("start" in _2)&&_2.start!==null){
+if(!_2.count){
+_2.count=20;
+}
+var _a=_2.start%_2.count;
+var _b=_2.start,_c=_2.count;
+if(_a!==0){
+if(_b<_c/2){
+_c=_b+_c;
+_b=0;
+}else{
+var _d=20,_e=2;
+for(var i=_d;i>0;i--){
+if(_b%i===0&&(_b/i)>=_c){
+_e=i;
+break;
+}
+}
+_c=_b/_e;
+}
+_2._realStart=_2.start;
+_2._realCount=_2.count;
+_2._curStart=_b;
+_2._curCount=_c;
+}else{
+_2._realStart=_2._realCount=null;
+_2._curStart=_2.start;
+_2._curCount=_2.count;
+}
+_8.page=(_b/_c)+1;
+_7.push("page"+_8.page);
+}
+}
+if(_2._curCount){
+_8.per_page=_2._curCount;
+_7.push("count"+_2._curCount);
+}
+if(_5.lang){
+_8.lang=_2.query.lang;
+_6.push("lang"+_2.lang);
+}
+if(_5.setid){
+_8.method="flickr.photosets.getPhotos";
+_8.photoset_id=_2.query.setid;
+_6.push("set"+_2.query.setid);
+}
+if(_5.tags){
+if(_5.tags instanceof Array){
+_8.tags=_5.tags.join(",");
+}else{
+_8.tags=_5.tags;
+}
+_6.push("tags"+_8.tags);
+if(_5["tag_mode"]&&(_5.tag_mode.toLowerCase()==="any"||_5.tag_mode.toLowerCase()==="all")){
+_8.tag_mode=_5.tag_mode;
+}
+}
+if(_5.text){
+_8.text=_5.text;
+_6.push("text:"+_5.text);
+}
+if(_5.sort&&_5.sort.length>0){
+if(!_5.sort[0].attribute){
+_5.sort[0].attribute="date-posted";
+}
+if(this._sortAttributes[_5.sort[0].attribute]){
+if(_5.sort[0].descending){
+_8.sort=_5.sort[0].attribute+"-desc";
+}else{
+_8.sort=_5.sort[0].attribute+"-asc";
+}
+}
+}else{
+_8.sort="date-posted-asc";
+}
+_6.push("sort:"+_8.sort);
+_6=_6.join(".");
+_7=_7.length>0?"."+_7.join("."):"";
+var _f=_6+_7;
+_2={query:_5,count:_2._curCount,start:_2._curStart,_realCount:_2._realCount,_realStart:_2._realStart,onBegin:_2.onBegin,onComplete:_2.onComplete,onItem:_2.onItem};
+var _10={request:_2,fetchHandler:_3,errorHandler:_4};
+if(this._handlers[_f]){
+this._handlers[_f].push(_10);
+return;
+}
+this._handlers[_f]=[_10];
+var _11=null;
+var _12={url:this._flickrRestUrl,preventCache:this.urlPreventCache,content:_8,callbackParamName:"jsoncallback"};
+var _13=dojo.hitch(this,function(_14,_15,_16){
+var _17=_16.request.onBegin;
+_16.request.onBegin=null;
+var _18;
+var req=_16.request;
+if(("_realStart" in req)&&req._realStart!=null){
+req.start=req._realStart;
+req.count=req._realCount;
+req._realStart=req._realCount=null;
+}
+if(_17){
+var _19=null;
+if(_15){
+_19=(_15.photoset?_15.photoset:_15.photos);
+}
+if(_19&&("perpage" in _19)&&("pages" in _19)){
+if(_19.perpage*_19.pages<=_16.request.start+_16.request.count){
+_18=_16.request.start+_19.photo.length;
+}else{
+_18=_19.perpage*_19.pages;
+}
+this._maxPhotosPerUser[_6]=_18;
+_17(_18,_16.request);
+}else{
+if(this._maxPhotosPerUser[_6]){
+_17(this._maxPhotosPerUser[_6],_16.request);
+}
+}
+}
+_16.fetchHandler(_14,_16.request);
+if(_17){
+_16.request.onBegin=_17;
+}
+});
+var _1a=dojo.hitch(this,function(_1b){
+if(_1b.stat!="ok"){
+_4(null,_2);
+}else{
+var _1c=this._handlers[_f];
+if(!_1c){
+return;
+}
+this._handlers[_f]=null;
+this._prevRequests[_f]=_1b;
+var _1d=this._processFlickrData(_1b,_2,_6);
+if(!this._prevRequestRanges[_6]){
+this._prevRequestRanges[_6]=[];
+}
+this._prevRequestRanges[_6].push({start:_2.start,end:_2.start+(_1b.photoset?_1b.photoset.photo.length:_1b.photos.photo.length)});
+dojo.forEach(_1c,function(i){
+_13(_1d,_1b,i);
+});
+}
+});
+var _1e=this._prevRequests[_f];
+if(_1e){
+this._handlers[_f]=null;
+_13(this._cache[_6],_1e,_10);
+return;
+}else{
+if(this._checkPrevRanges(_6,_2.start,_2.count)){
+this._handlers[_f]=null;
+_13(this._cache[_6],null,_10);
+return;
+}
+}
+var _1f=dojo.io.script.get(_12);
+_1f.addCallback(_1a);
+_1f.addErrback(function(_20){
+dojo.disconnect(_11);
+_4(_20,_2);
+});
+},getAttributes:function(_21){
+return ["title","author","imageUrl","imageUrlSmall","imageUrlMedium","imageUrlThumb","link","dateTaken","datePublished"];
+},getValues:function(_22,_23){
+this._assertIsItem(_22);
+this._assertIsAttribute(_23);
+switch(_23){
+case "title":
+return [this._unescapeHtml(_22.title)];
+case "author":
+return [_22.ownername];
+case "imageUrlSmall":
+return [_22.media.s];
+case "imageUrl":
+return [_22.media.l];
+case "imageUrlOriginal":
+return [_22.media.o];
+case "imageUrlLarge":
+return [_22.media.l];
+case "imageUrlMedium":
+return [_22.media.m];
+case "imageUrlThumb":
+return [_22.media.t];
+case "link":
+return ["http://www.flickr.com/photos/"+_22.owner+"/"+_22.id];
+case "dateTaken":
+return [_22.datetaken];
+case "datePublished":
+return [_22.datepublished];
+default:
+return undefined;
+}
+},_processFlickrData:function(_24,_25,_26){
+if(_24.items){
+return dojox.data.FlickrStore.prototype._processFlickrData.apply(this,arguments);
+}
+var _27=["http://farm",null,".static.flickr.com/",null,"/",null,"_",null];
+var _28=[];
+var _29=(_24.photoset?_24.photoset:_24.photos);
+if(_24.stat=="ok"&&_29&&_29.photo){
+_28=_29.photo;
+for(var i=0;i<_28.length;i++){
+var _2a=_28[i];
+_2a[this._storeRef]=this;
+_27[1]=_2a.farm;
+_27[3]=_2a.server;
+_27[5]=_2a.id;
+_27[7]=_2a.secret;
+var _2b=_27.join("");
+_2a.media={s:_2b+"_s.jpg",m:_2b+"_m.jpg",l:_2b+".jpg",t:_2b+"_t.jpg",o:_2b+"_o.jpg"};
+if(!_2a.owner&&_24.photoset){
+_2a.owner=_24.photoset.owner;
+}
+}
+}
+var _2c=_25.start?_25.start:0;
+var arr=this._cache[_26];
+if(!arr){
+this._cache[_26]=arr=[];
+}
+dojo.forEach(_28,function(i,idx){
+arr[idx+_2c]=i;
+});
+return arr;
+},_checkPrevRanges:function(_2d,_2e,_2f){
+var end=_2e+_2f;
+var arr=this._prevRequestRanges[_2d];
+return (!!arr)&&dojo.some(arr,function(_30){
+return ((_2e>=_30.start)&&(end<=_30.end));
+});
+}});
+}
diff --git a/js/dojo/dojox/data/FlickrStore.js b/js/dojo/dojox/data/FlickrStore.js
--- a/js/dojo/dojox/data/FlickrStore.js
+++ b/js/dojo/dojox/data/FlickrStore.js
@@ -1,257 +1,151 @@
-if(!dojo._hasResource["dojox.data.FlickrStore"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.data.FlickrStore"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.data.FlickrStore"]){
+dojo._hasResource["dojox.data.FlickrStore"]=true;
dojo.provide("dojox.data.FlickrStore");
-
dojo.require("dojo.data.util.simpleFetch");
dojo.require("dojo.io.script");
dojo.require("dojo.date.stamp");
-
-dojo.declare("dojox.data.FlickrStore", null, {
- constructor: function(/*Object*/args){
- // summary:
- // Initializer for the FlickrStore store.
- // description:
- // The FlickrStore is a Datastore interface to one of the basic services
- // of the Flickr service, the public photo feed. This does not provide
- // access to all the services of Flickr.
- // This store cannot do * and ? filtering as the flickr service
- // provides no interface for wildcards.
- if(args && args.label){
- this.label = args.label;
- }
- },
-
- _flickrUrl: "http://api.flickr.com/services/feeds/photos_public.gne",
-
- _storeRef: "_S",
-
- label: "title",
-
- _assertIsItem: function(/* item */ item){
- // summary:
- // This function tests whether the item passed in is indeed an item in the store.
- // item:
- // The item to test for being contained by the store.
- if(!this.isItem(item)){
- throw new Error("dojox.data.FlickrStore: a function was passed an item argument that was not an item");
- }
- },
-
- _assertIsAttribute: function(/* attribute-name-string */ attribute){
- // summary:
- // This function tests whether the item passed in is indeed a valid 'attribute' like type for the store.
- // attribute:
- // The attribute to test for being contained by the store.
- if(typeof attribute !== "string"){
- throw new Error("dojox.data.FlickrStore: a function was passed an attribute argument that was not an attribute name string");
- }
- },
-
- getFeatures: function(){
- // summary:
- // See dojo.data.api.Read.getFeatures()
- return {
- 'dojo.data.api.Read': true
- };
- },
-
- getValue: function(item, attribute){
- // summary:
- // See dojo.data.api.Read.getValue()
- var values = this.getValues(item, attribute);
- if(values){
- return values[0];
- }
- return undefined;
- },
-
- getAttributes: function(item){
- // summary:
- // See dojo.data.api.Read.getAttributes()
- return ["title", "description", "author", "datePublished", "dateTaken", "imageUrl", "imageUrlSmall", "imageUrlMedium", "tags", "link"];
- },
-
- hasAttribute: function(item, attribute){
- // summary:
- // See dojo.data.api.Read.hasAttributes()
- if(this.getValue(item,attribute)){
- return true;
- }
- return false;
- },
-
- isItemLoaded: function(item){
- // summary:
- // See dojo.data.api.Read.isItemLoaded()
- return this.isItem(item);
- },
-
- loadItem: function(keywordArgs){
- // summary:
- // See dojo.data.api.Read.loadItem()
- },
-
- getLabel: function(item){
- // summary:
- // See dojo.data.api.Read.getLabel()
- return this.getValue(item,this.label);
- },
-
- getLabelAttributes: function(item){
- // summary:
- // See dojo.data.api.Read.getLabelAttributes()
- return [this.label];
- },
-
- containsValue: function(item, attribute, value){
- // summary:
- // See dojo.data.api.Read.containsValue()
- var values = this.getValues(item,attribute);
- for(var i = 0; i < values.length; i++){
- if(values[i] === value){
- return true;
- }
- }
- return false;
- },
-
- getValues: function(item, attribute){
- // summary:
- // See dojo.data.api.Read.getValue()
-
- this._assertIsItem(item);
- this._assertIsAttribute(attribute);
- if(attribute === "title"){
- return [this._unescapeHtml(item.title)];
- }else if(attribute === "author"){
- return [this._unescapeHtml(item.author)];
- }else if(attribute === "datePublished"){
- return [dojo.date.stamp.fromISOString(item.published)];
- }else if(attribute === "dateTaken"){
- return [dojo.date.stamp.fromISOString(item.date_taken)];
- }else if(attribute === "imageUrlSmall"){
- return [item.media.m.replace(/_m\./, "_s.")];
- }else if(attribute === "imageUrl"){
- return [item.media.m.replace(/_m\./, ".")];
- }else if(attribute === "imageUrlMedium"){
- return [item.media.m];
- }else if(attribute === "link"){
- return [item.link];
- }else if(attribute === "tags"){
- return item.tags.split(" ");
- }else if(attribute === "description"){
- return [this._unescapeHtml(item.description)];
- }
- return undefined;
- },
-
- isItem: function(item){
- // summary:
- // See dojo.data.api.Read.isItem()
- if(item && item[this._storeRef] === this){
- return true;
- }
- return false;
- },
-
- close: function(request){
- // summary:
- // See dojo.data.api.Read.close()
- },
-
- _fetchItems: function(request, fetchHandler, errorHandler){
- // summary:
- // Fetch flickr items that match to a query
- // request:
- // A request object
- // fetchHandler:
- // A function to call for fetched items
- // errorHandler:
- // A function to call on error
-
- if(!request.query){
- request.query={};
- }
-
- //Build up the content to send the request for.
- var content = {format: "json", tagmode:"any"};
- if (request.query.tags) {
- content.tags = request.query.tags;
- }
- if (request.query.tagmode) {
- content.tagmode = request.query.tagmode;
- }
- if (request.query.userid) {
- content.id = request.query.userid;
- }
- if (request.query.userids) {
- content.ids = request.query.userids;
- }
- if (request.query.lang) {
- content.lang = request.query.lang;
- }
-
- //Linking this up to Flickr is a PAIN!
- var self = this;
- var handle = null;
- var getArgs = {
- url: this._flickrUrl,
- preventCache: true,
- content: content
- };
- var myHandler = function(data){
- if(handle !== null){
- dojo.disconnect(handle);
- }
-
- //Process the items...
- fetchHandler(self._processFlickrData(data), request);
- };
- handle = dojo.connect("jsonFlickrFeed", myHandler);
- var deferred = dojo.io.script.get(getArgs);
-
- //We only set up the errback, because the callback isn't ever really used because we have
- //to link to the jsonFlickrFeed function....
- deferred.addErrback(function(error){
- dojo.disconnect(handle);
- errorHandler(error, request);
- });
- },
-
- _processFlickrData: function(data){
- var items = [];
- if(data.items){
- items = data.items;
- //Add on the store ref so that isItem can work.
- for(var i = 0; i < data.items.length; i++){
- var item = data.items[i];
- item[this._storeRef] = this;
- }
- }
- return items;
- },
-
- _unescapeHtml: function(str){
- // summary: Utility function to un-escape XML special characters in an HTML string.
- // description: Utility function to un-escape XML special characters in an HTML string.
- //
- // str: String.
- // The string to un-escape
- // returns: HTML String converted back to the normal text (unescaped) characters (<,>,&, ", etc,).
- //
- //TODO: Check to see if theres already compatible escape() in dojo.string or dojo.html
- str = str.replace(/&amp;/gm, "&").replace(/&lt;/gm, "<").replace(/&gt;/gm, ">").replace(/&quot;/gm, "\"");
- str = str.replace(/&#39;/gm, "'");
- return str;
- }
+dojo.require("dojo.AdapterRegistry");
+(function(){
+var d=dojo;
+dojo.declare("dojox.data.FlickrStore",null,{constructor:function(_1){
+if(_1&&_1.label){
+this.label=_1.label;
+}
+if(_1&&"urlPreventCache" in _1){
+this.urlPreventCache=_1.urlPreventCache?true:false;
+}
+},_storeRef:"_S",label:"title",urlPreventCache:true,_assertIsItem:function(_2){
+if(!this.isItem(_2)){
+throw new Error("dojox.data.FlickrStore: a function was passed an item argument that was not an item");
+}
+},_assertIsAttribute:function(_3){
+if(typeof _3!=="string"){
+throw new Error("dojox.data.FlickrStore: a function was passed an attribute argument that was not an attribute name string");
+}
+},getFeatures:function(){
+return {"dojo.data.api.Read":true};
+},getValue:function(_4,_5,_6){
+var _7=this.getValues(_4,_5);
+if(_7&&_7.length>0){
+return _7[0];
+}
+return _6;
+},getAttributes:function(_8){
+return ["title","description","author","datePublished","dateTaken","imageUrl","imageUrlSmall","imageUrlMedium","tags","link"];
+},hasAttribute:function(_9,_a){
+var v=this.getValue(_9,_a);
+if(v||v===""||v===false){
+return true;
+}
+return false;
+},isItemLoaded:function(_b){
+return this.isItem(_b);
+},loadItem:function(_c){
+},getLabel:function(_d){
+return this.getValue(_d,this.label);
+},getLabelAttributes:function(_e){
+return [this.label];
+},containsValue:function(_f,_10,_11){
+var _12=this.getValues(_f,_10);
+for(var i=0;i<_12.length;i++){
+if(_12[i]===_11){
+return true;
+}
+}
+return false;
+},getValues:function(_13,_14){
+this._assertIsItem(_13);
+this._assertIsAttribute(_14);
+var u=d.hitch(this,"_unescapeHtml");
+var s=d.hitch(d.date.stamp,"fromISOString");
+switch(_14){
+case "title":
+return [u(_13.title)];
+case "author":
+return [u(_13.author)];
+case "datePublished":
+return [s(_13.published)];
+case "dateTaken":
+return [s(_13.date_taken)];
+case "imageUrlSmall":
+return [_13.media.m.replace(/_m\./,"_s.")];
+case "imageUrl":
+return [_13.media.m.replace(/_m\./,".")];
+case "imageUrlMedium":
+return [_13.media.m];
+case "link":
+return [_13.link];
+case "tags":
+return _13.tags.split(" ");
+case "description":
+return [u(_13.description)];
+default:
+return [];
+}
+},isItem:function(_15){
+if(_15&&_15[this._storeRef]===this){
+return true;
+}
+return false;
+},close:function(_16){
+},_fetchItems:function(_17,_18,_19){
+var rq=_17.query=_17.query||{};
+var _1a={format:"json",tagmode:"any"};
+d.forEach(["tags","tagmode","lang","id","ids"],function(i){
+if(rq[i]){
+_1a[i]=rq[i];
+}
});
-dojo.extend(dojox.data.FlickrStore,dojo.data.util.simpleFetch);
-
-//We have to define this because of how the Flickr API works.
-//This somewhat stinks, but what can you do?
-if (!jsonFlickrFeed) {
- var jsonFlickrFeed = function(data){};
+_1a.id=rq.id||rq.userid||rq.groupid;
+if(rq.userids){
+_1a.ids=rq.userids;
+}
+var _1b=null;
+var _1c={url:dojox.data.FlickrStore.urlRegistry.match(_17),preventCache:this.urlPreventCache,content:_1a};
+var _1d=d.hitch(this,function(_1e){
+if(!!_1b){
+d.disconnect(_1b);
}
-
-
+_18(this._processFlickrData(_1e),_17);
+});
+_1b=d.connect("jsonFlickrFeed",_1d);
+var _1f=d.io.script.get(_1c);
+_1f.addErrback(function(_20){
+d.disconnect(_1b);
+_19(_20,_17);
+});
+},_processFlickrData:function(_21){
+var _22=[];
+if(_21.items){
+_22=_21.items;
+for(var i=0;i<_21.items.length;i++){
+var _23=_21.items[i];
+_23[this._storeRef]=this;
+}
}
+return _22;
+},_unescapeHtml:function(str){
+return str.replace(/&amp;/gm,"&").replace(/&lt;/gm,"<").replace(/&gt;/gm,">").replace(/&quot;/gm,"\"").replace(/&#39;/gm,"'");
+}});
+dojo.extend(dojox.data.FlickrStore,dojo.data.util.simpleFetch);
+var _24="http://api.flickr.com/services/feeds/";
+var reg=dojox.data.FlickrStore.urlRegistry=new d.AdapterRegistry(true);
+reg.register("group pool",function(_25){
+return !!_25.query["groupid"];
+},_24+"groups_pool.gne");
+reg.register("default",function(_26){
+return true;
+},_24+"photos_public.gne");
+})();
+if(!jsonFlickrFeed){
+var jsonFlickrFeed=function(_27){
+};
+}
+}
diff --git a/js/dojo/dojox/data/HtmlTableStore.js b/js/dojo/dojox/data/HtmlTableStore.js
--- a/js/dojo/dojox/data/HtmlTableStore.js
+++ b/js/dojo/dojox/data/HtmlTableStore.js
@@ -1,466 +1,267 @@
-if(!dojo._hasResource["dojox.data.HtmlTableStore"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.data.HtmlTableStore"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.data.HtmlTableStore"]){
+dojo._hasResource["dojox.data.HtmlTableStore"]=true;
dojo.provide("dojox.data.HtmlTableStore");
-
-dojo.require("dojox.data.dom");
+dojo.require("dojox.xml.parser");
dojo.require("dojo.data.util.simpleFetch");
dojo.require("dojo.data.util.filter");
-
-dojo.declare("dojox.data.HtmlTableStore", null, {
- constructor: function(/*Object*/args){
- // summary:
- // Initializer for the HTML table store.
- // description:
- // The HtmlTableStore can be created in one of two ways: a) by parsing an existing
- // table DOM node on the current page or b) by referencing an external url and giving
- // the id of the table in that page. The remote url will be parsed as an html page.
- //
- // The HTML table should be of the following form:
- // <table id="myTable">
- // <thead>
- // <tr>
- // <th>Attribute1</th>
- // <th>Attribute2</th>
- // </tr>
- // </thead>
- // <tbody>
- // <tr>
- // <td>Value1.1</td>
- // <td>Value1.2</td>
- // </tr>
- // <tr>
- // <td>Value2.1</td>
- // <td>Value2.2</td>
- // </tr>
- // </tbody>
- // </table>
- //
- // args:
- // An anonymous object to initialize properties. It expects the following values:
- // tableId: The id of the HTML table to use.
- // OR
- // url: The url of the remote page to load
- // tableId: The id of the table element in the remote page
-
- if(args.url){
- if(!args.tableId)
- throw new Error("dojo.data.HtmlTableStore: Cannot instantiate using url without an id!");
- this.url = args.url;
- this.tableId = args.tableId;
- }else{
- if(args.tableId){
- this._rootNode = dojo.byId(args.tableId);
- this.tableId = this._rootNode.id;
- }else{
- this._rootNode = dojo.byId(this.tableId);
- }
- this._getHeadings();
- for(var i=0; i<this._rootNode.rows.length; i++){
- this._rootNode.rows[i].store = this;
- }
- }
- },
-
- url: "", // So the parser can instantiate the store via markup.
- tableId: "", // So the parser can instantiate the store via markup.
-
- _getHeadings: function(){
- // summary:
- // Function to load the attribute names from the table header so that the
- // attributes (cells in a row), can have a reasonable name.
- this._headings = [];
- dojo.forEach(this._rootNode.tHead.rows[0].cells, dojo.hitch(this, function(th){
- this._headings.push(dojox.data.dom.textContent(th));
- }));
- },
-
- _getAllItems: function(){
- // summary:
- // Function to return all rows in the table as an array of items.
- var items = [];
- for(var i=1; i<this._rootNode.rows.length; i++){
- items.push(this._rootNode.rows[i]);
- }
- return items; //array
- },
-
- _assertIsItem: function(/* item */ item){
- // summary:
- // This function tests whether the item passed in is indeed an item in the store.
- // item:
- // The item to test for being contained by the store.
- if(!this.isItem(item)){
- throw new Error("dojo.data.HtmlTableStore: a function was passed an item argument that was not an item");
- }
- },
-
- _assertIsAttribute: function(/* String */ attribute){
- // summary:
- // This function tests whether the item passed in is indeed a valid 'attribute' like type for the store.
- // attribute:
- // The attribute to test for being contained by the store.
- //
- // returns:
- // Returns the index (column) that the attribute resides in the row.
- if(typeof attribute !== "string"){
- throw new Error("dojo.data.HtmlTableStore: a function was passed an attribute argument that was not an attribute name string");
- return;
- }
- return dojo.indexOf(this._headings, attribute); //int
- },
-
-/***************************************
- dojo.data.api.Read API
-***************************************/
-
- getValue: function( /* item */ item,
- /* attribute-name-string */ attribute,
- /* value? */ defaultValue){
- // summary:
- // See dojo.data.api.Read.getValue()
- var values = this.getValues(item, attribute);
- return (values.length > 0)?values[0]:defaultValue; //Object || int || Boolean
- },
-
- getValues: function(/* item */ item,
- /* attribute-name-string */ attribute){
- // summary:
- // See dojo.data.api.Read.getValues()
-
- this._assertIsItem(item);
- var index = this._assertIsAttribute(attribute);
-
- if(index>-1){
- return [dojox.data.dom.textContent(item.cells[index])] ;
- }
- return []; //Array
- },
-
- getAttributes: function(/* item */ item){
- // summary:
- // See dojo.data.api.Read.getAttributes()
- this._assertIsItem(item);
- var attributes = [];
- for(var i=0; i<this._headings.length; i++){
- if(this.hasAttribute(item, this._headings[i]))
- attributes.push(this._headings[i]);
- }
- return attributes; //Array
- },
-
- hasAttribute: function( /* item */ item,
- /* attribute-name-string */ attribute){
- // summary:
- // See dojo.data.api.Read.hasAttribute()
- return this.getValues(item, attribute).length > 0;
- },
-
- containsValue: function(/* item */ item,
- /* attribute-name-string */ attribute,
- /* anything */ value){
- // summary:
- // See dojo.data.api.Read.containsValue()
- var regexp = undefined;
- if(typeof value === "string"){
- regexp = dojo.data.util.filter.patternToRegExp(value, false);
- }
- return this._containsValue(item, attribute, value, regexp); //boolean.
- },
-
- _containsValue: function( /* item */ item,
- /* attribute-name-string */ attribute,
- /* anything */ value,
- /* RegExp?*/ regexp){
- // summary:
- // Internal function for looking at the values contained by the item.
- // description:
- // Internal function for looking at the values contained by the item. This
- // function allows for denoting if the comparison should be case sensitive for
- // strings or not (for handling filtering cases where string case should not matter)
- //
- // item:
- // The data item to examine for attribute values.
- // attribute:
- // The attribute to inspect.
- // value:
- // The value to match.
- // regexp:
- // Optional regular expression generated off value if value was of string type to handle wildcarding.
- // If present and attribute values are string, then it can be used for comparison instead of 'value'
- var values = this.getValues(item, attribute);
- for(var i = 0; i < values.length; ++i){
- var possibleValue = values[i];
- if(typeof possibleValue === "string" && regexp){
- return (possibleValue.match(regexp) !== null);
- }else{
- //Non-string matching.
- if(value === possibleValue){
- return true; // Boolean
- }
- }
- }
- return false; // Boolean
- },
-
- isItem: function(/* anything */ something){
- // summary:
- // See dojo.data.api.Read.isItem()
- if(something && something.store && something.store === this){
- return true; //boolean
- }
- return false; //boolean
- },
-
- isItemLoaded: function(/* anything */ something){
- // summary:
- // See dojo.data.api.Read.isItemLoaded()
- return this.isItem(something);
- },
-
- loadItem: function(/* Object */ keywordArgs){
- // summary:
- // See dojo.data.api.Read.loadItem()
- this._assertIsItem(keywordArgs.item);
- },
-
- _fetchItems: function(request, fetchHandler, errorHandler) {
- // summary:
- // Fetch items (XML elements) that match to a query
- // description:
- // If '_fetchUrl' is specified, it is used to load an XML document
- // with a query string.
- // Otherwise and if 'url' is specified, the XML document is
- // loaded and list XML elements that match to a query (set of element
- // names and their text attribute values that the items to contain).
- // A wildcard, "*" can be used to query values to match all
- // occurrences.
- // If '_rootItem' is specified, it is used to fetch items.
- // request:
- // A request object
- // fetchHandler:
- // A function to call for fetched items
- // errorHandler:
- // A function to call on error
-
- if(this._rootNode){
- this._finishFetchItems(request, fetchHandler, errorHandler);
- }else{
- if(!this.url){
- this._rootNode = dojo.byId(this.tableId);
- this._getHeadings();
- for(var i=0; i<this._rootNode.rows.length; i++){
- this._rootNode.rows[i].store = this;
- }
- }else{
- var getArgs = {
- url: this.url,
- handleAs: "text"
- };
- var self = this;
- var getHandler = dojo.xhrGet(getArgs);
- getHandler.addCallback(function(data){
- var findNode = function(node, id){
- if(node.id == id){
- return node; //object
- }
- if(node.childNodes){
- for(var i=0; i<node.childNodes.length; i++){
- var returnNode = findNode(node.childNodes[i], id);
- if(returnNode){
- return returnNode; //object
- }
- }
- }
- return null; //null
- }
-
- var d = document.createElement("div");
- d.innerHTML = data;
- self._rootNode = findNode(d, self.tableId);
- self._getHeadings.call(self);
- for(var i=0; i<self._rootNode.rows.length; i++) {
- self._rootNode.rows[i].store = self;
- }
- self._finishFetchItems(request, fetchHandler, errorHandler);
- });
- getHandler.addErrback(function(error){
- errorHandler(error, request);
- });
- }
- }
- },
-
- _finishFetchItems: function(request, fetchHandler, errorHandler){
- // summary:
- // Internal function for processing the passed in request and locating the requested items.
- var items = null;
- var arrayOfAllItems = this._getAllItems();
- if(request.query){
- var ignoreCase = request.queryOptions ? request.queryOptions.ignoreCase : false;
- items = [];
-
- //See if there are any string values that can be regexp parsed first to avoid multiple regexp gens on the
- //same value for each item examined. Much more efficient.
- var regexpList = {};
- for(var key in request.query){
- var value = request.query[key]+'';
- if(typeof value === "string"){
- regexpList[key] = dojo.data.util.filter.patternToRegExp(value, ignoreCase);
- }
- }
-
- for(var i = 0; i < arrayOfAllItems.length; ++i){
- var match = true;
- var candidateItem = arrayOfAllItems[i];
- for(var key in request.query){
- var value = request.query[key]+'';
- if (!this._containsValue(candidateItem, key, value, regexpList[key])){
- match = false;
- }
- }
- if(match){
- items.push(candidateItem);
- }
- }
- fetchHandler(items, request);
- }else{
- // We want a copy to pass back in case the parent wishes to sort the array. We shouldn't allow resort
- // of the internal list so that multiple callers can get listsand sort without affecting each other.
- if(arrayOfAllItems.length> 0){
- items = arrayOfAllItems.slice(0,arrayOfAllItems.length);
- }
- fetchHandler(items, request);
- }
- },
-
- getFeatures: function(){
- // summary:
- // See dojo.data.api.Read.getFeatures()
- return {
- 'dojo.data.api.Read': true,
- 'dojo.data.api.Identity': true
- };
- },
-
- close: function(/*dojo.data.api.Request || keywordArgs || null */ request){
- // summary:
- // See dojo.data.api.Read.close()
- // nothing to do here!
- },
-
- getLabel: function(/* item */ item){
- // summary:
- // See dojo.data.api.Read.getLabel()
- if(this.isItem(item))
- return "Table Row #" + this.getIdentity(item);
- return undefined;
- },
-
- getLabelAttributes: function(/* item */ item){
- // summary:
- // See dojo.data.api.Read.getLabelAttributes()
- return null;
- },
-
-/***************************************
- dojo.data.api.Identity API
-***************************************/
-
- getIdentity: function(/* item */ item){
- // summary:
- // See dojo.data.api.Identity.getIdentity()
- this._assertIsItem(item);
- //Opera doesn't support the sectionRowIndex,
- //So, have to call the indexOf to locate it.
- //Blah.
- if(!dojo.isOpera){
- return item.sectionRowIndex; // int
- }else{
- return (dojo.indexOf(this._rootNode.rows, item) - 1) // int
- }
- },
-
- getIdentityAttributes: function(/* item */ item){
- // summary:
- // See dojo.data.api.Identity.getIdentityAttributes()
- //Identity isn't taken from a public attribute.
- return null;
- },
-
- fetchItemByIdentity: function(keywordArgs){
- // summary:
- // See dojo.data.api.Identity.fetchItemByIdentity()
- var identity = keywordArgs.identity;
- var self = this;
- var item = null
-
- if(!this._rootNode){
- if(!this.url){
- this._rootNode = dojo.byId(this.tableId);
- this._getHeadings();
- for(var i=0; i<this._rootNode.rows.length; i++){
- this._rootNode.rows[i].store = this;
- }
- item = this._rootNode.rows[identity+1];
- if (keywordArgs.onItem){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- keywordArgs.onItem.call(scope, item);
- }
-
- }else{
- var getArgs = {
- url: this.url,
- handleAs: "text"
- };
- var self = this;
- var getHandler = dojo.xhrGet(getArgs);
- getHandler.addCallback(function(data){
- var findNode = function(node, id){
- if(node.id == id){
- return node; //object
- }
- if(node.childNodes) {
- for(var i=0; i<node.childNodes.length; i++){
- var returnNode = findNode(node.childNodes[i], id);
- if(returnNode){
- return returnNode; //object
- }
- }
- }
- return null; //null
- }
- var d = document.createElement("div");
- d.innerHTML = data;
- self._rootNode = findNode(d, self.tableId);
- self._getHeadings.call(self);
- for(var i=0; i<self._rootNode.rows.length; i++){
- self._rootNode.rows[i].store = self;
- }
- item = self._rootNode.rows[identity+1];
- if (keywordArgs.onItem){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- keywordArgs.onItem.call(scope, item);
- }
- });
- getHandler.addErrback(function(error){
- if(keywordArgs.onError){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- keywordArgs.onError.call(scope, error);
-
- }
- });
- }
- }else{
- if(this._rootNode.rows[identity+1]){
- item = this._rootNode.rows[identity+1];
- if (keywordArgs.onItem){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- keywordArgs.onItem.call(scope, item);
- }
- }
- }
- }
+dojo.declare("dojox.data.HtmlTableStore",null,{constructor:function(_1){
+dojo.deprecated("dojox.data.HtmlTableStore","Please use dojox.data.HtmlStore");
+if(_1.url){
+if(!_1.tableId){
+throw new Error("dojo.data.HtmlTableStore: Cannot instantiate using url without an id!");
+}
+this.url=_1.url;
+this.tableId=_1.tableId;
+}else{
+if(_1.tableId){
+this._rootNode=dojo.byId(_1.tableId);
+this.tableId=this._rootNode.id;
+}else{
+this._rootNode=dojo.byId(this.tableId);
+}
+this._getHeadings();
+for(var i=0;i<this._rootNode.rows.length;i++){
+this._rootNode.rows[i].store=this;
+}
+}
+},url:"",tableId:"",_getHeadings:function(){
+this._headings=[];
+dojo.forEach(this._rootNode.tHead.rows[0].cells,dojo.hitch(this,function(th){
+this._headings.push(dojox.xml.parser.textContent(th));
+}));
+},_getAllItems:function(){
+var _2=[];
+for(var i=1;i<this._rootNode.rows.length;i++){
+_2.push(this._rootNode.rows[i]);
+}
+return _2;
+},_assertIsItem:function(_3){
+if(!this.isItem(_3)){
+throw new Error("dojo.data.HtmlTableStore: a function was passed an item argument that was not an item");
+}
+},_assertIsAttribute:function(_4){
+if(typeof _4!=="string"){
+throw new Error("dojo.data.HtmlTableStore: a function was passed an attribute argument that was not an attribute name string");
+return -1;
+}
+return dojo.indexOf(this._headings,_4);
+},getValue:function(_5,_6,_7){
+var _8=this.getValues(_5,_6);
+return (_8.length>0)?_8[0]:_7;
+},getValues:function(_9,_a){
+this._assertIsItem(_9);
+var _b=this._assertIsAttribute(_a);
+if(_b>-1){
+return [dojox.xml.parser.textContent(_9.cells[_b])];
+}
+return [];
+},getAttributes:function(_c){
+this._assertIsItem(_c);
+var _d=[];
+for(var i=0;i<this._headings.length;i++){
+if(this.hasAttribute(_c,this._headings[i])){
+_d.push(this._headings[i]);
+}
+}
+return _d;
+},hasAttribute:function(_e,_f){
+return this.getValues(_e,_f).length>0;
+},containsValue:function(_10,_11,_12){
+var _13=undefined;
+if(typeof _12==="string"){
+_13=dojo.data.util.filter.patternToRegExp(_12,false);
+}
+return this._containsValue(_10,_11,_12,_13);
+},_containsValue:function(_14,_15,_16,_17){
+var _18=this.getValues(_14,_15);
+for(var i=0;i<_18.length;++i){
+var _19=_18[i];
+if(typeof _19==="string"&&_17){
+return (_19.match(_17)!==null);
+}else{
+if(_16===_19){
+return true;
+}
+}
+}
+return false;
+},isItem:function(_1a){
+if(_1a&&_1a.store&&_1a.store===this){
+return true;
+}
+return false;
+},isItemLoaded:function(_1b){
+return this.isItem(_1b);
+},loadItem:function(_1c){
+this._assertIsItem(_1c.item);
+},_fetchItems:function(_1d,_1e,_1f){
+if(this._rootNode){
+this._finishFetchItems(_1d,_1e,_1f);
+}else{
+if(!this.url){
+this._rootNode=dojo.byId(this.tableId);
+this._getHeadings();
+for(var i=0;i<this._rootNode.rows.length;i++){
+this._rootNode.rows[i].store=this;
+}
+}else{
+var _20={url:this.url,handleAs:"text"};
+var _21=this;
+var _22=dojo.xhrGet(_20);
+_22.addCallback(function(_23){
+var _24=function(_25,id){
+if(_25.id==id){
+return _25;
+}
+if(_25.childNodes){
+for(var i=0;i<_25.childNodes.length;i++){
+var _26=_24(_25.childNodes[i],id);
+if(_26){
+return _26;
+}
+}
+}
+return null;
+};
+var d=document.createElement("div");
+d.innerHTML=_23;
+_21._rootNode=_24(d,_21.tableId);
+_21._getHeadings.call(_21);
+for(var i=0;i<_21._rootNode.rows.length;i++){
+_21._rootNode.rows[i].store=_21;
+}
+_21._finishFetchItems(_1d,_1e,_1f);
});
+_22.addErrback(function(_27){
+_1f(_27,_1d);
+});
+}
+}
+},_finishFetchItems:function(_28,_29,_2a){
+var _2b=null;
+var _2c=this._getAllItems();
+if(_28.query){
+var _2d=_28.queryOptions?_28.queryOptions.ignoreCase:false;
+_2b=[];
+var _2e={};
+var _2f;
+var key;
+for(key in _28.query){
+_2f=_28.query[key]+"";
+if(typeof _2f==="string"){
+_2e[key]=dojo.data.util.filter.patternToRegExp(_2f,_2d);
+}
+}
+for(var i=0;i<_2c.length;++i){
+var _30=true;
+var _31=_2c[i];
+for(key in _28.query){
+_2f=_28.query[key]+"";
+if(!this._containsValue(_31,key,_2f,_2e[key])){
+_30=false;
+}
+}
+if(_30){
+_2b.push(_31);
+}
+}
+_29(_2b,_28);
+}else{
+if(_2c.length>0){
+_2b=_2c.slice(0,_2c.length);
+}
+_29(_2b,_28);
+}
+},getFeatures:function(){
+return {"dojo.data.api.Read":true,"dojo.data.api.Identity":true};
+},close:function(_32){
+},getLabel:function(_33){
+if(this.isItem(_33)){
+return "Table Row #"+this.getIdentity(_33);
+}
+return undefined;
+},getLabelAttributes:function(_34){
+return null;
+},getIdentity:function(_35){
+this._assertIsItem(_35);
+if(!dojo.isOpera){
+return _35.sectionRowIndex;
+}else{
+return (dojo.indexOf(this._rootNode.rows,_35)-1);
+}
+},getIdentityAttributes:function(_36){
+return null;
+},fetchItemByIdentity:function(_37){
+var _38=_37.identity;
+var _39=this;
+var _3a=null;
+var _3b=null;
+if(!this._rootNode){
+if(!this.url){
+this._rootNode=dojo.byId(this.tableId);
+this._getHeadings();
+for(var i=0;i<this._rootNode.rows.length;i++){
+this._rootNode.rows[i].store=this;
+}
+_3a=this._rootNode.rows[_38+1];
+if(_37.onItem){
+_3b=_37.scope?_37.scope:dojo.global;
+_37.onItem.call(_3b,_3a);
+}
+}else{
+var _3c={url:this.url,handleAs:"text"};
+var _3d=dojo.xhrGet(_3c);
+_3d.addCallback(function(_3e){
+var _3f=function(_40,id){
+if(_40.id==id){
+return _40;
+}
+if(_40.childNodes){
+for(var i=0;i<_40.childNodes.length;i++){
+var _41=_3f(_40.childNodes[i],id);
+if(_41){
+return _41;
+}
+}
+}
+return null;
+};
+var d=document.createElement("div");
+d.innerHTML=_3e;
+_39._rootNode=_3f(d,_39.tableId);
+_39._getHeadings.call(_39);
+for(var i=0;i<_39._rootNode.rows.length;i++){
+_39._rootNode.rows[i].store=_39;
+}
+_3a=_39._rootNode.rows[_38+1];
+if(_37.onItem){
+_3b=_37.scope?_37.scope:dojo.global;
+_37.onItem.call(_3b,_3a);
+}
+});
+_3d.addErrback(function(_42){
+if(_37.onError){
+_3b=_37.scope?_37.scope:dojo.global;
+_37.onError.call(_3b,_42);
+}
+});
+}
+}else{
+if(this._rootNode.rows[_38+1]){
+_3a=this._rootNode.rows[_38+1];
+if(_37.onItem){
+_3b=_37.scope?_37.scope:dojo.global;
+_37.onItem.call(_3b,_3a);
+}
+}
+}
+}});
dojo.extend(dojox.data.HtmlTableStore,dojo.data.util.simpleFetch);
-
}
diff --git a/js/dojo/dojox/data/OpmlStore.js b/js/dojo/dojox/data/OpmlStore.js
--- a/js/dojo/dojox/data/OpmlStore.js
+++ b/js/dojo/dojox/data/OpmlStore.js
@@ -1,515 +1,329 @@
-if(!dojo._hasResource["dojox.data.OpmlStore"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.data.OpmlStore"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.data.OpmlStore"]){
+dojo._hasResource["dojox.data.OpmlStore"]=true;
dojo.provide("dojox.data.OpmlStore");
-
dojo.require("dojo.data.util.filter");
dojo.require("dojo.data.util.simpleFetch");
-
-dojo.declare("dojox.data.OpmlStore", null, {
- /* summary:
- * The OpmlStore implements the dojo.data.api.Read API.
- */
-
- /* examples:
- * var opmlStore = new dojo.data.OpmlStore({url:"geography.xml"});
- * var opmlStore = new dojo.data.OpmlStore({url:"http://example.com/geography.xml"});
- */
- constructor: function(/* Object */ keywordParameters){
- // summary: constructor
- // keywordParameters: {url: String, label: String} Where label is optional and configures what should be used as the return from getLabel()
- this._xmlData = null;
- this._arrayOfTopLevelItems = [];
- this._arrayOfAllItems = [];
- this._metadataNodes = null;
- this._loadFinished = false;
- this.url = keywordParameters.url;
- this._opmlData = keywordParameters.data; // XML DOM Document
- if(keywordParameters.label){
- this.label = keywordParameters.label;
- }
- this._loadInProgress = false; //Got to track the initial load to prevent duelling loads of the dataset.
- this._queuedFetches = [];
- this._identityMap = {};
- this._identCount = 0;
- this._idProp = "_I";
- },
-
- label: "text",
-
- url: "",
-
- _assertIsItem: function(/* item */ item){
- if(!this.isItem(item)){
- throw new Error("dojo.data.OpmlStore: a function was passed an item argument that was not an item");
- }
- },
-
- _assertIsAttribute: function(/* item || String */ attribute){
- // summary:
- // This function tests whether the item passed in is indeed a valid 'attribute' like type for the store.
- // attribute:
- // The attribute to test for being contained by the store.
- if(!dojo.isString(attribute)){
- throw new Error("dojox.data.OpmlStore: a function was passed an attribute argument that was not an attribute object nor an attribute name string");
- }
- },
-
- _removeChildNodesThatAreNotElementNodes: function(/* node */ node, /* boolean */ recursive){
- var childNodes = node.childNodes;
- if(childNodes.length === 0){
- return;
- }
- var nodesToRemove = [];
- var i, childNode;
- for(i = 0; i < childNodes.length; ++i){
- childNode = childNodes[i];
- if(childNode.nodeType != 1){
- nodesToRemove.push(childNode);
- }
- }
- for(i = 0; i < nodesToRemove.length; ++i){
- childNode = nodesToRemove[i];
- node.removeChild(childNode);
- }
- if(recursive){
- for(i = 0; i < childNodes.length; ++i){
- childNode = childNodes[i];
- this._removeChildNodesThatAreNotElementNodes(childNode, recursive);
- }
- }
- },
-
- _processRawXmlTree: function(/* xmlDoc */ rawXmlTree){
- this._loadFinished = true;
- this._xmlData = rawXmlTree;
- var headNodes = rawXmlTree.getElementsByTagName('head');
- var headNode = headNodes[0];
- if(headNode){
- this._removeChildNodesThatAreNotElementNodes(headNode);
- this._metadataNodes = headNode.childNodes;
- }
- var bodyNodes = rawXmlTree.getElementsByTagName('body');
- var bodyNode = bodyNodes[0];
- if(bodyNode){
- this._removeChildNodesThatAreNotElementNodes(bodyNode, true);
-
- var bodyChildNodes = bodyNodes[0].childNodes;
- for(var i = 0; i < bodyChildNodes.length; ++i){
- var node = bodyChildNodes[i];
- if(node.tagName == 'outline'){
- this._identityMap[this._identCount] = node;
- this._identCount++;
- this._arrayOfTopLevelItems.push(node);
- this._arrayOfAllItems.push(node);
- this._checkChildNodes(node);
- }
- }
- }
- },
-
- _checkChildNodes: function(node /*Node*/){
- // summary:
- // Internal function to recurse over all child nodes from the store and add them
- // As non-toplevel items
- // description:
- // Internal function to recurse over all child nodes from the store and add them
- // As non-toplevel items
- //
- // node:
- // The child node to walk.
- if(node.firstChild){
- for(var i = 0; i < node.childNodes.length; i++){
- var child = node.childNodes[i];
- if(child.tagName == 'outline'){
- this._identityMap[this._identCount] = child;
- this._identCount++;
- this._arrayOfAllItems.push(child);
- this._checkChildNodes(child);
- }
- }
- }
- },
-
- _getItemsArray: function(/*object?*/queryOptions){
- // summary:
- // Internal function to determine which list of items to search over.
- // queryOptions: The query options parameter, if any.
- if(queryOptions && queryOptions.deep) {
- return this._arrayOfAllItems;
- }
- return this._arrayOfTopLevelItems;
- },
-
-/***************************************
- dojo.data.api.Read API
-***************************************/
- getValue: function( /* item */ item,
- /* attribute || attribute-name-string */ attribute,
- /* value? */ defaultValue){
- // summary:
- // See dojo.data.api.Read.getValue()
- this._assertIsItem(item);
- this._assertIsAttribute(attribute);
- if(attribute == 'children'){
- return (item.firstChild || defaultValue); //Object
- } else {
- var value = item.getAttribute(attribute);
- return (value !== undefined) ? value : defaultValue; //Object
- }
- },
-
- getValues: function(/* item */ item,
- /* attribute || attribute-name-string */ attribute){
- // summary:
- // See dojo.data.api.Read.getValues()
- this._assertIsItem(item);
- this._assertIsAttribute(attribute);
- var array = [];
- if(attribute == 'children'){
- for(var i = 0; i < item.childNodes.length; ++i){
- array.push(item.childNodes[i]);
- }
- } else if(item.getAttribute(attribute) !== null){
- array.push(item.getAttribute(attribute));
- }
- return array; // Array
- },
-
- getAttributes: function(/* item */ item){
- // summary:
- // See dojo.data.api.Read.getAttributes()
- this._assertIsItem(item);
- var attributes = [];
- var xmlNode = item;
- var xmlAttributes = xmlNode.attributes;
- for(var i = 0; i < xmlAttributes.length; ++i){
- var xmlAttribute = xmlAttributes.item(i);
- attributes.push(xmlAttribute.nodeName);
- }
- if(xmlNode.childNodes.length > 0){
- attributes.push('children');
- }
- return attributes; //Array
- },
-
- hasAttribute: function( /* item */ item,
- /* attribute || attribute-name-string */ attribute){
- // summary:
- // See dojo.data.api.Read.hasAttribute()
- return (this.getValues(item, attribute).length > 0); //Boolean
- },
-
- containsValue: function(/* item */ item,
- /* attribute || attribute-name-string */ attribute,
- /* anything */ value){
- // summary:
- // See dojo.data.api.Read.containsValue()
- var regexp = undefined;
- if(typeof value === "string"){
- regexp = dojo.data.util.filter.patternToRegExp(value, false);
- }
- return this._containsValue(item, attribute, value, regexp); //boolean.
- },
-
- _containsValue: function( /* item */ item,
- /* attribute || attribute-name-string */ attribute,
- /* anything */ value,
- /* RegExp?*/ regexp){
- // summary:
- // Internal function for looking at the values contained by the item.
- // description:
- // Internal function for looking at the values contained by the item. This
- // function allows for denoting if the comparison should be case sensitive for
- // strings or not (for handling filtering cases where string case should not matter)
- //
- // item:
- // The data item to examine for attribute values.
- // attribute:
- // The attribute to inspect.
- // value:
- // The value to match.
- // regexp:
- // Optional regular expression generated off value if value was of string type to handle wildcarding.
- // If present and attribute values are string, then it can be used for comparison instead of 'value'
- var values = this.getValues(item, attribute);
- for(var i = 0; i < values.length; ++i){
- var possibleValue = values[i];
- if(typeof possibleValue === "string" && regexp){
- return (possibleValue.match(regexp) !== null);
- }else{
- //Non-string matching.
- if(value === possibleValue){
- return true; // Boolean
- }
- }
- }
- return false; // Boolean
- },
-
- isItem: function(/* anything */ something){
- // summary:
- // See dojo.data.api.Read.isItem()
- // description:
- // Four things are verified to ensure that "something" is an item:
- // something can not be null, the nodeType must be an XML Element,
- // the tagName must be "outline", and the node must be a member of
- // XML document for this datastore.
- return (something &&
- something.nodeType == 1 &&
- something.tagName == 'outline' &&
- something.ownerDocument === this._xmlData); //Boolean
- },
-
- isItemLoaded: function(/* anything */ something){
- // summary:
- // See dojo.data.api.Read.isItemLoaded()
- // OpmlStore loads every item, so if it's an item, then it's loaded.
- return this.isItem(something); //Boolean
- },
-
- loadItem: function(/* item */ item){
- // summary:
- // See dojo.data.api.Read.loadItem()
- // description:
- // The OpmlStore always loads all items, so if it's an item, then it's loaded.
- // From the dojo.data.api.Read.loadItem docs:
- // If a call to isItemLoaded() returns true before loadItem() is even called,
- // then loadItem() need not do any work at all and will not even invoke the callback handlers.
- },
-
- getLabel: function(/* item */ item){
- // summary:
- // See dojo.data.api.Read.getLabel()
- if(this.isItem(item)){
- return this.getValue(item,this.label); //String
- }
- return undefined; //undefined
- },
-
- getLabelAttributes: function(/* item */ item){
- // summary:
- // See dojo.data.api.Read.getLabelAttributes()
- return [this.label]; //array
- },
-
- // The dojo.data.api.Read.fetch() function is implemented as
- // a mixin from dojo.data.util.simpleFetch.
- // That mixin requires us to define _fetchItems().
- _fetchItems: function( /* Object */ keywordArgs,
- /* Function */ findCallback,
- /* Function */ errorCallback){
- // summary:
- // See dojo.data.util.simpleFetch.fetch()
-
- var self = this;
- var filter = function(requestArgs, arrayOfItems){
- var items = null;
- if(requestArgs.query){
- items = [];
- var ignoreCase = requestArgs.queryOptions ? requestArgs.queryOptions.ignoreCase : false;
-
- //See if there are any string values that can be regexp parsed first to avoid multiple regexp gens on the
- //same value for each item examined. Much more efficient.
- var regexpList = {};
- for(var key in requestArgs.query){
- var value = requestArgs.query[key];
- if(typeof value === "string"){
- regexpList[key] = dojo.data.util.filter.patternToRegExp(value, ignoreCase);
- }
- }
-
- for(var i = 0; i < arrayOfItems.length; ++i){
- var match = true;
- var candidateItem = arrayOfItems[i];
- for(var key in requestArgs.query){
- var value = requestArgs.query[key];
- if(!self._containsValue(candidateItem, key, value, regexpList[key])){
- match = false;
- }
- }
- if(match){
- items.push(candidateItem);
- }
- }
- }else{
- // We want a copy to pass back in case the parent wishes to sort the array. We shouldn't allow resort
- // of the internal list so that multiple callers can get lists and sort without affecting each other.
- if(arrayOfItems.length> 0){
- items = arrayOfItems.slice(0,arrayOfItems.length);
- }
- }
- findCallback(items, requestArgs);
- };
-
- if(this._loadFinished){
- filter(keywordArgs, this._getItemsArray(keywordArgs.queryOptions));
- }else{
-
- //If fetches come in before the loading has finished, but while
- //a load is in progress, we have to defer the fetching to be
- //invoked in the callback.
- if(this._loadInProgress){
- this._queuedFetches.push({args: keywordArgs, filter: filter});
- }else{
- if(this.url !== ""){
- this._loadInProgress = true;
- var getArgs = {
- url: self.url,
- handleAs: "xml"
- };
- var getHandler = dojo.xhrGet(getArgs);
- getHandler.addCallback(function(data){
- self._processRawXmlTree(data);
- filter(keywordArgs, self._getItemsArray(keywordArgs.queryOptions));
- self._handleQueuedFetches();
- });
- getHandler.addErrback(function(error){
- throw error;
- });
- }else if(this._opmlData){
- this._processRawXmlTree(this._opmlData);
- this._opmlData = null;
- filter(keywordArgs, this._getItemsArray(keywordArgs.queryOptions));
- }else{
- throw new Error("dojox.data.OpmlStore: No OPML source data was provided as either URL or XML data input.");
- }
- }
- }
- },
-
- getFeatures: function(){
- // summary: See dojo.data.api.Read.getFeatures()
- var features = {
- 'dojo.data.api.Read': true,
- 'dojo.data.api.Identity': true
- };
- return features; //Object
- },
-
-/***************************************
- dojo.data.api.Identity API
-***************************************/
- getIdentity: function(/* item */ item){
- // summary:
- // See dojo.data.api.Identity.getIdentity()
- if(this.isItem(item)){
- //No ther way to do this other than O(n) without
- //complete rework of how the tree stores nodes.
- for(var i in this._identityMap){
- if(this._identityMap[i] === item){
- return i;
- }
- }
- }
- return null; //null
- },
-
- fetchItemByIdentity: function(/* Object */ keywordArgs){
- // summary:
- // See dojo.data.api.Identity.fetchItemByIdentity()
-
- //Hasn't loaded yet, we have to trigger the load.
- if(!this._loadFinished){
- var self = this;
- if(this.url !== ""){
- //If fetches come in before the loading has finished, but while
- //a load is in progress, we have to defer the fetching to be
- //invoked in the callback.
- if(this._loadInProgress){
- this._queuedFetches.push({args: keywordArgs});
- }else{
- this._loadInProgress = true;
- var getArgs = {
- url: self.url,
- handleAs: "xml"
- };
- var getHandler = dojo.xhrGet(getArgs);
- getHandler.addCallback(function(data){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- try{
- self._processRawXmlTree(data);
- var item = self._identityMap[keywordArgs.identity];
- if(!self.isItem(item)){
- item = null;
- }
- if(keywordArgs.onItem){
- keywordArgs.onItem.call(scope, item);
- }
- self._handleQueuedFetches();
- }catch(error){
- if(keywordArgs.onError){
- keywordArgs.onError.call(scope, error);
- }
- }
- });
- getHandler.addErrback(function(error){
- this._loadInProgress = false;
- if(keywordArgs.onError){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- keywordArgs.onError.call(scope, error);
- }
- });
- }
- }else if(this._opmlData){
- this._processRawXmlTree(this._opmlData);
- this._opmlData = null;
- var item = this._identityMap[keywordArgs.identity];
- if(!self.isItem(item)){
- item = null;
- }
- if(keywordArgs.onItem){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- keywordArgs.onItem.call(scope, item);
- }
- }
- }else{
- //Already loaded. We can just look it up and call back.
- var item = this._identityMap[keywordArgs.identity];
- if(!this.isItem(item)){
- item = null;
- }
- if(keywordArgs.onItem){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- keywordArgs.onItem.call(scope, item);
- }
- }
- },
-
- getIdentityAttributes: function(/* item */ item){
- // summary:
- // See dojo.data.api.Identity.getIdentifierAttributes()
-
- //Identity isn't a public attribute in the item, it's the node count.
- //So, return null.
- return null;
- },
-
- _handleQueuedFetches: function(){
- // summary:
- // Internal function to execute delayed request in the store.
- //Execute any deferred fetches now.
- if (this._queuedFetches.length > 0) {
- for(var i = 0; i < this._queuedFetches.length; i++){
- var fData = this._queuedFetches[i];
- var delayedQuery = fData.args;
- var delayedFilter = fData.filter;
- if(delayedFilter){
- delayedFilter(delayedQuery, this._getItemsArray(delayedQuery.queryOptions));
- }else{
- this.fetchItemByIdentity(delayedQuery);
- }
- }
- this._queuedFetches = [];
- }
- },
-
- close: function(/*dojo.data.api.Request || keywordArgs || null */ request){
- // summary:
- // See dojo.data.api.Read.close()
- }
+dojo.declare("dojox.data.OpmlStore",null,{constructor:function(_1){
+this._xmlData=null;
+this._arrayOfTopLevelItems=[];
+this._arrayOfAllItems=[];
+this._metadataNodes=null;
+this._loadFinished=false;
+this.url=_1.url;
+this._opmlData=_1.data;
+if(_1.label){
+this.label=_1.label;
+}
+this._loadInProgress=false;
+this._queuedFetches=[];
+this._identityMap={};
+this._identCount=0;
+this._idProp="_I";
+if(_1&&"urlPreventCache" in _1){
+this.urlPreventCache=_1.urlPreventCache?true:false;
+}
+},label:"text",url:"",urlPreventCache:false,_assertIsItem:function(_2){
+if(!this.isItem(_2)){
+throw new Error("dojo.data.OpmlStore: a function was passed an item argument that was not an item");
+}
+},_assertIsAttribute:function(_3){
+if(!dojo.isString(_3)){
+throw new Error("dojox.data.OpmlStore: a function was passed an attribute argument that was not an attribute object nor an attribute name string");
+}
+},_removeChildNodesThatAreNotElementNodes:function(_4,_5){
+var _6=_4.childNodes;
+if(_6.length===0){
+return;
+}
+var _7=[];
+var i,_8;
+for(i=0;i<_6.length;++i){
+_8=_6[i];
+if(_8.nodeType!=1){
+_7.push(_8);
+}
+}
+for(i=0;i<_7.length;++i){
+_8=_7[i];
+_4.removeChild(_8);
+}
+if(_5){
+for(i=0;i<_6.length;++i){
+_8=_6[i];
+this._removeChildNodesThatAreNotElementNodes(_8,_5);
+}
+}
+},_processRawXmlTree:function(_9){
+this._loadFinished=true;
+this._xmlData=_9;
+var _a=_9.getElementsByTagName("head");
+var _b=_a[0];
+if(_b){
+this._removeChildNodesThatAreNotElementNodes(_b);
+this._metadataNodes=_b.childNodes;
+}
+var _c=_9.getElementsByTagName("body");
+var _d=_c[0];
+if(_d){
+this._removeChildNodesThatAreNotElementNodes(_d,true);
+var _e=_c[0].childNodes;
+for(var i=0;i<_e.length;++i){
+var _f=_e[i];
+if(_f.tagName=="outline"){
+this._identityMap[this._identCount]=_f;
+this._identCount++;
+this._arrayOfTopLevelItems.push(_f);
+this._arrayOfAllItems.push(_f);
+this._checkChildNodes(_f);
+}
+}
+}
+},_checkChildNodes:function(_10){
+if(_10.firstChild){
+for(var i=0;i<_10.childNodes.length;i++){
+var _11=_10.childNodes[i];
+if(_11.tagName=="outline"){
+this._identityMap[this._identCount]=_11;
+this._identCount++;
+this._arrayOfAllItems.push(_11);
+this._checkChildNodes(_11);
+}
+}
+}
+},_getItemsArray:function(_12){
+if(_12&&_12.deep){
+return this._arrayOfAllItems;
+}
+return this._arrayOfTopLevelItems;
+},getValue:function(_13,_14,_15){
+this._assertIsItem(_13);
+this._assertIsAttribute(_14);
+if(_14=="children"){
+return (_13.firstChild||_15);
+}else{
+var _16=_13.getAttribute(_14);
+return (_16!==undefined)?_16:_15;
+}
+},getValues:function(_17,_18){
+this._assertIsItem(_17);
+this._assertIsAttribute(_18);
+var _19=[];
+if(_18=="children"){
+for(var i=0;i<_17.childNodes.length;++i){
+_19.push(_17.childNodes[i]);
+}
+}else{
+if(_17.getAttribute(_18)!==null){
+_19.push(_17.getAttribute(_18));
+}
+}
+return _19;
+},getAttributes:function(_1a){
+this._assertIsItem(_1a);
+var _1b=[];
+var _1c=_1a;
+var _1d=_1c.attributes;
+for(var i=0;i<_1d.length;++i){
+var _1e=_1d.item(i);
+_1b.push(_1e.nodeName);
+}
+if(_1c.childNodes.length>0){
+_1b.push("children");
+}
+return _1b;
+},hasAttribute:function(_1f,_20){
+return (this.getValues(_1f,_20).length>0);
+},containsValue:function(_21,_22,_23){
+var _24=undefined;
+if(typeof _23==="string"){
+_24=dojo.data.util.filter.patternToRegExp(_23,false);
+}
+return this._containsValue(_21,_22,_23,_24);
+},_containsValue:function(_25,_26,_27,_28){
+var _29=this.getValues(_25,_26);
+for(var i=0;i<_29.length;++i){
+var _2a=_29[i];
+if(typeof _2a==="string"&&_28){
+return (_2a.match(_28)!==null);
+}else{
+if(_27===_2a){
+return true;
+}
+}
+}
+return false;
+},isItem:function(_2b){
+return (_2b&&_2b.nodeType==1&&_2b.tagName=="outline"&&_2b.ownerDocument===this._xmlData);
+},isItemLoaded:function(_2c){
+return this.isItem(_2c);
+},loadItem:function(_2d){
+},getLabel:function(_2e){
+if(this.isItem(_2e)){
+return this.getValue(_2e,this.label);
+}
+return undefined;
+},getLabelAttributes:function(_2f){
+return [this.label];
+},_fetchItems:function(_30,_31,_32){
+var _33=this;
+var _34=function(_35,_36){
+var _37=null;
+if(_35.query){
+_37=[];
+var _38=_35.queryOptions?_35.queryOptions.ignoreCase:false;
+var _39={};
+for(var key in _35.query){
+var _3a=_35.query[key];
+if(typeof _3a==="string"){
+_39[key]=dojo.data.util.filter.patternToRegExp(_3a,_38);
+}
+}
+for(var i=0;i<_36.length;++i){
+var _3b=true;
+var _3c=_36[i];
+for(var key in _35.query){
+var _3a=_35.query[key];
+if(!_33._containsValue(_3c,key,_3a,_39[key])){
+_3b=false;
+}
+}
+if(_3b){
+_37.push(_3c);
+}
+}
+}else{
+if(_36.length>0){
+_37=_36.slice(0,_36.length);
+}
+}
+_31(_37,_35);
+};
+if(this._loadFinished){
+_34(_30,this._getItemsArray(_30.queryOptions));
+}else{
+if(this._loadInProgress){
+this._queuedFetches.push({args:_30,filter:_34});
+}else{
+if(this.url!==""){
+this._loadInProgress=true;
+var _3d={url:_33.url,handleAs:"xml",preventCache:_33.urlPreventCache};
+var _3e=dojo.xhrGet(_3d);
+_3e.addCallback(function(_3f){
+_33._processRawXmlTree(_3f);
+_34(_30,_33._getItemsArray(_30.queryOptions));
+_33._handleQueuedFetches();
});
-//Mix in the simple fetch implementation to this class.
+_3e.addErrback(function(_40){
+throw _40;
+});
+}else{
+if(this._opmlData){
+this._processRawXmlTree(this._opmlData);
+this._opmlData=null;
+_34(_30,this._getItemsArray(_30.queryOptions));
+}else{
+throw new Error("dojox.data.OpmlStore: No OPML source data was provided as either URL or XML data input.");
+}
+}
+}
+}
+},getFeatures:function(){
+var _41={"dojo.data.api.Read":true,"dojo.data.api.Identity":true};
+return _41;
+},getIdentity:function(_42){
+if(this.isItem(_42)){
+for(var i in this._identityMap){
+if(this._identityMap[i]===_42){
+return i;
+}
+}
+}
+return null;
+},fetchItemByIdentity:function(_43){
+if(!this._loadFinished){
+var _44=this;
+if(this.url!==""){
+if(this._loadInProgress){
+this._queuedFetches.push({args:_43});
+}else{
+this._loadInProgress=true;
+var _45={url:_44.url,handleAs:"xml"};
+var _46=dojo.xhrGet(_45);
+_46.addCallback(function(_47){
+var _48=_43.scope?_43.scope:dojo.global;
+try{
+_44._processRawXmlTree(_47);
+var _49=_44._identityMap[_43.identity];
+if(!_44.isItem(_49)){
+_49=null;
+}
+if(_43.onItem){
+_43.onItem.call(_48,_49);
+}
+_44._handleQueuedFetches();
+}
+catch(error){
+if(_43.onError){
+_43.onError.call(_48,error);
+}
+}
+});
+_46.addErrback(function(_4a){
+this._loadInProgress=false;
+if(_43.onError){
+var _4b=_43.scope?_43.scope:dojo.global;
+_43.onError.call(_4b,_4a);
+}
+});
+}
+}else{
+if(this._opmlData){
+this._processRawXmlTree(this._opmlData);
+this._opmlData=null;
+var _4c=this._identityMap[_43.identity];
+if(!_44.isItem(_4c)){
+_4c=null;
+}
+if(_43.onItem){
+var _4d=_43.scope?_43.scope:dojo.global;
+_43.onItem.call(_4d,_4c);
+}
+}
+}
+}else{
+var _4c=this._identityMap[_43.identity];
+if(!this.isItem(_4c)){
+_4c=null;
+}
+if(_43.onItem){
+var _4d=_43.scope?_43.scope:dojo.global;
+_43.onItem.call(_4d,_4c);
+}
+}
+},getIdentityAttributes:function(_4e){
+return null;
+},_handleQueuedFetches:function(){
+if(this._queuedFetches.length>0){
+for(var i=0;i<this._queuedFetches.length;i++){
+var _4f=this._queuedFetches[i];
+var _50=_4f.args;
+var _51=_4f.filter;
+if(_51){
+_51(_50,this._getItemsArray(_50.queryOptions));
+}else{
+this.fetchItemByIdentity(_50);
+}
+}
+this._queuedFetches=[];
+}
+},close:function(_52){
+}});
dojo.extend(dojox.data.OpmlStore,dojo.data.util.simpleFetch);
-
-
}
diff --git a/js/dojo/dojox/data/PicasaStore.js b/js/dojo/dojox/data/PicasaStore.js
--- a/js/dojo/dojox/data/PicasaStore.js
+++ b/js/dojo/dojox/data/PicasaStore.js
@@ -1,254 +1,172 @@
-if(!dojo._hasResource["dojox.data.PicasaStore"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.data.PicasaStore"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.data.PicasaStore"]){
+dojo._hasResource["dojox.data.PicasaStore"]=true;
dojo.provide("dojox.data.PicasaStore");
-
dojo.require("dojo.data.util.simpleFetch");
dojo.require("dojo.io.script");
dojo.require("dojo.date.stamp");
-
-dojo.declare("dojox.data.PicasaStore", null, {
- constructor: function(/*Object*/args){
- // summary:
- // Initializer for the PicasaStore store.
- // description:
- // The PicasaStore is a Datastore interface to one of the basic services
- // of the Picasa service, the public photo feed. This does not provide
- // access to all the services of Picasa.
- // This store cannot do * and ? filtering as the picasa service
- // provides no interface for wildcards.
- if(args && args.label){
- this.label = args.label;
- }
- },
-
- _picasaUrl: "http://picasaweb.google.com/data/feed/api/all",
-
- _storeRef: "_S",
-
- label: "title",
-
- _assertIsItem: function(/* item */ item){
- // summary:
- // This function tests whether the item passed in is indeed an item in the store.
- // item:
- // The item to test for being contained by the store.
- if(!this.isItem(item)){
- throw new Error("dojox.data.PicasaStore: a function was passed an item argument that was not an item");
- }
- },
-
- _assertIsAttribute: function(/* attribute-name-string */ attribute){
- // summary:
- // This function tests whether the item passed in is indeed a valid 'attribute' like type for the store.
- // attribute:
- // The attribute to test for being contained by the store.
- if(typeof attribute !== "string"){
- throw new Error("dojox.data.PicasaStore: a function was passed an attribute argument that was not an attribute name string");
- }
- },
-
- getFeatures: function(){
- // summary:
- // See dojo.data.api.Read.getFeatures()
- return {
- 'dojo.data.api.Read': true
- };
- },
-
- getValue: function(item, attribute){
- // summary:
- // See dojo.data.api.Read.getValue()
- var values = this.getValues(item, attribute);
- if(values){
- return values[0];
- }
- return undefined;
- },
-
- getAttributes: function(item){
- // summary:
- // See dojo.data.api.Read.getAttributes()
- return ["id", "published", "updated", "category", "title$type", "title", "summary$type", "summary", "rights$type", "rights", "link", "author", "gphoto$id", "gphoto$name", "location"];
- },
-
- hasAttribute: function(item, attribute){
- // summary:
- // See dojo.data.api.Read.hasAttributes()
- if(this.getValue(item,attribute)){
- return true;
- }
- return false;
- },
-
- isItemLoaded: function(item){
- // summary:
- // See dojo.data.api.Read.isItemLoaded()
- return this.isItem(item);
- },
-
- loadItem: function(keywordArgs){
- // summary:
- // See dojo.data.api.Read.loadItem()
- },
-
- getLabel: function(item){
- // summary:
- // See dojo.data.api.Read.getLabel()
- return this.getValue(item,this.label);
- },
-
- getLabelAttributes: function(item){
- // summary:
- // See dojo.data.api.Read.getLabelAttributes()
- return [this.label];
- },
-
- containsValue: function(item, attribute, value){
- // summary:
- // See dojo.data.api.Read.containsValue()
- var values = this.getValues(item,attribute);
- for(var i = 0; i < values.length; i++){
- if(values[i] === value){
- return true;
- }
- }
- return false;
- },
-
- getValues: function(item, attribute){
- // summary:
- // See dojo.data.api.Read.getValue()
-
- this._assertIsItem(item);
- this._assertIsAttribute(attribute);
- if(attribute === "title"){
- return [this._unescapeHtml(item.title)];
- }else if(attribute === "author"){
- return [this._unescapeHtml(item.author[0].name)];
- }else if(attribute === "datePublished"){
- return [dojo.date.stamp.fromISOString(item.published)];
- }else if(attribute === "dateTaken"){
- return [dojo.date.stamp.fromISOString(item.date_taken)];
- }else if(attribute === "imageUrlSmall"){
- return [item.media.thumbnail[1].url];
- }else if(attribute === "imageUrl"){
- return [item.content$src];
- }else if(attribute === "imageUrlMedium"){
- return [item.media.thumbnail[2].url];
- }else if(attribute === "link"){
- return [item.link[1]];
- }else if(attribute === "tags"){
- return item.tags.split(" ");
- }else if(attribute === "description"){
- return [this._unescapeHtml(item.summary)];
- }
- return undefined;
- },
-
- isItem: function(item){
- // summary:
- // See dojo.data.api.Read.isItem()
- if(item && item[this._storeRef] === this){
- return true;
- }
- return false;
- },
-
- close: function(request){
- // summary:
- // See dojo.data.api.Read.close()
- },
-
- _fetchItems: function(request, fetchHandler, errorHandler){
- // summary:
- // Fetch picasa items that match to a query
- // request:
- // A request object
- // fetchHandler:
- // A function to call for fetched items
- // errorHandler:
- // A function to call on error
-
- if(!request.query){
- request.query={};
- }
-
- //Build up the content to send the request for.
- var content = {alt: "jsonm", pp: "1", psc: "G"};
- content['start-index'] = "1";
- if(request.query.start){
- content['start-index'] = request.query.start;
- }
- if(request.query.tags){
- content.q = request.query.tags;
- }
- if(request.query.userid){
- content.uname = request.query.userid;
- }
- if(request.query.userids){
- content.ids = request.query.userids;
- }
- if(request.query.lang){
- content.hl = request.query.lang;
- }
- if(request.count){
- content['max-results'] = request.count;
- }else{
- content['max-results'] = "20";
- }
-
- //Linking this up to Picasa is a JOY!
- var self = this;
- var handle = null;
- var myHandler = function(data){
- if(handle !== null){
- dojo.disconnect(handle);
- }
-
- //Process the items...
- fetchHandler(self._processPicasaData(data), request);
- };
- var getArgs = {
- url: this._picasaUrl,
- // preventCache: true,
- content: content,
- callbackParamName: 'callback',
- handle: myHandler
- };
- var deferred = dojo.io.script.get(getArgs);
-
- deferred.addErrback(function(error){
- dojo.disconnect(handle);
- errorHandler(error, request);
- });
- },
-
- _processPicasaData: function(data){
- var items = [];
- if(data.feed){
- items = data.feed.entry;
- //Add on the store ref so that isItem can work.
- for(var i = 0; i < items.length; i++){
- var item = items[i];
- item[this._storeRef] = this;
- }
- }
- return items;
- },
-
- _unescapeHtml: function(str){
- // summary: Utility function to un-escape XML special characters in an HTML string.
- // description: Utility function to un-escape XML special characters in an HTML string.
- // str: String.
- // The string to un-escape
- // returns: HTML String converted back to the normal text (unescaped) characters (<,>,&, ", etc,).
- //
- //TODO: Check to see if theres already compatible escape() in dojo.string or dojo.html
- str = str.replace(/&amp;/gm, "&").replace(/&lt;/gm, "<").replace(/&gt;/gm, ">").replace(/&quot;/gm, "\"");
- str = str.replace(/&#39;/gm, "'");
- return str;
- }
+dojo.declare("dojox.data.PicasaStore",null,{constructor:function(_1){
+if(_1&&_1.label){
+this.label=_1.label;
+}
+if(_1&&"urlPreventCache" in _1){
+this.urlPreventCache=_1.urlPreventCache?true:false;
+}
+if(_1&&"maxResults" in _1){
+this.maxResults=parseInt(_1.maxResults);
+if(!this.maxResults){
+this.maxResults=20;
+}
+}
+},_picasaUrl:"http://picasaweb.google.com/data/feed/api/all",_storeRef:"_S",label:"title",urlPreventCache:false,maxResults:20,_assertIsItem:function(_2){
+if(!this.isItem(_2)){
+throw new Error("dojox.data.PicasaStore: a function was passed an item argument that was not an item");
+}
+},_assertIsAttribute:function(_3){
+if(typeof _3!=="string"){
+throw new Error("dojox.data.PicasaStore: a function was passed an attribute argument that was not an attribute name string");
+}
+},getFeatures:function(){
+return {"dojo.data.api.Read":true};
+},getValue:function(_4,_5,_6){
+var _7=this.getValues(_4,_5);
+if(_7&&_7.length>0){
+return _7[0];
+}
+return _6;
+},getAttributes:function(_8){
+return ["id","published","updated","category","title$type","title","summary$type","summary","rights$type","rights","link","author","gphoto$id","gphoto$name","location","imageUrlSmall","imageUrlMedium","imageUrl","datePublished","dateTaken","description"];
+},hasAttribute:function(_9,_a){
+if(this.getValue(_9,_a)){
+return true;
+}
+return false;
+},isItemLoaded:function(_b){
+return this.isItem(_b);
+},loadItem:function(_c){
+},getLabel:function(_d){
+return this.getValue(_d,this.label);
+},getLabelAttributes:function(_e){
+return [this.label];
+},containsValue:function(_f,_10,_11){
+var _12=this.getValues(_f,_10);
+for(var i=0;i<_12.length;i++){
+if(_12[i]===_11){
+return true;
+}
+}
+return false;
+},getValues:function(_13,_14){
+this._assertIsItem(_13);
+this._assertIsAttribute(_14);
+if(_14==="title"){
+return [this._unescapeHtml(_13.title)];
+}else{
+if(_14==="author"){
+return [this._unescapeHtml(_13.author[0].name)];
+}else{
+if(_14==="datePublished"){
+return [dojo.date.stamp.fromISOString(_13.published)];
+}else{
+if(_14==="dateTaken"){
+return [dojo.date.stamp.fromISOString(_13.published)];
+}else{
+if(_14==="updated"){
+return [dojo.date.stamp.fromISOString(_13.updated)];
+}else{
+if(_14==="imageUrlSmall"){
+return [_13.media.thumbnail[1].url];
+}else{
+if(_14==="imageUrl"){
+return [_13.content$src];
+}else{
+if(_14==="imageUrlMedium"){
+return [_13.media.thumbnail[2].url];
+}else{
+if(_14==="link"){
+return [_13.link[1]];
+}else{
+if(_14==="tags"){
+return _13.tags.split(" ");
+}else{
+if(_14==="description"){
+return [this._unescapeHtml(_13.summary)];
+}
+}
+}
+}
+}
+}
+}
+}
+}
+}
+}
+return [];
+},isItem:function(_15){
+if(_15&&_15[this._storeRef]===this){
+return true;
+}
+return false;
+},close:function(_16){
+},_fetchItems:function(_17,_18,_19){
+if(!_17.query){
+_17.query={};
+}
+var _1a={alt:"jsonm",pp:"1",psc:"G"};
+_1a["start-index"]="1";
+if(_17.query.start){
+_1a["start-index"]=_17.query.start;
+}
+if(_17.query.tags){
+_1a.q=_17.query.tags;
+}
+if(_17.query.userid){
+_1a.uname=_17.query.userid;
+}
+if(_17.query.userids){
+_1a.ids=_17.query.userids;
+}
+if(_17.query.lang){
+_1a.hl=_17.query.lang;
+}
+_1a["max-results"]=this.maxResults;
+var _1b=this;
+var _1c=null;
+var _1d=function(_1e){
+if(_1c!==null){
+dojo.disconnect(_1c);
+}
+_18(_1b._processPicasaData(_1e),_17);
+};
+var _1f={url:this._picasaUrl,preventCache:this.urlPreventCache,content:_1a,callbackParamName:"callback",handle:_1d};
+var _20=dojo.io.script.get(_1f);
+_20.addErrback(function(_21){
+dojo.disconnect(_1c);
+_19(_21,_17);
});
-dojo.extend(dojox.data.PicasaStore,dojo.data.util.simpleFetch);
-
+},_processPicasaData:function(_22){
+var _23=[];
+if(_22.feed){
+_23=_22.feed.entry;
+for(var i=0;i<_23.length;i++){
+var _24=_23[i];
+_24[this._storeRef]=this;
+}
}
+return _23;
+},_unescapeHtml:function(str){
+if(str){
+str=str.replace(/&amp;/gm,"&").replace(/&lt;/gm,"<").replace(/&gt;/gm,">").replace(/&quot;/gm,"\"");
+str=str.replace(/&#39;/gm,"'");
+}
+return str;
+}});
+dojo.extend(dojox.data.PicasaStore,dojo.data.util.simpleFetch);
+}
diff --git a/js/dojo/dojox/data/QueryReadStore.js b/js/dojo/dojox/data/QueryReadStore.js
--- a/js/dojo/dojox/data/QueryReadStore.js
+++ b/js/dojo/dojox/data/QueryReadStore.js
@@ -1,474 +1,254 @@
-if(!dojo._hasResource["dojox.data.QueryReadStore"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.data.QueryReadStore"] = true;
-dojo.provide("dojox.data.QueryReadStore");
-dojo.provide("dojox.data.QueryReadStore.InvalidItemError");
-dojo.provide("dojox.data.QueryReadStore.InvalidAttributeError");
-
-dojo.require("dojo.string");
-dojo.require("dojo.data.util.simpleFetch");
-
-dojo.declare("dojox.data.QueryReadStore", null, {
- /*
- // summary:
- // This class provides a store that is mainly intended to be used
- // for loading data dynamically from the server, used i.e. for
- // retreiving chunks of data from huge data stores on the server (by server-side filtering!).
- // Upon calling the fetch() method of this store the data are requested from
- // the server if they are not yet loaded for paging (or cached).
- //
- // For example used for a combobox which works on lots of data. It
- // can be used to retreive the data partially upon entering the
- // letters "ac" it returns only items like "action", "acting", etc.
- //
- // note:
- // The field name "id" in a query is reserved for looking up data
- // by id. This is necessary as before the first fetch, the store
- // has no way of knowing which field the server will declare as
- // identifier.
- //
- // examples:
- // // The parameter "query" contains the data that are sent to the server.
- // var store = new dojox.data.QueryReadStore({url:'/search.php'});
- // store.fetch({query:{name:'a'}, queryOptions:{ignoreCase:false}});
- //
- // // Since "serverQuery" is given, it overrules and those data are
- // // sent to the server.
- // var store = new dojox.data.QueryReadStore({url:'/search.php'});
- // store.fetch({serverQuery:{name:'a'}, queryOptions:{ignoreCase:false}});
- //
- // todo:
- // - there is a bug in the paging, when i set start:2, count:5 after an initial fetch() and doClientPaging:true
- // it returns 6 elemetns, though count=5, try it in QueryReadStore.html
- // - allow configuring if the paging shall takes place on the client or the server
- // - add optional caching
- // - when the first query searched for "a" and the next for a subset of
- // the first, i.e. "ab" then we actually dont need a server request, if
- // we have client paging, we just need to filter the items we already have
- // that might also be tooo much logic
- */
-
- url:"",
- requestMethod:"get",
- //useCache:false,
-
- // We use the name in the errors, once the name is fixed hardcode it, may be.
- _className:"dojox.data.QueryReadStore",
-
- // This will contain the items we have loaded from the server.
- // The contents of this array is optimized to satisfy all read-api requirements
- // and for using lesser storage, so the keys and their content need some explaination:
- // this._items[0].i - the item itself
- // this._items[0].r - a reference to the store, so we can identify the item
- // securly. We set this reference right after receiving the item from the
- // server.
- _items:[],
-
- // Store the last query that triggered xhr request to the server.
- // So we can compare if the request changed and if we shall reload
- // (this also depends on other factors, such as is caching used, etc).
- _lastServerQuery:null,
-
-
- // Store a hash of the last server request. Actually I introduced this
- // for testing, so I can check if no unnecessary requests were issued for
- // client-side-paging.
- lastRequestHash:null,
-
- // If this is false, every request is sent to the server.
- // If it's true a second request with the same query will not issue another
- // request, but use the already returned data. This assumes that the server
- // does not do the paging.
- doClientPaging:true,
-
- // Items by identify for Identify API
- _itemsByIdentity:null,
-
- // Identifier used
- _identifier:null,
-
- _features: {'dojo.data.api.Read':true, 'dojo.data.api.Identity':true},
-
- constructor: function(/* Object */ params){
- dojo.mixin(this,params);
- },
-
- getValue: function(/* item */ item, /* attribute-name-string */ attribute, /* value? */ defaultValue){
- // According to the Read API comments in getValue() and exception is
- // thrown when an item is not an item or the attribute not a string!
- this._assertIsItem(item);
- if (!dojo.isString(attribute)) {
- throw new Error(this._className+".getValue(): Invalid attribute, string expected!");
- }
- if(!this.hasAttribute(item, attribute)){
- // read api says: return defaultValue "only if *item* does not have a value for *attribute*."
- // Is this the case here? The attribute doesn't exist, but a defaultValue, sounds reasonable.
- if(defaultValue){
- return defaultValue;
- }
- console.log(this._className+".getValue(): Item does not have the attribute '"+attribute+"'.");
- }
- return item.i[attribute];
- },
-
- getValues: function(/* item */ item, /* attribute-name-string */ attribute){
- var ret = [];
- if(this.hasAttribute(item, attribute)){
- ret.push(item.i[attribute]);
- }
- return ret;
- },
-
- getAttributes: function(/* item */ item){
- this._assertIsItem(item);
- var ret = [];
- for(var i in item.i){
- ret.push(i);
- }
- return ret;
- },
-
- hasAttribute: function(/* item */ item, /* attribute-name-string */ attribute) {
- // summary:
- // See dojo.data.api.Read.hasAttribute()
- return this.isItem(item) && typeof item.i[attribute]!="undefined";
- },
-
- containsValue: function(/* item */ item, /* attribute-name-string */ attribute, /* anything */ value){
- var values = this.getValues(item, attribute);
- var len = values.length;
- for(var i=0; i<len; i++){
- if(values[i]==value){
- return true;
- }
- }
- return false;
- },
-
- isItem: function(/* anything */ something){
- // Some basic tests, that are quick and easy to do here.
- // >>> var store = new dojox.data.QueryReadStore({});
- // >>> store.isItem("");
- // false
- //
- // >>> var store = new dojox.data.QueryReadStore({});
- // >>> store.isItem({});
- // false
- //
- // >>> var store = new dojox.data.QueryReadStore({});
- // >>> store.isItem(0);
- // false
- //
- // >>> var store = new dojox.data.QueryReadStore({});
- // >>> store.isItem({name:"me", label:"me too"});
- // false
- //
- if(something){
- return typeof something.r!="undefined" && something.r==this;
- }
- return false;
- },
-
- isItemLoaded: function(/* anything */ something) {
- // Currently we dont have any state that tells if an item is loaded or not
- // if the item exists its also loaded.
- // This might change when we start working with refs inside items ...
- return this.isItem(something);
- },
-
- loadItem: function(/* object */ args){
- if(this.isItemLoaded(args.item)){
- return;
- }
- // Actually we have nothing to do here, or at least I dont know what to do here ...
- },
-
- fetch:function(/* Object? */ request){
- // summary:
- // See dojo.data.util.simpleFetch.fetch() this is just a copy and I adjusted
- // only the paging, since it happens on the server if doClientPaging is
- // false, thx to http://trac.dojotoolkit.org/ticket/4761 reporting this.
- // Would be nice to be able to use simpleFetch() to reduce copied code,
- // but i dont know how yet. Ideas please!
- request = request || {};
- if(!request.store){
- request.store = this;
- }
- var self = this;
-
- var _errorHandler = function(errorData, requestObject){
- if(requestObject.onError){
- var scope = requestObject.scope || dojo.global;
- requestObject.onError.call(scope, errorData, requestObject);
- }
- };
-
- var _fetchHandler = function(items, requestObject){
- var oldAbortFunction = requestObject.abort || null;
- var aborted = false;
-
- var startIndex = requestObject.start?requestObject.start:0;
- if (self.doClientPaging==false) {
- // For client paging we dont need no slicing of the result.
- startIndex = 0;
- }
- var endIndex = requestObject.count?(startIndex + requestObject.count):items.length;
-
- requestObject.abort = function(){
- aborted = true;
- if(oldAbortFunction){
- oldAbortFunction.call(requestObject);
- }
- };
-
- var scope = requestObject.scope || dojo.global;
- if(!requestObject.store){
- requestObject.store = self;
- }
- if(requestObject.onBegin){
- requestObject.onBegin.call(scope, items.length, requestObject);
- }
- if(requestObject.sort){
- items.sort(dojo.data.util.sorter.createSortFunction(requestObject.sort, self));
- }
- if(requestObject.onItem){
- for(var i = startIndex; (i < items.length) && (i < endIndex); ++i){
- var item = items[i];
- if(!aborted){
- requestObject.onItem.call(scope, item, requestObject);
- }
- }
- }
- if(requestObject.onComplete && !aborted){
- var subset = null;
- if (!requestObject.onItem) {
- subset = items.slice(startIndex, endIndex);
- }
- requestObject.onComplete.call(scope, subset, requestObject);
- }
- };
- this._fetchItems(request, _fetchHandler, _errorHandler);
- return request; // Object
- },
-
- getFeatures: function(){
- return this._features;
- },
-
- close: function(/*dojo.data.api.Request || keywordArgs || null */ request){
- // I have no idea if this is really needed ...
- },
-
- getLabel: function(/* item */ item){
- // Override it to return whatever the label shall be, see Read-API.
- return undefined;
- },
-
- getLabelAttributes: function(/* item */ item){
- return null;
- },
-
- _fetchItems: function(request, fetchHandler, errorHandler){
- // summary:
- // The request contains the data as defined in the Read-API.
- // Additionally there is following keyword "serverQuery".
- //
- // The *serverQuery* parameter, optional.
- // This parameter contains the data that will be sent to the server.
- // If this parameter is not given the parameter "query"'s
- // data are sent to the server. This is done for some reasons:
- // - to specify explicitly which data are sent to the server, they
- // might also be a mix of what is contained in "query", "queryOptions"
- // and the paging parameters "start" and "count" or may be even
- // completely different things.
- // - don't modify the request.query data, so the interface using this
- // store can rely on unmodified data, as the combobox dijit currently
- // does it, it compares if the query has changed
- // - request.query is required by the Read-API
- //
- // I.e. the following examples might be sent via GET:
- // fetch({query:{name:"abc"}, queryOptions:{ignoreCase:true}})
- // the URL will become: /url.php?name=abc
- //
- // fetch({serverQuery:{q:"abc", c:true}, query:{name:"abc"}, queryOptions:{ignoreCase:true}})
- // the URL will become: /url.php?q=abc&c=true
- // // The serverQuery-parameter has overruled the query-parameter
- // // but the query parameter stays untouched, but is not sent to the server!
- // // The serverQuery contains more data than the query, so they might differ!
- //
-
- var serverQuery = request.serverQuery || request.query || {};
- //Need to add start and count
- if(!this.doClientPaging){
- serverQuery.start = request.start || 0;
- // Count might not be sent if not given.
- if (request.count) {
- serverQuery.count = request.count;
- }
- }
- // Compare the last query and the current query by simply json-encoding them,
- // so we dont have to do any deep object compare ... is there some dojo.areObjectsEqual()???
- if(this.doClientPaging && this._lastServerQuery!==null &&
- dojo.toJson(serverQuery)==dojo.toJson(this._lastServerQuery)
- ){
- fetchHandler(this._items, request);
- }else{
- var xhrFunc = this.requestMethod.toLowerCase()=="post" ? dojo.xhrPost : dojo.xhrGet;
- var xhrHandler = xhrFunc({url:this.url, handleAs:"json-comment-optional", content:serverQuery});
- xhrHandler.addCallback(dojo.hitch(this, function(data){
- data=this._filterResponse(data);
- this._items = [];
- // Store a ref to "this" in each item, so we can simply check if an item
- // really origins form here (idea is from ItemFileReadStore, I just don't know
- // how efficient the real storage use, garbage collection effort, etc. is).
- dojo.forEach(data.items,function(e){
- this._items.push({i:e, r:this});
- },this);
-
- var identifier = data.identifier;
- this._itemsByIdentity = {};
- if(identifier){
- this._identifier = identifier;
- for(i = 0; i < this._items.length; ++i){
- var item = this._items[i].i;
- var identity = item[identifier];
- if(!this._itemsByIdentity[identity]){
- this._itemsByIdentity[identity] = item;
- }else{
- throw new Error("dojo.data.QueryReadStore: The json data as specified by: [" + this.url + "] is malformed. Items within the list have identifier: [" + identifier + "]. Value collided: [" + identity + "]");
- }
- }
- }else{
- this._identifier = Number;
- for(i = 0; i < this._items.length; ++i){
- this._items[i].n = i;
- }
- }
-
- // TODO actually we should do the same as dojo.data.ItemFileReadStore._getItemsFromLoadedData() to sanitize
- // (does it really sanititze them) and store the data optimal. should we? for security reasons???
- fetchHandler(this._items, request);
- }));
- xhrHandler.addErrback(function(error){
- errorHandler(error, request);
- });
- // Generate the hash using the time in milliseconds and a randon number.
- // Since Math.randon() returns something like: 0.23453463, we just remove the "0."
- // probably just for esthetic reasons :-).
- this.lastRequestHash = new Date().getTime()+"-"+String(Math.random()).substring(2);
- this._lastServerQuery = dojo.mixin({}, serverQuery);
- }
- },
-
- _filterResponse: function(data){
- // summary:
- // If the data from servers needs to be processed before it can be processed by this
- // store, then this function should be re-implemented in subclass. This default
- // implementation just return the data unchanged.
- // data:
- // The data received from server
- return data;
- },
-
- _assertIsItem: function(/* item */ item){
- // summary:
- // It throws an error if item is not valid, so you can call it in every method that needs to
- // throw an error when item is invalid.
- // item:
- // The item to test for being contained by the store.
- if(!this.isItem(item)){
- throw new dojox.data.QueryReadStore.InvalidItemError(this._className+": a function was passed an item argument that was not an item");
- }
- },
-
- _assertIsAttribute: function(/* attribute-name-string */ attribute){
- // summary:
- // This function tests whether the item passed in is indeed a valid 'attribute' like type for the store.
- // attribute:
- // The attribute to test for being contained by the store.
- if(typeof attribute !== "string"){
- throw new dojox.data.QueryReadStore.InvalidAttributeError(this._className+": '"+attribute+"' is not a valid attribute identifier.");
- }
- },
-
- fetchItemByIdentity: function(/* Object */ keywordArgs){
- // summary:
- // See dojo.data.api.Identity.fetchItemByIdentity()
-
- // See if we have already loaded the item with that id
- // In case there hasn't been a fetch yet, _itemsByIdentity is null
- // and thus a fetch will be triggered below.
- if(this._itemsByIdentity){
- var item = this._itemsByIdentity[keywordArgs.identity];
- if(!(item === undefined)){
- if(keywordArgs.onItem){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- keywordArgs.onItem.call(scope, {i:item, r:this});
- }
- return;
- }
- }
-
- // Otherwise we need to go remote
- // Set up error handler
- var _errorHandler = function(errorData, requestObject){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- if(keywordArgs.onError){
- keywordArgs.onError.call(scope, error);
- }
- };
-
- // Set up fetch handler
- var _fetchHandler = function(items, requestObject){
- var scope = keywordArgs.scope?keywordArgs.scope:dojo.global;
- try{
- // There is supposed to be only one result
- var item = null;
- if(items && items.length == 1){
- item = items[0];
- }
-
- // If no item was found, item is still null and we'll
- // fire the onItem event with the null here
- if(keywordArgs.onItem){
- keywordArgs.onItem.call(scope, item);
- }
- }catch(error){
- if(keywordArgs.onError){
- keywordArgs.onError.call(scope, error);
- }
- }
- };
-
- // Construct query
- var request = {serverQuery:{id:keywordArgs.identity}};
-
- // Dispatch query
- this._fetchItems(request, _fetchHandler, _errorHandler);
- },
-
- getIdentity: function(/* item */ item){
- // summary:
- // See dojo.data.api.Identity.getIdentity()
- var identifier = null;
- if(this._identifier === Number){
- identifier = item.n; // Number
- }else{
- identifier = item.i[this._identifier];
- }
- return identifier;
- },
-
- getIdentityAttributes: function(/* item */ item){
- // summary:
- // See dojo.data.api.Identity.getIdentityAttributes()
- return [this._identifier];
- }
-});
-
-dojo.declare("dojox.data.QueryReadStore.InvalidItemError", Error, {});
-dojo.declare("dojox.data.QueryReadStore.InvalidAttributeError", Error, {});
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-
-
+if(!dojo._hasResource["dojox.data.QueryReadStore"]){
+dojo._hasResource["dojox.data.QueryReadStore"]=true;
+dojo.provide("dojox.data.QueryReadStore");
+dojo.require("dojo.string");
+dojo.require("dojo.data.util.sorter");
+dojo.declare("dojox.data.QueryReadStore",null,{url:"",requestMethod:"get",_className:"dojox.data.QueryReadStore",_items:[],_lastServerQuery:null,_numRows:-1,lastRequestHash:null,doClientPaging:false,doClientSorting:false,_itemsByIdentity:null,_identifier:null,_features:{"dojo.data.api.Read":true,"dojo.data.api.Identity":true},_labelAttr:"label",constructor:function(_1){
+dojo.mixin(this,_1);
+},getValue:function(_2,_3,_4){
+this._assertIsItem(_2);
+if(!dojo.isString(_3)){
+throw new Error(this._className+".getValue(): Invalid attribute, string expected!");
+}
+if(!this.hasAttribute(_2,_3)){
+if(_4){
+return _4;
+}
+}
+return _2.i[_3];
+},getValues:function(_5,_6){
+this._assertIsItem(_5);
+var _7=[];
+if(this.hasAttribute(_5,_6)){
+_7.push(_5.i[_6]);
+}
+return _7;
+},getAttributes:function(_8){
+this._assertIsItem(_8);
+var _9=[];
+for(var i in _8.i){
+_9.push(i);
+}
+return _9;
+},hasAttribute:function(_a,_b){
+return this.isItem(_a)&&typeof _a.i[_b]!="undefined";
+},containsValue:function(_c,_d,_e){
+var _f=this.getValues(_c,_d);
+var len=_f.length;
+for(var i=0;i<len;i++){
+if(_f[i]==_e){
+return true;
+}
+}
+return false;
+},isItem:function(_10){
+if(_10){
+return typeof _10.r!="undefined"&&_10.r==this;
+}
+return false;
+},isItemLoaded:function(_11){
+return this.isItem(_11);
+},loadItem:function(_12){
+if(this.isItemLoaded(_12.item)){
+return;
+}
+},fetch:function(_13){
+_13=_13||{};
+if(!_13.store){
+_13.store=this;
+}
+var _14=this;
+var _15=function(_16,_17){
+if(_17.onError){
+var _18=_17.scope||dojo.global;
+_17.onError.call(_18,_16,_17);
+}
+};
+var _19=function(_1a,_1b,_1c){
+var _1d=_1b.abort||null;
+var _1e=false;
+var _1f=_1b.start?_1b.start:0;
+if(_14.doClientPaging==false){
+_1f=0;
+}
+var _20=_1b.count?(_1f+_1b.count):_1a.length;
+_1b.abort=function(){
+_1e=true;
+if(_1d){
+_1d.call(_1b);
+}
+};
+var _21=_1b.scope||dojo.global;
+if(!_1b.store){
+_1b.store=_14;
+}
+if(_1b.onBegin){
+_1b.onBegin.call(_21,_1c,_1b);
+}
+if(_1b.sort&&_14.doClientSorting){
+_1a.sort(dojo.data.util.sorter.createSortFunction(_1b.sort,_14));
+}
+if(_1b.onItem){
+for(var i=_1f;(i<_1a.length)&&(i<_20);++i){
+var _22=_1a[i];
+if(!_1e){
+_1b.onItem.call(_21,_22,_1b);
+}
+}
+}
+if(_1b.onComplete&&!_1e){
+var _23=null;
+if(!_1b.onItem){
+_23=_1a.slice(_1f,_20);
+}
+_1b.onComplete.call(_21,_23,_1b);
+}
+};
+this._fetchItems(_13,_19,_15);
+return _13;
+},getFeatures:function(){
+return this._features;
+},close:function(_24){
+},getLabel:function(_25){
+if(this._labelAttr&&this.isItem(_25)){
+return this.getValue(_25,this._labelAttr);
+}
+return undefined;
+},getLabelAttributes:function(_26){
+if(this._labelAttr){
+return [this._labelAttr];
}
+return null;
+},_xhrFetchHandler:function(_27,_28,_29,_2a){
+_27=this._filterResponse(_27);
+if(_27.label){
+this._labelAttr=_27.label;
+}
+var _2b=_27.numRows||-1;
+this._items=[];
+dojo.forEach(_27.items,function(e){
+this._items.push({i:e,r:this});
+},this);
+var _2c=_27.identifier;
+this._itemsByIdentity={};
+if(_2c){
+this._identifier=_2c;
+var i;
+for(i=0;i<this._items.length;++i){
+var _2d=this._items[i].i;
+var _2e=_2d[_2c];
+if(!this._itemsByIdentity[_2e]){
+this._itemsByIdentity[_2e]=_2d;
+}else{
+throw new Error(this._className+": The json data as specified by: ["+this.url+"] is malformed. Items within the list have identifier: ["+_2c+"]. Value collided: ["+_2e+"]");
+}
+}
+}else{
+this._identifier=Number;
+for(i=0;i<this._items.length;++i){
+this._items[i].n=i;
+}
+}
+_2b=this._numRows=(_2b===-1)?this._items.length:_2b;
+_29(this._items,_28,_2b);
+this._numRows=_2b;
+},_fetchItems:function(_2f,_30,_31){
+var _32=_2f.serverQuery||_2f.query||{};
+if(!this.doClientPaging){
+_32.start=_2f.start||0;
+if(_2f.count){
+_32.count=_2f.count;
+}
+}
+if(!this.doClientSorting){
+if(_2f.sort){
+var _33=_2f.sort[0];
+if(_33&&_33.attribute){
+var _34=_33.attribute;
+if(_33.descending){
+_34="-"+_34;
+}
+_32.sort=_34;
+}
+}
+}
+if(this.doClientPaging&&this._lastServerQuery!==null&&dojo.toJson(_32)==dojo.toJson(this._lastServerQuery)){
+this._numRows=(this._numRows===-1)?this._items.length:this._numRows;
+_30(this._items,_2f,this._numRows);
+}else{
+var _35=this.requestMethod.toLowerCase()=="post"?dojo.xhrPost:dojo.xhrGet;
+var _36=_35({url:this.url,handleAs:"json-comment-optional",content:_32});
+_36.addCallback(dojo.hitch(this,function(_37){
+this._xhrFetchHandler(_37,_2f,_30,_31);
+}));
+_36.addErrback(function(_38){
+_31(_38,_2f);
+});
+this.lastRequestHash=new Date().getTime()+"-"+String(Math.random()).substring(2);
+this._lastServerQuery=dojo.mixin({},_32);
+}
+},_filterResponse:function(_39){
+return _39;
+},_assertIsItem:function(_3a){
+if(!this.isItem(_3a)){
+throw new Error(this._className+": Invalid item argument.");
+}
+},_assertIsAttribute:function(_3b){
+if(typeof _3b!=="string"){
+throw new Error(this._className+": Invalid attribute argument ('"+_3b+"').");
+}
+},fetchItemByIdentity:function(_3c){
+if(this._itemsByIdentity){
+var _3d=this._itemsByIdentity[_3c.identity];
+if(!(_3d===undefined)){
+if(_3c.onItem){
+var _3e=_3c.scope?_3c.scope:dojo.global;
+_3c.onItem.call(_3e,{i:_3d,r:this});
+}
+return;
+}
+}
+var _3f=function(_40,_41){
+var _42=_3c.scope?_3c.scope:dojo.global;
+if(_3c.onError){
+_3c.onError.call(_42,_40);
+}
+};
+var _43=function(_44,_45){
+var _46=_3c.scope?_3c.scope:dojo.global;
+try{
+var _47=null;
+if(_44&&_44.length==1){
+_47=_44[0];
+}
+if(_3c.onItem){
+_3c.onItem.call(_46,_47);
+}
+}
+catch(error){
+if(_3c.onError){
+_3c.onError.call(_46,error);
+}
+}
+};
+var _48={serverQuery:{id:_3c.identity}};
+this._fetchItems(_48,_43,_3f);
+},getIdentity:function(_49){
+var _4a=null;
+if(this._identifier===Number){
+_4a=_49.n;
+}else{
+_4a=_49.i[this._identifier];
+}
+return _4a;
+},getIdentityAttributes:function(_4b){
+return [this._identifier];
+}});
+}
diff --git a/js/dojo/dojox/data/README b/js/dojo/dojox/data/README
--- a/js/dojo/dojox/data/README
+++ b/js/dojo/dojox/data/README
@@ -1,62 +1,127 @@
-------------------------------------------------------------------------------
DojoX Data
-------------------------------------------------------------------------------
-Version 1.0
-Release date: 05/29/2007
+Version 1.1
+Release date: 03/18/2008
-------------------------------------------------------------------------------
-Project state: stable
+Project state: production
-------------------------------------------------------------------------------
Project authors
- Jared Jurkiewicz (jared.jurkiewicz@gmail.com)
- Shane O'Sullivan (shaneosullivan1@gmail.com) (FlickrRestStore)
+ Jared Jurkiewicz (jared.jurkiewicz@gmail.com) (FileStore, HtmlStore, XmlStore, FlickrStore, CssRuleStore, CssClassStore, AppStore, others).
+ Shane O'Sullivan (shaneosullivan1@gmail.com) (FlickrRestStore, AtomReadStore, GoogleSeachStore, GoogleFeedStore)
Wolfram Kriesing (wolfram@kriesing.de) (QueryReadStore)
+ Dustin Machi (dmachi@dojotolkit.org) (jsonPathStore);
+ Russell Jones (KeyValueStore) (CLA)
+ Benjamin Schell (KeyValueStore, CssRuleStore, CssClassStore, AppStore, OpenSearchStore) (Corporate CLA)
+ Kurt Stutsman (kurt@snaplogic.org) (SnapLogicStore)
+ Kris Zyp (kzyp@dojotoolkit.org) (JsonRestStore, PersevereStore, S3JsonRestStore, CouchDBRestStore)
+ Frank Fortson (frank.fortson@equorum.com) (AndOrReadStore, AndOrWriteStore)
+
+
-------------------------------------------------------------------------------
Project description
The DojoX Data project is a container for extensions and extra example stores
that implement the dojo.data APIs. It may also contain utility functions for
working with specific types of data.
-------------------------------------------------------------------------------
Dependencies:
-DojoX Data has dependencies on core dojo (dojo.data) and the D.O.H. unit test
-framework.
+DojoX Data has dependencies on core dojo (dojo.data), dojox.xml for XmlStore
+and dojox.data.dom(deprecated) and the D.O.H. unit test framework
-------------------------------------------------------------------------------
Documentation:
See the Dojo API tool (http://dojotoolkit.org/api)
-------------------------------------------------------------------------------
+Contributions:
+
+For contributions to be committed into the dojox repository, the datastore
+should have basic unit tests that exercise the API's that the store declares it
+implements. Documentation and demos are a plus, but unit tests are required
+to be committed into this sub-package. This is necessary to help keep the
+provided datastores as stable as possible.
+
+-------------------------------------------------------------------------------
Installation instructions
Grab the following from the Dojo SVN Repository:
http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/data/*
Install into the following directory structure:
/dojox/data/
...which should be at the same level as your Dojo checkout.
/dojox/data/*
Require in the dojox.data stores you wish to use.
-------------------------------------------------------------------------------
Additional Notes:
+ dojox.data.AtomReadStore - Reads Atom XML documents.
+
dojox.data.CvsStore - comma-separated (spreadsheet output)
datastore implementation
dojox.data.FlickrRestStore - advanced version of: dojox.data.FlickrStore
(Caching + user key support)
dojox.data.FlickrStore - data store driven by Flickr.com public API.
dojox.data.HtmlTableStore - Implementation of an HTML Table reading
datastore
+ dojox.data.HtmlStore - Implementation of an HTML reading datastore. Can
+ handle tables, ordered and un-ordered lists, and lists of divs.
+
dojox.data.OpmlStore - Store for reading OMPL formatted data
dojox.data.XmlStore - datastore for XML based services or
documents.
dojox.data.QueryReadStore - datastore to provide serverside URL query
matching. Similar to the 0.4.X ComboBox dataUrl parameter.
+
+ dojox.data.jsonPathStore - datastore that takes an arbitrary js object
+ and uses it as the store. Pre-Alpha at the moment.
+
+ dojox.data.KeyValueStore - datastore that mimics a key/value property
+ file format.
+
+ dojox.data.SnapLogicStore - Store to interface to SnapLogic data services.
+
+ dojox.data.JsonRestStore - Store to interface with RESTful HTTP/JSON web services.
+ dojox.data.PersevereStore - Extension of JsonRestStore for Persevere
+ dojox.data.CouchDBRestStore - Extension of JsonRestStore for CouchDB
+ dojox.data.S3JsonRestStore - Extension of JsonRestStore for Amazon S3
+ dojox.data.GoogleSearchStore - Store to interface Google's AJAX search services.
+ There are many subclasses of this store for particular types of searches:
+ dojox.data.GoogleWebSearchStore
+ dojox.data.GoogleBlogSearchStore
+ dojox.data.GoogleLocalSearchStore
+ dojox.data.GoogleVideoSearchStore
+ dojox.data.GoogleNewsSearchStore
+ dojox.data.GoogleBookSearchStore
+ dojox.data.GoogleImageSearchStore
+
+ dojox.data.AndOrReadStore - Demonstrating a more complex query format allowing AND/OR.
+ Based directly on dojo.data.ItemFileReadStore.
+
+ dojox.data.AndOrWriteStore - Demonstrating a more complex query format allowing AND/OR.
+ Based directly on dojo.data.ItemFileWriteStore.
+
+ dojox.data.FileStore - A lazy-loading store designed for searching filesystems with a provided
+ PHP back end. Implements dojo.data.api.Read and dojo.data.api.Identity
+
+ dojox.data.CssRuleStore - A store that allows searching/querying over Css rules loaded in the page in
+ the browser.
+
+ dojox.data.CssClassStore - A store that allows searching/querying over what classes are defined in the page in
+ the browser.
+
+ dojox.data.AppStore - A store that implements full read, write, and identity APIs for working with ATOM documents.
+ The store uses the full APP protocol.
+
+ dojox.data.OpenSearchStore - A store that implements OpenSearch provider search capability.
+
diff --git a/js/dojo/dojox/data/XmlStore.js b/js/dojo/dojox/data/XmlStore.js
--- a/js/dojo/dojox/data/XmlStore.js
+++ b/js/dojo/dojox/data/XmlStore.js
@@ -1,1126 +1,934 @@
-if(!dojo._hasResource["dojox.data.XmlStore"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.data.XmlStore"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.data.XmlStore"]){
+dojo._hasResource["dojox.data.XmlStore"]=true;
dojo.provide("dojox.data.XmlStore");
dojo.provide("dojox.data.XmlItem");
-
dojo.require("dojo.data.util.simpleFetch");
dojo.require("dojo.data.util.filter");
-dojo.require("dojox.data.dom");
-
-dojo.declare("dojox.data.XmlStore", null, {
- // summary:
- // A data store for XML based services or documents
- // description:
- // A data store for XML based services or documents
-
- constructor: function(/* object */ args) {
- // summary:
- // Constructor for the XML store.
- // args:
- // An anonymous object to initialize properties. It expects the following values:
- // url: The url to a service or an XML document that represents the store
- // rootItem: A tag name for root items
- // keyAttribute: An attribute name for a key or an indentify
- // attributeMap: An anonymous object contains properties for attribute mapping,
- // {"tag_name.item_attribute_name": "@xml_attribute_name", ...}
- // sendQuery: A boolean indicate to add a query string to the service URL
- console.log("XmlStore()");
- if(args){
- this._url = args.url;
- this._rootItem = (args.rootItem || args.rootitem);
- this._keyAttribute = (args.keyAttribute || args.keyattribute);
- this._attributeMap = (args.attributeMap || args.attributemap);
- this._labelAttr = args.label;
- this._sendQuery = (args.sendQuery || args.sendquery);
- }
- this._newItems = [];
- this._deletedItems = [];
- this._modifiedItems = [];
- },
-
-/* dojo.data.api.Read */
-
- getValue: function(/* item */ item, /* attribute || attribute-name-string */ attribute, /* value? */ defaultValue){
- // summary:
- // Return an attribute value
- // description:
- // 'item' must be an instance of a dojox.data.XmlItem from the store instance.
- // If 'attribute' specifies "tagName", the tag name of the element is
- // returned.
- // If 'attribute' specifies "childNodes", the first element child is
- // returned.
- // If 'attribute' specifies "text()", the value of the first text
- // child is returned.
- // For generic attributes, if '_attributeMap' is specified,
- // an actual attribute name is looked up with the tag name of
- // the element and 'attribute' (concatenated with '.').
- // Then, if 'attribute' starts with "@", the value of the XML
- // attribute is returned.
- // Otherwise, the first child element of the tag name specified with
- // 'attribute' is returned.
- // item:
- // An XML element that holds the attribute
- // attribute:
- // A tag name of a child element, An XML attribute name or one of
- // special names
- // defaultValue:
- // A default value
- // returns:
- // An attribute value found, otherwise 'defaultValue'
- var element = item.element;
- if(attribute === "tagName"){
- return element.nodeName;
- }else if (attribute === "childNodes"){
- for (var i = 0; i < element.childNodes.length; i++) {
- var node = element.childNodes[i];
- if (node.nodeType === 1 /*ELEMENT_NODE*/) {
- return this._getItem(node); //object
- }
- }
- return defaultValue;
- }else if(attribute === "text()"){
- for(var i = 0; i < element.childNodes.length; i++){
- var node = element.childNodes[i];
- if(node.nodeType === 3 /*TEXT_NODE*/ ||
- node.nodeType === 4 /*CDATA_SECTION_NODE*/){
- return node.nodeValue; //string
- }
- }
- return defaultValue;
- }else{
- attribute = this._getAttribute(element.nodeName, attribute);
- if(attribute.charAt(0) === '@'){
- var name = attribute.substring(1);
- var value = element.getAttribute(name);
- return (value !== undefined) ? value : defaultValue; //object
- }else{
- for(var i = 0; i < element.childNodes.length; i++){
- var node = element.childNodes[i];
- if( node.nodeType === 1 /*ELEMENT_NODE*/ &&
- node.nodeName === attribute){
- return this._getItem(node); //object
- }
- }
- return defaultValue; //object
- }
- }
- },
-
- getValues: function(/* item */ item, /* attribute || attribute-name-string */ attribute){
- // summary:
- // Return an array of attribute values
- // description:
- // 'item' must be an instance of a dojox.data.XmlItem from the store instance.
- // If 'attribute' specifies "tagName", the tag name of the element is
- // returned.
- // If 'attribute' specifies "childNodes", child elements are returned.
- // If 'attribute' specifies "text()", the values of child text nodes
- // are returned.
- // For generic attributes, if '_attributeMap' is specified,
- // an actual attribute name is looked up with the tag name of
- // the element and 'attribute' (concatenated with '.').
- // Then, if 'attribute' starts with "@", the value of the XML
- // attribute is returned.
- // Otherwise, child elements of the tag name specified with
- // 'attribute' are returned.
- // item:
- // An XML element that holds the attribute
- // attribute:
- // A tag name of child elements, An XML attribute name or one of
- // special names
- // returns:
- // An array of attribute values found, otherwise an empty array
- var element = item.element;
- if(attribute === "tagName"){
- return [element.nodeName];
- }else if(attribute === "childNodes"){
- var values = [];
- for(var i = 0; i < element.childNodes.length; i++){
- var node = element.childNodes[i];
- if(node.nodeType === 1 /*ELEMENT_NODE*/){
- values.push(this._getItem(node));
- }
- }
- return values; //array
- }else if(attribute === "text()"){
- var values = [];
- for(var i = 0; i < element.childNodes.length; i++){
- var node = childNodes[i];
- if(node.nodeType === 3){
- values.push(node.nodeValue);
- }
- }
- return values; //array
- }else{
- attribute = this._getAttribute(element.nodeName, attribute);
- if(attribute.charAt(0) === '@'){
- var name = attribute.substring(1);
- var value = element.getAttribute(name);
- return (value !== undefined) ? [value] : []; //array
- }else{
- var values = [];
- for(var i = 0; i < element.childNodes.length; i++){
- var node = element.childNodes[i];
- if( node.nodeType === 1 /*ELEMENT_NODE*/ &&
- node.nodeName === attribute){
- values.push(this._getItem(node));
- }
- }
- return values; //array
- }
- }
- },
-
- getAttributes: function(/* item */ item) {
- // summary:
- // Return an array of attribute names
- // description:
- // 'item' must be an instance of a dojox.data.XmlItem from the store instance.
- // tag names of child elements and XML attribute names of attributes
- // specified to the element are returned along with special attribute
- // names applicable to the element including "tagName", "childNodes"
- // if the element has child elements, "text()" if the element has
- // child text nodes, and attribute names in '_attributeMap' that match
- // the tag name of the element.
- // item:
- // An XML element
- // returns:
- // An array of attributes found
- var element = item.element;
- var attributes = [];
- attributes.push("tagName");
- if(element.childNodes.length > 0){
- var names = {};
- var childNodes = true;
- var text = false;
- for(var i = 0; i < element.childNodes.length; i++){
- var node = element.childNodes[i];
- if (node.nodeType === 1 /*ELEMENT_NODE*/) {
- var name = node.nodeName;
- if(!names[name]){
- attributes.push(name);
- names[name] = name;
- }
- childNodes = true;
- }else if(node.nodeType === 3){
- text = true;
- }
- }
- if(childNodes){
- attributes.push("childNodes");
- }
- if(text){
- attributes.push("text()");
- }
- }
- for(var i = 0; i < element.attributes.length; i++){
- attributes.push("@" + element.attributes[i].nodeName);
- }
- if(this._attributeMap){
- for (var key in this._attributeMap){
- var i = key.indexOf('.');
- if(i > 0){
- var tagName = key.substring(0, i);
- if (tagName === element.nodeName){
- attributes.push(key.substring(i + 1));
- }
- }else{ // global attribute
- attributes.push(key);
- }
- }
- }
- return attributes; //array
- },
-
- hasAttribute: function(/* item */ item, /* attribute || attribute-name-string */ attribute){
- // summary:
- // Check whether an element has the attribute
- // item:
- // 'item' must be an instance of a dojox.data.XmlItem from the store instance.
- // attribute:
- // A tag name of a child element, An XML attribute name or one of
- // special names
- // returns:
- // True if the element has the attribute, otherwise false
- return (this.getValue(item, attribute) !== undefined); //boolean
- },
-
- containsValue: function(/* item */ item, /* attribute || attribute-name-string */ attribute, /* anything */ value){
- // summary:
- // Check whether the attribute values contain the value
- // item:
- // 'item' must be an instance of a dojox.data.XmlItem from the store instance.
- // attribute:
- // A tag name of a child element, An XML attribute name or one of
- // special names
- // returns:
- // True if the attribute values contain the value, otherwise false
- var values = this.getValues(item, attribute);
- for(var i = 0; i < values.length; i++){
- if((typeof value === "string")){
- if(values[i].toString && values[i].toString() === value){
- return true;
- }
- }else if (values[i] === value){
- return true; //boolean
- }
- }
- return false;//boolean
- },
-
- isItem: function(/* anything */ something){
- // summary:
- // Check whether the object is an item (XML element)
- // item:
- // An object to check
- // returns:
- // True if the object is an XML element, otherwise false
- if(something && something.element && something.store && something.store === this){
- return true; //boolean
- }
- return false; //boolran
- },
-
- isItemLoaded: function(/* anything */ something){
- // summary:
- // Check whether the object is an item (XML element) and loaded
- // item:
- // An object to check
- // returns:
- // True if the object is an XML element, otherwise false
- return this.isItem(something); //boolean
- },
-
- loadItem: function(/* object */ keywordArgs){
- // summary:
- // Load an item (XML element)
- // keywordArgs:
- // object containing the args for loadItem. See dojo.data.api.Read.loadItem()
- },
-
- getFeatures: function() {
- // summary:
- // Return supported data APIs
- // returns:
- // "dojo.data.api.Read" and "dojo.data.api.Write"
- var features = {
- "dojo.data.api.Read": true,
- "dojo.data.api.Write": true
- };
- return features; //array
- },
-
- getLabel: function(/* item */ item){
- // summary:
- // See dojo.data.api.Read.getLabel()
- if(this._labelAttr && this.isItem(item)){
- var label = this.getValue(item,this._labelAttr);
- if(label){
- return label.toString();
- }
- }
- return undefined; //undefined
- },
-
- getLabelAttributes: function(/* item */ item){
- // summary:
- // See dojo.data.api.Read.getLabelAttributes()
- if(this._labelAttr){
- return [this._labelAttr]; //array
- }
- return null; //null
- },
-
- _fetchItems: function(request, fetchHandler, errorHandler) {
- // summary:
- // Fetch items (XML elements) that match to a query
- // description:
- // If '_sendQuery' is true, an XML document is loaded from
- // '_url' with a query string.
- // Otherwise, an XML document is loaded and list XML elements that
- // match to a query (set of element names and their text attribute
- // values that the items to contain).
- // A wildcard, "*" can be used to query values to match all
- // occurrences.
- // If '_rootItem' is specified, it is used to fetch items.
- // request:
- // A request object
- // fetchHandler:
- // A function to call for fetched items
- // errorHandler:
- // A function to call on error
- var url = this._getFetchUrl(request);
- console.log("XmlStore._fetchItems(): url=" + url);
- if(!url){
- errorHandler(new Error("No URL specified."));
- return;
- }
- var localRequest = (!this._sendQuery ? request : null); // use request for _getItems()
-
- var self = this;
- var getArgs = {
- url: url,
- handleAs: "xml",
- preventCache: true
- };
- var getHandler = dojo.xhrGet(getArgs);
- getHandler.addCallback(function(data){
- var items = self._getItems(data, localRequest);
- console.log("XmlStore._fetchItems(): length=" + (items ? items.length : 0));
- if (items && items.length > 0) {
- fetchHandler(items, request);
- }
- else {
- fetchHandler([], request);
- }
- });
- getHandler.addErrback(function(data){
- errorHandler(data, request);
- });
- },
-
- _getFetchUrl: function(request){
- // summary:
- // Generate a URL for fetch
- // description:
- // This default implementation generates a query string in the form of
- // "?name1=value1&name2=value2..." off properties of 'query' object
- // specified in 'request' and appends it to '_url', if '_sendQuery'
- // is set to false.
- // Otherwise, '_url' is returned as is.
- // Sub-classes may override this method for the custom URL generation.
- // request:
- // A request object
- // returns:
- // A fetch URL
- if(!this._sendQuery){
- return this._url;
- }
- var query = request.query;
- if(!query){
- return this._url;
- }
- if(dojo.isString(query)){
- return this._url + query;
- }
- var queryString = "";
- for(var name in query){
- var value = query[name];
- if(value){
- if(queryString){
- queryString += "&";
- }
- queryString += (name + "=" + value);
- }
- }
- if(!queryString){
- return this._url;
- }
- //Check to see if the URL already has query params or not.
- var fullUrl = this._url;
- if(fullUrl.indexOf("?") < 0){
- fullUrl += "?";
- }else{
- fullUrl += "&";
- }
- return fullUrl + queryString;
- },
-
- _getItems: function(document, request) {
- // summary:
- // Fetch items (XML elements) in an XML document based on a request
- // description:
- // This default implementation walks through child elements of
- // the document element to see if all properties of 'query' object
- // match corresponding attributes of the element (item).
- // If 'request' is not specified, all child elements are returned.
- // Sub-classes may override this method for the custom search in
- // an XML document.
- // document:
- // An XML document
- // request:
- // A request object
- // returns:
- // An array of items
- var query = null;
- if(request){
- query = request.query;
- }
- var items = [];
- var nodes = null;
- if(this._rootItem){
- nodes = document.getElementsByTagName(this._rootItem);
- }
- else{
- nodes = document.documentElement.childNodes;
- }
- for(var i = 0; i < nodes.length; i++){
- var node = nodes[i];
- if(node.nodeType != 1 /*ELEMENT_NODE*/){
- continue;
- }
- var item = this._getItem(node);
- if(query){
- var found = true;
- var ignoreCase = request.queryOptions ? request.queryOptions.ignoreCase : false;
-
- //See if there are any string values that can be regexp parsed first to avoid multiple regexp gens on the
- //same value for each item examined. Much more efficient.
- var regexpList = {};
- for(var key in query){
- var value = query[key];
- if(typeof value === "string"){
- regexpList[key] = dojo.data.util.filter.patternToRegExp(value, ignoreCase);
- }
- }
-
- for(var attribute in query){
- var value = this.getValue(item, attribute);
- if(value){
- var queryValue = query[attribute];
- if ((typeof value) === "string" &&
- (regexpList[attribute])){
- if((value.match(regexpList[attribute])) !== null){
- continue;
- }
- }else if((typeof value) === "object"){
- if( value.toString &&
- (regexpList[attribute])){
- var stringValue = value.toString();
- if((stringValue.match(regexpList[attribute])) !== null){
- continue;
- }
- }else{
- if(queryValue === "*" || queryValue === value){
- continue;
- }
- }
- }
- }
- found = false;
- break;
- }
- if(!found){
- continue;
- }
- }
- items.push(item);
- }
- dojo.forEach(items,function(item){
- item.element.parentNode.removeChild(item.element); // make it root
- },this);
- return items;
- },
-
- close: function(/*dojo.data.api.Request || keywordArgs || null */ request){
- // summary:
- // See dojo.data.api.Read.close()
- },
-
-/* dojo.data.api.Write */
-
- newItem: function(/* object? */ keywordArgs){
- // summary:
- // Return a new dojox.data.XmlItem
- // description:
- // At least, 'keywordArgs' must contain "tagName" to be used for
- // the new element.
- // Other attributes in 'keywordArgs' are set to the new element,
- // including "text()", but excluding "childNodes".
- // keywordArgs:
- // An object containing initial attributes
- // returns:
- // An XML element
- console.log("XmlStore.newItem()");
- keywordArgs = (keywordArgs || {});
- var tagName = keywordArgs.tagName;
- if(!tagName){
- tagName = this._rootItem;
- if(!tagName){
- return null;
- }
- }
-
- var document = this._getDocument();
- var element = document.createElement(tagName);
- for(var attribute in keywordArgs){
- if(attribute === "tagName"){
- continue;
- }else if(attribute === "text()"){
- var text = document.createTextNode(keywordArgs[attribute]);
- element.appendChild(text);
- }else{
- attribute = this._getAttribute(tagName, attribute);
- if(attribute.charAt(0) === '@'){
- var name = attribute.substring(1);
- element.setAttribute(name, keywordArgs[attribute]);
- }else{
- var child = document.createElement(attribute);
- var text = document.createTextNode(keywordArgs[attribute]);
- child.appendChild(text);
- element.appendChild(child);
- }
- }
- }
-
- var item = this._getItem(element);
- this._newItems.push(item);
- return item; //object
- },
-
- deleteItem: function(/* item */ item){
- // summary:
- // Delete an dojox.data.XmlItem (wrapper to a XML element).
- // item:
- // An XML element to delete
- // returns:
- // True
- console.log("XmlStore.deleteItem()");
- var element = item.element;
- if(element.parentNode){
- this._backupItem(item);
- element.parentNode.removeChild(element);
- return true;
- }
- this._forgetItem(item);
- this._deletedItems.push(item);
- return true; //boolean
- },
-
- setValue: function(/* item */ item, /* attribute || string */ attribute, /* almost anything */ value){
- // summary:
- // Set an attribute value
- // description:
- // 'item' must be an instance of a dojox.data.XmlItem from the store instance.
- // If 'attribute' specifies "tagName", nothing is set and false is
- // returned.
- // If 'attribute' specifies "childNodes", the value (XML element) is
- // added to the element.
- // If 'attribute' specifies "text()", a text node is created with
- // the value and set it to the element as a child.
- // For generic attributes, if '_attributeMap' is specified,
- // an actual attribute name is looked up with the tag name of
- // the element and 'attribute' (concatenated with '.').
- // Then, if 'attribute' starts with "@", the value is set to the XML
- // attribute.
- // Otherwise, a text node is created with the value and set it to
- // the first child element of the tag name specified with 'attribute'.
- // If the child element does not exist, it is created.
- // item:
- // An XML element that holds the attribute
- // attribute:
- // A tag name of a child element, An XML attribute name or one of
- // special names
- // value:
- // A attribute value to set
- // returns:
- // False for "tagName", otherwise true
- if(attribute === "tagName"){
- return false; //boolean
- }
-
- this._backupItem(item);
-
- var element = item.element;
- if(attribute === "childNodes"){
- var child = value.element;
- element.appendChild(child);
- }else if(attribute === "text()"){
- while (element.firstChild){
- element.removeChild(element.firstChild);
- }
- var text = this._getDocument(element).createTextNode(value);
- element.appendChild(text);
- }else{
- attribute = this._getAttribute(element.nodeName, attribute);
- if(attribute.charAt(0) === '@'){
- var name = attribute.substring(1);
- element.setAttribute(name, value);
- }else{
- var child = null;
- for(var i = 0; i < element.childNodes.length; i++){
- var node = element.childNodes[i];
- if( node.nodeType === 1 /*ELEMENT_NODE*/&&
- node.nodeName === attribute){
- child = node;
- break;
- }
- }
- var document = this._getDocument(element);
- if(child){
- while(child.firstChild){
- child.removeChild(child.firstChild);
- }
- }else{
- child = document.createElement(attribute);
- element.appendChild(child);
- }
- var text = document.createTextNode(value);
- child.appendChild(text);
- }
- }
- return true; //boolean
- },
-
- setValues: function(/* item */ item, /* attribute || string */ attribute, /* array */ values){
- // summary:
- // Set attribute values
- // description:
- // 'item' must be an instance of a dojox.data.XmlItem from the store instance.
- // If 'attribute' specifies "tagName", nothing is set and false is
- // returned.
- // If 'attribute' specifies "childNodes", the value (array of XML
- // elements) is set to the element's childNodes.
- // If 'attribute' specifies "text()", a text node is created with
- // the values and set it to the element as a child.
- // For generic attributes, if '_attributeMap' is specified,
- // an actual attribute name is looked up with the tag name of
- // the element and 'attribute' (concatenated with '.').
- // Then, if 'attribute' starts with "@", the first value is set to
- // the XML attribute.
- // Otherwise, child elements of the tag name specified with
- // 'attribute' are replaced with new child elements and their
- // child text nodes of values.
- // item:
- // An XML element that holds the attribute
- // attribute:
- // A tag name of child elements, an XML attribute name or one of
- // special names
- // value:
- // A attribute value to set
- // returns:
- // False for "tagName", otherwise true
- if(attribute === "tagName"){
- return false; //boolean
- }
-
- this._backupItem(item);
-
- var element = item.element;
- if(attribute === "childNodes"){
- while(element.firstChild){
- element.removeChild(element.firstChild);
- }
- for(var i = 0; i < values.length; i++){
- var child = values[i].element;
- element.appendChild(child);
- }
- }else if(attribute === "text()"){
- while (element.firstChild){
- element.removeChild(element.firstChild);
- }
- var value = "";
- for(var i = 0; i < values.length; i++){
- value += values[i];
- }
- var text = this._getDocument(element).createTextNode(value);
- element.appendChild(text);
- }else{
- attribute = this._getAttribute(element.nodeName, attribute);
- if(attribute.charAt(0) === '@'){
- var name = attribute.substring(1);
- element.setAttribute(name, values[0]);
- }else{
- for(var i = element.childNodes.length - 1; i >= 0; i--){
- var node = element.childNodes[i];
- if( node.nodeType === 1 /*ELEMENT_NODE*/ &&
- node.nodeName === attribute){
- element.removeChild(node);
- }
- }
- var document = this._getDocument(element);
- for(var i = 0; i < values.length; i++){
- var child = document.createElement(attribute);
- var text = document.createTextNode(values[i]);
- child.appendChild(text);
- element.appendChild(child);
- }
- }
- }
- return true; //boolean
- },
-
- unsetAttribute: function(/* item */ item, /* attribute || string */ attribute){
- // summary:
- // Remove an attribute
- // description:
- // 'item' must be an instance of a dojox.data.XmlItem from the store instance.
- // 'attribute' can be an XML attribute name of the element or one of
- // special names described below.
- // If 'attribute' specifies "tagName", nothing is removed and false is
- // returned.
- // If 'attribute' specifies "childNodes" or "text()", all child nodes
- // are removed.
- // For generic attributes, if '_attributeMap' is specified,
- // an actual attribute name is looked up with the tag name of
- // the element and 'attribute' (concatenated with '.').
- // Then, if 'attribute' starts with "@", the XML attribute is removed.
- // Otherwise, child elements of the tag name specified with
- // 'attribute' are removed.
- // item:
- // An XML element that holds the attribute
- // attribute:
- // A tag name of child elements, an XML attribute name or one of
- // special names
- // returns:
- // False for "tagName", otherwise true
- if(attribute === "tagName"){
- return false; //boolean
- }
-
- this._backupItem(item);
-
- var element = item.element;
- if(attribute === "childNodes" || attribute === "text()"){
- while(element.firstChild){
- element.removeChild(element.firstChild);
- }
- }else{
- attribute = this._getAttribute(element.nodeName, attribute);
- if(attribute.charAt(0) === '@'){
- var name = attribute.substring(1);
- element.removeAttribute(name);
- }else{
- for(var i = element.childNodes.length - 1; i >= 0; i--){
- var node = element.childNodes[i];
- if( node.nodeType === 1 /*ELEMENT_NODE*/ &&
- node.nodeName === attribute){
- element.removeChild(node);
- }
- }
- }
- }
- return true; //boolean
- },
-
- save: function(/* object */ keywordArgs){
- // summary:
- // Save new and/or modified items (XML elements)
- // description:
- // '_url' is used to save XML documents for new, modified and/or
- // deleted XML elements.
- // keywordArgs:
- // An object for callbacks
- if(!keywordArgs){
- keywordArgs = {};
- }
- for(var i = 0; i < this._modifiedItems.length; i++){
- this._saveItem(this._modifiedItems[i], keywordArgs, "PUT");
- }
- for(var i = 0; i < this._newItems.length; i++){
- var item = this._newItems[i];
- if(item.element.parentNode){ // reparented
- this._newItems.splice(i, 1);
- i--;
- continue;
- }
- this._saveItem(this._newItems[i], keywordArgs, "POST");
- }
- for(var i = 0; i < this._deletedItems.length; i++){
- this._saveItem(this._deletedItems[i], keywordArgs, "DELETE");
- }
- },
-
- revert: function(){
- // summary:
- // Invalidate changes (new and/or modified elements)
- // returns:
- // True
- console.log("XmlStore.revert() _newItems=" + this._newItems.length);
- console.log("XmlStore.revert() _deletedItems=" + this._deletedItems.length);
- console.log("XmlStore.revert() _modifiedItems=" + this._modifiedItems.length);
- this._newItems = [];
- this._restoreItems(this._deletedItems);
- this._deletedItems = [];
- this._restoreItems(this._modifiedItems);
- this._modifiedItems = [];
- return true; //boolean
- },
-
- isDirty: function(/* item? */ item){
- // summary:
- // Check whether an item is new, modified or deleted
- // description:
- // If 'item' is specified, true is returned if the item is new,
- // modified or deleted.
- // Otherwise, true is returned if there are any new, modified
- // or deleted items.
- // item:
- // An item (XML element) to check
- // returns:
- // True if an item or items are new, modified or deleted, otherwise
- // false
- if (item) {
- var element = this._getRootElement(item.element);
- return (this._getItemIndex(this._newItems, element) >= 0 ||
- this._getItemIndex(this._deletedItems, element) >= 0 ||
- this._getItemIndex(this._modifiedItems, element) >= 0); //boolean
- }
- else {
- return (this._newItems.length > 0 ||
- this._deletedItems.length > 0 ||
- this._modifiedItems.length > 0); //boolean
- }
- },
-
- _saveItem: function(item, keywordArgs, method){
- if(method === "PUT"){
- url = this._getPutUrl(item);
- }else if(method === "DELETE"){
- url = this._getDeleteUrl(item);
- }else{ // POST
- url = this._getPostUrl(item);
- }
- if(!url){
- if(keywordArgs.onError){
- keywordArgs.onError.call(scope, new Error("No URL for saving content: " + postContent));
- }
- return;
- }
-
- var saveArgs = {
- url: url,
- method: (method || "POST"),
- contentType: "text/xml",
- handleAs: "xml"
- };
- var saveHander;
- if(method === "PUT"){
- saveArgs.putData = this._getPutContent(item);
- saveHandler = dojo.rawXhrPut(saveArgs);
- }else if(method === "DELETE"){
- saveHandler = dojo.xhrDelete(saveArgs);
- }else{ // POST
- saveArgs.postData = this._getPostContent(item);
- saveHandler = dojo.rawXhrPost(saveArgs);
- }
- var scope = (keywordArgs.scope || dojo.global);
- var self = this;
- saveHandler.addCallback(function(data){
- self._forgetItem(item);
- if(keywordArgs.onComplete){
- keywordArgs.onComplete.call(scope);
- }
- });
- saveHandler.addErrback(function(error){
- if(keywordArgs.onError){
- keywordArgs.onError.call(scope, error);
- }
- });
- },
-
- _getPostUrl: function(item){
- // summary:
- // Generate a URL for post
- // description:
- // This default implementation just returns '_url'.
- // Sub-classes may override this method for the custom URL.
- // item:
- // An item to save
- // returns:
- // A post URL
- return this._url; //string
- },
-
- _getPutUrl: function(item){
- // summary:
- // Generate a URL for put
- // description:
- // This default implementation just returns '_url'.
- // Sub-classes may override this method for the custom URL.
- // item:
- // An item to save
- // returns:
- // A put URL
- return this._url; //string
- },
-
- _getDeleteUrl: function(item){
- // summary:
- // Generate a URL for delete
- // description:
- // This default implementation returns '_url' with '_keyAttribute'
- // as a query string.
- // Sub-classes may override this method for the custom URL based on
- // changes (new, deleted, or modified).
- // item:
- // An item to delete
- // returns:
- // A delete URL
- if (!this._url) {
- return this._url; //string
- }
- var url = this._url;
- if (item && this._keyAttribute) {
- var value = this.getValue(item, this._keyAttribute);
- if (value) {
- url = url + '?' + this._keyAttribute + '=' + value;
- }
- }
- return url; //string
- },
-
- _getPostContent: function(item){
- // summary:
- // Generate a content to post
- // description:
- // This default implementation generates an XML document for one
- // (the first only) new or modified element.
- // Sub-classes may override this method for the custom post content
- // generation.
- // item:
- // An item to save
- // returns:
- // A post content
- var element = item.element;
- var declaration = "<?xml version=\"1.0\"?>"; // FIXME: encoding?
- return declaration + dojox.data.dom.innerXML(element); //XML string
- },
-
- _getPutContent: function(item){
- // summary:
- // Generate a content to put
- // description:
- // This default implementation generates an XML document for one
- // (the first only) new or modified element.
- // Sub-classes may override this method for the custom put content
- // generation.
- // item:
- // An item to save
- // returns:
- // A post content
- var element = item.element;
- var declaration = "<?xml version=\"1.0\"?>"; // FIXME: encoding?
- return declaration + dojox.data.dom.innerXML(element); //XML string
- },
-
-/* internal API */
-
- _getAttribute: function(tagName, attribute){
- if(this._attributeMap){
- var key = tagName + "." + attribute;
- var value = this._attributeMap[key];
- if(value){
- attribute = value;
- }else{ // look for global attribute
- value = this._attributeMap[attribute];
- if(value){
- attribute = value;
- }
- }
- }
- return attribute; //object
- },
-
- _getItem: function(element){
- return new dojox.data.XmlItem(element, this); //object
- },
-
- _getItemIndex: function(items, element){
- for(var i = 0; i < items.length; i++){
- if(items[i].element === element){
- return i; //int
- }
- }
- return -1; //int
- },
-
- _backupItem: function(item){
- var element = this._getRootElement(item.element);
- if( this._getItemIndex(this._newItems, element) >= 0 ||
- this._getItemIndex(this._modifiedItems, element) >= 0){
- return; // new or already modified
- }
- if(element != item.element){
- item = this._getItem(element);
- }
- item._backup = element.cloneNode(true);
- this._modifiedItems.push(item);
- },
-
- _restoreItems: function(items){
-
- dojo.forEach(items,function(item){
- if(item._backup){
- item.element = item._backup;
- item._backup = null;
- }
- },this);
- },
-
- _forgetItem: function(item){
- var element = item.element;
- var index = this._getItemIndex(this._newItems, element);
- if(index >= 0){
- this._newItems.splice(index, 1);
- }
- index = this._getItemIndex(this._deletedItems, element);
- if(index >= 0){
- this._deletedItems.splice(index, 1);
- }
- index = this._getItemIndex(this._modifiedItems, element);
- if(index >= 0){
- this._modifiedItems.splice(index, 1);
- }
- },
-
- _getDocument: function(element){
- if(element){
- return element.ownerDocument; //DOMDocument
- }else if(!this._document){
- return dojox.data.dom.createDocument(); // DOMDocument
- }
- },
-
- _getRootElement: function(element){
- while(element.parentNode){
- element = element.parentNode;
- }
- return element; //DOMElement
- }
-
+dojo.require("dojox.xml.parser");
+dojo.declare("dojox.data.XmlStore",null,{constructor:function(_1){
+if(_1){
+this.url=_1.url;
+this.rootItem=(_1.rootItem||_1.rootitem||this.rootItem);
+this.keyAttribute=(_1.keyAttribute||_1.keyattribute||this.keyAttribute);
+this._attributeMap=(_1.attributeMap||_1.attributemap);
+this.label=_1.label||this.label;
+this.sendQuery=(_1.sendQuery||_1.sendquery||this.sendQuery);
+if("urlPreventCache" in _1){
+this.urlPreventCache=_1.urlPreventCache?true:false;
+}
+}
+this._newItems=[];
+this._deletedItems=[];
+this._modifiedItems=[];
+},url:"",rootItem:"",keyAttribute:"",label:"",sendQuery:false,attributeMap:null,urlPreventCache:true,getValue:function(_2,_3,_4){
+var _5=_2.element;
+var i;
+var _6;
+if(_3==="tagName"){
+return _5.nodeName;
+}else{
+if(_3==="childNodes"){
+for(i=0;i<_5.childNodes.length;i++){
+_6=_5.childNodes[i];
+if(_6.nodeType===1){
+return this._getItem(_6);
+}
+}
+return _4;
+}else{
+if(_3==="text()"){
+for(i=0;i<_5.childNodes.length;i++){
+_6=_5.childNodes[i];
+if(_6.nodeType===3||_6.nodeType===4){
+return _6.nodeValue;
+}
+}
+return _4;
+}else{
+_3=this._getAttribute(_5.nodeName,_3);
+if(_3.charAt(0)==="@"){
+var _7=_3.substring(1);
+var _8=_5.getAttribute(_7);
+return (_8)?_8:_4;
+}else{
+for(i=0;i<_5.childNodes.length;i++){
+_6=_5.childNodes[i];
+if(_6.nodeType===1&&_6.nodeName===_3){
+return this._getItem(_6);
+}
+}
+return _4;
+}
+}
+}
+}
+},getValues:function(_9,_a){
+var _b=_9.element;
+var _c=[];
+var i;
+var _d;
+if(_a==="tagName"){
+return [_b.nodeName];
+}else{
+if(_a==="childNodes"){
+for(i=0;i<_b.childNodes.length;i++){
+_d=_b.childNodes[i];
+if(_d.nodeType===1){
+_c.push(this._getItem(_d));
+}
+}
+return _c;
+}else{
+if(_a==="text()"){
+var ec=_b.childNodes;
+for(i=0;i<ec.length;i++){
+_d=ec[i];
+if(_d.nodeType===3||_d.nodeType===4){
+_c.push(_d.nodeValue);
+}
+}
+return _c;
+}else{
+_a=this._getAttribute(_b.nodeName,_a);
+if(_a.charAt(0)==="@"){
+var _e=_a.substring(1);
+var _f=_b.getAttribute(_e);
+return (_f!==undefined)?[_f]:[];
+}else{
+for(i=0;i<_b.childNodes.length;i++){
+_d=_b.childNodes[i];
+if(_d.nodeType===1&&_d.nodeName===_a){
+_c.push(this._getItem(_d));
+}
+}
+return _c;
+}
+}
+}
+}
+},getAttributes:function(_10){
+var _11=_10.element;
+var _12=[];
+var i;
+_12.push("tagName");
+if(_11.childNodes.length>0){
+var _13={};
+var _14=true;
+var _15=false;
+for(i=0;i<_11.childNodes.length;i++){
+var _16=_11.childNodes[i];
+if(_16.nodeType===1){
+var _17=_16.nodeName;
+if(!_13[_17]){
+_12.push(_17);
+_13[_17]=_17;
+}
+_14=true;
+}else{
+if(_16.nodeType===3){
+_15=true;
+}
+}
+}
+if(_14){
+_12.push("childNodes");
+}
+if(_15){
+_12.push("text()");
+}
+}
+for(i=0;i<_11.attributes.length;i++){
+_12.push("@"+_11.attributes[i].nodeName);
+}
+if(this._attributeMap){
+for(var key in this._attributeMap){
+i=key.indexOf(".");
+if(i>0){
+var _18=key.substring(0,i);
+if(_18===_11.nodeName){
+_12.push(key.substring(i+1));
+}
+}else{
+_12.push(key);
+}
+}
+}
+return _12;
+},hasAttribute:function(_19,_1a){
+return (this.getValue(_19,_1a)!==undefined);
+},containsValue:function(_1b,_1c,_1d){
+var _1e=this.getValues(_1b,_1c);
+for(var i=0;i<_1e.length;i++){
+if((typeof _1d==="string")){
+if(_1e[i].toString&&_1e[i].toString()===_1d){
+return true;
+}
+}else{
+if(_1e[i]===_1d){
+return true;
+}
+}
+}
+return false;
+},isItem:function(_1f){
+if(_1f&&_1f.element&&_1f.store&&_1f.store===this){
+return true;
+}
+return false;
+},isItemLoaded:function(_20){
+return this.isItem(_20);
+},loadItem:function(_21){
+},getFeatures:function(){
+var _22={"dojo.data.api.Read":true,"dojo.data.api.Write":true};
+if(!this.sendQuery||this.keyAttribute!==""){
+_22["dojo.data.api.Identity"]=true;
+}
+return _22;
+},getLabel:function(_23){
+if((this.label!=="")&&this.isItem(_23)){
+var _24=this.getValue(_23,this.label);
+if(_24){
+return _24.toString();
+}
+}
+return undefined;
+},getLabelAttributes:function(_25){
+if(this.label!==""){
+return [this.label];
+}
+return null;
+},_fetchItems:function(_26,_27,_28){
+var url=this._getFetchUrl(_26);
+if(!url){
+_28(new Error("No URL specified."));
+return;
+}
+var _29=(!this.sendQuery?_26:{});
+var _2a=this;
+var _2b={url:url,handleAs:"xml",preventCache:_2a.urlPreventCache};
+var _2c=dojo.xhrGet(_2b);
+_2c.addCallback(function(_2d){
+var _2e=_2a._getItems(_2d,_29);
+if(_2e&&_2e.length>0){
+_27(_2e,_26);
+}else{
+_27([],_26);
+}
+});
+_2c.addErrback(function(_2f){
+_28(_2f,_26);
});
-
-//FIXME: Is a full class here really needed for containment of the item or would
-//an anon object work fine?
-dojo.declare("dojox.data.XmlItem", null, {
- constructor: function(element, store) {
- // summary:
- // Initialize with an XML element
- // element:
- // An XML element
- // store:
- // The containing store, if any.
- this.element = element;
- this.store = store;
- },
- // summary:
- // A data item of 'XmlStore'
- // description:
- // This class represents an item of 'XmlStore' holding an XML element.
- // 'element'
- // element:
- // An XML element
-
- toString: function() {
- // summary:
- // Return a value of the first text child of the element
- // returns:
- // a value of the first text child of the element
- var str = "";
- if (this.element) {
- for (var i = 0; i < this.element.childNodes.length; i++) {
- var node = this.element.childNodes[i];
- if (node.nodeType === 3) {
- str = node.nodeValue;
- break;
- }
- }
- }
- return str; //String
- }
-
+},_getFetchUrl:function(_30){
+if(!this.sendQuery){
+return this.url;
+}
+var _31=_30.query;
+if(!_31){
+return this.url;
+}
+if(dojo.isString(_31)){
+return this.url+_31;
+}
+var _32="";
+for(var _33 in _31){
+var _34=_31[_33];
+if(_34){
+if(_32){
+_32+="&";
+}
+_32+=(_33+"="+_34);
+}
+}
+if(!_32){
+return this.url;
+}
+var _35=this.url;
+if(_35.indexOf("?")<0){
+_35+="?";
+}else{
+_35+="&";
+}
+return _35+_32;
+},_getItems:function(_36,_37){
+var _38=null;
+if(_37){
+_38=_37.query;
+}
+var _39=[];
+var _3a=null;
+if(this.rootItem!==""){
+_3a=dojo.query(this.rootItem,_36);
+}else{
+_3a=_36.documentElement.childNodes;
+}
+var _3b=_37.queryOptions?_37.queryOptions.deep:false;
+if(_3b){
+_3a=this._flattenNodes(_3a);
+}
+for(var i=0;i<_3a.length;i++){
+var _3c=_3a[i];
+if(_3c.nodeType!=1){
+continue;
+}
+var _3d=this._getItem(_3c);
+if(_38){
+var _3e=_37.queryOptions?_37.queryOptions.ignoreCase:false;
+var _3f;
+var _40=false;
+var j;
+var _41=true;
+var _42={};
+for(var key in _38){
+_3f=_38[key];
+if(typeof _3f==="string"){
+_42[key]=dojo.data.util.filter.patternToRegExp(_3f,_3e);
+}
+}
+for(var _43 in _38){
+_41=false;
+var _44=this.getValues(_3d,_43);
+for(j=0;j<_44.length;j++){
+_3f=_44[j];
+if(_3f){
+var _45=_38[_43];
+if((typeof _3f)==="string"&&(_42[_43])){
+if((_3f.match(_42[_43]))!==null){
+_40=true;
+}else{
+_40=false;
+}
+}else{
+if((typeof _3f)==="object"){
+if(_3f.toString&&(_42[_43])){
+var _46=_3f.toString();
+if((_46.match(_42[_43]))!==null){
+_40=true;
+}else{
+_40=false;
+}
+}else{
+if(_45==="*"||_45===_3f){
+_40=true;
+}else{
+_40=false;
+}
+}
+}
+}
+}
+if(_40){
+break;
+}
+}
+if(!_40){
+break;
+}
+}
+if(_41||_40){
+_39.push(_3d);
+}
+}else{
+_39.push(_3d);
+}
+}
+dojo.forEach(_39,function(_47){
+if(_47.element.parentNode){
+_47.element.parentNode.removeChild(_47.element);
+}
+},this);
+return _39;
+},_flattenNodes:function(_48){
+var _49=[];
+if(_48){
+var i;
+for(i=0;i<_48.length;i++){
+var _4a=_48[i];
+_49.push(_4a);
+if(_4a.childNodes&&_4a.childNodes.length>0){
+_49=_49.concat(this._flattenNodes(_4a.childNodes));
+}
+}
+}
+return _49;
+},close:function(_4b){
+},newItem:function(_4c,_4d){
+_4c=(_4c||{});
+var _4e=_4c.tagName;
+if(!_4e){
+_4e=this.rootItem;
+if(_4e===""){
+return null;
+}
+}
+var _4f=this._getDocument();
+var _50=_4f.createElement(_4e);
+for(var _51 in _4c){
+var _52;
+if(_51==="tagName"){
+continue;
+}else{
+if(_51==="text()"){
+_52=_4f.createTextNode(_4c[_51]);
+_50.appendChild(_52);
+}else{
+_51=this._getAttribute(_4e,_51);
+if(_51.charAt(0)==="@"){
+var _53=_51.substring(1);
+_50.setAttribute(_53,_4c[_51]);
+}else{
+var _54=_4f.createElement(_51);
+_52=_4f.createTextNode(_4c[_51]);
+_54.appendChild(_52);
+_50.appendChild(_54);
+}
+}
+}
+}
+var _55=this._getItem(_50);
+this._newItems.push(_55);
+var _56=null;
+if(_4d&&_4d.parent&&_4d.attribute){
+_56={item:_4d.parent,attribute:_4d.attribute,oldValue:undefined};
+var _57=this.getValues(_4d.parent,_4d.attribute);
+if(_57&&_57.length>0){
+var _58=_57.slice(0,_57.length);
+if(_57.length===1){
+_56.oldValue=_57[0];
+}else{
+_56.oldValue=_57.slice(0,_57.length);
+}
+_58.push(_55);
+this.setValues(_4d.parent,_4d.attribute,_58);
+_56.newValue=this.getValues(_4d.parent,_4d.attribute);
+}else{
+this.setValues(_4d.parent,_4d.attribute,_55);
+_56.newValue=_55;
+}
+}
+return _55;
+},deleteItem:function(_59){
+var _5a=_59.element;
+if(_5a.parentNode){
+this._backupItem(_59);
+_5a.parentNode.removeChild(_5a);
+return true;
+}
+this._forgetItem(_59);
+this._deletedItems.push(_59);
+return true;
+},setValue:function(_5b,_5c,_5d){
+if(_5c==="tagName"){
+return false;
+}
+this._backupItem(_5b);
+var _5e=_5b.element;
+var _5f;
+var _60;
+if(_5c==="childNodes"){
+_5f=_5d.element;
+_5e.appendChild(_5f);
+}else{
+if(_5c==="text()"){
+while(_5e.firstChild){
+_5e.removeChild(_5e.firstChild);
+}
+_60=this._getDocument(_5e).createTextNode(_5d);
+_5e.appendChild(_60);
+}else{
+_5c=this._getAttribute(_5e.nodeName,_5c);
+if(_5c.charAt(0)==="@"){
+var _61=_5c.substring(1);
+_5e.setAttribute(_61,_5d);
+}else{
+for(var i=0;i<_5e.childNodes.length;i++){
+var _62=_5e.childNodes[i];
+if(_62.nodeType===1&&_62.nodeName===_5c){
+_5f=_62;
+break;
+}
+}
+var _63=this._getDocument(_5e);
+if(_5f){
+while(_5f.firstChild){
+_5f.removeChild(_5f.firstChild);
+}
+}else{
+_5f=_63.createElement(_5c);
+_5e.appendChild(_5f);
+}
+_60=_63.createTextNode(_5d);
+_5f.appendChild(_60);
+}
+}
+}
+return true;
+},setValues:function(_64,_65,_66){
+if(_65==="tagName"){
+return false;
+}
+this._backupItem(_64);
+var _67=_64.element;
+var i;
+var _68;
+var _69;
+if(_65==="childNodes"){
+while(_67.firstChild){
+_67.removeChild(_67.firstChild);
+}
+for(i=0;i<_66.length;i++){
+_68=_66[i].element;
+_67.appendChild(_68);
+}
+}else{
+if(_65==="text()"){
+while(_67.firstChild){
+_67.removeChild(_67.firstChild);
+}
+var _6a="";
+for(i=0;i<_66.length;i++){
+_6a+=_66[i];
+}
+_69=this._getDocument(_67).createTextNode(_6a);
+_67.appendChild(_69);
+}else{
+_65=this._getAttribute(_67.nodeName,_65);
+if(_65.charAt(0)==="@"){
+var _6b=_65.substring(1);
+_67.setAttribute(_6b,_66[0]);
+}else{
+for(i=_67.childNodes.length-1;i>=0;i--){
+var _6c=_67.childNodes[i];
+if(_6c.nodeType===1&&_6c.nodeName===_65){
+_67.removeChild(_6c);
+}
+}
+var _6d=this._getDocument(_67);
+for(i=0;i<_66.length;i++){
+_68=_6d.createElement(_65);
+_69=_6d.createTextNode(_66[i]);
+_68.appendChild(_69);
+_67.appendChild(_68);
+}
+}
+}
+}
+return true;
+},unsetAttribute:function(_6e,_6f){
+if(_6f==="tagName"){
+return false;
+}
+this._backupItem(_6e);
+var _70=_6e.element;
+if(_6f==="childNodes"||_6f==="text()"){
+while(_70.firstChild){
+_70.removeChild(_70.firstChild);
+}
+}else{
+_6f=this._getAttribute(_70.nodeName,_6f);
+if(_6f.charAt(0)==="@"){
+var _71=_6f.substring(1);
+_70.removeAttribute(_71);
+}else{
+for(var i=_70.childNodes.length-1;i>=0;i--){
+var _72=_70.childNodes[i];
+if(_72.nodeType===1&&_72.nodeName===_6f){
+_70.removeChild(_72);
+}
+}
+}
+}
+return true;
+},save:function(_73){
+if(!_73){
+_73={};
+}
+var i;
+for(i=0;i<this._modifiedItems.length;i++){
+this._saveItem(this._modifiedItems[i],_73,"PUT");
+}
+for(i=0;i<this._newItems.length;i++){
+var _74=this._newItems[i];
+if(_74.element.parentNode){
+this._newItems.splice(i,1);
+i--;
+continue;
+}
+this._saveItem(this._newItems[i],_73,"POST");
+}
+for(i=0;i<this._deletedItems.length;i++){
+this._saveItem(this._deletedItems[i],_73,"DELETE");
+}
+},revert:function(){
+this._newItems=[];
+this._restoreItems(this._deletedItems);
+this._deletedItems=[];
+this._restoreItems(this._modifiedItems);
+this._modifiedItems=[];
+return true;
+},isDirty:function(_75){
+if(_75){
+var _76=this._getRootElement(_75.element);
+return (this._getItemIndex(this._newItems,_76)>=0||this._getItemIndex(this._deletedItems,_76)>=0||this._getItemIndex(this._modifiedItems,_76)>=0);
+}else{
+return (this._newItems.length>0||this._deletedItems.length>0||this._modifiedItems.length>0);
+}
+},_saveItem:function(_77,_78,_79){
+var url;
+var _7a;
+if(_79==="PUT"){
+url=this._getPutUrl(_77);
+}else{
+if(_79==="DELETE"){
+url=this._getDeleteUrl(_77);
+}else{
+url=this._getPostUrl(_77);
+}
+}
+if(!url){
+if(_78.onError){
+_7a=_78.scope||dojo.global;
+_78.onError.call(_7a,new Error("No URL for saving content: "+this._getPostContent(_77)));
+}
+return;
+}
+var _7b={url:url,method:(_79||"POST"),contentType:"text/xml",handleAs:"xml"};
+var _7c;
+if(_79==="PUT"){
+_7b.putData=this._getPutContent(_77);
+_7c=dojo.rawXhrPut(_7b);
+}else{
+if(_79==="DELETE"){
+_7c=dojo.xhrDelete(_7b);
+}else{
+_7b.postData=this._getPostContent(_77);
+_7c=dojo.rawXhrPost(_7b);
+}
+}
+_7a=(_78.scope||dojo.global);
+var _7d=this;
+_7c.addCallback(function(_7e){
+_7d._forgetItem(_77);
+if(_78.onComplete){
+_78.onComplete.call(_7a);
+}
});
+_7c.addErrback(function(_7f){
+if(_78.onError){
+_78.onError.call(_7a,_7f);
+}
+});
+},_getPostUrl:function(_80){
+return this.url;
+},_getPutUrl:function(_81){
+return this.url;
+},_getDeleteUrl:function(_82){
+var url=this.url;
+if(_82&&this.keyAttribute!==""){
+var _83=this.getValue(_82,this.keyAttribute);
+if(_83){
+var key=this.keyAttribute.charAt(0)==="@"?this.keyAttribute.substring(1):this.keyAttribute;
+url+=url.indexOf("?")<0?"?":"&";
+url+=key+"="+_83;
+}
+}
+return url;
+},_getPostContent:function(_84){
+var _85=_84.element;
+var _86="<?xml version=\"1.0\"?>";
+return _86+dojox.xml.parser.innerXML(_85);
+},_getPutContent:function(_87){
+var _88=_87.element;
+var _89="<?xml version=\"1.0\"?>";
+return _89+dojox.xml.parser.innerXML(_88);
+},_getAttribute:function(_8a,_8b){
+if(this._attributeMap){
+var key=_8a+"."+_8b;
+var _8c=this._attributeMap[key];
+if(_8c){
+_8b=_8c;
+}else{
+_8c=this._attributeMap[_8b];
+if(_8c){
+_8b=_8c;
+}
+}
+}
+return _8b;
+},_getItem:function(_8d){
+try{
+var q=null;
+if(this.keyAttribute===""){
+q=this._getXPath(_8d);
+}
+return new dojox.data.XmlItem(_8d,this,q);
+}
+catch(e){
+}
+return null;
+},_getItemIndex:function(_8e,_8f){
+for(var i=0;i<_8e.length;i++){
+if(_8e[i].element===_8f){
+return i;
+}
+}
+return -1;
+},_backupItem:function(_90){
+var _91=this._getRootElement(_90.element);
+if(this._getItemIndex(this._newItems,_91)>=0||this._getItemIndex(this._modifiedItems,_91)>=0){
+return;
+}
+if(_91!=_90.element){
+_90=this._getItem(_91);
+}
+_90._backup=_91.cloneNode(true);
+this._modifiedItems.push(_90);
+},_restoreItems:function(_92){
+dojo.forEach(_92,function(_93){
+if(_93._backup){
+_93.element=_93._backup;
+_93._backup=null;
+}
+},this);
+},_forgetItem:function(_94){
+var _95=_94.element;
+var _96=this._getItemIndex(this._newItems,_95);
+if(_96>=0){
+this._newItems.splice(_96,1);
+}
+_96=this._getItemIndex(this._deletedItems,_95);
+if(_96>=0){
+this._deletedItems.splice(_96,1);
+}
+_96=this._getItemIndex(this._modifiedItems,_95);
+if(_96>=0){
+this._modifiedItems.splice(_96,1);
+}
+},_getDocument:function(_97){
+if(_97){
+return _97.ownerDocument;
+}else{
+if(!this._document){
+return dojox.xml.parser.parse();
+}
+}
+return null;
+},_getRootElement:function(_98){
+while(_98.parentNode){
+_98=_98.parentNode;
+}
+return _98;
+},_getXPath:function(_99){
+var _9a=null;
+if(!this.sendQuery){
+var _9b=_99;
+_9a="";
+while(_9b&&_9b!=_99.ownerDocument){
+var pos=0;
+var _9c=_9b;
+var _9d=_9b.nodeName;
+while(_9c){
+_9c=_9c.previousSibling;
+if(_9c&&_9c.nodeName===_9d){
+pos++;
+}
+}
+var _9e="/"+_9d+"["+pos+"]";
+if(_9a){
+_9a=_9e+_9a;
+}else{
+_9a=_9e;
+}
+_9b=_9b.parentNode;
+}
+}
+return _9a;
+},getIdentity:function(_9f){
+if(!this.isItem(_9f)){
+throw new Error("dojox.data.XmlStore: Object supplied to getIdentity is not an item");
+}else{
+var id=null;
+if(this.sendQuery&&this.keyAttribute!==""){
+id=this.getValue(_9f,this.keyAttribute).toString();
+}else{
+if(!this.serverQuery){
+if(this.keyAttribute!==""){
+id=this.getValue(_9f,this.keyAttribute).toString();
+}else{
+id=_9f.q;
+}
+}
+}
+return id;
+}
+},getIdentityAttributes:function(_a0){
+if(!this.isItem(_a0)){
+throw new Error("dojox.data.XmlStore: Object supplied to getIdentity is not an item");
+}else{
+if(this.keyAttribute!==""){
+return [this.keyAttribute];
+}else{
+return null;
+}
+}
+},fetchItemByIdentity:function(_a1){
+var _a2=null;
+var _a3=null;
+var _a4=this;
+var url=null;
+var _a5=null;
+var _a6=null;
+if(!_a4.sendQuery){
+_a2=function(_a7){
+if(_a7){
+if(_a4.keyAttribute!==""){
+var _a8={};
+_a8.query={};
+_a8.query[_a4.keyAttribute]=_a1.identity;
+_a8.queryOptions={deep:true};
+var _a9=_a4._getItems(_a7,_a8);
+_a3=_a1.scope||dojo.global;
+if(_a9.length===1){
+if(_a1.onItem){
+_a1.onItem.call(_a3,_a9[0]);
+}
+}else{
+if(_a9.length===0){
+if(_a1.onItem){
+_a1.onItem.call(_a3,null);
+}
+}else{
+if(_a1.onError){
+_a1.onError.call(_a3,new Error("Items array size for identity lookup greater than 1, invalid keyAttribute."));
+}
+}
+}
+}else{
+var _aa=_a1.identity.split("/");
+var i;
+var _ab=_a7;
+for(i=0;i<_aa.length;i++){
+if(_aa[i]&&_aa[i]!==""){
+var _ac=_aa[i];
+_ac=_ac.substring(0,_ac.length-1);
+var _ad=_ac.split("[");
+var tag=_ad[0];
+var _ae=parseInt(_ad[1],10);
+var pos=0;
+if(_ab){
+var _af=_ab.childNodes;
+if(_af){
+var j;
+var _b0=null;
+for(j=0;j<_af.length;j++){
+var _b1=_af[j];
+if(_b1.nodeName===tag){
+if(pos<_ae){
+pos++;
+}else{
+_b0=_b1;
+break;
+}
+}
+}
+if(_b0){
+_ab=_b0;
+}else{
+_ab=null;
+}
+}else{
+_ab=null;
+}
+}else{
+break;
+}
+}
+}
+var _b2=null;
+if(_ab){
+_b2=_a4._getItem(_ab);
+if(_b2.element.parentNode){
+_b2.element.parentNode.removeChild(_b2.element);
+}
+}
+if(_a1.onItem){
+_a3=_a1.scope||dojo.global;
+_a1.onItem.call(_a3,_b2);
+}
+}
+}
+};
+url=this._getFetchUrl(null);
+_a5={url:url,handleAs:"xml",preventCache:_a4.urlPreventCache};
+_a6=dojo.xhrGet(_a5);
+_a6.addCallback(_a2);
+if(_a1.onError){
+_a6.addErrback(function(_b3){
+var s=_a1.scope||dojo.global;
+_a1.onError.call(s,_b3);
+});
+}
+}else{
+if(_a4.keyAttribute!==""){
+var _b4={query:{}};
+_b4.query[_a4.keyAttribute]=_a1.identity;
+url=this._getFetchUrl(_b4);
+_a2=function(_b5){
+var _b6=null;
+if(_b5){
+var _b7=_a4._getItems(_b7,{});
+if(_b7.length===1){
+_b6=_b7[0];
+}else{
+if(_a1.onError){
+var _b8=_a1.scope||dojo.global;
+_a1.onError.call(_b8,new Error("More than one item was returned from the server for the denoted identity"));
+}
+}
+}
+if(_a1.onItem){
+_b8=_a1.scope||dojo.global;
+_a1.onItem.call(_b8,_b6);
+}
+};
+_a5={url:url,handleAs:"xml",preventCache:_a4.urlPreventCache};
+_a6=dojo.xhrGet(_a5);
+_a6.addCallback(_a2);
+if(_a1.onError){
+_a6.addErrback(function(_b9){
+var s=_a1.scope||dojo.global;
+_a1.onError.call(s,_b9);
+});
+}
+}else{
+if(_a1.onError){
+var s=_a1.scope||dojo.global;
+_a1.onError.call(s,new Error("XmlStore is not told that the server to provides identity support. No keyAttribute specified."));
+}
+}
+}
+}});
+dojo.declare("dojox.data.XmlItem",null,{constructor:function(_ba,_bb,_bc){
+this.element=_ba;
+this.store=_bb;
+this.q=_bc;
+},toString:function(){
+var str="";
+if(this.element){
+for(var i=0;i<this.element.childNodes.length;i++){
+var _bd=this.element.childNodes[i];
+if(_bd.nodeType===3||_bd.nodeType===4){
+str+=_bd.nodeValue;
+}
+}
+}
+return str;
+}});
dojo.extend(dojox.data.XmlStore,dojo.data.util.simpleFetch);
-
}
diff --git a/js/dojo/dojox/data/dom.js b/js/dojo/dojox/data/dom.js
--- a/js/dojo/dojox/data/dom.js
+++ b/js/dojo/dojox/data/dom.js
@@ -1,187 +1,42 @@
-if(!dojo._hasResource["dojox.data.dom"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.data.dom"] = true;
-dojo.provide("dojox.data.dom");
-
-//DOM type to int value for reference.
-//Ints make for more compact code than full constant names.
-//ELEMENT_NODE = 1;
-//ATTRIBUTE_NODE = 2;
-//TEXT_NODE = 3;
-//CDATA_SECTION_NODE = 4;
-//ENTITY_REFERENCE_NODE = 5;
-//ENTITY_NODE = 6;
-//PROCESSING_INSTRUCTION_NODE = 7;
-//COMMENT_NODE = 8;
-//DOCUMENT_NODE = 9;
-//DOCUMENT_TYPE_NODE = 10;
-//DOCUMENT_FRAGMENT_NODE = 11;
-//NOTATION_NODE = 12;
-
-//FIXME: Remove this file when possible.
-//This file contains internal/helper APIs as holders until the true DOM apis of Dojo 0.9 are finalized.
-//Therefore, these should not be generally used, they are present only for the use by XmlStore and the
-//wires project until proper dojo replacements are available. When such exist, XmlStore and the like
-//will be ported off these and this file will be deleted.
-dojo.experimental("dojox.data.dom");
-
-dojox.data.dom.createDocument = function(/*string?*/ str, /*string?*/ mimetype){
- // summary:
- // cross-browser implementation of creating an XML document object.
- //
- // str:
- // Optional text to create the document from. If not provided, an empty XML document will be created.
- // mimetype:
- // Optional mimetype of the text. Typically, this is text/xml. Will be defaulted to text/xml if not provided.
- var _document = dojo.doc;
-
- if(!mimetype){ mimetype = "text/xml"; }
- if(str && (typeof dojo.global["DOMParser"]) !== "undefined"){
- var parser = new DOMParser();
- return parser.parseFromString(str, mimetype); // DOMDocument
- }else if((typeof dojo.global["ActiveXObject"]) !== "undefined"){
- var prefixes = [ "MSXML2", "Microsoft", "MSXML", "MSXML3" ];
- for(var i = 0; i<prefixes.length; i++){
- try{
- var doc = new ActiveXObject(prefixes[i]+".XMLDOM");
- if(str){
- if(doc){
- doc.async = false;
- doc.loadXML(str);
- return doc; // DOMDocument
- }else{
- console.log("loadXML didn't work?");
- }
- }else{
- if(doc){
- return doc; //DOMDocument
- }
- }
- }catch(e){ /* squelch */ };
- }
- }else if((_document.implementation)&&
- (_document.implementation.createDocument)){
- if(str){
- if(_document.createElement){
- // FIXME: this may change all tags to uppercase!
- var tmp = _document.createElement("xml");
- tmp.innerHTML = str;
- var xmlDoc = _document.implementation.createDocument("foo", "", null);
- for(var i = 0; i < tmp.childNodes.length; i++) {
- xmlDoc.importNode(tmp.childNodes.item(i), true);
- }
- return xmlDoc; // DOMDocument
- }
- }else{
- return _document.implementation.createDocument("", "", null); // DOMDocument
- }
- }
- return null; // DOMDocument
-}
-
-dojox.data.dom.textContent = function(/*Node*/node, /*string?*/text){
- // summary:
- // Implementation of the DOM Level 3 attribute; scan node for text
- // description:
- // Implementation of the DOM Level 3 attribute; scan node for text
- // This function can also update the text of a node by replacing all child
- // content of the node.
- // node:
- // The node to get the text off of or set the text on.
- // text:
- // Optional argument of the text to apply to the node.
- if(arguments.length>1){
- var _document = node.ownerDocument || dojo.doc; //Preference is to get the node owning doc first or it may fail
- dojox.data.dom.replaceChildren(node, _document.createTextNode(text));
- return text; // string
- } else {
- if(node.textContent !== undefined){ //FF 1.5
- return node.textContent; // string
- }
- var _result = "";
- if(node == null){
- return _result; //empty string.
- }
- for(var i = 0; i < node.childNodes.length; i++){
- switch(node.childNodes[i].nodeType){
- case 1: // ELEMENT_NODE
- case 5: // ENTITY_REFERENCE_NODE
- _result += dojox.data.dom.textContent(node.childNodes[i]);
- break;
- case 3: // TEXT_NODE
- case 2: // ATTRIBUTE_NODE
- case 4: // CDATA_SECTION_NODE
- _result += node.childNodes[i].nodeValue;
- break;
- default:
- break;
- }
- }
- return _result; // string
- }
-}
-
-dojox.data.dom.replaceChildren = function(/*Element*/node, /*Node || array*/ newChildren){
- // summary:
- // Removes all children of node and appends newChild. All the existing
- // children will be destroyed.
- // description:
- // Removes all children of node and appends newChild. All the existing
- // children will be destroyed.
- // node:
- // The node to modify the children on
- // newChildren:
- // The children to add to the node. It can either be a single Node or an
- // array of Nodes.
- var nodes = [];
-
- if(dojo.isIE){
- for(var i=0;i<node.childNodes.length;i++){
- nodes.push(node.childNodes[i]);
- }
- }
-
- dojox.data.dom.removeChildren(node);
- for(var i=0;i<nodes.length;i++){
- dojo._destroyElement(nodes[i]);
- }
-
- if(!dojo.isArray(newChildren)){
- node.appendChild(newChildren);
- }else{
- for(var i=0;i<newChildren.length;i++){
- node.appendChild(newChildren[i]);
- }
- }
-}
-
-dojox.data.dom.removeChildren = function(/*Element*/node){
- // summary:
- // removes all children from node and returns the count of children removed.
- // The children nodes are not destroyed. Be sure to call dojo._destroyElement on them
- // after they are not used anymore.
- // node:
- // The node to remove all the children from.
- var count = node.childNodes.length;
- while(node.hasChildNodes()){
- node.removeChild(node.firstChild);
- }
- return count; // int
-}
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojox.data.dom.innerXML = function(/*Node*/node){
- // summary:
- // Implementation of MS's innerXML function.
- // node:
- // The node from which to generate the XML text representation.
- if(node.innerXML){
- return node.innerXML; // string
- }else if (node.xml){
- return node.xml; // string
- }else if(typeof XMLSerializer != "undefined"){
- return (new XMLSerializer()).serializeToString(node); // string
- }
+if(!dojo._hasResource["dojox.data.dom"]){
+dojo._hasResource["dojox.data.dom"]=true;
+dojo.provide("dojox.data.dom");
+dojo.require("dojox.xml.parser");
+dojo.deprecated("dojox.data.dom","Use dojox.xml.parser instead.","2.0");
+dojox.data.dom.createDocument=function(_1,_2){
+dojo.deprecated("dojox.data.dom.createDocument()","Use dojox.xml.parser.parse() instead.","2.0");
+try{
+return dojox.xml.parser.parse(_1,_2);
+}
+catch(e){
+return null;
}
-
-
+};
+dojox.data.dom.textContent=function(_3,_4){
+dojo.deprecated("dojox.data.dom.textContent()","Use dojox.xml.parser.textContent() instead.","2.0");
+if(arguments.length>1){
+return dojox.xml.parser.textContent(_3,_4);
+}else{
+return dojox.xml.parser.textContent(_3);
}
+};
+dojox.data.dom.replaceChildren=function(_5,_6){
+dojo.deprecated("dojox.data.dom.replaceChildren()","Use dojox.xml.parser.replaceChildren() instead.","2.0");
+dojox.xml.parser.replaceChildren(_5,_6);
+};
+dojox.data.dom.removeChildren=function(_7){
+dojo.deprecated("dojox.data.dom.removeChildren()","Use dojox.xml.parser.removeChildren() instead.","2.0");
+return dojox.xml.parser.removeChildren(_7);
+};
+dojox.data.dom.innerXML=function(_8){
+dojo.deprecated("dojox.data.dom.innerXML()","Use dojox.xml.parser.innerXML() instead.","2.0");
+return dojox.xml.parser.innerXML(_8);
+};
+}
diff --git a/js/dojo/dojox/date/README b/js/dojo/dojox/date/README
--- a/js/dojo/dojox/date/README
+++ b/js/dojo/dojox/date/README
@@ -1,36 +1,42 @@
--------------------------------------------------------------------------------
-DojoX Date
--------------------------------------------------------------------------------
-Version 0.9
-Release date: 5/17/2007
--------------------------------------------------------------------------------
-Project state:
-expermental
--------------------------------------------------------------------------------
-Credits
- Adam Peller (dojox.date.posix)
- Neil Roberts (dojox.date.php)
--------------------------------------------------------------------------------
-Project description
-
-Placeholder for any kind of date operations, including formatters that are
-common to other languages (posix and php).
--------------------------------------------------------------------------------
-Dependencies:
-
-Depends only on the Dojo Core.
--------------------------------------------------------------------------------
-Documentation
-
-See the API documentation for details.
--------------------------------------------------------------------------------
-Installation instructions
-
-Grab the following from the Dojo SVN Repository:
-http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/date/*
-
-Install into the following directory structure:
-/dojox/date/
-
-...which should be at the same level as your Dojo checkout.
--------------------------------------------------------------------------------
+-------------------------------------------------------------------------------
+DojoX Date
+-------------------------------------------------------------------------------
+Version 0.9
+Release date: 5/17/2007
+-------------------------------------------------------------------------------
+Project state:
+experimental
+-------------------------------------------------------------------------------
+Credits
+ Paul Sowden (dojox.date.posix)
+ Neil Roberts (dojox.date.php)
+ Hossam Aldin Katory (dojox.date.islamic, dojox.date.hebrew)
+ Helena Halperin, Moshe Wajnberg, Tomer Mahlin (dojox.date.hebrew)
+ Nathan Toone (dojox.date.relative, dojox.date.tzdate, dojox.date.timezone)
+-------------------------------------------------------------------------------
+Project description
+
+Placeholder for any kind of date operations, including formatters that are
+common to other languages (posix and php).
+-------------------------------------------------------------------------------
+Dependencies:
+
+Depends only on the Dojo Core.
+-------------------------------------------------------------------------------
+Documentation
+
+See the API documentation for details.
+-------------------------------------------------------------------------------
+Installation instructions
+
+Grab the following from the Dojo SVN Repository:
+http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/date/*
+
+Install into the following directory structure:
+/dojox/date/
+
+...which should be at the same level as your Dojo checkout.
+
+To use the non-Gregorian calendars, you must do a complete build of dojo.cldr.
+See util/buildscripts/cldr/README for details.
+-------------------------------------------------------------------------------
diff --git a/js/dojo/dojox/date/php.js b/js/dojo/dojox/date/php.js
--- a/js/dojo/dojox/date/php.js
+++ b/js/dojo/dojox/date/php.js
@@ -1,296 +1,185 @@
-if(!dojo._hasResource["dojox.date.php"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.date.php"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.date.php"]){
+dojo._hasResource["dojox.date.php"]=true;
dojo.provide("dojox.date.php");
dojo.require("dojo.date");
-
-dojox.date.php.format = function(/*Date*/ date, /*String*/ format, /*Object?*/ overrides){
- // summary: Get a formatted string for a given date object
- var df = new dojox.date.php.DateFormat(date);
- return df.format(format, overrides);
+dojo.require("dojox.string.tokenize");
+dojox.date.php.format=function(_1,_2){
+var df=new dojox.date.php.DateFormat(_2);
+return df.format(_1);
+};
+dojox.date.php.DateFormat=function(_3){
+if(!this.regex){
+var _4=[];
+for(var _5 in this.constructor.prototype){
+if(dojo.isString(_5)&&_5.length==1&&dojo.isFunction(this[_5])){
+_4.push(_5);
+}
+}
+this.constructor.prototype.regex=new RegExp("(?:(\\\\.)|(["+_4.join("")+"]))","g");
+}
+var _6=[];
+this.tokens=dojox.string.tokenize(_3,this.regex,function(_7,_8,i){
+if(_8){
+_6.push([i,_8]);
+return _8;
+}
+if(_7){
+return _7.charAt(1);
+}
+});
+this.replacements=_6;
+};
+dojo.extend(dojox.date.php.DateFormat,{weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdays_3:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],months_3:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthdays:[31,28,31,30,31,30,31,31,30,31,30,31],format:function(_9){
+this.date=_9;
+for(var i=0,_a;_a=this.replacements[i];i++){
+this.tokens[_a[0]]=this[_a[1]]();
}
-
-dojox.date.php.DateFormat = function(/*Date*/ date){
- this.date = date;
+return this.tokens.join("");
+},d:function(){
+var j=this.j();
+return (j.length==1)?"0"+j:j;
+},D:function(){
+return this.weekdays_3[this.date.getDay()];
+},j:function(){
+return this.date.getDate()+"";
+},l:function(){
+return this.weekdays[this.date.getDay()];
+},N:function(){
+var w=this.w();
+return (!w)?7:w;
+},S:function(){
+switch(this.date.getDate()){
+case 11:
+case 12:
+case 13:
+return "th";
+case 1:
+case 21:
+case 31:
+return "st";
+case 2:
+case 22:
+return "nd";
+case 3:
+case 23:
+return "rd";
+default:
+return "th";
+}
+},w:function(){
+return this.date.getDay()+"";
+},z:function(){
+var _b=this.date.getTime()-new Date(this.date.getFullYear(),0,1).getTime();
+return Math.floor(_b/86400000)+"";
+},W:function(){
+var _c;
+var _d=new Date(this.date.getFullYear(),0,1).getDay()+1;
+var w=this.date.getDay()+1;
+var z=parseInt(this.z());
+if(z<=(8-_d)&&_d>4){
+var _e=new Date(this.date.getFullYear()-1,this.date.getMonth(),this.date.getDate());
+if(_d==5||(_d==6&&dojo.date.isLeapYear(_e))){
+_c=53;
+}else{
+_c=52;
}
-dojo.extend(dojox.date.php.DateFormat, {
- weekdays: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
- weekdays_3: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
- months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
- months_3: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
- monthdays: [31,28,31,30,31,30,31,31,30,31,30,31],
-
- format: function(/*String*/ format, /*Object?*/ overrides){
- // summary: Format the internal date object
- var parts = [];
- for(var i = 0; i < format.length; i++){
- var chr = format.charAt(i);
- if(overrides && typeof overrides[chr] == "function"){
- parts.push(overrides[chr].call(this));
- }else if(typeof this[chr] == "function"){
- parts.push(this[chr]());
- }else{
- parts.push(chr);
- }
- }
- return parts.join("");
- },
-
- // Day
-
- d: function(){
- // summary: Day of the month, 2 digits with leading zeros
- var j = this.j();
- return (j.length == 1) ? "0" + j : j;
- },
-
- D: function(){
- // summary: A textual representation of a day, three letters
- return this.weekdays_3[this.date.getDay()];
- },
-
- j: function(){
- // summary: Day of the month without leading zeros
- return this.date.getDate() + "";
- },
-
- l: function(){
- // summary: A full textual representation of the day of the week
- return this.weekdays[this.date.getDay()];
- },
-
- N: function(){
- // summary: ISO-8601 numeric representation of the day of the week (added in PHP 5.1.0)
- var w = this.w();
- return (!w) ? 7 : w;
- },
-
- S: function(){
- // summary: English ordinal suffix for the day of the month, 2 characters
- switch(this.date.getDate()){
- case 11: case 12: case 13: return "th";
- case 1: case 21: case 31: return "st";
- case 2: case 22: return "nd";
- case 3: case 23: return "rd";
- default: return "th";
- }
- },
-
- w: function(){
- // summary: Numeric representation of the day of the week
- return this.date.getDay() + "";
- },
-
- z: function(){
- // summary: The day of the year (starting from 0)
- var millis = this.date.getTime() - new Date(this.date.getFullYear(), 0, 1).getTime();
- return Math.floor(millis/86400000) + "";
- },
-
- // Week
-
- W: function(){
- // summary: ISO-8601 week number of year, weeks starting on Monday (added in PHP 4.1.0)
- var week;
- var jan1_w = new Date(this.date.getFullYear(), 0, 1).getDay() + 1;
- var w = this.date.getDay() + 1;
- var z = parseInt(this.z());
-
- if(z <= (8 - jan1_w) && jan1_w > 4){
- var last_year = new Date(this.date.getFullYear() - 1, this.date.getMonth(), this.date.getDate());
- if(jan1_w == 5 || (jan1_w == 6 && dojo.date.isLeapYear(last_year))){
- week = 53;
- }else{
- week = 52;
- }
- }else{
- var i;
- if(Boolean(this.L())){
- i = 366;
- }else{
- i = 365;
- }
- if((i - z) < (4 - w)){
- week = 1;
- }else{
- var j = z + (7 - w) + (jan1_w - 1);
- week = Math.ceil(j / 7);
- if(jan1_w > 4){
- --week;
- }
- }
- }
-
- return week;
- },
-
- // Month
-
- F: function(){
- // summary: A full textual representation of a month, such as January or March
- return this.months[this.date.getMonth()];
- },
-
- m: function(){
- // summary: Numeric representation of a month, with leading zeros
- var n = this.n();
- return (n.length == 1) ? "0" + n : n;
- },
-
- M: function(){
- // summary: A short textual representation of a month, three letters
- return months_3[this.date.getMonth()];
- },
-
- n: function(){
- // summary: Numeric representation of a month, without leading zeros
- return this.date.getMonth() + 1 + "";
- },
-
- t: function(){
- // summary: Number of days in the given month
- return (Boolean(this.L()) && this.date.getMonth() == 1) ? 29 : this.monthdays[this.getMonth()];
- },
-
- // Year
-
- L: function(){
- // summary: Whether it's a leap year
- return (dojo.date.isLeapYear(this.date)) ? "1" : "0";
- },
-
- o: function(){
- // summary:
- // ISO-8601 year number. This has the same value as Y, except that if
- // the ISO week number (W) belongs to the previous or next year, that year is used instead. (added in PHP 5.1.0)
- // TODO: Figure out what this means
- },
-
- Y: function(){
- // summary: A full numeric representation of a year, 4 digits
- return this.date.getFullYear() + "";
- },
-
- y: function(){
- // summary: A two digit representation of a year
- return this.date.getFullYear.substsring(2, 4);
- },
-
- // Time
-
- a: function(){
- // summary: Lowercase Ante meridiem and Post meridiem
- return this.date.getHours() >= 12 ? "pm" : "am";
- },
-
- b: function(){
- // summary: Uppercase Ante meridiem and Post meridiem
- return this.a().toUpperCase();
- },
-
- B: function(){
- // summary:
- // Swatch Internet time
- // A day is 1,000 beats. All time is measured from GMT + 1
- var off = this.date.getTimezoneOffset() + 60;
- var secs = (this.date.getHours() * 3600) + (this.date.getMinutes() * 60) + this.getSeconds() + (off * 60);
- var beat = Math.abs(Math.floor(secs / 86.4) % 1000) + "";
- while(beat.length < 2) beat = "0" + beat;
- return beat;
- },
-
- g: function(){
- // summary: 12-hour format of an hour without leading zeros
- return (this.date.getHours() > 12) ? this.date.getHours() - 12 + "" : this.date.getHours() + "";
- },
-
- G: function(){
- // summary: 24-hour format of an hour without leading zeros
- return this.date.getHours() + "";
- },
-
- h: function(){
- // summary: 12-hour format of an hour with leading zeros
- var g = this.g();
- return (g.length == 1) ? "0" + g : g;
- },
-
- H: function(){
- // summary: 24-hour format of an hour with leading zeros
- var G = this.G();
- return (G.length == 1) ? "0" + G : G;
- },
-
- i: function(){
- // summary: Minutes with leading zeros
- var mins = this.date.getMinutes() + "";
- return (mins.length == 1) ? "0" + mins : mins;
- },
-
- s: function(){
- // summary: Seconds, with leading zeros
- var secs = this.date.getSeconds() + "";
- return (secs.length == 1) ? "0" + secs : secs;
- },
-
- // Timezone
-
- e: function(){
- // summary: Timezone identifier (added in PHP 5.1.0)
- return dojo.date.getTimezoneName(this.date);
- },
-
- I: function(){
- // summary: Whether or not the date is in daylight saving time
- // TODO: Can dojo.date do this?
- },
-
- O: function(){
- // summary: Difference to Greenwich time (GMT) in hours
- var off = Math.abs(this.date.getTimezoneOffset());
- var hours = Math.floor(off / 60) + "";
- var mins = (off % 60) + "";
- if(hours.length == 1) hours = "0" + hours;
- if(mins.length == 1) hours = "0" + mins;
- return ((this.date.getTimezoneOffset() < 0) ? "+" : "-") + hours + mins;
- },
-
- P: function(){
- // summary: Difference to Greenwich time (GMT) with colon between hours and minutes (added in PHP 5.1.3)
- var O = this.O();
- return O.substring(0, 2) + ":" + O.substring(2, 4);
- },
-
- T: function(){
- // summary: Timezone abbreviation
-
- // Guess...
- return this.e().substring(0, 3);
- },
-
- Z: function(){
- // summary:
- // Timezone offset in seconds. The offset for timezones west of UTC is always negative,
- // and for those east of UTC is always positive.
- return this.date.getTimezoneOffset() * -60;
- },
-
- // Full Date/Time
-
- c: function(){
- // summary: ISO 8601 date (added in PHP 5)
- return this.Y() + "-" + this.m() + "-" + this.d() + "T" + this.h() + ":" + this.i() + ":" + this.s() + this.P();
- },
-
- r: function(){
- // summary: RFC 2822 formatted date
- return this.D() + ", " + this.d() + " " + this.M() + " " + this.Y() + " " + this.H() + ":" + this.i() + ":" + this.s() + " " + this.O();
- },
-
- U: function(){
- // summary: Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)
- return Math.floor(this.date.getTime() / 1000);
- }
-
-});
-
+}else{
+var i;
+if(Boolean(this.L())){
+i=366;
+}else{
+i=365;
+}
+if((i-z)<(4-w)){
+_c=1;
+}else{
+var j=z+(7-w)+(_d-1);
+_c=Math.ceil(j/7);
+if(_d>4){
+--_c;
+}
+}
+}
+return _c;
+},F:function(){
+return this.months[this.date.getMonth()];
+},m:function(){
+var n=this.n();
+return (n.length==1)?"0"+n:n;
+},M:function(){
+return this.months_3[this.date.getMonth()];
+},n:function(){
+return this.date.getMonth()+1+"";
+},t:function(){
+return (Boolean(this.L())&&this.date.getMonth()==1)?29:this.monthdays[this.getMonth()];
+},L:function(){
+return (dojo.date.isLeapYear(this.date))?"1":"0";
+},o:function(){
+},Y:function(){
+return this.date.getFullYear()+"";
+},y:function(){
+return this.Y().slice(-2);
+},a:function(){
+return this.date.getHours()>=12?"pm":"am";
+},b:function(){
+return this.a().toUpperCase();
+},B:function(){
+var _f=this.date.getTimezoneOffset()+60;
+var _10=(this.date.getHours()*3600)+(this.date.getMinutes()*60)+this.getSeconds()+(_f*60);
+var _11=Math.abs(Math.floor(_10/86.4)%1000)+"";
+while(_11.length<2){
+_11="0"+_11;
}
+return _11;
+},g:function(){
+return (this.date.getHours()>12)?this.date.getHours()-12+"":this.date.getHours()+"";
+},G:function(){
+return this.date.getHours()+"";
+},h:function(){
+var g=this.g();
+return (g.length==1)?"0"+g:g;
+},H:function(){
+var G=this.G();
+return (G.length==1)?"0"+G:G;
+},i:function(){
+var _12=this.date.getMinutes()+"";
+return (_12.length==1)?"0"+_12:_12;
+},s:function(){
+var _13=this.date.getSeconds()+"";
+return (_13.length==1)?"0"+_13:_13;
+},e:function(){
+return dojo.date.getTimezoneName(this.date);
+},I:function(){
+},O:function(){
+var off=Math.abs(this.date.getTimezoneOffset());
+var _14=Math.floor(off/60)+"";
+var _15=(off%60)+"";
+if(_14.length==1){
+_14="0"+_14;
+}
+if(_15.length==1){
+_14="0"+_15;
+}
+return ((this.date.getTimezoneOffset()<0)?"+":"-")+_14+_15;
+},P:function(){
+var O=this.O();
+return O.substring(0,2)+":"+O.substring(2,4);
+},T:function(){
+return this.e().substring(0,3);
+},Z:function(){
+return this.date.getTimezoneOffset()*-60;
+},c:function(){
+return this.Y()+"-"+this.m()+"-"+this.d()+"T"+this.h()+":"+this.i()+":"+this.s()+this.P();
+},r:function(){
+return this.D()+", "+this.d()+" "+this.M()+" "+this.Y()+" "+this.H()+":"+this.i()+":"+this.s()+" "+this.O();
+},U:function(){
+return Math.floor(this.date.getTime()/1000);
+}});
+}
diff --git a/js/dojo/dojox/date/posix.js b/js/dojo/dojox/date/posix.js
--- a/js/dojo/dojox/date/posix.js
+++ b/js/dojo/dojox/date/posix.js
@@ -1,293 +1,218 @@
-if(!dojo._hasResource["dojox.date.posix"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.date.posix"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.date.posix"]){
+dojo._hasResource["dojox.date.posix"]=true;
dojo.provide("dojox.date.posix");
-
dojo.require("dojo.date");
dojo.require("dojo.date.locale");
dojo.require("dojo.string");
-
-dojox.date.posix.strftime = function(/*Date*/dateObject, /*String*/format, /*String?*/locale){
-//
-// summary:
-// Formats the date object using the specifications of the POSIX strftime function
-//
-// description:
-// see <http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html>
-
- // zero pad
- var padChar = null;
- var _ = function(s, n){
- return dojo.string.pad(s, n || 2, padChar || "0");
- };
-
- var bundle = dojo.date.locale._getGregorianBundle(locale);
-
- var $ = function(property){
- switch(property){
- case "a": // abbreviated weekday name according to the current locale
- return dojo.date.locale.getNames('days', 'abbr', 'format', locale)[dateObject.getDay()];
-
- case "A": // full weekday name according to the current locale
- return dojo.date.locale.getNames('days', 'wide', 'format', locale)[dateObject.getDay()];
-
- case "b":
- case "h": // abbreviated month name according to the current locale
- return dojo.date.locale.getNames('months', 'abbr', 'format', locale)[dateObject.getMonth()];
-
- case "B": // full month name according to the current locale
- return dojo.date.locale.getNames('months', 'wide', 'format', locale)[dateObject.getMonth()];
-
- case "c": // preferred date and time representation for the current
- // locale
- return dojo.date.locale.format(dateObject, {formatLength: 'full', locale: locale});
-
- case "C": // century number (the year divided by 100 and truncated
- // to an integer, range 00 to 99)
- return _(Math.floor(dateObject.getFullYear()/100));
-
- case "d": // day of the month as a decimal number (range 01 to 31)
- return _(dateObject.getDate());
-
- case "D": // same as %m/%d/%y
- return $("m") + "/" + $("d") + "/" + $("y");
-
- case "e": // day of the month as a decimal number, a single digit is
- // preceded by a space (range ' 1' to '31')
- if(padChar == null){ padChar = " "; }
- return _(dateObject.getDate());
-
- case "f": // month as a decimal number, a single digit is
- // preceded by a space (range ' 1' to '12')
- if(padChar == null){ padChar = " "; }
- return _(dateObject.getMonth()+1);
-
- case "g": // like %G, but without the century.
- break;
-
- case "G": // The 4-digit year corresponding to the ISO week number
- // (see %V). This has the same format and value as %Y,
- // except that if the ISO week number belongs to the
- // previous or next year, that year is used instead.
- dojo.unimplemented("unimplemented modifier 'G'");
- break;
-
- case "F": // same as %Y-%m-%d
- return $("Y") + "-" + $("m") + "-" + $("d");
-
- case "H": // hour as a decimal number using a 24-hour clock (range
- // 00 to 23)
- return _(dateObject.getHours());
-
- case "I": // hour as a decimal number using a 12-hour clock (range
- // 01 to 12)
- return _(dateObject.getHours() % 12 || 12);
-
- case "j": // day of the year as a decimal number (range 001 to 366)
- return _(dojo.date.locale._getDayOfYear(dateObject), 3);
-
- case "k": // Hour as a decimal number using a 24-hour clock (range
- // 0 to 23 (space-padded))
- if(padChar == null){ padChar = " "; }
- return _(dateObject.getHours());
-
- case "l": // Hour as a decimal number using a 12-hour clock (range
- // 1 to 12 (space-padded))
- if(padChar == null){ padChar = " "; }
- return _(dateObject.getHours() % 12 || 12);
-
- case "m": // month as a decimal number (range 01 to 12)
- return _(dateObject.getMonth() + 1);
-
- case "M": // minute as a decimal number
- return _(dateObject.getMinutes());
-
- case "n":
- return "\n";
-
- case "p": // either `am' or `pm' according to the given time value,
- // or the corresponding strings for the current locale
- return bundle[dateObject.getHours() < 12 ? "am" : "pm"];
-
- case "r": // time in a.m. and p.m. notation
- return $("I") + ":" + $("M") + ":" + $("S") + " " + $("p");
-
- case "R": // time in 24 hour notation
- return $("H") + ":" + $("M");
-
- case "S": // second as a decimal number
- return _(dateObject.getSeconds());
-
- case "t":
- return "\t";
-
- case "T": // current time, equal to %H:%M:%S
- return $("H") + ":" + $("M") + ":" + $("S");
-
- case "u": // weekday as a decimal number [1,7], with 1 representing
- // Monday
- return String(dateObject.getDay() || 7);
-
- case "U": // week number of the current year as a decimal number,
- // starting with the first Sunday as the first day of the
- // first week
- return _(dojo.date.locale._getWeekOfYear(dateObject));
-
- case "V": // week number of the year (Monday as the first day of the
- // week) as a decimal number [01,53]. If the week containing
- // 1 January has four or more days in the new year, then it
- // is considered week 1. Otherwise, it is the last week of
- // the previous year, and the next week is week 1.
- return _(dojox.date.posix.getIsoWeekOfYear(dateObject));
-
- case "W": // week number of the current year as a decimal number,
- // starting with the first Monday as the first day of the
- // first week
- return _(dojo.date.locale._getWeekOfYear(dateObject, 1));
-
- case "w": // day of the week as a decimal, Sunday being 0
- return String(dateObject.getDay());
-
- case "x": // preferred date representation for the current locale
- // without the time
- return dojo.date.locale.format(dateObject, {selector:'date', formatLength: 'full', locale:locale});
-
- case "X": // preferred time representation for the current locale
- // without the date
- return dojo.date.locale.format(dateObject, {selector:'time', formatLength: 'full', locale:locale});
-
- case "y": // year as a decimal number without a century (range 00 to
- // 99)
- return _(dateObject.getFullYear()%100);
-
- case "Y": // year as a decimal number including the century
- return String(dateObject.getFullYear());
-
- case "z": // time zone or name or abbreviation
- var timezoneOffset = dateObject.getTimezoneOffset();
- return (timezoneOffset > 0 ? "-" : "+") +
- _(Math.floor(Math.abs(timezoneOffset)/60)) + ":" +
- _(Math.abs(timezoneOffset)%60);
-
- case "Z": // time zone or name or abbreviation
- return dojo.date.getTimezoneName(dateObject);
-
- case "%":
- return "%";
- }
- };
-
- // parse the formatting string and construct the resulting string
- var string = "";
- var i = 0;
- var index = 0;
- var switchCase = null;
- while ((index = format.indexOf("%", i)) != -1){
- string += format.substring(i, index++);
-
- // inspect modifier flag
- switch (format.charAt(index++)) {
- case "_": // Pad a numeric result string with spaces.
- padChar = " "; break;
- case "-": // Do not pad a numeric result string.
- padChar = ""; break;
- case "0": // Pad a numeric result string with zeros.
- padChar = "0"; break;
- case "^": // Convert characters in result string to uppercase.
- switchCase = "upper"; break;
- case "*": // Convert characters in result string to lowercase
- switchCase = "lower"; break;
- case "#": // Swap the case of the result string.
- switchCase = "swap"; break;
- default: // no modifier flag so decrement the index
- padChar = null; index--; break;
- }
-
- // toggle case if a flag is set
- var property = $(format.charAt(index++));
- switch (switchCase){
- case "upper":
- property = property.toUpperCase();
- break;
- case "lower":
- property = property.toLowerCase();
- break;
- case "swap": // Upper to lower, and versey-vicea
- var compareString = property.toLowerCase();
- var swapString = '';
- var ch = '';
- for (var j = 0; j < property.length; j++){
- ch = property.charAt(j);
- swapString += (ch == compareString.charAt(j)) ?
- ch.toUpperCase() : ch.toLowerCase();
- }
- property = swapString;
- break;
- default:
- break;
- }
- switchCase = null;
-
- string += property;
- i = index;
- }
- string += format.substring(i);
-
- return string; // String
+dojox.date.posix.strftime=function(_1,_2,_3){
+var _4=null;
+var _5=function(s,n){
+return dojo.string.pad(s,n||2,_4||"0");
+};
+var _6=dojo.date.locale._getGregorianBundle(_3);
+var $=function(_7){
+switch(_7){
+case "a":
+return dojo.date.locale.getNames("days","abbr","format",_3)[_1.getDay()];
+case "A":
+return dojo.date.locale.getNames("days","wide","format",_3)[_1.getDay()];
+case "b":
+case "h":
+return dojo.date.locale.getNames("months","abbr","format",_3)[_1.getMonth()];
+case "B":
+return dojo.date.locale.getNames("months","wide","format",_3)[_1.getMonth()];
+case "c":
+return dojo.date.locale.format(_1,{formatLength:"full",locale:_3});
+case "C":
+return _5(Math.floor(_1.getFullYear()/100));
+case "d":
+return _5(_1.getDate());
+case "D":
+return $("m")+"/"+$("d")+"/"+$("y");
+case "e":
+if(_4==null){
+_4=" ";
+}
+return _5(_1.getDate());
+case "f":
+if(_4==null){
+_4=" ";
+}
+return _5(_1.getMonth()+1);
+case "g":
+break;
+case "G":
+dojo.unimplemented("unimplemented modifier 'G'");
+break;
+case "F":
+return $("Y")+"-"+$("m")+"-"+$("d");
+case "H":
+return _5(_1.getHours());
+case "I":
+return _5(_1.getHours()%12||12);
+case "j":
+return _5(dojo.date.locale._getDayOfYear(_1),3);
+case "k":
+if(_4==null){
+_4=" ";
+}
+return _5(_1.getHours());
+case "l":
+if(_4==null){
+_4=" ";
+}
+return _5(_1.getHours()%12||12);
+case "m":
+return _5(_1.getMonth()+1);
+case "M":
+return _5(_1.getMinutes());
+case "n":
+return "\n";
+case "p":
+return _6[_1.getHours()<12?"am":"pm"];
+case "r":
+return $("I")+":"+$("M")+":"+$("S")+" "+$("p");
+case "R":
+return $("H")+":"+$("M");
+case "S":
+return _5(_1.getSeconds());
+case "t":
+return "\t";
+case "T":
+return $("H")+":"+$("M")+":"+$("S");
+case "u":
+return String(_1.getDay()||7);
+case "U":
+return _5(dojo.date.locale._getWeekOfYear(_1));
+case "V":
+return _5(dojox.date.posix.getIsoWeekOfYear(_1));
+case "W":
+return _5(dojo.date.locale._getWeekOfYear(_1,1));
+case "w":
+return String(_1.getDay());
+case "x":
+return dojo.date.locale.format(_1,{selector:"date",formatLength:"full",locale:_3});
+case "X":
+return dojo.date.locale.format(_1,{selector:"time",formatLength:"full",locale:_3});
+case "y":
+return _5(_1.getFullYear()%100);
+case "Y":
+return String(_1.getFullYear());
+case "z":
+var _8=_1.getTimezoneOffset();
+return (_8>0?"-":"+")+_5(Math.floor(Math.abs(_8)/60))+":"+_5(Math.abs(_8)%60);
+case "Z":
+return dojo.date.getTimezoneName(_1);
+case "%":
+return "%";
+}
};
-
-dojox.date.posix.getStartOfWeek = function(/*Date*/dateObject, /*Number*/firstDay){
- // summary: Return a date object representing the first day of the given
- // date's week.
- if(isNaN(firstDay)){
- firstDay = dojo.cldr.supplemental.getFirstDayOfWeek ? dojo.cldr.supplemental.getFirstDayOfWeek() : 0;
- }
- var offset = firstDay;
- if(dateObject.getDay() >= firstDay){
- offset -= dateObject.getDay();
- }else{
- offset -= (7 - dateObject.getDay());
- }
- var date = new Date(dateObject);
- date.setHours(0, 0, 0, 0);
- return dojo.date.add(date, "day", offset); // Date
+var _9="";
+var i=0;
+var _a=0;
+var _b=null;
+while((_a=_2.indexOf("%",i))!=-1){
+_9+=_2.substring(i,_a++);
+switch(_2.charAt(_a++)){
+case "_":
+_4=" ";
+break;
+case "-":
+_4="";
+break;
+case "0":
+_4="0";
+break;
+case "^":
+_b="upper";
+break;
+case "*":
+_b="lower";
+break;
+case "#":
+_b="swap";
+break;
+default:
+_4=null;
+_a--;
+break;
+}
+var _c=$(_2.charAt(_a++));
+switch(_b){
+case "upper":
+_c=_c.toUpperCase();
+break;
+case "lower":
+_c=_c.toLowerCase();
+break;
+case "swap":
+var _d=_c.toLowerCase();
+var _e="";
+var ch="";
+for(var j=0;j<_c.length;j++){
+ch=_c.charAt(j);
+_e+=(ch==_d.charAt(j))?ch.toUpperCase():ch.toLowerCase();
+}
+_c=_e;
+break;
+default:
+break;
}
-
-dojox.date.posix.setIsoWeekOfYear = function(/*Date*/dateObject, /*Number*/week){
- // summary: Set the ISO8601 week number of the given date.
- // The week containing January 4th is the first week of the year.
- // week:
- // can be positive or negative: -1 is the year's last week.
- if(!week){ return dateObject; }
- var currentWeek = dojox.date.posix.getIsoWeekOfYear(dateObject);
- var offset = week - currentWeek;
- if(week < 0){
- var weeks = dojox.date.posix.getIsoWeeksInYear(dateObject);
- offset = (weeks + week + 1) - currentWeek;
- }
- return dojo.date.add(dateObject, "week", offset); // Date
+_b=null;
+_9+=_c;
+i=_a;
+}
+_9+=_2.substring(i);
+return _9;
+};
+dojox.date.posix.getStartOfWeek=function(_f,_10){
+if(isNaN(_10)){
+_10=dojo.cldr.supplemental.getFirstDayOfWeek?dojo.cldr.supplemental.getFirstDayOfWeek():0;
+}
+var _11=_10;
+if(_f.getDay()>=_10){
+_11-=_f.getDay();
+}else{
+_11-=(7-_f.getDay());
+}
+var _12=new Date(_f);
+_12.setHours(0,0,0,0);
+return dojo.date.add(_12,"day",_11);
+};
+dojox.date.posix.setIsoWeekOfYear=function(_13,_14){
+if(!_14){
+return _13;
}
-
-dojox.date.posix.getIsoWeekOfYear = function(/*Date*/dateObject){
- // summary: Get the ISO8601 week number of the given date.
- // The week containing January 4th is the first week of the year.
- // See http://en.wikipedia.org/wiki/ISO_week_date
- var weekStart = dojox.date.posix.getStartOfWeek(dateObject, 1);
- var yearStart = new Date(dateObject.getFullYear(), 0, 4); // January 4th
- yearStart = dojox.date.posix.getStartOfWeek(yearStart, 1);
- var diff = weekStart.getTime() - yearStart.getTime();
- if(diff < 0){ return dojox.date.posix.getIsoWeeksInYear(weekStart); } // Integer
- return Math.ceil(diff / 604800000) + 1; // Integer
+var _15=dojox.date.posix.getIsoWeekOfYear(_13);
+var _16=_14-_15;
+if(_14<0){
+var _17=dojox.date.posix.getIsoWeeksInYear(_13);
+_16=(_17+_14+1)-_15;
}
-
-dojox.date.posix.getIsoWeeksInYear = function(/*Date*/dateObject) {
- // summary: Determine the number of ISO8601 weeks in the year of the given
- // date. Most years have 52 but some have 53.
- // See http://www.phys.uu.nl/~vgent/calendar/isocalendar_text3.htm
- function p(y) {
- return y + Math.floor(y/4) - Math.floor(y/100) + Math.floor(y/400);
- }
- var y = dateObject.getFullYear();
- return ( p(y) % 7 == 4 || p(y-1) % 7 == 3 ) ? 53 : 52; // Integer
+return dojo.date.add(_13,"week",_16);
+};
+dojox.date.posix.getIsoWeekOfYear=function(_18){
+var _19=dojox.date.posix.getStartOfWeek(_18,1);
+var _1a=new Date(_18.getFullYear(),0,4);
+_1a=dojox.date.posix.getStartOfWeek(_1a,1);
+var _1b=_19.getTime()-_1a.getTime();
+if(_1b<0){
+return dojox.date.posix.getIsoWeeksInYear(_19);
}
-
+return Math.ceil(_1b/604800000)+1;
+};
+dojox.date.posix.getIsoWeeksInYear=function(_1c){
+function p(y){
+return y+Math.floor(y/4)-Math.floor(y/100)+Math.floor(y/400);
+};
+var y=_1c.getFullYear();
+return (p(y)%7==4||p(y-1)%7==3)?53:52;
+};
}
diff --git a/js/dojo/dojox/dtl.js b/js/dojo/dojox/dtl.js
--- a/js/dojo/dojox/dtl.js
+++ b/js/dojo/dojox/dtl.js
@@ -1,6 +1,16 @@
-if(!dojo._hasResource["dojox.dtl"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.dtl"] = true;
-dojo.provide("dojox.dtl");
-dojo.require("dojox.dtl._base");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-}
+/*
+ This is a compiled version of Dojo, built for deployment and not for
+ development. To get an editable version, please visit:
+
+ http://dojotoolkit.org
+
+ for documentation and information on getting the source.
+*/
+
+if(!dojo._hasResource["dojox.string.Builder"]){dojo._hasResource["dojox.string.Builder"]=true;dojo.provide("dojox.string.Builder");dojox.string.Builder=function(_1){var b="";this.length=0;this.append=function(s){if(arguments.length>1){var _2="",l=arguments.length;switch(l){case 9:_2=""+arguments[8]+_2;case 8:_2=""+arguments[7]+_2;case 7:_2=""+arguments[6]+_2;case 6:_2=""+arguments[5]+_2;case 5:_2=""+arguments[4]+_2;case 4:_2=""+arguments[3]+_2;case 3:_2=""+arguments[2]+_2;case 2:b+=""+arguments[0]+arguments[1]+_2;break;default:var i=0;while(i<arguments.length){_2+=arguments[i++];}b+=_2;}}else{b+=s;}this.length=b.length;return this;};this.concat=function(s){return this.append.apply(this,arguments);};this.appendArray=function(_3){return this.append.apply(this,_3);};this.clear=function(){b="";this.length=0;return this;};this.replace=function(_4,_5){b=b.replace(_4,_5);this.length=b.length;return this;};this.remove=function(_6,_7){if(_7===undefined){_7=b.length;}if(_7==0){return this;}b=b.substr(0,_6)+b.substr(_6+_7);this.length=b.length;return this;};this.insert=function(_8,_9){if(_8==0){b=_9+b;}else{b=b.slice(0,_8)+_9+b.slice(_8);}this.length=b.length;return this;};this.toString=function(){return b;};if(_1){this.append(_1);}};}if(!dojo._hasResource["dojox.string.tokenize"]){dojo._hasResource["dojox.string.tokenize"]=true;dojo.provide("dojox.string.tokenize");dojox.string.tokenize=function(_a,re,_b,_c){var _d=[];var _e,_f,_10=0;while(_e=re.exec(_a)){_f=_a.slice(_10,re.lastIndex-_e[0].length);if(_f.length){_d.push(_f);}if(_b){if(dojo.isOpera){var _11=_e.slice(0);while(_11.length<_e.length){_11.push(null);}_e=_11;}var _12=_b.apply(_c,_e.slice(1).concat(_d.length));if(typeof _12!="undefined"){_d.push(_12);}}_10=re.lastIndex;}_f=_a.slice(_10);if(_f.length){_d.push(_f);}return _d;};}if(!dojo._hasResource["dojox.dtl._base"]){dojo._hasResource["dojox.dtl._base"]=true;dojo.provide("dojox.dtl._base");dojo.experimental("dojox.dtl");(function(){var dd=dojox.dtl;dd.TOKEN_BLOCK=-1;dd.TOKEN_VAR=-2;dd.TOKEN_COMMENT=-3;dd.TOKEN_TEXT=3;dd._Context=dojo.extend(function(_13){dojo._mixin(this,_13||{});this._dicts=[];},{push:function(){var _14=this;var _15=dojo.delegate(this);_15.pop=function(){return _14;};return _15;},pop:function(){throw new Error("pop() called on empty Context");},get:function(key,_16){if(typeof this[key]!="undefined"){return this._normalize(this[key]);}for(var i=0,_17;_17=this._dicts[i];i++){if(typeof _17[key]!="undefined"){return this._normalize(_17[key]);}}return _16;},_normalize:function(_18){if(_18 instanceof Date){_18.year=_18.getFullYear();_18.month=_18.getMonth()+1;_18.day=_18.getDate();_18.date=_18.year+"-"+("0"+_18.month).slice(-2)+"-"+("0"+_18.day).slice(-2);_18.hour=_18.getHours();_18.minute=_18.getMinutes();_18.second=_18.getSeconds();_18.microsecond=_18.getMilliseconds();}return _18;},update:function(_19){var _1a=this.push();if(_19){dojo._mixin(this,_19);}return _1a;}});var _1b=/("(?:[^"\\]*(?:\\.[^"\\]*)*)"|'(?:[^'\\]*(?:\\.[^'\\]*)*)'|[^\s]+)/g;var _1c=/\s+/g;var _1d=function(_1e,_1f){_1e=_1e||_1c;if(!(_1e instanceof RegExp)){_1e=new RegExp(_1e,"g");}if(!_1e.global){throw new Error("You must use a globally flagged RegExp with split "+_1e);}_1e.exec("");var _20,_21=[],_22=0,i=0;while(_20=_1e.exec(this)){_21.push(this.slice(_22,_1e.lastIndex-_20[0].length));_22=_1e.lastIndex;if(_1f&&(++i>_1f-1)){break;}}_21.push(this.slice(_22));return _21;};dd.Token=function(_23,_24){this.token_type=_23;this.contents=new String(dojo.trim(_24));this.contents.split=_1d;this.split=function(){return String.prototype.split.apply(this.contents,arguments);};};dd.Token.prototype.split_contents=function(_25){var bit,_26=[],i=0;_25=_25||999;while(i++<_25&&(bit=_1b.exec(this.contents))){bit=bit[0];if(bit.charAt(0)=="\""&&bit.slice(-1)=="\""){_26.push("\""+bit.slice(1,-1).replace("\\\"","\"").replace("\\\\","\\")+"\"");}else{if(bit.charAt(0)=="'"&&bit.slice(-1)=="'"){_26.push("'"+bit.slice(1,-1).replace("\\'","'").replace("\\\\","\\")+"'");}else{_26.push(bit);}}}return _26;};var ddt=dd.text={_get:function(_27,_28,_29){var _2a=dd.register.get(_27,_28.toLowerCase(),_29);if(!_2a){if(!_29){throw new Error("No tag found for "+_28);}return null;}var fn=_2a[1];var _2b=_2a[2];var _2c;if(fn.indexOf(":")!=-1){_2c=fn.split(":");fn=_2c.pop();}dojo["require"](_2b);var _2d=dojo.getObject(_2b);return _2d[fn||_28]||_2d[_28+"_"]||_2d[fn+"_"];},getTag:function(_2e,_2f){return ddt._get("tag",_2e,_2f);},getFilter:function(_30,_31){return ddt._get("filter",_30,_31);},getTemplate:function(_32){return new dd.Template(ddt.getTemplateString(_32));},getTemplateString:function(_33){return dojo._getText(_33.toString())||"";},_resolveLazy:function(_34,_35,_36){if(_35){if(_36){return dojo.fromJson(dojo._getText(_34))||{};}else{return dd.text.getTemplateString(_34);}}else{return dojo.xhrGet({handleAs:(_36)?"json":"text",url:_34});}},_resolveTemplateArg:function(arg,_37){if(ddt._isTemplate(arg)){if(!_37){var d=new dojo.Deferred();d.callback(arg);return d;}return arg;}return ddt._resolveLazy(arg,_37);},_isTemplate:function(arg){return (typeof arg=="undefined")||(typeof arg=="string"&&(arg.match(/^\s*[<{]/)||arg.indexOf(" ")!=-1));},_resolveContextArg:function(arg,_38){if(arg.constructor==Object){if(!_38){var d=new dojo.Deferred;d.callback(arg);return d;}return arg;}return ddt._resolveLazy(arg,_38,true);},_re:/(?:\{\{\s*(.+?)\s*\}\}|\{%\s*(load\s*)?(.+?)\s*%\})/g,tokenize:function(str){return dojox.string.tokenize(str,ddt._re,ddt._parseDelims);},_parseDelims:function(_39,_3a,tag){if(_39){return [dd.TOKEN_VAR,_39];}else{if(_3a){var _3b=dojo.trim(tag).split(/\s+/g);for(var i=0,_3c;_3c=_3b[i];i++){dojo["require"](_3c);}}else{return [dd.TOKEN_BLOCK,tag];}}}};dd.Template=dojo.extend(function(_3d,_3e){var str=_3e?_3d:ddt._resolveTemplateArg(_3d,true)||"";var _3f=ddt.tokenize(str);var _40=new dd._Parser(_3f);this.nodelist=_40.parse();},{update:function(_41,_42){return ddt._resolveContextArg(_42).addCallback(this,function(_43){var _44=this.render(new dd._Context(_43));if(_41.forEach){_41.forEach(function(_45){_45.innerHTML=_44;});}else{dojo.byId(_41).innerHTML=_44;}return this;});},render:function(_46,_47){_47=_47||this.getBuffer();_46=_46||new dd._Context({});return this.nodelist.render(_46,_47)+"";},getBuffer:function(){return new dojox.string.Builder();}});var _48=/\{\{\s*(.+?)\s*\}\}/g;dd.quickFilter=function(str){if(!str){return new dd._NodeList();}if(str.indexOf("{%")==-1){return new dd._QuickNodeList(dojox.string.tokenize(str,_48,function(_49){return new dd._Filter(_49);}));}};dd._QuickNodeList=dojo.extend(function(_4a){this.contents=_4a;},{render:function(_4b,_4c){for(var i=0,l=this.contents.length;i<l;i++){if(this.contents[i].resolve){_4c=_4c.concat(this.contents[i].resolve(_4b));}else{_4c=_4c.concat(this.contents[i]);}}return _4c;},dummyRender:function(_4d){return this.render(_4d,dd.Template.prototype.getBuffer()).toString();},clone:function(_4e){return this;}});dd._Filter=dojo.extend(function(_4f){if(!_4f){throw new Error("Filter must be called with variable name");}this.contents=_4f;var _50=this._cache[_4f];if(_50){this.key=_50[0];this.filters=_50[1];}else{this.filters=[];dojox.string.tokenize(_4f,this._re,this._tokenize,this);this._cache[_4f]=[this.key,this.filters];}},{_cache:{},_re:/(?:^_\("([^\\"]*(?:\\.[^\\"])*)"\)|^"([^\\"]*(?:\\.[^\\"]*)*)"|^([a-zA-Z0-9_.]+)|\|(\w+)(?::(?:_\("([^\\"]*(?:\\.[^\\"])*)"\)|"([^\\"]*(?:\\.[^\\"]*)*)"|([a-zA-Z0-9_.]+)|'([^\\']*(?:\\.[^\\']*)*)'))?|^'([^\\']*(?:\\.[^\\']*)*)')/g,_values:{0:"\"",1:"\"",2:"",8:"\""},_args:{4:"\"",5:"\"",6:"",7:"'"},_tokenize:function(){var pos,arg;for(var i=0,has=[];i<arguments.length;i++){has[i]=(typeof arguments[i]!="undefined"&&typeof arguments[i]=="string"&&arguments[i]);}if(!this.key){for(pos in this._values){if(has[pos]){this.key=this._values[pos]+arguments[pos]+this._values[pos];break;}}}else{for(pos in this._args){if(has[pos]){var _51=arguments[pos];if(this._args[pos]=="'"){_51=_51.replace(/\\'/g,"'");}else{if(this._args[pos]=="\""){_51=_51.replace(/\\"/g,"\"");}}arg=[!this._args[pos],_51];break;}}var fn=ddt.getFilter(arguments[3]);if(!dojo.isFunction(fn)){throw new Error(arguments[3]+" is not registered as a filter");}this.filters.push([fn,arg]);}},getExpression:function(){return this.contents;},resolve:function(_52){if(typeof this.key=="undefined"){return "";}var str=this.resolvePath(this.key,_52);for(var i=0,_53;_53=this.filters[i];i++){if(_53[1]){if(_53[1][0]){str=_53[0](str,this.resolvePath(_53[1][1],_52));}else{str=_53[0](str,_53[1][1]);}}else{str=_53[0](str);}}return str;},resolvePath:function(_54,_55){var _56,_57;var _58=_54.charAt(0);var _59=_54.slice(-1);if(!isNaN(parseInt(_58))){_56=(_54.indexOf(".")==-1)?parseInt(_54):parseFloat(_54);}else{if(_58=="\""&&_58==_59){_56=_54.slice(1,-1);}else{if(_54=="true"){return true;}if(_54=="false"){return false;}if(_54=="null"||_54=="None"){return null;}_57=_54.split(".");_56=_55.get(_57[0]);if(dojo.isFunction(_56)){var _5a=_55.getThis&&_55.getThis();if(_56.alters_data){_56="";}else{if(_5a){_56=_56.call(_5a);}else{_56="";}}}for(var i=1;i<_57.length;i++){var _5b=_57[i];if(_56){var _5c=_56;if(dojo.isObject(_56)&&_5b=="items"&&typeof _56[_5b]=="undefined"){var _5d=[];for(var key in _56){_5d.push([key,_56[key]]);}_56=_5d;continue;}if(_56.get&&dojo.isFunction(_56.get)&&_56.get.safe){_56=_56.get(_5b);}else{if(typeof _56[_5b]=="undefined"){_56=_56[_5b];break;}else{_56=_56[_5b];}}if(dojo.isFunction(_56)){if(_56.alters_data){_56="";}else{_56=_56.call(_5c);}}else{if(_56 instanceof Date){_56=dd._Context.prototype._normalize(_56);}}}else{return "";}}}}return _56;}});dd._TextNode=dd._Node=dojo.extend(function(obj){this.contents=obj;},{set:function(_5e){this.contents=_5e;return this;},render:function(_5f,_60){return _60.concat(this.contents);},isEmpty:function(){return !dojo.trim(this.contents);},clone:function(){return this;}});dd._NodeList=dojo.extend(function(_61){this.contents=_61||[];this.last="";},{push:function(_62){this.contents.push(_62);return this;},concat:function(_63){this.contents=this.contents.concat(_63);return this;},render:function(_64,_65){for(var i=0;i<this.contents.length;i++){_65=this.contents[i].render(_64,_65);if(!_65){throw new Error("Template must return buffer");}}return _65;},dummyRender:function(_66){return this.render(_66,dd.Template.prototype.getBuffer()).toString();},unrender:function(){return arguments[1];},clone:function(){return this;},rtrim:function(){while(1){i=this.contents.length-1;if(this.contents[i] instanceof dd._TextNode&&this.contents[i].isEmpty()){this.contents.pop();}else{break;}}return this;}});dd._VarNode=dojo.extend(function(str){this.contents=new dd._Filter(str);},{render:function(_67,_68){var str=this.contents.resolve(_67);if(!str.safe){str=dd._base.escape(""+str);}return _68.concat(str);}});dd._noOpNode=new function(){this.render=this.unrender=function(){return arguments[1];};this.clone=function(){return this;};};dd._Parser=dojo.extend(function(_69){this.contents=_69;},{i:0,parse:function(_6a){var _6b={},_6c;_6a=_6a||[];for(var i=0;i<_6a.length;i++){_6b[_6a[i]]=true;}var _6d=new dd._NodeList();while(this.i<this.contents.length){_6c=this.contents[this.i++];if(typeof _6c=="string"){_6d.push(new dd._TextNode(_6c));}else{var _6e=_6c[0];var _6f=_6c[1];if(_6e==dd.TOKEN_VAR){_6d.push(new dd._VarNode(_6f));}else{if(_6e==dd.TOKEN_BLOCK){if(_6b[_6f]){--this.i;return _6d;}var cmd=_6f.split(/\s+/g);if(cmd.length){cmd=cmd[0];var fn=ddt.getTag(cmd);if(fn){_6d.push(fn(this,new dd.Token(_6e,_6f)));}}}}}}if(_6a.length){throw new Error("Could not find closing tag(s): "+_6a.toString());}this.contents.length=0;return _6d;},next_token:function(){var _70=this.contents[this.i++];return new dd.Token(_70[0],_70[1]);},delete_first_token:function(){this.i++;},skip_past:function(_71){while(this.i<this.contents.length){var _72=this.contents[this.i++];if(_72[0]==dd.TOKEN_BLOCK&&_72[1]==_71){return;}}throw new Error("Unclosed tag found when looking for "+_71);},create_variable_node:function(_73){return new dd._VarNode(_73);},create_text_node:function(_74){return new dd._TextNode(_74||"");},getTemplate:function(_75){return new dd.Template(_75);}});dd.register={_registry:{attributes:[],tags:[],filters:[]},get:function(_76,_77){var _78=dd.register._registry[_76+"s"];for(var i=0,_79;_79=_78[i];i++){if(typeof _79[0]=="string"){if(_79[0]==_77){return _79;}}else{if(_77.match(_79[0])){return _79;}}}},getAttributeTags:function(){var _7a=[];var _7b=dd.register._registry.attributes;for(var i=0,_7c;_7c=_7b[i];i++){if(_7c.length==3){_7a.push(_7c);}else{var fn=dojo.getObject(_7c[1]);if(fn&&dojo.isFunction(fn)){_7c.push(fn);_7a.push(_7c);}}}return _7a;},_any:function(_7d,_7e,_7f){for(var _80 in _7f){for(var i=0,fn;fn=_7f[_80][i];i++){var key=fn;if(dojo.isArray(fn)){key=fn[0];fn=fn[1];}if(typeof key=="string"){if(key.substr(0,5)=="attr:"){var _81=fn;if(_81.substr(0,5)=="attr:"){_81=_81.slice(5);}dd.register._registry.attributes.push([_81.toLowerCase(),_7e+"."+_80+"."+_81]);}key=key.toLowerCase();}dd.register._registry[_7d].push([key,fn,_7e+"."+_80]);}}},tags:function(_82,_83){dd.register._any("tags",_82,_83);},filters:function(_84,_85){dd.register._any("filters",_84,_85);}};var _86=/&/g;var _87=/</g;var _88=/>/g;var _89=/'/g;var _8a=/"/g;dd._base.escape=function(_8b){return dd.mark_safe(_8b.replace(_86,"&amp;").replace(_87,"&lt;").replace(_88,"&gt;").replace(_8a,"&quot;").replace(_89,"&#39;"));};dd._base.safe=function(_8c){if(typeof _8c=="string"){_8c=new String(_8c);}if(typeof _8c=="object"){_8c.safe=true;}return _8c;};dd.mark_safe=dd._base.safe;dd.register.tags("dojox.dtl.tag",{"date":["now"],"logic":["if","for","ifequal","ifnotequal"],"loader":["extends","block","include","load","ssi"],"misc":["comment","debug","filter","firstof","spaceless","templatetag","widthratio","with"],"loop":["cycle","ifchanged","regroup"]});dd.register.filters("dojox.dtl.filter",{"dates":["date","time","timesince","timeuntil"],"htmlstrings":["linebreaks","linebreaksbr","removetags","striptags"],"integers":["add","get_digit"],"lists":["dictsort","dictsortreversed","first","join","length","length_is","random","slice","unordered_list"],"logic":["default","default_if_none","divisibleby","yesno"],"misc":["filesizeformat","pluralize","phone2numeric","pprint"],"strings":["addslashes","capfirst","center","cut","fix_ampersands","floatformat","iriencode","linenumbers","ljust","lower","make_list","rjust","slugify","stringformat","title","truncatewords","truncatewords_html","upper","urlencode","urlize","urlizetrunc","wordcount","wordwrap"]});dd.register.filters("dojox.dtl",{"_base":["escape","safe"]});})();}if(!dojo._hasResource["dojox.dtl"]){dojo._hasResource["dojox.dtl"]=true;dojo.provide("dojox.dtl");}if(!dojo._hasResource["dojox.dtl.Context"]){dojo._hasResource["dojox.dtl.Context"]=true;dojo.provide("dojox.dtl.Context");dojox.dtl.Context=dojo.extend(function(_8d){this._this={};dojox.dtl._Context.call(this,_8d);},dojox.dtl._Context.prototype,{getKeys:function(){var _8e=[];for(var key in this){if(this.hasOwnProperty(key)&&key!="_dicts"&&key!="_this"){_8e.push(key);}}return _8e;},extend:function(obj){return dojo.delegate(this,obj);},filter:function(_8f){var _90=new dojox.dtl.Context();var _91=[];var i,arg;if(_8f instanceof dojox.dtl.Context){_91=_8f.getKeys();}else{if(typeof _8f=="object"){for(var key in _8f){_91.push(key);}}else{for(i=0;arg=arguments[i];i++){if(typeof arg=="string"){_91.push(arg);}}}}for(i=0,key;key=_91[i];i++){_90[key]=this[key];}return _90;},setThis:function(_92){this._this=_92;},getThis:function(){return this._this;},hasKey:function(key){if(typeof this[key]!="undefined"){return true;}for(var i=0,_93;_93=this._dicts[i];i++){if(typeof _93[key]!="undefined"){return true;}}return false;}});}if(!dojo._hasResource["dojox.dtl.tag.logic"]){dojo._hasResource["dojox.dtl.tag.logic"]=true;dojo.provide("dojox.dtl.tag.logic");(function(){var dd=dojox.dtl;var ddt=dd.text;var _94=dd.tag.logic;_94.IfNode=dojo.extend(function(_95,_96,_97,_98){this.bools=_95;this.trues=_96;this.falses=_97;this.type=_98;},{render:function(_99,_9a){var i,_9b,_9c,_9d,_9e;if(this.type=="or"){for(i=0;_9b=this.bools[i];i++){_9c=_9b[0];_9d=_9b[1];_9e=_9d.resolve(_99);if((_9e&&!_9c)||(_9c&&!_9e)){if(this.falses){_9a=this.falses.unrender(_99,_9a);}return (this.trues)?this.trues.render(_99,_9a,this):_9a;}}if(this.trues){_9a=this.trues.unrender(_99,_9a);}return (this.falses)?this.falses.render(_99,_9a,this):_9a;}else{for(i=0;_9b=this.bools[i];i++){_9c=_9b[0];_9d=_9b[1];_9e=_9d.resolve(_99);if(_9e==_9c){if(this.trues){_9a=this.trues.unrender(_99,_9a);}return (this.falses)?this.falses.render(_99,_9a,this):_9a;}}if(this.falses){_9a=this.falses.unrender(_99,_9a);}return (this.trues)?this.trues.render(_99,_9a,this):_9a;}return _9a;},unrender:function(_9f,_a0){_a0=(this.trues)?this.trues.unrender(_9f,_a0):_a0;_a0=(this.falses)?this.falses.unrender(_9f,_a0):_a0;return _a0;},clone:function(_a1){var _a2=(this.trues)?this.trues.clone(_a1):null;var _a3=(this.falses)?this.falses.clone(_a1):null;return new this.constructor(this.bools,_a2,_a3,this.type);}});_94.IfEqualNode=dojo.extend(function(_a4,_a5,_a6,_a7,_a8){this.var1=new dd._Filter(_a4);this.var2=new dd._Filter(_a5);this.trues=_a6;this.falses=_a7;this.negate=_a8;},{render:function(_a9,_aa){var _ab=this.var1.resolve(_a9);var _ac=this.var2.resolve(_a9);_ab=(typeof _ab!="undefined")?_ab:"";_ac=(typeof _ab!="undefined")?_ac:"";if((this.negate&&_ab!=_ac)||(!this.negate&&_ab==_ac)){if(this.falses){_aa=this.falses.unrender(_a9,_aa,this);}return (this.trues)?this.trues.render(_a9,_aa,this):_aa;}if(this.trues){_aa=this.trues.unrender(_a9,_aa,this);}return (this.falses)?this.falses.render(_a9,_aa,this):_aa;},unrender:function(_ad,_ae){return _94.IfNode.prototype.unrender.call(this,_ad,_ae);},clone:function(_af){var _b0=this.trues?this.trues.clone(_af):null;var _b1=this.falses?this.falses.clone(_af):null;return new this.constructor(this.var1.getExpression(),this.var2.getExpression(),_b0,_b1,this.negate);}});_94.ForNode=dojo.extend(function(_b2,_b3,_b4,_b5){this.assign=_b2;this.loop=new dd._Filter(_b3);this.reversed=_b4;this.nodelist=_b5;this.pool=[];},{render:function(_b6,_b7){var i,j,k;var _b8=false;var _b9=this.assign;for(k=0;k<_b9.length;k++){if(typeof _b6[_b9[k]]!="undefined"){_b8=true;_b6=_b6.push();break;}}if(!_b8&&_b6.forloop){_b8=true;_b6=_b6.push();}var _ba=this.loop.resolve(_b6)||[];for(i=_ba.length;i<this.pool.length;i++){this.pool[i].unrender(_b6,_b7,this);}if(this.reversed){_ba=_ba.slice(0).reverse();}var _bb=dojo.isObject(_ba)&&!dojo.isArrayLike(_ba);var _bc=[];if(_bb){for(var key in _ba){_bc.push(_ba[key]);}}else{_bc=_ba;}var _bd=_b6.forloop={parentloop:_b6.get("forloop",{})};var j=0;for(i=0;i<_bc.length;i++){var _be=_bc[i];_bd.counter0=j;_bd.counter=j+1;_bd.revcounter0=_bc.length-j-1;_bd.revcounter=_bc.length-j;_bd.first=!j;_bd.last=(j==_bc.length-1);if(_b9.length>1&&dojo.isArrayLike(_be)){if(!_b8){_b8=true;_b6=_b6.push();}var _bf={};for(k=0;k<_be.length&&k<_b9.length;k++){_bf[_b9[k]]=_be[k];}dojo.mixin(_b6,_bf);}else{_b6[_b9[0]]=_be;}if(j+1>this.pool.length){this.pool.push(this.nodelist.clone(_b7));}_b7=this.pool[j++].render(_b6,_b7,this);}delete _b6.forloop;if(_b8){_b6=_b6.pop();}else{for(k=0;k<_b9.length;k++){delete _b6[_b9[k]];}}return _b7;},unrender:function(_c0,_c1){for(var i=0,_c2;_c2=this.pool[i];i++){_c1=_c2.unrender(_c0,_c1);}return _c1;},clone:function(_c3){return new this.constructor(this.assign,this.loop.getExpression(),this.reversed,this.nodelist.clone(_c3));}});dojo.mixin(_94,{if_:function(_c4,_c5){var i,_c6,_c7,_c8=[],_c9=_c5.contents.split();_c9.shift();_c5=_c9.join(" ");_c9=_c5.split(" and ");if(_c9.length==1){_c7="or";_c9=_c5.split(" or ");}else{_c7="and";for(i=0;i<_c9.length;i++){if(_c9[i].indexOf(" or ")!=-1){throw new Error("'if' tags can't mix 'and' and 'or'");}}}for(i=0;_c6=_c9[i];i++){var not=false;if(_c6.indexOf("not ")==0){_c6=_c6.slice(4);not=true;}_c8.push([not,new dd._Filter(_c6)]);}var _ca=_c4.parse(["else","endif"]);var _cb=false;var _c5=_c4.next_token();if(_c5.contents=="else"){_cb=_c4.parse(["endif"]);_c4.next_token();}return new _94.IfNode(_c8,_ca,_cb,_c7);},_ifequal:function(_cc,_cd,_ce){var _cf=_cd.split_contents();if(_cf.length!=3){throw new Error(_cf[0]+" takes two arguments");}var end="end"+_cf[0];var _d0=_cc.parse(["else",end]);var _d1=false;var _cd=_cc.next_token();if(_cd.contents=="else"){_d1=_cc.parse([end]);_cc.next_token();}return new _94.IfEqualNode(_cf[1],_cf[2],_d0,_d1,_ce);},ifequal:function(_d2,_d3){return _94._ifequal(_d2,_d3);},ifnotequal:function(_d4,_d5){return _94._ifequal(_d4,_d5,true);},for_:function(_d6,_d7){var _d8=_d7.contents.split();if(_d8.length<4){throw new Error("'for' statements should have at least four words: "+_d7.contents);}var _d9=_d8[_d8.length-1]=="reversed";var _da=(_d9)?-3:-2;if(_d8[_d8.length+_da]!="in"){throw new Error("'for' tag received an invalid argument: "+_d7.contents);}var _db=_d8.slice(1,_da).join(" ").split(/ *, */);for(var i=0;i<_db.length;i++){if(!_db[i]||_db[i].indexOf(" ")!=-1){throw new Error("'for' tag received an invalid argument: "+_d7.contents);}}var _dc=_d6.parse(["endfor"]);_d6.next_token();return new _94.ForNode(_db,_d8[_d8.length+_da+1],_d9,_dc);}});})();}if(!dojo._hasResource["dojox.dtl.tag.loop"]){dojo._hasResource["dojox.dtl.tag.loop"]=true;dojo.provide("dojox.dtl.tag.loop");(function(){var dd=dojox.dtl;var _dd=dd.tag.loop;_dd.CycleNode=dojo.extend(function(_de,_df,_e0,_e1){this.cyclevars=_de;this.name=_df;this.contents=_e0;this.shared=_e1||{counter:-1,map:{}};},{render:function(_e2,_e3){if(_e2.forloop&&!_e2.forloop.counter0){this.shared.counter=-1;}++this.shared.counter;var _e4=this.cyclevars[this.shared.counter%this.cyclevars.length];var map=this.shared.map;if(!map[_e4]){map[_e4]=new dd._Filter(_e4);}_e4=map[_e4].resolve(_e2,_e3);if(this.name){_e2[this.name]=_e4;}this.contents.set(_e4);return this.contents.render(_e2,_e3);},unrender:function(_e5,_e6){return this.contents.unrender(_e5,_e6);},clone:function(_e7){return new this.constructor(this.cyclevars,this.name,this.contents.clone(_e7),this.shared);}});_dd.IfChangedNode=dojo.extend(function(_e8,_e9,_ea){this.nodes=_e8;this._vars=_e9;this.shared=_ea||{last:null,counter:0};this.vars=dojo.map(_e9,function(_eb){return new dojox.dtl._Filter(_eb);});},{render:function(_ec,_ed){if(_ec.forloop){if(_ec.forloop.counter<=this.shared.counter){this.shared.last=null;}this.shared.counter=_ec.forloop.counter;}var _ee;if(this.vars.length){_ee=dojo.toJson(dojo.map(this.vars,function(_ef){return _ef.resolve(_ec);}));}else{_ee=this.nodes.dummyRender(_ec,_ed);}if(_ee!=this.shared.last){var _f0=(this.shared.last===null);this.shared.last=_ee;_ec=_ec.push();_ec.ifchanged={firstloop:_f0};_ed=this.nodes.render(_ec,_ed);_ec=_ec.pop();}else{_ed=this.nodes.unrender(_ec,_ed);}return _ed;},unrender:function(_f1,_f2){return this.nodes.unrender(_f1,_f2);},clone:function(_f3){return new this.constructor(this.nodes.clone(_f3),this._vars,this.shared);}});_dd.RegroupNode=dojo.extend(function(_f4,key,_f5){this._expression=_f4;this.expression=new dd._Filter(_f4);this.key=key;this.alias=_f5;},{_push:function(_f6,_f7,_f8){if(_f8.length){_f6.push({grouper:_f7,list:_f8});}},render:function(_f9,_fa){_f9[this.alias]=[];var _fb=this.expression.resolve(_f9);if(_fb){var _fc=null;var _fd=[];for(var i=0;i<_fb.length;i++){var id=_fb[i][this.key];if(_fc!==id){this._push(_f9[this.alias],_fc,_fd);_fc=id;_fd=[_fb[i]];}else{_fd.push(_fb[i]);}}this._push(_f9[this.alias],_fc,_fd);}return _fa;},unrender:function(_fe,_ff){return _ff;},clone:function(_100,_101){return this;}});dojo.mixin(_dd,{cycle:function(_102,_103){var args=_103.split_contents();if(args.length<2){throw new Error("'cycle' tag requires at least two arguments");}if(args[1].indexOf(",")!=-1){var vars=args[1].split(",");args=[args[0]];for(var i=0;i<vars.length;i++){args.push("\""+vars[i]+"\"");}}if(args.length==2){var name=args[args.length-1];if(!_102._namedCycleNodes){throw new Error("No named cycles in template: '"+name+"' is not defined");}if(!_102._namedCycleNodes[name]){throw new Error("Named cycle '"+name+"' does not exist");}return _102._namedCycleNodes[name];}if(args.length>4&&args[args.length-2]=="as"){var name=args[args.length-1];var node=new _dd.CycleNode(args.slice(1,args.length-2),name,_102.create_text_node());if(!_102._namedCycleNodes){_102._namedCycleNodes={};}_102._namedCycleNodes[name]=node;}else{node=new _dd.CycleNode(args.slice(1),null,_102.create_text_node());}return node;},ifchanged:function(_104,_105){var _106=_105.contents.split();var _107=_104.parse(["endifchanged"]);_104.delete_first_token();return new _dd.IfChangedNode(_107,_106.slice(1));},regroup:function(_108,_109){var _10a=dojox.string.tokenize(_109.contents,/(\s+)/g,function(_10b){return _10b;});if(_10a.length<11||_10a[_10a.length-3]!="as"||_10a[_10a.length-7]!="by"){throw new Error("Expected the format: regroup list by key as newList");}var _10c=_10a.slice(2,-8).join("");var key=_10a[_10a.length-5];var _10d=_10a[_10a.length-1];return new _dd.RegroupNode(_10c,key,_10d);}});})();}if(!dojo._hasResource["dojo.date"]){dojo._hasResource["dojo.date"]=true;dojo.provide("dojo.date");dojo.date.getDaysInMonth=function(_10e){var _10f=_10e.getMonth();var days=[31,28,31,30,31,30,31,31,30,31,30,31];if(_10f==1&&dojo.date.isLeapYear(_10e)){return 29;}return days[_10f];};dojo.date.isLeapYear=function(_110){var year=_110.getFullYear();return !(year%400)||(!(year%4)&&!!(year%100));};dojo.date.getTimezoneName=function(_111){var str=_111.toString();var tz="";var _112;var pos=str.indexOf("(");if(pos>-1){tz=str.substring(++pos,str.indexOf(")"));}else{var pat=/([A-Z\/]+) \d{4}$/;if((_112=str.match(pat))){tz=_112[1];}else{str=_111.toLocaleString();pat=/ ([A-Z\/]+)$/;if((_112=str.match(pat))){tz=_112[1];}}}return (tz=="AM"||tz=="PM")?"":tz;};dojo.date.compare=function(_113,_114,_115){_113=new Date(+_113);_114=new Date(+(_114||new Date()));if(_115=="date"){_113.setHours(0,0,0,0);_114.setHours(0,0,0,0);}else{if(_115=="time"){_113.setFullYear(0,0,0);_114.setFullYear(0,0,0);}}if(_113>_114){return 1;}if(_113<_114){return -1;}return 0;};dojo.date.add=function(date,_116,_117){var sum=new Date(+date);var _118=false;var _119="Date";switch(_116){case "day":break;case "weekday":var days,_11a;var mod=_117%5;if(!mod){days=(_117>0)?5:-5;_11a=(_117>0)?((_117-5)/5):((_117+5)/5);}else{days=mod;_11a=parseInt(_117/5);}var strt=date.getDay();var adj=0;if(strt==6&&_117>0){adj=1;}else{if(strt==0&&_117<0){adj=-1;}}var trgt=strt+days;if(trgt==0||trgt==6){adj=(_117>0)?2:-2;}_117=(7*_11a)+days+adj;break;case "year":_119="FullYear";_118=true;break;case "week":_117*=7;break;case "quarter":_117*=3;case "month":_118=true;_119="Month";break;default:_119="UTC"+_116.charAt(0).toUpperCase()+_116.substring(1)+"s";}if(_119){sum["set"+_119](sum["get"+_119]()+_117);}if(_118&&(sum.getDate()<date.getDate())){sum.setDate(0);}return sum;};dojo.date.difference=function(_11b,_11c,_11d){_11c=_11c||new Date();_11d=_11d||"day";var _11e=_11c.getFullYear()-_11b.getFullYear();var _11f=1;switch(_11d){case "quarter":var m1=_11b.getMonth();var m2=_11c.getMonth();var q1=Math.floor(m1/3)+1;var q2=Math.floor(m2/3)+1;q2+=(_11e*4);_11f=q2-q1;break;case "weekday":var days=Math.round(dojo.date.difference(_11b,_11c,"day"));var _120=parseInt(dojo.date.difference(_11b,_11c,"week"));var mod=days%7;if(mod==0){days=_120*5;}else{var adj=0;var aDay=_11b.getDay();var bDay=_11c.getDay();_120=parseInt(days/7);mod=days%7;var _121=new Date(_11b);_121.setDate(_121.getDate()+(_120*7));var _122=_121.getDay();if(days>0){switch(true){case aDay==6:adj=-1;break;case aDay==0:adj=0;break;case bDay==6:adj=-1;break;case bDay==0:adj=-2;break;case (_122+mod)>5:adj=-2;}}else{if(days<0){switch(true){case aDay==6:adj=0;break;case aDay==0:adj=1;break;case bDay==6:adj=2;break;case bDay==0:adj=1;break;case (_122+mod)<0:adj=2;}}}days+=adj;days-=(_120*2);}_11f=days;break;case "year":_11f=_11e;break;case "month":_11f=(_11c.getMonth()-_11b.getMonth())+(_11e*12);break;case "week":_11f=parseInt(dojo.date.difference(_11b,_11c,"day")/7);break;case "day":_11f/=24;case "hour":_11f/=60;case "minute":_11f/=60;case "second":_11f/=1000;case "millisecond":_11f*=_11c.getTime()-_11b.getTime();}return Math.round(_11f);};}if(!dojo._hasResource["dojox.date.php"]){dojo._hasResource["dojox.date.php"]=true;dojo.provide("dojox.date.php");dojox.date.php.format=function(date,_123){var df=new dojox.date.php.DateFormat(_123);return df.format(date);};dojox.date.php.DateFormat=function(_124){if(!this.regex){var keys=[];for(var key in this.constructor.prototype){if(dojo.isString(key)&&key.length==1&&dojo.isFunction(this[key])){keys.push(key);}}this.constructor.prototype.regex=new RegExp("(?:(\\\\.)|(["+keys.join("")+"]))","g");}var _125=[];this.tokens=dojox.string.tokenize(_124,this.regex,function(_126,_127,i){if(_127){_125.push([i,_127]);return _127;}if(_126){return _126.charAt(1);}});this.replacements=_125;};dojo.extend(dojox.date.php.DateFormat,{weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdays_3:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],months_3:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthdays:[31,28,31,30,31,30,31,31,30,31,30,31],format:function(date){this.date=date;for(var i=0,_128;_128=this.replacements[i];i++){this.tokens[_128[0]]=this[_128[1]]();}return this.tokens.join("");},d:function(){var j=this.j();return (j.length==1)?"0"+j:j;},D:function(){return this.weekdays_3[this.date.getDay()];},j:function(){return this.date.getDate()+"";},l:function(){return this.weekdays[this.date.getDay()];},N:function(){var w=this.w();return (!w)?7:w;},S:function(){switch(this.date.getDate()){case 11:case 12:case 13:return "th";case 1:case 21:case 31:return "st";case 2:case 22:return "nd";case 3:case 23:return "rd";default:return "th";}},w:function(){return this.date.getDay()+"";},z:function(){var _129=this.date.getTime()-new Date(this.date.getFullYear(),0,1).getTime();return Math.floor(_129/86400000)+"";},W:function(){var week;var _12a=new Date(this.date.getFullYear(),0,1).getDay()+1;var w=this.date.getDay()+1;var z=parseInt(this.z());if(z<=(8-_12a)&&_12a>4){var _12b=new Date(this.date.getFullYear()-1,this.date.getMonth(),this.date.getDate());if(_12a==5||(_12a==6&&dojo.date.isLeapYear(_12b))){week=53;}else{week=52;}}else{var i;if(Boolean(this.L())){i=366;}else{i=365;}if((i-z)<(4-w)){week=1;}else{var j=z+(7-w)+(_12a-1);week=Math.ceil(j/7);if(_12a>4){--week;}}}return week;},F:function(){return this.months[this.date.getMonth()];},m:function(){var n=this.n();return (n.length==1)?"0"+n:n;},M:function(){return this.months_3[this.date.getMonth()];},n:function(){return this.date.getMonth()+1+"";},t:function(){return (Boolean(this.L())&&this.date.getMonth()==1)?29:this.monthdays[this.getMonth()];},L:function(){return (dojo.date.isLeapYear(this.date))?"1":"0";},o:function(){},Y:function(){return this.date.getFullYear()+"";},y:function(){return this.Y().slice(-2);},a:function(){return this.date.getHours()>=12?"pm":"am";},b:function(){return this.a().toUpperCase();},B:function(){var off=this.date.getTimezoneOffset()+60;var secs=(this.date.getHours()*3600)+(this.date.getMinutes()*60)+this.getSeconds()+(off*60);var beat=Math.abs(Math.floor(secs/86.4)%1000)+"";while(beat.length<2){beat="0"+beat;}return beat;},g:function(){return (this.date.getHours()>12)?this.date.getHours()-12+"":this.date.getHours()+"";},G:function(){return this.date.getHours()+"";},h:function(){var g=this.g();return (g.length==1)?"0"+g:g;},H:function(){var G=this.G();return (G.length==1)?"0"+G:G;},i:function(){var mins=this.date.getMinutes()+"";return (mins.length==1)?"0"+mins:mins;},s:function(){var secs=this.date.getSeconds()+"";return (secs.length==1)?"0"+secs:secs;},e:function(){return dojo.date.getTimezoneName(this.date);},I:function(){},O:function(){var off=Math.abs(this.date.getTimezoneOffset());var _12c=Math.floor(off/60)+"";var mins=(off%60)+"";if(_12c.length==1){_12c="0"+_12c;}if(mins.length==1){_12c="0"+mins;}return ((this.date.getTimezoneOffset()<0)?"+":"-")+_12c+mins;},P:function(){var O=this.O();return O.substring(0,2)+":"+O.substring(2,4);},T:function(){return this.e().substring(0,3);},Z:function(){return this.date.getTimezoneOffset()*-60;},c:function(){return this.Y()+"-"+this.m()+"-"+this.d()+"T"+this.h()+":"+this.i()+":"+this.s()+this.P();},r:function(){return this.D()+", "+this.d()+" "+this.M()+" "+this.Y()+" "+this.H()+":"+this.i()+":"+this.s()+" "+this.O();},U:function(){return Math.floor(this.date.getTime()/1000);}});}if(!dojo._hasResource["dojox.dtl.utils.date"]){dojo._hasResource["dojox.dtl.utils.date"]=true;dojo.provide("dojox.dtl.utils.date");dojox.dtl.utils.date.DateFormat=function(_12d){dojox.date.php.DateFormat.call(this,_12d);};dojo.extend(dojox.dtl.utils.date.DateFormat,dojox.date.php.DateFormat.prototype,{f:function(){return (!this.date.getMinutes())?this.g():this.g()+":"+this.i();},N:function(){return dojox.dtl.utils.date._months_ap[this.date.getMonth()];},P:function(){if(!this.date.getMinutes()&&!this.date.getHours()){return "midnight";}if(!this.date.getMinutes()&&this.date.getHours()==12){return "noon";}return this.f()+" "+this.a();}});dojo.mixin(dojox.dtl.utils.date,{format:function(date,_12e){var df=new dojox.dtl.utils.date.DateFormat(_12e);return df.format(date);},timesince:function(d,now){if(!(d instanceof Date)){d=new Date(d.year,d.month,d.day);}if(!now){now=new Date();}var _12f=Math.abs(now.getTime()-d.getTime());for(var i=0,_130;_130=dojox.dtl.utils.date._chunks[i];i++){var _131=Math.floor(_12f/_130[0]);if(_131){break;}}return _131+" "+_130[1](_131);},_chunks:[[60*60*24*365*1000,function(n){return (n==1)?"year":"years";}],[60*60*24*30*1000,function(n){return (n==1)?"month":"months";}],[60*60*24*7*1000,function(n){return (n==1)?"week":"weeks";}],[60*60*24*1000,function(n){return (n==1)?"day":"days";}],[60*60*1000,function(n){return (n==1)?"hour":"hours";}],[60*1000,function(n){return (n==1)?"minute":"minutes";}]],_months_ap:["Jan.","Feb.","March","April","May","June","July","Aug.","Sept.","Oct.","Nov.","Dec."]});}if(!dojo._hasResource["dojox.dtl.tag.date"]){dojo._hasResource["dojox.dtl.tag.date"]=true;dojo.provide("dojox.dtl.tag.date");dojox.dtl.tag.date.NowNode=function(_132,node){this._format=_132;this.format=new dojox.dtl.utils.date.DateFormat(_132);this.contents=node;};dojo.extend(dojox.dtl.tag.date.NowNode,{render:function(_133,_134){this.contents.set(this.format.format(new Date()));return this.contents.render(_133,_134);},unrender:function(_135,_136){return this.contents.unrender(_135,_136);},clone:function(_137){return new this.constructor(this._format,this.contents.clone(_137));}});dojox.dtl.tag.date.now=function(_138,_139){var _13a=_139.split_contents();if(_13a.length!=2){throw new Error("'now' statement takes one argument");}return new dojox.dtl.tag.date.NowNode(_13a[1].slice(1,-1),_138.create_text_node());};}if(!dojo._hasResource["dojox.dtl.tag.loader"]){dojo._hasResource["dojox.dtl.tag.loader"]=true;dojo.provide("dojox.dtl.tag.loader");(function(){var dd=dojox.dtl;var ddtl=dd.tag.loader;ddtl.BlockNode=dojo.extend(function(name,_13b){this.name=name;this.nodelist=_13b;},{"super":function(){if(this.parent){var html=this.parent.nodelist.dummyRender(this.context,null,true);if(typeof html=="string"){html=new String(html);}html.safe=true;return html;}return "";},render:function(_13c,_13d){var name=this.name;var _13e=this.nodelist;var _13f;if(_13d.blocks){var _140=_13d.blocks[name];if(_140){_13f=_140.parent;_13e=_140.nodelist;_140.used=true;}}this.rendered=_13e;_13c=_13c.push();this.context=_13c;this.parent=null;if(_13e!=this.nodelist){this.parent=this;}_13c.block=this;if(_13d.getParent){var _141=_13d.getParent();var _142=dojo.connect(_13d,"onSetParent",function(node,up,root){if(up&&root){_13d.setParent(_141);}});}_13d=_13e.render(_13c,_13d,this);_142&&dojo.disconnect(_142);_13c=_13c.pop();return _13d;},unrender:function(_143,_144){return this.rendered.unrender(_143,_144);},clone:function(_145){return new this.constructor(this.name,this.nodelist.clone(_145));},toString:function(){return "dojox.dtl.tag.loader.BlockNode";}});ddtl.ExtendsNode=dojo.extend(function(_146,_147,_148,_149,key){this.getTemplate=_146;this.nodelist=_147;this.shared=_148;this.parent=_149;this.key=key;},{parents:{},getParent:function(_14a){var _14b=this.parent;if(!_14b){var _14c;_14b=this.parent=_14a.get(this.key,false);if(!_14b){throw new Error("extends tag used a variable that did not resolve");}if(typeof _14b=="object"){var url=_14b.url||_14b.templatePath;if(_14b.shared){this.shared=true;}if(url){_14b=this.parent=url.toString();}else{if(_14b.templateString){_14c=_14b.templateString;_14b=this.parent=" ";}else{_14b=this.parent=this.parent.toString();}}}if(_14b&&_14b.indexOf("shared:")===0){this.shared=true;_14b=this.parent=_14b.substring(7,_14b.length);}}if(!_14b){throw new Error("Invalid template name in 'extends' tag.");}if(_14b.render){return _14b;}if(this.parents[_14b]){return this.parents[_14b];}this.parent=this.getTemplate(_14c||dojox.dtl.text.getTemplateString(_14b));if(this.shared){this.parents[_14b]=this.parent;}return this.parent;},render:function(_14d,_14e){var _14f=this.getParent(_14d);_14f.blocks=_14f.blocks||{};_14e.blocks=_14e.blocks||{};for(var i=0,node;node=this.nodelist.contents[i];i++){if(node instanceof dojox.dtl.tag.loader.BlockNode){var old=_14f.blocks[node.name];if(old&&old.nodelist!=node.nodelist){_14e=old.nodelist.unrender(_14d,_14e);}_14f.blocks[node.name]=_14e.blocks[node.name]={shared:this.shared,nodelist:node.nodelist,used:false};}}this.rendered=_14f;return _14f.nodelist.render(_14d,_14e,this);},unrender:function(_150,_151){return this.rendered.unrender(_150,_151,this);},toString:function(){return "dojox.dtl.block.ExtendsNode";}});ddtl.IncludeNode=dojo.extend(function(path,_152,_153,text,_154){this._path=path;this.constant=_152;this.path=(_152)?path:new dd._Filter(path);this.getTemplate=_153;this.text=text;this.parsed=(arguments.length==5)?_154:true;},{_cache:[{},{}],render:function(_155,_156){var _157=((this.constant)?this.path:this.path.resolve(_155)).toString();var _158=Number(this.parsed);var _159=false;if(_157!=this.last){_159=true;if(this.last){_156=this.unrender(_155,_156);}this.last=_157;}var _15a=this._cache[_158];if(_158){if(!_15a[_157]){_15a[_157]=dd.text._resolveTemplateArg(_157,true);}if(_159){var _15b=this.getTemplate(_15a[_157]);this.rendered=_15b.nodelist;}return this.rendered.render(_155,_156,this);}else{if(this.text instanceof dd._TextNode){if(_159){this.rendered=this.text;this.rendered.set(dd.text._resolveTemplateArg(_157,true));}return this.rendered.render(_155,_156);}else{if(!_15a[_157]){var _15c=[];var div=document.createElement("div");div.innerHTML=dd.text._resolveTemplateArg(_157,true);var _15d=div.childNodes;while(_15d.length){var _15e=div.removeChild(_15d[0]);_15c.push(_15e);}_15a[_157]=_15c;}if(_159){this.nodelist=[];var _15f=true;for(var i=0,_160;_160=_15a[_157][i];i++){this.nodelist.push(_160.cloneNode(true));}}for(var i=0,node;node=this.nodelist[i];i++){_156=_156.concat(node);}}}return _156;},unrender:function(_161,_162){if(this.rendered){_162=this.rendered.unrender(_161,_162);}if(this.nodelist){for(var i=0,node;node=this.nodelist[i];i++){_162=_162.remove(node);}}return _162;},clone:function(_163){return new this.constructor(this._path,this.constant,this.getTemplate,this.text.clone(_163),this.parsed);}});dojo.mixin(ddtl,{block:function(_164,_165){var _166=_165.contents.split();var name=_166[1];_164._blocks=_164._blocks||{};_164._blocks[name]=_164._blocks[name]||[];_164._blocks[name].push(name);var _167=_164.parse(["endblock","endblock "+name]).rtrim();_164.next_token();return new dojox.dtl.tag.loader.BlockNode(name,_167);},extends_:function(_168,_169){var _16a=_169.contents.split();var _16b=false;var _16c=null;var key=null;if(_16a[1].charAt(0)=="\""||_16a[1].charAt(0)=="'"){_16c=_16a[1].substring(1,_16a[1].length-1);}else{key=_16a[1];}if(_16c&&_16c.indexOf("shared:")==0){_16b=true;_16c=_16c.substring(7,_16c.length);}var _16d=_168.parse();return new dojox.dtl.tag.loader.ExtendsNode(_168.getTemplate,_16d,_16b,_16c,key);},include:function(_16e,_16f){var _170=_16f.contents.split();if(_170.length!=2){throw new Error(_170[0]+" tag takes one argument: the name of the template to be included");}var path=_170[1];var _171=false;if((path.charAt(0)=="\""||path.slice(-1)=="'")&&path.charAt(0)==path.slice(-1)){path=path.slice(1,-1);_171=true;}return new ddtl.IncludeNode(path,_171,_16e.getTemplate,_16e.create_text_node());},ssi:function(_172,_173){var _174=_173.contents.split();var _175=false;if(_174.length==3){_175=(_174.pop()=="parsed");if(!_175){throw new Error("Second (optional) argument to ssi tag must be 'parsed'");}}var node=ddtl.include(_172,new dd.Token(_173.token_type,_174.join(" ")));node.parsed=_175;return node;}});})();}if(!dojo._hasResource["dojox.dtl.tag.misc"]){dojo._hasResource["dojox.dtl.tag.misc"]=true;dojo.provide("dojox.dtl.tag.misc");(function(){var dd=dojox.dtl;var ddtm=dd.tag.misc;ddtm.DebugNode=dojo.extend(function(text){this.text=text;},{render:function(_176,_177){var keys=_176.getKeys();var _178=[];var only={};for(var i=0,key;key=keys[i];i++){only[key]=_176[key];_178+="["+key+": "+typeof _176[key]+"]\n";}return this.text.set(_178).render(_176,_177,this);},unrender:function(_179,_17a){return _17a;},clone:function(_17b){return new this.constructor(this.text.clone(_17b));},toString:function(){return "ddtm.DebugNode";}});ddtm.FilterNode=dojo.extend(function(_17c,_17d){this._varnode=_17c;this._nodelist=_17d;},{render:function(_17e,_17f){var _180=this._nodelist.render(_17e,new dojox.string.Builder());_17e=_17e.update({"var":_180.toString()});var _181=this._varnode.render(_17e,_17f);_17e=_17e.pop();return _17f;},unrender:function(_182,_183){return _183;},clone:function(_184){return new this.constructor(this._expression,this._nodelist.clone(_184));}});ddtm.FirstOfNode=dojo.extend(function(vars,text){this._vars=vars;this.vars=dojo.map(vars,function(item){return new dojox.dtl._Filter(item);});this.contents=text;},{render:function(_185,_186){for(var i=0,item;item=this.vars[i];i++){var _187=item.resolve(_185);if(typeof _187!="undefined"){if(_187===null){_187="null";}this.contents.set(_187);return this.contents.render(_185,_186);}}return this.contents.unrender(_185,_186);},unrender:function(_188,_189){return this.contents.unrender(_188,_189);},clone:function(_18a){return new this.constructor(this._vars,this.contents.clone(_18a));}});ddtm.SpacelessNode=dojo.extend(function(_18b,text){this.nodelist=_18b;this.contents=text;},{render:function(_18c,_18d){if(_18d.getParent){var _18e=[dojo.connect(_18d,"onAddNodeComplete",this,"_watch"),dojo.connect(_18d,"onSetParent",this,"_watchParent")];_18d=this.nodelist.render(_18c,_18d);dojo.disconnect(_18e[0]);dojo.disconnect(_18e[1]);}else{var _18f=this.nodelist.dummyRender(_18c);this.contents.set(_18f.replace(/>\s+</g,"><"));_18d=this.contents.render(_18c,_18d);}return _18d;},unrender:function(_190,_191){return this.nodelist.unrender(_190,_191);},clone:function(_192){return new this.constructor(this.nodelist.clone(_192),this.contents.clone(_192));},_isEmpty:function(node){return (node.nodeType==3&&!node.data.match(/[^\s\n]/));},_watch:function(node){if(this._isEmpty(node)){var _193=false;if(node.parentNode.firstChild==node){node.parentNode.removeChild(node);}}else{var _194=node.parentNode.childNodes;if(node.nodeType==1&&_194.length>2){for(var i=2,_195;_195=_194[i];i++){if(_194[i-2].nodeType==1&&this._isEmpty(_194[i-1])){node.parentNode.removeChild(_194[i-1]);return;}}}}},_watchParent:function(node){var _196=node.childNodes;if(_196.length){while(node.childNodes.length){var last=node.childNodes[node.childNodes.length-1];if(!this._isEmpty(last)){return;}node.removeChild(last);}}}});ddtm.TemplateTagNode=dojo.extend(function(tag,text){this.tag=tag;this.contents=text;},{mapping:{openblock:"{%",closeblock:"%}",openvariable:"{{",closevariable:"}}",openbrace:"{",closebrace:"}",opencomment:"{#",closecomment:"#}"},render:function(_197,_198){this.contents.set(this.mapping[this.tag]);return this.contents.render(_197,_198);},unrender:function(_199,_19a){return this.contents.unrender(_199,_19a);},clone:function(_19b){return new this.constructor(this.tag,this.contents.clone(_19b));}});ddtm.WidthRatioNode=dojo.extend(function(_19c,max,_19d,text){this.current=new dd._Filter(_19c);this.max=new dd._Filter(max);this.width=_19d;this.contents=text;},{render:function(_19e,_19f){var _1a0=+this.current.resolve(_19e);var max=+this.max.resolve(_19e);if(typeof _1a0!="number"||typeof max!="number"||!max){this.contents.set("");}else{this.contents.set(""+Math.round((_1a0/max)*this.width));}return this.contents.render(_19e,_19f);},unrender:function(_1a1,_1a2){return this.contents.unrender(_1a1,_1a2);},clone:function(_1a3){return new this.constructor(this.current.getExpression(),this.max.getExpression(),this.width,this.contents.clone(_1a3));}});ddtm.WithNode=dojo.extend(function(_1a4,_1a5,_1a6){this.target=new dd._Filter(_1a4);this.alias=_1a5;this.nodelist=_1a6;},{render:function(_1a7,_1a8){var _1a9=this.target.resolve(_1a7);_1a7=_1a7.push();_1a7[this.alias]=_1a9;_1a8=this.nodelist.render(_1a7,_1a8);_1a7=_1a7.pop();return _1a8;},unrender:function(_1aa,_1ab){return _1ab;},clone:function(_1ac){return new this.constructor(this.target.getExpression(),this.alias,this.nodelist.clone(_1ac));}});dojo.mixin(ddtm,{comment:function(_1ad,_1ae){_1ad.skip_past("endcomment");return dd._noOpNode;},debug:function(_1af,_1b0){return new ddtm.DebugNode(_1af.create_text_node());},filter:function(_1b1,_1b2){var rest=_1b2.contents.split(null,1)[1];var _1b3=_1b1.create_variable_node("var|"+rest);var _1b4=_1b1.parse(["endfilter"]);_1b1.next_token();return new ddtm.FilterNode(_1b3,_1b4);},firstof:function(_1b5,_1b6){var _1b7=_1b6.split_contents().slice(1);if(!_1b7.length){throw new Error("'firstof' statement requires at least one argument");}return new ddtm.FirstOfNode(_1b7,_1b5.create_text_node());},spaceless:function(_1b8,_1b9){var _1ba=_1b8.parse(["endspaceless"]);_1b8.delete_first_token();return new ddtm.SpacelessNode(_1ba,_1b8.create_text_node());},templatetag:function(_1bb,_1bc){var _1bd=_1bc.contents.split();if(_1bd.length!=2){throw new Error("'templatetag' statement takes one argument");}var tag=_1bd[1];var _1be=ddtm.TemplateTagNode.prototype.mapping;if(!_1be[tag]){var keys=[];for(var key in _1be){keys.push(key);}throw new Error("Invalid templatetag argument: '"+tag+"'. Must be one of: "+keys.join(", "));}return new ddtm.TemplateTagNode(tag,_1bb.create_text_node());},widthratio:function(_1bf,_1c0){var _1c1=_1c0.contents.split();if(_1c1.length!=4){throw new Error("widthratio takes three arguments");}var _1c2=+_1c1[3];if(typeof _1c2!="number"){throw new Error("widthratio final argument must be an integer");}return new ddtm.WidthRatioNode(_1c1[1],_1c1[2],_1c2,_1bf.create_text_node());},with_:function(_1c3,_1c4){var _1c5=_1c4.split_contents();if(_1c5.length!=4||_1c5[2]!="as"){throw new Error("do_width expected format as 'with value as name'");}var _1c6=_1c3.parse(["endwith"]);_1c3.next_token();return new ddtm.WithNode(_1c5[1],_1c5[3],_1c6);}});})();}if(!dojo._hasResource["dojox.dtl.ext-dojo.NodeList"]){dojo._hasResource["dojox.dtl.ext-dojo.NodeList"]=true;dojo.provide("dojox.dtl.ext-dojo.NodeList");dojo.extend(dojo.NodeList,{dtl:function(_1c7,_1c8){var d=dojox.dtl;var self=this;var _1c9=function(_1ca,_1cb){var _1cc=_1ca.render(new d._Context(_1cb));self.forEach(function(node){node.innerHTML=_1cc;});};d.text._resolveTemplateArg(_1c7).addCallback(function(_1cd){_1c7=new d.Template(_1cd);d.text._resolveContextArg(_1c8).addCallback(function(_1ce){_1c9(_1c7,_1ce);});});return this;}});}
diff --git a/js/dojo/dojox/dtl/README b/js/dojo/dojox/dtl/README
--- a/js/dojo/dojox/dtl/README
+++ b/js/dojo/dojox/dtl/README
@@ -1,203 +1,207 @@
-------------------------------------------------------------------------------
DojoX Django Template Language
-------------------------------------------------------------------------------
Version 0.0
Release date: 09/20/2007
-------------------------------------------------------------------------------
Project state: experimental/feature incomplete
-------------------------------------------------------------------------------
Project authors
Neil Roberts (pottedmeat@dojotoolkit.org)
-------------------------------------------------------------------------------
Project description
The Django Template language uses a system of templates that can be compiled
once and rendered indefinitely afterwards. It uses a simple system of tags
and filters.
-This aims to be a 1:1 match with the Django Template Language as outlined in
-http://www.djangoproject.com/documentation/templates/. Many common tags and
+This is a 1:1 match with the Django Template Language as outlined in
+http://www.djangoproject.com/documentation/templates/. All applicable tags and
filters have been implemented (see below), along with new filters and tags as
necessary (see below).
The Django Template Language is intended within Django to only handle text.
Our implementation is able to handle HTML in addition to text. Actually, the
text and HTML portions of dojox.dtl are two separate layers, the HTML layer
sits on top of the text layer (base). It's also been implemented in such a way
that you have little to fear when moving your code from Django to dojox.dtl.
Your existing templates should work, and will benefit from the massive
performance gain of being able to manipulate nodes, rather than having to do
clunky innerHTML swaps you would have to do with a text-only system. It also
allows for new HTML-centric abilities, outlined below.
Despite having two levels of complexity, if you write your tags correctly, they
will work in both environments.
-------------------------------------------------------------------------------
Dependencies
Base:
dojox.string.Builder
Date filters and tags:
dojox.date.php
Widget:
dijit._Widget
dijit._Container
-------------------------------------------------------------------------------
Installation instructions
Grab the following from the Dojo SVN Repository:
http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/dtl.js
http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/dtl/*
Install into the following directory structure:
/dojox/dtl/
...which should be at the same level as your Dojo checkout.
-------------------------------------------------------------------------------
What's Been Done
+Note: HTML Unit Tests should only be around for the oddities of HTML, tag/filter
+code is the same for each environment with minor exceptions. Cloning of all tags
+should be tested inside a for loop.
+
| Implemented | Tag | Text Unit Test | HTML Unit Test |
| X | block | X | |
| X | comment | X | |
| X | cycle | X | |
| X | debug | X | |
| X | extends | X | |
| X | filter | X | |
-| | firstof | | |
-| X | for | | |
-| X | if | | |
-| | ifchanged | | |
-| | ifequal | | |
-| | ifnotequal | | |
-| | include | | |
-| | load | | |
-| | now | | |
-| | regroup | | |
-| | spaceless | | |
-| | ssi | | |
-| | templatetag | | |
-| | url | | |
-| | widthratio | | |
-| | with | | |
+| X | firstof | X | |
+| X | for | X | |
+| X | if | X | |
+| X | ifchanged | X | X |
+| X | ifequal | X | |
+| X | ifnotequal | X | |
+| X | include | X | X |
+| X | load | X | |
+| X | now | X | |
+| X | regroup | X | |
+| X | spaceless | X | X |
+| X | ssi | X | X |
+| X | templatetag | X | |
+| N/A | url | | |
+| X | widthratio | X | |
+| X | with | X | |
| Implemented | Filter | Text Unit Test | HTML Unit Test |
| X | add | X | |
| X | addslashes | X | |
| X | capfirst | X | |
| X | center | X | |
| X | cut | X | |
| X | date | X | |
| X | default | X | |
| X | default_if_none | X | |
| X | dictsort | X | |
| X | dictsort_reversed | X | |
| X | divisibleby | X | |
| X | escape | X | |
| X | filesizeformat | X | |
| X | first | X | |
| X | fix_ampersands | X | |
| X | floatformat | X | |
| X | get_digit | X | |
| X | iriencode | X | |
| X | join | X | |
| X | length | X | |
| X | length_is | X | |
| X | linebreaks | X | |
| X | linebreaksbr | X | |
| X | linenumbers | X | |
| X | ljust | X | |
| X | lower | X | |
| X | make_list | X | |
| X | phone2numeric | X | |
| X | pluralize | X | |
| X | pprint | X | |
| X | random | X | |
| X | removetags | X | |
| X | rjust | X | |
| X | slice | X | |
| X | slugify | X | |
| X | stringformat | X | |
| X | striptags | X | |
| X | time | X | |
| X | timesince | X | |
| X | timeuntil | X | |
| X | title | X | |
| X | truncatewords | X | |
| X | truncatewords_html | X | |
| X | unordered_list | X | |
| X | upper | X | |
| X | urlencode | X | |
| X | urlize | X | |
| X | urlizetrunc | X | |
| X | wordcount | X | |
| X | wordwrap | X | |
| X | yesno | X | |
-------------------------------------------------------------------------------
HTML-Specific Additions
-------------------------------------------------------------------------------
{%extends "shared:templates/template.html" %}
When using the {% extends %} tag, we don't always want to replace the parent
node in DOM. For example, if we have a list view and a detail view, but both
share the same base template, we want it to share the parent template. This
basically means that the same nodes will be used in the parent for both views.
To use this, simply add "shared:" to the beginning of the specified template.
-------------------------------------------------------------------------------
<!--{% commented markup %}-->
Some browsers treat comment nodes as full fledged nodes. If performance is
important to you, you can wrap your markup in comments. The comments will be
automatically stripped for browsers that cannot support this.
-------------------------------------------------------------------------------
Attribute Tags
If a tag name begins with "attr:" then it will be able to inject an object
into the parsed template. (See dojox.dtl.tag.event.EventNode)
onclick/onmouseover/etc attributes work by attaching to the rendering object.
tstyle attribute allows for styles to be changed dynamically. Use them just
like a "style" attribute.
attach attribute attaches the node to the rendering object.
-------------------------------------------------------------------------------
New Context Functions
setThis() and getThis() returns the object "in charge" of the current rendering.
This is used so that we can attach events.
mixin() and filter() clone the current context, and either add to or reduce
the keys in the context.
-------------------------------------------------------------------------------
Buffers
Both the base and HTML versions of dojox.dtl use buffers. The base version uses
-dojox.string.Builder and the HTML version uses dojox.dtl.HtmlBuffer.
+dojox.string.Builder and the HTML version uses dojox.dtl.DomBuffer.
The HTML buffer has several calls important to rendering:
setParent/getParent/concat/remove:
setParent and concat are used in order to render our HTML. As we move through
the parsed template, different nodes change the parent or add on to the
current parent. getParent is useful in things like the attribute tags, since
they can use getParent to find the node that they're an attribute on. remove is
used during unrendering.
setAttribute:
Sets an attribute on the current parent
-------------------------------------------------------------------------------
Tags Need clone/unrender Functions.
One of the biggest challenges of getting dojox.dtl to work in an HTML
environment was logic blocks. Nodes and objects inside a for loop need to be
cloned, they can't simply be re-rendered, especially if they involve a Node.
Also, in the case of an if/else block, we need to be able to not just render
one of the blocks, but also unrender the second.
-This is really simple code, a good example is the dojox.dtl.HtmlNode
+This is really simple code, a good example is the dojox.dtl.DomNode
object. Each function in this object is only one line long.
\ No newline at end of file
diff --git a/js/dojo/dojox/dtl/_base.js b/js/dojo/dojox/dtl/_base.js
--- a/js/dojo/dojox/dtl/_base.js
+++ b/js/dojo/dojox/dtl/_base.js
@@ -1,632 +1,574 @@
-if(!dojo._hasResource["dojox.dtl._base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.dtl._base"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.dtl._base"]){
+dojo._hasResource["dojox.dtl._base"]=true;
dojo.provide("dojox.dtl._base");
-
dojo.require("dojox.string.Builder");
dojo.require("dojox.string.tokenize");
-
-dojox.dtl.Context = function(dict){
- dojo.mixin(this, dict || {});
- this._dicts = [];
- this._this = {};
+dojo.experimental("dojox.dtl");
+(function(){
+var dd=dojox.dtl;
+dd.TOKEN_BLOCK=-1;
+dd.TOKEN_VAR=-2;
+dd.TOKEN_COMMENT=-3;
+dd.TOKEN_TEXT=3;
+dd._Context=dojo.extend(function(_1){
+dojo._mixin(this,_1||{});
+this._dicts=[];
+},{push:function(){
+var _2=this;
+var _3=dojo.delegate(this);
+_3.pop=function(){
+return _2;
+};
+return _3;
+},pop:function(){
+throw new Error("pop() called on empty Context");
+},get:function(_4,_5){
+if(typeof this[_4]!="undefined"){
+return this._normalize(this[_4]);
+}
+for(var i=0,_6;_6=this._dicts[i];i++){
+if(typeof _6[_4]!="undefined"){
+return this._normalize(_6[_4]);
+}
+}
+return _5;
+},_normalize:function(_7){
+if(_7 instanceof Date){
+_7.year=_7.getFullYear();
+_7.month=_7.getMonth()+1;
+_7.day=_7.getDate();
+_7.date=_7.year+"-"+("0"+_7.month).slice(-2)+"-"+("0"+_7.day).slice(-2);
+_7.hour=_7.getHours();
+_7.minute=_7.getMinutes();
+_7.second=_7.getSeconds();
+_7.microsecond=_7.getMilliseconds();
+}
+return _7;
+},update:function(_8){
+var _9=this.push();
+if(_8){
+dojo._mixin(this,_8);
+}
+return _9;
+}});
+var _a=/("(?:[^"\\]*(?:\\.[^"\\]*)*)"|'(?:[^'\\]*(?:\\.[^'\\]*)*)'|[^\s]+)/g;
+var _b=/\s+/g;
+var _c=function(_d,_e){
+_d=_d||_b;
+if(!(_d instanceof RegExp)){
+_d=new RegExp(_d,"g");
+}
+if(!_d.global){
+throw new Error("You must use a globally flagged RegExp with split "+_d);
+}
+_d.exec("");
+var _f,_10=[],_11=0,i=0;
+while(_f=_d.exec(this)){
+_10.push(this.slice(_11,_d.lastIndex-_f[0].length));
+_11=_d.lastIndex;
+if(_e&&(++i>_e-1)){
+break;
+}
+}
+_10.push(this.slice(_11));
+return _10;
+};
+dd.Token=function(_12,_13){
+this.token_type=_12;
+this.contents=new String(dojo.trim(_13));
+this.contents.split=_c;
+this.split=function(){
+return String.prototype.split.apply(this.contents,arguments);
+};
+};
+dd.Token.prototype.split_contents=function(_14){
+var bit,_15=[],i=0;
+_14=_14||999;
+while(i++<_14&&(bit=_a.exec(this.contents))){
+bit=bit[0];
+if(bit.charAt(0)=="\""&&bit.slice(-1)=="\""){
+_15.push("\""+bit.slice(1,-1).replace("\\\"","\"").replace("\\\\","\\")+"\"");
+}else{
+if(bit.charAt(0)=="'"&&bit.slice(-1)=="'"){
+_15.push("'"+bit.slice(1,-1).replace("\\'","'").replace("\\\\","\\")+"'");
+}else{
+_15.push(bit);
+}
+}
}
-dojo.extend(dojox.dtl.Context, {
- _dicts: [],
- _this: {},
- extend: function(/*dojox.dtl.Context|Object*/ obj){
- // summary: Returns a clone of this context object, with the items from the
- // passed objecct mixed in.
- var context = new dojox.dtl.Context();
- var keys = this.getKeys();
- for(var i = 0, key; key = keys[i]; i++){
- if(typeof obj[key] != "undefined"){
- context[key] = obj[key];
- }else{
- context[key] = this[key];
- }
- }
-
- if(obj instanceof dojox.dtl.Context){
- keys = obj.getKeys();
- }else if(typeof obj == "object"){
- keys = [];
- for(var key in obj){
- keys.push(key);
- }
- }
-
- for(var i = 0, key; key = keys[i]; i++){
- context[key] = obj[key];
- }
-
- return context;
- },
- filter: function(/*dojox.dtl.Context|Object|String...*/ filter){
- // summary: Returns a clone of this context, only containing the items
- // defined in the filter.
- var context = new dojox.dtl.Context();
- var keys = [];
- if(filter instanceof dojox.dtl.Context){
- keys = filter.getKeys();
- }else if(typeof filter == "object"){
- for(var key in filter){
- keys.push(key);
- }
- }else{
- for(var i = 0, arg; arg = arguments[i]; i++){
- if(typeof arg == "string"){
- keys.push(arg);
- }
- }
- }
-
- for(var i = 0, key; key = keys[i]; i++){
- context[key] = this[key];
- }
-
- return context;
- },
- setThis: function(/*Object*/ _this){
- this._this = _this;
- },
- getThis: function(){
- return this._this;
- },
- push: function(){
- var dict = {};
- var keys = this.getKeys();
- for(var i = 0, key; key = keys[i]; i++){
- dict[key] = this[key];
- delete this[key];
- }
- this._dicts.unshift(dict);
- },
- pop: function(){
- if(!this._dicts.length){
- throw new Error("pop() has been called more times than push() on the Context");
- }
- var dict = this._dicts.shift();
- dojo.mixin(this, dict);
- },
- hasKey: function(key){
- if(typeof this[key] != "undefined"){
- return true;
- }
-
- for(var i = 0, dict; dict = this._dicts[i]; i++){
- if(typeof dict[key] != "undefined"){
- return true;
- }
- }
-
- return false;
- },
- getKeys: function(){
- var keys = [];
- for(var key in this){
- if(isNaN(key)){
- var found = false;
- for(var protoKey in dojox.dtl.Context.prototype){
- if(key == protoKey){
- found = true;
- break;
- }
- }
- if(!found){
- keys.push(key);
- }
- }
- }
- return keys;
- },
- get: function(key, otherwise){
- if(typeof this[key] != "undefined"){
- return this[key];
- }
-
- for(var i = 0, dict; dict = this._dicts[i]; i++){
- if(typeof dict[key] != "undefined"){
- return dict[key];
- }
- }
-
- return otherwise;
- },
- update: function(dict){
- this.push();
- if(dict){
- dojo.mixin(this, dict);
- }
- },
- toString: function(){ return "dojox.dtl.Context"; }
+return _15;
+};
+var ddt=dd.text={_get:function(_16,_17,_18){
+var _19=dd.register.get(_16,_17.toLowerCase(),_18);
+if(!_19){
+if(!_18){
+throw new Error("No tag found for "+_17);
+}
+return null;
+}
+var fn=_19[1];
+var _1a=_19[2];
+var _1b;
+if(fn.indexOf(":")!=-1){
+_1b=fn.split(":");
+fn=_1b.pop();
+}
+dojo["require"](_1a);
+var _1c=dojo.getObject(_1a);
+return _1c[fn||_17]||_1c[_17+"_"]||_1c[fn+"_"];
+},getTag:function(_1d,_1e){
+return ddt._get("tag",_1d,_1e);
+},getFilter:function(_1f,_20){
+return ddt._get("filter",_1f,_20);
+},getTemplate:function(_21){
+return new dd.Template(ddt.getTemplateString(_21));
+},getTemplateString:function(_22){
+return dojo._getText(_22.toString())||"";
+},_resolveLazy:function(_23,_24,_25){
+if(_24){
+if(_25){
+return dojo.fromJson(dojo._getText(_23))||{};
+}else{
+return dd.text.getTemplateString(_23);
+}
+}else{
+return dojo.xhrGet({handleAs:(_25)?"json":"text",url:_23});
+}
+},_resolveTemplateArg:function(arg,_26){
+if(ddt._isTemplate(arg)){
+if(!_26){
+var d=new dojo.Deferred();
+d.callback(arg);
+return d;
+}
+return arg;
+}
+return ddt._resolveLazy(arg,_26);
+},_isTemplate:function(arg){
+return (typeof arg=="undefined")||(typeof arg=="string"&&(arg.match(/^\s*[<{]/)||arg.indexOf(" ")!=-1));
+},_resolveContextArg:function(arg,_27){
+if(arg.constructor==Object){
+if(!_27){
+var d=new dojo.Deferred;
+d.callback(arg);
+return d;
+}
+return arg;
+}
+return ddt._resolveLazy(arg,_27,true);
+},_re:/(?:\{\{\s*(.+?)\s*\}\}|\{%\s*(load\s*)?(.+?)\s*%\})/g,tokenize:function(str){
+return dojox.string.tokenize(str,ddt._re,ddt._parseDelims);
+},_parseDelims:function(_28,_29,tag){
+if(_28){
+return [dd.TOKEN_VAR,_28];
+}else{
+if(_29){
+var _2a=dojo.trim(tag).split(/\s+/g);
+for(var i=0,_2b;_2b=_2a[i];i++){
+dojo["require"](_2b);
+}
+}else{
+return [dd.TOKEN_BLOCK,tag];
+}
+}
+}};
+dd.Template=dojo.extend(function(_2c,_2d){
+var str=_2d?_2c:ddt._resolveTemplateArg(_2c,true)||"";
+var _2e=ddt.tokenize(str);
+var _2f=new dd._Parser(_2e);
+this.nodelist=_2f.parse();
+},{update:function(_30,_31){
+return ddt._resolveContextArg(_31).addCallback(this,function(_32){
+var _33=this.render(new dd._Context(_32));
+if(_30.forEach){
+_30.forEach(function(_34){
+_34.innerHTML=_33;
});
-
-dojox.dtl.text = {
- types: {tag: -1, varr: -2, text: 3},
- pySplit: function(str){
- // summary: Split a string according to Python's split function
- str = str.replace(/^\s+|\s+$/, "");
- if(!str.length){
- return [];
- }
- return str.split(/\s+/g);
- },
- urlquote: function(/*String*/ url, /*String?*/ safe){
- if(!safe){
- safe = "/";
- }
- return dojox.string.tokenize(url, /([^\w-_.])/g, function(token){
- if(safe.indexOf(token) == -1){
- if(token == " "){
- return "+";
- }else{
- return "%" + token.charCodeAt(0).toString(16).toUpperCase();
- }
- }
- return token;
- }).join("");
- },
- _get: function(module, name, errorless){
- // summary: Used to find both tags and filters
- var params = dojox.dtl.register.get(module, name, errorless);
- if(!params) return;
-
- var require = params.getRequire();
- var obj = params.getObj();
- var fn = params.getFn();
-
- if(fn.indexOf(":") != -1){
- var parts = fn.split(":");
- fn = parts.pop();
- }
-
- dojo.requireIf(true, require);
-
- var parent = window;
- var parts = obj.split(".");
- for(var i = 0, part; part = parts[i]; i++){
- if(!parent[part]) return;
- parent = parent[part];
- }
- return parent[fn || name] || parent[name + "_"];
- },
- getTag: function(name, errorless){
- return dojox.dtl.text._get("tag", name, errorless);
- },
- getFilter: function(name, errorless){
- return dojox.dtl.text._get("filter", name, errorless);
- },
- getTemplate: function(file){
- return new dojox.dtl.Template(dojox.dtl.getTemplateString(file));
- },
- getTemplateString: function(file){
- return dojo._getText(file.toString()) || "";
- },
- _re: /(?:\{\{\s*(.+?)\s*\}\}|\{%\s*(.+?)\s*%\})/g,
- tokenize: function(str){
- return dojox.string.tokenize(str, dojox.dtl.text._re, dojox.dtl.text._parseDelims);
- },
- _parseDelims: function(varr, tag){
- var types = dojox.dtl.text.types;
- if(varr){
- return [types.varr, varr];
- }else{
- return [types.tag, tag];
- }
- }
+}else{
+dojo.byId(_30).innerHTML=_33;
}
-
-dojox.dtl.Template = function(str){
- var st = dojox.dtl;
- var tokens = st.text.tokenize(str);
- var parser = new st.Parser(tokens);
- this.nodelist = parser.parse();
-}
-dojo.extend(dojox.dtl.Template, {
- render: function(context, /*concatenatable?*/ buffer){
- context = context || new dojox.dtl.Context({});
- if(!buffer){
- dojo.require("dojox.string.Builder");
- buffer = new dojox.string.Builder();
- }
- return this.nodelist.render(context, buffer) + "";
- },
- toString: function(){ return "dojox.dtl.Template"; }
+return this;
});
-
-dojox.dtl.Filter = function(token){
- // summary: Uses a string to find (and manipulate) a variable
- if(!token) throw new Error("Filter must be called with variable name");
- this.contents = token;
- var key = null;
- var re = this._re;
- var matches, filter, arg, fn;
- var filters = [];
- while(matches = re.exec(token)){
- if(key === null){
- if(this._exists(matches, 3)){
- // variable
- key = matches[3];
- }else if(this._exists(matches, 1)){
- // _("text")
- key = '"' + matches[1] + '"';
- }else if(this._exists(matches, 2)){
- // "text"
- key = '"' + matches[2] + '"';
- }else if(this._exists(matches, 9)){
- // 'text'
- key = '"' + matches[9] + '"';
- }
- }else{
- if(this._exists(matches, 7)){
- // :variable
- arg = [true, matches[7]];
- }else if(this._exists(matches, 5)){
- // :_("text")
- arg = [false, dojox.dtl.replace(matches[5], '\\"', '"')];
- }else if(this._exists(matches, 6)){
- // :"text"
- arg = [false, dojox.dtl.replace(matches[6], '\\"', '"')];
- }else if(this._exists(matches, 8)){
- // :"text"
- arg = [false, dojox.dtl.replace(matches[8], "\\'", "'")];
- }
- // Get a named filter
- fn = dojox.dtl.text.getFilter(matches[4]);
- if(typeof fn != "function") throw new Error(matches[4] + " is not registered as a filter");
- filters.push([fn, arg]);
- }
- }
-
- this.key = key;
- this.filters = filters;
-}
-dojo.extend(dojox.dtl.Filter, {
- _re: /(?:^_\("([^\\"]*(?:\\.[^\\"])*)"\)|^"([^\\"]*(?:\\.[^\\"]*)*)"|^([a-zA-Z0-9_.]+)|\|(\w+)(?::(?:_\("([^\\"]*(?:\\.[^\\"])*)"\)|"([^\\"]*(?:\\.[^\\"]*)*)"|([a-zA-Z0-9_.]+)|'([^\\']*(?:\\.[^\\']*)*)'))?|^'([^\\']*(?:\\.[^\\']*)*)')/g,
- _exists: function(arr, index){
- if(typeof arr[index] != "undefined" && arr[index] !== ""){
- return true;
- }
- return false;
- },
- resolve: function(context){
- var str = this.resolvePath(this.key, context);
- for(var i = 0, filter; filter = this.filters[i]; i++){
- // Each filter has the function in [0], a boolean in [1][0] of whether it's a variable or a string
- // and [1][1] is either the variable name of the string content.
- if(filter[1]){
- if(filter[1][0]){
- str = filter[0](str, this.resolvePath(filter[1][1], context));
- }else{
- str = filter[0](str, filter[1][1]);
- }
- }else{
- str = filter[0](str);
- }
- }
- return str;
- },
- resolvePath: function(path, context){
- var current, parts;
- var first = path.charAt(0);
- var last = path.charAt(path.length - 1);
- if(!isNaN(parseInt(first))){
- current = (path.indexOf(".") == -1) ? parseInt(path) : parseFloat(path);
- }else if(first == '"' && first == last){
- current = path.substring(1, path.length - 1);
- }else{;
- if(path == "true") return true;
- if(path == "false") return false;
- if(path == "null" || path == "None") return null;
- parts = path.split(".");
- current = context.get(parts.shift());
- while(parts.length){
- if(current && typeof current[parts[0]] != "undefined"){
- current = current[parts[0]];
- if(typeof current == "function"){
- if(current.alters_data){
- current = "";
- }else{
- current = current();
- }
- }
- }else{
- return "";
- }
- parts.shift();
- }
- }
- return current;
- },
- toString: function(){ return "dojox.dtl.Filter"; }
-});
-
-dojox.dtl.Node = function(/*Object*/ obj){
- // summary: Basic catch-all node
- this.contents = obj;
+},render:function(_35,_36){
+_36=_36||this.getBuffer();
+_35=_35||new dd._Context({});
+return this.nodelist.render(_35,_36)+"";
+},getBuffer:function(){
+dojo.require("dojox.string.Builder");
+return new dojox.string.Builder();
+}});
+var _37=/\{\{\s*(.+?)\s*\}\}/g;
+dd.quickFilter=function(str){
+if(!str){
+return new dd._NodeList();
+}
+if(str.indexOf("{%")==-1){
+return new dd._QuickNodeList(dojox.string.tokenize(str,_37,function(_38){
+return new dd._Filter(_38);
+}));
+}
+};
+dd._QuickNodeList=dojo.extend(function(_39){
+this.contents=_39;
+},{render:function(_3a,_3b){
+for(var i=0,l=this.contents.length;i<l;i++){
+if(this.contents[i].resolve){
+_3b=_3b.concat(this.contents[i].resolve(_3a));
+}else{
+_3b=_3b.concat(this.contents[i]);
+}
+}
+return _3b;
+},dummyRender:function(_3c){
+return this.render(_3c,dd.Template.prototype.getBuffer()).toString();
+},clone:function(_3d){
+return this;
+}});
+dd._Filter=dojo.extend(function(_3e){
+if(!_3e){
+throw new Error("Filter must be called with variable name");
+}
+this.contents=_3e;
+var _3f=this._cache[_3e];
+if(_3f){
+this.key=_3f[0];
+this.filters=_3f[1];
+}else{
+this.filters=[];
+dojox.string.tokenize(_3e,this._re,this._tokenize,this);
+this._cache[_3e]=[this.key,this.filters];
+}
+},{_cache:{},_re:/(?:^_\("([^\\"]*(?:\\.[^\\"])*)"\)|^"([^\\"]*(?:\\.[^\\"]*)*)"|^([a-zA-Z0-9_.]+)|\|(\w+)(?::(?:_\("([^\\"]*(?:\\.[^\\"])*)"\)|"([^\\"]*(?:\\.[^\\"]*)*)"|([a-zA-Z0-9_.]+)|'([^\\']*(?:\\.[^\\']*)*)'))?|^'([^\\']*(?:\\.[^\\']*)*)')/g,_values:{0:"\"",1:"\"",2:"",8:"\""},_args:{4:"\"",5:"\"",6:"",7:"'"},_tokenize:function(){
+var pos,arg;
+for(var i=0,has=[];i<arguments.length;i++){
+has[i]=(typeof arguments[i]!="undefined"&&typeof arguments[i]=="string"&&arguments[i]);
+}
+if(!this.key){
+for(pos in this._values){
+if(has[pos]){
+this.key=this._values[pos]+arguments[pos]+this._values[pos];
+break;
+}
+}
+}else{
+for(pos in this._args){
+if(has[pos]){
+var _40=arguments[pos];
+if(this._args[pos]=="'"){
+_40=_40.replace(/\\'/g,"'");
+}else{
+if(this._args[pos]=="\""){
+_40=_40.replace(/\\"/g,"\"");
+}
+}
+arg=[!this._args[pos],_40];
+break;
+}
+}
+var fn=ddt.getFilter(arguments[3]);
+if(!dojo.isFunction(fn)){
+throw new Error(arguments[3]+" is not registered as a filter");
+}
+this.filters.push([fn,arg]);
}
-dojo.extend(dojox.dtl.Node, {
- render: function(context, buffer){
- // summary: Adds content onto the buffer
- return buffer.concat(this.contents);
- },
- toString: function(){ return "dojox.dtl.Node"; }
-});
-
-dojox.dtl.NodeList = function(/*Node[]*/ nodes){
- // summary: Allows us to render a group of nodes
- this.contents = nodes || [];
+},getExpression:function(){
+return this.contents;
+},resolve:function(_41){
+if(typeof this.key=="undefined"){
+return "";
+}
+var str=this.resolvePath(this.key,_41);
+for(var i=0,_42;_42=this.filters[i];i++){
+if(_42[1]){
+if(_42[1][0]){
+str=_42[0](str,this.resolvePath(_42[1][1],_41));
+}else{
+str=_42[0](str,_42[1][1]);
+}
+}else{
+str=_42[0](str);
+}
+}
+return str;
+},resolvePath:function(_43,_44){
+var _45,_46;
+var _47=_43.charAt(0);
+var _48=_43.slice(-1);
+if(!isNaN(parseInt(_47))){
+_45=(_43.indexOf(".")==-1)?parseInt(_43):parseFloat(_43);
+}else{
+if(_47=="\""&&_47==_48){
+_45=_43.slice(1,-1);
+}else{
+if(_43=="true"){
+return true;
+}
+if(_43=="false"){
+return false;
+}
+if(_43=="null"||_43=="None"){
+return null;
}
-dojo.extend(dojox.dtl.NodeList, {
- push: function(node){
- // summary: Add a new node to the list
- this.contents.push(node);
- },
- render: function(context, buffer){
- // summary: Adds all content onto the buffer
- for(var i = 0; i < this.contents.length; i++){
- buffer = this.contents[i].render(context, buffer);
- if(!buffer) throw new Error("Template node render functions must return their buffer");
- }
- return buffer;
- },
- unrender: function(context, buffer){ return buffer; },
- clone: function(){ return this; },
- toString: function(){ return "dojox.dtl.NodeList"; }
-});
-
-dojox.dtl.TextNode = dojox.dtl.Node;
-
-dojox.dtl.VarNode = function(str){
- // summary: A node to be processed as a variable
- this.contents = new dojox.dtl.Filter(str);
+_46=_43.split(".");
+_45=_44.get(_46[0]);
+if(dojo.isFunction(_45)){
+var _49=_44.getThis&&_44.getThis();
+if(_45.alters_data){
+_45="";
+}else{
+if(_49){
+_45=_45.call(_49);
+}else{
+_45="";
+}
+}
+}
+for(var i=1;i<_46.length;i++){
+var _4a=_46[i];
+if(_45){
+var _4b=_45;
+if(dojo.isObject(_45)&&_4a=="items"&&typeof _45[_4a]=="undefined"){
+var _4c=[];
+for(var key in _45){
+_4c.push([key,_45[key]]);
+}
+_45=_4c;
+continue;
}
-dojo.extend(dojox.dtl.VarNode, {
- render: function(context, buffer){
- var str = this.contents.resolve(context);
- return buffer.concat(str);
- },
- toString: function(){ return "dojox.dtl.VarNode"; }
-});
-
-dojox.dtl.Parser = function(tokens){
- // summary: Parser used during initialization and for tag groups.
- this.contents = tokens;
+if(_45.get&&dojo.isFunction(_45.get)&&_45.get.safe){
+_45=_45.get(_4a);
+}else{
+if(typeof _45[_4a]=="undefined"){
+_45=_45[_4a];
+break;
+}else{
+_45=_45[_4a];
+}
+}
+if(dojo.isFunction(_45)){
+if(_45.alters_data){
+_45="";
+}else{
+_45=_45.call(_4b);
+}
+}else{
+if(_45 instanceof Date){
+_45=dd._Context.prototype._normalize(_45);
+}
+}
+}else{
+return "";
+}
+}
+}
}
-dojo.extend(dojox.dtl.Parser, {
- parse: function(/*Array?*/ stop_at){
- // summary: Turns tokens into nodes
- // description: Steps into tags are they're found. Blocks use the parse object
- // to find their closing tag (the stop_at array). stop_at is inclusive, it
- // returns the node that matched.
- var st = dojox.dtl;
- var types = st.text.types;
- var terminators = {};
- var tokens = this.contents;
- stop_at = stop_at || [];
- for(var i = 0; i < stop_at.length; i++){
- terminators[stop_at[i]] = true;
- }
-
- var nodelist = new st.NodeList();
- while(tokens.length){
- token = tokens.shift();
- if(typeof token == "string"){
- nodelist.push(new st.TextNode(token));
- }else{
- var type = token[0];
- var text = token[1];
- if(type == types.varr){
- nodelist.push(new st.VarNode(text));
- }else if(type == types.tag){
- if(terminators[text]){
- tokens.unshift(token);
- return nodelist;
- }
- var cmd = text.split(/\s+/g);
- if(cmd.length){
- cmd = cmd[0];
- var fn = dojox.dtl.text.getTag(cmd);
- if(fn){
- nodelist.push(fn(this, text));
- }
- }
- }
- }
- }
-
- if(stop_at.length){
- throw new Error("Could not find closing tag(s): " + stop_at.toString());
- }
-
- return nodelist;
- },
- next: function(){
- // summary: Returns the next token in the list.
- var token = this.contents.shift();
- return {type: token[0], text: token[1]};
- },
- skipPast: function(endtag){
- var types = dojox.dtl.text.types;
- while(this.contents.length){
- var token = this.contents.shift();
- if(token[0] == types.tag && token[1] == endtag){
- return;
- }
- }
- throw new Error("Unclosed tag found when looking for " + endtag);
- },
- getVarNode: function(){
- return dojox.dtl.VarNode;
- },
- getTextNode: function(){
- return dojox.dtl.TextNode;
- },
- getTemplate: function(file){
- return new dojox.dtl.Template(file);
- },
- toString: function(){ return "dojox.dtl.Parser"; }
-});
-
-dojox.dtl.register = function(module, cols, args, /*Function*/ normalize){
- // summary: Used to create dojox.dtl.register[module] function, and as a namespace
- // expand: Used if the call structure is reformatted for a more compact view.
- // Should return an array of normalized arguments.
- // description: The function produced will accept a "name"
- // as the first parameter and all other parameters will
- // be associated with the parameter names listed in cols.
- var ddr = dojox.dtl.register;
- var registry = ddr._mod[module] = {
- params: [],
- Getter: function(params){
- ddr._params = params || {};
- }
- };
-
- cols.unshift("name");
- for(var i = 0, col; col = cols[i]; i++){
- registry.Getter.prototype["get" + col.substring(0, 1).toUpperCase() + col.substring(1, col.length)] = ddr._ret(i);
- }
-
- ddr[module] = function(/*String*/ name, /*mixed...*/ parameters){
- if(normalize){
- var normalized = normalize(arguments);
- }else{
- var normalized = [arguments];
- }
-
- for(var i = 0, args; args = normalized[i]; i++){
- var params = [];
- for(var j = 0; j < cols.length; j++){
- params.push(args[j] || null);
- }
- if(typeof args[0] == "string"){
- // Strings before regexes for speed
- registry.params.unshift(params);
- }else{
- // break
- // module RegExp
- registry.params.push(params);
- }
- }
- }
-
- ddr[module].apply(null, args);
+return _45;
+}});
+dd._TextNode=dd._Node=dojo.extend(function(obj){
+this.contents=obj;
+},{set:function(_4d){
+this.contents=_4d;
+return this;
+},render:function(_4e,_4f){
+return _4f.concat(this.contents);
+},isEmpty:function(){
+return !dojo.trim(this.contents);
+},clone:function(){
+return this;
+}});
+dd._NodeList=dojo.extend(function(_50){
+this.contents=_50||[];
+this.last="";
+},{push:function(_51){
+this.contents.push(_51);
+return this;
+},concat:function(_52){
+this.contents=this.contents.concat(_52);
+return this;
+},render:function(_53,_54){
+for(var i=0;i<this.contents.length;i++){
+_54=this.contents[i].render(_53,_54);
+if(!_54){
+throw new Error("Template must return buffer");
+}
+}
+return _54;
+},dummyRender:function(_55){
+return this.render(_55,dd.Template.prototype.getBuffer()).toString();
+},unrender:function(){
+return arguments[1];
+},clone:function(){
+return this;
+},rtrim:function(){
+while(1){
+i=this.contents.length-1;
+if(this.contents[i] instanceof dd._TextNode&&this.contents[i].isEmpty()){
+this.contents.pop();
+}else{
+break;
+}
+}
+return this;
+}});
+dd._VarNode=dojo.extend(function(str){
+this.contents=new dd._Filter(str);
+},{render:function(_56,_57){
+var str=this.contents.resolve(_56);
+if(!str.safe){
+str=dd._base.escape(""+str);
+}
+return _57.concat(str);
+}});
+dd._noOpNode=new function(){
+this.render=this.unrender=function(){
+return arguments[1];
+};
+this.clone=function(){
+return this;
+};
+};
+dd._Parser=dojo.extend(function(_58){
+this.contents=_58;
+},{i:0,parse:function(_59){
+var _5a={},_5b;
+_59=_59||[];
+for(var i=0;i<_59.length;i++){
+_5a[_59[i]]=true;
+}
+var _5c=new dd._NodeList();
+while(this.i<this.contents.length){
+_5b=this.contents[this.i++];
+if(typeof _5b=="string"){
+_5c.push(new dd._TextNode(_5b));
+}else{
+var _5d=_5b[0];
+var _5e=_5b[1];
+if(_5d==dd.TOKEN_VAR){
+_5c.push(new dd._VarNode(_5e));
+}else{
+if(_5d==dd.TOKEN_BLOCK){
+if(_5a[_5e]){
+--this.i;
+return _5c;
+}
+var cmd=_5e.split(/\s+/g);
+if(cmd.length){
+cmd=cmd[0];
+var fn=ddt.getTag(cmd);
+if(fn){
+_5c.push(fn(this,new dd.Token(_5d,_5e)));
+}
+}
+}
+}
+}
}
-dojo.mixin(dojox.dtl.register, {
- _mod: {},
- _ret: function(i){
- // summary: Just lets use i and _params within a closure
- return function(){
- return dojox.dtl.register._params[i] || "";
- }
- },
- get: function(/*String*/ module, /*String*/ name, /*Boolean*/ errorless){
- // summary: Returns a "Getter", based on the registry
- // description: The getter functions correspond with the registered cols
- // used in dojo.register
- var registry = this._mod[module] || {};
- if(registry.params){
- for(var i = 0, param; param = registry.params[i]; i++){
- var search = param[0];
- if(typeof search == "string"){
- if(search == name){
- return new registry.Getter(param);
- }
- }else if(name.match(search)){
- var matches = search.exec(name);
- var mixin = [];
- dojo.mixin(mixin, param);
- mixin[0] = matches[1];
- return new registry.Getter(param);
- }
- }
- }
- if(!errorless) throw new Error("'" + module + "' of name '" + name + "' does not exist");
- },
- _normalize: function(args){
- // summary:
- // Translates to the signature (/*String*/ name, /*String*/ require, /*String*/ obj, /*String*/ fn)
- var items = args[2];
- var output = [];
- for(var i = 0, item; item = items[i]; i++){
- if(typeof item == "string"){
- output.push([item, args[0], args[1], item]);
- }else{
- output.push([item[0], args[0], args[1], item[1]]);
- }
- }
- return output;
- },
- tag: function(/*String*/ require, /*String*/ obj, /*String[]|[RegExp, String][]*/ fns){
- // summary:
- // Specify the location of a given tag function.
- // require:
- // The file this function is in
- // obj:
- // The base object to use for lookups
- // fn:
- // List of functions within obj to use
- // description:
- // When we are looking up a tag as specified in a template, we either use a
- // string in the fns array, or the RegExp item of the [RegExp, String] pair.
- // When that string is found, it requires the file specified in the require
- // parameter, uses the base object as a starting point and checks for obj.fn
- // or obj.fn_ in case fn is a reserved word.
- this("tag", ["require", "obj", "fn"], arguments, this._normalize);
- },
- filter: function(/*String*/ require, /*String*/ obj, /*String[]|[RegExp, String][]*/ fns){
- // summary:
- // Specify the location of a given filter function.
- // require:
- // The file this function is in
- // obj:
- // The base object to use for lookups
- // fn:
- // List of functions within obj to use
- // description:
- // When we are looking up a tag as specified in a template, we either use a
- // string in the fns array, or the RegExp item of the [RegExp, String] pair.
- // When that string is found, it requires the file specified in the require
- // parameter, uses the base object as a starting point and checks for obj.fn
- // or obj.fn_ in case fn is a reserved word.
- this("filter", ["require", "obj", "fn"], arguments, this._normalize);
- }
-});
-
-(function(){
- var register = dojox.dtl.register;
- var dtt = "dojox.dtl.tag";
- register.tag(dtt + ".logic", dtt + ".logic", ["if", "for"]);
- register.tag(dtt + ".loader", dtt + ".loader", ["extends", "block"]);
- register.tag(dtt + ".misc", dtt + ".misc", ["comment", "debug", "filter"]);
- register.tag(dtt + ".loop", dtt + ".loop", ["cycle"]);
-
- var dtf = "dojox.dtl.filter";
- register.filter(dtf + ".dates", dtf + ".dates", ["date", "time", "timesince", "timeuntil"]);
- register.filter(dtf + ".htmlstrings", dtf + ".htmlstrings", ["escape", "linebreaks", "linebreaksbr", "removetags", "striptags"]);
- register.filter(dtf + ".integers", dtf + ".integers", ["add", "get_digit"]);
- register.filter(dtf + ".lists", dtf + ".lists", ["dictsort", "dictsortreversed", "first", "join", "length", "length_is", "random", "slice", "unordered_list"]);
- register.filter(dtf + ".logic", dtf + ".logic", ["default", "default_if_none", "divisibleby", "yesno"]);
- register.filter(dtf + ".misc", dtf + ".misc", ["filesizeformat", "pluralize", "phone2numeric", "pprint"]);
- register.filter(dtf + ".strings", dtf + ".strings", ["addslashes", "capfirst", "center", "cut", "fix_ampersands", "floatformat", "iriencode", "linenumbers", "ljust", "lower", "make_list", "rjust", "slugify", "stringformat", "title", "truncatewords", "truncatewords_html", "upper", "urlencode", "urlize", "urlizetrunc", "wordcount", "wordwrap"]);
+if(_59.length){
+throw new Error("Could not find closing tag(s): "+_59.toString());
+}
+this.contents.length=0;
+return _5c;
+},next_token:function(){
+var _5f=this.contents[this.i++];
+return new dd.Token(_5f[0],_5f[1]);
+},delete_first_token:function(){
+this.i++;
+},skip_past:function(_60){
+while(this.i<this.contents.length){
+var _61=this.contents[this.i++];
+if(_61[0]==dd.TOKEN_BLOCK&&_61[1]==_60){
+return;
+}
+}
+throw new Error("Unclosed tag found when looking for "+_60);
+},create_variable_node:function(_62){
+return new dd._VarNode(_62);
+},create_text_node:function(_63){
+return new dd._TextNode(_63||"");
+},getTemplate:function(_64){
+return new dd.Template(_64);
+}});
+dd.register={_registry:{attributes:[],tags:[],filters:[]},get:function(_65,_66){
+var _67=dd.register._registry[_65+"s"];
+for(var i=0,_68;_68=_67[i];i++){
+if(typeof _68[0]=="string"){
+if(_68[0]==_66){
+return _68;
+}
+}else{
+if(_66.match(_68[0])){
+return _68;
+}
+}
+}
+},getAttributeTags:function(){
+var _69=[];
+var _6a=dd.register._registry.attributes;
+for(var i=0,_6b;_6b=_6a[i];i++){
+if(_6b.length==3){
+_69.push(_6b);
+}else{
+var fn=dojo.getObject(_6b[1]);
+if(fn&&dojo.isFunction(fn)){
+_6b.push(fn);
+_69.push(_6b);
+}
+}
+}
+return _69;
+},_any:function(_6c,_6d,_6e){
+for(var _6f in _6e){
+for(var i=0,fn;fn=_6e[_6f][i];i++){
+var key=fn;
+if(dojo.isArray(fn)){
+key=fn[0];
+fn=fn[1];
+}
+if(typeof key=="string"){
+if(key.substr(0,5)=="attr:"){
+var _70=fn;
+if(_70.substr(0,5)=="attr:"){
+_70=_70.slice(5);
+}
+dd.register._registry.attributes.push([_70.toLowerCase(),_6d+"."+_6f+"."+_70]);
+}
+key=key.toLowerCase();
+}
+dd.register._registry[_6c].push([key,fn,_6d+"."+_6f]);
+}
+}
+},tags:function(_71,_72){
+dd.register._any("tags",_71,_72);
+},filters:function(_73,_74){
+dd.register._any("filters",_73,_74);
+}};
+var _75=/&/g;
+var _76=/</g;
+var _77=/>/g;
+var _78=/'/g;
+var _79=/"/g;
+dd._base.escape=function(_7a){
+return dd.mark_safe(_7a.replace(_75,"&amp;").replace(_76,"&lt;").replace(_77,"&gt;").replace(_79,"&quot;").replace(_78,"&#39;"));
+};
+dd._base.safe=function(_7b){
+if(typeof _7b=="string"){
+_7b=new String(_7b);
+}
+if(typeof _7b=="object"){
+_7b.safe=true;
+}
+return _7b;
+};
+dd.mark_safe=dd._base.safe;
+dd.register.tags("dojox.dtl.tag",{"date":["now"],"logic":["if","for","ifequal","ifnotequal"],"loader":["extends","block","include","load","ssi"],"misc":["comment","debug","filter","firstof","spaceless","templatetag","widthratio","with"],"loop":["cycle","ifchanged","regroup"]});
+dd.register.filters("dojox.dtl.filter",{"dates":["date","time","timesince","timeuntil"],"htmlstrings":["linebreaks","linebreaksbr","removetags","striptags"],"integers":["add","get_digit"],"lists":["dictsort","dictsortreversed","first","join","length","length_is","random","slice","unordered_list"],"logic":["default","default_if_none","divisibleby","yesno"],"misc":["filesizeformat","pluralize","phone2numeric","pprint"],"strings":["addslashes","capfirst","center","cut","fix_ampersands","floatformat","iriencode","linenumbers","ljust","lower","make_list","rjust","slugify","stringformat","title","truncatewords","truncatewords_html","upper","urlencode","urlize","urlizetrunc","wordcount","wordwrap"]});
+dd.register.filters("dojox.dtl",{"_base":["escape","safe"]});
})();
-
-dojox.dtl.replace = function(str, token, repl){
- repl = repl || "";
- var pos, len = token.length;
- while(1){
- pos = str.indexOf(token);
- if(pos == -1) break;
- str = str.substring(0, pos) + repl + str.substring(pos + len);
- }
- return str;
}
-
-dojox.dtl.resolveVariable = function(token, context){
- // summary: Quickly resolve a variables
- var filter = new dojox.dtl.Filter(token);
- return filter.resolve(context);
-}
-
-}
diff --git a/js/dojo/dojox/dtl/filter/dates.js b/js/dojo/dojox/dtl/filter/dates.js
--- a/js/dojo/dojox/dtl/filter/dates.js
+++ b/js/dojo/dojox/dtl/filter/dates.js
@@ -1,36 +1,59 @@
-if(!dojo._hasResource["dojox.dtl.filter.dates"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.dtl.filter.dates"] = true;
-dojo.provide("dojox.dtl.filter.dates");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.require("dojox.dtl.utils.date");
-dojo.mixin(dojox.dtl.filter.dates, {
- date: function(value, arg){
- // summary: Formats a date according to the given format
- if(!value || !(value instanceof Date)) return "";
- arg = arg || "N j, Y";
- return dojox.dtl.utils.date.format(value, arg);
- },
- time: function(value, arg){
- // summary: Formats a time according to the given format
- if(!value || !(value instanceof Date)) return "";
- arg = arg || "P";
- return dojox.dtl.utils.date.format(value, arg);
- },
- timesince: function(value, arg){
- // summary: Formats a date as the time since that date (i.e. "4 days, 6 hours")
- var timesince = dojox.dtl.utils.date.timesince;
- if(!value) return "";
- if(arg) return timesince(arg, value);
- return timesince(value);
- },
- timeuntil: function(value, arg){
- // summary: Formats a date as the time until that date (i.e. "4 days, 6 hours")
- var timesince = dojox.dtl.utils.date.timesince;
- if(!value) return "";
- if(arg) return timesince(arg, value);
- return timesince(new Date(), value);
- }
-});
-
+if(!dojo._hasResource["dojox.dtl.filter.dates"]){
+dojo._hasResource["dojox.dtl.filter.dates"]=true;
+dojo.provide("dojox.dtl.filter.dates");
+dojo.require("dojox.dtl.utils.date");
+(function(){
+var _1=dojox.dtl.filter.dates;
+dojo.mixin(_1,{_toDate:function(_2){
+if(_2 instanceof Date){
+return _2;
+}
+_2=new Date(_2);
+if(_2.getTime()==new Date(0).getTime()){
+return "";
+}
+return _2;
+},date:function(_3,_4){
+_3=_1._toDate(_3);
+if(!_3){
+return "";
}
+_4=_4||"N j, Y";
+return dojox.dtl.utils.date.format(_3,_4);
+},time:function(_5,_6){
+_5=_1._toDate(_5);
+if(!_5){
+return "";
+}
+_6=_6||"P";
+return dojox.dtl.utils.date.format(_5,_6);
+},timesince:function(_7,_8){
+_7=_1._toDate(_7);
+if(!_7){
+return "";
+}
+var _9=dojox.dtl.utils.date.timesince;
+if(_8){
+return _9(_8,_7);
+}
+return _9(_7);
+},timeuntil:function(_a,_b){
+_a=_1._toDate(_a);
+if(!_a){
+return "";
+}
+var _c=dojox.dtl.utils.date.timesince;
+if(_b){
+return _c(_b,_a);
+}
+return _c(new Date(),_a);
+}});
+})();
+}
diff --git a/js/dojo/dojox/dtl/filter/htmlstrings.js b/js/dojo/dojox/dtl/filter/htmlstrings.js
--- a/js/dojo/dojox/dtl/filter/htmlstrings.js
+++ b/js/dojo/dojox/dtl/filter/htmlstrings.js
@@ -1,59 +1,37 @@
-if(!dojo._hasResource["dojox.dtl.filter.htmlstrings"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.dtl.filter.htmlstrings"] = true;
-dojo.provide("dojox.dtl.filter.htmlstrings");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.require("dojox.dtl._base");
-dojo.mixin(dojox.dtl.filter.htmlstrings, {
- _escapeamp: /&/g,
- _escapelt: /</g,
- _escapegt: />/g,
- _escapeqt: /'/g,
- _escapedblqt: /"/g,
- _linebreaksrn: /(\r\n|\n\r)/g,
- _linebreaksn: /\n{2,}/g,
- _linebreakss: /(^\s+|\s+$)/g,
- _linebreaksbr: /\n/g,
- _removetagsfind: /[a-z0-9]+/g,
- _striptags: /<[^>]*?>/g,
- escape: function(value){
- // summary: Escapes a string's HTML
- var dh = dojox.dtl.filter.htmlstrings;
- return value.replace(dh._escapeamp, '&amp;').replace(dh._escapelt, '&lt;').replace(dh._escapegt, '&gt;').replace(dh._escapedblqt, '&quot;').replace(dh._escapeqt, '&#39;');
- },
- linebreaks: function(value){
- // summary: Converts newlines into <p> and <br />s
- var output = [];
- var dh = dojox.dtl.filter.htmlstrings;
- value = value.replace(dh._linebreaksrn, "\n");
- var parts = value.split(dh._linebreaksn);
- for(var i = 0; i < parts.length; i++){
- var part = parts[i].replace(dh._linebreakss, "").replace(dh._linebreaksbr, "<br />")
- output.push("<p>" + part + "</p>");
- }
-
- return output.join("\n\n");
- },
- linebreaksbr: function(value){
- // summary: Converts newlines into <br />s
- var dh = dojox.dtl.filter.htmlstrings;
- return value.replace(dh._linebreaksrn, "\n").replace(dh._linebreaksbr, "<br />");
- },
- removetags: function(value, arg){
- // summary: Removes a space separated list of [X]HTML tags from the output"
- var dh = dojox.dtl.filter.htmlstrings;
- var tags = [];
- var group;
- while(group = dh._removetagsfind.exec(arg)){
- tags.push(group[0]);
- }
- tags = "(" + tags.join("|") + ")";
- return value.replace(new RegExp("</?\s*" + tags + "\s*[^>]*>", "gi"), "");
- },
- striptags: function(value){
- // summary: Strips all [X]HTML tags
- return value.replace(dojox.dtl.filter.htmlstrings._striptags, "");
- }
-});
-
+if(!dojo._hasResource["dojox.dtl.filter.htmlstrings"]){
+dojo._hasResource["dojox.dtl.filter.htmlstrings"]=true;
+dojo.provide("dojox.dtl.filter.htmlstrings");
+dojo.require("dojox.dtl._base");
+dojo.mixin(dojox.dtl.filter.htmlstrings,{_linebreaksrn:/(\r\n|\n\r)/g,_linebreaksn:/\n{2,}/g,_linebreakss:/(^\s+|\s+$)/g,_linebreaksbr:/\n/g,_removetagsfind:/[a-z0-9]+/g,_striptags:/<[^>]*?>/g,linebreaks:function(_1){
+var _2=[];
+var dh=dojox.dtl.filter.htmlstrings;
+_1=_1.replace(dh._linebreaksrn,"\n");
+var _3=_1.split(dh._linebreaksn);
+for(var i=0;i<_3.length;i++){
+var _4=_3[i].replace(dh._linebreakss,"").replace(dh._linebreaksbr,"<br />");
+_2.push("<p>"+_4+"</p>");
}
+return _2.join("\n\n");
+},linebreaksbr:function(_5){
+var dh=dojox.dtl.filter.htmlstrings;
+return _5.replace(dh._linebreaksrn,"\n").replace(dh._linebreaksbr,"<br />");
+},removetags:function(_6,_7){
+var dh=dojox.dtl.filter.htmlstrings;
+var _8=[];
+var _9;
+while(_9=dh._removetagsfind.exec(_7)){
+_8.push(_9[0]);
+}
+_8="("+_8.join("|")+")";
+return _6.replace(new RegExp("</?s*"+_8+"s*[^>]*>","gi"),"");
+},striptags:function(_a){
+return _a.replace(dojox.dtl.filter.htmlstrings._striptags,"");
+}});
+}
diff --git a/js/dojo/dojox/dtl/filter/integers.js b/js/dojo/dojox/dtl/filter/integers.js
--- a/js/dojo/dojox/dtl/filter/integers.js
+++ b/js/dojo/dojox/dtl/filter/integers.js
@@ -1,32 +1,28 @@
-if(!dojo._hasResource["dojox.dtl.filter.integers"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.dtl.filter.integers"] = true;
-dojo.provide("dojox.dtl.filter.integers");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
-dojo.mixin(dojox.dtl.filter.integers, {
- add: function(value, arg){
- value = parseInt(value);
- arg = parseInt(arg);
- return isNaN(arg) ? value : value + arg;
- },
- get_digit: function(value, arg){
- // summary:
- // Given a whole number, returns the 1-based requested digit of it
- // desciprtion:
- // 1 is the right-most digit, 2 is the second-right-most digit, etc. Returns the
- // original value for invalid input (if input or argument is not an integer,
- // or if argument is less than 1). Otherwise, output is always an integer.
- value = parseInt(value);
- arg = parseInt(arg) - 1;
- if(arg >= 0){
- value += "";
- if(arg < value.length){
- value = parseInt(value.charAt(arg));
- }else{
- value = 0;
- }
- }
- return (isNaN(value) ? 0 : value);
- }
-});
-
+if(!dojo._hasResource["dojox.dtl.filter.integers"]){
+dojo._hasResource["dojox.dtl.filter.integers"]=true;
+dojo.provide("dojox.dtl.filter.integers");
+dojo.mixin(dojox.dtl.filter.integers,{add:function(_1,_2){
+_1=parseInt(_1,10);
+_2=parseInt(_2,10);
+return isNaN(_2)?_1:_1+_2;
+},get_digit:function(_3,_4){
+_3=parseInt(_3,10);
+_4=parseInt(_4,10)-1;
+if(_4>=0){
+_3+="";
+if(_4<_3.length){
+_3=parseInt(_3.charAt(_4),10);
+}else{
+_3=0;
}
+}
+return (isNaN(_3)?0:_3);
+}});
+}
diff --git a/js/dojo/dojox/dtl/filter/lists.js b/js/dojo/dojox/dtl/filter/lists.js
--- a/js/dojo/dojox/dtl/filter/lists.js
+++ b/js/dojo/dojox/dtl/filter/lists.js
@@ -1,131 +1,95 @@
-if(!dojo._hasResource["dojox.dtl.filter.lists"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.dtl.filter.lists"] = true;
-dojo.provide("dojox.dtl.filter.lists")
-
-dojo.require("dojox.dtl._base");
-
-dojo.mixin(dojox.dtl.filter.lists, {
- _dictsort: function(a, b){
- if(a[0] == b[0]) return 0;
- return (a[0] < b[0]) ? -1 : 1;
- },
- dictsort: function(value, arg){
- // summary: Takes a list of dicts, returns that list sorted by the property given in the argument.
- if(!arg) return value;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- var items = [];
- for(var key in value){
- items.push([dojox.dtl.resolveVariable('var.' + arg, new dojox.dtl.Context({ 'var' : value[key]})), value[key]]);
- }
- items.sort(dojox.dtl.filter.lists._dictsort);
- var output = [];
- for(var i = 0, item; item = items[i]; i++){
- output.push(item[1]);
- }
- return output;
- },
- dictsortreversed: function(value, arg){
- // summary: Takes a list of dicts, returns that list sorted in reverse order by the property given in the argument.
- if(!arg) return value;
- var dictsort = dojox.dtl.filter.lists.dictsort(value, arg);
- return dictsort.reverse();
- },
- first: function(value){
- // summary: Returns the first item in a list
- return (value.length) ? value[0] : "";
- },
- join: function(value, arg){
- // summary: Joins a list with a string, like Python's ``str.join(list)``
- // description:
- // Django throws a compile error, but JS can't do arg checks
- // so we're left with run time errors, which aren't wise for something
- // as trivial here as an empty arg.
- return value.join(arg || ",");
- },
- length: function(value){
- // summary: Returns the length of the value - useful for lists
- return (isNaN(value.length)) ? (value + "").length : value.length;
- },
- length_is: function(value, arg){
- // summary: Returns a boolean of whether the value's length is the argument
- return value.length == parseInt(arg);
- },
- random: function(value){
- // summary: Returns a random item from the list
- return value[Math.floor(Math.random() * value.length)];
- },
- slice: function(value, arg){
- // summary: Returns a slice of the list.
- // description:
- // Uses the same syntax as Python's list slicing; see
- // http://diveintopython.org/native_data_types/lists.html#odbchelper.list.slice
- // for an introduction.
- // Also uses the optional third value to denote every X item.
- arg = arg || "";
- var parts = arg.split(":");
- var bits = [];
- for(var i = 0; i < parts.length; i++){
- if(!parts[i].length){
- bits.push(null);
- }else{
- bits.push(parseInt(parts[i]));
- }
- }
-
- if(bits[0] === null){
- bits[0] = 0;
- }
- if(bits[0] < 0){
- bits[0] = value.length + bits[0];
- }
- if(bits.length < 2 || bits[1] === null){
- bits[1] = value.length;
- }
- if(bits[1] < 0){
- bits[1] = value.length + bits[1];
- }
-
- return value.slice(bits[0], bits[1]);
- },
- _unordered_list: function(value, tabs){
- var ddl = dojox.dtl.filter.lists;
- var indent = "";
- for(var i = 0; i < tabs; i++){
- indent += "\t";
- }
- if(value[1] && value[1].length){
- var recurse = [];
- for(var i = 0; i < value[1].length; i++){
- recurse.push(ddl._unordered_list(value[1][i], tabs + 1))
- }
- return indent + "<li>" + value[0] + "\n" + indent + "<ul>\n" + recurse.join("\n") + "\n" + indent + "</ul>\n" + indent + "</li>";
- }else{
- return indent + "<li>" + value[0] + "</li>";
- }
- },
- unordered_list: function(value){
- // summary:
- // Recursively takes a self-nested list and returns an HTML unordered list --
- // WITHOUT opening and closing <ul> tags.
- // description:
- // The list is assumed to be in the proper format. For example, if ``var`` contains
- // ``['States', [['Kansas', [['Lawrence', []], ['Topeka', []]]], ['Illinois', []]]]``,
- // then ``{{ var|unordered_list }}`` would return::
- //
- // <li>States
- // <ul>
- // <li>Kansas
- // <ul>
- // <li>Lawrence</li>
- // <li>Topeka</li>
- // </ul>
- // </li>
- // <li>Illinois</li>
- // </ul>
- // </li>
- return dojox.dtl.filter.lists._unordered_list(value, 1);
- }
-});
-
+if(!dojo._hasResource["dojox.dtl.filter.lists"]){
+dojo._hasResource["dojox.dtl.filter.lists"]=true;
+dojo.provide("dojox.dtl.filter.lists");
+dojo.require("dojox.dtl._base");
+dojo.mixin(dojox.dtl.filter.lists,{_dictsort:function(a,b){
+if(a[0]==b[0]){
+return 0;
+}
+return (a[0]<b[0])?-1:1;
+},dictsort:function(_1,_2){
+if(!_2){
+return _1;
+}
+var i,_3,_4=[];
+if(!dojo.isArray(_1)){
+var _5=_1,_1=[];
+for(var _6 in _5){
+_1.push(_5[_6]);
+}
+}
+for(i=0;i<_1.length;i++){
+_4.push([new dojox.dtl._Filter("var."+_2).resolve(new dojox.dtl._Context({"var":_1[i]})),_1[i]]);
+}
+_4.sort(dojox.dtl.filter.lists._dictsort);
+var _7=[];
+for(i=0;_3=_4[i];i++){
+_7.push(_3[1]);
+}
+return _7;
+},dictsortreversed:function(_8,_9){
+if(!_9){
+return _8;
}
+var _a=dojox.dtl.filter.lists.dictsort(_8,_9);
+return _a.reverse();
+},first:function(_b){
+return (_b.length)?_b[0]:"";
+},join:function(_c,_d){
+return _c.join(_d||",");
+},length:function(_e){
+return (isNaN(_e.length))?(_e+"").length:_e.length;
+},length_is:function(_f,arg){
+return _f.length==parseInt(arg);
+},random:function(_10){
+return _10[Math.floor(Math.random()*_10.length)];
+},slice:function(_11,arg){
+arg=arg||"";
+var _12=arg.split(":");
+var _13=[];
+for(var i=0;i<_12.length;i++){
+if(!_12[i].length){
+_13.push(null);
+}else{
+_13.push(parseInt(_12[i]));
+}
+}
+if(_13[0]===null){
+_13[0]=0;
+}
+if(_13[0]<0){
+_13[0]=_11.length+_13[0];
+}
+if(_13.length<2||_13[1]===null){
+_13[1]=_11.length;
+}
+if(_13[1]<0){
+_13[1]=_11.length+_13[1];
+}
+return _11.slice(_13[0],_13[1]);
+},_unordered_list:function(_14,_15){
+var ddl=dojox.dtl.filter.lists;
+var i,_16="";
+for(i=0;i<_15;i++){
+_16+="\t";
+}
+if(_14[1]&&_14[1].length){
+var _17=[];
+for(i=0;i<_14[1].length;i++){
+_17.push(ddl._unordered_list(_14[1][i],_15+1));
+}
+return _16+"<li>"+_14[0]+"\n"+_16+"<ul>\n"+_17.join("\n")+"\n"+_16+"</ul>\n"+_16+"</li>";
+}else{
+return _16+"<li>"+_14[0]+"</li>";
+}
+},unordered_list:function(_18){
+return dojox.dtl.filter.lists._unordered_list(_18,1);
+}});
+}
diff --git a/js/dojo/dojox/dtl/filter/logic.js b/js/dojo/dojox/dtl/filter/logic.js
--- a/js/dojo/dojox/dtl/filter/logic.js
+++ b/js/dojo/dojox/dtl/filter/logic.js
@@ -1,34 +1,33 @@
-if(!dojo._hasResource["dojox.dtl.filter.logic"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.dtl.filter.logic"] = true;
-dojo.provide("dojox.dtl.filter.logic");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
-dojo.mixin(dojox.dtl.filter.logic, {
- default_: function(value, arg){
- // summary: If value is unavailable, use given default
- return value || arg || "";
- },
- default_if_none: function(value, arg){
- // summary: If value is null, use given default
- return (value === null) ? arg || "" : value || "";
- },
- divisibleby: function(value, arg){
- // summary: Returns true if the value is devisible by the argument"
- return (parseInt(value) % parseInt(arg)) == 0;
- },
- _yesno: /\s*,\s*/g,
- yesno: function(value, arg){
- // summary:
- // arg being a comma-delimited string, value of true/false/none
- // chooses the appropriate item from the string
- if(!arg) arg = 'yes,no,maybe';
- var parts = arg.split(dojox.dtl.filter.logic._yesno);
- if(parts.length < 2){
- return value;
- }
- if(value) return parts[0];
- if((!value && value !== null) || parts.length < 3) return parts[1];
- return parts[2];
- }
-});
-
+if(!dojo._hasResource["dojox.dtl.filter.logic"]){
+dojo._hasResource["dojox.dtl.filter.logic"]=true;
+dojo.provide("dojox.dtl.filter.logic");
+dojo.mixin(dojox.dtl.filter.logic,{default_:function(_1,_2){
+return _1||_2||"";
+},default_if_none:function(_3,_4){
+return (_3===null)?_4||"":_3||"";
+},divisibleby:function(_5,_6){
+return (parseInt(_5,10)%parseInt(_6,10))===0;
+},_yesno:/\s*,\s*/g,yesno:function(_7,_8){
+if(!_8){
+_8="yes,no,maybe";
}
+var _9=_8.split(dojox.dtl.filter.logic._yesno);
+if(_9.length<2){
+return _7;
+}
+if(_7){
+return _9[0];
+}
+if((!_7&&_7!==null)||_9.length<3){
+return _9[1];
+}
+return _9[2];
+}});
+}
diff --git a/js/dojo/dojox/dtl/filter/misc.js b/js/dojo/dojox/dtl/filter/misc.js
--- a/js/dojo/dojox/dtl/filter/misc.js
+++ b/js/dojo/dojox/dtl/filter/misc.js
@@ -1,59 +1,52 @@
-if(!dojo._hasResource["dojox.dtl.filter.misc"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.dtl.filter.misc"] = true;
-dojo.provide("dojox.dtl.filter.misc");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
-dojo.mixin(dojox.dtl.filter.misc, {
- filesizeformat: function(value){
- // summary: Format the value like a 'human-readable' file size (i.e. 13 KB, 4.1 MB, 102bytes, etc).
- value = parseFloat(value);
- if(value < 1024){
- return (value == 1) ? value + " byte" : value + " bytes";
- }else if(value < 1024 * 1024){
- return (value / 1024).toFixed(1) + " KB";
- }else if(value < 1024 * 1024 * 1024){
- return (value / 1024 / 1024).toFixed(1) + " MB";
- }
- return (value / 1024 / 1024 / 1024).toFixed(1) + " GB";
- },
- pluralize: function(value, arg){
- // summary:
- // Returns a plural suffix if the value is not 1, for '1 vote' vs. '2 votes'
- // description:
- // By default, 's' is used as a suffix; if an argument is provided, that string
- // is used instead. If the provided argument contains a comma, the text before
- // the comma is used for the singular case.
- arg = arg || 's';
- if(arg.indexOf(",") == -1){
- arg = "," + arg;
- }
- var parts = arg.split(",");
- if(parts.length > 2){
- return "";
- }
- var singular = parts[0];
- var plural = parts[1];
-
- if(parseInt(value) != 1){
- return plural;
- }
- return singular;
- },
- _phone2numeric: { a: 2, b: 2, c: 2, d: 3, e: 3, f: 3, g: 4, h: 4, i: 4, j: 5, k: 5, l: 5, m: 6, n: 6, o: 6, p: 7, r: 7, s: 7, t: 8, u: 8, v: 8, w: 9, x: 9, y: 9 },
- phone2numeric: function(value){
- // summary: Takes a phone number and converts it in to its numerical equivalent
- var dm = dojox.dtl.filter.misc;
- value = value + "";
- var output = "";
- for(var i = 0; i < value.length; i++){
- var chr = value.charAt(i).toLowerCase();
- (dm._phone2numeric[chr]) ? output += dm._phone2numeric[chr] : output += value.charAt(i);
- }
- return output;
- },
- pprint: function(value){
- // summary: A wrapper around toJson unless something better comes along
- return dojo.toJson(value);
- }
-});
-
+if(!dojo._hasResource["dojox.dtl.filter.misc"]){
+dojo._hasResource["dojox.dtl.filter.misc"]=true;
+dojo.provide("dojox.dtl.filter.misc");
+dojo.mixin(dojox.dtl.filter.misc,{filesizeformat:function(_1){
+_1=parseFloat(_1);
+if(_1<1024){
+return (_1==1)?_1+" byte":_1+" bytes";
+}else{
+if(_1<1024*1024){
+return (_1/1024).toFixed(1)+" KB";
+}else{
+if(_1<1024*1024*1024){
+return (_1/1024/1024).toFixed(1)+" MB";
+}
+}
+}
+return (_1/1024/1024/1024).toFixed(1)+" GB";
+},pluralize:function(_2,_3){
+_3=_3||"s";
+if(_3.indexOf(",")==-1){
+_3=","+_3;
}
+var _4=_3.split(",");
+if(_4.length>2){
+return "";
+}
+var _5=_4[0];
+var _6=_4[1];
+if(parseInt(_2,10)!=1){
+return _6;
+}
+return _5;
+},_phone2numeric:{a:2,b:2,c:2,d:3,e:3,f:3,g:4,h:4,i:4,j:5,k:5,l:5,m:6,n:6,o:6,p:7,r:7,s:7,t:8,u:8,v:8,w:9,x:9,y:9},phone2numeric:function(_7){
+var dm=dojox.dtl.filter.misc;
+_7=_7+"";
+var _8="";
+for(var i=0;i<_7.length;i++){
+var _9=_7.charAt(i).toLowerCase();
+(dm._phone2numeric[_9])?_8+=dm._phone2numeric[_9]:_8+=_7.charAt(i);
+}
+return _8;
+},pprint:function(_a){
+return dojo.toJson(_a);
+}});
+}
diff --git a/js/dojo/dojox/dtl/filter/strings.js b/js/dojo/dojox/dtl/filter/strings.js
--- a/js/dojo/dojox/dtl/filter/strings.js
+++ b/js/dojo/dojox/dtl/filter/strings.js
@@ -1,312 +1,270 @@
-if(!dojo._hasResource["dojox.dtl.filter.strings"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.dtl.filter.strings"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.dtl.filter.strings"]){
+dojo._hasResource["dojox.dtl.filter.strings"]=true;
dojo.provide("dojox.dtl.filter.strings");
-
dojo.require("dojox.dtl.filter.htmlstrings");
dojo.require("dojox.string.sprintf");
dojo.require("dojox.string.tokenize");
-
-dojo.mixin(dojox.dtl.filter.strings, {
- addslashes: function(value){
- // summary: Adds slashes - useful for passing strings to JavaScript, for example.
- return value.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/'/g, "\\'");
- },
- capfirst: function(value){
- // summary: Capitalizes the first character of the value
- value = "" + value;
- return value.charAt(0).toUpperCase() + value.substring(1);
- },
- center: function(value, arg){
- // summary: Centers the value in a field of a given width
- arg = arg || value.length;
- value = value + "";
- var diff = arg - value.length;
- if(diff % 2){
- value = value + " ";
- diff -= 1;
- }
- for(var i = 0; i < diff; i += 2){
- value = " " + value + " ";
- }
- return value;
- },
- cut: function(value, arg){
- // summary: Removes all values of arg from the given string
- arg = arg + "" || "";
- value = value + "";
- return value.replace(new RegExp(arg, "g"), "");
- },
- _fix_ampersands: /&(?!(\w+|#\d+);)/g,
- fix_ampersands: function(value){
- // summary: Replaces ampersands with ``&amp;`` entities
- return value.replace(dojox.dtl.filter.strings._fix_ampersands, "&amp;");
- },
- floatformat: function(value, arg){
- // summary: Format a number according to arg
- // description:
- // If called without an argument, displays a floating point
- // number as 34.2 -- but only if there's a point to be displayed.
- // With a positive numeric argument, it displays that many decimal places
- // always.
- // With a negative numeric argument, it will display that many decimal
- // places -- but only if there's places to be displayed.
- arg = parseInt(arg || -1);
- value = parseFloat(value);
- var m = value - value.toFixed(0);
- if(!m && arg < 0){
- return value.toFixed();
- }
- value = value.toFixed(Math.abs(arg));
- return (arg < 0) ? parseFloat(value) + "" : value;
- },
- iriencode: function(value){
- return dojox.dtl.text.urlquote(value, "/#%[]=:;$&()+,!");
- },
- linenumbers: function(value){
- // summary: Displays text with line numbers
- var df = dojox.dtl.filter;
- var lines = value.split("\n");
- var output = [];
- var width = (lines.length + "").length;
- for(var i = 0, line; i < lines.length; i++){
- line = lines[i];
- output.push(df.strings.ljust(i + 1, width) + ". " + df.htmlstrings.escape(line));
- }
- return output.join("\n");
- },
- ljust: function(value, arg){
- value = value + "";
- arg = parseInt(arg);
- while(value.length < arg){
- value = value + " ";
- }
- return value;
- },
- lower: function(value){
- // summary: Converts a string into all lowercase
- return (value + "").toLowerCase();
- },
- make_list: function(value){
- // summary:
- // Returns the value turned into a list. For an integer, it's a list of
- // digits. For a string, it's a list of characters.
- var output = [];
- if(typeof value == "number"){
- value = value + "";
- }
- if(value.charAt){
- for(var i = 0; i < value.length; i++){
- output.push(value.charAt(i));
- }
- return output;
- }
- if(typeof value == "object"){
- for(var key in value){
- output.push(value[key]);
- }
- return output;
- }
- return [];
- },
- rjust: function(value, arg){
- value = value + "";
- arg = parseInt(arg);
- while(value.length < arg){
- value = " " + value;
- }
- return value;
- },
- slugify: function(value){
- // summary: Converts to lowercase, removes
- // non-alpha chars and converts spaces to hyphens
- value = value.replace(/[^\w\s-]/g, "").toLowerCase();
- return value.replace(/[\-\s]+/g, "-");
- },
- _strings: {},
- stringformat: function(value, arg){
- // summary:
- // Formats the variable according to the argument, a string formatting specifier.
- // This specifier uses Python string formating syntax, with the exception that
- // the leading "%" is dropped.
- arg = "" + arg;
- var strings = dojox.dtl.filter.strings._strings;
- if(!strings[arg]){
- strings[arg] = new dojox.string.sprintf.Formatter("%" + arg);
- }
- return strings[arg].format(value);
- },
- title: function(value){
- // summary: Converts a string into titlecase
- var last, title = "";
- for(var i = 0, current; i < value.length; i++){
- current = value.charAt(i);
- if(last == " " || last == "\n" || last == "\t" || !last){
- title += current.toUpperCase();
- }else{
- title += current.toLowerCase();
- }
- last = current;
- }
- return title;
- },
- _truncatewords: /[ \n\r\t]/,
- truncatewords: function(value, arg){
- // summary: Truncates a string after a certain number of words
- // arg: Integer
- // Number of words to truncate after
- arg = parseInt(arg);
- if(!arg){
- return value;
- }
-
- for(var i = 0, j = value.length, count = 0, current, last; i < value.length; i++){
- current = value.charAt(i);
- if(dojox.dtl.filter.strings._truncatewords.test(last)){
- if(!dojox.dtl.filter.strings._truncatewords.test(current)){
- ++count;
- if(count == arg){
- return value.substring(0, j + 1);
- }
- }
- }else if(!dojox.dtl.filter.strings._truncatewords.test(current)){
- j = i;
- }
- last = current;
- }
- return value;
- },
- _truncate_words: /(&.*?;|<.*?>|(\w[\w-]*))/g,
- _truncate_tag: /<(\/)?([^ ]+?)(?: (\/)| .*?)?>/,
- _truncate_singlets: { br: true, col: true, link: true, base: true, img: true, param: true, area: true, hr: true, input: true },
- truncatewords_html: function(value, arg){
- arg = parseInt(arg);
-
- if(arg <= 0){
- return "";
- }
-
- var strings = dojox.dtl.filter.strings;
- var words = 0;
- var open = [];
-
- var output = dojox.string.tokenize(value, strings._truncate_words, function(all, word){
- if(word){
- // It's an actual non-HTML word
- ++words;
- if(words < arg){
- return word;
- }else if(words == arg){
- return word + " ...";
- }
- }
- // Check for tag
- var tag = all.match(strings._truncate_tag);
- if(!tag || words >= arg){
- // Don't worry about non tags or tags after our truncate point
- return;
- }
- var closing = tag[1];
- var tagname = tag[2].toLowerCase();
- var selfclosing = tag[3];
- if(closing || strings._truncate_singlets[tagname]){
- }else if(closing){
- var i = dojo.indexOf(open, tagname);
- if(i != -1){
- open = open.slice(i + 1);
- }
- }else{
- open.unshift(tagname);
- }
- return all;
- }).join("");
-
- output = output.replace(/\s+$/g, "");
-
- for(var i = 0, tag; tag = open[i]; i++){
- output += "</" + tag + ">";
- }
-
- return output;
- },
- upper: function(value){
- return value.toUpperCase();
- },
- urlencode: function(value){
- return dojox.dtl.text.urlquote(value);
- },
- _urlize: /^((?:[(>]|&lt;)*)(.*?)((?:[.,)>\n]|&gt;)*)$/,
- _urlize2: /^\S+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+$/,
- urlize: function(value){
- return dojox.dtl.filter.strings.urlizetrunc(value);
- },
- urlizetrunc: function(value, arg){
- arg = parseInt(arg);
- return dojox.string.tokenize(value, /(\S+)/g, function(word){
- var matches = dojox.dtl.filter.strings._urlize.exec(word);
- if(!matches){
- return word;
- }
- var lead = matches[1];
- var middle = matches[2];
- var trail = matches[3];
-
- var startsWww = middle.indexOf("www.") == 0;
- var hasAt = middle.indexOf("@") != -1;
- var hasColon = middle.indexOf(":") != -1;
- var startsHttp = middle.indexOf("http://") == 0;
- var startsHttps = middle.indexOf("https://") == 0;
- var firstAlpha = /[a-zA-Z0-9]/.test(middle.charAt(0));
- var last4 = middle.substring(middle.length - 4);
-
- var trimmed = middle;
- if(arg > 3){
- trimmed = trimmed.substring(0, arg - 3) + "...";
- }
-
- if(startsWww || (!hasAt && !startsHttp && middle.length && firstAlpha && (last4 == ".org" || last4 == ".net" || last4 == ".com"))){
- return '<a href="http://' + middle + '" rel="nofollow">' + trimmed + '</a>';
- }else if(startsHttp || startsHttps){
- return '<a href="' + middle + '" rel="nofollow">' + trimmed + '</a>';
- }else if(hasAt && !startsWww && !hasColon && dojox.dtl.filter.strings._urlize2.test(middle)){
- return '<a href="mailto:' + middle + '">' + middle + '</a>';
- }
- return word;
- }).join("");
- },
- wordcount: function(value){
- return dojox.dtl.text.pySplit(value).length;
- },
- wordwrap: function(value, arg){
- arg = parseInt(arg);
- // summary: Wraps words at specified line length
- var output = [];
- var parts = value.split(/ /g);
- if(parts.length){
- var word = parts.shift();
- output.push(word);
- var pos = word.length - word.lastIndexOf("\n") - 1;
- for(var i = 0; i < parts.length; i++){
- word = parts[i];
- if(word.indexOf("\n") != -1){
- var lines = word.split(/\n/g);
- }else{
- var lines = [word];
- }
- pos += lines[0].length + 1;
- if(arg && pos > arg){
- output.push("\n");
- pos = lines[lines.length - 1].length;
- }else{
- output.push(" ");
- if(lines.length > 1){
- pos = lines[lines.length - 1].length;
- }
- }
- output.push(word);
- }
- }
- return output.join("");
- }
-});
-
+dojo.mixin(dojox.dtl.filter.strings,{_urlquote:function(_1,_2){
+if(!_2){
+_2="/";
+}
+return dojox.string.tokenize(_1,/([^\w-_.])/g,function(_3){
+if(_2.indexOf(_3)==-1){
+if(_3==" "){
+return "+";
+}else{
+return "%"+_3.charCodeAt(0).toString(16).toUpperCase();
+}
+}
+return _3;
+}).join("");
+},addslashes:function(_4){
+return _4.replace(/\\/g,"\\\\").replace(/"/g,"\\\"").replace(/'/g,"\\'");
+},capfirst:function(_5){
+_5=""+_5;
+return _5.charAt(0).toUpperCase()+_5.substring(1);
+},center:function(_6,_7){
+_7=_7||_6.length;
+_6=_6+"";
+var _8=_7-_6.length;
+if(_8%2){
+_6=_6+" ";
+_8-=1;
+}
+for(var i=0;i<_8;i+=2){
+_6=" "+_6+" ";
+}
+return _6;
+},cut:function(_9,_a){
+_a=_a+""||"";
+_9=_9+"";
+return _9.replace(new RegExp(_a,"g"),"");
+},_fix_ampersands:/&(?!(\w+|#\d+);)/g,fix_ampersands:function(_b){
+return _b.replace(dojox.dtl.filter.strings._fix_ampersands,"&amp;");
+},floatformat:function(_c,_d){
+_d=parseInt(_d||-1,10);
+_c=parseFloat(_c);
+var m=_c-_c.toFixed(0);
+if(!m&&_d<0){
+return _c.toFixed();
+}
+_c=_c.toFixed(Math.abs(_d));
+return (_d<0)?parseFloat(_c)+"":_c;
+},iriencode:function(_e){
+return dojox.dtl.filter.strings._urlquote(_e,"/#%[]=:;$&()+,!");
+},linenumbers:function(_f){
+var df=dojox.dtl.filter;
+var _10=_f.split("\n");
+var _11=[];
+var _12=(_10.length+"").length;
+for(var i=0,_13;i<_10.length;i++){
+_13=_10[i];
+_11.push(df.strings.ljust(i+1,_12)+". "+dojox.dtl._base.escape(_13));
+}
+return _11.join("\n");
+},ljust:function(_14,arg){
+_14=_14+"";
+arg=parseInt(arg,10);
+while(_14.length<arg){
+_14=_14+" ";
+}
+return _14;
+},lower:function(_15){
+return (_15+"").toLowerCase();
+},make_list:function(_16){
+var _17=[];
+if(typeof _16=="number"){
+_16=_16+"";
+}
+if(_16.charAt){
+for(var i=0;i<_16.length;i++){
+_17.push(_16.charAt(i));
+}
+return _17;
+}
+if(typeof _16=="object"){
+for(var key in _16){
+_17.push(_16[key]);
+}
+return _17;
+}
+return [];
+},rjust:function(_18,arg){
+_18=_18+"";
+arg=parseInt(arg,10);
+while(_18.length<arg){
+_18=" "+_18;
+}
+return _18;
+},slugify:function(_19){
+_19=_19.replace(/[^\w\s-]/g,"").toLowerCase();
+return _19.replace(/[\-\s]+/g,"-");
+},_strings:{},stringformat:function(_1a,arg){
+arg=""+arg;
+var _1b=dojox.dtl.filter.strings._strings;
+if(!_1b[arg]){
+_1b[arg]=new dojox.string.sprintf.Formatter("%"+arg);
+}
+return _1b[arg].format(_1a);
+},title:function(_1c){
+var _1d,_1e="";
+for(var i=0,_1f;i<_1c.length;i++){
+_1f=_1c.charAt(i);
+if(_1d==" "||_1d=="\n"||_1d=="\t"||!_1d){
+_1e+=_1f.toUpperCase();
+}else{
+_1e+=_1f.toLowerCase();
+}
+_1d=_1f;
+}
+return _1e;
+},_truncatewords:/[ \n\r\t]/,truncatewords:function(_20,arg){
+arg=parseInt(arg,10);
+if(!arg){
+return _20;
+}
+for(var i=0,j=_20.length,_21=0,_22,_23;i<_20.length;i++){
+_22=_20.charAt(i);
+if(dojox.dtl.filter.strings._truncatewords.test(_23)){
+if(!dojox.dtl.filter.strings._truncatewords.test(_22)){
+++_21;
+if(_21==arg){
+return _20.substring(0,j+1);
+}
}
+}else{
+if(!dojox.dtl.filter.strings._truncatewords.test(_22)){
+j=i;
+}
+}
+_23=_22;
+}
+return _20;
+},_truncate_words:/(&.*?;|<.*?>|(\w[\w\-]*))/g,_truncate_tag:/<(\/)?([^ ]+?)(?: (\/)| .*?)?>/,_truncate_singlets:{br:true,col:true,link:true,base:true,img:true,param:true,area:true,hr:true,input:true},truncatewords_html:function(_24,arg){
+arg=parseInt(arg,10);
+if(arg<=0){
+return "";
+}
+var _25=dojox.dtl.filter.strings;
+var _26=0;
+var _27=[];
+var _28=dojox.string.tokenize(_24,_25._truncate_words,function(all,_29){
+if(_29){
+++_26;
+if(_26<arg){
+return _29;
+}else{
+if(_26==arg){
+return _29+" ...";
+}
+}
+}
+var tag=all.match(_25._truncate_tag);
+if(!tag||_26>=arg){
+return;
+}
+var _2a=tag[1];
+var _2b=tag[2].toLowerCase();
+var _2c=tag[3];
+if(_2a||_25._truncate_singlets[_2b]){
+}else{
+if(_2a){
+var i=dojo.indexOf(_27,_2b);
+if(i!=-1){
+_27=_27.slice(i+1);
+}
+}else{
+_27.unshift(_2b);
+}
+}
+return all;
+}).join("");
+_28=_28.replace(/\s+$/g,"");
+for(var i=0,tag;tag=_27[i];i++){
+_28+="</"+tag+">";
+}
+return _28;
+},upper:function(_2d){
+return _2d.toUpperCase();
+},urlencode:function(_2e){
+return dojox.dtl.filter.strings._urlquote(_2e);
+},_urlize:/^((?:[(>]|&lt;)*)(.*?)((?:[.,)>\n]|&gt;)*)$/,_urlize2:/^\S+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+$/,urlize:function(_2f){
+return dojox.dtl.filter.strings.urlizetrunc(_2f);
+},urlizetrunc:function(_30,arg){
+arg=parseInt(arg);
+return dojox.string.tokenize(_30,/(\S+)/g,function(_31){
+var _32=dojox.dtl.filter.strings._urlize.exec(_31);
+if(!_32){
+return _31;
+}
+var _33=_32[1];
+var _34=_32[2];
+var _35=_32[3];
+var _36=_34.indexOf("www.")==0;
+var _37=_34.indexOf("@")!=-1;
+var _38=_34.indexOf(":")!=-1;
+var _39=_34.indexOf("http://")==0;
+var _3a=_34.indexOf("https://")==0;
+var _3b=/[a-zA-Z0-9]/.test(_34.charAt(0));
+var _3c=_34.substring(_34.length-4);
+var _3d=_34;
+if(arg>3){
+_3d=_3d.substring(0,arg-3)+"...";
+}
+if(_36||(!_37&&!_39&&_34.length&&_3b&&(_3c==".org"||_3c==".net"||_3c==".com"))){
+return "<a href=\"http://"+_34+"\" rel=\"nofollow\">"+_3d+"</a>";
+}else{
+if(_39||_3a){
+return "<a href=\""+_34+"\" rel=\"nofollow\">"+_3d+"</a>";
+}else{
+if(_37&&!_36&&!_38&&dojox.dtl.filter.strings._urlize2.test(_34)){
+return "<a href=\"mailto:"+_34+"\">"+_34+"</a>";
+}
+}
+}
+return _31;
+}).join("");
+},wordcount:function(_3e){
+_3e=dojo.trim(_3e);
+if(!_3e){
+return 0;
+}
+return _3e.split(/\s+/g).length;
+},wordwrap:function(_3f,arg){
+arg=parseInt(arg);
+var _40=[];
+var _41=_3f.split(/\s+/g);
+if(_41.length){
+var _42=_41.shift();
+_40.push(_42);
+var pos=_42.length-_42.lastIndexOf("\n")-1;
+for(var i=0;i<_41.length;i++){
+_42=_41[i];
+if(_42.indexOf("\n")!=-1){
+var _43=_42.split(/\n/g);
+}else{
+var _43=[_42];
+}
+pos+=_43[0].length+1;
+if(arg&&pos>arg){
+_40.push("\n");
+pos=_43[_43.length-1].length;
+}else{
+_40.push(" ");
+if(_43.length>1){
+pos=_43[_43.length-1].length;
+}
+}
+_40.push(_42);
+}
+}
+return _40.join("");
+}});
+}
diff --git a/js/dojo/dojox/dtl/html.js b/js/dojo/dojox/dtl/html.js
--- a/js/dojo/dojox/dtl/html.js
+++ b/js/dojo/dojox/dtl/html.js
@@ -1,658 +1,14 @@
-if(!dojo._hasResource["dojox.dtl.html"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.dtl.html"] = true;
-dojo.provide("dojox.dtl.html");
-
-dojo.require("dojox.dtl._base");
-
-dojox.dtl.ObjectMap = function(){
- this.contents = [];
-}
-dojo.extend(dojox.dtl.ObjectMap, {
- get: function(key){
- var contents = this.contents;
- for(var i = 0, content; content = contents[i]; i++){
- if(content[0] === key){
- return content[1];
- }
- }
- },
- put: function(key, value){
- var contents = this.contents;
- for(var i = 0, content; content = contents[i]; i++){
- if(content[0] === key){
- if(arguments.length == 1){
- contents.splice(i, 1);
- return;
- }
- content[1] = value;
- return;
- }
- }
- contents.push([key, value]);
- },
- toString: function(){ return "dojox.dtl.ObjectMap"; }
-});
-
-dojox.dtl.html = {
- types: dojo.mixin({change: -11, attr: -12, elem: 1, text: 3}, dojox.dtl.text.types),
- _attributes: {},
- _re: /(^\s+|\s+$)/g,
- _re2: /\b([a-zA-Z]+)="/g,
- _re3: /<!--({({|%).*?(%|})})-->/g,
- _re4: /^function anonymous\(\)\s*{\s*(.*)\s*}$/,
- _trim: function(/*String*/ str){
- return str.replace(this._re, "");
- },
- getTemplate: function(text){
- if(typeof this._commentable == "undefined"){
- // Check to see if the browser can handle comments
- this._commentable = false;
- var div = document.createElement("div");
- div.innerHTML = "<!--Test comment handling, and long comments, using comments whenever possible.-->";
- if(div.childNodes.length && div.childNodes[0].nodeType == 8 && div.childNodes[0].data == "comment"){
- this._commentable = true;
- }
- }
-
- if(!this._commentable){
- // Strip comments
- text = text.replace(this._re3, "$1");
- }
-
- var match;
- while(match = this._re2.exec(text)){
- this._attributes[match[1]] = true;
- }
- var div = document.createElement("div");
- div.innerHTML = text;
- var output = { pres: [], posts: []}
- while(div.childNodes.length){
- if(!output.node && div.childNodes[0].nodeType == 1){
- output.node = div.removeChild(div.childNodes[0]);
- }else if(!output.node){
- output.pres.push(div.removeChild(div.childNodes[0]));
- }else{
- output.posts.push(div.removeChild(div.childNodes[0]));
- }
- }
-
- if(!output.node){
- throw new Error("Template did not provide any content");
- }
-
- return output;
- },
- tokenize: function(/*Node*/ node, /*Array?*/ tokens, /*Array?*/ preNodes, /*Array?*/ postNodes){
- tokens = tokens || [];
- var first = !tokens.length;
- var types = this.types;
-
- var children = [];
- for(var i = 0, child; child = node.childNodes[i]; i++){
- children.push(child);
- }
-
- if(preNodes){
- for(var i = 0, child; child = preNodes[i]; i++){
- this._tokenize(node, child, tokens);
- }
- }
-
- tokens.push([types.elem, node]);
- tokens.push([types.change, node]);
-
- for(var key in this._attributes){
- var value = "";
- if(key == "class"){
- value = node.className || value;
- }else if(key == "for"){
- value = node.htmlFor || value;
- }else if(node.getAttribute){
- value = node.getAttribute(key, 2) || value;
- if(key == "href" || key == "src"){
- if(dojo.isIE){
- var hash = location.href.lastIndexOf(location.hash);
- var href = location.href.substring(0, hash).split("/");
- href.pop();
- href = href.join("/") + "/";
- if(value.indexOf(href) == 0){
- value = value.replace(href, "");
- }
- value = value.replace(/%20/g, " ").replace(/%7B/g, "{").replace(/%7D/g, "}").replace(/%25/g, "%");
- }
- if(value.indexOf("{%") != -1 || value.indexOf("{{") != -1){
- node.setAttribute(key, "");
- }
- }
- }
- if(typeof value == "function"){
- value = value.toString().replace(this._re4, "$1");
- }
- if(typeof value == "string" && (value.indexOf("{%") != -1 || value.indexOf("{{") != -1 || (value && dojox.dtl.text.getTag("attr:" + key, true)))){
- tokens.push([types.attr, node, key, value]);
- }
- }
-
- if(!children.length){
- tokens.push([types.change, node.parentNode, true]);
- if(postNodes){
- for(var i = 0, child; child = postNodes[i]; i++){
- this._tokenize(node, child, tokens);
- }
- }
- return tokens;
- }
-
- for(var i = 0, child; child = children[i]; i++){
- this._tokenize(node, child, tokens);
- }
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- if(node.parentNode && node.parentNode.tagName){
- tokens.push([types.change, node.parentNode, true]);
- node.parentNode.removeChild(node);
- }
-
- if(postNodes){
- for(var i = 0, child; child = postNodes[i]; i++){
- this._tokenize(node, child, tokens);
- }
- }
-
- if(first){
- tokens.push([types.change, node, true]);
- }
-
- return tokens;
- },
- _tokenize: function(parent, child, tokens){
- var types = this.types;
- var data = child.data;
- switch(child.nodeType){
- case 1:
- this.tokenize(child, tokens);
- break;
- case 3:
- if(data.match(/[^\s\n]/)){
- if(data.indexOf("{{") != -1 || data.indexOf("{%") != -1){
- var texts = dojox.dtl.text.tokenize(data);
- for(var j = 0, text; text = texts[j]; j++){
- if(typeof text == "string"){
- tokens.push([types.text, text]);
- }else{
- tokens.push(text);
- }
- }
- }else{
- tokens.push([child.nodeType, child]);
- }
- }
- if(child.parentNode) child.parentNode.removeChild(child);
- break;
- case 8:
- if(data.indexOf("{%") == 0){
- tokens.push([types.tag, this._trim(data.substring(2, data.length - 3))]);
- }
- if(data.indexOf("{{") == 0){
- tokens.push([types.varr, this._trim(data.substring(2, data.length - 3))]);
- }
- if(child.parentNode) child.parentNode.removeChild(child);
- break;
- }
- }
-}
-
-dojox.dtl.HtmlTemplate = function(/*String|dojo._Url*/ obj){
- // summary: Use this object for HTML templating
- var dd = dojox.dtl;
- var ddh = dd.html;
-
- if(!obj.node){
- if(typeof obj == "object"){
- obj = dojox.dtl.text.getTemplateString(obj);
- }
- obj = ddh.getTemplate(obj);
- }
-
- var tokens = ddh.tokenize(obj.node, [], obj.pres, obj.posts);
- var parser = new dd.HtmlParser(tokens);
- this.nodelist = parser.parse();
-}
-dojo.extend(dojox.dtl.HtmlTemplate, {
- _count: 0,
- _re: /\bdojo:([a-zA-Z0-9_]+)\b/g,
- setClass: function(str){
- this.getRootNode().className = str;
- },
- getRootNode: function(){
- return this.rootNode;
- },
- getBuffer: function(){
- return new dojox.dtl.HtmlBuffer();
- },
- render: function(context, buffer){
- buffer = buffer || this.getBuffer();
- this.rootNode = null;
- var onSetParent = dojo.connect(buffer, "onSetParent", this, function(node){
- if(!this.rootNode){
- this.rootNode = node || true;
- }
- });
- var output = this.nodelist.render(context || new dojox.dtl.Context({}), buffer);
- dojo.disconnect(onSetParent);
- buffer._flushCache();
- return output;
- },
- unrender: function(context, buffer){
- return this.nodelist.unrender(context, buffer);
- },
- toString: function(){ return "dojox.dtl.HtmlTemplate"; }
-});
-
-dojox.dtl.HtmlBuffer = function(/*Node*/ parent){
- // summary: Allows the manipulation of DOM
- // description:
- // Use this to append a child, change the parent, or
- // change the attribute of the current node.
- this._parent = parent;
- this._cache = [];
-}
-dojo.extend(dojox.dtl.HtmlBuffer, {
- concat: function(/*DOMNode*/ node){
- if(!this._parent) return this;
- if(node.nodeType){
- var caches = this._getCache(this._parent);
- if(node.parentNode === this._parent){
- // If we reach a node that already existed, fill in the cache for this same parent
- var i = 0;
- for(var i = 0, cache; cache = caches[i]; i++){
- this.onAddNode(node);
- this._parent.insertBefore(cache, node);
- }
- caches.length = 0;
- }
- if(!node.parentNode || !node.parentNode.tagName){
- if(!this._parent.childNodes.length){
- this.onAddNode(node);
- this._parent.appendChild(node);
- }else{
- caches.push(node);
- }
- }
- }
- return this;
- },
- remove: function(obj){
- if(typeof obj == "string"){
- this._parent.removeAttribute(obj);
- }else{
- if(obj.parentNode === this._parent){
- this.onRemoveNode();
- this._parent.removeChild(obj);
- }
- }
- return this;
- },
- setAttribute: function(key, value){
- if(key == "class"){
- this._parent.className = value;
- }else if(key == "for"){
- this._parent.htmlFor = value;
- }else if(this._parent.setAttribute){
- this._parent.setAttribute(key, value);
- }
- return this;
- },
- setParent: function(node, /*Boolean?*/ up){
- if(!this._parent) this._parent = node;
- var caches = this._getCache(this._parent);
- if(caches && caches.length && up){
- for(var i = 0, cache; cache = caches[i]; i++){
- if(cache !== this._parent && (!cache.parentNode || !cache.parentNode.tagName)){
- this.onAddNode(cache);
- this._parent.appendChild(cache);
- }
- }
- caches.length = 0;
- }
- this.onSetParent(node, up);
- this._parent = node;
- return this;
- },
- getParent: function(){
- return this._parent;
- },
- onSetParent: function(){
- // summary: Stub called when setParent is used.
- },
- onAddNode: function(){
- // summary: Stub called when new nodes are added
- },
- onRemoveNode: function(){
- // summary: Stub called when nodes are removed
- },
- _getCache: function(node){
- for(var i = 0, cache; cache = this._cache[i]; i++){
- if(cache[0] === node){
- return cache[1];
- }
- }
- var arr = [];
- this._cache.push([node, arr]);
- return arr;
- },
- _flushCache: function(node){
- for(var i = 0, cache; cache = this._cache[i]; i++){
- if(!cache[1].length){
- this._cache.splice(i--, 1);
- }
- }
- },
- toString: function(){ return "dojox.dtl.HtmlBuffer"; }
-});
-
-dojox.dtl.HtmlNode = function(node){
- // summary: Places a node into DOM
- this.contents = node;
-}
-dojo.extend(dojox.dtl.HtmlNode, {
- render: function(context, buffer){
- return buffer.concat(this.contents);
- },
- unrender: function(context, buffer){
- return buffer.remove(this.contents);
- },
- clone: function(buffer){
- return new dojox.dtl.HtmlNode(this.contents);
- },
- toString: function(){ return "dojox.dtl.HtmlNode"; }
-});
-
-dojox.dtl.HtmlNodeList = function(/*Node[]*/ nodes){
- // summary: A list of any HTML-specific node object
- // description:
- // Any object that's used in the constructor or added
- // through the push function much implement the
- // render, unrender, and clone functions.
- this.contents = nodes || [];
-}
-dojo.extend(dojox.dtl.HtmlNodeList, {
- parents: new dojox.dtl.ObjectMap(),
- push: function(node){
- this.contents.push(node);
- },
- unshift: function(node){
- this.contents.unshift(node);
- },
- render: function(context, buffer, /*Node*/ instance){
- if(instance){
- var parent = buffer.getParent();
- }
- for(var i = 0; i < this.contents.length; i++){
- buffer = this.contents[i].render(context, buffer);
- if(!buffer) throw new Error("Template node render functions must return their buffer");
- }
- if(parent){
- buffer.setParent(parent, true);
- }
- return buffer;
- },
- unrender: function(context, buffer){
- for(var i = 0; i < this.contents.length; i++){
- buffer = this.contents[i].unrender(context, buffer);
- if(!buffer) throw new Error("Template node render functions must return their buffer");
- }
- return buffer;
- },
- clone: function(buffer){
- // summary:
- // Used to create an identical copy of a NodeList, useful for things like the for tag.
- var dd = dojox.dtl;
- var ddh = dd.html;
- var parent = buffer.getParent();
- var contents = this.contents;
- var nodelist = new dd.HtmlNodeList();
- var cloned = [];
- for(var i = 0; i < contents.length; i++){
- var clone = contents[i].clone(buffer);
- if(clone instanceof dd.ChangeNode || clone instanceof dd.HtmlNode){
- var item = this.parents.get(clone.contents);
- if(item){
- clone.contents = item;
- }else if(parent !== clone.contents && clone instanceof dd.HtmlNode){
- var node = clone.contents;
- clone.contents = clone.contents.cloneNode(false);
- cloned.push(node);
- this.parents.put(node, clone.contents);
- }
- }
- nodelist.push(clone);
- }
-
- for(var i = 0, clone; clone = cloned[i]; i++){
- this.parents.put(clone);
- }
-
- return nodelist;
- },
- toString: function(){ return "dojox.dtl.HtmlNodeList"; }
-});
-
-dojox.dtl.HtmlVarNode = function(str){
- // summary: A node to be processed as a variable
- // description:
- // Will render an object that supports the render function
- // and the getRootNode function
- this.contents = new dojox.dtl.Filter(str);
- this._lists = {};
+if(!dojo._hasResource["dojox.dtl.html"]){
+dojo._hasResource["dojox.dtl.html"]=true;
+dojo.provide("dojox.dtl.html");
+dojo.deprecated("dojox.dtl.html","All packages and classes in dojox.dtl that start with Html or html have been renamed to Dom or dom");
+dojo.require("dojox.dtl.dom");
+dojox.dtl.HtmlTemplate=dojox.dtl.DomTemplate;
}
-dojo.extend(dojox.dtl.HtmlVarNode, {
- render: function(context, buffer){
- this._rendered = true;
- var dd = dojox.dtl;
- var ddh = dd.html;
- var str = this.contents.resolve(context);
- if(str && str.render && str.getRootNode){
- var root = this._curr = str.getRootNode();
- var lists = this._lists;
- var list = lists[root];
- if(!list){
- list = lists[root] = new dd.HtmlNodeList();
- list.push(new dd.ChangeNode(buffer.getParent()));
- list.push(new dd.HtmlNode(root));
- list.push(str);
- list.push(new dd.ChangeNode(buffer.getParent(), true));
- }
- return list.render(context, buffer);
- }else{
- if(!this._txt) this._txt = document.createTextNode(str);
- if(this._txt.data != str) this._txt.data = str;
- return buffer.concat(this._txt);
- }
- return buffer;
- },
- unrender: function(context, buffer){
- if(this._rendered){
- this._rendered = false;
- if(this._curr){
- return this._lists[this._curr].unrender(context, buffer);
- }else if(this._txt){
- return buffer.remove(this._txt);
- }
- }
- return buffer;
- },
- clone: function(){
- return new dojox.dtl.HtmlVarNode(this.contents.contents);
- },
- toString: function(){ return "dojox.dtl.HtmlVarNode"; }
-});
-
-dojox.dtl.ChangeNode = function(node, /*Boolean?*/ up){
- // summary: Changes the parent during render/unrender
- this.contents = node;
- this._up = up;
-}
-dojo.extend(dojox.dtl.ChangeNode, {
- render: function(context, buffer){
- return buffer.setParent(this.contents, this._up);
- },
- unrender: function(context, buffer){
- return buffer.setParent(this.contents);
- },
- clone: function(buffer){
- return new dojox.dtl.ChangeNode(this.contents, this._up);
- },
- toString: function(){ return "dojox.dtl.ChangeNode"; }
-});
-
-dojox.dtl.AttributeNode = function(key, value){
- // summary: Works on attributes
- this._key = key;
- this._value = value;
- this._tpl = new dojox.dtl.Template(value);
- this.contents = "";
-}
-dojo.extend(dojox.dtl.AttributeNode, {
- render: function(context, buffer){
- var key = this._key;
- var value = this._tpl.render(context);
- if(this._rendered){
- if(value != this.contents){
- this.contents = value;
- return buffer.setAttribute(key, value);
- }
- }else{
- this._rendered = true;
- this.contents = value;
- return buffer.setAttribute(key, value);
- }
- return buffer;
- },
- unrender: function(context, buffer){
- if(this._rendered){
- this._rendered = false;
- this.contents = "";
- return buffer.remove(this.contents);
- }
- return buffer;
- },
- clone: function(){
- return new dojox.dtl.AttributeNode(this._key, this._value);
- },
- toString: function(){ return "dojox.dtl.AttributeNode"; }
-});
-
-dojox.dtl.HtmlTextNode = function(str){
- // summary: Adds a straight text node without any processing
- this.contents = document.createTextNode(str);
-}
-dojo.extend(dojox.dtl.HtmlTextNode, {
- render: function(context, buffer){
- return buffer.concat(this.contents);
- },
- unrender: function(context, buffer){
- return buffer.remove(this.contents);
- },
- clone: function(){
- return new dojox.dtl.HtmlTextNode(this.contents.data);
- },
- toString: function(){ return "dojox.dtl.HtmlTextNode"; }
-});
-
-dojox.dtl.HtmlParser = function(tokens){
- // summary: Turn a simple array into a set of objects
- // description:
- // This is also used by all tags to move through
- // the list of nodes.
- this.contents = tokens;
-}
-dojo.extend(dojox.dtl.HtmlParser, {
- parse: function(/*Array?*/ stop_at){
- var dd = dojox.dtl;
- var ddh = dd.html;
- var types = ddh.types;
- var terminators = {};
- var tokens = this.contents;
- if(!stop_at){
- stop_at = [];
- }
- for(var i = 0; i < stop_at.length; i++){
- terminators[stop_at[i]] = true;
- }
- var nodelist = new dd.HtmlNodeList();
- while(tokens.length){
- var token = tokens.shift();
- var type = token[0];
- var value = token[1];
- if(type == types.change){
- nodelist.push(new dd.ChangeNode(value, token[2]));
- }else if(type == types.attr){
- var fn = dojox.dtl.text.getTag("attr:" + token[2], true);
- if(fn){
- nodelist.push(fn(null, token[2] + " " + token[3]));
- }else{
- nodelist.push(new dd.AttributeNode(token[2], token[3]));
- }
- }else if(type == types.elem){
- var fn = dojox.dtl.text.getTag("node:" + value.tagName.toLowerCase(), true);
- if(fn){
- // TODO: We need to move this to tokenization so that it's before the
- // node and the parser can be passed here instead of null
- nodelist.push(fn(null, value, value.tagName.toLowerCase()));
- }
- nodelist.push(new dd.HtmlNode(value));
- }else if(type == types.varr){
- nodelist.push(new dd.HtmlVarNode(value));
- }else if(type == types.text){
- nodelist.push(new dd.HtmlTextNode(value.data || value));
- }else if(type == types.tag){
- if(terminators[value]){
- tokens.unshift(token);
- return nodelist;
- }
- var cmd = value.split(/\s+/g);
- if(cmd.length){
- cmd = cmd[0];
- var fn = dojox.dtl.text.getTag(cmd);
- if(typeof fn != "function"){
- throw new Error("Function not found for ", cmd);
- }
- var tpl = fn(this, value);
- if(tpl){
- nodelist.push(tpl);
- }
- }
- }
- }
-
- if(stop_at.length){
- throw new Error("Could not find closing tag(s): " + stop_at.toString());
- }
-
- return nodelist;
- },
- next: function(){
- // summary: Used by tags to discover what token was found
- var token = this.contents.shift();
- return {type: token[0], text: token[1]};
- },
- skipPast: function(endtag){
- return dojox.dtl.Parser.prototype.skipPast.call(this, endtag);
- },
- getVarNode: function(){
- return dojox.dtl.HtmlVarNode;
- },
- getTextNode: function(){
- return dojox.dtl.HtmlTextNode;
- },
- getTemplate: function(/*String*/ loc){
- return new dojox.dtl.HtmlTemplate(dojox.dtl.html.getTemplate(loc));
- },
- toString: function(){ return "dojox.dtl.HtmlParser"; }
-});
-
-dojox.dtl.register.tag("dojox.dtl.tag.event", "dojox.dtl.tag.event", [[/(attr:)?on(click|key(up))/i, "on"]]);
-dojox.dtl.register.tag("dojox.dtl.tag.html", "dojox.dtl.tag.html", ["html", "attr:attach", "attr:tstyle"]);
-
-}
diff --git a/js/dojo/dojox/dtl/render/html.js b/js/dojo/dojox/dtl/render/html.js
--- a/js/dojo/dojox/dtl/render/html.js
+++ b/js/dojo/dojox/dtl/render/html.js
@@ -1,70 +1,13 @@
-if(!dojo._hasResource["dojox.dtl.render.html"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.dtl.render.html"] = true;
-dojo.provide("dojox.dtl.render.html");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojox.dtl.render.html.sensitivity = {
- // summary:
- // Set conditions under which to buffer changes
- // description:
- // Necessary if you make a lot of changes to your template.
- // What happens is that the entire node, from the attached DOM Node
- // down gets swapped with a clone, and until the entire rendering
- // is complete, we don't replace the clone again. In this way, renders are
- // "batched".
- //
- // But, if we're only changing a small number of nodes, we might no want to buffer at all.
- // The higher numbers mean that even small changes will result in buffering.
- // Each higher level includes the lower levels.
- NODE: 1, // If a node changes, implement buffering
- ATTRIBUTE: 2, // If an attribute or node changes, implement buffering
- TEXT: 3 // If any text at all changes, implement buffering
-}
-dojox.dtl.render.html.Render = function(/*DOMNode?*/ attachPoint, /*dojox.dtl.HtmlTemplate?*/ tpl){
- this._tpl = tpl;
- this._node = attachPoint;
- this._swap = dojo.hitch(this, function(){
- // summary: Swaps the node out the first time the DOM is changed
- // description: Gets swapped back it at end of render
- if(this._node === this._tpl.getRootNode()){
- var frag = this._node;
- this._node = this._node.cloneNode(true);
- frag.parentNode.replaceChild(this._node, frag);
- }
- });
+
+if(!dojo._hasResource["dojox.dtl.render.html"]){
+dojo._hasResource["dojox.dtl.render.html"]=true;
+dojo.provide("dojox.dtl.render.html");
+dojo.require("dojox.dtl.render.dom");
+dojox.dtl.render.html.Render=dojox.dtl.render.dom.Render;
}
-dojo.extend(dojox.dtl.render.html.Render, {
- sensitivity: dojox.dtl.render.html.sensitivity,
- setAttachPoint: function(/*Node*/ node){
- this._node = node;
- },
- render: function(/*dojox.dtl.HtmlTemplate*/ tpl, /*Object*/ context, /*dojox.dtl.HtmlBuffer?*/ buffer){
- if(!this._node){
- throw new Error("You cannot use the Render object without specifying where you want to render it");
- }
-
- buffer = buffer || tpl.getBuffer();
-
- if(context.getThis() && context.getThis().buffer == this.sensitivity.NODE){
- var onAddNode = dojo.connect(buffer, "onAddNode", this, "_swap");
- var onRemoveNode = dojo.connect(buffer, "onRemoveNode", this, "_swap");
- }
-
- if(this._tpl && this._tpl !== tpl){
- this._tpl.unrender(context, buffer);
- }
- this._tpl = tpl;
-
- var frag = tpl.render(context, buffer).getParent();
-
- dojo.disconnect(onAddNode);
- dojo.disconnect(onRemoveNode);
-
- if(this._node !== frag){
- this._node.parentNode.replaceChild(frag, this._node);
- dojo._destroyElement(this._node);
- this._node = frag;
- }
- }
-});
-
-}
diff --git a/js/dojo/dojox/dtl/tag/loader.js b/js/dojo/dojox/dtl/tag/loader.js
--- a/js/dojo/dojox/dtl/tag/loader.js
+++ b/js/dojo/dojox/dtl/tag/loader.js
@@ -1,146 +1,260 @@
-if(!dojo._hasResource["dojox.dtl.tag.loader"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.dtl.tag.loader"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.dtl.tag.loader"]){
+dojo._hasResource["dojox.dtl.tag.loader"]=true;
dojo.provide("dojox.dtl.tag.loader");
-
dojo.require("dojox.dtl._base");
-
-dojox.dtl.tag.loader.BlockNode = function(name, nodelist){
- this.name = name;
- this.nodelist = nodelist; // Can be overridden
+(function(){
+var dd=dojox.dtl;
+var _1=dd.tag.loader;
+_1.BlockNode=dojo.extend(function(_2,_3){
+this.name=_2;
+this.nodelist=_3;
+},{"super":function(){
+if(this.parent){
+var _4=this.parent.nodelist.dummyRender(this.context,null,true);
+if(typeof _4=="string"){
+_4=new String(_4);
+}
+_4.safe=true;
+return _4;
+}
+return "";
+},render:function(_5,_6){
+var _7=this.name;
+var _8=this.nodelist;
+var _9;
+if(_6.blocks){
+var _a=_6.blocks[_7];
+if(_a){
+_9=_a.parent;
+_8=_a.nodelist;
+_a.used=true;
+}
+}
+this.rendered=_8;
+_5=_5.push();
+this.context=_5;
+this.parent=null;
+if(_8!=this.nodelist){
+this.parent=this;
+}
+_5.block=this;
+if(_6.getParent){
+var _b=_6.getParent();
+var _c=dojo.connect(_6,"onSetParent",function(_d,up,_e){
+if(up&&_e){
+_6.setParent(_b);
+}
+});
}
-dojo.extend(dojox.dtl.tag.loader.BlockNode, {
- render: function(context, buffer){
- if(this.override){
- buffer = this.override.render(context, buffer, this);
- this.rendered = this.override;
- }else{
- buffer = this.nodelist.render(context, buffer, this);
- this.rendered = this.nodelist;
- }
- this.override = null;
- return buffer;
- },
- unrender: function(context, buffer){
- return this.rendered.unrender(context, buffer);
- },
- setOverride: function(nodelist){
- // summary: In a shared parent, we override, not overwrite
- if(!this.override){
- this.override = nodelist;
- }
- },
- toString: function(){ return "dojox.dtl.tag.loader.BlockNode"; }
-});
-dojox.dtl.tag.loader.block = function(parser, text){
- var parts = text.split(" ");
- var name = parts[1];
-
- parser._blocks = parser._blocks || {};
- parser._blocks[name] = parser._blocks[name] || [];
- parser._blocks[name].push(name);
-
- var nodelist = parser.parse(["endblock", "endblock " + name]);
- parser.next();
- return new dojox.dtl.tag.loader.BlockNode(name, nodelist);
+_6=_8.render(_5,_6,this);
+_c&&dojo.disconnect(_c);
+_5=_5.pop();
+return _6;
+},unrender:function(_f,_10){
+return this.rendered.unrender(_f,_10);
+},clone:function(_11){
+return new this.constructor(this.name,this.nodelist.clone(_11));
+},toString:function(){
+return "dojox.dtl.tag.loader.BlockNode";
+}});
+_1.ExtendsNode=dojo.extend(function(_12,_13,_14,_15,key){
+this.getTemplate=_12;
+this.nodelist=_13;
+this.shared=_14;
+this.parent=_15;
+this.key=key;
+},{parents:{},getParent:function(_16){
+var _17=this.parent;
+if(!_17){
+var _18;
+_17=this.parent=_16.get(this.key,false);
+if(!_17){
+throw new Error("extends tag used a variable that did not resolve");
+}
+if(typeof _17=="object"){
+var url=_17.url||_17.templatePath;
+if(_17.shared){
+this.shared=true;
}
-
-dojox.dtl.tag.loader.ExtendsNode = function(getTemplate, nodelist, shared, parent, key){
- this.getTemplate = getTemplate;
- this.nodelist = nodelist;
- this.shared = shared;
- this.parent = parent;
- this.key = key;
+if(url){
+_17=this.parent=url.toString();
+}else{
+if(_17.templateString){
+_18=_17.templateString;
+_17=this.parent=" ";
+}else{
+_17=this.parent=this.parent.toString();
+}
+}
+}
+if(_17&&_17.indexOf("shared:")===0){
+this.shared=true;
+_17=this.parent=_17.substring(7,_17.length);
+}
+}
+if(!_17){
+throw new Error("Invalid template name in 'extends' tag.");
+}
+if(_17.render){
+return _17;
+}
+if(this.parents[_17]){
+return this.parents[_17];
+}
+this.parent=this.getTemplate(_18||dojox.dtl.text.getTemplateString(_17));
+if(this.shared){
+this.parents[_17]=this.parent;
+}
+return this.parent;
+},render:function(_19,_1a){
+var _1b=this.getParent(_19);
+_1b.blocks=_1b.blocks||{};
+_1a.blocks=_1a.blocks||{};
+for(var i=0,_1c;_1c=this.nodelist.contents[i];i++){
+if(_1c instanceof dojox.dtl.tag.loader.BlockNode){
+var old=_1b.blocks[_1c.name];
+if(old&&old.nodelist!=_1c.nodelist){
+_1a=old.nodelist.unrender(_19,_1a);
+}
+_1b.blocks[_1c.name]=_1a.blocks[_1c.name]={shared:this.shared,nodelist:_1c.nodelist,used:false};
+}
}
-dojo.extend(dojox.dtl.tag.loader.ExtendsNode, {
- parents: {},
- getParent: function(context){
- if(!this.parent){
- this.parent = context.get(this.key, false);
- if(!this.parent){
- throw new Error("extends tag used a variable that did not resolve");
- }
- if(typeof this.parent == "object"){
- if(this.parent.url){
- if(this.parent.shared){
- this.shared = true;
- }
- this.parent = this.parent.url.toString();
- }else{
- this.parent = this.parent.toString();
- }
- }
- if(this.parent && this.parent.indexOf("shared:") == 0){
- this.shared = true;
- this.parent = this.parent.substring(7, parent.length);
- }
- }
- var parent = this.parent;
- if(!parent){
- throw new Error("Invalid template name in 'extends' tag.");
- }
- if(parent.render){
- return parent;
- }
- if(this.parents[parent]){
- return this.parents[parent];
- }
- this.parent = this.getTemplate(dojox.dtl.text.getTemplateString(parent));
- if(this.shared){
- this.parents[parent] = this.parent;
- }
- return this.parent;
- },
- render: function(context, buffer){
- var st = dojox.dtl;
- var stbl = dojox.dtl.tag.loader;
- var parent = this.getParent(context);
- var isChild = parent.nodelist[0] instanceof this.constructor;
- var parentBlocks = {};
- for(var i = 0, node; node = parent.nodelist.contents[i]; i++){
- if(node instanceof stbl.BlockNode){
- parentBlocks[node.name] = node;
- }
- }
- for(var i = 0, node; node = this.nodelist.contents[i]; i++){
- if(node instanceof stbl.BlockNode){
- var block = parentBlocks[node.name];
- if(!block){
- if(isChild){
- parent.nodelist[0].nodelist.append(node);
- }
- }else{
- if(this.shared){
- block.setOverride(node.nodelist);
- }else{
- block.nodelist = node.nodelist;
- }
- }
- }
- }
- this.rendered = parent;
- return parent.render(context, buffer, this);
- },
- unrender: function(context, buffer){
- return this.rendered.unrender(context, buffer, this);
- },
- toString: function(){ return "dojox.dtl.block.ExtendsNode"; }
-});
-dojox.dtl.tag.loader.extends_ = function(parser, text){
- var parts = text.split(" ");
- var shared = false;
- var parent = null;
- var key = null;
- if(parts[1].charAt(0) == '"' || parts[1].charAt(0) == "'"){
- parent = parts[1].substring(1, parts[1].length - 1);
- }else{
- key = parts[1];
- }
- if(parent && parent.indexOf("shared:") == 0){
- shared = true;
- parent = parent.substring(7, parent.length);
- }
- var nodelist = parser.parse();
- return new dojox.dtl.tag.loader.ExtendsNode(parser.getTemplate, nodelist, shared, parent, key);
+this.rendered=_1b;
+return _1b.nodelist.render(_19,_1a,this);
+},unrender:function(_1d,_1e){
+return this.rendered.unrender(_1d,_1e,this);
+},toString:function(){
+return "dojox.dtl.block.ExtendsNode";
+}});
+_1.IncludeNode=dojo.extend(function(_1f,_20,_21,_22,_23){
+this._path=_1f;
+this.constant=_20;
+this.path=(_20)?_1f:new dd._Filter(_1f);
+this.getTemplate=_21;
+this.text=_22;
+this.parsed=(arguments.length==5)?_23:true;
+},{_cache:[{},{}],render:function(_24,_25){
+var _26=((this.constant)?this.path:this.path.resolve(_24)).toString();
+var _27=Number(this.parsed);
+var _28=false;
+if(_26!=this.last){
+_28=true;
+if(this.last){
+_25=this.unrender(_24,_25);
+}
+this.last=_26;
+}
+var _29=this._cache[_27];
+if(_27){
+if(!_29[_26]){
+_29[_26]=dd.text._resolveTemplateArg(_26,true);
+}
+if(_28){
+var _2a=this.getTemplate(_29[_26]);
+this.rendered=_2a.nodelist;
+}
+return this.rendered.render(_24,_25,this);
+}else{
+if(this.text instanceof dd._TextNode){
+if(_28){
+this.rendered=this.text;
+this.rendered.set(dd.text._resolveTemplateArg(_26,true));
+}
+return this.rendered.render(_24,_25);
+}else{
+if(!_29[_26]){
+var _2b=[];
+var div=document.createElement("div");
+div.innerHTML=dd.text._resolveTemplateArg(_26,true);
+var _2c=div.childNodes;
+while(_2c.length){
+var _2d=div.removeChild(_2c[0]);
+_2b.push(_2d);
+}
+_29[_26]=_2b;
+}
+if(_28){
+this.nodelist=[];
+var _2e=true;
+for(var i=0,_2f;_2f=_29[_26][i];i++){
+this.nodelist.push(_2f.cloneNode(true));
+}
+}
+for(var i=0,_30;_30=this.nodelist[i];i++){
+_25=_25.concat(_30);
+}
+}
}
-
+return _25;
+},unrender:function(_31,_32){
+if(this.rendered){
+_32=this.rendered.unrender(_31,_32);
+}
+if(this.nodelist){
+for(var i=0,_33;_33=this.nodelist[i];i++){
+_32=_32.remove(_33);
+}
+}
+return _32;
+},clone:function(_34){
+return new this.constructor(this._path,this.constant,this.getTemplate,this.text.clone(_34),this.parsed);
+}});
+dojo.mixin(_1,{block:function(_35,_36){
+var _37=_36.contents.split();
+var _38=_37[1];
+_35._blocks=_35._blocks||{};
+_35._blocks[_38]=_35._blocks[_38]||[];
+_35._blocks[_38].push(_38);
+var _39=_35.parse(["endblock","endblock "+_38]).rtrim();
+_35.next_token();
+return new dojox.dtl.tag.loader.BlockNode(_38,_39);
+},extends_:function(_3a,_3b){
+var _3c=_3b.contents.split();
+var _3d=false;
+var _3e=null;
+var key=null;
+if(_3c[1].charAt(0)=="\""||_3c[1].charAt(0)=="'"){
+_3e=_3c[1].substring(1,_3c[1].length-1);
+}else{
+key=_3c[1];
}
+if(_3e&&_3e.indexOf("shared:")==0){
+_3d=true;
+_3e=_3e.substring(7,_3e.length);
+}
+var _3f=_3a.parse();
+return new dojox.dtl.tag.loader.ExtendsNode(_3a.getTemplate,_3f,_3d,_3e,key);
+},include:function(_40,_41){
+var _42=_41.contents.split();
+if(_42.length!=2){
+throw new Error(_42[0]+" tag takes one argument: the name of the template to be included");
+}
+var _43=_42[1];
+var _44=false;
+if((_43.charAt(0)=="\""||_43.slice(-1)=="'")&&_43.charAt(0)==_43.slice(-1)){
+_43=_43.slice(1,-1);
+_44=true;
+}
+return new _1.IncludeNode(_43,_44,_40.getTemplate,_40.create_text_node());
+},ssi:function(_45,_46){
+var _47=_46.contents.split();
+var _48=false;
+if(_47.length==3){
+_48=(_47.pop()=="parsed");
+if(!_48){
+throw new Error("Second (optional) argument to ssi tag must be 'parsed'");
+}
+}
+var _49=_1.include(_45,new dd.Token(_46.token_type,_47.join(" ")));
+_49.parsed=_48;
+return _49;
+}});
+})();
+}
diff --git a/js/dojo/dojox/dtl/tag/logic.js b/js/dojo/dojox/dtl/tag/logic.js
--- a/js/dojo/dojox/dtl/tag/logic.js
+++ b/js/dojo/dojox/dtl/tag/logic.js
@@ -1,164 +1,247 @@
-if(!dojo._hasResource["dojox.dtl.tag.logic"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.dtl.tag.logic"] = true;
-dojo.provide("dojox.dtl.tag.logic");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.require("dojox.dtl._base");
-dojox.dtl.tag.logic.IfNode = function(bools, trues, falses, type){
- this.bools = bools;
- this.trues = trues;
- this.falses = falses;
- this.type = type;
+if(!dojo._hasResource["dojox.dtl.tag.logic"]){
+dojo._hasResource["dojox.dtl.tag.logic"]=true;
+dojo.provide("dojox.dtl.tag.logic");
+dojo.require("dojox.dtl._base");
+(function(){
+var dd=dojox.dtl;
+var _1=dd.text;
+var _2=dd.tag.logic;
+_2.IfNode=dojo.extend(function(_3,_4,_5,_6){
+this.bools=_3;
+this.trues=_4;
+this.falses=_5;
+this.type=_6;
+},{render:function(_7,_8){
+var i,_9,_a,_b,_c;
+if(this.type=="or"){
+for(i=0;_9=this.bools[i];i++){
+_a=_9[0];
+_b=_9[1];
+_c=_b.resolve(_7);
+if((_c&&!_a)||(_a&&!_c)){
+if(this.falses){
+_8=this.falses.unrender(_7,_8);
+}
+return (this.trues)?this.trues.render(_7,_8,this):_8;
+}
+}
+if(this.trues){
+_8=this.trues.unrender(_7,_8);
+}
+return (this.falses)?this.falses.render(_7,_8,this):_8;
+}else{
+for(i=0;_9=this.bools[i];i++){
+_a=_9[0];
+_b=_9[1];
+_c=_b.resolve(_7);
+if(_c==_a){
+if(this.trues){
+_8=this.trues.unrender(_7,_8);
+}
+return (this.falses)?this.falses.render(_7,_8,this):_8;
+}
+}
+if(this.falses){
+_8=this.falses.unrender(_7,_8);
+}
+return (this.trues)?this.trues.render(_7,_8,this):_8;
}
-dojo.extend(dojox.dtl.tag.logic.IfNode, {
- render: function(context, buffer){
- if(this.type == "or"){
- for(var i = 0, bool; bool = this.bools[i]; i++){
- var ifnot = bool[0];
- var filter = bool[1];
- var value = filter.resolve(context);
- if((value && !ifnot) || (ifnot && !value)){
- if(this.falses){
- buffer = this.falses.unrender(context, buffer);
- }
- return this.trues.render(context, buffer, this);
- }
- buffer = this.trues.unrender(context, buffer);
- if(this.falses) return this.falses.render(context, buffer, this);
- }
- }else{
- for(var i = 0, bool; bool = this.bools[i]; i++){
- var ifnot = bool[0];
- var filter = bool[1];
- var value = filter.resolve(context);
- if(!((value && !ifnot) || (ifnot && !value))){
- if(this.trues){
- buffer = this.trues.unrender(context, buffer);
- }
- return this.falses.render(context, buffer, this);
- }
- buffer = this.falses.unrender(context, buffer);
- if(this.falses) return this.trues.render(context, buffer, this);
- }
- }
- return buffer;
- },
- unrender: function(context, buffer){
- if(this.trues) buffer = this.trues.unrender(context, buffer);
- if(this.falses) buffer = this.falses.unrender(context, buffer);
- return buffer;
- },
- clone: function(buffer){
- var trues = this.trues;
- var falses = this.falses;
- if(trues){
- trues = trues.clone(buffer);
- }
- if(falses){
- falses = falses.clone(buffer);
- }
- return new this.constructor(this.bools, trues, falses, this.type);
- },
- toString: function(){ return "dojox.dtl.tag.logic.IfNode"; }
-});
-
-dojox.dtl.tag.logic.ForNode = function(assign, loop, reversed, nodelist){
- this.assign = assign;
- this.loop = loop;
- this.reversed = reversed;
- this.nodelist = nodelist;
- this.pool = [];
+return _8;
+},unrender:function(_d,_e){
+_e=(this.trues)?this.trues.unrender(_d,_e):_e;
+_e=(this.falses)?this.falses.unrender(_d,_e):_e;
+return _e;
+},clone:function(_f){
+var _10=(this.trues)?this.trues.clone(_f):null;
+var _11=(this.falses)?this.falses.clone(_f):null;
+return new this.constructor(this.bools,_10,_11,this.type);
+}});
+_2.IfEqualNode=dojo.extend(function(_12,_13,_14,_15,_16){
+this.var1=new dd._Filter(_12);
+this.var2=new dd._Filter(_13);
+this.trues=_14;
+this.falses=_15;
+this.negate=_16;
+},{render:function(_17,_18){
+var _19=this.var1.resolve(_17);
+var _1a=this.var2.resolve(_17);
+_19=(typeof _19!="undefined")?_19:"";
+_1a=(typeof _19!="undefined")?_1a:"";
+if((this.negate&&_19!=_1a)||(!this.negate&&_19==_1a)){
+if(this.falses){
+_18=this.falses.unrender(_17,_18,this);
+}
+return (this.trues)?this.trues.render(_17,_18,this):_18;
+}
+if(this.trues){
+_18=this.trues.unrender(_17,_18,this);
+}
+return (this.falses)?this.falses.render(_17,_18,this):_18;
+},unrender:function(_1b,_1c){
+return _2.IfNode.prototype.unrender.call(this,_1b,_1c);
+},clone:function(_1d){
+var _1e=this.trues?this.trues.clone(_1d):null;
+var _1f=this.falses?this.falses.clone(_1d):null;
+return new this.constructor(this.var1.getExpression(),this.var2.getExpression(),_1e,_1f,this.negate);
+}});
+_2.ForNode=dojo.extend(function(_20,_21,_22,_23){
+this.assign=_20;
+this.loop=new dd._Filter(_21);
+this.reversed=_22;
+this.nodelist=_23;
+this.pool=[];
+},{render:function(_24,_25){
+var i,j,k;
+var _26=false;
+var _27=this.assign;
+for(k=0;k<_27.length;k++){
+if(typeof _24[_27[k]]!="undefined"){
+_26=true;
+_24=_24.push();
+break;
+}
+}
+if(!_26&&_24.forloop){
+_26=true;
+_24=_24.push();
+}
+var _28=this.loop.resolve(_24)||[];
+for(i=_28.length;i<this.pool.length;i++){
+this.pool[i].unrender(_24,_25,this);
+}
+if(this.reversed){
+_28=_28.slice(0).reverse();
}
-dojo.extend(dojox.dtl.tag.logic.ForNode, {
- render: function(context, buffer){
- var parentloop = {};
- if(context.forloop){
- parentloop = context.forloop;
- }
- var items = dojox.dtl.resolveVariable(this.loop, context);
- context.push();
- for(var i = items.length; i < this.pool.length; i++){
- this.pool[i].unrender(context, buffer);
- }
- if(this.reversed){
- items = items.reversed();
- }
- var j = 0;
- for(var i in items){
- var item = items[i];
- context.forloop = {
- key: i,
- counter0: j,
- counter: j + 1,
- revcounter0: items.length - j - 1,
- revcounter: items.length - j,
- first: j == 0,
- parentloop: parentloop
- };
- context[this.assign] = item;
- if(j + 1 > this.pool.length){
- this.pool.push(this.nodelist.clone(buffer));
- }
- buffer = this.pool[j].render(context, buffer, this);
- ++j;
- }
- context.pop();
- return buffer;
- },
- unrender: function(context, buffer){
- for(var i = 0, pool; pool = this.pool[i]; i++){
- buffer = pool.unrender(context, buffer);
- }
- return buffer;
- },
- clone: function(buffer){
- return new this.constructor(this.assign, this.loop, this.reversed, this.nodelist.clone(buffer));
- },
- toString: function(){ return "dojox.dtl.tag.logic.ForNode"; }
-});
-
-dojox.dtl.tag.logic.if_ = function(parser, text){
- var parts = text.split(/\s+/g);
- var type;
- var bools = [];
- parts.shift();
- text = parts.join(" ");
- parts = text.split(" and ");
- if(parts.length == 1){
- type = "or";
- parts = text.split(" or ");
- }else{
- type = "and";
- for(var i = 0; i < parts.length; i++){
- if(parts[i] == "or"){
- throw new Error("'if' tags can't mix 'and' and 'or'");
- }
- }
- }
- for(var i = 0, part; part = parts[i]; i++){
- var not = false;
- if(part.indexOf("not ") == 0){
- part = part.substring(4);
- not = true;
- }
- bools.push([not, new dojox.dtl.Filter(part)]);
- }
- var trues = parser.parse(["else", "endif"]);
- var falses = false;
- var token = parser.next();
- if(token.text == "else"){
- var falses = parser.parse(["endif"]);
- parser.next();
- }
- return new dojox.dtl.tag.logic.IfNode(bools, trues, falses, type);
+var _29=dojo.isObject(_28)&&!dojo.isArrayLike(_28);
+var _2a=[];
+if(_29){
+for(var key in _28){
+_2a.push(_28[key]);
+}
+}else{
+_2a=_28;
+}
+var _2b=_24.forloop={parentloop:_24.get("forloop",{})};
+var j=0;
+for(i=0;i<_2a.length;i++){
+var _2c=_2a[i];
+_2b.counter0=j;
+_2b.counter=j+1;
+_2b.revcounter0=_2a.length-j-1;
+_2b.revcounter=_2a.length-j;
+_2b.first=!j;
+_2b.last=(j==_2a.length-1);
+if(_27.length>1&&dojo.isArrayLike(_2c)){
+if(!_26){
+_26=true;
+_24=_24.push();
+}
+var _2d={};
+for(k=0;k<_2c.length&&k<_27.length;k++){
+_2d[_27[k]]=_2c[k];
+}
+dojo.mixin(_24,_2d);
+}else{
+_24[_27[0]]=_2c;
+}
+if(j+1>this.pool.length){
+this.pool.push(this.nodelist.clone(_25));
+}
+_25=this.pool[j++].render(_24,_25,this);
+}
+delete _24.forloop;
+if(_26){
+_24=_24.pop();
+}else{
+for(k=0;k<_27.length;k++){
+delete _24[_27[k]];
+}
+}
+return _25;
+},unrender:function(_2e,_2f){
+for(var i=0,_30;_30=this.pool[i];i++){
+_2f=_30.unrender(_2e,_2f);
}
-
-dojox.dtl.tag.logic.for_ = function(parser, text){
- var parts = text.split(/\s+/g);
- var reversed = parts.length == 5;
- var nodelist = parser.parse(["endfor"]);
- parser.next();
- return new dojox.dtl.tag.logic.ForNode(parts[1], parts[3], reversed, nodelist);
+return _2f;
+},clone:function(_31){
+return new this.constructor(this.assign,this.loop.getExpression(),this.reversed,this.nodelist.clone(_31));
+}});
+dojo.mixin(_2,{if_:function(_32,_33){
+var i,_34,_35,_36=[],_37=_33.contents.split();
+_37.shift();
+_33=_37.join(" ");
+_37=_33.split(" and ");
+if(_37.length==1){
+_35="or";
+_37=_33.split(" or ");
+}else{
+_35="and";
+for(i=0;i<_37.length;i++){
+if(_37[i].indexOf(" or ")!=-1){
+throw new Error("'if' tags can't mix 'and' and 'or'");
+}
+}
+}
+for(i=0;_34=_37[i];i++){
+var not=false;
+if(_34.indexOf("not ")==0){
+_34=_34.slice(4);
+not=true;
+}
+_36.push([not,new dd._Filter(_34)]);
+}
+var _38=_32.parse(["else","endif"]);
+var _39=false;
+var _33=_32.next_token();
+if(_33.contents=="else"){
+_39=_32.parse(["endif"]);
+_32.next_token();
}
-
+return new _2.IfNode(_36,_38,_39,_35);
+},_ifequal:function(_3a,_3b,_3c){
+var _3d=_3b.split_contents();
+if(_3d.length!=3){
+throw new Error(_3d[0]+" takes two arguments");
+}
+var end="end"+_3d[0];
+var _3e=_3a.parse(["else",end]);
+var _3f=false;
+var _3b=_3a.next_token();
+if(_3b.contents=="else"){
+_3f=_3a.parse([end]);
+_3a.next_token();
}
+return new _2.IfEqualNode(_3d[1],_3d[2],_3e,_3f,_3c);
+},ifequal:function(_40,_41){
+return _2._ifequal(_40,_41);
+},ifnotequal:function(_42,_43){
+return _2._ifequal(_42,_43,true);
+},for_:function(_44,_45){
+var _46=_45.contents.split();
+if(_46.length<4){
+throw new Error("'for' statements should have at least four words: "+_45.contents);
+}
+var _47=_46[_46.length-1]=="reversed";
+var _48=(_47)?-3:-2;
+if(_46[_46.length+_48]!="in"){
+throw new Error("'for' tag received an invalid argument: "+_45.contents);
+}
+var _49=_46.slice(1,_48).join(" ").split(/ *, */);
+for(var i=0;i<_49.length;i++){
+if(!_49[i]||_49[i].indexOf(" ")!=-1){
+throw new Error("'for' tag received an invalid argument: "+_45.contents);
+}
+}
+var _4a=_44.parse(["endfor"]);
+_44.next_token();
+return new _2.ForNode(_49,_46[_46.length+_48+1],_47,_4a);
+}});
+})();
+}
diff --git a/js/dojo/dojox/dtl/tag/loop.js b/js/dojo/dojox/dtl/tag/loop.js
--- a/js/dojo/dojox/dtl/tag/loop.js
+++ b/js/dojo/dojox/dtl/tag/loop.js
@@ -1,89 +1,164 @@
-if(!dojo._hasResource["dojox.dtl.tag.loop"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.dtl.tag.loop"] = true;
-dojo.provide("dojox.dtl.tag.loop");
-
-dojo.require("dojox.dtl._base");
-
-dojox.dtl.tag.loop.CycleNode = function(cyclevars, name, VarNode){
- this._cyclevars = cyclevars;
- this._counter = -1
- this._name = name;
- this._map = {};
- this._VarNode = VarNode;
-}
-dojo.extend(dojox.dtl.tag.loop.CycleNode, {
- render: function(context, buffer){
- if(context.forloop && !context.forloop.counter0){
- this._counter = -1;
- }
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- ++this._counter;
- var value = this._cyclevars[this._counter % this._cyclevars.length];
- if(this._name){
- context[this._name] = value;
- }
- if(!this._map[value]){
- this._map[value] = {};
- }
- var node = this._map[value][this._counter] = new this._VarNode(value);
-
- return node.render(context, buffer, this);
- },
- unrender: function(context, buffer){
- return buffer;
- },
- clone: function(){
- return new this.constructor(this._cyclevars, this._name);
- },
- _onEnd: function(){
- this._counter = -1;
- },
- toString: function(){ return "dojox.dtl.tag.loop.CycleNode"; }
-});
-dojox.dtl.tag.loop.cycle = function(parser, text){
- // summary: Cycle among the given strings each time this tag is encountered
- var args = text.split(" ");
-
- if(args.length < 2){
- throw new Error("'cycle' tag requires at least two arguments");
- }
-
- if(args[1].indexOf(",") != -1){
- var vars = args[1].split(",");
- args = [args[0]];
- for(var i = 0; i < vars.length; i++){
- args.push('"' + vars[i] + '"');
- }
- }
-
- if(args.length == 2){
- var name = args[args.length - 1];
-
- if(!parser._namedCycleNodes){
- throw new Error("No named cycles in template: '" + name + "' is not defined");
- }
- if(!parser._namedCycleNodes[name]){
- throw new Error("Named cycle '" + name + "' does not exist");
- }
-
- return parser._namedCycleNodes[name];
- }
-
- if(args.length > 4 && args[args.length - 2] == "as"){
- var name = args[args.length - 1];
-
- var node = new dojox.dtl.tag.loop.CycleNode(args.slice(1, args.length - 2), name, parser.getVarNode());
-
- if(!parser._namedCycleNodes){
- parser._namedCycleNodes = {};
- }
- parser._namedCycleNodes[name] = node;
- }else{
- node = new dojox.dtl.tag.loop.CycleNode(args.slice(1), null, parser.getVarNode());
- }
-
- return node;
+if(!dojo._hasResource["dojox.dtl.tag.loop"]){
+dojo._hasResource["dojox.dtl.tag.loop"]=true;
+dojo.provide("dojox.dtl.tag.loop");
+dojo.require("dojox.dtl._base");
+dojo.require("dojox.string.tokenize");
+(function(){
+var dd=dojox.dtl;
+var _1=dd.tag.loop;
+_1.CycleNode=dojo.extend(function(_2,_3,_4,_5){
+this.cyclevars=_2;
+this.name=_3;
+this.contents=_4;
+this.shared=_5||{counter:-1,map:{}};
+},{render:function(_6,_7){
+if(_6.forloop&&!_6.forloop.counter0){
+this.shared.counter=-1;
+}
+++this.shared.counter;
+var _8=this.cyclevars[this.shared.counter%this.cyclevars.length];
+var _9=this.shared.map;
+if(!_9[_8]){
+_9[_8]=new dd._Filter(_8);
+}
+_8=_9[_8].resolve(_6,_7);
+if(this.name){
+_6[this.name]=_8;
+}
+this.contents.set(_8);
+return this.contents.render(_6,_7);
+},unrender:function(_a,_b){
+return this.contents.unrender(_a,_b);
+},clone:function(_c){
+return new this.constructor(this.cyclevars,this.name,this.contents.clone(_c),this.shared);
+}});
+_1.IfChangedNode=dojo.extend(function(_d,_e,_f){
+this.nodes=_d;
+this._vars=_e;
+this.shared=_f||{last:null,counter:0};
+this.vars=dojo.map(_e,function(_10){
+return new dojox.dtl._Filter(_10);
+});
+},{render:function(_11,_12){
+if(_11.forloop){
+if(_11.forloop.counter<=this.shared.counter){
+this.shared.last=null;
+}
+this.shared.counter=_11.forloop.counter;
+}
+var _13;
+if(this.vars.length){
+_13=dojo.toJson(dojo.map(this.vars,function(_14){
+return _14.resolve(_11);
+}));
+}else{
+_13=this.nodes.dummyRender(_11,_12);
+}
+if(_13!=this.shared.last){
+var _15=(this.shared.last===null);
+this.shared.last=_13;
+_11=_11.push();
+_11.ifchanged={firstloop:_15};
+_12=this.nodes.render(_11,_12);
+_11=_11.pop();
+}else{
+_12=this.nodes.unrender(_11,_12);
}
-
+return _12;
+},unrender:function(_16,_17){
+return this.nodes.unrender(_16,_17);
+},clone:function(_18){
+return new this.constructor(this.nodes.clone(_18),this._vars,this.shared);
+}});
+_1.RegroupNode=dojo.extend(function(_19,key,_1a){
+this._expression=_19;
+this.expression=new dd._Filter(_19);
+this.key=key;
+this.alias=_1a;
+},{_push:function(_1b,_1c,_1d){
+if(_1d.length){
+_1b.push({grouper:_1c,list:_1d});
+}
+},render:function(_1e,_1f){
+_1e[this.alias]=[];
+var _20=this.expression.resolve(_1e);
+if(_20){
+var _21=null;
+var _22=[];
+for(var i=0;i<_20.length;i++){
+var id=_20[i][this.key];
+if(_21!==id){
+this._push(_1e[this.alias],_21,_22);
+_21=id;
+_22=[_20[i]];
+}else{
+_22.push(_20[i]);
+}
+}
+this._push(_1e[this.alias],_21,_22);
+}
+return _1f;
+},unrender:function(_23,_24){
+return _24;
+},clone:function(_25,_26){
+return this;
+}});
+dojo.mixin(_1,{cycle:function(_27,_28){
+var _29=_28.split_contents();
+if(_29.length<2){
+throw new Error("'cycle' tag requires at least two arguments");
}
+if(_29[1].indexOf(",")!=-1){
+var _2a=_29[1].split(",");
+_29=[_29[0]];
+for(var i=0;i<_2a.length;i++){
+_29.push("\""+_2a[i]+"\"");
+}
+}
+if(_29.length==2){
+var _2b=_29[_29.length-1];
+if(!_27._namedCycleNodes){
+throw new Error("No named cycles in template: '"+_2b+"' is not defined");
+}
+if(!_27._namedCycleNodes[_2b]){
+throw new Error("Named cycle '"+_2b+"' does not exist");
+}
+return _27._namedCycleNodes[_2b];
+}
+if(_29.length>4&&_29[_29.length-2]=="as"){
+var _2b=_29[_29.length-1];
+var _2c=new _1.CycleNode(_29.slice(1,_29.length-2),_2b,_27.create_text_node());
+if(!_27._namedCycleNodes){
+_27._namedCycleNodes={};
+}
+_27._namedCycleNodes[_2b]=_2c;
+}else{
+_2c=new _1.CycleNode(_29.slice(1),null,_27.create_text_node());
+}
+return _2c;
+},ifchanged:function(_2d,_2e){
+var _2f=_2e.contents.split();
+var _30=_2d.parse(["endifchanged"]);
+_2d.delete_first_token();
+return new _1.IfChangedNode(_30,_2f.slice(1));
+},regroup:function(_31,_32){
+var _33=dojox.string.tokenize(_32.contents,/(\s+)/g,function(_34){
+return _34;
+});
+if(_33.length<11||_33[_33.length-3]!="as"||_33[_33.length-7]!="by"){
+throw new Error("Expected the format: regroup list by key as newList");
+}
+var _35=_33.slice(2,-8).join("");
+var key=_33[_33.length-5];
+var _36=_33[_33.length-1];
+return new _1.RegroupNode(_35,key,_36);
+}});
+})();
+}
diff --git a/js/dojo/dojox/dtl/tag/misc.js b/js/dojo/dojox/dtl/tag/misc.js
--- a/js/dojo/dojox/dtl/tag/misc.js
+++ b/js/dojo/dojox/dtl/tag/misc.js
@@ -1,76 +1,222 @@
-if(!dojo._hasResource["dojox.dtl.tag.misc"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.dtl.tag.misc"] = true;
-dojo.provide("dojox.dtl.tag.misc");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.require("dojox.dtl._base");
-dojox.dtl.tag.misc.commentNode = new function(){
- this.render = this.unrender = function(context, buffer){ return buffer; };
- this.clone = function(){ return this; };
- this.toString = function(){ return "dojox.dtl.tag.misc.CommentNode"; };
-}
-
-dojox.dtl.tag.misc.DebugNode = function(TextNode){
- this._TextNode = TextNode;
+if(!dojo._hasResource["dojox.dtl.tag.misc"]){
+dojo._hasResource["dojox.dtl.tag.misc"]=true;
+dojo.provide("dojox.dtl.tag.misc");
+dojo.require("dojox.dtl._base");
+(function(){
+var dd=dojox.dtl;
+var _1=dd.tag.misc;
+_1.DebugNode=dojo.extend(function(_2){
+this.text=_2;
+},{render:function(_3,_4){
+var _5=_3.getKeys();
+var _6=[];
+var _7={};
+for(var i=0,_8;_8=_5[i];i++){
+_7[_8]=_3[_8];
+_6+="["+_8+": "+typeof _3[_8]+"]\n";
}
-dojo.extend(dojox.dtl.tag.misc.DebugNode, {
- render: function(context, buffer){
- var keys = context.getKeys();
- var debug = "";
- for(var i = 0, key; key = keys[i]; i++){
- console.debug("DEBUG", key, ":", context[key]);
- debug += key + ": " + dojo.toJson(context[key]) + "\n\n";
- }
- return new this._TextNode(debug).render(context, buffer, this);
- },
- unrender: function(context, buffer){
- return buffer;
- },
- clone: function(buffer){
- return new this.constructor(this._TextNode);
- },
- toString: function(){ return "dojox.dtl.tag.misc.DebugNode"; }
+return this.text.set(_6).render(_3,_4,this);
+},unrender:function(_9,_a){
+return _a;
+},clone:function(_b){
+return new this.constructor(this.text.clone(_b));
+},toString:function(){
+return "ddtm.DebugNode";
+}});
+_1.FilterNode=dojo.extend(function(_c,_d){
+this._varnode=_c;
+this._nodelist=_d;
+},{render:function(_e,_f){
+var _10=this._nodelist.render(_e,new dojox.string.Builder());
+_e=_e.update({"var":_10.toString()});
+var _11=this._varnode.render(_e,_f);
+_e=_e.pop();
+return _f;
+},unrender:function(_12,_13){
+return _13;
+},clone:function(_14){
+return new this.constructor(this._expression,this._nodelist.clone(_14));
+}});
+_1.FirstOfNode=dojo.extend(function(_15,_16){
+this._vars=_15;
+this.vars=dojo.map(_15,function(_17){
+return new dojox.dtl._Filter(_17);
});
-
-dojox.dtl.tag.misc.FilterNode = function(varnode, nodelist){
- this._varnode = varnode;
- this._nodelist = nodelist;
+this.contents=_16;
+},{render:function(_18,_19){
+for(var i=0,_1a;_1a=this.vars[i];i++){
+var _1b=_1a.resolve(_18);
+if(typeof _1b!="undefined"){
+if(_1b===null){
+_1b="null";
+}
+this.contents.set(_1b);
+return this.contents.render(_18,_19);
+}
+}
+return this.contents.unrender(_18,_19);
+},unrender:function(_1c,_1d){
+return this.contents.unrender(_1c,_1d);
+},clone:function(_1e){
+return new this.constructor(this._vars,this.contents.clone(_1e));
+}});
+_1.SpacelessNode=dojo.extend(function(_1f,_20){
+this.nodelist=_1f;
+this.contents=_20;
+},{render:function(_21,_22){
+if(_22.getParent){
+var _23=[dojo.connect(_22,"onAddNodeComplete",this,"_watch"),dojo.connect(_22,"onSetParent",this,"_watchParent")];
+_22=this.nodelist.render(_21,_22);
+dojo.disconnect(_23[0]);
+dojo.disconnect(_23[1]);
+}else{
+var _24=this.nodelist.dummyRender(_21);
+this.contents.set(_24.replace(/>\s+</g,"><"));
+_22=this.contents.render(_21,_22);
+}
+return _22;
+},unrender:function(_25,_26){
+return this.nodelist.unrender(_25,_26);
+},clone:function(_27){
+return new this.constructor(this.nodelist.clone(_27),this.contents.clone(_27));
+},_isEmpty:function(_28){
+return (_28.nodeType==3&&!_28.data.match(/[^\s\n]/));
+},_watch:function(_29){
+if(this._isEmpty(_29)){
+var _2a=false;
+if(_29.parentNode.firstChild==_29){
+_29.parentNode.removeChild(_29);
+}
+}else{
+var _2b=_29.parentNode.childNodes;
+if(_29.nodeType==1&&_2b.length>2){
+for(var i=2,_2c;_2c=_2b[i];i++){
+if(_2b[i-2].nodeType==1&&this._isEmpty(_2b[i-1])){
+_29.parentNode.removeChild(_2b[i-1]);
+return;
+}
+}
+}
}
-dojo.extend(dojox.dtl.tag.misc.FilterNode, {
- render: function(context, buffer){
- // Doing this in HTML requires a different buffer with a fake root node
- var output = this._nodelist.render(context, new dojox.string.Builder());
- context.update({ "var": output.toString() });
- var filtered = this._varnode.render(context, buffer);
- context.pop();
- return buffer;
- },
- unrender: function(context, buffer){
- return buffer;
- },
- clone: function(buffer){
- return new this.constructor(this._expression, this._nodelist.clone(buffer));
- }
-});
-
-dojox.dtl.tag.misc.comment = function(parser, text){
- // summary: Ignore everything between {% comment %} and {% endcomment %}
- parser.skipPast("endcomment");
- return dojox.dtl.tag.misc.commentNode;
+},_watchParent:function(_2d){
+var _2e=_2d.childNodes;
+if(_2e.length){
+while(_2d.childNodes.length){
+var _2f=_2d.childNodes[_2d.childNodes.length-1];
+if(!this._isEmpty(_2f)){
+return;
+}
+_2d.removeChild(_2f);
+}
+}
+}});
+_1.TemplateTagNode=dojo.extend(function(tag,_30){
+this.tag=tag;
+this.contents=_30;
+},{mapping:{openblock:"{%",closeblock:"%}",openvariable:"{{",closevariable:"}}",openbrace:"{",closebrace:"}",opencomment:"{#",closecomment:"#}"},render:function(_31,_32){
+this.contents.set(this.mapping[this.tag]);
+return this.contents.render(_31,_32);
+},unrender:function(_33,_34){
+return this.contents.unrender(_33,_34);
+},clone:function(_35){
+return new this.constructor(this.tag,this.contents.clone(_35));
+}});
+_1.WidthRatioNode=dojo.extend(function(_36,max,_37,_38){
+this.current=new dd._Filter(_36);
+this.max=new dd._Filter(max);
+this.width=_37;
+this.contents=_38;
+},{render:function(_39,_3a){
+var _3b=+this.current.resolve(_39);
+var max=+this.max.resolve(_39);
+if(typeof _3b!="number"||typeof max!="number"||!max){
+this.contents.set("");
+}else{
+this.contents.set(""+Math.round((_3b/max)*this.width));
}
-
-dojox.dtl.tag.misc.debug = function(parser, text){
- // summary: Output the current context, maybe add more stuff later.
- return new dojox.dtl.tag.misc.DebugNode(parser.getTextNode());
+return this.contents.render(_39,_3a);
+},unrender:function(_3c,_3d){
+return this.contents.unrender(_3c,_3d);
+},clone:function(_3e){
+return new this.constructor(this.current.getExpression(),this.max.getExpression(),this.width,this.contents.clone(_3e));
+}});
+_1.WithNode=dojo.extend(function(_3f,_40,_41){
+this.target=new dd._Filter(_3f);
+this.alias=_40;
+this.nodelist=_41;
+},{render:function(_42,_43){
+var _44=this.target.resolve(_42);
+_42=_42.push();
+_42[this.alias]=_44;
+_43=this.nodelist.render(_42,_43);
+_42=_42.pop();
+return _43;
+},unrender:function(_45,_46){
+return _46;
+},clone:function(_47){
+return new this.constructor(this.target.getExpression(),this.alias,this.nodelist.clone(_47));
+}});
+dojo.mixin(_1,{comment:function(_48,_49){
+_48.skip_past("endcomment");
+return dd._noOpNode;
+},debug:function(_4a,_4b){
+return new _1.DebugNode(_4a.create_text_node());
+},filter:function(_4c,_4d){
+var _4e=_4d.contents.split(null,1)[1];
+var _4f=_4c.create_variable_node("var|"+_4e);
+var _50=_4c.parse(["endfilter"]);
+_4c.next_token();
+return new _1.FilterNode(_4f,_50);
+},firstof:function(_51,_52){
+var _53=_52.split_contents().slice(1);
+if(!_53.length){
+throw new Error("'firstof' statement requires at least one argument");
}
-
-dojox.dtl.tag.misc.filter = function(parser, text){
- // summary: Filter the contents of the blog through variable filters.
- var parts = text.split(" ", 2);
- var varnode = new (parser.getVarNode())("var|" + parts[1]);
- var nodelist = parser.parse(["endfilter"]);
- parser.next();
- return new dojox.dtl.tag.misc.FilterNode(varnode, nodelist);
+return new _1.FirstOfNode(_53,_51.create_text_node());
+},spaceless:function(_54,_55){
+var _56=_54.parse(["endspaceless"]);
+_54.delete_first_token();
+return new _1.SpacelessNode(_56,_54.create_text_node());
+},templatetag:function(_57,_58){
+var _59=_58.contents.split();
+if(_59.length!=2){
+throw new Error("'templatetag' statement takes one argument");
+}
+var tag=_59[1];
+var _5a=_1.TemplateTagNode.prototype.mapping;
+if(!_5a[tag]){
+var _5b=[];
+for(var key in _5a){
+_5b.push(key);
+}
+throw new Error("Invalid templatetag argument: '"+tag+"'. Must be one of: "+_5b.join(", "));
}
-
+return new _1.TemplateTagNode(tag,_57.create_text_node());
+},widthratio:function(_5c,_5d){
+var _5e=_5d.contents.split();
+if(_5e.length!=4){
+throw new Error("widthratio takes three arguments");
+}
+var _5f=+_5e[3];
+if(typeof _5f!="number"){
+throw new Error("widthratio final argument must be an integer");
}
+return new _1.WidthRatioNode(_5e[1],_5e[2],_5f,_5c.create_text_node());
+},with_:function(_60,_61){
+var _62=_61.split_contents();
+if(_62.length!=4||_62[2]!="as"){
+throw new Error("do_width expected format as 'with value as name'");
+}
+var _63=_60.parse(["endwith"]);
+_60.next_token();
+return new _1.WithNode(_62[1],_62[3],_63);
+}});
+})();
+}
diff --git a/js/dojo/dojox/dtl/utils/date.js b/js/dojo/dojox/dtl/utils/date.js
--- a/js/dojo/dojox/dtl/utils/date.js
+++ b/js/dojo/dojox/dtl/utils/date.js
@@ -1,67 +1,59 @@
-if(!dojo._hasResource["dojox.dtl.utils.date"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.dtl.utils.date"] = true;
-dojo.provide("dojox.dtl.utils.date");
-
-dojo.require("dojox.date.php");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.mixin(dojox.dtl.utils.date, {
- format: function(/*Date*/ date, /*String*/ format){
- return dojox.date.php.format(date, format, dojox.dtl.utils.date._overrides);
- },
- timesince: function(d, now){
- // summary:
- // Takes two datetime objects and returns the time between then and now
- // as a nicely formatted string, e.g "10 minutes"
- // description:
- // Adapted from http://blog.natbat.co.uk/archive/2003/Jun/14/time_since
- if(!(d instanceof Date)){
- d = new Date(d.year, d.month, d.day);
- }
- if(!now){
- now = new Date();
- }
- var delta = Math.abs(now.getTime() - d.getTime());
- for(var i = 0, chunk; chunk = dojox.dtl.utils.date._chunks[i]; i++){
- var count = Math.floor(delta / chunk[0]);
- if(count) break;
- }
- return count + " " + chunk[1](count);
- },
- _chunks: [
- [60 * 60 * 24 * 365 * 1000, function(n){ return (n == 1) ? 'year' : 'years'; }],
- [60 * 60 * 24 * 30 * 1000, function(n){ return (n == 1) ? 'month' : 'months'; }],
- [60 * 60 * 24 * 7 * 1000, function(n){ return (n == 1) ? 'week' : 'weeks'; }],
- [60 * 60 * 24 * 1000, function(n){ return (n == 1) ? 'day' : 'days'; }],
- [60 * 60 * 1000, function(n){ return (n == 1) ? 'hour' : 'hours'; }],
- [60 * 1000, function(n){ return (n == 1) ? 'minute' : 'minutes'; }]
- ],
- _months_ap: ["Jan.", "Feb.", "March", "April", "May", "June", "July", "Aug.", "Sept.", "Oct.", "Nov.", "Dec."],
- _overrides: {
- f: function(){
- // summary:
- // Time, in 12-hour hours and minutes, with minutes left off if they're zero.
- // description:
- // Examples: '1', '1:30', '2:05', '2'
- // Proprietary extension.
- if(!this.date.getMinutes()) return this.g();
- },
- N: function(){
- // summary: Month abbreviation in Associated Press style. Proprietary extension.
- return dojox.dtl.utils.date._months_ap[this.date.getMonth()];
- },
- P: function(){
- // summary:
- // Time, in 12-hour hours, minutes and 'a.m.'/'p.m.', with minutes left off
- // if they're zero and the strings 'midnight' and 'noon' if appropriate.
- // description:
- // Examples: '1 a.m.', '1:30 p.m.', 'midnight', 'noon', '12:30 p.m.'
- // Proprietary extension.
- if(!this.date.getMinutes() && !this.date.getHours()) return 'midnight';
- if(!this.date.getMinutes() && this.date.getHours() == 12) return 'noon';
- return self.f() + " " + self.a();
- }
- }
-});
-
+if(!dojo._hasResource["dojox.dtl.utils.date"]){
+dojo._hasResource["dojox.dtl.utils.date"]=true;
+dojo.provide("dojox.dtl.utils.date");
+dojo.require("dojox.date.php");
+dojox.dtl.utils.date.DateFormat=function(_1){
+dojox.date.php.DateFormat.call(this,_1);
+};
+dojo.extend(dojox.dtl.utils.date.DateFormat,dojox.date.php.DateFormat.prototype,{f:function(){
+return (!this.date.getMinutes())?this.g():this.g()+":"+this.i();
+},N:function(){
+return dojox.dtl.utils.date._months_ap[this.date.getMonth()];
+},P:function(){
+if(!this.date.getMinutes()&&!this.date.getHours()){
+return "midnight";
+}
+if(!this.date.getMinutes()&&this.date.getHours()==12){
+return "noon";
}
+return this.f()+" "+this.a();
+}});
+dojo.mixin(dojox.dtl.utils.date,{format:function(_2,_3){
+var df=new dojox.dtl.utils.date.DateFormat(_3);
+return df.format(_2);
+},timesince:function(d,_4){
+if(!(d instanceof Date)){
+d=new Date(d.year,d.month,d.day);
+}
+if(!_4){
+_4=new Date();
+}
+var _5=Math.abs(_4.getTime()-d.getTime());
+for(var i=0,_6;_6=dojox.dtl.utils.date._chunks[i];i++){
+var _7=Math.floor(_5/_6[0]);
+if(_7){
+break;
+}
+}
+return _7+" "+_6[1](_7);
+},_chunks:[[60*60*24*365*1000,function(n){
+return (n==1)?"year":"years";
+}],[60*60*24*30*1000,function(n){
+return (n==1)?"month":"months";
+}],[60*60*24*7*1000,function(n){
+return (n==1)?"week":"weeks";
+}],[60*60*24*1000,function(n){
+return (n==1)?"day":"days";
+}],[60*60*1000,function(n){
+return (n==1)?"hour":"hours";
+}],[60*1000,function(n){
+return (n==1)?"minute":"minutes";
+}]],_months_ap:["Jan.","Feb.","March","April","May","June","July","Aug.","Sept.","Oct.","Nov.","Dec."]});
+}
diff --git a/js/dojo/dojox/encoding/README b/js/dojo/dojox/encoding/README
--- a/js/dojo/dojox/encoding/README
+++ b/js/dojo/dojox/encoding/README
@@ -1,35 +1,35 @@
-------------------------------------------------------------------------------
DojoX Encoding
-------------------------------------------------------------------------------
Version 0.1.0
Release date: 7/30/2007
-------------------------------------------------------------------------------
Project state:
-expermental
+experimental
-------------------------------------------------------------------------------
Credits
Eugene Lazutkin
Tom Trenka
-------------------------------------------------------------------------------
Project description
DojoX Encoding provides a set of routines for common encoding algorithms.
-------------------------------------------------------------------------------
Dependencies:
Encoding only depends on the Dojo Core.
-------------------------------------------------------------------------------
Documentation
See the API documentation for details.
-------------------------------------------------------------------------------
Installation instructions
Grab the following from the Dojo SVN Repository:
-http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/encoding/*
+http://svn.dojotoolkit.org/src/dojox/trunk/encoding/*
Install into the following directory structure:
/dojox/encoding/
...which should be at the same level as your Dojo checkout.
-------------------------------------------------------------------------------
diff --git a/js/dojo/dojox/encoding/ascii85.js b/js/dojo/dojox/encoding/ascii85.js
--- a/js/dojo/dojox/encoding/ascii85.js
+++ b/js/dojo/dojox/encoding/ascii85.js
@@ -1,63 +1,71 @@
-if(!dojo._hasResource["dojox.encoding.ascii85"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.encoding.ascii85"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.encoding.ascii85"]){
+dojo._hasResource["dojox.encoding.ascii85"]=true;
dojo.provide("dojox.encoding.ascii85");
-
(function(){
- var c = function(input, length, result){
- var i, j, n, b = [0, 0, 0, 0, 0];
- for(i = 0; i < length; i += 4){
- n = ((input[i] * 256 + input[i+1]) * 256 + input[i+2]) * 256 + input[i+3];
- if(!n){
- result.push("z");
- }else{
- for(j = 0; j < 5; b[j++] = n % 85 + 33, n = Math.floor(n / 85));
- }
- result.push(String.fromCharCode(b[4], b[3], b[2], b[1], b[0]));
- }
- };
-
- dojox.encoding.ascii85.encode = function(input){
- // summary: encodes input data in ascii85 string
- // input: Array: an array of numbers (0-255) to encode
- var result = [], reminder = input.length % 4, length = input.length - reminder;
- c(input, length, result);
- if(reminder){
- var t = input.slice(length);
- while(t.length < 4){ t.push(0); }
- c(t, 4, result);
- var x = result.pop();
- if(x == "z"){ x = "!!!!!"; }
- result.push(x.substr(0, reminder + 1));
- }
- return result.join(""); // String
- };
-
- dojox.encoding.ascii85.decode = function(input){
- // summary: decodes the input string back to array of numbers
- // input: String: the input string to decode
- var n = input.length, r = [], b = [0, 0, 0, 0, 0], i, j, t, x, y, d;
- for(i = 0; i < n; ++i){
- if(input.charAt(i) == "z"){
- r.push(0, 0, 0, 0);
- continue;
- }
- for(j = 0; j < 5; ++j){ b[j] = input.charCodeAt(i + j) - 33; }
- d = n - i;
- if(d < 5){
- for(j = d; j < 4; b[++j] = 0);
- b[d] = 85;
- }
- t = (((b[0] * 85 + b[1]) * 85 + b[2]) * 85 + b[3]) * 85 + b[4];
- x = t & 255;
- t >>>= 8;
- y = t & 255;
- t >>>= 8;
- r.push(t >>> 8, t & 255, y, x);
- for(j = d; j < 5; ++j, r.pop());
- i += 4;
- }
- return r;
- };
+var c=function(_1,_2,_3){
+var i,j,n,b=[0,0,0,0,0];
+for(i=0;i<_2;i+=4){
+n=((_1[i]*256+_1[i+1])*256+_1[i+2])*256+_1[i+3];
+if(!n){
+_3.push("z");
+}else{
+for(j=0;j<5;b[j++]=n%85+33,n=Math.floor(n/85)){
+}
+}
+_3.push(String.fromCharCode(b[4],b[3],b[2],b[1],b[0]));
+}
+};
+dojox.encoding.ascii85.encode=function(_4){
+var _5=[],_6=_4.length%4,_7=_4.length-_6;
+c(_4,_7,_5);
+if(_6){
+var t=_4.slice(_7);
+while(t.length<4){
+t.push(0);
+}
+c(t,4,_5);
+var x=_5.pop();
+if(x=="z"){
+x="!!!!!";
+}
+_5.push(x.substr(0,_6+1));
+}
+return _5.join("");
+};
+dojox.encoding.ascii85.decode=function(_8){
+var n=_8.length,r=[],b=[0,0,0,0,0],i,j,t,x,y,d;
+for(i=0;i<n;++i){
+if(_8.charAt(i)=="z"){
+r.push(0,0,0,0);
+continue;
+}
+for(j=0;j<5;++j){
+b[j]=_8.charCodeAt(i+j)-33;
+}
+d=n-i;
+if(d<5){
+for(j=d;j<4;b[++j]=0){
+}
+b[d]=85;
+}
+t=(((b[0]*85+b[1])*85+b[2])*85+b[3])*85+b[4];
+x=t&255;
+t>>>=8;
+y=t&255;
+t>>>=8;
+r.push(t>>>8,t&255,y,x);
+for(j=d;j<5;++j,r.pop()){
+}
+i+=4;
+}
+return r;
+};
})();
-
}
diff --git a/js/dojo/dojox/encoding/bits.js b/js/dojo/dojox/encoding/bits.js
--- a/js/dojo/dojox/encoding/bits.js
+++ b/js/dojo/dojox/encoding/bits.js
@@ -1,68 +1,64 @@
-if(!dojo._hasResource["dojox.encoding.bits"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.encoding.bits"] = true;
-dojo.provide("dojox.encoding.bits");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojox.encoding.bits.OutputStream = function(){
- this.reset();
-};
-dojo.extend(dojox.encoding.bits.OutputStream, {
- reset: function(){
- this.buffer = [];
- this.accumulator = 0;
- this.available = 8;
- },
- putBits: function(value, width){
- while(width){
- var w = Math.min(width, this.available);
- var v = (w <= width ? value >>> (width - w) : value) << (this.available - w);
- this.accumulator |= v & (255 >>> (8 - this.available));
- this.available -= w;
- if(!this.available){
- this.buffer.push(this.accumulator);
- this.accumulator = 0;
- this.available = 8;
- }
- width -= w;
- }
- },
- getWidth: function(){
- return this.buffer.length * 8 + (8 - this.available);
- },
- getBuffer: function(){
- var b = this.buffer;
- if(this.available < 8){ b.push(this.accumulator & (255 << this.available)); }
- this.reset();
- return b;
- }
-});
-
-dojox.encoding.bits.InputStream = function(buffer, width){
- this.buffer = buffer;
- this.width = width;
- this.bbyte = this.bit = 0;
+if(!dojo._hasResource["dojox.encoding.bits"]){
+dojo._hasResource["dojox.encoding.bits"]=true;
+dojo.provide("dojox.encoding.bits");
+dojox.encoding.bits.OutputStream=function(){
+this.reset();
};
-
-dojo.extend(dojox.encoding.bits.InputStream, {
- getBits: function(width){
- var r = 0;
- while(width){
- var w = Math.min(width, 8 - this.bit);
- var v = this.buffer[this.bbyte] >>> (8 - this.bit - w);
- r <<= w;
- r |= v & ~(~0 << w);
- this.bit += w;
- if(this.bit == 8){
- ++this.bbyte;
- this.bit = 0;
- }
- width -= w;
- }
- return r;
- },
- getWidth: function(){
- return this.width - this.bbyte * 8 - this.bit;
- }
-});
-
+dojo.extend(dojox.encoding.bits.OutputStream,{reset:function(){
+this.buffer=[];
+this.accumulator=0;
+this.available=8;
+},putBits:function(_1,_2){
+while(_2){
+var w=Math.min(_2,this.available);
+var v=(w<=_2?_1>>>(_2-w):_1)<<(this.available-w);
+this.accumulator|=v&(255>>>(8-this.available));
+this.available-=w;
+if(!this.available){
+this.buffer.push(this.accumulator);
+this.accumulator=0;
+this.available=8;
+}
+_2-=w;
+}
+},getWidth:function(){
+return this.buffer.length*8+(8-this.available);
+},getBuffer:function(){
+var b=this.buffer;
+if(this.available<8){
+b.push(this.accumulator&(255<<this.available));
}
+this.reset();
+return b;
+}});
+dojox.encoding.bits.InputStream=function(_3,_4){
+this.buffer=_3;
+this.width=_4;
+this.bbyte=this.bit=0;
+};
+dojo.extend(dojox.encoding.bits.InputStream,{getBits:function(_5){
+var r=0;
+while(_5){
+var w=Math.min(_5,8-this.bit);
+var v=this.buffer[this.bbyte]>>>(8-this.bit-w);
+r<<=w;
+r|=v&~(~0<<w);
+this.bit+=w;
+if(this.bit==8){
+++this.bbyte;
+this.bit=0;
+}
+_5-=w;
+}
+return r;
+},getWidth:function(){
+return this.width-this.bbyte*8-this.bit;
+}});
+}
diff --git a/js/dojo/dojox/encoding/easy64.js b/js/dojo/dojox/encoding/easy64.js
--- a/js/dojo/dojox/encoding/easy64.js
+++ b/js/dojo/dojox/encoding/easy64.js
@@ -1,50 +1,47 @@
-if(!dojo._hasResource["dojox.encoding.easy64"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.encoding.easy64"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.encoding.easy64"]){
+dojo._hasResource["dojox.encoding.easy64"]=true;
dojo.provide("dojox.encoding.easy64");
-
(function(){
- var c = function(input, length, result){
- for(var i = 0; i < length; i += 3){
- result.push(
- String.fromCharCode((input[i] >>> 2) + 33),
- String.fromCharCode(((input[i] & 3) << 4) + (input[i + 1] >>> 4) + 33),
- String.fromCharCode(((input[i + 1] & 15) << 2) + (input[i + 2] >>> 6) + 33),
- String.fromCharCode((input[i + 2] & 63) + 33)
- );
- }
- };
-
- dojox.encoding.easy64.encode = function(input){
- // summary: encodes input data in easy64 string
- // input: Array: an array of numbers (0-255) to encode
- var result = [], reminder = input.length % 3, length = input.length - reminder;
- c(input, length, result);
- if(reminder){
- var t = input.slice(length);
- while(t.length < 3){ t.push(0); }
- c(t, 3, result);
- for(var i = 3; i > reminder; result.pop(), --i);
- }
- return result.join(""); // String
- };
-
- dojox.encoding.easy64.decode = function(input){
- // summary: decodes the input string back to array of numbers
- // input: String: the input string to decode
- var n = input.length, r = [], b = [0, 0, 0, 0], i, j, d;
- for(i = 0; i < n; i += 4){
- for(j = 0; j < 4; ++j){ b[j] = input.charCodeAt(i + j) - 33; }
- d = n - i;
- for(j = d; j < 4; b[++j] = 0);
- r.push(
- (b[0] << 2) + (b[1] >>> 4),
- ((b[1] & 15) << 4) + (b[2] >>> 2),
- ((b[2] & 3) << 6) + b[3]
- );
- for(j = d; j < 4; ++j, r.pop());
- }
- return r;
- };
+var c=function(_1,_2,_3){
+for(var i=0;i<_2;i+=3){
+_3.push(String.fromCharCode((_1[i]>>>2)+33),String.fromCharCode(((_1[i]&3)<<4)+(_1[i+1]>>>4)+33),String.fromCharCode(((_1[i+1]&15)<<2)+(_1[i+2]>>>6)+33),String.fromCharCode((_1[i+2]&63)+33));
+}
+};
+dojox.encoding.easy64.encode=function(_4){
+var _5=[],_6=_4.length%3,_7=_4.length-_6;
+c(_4,_7,_5);
+if(_6){
+var t=_4.slice(_7);
+while(t.length<3){
+t.push(0);
+}
+c(t,3,_5);
+for(var i=3;i>_6;_5.pop(),--i){
+}
+}
+return _5.join("");
+};
+dojox.encoding.easy64.decode=function(_8){
+var n=_8.length,r=[],b=[0,0,0,0],i,j,d;
+for(i=0;i<n;i+=4){
+for(j=0;j<4;++j){
+b[j]=_8.charCodeAt(i+j)-33;
+}
+d=n-i;
+for(j=d;j<4;b[++j]=0){
+}
+r.push((b[0]<<2)+(b[1]>>>4),((b[1]&15)<<4)+(b[2]>>>2),((b[2]&3)<<6)+b[3]);
+for(j=d;j<4;++j,r.pop()){
+}
+}
+return r;
+};
})();
-
}
diff --git a/js/dojo/dojox/flash.js b/js/dojo/dojox/flash.js
--- a/js/dojo/dojox/flash.js
+++ b/js/dojo/dojox/flash.js
@@ -1,6 +1,12 @@
-if(!dojo._hasResource["dojox.flash"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.flash"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.flash"]){
+dojo._hasResource["dojox.flash"]=true;
dojo.provide("dojox.flash");
-dojo.require("dojox.flash._common");
-
+dojo.require("dojox.flash._base");
}
diff --git a/js/dojo/dojox/flash/README b/js/dojo/dojox/flash/README
--- a/js/dojo/dojox/flash/README
+++ b/js/dojo/dojox/flash/README
@@ -1,31 +1,31 @@
-------------------------------------------------------------------------------
dojox.flash
-------------------------------------------------------------------------------
-Version 0.4
-Release date: MM/DD/YYYY
+Version 0.5
+Release date: 2008-03-10
-------------------------------------------------------------------------------
-Project state: beta
+Project state: experimental
-------------------------------------------------------------------------------
Project authors
Brad Neuberg (BradNeuberg@dojotoolkit.org)
Alex Russell (alex@dojotoolkit.org, only handled minor porting issues)
-------------------------------------------------------------------------------
Project description
Infrastructure for high-performance Flash/JS communication
-------------------------------------------------------------------------------
Dependencies:
MTASC for creating builds
-------------------------------------------------------------------------------
Documentation
TODOC
-------------------------------------------------------------------------------
Installation instructions
Not intended as a stand-alone module.
-------------------------------------------------------------------------------
Additional Notes
TODOC
diff --git a/js/dojo/dojox/fx.js b/js/dojo/dojox/fx.js
--- a/js/dojo/dojox/fx.js
+++ b/js/dojo/dojox/fx.js
@@ -1,7 +1,12 @@
-if(!dojo._hasResource["dojox.fx"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.fx"] = true;
-dojo.provide("dojox.fx");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.require("dojox.fx._base");
+if(!dojo._hasResource["dojox.fx"]){
+dojo._hasResource["dojox.fx"]=true;
+dojo.provide("dojox.fx");
+dojo.require("dojox.fx._base");
}
diff --git a/js/dojo/dojox/fx/README b/js/dojo/dojox/fx/README
--- a/js/dojo/dojox/fx/README
+++ b/js/dojo/dojox/fx/README
@@ -1,69 +1,75 @@
-------------------------------------------------------------------------------
dojox.fx
-------------------------------------------------------------------------------
Version 1.0.0
Release date: 10/31/2007
-------------------------------------------------------------------------------
Project state:
-prototype / expermental
+experimental
-------------------------------------------------------------------------------
Credits
Peter Higgins (dante)
Jonathan Bond-Caron (jbondc@gmail.com)
Shane O'Sullivan (shaneosullivan1@gmail.com)
+ Bryan Forbes (bforbes)
+ Nicola Rizzo (nic)
+
-------------------------------------------------------------------------------
Project description
dojox.fx provides a class of animation effects to use, and
- other animation addons to dojo base.
+ other animation and Effects additions to dojo base.
-------------------------------------------------------------------------------
Dependencies:
dojox.fx requires dojo (core) and the dojo.fx package
- dojox.fx.easing requires only dojo core.
-
+ dojox.fx.easing is deprecated, and exists in dojo.fx.easing.
+ dojox.fx.flip requires dojo.fx
+ dojox.fx.scroll requires dojox.fx._core and dojo.fx
+
-------------------------------------------------------------------------------
Documentation
existing API surface:
dojox.fx._base:
- dojox.fx.crossFade - crossfade two nodes easily
- dojox.fx.sizeTo - size a node about it's center to a new width/height
- dojox.fx.slideBy - slide a node by a t,l offset
- dojox.fx.highlight - animates the background color of a node, and returns
it to the color it was.
- (all use standard _Animation properties, like duration, easing, node, etc)
+ (all use standard Animation properties, like duration, easing, node, etc)
dojox.fx._core:
- - dojox.fx._Line - a 2-d _Line implementation, backwards compatible with
+ - dojox.fx._Line - a multi-dimensional _Line implementation, backwards compatible with
dojo._Line ... you might could safely do something akin to
- dojo._Line.prototype = dojox.fx._Line.prototype;
- and enable this for all dojo _Animations?
+ dojo._Line = dojox.fx._Line;
+ and enable this for all dojo Animations?
dojox.fx.style: - experimental CSS animation via class definitions
- dojox.fx.addClass - animate the effects of applying a class to a node
- dojox.fx.removeClass - " " " " removing a class from a node
- dojox.fx.toggleClass - wrapper for addClass/removeClass
- dojox.fx.easing: - a collection of easing functions to use
- this is a "stand alone" class, and can be used via:
- dojo.require("dojox.fx.easing");
- and provides:
- dojo.fx.easing.easeIn/easeOut/easeInOut
- to use in an _Animation easing: property
+ dojox.fx.ext-dojo.NodeList - extensions to dojo.NodeList-fx wrapping the
+ relevant dojox.fx animations into dojo.NodeList
+
+ dojox.fx.Shadow - Class to add drop shadows to a node
+
+ dojox.fx.flip - a Module providing pseudo-3d flip animations for nodes.
+ Currently experimental.
-------------------------------------------------------------------------------
Installation instructions
Grab the following from the Dojo SVN Repository:
http://svn.dojotoolkit.org/dojo/dojox/trunk/fx.js
http://svn.dojotoolkit.org/dojo/dojox/trunk/fx/*
Install into the following directory structure:
/dojox/fx/
...which should be at the same level as your Dojo checkout.
-------------------------------------------------------------------------------
diff --git a/js/dojo/dojox/fx/_arg.js b/js/dojo/dojox/fx/_arg.js
--- a/js/dojo/dojox/fx/_arg.js
+++ b/js/dojo/dojox/fx/_arg.js
@@ -1,27 +1,19 @@
-if(!dojo._hasResource["dojox.fx._arg"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.fx._arg"] = true;
-dojo.provide("dojox.fx._arg");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
-dojox.fx._arg.StyleArgs = function(/*Object*/ args){
- // summary:
- // The node and CSS class to use for style manipulations.
- // node: DOMNode
- // The node to manipulate
- // cssClass: String
- // The class to use during the manipulation
- this.node = args.node;
- this.cssClass = args.cssClass;
+if(!dojo._hasResource["dojox.fx._arg"]){
+dojo._hasResource["dojox.fx._arg"]=true;
+dojo.provide("dojox.fx._arg");
+dojox.fx._arg.StyleArgs=function(_1){
+this.node=_1.node;
+this.cssClass=_1.cssClass;
+};
+dojox.fx._arg.ShadowResizeArgs=function(_2){
+this.x=_2.x;
+this.y=_2.y;
+};
}
-
-dojox.fx._arg.ShadowResizeArgs = function(/*Object*/ args){
- // summary:
- // The odd way to document object parameters.
- // x: Integer
- // the width to set
- // y: Integer
- // the height to set
- this.x = args.x;
- this.y = args.y;
-}
-
-}
diff --git a/js/dojo/dojox/fx/_base.js b/js/dojo/dojox/fx/_base.js
--- a/js/dojo/dojox/fx/_base.js
+++ b/js/dojo/dojox/fx/_base.js
@@ -1,195 +1,118 @@
-if(!dojo._hasResource["dojox.fx._base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.fx._base"] = true;
-dojo.provide("dojox.fx._base");
-// summary: add-on Animations to dojo.fx
-
-dojo.require("dojo.fx");
-
-// convenience functions:
-dojox.fx.chain = dojo.fx.chain;
-dojox.fx.combine = dojo.fx.combine;
-dojox.fx.wipeIn = dojo.fx.wipeIn;
-dojox.fx.wipeOut = dojo.fx.wipeOut;
-dojox.fx.slideTo = dojo.fx.slideTo;
-
-dojox.fx.sizeTo = function(/* Object */args){
- // summary: Create an animation that will size a node
- // description:
- // Returns an animation that will size "node"
- // defined in args Object about it's center to
- // a width and height defined by (args.width, args.height),
- // supporting an optional method: chain||combine mixin
- // (defaults to chain).
- //
- // - works best on absolutely or relatively positioned elements?
- //
- // example:
- // | // size #myNode to 400px x 200px over 1 second
- // | dojo.fx.sizeTo({ node:'myNode',
- // | duration: 1000,
- // | width: 400,
- // | height: 200,
- // | method: "chain"
- // | }).play();
- //
- var node = (args.node = dojo.byId(args.node));
- var compute = dojo.getComputedStyle;
-
- var method = args.method || "chain";
- if (method=="chain"){ args.duration = Math.floor(args.duration/2); }
-
- var top, newTop, left, newLeft, width, height = null;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- var init = (function(){
- var innerNode = node;
- return function(){
- var pos = compute(innerNode).position;
- top = (pos == 'absolute' ? node.offsetTop : parseInt(compute(node).top) || 0);
- left = (pos == 'absolute' ? node.offsetLeft : parseInt(compute(node).left) || 0);
- width = parseInt(dojo.style(node,'width'));
- height = parseInt(dojo.style(node,'height'));
-
- newLeft = left - Math.floor((args.width - width)/2);
- newTop = top - Math.floor((args.height - height)/2);
-
- if(pos != 'absolute' && pos != 'relative'){
- var ret = dojo.coords(innerNode, true);
- top = ret.y;
- left = ret.x;
- innerNode.style.position="absolute";
- innerNode.style.top=top+"px";
- innerNode.style.left=left+"px";
- }
- }
- })();
- init(); // hmmm, do we need to init() or just the once beforeBegin?
-
- var anim1 = dojo.animateProperty(dojo.mixin({
- properties: {
- height: { start: height, end: args.height || 0, unit:"px" },
- top: { start: top, end: newTop }
- }
- }, args));
- var anim2 = dojo.animateProperty(dojo.mixin({
- properties: {
- width: { start: width, end: args.width || 0, unit:"px" },
- left: { start: left, end: newLeft }
- }
- }, args));
-
- var anim = dojo.fx[((args.method == "combine") ? "combine" : "chain")]([anim1,anim2]);
- dojo.connect(anim, "beforeBegin", anim, init);
- return anim; // dojo._Animation
-};
-dojox.fx.slideBy = function(/* Object */args){
- // summary: Returns an animation to slide a node by a defined offset.
- //
- // description:
- // Returns an animation that will slide a node (args.node) from it's
- // current position to it's current posision plus the numbers defined
- // in args.top and args.left. standard dojo.fx mixin's apply.
- //
- // example:
- // | // slide domNode 50px down, and 22px left
- // | dojox.fx.slideBy({
- // | node: domNode, duration:400,
- // | top: 50, left: -22
- // | }).play();
-
- var node = (args.node = dojo.byId(args.node));
- var compute = dojo.getComputedStyle;
- var top = null; var left = null;
- var init = (function(){
- var innerNode = node;
- return function(){
- var pos = compute(innerNode,'position');
- top = (pos == 'absolute' ? node.offsetTop : parseInt(compute(node, 'top')) || 0);
- left = (pos == 'absolute' ? node.offsetLeft : parseInt(compute(node, 'left')) || 0);
- if(pos != 'absolute' && pos != 'relative'){
- var ret = dojo.coords(innerNode, true);
- top = ret.y;
- left = ret.x;
- innerNode.style.position="absolute";
- innerNode.style.top=top+"px";
- innerNode.style.left=left+"px";
- }
- }
- })();
- init();
- var _anim = dojo.animateProperty(dojo.mixin({
- properties: {
- // FIXME: is there a way to update the _Line after creation?
- // null start values allow chaining to work, animateProperty will
- // determine them for us (except in ie6? -- ugh)
- top: { /* start: top, */end: top+(args.top||0) },
- left: { /* start: left, */end: left+(args.left||0) }
- }
- }, args));
- dojo.connect(_anim,"beforeBegin",_anim,init);
- return _anim; // dojo._Animation
+if(!dojo._hasResource["dojox.fx._base"]){
+dojo._hasResource["dojox.fx._base"]=true;
+dojo.provide("dojox.fx._base");
+dojo.require("dojo.fx");
+dojo.mixin(dojox.fx,{anim:dojo.anim,animateProperty:dojo.animateProperty,fadeTo:dojo._fade,fadeIn:dojo.fadeIn,fadeOut:dojo.fadeOut,combine:dojo.fx.combine,chain:dojo.fx.chain,slideTo:dojo.fx.slideTo,wipeIn:dojo.fx.wipeIn,wipeOut:dojo.fx.wipeOut});
+dojox.fx.sizeTo=function(_1){
+var _2=_1.node=dojo.byId(_1.node),_3="absolute";
+var _4=_1.method||"chain";
+if(!_1.duration){
+_1.duration=500;
+}
+if(_4=="chain"){
+_1.duration=Math.floor(_1.duration/2);
+}
+var _5,_6,_7,_8,_9,_a=null;
+var _b=(function(n){
+return function(){
+var cs=dojo.getComputedStyle(n),_c=cs.position,w=cs.width,h=cs.height;
+_5=(_c==_3?n.offsetTop:parseInt(cs.top)||0);
+_7=(_c==_3?n.offsetLeft:parseInt(cs.left)||0);
+_9=(w=="auto"?0:parseInt(w));
+_a=(h=="auto"?0:parseInt(h));
+_8=_7-Math.floor((_1.width-_9)/2);
+_6=_5-Math.floor((_1.height-_a)/2);
+if(_c!=_3&&_c!="relative"){
+var _d=dojo.coords(n,true);
+_5=_d.y;
+_7=_d.x;
+n.style.position=_3;
+n.style.top=_5+"px";
+n.style.left=_7+"px";
+}
+};
+})(_2);
+var _e=dojo.animateProperty(dojo.mixin({properties:{height:function(){
+_b();
+return {end:_1.height||0,start:_a};
+},top:function(){
+return {start:_5,end:_6};
+}}},_1));
+var _f=dojo.animateProperty(dojo.mixin({properties:{width:function(){
+return {start:_9,end:_1.width||0};
+},left:function(){
+return {start:_7,end:_8};
+}}},_1));
+var _10=dojo.fx[(_1.method=="combine"?"combine":"chain")]([_e,_f]);
+return _10;
};
-
-dojox.fx.crossFade = function(/* Object */args){
- // summary: Returns an animation cross fading two element simultaneously
- //
- // args:
- // args.nodes: Array - two element array of domNodes, or id's
- //
- // all other standard animation args mixins apply. args.node ignored.
- //
- if(dojo.isArray(args.nodes)){
- // simple check for which node is visible, maybe too simple?
- var node1 = args.nodes[0] = dojo.byId(args.nodes[0]);
- var op1 = dojo.style(node1,"opacity");
- var node2 = args.nodes[1] = dojo.byId(args.nodes[1]);
- var op2 = dojo.style(node2, "opacity");
-
- var _anim = dojo.fx.combine([
- dojo[((op1==0)?"fadeIn":"fadeOut")](dojo.mixin({
- node: node1
- },args)),
- dojo[((op1==0)?"fadeOut":"fadeIn")](dojo.mixin({
- node: node2
- },args))
- ]);
- return _anim; // dojo._Animation
- }else{
- // improper syntax in args, needs Array
- return false; // Boolean
- }
+dojox.fx.slideBy=function(_11){
+var _12=_11.node=dojo.byId(_11.node),top,_13;
+var _14=(function(n){
+return function(){
+var cs=dojo.getComputedStyle(n);
+var pos=cs.position;
+top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);
+_13=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);
+if(pos!="absolute"&&pos!="relative"){
+var ret=dojo.coords(n,true);
+top=ret.y;
+_13=ret.x;
+n.style.position="absolute";
+n.style.top=top+"px";
+n.style.left=_13+"px";
+}
+};
+})(_12);
+_14();
+var _15=dojo.animateProperty(dojo.mixin({properties:{top:top+(_11.top||0),left:_13+(_11.left||0)}},_11));
+dojo.connect(_15,"beforeBegin",_15,_14);
+return _15;
+};
+dojox.fx.crossFade=function(_16){
+var _17=_16.nodes[0]=dojo.byId(_16.nodes[0]),op1=dojo.style(_17,"opacity"),_18=_16.nodes[1]=dojo.byId(_16.nodes[1]),op2=dojo.style(_18,"opacity");
+var _19=dojo.fx.combine([dojo[(op1==0?"fadeIn":"fadeOut")](dojo.mixin({node:_17},_16)),dojo[(op1==0?"fadeOut":"fadeIn")](dojo.mixin({node:_18},_16))]);
+return _19;
};
-
-dojox.fx.highlight = function(/*Object*/ args){
- // summary: Highlight a node
- // description:
- // Returns an animation that sets the node background to args.color
- // then gradually fades back the original node background color
- //
- // example:
- // dojox.fx.highlight({ node:"foo" }).play();
-
- var node = (args.node = dojo.byId(args.node));
-
- args.duration = args.duration || 400;
- // Assign default color light yellow
- var startColor = args.color || '#ffff99';
- var endColor = dojo.style(node, "backgroundColor");
- var wasTransparent = (endColor == "transparent" || endColor == "rgba(0, 0, 0, 0)");
-
- var anim = dojo.animateProperty(dojo.mixin({
- properties: {
- backgroundColor: { start: startColor, end: endColor }
- }
- }, args));
-
- dojo.connect(anim, "onEnd", anim, function(){
- if(wasTransparent){
- node.style.backgroundColor = "transparent";
- }
- });
-
- return anim; // dojo._Animation
+dojox.fx.highlight=function(_1a){
+var _1b=_1a.node=dojo.byId(_1a.node);
+_1a.duration=_1a.duration||400;
+var _1c=_1a.color||"#ffff99",_1d=dojo.style(_1b,"backgroundColor");
+if(_1d=="rgba(0, 0, 0, 0)"){
+_1d="transparent";
+}
+var _1e=dojo.animateProperty(dojo.mixin({properties:{backgroundColor:{start:_1c,end:_1d}}},_1a));
+if(_1d=="transparent"){
+dojo.connect(_1e,"onEnd",_1e,function(){
+_1b.style.backgroundColor=_1d;
+});
+}
+return _1e;
};
-
+dojox.fx.wipeTo=function(_1f){
+_1f.node=dojo.byId(_1f.node);
+var _20=_1f.node,s=_20.style;
+var dir=(_1f.width?"width":"height"),_21=_1f[dir],_22={};
+_22[dir]={start:function(){
+s.overflow="hidden";
+if(s.visibility=="hidden"||s.display=="none"){
+s[dir]="1px";
+s.display="";
+s.visibility="";
+return 1;
+}else{
+var now=dojo.style(_20,dir);
+return Math.max(now,1);
}
+},end:_21};
+var _23=dojo.animateProperty(dojo.mixin({properties:_22},_1f));
+return _23;
+};
+}
diff --git a/js/dojo/dojox/fx/_core.js b/js/dojo/dojox/fx/_core.js
--- a/js/dojo/dojox/fx/_core.js
+++ b/js/dojo/dojox/fx/_core.js
@@ -1,60 +1,32 @@
-if(!dojo._hasResource["dojox.fx._core"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.fx._core"] = true;
-dojo.provide("dojox.fx._core");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
-dojox.fx._Line = function(start, end){
- // summary: a custom _Line to accomodate multi-dimensional values
- //
- // description:
- // a normal dojo._Line is the curve, and does Line(start,end)
- // for propertyAnimation. as we make more complicatied animations, we realize
- // some properties can have 2, or 4 values relevant (x,y) or (t,l,r,b) for example
- //
- // this function provides support for those Lines, and is ported directly from 0.4
- // this is a lot of extra code for something so seldom used, so we'll put it here as
- // and optional core addition. you can create a new line, and use it during onAnimate
- // as you see fit.
- //
- // start: Integer|Array
- // An Integer (or an Array of integers) to use as a starting point
- // end: Integer|Array
- // An Integer (or an Array of integers) to use as an ending point
- //
- // example: see dojox.fx.smoothScroll
- //
- // example:
- // | // this is 10 .. 100 and 50 .. 500
- // | var curve = new dojox.fx._Line([10,50],[100,500]);
- // | // dojo._Animation.onAnimate is called at every step of the animation
- // | // to define current values. this _Line returns an array
- // | // at each step. arguments[0] and [1] in this example.
- //
- this.start = start;
- this.end = end;
- if(dojo.isArray(start)){
- // multi-dimensional branch
- var diff = [];
- dojo.forEach(this.start, function(s,i){
- diff[i] = this.end[i] - s;
- }, this);
-
- this.getValue = function(/*float*/ n){
- var res = [];
- dojo.forEach(this.start, function(s, i){
- res[i] = (diff[i] * n) + s;
- }, this);
- return res; // Array
- }
- }else{
- // single value branch, document here for both branches:
- var diff = end - start;
- this.getValue = function(/*float*/ n){
- // summary: Returns the point on the line, or an array of points
- // n: a floating point number greater than 0 and less than 1
- // returns: Mixed
- return (diff * n) + this.start; // Decimal
- }
- }
+if(!dojo._hasResource["dojox.fx._core"]){
+dojo._hasResource["dojox.fx._core"]=true;
+dojo.provide("dojox.fx._core");
+dojox.fx._Line=function(_1,_2){
+this.start=_1;
+this.end=_2;
+var _3=dojo.isArray(_1),d=(_3?[]:_2-_1);
+if(_3){
+dojo.forEach(this.start,function(s,i){
+d[i]=this.end[i]-s;
+},this);
+this.getValue=function(n){
+var _4=[];
+dojo.forEach(this.start,function(s,i){
+_4[i]=(d[i]*n)+s;
+},this);
+return _4;
};
-
+}else{
+this.getValue=function(n){
+return (d*n)+this.start;
+};
}
+};
+}
diff --git a/js/dojo/dojox/fx/easing.js b/js/dojo/dojox/fx/easing.js
--- a/js/dojo/dojox/fx/easing.js
+++ b/js/dojo/dojox/fx/easing.js
@@ -1,42 +1,14 @@
-if(!dojo._hasResource["dojox.fx.easing"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.fx.easing"] = true;
-dojo.provide("dojox.fx.easing");
/*
- dojox.fx.easing is in this little file so you don't need dojox.fx to utilize this.
- dojox.fx has a lot of fun animations, but this module is optimized for size ...
-
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
*/
-dojox.fx.easing = {
- // summary: Collection of easing functions to use beyond the default dojo._defaultEasing
- //
- // description:
- // Easing functions are used to manipulate the iteration through
- // an _Animation's _Line. _Line being the properties of an Animation,
- // and the easing function progresses through that Line determing
- // how quickly (or slowly) it should go.
- //
- // example:
- // dojo.require("dojox.fx.easing");
- // var anim = dojo.fadeOut({
- // node: 'node',
- // duration: 2000,
- // easing: dojox.fx.easing.easeIn
- // }).play();
- //
- easeIn: function(/* Decimal? */n){
- // summary: an easing function that speeds an _Animation up closer to end
- return Math.pow(n, 3);
- },
+
- easeOut: function(/* Decimal? */n){
- // summary: an easing function that slows an _Animation down towards end
- return (1 - Math.pow(1-n,3));
- },
-
- easeInOut: function(/* Decimal? */n){
- // summary: an easing function that "humps" in the middle of an _Animation?
- return ((3 * Math.pow(n, 2)) - (2 * Math.pow(n, 3)))
- }
-};
-
+if(!dojo._hasResource["dojox.fx.easing"]){
+dojo._hasResource["dojox.fx.easing"]=true;
+dojo.provide("dojox.fx.easing");
+dojo.deprecated("dojox.fx.easing","Upgraded to Core, use dojo.fx.easing instead","2.0");
+dojo.require("dojo.fx.easing");
+dojox.fx.easing=dojo.fx.easing;
}
diff --git a/js/dojo/dojox/fx/scroll.js b/js/dojo/dojox/fx/scroll.js
--- a/js/dojo/dojox/fx/scroll.js
+++ b/js/dojo/dojox/fx/scroll.js
@@ -1,40 +1,33 @@
-if(!dojo._hasResource["dojox.fx.scroll"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.fx.scroll"] = true;
-dojo.provide("dojox.fx.scroll");
-dojo.experimental("dojox.fx.scroll");
-
-dojo.require("dojox.fx._core");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojox.fx.smoothScroll = function(/* Object */args){
- // summary: Returns an animation that will smooth-scroll to a node (specified in etup())
- // description: This implementation support either horizental or vertical scroll, as well as
- // both. In addition, element in iframe can be scrolled to correctly.
- // offset: {x: int, y: int} this will be added to the target position
- // duration: Duration of the animation in milliseconds.
- // win: a node or window object to scroll
-
- if(!args.target){ args.target = dojo.coords(args.node,true); }
-
- var isWindow = dojo[(dojo.isIE ? "isObject" : "isFunction")](args["win"].scrollTo);
- var _anim = (isWindow) ?
- (function(val){
- args.win.scrollTo(val[0],val[1]);
- }) :
- (function(val){
- args.win.scrollLeft = val[0];
- args.win.scrollTop = val[1];
- });
-
- var anim = new dojo._Animation(dojo.mixin({
- beforeBegin: function(){
- if(this.curve){ delete this.curve; }
- var current = isWindow ? dojo._docScroll() : {x: args.win.scrollLeft, y: args.win.scrollTop};
- anim.curve = new dojox.fx._Line([current.x,current.y],[args.target.x,args.target.y]);
- },
- onAnimate: _anim
- },args));
- return anim; // dojo._Animation
+if(!dojo._hasResource["dojox.fx.scroll"]){
+dojo._hasResource["dojox.fx.scroll"]=true;
+dojo.provide("dojox.fx.scroll");
+dojo.experimental("dojox.fx.scroll");
+dojo.require("dojox.fx._core");
+dojox.fx.smoothScroll=function(_1){
+if(!_1.target){
+_1.target=dojo.coords(_1.node,true);
+}
+var _2=dojo[(dojo.isIE?"isObject":"isFunction")](_1["win"].scrollTo);
+var _3=(_2)?(function(_4){
+_1.win.scrollTo(_4[0],_4[1]);
+}):(function(_5){
+_1.win.scrollLeft=_5[0];
+_1.win.scrollTop=_5[1];
+});
+var _6=new dojo.Animation(dojo.mixin({beforeBegin:function(){
+if(this.curve){
+delete this.curve;
+}
+var _7=_2?dojo._docScroll():{x:_1.win.scrollLeft,y:_1.win.scrollTop};
+_6.curve=new dojox.fx._Line([_7.x,_7.y],[_1.target.x,_1.target.y]);
+},onAnimate:_3},_1));
+return _6;
};
-
}
diff --git a/js/dojo/dojox/fx/style.js b/js/dojo/dojox/fx/style.js
--- a/js/dojo/dojox/fx/style.js
+++ b/js/dojo/dojox/fx/style.js
@@ -1,221 +1,69 @@
-if(!dojo._hasResource["dojox.fx.style"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.fx.style"] = true;
-dojo.provide("dojox.fx.style");
-dojo.experimental("dojox.fx.style");
-//
-// summary: dojox.fx CSS Class _Animations:
-//
-// description: a set of functions to animate properties based on
-// normalized CSS class definitions.
-//
-// provides: addClass, removeClass, and toggleClass
-//
-dojo.require("dojox.fx._base");
-
-// FIXME: should the call signatures match dojo.addClass/removeClass/toggleClass and extend
-// by having a third (or fourth) param to mix in additional _Animation args for advanced
-// usage (delay: curve: repeat: easing: etc ... )
-
-dojox.fx.addClass = function(/*dojox.fx._arg.StyleArgs*/ args){
- // summary: Animate the effects of adding a class to a node
- // description:
- // Creates an animation that will animate
- // the properties of a node to the properties
- // defined in a standard CSS .class definition.
- // (calculating the differences itself)
- //
- // example:
- //
- // .bar { line-height: 12px; }
- // .foo { line-height: 40px; }
- // <div class="bar" id="test">
- // Multi<br>line<br>text
- // </div>
- //
- // // animate to line-height:40px
- // dojo.fx.addClass({ node:"test", cssClass:"foo" }).play();
- //
- var node = (args.node = dojo.byId(args.node));
-
- var pushClass = (function(){
- // summary: onEnd we want to add the class to the node
- // (as dojo.addClass naturally would) in case our
- // class parsing misses anything the browser would
- // otherwise interpret. this may cause some flicker,
- // and will only apply the class so children can inherit
- // after the animation is done (potentially more flicker)
- var innerNode = node; // FIXME: why do we do this like this?
- return function(){
- dojo.addClass(innerNode, args.cssClass);
- innerNode.style.cssText = _beforeStyle;
- }
- })();
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // _getCalculatedStleChanges is the core of our style/class animations
- var mixedProperties = dojox.fx._getCalculatedStyleChanges(args,true);
- var _beforeStyle = node.style.cssText;
- var _anim = dojo.animateProperty(dojo.mixin({
- properties: mixedProperties
- },args));
- dojo.connect(_anim,"onEnd",_anim,pushClass);
- return _anim; // dojo._Animation
-};
-
-dojox.fx.removeClass = function(/*dojox.fx._arg.StyleArgs*/ args){
- // summary: Animate the effects of removing a class from a node
- // description:
- // Creates an animation that will animate the properties of a
- // node (args.node) to the properties calculated after removing
- // a standard CSS className from a that node.
- //
- // calls dojo.removeClass(args.cssClass) onEnd of animation
- //
- // standard dojo._Animation object rules apply.
- //
- // example:
- // | // animate the removal of "foo" from a node with id="bar"
- // | dojox.fx.removeClass({
- // | node: "bar",
- // | cssClass: "foo"
- // | }).play();
-
- var node = (args.node = dojo.byId(args.node));
-
- var pullClass = (function(){
- // summary: onEnd we want to remove the class from the node
- // (as dojo.removeClass naturally would) in case our class
- // parsing misses anything the browser would otherwise
- // interpret. this may cause some flicker, and will only
- // apply the class so children can inherit after the
- // animation is done (potentially more flicker)
- //
- var innerNode = node;
- return function(){
- dojo.removeClass(innerNode, args.cssClass);
- innerNode.style.cssText = _beforeStyle;
- }
- })();
-
- var mixedProperties = dojox.fx._getCalculatedStyleChanges(args,false);
- var _beforeStyle = node.style.cssText;
- var _anim = dojo.animateProperty(dojo.mixin({
- properties: mixedProperties
- },args));
- dojo.connect(_anim,"onEnd",_anim,pullClass);
- return _anim; // dojo._Animation
-};
-dojox.fx.toggleClass = function(/*DomNode|String*/node, /*String*/cssClass, /*Boolean?*/condition){
- // summary:
- // Animate the effects of Toggling a class on a Node
- //
- // description:
- // creates an animation that will animate the effect of
- // toggling a class on or off of a node.
- // Adds a class to node if not present, or removes if present.
- // Pass a boolean condition if you want to explicitly add or remove.
- // node:
- // The domNode (or string of the id) to toggle
- // cssClass:
- // String of the classname to add to the node
- // condition:
- // If passed, true means to add the class, false means to remove.
- //
- // example:
- // | // add the class "sampleClass" to a node id="theNode"
- // | dojox.fx.toggleClass("theNode","sampleClass",true).play();
- // example:
- // | // toggle the class "sampleClass" on the node id="theNode"
- // | dojox.fx.toggleClass("theNode","sampleClass").play();
-
- if(typeof condition == "undefined"){
- condition = !dojo.hasClass(node, cssClass);
- }
- return dojox.fx[(condition ? "addClass" : "removeClass")]({ node: node, cssClass:cssClass }); // dojo._Animation
- // TODO: support 4th param animMixin to allow passing of easing and duration and other _Animtion options
+if(!dojo._hasResource["dojox.fx.style"]){
+dojo._hasResource["dojox.fx.style"]=true;
+dojo.provide("dojox.fx.style");
+dojo.experimental("dojox.fx.style");
+dojo.require("dojo.fx");
+(function(){
+var d=dojo;
+var _1=function(_2){
+return d.map(dojox.fx._allowedProperties,function(_3){
+return _2[_3];
+});
+};
+var _4=function(_5,_6,_7){
+_5=d.byId(_5);
+var cs=d.getComputedStyle(_5);
+var _8=_1(cs);
+d[(_7?"addClass":"removeClass")](_5,_6);
+var _9=_1(cs);
+d[(_7?"removeClass":"addClass")](_5,_6);
+var _a={},i=0;
+d.forEach(dojox.fx._allowedProperties,function(_b){
+if(_8[i]!=_9[i]){
+_a[_b]=parseInt(_9[i]);
+}
+i++;
+});
+return _a;
};
-
-dojox.fx._allowedProperties = [
- // summary:
- // this is our pseudo map of properties we will check for.
- // it should be much more intuitive. a way to normalize and
- // "predict" intent, or even something more clever ...
- // open to suggestions.
-
- // no-brainers:
- "width",
- "height",
- // only if position = absolute || relative?
- "left", "top", "right", "bottom",
- // these need to be filtered through dojo.colors?
- // "background", // normalize to:
- /* "backgroundImage", */
- // "backgroundPosition", // FIXME: to be effective, this needs "#px #px"?
- "backgroundColor",
-
- "color",
-
- // "border",
- "borderBottomColor", "borderBottomWidth",
- "borderTopColor","borderTopWidth",
- "borderLeftColor","borderLeftWidth",
- "borderRightColor","borderRightWidth",
-
- // "padding", // normalize to:
- "paddingLeft", "paddingRight", "paddingTop", "paddingBottom",
- // "margin", // normalize to:
- "marginLeft", "marginTop", "marginRight", "marginBottom",
-
- // unit import/delicate?:
- "lineHeight",
- "letterSpacing",
- "fontSize"
-];
-
-dojox.fx._getStyleSnapshot = function(/* Object */cache){
- // summary:
- // uses a dojo.getComputedStyle(node) cache reference and
- // iterates through the 'documented/supported animate-able'
- // properties.
- //
- // returns: Array
- // an array of raw, calculcated values (no keys), to be normalized/compared
- // elsewhere
- return dojo.map(dojox.fx._allowedProperties,function(style){
- return cache[style]; // String
- }); // Array
+d.mixin(dojox.fx,{addClass:function(_c,_d,_e){
+_c=d.byId(_c);
+var _f=(function(n){
+return function(){
+d.addClass(n,_d);
+n.style.cssText=_10;
};
-
-dojox.fx._getCalculatedStyleChanges = function(/*dojox.fx._arg.StyleArgs*/ args, /*Boolean*/addClass){
- // summary: calclate the difference in style properties between two states
- // description:
- // calculate and normalize(?) the differences between two states
- // of a node (args.node) by quickly adding or removing a class, and
- // iterateing over the results of dojox.fx._getStyleSnapshot()
- //
- // addClass:
- // true to calculate what adding a class would do,
- // false to calculate what removing the class would do
-
- var node = (args.node = dojo.byId(args.node));
- var compute = dojo.getComputedStyle(node);
-
- // take our snapShots
- var _before = dojox.fx._getStyleSnapshot(compute);
- dojo[(addClass ? "addClass" : "removeClass")](node,args.cssClass);
- var _after = dojox.fx._getStyleSnapshot(compute);
- dojo[(addClass ? "removeClass" : "addClass")](node,args.cssClass);
-
- var calculated = {};
- var i = 0;
- dojo.forEach(dojox.fx._allowedProperties,function(prop){
- if(_before[i] != _after[i]){
- // FIXME: the static unit: px is not good, either. need to parse unit from computed style?
- calculated[prop] = { end: parseInt(_after[i]) /* start: parseInt(_before[i]), unit: 'px' */ };
- }
- i++;
- });
- return calculated;
+})(_c);
+var _11=_4(_c,_d,true);
+var _10=_c.style.cssText;
+var _12=d.animateProperty(d.mixin({node:_c,properties:_11},_e));
+d.connect(_12,"onEnd",_12,_f);
+return _12;
+},removeClass:function(_13,_14,_15){
+_13=d.byId(_13);
+var _16=(function(n){
+return function(){
+d.removeClass(n,_14);
+n.style.cssText=_17;
};
-
+})(_13);
+var _18=_4(_13,_14);
+var _17=_13.style.cssText;
+var _19=d.animateProperty(d.mixin({node:_13,properties:_18},_15));
+d.connect(_19,"onEnd",_19,_16);
+return _19;
+},toggleClass:function(_1a,_1b,_1c,_1d){
+if(typeof _1c=="undefined"){
+_1c=!d.hasClass(_1a,_1b);
}
+return dojox.fx[(_1c?"addClass":"removeClass")](_1a,_1b,_1d);
+},_allowedProperties:["width","height","left","top","backgroundColor","color","borderBottomWidth","borderTopWidth","borderLeftWidth","borderRightWidth","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginTop","marginRight","marginBottom","lineHeight","letterSpacing","fontSize"]});
+})();
+}
diff --git a/js/dojo/dojox/gfx.js b/js/dojo/dojox/gfx.js
--- a/js/dojo/dojox/gfx.js
+++ b/js/dojo/dojox/gfx.js
@@ -1,39 +1,16 @@
-if(!dojo._hasResource["dojox.gfx"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.gfx"] = true;
-dojo.provide("dojox.gfx");
-
-dojo.require("dojox.gfx.matrix");
-dojo.require("dojox.gfx._base");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-(function(){
- var renderers = (typeof djConfig["gfxRenderer"] == "string" ?
- djConfig["gfxRenderer"] : "svg,vml,silverlight,canvas").split(",");
- for(var i = 0; i < renderers.length; ++i){
- switch(renderers[i]){
- case "svg":
- //TODO: need more comprehensive test for SVG
- if(!dojo.isIE && (navigator.userAgent.indexOf("iPhone") < 0) && (navigator.userAgent.indexOf("iPod") < 0)){ dojox.gfx.renderer = "svg"; }
- break;
- case "vml":
- if(dojo.isIE != 0){ dojox.gfx.renderer = "vml"; }
- break;
- case "silverlight":
- //TODO: need more comprehensive test for Silverlight
- if(window.Silverlight){ dojox.gfx.renderer = "silverlight"; }
- break;
- case "canvas":
- //TODO: need more comprehensive test for Canvas
- if(dojo.isIE == 0){ dojox.gfx.renderer = "canvas"; }
- break;
- }
- if(dojox.gfx.renderer){ break; }
- }
-})();
+/*
+ This is a compiled version of Dojo, built for deployment and not for
+ development. To get an editable version, please visit:
-// include a renderer conditionally
-dojo.requireIf(dojox.gfx.renderer == "svg", "dojox.gfx.svg");
-dojo.requireIf(dojox.gfx.renderer == "vml", "dojox.gfx.vml");
-dojo.requireIf(dojox.gfx.renderer == "silverlight", "dojox.gfx.silverlight");
-dojo.requireIf(dojox.gfx.renderer == "canvas", "dojox.gfx.canvas");
+ http://dojotoolkit.org
-}
+ for documentation and information on getting the source.
+*/
+
+if(!dojo._hasResource["dojox.gfx.matrix"]){dojo._hasResource["dojox.gfx.matrix"]=true;dojo.provide("dojox.gfx.matrix");(function(){var m=dojox.gfx.matrix;var _1={};m._degToRad=function(_2){return _1[_2]||(_1[_2]=(Math.PI*_2/180));};m._radToDeg=function(_3){return _3/Math.PI*180;};m.Matrix2D=function(_4){if(_4){if(typeof _4=="number"){this.xx=this.yy=_4;}else{if(_4 instanceof Array){if(_4.length>0){var _5=m.normalize(_4[0]);for(var i=1;i<_4.length;++i){var l=_5,r=dojox.gfx.matrix.normalize(_4[i]);_5=new m.Matrix2D();_5.xx=l.xx*r.xx+l.xy*r.yx;_5.xy=l.xx*r.xy+l.xy*r.yy;_5.yx=l.yx*r.xx+l.yy*r.yx;_5.yy=l.yx*r.xy+l.yy*r.yy;_5.dx=l.xx*r.dx+l.xy*r.dy+l.dx;_5.dy=l.yx*r.dx+l.yy*r.dy+l.dy;}dojo.mixin(this,_5);}}else{dojo.mixin(this,_4);}}}};dojo.extend(m.Matrix2D,{xx:1,xy:0,yx:0,yy:1,dx:0,dy:0});dojo.mixin(m,{identity:new m.Matrix2D(),flipX:new m.Matrix2D({xx:-1}),flipY:new m.Matrix2D({yy:-1}),flipXY:new m.Matrix2D({xx:-1,yy:-1}),translate:function(a,b){if(arguments.length>1){return new m.Matrix2D({dx:a,dy:b});}return new m.Matrix2D({dx:a.x,dy:a.y});},scale:function(a,b){if(arguments.length>1){return new m.Matrix2D({xx:a,yy:b});}if(typeof a=="number"){return new m.Matrix2D({xx:a,yy:a});}return new m.Matrix2D({xx:a.x,yy:a.y});},rotate:function(_6){var c=Math.cos(_6);var s=Math.sin(_6);return new m.Matrix2D({xx:c,xy:-s,yx:s,yy:c});},rotateg:function(_7){return m.rotate(m._degToRad(_7));},skewX:function(_8){return new m.Matrix2D({xy:Math.tan(_8)});},skewXg:function(_9){return m.skewX(m._degToRad(_9));},skewY:function(_a){return new m.Matrix2D({yx:Math.tan(_a)});},skewYg:function(_b){return m.skewY(m._degToRad(_b));},reflect:function(a,b){if(arguments.length==1){b=a.y;a=a.x;}var a2=a*a,b2=b*b,n2=a2+b2,xy=2*a*b/n2;return new m.Matrix2D({xx:2*a2/n2-1,xy:xy,yx:xy,yy:2*b2/n2-1});},project:function(a,b){if(arguments.length==1){b=a.y;a=a.x;}var a2=a*a,b2=b*b,n2=a2+b2,xy=a*b/n2;return new m.Matrix2D({xx:a2/n2,xy:xy,yx:xy,yy:b2/n2});},normalize:function(_c){return (_c instanceof m.Matrix2D)?_c:new m.Matrix2D(_c);},clone:function(_d){var _e=new m.Matrix2D();for(var i in _d){if(typeof (_d[i])=="number"&&typeof (_e[i])=="number"&&_e[i]!=_d[i]){_e[i]=_d[i];}}return _e;},invert:function(_f){var M=m.normalize(_f),D=M.xx*M.yy-M.xy*M.yx,M=new m.Matrix2D({xx:M.yy/D,xy:-M.xy/D,yx:-M.yx/D,yy:M.xx/D,dx:(M.xy*M.dy-M.yy*M.dx)/D,dy:(M.yx*M.dx-M.xx*M.dy)/D});return M;},_multiplyPoint:function(_10,x,y){return {x:_10.xx*x+_10.xy*y+_10.dx,y:_10.yx*x+_10.yy*y+_10.dy};},multiplyPoint:function(_11,a,b){var M=m.normalize(_11);if(typeof a=="number"&&typeof b=="number"){return m._multiplyPoint(M,a,b);}return m._multiplyPoint(M,a.x,a.y);},multiply:function(_12){var M=m.normalize(_12);for(var i=1;i<arguments.length;++i){var l=M,r=m.normalize(arguments[i]);M=new m.Matrix2D();M.xx=l.xx*r.xx+l.xy*r.yx;M.xy=l.xx*r.xy+l.xy*r.yy;M.yx=l.yx*r.xx+l.yy*r.yx;M.yy=l.yx*r.xy+l.yy*r.yy;M.dx=l.xx*r.dx+l.xy*r.dy+l.dx;M.dy=l.yx*r.dx+l.yy*r.dy+l.dy;}return M;},_sandwich:function(_13,x,y){return m.multiply(m.translate(x,y),_13,m.translate(-x,-y));},scaleAt:function(a,b,c,d){switch(arguments.length){case 4:return m._sandwich(m.scale(a,b),c,d);case 3:if(typeof c=="number"){return m._sandwich(m.scale(a),b,c);}return m._sandwich(m.scale(a,b),c.x,c.y);}return m._sandwich(m.scale(a),b.x,b.y);},rotateAt:function(_14,a,b){if(arguments.length>2){return m._sandwich(m.rotate(_14),a,b);}return m._sandwich(m.rotate(_14),a.x,a.y);},rotategAt:function(_15,a,b){if(arguments.length>2){return m._sandwich(m.rotateg(_15),a,b);}return m._sandwich(m.rotateg(_15),a.x,a.y);},skewXAt:function(_16,a,b){if(arguments.length>2){return m._sandwich(m.skewX(_16),a,b);}return m._sandwich(m.skewX(_16),a.x,a.y);},skewXgAt:function(_17,a,b){if(arguments.length>2){return m._sandwich(m.skewXg(_17),a,b);}return m._sandwich(m.skewXg(_17),a.x,a.y);},skewYAt:function(_18,a,b){if(arguments.length>2){return m._sandwich(m.skewY(_18),a,b);}return m._sandwich(m.skewY(_18),a.x,a.y);},skewYgAt:function(_19,a,b){if(arguments.length>2){return m._sandwich(m.skewYg(_19),a,b);}return m._sandwich(m.skewYg(_19),a.x,a.y);}});})();dojox.gfx.Matrix2D=dojox.gfx.matrix.Matrix2D;}if(!dojo._hasResource["dojox.gfx._base"]){dojo._hasResource["dojox.gfx._base"]=true;dojo.provide("dojox.gfx._base");(function(){var g=dojox.gfx,b=g._base;g._hasClass=function(_1a,_1b){var cls=_1a.getAttribute("className");return cls&&(" "+cls+" ").indexOf(" "+_1b+" ")>=0;};g._addClass=function(_1c,_1d){var cls=_1c.getAttribute("className")||"";if(!cls||(" "+cls+" ").indexOf(" "+_1d+" ")<0){_1c.setAttribute("className",cls+(cls?" ":"")+_1d);}};g._removeClass=function(_1e,_1f){var cls=_1e.getAttribute("className");if(cls){_1e.setAttribute("className",cls.replace(new RegExp("(^|\\s+)"+_1f+"(\\s+|$)"),"$1$2"));}};b._getFontMeasurements=function(){var _20={"1em":0,"1ex":0,"100%":0,"12pt":0,"16px":0,"xx-small":0,"x-small":0,"small":0,"medium":0,"large":0,"x-large":0,"xx-large":0};if(dojo.isIE){dojo.doc.documentElement.style.fontSize="100%";}var div=dojo.doc.createElement("div");var s=div.style;s.position="absolute";s.left="-100px";s.top="0px";s.width="30px";s.height="1000em";s.border="0px";s.margin="0px";s.padding="0px";s.outline="none";s.lineHeight="1";s.overflow="hidden";dojo.body().appendChild(div);for(var p in _20){div.style.fontSize=p;_20[p]=Math.round(div.offsetHeight*12/16)*16/12/1000;}dojo.body().removeChild(div);div=null;return _20;};var _21=null;b._getCachedFontMeasurements=function(_22){if(_22||!_21){_21=b._getFontMeasurements();}return _21;};var _23=null,_24={};b._getTextBox=function(_25,_26,_27){var m,s,al=arguments.length;if(!_23){m=_23=dojo.doc.createElement("div");s=m.style;s.position="absolute";s.left="-10000px";s.top="0";dojo.body().appendChild(m);}else{m=_23;s=m.style;}m.className="";s.border="0";s.margin="0";s.padding="0";s.outline="0";if(al>1&&_26){for(var i in _26){if(i in _24){continue;}s[i]=_26[i];}}if(al>2&&_27){m.className=_27;}m.innerHTML=_25;if(m["getBoundingClientRect"]){var bcr=m.getBoundingClientRect();return {l:bcr.left,t:bcr.top,w:bcr.width||(bcr.right-bcr.left),h:bcr.height||(bcr.bottom-bcr.top)};}else{return dojo.marginBox(m);}};var _28=0;b._getUniqueId=function(){var id;do{id=dojo._scopeName+"Unique"+(++_28);}while(dojo.byId(id));return id;};})();dojo.mixin(dojox.gfx,{defaultPath:{type:"path",path:""},defaultPolyline:{type:"polyline",points:[]},defaultRect:{type:"rect",x:0,y:0,width:100,height:100,r:0},defaultEllipse:{type:"ellipse",cx:0,cy:0,rx:200,ry:100},defaultCircle:{type:"circle",cx:0,cy:0,r:100},defaultLine:{type:"line",x1:0,y1:0,x2:100,y2:100},defaultImage:{type:"image",x:0,y:0,width:0,height:0,src:""},defaultText:{type:"text",x:0,y:0,text:"",align:"start",decoration:"none",rotated:false,kerning:true},defaultTextPath:{type:"textpath",text:"",align:"start",decoration:"none",rotated:false,kerning:true},defaultStroke:{type:"stroke",color:"black",style:"solid",width:1,cap:"butt",join:4},defaultLinearGradient:{type:"linear",x1:0,y1:0,x2:100,y2:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultRadialGradient:{type:"radial",cx:0,cy:0,r:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultPattern:{type:"pattern",x:0,y:0,width:0,height:0,src:""},defaultFont:{type:"font",style:"normal",variant:"normal",weight:"normal",size:"10pt",family:"serif"},getDefault:(function(){var _29={};return function(_2a){var t=_29[_2a];if(t){return new t();}t=_29[_2a]=new Function;t.prototype=dojox.gfx["default"+_2a];return new t();};})(),normalizeColor:function(_2b){return (_2b instanceof dojo.Color)?_2b:new dojo.Color(_2b);},normalizeParameters:function(_2c,_2d){if(_2d){var _2e={};for(var x in _2c){if(x in _2d&&!(x in _2e)){_2c[x]=_2d[x];}}}return _2c;},makeParameters:function(_2f,_30){if(!_30){return dojo.delegate(_2f);}var _31={};for(var i in _2f){if(!(i in _31)){_31[i]=dojo.clone((i in _30)?_30[i]:_2f[i]);}}return _31;},formatNumber:function(x,_32){var val=x.toString();if(val.indexOf("e")>=0){val=x.toFixed(4);}else{var _33=val.indexOf(".");if(_33>=0&&val.length-_33>5){val=x.toFixed(4);}}if(x<0){return val;}return _32?" "+val:val;},makeFontString:function(_34){return _34.style+" "+_34.variant+" "+_34.weight+" "+_34.size+" "+_34.family;},splitFontString:function(str){var _35=dojox.gfx.getDefault("Font");var t=str.split(/\s+/);do{if(t.length<5){break;}_35.style=t[0];_35.variant=t[1];_35.weight=t[2];var i=t[3].indexOf("/");_35.size=i<0?t[3]:t[3].substring(0,i);var j=4;if(i<0){if(t[4]=="/"){j=6;}else{if(t[4].charAt(0)=="/"){j=5;}}}if(j<t.length){_35.family=t.slice(j).join(" ");}}while(false);return _35;},cm_in_pt:72/2.54,mm_in_pt:7.2/2.54,px_in_pt:function(){return dojox.gfx._base._getCachedFontMeasurements()["12pt"]/12;},pt2px:function(len){return len*dojox.gfx.px_in_pt();},px2pt:function(len){return len/dojox.gfx.px_in_pt();},normalizedLength:function(len){if(len.length==0){return 0;}if(len.length>2){var _36=dojox.gfx.px_in_pt();var val=parseFloat(len);switch(len.slice(-2)){case "px":return val;case "pt":return val*_36;case "in":return val*72*_36;case "pc":return val*12*_36;case "mm":return val*dojox.gfx.mm_in_pt*_36;case "cm":return val*dojox.gfx.cm_in_pt*_36;}}return parseFloat(len);},pathVmlRegExp:/([A-Za-z]+)|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,pathSvgRegExp:/([A-Za-z])|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,equalSources:function(a,b){return a&&b&&a==b;}});}if(!dojo._hasResource["dojox.gfx"]){dojo._hasResource["dojox.gfx"]=true;dojo.provide("dojox.gfx");dojo.loadInit(function(){var gfx=dojo.getObject("dojox.gfx",true),sl,_37,_38;if(!gfx.renderer){if(dojo.config.forceGfxRenderer){dojox.gfx.renderer=dojo.config.forceGfxRenderer;return;}var _39=(typeof dojo.config.gfxRenderer=="string"?dojo.config.gfxRenderer:"svg,vml,silverlight,canvas").split(",");var ua=navigator.userAgent,_3a=0,_3b=0;if(dojo.isSafari>=3){if(ua.indexOf("iPhone")>=0||ua.indexOf("iPod")>=0){_38=ua.match(/Version\/(\d(\.\d)?(\.\d)?)\sMobile\/([^\s]*)\s?/);if(_38){_3a=parseInt(_38[4].substr(0,3),16);}}}if(dojo.isWebKit){if(!_3a){_38=ua.match(/Android\s+(\d+\.\d+)/);if(_38){_3b=parseFloat(_38[1]);}}}for(var i=0;i<_39.length;++i){switch(_39[i]){case "svg":if(!dojo.isIE&&(!_3a||_3a>=1521)&&!_3b&&!dojo.isAIR){dojox.gfx.renderer="svg";}break;case "vml":if(dojo.isIE){dojox.gfx.renderer="vml";}break;case "silverlight":try{if(dojo.isIE){sl=new ActiveXObject("AgControl.AgControl");if(sl&&sl.IsVersionSupported("1.0")){_37=true;}}else{if(navigator.plugins["Silverlight Plug-In"]){_37=true;}}}catch(e){_37=false;}finally{sl=null;}if(_37){dojox.gfx.renderer="silverlight";}break;case "canvas":if(!dojo.isIE){dojox.gfx.renderer="canvas";}break;}if(dojox.gfx.renderer){break;}}if(dojo.config.isDebug){}}});dojo.requireIf(dojox.gfx.renderer=="svg","dojox.gfx.svg");dojo.requireIf(dojox.gfx.renderer=="vml","dojox.gfx.vml");dojo.requireIf(dojox.gfx.renderer=="silverlight","dojox.gfx.silverlight");dojo.requireIf(dojox.gfx.renderer=="canvas","dojox.gfx.canvas");}
diff --git a/js/dojo/dojox/gfx/README b/js/dojo/dojox/gfx/README
--- a/js/dojo/dojox/gfx/README
+++ b/js/dojo/dojox/gfx/README
@@ -1,102 +1,102 @@
-------------------------------------------------------------------------------
dojox.gfx
-------------------------------------------------------------------------------
Version 1.100
Release date: 08/01/2006
-------------------------------------------------------------------------------
Project state:
beta
-HTMLCanvas renderer: experimental
+HTMLCanvas renderer: experimental
-------------------------------------------------------------------------------
Credits
Eugene Lazutkin (eugene.lazutkin@gmail.com)
Kun Xi (bookstack@gmail.com)
Chris Mitchell (ccmitchellusa@gmail.com) HTML Canvas
-------------------------------------------------------------------------------
Project description
Implementation of simple portable 2D graphics library.
-------------------------------------------------------------------------------
Dependencies:
Dojo Core
-------------------------------------------------------------------------------
Documentation
Currently it can be found here: http://docs.google.com/Doc?id=d764479_1hnb2tn
HTMLCanvas Renderer Status
To use canvas rendering, insert 'canvas' at the beginning of the gfxRenderers list in your
djConfig, for example:
-<script type="text/javascript" src="../../../dojo/dojo.js"
+<script type="text/javascript" src="../../../dojo/dojo.js"
djConfig="parseOnLoad: true, gfxRenderer: 'canvas,svg,silverlight,vml'"></script>
canvas currently will only render on non-IE browsers (see dojox/gfx.js for where the renderer is loaded);
although it should be possible to use an IE canvas implementation (like Google's); however, it will be very slow.
The following tests can be made to work with HTML Canvas with minor testcase modification:
dojox/gfx/tests
test_gfx.html-Bugs #1
test_arc.html
test_bezier.html
test_pattern.html
- test_gradient.html
- test_linearGradient.html
- test_image1.html - Limitation #3
+ test_gradient.html
+ test_linearGradient.html
+ test_image1.html - Limitation #3
test_transform.html - Bug #1
test_poly.html - Bug #1
dojox/gfx/demos
butterfly.html - Bug #1
lion.html - Bug #1
tiger.html - Bug #1
circles.html - No event processing yet :(
creator.html
dojox/chart
test_pie2d.html - Dojo Charts on iPhone anyone? :)
- test_chart2d.html -
+ test_chart2d.html -
- // To make charts work, the following line needs to be added to the end of the
+ // To make charts work, the following line needs to be added to the end of the
// Chart2D.js render() method (prior to return)
- if(this.surface.render){this.surface.render()};
+ if(this.surface.render){this.surface.render()};
Known Limitations:
-1) event handling- plan is to capture all events at canvas, perform intersect/hit
- tests (not implemented) against scene graph, then propogate event to top-most
- intersected shape. HtmlCanvas shape need intersectsStroke and intersectsBounds,
- and intersects (region).
-2) SVG and VML are "live" scene graphs; eg. any state change to objects in the
- scene automatically get rendered in next engine render pass. For canvas, it's
- procedural, and current implementation requires application to call surface.render()
- whenever scene needs to be updated. Plan is to do dirty region checking based
- on bounding boxes (currently not properly computed), and track dirty areas anytime
+1) event handling- plan is to capture all events at canvas, perform intersect/hit
+ tests (not implemented) against scene graph, then propogate event to top-most
+ intersected shape. HtmlCanvas shape need intersectsStroke and intersectsBounds,
+ and intersects (region).
+2) SVG and VML are "live" scene graphs; eg. any state change to objects in the
+ scene automatically get rendered in next engine render pass. For canvas, it's
+ procedural, and current implementation requires application to call surface.render()
+ whenever scene needs to be updated. Plan is to do dirty region checking based
+ on bounding boxes (currently not properly computed), and track dirty areas anytime
state changes (invalidate) separate from render phase.
Add the following call where changes to the scene graph are complete and you want to
render:
- if (surface.render){surface.render();}
+ if (surface.render){surface.render();}
4) Text/Text Paths - Text shape is implemented using DIV overlays. Many text styles are not
applied, and outline/fills are not possible. This is due to limitations in Canvas spec.
Firefox 3.0 has proprietary text functions that we could test for and use once FF3 is out.
No luck on Safari.
-3) No Image skewing - Limitation of Canvas
-
+3) No Image skewing - Limitation of Canvas
+
Known Bugs:
1) Matrix xformations (applied from root to shape leaf nodes) not quite right--but very close.
- Canvas does not have a built in transformation function that allows skewing. Need to
- track skew matrix with Shape, and perform other trans/rot/scale transformations without
- using canvas transform functions.
-
+ Canvas does not have a built in transformation function that allows skewing. Need to
+ track skew matrix with Shape, and perform other trans/rot/scale transformations without
+ using canvas transform functions.
+
-------------------------------------------------------------------------------
Installation instructions
Grab the following from the Dojo SVN Repository:
http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/gfx.js
http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/gfx/*
Install into the following directory structure:
/dojox/gfx/
...which should be at the same level as your Dojo checkout.
-------------------------------------------------------------------------------
diff --git a/js/dojo/dojox/gfx/_base.js b/js/dojo/dojox/gfx/_base.js
--- a/js/dojo/dojox/gfx/_base.js
+++ b/js/dojo/dojox/gfx/_base.js
@@ -1,250 +1,219 @@
-if(!dojo._hasResource["dojox.gfx._base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.gfx._base"] = true;
-dojo.provide("dojox.gfx._base");
-
-// candidates for dojox.style (work on VML and SVG nodes)
-dojox.gfx._hasClass = function(/*DomNode*/node, /*String*/classStr){
- // summary:
- // Returns whether or not the specified classes are a portion of the
- // class list currently applied to the node.
- // return (new RegExp('(^|\\s+)'+classStr+'(\\s+|$)')).test(node.className) // Boolean
- return ((" "+node.getAttribute("className")+" ").indexOf(" "+classStr+" ") >= 0); // Boolean
-}
-
-dojox.gfx._addClass = function(/*DomNode*/node, /*String*/classStr){
- // summary:
- // Adds the specified classes to the end of the class list on the
- // passed node.
- var cls = node.getAttribute("className");
- if((" "+cls+" ").indexOf(" "+classStr+" ") < 0){
- node.setAttribute("className", cls + (cls ? ' ' : '') + classStr);
- }
-}
-
-dojox.gfx._removeClass = function(/*DomNode*/node, /*String*/classStr){
- // summary: Removes classes from node.
- node.setAttribute("className", node.getAttribute("className").replace(new RegExp('(^|\\s+)'+classStr+'(\\s+|$)'), "$1$2"));
-}
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-// candidate for dojox.html.metrics (dynamic font resize handler is not implemented here)
-
-// derived from Morris John's emResized measurer
-dojox.gfx._base._getFontMeasurements = function(){
- // summary
- // Returns an object that has pixel equivilents of standard font size values.
- var heights = {
- '1em':0, '1ex':0, '100%':0, '12pt':0, '16px':0, 'xx-small':0, 'x-small':0,
- 'small':0, 'medium':0, 'large':0, 'x-large':0, 'xx-large':0
- };
-
- if(dojo.isIE){
- // we do a font-size fix if and only if one isn't applied already.
- // NOTE: If someone set the fontSize on the HTML Element, this will kill it.
- dojo.doc.documentElement.style.fontSize="100%";
- }
-
- // set up the measuring node.
- var div=dojo.doc.createElement("div");
- div.style.position="absolute";
- div.style.left="-100px";
- div.style.top="0";
- div.style.width="30px";
- div.style.height="1000em";
- div.style.border="0";
- div.style.margin="0";
- div.style.padding="0";
- div.style.outline="0";
- div.style.lineHeight="1";
- div.style.overflow="hidden";
- dojo.body().appendChild(div);
-
- // do the measurements.
- for(var p in heights){
- div.style.fontSize = p;
- heights[p] = Math.round(div.offsetHeight * 12/16) * 16/12 / 1000;
- }
-
- dojo.body().removeChild(div);
- div = null;
- return heights; // object
+if(!dojo._hasResource["dojox.gfx._base"]){
+dojo._hasResource["dojox.gfx._base"]=true;
+dojo.provide("dojox.gfx._base");
+(function(){
+var g=dojox.gfx,b=g._base;
+g._hasClass=function(_1,_2){
+var _3=_1.getAttribute("className");
+return _3&&(" "+_3+" ").indexOf(" "+_2+" ")>=0;
+};
+g._addClass=function(_4,_5){
+var _6=_4.getAttribute("className")||"";
+if(!_6||(" "+_6+" ").indexOf(" "+_5+" ")<0){
+_4.setAttribute("className",_6+(_6?" ":"")+_5);
+}
+};
+g._removeClass=function(_7,_8){
+var _9=_7.getAttribute("className");
+if(_9){
+_7.setAttribute("className",_9.replace(new RegExp("(^|\\s+)"+_8+"(\\s+|$)"),"$1$2"));
+}
+};
+b._getFontMeasurements=function(){
+var _a={"1em":0,"1ex":0,"100%":0,"12pt":0,"16px":0,"xx-small":0,"x-small":0,"small":0,"medium":0,"large":0,"x-large":0,"xx-large":0};
+if(dojo.isIE){
+dojo.doc.documentElement.style.fontSize="100%";
+}
+var _b=dojo.doc.createElement("div");
+var s=_b.style;
+s.position="absolute";
+s.left="-100px";
+s.top="0px";
+s.width="30px";
+s.height="1000em";
+s.border="0px";
+s.margin="0px";
+s.padding="0px";
+s.outline="none";
+s.lineHeight="1";
+s.overflow="hidden";
+dojo.body().appendChild(_b);
+for(var p in _a){
+_b.style.fontSize=p;
+_a[p]=Math.round(_b.offsetHeight*12/16)*16/12/1000;
+}
+dojo.body().removeChild(_b);
+_b=null;
+return _a;
};
-
-dojox.gfx._base._fontMeasurements = null;
-
-dojox.gfx._base._getCachedFontMeasurements = function(recalculate){
- if(recalculate || !dojox.gfx._base._fontMeasurements){
- dojox.gfx._base._fontMeasurements = dojox.gfx._base._getFontMeasurements();
- }
- return dojox.gfx._base._fontMeasurements;
+var _c=null;
+b._getCachedFontMeasurements=function(_d){
+if(_d||!_c){
+_c=b._getFontMeasurements();
+}
+return _c;
};
-
-// candidate for dojo.dom
-
-dojox.gfx._base._uniqueId = 0;
-dojox.gfx._base._getUniqueId = function(){
- // summary: returns a unique string for use with any DOM element
- var id;
- do{
- id = "dojoUnique" + (++dojox.gfx._base._uniqueId);
- }while(dojo.byId(id));
- return id;
+var _e=null,_f={};
+b._getTextBox=function(_10,_11,_12){
+var m,s,al=arguments.length;
+if(!_e){
+m=_e=dojo.doc.createElement("div");
+s=m.style;
+s.position="absolute";
+s.left="-10000px";
+s.top="0";
+dojo.body().appendChild(m);
+}else{
+m=_e;
+s=m.style;
+}
+m.className="";
+s.border="0";
+s.margin="0";
+s.padding="0";
+s.outline="0";
+if(al>1&&_11){
+for(var i in _11){
+if(i in _f){
+continue;
+}
+s[i]=_11[i];
+}
+}
+if(al>2&&_12){
+m.className=_12;
+}
+m.innerHTML=_10;
+if(m["getBoundingClientRect"]){
+var bcr=m.getBoundingClientRect();
+return {l:bcr.left,t:bcr.top,w:bcr.width||(bcr.right-bcr.left),h:bcr.height||(bcr.bottom-bcr.top)};
+}else{
+return dojo.marginBox(m);
+}
+};
+var _13=0;
+b._getUniqueId=function(){
+var id;
+do{
+id=dojo._scopeName+"Unique"+(++_13);
+}while(dojo.byId(id));
+return id;
};
-
-dojo.mixin(dojox.gfx, {
- // summary: defines constants, prototypes, and utility functions
-
- // default shapes, which are used to fill in missing parameters
- defaultPath: {type: "path", path: ""},
- defaultPolyline: {type: "polyline", points: []},
- defaultRect: {type: "rect", x: 0, y: 0, width: 100, height: 100, r: 0},
- defaultEllipse: {type: "ellipse", cx: 0, cy: 0, rx: 200, ry: 100},
- defaultCircle: {type: "circle", cx: 0, cy: 0, r: 100},
- defaultLine: {type: "line", x1: 0, y1: 0, x2: 100, y2: 100},
- defaultImage: {type: "image", x: 0, y: 0, width: 0, height: 0, src: ""},
- defaultText: {type: "text", x: 0, y: 0, text: "",
- align: "start", decoration: "none", rotated: false, kerning: true },
- defaultTextPath: {type: "textpath", text: "",
- align: "start", decoration: "none", rotated: false, kerning: true },
-
- // default geometric attributes
- defaultStroke: {type: "stroke", color: "black", style: "solid", width: 1, cap: "butt", join: 4},
- defaultLinearGradient: {type: "linear", x1: 0, y1: 0, x2: 100, y2: 100,
- colors: [{offset: 0, color: "black"}, {offset: 1, color: "white"}]},
- defaultRadialGradient: {type: "radial", cx: 0, cy: 0, r: 100,
- colors: [{offset: 0, color: "black"}, {offset: 1, color: "white"}]},
- defaultPattern: {type: "pattern", x: 0, y: 0, width: 0, height: 0, src: ""},
- defaultFont: {type: "font", style: "normal", variant: "normal", weight: "normal",
- size: "10pt", family: "serif"},
-
- normalizeColor: function(/*Color*/ color){
- // summary: converts any legal color representation to normalized dojo.Color object
- return (color instanceof dojo.Color) ? color : new dojo.Color(color); // dojo.Color
- },
- normalizeParameters: function(existed, update){
- // summary: updates an existing object with properties from an "update" object
- // existed: Object: the "target" object to be updated
- // update: Object: the "update" object, whose properties will be used to update the existed object
- if(update){
- var empty = {};
- for(var x in existed){
- if(x in update && !(x in empty)){
- existed[x] = update[x];
- }
- }
- }
- return existed; // Object
- },
- makeParameters: function(defaults, update){
- // summary: copies the original object, and all copied properties from the "update" object
- // defaults: Object: the object to be cloned before updating
- // update: Object: the object, which properties are to be cloned during updating
- if(!update) return dojo.clone(defaults);
- var result = {};
- for(var i in defaults){
- if(!(i in result)){
- result[i] = dojo.clone((i in update) ? update[i] : defaults[i]);
- }
- }
- return result; // Object
- },
- formatNumber: function(x, addSpace){
- // summary: converts a number to a string using a fixed notation
- // x: Number: number to be converted
- // addSpace: Boolean?: if it is true, add a space before a positive number
- var val = x.toString();
- if(val.indexOf("e") >= 0){
- val = x.toFixed(4);
- }else{
- var point = val.indexOf(".");
- if(point >= 0 && val.length - point > 5){
- val = x.toFixed(4);
- }
- }
- if(x < 0){
- return val; // String
- }
- return addSpace ? " " + val : val; // String
- },
- // font operations
- makeFontString: function(font){
- // summary: converts a font object to a CSS font string
- // font: Object: font object (see dojox.gfx.defaultFont)
- return font.style + " " + font.variant + " " + font.weight + " " + font.size + " " + font.family; // Object
- },
- splitFontString: function(str){
- // summary: converts a CSS font string to a font object
- // str: String: a CSS font string
- var font = dojo.clone(dojox.gfx.defaultFont);
- var t = str.split(/\s+/);
- do{
- if(t.length < 5){ break; }
- font.style = t[0];
- font.varian = t[1];
- font.weight = t[2];
- var i = t[3].indexOf("/");
- font.size = i < 0 ? t[3] : t[3].substring(0, i);
- var j = 4;
- if(i < 0){
- if(t[4] == "/"){
- j = 6;
- break;
- }
- if(t[4].substr(0, 1) == "/"){
- j = 5;
- break;
- }
- }
- if(j + 3 > t.length){ break; }
- font.size = t[j];
- font.family = t[j + 1];
- }while(false);
- return font; // Object
- },
- // length operations
- cm_in_pt: 72 / 2.54, // Number: centimeters per inch
- mm_in_pt: 7.2 / 2.54, // Number: millimeters per inch
- px_in_pt: function(){
- // summary: returns a number of pixels per point
- return dojox.gfx._base._getCachedFontMeasurements()["12pt"] / 12; // Number
- },
- pt2px: function(len){
- // summary: converts points to pixels
- // len: Number: a value in points
- return len * dojox.gfx.px_in_pt(); // Number
- },
- px2pt: function(len){
- // summary: converts pixels to points
- // len: Number: a value in pixels
- return len / dojox.gfx.px_in_pt(); // Number
- },
- normalizedLength: function(len) {
- // summary: converts any length value to pixels
- // len: String: a length, e.g., "12pc"
- if(len.length == 0) return 0;
- if(len.length > 2){
- var px_in_pt = dojox.gfx.px_in_pt();
- var val = parseFloat(len);
- switch(len.slice(-2)){
- case "px": return val;
- case "pt": return val * px_in_pt;
- case "in": return val * 72 * px_in_pt;
- case "pc": return val * 12 * px_in_pt;
- case "mm": return val / dojox.gfx.mm_in_pt * px_in_pt;
- case "cm": return val / dojox.gfx.cm_in_pt * px_in_pt;
- }
- }
- return parseFloat(len); // Number
- },
-
- // a constant used to split a SVG/VML path into primitive components
- pathVmlRegExp: /([A-Za-z]+)|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,
- pathSvgRegExp: /([A-Za-z])|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,
-
- equalSources: function(a, b){
- // summary: compares event sources, returns true if they are equal
- return a && b && a == b;
- }
-});
-
+})();
+dojo.mixin(dojox.gfx,{defaultPath:{type:"path",path:""},defaultPolyline:{type:"polyline",points:[]},defaultRect:{type:"rect",x:0,y:0,width:100,height:100,r:0},defaultEllipse:{type:"ellipse",cx:0,cy:0,rx:200,ry:100},defaultCircle:{type:"circle",cx:0,cy:0,r:100},defaultLine:{type:"line",x1:0,y1:0,x2:100,y2:100},defaultImage:{type:"image",x:0,y:0,width:0,height:0,src:""},defaultText:{type:"text",x:0,y:0,text:"",align:"start",decoration:"none",rotated:false,kerning:true},defaultTextPath:{type:"textpath",text:"",align:"start",decoration:"none",rotated:false,kerning:true},defaultStroke:{type:"stroke",color:"black",style:"solid",width:1,cap:"butt",join:4},defaultLinearGradient:{type:"linear",x1:0,y1:0,x2:100,y2:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultRadialGradient:{type:"radial",cx:0,cy:0,r:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultPattern:{type:"pattern",x:0,y:0,width:0,height:0,src:""},defaultFont:{type:"font",style:"normal",variant:"normal",weight:"normal",size:"10pt",family:"serif"},getDefault:(function(){
+var _14={};
+return function(_15){
+var t=_14[_15];
+if(t){
+return new t();
+}
+t=_14[_15]=new Function;
+t.prototype=dojox.gfx["default"+_15];
+return new t();
+};
+})(),normalizeColor:function(_16){
+return (_16 instanceof dojo.Color)?_16:new dojo.Color(_16);
+},normalizeParameters:function(_17,_18){
+if(_18){
+var _19={};
+for(var x in _17){
+if(x in _18&&!(x in _19)){
+_17[x]=_18[x];
+}
+}
+}
+return _17;
+},makeParameters:function(_1a,_1b){
+if(!_1b){
+return dojo.delegate(_1a);
+}
+var _1c={};
+for(var i in _1a){
+if(!(i in _1c)){
+_1c[i]=dojo.clone((i in _1b)?_1b[i]:_1a[i]);
+}
+}
+return _1c;
+},formatNumber:function(x,_1d){
+var val=x.toString();
+if(val.indexOf("e")>=0){
+val=x.toFixed(4);
+}else{
+var _1e=val.indexOf(".");
+if(_1e>=0&&val.length-_1e>5){
+val=x.toFixed(4);
+}
+}
+if(x<0){
+return val;
}
+return _1d?" "+val:val;
+},makeFontString:function(_1f){
+return _1f.style+" "+_1f.variant+" "+_1f.weight+" "+_1f.size+" "+_1f.family;
+},splitFontString:function(str){
+var _20=dojox.gfx.getDefault("Font");
+var t=str.split(/\s+/);
+do{
+if(t.length<5){
+break;
+}
+_20.style=t[0];
+_20.variant=t[1];
+_20.weight=t[2];
+var i=t[3].indexOf("/");
+_20.size=i<0?t[3]:t[3].substring(0,i);
+var j=4;
+if(i<0){
+if(t[4]=="/"){
+j=6;
+}else{
+if(t[4].charAt(0)=="/"){
+j=5;
+}
+}
+}
+if(j<t.length){
+_20.family=t.slice(j).join(" ");
+}
+}while(false);
+return _20;
+},cm_in_pt:72/2.54,mm_in_pt:7.2/2.54,px_in_pt:function(){
+return dojox.gfx._base._getCachedFontMeasurements()["12pt"]/12;
+},pt2px:function(len){
+return len*dojox.gfx.px_in_pt();
+},px2pt:function(len){
+return len/dojox.gfx.px_in_pt();
+},normalizedLength:function(len){
+if(len.length==0){
+return 0;
+}
+if(len.length>2){
+var _21=dojox.gfx.px_in_pt();
+var val=parseFloat(len);
+switch(len.slice(-2)){
+case "px":
+return val;
+case "pt":
+return val*_21;
+case "in":
+return val*72*_21;
+case "pc":
+return val*12*_21;
+case "mm":
+return val*dojox.gfx.mm_in_pt*_21;
+case "cm":
+return val*dojox.gfx.cm_in_pt*_21;
+}
+}
+return parseFloat(len);
+},pathVmlRegExp:/([A-Za-z]+)|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,pathSvgRegExp:/([A-Za-z])|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,equalSources:function(a,b){
+return a&&b&&a==b;
+}});
+}
diff --git a/js/dojo/dojox/gfx/arc.js b/js/dojo/dojox/gfx/arc.js
--- a/js/dojo/dojox/gfx/arc.js
+++ b/js/dojo/dojox/gfx/arc.js
@@ -1,122 +1,65 @@
-if(!dojo._hasResource["dojox.gfx.arc"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.gfx.arc"] = true;
-dojo.provide("dojox.gfx.arc");
-
-dojo.require("dojox.gfx.matrix");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-(function(){
- var m = dojox.gfx.matrix,
- unitArcAsBezier = function(alpha){
- // summary: return a start point, 1st and 2nd control points, and an end point of
- // a an arc, which is reflected on the x axis
- // alpha: Number: angle in radians, the arc will be 2 * angle size
- var cosa = Math.cos(alpha), sina = Math.sin(alpha),
- p2 = {x: cosa + (4 / 3) * (1 - cosa), y: sina - (4 / 3) * cosa * (1 - cosa) / sina};
- return { // Object
- s: {x: cosa, y: -sina},
- c1: {x: p2.x, y: -p2.y},
- c2: p2,
- e: {x: cosa, y: sina}
- };
- },
- twoPI = 2 * Math.PI, pi4 = Math.PI / 4, pi8 = Math.PI / 8,
- pi48 = pi4 + pi8, curvePI4 = unitArcAsBezier(pi8);
- dojo.mixin(dojox.gfx.arc, {
- unitArcAsBezier: unitArcAsBezier,
- curvePI4: curvePI4,
- arcAsBezier: function(last, rx, ry, xRotg, large, sweep, x, y){
- // summary: calculates an arc as a series of Bezier curves
- // given the last point and a standard set of SVG arc parameters,
- // it returns an array of arrays of parameters to form a series of
- // absolute Bezier curves.
- // last: Object: a point-like object as a start of the arc
- // rx: Number: a horizontal radius for the virtual ellipse
- // ry: Number: a vertical radius for the virtual ellipse
- // xRotg: Number: a rotation of an x axis of the virtual ellipse in degrees
- // large: Boolean: which part of the ellipse will be used (the larger arc if true)
- // sweep: Boolean: direction of the arc (CW if true)
- // x: Number: the x coordinate of the end point of the arc
- // y: Number: the y coordinate of the end point of the arc
-
- // calculate parameters
- large = Boolean(large);
- sweep = Boolean(sweep);
- var xRot = m._degToRad(xRotg),
- rx2 = rx * rx, ry2 = ry * ry,
- pa = m.multiplyPoint(
- m.rotate(-xRot),
- {x: (last.x - x) / 2, y: (last.y - y) / 2}
- ),
- pax2 = pa.x * pa.x, pay2 = pa.y * pa.y,
- c1 = Math.sqrt((rx2 * ry2 - rx2 * pay2 - ry2 * pax2) / (rx2 * pay2 + ry2 * pax2));
- if(isNaN(c1)){ c1 = 0; }
- var ca = {
- x: c1 * rx * pa.y / ry,
- y: -c1 * ry * pa.x / rx
- };
- if(large == sweep){
- ca = {x: -ca.x, y: -ca.y};
- }
- // the center
- var c = m.multiplyPoint(
- [
- m.translate(
- (last.x + x) / 2,
- (last.y + y) / 2
- ),
- m.rotate(xRot)
- ],
- ca
- );
- // calculate the elliptic transformation
- var elliptic_transform = m.normalize([
- m.translate(c.x, c.y),
- m.rotate(xRot),
- m.scale(rx, ry)
- ]);
- // start, end, and size of our arc
- var inversed = m.invert(elliptic_transform),
- sp = m.multiplyPoint(inversed, last),
- ep = m.multiplyPoint(inversed, x, y),
- startAngle = Math.atan2(sp.y, sp.x),
- endAngle = Math.atan2(ep.y, ep.x),
- theta = startAngle - endAngle; // size of our arc in radians
- if(sweep){ theta = -theta; }
- if(theta < 0){
- theta += twoPI;
- }else if(theta > twoPI){
- theta -= twoPI;
- }
-
- // draw curve chunks
- var alpha = pi8, curve = curvePI4, step = sweep ? alpha : -alpha,
- result = [];
- for(var angle = theta; angle > 0; angle -= pi4){
- if(angle < pi48){
- alpha = angle / 2;
- curve = unitArcAsBezier(alpha);
- step = sweep ? alpha : -alpha;
- angle = 0; // stop the loop
- }
- var c1, c2, e,
- M = m.normalize([elliptic_transform, m.rotate(startAngle + step)]);
- if(sweep){
- c1 = m.multiplyPoint(M, curve.c1);
- c2 = m.multiplyPoint(M, curve.c2);
- e = m.multiplyPoint(M, curve.e );
- }else{
- c1 = m.multiplyPoint(M, curve.c2);
- c2 = m.multiplyPoint(M, curve.c1);
- e = m.multiplyPoint(M, curve.s );
- }
- // draw the curve
- result.push([c1.x, c1.y, c2.x, c2.y, e.x, e.y]);
- startAngle += 2 * step;
- }
- return result; // Object
- }
- });
+if(!dojo._hasResource["dojox.gfx.arc"]){
+dojo._hasResource["dojox.gfx.arc"]=true;
+dojo.provide("dojox.gfx.arc");
+dojo.require("dojox.gfx.matrix");
+(function(){
+var m=dojox.gfx.matrix,_1=function(_2){
+var _3=Math.cos(_2),_4=Math.sin(_2),p2={x:_3+(4/3)*(1-_3),y:_4-(4/3)*_3*(1-_3)/_4};
+return {s:{x:_3,y:-_4},c1:{x:p2.x,y:-p2.y},c2:p2,e:{x:_3,y:_4}};
+},_5=2*Math.PI,_6=Math.PI/4,_7=Math.PI/8,_8=_6+_7,_9=_1(_7);
+dojo.mixin(dojox.gfx.arc,{unitArcAsBezier:_1,curvePI4:_9,arcAsBezier:function(_a,rx,ry,_b,_c,_d,x,y){
+_c=Boolean(_c);
+_d=Boolean(_d);
+var _e=m._degToRad(_b),_f=rx*rx,ry2=ry*ry,pa=m.multiplyPoint(m.rotate(-_e),{x:(_a.x-x)/2,y:(_a.y-y)/2}),_10=pa.x*pa.x,_11=pa.y*pa.y,c1=Math.sqrt((_f*ry2-_f*_11-ry2*_10)/(_f*_11+ry2*_10));
+if(isNaN(c1)){
+c1=0;
+}
+var ca={x:c1*rx*pa.y/ry,y:-c1*ry*pa.x/rx};
+if(_c==_d){
+ca={x:-ca.x,y:-ca.y};
+}
+var c=m.multiplyPoint([m.translate((_a.x+x)/2,(_a.y+y)/2),m.rotate(_e)],ca);
+var _12=m.normalize([m.translate(c.x,c.y),m.rotate(_e),m.scale(rx,ry)]);
+var _13=m.invert(_12),sp=m.multiplyPoint(_13,_a),ep=m.multiplyPoint(_13,x,y),_14=Math.atan2(sp.y,sp.x),_15=Math.atan2(ep.y,ep.x),_16=_14-_15;
+if(_d){
+_16=-_16;
+}
+if(_16<0){
+_16+=_5;
+}else{
+if(_16>_5){
+_16-=_5;
+}
+}
+var _17=_7,_18=_9,_19=_d?_17:-_17,_1a=[];
+for(var _1b=_16;_1b>0;_1b-=_6){
+if(_1b<_8){
+_17=_1b/2;
+_18=_1(_17);
+_19=_d?_17:-_17;
+_1b=0;
+}
+var c1,c2,e,M=m.normalize([_12,m.rotate(_14+_19)]);
+if(_d){
+c1=m.multiplyPoint(M,_18.c1);
+c2=m.multiplyPoint(M,_18.c2);
+e=m.multiplyPoint(M,_18.e);
+}else{
+c1=m.multiplyPoint(M,_18.c2);
+c2=m.multiplyPoint(M,_18.c1);
+e=m.multiplyPoint(M,_18.s);
+}
+_1a.push([c1.x,c1.y,c2.x,c2.y,e.x,e.y]);
+_14+=2*_19;
+}
+return _1a;
+}});
})();
-
}
diff --git a/js/dojo/dojox/gfx/attach.js b/js/dojo/dojox/gfx/attach.js
--- a/js/dojo/dojox/gfx/attach.js
+++ b/js/dojo/dojox/gfx/attach.js
@@ -1,7 +1,12 @@
-dojo.require("dojox.gfx");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-// include an attacher conditionally
-dojo.requireIf(dojox.gfx.renderer == "svg", "dojox.gfx.svg_attach");
-dojo.requireIf(dojox.gfx.renderer == "vml", "dojox.gfx.vml_attach");
-dojo.requireIf(dojox.gfx.renderer == "silverlight", "dojox.gfx.silverlight_attach");
-dojo.requireIf(dojox.gfx.renderer == "canvas", "dojox.gfx.canvas_attach");
+
+dojo.require("dojox.gfx");
+dojo.requireIf(dojox.gfx.renderer=="svg","dojox.gfx.svg_attach");
+dojo.requireIf(dojox.gfx.renderer=="vml","dojox.gfx.vml_attach");
+dojo.requireIf(dojox.gfx.renderer=="silverlight","dojox.gfx.silverlight_attach");
+dojo.requireIf(dojox.gfx.renderer=="canvas","dojox.gfx.canvas_attach");
diff --git a/js/dojo/dojox/gfx/canvas.js b/js/dojo/dojox/gfx/canvas.js
--- a/js/dojo/dojox/gfx/canvas.js
+++ b/js/dojo/dojox/gfx/canvas.js
@@ -1,682 +1,503 @@
-if(!dojo._hasResource["dojox.gfx.canvas"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.gfx.canvas"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.gfx.canvas"]){
+dojo._hasResource["dojox.gfx.canvas"]=true;
dojo.provide("dojox.gfx.canvas");
-
dojo.require("dojox.gfx._base");
dojo.require("dojox.gfx.shape");
dojo.require("dojox.gfx.path");
dojo.require("dojox.gfx.arc");
dojo.require("dojox.gfx.decompose");
-
dojo.experimental("dojox.gfx.canvas");
-
+(function(){
+var d=dojo,g=dojox.gfx,gs=g.shape,ga=g.arc,m=g.matrix,mp=m.multiplyPoint,pi=Math.PI,_1=2*pi,_2=pi/2;
+d.extend(g.Shape,{_render:function(_3){
+_3.save();
+this._renderTransform(_3);
+this._renderShape(_3);
+this._renderFill(_3,true);
+this._renderStroke(_3,true);
+_3.restore();
+},_renderTransform:function(_4){
+if("canvasTransform" in this){
+var t=this.canvasTransform;
+_4.translate(t.dx,t.dy);
+_4.rotate(t.angle2);
+_4.scale(t.sx,t.sy);
+_4.rotate(t.angle1);
+}
+},_renderShape:function(_5){
+},_renderFill:function(_6,_7){
+if("canvasFill" in this){
+if("canvasFillImage" in this){
+this.canvasFill=_6.createPattern(this.canvasFillImage,"repeat");
+delete this.canvasFillImage;
+}
+_6.fillStyle=this.canvasFill;
+if(_7){
+_6.fill();
+}
+}else{
+_6.fillStyle="rgba(0,0,0,0.0)";
+}
+},_renderStroke:function(_8,_9){
+var s=this.strokeStyle;
+if(s){
+_8.strokeStyle=s.color.toString();
+_8.lineWidth=s.width;
+_8.lineCap=s.cap;
+if(typeof s.join=="number"){
+_8.lineJoin="miter";
+_8.miterLimit=s.join;
+}else{
+_8.lineJoin=s.join;
+}
+if(_9){
+_8.stroke();
+}
+}else{
+if(!_9){
+_8.strokeStyle="rgba(0,0,0,0.0)";
+}
+}
+},getEventSource:function(){
+return null;
+},connect:function(){
+},disconnect:function(){
+}});
+var _a=function(_b,_c,_d){
+var _e=_b.prototype[_c];
+_b.prototype[_c]=_d?function(){
+this.surface.makeDirty();
+_e.apply(this,arguments);
+_d.call(this);
+return this;
+}:function(){
+this.surface.makeDirty();
+return _e.apply(this,arguments);
+};
+};
+_a(g.Shape,"setTransform",function(){
+if(this.matrix){
+this.canvasTransform=g.decompose(this.matrix);
+}else{
+delete this.canvasTransform;
+}
+});
+_a(g.Shape,"setFill",function(){
+var fs=this.fillStyle,f;
+if(fs){
+if(typeof (fs)=="object"&&"type" in fs){
+var _f=this.surface.rawNode.getContext("2d");
+switch(fs.type){
+case "linear":
+case "radial":
+f=fs.type=="linear"?_f.createLinearGradient(fs.x1,fs.y1,fs.x2,fs.y2):_f.createRadialGradient(fs.cx,fs.cy,0,fs.cx,fs.cy,fs.r);
+d.forEach(fs.colors,function(_10){
+f.addColorStop(_10.offset,g.normalizeColor(_10.color).toString());
+});
+break;
+case "pattern":
+var img=new Image(fs.width,fs.height);
+this.surface.downloadImage(img,fs.src);
+this.canvasFillImage=img;
+}
+}else{
+f=fs.toString();
+}
+this.canvasFill=f;
+}else{
+delete this.canvasFill;
+}
+});
+_a(g.Shape,"setStroke");
+_a(g.Shape,"setShape");
+dojo.declare("dojox.gfx.Group",g.Shape,{constructor:function(){
+gs.Container._init.call(this);
+},_render:function(ctx){
+ctx.save();
+this._renderTransform(ctx);
+this._renderFill(ctx);
+this._renderStroke(ctx);
+for(var i=0;i<this.children.length;++i){
+this.children[i]._render(ctx);
+}
+ctx.restore();
+}});
+dojo.declare("dojox.gfx.Rect",gs.Rect,{_renderShape:function(ctx){
+var s=this.shape,r=Math.min(s.r,s.height/2,s.width/2),xl=s.x,xr=xl+s.width,yt=s.y,yb=yt+s.height,xl2=xl+r,xr2=xr-r,yt2=yt+r,yb2=yb-r;
+ctx.beginPath();
+ctx.moveTo(xl2,yt);
+if(r){
+ctx.arc(xr2,yt2,r,-_2,0,false);
+ctx.arc(xr2,yb2,r,0,_2,false);
+ctx.arc(xl2,yb2,r,_2,pi,false);
+ctx.arc(xl2,yt2,r,pi,pi+_2,false);
+}else{
+ctx.lineTo(xr2,yt);
+ctx.lineTo(xr,yb2);
+ctx.lineTo(xl2,yb);
+ctx.lineTo(xl,yt2);
+}
+ctx.closePath();
+}});
+var _11=[];
(function(){
- var g = dojox.gfx, gs = g.shape, ga = g.arc,
- m = g.matrix, mp = m.multiplyPoint, twoPI = 2 * Math.PI;
-
- dojo.extend(g.Shape, {
- render: function(/* Object */ ctx){
- // summary: render the shape
- ctx.save();
- this._renderTransform(ctx);
- this._renderShape(ctx);
- this._renderFill(ctx, true);
- this._renderStroke(ctx, true);
- ctx.restore();
- },
- _renderTransform: function(/* Object */ ctx){
- if("canvasTransform" in this){
- var t = this.canvasTransform;
- ctx.translate(t.dx, t.dy);
- ctx.rotate(t.angle2);
- ctx.scale(t.sx, t.sy);
- ctx.rotate(t.angle1);
- // The future implementation when vendors catch up with the spec:
- // var t = this.matrix;
- // ctx.transform(t.xx, t.yx, t.xy, t.yy, t.dx, t.dy);
- }
- },
- _renderShape: function(/* Object */ ctx){
- // nothing
- },
- _renderFill: function(/* Object */ ctx, /* Boolean */ apply){
- if("canvasFill" in this){
- if("canvasFillImage" in this){
- this.canvasFill = ctx.createPattern(this.canvasFillImage, "repeat");
- delete this.canvasFillImage;
- }
- ctx.fillStyle = this.canvasFill;
- if(apply){ ctx.fill(); }
- }else{
- ctx.fillStyle = "rgba(0,0,0,0.0)";
- }
- },
- _renderStroke: function(/* Object */ ctx, /* Boolean */ apply){
- var s = this.strokeStyle;
- if(s){
- ctx.strokeStyle = s.color.toString();
- ctx.lineWidth = s.width;
- ctx.lineCap = s.cap;
- if(typeof s.join == "number"){
- ctx.lineJoin = "miter";
- ctx.miterLimit = s.join;
- }else{
- ctx.lineJoin = s.join;
- }
- if(apply){ ctx.stroke(); }
- }else if(!apply){
- ctx.strokeStyle = "rgba(0,0,0,0.0)";
- }
- },
-
- // events are not implemented
- getEventSource: function(){ return null; },
- connect: function(){},
- disconnect: function(){}
- });
-
- var modifyMethod = function(shape, method, extra){
- var old = shape.prototype[method];
- shape.prototype[method] = extra ?
- function(){
- this.surface.makeDirty();
- old.apply(this, arguments);
- extra.call(this);
- return this;
- } :
- function(){
- this.surface.makeDirty();
- return old.apply(this, arguments);
- };
- };
-
- modifyMethod(g.Shape, "setTransform",
- function(){
- // prepare Canvas-specific structures
- if(this.matrix){
- this.canvasTransform = g.decompose(this.matrix);
- }else{
- delete this.canvasTransform;
- }
- });
-
- modifyMethod(g.Shape, "setFill",
- function(){
- // prepare Canvas-specific structures
- var fs = this.fillStyle, f;
- if(fs){
- if(typeof(fs) == "object" && "type" in fs){
- var ctx = this.surface.rawNode.getContext("2d");
- switch(fs.type){
- case "linear":
- case "radial":
- f = fs.type == "linear" ?
- ctx.createLinearGradient(fs.x1, fs.y1, fs.x2, fs.y2) :
- ctx.createRadialGradient(fs.cx, fs.cy, 0, fs.cx, fs.cy, fs.r);
- dojo.forEach(fs.colors, function(step){
- f.addColorStop(step.offset, g.normalizeColor(step.color).toString());
- });
- break;
- case "pattern":
- var img = new Image(fs.width, fs.height);
- this.surface.downloadImage(img, fs.src);
- this.canvasFillImage = img;
- }
- }else{
- // Set fill color using CSS RGBA func style
- f = fs.toString();
- }
- this.canvasFill = f;
- }else{
- delete this.canvasFill;
- }
- });
-
- modifyMethod(g.Shape, "setStroke");
- modifyMethod(g.Shape, "setShape");
-
- dojo.declare("dojox.gfx.Group", g.Shape, {
- // summary: a group shape (Canvas), which can be used
- // to logically group shapes (e.g, to propagate matricies)
- constructor: function(){
- gs.Container._init.call(this);
- },
- render: function(/* Object */ ctx){
- // summary: render the group
- ctx.save();
- this._renderTransform(ctx);
- this._renderFill(ctx);
- this._renderStroke(ctx);
- for(var i = 0; i < this.children.length; ++i){
- this.children[i].render(ctx);
- }
- ctx.restore();
- }
- });
-
- dojo.declare("dojox.gfx.Rect", gs.Rect, {
- // summary: a rectangle shape (Canvas)
- _renderShape: function(/* Object */ ctx){
- var s = this.shape, r = Math.min(s.r, s.height / 2, s.width / 2),
- xl = s.x, xr = xl + s.width, yt = s.y, yb = yt + s.height,
- xl2 = xl + r, xr2 = xr - r, yt2 = yt + r, yb2 = yb - r;
- ctx.beginPath();
- ctx.moveTo(xl2, yt);
- ctx.lineTo(xr2, yt);
- if(r){ ctx.arcTo(xr, yt, xr, yt2, r); }
- ctx.lineTo(xr, yb2);
- if(r){ ctx.arcTo(xr, yb, xr2, yb, r); }
- ctx.lineTo(xl2, yb);
- if(r){ ctx.arcTo(xl, yb, xl, yb2, r); }
- ctx.lineTo(xl, yt2);
- if(r){ ctx.arcTo(xl, yt, xl2, yt, r); }
- ctx.closePath();
- }
- });
-
- var bezierCircle = [];
- (function(){
- var u = ga.curvePI4;
- bezierCircle.push(u.s, u.c1, u.c2, u.e);
- for(var a = 45; a < 360; a += 45){
- var r = m.rotateg(a);
- bezierCircle.push(mp(r, u.c1), mp(r, u.c2), mp(r, u.e));
- }
- })();
-
- dojo.declare("dojox.gfx.Ellipse", gs.Ellipse, {
- // summary: an ellipse shape (Canvas)
- setShape: function(){
- g.Ellipse.superclass.setShape.apply(this, arguments);
- // prepare Canvas-specific structures
- var s = this.shape, t, c1, c2, r = [],
- M = m.normalize([m.translate(s.cx, s.cy), m.scale(s.rx, s.ry)]);
- t = mp(M, bezierCircle[0]);
- r.push([t.x, t.y]);
- for(var i = 1; i < bezierCircle.length; i += 3){
- c1 = mp(M, bezierCircle[i]);
- c2 = mp(M, bezierCircle[i + 1]);
- t = mp(M, bezierCircle[i + 2]);
- r.push([c1.x, c1.y, c2.x, c2.y, t.x, t.y]);
- }
- this.canvasEllipse = r;
- return this;
- },
- _renderShape: function(/* Object */ ctx){
- var r = this.canvasEllipse;
- ctx.beginPath();
- ctx.moveTo.apply(ctx, r[0]);
- for(var i = 1; i < r.length; ++i){
- ctx.bezierCurveTo.apply(ctx, r[i]);
- }
- ctx.closePath();
- }
- });
-
- dojo.declare("dojox.gfx.Circle", gs.Circle, {
- // summary: a circle shape (Canvas)
- _renderShape: function(/* Object */ ctx){
- var s = this.shape;
- ctx.beginPath();
- ctx.arc(s.cx, s.cy, s.r, 0, twoPI, 1);
- }
- });
-
- dojo.declare("dojox.gfx.Line", gs.Line, {
- // summary: a line shape (Canvas)
- _renderShape: function(/* Object */ ctx){
- var s = this.shape;
- ctx.beginPath();
- ctx.moveTo(s.x1, s.y1);
- ctx.lineTo(s.x2, s.y2);
- }
- });
-
- dojo.declare("dojox.gfx.Polyline", gs.Polyline, {
- // summary: a polyline/polygon shape (Canvas)
- setShape: function(){
- g.Polyline.superclass.setShape.apply(this, arguments);
- // prepare Canvas-specific structures
- var p = this.shape.points, f = p[0], r = [], c, i;
- if(p.length){
- if(typeof f == "number"){
- r.push(f, p[1]);
- i = 2;
- }else{
- r.push(f.x, f.y);
- i = 1;
- }
- for(; i < p.length; ++i){
- c = p[i];
- if(typeof c == "number"){
- r.push(c, p[++i]);
- }else{
- r.push(c.x, c.y);
- }
- }
- }
- this.canvasPolyline = r;
- return this;
- },
- _renderShape: function(/* Object */ ctx){
- var p = this.canvasPolyline;
- if(p.length){
- ctx.beginPath();
- ctx.moveTo(p[0], p[1]);
- for(var i = 2; i < p.length; i += 2){
- ctx.lineTo(p[i], p[i + 1]);
- }
- }
- }
- });
-
- dojo.declare("dojox.gfx.Image", gs.Image, {
- // summary: an image shape (Canvas)
- setShape: function(){
- g.Image.superclass.setShape.apply(this, arguments);
- // prepare Canvas-specific structures
- var img = new Image();
- this.surface.downloadImage(img, this.shape.src);
- this.canvasImage = img;
- return this;
- },
- _renderShape: function(/* Object */ ctx){
- var s = this.shape;
- ctx.drawImage(this.canvasImage, s.x, s.y, s.width, s.height);
- }
- });
-
- dojo.declare("dojox.gfx.Text", gs.Text, {
- // summary: a text shape (Canvas)
- _renderShape: function(/* Object */ ctx){
- var s = this.shape;
- // nothing for the moment
- }
- });
- modifyMethod(g.Text, "setFont");
-
- var pathRenderers = {
- M: "_moveToA", m: "_moveToR",
- L: "_lineToA", l: "_lineToR",
- H: "_hLineToA", h: "_hLineToR",
- V: "_vLineToA", v: "_vLineToR",
- C: "_curveToA", c: "_curveToR",
- S: "_smoothCurveToA", s: "_smoothCurveToR",
- Q: "_qCurveToA", q: "_qCurveToR",
- T: "_qSmoothCurveToA", t: "_qSmoothCurveToR",
- A: "_arcTo", a: "_arcTo",
- Z: "_closePath", z: "_closePath"
- };
-
- dojo.declare("dojox.gfx.Path", g.path.Path, {
- // summary: a path shape (Canvas)
- constructor: function(){
- this.last = {};
- this.lastControl = {};
- },
- setShape: function(){
- this.canvasPath = [];
- return g.Path.superclass.setShape.apply(this, arguments);
- },
- _updateWithSegment: function(segment){
- var last = dojo.clone(this.last);
- this[pathRenderers[segment.action]](this.canvasPath, segment.action, segment.args);
- this.last = last;
- g.Path.superclass._updateWithSegment.apply(this, arguments);
- },
- _renderShape: function(/* Object */ ctx){
- var r = this.canvasPath;
- ctx.beginPath();
- for(var i = 0; i < r.length; i += 2){
- ctx[r[i]].apply(ctx, r[i + 1]);
- }
- },
- _moveToA: function(result, action, args){
- result.push("moveTo", [args[0], args[1]]);
- for(var i = 2; i < args.length; i += 2){
- result.push("lineTo", [args[i], args[i + 1]]);
- }
- this.last.x = args[args.length - 2];
- this.last.y = args[args.length - 1];
- this.lastControl = {};
- },
- _moveToR: function(result, action, args){
- if("x" in this.last){
- result.push("moveTo", [this.last.x += args[0], this.last.y += args[1]]);
- }else{
- result.push("moveTo", [this.last.x = args[0], this.last.y = args[1]]);
- }
- for(var i = 2; i < args.length; i += 2){
- result.push("lineTo", [this.last.x += args[i], this.last.y += args[i + 1]]);
- }
- this.lastControl = {};
- },
- _lineToA: function(result, action, args){
- for(var i = 0; i < args.length; i += 2){
- result.push("lineTo", [args[i], args[i + 1]]);
- }
- this.last.x = args[args.length - 2];
- this.last.y = args[args.length - 1];
- this.lastControl = {};
- },
- _lineToR: function(result, action, args){
- for(var i = 0; i < args.length; i += 2){
- result.push("lineTo", [this.last.x += args[i], this.last.y += args[i + 1]]);
- }
- this.lastControl = {};
- },
- _hLineToA: function(result, action, args){
- for(var i = 0; i < args.length; ++i){
- result.push("lineTo", [args[i], this.last.y]);
- }
- this.last.x = args[args.length - 1];
- this.lastControl = {};
- },
- _hLineToR: function(result, action, args){
- for(var i = 0; i < args.length; ++i){
- result.push("lineTo", [this.last.x += args[i], this.last.y]);
- }
- this.lastControl = {};
- },
- _vLineToA: function(result, action, args){
- for(var i = 0; i < args.length; ++i){
- result.push("lineTo", [this.last.x, args[i]]);
- }
- this.last.y = args[args.length - 1];
- this.lastControl = {};
- },
- _vLineToR: function(result, action, args){
- for(var i = 0; i < args.length; ++i){
- result.push("lineTo", [this.last.x, this.last.y += args[i]]);
- }
- this.lastControl = {};
- },
- _curveToA: function(result, action, args){
- for(var i = 0; i < args.length; i += 6){
- result.push("bezierCurveTo", args.slice(i, i + 6));
- }
- this.last.x = args[args.length - 2];
- this.last.y = args[args.length - 1];
- this.lastControl.x = args[args.length - 4];
- this.lastControl.y = args[args.length - 3];
- this.lastControl.type = "C";
- },
- _curveToR: function(result, action, args){
- for(var i = 0; i < args.length; i += 6){
- result.push("bezierCurveTo", [
- this.last.x + args[i],
- this.last.y + args[i + 1],
- this.lastControl.x = this.last.x + args[i + 2],
- this.lastControl.y = this.last.y + args[i + 3],
- this.last.x + args[i + 4],
- this.last.y + args[i + 5]
- ]);
- this.last.x += args[i + 4];
- this.last.y += args[i + 5];
- }
- this.lastControl.type = "C";
- },
- _smoothCurveToA: function(result, action, args){
- for(var i = 0; i < args.length; i += 4){
- var valid = this.lastControl.type == "C";
- result.push("bezierCurveTo", [
- valid ? 2 * this.last.x - this.lastControl.x : this.last.x,
- valid ? 2 * this.last.y - this.lastControl.y : this.last.y,
- args[i],
- args[i + 1],
- args[i + 2],
- args[i + 3]
- ]);
- this.lastControl.x = args[i];
- this.lastControl.y = args[i + 1];
- this.lastControl.type = "C";
- }
- this.last.x = args[args.length - 2];
- this.last.y = args[args.length - 1];
- },
- _smoothCurveToR: function(result, action, args){
- for(var i = 0; i < args.length; i += 4){
- var valid = this.lastControl.type == "C";
- result.push("bezierCurveTo", [
- valid ? 2 * this.last.x - this.lastControl.x : this.last.x,
- valid ? 2 * this.last.y - this.lastControl.y : this.last.y,
- this.last.x + args[i],
- this.last.y + args[i + 1],
- this.last.x + args[i + 2],
- this.last.y + args[i + 3]
- ]);
- this.lastControl.x = this.last.x + args[i];
- this.lastControl.y = this.last.y + args[i + 1];
- this.lastControl.type = "C";
- this.last.x += args[i + 2];
- this.last.y += args[i + 3];
- }
- },
- _qCurveToA: function(result, action, args){
- for(var i = 0; i < args.length; i += 4){
- result.push("quadraticCurveTo", args.slice(i, i + 4));
- }
- this.last.x = args[args.length - 2];
- this.last.y = args[args.length - 1];
- this.lastControl.x = args[args.length - 4];
- this.lastControl.y = args[args.length - 3];
- this.lastControl.type = "Q";
- },
- _qCurveToR: function(result, action, args){
- for(var i = 0; i < args.length; i += 4){
- result.push("quadraticCurveTo", [
- this.lastControl.x = this.last.x + args[i],
- this.lastControl.y = this.last.y + args[i + 1],
- this.last.x + args[i + 2],
- this.last.y + args[i + 3]
- ]);
- this.last.x += args[i + 2];
- this.last.y += args[i + 3];
- }
- this.lastControl.type = "Q";
- },
- _qSmoothCurveToA: function(result, action, args){
- for(var i = 0; i < args.length; i += 2){
- var valid = this.lastControl.type == "Q";
- result.push("quadraticCurveTo", [
- this.lastControl.x = valid ? 2 * this.last.x - this.lastControl.x : this.last.x,
- this.lastControl.y = valid ? 2 * this.last.y - this.lastControl.y : this.last.y,
- args[i],
- args[i + 1]
- ]);
- this.lastControl.type = "Q";
- }
- this.last.x = args[args.length - 2];
- this.last.y = args[args.length - 1];
- },
- _qSmoothCurveToR: function(result, action, args){
- for(var i = 0; i < args.length; i += 2){
- var valid = this.lastControl.type == "Q";
- result.push("quadraticCurveTo", [
- this.lastControl.x = valid ? 2 * this.last.x - this.lastControl.x : this.last.x,
- this.lastControl.y = valid ? 2 * this.last.y - this.lastControl.y : this.last.y,
- this.last.x + args[i],
- this.last.y + args[i + 1]
- ]);
- this.lastControl.type = "Q";
- this.last.x += args[i];
- this.last.y += args[i + 1];
- }
- },
- _arcTo: function(result, action, args){
- var relative = action == "a";
- for(var i = 0; i < args.length; i += 7){
- var x1 = args[i + 5], y1 = args[i + 6];
- if(relative){
- x1 += this.last.x;
- y1 += this.last.y;
- }
- var arcs = ga.arcAsBezier(
- this.last, args[i], args[i + 1], args[i + 2],
- args[i + 3] ? 1 : 0, args[i + 4] ? 1 : 0,
- x1, y1
- );
- dojo.forEach(arcs, function(p){
- result.push("bezierCurveTo", p);
- });
- this.last.x = x1;
- this.last.y = y1;
- }
- this.lastControl = {};
- },
- _closePath: function(result, action, args){
- result.push("closePath", []);
- this.lastControl = {};
- }
- });
- dojo.forEach(["moveTo", "lineTo", "hLineTo", "vLineTo", "curveTo",
- "smoothCurveTo", "qCurveTo", "qSmoothCurveTo", "arcTo", "closePath"],
- function(method){ modifyMethod(g.Path, method); }
- );
-
- dojo.declare("dojox.gfx.TextPath", g.path.TextPath, {
- // summary: a text shape (Canvas)
- _renderShape: function(/* Object */ ctx){
- var s = this.shape;
- // nothing for the moment
- }
- });
-
- dojo.declare("dojox.gfx.Surface", gs.Surface, {
- // summary: a surface object to be used for drawings (Canvas)
- constructor: function(){
- gs.Container._init.call(this);
- this.pendingImageCount = 0;
- this.makeDirty();
- },
- setDimensions: function(width, height){
- // summary: sets the width and height of the rawNode
- // width: String: width of surface, e.g., "100px"
- // height: String: height of surface, e.g., "100px"
- this.width = g.normalizedLength(width); // in pixels
- this.height = g.normalizedLength(height); // in pixels
- if(!this.rawNode) return this;
- this.rawNode.width = width;
- this.rawNode.height = height;
- this.makeDirty();
- return this; // self
- },
- getDimensions: function(){
- // summary: returns an object with properties "width" and "height"
- return this.rawNode ? {width: this.rawNode.width, height: this.rawNode.height} : null; // Object
- },
- render: function(){
- // summary: render the all shapes
- if(this.pendingImageCount){ return; }
- var ctx = this.rawNode.getContext("2d");
- ctx.save();
- ctx.clearRect(0, 0, this.rawNode.width, this.rawNode.height);
- for(var i = 0; i < this.children.length; ++i){
- this.children[i].render(ctx);
- }
- ctx.restore();
- if("pendingRender" in this){
- clearTimeout(this.pendingRender);
- delete this.pendingRender;
- }
- },
- makeDirty: function(){
- // summary: internal method, which is called when we may need to redraw
- if(!this.pendingImagesCount && !("pendingRender" in this)){
- this.pendingRender = setTimeout(dojo.hitch(this, this.render), 0);
- }
- },
- downloadImage: function(img, url){
- // summary:
- // internal method, which starts an image download and renders, when it is ready
- // img: Image:
- // the image object
- // url: String:
- // the url of the image
- var handler = dojo.hitch(this, this.onImageLoad);
- if(!this.pendingImageCount++ && "pendingRender" in this){
- clearTimeout(this.pendingRender);
- delete this.pendingRender;
- }
- img.onload = handler;
- img.onerror = handler;
- img.onabort = handler;
- img.src = url;
- },
- onImageLoad: function(){
- if(!--this.pendingImageCount){ this.render(); }
- },
-
- // events are not implemented
- getEventSource: function(){ return null; },
- connect: function(){},
- disconnect: function(){}
- });
-
- g.createSurface = function(parentNode, width, height){
- // summary: creates a surface (Canvas)
- // parentNode: Node: a parent node
- // width: String: width of surface, e.g., "100px"
- // height: String: height of surface, e.g., "100px"
-
- if(!width){ width = "100%"; }
- if(!height){ height = "100%"; }
- var s = new g.Surface(),
- p = dojo.byId(parentNode),
- c = p.ownerDocument.createElement("canvas");
- c.width = width;
- c.height = height;
- p.appendChild(c);
- s.rawNode = c;
- s.surface = s;
- return s; // dojox.gfx.Surface
- };
-
- // Extenders
-
- var C = gs.Container, Container = {
- add: function(shape){
- this.surface.makeDirty();
- return C.add.apply(this, arguments);
- },
- remove: function(shape, silently){
- this.surface.makeDirty();
- return C.remove.apply(this, arguments);
- },
- clear: function(){
- this.surface.makeDirty();
- return C.clear.apply(this, arguments);
- },
- _moveChildToFront: function(shape){
- this.surface.makeDirty();
- return C._moveChildToFront.apply(this, arguments);
- },
- _moveChildToBack: function(shape){
- this.surface.makeDirty();
- return C._moveChildToBack.apply(this, arguments);
- }
- };
-
- dojo.mixin(gs.Creator, {
- // summary: Canvas shape creators
- createObject: function(shapeType, rawShape) {
- // summary: creates an instance of the passed shapeType class
- // shapeType: Function: a class constructor to create an instance of
- // rawShape: Object: properties to be passed in to the classes "setShape" method
- // overrideSize: Boolean: set the size explicitly, if true
- var shape = new shapeType();
- shape.surface = this.surface;
- shape.setShape(rawShape);
- this.add(shape);
- return shape; // dojox.gfx.Shape
- }
- });
-
- dojo.extend(g.Group, Container);
- dojo.extend(g.Group, gs.Creator);
-
- dojo.extend(g.Surface, Container);
- dojo.extend(g.Surface, gs.Creator);
+var u=ga.curvePI4;
+_11.push(u.s,u.c1,u.c2,u.e);
+for(var a=45;a<360;a+=45){
+var r=m.rotateg(a);
+_11.push(mp(r,u.c1),mp(r,u.c2),mp(r,u.e));
+}
})();
-
+dojo.declare("dojox.gfx.Ellipse",gs.Ellipse,{setShape:function(){
+g.Ellipse.superclass.setShape.apply(this,arguments);
+var s=this.shape,t,c1,c2,r=[],M=m.normalize([m.translate(s.cx,s.cy),m.scale(s.rx,s.ry)]);
+t=mp(M,_11[0]);
+r.push([t.x,t.y]);
+for(var i=1;i<_11.length;i+=3){
+c1=mp(M,_11[i]);
+c2=mp(M,_11[i+1]);
+t=mp(M,_11[i+2]);
+r.push([c1.x,c1.y,c2.x,c2.y,t.x,t.y]);
+}
+this.canvasEllipse=r;
+return this;
+},_renderShape:function(ctx){
+var r=this.canvasEllipse;
+ctx.beginPath();
+ctx.moveTo.apply(ctx,r[0]);
+for(var i=1;i<r.length;++i){
+ctx.bezierCurveTo.apply(ctx,r[i]);
+}
+ctx.closePath();
+}});
+dojo.declare("dojox.gfx.Circle",gs.Circle,{_renderShape:function(ctx){
+var s=this.shape;
+ctx.beginPath();
+ctx.arc(s.cx,s.cy,s.r,0,_1,1);
+}});
+dojo.declare("dojox.gfx.Line",gs.Line,{_renderShape:function(ctx){
+var s=this.shape;
+ctx.beginPath();
+ctx.moveTo(s.x1,s.y1);
+ctx.lineTo(s.x2,s.y2);
+}});
+dojo.declare("dojox.gfx.Polyline",gs.Polyline,{setShape:function(){
+g.Polyline.superclass.setShape.apply(this,arguments);
+var p=this.shape.points,f=p[0],r=[],c,i;
+if(p.length){
+if(typeof f=="number"){
+r.push(f,p[1]);
+i=2;
+}else{
+r.push(f.x,f.y);
+i=1;
+}
+for(;i<p.length;++i){
+c=p[i];
+if(typeof c=="number"){
+r.push(c,p[++i]);
+}else{
+r.push(c.x,c.y);
+}
+}
+}
+this.canvasPolyline=r;
+return this;
+},_renderShape:function(ctx){
+var p=this.canvasPolyline;
+if(p.length){
+ctx.beginPath();
+ctx.moveTo(p[0],p[1]);
+for(var i=2;i<p.length;i+=2){
+ctx.lineTo(p[i],p[i+1]);
+}
+}
+}});
+dojo.declare("dojox.gfx.Image",gs.Image,{setShape:function(){
+g.Image.superclass.setShape.apply(this,arguments);
+var img=new Image();
+this.surface.downloadImage(img,this.shape.src);
+this.canvasImage=img;
+return this;
+},_renderShape:function(ctx){
+var s=this.shape;
+ctx.drawImage(this.canvasImage,s.x,s.y,s.width,s.height);
+}});
+dojo.declare("dojox.gfx.Text",gs.Text,{_renderShape:function(ctx){
+var s=this.shape;
+}});
+_a(g.Text,"setFont");
+var _12={M:"_moveToA",m:"_moveToR",L:"_lineToA",l:"_lineToR",H:"_hLineToA",h:"_hLineToR",V:"_vLineToA",v:"_vLineToR",C:"_curveToA",c:"_curveToR",S:"_smoothCurveToA",s:"_smoothCurveToR",Q:"_qCurveToA",q:"_qCurveToR",T:"_qSmoothCurveToA",t:"_qSmoothCurveToR",A:"_arcTo",a:"_arcTo",Z:"_closePath",z:"_closePath"};
+dojo.declare("dojox.gfx.Path",g.path.Path,{constructor:function(){
+this.lastControl={};
+},setShape:function(){
+this.canvasPath=[];
+return g.Path.superclass.setShape.apply(this,arguments);
+},_updateWithSegment:function(_13){
+var _14=d.clone(this.last);
+this[_12[_13.action]](this.canvasPath,_13.action,_13.args);
+this.last=_14;
+g.Path.superclass._updateWithSegment.apply(this,arguments);
+},_renderShape:function(ctx){
+var r=this.canvasPath;
+ctx.beginPath();
+for(var i=0;i<r.length;i+=2){
+ctx[r[i]].apply(ctx,r[i+1]);
+}
+},_moveToA:function(_15,_16,_17){
+_15.push("moveTo",[_17[0],_17[1]]);
+for(var i=2;i<_17.length;i+=2){
+_15.push("lineTo",[_17[i],_17[i+1]]);
+}
+this.last.x=_17[_17.length-2];
+this.last.y=_17[_17.length-1];
+this.lastControl={};
+},_moveToR:function(_18,_19,_1a){
+if("x" in this.last){
+_18.push("moveTo",[this.last.x+=_1a[0],this.last.y+=_1a[1]]);
+}else{
+_18.push("moveTo",[this.last.x=_1a[0],this.last.y=_1a[1]]);
+}
+for(var i=2;i<_1a.length;i+=2){
+_18.push("lineTo",[this.last.x+=_1a[i],this.last.y+=_1a[i+1]]);
+}
+this.lastControl={};
+},_lineToA:function(_1b,_1c,_1d){
+for(var i=0;i<_1d.length;i+=2){
+_1b.push("lineTo",[_1d[i],_1d[i+1]]);
+}
+this.last.x=_1d[_1d.length-2];
+this.last.y=_1d[_1d.length-1];
+this.lastControl={};
+},_lineToR:function(_1e,_1f,_20){
+for(var i=0;i<_20.length;i+=2){
+_1e.push("lineTo",[this.last.x+=_20[i],this.last.y+=_20[i+1]]);
+}
+this.lastControl={};
+},_hLineToA:function(_21,_22,_23){
+for(var i=0;i<_23.length;++i){
+_21.push("lineTo",[_23[i],this.last.y]);
+}
+this.last.x=_23[_23.length-1];
+this.lastControl={};
+},_hLineToR:function(_24,_25,_26){
+for(var i=0;i<_26.length;++i){
+_24.push("lineTo",[this.last.x+=_26[i],this.last.y]);
+}
+this.lastControl={};
+},_vLineToA:function(_27,_28,_29){
+for(var i=0;i<_29.length;++i){
+_27.push("lineTo",[this.last.x,_29[i]]);
+}
+this.last.y=_29[_29.length-1];
+this.lastControl={};
+},_vLineToR:function(_2a,_2b,_2c){
+for(var i=0;i<_2c.length;++i){
+_2a.push("lineTo",[this.last.x,this.last.y+=_2c[i]]);
+}
+this.lastControl={};
+},_curveToA:function(_2d,_2e,_2f){
+for(var i=0;i<_2f.length;i+=6){
+_2d.push("bezierCurveTo",_2f.slice(i,i+6));
+}
+this.last.x=_2f[_2f.length-2];
+this.last.y=_2f[_2f.length-1];
+this.lastControl.x=_2f[_2f.length-4];
+this.lastControl.y=_2f[_2f.length-3];
+this.lastControl.type="C";
+},_curveToR:function(_30,_31,_32){
+for(var i=0;i<_32.length;i+=6){
+_30.push("bezierCurveTo",[this.last.x+_32[i],this.last.y+_32[i+1],this.lastControl.x=this.last.x+_32[i+2],this.lastControl.y=this.last.y+_32[i+3],this.last.x+_32[i+4],this.last.y+_32[i+5]]);
+this.last.x+=_32[i+4];
+this.last.y+=_32[i+5];
+}
+this.lastControl.type="C";
+},_smoothCurveToA:function(_33,_34,_35){
+for(var i=0;i<_35.length;i+=4){
+var _36=this.lastControl.type=="C";
+_33.push("bezierCurveTo",[_36?2*this.last.x-this.lastControl.x:this.last.x,_36?2*this.last.y-this.lastControl.y:this.last.y,_35[i],_35[i+1],_35[i+2],_35[i+3]]);
+this.lastControl.x=_35[i];
+this.lastControl.y=_35[i+1];
+this.lastControl.type="C";
}
+this.last.x=_35[_35.length-2];
+this.last.y=_35[_35.length-1];
+},_smoothCurveToR:function(_37,_38,_39){
+for(var i=0;i<_39.length;i+=4){
+var _3a=this.lastControl.type=="C";
+_37.push("bezierCurveTo",[_3a?2*this.last.x-this.lastControl.x:this.last.x,_3a?2*this.last.y-this.lastControl.y:this.last.y,this.last.x+_39[i],this.last.y+_39[i+1],this.last.x+_39[i+2],this.last.y+_39[i+3]]);
+this.lastControl.x=this.last.x+_39[i];
+this.lastControl.y=this.last.y+_39[i+1];
+this.lastControl.type="C";
+this.last.x+=_39[i+2];
+this.last.y+=_39[i+3];
+}
+},_qCurveToA:function(_3b,_3c,_3d){
+for(var i=0;i<_3d.length;i+=4){
+_3b.push("quadraticCurveTo",_3d.slice(i,i+4));
+}
+this.last.x=_3d[_3d.length-2];
+this.last.y=_3d[_3d.length-1];
+this.lastControl.x=_3d[_3d.length-4];
+this.lastControl.y=_3d[_3d.length-3];
+this.lastControl.type="Q";
+},_qCurveToR:function(_3e,_3f,_40){
+for(var i=0;i<_40.length;i+=4){
+_3e.push("quadraticCurveTo",[this.lastControl.x=this.last.x+_40[i],this.lastControl.y=this.last.y+_40[i+1],this.last.x+_40[i+2],this.last.y+_40[i+3]]);
+this.last.x+=_40[i+2];
+this.last.y+=_40[i+3];
+}
+this.lastControl.type="Q";
+},_qSmoothCurveToA:function(_41,_42,_43){
+for(var i=0;i<_43.length;i+=2){
+var _44=this.lastControl.type=="Q";
+_41.push("quadraticCurveTo",[this.lastControl.x=_44?2*this.last.x-this.lastControl.x:this.last.x,this.lastControl.y=_44?2*this.last.y-this.lastControl.y:this.last.y,_43[i],_43[i+1]]);
+this.lastControl.type="Q";
+}
+this.last.x=_43[_43.length-2];
+this.last.y=_43[_43.length-1];
+},_qSmoothCurveToR:function(_45,_46,_47){
+for(var i=0;i<_47.length;i+=2){
+var _48=this.lastControl.type=="Q";
+_45.push("quadraticCurveTo",[this.lastControl.x=_48?2*this.last.x-this.lastControl.x:this.last.x,this.lastControl.y=_48?2*this.last.y-this.lastControl.y:this.last.y,this.last.x+_47[i],this.last.y+_47[i+1]]);
+this.lastControl.type="Q";
+this.last.x+=_47[i];
+this.last.y+=_47[i+1];
+}
+},_arcTo:function(_49,_4a,_4b){
+var _4c=_4a=="a";
+for(var i=0;i<_4b.length;i+=7){
+var x1=_4b[i+5],y1=_4b[i+6];
+if(_4c){
+x1+=this.last.x;
+y1+=this.last.y;
+}
+var _4d=ga.arcAsBezier(this.last,_4b[i],_4b[i+1],_4b[i+2],_4b[i+3]?1:0,_4b[i+4]?1:0,x1,y1);
+d.forEach(_4d,function(p){
+_49.push("bezierCurveTo",p);
+});
+this.last.x=x1;
+this.last.y=y1;
+}
+this.lastControl={};
+},_closePath:function(_4e,_4f,_50){
+_4e.push("closePath",[]);
+this.lastControl={};
+}});
+d.forEach(["moveTo","lineTo","hLineTo","vLineTo","curveTo","smoothCurveTo","qCurveTo","qSmoothCurveTo","arcTo","closePath"],function(_51){
+_a(g.Path,_51);
+});
+dojo.declare("dojox.gfx.TextPath",g.path.TextPath,{_renderShape:function(ctx){
+var s=this.shape;
+}});
+dojo.declare("dojox.gfx.Surface",gs.Surface,{constructor:function(){
+gs.Container._init.call(this);
+this.pendingImageCount=0;
+this.makeDirty();
+},setDimensions:function(_52,_53){
+this.width=g.normalizedLength(_52);
+this.height=g.normalizedLength(_53);
+if(!this.rawNode){
+return this;
+}
+this.rawNode.width=_52;
+this.rawNode.height=_53;
+this.makeDirty();
+return this;
+},getDimensions:function(){
+return this.rawNode?{width:this.rawNode.width,height:this.rawNode.height}:null;
+},_render:function(){
+if(this.pendingImageCount){
+return;
+}
+var ctx=this.rawNode.getContext("2d");
+ctx.save();
+ctx.clearRect(0,0,this.rawNode.width,this.rawNode.height);
+for(var i=0;i<this.children.length;++i){
+this.children[i]._render(ctx);
+}
+ctx.restore();
+if("pendingRender" in this){
+clearTimeout(this.pendingRender);
+delete this.pendingRender;
+}
+},makeDirty:function(){
+if(!this.pendingImagesCount&&!("pendingRender" in this)){
+this.pendingRender=setTimeout(d.hitch(this,this._render),0);
+}
+},downloadImage:function(img,url){
+var _54=d.hitch(this,this.onImageLoad);
+if(!this.pendingImageCount++&&"pendingRender" in this){
+clearTimeout(this.pendingRender);
+delete this.pendingRender;
+}
+img.onload=_54;
+img.onerror=_54;
+img.onabort=_54;
+img.src=url;
+},onImageLoad:function(){
+if(!--this.pendingImageCount){
+this._render();
+}
+},getEventSource:function(){
+return null;
+},connect:function(){
+},disconnect:function(){
+}});
+g.createSurface=function(_55,_56,_57){
+if(!_56&&!_57){
+var pos=d.position(_55);
+_56=_56||pos.w;
+_57=_57||pos.h;
+}
+if(typeof _56=="number"){
+_56=_56+"px";
+}
+if(typeof _57=="number"){
+_57=_57+"px";
+}
+var s=new g.Surface(),p=d.byId(_55),c=p.ownerDocument.createElement("canvas");
+c.width=dojox.gfx.normalizedLength(_56);
+c.height=dojox.gfx.normalizedLength(_57);
+p.appendChild(c);
+s.rawNode=c;
+s._parent=p;
+s.surface=s;
+return s;
+};
+var C=gs.Container,_58={add:function(_59){
+this.surface.makeDirty();
+return C.add.apply(this,arguments);
+},remove:function(_5a,_5b){
+this.surface.makeDirty();
+return C.remove.apply(this,arguments);
+},clear:function(){
+this.surface.makeDirty();
+return C.clear.apply(this,arguments);
+},_moveChildToFront:function(_5c){
+this.surface.makeDirty();
+return C._moveChildToFront.apply(this,arguments);
+},_moveChildToBack:function(_5d){
+this.surface.makeDirty();
+return C._moveChildToBack.apply(this,arguments);
+}};
+d.mixin(gs.Creator,{createObject:function(_5e,_5f){
+var _60=new _5e();
+_60.surface=this.surface;
+_60.setShape(_5f);
+this.add(_60);
+return _60;
+}});
+d.extend(g.Group,_58);
+d.extend(g.Group,gs.Creator);
+d.extend(g.Surface,_58);
+d.extend(g.Surface,gs.Creator);
+})();
+}
diff --git a/js/dojo/dojox/gfx/canvas_attach.js b/js/dojo/dojox/gfx/canvas_attach.js
--- a/js/dojo/dojox/gfx/canvas_attach.js
+++ b/js/dojo/dojox/gfx/canvas_attach.js
@@ -1,8 +1,12 @@
-dojo.require("dojox.gfx.canvas");
-
-dojo.experimental("dojox.gfx.canvas_attach");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-// not implemented
-dojox.gfx.attachNode = function(){
- return null; // for now
+
+dojo.require("dojox.gfx.canvas");
+dojo.experimental("dojox.gfx.canvas_attach");
+dojox.gfx.attachNode=function(){
+return null;
};
diff --git a/js/dojo/dojox/gfx/decompose.js b/js/dojo/dojox/gfx/decompose.js
--- a/js/dojo/dojox/gfx/decompose.js
+++ b/js/dojo/dojox/gfx/decompose.js
@@ -1,139 +1,106 @@
-if(!dojo._hasResource["dojox.gfx.decompose"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.gfx.decompose"] = true;
-dojo.provide("dojox.gfx.decompose");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.require("dojox.gfx.matrix");
-
-(function(){
- var m = dojox.gfx.matrix;
- var eq = function(/* Number */ a, /* Number */ b){
- // summary: compare two FP numbers for equality
- return Math.abs(a - b) <= 1e-6 * (Math.abs(a) + Math.abs(b)); // Boolean
- };
-
- var calcFromValues = function(/* Number */ r1, /* Number */ m1, /* Number */ r2, /* Number */ m2){
- // summary: uses two close FP ration and their original magnitudes to approximate the result
- if(!isFinite(r1)){
- return r2; // Number
- }else if(!isFinite(r2)){
- return r1; // Number
- }
- m1 = Math.abs(m1), m2 = Math.abs(m2);
- return (m1 * r1 + m2 * r2) / (m1 + m2); // Number
- };
-
- var transpose = function(/* dojox.gfx.matrix.Matrix2D */ matrix){
- // matrix: dojox.gfx.matrix.Matrix2D: a 2D matrix-like object
- var M = new m.Matrix2D(matrix);
- return dojo.mixin(M, {dx: 0, dy: 0, xy: M.yx, yx: M.xy}); // dojox.gfx.matrix.Matrix2D
- };
-
- var scaleSign = function(/* dojox.gfx.matrix.Matrix2D */ matrix){
- return (matrix.xx * matrix.yy < 0 || matrix.xy * matrix.yx > 0) ? -1 : 1; // Number
- };
-
- var eigenvalueDecomposition = function(/* dojox.gfx.matrix.Matrix2D */ matrix){
- // matrix: dojox.gfx.matrix.Matrix2D: a 2D matrix-like object
- var M = m.normalize(matrix),
- b = -M.xx - M.yy,
- c = M.xx * M.yy - M.xy * M.yx,
- d = Math.sqrt(b * b - 4 * c),
- l1 = -(b + (b < 0 ? -d : d)) / 2,
- l2 = c / l1,
- vx1 = M.xy / (l1 - M.xx), vy1 = 1,
- vx2 = M.xy / (l2 - M.xx), vy2 = 1;
- if(eq(l1, l2)){
- vx1 = 1, vy1 = 0, vx2 = 0, vy2 = 1;
- }
- if(!isFinite(vx1)){
- vx1 = 1, vy1 = (l1 - M.xx) / M.xy;
- if(!isFinite(vy1)){
- vx1 = (l1 - M.yy) / M.yx, vy1 = 1;
- if(!isFinite(vx1)){
- vx1 = 1, vy1 = M.yx / (l1 - M.yy);
- }
- }
- }
- if(!isFinite(vx2)){
- vx2 = 1, vy2 = (l2 - M.xx) / M.xy;
- if(!isFinite(vy2)){
- vx2 = (l2 - M.yy) / M.yx, vy2 = 1;
- if(!isFinite(vx2)){
- vx2 = 1, vy2 = M.yx / (l2 - M.yy);
- }
- }
- }
- var d1 = Math.sqrt(vx1 * vx1 + vy1 * vy1),
- d2 = Math.sqrt(vx2 * vx2 + vy2 * vy2);
- if(!isFinite(vx1 /= d1)){ vx1 = 0; }
- if(!isFinite(vy1 /= d1)){ vy1 = 0; }
- if(!isFinite(vx2 /= d2)){ vx2 = 0; }
- if(!isFinite(vy2 /= d2)){ vy2 = 0; }
- return { // Object
- value1: l1,
- value2: l2,
- vector1: {x: vx1, y: vy1},
- vector2: {x: vx2, y: vy2}
- };
- };
-
- var decomposeSR = function(/* dojox.gfx.matrix.Matrix2D */ M, /* Object */ result){
- // summary: decomposes a matrix into [scale, rotate]; no checks are done.
- var sign = scaleSign(M),
- a = result.angle1 = (Math.atan2(M.yx, M.yy) + Math.atan2(-sign * M.xy, sign * M.xx)) / 2,
- cos = Math.cos(a), sin = Math.sin(a);
- result.sx = calcFromValues(M.xx / cos, cos, -M.xy / sin, sin);
- result.sy = calcFromValues(M.yy / cos, cos, M.yx / sin, sin);
- return result; // Object
- };
-
- var decomposeRS = function(/* dojox.gfx.matrix.Matrix2D */ M, /* Object */ result){
- // summary: decomposes a matrix into [rotate, scale]; no checks are done
- var sign = scaleSign(M),
- a = result.angle2 = (Math.atan2(sign * M.yx, sign * M.xx) + Math.atan2(-M.xy, M.yy)) / 2,
- cos = Math.cos(a), sin = Math.sin(a);
- result.sx = calcFromValues(M.xx / cos, cos, M.yx / sin, sin);
- result.sy = calcFromValues(M.yy / cos, cos, -M.xy / sin, sin);
- return result; // Object
- };
-
- dojox.gfx.decompose = function(matrix){
- // summary: decompose a 2D matrix into translation, scaling, and rotation components
- // description: this function decompose a matrix into four logical components:
- // translation, rotation, scaling, and one more rotation using SVD.
- // The components should be applied in following order:
- // | [translate, rotate(angle2), scale, rotate(angle1)]
- // matrix: dojox.gfx.matrix.Matrix2D: a 2D matrix-like object
- var M = m.normalize(matrix),
- result = {dx: M.dx, dy: M.dy, sx: 1, sy: 1, angle1: 0, angle2: 0};
- // detect case: [scale]
- if(eq(M.xy, 0) && eq(M.yx, 0)){
- return dojo.mixin(result, {sx: M.xx, sy: M.yy}); // Object
- }
- // detect case: [scale, rotate]
- if(eq(M.xx * M.yx, -M.xy * M.yy)){
- return decomposeSR(M, result); // Object
- }
- // detect case: [rotate, scale]
- if(eq(M.xx * M.xy, -M.yx * M.yy)){
- return decomposeRS(M, result); // Object
- }
- // do SVD
- var MT = transpose(M),
- u = eigenvalueDecomposition([M, MT]),
- v = eigenvalueDecomposition([MT, M]),
- U = new m.Matrix2D({xx: u.vector1.x, xy: u.vector2.x, yx: u.vector1.y, yy: u.vector2.y}),
- VT = new m.Matrix2D({xx: v.vector1.x, xy: v.vector1.y, yx: v.vector2.x, yy: v.vector2.y}),
- S = new m.Matrix2D([m.invert(U), M, m.invert(VT)]);
- decomposeSR(VT, result);
- S.xx *= result.sx;
- S.yy *= result.sy;
- decomposeRS(U, result);
- S.xx *= result.sx;
- S.yy *= result.sy;
- return dojo.mixin(result, {sx: S.xx, sy: S.yy}); // Object
- };
+if(!dojo._hasResource["dojox.gfx.decompose"]){
+dojo._hasResource["dojox.gfx.decompose"]=true;
+dojo.provide("dojox.gfx.decompose");
+dojo.require("dojox.gfx.matrix");
+(function(){
+var m=dojox.gfx.matrix;
+var eq=function(a,b){
+return Math.abs(a-b)<=0.000001*(Math.abs(a)+Math.abs(b));
+};
+var _1=function(r1,m1,r2,m2){
+if(!isFinite(r1)){
+return r2;
+}else{
+if(!isFinite(r2)){
+return r1;
+}
+}
+m1=Math.abs(m1),m2=Math.abs(m2);
+return (m1*r1+m2*r2)/(m1+m2);
+};
+var _2=function(_3){
+var M=new m.Matrix2D(_3);
+return dojo.mixin(M,{dx:0,dy:0,xy:M.yx,yx:M.xy});
+};
+var _4=function(_5){
+return (_5.xx*_5.yy<0||_5.xy*_5.yx>0)?-1:1;
+};
+var _6=function(_7){
+var M=m.normalize(_7),b=-M.xx-M.yy,c=M.xx*M.yy-M.xy*M.yx,d=Math.sqrt(b*b-4*c),l1=-(b+(b<0?-d:d))/2,l2=c/l1,_8=M.xy/(l1-M.xx),_9=1,_a=M.xy/(l2-M.xx),_b=1;
+if(eq(l1,l2)){
+_8=1,_9=0,_a=0,_b=1;
+}
+if(!isFinite(_8)){
+_8=1,_9=(l1-M.xx)/M.xy;
+if(!isFinite(_9)){
+_8=(l1-M.yy)/M.yx,_9=1;
+if(!isFinite(_8)){
+_8=1,_9=M.yx/(l1-M.yy);
+}
+}
+}
+if(!isFinite(_a)){
+_a=1,_b=(l2-M.xx)/M.xy;
+if(!isFinite(_b)){
+_a=(l2-M.yy)/M.yx,_b=1;
+if(!isFinite(_a)){
+_a=1,_b=M.yx/(l2-M.yy);
+}
+}
+}
+var d1=Math.sqrt(_8*_8+_9*_9),d2=Math.sqrt(_a*_a+_b*_b);
+if(!isFinite(_8/=d1)){
+_8=0;
+}
+if(!isFinite(_9/=d1)){
+_9=0;
+}
+if(!isFinite(_a/=d2)){
+_a=0;
+}
+if(!isFinite(_b/=d2)){
+_b=0;
+}
+return {value1:l1,value2:l2,vector1:{x:_8,y:_9},vector2:{x:_a,y:_b}};
+};
+var _c=function(M,_d){
+var _e=_4(M),a=_d.angle1=(Math.atan2(M.yx,M.yy)+Math.atan2(-_e*M.xy,_e*M.xx))/2,_f=Math.cos(a),sin=Math.sin(a);
+_d.sx=_1(M.xx/_f,_f,-M.xy/sin,sin);
+_d.sy=_1(M.yy/_f,_f,M.yx/sin,sin);
+return _d;
+};
+var _10=function(M,_11){
+var _12=_4(M),a=_11.angle2=(Math.atan2(_12*M.yx,_12*M.xx)+Math.atan2(-M.xy,M.yy))/2,cos=Math.cos(a),sin=Math.sin(a);
+_11.sx=_1(M.xx/cos,cos,M.yx/sin,sin);
+_11.sy=_1(M.yy/cos,cos,-M.xy/sin,sin);
+return _11;
+};
+dojox.gfx.decompose=function(_13){
+var M=m.normalize(_13),_14={dx:M.dx,dy:M.dy,sx:1,sy:1,angle1:0,angle2:0};
+if(eq(M.xy,0)&&eq(M.yx,0)){
+return dojo.mixin(_14,{sx:M.xx,sy:M.yy});
+}
+if(eq(M.xx*M.yx,-M.xy*M.yy)){
+return _c(M,_14);
+}
+if(eq(M.xx*M.xy,-M.yx*M.yy)){
+return _10(M,_14);
+}
+var MT=_2(M),u=_6([M,MT]),v=_6([MT,M]),U=new m.Matrix2D({xx:u.vector1.x,xy:u.vector2.x,yx:u.vector1.y,yy:u.vector2.y}),VT=new m.Matrix2D({xx:v.vector1.x,xy:v.vector1.y,yx:v.vector2.x,yy:v.vector2.y}),S=new m.Matrix2D([m.invert(U),M,m.invert(VT)]);
+_c(VT,_14);
+S.xx*=_14.sx;
+S.yy*=_14.sy;
+_10(U,_14);
+S.xx*=_14.sx;
+S.yy*=_14.sy;
+return dojo.mixin(_14,{sx:S.xx,sy:S.yy});
+};
})();
-
}
diff --git a/js/dojo/dojox/gfx/matrix.js b/js/dojo/dojox/gfx/matrix.js
--- a/js/dojo/dojox/gfx/matrix.js
+++ b/js/dojo/dojox/gfx/matrix.js
@@ -1,444 +1,168 @@
-if(!dojo._hasResource["dojox.gfx.matrix"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.gfx.matrix"] = true;
-dojo.provide("dojox.gfx.matrix");
-
-(function(){
- var m = dojox.gfx.matrix;
-
- // candidates for dojox.math:
- m._degToRad = function(degree){ return Math.PI * degree / 180; };
- m._radToDeg = function(radian){ return radian / Math.PI * 180; };
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- m.Matrix2D = function(arg){
- // summary: a 2D matrix object
- // description: Normalizes a 2D matrix-like object. If arrays is passed,
- // all objects of the array are normalized and multiplied sequentially.
- // arg: Object
- // a 2D matrix-like object, a number, or an array of such objects
- if(arg){
- if(typeof arg == "number"){
- this.xx = this.yy = arg;
- }else if(arg instanceof Array){
- if(arg.length > 0){
- var matrix = m.normalize(arg[0]);
- // combine matrices
- for(var i = 1; i < arg.length; ++i){
- var l = matrix, r = dojox.gfx.matrix.normalize(arg[i]);
- matrix = new m.Matrix2D();
- matrix.xx = l.xx * r.xx + l.xy * r.yx;
- matrix.xy = l.xx * r.xy + l.xy * r.yy;
- matrix.yx = l.yx * r.xx + l.yy * r.yx;
- matrix.yy = l.yx * r.xy + l.yy * r.yy;
- matrix.dx = l.xx * r.dx + l.xy * r.dy + l.dx;
- matrix.dy = l.yx * r.dx + l.yy * r.dy + l.dy;
- }
- dojo.mixin(this, matrix);
- }
- }else{
- dojo.mixin(this, arg);
- }
- }
- };
-
- // the default (identity) matrix, which is used to fill in missing values
- dojo.extend(m.Matrix2D, {xx: 1, xy: 0, yx: 0, yy: 1, dx: 0, dy: 0});
- dojo.mixin(m, {
- // summary: class constants, and methods of dojox.gfx.matrix
-
- // matrix constants
-
- // identity: dojox.gfx.matrix.Matrix2D
- // an identity matrix constant: identity * (x, y) == (x, y)
- identity: new m.Matrix2D(),
-
- // flipX: dojox.gfx.matrix.Matrix2D
- // a matrix, which reflects points at x = 0 line: flipX * (x, y) == (-x, y)
- flipX: new m.Matrix2D({xx: -1}),
-
- // flipY: dojox.gfx.matrix.Matrix2D
- // a matrix, which reflects points at y = 0 line: flipY * (x, y) == (x, -y)
- flipY: new m.Matrix2D({yy: -1}),
-
- // flipXY: dojox.gfx.matrix.Matrix2D
- // a matrix, which reflects points at the origin of coordinates: flipXY * (x, y) == (-x, -y)
- flipXY: new m.Matrix2D({xx: -1, yy: -1}),
-
- // matrix creators
-
- translate: function(a, b){
- // summary: forms a translation matrix
- // description: The resulting matrix is used to translate (move) points by specified offsets.
- // a: Number: an x coordinate value
- // b: Number: a y coordinate value
- if(arguments.length > 1){
- return new m.Matrix2D({dx: a, dy: b}); // dojox.gfx.matrix.Matrix2D
- }
- // branch
- // a: dojox.gfx.Point: a point-like object, which specifies offsets for both dimensions
- // b: null
- return new m.Matrix2D({dx: a.x, dy: a.y}); // dojox.gfx.matrix.Matrix2D
- },
- scale: function(a, b){
- // summary: forms a scaling matrix
- // description: The resulting matrix is used to scale (magnify) points by specified offsets.
- // a: Number: a scaling factor used for the x coordinate
- // b: Number: a scaling factor used for the y coordinate
- if(arguments.length > 1){
- return new m.Matrix2D({xx: a, yy: b}); // dojox.gfx.matrix.Matrix2D
- }
- if(typeof a == "number"){
- // branch
- // a: Number: a uniform scaling factor used for the both coordinates
- // b: null
- return new m.Matrix2D({xx: a, yy: a}); // dojox.gfx.matrix.Matrix2D
- }
- // branch
- // a: dojox.gfx.Point: a point-like object, which specifies scale factors for both dimensions
- // b: null
- return new m.Matrix2D({xx: a.x, yy: a.y}); // dojox.gfx.matrix.Matrix2D
- },
- rotate: function(angle){
- // summary: forms a rotating matrix
- // description: The resulting matrix is used to rotate points
- // around the origin of coordinates (0, 0) by specified angle.
- // angle: Number: an angle of rotation in radians (>0 for CW)
- var c = Math.cos(angle);
- var s = Math.sin(angle);
- return new m.Matrix2D({xx: c, xy: -s, yx: s, yy: c}); // dojox.gfx.matrix.Matrix2D
- },
- rotateg: function(degree){
- // summary: forms a rotating matrix
- // description: The resulting matrix is used to rotate points
- // around the origin of coordinates (0, 0) by specified degree.
- // See dojox.gfx.matrix.rotate() for comparison.
- // degree: Number: an angle of rotation in degrees (>0 for CW)
- return m.rotate(m._degToRad(degree)); // dojox.gfx.matrix.Matrix2D
- },
- skewX: function(angle) {
- // summary: forms an x skewing matrix
- // description: The resulting matrix is used to skew points in the x dimension
- // around the origin of coordinates (0, 0) by specified angle.
- // angle: Number: an skewing angle in radians
- return new m.Matrix2D({xy: -Math.tan(angle)}); // dojox.gfx.matrix.Matrix2D
- },
- skewXg: function(degree){
- // summary: forms an x skewing matrix
- // description: The resulting matrix is used to skew points in the x dimension
- // around the origin of coordinates (0, 0) by specified degree.
- // See dojox.gfx.matrix.skewX() for comparison.
- // degree: Number: an skewing angle in degrees
- return m.skewX(m._degToRad(degree)); // dojox.gfx.matrix.Matrix2D
- },
- skewY: function(angle){
- // summary: forms a y skewing matrix
- // description: The resulting matrix is used to skew points in the y dimension
- // around the origin of coordinates (0, 0) by specified angle.
- // angle: Number: an skewing angle in radians
- return new m.Matrix2D({yx: Math.tan(angle)}); // dojox.gfx.matrix.Matrix2D
- },
- skewYg: function(degree){
- // summary: forms a y skewing matrix
- // description: The resulting matrix is used to skew points in the y dimension
- // around the origin of coordinates (0, 0) by specified degree.
- // See dojox.gfx.matrix.skewY() for comparison.
- // degree: Number: an skewing angle in degrees
- return m.skewY(m._degToRad(degree)); // dojox.gfx.matrix.Matrix2D
- },
- reflect: function(a, b){
- // summary: forms a reflection matrix
- // description: The resulting matrix is used to reflect points around a vector,
- // which goes through the origin.
- // a: dojox.gfx.Point: a point-like object, which specifies a vector of reflection
- // b: null
- if(arguments.length == 1){
- b = a.y;
- a = a.x;
- }
- // branch
- // a: Number: an x coordinate value
- // b: Number: a y coordinate value
-
- // make a unit vector
- var a2 = a * a, b2 = b * b, n2 = a2 + b2, xy = 2 * a * b / n2;
- return new m.Matrix2D({xx: 2 * a2 / n2 - 1, xy: xy, yx: xy, yy: 2 * b2 / n2 - 1}); // dojox.gfx.matrix.Matrix2D
- },
- project: function(a, b){
- // summary: forms an orthogonal projection matrix
- // description: The resulting matrix is used to project points orthogonally on a vector,
- // which goes through the origin.
- // a: dojox.gfx.Point: a point-like object, which specifies a vector of projection
- // b: null
- if(arguments.length == 1){
- b = a.y;
- a = a.x;
- }
- // branch
- // a: Number: an x coordinate value
- // b: Number: a y coordinate value
-
- // make a unit vector
- var a2 = a * a, b2 = b * b, n2 = a2 + b2, xy = a * b / n2;
- return new m.Matrix2D({xx: a2 / n2, xy: xy, yx: xy, yy: b2 / n2}); // dojox.gfx.matrix.Matrix2D
- },
-
- // ensure matrix 2D conformance
- normalize: function(matrix){
- // summary: converts an object to a matrix, if necessary
- // description: Converts any 2D matrix-like object or an array of
- // such objects to a valid dojox.gfx.matrix.Matrix2D object.
- // matrix: Object: an object, which is converted to a matrix, if necessary
- return (matrix instanceof m.Matrix2D) ? matrix : new m.Matrix2D(matrix); // dojox.gfx.matrix.Matrix2D
- },
-
- // common operations
-
- clone: function(matrix){
- // summary: creates a copy of a 2D matrix
- // matrix: dojox.gfx.matrix.Matrix2D: a 2D matrix-like object to be cloned
- var obj = new m.Matrix2D();
- for(var i in matrix){
- if(typeof(matrix[i]) == "number" && typeof(obj[i]) == "number" && obj[i] != matrix[i]) obj[i] = matrix[i];
- }
- return obj; // dojox.gfx.matrix.Matrix2D
- },
- invert: function(matrix){
- // summary: inverts a 2D matrix
- // matrix: dojox.gfx.matrix.Matrix2D: a 2D matrix-like object to be inverted
- var M = m.normalize(matrix),
- D = M.xx * M.yy - M.xy * M.yx,
- M = new m.Matrix2D({
- xx: M.yy/D, xy: -M.xy/D,
- yx: -M.yx/D, yy: M.xx/D,
- dx: (M.xy * M.dy - M.yy * M.dx) / D,
- dy: (M.yx * M.dx - M.xx * M.dy) / D
- });
- return M; // dojox.gfx.matrix.Matrix2D
- },
- _multiplyPoint: function(matrix, x, y){
- // summary: applies a matrix to a point
- // matrix: dojox.gfx.matrix.Matrix2D: a 2D matrix object to be applied
- // x: Number: an x coordinate of a point
- // y: Number: a y coordinate of a point
- return {x: matrix.xx * x + matrix.xy * y + matrix.dx, y: matrix.yx * x + matrix.yy * y + matrix.dy}; // dojox.gfx.Point
- },
- multiplyPoint: function(matrix, /* Number||Point */ a, /* Number, optional */ b){
- // summary: applies a matrix to a point
- // matrix: dojox.gfx.matrix.Matrix2D: a 2D matrix object to be applied
- // a: Number: an x coordinate of a point
- // b: Number: a y coordinate of a point
- var M = m.normalize(matrix);
- if(typeof a == "number" && typeof b == "number"){
- return m._multiplyPoint(M, a, b); // dojox.gfx.Point
- }
- // branch
- // matrix: dojox.gfx.matrix.Matrix2D: a 2D matrix object to be applied
- // a: dojox.gfx.Point: a point
- // b: null
- return m._multiplyPoint(M, a.x, a.y); // dojox.gfx.Point
- },
- multiply: function(matrix){
- // summary: combines matrices by multiplying them sequentially in the given order
- // matrix: dojox.gfx.matrix.Matrix2D...: a 2D matrix-like object,
- // all subsequent arguments are matrix-like objects too
- var M = m.normalize(matrix);
- // combine matrices
- for(var i = 1; i < arguments.length; ++i){
- var l = M, r = m.normalize(arguments[i]);
- M = new m.Matrix2D();
- M.xx = l.xx * r.xx + l.xy * r.yx;
- M.xy = l.xx * r.xy + l.xy * r.yy;
- M.yx = l.yx * r.xx + l.yy * r.yx;
- M.yy = l.yx * r.xy + l.yy * r.yy;
- M.dx = l.xx * r.dx + l.xy * r.dy + l.dx;
- M.dy = l.yx * r.dx + l.yy * r.dy + l.dy;
- }
- return M; // dojox.gfx.matrix.Matrix2D
- },
-
- // high level operations
-
- _sandwich: function(matrix, x, y){
- // summary: applies a matrix at a centrtal point
- // matrix: dojox.gfx.matrix.Matrix2D: a 2D matrix-like object, which is applied at a central point
- // x: Number: an x component of the central point
- // y: Number: a y component of the central point
- return m.multiply(m.translate(x, y), matrix, m.translate(-x, -y)); // dojox.gfx.matrix.Matrix2D
- },
- scaleAt: function(a, b, c, d){
- // summary: scales a picture using a specified point as a center of scaling
- // description: Compare with dojox.gfx.matrix.scale().
- // a: Number: a scaling factor used for the x coordinate
- // b: Number: a scaling factor used for the y coordinate
- // c: Number: an x component of a central point
- // d: Number: a y component of a central point
-
- // accepts several signatures:
- // 1) uniform scale factor, Point
- // 2) uniform scale factor, x, y
- // 3) x scale, y scale, Point
- // 4) x scale, y scale, x, y
-
- switch(arguments.length){
- case 4:
- // a and b are scale factor components, c and d are components of a point
- return m._sandwich(m.scale(a, b), c, d); // dojox.gfx.matrix.Matrix2D
- case 3:
- if(typeof c == "number"){
- // branch
- // a: Number: a uniform scaling factor used for both coordinates
- // b: Number: an x component of a central point
- // c: Number: a y component of a central point
- // d: null
- return m._sandwich(m.scale(a), b, c); // dojox.gfx.matrix.Matrix2D
- }
- // branch
- // a: Number: a scaling factor used for the x coordinate
- // b: Number: a scaling factor used for the y coordinate
- // c: dojox.gfx.Point: a central point
- // d: null
- return m._sandwich(m.scale(a, b), c.x, c.y); // dojox.gfx.matrix.Matrix2D
- }
- // branch
- // a: Number: a uniform scaling factor used for both coordinates
- // b: dojox.gfx.Point: a central point
- // c: null
- // d: null
- return m._sandwich(m.scale(a), b.x, b.y); // dojox.gfx.matrix.Matrix2D
- },
- rotateAt: function(angle, a, b){
- // summary: rotates a picture using a specified point as a center of rotation
- // description: Compare with dojox.gfx.matrix.rotate().
- // angle: Number: an angle of rotation in radians (>0 for CW)
- // a: Number: an x component of a central point
- // b: Number: a y component of a central point
-
- // accepts several signatures:
- // 1) rotation angle in radians, Point
- // 2) rotation angle in radians, x, y
-
- if(arguments.length > 2){
- return m._sandwich(m.rotate(angle), a, b); // dojox.gfx.matrix.Matrix2D
- }
-
- // branch
- // angle: Number: an angle of rotation in radians (>0 for CCW)
- // a: dojox.gfx.Point: a central point
- // b: null
- return m._sandwich(m.rotate(angle), a.x, a.y); // dojox.gfx.matrix.Matrix2D
- },
- rotategAt: function(degree, a, b){
- // summary: rotates a picture using a specified point as a center of rotation
- // description: Compare with dojox.gfx.matrix.rotateg().
- // degree: Number: an angle of rotation in degrees (>0 for CW)
- // a: Number: an x component of a central point
- // b: Number: a y component of a central point
-
- // accepts several signatures:
- // 1) rotation angle in degrees, Point
- // 2) rotation angle in degrees, x, y
-
- if(arguments.length > 2){
- return m._sandwich(m.rotateg(degree), a, b); // dojox.gfx.matrix.Matrix2D
- }
-
- // branch
- // degree: Number: an angle of rotation in degrees (>0 for CCW)
- // a: dojox.gfx.Point: a central point
- // b: null
- return m._sandwich(m.rotateg(degree), a.x, a.y); // dojox.gfx.matrix.Matrix2D
- },
- skewXAt: function(angle, a, b){
- // summary: skews a picture along the x axis using a specified point as a center of skewing
- // description: Compare with dojox.gfx.matrix.skewX().
- // angle: Number: an skewing angle in radians
- // a: Number: an x component of a central point
- // b: Number: a y component of a central point
-
- // accepts several signatures:
- // 1) skew angle in radians, Point
- // 2) skew angle in radians, x, y
-
- if(arguments.length > 2){
- return m._sandwich(m.skewX(angle), a, b); // dojox.gfx.matrix.Matrix2D
- }
-
- // branch
- // angle: Number: an skewing angle in radians
- // a: dojox.gfx.Point: a central point
- // b: null
- return m._sandwich(m.skewX(angle), a.x, a.y); // dojox.gfx.matrix.Matrix2D
- },
- skewXgAt: function(degree, a, b){
- // summary: skews a picture along the x axis using a specified point as a center of skewing
- // description: Compare with dojox.gfx.matrix.skewXg().
- // degree: Number: an skewing angle in degrees
- // a: Number: an x component of a central point
- // b: Number: a y component of a central point
-
- // accepts several signatures:
- // 1) skew angle in degrees, Point
- // 2) skew angle in degrees, x, y
-
- if(arguments.length > 2){
- return m._sandwich(m.skewXg(degree), a, b); // dojox.gfx.matrix.Matrix2D
- }
-
- // branch
- // degree: Number: an skewing angle in degrees
- // a: dojox.gfx.Point: a central point
- // b: null
- return m._sandwich(m.skewXg(degree), a.x, a.y); // dojox.gfx.matrix.Matrix2D
- },
- skewYAt: function(angle, a, b){
- // summary: skews a picture along the y axis using a specified point as a center of skewing
- // description: Compare with dojox.gfx.matrix.skewY().
- // angle: Number: an skewing angle in radians
- // a: Number: an x component of a central point
- // b: Number: a y component of a central point
-
- // accepts several signatures:
- // 1) skew angle in radians, Point
- // 2) skew angle in radians, x, y
-
- if(arguments.length > 2){
- return m._sandwich(m.skewY(angle), a, b); // dojox.gfx.matrix.Matrix2D
- }
-
- // branch
- // angle: Number: an skewing angle in radians
- // a: dojox.gfx.Point: a central point
- // b: null
- return m._sandwich(m.skewY(angle), a.x, a.y); // dojox.gfx.matrix.Matrix2D
- },
- skewYgAt: function(/* Number */ degree, /* Number||Point */ a, /* Number, optional */ b){
- // summary: skews a picture along the y axis using a specified point as a center of skewing
- // description: Compare with dojox.gfx.matrix.skewYg().
- // degree: Number: an skewing angle in degrees
- // a: Number: an x component of a central point
- // b: Number: a y component of a central point
-
- // accepts several signatures:
- // 1) skew angle in degrees, Point
- // 2) skew angle in degrees, x, y
-
- if(arguments.length > 2){
- return m._sandwich(m.skewYg(degree), a, b); // dojox.gfx.matrix.Matrix2D
- }
-
- // branch
- // degree: Number: an skewing angle in degrees
- // a: dojox.gfx.Point: a central point
- // b: null
- return m._sandwich(m.skewYg(degree), a.x, a.y); // dojox.gfx.matrix.Matrix2D
- }
-
- //TODO: rect-to-rect mapping, scale-to-fit (isotropic and anisotropic versions)
-
- });
+if(!dojo._hasResource["dojox.gfx.matrix"]){
+dojo._hasResource["dojox.gfx.matrix"]=true;
+dojo.provide("dojox.gfx.matrix");
+(function(){
+var m=dojox.gfx.matrix;
+var _1={};
+m._degToRad=function(_2){
+return _1[_2]||(_1[_2]=(Math.PI*_2/180));
+};
+m._radToDeg=function(_3){
+return _3/Math.PI*180;
+};
+m.Matrix2D=function(_4){
+if(_4){
+if(typeof _4=="number"){
+this.xx=this.yy=_4;
+}else{
+if(_4 instanceof Array){
+if(_4.length>0){
+var _5=m.normalize(_4[0]);
+for(var i=1;i<_4.length;++i){
+var l=_5,r=dojox.gfx.matrix.normalize(_4[i]);
+_5=new m.Matrix2D();
+_5.xx=l.xx*r.xx+l.xy*r.yx;
+_5.xy=l.xx*r.xy+l.xy*r.yy;
+_5.yx=l.yx*r.xx+l.yy*r.yx;
+_5.yy=l.yx*r.xy+l.yy*r.yy;
+_5.dx=l.xx*r.dx+l.xy*r.dy+l.dx;
+_5.dy=l.yx*r.dx+l.yy*r.dy+l.dy;
+}
+dojo.mixin(this,_5);
+}
+}else{
+dojo.mixin(this,_4);
+}
+}
+}
+};
+dojo.extend(m.Matrix2D,{xx:1,xy:0,yx:0,yy:1,dx:0,dy:0});
+dojo.mixin(m,{identity:new m.Matrix2D(),flipX:new m.Matrix2D({xx:-1}),flipY:new m.Matrix2D({yy:-1}),flipXY:new m.Matrix2D({xx:-1,yy:-1}),translate:function(a,b){
+if(arguments.length>1){
+return new m.Matrix2D({dx:a,dy:b});
+}
+return new m.Matrix2D({dx:a.x,dy:a.y});
+},scale:function(a,b){
+if(arguments.length>1){
+return new m.Matrix2D({xx:a,yy:b});
+}
+if(typeof a=="number"){
+return new m.Matrix2D({xx:a,yy:a});
+}
+return new m.Matrix2D({xx:a.x,yy:a.y});
+},rotate:function(_6){
+var c=Math.cos(_6);
+var s=Math.sin(_6);
+return new m.Matrix2D({xx:c,xy:-s,yx:s,yy:c});
+},rotateg:function(_7){
+return m.rotate(m._degToRad(_7));
+},skewX:function(_8){
+return new m.Matrix2D({xy:Math.tan(_8)});
+},skewXg:function(_9){
+return m.skewX(m._degToRad(_9));
+},skewY:function(_a){
+return new m.Matrix2D({yx:Math.tan(_a)});
+},skewYg:function(_b){
+return m.skewY(m._degToRad(_b));
+},reflect:function(a,b){
+if(arguments.length==1){
+b=a.y;
+a=a.x;
+}
+var a2=a*a,b2=b*b,n2=a2+b2,xy=2*a*b/n2;
+return new m.Matrix2D({xx:2*a2/n2-1,xy:xy,yx:xy,yy:2*b2/n2-1});
+},project:function(a,b){
+if(arguments.length==1){
+b=a.y;
+a=a.x;
+}
+var a2=a*a,b2=b*b,n2=a2+b2,xy=a*b/n2;
+return new m.Matrix2D({xx:a2/n2,xy:xy,yx:xy,yy:b2/n2});
+},normalize:function(_c){
+return (_c instanceof m.Matrix2D)?_c:new m.Matrix2D(_c);
+},clone:function(_d){
+var _e=new m.Matrix2D();
+for(var i in _d){
+if(typeof (_d[i])=="number"&&typeof (_e[i])=="number"&&_e[i]!=_d[i]){
+_e[i]=_d[i];
+}
+}
+return _e;
+},invert:function(_f){
+var M=m.normalize(_f),D=M.xx*M.yy-M.xy*M.yx,M=new m.Matrix2D({xx:M.yy/D,xy:-M.xy/D,yx:-M.yx/D,yy:M.xx/D,dx:(M.xy*M.dy-M.yy*M.dx)/D,dy:(M.yx*M.dx-M.xx*M.dy)/D});
+return M;
+},_multiplyPoint:function(_10,x,y){
+return {x:_10.xx*x+_10.xy*y+_10.dx,y:_10.yx*x+_10.yy*y+_10.dy};
+},multiplyPoint:function(_11,a,b){
+var M=m.normalize(_11);
+if(typeof a=="number"&&typeof b=="number"){
+return m._multiplyPoint(M,a,b);
+}
+return m._multiplyPoint(M,a.x,a.y);
+},multiply:function(_12){
+var M=m.normalize(_12);
+for(var i=1;i<arguments.length;++i){
+var l=M,r=m.normalize(arguments[i]);
+M=new m.Matrix2D();
+M.xx=l.xx*r.xx+l.xy*r.yx;
+M.xy=l.xx*r.xy+l.xy*r.yy;
+M.yx=l.yx*r.xx+l.yy*r.yx;
+M.yy=l.yx*r.xy+l.yy*r.yy;
+M.dx=l.xx*r.dx+l.xy*r.dy+l.dx;
+M.dy=l.yx*r.dx+l.yy*r.dy+l.dy;
+}
+return M;
+},_sandwich:function(_13,x,y){
+return m.multiply(m.translate(x,y),_13,m.translate(-x,-y));
+},scaleAt:function(a,b,c,d){
+switch(arguments.length){
+case 4:
+return m._sandwich(m.scale(a,b),c,d);
+case 3:
+if(typeof c=="number"){
+return m._sandwich(m.scale(a),b,c);
+}
+return m._sandwich(m.scale(a,b),c.x,c.y);
+}
+return m._sandwich(m.scale(a),b.x,b.y);
+},rotateAt:function(_14,a,b){
+if(arguments.length>2){
+return m._sandwich(m.rotate(_14),a,b);
+}
+return m._sandwich(m.rotate(_14),a.x,a.y);
+},rotategAt:function(_15,a,b){
+if(arguments.length>2){
+return m._sandwich(m.rotateg(_15),a,b);
+}
+return m._sandwich(m.rotateg(_15),a.x,a.y);
+},skewXAt:function(_16,a,b){
+if(arguments.length>2){
+return m._sandwich(m.skewX(_16),a,b);
+}
+return m._sandwich(m.skewX(_16),a.x,a.y);
+},skewXgAt:function(_17,a,b){
+if(arguments.length>2){
+return m._sandwich(m.skewXg(_17),a,b);
+}
+return m._sandwich(m.skewXg(_17),a.x,a.y);
+},skewYAt:function(_18,a,b){
+if(arguments.length>2){
+return m._sandwich(m.skewY(_18),a,b);
+}
+return m._sandwich(m.skewY(_18),a.x,a.y);
+},skewYgAt:function(_19,a,b){
+if(arguments.length>2){
+return m._sandwich(m.skewYg(_19),a,b);
+}
+return m._sandwich(m.skewYg(_19),a.x,a.y);
+}});
})();
-
-// propagate Matrix2D up
-dojox.gfx.Matrix2D = dojox.gfx.matrix.Matrix2D;
-
+dojox.gfx.Matrix2D=dojox.gfx.matrix.Matrix2D;
}
diff --git a/js/dojo/dojox/gfx/move.js b/js/dojo/dojox/gfx/move.js
--- a/js/dojo/dojox/gfx/move.js
+++ b/js/dojo/dojox/gfx/move.js
@@ -1,114 +1,13 @@
-if(!dojo._hasResource["dojox.gfx.move"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.gfx.move"] = true;
-dojo.provide("dojox.gfx.move");
-dojo.experimental("dojox.gfx.move");
-
-dojox.gfx.Mover = function(shape, e){
- // summary: an object, which makes a shape follow the mouse,
- // used as a default mover, and as a base class for custom movers
- // shape: dojox.gfx.Shape: a shape object to be moved
- // e: Event: a mouse event, which started the move;
- // only clientX and clientY properties are used
- this.shape = shape;
- this.lastX = e.clientX
- this.lastY = e.clientY;
- var d = document, firstEvent = dojo.connect(d, "onmousemove", this, "onFirstMove");
- this.events = [
- dojo.connect(d, "onmousemove", this, "onMouseMove"),
- dojo.connect(d, "onmouseup", this, "destroy"),
- // cancel text selection and text dragging
- dojo.connect(d, "ondragstart", dojo, "stopEvent"),
- dojo.connect(d, "onselectstart", dojo, "stopEvent"),
- firstEvent
- ];
- // set globals to indicate that move has started
- dojo.publish("/gfx/move/start", [this]);
- dojo.addClass(dojo.body(), "dojoMove");
-};
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.extend(dojox.gfx.Mover, {
- // mouse event processors
- onMouseMove: function(e){
- // summary: event processor for onmousemove
- // e: Event: mouse event
- var x = e.clientX;
- var y = e.clientY;
- this.shape.applyLeftTransform({dx: x - this.lastX, dy: y - this.lastY});
- this.lastX = x;
- this.lastY = y;
- dojo.stopEvent(e);
- },
- // utilities
- onFirstMove: function(){
- // summary: it is meant to be called only once
- dojo.disconnect(this.events.pop());
- },
- destroy: function(){
- // summary: stops the move, deletes all references, so the object can be garbage-collected
- dojo.forEach(this.events, dojo.disconnect);
- // undo global settings
- dojo.publish("/gfx/move/stop", [this]);
- dojo.removeClass(dojo.body(), "dojoMove");
- // destroy objects
- this.events = this.shape = null;
- }
-});
-dojox.gfx.Moveable = function(shape, params){
- // summary: an object, which makes a shape moveable
- // shape: dojox.gfx.Shape: a shape object to be moved
- // params: Object: an optional object with additional parameters;
- // following parameters are recognized:
- // delay: Number: delay move by this number of pixels
- // mover: Object: a constructor of custom Mover
- this.shape = shape;
- this.delay = (params && params.delay > 0) ? params.delay : 0;
- this.mover = (params && params.mover) ? params.mover : dojox.gfx.Mover;
- this.events = [
- this.shape.connect("onmousedown", this, "onMouseDown"),
- // cancel text selection and text dragging
- //dojo.connect(this.handle, "ondragstart", dojo, "stopEvent"),
- //dojo.connect(this.handle, "onselectstart", dojo, "stopEvent")
- ];
-};
-
-dojo.extend(dojox.gfx.Moveable, {
- // methods
- destroy: function(){
- // summary: stops watching for possible move, deletes all references, so the object can be garbage-collected
- dojo.forEach(this.events, "disconnect", this.shape);
- this.events = this.shape = null;
- },
-
- // mouse event processors
- onMouseDown: function(e){
- // summary: event processor for onmousedown, creates a Mover for the shape
- // e: Event: mouse event
- if(this.delay){
- this.events.push(this.shape.connect("onmousemove", this, "onMouseMove"));
- this.events.push(this.shape.connect("onmouseup", this, "onMouseUp"));
- this._lastX = e.clientX;
- this._lastY = e.clientY;
- }else{
- new this.mover(this.shape, e);
- }
- dojo.stopEvent(e);
- },
- onMouseMove: function(e){
- // summary: event processor for onmousemove, used only for delayed drags
- // e: Event: mouse event
- if(Math.abs(e.clientX - this._lastX) > this.delay || Math.abs(e.clientY - this._lastY) > this.delay){
- this.onMouseUp(e);
- new this.mover(this.shape, e);
- }
- dojo.stopEvent(e);
- },
- onMouseUp: function(e){
- // summary: event processor for onmouseup, used only for delayed delayed drags
- // e: Event: mouse event
- this.shape.disconnect(this.events.pop());
- this.shape.disconnect(this.events.pop());
- }
-});
-
+if(!dojo._hasResource["dojox.gfx.move"]){
+dojo._hasResource["dojox.gfx.move"]=true;
+dojo.provide("dojox.gfx.move");
+dojo.require("dojox.gfx.Mover");
+dojo.require("dojox.gfx.Moveable");
}
diff --git a/js/dojo/dojox/gfx/path.js b/js/dojo/dojox/gfx/path.js
--- a/js/dojo/dojox/gfx/path.js
+++ b/js/dojo/dojox/gfx/path.js
@@ -1,353 +1,277 @@
-if(!dojo._hasResource["dojox.gfx.path"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.gfx.path"] = true;
-dojo.provide("dojox.gfx.path");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.require("dojox.gfx.shape");
-dojo.declare("dojox.gfx.path.Path", dojox.gfx.Shape, {
- // summary: a generalized path shape
-
- constructor: function(rawNode){
- // summary: a path constructor
- // rawNode: Node: a DOM node to be used by this path object
- this.shape = dojo.clone(dojox.gfx.defaultPath);
- this.segments = [];
- this.absolute = true;
- this.last = {};
- this.rawNode = rawNode;
- },
-
- // mode manipulations
- setAbsoluteMode: function(mode){
- // summary: sets an absolute or relative mode for path points
- // mode: Boolean: true/false or "absolute"/"relative" to specify the mode
- this.absolute = typeof mode == "string" ? (mode == "absolute") : mode;
- return this; // self
- },
- getAbsoluteMode: function(){
- // summary: returns a current value of the absolute mode
- return this.absolute; // Boolean
- },
-
- getBoundingBox: function(){
- // summary: returns the bounding box {x, y, width, height} or null
- return (this.bbox && ("l" in this.bbox)) ? {x: this.bbox.l, y: this.bbox.t, width: this.bbox.r - this.bbox.l, height: this.bbox.b - this.bbox.t} : null; // dojox.gfx.Rectangle
- },
-
- getLastPosition: function(){
- // summary: returns the last point in the path, or null
- return "x" in this.last ? this.last : null; // Object
- },
-
- // segment interpretation
- _updateBBox: function(x, y){
- // summary: updates the bounding box of path with new point
- // x: Number: an x coordinate
- // y: Number: a y coordinate
-
- // we use {l, b, r, t} representation of a bbox
- if(this.bbox && ("l" in this.bbox)){
- if(this.bbox.l > x) this.bbox.l = x;
- if(this.bbox.r < x) this.bbox.r = x;
- if(this.bbox.t > y) this.bbox.t = y;
- if(this.bbox.b < y) this.bbox.b = y;
- }else{
- this.bbox = {l: x, b: y, r: x, t: y};
- }
- },
- _updateWithSegment: function(segment){
- // summary: updates the bounding box of path with new segment
- // segment: Object: a segment
- var n = segment.args, l = n.length;
- // update internal variables: bbox, absolute, last
- switch(segment.action){
- case "M":
- case "L":
- case "C":
- case "S":
- case "Q":
- case "T":
- for(var i = 0; i < l; i += 2){
- this._updateBBox(n[i], n[i + 1]);
- }
- this.last.x = n[l - 2];
- this.last.y = n[l - 1];
- this.absolute = true;
- break;
- case "H":
- for(var i = 0; i < l; ++i){
- this._updateBBox(n[i], this.last.y);
- }
- this.last.x = n[l - 1];
- this.absolute = true;
- break;
- case "V":
- for(var i = 0; i < l; ++i){
- this._updateBBox(this.last.x, n[i]);
- }
- this.last.y = n[l - 1];
- this.absolute = true;
- break;
- case "m":
- var start = 0;
- if(!("x" in this.last)){
- this._updateBBox(this.last.x = n[0], this.last.y = n[1]);
- start = 2;
- }
- for(var i = start; i < l; i += 2){
- this._updateBBox(this.last.x += n[i], this.last.y += n[i + 1]);
- }
- this.absolute = false;
- break;
- case "l":
- case "t":
- for(var i = 0; i < l; i += 2){
- this._updateBBox(this.last.x += n[i], this.last.y += n[i + 1]);
- }
- this.absolute = false;
- break;
- case "h":
- for(var i = 0; i < l; ++i){
- this._updateBBox(this.last.x += n[i], this.last.y);
- }
- this.absolute = false;
- break;
- case "v":
- for(var i = 0; i < l; ++i){
- this._updateBBox(this.last.x, this.last.y += n[i]);
- }
- this.absolute = false;
- break;
- case "c":
- for(var i = 0; i < l; i += 6){
- this._updateBBox(this.last.x + n[i], this.last.y + n[i + 1]);
- this._updateBBox(this.last.x + n[i + 2], this.last.y + n[i + 3]);
- this._updateBBox(this.last.x += n[i + 4], this.last.y += n[i + 5]);
- }
- this.absolute = false;
- break;
- case "s":
- case "q":
- for(var i = 0; i < l; i += 4){
- this._updateBBox(this.last.x + n[i], this.last.y + n[i + 1]);
- this._updateBBox(this.last.x += n[i + 2], this.last.y += n[i + 3]);
- }
- this.absolute = false;
- break;
- case "A":
- for(var i = 0; i < l; i += 7){
- this._updateBBox(n[i + 5], n[i + 6]);
- }
- this.last.x = n[l - 2];
- this.last.y = n[l - 1];
- this.absolute = true;
- break;
- case "a":
- for(var i = 0; i < l; i += 7){
- this._updateBBox(this.last.x += n[i + 5], this.last.y += n[i + 6]);
- }
- this.absolute = false;
- break;
- }
- // add an SVG path segment
- var path = [segment.action];
- for(var i = 0; i < l; ++i){
- path.push(dojox.gfx.formatNumber(n[i], true));
- }
- if(typeof this.shape.path == "string"){
- this.shape.path += path.join("");
- }else{
- var l = path.length, a = this.shape.path;
- for(var i = 0; i < l; ++i){
- a.push(path[i]);
- }
- }
- },
-
- // a dictionary, which maps segment type codes to a number of their argemnts
- _validSegments: {m: 2, l: 2, h: 1, v: 1, c: 6, s: 4, q: 4, t: 2, a: 7, z: 0},
-
- _pushSegment: function(action, args){
- // summary: adds a segment
- // action: String: valid SVG code for a segment's type
- // args: Array: a list of parameters for this segment
- var group = this._validSegments[action.toLowerCase()];
- if(typeof group == "number"){
- if(group){
- if(args.length >= group){
- var segment = {action: action, args: args.slice(0, args.length - args.length % group)};
- this.segments.push(segment);
- this._updateWithSegment(segment);
- }
- }else{
- var segment = {action: action, args: []};
- this.segments.push(segment);
- this._updateWithSegment(segment);
- }
- }
- },
-
- _collectArgs: function(array, args){
- // summary: converts an array of arguments to plain numeric values
- // array: Array: an output argument (array of numbers)
- // args: Array: an input argument (can be values of Boolean, Number, dojox.gfx.Point, or an embedded array of them)
- for(var i = 0; i < args.length; ++i){
- var t = args[i];
- if(typeof t == "boolean"){
- array.push(t ? 1 : 0);
- }else if(typeof t == "number"){
- array.push(t);
- }else if(t instanceof Array){
- this._collectArgs(array, t);
- }else if("x" in t && "y" in t){
- array.push(t.x, t.y);
- }
- }
- },
-
- // segments
- moveTo: function(){
- // summary: formes a move segment
- var args = [];
- this._collectArgs(args, arguments);
- this._pushSegment(this.absolute ? "M" : "m", args);
- return this; // self
- },
- lineTo: function(){
- // summary: formes a line segment
- var args = [];
- this._collectArgs(args, arguments);
- this._pushSegment(this.absolute ? "L" : "l", args);
- return this; // self
- },
- hLineTo: function(){
- // summary: formes a horizontal line segment
- var args = [];
- this._collectArgs(args, arguments);
- this._pushSegment(this.absolute ? "H" : "h", args);
- return this; // self
- },
- vLineTo: function(){
- // summary: formes a vertical line segment
- var args = [];
- this._collectArgs(args, arguments);
- this._pushSegment(this.absolute ? "V" : "v", args);
- return this; // self
- },
- curveTo: function(){
- // summary: formes a curve segment
- var args = [];
- this._collectArgs(args, arguments);
- this._pushSegment(this.absolute ? "C" : "c", args);
- return this; // self
- },
- smoothCurveTo: function(){
- // summary: formes a smooth curve segment
- var args = [];
- this._collectArgs(args, arguments);
- this._pushSegment(this.absolute ? "S" : "s", args);
- return this; // self
- },
- qCurveTo: function(){
- // summary: formes a quadratic curve segment
- var args = [];
- this._collectArgs(args, arguments);
- this._pushSegment(this.absolute ? "Q" : "q", args);
- return this; // self
- },
- qSmoothCurveTo: function(){
- // summary: formes a quadratic smooth curve segment
- var args = [];
- this._collectArgs(args, arguments);
- this._pushSegment(this.absolute ? "T" : "t", args);
- return this; // self
- },
- arcTo: function(){
- // summary: formes an elliptic arc segment
- var args = [];
- this._collectArgs(args, arguments);
- this._pushSegment(this.absolute ? "A" : "a", args);
- return this; // self
- },
- closePath: function(){
- // summary: closes a path
- this._pushSegment("Z", []);
- return this; // self
- },
-
- // setShape
- _setPath: function(path){
- // summary: forms a path using an SVG path string
- // path: String: an SVG path string
- var p = dojo.isArray(path) ? path : path.match(dojox.gfx.pathSvgRegExp);
- this.segments = [];
- this.absolute = true;
- this.bbox = {};
- this.last = {};
- if(!p) return;
- // create segments
- var action = "", // current action
- args = [], // current arguments
- l = p.length;
- for(var i = 0; i < l; ++i){
- var t = p[i], x = parseFloat(t);
- if(isNaN(x)){
- if(action){
- this._pushSegment(action, args);
- }
- args = [];
- action = t;
- }else{
- args.push(x);
- }
- }
- this._pushSegment(action, args);
- },
- setShape: function(newShape){
- // summary: forms a path using a shape
- // newShape: Object: an SVG path string or a path object (see dojox.gfx.defaultPath)
- dojox.gfx.Shape.prototype.setShape.call(this, typeof newShape == "string" ? {path: newShape} : newShape);
- var path = this.shape.path;
- // switch to non-updating version of path building
- this.shape.path = [];
- this._setPath(path);
- // switch back to the string path
- this.shape.path = this.shape.path.join("");
- return this; // self
- },
-
- // useful constant for descendants
- _2PI: Math.PI * 2
-});
-
-dojo.declare("dojox.gfx.path.TextPath", dojox.gfx.path.Path, {
- // summary: a generalized TextPath shape
-
- constructor: function(rawNode){
- // summary: a TextPath shape constructor
- // rawNode: Node: a DOM node to be used by this TextPath object
- if(!("text" in this)){
- this.text = dojo.clone(dojox.gfx.defaultTextPath);
- }
- if(!("fontStyle" in this)){
- this.fontStyle = dojo.clone(dojox.gfx.defaultFont);
- }
- },
- setText: function(newText){
- // summary: sets a text to be drawn along the path
- this.text = dojox.gfx.makeParameters(this.text,
- typeof newText == "string" ? {text: newText} : newText);
- this._setText();
- return this; // self
- },
- setFont: function(newFont){
- // summary: sets a font for text
- this.fontStyle = typeof newFont == "string" ?
- dojox.gfx.splitFontString(newFont) :
- dojox.gfx.makeParameters(dojox.gfx.defaultFont, newFont);
- this._setFont();
- return this; // self
- }
-});
-
+if(!dojo._hasResource["dojox.gfx.path"]){
+dojo._hasResource["dojox.gfx.path"]=true;
+dojo.provide("dojox.gfx.path");
+dojo.require("dojox.gfx.shape");
+dojo.declare("dojox.gfx.path.Path",dojox.gfx.Shape,{constructor:function(_1){
+this.shape=dojo.clone(dojox.gfx.defaultPath);
+this.segments=[];
+this.absolute=true;
+this.last={};
+this.rawNode=_1;
+},setAbsoluteMode:function(_2){
+this.absolute=typeof _2=="string"?(_2=="absolute"):_2;
+return this;
+},getAbsoluteMode:function(){
+return this.absolute;
+},getBoundingBox:function(){
+return (this.bbox&&("l" in this.bbox))?{x:this.bbox.l,y:this.bbox.t,width:this.bbox.r-this.bbox.l,height:this.bbox.b-this.bbox.t}:null;
+},getLastPosition:function(){
+return "x" in this.last?this.last:null;
+},_updateBBox:function(x,y){
+if(this.bbox&&("l" in this.bbox)){
+if(this.bbox.l>x){
+this.bbox.l=x;
+}
+if(this.bbox.r<x){
+this.bbox.r=x;
+}
+if(this.bbox.t>y){
+this.bbox.t=y;
+}
+if(this.bbox.b<y){
+this.bbox.b=y;
+}
+}else{
+this.bbox={l:x,b:y,r:x,t:y};
+}
+},_updateWithSegment:function(_3){
+var n=_3.args,l=n.length;
+switch(_3.action){
+case "M":
+case "L":
+case "C":
+case "S":
+case "Q":
+case "T":
+for(var i=0;i<l;i+=2){
+this._updateBBox(n[i],n[i+1]);
+}
+this.last.x=n[l-2];
+this.last.y=n[l-1];
+this.absolute=true;
+break;
+case "H":
+for(var i=0;i<l;++i){
+this._updateBBox(n[i],this.last.y);
+}
+this.last.x=n[l-1];
+this.absolute=true;
+break;
+case "V":
+for(var i=0;i<l;++i){
+this._updateBBox(this.last.x,n[i]);
+}
+this.last.y=n[l-1];
+this.absolute=true;
+break;
+case "m":
+var _4=0;
+if(!("x" in this.last)){
+this._updateBBox(this.last.x=n[0],this.last.y=n[1]);
+_4=2;
+}
+for(var i=_4;i<l;i+=2){
+this._updateBBox(this.last.x+=n[i],this.last.y+=n[i+1]);
+}
+this.absolute=false;
+break;
+case "l":
+case "t":
+for(var i=0;i<l;i+=2){
+this._updateBBox(this.last.x+=n[i],this.last.y+=n[i+1]);
+}
+this.absolute=false;
+break;
+case "h":
+for(var i=0;i<l;++i){
+this._updateBBox(this.last.x+=n[i],this.last.y);
+}
+this.absolute=false;
+break;
+case "v":
+for(var i=0;i<l;++i){
+this._updateBBox(this.last.x,this.last.y+=n[i]);
+}
+this.absolute=false;
+break;
+case "c":
+for(var i=0;i<l;i+=6){
+this._updateBBox(this.last.x+n[i],this.last.y+n[i+1]);
+this._updateBBox(this.last.x+n[i+2],this.last.y+n[i+3]);
+this._updateBBox(this.last.x+=n[i+4],this.last.y+=n[i+5]);
+}
+this.absolute=false;
+break;
+case "s":
+case "q":
+for(var i=0;i<l;i+=4){
+this._updateBBox(this.last.x+n[i],this.last.y+n[i+1]);
+this._updateBBox(this.last.x+=n[i+2],this.last.y+=n[i+3]);
+}
+this.absolute=false;
+break;
+case "A":
+for(var i=0;i<l;i+=7){
+this._updateBBox(n[i+5],n[i+6]);
+}
+this.last.x=n[l-2];
+this.last.y=n[l-1];
+this.absolute=true;
+break;
+case "a":
+for(var i=0;i<l;i+=7){
+this._updateBBox(this.last.x+=n[i+5],this.last.y+=n[i+6]);
+}
+this.absolute=false;
+break;
+}
+var _5=[_3.action];
+for(var i=0;i<l;++i){
+_5.push(dojox.gfx.formatNumber(n[i],true));
}
+if(typeof this.shape.path=="string"){
+this.shape.path+=_5.join("");
+}else{
+Array.prototype.push.apply(this.shape.path,_5);
+}
+},_validSegments:{m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,z:0},_pushSegment:function(_6,_7){
+var _8=this._validSegments[_6.toLowerCase()];
+if(typeof _8=="number"){
+if(_8){
+if(_7.length>=_8){
+var _9={action:_6,args:_7.slice(0,_7.length-_7.length%_8)};
+this.segments.push(_9);
+this._updateWithSegment(_9);
+}
+}else{
+var _9={action:_6,args:[]};
+this.segments.push(_9);
+this._updateWithSegment(_9);
+}
+}
+},_collectArgs:function(_a,_b){
+for(var i=0;i<_b.length;++i){
+var t=_b[i];
+if(typeof t=="boolean"){
+_a.push(t?1:0);
+}else{
+if(typeof t=="number"){
+_a.push(t);
+}else{
+if(t instanceof Array){
+this._collectArgs(_a,t);
+}else{
+if("x" in t&&"y" in t){
+_a.push(t.x,t.y);
+}
+}
+}
+}
+}
+},moveTo:function(){
+var _c=[];
+this._collectArgs(_c,arguments);
+this._pushSegment(this.absolute?"M":"m",_c);
+return this;
+},lineTo:function(){
+var _d=[];
+this._collectArgs(_d,arguments);
+this._pushSegment(this.absolute?"L":"l",_d);
+return this;
+},hLineTo:function(){
+var _e=[];
+this._collectArgs(_e,arguments);
+this._pushSegment(this.absolute?"H":"h",_e);
+return this;
+},vLineTo:function(){
+var _f=[];
+this._collectArgs(_f,arguments);
+this._pushSegment(this.absolute?"V":"v",_f);
+return this;
+},curveTo:function(){
+var _10=[];
+this._collectArgs(_10,arguments);
+this._pushSegment(this.absolute?"C":"c",_10);
+return this;
+},smoothCurveTo:function(){
+var _11=[];
+this._collectArgs(_11,arguments);
+this._pushSegment(this.absolute?"S":"s",_11);
+return this;
+},qCurveTo:function(){
+var _12=[];
+this._collectArgs(_12,arguments);
+this._pushSegment(this.absolute?"Q":"q",_12);
+return this;
+},qSmoothCurveTo:function(){
+var _13=[];
+this._collectArgs(_13,arguments);
+this._pushSegment(this.absolute?"T":"t",_13);
+return this;
+},arcTo:function(){
+var _14=[];
+this._collectArgs(_14,arguments);
+this._pushSegment(this.absolute?"A":"a",_14);
+return this;
+},closePath:function(){
+this._pushSegment("Z",[]);
+return this;
+},_setPath:function(_15){
+var p=dojo.isArray(_15)?_15:_15.match(dojox.gfx.pathSvgRegExp);
+this.segments=[];
+this.absolute=true;
+this.bbox={};
+this.last={};
+if(!p){
+return;
+}
+var _16="",_17=[],l=p.length;
+for(var i=0;i<l;++i){
+var t=p[i],x=parseFloat(t);
+if(isNaN(x)){
+if(_16){
+this._pushSegment(_16,_17);
+}
+_17=[];
+_16=t;
+}else{
+_17.push(x);
+}
+}
+this._pushSegment(_16,_17);
+},setShape:function(_18){
+dojox.gfx.Shape.prototype.setShape.call(this,typeof _18=="string"?{path:_18}:_18);
+var _19=this.shape.path;
+this.shape.path=[];
+this._setPath(_19);
+this.shape.path=this.shape.path.join("");
+return this;
+},_2PI:Math.PI*2});
+dojo.declare("dojox.gfx.path.TextPath",dojox.gfx.path.Path,{constructor:function(_1a){
+if(!("text" in this)){
+this.text=dojo.clone(dojox.gfx.defaultTextPath);
+}
+if(!("fontStyle" in this)){
+this.fontStyle=dojo.clone(dojox.gfx.defaultFont);
+}
+},getText:function(){
+return this.text;
+},setText:function(_1b){
+this.text=dojox.gfx.makeParameters(this.text,typeof _1b=="string"?{text:_1b}:_1b);
+this._setText();
+return this;
+},getFont:function(){
+return this.fontStyle;
+},setFont:function(_1c){
+this.fontStyle=typeof _1c=="string"?dojox.gfx.splitFontString(_1c):dojox.gfx.makeParameters(dojox.gfx.defaultFont,_1c);
+this._setFont();
+return this;
+}});
+}
diff --git a/js/dojo/dojox/gfx/shape.js b/js/dojo/dojox/gfx/shape.js
--- a/js/dojo/dojox/gfx/shape.js
+++ b/js/dojo/dojox/gfx/shape.js
@@ -1,687 +1,375 @@
-if(!dojo._hasResource["dojox.gfx.shape"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.gfx.shape"] = true;
-dojo.provide("dojox.gfx.shape");
-
-dojo.require("dojox.gfx._base");
-
-dojo.declare("dojox.gfx.Shape", null, {
- // summary: a Shape object, which knows how to apply
- // graphical attributes and transformations
-
- constructor: function(){
- // rawNode: Node: underlying node
- this.rawNode = null;
-
- // shape: Object: an abstract shape object
- // (see dojox.gfx.defaultPath,
- // dojox.gfx.defaultPolyline,
- // dojox.gfx.defaultRect,
- // dojox.gfx.defaultEllipse,
- // dojox.gfx.defaultCircle,
- // dojox.gfx.defaultLine,
- // or dojox.gfx.defaultImage)
- this.shape = null;
-
- // matrix: dojox.gfx.Matrix2D: a transformation matrix
- this.matrix = null;
-
- // fillStyle: Object: a fill object
- // (see dojox.gfx.defaultLinearGradient,
- // dojox.gfx.defaultRadialGradient,
- // dojox.gfx.defaultPattern,
- // or dojo.Color)
- this.fillStyle = null;
-
- // strokeStyle: Object: a stroke object
- // (see dojox.gfx.defaultStroke)
- this.strokeStyle = null;
-
- // bbox: dojox.gfx.Rectangle: a bounding box of this shape
- // (see dojox.gfx.defaultRect)
- this.bbox = null;
-
- // virtual group structure
-
- // parent: Object: a parent or null
- // (see dojox.gfx.Surface,
- // dojox.gfx.shape.VirtualGroup,
- // or dojox.gfx.Group)
- this.parent = null;
-
- // parentMatrix: dojox.gfx.Matrix2D
- // a transformation matrix inherited from the parent
- this.parentMatrix = null;
- },
-
- // trivial getters
-
- getNode: function(){
- // summary: returns the current DOM Node or null
- return this.rawNode; // Node
- },
- getShape: function(){
- // summary: returns the current shape object or null
- // (see dojox.gfx.defaultPath,
- // dojox.gfx.defaultPolyline,
- // dojox.gfx.defaultRect,
- // dojox.gfx.defaultEllipse,
- // dojox.gfx.defaultCircle,
- // dojox.gfx.defaultLine,
- // or dojox.gfx.defaultImage)
- return this.shape; // Object
- },
- getTransform: function(){
- // summary: returns the current transformation matrix or null
- return this.matrix; // dojox.gfx.Matrix2D
- },
- getFill: function(){
- // summary: returns the current fill object or null
- // (see dojox.gfx.defaultLinearGradient,
- // dojox.gfx.defaultRadialGradient,
- // dojox.gfx.defaultPattern,
- // or dojo.Color)
- return this.fillStyle; // Object
- },
- getStroke: function(){
- // summary: returns the current stroke object or null
- // (see dojox.gfx.defaultStroke)
- return this.strokeStyle; // Object
- },
- getParent: function(){
- // summary: returns the parent or null
- // (see dojox.gfx.Surface,
- // dojox.gfx.shape.VirtualGroup,
- // or dojox.gfx.Group)
- return this.parent; // Object
- },
- getBoundingBox: function(){
- // summary: returns the bounding box or null
- // (see dojox.gfx.defaultRect)
- return this.bbox; // dojox.gfx.Rectangle
- },
- getTransformedBoundingBox: function(){
- // summary: returns an array of four points or null
- // four points represent four corners of the untransformed bounding box
- var b = this.getBoundingBox();
- if(!b){
- return null; // null
- }
- var m = this._getRealMatrix();
- var r = [];
- var g = dojox.gfx.matrix;
- r.push(g.multiplyPoint(m, b.x, b.y));
- r.push(g.multiplyPoint(m, b.x + b.width, b.y));
- r.push(g.multiplyPoint(m, b.x + b.width, b.y + b.height));
- r.push(g.multiplyPoint(m, b.x, b.y + b.height));
- return r; // Array
- },
- getEventSource: function(){
- // summary: returns a Node, which is used as
- // a source of events for this shape
-
- // COULD BE RE-IMPLEMENTED BY THE RENDERER!
-
- return this.rawNode; // Node
- },
-
- // empty settings
-
- setShape: function(shape){
- // summary: sets a shape object
- // (the default implementation simply ignores it)
- // shape: Object: a shape object
- // (see dojox.gfx.defaultPath,
- // dojox.gfx.defaultPolyline,
- // dojox.gfx.defaultRect,
- // dojox.gfx.defaultEllipse,
- // dojox.gfx.defaultCircle,
- // dojox.gfx.defaultLine,
- // or dojox.gfx.defaultImage)
-
- // COULD BE RE-IMPLEMENTED BY THE RENDERER!
-
- this.shape = dojox.gfx.makeParameters(this.shape, shape);
- this.bbox = null;
- return this; // self
- },
- setFill: function(fill){
- // summary: sets a fill object
- // (the default implementation simply ignores it)
- // fill: Object: a fill object
- // (see dojox.gfx.defaultLinearGradient,
- // dojox.gfx.defaultRadialGradient,
- // dojox.gfx.defaultPattern,
- // or dojo.Color)
-
- // COULD BE RE-IMPLEMENTED BY THE RENDERER!
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- if(!fill){
- // don't fill
- this.fillStyle = null;
- return this; // self
- }
- var f = null;
- if(typeof(fill) == "object" && "type" in fill){
- // gradient or pattern
- switch(fill.type){
- case "linear":
- f = dojox.gfx.makeParameters(dojox.gfx.defaultLinearGradient, fill);
- break;
- case "radial":
- f = dojox.gfx.makeParameters(dojox.gfx.defaultRadialGradient, fill);
- break;
- case "pattern":
- f = dojox.gfx.makeParameters(dojox.gfx.defaultPattern, fill);
- break;
- }
- }else{
- // color object
- f = dojox.gfx.normalizeColor(fill);
- }
- this.fillStyle = f;
- return this; // self
- },
- setStroke: function(stroke){
- // summary: sets a stroke object
- // (the default implementation simply ignores it)
- // stroke: Object: a stroke object
- // (see dojox.gfx.defaultStroke)
-
- // COULD BE RE-IMPLEMENTED BY THE RENDERER!
-
- if(!stroke){
- // don't stroke
- this.strokeStyle = null;
- return this; // self
- }
- // normalize the stroke
- if(typeof stroke == "string"){
- stroke = {color: stroke};
- }
- var s = this.strokeStyle = dojox.gfx.makeParameters(dojox.gfx.defaultStroke, stroke);
- s.color = dojox.gfx.normalizeColor(s.color);
- return this; // self
- },
- setTransform: function(matrix){
- // summary: sets a transformation matrix
- // matrix: dojox.gfx.Matrix2D: a matrix or a matrix-like object
- // (see an argument of dojox.gfx.Matrix2D
- // constructor for a list of acceptable arguments)
-
- // COULD BE RE-IMPLEMENTED BY THE RENDERER!
-
- this.matrix = dojox.gfx.matrix.clone(matrix ? dojox.gfx.matrix.normalize(matrix) : dojox.gfx.matrix.identity);
- return this._applyTransform(); // self
- },
-
- _applyTransform: function(){
- // summary: physically sets a matrix
-
- // COULD BE RE-IMPLEMENTED BY THE RENDERER!
-
- return this; // self
- },
-
- // z-index
-
- moveToFront: function(){
- // summary: moves a shape to front of its parent's list of shapes
- var p = this.getParent();
- if(p){
- p._moveChildToFront(this);
- this._moveToFront(); // execute renderer-specific action
- }
- return this; // self
- },
- moveToBack: function(){
- // summary: moves a shape to back of its parent's list of shapes
- var p = this.getParent();
- if(p){
- p._moveChildToBack(this);
- this._moveToBack(); // execute renderer-specific action
- }
- return this;
- },
- _moveToFront: function(){
- // summary: renderer-specific hook, see dojox.gfx.shape.Shape.moveToFront()
-
- // COULD BE RE-IMPLEMENTED BY THE RENDERER!
- },
- _moveToBack: function(){
- // summary: renderer-specific hook, see dojox.gfx.shape.Shape.moveToFront()
-
- // COULD BE RE-IMPLEMENTED BY THE RENDERER!
- },
-
- // apply left & right transformation
-
- applyRightTransform: function(matrix){
- // summary: multiplies the existing matrix with an argument on right side
- // (this.matrix * matrix)
- // matrix: dojox.gfx.Matrix2D: a matrix or a matrix-like object
- // (see an argument of dojox.gfx.Matrix2D
- // constructor for a list of acceptable arguments)
- return matrix ? this.setTransform([this.matrix, matrix]) : this; // self
- },
- applyLeftTransform: function(matrix){
- // summary: multiplies the existing matrix with an argument on left side
- // (matrix * this.matrix)
- // matrix: dojox.gfx.Matrix2D: a matrix or a matrix-like object
- // (see an argument of dojox.gfx.Matrix2D
- // constructor for a list of acceptable arguments)
- return matrix ? this.setTransform([matrix, this.matrix]) : this; // self
- },
- applyTransform: function(matrix){
- // summary: a shortcut for dojox.gfx.Shape.applyRightTransform
- // matrix: dojox.gfx.Matrix2D: a matrix or a matrix-like object
- // (see an argument of dojox.gfx.Matrix2D
- // constructor for a list of acceptable arguments)
- return matrix ? this.setTransform([this.matrix, matrix]) : this; // self
- },
-
- // virtual group methods
-
- removeShape: function(silently){
- // summary: removes the shape from its parent's list of shapes
- // silently: Boolean?: if true, do not redraw a picture yet
- if(this.parent){
- this.parent.remove(this, silently);
- }
- return this; // self
- },
- _setParent: function(parent, matrix){
- // summary: sets a parent
- // parent: Object: a parent or null
- // (see dojox.gfx.Surface,
- // dojox.gfx.shape.VirtualGroup,
- // or dojox.gfx.Group)
- // matrix: dojox.gfx.Matrix2D:
- // a 2D matrix or a matrix-like object
- this.parent = parent;
- return this._updateParentMatrix(matrix); // self
- },
- _updateParentMatrix: function(matrix){
- // summary: updates the parent matrix with new matrix
- // matrix: dojox.gfx.Matrix2D:
- // a 2D matrix or a matrix-like object
- this.parentMatrix = matrix ? dojox.gfx.matrix.clone(matrix) : null;
- return this._applyTransform(); // self
- },
- _getRealMatrix: function(){
- // summary: returns the cumulative ("real") transformation matrix
- // by combining the shape's matrix with its parent's matrix
- var m = this.matrix;
- var p = this.parent;
- while(p){
- if(p.matrix){
- m = dojox.gfx.matrix.multiply(p.matrix, m);
- }
- p = p.parent;
- }
- return m; // dojox.gfx.Matrix2D
- }
-});
-
-dojox.gfx.shape._eventsProcessing = {
- connect: function(name, object, method){
- // summary: connects a handler to an event on this shape
-
- // COULD BE RE-IMPLEMENTED BY THE RENDERER!
-
- return arguments.length > 2 ? // Object
- dojo.connect(this.getEventSource(), name, object, method) :
- dojo.connect(this.getEventSource(), name, object);
- },
- disconnect: function(token){
- // summary: connects a handler by token from an event on this shape
-
- // COULD BE RE-IMPLEMENTED BY THE RENDERER!
-
- dojo.disconnect(token);
- }
-};
-dojo.extend(dojox.gfx.Shape, dojox.gfx.shape._eventsProcessing);
-
-dojox.gfx.shape.Container = {
- // summary: a container of shapes, which can be used
- // as a foundation for renderer-specific groups, or as a way
- // to logically group shapes (e.g, to propagate matricies)
-
- _init: function() {
- // children: Array: a list of children
- this.children = [];
- },
-
- // group management
-
- add: function(shape){
- // summary: adds a shape to the list
- // shape: dojox.gfx.Shape: a shape
- var oldParent = shape.getParent();
- if(oldParent){
- oldParent.remove(shape, true);
- }
- this.children.push(shape);
- return shape._setParent(this, this._getRealMatrix()); // self
- },
- remove: function(shape, silently){
- // summary: removes a shape from the list
- // silently: Boolean?: if true, do not redraw a picture yet
- for(var i = 0; i < this.children.length; ++i){
- if(this.children[i] == shape){
- if(silently){
- // skip for now
- }else{
- shape._setParent(null, null);
- }
- this.children.splice(i, 1);
- break;
- }
- }
- return this; // self
- },
- clear: function(){
- // summary: removes all shapes from a group/surface
- this.children = [];
- return this; // self
- },
-
- // moving child nodes
-
- _moveChildToFront: function(shape){
- // summary: moves a shape to front of the list of shapes
- for(var i = 0; i < this.children.length; ++i){
- if(this.children[i] == shape){
- this.children.splice(i, 1);
- this.children.push(shape);
- break;
- }
- }
- return this; // self
- },
- _moveChildToBack: function(shape){
- // summary: moves a shape to back of the list of shapes
- for(var i = 0; i < this.children.length; ++i){
- if(this.children[i] == shape){
- this.children.splice(i, 1);
- this.children.unshift(shape);
- break;
- }
- }
- return this; // self
- }
-};
-
-dojo.declare("dojox.gfx.shape.Surface", null, {
- // summary: a surface object to be used for drawings
- constructor: function(){
- // underlying node
- this.rawNode = null;
- },
- getEventSource: function(){
- // summary: returns a node, which can be used to attach event listeners
- return this.rawNode; // Node
- },
- _getRealMatrix: function(){
- // summary: always returns the identity matrix
- return null; // dojox.gfx.Matrix2D
- }
-});
-
-dojo.extend(dojox.gfx.shape.Surface, dojox.gfx.shape._eventsProcessing);
-
-dojo.declare("dojox.gfx.Point", null, {
- // summary: a hypothetical 2D point to be used for drawings - {x, y}
- // description: This object is defined for documentation purposes.
- // You should use the naked object instead: {x: 1, y: 2}.
-});
-
-dojo.declare("dojox.gfx.Rectangle", null, {
- // summary: a hypothetical rectangle - {x, y, width, height}
- // description: This object is defined for documentation purposes.
- // You should use the naked object instead: {x: 1, y: 2, width: 100, height: 200}.
-});
-
-dojo.declare("dojox.gfx.shape.Rect", dojox.gfx.Shape, {
- // summary: a generic rectangle
- constructor: function(rawNode) {
- // rawNode: Node: a DOM Node
- this.shape = dojo.clone(dojox.gfx.defaultRect);
- this.rawNode = rawNode;
- },
- getBoundingBox: function(){
- // summary: returns the bounding box (its shape in this case)
- return this.shape; // dojox.gfx.Rectangle
- }
-});
-
-dojo.declare("dojox.gfx.shape.Ellipse", dojox.gfx.Shape, {
- // summary: a generic ellipse
- constructor: function(rawNode) {
- // rawNode: Node: a DOM Node
- this.shape = dojo.clone(dojox.gfx.defaultEllipse);
- this.rawNode = rawNode;
- },
- getBoundingBox: function(){
- // summary: returns the bounding box
- if(!this.bbox){
- var shape = this.shape;
- this.bbox = {x: shape.cx - shape.rx, y: shape.cy - shape.ry,
- width: 2 * shape.rx, height: 2 * shape.ry};
- }
- return this.bbox; // dojox.gfx.Rectangle
- }
-});
-
-dojo.declare("dojox.gfx.shape.Circle", dojox.gfx.Shape, {
- // summary: a generic circle
- // (this is a helper object, which is defined for convenience)
- constructor: function(rawNode) {
- // rawNode: Node: a DOM Node
- this.shape = dojo.clone(dojox.gfx.defaultCircle);
- this.rawNode = rawNode;
- },
- getBoundingBox: function(){
- // summary: returns the bounding box
- if(!this.bbox){
- var shape = this.shape;
- this.bbox = {x: shape.cx - shape.r, y: shape.cy - shape.r,
- width: 2 * shape.r, height: 2 * shape.r};
- }
- return this.bbox; // dojox.gfx.Rectangle
- }
+if(!dojo._hasResource["dojox.gfx.shape"]){
+dojo._hasResource["dojox.gfx.shape"]=true;
+dojo.provide("dojox.gfx.shape");
+dojo.require("dojox.gfx._base");
+dojo.declare("dojox.gfx.Shape",null,{constructor:function(){
+this.rawNode=null;
+this.shape=null;
+this.matrix=null;
+this.fillStyle=null;
+this.strokeStyle=null;
+this.bbox=null;
+this.parent=null;
+this.parentMatrix=null;
+},getNode:function(){
+return this.rawNode;
+},getShape:function(){
+return this.shape;
+},getTransform:function(){
+return this.matrix;
+},getFill:function(){
+return this.fillStyle;
+},getStroke:function(){
+return this.strokeStyle;
+},getParent:function(){
+return this.parent;
+},getBoundingBox:function(){
+return this.bbox;
+},getTransformedBoundingBox:function(){
+var b=this.getBoundingBox();
+if(!b){
+return null;
+}
+var m=this._getRealMatrix();
+var r=[];
+var g=dojox.gfx.matrix;
+r.push(g.multiplyPoint(m,b.x,b.y));
+r.push(g.multiplyPoint(m,b.x+b.width,b.y));
+r.push(g.multiplyPoint(m,b.x+b.width,b.y+b.height));
+r.push(g.multiplyPoint(m,b.x,b.y+b.height));
+return r;
+},getEventSource:function(){
+return this.rawNode;
+},setShape:function(_1){
+this.shape=dojox.gfx.makeParameters(this.shape,_1);
+this.bbox=null;
+return this;
+},setFill:function(_2){
+if(!_2){
+this.fillStyle=null;
+return this;
+}
+var f=null;
+if(typeof (_2)=="object"&&"type" in _2){
+switch(_2.type){
+case "linear":
+f=dojox.gfx.makeParameters(dojox.gfx.defaultLinearGradient,_2);
+break;
+case "radial":
+f=dojox.gfx.makeParameters(dojox.gfx.defaultRadialGradient,_2);
+break;
+case "pattern":
+f=dojox.gfx.makeParameters(dojox.gfx.defaultPattern,_2);
+break;
+}
+}else{
+f=dojox.gfx.normalizeColor(_2);
+}
+this.fillStyle=f;
+return this;
+},setStroke:function(_3){
+if(!_3){
+this.strokeStyle=null;
+return this;
+}
+if(typeof _3=="string"||dojo.isArray(_3)||_3 instanceof dojo.Color){
+_3={color:_3};
+}
+var s=this.strokeStyle=dojox.gfx.makeParameters(dojox.gfx.defaultStroke,_3);
+s.color=dojox.gfx.normalizeColor(s.color);
+return this;
+},setTransform:function(_4){
+this.matrix=dojox.gfx.matrix.clone(_4?dojox.gfx.matrix.normalize(_4):dojox.gfx.matrix.identity);
+return this._applyTransform();
+},_applyTransform:function(){
+return this;
+},moveToFront:function(){
+var p=this.getParent();
+if(p){
+p._moveChildToFront(this);
+this._moveToFront();
+}
+return this;
+},moveToBack:function(){
+var p=this.getParent();
+if(p){
+p._moveChildToBack(this);
+this._moveToBack();
+}
+return this;
+},_moveToFront:function(){
+},_moveToBack:function(){
+},applyRightTransform:function(_5){
+return _5?this.setTransform([this.matrix,_5]):this;
+},applyLeftTransform:function(_6){
+return _6?this.setTransform([_6,this.matrix]):this;
+},applyTransform:function(_7){
+return _7?this.setTransform([this.matrix,_7]):this;
+},removeShape:function(_8){
+if(this.parent){
+this.parent.remove(this,_8);
+}
+return this;
+},_setParent:function(_9,_a){
+this.parent=_9;
+return this._updateParentMatrix(_a);
+},_updateParentMatrix:function(_b){
+this.parentMatrix=_b?dojox.gfx.matrix.clone(_b):null;
+return this._applyTransform();
+},_getRealMatrix:function(){
+var m=this.matrix;
+var p=this.parent;
+while(p){
+if(p.matrix){
+m=dojox.gfx.matrix.multiply(p.matrix,m);
+}
+p=p.parent;
+}
+return m;
+}});
+dojox.gfx.shape._eventsProcessing={connect:function(_c,_d,_e){
+return arguments.length>2?dojo.connect(this.getEventSource(),_c,_d,_e):dojo.connect(this.getEventSource(),_c,_d);
+},disconnect:function(_f){
+dojo.disconnect(_f);
+}};
+dojo.extend(dojox.gfx.Shape,dojox.gfx.shape._eventsProcessing);
+dojox.gfx.shape.Container={_init:function(){
+this.children=[];
+},add:function(_10){
+var _11=_10.getParent();
+if(_11){
+_11.remove(_10,true);
+}
+this.children.push(_10);
+return _10._setParent(this,this._getRealMatrix());
+},remove:function(_12,_13){
+for(var i=0;i<this.children.length;++i){
+if(this.children[i]==_12){
+if(_13){
+}else{
+_12.parent=null;
+_12.parentMatrix=null;
+}
+this.children.splice(i,1);
+break;
+}
+}
+return this;
+},clear:function(){
+this.children=[];
+return this;
+},_moveChildToFront:function(_14){
+for(var i=0;i<this.children.length;++i){
+if(this.children[i]==_14){
+this.children.splice(i,1);
+this.children.push(_14);
+break;
+}
+}
+return this;
+},_moveChildToBack:function(_15){
+for(var i=0;i<this.children.length;++i){
+if(this.children[i]==_15){
+this.children.splice(i,1);
+this.children.unshift(_15);
+break;
+}
+}
+return this;
+}};
+dojo.declare("dojox.gfx.shape.Surface",null,{constructor:function(){
+this.rawNode=null;
+this._parent=null;
+this._nodes=[];
+this._events=[];
+},destroy:function(){
+dojo.forEach(this._nodes,dojo.destroy);
+this._nodes=[];
+dojo.forEach(this._events,dojo.disconnect);
+this._events=[];
+this.rawNode=null;
+if(dojo.isIE){
+while(this._parent.lastChild){
+dojo.destroy(this._parent.lastChild);
+}
+}else{
+this._parent.innerHTML="";
+}
+this._parent=null;
+},getEventSource:function(){
+return this.rawNode;
+},_getRealMatrix:function(){
+return null;
+},isLoaded:true,onLoad:function(_16){
+},whenLoaded:function(_17,_18){
+var f=dojo.hitch(_17,_18);
+if(this.isLoaded){
+f(this);
+}else{
+var h=dojo.connect(this,"onLoad",function(_19){
+dojo.disconnect(h);
+f(_19);
});
-
-dojo.declare("dojox.gfx.shape.Line", dojox.gfx.Shape, {
- // summary: a generic line
- // (this is a helper object, which is defined for convenience)
- constructor: function(rawNode) {
- // rawNode: Node: a DOM Node
- this.shape = dojo.clone(dojox.gfx.defaultLine);
- this.rawNode = rawNode;
- },
- getBoundingBox: function(){
- // summary: returns the bounding box
- if(!this.bbox){
- var shape = this.shape;
- this.bbox = {
- x: Math.min(shape.x1, shape.x2),
- y: Math.min(shape.y1, shape.y2),
- width: Math.abs(shape.x2 - shape.x1),
- height: Math.abs(shape.y2 - shape.y1)
- };
- }
- return this.bbox; // dojox.gfx.Rectangle
- }
-});
-
-dojo.declare("dojox.gfx.shape.Polyline", dojox.gfx.Shape, {
- // summary: a generic polyline/polygon
- // (this is a helper object, which is defined for convenience)
- constructor: function(rawNode) {
- // rawNode: Node: a DOM Node
- this.shape = dojo.clone(dojox.gfx.defaultPolyline);
- this.rawNode = rawNode;
- },
- setShape: function(points, closed){
- // summary: sets a polyline/polygon shape object
- // points: Object: a polyline/polygon shape object
- // closed: Boolean: close the polyline to make a polygon
- if(points && points instanceof Array){
- // points: Array: an array of points
- dojox.gfx.Shape.prototype.setShape.call(this, {points: points});
- if(closed && this.shape.points.length){
- this.shape.points.push(this.shape.points[0]);
- }
- }else{
- dojox.gfx.Shape.prototype.setShape.call(this, points);
- }
- return this; // self
- },
- getBoundingBox: function(){
- // summary: returns the bounding box
- if(!this.bbox && this.shape.points.length){
- var p = this.shape.points;
- var l = p.length;
- var t = p[0];
- var bbox = {l: t.x, t: t.y, r: t.x, b: t.y};
- for(var i = 1; i < l; ++i){
- t = p[i];
- if(bbox.l > t.x) bbox.l = t.x;
- if(bbox.r < t.x) bbox.r = t.x;
- if(bbox.t > t.y) bbox.t = t.y;
- if(bbox.b < t.y) bbox.b = t.y;
- }
- this.bbox = {
- x: bbox.l,
- y: bbox.t,
- width: bbox.r - bbox.l,
- height: bbox.b - bbox.t
- };
- }
- return this.bbox; // dojox.gfx.Rectangle
- }
-});
-
-dojo.declare("dojox.gfx.shape.Image", dojox.gfx.Shape, {
- // summary: a generic image
- // (this is a helper object, which is defined for convenience)
- constructor: function(rawNode) {
- // rawNode: Node: a DOM Node
- this.shape = dojo.clone(dojox.gfx.defaultImage);
- this.rawNode = rawNode;
- },
- getBoundingBox: function(){
- // summary: returns the bounding box (its shape in this case)
- return this.shape; // dojox.gfx.Rectangle
- },
- setStroke: function(){
- // summary: ignore setting a stroke style
- return this; // self
- },
- setFill: function(){
- // summary: ignore setting a fill style
- return this; // self
- }
-});
-
-dojo.declare("dojox.gfx.shape.Text", dojox.gfx.Shape, {
- // summary: a generic text
- constructor: function(rawNode) {
- // rawNode: Node: a DOM Node
- this.fontStyle = null;
- this.shape = dojo.clone(dojox.gfx.defaultText);
- this.rawNode = rawNode;
- },
- setFont: function(newFont){
- // summary: sets a font for text
- // newFont: Object: a font object (see dojox.gfx.defaultFont) or a font string
- this.fontStyle = typeof newFont == "string" ? dojox.gfx.splitFontString(newFont) :
- dojox.gfx.makeParameters(dojox.gfx.defaultFont, newFont);
- this._setFont();
- return this; // self
- }
-});
-
-dojox.gfx.shape.Creator = {
- // summary: shape creators
- createShape: function(shape){
- // summary: creates a shape object based on its type; it is meant to be used
- // by group-like objects
- // shape: Object: a shape descriptor object
- switch(shape.type){
- case dojox.gfx.defaultPath.type: return this.createPath(shape);
- case dojox.gfx.defaultRect.type: return this.createRect(shape);
- case dojox.gfx.defaultCircle.type: return this.createCircle(shape);
- case dojox.gfx.defaultEllipse.type: return this.createEllipse(shape);
- case dojox.gfx.defaultLine.type: return this.createLine(shape);
- case dojox.gfx.defaultPolyline.type: return this.createPolyline(shape);
- case dojox.gfx.defaultImage.type: return this.createImage(shape);
- case dojox.gfx.defaultText.type: return this.createText(shape);
- case dojox.gfx.defaultTextPath.type: return this.createTextPath(shape);
- }
- return null;
- },
- createGroup: function(){
- // summary: creates an SVG group shape
- return this.createObject(dojox.gfx.Group); // dojox.gfx.Group
- },
- createRect: function(rect){
- // summary: creates an SVG rectangle shape
- // rect: Object: a path object (see dojox.gfx.defaultRect)
- return this.createObject(dojox.gfx.Rect, rect); // dojox.gfx.Rect
- },
- createEllipse: function(ellipse){
- // summary: creates an SVG ellipse shape
- // ellipse: Object: an ellipse object (see dojox.gfx.defaultEllipse)
- return this.createObject(dojox.gfx.Ellipse, ellipse); // dojox.gfx.Ellipse
- },
- createCircle: function(circle){
- // summary: creates an SVG circle shape
- // circle: Object: a circle object (see dojox.gfx.defaultCircle)
- return this.createObject(dojox.gfx.Circle, circle); // dojox.gfx.Circle
- },
- createLine: function(line){
- // summary: creates an SVG line shape
- // line: Object: a line object (see dojox.gfx.defaultLine)
- return this.createObject(dojox.gfx.Line, line); // dojox.gfx.Line
- },
- createPolyline: function(points){
- // summary: creates an SVG polyline/polygon shape
- // points: Object: a points object (see dojox.gfx.defaultPolyline)
- // or an Array of points
- return this.createObject(dojox.gfx.Polyline, points); // dojox.gfx.Polyline
- },
- createImage: function(image){
- // summary: creates an SVG image shape
- // image: Object: an image object (see dojox.gfx.defaultImage)
- return this.createObject(dojox.gfx.Image, image); // dojox.gfx.Image
- },
- createText: function(text){
- // summary: creates an SVG text shape
- // text: Object: a text object (see dojox.gfx.defaultText)
- return this.createObject(dojox.gfx.Text, text); // dojox.gfx.Text
- },
- createPath: function(path){
- // summary: creates an SVG path shape
- // path: Object: a path object (see dojox.gfx.defaultPath)
- return this.createObject(dojox.gfx.Path, path); // dojox.gfx.Path
- },
- createTextPath: function(text){
- // summary: creates an SVG text shape
- // text: Object: a textpath object (see dojox.gfx.defaultTextPath)
- return this.createObject(dojox.gfx.TextPath, {}).setText(text); // dojox.gfx.TextPath
- },
- createObject: function(shapeType, rawShape){
- // summary: creates an instance of the passed shapeType class
- // shapeType: Function: a class constructor to create an instance of
- // rawShape: Object: properties to be passed in to the classes "setShape" method
-
- // SHOULD BE RE-IMPLEMENTED BY THE RENDERER!
-
- return null; // dojox.gfx.Shape
- }
-};
-
+}
+}});
+dojo.extend(dojox.gfx.shape.Surface,dojox.gfx.shape._eventsProcessing);
+dojo.declare("dojox.gfx.Point",null,{});
+dojo.declare("dojox.gfx.Rectangle",null,{});
+dojo.declare("dojox.gfx.shape.Rect",dojox.gfx.Shape,{constructor:function(_1a){
+this.shape=dojox.gfx.getDefault("Rect");
+this.rawNode=_1a;
+},getBoundingBox:function(){
+return this.shape;
+}});
+dojo.declare("dojox.gfx.shape.Ellipse",dojox.gfx.Shape,{constructor:function(_1b){
+this.shape=dojox.gfx.getDefault("Ellipse");
+this.rawNode=_1b;
+},getBoundingBox:function(){
+if(!this.bbox){
+var _1c=this.shape;
+this.bbox={x:_1c.cx-_1c.rx,y:_1c.cy-_1c.ry,width:2*_1c.rx,height:2*_1c.ry};
+}
+return this.bbox;
+}});
+dojo.declare("dojox.gfx.shape.Circle",dojox.gfx.Shape,{constructor:function(_1d){
+this.shape=dojox.gfx.getDefault("Circle");
+this.rawNode=_1d;
+},getBoundingBox:function(){
+if(!this.bbox){
+var _1e=this.shape;
+this.bbox={x:_1e.cx-_1e.r,y:_1e.cy-_1e.r,width:2*_1e.r,height:2*_1e.r};
+}
+return this.bbox;
+}});
+dojo.declare("dojox.gfx.shape.Line",dojox.gfx.Shape,{constructor:function(_1f){
+this.shape=dojox.gfx.getDefault("Line");
+this.rawNode=_1f;
+},getBoundingBox:function(){
+if(!this.bbox){
+var _20=this.shape;
+this.bbox={x:Math.min(_20.x1,_20.x2),y:Math.min(_20.y1,_20.y2),width:Math.abs(_20.x2-_20.x1),height:Math.abs(_20.y2-_20.y1)};
+}
+return this.bbox;
+}});
+dojo.declare("dojox.gfx.shape.Polyline",dojox.gfx.Shape,{constructor:function(_21){
+this.shape=dojox.gfx.getDefault("Polyline");
+this.rawNode=_21;
+},setShape:function(_22,_23){
+if(_22&&_22 instanceof Array){
+dojox.gfx.Shape.prototype.setShape.call(this,{points:_22});
+if(_23&&this.shape.points.length){
+this.shape.points.push(this.shape.points[0]);
+}
+}else{
+dojox.gfx.Shape.prototype.setShape.call(this,_22);
+}
+return this;
+},_normalizePoints:function(){
+var p=this.shape.points,l=p&&p.length;
+if(l&&typeof p[0]=="number"){
+var _24=[];
+for(var i=0;i<l;i+=2){
+_24.push({x:p[i],y:p[i+1]});
+}
+this.shape.points=_24;
+}
+},getBoundingBox:function(){
+if(!this.bbox&&this.shape.points.length){
+var p=this.shape.points;
+var l=p.length;
+var t=p[0];
+var _25={l:t.x,t:t.y,r:t.x,b:t.y};
+for(var i=1;i<l;++i){
+t=p[i];
+if(_25.l>t.x){
+_25.l=t.x;
+}
+if(_25.r<t.x){
+_25.r=t.x;
}
+if(_25.t>t.y){
+_25.t=t.y;
+}
+if(_25.b<t.y){
+_25.b=t.y;
+}
+}
+this.bbox={x:_25.l,y:_25.t,width:_25.r-_25.l,height:_25.b-_25.t};
+}
+return this.bbox;
+}});
+dojo.declare("dojox.gfx.shape.Image",dojox.gfx.Shape,{constructor:function(_26){
+this.shape=dojox.gfx.getDefault("Image");
+this.rawNode=_26;
+},getBoundingBox:function(){
+return this.shape;
+},setStroke:function(){
+return this;
+},setFill:function(){
+return this;
+}});
+dojo.declare("dojox.gfx.shape.Text",dojox.gfx.Shape,{constructor:function(_27){
+this.fontStyle=null;
+this.shape=dojox.gfx.getDefault("Text");
+this.rawNode=_27;
+},getFont:function(){
+return this.fontStyle;
+},setFont:function(_28){
+this.fontStyle=typeof _28=="string"?dojox.gfx.splitFontString(_28):dojox.gfx.makeParameters(dojox.gfx.defaultFont,_28);
+this._setFont();
+return this;
+}});
+dojox.gfx.shape.Creator={createShape:function(_29){
+var gfx=dojox.gfx;
+switch(_29.type){
+case gfx.defaultPath.type:
+return this.createPath(_29);
+case gfx.defaultRect.type:
+return this.createRect(_29);
+case gfx.defaultCircle.type:
+return this.createCircle(_29);
+case gfx.defaultEllipse.type:
+return this.createEllipse(_29);
+case gfx.defaultLine.type:
+return this.createLine(_29);
+case gfx.defaultPolyline.type:
+return this.createPolyline(_29);
+case gfx.defaultImage.type:
+return this.createImage(_29);
+case gfx.defaultText.type:
+return this.createText(_29);
+case gfx.defaultTextPath.type:
+return this.createTextPath(_29);
+}
+return null;
+},createGroup:function(){
+return this.createObject(dojox.gfx.Group);
+},createRect:function(_2a){
+return this.createObject(dojox.gfx.Rect,_2a);
+},createEllipse:function(_2b){
+return this.createObject(dojox.gfx.Ellipse,_2b);
+},createCircle:function(_2c){
+return this.createObject(dojox.gfx.Circle,_2c);
+},createLine:function(_2d){
+return this.createObject(dojox.gfx.Line,_2d);
+},createPolyline:function(_2e){
+return this.createObject(dojox.gfx.Polyline,_2e);
+},createImage:function(_2f){
+return this.createObject(dojox.gfx.Image,_2f);
+},createText:function(_30){
+return this.createObject(dojox.gfx.Text,_30);
+},createPath:function(_31){
+return this.createObject(dojox.gfx.Path,_31);
+},createTextPath:function(_32){
+return this.createObject(dojox.gfx.TextPath,{}).setText(_32);
+},createObject:function(_33,_34){
+return null;
+}};
+}
diff --git a/js/dojo/dojox/gfx/silverlight.js b/js/dojo/dojox/gfx/silverlight.js
--- a/js/dojo/dojox/gfx/silverlight.js
+++ b/js/dojo/dojox/gfx/silverlight.js
@@ -1,693 +1,506 @@
-if(!dojo._hasResource["dojox.gfx.silverlight"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.gfx.silverlight"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.gfx.silverlight"]){
+dojo._hasResource["dojox.gfx.silverlight"]=true;
dojo.provide("dojox.gfx.silverlight");
-
dojo.require("dojox.gfx._base");
dojo.require("dojox.gfx.shape");
dojo.require("dojox.gfx.path");
-
dojo.experimental("dojox.gfx.silverlight");
-
-dojox.gfx.silverlight.dasharray = {
- solid: "none",
- shortdash: [4, 1],
- shortdot: [1, 1],
- shortdashdot: [4, 1, 1, 1],
- shortdashdotdot: [4, 1, 1, 1, 1, 1],
- dot: [1, 3],
- dash: [4, 3],
- longdash: [8, 3],
- dashdot: [4, 3, 1, 3],
- longdashdot: [8, 3, 1, 3],
- longdashdotdot: [8, 3, 1, 3, 1, 3]
-};
-
-dojox.gfx.silverlight.fontweight = {
- normal: 400,
- bold: 700
-};
-
-dojox.gfx.silverlight.caps = {butt: "Flat", round: "Round", square: "Square"};
-dojox.gfx.silverlight.joins = {bevel: "Bevel", round: "Round"};
-
-dojox.gfx.silverlight.fonts = {
- serif: "Times New Roman",
- times: "Times New Roman",
- "sans-serif": "Arial",
- helvetica: "Arial",
- monotone: "Courier New",
- courier: "Courier New"
-};
-
-dojox.gfx.silverlight.hexColor = function(/*String|Array|dojo.Color*/ color){
- // summary: converts a color object to a Silverlight hex color string (#aarrggbb)
- var c = dojox.gfx.normalizeColor(color),
- t = c.toHex(), a = Math.round(c.a * 255);
- a = (a < 0 ? 0 : a > 255 ? 255 : a).toString(16);
- return "#" + (a.length < 2 ? "0" + a : a) + t.slice(1); // String
+dojox.gfx.silverlight.dasharray={solid:"none",shortdash:[4,1],shortdot:[1,1],shortdashdot:[4,1,1,1],shortdashdotdot:[4,1,1,1,1,1],dot:[1,3],dash:[4,3],longdash:[8,3],dashdot:[4,3,1,3],longdashdot:[8,3,1,3],longdashdotdot:[8,3,1,3,1,3]};
+dojox.gfx.silverlight.fontweight={normal:400,bold:700};
+dojox.gfx.silverlight.caps={butt:"Flat",round:"Round",square:"Square"};
+dojox.gfx.silverlight.joins={bevel:"Bevel",round:"Round"};
+dojox.gfx.silverlight.fonts={serif:"Times New Roman",times:"Times New Roman","sans-serif":"Arial",helvetica:"Arial",monotone:"Courier New",courier:"Courier New"};
+dojox.gfx.silverlight.hexColor=function(_1){
+var c=dojox.gfx.normalizeColor(_1),t=c.toHex(),a=Math.round(c.a*255);
+a=(a<0?0:a>255?255:a).toString(16);
+return "#"+(a.length<2?"0"+a:a)+t.slice(1);
};
-
-dojo.extend(dojox.gfx.Shape, {
- // summary: Silverlight-specific implementation of dojox.gfx.Shape methods
-
- setFill: function(fill){
- // summary: sets a fill object (Silverlight)
- // fill: Object: a fill object
- // (see dojox.gfx.defaultLinearGradient,
- // dojox.gfx.defaultRadialGradient,
- // dojox.gfx.defaultPattern,
- // or dojo.Color)
-
- var p = this.rawNode.getHost().content, r = this.rawNode, f;
- if(!fill){
- // don't fill
- this.fillStyle = null;
- this._setFillAttr(null);
- return this; // self
- }
- if(typeof(fill) == "object" && "type" in fill){
- // gradient
- switch(fill.type){
- case "linear":
- this.fillStyle = f = dojox.gfx.makeParameters(dojox.gfx.defaultLinearGradient, fill);
- var lgb = p.createFromXaml("<LinearGradientBrush/>");
- lgb.mappingMode = "Absolute";
- lgb.startPoint = f.x1 + "," + f.y1;
- lgb.endPoint = f.x2 + "," + f.y2;
- dojo.forEach(f.colors, function(c){
- var t = p.createFromXaml("<GradientStop/>");
- t.offset = c.offset;
- t.color = dojox.gfx.silverlight.hexColor(c.color);
- lgb.gradientStops.add(t);
- });
- this._setFillAttr(lgb);
- break;
- case "radial":
- this.fillStyle = f = dojox.gfx.makeParameters(dojox.gfx.defaultRadialGradient, fill);
- var rgb = p.createFromXaml("<RadialGradientBrush/>"), w = r.width, h = r.height,
- l = this.rawNode["Canvas.Left"], t = this.rawNode["Canvas.Top"];
- rgb.center = (f.cx - l) / w + "," + (f.cy - t) / h;
- rgb.radiusX = f.r / w;
- rgb.radiusY = f.r / h;
- dojo.forEach(f.colors, function(c){
- var t = p.createFromXaml("<GradientStop/>");
- t.offset = c.offset;
- t.color = dojox.gfx.silverlight.hexColor(c.color);
- rgb.gradientStops.add(t);
- });
- this._setFillAttr(rgb);
- break;
- case "pattern":
- // don't fill: Silverlight doesn't define TileBrush for some reason
- this.fillStyle = null;
- this._setFillAttr(null);
- break;
- }
- return this; // self
- }
- // color object
- this.fillStyle = f = dojox.gfx.normalizeColor(fill);
- var scb = p.createFromXaml("<SolidColorBrush/>");
- scb.color = f.toHex();
- scb.opacity = f.a;
- this._setFillAttr(scb);
- return this; // self
- },
- _setFillAttr: function(f){
- this.rawNode.fill = f;
- },
-
- setStroke: function(stroke){
- // summary: sets a stroke object (Silverlight)
- // stroke: Object: a stroke object
- // (see dojox.gfx.defaultStroke)
-
- var p = this.rawNode.getHost().content, r = this.rawNode;
- if(!stroke){
- // don't stroke
- this.strokeStyle = null;
- r.stroke = null;
- return this;
- }
- // normalize the stroke
- if(typeof stroke == "string"){
- stroke = {color: stroke};
- }
- var s = this.strokeStyle = dojox.gfx.makeParameters(dojox.gfx.defaultStroke, stroke);
- s.color = dojox.gfx.normalizeColor(s.color);
- // generate attributes
- if(s){
- var scb = p.createFromXaml("<SolidColorBrush/>");
- scb.color = s.color.toHex();
- scb.opacity = s.color.a;
- r.stroke = scb;
- r.strokeThickness = s.width;
- r.strokeStartLineCap = r.strokeEndLineCap = r.strokeDashCap =
- dojox.gfx.silverlight.caps[s.cap];
- if(typeof s.join == "number"){
- r.strokeLineJoin = "Miter";
- r.strokeMiterLimit = s.join;
- }else{
- r.strokeLineJoin = dojox.gfx.silverlight.joins[s.join];
- }
- var da = s.style.toLowerCase();
- if(da in dojox.gfx.silverlight.dasharray){ da = dojox.gfx.silverlight.dasharray[da]; }
- if(da instanceof Array){
- da = dojo.clone(da);
- /*
- for(var i = 0; i < da.length; ++i){
- da[i] *= s.width;
- }
- */
- if(s.cap != "butt"){
- for(var i = 0; i < da.length; i += 2){
- //da[i] -= s.width;
- --da[i]
- if(da[i] < 1){ da[i] = 1; }
- }
- for(var i = 1; i < da.length; i += 2){
- //da[i] += s.width;
- ++da[i];
- }
- }
- r.strokeDashArray = da.join(",");
- }else{
- r.strokeDashArray = null;
- }
- }
- return this; // self
- },
-
- _getParentSurface: function(){
- var surface = this.parent;
- for(; surface && !(surface instanceof dojox.gfx.Surface); surface = surface.parent);
- return surface;
- },
-
- _applyTransform: function() {
- var tm = this.matrix, r = this.rawNode;
- if(tm){
- var p = this.rawNode.getHost().content,
- m = p.createFromXaml("<MatrixTransform/>"),
- mm = p.createFromXaml("<Matrix/>");
- mm.m11 = tm.xx;
- mm.m21 = tm.xy;
- mm.m12 = tm.yx;
- mm.m22 = tm.yy;
- mm.offsetX = tm.dx;
- mm.offsetY = tm.dy;
- m.matrix = mm;
- r.renderTransform = m;
- }else{
- r.renderTransform = null;
- }
- return this;
- },
-
- setRawNode: function(rawNode){
- // summary:
- // assigns and clears the underlying node that will represent this
- // shape. Once set, transforms, gradients, etc, can be applied.
- // (no fill & stroke by default)
- rawNode.fill = null;
- rawNode.stroke = null;
- this.rawNode = rawNode;
- },
-
- // move family
-
- _moveToFront: function(){
- // summary: moves a shape to front of its parent's list of shapes (Silverlight)
- var c = this.parent.rawNode.children, r = this.rawNode;
- c.remove(r);
- c.add(r);
- return this; // self
- },
- _moveToBack: function(){
- // summary: moves a shape to back of its parent's list of shapes (Silverlight)
- var c = this.parent.rawNode.children, r = this.rawNode;
- c.remove(r);
- c.insert(0, r);
- return this; // self
- }
+dojo.extend(dojox.gfx.Shape,{setFill:function(_2){
+var p=this.rawNode.getHost().content,r=this.rawNode,f;
+if(!_2){
+this.fillStyle=null;
+this._setFillAttr(null);
+return this;
+}
+if(typeof (_2)=="object"&&"type" in _2){
+switch(_2.type){
+case "linear":
+this.fillStyle=f=dojox.gfx.makeParameters(dojox.gfx.defaultLinearGradient,_2);
+var _3=p.createFromXaml("<LinearGradientBrush/>");
+_3.mappingMode="Absolute";
+_3.startPoint=f.x1+","+f.y1;
+_3.endPoint=f.x2+","+f.y2;
+dojo.forEach(f.colors,function(c){
+var t=p.createFromXaml("<GradientStop/>");
+t.offset=c.offset;
+t.color=dojox.gfx.silverlight.hexColor(c.color);
+_3.gradientStops.add(t);
});
-
-dojo.declare("dojox.gfx.Group", dojox.gfx.Shape, {
- // summary: a group shape (Silverlight), which can be used
- // to logically group shapes (e.g, to propagate matricies)
- constructor: function(){
- dojox.gfx.silverlight.Container._init.call(this);
- },
- setRawNode: function(rawNode){
- // summary: sets a raw Silverlight node to be used by this shape
- // rawNode: Node: an Silverlight node
- this.rawNode = rawNode;
- }
-});
-dojox.gfx.Group.nodeType = "Canvas";
-
-dojo.declare("dojox.gfx.Rect", dojox.gfx.shape.Rect, {
- // summary: a rectangle shape (Silverlight)
- setShape: function(newShape){
- // summary: sets a rectangle shape object (Silverlight)
- // newShape: Object: a rectangle shape object
- this.shape = dojox.gfx.makeParameters(this.shape, newShape);
- this.bbox = null;
- var r = this.rawNode, n = this.shape;
- r["Canvas.Left"] = n.x;
- r["Canvas.Top"] = n.y;
- r.width = n.width;
- r.height = n.height;
- r.radiusX = r.radiusY = n.r;
- return this; // self
- }
-});
-dojox.gfx.Rect.nodeType = "Rectangle";
-
-dojo.declare("dojox.gfx.Ellipse", dojox.gfx.shape.Ellipse, {
- // summary: an ellipse shape (Silverlight)
- setShape: function(newShape){
- // summary: sets an ellipse shape object (Silverlight)
- // newShape: Object: an ellipse shape object
- this.shape = dojox.gfx.makeParameters(this.shape, newShape);
- this.bbox = null;
- var r = this.rawNode, n = this.shape;
- r["Canvas.Left"] = n.cx - n.rx;
- r["Canvas.Top"] = n.cy - n.ry;
- r.width = 2 * n.rx;
- r.height = 2 * n.ry;
- return this; // self
- }
-});
-dojox.gfx.Ellipse.nodeType = "Ellipse";
-
-dojo.declare("dojox.gfx.Circle", dojox.gfx.shape.Circle, {
- // summary: a circle shape (Silverlight)
- setShape: function(newShape){
- // summary: sets a circle shape object (Silverlight)
- // newShape: Object: a circle shape object
- this.shape = dojox.gfx.makeParameters(this.shape, newShape);
- this.bbox = null;
- var r = this.rawNode, n = this.shape;
- r["Canvas.Left"] = n.cx - n.r;
- r["Canvas.Top"] = n.cy - n.r;
- r.width = r.height = 2 * n.r;
- return this; // self
- }
-});
-dojox.gfx.Circle.nodeType = "Ellipse";
-
-dojo.declare("dojox.gfx.Line", dojox.gfx.shape.Line, {
- // summary: a line shape (Silverlight)
- setShape: function(newShape){
- // summary: sets a line shape object (Silverlight)
- // newShape: Object: a line shape object
- this.shape = dojox.gfx.makeParameters(this.shape, newShape);
- this.bbox = null;
- var r = this.rawNode, n = this.shape;
- r.x1 = n.x1; r.y1 = n.y1; r.x2 = n.x2; r.y2 = n.y2;
- return this; // self
- }
-});
-dojox.gfx.Line.nodeType = "Line";
-
-dojo.declare("dojox.gfx.Polyline", dojox.gfx.shape.Polyline, {
- // summary: a polyline/polygon shape (Silverlight)
- setShape: function(points, closed){
- // summary: sets a polyline/polygon shape object (Silverlight)
- // points: Object: a polyline/polygon shape object
- if(points && points instanceof Array){
- // branch
- // points: Array: an array of points
- this.shape = dojox.gfx.makeParameters(this.shape, {points: points});
- if(closed && this.shape.points.length){
- this.shape.points.push(this.shape.points[0]);
- }
- }else{
- this.shape = dojox.gfx.makeParameters(this.shape, points);
- }
- this.box = null;
- var p = this.shape.points, rp = [];
- for(var i = 0; i < p.length; ++i){
- if(typeof p[i] == "number"){
- rp.push(p[i], p[++i]);
- }else{
- rp.push(p[i].x, p[i].y);
- }
- }
- this.rawNode.points = rp.join(",");
- return this; // self
- }
+this._setFillAttr(_3);
+break;
+case "radial":
+this.fillStyle=f=dojox.gfx.makeParameters(dojox.gfx.defaultRadialGradient,_2);
+var _4=p.createFromXaml("<RadialGradientBrush/>"),c=dojox.gfx.matrix.multiplyPoint(dojox.gfx.matrix.invert(this._getAdjustedMatrix()),f.cx,f.cy),pt=c.x+","+c.y;
+_4.mappingMode="Absolute";
+_4.gradientOrigin=pt;
+_4.center=pt;
+_4.radiusX=_4.radiusY=f.r;
+dojo.forEach(f.colors,function(c){
+var t=p.createFromXaml("<GradientStop/>");
+t.offset=c.offset;
+t.color=dojox.gfx.silverlight.hexColor(c.color);
+_4.gradientStops.add(t);
});
-dojox.gfx.Polyline.nodeType = "Polyline";
-
-dojo.declare("dojox.gfx.Image", dojox.gfx.shape.Image, {
- // summary: an image (Silverlight)
- setShape: function(newShape){
- // summary: sets an image shape object (Silverlight)
- // newShape: Object: an image shape object
- this.shape = dojox.gfx.makeParameters(this.shape, newShape);
- this.bbox = null;
- var r = this.rawNode, n = this.shape;
- r["Canvas.Left"] = n.x;
- r["Canvas.Top"] = n.y;
- r.width = n.width;
- r.height = n.height;
- r.source = n.src;
- return this; // self
- },
- setRawNode: function(rawNode){
- // summary:
- // assigns and clears the underlying node that will represent this
- // shape. Once set, transforms, gradients, etc, can be applied.
- // (no fill & stroke by default)
- this.rawNode = rawNode;
- }
-});
-dojox.gfx.Image.nodeType = "Image";
-
-dojo.declare("dojox.gfx.Text", dojox.gfx.shape.Text, {
- // summary: an anchored text (Silverlight)
- setShape: function(newShape){
- // summary: sets a text shape object (Silverlight)
- // newShape: Object: a text shape object
- this.shape = dojox.gfx.makeParameters(this.shape, newShape);
- this.bbox = null;
- var r = this.rawNode, s = this.shape;
- r.text = s.text;
- r.textDecorations = s.decoration == "underline" ? "Underline" : "None";
- r["Canvas.Left"] = -10000;
- r["Canvas.Top"] = -10000;
- window.setTimeout(dojo.hitch(this, "_delayAlignment"), 0);
- return this; // self
- },
- _delayAlignment: function(){
- // handle alignment
- var r = this.rawNode, s = this.shape,
- w = r.actualWidth, h = r.actualHeight, x = s.x, y = s.y - h * 0.75;
- switch(s.align){
- case "middle":
- x -= w / 2;
- break;
- case "end":
- x -= w;
- break;
- }
- var a = this.matrix ? dojox.gfx.matrix.multiplyPoint(this.matrix, x, y) : {x: x, y: y};
- r["Canvas.Left"] = a.x;
- r["Canvas.Top"] = a.y;
- },
- setStroke: function(){
- // summary: ignore setting a stroke style
- return this; // self
- },
- _setFillAttr: function(f){
- this.rawNode.foreground = f;
- },
- setRawNode: function(rawNode){
- // summary:
- // assigns and clears the underlying node that will represent this
- // shape. Once set, transforms, gradients, etc, can be applied.
- // (no fill & stroke by default)
- this.rawNode = rawNode;
- },
- _applyTransform: function() {
- var tm = this.matrix, r = this.rawNode;
- if(tm){
- // the next line is pure magic :-(
- tm = dojox.gfx.matrix.normalize([1/100, tm, 100]);
- var p = this.rawNode.getHost().content,
- m = p.createFromXaml("<MatrixTransform/>"),
- mm = p.createFromXaml("<Matrix/>");
- mm.m11 = tm.xx;
- mm.m21 = tm.xy;
- mm.m12 = tm.yx;
- mm.m22 = tm.yy;
- mm.offsetX = tm.dx;
- mm.offsetY = tm.dy;
- m.matrix = mm;
- r.renderTransform = m;
- }else{
- r.renderTransform = null;
- }
- return this;
- },
- getTextWidth: function(){
- // summary: get the text width in pixels
- return this.rawNode.actualWidth;
- }
-});
-dojox.gfx.Text.nodeType = "TextBlock";
-
-dojo.declare("dojox.gfx.Path", dojox.gfx.path.Path, {
- // summary: a path shape (Silverlight)
- _updateWithSegment: function(segment){
- // summary: updates the bounding box of path with new segment
- // segment: Object: a segment
- dojox.gfx.Path.superclass._updateWithSegment.apply(this, arguments);
- var p = this.shape.path;
- if(typeof(p) == "string"){
- this.rawNode.data = p ? p : null;
- }
- },
- setShape: function(newShape){
- // summary: forms a path using a shape (Silverlight)
- // newShape: Object: an SVG path string or a path object (see dojox.gfx.defaultPath)
- dojox.gfx.Path.superclass.setShape.apply(this, arguments);
- var p = this.shape.path;
- this.rawNode.data = p ? p : null;
- return this; // self
- }
-});
-dojox.gfx.Path.nodeType = "Path";
-
-dojo.declare("dojox.gfx.TextPath", dojox.gfx.path.TextPath, {
- // summary: a textpath shape (Silverlight)
- _updateWithSegment: function(segment){
- // summary: updates the bounding box of path with new segment
- // segment: Object: a segment
- },
- setShape: function(newShape){
- // summary: forms a path using a shape (Silverlight)
- // newShape: Object: an SVG path string or a path object (see dojox.gfx.defaultPath)
- },
- _setText: function(){
- }
-});
-dojox.gfx.TextPath.nodeType = "text";
-
-dojo.declare("dojox.gfx.Surface", dojox.gfx.shape.Surface, {
- // summary: a surface object to be used for drawings (Silverlight)
- constructor: function(){
- dojox.gfx.silverlight.Container._init.call(this);
- },
- setDimensions: function(width, height){
- // summary: sets the width and height of the rawNode
- // width: String: width of surface, e.g., "100px"
- // height: String: height of surface, e.g., "100px"
- this.width = dojox.gfx.normalizedLength(width); // in pixels
- this.height = dojox.gfx.normalizedLength(height); // in pixels
- var p = this.rawNode && this.rawNode.getHost();
- if(p){
- p.width = width;
- p.height = height;
- }
- return this; // self
- },
- getDimensions: function(){
- // summary: returns an object with properties "width" and "height"
- var p = this.rawNode && this.rawNode.getHost();
- var t = p ? {width: p.content.actualWidth, height: p.content.actualHeight} : null;
- if(t.width <= 0){ t.width = this.width; }
- if(t.height <= 0){ t.height = this.height; }
- return t; // Object
- }
+this._setFillAttr(_4);
+break;
+case "pattern":
+this.fillStyle=null;
+this._setFillAttr(null);
+break;
+}
+return this;
+}
+this.fillStyle=f=dojox.gfx.normalizeColor(_2);
+var _5=p.createFromXaml("<SolidColorBrush/>");
+_5.color=f.toHex();
+_5.opacity=f.a;
+this._setFillAttr(_5);
+return this;
+},_setFillAttr:function(f){
+this.rawNode.fill=f;
+},setStroke:function(_6){
+var p=this.rawNode.getHost().content,r=this.rawNode;
+if(!_6){
+this.strokeStyle=null;
+r.stroke=null;
+return this;
+}
+if(typeof _6=="string"||dojo.isArray(_6)||_6 instanceof dojo.Color){
+_6={color:_6};
+}
+var s=this.strokeStyle=dojox.gfx.makeParameters(dojox.gfx.defaultStroke,_6);
+s.color=dojox.gfx.normalizeColor(s.color);
+if(s){
+var _7=p.createFromXaml("<SolidColorBrush/>");
+_7.color=s.color.toHex();
+_7.opacity=s.color.a;
+r.stroke=_7;
+r.strokeThickness=s.width;
+r.strokeStartLineCap=r.strokeEndLineCap=r.strokeDashCap=dojox.gfx.silverlight.caps[s.cap];
+if(typeof s.join=="number"){
+r.strokeLineJoin="Miter";
+r.strokeMiterLimit=s.join;
+}else{
+r.strokeLineJoin=dojox.gfx.silverlight.joins[s.join];
+}
+var da=s.style.toLowerCase();
+if(da in dojox.gfx.silverlight.dasharray){
+da=dojox.gfx.silverlight.dasharray[da];
+}
+if(da instanceof Array){
+da=dojo.clone(da);
+var i;
+if(s.cap!="butt"){
+for(i=0;i<da.length;i+=2){
+--da[i];
+if(da[i]<1){
+da[i]=1;
+}
+}
+for(i=1;i<da.length;i+=2){
+++da[i];
+}
+}
+r.strokeDashArray=da.join(",");
+}else{
+r.strokeDashArray=null;
+}
+}
+return this;
+},_getParentSurface:function(){
+var _8=this.parent;
+for(;_8&&!(_8 instanceof dojox.gfx.Surface);_8=_8.parent){
+}
+return _8;
+},_applyTransform:function(){
+var tm=this._getAdjustedMatrix(),r=this.rawNode;
+if(tm){
+var p=this.rawNode.getHost().content,m=p.createFromXaml("<MatrixTransform/>"),mm=p.createFromXaml("<Matrix/>");
+mm.m11=tm.xx;
+mm.m21=tm.xy;
+mm.m12=tm.yx;
+mm.m22=tm.yy;
+mm.offsetX=tm.dx;
+mm.offsetY=tm.dy;
+m.matrix=mm;
+r.renderTransform=m;
+}else{
+r.renderTransform=null;
+}
+return this;
+},setRawNode:function(_9){
+_9.fill=null;
+_9.stroke=null;
+this.rawNode=_9;
+},_moveToFront:function(){
+var c=this.parent.rawNode.children,r=this.rawNode;
+c.remove(r);
+c.add(r);
+return this;
+},_moveToBack:function(){
+var c=this.parent.rawNode.children,r=this.rawNode;
+c.remove(r);
+c.insert(0,r);
+return this;
+},_getAdjustedMatrix:function(){
+return this.matrix;
+}});
+dojo.declare("dojox.gfx.Group",dojox.gfx.Shape,{constructor:function(){
+dojox.gfx.silverlight.Container._init.call(this);
+},setRawNode:function(_a){
+this.rawNode=_a;
+}});
+dojox.gfx.Group.nodeType="Canvas";
+dojo.declare("dojox.gfx.Rect",dojox.gfx.shape.Rect,{setShape:function(_b){
+this.shape=dojox.gfx.makeParameters(this.shape,_b);
+this.bbox=null;
+var r=this.rawNode,n=this.shape;
+r.width=n.width;
+r.height=n.height;
+r.radiusX=r.radiusY=n.r;
+return this._applyTransform();
+},_getAdjustedMatrix:function(){
+var m=this.matrix,s=this.shape,d={dx:s.x,dy:s.y};
+return new dojox.gfx.Matrix2D(m?[m,d]:d);
+}});
+dojox.gfx.Rect.nodeType="Rectangle";
+dojo.declare("dojox.gfx.Ellipse",dojox.gfx.shape.Ellipse,{setShape:function(_c){
+this.shape=dojox.gfx.makeParameters(this.shape,_c);
+this.bbox=null;
+var r=this.rawNode,n=this.shape;
+r.width=2*n.rx;
+r.height=2*n.ry;
+return this._applyTransform();
+},_getAdjustedMatrix:function(){
+var m=this.matrix,s=this.shape,d={dx:s.cx-s.rx,dy:s.cy-s.ry};
+return new dojox.gfx.Matrix2D(m?[m,d]:d);
+}});
+dojox.gfx.Ellipse.nodeType="Ellipse";
+dojo.declare("dojox.gfx.Circle",dojox.gfx.shape.Circle,{setShape:function(_d){
+this.shape=dojox.gfx.makeParameters(this.shape,_d);
+this.bbox=null;
+var r=this.rawNode,n=this.shape;
+r.width=r.height=2*n.r;
+return this._applyTransform();
+},_getAdjustedMatrix:function(){
+var m=this.matrix,s=this.shape,d={dx:s.cx-s.r,dy:s.cy-s.r};
+return new dojox.gfx.Matrix2D(m?[m,d]:d);
+}});
+dojox.gfx.Circle.nodeType="Ellipse";
+dojo.declare("dojox.gfx.Line",dojox.gfx.shape.Line,{setShape:function(_e){
+this.shape=dojox.gfx.makeParameters(this.shape,_e);
+this.bbox=null;
+var r=this.rawNode,n=this.shape;
+r.x1=n.x1;
+r.y1=n.y1;
+r.x2=n.x2;
+r.y2=n.y2;
+return this;
+}});
+dojox.gfx.Line.nodeType="Line";
+dojo.declare("dojox.gfx.Polyline",dojox.gfx.shape.Polyline,{setShape:function(_f,_10){
+if(_f&&_f instanceof Array){
+this.shape=dojox.gfx.makeParameters(this.shape,{points:_f});
+if(_10&&this.shape.points.length){
+this.shape.points.push(this.shape.points[0]);
+}
+}else{
+this.shape=dojox.gfx.makeParameters(this.shape,_f);
+}
+this.bbox=null;
+this._normalizePoints();
+var p=this.shape.points,rp=[];
+for(var i=0;i<p.length;++i){
+rp.push(p[i].x,p[i].y);
+}
+this.rawNode.points=rp.join(",");
+return this;
+}});
+dojox.gfx.Polyline.nodeType="Polyline";
+dojo.declare("dojox.gfx.Image",dojox.gfx.shape.Image,{setShape:function(_11){
+this.shape=dojox.gfx.makeParameters(this.shape,_11);
+this.bbox=null;
+var r=this.rawNode,n=this.shape;
+r.width=n.width;
+r.height=n.height;
+r.source=n.src;
+return this._applyTransform();
+},_getAdjustedMatrix:function(){
+var m=this.matrix,s=this.shape,d={dx:s.x,dy:s.y};
+return new dojox.gfx.Matrix2D(m?[m,d]:d);
+},setRawNode:function(_12){
+this.rawNode=_12;
+}});
+dojox.gfx.Image.nodeType="Image";
+dojo.declare("dojox.gfx.Text",dojox.gfx.shape.Text,{setShape:function(_13){
+this.shape=dojox.gfx.makeParameters(this.shape,_13);
+this.bbox=null;
+var r=this.rawNode,s=this.shape;
+r.text=s.text;
+r.textDecorations=s.decoration==="underline"?"Underline":"None";
+r["Canvas.Left"]=-10000;
+r["Canvas.Top"]=-10000;
+if(!this._delay){
+this._delay=window.setTimeout(dojo.hitch(this,"_delayAlignment"),10);
+}
+return this;
+},_delayAlignment:function(){
+var r=this.rawNode,s=this.shape,w=r.actualWidth,h=r.actualHeight,x=s.x,y=s.y-h*0.75;
+switch(s.align){
+case "middle":
+x-=w/2;
+break;
+case "end":
+x-=w;
+break;
+}
+this._delta={dx:x,dy:y};
+r["Canvas.Left"]=0;
+r["Canvas.Top"]=0;
+this._applyTransform();
+delete this._delay;
+},_getAdjustedMatrix:function(){
+var m=this.matrix,d=this._delta,x;
+if(m){
+x=d?[m,d]:m;
+}else{
+x=d?d:{};
+}
+return new dojox.gfx.Matrix2D(x);
+},setStroke:function(){
+return this;
+},_setFillAttr:function(f){
+this.rawNode.foreground=f;
+},setRawNode:function(_14){
+this.rawNode=_14;
+},getTextWidth:function(){
+return this.rawNode.actualWidth;
+}});
+dojox.gfx.Text.nodeType="TextBlock";
+dojo.declare("dojox.gfx.Path",dojox.gfx.path.Path,{_updateWithSegment:function(_15){
+dojox.gfx.Path.superclass._updateWithSegment.apply(this,arguments);
+var p=this.shape.path;
+if(typeof (p)=="string"){
+this.rawNode.data=p?p:null;
+}
+},setShape:function(_16){
+dojox.gfx.Path.superclass.setShape.apply(this,arguments);
+var p=this.shape.path;
+this.rawNode.data=p?p:null;
+return this;
+}});
+dojox.gfx.Path.nodeType="Path";
+dojo.declare("dojox.gfx.TextPath",dojox.gfx.path.TextPath,{_updateWithSegment:function(_17){
+},setShape:function(_18){
+},_setText:function(){
+}});
+dojox.gfx.TextPath.nodeType="text";
+dojox.gfx.silverlight.surfaces={};
+dojox.gfx.silverlight.nullFunc=function(){
+};
+dojo.declare("dojox.gfx.Surface",dojox.gfx.shape.Surface,{constructor:function(){
+dojox.gfx.silverlight.Container._init.call(this);
+},destroy:function(){
+window[this._onLoadName]=dojox.gfx.silverlight.nullFunc;
+delete dojox.gfx.silverlight.surfaces[this.rawNode.name];
+this.inherited(arguments);
+},setDimensions:function(_19,_1a){
+this.width=dojox.gfx.normalizedLength(_19);
+this.height=dojox.gfx.normalizedLength(_1a);
+var p=this.rawNode&&this.rawNode.getHost();
+if(p){
+p.width=_19;
+p.height=_1a;
+}
+return this;
+},getDimensions:function(){
+var p=this.rawNode&&this.rawNode.getHost();
+var t=p?{width:p.content.actualWidth,height:p.content.actualHeight}:null;
+if(t.width<=0){
+t.width=this.width;
+}
+if(t.height<=0){
+t.height=this.height;
+}
+return t;
+}});
+dojox.gfx.createSurface=function(_1b,_1c,_1d){
+if(!_1c&&!_1d){
+var pos=d.position(_1b);
+_1c=_1c||pos.w;
+_1d=_1d||pos.h;
+}
+if(typeof _1c=="number"){
+_1c=_1c+"px";
+}
+if(typeof _1d=="number"){
+_1d=_1d+"px";
+}
+var s=new dojox.gfx.Surface();
+_1b=dojo.byId(_1b);
+s._parent=_1b;
+var t=_1b.ownerDocument.createElement("script");
+t.type="text/xaml";
+t.id=dojox.gfx._base._getUniqueId();
+t.text="<?xml version='1.0'?><Canvas xmlns='http://schemas.microsoft.com/client/2007' Name='"+dojox.gfx._base._getUniqueId()+"'/>";
+_1b.parentNode.insertBefore(t,_1b);
+s._nodes.push(t);
+var obj,_1e=dojox.gfx._base._getUniqueId(),_1f="__"+dojox.gfx._base._getUniqueId()+"_onLoad";
+s._onLoadName=_1f;
+window[_1f]=function(_20){
+if(!s.rawNode){
+s.rawNode=dojo.byId(_1e).content.root;
+dojox.gfx.silverlight.surfaces[s.rawNode.name]=_1b;
+s.onLoad(s);
+}
+};
+if(dojo.isSafari){
+obj="<embed type='application/x-silverlight' id='"+_1e+"' width='"+_1c+"' height='"+_1d+" background='transparent'"+" source='#"+t.id+"'"+" windowless='true'"+" maxFramerate='60'"+" onLoad='"+_1f+"'"+" onError='__dojoSilverlightError'"+" /><iframe style='visibility:hidden;height:0;width:0'/>";
+}else{
+obj="<object type='application/x-silverlight' data='data:application/x-silverlight,' id='"+_1e+"' width='"+_1c+"' height='"+_1d+"'>"+"<param name='background' value='transparent' />"+"<param name='source' value='#"+t.id+"' />"+"<param name='windowless' value='true' />"+"<param name='maxFramerate' value='60' />"+"<param name='onLoad' value='"+_1f+"' />"+"<param name='onError' value='__dojoSilverlightError' />"+"</object>";
+}
+_1b.innerHTML=obj;
+var _21=dojo.byId(_1e);
+if(_21.content&&_21.content.root){
+s.rawNode=_21.content.root;
+dojox.gfx.silverlight.surfaces[s.rawNode.name]=_1b;
+}else{
+s.rawNode=null;
+s.isLoaded=false;
+}
+s._nodes.push(_21);
+s.width=dojox.gfx.normalizedLength(_1c);
+s.height=dojox.gfx.normalizedLength(_1d);
+return s;
+};
+__dojoSilverlightError=function(_22,err){
+var t="Silverlight Error:\n"+"Code: "+err.ErrorCode+"\n"+"Type: "+err.ErrorType+"\n"+"Message: "+err.ErrorMessage+"\n";
+switch(err.ErrorType){
+case "ParserError":
+t+="XamlFile: "+err.xamlFile+"\n"+"Line: "+err.lineNumber+"\n"+"Position: "+err.charPosition+"\n";
+break;
+case "RuntimeError":
+t+="MethodName: "+err.methodName+"\n";
+if(err.lineNumber!=0){
+t+="Line: "+err.lineNumber+"\n"+"Position: "+err.charPosition+"\n";
+}
+break;
+}
+console.error(t);
+};
+dojox.gfx.silverlight.Font={_setFont:function(){
+var f=this.fontStyle,r=this.rawNode,fw=dojox.gfx.silverlight.fontweight,fo=dojox.gfx.silverlight.fonts,t=f.family.toLowerCase();
+r.fontStyle=f.style=="italic"?"Italic":"Normal";
+r.fontWeight=f.weight in fw?fw[f.weight]:f.weight;
+r.fontSize=dojox.gfx.normalizedLength(f.size);
+r.fontFamily=t in fo?fo[t]:f.family;
+if(!this._delay){
+this._delay=window.setTimeout(dojo.hitch(this,"_delayAlignment"),10);
+}
+}};
+dojox.gfx.silverlight.Container={_init:function(){
+dojox.gfx.shape.Container._init.call(this);
+},add:function(_23){
+if(this!=_23.getParent()){
+dojox.gfx.shape.Container.add.apply(this,arguments);
+this.rawNode.children.add(_23.rawNode);
+}
+return this;
+},remove:function(_24,_25){
+if(this==_24.getParent()){
+var _26=_24.rawNode.getParent();
+if(_26){
+_26.children.remove(_24.rawNode);
+}
+dojox.gfx.shape.Container.remove.apply(this,arguments);
+}
+return this;
+},clear:function(){
+this.rawNode.children.clear();
+return dojox.gfx.shape.Container.clear.apply(this,arguments);
+},_moveChildToFront:dojox.gfx.shape.Container._moveChildToFront,_moveChildToBack:dojox.gfx.shape.Container._moveChildToBack};
+dojo.mixin(dojox.gfx.shape.Creator,{createObject:function(_27,_28){
+if(!this.rawNode){
+return null;
+}
+var _29=new _27();
+var _2a=this.rawNode.getHost().content.createFromXaml("<"+_27.nodeType+"/>");
+_29.setRawNode(_2a);
+_29.setShape(_28);
+this.add(_29);
+return _29;
+}});
+dojo.extend(dojox.gfx.Text,dojox.gfx.silverlight.Font);
+dojo.extend(dojox.gfx.Group,dojox.gfx.silverlight.Container);
+dojo.extend(dojox.gfx.Group,dojox.gfx.shape.Creator);
+dojo.extend(dojox.gfx.Surface,dojox.gfx.silverlight.Container);
+dojo.extend(dojox.gfx.Surface,dojox.gfx.shape.Creator);
+(function(){
+var _2b=dojox.gfx.silverlight.surfaces;
+var _2c=function(s,a){
+var ev={target:s,currentTarget:s,preventDefault:function(){
+},stopPropagation:function(){
+}};
+if(a){
+try{
+ev.ctrlKey=a.ctrl;
+ev.shiftKey=a.shift;
+var p=a.getPosition(null);
+ev.x=ev.offsetX=ev.layerX=p.x;
+ev.y=ev.offsetY=ev.layerY=p.y;
+var _2d=_2b[s.getHost().content.root.name];
+var t=dojo.position(_2d);
+ev.clientX=t.x+p.x;
+ev.clientY=t.y+p.y;
+}
+catch(e){
+}
+}
+return ev;
+};
+var _2e=function(s,a){
+var ev={keyCode:a.platformKeyCode,ctrlKey:a.ctrl,shiftKey:a.shift};
+return ev;
+};
+var _2f={onclick:{name:"MouseLeftButtonUp",fix:_2c},onmouseenter:{name:"MouseEnter",fix:_2c},onmouseleave:{name:"MouseLeave",fix:_2c},onmouseover:{name:"MouseEnter",fix:_2c},onmouseout:{name:"MouseLeave",fix:_2c},onmousedown:{name:"MouseLeftButtonDown",fix:_2c},onmouseup:{name:"MouseLeftButtonUp",fix:_2c},onmousemove:{name:"MouseMove",fix:_2c},onkeydown:{name:"KeyDown",fix:_2e},onkeyup:{name:"KeyUp",fix:_2e}};
+var _30={connect:function(_31,_32,_33){
+var _34,n=_31 in _2f?_2f[_31]:{name:_31,fix:function(){
+return {};
+}};
+if(arguments.length>2){
+_34=this.getEventSource().addEventListener(n.name,function(s,a){
+dojo.hitch(_32,_33)(n.fix(s,a));
});
-
-dojox.gfx.silverlight.surfaces = {};
-
-dojox.gfx.createSurface = function(parentNode, width, height){
- // summary: creates a surface (Silverlight)
- // parentNode: Node: a parent node
- // width: String: width of surface, e.g., "100px"
- // height: String: height of surface, e.g., "100px"
-
- var s = new dojox.gfx.Surface();
- parentNode = dojo.byId(parentNode);
- // create an empty canvas
- var t = parentNode.ownerDocument.createElement("script");
- t.type = "text/xaml";
- t.id = dojox.gfx._base._getUniqueId();
- t.text = "<Canvas xmlns='http://schemas.microsoft.com/client/2007' Name='" + dojox.gfx._base._getUniqueId() + "'/>";
- document.body.appendChild(t);
- // create a plugin
- var pluginName = dojox.gfx._base._getUniqueId();
- Silverlight.createObject(
- "#" + t.id, // none
- parentNode,
- pluginName,
- { // Plugin properties.
- width: String(width), // Width of rectangular region of plugin in pixels.
- height: String(height), // Height of rectangular region of plugin in pixels.
- inplaceInstallPrompt: "false", // Determines whether to display in-place install prompt if invalid version detected.
- //background: "white", // Background color of plugin.
- //isWindowless: "false", // Determines whether to display plugin in Windowless mode.
- background: "transparent", // Background color of plugin.
- isWindowless: "true", // Determines whether to display plugin in Windowless mode.
- framerate: "24", // MaxFrameRate property value.
- version: "1.0" // Silverlight version.
- },
- {},
- null,
- null
- );
- s.rawNode = dojo.byId(pluginName).content.root;
- // register the plugin with its parent node
- dojox.gfx.silverlight.surfaces[s.rawNode.name] = parentNode;
- s.width = dojox.gfx.normalizedLength(width); // in pixels
- s.height = dojox.gfx.normalizedLength(height); // in pixels
- return s; // dojox.gfx.Surface
-};
-
-// Extenders
-
-dojox.gfx.silverlight.Font = {
- _setFont: function(){
- // summary: sets a font object (Silverlight)
- var f = this.fontStyle, r = this.rawNode,
- fw = dojox.gfx.silverlight.fontweight,
- fo = dojox.gfx.silverlight.fonts, t = f.family.toLowerCase();
- r.fontStyle = f.style == "italic" ? "Italic" : "Normal";
- r.fontWeight = f.weight in fw ? fw[f.weight] : f.weight;
- r.fontSize = dojox.gfx.normalizedLength(f.size);
- r.fontFamily = t in fo ? fo[t] : f.family;
- }
+}else{
+_34=this.getEventSource().addEventListener(n.name,function(s,a){
+_32(n.fix(s,a));
+});
+}
+return {name:n.name,token:_34};
+},disconnect:function(_35){
+this.getEventSource().removeEventListener(_35.name,_35.token);
+}};
+dojo.extend(dojox.gfx.Shape,_30);
+dojo.extend(dojox.gfx.Surface,_30);
+dojox.gfx.equalSources=function(a,b){
+return a&&b&&a.equals(b);
};
-
-dojox.gfx.silverlight.Container = {
- _init: function(){
- dojox.gfx.shape.Container._init.call(this);
- },
- add: function(shape){
- // summary: adds a shape to a group/surface
- // shape: dojox.gfx.Shape: an VML shape object
- if(this != shape.getParent()){
- //dojox.gfx.Group.superclass.add.apply(this, arguments);
- //this.inherited(arguments);
- dojox.gfx.shape.Container.add.apply(this, arguments);
- this.rawNode.children.add(shape.rawNode);
- }
- return this; // self
- },
- remove: function(shape, silently){
- // summary: remove a shape from a group/surface
- // shape: dojox.gfx.Shape: an VML shape object
- // silently: Boolean?: if true, regenerate a picture
- if(this == shape.getParent()){
- var parent = shape.rawNode.getParent();
- if(parent){
- parent.children.remove(shape.rawNode);
- }
- //dojox.gfx.Group.superclass.remove.apply(this, arguments);
- //this.inherited(arguments);
- dojox.gfx.shape.Container.remove.apply(this, arguments);
- }
- return this; // self
- },
- clear: function(){
- // summary: removes all shapes from a group/surface
- this.rawNode.children.clear();
- //return this.inherited(arguments); // self
- return dojox.gfx.shape.Container.clear.apply(this, arguments);
- },
- _moveChildToFront: dojox.gfx.shape.Container._moveChildToFront,
- _moveChildToBack: dojox.gfx.shape.Container._moveChildToBack
-};
-
-dojo.mixin(dojox.gfx.shape.Creator, {
- createObject: function(shapeType, rawShape){
- // summary: creates an instance of the passed shapeType class
- // shapeType: Function: a class constructor to create an instance of
- // rawShape: Object: properties to be passed in to the classes "setShape" method
- if(!this.rawNode){ return null; }
- var shape = new shapeType();
- var node = this.rawNode.getHost().content.createFromXaml("<" + shapeType.nodeType + "/>");
- shape.setRawNode(node);
- shape.setShape(rawShape);
- this.add(shape);
- return shape; // dojox.gfx.Shape
- }
-});
-
-dojo.extend(dojox.gfx.Text, dojox.gfx.silverlight.Font);
-//dojo.extend(dojox.gfx.TextPath, dojox.gfx.silverlight.Font);
-
-dojo.extend(dojox.gfx.Group, dojox.gfx.silverlight.Container);
-dojo.extend(dojox.gfx.Group, dojox.gfx.shape.Creator);
-
-dojo.extend(dojox.gfx.Surface, dojox.gfx.silverlight.Container);
-dojo.extend(dojox.gfx.Surface, dojox.gfx.shape.Creator);
-
-(function(){
- var surfaces = dojox.gfx.silverlight.surfaces;
- var mouseFix = function(s, a){
- var ev = {target: s, currentTarget: s,
- preventDefault: function(){}, stopPropagation: function(){}};
- if(a){
- ev.ctrlKey = a.ctrl;
- ev.shiftKey = a.shift;
- var p = a.getPosition(null);
- ev.x = ev.offsetX = ev.layerX = p.x;
- ev.y = ev.offsetY = ev.layerY = p.y;
- // calculate clientX and clientY
- var parent = surfaces[s.getHost().content.root.name];
- var t = dojo._abs(parent);
- ev.clientX = t.x + p.x;
- ev.clientY = t.y + p.y;
- }
- return ev;
- };
- var keyFix = function(s, a){
- var ev = {
- keyCode: a.platformKeyCode,
- ctrlKey: a.ctrl,
- shiftKey: a.shift
- };
- return ev;
- };
- var eventNames = {
- onclick: {name: "MouseLeftButtonUp", fix: mouseFix},
- onmouseenter: {name: "MouseEnter", fix: mouseFix},
- onmouseleave: {name: "MouseLeave", fix: mouseFix},
- onmousedown: {name: "MouseLeftButtonDown", fix: mouseFix},
- onmouseup: {name: "MouseLeftButtonUp", fix: mouseFix},
- onmousemove: {name: "MouseMove", fix: mouseFix},
- onkeydown: {name: "KeyDown", fix: keyFix},
- onkeyup: {name: "KeyUp", fix: keyFix}
- };
- var eventsProcessing = {
- connect: function(name, object, method){
- var token, n = name in eventNames ? eventNames[name] :
- {name: name, fix: function(){ return {}; }};
- if(arguments.length > 2){
- token = this.getEventSource().addEventListener(n.name,
- function(s, a){ dojo.hitch(object, method)(n.fix(s, a)); });
- }else{
- token = this.getEventSource().addEventListener(n.name,
- function(s, a){ object(n.fix(s, a)); });
- }
- return {name: n.name, token: token};
- },
- disconnect: function(token){
- this.getEventSource().removeEventListener(token.name, token.token);
- }
- };
- dojo.extend(dojox.gfx.Shape, eventsProcessing);
- dojo.extend(dojox.gfx.Surface, eventsProcessing);
- dojox.gfx.equalSources = function(a, b){
- return a && b && a.equals(b);
- }
-
})();
-
}
diff --git a/js/dojo/dojox/gfx/silverlight_attach.js b/js/dojo/dojox/gfx/silverlight_attach.js
--- a/js/dojo/dojox/gfx/silverlight_attach.js
+++ b/js/dojo/dojox/gfx/silverlight_attach.js
@@ -1,87 +1,73 @@
-dojo.require("dojox.gfx.silverlight");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+dojo.require("dojox.gfx.silverlight");
dojo.experimental("dojox.gfx.silverlight_attach");
-
(function(){
- dojox.gfx.attachNode = function(node){
- // summary: creates a shape from a Node
- // node: Node: an Silverlight node
- return null; // for now
- if(!node) return null;
- var s = null;
- switch(node.tagName.toLowerCase()){
- case dojox.gfx.Rect.nodeType:
- s = new dojox.gfx.Rect(node);
- break;
- case dojox.gfx.Ellipse.nodeType:
- if(node.width == node.height){
- s = new dojox.gfx.Circle(node);
- }else{
- s = new dojox.gfx.Ellipse(node);
- }
- break;
- case dojox.gfx.Polyline.nodeType:
- s = new dojox.gfx.Polyline(node);
- break;
- case dojox.gfx.Path.nodeType:
- s = new dojox.gfx.Path(node);
- break;
- case dojox.gfx.Line.nodeType:
- s = new dojox.gfx.Line(node);
- break;
- case dojox.gfx.Image.nodeType:
- s = new dojox.gfx.Image(node);
- break;
- case dojox.gfx.Text.nodeType:
- s = new dojox.gfx.Text(node);
- attachFont(s);
- break;
- default:
- //console.debug("FATAL ERROR! tagName = " + node.tagName);
- return null;
- }
- attachShape(s);
- if(!(s instanceof dojox.gfx.Image)){
- attachFill(s);
- attachStroke(s);
- }
- attachTransform(s);
- return s; // dojox.gfx.Shape
- };
-
- dojox.gfx.attachSurface = function(node){
- // summary: creates a surface from a Node
- // node: Node: an Silverlight node
- return null; // dojox.gfx.Surface
- };
-
- var attachFill = function(rawNode){
- // summary: deduces a fill style from a Node.
- // rawNode: Node: an Silverlight node
- return null; // Object
- };
-
- var attachStroke = function(rawNode){
- // summary: deduces a stroke style from a Node.
- // rawNode: Node: an SVG node
- return null; // Object
- };
-
- var attachTransform = function(rawNode){
- // summary: deduces a transformation matrix from a Node.
- // rawNode: Node: an Silverlight node
- return null; // dojox.gfx.matrix.Matrix
- };
-
- var attachFont = function(rawNode){
- // summary: deduces a font style from a Node.
- // rawNode: Node: an Silverlight node
- return null; // Object
- };
-
- var attachShape = function(rawNode){
- // summary: builds a shape from a Node.
- // rawNode: Node: an Silverlight node
- return null; // dojox.gfx.Shape
- };
+dojox.gfx.attachNode=function(_1){
+return null;
+if(!_1){
+return null;
+}
+var s=null;
+switch(_1.tagName.toLowerCase()){
+case dojox.gfx.Rect.nodeType:
+s=new dojox.gfx.Rect(_1);
+break;
+case dojox.gfx.Ellipse.nodeType:
+if(_1.width==_1.height){
+s=new dojox.gfx.Circle(_1);
+}else{
+s=new dojox.gfx.Ellipse(_1);
+}
+break;
+case dojox.gfx.Polyline.nodeType:
+s=new dojox.gfx.Polyline(_1);
+break;
+case dojox.gfx.Path.nodeType:
+s=new dojox.gfx.Path(_1);
+break;
+case dojox.gfx.Line.nodeType:
+s=new dojox.gfx.Line(_1);
+break;
+case dojox.gfx.Image.nodeType:
+s=new dojox.gfx.Image(_1);
+break;
+case dojox.gfx.Text.nodeType:
+s=new dojox.gfx.Text(_1);
+_2(s);
+break;
+default:
+return null;
+}
+_3(s);
+if(!(s instanceof dojox.gfx.Image)){
+_4(s);
+_5(s);
+}
+_6(s);
+return s;
+};
+dojox.gfx.attachSurface=function(_7){
+return null;
+};
+var _4=function(_8){
+return null;
+};
+var _5=function(_9){
+return null;
+};
+var _6=function(_a){
+return null;
+};
+var _2=function(_b){
+return null;
+};
+var _3=function(_c){
+return null;
+};
})();
diff --git a/js/dojo/dojox/gfx/svg.js b/js/dojo/dojox/gfx/svg.js
--- a/js/dojo/dojox/gfx/svg.js
+++ b/js/dojo/dojox/gfx/svg.js
@@ -1,634 +1,465 @@
-if(!dojo._hasResource["dojox.gfx.svg"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.gfx.svg"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.gfx.svg"]){
+dojo._hasResource["dojox.gfx.svg"]=true;
dojo.provide("dojox.gfx.svg");
-
dojo.require("dojox.gfx._base");
dojo.require("dojox.gfx.shape");
dojo.require("dojox.gfx.path");
-
-dojox.gfx.svg.xmlns = {
- xlink: "http://www.w3.org/1999/xlink",
- svg: "http://www.w3.org/2000/svg"
+(function(){
+var d=dojo,g=dojox.gfx,gs=g.shape,_1=g.svg;
+var _2=function(ns,_3){
+if(document.createElementNS){
+return document.createElementNS(ns,_3);
+}else{
+return document.createElement(_3);
+}
};
-
-dojox.gfx.svg.getRef = function(name){
- // summary: returns a DOM Node specified by the name argument or null
- // name: String: an SVG external reference
- if(!name || name == "none") return null;
- if(name.match(/^url\(#.+\)$/)){
- return dojo.byId(name.slice(5, -1)); // Node
- }
- // alternative representation of a reference
- if(name.match(/^#dojoUnique\d+$/)){
- // we assume here that a reference was generated by dojox.gfx
- return dojo.byId(name.slice(1)); // Node
- }
- return null; // Node
+_1.xmlns={xlink:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"};
+_1.getRef=function(_4){
+if(!_4||_4=="none"){
+return null;
+}
+if(_4.match(/^url\(#.+\)$/)){
+return d.byId(_4.slice(5,-1));
+}
+if(_4.match(/^#dojoUnique\d+$/)){
+return d.byId(_4.slice(1));
+}
+return null;
};
-
-dojox.gfx.svg.dasharray = {
- solid: "none",
- shortdash: [4, 1],
- shortdot: [1, 1],
- shortdashdot: [4, 1, 1, 1],
- shortdashdotdot: [4, 1, 1, 1, 1, 1],
- dot: [1, 3],
- dash: [4, 3],
- longdash: [8, 3],
- dashdot: [4, 3, 1, 3],
- longdashdot: [8, 3, 1, 3],
- longdashdotdot: [8, 3, 1, 3, 1, 3]
+_1.dasharray={solid:"none",shortdash:[4,1],shortdot:[1,1],shortdashdot:[4,1,1,1],shortdashdotdot:[4,1,1,1,1,1],dot:[1,3],dash:[4,3],longdash:[8,3],dashdot:[4,3,1,3],longdashdot:[8,3,1,3],longdashdotdot:[8,3,1,3,1,3]};
+d.extend(g.Shape,{setFill:function(_5){
+if(!_5){
+this.fillStyle=null;
+this.rawNode.setAttribute("fill","none");
+this.rawNode.setAttribute("fill-opacity",0);
+return this;
+}
+var f;
+var _6=function(x){
+this.setAttribute(x,f[x].toFixed(8));
};
-
-dojo.extend(dojox.gfx.Shape, {
- // summary: SVG-specific implementation of dojox.gfx.Shape methods
-
- setFill: function(fill){
- // summary: sets a fill object (SVG)
- // fill: Object: a fill object
- // (see dojox.gfx.defaultLinearGradient,
- // dojox.gfx.defaultRadialGradient,
- // dojox.gfx.defaultPattern,
- // or dojo.Color)
-
- if(!fill){
- // don't fill
- this.fillStyle = null;
- this.rawNode.setAttribute("fill", "none");
- this.rawNode.setAttribute("fill-opacity", 0);
- return this;
- }
- var f;
- // FIXME: slightly magical. We're using the outer scope's "f", but setting it later
- var setter = function(x){
- // we assume that we're executing in the scope of the node to mutate
- this.setAttribute(x, f[x].toFixed(8));
- };
- if(typeof(fill) == "object" && "type" in fill){
- // gradient
- switch(fill.type){
- case "linear":
- f = dojox.gfx.makeParameters(dojox.gfx.defaultLinearGradient, fill);
- var gradient = this._setFillObject(f, "linearGradient");
- dojo.forEach(["x1", "y1", "x2", "y2"], setter, gradient);
- break;
- case "radial":
- f = dojox.gfx.makeParameters(dojox.gfx.defaultRadialGradient, fill);
- var gradient = this._setFillObject(f, "radialGradient");
- dojo.forEach(["cx", "cy", "r"], setter, gradient);
- break;
- case "pattern":
- f = dojox.gfx.makeParameters(dojox.gfx.defaultPattern, fill);
- var pattern = this._setFillObject(f, "pattern");
- dojo.forEach(["x", "y", "width", "height"], setter, pattern);
- break;
- }
- this.fillStyle = f;
- return this;
- }
- // color object
- var f = dojox.gfx.normalizeColor(fill);
- this.fillStyle = f;
- this.rawNode.setAttribute("fill", f.toCss());
- this.rawNode.setAttribute("fill-opacity", f.a);
- this.rawNode.setAttribute("fill-rule", "evenodd");
- return this; // self
- },
-
- setStroke: function(stroke){
- // summary: sets a stroke object (SVG)
- // stroke: Object: a stroke object
- // (see dojox.gfx.defaultStroke)
-
- if(!stroke){
- // don't stroke
- this.strokeStyle = null;
- this.rawNode.setAttribute("stroke", "none");
- this.rawNode.setAttribute("stroke-opacity", 0);
- return this;
- }
- // normalize the stroke
- if(typeof stroke == "string"){
- stroke = {color: stroke};
- }
- var s = this.strokeStyle = dojox.gfx.makeParameters(dojox.gfx.defaultStroke, stroke);
- s.color = dojox.gfx.normalizeColor(s.color);
- // generate attributes
- var rn = this.rawNode;
- if(s){
- rn.setAttribute("stroke", s.color.toCss());
- rn.setAttribute("stroke-opacity", s.color.a);
- rn.setAttribute("stroke-width", s.width);
- rn.setAttribute("stroke-linecap", s.cap);
- if(typeof s.join == "number"){
- rn.setAttribute("stroke-linejoin", "miter");
- rn.setAttribute("stroke-miterlimit", s.join);
- }else{
- rn.setAttribute("stroke-linejoin", s.join);
- }
- var da = s.style.toLowerCase();
- if(da in dojox.gfx.svg.dasharray){ da = dojox.gfx.svg.dasharray[da]; }
- if(da instanceof Array){
- da = dojo.clone(da);
- for(var i = 0; i < da.length; ++i){
- da[i] *= s.width;
- }
- if(s.cap != "butt"){
- for(var i = 0; i < da.length; i += 2){
- da[i] -= s.width;
- if(da[i] < 1){ da[i] = 1; }
- }
- for(var i = 1; i < da.length; i += 2){
- da[i] += s.width;
- }
- }
- da = da.join(",");
- }
- rn.setAttribute("stroke-dasharray", da);
- rn.setAttribute("dojoGfxStrokeStyle", s.style);
- }
- return this; // self
- },
-
- _getParentSurface: function(){
- var surface = this.parent;
- for(; surface && !(surface instanceof dojox.gfx.Surface); surface = surface.parent);
- return surface;
- },
-
- _setFillObject: function(f, nodeType){
- var svgns = dojox.gfx.svg.xmlns.svg;
- this.fillStyle = f;
- var surface = this._getParentSurface();
- var defs = surface.defNode;
- var fill = this.rawNode.getAttribute("fill");
- var ref = dojox.gfx.svg.getRef(fill);
- if(ref){
- fill = ref;
- if(fill.tagName.toLowerCase() != nodeType.toLowerCase()){
- var id = fill.id;
- fill.parentNode.removeChild(fill);
- fill = document.createElementNS(svgns, nodeType);
- fill.setAttribute("id", id);
- defs.appendChild(fill);
- }else{
- while(fill.childNodes.length){
- fill.removeChild(fill.lastChild);
- }
- }
- }else{
- fill = document.createElementNS(svgns, nodeType);
- fill.setAttribute("id", dojox.gfx._base._getUniqueId());
- defs.appendChild(fill);
- }
- if(nodeType == "pattern"){
- if(dojo.isSafari){
- fill.setAttributeNS(null, "patternUnits", "userSpaceOnUse");
- }else{
- fill.setAttribute("patternUnits", "userSpaceOnUse");
- }
- var img = document.createElementNS(svgns, "image");
- img.setAttribute("x", 0);
- img.setAttribute("y", 0);
- img.setAttribute("width", f.width .toFixed(8));
- img.setAttribute("height", f.height.toFixed(8));
- img.setAttributeNS(dojox.gfx.svg.xmlns.xlink, "href", f.src);
- fill.appendChild(img);
- }else{
- if(dojo.isSafari){
- fill.setAttributeNS(null, "gradientUnits", "userSpaceOnUse");
- }else{
- fill.setAttribute("gradientUnits", "userSpaceOnUse");
- }
- for(var i = 0; i < f.colors.length; ++i){
- var c = f.colors[i], t = document.createElementNS(svgns, "stop"),
- cc = c.color = dojox.gfx.normalizeColor(c.color);
- t.setAttribute("offset", c.offset.toFixed(8));
- t.setAttribute("stop-color", cc.toCss());
- t.setAttribute("stop-opacity", cc.a);
- fill.appendChild(t);
- }
- }
- this.rawNode.setAttribute("fill", "url(#" + fill.getAttribute("id") +")");
- this.rawNode.removeAttribute("fill-opacity");
- this.rawNode.setAttribute("fill-rule", "evenodd");
- return fill;
- },
-
- _applyTransform: function() {
- var matrix = this.matrix;
- if(matrix){
- var tm = this.matrix;
- this.rawNode.setAttribute("transform", "matrix(" +
- tm.xx.toFixed(8) + "," + tm.yx.toFixed(8) + "," +
- tm.xy.toFixed(8) + "," + tm.yy.toFixed(8) + "," +
- tm.dx.toFixed(8) + "," + tm.dy.toFixed(8) + ")");
- }else{
- this.rawNode.removeAttribute("transform");
- }
- return this;
- },
-
- setRawNode: function(rawNode){
- // summary:
- // assigns and clears the underlying node that will represent this
- // shape. Once set, transforms, gradients, etc, can be applied.
- // (no fill & stroke by default)
- var r = this.rawNode = rawNode;
- r.setAttribute("fill", "none");
- r.setAttribute("fill-opacity", 0);
- r.setAttribute("stroke", "none");
- r.setAttribute("stroke-opacity", 0);
- r.setAttribute("stroke-width", 1);
- r.setAttribute("stroke-linecap", "butt");
- r.setAttribute("stroke-linejoin", "miter");
- r.setAttribute("stroke-miterlimit", 4);
- },
-
- setShape: function(newShape){
- // summary: sets a shape object (SVG)
- // newShape: Object: a shape object
- // (see dojox.gfx.defaultPath,
- // dojox.gfx.defaultPolyline,
- // dojox.gfx.defaultRect,
- // dojox.gfx.defaultEllipse,
- // dojox.gfx.defaultCircle,
- // dojox.gfx.defaultLine,
- // or dojox.gfx.defaultImage)
- this.shape = dojox.gfx.makeParameters(this.shape, newShape);
- for(var i in this.shape){
- if(i != "type"){ this.rawNode.setAttribute(i, this.shape[i]); }
- }
- return this; // self
- },
-
- // move family
-
- _moveToFront: function(){
- // summary: moves a shape to front of its parent's list of shapes (SVG)
- this.rawNode.parentNode.appendChild(this.rawNode);
- return this; // self
- },
- _moveToBack: function(){
- // summary: moves a shape to back of its parent's list of shapes (SVG)
- this.rawNode.parentNode.insertBefore(this.rawNode, this.rawNode.parentNode.firstChild);
- return this; // self
- }
-});
-
-dojo.declare("dojox.gfx.Group", dojox.gfx.Shape, {
- // summary: a group shape (SVG), which can be used
- // to logically group shapes (e.g, to propagate matricies)
- constructor: function(){
- dojox.gfx.svg.Container._init.call(this);
- },
- setRawNode: function(rawNode){
- // summary: sets a raw SVG node to be used by this shape
- // rawNode: Node: an SVG node
- this.rawNode = rawNode;
- }
-});
-dojox.gfx.Group.nodeType = "g";
-
-dojo.declare("dojox.gfx.Rect", dojox.gfx.shape.Rect, {
- // summary: a rectangle shape (SVG)
- setShape: function(newShape){
- // summary: sets a rectangle shape object (SVG)
- // newShape: Object: a rectangle shape object
- this.shape = dojox.gfx.makeParameters(this.shape, newShape);
- this.bbox = null;
- for(var i in this.shape){
- if(i != "type" && i != "r"){ this.rawNode.setAttribute(i, this.shape[i]); }
- }
- if(this.shape.r){
- this.rawNode.setAttribute("ry", this.shape.r);
- this.rawNode.setAttribute("rx", this.shape.r);
- }
- return this; // self
- }
-});
-dojox.gfx.Rect.nodeType = "rect";
-
-dojox.gfx.Ellipse = dojox.gfx.shape.Ellipse;
-dojox.gfx.Ellipse.nodeType = "ellipse";
-
-dojox.gfx.Circle = dojox.gfx.shape.Circle;
-dojox.gfx.Circle.nodeType = "circle";
-
-dojox.gfx.Line = dojox.gfx.shape.Line;
-dojox.gfx.Line.nodeType = "line";
-
-dojo.declare("dojox.gfx.Polyline", dojox.gfx.shape.Polyline, {
- // summary: a polyline/polygon shape (SVG)
- setShape: function(points, closed){
- // summary: sets a polyline/polygon shape object (SVG)
- // points: Object: a polyline/polygon shape object
- if(points && points instanceof Array){
- // branch
- // points: Array: an array of points
- this.shape = dojox.gfx.makeParameters(this.shape, { points: points });
- if(closed && this.shape.points.length){
- this.shape.points.push(this.shape.points[0]);
- }
- }else{
- this.shape = dojox.gfx.makeParameters(this.shape, points);
- }
- this.box = null;
- var attr = [];
- var p = this.shape.points;
- for(var i = 0; i < p.length; ++i){
- if(typeof p[i] == "number"){
- attr.push(p[i].toFixed(8));
- }else{
- attr.push(p[i].x.toFixed(8));
- attr.push(p[i].y.toFixed(8));
- }
- }
- this.rawNode.setAttribute("points", attr.join(" "));
- return this; // self
- }
-});
-dojox.gfx.Polyline.nodeType = "polyline";
-
-dojo.declare("dojox.gfx.Image", dojox.gfx.shape.Image, {
- // summary: an image (SVG)
- setShape: function(newShape){
- // summary: sets an image shape object (SVG)
- // newShape: Object: an image shape object
- this.shape = dojox.gfx.makeParameters(this.shape, newShape);
- this.bbox = null;
- var rawNode = this.rawNode;
- for(var i in this.shape){
- if(i != "type" && i != "src"){ rawNode.setAttribute(i, this.shape[i]); }
- }
- rawNode.setAttributeNS(dojox.gfx.svg.xmlns.xlink, "href", this.shape.src);
- return this; // self
- }
-});
-dojox.gfx.Image.nodeType = "image";
-
-dojo.declare("dojox.gfx.Text", dojox.gfx.shape.Text, {
- // summary: an anchored text (SVG)
- setShape: function(newShape){
- // summary: sets a text shape object (SVG)
- // newShape: Object: a text shape object
- this.shape = dojox.gfx.makeParameters(this.shape, newShape);
- this.bbox = null;
- var r = this.rawNode;
- var s = this.shape;
- r.setAttribute("x", s.x);
- r.setAttribute("y", s.y);
- r.setAttribute("text-anchor", s.align);
- r.setAttribute("text-decoration", s.decoration);
- r.setAttribute("rotate", s.rotated ? 90 : 0);
- r.setAttribute("kerning", s.kerning ? "auto" : 0);
- r.setAttribute("text-rendering", "optimizeLegibility");
- r.textContent = s.text;
- return this; // self
- },
- getTextWidth: function(){
- // summary: get the text width in pixels
- var rawNode = this.rawNode;
- var oldParent = rawNode.parentNode;
- var _measurementNode = rawNode.cloneNode(true);
- _measurementNode.style.visibility = "hidden";
-
- // solution to the "orphan issue" in FF
- var _width = 0;
- var _text = _measurementNode.firstChild.nodeValue;
- oldParent.appendChild(_measurementNode);
-
- // solution to the "orphan issue" in Opera
- // (nodeValue == "" hangs firefox)
- if(_text!=""){
- while(!_width){
- _width = parseInt(_measurementNode.getBBox().width);
- }
- }
- oldParent.removeChild(_measurementNode);
- return _width;
- }
-});
-dojox.gfx.Text.nodeType = "text";
-
-dojo.declare("dojox.gfx.Path", dojox.gfx.path.Path, {
- // summary: a path shape (SVG)
- _updateWithSegment: function(segment){
- // summary: updates the bounding box of path with new segment
- // segment: Object: a segment
- dojox.gfx.Path.superclass._updateWithSegment.apply(this, arguments);
- if(typeof(this.shape.path) == "string"){
- this.rawNode.setAttribute("d", this.shape.path);
- }
- },
- setShape: function(newShape){
- // summary: forms a path using a shape (SVG)
- // newShape: Object: an SVG path string or a path object (see dojox.gfx.defaultPath)
- dojox.gfx.Path.superclass.setShape.apply(this, arguments);
- this.rawNode.setAttribute("d", this.shape.path);
- return this; // self
- }
-});
-dojox.gfx.Path.nodeType = "path";
-
-dojo.declare("dojox.gfx.TextPath", dojox.gfx.path.TextPath, {
- // summary: a textpath shape (SVG)
- _updateWithSegment: function(segment){
- // summary: updates the bounding box of path with new segment
- // segment: Object: a segment
- dojox.gfx.Path.superclass._updateWithSegment.apply(this, arguments);
- this._setTextPath();
- },
- setShape: function(newShape){
- // summary: forms a path using a shape (SVG)
- // newShape: Object: an SVG path string or a path object (see dojox.gfx.defaultPath)
- dojox.gfx.Path.superclass.setShape.apply(this, arguments);
- this._setTextPath();
- return this; // self
- },
- _setTextPath: function(){
- if(typeof this.shape.path != "string"){ return; }
- var r = this.rawNode;
- if(!r.firstChild){
- var tp = document.createElementNS(dojox.gfx.svg.xmlns.svg, "textPath");
- var tx = document.createTextNode("");
- tp.appendChild(tx);
- r.appendChild(tp);
- }
- var ref = r.firstChild.getAttributeNS(dojox.gfx.svg.xmlns.xlink, "href");
- var path = ref && dojox.gfx.svg.getRef(ref);
- if(!path){
- var surface = this._getParentSurface();
- if(surface){
- var defs = surface.defNode;
- path = document.createElementNS(dojox.gfx.svg.xmlns.svg, "path");
- var id = dojox.gfx._base._getUniqueId();
- path.setAttribute("id", id);
- defs.appendChild(path);
- r.firstChild.setAttributeNS(dojox.gfx.svg.xmlns.xlink, "href", "#" + id);
- }
- }
- if(path){
- path.setAttribute("d", this.shape.path);
- }
- },
- _setText: function(){
- var r = this.rawNode;
- if(!r.firstChild){
- var tp = document.createElementNS(dojox.gfx.svg.xmlns.svg, "textPath");
- var tx = document.createTextNode("");
- tp.appendChild(tx);
- r.appendChild(tp);
- }
- r = r.firstChild;
- var t = this.text;
- r.setAttribute("alignment-baseline", "middle");
- switch(t.align){
- case "middle":
- r.setAttribute("text-anchor", "middle");
- r.setAttribute("startOffset", "50%");
- break;
- case "end":
- r.setAttribute("text-anchor", "end");
- r.setAttribute("startOffset", "100%");
- break;
- default:
- r.setAttribute("text-anchor", "start");
- r.setAttribute("startOffset", "0%");
- break;
- }
- //r.parentNode.setAttribute("alignment-baseline", "central");
- //r.setAttribute("dominant-baseline", "central");
- r.setAttribute("baseline-shift", "0.5ex");
- r.setAttribute("text-decoration", t.decoration);
- r.setAttribute("rotate", t.rotated ? 90 : 0);
- r.setAttribute("kerning", t.kerning ? "auto" : 0);
- r.firstChild.data = t.text;
- }
-});
-dojox.gfx.TextPath.nodeType = "text";
-
-dojo.declare("dojox.gfx.Surface", dojox.gfx.shape.Surface, {
- // summary: a surface object to be used for drawings (SVG)
- constructor: function(){
- dojox.gfx.svg.Container._init.call(this);
- },
- setDimensions: function(width, height){
- // summary: sets the width and height of the rawNode
- // width: String: width of surface, e.g., "100px"
- // height: String: height of surface, e.g., "100px"
- if(!this.rawNode){ return this; }
- this.rawNode.setAttribute("width", width);
- this.rawNode.setAttribute("height", height);
- return this; // self
- },
- getDimensions: function(){
- // summary: returns an object with properties "width" and "height"
- return this.rawNode ? {width: this.rawNode.getAttribute("width"), height: this.rawNode.getAttribute("height")} : null; // Object
- }
-});
-
-dojox.gfx.createSurface = function(parentNode, width, height){
- // summary: creates a surface (SVG)
- // parentNode: Node: a parent node
- // width: String: width of surface, e.g., "100px"
- // height: String: height of surface, e.g., "100px"
-
- var s = new dojox.gfx.Surface();
- s.rawNode = document.createElementNS(dojox.gfx.svg.xmlns.svg, "svg");
- s.rawNode.setAttribute("width", width);
- s.rawNode.setAttribute("height", height);
-
- var node = document.createElementNS(dojox.gfx.svg.xmlns.svg, "defs");
- s.rawNode.appendChild(node);
- s.defNode = node;
-
- dojo.byId(parentNode).appendChild(s.rawNode);
- return s; // dojox.gfx.Surface
+if(typeof (_5)=="object"&&"type" in _5){
+switch(_5.type){
+case "linear":
+f=g.makeParameters(g.defaultLinearGradient,_5);
+var _7=this._setFillObject(f,"linearGradient");
+d.forEach(["x1","y1","x2","y2"],_6,_7);
+break;
+case "radial":
+f=g.makeParameters(g.defaultRadialGradient,_5);
+var _7=this._setFillObject(f,"radialGradient");
+d.forEach(["cx","cy","r"],_6,_7);
+break;
+case "pattern":
+f=g.makeParameters(g.defaultPattern,_5);
+var _8=this._setFillObject(f,"pattern");
+d.forEach(["x","y","width","height"],_6,_8);
+break;
+}
+this.fillStyle=f;
+return this;
+}
+var f=g.normalizeColor(_5);
+this.fillStyle=f;
+this.rawNode.setAttribute("fill",f.toCss());
+this.rawNode.setAttribute("fill-opacity",f.a);
+this.rawNode.setAttribute("fill-rule","evenodd");
+return this;
+},setStroke:function(_9){
+var rn=this.rawNode;
+if(!_9){
+this.strokeStyle=null;
+rn.setAttribute("stroke","none");
+rn.setAttribute("stroke-opacity",0);
+return this;
+}
+if(typeof _9=="string"||d.isArray(_9)||_9 instanceof d.Color){
+_9={color:_9};
+}
+var s=this.strokeStyle=g.makeParameters(g.defaultStroke,_9);
+s.color=g.normalizeColor(s.color);
+if(s){
+rn.setAttribute("stroke",s.color.toCss());
+rn.setAttribute("stroke-opacity",s.color.a);
+rn.setAttribute("stroke-width",s.width);
+rn.setAttribute("stroke-linecap",s.cap);
+if(typeof s.join=="number"){
+rn.setAttribute("stroke-linejoin","miter");
+rn.setAttribute("stroke-miterlimit",s.join);
+}else{
+rn.setAttribute("stroke-linejoin",s.join);
+}
+var da=s.style.toLowerCase();
+if(da in _1.dasharray){
+da=_1.dasharray[da];
+}
+if(da instanceof Array){
+da=d._toArray(da);
+for(var i=0;i<da.length;++i){
+da[i]*=s.width;
+}
+if(s.cap!="butt"){
+for(var i=0;i<da.length;i+=2){
+da[i]-=s.width;
+if(da[i]<1){
+da[i]=1;
+}
+}
+for(var i=1;i<da.length;i+=2){
+da[i]+=s.width;
+}
+}
+da=da.join(",");
+}
+rn.setAttribute("stroke-dasharray",da);
+rn.setAttribute("dojoGfxStrokeStyle",s.style);
+}
+return this;
+},_getParentSurface:function(){
+var _a=this.parent;
+for(;_a&&!(_a instanceof g.Surface);_a=_a.parent){
+}
+return _a;
+},_setFillObject:function(f,_b){
+var _c=_1.xmlns.svg;
+this.fillStyle=f;
+var _d=this._getParentSurface(),_e=_d.defNode,_f=this.rawNode.getAttribute("fill"),ref=_1.getRef(_f);
+if(ref){
+_f=ref;
+if(_f.tagName.toLowerCase()!=_b.toLowerCase()){
+var id=_f.id;
+_f.parentNode.removeChild(_f);
+_f=_2(_c,_b);
+_f.setAttribute("id",id);
+_e.appendChild(_f);
+}else{
+while(_f.childNodes.length){
+_f.removeChild(_f.lastChild);
+}
+}
+}else{
+_f=_2(_c,_b);
+_f.setAttribute("id",g._base._getUniqueId());
+_e.appendChild(_f);
+}
+if(_b=="pattern"){
+_f.setAttribute("patternUnits","userSpaceOnUse");
+var img=_2(_c,"image");
+img.setAttribute("x",0);
+img.setAttribute("y",0);
+img.setAttribute("width",f.width.toFixed(8));
+img.setAttribute("height",f.height.toFixed(8));
+img.setAttributeNS(_1.xmlns.xlink,"href",f.src);
+_f.appendChild(img);
+}else{
+_f.setAttribute("gradientUnits","userSpaceOnUse");
+for(var i=0;i<f.colors.length;++i){
+var c=f.colors[i],t=_2(_c,"stop"),cc=c.color=g.normalizeColor(c.color);
+t.setAttribute("offset",c.offset.toFixed(8));
+t.setAttribute("stop-color",cc.toCss());
+t.setAttribute("stop-opacity",cc.a);
+_f.appendChild(t);
+}
+}
+this.rawNode.setAttribute("fill","url(#"+_f.getAttribute("id")+")");
+this.rawNode.removeAttribute("fill-opacity");
+this.rawNode.setAttribute("fill-rule","evenodd");
+return _f;
+},_applyTransform:function(){
+var _10=this.matrix;
+if(_10){
+var tm=this.matrix;
+this.rawNode.setAttribute("transform","matrix("+tm.xx.toFixed(8)+","+tm.yx.toFixed(8)+","+tm.xy.toFixed(8)+","+tm.yy.toFixed(8)+","+tm.dx.toFixed(8)+","+tm.dy.toFixed(8)+")");
+}else{
+this.rawNode.removeAttribute("transform");
+}
+return this;
+},setRawNode:function(_11){
+var r=this.rawNode=_11;
+if(this.shape.type!="image"){
+r.setAttribute("fill","none");
+}
+r.setAttribute("fill-opacity",0);
+r.setAttribute("stroke","none");
+r.setAttribute("stroke-opacity",0);
+r.setAttribute("stroke-width",1);
+r.setAttribute("stroke-linecap","butt");
+r.setAttribute("stroke-linejoin","miter");
+r.setAttribute("stroke-miterlimit",4);
+},setShape:function(_12){
+this.shape=g.makeParameters(this.shape,_12);
+for(var i in this.shape){
+if(i!="type"){
+this.rawNode.setAttribute(i,this.shape[i]);
+}
+}
+this.bbox=null;
+return this;
+},_moveToFront:function(){
+this.rawNode.parentNode.appendChild(this.rawNode);
+return this;
+},_moveToBack:function(){
+this.rawNode.parentNode.insertBefore(this.rawNode,this.rawNode.parentNode.firstChild);
+return this;
+}});
+dojo.declare("dojox.gfx.Group",g.Shape,{constructor:function(){
+_1.Container._init.call(this);
+},setRawNode:function(_13){
+this.rawNode=_13;
+}});
+g.Group.nodeType="g";
+dojo.declare("dojox.gfx.Rect",gs.Rect,{setShape:function(_14){
+this.shape=g.makeParameters(this.shape,_14);
+this.bbox=null;
+for(var i in this.shape){
+if(i!="type"&&i!="r"){
+this.rawNode.setAttribute(i,this.shape[i]);
+}
+}
+if(this.shape.r){
+this.rawNode.setAttribute("ry",this.shape.r);
+this.rawNode.setAttribute("rx",this.shape.r);
+}
+return this;
+}});
+g.Rect.nodeType="rect";
+g.Ellipse=gs.Ellipse;
+g.Ellipse.nodeType="ellipse";
+g.Circle=gs.Circle;
+g.Circle.nodeType="circle";
+g.Line=gs.Line;
+g.Line.nodeType="line";
+dojo.declare("dojox.gfx.Polyline",gs.Polyline,{setShape:function(_15,_16){
+if(_15&&_15 instanceof Array){
+this.shape=g.makeParameters(this.shape,{points:_15});
+if(_16&&this.shape.points.length){
+this.shape.points.push(this.shape.points[0]);
+}
+}else{
+this.shape=g.makeParameters(this.shape,_15);
+}
+this.bbox=null;
+this._normalizePoints();
+var _17=[],p=this.shape.points;
+for(var i=0;i<p.length;++i){
+_17.push(p[i].x.toFixed(8),p[i].y.toFixed(8));
+}
+this.rawNode.setAttribute("points",_17.join(" "));
+return this;
+}});
+g.Polyline.nodeType="polyline";
+dojo.declare("dojox.gfx.Image",gs.Image,{setShape:function(_18){
+this.shape=g.makeParameters(this.shape,_18);
+this.bbox=null;
+var _19=this.rawNode;
+for(var i in this.shape){
+if(i!="type"&&i!="src"){
+_19.setAttribute(i,this.shape[i]);
+}
+}
+_19.setAttribute("preserveAspectRatio","none");
+_19.setAttributeNS(_1.xmlns.xlink,"href",this.shape.src);
+return this;
+}});
+g.Image.nodeType="image";
+dojo.declare("dojox.gfx.Text",gs.Text,{setShape:function(_1a){
+this.shape=g.makeParameters(this.shape,_1a);
+this.bbox=null;
+var r=this.rawNode,s=this.shape;
+r.setAttribute("x",s.x);
+r.setAttribute("y",s.y);
+r.setAttribute("text-anchor",s.align);
+r.setAttribute("text-decoration",s.decoration);
+r.setAttribute("rotate",s.rotated?90:0);
+r.setAttribute("kerning",s.kerning?"auto":0);
+r.setAttribute("text-rendering","optimizeLegibility");
+if(!dojo.isIE){
+r.textContent=s.text;
+}else{
+r.appendChild(document.createTextNode(s.text));
+}
+return this;
+},getTextWidth:function(){
+var _1b=this.rawNode,_1c=_1b.parentNode,_1d=_1b.cloneNode(true);
+_1d.style.visibility="hidden";
+var _1e=0,_1f=_1d.firstChild.nodeValue;
+_1c.appendChild(_1d);
+if(_1f!=""){
+while(!_1e){
+_1e=parseInt(_1d.getBBox().width);
+}
+}
+_1c.removeChild(_1d);
+return _1e;
+}});
+g.Text.nodeType="text";
+dojo.declare("dojox.gfx.Path",g.path.Path,{_updateWithSegment:function(_20){
+g.Path.superclass._updateWithSegment.apply(this,arguments);
+if(typeof (this.shape.path)=="string"){
+this.rawNode.setAttribute("d",this.shape.path);
+}
+},setShape:function(_21){
+g.Path.superclass.setShape.apply(this,arguments);
+this.rawNode.setAttribute("d",this.shape.path);
+return this;
+}});
+g.Path.nodeType="path";
+dojo.declare("dojox.gfx.TextPath",g.path.TextPath,{_updateWithSegment:function(_22){
+g.Path.superclass._updateWithSegment.apply(this,arguments);
+this._setTextPath();
+},setShape:function(_23){
+g.Path.superclass.setShape.apply(this,arguments);
+this._setTextPath();
+return this;
+},_setTextPath:function(){
+if(typeof this.shape.path!="string"){
+return;
+}
+var r=this.rawNode;
+if(!r.firstChild){
+var tp=_2(_1.xmlns.svg,"textPath"),tx=document.createTextNode("");
+tp.appendChild(tx);
+r.appendChild(tp);
+}
+var ref=r.firstChild.getAttributeNS(_1.xmlns.xlink,"href"),_24=ref&&_1.getRef(ref);
+if(!_24){
+var _25=this._getParentSurface();
+if(_25){
+var _26=_25.defNode;
+_24=_2(_1.xmlns.svg,"path");
+var id=g._base._getUniqueId();
+_24.setAttribute("id",id);
+_26.appendChild(_24);
+r.firstChild.setAttributeNS(_1.xmlns.xlink,"href","#"+id);
+}
+}
+if(_24){
+_24.setAttribute("d",this.shape.path);
+}
+},_setText:function(){
+var r=this.rawNode;
+if(!r.firstChild){
+var tp=_2(_1.xmlns.svg,"textPath"),tx=document.createTextNode("");
+tp.appendChild(tx);
+r.appendChild(tp);
+}
+r=r.firstChild;
+var t=this.text;
+r.setAttribute("alignment-baseline","middle");
+switch(t.align){
+case "middle":
+r.setAttribute("text-anchor","middle");
+r.setAttribute("startOffset","50%");
+break;
+case "end":
+r.setAttribute("text-anchor","end");
+r.setAttribute("startOffset","100%");
+break;
+default:
+r.setAttribute("text-anchor","start");
+r.setAttribute("startOffset","0%");
+break;
+}
+r.setAttribute("baseline-shift","0.5ex");
+r.setAttribute("text-decoration",t.decoration);
+r.setAttribute("rotate",t.rotated?90:0);
+r.setAttribute("kerning",t.kerning?"auto":0);
+r.firstChild.data=t.text;
+}});
+g.TextPath.nodeType="text";
+dojo.declare("dojox.gfx.Surface",gs.Surface,{constructor:function(){
+_1.Container._init.call(this);
+},destroy:function(){
+this.defNode=null;
+this.inherited(arguments);
+},setDimensions:function(_27,_28){
+if(!this.rawNode){
+return this;
+}
+this.rawNode.setAttribute("width",_27);
+this.rawNode.setAttribute("height",_28);
+return this;
+},getDimensions:function(){
+var t=this.rawNode?{width:g.normalizedLength(this.rawNode.getAttribute("width")),height:g.normalizedLength(this.rawNode.getAttribute("height"))}:null;
+return t;
+}});
+g.createSurface=function(_29,_2a,_2b){
+var s=new g.Surface();
+s.rawNode=_2(_1.xmlns.svg,"svg");
+if(_2a){
+s.rawNode.setAttribute("width",_2a);
+}
+if(_2b){
+s.rawNode.setAttribute("height",_2b);
+}
+var _2c=_2(_1.xmlns.svg,"defs");
+s.rawNode.appendChild(_2c);
+s.defNode=_2c;
+s._parent=d.byId(_29);
+s._parent.appendChild(s.rawNode);
+return s;
};
-
-// Extenders
-
-dojox.gfx.svg.Font = {
- _setFont: function(){
- // summary: sets a font object (SVG)
- var f = this.fontStyle;
- // next line doesn't work in Firefox 2 or Opera 9
- //this.rawNode.setAttribute("font", dojox.gfx.makeFontString(this.fontStyle));
- this.rawNode.setAttribute("font-style", f.style);
- this.rawNode.setAttribute("font-variant", f.variant);
- this.rawNode.setAttribute("font-weight", f.weight);
- this.rawNode.setAttribute("font-size", f.size);
- this.rawNode.setAttribute("font-family", f.family);
- }
-};
-
-dojox.gfx.svg.Container = {
- _init: function(){
- dojox.gfx.shape.Container._init.call(this);
- },
- add: function(shape){
- // summary: adds a shape to a group/surface
- // shape: dojox.gfx.Shape: an VML shape object
- if(this != shape.getParent()){
- this.rawNode.appendChild(shape.rawNode);
- //dojox.gfx.Group.superclass.add.apply(this, arguments);
- //this.inherited(arguments);
- dojox.gfx.shape.Container.add.apply(this, arguments);
- }
- return this; // self
- },
- remove: function(shape, silently){
- // summary: remove a shape from a group/surface
- // shape: dojox.gfx.Shape: an VML shape object
- // silently: Boolean?: if true, regenerate a picture
- if(this == shape.getParent()){
- if(this.rawNode == shape.rawNode.parentNode){
- this.rawNode.removeChild(shape.rawNode);
- }
- //dojox.gfx.Group.superclass.remove.apply(this, arguments);
- //this.inherited(arguments);
- dojox.gfx.shape.Container.remove.apply(this, arguments);
- }
- return this; // self
- },
- clear: function(){
- // summary: removes all shapes from a group/surface
- var r = this.rawNode;
- while(r.lastChild){
- r.removeChild(r.lastChild);
- }
- //return this.inherited(arguments); // self
- return dojox.gfx.shape.Container.clear.apply(this, arguments);
- },
- _moveChildToFront: dojox.gfx.shape.Container._moveChildToFront,
- _moveChildToBack: dojox.gfx.shape.Container._moveChildToBack
-};
-
-dojo.mixin(dojox.gfx.shape.Creator, {
- // summary: SVG shape creators
- createObject: function(shapeType, rawShape){
- // summary: creates an instance of the passed shapeType class
- // shapeType: Function: a class constructor to create an instance of
- // rawShape: Object: properties to be passed in to the classes "setShape" method
- if(!this.rawNode){ return null; }
- var shape = new shapeType();
- var node = document.createElementNS(dojox.gfx.svg.xmlns.svg, shapeType.nodeType);
- shape.setRawNode(node);
- this.rawNode.appendChild(node);
- shape.setShape(rawShape);
- this.add(shape);
- return shape; // dojox.gfx.Shape
- }
-});
-
-dojo.extend(dojox.gfx.Text, dojox.gfx.svg.Font);
-dojo.extend(dojox.gfx.TextPath, dojox.gfx.svg.Font);
-
-dojo.extend(dojox.gfx.Group, dojox.gfx.svg.Container);
-dojo.extend(dojox.gfx.Group, dojox.gfx.shape.Creator);
-
-dojo.extend(dojox.gfx.Surface, dojox.gfx.svg.Container);
-dojo.extend(dojox.gfx.Surface, dojox.gfx.shape.Creator);
-
+_1.Font={_setFont:function(){
+var f=this.fontStyle;
+this.rawNode.setAttribute("font-style",f.style);
+this.rawNode.setAttribute("font-variant",f.variant);
+this.rawNode.setAttribute("font-weight",f.weight);
+this.rawNode.setAttribute("font-size",f.size);
+this.rawNode.setAttribute("font-family",f.family);
+}};
+_1.Container={_init:function(){
+gs.Container._init.call(this);
+},add:function(_2d){
+if(this!=_2d.getParent()){
+this.rawNode.appendChild(_2d.rawNode);
+gs.Container.add.apply(this,arguments);
+}
+return this;
+},remove:function(_2e,_2f){
+if(this==_2e.getParent()){
+if(this.rawNode==_2e.rawNode.parentNode){
+this.rawNode.removeChild(_2e.rawNode);
+}
+gs.Container.remove.apply(this,arguments);
+}
+return this;
+},clear:function(){
+var r=this.rawNode;
+while(r.lastChild){
+r.removeChild(r.lastChild);
}
+var _30=this.defNode;
+if(_30){
+while(_30.lastChild){
+_30.removeChild(_30.lastChild);
+}
+r.appendChild(_30);
+}
+return gs.Container.clear.apply(this,arguments);
+},_moveChildToFront:gs.Container._moveChildToFront,_moveChildToBack:gs.Container._moveChildToBack};
+d.mixin(gs.Creator,{createObject:function(_31,_32){
+if(!this.rawNode){
+return null;
+}
+var _33=new _31(),_34=_2(_1.xmlns.svg,_31.nodeType);
+_33.setRawNode(_34);
+this.rawNode.appendChild(_34);
+_33.setShape(_32);
+this.add(_33);
+return _33;
+}});
+d.extend(g.Text,_1.Font);
+d.extend(g.TextPath,_1.Font);
+d.extend(g.Group,_1.Container);
+d.extend(g.Group,gs.Creator);
+d.extend(g.Surface,_1.Container);
+d.extend(g.Surface,gs.Creator);
+})();
+}
diff --git a/js/dojo/dojox/gfx/svg_attach.js b/js/dojo/dojox/gfx/svg_attach.js
--- a/js/dojo/dojox/gfx/svg_attach.js
+++ b/js/dojo/dojox/gfx/svg_attach.js
@@ -1,224 +1,191 @@
-dojo.require("dojox.gfx.svg");
-
-dojo.experimental("dojox.gfx.svg_attach");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-(function(){
- dojox.gfx.attachNode = function(node){
- // summary: creates a shape from a Node
- // node: Node: an SVG node
- if(!node) return null;
- var s = null;
- switch(node.tagName.toLowerCase()){
- case dojox.gfx.Rect.nodeType:
- s = new dojox.gfx.Rect(node);
- attachRect(s);
- break;
- case dojox.gfx.Ellipse.nodeType:
- s = new dojox.gfx.Ellipse(node);
- attachShape(s, dojox.gfx.defaultEllipse);
- break;
- case dojox.gfx.Polyline.nodeType:
- s = new dojox.gfx.Polyline(node);
- attachShape(s, dojox.gfx.defaultPolyline);
- break;
- case dojox.gfx.Path.nodeType:
- s = new dojox.gfx.Path(node);
- attachShape(s, dojox.gfx.defaultPath);
- break;
- case dojox.gfx.Circle.nodeType:
- s = new dojox.gfx.Circle(node);
- attachShape(s, dojox.gfx.defaultCircle);
- break;
- case dojox.gfx.Line.nodeType:
- s = new dojox.gfx.Line(node);
- attachShape(s, dojox.gfx.defaultLine);
- break;
- case dojox.gfx.Image.nodeType:
- s = new dojox.gfx.Image(node);
- attachShape(s, dojox.gfx.defaultImage);
- break;
- case dojox.gfx.Text.nodeType:
- var t = node.getElementsByTagName("textPath");
- if(t && t.length){
- s = new dojox.gfx.TextPath(node);
- attachShape(s, dojox.gfx.defaultPath);
- attachTextPath(s);
- }else{
- s = new dojox.gfx.Text(node);
- attachText(s);
- }
- attachFont(s);
- break;
- default:
- //console.debug("FATAL ERROR! tagName = " + node.tagName);
- return null;
- }
- if(!(s instanceof dojox.gfx.Image)){
- attachFill(s);
- attachStroke(s);
- }
- attachTransform(s);
- return s; // dojox.gfx.Shape
- };
-
- dojox.gfx.attachSurface = function(node){
- // summary: creates a surface from a Node
- // node: Node: an SVG node
- var s = new dojox.gfx.Surface();
- s.rawNode = node;
- var def_elems = node.getElementsByTagName("defs");
- if(def_elems.length == 0){
- return null; // dojox.gfx.Surface
- }
- s.defNode = def_elems[0];
- return s; // dojox.gfx.Surface
- };
- var attachFill = function(object){
- // summary: deduces a fill style from a node.
- // object: dojox.gfx.Shape: an SVG shape
- var fill = object.rawNode.getAttribute("fill");
- if(fill == "none"){
- object.fillStyle = null;
- return;
- }
- var fillStyle = null, gradient = dojox.gfx.svg.getRef(fill);
- if(ref){
- switch(gradient.tagName.toLowerCase()){
- case "lineargradient":
- fillStyle = _getGradient(dojox.gfx.defaultLinearGradient, gradient);
- dojo.forEach(["x1", "y1", "x2", "y2"], function(x){
- fillStyle[x] = gradient.getAttribute(x);
- });
- break;
- case "radialgradient":
- fillStyle = _getGradient(dojox.gfx.defaultRadialGradient, gradient);
- dojo.forEach(["cx", "cy", "r"], function(x){
- fillStyle[x] = gradient.getAttribute(x);
- });
- fillStyle.cx = gradient.getAttribute("cx");
- fillStyle.cy = gradient.getAttribute("cy");
- fillStyle.r = gradient.getAttribute("r");
- break;
- case "pattern":
- fillStyle = dojo.lang.shallowCopy(dojox.gfx.defaultPattern, true);
- dojo.forEach(["x", "y", "width", "height"], function(x){
- fillStyle[x] = gradient.getAttribute(x);
- });
- fillStyle.src = gradient.firstChild.getAttributeNS(dojox.gfx.svg.xmlns.xlink, "href");
- break;
- }
- }else{
- fillStyle = new dojo.Color(fill);
- var opacity = rawNode.getAttribute("fill-opacity");
- if(opacity != null){ fillStyle.a = opacity; }
- }
- object.fillStyle = fillStyle;
- };
-
- var _getGradient = function(defaultGradient, gradient){
- var fillStyle = dojo.clone(defaultGradient);
- fillStyle.colors = [];
- for(var i = 0; i < gradient.childNodes.length; ++i){
- fillStyle.colors.push({
- offset: gradient.childNodes[i].getAttribute("offset"),
- color: new dojo.Color(gradient.childNodes[i].getAttribute("stop-color"))
- });
- }
- return fillStyle;
- };
-
- var attachStroke = function(object){
- // summary: deduces a stroke style from a node.
- // object: dojox.gfx.Shape: an SVG shape
- var rawNode = object.rawNode, stroke = rawNode.getAttribute("stroke");
- if(stroke == null || stroke == "none"){
- object.strokeStyle = null;
- return;
- }
- var strokeStyle = object.strokeStyle = dojo.clone(dojox.gfx.defaultStroke);
- var color = new dojo.Color(stroke);
- if(color){
- strokeStyle.color = color;
- strokeStyle.color.a = rawNode.getAttribute("stroke-opacity");
- strokeStyle.width = rawNode.getAttribute("stroke-width");
- strokeStyle.cap = rawNode.getAttribute("stroke-linecap");
- strokeStyle.join = rawNode.getAttribute("stroke-linejoin");
- if(strokeStyle.join == "miter"){
- strokeStyle.join = rawNode.getAttribute("stroke-miterlimit");
- }
- strokeStyle.style = rawNode.getAttribute("dojoGfxStrokeStyle");
- }
- };
-
- var attachTransform = function(object){
- // summary: deduces a transformation matrix from a node.
- // object: dojox.gfx.Shape: an SVG shape
- var matrix = object.rawNode.getAttribute("transform");
- if(matrix.match(/^matrix\(.+\)$/)){
- var t = matrix.slice(7, -1).split(",");
- object.matrix = dojox.gfx.matrix.normalize({
- xx: parseFloat(t[0]), xy: parseFloat(t[2]),
- yx: parseFloat(t[1]), yy: parseFloat(t[3]),
- dx: parseFloat(t[4]), dy: parseFloat(t[5])
- });
- }else{
- object.matrix = null;
- }
- };
-
- var attachFont = function(object){
- // summary: deduces a font style from a Node.
- // object: dojox.gfx.Shape: an SVG shape
- var fontStyle = object.fontStyle = dojo.clone(dojox.gfx.defaultFont),
- r = object.rawNode;
- fontStyle.style = r.getAttribute("font-style");
- fontStyle.variant = r.getAttribute("font-variant");
- fontStyle.weight = r.getAttribute("font-weight");
- fontStyle.size = r.getAttribute("font-size");
- fontStyle.family = r.getAttribute("font-family");
- };
-
- var attachShape = function(object, def){
- // summary: builds a shape from a node.
- // object: dojox.gfx.Shape: an SVG shape
- // def: Object: a default shape template
- var shape = object.shape = dojo.clone(def), r = object.rawNode;
- for(var i in shape) {
- shape[i] = r.getAttribute(i);
- }
- };
-
- var attachRect = function(object){
- // summary: builds a rectangle shape from a node.
- // object: dojox.gfx.Shape: an SVG shape
- attachShape(object, dojox.gfx.defaultRect);
- object.shape.r = Math.min(object.rawNode.getAttribute("rx"), object.rawNode.getAttribute("ry"));
- };
-
- var attachText = function(object){
- // summary: builds a text shape from a node.
- // object: dojox.gfx.Shape: an SVG shape
- var shape = object.shape = dojo.clone(dojox.gfx.defaultText),
- r = object.rawNode;
- shape.x = r.getAttribute("x");
- shape.y = r.getAttribute("y");
- shape.align = r.getAttribute("text-anchor");
- shape.decoration = r.getAttribute("text-decoration");
- shape.rotated = parseFloat(r.getAttribute("rotate")) != 0;
- shape.kerning = r.getAttribute("kerning") == "auto";
- shape.text = r.firstChild.nodeValue;
- };
-
- var attachTextPath = function(object){
- // summary: builds a textpath shape from a node.
- // object: dojox.gfx.Shape: an SVG shape
- var shape = object.shape = dojo.clone(dojox.gfx.defaultTextPath),
- r = object.rawNode;
- shape.align = r.getAttribute("text-anchor");
- shape.decoration = r.getAttribute("text-decoration");
- shape.rotated = parseFloat(r.getAttribute("rotate")) != 0;
- shape.kerning = r.getAttribute("kerning") == "auto";
- shape.text = r.firstChild.nodeValue;
- };
+dojo.require("dojox.gfx.svg");
+dojo.experimental("dojox.gfx.svg_attach");
+(function(){
+dojox.gfx.attachNode=function(_1){
+if(!_1){
+return null;
+}
+var s=null;
+switch(_1.tagName.toLowerCase()){
+case dojox.gfx.Rect.nodeType:
+s=new dojox.gfx.Rect(_1);
+_2(s);
+break;
+case dojox.gfx.Ellipse.nodeType:
+s=new dojox.gfx.Ellipse(_1);
+_3(s,dojox.gfx.defaultEllipse);
+break;
+case dojox.gfx.Polyline.nodeType:
+s=new dojox.gfx.Polyline(_1);
+_3(s,dojox.gfx.defaultPolyline);
+break;
+case dojox.gfx.Path.nodeType:
+s=new dojox.gfx.Path(_1);
+_3(s,dojox.gfx.defaultPath);
+break;
+case dojox.gfx.Circle.nodeType:
+s=new dojox.gfx.Circle(_1);
+_3(s,dojox.gfx.defaultCircle);
+break;
+case dojox.gfx.Line.nodeType:
+s=new dojox.gfx.Line(_1);
+_3(s,dojox.gfx.defaultLine);
+break;
+case dojox.gfx.Image.nodeType:
+s=new dojox.gfx.Image(_1);
+_3(s,dojox.gfx.defaultImage);
+break;
+case dojox.gfx.Text.nodeType:
+var t=_1.getElementsByTagName("textPath");
+if(t&&t.length){
+s=new dojox.gfx.TextPath(_1);
+_3(s,dojox.gfx.defaultPath);
+_4(s);
+}else{
+s=new dojox.gfx.Text(_1);
+_5(s);
+}
+_6(s);
+break;
+default:
+return null;
+}
+if(!(s instanceof dojox.gfx.Image)){
+_7(s);
+_8(s);
+}
+_9(s);
+return s;
+};
+dojox.gfx.attachSurface=function(_a){
+var s=new dojox.gfx.Surface();
+s.rawNode=_a;
+var _b=_a.getElementsByTagName("defs");
+if(_b.length==0){
+return null;
+}
+s.defNode=_b[0];
+return s;
+};
+var _7=function(_c){
+var _d=_c.rawNode.getAttribute("fill");
+if(_d=="none"){
+_c.fillStyle=null;
+return;
+}
+var _e=null,_f=dojox.gfx.svg.getRef(_d);
+if(_f){
+switch(_f.tagName.toLowerCase()){
+case "lineargradient":
+_e=_10(dojox.gfx.defaultLinearGradient,_f);
+dojo.forEach(["x1","y1","x2","y2"],function(x){
+_e[x]=_f.getAttribute(x);
+});
+break;
+case "radialgradient":
+_e=_10(dojox.gfx.defaultRadialGradient,_f);
+dojo.forEach(["cx","cy","r"],function(x){
+_e[x]=_f.getAttribute(x);
+});
+_e.cx=_f.getAttribute("cx");
+_e.cy=_f.getAttribute("cy");
+_e.r=_f.getAttribute("r");
+break;
+case "pattern":
+_e=dojo.lang.shallowCopy(dojox.gfx.defaultPattern,true);
+dojo.forEach(["x","y","width","height"],function(x){
+_e[x]=_f.getAttribute(x);
+});
+_e.src=_f.firstChild.getAttributeNS(dojox.gfx.svg.xmlns.xlink,"href");
+break;
+}
+}else{
+_e=new dojo.Color(_d);
+var _11=_c.rawNode.getAttribute("fill-opacity");
+if(_11!=null){
+_e.a=_11;
+}
+}
+_c.fillStyle=_e;
+};
+var _10=function(_12,_13){
+var _14=dojo.clone(_12);
+_14.colors=[];
+for(var i=0;i<_13.childNodes.length;++i){
+_14.colors.push({offset:_13.childNodes[i].getAttribute("offset"),color:new dojo.Color(_13.childNodes[i].getAttribute("stop-color"))});
+}
+return _14;
+};
+var _8=function(_15){
+var _16=_15.rawNode,_17=_16.getAttribute("stroke");
+if(_17==null||_17=="none"){
+_15.strokeStyle=null;
+return;
+}
+var _18=_15.strokeStyle=dojo.clone(dojox.gfx.defaultStroke);
+var _19=new dojo.Color(_17);
+if(_19){
+_18.color=_19;
+_18.color.a=_16.getAttribute("stroke-opacity");
+_18.width=_16.getAttribute("stroke-width");
+_18.cap=_16.getAttribute("stroke-linecap");
+_18.join=_16.getAttribute("stroke-linejoin");
+if(_18.join=="miter"){
+_18.join=_16.getAttribute("stroke-miterlimit");
+}
+_18.style=_16.getAttribute("dojoGfxStrokeStyle");
+}
+};
+var _9=function(_1a){
+var _1b=_1a.rawNode.getAttribute("transform");
+if(_1b.match(/^matrix\(.+\)$/)){
+var t=_1b.slice(7,-1).split(",");
+_1a.matrix=dojox.gfx.matrix.normalize({xx:parseFloat(t[0]),xy:parseFloat(t[2]),yx:parseFloat(t[1]),yy:parseFloat(t[3]),dx:parseFloat(t[4]),dy:parseFloat(t[5])});
+}else{
+_1a.matrix=null;
+}
+};
+var _6=function(_1c){
+var _1d=_1c.fontStyle=dojo.clone(dojox.gfx.defaultFont),r=_1c.rawNode;
+_1d.style=r.getAttribute("font-style");
+_1d.variant=r.getAttribute("font-variant");
+_1d.weight=r.getAttribute("font-weight");
+_1d.size=r.getAttribute("font-size");
+_1d.family=r.getAttribute("font-family");
+};
+var _3=function(_1e,def){
+var _1f=_1e.shape=dojo.clone(def),r=_1e.rawNode;
+for(var i in _1f){
+_1f[i]=r.getAttribute(i);
+}
+};
+var _2=function(_20){
+_3(_20,dojox.gfx.defaultRect);
+_20.shape.r=Math.min(_20.rawNode.getAttribute("rx"),_20.rawNode.getAttribute("ry"));
+};
+var _5=function(_21){
+var _22=_21.shape=dojo.clone(dojox.gfx.defaultText),r=_21.rawNode;
+_22.x=r.getAttribute("x");
+_22.y=r.getAttribute("y");
+_22.align=r.getAttribute("text-anchor");
+_22.decoration=r.getAttribute("text-decoration");
+_22.rotated=parseFloat(r.getAttribute("rotate"))!=0;
+_22.kerning=r.getAttribute("kerning")=="auto";
+_22.text=r.firstChild.nodeValue;
+};
+var _4=function(_23){
+var _24=_23.shape=dojo.clone(dojox.gfx.defaultTextPath),r=_23.rawNode;
+_24.align=r.getAttribute("text-anchor");
+_24.decoration=r.getAttribute("text-decoration");
+_24.rotated=parseFloat(r.getAttribute("rotate"))!=0;
+_24.kerning=r.getAttribute("kerning")=="auto";
+_24.text=r.firstChild.nodeValue;
+};
})();
diff --git a/js/dojo/dojox/gfx/utils.js b/js/dojo/dojox/gfx/utils.js
--- a/js/dojo/dojox/gfx/utils.js
+++ b/js/dojo/dojox/gfx/utils.js
@@ -1,87 +1,198 @@
-if(!dojo._hasResource["dojox.gfx.utils"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.gfx.utils"] = true;
-dojo.provide("dojox.gfx.utils");
-
-dojo.require("dojox.gfx");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojox.gfx.utils.serialize = function(
- /* dojox.gfx.Surface || dojox.gfx.Shape */ object
-){
- var t = {}, v, isSurface = object instanceof dojox.gfx.Surface;
- if(isSurface || object instanceof dojox.gfx.Group){
- t.children = [];
- for(var i = 0; i < object.children.length; ++i){
- t.children.push(dojox.gfx.utils.serialize(object.children[i]));
- }
- if(isSurface){
- return t.children; // Array
- }
- }else{
- t.shape = object.getShape();
- }
- if(object.getTransform){
- v = object.getTransform();
- if(v){ t.transform = v; }
- }
- if(object.getStroke){
- v = object.getStroke();
- if(v){ t.stroke = v; }
- }
- if(object.getFill){
- v = object.getFill();
- if(v){ t.fill = v; }
- }
- if(object.getFont){
- v = object.getFont();
- if(v){ t.font = v; }
- }
- return t; // Object
-};
-dojox.gfx.utils.toJson = function(
- /* dojox.gfx.Surface || dojox.gfx.Shape */ object,
- /* Boolean? */ prettyPrint
-){
- return dojo.toJson(dojox.gfx.utils.serialize(object), prettyPrint); // String
+if(!dojo._hasResource["dojox.gfx.utils"]){
+dojo._hasResource["dojox.gfx.utils"]=true;
+dojo.provide("dojox.gfx.utils");
+dojo.require("dojox.gfx");
+(function(){
+var d=dojo,g=dojox.gfx,gu=g.utils;
+dojo.mixin(gu,{forEach:function(_1,f,o){
+o=o||d.global;
+f.call(o,_1);
+if(_1 instanceof g.Surface||_1 instanceof g.Group){
+d.forEach(_1.children,function(_2){
+gu.forEach(_2,f,o);
+});
+}
+},serialize:function(_3){
+var t={},v,_4=_3 instanceof g.Surface;
+if(_4||_3 instanceof g.Group){
+t.children=d.map(_3.children,gu.serialize);
+if(_4){
+return t.children;
+}
+}else{
+t.shape=_3.getShape();
+}
+if(_3.getTransform){
+v=_3.getTransform();
+if(v){
+t.transform=v;
+}
+}
+if(_3.getStroke){
+v=_3.getStroke();
+if(v){
+t.stroke=v;
+}
+}
+if(_3.getFill){
+v=_3.getFill();
+if(v){
+t.fill=v;
+}
+}
+if(_3.getFont){
+v=_3.getFont();
+if(v){
+t.font=v;
+}
+}
+return t;
+},toJson:function(_5,_6){
+return d.toJson(gu.serialize(_5),_6);
+},deserialize:function(_7,_8){
+if(_8 instanceof Array){
+return d.map(_8,d.hitch(null,gu.deserialize,_7));
+}
+var _9=("shape" in _8)?_7.createShape(_8.shape):_7.createGroup();
+if("transform" in _8){
+_9.setTransform(_8.transform);
+}
+if("stroke" in _8){
+_9.setStroke(_8.stroke);
+}
+if("fill" in _8){
+_9.setFill(_8.fill);
+}
+if("font" in _8){
+_9.setFont(_8.font);
+}
+if("children" in _8){
+d.forEach(_8.children,d.hitch(null,gu.deserialize,_9));
+}
+return _9;
+},fromJson:function(_a,_b){
+return gu.deserialize(_a,d.fromJson(_b));
+},toSvg:function(_c){
+var _d=new dojo.Deferred();
+if(dojox.gfx.renderer==="svg"){
+try{
+var _e=gu._cleanSvg(gu._innerXML(_c.rawNode));
+_d.callback(_e);
+}
+catch(e){
+_d.errback(e);
+}
+}else{
+if(!gu._initSvgSerializerDeferred){
+gu._initSvgSerializer();
+}
+var _f=dojox.gfx.utils.toJson(_c);
+var _10=function(){
+try{
+var _11=_c.getDimensions();
+var _12=_11.width;
+var _13=_11.height;
+var _14=gu._gfxSvgProxy.document.createElement("div");
+gu._gfxSvgProxy.document.body.appendChild(_14);
+dojo.withDoc(gu._gfxSvgProxy.document,function(){
+dojo.style(_14,"width",_12);
+dojo.style(_14,"height",_13);
+},this);
+var ts=gu._gfxSvgProxy[dojox._scopeName].gfx.createSurface(_14,_12,_13);
+var _15=function(_16){
+try{
+gu._gfxSvgProxy[dojox._scopeName].gfx.utils.fromJson(_16,_f);
+var svg=gu._cleanSvg(_14.innerHTML);
+_16.clear();
+_16.destroy();
+gu._gfxSvgProxy.document.body.removeChild(_14);
+_d.callback(svg);
+}
+catch(e){
+_d.errback(e);
+}
};
-
-dojox.gfx.utils.deserialize = function(
- /* dojox.gfx.Surface || dojox.gfx.Shape */ parent,
- /* dojox.gfx.Shape || Array */ object
-){
- if(object instanceof Array){
- var t = [];
- for(var i = 0; i < object.length; ++i){
- t.push(dojox.gfx.utils.deserialize(parent, object[i]));
- }
- return t; // Array
- }
- var shape = ("shape" in object) ? parent.createShape(object.shape) : parent.createGroup();
- if("transform" in object){
- shape.setTransform(object.transform);
- }
- if("stroke" in object){
- shape.setStroke(object.stroke);
- }
- if("fill" in object){
- shape.setFill(object.fill);
- }
- if("font" in object){
- shape.setFont(object.font);
- }
- if("children" in object){
- for(var i = 0; i < object.children.length; ++i){
- dojox.gfx.utils.deserialize(shape, object.children[i]);
- }
- }
- return shape; // dojox.gfx.Shape
+ts.whenLoaded(null,_15);
+}
+catch(ex){
+_d.errback(ex);
+}
+};
+if(gu._initSvgSerializerDeferred.fired>0){
+_10();
+}else{
+gu._initSvgSerializerDeferred.addCallback(_10);
+}
+}
+return _d;
+},_gfxSvgProxy:null,_initSvgSerializerDeferred:null,_svgSerializerInitialized:function(){
+gu._initSvgSerializerDeferred.callback(true);
+},_initSvgSerializer:function(){
+if(!gu._initSvgSerializerDeferred){
+gu._initSvgSerializerDeferred=new dojo.Deferred();
+var f=dojo.doc.createElement("iframe");
+dojo.style(f,{display:"none",position:"absolute",width:"1em",height:"1em",top:"-10000px"});
+var _17;
+if(dojo.isIE){
+f.onreadystatechange=function(){
+if(f.contentWindow.document.readyState=="complete"){
+f.onreadystatechange=function(){
+};
+_17=setInterval(function(){
+if(f.contentWindow[dojo._scopeName]&&f.contentWindow[dojox._scopeName].gfx&&f.contentWindow[dojox._scopeName].gfx.utils){
+clearInterval(_17);
+f.contentWindow.parent[dojox._scopeName].gfx.utils._gfxSvgProxy=f.contentWindow;
+f.contentWindow.parent[dojox._scopeName].gfx.utils._svgSerializerInitialized();
+}
+},50);
+}
+};
+}else{
+f.onload=function(){
+f.onload=function(){
};
-
-dojox.gfx.utils.fromJson = function(
- /* dojox.gfx.Surface || dojox.gfx.Shape */ parent,
- /* String */ json
-){
- return dojox.gfx.utils.deserialize(parent, dojo.fromJson(json)); // Array || dojox.gfx.Shape
+_17=setInterval(function(){
+if(f.contentWindow[dojo._scopeName]&&f.contentWindow[dojox._scopeName].gfx&&f.contentWindow[dojox._scopeName].gfx.utils){
+clearInterval(_17);
+f.contentWindow.parent[dojox._scopeName].gfx.utils._gfxSvgProxy=f.contentWindow;
+f.contentWindow.parent[dojox._scopeName].gfx.utils._svgSerializerInitialized();
+}
+},50);
};
-
+}
+var uri=(dojo.config["dojoxGfxSvgProxyFrameUrl"]||dojo.moduleUrl("dojox","gfx/resources/gfxSvgProxyFrame.html"));
+f.setAttribute("src",uri);
+dojo.body().appendChild(f);
+}
+},_innerXML:function(_18){
+if(_18.innerXML){
+return _18.innerXML;
+}else{
+if(_18.xml){
+return _18.xml;
+}else{
+if(typeof XMLSerializer!="undefined"){
+return (new XMLSerializer()).serializeToString(_18);
}
+}
+}
+return null;
+},_cleanSvg:function(svg){
+if(svg){
+if(svg.indexOf("xmlns=\"http://www.w3.org/2000/svg\"")==-1){
+svg=svg.substring(4,svg.length);
+svg="<svg xmlns=\"http://www.w3.org/2000/svg\""+svg;
+}
+svg=svg.replace(/\bdojoGfx\w*\s*=\s*(['"])\w*\1/g,"");
+}
+return svg;
+}});
+})();
+}
diff --git a/js/dojo/dojox/gfx/vml.js b/js/dojo/dojox/gfx/vml.js
--- a/js/dojo/dojox/gfx/vml.js
+++ b/js/dojo/dojox/gfx/vml.js
@@ -1,1128 +1,893 @@
-if(!dojo._hasResource["dojox.gfx.vml"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.gfx.vml"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.gfx.vml"]){
+dojo._hasResource["dojox.gfx.vml"]=true;
dojo.provide("dojox.gfx.vml");
-
dojo.require("dojox.gfx._base");
dojo.require("dojox.gfx.shape");
dojo.require("dojox.gfx.path");
dojo.require("dojox.gfx.arc");
-
-// dojox.gfx.vml.xmlns: String: a VML's namespace
-dojox.gfx.vml.xmlns = "urn:schemas-microsoft-com:vml";
-
-// dojox.gfx.vml.text_alignment: Object: mapping from SVG alignment to VML alignment
-dojox.gfx.vml.text_alignment = {start: "left", middle: "center", end: "right"};
-
-dojox.gfx.vml._parseFloat = function(str) {
- // summary: a helper function to parse VML-specific floating-point values
- // str: String: a representation of a floating-point number
- return str.match(/^\d+f$/i) ? parseInt(str) / 65536 : parseFloat(str); // Number
-};
-
-dojox.gfx.vml._bool = {"t": 1, "true": 1};
-
-dojo.extend(dojox.gfx.Shape, {
- // summary: VML-specific implementation of dojox.gfx.Shape methods
-
- setFill: function(fill){
- // summary: sets a fill object (VML)
- // fill: Object: a fill object
- // (see dojox.gfx.defaultLinearGradient,
- // dojox.gfx.defaultRadialGradient,
- // dojox.gfx.defaultPattern,
- // or dojo.Color)
-
- if(!fill){
- // don't fill
- this.fillStyle = null;
- this.rawNode.filled = "f";
- return this;
- }
- if(typeof fill == "object" && "type" in fill){
- // gradient
- switch(fill.type){
- case "linear":
- var f = dojox.gfx.makeParameters(dojox.gfx.defaultLinearGradient, fill),
- s = [], a = f.colors, matrix = this._getRealMatrix(), m = dojox.gfx.matrix;
- this.fillStyle = f;
- dojo.forEach(a, function(v, i, a){
- a[i].color = dojox.gfx.normalizeColor(v.color);
- });
- if(a[0].offset > 0){
- s.push("0 " + a[0].color.toHex());
- }
- for(var i = 0; i < a.length; ++i){
- s.push(a[i].offset.toFixed(8) + " " + a[i].color.toHex());
- }
- var i = a.length - 1;
- if(a[i].offset < 1){
- s.push("1 " + a[i].color.toHex());
- }
- var fo = this.rawNode.fill;
- fo.colors.value = s.join(";");
- fo.method = "sigma";
- fo.type = "gradient";
- var fc1 = matrix ? m.multiplyPoint(matrix, f.x1, f.y1) : {x: f.x1, y: f.y1},
- fc2 = matrix ? m.multiplyPoint(matrix, f.x2, f.y2) : {x: f.x2, y: f.y2};
- fo.angle = (m._radToDeg(Math.atan2(fc2.x - fc1.x, fc2.y - fc1.y)) + 180) % 360;
- fo.on = true;
- break;
- case "radial":
- var f = dojox.gfx.makeParameters(dojox.gfx.defaultRadialGradient, fill);
- this.fillStyle = f;
- var l = parseFloat(this.rawNode.style.left),
- t = parseFloat(this.rawNode.style.top),
- w = parseFloat(this.rawNode.style.width),
- h = parseFloat(this.rawNode.style.height),
- c = isNaN(w) ? 1 : 2 * f.r / w,
- a = new Array(f.colors.length);
- // massage colors
- dojo.forEach(f.colors, function(v, i){
- a[i] = {offset: 1 - v.offset * c, color: dojox.gfx.normalizeColor(v.color)};
- });
- var i = a.length - 1;
- while(i >= 0 && a[i].offset < 0){ --i; }
- if(i < a.length - 1){
- // correct excessive colors
- var q = a[i], p = a[i + 1];
- p.color = dojo.blendColors(q.color, p.color, q.offset / (q.offset - p.offset));
- p.offset = 0;
- while(a.length - i > 2) a.pop();
- }
- // set colors
- var i = a.length - 1, s = [];
- if(a[i].offset > 0){
- s.push("0 " + a[i].color.toHex());
- }
- for(; i >= 0; --i){
- s.push(a[i].offset.toFixed(8) + " " + a[i].color.toHex());
- }
- if(a[0].offset < 1){
- s.push("1 " + a[0].color.toHex());
- }
- var fo = this.rawNode.fill;
- fo.colors.value = s.join(";");
- fo.method = "sigma";
- fo.type = "gradientradial";
- if(isNaN(w) || isNaN(h) || isNaN(l) || isNaN(t)){
- fo.focusposition = "0.5 0.5";
- }else{
- fo.focusposition = ((f.cx - l) / w).toFixed(8) + " " + ((f.cy - t) / h).toFixed(8);
- }
- fo.focussize = "0 0";
- fo.on = true;
- break;
- case "pattern":
- var f = dojox.gfx.makeParameters(dojox.gfx.defaultPattern, fill);
- this.fillStyle = f;
- var fo = this.rawNode.fill;
- fo.type = "tile";
- fo.src = f.src;
- if(f.width && f.height){
- // in points
- fo.size.x = dojox.gfx.px2pt(f.width);
- fo.size.y = dojox.gfx.px2pt(f.height);
- }
- fo.alignShape = "f";
- fo.position.x = 0;
- fo.position.y = 0;
- fo.origin.x = f.width ? f.x / f.width : 0;
- fo.origin.y = f.height ? f.y / f.height : 0;
- fo.on = true;
- break;
- }
- this.rawNode.fill.opacity = 1;
- return this;
- }
- // color object
- this.fillStyle = dojox.gfx.normalizeColor(fill);
- this.rawNode.fillcolor = this.fillStyle.toHex();
- this.rawNode.fill.opacity = this.fillStyle.a;
- this.rawNode.filled = true;
- return this; // self
- },
-
- setStroke: function(stroke){
- // summary: sets a stroke object (VML)
- // stroke: Object: a stroke object
- // (see dojox.gfx.defaultStroke)
-
- if(!stroke){
- // don't stroke
- this.strokeStyle = null;
- this.rawNode.stroked = "f";
- return this;
- }
- // normalize the stroke
- if(typeof stroke == "string"){
- stroke = {color: stroke};
- }
- var s = this.strokeStyle = dojox.gfx.makeParameters(dojox.gfx.defaultStroke, stroke);
- s.color = dojox.gfx.normalizeColor(s.color);
- // generate attributes
- var rn = this.rawNode;
- rn.stroked = true;
- rn.strokecolor = s.color.toCss();
- rn.strokeweight = s.width + "px"; // TODO: should we assume that the width is always in pixels?
- if(rn.stroke) {
- rn.stroke.opacity = s.color.a;
- rn.stroke.endcap = this._translate(this._capMap, s.cap);
- if(typeof s.join == "number") {
- rn.stroke.joinstyle = "miter";
- rn.stroke.miterlimit = s.join;
- }else{
- rn.stroke.joinstyle = s.join;
- // rn.stroke.miterlimit = s.width;
- }
- rn.stroke.dashstyle = s.style == "none" ? "Solid" : s.style;
- }
- return this; // self
- },
-
- _capMap: { butt: 'flat' },
- _capMapReversed: { flat: 'butt' },
-
- _translate: function(dict, value) {
- return (value in dict) ? dict[value] : value;
- },
-
- _applyTransform: function() {
- if(this.fillStyle && this.fillStyle.type == "linear"){
- this.setFill(this.fillStyle);
- }
- var matrix = this._getRealMatrix();
- if(!matrix) return this;
- var skew = this.rawNode.skew;
- if(typeof skew == "undefined"){
- for(var i = 0; i < this.rawNode.childNodes.length; ++i){
- if(this.rawNode.childNodes[i].tagName == "skew"){
- skew = this.rawNode.childNodes[i];
- break;
- }
- }
- }
- if(skew){
- skew.on = "f";
- var mt = matrix.xx.toFixed(8) + " " + matrix.xy.toFixed(8) + " " +
- matrix.yx.toFixed(8) + " " + matrix.yy.toFixed(8) + " 0 0",
- offset = Math.floor(matrix.dx).toFixed() + "px " + Math.floor(matrix.dy).toFixed() + "px",
- s = this.rawNode.style,
- l = parseFloat(s.left),
- t = parseFloat(s.top),
- w = parseFloat(s.width),
- h = parseFloat(s.height);
- if(isNaN(l)) l = 0;
- if(isNaN(t)) t = 0;
- if(isNaN(w)) w = 1;
- if(isNaN(h)) h = 1;
- var origin = (-l / w - 0.5).toFixed(8) + " " + (-t / h - 0.5).toFixed(8);
- skew.matrix = mt;
- skew.origin = origin;
- skew.offset = offset;
- skew.on = true;
- }
- return this;
- },
-
- setRawNode: function(rawNode){
- // summary:
- // assigns and clears the underlying node that will represent this
- // shape. Once set, transforms, gradients, etc, can be applied.
- // (no fill & stroke by default)
- rawNode.stroked = "f";
- rawNode.filled = "f";
- this.rawNode = rawNode;
- },
-
- // move family
-
- _moveToFront: function(){
- // summary: moves a shape to front of its parent's list of shapes (VML)
- this.rawNode.parentNode.appendChild(this.rawNode);
- return this;
- },
- _moveToBack: function(){
- // summary: moves a shape to back of its parent's list of shapes (VML)
- var r = this.rawNode, p = r.parentNode, n = p.firstChild;
- p.insertBefore(r, n);
- if(n.tagName == "rect"){
- // surface has a background rectangle, which position should be preserved
- n.swapNode(r);
- }
- return this;
- },
-
- _getRealMatrix: function(){
- // summary: returns the cumulative ("real") transformation matrix
- // by combining the shape's matrix with its parent's matrix
- return this.parentMatrix ? new dojox.gfx.Matrix2D([this.parentMatrix, this.matrix]) : this.matrix; // dojox.gfx.Matrix2D
- }
-});
-
-dojo.declare("dojox.gfx.Group", dojox.gfx.Shape, {
- // summary: a group shape (VML), which can be used
- // to logically group shapes (e.g, to propagate matricies)
- constructor: function(){
- dojox.gfx.vml.Container._init.call(this);
- },
- // apply transformation
- _applyTransform: function(){
- // summary: applies a transformation matrix to a group
- var matrix = this._getRealMatrix();
- for(var i = 0; i < this.children.length; ++i){
- this.children[i]._updateParentMatrix(matrix);
- }
- return this; // self
- }
-});
-dojox.gfx.Group.nodeType = "group";
-
-dojo.declare("dojox.gfx.Rect", dojox.gfx.shape.Rect, {
- // summary: a rectangle shape (VML)
- setShape: function(newShape){
- // summary: sets a rectangle shape object (VML)
- // newShape: Object: a rectangle shape object
- var shape = this.shape = dojox.gfx.makeParameters(this.shape, newShape);
- this.bbox = null;
- var style = this.rawNode.style;
- style.left = shape.x.toFixed();
- style.top = shape.y.toFixed();
- style.width = (typeof shape.width == "string" && shape.width.indexOf("%") >= 0) ? shape.width : shape.width.toFixed();
- style.height = (typeof shape.width == "string" && shape.height.indexOf("%") >= 0) ? shape.height : shape.height.toFixed();
- var r = Math.min(1, (shape.r / Math.min(parseFloat(shape.width), parseFloat(shape.height)))).toFixed(8);
- // a workaround for the VML's arcsize bug: cannot read arcsize of an instantiated node
- var parent = this.rawNode.parentNode, before = null;
- if(parent){
- if(parent.lastChild != this.rawNode){
- for(var i = 0; i < parent.childNodes.length; ++i){
- if(parent.childNodes[i] == this.rawNode){
- before = parent.childNodes[i+1];
- break;
- }
- }
- }
- parent.removeChild(this.rawNode);
- }
- this.rawNode.arcsize = r;
- if(parent){
- if(before){
- parent.insertBefore(this.rawNode, before);
- }else{
- parent.appendChild(this.rawNode);
- }
- }
- // set all necessary styles, which are lost by VML (yes, it's a VML's bug)
- return this.setTransform(this.matrix).setFill(this.fillStyle).setStroke(this.strokeStyle); // self
- }
-});
-dojox.gfx.Rect.nodeType = "roundrect"; // use a roundrect so the stroke join type is respected
-
-dojo.declare("dojox.gfx.Ellipse", dojox.gfx.shape.Ellipse, {
- // summary: an ellipse shape (VML)
- setShape: function(newShape){
- // summary: sets an ellipse shape object (VML)
- // newShape: Object: an ellipse shape object
- var shape = this.shape = dojox.gfx.makeParameters(this.shape, newShape);
- this.bbox = null;
- var style = this.rawNode.style;
- style.left = (shape.cx - shape.rx).toFixed();
- style.top = (shape.cy - shape.ry).toFixed();
- style.width = (shape.rx * 2).toFixed();
- style.height = (shape.ry * 2).toFixed();
- return this.setTransform(this.matrix); // self
- }
-});
-dojox.gfx.Ellipse.nodeType = "oval";
-
-dojo.declare("dojox.gfx.Circle", dojox.gfx.shape.Circle, {
- // summary: a circle shape (VML)
- setShape: function(newShape){
- // summary: sets a circle shape object (VML)
- // newShape: Object: a circle shape object
- var shape = this.shape = dojox.gfx.makeParameters(this.shape, newShape);
- this.bbox = null;
- var style = this.rawNode.style;
- style.left = (shape.cx - shape.r).toFixed();
- style.top = (shape.cy - shape.r).toFixed();
- style.width = (shape.r * 2).toFixed();
- style.height = (shape.r * 2).toFixed();
- return this; // self
- }
-});
-dojox.gfx.Circle.nodeType = "oval";
-
-dojo.declare("dojox.gfx.Line", dojox.gfx.shape.Line, {
- // summary: a line shape (VML)
- constructor: function(rawNode){
- if(rawNode) rawNode.setAttribute("dojoGfxType", "line");
- },
- setShape: function(newShape){
- // summary: sets a line shape object (VML)
- // newShape: Object: a line shape object
- var shape = this.shape = dojox.gfx.makeParameters(this.shape, newShape);
- this.bbox = null;
- this.rawNode.path.v = "m" + shape.x1.toFixed() + " " + shape.y1.toFixed() +
- "l" + shape.x2.toFixed() + " " + shape.y2.toFixed() + "e";
- return this.setTransform(this.matrix); // self
- }
-});
-dojox.gfx.Line.nodeType = "shape";
-
-dojo.declare("dojox.gfx.Polyline", dojox.gfx.shape.Polyline, {
- // summary: a polyline/polygon shape (VML)
- constructor: function(rawNode){
- if(rawNode) rawNode.setAttribute("dojoGfxType", "polyline");
- },
- setShape: function(points, closed){
- // summary: sets a polyline/polygon shape object (VML)
- // points: Object: a polyline/polygon shape object
- // closed: Boolean?: if true, close the polyline explicitely
- if(points && points instanceof Array){
- // branch
- // points: Array: an array of points
- this.shape = dojox.gfx.makeParameters(this.shape, { points: points });
- if(closed && this.shape.points.length) this.shape.points.push(this.shape.points[0]);
- }else{
- this.shape = dojox.gfx.makeParameters(this.shape, points);
- }
- this.bbox = null;
- var attr = [], p = this.shape.points;
- if(p.length > 0){
- attr.push("m");
- var k = 1;
- if(typeof p[0] == "number"){
- attr.push(p[0].toFixed());
- attr.push(p[1].toFixed());
- k = 2;
- }else{
- attr.push(p[0].x.toFixed());
- attr.push(p[0].y.toFixed());
- }
- if(p.length > k){
- attr.push("l");
- for(var i = k; i < p.length; ++i){
- if(typeof p[i] == "number"){
- attr.push(p[i].toFixed());
- }else{
- attr.push(p[i].x.toFixed());
- attr.push(p[i].y.toFixed());
- }
- }
- }
- }
- attr.push("e");
- this.rawNode.path.v = attr.join(" ");
- return this.setTransform(this.matrix); // self
- }
-});
-dojox.gfx.Polyline.nodeType = "shape";
-
-dojo.declare("dojox.gfx.Image", dojox.gfx.shape.Image, {
- // summary: an image (VML)
- constructor: function(rawNode){
- if(rawNode) rawNode.setAttribute("dojoGfxType", "image");
- },
- getEventSource: function() {
- // summary: returns a Node, which is used as
- // a source of events for this shape
- return this.rawNode ? this.rawNode.firstChild : null; // Node
- },
- setShape: function(newShape){
- // summary: sets an image shape object (VML)
- // newShape: Object: an image shape object
- var shape = this.shape = dojox.gfx.makeParameters(this.shape, newShape);
- this.bbox = null;
- var firstChild = this.rawNode.firstChild;
- firstChild.src = shape.src;
- if(shape.width || shape.height){
- firstChild.style.width = shape.width;
- firstChild.style.height = shape.height;
- }
- return this.setTransform(this.matrix); // self
- },
- _applyTransform: function() {
- var matrix = this._getRealMatrix();
- if(!matrix) return this;
- matrix = dojox.gfx.matrix.multiply(matrix, {dx: this.shape.x, dy: this.shape.y});
- var f = this.rawNode.filters["DXImageTransform.Microsoft.Matrix"];
- f.M11 = matrix.xx;
- f.M12 = matrix.xy;
- f.M21 = matrix.yx;
- f.M22 = matrix.yy;
- f.Dx = matrix.dx;
- f.Dy = matrix.dy;
- return this;
- }
-});
-dojox.gfx.Image.nodeType = "div";
-
-dojo.declare("dojox.gfx.Text", dojox.gfx.shape.Text, {
- // summary: an anchored text (VML)
- constructor: function(rawNode){
- if(rawNode){rawNode.setAttribute("dojoGfxType", "text");}
- this.fontStyle = null;
- },
- _alignment: {start: "left", middle: "center", end: "right"},
- setShape: function(newShape){
- // summary: sets a text shape object (VML)
- // newShape: Object: a text shape object
- this.shape = dojox.gfx.makeParameters(this.shape, newShape);
- this.bbox = null;
- var r = this.rawNode, s = this.shape, x = s.x, y = s.y.toFixed();
- switch(s.align){
- case "middle":
- x -= 5;
- break;
- case "end":
- x -= 10;
- break;
- }
- this.rawNode.path.v = "m" + x.toFixed() + "," + y +
- "l" + (x + 10).toFixed() + "," + y + "e";
- // find path and text path
- var p = null, t = null, c = r.childNodes;
- for(var i = 0; i < c.length; ++i){
- var tag = c[i].tagName;
- if(tag == "path"){
- p = c[i];
- if(t) break;
- }else if(tag == "textpath"){
- t = c[i];
- if(p) break;
- }
- }
- if(!p){
- p = this.rawNode.ownerDocument.createElement("v:path");
- r.appendChild(p);
- }
- if(!t){
- t = this.rawNode.ownerDocument.createElement("v:textpath");
- r.appendChild(t);
- }
- p.textPathOk = true;
- t.on = true;
- var a = dojox.gfx.vml.text_alignment[s.align];
- t.style["v-text-align"] = a ? a : "left";
- t.style["text-decoration"] = s.decoration;
- t.style["v-rotate-letters"] = s.rotated;
- t.style["v-text-kern"] = s.kerning;
- t.string = s.text;
- return this.setTransform(this.matrix); // self
- },
- _setFont: function(){
- // summary: sets a font object (VML)
- var f = this.fontStyle, c = this.rawNode.childNodes;
- for(var i = 0; i < c.length; ++i){
- if(c[i].tagName == "textpath"){
- c[i].style.font = dojox.gfx.makeFontString(f);
- break;
- }
- }
- this.setTransform(this.matrix);
- },
- _getRealMatrix: function(){
- // summary: returns the cumulative ("real") transformation matrix
- // by combining the shape's matrix with its parent's matrix;
- // it makes a correction for a font size
- var matrix = dojox.gfx.Shape.prototype._getRealMatrix.call(this);
- // It appears that text is always aligned vertically at a middle of x-height (???).
- // It is impossible to obtain these metrics from VML => I try to approximate it with
- // more-or-less util value of 0.7 * FontSize, which is typical for European fonts.
- if(matrix){
- matrix = dojox.gfx.matrix.multiply(matrix,
- {dy: -dojox.gfx.normalizedLength(this.fontStyle ? this.fontStyle.size : "10pt") * 0.35});
- }
- return matrix; // dojox.gfx.Matrix2D
- },
- getTextWidth: function(){
- // summary: get the text width, in px
- var rawNode = this.rawNode, _display = rawNode.style.display;
- rawNode.style.display = "inline";
- var _width = dojox.gfx.pt2px(parseFloat(rawNode.currentStyle.width));
- rawNode.style.display = _display;
- return _width;
- }
-});
-dojox.gfx.Text.nodeType = "shape";
-
-dojox.gfx.path._calcArc = function(alpha){
- // return a start point, 1st and 2nd control points, and an end point
- var cosa = Math.cos(alpha), sina = Math.sin(alpha),
- p2 = {x: cosa + (4 / 3) * (1 - cosa), y: sina - (4 / 3) * cosa * (1 - cosa) / sina};
- return {
- s: {x: cosa, y: -sina},
- c1: {x: p2.x, y: -p2.y},
- c2: p2,
- e: {x: cosa, y: sina}
- };
+(function(){
+var d=dojo,g=dojox.gfx,m=g.matrix,gs=g.shape,_1=g.vml;
+_1.xmlns="urn:schemas-microsoft-com:vml";
+_1.text_alignment={start:"left",middle:"center",end:"right"};
+_1._parseFloat=function(_2){
+return _2.match(/^\d+f$/i)?parseInt(_2)/65536:parseFloat(_2);
};
-
-dojo.declare("dojox.gfx.Path", dojox.gfx.path.Path, {
- // summary: a path shape (VML)
- constructor: function(rawNode){
- if(rawNode && !rawNode.getAttribute("dojoGfxType")){
- rawNode.setAttribute("dojoGfxType", "path");
- }
- this.vmlPath = "";
- this.lastControl = {};
- },
- _updateWithSegment: function(segment){
- // summary: updates the bounding box of path with new segment
- // segment: Object: a segment
- var last = dojo.clone(this.last);
- dojox.gfx.Path.superclass._updateWithSegment.apply(this, arguments);
- // add a VML path segment
- var path = this[this.renderers[segment.action]](segment, last);
- if(typeof this.vmlPath == "string"){
- this.vmlPath += path.join("");
- this.rawNode.path.v = this.vmlPath + " r0,0 e";
- }else{
- this.vmlPath = this.vmlPath.concat(path);
- }
- },
- setShape: function(newShape){
- // summary: forms a path using a shape (VML)
- // newShape: Object: an VML path string or a path object (see dojox.gfx.defaultPath)
- this.vmlPath = [];
- this.lastControl = {};
- dojox.gfx.Path.superclass.setShape.apply(this, arguments);
- this.vmlPath = this.vmlPath.join("");
- this.rawNode.path.v = this.vmlPath + " r0,0 e";
- return this;
- },
- _pathVmlToSvgMap: {m: "M", l: "L", t: "m", r: "l", c: "C", v: "c", qb: "Q", x: "z", e: ""},
- // VML-specific segment renderers
- renderers: {
- M: "_moveToA", m: "_moveToR",
- L: "_lineToA", l: "_lineToR",
- H: "_hLineToA", h: "_hLineToR",
- V: "_vLineToA", v: "_vLineToR",
- C: "_curveToA", c: "_curveToR",
- S: "_smoothCurveToA", s: "_smoothCurveToR",
- Q: "_qCurveToA", q: "_qCurveToR",
- T: "_qSmoothCurveToA", t: "_qSmoothCurveToR",
- A: "_arcTo", a: "_arcTo",
- Z: "_closePath", z: "_closePath"
- },
- _addArgs: function(path, args, from, upto){
- if(typeof upto == "undefined"){
- upto = args.length;
- }
- if(typeof from == "undefined"){
- from = 0;
- }
- for(var i = from; i < upto; ++i){
- path.push(" ");
- path.push(args[i].toFixed());
- }
- },
- _addArgsAdjusted: function(path, last, args, from, upto){
- if(typeof upto == "undefined"){
- upto = args.length;
- }
- if(typeof from == "undefined"){
- from = 0;
- }
- for(var i = from; i < upto; i += 2){
- path.push(" ");
- path.push((last.x + args[i]).toFixed());
- path.push(" ");
- path.push((last.y + args[i + 1]).toFixed());
- }
- },
- _moveToA: function(segment){
- var p = [" m"], n = segment.args, l = n.length;
- if(l == 2){
- this._addArgs(p, n);
- }else{
- this._addArgs(p, n, 0, 2);
- p.push(" l");
- this._addArgs(p, n, 2);
- }
- this.lastControl = {};
- return p;
- },
- _moveToR: function(segment, last){
- var p = ["x" in last ? " t" : " m"], n = segment.args, l = n.length;
- if(l == 2){
- this._addArgs(p, n);
- }else{
- this._addArgs(p, n, 0, 2);
- p.push(" r");
- this._addArgs(p, n, 2);
- }
- this.lastControl = {};
- return p;
- },
- _lineToA: function(segment){
- var p = [" l"];
- this._addArgs(p, segment.args);
- this.lastControl = {};
- return p;
- },
- _lineToR: function(segment){
- var p = [" r"];
- this._addArgs(p, segment.args);
- this.lastControl = {};
- return p;
- },
- _hLineToA: function(segment, last){
- var p = [" l"], n = segment.args, l = n.length, y = " " + last.y.toFixed();
- for(var i = 0; i < l; ++i){
- p.push(" ");
- p.push(n[i].toFixed());
- p.push(y);
- }
- this.lastControl = {};
- return p;
- },
- _hLineToR: function(segment){
- var p = [" r"], n = segment.args, l = n.length;
- for(var i = 0; i < l; ++i){
- p.push(" ");
- p.push(n[i].toFixed());
- p.push(" 0");
- }
- this.lastControl = {};
- return p;
- },
- _vLineToA: function(segment, last){
- var p = [" l"], n = segment.args, l = n.length, x = " " + last.x.toFixed();
- for(var i = 0; i < l; ++i){
- p.push(x);
- p.push(" ");
- p.push(n[i].toFixed());
- }
- this.lastControl = {};
- return p;
- },
- _vLineToR: function(segment){
- var p = [" r"], n = segment.args, l = n.length;
- for(var i = 0; i < l; ++i){
- p.push(" 0 ");
- p.push(n[i].toFixed());
- }
- this.lastControl = {};
- return p;
- },
- _curveToA: function(segment){
- var p = [], n = segment.args, l = n.length;
- for(var i = 0; i < l; i += 6){
- p.push(" c");
- this._addArgs(p, n, i, i + 6);
- }
- this.lastControl = {x: n[l - 4], y: n[l - 3], type: "C"};
- return p;
- },
- _curveToR: function(segment, last){
- var p = [], n = segment.args, l = n.length;
- for(var i = 0; i < l; i += 6){
- p.push(" v");
- this._addArgs(p, n, i, i + 6);
- this.lastControl = {x: last.x + n[i + 2], y: last.y + n[i + 3]};
- last.x += n[i + 4];
- last.y += n[i + 5];
- }
- this.lastControl.type = "C";
- return p;
- },
- _smoothCurveToA: function(segment, last){
- var p = [], n = segment.args, l = n.length;
- for(var i = 0; i < l; i += 4){
- p.push(" c");
- if(this.lastControl.type == "C"){
- this._addArgs(p, [
- 2 * last.x - this.lastControl.x,
- 2 * last.y - this.lastControl.y
- ]);
- }else{
- this._addArgs(p, [last.x, last.y]);
- }
- this._addArgs(p, n, i, i + 4);
- }
- this.lastControl = {x: n[l - 4], y: n[l - 3], type: "C"};
- return p;
- },
- _smoothCurveToR: function(segment, last){
- var p = [], n = segment.args, l = n.length;
- for(var i = 0; i < l; i += 4){
- p.push(" v");
- if(this.lastControl.type == "C"){
- this._addArgs(p, [
- last.x - this.lastControl.x,
- last.y - this.lastControl.y
- ]);
- }else{
- this._addArgs(p, [0, 0]);
- }
- this._addArgs(p, n, i, i + 4);
- this.lastControl = {x: last.x + n[i], y: last.y + n[i + 1]};
- last.x += n[i + 2];
- last.y += n[i + 3];
- }
- this.lastControl.type = "C";
- return p;
- },
- _qCurveToA: function(segment){
- var p = [], n = segment.args, l = n.length;
- for(var i = 0; i < l; i += 4){
- p.push(" qb");
- this._addArgs(p, n, i, i + 4);
- }
- this.lastControl = {x: n[l - 4], y: n[l - 3], type: "Q"};
- return p;
- },
- _qCurveToR: function(segment, last){
- var p = [], n = segment.args, l = n.length;
- for(var i = 0; i < l; i += 4){
- p.push(" qb");
- this._addArgsAdjusted(p, last, n, i, i + 4);
- this.lastControl = {x: last.x + n[i], y: last.y + n[i + 1]};
- last.x += n[i + 2];
- last.y += n[i + 3];
- }
- this.lastControl.type = "Q";
- return p;
- },
- _qSmoothCurveToA: function(segment, last){
- var p = [], n = segment.args, l = n.length;
- for(var i = 0; i < l; i += 2){
- p.push(" qb");
- if(this.lastControl.type == "Q"){
- this._addArgs(p, [
- this.lastControl.x = 2 * last.x - this.lastControl.x,
- this.lastControl.y = 2 * last.y - this.lastControl.y
- ]);
- }else{
- this._addArgs(p, [
- this.lastControl.x = last.x,
- this.lastControl.y = last.y
- ]);
- }
- this._addArgs(p, n, i, i + 2);
- }
- this.lastControl.type = "Q";
- return p;
- },
- _qSmoothCurveToR: function(segment, last){
- var p = [], n = segment.args, l = n.length;
- for(var i = 0; i < l; i += 2){
- p.push(" qb");
- if(this.lastControl.type == "Q"){
- this._addArgs(p, [
- this.lastControl.x = 2 * last.x - this.lastControl.x,
- this.lastControl.y = 2 * last.y - this.lastControl.y
- ]);
- }else{
- this._addArgs(p, [
- this.lastControl.x = last.x,
- this.lastControl.y = last.y
- ]);
- }
- this._addArgsAdjusted(p, last, n, i, i + 2);
- }
- this.lastControl.type = "Q";
- return p;
- },
- _arcTo: function(segment, last){
- var p = [], n = segment.args, l = n.length, relative = segment.action == "a";
- for(var i = 0; i < l; i += 7){
- var x1 = n[i + 5], y1 = n[i + 6];
- if(relative){
- x1 += last.x;
- y1 += last.y;
- }
- var result = dojox.gfx.arc.arcAsBezier(
- last, n[i], n[i + 1], n[i + 2],
- n[i + 3] ? 1 : 0, n[i + 4] ? 1 : 0,
- x1, y1
- );
- for(var j = 0; j < result.length; ++j){
- p.push(" c");
- this._addArgs(p, result[j]);
- }
- last = {x: x1, y: y1};
- }
- this.lastControl = {};
- return p;
- },
- _closePath: function(){
- this.lastControl = {};
- return ["x"];
- }
+_1._bool={"t":1,"true":1};
+d.extend(g.Shape,{setFill:function(_3){
+if(!_3){
+this.fillStyle=null;
+this.rawNode.filled="f";
+return this;
+}
+var i,f,fo,a,s;
+if(typeof _3=="object"&&"type" in _3){
+switch(_3.type){
+case "linear":
+var _4=this._getRealMatrix();
+s=[];
+f=g.makeParameters(g.defaultLinearGradient,_3);
+a=f.colors;
+this.fillStyle=f;
+d.forEach(a,function(v,i,a){
+a[i].color=g.normalizeColor(v.color);
+});
+if(a[0].offset>0){
+s.push("0 "+a[0].color.toHex());
+}
+for(i=0;i<a.length;++i){
+s.push(a[i].offset.toFixed(8)+" "+a[i].color.toHex());
+}
+i=a.length-1;
+if(a[i].offset<1){
+s.push("1 "+a[i].color.toHex());
+}
+fo=this.rawNode.fill;
+fo.colors.value=s.join(";");
+fo.method="sigma";
+fo.type="gradient";
+var _5=_4?m.multiplyPoint(_4,f.x1,f.y1):{x:f.x1,y:f.y1},_6=_4?m.multiplyPoint(_4,f.x2,f.y2):{x:f.x2,y:f.y2};
+fo.angle=(m._radToDeg(Math.atan2(_6.x-_5.x,_6.y-_5.y))+180)%360;
+fo.on=true;
+break;
+case "radial":
+f=g.makeParameters(g.defaultRadialGradient,_3);
+this.fillStyle=f;
+var l=parseFloat(this.rawNode.style.left),t=parseFloat(this.rawNode.style.top),w=parseFloat(this.rawNode.style.width),h=parseFloat(this.rawNode.style.height),c=isNaN(w)?1:2*f.r/w;
+a=[];
+if(f.colors[0].offset>0){
+a.push({offset:1,color:g.normalizeColor(f.colors[0].color)});
+}
+d.forEach(f.colors,function(v,i){
+a.push({offset:1-v.offset*c,color:g.normalizeColor(v.color)});
});
-dojox.gfx.Path.nodeType = "shape";
-
-dojo.declare("dojox.gfx.TextPath", dojox.gfx.Path, {
- // summary: a textpath shape (VML)
- constructor: function(rawNode){
- if(rawNode){rawNode.setAttribute("dojoGfxType", "textpath");}
- this.fontStyle = null;
- if(!("text" in this)){
- this.text = dojo.clone(dojox.gfx.defaultTextPath);
- }
- if(!("fontStyle" in this)){
- this.fontStyle = dojo.clone(dojox.gfx.defaultFont);
- }
- },
- setText: function(newText){
- // summary: sets a text to be drawn along the path
- this.text = dojox.gfx.makeParameters(this.text,
- typeof newText == "string" ? {text: newText} : newText);
- this._setText();
- return this; // self
- },
- setFont: function(newFont){
- // summary: sets a font for text
- this.fontStyle = typeof newFont == "string" ?
- dojox.gfx.splitFontString(newFont) :
- dojox.gfx.makeParameters(dojox.gfx.defaultFont, newFont);
- this._setFont();
- return this; // self
- },
-
- _setText: function(){
- // summary: sets a text shape object (VML)
- this.bbox = null;
- var r = this.rawNode, s = this.text,
- // find path and text path
- p = null, t = null, c = r.childNodes;
- for(var i = 0; i < c.length; ++i){
- var tag = c[i].tagName;
- if(tag == "path"){
- p = c[i];
- if(t) break;
- }else if(tag == "textpath"){
- t = c[i];
- if(p) break;
- }
- }
- if(!p){
- p = this.rawNode.ownerDocument.createElement("v:path");
- r.appendChild(p);
- }
- if(!t){
- t = this.rawNode.ownerDocument.createElement("v:textpath");
- r.appendChild(t);
- }
- p.textPathOk = true;
- t.on = true;
- var a = dojox.gfx.vml.text_alignment[s.align];
- t.style["v-text-align"] = a ? a : "left";
- t.style["text-decoration"] = s.decoration;
- t.style["v-rotate-letters"] = s.rotated;
- t.style["v-text-kern"] = s.kerning;
- t.string = s.text;
- },
- _setFont: function(){
- // summary: sets a font object (VML)
- var f = this.fontStyle, c = this.rawNode.childNodes;
- for(var i = 0; i < c.length; ++i){
- if(c[i].tagName == "textpath"){
- c[i].style.font = dojox.gfx.makeFontString(f);
- break;
- }
- }
- }
-});
-dojox.gfx.TextPath.nodeType = "shape";
-
-dojo.declare("dojox.gfx.Surface", dojox.gfx.shape.Surface, {
- // summary: a surface object to be used for drawings (VML)
- constructor: function(){
- dojox.gfx.vml.Container._init.call(this);
- },
- setDimensions: function(width, height){
- // summary: sets the width and height of the rawNode
- // width: String: width of surface, e.g., "100px"
- // height: String: height of surface, e.g., "100px"
- this.width = dojox.gfx.normalizedLength(width); // in pixels
- this.height = dojox.gfx.normalizedLength(height); // in pixels
- if(!this.rawNode) return this;
- var cs = this.clipNode.style,
- r = this.rawNode, rs = r.style,
- bs = this.bgNode.style;
- cs.width = width;
- cs.height = height;
- cs.clip = "rect(0 " + width + " " + height + " 0)";
- rs.width = width;
- rs.height = height;
- r.coordsize = width + " " + height;
- bs.width = width;
- bs.height = height;
- return this; // self
- },
- getDimensions: function(){
- // summary: returns an object with properties "width" and "height"
- var t = this.rawNode ? {
- width: dojox.gfx.normalizedLength(this.rawNode.style.width),
- height: dojox.gfx.normalizedLength(this.rawNode.style.height)} : null;
- if(t.width <= 0){ t.width = this.width; }
- if(t.height <= 0){ t.height = this.height; }
- return t; // Object
- }
-});
-
-dojox.gfx.createSurface = function(parentNode, width, height){
- // summary: creates a surface (VML)
- // parentNode: Node: a parent node
- // width: String: width of surface, e.g., "100px"
- // height: String: height of surface, e.g., "100px"
-
- if(!width){ width = "100%"; }
- if(!height){ height = "100%"; }
- var s = new dojox.gfx.Surface(), p = dojo.byId(parentNode),
- c = s.clipNode = p.ownerDocument.createElement("div"),
- r = s.rawNode = p.ownerDocument.createElement("v:group"),
- cs = c.style, rs = r.style;
-
- p.style.width = width;
- p.style.height = height;
-
- cs.width = width;
- cs.height = height;
- cs.clip = "rect(0 " + width + " " + height + " 0)";
- cs.position = "absolute";
- rs.width = width;
- rs.height = height;
- r.coordsize = (width == "100%" ? width : parseFloat(width)) + " " +
- (height == "100%" ? height : parseFloat(height));
- r.coordorigin = "0 0";
-
- // create a background rectangle, which is required to show all other shapes
- var b = s.bgNode = r.ownerDocument.createElement("v:rect"), bs = b.style;
- bs.left = bs.top = 0;
- bs.width = rs.width;
- bs.height = rs.height;
- b.filled = b.stroked = "f";
-
- r.appendChild(b);
- c.appendChild(r);
- p.appendChild(c);
-
- s.width = dojox.gfx.normalizedLength(width); // in pixels
- s.height = dojox.gfx.normalizedLength(height); // in pixels
-
- return s; // dojox.gfx.Surface
+i=a.length-1;
+while(i>=0&&a[i].offset<0){
+--i;
+}
+if(i<a.length-1){
+var q=a[i],p=a[i+1];
+p.color=d.blendColors(q.color,p.color,q.offset/(q.offset-p.offset));
+p.offset=0;
+while(a.length-i>2){
+a.pop();
+}
+}
+i=a.length-1,s=[];
+if(a[i].offset>0){
+s.push("0 "+a[i].color.toHex());
+}
+for(;i>=0;--i){
+s.push(a[i].offset.toFixed(8)+" "+a[i].color.toHex());
+}
+fo=this.rawNode.fill;
+fo.colors.value=s.join(";");
+fo.method="sigma";
+fo.type="gradientradial";
+if(isNaN(w)||isNaN(h)||isNaN(l)||isNaN(t)){
+fo.focusposition="0.5 0.5";
+}else{
+fo.focusposition=((f.cx-l)/w).toFixed(8)+" "+((f.cy-t)/h).toFixed(8);
+}
+fo.focussize="0 0";
+fo.on=true;
+break;
+case "pattern":
+f=g.makeParameters(g.defaultPattern,_3);
+this.fillStyle=f;
+fo=this.rawNode.fill;
+fo.type="tile";
+fo.src=f.src;
+if(f.width&&f.height){
+fo.size.x=g.px2pt(f.width);
+fo.size.y=g.px2pt(f.height);
+}
+fo.alignShape="f";
+fo.position.x=0;
+fo.position.y=0;
+fo.origin.x=f.width?f.x/f.width:0;
+fo.origin.y=f.height?f.y/f.height:0;
+fo.on=true;
+break;
+}
+this.rawNode.fill.opacity=1;
+return this;
+}
+this.fillStyle=g.normalizeColor(_3);
+fo=this.rawNode.fill;
+if(!fo){
+fo=this.rawNode.ownerDocument.createElement("v:fill");
+}
+fo.method="any";
+fo.type="solid";
+fo.opacity=this.fillStyle.a;
+this.rawNode.fillcolor=this.fillStyle.toHex();
+this.rawNode.filled=true;
+return this;
+},setStroke:function(_7){
+if(!_7){
+this.strokeStyle=null;
+this.rawNode.stroked="f";
+return this;
+}
+if(typeof _7=="string"||d.isArray(_7)||_7 instanceof d.Color){
+_7={color:_7};
+}
+var s=this.strokeStyle=g.makeParameters(g.defaultStroke,_7);
+s.color=g.normalizeColor(s.color);
+var rn=this.rawNode;
+rn.stroked=true;
+rn.strokecolor=s.color.toCss();
+rn.strokeweight=s.width+"px";
+if(rn.stroke){
+rn.stroke.opacity=s.color.a;
+rn.stroke.endcap=this._translate(this._capMap,s.cap);
+if(typeof s.join=="number"){
+rn.stroke.joinstyle="miter";
+rn.stroke.miterlimit=s.join;
+}else{
+rn.stroke.joinstyle=s.join;
+}
+rn.stroke.dashstyle=s.style=="none"?"Solid":s.style;
+}
+return this;
+},_capMap:{butt:"flat"},_capMapReversed:{flat:"butt"},_translate:function(_8,_9){
+return (_9 in _8)?_8[_9]:_9;
+},_applyTransform:function(){
+if(this.fillStyle&&this.fillStyle.type=="linear"){
+this.setFill(this.fillStyle);
+}
+var _a=this._getRealMatrix();
+if(!_a){
+return this;
+}
+var _b=this.rawNode.skew;
+if(typeof _b=="undefined"){
+for(var i=0;i<this.rawNode.childNodes.length;++i){
+if(this.rawNode.childNodes[i].tagName=="skew"){
+_b=this.rawNode.childNodes[i];
+break;
+}
+}
+}
+if(_b){
+_b.on="f";
+var mt=_a.xx.toFixed(8)+" "+_a.xy.toFixed(8)+" "+_a.yx.toFixed(8)+" "+_a.yy.toFixed(8)+" 0 0",_c=Math.floor(_a.dx).toFixed()+"px "+Math.floor(_a.dy).toFixed()+"px",s=this.rawNode.style,l=parseFloat(s.left),t=parseFloat(s.top),w=parseFloat(s.width),h=parseFloat(s.height);
+if(isNaN(l)){
+l=0;
+}
+if(isNaN(t)){
+t=0;
+}
+if(isNaN(w)||!w){
+w=1;
+}
+if(isNaN(h)||!h){
+h=1;
+}
+var _d=(-l/w-0.5).toFixed(8)+" "+(-t/h-0.5).toFixed(8);
+_b.matrix=mt;
+_b.origin=_d;
+_b.offset=_c;
+_b.on=true;
+}
+return this;
+},_setDimensions:function(_e,_f){
+return this;
+},setRawNode:function(_10){
+_10.stroked="f";
+_10.filled="f";
+this.rawNode=_10;
+},_moveToFront:function(){
+this.rawNode.parentNode.appendChild(this.rawNode);
+return this;
+},_moveToBack:function(){
+var r=this.rawNode,p=r.parentNode,n=p.firstChild;
+p.insertBefore(r,n);
+if(n.tagName=="rect"){
+n.swapNode(r);
+}
+return this;
+},_getRealMatrix:function(){
+return this.parentMatrix?new g.Matrix2D([this.parentMatrix,this.matrix]):this.matrix;
+}});
+dojo.declare("dojox.gfx.Group",g.Shape,{constructor:function(){
+_1.Container._init.call(this);
+},_applyTransform:function(){
+var _11=this._getRealMatrix();
+for(var i=0;i<this.children.length;++i){
+this.children[i]._updateParentMatrix(_11);
+}
+return this;
+},_setDimensions:function(_12,_13){
+var r=this.rawNode,rs=r.style,bs=this.bgNode.style;
+rs.width=_12;
+rs.height=_13;
+r.coordsize=_12+" "+_13;
+bs.width=_12;
+bs.height=_13;
+for(var i=0;i<this.children.length;++i){
+this.children[i]._setDimensions(_12,_13);
+}
+return this;
+}});
+g.Group.nodeType="group";
+dojo.declare("dojox.gfx.Rect",gs.Rect,{setShape:function(_14){
+var _15=this.shape=g.makeParameters(this.shape,_14);
+this.bbox=null;
+var r=Math.min(1,(_15.r/Math.min(parseFloat(_15.width),parseFloat(_15.height)))).toFixed(8);
+var _16=this.rawNode.parentNode,_17=null;
+if(_16){
+if(_16.lastChild!==this.rawNode){
+for(var i=0;i<_16.childNodes.length;++i){
+if(_16.childNodes[i]===this.rawNode){
+_17=_16.childNodes[i+1];
+break;
+}
+}
+}
+_16.removeChild(this.rawNode);
+}
+if(d.isIE>7){
+var _18=this.rawNode.ownerDocument.createElement("v:roundrect");
+_18.arcsize=r;
+_18.style.display="inline-block";
+this.rawNode=_18;
+}else{
+this.rawNode.arcsize=r;
+}
+if(_16){
+if(_17){
+_16.insertBefore(this.rawNode,_17);
+}else{
+_16.appendChild(this.rawNode);
+}
+}
+var _19=this.rawNode.style;
+_19.left=_15.x.toFixed();
+_19.top=_15.y.toFixed();
+_19.width=(typeof _15.width=="string"&&_15.width.indexOf("%")>=0)?_15.width:_15.width.toFixed();
+_19.height=(typeof _15.width=="string"&&_15.height.indexOf("%")>=0)?_15.height:_15.height.toFixed();
+return this.setTransform(this.matrix).setFill(this.fillStyle).setStroke(this.strokeStyle);
+}});
+g.Rect.nodeType="roundrect";
+dojo.declare("dojox.gfx.Ellipse",gs.Ellipse,{setShape:function(_1a){
+var _1b=this.shape=g.makeParameters(this.shape,_1a);
+this.bbox=null;
+var _1c=this.rawNode.style;
+_1c.left=(_1b.cx-_1b.rx).toFixed();
+_1c.top=(_1b.cy-_1b.ry).toFixed();
+_1c.width=(_1b.rx*2).toFixed();
+_1c.height=(_1b.ry*2).toFixed();
+return this.setTransform(this.matrix);
+}});
+g.Ellipse.nodeType="oval";
+dojo.declare("dojox.gfx.Circle",gs.Circle,{setShape:function(_1d){
+var _1e=this.shape=g.makeParameters(this.shape,_1d);
+this.bbox=null;
+var _1f=this.rawNode.style;
+_1f.left=(_1e.cx-_1e.r).toFixed();
+_1f.top=(_1e.cy-_1e.r).toFixed();
+_1f.width=(_1e.r*2).toFixed();
+_1f.height=(_1e.r*2).toFixed();
+return this;
+}});
+g.Circle.nodeType="oval";
+dojo.declare("dojox.gfx.Line",gs.Line,{constructor:function(_20){
+if(_20){
+_20.setAttribute("dojoGfxType","line");
+}
+},setShape:function(_21){
+var _22=this.shape=g.makeParameters(this.shape,_21);
+this.bbox=null;
+this.rawNode.path.v="m"+_22.x1.toFixed()+" "+_22.y1.toFixed()+"l"+_22.x2.toFixed()+" "+_22.y2.toFixed()+"e";
+return this.setTransform(this.matrix);
+}});
+g.Line.nodeType="shape";
+dojo.declare("dojox.gfx.Polyline",gs.Polyline,{constructor:function(_23){
+if(_23){
+_23.setAttribute("dojoGfxType","polyline");
+}
+},setShape:function(_24,_25){
+if(_24&&_24 instanceof Array){
+this.shape=g.makeParameters(this.shape,{points:_24});
+if(_25&&this.shape.points.length){
+this.shape.points.push(this.shape.points[0]);
+}
+}else{
+this.shape=g.makeParameters(this.shape,_24);
+}
+this.bbox=null;
+this._normalizePoints();
+var _26=[],p=this.shape.points;
+if(p.length>0){
+_26.push("m");
+_26.push(p[0].x.toFixed(),p[0].y.toFixed());
+if(p.length>1){
+_26.push("l");
+for(var i=1;i<p.length;++i){
+_26.push(p[i].x.toFixed(),p[i].y.toFixed());
+}
+}
+}
+_26.push("e");
+this.rawNode.path.v=_26.join(" ");
+return this.setTransform(this.matrix);
+}});
+g.Polyline.nodeType="shape";
+dojo.declare("dojox.gfx.Image",gs.Image,{setShape:function(_27){
+var _28=this.shape=g.makeParameters(this.shape,_27);
+this.bbox=null;
+this.rawNode.firstChild.src=_28.src;
+return this.setTransform(this.matrix);
+},_applyTransform:function(){
+var _29=this._getRealMatrix(),_2a=this.rawNode,s=_2a.style,_2b=this.shape;
+if(_29){
+_29=m.multiply(_29,{dx:_2b.x,dy:_2b.y});
+}else{
+_29=m.normalize({dx:_2b.x,dy:_2b.y});
+}
+if(_29.xy==0&&_29.yx==0&&_29.xx>0&&_29.yy>0){
+s.filter="";
+s.width=Math.floor(_29.xx*_2b.width);
+s.height=Math.floor(_29.yy*_2b.height);
+s.left=Math.floor(_29.dx);
+s.top=Math.floor(_29.dy);
+}else{
+var ps=_2a.parentNode.style;
+s.left="0px";
+s.top="0px";
+s.width=ps.width;
+s.height=ps.height;
+_29=m.multiply(_29,{xx:_2b.width/parseInt(s.width),yy:_2b.height/parseInt(s.height)});
+var f=_2a.filters["DXImageTransform.Microsoft.Matrix"];
+if(f){
+f.M11=_29.xx;
+f.M12=_29.xy;
+f.M21=_29.yx;
+f.M22=_29.yy;
+f.Dx=_29.dx;
+f.Dy=_29.dy;
+}else{
+s.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+_29.xx+", M12="+_29.xy+", M21="+_29.yx+", M22="+_29.yy+", Dx="+_29.dx+", Dy="+_29.dy+")";
+}
+}
+return this;
+},_setDimensions:function(_2c,_2d){
+var r=this.rawNode,f=r.filters["DXImageTransform.Microsoft.Matrix"];
+if(f){
+var s=r.style;
+s.width=_2c;
+s.height=_2d;
+return this._applyTransform();
+}
+return this;
+}});
+g.Image.nodeType="rect";
+dojo.declare("dojox.gfx.Text",gs.Text,{constructor:function(_2e){
+if(_2e){
+_2e.setAttribute("dojoGfxType","text");
+}
+this.fontStyle=null;
+},_alignment:{start:"left",middle:"center",end:"right"},setShape:function(_2f){
+this.shape=g.makeParameters(this.shape,_2f);
+this.bbox=null;
+var r=this.rawNode,s=this.shape,x=s.x,y=s.y.toFixed(),_30;
+switch(s.align){
+case "middle":
+x-=5;
+break;
+case "end":
+x-=10;
+break;
+}
+_30="m"+x.toFixed()+","+y+"l"+(x+10).toFixed()+","+y+"e";
+var p=null,t=null,c=r.childNodes;
+for(var i=0;i<c.length;++i){
+var tag=c[i].tagName;
+if(tag=="path"){
+p=c[i];
+if(t){
+break;
+}
+}else{
+if(tag=="textpath"){
+t=c[i];
+if(p){
+break;
+}
+}
+}
+}
+if(!p){
+p=r.ownerDocument.createElement("v:path");
+r.appendChild(p);
+}
+if(!t){
+t=r.ownerDocument.createElement("v:textpath");
+r.appendChild(t);
+}
+p.v=_30;
+p.textPathOk=true;
+t.on=true;
+var a=_1.text_alignment[s.align];
+t.style["v-text-align"]=a?a:"left";
+t.style["text-decoration"]=s.decoration;
+t.style["v-rotate-letters"]=s.rotated;
+t.style["v-text-kern"]=s.kerning;
+t.string=s.text;
+return this.setTransform(this.matrix);
+},_setFont:function(){
+var f=this.fontStyle,c=this.rawNode.childNodes;
+for(var i=0;i<c.length;++i){
+if(c[i].tagName=="textpath"){
+c[i].style.font=g.makeFontString(f);
+break;
+}
+}
+this.setTransform(this.matrix);
+},_getRealMatrix:function(){
+var _31=g.Shape.prototype._getRealMatrix.call(this);
+if(_31){
+_31=m.multiply(_31,{dy:-g.normalizedLength(this.fontStyle?this.fontStyle.size:"10pt")*0.35});
+}
+return _31;
+},getTextWidth:function(){
+var _32=this.rawNode,_33=_32.style.display;
+_32.style.display="inline";
+var _34=g.pt2px(parseFloat(_32.currentStyle.width));
+_32.style.display=_33;
+return _34;
+}});
+g.Text.nodeType="shape";
+g.path._calcArc=function(_35){
+var _36=Math.cos(_35),_37=Math.sin(_35),p2={x:_36+(4/3)*(1-_36),y:_37-(4/3)*_36*(1-_36)/_37};
+return {s:{x:_36,y:-_37},c1:{x:p2.x,y:-p2.y},c2:p2,e:{x:_36,y:_37}};
};
-
-// Extenders
-
-dojox.gfx.vml.Container = {
- _init: function(){
- dojox.gfx.shape.Container._init.call(this);
- },
- add: function(shape){
- // summary: adds a shape to a group/surface
- // shape: dojox.gfx.Shape: an VML shape object
- if(this != shape.getParent()){
- this.rawNode.appendChild(shape.rawNode);
- //dojox.gfx.Group.superclass.add.apply(this, arguments);
- //this.inherited(arguments);
- dojox.gfx.shape.Container.add.apply(this, arguments);
- }
- return this; // self
- },
- remove: function(shape, silently){
- // summary: remove a shape from a group/surface
- // shape: dojox.gfx.Shape: an VML shape object
- // silently: Boolean?: if true, regenerate a picture
- if(this == shape.getParent()){
- if(this.rawNode == shape.rawNode.parentNode){
- this.rawNode.removeChild(shape.rawNode);
- }
- //dojox.gfx.Group.superclass.remove.apply(this, arguments);
- //this.inherited(arguments);
- dojox.gfx.shape.Container.remove.apply(this, arguments);
- }
- return this; // self
- },
- clear: function(){
- // summary: removes all shapes from a group/surface
- var r = this.rawNode;
- while(r.firstChild != r.lastChild){
- if(r.firstChild != this.bgNode){
- r.removeChild(r.firstChild);
- }
- if(r.lastChild != this.bgNode){
- r.removeChild(r.lastChild);
- }
- }
- //return this.inherited(arguments); // self
- return dojox.gfx.shape.Container.clear.apply(this, arguments);
- },
- _moveChildToFront: dojox.gfx.shape.Container._moveChildToFront,
- _moveChildToBack: dojox.gfx.shape.Container._moveChildToBack
+dojo.declare("dojox.gfx.Path",g.path.Path,{constructor:function(_38){
+if(_38&&!_38.getAttribute("dojoGfxType")){
+_38.setAttribute("dojoGfxType","path");
+}
+this.vmlPath="";
+this.lastControl={};
+},_updateWithSegment:function(_39){
+var _3a=d.clone(this.last);
+g.Path.superclass._updateWithSegment.apply(this,arguments);
+var _3b=this[this.renderers[_39.action]](_39,_3a);
+if(typeof this.vmlPath=="string"){
+this.vmlPath+=_3b.join("");
+this.rawNode.path.v=this.vmlPath+" r0,0 e";
+}else{
+Array.prototype.push.apply(this.vmlPath,_3b);
+}
+},setShape:function(_3c){
+this.vmlPath=[];
+this.lastControl.type="";
+g.Path.superclass.setShape.apply(this,arguments);
+this.vmlPath=this.vmlPath.join("");
+this.rawNode.path.v=this.vmlPath+" r0,0 e";
+return this;
+},_pathVmlToSvgMap:{m:"M",l:"L",t:"m",r:"l",c:"C",v:"c",qb:"Q",x:"z",e:""},renderers:{M:"_moveToA",m:"_moveToR",L:"_lineToA",l:"_lineToR",H:"_hLineToA",h:"_hLineToR",V:"_vLineToA",v:"_vLineToR",C:"_curveToA",c:"_curveToR",S:"_smoothCurveToA",s:"_smoothCurveToR",Q:"_qCurveToA",q:"_qCurveToR",T:"_qSmoothCurveToA",t:"_qSmoothCurveToR",A:"_arcTo",a:"_arcTo",Z:"_closePath",z:"_closePath"},_addArgs:function(_3d,_3e,_3f,_40){
+var n=_3e instanceof Array?_3e:_3e.args;
+for(var i=_3f;i<_40;++i){
+_3d.push(" ",n[i].toFixed());
+}
+},_adjustRelCrd:function(_41,_42,_43){
+var n=_42 instanceof Array?_42:_42.args,l=n.length,_44=new Array(l),i=0,x=_41.x,y=_41.y;
+if(typeof x!="number"){
+_44[0]=x=n[0];
+_44[1]=y=n[1];
+i=2;
+}
+if(typeof _43=="number"&&_43!=2){
+var j=_43;
+while(j<=l){
+for(;i<j;i+=2){
+_44[i]=x+n[i];
+_44[i+1]=y+n[i+1];
+}
+x=_44[j-2];
+y=_44[j-1];
+j+=_43;
+}
+}else{
+for(;i<l;i+=2){
+_44[i]=(x+=n[i]);
+_44[i+1]=(y+=n[i+1]);
+}
+}
+return _44;
+},_adjustRelPos:function(_45,_46){
+var n=_46 instanceof Array?_46:_46.args,l=n.length,_47=new Array(l);
+for(var i=0;i<l;++i){
+_47[i]=(_45+=n[i]);
+}
+return _47;
+},_moveToA:function(_48){
+var p=[" m"],n=_48 instanceof Array?_48:_48.args,l=n.length;
+this._addArgs(p,n,0,2);
+if(l>2){
+p.push(" l");
+this._addArgs(p,n,2,l);
+}
+this.lastControl.type="";
+return p;
+},_moveToR:function(_49,_4a){
+return this._moveToA(this._adjustRelCrd(_4a,_49));
+},_lineToA:function(_4b){
+var p=[" l"],n=_4b instanceof Array?_4b:_4b.args;
+this._addArgs(p,n,0,n.length);
+this.lastControl.type="";
+return p;
+},_lineToR:function(_4c,_4d){
+return this._lineToA(this._adjustRelCrd(_4d,_4c));
+},_hLineToA:function(_4e,_4f){
+var p=[" l"],y=" "+_4f.y.toFixed(),n=_4e instanceof Array?_4e:_4e.args,l=n.length;
+for(var i=0;i<l;++i){
+p.push(" ",n[i].toFixed(),y);
+}
+this.lastControl.type="";
+return p;
+},_hLineToR:function(_50,_51){
+return this._hLineToA(this._adjustRelPos(_51.x,_50),_51);
+},_vLineToA:function(_52,_53){
+var p=[" l"],x=" "+_53.x.toFixed(),n=_52 instanceof Array?_52:_52.args,l=n.length;
+for(var i=0;i<l;++i){
+p.push(x," ",n[i].toFixed());
+}
+this.lastControl.type="";
+return p;
+},_vLineToR:function(_54,_55){
+return this._vLineToA(this._adjustRelPos(_55.y,_54),_55);
+},_curveToA:function(_56){
+var p=[],n=_56 instanceof Array?_56:_56.args,l=n.length,lc=this.lastControl;
+for(var i=0;i<l;i+=6){
+p.push(" c");
+this._addArgs(p,n,i,i+6);
+}
+lc.x=n[l-4];
+lc.y=n[l-3];
+lc.type="C";
+return p;
+},_curveToR:function(_57,_58){
+return this._curveToA(this._adjustRelCrd(_58,_57,6));
+},_smoothCurveToA:function(_59,_5a){
+var p=[],n=_59 instanceof Array?_59:_59.args,l=n.length,lc=this.lastControl,i=0;
+if(lc.type!="C"){
+p.push(" c");
+this._addArgs(p,[_5a.x,_5a.y],0,2);
+this._addArgs(p,n,0,4);
+lc.x=n[0];
+lc.y=n[1];
+lc.type="C";
+i=4;
+}
+for(;i<l;i+=4){
+p.push(" c");
+this._addArgs(p,[2*_5a.x-lc.x,2*_5a.y-lc.y],0,2);
+this._addArgs(p,n,i,i+4);
+lc.x=n[i];
+lc.y=n[i+1];
+}
+return p;
+},_smoothCurveToR:function(_5b,_5c){
+return this._smoothCurveToA(this._adjustRelCrd(_5c,_5b,4),_5c);
+},_qCurveToA:function(_5d){
+var p=[],n=_5d instanceof Array?_5d:_5d.args,l=n.length,lc=this.lastControl;
+for(var i=0;i<l;i+=4){
+p.push(" qb");
+this._addArgs(p,n,i,i+4);
+}
+lc.x=n[l-4];
+lc.y=n[l-3];
+lc.type="Q";
+return p;
+},_qCurveToR:function(_5e,_5f){
+return this._qCurveToA(this._adjustRelCrd(_5f,_5e,4));
+},_qSmoothCurveToA:function(_60,_61){
+var p=[],n=_60 instanceof Array?_60:_60.args,l=n.length,lc=this.lastControl,i=0;
+if(lc.type!="Q"){
+p.push(" qb");
+this._addArgs(p,[lc.x=_61.x,lc.y=_61.y],0,2);
+lc.type="Q";
+this._addArgs(p,n,0,2);
+i=2;
+}
+for(;i<l;i+=2){
+p.push(" qb");
+this._addArgs(p,[lc.x=2*_61.x-lc.x,lc.y=2*_61.y-lc.y],0,2);
+this._addArgs(p,n,i,i+2);
+}
+return p;
+},_qSmoothCurveToR:function(_62,_63){
+return this._qSmoothCurveToA(this._adjustRelCrd(_63,_62,2),_63);
+},_arcTo:function(_64,_65){
+var p=[],n=_64.args,l=n.length,_66=_64.action=="a";
+for(var i=0;i<l;i+=7){
+var x1=n[i+5],y1=n[i+6];
+if(_66){
+x1+=_65.x;
+y1+=_65.y;
+}
+var _67=g.arc.arcAsBezier(_65,n[i],n[i+1],n[i+2],n[i+3]?1:0,n[i+4]?1:0,x1,y1);
+for(var j=0;j<_67.length;++j){
+p.push(" c");
+var t=_67[j];
+this._addArgs(p,t,0,t.length);
+}
+_65.x=x1;
+_65.y=y1;
+}
+this.lastControl.type="";
+return p;
+},_closePath:function(){
+this.lastControl.type="";
+return ["x"];
+}});
+g.Path.nodeType="shape";
+dojo.declare("dojox.gfx.TextPath",g.Path,{constructor:function(_68){
+if(_68){
+_68.setAttribute("dojoGfxType","textpath");
+}
+this.fontStyle=null;
+if(!("text" in this)){
+this.text=d.clone(g.defaultTextPath);
+}
+if(!("fontStyle" in this)){
+this.fontStyle=d.clone(g.defaultFont);
+}
+},setText:function(_69){
+this.text=g.makeParameters(this.text,typeof _69=="string"?{text:_69}:_69);
+this._setText();
+return this;
+},setFont:function(_6a){
+this.fontStyle=typeof _6a=="string"?g.splitFontString(_6a):g.makeParameters(g.defaultFont,_6a);
+this._setFont();
+return this;
+},_setText:function(){
+this.bbox=null;
+var r=this.rawNode,s=this.text,p=null,t=null,c=r.childNodes;
+for(var i=0;i<c.length;++i){
+var tag=c[i].tagName;
+if(tag=="path"){
+p=c[i];
+if(t){
+break;
+}
+}else{
+if(tag=="textpath"){
+t=c[i];
+if(p){
+break;
+}
+}
+}
+}
+if(!p){
+p=this.rawNode.ownerDocument.createElement("v:path");
+r.appendChild(p);
+}
+if(!t){
+t=this.rawNode.ownerDocument.createElement("v:textpath");
+r.appendChild(t);
+}
+p.textPathOk=true;
+t.on=true;
+var a=_1.text_alignment[s.align];
+t.style["v-text-align"]=a?a:"left";
+t.style["text-decoration"]=s.decoration;
+t.style["v-rotate-letters"]=s.rotated;
+t.style["v-text-kern"]=s.kerning;
+t.string=s.text;
+},_setFont:function(){
+var f=this.fontStyle,c=this.rawNode.childNodes;
+for(var i=0;i<c.length;++i){
+if(c[i].tagName=="textpath"){
+c[i].style.font=g.makeFontString(f);
+break;
+}
+}
+}});
+g.TextPath.nodeType="shape";
+dojo.declare("dojox.gfx.Surface",gs.Surface,{constructor:function(){
+_1.Container._init.call(this);
+},setDimensions:function(_6b,_6c){
+this.width=g.normalizedLength(_6b);
+this.height=g.normalizedLength(_6c);
+if(!this.rawNode){
+return this;
+}
+var cs=this.clipNode.style,r=this.rawNode,rs=r.style,bs=this.bgNode.style,ps=this._parent.style,i;
+ps.width=_6b;
+ps.height=_6c;
+cs.width=_6b;
+cs.height=_6c;
+cs.clip="rect(0px "+_6b+"px "+_6c+"px 0px)";
+rs.width=_6b;
+rs.height=_6c;
+r.coordsize=_6b+" "+_6c;
+bs.width=_6b;
+bs.height=_6c;
+for(i=0;i<this.children.length;++i){
+this.children[i]._setDimensions(_6b,_6c);
+}
+return this;
+},getDimensions:function(){
+var t=this.rawNode?{width:g.normalizedLength(this.rawNode.style.width),height:g.normalizedLength(this.rawNode.style.height)}:null;
+if(t.width<=0){
+t.width=this.width;
+}
+if(t.height<=0){
+t.height=this.height;
+}
+return t;
+}});
+g.createSurface=function(_6d,_6e,_6f){
+if(!_6e&&!_6f){
+var pos=d.position(_6d);
+_6e=_6e||pos.w;
+_6f=_6f||pos.h;
+}
+if(typeof _6e=="number"){
+_6e=_6e+"px";
+}
+if(typeof _6f=="number"){
+_6f=_6f+"px";
+}
+var s=new g.Surface(),p=d.byId(_6d),c=s.clipNode=p.ownerDocument.createElement("div"),r=s.rawNode=p.ownerDocument.createElement("v:group"),cs=c.style,rs=r.style;
+if(d.isIE>7){
+rs.display="inline-block";
+}
+s._parent=p;
+s._nodes.push(c);
+p.style.width=_6e;
+p.style.height=_6f;
+cs.position="absolute";
+cs.width=_6e;
+cs.height=_6f;
+cs.clip="rect(0px "+_6e+" "+_6f+" 0px)";
+rs.position="absolute";
+rs.width=_6e;
+rs.height=_6f;
+r.coordsize=(_6e==="100%"?_6e:parseFloat(_6e))+" "+(_6f==="100%"?_6f:parseFloat(_6f));
+r.coordorigin="0 0";
+var b=s.bgNode=r.ownerDocument.createElement("v:rect"),bs=b.style;
+bs.left=bs.top=0;
+bs.width=rs.width;
+bs.height=rs.height;
+b.filled=b.stroked="f";
+r.appendChild(b);
+c.appendChild(r);
+p.appendChild(c);
+s.width=g.normalizedLength(_6e);
+s.height=g.normalizedLength(_6f);
+return s;
};
-
-dojo.mixin(dojox.gfx.shape.Creator, {
- // summary: VML shape creators
- createGroup: function(){
- // summary: creates a VML group shape
- var g = this.createObject(dojox.gfx.Group, null); // dojox.gfx.Group
- // create a background rectangle, which is required to show all other shapes
- var r = g.rawNode.ownerDocument.createElement("v:rect");
- r.style.left = r.style.top = 0;
- r.style.width = g.rawNode.style.width;
- r.style.height = g.rawNode.style.height;
- r.filled = r.stroked = "f";
- g.rawNode.appendChild(r);
- g.bgNode = r;
- return g; // dojox.gfx.Group
- },
- createImage: function(image){
- // summary: creates a VML image shape
- // image: Object: an image object (see dojox.gfx.defaultImage)
- if(!this.rawNode) return null;
- var shape = new dojox.gfx.Image(), node = this.rawNode.ownerDocument.createElement('div');
- node.style.position = "absolute";
- node.style.width = this.rawNode.style.width;
- node.style.height = this.rawNode.style.height;
- node.style.filter = "progid:DXImageTransform.Microsoft.Matrix(M11=1, M12=0, M21=0, M22=1, Dx=0, Dy=0)";
- var img = this.rawNode.ownerDocument.createElement('img');
- node.appendChild(img);
- shape.setRawNode(node);
- this.rawNode.appendChild(node);
- shape.setShape(image);
- this.add(shape);
- return shape; // dojox.gfx.Image
- },
- createObject: function(shapeType, rawShape) {
- // summary: creates an instance of the passed shapeType class
- // shapeType: Function: a class constructor to create an instance of
- // rawShape: Object: properties to be passed in to the classes "setShape" method
- // overrideSize: Boolean: set the size explicitly, if true
- if(!this.rawNode) return null;
- var shape = new shapeType(),
- node = this.rawNode.ownerDocument.createElement('v:' + shapeType.nodeType);
- shape.setRawNode(node);
- this.rawNode.appendChild(node);
- switch(shapeType){
- case dojox.gfx.Group:
- case dojox.gfx.Line:
- case dojox.gfx.Polyline:
- case dojox.gfx.Text:
- case dojox.gfx.Path:
- case dojox.gfx.TextPath:
- this._overrideSize(node);
- }
- shape.setShape(rawShape);
- this.add(shape);
- return shape; // dojox.gfx.Shape
- },
- _overrideSize: function(node){
- var p = this;
- for(; p && !(p instanceof dojox.gfx.Surface); p = p.parent);
- node.style.width = p.width;
- node.style.height = p.height;
- node.coordsize = p.width + " " + p.height;
- }
-});
-
-dojo.extend(dojox.gfx.Group, dojox.gfx.vml.Container);
-dojo.extend(dojox.gfx.Group, dojox.gfx.shape.Creator);
-
-dojo.extend(dojox.gfx.Surface, dojox.gfx.vml.Container);
-dojo.extend(dojox.gfx.Surface, dojox.gfx.shape.Creator);
-
+_1.Container={_init:function(){
+gs.Container._init.call(this);
+},add:function(_70){
+if(this!=_70.getParent()){
+this.rawNode.appendChild(_70.rawNode);
+if(!_70.getParent()){
+_70.setFill(_70.getFill());
+_70.setStroke(_70.getStroke());
+}
+gs.Container.add.apply(this,arguments);
+}
+return this;
+},remove:function(_71,_72){
+if(this==_71.getParent()){
+if(this.rawNode==_71.rawNode.parentNode){
+this.rawNode.removeChild(_71.rawNode);
+}
+gs.Container.remove.apply(this,arguments);
+}
+return this;
+},clear:function(){
+var r=this.rawNode;
+while(r.firstChild!=r.lastChild){
+if(r.firstChild!=this.bgNode){
+r.removeChild(r.firstChild);
+}
+if(r.lastChild!=this.bgNode){
+r.removeChild(r.lastChild);
+}
+}
+return gs.Container.clear.apply(this,arguments);
+},_moveChildToFront:gs.Container._moveChildToFront,_moveChildToBack:gs.Container._moveChildToBack};
+dojo.mixin(gs.Creator,{createGroup:function(){
+var _73=this.createObject(g.Group,null);
+var r=_73.rawNode.ownerDocument.createElement("v:rect");
+r.style.left=r.style.top=0;
+r.style.width=_73.rawNode.style.width;
+r.style.height=_73.rawNode.style.height;
+r.filled=r.stroked="f";
+_73.rawNode.appendChild(r);
+_73.bgNode=r;
+return _73;
+},createImage:function(_74){
+if(!this.rawNode){
+return null;
}
+var _75=new g.Image(),doc=this.rawNode.ownerDocument,_76=doc.createElement("v:rect");
+_76.stroked="f";
+_76.style.width=this.rawNode.style.width;
+_76.style.height=this.rawNode.style.height;
+var img=doc.createElement("v:imagedata");
+_76.appendChild(img);
+_75.setRawNode(_76);
+this.rawNode.appendChild(_76);
+_75.setShape(_74);
+this.add(_75);
+return _75;
+},createRect:function(_77){
+if(!this.rawNode){
+return null;
+}
+var _78=new g.Rect,_79=this.rawNode.ownerDocument.createElement("v:roundrect");
+if(d.isIE>7){
+_79.style.display="inline-block";
+}
+_78.setRawNode(_79);
+this.rawNode.appendChild(_79);
+_78.setShape(_77);
+this.add(_78);
+return _78;
+},createObject:function(_7a,_7b){
+if(!this.rawNode){
+return null;
+}
+var _7c=new _7a(),_7d=this.rawNode.ownerDocument.createElement("v:"+_7a.nodeType);
+_7c.setRawNode(_7d);
+this.rawNode.appendChild(_7d);
+switch(_7a){
+case g.Group:
+case g.Line:
+case g.Polyline:
+case g.Image:
+case g.Text:
+case g.Path:
+case g.TextPath:
+this._overrideSize(_7d);
+}
+_7c.setShape(_7b);
+this.add(_7c);
+return _7c;
+},_overrideSize:function(_7e){
+var s=this.rawNode.style,w=s.width,h=s.height;
+_7e.style.width=w;
+_7e.style.height=h;
+_7e.coordsize=parseInt(w)+" "+parseInt(h);
+}});
+d.extend(g.Group,_1.Container);
+d.extend(g.Group,gs.Creator);
+d.extend(g.Surface,_1.Container);
+d.extend(g.Surface,gs.Creator);
+})();
+}
diff --git a/js/dojo/dojox/gfx/vml_attach.js b/js/dojo/dojox/gfx/vml_attach.js
--- a/js/dojo/dojox/gfx/vml_attach.js
+++ b/js/dojo/dojox/gfx/vml_attach.js
@@ -1,362 +1,300 @@
-dojo.require("dojox.gfx.vml");
-
-dojo.experimental("dojox.gfx.vml_attach");
-
-(function(){
- dojox.gfx.attachNode = function(node){
- // summary: creates a shape from a Node
- // node: Node: an VML node
- if(!node) return null;
- var s = null;
- switch(node.tagName.toLowerCase()){
- case dojox.gfx.Rect.nodeType:
- s = new dojox.gfx.Rect(node);
- attachRect(s);
- break;
- case dojox.gfx.Ellipse.nodeType:
- if(node.style.width == node.style.height){
- s = new dojox.gfx.Circle(node);
- attachCircle(s);
- }else{
- s = new dojox.gfx.Ellipse(node);
- attachEllipse(s);
- }
- break;
- case dojox.gfx.Path.nodeType:
- switch(node.getAttribute("dojoGfxType")){
- case "line":
- s = new dojox.gfx.Line(node);
- attachLine(s);
- break;
- case "polyline":
- s = new dojox.gfx.Polyline(node);
- attachPolyline(s);
- break;
- case "path":
- s = new dojox.gfx.Path(node);
- attachPath(s);
- break;
- case "text":
- s = new dojox.gfx.Text(node);
- attachText(s);
- attachFont(s);
- attachTextTransform(s);
- break;
- case "textpath":
- s = new dojox.gfx.TextPath(node);
- attachPath(s);
- attachText(s);
- attachFont(s);
- break;
- }
- break;
- case dojox.gfx.Image.nodeType:
- switch(node.getAttribute("dojoGfxType")){
- case "image":
- s = new dojox.gfx.Image(node);
- attachImage(s);
- attachImageTransform(s);
- break;
- }
- break;
- default:
- //console.debug("FATAL ERROR! tagName = " + node.tagName);
- return null;
- }
- if(!(s instanceof dojox.gfx.Image)){
- attachFill(s);
- attachStroke(s);
- if(!(s instanceof dojox.gfx.Text)){
- attachTransform(s);
- }
- }
- return s; // dojox.gfx.Shape
- };
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- dojox.gfx.attachSurface = function(node){
- // summary: creates a surface from a Node
- // node: Node: an VML node
- var s = new dojox.gfx.Surface();
- s.clipNode = node;
- var r = s.rawNode = node.firstChild;
- var b = r.firstChild;
- if(!b || b.tagName != "rect"){
- return null; // dojox.gfx.Surface
- }
- s.bgNode = r;
- return s; // dojox.gfx.Surface
- };
-
- var attachFill = function(object){
- // summary: deduces a fill style from a node.
- // object: dojox.gfx.Shape: an VML shape
- var fillStyle = null, r = object.rawNode, fo = r.fill;
- if(fo.on && fo.type == "gradient"){
- var fillStyle = dojo.clone(dojox.gfx.defaultLinearGradient),
- rad = dojox.gfx.matrix._degToRad(fo.angle);
- fillStyle.x2 = Math.cos(rad);
- fillStyle.y2 = Math.sin(rad);
- fillStyle.colors = [];
- var stops = fo.colors.value.split(";");
- for(var i = 0; i < stops.length; ++i){
- var t = stops[i].match(/\S+/g);
- if(!t || t.length != 2){ continue; }
- fillStyle.colors.push({offset: dojox.gfx.vml._parseFloat(t[0]), color: new dojo.Color(t[1])});
- }
- }else if(fo.on && fo.type == "gradientradial"){
- var fillStyle = dojo.clone(dojox.gfx.defaultRadialGradient),
- w = parseFloat(r.style.width), h = parseFloat(r.style.height);
- fillStyle.cx = isNaN(w) ? 0 : fo.focusposition.x * w;
- fillStyle.cy = isNaN(h) ? 0 : fo.focusposition.y * h;
- fillStyle.r = isNaN(w) ? 1 : w / 2;
- fillStyle.colors = [];
- var stops = fo.colors.value.split(";");
- for(var i = stops.length - 1; i >= 0; --i){
- var t = stops[i].match(/\S+/g);
- if(!t || t.length != 2){ continue; }
- fillStyle.colors.push({offset: dojox.gfx.vml._parseFloat(t[0]), color: new dojo.Color(t[1])});
- }
- }else if(fo.on && fo.type == "tile"){
- var fillStyle = dojo.clone(dojox.gfx.defaultPattern);
- fillStyle.width = dojox.gfx.pt2px(fo.size.x); // from pt
- fillStyle.height = dojox.gfx.pt2px(fo.size.y); // from pt
- fillStyle.x = fo.origin.x * fillStyle.width;
- fillStyle.y = fo.origin.y * fillStyle.height;
- fillStyle.src = fo.src;
- }else if(fo.on && r.fillcolor){
- // a color object !
- fillStyle = new dojo.Color(r.fillcolor+"");
- fillStyle.a = fo.opacity;
- }
- object.fillStyle = fillStyle;
- };
-
- var attachStroke = function(object) {
- // summary: deduces a stroke style from a node.
- // object: dojox.gfx.Shape: an VML shape
- var r = object.rawNode;
- if(!r.stroked){
- object.strokeStyle = null;
- return;
- }
- var strokeStyle = object.strokeStyle = dojo.clone(dojox.gfx.defaultStroke),
- rs = r.stroke;
- strokeStyle.color = new dojo.Color(r.strokecolor.value);
- strokeStyle.width = dojox.gfx.normalizedLength(r.strokeweight+"");
- strokeStyle.color.a = rs.opacity;
- strokeStyle.cap = this._translate(this._capMapReversed, rs.endcap);
- strokeStyle.join = rs.joinstyle == "miter" ? rs.miterlimit : rs.joinstyle;
- strokeStyle.style = rs.dashstyle;
- };
-
- var attachTransform = function(object) {
- // summary: deduces a transformation matrix from a node.
- // object: dojox.gfx.Shape: an VML shape
- var s = rawNode.skew, sm = s.matrix, so = s.offset;
- object.matrix = dojox.gfx.matrix.normalize({
- xx: sm.xtox,
- xy: sm.ytox,
- yx: sm.xtoy,
- yy: sm.ytoy,
- dx: dojox.gfx.pt2px(so.x),
- dy: dojox.gfx.pt2px(so.y)
- });
- };
- var attachGroup = function(object){
- // summary: reconstructs all group shape parameters from a node (VML).
- // object: dojox.gfx.Shape: an VML shape
- // attach the background
- object.bgNode = object.rawNode.firstChild; // TODO: check it first
- };
-
- var attachRect = function(object){
- // summary: builds a rectangle shape from a node.
- // object: dojox.gfx.Shape: an VML shape
- // a workaround for the VML's arcsize bug: cannot read arcsize of an instantiated node
- var r = object.rawNode, arcsize = r.outerHTML.match(/arcsize = \"(\d*\.?\d+[%f]?)\"/)[1],
- style = r.style, width = parseFloat(style.width), height = parseFloat(style.height);
- arcsize = (arcsize.indexOf("%") >= 0) ? parseFloat(arcsize) / 100 : dojox.gfx.vml._parseFloat(arcsize);
- // make an object
- object.shape = dojox.gfx.makeParameters(dojox.gfx.defaultRect, {
- x: parseInt(style.left),
- y: parseInt(style.top),
- width: width,
- height: height,
- r: Math.min(width, height) * arcsize
- });
- };
-
- var attachEllipse = function(object){
- // summary: builds an ellipse shape from a node.
- // object: dojox.gfx.Shape: an VML shape
- var style = object.rawNode.style,
- rx = parseInt(style.width ) / 2,
- ry = parseInt(style.height) / 2;
- object.shape = dojox.gfx.makeParameters(dojox.gfx.defaultEllipse, {
- cx: parseInt(style.left) + rx,
- cy: parseInt(style.top ) + ry,
- rx: rx,
- ry: ry
- });
- };
-
- var attachCircle = function(object){
- // summary: builds a circle shape from a node.
- // object: dojox.gfx.Shape: an VML shape
- var style = object.rawNode.style, r = parseInt(style.width) / 2;
- object.shape = dojox.gfx.makeParameters(dojox.gfx.defaultCircle, {
- cx: parseInt(style.left) + r,
- cy: parseInt(style.top) + r,
- r: r
- });
- };
-
- var attachLine = function(object){
- // summary: builds a line shape from a node.
- // object: dojox.gfx.Shape: an VML shape
- var shape = object.shape = dojo.clone(dojox.gfx.defaultLine),
- p = object.rawNode.path.v.match(dojox.gfx.pathVmlRegExp);
- do{
- if(p.length < 7 || p[0] != "m" || p[3] != "l" || p[6] != "e"){ break; }
- shape.x1 = parseInt(p[1]);
- shape.y1 = parseInt(p[2]);
- shape.x2 = parseInt(p[4]);
- shape.y2 = parseInt(p[5]);
- }while(false);
- };
-
- var attachPolyline = function(object){
- // summary: builds a polyline/polygon shape from a node.
- // object: dojox.gfx.Shape: an VML shape
- var shape = object.shape = dojo.clone(dojox.gfx.defaultPolyline),
- p = object.rawNode.path.v.match(dojox.gfx.pathVmlRegExp);
- do{
- if(p.length < 3 || p[0] != "m"){ break; }
- var x = parseInt(p[0]), y = parseInt(p[1]);
- if(isNaN(x) || isNaN(y)){ break; }
- shape.points.push({x: x, y: y});
- if(p.length < 6 || p[3] != "l"){ break; }
- for(var i = 4; i < p.length; i += 2){
- x = parseInt(p[i]);
- y = parseInt(p[i + 1]);
- if(isNaN(x) || isNaN(y)){ break; }
- shape.points.push({x: x, y: y});
- }
- }while(false);
- };
-
- var attachImage = function(object){
- // summary: builds an image shape from a node.
- // object: dojox.gfx.Shape: an VML shape
- object.shape = dojo.clone(dojox.gfx.defaultImage);
- object.shape.src = object.rawNode.firstChild.src;
- };
-
- var attachImageTransform = function(object) {
- // summary: deduces a transformation matrix from a node.
- // object: dojox.gfx.Shape: an VML shape
- var m = object.rawNode.filters["DXImageTransform.Microsoft.Matrix"];
- object.matrix = dojox.gfx.matrix.normalize({
- xx: m.M11,
- xy: m.M12,
- yx: m.M21,
- yy: m.M22,
- dx: m.Dx,
- dy: m.Dy
- });
- };
-
- var attachText = function(object){
- // summary: builds a text shape from a node.
- // object: dojox.gfx.Shape: an VML shape
- var shape = object.shape = dojo.clone(dojox.gfx.defaultText),
- r = object.rawNode, p = r.path.v.match(dojox.gfx.pathVmlRegExp);
- do{
- if(!p || p.length != 7){ break; }
- var c = r.childNodes, i = 0;
- for(; i < c.length && c[i].tagName != "textpath"; ++i);
- if(i >= c.length){ break; }
- var s = c[i].style;
- shape.text = c[i].string;
- switch(s["v-text-align"]){
- case "left":
- shape.x = parseInt(p[1]);
- shape.align = "start";
- break;
- case "center":
- shape.x = (parseInt(p[1]) + parseInt(p[4])) / 2;
- shape.align = "middle";
- break;
- case "right":
- shape.x = parseInt(p[4]);
- shape.align = "end";
- break;
- }
- shape.y = parseInt(p[2]);
- shape.decoration = s["text-decoration"];
- shape.rotated = s["v-rotate-letters"].toLowerCase() in dojox.gfx.vml._bool;
- shape.kerning = s["v-text-kern"].toLowerCase() in dojox.gfx.vml._bool;
- return;
- }while(false);
- object.shape = null;
- };
-
- var attachFont = function(object){
- // summary: deduces a font style from a node.
- // object: dojox.gfx.Shape: an VML shape
- var fontStyle = object.fontStyle = dojo.clone(dojox.gfx.defaultFont),
- c = object.rawNode.childNodes, i = 0;
- for(; i < c.length && c[i].tagName == "textpath"; ++i);
- if(i >= c.length){
- object.fontStyle = null;
- return;
- }
- var s = c[i].style;
- fontStyle.style = s.fontstyle;
- fontStyle.variant = s.fontvariant;
- fontStyle.weight = s.fontweight;
- fontStyle.size = s.fontsize;
- fontStyle.family = s.fontfamily;
- };
-
- var attachTextTransform = function(object) {
- // summary: deduces a transformation matrix from a node.
- // object: dojox.gfx.Shape: an VML shape
- attachTransform(object);
- var matrix = object.matrix, fs = object.fontStyle;
- // see comments in _getRealMatrix()
- if(matrix && fs){
- object.matrix = dojox.gfx.matrix.multiply(matrix, {dy: dojox.gfx.normalizedLength(fs.size) * 0.35});
- }
- };
-
- var attachPath = function(object){
- // summary: builds a path shape from a Node.
- // object: dojox.gfx.Shape: an VML shape
- var shape = object.shape = dojo.clone(dojox.gfx.defaultPath),
- p = rawNode.path.v.match(dojox.gfx.pathVmlRegExp),
- t = [], skip = false, map = dojox.gfx.Path._pathVmlToSvgMap;
- for(var i = 0; i < p.length; ++p){
- var s = p[i];
- if(s in map) {
- skip = false;
- t.push(map[s]);
- } else if(!skip){
- var n = parseInt(s);
- if(isNaN(n)){
- skip = true;
- }else{
- t.push(n);
- }
- }
- }
- var l = t.length;
- if(l >= 4 && t[l - 1] == "" && t[l - 2] == 0 && t[l - 3] == 0 && t[l - 4] == "l"){
- t.splice(l - 4, 4);
- }
- if(l){
- shape.path = t.join(" ");
- }
- };
+dojo.require("dojox.gfx.vml");
+dojo.experimental("dojox.gfx.vml_attach");
+(function(){
+dojox.gfx.attachNode=function(_1){
+if(!_1){
+return null;
+}
+var s=null;
+switch(_1.tagName.toLowerCase()){
+case dojox.gfx.Rect.nodeType:
+s=new dojox.gfx.Rect(_1);
+_2(s);
+break;
+case dojox.gfx.Ellipse.nodeType:
+if(_1.style.width==_1.style.height){
+s=new dojox.gfx.Circle(_1);
+_3(s);
+}else{
+s=new dojox.gfx.Ellipse(_1);
+_4(s);
+}
+break;
+case dojox.gfx.Path.nodeType:
+switch(_1.getAttribute("dojoGfxType")){
+case "line":
+s=new dojox.gfx.Line(_1);
+_5(s);
+break;
+case "polyline":
+s=new dojox.gfx.Polyline(_1);
+_6(s);
+break;
+case "path":
+s=new dojox.gfx.Path(_1);
+_7(s);
+break;
+case "text":
+s=new dojox.gfx.Text(_1);
+_8(s);
+_9(s);
+_a(s);
+break;
+case "textpath":
+s=new dojox.gfx.TextPath(_1);
+_7(s);
+_8(s);
+_9(s);
+break;
+}
+break;
+case dojox.gfx.Image.nodeType:
+switch(_1.getAttribute("dojoGfxType")){
+case "image":
+s=new dojox.gfx.Image(_1);
+_b(s);
+_c(s);
+break;
+}
+break;
+default:
+return null;
+}
+if(!(s instanceof dojox.gfx.Image)){
+_d(s);
+_e(s);
+if(!(s instanceof dojox.gfx.Text)){
+_f(s);
+}
+}
+return s;
+};
+dojox.gfx.attachSurface=function(_10){
+var s=new dojox.gfx.Surface();
+s.clipNode=_10;
+var r=s.rawNode=_10.firstChild;
+var b=r.firstChild;
+if(!b||b.tagName!="rect"){
+return null;
+}
+s.bgNode=r;
+return s;
+};
+var _d=function(_11){
+var _12=null,r=_11.rawNode,fo=r.fill;
+if(fo.on&&fo.type=="gradient"){
+var _12=dojo.clone(dojox.gfx.defaultLinearGradient),rad=dojox.gfx.matrix._degToRad(fo.angle);
+_12.x2=Math.cos(rad);
+_12.y2=Math.sin(rad);
+_12.colors=[];
+var _13=fo.colors.value.split(";");
+for(var i=0;i<_13.length;++i){
+var t=_13[i].match(/\S+/g);
+if(!t||t.length!=2){
+continue;
+}
+_12.colors.push({offset:dojox.gfx.vml._parseFloat(t[0]),color:new dojo.Color(t[1])});
+}
+}else{
+if(fo.on&&fo.type=="gradientradial"){
+var _12=dojo.clone(dojox.gfx.defaultRadialGradient),w=parseFloat(r.style.width),h=parseFloat(r.style.height);
+_12.cx=isNaN(w)?0:fo.focusposition.x*w;
+_12.cy=isNaN(h)?0:fo.focusposition.y*h;
+_12.r=isNaN(w)?1:w/2;
+_12.colors=[];
+var _13=fo.colors.value.split(";");
+for(var i=_13.length-1;i>=0;--i){
+var t=_13[i].match(/\S+/g);
+if(!t||t.length!=2){
+continue;
+}
+_12.colors.push({offset:dojox.gfx.vml._parseFloat(t[0]),color:new dojo.Color(t[1])});
+}
+}else{
+if(fo.on&&fo.type=="tile"){
+var _12=dojo.clone(dojox.gfx.defaultPattern);
+_12.width=dojox.gfx.pt2px(fo.size.x);
+_12.height=dojox.gfx.pt2px(fo.size.y);
+_12.x=fo.origin.x*_12.width;
+_12.y=fo.origin.y*_12.height;
+_12.src=fo.src;
+}else{
+if(fo.on&&r.fillcolor){
+_12=new dojo.Color(r.fillcolor+"");
+_12.a=fo.opacity;
+}
+}
+}
+}
+_11.fillStyle=_12;
+};
+var _e=function(_14){
+var r=_14.rawNode;
+if(!r.stroked){
+_14.strokeStyle=null;
+return;
+}
+var _15=_14.strokeStyle=dojo.clone(dojox.gfx.defaultStroke),rs=r.stroke;
+_15.color=new dojo.Color(r.strokecolor.value);
+_15.width=dojox.gfx.normalizedLength(r.strokeweight+"");
+_15.color.a=rs.opacity;
+_15.cap=this._translate(this._capMapReversed,rs.endcap);
+_15.join=rs.joinstyle=="miter"?rs.miterlimit:rs.joinstyle;
+_15.style=rs.dashstyle;
+};
+var _f=function(_16){
+var s=_16.rawNode.skew,sm=s.matrix,so=s.offset;
+_16.matrix=dojox.gfx.matrix.normalize({xx:sm.xtox,xy:sm.ytox,yx:sm.xtoy,yy:sm.ytoy,dx:dojox.gfx.pt2px(so.x),dy:dojox.gfx.pt2px(so.y)});
+};
+var _17=function(_18){
+_18.bgNode=_18.rawNode.firstChild;
+};
+var _2=function(_19){
+var r=_19.rawNode,_1a=r.outerHTML.match(/arcsize = \"(\d*\.?\d+[%f]?)\"/)[1],_1b=r.style,_1c=parseFloat(_1b.width),_1d=parseFloat(_1b.height);
+_1a=(_1a.indexOf("%")>=0)?parseFloat(_1a)/100:dojox.gfx.vml._parseFloat(_1a);
+_19.shape=dojox.gfx.makeParameters(dojox.gfx.defaultRect,{x:parseInt(_1b.left),y:parseInt(_1b.top),width:_1c,height:_1d,r:Math.min(_1c,_1d)*_1a});
+};
+var _4=function(_1e){
+var _1f=_1e.rawNode.style,rx=parseInt(_1f.width)/2,ry=parseInt(_1f.height)/2;
+_1e.shape=dojox.gfx.makeParameters(dojox.gfx.defaultEllipse,{cx:parseInt(_1f.left)+rx,cy:parseInt(_1f.top)+ry,rx:rx,ry:ry});
+};
+var _3=function(_20){
+var _21=_20.rawNode.style,r=parseInt(_21.width)/2;
+_20.shape=dojox.gfx.makeParameters(dojox.gfx.defaultCircle,{cx:parseInt(_21.left)+r,cy:parseInt(_21.top)+r,r:r});
+};
+var _5=function(_22){
+var _23=_22.shape=dojo.clone(dojox.gfx.defaultLine),p=_22.rawNode.path.v.match(dojox.gfx.pathVmlRegExp);
+do{
+if(p.length<7||p[0]!="m"||p[3]!="l"||p[6]!="e"){
+break;
+}
+_23.x1=parseInt(p[1]);
+_23.y1=parseInt(p[2]);
+_23.x2=parseInt(p[4]);
+_23.y2=parseInt(p[5]);
+}while(false);
+};
+var _6=function(_24){
+var _25=_24.shape=dojo.clone(dojox.gfx.defaultPolyline),p=_24.rawNode.path.v.match(dojox.gfx.pathVmlRegExp);
+do{
+if(p.length<3||p[0]!="m"){
+break;
+}
+var x=parseInt(p[0]),y=parseInt(p[1]);
+if(isNaN(x)||isNaN(y)){
+break;
+}
+_25.points.push({x:x,y:y});
+if(p.length<6||p[3]!="l"){
+break;
+}
+for(var i=4;i<p.length;i+=2){
+x=parseInt(p[i]);
+y=parseInt(p[i+1]);
+if(isNaN(x)||isNaN(y)){
+break;
+}
+_25.points.push({x:x,y:y});
+}
+}while(false);
+};
+var _b=function(_26){
+_26.shape=dojo.clone(dojox.gfx.defaultImage);
+_26.shape.src=_26.rawNode.firstChild.src;
+};
+var _c=function(_27){
+var m=_27.rawNode.filters["DXImageTransform.Microsoft.Matrix"];
+_27.matrix=dojox.gfx.matrix.normalize({xx:m.M11,xy:m.M12,yx:m.M21,yy:m.M22,dx:m.Dx,dy:m.Dy});
+};
+var _8=function(_28){
+var _29=_28.shape=dojo.clone(dojox.gfx.defaultText),r=_28.rawNode,p=r.path.v.match(dojox.gfx.pathVmlRegExp);
+do{
+if(!p||p.length!=7){
+break;
+}
+var c=r.childNodes,i=0;
+for(;i<c.length&&c[i].tagName!="textpath";++i){
+}
+if(i>=c.length){
+break;
+}
+var s=c[i].style;
+_29.text=c[i].string;
+switch(s["v-text-align"]){
+case "left":
+_29.x=parseInt(p[1]);
+_29.align="start";
+break;
+case "center":
+_29.x=(parseInt(p[1])+parseInt(p[4]))/2;
+_29.align="middle";
+break;
+case "right":
+_29.x=parseInt(p[4]);
+_29.align="end";
+break;
+}
+_29.y=parseInt(p[2]);
+_29.decoration=s["text-decoration"];
+_29.rotated=s["v-rotate-letters"].toLowerCase() in dojox.gfx.vml._bool;
+_29.kerning=s["v-text-kern"].toLowerCase() in dojox.gfx.vml._bool;
+return;
+}while(false);
+_28.shape=null;
+};
+var _9=function(_2a){
+var _2b=_2a.fontStyle=dojo.clone(dojox.gfx.defaultFont),c=_2a.rawNode.childNodes,i=0;
+for(;i<c.length&&c[i].tagName=="textpath";++i){
+}
+if(i>=c.length){
+_2a.fontStyle=null;
+return;
+}
+var s=c[i].style;
+_2b.style=s.fontstyle;
+_2b.variant=s.fontvariant;
+_2b.weight=s.fontweight;
+_2b.size=s.fontsize;
+_2b.family=s.fontfamily;
+};
+var _a=function(_2c){
+_f(_2c);
+var _2d=_2c.matrix,fs=_2c.fontStyle;
+if(_2d&&fs){
+_2c.matrix=dojox.gfx.matrix.multiply(_2d,{dy:dojox.gfx.normalizedLength(fs.size)*0.35});
+}
+};
+var _7=function(_2e){
+var _2f=_2e.shape=dojo.clone(dojox.gfx.defaultPath),p=_2e.rawNode.path.v.match(dojox.gfx.pathVmlRegExp),t=[],_30=false,map=dojox.gfx.Path._pathVmlToSvgMap;
+for(var i=0;i<p.length;++p){
+var s=p[i];
+if(s in map){
+_30=false;
+t.push(map[s]);
+}else{
+if(!_30){
+var n=parseInt(s);
+if(isNaN(n)){
+_30=true;
+}else{
+t.push(n);
+}
+}
+}
+}
+var l=t.length;
+if(l>=4&&t[l-1]==""&&t[l-2]==0&&t[l-3]==0&&t[l-4]=="l"){
+t.splice(l-4,4);
+}
+if(l){
+_2f.path=t.join(" ");
+}
+};
})();
diff --git a/js/dojo/dojox/gfx3d.js b/js/dojo/dojox/gfx3d.js
--- a/js/dojo/dojox/gfx3d.js
+++ b/js/dojo/dojox/gfx3d.js
@@ -1,11 +1,14 @@
-if(!dojo._hasResource["dojox.gfx3d"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.gfx3d"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.gfx3d"]){
+dojo._hasResource["dojox.gfx3d"]=true;
dojo.provide("dojox.gfx3d");
-
dojo.require("dojox.gfx3d.matrix");
dojo.require("dojox.gfx3d._base");
dojo.require("dojox.gfx3d.object");
-
-
-
}
diff --git a/js/dojo/dojox/gfx3d/_base.js b/js/dojo/dojox/gfx3d/_base.js
--- a/js/dojo/dojox/gfx3d/_base.js
+++ b/js/dojo/dojox/gfx3d/_base.js
@@ -1,19 +1,12 @@
-if(!dojo._hasResource["dojox.gfx3d._base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.gfx3d._base"] = true;
-dojo.provide("dojox.gfx3d._base");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.mixin(dojox.gfx3d, {
- // summary: defines constants, prototypes, and utility functions
-
- // default objects, which are used to fill in missing parameters
- defaultEdges: {type: "edges", style: null, points: []},
- defaultTriangles: {type: "triangles", style: null, points: []},
- defaultQuads: {type: "quads", style: null, points: []},
- defaultOrbit: {type: "orbit", center: {x: 0, y: 0, z: 0}, radius: 50},
- defaultPath3d: {type: "path3d", path: []},
- defaultPolygon: {type: "polygon", path: []},
- defaultCube: {type: "cube", bottom: {x: 0, y: 0, z: 0}, top: {x: 100, y: 100, z: 100}},
- defaultCylinder: {type: "cylinder", center: /* center of bottom */ {x: 0, y: 0, z: 0}, height: 100, radius: 50}
-});
+if(!dojo._hasResource["dojox.gfx3d._base"]){
+dojo._hasResource["dojox.gfx3d._base"]=true;
+dojo.provide("dojox.gfx3d._base");
+dojo.mixin(dojox.gfx3d,{defaultEdges:{type:"edges",style:null,points:[]},defaultTriangles:{type:"triangles",style:null,points:[]},defaultQuads:{type:"quads",style:null,points:[]},defaultOrbit:{type:"orbit",center:{x:0,y:0,z:0},radius:50},defaultPath3d:{type:"path3d",path:[]},defaultPolygon:{type:"polygon",path:[]},defaultCube:{type:"cube",bottom:{x:0,y:0,z:0},top:{x:100,y:100,z:100}},defaultCylinder:{type:"cylinder",center:{x:0,y:0,z:0},height:100,radius:50}});
}
diff --git a/js/dojo/dojox/gfx3d/gradient.js b/js/dojo/dojox/gfx3d/gradient.js
--- a/js/dojo/dojox/gfx3d/gradient.js
+++ b/js/dojo/dojox/gfx3d/gradient.js
@@ -1,41 +1,28 @@
-if(!dojo._hasResource["dojox.gfx3d.gradient"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.gfx3d.gradient"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.gfx3d.gradient"]){
+dojo._hasResource["dojox.gfx3d.gradient"]=true;
dojo.provide("dojox.gfx3d.gradient");
-
dojo.require("dojox.gfx3d.vector");
dojo.require("dojox.gfx3d.matrix");
-
(function(){
- var dist = function(a, b){ return Math.sqrt(Math.pow(b.x - a.x, 2) + Math.pow(b.y - a.y, 2)); };
- var N = 32;
-
- dojox.gfx3d.gradient = function(model, material, center, radius, from, to, matrix){
- // summary: calculate a cylindrical gradient
- // model: dojox.gfx3d.lighting.Model: color model
- // material: Object: defines visual properties
- // center: Object: center of the cylinder's bottom
- // radius: Number: radius of the cylinder
- // from: Number: from position in radians
- // to: Number: from position in radians
- // matrix: dojox.gfx3d.Matrix3D: the cumulative transformation matrix
- // tolerance: Number: tolerable diffirence in colors between gradient steps
-
- var m = dojox.gfx3d.matrix, v = dojox.gfx3d.vector, mx = m.normalize(matrix),
- f = m.multiplyPoint(mx, radius * Math.cos(from) + center.x, radius * Math.sin(from) + center.y, center.z),
- t = m.multiplyPoint(mx, radius * Math.cos(to) + center.x, radius * Math.sin(to) + center.y, center.z),
- c = m.multiplyPoint(mx, center.x, center.y, center.z), step = (to - from) / N, r = dist(f, t) / 2,
- mod = model[material.type], fin = material.finish, pmt = material.color,
- colors = [{offset: 0, color: mod.call(model, v.substract(f, c), fin, pmt)}];
-
- for(var a = from + step; a < to; a += step){
- var p = m.multiplyPoint(mx, radius * Math.cos(a) + center.x, radius * Math.sin(a) + center.y, center.z),
- df = dist(f, p), dt = dist(t, p);
- colors.push({offset: df / (df + dt), color: mod.call(model, v.substract(p, c), fin, pmt)});
- }
- colors.push({offset: 1, color: mod.call(model, v.substract(t, c), fin, pmt)});
-
- return {type: "linear", x1: 0, y1: -r, x2: 0, y2: r, colors: colors};
- };
+var _1=function(a,b){
+return Math.sqrt(Math.pow(b.x-a.x,2)+Math.pow(b.y-a.y,2));
+};
+var N=32;
+dojox.gfx3d.gradient=function(_2,_3,_4,_5,_6,to,_7){
+var m=dojox.gfx3d.matrix,v=dojox.gfx3d.vector,mx=m.normalize(_7),f=m.multiplyPoint(mx,_5*Math.cos(_6)+_4.x,_5*Math.sin(_6)+_4.y,_4.z),t=m.multiplyPoint(mx,_5*Math.cos(to)+_4.x,_5*Math.sin(to)+_4.y,_4.z),c=m.multiplyPoint(mx,_4.x,_4.y,_4.z),_8=(to-_6)/N,r=_1(f,t)/2,_9=_2[_3.type],_a=_3.finish,_b=_3.color,_c=[{offset:0,color:_9.call(_2,v.substract(f,c),_a,_b)}];
+for(var a=_6+_8;a<to;a+=_8){
+var p=m.multiplyPoint(mx,_5*Math.cos(a)+_4.x,_5*Math.sin(a)+_4.y,_4.z),df=_1(f,p),dt=_1(t,p);
+_c.push({offset:df/(df+dt),color:_9.call(_2,v.substract(p,c),_a,_b)});
+}
+_c.push({offset:1,color:_9.call(_2,v.substract(t,c),_a,_b)});
+return {type:"linear",x1:0,y1:-r,x2:0,y2:r,colors:_c};
+};
})();
-
}
diff --git a/js/dojo/dojox/gfx3d/lighting.js b/js/dojo/dojox/gfx3d/lighting.js
--- a/js/dojo/dojox/gfx3d/lighting.js
+++ b/js/dojo/dojox/gfx3d/lighting.js
@@ -1,241 +1,158 @@
-if(!dojo._hasResource["dojox.gfx3d.lighting"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.gfx3d.lighting"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.gfx3d.lighting"]){
+dojo._hasResource["dojox.gfx3d.lighting"]=true;
dojo.provide("dojox.gfx3d.lighting");
dojo.require("dojox.gfx._base");
-
(function(){
- var lite = dojox.gfx3d.lighting;
-
- dojo.mixin(dojox.gfx3d.lighting, {
- // color utilities
- black: function(){
- return {r: 0, g: 0, b: 0, a: 1};
- },
- white: function(){
- return {r: 1, g: 1, b: 1, a: 1};
- },
- toStdColor: function(c){
- c = dojox.gfx.normalizeColor(c);
- return {r: c.r / 255, g: c.g / 255, b: c.b / 255, a: c.a};
- },
- fromStdColor: function(c){
- return new dojo.Color([Math.round(255 * c.r), Math.round(255 * c.g), Math.round(255 * c.b), c.a]);
- },
- scaleColor: function(s, c){
- return {r: s * c.r, g: s * c.g, b: s * c.b, a: s * c.a};
- },
- addColor: function(a, b){
- return {r: a.r + b.r, g: a.g + b.g, b: a.b + b.b, a: a.a + b.a};
- },
- multiplyColor: function(a, b){
- return {r: a.r * b.r, g: a.g * b.g, b: a.b * b.b, a: a.a * b.a};
- },
- saturateColor: function(c){
- return {
- r: c.r < 0 ? 0 : c.r > 1 ? 1 : c.r,
- g: c.g < 0 ? 0 : c.g > 1 ? 1 : c.g,
- b: c.b < 0 ? 0 : c.b > 1 ? 1 : c.b,
- a: c.a < 0 ? 0 : c.a > 1 ? 1 : c.a
- };
- },
- mixColor: function(c1, c2, s){
- return lite.addColor(lite.scaleColor(s, c1), lite.scaleColor(1 - s, c2));
- },
- diff2Color: function(c1, c2){
- var r = c1.r - c2.r;
- var g = c1.g - c2.g;
- var b = c1.b - c2.b;
- var a = c1.a - c2.a;
- return r * r + g * g + b * b + a * a;
- },
- length2Color: function(c){
- return c.r * c.r + c.g * c.g + c.b * c.b + c.a * c.a;
- },
-
- // vector utilities
- //TODO: move vector utilities from this file to vector.js
- dot: function(a, b){
- return a.x * b.x + a.y * b.y + a.z * b.z;
- },
- scale: function(s, v){
- return {x: s * v.x, y: s * v.y, z: s * v.z};
- },
- add: function(a, b){
- return {x: a.x + b.x, y: a.y + b.y, z: a.z + b.z};
- },
- saturate: function(v){
- return Math.min(Math.max(v, 0), 1);
- },
- length: function(v){
- return Math.sqrt(dojox.gfx3d.lighting.dot(v, v));
- },
- normalize: function(v){
- return lite.scale(1 / lite.length(v), v);
- },
- faceforward: function(n, i){
- var p = dojox.gfx3d.lighting;
- var s = p.dot(i, n) < 0 ? 1 : -1;
- return p.scale(s, n);
- },
- reflect: function(i, n){
- var p = dojox.gfx3d.lighting;
- return p.add(i, p.scale(-2 * p.dot(i, n), n));
- },
-
- // lighting utilities
- diffuse: function(normal, lights){
- var c = lite.black();
- for(var i = 0; i < lights.length; ++i){
- var l = lights[i],
- d = lite.dot(lite.normalize(l.direction), normal);
- c = lite.addColor(c, lite.scaleColor(d, l.color));
- }
- return lite.saturateColor(c);
- },
- specular: function(normal, v, roughness, lights){
- var c = lite.black();
- for(var i = 0; i < lights.length; ++i){
- var l = lights[i],
- h = lite.normalize(lite.add(lite.normalize(l.direction), v)),
- s = Math.pow(Math.max(0, lite.dot(normal, h)), 1 / roughness);
- c = lite.addColor(c, lite.scaleColor(s, l.color));
- }
- return lite.saturateColor(c);
- },
- phong: function(normal, v, size, lights){
- normal = lite.normalize(normal);
- var c = lite.black();
- for(var i = 0; i < lights.length; ++i){
- var l = lights[i],
- r = lite.reflect(lite.scale(-1, lite.normalize(v)), normal),
- s = Math.pow(Math.max(0, lite.dot(r, lite.normalize(l.direction))), size);
- c = lite.addColor(c, lite.scaleColor(s, l.color));
- }
- return lite.saturateColor(c);
- }
- });
-
- // this lighting model is derived from RenderMan Interface Specification Version 3.2
-
- dojo.declare("dojox.gfx3d.lighting.Model", null, {
- constructor: function(incident, lights, ambient, specular){
- this.incident = lite.normalize(incident);
- this.lights = [];
- for(var i = 0; i < lights.length; ++i){
- var l = lights[i];
- this.lights.push({direction: lite.normalize(l.direction), color: lite.toStdColor(l.color)});
- }
- this.ambient = lite.toStdColor(ambient.color ? ambient.color : "white");
- this.ambient = lite.scaleColor(ambient.intensity, this.ambient);
- this.ambient = lite.scaleColor(this.ambient.a, this.ambient);
- this.ambient.a = 1;
- this.specular = lite.toStdColor(specular ? specular : "white");
- this.specular = lite.scaleColor(this.specular.a, this.specular);
- this.specular.a = 1;
- this.npr_cool = {r: 0, g: 0, b: 0.4, a: 1};
- this.npr_warm = {r: 0.4, g: 0.4, b: 0.2, a: 1};
- this.npr_alpha = 0.2;
- this.npr_beta = 0.6;
- this.npr_scale = 0.6;
- },
- constant: function(normal, finish, pigment){
- pigment = lite.toStdColor(pigment);
- var alpha = pigment.a, color = lite.scaleColor(alpha, pigment);
- color.a = alpha;
- return lite.fromStdColor(lite.saturateColor(color));
- },
- matte: function(normal, finish, pigment){
- if(typeof finish == "string"){ finish = lite.finish[finish]; }
- pigment = lite.toStdColor(pigment);
- normal = lite.faceforward(lite.normalize(normal), this.incident);
- var ambient = lite.scaleColor(finish.Ka, this.ambient),
- shadow = lite.saturate(-4 * lite.dot(normal, this.incident)),
- diffuse = lite.scaleColor(shadow * finish.Kd, lite.diffuse(normal, this.lights)),
- color = lite.scaleColor(pigment.a, lite.multiplyColor(pigment, lite.addColor(ambient, diffuse)));
- color.a = pigment.a;
- return lite.fromStdColor(lite.saturateColor(color));
- },
- metal: function(normal, finish, pigment){
- if(typeof finish == "string"){ finish = lite.finish[finish]; }
- pigment = lite.toStdColor(pigment);
- normal = lite.faceforward(lite.normalize(normal), this.incident);
- var v = lite.scale(-1, this.incident), specular, color,
- ambient = lite.scaleColor(finish.Ka, this.ambient),
- shadow = lite.saturate(-4 * lite.dot(normal, this.incident));
- if("phong" in finish){
- specular = lite.scaleColor(shadow * finish.Ks * finish.phong, lite.phong(normal, v, finish.phong_size, this.lights));
- }else{
- specular = lite.scaleColor(shadow * finish.Ks, lite.specular(normal, v, finish.roughness, this.lights));
- }
- color = lite.scaleColor(pigment.a, lite.addColor(lite.multiplyColor(pigment, ambient), lite.multiplyColor(this.specular, specular)));
- color.a = pigment.a;
- return lite.fromStdColor(lite.saturateColor(color));
- },
- plastic: function(normal, finish, pigment){
- if(typeof finish == "string"){ finish = lite.finish[finish]; }
- pigment = lite.toStdColor(pigment);
- normal = lite.faceforward(lite.normalize(normal), this.incident);
- var v = lite.scale(-1, this.incident), specular, color,
- ambient = lite.scaleColor(finish.Ka, this.ambient),
- shadow = lite.saturate(-4 * lite.dot(normal, this.incident)),
- diffuse = lite.scaleColor(shadow * finish.Kd, lite.diffuse(normal, this.lights));
- if("phong" in finish){
- specular = lite.scaleColor(shadow * finish.Ks * finish.phong, lite.phong(normal, v, finish.phong_size, this.lights));
- }else{
- specular = lite.scaleColor(shadow * finish.Ks, lite.specular(normal, v, finish.roughness, this.lights));
- }
- color = lite.scaleColor(pigment.a, lite.addColor(lite.multiplyColor(pigment, lite.addColor(ambient, diffuse)), lite.multiplyColor(this.specular, specular)));
- color.a = pigment.a;
- return lite.fromStdColor(lite.saturateColor(color));
- },
- npr: function(normal, finish, pigment){
- if(typeof finish == "string"){ finish = lite.finish[finish]; }
- pigment = lite.toStdColor(pigment);
- normal = lite.faceforward(lite.normalize(normal), this.incident);
- var ambient = lite.scaleColor(finish.Ka, this.ambient),
- shadow = lite.saturate(-4 * lite.dot(normal, this.incident)),
- diffuse = lite.scaleColor(shadow * finish.Kd, lite.diffuse(normal, this.lights)),
- color = lite.scaleColor(pigment.a, lite.multiplyColor(pigment, lite.addColor(ambient, diffuse))),
- cool = lite.addColor(this.npr_cool, lite.scaleColor(this.npr_alpha, color)),
- warm = lite.addColor(this.npr_warm, lite.scaleColor(this.npr_beta, color)),
- d = (1 + lite.dot(this.incident, normal)) / 2,
- color = lite.scaleColor(this.npr_scale, lite.addColor(color, lite.mixColor(cool, warm, d)));
- color.a = pigment.a;
- return lite.fromStdColor(lite.saturateColor(color));
- }
- });
+var _1=dojox.gfx3d.lighting;
+dojo.mixin(dojox.gfx3d.lighting,{black:function(){
+return {r:0,g:0,b:0,a:1};
+},white:function(){
+return {r:1,g:1,b:1,a:1};
+},toStdColor:function(c){
+c=dojox.gfx.normalizeColor(c);
+return {r:c.r/255,g:c.g/255,b:c.b/255,a:c.a};
+},fromStdColor:function(c){
+return new dojo.Color([Math.round(255*c.r),Math.round(255*c.g),Math.round(255*c.b),c.a]);
+},scaleColor:function(s,c){
+return {r:s*c.r,g:s*c.g,b:s*c.b,a:s*c.a};
+},addColor:function(a,b){
+return {r:a.r+b.r,g:a.g+b.g,b:a.b+b.b,a:a.a+b.a};
+},multiplyColor:function(a,b){
+return {r:a.r*b.r,g:a.g*b.g,b:a.b*b.b,a:a.a*b.a};
+},saturateColor:function(c){
+return {r:c.r<0?0:c.r>1?1:c.r,g:c.g<0?0:c.g>1?1:c.g,b:c.b<0?0:c.b>1?1:c.b,a:c.a<0?0:c.a>1?1:c.a};
+},mixColor:function(c1,c2,s){
+return _1.addColor(_1.scaleColor(s,c1),_1.scaleColor(1-s,c2));
+},diff2Color:function(c1,c2){
+var r=c1.r-c2.r;
+var g=c1.g-c2.g;
+var b=c1.b-c2.b;
+var a=c1.a-c2.a;
+return r*r+g*g+b*b+a*a;
+},length2Color:function(c){
+return c.r*c.r+c.g*c.g+c.b*c.b+c.a*c.a;
+},dot:function(a,b){
+return a.x*b.x+a.y*b.y+a.z*b.z;
+},scale:function(s,v){
+return {x:s*v.x,y:s*v.y,z:s*v.z};
+},add:function(a,b){
+return {x:a.x+b.x,y:a.y+b.y,z:a.z+b.z};
+},saturate:function(v){
+return Math.min(Math.max(v,0),1);
+},length:function(v){
+return Math.sqrt(dojox.gfx3d.lighting.dot(v,v));
+},normalize:function(v){
+return _1.scale(1/_1.length(v),v);
+},faceforward:function(n,i){
+var p=dojox.gfx3d.lighting;
+var s=p.dot(i,n)<0?1:-1;
+return p.scale(s,n);
+},reflect:function(i,n){
+var p=dojox.gfx3d.lighting;
+return p.add(i,p.scale(-2*p.dot(i,n),n));
+},diffuse:function(_2,_3){
+var c=_1.black();
+for(var i=0;i<_3.length;++i){
+var l=_3[i],d=_1.dot(_1.normalize(l.direction),_2);
+c=_1.addColor(c,_1.scaleColor(d,l.color));
+}
+return _1.saturateColor(c);
+},specular:function(_4,v,_5,_6){
+var c=_1.black();
+for(var i=0;i<_6.length;++i){
+var l=_6[i],h=_1.normalize(_1.add(_1.normalize(l.direction),v)),s=Math.pow(Math.max(0,_1.dot(_4,h)),1/_5);
+c=_1.addColor(c,_1.scaleColor(s,l.color));
+}
+return _1.saturateColor(c);
+},phong:function(_7,v,_8,_9){
+_7=_1.normalize(_7);
+var c=_1.black();
+for(var i=0;i<_9.length;++i){
+var l=_9[i],r=_1.reflect(_1.scale(-1,_1.normalize(v)),_7),s=Math.pow(Math.max(0,_1.dot(r,_1.normalize(l.direction))),_8);
+c=_1.addColor(c,_1.scaleColor(s,l.color));
+}
+return _1.saturateColor(c);
+}});
+dojo.declare("dojox.gfx3d.lighting.Model",null,{constructor:function(_a,_b,_c,_d){
+this.incident=_1.normalize(_a);
+this.lights=[];
+for(var i=0;i<_b.length;++i){
+var l=_b[i];
+this.lights.push({direction:_1.normalize(l.direction),color:_1.toStdColor(l.color)});
+}
+this.ambient=_1.toStdColor(_c.color?_c.color:"white");
+this.ambient=_1.scaleColor(_c.intensity,this.ambient);
+this.ambient=_1.scaleColor(this.ambient.a,this.ambient);
+this.ambient.a=1;
+this.specular=_1.toStdColor(_d?_d:"white");
+this.specular=_1.scaleColor(this.specular.a,this.specular);
+this.specular.a=1;
+this.npr_cool={r:0,g:0,b:0.4,a:1};
+this.npr_warm={r:0.4,g:0.4,b:0.2,a:1};
+this.npr_alpha=0.2;
+this.npr_beta=0.6;
+this.npr_scale=0.6;
+},constant:function(_e,_f,_10){
+_10=_1.toStdColor(_10);
+var _11=_10.a,_12=_1.scaleColor(_11,_10);
+_12.a=_11;
+return _1.fromStdColor(_1.saturateColor(_12));
+},matte:function(_13,_14,_15){
+if(typeof _14=="string"){
+_14=_1.finish[_14];
+}
+_15=_1.toStdColor(_15);
+_13=_1.faceforward(_1.normalize(_13),this.incident);
+var _16=_1.scaleColor(_14.Ka,this.ambient),_17=_1.saturate(-4*_1.dot(_13,this.incident)),_18=_1.scaleColor(_17*_14.Kd,_1.diffuse(_13,this.lights)),_19=_1.scaleColor(_15.a,_1.multiplyColor(_15,_1.addColor(_16,_18)));
+_19.a=_15.a;
+return _1.fromStdColor(_1.saturateColor(_19));
+},metal:function(_1a,_1b,_1c){
+if(typeof _1b=="string"){
+_1b=_1.finish[_1b];
+}
+_1c=_1.toStdColor(_1c);
+_1a=_1.faceforward(_1.normalize(_1a),this.incident);
+var v=_1.scale(-1,this.incident),_1d,_1e,_1f=_1.scaleColor(_1b.Ka,this.ambient),_20=_1.saturate(-4*_1.dot(_1a,this.incident));
+if("phong" in _1b){
+_1d=_1.scaleColor(_20*_1b.Ks*_1b.phong,_1.phong(_1a,v,_1b.phong_size,this.lights));
+}else{
+_1d=_1.scaleColor(_20*_1b.Ks,_1.specular(_1a,v,_1b.roughness,this.lights));
+}
+_1e=_1.scaleColor(_1c.a,_1.addColor(_1.multiplyColor(_1c,_1f),_1.multiplyColor(this.specular,_1d)));
+_1e.a=_1c.a;
+return _1.fromStdColor(_1.saturateColor(_1e));
+},plastic:function(_21,_22,_23){
+if(typeof _22=="string"){
+_22=_1.finish[_22];
+}
+_23=_1.toStdColor(_23);
+_21=_1.faceforward(_1.normalize(_21),this.incident);
+var v=_1.scale(-1,this.incident),_24,_25,_26=_1.scaleColor(_22.Ka,this.ambient),_27=_1.saturate(-4*_1.dot(_21,this.incident)),_28=_1.scaleColor(_27*_22.Kd,_1.diffuse(_21,this.lights));
+if("phong" in _22){
+_24=_1.scaleColor(_27*_22.Ks*_22.phong,_1.phong(_21,v,_22.phong_size,this.lights));
+}else{
+_24=_1.scaleColor(_27*_22.Ks,_1.specular(_21,v,_22.roughness,this.lights));
+}
+_25=_1.scaleColor(_23.a,_1.addColor(_1.multiplyColor(_23,_1.addColor(_26,_28)),_1.multiplyColor(this.specular,_24)));
+_25.a=_23.a;
+return _1.fromStdColor(_1.saturateColor(_25));
+},npr:function(_29,_2a,_2b){
+if(typeof _2a=="string"){
+_2a=_1.finish[_2a];
+}
+_2b=_1.toStdColor(_2b);
+_29=_1.faceforward(_1.normalize(_29),this.incident);
+var _2c=_1.scaleColor(_2a.Ka,this.ambient),_2d=_1.saturate(-4*_1.dot(_29,this.incident)),_2e=_1.scaleColor(_2d*_2a.Kd,_1.diffuse(_29,this.lights)),_2f=_1.scaleColor(_2b.a,_1.multiplyColor(_2b,_1.addColor(_2c,_2e))),_30=_1.addColor(this.npr_cool,_1.scaleColor(this.npr_alpha,_2f)),_31=_1.addColor(this.npr_warm,_1.scaleColor(this.npr_beta,_2f)),d=(1+_1.dot(this.incident,_29))/2,_2f=_1.scaleColor(this.npr_scale,_1.addColor(_2f,_1.mixColor(_30,_31,d)));
+_2f.a=_2b.a;
+return _1.fromStdColor(_1.saturateColor(_2f));
+}});
})();
-
-// POV-Ray basic finishes
-
-dojox.gfx3d.lighting.finish = {
-
- // Default
-
- defaults: {Ka: 0.1, Kd: 0.6, Ks: 0.0, roughness: 0.05},
-
- dull: {Ka: 0.1, Kd: 0.6, Ks: 0.5, roughness: 0.15},
- shiny: {Ka: 0.1, Kd: 0.6, Ks: 1.0, roughness: 0.001},
- glossy: {Ka: 0.1, Kd: 0.6, Ks: 1.0, roughness: 0.0001},
-
- phong_dull: {Ka: 0.1, Kd: 0.6, Ks: 0.5, phong: 0.5, phong_size: 1},
- phong_shiny: {Ka: 0.1, Kd: 0.6, Ks: 1.0, phong: 1.0, phong_size: 200},
- phong_glossy: {Ka: 0.1, Kd: 0.6, Ks: 1.0, phong: 1.0, phong_size: 300},
-
- luminous: {Ka: 1.0, Kd: 0.0, Ks: 0.0, roughness: 0.05},
-
- // Metals
-
- // very soft and dull
- metalA: {Ka: 0.35, Kd: 0.3, Ks: 0.8, roughness: 1/20},
- // fairly soft and dull
- metalB: {Ka: 0.30, Kd: 0.4, Ks: 0.7, roughness: 1/60},
- // medium reflectivity, holds color well
- metalC: {Ka: 0.25, Kd: 0.5, Ks: 0.8, roughness: 1/80},
- // highly hard and polished, high reflectivity
- metalD: {Ka: 0.15, Kd: 0.6, Ks: 0.8, roughness: 1/100},
- // very highly polished and reflective
- metalE: {Ka: 0.10, Kd: 0.7, Ks: 0.8, roughness: 1/120}
-};
-
+dojox.gfx3d.lighting.finish={defaults:{Ka:0.1,Kd:0.6,Ks:0,roughness:0.05},dull:{Ka:0.1,Kd:0.6,Ks:0.5,roughness:0.15},shiny:{Ka:0.1,Kd:0.6,Ks:1,roughness:0.001},glossy:{Ka:0.1,Kd:0.6,Ks:1,roughness:0.0001},phong_dull:{Ka:0.1,Kd:0.6,Ks:0.5,phong:0.5,phong_size:1},phong_shiny:{Ka:0.1,Kd:0.6,Ks:1,phong:1,phong_size:200},phong_glossy:{Ka:0.1,Kd:0.6,Ks:1,phong:1,phong_size:300},luminous:{Ka:1,Kd:0,Ks:0,roughness:0.05},metalA:{Ka:0.35,Kd:0.3,Ks:0.8,roughness:1/20},metalB:{Ka:0.3,Kd:0.4,Ks:0.7,roughness:1/60},metalC:{Ka:0.25,Kd:0.5,Ks:0.8,roughness:1/80},metalD:{Ka:0.15,Kd:0.6,Ks:0.8,roughness:1/100},metalE:{Ka:0.1,Kd:0.7,Ks:0.8,roughness:1/120}};
}
diff --git a/js/dojo/dojox/gfx3d/matrix.js b/js/dojo/dojox/gfx3d/matrix.js
--- a/js/dojo/dojox/gfx3d/matrix.js
+++ b/js/dojo/dojox/gfx3d/matrix.js
@@ -1,339 +1,158 @@
-if(!dojo._hasResource["dojox.gfx3d.matrix"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.gfx3d.matrix"] = true;
-dojo.provide("dojox.gfx3d.matrix");
-
-// candidates for dojox.math:
-dojox.gfx3d.matrix._degToRad = function(degree){ return Math.PI * degree / 180; };
-dojox.gfx3d.matrix._radToDeg = function(radian){ return radian / Math.PI * 180; };
-
-dojox.gfx3d.matrix.Matrix3D = function(arg){
- // summary: a 3D matrix object
- // description: Normalizes a 3D matrix-like object. If arrays is passed,
- // all objects of the array are normalized and multiplied sequentially.
- // arg: Object
- // a 3D matrix-like object, a number, or an array of such objects
- if(arg){
- if(typeof arg == "number"){
- this.xx = this.yy = this.zz = arg;
- }else if(arg instanceof Array){
- if(arg.length > 0){
- var m = dojox.gfx3d.matrix.normalize(arg[0]);
- // combine matrices
- for(var i = 1; i < arg.length; ++i){
- var l = m;
- var r = dojox.gfx3d.matrix.normalize(arg[i]);
- m = new dojox.gfx3d.matrix.Matrix3D();
- m.xx = l.xx * r.xx + l.xy * r.yx + l.xz * r.zx;
- m.xy = l.xx * r.xy + l.xy * r.yy + l.xz * r.zy;
- m.xz = l.xx * r.xz + l.xy * r.yz + l.xz * r.zz;
- m.yx = l.yx * r.xx + l.yy * r.yx + l.yz * r.zx;
- m.yy = l.yx * r.xy + l.yy * r.yy + l.yz * r.zy;
- m.yz = l.yx * r.xz + l.yy * r.yz + l.yz * r.zz;
- m.zx = l.zx * r.xx + l.zy * r.yx + l.zz * r.zx;
- m.zy = l.zx * r.xy + l.zy * r.yy + l.zz * r.zy;
- m.zz = l.zx * r.xz + l.zy * r.yz + l.zz * r.zz;
- m.dx = l.xx * r.dx + l.xy * r.dy + l.xz * r.dz + l.dx;
- m.dy = l.yx * r.dx + l.yy * r.dy + l.yz * r.dz + l.dy;
- m.dz = l.zx * r.dx + l.zy * r.dy + l.zz * r.dz + l.dz;
- }
- dojo.mixin(this, m);
- }
- }else{
- dojo.mixin(this, arg);
- }
- }
-};
-
-// the default (identity) matrix, which is used to fill in missing values
-dojo.extend(dojox.gfx3d.matrix.Matrix3D, {xx: 1, xy: 0, xz: 0, yx: 0, yy: 1, yz: 0, zx: 0, zy: 0, zz: 1, dx: 0, dy: 0, dz: 0});
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.mixin(dojox.gfx3d.matrix, {
- // summary: class constants, and methods of dojox.gfx3d.matrix
-
- // matrix constants
-
- // identity: dojox.gfx3d.matrix.Matrix3D
- // an identity matrix constant: identity * (x, y, z) == (x, y, z)
- identity: new dojox.gfx3d.matrix.Matrix3D(),
-
- // matrix creators
-
- translate: function(a, b, c){
- // summary: forms a translation matrix
- // description: The resulting matrix is used to translate (move) points by specified offsets.
- // a: Number: an x coordinate value
- // b: Number: a y coordinate value
- // c: Number: a z coordinate value
- if(arguments.length > 1){
- return new dojox.gfx3d.matrix.Matrix3D({dx: a, dy: b, dz: c}); // dojox.gfx3d.matrix.Matrix3D
- }
- // branch
- // a: Object: a point-like object, which specifies offsets for 3 dimensions
- // b: null
- return new dojox.gfx3d.matrix.Matrix3D({dx: a.x, dy: a.y, dz: a.z}); // dojox.gfx3d.matrix.Matrix3D
- },
- scale: function(a, b, c){
- // summary: forms a scaling matrix
- // description: The resulting matrix is used to scale (magnify) points by specified offsets.
- // a: Number: a scaling factor used for the x coordinate
- // b: Number: a scaling factor used for the y coordinate
- // c: Number: a scaling factor used for the z coordinate
- if(arguments.length > 1){
- return new dojox.gfx3d.matrix.Matrix3D({xx: a, yy: b, zz: c}); // dojox.gfx3d.matrix.Matrix3D
- }
- if(typeof a == "number"){
- // branch
- // a: Number: a uniform scaling factor used for the all coordinates
- // b: null
- return new dojox.gfx3d.matrix.Matrix3D({xx: a, yy: a, zz: a}); // dojox.gfx3d.matrix.Matrix3D
- }
- // branch
- // a: Object: a point-like object, which specifies scale factors for 3 dimensions
- // b: null
- return new dojox.gfx3d.matrix.Matrix3D({xx: a.x, yy: a.y, zz: a.z}); // dojox.gfx3d.matrix.Matrix3D
- },
- rotateX: function(angle){
- // summary: forms a rotating matrix (about the x axis)
- // description: The resulting matrix is used to rotate points
- // around the origin of coordinates (0, 0) by specified angle.
- // angle: Number: an angle of rotation in radians (>0 for CW)
- var c = Math.cos(angle);
- var s = Math.sin(angle);
- return new dojox.gfx3d.matrix.Matrix3D({yy: c, yz: -s, zy: s, zz: c}); // dojox.gfx3d.matrix.Matrix3D
- },
- rotateXg: function(degree){
- // summary: forms a rotating matrix (about the x axis)
- // description: The resulting matrix is used to rotate points
- // around the origin of coordinates (0, 0) by specified degree.
- // See dojox.gfx3d.matrix.rotateX() for comparison.
- // degree: Number: an angle of rotation in degrees (>0 for CW)
- return dojox.gfx3d.matrix.rotateX(dojox.gfx3d.matrix._degToRad(degree)); // dojox.gfx3d.matrix.Matrix3D
- },
- rotateY: function(angle){
- // summary: forms a rotating matrix (about the y axis)
- // description: The resulting matrix is used to rotate points
- // around the origin of coordinates (0, 0) by specified angle.
- // angle: Number: an angle of rotation in radians (>0 for CW)
- var c = Math.cos(angle);
- var s = Math.sin(angle);
- return new dojox.gfx3d.matrix.Matrix3D({xx: c, xz: s, zx: -s, zz: c}); // dojox.gfx3d.matrix.Matrix3D
- },
- rotateYg: function(degree){
- // summary: forms a rotating matrix (about the y axis)
- // description: The resulting matrix is used to rotate points
- // around the origin of coordinates (0, 0) by specified degree.
- // See dojox.gfx3d.matrix.rotateY() for comparison.
- // degree: Number: an angle of rotation in degrees (>0 for CW)
- return dojox.gfx3d.matrix.rotateY(dojox.gfx3d.matrix._degToRad(degree)); // dojox.gfx3d.matrix.Matrix3D
- },
- rotateZ: function(angle){
- // summary: forms a rotating matrix (about the z axis)
- // description: The resulting matrix is used to rotate points
- // around the origin of coordinates (0, 0) by specified angle.
- // angle: Number: an angle of rotation in radians (>0 for CW)
- var c = Math.cos(angle);
- var s = Math.sin(angle);
- return new dojox.gfx3d.matrix.Matrix3D({xx: c, xy: -s, yx: s, yy: c}); // dojox.gfx3d.matrix.Matrix3D
- },
- rotateZg: function(degree){
- // summary: forms a rotating matrix (about the z axis)
- // description: The resulting matrix is used to rotate points
- // around the origin of coordinates (0, 0) by specified degree.
- // See dojox.gfx3d.matrix.rotateZ() for comparison.
- // degree: Number: an angle of rotation in degrees (>0 for CW)
- return dojox.gfx3d.matrix.rotateZ(dojox.gfx3d.matrix._degToRad(degree)); // dojox.gfx3d.matrix.Matrix3D
- },
- // camera transformation
- cameraTranslate: function(a, b, c){
- // summary: forms a translation matrix
- // description: The resulting matrix is used to translate (move) points by specified offsets.
- // a: Number: an x coordinate value
- // b: Number: a y coordinate value
- // c: Number: a z coordinate value
- if(arguments.length > 1){
- return new dojox.gfx3d.matrix.Matrix3D({dx: -a, dy: -b, dz: -c}); // dojox.gfx3d.matrix.Matrix3D
- }
- // branch
- // a: Object: a point-like object, which specifies offsets for 3 dimensions
- // b: null
- return new dojox.gfx3d.matrix.Matrix3D({dx: -a.x, dy: -a.y, dz: -a.z}); // dojox.gfx3d.matrix.Matrix3D
- },
- cameraRotateX: function(angle){
- // summary: forms a rotating matrix (about the x axis) in cameraTransform manner
- // description: The resulting matrix is used to rotate points
- // around the origin of coordinates (0, 0) by specified angle.
- // angle: Number: an angle of rotation in radians (>0 for CW)
- var c = Math.cos(-angle);
- var s = Math.sin(-angle);
- return new dojox.gfx3d.matrix.Matrix3D({yy: c, yz: -s, zy: s, zz: c}); // dojox.gfx3d.matrix.Matrix3D
- },
- cameraRotateXg: function(degree){
- // summary: forms a rotating matrix (about the x axis)in cameraTransform manner
- // description: The resulting matrix is used to rotate points
- // around the origin of coordinates (0, 0) by specified degree.
- // See dojox.gfx3d.matrix.rotateX() for comparison.
- // degree: Number: an angle of rotation in degrees (>0 for CW)
- return dojox.gfx3d.matrix.rotateX(dojox.gfx3d.matrix._degToRad(degree)); // dojox.gfx3d.matrix.Matrix3D
- },
- cameraRotateY: function(angle){
- // summary: forms a rotating matrix (about the y axis) in cameraTransform manner
- // description: The resulting matrix is used to rotate points
- // around the origin of coordinates (0, 0) by specified angle.
- // angle: Number: an angle of rotation in radians (>0 for CW)
- var c = Math.cos(-angle);
- var s = Math.sin(-angle);
- return new dojox.gfx3d.matrix.Matrix3D({xx: c, xz: s, zx: -s, zz: c}); // dojox.gfx3d.matrix.Matrix3D
- },
- cameraRotateYg: function(degree){
- // summary: forms a rotating matrix (about the y axis) in cameraTransform manner
- // description: The resulting matrix is used to rotate points
- // around the origin of coordinates (0, 0) by specified degree.
- // See dojox.gfx3d.matrix.rotateY() for comparison.
- // degree: Number: an angle of rotation in degrees (>0 for CW)
- return dojox.gfx3d.matrix.rotateY(dojox.gfx3d.matrix._degToRad(degree)); // dojox.gfx3d.matrix.Matrix3D
- },
- cameraRotateZ: function(angle){
- // summary: forms a rotating matrix (about the z axis) in cameraTransform manner
- // description: The resulting matrix is used to rotate points
- // around the origin of coordinates (0, 0) by specified angle.
- // angle: Number: an angle of rotation in radians (>0 for CW)
- var c = Math.cos(-angle);
- var s = Math.sin(-angle);
- return new dojox.gfx3d.matrix.Matrix3D({xx: c, xy: -s, yx: s, yy: c}); // dojox.gfx3d.matrix.Matrix3D
- },
- cameraRotateZg: function(degree){
- // summary: forms a rotating matrix (about the z axis) in cameraTransform manner
- // description: The resulting matrix is used to rotate points
- // around the origin of coordinates (0, 0) by specified degree.
- // See dojox.gfx3d.matrix.rotateZ() for comparison.
- // degree: Number: an angle of rotation in degrees (>0 for CW)
- return dojox.gfx3d.matrix.rotateZ(dojox.gfx3d.matrix._degToRad(degree)); // dojox.gfx3d.matrix.Matrix3D
- },
-
- // ensure matrix 3D conformance
- normalize: function(matrix){
- // summary: converts an object to a matrix, if necessary
- // description: Converts any 3D matrix-like object or an array of
- // such objects to a valid dojox.gfx3d.matrix.Matrix3D object.
- // matrix: Object: an object, which is converted to a matrix, if necessary
- return (matrix instanceof dojox.gfx3d.matrix.Matrix3D) ? matrix : new dojox.gfx3d.matrix.Matrix3D(matrix); // dojox.gfx3d.matrix.Matrix3D
- },
-
- // common operations
-
- clone: function(matrix){
- // summary: creates a copy of a 3D matrix
- // matrix: dojox.gfx3d.matrix.Matrix3D: a 3D matrix-like object to be cloned
- var obj = new dojox.gfx3d.matrix.Matrix3D();
- for(var i in matrix){
- if(typeof(matrix[i]) == "number" && typeof(obj[i]) == "number" && obj[i] != matrix[i]) obj[i] = matrix[i];
- }
- return obj; // dojox.gfx3d.matrix.Matrix3D
- },
- invert: function(matrix){
- // summary: inverts a 2D matrix
- // matrix: dojox.gfx.matrix.Matrix3D: a 2D matrix-like object to be inverted
- var m = dojox.gfx3d.matrix.normalize(matrix);
- var D = m.xx * m.yy * m.zz + m.xy * m.yz * m.zx + m.xz * m.yx * m.zy - m.xx * m.yz * m.zy - m.xy * m.yx * m.zz - m.xz * m.yy * m.zx;
- var M = new dojox.gfx3d.matrix.Matrix3D({
- xx: (m.yy * m.zz - m.yz * m.zy) / D,
- xy: (m.xz * m.zy - m.xy * m.zz) / D,
- xz: (m.xy * m.yz - m.xz * m.yy) / D,
- yx: (m.yz * m.zx - m.yx * m.zz) / D,
- yy: (m.xx * m.zz - m.xz * m.zx) / D,
- yz: (m.xz * m.yx - m.xx * m.yz) / D,
- zx: (m.yx * m.zy - m.yy * m.zx) / D,
- zy: (m.xy * m.zx - m.xx * m.zy) / D,
- zz: (m.xx * m.yy - m.xy * m.yx) / D,
- dx: -1 * (m.xy * m.yz * m.dz + m.xz * m.dy * m.zy + m.dx * m.yy * m.zz - m.xy * m.dy * m.zz - m.xz * m.yy * m.dz - m.dx * m.yz * m.zy) / D,
- dy: (m.xx * m.yz * m.dz + m.xz * m.dy * m.zx + m.dx * m.yx * m.zz - m.xx * m.dy * m.zz - m.xz * m.yx * m.dz - m.dx * m.yz * m.zx) / D,
- dz: -1 * (m.xx * m.yy * m.dz + m.xy * m.dy * m.zx + m.dx * m.yx * m.zy - m.xx * m.dy * m.zy - m.xy * m.yx * m.dz - m.dx * m.yy * m.zx) / D
- });
- return M; // dojox.gfx3d.matrix.Matrix3D
- },
- _multiplyPoint: function(m, x, y, z){
- // summary: applies a matrix to a point
- // matrix: dojox.gfx3d.matrix.Matrix3D: a 3D matrix object to be applied
- // x: Number: an x coordinate of a point
- // y: Number: a y coordinate of a point
- // z: Number: a z coordinate of a point
- return {x: m.xx * x + m.xy * y + m.xz * z + m.dx, y: m.yx * x + m.yy * y + m.yz * z + m.dy, z: m.zx * x + m.zy * y + m.zz * z + m.dz}; // Object
- },
- multiplyPoint: function(matrix, /* Number||Point */ a, /* Number, optional */ b, /* Number, optional */ c){
- // summary: applies a matrix to a point
- // matrix: dojox.gfx3d.matrix.Matrix3D: a 3D matrix object to be applied
- // a: Number: an x coordinate of a point
- // b: Number: a y coordinate of a point
- // c: Number: a z coordinate of a point
- var m = dojox.gfx3d.matrix.normalize(matrix);
- if(typeof a == "number" && typeof b == "number" && typeof c == "number"){
- return dojox.gfx3d.matrix._multiplyPoint(m, a, b, c); // Object
- }
- // branch
- // matrix: dojox.gfx3d.matrix.Matrix3D: a 3D matrix object to be applied
- // a: Object: a point
- // b: null
- // c: null
- return dojox.gfx3d.matrix._multiplyPoint(m, a.x, a.y, a.z); // Object
- },
- multiply: function(matrix){
- // summary: combines matrices by multiplying them sequentially in the given order
- // matrix: dojox.gfx3d.matrix.Matrix3D...: a 3D matrix-like object,
- // all subsequent arguments are matrix-like objects too
- var m = dojox.gfx3d.matrix.normalize(matrix);
- // combine matrices
- for(var i = 1; i < arguments.length; ++i){
- var l = m;
- var r = dojox.gfx3d.matrix.normalize(arguments[i]);
- m = new dojox.gfx3d.matrix.Matrix3D();
- m.xx = l.xx * r.xx + l.xy * r.yx + l.xz * r.zx;
- m.xy = l.xx * r.xy + l.xy * r.yy + l.xz * r.zy;
- m.xz = l.xx * r.xz + l.xy * r.yz + l.xz * r.zz;
- m.yx = l.yx * r.xx + l.yy * r.yx + l.yz * r.zx;
- m.yy = l.yx * r.xy + l.yy * r.yy + l.yz * r.zy;
- m.yz = l.yx * r.xz + l.yy * r.yz + l.yz * r.zz;
- m.zx = l.zx * r.xx + l.zy * r.yx + l.zz * r.zx;
- m.zy = l.zx * r.xy + l.zy * r.yy + l.zz * r.zy;
- m.zz = l.zx * r.xz + l.zy * r.yz + l.zz * r.zz;
- m.dx = l.xx * r.dx + l.xy * r.dy + l.xz * r.dz + l.dx;
- m.dy = l.yx * r.dx + l.yy * r.dy + l.yz * r.dz + l.dy;
- m.dz = l.zx * r.dx + l.zy * r.dy + l.zz * r.dz + l.dz;
- }
- return m; // dojox.gfx3d.matrix.Matrix3D
- },
-
- _project: function(m, x, y, z){
- // summary: applies a matrix to a point
- // matrix: dojox.gfx3d.matrix.Matrix3D: a 3D matrix object to be applied
- // x: Number: an x coordinate of a point
- // y: Number: a y coordinate of a point
- // z: Number: a z coordinate of a point
- return { // Object
- x: m.xx * x + m.xy * y + m.xz * z + m.dx,
- y: m.yx * x + m.yy * y + m.yz * z + m.dy,
- z: m.zx * x + m.zy * y + m.zz * z + m.dz};
- },
- project: function(matrix, /* Number||Point */ a, /* Number, optional */ b, /* Number, optional */ c){
- // summary: applies a matrix to a point
- // matrix: dojox.gfx3d.matrix.Matrix3D: a 3D matrix object to be applied
- // a: Number: an x coordinate of a point
- // b: Number: a y coordinate of a point
- // c: Number: a z coordinate of a point
- var m = dojox.gfx3d.matrix.normalize(matrix);
- if(typeof a == "number" && typeof b == "number" && typeof c == "number"){
- return dojox.gfx3d.matrix._project(m, a, b, c); // Object
- }
- // branch
- // matrix: dojox.gfx3d.matrix.Matrix3D: a 3D matrix object to be applied
- // a: Object: a point
- // b: null
- // c: null
- return dojox.gfx3d.matrix._project(m, a.x, a.y, a.z); // Object
- }
-});
-
-// propagate matrix up
-dojox.gfx3d.Matrix3D = dojox.gfx3d.matrix.Matrix3D;
-
+if(!dojo._hasResource["dojox.gfx3d.matrix"]){
+dojo._hasResource["dojox.gfx3d.matrix"]=true;
+dojo.provide("dojox.gfx3d.matrix");
+dojox.gfx3d.matrix._degToRad=function(_1){
+return Math.PI*_1/180;
+};
+dojox.gfx3d.matrix._radToDeg=function(_2){
+return _2/Math.PI*180;
+};
+dojox.gfx3d.matrix.Matrix3D=function(_3){
+if(_3){
+if(typeof _3=="number"){
+this.xx=this.yy=this.zz=_3;
+}else{
+if(_3 instanceof Array){
+if(_3.length>0){
+var m=dojox.gfx3d.matrix.normalize(_3[0]);
+for(var i=1;i<_3.length;++i){
+var l=m;
+var r=dojox.gfx3d.matrix.normalize(_3[i]);
+m=new dojox.gfx3d.matrix.Matrix3D();
+m.xx=l.xx*r.xx+l.xy*r.yx+l.xz*r.zx;
+m.xy=l.xx*r.xy+l.xy*r.yy+l.xz*r.zy;
+m.xz=l.xx*r.xz+l.xy*r.yz+l.xz*r.zz;
+m.yx=l.yx*r.xx+l.yy*r.yx+l.yz*r.zx;
+m.yy=l.yx*r.xy+l.yy*r.yy+l.yz*r.zy;
+m.yz=l.yx*r.xz+l.yy*r.yz+l.yz*r.zz;
+m.zx=l.zx*r.xx+l.zy*r.yx+l.zz*r.zx;
+m.zy=l.zx*r.xy+l.zy*r.yy+l.zz*r.zy;
+m.zz=l.zx*r.xz+l.zy*r.yz+l.zz*r.zz;
+m.dx=l.xx*r.dx+l.xy*r.dy+l.xz*r.dz+l.dx;
+m.dy=l.yx*r.dx+l.yy*r.dy+l.yz*r.dz+l.dy;
+m.dz=l.zx*r.dx+l.zy*r.dy+l.zz*r.dz+l.dz;
+}
+dojo.mixin(this,m);
+}
+}else{
+dojo.mixin(this,_3);
+}
+}
+}
+};
+dojo.extend(dojox.gfx3d.matrix.Matrix3D,{xx:1,xy:0,xz:0,yx:0,yy:1,yz:0,zx:0,zy:0,zz:1,dx:0,dy:0,dz:0});
+dojo.mixin(dojox.gfx3d.matrix,{identity:new dojox.gfx3d.matrix.Matrix3D(),translate:function(a,b,c){
+if(arguments.length>1){
+return new dojox.gfx3d.matrix.Matrix3D({dx:a,dy:b,dz:c});
+}
+return new dojox.gfx3d.matrix.Matrix3D({dx:a.x,dy:a.y,dz:a.z});
+},scale:function(a,b,c){
+if(arguments.length>1){
+return new dojox.gfx3d.matrix.Matrix3D({xx:a,yy:b,zz:c});
+}
+if(typeof a=="number"){
+return new dojox.gfx3d.matrix.Matrix3D({xx:a,yy:a,zz:a});
}
+return new dojox.gfx3d.matrix.Matrix3D({xx:a.x,yy:a.y,zz:a.z});
+},rotateX:function(_4){
+var c=Math.cos(_4);
+var s=Math.sin(_4);
+return new dojox.gfx3d.matrix.Matrix3D({yy:c,yz:-s,zy:s,zz:c});
+},rotateXg:function(_5){
+return dojox.gfx3d.matrix.rotateX(dojox.gfx3d.matrix._degToRad(_5));
+},rotateY:function(_6){
+var c=Math.cos(_6);
+var s=Math.sin(_6);
+return new dojox.gfx3d.matrix.Matrix3D({xx:c,xz:s,zx:-s,zz:c});
+},rotateYg:function(_7){
+return dojox.gfx3d.matrix.rotateY(dojox.gfx3d.matrix._degToRad(_7));
+},rotateZ:function(_8){
+var c=Math.cos(_8);
+var s=Math.sin(_8);
+return new dojox.gfx3d.matrix.Matrix3D({xx:c,xy:-s,yx:s,yy:c});
+},rotateZg:function(_9){
+return dojox.gfx3d.matrix.rotateZ(dojox.gfx3d.matrix._degToRad(_9));
+},cameraTranslate:function(a,b,c){
+if(arguments.length>1){
+return new dojox.gfx3d.matrix.Matrix3D({dx:-a,dy:-b,dz:-c});
+}
+return new dojox.gfx3d.matrix.Matrix3D({dx:-a.x,dy:-a.y,dz:-a.z});
+},cameraRotateX:function(_a){
+var c=Math.cos(-_a);
+var s=Math.sin(-_a);
+return new dojox.gfx3d.matrix.Matrix3D({yy:c,yz:-s,zy:s,zz:c});
+},cameraRotateXg:function(_b){
+return dojox.gfx3d.matrix.rotateX(dojox.gfx3d.matrix._degToRad(_b));
+},cameraRotateY:function(_c){
+var c=Math.cos(-_c);
+var s=Math.sin(-_c);
+return new dojox.gfx3d.matrix.Matrix3D({xx:c,xz:s,zx:-s,zz:c});
+},cameraRotateYg:function(_d){
+return dojox.gfx3d.matrix.rotateY(dojox.gfx3d.matrix._degToRad(_d));
+},cameraRotateZ:function(_e){
+var c=Math.cos(-_e);
+var s=Math.sin(-_e);
+return new dojox.gfx3d.matrix.Matrix3D({xx:c,xy:-s,yx:s,yy:c});
+},cameraRotateZg:function(_f){
+return dojox.gfx3d.matrix.rotateZ(dojox.gfx3d.matrix._degToRad(_f));
+},normalize:function(_10){
+return (_10 instanceof dojox.gfx3d.matrix.Matrix3D)?_10:new dojox.gfx3d.matrix.Matrix3D(_10);
+},clone:function(_11){
+var obj=new dojox.gfx3d.matrix.Matrix3D();
+for(var i in _11){
+if(typeof (_11[i])=="number"&&typeof (obj[i])=="number"&&obj[i]!=_11[i]){
+obj[i]=_11[i];
+}
+}
+return obj;
+},invert:function(_12){
+var m=dojox.gfx3d.matrix.normalize(_12);
+var D=m.xx*m.yy*m.zz+m.xy*m.yz*m.zx+m.xz*m.yx*m.zy-m.xx*m.yz*m.zy-m.xy*m.yx*m.zz-m.xz*m.yy*m.zx;
+var M=new dojox.gfx3d.matrix.Matrix3D({xx:(m.yy*m.zz-m.yz*m.zy)/D,xy:(m.xz*m.zy-m.xy*m.zz)/D,xz:(m.xy*m.yz-m.xz*m.yy)/D,yx:(m.yz*m.zx-m.yx*m.zz)/D,yy:(m.xx*m.zz-m.xz*m.zx)/D,yz:(m.xz*m.yx-m.xx*m.yz)/D,zx:(m.yx*m.zy-m.yy*m.zx)/D,zy:(m.xy*m.zx-m.xx*m.zy)/D,zz:(m.xx*m.yy-m.xy*m.yx)/D,dx:-1*(m.xy*m.yz*m.dz+m.xz*m.dy*m.zy+m.dx*m.yy*m.zz-m.xy*m.dy*m.zz-m.xz*m.yy*m.dz-m.dx*m.yz*m.zy)/D,dy:(m.xx*m.yz*m.dz+m.xz*m.dy*m.zx+m.dx*m.yx*m.zz-m.xx*m.dy*m.zz-m.xz*m.yx*m.dz-m.dx*m.yz*m.zx)/D,dz:-1*(m.xx*m.yy*m.dz+m.xy*m.dy*m.zx+m.dx*m.yx*m.zy-m.xx*m.dy*m.zy-m.xy*m.yx*m.dz-m.dx*m.yy*m.zx)/D});
+return M;
+},_multiplyPoint:function(m,x,y,z){
+return {x:m.xx*x+m.xy*y+m.xz*z+m.dx,y:m.yx*x+m.yy*y+m.yz*z+m.dy,z:m.zx*x+m.zy*y+m.zz*z+m.dz};
+},multiplyPoint:function(_13,a,b,c){
+var m=dojox.gfx3d.matrix.normalize(_13);
+if(typeof a=="number"&&typeof b=="number"&&typeof c=="number"){
+return dojox.gfx3d.matrix._multiplyPoint(m,a,b,c);
+}
+return dojox.gfx3d.matrix._multiplyPoint(m,a.x,a.y,a.z);
+},multiply:function(_14){
+var m=dojox.gfx3d.matrix.normalize(_14);
+for(var i=1;i<arguments.length;++i){
+var l=m;
+var r=dojox.gfx3d.matrix.normalize(arguments[i]);
+m=new dojox.gfx3d.matrix.Matrix3D();
+m.xx=l.xx*r.xx+l.xy*r.yx+l.xz*r.zx;
+m.xy=l.xx*r.xy+l.xy*r.yy+l.xz*r.zy;
+m.xz=l.xx*r.xz+l.xy*r.yz+l.xz*r.zz;
+m.yx=l.yx*r.xx+l.yy*r.yx+l.yz*r.zx;
+m.yy=l.yx*r.xy+l.yy*r.yy+l.yz*r.zy;
+m.yz=l.yx*r.xz+l.yy*r.yz+l.yz*r.zz;
+m.zx=l.zx*r.xx+l.zy*r.yx+l.zz*r.zx;
+m.zy=l.zx*r.xy+l.zy*r.yy+l.zz*r.zy;
+m.zz=l.zx*r.xz+l.zy*r.yz+l.zz*r.zz;
+m.dx=l.xx*r.dx+l.xy*r.dy+l.xz*r.dz+l.dx;
+m.dy=l.yx*r.dx+l.yy*r.dy+l.yz*r.dz+l.dy;
+m.dz=l.zx*r.dx+l.zy*r.dy+l.zz*r.dz+l.dz;
+}
+return m;
+},_project:function(m,x,y,z){
+return {x:m.xx*x+m.xy*y+m.xz*z+m.dx,y:m.yx*x+m.yy*y+m.yz*z+m.dy,z:m.zx*x+m.zy*y+m.zz*z+m.dz};
+},project:function(_15,a,b,c){
+var m=dojox.gfx3d.matrix.normalize(_15);
+if(typeof a=="number"&&typeof b=="number"&&typeof c=="number"){
+return dojox.gfx3d.matrix._project(m,a,b,c);
+}
+return dojox.gfx3d.matrix._project(m,a.x,a.y,a.z);
+}});
+dojox.gfx3d.Matrix3D=dojox.gfx3d.matrix.Matrix3D;
+}
diff --git a/js/dojo/dojox/gfx3d/object.js b/js/dojo/dojox/gfx3d/object.js
--- a/js/dojo/dojox/gfx3d/object.js
+++ b/js/dojo/dojox/gfx3d/object.js
@@ -1,1088 +1,614 @@
-if(!dojo._hasResource["dojox.gfx3d.object"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.gfx3d.object"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.gfx3d.object"]){
+dojo._hasResource["dojox.gfx3d.object"]=true;
dojo.provide("dojox.gfx3d.object");
-
dojo.require("dojox.gfx");
dojo.require("dojox.gfx3d.lighting");
dojo.require("dojox.gfx3d.scheduler");
dojo.require("dojox.gfx3d.vector");
dojo.require("dojox.gfx3d.gradient");
-
-// FIXME: why the global "out" var here?
-var out = function(o, x){
- if(arguments.length > 1){
- // console.debug("debug:", o);
- o = x;
- }
- var e = {};
- for(var i in o){
- if(i in e){ continue; }
- // console.debug("debug:", i, typeof o[i], o[i]);
- }
+var out=function(o,x){
+if(arguments.length>1){
+o=x;
+}
+var e={};
+for(var i in o){
+if(i in e){
+continue;
+}
+}
};
-
-dojo.declare("dojox.gfx3d.Object", null, {
- constructor: function(){
- // summary: a Object object, which knows how to map
- // 3D objects to 2D shapes.
-
- // object: Object: an abstract Object object
- // (see dojox.gfx3d.defaultEdges,
- // dojox.gfx3d.defaultTriangles,
- // dojox.gfx3d.defaultQuads
- // dojox.gfx3d.defaultOrbit
- // dojox.gfx3d.defaultCube
- // or dojox.gfx3d.defaultCylinder)
- this.object = null;
-
- // matrix: dojox.gfx3d.matrix: world transform
- this.matrix = null;
- // cache: buffer for intermediate result, used late for draw()
- this.cache = null;
- // renderer: a reference for the Viewport
- this.renderer = null;
- // parent: a reference for parent, Scene or Viewport object
- this.parent = null;
-
- // strokeStyle: Object: a stroke object
- this.strokeStyle = null;
- // fillStyle: Object: a fill object or texture object
- this.fillStyle = null;
- // shape: dojox.gfx.Shape: an underlying 2D shape
- this.shape = null;
- },
-
- setObject: function(newObject){
- // summary: sets a Object object
- // object: Object: an abstract Object object
- // (see dojox.gfx3d.defaultEdges,
- // dojox.gfx3d.defaultTriangles,
- // dojox.gfx3d.defaultQuads
- // dojox.gfx3d.defaultOrbit
- // dojox.gfx3d.defaultCube
- // or dojox.gfx3d.defaultCylinder)
- this.object = dojox.gfx.makeParameters(this.object, newObject);
- return this;
- },
-
- setTransform: function(matrix){
- // summary: sets a transformation matrix
- // matrix: dojox.gfx3d.matrix.Matrix: a matrix or a matrix-like object
- // (see an argument of dojox.gfx3d.matrix.Matrix
- // constructor for a list of acceptable arguments)
- this.matrix = dojox.gfx3d.matrix.clone(matrix ? dojox.gfx3d.matrix.normalize(matrix) : dojox.gfx3d.identity, true);
- return this; // self
- },
-
- // apply left & right transformation
-
- applyRightTransform: function(matrix){
- // summary: multiplies the existing matrix with an argument on right side
- // (this.matrix * matrix)
- // matrix: dojox.gfx3d.matrix.Matrix: a matrix or a matrix-like object
- // (see an argument of dojox.gfx.matrix.Matrix
- // constructor for a list of acceptable arguments)
- return matrix ? this.setTransform([this.matrix, matrix]) : this; // self
- },
- applyLeftTransform: function(matrix){
- // summary: multiplies the existing matrix with an argument on left side
- // (matrix * this.matrix)
- // matrix: dojox.gfx3d.matrix.Matrix: a matrix or a matrix-like object
- // (see an argument of dojox.gfx.matrix.Matrix
- // constructor for a list of acceptable arguments)
- return matrix ? this.setTransform([matrix, this.matrix]) : this; // self
- },
-
- applyTransform: function(matrix){
- // summary: a shortcut for dojox.gfx.Shape.applyRightTransform
- // matrix: dojox.gfx3d.matrix.Matrix: a matrix or a matrix-like object
- // (see an argument of dojox.gfx.matrix.Matrix
- // constructor for a list of acceptable arguments)
- return matrix ? this.setTransform([this.matrix, matrix]) : this; // self
- },
-
- setFill: function(fill){
- // summary: sets a fill object
- // (the default implementation is to delegate to
- // the underlying 2D shape).
- // fill: Object: a fill object
- // (see dojox.gfx.defaultLinearGradient,
- // dojox.gfx.defaultRadialGradient,
- // dojox.gfx.defaultPattern,
- // dojo.Color
- // or dojox.gfx.MODEL)
- this.fillStyle = fill;
- return this;
- },
-
- setStroke: function(stroke){
- // summary: sets a stroke object
- // (the default implementation simply ignores it)
- // stroke: Object: a stroke object
- // (see dojox.gfx.defaultStroke)
- this.strokeStyle = stroke;
- return this;
- },
-
- toStdFill: function(lighting, normal){
- return (this.fillStyle && typeof this.fillStyle['type'] != "undefined") ? lighting[this.fillStyle.type](normal, this.fillStyle.finish, this.fillStyle.color) : this.fillStyle;
- },
-
- invalidate: function(){
- this.renderer.addTodo(this);
- },
-
- destroy: function(){
- if(this.shape){
- var p = this.shape.getParent();
- if(p){
- p.remove(this.shape);
- }
- this.shape = null;
- }
- },
-
- // All the 3D objects need to override the following virtual functions:
- // render, getZOrder, getOutline, draw, redraw if necessary.
-
- render: function(camera){
- throw "Pure virtual function, not implemented";
- },
-
- draw: function(lighting){
- throw "Pure virtual function, not implemented";
- },
-
- getZOrder: function(){
- return 0;
- },
-
- getOutline: function(){
- return null;
- }
-
+dojo.declare("dojox.gfx3d.Object",null,{constructor:function(){
+this.object=null;
+this.matrix=null;
+this.cache=null;
+this.renderer=null;
+this.parent=null;
+this.strokeStyle=null;
+this.fillStyle=null;
+this.shape=null;
+},setObject:function(_1){
+this.object=dojox.gfx.makeParameters(this.object,_1);
+return this;
+},setTransform:function(_2){
+this.matrix=dojox.gfx3d.matrix.clone(_2?dojox.gfx3d.matrix.normalize(_2):dojox.gfx3d.identity,true);
+return this;
+},applyRightTransform:function(_3){
+return _3?this.setTransform([this.matrix,_3]):this;
+},applyLeftTransform:function(_4){
+return _4?this.setTransform([_4,this.matrix]):this;
+},applyTransform:function(_5){
+return _5?this.setTransform([this.matrix,_5]):this;
+},setFill:function(_6){
+this.fillStyle=_6;
+return this;
+},setStroke:function(_7){
+this.strokeStyle=_7;
+return this;
+},toStdFill:function(_8,_9){
+return (this.fillStyle&&typeof this.fillStyle["type"]!="undefined")?_8[this.fillStyle.type](_9,this.fillStyle.finish,this.fillStyle.color):this.fillStyle;
+},invalidate:function(){
+this.renderer.addTodo(this);
+},destroy:function(){
+if(this.shape){
+var p=this.shape.getParent();
+if(p){
+p.remove(this.shape);
+}
+this.shape=null;
+}
+},render:function(_a){
+throw "Pure virtual function, not implemented";
+},draw:function(_b){
+throw "Pure virtual function, not implemented";
+},getZOrder:function(){
+return 0;
+},getOutline:function(){
+return null;
+}});
+dojo.declare("dojox.gfx3d.Scene",dojox.gfx3d.Object,{constructor:function(){
+this.objects=[];
+this.todos=[];
+this.schedule=dojox.gfx3d.scheduler.zOrder;
+this._draw=dojox.gfx3d.drawer.conservative;
+},setFill:function(_c){
+this.fillStyle=_c;
+dojo.forEach(this.objects,function(_d){
+_d.setFill(_c);
});
-
-dojo.declare("dojox.gfx3d.Scene", dojox.gfx3d.Object, {
- // summary: the Scene is just a containter.
- // note: we have the following assumption:
- // all objects in the Scene are not overlapped with other objects
- // outside of the scene.
- constructor: function(){
- // summary: a containter of other 3D objects
- this.objects= [];
- this.todos = [];
- this.schedule = dojox.gfx3d.scheduler.zOrder;
- this._draw = dojox.gfx3d.drawer.conservative;
- },
-
- setFill: function(fill){
- this.fillStyle = fill;
- dojo.forEach(this.objects, function(item){
- item.setFill(fill);
- });
- return this;
- },
-
- setStroke: function(stroke){
- this.strokeStyle = stroke;
- dojo.forEach(this.objects, function(item){
- item.setStroke(stroke);
- });
- return this;
- },
-
- render: function(camera, deep){
- var m = dojox.gfx3d.matrix.multiply(camera, this.matrix);
- if(deep){
- this.todos = this.objects;
- }
- dojo.forEach(this.todos, function(item){ item.render(m, deep); });
- },
-
- draw: function(lighting){
- this.objects = this.schedule(this.objects);
- this._draw(this.todos, this.objects, this.renderer);
- },
-
- addTodo: function(newObject){
- // FIXME: use indexOf?
- if(dojo.every(this.todos, function(item){ return item != newObject; })){
- this.todos.push(newObject);
- this.invalidate();
- }
- },
-
- invalidate: function(){
- this.parent.addTodo(this);
- },
-
- getZOrder: function(){
- var zOrder = 0;
- dojo.forEach(this.objects, function(item){ zOrder += item.getZOrder(); });
- return (this.objects.length > 1) ? zOrder / this.objects.length : 0;
- }
+return this;
+},setStroke:function(_e){
+this.strokeStyle=_e;
+dojo.forEach(this.objects,function(_f){
+_f.setStroke(_e);
+});
+return this;
+},render:function(_10,_11){
+var m=dojox.gfx3d.matrix.multiply(_10,this.matrix);
+if(_11){
+this.todos=this.objects;
+}
+dojo.forEach(this.todos,function(_12){
+_12.render(m,_11);
+});
+},draw:function(_13){
+this.objects=this.schedule(this.objects);
+this._draw(this.todos,this.objects,this.renderer);
+},addTodo:function(_14){
+if(dojo.every(this.todos,function(_15){
+return _15!=_14;
+})){
+this.todos.push(_14);
+this.invalidate();
+}
+},invalidate:function(){
+this.parent.addTodo(this);
+},getZOrder:function(){
+var _16=0;
+dojo.forEach(this.objects,function(_17){
+_16+=_17.getZOrder();
+});
+return (this.objects.length>1)?_16/this.objects.length:0;
+}});
+dojo.declare("dojox.gfx3d.Edges",dojox.gfx3d.Object,{constructor:function(){
+this.object=dojo.clone(dojox.gfx3d.defaultEdges);
+},setObject:function(_18,_19){
+this.object=dojox.gfx.makeParameters(this.object,(_18 instanceof Array)?{points:_18,style:_19}:_18);
+return this;
+},getZOrder:function(){
+var _1a=0;
+dojo.forEach(this.cache,function(_1b){
+_1a+=_1b.z;
+});
+return (this.cache.length>1)?_1a/this.cache.length:0;
+},render:function(_1c){
+var m=dojox.gfx3d.matrix.multiply(_1c,this.matrix);
+this.cache=dojo.map(this.object.points,function(_1d){
+return dojox.gfx3d.matrix.multiplyPoint(m,_1d);
+});
+},draw:function(){
+var c=this.cache;
+if(this.shape){
+this.shape.setShape("");
+}else{
+this.shape=this.renderer.createPath();
+}
+var p=this.shape.setAbsoluteMode("absolute");
+if(this.object.style=="strip"||this.object.style=="loop"){
+p.moveTo(c[0].x,c[0].y);
+dojo.forEach(c.slice(1),function(_1e){
+p.lineTo(_1e.x,_1e.y);
});
-
-
-dojo.declare("dojox.gfx3d.Edges", dojox.gfx3d.Object, {
- constructor: function(){
- // summary: a generic edge in 3D viewport
- this.object = dojo.clone(dojox.gfx3d.defaultEdges);
- },
-
- setObject: function(newObject, /* String, optional */ style){
- // summary: setup the object
- // newObject: Array of points || Object
- // style: String, optional
- this.object = dojox.gfx.makeParameters(this.object, (newObject instanceof Array) ? { points: newObject, style: style } : newObject);
- return this;
- },
-
- getZOrder: function(){
- var zOrder = 0;
- dojo.forEach(this.cache, function(item){ zOrder += item.z;} );
- return (this.cache.length > 1) ? zOrder / this.cache.length : 0;
- },
-
- render: function(camera){
- var m = dojox.gfx3d.matrix.multiply(camera, this.matrix);
- this.cache = dojo.map(this.object.points, function(item){
- return dojox.gfx3d.matrix.multiplyPoint(m, item);
- });
- },
-
- draw: function(){
- var c = this.cache;
- if(this.shape){
- this.shape.setShape("")
- }else{
- this.shape = this.renderer.createPath();
- }
- var p = this.shape.setAbsoluteMode("absolute");
-
- if(this.object.style == "strip" || this.object.style == "loop"){
- p.moveTo(c[0].x, c[0].y);
- dojo.forEach(c.slice(1), function(item){
- p.lineTo(item.x, item.y);
- });
- if(this.object.style == "loop"){
- p.closePath();
- }
- }else{
- for(var i = 0; i < this.cache.length; ){
- p.moveTo(c[i].x, c[i].y);
- i ++;
- p.lineTo(c[i].x, c[i].y);
- i ++;
- }
- }
- // FIXME: doe setFill make sense here?
- p.setStroke(this.strokeStyle);
- }
+if(this.object.style=="loop"){
+p.closePath();
+}
+}else{
+for(var i=0;i<this.cache.length;){
+p.moveTo(c[i].x,c[i].y);
+i++;
+p.lineTo(c[i].x,c[i].y);
+i++;
+}
+}
+p.setStroke(this.strokeStyle);
+}});
+dojo.declare("dojox.gfx3d.Orbit",dojox.gfx3d.Object,{constructor:function(){
+this.object=dojo.clone(dojox.gfx3d.defaultOrbit);
+},render:function(_1f){
+var m=dojox.gfx3d.matrix.multiply(_1f,this.matrix);
+var _20=[0,Math.PI/4,Math.PI/3];
+var _21=dojox.gfx3d.matrix.multiplyPoint(m,this.object.center);
+var _22=dojo.map(_20,function(_23){
+return {x:this.center.x+this.radius*Math.cos(_23),y:this.center.y+this.radius*Math.sin(_23),z:this.center.z};
+},this.object);
+_22=dojo.map(_22,function(_24){
+return dojox.gfx3d.matrix.multiplyPoint(m,_24);
});
-
-dojo.declare("dojox.gfx3d.Orbit", dojox.gfx3d.Object, {
- constructor: function(){
- // summary: a generic edge in 3D viewport
- this.object = dojo.clone(dojox.gfx3d.defaultOrbit);
- },
-
- render: function(camera){
- var m = dojox.gfx3d.matrix.multiply(camera, this.matrix);
- var angles = [0, Math.PI/4, Math.PI/3];
- var center = dojox.gfx3d.matrix.multiplyPoint(m, this.object.center);
- var marks = dojo.map(angles, function(item){
- return {x: this.center.x + this.radius * Math.cos(item),
- y: this.center.y + this.radius * Math.sin(item), z: this.center.z};
- }, this.object);
-
- marks = dojo.map(marks, function(item){
- return dojox.gfx3d.matrix.multiplyPoint(m, item);
- });
-
- var normal = dojox.gfx3d.vector.normalize(marks);
-
- marks = dojo.map(marks, function(item){
- return dojox.gfx3d.vector.substract(item, center);
- });
-
- // Use the algorithm here:
- // http://www.3dsoftware.com/Math/PlaneCurves/EllipseAlgebra/
- // After we normalize the marks, the equation is:
- // a x^2 + 2b xy + cy^2 + f = 0: let a = 1
- // so the final equation is:
- // [ xy, y^2, 1] * [2b, c, f]' = [ -x^2 ]'
-
- var A = {
- xx: marks[0].x * marks[0].y, xy: marks[0].y * marks[0].y, xz: 1,
- yx: marks[1].x * marks[1].y, yy: marks[1].y * marks[1].y, yz: 1,
- zx: marks[2].x * marks[2].y, zy: marks[2].y * marks[2].y, zz: 1,
- dx: 0, dy: 0, dz: 0
- };
- var b = dojo.map(marks, function(item){
- return -Math.pow(item.x, 2);
- });
-
- // X is 2b, c, f
- var X = dojox.gfx3d.matrix.multiplyPoint(dojox.gfx3d.matrix.invert(A),b[0], b[1], b[2]);
- var theta = Math.atan2(X.x, 1 - X.y) / 2;
-
- // rotate the marks back to the canonical form
- var probes = dojo.map(marks, function(item){
- return dojox.gfx.matrix.multiplyPoint(dojox.gfx.matrix.rotate(-theta), item.x, item.y);
- });
-
- // we are solving the equation: Ax = b
- // A = [x^2, y^2] X = [1/a^2, 1/b^2]', b = [1, 1]'
- // so rx = Math.sqrt(1/ ( inv(A)[1:] * b ) );
- // so ry = Math.sqrt(1/ ( inv(A)[2:] * b ) );
-
- var a = Math.pow(probes[0].x, 2);
- var b = Math.pow(probes[0].y, 2);
- var c = Math.pow(probes[1].x, 2);
- var d = Math.pow(probes[1].y, 2);
-
- // the invert matrix is
- // 1/(ad -bc) [ d, -b; -c, a];
- var rx = Math.sqrt( (a*d - b*c)/ (d-b) );
- var ry = Math.sqrt( (a*d - b*c)/ (a-c) );
-
- this.cache = {cx: center.x, cy: center.y, rx: rx, ry: ry, theta: theta, normal: normal};
- },
-
- draw: function(lighting){
- if(this.shape){
- this.shape.setShape(this.cache);
- } else {
- this.shape = this.renderer.createEllipse(this.cache);
- }
- this.shape.applyTransform(dojox.gfx.matrix.rotateAt(this.cache.theta, this.cache.cx, this.cache.cy))
- .setStroke(this.strokeStyle)
- .setFill(this.toStdFill(lighting, this.cache.normal));
- }
+var _25=dojox.gfx3d.vector.normalize(_22);
+_22=dojo.map(_22,function(_26){
+return dojox.gfx3d.vector.substract(_26,_21);
+});
+var A={xx:_22[0].x*_22[0].y,xy:_22[0].y*_22[0].y,xz:1,yx:_22[1].x*_22[1].y,yy:_22[1].y*_22[1].y,yz:1,zx:_22[2].x*_22[2].y,zy:_22[2].y*_22[2].y,zz:1,dx:0,dy:0,dz:0};
+var B=dojo.map(_22,function(_27){
+return -Math.pow(_27.x,2);
+});
+var X=dojox.gfx3d.matrix.multiplyPoint(dojox.gfx3d.matrix.invert(A),B[0],B[1],B[2]);
+var _28=Math.atan2(X.x,1-X.y)/2;
+var _29=dojo.map(_22,function(_2a){
+return dojox.gfx.matrix.multiplyPoint(dojox.gfx.matrix.rotate(-_28),_2a.x,_2a.y);
});
-
-dojo.declare("dojox.gfx3d.Path3d", dojox.gfx3d.Object, {
- // This object is still very immature !
- constructor: function(){
- // summary: a generic line
- // (this is a helper object, which is defined for convenience)
- this.object = dojo.clone(dojox.gfx3d.defaultPath3d);
- this.segments = [];
- this.absolute = true;
- this.last = {};
- this.path = "";
- },
-
- _collectArgs: function(array, args){
- // summary: converts an array of arguments to plain numeric values
- // array: Array: an output argument (array of numbers)
- // args: Array: an input argument (can be values of Boolean, Number, dojox.gfx.Point, or an embedded array of them)
- for(var i = 0; i < args.length; ++i){
- var t = args[i];
- if(typeof(t) == "boolean"){
- array.push(t ? 1 : 0);
- }else if(typeof(t) == "number"){
- array.push(t);
- }else if(t instanceof Array){
- this._collectArgs(array, t);
- }else if("x" in t && "y" in t){
- array.push(t.x);
- array.push(t.y);
- }
- }
- },
-
- // a dictionary, which maps segment type codes to a number of their argemnts
- _validSegments: {m: 3, l: 3, z: 0},
-
- _pushSegment: function(action, args){
- // summary: adds a segment
- // action: String: valid SVG code for a segment's type
- // args: Array: a list of parameters for this segment
- var group = this._validSegments[action.toLowerCase()];
- if(typeof(group) == "number"){
- if(group){
- if(args.length >= group){
- var segment = {action: action, args: args.slice(0, args.length - args.length % group)};
- this.segments.push(segment);
- }
- }else{
- var segment = {action: action, args: []};
- this.segments.push(segment);
- }
- }
- },
-
- moveTo: function(){
- // summary: formes a move segment
- var args = [];
- this._collectArgs(args, arguments);
- this._pushSegment(this.absolute ? "M" : "m", args);
- return this; // self
- },
- lineTo: function(){
- // summary: formes a line segment
- var args = [];
- this._collectArgs(args, arguments);
- this._pushSegment(this.absolute ? "L" : "l", args);
- return this; // self
- },
-
- closePath: function(){
- // summary: closes a path
- this._pushSegment("Z", []);
- return this; // self
- },
-
- render: function(camera){
- // TODO: we need to get the ancestors' matrix
- var m = dojox.gfx3d.matrix.multiply(camera, this.matrix);
- // iterate all the segments and convert them to 2D canvas
- // TODO consider the relative mode
- var path = ""
- var _validSegments = this._validSegments;
- dojo.forEach(this.segments, function(item){
- path += item.action;
- for(var i = 0; i < item.args.length; i+= _validSegments[item.action.toLowerCase()] ){
- var pt = dojox.gfx3d.matrix.multiplyPoint(m, item.args[i], item.args[i+1], item.args[i+2])
- path += " " + pt.x + " " + pt.y;
- }
- });
-
- this.cache = path;
- },
-
- _draw: function(){
- return this.parent.createPath(this.cache);
- }
+var a=Math.pow(_29[0].x,2);
+var b=Math.pow(_29[0].y,2);
+var c=Math.pow(_29[1].x,2);
+var d=Math.pow(_29[1].y,2);
+var rx=Math.sqrt((a*d-b*c)/(d-b));
+var ry=Math.sqrt((a*d-b*c)/(a-c));
+this.cache={cx:_21.x,cy:_21.y,rx:rx,ry:ry,theta:_28,normal:_25};
+},draw:function(_2b){
+if(this.shape){
+this.shape.setShape(this.cache);
+}else{
+this.shape=this.renderer.createEllipse(this.cache);
+}
+this.shape.applyTransform(dojox.gfx.matrix.rotateAt(this.cache.theta,this.cache.cx,this.cache.cy)).setStroke(this.strokeStyle).setFill(this.toStdFill(_2b,this.cache.normal));
+}});
+dojo.declare("dojox.gfx3d.Path3d",dojox.gfx3d.Object,{constructor:function(){
+this.object=dojo.clone(dojox.gfx3d.defaultPath3d);
+this.segments=[];
+this.absolute=true;
+this.last={};
+this.path="";
+},_collectArgs:function(_2c,_2d){
+for(var i=0;i<_2d.length;++i){
+var t=_2d[i];
+if(typeof (t)=="boolean"){
+_2c.push(t?1:0);
+}else{
+if(typeof (t)=="number"){
+_2c.push(t);
+}else{
+if(t instanceof Array){
+this._collectArgs(_2c,t);
+}else{
+if("x" in t&&"y" in t){
+_2c.push(t.x);
+_2c.push(t.y);
+}
+}
+}
+}
+}
+},_validSegments:{m:3,l:3,z:0},_pushSegment:function(_2e,_2f){
+var _30=this._validSegments[_2e.toLowerCase()],_31;
+if(typeof (_30)=="number"){
+if(_30){
+if(_2f.length>=_30){
+_31={action:_2e,args:_2f.slice(0,_2f.length-_2f.length%_30)};
+this.segments.push(_31);
+}
+}else{
+_31={action:_2e,args:[]};
+this.segments.push(_31);
+}
+}
+},moveTo:function(){
+var _32=[];
+this._collectArgs(_32,arguments);
+this._pushSegment(this.absolute?"M":"m",_32);
+return this;
+},lineTo:function(){
+var _33=[];
+this._collectArgs(_33,arguments);
+this._pushSegment(this.absolute?"L":"l",_33);
+return this;
+},closePath:function(){
+this._pushSegment("Z",[]);
+return this;
+},render:function(_34){
+var m=dojox.gfx3d.matrix.multiply(_34,this.matrix);
+var _35="";
+var _36=this._validSegments;
+dojo.forEach(this.segments,function(_37){
+_35+=_37.action;
+for(var i=0;i<_37.args.length;i+=_36[_37.action.toLowerCase()]){
+var pt=dojox.gfx3d.matrix.multiplyPoint(m,_37.args[i],_37.args[i+1],_37.args[i+2]);
+_35+=" "+pt.x+" "+pt.y;
+}
});
-
-dojo.declare("dojox.gfx3d.Triangles", dojox.gfx3d.Object, {
- constructor: function(){
- // summary: a generic triangle
- // (this is a helper object, which is defined for convenience)
- this.object = dojo.clone(dojox.gfx3d.defaultTriangles);
- },
-
- setObject: function(newObject, /* String, optional */ style){
- // summary: setup the object
- // newObject: Array of points || Object
- // style: String, optional
- if(newObject instanceof Array){
- this.object = dojox.gfx.makeParameters(this.object, { points: newObject, style: style } );
- } else {
- this.object = dojox.gfx.makeParameters(this.object, newObject);
- }
- return this;
- },
- render: function(camera){
- var m = dojox.gfx3d.matrix.multiply(camera, this.matrix);
- var c = dojo.map(this.object.points, function(item){
- return dojox.gfx3d.matrix.multiplyPoint(m, item);
- });
- this.cache = [];
- var pool = c.slice(0, 2);
- var center = c[0];
- if(this.object.style == "strip"){
- dojo.forEach(c.slice(2), function(item){
- pool.push(item);
- pool.push(pool[0]);
- this.cache.push(pool);
- pool = pool.slice(1, 3);
- }, this);
- } else if(this.object.style == "fan"){
- dojo.forEach(c.slice(2), function(item){
- pool.push(item);
- pool.push(center);
- this.cache.push(pool);
- pool = [center, item];
- }, this);
- } else {
- for(var i = 0; i < c.length; ){
- this.cache.push( [ c[i], c[i+1], c[i+2], c[i] ]);
- i += 3;
- }
- }
- },
-
- draw: function(lighting){
- // use the BSP to schedule
- this.cache = dojox.gfx3d.scheduler.bsp(this.cache, function(it){ return it; });
- if(this.shape){
- this.shape.clear();
- } else {
- this.shape = this.renderer.createGroup();
- }
- dojo.forEach(this.cache, function(item){
- this.shape.createPolyline(item)
- .setStroke(this.strokeStyle)
- .setFill(this.toStdFill(lighting, dojox.gfx3d.vector.normalize(item)));
- }, this);
- },
-
- getZOrder: function(){
- var zOrder = 0;
- dojo.forEach(this.cache, function(item){
- zOrder += (item[0].z + item[1].z + item[2].z) / 3; });
- return (this.cache.length > 1) ? zOrder / this.cache.length : 0;
- }
+this.cache=_35;
+},_draw:function(){
+return this.parent.createPath(this.cache);
+}});
+dojo.declare("dojox.gfx3d.Triangles",dojox.gfx3d.Object,{constructor:function(){
+this.object=dojo.clone(dojox.gfx3d.defaultTriangles);
+},setObject:function(_38,_39){
+if(_38 instanceof Array){
+this.object=dojox.gfx.makeParameters(this.object,{points:_38,style:_39});
+}else{
+this.object=dojox.gfx.makeParameters(this.object,_38);
+}
+return this;
+},render:function(_3a){
+var m=dojox.gfx3d.matrix.multiply(_3a,this.matrix);
+var c=dojo.map(this.object.points,function(_3b){
+return dojox.gfx3d.matrix.multiplyPoint(m,_3b);
+});
+this.cache=[];
+var _3c=c.slice(0,2);
+var _3d=c[0];
+if(this.object.style=="strip"){
+dojo.forEach(c.slice(2),function(_3e){
+_3c.push(_3e);
+_3c.push(_3c[0]);
+this.cache.push(_3c);
+_3c=_3c.slice(1,3);
+},this);
+}else{
+if(this.object.style=="fan"){
+dojo.forEach(c.slice(2),function(_3f){
+_3c.push(_3f);
+_3c.push(_3d);
+this.cache.push(_3c);
+_3c=[_3d,_3f];
+},this);
+}else{
+for(var i=0;i<c.length;){
+this.cache.push([c[i],c[i+1],c[i+2],c[i]]);
+i+=3;
+}
+}
+}
+},draw:function(_40){
+this.cache=dojox.gfx3d.scheduler.bsp(this.cache,function(it){
+return it;
});
-
-dojo.declare("dojox.gfx3d.Quads", dojox.gfx3d.Object, {
- constructor: function(){
- // summary: a generic triangle
- // (this is a helper object, which is defined for convenience)
- this.object = dojo.clone(dojox.gfx3d.defaultQuads);
- },
-
- setObject: function(newObject, /* String, optional */ style){
- // summary: setup the object
- // newObject: Array of points || Object
- // style: String, optional
- this.object = dojox.gfx.makeParameters(this.object, (newObject instanceof Array) ? { points: newObject, style: style } : newObject );
- return this;
- },
- render: function(camera){
- var m = dojox.gfx3d.matrix.multiply(camera, this.matrix);
- var c = dojo.map(this.object.points, function(item){
- return dojox.gfx3d.matrix.multiplyPoint(m, item);
- });
- this.cache = [];
- if(this.object.style == "strip"){
- var pool = c.slice(0, 2);
- for(var i = 2; i < c.length; ){
- pool = pool.concat( [ c[i], c[i+1], pool[0] ] );
- this.cache.push(pool);
- pool = pool.slice(2,4);
- i += 2;
- }
- }else{
- for(var i = 0; i < c.length; ){
- this.cache.push( [c[i], c[i+1], c[i+2], c[i+3], c[i] ] );
- i += 4;
- }
- }
- },
-
- draw: function(lighting){
- // use the BSP to schedule
- this.cache = dojox.gfx3d.scheduler.bsp(this.cache, function(it){ return it; });
- if(this.shape){
- this.shape.clear();
- }else{
- this.shape = this.renderer.createGroup();
- }
- // using naive iteration to speed things up a bit by avoiding function call overhead
- for(var x=0; x<this.cache.length; x++){
- this.shape.createPolyline(this.cache[x])
- .setStroke(this.strokeStyle)
- .setFill(this.toStdFill(lighting, dojox.gfx3d.vector.normalize(this.cache[x])));
- }
- /*
- dojo.forEach(this.cache, function(item){
- this.shape.createPolyline(item)
- .setStroke(this.strokeStyle)
- .setFill(this.toStdFill(lighting, dojox.gfx3d.vector.normalize(item)));
- }, this);
- */
- },
-
- getZOrder: function(){
- var zOrder = 0;
- // using naive iteration to speed things up a bit by avoiding function call overhead
- for(var x=0; x<this.cache.length; x++){
- var i = this.cache[x];
- zOrder += (i[0].z + i[1].z + i[2].z + i[3].z) / 4;
- }
- /*
- dojo.forEach(this.cache, function(item){
- zOrder += (item[0].z + item[1].z + item[2].z + item[3].z) / 4; });
- */
- return (this.cache.length > 1) ? zOrder / this.cache.length : 0;
- }
+if(this.shape){
+this.shape.clear();
+}else{
+this.shape=this.renderer.createGroup();
+}
+dojo.forEach(this.cache,function(_41){
+this.shape.createPolyline(_41).setStroke(this.strokeStyle).setFill(this.toStdFill(_40,dojox.gfx3d.vector.normalize(_41)));
+},this);
+},getZOrder:function(){
+var _42=0;
+dojo.forEach(this.cache,function(_43){
+_42+=(_43[0].z+_43[1].z+_43[2].z)/3;
+});
+return (this.cache.length>1)?_42/this.cache.length:0;
+}});
+dojo.declare("dojox.gfx3d.Quads",dojox.gfx3d.Object,{constructor:function(){
+this.object=dojo.clone(dojox.gfx3d.defaultQuads);
+},setObject:function(_44,_45){
+this.object=dojox.gfx.makeParameters(this.object,(_44 instanceof Array)?{points:_44,style:_45}:_44);
+return this;
+},render:function(_46){
+var m=dojox.gfx3d.matrix.multiply(_46,this.matrix),i;
+var c=dojo.map(this.object.points,function(_47){
+return dojox.gfx3d.matrix.multiplyPoint(m,_47);
+});
+this.cache=[];
+if(this.object.style=="strip"){
+var _48=c.slice(0,2);
+for(i=2;i<c.length;){
+_48=_48.concat([c[i],c[i+1],_48[0]]);
+this.cache.push(_48);
+_48=_48.slice(2,4);
+i+=2;
+}
+}else{
+for(i=0;i<c.length;){
+this.cache.push([c[i],c[i+1],c[i+2],c[i+3],c[i]]);
+i+=4;
+}
+}
+},draw:function(_49){
+this.cache=dojox.gfx3d.scheduler.bsp(this.cache,function(it){
+return it;
+});
+if(this.shape){
+this.shape.clear();
+}else{
+this.shape=this.renderer.createGroup();
+}
+for(var x=0;x<this.cache.length;x++){
+this.shape.createPolyline(this.cache[x]).setStroke(this.strokeStyle).setFill(this.toStdFill(_49,dojox.gfx3d.vector.normalize(this.cache[x])));
+}
+},getZOrder:function(){
+var _4a=0;
+for(var x=0;x<this.cache.length;x++){
+var i=this.cache[x];
+_4a+=(i[0].z+i[1].z+i[2].z+i[3].z)/4;
+}
+return (this.cache.length>1)?_4a/this.cache.length:0;
+}});
+dojo.declare("dojox.gfx3d.Polygon",dojox.gfx3d.Object,{constructor:function(){
+this.object=dojo.clone(dojox.gfx3d.defaultPolygon);
+},setObject:function(_4b){
+this.object=dojox.gfx.makeParameters(this.object,(_4b instanceof Array)?{path:_4b}:_4b);
+return this;
+},render:function(_4c){
+var m=dojox.gfx3d.matrix.multiply(_4c,this.matrix);
+this.cache=dojo.map(this.object.path,function(_4d){
+return dojox.gfx3d.matrix.multiplyPoint(m,_4d);
});
-
-dojo.declare("dojox.gfx3d.Polygon", dojox.gfx3d.Object, {
- constructor: function(){
- // summary: a generic triangle
- // (this is a helper object, which is defined for convenience)
- this.object = dojo.clone(dojox.gfx3d.defaultPolygon);
- },
-
- setObject: function(newObject){
- // summary: setup the object
- // newObject: Array of points || Object
- this.object = dojox.gfx.makeParameters(this.object, (newObject instanceof Array) ? {path: newObject} : newObject)
- return this;
- },
-
- render: function(camera){
- var m = dojox.gfx3d.matrix.multiply(camera, this.matrix);
- this.cache = dojo.map(this.object.path, function(item){
- return dojox.gfx3d.matrix.multiplyPoint(m, item);
- });
- // add the first point to close the polyline
- this.cache.push(this.cache[0]);
- },
-
- draw: function(lighting){
- if(this.shape){
- this.shape.setShape({points: this.cache});
- }else{
- this.shape = this.renderer.createPolyline({points: this.cache});
- }
-
- this.shape.setStroke(this.strokeStyle)
- .setFill(this.toStdFill(lighting, dojox.gfx3d.matrix.normalize(this.cache)));
- },
-
- getZOrder: function(){
- var zOrder = 0;
- // using naive iteration to speed things up a bit by avoiding function call overhead
- for(var x=0; x<this.cache.length; x++){
- zOrder += this.cache[x].z;
- }
- return (this.cache.length > 1) ? zOrder / this.cache.length : 0;
- },
-
- getOutline: function(){
- return this.cache.slice(0, 3);
- }
+this.cache.push(this.cache[0]);
+},draw:function(_4e){
+if(this.shape){
+this.shape.setShape({points:this.cache});
+}else{
+this.shape=this.renderer.createPolyline({points:this.cache});
+}
+this.shape.setStroke(this.strokeStyle).setFill(this.toStdFill(_4e,dojox.gfx3d.matrix.normalize(this.cache)));
+},getZOrder:function(){
+var _4f=0;
+for(var x=0;x<this.cache.length;x++){
+_4f+=this.cache[x].z;
+}
+return (this.cache.length>1)?_4f/this.cache.length:0;
+},getOutline:function(){
+return this.cache.slice(0,3);
+}});
+dojo.declare("dojox.gfx3d.Cube",dojox.gfx3d.Object,{constructor:function(){
+this.object=dojo.clone(dojox.gfx3d.defaultCube);
+this.polygons=[];
+},setObject:function(_50){
+this.object=dojox.gfx.makeParameters(this.object,_50);
+},render:function(_51){
+var a=this.object.top;
+var g=this.object.bottom;
+var b={x:g.x,y:a.y,z:a.z};
+var c={x:g.x,y:g.y,z:a.z};
+var d={x:a.x,y:g.y,z:a.z};
+var e={x:a.x,y:a.y,z:g.z};
+var f={x:g.x,y:a.y,z:g.z};
+var h={x:a.x,y:g.y,z:g.z};
+var _52=[a,b,c,d,e,f,g,h];
+var m=dojox.gfx3d.matrix.multiply(_51,this.matrix);
+var p=dojo.map(_52,function(_53){
+return dojox.gfx3d.matrix.multiplyPoint(m,_53);
});
-
-dojo.declare("dojox.gfx3d.Cube", dojox.gfx3d.Object, {
- constructor: function(){
- // summary: a generic triangle
- // (this is a helper object, which is defined for convenience)
- this.object = dojo.clone(dojox.gfx3d.defaultCube);
- this.polygons = [];
- },
-
- setObject: function(newObject){
- // summary: setup the object
- // newObject: Array of points || Object
- this.object = dojox.gfx.makeParameters(this.object, newObject);
- },
-
- render: function(camera){
- // parse the top, bottom to get 6 polygons:
- var a = this.object.top;
- var g = this.object.bottom;
- var b = {x: g.x, y: a.y, z: a.z};
- var c = {x: g.x, y: g.y, z: a.z};
- var d = {x: a.x, y: g.y, z: a.z};
- var e = {x: a.x, y: a.y, z: g.z};
- var f = {x: g.x, y: a.y, z: g.z};
- var h = {x: a.x, y: g.y, z: g.z};
- var polygons = [a, b, c, d, e, f, g, h];
- var m = dojox.gfx3d.matrix.multiply(camera, this.matrix);
- var p = dojo.map(polygons, function(item){
- return dojox.gfx3d.matrix.multiplyPoint(m, item);
- });
- a = p[0]; b = p[1]; c = p[2]; d = p[3]; e = p[4]; f = p[5]; g = p[6]; h = p[7];
- this.cache = [[a, b, c, d, a], [e, f, g, h, e], [a, d, h, e, a], [d, c, g, h, d], [c, b, f, g, c], [b, a, e, f, b]];
- },
-
- draw: function(lighting){
- // use bsp to sort.
- this.cache = dojox.gfx3d.scheduler.bsp(this.cache, function(it){ return it; });
- // only the last 3 polys are visible.
- var cache = this.cache.slice(3);
-
- if(this.shape){
- this.shape.clear();
- }else{
- this.shape = this.renderer.createGroup();
- }
- for(var x=0; x<cache.length; x++){
- this.shape.createPolyline(cache[x])
- .setStroke(this.strokeStyle)
- .setFill(this.toStdFill(lighting, dojox.gfx3d.vector.normalize(cache[x])));
- }
- /*
- dojo.forEach(cache, function(item){
- this.shape.createPolyline(item)
- .setStroke(this.strokeStyle)
- .setFill(this.toStdFill(lighting, dojox.gfx3d.vector.normalize(item)));
- }, this);
- */
- },
-
- getZOrder: function(){
- var top = this.cache[0][0];
- var bottom = this.cache[1][2];
- return (top.z + bottom.z) / 2;
- }
+a=p[0];
+b=p[1];
+c=p[2];
+d=p[3];
+e=p[4];
+f=p[5];
+g=p[6];
+h=p[7];
+this.cache=[[a,b,c,d,a],[e,f,g,h,e],[a,d,h,e,a],[d,c,g,h,d],[c,b,f,g,c],[b,a,e,f,b]];
+},draw:function(_54){
+this.cache=dojox.gfx3d.scheduler.bsp(this.cache,function(it){
+return it;
+});
+var _55=this.cache.slice(3);
+if(this.shape){
+this.shape.clear();
+}else{
+this.shape=this.renderer.createGroup();
+}
+for(var x=0;x<_55.length;x++){
+this.shape.createPolyline(_55[x]).setStroke(this.strokeStyle).setFill(this.toStdFill(_54,dojox.gfx3d.vector.normalize(_55[x])));
+}
+},getZOrder:function(){
+var top=this.cache[0][0];
+var _56=this.cache[1][2];
+return (top.z+_56.z)/2;
+}});
+dojo.declare("dojox.gfx3d.Cylinder",dojox.gfx3d.Object,{constructor:function(){
+this.object=dojo.clone(dojox.gfx3d.defaultCylinder);
+},render:function(_57){
+var m=dojox.gfx3d.matrix.multiply(_57,this.matrix);
+var _58=[0,Math.PI/4,Math.PI/3];
+var _59=dojox.gfx3d.matrix.multiplyPoint(m,this.object.center);
+var _5a=dojo.map(_58,function(_5b){
+return {x:this.center.x+this.radius*Math.cos(_5b),y:this.center.y+this.radius*Math.sin(_5b),z:this.center.z};
+},this.object);
+_5a=dojo.map(_5a,function(_5c){
+return dojox.gfx3d.vector.substract(dojox.gfx3d.matrix.multiplyPoint(m,_5c),_59);
+});
+var A={xx:_5a[0].x*_5a[0].y,xy:_5a[0].y*_5a[0].y,xz:1,yx:_5a[1].x*_5a[1].y,yy:_5a[1].y*_5a[1].y,yz:1,zx:_5a[2].x*_5a[2].y,zy:_5a[2].y*_5a[2].y,zz:1,dx:0,dy:0,dz:0};
+var B=dojo.map(_5a,function(_5d){
+return -Math.pow(_5d.x,2);
});
-
-
-dojo.declare("dojox.gfx3d.Cylinder", dojox.gfx3d.Object, {
- constructor: function(){
- this.object = dojo.clone(dojox.gfx3d.defaultCylinder);
- },
-
- render: function(camera){
- // get the bottom surface first
- var m = dojox.gfx3d.matrix.multiply(camera, this.matrix);
- var angles = [0, Math.PI/4, Math.PI/3];
- var center = dojox.gfx3d.matrix.multiplyPoint(m, this.object.center);
- var marks = dojo.map(angles, function(item){
- return {x: this.center.x + this.radius * Math.cos(item),
- y: this.center.y + this.radius * Math.sin(item), z: this.center.z};
- }, this.object);
-
- marks = dojo.map(marks, function(item){
- return dojox.gfx3d.vector.substract(dojox.gfx3d.matrix.multiplyPoint(m, item), center);
- });
-
- // Use the algorithm here:
- // http://www.3dsoftware.com/Math/PlaneCurves/EllipseAlgebra/
- // After we normalize the marks, the equation is:
- // a x^2 + 2b xy + cy^2 + f = 0: let a = 1
- // so the final equation is:
- // [ xy, y^2, 1] * [2b, c, f]' = [ -x^2 ]'
-
- var A = {
- xx: marks[0].x * marks[0].y, xy: marks[0].y * marks[0].y, xz: 1,
- yx: marks[1].x * marks[1].y, yy: marks[1].y * marks[1].y, yz: 1,
- zx: marks[2].x * marks[2].y, zy: marks[2].y * marks[2].y, zz: 1,
- dx: 0, dy: 0, dz: 0
- };
- var b = dojo.map(marks, function(item){
- return -Math.pow(item.x, 2);
- });
-
- // X is 2b, c, f
- var X = dojox.gfx3d.matrix.multiplyPoint(dojox.gfx3d.matrix.invert(A), b[0], b[1], b[2]);
- var theta = Math.atan2(X.x, 1 - X.y) / 2;
-
- // rotate the marks back to the canonical form
- var probes = dojo.map(marks, function(item){
- return dojox.gfx.matrix.multiplyPoint(dojox.gfx.matrix.rotate(-theta), item.x, item.y);
- });
-
- // we are solving the equation: Ax = b
- // A = [x^2, y^2] X = [1/a^2, 1/b^2]', b = [1, 1]'
- // so rx = Math.sqrt(1/ ( inv(A)[1:] * b ) );
- // so ry = Math.sqrt(1/ ( inv(A)[2:] * b ) );
-
- var a = Math.pow(probes[0].x, 2);
- var b = Math.pow(probes[0].y, 2);
- var c = Math.pow(probes[1].x, 2);
- var d = Math.pow(probes[1].y, 2);
-
- // the invert matrix is
- // 1/(ad - bc) [ d, -b; -c, a];
- var rx = Math.sqrt((a * d - b * c) / (d - b));
- var ry = Math.sqrt((a * d - b * c) / (a - c));
- if(rx < ry){
- var t = rx;
- rx = ry;
- ry = t;
- theta -= Math.PI/2;
- }
-
- var top = dojox.gfx3d.matrix.multiplyPoint(m,
- dojox.gfx3d.vector.sum(this.object.center, {x: 0, y:0, z: this.object.height}));
-
- var gradient = this.fillStyle.type == "constant" ? this.fillStyle.color
- : dojox.gfx3d.gradient(this.renderer.lighting, this.fillStyle, this.object.center, this.object.radius, Math.PI, 2 * Math.PI, m);
- if(isNaN(rx) || isNaN(ry) || isNaN(theta)){
- // in case the cap is invisible (parallel to the incident vector)
- rx = this.object.radius, ry = 0, theta = 0;
- }
- this.cache = {center: center, top: top, rx: rx, ry: ry, theta: theta, gradient: gradient};
- },
-
- draw: function(){
- var c = this.cache, v = dojox.gfx3d.vector, m = dojox.gfx.matrix,
- centers = [c.center, c.top], normal = v.substract(c.top, c.center);
- if(v.dotProduct(normal, this.renderer.lighting.incident) > 0){
- centers = [c.top, c.center];
- normal = v.substract(c.center, c.top);
- }
-
- var color = this.renderer.lighting[this.fillStyle.type](normal, this.fillStyle.finish, this.fillStyle.color),
- d = Math.sqrt( Math.pow(c.center.x - c.top.x, 2) + Math.pow(c.center.y - c.top.y, 2) );
-
- if(this.shape){
- this.shape.clear();
- }else{
- this.shape = this.renderer.createGroup();
- }
-
- this.shape.createPath("")
- .moveTo(0, -c.rx)
- .lineTo(d, -c.rx)
- .lineTo(d, c.rx)
- .lineTo(0, c.rx)
- .arcTo(c.ry, c.rx, 0, true, true, 0, -c.rx)
- .setFill(c.gradient).setStroke(this.strokeStyle)
- .setTransform([m.translate(centers[0]),
- m.rotate(Math.atan2(centers[1].y - centers[0].y, centers[1].x - centers[0].x))]);
-
- if(c.rx > 0 && c.ry > 0){
- this.shape.createEllipse({cx: centers[1].x, cy: centers[1].y, rx: c.rx, ry: c.ry})
- .setFill(color).setStroke(this.strokeStyle)
- .applyTransform(m.rotateAt(c.theta, centers[1]));
- }
- }
+var X=dojox.gfx3d.matrix.multiplyPoint(dojox.gfx3d.matrix.invert(A),B[0],B[1],B[2]);
+var _5e=Math.atan2(X.x,1-X.y)/2;
+var _5f=dojo.map(_5a,function(_60){
+return dojox.gfx.matrix.multiplyPoint(dojox.gfx.matrix.rotate(-_5e),_60.x,_60.y);
});
-
-
-// the ultimate container of 3D world
-dojo.declare("dojox.gfx3d.Viewport", dojox.gfx.Group, {
- constructor: function(){
- // summary: a viewport/container for 3D objects, which knows
- // the camera and lightings
-
- // matrix: dojox.gfx3d.matrix: world transform
- // dimension: Object: the dimension of the canvas
- this.dimension = null;
-
- // objects: Array: all 3d Objects
- this.objects = [];
- // todos: Array: all 3d Objects that needs to redraw
- this.todos = [];
-
- // FIXME: memory leak?
- this.renderer = this;
- // Using zOrder as the default scheduler
- this.schedule = dojox.gfx3d.scheduler.zOrder;
- this.draw = dojox.gfx3d.drawer.conservative;
- // deep: boolean, true means the whole viewport needs to re-render, redraw
- this.deep = false;
-
- // lights: Array: an array of light objects
- this.lights = [];
- this.lighting = null;
- },
-
- setCameraTransform: function(matrix){
- // summary: sets a transformation matrix
- // matrix: dojox.gfx3d.matrix.Matrix: a matrix or a matrix-like object
- // (see an argument of dojox.gfx.matrix.Matrix
- // constructor for a list of acceptable arguments)
- this.camera = dojox.gfx3d.matrix.clone(matrix ? dojox.gfx3d.matrix.normalize(matrix) : dojox.gfx3d.identity, true);
- this.invalidate();
- return this; // self
- },
-
- applyCameraRightTransform: function(matrix){
- // summary: multiplies the existing matrix with an argument on right side
- // (this.matrix * matrix)
- // matrix: dojox.gfx3d.matrix.Matrix: a matrix or a matrix-like object
- // (see an argument of dojox.gfx3d.matrix.Matrix
- // constructor for a list of acceptable arguments)
- return matrix ? this.setCameraTransform([this.camera, matrix]) : this; // self
- },
-
- applyCameraLeftTransform: function(matrix){
- // summary: multiplies the existing matrix with an argument on left side
- // (matrix * this.matrix)
- // matrix: dojox.gfx3d.matrix.Matrix: a matrix or a matrix-like object
- // (see an argument of dojox.gfx3d.matrix.Matrix
- // constructor for a list of acceptable arguments)
- return matrix ? this.setCameraTransform([matrix, this.camera]) : this; // self
- },
-
- applyCameraTransform: function(matrix){
- // summary: a shortcut for dojox.gfx3d.Object.applyRightTransform
- // matrix: dojox.gfx3d.matrix.Matrix: a matrix or a matrix-like object
- // (see an argument of dojox.gfx3d.matrix.Matrix
- // constructor for a list of acceptable arguments)
- return this.applyCameraRightTransform(matrix); // self
- },
-
- setLights: function(/* Array || Object */lights, /* Color, optional */ ambient,
- /* Color, optional */ specular){
- // summary: set the lights
- // lights: Array: an array of light object
- // or lights object
- // ambient: Color: an ambient object
- // specular: Color: an specular object
- this.lights = (lights instanceof Array) ? {sources: lights, ambient: ambient, specular: specular} : lights;
- var view = {x: 0, y: 0, z: 1};
-
- this.lighting = new dojox.gfx3d.lighting.Model(view, this.lights.sources,
- this.lights.ambient, this.lights.specular);
- this.invalidate();
- return this;
- },
-
- addLights: function(lights){
- // summary: add new light/lights to the viewport.
- // lights: Array || light object: light object(s)
- return this.setLights(this.lights.sources.concat(lights));
- },
-
- addTodo: function(newObject){
- // NOTE: Viewport implements almost the same addTodo,
- // except calling invalidate, since invalidate is used as
- // any modification needs to redraw the object itself, call invalidate.
- // then call render.
- if(dojo.every(this.todos, function(item){
- return item != newObject; })){
- this.todos.push(newObject);
- }
- },
-
- invalidate: function(){
- this.deep = true;
- this.todos = this.objects;
- },
-
- setDimensions: function(dim){
- if(dim){
- this.dimension = {
- width: typeof dim.width == "string" ? parseInt(dim.width) : dim.width,
- height: typeof dim.height == "string" ? parseInt(dim.height) : dim.height
- };
- }else{
- this.dimension = null;
- }
- },
-
- render: function(){
- // summary: iterate all children and call their render callback function.
- if(this.todos.length == 0){ return; }
- var m = dojox.gfx3d.matrix;
-
- // Iterate the todos and call render to prepare the rendering:
- for(var x=0; x<this.todos.length; x++){
- this.todos[x].render(dojox.gfx3d.matrix.normalize([
- m.cameraRotateXg(180),
- m.cameraTranslate(0, this.dimension.height, 0),
- this.camera,
- ]), this.deep);
- }
-
- this.objects = this.schedule(this.objects);
- this.draw(this.todos, this.objects, this);
- this.todos = [];
- this.deep = false;
- }
-
-});
-
-//FIXME: Viewport cannot masquerade as a Group
-dojox.gfx3d.Viewport.nodeType = dojox.gfx.Group.nodeType;
-
-dojox.gfx3d._creators = {
- // summary: object creators
- createEdges: function(edges, style){
- // summary: creates an edge object
- // line: Object: a edge object (see dojox.gfx3d.defaultPath)
- return this.create3DObject(dojox.gfx3d.Edges, edges, style); // dojox.gfx3d.Edge
- },
- createTriangles: function(tris, style){
- // summary: creates an edge object
- // line: Object: a edge object (see dojox.gfx3d.defaultPath)
- return this.create3DObject(dojox.gfx3d.Triangles, tris, style); // dojox.gfx3d.Edge
- },
- createQuads: function(quads, style){
- // summary: creates an edge object
- // line: Object: a edge object (see dojox.gfx3d.defaultPath)
- return this.create3DObject(dojox.gfx3d.Quads, quads, style); // dojox.gfx3d.Edge
- },
- createPolygon: function(points){
- // summary: creates an triangle object
- // points: Array of points || Object
- return this.create3DObject(dojox.gfx3d.Polygon, points); // dojox.gfx3d.Polygon
- },
-
- createOrbit: function(orbit){
- // summary: creates an triangle object
- // points: Array of points || Object
- return this.create3DObject(dojox.gfx3d.Orbit, orbit); // dojox.gfx3d.Cube
- },
-
- createCube: function(cube){
- // summary: creates an triangle object
- // points: Array of points || Object
- return this.create3DObject(dojox.gfx3d.Cube, cube); // dojox.gfx3d.Cube
- },
-
- createCylinder: function(cylinder){
- // summary: creates an triangle object
- // points: Array of points || Object
- return this.create3DObject(dojox.gfx3d.Cylinder, cylinder); // dojox.gfx3d.Cube
- },
-
- createPath3d: function(path){
- // summary: creates an edge object
- // line: Object: a edge object (see dojox.gfx3d.defaultPath)
- return this.create3DObject(dojox.gfx3d.Path3d, path); // dojox.gfx3d.Edge
- },
- createScene: function(){
- // summary: creates an triangle object
- // line: Object: a triangle object (see dojox.gfx3d.defaultPath)
- return this.create3DObject(dojox.gfx3d.Scene); // dojox.gfx3d.Scene
- },
-
- create3DObject: function(objectType, rawObject, style){
- // summary: creates an instance of the passed shapeType class
- // shapeType: Function: a class constructor to create an instance of
- // rawShape: Object: properties to be passed in to the classes "setShape" method
- var obj = new objectType();
- this.adopt(obj);
- if(rawObject){ obj.setObject(rawObject, style); }
- return obj; // dojox.gfx3d.Object
- },
- // todo : override the add/remove if necessary
- adopt: function(obj){
- // summary: adds a shape to the list
- // shape: dojox.gfx.Shape: a shape
- obj.renderer = this.renderer; // obj._setParent(this, null); more TODOs HERER?
- obj.parent = this;
- this.objects.push(obj);
- this.addTodo(obj);
- return this;
- },
- abandon: function(obj, silently){
- // summary: removes a shape from the list
- // silently: Boolean?: if true, do not redraw a picture yet
- for(var i = 0; i < this.objects.length; ++i){
- if(this.objects[i] == obj){
- this.objects.splice(i, 1);
- }
- }
- // if(this.rawNode == shape.rawNode.parentNode){
- // this.rawNode.removeChild(shape.rawNode);
- // }
- // obj._setParent(null, null);
- obj.parent = null;
- return this; // self
- },
-
-
- setScheduler: function(scheduler){
- this.schedule = scheduler;
- },
-
- setDrawer: function(drawer){
- this.draw = drawer;
- }
-};
-
-dojo.extend(dojox.gfx3d.Viewport, dojox.gfx3d._creators);
-dojo.extend(dojox.gfx3d.Scene, dojox.gfx3d._creators);
+var a=Math.pow(_5f[0].x,2);
+var b=Math.pow(_5f[0].y,2);
+var c=Math.pow(_5f[1].x,2);
+var d=Math.pow(_5f[1].y,2);
+var rx=Math.sqrt((a*d-b*c)/(d-b));
+var ry=Math.sqrt((a*d-b*c)/(a-c));
+if(rx<ry){
+var t=rx;
+rx=ry;
+ry=t;
+_5e-=Math.PI/2;
+}
+var top=dojox.gfx3d.matrix.multiplyPoint(m,dojox.gfx3d.vector.sum(this.object.center,{x:0,y:0,z:this.object.height}));
+var _61=this.fillStyle.type=="constant"?this.fillStyle.color:dojox.gfx3d.gradient(this.renderer.lighting,this.fillStyle,this.object.center,this.object.radius,Math.PI,2*Math.PI,m);
+if(isNaN(rx)||isNaN(ry)||isNaN(_5e)){
+rx=this.object.radius,ry=0,_5e=0;
+}
+this.cache={center:_59,top:top,rx:rx,ry:ry,theta:_5e,gradient:_61};
+},draw:function(){
+var c=this.cache,v=dojox.gfx3d.vector,m=dojox.gfx.matrix,_62=[c.center,c.top],_63=v.substract(c.top,c.center);
+if(v.dotProduct(_63,this.renderer.lighting.incident)>0){
+_62=[c.top,c.center];
+_63=v.substract(c.center,c.top);
+}
+var _64=this.renderer.lighting[this.fillStyle.type](_63,this.fillStyle.finish,this.fillStyle.color),d=Math.sqrt(Math.pow(c.center.x-c.top.x,2)+Math.pow(c.center.y-c.top.y,2));
+if(this.shape){
+this.shape.clear();
+}else{
+this.shape=this.renderer.createGroup();
+}
+this.shape.createPath("").moveTo(0,-c.rx).lineTo(d,-c.rx).lineTo(d,c.rx).lineTo(0,c.rx).arcTo(c.ry,c.rx,0,true,true,0,-c.rx).setFill(c.gradient).setStroke(this.strokeStyle).setTransform([m.translate(_62[0]),m.rotate(Math.atan2(_62[1].y-_62[0].y,_62[1].x-_62[0].x))]);
+if(c.rx>0&&c.ry>0){
+this.shape.createEllipse({cx:_62[1].x,cy:_62[1].y,rx:c.rx,ry:c.ry}).setFill(_64).setStroke(this.strokeStyle).applyTransform(m.rotateAt(c.theta,_62[1]));
+}
+}});
+dojo.declare("dojox.gfx3d.Viewport",dojox.gfx.Group,{constructor:function(){
+this.dimension=null;
+this.objects=[];
+this.todos=[];
+this.renderer=this;
+this.schedule=dojox.gfx3d.scheduler.zOrder;
+this.draw=dojox.gfx3d.drawer.conservative;
+this.deep=false;
+this.lights=[];
+this.lighting=null;
+},setCameraTransform:function(_65){
+this.camera=dojox.gfx3d.matrix.clone(_65?dojox.gfx3d.matrix.normalize(_65):dojox.gfx3d.identity,true);
+this.invalidate();
+return this;
+},applyCameraRightTransform:function(_66){
+return _66?this.setCameraTransform([this.camera,_66]):this;
+},applyCameraLeftTransform:function(_67){
+return _67?this.setCameraTransform([_67,this.camera]):this;
+},applyCameraTransform:function(_68){
+return this.applyCameraRightTransform(_68);
+},setLights:function(_69,_6a,_6b){
+this.lights=(_69 instanceof Array)?{sources:_69,ambient:_6a,specular:_6b}:_69;
+var _6c={x:0,y:0,z:1};
+this.lighting=new dojox.gfx3d.lighting.Model(_6c,this.lights.sources,this.lights.ambient,this.lights.specular);
+this.invalidate();
+return this;
+},addLights:function(_6d){
+return this.setLights(this.lights.sources.concat(_6d));
+},addTodo:function(_6e){
+if(dojo.every(this.todos,function(_6f){
+return _6f!=_6e;
+})){
+this.todos.push(_6e);
+}
+},invalidate:function(){
+this.deep=true;
+this.todos=this.objects;
+},setDimensions:function(dim){
+if(dim){
+var w=dojo.isString(dim.width)?parseInt(dim.width):dim.width;
+var h=dojo.isString(dim.height)?parseInt(dim.height):dim.height;
+var trs=this.rawNode.style;
+trs.height=h;
+trs.width=w;
+this.dimension={width:w,height:h};
+}else{
+this.dimension=null;
+}
+},render:function(){
+if(!this.todos.length){
+return;
+}
+var m=dojox.gfx3d.matrix;
+for(var x=0;x<this.todos.length;x++){
+this.todos[x].render(dojox.gfx3d.matrix.normalize([m.cameraRotateXg(180),m.cameraTranslate(0,this.dimension.height,0),this.camera]),this.deep);
+}
+this.objects=this.schedule(this.objects);
+this.draw(this.todos,this.objects,this);
+this.todos=[];
+this.deep=false;
+}});
+dojox.gfx3d.Viewport.nodeType=dojox.gfx.Group.nodeType;
+dojox.gfx3d._creators={createEdges:function(_70,_71){
+return this.create3DObject(dojox.gfx3d.Edges,_70,_71);
+},createTriangles:function(_72,_73){
+return this.create3DObject(dojox.gfx3d.Triangles,_72,_73);
+},createQuads:function(_74,_75){
+return this.create3DObject(dojox.gfx3d.Quads,_74,_75);
+},createPolygon:function(_76){
+return this.create3DObject(dojox.gfx3d.Polygon,_76);
+},createOrbit:function(_77){
+return this.create3DObject(dojox.gfx3d.Orbit,_77);
+},createCube:function(_78){
+return this.create3DObject(dojox.gfx3d.Cube,_78);
+},createCylinder:function(_79){
+return this.create3DObject(dojox.gfx3d.Cylinder,_79);
+},createPath3d:function(_7a){
+return this.create3DObject(dojox.gfx3d.Path3d,_7a);
+},createScene:function(){
+return this.create3DObject(dojox.gfx3d.Scene);
+},create3DObject:function(_7b,_7c,_7d){
+var obj=new _7b();
+this.adopt(obj);
+if(_7c){
+obj.setObject(_7c,_7d);
+}
+return obj;
+},adopt:function(obj){
+obj.renderer=this.renderer;
+obj.parent=this;
+this.objects.push(obj);
+this.addTodo(obj);
+return this;
+},abandon:function(obj,_7e){
+for(var i=0;i<this.objects.length;++i){
+if(this.objects[i]==obj){
+this.objects.splice(i,1);
+}
+}
+obj.parent=null;
+return this;
+},setScheduler:function(_7f){
+this.schedule=_7f;
+},setDrawer:function(_80){
+this.draw=_80;
+}};
+dojo.extend(dojox.gfx3d.Viewport,dojox.gfx3d._creators);
+dojo.extend(dojox.gfx3d.Scene,dojox.gfx3d._creators);
delete dojox.gfx3d._creators;
-
-
-//FIXME: extending dojox.gfx.Surface and masquerading Viewport as Group is hacky!
-
-// Add createViewport to dojox.gfx.Surface
-dojo.extend(dojox.gfx.Surface, {
- createViewport: function(){
- //FIXME: createObject is non-public method!
- var viewport = this.createObject(dojox.gfx3d.Viewport, null, true);
- //FIXME: this may not work with dojox.gfx.Group !!
- viewport.setDimensions(this.getDimensions());
- return viewport;
- }
-});
-
+dojo.extend(dojox.gfx.Surface,{createViewport:function(){
+var _81=this.createObject(dojox.gfx3d.Viewport,null,true);
+_81.setDimensions(this.getDimensions());
+return _81;
+}});
}
diff --git a/js/dojo/dojox/gfx3d/scheduler.js b/js/dojo/dojox/gfx3d/scheduler.js
--- a/js/dojo/dojox/gfx3d/scheduler.js
+++ b/js/dojo/dojox/gfx3d/scheduler.js
@@ -1,126 +1,93 @@
-if(!dojo._hasResource["dojox.gfx3d.scheduler"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.gfx3d.scheduler"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.gfx3d.scheduler"]){
+dojo._hasResource["dojox.gfx3d.scheduler"]=true;
dojo.provide("dojox.gfx3d.scheduler");
dojo.provide("dojox.gfx3d.drawer");
dojo.require("dojox.gfx3d.vector");
-
-dojo.mixin(dojox.gfx3d.scheduler, {
- zOrder: function(buffer, order){
- order = order ? order : dojox.gfx3d.scheduler.order;
- buffer.sort(function(a, b){
- return order(b) - order(a);
- });
- return buffer;
- },
-
- bsp: function(buffer, outline){
- console.debug("BSP scheduler");
- outline = outline ? outline : dojox.gfx3d.scheduler.outline;
- var p = new dojox.gfx3d.scheduler.BinarySearchTree(buffer[0], outline);
- dojo.forEach(buffer.slice(1), function(item){ p.add(item, outline); });
- return p.iterate(outline);
- },
-
- // default implementation
- order: function(it){
- return it.getZOrder();
- },
-
- outline: function(it){
- return it.getOutline();
- }
-
+dojo.mixin(dojox.gfx3d.scheduler,{zOrder:function(_1,_2){
+_2=_2?_2:dojox.gfx3d.scheduler.order;
+_1.sort(function(a,b){
+return _2(b)-_2(a);
+});
+return _1;
+},bsp:function(_3,_4){
+_4=_4?_4:dojox.gfx3d.scheduler.outline;
+var p=new dojox.gfx3d.scheduler.BinarySearchTree(_3[0],_4);
+dojo.forEach(_3.slice(1),function(_5){
+p.add(_5,_4);
});
-
-dojo.declare("dojox.gfx3d.scheduler.BinarySearchTree", null, {
- constructor: function(obj, outline){
- // summary: build the binary search tree, using binary space partition algorithm.
- // The idea is for any polygon, for example, (a, b, c), the space is divided by
- // the plane into two space: plus and minus.
- //
- // for any arbitary vertex p, if(p - a) dotProduct n = 0, p is inside the plane,
- // > 0, p is in the plus space, vice versa for minus space.
- // n is the normal vector that is perpendicular the plate, defined as:
- // n = ( b - a) crossProduct ( c - a )
- //
- // in this implementation, n is declared as normal, ,a is declared as orient.
- //
- // obj: object: dojox.gfx3d.Object
- this.plus = null;
- this.minus = null;
- this.object = obj;
-
- var o = outline(obj);
- this.orient = o[0];
- this.normal = dojox.gfx3d.vector.normalize(o);
- },
-
- add: function(obj, outline){
- var epsilon = 0.5, o = outline(obj), v = dojox.gfx3d.vector, n = this.normal, a = this.orient;
-
- if(dojo.every(o, function(item){ return Math.floor(epsilon + v.dotProduct(n, v.substract(item, a))) <= 0; })){
- if(this.minus){
- this.minus.add(obj, outline);
- } else {
- this.minus = new dojox.gfx3d.scheduler.BinarySearchTree(obj, outline);
- }
- } else if(dojo.every(o, function(item){ return Math.floor(epsilon + v.dotProduct(n, v.substract(item, a))) >= 0; })){
- if(this.plus){
- this.plus.add(obj, outline);
- } else {
- this.plus = new dojox.gfx3d.scheduler.BinarySearchTree(obj, outline);
- }
- } else {
- dojo.forEach(o, function(item){ console.debug(v.dotProduct(n, v.substract(item, a))); });
- throw "The case: polygon cross siblings' plate is not implemneted yet";
- }
- },
-
- iterate: function(outline){
- var epsilon = 0.5;
- var v = dojox.gfx3d.vector;
- var sorted = [];
- var subs = null;
- // FIXME: using Infinity here?
- var view = {x: 0, y: 0, z: -10000};
- if(Math.floor( epsilon + v.dotProduct(this.normal, v.substract(view, this.orient))) <= 0){
- subs = [this.plus, this.minus];
- } else {
- subs = [this.minus, this.plus];
- }
-
- if(subs[0]){
- sorted = sorted.concat(subs[0].iterate());
- }
- sorted.push(this.object);
- if(subs[1]){
- sorted = sorted.concat(subs[1].iterate());
- }
- return sorted;
- }
-
+return p.iterate(_4);
+},order:function(it){
+return it.getZOrder();
+},outline:function(it){
+return it.getOutline();
+}});
+dojo.declare("dojox.gfx3d.scheduler.BinarySearchTree",null,{constructor:function(_6,_7){
+this.plus=null;
+this.minus=null;
+this.object=_6;
+var o=_7(_6);
+this.orient=o[0];
+this.normal=dojox.gfx3d.vector.normalize(o);
+},add:function(_8,_9){
+var _a=0.5,o=_9(_8),v=dojox.gfx3d.vector,n=this.normal,a=this.orient,_b=dojox.gfx3d.scheduler.BinarySearchTree;
+if(dojo.every(o,function(_c){
+return Math.floor(_a+v.dotProduct(n,v.substract(_c,a)))<=0;
+})){
+if(this.minus){
+this.minus.add(_8,_9);
+}else{
+this.minus=new _b(_8,_9);
+}
+}else{
+if(dojo.every(o,function(_d){
+return Math.floor(_a+v.dotProduct(n,v.substract(_d,a)))>=0;
+})){
+if(this.plus){
+this.plus.add(_8,_9);
+}else{
+this.plus=new _b(_8,_9);
+}
+}else{
+throw "The case: polygon cross siblings' plate is not implemneted yet";
+}
+}
+},iterate:function(_e){
+var _f=0.5;
+var v=dojox.gfx3d.vector;
+var _10=[];
+var _11=null;
+var _12={x:0,y:0,z:-10000};
+if(Math.floor(_f+v.dotProduct(this.normal,v.substract(_12,this.orient)))<=0){
+_11=[this.plus,this.minus];
+}else{
+_11=[this.minus,this.plus];
+}
+if(_11[0]){
+_10=_10.concat(_11[0].iterate());
+}
+_10.push(this.object);
+if(_11[1]){
+_10=_10.concat(_11[1].iterate());
+}
+return _10;
+}});
+dojo.mixin(dojox.gfx3d.drawer,{conservative:function(_13,_14,_15){
+dojo.forEach(this.objects,function(_16){
+_16.destroy();
});
-
-dojo.mixin(dojox.gfx3d.drawer, {
- conservative: function(todos, objects, viewport){
- console.debug('conservative draw');
- dojo.forEach(this.objects, function(item){
- item.destroy();
- });
- dojo.forEach(objects, function(item){
- item.draw(viewport.lighting);
- });
- },
- chart: function(todos, objects, viewport){
- // NOTE: ondemand may require the todos' objects to use setShape
- // to redraw themselves to maintain the z-order.
- console.debug('chart draw');
- dojo.forEach(this.todos, function(item){
- item.draw(viewport.lighting);
- });
- }
- // More aggrasive optimization may re-order the DOM nodes using the order
- // of objects, and only elements of todos call setShape.
+dojo.forEach(_14,function(_17){
+_17.draw(_15.lighting);
});
-
+},chart:function(_18,_19,_1a){
+dojo.forEach(this.todos,function(_1b){
+_1b.draw(_1a.lighting);
+});
+}});
}
diff --git a/js/dojo/dojox/gfx3d/vector.js b/js/dojo/dojox/gfx3d/vector.js
--- a/js/dojo/dojox/gfx3d/vector.js
+++ b/js/dojo/dojox/gfx3d/vector.js
@@ -1,110 +1,61 @@
-if(!dojo._hasResource["dojox.gfx3d.vector"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.gfx3d.vector"] = true;
-dojo.provide("dojox.gfx3d.vector");
-
-dojo.mixin(dojox.gfx3d.vector, {
- sum: function(){
- // summary: sum of the vectors
- var v = {x: 0, y: 0, z:0};
- dojo.forEach(arguments, function(item){ v.x += item.x; v.y += item.y; v.z += item.z; });
- return v;
- },
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- center: function(){
- // summary: center of the vectors
- var l = arguments.length;
- if(l == 0){
- return {x: 0, y: 0, z: 0};
- }
- var v = dojox.gfx3d.vector.sum(arguments);
- return {x: v.x/l, y: v.y/l, z: v.z/l};
- },
-
- substract: function(/* Pointer */a, /* Pointer */b){
- return {x: a.x - b.x, y: a.y - b.y, z: a.z - b.z};
- },
-
- _crossProduct: function(x, y, z, u, v, w){
- // summary: applies a cross product of two vectorss, (x, y, z) and (u, v, w)
- // x: Number: an x coordinate of a point
- // y: Number: a y coordinate of a point
- // z: Number: a z coordinate of a point
- // u: Number: an x coordinate of a point
- // v: Number: a y coordinate of a point
- // w: Number: a z coordinate of a point
- return {x: y * w - z * v, y: z * u - x * w, z: x * v - y * u}; // Object
- },
- crossProduct: function(/* Number||Point */ a, /* Number||Point */ b, /* Number, optional */ c, /* Number, optional */ d, /* Number, optional */ e, /* Number, optional */ f){
- // summary: applies a matrix to a point
- // matrix: dojox.gfx3d.matrix.Matrix3D: a 3D matrix object to be applied
- // a: Number: an x coordinate of a point
- // b: Number: a y coordinate of a point
- // c: Number: a z coordinate of a point
- // d: Number: an x coordinate of a point
- // e: Number: a y coordinate of a point
- // f: Number: a z coordinate of a point
- if(arguments.length == 6 && dojo.every(arguments, function(item){ return typeof item == "number"; })){
- return dojox.gfx3d.vector._crossProduct(a, b, c, d, e, f); // Object
- }
- // branch
- // a: Object: a point
- // b: Object: a point
- // c: null
- // d: null
- // e: null
- // f: null
- return dojox.gfx3d.vector._crossProduct(a.x, a.y, a.z, b.x, b.y, b.z); // Object
- },
-
- _dotProduct: function(x, y, z, u, v, w){
- // summary: applies a cross product of two vectorss, (x, y, z) and (u, v, w)
- // x: Number: an x coordinate of a point
- // y: Number: a y coordinate of a point
- // z: Number: a z coordinate of a point
- // u: Number: an x coordinate of a point
- // v: Number: a y coordinate of a point
- // w: Number: a z coordinate of a point
- return x * u + y * v + z * w; // Number
- },
- dotProduct: function(/* Number||Point */ a, /* Number||Point */ b, /* Number, optional */ c, /* Number, optional */ d, /* Number, optional */ e, /* Number, optional */ f){
- // summary: applies a matrix to a point
- // matrix: dojox.gfx3d.matrix.Matrix3D: a 3D matrix object to be applied
- // a: Number: an x coordinate of a point
- // b: Number: a y coordinate of a point
- // c: Number: a z coordinate of a point
- // d: Number: an x coordinate of a point
- // e: Number: a y coordinate of a point
- // f: Number: a z coordinate of a point
- if(arguments.length == 6 && dojo.every(arguments, function(item){ return typeof item == "number"; })){
- return dojox.gfx3d.vector._dotProduct(a, b, c, d, e, f); // Object
- }
- // branch
- // a: Object: a point
- // b: Object: a point
- // c: null
- // d: null
- // e: null
- // f: null
- return dojox.gfx3d.vector._dotProduct(a.x, a.y, a.z, b.x, b.y, b.z); // Object
- },
-
- normalize: function(/* Point||Array*/ a, /* Point */ b, /* Point */ c){
- // summary: find the normal of the implicit surface
- // a: Object: a point
- // b: Object: a point
- // c: Object: a point
- var l, m, n;
- if(a instanceof Array){
- l = a[0]; m = a[1]; n = a[2];
- }else{
- l = a; m = b; n = c;
- }
-
- var u = dojox.gfx3d.vector.substract(m, l);
- var v = dojox.gfx3d.vector.substract(n, l);
- return dojox.gfx3d.vector.crossProduct(u, v);
- }
+if(!dojo._hasResource["dojox.gfx3d.vector"]){
+dojo._hasResource["dojox.gfx3d.vector"]=true;
+dojo.provide("dojox.gfx3d.vector");
+dojo.mixin(dojox.gfx3d.vector,{sum:function(){
+var v={x:0,y:0,z:0};
+dojo.forEach(arguments,function(_1){
+v.x+=_1.x;
+v.y+=_1.y;
+v.z+=_1.z;
});
-
+return v;
+},center:function(){
+var l=arguments.length;
+if(l==0){
+return {x:0,y:0,z:0};
+}
+var v=dojox.gfx3d.vector.sum(arguments);
+return {x:v.x/l,y:v.y/l,z:v.z/l};
+},substract:function(a,b){
+return {x:a.x-b.x,y:a.y-b.y,z:a.z-b.z};
+},_crossProduct:function(x,y,z,u,v,w){
+return {x:y*w-z*v,y:z*u-x*w,z:x*v-y*u};
+},crossProduct:function(a,b,c,d,e,f){
+if(arguments.length==6&&dojo.every(arguments,function(_2){
+return typeof _2=="number";
+})){
+return dojox.gfx3d.vector._crossProduct(a,b,c,d,e,f);
}
+return dojox.gfx3d.vector._crossProduct(a.x,a.y,a.z,b.x,b.y,b.z);
+},_dotProduct:function(x,y,z,u,v,w){
+return x*u+y*v+z*w;
+},dotProduct:function(a,b,c,d,e,f){
+if(arguments.length==6&&dojo.every(arguments,function(_3){
+return typeof _3=="number";
+})){
+return dojox.gfx3d.vector._dotProduct(a,b,c,d,e,f);
+}
+return dojox.gfx3d.vector._dotProduct(a.x,a.y,a.z,b.x,b.y,b.z);
+},normalize:function(a,b,c){
+var l,m,n;
+if(a instanceof Array){
+l=a[0];
+m=a[1];
+n=a[2];
+}else{
+l=a;
+m=b;
+n=c;
+}
+var u=dojox.gfx3d.vector.substract(m,l);
+var v=dojox.gfx3d.vector.substract(n,l);
+return dojox.gfx3d.vector.crossProduct(u,v);
+}});
+}
diff --git a/js/dojo/dojox/grid/README b/js/dojo/dojox/grid/README
--- a/js/dojo/dojox/grid/README
+++ b/js/dojo/dojox/grid/README
@@ -1,39 +1,48 @@
-------------------------------------------------------------------------------
dojox.grid
-------------------------------------------------------------------------------
Version 1.00
Release date: 10/04/2007
-------------------------------------------------------------------------------
Project state:
beta
-------------------------------------------------------------------------------
Credits
Scott J. Miles (sjmiles@activegrid.com)
Steve Orvell (sorvell@activegrid.com)
+ Bryan Forbes (bryan AT reigndropsfall.net)
-------------------------------------------------------------------------------
Project description
TurboGrid has been made available in Dojo and is now the dojox.grid!
-------------------------------------------------------------------------------
Dependencies:
Dojo Core
+Dojo Base (dnd)
Dijit Templated Widget
+dojox.html (metrics)
-------------------------------------------------------------------------------
Documentation
None available for this version yet.
See http://www.turboajax.com/products/turbogrid/ for legacy documentation.
-------------------------------------------------------------------------------
Installation instructions
Grab the following from the Dojo SVN Repository:
http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/grid/*
+http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/html/*
Install into the following directory structure:
/dojox/grid/
+/dojox/html/
...which should be at the same level as your Dojo checkout.
+
+If you wish us use the old (compat / 1.2) grid, you can untar the
+compatGrid.tar.gz archive. This version of the grid is no longer maintained
+or updated - but should work with any newer version of the dojo library.
-------------------------------------------------------------------------------
diff --git a/js/dojo/dojox/image/Gallery.js b/js/dojo/dojox/image/Gallery.js
--- a/js/dojo/dojox/image/Gallery.js
+++ b/js/dojo/dojox/image/Gallery.js
@@ -1,181 +1,65 @@
-if(!dojo._hasResource["dojox.image.Gallery"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.image.Gallery"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.image.Gallery"]){
+dojo._hasResource["dojox.image.Gallery"]=true;
dojo.provide("dojox.image.Gallery");
dojo.experimental("dojox.image.Gallery");
-//
-// dojox.image.Gallery courtesy Shane O Sullivan, licensed under a Dojo CLA
-// @author Copyright 2007 Shane O Sullivan (shaneosullivan1@gmail.com)
-//
-// For a sample usage, see http://www.skynet.ie/~sos/photos.php
-//
-// TODO: Make public, document params and privitize non-API conformant methods.
-// document topics.
-
dojo.require("dojo.fx");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dojox.image.ThumbnailPicker");
dojo.require("dojox.image.SlideShow");
-
-dojo.declare("dojox.image.Gallery",
- [dijit._Widget, dijit._Templated],
- {
- // summary:
- // Gallery widget that wraps a dojox.image.ThumbnailPicker and dojox.image.SlideShow widget
-
- // imageHeight: Number
- // Maximum height of an image in the SlideShow widget
- imageHeight: 375,
-
- // imageWidth: Number
- // Maximum width of an image in the SlideShow widget
- imageWidth: 500,
-
- // pageSize: Number
- // The number of records to retrieve from the data store per request.
- pageSize: dojox.image.SlideShow.prototype.pageSize,
-
- // autoLoad: Boolean
- // If true, images are loaded before the user views them. If false, an
- // image is loaded when the user displays it.
- autoLoad: true,
-
- // linkAttr: String
- // Defines the name of the attribute to request from the store to retrieve the
- // URL to link to from an image, if any.
- linkAttr: "link",
-
- // imageThumbAttr: String
- // Defines the name of the attribute to request from the store to retrieve the
- // URL to the thumbnail image.
- imageThumbAttr: "imageUrlThumb",
-
- // imageLargeAttr: String
- // Defines the name of the attribute to request from the store to retrieve the
- // URL to the image.
- imageLargeAttr: "imageUrl",
-
- // titleAttr: String
- // Defines the name of the attribute to request from the store to retrieve the
- // title of the picture, if any.
- titleAttr: "title",
-
- // slideshowInterval: Integer
- // time in seconds, between image changes in the slide show.
- slideshowInterval: 3,
-
- templateString:"<div dojoAttachPoint=\"outerNode\" class=\"imageGalleryWrapper\">\n\t<div dojoAttachPoint=\"thumbPickerNode\"></div>\n\t<div dojoAttachPoint=\"slideShowNode\"></div>\n</div>\n",
-
- postCreate: function(){
- // summary: Initializes the widget, creates the ThumbnailPicker and SlideShow widgets
- this.widgetid = this.id;
- this.inherited("postCreate",arguments)
-
- this.thumbPicker = new dojox.image.ThumbnailPicker({
- linkAttr: this.linkAttr,
- imageLargeAttr: this.imageLargeAttr,
- titleAttr: this.titleAttr,
- useLoadNotifier: true
- }, this.thumbPickerNode);
-
-
- this.slideShow = new dojox.image.SlideShow({
- imageHeight: this.imageHeight,
- imageWidth: this.imageWidth,
- autoLoad: this.autoLoad,
- linkAttr: this.linkAttr,
- imageLargeAttr: this.imageLargeAttr,
- titleAttr: this.titleAttr,
- slideshowInterval: this.slideshowInterval,
- pageSize: this.pageSize
- }, this.slideShowNode);
-
- var _this = this;
- //When an image is shown in the Slideshow, make sure it is visible
- //in the ThumbnailPicker
- dojo.subscribe(this.slideShow.getShowTopicName(), function(packet){
- //if(packet.index < _this.thumbPicker._thumbIndex
- // || packet.index > _this.thumbPicker._thumbIndex + _this.thumbPicker.numberThumbs -1){
- //if(!_this.thumbPicker.isVisible(packet.index)){
- //var index = packet.index - (packet.index % _this.thumbPicker.numberThumbs);
- _this.thumbPicker._showThumbs(packet.index);
- //}
- });
- //When the user clicks a thumbnail, show that image
- dojo.subscribe(this.thumbPicker.getClickTopicName(), function(evt){
- _this.slideShow.showImage(evt.index);
- });
- //When the ThumbnailPicker moves to show a new set of pictures,
- //make the Slideshow start loading those pictures first.
- dojo.subscribe(this.thumbPicker.getShowTopicName(), function(evt){
- _this.slideShow.moveImageLoadingPointer(evt.index);
- });
- //When an image finished loading in the slideshow, update the loading
- //notification in the ThumbnailPicker
- dojo.subscribe(this.slideShow.getLoadTopicName(), function(index){
- _this.thumbPicker.markImageLoaded(index);
- });
- this._centerChildren();
- },
-
- setDataStore: function(dataStore, request, /*optional*/paramNames){
- // summary: Sets the data store and request objects to read data from.
- // dataStore:
- // An implementation of the dojo.data.api.Read API. This accesses the image
- // data.
- // request:
- // An implementation of the dojo.data.api.Request API. This specifies the
- // query and paging information to be used by the data store
- // paramNames:
- // An object defining the names of the item attributes to fetch from the
- // data store. The four attributes allowed are 'linkAttr', 'imageLargeAttr',
- // 'imageThumbAttr' and 'titleAttr'
- this.thumbPicker.setDataStore(dataStore, request, paramNames);
- this.slideShow.setDataStore(dataStore, request, paramNames);
- },
-
- reset: function(){
- // summary: Resets the widget to its initial state
- this.slideShow.reset();
- this.thumbPicker.reset();
- },
-
- showNextImage: function(inTimer){
- // summary: Changes the image being displayed in the SlideShow to the next
- // image in the data store
- // inTimer: Boolean
- // If true, a slideshow is active, otherwise the slideshow is inactive.
- this.slideShow.showNextImage();
- },
-
- toggleSlideshow: function(){
- // summary: Switches the slideshow mode on and off.
- this.slideShow.toggleSlideshow();
- },
-
- showImage: function(index, /*optional*/callback){
- // summary: Shows the image at index 'idx'.
- // idx: Number
- // The position of the image in the data store to display
- // callback: Function
- // Optional callback function to call when the image has finished displaying.
- this.slideShow.showImage(index, callback);
- },
-
- _centerChildren: function() {
- // summary: Ensures that the ThumbnailPicker and the SlideShow widgets
- // are centered.
- var thumbSize = dojo.marginBox(this.thumbPicker.outerNode);
- var slideSize = dojo.marginBox(this.slideShow.outerNode);
-
- var diff = (thumbSize.w - slideSize.w) / 2;
-
- if(diff > 0) {
- dojo.style(this.slideShow.outerNode, "marginLeft", diff + "px");
- } else if(diff < 0) {
- dojo.style(this.thumbPicker.outerNode, "marginLeft", (diff * -1) + "px");
- }
- }
+dojo.declare("dojox.image.Gallery",[dijit._Widget,dijit._Templated],{imageHeight:375,imageWidth:500,pageSize:dojox.image.SlideShow.prototype.pageSize,autoLoad:true,linkAttr:"link",imageThumbAttr:"imageUrlThumb",imageLargeAttr:"imageUrl",titleAttr:"title",slideshowInterval:3,templateString:dojo.cache("dojox.image","resources/Gallery.html","<div dojoAttachPoint=\"outerNode\" class=\"imageGalleryWrapper\">\n\t<div dojoAttachPoint=\"thumbPickerNode\"></div>\n\t<div dojoAttachPoint=\"slideShowNode\"></div>\n</div>\n"),postCreate:function(){
+this.widgetid=this.id;
+this.inherited(arguments);
+this.thumbPicker=new dojox.image.ThumbnailPicker({linkAttr:this.linkAttr,imageLargeAttr:this.imageLargeAttr,imageThumbAttr:this.imageThumbAttr,titleAttr:this.titleAttr,useLoadNotifier:true,size:this.imageWidth},this.thumbPickerNode);
+this.slideShow=new dojox.image.SlideShow({imageHeight:this.imageHeight,imageWidth:this.imageWidth,autoLoad:this.autoLoad,linkAttr:this.linkAttr,imageLargeAttr:this.imageLargeAttr,titleAttr:this.titleAttr,slideshowInterval:this.slideshowInterval,pageSize:this.pageSize},this.slideShowNode);
+var _1=this;
+dojo.subscribe(this.slideShow.getShowTopicName(),function(_2){
+_1.thumbPicker._showThumbs(_2.index);
+});
+dojo.subscribe(this.thumbPicker.getClickTopicName(),function(_3){
+_1.slideShow.showImage(_3.index);
+});
+dojo.subscribe(this.thumbPicker.getShowTopicName(),function(_4){
+_1.slideShow.moveImageLoadingPointer(_4.index);
+});
+dojo.subscribe(this.slideShow.getLoadTopicName(),function(_5){
+_1.thumbPicker.markImageLoaded(_5);
});
-
+this._centerChildren();
+},setDataStore:function(_6,_7,_8){
+this.thumbPicker.setDataStore(_6,_7,_8);
+this.slideShow.setDataStore(_6,_7,_8);
+},reset:function(){
+this.slideShow.reset();
+this.thumbPicker.reset();
+},showNextImage:function(_9){
+this.slideShow.showNextImage();
+},toggleSlideshow:function(){
+dojo.deprecated("dojox.widget.Gallery.toggleSlideshow is deprecated. Use toggleSlideShow instead.","","2.0");
+this.toggleSlideShow();
+},toggleSlideShow:function(){
+this.slideShow.toggleSlideShow();
+},showImage:function(_a,_b){
+this.slideShow.showImage(_a,_b);
+},resize:function(_c){
+this.thumbPicker.resize(_c);
+},_centerChildren:function(){
+var _d=dojo.marginBox(this.thumbPicker.outerNode);
+var _e=dojo.marginBox(this.slideShow.outerNode);
+var _f=(_d.w-_e.w)/2;
+if(_f>0){
+dojo.style(this.slideShow.outerNode,"marginLeft",_f+"px");
+}else{
+if(_f<0){
+dojo.style(this.thumbPicker.outerNode,"marginLeft",(_f*-1)+"px");
}
+}
+}});
+}
diff --git a/js/dojo/dojox/image/Lightbox.js b/js/dojo/dojox/image/Lightbox.js
--- a/js/dojo/dojox/image/Lightbox.js
+++ b/js/dojo/dojox/image/Lightbox.js
@@ -1,312 +1,246 @@
-if(!dojo._hasResource["dojox.image.Lightbox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.image.Lightbox"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.image.Lightbox"]){
+dojo._hasResource["dojox.image.Lightbox"]=true;
dojo.provide("dojox.image.Lightbox");
dojo.experimental("dojox.image.Lightbox");
-
-dojo.require("dijit.Dialog");
-dojo.require("dojox.fx");
-
-dojo.declare("dojox.image.Lightbox",
- dijit._Widget,{
- // summary:
- // a dojo-based Lightbox implementation.
- //
- // description:
- // an Elegant, keyboard accessible, markup and store capable Lightbox widget to show images
- // in a modal dialog-esque format. Can show individual images as Modal dialog, or can group
- // images with multiple entry points, all using a single "master" Dialog for visualization
- //
- // examples:
- //
- // <a href="image1.jpg" dojoType="dojox.image.Lightbox">show lightbox</a>
- // <a href="image2.jpg" dojoType="dojox.image.Lightbox" group="one">show group lightbox</a>
- // <a href="image3.jpg" dojoType="dojox.image.Lightbox" group="one">show group lightbox</a>
- //
- // FIXME: not implemented fully yet, though works with basic datastore access. need to manually call
- // widget._attachedDialog.addImage(item,"fromStore") for each item in a store result set.
- // <div dojoType="dojox.image.Lightbox" group="fromStore" store="storeName"></div>
-
- // group: String
- // grouping images in a page with similar tags will provide a 'slideshow' like grouping of images
- group: "",
-
- // title: String
- // A string of text to be shown in the Lightbox beneath the image (empty if using a store)
- title: "",
-
- // href; String
- // link to image to use for this Lightbox node (empty if using a store).
- href: "",
-
- // duration: Integer
- // generic time in MS to adjust the feel of widget. could possibly add various
- // durations for the various actions (dialog fadein, sizeing, img fadein ...)
- duration: 500,
-
- // _allowPassthru: Boolean
- // privately set this to disable/enable natural link of anchor tags
- _allowPassthru: false,
- _attachedDialog: null, // try to share a single underlay per page?
-
- startup: function(){
- this.inherited("startup", arguments);
- // setup an attachment to the masterDialog (or create the masterDialog)
- var tmp = dijit.byId('dojoxLightboxDialog');
- if(tmp){
- this._attachedDialog = tmp;
- }else{
- // this is the first instance to start, so we make the masterDialog
- this._attachedDialog = new dojox.image._LightboxDialog({ id: "dojoxLightboxDialog" });
- this._attachedDialog.startup();
- }
- if(!this.store){
- // FIXME: full store support lacking, have to manually call this._attachedDialog.addImage(imgage,group) as it stands
- this._addSelf();
- this.connect(this.domNode, "onclick", "_handleClick");
- }
- },
-
- _addSelf: function(){
- this._attachedDialog.addImage({
- href: this.href,
- title: this.title
- },this.group||null);
- },
-
- _handleClick: function(/* Event */e){
- // summary: handle the click on the link
- if(!this._allowPassthru){ e.preventDefault(); }
- else{ return; }
- this.show();
- },
-
- show: function(){
- this._attachedDialog.show(this);
- },
-
- disable: function(){
- // summary, disables event clobbering and dialog, and follows natural link
- this._allowPassthru = true;
- },
-
- enable: function(){
- // summary: enables the dialog (prevents default link)
- this._allowPassthru = false;
- }
-
+dojo.require("dijit.Dialog");
+dojo.require("dojox.fx._base");
+dojo.declare("dojox.image.Lightbox",dijit._Widget,{group:"",title:"",href:"",duration:500,modal:false,_allowPassthru:false,_attachedDialog:null,startup:function(){
+this.inherited(arguments);
+var _1=dijit.byId("dojoxLightboxDialog");
+if(_1){
+this._attachedDialog=_1;
+}else{
+this._attachedDialog=new dojox.image.LightboxDialog({id:"dojoxLightboxDialog"});
+this._attachedDialog.startup();
+}
+if(!this.store){
+this._addSelf();
+this.connect(this.domNode,"onclick","_handleClick");
+}
+},_addSelf:function(){
+this._attachedDialog.addImage({href:this.href,title:this.title},this.group||null);
+},_handleClick:function(e){
+if(!this._allowPassthru){
+e.preventDefault();
+}else{
+return;
+}
+this.show();
+},show:function(){
+this._attachedDialog.show(this);
+},hide:function(){
+this._attachedDialog.hide();
+},disable:function(){
+this._allowPassthru=true;
+},enable:function(){
+this._allowPassthru=false;
+},onClick:function(){
+}});
+dojo.declare("dojox.image.LightboxDialog",dijit.Dialog,{title:"",inGroup:null,imgUrl:dijit._Widget.prototype._blankGif,errorMessage:"Image not found.",adjust:true,modal:false,_groups:{XnoGroupX:[]},errorImg:dojo.moduleUrl("dojox.image","resources/images/warning.png"),templateString:dojo.cache("dojox.image","resources/Lightbox.html","<div class=\"dojoxLightbox\" dojoAttachPoint=\"containerNode\">\n\t<div style=\"position:relative\">\n\t\t<div dojoAttachPoint=\"imageContainer\" class=\"dojoxLightboxContainer\" dojoAttachEvent=\"onclick: _onImageClick\">\n\t\t\t<img dojoAttachPoint=\"imgNode\" src=\"${imgUrl}\" class=\"dojoxLightboxImage\" alt=\"${title}\">\n\t\t\t<div class=\"dojoxLightboxFooter\" dojoAttachPoint=\"titleNode\">\n\t\t\t\t<div class=\"dijitInline LightboxClose\" dojoAttachPoint=\"closeNode\"></div>\n\t\t\t\t<div class=\"dijitInline LightboxNext\" dojoAttachPoint=\"nextNode\"></div>\t\n\t\t\t\t<div class=\"dijitInline LightboxPrev\" dojoAttachPoint=\"prevNode\"></div>\n\t\t\t\t<div class=\"dojoxLightboxText\" dojoAttachPoint=\"titleTextNode\"><span dojoAttachPoint=\"textNode\">${title}</span><span dojoAttachPoint=\"groupCount\" class=\"dojoxLightboxGroupText\"></span></div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n"),startup:function(){
+this.inherited(arguments);
+this._animConnects=[];
+this.connect(this.nextNode,"onclick","_nextImage");
+this.connect(this.prevNode,"onclick","_prevImage");
+this.connect(this.closeNode,"onclick","hide");
+this._makeAnims();
+this._vp=dijit.getViewport();
+return this;
+},show:function(_2){
+var _3=this;
+this._lastGroup=_2;
+if(!_3.open){
+_3.inherited(arguments);
+this._modalconnects.push(dojo.connect(dojo.global,"onscroll",this,"_position"),dojo.connect(dojo.global,"onresize",this,"_position"),dojo.connect(dojo.body(),"onkeypress",this,"_handleKey"));
+if(!_2.modal){
+this._modalconnects.push(dojo.connect(dijit._underlay.domNode,"onclick",this,"onCancel"));
+}
+}
+if(this._wasStyled){
+dojo.destroy(_3.imgNode);
+_3.imgNode=dojo.create("img",null,_3.imageContainer,"first");
+_3._makeAnims();
+_3._wasStyled=false;
+}
+dojo.style(_3.imgNode,"opacity","0");
+dojo.style(_3.titleNode,"opacity","0");
+var _4=_2.href;
+if((_2.group&&_2!=="XnoGroupX")||_3.inGroup){
+if(!_3.inGroup){
+_3.inGroup=_3._groups[(_2.group)];
+dojo.forEach(_3.inGroup,function(g,i){
+if(g.href==_2.href){
+_3._index=i;
+}
+},_3);
+}
+if(!_3._index){
+_3._index=0;
+_4=_3.inGroup[_3._index].href;
+}
+_3.groupCount.innerHTML=" ("+(_3._index+1)+" of "+_3.inGroup.length+")";
+_3.prevNode.style.visibility="visible";
+_3.nextNode.style.visibility="visible";
+}else{
+_3.groupCount.innerHTML="";
+_3.prevNode.style.visibility="hidden";
+_3.nextNode.style.visibility="hidden";
+}
+if(!_2.leaveTitle){
+_3.textNode.innerHTML=_2.title;
+}
+_3._ready(_4);
+},_ready:function(_5){
+var _6=this;
+_6._imgError=dojo.connect(_6.imgNode,"error",_6,function(){
+dojo.disconnect(_6._imgError);
+_6.imgNode.src=_6.errorImg;
+_6.textNode.innerHTML=_6.errorMessage;
+});
+_6._imgConnect=dojo.connect(_6.imgNode,"load",_6,function(e){
+_6.resizeTo({w:_6.imgNode.width,h:_6.imgNode.height,duration:_6.duration});
+dojo.disconnect(_6._imgConnect);
+if(_6._imgError){
+dojo.disconnect(_6._imgError);
+}
});
-
-dojo.declare("dojox.image._LightboxDialog",
- dijit.Dialog,{
- //
- // Description:
- //
- // a widget that intercepts anchor links (typically around images)
- // and displays a modal Dialog. this is the actual Popup, and should
- // not be created directly.
- //
- // there will only be one of these on a page, so all dojox.image.Lightbox's will us it
- // (the first instance of a Lightbox to be show()'n will create me If i do not exist)
- //
- // note: the could be the ImagePane i was talking about?
-
- // title: String
- // the current title
- title: "",
-
- // FIXME: implement titleTemplate
-
- // inGroup: Array
- // Array of objects. this is populated by from the JSON object _groups, and
- // should not be populate manually. it is a placeholder for the currently
- // showing group of images in this master dialog
- inGroup: null,
-
- // imgUrl: String
- // the src="" attrib of our imageNode (can be null at statup)
- imgUrl: "",
-
- // an array of objects, each object being a unique 'group'
- _groups: { XnoGroupX: [] },
- _imageReady: false,
-
- templateString:"<div class=\"dojoxLightbox\" dojoAttachPoint=\"containerNode\">\n\t<div style=\"position:relative\">\n\t\t<div dojoAttachPoint=\"imageContainer\" class=\"dojoxLightboxContainer\">\n\t\t\t<img dojoAttachPoint=\"imgNode\" src=\"${imgUrl}\" class=\"dojoxLightboxImage\" alt=\"${title}\">\n\t\t\t<div class=\"dojoxLightboxFooter\" dojoAttachPoint=\"titleNode\">\n\t\t\t\t<div class=\"dijitInline LightboxClose\" dojoAttachPoint=\"closeNode\"></div>\n\t\t\t\t<div class=\"dijitInline LightboxNext\" dojoAttachPoint=\"nextNode\"></div>\t\n\t\t\t\t<div class=\"dijitInline LightboxPrev\" dojoAttachPoint=\"prevNode\"></div>\n\n\t\t\t\t<div class=\"dojoxLightboxText\"><span dojoAttachPoint=\"textNode\">${title}</span><span dojoAttachPoint=\"groupCount\" class=\"dojoxLightboxGroupText\"></span></div>\n\t\t\t</div>\n\t\t</div>\t\n\t\t\n\t</div>\n</div>\n",
-
- startup: function(){
- // summary: add some extra event handlers, and startup our superclass.
- this.inherited("startup", arguments);
-
- // FIXME: these are supposed to be available in dijit.Dialog already,
- // but aren't making it over.
- dojo.connect(document.documentElement,"onkeypress",this,"_handleKey");
- this.connect(window,"onresize","_position");
-
- this.connect(this.nextNode, "onclick", "_nextImage");
- this.connect(this.prevNode, "onclick", "_prevImage");
- this.connect(this.closeNode, "onclick", "hide");
-
- },
-
- show: function(/* Object */groupData){
- // summary: starts the chain of events to show an image in the dialog, including showing the dialog
- // if it is not already visible
-
- dojo.style(this.imgNode,"opacity","0");
- dojo.style(this.titleNode,"opacity","0");
-
- // we only need to call dijit.Dialog.show() if we're not already open.
- if(!this.open){ this.inherited("show", arguments); }
-
- this._imageReady = false;
-
- this.imgNode.src = groupData.href;
- if((groupData.group && !(groupData == "XnoGroupX")) || this.inGroup){
- if(!this.inGroup){
- this.inGroup = this._groups[(groupData.group)];
- var i = 0;
- // determine where we were or are in the show
- dojo.forEach(this.inGroup,function(g){
- if (g.href == groupData.href){
- this._positionIndex = i;
- }
- i++;
- },this);
- }
- if(!this._positionIndex){ this._positionIndex=0; this.imgNode.src = this.inGroup[this._positionIndex].href; }
- this.groupCount.innerHTML = " (" +(this._positionIndex+1) +" of "+this.inGroup.length+")";
- this.prevNode.style.visibility = "visible";
- this.nextNode.style.visibility = "visible";
- }else{
- this.groupCount.innerHTML = "";
- this.prevNode.style.visibility = "hidden";
- this.nextNode.style.visibility = "hidden";
- }
- this.textNode.innerHTML = groupData.title;
-
- if(!this._imageReady || this.imgNode.complete === true){
- this._imgConnect = dojo.connect(this.imgNode,"onload", this, function(){
- this._imageReady = true;
- this.resizeTo({ w: this.imgNode.width, h:this.imgNode.height, duration:this.duration });
- dojo.disconnect(this._imgConnect);
- });
- // onload doesn't fire in IE if you connect before you set the src.
- // hack to re-set the src after onload connection made:
- if(dojo.isIE){ this.imgNode.src = this.imgNode.src; }
- }else{
- // do it quickly. kind of a hack, but image is ready now
- this.resizeTo({ w: this.imgNode.width, h:this.imgNode.height, duration:1 });
- }
- },
-
- _nextImage: function(){
- // summary: load next image in group
- if(this._positionIndex+1<this.inGroup.length){
- this._positionIndex++;
- }else{
- this._positionIndex = 0;
- }
- this._loadImage();
- },
-
- _prevImage: function(){
- // summary: load previous image in group
- if(this._positionIndex==0){
- this._positionIndex = this.inGroup.length-1;
- }else{
- this._positionIndex--;
- }
- this._loadImage();
- },
-
- _loadImage: function(){
- // summary: do the prep work before we can show another image
- var _loading = dojo.fx.combine([
- dojo.fadeOut({ node:this.imgNode, duration:(this.duration/2) }),
- dojo.fadeOut({ node:this.titleNode, duration:(this.duration/2) })
- ]);
- this.connect(_loading,"onEnd","_prepNodes");
- _loading.play(10);
- },
-
- _prepNodes: function(){
- // summary: a localized hook to accompany _loadImage
- this._imageReady = false;
- this.show({
- href: this.inGroup[this._positionIndex].href,
- title: this.inGroup[this._positionIndex].title
- });
- },
-
- resizeTo: function(/* Object */size){
- // summary: resize our dialog container, and fire _showImage
- var _sizeAnim = dojox.fx.sizeTo({
- node: this.containerNode,
- duration:size.duration||this.duration,
- width: size.w,
- height:size.h+30
- });
- this.connect(_sizeAnim,"onEnd","_showImage");
- _sizeAnim.play(this.duration);
- },
-
- _showImage: function(){
- // summary: fade in the image, and fire showNav
- dojo.fadeIn({ node: this.imgNode, duration:this.duration,
- onEnd: dojo.hitch(this,"_showNav")
- }).play(75);
- },
-
- _showNav: function(){
- // summary: fade in the footer, and setup our connections.
- dojo.fadeIn({ node: this.titleNode, duration:200 }).play(25);
- },
-
- hide: function(){
- // summary: close the Lightbox
- dojo.fadeOut({node:this.titleNode, duration:200 }).play(25);
- this.inherited("hide", arguments);
- this.inGroup = null;
- this._positionIndex = null;
- },
-
- addImage: function(/* object */child,/* String? */group){
- // summary: add an image to this master dialog
- //
- // child.href: String - link to image (required)
- // child.title: String - title to display
- //
- // group: String - attach to group of similar tag
- // or null for individual image instance
-
- var g = group;
- if(!child.href){ return; }
- if(g){
- if(this._groups[(g)]){
- this._groups[(g)].push(child);
- }else{
- this._groups[(g)] = [(child)];
- }
- }else{ this._groups["XnoGroupX"].push(child); }
- },
-
- _handleKey: function(/* Event */e){
- // summary: handle keyboard navigation
- if(!this.open){ return; }
- var key = (e.charCode == dojo.keys.SPACE ? dojo.keys.SPACE : e.keyCode);
- switch(key){
- case dojo.keys.ESCAPE: this.hide(); break;
-
- case dojo.keys.DOWN_ARROW:
- case dojo.keys.RIGHT_ARROW:
- case 78: // key "n"
- this._nextImage(); break;
-
- case dojo.keys.UP_ARROW:
- case dojo.keys.LEFT_ARROW:
- case 80: // key "p"
- this._prevImage(); break;
- }
- }
-});
-
+_6.imgNode.src=_5;
+},_nextImage:function(){
+if(!this.inGroup){
+return;
+}
+if(this._index+1<this.inGroup.length){
+this._index++;
+}else{
+this._index=0;
+}
+this._loadImage();
+},_prevImage:function(){
+if(this.inGroup){
+if(this._index==0){
+this._index=this.inGroup.length-1;
+}else{
+this._index--;
+}
+this._loadImage();
+}
+},_loadImage:function(){
+this._loadingAnim.play(1);
+},_prepNodes:function(){
+this._imageReady=false;
+this.show({href:this.inGroup[this._index].href,title:this.inGroup[this._index].title});
+},resizeTo:function(_7,_8){
+var _9=dojo.boxModel=="border-box"?dojo._getBorderExtents(this.domNode).w:0,_a=_8||{h:30};
+this._lastTitleSize=_a;
+if(this.adjust&&(_7.h+_a.h+_9+80>this._vp.h||_7.w+_9+60>this._vp.w)){
+this._lastSize=_7;
+_7=this._scaleToFit(_7);
+}
+this._currentSize=_7;
+var _b=dojox.fx.sizeTo({node:this.containerNode,duration:_7.duration||this.duration,width:_7.w+_9,height:_7.h+_a.h+_9});
+this.connect(_b,"onEnd","_showImage");
+_b.play(15);
+},_scaleToFit:function(_c){
+var ns={};
+if(this._vp.h>this._vp.w){
+ns.w=this._vp.w-80;
+ns.h=ns.w*(_c.h/_c.w);
+}else{
+ns.h=this._vp.h-60-this._lastTitleSize.h;
+ns.w=ns.h*(_c.w/_c.h);
+}
+this._wasStyled=true;
+this._setImageSize(ns);
+ns.duration=_c.duration;
+return ns;
+},_setImageSize:function(_d){
+var s=this.imgNode;
+s.height=_d.h;
+s.width=_d.w;
+},_size:function(){
+},_position:function(e){
+this._vp=dijit.getViewport();
+this.inherited(arguments);
+if(e&&e.type=="resize"){
+if(this._wasStyled){
+this._setImageSize(this._lastSize);
+this.resizeTo(this._lastSize);
+}else{
+if(this.imgNode.height+80>this._vp.h||this.imgNode.width+60>this._vp.h){
+this.resizeTo({w:this.imgNode.width,h:this.imgNode.height});
+}
+}
}
+},_showImage:function(){
+this._showImageAnim.play(1);
+},_showNav:function(){
+var _e=dojo.marginBox(this.titleNode);
+if(_e.h>this._lastTitleSize.h){
+this.resizeTo(this._wasStyled?this._lastSize:this._currentSize,_e);
+}else{
+this._showNavAnim.play(1);
+}
+},hide:function(){
+dojo.fadeOut({node:this.titleNode,duration:200,onEnd:dojo.hitch(this,function(){
+this.imgNode.src=this._blankGif;
+})}).play(5);
+this.inherited(arguments);
+this.inGroup=null;
+this._index=null;
+},addImage:function(_f,_10){
+var g=_10;
+if(!_f.href){
+return;
+}
+if(g){
+if(!this._groups[g]){
+this._groups[g]=[];
+}
+this._groups[g].push(_f);
+}else{
+this._groups["XnoGroupX"].push(_f);
+}
+},_handleKey:function(e){
+if(!this.open){
+return;
+}
+var dk=dojo.keys;
+switch(e.charOrCode){
+case dk.ESCAPE:
+this.hide();
+break;
+case dk.DOWN_ARROW:
+case dk.RIGHT_ARROW:
+case 78:
+this._nextImage();
+break;
+case dk.UP_ARROW:
+case dk.LEFT_ARROW:
+case 80:
+this._prevImage();
+break;
+}
+},_makeAnims:function(){
+dojo.forEach(this._animConnects,dojo.disconnect);
+this._animConnects=[];
+this._showImageAnim=dojo.fadeIn({node:this.imgNode,duration:this.duration});
+this._animConnects.push(dojo.connect(this._showImageAnim,"onEnd",this,"_showNav"));
+this._loadingAnim=dojo.fx.combine([dojo.fadeOut({node:this.imgNode,duration:175}),dojo.fadeOut({node:this.titleNode,duration:175})]);
+this._animConnects.push(dojo.connect(this._loadingAnim,"onEnd",this,"_prepNodes"));
+this._showNavAnim=dojo.fadeIn({node:this.titleNode,duration:225});
+},onClick:function(_11){
+},_onImageClick:function(e){
+if(e&&e.target==this.imgNode){
+this.onClick(this._lastGroup);
+if(this._lastGroup.declaredClass){
+this._lastGroup.onClick(this._lastGroup);
+}
+}
+}});
+}
diff --git a/js/dojo/dojox/image/README b/js/dojo/dojox/image/README
--- a/js/dojo/dojox/image/README
+++ b/js/dojo/dojox/image/README
@@ -1,60 +1,88 @@
-------------------------------------------------------------------------------
-dojox.image
+dojox.image - Image Related Widgets and Components
-------------------------------------------------------------------------------
Version 1.0
Release date: 10/31/07
-------------------------------------------------------------------------------
Project state:
-prototype | expermental
+
+[Badge] experimental
+[FlickrBadge] experimental
+[Gallery] experimental
+[Lightbox] beta
+[Magnifier] experimental
+[MagnifierLite] experimental
+[SlideShow] experimental
+[ThumbnailPicker] experimental
+
-------------------------------------------------------------------------------
Credits
- Peter Higgins (dante)
- Shane O'Sullivan (shaneosullivan1@gmail.com)
+
+[Badge] Peter Higgins (dante)
+[FlickrBadge] Bryan Forbes (BryanForbes)
+[Gallery] Shane O'Sullivan (sos)
+[Lightbox] Peter Higgins (dante)
+[Magnifier] Peter Higgins (dante)
+[MagnifierLite] Peter Higgins (dante)
+[SlideShow] Shane O'Sullivan (sos)
+[ThumbnailPicker] Shane O'Sullivan (sos)
+
-------------------------------------------------------------------------------
Project description
A class to provide a common API for images, and home for image
related Widgets.
-------------------------------------------------------------------------------
Dependencies:
LightBox: dojo core, dojox.fx and optionally dojox.data. uses
either tundra or soria theme, no standalone icons.
SlideShow: dojo core, dojo.fx, and dojo.data (optional
dojox.data store implementations apply)
ThumbNailPicker: dojo core, dojo.fx and dojo.data. Combined
with a SlideShow, creates a sample Gallery app.
Gallery: core, dojox.image.SlideShow, dojox.image.ThumbNailPicker
+ Magnifier: (prototype) dojo core, dijit._Widget, dojox.gfx
+
+ Badge: (prototype) dojo core, dijit._Widget + _Templated
+
-------------------------------------------------------------------------------
Documentation
-------------------------------------------------------------------------------
Installation instructions
Grab the following from the Dojo SVN Repository:
http://svn.dojotoolkit.org/dojo/dojox/trunk/image/*
Install into the following directory structure:
/dojox/image/
...which should be at the same level as your Dojo checkout.
-------------------------------------------------------------------------------
Additional Notes
LightBox: currently works as individual items, and grouped items,
but usage of dojo.data is broken (atm). the API is subject to
change, and is marked accordingly.
Hoping to implement: Carossel, and Reflect using
a common API provided by dojox.image.Pane (?)
SlideShow: Shows an image, one by one, from a datastore. Acts
as standing ImagePane implementation,
Gallery: A combination Thumbnail view and SlideShow, using
a datastore, and providing navigation, and common API.
+
+ Magnifier: Unobtrusive way to attach a hovering window window
+ when moving the mouse over an image. The window shows a a zoomed
+ version of the original source. (prototype)
+
+ Badge: (prototype) A Javascript version of a FlickrBadge thingr,
+ which loops through and sizes children in a loop.
diff --git a/js/dojo/dojox/image/SlideShow.js b/js/dojo/dojox/image/SlideShow.js
--- a/js/dojo/dojox/image/SlideShow.js
+++ b/js/dojo/dojox/image/SlideShow.js
@@ -1,590 +1,367 @@
-if(!dojo._hasResource["dojox.image.SlideShow"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.image.SlideShow"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.image.SlideShow"]){
+dojo._hasResource["dojox.image.SlideShow"]=true;
dojo.provide("dojox.image.SlideShow");
-//
-// dojox.image.SlideShow courtesy Shane O Sullivan, licensed under a Dojo CLA
-// For a sample usage, see http://www.skynet.ie/~sos/photos.php
-//
-// @author Copyright 2007 Shane O Sullivan (shaneosullivan1@gmail.com)
-// @license Licensed under the Academic Free License 3.0 http://www.opensource.org/licenses/afl-3.0.php
-//
-// TODO: more cleanups
-//
+dojo.require("dojo.string");
dojo.require("dojo.fx");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
-
-dojo.declare("dojox.image.SlideShow",
- [dijit._Widget, dijit._Templated],
- {
- // imageHeight: Number
- // The maximum height of an image
- imageHeight: 375,
-
- // imageWidth: Number
- // The maximum width of an image.
- imageWidth: 500,
-
- // title: String
- // the initial title of the SlideShow
- title: "",
-
- // titleTemplate: String
- // a way to customize the wording in the title. supported tags to be populated are:
- // @title = the passed title of the image
- // @current = the current index of the image
- // @total = the total number of images in the SlideShow
- //
- // should add more?
- titleTemplate: '@title <span class="slideShowCounterText">(@current of @total)</span>',
-
- // noLink: Boolean
- // Prevents the slideshow from putting an anchor link around the displayed image
- // enables if true, though still will not link in absence of a url to link to
- noLink: false,
-
- // loop: Boolean
- // true/false - make the slideshow loop
- loop: true,
-
- // hasNav: Boolean
- // toggle to enable/disable the visual navigation controls
- hasNav: true,
-
- // images: Array
- // Contains the DOM nodes that individual images are stored in when loaded or loading.
- images: [],
-
- // pageSize: Number
- // The number of images to request each time.
- pageSize: 20,
-
- // autoLoad: Boolean
- // If true, then images are preloaded, before the user navigates to view them.
- // If false, an image is not loaded until the user views it.
- autoLoad: true,
-
- // fixedHeight: Boolean
- // If true, the widget does not resize itself to fix the displayed image.
- fixedHeight: false,
-
- // imageStore: Object
- // Implementation of the dojo.data.api.Read API, which provides data on the images
- // to be displayed.
- imageStore: null,
-
- // linkAttr: String
- // Defines the name of the attribute to request from the store to retrieve the
- // URL to link to from an image, if any.
- linkAttr: "link",
-
- // imageLargeAttr: String
- // Defines the name of the attribute to request from the store to retrieve the
- // URL to the image.
- imageLargeAttr: "imageUrl",
-
- // titleAttr: String
- // Defines the name of the attribute to request from the store to retrieve the
- // title of the picture, if any.
- titleAttr: "title",
-
- // slideshowInterval: Number
- // Time, in seconds, between image transitions during a slideshow.
- slideshowInterval: 3,
-
- templateString:"<div dojoAttachPoint=\"outerNode\" class=\"slideShowWrapper\">\n\t<div style=\"position:relative;\" dojoAttachPoint=\"innerWrapper\">\n\t\t<div class=\"slideShowNav\" dojoAttachEvent=\"onclick: _handleClick\">\n\t\t\t<div class=\"dijitInline slideShowTitle\" dojoAttachPoint=\"titleNode\">${title}</div>\n\t\t</div>\n\t\t<div dojoAttachPoint=\"navNode\" class=\"slideShowCtrl\" dojoAttachEvent=\"onclick: _handleClick\">\n\t\t\t<span dojoAttachPoint=\"navPrev\" class=\"slideShowCtrlPrev\"></span>\n\t\t\t<span dojoAttachPoint=\"navPlay\" class=\"slideShowCtrlPlay\"></span>\n\t\t\t<span dojoAttachPoint=\"navNext\" class=\"slideShowCtrlNext\"></span>\n\t\t</div>\n\t\t<div dojoAttachPoint=\"largeNode\" class=\"slideShowImageWrapper\"></div>\t\t\n\t\t<div dojoAttachPoint=\"hiddenNode\" class=\"slideShowHidden\"></div>\n\t</div>\n</div>\n",
-
- // _tempImgPath: URL
- // URL to the image to display when an image is not yet fully loaded.
- _tempImgPath: dojo.moduleUrl("dojox.image", "resources/images/1pixel.gif"),
-
- // _imageCounter: Number
- // A counter to keep track of which index image is to be loaded next
- _imageCounter: 0,
-
- // _tmpImage: DomNode
- // The temporary image to show when a picture is loading.
- _tmpImage: null,
-
- // _request: Object
- // Implementation of the dojo.data.api.Request API, which defines the query
- // parameters for accessing the store.
- _request: null,
-
- postCreate: function(){
- // summary: Initilizes the widget, sets up listeners and shows the first image
- this.inherited("postCreate",arguments);
- var img = document.createElement("img");
-
- // FIXME: should API be to normalize an image to fit in the specified height/width?
- img.setAttribute("width", this.imageWidth);
- img.setAttribute("height", this.imageHeight);
-
- if(this.hasNav){
- dojo.connect(this.outerNode, "onmouseover", function(evt){
- try{_this._showNav();}
- catch(e){}
- });
- dojo.connect(this.outerNode, "onmouseout", function(evt){
- try{_this._hideNav(evt);}
- catch(e){}
- });
- }
-
- this.outerNode.style.width = this.imageWidth + "px";
-
- img.setAttribute("src", this._tempImgPath);
- var _this = this;
-
- this.largeNode.appendChild(img);
- this._tmpImage = img;
- this._currentImage = img;
- this._fitSize(true);
-
- this._loadImage(0, function(){
- _this.showImage(0);
- });
- this._calcNavDimensions();
- },
-
- setDataStore: function(dataStore, request, /*optional*/paramNames){
- // summary: Sets the data store and request objects to read data from.
- // dataStore:
- // An implementation of the dojo.data.api.Read API. This accesses the image
- // data.
- // request:
- // An implementation of the dojo.data.api.Request API. This specifies the
- // query and paging information to be used by the data store
- // paramNames:
- // An object defining the names of the item attributes to fetch from the
- // data store. The three attributes allowed are 'linkAttr', 'imageLargeAttr' and 'titleAttr'
- this.reset();
- var _this = this;
- this._request = {
- query: {},
- start: ((request.start) ? request.start : 0),
- count: ((request.count) ? request.count : this.pageSize),
- onBegin: function(count, request){
- _this.maxPhotos = count;
- }
- };
- if(request.query){ dojo.mixin(this._request.query, request.query); }
- if(paramNames && paramNames.imageLargeAttr){
- this.imageLargeAttr = paramNames.imageLargeAttr;
- }
-
- var _this = this;
- var _complete = function(items){
- _this.showImage(0);
- _this._request.onComplete = null;
- };
-
- this.imageStore = dataStore;
- this._request.onComplete = _complete;
- this._request.start = 0;
- this.imageStore.fetch(this._request);
- },
-
- reset: function(){
- // summary: Resets the widget to its initial state
- // description: Removes all previously loaded images, and clears all caches.
- while(this.largeNode.firstChild){
- this.largeNode.removeChild(this.largeNode.firstChild);
- }
- this.largeNode.appendChild(this._tmpImage);
- while(this.hiddenNode.firstChild){
- this.hiddenNode.removeChild(this.hiddenNode.firstChild);
- }
- var img;
- for(var pos = 0; pos < this.images.length; pos++){
- img = this.images[pos];
- if(img && img.parentNode){ img.parentNode.removeChild(img); }
- }
- this.images = [];
- this.isInitialized = false;
- this._imageCounter = 0;
- },
-
- isImageLoaded: function(idx){
- // summary: Returns true if image at the specified index is loaded, false otherwise.
- // idx:
- // The number index in the data store to check if it is loaded.
- return this.images && this.images.length > index && this.images[idx];
- },
-
- moveImageLoadingPointer: function(idx){
- // summary: If 'autoload' is true, this tells the widget to start loading
- // images from the specified pointer.
- // idx:
- // The number index in the data store to start loading images from.
- this._imageCounter = idx;
- },
-
- destroy: function(){
- // summary: Cleans up the widget when it is being destroyed
- if(this._slideId) { this._stop(); }
- this.inherited("destroy",arguments);
- },
-
- showNextImage: function(inTimer, forceLoop){
- // summary: Changes the image being displayed to the next image in the data store
- // inTimer: Boolean
- // If true, a slideshow is active, otherwise the slideshow is inactive.
- if(inTimer && this._timerCancelled){return false;}
-
- if(this.imageIndex + 1 >= this.maxPhotos){
- if(inTimer && (this.loop || forceLoop)){ this.imageIndex = -1; }
- else{
- if(this._slideId){ this._stop(); }
- return false;
- }
- }
- var _this = this;
- this.showImage(this.imageIndex + 1, function(){
- if(inTimer){ _this._startTimer(); }
- });
- return true;
- },
-
- toggleSlideShow: function(){
- // summary: Switches the slideshow mode on and off.
- if(this._slideId){
- this._stop();
- }else{
- dojo.toggleClass(this.domNode,"slideShowPaused");
- this._timerCancelled = false;
- var success = this.showNextImage(true, true);
- if(!success){
- this._stop();
- }
- }
- },
-
- getShowTopicName: function(){
- // summary: Returns the topic id published to when an image is shown
- // description:
- // The information published is: index, title and url
- return (this.widgetId ? this.widgetId : this.id) + "/imageShow";
- },
-
- getLoadTopicName: function(){
- // summary: Returns the topic id published to when an image finishes loading.
- // description:
- // The information published is the index position of the image loaded.
- return (this.widgetId ? this.widgetId : this.id) + "/imageLoad";
- },
-
- showImage: function(idx, /* Function? */callback){
- // summary: Shows the image at index 'idx'.
- // idx: Number
- // The position of the image in the data store to display
- // callback: Function
- // Optional callback function to call when the image has finished displaying.
-
- if(!callback && this._slideId){ this.toggleSlideShow(); }
- var _this = this;
- var current = this.largeNode.getElementsByTagName("div");
- this.imageIndex = idx;
-
- var showOrLoadIt = function() {
- //If the image is already loaded, then show it.
- if(_this.images[idx]){
- while(_this.largeNode.firstChild){
- _this.largeNode.removeChild(_this.largeNode.firstChild);
- }
- _this.images[idx].style.opacity = 0;
- _this.largeNode.appendChild(_this.images[idx]);
- _this._currentImage = _this.images[idx]._img;
- _this._fitSize();
-
- var onEnd = function(a,b,c) {
- var img = _this.images[idx].firstChild;
- if(img.tagName.toLowerCase() != "img"){img = img.firstChild;}
- title = img.getAttribute("title");
-
- if(_this._navShowing){
- _this._showNav(true);
- }
- dojo.publish(_this.getShowTopicName(), [{
- index: idx,
- title: title,
- url: img.getAttribute("src")
- }]);
- if(callback) { callback(a,b,c); }
- _this._setTitle(title);
- };
-
- dojo.fadeIn({
- node: _this.images[idx],
- duration: 300,
- onEnd: onEnd
- }).play();
- }else{
- //If the image is not loaded yet, load it first, then show it.
- _this._loadImage(idx, function(){
- dojo.publish(_this.getLoadTopicName(), [idx]);
- _this.showImage(idx, callback);
- });
- }
- };
-
- //If an image is currently showing, fade it out, then show
- //the new image. Otherwise, just show the new image.
- if(current && current.length > 0){
- dojo.fadeOut({
- node: current[0],
- duration: 300,
- onEnd: function(){
- _this.hiddenNode.appendChild(current[0]);
- showOrLoadIt();
- }
- }).play();
- }else{
- showOrLoadIt();
- }
- },
-
- _fitSize: function(force){
- // summary: Fits the widget size to the size of the image being shown,
- // or centers the image, depending on the value of 'fixedHeight'
- // force: Boolean
- // If true, the widget is always resized, regardless of the value of 'fixedHeight'
- if(!this.fixedHeight || force){
- var height = (this._currentImage.height + (this.hasNav ? 20:0));
- dojo.style(this.innerWrapper, "height", height + "px");
- return;
- }
- dojo.style(this.largeNode, "paddingTop", this._getTopPadding() + "px");
- },
-
- _getTopPadding: function(){
- if(!this.fixedHeight){return 0;}
- // summary: Returns the padding to place at the top of the image to center it vertically.
- return (this.imageHeight - this._currentImage.height)/2;
- },
-
- _loadNextImage: function(){
- //summary: Load the next unloaded image.
- if(!this.autoLoad){ return; }
- while(this.images.length >= this._imageCounter && this.images[this._imageCounter]){
- this._imageCounter++;
- }
- this._loadImage(this._imageCounter);
- },
-
- _loadImage: function(idx, callbackFn){
- // summary: Load image at specified index
- // description:
- // This function loads the image at position 'idx' into the
- // internal cache of images. This does not cause the image to be displayed.
- // idx:
- // The position in the data store to load an image from.
- // callbackFn:
- // An optional function to execute when the image has finished loading.
- if(this.images[idx] || !this._request) { return; }
-
- var pageStart = idx - (idx % this.pageSize);
-
- this._request.start = pageStart;
-
- this._request.onComplete = function(items){
- var diff = idx - pageStart;
- if(items && items.length > diff){
- loadIt(items[diff]);
- }else{ /* Squelch - console.log("Got an empty set of items"); */ }
- }
-
- var _this = this;
- var loadIt = function(item){
- var url = _this.imageStore.getValue(item, _this.imageLargeAttr);
- var img = document.createElement("img");
- var div = document.createElement("div");
- div._img = img;
-
- var link = _this.imageStore.getValue(item,_this.linkAttr);
- if(!link || _this.noLink){ div.appendChild(img);
- }else{
- var a = document.createElement("a");
- a.setAttribute("href", link);
- a.setAttribute("target","_blank");
- div.appendChild(a);
- a.appendChild(img);
- }
-
- div.setAttribute("id",_this.id + "_imageDiv" + idx);
- dojo.connect(img, "onload", function(){
- _this._fitImage(img);
- div.setAttribute("width",_this.imageWidth);
- div.setAttribute("height",_this.imageHeight);
-
- dojo.publish(_this.getLoadTopicName(), [idx]);
- _this._loadNextImage();
- if(callbackFn){ callbackFn(); }
- });
- _this.hiddenNode.appendChild(div);
-
- var titleDiv = document.createElement("div");
- dojo.addClass(titleDiv, "slideShowTitle");
- div.appendChild(titleDiv);
-
- _this.images[idx] = div;
- img.setAttribute("src", url);
-
- var title = _this.imageStore.getValue(item,_this.titleAttr);
- if(title){ img.setAttribute("title",title); }
- }
- this.imageStore.fetch(this._request);
- },
-
- _stop: function(){
- // summary: Stops a running slide show.
- if(this._slideId) { clearTimeout(this._slideId); }
- this._slideId = null;
- this._timerCancelled = true;
- dojo.removeClass(this.domNode,"slideShowPaused");
- },
-
- _prev: function(){
- // summary: Show the previous image.
- // FIXME: either pull code from showNext/prev, or call it here
- if(this.imageIndex < 1) { return;}
- this.showImage(this.imageIndex - 1);
- },
-
- _next: function(){
- // summary: Show the next image
- this.showNextImage();
- },
-
- _startTimer: function(){
- // summary: Starts a timeout to show the next image when a slide show is active
- this._slideId = setTimeout("dijit.byId('"+this.id +"').showNextImage(true);", this.slideshowInterval * 1000);
- },
-
- _calcNavDimensions: function() {
- // summary:
- // Calculates the dimensions of the navigation controls
- dojo.style(this.navNode, "position", "absolute");
-
- //Place the navigation controls far off screen
- dojo.style(this.navNode, "left", "-10000px");
-
- //Make the navigation controls visible
- dojo._setOpacity(this.navNode, 99);
-
- this.navPlay._size = dojo.marginBox(this.navPlay);
- this.navPrev._size = dojo.marginBox(this.navPrev);
- this.navNext._size = dojo.marginBox(this.navNext);
-
- dojo._setOpacity(this.navNode, 0);
- dojo.style(this.navNode, "position", "");
- dojo.style(this.navNode, "left", "");
- },
-
- _setTitle: function(title){
- // summary: Sets the title of the image to be displayed
- // title: String
- // The String title of the image
- this.titleNode.innerHTML = this.titleTemplate.replace('@title',title)
- .replace('@current', String(Number(this.imageIndex) + 1))
- .replace('@total',String(this.maxPhotos));
- },
-
- _fitImage: function(img) {
- // summary: Ensures that the image width and height do not exceed the maximum.
- // img: Node
- // The image DOM node to optionally resize
- var width = img.width
- var height = img.height;
-
- if(width > this.imageWidth){
- height = Math.floor(height * (this.imageWidth / width));
- img.setAttribute("height", height + "px");
- img.setAttribute("width", this.imageWidth + "px");
- }
- if(height > this.imageHeight){
- width = Math.floor(width * (this.imageHeight / height));
- img.setAttribute("height", this.imageHeight + "px");
- img.setAttribute("width", width + "px");
- }
- },
-
- _handleClick: function(/* Event */e){
- // summary: Performs navigation on the images based on users mouse clicks
- // e:
- // An Event object
- switch(e.target){
- case this.navNext:this._next(); break;
- case this.navPrev:this._prev(); break;
- case this.navPlay:this.toggleSlideShow(); break;
- }
- },
-
- _showNav: function(force){
- // summary:
- // Shows the navigation controls
- // force: Boolean
- // If true, the navigation controls are repositioned even if they are
- // currently visible.
- if(this._navShowing && !force){return;}
- dojo.style(this.navNode, "marginTop", "0px");
- dojo.style(this.navPlay, "marginLeft", "0px");
- var wrapperSize = dojo.marginBox(this.outerNode);
-
- var margin = this._currentImage.height - this.navPlay._size.h - 10 + this._getTopPadding();
-
- if(margin > this._currentImage.height){margin += 10;}
- dojo[this.imageIndex < 1 ? "addClass":"removeClass"](this.navPrev, "slideShowCtrlHide");
- dojo[this.imageIndex + 1 >= this.maxPhotos ? "addClass":"removeClass"](this.navNext, "slideShowCtrlHide");
-
- var _this = this;
- if(this._navAnim) {
- this._navAnim.stop();
- }
- if(this._navShowing){return;}
- this._navAnim = dojo.fadeIn({node: this.navNode, duration: 300,
- onEnd: function(){_this._navAnim=null;}});
-
- this._navAnim.play();
- this._navShowing = true;
- },
-
- _hideNav: function(/* Event */e){
- // summary: Hides the navigation controls
- // e: Event
- // The DOM Event that triggered this function
- if(!e || !this._overElement(this.outerNode, e)) {
- var _this = this;
- if(this._navAnim) {
- this._navAnim.stop();
- }
- this._navAnim = dojo.fadeOut({node: this.navNode,duration:300,
- onEnd: function(){_this._navAnim=null;}});
- this._navAnim.play();
- this._navShowing = false;
- }
- },
-
- _overElement: function(/*DomNode*/element, /*Event*/e){
- // summary:
- // Returns whether the mouse is over the passed element.
- // Element must be display:block (ie, not a <span>)
-
- //When the page is unloading, if this method runs it will throw an
- //exception.
- if(typeof(dojo)=="undefined"){return false;}
- element = dojo.byId(element);
- var m = {x: e.pageX, y: e.pageY};
- var bb = dojo._getBorderBox(element);
- var absl = dojo.coords(element, true);
- var left = absl.x;
-
- return (m.x >= left
- && m.x <= (left + bb.w)
- && m.y >= absl.y
- && m.y <= (top + bb.h)
- ); // boolean
- }
+dojo.declare("dojox.image.SlideShow",[dijit._Widget,dijit._Templated],{imageHeight:375,imageWidth:500,title:"",titleTemplate:"${title} <span class=\"slideShowCounterText\">(${current} of ${total})</span>",noLink:false,loop:true,hasNav:true,images:[],pageSize:20,autoLoad:true,autoStart:false,fixedHeight:false,imageStore:null,linkAttr:"link",imageLargeAttr:"imageUrl",titleAttr:"title",slideshowInterval:3,templateString:dojo.cache("dojox.image","resources/SlideShow.html","<div dojoAttachPoint=\"outerNode\" class=\"slideShowWrapper\">\n\t<div style=\"position:relative;\" dojoAttachPoint=\"innerWrapper\">\n\t\t<div class=\"slideShowNav\" dojoAttachEvent=\"onclick: _handleClick\">\n\t\t\t<div class=\"dijitInline slideShowTitle\" dojoAttachPoint=\"titleNode\">${title}</div>\n\t\t</div>\n\t\t<div dojoAttachPoint=\"navNode\" class=\"slideShowCtrl\" dojoAttachEvent=\"onclick: _handleClick\">\n\t\t\t<span dojoAttachPoint=\"navPrev\" class=\"slideShowCtrlPrev\"></span>\n\t\t\t<span dojoAttachPoint=\"navPlay\" class=\"slideShowCtrlPlay\"></span>\n\t\t\t<span dojoAttachPoint=\"navNext\" class=\"slideShowCtrlNext\"></span>\n\t\t</div>\n\t\t<div dojoAttachPoint=\"largeNode\" class=\"slideShowImageWrapper\"></div>\t\t\n\t\t<div dojoAttachPoint=\"hiddenNode\" class=\"slideShowHidden\"></div>\n\t</div>\n</div>\n"),_imageCounter:0,_tmpImage:null,_request:null,postCreate:function(){
+this.inherited(arguments);
+var _1=document.createElement("img");
+_1.setAttribute("width",this.imageWidth);
+_1.setAttribute("height",this.imageHeight);
+if(this.hasNav){
+dojo.connect(this.outerNode,"onmouseover",this,function(_2){
+try{
+this._showNav();
+}
+catch(e){
+}
+});
+dojo.connect(this.outerNode,"onmouseout",this,function(_3){
+try{
+this._hideNav(_3);
+}
+catch(e){
+}
+});
+}
+this.outerNode.style.width=this.imageWidth+"px";
+_1.setAttribute("src",this._blankGif);
+var _4=this;
+this.largeNode.appendChild(_1);
+this._tmpImage=this._currentImage=_1;
+this._fitSize(true);
+this._loadImage(0,dojo.hitch(this,"showImage",0));
+this._calcNavDimensions();
+},setDataStore:function(_5,_6,_7){
+this.reset();
+var _8=this;
+this._request={query:{},start:_6.start||0,count:_6.count||this.pageSize,onBegin:function(_9,_a){
+_8.maxPhotos=_9;
+}};
+if(_6.query){
+dojo.mixin(this._request.query,_6.query);
+}
+if(_7){
+dojo.forEach(["imageLargeAttr","linkAttr","titleAttr"],function(_b){
+if(_7[_b]){
+this[_b]=_7[_b];
+}
+},this);
+}
+var _c=function(_d){
+_8.maxPhotos=_d.length;
+_8._request.onComplete=null;
+if(_8.autoStart){
+_8.imageIndex=-1;
+_8.toggleSlideShow();
+}else{
+_8.showImage(0);
+}
+};
+this.imageStore=_5;
+this._request.onComplete=_c;
+this._request.start=0;
+this.imageStore.fetch(this._request);
+},reset:function(){
+dojo.query("> *",this.largeNode).orphan();
+this.largeNode.appendChild(this._tmpImage);
+dojo.query("> *",this.hiddenNode).orphan();
+dojo.forEach(this.images,function(_e){
+if(_e&&_e.parentNode){
+_e.parentNode.removeChild(_e);
+}
+});
+this.images=[];
+this.isInitialized=false;
+this._imageCounter=0;
+},isImageLoaded:function(_f){
+return this.images&&this.images.length>_f&&this.images[_f];
+},moveImageLoadingPointer:function(_10){
+this._imageCounter=_10;
+},destroy:function(){
+if(this._slideId){
+this._stop();
+}
+this.inherited(arguments);
+},showNextImage:function(_11,_12){
+if(_11&&this._timerCancelled){
+return false;
+}
+if(this.imageIndex+1>=this.maxPhotos){
+if(_11&&(this.loop||_12)){
+this.imageIndex=-1;
+}else{
+if(this._slideId){
+this._stop();
+}
+return false;
+}
+}
+this.showImage(this.imageIndex+1,dojo.hitch(this,function(){
+if(_11){
+this._startTimer();
+}
+}));
+return true;
+},toggleSlideShow:function(){
+if(this._slideId){
+this._stop();
+}else{
+dojo.toggleClass(this.domNode,"slideShowPaused");
+this._timerCancelled=false;
+var idx=this.imageIndex;
+if(idx<0||(this.images[idx]&&this.images[idx]._img.complete)){
+var _13=this.showNextImage(true,true);
+if(!_13){
+this._stop();
+}
+}else{
+var _14=dojo.subscribe(this.getShowTopicName(),dojo.hitch(this,function(_15){
+setTimeout(dojo.hitch(this,function(){
+if(_15.index==idx){
+var _16=this.showNextImage(true,true);
+if(!_16){
+this._stop();
+}
+dojo.unsubscribe(_14);
+}
+}),this.slideshowInterval*1000);
+}));
+dojo.publish(this.getShowTopicName(),[{index:idx,title:"",url:""}]);
+}
+}
+},getShowTopicName:function(){
+return (this.widgetId||this.id)+"/imageShow";
+},getLoadTopicName:function(){
+return (this.widgetId?this.widgetId:this.id)+"/imageLoad";
+},showImage:function(_17,_18){
+if(!_18&&this._slideId){
+this.toggleSlideShow();
+}
+var _19=this;
+var _1a=this.largeNode.getElementsByTagName("div");
+this.imageIndex=_17;
+var _1b=function(){
+if(_19.images[_17]){
+while(_19.largeNode.firstChild){
+_19.largeNode.removeChild(_19.largeNode.firstChild);
+}
+dojo.style(_19.images[_17],"opacity",0);
+_19.largeNode.appendChild(_19.images[_17]);
+_19._currentImage=_19.images[_17]._img;
+_19._fitSize();
+var _1c=function(a,b,c){
+var img=_19.images[_17].firstChild;
+if(img.tagName.toLowerCase()!="img"){
+img=img.firstChild;
+}
+var _1d=img.getAttribute("title")||"";
+if(_19._navShowing){
+_19._showNav(true);
+}
+dojo.publish(_19.getShowTopicName(),[{index:_17,title:_1d,url:img.getAttribute("src")}]);
+if(_18){
+_18(a,b,c);
+}
+_19._setTitle(_1d);
+};
+dojo.fadeIn({node:_19.images[_17],duration:300,onEnd:_1c}).play();
+}else{
+_19._loadImage(_17,function(){
+_19.showImage(_17,_18);
});
-
+}
+};
+if(_1a&&_1a.length>0){
+dojo.fadeOut({node:_1a[0],duration:300,onEnd:function(){
+_19.hiddenNode.appendChild(_1a[0]);
+_1b();
+}}).play();
+}else{
+_1b();
+}
+},_fitSize:function(_1e){
+if(!this.fixedHeight||_1e){
+var _1f=(this._currentImage.height+(this.hasNav?20:0));
+dojo.style(this.innerWrapper,"height",_1f+"px");
+return;
+}
+dojo.style(this.largeNode,"paddingTop",this._getTopPadding()+"px");
+},_getTopPadding:function(){
+if(!this.fixedHeight){
+return 0;
+}
+return (this.imageHeight-this._currentImage.height)/2;
+},_loadNextImage:function(){
+if(!this.autoLoad){
+return;
+}
+while(this.images.length>=this._imageCounter&&this.images[this._imageCounter]){
+this._imageCounter++;
+}
+this._loadImage(this._imageCounter);
+},_loadImage:function(_20,_21){
+if(this.images[_20]||!this._request){
+return;
+}
+var _22=_20-(_20%(this._request.count||this.pageSize));
+this._request.start=_22;
+this._request.onComplete=function(_23){
+var _24=_20-_22;
+if(_23&&_23.length>_24){
+_25(_23[_24]);
+}else{
+}
+};
+var _26=this;
+var _27=this.imageStore;
+var _25=function(_28){
+var url=_26.imageStore.getValue(_28,_26.imageLargeAttr);
+var img=new Image();
+var div=dojo.create("div",{id:_26.id+"_imageDiv"+_20});
+div._img=img;
+var _29=_26.imageStore.getValue(_28,_26.linkAttr);
+if(!_29||_26.noLink){
+div.appendChild(img);
+}else{
+var a=dojo.create("a",{"href":_29,"target":"_blank"},div);
+a.appendChild(img);
+}
+dojo.connect(img,"onload",function(){
+if(_27!=_26.imageStore){
+return;
+}
+_26._fitImage(img);
+dojo.attr(div,{"width":_26.imageWidth,"height":_26.imageHeight});
+dojo.publish(_26.getLoadTopicName(),[_20]);
+setTimeout(function(){
+_26._loadNextImage();
+},1);
+if(_21){
+_21();
+}
+});
+_26.hiddenNode.appendChild(div);
+var _2a=dojo.create("div",{className:"slideShowTitle"},div);
+_26.images[_20]=div;
+dojo.attr(img,"src",url);
+var _2b=_26.imageStore.getValue(_28,_26.titleAttr);
+if(_2b){
+dojo.attr(img,"title",_2b);
+}
+};
+this.imageStore.fetch(this._request);
+},_stop:function(){
+if(this._slideId){
+clearTimeout(this._slideId);
+}
+this._slideId=null;
+this._timerCancelled=true;
+dojo.removeClass(this.domNode,"slideShowPaused");
+},_prev:function(){
+if(this.imageIndex<1){
+return;
}
+this.showImage(this.imageIndex-1);
+},_next:function(){
+this.showNextImage();
+},_startTimer:function(){
+var id=this.id;
+this._slideId=setTimeout(function(){
+dijit.byId(id).showNextImage(true);
+},this.slideshowInterval*1000);
+},_calcNavDimensions:function(){
+dojo.style(this.navNode,"position","absolute");
+dojo.style(this.navNode,"top","-10000px");
+dojo._setOpacity(this.navNode,99);
+this.navPlay._size=dojo.marginBox(this.navPlay);
+this.navPrev._size=dojo.marginBox(this.navPrev);
+this.navNext._size=dojo.marginBox(this.navNext);
+dojo._setOpacity(this.navNode,0);
+dojo.style(this.navNode,{"position":"",top:""});
+},_setTitle:function(_2c){
+this.titleNode.innerHTML=dojo.string.substitute(this.titleTemplate,{title:_2c,current:1+this.imageIndex,total:this.maxPhotos||""});
+},_fitImage:function(img){
+var _2d=img.width;
+var _2e=img.height;
+if(_2d>this.imageWidth){
+_2e=Math.floor(_2e*(this.imageWidth/_2d));
+img.height=_2e;
+img.width=_2d=this.imageWidth;
+}
+if(_2e>this.imageHeight){
+_2d=Math.floor(_2d*(this.imageHeight/_2e));
+img.height=this.imageHeight;
+img.width=_2d;
+}
+},_handleClick:function(e){
+switch(e.target){
+case this.navNext:
+this._next();
+break;
+case this.navPrev:
+this._prev();
+break;
+case this.navPlay:
+this.toggleSlideShow();
+break;
+}
+},_showNav:function(_2f){
+if(this._navShowing&&!_2f){
+return;
+}
+dojo.style(this.navNode,"marginTop","0px");
+var _30=dojo.style(this.navNode,"width")/2-this.navPlay._size.w/2-this.navPrev._size.w;
+dojo.style(this.navPlay,"marginLeft",_30+"px");
+var _31=dojo.marginBox(this.outerNode);
+var _32=this._currentImage.height-this.navPlay._size.h-10+this._getTopPadding();
+if(_32>this._currentImage.height){
+_32+=10;
+}
+dojo[this.imageIndex<1?"addClass":"removeClass"](this.navPrev,"slideShowCtrlHide");
+dojo[this.imageIndex+1>=this.maxPhotos?"addClass":"removeClass"](this.navNext,"slideShowCtrlHide");
+var _33=this;
+if(this._navAnim){
+this._navAnim.stop();
+}
+if(this._navShowing){
+return;
+}
+this._navAnim=dojo.fadeIn({node:this.navNode,duration:300,onEnd:function(){
+_33._navAnim=null;
+}});
+this._navAnim.play();
+this._navShowing=true;
+},_hideNav:function(e){
+if(!e||!this._overElement(this.outerNode,e)){
+var _34=this;
+if(this._navAnim){
+this._navAnim.stop();
+}
+this._navAnim=dojo.fadeOut({node:this.navNode,duration:300,onEnd:function(){
+_34._navAnim=null;
+}});
+this._navAnim.play();
+this._navShowing=false;
+}
+},_overElement:function(_35,e){
+if(typeof (dojo)=="undefined"){
+return false;
+}
+_35=dojo.byId(_35);
+var m={x:e.pageX,y:e.pageY};
+var bb=dojo._getBorderBox(_35);
+var _36=dojo.coords(_35,true);
+var _37=_36.x;
+return (m.x>=_37&&m.x<=(_37+bb.w)&&m.y>=_36.y&&m.y<=(top+bb.h));
+}});
+}
diff --git a/js/dojo/dojox/image/ThumbnailPicker.js b/js/dojo/dojox/image/ThumbnailPicker.js
--- a/js/dojo/dojox/image/ThumbnailPicker.js
+++ b/js/dojo/dojox/image/ThumbnailPicker.js
@@ -1,538 +1,313 @@
-if(!dojo._hasResource["dojox.image.ThumbnailPicker"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.image.ThumbnailPicker"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.image.ThumbnailPicker"]){
+dojo._hasResource["dojox.image.ThumbnailPicker"]=true;
dojo.provide("dojox.image.ThumbnailPicker");
dojo.experimental("dojox.image.ThumbnailPicker");
-//
-// dojox.image.ThumbnailPicker courtesy Shane O Sullivan, licensed under a Dojo CLA
-// @author Copyright 2007 Shane O Sullivan (shaneosullivan1@gmail.com)
-//
-// For a sample usage, see http://www.skynet.ie/~sos/photos.php
-//
-// document topics.
-
+dojo.require("dojox.fx.scroll");
+dojo.require("dojo.fx.easing");
dojo.require("dojo.fx");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
-
-dojo.declare("dojox.image.ThumbnailPicker",
- [dijit._Widget, dijit._Templated],
- {
- // summary: A scrolling Thumbnail Picker widget
- //
- // imageStore: Object
- // A data store that implements the dojo.data Read API.
- imageStore: null,
-
- // request: Object
- // A dojo.data Read API Request object.
- request: null,
-
- // size: Number
- // Width or height in pixels, depending if horizontal or vertical.
- size: 500,
-
- // thumbHeight: Number
- // Default height of a thumbnail image
- thumbHeight: 75,
-
- // thumbWidth: Number
- // Default width of an image
- thumbWidth: 100,
-
- // useLoadNotifier: Boolean
- // Setting useLoadNotifier to true makes a colored DIV appear under each
- // thumbnail image, which is used to display the loading status of each
- // image in the data store.
- useLoadNotifier: false,
-
- // useHyperlink: boolean
- // Setting useHyperlink to true causes a click on a thumbnail to open a link.
- useHyperlink: false,
-
- // hyperlinkTarget: String
- // If hyperlinkTarget is set to "new", clicking on a thumb will open a new window
- // If it is set to anything else, clicking a thumbnail will open the url in the
- // current window.
- hyperlinkTarget: "new",
-
- // isClickable: Boolean
- // When set to true, the cursor over a thumbnail changes.
- isClickable: true,
-
- // isScrollable: Boolean
- // When true, uses smoothScroll to move between pages
- isScrollable: true,
-
- // isHorizontal: Boolean
- // If true, the thumbnails are displayed horizontally. Otherwise they are displayed
- // vertically
- isHorizontal: true,
-
- //autoLoad: Boolean
- autoLoad: true,
-
- // linkAttr: String
- // The attribute name for accessing the url from the data store
- linkAttr: "link",
-
- // imageThumbAttr: String
- // The attribute name for accessing the thumbnail image url from the data store
- imageThumbAttr: "imageUrlThumb",
-
- // imageLargeAttr: String
- // The attribute name for accessing the large image url from the data store
- imageLargeAttr: "imageUrl",
-
- // pageSize: Number
- // The number of images to request each time.
- pageSize: 20,
-
- // titleAttr: String
- // The attribute name for accessing the title from the data store
- titleAttr: "title",
-
- templateString:"<div dojoAttachPoint=\"outerNode\" class=\"thumbOuter\">\n\t<div dojoAttachPoint=\"navPrev\" class=\"thumbNav thumbClickable\">\n\t <img src=\"\" dojoAttachPoint=\"navPrevImg\"/> \n\t</div>\n\t<div dojoAttachPoint=\"thumbScroller\" class=\"thumbScroller\">\n\t <div dojoAttachPoint=\"thumbsNode\" class=\"thumbWrapper\"></div>\n\t</div>\n\t<div dojoAttachPoint=\"navNext\" class=\"thumbNav thumbClickable\">\n\t <img src=\"\" dojoAttachPoint=\"navNextImg\"/> \n\t</div>\n</div>\n",
- tempImgPath: dojo.moduleUrl("dojox.image", "resources/images/1pixel.gif"),
-
- // thumbs: Array
- // Stores the image nodes for the thumbnails.
- _thumbs: [],
-
- // _thumbIndex: Number
- // The index of the first thumbnail shown
- _thumbIndex: 0,
-
- // _maxPhotos: Number
- // The total number of photos in the image store
- _maxPhotos: 0,
-
- // _loadedImages: Object
- // Stores the indices of images that have been marked as loaded using the
- // markImageLoaded function.
- _loadedImages: {},
-
- postCreate: function(){
- // summary: Initializes styles and listeners
- this.widgetid = this.id;
- this.inherited("postCreate",arguments);
- this.pageSize = Number(this.pageSize);
-
- this._scrollerSize = this.size - (51 * 2);
-
- var sizeProp = this._sizeProperty = this.isHorizontal ? "width" : "height";
-
- // FIXME: do this via css? calculate the correct width for the widget
- dojo.style(this.outerNode, "textAlign","center");
- dojo.style(this.outerNode, sizeProp, this.size+"px");
-
- dojo.style(this.thumbScroller, sizeProp, this._scrollerSize + "px");
-
- //If useHyperlink is true, then listen for a click on a thumbnail, and
- //open the link
- if(this.useHyperlink){
- dojo.subscribe(this.getClickTopicName(), this, function(packet){
- var index = packet.index;
- var url = this.imageStore.getValue(packet.data,this.linkAttr);
-
- //If the data item doesn't contain a URL, do nothing
- if(!url){return;}
-
- if(this.hyperlinkTarget == "new"){
- window.open(url);
- }else{
- window.location = url;
- }
- });
- }
-
- if(this.isScrollable) {
- dojo.require("dojox.fx.scroll");
- dojo.require("dojox.fx.easing");
- }
- if(this.isClickable){
- dojo.addClass(this.thumbsNode, "thumbClickable");
- }
- this._totalSize = 0;
- this.init();
- },
-
- init: function(){
- // summary: Creates DOM nodes for thumbnail images and initializes their listeners
- if(this.isInitialized) {return false;}
-
- var classExt = this.isHorizontal ? "Horiz" : "Vert";
-
- // FIXME: can we setup a listener around the whole element and determine based on e.target?
- dojo.addClass(this.navPrev, "prev" + classExt);
- dojo.addClass(this.navNext, "next" + classExt);
- dojo.addClass(this.thumbsNode, "thumb"+classExt);
- dojo.addClass(this.outerNode, "thumb"+classExt);
-
- this.navNextImg.setAttribute("src", this.tempImgPath);
- this.navPrevImg.setAttribute("src", this.tempImgPath);
-
- dojo.connect(this.navPrev, "onclick", this, "_prev");
- dojo.connect(this.navNext, "onclick", this, "_next");
- this.isInitialized = true;
-
- if(this.isHorizontal){
- this._offsetAttr = "offsetLeft";
- this._sizeAttr = "offsetWidth";
- this._scrollAttr = "scrollLeft";
- }else{
- this._offsetAttr = "offsetTop";
- this._sizeAttr = "offsetHeight";
- this._scrollAttr = "scrollTop";
- }
-
- this._updateNavControls();
- if(this.imageStore && this.request){this._loadNextPage();}
- return true;
- },
-
- getClickTopicName: function(){
- // summary: Returns the name of the dojo topic that can be
- // subscribed to in order to receive notifications on
- // which thumbnail was selected.
- return (this.widgetId ? this.widgetId : this.id) + "/select"; // String
- },
-
- getShowTopicName: function(){
- // summary: Returns the name of the dojo topic that can be
- // subscribed to in order to receive notifications on
- // which thumbnail is now visible
- return (this.widgetId ? this.widgetId : this.id) + "/show"; // String
- },
-
- setDataStore: function(dataStore, request, /*optional*/paramNames){
- // summary: Sets the data store and request objects to read data from.
- // dataStore:
- // An implementation of the dojo.data.api.Read API. This accesses the image
- // data.
- // request:
- // An implementation of the dojo.data.api.Request API. This specifies the
- // query and paging information to be used by the data store
- // paramNames:
- // An object defining the names of the item attributes to fetch from the
- // data store. The four attributes allowed are 'linkAttr', 'imageLargeAttr',
- // 'imageThumbAttr' and 'titleAttr'
- this.reset();
-
- this.request = {
- query: {},
- start: request.start ? request.start : 0,
- count: request.count ? request.count : 10,
- onBegin: dojo.hitch(this, function(total){
- this._maxPhotos = total;
- })
- };
-
- if(request.query){ dojo.mixin(this.request.query, request.query);}
-
- if(paramNames && paramNames.imageThumbAttr){
- var attrNames = ["imageThumbAttr", "imageLargeAttr", "linkAttr", "titleAttr"];
- for(var i = 0; i< attrNames.length; i++){
- if(paramNames[attrNames[i]]){this[attrNames[i]] = paramNames[attrNames[i]];}
- }
- }
-
- this.request.start = 0;
- this.request.count = this.pageSize;
- this.imageStore = dataStore;
-
- if(!this.init()){this._loadNextPage();}
- },
-
- reset: function(){
- // summary: Resets the widget back to its original state.
- this._loadedImages = {};
- var img;
- for(var pos = 0; pos < this._thumbs.length; pos++){
- img = this._thumbs[pos];
- if(img){
- // dojo.event.browser.clean(img);
- if(img.parentNode){
- img.parentNode.removeChild(img);
- }
- }
- }
-
- this._thumbs = [];
- this.isInitialized = false;
- this._noImages = true;
- },
-
- isVisible: function(idx) {
- // summary: Returns true if the image at the specified index is currently visible. False otherwise.
- var img = this._thumbs[idx];;
- if(!img){return false;}
- var pos = this.isHorizontal ? "offsetLeft" : "offsetTop";
- var size = this.isHorizontal ? "offsetWidth" : "offsetHeight";
- var scrollAttr = this.isHorizontal ? "scrollLeft" : "scrollTop";
- var offset = img[pos] - this.thumbsNode[pos];
- return (offset >= this.thumbScroller[scrollAttr]
- && offset + img[size] <= this.thumbScroller[scrollAttr] + this._scrollerSize);
- },
-
- _next: function() {
- // summary: Displays the next page of images
- var pos = this.isHorizontal ? "offsetLeft" : "offsetTop";
- var size = this.isHorizontal ? "offsetWidth" : "offsetHeight";
- var baseOffset = this.thumbsNode[pos];
- var firstThumb = this._thumbs[this._thumbIndex];
- var origOffset = firstThumb[pos] - baseOffset;
-
- var idx = -1, img;
-
- for(var i = this._thumbIndex + 1; i < this._thumbs.length; i++){
- img = this._thumbs[i];
- if(img[pos] - baseOffset + img[size] - origOffset > this._scrollerSize){
- this._showThumbs(i);
- return;
- }
- }
- },
-
- _prev: function(){
- // summary: Displays the next page of images
- if(this.thumbScroller[this.isHorizontal ? "scrollLeft" : "scrollTop"] == 0){return;}
- var pos = this.isHorizontal ? "offsetLeft" : "offsetTop";
- var size = this.isHorizontal ? "offsetWidth" : "offsetHeight";
-
- var firstThumb = this._thumbs[this._thumbIndex];
- var origOffset = firstThumb[pos] - this.thumbsNode[pos];
-
- var idx = -1, img;
-
- for(var i = this._thumbIndex - 1; i > -1; i--) {
- img = this._thumbs[i];
- if(origOffset - img[pos] > this._scrollerSize){
- this._showThumbs(i + 1);
- return;
- }
- }
- this._showThumbs(0);
- },
-
- _checkLoad: function(img, idx){
- dojo.publish(this.getShowTopicName(), [{index:idx}]);
- this._updateNavControls();
- this._loadingImages = {};
-
- this._thumbIndex = idx;
-
- //If we have not already requested the data from the store, do so.
- if(this.thumbsNode.offsetWidth - img.offsetLeft < (this._scrollerSize * 2)){
- this._loadNextPage();
- }
- },
-
- _showThumbs: function(idx){
- // summary: Displays thumbnail images, starting at position 'idx'
- // idx: Number
- // The index of the first thumbnail
- var _this = this;
- var idx = arguments.length == 0 ? this._thumbIndex : arguments[0];
- idx = Math.min(Math.max(idx, 0), this._maxPhotos);
-
- if(idx >= this._maxPhotos){ return; }
-
- var img = this._thumbs[idx];
- if(!img){ return; }
-
- var left = img.offsetLeft - this.thumbsNode.offsetLeft;
- var top = img.offsetTop - this.thumbsNode.offsetTop;
- var offset = this.isHorizontal ? left : top;
-
- if( (offset >= this.thumbScroller[this._scrollAttr]) &&
- (offset + img[this._sizeAttr] <= this.thumbScroller[this._scrollAttr] + this._scrollerSize)
- ){
- // FIXME: WTF is this checking for?
- return;
- }
-
-
- if(this.isScrollable){
- var target = this.isHorizontal ? {x: left, y: 0} : { x:0, y:top};
- dojox.fx.smoothScroll({
- target: target,
- win: this.thumbScroller,
- duration:300,
- easing:dojox.fx.easing.easeOut,
- onEnd: dojo.hitch(this, "_checkLoad", img, idx)
- }).play(10);
- }else{
- if(this.isHorizontal){
- this.thumbScroller.scrollLeft = left;
- }else{
- this.thumbScroller.scrollTop = top;
- }
- this._checkLoad(img, idx);
- }
- },
-
- markImageLoaded: function(index){
- // summary: Changes a visual cue to show the image is loaded
- // description: If 'useLoadNotifier' is set to true, then a visual cue is
- // given to state whether the image is loaded or not. Calling this function
- // marks an image as loaded.
- var thumbNotifier = dojo.byId("loadingDiv_"+this.widgetid+"_"+index);
- if(thumbNotifier){this._setThumbClass(thumbNotifier, "thumbLoaded");}
- this._loadedImages[index] = true;
- },
-
- _setThumbClass: function(thumb, className){
- // summary: Adds a CSS class to a thumbnail, only if 'autoLoad' is true
- // thumb: DomNode
- // The thumbnail DOM node to set the class on
- // className: String
- // The CSS class to add to the DOM node.
- if(!this.autoLoad){ return; }
- dojo.addClass(thumb, className);
- },
-
- _loadNextPage: function(){
- // summary: Loads the next page of thumbnail images
- if(this._loadInProgress){return;}
- this._loadInProgress = true;
- var start = this.request.start + (this._noImages == true ? 0 : this.pageSize);
-
- var pos = start;
- while(pos < this._thumbs.length && this._thumbs[pos]){pos ++;}
-
- var _this = this;
-
- //Define the function to call when the items have been
- //returned from the data store.
- var complete = function(items, request){
- if(items && items.length) {
- var itemCounter = 0;
- var loadNext = function(){
- if(itemCounter >= items.length){
- _this._loadInProgress = false;
- return;
- }
- var counter = itemCounter++;
-
- _this._loadImage(items[counter], pos + counter, loadNext);
- }
- loadNext();
-
- //Show or hide the navigation arrows on the thumbnails,
- //depending on whether or not the widget is at the start,
- //end, or middle of the list of images.
- _this._updateNavControls();
- }else{
- _this._loadInProgress = false;
- }
- };
-
- //Define the function to call if the store reports an error.
- var error = function(){
- _this._loadInProgress = false;
- console.debug("Error getting items");
- };
-
- this.request.onComplete = complete;
- this.request.onError = error;
-
- //Increment the start parameter. This is the dojo.data API's
- //version of paging.
- this.request.start = start;
- this._noImages = false;
-
- //Execute the request for data.
- this.imageStore.fetch(this.request);
-
- },
-
- _loadImage: function(data, index, callback){
- var url = this.imageStore.getValue(data,this.imageThumbAttr);
- var img = document.createElement("img");
- var imgContainer = document.createElement("div");
- imgContainer.setAttribute("id","img_" + this.widgetid+"_"+index);
- imgContainer.appendChild(img);
- img._index = index;
- img._data = data;
-
- this._thumbs[index] = imgContainer;
- var loadingDiv;
- if(this.useLoadNotifier){
- loadingDiv = document.createElement("div");
- loadingDiv.setAttribute("id","loadingDiv_" + this.widgetid+"_"+index);
-
- //If this widget was previously told that the main image for this
- //thumb has been loaded, make the loading indicator transparent.
- this._setThumbClass(loadingDiv,
- this._loadedImages[index] ? "thumbLoaded":"thumbNotifier");
-
- imgContainer.appendChild(loadingDiv);
- }
- var size = dojo.marginBox(this.thumbsNode);
- var defaultSize;
- var sizeParam;
- if(this.isHorizontal){
- defaultSize = this.thumbWidth;
- sizeParam = 'w';
- } else{
- defaultSize = this.thumbHeight;
- sizeParam = 'h';
- }
- size = size[sizeParam];
- var sl = this.thumbScroller.scrollLeft, st = this.thumbScroller.scrollTop;
- dojo.style(this.thumbsNode, this._sizeProperty, (size + defaultSize + 20) + "px");
- //Remember the scroll values, as changing the size can alter them
- this.thumbScroller.scrollLeft = sl;
- this.thumbScroller.scrollTop = st;
- this.thumbsNode.appendChild(imgContainer);
-
- dojo.connect(img, "onload", this, function(){
- var realSize = dojo.marginBox(img)[sizeParam];
- this._totalSize += (Number(realSize) + 4);
- dojo.style(this.thumbsNode, this._sizeProperty, this._totalSize + "px");
-
- if(this.useLoadNotifier){dojo.style(loadingDiv, "width", (img.width - 4) + "px"); }
- callback();
- return false;
- });
-
- dojo.connect(img, "onclick", this, function(evt){
- dojo.publish(this.getClickTopicName(), [{
- index: evt.target._index,
- data: evt.target._data,
- url: img.getAttribute("src"),
- largeUrl: this.imageStore.getValue(data,this.imageLargeAttr),
- title: this.imageStore.getValue(data,this.titleAttr),
- link: this.imageStore.getValue(data,this.linkAttr)
- }]);
- return false;
- });
- dojo.addClass(img, "imageGalleryThumb");
- img.setAttribute("src", url);
- var title = this.imageStore.getValue(data, this.titleAttr);
- if(title){ img.setAttribute("title",title); }
- this._updateNavControls();
-
- },
-
- _updateNavControls: function(){
- // summary: Updates the navigation controls to hide/show them when at
- // the first or last images.
- var cells = [];
- var change = function(node, add){
- var fn = add ? "addClass" : "removeClass";
- dojo[fn](node,"enabled");
- dojo[fn](node,"thumbClickable");
- };
-
- var pos = this.isHorizontal ? "scrollLeft" : "scrollTop";
- var size = this.isHorizontal ? "offsetWidth" : "offsetHeight";
- change(this.navPrev, (this.thumbScroller[pos] > 0));
-
- var last = this._thumbs[this._thumbs.length - 1];
- var addClass = (this.thumbScroller[pos] + this._scrollerSize < this.thumbsNode[size]);
- change(this.navNext, addClass);
- }
+dojo.declare("dojox.image.ThumbnailPicker",[dijit._Widget,dijit._Templated],{imageStore:null,request:null,size:500,thumbHeight:75,thumbWidth:100,useLoadNotifier:false,useHyperlink:false,hyperlinkTarget:"new",isClickable:true,isScrollable:true,isHorizontal:true,autoLoad:true,linkAttr:"link",imageThumbAttr:"imageUrlThumb",imageLargeAttr:"imageUrl",pageSize:20,titleAttr:"title",templateString:dojo.cache("dojox.image","resources/ThumbnailPicker.html","<div dojoAttachPoint=\"outerNode\" class=\"thumbOuter\">\n\t<div dojoAttachPoint=\"navPrev\" class=\"thumbNav thumbClickable\">\n\t <img src=\"\" dojoAttachPoint=\"navPrevImg\"/> \n\t</div>\n\t<div dojoAttachPoint=\"thumbScroller\" class=\"thumbScroller\">\n\t <div dojoAttachPoint=\"thumbsNode\" class=\"thumbWrapper\"></div>\n\t</div>\n\t<div dojoAttachPoint=\"navNext\" class=\"thumbNav thumbClickable\">\n\t <img src=\"\" dojoAttachPoint=\"navNextImg\"/> \n\t</div>\n</div>\n"),_thumbs:[],_thumbIndex:0,_maxPhotos:0,_loadedImages:{},postCreate:function(){
+this.widgetid=this.id;
+this.inherited(arguments);
+this.pageSize=Number(this.pageSize);
+this._scrollerSize=this.size-(51*2);
+var _1=this._sizeProperty=this.isHorizontal?"width":"height";
+dojo.style(this.outerNode,"textAlign","center");
+dojo.style(this.outerNode,_1,this.size+"px");
+dojo.style(this.thumbScroller,_1,this._scrollerSize+"px");
+if(this.useHyperlink){
+dojo.subscribe(this.getClickTopicName(),this,function(_2){
+var _3=_2.index;
+var _4=this.imageStore.getValue(_2.data,this.linkAttr);
+if(!_4){
+return;
+}
+if(this.hyperlinkTarget=="new"){
+window.open(_4);
+}else{
+window.location=_4;
+}
+});
+}
+if(this.isClickable){
+dojo.addClass(this.thumbsNode,"thumbClickable");
+}
+this._totalSize=0;
+this.init();
+},init:function(){
+if(this.isInitialized){
+return false;
+}
+var _5=this.isHorizontal?"Horiz":"Vert";
+dojo.addClass(this.navPrev,"prev"+_5);
+dojo.addClass(this.navNext,"next"+_5);
+dojo.addClass(this.thumbsNode,"thumb"+_5);
+dojo.addClass(this.outerNode,"thumb"+_5);
+dojo.attr(this.navNextImg,"src",this._blankGif);
+dojo.attr(this.navPrevImg,"src",this._blankGif);
+this.connect(this.navPrev,"onclick","_prev");
+this.connect(this.navNext,"onclick","_next");
+this.isInitialized=true;
+if(this.isHorizontal){
+this._offsetAttr="offsetLeft";
+this._sizeAttr="offsetWidth";
+this._scrollAttr="scrollLeft";
+}else{
+this._offsetAttr="offsetTop";
+this._sizeAttr="offsetHeight";
+this._scrollAttr="scrollTop";
+}
+this._updateNavControls();
+if(this.imageStore&&this.request){
+this._loadNextPage();
+}
+return true;
+},getClickTopicName:function(){
+return (this.widgetId||this.id)+"/select";
+},getShowTopicName:function(){
+return (this.widgetId||this.id)+"/show";
+},setDataStore:function(_6,_7,_8){
+this.reset();
+this.request={query:{},start:_7.start||0,count:_7.count||10,onBegin:dojo.hitch(this,function(_9){
+this._maxPhotos=_9;
+})};
+if(_7.query){
+dojo.mixin(this.request.query,_7.query);
+}
+if(_8){
+dojo.forEach(["imageThumbAttr","imageLargeAttr","linkAttr","titleAttr"],function(_a){
+if(_8[_a]){
+this[_a]=_8[_a];
+}
+},this);
+}
+this.request.start=0;
+this.request.count=this.pageSize;
+this.imageStore=_6;
+this._loadInProgress=false;
+if(!this.init()){
+this._loadNextPage();
+}
+},reset:function(){
+this._loadedImages={};
+dojo.forEach(this._thumbs,function(_b){
+if(_b&&_b.parentNode){
+dojo.destroy(_b);
+}
});
-
+this._thumbs=[];
+this.isInitialized=false;
+this._noImages=true;
+},isVisible:function(_c){
+var _d=this._thumbs[_c];
+if(!_d){
+return false;
+}
+var _e=this.isHorizontal?"offsetLeft":"offsetTop";
+var _f=this.isHorizontal?"offsetWidth":"offsetHeight";
+var _10=this.isHorizontal?"scrollLeft":"scrollTop";
+var _11=_d[_e]-this.thumbsNode[_e];
+return (_11>=this.thumbScroller[_10]&&_11+_d[_f]<=this.thumbScroller[_10]+this._scrollerSize);
+},resize:function(dim){
+var _12=this.isHorizontal?"w":"h";
+var _13=0;
+if(this._thumbs.length>0&&dojo.marginBox(this._thumbs[0]).w==0){
+return;
+}
+dojo.forEach(this._thumbs,dojo.hitch(this,function(_14){
+var mb=dojo.marginBox(_14.firstChild);
+var _15=mb[_12];
+_13+=(Number(_15)+10);
+if(this.useLoadNotifier&&mb.w>0){
+dojo.style(_14.lastChild,"width",(mb.w-4)+"px");
+}
+dojo.style(_14,"width",mb.w+"px");
+}));
+dojo.style(this.thumbsNode,this._sizeProperty,_13+"px");
+this._updateNavControls();
+},_next:function(){
+var pos=this.isHorizontal?"offsetLeft":"offsetTop";
+var _16=this.isHorizontal?"offsetWidth":"offsetHeight";
+var _17=this.thumbsNode[pos];
+var _18=this._thumbs[this._thumbIndex];
+var _19=_18[pos]-_17;
+var _1a=-1,img;
+for(var i=this._thumbIndex+1;i<this._thumbs.length;i++){
+img=this._thumbs[i];
+if(img[pos]-_17+img[_16]-_19>this._scrollerSize){
+this._showThumbs(i);
+return;
+}
+}
+},_prev:function(){
+if(this.thumbScroller[this.isHorizontal?"scrollLeft":"scrollTop"]==0){
+return;
+}
+var pos=this.isHorizontal?"offsetLeft":"offsetTop";
+var _1b=this.isHorizontal?"offsetWidth":"offsetHeight";
+var _1c=this._thumbs[this._thumbIndex];
+var _1d=_1c[pos]-this.thumbsNode[pos];
+var _1e=-1,img;
+for(var i=this._thumbIndex-1;i>-1;i--){
+img=this._thumbs[i];
+if(_1d-img[pos]>this._scrollerSize){
+this._showThumbs(i+1);
+return;
+}
+}
+this._showThumbs(0);
+},_checkLoad:function(img,_1f){
+dojo.publish(this.getShowTopicName(),[{index:_1f}]);
+this._updateNavControls();
+this._loadingImages={};
+this._thumbIndex=_1f;
+if(this.thumbsNode.offsetWidth-img.offsetLeft<(this._scrollerSize*2)){
+this._loadNextPage();
+}
+},_showThumbs:function(_20){
+_20=Math.min(Math.max(_20,0),this._maxPhotos);
+if(_20>=this._maxPhotos){
+return;
+}
+var img=this._thumbs[_20];
+if(!img){
+return;
+}
+var _21=img.offsetLeft-this.thumbsNode.offsetLeft;
+var top=img.offsetTop-this.thumbsNode.offsetTop;
+var _22=this.isHorizontal?_21:top;
+if((_22>=this.thumbScroller[this._scrollAttr])&&(_22+img[this._sizeAttr]<=this.thumbScroller[this._scrollAttr]+this._scrollerSize)){
+return;
+}
+if(this.isScrollable){
+var _23=this.isHorizontal?{x:_21,y:0}:{x:0,y:top};
+dojox.fx.smoothScroll({target:_23,win:this.thumbScroller,duration:300,easing:dojo.fx.easing.easeOut,onEnd:dojo.hitch(this,"_checkLoad",img,_20)}).play(10);
+}else{
+if(this.isHorizontal){
+this.thumbScroller.scrollLeft=_21;
+}else{
+this.thumbScroller.scrollTop=top;
+}
+this._checkLoad(img,_20);
+}
+},markImageLoaded:function(_24){
+var _25=dojo.byId("loadingDiv_"+this.widgetid+"_"+_24);
+if(_25){
+this._setThumbClass(_25,"thumbLoaded");
}
+this._loadedImages[_24]=true;
+},_setThumbClass:function(_26,_27){
+if(!this.autoLoad){
+return;
+}
+dojo.addClass(_26,_27);
+},_loadNextPage:function(){
+if(this._loadInProgress){
+return;
+}
+this._loadInProgress=true;
+var _28=this.request.start+(this._noImages?0:this.pageSize);
+var pos=_28;
+while(pos<this._thumbs.length&&this._thumbs[pos]){
+pos++;
+}
+var _29=this.imageStore;
+var _2a=function(_2b,_2c){
+if(_29!=this.imageStore){
+return;
+}
+if(_2b&&_2b.length){
+var _2d=0;
+var _2e=dojo.hitch(this,function(){
+if(_2d>=_2b.length){
+this._loadInProgress=false;
+return;
+}
+var _2f=_2d++;
+this._loadImage(_2b[_2f],pos+_2f,_2e);
+});
+_2e();
+this._updateNavControls();
+}else{
+this._loadInProgress=false;
+}
+};
+var _30=function(){
+this._loadInProgress=false;
+};
+this.request.onComplete=dojo.hitch(this,_2a);
+this.request.onError=dojo.hitch(this,_30);
+this.request.start=_28;
+this._noImages=false;
+this.imageStore.fetch(this.request);
+},_loadImage:function(_31,_32,_33){
+var _34=this.imageStore;
+var url=_34.getValue(_31,this.imageThumbAttr);
+var _35=dojo.create("div",{id:"img_"+this.widgetid+"_"+_32});
+var img=dojo.create("img",{},_35);
+img._index=_32;
+img._data=_31;
+this._thumbs[_32]=_35;
+var _36;
+if(this.useLoadNotifier){
+_36=dojo.create("div",{id:"loadingDiv_"+this.widgetid+"_"+_32},_35);
+this._setThumbClass(_36,this._loadedImages[_32]?"thumbLoaded":"thumbNotifier");
+}
+var _37=dojo.marginBox(this.thumbsNode);
+var _38;
+var _39;
+if(this.isHorizontal){
+_38=this.thumbWidth;
+_39="w";
+}else{
+_38=this.thumbHeight;
+_39="h";
+}
+_37=_37[_39];
+var sl=this.thumbScroller.scrollLeft,st=this.thumbScroller.scrollTop;
+dojo.style(this.thumbsNode,this._sizeProperty,(_37+_38+20)+"px");
+this.thumbScroller.scrollLeft=sl;
+this.thumbScroller.scrollTop=st;
+this.thumbsNode.appendChild(_35);
+dojo.connect(img,"onload",this,dojo.hitch(this,function(){
+if(_34!=this.imageStore){
+return false;
+}
+this.resize();
+setTimeout(_33,0);
+return false;
+}));
+dojo.connect(img,"onclick",this,function(evt){
+dojo.publish(this.getClickTopicName(),[{index:evt.target._index,data:evt.target._data,url:img.getAttribute("src"),largeUrl:this.imageStore.getValue(_31,this.imageLargeAttr),title:this.imageStore.getValue(_31,this.titleAttr),link:this.imageStore.getValue(_31,this.linkAttr)}]);
+return false;
+});
+dojo.addClass(img,"imageGalleryThumb");
+img.setAttribute("src",url);
+var _3a=this.imageStore.getValue(_31,this.titleAttr);
+if(_3a){
+img.setAttribute("title",_3a);
+}
+this._updateNavControls();
+},_updateNavControls:function(){
+var _3b=[];
+var _3c=function(_3d,add){
+var fn=add?"addClass":"removeClass";
+dojo[fn](_3d,"enabled");
+dojo[fn](_3d,"thumbClickable");
+};
+var pos=this.isHorizontal?"scrollLeft":"scrollTop";
+var _3e=this.isHorizontal?"offsetWidth":"offsetHeight";
+_3c(this.navPrev,(this.thumbScroller[pos]>0));
+var _3f=this._thumbs[this._thumbs.length-1];
+var _40=(this.thumbScroller[pos]+this._scrollerSize<this.thumbsNode[_3e]);
+_3c(this.navNext,_40);
+}});
+}
diff --git a/js/dojo/dojox/image/resources/Lightbox.html b/js/dojo/dojox/image/resources/Lightbox.html
--- a/js/dojo/dojox/image/resources/Lightbox.html
+++ b/js/dojo/dojox/image/resources/Lightbox.html
@@ -1,15 +1,13 @@
<div class="dojoxLightbox" dojoAttachPoint="containerNode">
<div style="position:relative">
- <div dojoAttachPoint="imageContainer" class="dojoxLightboxContainer">
+ <div dojoAttachPoint="imageContainer" class="dojoxLightboxContainer" dojoAttachEvent="onclick: _onImageClick">
<img dojoAttachPoint="imgNode" src="${imgUrl}" class="dojoxLightboxImage" alt="${title}">
<div class="dojoxLightboxFooter" dojoAttachPoint="titleNode">
<div class="dijitInline LightboxClose" dojoAttachPoint="closeNode"></div>
<div class="dijitInline LightboxNext" dojoAttachPoint="nextNode"></div>
<div class="dijitInline LightboxPrev" dojoAttachPoint="prevNode"></div>
-
- <div class="dojoxLightboxText"><span dojoAttachPoint="textNode">${title}</span><span dojoAttachPoint="groupCount" class="dojoxLightboxGroupText"></span></div>
+ <div class="dojoxLightboxText" dojoAttachPoint="titleTextNode"><span dojoAttachPoint="textNode">${title}</span><span dojoAttachPoint="groupCount" class="dojoxLightboxGroupText"></span></div>
</div>
- </div>
-
+ </div>
</div>
</div>
\ No newline at end of file
diff --git a/js/dojo/dojox/image/resources/image.css b/js/dojo/dojox/image/resources/image.css
--- a/js/dojo/dojox/image/resources/image.css
+++ b/js/dojo/dojox/image/resources/image.css
@@ -1,337 +1,328 @@
-/*
- This is the master CSS file for the dojox.image project, and provides all
- needed definitions for:
-
- dojox.image.Lightbox
- dojox.image.Gallery [which is a combination of:]
- dojox.image.SlideShow
- dojox.image.ThumbNailPicker
-*/
-
-
-/* dojox.image.Lightbox:base */
-/* FIXME: should be be doing this? I want a black underlay, but this sets ALL dialogs to black,
- but because it's decendant of body, i can't set this color any other way ... */
.dijitDialogUnderlay {
background-color:#000;
}
-
.dojoxLightbox {
position:absolute;
z-index:999;
overflow:hidden;
width:100px;
height:100px;
border:11px solid #fff;
- background:#fff url('images/loading.gif') no-repeat center center;
-
- /* special safari + FF specific rounding + shadows */
- -webkit-box-shadow: 0px 6px 10px #636363; /* #adadad; */
+ background:#fff url(images/loading.gif) no-repeat center center;
+
+ -webkit-box-shadow: 0px 6px 10px #636363;
-webkit-border-radius: 3px;
-moz-border-radius:4px;
+ border-radius: 4px;
}
-
.dojoxLightboxContainer {
position:absolute;
top:0; left:0;
}
-
.dojoxLightboxFooter {
- height:50px;
+ padding-bottom:5px;
position:relative;
bottom:0;
left:0;
margin-top:8px;
color:#333;
z-index:1000;
font-size:10pt;
}
-
.dojoxLightboxGroupText {
color:#666;
font-size:8pt;
}
-
.LightboxNext,
.LightboxPrev,
.LightboxClose {
float:right;
width:16px;
height:16px;
cursor:pointer;
}
-
-/* dojox.image.Lightbox:tundra */
+.nihilo .LightboxClose,
.tundra .LightboxClose {
- background:url('../../../dijit/themes/tundra/images/tabClose.png') no-repeat center center;
+ background:url(images/close.png) no-repeat center center;
}
+.di_ie6 .nihilo .LightboxClose,
+.dj_ie6 .tundra .LightboxClose {
+ background:url(images/close.gif) no-repeat center center;
+}
+.nihilo .LightboxNext,
.tundra .LightboxNext {
- background:url('../../../dijit/themes/tundra/images/arrowRight.png') no-repeat center center;
+ background:url(images/right.png) no-repeat center center;
}
+.dj_ie6 .nihilo .LightboxNext,
+.dj_ie6 .tundra .LightboxNext {
+ background:url(images/right.gif) no-repeat center center;
+}
+.nihilo .LightboxPrev,
.tundra .LightboxPrev {
- background:url('../../../dijit/themes/tundra/images/arrowLeft.png') no-repeat center center;
+ background:url(images/left.png) no-repeat center center;
}
-
-/* dojox.image.Lightbox:soria */
+.dj_ie6 .nihilo .LightboxPrev,
+.dj_ie6 .tundra .LightboxPrev {
+ background:url(images/left.gif) no-repeat center center;
+}
+.soria .LightboxClose,
.soria .LightboxNext,
-.soria .LightboxPrev,
-.soria .LightboxClose {
- background:url('../../../dijit/themes/soria/images/arrows.png') no-repeat center center;
- background-position:-65px 0;
+.soria .LightboxPrev {
+ width:15px;
+ height:15px;
+ background:url(../../../dijit/themes/soria/images/spriteRoundedIconsSmall.png) no-repeat center center;
+ background-position:-60px;
}
.soria .LightboxNext {
- background-position:-48px 0;
+ background-position:-30px 0;
}
.soria .LightboxPrev {
- background-position:-16px 0;
+ background-position:0 0;
}
-
-/* dojox.image.SlideShow */
-
.slideShowWrapper {
position:relative;
background:#fff;
padding:8px;
border:1px solid #333;
padding-bottom:20px;
overflow:hidden;
- text-align: center;
-moz-border-radius:3pt;
-webkit-border-radius:4pt;
-webkit-drop-shadow:#ccc 4pt;
}
.slideShowNav {
position:absolute;
bottom:-18px;
left:0px;
padding:0px 3px 2px 0px;
background-color:#fff;
width:100%;
}
.slideShowNavWrapper { float:right; }
.slideShowTitle {
float:left;
color:#333;
font-size:10pt;
}
.slideShowTitle .slideShowCounterText {
font-size:6pt; color:#666;
}
.slideShowHidden {
position:absolute;
display: none;
height: 1px;
width: 1px;
}
.slideShowImageWrapper {
position:relative;
text-align: center;
margin-top: -42px;
float: left;
width: 100%;
}
.slideShowImageWrapper img {
border: 0px none;
}
.slideShowNotifier {
background-color: red;
width: 100px;
height: 5px;
- font-size: 1%;/*IE hack to get around the Empty-Div bug*/
+ font-size: 1%;
}
.slideShowSlideShow {
position:absolute;
top:30px;
padding: 0 5px;
border: 0px;
text-decoration: none;
color: #2e6ab1;
}
.slideShowLoading { background-color: #fad66a; }
.slideShowLoaded { background-color: transparent; }
-/*
-.sprite-arrowbottom { background-position: 0 -30px; }
-.sprite-arrowtop { background-position: 0 -430px; }
-*/
.slideShowCtrlPrev {
background-position: -96px 0px;
float: left;
}
.slideShowCtrlNext {
background-position: -144px 0px;
float: right;
}
.slideShowCtrlPlay {
background-position: -190px 0px;
position: absolute;
}
.slideShowPaused .slideShowCtrlPlay {
background-position: -236px 0px;
position: absolute;
}
.slideShowCtrl span.slideShowCtrlHide {
- background-image: url("images/1pixel.gif");
+ background-image: url(../../../dojo/resources/blank.gif);
cursor: auto;
}
-
.slideShowCtrl {
height: 50px;
width: 100%;
position: relative;
z-index:999;
float: left;
}
.slideShowCtrl span {
width: 50px;
height: 100%;
- background-image: url("images/buttons.png");
+ background-image: url(images/buttons.png);
cursor: pointer;
}
-.dj_ie6 .slideShowCtrl span {
- background-image: url("images/buttons.gif");
+.dj_ie .slideShowCtrl span {
+ background-image: url(images/buttons.gif);
}
-
.dj_ie6 .slideShowPager li.currentpage,
.dj_ie6 .pagination li.disablepage{
- /*IE 6 and below. Adjust non linked LIs slightly to account for bugs*/
+
margin-right: 5px;
padding-right: 0;
}
-
-/* dojox.image.ThumbnailPicker */
-
.thumbWrapper .thumbNav {
background-repeat: no-repeat;
background-position: center;
padding-top: 1px;
width: 30px;
height: 100%;
}
-
.thumbOuter {
padding-bottom: 2px;
}
-
.thumbOuter.thumbHoriz {
width: 500px;
height: 85px;
}
-
.thumbOuter.thumbVert {
width: 100px;
height: 400px;
}
-
.thumbOuter .enabled {
- background: transparent url("images/buttons.png") no-repeat center center;
+ background: transparent url(images/buttons.png) no-repeat center center;
}
-.dj_ie6 .thumbOuter .enabled { background-image: url("images/buttons.gif"); }
-
+.dj_ie6 .thumbOuter .enabled { background-image: url(images/buttons.gif); }
.thumbOuter .thumbNav img {
width: 48px;
height: 75px;
}
.thumbOuter .thumbClickable div {
cursor: pointer;
}
.thumbOuter .prevHoriz {
background-position: -96px 12px;
position: relative;
float: left;
height: 100%;
}
-
.thumbOuter .nextHoriz {
background-position: -144px 12px;
position: relative;
float: right;
height: 100%;
-/* margin-top: -85px;*/
}
.thumbOuter .prevVert {
background-position: 0px 0px;
height: 48px;
width:48px;
margin-left:24px;
}
-
.thumbOuter .nextVert {
background-position: -48px 0px;
height: 48px;
width:48px;
margin-left:24px;
}
-
.thumbWrapper img {
height: 75px;
max-width: 100px;
- width: expression(this.width > 100 ? 100: true);/*IE Hack*/
+ width: expression(this.width > 100 ? 100: true);
}
-
.thumbWrapper .thumbNav .imageGalleryThumb {
height: 50px;
}
-
.thumbWrapper .thumbNotifier {
background-color: red;
width: 0px;
margin-left: 2px;
height: 5px;
- font-size: 1%;/*IE hack to get around the Empty-Div bug*/
+ font-size: 1%;
}
-
.thumbWrapper .thumbLoaded {
background-color: transparent;
}
-
.thumbScroller {
overflow-x: hidden;
overflow-y: hidden;
- white-space: nowrap;
text-align: center;
}
-
.thumbHoriz .thumbScroller {
width: 500px;
height: 85px;
float: left;
}
-
.thumbVert .thumbScroller {
height: 500px;
width: 100px;
}
-
.thumbWrapper {
float: left;
}
-
.thumbVert .thumbWrapper {
width: 100px;
height: 10px;
}
.thumbHoriz .thumbWapper {
height:85px;
width: 10px;
}
-
.thumbWrapper.thumbHoriz div {
float: left;
padding-right: 2px;
}
-
.thumbWrapper.thumbVert {
width: 100px;
}
-
.thumbWrapper.thumbVert div {
padding-bottom: 2px;
}
-
-/* dojox.image.Gallery */
-
.imageGalleryWrapper {
padding-bottom: 20px;
text-align: center;
}
+.dojoxBadge {
+ position:relative;
+}
+.dojoxBadge .dojoxBadgeImage {
+ position:absolute;
+ top:0; left:0;
+ margin:0;
+ padding:0;
+}
+.dojoxBadge {
+ margin:0; padding:0;
+ border:1px solid #eee;
+}
+.dojoxBadge .dojoxBadgeImage {
+ overflow:hidden;
+ margin-left:1px;
+ margin-top:1px;
+ background:#ededed;
+ z-index:90;
+}
+.dojoxBadge .dojoxBadgeSeen {
+ background-color:#dedede;
+}
+.dojoxBadge .dojoxBadgeOver {
+ background-color:green !important;
+}
+.dojoxBadge .dojoxBadgeTop {
+ z-index:99;
+}
+.glassNode {
+ overflow:hidden;
+ position:absolute;
+ visibility:hidden;
+}
diff --git a/js/dojo/dojox/io/README b/js/dojo/dojox/io/README
--- a/js/dojo/dojox/io/README
+++ b/js/dojo/dojox/io/README
@@ -1,45 +1,82 @@
--------------------------------------------------------------------------------
-DojoX IO
--------------------------------------------------------------------------------
-Version 0.3.1
-Release date: 09/06/2007
--------------------------------------------------------------------------------
-Project state:
-experimental
--------------------------------------------------------------------------------
-Credits
- Bryan Forbes (bryan@reigndropsfall.net)
--------------------------------------------------------------------------------
-Project description
-
--------------------------------------------------------------------------------
-Dependencies:
-
-DojoX IO depends on Dojo Core and DojoX UUID's generateRandomUuid function.
--------------------------------------------------------------------------------
-Documentation
-
--------------------------------------------------------------------------------
-Installation instructions
-
-Grab the following from the Dojo SVN Repository:
-http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/uuid.js
-http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/uuid/*
-
-Install into the following directory structure:
-/dojox/uuid/
-
-AND
-
-Grab the following from the Dojo SVN Repository:
-http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/io/*
-
-Install into the following directory structure:
-/dojox/io/
-
-...both of which should be at the same level as your Dojo checkout.
--------------------------------------------------------------------------------
-Additional Notes
-
-The information contained in this README does not pertain to DojoX XHR IFrame Proxy.
-For that information see proxy/README.
+-------------------------------------------------------------------------------
+DojoX IO
+-------------------------------------------------------------------------------
+Version 0.4.0
+Release date: 07/04/2008
+-------------------------------------------------------------------------------
+Project state:
+experimental
+-------------------------------------------------------------------------------
+Credits
+ Bryan Forbes (bryan AT reigndropsfall.net)
+ Kris Zyp (kris AT sitepen.com)
+ James Burke (jburke AT dojotoolkit.org)
+ Tom Trenka (ttrenka AT gmail.com)
+
+-------------------------------------------------------------------------------
+Project description
+
+ A Collection of advanced and experimental IO modules:
+
+ * scriptFrame.js - Uses an iframe for dojo.io.script requests. Useful in some
+ long-polling comet situations in Firefox and Opera. Those browsers execute scripts
+ in DOM order, not network-receive order, so a long-polling script will block other
+ dynamically appended scripts from running until it completes. By using an iframe
+ for the dojo.io.script requests, this issue can be avoided.
+
+ * xhrMultiPart.js - Constructs multi-part mime XHR requests. Useful when wanting
+ multi-part requests but not using a form with a file input. Note that it does not
+ allow you to send files from local disks -- a form with a file input is required
+ for that use case. xhrMultipart is not useful in that use case.
+
+ * xhrPlugins.js - An adapter registry for having multiple XHR handlers (like
+ XDomainRequest, CS-XHR, proxy, and window.name)
+
+ * windowName.js - Cross-domain transport using window.name
+ xhrWindowNamePlugin.js - window.name plugin for XHR adapter registry
+
+ * httpParse.js - HTTP message parser. Parses to an XHR like interface.
+
+ * OAuth.js - Object to be used for signing OpenAuth requests. Includes easy
+ wrappers for xhr.
+
+-------------------------------------------------------------------------------
+Dependencies:
+
+DojoX IO xhrMultiPart depends on Dojo Core and DojoX UUID's generateRandomUuid
+function.
+
+xhrWindowNamePlugin depends on dojox.secure.capability for safe JSON parsing
+
+OAuth depends on dojox.encoding.digests.SHA1.
+-------------------------------------------------------------------------------
+Documentation
+
+-------------------------------------------------------------------------------
+Installation instructions
+
+Grab the following from the Dojo SVN Repository:
+http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/uuid.js
+http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/uuid/*
+http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/secure/*
+http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/encoding/digests/*
+
+Install into the following directory structure:
+/dojox/uuid/
+/dojox/secure/
+/dojox/encoding/digests/
+
+AND
+
+Grab the following from the Dojo SVN Repository:
+http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/io/*
+
+Install into the following directory structure:
+/dojox/io/
+
+...both of which should be at the same level as your Dojo checkout.
+-------------------------------------------------------------------------------
+Additional Notes
+
+The information contained in this README does not pertain to DojoX XHR IFrame Proxy.
+For that information see proxy/README.
diff --git a/js/dojo/dojox/io/proxy/README b/js/dojo/dojox/io/proxy/README
--- a/js/dojo/dojox/io/proxy/README
+++ b/js/dojo/dojox/io/proxy/README
@@ -1,82 +1,82 @@
-------------------------------------------------------------------------------
Project Name
-------------------------------------------------------------------------------
-Version 0.5
-Release date: MM/DD/YYYY (in progres, porting)
+Version 0.6
+Release date: 01/31/2008
-------------------------------------------------------------------------------
Project state:
experimental
-------------------------------------------------------------------------------
Credits
James Burke (jburke@dojotoolkit.org)
-------------------------------------------------------------------------------
Project description
The XHR IFrame Proxy (xip) allows you to do cross-domain XMLHttpRequests (XHRs).
It works by using two iframes, one your domain (xip_client.html), one on the
other domain (xip_server.html). They use fragment IDs in the iframe URLs to pass
messages to each other. The xip.js file defines dojox.io.proxy.xip. This module
intercepts XHR calls made by the Dojo XHR methods (dojo.xhr* methods). The module
returns a facade object that acts like an XHR object. Once send is called on the
facade, the facade's data is serialized, given to xip_client.html. xip_client.html
then passes the serialized data to xip_server.html by changing xip_server.html's
URL fragment ID (the #xxxx part of an URL). xip_server.html deserializes the
message fragments, and does an XHR call, gets the response, and serializes the
data. The serialized data is then passed back to xip_client.html by changing
xip_client.html's fragment ID. Then the response is deserialized and used as
the response inside the facade XHR object that was created by dojox.io.proxy.xip.
-------------------------------------------------------------------------------
Dependencies:
xip.js: Dojo Core, dojox.data.dom
xip_client.html: none
xip_server.html: none (but see Additional Notes section)
-------------------------------------------------------------------------------
Documentation
There is some documentation that applies to the Dojo 0.4.x version of these files:
http://dojotoolkit.org/book/dojo-book-0-4/part-5-connecting-pieces/i-o/cross-domain-xmlhttprequest-using-iframe-proxy
The general theory still applies to this code, but the specifics are different
for the Dojo 0.9+ codebase. Doc updates hopefully after the basic code is ported.
The current implementation destroys the iframes used for a request after the request
completes. This seems to cause a memory leak, particularly in IE. So, it is not
suited for doing polling cross-domain requests.
-------------------------------------------------------------------------------
Installation instructions
Grab the following from the Dojox SVN Repository:
http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/io/proxy/xip.js
http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/io/proxy/xip_client.html
Install into the following directory structure:
/dojox/io/proxy/
...which should be at the same level as your Dojo checkout.
Grab the following from the Dojox SVN Repository:
http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/io/proxy/xip_server.html
and install it on the domain that you want to allow receiving cross-domain
requests. Be sure to read the documentation, the Additional Notes below, and
the in-file comments.
-------------------------------------------------------------------------------
Additional Notes
xip_client.html and xip_server.html do not work right away. You need to uncomment
out the script tags in the files. Additionally, xip_server.html requires a JS file,
isAllowed.js, to be defined. See the notes in xip_server.html for more informaiton.
XDOMAIN BUILD INSTRUCTIONS:
The dojox.io.proxy module requires some setup to use with an xdomain build.
The xip_client.html file has to be served from the same domain as your web page.
It cannot be served from the domain that has the xdomain build. Download xip_client.html
and install it on your server. Then set djConfig.xipClientUrl to the local path
of xip_client.html (just use a path, not a whole URL, since it will be on the same
domain as the page). The path to the file should be the path relative to the web
page that is using dojox.io.proxy.
diff --git a/js/dojo/dojox/io/proxy/xip.js b/js/dojo/dojox/io/proxy/xip.js
--- a/js/dojo/dojox/io/proxy/xip.js
+++ b/js/dojo/dojox/io/proxy/xip.js
@@ -1,236 +1,260 @@
-if(!dojo._hasResource["dojox.io.proxy.xip"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.io.proxy.xip"] = true;
-dojo.provide("dojox.io.proxy.xip");
-
-dojo.require("dojo.io.iframe");
-dojo.require("dojox.data.dom");
-
-dojox.io.proxy.xip = {
- //summary: Object that implements the iframe handling for XMLHttpRequest
- //IFrame Proxying.
- //description: Do not use this object directly. See the Dojo Book page
- //on XMLHttpRequest IFrame Proxying:
- //http://dojotoolkit.org/book/dojo-book-0-4/part-5-connecting-pieces/i-o/cross-domain-xmlhttprequest-using-iframe-proxy
- //Usage of XHR IFrame Proxying does not work from local disk in Safari.
-
- xipClientUrl: djConfig["xipClientUrl"] || dojo.moduleUrl("dojox.io.proxy", "xip_client.html"),
-
- _state: {},
- _stateIdCounter: 0,
-
- needFrameRecursion: function(){
- return (dojo.isIE >= 7);
- },
-
- send: function(facade){
- var stateId = "XhrIframeProxy" + (this._stateIdCounter++);
- facade._stateId = stateId;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- var frameUrl = this.xipClientUrl + "#0:init:id=" + stateId + "&server="
- + encodeURIComponent(facade._ifpServerUrl) + "&fr=false";
- if(this.needFrameRecursion()){
- //IE7 hack. Need to load server URL, and have that load the xip_client.html.
- //Also, this server URL needs to different from the one eventually loaded by xip_client.html
- //Otherwise, IE7 will not load it. Funky.
- var fullClientUrl = window.location.href.split("#")[0].split("?")[0];
- if((this.xipClientUrl + "").charAt(0) == "/"){
- var endIndex = fullClientUrl.indexOf("://");
- endIndex = fullClientUrl.indexOf("/", endIndex + 3);
- fullClientUrl = fullClientUrl.substring(0, endIndex);
- }else{
- fullClientUrl = fullClientUrl.substring(0, fullClientUrl.lastIndexOf("/") + 1);
- }
- fullClientUrl += this.xipClientUrl;
-
- var serverUrl = facade._ifpServerUrl
- + (facade._ifpServerUrl.indexOf("?") == -1 ? "?" : "&") + "dojo.fr=1";
-
- frameUrl = serverUrl + "#0:init:id=" + stateId + "&client="
- + encodeURIComponent(fullClientUrl) + "&fr=" + this.needFrameRecursion(); //fr is for Frame Recursion
- }
-
- this._state[stateId] = {
- facade: facade,
- stateId: stateId,
- clientFrame: dojo.io.iframe.create(stateId, "", frameUrl)
- };
-
- return stateId;
- },
-
- receive: function(/*String*/stateId, /*String*/urlEncodedData){
- /* urlEncodedData should have the following params:
- - responseHeaders
- - status
- - statusText
- - responseText
- */
- //Decode response data.
- var response = {};
- var nvPairs = urlEncodedData.split("&");
- for(var i = 0; i < nvPairs.length; i++){
- if(nvPairs[i]){
- var nameValue = nvPairs[i].split("=");
- response[decodeURIComponent(nameValue[0])] = decodeURIComponent(nameValue[1]);
- }
- }
-
- //Set data on facade object.
- var state = this._state[stateId];
- var facade = state.facade;
-
- facade._setResponseHeaders(response.responseHeaders);
- if(response.status == 0 || response.status){
- facade.status = parseInt(response.status, 10);
- }
- if(response.statusText){
- facade.statusText = response.statusText;
- }
- if(response.responseText){
- facade.responseText = response.responseText;
-
- //Fix responseXML.
- var contentType = facade.getResponseHeader("Content-Type");
- if(contentType && (contentType == "application/xml" || contentType == "text/xml")){
- facade.responseXML = dojox.data.dom.createDocument(response.responseText, contentType);
- }
- }
- facade.readyState = 4;
-
- this.destroyState(stateId);
- },
-
- clientFrameLoaded: function(/*String*/stateId){
- var state = this._state[stateId];
- var facade = state.facade;
-
- if(this.needFrameRecursion()){
- var clientWindow = window.open("", state.stateId + "_clientEndPoint");
- }else{
- var clientWindow = state.clientFrame.contentWindow;
- }
-
- var reqHeaders = [];
- for(var param in facade._requestHeaders){
- reqHeaders.push(param + ": " + facade._requestHeaders[param]);
- }
-
- var requestData = {
- uri: facade._uri
- };
- if(reqHeaders.length > 0){
- requestData.requestHeaders = reqHeaders.join("\r\n");
- }
- if(facade._method){
- requestData.method = facade._method;
- }
- if(facade._bodyData){
- requestData.data = facade._bodyData;
- }
-
- clientWindow.send(dojo.objectToQuery(requestData));
- },
-
- destroyState: function(/*String*/stateId){
- var state = this._state[stateId];
- if(state){
- delete this._state[stateId];
- var parentNode = state.clientFrame.parentNode;
- parentNode.removeChild(state.clientFrame);
- state.clientFrame = null;
- state = null;
- }
- },
-
- createFacade: function(){
- if(arguments && arguments[0] && arguments[0].iframeProxyUrl){
- return new dojox.io.proxy.xip.XhrIframeFacade(arguments[0].iframeProxyUrl);
- }else{
- return dojox.io.proxy.xip._xhrObjOld.apply(dojo, arguments);
- }
- }
+if(!dojo._hasResource["dojox.io.proxy.xip"]){
+dojo._hasResource["dojox.io.proxy.xip"]=true;
+dojo.provide("dojox.io.proxy.xip");
+dojo.require("dojo.io.iframe");
+dojo.require("dojox.data.dom");
+dojox.io.proxy.xip={xipClientUrl:((dojo.config||djConfig)["xipClientUrl"])||dojo.moduleUrl("dojox.io.proxy","xip_client.html"),urlLimit:4000,_callbackName:(dojox._scopeName||"dojox")+".io.proxy.xip.fragmentReceived",_state:{},_stateIdCounter:0,_isWebKit:navigator.userAgent.indexOf("WebKit")!=-1,send:function(_1){
+var _2=this.xipClientUrl;
+if(_2.split(":")[0].match(/javascript/i)||_1._ifpServerUrl.split(":")[0].match(/javascript/i)){
+return;
+}
+var _3=_2.indexOf(":");
+var _4=_2.indexOf("/");
+if(_3==-1||_4<_3){
+var _5=window.location.href;
+if(_4==0){
+_2=_5.substring(0,_5.indexOf("/",9))+_2;
+}else{
+_2=_5.substring(0,(_5.lastIndexOf("/")+1))+_2;
+}
+}
+this.fullXipClientUrl=_2;
+if(typeof document.postMessage!="undefined"){
+document.addEventListener("message",dojo.hitch(this,this.fragmentReceivedEvent),false);
+}
+this.send=this._realSend;
+return this._realSend(_1);
+},_realSend:function(_6){
+var _7="XhrIframeProxy"+(this._stateIdCounter++);
+_6._stateId=_7;
+var _8=_6._ifpServerUrl+"#0:init:id="+_7+"&client="+encodeURIComponent(this.fullXipClientUrl)+"&callback="+encodeURIComponent(this._callbackName);
+this._state[_7]={facade:_6,stateId:_7,clientFrame:dojo.io.iframe.create(_7,"",_8),isSending:false,serverUrl:_6._ifpServerUrl,requestData:null,responseMessage:"",requestParts:[],idCounter:1,partIndex:0,serverWindow:null};
+return _7;
+},receive:function(_9,_a){
+var _b={};
+var _c=_a.split("&");
+for(var i=0;i<_c.length;i++){
+if(_c[i]){
+var _d=_c[i].split("=");
+_b[decodeURIComponent(_d[0])]=decodeURIComponent(_d[1]);
+}
+}
+var _e=this._state[_9];
+var _f=_e.facade;
+_f._setResponseHeaders(_b.responseHeaders);
+if(_b.status==0||_b.status){
+_f.status=parseInt(_b.status,10);
+}
+if(_b.statusText){
+_f.statusText=_b.statusText;
+}
+if(_b.responseText){
+_f.responseText=_b.responseText;
+var _10=_f.getResponseHeader("Content-Type");
+if(_10){
+var _11=_10.split(";")[0];
+if(_11.indexOf("application/xml")==0||_11.indexOf("text/xml")==0){
+_f.responseXML=dojox.data.dom.createDocument(_b.responseText,_10);
+}
+}
+}
+_f.readyState=4;
+this.destroyState(_9);
+},frameLoaded:function(_12){
+var _13=this._state[_12];
+var _14=_13.facade;
+var _15=[];
+for(var _16 in _14._requestHeaders){
+_15.push(_16+": "+_14._requestHeaders[_16]);
+}
+var _17={uri:_14._uri};
+if(_15.length>0){
+_17.requestHeaders=_15.join("\r\n");
+}
+if(_14._method){
+_17.method=_14._method;
+}
+if(_14._bodyData){
+_17.data=_14._bodyData;
+}
+this.sendRequest(_12,dojo.objectToQuery(_17));
+},destroyState:function(_18){
+var _19=this._state[_18];
+if(_19){
+delete this._state[_18];
+var _1a=_19.clientFrame.parentNode;
+_1a.removeChild(_19.clientFrame);
+_19.clientFrame=null;
+_19=null;
+}
+},createFacade:function(){
+if(arguments&&arguments[0]&&arguments[0].iframeProxyUrl){
+return new dojox.io.proxy.xip.XhrIframeFacade(arguments[0].iframeProxyUrl);
+}else{
+return dojox.io.proxy.xip._xhrObjOld.apply(dojo,arguments);
+}
+},sendRequest:function(_1b,_1c){
+var _1d=this._state[_1b];
+if(!_1d.isSending){
+_1d.isSending=true;
+_1d.requestData=_1c||"";
+_1d.serverWindow=frames[_1d.stateId];
+if(!_1d.serverWindow){
+_1d.serverWindow=document.getElementById(_1d.stateId).contentWindow;
+}
+if(typeof document.postMessage=="undefined"){
+if(_1d.serverWindow.contentWindow){
+_1d.serverWindow=_1d.serverWindow.contentWindow;
+}
+}
+this.sendRequestStart(_1b);
+}
+},sendRequestStart:function(_1e){
+var _1f=this._state[_1e];
+_1f.requestParts=[];
+var _20=_1f.requestData;
+var _21=_1f.serverUrl.length;
+var _22=this.urlLimit-_21;
+var _23=0;
+while((_20.length-_23)+_21>this.urlLimit){
+var _24=_20.substring(_23,_23+_22);
+var _25=_24.lastIndexOf("%");
+if(_25==_24.length-1||_25==_24.length-2){
+_24=_24.substring(0,_25);
+}
+_1f.requestParts.push(_24);
+_23+=_24.length;
}
-
-//Replace the normal XHR factory with the proxy one.
-dojox.io.proxy.xip._xhrObjOld = dojo._xhrObj;
-dojo._xhrObj = dojox.io.proxy.xip.createFacade;
-
-/**
- Using this a reference: http://www.w3.org/TR/XMLHttpRequest/
-
- Does not implement the onreadystate callback since dojo.xhr* does
- not use it.
-*/
-dojox.io.proxy.xip.XhrIframeFacade = function(ifpServerUrl){
- //summary: XMLHttpRequest facade object used by dojox.io.proxy.xip.
-
- //description: Do not use this object directly. See the Dojo Book page
- //on XMLHttpRequest IFrame Proxying:
- //http://dojotoolkit.org/book/dojo-book-0-4/part-5-connecting-pieces/i-o/cross-domain-xmlhttprequest-using-iframe-proxy
- this._requestHeaders = {};
- this._allResponseHeaders = null;
- this._responseHeaders = {};
- this._method = null;
- this._uri = null;
- this._bodyData = null;
- this.responseText = null;
- this.responseXML = null;
- this.status = null;
- this.statusText = null;
- this.readyState = 0;
-
- this._ifpServerUrl = ifpServerUrl;
- this._stateId = null;
+_1f.requestParts.push(_20.substring(_23,_20.length));
+_1f.partIndex=0;
+this.sendRequestPart(_1e);
+},sendRequestPart:function(_26){
+var _27=this._state[_26];
+if(_27.partIndex<_27.requestParts.length){
+var _28=_27.requestParts[_27.partIndex];
+var cmd="part";
+if(_27.partIndex+1==_27.requestParts.length){
+cmd="end";
+}else{
+if(_27.partIndex==0){
+cmd="start";
+}
+}
+this.setServerUrl(_26,cmd,_28);
+_27.partIndex++;
+}
+},setServerUrl:function(_29,cmd,_2a){
+var _2b=this.makeServerUrl(_29,cmd,_2a);
+var _2c=this._state[_29];
+if(this._isWebKit){
+_2c.serverWindow.location=_2b;
+}else{
+_2c.serverWindow.location.replace(_2b);
+}
+},makeServerUrl:function(_2d,cmd,_2e){
+var _2f=this._state[_2d];
+var _30=_2f.serverUrl+"#"+(_2f.idCounter++)+":"+cmd;
+if(_2e){
+_30+=":"+_2e;
+}
+return _30;
+},fragmentReceivedEvent:function(evt){
+if(evt.uri.split("#")[0]==this.fullXipClientUrl){
+this.fragmentReceived(evt.data);
}
-
-dojo.extend(dojox.io.proxy.xip.XhrIframeFacade, {
- //The open method does not properly reset since Dojo does not reuse XHR objects.
- open: function(/*String*/method, /*String*/uri){
- this._method = method;
- this._uri = uri;
-
- this.readyState = 1;
- },
-
- setRequestHeader: function(/*String*/header, /*String*/value){
- this._requestHeaders[header] = value;
- },
-
- send: function(/*String*/stringData){
- this._bodyData = stringData;
-
- this._stateId = dojox.io.proxy.xip.send(this);
-
- this.readyState = 2;
- },
- abort: function(){
- dojox.io.proxy.xip.destroyState(this._stateId);
- },
-
- getAllResponseHeaders: function(){
- return this._allResponseHeaders; //String
- },
-
- getResponseHeader: function(/*String*/header){
- return this._responseHeaders[header]; //String
- },
-
- _setResponseHeaders: function(/*String*/allHeaders){
- if(allHeaders){
- this._allResponseHeaders = allHeaders;
-
- //Make sure ther are now CR characters in the headers.
- allHeaders = allHeaders.replace(/\r/g, "");
- var nvPairs = allHeaders.split("\n");
- for(var i = 0; i < nvPairs.length; i++){
- if(nvPairs[i]){
- var nameValue = nvPairs[i].split(": ");
- this._responseHeaders[nameValue[0]] = nameValue[1];
- }
- }
- }
- }
-});
-
+},fragmentReceived:function(_31){
+var _32=_31.indexOf("#");
+var _33=_31.substring(0,_32);
+var _34=_31.substring(_32+1,_31.length);
+var msg=this.unpackMessage(_34);
+var _35=this._state[_33];
+switch(msg.command){
+case "loaded":
+this.frameLoaded(_33);
+break;
+case "ok":
+this.sendRequestPart(_33);
+break;
+case "start":
+_35.responseMessage=""+msg.message;
+this.setServerUrl(_33,"ok");
+break;
+case "part":
+_35.responseMessage+=msg.message;
+this.setServerUrl(_33,"ok");
+break;
+case "end":
+this.setServerUrl(_33,"ok");
+_35.responseMessage+=msg.message;
+this.receive(_33,_35.responseMessage);
+break;
+}
+},unpackMessage:function(_36){
+var _37=_36.split(":");
+var _38=_37[1];
+_36=_37[2]||"";
+var _39=null;
+if(_38=="init"){
+var _3a=_36.split("&");
+_39={};
+for(var i=0;i<_3a.length;i++){
+var _3b=_3a[i].split("=");
+_39[decodeURIComponent(_3b[0])]=decodeURIComponent(_3b[1]);
+}
}
+return {command:_38,message:_36,config:_39};
+}};
+dojox.io.proxy.xip._xhrObjOld=dojo._xhrObj;
+dojo._xhrObj=dojox.io.proxy.xip.createFacade;
+dojox.io.proxy.xip.XhrIframeFacade=function(_3c){
+this._requestHeaders={};
+this._allResponseHeaders=null;
+this._responseHeaders={};
+this._method=null;
+this._uri=null;
+this._bodyData=null;
+this.responseText=null;
+this.responseXML=null;
+this.status=null;
+this.statusText=null;
+this.readyState=0;
+this._ifpServerUrl=_3c;
+this._stateId=null;
+};
+dojo.extend(dojox.io.proxy.xip.XhrIframeFacade,{open:function(_3d,uri){
+this._method=_3d;
+this._uri=uri;
+this.readyState=1;
+},setRequestHeader:function(_3e,_3f){
+this._requestHeaders[_3e]=_3f;
+},send:function(_40){
+this._bodyData=_40;
+this._stateId=dojox.io.proxy.xip.send(this);
+this.readyState=2;
+},abort:function(){
+dojox.io.proxy.xip.destroyState(this._stateId);
+},getAllResponseHeaders:function(){
+return this._allResponseHeaders;
+},getResponseHeader:function(_41){
+return this._responseHeaders[_41];
+},_setResponseHeaders:function(_42){
+if(_42){
+this._allResponseHeaders=_42;
+_42=_42.replace(/\r/g,"");
+var _43=_42.split("\n");
+for(var i=0;i<_43.length;i++){
+if(_43[i]){
+var _44=_43[i].split(": ");
+this._responseHeaders[_44[0]]=_44[1];
+}
+}
+}
+}});
+}
diff --git a/js/dojo/dojox/io/proxy/xip_client.html b/js/dojo/dojox/io/proxy/xip_client.html
--- a/js/dojo/dojox/io/proxy/xip_client.html
+++ b/js/dojo/dojox/io/proxy/xip_client.html
@@ -1,267 +1,102 @@
+<!--
+ /*
+ Copyright (c) 2004-2008, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+ */
+-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<!-- Security protection: uncomment the start and end script tags to enable. -->
<!-- script type="text/javascript" -->
// <!--
- /*
- This file is really focused on just sending one message to the server, and
- receiving one response. The code does not expect to be re-used for multiple messages.
- This might be reworked later if performance indicates a need for it.
-
- xip fragment identifier/hash values have the form:
- #id:cmd:realEncodedMessage
-
- id: some ID that should be unique among messages. No inherent meaning,
- just something to make sure the hash value is unique so the message
- receiver knows a new message is available.
-
- cmd: command to the receiver. Valid values are:
- - init: message used to init the frame. Sent as the first URL when loading
- the page. Contains some config parameters.
- - loaded: the remote frame is loaded. Only sent from server to client.
- - ok: the message that this page sent was received OK. The next message may
- now be sent.
- - start: the start message of a block of messages (a complete message may
- need to be segmented into many messages to get around the limitiations
- of the size of an URL that a browser accepts.
- - part: indicates this is a part of a message.
- - end: the end message of a block of messages. The message can now be acted upon.
- If the message is small enough that it doesn't need to be segmented, then
- just one hash value message can be sent with "end" as the command.
-
- To reassemble a segmented message, the realEncodedMessage parts just have to be concatenated
- together.
- */
-
- //MSIE has the lowest limit for URLs with fragment identifiers,
- //at around 4K. Choosing a slightly smaller number for good measure.
- xipUrlLimit = 4000;
- xipIdCounter = 1;
-
- function xipInit(){
- xipStateId = "";
- xipIsSending = false;
- xipServerUrl = null;
- xipStateId = null;
- xipRequestData = null;
- xipCurrentHash = "";
- xipResponseMessage = "";
- xipRequestParts = [];
- xipPartIndex = 0;
- xipServerWindow = null;
- xipUseFrameRecursion = false;
- }
- xipInit();
-
- function send(encodedData){
- if(xipUseFrameRecursion == "true"){
- var clientEndPoint = window.open(xipStateId + "_clientEndPoint");
- clientEndPoint.send(encodedData);
- }else{
- if(!xipIsSending){
- xipIsSending = true;
-
- xipRequestData = encodedData || "";
-
- //Get a handle to the server iframe.
- xipServerWindow = frames[xipStateId + "_frame"];
- if (!xipServerWindow){
- xipServerWindow = document.getElementById(xipStateId + "_frame").contentWindow;
- }
-
- sendRequestStart();
- }
- }
- }
-
- //Modify the server URL if it is a local path and
- //This is done for local/same domain testing.
- function fixServerUrl(ifpServerUrl){
- if(ifpServerUrl.indexOf("..") == 0){
- var parts = ifpServerUrl.split("/");
- ifpServerUrl = parts[parts.length - 1];
- }
- return ifpServerUrl;
- }
-
function pollHash(){
//Can't use location.hash because at least Firefox does a decodeURIComponent on it.
var urlParts = window.location.href.split("#");
if(urlParts.length == 2){
var newHash = urlParts[1];
if(newHash != xipCurrentHash){
try{
- messageReceived(newHash);
+ callMaster(xipStateId, newHash);
}catch(e){
//Make sure to not keep processing the error hash value.
xipCurrentHash = newHash;
throw e;
}
xipCurrentHash = newHash;
}
}
}
- function messageReceived(encodedData){
- var msg = unpackMessage(encodedData);
-
- switch(msg.command){
- case "loaded":
- xipMasterFrame.dojox.io.proxy.xip.clientFrameLoaded(xipStateId);
- break;
- case "ok":
- sendRequestPart();
- break;
- case "start":
- xipResponseMessage = "";
- xipResponseMessage += msg.message;
- setServerUrl("ok");
- break;
- case "part":
- xipResponseMessage += msg.message;
- setServerUrl("ok");
- break;
- case "end":
- setServerUrl("ok");
- xipResponseMessage += msg.message;
- xipMasterFrame.dojox.io.proxy.xip.receive(xipStateId, xipResponseMessage);
- break;
- }
- }
-
- function sendRequestStart(){
- //Break the message into parts, if necessary.
- xipRequestParts = [];
- var reqData = xipRequestData;
- var urlLength = xipServerUrl.length;
- var partLength = xipUrlLimit - urlLength;
- var reqIndex = 0;
-
- while((reqData.length - reqIndex) + urlLength > xipUrlLimit){
- var part = reqData.substring(reqIndex, reqIndex + partLength);
- //Safari will do some extra hex escaping unless we keep the original hex
- //escaping complete.
- var percentIndex = part.lastIndexOf("%");
- if(percentIndex == part.length - 1 || percentIndex == part.length - 2){
- part = part.substring(0, percentIndex);
- }
- xipRequestParts.push(part);
- reqIndex += part.length;
- }
- xipRequestParts.push(reqData.substring(reqIndex, reqData.length));
-
- xipPartIndex = 0;
- sendRequestPart();
-
- }
-
- function sendRequestPart(){
- if(xipPartIndex < xipRequestParts.length){
- //Get the message part.
- var partData = xipRequestParts[xipPartIndex];
-
- //Get the command.
- var cmd = "part";
- if(xipPartIndex + 1 == xipRequestParts.length){
- cmd = "end";
- }else if (xipPartIndex == 0){
- cmd = "start";
- }
-
- setServerUrl(cmd, partData);
- xipPartIndex++;
- }
- }
-
- function setServerUrl(cmd, message){
- var serverUrl = makeServerUrl(cmd, message);
-
- //Safari won't let us replace across domains.
- if(navigator.userAgent.indexOf("Safari") == -1){
- xipServerWindow.location.replace(serverUrl);
- }else{
- xipServerWindow.location = serverUrl;
- }
- }
-
- function makeServerUrl(cmd, message){
- var serverUrl = xipServerUrl + "#" + (xipIdCounter++) + ":" + cmd;
- if(message){
- serverUrl += ":" + message;
- }
- return serverUrl;
- }
-
function unpackMessage(encodedMessage){
var parts = encodedMessage.split(":");
var command = parts[1];
encodedMessage = parts[2] || "";
var config = null;
if(command == "init"){
var configParts = encodedMessage.split("&");
config = {};
for(var i = 0; i < configParts.length; i++){
var nameValue = configParts[i].split("=");
config[decodeURIComponent(nameValue[0])] = decodeURIComponent(nameValue[1]);
}
}
return {command: command, message: encodedMessage, config: config};
}
- function onClientLoad(){
- //Decode the init params
- var config = unpackMessage(window.location.href.split("#")[1]).config;
-
- xipStateId = config.id;
+ //************** Init **************************
+ xipCurrentHash = "";
+
+ //Decode the init params
+ var fragId = window.location.href.split("#")[1];
+ var config = unpackMessage(fragId).config;
- //Remove the query param for the IE7 recursive case.
- xipServerUrl = fixServerUrl(config.server).replace(/(\?|\&)dojo\.fr\=1/, "");
-
- //Make sure we don't have a javascript: url, just for good measure.
- if(xipServerUrl.split(":")[0].match(/javascript/i)){
- throw "Invalid server URL";
- }
+ xipStateId = config.id;
+ xipMasterFrame = parent.parent;
- xipUseFrameRecursion = config["fr"];
-
- if(xipUseFrameRecursion == "endpoint"){
- xipMasterFrame = parent.parent;
- }else{
- xipMasterFrame = parent;
+ //Set up an HTML5 messaging publisher if postMessage exists.
+ //As of this writing, this is only useful to get Opera 9.25+ to work.
+ if(typeof document.postMessage != "undefined"){
+ callMaster = function(stateId, message){
+ xipMasterFrame.document.postMessage(stateId + "#" + message);
}
-
- //Start counter to inspect hash value.
- setInterval(pollHash, 10);
+ }else{
+ var parts = config.callback.split(".");
+ xipCallbackObject = xipMasterFrame;
+ for(var i = 0; i < parts.length - 1; i++){
+ xipCallbackObject = xipCallbackObject[parts[i]];
+ }
+ xipCallback = parts[parts.length - 1];
- var clientUrl = window.location.href.split("#")[0];
- var iframeNode = document.getElementsByTagName("iframe")[0];
- iframeNode.id = xipStateId + "_frame";
- iframeNode.src = makeServerUrl("init", 'id=' + xipStateId + '&client='
- + encodeURIComponent(clientUrl) + '&fr=' + xipUseFrameRecursion);
+ callMaster = function(stateId, message){
+ xipCallbackObject[xipCallback](stateId + "#" + message);
+ }
}
- if(typeof(window.addEventListener) == "undefined"){
- window.attachEvent("onload", onClientLoad);
- }else{
- window.addEventListener('load', onClientLoad, false);
- }
+ //Call the master frame to let it know it is OK to start sending.
+ callMaster(xipStateId, "0:loaded");
+ //Start counter to inspect hash value.
+ setInterval(pollHash, 10);
+
// -->
<!-- </script> -->
</head>
<body>
<h4>The Dojo Toolkit -- xip_client.html</h4>
<p>This file is used for Dojo's XMLHttpRequest Iframe Proxy. This is the "client" file used
internally by dojox.io.proxy.xip.</p>
-
- <iframe src="javascript:false"></iframe>
</body>
</html>
diff --git a/js/dojo/dojox/io/proxy/xip_server.html b/js/dojo/dojox/io/proxy/xip_server.html
--- a/js/dojo/dojox/io/proxy/xip_server.html
+++ b/js/dojo/dojox/io/proxy/xip_server.html
@@ -1,386 +1,382 @@
<!--
/*
- Copyright (c) 2004-2006, The Dojo Foundation
+ Copyright (c) 2004-2008, The Dojo Foundation
All Rights Reserved.
Licensed under the Academic Free License version 2.1 or above OR the
modified BSD license. For more information on Dojo licensing, see:
http://dojotoolkit.org/community/licensing.shtml
*/
Pieces taken from Dojo source to make this file stand-alone
-->
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<script type="text/javascript" src="isAllowed.js"></script>
<!--
BY DEFAULT THIS FILE DOES NOT WORK SO THAT YOU DON'T ACCIDENTALLY EXPOSE
ALL OF YOUR XHR-ENABLED SERVICES ON YOUR SITE.
In order for this file to work, you need to uncomment the start and end script tags,
and you should define a function with the following signature:
function isAllowedRequest(request){
return false;
}
Return true out of the function if you want to allow the cross-domain request.
DON'T DEFINE THIS FUNCTION IN THIS FILE! Define it in a separate file called isAllowed.js
and include it in this page with a script tag that has a src attribute pointing to the file.
See the very first script tag in this file for an example. You do not have to place the
script file in the same directory as this file, just update the path above if you move it
somewhere else.
Customize the isAllowedRequest function to restrict what types of requests are allowed
for this server. The request object has the following properties:
- requestHeaders: an object with the request headers that are to be added to
the XHR request.
- method: the HTTP method (GET, POST, etc...)
- uri: The URI for the request.
- data: The URL-encoded data for the request. For a GET request, this would
be the querystring parameters. For a POST request, it wll be the
body data.
See xip_client.html for more info on the xip fragment identifier protocol.
-->
<!-- Security protection: uncomment the script tag to enable. -->
<!-- script type="text/javascript" -->
// <!--
//Core XHR handling taken from Dojo IO code.
dojo = {};
dojo.hostenv = {};
// These are in order of decreasing likelihood; this will change in time.
dojo.hostenv._XMLHTTP_PROGIDS = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'];
dojo.hostenv.getXmlhttpObject = function(){
var http = null;
var last_e = null;
try{ http = new XMLHttpRequest(); }catch(e){}
if(!http){
for(var i=0; i<3; ++i){
var progid = dojo.hostenv._XMLHTTP_PROGIDS[i];
try{
http = new ActiveXObject(progid);
}catch(e){
last_e = e;
}
if(http){
dojo.hostenv._XMLHTTP_PROGIDS = [progid]; // so faster next time
break;
}
}
/*if(http && !http.toString) {
http.toString = function() { "[object XMLHttpRequest]"; }
}*/
}
if(!http){
throw "xip_server.html: XMLHTTP not available: " + last_e;
}
return http;
}
dojo.setHeaders = function(http, headers){
if(headers) {
for(var header in headers) {
var headerValue = headers[header];
http.setRequestHeader(header, headerValue);
}
}
}
//MSIE has the lowest limit for URLs with fragment identifiers,
//at around 4K. Choosing a slightly smaller number for good measure.
xipUrlLimit = 4000;
xipIdCounter = 1;
function xipServerInit(){
xipStateId = "";
xipCurrentHash = "";
xipRequestMessage = "";
xipResponseParts = [];
xipPartIndex = 0;
}
function pollHash(){
//Can't use location.hash because at least Firefox does a decodeURIComponent on it.
var urlParts = window.location.href.split("#");
if(urlParts.length == 2){
var newHash = urlParts[1];
if(newHash != xipCurrentHash){
try{
messageReceived(newHash);
}catch(e){
//Make sure to not keep processing the error hash value.
xipCurrentHash = newHash;
throw e;
}
xipCurrentHash = newHash;
}
}
}
function messageReceived(encodedData){
var msg = unpackMessage(encodedData);
switch(msg.command){
case "ok":
sendResponsePart();
break;
case "start":
xipRequestMessage = "";
xipRequestMessage += msg.message;
setClientUrl("ok");
break;
case "part":
xipRequestMessage += msg.message;
setClientUrl("ok");
break;
case "end":
setClientUrl("ok");
xipRequestMessage += msg.message;
sendXhr();
break;
}
}
function sendResponse(encodedData){
//Break the message into parts, if necessary.
xipResponseParts = [];
var resData = encodedData;
var urlLength = xipClientUrl.length;
var partLength = xipUrlLimit - urlLength;
var resIndex = 0;
while((resData.length - resIndex) + urlLength > xipUrlLimit){
var part = resData.substring(resIndex, resIndex + partLength);
//Safari will do some extra hex escaping unless we keep the original hex
//escaping complete.
var percentIndex = part.lastIndexOf("%");
if(percentIndex == part.length - 1 || percentIndex == part.length - 2){
part = part.substring(0, percentIndex);
}
xipResponseParts.push(part);
resIndex += part.length;
}
xipResponseParts.push(resData.substring(resIndex, resData.length));
xipPartIndex = 0;
sendResponsePart();
}
function sendResponsePart(){
if(xipPartIndex < xipResponseParts.length){
//Get the message part.
var partData = xipResponseParts[xipPartIndex];
//Get the command.
var cmd = "part";
if(xipPartIndex + 1 == xipResponseParts.length){
cmd = "end";
}else if (xipPartIndex == 0){
cmd = "start";
}
setClientUrl(cmd, partData);
xipPartIndex++;
}else{
xipServerInit();
}
}
function setClientUrl(cmd, message){
var clientUrl = makeClientUrl(cmd, message);
//Safari won't let us replace across domains.
if(navigator.userAgent.indexOf("Safari") == -1){
- parent.location.replace(clientUrl);
+ xipClientWindow.location.replace(clientUrl);
}else{
- parent.location = clientUrl;
+ xipClientWindow.location = clientUrl;
}
}
function makeClientUrl(cmd, message){
var clientUrl = xipClientUrl + "#" + (xipIdCounter++) + ":" + cmd;
if(message){
clientUrl += ":" + message;
}
return clientUrl
}
function xhrDone(xhr){
/* Need to pull off and return the following data:
- responseHeaders
- status
- statusText
- responseText
*/
var response = {};
if(typeof(xhr.getAllResponseHeaders) != "undefined"){
var allHeaders = xhr.getAllResponseHeaders();
if(allHeaders){
response.responseHeaders = allHeaders;
}
}
if(xhr.status == 0 || xhr.status){
response.status = xhr.status;
}
if(xhr.statusText){
response.statusText = xhr.statusText;
}
if(xhr.responseText){
response.responseText = xhr.responseText;
}
//Build a string of the response object.
var result = "";
var isFirst = true;
for (var param in response){
if(isFirst){
isFirst = false;
}else{
result += "&";
}
result += param + "=" + encodeURIComponent(response[param]);
}
sendResponse(result);
}
function sendXhr(){
var request = {};
var nvPairs = xipRequestMessage.split("&");
var i = 0;
var nameValue = null;
for(i = 0; i < nvPairs.length; i++){
if(nvPairs[i]){
var nameValue = nvPairs[i].split("=");
request[decodeURIComponent(nameValue[0])] = decodeURIComponent(nameValue[1]);
}
}
//Split up the request headers, if any.
var headers = {};
if(request.requestHeaders){
nvPairs = request.requestHeaders.split("\r\n");
for(i = 0; i < nvPairs.length; i++){
if(nvPairs[i]){
nameValue = nvPairs[i].split(": ");
headers[decodeURIComponent(nameValue[0])] = decodeURIComponent(nameValue[1]);
}
}
request.requestHeaders = headers;
}
if(isAllowedRequest(request)){
//The request is allowed, so set up the XHR object.
var xhr = dojo.hostenv.getXmlhttpObject();
//Start timer to look for readyState.
var xhrIntervalId = setInterval(function(){
if(xhr.readyState == 4){
clearInterval(xhrIntervalId);
xhrDone(xhr);
}
}, 10);
//Actually start up the XHR request.
xhr.open(request.method, request.uri, true);
dojo.setHeaders(xhr, request.requestHeaders);
var content = "";
if(request.data){
content = request.data;
}
try{
xhr.send(content);
}catch(e){
if(typeof xhr.abort == "function"){
xhr.abort();
xhrDone({status: 404, statusText: "xip_server.html error: " + e});
}
}
}
}
function unpackMessage(encodedMessage){
var parts = encodedMessage.split(":");
var command = parts[1];
encodedMessage = parts[2] || "";
var config = null;
if(command == "init"){
var configParts = encodedMessage.split("&");
config = {};
for(var i = 0; i < configParts.length; i++){
var nameValue = configParts[i].split("=");
config[decodeURIComponent(nameValue[0])] = decodeURIComponent(nameValue[1]);
}
}
return {command: command, message: encodedMessage, config: config};
}
function onServerLoad(){
xipServerInit();
//Decode the init params
var config = unpackMessage(window.location.href.split("#")[1]).config;
xipStateId = config.id;
xipClientUrl = config.client;
//Make sure we don't have a javascript: url, just for good measure.
if(xipClientUrl.split(":")[0].match(/javascript/i)){
throw "Invalid client URL";
}
if(!xipStateId.match(/^XhrIframeProxy[0-9]+$/)){
throw "Invalid state ID";
}
-
- xipUseFrameRecursion = config["fr"];
-
+
setInterval(pollHash, 10);
- if(xipUseFrameRecursion == "true"){
- var serverUrl = window.location.href.split("#")[0];
- document.getElementById("iframeHolder").innerHTML = '<iframe name="'
- + xipStateId + '_clientEndPoint'
- + '" src="javascript:false">'
- + '</iframe>';
- var iframeNode = document.getElementsByTagName("iframe")[0];
- iframeNode.src = makeClientUrl("init", 'id=' + xipStateId + '&server='
- + encodeURIComponent(serverUrl) + '&fr=endpoint');
- }else{
- setClientUrl("loaded");
+ var serverUrl = window.location.href.split("#")[0];
+ document.getElementById("iframeHolder").innerHTML = '<iframe name="'
+ + xipStateId + '_clientEndPoint'
+ + '" src="javascript:false">'
+ + '</iframe>';
+ xipClientWindow = document.getElementsByTagName("iframe")[0];
+ xipClientWindow.src = makeClientUrl("init", 'id=' + xipStateId + "&callback=" + encodeURIComponent(config.callback));
+ if(xipClientWindow.contentWindow){
+ xipClientWindow = xipClientWindow.contentWindow;
}
}
if(typeof(window.addEventListener) == "undefined"){
window.attachEvent("onload", onServerLoad);
}else{
window.addEventListener('load', onServerLoad, false);
}
// -->
<!-- </script> -->
</head>
<body>
<h4>The Dojo Toolkit -- xip_server.html</h4>
<p>This file is used for Dojo's XMLHttpRequest Iframe Proxy. This is the the file
that should go on the server that will actually be doing the XHR request.</p>
<div id="iframeHolder"></div>
</body>
</html>
diff --git a/js/dojo/dojox/io/xhrMultiPart.js b/js/dojo/dojox/io/xhrMultiPart.js
--- a/js/dojo/dojox/io/xhrMultiPart.js
+++ b/js/dojo/dojox/io/xhrMultiPart.js
@@ -1,81 +1,70 @@
-if(!dojo._hasResource["dojox.io.xhrMultiPart"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.io.xhrMultiPart"] = true;
-dojo.provide("dojox.io.xhrMultiPart");
-
-dojo.require("dojo._base.xhr");
-dojo.require("dojox.uuid.generateRandomUuid");
-
-(function(){
- function _createPart(args, boundary){
- if(!args["name"] && !args["content"]){
- throw new Error("Each part of a multi-part request requires 'name' and 'content'.");
- }
-
- var tmp = [];
- tmp.push("--" + boundary,
- "Content-Disposition: form-data; name=\"" + args.name + "\"" +
- (args["filename"] ? "; filename=\"" + args.filename + "\"" : ""));
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- if(args["contentType"]){
- var ct = "Content-Type: " + args.contentType;
- if(args["charset"]){
- ct += "; Charset=" + args.charset;
- }
- tmp.push(ct);
- }
-
- if(args["contentTransferEncoding"]){
- tmp.push("Content-Transfer-Encoding: " + args.contentTransferEncoding);
- }
-
- tmp.push("", args.content);
-
- return tmp;
- }
-
- function _needIframe(node){
- return (!!(dojo.query("input[type=file]", node).length));
- }
- function _partsFromNode(node, boundary){
- // TODO: write this function!
- var tmp = [];
- return tmp;
- }
-
- dojox.io.xhrMultiPart = function(args){
- if(!args["file"] && !args["formNode"]){
- throw new Error("file or formNode must be provided to dojox.io.xhrMultiPart's arguments");
- }
-
- // unique guid as a boundary value for multipart posts
- var boundary = dojox.uuid.generateRandomUuid();
-
- var tmp = [];
- var out = "";
-
- if(args["file"]){
- var d = (dojo.isArray(args.file) ? args.file : [args.file]);
-
- for(var i=0; i < d.length; i++){
- tmp = tmp.concat(_createPart(d[i], boundary));
- }
- }
-
- if(args["formNode"]){
- tmp = tmp.concat(_partsFromNode(args["formNode"], boundary));
- }
-
- if(tmp.length){
- tmp.push("--"+boundary+"--", "");
- out = tmp.join("\r\n");
- }
-
- return dojo.rawXhrPost(dojo.mixin(args, {
- contentType: "multipart/form-data; boundary=" + boundary,
- postData: out
- }));
- }
+if(!dojo._hasResource["dojox.io.xhrMultiPart"]){
+dojo._hasResource["dojox.io.xhrMultiPart"]=true;
+dojo.provide("dojox.io.xhrMultiPart");
+dojo.require("dojox.uuid.generateRandomUuid");
+(function(){
+function _1(_2,_3){
+if(!_2["name"]&&!_2["content"]){
+throw new Error("Each part of a multi-part request requires 'name' and 'content'.");
+}
+var _4=[];
+_4.push("--"+_3,"Content-Disposition: form-data; name=\""+_2.name+"\""+(_2["filename"]?"; filename=\""+_2.filename+"\"":""));
+if(_2["contentType"]){
+var ct="Content-Type: "+_2.contentType;
+if(_2["charset"]){
+ct+="; Charset="+_2.charset;
+}
+_4.push(ct);
+}
+if(_2["contentTransferEncoding"]){
+_4.push("Content-Transfer-Encoding: "+_2.contentTransferEncoding);
+}
+_4.push("",_2.content);
+return _4;
+};
+function _5(_6,_7){
+var o=dojo.formToObject(_6),_8=[];
+for(var p in o){
+if(dojo.isArray(o[p])){
+dojo.forEach(o[p],function(_9){
+_8=_8.concat(_1({name:p,content:_9},_7));
+});
+}else{
+_8=_8.concat(_1({name:p,content:o[p]},_7));
+}
+}
+return _8;
+};
+dojox.io.xhrMultiPart=function(_a){
+if(!_a["file"]&&!_a["content"]&&!_a["form"]){
+throw new Error("content, file or form must be provided to dojox.io.xhrMultiPart's arguments");
+}
+var _b=dojox.uuid.generateRandomUuid(),_c=[],_d="";
+if(_a["file"]||_a["content"]){
+var v=_a["file"]||_a["content"];
+dojo.forEach((dojo.isArray(v)?v:[v]),function(_e){
+_c=_c.concat(_1(_e,_b));
+});
+}else{
+if(_a["form"]){
+if(dojo.query("input[type=file]",_a["form"]).length){
+throw new Error("dojox.io.xhrMultiPart cannot post files that are values of an INPUT TYPE=FILE. Use dojo.io.iframe.send() instead.");
+}
+_c=_5(_a["form"],_b);
+}
+}
+if(_c.length){
+_c.push("--"+_b+"--","");
+_d=_c.join("\r\n");
+}
+return dojo.rawXhrPost(dojo.mixin(_a,{contentType:"multipart/form-data; boundary="+_b,postData:_d}));
+};
})();
-
}
diff --git a/js/dojo/dojox/lang/README b/js/dojo/dojox/lang/README
--- a/js/dojo/dojox/lang/README
+++ b/js/dojo/dojox/lang/README
@@ -1,37 +1,60 @@
-------------------------------------------------------------------------------
dojox.lang
-------------------------------------------------------------------------------
-Version 0.990
+Version 0.991
Release date: 07/30/2007
-------------------------------------------------------------------------------
Project state:
-[beta]
+beta
-------------------------------------------------------------------------------
Credits
Eugene Lazutkin (eugene.lazutkin@gmail.com)
+ Kris Zyp (kris@sitepen.com)
-------------------------------------------------------------------------------
Project description
-Implementation of common functional operations, and provisions.
-Later we can add other JS language-related helpers.
+Implementation of common functional operations, and provisions, aspect-oriented
+helpers. Later we can add other JS language-related helpers.
+
+dojox.lang.observable - Provides construction of objects that such that
+property access and modification can be controlled, i.e. provides a form of
+getters/setters.
+
+dojox.lang.typed - Provides type checking for JavaScript classes, enforcing
+types on properties and method parameters using JSON Schema definitions.
+
+dojox.lang.docs - Provides schemas on Dojo's classes from the API
+documentation. This can used for runtime access to class metadata information
+such as descriptions and type information. This can be used in conjunction with
+dojox.lang.typed to enforce typing on Dojo's classes using the API information.
+
+
-------------------------------------------------------------------------------
Dependencies:
None.
-------------------------------------------------------------------------------
Documentation
+For now:
+
+dojox.lang.functional:
+http://lazutkin.com/blog/2008/jan/12/functional-fun-javascript-dojo/
+
-------------------------------------------------------------------------------
Installation instructions
Grab the following from the Dojo SVN Repository:
-http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/lang/*
+http://svn.dojotoolkit.org/src/dojo/dojox/trunk/lang/*
Install into the following directory structure:
/dojox/lang/
...which should be at the same level as your Dojo checkout.
-------------------------------------------------------------------------------
Additional Notes
See tests and the source for more details.
+
+LICENSE in this directory contains the MIT license by Oliver Steele for
+dojox.lang.functional.lambda, which was derived from his original implementation.
diff --git a/js/dojo/dojox/lang/functional.js b/js/dojo/dojox/lang/functional.js
--- a/js/dojo/dojox/lang/functional.js
+++ b/js/dojo/dojox/lang/functional.js
@@ -1,462 +1,14 @@
-if(!dojo._hasResource["dojox.lang.functional"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.lang.functional"] = true;
-dojo.provide("dojox.lang.functional");
-
-// This module adds high-level functions and related constructs:
-// - list comprehensions similar to JavaScript 1.7
-// - anonymous functions built from the string
-// - zip combiners
-// - "reduce" family of functions
-// - currying and partial functions
-// - argument pre-processing: mixer and flip
-// - miscellaneous useful functions
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-// Acknoledgements:
-// - parts of this module (most notably lambda, constFun, invoke, pluck, and partial)
-// are based on work by Oliver Steele (http://osteele.com/sources/javascript/functional/functional.js)
-// which was published under MIT License
-// - Simple "maybe" monad was donated by Alex Russell.
-
-// Notes:
-// - Dojo provides following high-level functions in dojo/_base/array.js:
-// forEach, map, filter, every, some
-// - These functions implemented with optional lambda expression as a parameter.
-// - missing high-level functions are provided with the compatible API:
-// foldl, foldl1, scanl, scanl1, foldr, foldr1, scanr, scanr1,
-// reduce, reduceRight
-// - lambda() and listcomp() produce functions, which after the compilation step are
-// as fast as regular JS functions (at least theoretically).
-(function(){
- var d = dojo, df = dojox.lang.functional, g_re = /\bfor\b|\bif\b/gm, empty = {};
-
- // split() is augmented on IE6 to ensure the uniform behavior
- var split = "ab".split(/a*/).length > 1 ? String.prototype.split :
- function(sep){
- var r = this.split.call(this, sep),
- m = sep.exec(this);
- if(m && m.index == 0){ r.unshift(""); }
- return r;
- };
- var lambda = function(/*String*/ s){
- var args = [], sects = split.call(s, /\s*->\s*/m);
- if(sects.length > 1){
- while(sects.length){
- s = sects.pop();
- args = sects.pop().split(/\s*,\s*|\s+/m);
- if(sects.length){ sects.push("(function(" + args + "){return (" + s + ")})"); }
- }
- } else if(s.match(/\b_\b/)) {
- args = ["_"];
- } else {
- var l = s.match(/^\s*(?:[+*\/%&|\^\.=<>]|!=)/m),
- r = s.match(/[+\-*\/%&|\^\.=<>!]\s*$/m);
- if(l || r){
- if(l){
- args.push("$1");
- s = "$1" + s;
- }
- if(r){
- args.push("$2");
- s = s + "$2";
- }
- } else {
- var vars = s.
- replace(/(?:\b[A-Z]|\.[a-zA-Z_$])[a-zA-Z_$\d]*|[a-zA-Z_$][a-zA-Z_$\d]*:|this|true|false|null|undefined|typeof|instanceof|in|delete|new|void|arguments|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|isFinite|isNaN|parseFloat|parseInt|unescape|dojo|dijit|dojox|'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"/g, "").
- match(/([a-z_$][a-z_$\d]*)/gi) || [];
- var t = {};
- d.forEach(vars, function(v){
- if(!(v in t)){
- args.push(v);
- t[v] = 1;
- }
- });
- }
- }
- return {args: args, body: "return (" + s + ");"}; // Object
- };
-
- var listcomp = function(/*String*/ s){
- var frag = s.split(g_re), act = s.match(g_re),
- head = ["var r = [];"], tail = [];
- for(var i = 0; i < act.length;){
- var a = act[i], f = frag[++i];
- if(a == "for" && !/^\s*\(\s*(;|var)/.test(f)){
- f = f.replace(/^\s*\(/, "(var ");
- }
- head.push(a, f, "{");
- tail.push("}");
- }
- return head.join("") + "r.push(" + frag[0] + ");" + tail.join("") + "return r;"; // String
- };
-
- var currying = function(/*Object*/ info){
- return function(){ // Function
- if(arguments.length + info.args.length < info.arity){
- return currying({func: info.func, arity: info.arity,
- args: Array.prototype.concat.apply(info.args, arguments)});
- }
- return info.func.apply(this, Array.prototype.concat.apply(info.args, arguments));
- };
- };
-
- var identity = function(x){ return x; };
- var compose = function(/*Array*/ a){
- return a.length ? function(){
- var i = a.length - 1, x = df.lambda(a[i]).apply(this, arguments);
- for(--i; i >= 0; --i){ x = df.lambda(a[i]).call(this, x); }
- return x;
- } : identity;
- };
-
- d.mixin(df, {
- // lambda
- buildLambda: function(/*String*/ s){
- // summary: builds a function from a snippet, returns a string,
- // which represents the function.
- // description: This method returns a textual representation of a function
- // built from the snippet. It is meant to be evaled in the proper context,
- // so local variables can be pulled from the environment.
- s = lambda(s);
- return "function(" + s.args.join(",") + "){" + s.body + "}"; // String
- },
- lambda: function(/*Function|String|Array*/ s){
- // summary: builds a function from a snippet, or array (composing), returns
- // a function object; functions are passed through unmodified.
- // description: This method is used to normalize a functional representation
- // (a text snippet, an array, or a function) to a function object.
- if(typeof s == "function"){ return s; }
- if(s instanceof Array){ return compose(s); }
- s = lambda(s);
- return new Function(s.args, s.body); // Function
- },
- // sequence generators
- repeat: function(/*Number*/ n, /*Function|String|Array*/ f, /*Object*/ z, /*Object?*/ o){
- // summary: builds an array by repeatedly applying a unary function N times
- // with a seed value Z.
- o = o || d.global; f = df.lambda(f);
- var t = new Array(n);
- t[0] = z;
- for(var i = 1; i < n; t[i] = z = f.call(o, z), ++i);
- return t; // Array
- },
- until: function(/*Function|String|Array*/ pr, /*Function|String|Array*/ f, /*Object*/ z, /*Object?*/ o){
- // summary: builds an array by repeatedly applying a unary function with
- // a seed value Z until the predicate is satisfied.
- o = o || d.global; f = df.lambda(f); pr = df.lambda(pr);
- var t = [];
- for(; !pr.call(o, z); t.push(z), z = f.call(o, z));
- return t; // Array
- },
- buildListcomp: function(/*String*/ s){
- // summary: builds a function from a text snippet, which represents a valid
- // JS 1.7 list comprehension, returns a string, which represents the function.
- // description: This method returns a textual representation of a function
- // built from the list comprehension text snippet (conformant to JS 1.7).
- // It is meant to be evaled in the proper context, so local variable can be
- // pulled from the environment.
- return "function(){" + listcomp(s) + "}"; // String
- },
- compileListcomp: function(/*String*/ s){
- // summary: builds a function from a text snippet, which represents a valid
- // JS 1.7 list comprehension, returns a function object.
- // description: This method returns a function built from the list
- // comprehension text snippet (conformant to JS 1.7). It is meant to be
- // reused several times.
- return new Function([], listcomp(s)); // Function
- },
- listcomp: function(/*String*/ s){
- // summary: executes the list comprehension building an array.
- return (new Function([], listcomp(s)))(); // Array
- },
- // classic reduce-class functions
- foldl: function(/*Array*/ a, /*Function*/ f, /*Object*/ z, /*Object?*/ o){
- // summary: repeatedly applies a binary function to an array from left
- // to right using a seed value as a starting point; returns the final
- // value.
- a = typeof a == "string" ? a.split("") : a; o = o || d.global; f = df.lambda(f);
- for(var i = 0; i < a.length; z = f.call(o, z, a[i], i, a), ++i);
- return z; // Object
- },
- foldl1: function(/*Array*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
- // summary: repeatedly applies a binary function to an array from left
- // to right; returns the final value.
- a = typeof a == "string" ? a.split("") : a; o = o || d.global; f = df.lambda(f);
- var z = a[0];
- for(var i = 1; i < a.length; z = f.call(o, z, a[i], i, a), ++i);
- return z; // Object
- },
- scanl: function(/*Array*/ a, /*Function|String|Array*/ f, /*Object*/ z, /*Object?*/ o){
- // summary: repeatedly applies a binary function to an array from left
- // to right using a seed value as a starting point; returns an array
- // of values produced by foldl() at that point.
- a = typeof a == "string" ? a.split("") : a; o = o || d.global; f = df.lambda(f);
- var n = a.length, t = new Array(n + 1);
- t[0] = z;
- for(var i = 0; i < n; z = f.call(o, z, a[i], i, a), t[++i] = z);
- return t; // Array
- },
- scanl1: function(/*Array*/ a, /*Function|String|Array*/ f, /*Object*/ z, /*Object?*/ o){
- // summary: repeatedly applies a binary function to an array from left
- // to right; returns an array of values produced by foldl1() at that
- // point.
- a = typeof a == "string" ? a.split("") : a; o = o || d.global; f = df.lambda(f);
- var n = a.length, t = new Array(n), z = a[0];
- t[0] = z;
- for(var i = 1; i < n; z = f.call(o, z, a[i], i, a), t[i++] = z);
- return t; // Array
- },
- foldr: function(/*Array*/ a, /*Function|String|Array*/ f, /*Object*/ z, /*Object?*/ o){
- // summary: repeatedly applies a binary function to an array from right
- // to left using a seed value as a starting point; returns the final
- // value.
- a = typeof a == "string" ? a.split("") : a; o = o || d.global; f = df.lambda(f);
- for(var i = a.length; i > 0; --i, z = f.call(o, z, a[i], i, a));
- return z; // Object
- },
- foldr1: function(/*Array*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
- // summary: repeatedly applies a binary function to an array from right
- // to left; returns the final value.
- a = typeof a == "string" ? a.split("") : a; o = o || d.global; f = df.lambda(f);
- var n = a.length, z = a[n - 1];
- for(var i = n - 1; i > 0; --i, z = f.call(o, z, a[i], i, a));
- return z; // Object
- },
- scanr: function(/*Array*/ a, /*Function|String|Array*/ f, /*Object*/ z, /*Object?*/ o){
- // summary: repeatedly applies a binary function to an array from right
- // to left using a seed value as a starting point; returns an array
- // of values produced by foldr() at that point.
- a = typeof a == "string" ? a.split("") : a; o = o || d.global; f = df.lambda(f);
- var n = a.length, t = new Array(n + 1);
- t[n] = z;
- for(var i = n; i > 0; --i, z = f.call(o, z, a[i], i, a), t[i] = z);
- return t; // Array
- },
- scanr1: function(/*Array*/ a, /*Function|String|Array*/ f, /*Object*/ z, /*Object?*/ o){
- // summary: repeatedly applies a binary function to an array from right
- // to left; returns an array of values produced by foldr1() at that
- // point.
- a = typeof a == "string" ? a.split("") : a; o = o || d.global; f = df.lambda(f);
- var n = a.length, t = new Array(n), z = a[n - 1];
- t[n - 1] = z;
- for(var i = n - 1; i > 0; --i, z = f.call(o, z, a[i], i, a), t[i] = z);
- return t; // Array
- },
- // JS 1.6 standard array functions, which can take a lambda as a parameter.
- // Consider using dojo._base.array functions, if you don't need the lambda support.
- filter: function(/*Array*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
- // summary: creates a new array with all elements that pass the test
- // implemented by the provided function.
- a = typeof a == "string" ? a.split("") : a; o = o || d.global; f = df.lambda(f);
- var n = a.length, t = [], v;
- for(var i = 0; i < n; ++i){
- v = a[i];
- if(f.call(o, v, i, a)){ t.push(v); }
- }
- return t; // Array
- },
- forEach: function(/*Array*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
- // summary: executes a provided function once per array element.
- a = typeof a == "string" ? a.split("") : a; o = o || d.global; f = df.lambda(f);
- var n = a.length;
- for(var i = 0; i < n; f.call(o, a[i], i, a), ++i);
- },
- map: function(/*Array*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
- // summary: creates a new array with the results of calling
- // a provided function on every element in this array.
- a = typeof a == "string" ? a.split("") : a; o = o || d.global; f = df.lambda(f);
- var n = a.length, t = new Array(n);
- for(var i = 0; i < n; t[i] = f.call(o, a[i], i, a), ++i);
- return t; // Array
- },
- every: function(/*Array*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
- // summary: tests whether all elements in the array pass the test
- // implemented by the provided function.
- a = typeof a == "string" ? a.split("") : a; o = o || d.global; f = df.lambda(f);
- var n = a.length;
- for(var i = 0; i < n; ++i){
- if(!f.call(o, a[i], i, a)){
- return false; // Boolean
- }
- }
- return true; // Boolean
- },
- some: function(/*Array*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
- // summary: tests whether some element in the array passes the test
- // implemented by the provided function.
- a = typeof a == "string" ? a.split("") : a; o = o || d.global; f = df.lambda(f);
- var n = a.length;
- for(var i = 0; i < n; ++i){
- if(f.call(o, a[i], i, a)){
- return true; // Boolean
- }
- }
- return false; // Boolean
- },
- // JS 1.8 standard array functions, which can take a lambda as a parameter.
- reduce: function(/*Array*/ a, /*Function*/ f, /*Object?*/ z){
- // summary: apply a function simultaneously against two values of the array
- // (from left-to-right) as to reduce it to a single value.
- return arguments.length < 3 ? df.foldl1(a, f) : df.foldl(a, f, z); // Object
- },
- reduceRight: function(/*Array*/ a, /*Function*/ f, /*Object?*/ z){
- // summary: apply a function simultaneously against two values of the array
- // (from right-to-left) as to reduce it to a single value.
- return arguments.length < 3 ? df.foldr1(a, f) : df.foldr(a, f, z); // Object
- },
- // currying and partial functions
- curry: function(/*Function|String|Array*/ f, /*Number?*/ arity){
- // summary: curries a function until the arity is satisfied, at
- // which point it returns the calculated value.
- f = df.lambda(f);
- arity = typeof arity == "number" ? arity : f.length;
- return currying({func: f, arity: arity, args: []}); // Function
- },
- arg: {}, // marker for missing arguments
- partial: function(/*Function|String|Array*/ f){
- // summary: creates a function where some arguments are bound, and
- // some arguments (marked as dojox.lang.functional.arg) are will be
- // accepted by the final function in the order they are encountered.
- // description: This method is used to produce partially bound
- // functions. If you want to change the order of arguments, use
- // dojox.lang.functional.mixer() or dojox.lang.functional.flip().
- var a = arguments, args = new Array(a.length - 1), p = [];
- f = df.lambda(f);
- for(var i = 1; i < a.length; ++i){
- var t = a[i];
- args[i - 1] = t;
- if(t == df.arg){
- p.push(i - 1);
- }
- }
- return function(){ // Function
- var t = Array.prototype.slice.call(args, 0); // clone the array
- for(var i = 0; i < p.length; ++i){
- t[p[i]] = arguments[i];
- }
- return f.apply(this, t);
- };
- },
- // argument pre-processing
- mixer: function(/*Function|String|Array*/ f, /*Array*/ mix){
- // summary: changes the order of arguments using an array of
- // numbers mix --- i-th argument comes from mix[i]-th place
- // of supplied arguments.
- f = df.lambda(f);
- return function(){ // Function
- var t = new Array(mix.length);
- for(var i = 0; i < mix.length; ++i){
- t[i] = arguments[mix[i]];
- }
- return f.apply(this, t);
- };
- },
- flip: function(/*Function|String|Array*/ f){
- // summary: changes the order of arguments by reversing their
- // order.
- f = df.lambda(f);
- return function(){ // Function
- // reverse arguments
- var a = arguments, l = a.length - 1, t = new Array(l + 1), i;
- for(i = 0; i <= l; ++i){
- t[l - i] = a[i];
- }
- return f.apply(this, t);
- };
- },
- // combiners
- zip: function(){
- // summary: returns an array of arrays, where the i-th array
- // contains the i-th element from each of the argument arrays.
- // description: This is the venerable zip combiner (for example,
- // see Python documentation for general details). The returned
- // array is truncated to match the length of the shortest input
- // array.
- var n = arguments[0].length, m = arguments.length, i;
- for(i = 1; i < m; n = Math.min(n, arguments[i++].length));
- var t = new Array(n), j;
- for(i = 0; i < n; ++i){
- var p = new Array(m);
- for(j = 0; j < m; p[j] = arguments[j][i], ++j);
- t[i] = p;
- }
- return t; // Array
- },
- unzip: function(/*Array*/ a){
- // summary: similar to dojox.lang.functional.zip(), but takes
- // a single array of arrays as the input.
- // description: This function is similar to dojox.lang.functional.zip()
- // and can be used to unzip objects packed by
- // dojox.lang.functional.zip(). It is here mostly to provide
- // a short-cut for the different method signature.
- return df.zip.apply(null, a); // Array
- },
- // miscelaneous functional adapters
- constFun: function(/*Object*/ x){
- // summary: returns a function, which produces a constant value
- // regardless of supplied parameters.
- return function(){ return x; }; // Function
- },
- invoke: function(/*String*/ m){
- // summary: returns a function, which invokes a method on supplied
- // object using optional parameters.
- return function(/*Object*/ o){ // Function
- return o[m].apply(o, Array.prototype.slice.call(arguments, 1));
- };
- },
- pluck: function(/*String*/ m){
- // summary: returns a function, which returns a named object member.
- return function(/*Object*/ o){ // Function
- return o[m];
- };
- },
- // object helpers
- forIn: function(/*Object*/ obj, /*Function|String|Array*/ f, /*Object?*/ o){
- // summary: iterates over all object members skipping members, which
- // are present in the empty object (IE and/or 3rd-party libraries).
- o = o || d.global; f = df.lambda(f);
- for(var i in obj){
- if(i in empty){ continue; }
- f.call(o, obj[i], i, obj);
- }
- },
- forEachReversed: function(/*Array*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
- // summary: executes a provided function once per array element.
- a = typeof a == "string" ? a.split("") : a; o = o || d.global; f = df.lambda(f);
- for(var i = a.length - 1; i >= 0; f.call(o, a[i], i, a), --i);
- }
- });
-
- // monads
- dojo.declare("dojox.lang.functional.MaybeMonad", null, {
- constructor: function(/*Object*/ value){
- // summary: constructs a monad optionally initializing all additional members
- if(arguments.length){
- this.value = value;
- }
- },
- bind: function(/*dojox.lang.functional.Monad*/ monad, /*Function|String|Array*/ f, /*Object?*/ o){
- // summary: this is the classic bind method, which applies a function to a monad,
- // and returns a result as a monad; it is meant to be overwritten to incorporate
- // side effects
- if(!("value" in monad)){
- return new this.constructor(); // dojox.lang.functional.MaybeMonad
- }
- // => possible side-effects go here
- o = o || d.global; f = df.lambda(f);
- return f.call(o, monad.value); // dojox.lang.functional.Monad
- },
- // class-specific methods
- isNothing: function(){
- // summary: check if there is no bound value.
- return !("value" in this); // Boolean
- }
- });
- df.MaybeMonad.returnMonad = function(/*Object*/ value){
- // summary: puts a valye in the Maybe monad.
- return new df.MaybeMonad(value); // dojox.lang.functional.MaybeMonad
- };
- df.MaybeMonad.zero = new df.MaybeMonad();
-})();
-
+if(!dojo._hasResource["dojox.lang.functional"]){
+dojo._hasResource["dojox.lang.functional"]=true;
+dojo.provide("dojox.lang.functional");
+dojo.require("dojox.lang.functional.lambda");
+dojo.require("dojox.lang.functional.array");
+dojo.require("dojox.lang.functional.object");
}
diff --git a/js/dojo/dojox/lang/utils.js b/js/dojo/dojox/lang/utils.js
--- a/js/dojo/dojox/lang/utils.js
+++ b/js/dojo/dojox/lang/utils.js
@@ -1,54 +1,59 @@
-if(!dojo._hasResource["dojox.lang.utils"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.lang.utils"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.lang.utils"]){
+dojo._hasResource["dojox.lang.utils"]=true;
dojo.provide("dojox.lang.utils");
-
(function(){
- var empty = {}, du = dojox.lang.utils;
-
- dojo.mixin(dojox.lang.utils, {
- coerceType: function(target, source){
- switch(typeof target){
- case "number": return Number(eval("(" + source + ")"));
- case "string": return String(source);
- case "boolean": return Boolean(eval("(" + source + ")"));
- }
- return eval("(" + source + ")");
- },
-
- updateWithObject: function(target, source, conv){
- // summary: updates an existing object in place with properties from an "source" object.
- // target: Object: the "target" object to be updated
- // source: Object: the "source" object, whose properties will be used to source the existed object.
- // conv: Boolean?: force conversion to the original type
- if(!source){ return target; }
- for(var x in target){
- if(x in source && !(x in empty)){
- var t = target[x];
- if(t && typeof t == "object"){
- du.updateObject(t, source[x]);
- }else{
- target[x] = conv ? du.coerceType(t, source[x]) : dojo.clone(source[x]);
- }
- }
- }
- return target; // Object
- },
-
- updateWithPattern: function(target, source, pattern, conv){
- // summary: updates an existing object in place with properties from an "source" object.
- // target: Object: the "target" object to be updated
- // source: Object: the "source" object, whose properties will be used to source the existed object.
- // pattern: Array: an array of properties to be copied
- // conv: Boolean?: force conversion to the original type
- if(!source || !pattern){ return target; }
- for(var x in pattern){
- if(x in source && !(x in empty)){
- target[x] = conv ? du.coerceType(pattern[x], source[x]) : dojo.clone(source[x]);
- }
- }
- return target; // Object
- }
- });
+var _1={},du=dojox.lang.utils;
+var _2=function(o){
+if(dojo.isArray(o)){
+return dojo._toArray(o);
+}
+if(!dojo.isObject(o)||dojo.isFunction(o)){
+return o;
+}
+return dojo.delegate(o);
+};
+dojo.mixin(du,{coerceType:function(_3,_4){
+switch(typeof _3){
+case "number":
+return Number(eval("("+_4+")"));
+case "string":
+return String(_4);
+case "boolean":
+return Boolean(eval("("+_4+")"));
+}
+return eval("("+_4+")");
+},updateWithObject:function(_5,_6,_7){
+if(!_6){
+return _5;
+}
+for(var x in _5){
+if(x in _6&&!(x in _1)){
+var t=_5[x];
+if(t&&typeof t=="object"){
+du.updateWithObject(t,_6[x],_7);
+}else{
+_5[x]=_7?du.coerceType(t,_6[x]):_2(_6[x]);
+}
+}
+}
+return _5;
+},updateWithPattern:function(_8,_9,_a,_b){
+if(!_9||!_a){
+return _8;
+}
+for(var x in _a){
+if(x in _9&&!(x in _1)){
+_8[x]=_b?du.coerceType(_a[x],_9[x]):_2(_9[x]);
+}
+}
+return _8;
+}});
})();
-
}
diff --git a/js/dojo/dojox/math.js b/js/dojo/dojox/math.js
--- a/js/dojo/dojox/math.js
+++ b/js/dojo/dojox/math.js
@@ -1,6 +1,12 @@
-if(!dojo._hasResource["dojox.math"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.math"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.math"]){
+dojo._hasResource["dojox.math"]=true;
dojo.provide("dojox.math");
dojo.require("dojox.math._base");
-
}
diff --git a/js/dojo/dojox/math/README b/js/dojo/dojox/math/README
--- a/js/dojo/dojox/math/README
+++ b/js/dojo/dojox/math/README
@@ -1,38 +1,43 @@
--------------------------------------------------------------------------------
-DojoX Math
--------------------------------------------------------------------------------
-Version 0.9
-Release date: 10/20/2007
--------------------------------------------------------------------------------
-Project state:
-expermental
--------------------------------------------------------------------------------
-Credits
- Cal Henderson
- Dan Pupius
- Tom Trenka (ttrenka AT gmail.com)
--------------------------------------------------------------------------------
-Project description
-
-A port of the main functionality of dojo.math 0.4. Includes advanced math
-functions, abstract curve definitions, and some point calculations.
--------------------------------------------------------------------------------
-Dependencies:
-
-Depends on the Dojo Core, v1.0
--------------------------------------------------------------------------------
-Documentation
-
-See the API documentation.
--------------------------------------------------------------------------------
-Installation instructions
-
-Grab the following from the Dojo SVN Repository:
-http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/math.js
-http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/math/*
-
-Install into the following directory structure:
-/dojox/math/
-
-...which should be at the same level as your Dojo checkout.
--------------------------------------------------------------------------------
+-------------------------------------------------------------------------------
+DojoX Math
+-------------------------------------------------------------------------------
+Version 0.9
+Release date: 10/20/2007
+-------------------------------------------------------------------------------
+Project state:
+experimental
+-------------------------------------------------------------------------------
+Credits
+ Cal Henderson
+ Dan Pupius
+ Tom Trenka (ttrenka AT gmail.com)
+ Eugene Lazutkin (eugene.lazutkin AT gmail.com)
+-------------------------------------------------------------------------------
+Project description
+
+A port of the main functionality of dojo.math 0.4. Includes advanced math
+functions, abstract curve definitions, and some point calculations.
+
+Port of Tom Wu's port of java.math.BigInteger released in 2005 under the BSD
+license (CLA on file). See http://www-cs-students.stanford.edu/~tjw/jsbn/
+for details.
+-------------------------------------------------------------------------------
+Dependencies:
+
+Depends on the Dojo Core, v1.0
+-------------------------------------------------------------------------------
+Documentation
+
+See the API documentation.
+-------------------------------------------------------------------------------
+Installation instructions
+
+Grab the following from the Dojo SVN Repository:
+http://svn.dojotoolkit.org/src/dojox/trunk/math.js
+http://svn.dojotoolkit.org/src/dojox/trunk/math/*
+
+Install into the following directory structure:
+/dojox/math/
+
+...which should be at the same level as your Dojo checkout.
+-------------------------------------------------------------------------------
diff --git a/js/dojo/dojox/math/_base.js b/js/dojo/dojox/math/_base.js
--- a/js/dojo/dojox/math/_base.js
+++ b/js/dojo/dojox/math/_base.js
@@ -1,122 +1,86 @@
-if(!dojo._hasResource["dojox.math._base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.math._base"] = true;
-dojo.provide("dojox.math._base");
-
-dojo.mixin(dojox.math, {
- degreesToRadians: function(/* Number */n){
- // summary
- // Convert the passed number to radians.
- return (n*Math.PI)/180; // Number
- },
- radiansToDegrees: function(/* Number */n){
- // summary
- // Convert the passed number to degrees.
- return (n*180)/Math.PI; // Number
- },
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- factoral: function(/* Number */n){
- // summary
- // Return the factoral of n.
- if(n<1){
- return 0; // Number
- }
- var ret=1;
- for(var i=1; i<=n; i++){
- ret*=i;
- }
- return ret; // Number
- },
- permutations: function(/* Number */n, /* Number */k){
- // summary
- // TODO
- if(n==0 || k==0){
- return 1; // Number
- }
- return (this.factoral(n)/this.factoral(n-k));
- },
- combinations: function(/* Number */n, /* Number */r){
- // summary
- // TODO
- if(n==0 || r==0){
- return 1; // Number
- }
- return (this.factoral(n)/(this.factoral(n-r)*this.factoral(r))); // Number
- },
- bernstein: function(/* Number */t, /* Number */n, /* Number */ i){
- // summary
- // TODO
- return (this.combinations(n, i)*Math.pow(t, i)*Math.pow(1-t, n-i)); // Number
- },
- gaussian: function(){
- // summary
- // Return a random number based on the Gaussian algo.
- var k=2;
- do{
- var i=2*Math.random()-1;
- var j=2*Math.random()-1;
- k = i*i+j*j;
- }while(k>=1);
- return (i * Math.sqrt((-2*Math.log(k))/k)); // Number
- },
- // basic statistics
- sd: function(/* Array */a){
- // summary
- // Returns the standard deviation of the passed arguments.
- return Math.sqrt(this.variance(a)); // Number
- },
- variance: function(/* Array */a){
- // summary
- // Find the variance in the passed array of numbers.
- var mean=0, squares=0;
- dojo.forEach(a, function(item){
- mean+=item;
- squares+=Math.pow(item,2);
- });
- return (squares/a.length)-Math.pow(mean/a.length, 2); // Number
- },
-
- // create a range of numbers
- range: function(/* Number */a, /* Number? */b, /* Number? */step){
- // summary
- // Create a range of numbers based on the parameters.
- if(arguments.length<2){
- b=a,a=0;
- }
- var s=step||1;
- var range=[];
- if(s>0){
- for(var i=a; i<b; i+=s){
- range.push(i);
- }
- }else{
- if(s<0){
- for(var i=a; i>b; i+=s){
- range.push(i);
- }
- }else{
- throw new Error("dojox.math.range: step must not be zero.");
- }
- }
- return range; // Array
- },
- distance: function(/* Array */a, /* Array */b){
- // summary
- // Calculate the distance between point A and point B
- return Math.sqrt(Math.pow(b[0]-a[0],2)+Math.pow(b[1]-a[1],2)); // Number
- },
- midpoint: function(/* Array */a, /* Array */b){
- // summary
- // Calculate the midpoint between points A and B. A and B may be multidimensional.
- if(a.length!=b.length){
- console.error("dojox.math.midpoint: Points A and B are not the same dimensionally.", a, b);
- }
- var m=[];
- for(var i=0; i<a.length; i++){
- m[i]=(a[i]+b[i])/2;
- }
- return m; // Array
- }
-});
-
+if(!dojo._hasResource["dojox.math._base"]){
+dojo._hasResource["dojox.math._base"]=true;
+dojo.provide("dojox.math._base");
+(function(){
+var m=dojox.math;
+dojo.mixin(dojox.math,{toRadians:function(n){
+return (n*Math.PI)/180;
+},toDegrees:function(n){
+return (n*180)/Math.PI;
+},degreesToRadians:function(n){
+return m.toRadians(n);
+},radiansToDegrees:function(n){
+return m.toDegrees(n);
+},factorial:function(n){
+if(n===0){
+return 1;
+}else{
+if(n<0||Math.floor(n)!=n){
+return NaN;
+}
+}
+var _1=1;
+for(var i=1;i<=n;i++){
+_1*=i;
+}
+return _1;
+},permutations:function(n,k){
+if(n==0||k==0){
+return 1;
+}
+return this.factorial(n)/this.factorial(n-k);
+},combinations:function(n,r){
+if(n==0||r==0){
+return 1;
}
+return this.factorial(n)/(this.factorial(n-r)*this.factorial(r));
+},bernstein:function(t,n,i){
+return this.combinations(n,i)*Math.pow(t,i)*Math.pow(1-t,n-i);
+},gaussian:function(){
+var k=2;
+do{
+var i=2*Math.random()-1;
+var j=2*Math.random()-1;
+k=i*i+j*j;
+}while(k>=1);
+return i*Math.sqrt((-2*Math.log(k))/k);
+},range:function(a,b,_2){
+if(arguments.length<2){
+b=a,a=0;
+}
+var _3=[],s=_2||1,i;
+if(s>0){
+for(i=a;i<b;i+=s){
+_3.push(i);
+}
+}else{
+if(s<0){
+for(i=a;i>b;i+=s){
+_3.push(i);
+}
+}else{
+throw new Error("dojox.math.range: step must not be zero.");
+}
+}
+return _3;
+},distance:function(a,b){
+return Math.sqrt(Math.pow(b[0]-a[0],2)+Math.pow(b[1]-a[1],2));
+},midpoint:function(a,b){
+if(a.length!=b.length){
+console.error("dojox.math.midpoint: Points A and B are not the same dimensionally.",a,b);
+}
+var m=[];
+for(var i=0;i<a.length;i++){
+m[i]=(a[i]+b[i])/2;
+}
+return m;
+}});
+})();
+}
diff --git a/js/dojo/dojox/math/curves.js b/js/dojo/dojox/math/curves.js
--- a/js/dojo/dojox/math/curves.js
+++ b/js/dojo/dojox/math/curves.js
@@ -1,193 +1,194 @@
-if(!dojo._hasResource["dojox.math.curves"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.math.curves"] = true;
-dojo.provide("dojox.math.curves");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
-dojo.mixin(dojox.math.curves, {
- Line:function (start, end) {
- this.start = start;
- this.end = end;
- this.dimensions = start.length;
- for (var i = 0; i < start.length; i++) {
- start[i] = Number(start[i]);
- }
- for (var i = 0; i < end.length; i++) {
- end[i] = Number(end[i]);
- }
- this.getValue = function (n) {
- var retVal = new Array(this.dimensions);
- for (var i = 0; i < this.dimensions; i++) {
- retVal[i] = ((this.end[i] - this.start[i]) * n) + this.start[i];
- }
- return retVal;
- };
- return this;
- },
- Bezier:function(pnts) {
- this.getValue = function (step) {
- if (step >= 1) {
- return this.p[this.p.length - 1];
- }
- if (step <= 0) {
- return this.p[0];
- }
- var retVal = new Array(this.p[0].length);
- for (var k = 0; j < this.p[0].length; k++) {
- retVal[k] = 0;
- }
- for (var j = 0; j < this.p[0].length; j++) {
- var C = 0;
- var D = 0;
- for (var i = 0; i < this.p.length; i++) {
- C += this.p[i][j] * this.p[this.p.length - 1][0] * dojox.math.bernstein(step, this.p.length, i);
- }
- for (var l = 0; l < this.p.length; l++) {
- D += this.p[this.p.length - 1][0] * dojox.math.bernstein(step, this.p.length, l);
- }
- retVal[j] = C / D;
- }
- return retVal;
- };
- this.p = pnts;
- return this;
- },
- CatmullRom:function (pnts, c) {
- this.getValue = function (step) {
- var percent = step * (this.p.length - 1);
- var node = Math.floor(percent);
- var progress = percent - node;
- var i0 = node - 1;
- if (i0 < 0) {
- i0 = 0;
- }
- var i = node;
- var i1 = node + 1;
- if (i1 >= this.p.length) {
- i1 = this.p.length - 1;
- }
- var i2 = node + 2;
- if (i2 >= this.p.length) {
- i2 = this.p.length - 1;
- }
- var u = progress;
- var u2 = progress * progress;
- var u3 = progress * progress * progress;
- var retVal = new Array(this.p[0].length);
- for (var k = 0; k < this.p[0].length; k++) {
- var x1 = (-this.c * this.p[i0][k]) + ((2 - this.c) * this.p[i][k]) + ((this.c - 2) * this.p[i1][k]) + (this.c * this.p[i2][k]);
- var x2 = (2 * this.c * this.p[i0][k]) + ((this.c - 3) * this.p[i][k]) + ((3 - 2 * this.c) * this.p[i1][k]) + (-this.c * this.p[i2][k]);
- var x3 = (-this.c * this.p[i0][k]) + (this.c * this.p[i1][k]);
- var x4 = this.p[i][k];
- retVal[k] = x1 * u3 + x2 * u2 + x3 * u + x4;
- }
- return retVal;
- };
- if (!c) {
- this.c = 0.7;
- } else {
- this.c = c;
- }
- this.p = pnts;
- return this;
- },
- Arc:function (start, end, ccw){
- function translate(a,b){
- var c=new Array(a.length);
- for(var i=0; i<a.length; i++){ c[i]=a[i]+b[i]; }
- return c;
- }
- function invert(a){
- var b = new Array(a.length);
- for(var i=0; i<a.length; i++){ b[i]=-a[i]; }
- return b;
- }
- var center = dojox.math.midpoint(start, end);
- var sides = translate(invert(center), start);
- var rad = Math.sqrt(Math.pow(sides[0], 2) + Math.pow(sides[1], 2));
- var theta = dojox.math.radiansToDegrees(Math.atan(sides[1] / sides[0]));
- if (sides[0] < 0){
- theta -= 90;
- } else {
- theta += 90;
- }
- dojox.math.curves.CenteredArc.call(this, center, rad, theta, theta + (ccw ? -180 : 180));
- },
- CenteredArc:function (center, radius, start, end) {
- this.center = center;
- this.radius = radius;
- this.start = start || 0;
- this.end = end;
- this.getValue = function (n) {
- var retVal = new Array(2);
- var theta = dojox.math.degreesToRadians(this.start + ((this.end - this.start) * n));
- retVal[0] = this.center[0] + this.radius * Math.sin(theta);
- retVal[1] = this.center[1] - this.radius * Math.cos(theta);
- return retVal;
- };
- return this;
- },
- Circle:function(center, radius){
- dojox.math.curves.CenteredArc.call(this, center, radius, 0, 360);
- return this;
- },
- Path:function () {
- var curves = [];
- var weights = [];
- var ranges = [];
- var totalWeight = 0;
- this.add = function (curve, weight) {
- if (weight < 0) {
- console.error("dojox.math.curves.Path.add: weight cannot be less than 0");
- }
- curves.push(curve);
- weights.push(weight);
- totalWeight += weight;
- computeRanges();
- };
- this.remove = function (curve) {
- for (var i = 0; i < curves.length; i++) {
- if (curves[i] == curve) {
- curves.splice(i, 1);
- totalWeight -= weights.splice(i, 1)[0];
- break;
- }
- }
- computeRanges();
- };
- this.removeAll = function () {
- curves = [];
- weights = [];
- totalWeight = 0;
- };
- this.getValue = function (n) {
- var found = false, value = 0;
- for (var i = 0; i < ranges.length; i++) {
- var r = ranges[i];
- if (n >= r[0] && n < r[1]) {
- var subN = (n - r[0]) / r[2];
- value = curves[i].getValue(subN);
- found = true;
- break;
- }
- }
- if (!found) {
- value = curves[curves.length - 1].getValue(1);
- }
- for (var j = 0; j < i; j++) {
- value = dojox.math.points.translate(value, curves[j].getValue(1));
- }
- return value;
- };
- function computeRanges() {
- var start = 0;
- for (var i = 0; i < weights.length; i++) {
- var end = start + weights[i] / totalWeight;
- var len = end - start;
- ranges[i] = [start, end, len];
- start = end;
- }
- }
- return this;
- }
-});
-
+if(!dojo._hasResource["dojox.math.curves"]){
+dojo._hasResource["dojox.math.curves"]=true;
+dojo.provide("dojox.math.curves");
+dojo.mixin(dojox.math.curves,{Line:function(_1,_2){
+this.start=_1;
+this.end=_2;
+this.dimensions=_1.length;
+for(var i=0;i<_1.length;i++){
+_1[i]=Number(_1[i]);
+}
+for(var i=0;i<_2.length;i++){
+_2[i]=Number(_2[i]);
+}
+this.getValue=function(n){
+var _3=new Array(this.dimensions);
+for(var i=0;i<this.dimensions;i++){
+_3[i]=((this.end[i]-this.start[i])*n)+this.start[i];
+}
+return _3;
+};
+return this;
+},Bezier:function(_4){
+this.getValue=function(_5){
+if(_5>=1){
+return this.p[this.p.length-1];
+}
+if(_5<=0){
+return this.p[0];
+}
+var _6=new Array(this.p[0].length);
+for(var k=0;j<this.p[0].length;k++){
+_6[k]=0;
+}
+for(var j=0;j<this.p[0].length;j++){
+var C=0;
+var D=0;
+for(var i=0;i<this.p.length;i++){
+C+=this.p[i][j]*this.p[this.p.length-1][0]*dojox.math.bernstein(_5,this.p.length,i);
+}
+for(var l=0;l<this.p.length;l++){
+D+=this.p[this.p.length-1][0]*dojox.math.bernstein(_5,this.p.length,l);
+}
+_6[j]=C/D;
+}
+return _6;
+};
+this.p=_4;
+return this;
+},CatmullRom:function(_7,c){
+this.getValue=function(_8){
+var _9=_8*(this.p.length-1);
+var _a=Math.floor(_9);
+var _b=_9-_a;
+var i0=_a-1;
+if(i0<0){
+i0=0;
+}
+var i=_a;
+var i1=_a+1;
+if(i1>=this.p.length){
+i1=this.p.length-1;
+}
+var i2=_a+2;
+if(i2>=this.p.length){
+i2=this.p.length-1;
+}
+var u=_b;
+var u2=_b*_b;
+var u3=_b*_b*_b;
+var _c=new Array(this.p[0].length);
+for(var k=0;k<this.p[0].length;k++){
+var x1=(-this.c*this.p[i0][k])+((2-this.c)*this.p[i][k])+((this.c-2)*this.p[i1][k])+(this.c*this.p[i2][k]);
+var x2=(2*this.c*this.p[i0][k])+((this.c-3)*this.p[i][k])+((3-2*this.c)*this.p[i1][k])+(-this.c*this.p[i2][k]);
+var x3=(-this.c*this.p[i0][k])+(this.c*this.p[i1][k]);
+var x4=this.p[i][k];
+_c[k]=x1*u3+x2*u2+x3*u+x4;
+}
+return _c;
+};
+if(!c){
+this.c=0.7;
+}else{
+this.c=c;
+}
+this.p=_7;
+return this;
+},Arc:function(_d,_e,_f){
+function _10(a,b){
+var c=new Array(a.length);
+for(var i=0;i<a.length;i++){
+c[i]=a[i]+b[i];
}
+return c;
+};
+function _11(a){
+var b=new Array(a.length);
+for(var i=0;i<a.length;i++){
+b[i]=-a[i];
+}
+return b;
+};
+var _12=dojox.math.midpoint(_d,_e);
+var _13=_10(_11(_12),_d);
+var rad=Math.sqrt(Math.pow(_13[0],2)+Math.pow(_13[1],2));
+var _14=dojox.math.radiansToDegrees(Math.atan(_13[1]/_13[0]));
+if(_13[0]<0){
+_14-=90;
+}else{
+_14+=90;
+}
+dojox.math.curves.CenteredArc.call(this,_12,rad,_14,_14+(_f?-180:180));
+},CenteredArc:function(_15,_16,_17,end){
+this.center=_15;
+this.radius=_16;
+this.start=_17||0;
+this.end=end;
+this.getValue=function(n){
+var _18=new Array(2);
+var _19=dojox.math.degreesToRadians(this.start+((this.end-this.start)*n));
+_18[0]=this.center[0]+this.radius*Math.sin(_19);
+_18[1]=this.center[1]-this.radius*Math.cos(_19);
+return _18;
+};
+return this;
+},Circle:function(_1a,_1b){
+dojox.math.curves.CenteredArc.call(this,_1a,_1b,0,360);
+return this;
+},Path:function(){
+var _1c=[];
+var _1d=[];
+var _1e=[];
+var _1f=0;
+this.add=function(_20,_21){
+if(_21<0){
+console.error("dojox.math.curves.Path.add: weight cannot be less than 0");
+}
+_1c.push(_20);
+_1d.push(_21);
+_1f+=_21;
+_22();
+};
+this.remove=function(_23){
+for(var i=0;i<_1c.length;i++){
+if(_1c[i]==_23){
+_1c.splice(i,1);
+_1f-=_1d.splice(i,1)[0];
+break;
+}
+}
+_22();
+};
+this.removeAll=function(){
+_1c=[];
+_1d=[];
+_1f=0;
+};
+this.getValue=function(n){
+var _24=false,_25=0;
+for(var i=0;i<_1e.length;i++){
+var r=_1e[i];
+if(n>=r[0]&&n<r[1]){
+var _26=(n-r[0])/r[2];
+_25=_1c[i].getValue(_26);
+_24=true;
+break;
+}
+}
+if(!_24){
+_25=_1c[_1c.length-1].getValue(1);
+}
+for(var j=0;j<i;j++){
+_25=dojox.math.points.translate(_25,_1c[j].getValue(1));
+}
+return _25;
+};
+function _22(){
+var _27=0;
+for(var i=0;i<_1d.length;i++){
+var end=_27+_1d[i]/_1f;
+var len=end-_27;
+_1e[i]=[_27,end,len];
+_27=end;
+}
+};
+return this;
+}});
+}
diff --git a/js/dojo/dojox/math/matrix.js b/js/dojo/dojox/math/matrix.js
--- a/js/dojo/dojox/math/matrix.js
+++ b/js/dojo/dojox/math/matrix.js
@@ -1,294 +1,251 @@
-if(!dojo._hasResource["dojox.math.matrix"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.math.matrix"] = true;
-dojo.provide("dojox.math.matrix");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
-dojo.mixin(dojox.math.matrix, {
- iDF:0,
- ALMOST_ZERO: 1e-10,
- multiply: function(/* Array */a, /* Array */b){
- // summary
- // Multiply matrix a by matrix b.
- var ay=a.length, ax=a[0].length, by=b.length, bx=b[0].length;
- if(ax!=by){
- console.warn("Can't multiply matricies of sizes " + ax + "," + ay + " and " + bx + "," + by);
- return [[0]];
- }
- var c=[];
- for (var k=0; k<ay; k++) {
- c[k]=[];
- for(var i=0; i<bx; i++){
- c[k][i]=0;
- for(var m=0; m<ax; m++){
- c[k][i]+=a[k][m]*b[m][i];
- }
- }
- }
- return c; // Array
- },
- product: function(/* Array... */){
- // summary
- // Return the product of N matrices
- if (arguments.length==0){
- console.warn("can't multiply 0 matrices!");
- return 1;
- }
- var m=arguments[0];
- for(var i=1; i<arguments.length; i++){
- m=this.multiply(m, arguments[i]);
- }
- return m; // Array
- },
- sum: function(/* Array... */){
- // summary
- // Return the sum of N matrices
- if(arguments.length==0){
- console.warn("can't sum 0 matrices!");
- return 0; // Number
- }
- var m=this.copy(arguments[0]);
- var rows=m.length;
- if(rows==0){
- console.warn("can't deal with matrices of 0 rows!");
- return 0;
- }
- var cols=m[0].length;
- if(cols==0){
- console.warn("can't deal with matrices of 0 cols!");
- return 0;
- }
- for(var i=1; i<arguments.length; ++i){
- var arg=arguments[i];
- if(arg.length!=rows || arg[0].length!=cols){
- console.warn("can't add matrices of different dimensions: first dimensions were " + rows + "x" + cols + ", current dimensions are " + arg.length + "x" + arg[0].length);
- return 0;
- }
- for(var r=0; r<rows; r++) {
- for(var c=0; c<cols; c++) {
- m[r][c]+=arg[r][c];
- }
- }
- }
- return m; // Array
- },
- inverse: function(/* Array */a){
- // summary
- // Return the inversion of the passed matrix
- if(a.length==1 && a[0].length==1){
- return [[1/a[0][0]]]; // Array
- }
- var tms=a.length, m=this.create(tms, tms), mm=this.adjoint(a), det=this.determinant(a), dd=0;
- if(det==0){
- console.warn("Determinant Equals 0, Not Invertible.");
- return [[0]];
- }else{
- dd=1/det;
- }
- for(var i=0; i<tms; i++) {
- for (var j=0; j<tms; j++) {
- m[i][j]=dd*mm[i][j];
- }
- }
- return m; // Array
- },
- determinant: function(/* Array */a){
- // summary
- // Calculate the determinant of the passed square matrix.
- if(a.length!=a[0].length){
- console.warn("Can't calculate the determinant of a non-squre matrix!");
- return 0;
- }
- var tms=a.length, det=1, b=this.upperTriangle(a);
- for (var i=0; i<tms; i++){
- var bii=b[i][i];
- if (Math.abs(bii)<this.ALMOST_ZERO) {
- return 0; // Number
- }
- det*=bii;
- }
- det*=this.iDF;
- return det; // Number
- },
- upperTriangle: function(/* Array */m){
- // Summary
- // Find the upper triangle of the passed matrix and return it.
- m=this.copy(m);
- var f1=0, temp=0, tms=m.length, v=1;
- this.iDF=1;
- for(var col=0; col<tms-1; col++){
- if(typeof m[col][col]!="number") {
- console.warn("non-numeric entry found in a numeric matrix: m[" + col + "][" + col + "]=" + m[col][col]);
- }
- v=1;
- var stop_loop=0;
- while((m[col][col] == 0) && !stop_loop){
- if (col+v>=tms){
- this.iDF=0;
- stop_loop=1;
- }else{
- for(var r=0; r<tms; r++){
- temp=m[col][r];
- m[col][r]=m[col+v][r];
- m[col+v][r]=temp;
- }
- v++;
- this.iDF*=-1;
- }
- }
- for(var row=col+1; row<tms; row++){
- if(typeof m[row][col]!="number"){
- console.warn("non-numeric entry found in a numeric matrix: m[" + row + "][" + col + "]=" + m[row][col]);
- }
- if(typeof m[col][row]!="number"){
- console.warn("non-numeric entry found in a numeric matrix: m[" + col + "][" + row + "]=" + m[col][row]);
- }
- if(m[col][col]!=0){
- var f1=(-1)* m[row][col]/m[col][col];
- for (var i=col; i<tms; i++){
- m[row][i]=f1*m[col][i]+m[row][i];
- }
- }
- }
- }
- return m; // Array
- },
- create: function(/* Number */a, /* Number */b, /* Number? */value){
- // summary
- // Create a new matrix with rows a and cols b, and pre-populate with value.
- value=value||0;
- var m=[];
- for (var i=0; i<b; i++){
- m[i]=[];
- for(var j=0; j<a; j++) {
- m[i][j]=value;
- }
- }
- return m; // Array
- },
- ones: function(/* Number */a, /* Number */b){
- // summary
- // Create a matrix pre-populated with ones
- return this.create(a, b, 1); // Array
- },
- zeros: function(/* Number */a, /* Number */b){
- // summary
- // Create a matrix pre-populated with zeros
- return this.create(a, b); // Array
- },
- identity: function(/* Number */size, /* Number? */scale){
- // summary
- // Create an identity matrix based on the size and scale.
- scale=scale||1;
- var m=[];
- for(var i=0; i<size; i++){
- m[i]=[];
- for(var j=0; j<size; j++){
- m[i][j]=(i==j?scale:0);
- }
- }
- return m; // Array
- },
- adjoint: function(/* Array */a){
- // summary
- // Find the adjoint of the passed matrix
- var tms=a.length;
- if(tms<=1){
- console.warn("Can't find the adjoint of a matrix with a dimension less than 2");
- return [[0]];
- }
- if(a.length!=a[0].length){
- console.warn("Can't find the adjoint of a non-square matrix");
- return [[0]];
- }
- var m=this.create(tms, tms), ap=this.create(tms-1, tms-1);
- var ii=0, jj=0, ia=0, ja=0, det=0;
- for(var i=0; i<tms; i++){
- for (var j=0; j<tms; j++){
- ia=0;
- for(ii=0; ii<tms; ii++){
- if(ii==i){
- continue;
- }
- ja = 0;
- for(jj=0; jj<tms; jj++){
- if(jj==j){
- continue;
- }
- ap[ia][ja] = a[ii][jj];
- ja++;
- }
- ia++;
- }
- det=this.determinant(ap);
- m[i][j]=Math.pow(-1, (i+j))*det;
- }
- }
- return this.transpose(m); // Array
- },
- transpose: function(/* Array */a){
- // summary
- // Transpose the passed matrix (i.e. rows to columns)
- var m=this.create(a.length, a[0].length);
- for(var i=0; i<a.length; i++){
- for(var j=0; j<a[i].length; j++){
- m[j][i]=a[i][j];
- }
- }
- return m; // Array
- },
- format: function(/* Array */a, /* Number? */points){
- // summary
- // Return a string representation of the matrix, rounded to points (if needed)
- points=points||5;
- function format_int(x, dp){
- var fac=Math.pow(10, dp);
- var a=Math.round(x*fac)/fac;
- var b=a.toString();
- if(b.charAt(0)!="-"){
- b=" "+b;
- }
- if(b.indexOf(".")>-1){
- b+=".";
- }
- while(b.length<dp+3){
- b+="0";
- }
- return b;
- }
- var ya=a.length;
- var xa=ya>0?a[0].length:0;
- var buffer="";
- for(var y=0; y<ya; y++){
- buffer+="| ";
- for(var x=0; x<xa; x++){
- buffer+=format_int(a[y][x], points)+" ";
- }
- buffer+="|\n";
- }
- return buffer; // string
- },
- copy: function(/* Array */a){
- // summary
- // Create a copy of the passed matrix
- var ya=a.length, xa=a[0].length, m=this.create(xa, ya);
- for(var y=0; y<ya; y++){
- for(var x=0; x<xa; x++){
- m[y][x]=a[y][x];
- }
- }
- return m; // Array
- },
- scale: function(/* Array */a, /* Number */factor){
- // summary
- // Create a copy of passed matrix and scale each member by factor.
- a=this.copy(a);
- var ya=a.length, xa=a[0].length;
- for(var y=0; y<ya; y++){
- for(var x=0; x<xa; x++){
- a[y][x]*=factor;
- }
- }
- return a;
- }
-});
-
+if(!dojo._hasResource["dojox.math.matrix"]){
+dojo._hasResource["dojox.math.matrix"]=true;
+dojo.provide("dojox.math.matrix");
+dojo.mixin(dojox.math.matrix,{iDF:0,ALMOST_ZERO:1e-10,multiply:function(a,b){
+var ay=a.length,ax=a[0].length,by=b.length,bx=b[0].length;
+if(ax!=by){
+console.warn("Can't multiply matricies of sizes "+ax+","+ay+" and "+bx+","+by);
+return [[0]];
+}
+var c=[];
+for(var k=0;k<ay;k++){
+c[k]=[];
+for(var i=0;i<bx;i++){
+c[k][i]=0;
+for(var m=0;m<ax;m++){
+c[k][i]+=a[k][m]*b[m][i];
+}
+}
+}
+return c;
+},product:function(){
+if(arguments.length==0){
+console.warn("can't multiply 0 matrices!");
+return 1;
+}
+var m=arguments[0];
+for(var i=1;i<arguments.length;i++){
+m=this.multiply(m,arguments[i]);
+}
+return m;
+},sum:function(){
+if(arguments.length==0){
+console.warn("can't sum 0 matrices!");
+return 0;
+}
+var m=this.copy(arguments[0]);
+var _1=m.length;
+if(_1==0){
+console.warn("can't deal with matrices of 0 rows!");
+return 0;
+}
+var _2=m[0].length;
+if(_2==0){
+console.warn("can't deal with matrices of 0 cols!");
+return 0;
+}
+for(var i=1;i<arguments.length;++i){
+var _3=arguments[i];
+if(_3.length!=_1||_3[0].length!=_2){
+console.warn("can't add matrices of different dimensions: first dimensions were "+_1+"x"+_2+", current dimensions are "+_3.length+"x"+_3[0].length);
+return 0;
+}
+for(var r=0;r<_1;r++){
+for(var c=0;c<_2;c++){
+m[r][c]+=_3[r][c];
+}
+}
+}
+return m;
+},inverse:function(a){
+if(a.length==1&&a[0].length==1){
+return [[1/a[0][0]]];
+}
+var _4=a.length,m=this.create(_4,_4),mm=this.adjoint(a),_5=this.determinant(a),dd=0;
+if(_5==0){
+console.warn("Determinant Equals 0, Not Invertible.");
+return [[0]];
+}else{
+dd=1/_5;
+}
+for(var i=0;i<_4;i++){
+for(var j=0;j<_4;j++){
+m[i][j]=dd*mm[i][j];
+}
+}
+return m;
+},determinant:function(a){
+if(a.length!=a[0].length){
+console.warn("Can't calculate the determinant of a non-squre matrix!");
+return 0;
+}
+var _6=a.length,_7=1,b=this.upperTriangle(a);
+for(var i=0;i<_6;i++){
+var _8=b[i][i];
+if(Math.abs(_8)<this.ALMOST_ZERO){
+return 0;
+}
+_7*=_8;
+}
+_7*=this.iDF;
+return _7;
+},upperTriangle:function(m){
+m=this.copy(m);
+var f1=0,_9=0,_a=m.length,v=1;
+this.iDF=1;
+for(var _b=0;_b<_a-1;_b++){
+if(typeof m[_b][_b]!="number"){
+console.warn("non-numeric entry found in a numeric matrix: m["+_b+"]["+_b+"]="+m[_b][_b]);
+}
+v=1;
+var _c=0;
+while((m[_b][_b]==0)&&!_c){
+if(_b+v>=_a){
+this.iDF=0;
+_c=1;
+}else{
+for(var r=0;r<_a;r++){
+_9=m[_b][r];
+m[_b][r]=m[_b+v][r];
+m[_b+v][r]=_9;
+}
+v++;
+this.iDF*=-1;
+}
+}
+for(var _d=_b+1;_d<_a;_d++){
+if(typeof m[_d][_b]!="number"){
+console.warn("non-numeric entry found in a numeric matrix: m["+_d+"]["+_b+"]="+m[_d][_b]);
+}
+if(typeof m[_b][_d]!="number"){
+console.warn("non-numeric entry found in a numeric matrix: m["+_b+"]["+_d+"]="+m[_b][_d]);
}
+if(m[_b][_b]!=0){
+var f1=(-1)*m[_d][_b]/m[_b][_b];
+for(var i=_b;i<_a;i++){
+m[_d][i]=f1*m[_b][i]+m[_d][i];
+}
+}
+}
+}
+return m;
+},create:function(a,b,_e){
+_e=_e||0;
+var m=[];
+for(var i=0;i<b;i++){
+m[i]=[];
+for(var j=0;j<a;j++){
+m[i][j]=_e;
+}
+}
+return m;
+},ones:function(a,b){
+return this.create(a,b,1);
+},zeros:function(a,b){
+return this.create(a,b);
+},identity:function(_f,_10){
+_10=_10||1;
+var m=[];
+for(var i=0;i<_f;i++){
+m[i]=[];
+for(var j=0;j<_f;j++){
+m[i][j]=(i==j?_10:0);
+}
+}
+return m;
+},adjoint:function(a){
+var tms=a.length;
+if(tms<=1){
+console.warn("Can't find the adjoint of a matrix with a dimension less than 2");
+return [[0]];
+}
+if(a.length!=a[0].length){
+console.warn("Can't find the adjoint of a non-square matrix");
+return [[0]];
+}
+var m=this.create(tms,tms),ap=this.create(tms-1,tms-1);
+var ii=0,jj=0,ia=0,ja=0,det=0;
+for(var i=0;i<tms;i++){
+for(var j=0;j<tms;j++){
+ia=0;
+for(ii=0;ii<tms;ii++){
+if(ii==i){
+continue;
+}
+ja=0;
+for(jj=0;jj<tms;jj++){
+if(jj==j){
+continue;
+}
+ap[ia][ja]=a[ii][jj];
+ja++;
+}
+ia++;
+}
+det=this.determinant(ap);
+m[i][j]=Math.pow(-1,(i+j))*det;
+}
+}
+return this.transpose(m);
+},transpose:function(a){
+var m=this.create(a.length,a[0].length);
+for(var i=0;i<a.length;i++){
+for(var j=0;j<a[i].length;j++){
+m[j][i]=a[i][j];
+}
+}
+return m;
+},format:function(a,_11){
+_11=_11||5;
+function _12(x,dp){
+var fac=Math.pow(10,dp);
+var a=Math.round(x*fac)/fac;
+var b=a.toString();
+if(b.charAt(0)!="-"){
+b=" "+b;
+}
+if(b.indexOf(".")>-1){
+b+=".";
+}
+while(b.length<dp+3){
+b+="0";
+}
+return b;
+};
+var ya=a.length;
+var xa=ya>0?a[0].length:0;
+var _13="";
+for(var y=0;y<ya;y++){
+_13+="| ";
+for(var x=0;x<xa;x++){
+_13+=_12(a[y][x],_11)+" ";
+}
+_13+="|\n";
+}
+return _13;
+},copy:function(a){
+var ya=a.length,xa=a[0].length,m=this.create(xa,ya);
+for(var y=0;y<ya;y++){
+for(var x=0;x<xa;x++){
+m[y][x]=a[y][x];
+}
+}
+return m;
+},scale:function(a,_14){
+a=this.copy(a);
+var ya=a.length,xa=a[0].length;
+for(var y=0;y<ya;y++){
+for(var x=0;x<xa;x++){
+a[y][x]*=_14;
+}
+}
+return a;
+}});
+}
diff --git a/js/dojo/dojox/resources/README.template b/js/dojo/dojox/resources/README.template
--- a/js/dojo/dojox/resources/README.template
+++ b/js/dojo/dojox/resources/README.template
@@ -1,36 +1,42 @@
--------------------------------------------------------------------------------
-Project Name
--------------------------------------------------------------------------------
-Version X.XXX
-Release date: MM/DD/YYYY
--------------------------------------------------------------------------------
-Project state:
-prototype | expermental | beta | stable | production
--------------------------------------------------------------------------------
-Credits
- Author one (author contact info)
- Author two (author contact info)
--------------------------------------------------------------------------------
-Project description
-
-Describe the point of the project here.
--------------------------------------------------------------------------------
-Dependencies:
-
-List any dependencies here.
--------------------------------------------------------------------------------
-Documentation
-
--------------------------------------------------------------------------------
-Installation instructions
-
-Use this to explain in detail what a person needs to do in order to use this
-project. Include URLs for grabbing source, URLs for any dependencies, etc.
-Also be sure to include any additional information, such as where to place
-CSS files, images, other media, etc. The goal is that someone reading this
-file can follow your instructions and be using this project within minutes.
--------------------------------------------------------------------------------
-Additional Notes
-
-Anything else you think is of interest (for example, object hierarchy) should
-be placed here.
+-------------------------------------------------------------------------------
+Project Name
+-------------------------------------------------------------------------------
+Version X.XXX
+Release date: MM/DD/YYYY
+-------------------------------------------------------------------------------
+Project state:
+[Object1]: experimental | alpha | beta | production
+[Object2]: experimental | alpha | beta | production
+-------------------------------------------------------------------------------
+[ ] l18n support?
+[ ] a11y support?
+-------------------------------------------------------------------------------
+Credits
+[Object1]: Author one (author contact info)
+[Object2]: Author two (author contact info)
+-------------------------------------------------------------------------------
+Project description
+
+Describe the point of the project here.
+-------------------------------------------------------------------------------
+Dependencies:
+
+List any dependencies here.
+-------------------------------------------------------------------------------
+Documentation
+
+Any notes about documentation--such as a link to a page in the Book of Dojo,
+documentation state, etc.--should go here.
+-------------------------------------------------------------------------------
+Installation instructions
+
+Use this to explain in detail what a person needs to do in order to use this
+project. Include URLs for grabbing source, URLs for any dependencies, etc.
+Also be sure to include any additional information, such as where to place
+CSS files, images, other media, etc. The goal is that someone reading this
+file can follow your instructions and be using this project within minutes.
+-------------------------------------------------------------------------------
+Additional Notes
+
+Anything else you think is of interest (for example, object hierarchy) should
+be placed here.
diff --git a/js/dojo/dojox/rpc/README b/js/dojo/dojox/rpc/README
--- a/js/dojo/dojox/rpc/README
+++ b/js/dojo/dojox/rpc/README
@@ -1,40 +1,56 @@
-------------------------------------------------------------------------------
-DojoX RPC Extras
+DojoX RPC
-------------------------------------------------------------------------------
Version 1.0
Release date: 07/01/2007
-------------------------------------------------------------------------------
Project state:
-yahoo.smd: stable
+yahoo.smd: production (but for old dojo.rpc, not the dojox.service.Rpc)
+Service.js: beta - this will become dojo.rpc.Service eventually and replace
+ the existing rpc system
+JsonRPC.js: beta - plugins for json-rpc for the rpc system
+Rest.js: beta - plugin for REST style services for the rpc system
+JsonRest.js: beta - A module for tracking and persisting changes to JSON objects
+through REST.
+OfflineRest.js: alpha - A module for storing REST changes locally as write-
+back cache for offline and intermittent connection situations
+ProxiedPath.js: beta - plugin for the PATH envelope to work with a simple PHP proxy
+Client.js: alpha - A module for maintaining per page/tab client sessions and
+deterministic message sequencing with a server.
+
+SMDLibrary contains smd files representing external services.
+
-------------------------------------------------------------------------------
Project authors
Dustin Machi
+ Kris Zyp
+ Revin Guillen
-------------------------------------------------------------------------------
Project description
Extra utilities for use with dojo.rpc as well as additional smd descriptions
for specific services.
-------------------------------------------------------------------------------
Dependencies:
Dojo Core (package loader, dojo.rpc).
-------------------------------------------------------------------------------
Documentation
See RPC documentation at http://dojotoolkit.org/
-------------------------------------------------------------------------------
Installation instructions
Grab the following from the Dojo SVN Repository:
http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/rpc/*
Install into the following directory structure:
/dojox/rpc/
...which should be at the same level as your Dojo checkout.
The use of the actual utilities varies, but typically additional software
will be included with dojo.require() and smd files for services can be loaded
manually with an xhr request or can be provided by url to the service when created
diff --git a/js/dojo/dojox/sql.js b/js/dojo/dojox/sql.js
--- a/js/dojo/dojox/sql.js
+++ b/js/dojo/dojox/sql.js
@@ -1,6 +1,12 @@
-if(!dojo._hasResource["dojox.sql"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.sql"] = true;
-dojo.require("dojox._sql.common");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.sql"]){
+dojo._hasResource["dojox.sql"]=true;
dojo.provide("dojox.sql");
-
+dojo.require("dojox.sql._base");
}
diff --git a/js/dojo/dojox/storage.js b/js/dojo/dojox/storage.js
--- a/js/dojo/dojox/storage.js
+++ b/js/dojo/dojox/storage.js
@@ -1,6 +1,12 @@
-if(!dojo._hasResource["dojox.storage"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.storage"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.storage"]){
+dojo._hasResource["dojox.storage"]=true;
dojo.provide("dojox.storage");
dojo.require("dojox.storage._common");
-
}
diff --git a/js/dojo/dojox/storage/FlashStorageProvider.js b/js/dojo/dojox/storage/FlashStorageProvider.js
--- a/js/dojo/dojox/storage/FlashStorageProvider.js
+++ b/js/dojo/dojox/storage/FlashStorageProvider.js
@@ -1,333 +1,211 @@
-if(!dojo._hasResource["dojox.storage.FlashStorageProvider"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.storage.FlashStorageProvider"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.storage.FlashStorageProvider"]){
+dojo._hasResource["dojox.storage.FlashStorageProvider"]=true;
dojo.provide("dojox.storage.FlashStorageProvider");
dojo.require("dojox.flash");
dojo.require("dojox.storage.manager");
dojo.require("dojox.storage.Provider");
-
-// summary:
-// Storage provider that uses features in Flash to achieve permanent
-// storage
-// description:
-// Authors of this storage provider-
-// Brad Neuberg, bkn3@columbia.edu
-dojo.declare("dojox.storage.FlashStorageProvider", [ dojox.storage.Provider ], {
- initialized: false,
-
- _available: null,
- _statusHandler: null,
-
- initialize: function(){
- if(djConfig["disableFlashStorage"] == true){
- return;
- }
-
- // initialize our Flash
- var loadedListener = function(){
- // indicate our Flash subsystem is now loaded
- dojox.storage._flashLoaded();
- }
- dojox.flash.addLoadedListener(loadedListener);
- dojox.flash.setSwf({
- flash6: dojo.moduleUrl("dojox", "storage/Storage_version6.swf").toString(),
- flash8: dojo.moduleUrl("dojox", "storage/Storage_version8.swf").toString(),
- visible: false
- });
- },
-
- // Set a new value for the flush delay timer.
- // Possible values:
- // 0 : Perform the flush synchronously after each "put" request
- // > 0 : Wait until 'newDelay' ms have passed without any "put" request to flush
- // -1 : Do not automatically flush
- setFlushDelay: function(newDelay){
- if(newDelay === null || typeof newDelay === "undefined" || isNaN(newDelay)){
- throw new Error("Invalid argunment: " + newDelay);
- }
-
- dojox.flash.comm.setFlushDelay(String(newDelay));
- },
-
- getFlushDelay: function(){
- return Number(dojox.flash.comm.getFlushDelay());
- },
-
- flush: function(namespace){
- //FIXME: is this test necessary? Just use !namespace
- if(namespace == null || typeof namespace == "undefined"){
- namespace = dojox.storage.DEFAULT_NAMESPACE;
- }
- dojox.flash.comm.flush(namespace);
- },
-
- isAvailable: function(){
- return (this._available = !djConfig["disableFlashStorage"]);
- },
-
- put: function(key, value, resultsHandler, namespace){
- if(this.isValidKey(key) == false){
- throw new Error("Invalid key given: " + key);
- }
-
- if(namespace == null || typeof namespace == "undefined"){
- namespace = dojox.storage.DEFAULT_NAMESPACE;
- }
-
- if(this.isValidKey(namespace) == false){
- throw new Error("Invalid namespace given: " + namespace);
- }
-
- this._statusHandler = resultsHandler;
-
- // serialize the value;
- // handle strings differently so they have better performance
- if(dojo.isString(value)){
- value = "string:" + value;
- }else{
- value = dojo.toJson(value);
- }
-
- dojox.flash.comm.put(key, value, namespace);
- },
-
- putMultiple: function(keys, values, resultsHandler, namespace){
- if(this.isValidKeyArray(keys) === false || ! values instanceof Array || keys.length != values.length){
- throw new Error("Invalid arguments: keys = [" + keys + "], values = [" + values + "]");
- }
-
- if(namespace == null || typeof namespace == "undefined"){
- namespace = dojox.storage.DEFAULT_NAMESPACE;
- }
-
- if(this.isValidKey(namespace) == false){
- throw new Error("Invalid namespace given: " + namespace);
- }
-
- this._statusHandler = resultsHandler;
-
- // Convert the arguments on strings we can pass along to Flash
- var metaKey = keys.join(",");
- var lengths = [];
- for(var i=0;i<values.length;i++){
- if(dojo.isString(values[i])){
- values[i] = "string:" + values[i];
- }else{
- values[i] = dojo.toJson(values[i]);
- }
- lengths[i] = values[i].length;
- }
- var metaValue = values.join("");
- var metaLengths = lengths.join(",");
-
- dojox.flash.comm.putMultiple(metaKey, metaValue, metaLengths, this.namespace);
- },
-
- get: function(key, namespace){
- if(this.isValidKey(key) == false){
- throw new Error("Invalid key given: " + key);
- }
-
- if(namespace == null || typeof namespace == "undefined"){
- namespace = dojox.storage.DEFAULT_NAMESPACE;
- }
-
- if(this.isValidKey(namespace) == false){
- throw new Error("Invalid namespace given: " + namespace);
- }
-
- var results = dojox.flash.comm.get(key, namespace);
-
- if(results == ""){
- return null;
- }
-
- return this._destringify(results);
- },
-
- getMultiple: function(/*array*/ keys, /*string?*/ namespace){ /*Object*/
- if(this.isValidKeyArray(keys) === false){
- throw new ("Invalid key array given: " + keys);
- }
- if(namespace == null || typeof namespace == "undefined"){
- namespace = dojox.storage.DEFAULT_NAMESPACE;
- }
-
- if(this.isValidKey(namespace) == false){
- throw new Error("Invalid namespace given: " + namespace);
- }
-
- var metaKey = keys.join(",");
- var metaResults = dojox.flash.comm.getMultiple(metaKey, this.namespace);
- var results = eval("(" + metaResults + ")");
-
- // destringify each entry back into a real JS object
- //FIXME: use dojo.map
- for(var i=0;i<results.length;i++){
- results[i] = (results[i] == "") ? null : this._destringify(results[i]);
- }
-
- return results;
- },
-
- _destringify: function(results){
- // destringify the content back into a
- // real JavaScript object;
- // handle strings differently so they have better performance
- if(dojo.isString(results) && (/^string:/.test(results))){
- results = results.substring("string:".length);
- }else{
- results = dojo.fromJson(results);
- }
-
- return results;
- },
-
- getKeys: function(namespace){
- if(namespace == null || typeof namespace == "undefined"){
- namespace = dojox.storage.DEFAULT_NAMESPACE;
- }
-
- if(this.isValidKey(namespace) == false){
- throw new Error("Invalid namespace given: " + namespace);
- }
-
- var results = dojox.flash.comm.getKeys(namespace);
-
- if(results == ""){
- return [];
- }
-
- // the results are returned comma seperated; split them
- results = results.split(",");
-
- return results;
- },
-
- getNamespaces: function(){
- var results = dojox.flash.comm.getNamespaces();
- if(results == ""){
- return [dojox.storage.DEFAULT_NAMESPACE];
- }
-
- // the results are returned comma seperated; split them
- results = results.split(",");
-
- return results;
- },
-
- clear: function(namespace){
- if(namespace == null || typeof namespace == "undefined"){
- namespace = dojox.storage.DEFAULT_NAMESPACE;
- }
-
- if(this.isValidKey(namespace) == false){
- throw new Error("Invalid namespace given: " + namespace);
- }
-
- dojox.flash.comm.clear(namespace);
- },
-
- remove: function(key, namespace){
- if(namespace == null || typeof namespace == "undefined"){
- namespace = dojox.storage.DEFAULT_NAMESPACE;
- }
-
- if(this.isValidKey(namespace) == false){
- throw new Error("Invalid namespace given: " + namespace);
- }
-
- dojox.flash.comm.remove(key, namespace);
- },
-
- removeMultiple: function(/*array*/ keys, /*string?*/ namespace){ /*Object*/
- if(this.isValidKeyArray(keys) === false){
- dojo.raise("Invalid key array given: " + keys);
- }
- if(namespace == null || typeof namespace == "undefined"){
- namespace = dojox.storage.DEFAULT_NAMESPACE;
- }
-
- if(this.isValidKey(namespace) == false){
- throw new Error("Invalid namespace given: " + namespace);
- }
-
- var metaKey = keys.join(",");
- dojox.flash.comm.removeMultiple(metaKey, this.namespace);
- },
-
- isPermanent: function(){
- return true;
- },
-
- getMaximumSize: function(){
- return dojox.storage.SIZE_NO_LIMIT;
- },
-
- hasSettingsUI: function(){
- return true;
- },
-
- showSettingsUI: function(){
- dojox.flash.comm.showSettings();
- dojox.flash.obj.setVisible(true);
- dojox.flash.obj.center();
- },
-
- hideSettingsUI: function(){
- // hide the dialog
- dojox.flash.obj.setVisible(false);
-
- // call anyone who wants to know the dialog is
- // now hidden
- if(dojo.isFunction(dojox.storage.onHideSettingsUI)){
- dojox.storage.onHideSettingsUI.call(null);
- }
- },
-
- getResourceList: function(){ /* Array[] */
- var swfloc6 = dojo.moduleUrl("dojox", "storage/Storage_version6.swf").toString();
- var swfloc8 = dojo.moduleUrl("dojox", "storage/Storage_version8.swf").toString();
-
- var results = dojox.flash.info.getResourceList(swfloc6, swfloc8);
- results.push(dojo.moduleUrl("dojox", "storage/storage_dialog.swf").toString());
-
- return results;
- },
-
- /** Called when the Flash is finished loading. */
- _flashLoaded: function(){
- // get available namespaces
- this._allNamespaces = this.getNamespaces();
-
- this._initialized = true;
-
- // indicate that this storage provider is now loaded
- dojox.storage.manager.loaded();
- },
-
- // Called if the storage system needs to tell us about the status
- // of a put() request.
- _onStatus: function(statusResult, key){
- var ds = dojox.storage;
- var dfo = dojox.flash.obj;
-
- if(statusResult == ds.PENDING){
- dfo.center();
- dfo.setVisible(true);
- }else{
- dfo.setVisible(false);
- }
-
- if(ds._statusHandler){
- ds._statusHandler.call(null, statusResult, key);
- }
- }
- }
-);
-
-dojox.storage.manager.register("dojox.storage.FlashStorageProvider",
- new dojox.storage.FlashStorageProvider());
-
-dojox.storage.manager.initialize(); // is this redundant? GearsStorageProvider does this.
-
+dojo.declare("dojox.storage.FlashStorageProvider",dojox.storage.Provider,{initialized:false,_available:null,_statusHandler:null,_flashReady:false,_pageReady:false,initialize:function(){
+if(dojo.config["disableFlashStorage"]==true){
+return;
+}
+dojox.flash.addLoadedListener(dojo.hitch(this,function(){
+this._flashReady=true;
+if(this._flashReady&&this._pageReady){
+this._loaded();
+}
+}));
+var _1=dojo.moduleUrl("dojox","storage/Storage.swf").toString();
+dojox.flash.setSwf(_1,false);
+dojo.connect(dojo,"loaded",this,function(){
+this._pageReady=true;
+if(this._flashReady&&this._pageReady){
+this._loaded();
+}
+});
+},setFlushDelay:function(_2){
+if(_2===null||typeof _2==="undefined"||isNaN(_2)){
+throw new Error("Invalid argunment: "+_2);
+}
+dojox.flash.comm.setFlushDelay(String(_2));
+},getFlushDelay:function(){
+return Number(dojox.flash.comm.getFlushDelay());
+},flush:function(_3){
+if(_3==null||typeof _3=="undefined"){
+_3=dojox.storage.DEFAULT_NAMESPACE;
+}
+dojox.flash.comm.flush(_3);
+},isAvailable:function(){
+return (this._available=!dojo.config["disableFlashStorage"]);
+},put:function(_4,_5,_6,_7){
+if(!this.isValidKey(_4)){
+throw new Error("Invalid key given: "+_4);
+}
+if(!_7){
+_7=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_7)){
+throw new Error("Invalid namespace given: "+_7);
+}
+this._statusHandler=_6;
+if(dojo.isString(_5)){
+_5="string:"+_5;
+}else{
+_5=dojo.toJson(_5);
+}
+dojox.flash.comm.put(_4,_5,_7);
+},putMultiple:function(_8,_9,_a,_b){
+if(!this.isValidKeyArray(_8)||!_9 instanceof Array||_8.length!=_9.length){
+throw new Error("Invalid arguments: keys = ["+_8+"], values = ["+_9+"]");
+}
+if(!_b){
+_b=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_b)){
+throw new Error("Invalid namespace given: "+_b);
+}
+this._statusHandler=_a;
+var _c=_8.join(",");
+var _d=[];
+for(var i=0;i<_9.length;i++){
+if(dojo.isString(_9[i])){
+_9[i]="string:"+_9[i];
+}else{
+_9[i]=dojo.toJson(_9[i]);
+}
+_d[i]=_9[i].length;
+}
+var _e=_9.join("");
+var _f=_d.join(",");
+dojox.flash.comm.putMultiple(_c,_e,_f,_b);
+},get:function(key,_10){
+if(!this.isValidKey(key)){
+throw new Error("Invalid key given: "+key);
+}
+if(!_10){
+_10=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_10)){
+throw new Error("Invalid namespace given: "+_10);
+}
+var _11=dojox.flash.comm.get(key,_10);
+if(_11==""){
+return null;
+}
+return this._destringify(_11);
+},getMultiple:function(_12,_13){
+if(!this.isValidKeyArray(_12)){
+throw new ("Invalid key array given: "+_12);
+}
+if(!_13){
+_13=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_13)){
+throw new Error("Invalid namespace given: "+_13);
}
+var _14=_12.join(",");
+var _15=dojox.flash.comm.getMultiple(_14,_13);
+var _16=eval("("+_15+")");
+for(var i=0;i<_16.length;i++){
+_16[i]=(_16[i]=="")?null:this._destringify(_16[i]);
+}
+return _16;
+},_destringify:function(_17){
+if(dojo.isString(_17)&&(/^string:/.test(_17))){
+_17=_17.substring("string:".length);
+}else{
+_17=dojo.fromJson(_17);
+}
+return _17;
+},getKeys:function(_18){
+if(!_18){
+_18=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_18)){
+throw new Error("Invalid namespace given: "+_18);
+}
+var _19=dojox.flash.comm.getKeys(_18);
+if(_19==null||_19=="null"){
+_19="";
+}
+_19=_19.split(",");
+_19.sort();
+return _19;
+},getNamespaces:function(){
+var _1a=dojox.flash.comm.getNamespaces();
+if(_1a==null||_1a=="null"){
+_1a=dojox.storage.DEFAULT_NAMESPACE;
+}
+_1a=_1a.split(",");
+_1a.sort();
+return _1a;
+},clear:function(_1b){
+if(!_1b){
+_1b=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_1b)){
+throw new Error("Invalid namespace given: "+_1b);
+}
+dojox.flash.comm.clear(_1b);
+},remove:function(key,_1c){
+if(!_1c){
+_1c=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_1c)){
+throw new Error("Invalid namespace given: "+_1c);
+}
+dojox.flash.comm.remove(key,_1c);
+},removeMultiple:function(_1d,_1e){
+if(!this.isValidKeyArray(_1d)){
+dojo.raise("Invalid key array given: "+_1d);
+}
+if(!_1e){
+_1e=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_1e)){
+throw new Error("Invalid namespace given: "+_1e);
+}
+var _1f=_1d.join(",");
+dojox.flash.comm.removeMultiple(_1f,_1e);
+},isPermanent:function(){
+return true;
+},getMaximumSize:function(){
+return dojox.storage.SIZE_NO_LIMIT;
+},hasSettingsUI:function(){
+return true;
+},showSettingsUI:function(){
+dojox.flash.comm.showSettings();
+dojox.flash.obj.setVisible(true);
+dojox.flash.obj.center();
+},hideSettingsUI:function(){
+dojox.flash.obj.setVisible(false);
+if(dojo.isFunction(dojox.storage.onHideSettingsUI)){
+dojox.storage.onHideSettingsUI.call(null);
+}
+},getResourceList:function(){
+return [];
+},_loaded:function(){
+this._allNamespaces=this.getNamespaces();
+this.initialized=true;
+dojox.storage.manager.loaded();
+},_onStatus:function(_20,key,_21){
+var ds=dojox.storage;
+var dfo=dojox.flash.obj;
+if(_20==ds.PENDING){
+dfo.center();
+dfo.setVisible(true);
+}else{
+dfo.setVisible(false);
+}
+if(ds._statusHandler){
+ds._statusHandler.call(null,_20,key,null,_21);
+}
+}});
+dojox.storage.manager.register("dojox.storage.FlashStorageProvider",new dojox.storage.FlashStorageProvider());
+}
diff --git a/js/dojo/dojox/storage/GearsStorageProvider.js b/js/dojo/dojox/storage/GearsStorageProvider.js
--- a/js/dojo/dojox/storage/GearsStorageProvider.js
+++ b/js/dojo/dojox/storage/GearsStorageProvider.js
@@ -1,324 +1,230 @@
-if(!dojo._hasResource["dojox.storage.GearsStorageProvider"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.storage.GearsStorageProvider"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.storage.GearsStorageProvider"]){
+dojo._hasResource["dojox.storage.GearsStorageProvider"]=true;
dojo.provide("dojox.storage.GearsStorageProvider");
+dojo.require("dojo.gears");
dojo.require("dojox.storage.Provider");
dojo.require("dojox.storage.manager");
dojo.require("dojox.sql");
-
-if(dojo.isGears){
-
- (function(){
- // make sure we don't define the gears provider if we're not gears
- // enabled
-
- dojo.declare("dojox.storage.GearsStorageProvider", dojox.storage.Provider, {
- // summary:
- // Storage provider that uses the features of Google Gears
- // to store data (it is saved into the local SQL database
- // provided by Gears, using dojox.sql)
- // description:
- //
- //
- // You can disable this storage provider with the following djConfig
- // variable:
- // var djConfig = { disableGearsStorage: true };
- //
- // Authors of this storage provider-
- // Brad Neuberg, bkn3@columbia.edu
- constructor: function(){
- },
- // instance methods and properties
- TABLE_NAME: "__DOJO_STORAGE",
- initialized: false,
-
- _available: null,
-
- initialize: function(){
- //console.debug("dojox.storage.GearsStorageProvider.initialize");
- if(djConfig["disableGearsStorage"] == true){
- return;
- }
-
- // partition our storage data so that multiple apps
- // on the same host won't collide
- this.TABLE_NAME = "__DOJO_STORAGE";
-
- // create the table that holds our data
- try{
- dojox.sql("CREATE TABLE IF NOT EXISTS " + this.TABLE_NAME + "( "
- + " namespace TEXT, "
- + " key TEXT, "
- + " value TEXT "
- + ")"
- );
- dojox.sql("CREATE UNIQUE INDEX IF NOT EXISTS namespace_key_index"
- + " ON " + this.TABLE_NAME
- + " (namespace, key)");
- }catch(e){
- console.debug("dojox.storage.GearsStorageProvider.initialize:", e);
-
- this.initialized = false; // we were unable to initialize
- dojox.storage.manager.loaded();
- return;
- }
-
- // indicate that this storage provider is now loaded
- this.initialized = true;
- dojox.storage.manager.loaded();
- },
-
- isAvailable: function(){
- // is Google Gears available and defined?
- return this._available = dojo.isGears;
- },
-
- put: function(key, value, resultsHandler, namespace){
- if(this.isValidKey(key) == false){
- throw new Error("Invalid key given: " + key);
- }
- namespace = namespace||this.DEFAULT_NAMESPACE;
-
- // serialize the value;
- // handle strings differently so they have better performance
- if(dojo.isString(value)){
- value = "string:" + value;
- }else{
- value = dojo.toJson(value);
- }
-
- // try to store the value
- try{
- dojox.sql("DELETE FROM " + this.TABLE_NAME
- + " WHERE namespace = ? AND key = ?",
- namespace, key);
- dojox.sql("INSERT INTO " + this.TABLE_NAME
- + " VALUES (?, ?, ?)",
- namespace, key, value);
- }catch(e){
- // indicate we failed
- console.debug("dojox.storage.GearsStorageProvider.put:", e);
- resultsHandler(this.FAILED, key, e.toString());
- return;
- }
-
- if(resultsHandler){
- resultsHandler(dojox.storage.SUCCESS, key, null);
- }
- },
-
- get: function(key, namespace){
- if(this.isValidKey(key) == false){
- throw new Error("Invalid key given: " + key);
- }
- namespace = namespace||this.DEFAULT_NAMESPACE;
-
- // try to find this key in the database
- var results = dojox.sql("SELECT * FROM " + this.TABLE_NAME
- + " WHERE namespace = ? AND "
- + " key = ?",
- namespace, key);
- if(!results.length){
- return null;
- }else{
- results = results[0].value;
- }
-
- // destringify the content back into a
- // real JavaScript object;
- // handle strings differently so they have better performance
- if(dojo.isString(results) && (/^string:/.test(results))){
- results = results.substring("string:".length);
- }else{
- results = dojo.fromJson(results);
- }
-
- return results;
- },
-
- getNamespaces: function(){
- var results = [ dojox.storage.DEFAULT_NAMESPACE ];
-
- var rs = dojox.sql("SELECT namespace FROM " + this.TABLE_NAME
- + " DESC GROUP BY namespace");
- for(var i = 0; i < rs.length; i++){
- if(rs[i].namespace != dojox.storage.DEFAULT_NAMESPACE){
- results.push(rs[i].namespace);
- }
- }
-
- return results;
- },
-
- getKeys: function(namespace){
- namespace = namespace||this.DEFAULT_NAMESPACE;
- if(this.isValidKey(namespace) == false){
- throw new Error("Invalid namespace given: " + namespace);
- }
-
- var rs = dojox.sql("SELECT key FROM " + this.TABLE_NAME
- + " WHERE namespace = ?",
- namespace);
-
- var results = [];
- for(var i = 0; i < rs.length; i++){
- results.push(rs[i].key);
- }
-
- return results;
- },
-
- clear: function(namespace){
- if(this.isValidKey(namespace) == false){
- throw new Error("Invalid namespace given: " + namespace);
- }
- namespace = namespace||this.DEFAULT_NAMESPACE;
-
- dojox.sql("DELETE FROM " + this.TABLE_NAME
- + " WHERE namespace = ?",
- namespace);
- },
-
- remove: function(key, namespace){
- namespace = namespace||this.DEFAULT_NAMESPACE;
-
- dojox.sql("DELETE FROM " + this.TABLE_NAME
- + " WHERE namespace = ? AND"
- + " key = ?",
- namespace,
- key);
- },
-
- putMultiple: function(keys, values, resultsHandler, namespace) {
- if(this.isValidKeyArray(keys) === false
- || ! values instanceof Array
- || keys.length != values.length){
- throw new Error("Invalid arguments: keys = ["
- + keys + "], values = [" + values + "]");
- }
-
- if(namespace == null || typeof namespace == "undefined"){
- namespace = dojox.storage.DEFAULT_NAMESPACE;
- }
-
- if(this.isValidKey(namespace) == false){
- throw new Error("Invalid namespace given: " + namespace);
- }
-
- this._statusHandler = resultsHandler;
-
- // try to store the value
- try{
- dojox.sql.open();
- dojox.sql.db.execute("BEGIN TRANSACTION");
- var _stmt = "REPLACE INTO " + this.TABLE_NAME + " VALUES (?, ?, ?)";
- for(var i=0;i<keys.length;i++) {
- // serialize the value;
- // handle strings differently so they have better performance
- var value = values[i];
- if(dojo.isString(value)){
- value = "string:" + value;
- }else{
- value = dojo.toJson(value);
- }
-
- dojox.sql.db.execute( _stmt,
- [namespace, keys[i], value]);
- }
- dojox.sql.db.execute("COMMIT TRANSACTION");
- dojox.sql.close();
- }catch(e){
- // indicate we failed
- console.debug("dojox.storage.GearsStorageProvider.putMultiple:", e);
- if(resultsHandler){
- resultsHandler(this.FAILED, keys, e.toString());
- }
- return;
- }
-
- if(resultsHandler){
- resultsHandler(dojox.storage.SUCCESS, key, null);
- }
- },
-
- getMultiple: function(keys, namespace){
- // TODO: Maybe use SELECT IN instead
-
- if(this.isValidKeyArray(keys) === false){
- throw new ("Invalid key array given: " + keys);
- }
-
- if(namespace == null || typeof namespace == "undefined"){
- namespace = dojox.storage.DEFAULT_NAMESPACE;
- }
-
- if(this.isValidKey(namespace) == false){
- throw new Error("Invalid namespace given: " + namespace);
- }
-
- var _stmt = "SELECT * FROM " + this.TABLE_NAME +
- " WHERE namespace = ? AND " + " key = ?";
-
- var results = [];
- for(var i=0;i<keys.length;i++){
- var result = dojox.sql( _stmt, namespace, keys[i]);
-
- if( ! result.length){
- results[i] = null;
- }else{
- result = result[0].value;
-
- // destringify the content back into a
- // real JavaScript object;
- // handle strings differently so they have better performance
- if(dojo.isString(result) && (/^string:/.test(result))){
- results[i] = result.substring("string:".length);
- }else{
- results[i] = dojo.fromJson(result);
- }
- }
- }
-
- return results;
- },
-
- removeMultiple: function(keys, namespace){
- namespace = namespace||this.DEFAULT_NAMESPACE;
-
- dojox.sql.open();
- dojox.sql.db.execute("BEGIN TRANSACTION");
- var _stmt = "DELETE FROM " + this.TABLE_NAME + " WHERE namespace = ? AND key = ?";
-
- for(var i=0;i<keys.length;i++){
- dojox.sql.db.execute( _stmt,
- [namespace, keys[i]]);
- }
- dojox.sql.db.execute("COMMIT TRANSACTION");
- dojox.sql.close();
- },
-
- isPermanent: function(){ return true; },
-
- getMaximumSize: function(){ return this.SIZE_NO_LIMIT; },
-
- hasSettingsUI: function(){ return false; },
-
- showSettingsUI: function(){
- throw new Error(this.declaredClass
- + " does not support a storage settings user-interface");
- },
-
- hideSettingsUI: function(){
- throw new Error(this.declaredClass
- + " does not support a storage settings user-interface");
- }
- });
-
- // register the existence of our storage providers
- dojox.storage.manager.register("dojox.storage.GearsStorageProvider",
- new dojox.storage.GearsStorageProvider());
-
- dojox.storage.manager.initialize();
- })();
+if(dojo.gears.available){
+(function(){
+dojo.declare("dojox.storage.GearsStorageProvider",dojox.storage.Provider,{constructor:function(){
+},TABLE_NAME:"__DOJO_STORAGE",initialized:false,_available:null,_storageReady:false,initialize:function(){
+if(dojo.config["disableGearsStorage"]==true){
+return;
+}
+this.TABLE_NAME="__DOJO_STORAGE";
+this.initialized=true;
+dojox.storage.manager.loaded();
+},isAvailable:function(){
+return this._available=dojo.gears.available;
+},put:function(_1,_2,_3,_4){
+this._initStorage();
+if(!this.isValidKey(_1)){
+throw new Error("Invalid key given: "+_1);
+}
+_4=_4||this.DEFAULT_NAMESPACE;
+if(!this.isValidKey(_4)){
+throw new Error("Invalid namespace given: "+_1);
+}
+if(dojo.isString(_2)){
+_2="string:"+_2;
+}else{
+_2=dojo.toJson(_2);
+}
+try{
+dojox.sql("DELETE FROM "+this.TABLE_NAME+" WHERE namespace = ? AND key = ?",_4,_1);
+dojox.sql("INSERT INTO "+this.TABLE_NAME+" VALUES (?, ?, ?)",_4,_1,_2);
+}
+catch(e){
+_3(this.FAILED,_1,e.toString(),_4);
+return;
+}
+if(_3){
+_3(dojox.storage.SUCCESS,_1,null,_4);
+}
+},get:function(_5,_6){
+this._initStorage();
+if(!this.isValidKey(_5)){
+throw new Error("Invalid key given: "+_5);
+}
+_6=_6||this.DEFAULT_NAMESPACE;
+if(!this.isValidKey(_6)){
+throw new Error("Invalid namespace given: "+_5);
+}
+var _7=dojox.sql("SELECT * FROM "+this.TABLE_NAME+" WHERE namespace = ? AND "+" key = ?",_6,_5);
+if(!_7.length){
+return null;
+}else{
+_7=_7[0].value;
+}
+if(dojo.isString(_7)&&(/^string:/.test(_7))){
+_7=_7.substring("string:".length);
+}else{
+_7=dojo.fromJson(_7);
+}
+return _7;
+},getNamespaces:function(){
+this._initStorage();
+var _8=[dojox.storage.DEFAULT_NAMESPACE];
+var rs=dojox.sql("SELECT namespace FROM "+this.TABLE_NAME+" DESC GROUP BY namespace");
+for(var i=0;i<rs.length;i++){
+if(rs[i].namespace!=dojox.storage.DEFAULT_NAMESPACE){
+_8.push(rs[i].namespace);
+}
+}
+return _8;
+},getKeys:function(_9){
+this._initStorage();
+_9=_9||this.DEFAULT_NAMESPACE;
+if(!this.isValidKey(_9)){
+throw new Error("Invalid namespace given: "+_9);
+}
+var rs=dojox.sql("SELECT key FROM "+this.TABLE_NAME+" WHERE namespace = ?",_9);
+var _a=[];
+for(var i=0;i<rs.length;i++){
+_a.push(rs[i].key);
+}
+return _a;
+},clear:function(_b){
+this._initStorage();
+_b=_b||this.DEFAULT_NAMESPACE;
+if(!this.isValidKey(_b)){
+throw new Error("Invalid namespace given: "+_b);
+}
+dojox.sql("DELETE FROM "+this.TABLE_NAME+" WHERE namespace = ?",_b);
+},remove:function(_c,_d){
+this._initStorage();
+if(!this.isValidKey(_c)){
+throw new Error("Invalid key given: "+_c);
+}
+_d=_d||this.DEFAULT_NAMESPACE;
+if(!this.isValidKey(_d)){
+throw new Error("Invalid namespace given: "+_c);
+}
+dojox.sql("DELETE FROM "+this.TABLE_NAME+" WHERE namespace = ? AND"+" key = ?",_d,_c);
+},putMultiple:function(_e,_f,_10,_11){
+this._initStorage();
+if(!this.isValidKeyArray(_e)||!_f instanceof Array||_e.length!=_f.length){
+throw new Error("Invalid arguments: keys = ["+_e+"], values = ["+_f+"]");
+}
+if(_11==null||typeof _11=="undefined"){
+_11=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_11)){
+throw new Error("Invalid namespace given: "+_11);
}
-
+this._statusHandler=_10;
+try{
+dojox.sql.open();
+dojox.sql.db.execute("BEGIN TRANSACTION");
+var _12="REPLACE INTO "+this.TABLE_NAME+" VALUES (?, ?, ?)";
+for(var i=0;i<_e.length;i++){
+var _13=_f[i];
+if(dojo.isString(_13)){
+_13="string:"+_13;
+}else{
+_13=dojo.toJson(_13);
+}
+dojox.sql.db.execute(_12,[_11,_e[i],_13]);
+}
+dojox.sql.db.execute("COMMIT TRANSACTION");
+dojox.sql.close();
+}
+catch(e){
+if(_10){
+_10(this.FAILED,_e,e.toString(),_11);
+}
+return;
+}
+if(_10){
+_10(dojox.storage.SUCCESS,_e,null,_11);
+}
+},getMultiple:function(_14,_15){
+this._initStorage();
+if(!this.isValidKeyArray(_14)){
+throw new ("Invalid key array given: "+_14);
+}
+if(_15==null||typeof _15=="undefined"){
+_15=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_15)){
+throw new Error("Invalid namespace given: "+_15);
+}
+var _16="SELECT * FROM "+this.TABLE_NAME+" WHERE namespace = ? AND "+" key = ?";
+var _17=[];
+for(var i=0;i<_14.length;i++){
+var _18=dojox.sql(_16,_15,_14[i]);
+if(!_18.length){
+_17[i]=null;
+}else{
+_18=_18[0].value;
+if(dojo.isString(_18)&&(/^string:/.test(_18))){
+_17[i]=_18.substring("string:".length);
+}else{
+_17[i]=dojo.fromJson(_18);
+}
+}
}
+return _17;
+},removeMultiple:function(_19,_1a){
+this._initStorage();
+if(!this.isValidKeyArray(_19)){
+throw new Error("Invalid arguments: keys = ["+_19+"]");
+}
+if(_1a==null||typeof _1a=="undefined"){
+_1a=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_1a)){
+throw new Error("Invalid namespace given: "+_1a);
+}
+dojox.sql.open();
+dojox.sql.db.execute("BEGIN TRANSACTION");
+var _1b="DELETE FROM "+this.TABLE_NAME+" WHERE namespace = ? AND key = ?";
+for(var i=0;i<_19.length;i++){
+dojox.sql.db.execute(_1b,[_1a,_19[i]]);
+}
+dojox.sql.db.execute("COMMIT TRANSACTION");
+dojox.sql.close();
+},isPermanent:function(){
+return true;
+},getMaximumSize:function(){
+return this.SIZE_NO_LIMIT;
+},hasSettingsUI:function(){
+return false;
+},showSettingsUI:function(){
+throw new Error(this.declaredClass+" does not support a storage settings user-interface");
+},hideSettingsUI:function(){
+throw new Error(this.declaredClass+" does not support a storage settings user-interface");
+},_initStorage:function(){
+if(this._storageReady){
+return;
+}
+if(!google.gears.factory.hasPermission){
+var _1c=null;
+var _1d=null;
+var msg="This site would like to use Google Gears to enable "+"enhanced functionality.";
+var _1e=google.gears.factory.getPermission(_1c,_1d,msg);
+if(!_1e){
+throw new Error("You must give permission to use Gears in order to "+"store data");
+}
+}
+try{
+dojox.sql("CREATE TABLE IF NOT EXISTS "+this.TABLE_NAME+"( "+" namespace TEXT, "+" key TEXT, "+" value TEXT "+")");
+dojox.sql("CREATE UNIQUE INDEX IF NOT EXISTS namespace_key_index"+" ON "+this.TABLE_NAME+" (namespace, key)");
+}
+catch(e){
+throw new Error("Unable to create storage tables for Gears in "+"Dojo Storage");
+}
+this._storageReady=true;
+}});
+dojox.storage.manager.register("dojox.storage.GearsStorageProvider",new dojox.storage.GearsStorageProvider());
+})();
+}
+}
diff --git a/js/dojo/dojox/storage/Provider.js b/js/dojo/dojox/storage/Provider.js
--- a/js/dojo/dojox/storage/Provider.js
+++ b/js/dojo/dojox/storage/Provider.js
@@ -1,327 +1,69 @@
-if(!dojo._hasResource["dojox.storage.Provider"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.storage.Provider"] = true;
-dojo.provide("dojox.storage.Provider");
-
-dojo.declare("dojox.storage.Provider", null, {
- // summary: A singleton for working with dojox.storage.
- // description:
- // dojox.storage exposes the current available storage provider on this
- // platform. It gives you methods such as dojox.storage.put(),
- // dojox.storage.get(), etc.
- //
- // For more details on dojox.storage, see the primary documentation
- // page at
- // http://manual.dojotoolkit.org/storage.html
- //
- // Note for storage provider developers who are creating subclasses-
- // This is the base class for all storage providers Specific kinds of
- // Storage Providers should subclass this and implement these methods.
- // You should avoid initialization in storage provider subclass's
- // constructor; instead, perform initialization in your initialize()
- // method.
- constructor: function(){
- },
-
- // SUCCESS: String
- // Flag that indicates a put() call to a
- // storage provider was succesful.
- SUCCESS: "success",
-
- // FAILED: String
- // Flag that indicates a put() call to
- // a storage provider failed.
- FAILED: "failed",
-
- // PENDING: String
- // Flag that indicates a put() call to a
- // storage provider is pending user approval.
- PENDING: "pending",
-
- // SIZE_NOT_AVAILABLE: String
- // Returned by getMaximumSize() if this storage provider can not determine
- // the maximum amount of data it can support.
- SIZE_NOT_AVAILABLE: "Size not available",
-
- // SIZE_NO_LIMIT: String
- // Returned by getMaximumSize() if this storage provider has no theoretical
- // limit on the amount of data it can store.
- SIZE_NO_LIMIT: "No size limit",
-
- // DEFAULT_NAMESPACE: String
- // The namespace for all storage operations. This is useful if several
- // applications want access to the storage system from the same domain but
- // want different storage silos.
- DEFAULT_NAMESPACE: "default",
-
- // onHideSettingsUI: Function
- // If a function is assigned to this property, then when the settings
- // provider's UI is closed this function is called. Useful, for example,
- // if the user has just cleared out all storage for this provider using
- // the settings UI, and you want to update your UI.
- onHideSettingsUI: null,
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- initialize: function(){
- // summary:
- // Allows this storage provider to initialize itself. This is
- // called after the page has finished loading, so you can not do
- // document.writes(). Storage Provider subclasses should initialize
- // themselves inside of here rather than in their function
- // constructor.
- console.warn("dojox.storage.initialize not implemented");
- },
-
- isAvailable: function(){ /*Boolean*/
- // summary:
- // Returns whether this storage provider is available on this
- // platform.
- console.warn("dojox.storage.isAvailable not implemented");
- },
-
- put: function( /*string*/ key,
- /*object*/ value,
- /*function*/ resultsHandler,
- /*string?*/ namespace){
- // summary:
- // Puts a key and value into this storage system.
- // description:
- // Example-
- // var resultsHandler = function(status, key, message){
- // alert("status="+status+", key="+key+", message="+message);
- // };
- // dojox.storage.put("test", "hello world", resultsHandler);
- //
- // Important note: if you are using Dojo Storage in conjunction with
- // Dojo Offline, then you don't need to provide
- // a resultsHandler; this is because for Dojo Offline we
- // use Google Gears to persist data, which has unlimited data
- // once the user has given permission. If you are using Dojo
- // Storage apart from Dojo Offline, then under the covers hidden
- // Flash might be used, which is both asychronous and which might
- // get denied; in this case you must provide a resultsHandler.
- // key:
- // A string key to use when retrieving this value in the future.
- // value:
- // A value to store; this can be any JavaScript type.
- // resultsHandler:
- // A callback function that will receive three arguments. The
- // first argument is one of three values: dojox.storage.SUCCESS,
- // dojox.storage.FAILED, or dojox.storage.PENDING; these values
- // determine how the put request went. In some storage systems
- // users can deny a storage request, resulting in a
- // dojox.storage.FAILED, while in other storage systems a storage
- // request must wait for user approval, resulting in a
- // dojox.storage.PENDING status until the request is either
- // approved or denied, resulting in another call back with
- // dojox.storage.SUCCESS.
- // The second argument in the call back is the key name that was being stored.
- // The third argument in the call back is an optional message that
- // details possible error messages that might have occurred during
- // the storage process.
- // namespace:
- // Optional string namespace that this value will be placed into;
- // if left off, the value will be placed into dojox.storage.DEFAULT_NAMESPACE
-
- console.warn("dojox.storage.put not implemented");
- },
-
- get: function(/*string*/ key, /*string?*/ namespace){ /*Object*/
- // summary:
- // Gets the value with the given key. Returns null if this key is
- // not in the storage system.
- // key:
- // A string key to get the value of.
- // namespace:
- // Optional string namespace that this value will be retrieved from;
- // if left off, the value will be retrieved from dojox.storage.DEFAULT_NAMESPACE
- // return: Returns any JavaScript object type; null if the key is not present
- console.warn("dojox.storage.get not implemented");
- },
-
- hasKey: function(/*string*/ key, /*string?*/ namespace){ /*Boolean*/
- // summary: Determines whether the storage has the given key.
- return (this.get(key) != null);
- },
- getKeys: function(/*string?*/ namespace){ /*Array*/
- // summary: Enumerates all of the available keys in this storage system.
- // return: Array of available keys
- console.warn("dojox.storage.getKeys not implemented");
- },
-
- clear: function(/*string?*/ namespace){
- // summary:
- // Completely clears this storage system of all of it's values and
- // keys. If 'namespace' is provided just clears the keys in that
- // namespace.
- console.warn("dojox.storage.clear not implemented");
- },
-
- remove: function(/*string*/ key, /*string?*/ namespace){
- // summary: Removes the given key from this storage system.
- console.warn("dojox.storage.remove not implemented");
- },
-
- getNamespaces: function(){ /*string[]*/
- console.warn("dojox.storage.getNamespaces not implemented");
- },
-
- isPermanent: function(){ /*Boolean*/
- // summary:
- // Returns whether this storage provider's values are persisted
- // when this platform is shutdown.
- console.warn("dojox.storage.isPermanent not implemented");
- },
-
- getMaximumSize: function(){ /* mixed */
- // summary: The maximum storage allowed by this provider
- // returns:
- // Returns the maximum storage size
- // supported by this provider, in
- // thousands of bytes (i.e., if it
- // returns 60 then this means that 60K
- // of storage is supported).
- //
- // If this provider can not determine
- // it's maximum size, then
- // dojox.storage.SIZE_NOT_AVAILABLE is
- // returned; if there is no theoretical
- // limit on the amount of storage
- // this provider can return, then
- // dojox.storage.SIZE_NO_LIMIT is
- // returned
- console.warn("dojox.storage.getMaximumSize not implemented");
- },
-
- putMultiple: function( /*array*/ keys,
- /*array*/ values,
- /*function*/ resultsHandler,
- /*string?*/ namespace){
- // summary:
- // Puts multiple keys and values into this storage system.
- // description:
- // Example-
- // var resultsHandler = function(status, key, message){
- // alert("status="+status+", key="+key+", message="+message);
- // };
- // dojox.storage.put(["test"], ["hello world"], resultsHandler);
- //
- // Important note: if you are using Dojo Storage in conjunction with
- // Dojo Offline, then you don't need to provide
- // a resultsHandler; this is because for Dojo Offline we
- // use Google Gears to persist data, which has unlimited data
- // once the user has given permission. If you are using Dojo
- // Storage apart from Dojo Offline, then under the covers hidden
- // Flash might be used, which is both asychronous and which might
- // get denied; in this case you must provide a resultsHandler.
- // keys:
- // An array of string keys to use when retrieving this value in the future,
- // one per value to be stored
- // values:
- // An array of values to store; this can be any JavaScript type, though the
- // performance of plain strings is considerably better
- // resultsHandler:
- // A callback function that will receive three arguments. The
- // first argument is one of three values: dojox.storage.SUCCESS,
- // dojox.storage.FAILED, or dojox.storage.PENDING; these values
- // determine how the put request went. In some storage systems
- // users can deny a storage request, resulting in a
- // dojox.storage.FAILED, while in other storage systems a storage
- // request must wait for user approval, resulting in a
- // dojox.storage.PENDING status until the request is either
- // approved or denied, resulting in another call back with
- // dojox.storage.SUCCESS.
- // The second argument in the call back is the key name that was being stored.
- // The third argument in the call back is an optional message that
- // details possible error messages that might have occurred during
- // the storage process.
- // namespace:
- // Optional string namespace that this value will be placed into;
- // if left off, the value will be placed into dojox.storage.DEFAULT_NAMESPACE
-
- console.warn("dojox.storage.putMultiple not implemented");
- // JAC: We could implement a 'default' puMultiple here by just doing each put individually
- },
-
- getMultiple: function(/*array*/ keys, /*string?*/ namespace){ /*Object*/
- // summary:
- // Gets the valuse corresponding to each of the given keys.
- // Returns a null array element for each given key that is
- // not in the storage system.
- // keys:
- // An array of string keys to get the value of.
- // namespace:
- // Optional string namespace that this value will be retrieved from;
- // if left off, the value will be retrieved from dojox.storage.DEFAULT_NAMESPACE
- // return: Returns any JavaScript object type; null if the key is not present
-
- console.warn("dojox.storage.getMultiple not implemented");
- // JAC: We could implement a 'default' getMultiple here by just doing each get individually
- },
-
- removeMultiple: function(/*array*/ keys, /*string?*/ namespace) {
- // summary: Removes the given keys from this storage system.
-
- // JAC: We could implement a 'default' removeMultiple here by just doing each remove individually
- console.warn("dojox.storage.remove not implemented");
- },
-
- isValidKeyArray: function( keys) {
- if(keys === null || typeof keys === "undefined" || ! keys instanceof Array){
- return false;
- }
-
- // JAC: This could be optimized by running the key validity test directly over a joined string
- for(var k=0;k<keys.length;k++){
- if(!this.isValidKey(keys[k])){
- return false;
- }
- }
- return true;
- },
-
- hasSettingsUI: function(){ /*Boolean*/
- // summary: Determines whether this provider has a settings UI.
- return false;
- },
-
- showSettingsUI: function(){
- // summary: If this provider has a settings UI, determined
- // by calling hasSettingsUI(), it is shown.
- console.warn("dojox.storage.showSettingsUI not implemented");
- },
-
- hideSettingsUI: function(){
- // summary: If this provider has a settings UI, hides it.
- console.warn("dojox.storage.hideSettingsUI not implemented");
- },
-
- isValidKey: function(/*string*/ keyName){ /*Boolean*/
- // summary:
- // Subclasses can call this to ensure that the key given is valid
- // in a consistent way across different storage providers. We use
- // the lowest common denominator for key values allowed: only
- // letters, numbers, and underscores are allowed. No spaces.
- if((keyName == null)||(typeof keyName == "undefined")){
- return false;
- }
-
- return /^[0-9A-Za-z_]*$/.test(keyName);
- },
-
- getResourceList: function(){ /* Array[] */
- // summary:
- // Returns a list of URLs that this
- // storage provider might depend on.
- // description:
- // This method returns a list of URLs that this
- // storage provider depends on to do its work.
- // This list is used by the Dojo Offline Toolkit
- // to cache these resources to ensure the machinery
- // used by this storage provider is available offline.
- // What is returned is an array of URLs.
-
- return [];
- }
-});
-
+if(!dojo._hasResource["dojox.storage.Provider"]){
+dojo._hasResource["dojox.storage.Provider"]=true;
+dojo.provide("dojox.storage.Provider");
+dojo.declare("dojox.storage.Provider",null,{constructor:function(){
+},SUCCESS:"success",FAILED:"failed",PENDING:"pending",SIZE_NOT_AVAILABLE:"Size not available",SIZE_NO_LIMIT:"No size limit",DEFAULT_NAMESPACE:"default",onHideSettingsUI:null,initialize:function(){
+console.warn("dojox.storage.initialize not implemented");
+},isAvailable:function(){
+console.warn("dojox.storage.isAvailable not implemented");
+},put:function(_1,_2,_3,_4){
+console.warn("dojox.storage.put not implemented");
+},get:function(_5,_6){
+console.warn("dojox.storage.get not implemented");
+},hasKey:function(_7,_8){
+return !!this.get(_7,_8);
+},getKeys:function(_9){
+console.warn("dojox.storage.getKeys not implemented");
+},clear:function(_a){
+console.warn("dojox.storage.clear not implemented");
+},remove:function(_b,_c){
+console.warn("dojox.storage.remove not implemented");
+},getNamespaces:function(){
+console.warn("dojox.storage.getNamespaces not implemented");
+},isPermanent:function(){
+console.warn("dojox.storage.isPermanent not implemented");
+},getMaximumSize:function(){
+console.warn("dojox.storage.getMaximumSize not implemented");
+},putMultiple:function(_d,_e,_f,_10){
+for(var i=0;i<_d.length;i++){
+dojox.storage.put(_d[i],_e[i],_f,_10);
}
+},getMultiple:function(_11,_12){
+var _13=[];
+for(var i=0;i<_11.length;i++){
+_13.push(dojox.storage.get(_11[i],_12));
+}
+return _13;
+},removeMultiple:function(_14,_15){
+for(var i=0;i<_14.length;i++){
+dojox.storage.remove(_14[i],_15);
+}
+},isValidKeyArray:function(_16){
+if(_16===null||_16===undefined||!dojo.isArray(_16)){
+return false;
+}
+return !dojo.some(_16,function(key){
+return !this.isValidKey(key);
+},this);
+},hasSettingsUI:function(){
+return false;
+},showSettingsUI:function(){
+console.warn("dojox.storage.showSettingsUI not implemented");
+},hideSettingsUI:function(){
+console.warn("dojox.storage.hideSettingsUI not implemented");
+},isValidKey:function(_17){
+if(_17===null||_17===undefined){
+return false;
+}
+return /^[0-9A-Za-z_]*$/.test(_17);
+},getResourceList:function(){
+return [];
+}});
+}
diff --git a/js/dojo/dojox/storage/README b/js/dojo/dojox/storage/README
--- a/js/dojo/dojox/storage/README
+++ b/js/dojo/dojox/storage/README
@@ -1,42 +1,76 @@
-------------------------------------------------------------------------------
-Project Name
+Dojo Storage
-------------------------------------------------------------------------------
-Version X.XXX
-Release date: MM/DD/YYYY
+Version X.XXX (does not have separate versioning -- versioned by release date)
+Last Release date: March 2008
-------------------------------------------------------------------------------
Project state:
experimental
-------------------------------------------------------------------------------
Credits
Brad Neuberg
Alex Russell
-------------------------------------------------------------------------------
Project description
dojox.storage provides a JavaScript abstraction for persistent storage
as well as pluggable implementations which typically use native browser extensions
(e.g. Flash player, Gears)
-------------------------------------------------------------------------------
Dependencies:
-FlashStorageProvider requires the Flash player [ currently NOT operational ]
+FlashStorageProvider requires the Flash player
GearsStorageProvider requires the Gears extension
+The various Air*StorageProviders require Adobe's AIR software
The open source mtasc compiler (www.mtasc.org) is needed to build the
ActionScript into SWF format. The SWF object is maintained within svn, so
this step is only necessary if Storage.as is modified. A sample build script
-is provided (build.sh)
+is provided (buildFlashStorage.sh)
-------------------------------------------------------------------------------
Documentation
-TBD
+See http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book50 for the
+authoritative Dojo Storage docs.
+
+See dojox/storage/demos/helloworld.html for a simple Hello World example
+you can base your code off of.
-------------------------------------------------------------------------------
Installation instructions
-TBD
+If you want to use Dojo Storage in a web browser:
+
+These installation instructions are to use Dojo Storage in a web browser; at
+runtime, Dojo Storage will autodetect and use the best available storage
+option. This includes:
+
+ * Google Gears
+ * HTML 5 Web Browsers (Firefox 2+)
+ * Hidden Flash
+
+If you are using a release build (if you downloaded Dojo from the Dojo
+website then this is a release build -- if you checked it out from
+Subversion yourself then you will have to build things yourself), if you
+only want to grab just the files from Dojo to use Dojo Storage
+in the browser, take the following (but make sure to keep the directory
+layout the same, or else things won't work correctly!):
+
+* dojo/dojo.js
+* dojox/storage/storage-browser.js
+* dojox/storage/Storage.swf
+
+To help with testing and development and to make sure you have everything
+right, its also useful to grab the following files:
+
+* dojox/storage/README
+* dojox/storage/demos/helloworld.html
+
+If you want to use Dojo Storage with Adobe AIR:
+
+[TBD! Why don't you write this and contribute!]
-------------------------------------------------------------------------------
Additional Notes
diff --git a/js/dojo/dojox/storage/Storage.as b/js/dojo/dojox/storage/Storage.as
--- a/js/dojo/dojox/storage/Storage.as
+++ b/js/dojo/dojox/storage/Storage.as
@@ -1,386 +1,402 @@
import DojoExternalInterface;
-class Storage {
+class Storage{
public static var SUCCESS = "success";
public static var FAILED = "failed";
public static var PENDING = "pending";
// Wait the following number of milliseconds before flushing
public static var FLUSH_DELAY_DEFAULT = 500;
public var flush_delay;
public var so;
public var timer;
private var _NAMESPACE_KEY = "allNamespaces";
public function Storage(){
flush_delay = Storage.FLUSH_DELAY_DEFAULT;
- //getURL("javascript:console.debug('FLASH:Storage constructor')");
DojoExternalInterface.initialize();
DojoExternalInterface.addCallback("put", this, put);
DojoExternalInterface.addCallback("putMultiple", this, putMultiple);
DojoExternalInterface.addCallback("get", this, get);
DojoExternalInterface.addCallback("getMultiple", this, getMultiple);
DojoExternalInterface.addCallback("showSettings", this, showSettings);
DojoExternalInterface.addCallback("clear", this, clear);
DojoExternalInterface.addCallback("getKeys", this, getKeys);
DojoExternalInterface.addCallback("getNamespaces", this, getNamespaces);
DojoExternalInterface.addCallback("remove", this, remove);
DojoExternalInterface.addCallback("removeMultiple", this, removeMultiple);
DojoExternalInterface.addCallback("flush", this, flush);
DojoExternalInterface.addCallback("setFlushDelay", this, setFlushDelay);
DojoExternalInterface.addCallback("getFlushDelay", this, getFlushDelay);
DojoExternalInterface.loaded();
// preload the System Settings finished button movie for offline
// access so it is in the cache
_root.createEmptyMovieClip("_settingsBackground", 1);
- // getURL("javascript:alert('"+DojoExternalInterface.dojoPath+"');");
- _root._settingsBackground.loadMovie(DojoExternalInterface.dojoPath + "storage_dialog.swf");
+ _root._settingsBackground.loadMovie(DojoExternalInterface.dojoPath
+ + "../dojox/storage/storage_dialog.swf");
}
+ // FIXME: Whoever added this Flush code did not document why it
+ // exists. Please also put your name and a bug number so I know
+ // who to contact. -- Brad Neuberg
+
// Set a new value for the flush delay timer.
// Possible values:
// 0 : Perform the flush synchronously after each "put" request
// > 0 : Wait until 'newDelay' ms have passed without any "put" request to flush
- // -1 : Do not automatically flush
+ // -1 : Do not automatically flush
public function setFlushDelay(newDelay){
flush_delay = Number(newDelay);
}
+
public function getFlushDelay(){
return String(flush_delay);
}
public function flush(namespace){
if(timer){
_global.clearTimeout(timer);
delete timer;
}
var so = SharedObject.getLocal(namespace);
-
- //var st = (new Date()).getTime();
var flushResults = so.flush();
- //var end = (new Date()).getTime();
- //getURL("javascript:dojo.debug('FLASH: flush - not a word game - took " + (end - st) + "ms')");
// return results of this command to JavaScript
var statusResults;
if(flushResults == true){
statusResults = Storage.SUCCESS;
}else if(flushResults == "pending"){
statusResults = Storage.PENDING;
}else{
statusResults = Storage.FAILED;
}
- DojoExternalInterface.call("dojox.storage._onStatus", null, statusResults, null);
+ DojoExternalInterface.call("dojox.storage._onStatus", statusResults,
+ null, namespace);
}
- // FIXME: This code has gotten ugly -- refactor
public function put(keyName, keyValue, namespace){
// Get the SharedObject for these values and save it
so = SharedObject.getLocal(namespace);
// Save the key and value
so.data[keyName] = keyValue;
+
+ // Save the namespace
+ // FIXME: Tie this into the flush/no-flush stuff below; right now
+ // we immediately write out this namespace. -- Brad Neuberg
+ addNamespace(namespace, keyName);
// Do all the flush/no-flush stuff
- var keyNames = new Array(); keyNames[0] = keyName;
- postWrite( so, keyNames, namespace);
+ var keyNames = new Array();
+ keyNames[0] = keyName;
+ postWrite(so, keyNames, namespace);
}
public function putMultiple(metaKey, metaValue, metaLengths, namespace){
// Get the SharedObject for these values and save it
so = SharedObject.getLocal(namespace);
// Create array of keys and value lengths
var keys = metaKey.split(",");
var lengths = metaLengths.split(",");
// Loop through the array and write the values
- for(var i=0;i<keys.length;i++){
+ for(var i = 0; i < keys.length; i++){
so.data[keys[i]] = metaValue.slice(0,lengths[i]);
metaValue = metaValue.slice(lengths[i]);
}
+ // Save the namespace
+ // FIXME: Tie this into the flush/no-flush stuff below; right now
+ // we immediately write out this namespace. -- Brad Neuberg
+ addNamespace(namespace, null);
+
// Do all the flush/no-flush stuff
- postWrite( so, keys, namespace);
+ postWrite(so, keys, namespace);
}
- public function postWrite( so, keyNames, namespace){
- // TODO: Review all this 'handler' stuff. In particular, the flush could now be with keys pending
- // from several different requests, not only the ones passed in this method call
+ public function postWrite(so, keyNames, namespace){
+ // TODO: Review all this 'handler' stuff. In particular, the flush
+ // could now be with keys pending from several different requests, not
+ // only the ones passed in this method call
// prepare a storage status handler
var self = this;
so.onStatus = function(infoObject:Object){
- //getURL("javascript:console.debug('FLASH: onStatus, infoObject="+infoObject.code+"')");
+ //trace("onStatus, infoObject="+infoObject.code);
// delete the data value if the request was denied
if(infoObject.code == "SharedObject.Flush.Failed"){
for(var i=0;i<keyNames.length;i++){
delete self.so.data[keyNames[i]];
}
}
var statusResults;
if(infoObject.code == "SharedObject.Flush.Failed"){
statusResults = Storage.FAILED;
}else if(infoObject.code == "SharedObject.Flush.Pending"){
statusResults = Storage.PENDING;
}else if(infoObject.code == "SharedObject.Flush.Success"){
// if we have succeeded saving our value, see if we
// need to update our list of namespaces
if(self.hasNamespace(namespace) == true){
statusResults = Storage.SUCCESS;
}else{
// we have a new namespace we must store
self.addNamespace(namespace, keyNames[0]);
return;
}
}
- //getURL("javascript:console.debug('FLASH: onStatus, statusResults="+statusResults+"')");
+ //trace("onStatus, statusResults="+statusResults);
// give the status results to JavaScript
- DojoExternalInterface.call("dojox.storage._onStatus", null, statusResults, keyNames[0]);
+ DojoExternalInterface.call("dojox.storage._onStatus", statusResults,
+ keyNames[0], namespace);
}
// Clear any pending flush timers
if(timer){
- //getURL("javascript:dojo.debug('FLASH: clearing timer')");
- _global.clearTimeout( timer);
+ _global.clearTimeout(timer);
}
// If we have a flush delay set, set a timer for its execution
if(flush_delay > 0){
- timer = _global.setTimeout( flush, flush_delay, namespace);
+ timer = _global.setTimeout(flush, flush_delay, namespace);
// With a flush_delay value of 0, execute the flush request synchronously
}else if(flush_delay == 0){
- //getURL("javascript:dojo.debug('FLASH: calling flush now')");
flush(namespace);
}
// Otherwise just don't flush - will be probably be flushed manually
}
public function get(keyName, namespace){
// Get the SharedObject for these values and save it
so = SharedObject.getLocal(namespace);
var results = so.data[keyName];
return results;
}
// Returns an array with the contents of each key value on the metaKeys array
public function getMultiple(metaKeys, namespace){
-
// get the storage object
so = SharedObject.getLocal(namespace);
// Create array of keys to read
var keys = metaKeys.split(",");
var results = new Array();
// Read from storage into results array
- for(var i=0;i<keys.length;i++){
+ for(var i = 0;i < keys.length;i++){
var val = so.data[keys[i]];
val = val.split("\\").join("\\\\");
val = val.split('"').join('\\"');
results.push( val);
}
// Make the results array into a string
var metaResults = '["' + results.join('","') + '"]';
return metaResults;
}
public function showSettings(){
// Show the configuration options for the Flash player, opened to the
// section for local storage controls (pane 1)
System.showSettings(1);
// there is no way we can intercept when the Close button is pressed, allowing us
// to hide the Flash dialog. Instead, we need to load a movie in the
// background that we can show a close button on.
_root.createEmptyMovieClip("_settingsBackground", 1);
- _root._settingsBackground.loadMovie(DojoExternalInterface.dojoPath + "storage_dialog.swf");
+ _root._settingsBackground.loadMovie(DojoExternalInterface.dojoPath
+ + "../dojox/storage/storage_dialog.swf");
}
public function clear(namespace){
so = SharedObject.getLocal(namespace);
so.clear();
so.flush();
// remove this namespace entry now
removeNamespace(namespace);
}
- public function getKeys(namespace){
+ public function getKeys(namespace) : String{
// Returns a list of the available keys in this namespace
// get the storage object
so = SharedObject.getLocal(namespace);
-
// get all of the keys
- var results = new Array();
+ var results = [];
for(var i in so.data){
results.push(i);
}
-
+
// remove our key that records our list of namespaces
for(var i = 0; i < results.length; i++){
if(results[i] == _NAMESPACE_KEY){
results.splice(i, 1);
break;
}
}
- // join the keys together in a comma seperated string
+ // a bug in ExternalInterface transforms Arrays into
+ // Strings, so we can't use those here! -- BradNeuberg
results = results.join(",");
return results;
}
- public function getNamespaces(){
+ public function getNamespaces() : String{
var allNamespaces = SharedObject.getLocal(_NAMESPACE_KEY);
- var results = new Array();
+ var results = [];
+
for(var i in allNamespaces.data){
results.push(i);
}
-
- return results.join(",");
+
+ // a bug in ExternalInterface transforms Arrays into
+ // Strings, so we can use those here! -- BradNeuberg
+ results = results.join(",");
+
+ return results;
}
public function remove(keyName, namespace){
// Removes a key
// get the storage object
so = SharedObject.getLocal(namespace);
// delete this value
delete so.data[keyName];
// save the changes
so.flush();
// see if we are the last entry for this namespace
var availableKeys = getKeys(namespace);
if(availableKeys == ""){
// we are empty
removeNamespace(namespace);
}
}
// Removes all the values for each keys on the metaKeys array
- public function removeMultiple(metaKeys, namespace){
-
+ public function removeMultiple(metaKeys, namespace){
// get the storage object
so = SharedObject.getLocal(namespace);
// Create array of keys to read
var keys = metaKeys.split(",");
var results = new Array();
// Delete elements
for(var i=0;i<keys.length;i++){
delete so.data[keys[i]];
}
// see if there are no more entries for this namespace
var availableKeys = getKeys(namespace);
if(availableKeys == ""){
// we are empty
removeNamespace(namespace);
}
}
private function hasNamespace(namespace):Boolean{
// Get the SharedObject for the namespace list
var allNamespaces = SharedObject.getLocal(_NAMESPACE_KEY);
var results = false;
for(var i in allNamespaces.data){
if(i == namespace){
results = true;
break;
}
}
return results;
}
// FIXME: This code has gotten ugly -- refactor
private function addNamespace(namespace, keyName){
if(hasNamespace(namespace) == true){
return;
}
// Get the SharedObject for the namespace list
var allNamespaces = SharedObject.getLocal(_NAMESPACE_KEY);
// prepare a storage status handler if the keyName is
// not null
if(keyName != null && typeof keyName != "undefined"){
var self = this;
allNamespaces.onStatus = function(infoObject:Object){
// delete the data value if the request was denied
if(infoObject.code == "SharedObject.Flush.Failed"){
delete self.so.data[keyName];
}
var statusResults;
if(infoObject.code == "SharedObject.Flush.Failed"){
statusResults = Storage.FAILED;
}else if(infoObject.code == "SharedObject.Flush.Pending"){
statusResults = Storage.PENDING;
}else if(infoObject.code == "SharedObject.Flush.Success"){
statusResults = Storage.SUCCESS;
}
// give the status results to JavaScript
- DojoExternalInterface.call("dojox.storage._onStatus", null, statusResults, keyName);
+ DojoExternalInterface.call("dojox.storage._onStatus", statusResults,
+ keyName, namespace);
}
}
// save the namespace list
allNamespaces.data[namespace] = true;
var flushResults = allNamespaces.flush();
// return results of this command to JavaScript
if(keyName != null && typeof keyName != "undefined"){
var statusResults;
if(flushResults == true){
statusResults = Storage.SUCCESS;
}else if(flushResults == "pending"){
statusResults = Storage.PENDING;
}else{
statusResults = Storage.FAILED;
}
- DojoExternalInterface.call("dojox.storage._onStatus", null, statusResults, keyName);
+ DojoExternalInterface.call("dojox.storage._onStatus", statusResults,
+ keyName, namespace);
}
}
// FIXME: This code has gotten ugly -- refactor
private function removeNamespace(namespace){
if(hasNamespace(namespace) == false){
return;
}
// try to save the namespace list; don't have a return
// callback; if we fail on this, the worst that will happen
// is that we have a spurious namespace entry
var allNamespaces = SharedObject.getLocal(_NAMESPACE_KEY);
delete allNamespaces.data[namespace];
allNamespaces.flush();
}
static function main(mc){
- //getURL("javascript:console.debug('FLASH: storage loaded')");
_root.app = new Storage();
}
}
diff --git a/js/dojo/dojox/storage/WhatWGStorageProvider.js b/js/dojo/dojox/storage/WhatWGStorageProvider.js
--- a/js/dojo/dojox/storage/WhatWGStorageProvider.js
+++ b/js/dojo/dojox/storage/WhatWGStorageProvider.js
@@ -1,278 +1,156 @@
-if(!dojo._hasResource["dojox.storage.WhatWGStorageProvider"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.storage.WhatWGStorageProvider"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.storage.WhatWGStorageProvider"]){
+dojo._hasResource["dojox.storage.WhatWGStorageProvider"]=true;
dojo.provide("dojox.storage.WhatWGStorageProvider");
dojo.require("dojox.storage.Provider");
dojo.require("dojox.storage.manager");
-
-dojo.declare("dojox.storage.WhatWGStorageProvider", [ dojox.storage.Provider ], {
- // summary:
- // Storage provider that uses WHAT Working Group features in Firefox 2
- // to achieve permanent storage.
- // description:
- // The WHAT WG storage API is documented at
- // http://www.whatwg.org/specs/web-apps/current-work/#scs-client-side
- //
- // You can disable this storage provider with the following djConfig
- // variable:
- // var djConfig = { disableWhatWGStorage: true };
- //
- // Authors of this storage provider-
- // JB Boisseau, jb.boisseau@eutech-ssii.com
- // Brad Neuberg, bkn3@columbia.edu
-
- initialized: false,
-
- _domain: null,
- _available: null,
- _statusHandler: null,
- _allNamespaces: null,
- _storageEventListener: null,
-
- initialize: function(){
- if(djConfig["disableWhatWGStorage"] == true){
- return;
- }
-
- // get current domain
- // see: https://bugzilla.mozilla.org/show_bug.cgi?id=357323
- this._domain = (location.hostname == "localhost") ? "localhost.localdomain" : location.hostname;
- // console.debug(this._domain);
-
- // indicate that this storage provider is now loaded
- this.initialized = true;
- dojox.storage.manager.loaded();
- },
-
- isAvailable: function(){
- try{
- // see: https://bugzilla.mozilla.org/show_bug.cgi?id=357323
- var myStorage = globalStorage[((location.hostname == "localhost") ? "localhost.localdomain" : location.hostname)];
- }catch(e){
- this._available = false;
- return this._available;
- }
-
- this._available = true;
- return this._available;
- },
-
- put: function(key, value, resultsHandler, namespace){
- if(this.isValidKey(key) == false){
- throw new Error("Invalid key given: " + key);
- }
- namespace = namespace||this.DEFAULT_NAMESPACE;
-
- // get our full key name, which is namespace + key
- key = this.getFullKey(key, namespace);
-
- this._statusHandler = resultsHandler;
-
- // serialize the value;
- // handle strings differently so they have better performance
- if(dojo.isString(value)){
- value = "string:" + value;
- }else{
- value = dojo.toJson(value);
- }
-
- // register for successful storage events.
- var storageListener = dojo.hitch(this, function(evt){
- // remove any old storage event listener we might have added
- // to the window on old put() requests; Firefox has a bug
- // where it can occassionaly go into infinite loops calling
- // our storage event listener over and over -- this is a
- // workaround
- // FIXME: Simplify this into a test case and submit it
- // to Firefox
- window.removeEventListener("storage", storageListener, false);
-
- // indicate we succeeded
- if(resultsHandler){
- resultsHandler.call(null, this.SUCCESS, key);
- }
- });
-
- window.addEventListener("storage", storageListener, false);
-
- // try to store the value
- try{
- var myStorage = globalStorage[this._domain];
- myStorage.setItem(key, value);
- }catch(e){
- // indicate we failed
- this._statusHandler.call(null, this.FAILED, key, e.toString());
- }
- },
-
- get: function(key, namespace){
- if(this.isValidKey(key) == false){
- throw new Error("Invalid key given: " + key);
- }
- namespace = namespace||this.DEFAULT_NAMESPACE;
-
- // get our full key name, which is namespace + key
- key = this.getFullKey(key, namespace);
-
- // sometimes, even if a key doesn't exist, Firefox
- // will return a blank string instead of a null --
- // this _might_ be due to having underscores in the
- // keyname, but I am not sure.
-
- // FIXME: Simplify this bug into a testcase and
- // submit it to Firefox
- var myStorage = globalStorage[this._domain];
- var results = myStorage.getItem(key);
-
- if(results == null || results == ""){
- return null;
- }
-
- results = results.value;
-
- // destringify the content back into a
- // real JavaScript object;
- // handle strings differently so they have better performance
- if(dojo.isString(results) && (/^string:/.test(results))){
- results = results.substring("string:".length);
- }else{
- results = dojo.fromJson(results);
- }
-
- return results;
- },
-
- getNamespaces: function(){
- var results = [ this.DEFAULT_NAMESPACE ];
-
- // simply enumerate through our array and save any string
- // that starts with __
- var found = {};
- var myStorage = globalStorage[this._domain];
- var tester = /^__([^_]*)_/;
- for(var i = 0; i < myStorage.length; i++){
- var currentKey = myStorage.key(i);
- if(tester.test(currentKey) == true){
- var currentNS = currentKey.match(tester)[1];
- // have we seen this namespace before?
- if(typeof found[currentNS] == "undefined"){
- found[currentNS] = true;
- results.push(currentNS);
- }
- }
- }
-
- return results;
- },
-
- getKeys: function(namespace){
- namespace = namespace||this.DEFAULT_NAMESPACE;
-
- if(this.isValidKey(namespace) == false){
- throw new Error("Invalid namespace given: " + namespace);
- }
-
- // create a regular expression to test the beginning
- // of our key names to see if they match our namespace;
- // if it is the default namespace then test for the presence
- // of no namespace for compatibility with older versions
- // of dojox.storage
- var namespaceTester;
- if(namespace == this.DEFAULT_NAMESPACE){
- namespaceTester = new RegExp("^([^_]{2}.*)$");
- }else{
- namespaceTester = new RegExp("^__" + namespace + "_(.*)$");
- }
-
- var myStorage = globalStorage[this._domain];
- var keysArray = [];
- for(var i = 0; i < myStorage.length; i++){
- var currentKey = myStorage.key(i);
- if(namespaceTester.test(currentKey) == true){
- // strip off the namespace portion
- currentKey = currentKey.match(namespaceTester)[1];
- keysArray.push(currentKey);
- }
- }
-
- return keysArray;
- },
-
- clear: function(namespace){
- namespace = namespace||this.DEFAULT_NAMESPACE;
-
- if(this.isValidKey(namespace) == false){
- throw new Error("Invalid namespace given: " + namespace);
- }
-
- // create a regular expression to test the beginning
- // of our key names to see if they match our namespace;
- // if it is the default namespace then test for the presence
- // of no namespace for compatibility with older versions
- // of dojox.storage
- var namespaceTester;
- if(namespace == this.DEFAULT_NAMESPACE){
- namespaceTester = new RegExp("^[^_]{2}");
- }else{
- namespaceTester = new RegExp("^__" + namespace + "_");
- }
-
- var myStorage = globalStorage[this._domain];
- var keys = [];
- for(var i = 0; i < myStorage.length; i++){
- if(namespaceTester.test(myStorage.key(i)) == true){
- keys[keys.length] = myStorage.key(i);
- }
- }
-
- dojo.forEach(keys, dojo.hitch(myStorage, "removeItem"));
- },
-
- remove: function(key, namespace){
- // get our full key name, which is namespace + key
- key = this.getFullKey(key, namespace);
-
- var myStorage = globalStorage[this._domain];
- myStorage.removeItem(key);
- },
-
- isPermanent: function(){
- return true;
- },
-
- getMaximumSize: function(){
- return this.SIZE_NO_LIMIT;
- },
-
- hasSettingsUI: function(){
- return false;
- },
-
- showSettingsUI: function(){
- throw new Error(this.declaredClass + " does not support a storage settings user-interface");
- },
-
- hideSettingsUI: function(){
- throw new Error(this.declaredClass + " does not support a storage settings user-interface");
- },
-
- getFullKey: function(key, namespace){
- namespace = namespace||this.DEFAULT_NAMESPACE;
-
- if(this.isValidKey(namespace) == false){
- throw new Error("Invalid namespace given: " + namespace);
- }
-
- // don't append a namespace string for the default namespace,
- // for compatibility with older versions of dojox.storage
- if(namespace == this.DEFAULT_NAMESPACE){
- return key;
- }else{
- return "__" + namespace + "_" + key;
- }
- }
+dojo.declare("dojox.storage.WhatWGStorageProvider",[dojox.storage.Provider],{initialized:false,_domain:null,_available:null,_statusHandler:null,_allNamespaces:null,_storageEventListener:null,initialize:function(){
+if(dojo.config["disableWhatWGStorage"]==true){
+return;
+}
+this._domain=location.hostname;
+this.initialized=true;
+dojox.storage.manager.loaded();
+},isAvailable:function(){
+try{
+var _1=globalStorage[location.hostname];
+}
+catch(e){
+this._available=false;
+return this._available;
+}
+this._available=true;
+return this._available;
+},put:function(_2,_3,_4,_5){
+if(this.isValidKey(_2)==false){
+throw new Error("Invalid key given: "+_2);
+}
+_5=_5||this.DEFAULT_NAMESPACE;
+_2=this.getFullKey(_2,_5);
+this._statusHandler=_4;
+if(dojo.isString(_3)){
+_3="string:"+_3;
+}else{
+_3=dojo.toJson(_3);
+}
+var _6=dojo.hitch(this,function(_7){
+window.removeEventListener("storage",_6,false);
+if(_4){
+_4.call(null,this.SUCCESS,_2,null,_5);
+}
});
-
-dojox.storage.manager.register("dojox.storage.WhatWGStorageProvider",
- new dojox.storage.WhatWGStorageProvider());
-
+window.addEventListener("storage",_6,false);
+try{
+var _8=globalStorage[this._domain];
+_8.setItem(_2,_3);
+}
+catch(e){
+this._statusHandler.call(null,this.FAILED,_2,e.toString(),_5);
+}
+},get:function(_9,_a){
+if(this.isValidKey(_9)==false){
+throw new Error("Invalid key given: "+_9);
+}
+_a=_a||this.DEFAULT_NAMESPACE;
+_9=this.getFullKey(_9,_a);
+var _b=globalStorage[this._domain];
+var _c=_b.getItem(_9);
+if(_c==null||_c==""){
+return null;
+}
+_c=_c.value;
+if(dojo.isString(_c)&&(/^string:/.test(_c))){
+_c=_c.substring("string:".length);
+}else{
+_c=dojo.fromJson(_c);
+}
+return _c;
+},getNamespaces:function(){
+var _d=[this.DEFAULT_NAMESPACE];
+var _e={};
+var _f=globalStorage[this._domain];
+var _10=/^__([^_]*)_/;
+for(var i=0;i<_f.length;i++){
+var _11=_f.key(i);
+if(_10.test(_11)==true){
+var _12=_11.match(_10)[1];
+if(typeof _e[_12]=="undefined"){
+_e[_12]=true;
+_d.push(_12);
+}
+}
+}
+return _d;
+},getKeys:function(_13){
+_13=_13||this.DEFAULT_NAMESPACE;
+if(this.isValidKey(_13)==false){
+throw new Error("Invalid namespace given: "+_13);
+}
+var _14;
+if(_13==this.DEFAULT_NAMESPACE){
+_14=new RegExp("^([^_]{2}.*)$");
+}else{
+_14=new RegExp("^__"+_13+"_(.*)$");
}
+var _15=globalStorage[this._domain];
+var _16=[];
+for(var i=0;i<_15.length;i++){
+var _17=_15.key(i);
+if(_14.test(_17)==true){
+_17=_17.match(_14)[1];
+_16.push(_17);
+}
+}
+return _16;
+},clear:function(_18){
+_18=_18||this.DEFAULT_NAMESPACE;
+if(this.isValidKey(_18)==false){
+throw new Error("Invalid namespace given: "+_18);
+}
+var _19;
+if(_18==this.DEFAULT_NAMESPACE){
+_19=new RegExp("^[^_]{2}");
+}else{
+_19=new RegExp("^__"+_18+"_");
+}
+var _1a=globalStorage[this._domain];
+var _1b=[];
+for(var i=0;i<_1a.length;i++){
+if(_19.test(_1a.key(i))==true){
+_1b[_1b.length]=_1a.key(i);
+}
+}
+dojo.forEach(_1b,dojo.hitch(_1a,"removeItem"));
+},remove:function(key,_1c){
+key=this.getFullKey(key,_1c);
+var _1d=globalStorage[this._domain];
+_1d.removeItem(key);
+},isPermanent:function(){
+return true;
+},getMaximumSize:function(){
+return this.SIZE_NO_LIMIT;
+},hasSettingsUI:function(){
+return false;
+},showSettingsUI:function(){
+throw new Error(this.declaredClass+" does not support a storage settings user-interface");
+},hideSettingsUI:function(){
+throw new Error(this.declaredClass+" does not support a storage settings user-interface");
+},getFullKey:function(key,_1e){
+_1e=_1e||this.DEFAULT_NAMESPACE;
+if(this.isValidKey(_1e)==false){
+throw new Error("Invalid namespace given: "+_1e);
+}
+if(_1e==this.DEFAULT_NAMESPACE){
+return key;
+}else{
+return "__"+_1e+"_"+key;
+}
+}});
+dojox.storage.manager.register("dojox.storage.WhatWGStorageProvider",new dojox.storage.WhatWGStorageProvider());
+}
diff --git a/js/dojo/dojox/storage/_common.js b/js/dojo/dojox/storage/_common.js
--- a/js/dojo/dojox/storage/_common.js
+++ b/js/dojo/dojox/storage/_common.js
@@ -1,18 +1,17 @@
-if(!dojo._hasResource["dojox.storage._common"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.storage._common"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.storage._common"]){
+dojo._hasResource["dojox.storage._common"]=true;
dojo.provide("dojox.storage._common");
dojo.require("dojox.storage.Provider");
dojo.require("dojox.storage.manager");
-
dojo.require("dojox.storage.GearsStorageProvider");
-
-// FIXME: Find way to set isGears from offline.profile.js file; it didn't
-// work for me
-//dojo.requireIf(!dojo.isGears, "dojox.storage.FlashStorageProvider");
-//dojo.requireIf(!dojo.isGears, "dojox.storage.WhatWGStorageProvider");
-
-// now that we are loaded and registered tell the storage manager to
-// initialize itself
+dojo.require("dojox.storage.WhatWGStorageProvider");
+dojo.require("dojox.storage.FlashStorageProvider");
dojox.storage.manager.initialize();
-
}
diff --git a/js/dojo/dojox/storage/manager.js b/js/dojo/dojox/storage/manager.js
--- a/js/dojo/dojox/storage/manager.js
+++ b/js/dojo/dojox/storage/manager.js
@@ -1,251 +1,117 @@
-if(!dojo._hasResource["dojox.storage.manager"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.storage.manager"] = true;
-dojo.provide("dojox.storage.manager");
-//dojo.require("dojo.AdapterRegistry");
-// FIXME: refactor this to use an AdapterRegistry
-
-dojox.storage.manager = new function(){
- // summary: A singleton class in charge of the dojox.storage system
- // description:
- // Initializes the storage systems and figures out the best available
- // storage options on this platform.
-
- // currentProvider: Object
- // The storage provider that was automagically chosen to do storage
- // on this platform, such as dojox.storage.FlashStorageProvider.
- this.currentProvider = null;
-
- // available: Boolean
- // Whether storage of some kind is available.
- this.available = false;
-
- this._initialized = false;
-
- this._providers = [];
- this._onLoadListeners = [];
-
- this.initialize = function(){
- // summary:
- // Initializes the storage system and autodetects the best storage
- // provider we can provide on this platform
- this.autodetect();
- };
-
- this.register = function(/*string*/ name, /*Object*/ instance){
- // summary:
- // Registers the existence of a new storage provider; used by
- // subclasses to inform the manager of their existence. The
- // storage manager will select storage providers based on
- // their ordering, so the order in which you call this method
- // matters.
- // name:
- // The full class name of this provider, such as
- // "dojox.storage.FlashStorageProvider".
- // instance:
- // An instance of this provider, which we will use to call
- // isAvailable() on.
- this._providers[this._providers.length] = instance; //FIXME: push?
- this._providers[name] = instance; // FIXME: this._providers is an array, not a hash
- };
-
- this.setProvider = function(storageClass){
- // summary:
- // Instructs the storageManager to use the given storage class for
- // all storage requests.
- // description:
- // Example-
- // dojox.storage.setProvider(
- // dojox.storage.IEStorageProvider)
-
- };
-
- this.autodetect = function(){
- // summary:
- // Autodetects the best possible persistent storage provider
- // available on this platform.
-
- //console.debug("dojox.storage.manager.autodetect");
-
- if(this._initialized){ // already finished
- //console.debug("dojox.storage.manager already initialized; returning");
- return;
- }
-
- // a flag to force the storage manager to use a particular
- // storage provider type, such as
- // djConfig = {forceStorageProvider: "dojox.storage.WhatWGStorageProvider"};
- var forceProvider = djConfig["forceStorageProvider"]||false;
-
- // go through each provider, seeing if it can be used
- var providerToUse;
- //FIXME: use dojo.some
- for(var i = 0; i < this._providers.length; i++){
- providerToUse = this._providers[i];
- if(forceProvider == providerToUse.declaredClass){
- // still call isAvailable for this provider, since this helps some
- // providers internally figure out if they are available
- // FIXME: This should be refactored since it is non-intuitive
- // that isAvailable() would initialize some state
- providerToUse.isAvailable();
- break;
- }else if(providerToUse.isAvailable()){
- break;
- }
- }
-
- if(!providerToUse){ // no provider available
- this._initialized = true;
- this.available = false;
- this.currentProvider = null;
- console.warn("No storage provider found for this platform");
- this.loaded();
- return;
- }
-
- // create this provider and mix in it's properties
- // so that developers can do dojox.storage.put rather
- // than dojox.storage.currentProvider.put, for example
- this.currentProvider = providerToUse;
- dojo.mixin(dojox.storage, this.currentProvider);
-
- // have the provider initialize itself
- dojox.storage.initialize();
-
- this._initialized = true;
- this.available = true;
- };
-
- this.isAvailable = function(){ /*Boolean*/
- // summary: Returns whether any storage options are available.
- return this.available;
- };
-
- this.addOnLoad = function(func){ /* void */
- // summary:
- // Adds an onload listener to know when Dojo Offline can be used.
- // description:
- // Adds a listener to know when Dojo Offline can be used. This
- // ensures that the Dojo Offline framework is loaded and that the
- // local dojox.storage system is ready to be used. This method is
- // useful if you don't want to have a dependency on Dojo Events
- // when using dojox.storage.
- // func: Function
- // A function to call when Dojo Offline is ready to go
- this._onLoadListeners.push(func);
-
- if(this.isInitialized()){
- this._fireLoaded();
- }
- };
-
- this.removeOnLoad = function(func){ /* void */
- // summary: Removes the given onLoad listener
- for(var i = 0; i < this._onLoadListeners.length; i++){
- if(func == this._onLoadListeners[i]){
- this._onLoadListeners = this._onLoadListeners.splice(i, 1);
- break;
- }
- }
- };
-
- this.isInitialized = function(){ /*Boolean*/
- // summary:
- // Returns whether the storage system is initialized and ready to
- // be used.
-
- // FIXME: This should REALLY not be in here, but it fixes a tricky
- // Flash timing bug
- if(this.currentProvider != null
- && this.currentProvider.declaredClass == "dojox.storage.FlashStorageProvider"
- && dojox.flash.ready == false){
- return false;
- }else{
- return this._initialized;
- }
- };
-
- this.supportsProvider = function(/*string*/ storageClass){ /* Boolean */
- // summary: Determines if this platform supports the given storage provider.
- // description:
- // Example-
- // dojox.storage.manager.supportsProvider(
- // "dojox.storage.InternetExplorerStorageProvider");
-
- // construct this class dynamically
- try{
- // dynamically call the given providers class level isAvailable()
- // method
- var provider = eval("new " + storageClass + "()");
- var results = provider.isAvailable();
- if(!results){ return false; }
- return results;
- }catch(e){
- return false;
- }
- };
-
- this.getProvider = function(){ /* Object */
- // summary: Gets the current provider
- return this.currentProvider;
- };
-
- this.loaded = function(){
- // summary:
- // The storage provider should call this method when it is loaded
- // and ready to be used. Clients who will use the provider will
- // connect to this method to know when they can use the storage
- // system. You can either use dojo.connect to connect to this
- // function, or can use dojox.storage.manager.addOnLoad() to add
- // a listener that does not depend on the dojo.event package.
- // description:
- // Example 1-
- // if(dojox.storage.manager.isInitialized() == false){
- // dojo.connect(dojox.storage.manager, "loaded", TestStorage, "initialize");
- // }else{
- // dojo.connect(dojo, "loaded", TestStorage, "initialize");
- // }
- // Example 2-
- // dojox.storage.manager.addOnLoad(someFunction);
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // FIXME: we should just provide a Deferred for this. That way you
- // don't care when this happens or has happened. Deferreds are in Base
- this._fireLoaded();
- };
-
- this._fireLoaded = function(){
- //console.debug("dojox.storage.manager._fireLoaded");
-
- dojo.forEach(this._onLoadListeners, function(i){
- try{
- i();
- }catch(e){ console.debug(e); }
- });
- };
-
- this.getResourceList = function(){
- // summary:
- // Returns a list of whatever resources are necessary for storage
- // providers to work.
- // description:
- // This will return all files needed by all storage providers for
- // this particular environment type. For example, if we are in the
- // browser environment, then this will return the hidden SWF files
- // needed by the FlashStorageProvider, even if we don't need them
- // for the particular browser we are working within. This is meant
- // to faciliate Dojo Offline, which must retrieve all resources we
- // need offline into the offline cache -- we retrieve everything
- // needed, in case another browser that requires different storage
- // mechanisms hits the local offline cache. For example, if we
- // were to sync against Dojo Offline on Firefox 2, then we would
- // not grab the FlashStorageProvider resources needed for Safari.
- var results = [];
- dojo.forEach(dojox.storage.manager._providers, function(currentProvider){
- results = results.concat(currentProvider.getResourceList());
- });
-
- return results;
- }
+if(!dojo._hasResource["dojox.storage.manager"]){
+dojo._hasResource["dojox.storage.manager"]=true;
+dojo.provide("dojox.storage.manager");
+dojox.storage.manager=new function(){
+this.currentProvider=null;
+this.available=false;
+this.providers=[];
+this._initialized=false;
+this._onLoadListeners=[];
+this.initialize=function(){
+this.autodetect();
+};
+this.register=function(_1,_2){
+this.providers.push(_2);
+this.providers[_1]=_2;
+};
+this.setProvider=function(_3){
+};
+this.autodetect=function(){
+if(this._initialized){
+return;
+}
+var _4=dojo.config["forceStorageProvider"]||false;
+var _5;
+for(var i=0;i<this.providers.length;i++){
+_5=this.providers[i];
+if(_4&&_4==_5.declaredClass){
+_5.isAvailable();
+break;
+}else{
+if(!_4&&_5.isAvailable()){
+break;
+}
+}
+}
+if(!_5){
+this._initialized=true;
+this.available=false;
+this.currentProvider=null;
+console.warn("No storage provider found for this platform");
+this.loaded();
+return;
+}
+this.currentProvider=_5;
+dojo.mixin(dojox.storage,this.currentProvider);
+dojox.storage.initialize();
+this._initialized=true;
+this.available=true;
+};
+this.isAvailable=function(){
+return this.available;
};
-
+this.addOnLoad=function(_6){
+this._onLoadListeners.push(_6);
+if(this.isInitialized()){
+this._fireLoaded();
+}
+};
+this.removeOnLoad=function(_7){
+for(var i=0;i<this._onLoadListeners.length;i++){
+if(_7==this._onLoadListeners[i]){
+this._onLoadListeners=this._onLoadListeners.splice(i,1);
+break;
+}
+}
+};
+this.isInitialized=function(){
+if(this.currentProvider!=null&&this.currentProvider.declaredClass=="dojox.storage.FlashStorageProvider"&&dojox.flash.ready==false){
+return false;
+}else{
+return this._initialized;
+}
+};
+this.supportsProvider=function(_8){
+try{
+var _9=eval("new "+_8+"()");
+var _a=_9.isAvailable();
+if(!_a){
+return false;
}
+return _a;
+}
+catch(e){
+return false;
+}
+};
+this.getProvider=function(){
+return this.currentProvider;
+};
+this.loaded=function(){
+this._fireLoaded();
+};
+this._fireLoaded=function(){
+dojo.forEach(this._onLoadListeners,function(i){
+try{
+i();
+}
+catch(e){
+}
+});
+};
+this.getResourceList=function(){
+var _b=[];
+dojo.forEach(dojox.storage.manager.providers,function(_c){
+_b=_b.concat(_c.getResourceList());
+});
+return _b;
+};
+};
+}
diff --git a/js/dojo/dojox/storage/storage_dialog.fla b/js/dojo/dojox/storage/storage_dialog.fla
index 1273c10566d2646702e58620ed458dcbd54708be..8e9a0936dba0de8f81796a2fa571b68d35c73d39
GIT binary patch
literal 344064
zc%1CIWmsLwwkW!Ach_LSJ-7$=;O_3O2_yt}hv4q+?h@Py?wa5b5(s)1B<W7~?tRWX
z`~G<EeJ68$bFNu6v__4pSv5wDkD;t(R^qM${&w*JzyNpmFaXG3>VAC(AOiq?pa1{}
z@bw;eJyiJv%K^YU5O@ax?_l5^0{R{P`}+Upr2w!6{+s|r01<!<@ZSO8{&!dSFE300
z#2@_&1}xhZd8ijTjG_1tDm+&d|AFMi_hF?n6$J3kgNWGpJqXG}9o~145K#JqT;s>5
z<NrwZ!-Wa}{fmG7BU1YbQv6Xr$j^VEO9BLKKp#PJ0DXWdP&yHS>3=Ny;X?cm<Z}S4
z2H?MgWPq}b0Omj~{xc1b0iciV`E?xrck+M5<Ns&2_xB(G1b~pRt)a8Ev5k|QzNs-5
z<gd26zq^N01Q<T{+b`AwRzIo&`9r0j*TXvp37>Gwk22Ix<exVH^p}cXsQ^D4_6QIZ
z2^Rl}1^N>O<UeN!`IGD~P+%GCSF(R!_=_ID0)AEJZ!oXF-k?DE_a1yOIy68?(beR^
z-jGm#^$j2gNI`%zaFjSbjv0_go-q5W{QqR^`sqp`l%K}_p}=3re<=66|NnRQKLFzY
znc*KU$baJVH^ZS?1Ka@gK*zBC@j0;tSOKSXdcdzV4<_^$0&oGe0K&iuLm<fdk1qfb
zu)Q|Gb`t><fprfg=D@Nk5TXSz05a4E!XA9i8CWs~mQ8{6(vMv9fujD2>N&s;__G4m
zJm5S)9+V&g%6=&612JTPPs2xLt^csO7C;n8qYva@2E>&Cr~#kM07l@C1qgf4R_n*t
z%LIsT3e?Bp7w%dBB_NF);2H3HY5~;rp=E49Ef@hDKx5DYORhjVZCl_MP*o9fHyQ-s
zmNLu@W2H4~UwwbCO-~g~LZwjbGc7`pM?2I+I}lLd6CkX<5clqkSa*MH`Nh$@JHnM)
z^Z|17*q$JS{9G_neG+b2Wo(2LfW$<T-2!>(QVr`~9pnKz;$D{7G??E+jd&6Z1TM?+
z=<uuKC(Sgyl=#_*H8-{^E$+`go9v9dvOU9w*Yyrp&Ey3o)hJbIhJ6J>1WG|Nt4DaR
z)8>KGv~W*SrS@w7iSC;(e#bVitv13wgrrj)5%N^tgxt4Wmh;Q<>fN8t>a;`F&d}o*
ztVh1+H9)xm6RYrSaO8}cTAM4`j}JzhS3oK2dJVqE(PyfMq(1{_;#%N;&3RjSizNHn
z!Rh2PzdgOJ`|Z5#&8%O)Wn4h|%|}&!?yst2x9{JUFI@?x?AYU5t`&4&30>AsgRSk9
zdb27xNMc;o6_2-1!_wh?71SrhqXT?^bE$+K$khRe);PpK<2c&sO^9$fsMl&8B{^Z?
z!%e~v2b67nG~|RAPv&fPnn|{gh$Y`M56%75to-Is`qgP~?wf|&q%U3fH;df8V(06_
z5$T>=j$q{kl~w$UEcRm|C#DKXb5P_mEVMEuI!VivBbWykZ=aoTBRA*eaDMAZO~1Wn
zuWvv5*qN#8X_`FKbURp=W5jp&mT5IB;n;X*lkt<rHskT_+>}N;D%}eew%67Bw!0y#
z(X{oRdbIWaUzQ<B-DzGC_kY&E#W+vSzp91l;MA&4s3jNGuS=-TJIsm`!WqGVJB#Oy
zan&CkZFCpFa<E^aj?EjLYKi&Epf2Z3gT`T&#z&OQP9vs0=k?ijEhk(#rPJQUxys4}
z#n}Zm>R<yNz0}<m++L!C*;Qp7g)%v=2x5EQg3zTyYz@%}9wt8zq^`63gm@x7iObel
z+fBSCT!nha`!WSR=d_-P3bCuq-D*sO(V9zKec+Sl(wITv3=Fa5`$`54Q|cL!#UyTP
z6$XJigTyjc70PC~d?{!G`vc}61}*})-h?WXgN=qm4mnEgn$h@<=L8#1iW3aYcCxf<
z^X)vDKS!zq<^?^+Oh0?!jtSV*9n7hx^ragtFcrJ^IoQjWSj^CB%2BUqjuMAo*uR{y
zw`L@Gl?QG50>pq*oXGTfC5yyrzZk|l_?*dMts``>5?CXXl*!mnYa1zN+ag`&#gaow
zg|U+Kv@RrDN(004zPw0=6-HhtK|&5r5<YH5S-TJjE+C$kx97zax3;7~n8Q2x5zIvI
zQ|UhSd?siE0hDZ<+E-n~L+jTwyJ)_2v-dOQ!tSpZ0*|ZJt*WrvKp$O(g_*EIV(0D}
z84X(RZObs$<5@=3z-R-L!ZuIu(IzG4KL_X1hu?aWMd8l^PuIrd?!6^~7*FiwE@Gy+
zVA!%RheRyAUInR57Kg&wjb3s4iq*g`Fi;}W_ekcMQ1@35RAwjg+E9|tFp9Nw+v#{N
zJ9vj|m@S)WjThs^Ug)ljL_5s7O>SeEMCLgyDK&U~_g7=^MBnNy#A(+|1uU*%z*(K7
zgEkel?F;lVwZ?SV;>$X~bBH|Mf`mKM7&;Jw&I!7LSZ0#RS+e_7^WLoV2pZLaFuh6j
z@|jFRMQbzImm@5N;hVtrIfY^$JJb{NF2e4d&pLif8Y?J9<zzzn-UXEabEdMWFghzO
z`t@`H**bSAvM!y6jN4dJ4RWg=Ek<?mf-lADZ0>N^Ca7VPdFb=6Pa>qQ`S`{gpt-n(
zry1dSzohvhh|eh9E`&|nPWwW}UKz*s(b{m|aEpc48eoof@cNyzQyWpiD&VoK20Z^L
z=BDL&nYjwGb48}!lIfnH(*R3#>?W}AdLFv)%wgQ|xI7B8c4vRwily*5p3XsJGg<S7
zE6MTl-E1YLrFR}ikM<igwKeMorWH}Y**AtQG6DX6X}*+`uT6c)yMr;Mv!sO2?dEha
zY`*#@2L(0h6{oH@R@{cd*U2dD(|yjUF*aBohh!xFoS=FtGS{&aq{t#4k)YZKEvw=?
zfWrv3uV09?p^4oACPF#0&AjI@t+Kk99i<Pli0ReI7?2oa^f8yjSjE6rOkr2Q(f>Va
zdyuP+gi=g%Q6`0-|7K1M@zpz?MAXv5^9YR+_@xMSTcLp<LWM2Z$oEA<;fE6InC*n}
z)~o{Cxq+dJ_1Mmij8GlCl|F9;>)HD<?;F@DQCFj63!lFYJH#aWux_dCL^_ZP{Xzh4
z8~-la?0Kjriec%hJ3)!I^Z7m*ig@!>5T5vA;FM$Qyh}Spnv1U34zGE5k%osYOEhZJ
z(yqQlhc%y9m{E<vC>3ev)&UxG+3|}aG8x)kh?7u11;(0-R(WwMt=hoJM2I|=y4!(G
zzSjj%Eop%@wYTsx`bik0GN)=zgetT1wo)ChHKTbhRs~{8(W4O0S3_1~+s)7dRrFru
zx6sNii{9Ai-?qLTca$sikl_-KL0|=uN*y<FlPwF<ei8F3$^SFcyb)}7KZPZzq*csV
zj7YRP9vvOmbZ%{Zz7R82EpgnPct!W;6(j}5R(VF9JML(fX-JJ!6`NP<r=vpXW1IH2
z@#KkKohi7)oL9V@2KX^fr2dJ5q4~EqbVk=NZ_1nuDu?(#WXz@nDCOLR5-Vn{od@(B
zDdcx^+S=3+kY2TYVmuH?W6P$U2@qT;xznv3Fwy@=98~ub6-S@kPM+zW8Qx@#!IIeG
zd3B3a!qc?=aiW0D0L9n);y08K@s~_*w)#;dpKbKrR3~r@hQU%B^4O$!=;*B<pZ0Qe
zT)T4^El^;SqifWkyAnwDH)k22U@sFR>IMVyoT8wmU%YT#{W=_%UiL(L`)(qJ^tkDb
zo5TuYUGZY4@t%%v28!<!nh{LL1bIT55nZU47%vI{1Qo>yWx{Jg6lq>%E2;r2zt?}i
z*MGm)f4|p%zt?}i*MGm)f4|p%zt?~NyVid%zkU4F=E)t&m#WYG&0tsmMneNcZX~&J
za*5%iNxqQ8cxQ`CSEXbbbK=;Dgy=gd(KjczPl&SL@SX1rZQ2T7q{fB1_+h7R6i?_P
zXAgCUx-eyLIwh3XuJ~uzfa`=gZ_KKoZW1(UiNqt<dFye7yIm`*fg66omY!mKE~91U
z+?}IM$sOOYL_jx!k$cIj;Bkf28_~k*eh^lB{WABGrfcIJHD~b|9BR8*(CR3Bx!!36
zCsyPb0`w;Y90sQ^yp9kvo_8az{1e~&w2xndN9uCfTrjocY`8uZSV<e;b`tw?SAD}$
zxdf-neK(0DG`s6L{1s*~Gr5wSZPv*-AGwCPp^0X#+_IKGs(6u3r5<Ue4U!6=rM)P^
z*tjwS9RAl9hx_np@_FNec_)^&x`nqF9hFibifWyT<?xAJ!j(aT$#(Nf@p%3CsFCsH
zouKrpppu{IWT=Q1k6F(^DLEyr;*XVY^ecI-Ya-doA}!J8<Q?i!gQT#-GZL4AB9|`W
zqZnX&iz{e8x)$qAC$TYM6-)YlAQbdQQR!|)+fXpHTB!|IZdM|jCYWo4WMScFF2lq>
z`!pv>GW&Uyo<+mzBS%gBeH_jDw;8vs@kw?PGdiO?$MaXmk^3lu49nrJ$G7=W3~frD
zU&Z3uxxLMjE3?}POY7=qJT=?kpJ2KTO!(Nbz7G5<8%%JeA;_|D{S66WKGgrv8f}nW
z&b5rwxr=rOzgW<Jh3EaO1{6wD_`8}HwC3EsP)MYT{gPDN?w4HH492F#=BU*{TeUOx
z;H5|fFUp*J8^ppzhpV_XGa+)j87*B1O0EX`nn*qd7tFJcf6)@5s!JXy$5KpV3)z7m
zB*Ap_sZX%PHU~RnRG^NP5;^}e{&FS!77uUM5#jtsMWMtLJ^$nFe6Hn^nTP_7>uOAd
z@7JNQ=V#)vXV)^sRI`+ax1Fb}uXid%F`^q@O!X{}-;Tf7ZlNKz-^o69$Ob!Xy3nkp
zSrT9KrMWlU%B>(_^Mh}1yqYC8V<bDA5?m-7bPQf#CS(ir7g!V^6_A@>5;sQ1+Fgv2
zOId<9f?W~NNTNd)ohQ*Hp~5B|ypWI|QNG|JM{j+XRCHu<K(%&mhjvyGq%DGWkMCWt
zXyzJ;Mgt`;&Ad21C;99d_GWg9gSRqEKK@>)og%N492!Bj9@aLgIFY<|r`@U2hR-*w
zcV?^>*%!4DwrgKBLSBCKJS@&)@<I&}m0Q-##gqfH1?4@6lwN&b&Y<|Do%S2EXQGjy
z_QJWFR7(aqf#aZ{`qQ|#xxV13_KX5&h)@`q`fENjkU^ggp%**e&==RD?#P5XHGDRi
z>6VEcNMWkR8h=;J4fmPbeQIUisJ+aY+zIz)I^-ks-UMX*OY=R0YFp+qEvm++u9;Tu
z$*mn(CRdkC{mR3f{YE$}hK(d>lo)-HyMu1MwBt1MB2$&0jL5mVC4@TD@)ILuWi^fx
zB@20u5}qlKetjEr5y&xHu0X_NE__3)!yPRNZr}UOORNMACDZ<D439z<o##sTvW5T#
zpCfcP+klav<Z=aU41b_w#LUVbr@aE{ZCWl^NO(S@Ha<7|sb_A3cUV3CX&RA}vq0$7
zTff2@dKZV*PUH^Hr`%B7TlNJb?PtL~?{dMyu+xgNZrpP7$)du!NC=2*R2R&>jU*jb
z8xx2w#_NT0;5BA+W3X;HPk9EQD%jR`i`|klb9+>2O9<|?)6h*BgC^~@V-fu(UuvUo
zJv)({qI869#r9J>Vz3CDB-5s3YML<$rcB5C_B9s{$-ArCKgZNsZw$BSa|!Ls_p)y+
zKYF-Fit>E9rfXm9Nrj$Y6&v>{wlQYgAFMl8yrZ!u_gRS<2*h&uBG$3B*?6HUKw!DB
z?W#9%&bOqHxZ-a-bdB6etH?&P^?~?G@oDH=h%cfM8B;nvgO{DfxZWXAet-;INN8q~
z4&xR%RRlp^+#+p++Dhm2mq#kZadGkWj+ja%A(%xxrm91E$s-ZkWR+wR$8lP6=gCV$
z<%>uedzV7QRAzu({Jlz)UHmP{e8vRj486v03P-fPuaS|GYYwHcL_R&Igd8N!j@HCK
z5EBV@qeO&KQ2!)1ve?j|UPNve&NW(qt&IS05m<D@!aERRC*2F?rqRzUz`xsq3OCji
z`}7pfQ-o)lG*6EEb^lW`jg&<H5ENm8ZmJdj-V1fh6@q#?ihMTEcWK+7Lfi$Dd)SnM
z#>mWtLKS+!%PdVkA3#?b_AnJI*D}zd=Sd<)pr#jc7I77*JyY_M)1THe_QQ{_9$%L%
z@{{7Sh?B1?R9_r8%~z|PXO>><)k2-;emPM?017+2m!iH?PCY7ecAX~KjBgW(mOUJo
zn$54Q!fb3*6P1_PJm|fo?6X*Cpj8X8&!YgFE`~WFCLg!%qVhVF5nEXsJ-N6v5P!s^
zlv<<daPFuJ+_;X#=aaz(B2IBaGLe!o%fKXl1VMQ$EZGN~n1k3bT0EPb5$e5^I+NlJ
z`ao(lTq<I=!8F#1XOw+LiY38uqZ>sUIkY;YM>w@rh^QvvRp1!7DO3hER^iGR;LmUn
z6B9$zeJir7*5jxlrbMox2unv<Ut{?MY3BH-O(n>ljy0%Pq(a;oT_ER4>3^wFPwa%C
zI!RYVH|2ck-(l{8vMAzd0^Gd_)r{k_A7k;6Sy=SnMVw*9k*wc<Cm^RQQ7aSA8W6$i
zMptS2QPHsLfc!{0%9$HJBptyYlaMfvWodnPV~1ZWL>=_4e_%j8Rw%lffP?;;(}Y6$
zB@u}Yd?$nk03@J)rfI={#ER%O{*oYtGXz)xYypk{<G)0SKw*AlTfxnL#FL;v{*veX
zo?HDD0r1sF^t}JRO*#hsAk%RazV2u2>VXZ!Lp0|hW@PmbjG#py14ibL;hu*O&?Dnt
zNC0pm%?6qfhN5x!A{|;{t)aiNM*I^`?lEZekQo0N(t-m2qv1b<fm;DVCP2`4Ar6o6
zBeS1nu!rW`eSe2Ecs!ls^cb0XtobiR0k-3^lrpvvCDMCVb#^v|3x8D-+VPRf7)ast
z*hDC(zgq#q<S~f$fcPlvUq}E)3}gKJU>cHPr+z*jR|lrQ3V?i2(-io7p!n~Z{{<aj
z+Mauetezm;wpTfvQiX&6D`TjK);+Y^>fh)M{t#(&{>k`n=l~Srrgt5s3SteciW~=f
z2G$R{yZ|=H>@j`_@>7V*WAB^)p!;uy{1qJ_Of79#t)?WDM|S0cSD6L*&q83VAKgqG
zSoyQhp&<V*2!!#wh<`u^bc4!alr%R;6$Cj8#F0-~Jm{qe1iyUL>qkd_r&9$!jUF}l
z_agoU6+jHf9wWqDED_t>az$jtko<Q6KQE9U!Qgu=P@c!pXASgO+sDYP&Et78>&G~(
z{vT0R(Z{mkkKx4&paA@|Cj}7O@dv~jh^Y*$w|d0*JLCmWhVftGtiNJ?Ka2A7M4R*<
z<KzM7uV+;rC>{dSMvoC(J0LIPAMbx{h1{bgvqugORD1wf;9ST9gu48|c!(U^{iuI{
z*gZy(zia6Pa0kkHaK#5(@B&Bxe;-aHK)B1}sBr#)VfZ6XZTSde_(LMYzmfSrm-s-(
z^B1fBl|t~*eh)Mcarg%<3?8H4{|;*SBTDZ02>%}bH~P`%^p6@n==MDY@SXO7$^lqs
z4{Wvh<D1bV?N5LB34e(6KlFtakjDf3&-vp4!xiu_Z$7l@-{X9b_ZtHTkL}~h#_tv}
zf9z$eA2_yv@AI$uqZO?FrpeEq{Z~tyKep;m_<!FQMvt?;K9IB3U;Oi5z2Mir|4(=;
z10?=9S?TbH&Hrl|4?gx^weSJ{tJnPLnSa;pyN5CS!>sTC0sOh*P%?IN`s)G$;qMCw
zFktZs`1djc;`e{L$JK<|A8P<?0Q?C6LKmprgHJx5A^n-k0;L4}^#c9#RqoNr93N9o
zfB*VFxR=?Z(nLR;&=~O7173emnf+)0*uNgd`hG!tUjrN+9o_$^zDNIaDh2zlvm*$Q
z1&Eg}u@y$<3IM<e0L1Pw>JmS`Sz&xP3dkP^v41eXzrW`P-auV`E;CA?|IqQC6@&rU
z6-2-Z#Rk|8*T1yv``79F5dOaYdKm0~uE2;MEkg9z!QU<QU>oiql;2_BpAYsiesn^k
z#{}N@G~R=(hv8)je1C8e=O2l^pBf+lzU%g2^#|R)r|kaJ%kfbUhd+)T8vfgK8_|!X
zoz>%#g7%U2ft%qY-OsPE@h|$?KI)<WIFMX_aM%Aur+;TJ{l|}+-6QV9;H7xv_dl~B
z0^pxly!4MxnMX@Kz=R()c;LbdyiFeMXZS~(DFIY~S3q7ck9ZcqTLd`yIz6`Z`&1_J
z<7l<R<J9nA3;G{vQY#=e$)jgK(78P(B!9Iv{bT<=^ylBxsSi^N$)kmB9w!?spcdRf
zEj)qGf4Y7ifc)1H@#mm{dst6NKX%50vJYQqknhRo7r@^yR3IR~l0kv~!tFopf8$4g
zvib3Ge6T3d4-YW;CH>0*Y~lB5@c-7<|M!-D(8Kf5_a1!YpY>(?Ltm4}N&8_Uw*HY=
zr+i#yeAkTRcl`H%cl`JNmHq!6?4NVP@BRPp{XgLM{{L4&zxV&Y_y525|G)SDzxV&Y
z_y7OV{-2EP4;_E+|9|iQfA9bQi~j%rx&HsRhkAaW|M`9X=lA)a-{*gRpa1#adHyGB
z_(eQ-C0mB<Nk{&m5EJEDpEw7N;*%2R57?cXAP~=*x#W8qjG8TQP*A0(N(MufO)0TX
z1F)B?9kK3gkKcmf6APnfGBEL`DfE%)QX^kC`(hoy?X-X<eg;)4Q=3wO0Lwl&S;*2n
z(lDXlozL5(!|1o8CuKVf`do2xPd`LkYTeJ=%iAEkOU&a2u5)?rZ`yChMeH!~5_ec^
zc-QCIXy7oy=2@O6w1#ogY!ZIFr!|7-P)pla|2D+(^3RZ-LwHwBEp115=U?1B7mZh8
z<IC6!O$rpncsxB4ahF_EJ85DplA1cL-*yHy9jKqy4Q^W3ihub+JbtEQ(E_VzIN$z0
zxeaQMTrvkEs`fdF53;0-Dm(4hr1J_cl5^dFc94j6XTDFI5$z!9?O$eh%U3sTg(AfX
z-t6OEY94>Cx37FRiXo5Bfh1Z<=1?srpj>1X%`oUH^`31a5mXFU{+ncdK=E@(1Q~pu
z0ypn{?T?mltr@6Tq;EGnRE{reN;|XI+%*~pu*?YSBG=?mB`~q9tdPx<87Aex<_`(y
zlYNY!a-<g}@|uc3(wD*^9qQe-T&}h-c^v9lq8Ha=nw=|?(ZeZTgfYtzD2_WuAJN}K
z&%!ww2u41^c6qX%-^{DT=oKJeDqGq-XZkhQSh?T&CcfOtti3`|NPXRQ5XZJzC@lbq
zOr%wcU=>Okqlf-m;BqKcnPnp{j)z8S)KjG_0V%2JR*==s7bSvfT}uFG2-H_wG5ae<
zNfxilW^(XdXWXX*1j5Nn2IO5ogh}@Majhvc`_?)aAhtiJb9E>8h*Wtdcw{I|;Jh>J
zN9_R<EBV4cH^PmPf+_uEr`NMX5rGtmLddqG-p#f{qcszWqVXt5^_tOg_l2c1C3GHF
zRp;e89>?nX?qZ-LCbE)sKT4DFI58hM-DhM?uL4-;2zO0C)m7oQ^Tli(gxMlGXihjx
z<XFnYpqujSm5yYu(XsBan<`&x*NJ){?hwUaa2ALoipGG{hCOZF5I#8Nz$QiP;=;j-
zU+S1Ty@aW$hH)y`|IDIeie$NkAVX74Dr1IIoh|)wYlHe_Rv^M#zIHsHZkxc-V-Q1q
zBp%Aayc{Ufy=D9%WK`uyMNk8lw;!F6>A<66(si_?xN-)*EuoB@G7YT7EMMrEyT(N4
zzDFVrt}*m>QFsqheiphPuOLHjIT|=bLe~})n$mv66dGG~<_}=UAMD^^@qtrQaMoX!
z6Pjz6`XHB!P$tL7f{{dl6|e=1ov=DNf}B5zTb4c@AWK0S+(|QlY1c+sG_|IIjQ?h4
zQS(@PNi=qxjP;%fU4)CyTUL7FTQse8>x;lov#$M?A}b2Dm$xMa*Ebf>@`R^=;7LeP
zc+Nn`N{#20EQw!X?Gm<R9NMm9R#x{>@{n`3IO`h(4+SWF>3!$mi_8jaWHfs};C<?x
z>h}pb+(M=kqI`vzhLvXC6CHLc8N!cV)VOYOrR2%usRmnzx)FixuPaJH@tWoE-Nj|x
z`5qVBl$_2*Le<P1!Qj*3Uc_4Y=ABSV4$+fX_&mvqgN=-nl)&d^FUK9SYKEz_cCwUS
zg+uMP$sB|5H`lAZnabh+l=X$+k~?O{I%Ka10mEguCUR8Mu~$<kP(XF2XR#D{927xu
zFkeK8X+34qmmzDJ_9(qP#P0SBjZwaFWUJS!Jbd(0ymQV%rM_A5SVgaOE(1SEcD_{r
z6`O!0H5Qd)*`(N+7^&o)PYcG1UjAz>J3Qs3HeyLTzjZ(MO-Z+Bd^k&?K0(f`%h`Li
zSt!o~owslo>~p`y-Zc2ky(-+<29+@5nti*bMaa}R1VKo(#rbxFU)je~@u@fjaV{U3
z>gBs_6;_KALvORt374mwA!Ap?aRsw0n<H^t#d~iV$kor~1k&LkoHz$s6xxjT6*umw
zNS)qe-!HBt3-mc_LwUCsy;i>MYKtNgh+LEPzLt$bbqypUD-w7cYa~(E0V+pC<V}eU
z5t!4`U-dLbr%O#I!NkgapJU~aLpJ5v6lY>iOq$E|(Wj@W!*giq=ZVs;4m?wz`1lSv
zLP&?3hcxf+{k(-66DysS))wDgue>>KYu14qtLz|pIdePu@)FD=IWE%)Arv3I>8nru
zuJVhv0}1Jar!cjy9{3Y(B-Diw8>#G?Ybhmu-Fm}Aus1f7iz#_6G?%x0?<nSFm_B-m
zoiM$i!6@to1faFR-SgQpTt;fxHPKX=%C+&-F^_~qnLLpPMZh*7cpIrl6s>RQVRRRd
z&hnz#%Y-%i%64FutH_p2DErDNTJNh3y=XwAm%2td?hsp^{;;CNONEvI-xIvtlY6-L
zg7pQ7f?U&00hXx_7OmKd`ywTATN=mC7Om`gGp{5rnV;8|ao5`POgFu)wXrX~;H+JF
zqPTynwhuac<)ygqBU)-KT8e}kd!2d2Rdx+0yPVAAY>VrBKbhUs{&D(NZrF_9H~ZGP
z>`S!bem7GsUuf;hXf5By^p)8#2fsz=XYASA1jP$OCf?WZuS(<tTp(q=xA+Boa44_&
z_?#j2(|7FBcN!9@Zd4p8_g;oXtBe=ElMRH!uZ+_=8GSy#hqBKyhy$jvtMUvs=zSv$
zYu@z|+9fr5L1*U&v&%V|8Q-L+O?UD!gQn=Yy!Rh^eKB=OkV~UB)o}>#82n%*eK*rN
zYM_G1vBe5z!l(A^2T0?gPYw-H+fiDnZ+22qDH^;dFUFYcsZnm2SER`{T2UGO);7;(
z?s_s_J|p+J@D@z|X62@?lfkpFJ94NO;YblSwS;&`PrSL^Nm?I<;|FN#(pCrMP&PaW
z68j1xu-NNNT9#e4740S!bJYZs(fy)};Z6Jm;_AoXLRFH(K&D)HS*mX1(RG1mJF#5I
zV@BsJq?r_=^%D!rfj6d$VO8o7=9{t<;=YW6OJnM^iQCa%<~&s3+1pSI+3z7Ft>tD>
zRHySH$JXNJbt<RxQ8KT67cw%FgFniAf^NuT)f)M7$d*Z=s@h!<ryr;r!Kpk?yzXA&
zCJ|#I(1NduCsjG!Z>q;mA%EHk?oE0Pa~wRevc?PEN0yEB#`~kt26Wq2?-cV1=Xt_s
z>8-6X$a|+X6>i^A$m6G!Q?6oLgCIV45X@|y<$C0MTu;5na0Xwf9jRt65%)y<j44{`
zX1r+=zxN2b`^J3x8RKfVcv>HmJJvy<hFR*&4%I`Zji#N?%yd@o>tw?L*YF){s?5Mp
zqRd3lysllfs=W)l$s4A!Q_SHzf6Z4RGjeG2?MEiIy9cESw<8Vj@tCgJmll#6zKRat
zd1xI1suwq^@EEVzH>;AFt~EthF@!ytHKup#V++PitPah<#NjD~X(a<k<I}DkP%V}(
zlP(1}a(1(NcWTzWhOX=VuxUF%R2@X@WuI61gz{4sB4Y08C5AVL^{OMnO)`DXp0cb{
zPYF^I@i)=9NSc6`Vd!5u$N-~?5}q`YRGc0ar{Wn9KT|xvgm;aMDIv<UgFr>-M|mne
zMQIVphvf96kv6(lrC8m{*+Uw%7L$Y1IxWXM|B}*T+z-!rou&gJ)-PFU-Go*vRai4*
zVMo&~*|x{Jt#^5cQmgWItI?52sG|z+GeY{PU@snTkg_~?s^q-$xd}sPIPNDR8~s3v
zhAL$8eZp<>JV`|nMK^E4v9b<PHD3}kze)~b#Mn0q21FnF4VSE+%)gNcaB(s=S3ZR?
z54IkVLWn7Ozc@+G@EP!=ex5Oiw-^db9F^O=c&A5Hd1*v+8C22<^p0R!{HD#NV)@``
zJga%g?RlzMewprtTl)vYR2%Amz+-E&B+aMj5sf;h3Hx>_2=6&;C9d2CUM(YAga*iw
zJ}+Q`6f7@n&bvHHDrnx}p4XQ0aHX5p-cQxKXPc1KJh-Z-Yq+zP-(U6L)N-KctYRUg
zm4cx?bggPOK3%5EKH@qua!oy5c2;m5I^N21eQO>&CvvP|H_@Dh*$UU!xFPFpY|Nvk
zf~uy1yR7`G)wOuvlScP=@#N(y?yJ^-9_n4Zwp8yu_B#b4p*Z?)ax$JDnn4qUlqK|%
zx&qyHBLx`stSEA0TYR+VIQ+D0I4rP^=wz`#D6ku^jcy5L=+D9-!%(*{jb8DrVH!nh
zp6FskP%YcoN_^b9fd7V_U+;CSx1V|UJcb>d>>aZFN?9li1z9*xPl<QV9T8$8x0aD_
zAZ;||7(TfSqYT)(fz^scvma(M`phzQt^rHo9<j)qrqTHD9QllsHA}j|s4qm~&*;Kt
zGs0&eB$7V~AM_<ST^IJXBLvbBz0J<@hRuB9BfV|rpi%Ud(M%<vlZ_9aZB4&|?uxO3
zZ~UA8m{I0R7?uLk`*cthjN5NReU{=DbK&nu!9zYYtA=1%Zf94~xmv~LRtx$oNl=X)
z#GZ;$nDp?hO$Vc1%#=fH_GUhzc>md;p=0p2`Wa{zI*aq2%x5Sf%{NVIa_-1aXk}y(
zd9oE~*AFU#1|(oPHNI^};m9Ah9LX0Eef3rV<YIp%7Fb@7mKGBULd)9e#gV%Ul|8I|
zzrK@}N)<okl7~}AgNG?@DwXYL32LL~Q^jH!R?TSrR#vo6058#zT;zTw?leeU?Na`D
zL%NdVslsmXMym@-EKZAM@4&z$hV7Py{vaNMbo^BXw6ClH6EyrVdLBJycKH(zsf|}-
zZX`*^g0Cev9BcF>5B5znPZ5={#)SOL(cM*<5B4U^`B+k+wwGOmJjuQ+=tLPQDHdOp
z1ZR~8wyS3$NJ<8CBxGBZN0cKtnP4JCnmXGsffd+8$u%c{Oba7s9GS4w$di8<*m}x%
zX$Defw4}EeRJKJ?!<B~{YC~ni_{D+I?b~1{izw?vs{mS-1JdM#H@W>HYlv>hWo@u-
z@+BQgd+x?;nye8>951JxC8*>q_>izgz@>BWs>7+zg7!we;EhVKZvAB`YWs(cdeNJi
z;8m_uO@`NaJ+|4G)~M}-r;D_&HG6D}FRjtq53}lxrx(%2H9aeYY`0SNUQNKc7<YmT
zS8&6bMEmg0yZ0~B+@S<r3uj%Lwo_7}A{jkNdV@7*bu|%D=hoR-axu2sYDLG|j+DfY
zzC^>-8bM*taR?#Sb6f!Z1g(8@!&UG`Hn?V`rpO)HVkM$Oy^B>7S`NBFabuR^bv{nQ
z?Zzxkp0ZeNar4R(x!G%%ww2k9FKxUUoF6I*$H%qc;%tl*@;AOHI=g#T(v&J|lCo+%
zRW?Vp(3VjV<l;okKcU<b|MEoW)x<b5T0*HAs<lD~f!JF|xA{!Sgy9%JGHPZM(HtF1
z^S$TxnF@YVy_RO<0p}NT8>;GbnC=nMF>F+I&luVF3!=TxNNW|7xG4IF(nwsm)f#n|
z<Xek4DACihjB=X;dTZiyGEs9SeMktw2oGNNCr#NQDRw^tCHHfPB0<}(W-)9TmV=X{
zs*%i9KERM8vJEfJWXqpMZ3c}|u72Mgj1@+75*j5K#bG^MK{A)?Sp7`IjIfW0LKBsp
zZoW=WX-ohgzf@?N9gi0$>SN9+B#Ze#jpA|L;+Jn$AF*HGh9W<E<~TZjHt5eH4f?b!
z5pMfKL5s%Z@+o(eH8I4trWVL&ji+Ghu8tUi_1<=1;%{JEg34OAlulv&5a)`7z7SIl
zLk?IF_ul6T9o9>q2EE*<_mVDHY9c=Egk()K5mZMM49XA@DvCp>UxB)>aq0wflP-}=
z6+5M`KnWc)n72;$R!BB)eY;?;cw3p5m~fBt)XQwh=|C_3Y7*IpKd6QuzGezeC3NFr
zR|Y1`SOAo09tA}1>Z|;W`j&J5hmT~Pp7sdIRC-MuYA6b`YC$t)Q`9S^c~z1ZPvfIr
z7}b}5$ZS&?YMT-MYRoW=TI1KO5<E%S?V+)!5@AY!vIa<|dfS3ZUWOEs9>{_jGp7d~
z5iKmX5ePF9mXxD<*4Aa2LH)e+T@KZ!ijGQYtWEZ7^V1~^kN#&vHiOmU{?b!x>g<%o
zPNK%PN-CsZ`Z|KmUPoLYPQB*Al5Jdz_owhgU(ciZ`tto11;|Q>R(5QqX!3`z{De$t
zWP@20hbUCvI5kTo-Y94eD|2lnu1-QmMD0Z47&(Hpb)yz3EXuYSaI}T#&qcW<a|c>C
zyn7ByB9(Q3J>Q8E>$F0((;lKvIwlY+Hb=)F$a}`KXe}Pf>OP~YT5i&OVM01o_4HHp
z;rr}jnmMck)A*Xt5=;Xhy`obZDKs2*^z5K1)*voSY-^}d60QYA5QOlErol72J5hS_
zKEau+CuT2%)7QHVx7m@^QQr}ci19Nk*`RlZ;&SkP44mFVPNB$g>yr?>A`O{u<!YAH
zx_a#=b=)x%&gMmx>l@hEa6Ww?ZC=%~%#6ggYPX78;BM&nRWk~jRk_MK*t~?x*N$`$
za!%WRrq(8}m(OYf@on#0h^83FXT|~vR-ch45qqWWLlG3Tk`e@^5mMs;w=kvB6@Dm0
z^l?TD*cqi&=r1{<=dp2;lRMUBp$~4=D})$Xl+r|K2?M{8oS1=(JlEGZhcX055t9ZD
zd-u$04m^13l5wA;zN5F2{0@YHWSTIM4;z<SCykH+P{+NuT<%lt7b5VgvNZy`EU9A)
zOYp4@NTiBOi4UN^hbuH0QW7?Xbb?$l!?Wr$lTMRCs81g|H`B(axBd+jO|fh}Yq-`Y
z8Ek5yjm#or)J&P{^M!9KndYd;uE9plrh`X=KP0D86$__al&C!e;k32E9TKoqa;qtM
znUykMMd|CDfvilJD(6RO>e7XWrX3oD*_YwRgyJt~h-QJNHpcBmkdzgrsUFMqf^Dip
z5CxJRSHieTtEVzVC6p}l<1O)3bo^XS>676GGvmlg!u*V2Jch|h^hwSURm|6=-3$07
zx74)5Bk_<SQyW8QQy9lc6U}pc$j5ZDm}QBW;}yn|ezrpKqGJ5FF4`E|8cW^yN!5IO
zkR*m<<NGd=D_&nU<zAPZ_~SMTV=gmvg}B&gjQXN+fEz1olC;7@#tDN?6&l+i((OiO
zKB-zGHOzw{3P9**s=?uGPF^*r+b+ubHXoZBJ48ee710^#NBS-82}qytxfgr-wQ{>m
ztsD01lUJhG`D;U6U~)A<_Xc8n;#(}=-gX5*PJ^8y#m77$%<WfLA|x=c^HcsHLRtN0
z@F=8B{on<JvPd;IS6`tNSB>!#(czn%LU|0Orz4_FooaZWqe}TG?qol4w=5DavvaLh
zh_P$pvOie{fxB|8$he=Pe`yYjF}T~?s-b{QIXRdwh%m%1fwS@QLnMAK15*>E{6H)j
zixWcl(*wlJzOm}8CrQuOms&DikF$MChdXwmT&J^QiDT(7XD?e>SQ~_I;wAk$zWPZr
z_)z54z|2V?BIy`)(6SS1hWndfQKPlZ*CIKJ_4V|sE*-?4IS{k1Y>N{C2-N2^^ZKIW
zBtO(8@8zq1m{A~V@8K;w^JF427l9ytp=l?RUdbhqe)3vJ!0D^s?O<+|uA`+)bCCA?
zO|I8Gwr5>JYP$N+RdOFvZHb~~>nNh!^8~blwHxH0u_({1)tn>Az4g^vzDe(CWH%!E
z7}XlW?n3?XQ;6Dfhz1n6q?W1*g<CMnt4_CTL#mgbH?*eQ4O3Osx*$vgIWl>cDw4#K
zv8+A>f0UKM=O{87$5T#+v;w>zkw5ES#E@8<rQM~Nwo%y&&Q7{n<Yi1ple0l}jF~4-
zq`?SGR`cpsYbNm7vr<dVw-}eCvwd;d98;4Pdyz91*;ieyz?6HifIgr5wOevB3W<wn
zI%>?{X{!^xD}$m|Ezlzptee#dJw-_n-`uUqq!w{rQUnu(9cu?pd%q^oEtEC9^|FB-
zzG)h7$M)nJB%8zmj>h_KyWw5+`N&7!yh6_RI(JxPud>)%tKY@I9c_~xZs#Zr>FP14
zf(g$@SFX}EBhWyFO%dhV_+gsP*7-V2m+@u<@rYD7fCz91?Mc7~y!r_HMhgD=EW<wA
zdglw5uQ1k;hpW-k(H5~#;bGU-{3~YJyXEm%`a=3y?a}S4r|;lfRbm!VJ6j>YnDXwy
ztx&Y*A&C2YIK6d?kWg$77(uda7se@>Mi4DZn2CB#dR#EP=#Smg%7M=5m(8A>(;I-=
zO37bL3mpGxCqaQ`)y^eLkRBmL_|Fb^<ZS!aiwBBh$;8!WyAr{4b$H7hR=w2M!9CPf
z{I2XEj4w;%k8nr?JZRoR=ncQ=G33Ijztw~%%fMotkgi#K?S7c1QNWi0;i=*&&Pn$o
z==Cb&+GnpzUP@Bao?~L10Yw^g9OU+D=CcYUi`enI`#NNuDT7Vc(b!SCz)v-E3E|Ij
zKkvlGCn>({Ntw(B?*50VcuizK$(+5?DEpv8=sN3IUWHQ6Q%-A|Je*yITzLiK9K_QY
z8ARu~+A>dd1rTa_HkKdMB{VX%Pxr~!8LHjSqa;zAr?5#4&oIZf(V&($_pq;H@eTI{
zSI+2grrX)+W>GpE(=B}AYgiZl@Tcwhg2)6j{@ebWhu}Kc(~vgQwfwji?FEYr@9X*V
z7TO#7zxFv_Z+@uZx2S(32O`JI;ba@J`Mg!BUD^RfiWzgGd`~1@FNB*w2bL?wVEY0U
z)%wWYIMghwEA7ofV^o@RzPkkOJSRTBJ^Mbr!IBK*JE72KD))d`WLQh}X-_V<Vp=9J
zHb3vG4uZ%AzE^6mr;Sa;v0A9Pqbd?+?nZYI>xaVAE4kZHk1m6!PUC|KlKlZ?gz+aW
zJ2j_tSZQMxZf({AVYAb%5lLXV1P-&OT|}FZ^q3O{$HkOBoEE1mgsi;gzV8!9L0%x<
zrB)`dH^Lsa4slu$PGW~N=&zV#d)U!2f$-VmeWpGTJ=*?e$50t^GTO@kI_u^-#}}tF
z*O1vtQKx_|&^QSv`?L^d@~zw}`Ba4C+-i`tEjzZGLTVEpEb#C-k|#F`0Td`&?{pQQ
zbfiJw5HyV3r7LfQoOss+h=VnB#!sFnZbBVDLzzd+HNSX$t_!oo5!55E)7pRSl^8I4
z$0iEhWx6d7k&NU&Iw%86*q%`u1Hyv}<Nbv^A@FuIjzQfFPPdA|jm=$<&sb#$TY&|i
z88*iD4E#75`j}3~Dbdc+@+#%xIM<z%*l-7GOH%y=I-9i}Tk=~*+YFykTWZdB(L3b3
zVxF)?zc#_LyY*Rx+oYm96il>FjKT`CO|hd9b4ci(EJ`<8kpnmKy|Z^}EV|b!CsLtO
zcW9Ksv{#E}OW~w_bKv0XihHb0T7GPW$Sp@+9BUBmRtdoZdEfdPF+x2+S4r{RaoV}V
zJrphuAkw>#yhzhUM;OCBAWOyU%FU)gh1yX)!i7o&1c>o4s4qTKU%*jc<iL8$Z@-qv
z^;Gv;Q2t0meXfjgl?0orkXc@gT!!S&<;`GkW`3fM$cyQbC=>zS-j(V2oF-rt>Ja~>
z;t2*KFYXO>z?FBoLjn6GPrxXo?&i2pCst152LX+*90VyF<3gQSoGjQLsX|f)#)zW>
zP<>T%B)i5@cXK3C#!*lPAv`1@DM55+1+>u-bXf(f@|bdk{f1Tj-IXFMIp!Z>(DyNS
z<Gp6gK{oj+33q!JoS`{Z7>Jf>RJK#pI&;PExtZ*W!Cus?J?qT(c>$3QuY<^k;=yxi
z%yTSk^K6SPgp(d6<6|E$gF<@1^hl>EEBzN5T5_>T!gfjVh22Vz6Nnow@0d$%aNQmT
zlFR6_AyL(Z!Xwp!Bh|vA*@7dgqHE`~7(`NjDqA?d7=E*4rEidU<c<CFn{^-161CS3
z^cVMnh6&dXvaG*s;e8lPyUB~@oexsvU8s2PBjjY7au5{Fm8cEsY{QbjDlf4|MrLae
zl$lWiQ?*I#tJO+ORi5cS7%mWmz9ol>B&h<H7}QT0il#Fjjoz)X#NIRh^o=Ei!xtfi
z4vk=l0LzNKO%diCVsvyaxk+deyO#!E8xmqV6-->JH$T$F>WMQ0H}x(c1DLZ^+j7B_
zj)FnfW*~@CWkM49fLEzY8Ulf}fzU1yy@OylNA!fClsb@=$s6bvLzzPy@tBQT4Z(zr
z!}FFpZJa_8y+$<!O|fB2oOgpbX#L=nFd%0Bb(q6@q0c*a3CFL~o{AX_ZegDZ^2pNi
z%UVJk$m=ukQ%bEPU@^!_rzRz&Oe2N_D`qF?6+G<;gfi3js>lFvKV$xIO_m}$fVD@x
z@iMvObvI}B$WDE41!mv&Y!zRK(Kj0Rj9wUk854;rZU@SgD?fgT5GaVGfEN)a)wpf5
zL<s6Jy9nYD+q(BLTbq6tL=@`ndGJ9fsjUfyKOrRr^92LtTL7AR5d_1R<Q&mBr58I3
ze*Stz5VUeNvKXZlJGxCV9Q&9Q8uN-2hHzAJgzw(jwq~udGIBR|D;{j&)VIHXZu~h@
zV&20{rA3u-b3SWCum)Evyv`$iix@Rm+kFt3VF$hvJ;omrbTJHox(W?Vn@nE&ZoR1v
zX<_I6qO$g(+IzfHLYMi*Ow%L8no_D>Vh<MV03?M26Ha^1FCpiyx%M0MJD@?tlL({n
zZ|uFydY-cCg~?SPsYc3xK7}Htht``w!F%@=eGb_yQmf^NQ4?l2GR{#A!nVuFJ9yB9
zET0LZM1i;5#Ai&QX=l~<-P~N8CFB=Cs7fM83ud9Ve2D|ZVm|tdwRje$l3vtE!HTkU
zk;%=zh#h8;3FTosmEn_jJE=&HwMn}#lL=dWR)_JrCNc1YguP{w#4D(T)#oE;HNYpN
z!L$vkc>~LWedHXj*=p@+TLd)pLE+&CJ>3O7%>l*Mw-dQZq<m0{tOnfHd+~(jiR#IU
zeCTFnJzYIJ$y$tG0pE&8mr2ywi8sl&mV7&8#G7HF_uGfhy{m+tsVHty<VTS<6HShn
zvEkk|bL$p^&Q1iD*M3et(BL}p<~<Q+aiYmV9MoZJ4vzA)8dnzH^S-?_uhx^&wgX`8
zk-|*%^tp2#d$+zOodC@=3rjCmh6P-#LAW9lrDO|{&+W3?t*7kH`UgXRnY_8Bq={tp
zeS;{0fX8B~vAJte>AOR6A+OJ3@~WINx|BdJFV^`~E<}b9A7+a&cg37!Hoz#`$S%D$
z0nFsKlrXM+to+Nfmn>>|Ge}Osl?aF^7WQ(=82noAJFGTTVpfF68xWDcb`H<bSCD}Y
zvMSR;B0fWFbf_VN<~Bsd6<{U5bpIB<c9wcRecrhuUCQeU;k@b#@6&YwmZHO;j*j@@
zz~nP?lf5NW0)nvx)D{KE(`2G{!q18gEnkGYW%c#LJ6fWL3l$|=1Y&cHXs72nIq?nD
z2;m48`o3g(N>hR5LR;Ulg%qcLRJ~|bk2?v9$s~W3xSd7s><-00c;jQ+?M)w3Fnue1
z)JJuQ(VmLPq>B%}Q9mRtqB)x{uH+cz$9wL_iO{+i%|Xx&pP6`G2=~#g-!5J=i+>08
zl|Y=ETrKfL@-ufuTSkg6kWUzSh}fit15f3SkxH8^OCX{s5p=>inJt|bsZkufP9wFF
z*yQ_Bpro@@bI60-{7`QTdTL_Cw+1CG88he-1|_(XYshP|38#~t=+tQ-6s1*LrW-EI
zA;;BQN8;TKtO{7MQsOvfyHQEG@jgwP${De{X~4;lrJ_kJ2YxB`#?|AC<9y=q;d5Z_
zS`s{=a*AIcy6L)%e2Sm&NdxtX@Clh^r+JhN{rS!s9sWyd?C2z?P7p+GXjpt)l}r>2
zT;<Fx*s#KJ5e!__%%C;!fHaj%DQcEN!FS4Ll75oZEC`vU$S*A!g_LHPZ=VgpD_jLM
z95m$SjIPG1rMB0rOn-Y-T>RM;Bc^<P)fCEIF8~1ZJa5Ftq<$RHczXMJPJR3~=NC5e
zKEmyT&4k;~<W|0N4qK8}@B7QbHLhJmN|*iM-qe6-byElr=gnX~r^#<2h;xLWUHOcV
zic|11n|=c4c}=cHn&wbN36^oC;7iE#v=nSA3ufE|cRNj3^};}lu}YWD%7EQqM}dl0
z`^Z#+aS6=Xlm(l9g%blLG(s{jUg&%_fqRApQRa#J%w!IwNvP;~z{mUUPpk}=nYT?9
zp4m1|E4A}dtr*XRig$DS+?&{W&_2A3kGP|4#~i@a?dtu8c193{BvYl6c!q}i>BZHj
z*P;W-TOsk`6X*(dIZh@Uv~}e4spX?IKH@Tx=4qJ6V;hG!1Dh{Rl~6#Ilgyf8--NfX
zEO0!N_y`9ZGTn<=7$dT07&1LXf>0@f8*66SJwhMbzj9z~S1N$Y9W(@y*$&u3wmOEC
z5g*Hhl70V9>ZywSpzduQOO`k}wC9k)Mt*Fs@Jrguwk5_2!qz>Mcd$t#vkKH^&&8iO
z^5l%0%9WSv;1dPku*|DE(2&z#1bTo5QNV*Lfu8S*+%>w3C|k-)zlQOdy6Mu);-(nd
zmLRf1@bw2d(O#fv6(l!$ku<FgM^6>=adGq;Js&_D#_l>i$<L7ILx-35S3@vR_S`!~
z+LfpNm7z;x-tDkf&j}|{;_re=;^P%FS`dB68>Nd{#?3rA7r=NHl+wF=CaRGFU6c-N
z1&Dg|;AxagpXVFzS<H{94q>)vxQOY}MVtpPyt`Kdi?dCUJql^p>iTm21=U`gN3F$$
zU%5r8h5W@CDzmtxB2v|g@nu$Li&!4-DVB!)5#BOouQD4t9fl}pH46mF=@_YE3^D+?
z<(@bA=3%ZfEd4$M{sc$L6t=nuDjQ={5MKL@kPwQ5UdYGG{Z`6vM?w{n73vm6W^oEP
znv@aJ(gFt@kb|3OhSh-DAm+H#)I?uO^IFh*DR=?dQK5=q6en^i)zLuKv@P>Z8EqKd
zh8#?N1+aY^!<-sOeqK@7%aDxSZzgB)w^V%SV4fT!YwKju!<_v(o^74q1}KzCElJw0
zHQMs2wft)LsAGL1NkYD;sif8FEtan|%q42PgPt{0U`;y2ee%IZe@i&sw8}>6pkHHa
zP17)>W@q`G$)a9=RwyPloW{9Kl~P#kGGTGfU7fh;MrnZ2fU(Pf(Oi2V{-WTV%pvHU
zjMzaecO0{j70T1GDGbdVDNJ<~O(Q?rD(1R=Ng)wdk8S>u=4Nh>ZP$SE8|Ar;J-$z&
zQ|{jqUzXA<R48ayvkJc(kZc-u{D}EVxq@7+7)17!Gl5mCUTboT{)vhYmX+`+p`)d3
z*Lj+iBS-2dg}gcDZ>^f^Rb)b&3pf03T6Bnu!buY=pxZgx)Jja4KFhe#qdLSAe3~^5
z+Qm~jC9QNtY_p%p4xmHB&|G4p=1^ce;gr-1U!WQ?8Hm}ipF7i)G+G&q$SZr2;i}1w
zBc3)>T2s-RORZW((k&^WGOh2jR6F8WTAcM%IT-MLG>7DdmKY&gcqhX03@z*{%Bf+#
z14P(_wtj0-c~4729UgTCrrXL_+zv-?8U5TS%4EIq9BQxkbm4kU%wsDbT&i#D^s4iC
z)3#c8TaMkp26$?0+q9>x;HwfK8BpaLc+GaqG~z^f8tW{0+{?RSE{L=u*t|fdeFH_X
z`RH^~m+5oG$4{W4&%9`|DeyAx!YFQ|IPeOHy3pl6oS99l(rVL3tI~IqP~Wm{D_SiU
z)QzCUe(2&)vHQ?mM7Jzm?SUy;?p{QNdX&V3hf6;)8c+Y~CSso=)Oy2C>CRHx3cK4&
zlBP1b;&auUnD1NTY#wwN;sJ}OwoI#IgasU2jr&AVtr=AM><TRsR0(h#I+|W|(CRQw
zzZM1Gk}0zxsX?^}OjkTyYX8s=3OI@3gmXFlne^ZZH5A5}VTdBMx-AA|*fZU|gWX@d
z`8E1q3<wG~vE1@q7qB=AgRlh{sZX$SCo-2*FCt?HF$%sx(E;nN+z3^Zqw^Cdes)~L
z7CrX7Z(%GFW4Cv5{Hf0#$Da5u3F$_n6848OFxq!+Cwke$smT!G5IyebGf-AX*4+ew
zmGWWJ9J|DsrEjpfG1YfPj6&FM_7*aHurwEvLfYylQH&--CCEoWC!#_#Lc$Ufk^!n?
z<_w>tUPN$8jDWmHHJ&yQ)#k|Nvvpsc#MyGFqDpywN2J+>Q<|47@ysyjQ~cDhSzoBJ
z2_y*$LA==LwkThBc8E?%7+R3CzEC?Pa47WbNngj=Z;Le3cs<|PDmSw7rF=(Soh%&Y
zWFpY!cuQpUaspq$h4G*ZlQr3!_0siFuOP<Ror=g%RWqW|j1VI?1^{!Uuu1&Q%W0g{
ze_Cj8{gYmGpjCVn9Z8jlXkBo>3eG$^$)b@_bD-5bl(+2=+(t(Efd{cs+9Xv{qAnrO
zbN<La^VtEh`pCwZ;8C9tB!h(x5kiCx(Vl8|7PoF4nDZYd!5<X?K%s7kI0V3k!7l>)
zd4-|-!LOA_C+oMK2d$WT3k`nU!)grh=}*3Epx$fjUKqfC9h2p8oI%hY;U5Q$7?SFl
za6v^nA!cQX7Y#=t;5f{j<b*ynC>d~R?w}QM>pSx;zgT?qnCw*py0J^QgG5FDcJD&#
zON=ym)(FWE(8RSn<b#Nvi2uXhcK}lTMUOutB9c*7Au>YtUL~Vsk7N|tdy}n!jF7z&
z6;ei48WJUBWF(PYNXbrAGXCCsULM}#z32IUzrWw_pD3UAx#!+{&bepZbMGODkJ+E;
zk(+<^Am#f%xDMS)3By;rN76)wXy}ff7c@@&>>QK)`p<R$Ge!YomMTxVgmT^hMk-@&
z#Z~s7s*)7{(pH@6W3Phu?9%>Av`IC-=E@V{BNmT`a^?u|j*Pfanbs(zVJ5x3`M&UM
zGbOuav2Y`{`;KatvGCnBPYFK`V`=^LF6d}y%@nsjO?qieP$7@7`8y7&-lLIud73HV
z&Ogx<vlip6nj~`73nsOD4mFYN$ZcqB#Qmc3GH}PP?7J%FV?v#NmyEUUruxLj4G~L(
zX>&g?c)=AAl3uAY9%DCsqWaRlzz~3f%5#CrcNMs#lFWO>G7XN((>J|L<!BGy-TgYy
zItIT7TM#GqtepWMdgjT^tNh73lPj(|x+}TyG6T-3S!)z83==noGhX+5FkOAcMWd;B
zQ1NFk8zA{tn3p^Oe}j<!v$V(A8A-$8Q2|NU!lO8a;z*gvld^1YXIM0UXB5w-x##K7
z)I8bRb5g(gW1P7s=i$&7uYSB|R2i>YjPg0ydV^16Qe*Eto&V1rPZU+O{gkO6kXa8b
zI9fae_@v#f{mLLkm-o>Lf8^GkI+ov@w_ER0A0ADt%~!Le65|)MB8-ut?I_dKE}r-(
zz|O4YWb%1$9d($K93yq0d~&~;uba<sV2(YG+6#tn{EUhf-+so7ChnT&)xIhIPLP+|
z!_@GUm~54cN_xQ;4ra?Ii}YVqcU(9waJU(_;=F3q;G9Cf+bKqev6>pS1b!Q53C2@5
zQ+X@P<5|NwLn9lawWf$wt!?j`yEIubQl}?{dE6whE9Mgy%()b-_dG3?`#XNXSk2B`
zFPwtC8VN-?sueOUnC0UF<e5*Mc|O<mxsQNCnnOvM+>C(8I<0o_@^Nxu!hF7bg)e3g
zh93qmR2`3fBBdwSkUIQ$=&3frZTwG0h6m-(43M~;;i|19{ORyj!1^JV?xh1S+g~$Z
z<Nf%DYJsFhWtwR5)+?*Y=#rh97nR9OOZpiM-BK|x3`jL}7RfWae{LSAV6n@s4Xa}D
zD&?!cO)7nagxdRpVH#KanfRHe&@MMQ_D5Q~xQp+<Eq{|xUeuhFCMd4SuJ`T8StEQr
zYXE+8wa0G*Wf9lBihFLa>6u@BtgFAVck$X(2A3$W!?al9X%39{!-=ky)ITeN=#ppq
z_#~&FO9Td19?KE8Pct2wzJ1CN?_K3l1}9#Mm{UGsQ%w}X$;2Abxh(p3#+V)jV%laA
zCmbd9yOL^9|JV|5ho6w05*b!anFjWJ+6(3vs%-!n%L2}lKRd2hj_~J(F<u}3a7~iu
zo*8kuanlQWKdsca_bxwG{3;N_P~To8lEL_=mo)QJ>#fkJxLdg#VeIt_J#%HT5i=tx
zZx)|s=P6A0M$9k#EaR+mPK@}>VqYKeV5E1*J$t97qoeCgsd!Pro6M2qgQpFOs@v%q
ztlX%yJaev;7e8drlModUU}B(tQ(ZMe<THUq+3q*O`k<TCdax<>JX^q{9i74teF>!w
z`JQ`e`=FHBQ@+uh^XC<|Vj{u!KIAt$14IX22w%I-LB2raWV72;-~IF6T@td-0y1p`
z3uc~Q%k<W_|B&fztm-7fBJhH?PWV8*-cz;62&4A0*{rh2i2n9*uP;Q#1Af|HjAv#>
z<4Q1wKL<MQlpxl75q0ym%9IR|>_9xFu&u08d_>fKRaz%brLR6gBf*?AWF;CW_bXX4
z6LZaGV&Y7us##v1bT`O3h0{}v_n<rOF`!4^hPG=2OLG*L{PZ7%iSW~+i^Y~i?2ZFw
zIUPit1&^NB;F4?qNjm*!?oMlw=%0E!AGrrvyZlb<BRWoS1dpbu!`(W9)Z^Wy=R;hM
zTz?j>m*~sVG;&nFv%-_OSUE1|HXYond#kqOy)8?HjhMeo&gI=l@Gs#0{!>*gOOy4s
z!(XQ8(IH)i#;Itbr}$Wom%om2bsW%}E3hXjG9?P=_oUDsput!4c8*ZbeTVg~bLZ82
z1d2WV?)*K?G>v87(jT}du<3bp$v3#Q6LYdCC|xHn(VQ%wi9Ks9-C`yCBbVJiQMcA`
zO6%zG;6aS9^yfK_C>)|P6ITmSFb}Oap5T+V{9t|PhR1`;UiXe2xiowG?Ms1&mekc`
zt@O2*chjkUS3Zk-T7Bq9HxU<p+5^)&WG?QHb;N%JSPqj*J~xews1FI9|B~9*Oq2C2
zY&Pvqf@a~X*D6ATB=O2EWKXZ^Xx%tmc94bpWy$V=Q+Mb2ng_qp{mk*P8f-~<?);;v
z&Nn3o%W<E^QTGEaO7Ab}a^rv0CVBItu%=YA3Ez6g$wwewGJ!JR+JsD1%haTyBOyx#
zaP$UGNid#}N&3Co{fG4)pEV0*I6B14n=<#~qQvZ|X9{%|*61sb7_ZUpUeV&=vV{Qw
zrndZd51nZ_bdJ<`m?`uxG!k%}9SlBqS1(SLJK>Dk`=9q0PN$Zt@@iAZu<GPlU9s#R
zP7r={Guu#N+WW%I;wQpQA9xSx=L{0EQ<!yy=DK$omK3R7ZrShPog&^^T&hw=DZu@f
zS?acXV8r{9*a!zt%V~N#o!&1agjq`FHlNR$91zZ^^}N?C;Zl~$GIddJg8liV#Gtm@
z{UC`_!o|`9i>0r)i*$l;htA&~=gVs{WQ@%Ir7Nw69T^i5Ki5?*F2NR5GhUEOAxGmQ
z;i#1K+tw`YTIzwa6K}(QexkT8VEyCLg%Zx>3)$U28w8yNk5y9Ni2SL^L^CXMS|pzL
zO#r2#ILmuA3U7}GVp+P;BwP>P8SvB?M_o3(L^7adp+?3aSIND%&VDERgoL{EGd*^T
z>&=3@UouNKy?byYUDy1_aRT1!k<n!e5@~gMb`BmF&U!?bVz=<VI@B?#{YJoB@EV4y
zP6F2J00Xy!CRo0Fxzb@2eb|duJ*TB`<cMda1`a0}MciyDxyZz#Y-KggZD7I{b;8Wr
z|FZEZ9^#=xHLR&)lwO`VWSFM0_wO*PdQ*lhWcQyQuvC1f=yI2#v*~T-xyu4wXFs`H
zL~F=YT3${u#n;<+*6rG8|2&r>RZVDLn_rT`lwzNV55HJw__y}nyMeBq_(v-(N+?VY
zq$jAJJ(nF@4|w=8x472kcCGx$pV^7E^2cN1X1^YPy7a&L+FJ~9?S)^ihm8?0zL(TE
z7;rwog1@WnE!AL%83)5;{Gs9Awn%q;{6}hnKVGwpf6%6}c9l%IxBG`mHYfJ%4z|bs
ztX55&TJCc93UKDH#Ka}WkORcA`0rm%j6NoF*eE@?;h6U*9l>~y%q6Z8PjZa%iLrCo
zJFRf_7OO}J7aQ?%8u3Y(ujYw#S{{p0!<L8*=6NLTGF}}Q?c=TAjQJ`s{?lv|K@o|~
zsEYt+5tCunK~ME--37Uxk4_1{;%cAg=wYdoW5Fc)DI4ow8>yfASW8B;TJVt#i*Low
zVZvUig5!@h6~eM#C|^EZJM}?1ayE=l23PKc=Mn1DLz8NOL3kR2lCd{*0(P`oRR(J8
z8m?g2A#o#iB#Gl`6}8qh%h%oM*<5NBNejoH?j}DXVg1$Ex<X0tQ!h=)pLYdJp=N~_
z>|zKWv4j{LFx)ddKk&jPM|Q`a$I{;4j_;FuR6J|1i>u6*!BN~NAWX#HHhTN1Em6IT
zDEo;WAKS8IW^qJrcO0yIk#_RdRaJ410IYpoE;jSMTDLVsDRSiKzZoc*#qDdnBl0ZN
zZ@=9H*;gL585-}SY{Y^wbiHXKCNwmr=ftQn=87h7u+y@hr6r2?5>v~_JVCj;*N(5?
zjk`0A)~~luPf3WJiyLhbFrztJVyqVGbB;zWw{BjDV(5!k*;H}#c=BlLGqci9MmJTa
zs-8s!&?m>ez0R1^YTzc;R!rTB#oDLH*sJ_SzCry|l@b}V{F##cp!;vdP8y4;$H)6I
zQ?${fP*eAx)E2K*Ix7_u@=5qD5r5bPj=J=Oc6BFpmSbtO_Jx(-*-QAY@ivm3$T6^d
zPb&ODe&pggu|4upg@&~gY9(h$2t!gIhW&PYXtg`^MVfMO24{8At%G0X*%P=0M?;TO
zV$1t=?E1RXfHu}6#H%MZm+Y?lEFC@rlhgtHTlXhgx;}sEd-LMM<kNNs4Bw!-N?w1f
zyzp9QK5bh`^&<er`;rnzOnqm+^`v{r?UthUJ1jHYeW~68PsPssu10}|>kl7FDk^@#
z=I$ALZ+)!;%0XER)YigB7*#8Ed3KR=-DEd)ykxlh_CQj~u^@Tor&Y?gYM(@%9cFI2
z7aT>faCx}AX4>a?vV*B3mKe{gnu%N1Z-^@JZ1^Icb2g2!xCI$ZXj%8#)sM}$in&FM
zW^*%nVq?DG5G_COFq}e2EXV=N?U^<}*y}~n;G|=wj0ql5$xgZFc(z%igG_vMCGGMS
zPCXI=p0>qYYCj^IxxWyJ+eG5F95$$W`}0NQ+=semabt}IwKt7eJqrf1H_QDyrm9nd
z3uy~N4yUxWUsaZPbUUn)Kl-Y{r#D_Z(i(2uU<_Bls#`RFLDqGcYscOf*qV<7G2<;g
zN|JiywXsQhm@oUib(cLKXN56pdi^VJ9bpYa8(_?3G*t7s4iygL47KyQxK_<VVp6S$
zIQ%*Kg2>>^xC4_|1e5dp!QJt)oR*Y7RO%l!eS6YK^)dGL5kNd%CIS2FiFOR*>jQ^K
z4fa~?&HJfk@|2Ql2XTbyH@X~3)@k2-Qj13F*qw9d`G<slm!9?iXnOtZ4yVEeuLCb0
zOe;Gaa1_*SXGqAET$~Os6S2;6X!>~V@EG-Hey$R4FA3^ANi4I&Y1D^8CRvBi)Y{LA
zB>K@F#rut^r^tE!{$k;5_#^pz1*NM`@aEM&x0go?{klrhGNYsUUAL~`M7oQzQ?W$X
zg~$p<v;A11(S_6vd+_^P_YjujL?|B*;3IbZkkhC?aK?L}rbMFbm<@J^rSX*Or$N<S
zd9Am0{qXoi_&j*ukw;;vhD8km<gv$6+8glaJZIw1)#Dq7?!A|O-R|YyYK=n7glir<
zcq}jTazElYS;L)F%H3FXRgv295r4?*1JsU(3l1`$vC6?1PTqNzjd@5ZTen^61ZI4)
zOq>&?0Q<@EeWfC`(#82-*)Z5+$i+#EzH+;mzvcZTll$!H-iGfZroY?YdLH7>q%}!+
z8${VWG*L=hc#};^H=&Pr@MbB;s8mLDH$nRKFSHT2<XFj=U)Fj{t8`{(^H@^w5kHv7
zlcrm6PPPx2U_Q=R^koO@eTDaJy<N<=2Hx)qDHc0HbdQQuh!RW4g-Ymv0aom30CNEE
zn{y|;&pWA`vf9=X*wk7-o8{>jFo_j3;dpr1spN2_$>|dxduj7iB=7do(|+>0-Fn#I
zU`g<>^}#FkugPpJ8$W4HJKdU3jQQiT%eGHH<vNaW)DVTqFkNSveh{w*&+SU1!zx+g
zcc`(AlRjPeIo4&nWMQl8^xZAvr|oRINboAcBh0o(K~Ytkg#Lla{HTPr3&rI-hks>!
zCKX|uF8M=77da8yTXp!idDDDf!akdEwXP_fAYQIaEgzYIqOmq1b>+ruN5%0l`Me|Q
zNW=C!@=tV6QhoZv&xvn(@YmSAeWgVijeCSTY<3!%9l*I{Wdk^an}anK?At}CJl#>R
z7b^RKq{`xZ${d%vR7*&KUR%Toth?v*tb=a)Np~sv2{UtX&3-qp$1J#R>78Rm^4*H?
z!yOV<-wAh<M73^zhN0NI8m>Q6ZuevM3*TbS8lUZ)DgXTSQqaqkTjiYYE!CEHepz3?
zmlE}cL85bJcdgSro}=u+rwX=;JFa1u_g(n<HM%}S>IAdnr-jihKf*`u`0W*Adno)A
zGnDK4+1V6RSYunSlRB`y=8PZr{B-&^;W(jI4D-Hctlajeu730*73azQlxDj4Sg&j3
zcjd&zxzyzOo~Dr#(;PvSv&!;B?R#knb1~|wrM*5<rB`!vIdz0a>f@zPxK|}Kd6@Af
z-@pzz$KXXdeVIipD`MoMN!o#u-pO(|X&o9>p9+EpS(N6z%EdP_A4@fN?Cuov{~{GI
z@3n*Piq@kmmnuTS+uZQpzWzZx!`PL0GsP}C%)iY{|9u2ud&T$_B}`cX(-e7@#aHqL
zGRiWsrmvmT82$u^6wv<(4tr>}7!x+~#^<%s!9V7$T5Mf+UP|cX&&PY857##OS&>)O
zaN5|0l0FJ|ulg`RfFVH#w=Z6Y1#mAxXYmYCOUWcB4{cUOO93loHv5_K@X_pik%{)F
z--SGNLY3HF@2v{yGqFz;nPk83M*aKF^#J@cmCw76^6QjjJ`peEk;IOE+<NW2*~qtS
zRx!=Qr|bd3CZ=ze6d}XM_8(nE->oMLlGw?QTz^9*V?`GpcqjI&aO)m-XKdM;vafp%
ztAr%HpiZF(4fjhrETK*oPCm3R&4Av2sQoFWiRtJe53B>HHQOFs+RHJXq%r?ETanG8
z^-8rT&fTjs_k=MQn6>TSQ#X)bYbg{|^|{A)qKD_QGC!MUJWrbc(Aztf4cz*KJV}mp
z8n`1O*WWbkWisi+a^fZPE0r+_4guUZ`u=Ocm~$HAQEua2v(waM6r8D%PhKyYAMp5i
z^_%8+3RU_J|7yHF57N!sDQ*g6DyrvQ3ad*`SK{<!#Q0nzf1dDIi|8(@p{q{k_fo~*
zIP$6^_O6E+KDms-)nrNEkF}XtxY|L<Im0p6{1YM^w2}`}%(#<$^B+=-GSl2IOrI%b
zM9TYFJJ0Txcu=3x80Rb53@%e6^$GXDZW%mv!-PugWa3c3$0muFO=QJ){Er_KsQO0n
z!iNic^cX-WA&((Lw&r24!cf6%L!L^qqUVkD7EB(m+xuua4Uabq{j$%ER5X3piydHa
ziZ=|?#?||Hix|JJZG@Cr;K5+8$YcEc9n`F8{+TD3m}NPHnd(2qU$!&QxM|lK@|xMS
zkv!rvTkZb1UTlIt4%t^<3aaiA`XNMWG$WOMc>cb{TWhY72d<-)cY2zn&g8Q>6f~8c
zT_o=Oz4ImkPDQ&@A)gAKCk;F9mER%9+au28JsB{t^$f}Vm=|!qo<7r@ny%`Q<S$vS
zoFJWyneHm`#p=X89BvuxkD`vBXpK(UeO&Xo<JDIjuQ)pQ)EFCJm`H2=xf1y(&I(s*
zuydGBBg^YPQ+~*NE73#TY>#hzo&D+ZJ+9|oO3Lh{PZF{*h)z+bU?etq=Tnt7FF>bs
zvPXZALfM+n{`Gqi!s=RbZR>0A_~QIaT=Q<e%n^_*^-*E?)aA#tH`TQ{U{9}t9EG50
za%*uBqr2k1tTt<6?OgtzhdPChJ)MIeGJW_?<+D_Fnf`j_+;r*8vwgAYekQV4H0^j8
z58oFZl9{RTlR7yZeZxq&j)v(9$E5CMo7&Kky6l*~w$ZNyPOYrI^Cv4Pqgi!FnX}#0
zJHm_}R|BjKEC{V_Li^O{_q0atKToeku9Qnqs&v@D?T$FEpL|YSy1*?j<5bbO(D)L$
z3q8E%9XESI>TOiHdflA%<^j$J?WlO(Jiwxzuc)*)SLI$%f~)Q)UOs*M&ZL~50*znI
zo{ivs$Ot-*%XcYlU(ucqRZ9JTp2mrG>^0DgGA$L&<^Om^yyL~Z9{){mJ|_LJq4bIP
znNFk3TlXC3%DMW*6;AU}-okzBYD-PD7%uYU!qo%w-C438Dzssk&-#rFizY`j_MIfW
z=09JYgsFSg->&6gC3UN<A1~v%zH3t&LAXw|LBtpzPU%_VTbKK~l%|m>RUH@oo_J6(
z%bEIwapQzNcGJ#dY^N2KF-~6j77o~Z-Q>Cyg`5Agqkg&{PkspL$H{u}cFyIUHv6Fi
zMzvRsE|5-zMLG5la`@`m(<?6~x7dFFS~zszp-9htQCTP7Aq-w0Y3-o2U);TM>LtCu
z9R=J@d(C9Dv<lmPV-NkP#u%x_E;bQ480WK}663@Z-~Pn*)=&OQJ6NfUiNdnN#y^Sg
z8q+RWe9tRz8WSVx{EInO*ETcjcgzgUvw^i4V<CQ>@h?puv6f|rx&{+p40GR6_xZWy
zV5j)KPr;UEgZU=OofyqGWem^QchE^6G~Z3sgKPDHHfiizF%ik^Gvmrv4UA7;`s@GT
zrq4QR?{xH}b=yz3mk;9-jzu@OH9qM2S`l(aP@DB!;*A;02}$WI_ZA<{>?6&6hvT$M
zVYil0y`a@0C8_M(7rBJ}e3E5-m(H^W_xft9i@ImU%mwghUzsOpHqVjPo-s+7yJb9c
z1N#ZDY7mhO<6tTY?j4dwSw;!#L#@>nFCR>CRb0H0{#97wSmS4YhA&yUk$0Pf6==f)
zN8DwN1)1)DW00MCVP#b2B2Y9*?Dr&>`sklbs(^FfRq>8%JHE;aymWl(xvbNpAASmz
za$;ARUo*G|^!;YS!WgX@Ppc|<Nt1emCRcVSZ_XjLmb}Dr*5{66FV{7U+;cJhu?<ay
zFOoYb#rjh3c9LDW?=C6+@=NY}mFI0r`*zdC)L#Go^2ed;kDHT{9}Yg0-klPuc(2c+
zCPGXuy6?Sp!0&o3U(V9U_v$7bWCcb~R9^g9e?mq!v98iKg}&_IOBFrZYr4YYN8Fuc
zIPYE4{CVcQ7l&Cck*o9@<$WL7%mHCF!sI6-nK`Y9uRY~7oa`83l~oGZrLTRZ^foyI
zn~uEEfP>USKKW7WB0jUgYTA7AxJsorT^c)dYUitI>WieW>`oZAAt>HOeCyfAANC#w
zP3N@sIFsLzbiIxFl|uuk+h4|)gO8iknVd|5Z~qm!NHzl+0o5G}SIPZq?D-U~vb`{V
z!n5=nUQ}RE0vDww7v+6G6!8O{N@jrqItAG~20UsQObjswJl_)y?l75_8%y8pRCK#)
zLm!dP>(>&IK)xrv{_;(-%c}XogI{k&S|3}Ovty#?+CP2&6o~@C6|DP(cvH#bc#F>p
z^l7U0NKCW|T)niTC;R&6$YSHKH*cG85s+7krX9;5OXN={)%kGIK}t{UiVyAE9(JRh
z)A^6DxxY%h<ddXlKYpPndhmS}ry7o7<kjEyJA_KUoDkTrS66#rp13}(nipf2Xj6q?
zUM~PA^}*{n2M&y*ZU;YOCGYSmoZ9ajBk5b%+vm?6p3QD6CEx7R&>u^eN6?i?YE{8o
ze*1HD^F+LdU}$&O?kWaH@nro-As?OoUl<>MX=6RUsLJYoD8}zp@Z`Sff^ik&muZ;#
zr*?V&{+@65HT;o`CWe%!cK$HtE!W`FHBDb>RZ?lw-<o-rXw*zu{E!p(2;Vc^T=i8{
z+??ko4rSS)aPC)%dVKnM%wkicPo(ezsI#)MtET35w_JbH`<TX|KaBPz=bwjeq(jn&
z9GGp~8JYUR(n|0CA;iErdiGZz-8;)$8Xxmp$|4so3f~tu8T{PpgQ4EM@2X%<zVNii
z*Ko68^{P<(_rG3B(j@vW>8(qdmo1G{beIjM57M81mCQePh~)IhkfcN@;lWZTPuw4m
z4ZU_)h}Ed=cT>O#=9%y#DAC5bYI0s02cO6OV5MS8Kt#Shm&hDx@99$^vk@gb3gZ}6
z52#_E9A+muiYGEm)HD}1NA_Zjrm@^Y_l-X*%dFOOW;>gNg4cz6M6!DPRh|=1MT~Ov
z2C>F+4sqy5#t}_67B(c`cU0CeZxLeZQ5GcZW&8O7H;sRs`S_HNLi!JpFB5fn8g7B<
zlTmr4;fD8a3kE20%Iz$#cMNhno_NdgY%z8MU)AB)DrRXms!IsA+DA%oBwj&&xGKt7
zGDOtoBjH=tvPO|oEW+g2_a4V`n9~+_j~#O=Bq$}%ePa?J^lL2q7=?RvqT|p4qjX$D
zyBO7MaYh7&#&|yIn*$s{tP~ITk=w|~s<icf3oq789dAy!72?G09oPElnAz!iVJ_YX
z%<0IGC$kS;ia*)Wt5PbHW2tJGp)KKGI2iDd->#M$>t=1$H>&vE=O09bW^ny3FIT1d
zlt%2D^27H#fm#-$jz)yxjvY5Fe(aee&LX*W&9eJYd~ur5`(rc5-&eF==p^nOKU!+p
zV|OO$&*=U#9@o!DV)nauOifEI>V3YLdoa>4>`m+`V-CB8lJ>OUIpS9FA16rFTC`$Y
z^sPOyQ)CIb<kGyTS#A>iNOiCDQzZE<(M>bk#n`S_%TChXbDgoXPD!)CB|O#V>d|Qi
zpJ1ui6^s?<J*f*LnJ8NIrw(xtSC;5l@)ia?otVkv?U{INWl!6*t4S_yW-d%}hRC_R
z-u(+*YFb-GQ%arFKxSZxynC`wkFb*FBwi7J?$H@GRoXw#6rTym=*3eeRTTS79m=UL
z`fyduKa*nrpXkZNpIlC}7UQ1W&3T+nR~OAx+wWW^r`HOUs6AG2L6d}6FFL8^{VdG^
zBL3fcbDrXd4FBkjeDg4F4=`YQ`E3F);OdISbnScM_%5&A&wCFy)X?sfsAg&Av{#J^
z5V(Du(La6k;~v2AVE>+nrDOUPWwenWjuFxl4iJB56s{&BI+Z~jttdf#^iE;c4~jWe
z#)BS2k1jlv9Ffg`JQftSr)US=7wQH2OPPWlQ9m_Eh>NT&C{?4Q_w#(d{^6SK4%*^F
zd?vL#kyh_+XT3gGQxneexk*K6=-YWe_d1rSI4LRB`wz63YQuHZZibyqJKaGxRbX6t
z%z2NETjU7KwJ=N92Ui)+IPUS(qsuibksN>HK3?+6vz%J&)8V%o6SS$uTEyS254P;H
zEc~oZNGzg0LCU0M`i%K(bM%YiPQM3ACdXeZ`jy2zv?yknnxy)LGoj)mLhSv<gm7Qe
z{d+v-{Jh_@3me-3QF!mOgPe&u>)H$*&sFkF@2w3a=9hkx#@(D5#nMG_{~fvd6X84d
z@@GHAo|OEBVUi#nL09#nT+WzOer`|q`NO7<vz}SDzb<TQh|kb`>TB0k@6|tcjlW6q
z*}=?trS}VtmN_#PJ*>I6gavgjbF|*lz++P=u`toIa6RN}dqE^C_(3y?h44{bwotG4
zY(qgW8ny0c=TT>mnR&gA&6Z;PQiR7^Smo9&Dav!S^0!rL=P|096z<zjH{arfs0=Q0
zCY9+)cy>ET^ViySocH}vN0~YB<GawA4=il)yg}a#NY8v|$tBi4_tIM2L-2<=nen-n
ztHii!*XJKzx01C^te2J#s_(@dWMLg}y*&H||2G@JC9LDIuIdMZInv1}F8uD)*bDcL
zltzWsx>m}Q7c|HXTsC@TTYo&1{komBNNIE|;q&uxmoto7Z9kJbT^}<Z&&MED#{4Y*
zB5H;>8JooHbe|k9S+aBZWSUJN^MR08QOA-l7I29ZmVSCUdf->CS2{*!Z#C0n&GMLX
ze!`oHlYQ0cJ`S9s6fq8`N%eNfbUhRIn^id38~yptj5_6ISs4b2w}GUIJZC}^C_;mz
zo-}_8<h$LdI74~zBo4K@dNHe7rr!NIwwBuCPxedWzaqM97`881knHqX?A<m`Wo}u1
z9;yi<zHddUcZf8oXx|r(M_fL6wv$gHocv2EM2LxbF(1lyseC+(s~spBK@+pfl6Aj?
zwwx`4rrZ<lx88f&-)jenv=DRGk>8UdKJ-Z~%34xhENx;>@gCkT4{xOdVXX8x`qwk>
z5WDauX1=v|yYz<PaztFX<Pp}MdrED0C(QK=WJL##e4w)QqKfro;5^KK0&gbv6=1;S
zJs&4-=c!%#Q+%9Wc06~;9UkEbU@(^W*;sSdkc3BtgffN@{C0LYe27)7;KJN9h1^b2
zDJ`MBBXkcHZ$!u{4PpA{QV-rguH`=<6(LqbTXE@`@5yAQ7-wO%3q8K)8w+&lBf9*J
z>*X3Jo;~j=(#SVdDadGNX|*|Ifi+#jan(qt=)BARPVJz1n-pe=lVtHRj5m^u^JU0%
zDNCQ3cprDMskfft&k<;|?5`{m!B3v4>eI0b(fL`mpTcIS+MA-i=hP8tQJiYqu2S{1
z%Ab{S2k*{Nl0*ewRvc&`D3c>NcD3gac6Cui6Ye?VkI5fIZ|goFSN1rfC{oxy^}6Jm
zDs2((P}HOeU(iJdrv*E1eIwC#arKmGYz^%Telbd_<>v)EdL6Iux2XT>9(mx*{tGYp
zVD#Mn#4tKdRsDN6BZAE^yDLsHCF*hStz(n5=*u?FT{Nuz7N+ND9M&xx_KsRSq}SVJ
zQa(elS7hq`#oB1k>$+{zu?-3Xk`*>~w;p-VB`!W{ep7xUy_x2BNBJ=m;oI&0VYn_2
znELNxJu8v?&av}#;Ef8|n)3YC4A<nB`9WOI%C6rwo8BY)D}y^NJ9($tzR|}DX?R!S
z%Uy{5hx_maPoKDWr#$EFq4cli2ftk;d2{tOnI5UCo8s9|F~t67s`lzptGd~o{j~IU
zTjk!KJr+U6mr`oQgQxS_?>`H#cmBP<=T7pgfC&cSj=VbG>!aaQ`*EoEbY44S_L%wt
z9l^Pt-&c28nD<qYlVs5+SC~s)X}OeYIc%06Ar$gSb#muBsvou3m+trHTJQW&dOw>v
z<+j@cmpplOA|-_a2h4XRGXA(;T{rR-8pd8;E_Qa1k-`0Pw?X+VM=(KWvFyWzN4sd^
zy&qm<E97Pn<|}yitKQ>FiQ#<jL1|Nmg%45UJ^HVc?hfeDaXrvXA0t0QL-W|HdXV74
z`Ot4!^(8bx<SMU9Y2M(w2<jd>^OUdVf~e9&Rsjv}z+qnz0gm=dGci<Chuo~>%K2oR
zTlT+wJ9{rI(Hh6=UQUy0Z)Dr^iOY8TYy*!FsHGTC8L<r(ed=Y5NGz3~E(+Og(${g`
zT9P{uOUCJ}UQpiQoBWPB9A<M#CFMiGQD;O7wUXXd*t)3n*5OWjh}|1^xyjTg_pn<m
zXpnlLlsL0nD5Z<?GY_}dg&{0T>mMpq3o)<B_tzwG9Z_<f7!_1)ApdS0BqgnC?P6Z=
zOToc0L-5L=wZ_eb!zSm9?u4Y@$9<*xG0@uAOE?+8XtDFh!8nrRSiDV4)F+6^G2W}E
z-ZYS6Pa?1oIz$yb)<SVjfL|)+?x{jjqqaP<_I~bK);7}GJG(A$t5HyrPf<)U-Az8M
zaL0g*D$LpI<ax?ZlJyD-=UOC)>j*?%J@ezktpJRrP;oXWyb0FfJ`>VUrS>P`Ql&rZ
z^E=&`#TSx!9=s3Fs0{3Los=oKBjLR743iJj6@n*J3LZt`didnKO^v?xyJo0VW3gDO
zx+Rnlv+MRW@;I@!HPT<1<yUc{hzvXJL)T&%#5pF!9+wbBH7R+ZH8+lP$4z3}Cm2C$
zi>#Bf1Ut>T0_D89ImeiajaXFyH-62P(3seEus7FA%k-aiRcoF;7S8?0_2S~uh?fGr
zjm8)47WC^*h98-q6qC&kwz!}gTfgw?=o~KVE)xHXJd0m=NQ}#VpBYK&{u!0ndE@R$
z!c)(ed<b0i&(#OqLvNh*m1T33yb+D9d)$=W@=CfX{z;`PLncpN4@@c#KPQm;);Og!
zOoy-N+qNLfZZpRsf?ISjUh@&dc`w<EA4i|l6aZ{H_s)eF-4im<1?Vdg+3#=A)n<LL
z>z&r(kNTu1<-Zm*zwvQb#RPPO-b)cNz7aWkL7}ddsNiuSM=$Q3x>wD2MtB@6!-prE
zKTjGu>?4|J2`qhx>0&;oYM3i$-5~qsPuu?XPQN3bRt<m7;W_nCCiXM7>C~}mgr7|P
z>iSWxa_9a1q0#3J86Ps0@3H!EcF*s$Fh4zYxzdmBb(U92dU*{VYg##1zq31PbiHKX
zFF`YT$By3;zp%dJRx>;`(f^I-36Nzl9!)%3@?bpfs<_RsyrX4#@;f>(L+Or&e}AXO
z?w-(tL-_%RS?{!|lR&<;%PBi7{qf(~r6Ts^X*Sd+XE=TZ8DSkZ=sd>b`qDMKyYU-O
zS!K{@2~+IMg=dGQdehV?6{=(na4LOwdCQmDdCSkf>o`UmGk%Qk+U!Y!w@QR>`Hua_
zT{7>R2)ml1xL(AooqzM&GC(Nx)Q8kl6shI?Z*V31llE(lcnc-)aVSnTg*-oDl`wV3
z^X)OdF{!fIKY6B~{%}2>@YbR(CgOEFXgo*dO=~)rR7%9_WAnp1zA{)_Rkb@{<p<>?
zzut-d9}<?2CDTf~xh^P^>j&2c4tNMYrLik3Zt~W$>kVL+uueJ^SA==vPJfEo&5|}J
z%ygWyxonTq*|6VhR|l4IUUOv#BA+{wmiCL|+y@hyL~n!Mq32(Ar#B1cIW#?Cn7eg=
zdNy7o=#bUtj@#GSRc^)f`>V(&loC4K;XPRS`k~<hj&a-(o2MhhoY)h;NZI$63AD(n
z58mDnusrx&ktE}b8<FTt*NFEneWF7TQZ%zet4~b3Tu3@^VjICZMsSLO{w;OUnKWwQ
z5O&|s(Gf}%I(qK1I2QyZ$R2%@OxqJ7pWi!x5p4e2xx;So(J8V38ab;EV+2oiFvoYx
z2tK(!gwuUe@JVAj_1VODR=cCBiIg%H6Z~@b?E9tkoX9ExwH{{$jG5zi-IjI>IV@)*
z<oL)wqBDUa{pSLgYyijgJmc@(GaUrw(dB|IGYoP=&INh0)s7ms%(aBm2R>4Ho5lF+
zuw2rd`bO|}x57Ols;~FV#WY8&EY+xox$Lrwp5*U7VVf<P&)70Jt3but{ma47b7YXG
zc9^gVkG-qmQT+R|c$Oo)b%3$sbiX}W7>P{J<VOSq7xI!anB?*aXmT9?ZNTPUAS5tc
zj~`-;qf5yonBEm|j*RNd<-_<5R(ZEhg<8@_5P!+Ln?>o6E2c+r<lI|#+5Mv>O6Azj
zk8TbSrhYn|YI4AJ$RK*WsoGj4z5|QkqE6DYQEI&yk5{DzwQu5k?FEd>_^YkRoow|&
zYqQRM?abvbQD~<!zkO#q)7&?;_m||@W7RTAl1qB0EV7Gwa&{}=Csr!9();A}wGA@A
zC2W;D_U*cR=027^EWT`Hb`E_xN+tDyw5qwjTJP=?)@FCANm-t>_}a>e9h8nwGJ1Ni
ziSOcf>(M|F-RHM>wHh+4<J9PMiL(b(T=RmZvV8gX>riL+H_e{M3J}1#fn)8$)od~n
z@wLhHgf4qPyKY~BoP=do!-MbEy>}aC7`z@uJ-f^hVI~^h|2PWoixa)%{)zGNONoL$
z;UD&SzK~*UyqBiz-v5<(Kjv=RpKgM-0HI6D*II8SyI8Z<7QfUA_w#(!B7`sEY2;ty
z=wO?;AoHb#0#o8R9zn7CtaQS!x<Xzj6^ezI1$$IvxKGCp+}4Y_oF&vFDRkW71+V{G
zJPeuuM?0=JQWpwC=`K0$8TD#Bt4q-qEY=i?b+iKKp85MfwxaLG_ly1(l{ZQz%KaR6
zi%33%fz(@FT4#1F<mFTnn^A`Dy{c*HbE4*2mmd`7UOSX{<7pq`>*q&peVy*;mC{gG
zza!9*c+~9WEq;<pwqvicHRYj3=aZ9|RFxERR{g0tg!GNGWZIY!irT^K{?)EdWEKI{
zN3(8M^8_lis;6Pm-&7<U@~aNhbigVq`XoiBIqn+ySks;5)6M7Je;6N;Mf3Svk-l^!
zS30*dgIz{5kTQFsfav&}i=orco}W)=4fn=gc+=SE*)Hxm)8vr^*v0+zWMmiB`zvII
z!M+#z>xwKU?H{wA_>uB%KDTK0gt^zaXYae1X^KFV0I5&hzw(VvR)rm;<i4u8<CSPv
z0LGVeF=1>DIfK;0hsKylI~7?U-O%v2T^O`mkada5xl4VKyZe&T*}m49;AdxY&yU!?
z>NvVEdHwlF*&o+jjr>j>i(PM1&Q@xc{d|705lh#8@u3>!tkFZA_rXPK&wiNY4>z4s
zcVXN0bs?@w)ImV{#b@TDziX7oJNHd>j(&1=3HZY`=q8v%+egqd@H~w7SBA4d;Aitx
zgVG4xS7WoH&N-t#;&h=OW{+NLqk1**rA?>knd>9jb5^~-8y;spZylKM`Sprc)7?`>
zV`0p7Q7R@*<80%#lC%nE{Wp}f!=ov^yhqE-#y-9dj_;=aoxf1`rqOkL>F?1~?DrcM
zg=78l29HcGj_2fl`R$~T-N8A4+taw4sVb7bTY;-PNr=Scsp(!4-kP0%sOFw&;vdM7
z!a1Gz&|Sq4D?xnNmoMN>%T%*_Wxbq}xq8#9a+(|6J+DsDcB>5-$qxX?GXx4wJ2-|J
z=0-+2@g+wY<$qgrXKN|R=a@ckqNH@FjHX?%B0^Hvwf2h{J8jSBD{T9e3<`wQkKE`P
zsE)F|R%d$M#9Y*3KJF#WCk=~CioU`V6RlEjoWEsp9q4PgAs5EyTQf-CK$dlFrwX~5
z95;^mY&rYSkndvhPKDuCT*dTH6$<+nDebi8jvmI3zFV_nyn@Wx>8TL^>zvSN4x+g4
z>G%JfFqnU#IC?**M$VE%hfOKeu-wW>r~Y2f@dp-J28RBO%+?=8E)fO^Q(%%Zy{;pR
zWr<^Arq?j=k##?x%eO%0e%?Y?r+h}GSg%GQQ0hqar~JXh@@m!wO~UuPjYsXAMs<!f
z<tge?3wA$djSyFjFP4(5x?Ek(^=&`Cx+|q=Z8r(whhCcTR*#cb1c_f2Y?)NE_5~L;
z=g5?ksgd;u^1h^M(;tbX+2{2uYCoPHhrv{V{8YAV)b}|8#V7C8Wg^*=;)7@&YE}b;
z9hn36-#5Om_+2aU<rVjwMu4eTk|l=bt}e^E@9YdZZ2Rgmn<|2L-8{tBQ9JWEE<nfj
zMJ#n!Y@AUYq1delDn%aZ6xwHoYYPE|(Yr2WzE8MQU)&K~vhRx0CAxg|oPAmEi{EPw
zYCBVBxdddskEfC@)^Sb#Ty@hsG4{_xf$~$z^jekAI+f1Vv!4@n2|ec1WL448a!DsJ
zuKnkmUSk%Eo6de$`?c77hAVf*1`_`v^m*>)+VZ=onXv|^LiA#Qm2F6_Hs`n2+aXU+
zPwjZnPB(4XH1z;4TUMI%rL^|U{fuP8q*xleBD#|3^7A|MM{j2&%GQK1O<bSXh$8Hu
z;B-t>XwW7S4-3&G_uBuPi9_+L{WJ9s*5}j&sIqcx-U!XznpCttd$2_)Bl;XAnUI$b
zAxYsyMhC0w7>~~HDrfm{YLOzczH|E0M4E5I*a!USW3MG#MmX>EvuYNImPD4#ca~w;
zWgN}(U^c#yp0V$nw`$h&*IJx!RU<`CX}*6;-|Au#-0Fh+U^vC|ajfUdh7tX1diVci
zoyqlRKcnZ)h&kv%Hh5`gG9N|DO9k!&22Yc-X`JW$)MI9w&Y0~iz~dZKJVn|Qn}#=D
zj(3r6R_ngu6hCDKGci5AVC?vtf_LT()^wIQ#Tb8{eMp!W&29eOZ20Ib|D5Q+q?(I~
zk;cuczJzx?7Yu8!d5*s;_liD8G}_wMFm=y7DkiHCH-jiOm?A{k<OPwersazYJG|6~
z-h^Y+)@^4rJbjMQb93D_*spYc_v`1{pVS(jlHE8h(%$&{Y4FV{?@|n}*JdS&G@OD3
zb-QFQc(zA~>zNwo#?iEY`OWa>`Bcp}PS5Y*NlqUr6z92d;$HC(NK9qxQ222qeWR#%
zug}rG@q$WAlU1zkl$7o+fmnyDv3voV^Ag<WVn=U##}SM_%VtVEEh=%e#j<5GJcKG;
zS7gY)w0Otk6!MWXX@$qhhDHFTEMqUra3{wP%89)CdD7mFz?<M&7rEj&(d>IxC;IMN
z>DluMRkakwymVkR^EUk0>bpnBZq{w+{mVZt6VbbA+9XE-IJpXwhn~^ur$}aSygNbk
z#Kn1+o$<B&Y&)6!b3YnwuQ(q&a&X7Q!(A0z^R{JafSD8J?ha%xa4%tgu$ROZEz!*q
zYZMsVOW)$$turb^Y;R8=Inl;=x38YAURKQk=XTt?J0~-k#}2%|riMFAl2WX>J1euO
z@J{uqCW#4aOhz3Rs<gy9G366kmeVCH&7(orYI$?KbgP~gSMZzN7|zW6%&lr1!yJCm
z&cN5=+~Zbv?$)NvZ)}{w**MJMIB7*Y3OVAF6IA$(TTfPpMBg<vI~DbL^a~S*vhqGT
zwG=v|bdC4l=kHYOjB6I=M=Ds3Tsdt2B=atgOvJQf_}f|Bb9p8qZtrzneO<HalS>k3
zNZJjj>k8lac3WI8i2K@WGP_?RJ5yj$U)A`gYie5^CZ0qZ6SKwl#7p>5Wfvpa>uP3<
zyBIN;isXh`J_Wu>b5^?YIx(RJcXywU9y>EeTSed*?tY^?FBWn8u&FbFl~u5y%QRuF
zt>N^KR++?suJ-f)D@^|X3X>al@_)F(B(QSX{9!S`QGnYL>sf<}*8ykg^tbFIJ%Ag)
z0pJ3au`>ZxO0omhPy$yF1AY!%X{LZ90HLM-9|cH&Dk8%wRjC4EajU;o#=t$=E*CU3
z2Q3bJfC#8Am@DXu15^Od2vpO|2E+jtpkjw$*ql(6n1LnpT$i33Ef+)t*LUIs2!cur
z!W$7C2wC8Ai!1U1Ua>`^RfYb*g%(%0S}Ax4S;o)>H0jsWAOnurbh#ZEHn2LL_1^-J
z(C^xV@J$b@Q3WpU2!v}7bL>t_BQ!#I+#H~JT7X*GEYsF>xlkvV`dk2hfbh~!K>+U(
zjfIx}zk*X>iwmH)kN>SZ=d?^)i{)8^dB+VzOE=IHo~378%g^1{z3C41Cg0K**WVI~
zz&`1gzr>d7b^!}58ZTGuGX7gS6Fd?ymmUXIUZY0>f;to>S7R5sQ8<F0IU?0gZCOU6
z+8%nm>PxH50?xQimT+PZ>cbfz2~uI;l4=k*`b%G{SF96gJtDFaIHA@YWF4(QMszi;
z9x-^-GJlJ+f@=dhf=Y98!zt;yzP$!$E=tP<J=eonI|kTL<kqa$jp0DA-qrA66&qc_
zKag@@onx`Av-M#XwuO{_g<Uol*7%QuU>pC{tnlV31**en3!*-%n1@}s6#8>;0b_HJ
z>{*#VL?*(U!^#*|+E|0;1>skE(3|im2-G|F%a~lj!|L*`nlKBwuAUq8=n<LMiqVJM
z%nX-XKvP>Cw0<n$aMxDmy74;L+Pv2ryU1VyTwE8um@om=*t7wxEqP53fSC8}fECl8
z9RN1#*#XcdJ^dyaU1^UfKEb7ZA@UOyi3(qj{X5ciqw%c82y8BbCI1{jZ@Pf0v1)7}
z3(>VUR+qls`pSTIp8jXd2Nli)&Whu2!R*y`I4b;Ty42nXRKHhlLtTv+3}p~Eq6Wok
z=@a+AHH5bU<Mh&V<gA3%{xNFS04h8KT|yr0F&Zw{SqA$I@QT8(_|eE%3R~kh<)yJ%
zF3%1XP6Jnz2K&vZQ5Wnbq1xIQ^qVV+t%07f!7^_k-x}yg!G{1(qOFg1Y$Vr|K)Tm(
znJdu6p<GDwraD|2qaxMUhGYKkVPJJw?cdOB+a;wC)rbbmmFQPTnqWsKHj2LRfg&)x
z0D+}{`2qA$eXjJdQJ=82E~JXR?cZph(<b8pMt``MMk4_Ff=#Eb#udPF+XOT=c=iJ9
zk#i!A7umo19};!hc>eqVK~O{rhy`Id^WSPzYU@~ZT8{bvpO`PlLOEd0bt@QC1g%wY
z-;N04O%Q}R<nXr9xDkV}-UdKF&TUp<!)X=1*J28JtgoE`>MK`p={KH#Y~^k~X5?`p
zy-MD1HgA4V)LL+9&Vq1PEc(~l`Y~>u=7`dl7wHuSf3&EruZ=0a9Xtnrg>O|yBEG7)
zki<HoQfYI!2v5EsJ`Q9x>~_%*7XFc^B)ljS#Jh$^Pk|*V0sP_z$w+wi4SfCX2=dg9
zFMVc(G!-DNWtStPsJ2&Ml0wEHUlFzTCqX+J5T6ZQb3mMSu*b2{8U#vq;Q9mZPzs@7
z8?U7sVtsKh$ywz4g2$PV2o_?TiL9hS4`-r-Gq%c|=-{js7#mTVdx_2hOW#1>i+c-P
zwKC(4^@uP?Zv#0DmEPd-6?9Az5#B<@tNHgSyV0(~_V^^o`Etl+8LUtZJ@Dkv2n(!3
z(P3e1mo<Ut4j3vD1Ue&Q^A!b*69~ffw*F0T720cooo9kLR$%9=Ach?wsQfI%S04PV
z81!Oh#h=?aCkGi0f|Z+t7_Nk&EROA-@5VVqh|d?%o~1zR73>KZ|Lsv`RVE#*%r<0U
zAd>4Q0Mdm*pq~OLS$U}XtgtipV86YUnQXqw5TzS@N+F)FwsBv;JwWT_XHrZ3se>{-
zz|W*XxUgQ{v4Ui6Y*+6q{jQIEZr{p4Z7raS`}xq!{jlh%0RTq~)uBFvJwL?S{x@fd
z2-hMq<IUh~W%mE{YC)F<L!773y-pFG@y3*e*Ye-zWJL0IHr83|+n`5tZCBhF-8_O^
zPTuC3`|w&LhE;Bmmk-=W7KY*TZg(Vi`*FMdCm~kjaD621pYvbQEl2;!Rblcs;|Ta{
zCI3ho0L&P%2kA2-s0@s?bVR28zi;!e9xV{NTb=RdF#dfhi!6=NFB?$VkKRb1Ap_~Z
z;h!PuSO3?%we6Q<=#QQtgWZ4H-rbHBjhGzUKF@fgY>SP(WB4uqJ?{w_>*;^uI{9x&
z24r=@Kf%SYa}g2a<MnO-Jx*Sq2?wOFJph<5yWO#Xe|{DHI~o8{DTrRaMUJv-IT!KP
z|DNsiPx?T}WQ-z$O?a&l#ik%A=ZO!L-GV-BZpEAZH>3}G`cz-iY)+sxZS%iS=KWXn
zD6)9pd=0^G|6h?wh|(98p8j2reLXdlm(T0~Ekk?I$sc3Tc`9Ju4KPCnwxy2>od0Rm
zMej)k#H7`B#$^ycn}k?&1~GX5W{d`wKV-7Xga6;4DUh>qw!3e{<jHpK5yGc5Vtc=<
z+x`E&US#74==a~(X1#6XuS384@5kr=NnZyV3-Iy<H^LmOHt6C0?a8A2XCg-MvI!B3
z8Nq7(U*bwseGBx{79Pj`6EsF;wQSt_zoIq%=SG45D;&lNSbwACMxU)73HVLG@^!X2
zxQYPC{hD-3JOI2<6nIOVGsupz2R#E_Gl~!EX1m8N`BFGg7vn;p0-x_${v8)`$1mg?
zfC=>gx)tcfr9UelU}5lpKET>>5<s%_1^lyn`BmV*7#NrUHw+8FXyjYGV+VK2bPkOU
zD7iAbvgXqLQZ?|dB0VH8p3vUW*(@_4>vTp;zle4h`{Bz;Qae>GCE``JD={;YuyDq8
z95P*`yMoo-<+&C-W-d0;G|m#dXnduweN-};HjLz_U}DvToD)Db<xnNKYwWc*4L9L}
zKX`%x=Y{nM1YZJ*H+<$Ounijka((d%BVez601wDlDV3uT{9!EjzH=>e!)pxd4}>@n
zU{t7RLsUA1`rZZmtPM8&kKlFa+T1CD0l!1s)yL$p*FS;>*Z}jzMu2y&J>!H8>mfYg
z(*=1O0mp}RJP#Y*2k<&Mi{K0(r@XLXJ%k5b5{u^O#xq!Nh+xC}0A45aP`nS#{|x9c
ztG39*JJ)W`V8eO{uah#FQ3+UcJGk{tqAkvg0G>OKz0rs8Iwdq(nJ4D*9P!p~ZK5(}
zw2Q(G`3mu{#}@Gq13O3}jTZ{%khvi#R}n!MJv#Qow}>o!SXLG`ybs`Y_7jGZMMyhu
znX3>t@wd9F;ce4lZ}cG|t9l3eISdGH&t@lSQ3bqvqa(Fw2MRn}iz?7vutU1r#*B#X
z?QW47H>K^C7{F6{Wi>-o4#I}bW;8+A#@h(c8nkT4ktnmQ7Ze(>m(hTr@w*ukkg`J&
z#_0bj(g4>r$_xJr6loyh6HTN+3lh*umhE8{G}0K3m_<PXkBIF5OIIua8l82NOz+JA
z?nQi8bt@`|W-Hs5TU0biOc6~OsfA(z;2#JU*tcr~eTx`c$DT;>>@Ly$>s2i}{81nv
z5=3ISTj5M<)V9*Lh;f9bwdMJb!QsQh=ntcB5g!LoKMsh!wdQcw@Nt<{xPx%^zi2%F
z^Xy83AO;s5c3CWoDd3I?-KOIa1?^G5Yl9dHH-@p1LIJk~e(OSI!?6HX*TOgqIJX25
z{MPFF7r-}HXSqVZyS9eV+P7D#2CcNRSe~=R@}e>VKvyb*j~i&Xbju6Y1OTbkg)Bya
zBk_dV3A11N%y1babW7X<bnJoDvsmsAx-HAnY((L<y#U(%qXX@mnSu7Yfd7M30uoum
z)oR$tLRzUogHBlM>)D_R9eRAw6>X4h4QoWm!ZQLu&JMzVdp)fo7=my&3qW(}U*LY|
zVHCyyp}YbBx~>yseZhyPyRO33InYzs^{im8X!v8=yegN-nj7tr!=Td|46d$f1;ir+
zr<>!@5U>&!JhRjiy3zn5t(}*8R$dyV>GG%$g|L2JMxc<T(cc;aEC6TFj8;Qr2Y{;t
zm@Yks)&$7S+Gv@wK!{Syat*Q$5T(otEQoyFobTX60M=?$0YGYNm@JRYY0WH=!>1!?
z4nRmiz6NR$W6-m;t8R0=t%nY&If9tHUa24i&J|y&NCV+wWN`)`B4kT$D-gj!L3E4_
z3~B3Qg5;)deM}HYTOSiJEVcFV0HGi|mi7Dy)+)!>$)nYrj;d?|Ls$5#KT*+In?qf%
zmA9fD%|ZG{a#;%KFTpfgf}se2)MJ%emO9Xo;Ej>)ucl?$a3s2Ls<5yCHm;ip)~M@y
zcUsr`T3v?>zJV<*)?pQKtpRBd;dx~H23IDu09hSCsl1Zg#sZ=ZG*;n_3^feH@-pCK
z+Zu|`!F46qjtw!Mfrf)T|3X`<Kzx~RpbOz+1wEA;5v|*ZIA&q3bufQy71yvJZ-jj(
z0Hg{vH1@$5GXrT<h@^mRpP+8Z0)MJ4TgC<;9Bth$0b_dQUK8-jf|mPRgDeApuBQj)
zFUap}aj~_YPOg&QEK7F8dP~@R-Q1AxM`6`!hwWc(Z6+IQIM`gjmHr^s1bh!-wHASG
zx3fb@d^?cbS?_UdtW6OcttO~F(2}-;>qnuE4~Q?d*}8%)1)M;&)(t^Cy}5U@ISgfx
zHH?^V38~G7E{_2oJXG!A6?j|o7S_Vq>Ug&5DXfLF)$we_OMr&4`8Z(n--TsOWr5TP
z)~}@t%j<MSx`2Cty)M?TGw<bp(HH#x2lf%_)@)y30RFv=SPB#-wTQXz--_(Rzsq9l
z@p^c$H;UbFG+$&R_VD^gJbG^eYHtoO_^YFkiHgF81YY^*fwJP8p&Hd&y&C{~zFXa6
zSRYs3Dn#g7<6DPz;jgEJDlCXhUvFI_)_(PTkcD6X;%z&Smtqe9M^ll90<?YBC$l0J
zkwJIdeFeh$B*>GX`51#{=7<!<5Q*k*)w45#+M8L~``C(wkB*U`$Jao1_X0gT4nQr2
zUYetC#{n`@V-R;6fM6lZ<Hn$KtBAelgwT8NJQ2k9XyCzFv22lrv)1!Ktv#~+Z?qeP
zDwUlPq?Gd-O2Lna!P2<kNEm$i4L@=R8yX~bu{Q3rxmN-U-ezZ=H-`#;R}9&;^H1*B
zK_JS&w2}Tx`+~3`A~){MDF<GaTcH@b_b<1LLg?BZT?+}l6oEuSP^Sp`cW<|cBIw&2
zUJD7m6amJAP^Sj^_N}*v3aIReZwv)J<1<D`N1K8o4~V?yh#)*i1mU?L2+w6hc>nC~
zzxo;velrUNQK%5FdG%Pg3ReTln??=t%3eBn<*axx$l0#Iej#m<qb9nt04xCD-F%N_
z+M|L4NDdm<jzne_R!i;N|LQ%Kbr?j|w*|um$_`XvuI%4~{ayu-|7QkpUbkC`>|U`n
z$Qm|V8j}kO^xF(3SYM$BsyqPbuUbQ$QD*@FW38@GPtZdz;7=8hkL?8N1s$VbfhP@;
zP6kUHfo{mq5jFI{Mt3H`dYE9oa{@s^Uk`R5PC+M6ufRl&ry(mCVlf~eU$S4Ovk6M^
zQgD7RYSJCt7Tmiz8t~}|^3?4>n1on+P6+OEI4;w{Zk_dyoUU67XY+Us{5Zzi9RtK-
z7^q~OtyrS)vZBo3j%jPQ3hYcBc=Oy!rV0Au(5Ob<*5~kSM?MWIJoCRXR|ndzhQBkl
zRcu4xYJ%4P_Vu*dnnxc^;bk<TYwYGAs~46}%Ys%Mp|*3ilJ^AWY*am*6{;hm387no
zW5~Rq$g1t8`-A^<<`=Sf0Lum7H3f+5j5;G2rEp#srGT$9osnKA+p8~Ej|Ua++Zn;w
zi}SkJ3v5cm%dJB;M)yzU{Gl^$w|#kq+qc`WHs=s^I-xiBaeL^3p1jKK*kf3mYl$iy
z(4F(S9dtlfKIwMsEI{X(qDljF<+*ML?zgg|01F0s#)eqD-WjlQydLtN%PRaMXJfdm
z!VmIZ^-7)_V)g-i-3|?DW6l20WIL~TxX5KYBi9RJIn~f!o-!OS4{px&mNJ&NE#;Zv
z>1mkx)&K1METjleVsQZnT{pCBUKtbI7Wln33)>U`iJ}AT?A4jr@ZJPRST}li^`6S+
zZvrJEYT4WyVHvR;ZfG0>`}Ra))xqu;v6$xe+*JV1h+C;3x8fH;-^gLSiV7=|64_ic
zaIPBkPRvGGkEr-^5S_{XS0V$wU?<RL+@PmM0I+Xw2BNAv=p?B!!1-_Wyp8S{fj)D%
zwYx-CLt2e%77#wyOJHD6#!$0e+duFf@Lm`EceWPaH3f~v7>a_jpcuK$D*gjTpVsRK
zR5^5gpFplypXG{rpDXzZkRD`Er1N@6t1o#(E$4g%8l;-MEC_-%Xl$tB6>RrF?~`tY
zN^7C5o;NbEA+t6EaTd@%+&l^f->L(yYRD;ZmMz^xv68)js?7zIv|#BCk)*JA7FoN~
zY8fjg%Mu*fc;i2H-u$24nO9%O-C*gtwZ0%Yvjc$d9)P~ueI<t&aecfIycHRaJUpOv
zVZZECqfRx*Ub53VDS_&K?#hlnIv{R-FTi@)y|up3H)>6gG_d$<(YV3U=5|n)7y9>C
z{wrtFQQ4U=+_IJiLy-en7bYMIASXEy_4wgyCsz>Wok95$uyqrZAC01Cx(!Y(wC@bL
zA)6M_0vWJ9PE@Z`WkGjYJ5&d<Ny#5Xs<Lk37W6#`kaF?WUf9t9M8>vJGy!=eZ%=Fj
ztgXPZZKD_hB&%qncObs%M(+Ugf((}4+~^(P%7^tHDiI54dajREtoJNXiB7Ec<B-ci
zSUG{b;->(|Zvz158ae}jcSpkd45;f20g@p5a4Q}w^!ekJv(PpmET4q(1h#&@8VvKy
zU-^xW6XoEOyCwiFv_jKH1GEdPtQAz@nXjS%d_N4hDlRNXX;wo3_H`O+MWH$pS17t6
zx95cV?Ymn&qYDo!U<n|%?454y9P!5M7kZ4a-au@;>tkDpwFCCywq_M0&qH7+XAq)4
zd>HHH393-GHWILhW(sQI2(p5=I;!;$w>CofG9Qt(2EG#zsIQ%1_&=LN0LlpH*tG&k
zj)Ar2=BMuA+wIVI6e1H<f{Y7z2LyQi1MMSw5Oy^H1}Ml^*!MpGp8&mWuto*$t0*kf
z#u0%0S%sAyh?OYy$~}K8wjQjwEGiNjx*rJVY)>!HFr=X5Gb-NXf8#dl6<84ZY~@~X
zaLzq=PX+kNYU>bHE?U8}<kD|O0C0>6XkA!<-Ud=y?(Z!}5W9cHdq9oau(Yq_((fxP
z@V|El$7+}m{`x1z59w<)#bNRI+CIU#0<iY4jG;!lHrIT!9CE~VyOEzMIG+Z{ajR#F
z+zhrhLRi#>j{2dCs?cW@Y+=f%&8XzOER9!NfRMc?RL8X%^N621KsS$V?VJMij5a=7
zfo^^_21!uxEp?moF|vF1tMdcU#h1pbY!VijG+_s|TpL+My>0?@kJ4-Ag`N|rsNTi{
zAClT%O1c5KVeqs&%%^Su9+>a0eTp0}m@Kyg@1g;D0GVCEmECOce!kMO{E!5FVga!J
zYyYCA(V%zBZ9#I$0OVs?FU=eI8yCPZAa|%Cf8zzDJ;Z87bp&Tt`Ey&l@nA)(Zx)|j
z&A(fX^CB}wMZj9$8l80{z|dDbT6DsO$b7jaT&&zi3QzuT_3nz5`UNX=Q2}WH`*rei
zEAUrlvXy!mD>vOCsz1=5(E%CF>ia81K=-@@dDb1Fwq^j^Wu1-qYC=7$2Gtug;6sAs
zYi*S2vDN!IAbbdf<_xl@Hp}!wWc1*y!<8BysK-oUL6Zeh4Vk+{5E~`*O5JR{@Od8C
z-V_0Thdp1gMGYOZK^+ES(Lh+-VFUWt3<O7Ec|Kc#p$6DI&bfNuem#Cya-TL{4|X8?
z$sVP>C@>`8$ywu7F+SLG2bG*xE+n&EAyy6iswoh@TOaA(m;>RT(|`pDmKTk#$~)VQ
z6KES^D;R->v$oC%s<Ixkzs<5Prv>Z<tbc}%JR=Cd+k#@_7E9xDhmwBK8O~dc;KI%=
zTk*ZXJISt~wYA<uL2fqCw~(NJAHfmjb+vMX$I7lTs+_nQ##)|1URy!$J#T$XKp1Oz
z7M(SUVC%%K^#IF@K~&ly)5CU156E2@kQ_losvm7<uHyFGRRZr68!GwvE4PP0eEqG+
zvj0+kD602wY_)>J3Iw1O0LSOxdr|*avQ;7RGHU?X4@Lg0H5kH*{DbH*#Cr#OxOQv&
zTV&54gJD53Z*4d61Ymn4z{~>3_>nm|41Je}JxURTwLYE_zz!rOx9i04zj+RBqw~_M
zB^0XnyRU__UeY0Nfoz^vy%_{Ilv}zZlFQAGSVA^<oxnS<D)To36v9JJpj6~-1CB^O
zIL2~5I34nd*{iiED%sGGWb}W$NY<tW!E6A~+0?-2@XpF@OD6pK?je_X0K;DPAkhL&
z^|A$ki&Ma-_C^B%Cc>kI&lW{6wpKn2*#v9kN4Yk=db3~?EEuR=H35%xz#C^Kf7Pnd
zn&1*_Xq$5aYH(p=5}mMCFlr1M_2zI4;k1Dg&4-bfp3uezJfXY|U=b0=n9CB83DM&@
zE5_mKtFQj|9M%E+;}?DWi|3>0kwy9XgiF*k!KO@S^4D*5T1NAVCkrb(14VU2v&9v*
z_y+++gy_91|HervSZ$HTJ$lsYX4u|Xp+ZDBd^SZ+wQQ$?hD{IDRo}+cK^-nMMbHBU
zah1Ft|KM!>6HD#vmUqn@LEaSj48hvWFkl8fVrTeKHU$nLF26RW5H>o2A$p_LvLK{H
zsfR^OOvINvGO!U_<oZkV*%*!p3VkEPjQR*}{jdQ3AA8>cPIdbRe2|gsWR~nbvxV&J
z>`k&~WJRT6WRqD)*{SSEHbq$>BcxP_LPm=cKIa@K>m1HG)cgOw>wB+@SHE+9_wzjW
z^E~$+XF!G)aIu|@hjevzn@!Pc!(xy(*Ke2N!u${B06R!@?db3ojzexl^*?*Cc0Ztv
zxPDg<nbUSB2I5*+ZBJwQC$JR^d3V+h@44K`zONyIyDG%}GpP_(dB49-g|`t$DUn|0
z649RB5=0TFnaJ{j?N<h?=-y6v3OtGG|DJBHPh<wW{v~&mpa>hj>mPXFMCsKLwik?$
z<-PE#5r_zbN&sNFN7*&wKu;AwmS%%T*^DJb$NBdhawptqCt|bxrX4}lG3x*Y+sME;
z3ko9y!f=2S7JOyO*0*=tou*`~t=)D59^}044z#re6_9oLJ0a{G|8L|P`0mcynfz@E
zw05kW(4jRF8-k9g)pVQn-UK9kTChMN;yC<=cG;D`$&gsik`pE}(ir@56#TP6RQiDh
zXJfe^Skl2sfCUT)A_&hN9%*JZQ6K1=a0ftIcOqW8#Tl?#d=t4)FXT&7Y~F{hi$JWW
z#PB4kz?+i3K4~2Ogxl3!Urm;Pm14Ua;dSt)sKZ_vyy@z@v9jGw|AwA`zqK~79jDnI
zK0Nr_XiHheohImhnFBVaOa6Q8{T-Zbg(<}E&`z+mvs;8n0xme<)@3EQX>DTe#yPL9
z40@6a_&c^Be6G%Bb80tYG=1~Db`pBK5t`KUyde~U87?ZZ9Tv7)A#{Fg0|1ARgH!xr
z?Eq{zu)-&80N{eiU{1RAiGrmG0(l>#3=*R2vR@v_9V8uWosb6WZB@|N>v=JvFtk>9
zw;O21$i0vJd&tfktotH+9#+$IR=<5>`7TI;WM`WddDa$0zm!2|7E*u+G5C-+#4aFR
z#saRH!WSC93P}<a)Cx{@T1%(E;j(T3NFgj}=X+-f32SMD<;srycXI%qr|s#}PTGFD
z1Ay&B*YgHfQ1ZF^I$pbZjo`8||CWa!qlde$ocxXagL(NaSnD!_xvPkAF;`Hsn)5o`
z?o4iRTcHnYPsQfb08Mv6-i`n(D)Ar0#_k>0-Bgfz%OSy~&A=sd901@D8n8YO#Kzho
z{!uhAqL!2GhTqc9wRw0=P^u*G)Hv?K1Rz0&|4A73KMb_oYARdVm9{wEOJg{@<>f<U
zmtjMJ|E6pWV>hF=;m0U^Exk6+2vM8bR*i3V5=6Cn2Db~(g6#`jpCqIPnx)OUofAQF
zueTd{wSY7{bJ$vQgH>SG3M3Bz@e0%kEC5@#``#W3G@Tn>7+~w91srK<u%Up@`p#AZ
zfr0#5AP}_HNNziU<B8PUz}pDa9n?T~)nglL>sC;}>4vU<Y#uv<w3EGoz}S9owu@l^
z{$B-j=3D`m2ze~GF8=JXqxC^xAb<8;L3`o?vipO*Z^&zmr&j(283%dnY=neN3a{Dn
zE^Tgsh&UA0m3y%hD9D#9hF*XY8B9YjI0@twyU(RyCv0xdo0vD)sCQ#@R|H1)L}GM!
zT8eHzHvCEJ+i9ehYal_FmLOsB$hX$ATsPbQ&8C`b3p@f#;UjLJmIOU>2hC=EgS*{p
zy1BVI<l5W(cbY{0{Z^uoB9Ooq5MT?_YV$AfNbqR~yHSV|!nZA;z+WxWx3P>kyak<h
zA8QcFX*1q-vxFwNMd0cuyW5@=Ja=gTI7Vn~DM2TgHa=Sb^!9M<fbCn9uG%Z1QI%Dl
zV|AZ*tAxwe>xF&3{$Ilb^wOiun`B$Wilo9{mJ_<Z4=pxxXYHhI0pK?4F57YhMEMj%
zgM-yL6@Ccd+r4u*;8VSGIC^WSFrpTF2n>BBU_dX}2ZkYuuoMkju7zltn<@5ADD~fp
zkzK{(?#0PMYXZDEf@NcY-v26=7J6)`18DZh=~U1mx`JeT7l0*9`3_m1<mnYZ?{+%H
zDjnX9QMcaV{~KD|!YXhD;oi<5dEW&9-HVI}zQ8c$*KkF6+8*qzeARYyIt${0z^Dip
zkX?fr6jSl9r4R?u6MNA6yC<cr@uu#2eV%_>^aom`_CI&;K?eR$otw))hjxVDC1$k0
z>#qB|uD0#hxY2nAt40E>)$O#71H9>d(2PNw#RCT@t|?@LOim(@R{meiZ?h5C3ZcLy
z_|olQJ4>w)GQl7-18^!LkZvffFhE4vAH3%8-NoEm)8_U!5Vi?*w-nOt=8LRz3Ng4U
z07&@X?!tvn1wkaW>+hU-cx#m)!dw0cgN0V2>_3SX`cLZtto%)m6keCYpw<IGJhy*m
zV#LOV_qHo!b#1fzjo$%lq3ati>_jAijVJg-5qJa!MB*{m!rhGq0<fV2%jAQ#rmflx
z!Iu$ma>s076_V!;D;vOutMS+Hxsin<2V?hE{ojjEtFZzbg(hTh15Hdq4i0iHDWOAy
z_+gRDfq}dYyO9_yfy-jW6Ao!M1b>Fb-|<I)b85k*%@NJ@umzpPjl$l)7Z+En5kM0X
zkvSck#loH4VBl|!HQW!`74AM)`7gv*_~x;;tqg?M!SV*L5r`?^Ex0NLnzzLt;TNeF
z5v@b@533w3|KM*s`6U~q%ACS4wZR%2z6kBLBO@A{y>_&X@z}5;>{j0ZnqZJ?;fj2O
z-C8bzXsgQI=MMi{ja01H?dLXa7IwAj^*<}44Wp1JCDNlTMW7&eQQ?8V^>tiZ#sdNi
zvCvZFI%=;^5MO(Vcak8!(+;1|F9)y_pyvwCMUdQu?J)rf=L8FStAgilbgNq5Q4PMd
z)9n*7*F#>5XJ;sOaC0c%+%7eA4XN1D`m}a8ARXB^iVZsg0E-mR!w?^KRYuuHc-Rm3
z5|-+rdbVKA2e$di6@YA|bmZt9wDrIeOkk}BQLzNtnDB`wz`b89qNo5YSJrC|Ks+4E
zY~>U|+~>g6uHHIiMVGbnLj)RZ@gMez5eW_5TEs(swX3&k=eXP5)C}bKCu~UT&+AU1
zf_GPHi@k*>@ErE3*=e_UNck0qKTwe0-<^o&uy{JKECZNR?zF7NS{{yU-$!7$E!YRS
zn^@YZvE;u{V0IQVwUf?vYh;=o_MG{PZEH5lH7g<qF#>RxGLTeiphMiu?l;?m5oPg^
zO3dIK=#7mI*Z+HGZK~Ijxt+x!!{0c3CvI_T0K`)1vSA;X0jHr}QFa)N5#G?3ztQ#>
zu{{D;t3tfl=vJp>`}bD~#x}%a%Yr3q?~e^g0d@k3zpFPJa;vtjeF8ryc<m#Q0D}LK
z${&AC8QexsBSQkeOP5f$)7YTR5T3vRM9{pICJ0}bE96+g*7$)(1B8Yh#0}J&$NsMi
zhrp*5A{KeKTCf#7GjNY$^FNX~qG1MGK}0S=e=~zYMnjTcIaQFe@i&+WWGsz8y8{_*
z=N3*|z)q5|SEcp;Whs3P<D)^GTdhxW0f*x60vLFtWfZ`F6fFm-tM-rkX8v#V4E^7c
zE|z~t5Ij>$B~Y0>GBw3^pS}NELoaMR!51kA-wgjZ8#3-(BmnDez^r^={u8vs14N)4
z2jR>Dq+x@r9>4?je^1PSN2~y5?*TPyV5QcbF=*I~AE>p1^>lWS-Uk*kfWKW<v}fRN
z;Q4n3-2?C^z$(g+?76kO0sa(nrd{E3On^_+PEH57jymFaT6Lv5!HH-1+>cry%ZlU5
zO<zkdpouqYgo<tYE<>Y8t1(uP9fhNTGkky$5iI`0!le)q<3Gs+_>UTN|3$HJ8!>_u
z;WM<<x@&?2d@F<fKB6sVcDsZ2Zs%FTy9@BxB;bqFfzIqU?f^7V0a}d8c6$gPbKAUL
z`0XH@_h75J!?%Cid62;j7_6NF#R|{myX*)sM=+TDe?f@ZN%5IgA2Yng7yhkH1O6gF
z|IT%=Dwdss`U!YOV2j&!cA}jb@nOX??Gh+NM34UoUH|`k6Snszz>5EJf*SwzH+=&C
zoAG2@W9nb|72t_5`}anKwQ*s<{B^`4MWClHu7#=#fH*wiZ!7!1&w-(@do|`2o|5D6
zadF<|zt*1^a{vz%9%T+V0`(~`)Tew<pYlU}Du9${<nKhR{cYJ~cjDjvcAVMz$Sy>0
z?f-(mXJ=7aYa}dc#ATHA83=oJ0|+8g)ixG}wS%n=uybS1|CCU-{Br;y>@JzX2xW%{
zUH`Qpvi%DGrMF}IgdpT2)*$h9Ym-A(*RKY$Z#zSYB->cg8(9`(zNW@Fv{V%Zz-cH|
zc3nYMWpGtx*s*TgrL+94b!e@Kr`xY$Ydj-gqUnE0^xAH=YYQ`JfIig%fV(GxZx6hI
z6l-(wVW*hwOxQRLa030yY8l!p%(Zp$kw340@7Ap{`}JY!yOFr|Z|KJA3U-=kvI@Z*
z#8GVk(7Uw2TXzx}e)Lb7`v0InvyDe?^V&BPRHS`2hjxVFC5C?{)IeMF?g%nluM!c#
z2HG4E6K0@?{6mWGgQ3d-z$Ic%f!LQDs9*-P&%g~uB>`a9`OX`RoZMop|9jantN;r{
zMak8W1@L#lWtG5X(~xWC0uEsTl64^S^g@`lLtsGs2#Bs^^?hUuRzM)=0@fyzAe*(d
zG4mcCff1en58(g70Yu6Gpr;Z3gcoQqGysUE&FmgCcU!rck^pdaA^b(OH$ni@LZ@|<
z5Ls9Xe`p_coWLLC0v}iS>ns&Ut{Ex9(A{>%x}ZVbnq9%F00#{c^xg($>*Qqws+I48
zjP;jAH5l7Uf*|arVpL?e6&6(ZWDsb4c@-jrLc;IE*a&z1>^4@+fQL(OwD2N67idO|
zop@!eH>iM+nK46|?Pg;HqDAdauarpzm&61@*_~C`u1G$}tO0pL#rjd9^X0!auELhM
z{M$3wm~e^=?$?{-Rt*4uCnXm7ecFxDcVoApGZyp}6?z|VGdBlMAsZio1FH!pvH&r5
z8bARAg1uYO7<)Fpv|WPiR=`kJw&2iq;VtXijP4Yx%RfYL!d^PFZ#UCb{$2C>jb*OQ
zS7dDa4aKmvK=@vzJ+$j)vi`dYD{BA;)o=bb=ki>D7YOk(+FS3#R%IFC!ziNBDjOT_
z!eilB+hX2!Wp2o%4XlR*#1xR8BbUMe3ziz_Z*#zEL@u(>*Uk?y9dG*?Aqo$<s(ug*
zK~DGjxCBJ!0NHtE&^r)nw!KzvxP0bpLFXIdz%d3rUF#6p?nc9&(^?)1v@d~Ol@2R3
zYo{@{5Xa{#1|8O|9x=zn`uHhCEg@#h^Ekask$0mOkvT}RGG7x-3oiNzJx11QNAbqy
zD?1C3xK6LoJGWiQ97m?=7cfp-4FI-iJAyC?j!Z#5@&{Zp8SF;f?AY6_nqctJYb(&+
zf(v{DrOnk=-H=m^xWy6{M2LvA6Num<<hwC9Fr=N&3DWsz=W~KU+WDM-MbURYA0QM&
z=K?#LZX-R~%_h~#fA}XdTx)x%o4N8%xT6h-|46P-0r;|0U{@c5a9ZXqXJQD_AYDOz
zG;@I4pIgZc;xMbZL91G{*fKwba8y{X`n98P<aPft783G4<jf;F_Ez<S&EeGOk;5=F
zEdw^T9oC$42N3+Nyfv`T%vv~zpWn68DiB{bTkt~ISOMN6chG%W>mdQ+!~p>IA+dwz
z1oi~61Hh%a*g<j;7-Nph-`xtgt8XKMS!j11(t=}WxP}IKE9^tJfr2q+4dSQ}N&#Iy
zL0*yt{?=HLj8B1Zv|DX~k*P`zA7o%1?NwO=e7+$6-mTX4;F09l(QkMw2_Zg?^19m&
zUBBGfO19>3&`<r&^6?;*v|wov>$wPQyDx;|JAvrVW{qQKEt$cy)d9T^&Y^^*NA0{K
z)BjriRCv77E+87aTN(o_c*x4ZtMGQFEo_9d)A{UFQ`iV+r}No~marDa_Va*#{&uTb
zxyQ;qU8OGI5fJr+V6L;0qXN)D#V-IY1mFh^*udX5D9aDSP;5|uf3E(Zpa4Ha0o&J?
z|EsB~SpooXmj8uT1Om3SxI_p%*47|0>$PGS1B#l?peNwTEq@Dz8&q`{;%wIZ6Xz=e
z0Ct-JFC1J?1$b4Kzq^MAzzq-r@Pmd=1wLU=`-3uIobXzAHUzFE$e<2HoGS=2P)u@M
zegk6Eh9GYl+J09Mp><gy$|pe{B5*RLH7KzX{3bAFWc|4EE1$p`QxkM7TtKq|ig2!=
zYySra)a#*XEYC?7pac^dSjYrIII@fjf#q-hfkd+&(s2MV-WnDhHPG5DK|<y_JOF>l
zbyk=RIC=xPBbor-<wLmMZA1M>G<N+HCW`o;*nys{ITe(M;a3?X^f-gw=K=nvTK_)y
zJ*$-+hXv*IDh4pu7m@(ZXd^y=-vE~0w_XY6vIgP860}y^6`Zcw;|(W9efd<wnuiJi
z(p_+sxdT~-<LdgT;fDqc@B-IdIstJ0Lrhlo3IRAk5y}hn6bc-ojo8r!opDvr={gH~
zYQKsLKE!rc8$>#R7+$|ClAzzfZ=YUKXCZfb%}#>xbr8`J!9tho>YN!6g8=*vkePzr
zZMvY_5A5dWx^l`vvm)JyHAt#6ctsAN6Xoy+?<=@wM3h>9aR<&30pm$>8G;392mh=O
zVW<!qq`3yZ!t%dlmf!pXm44$rR9&V?uwX*YmE(%YxT-?AuHuXW{u8^JjJ^CG+7STH
zGPMNe;%&ak;KDBug+LkrF{iI!90@Mt40>+2W+W95-TZ?YCd6S{gQ)rXJD|Gpq%$H8
z*J@?GHqdw?(bhZ>?0koY)ou9%$;LMz?rm^~=Ji$Z|E!M=v2(h*HYw1JhTH(KG;w5E
zo`80{w}a{kI{836NP|B2T4RD)hK2=H`B|3d4~EYTg#vBOnKc29Ada?jcEKwr+lVhs
zkb}h*bZdYThC2w~!1Dp78O!gWuAF%!c=8%)2kKph?-l?l1LCL386qPxBSv*~{yYJ@
z@>YYJ*HlV_Dj{qKS$+B2VAH7^7_%sRz~A^A_XN0B7XY|tsV7YCzuox)hCe_;LDti1
zXxtxuTFtvGJ@aiLFCsE8&E?yvuq+k)nH4P}CtL=ENgG)5#3s(D05V>$?M6VoMk4t$
zhfOpEEVat6nfGe*xj%1lAVZ5GeQr;!jJ6G3ra|ny0ik(-&avg6<d8qRwh22BMcD<!
z@qoC|1VCck*2pkS$Wl2O(6d!)vu>|w5#jM*THpq2-wz_o75}V}8F}qvn;k>~GEj~?
zyF!z<fXuoZ=MOpF4LVf>8_yFkj2j$Q^@m%6v3mp=dJHjq0I}e<G7|WS!ZKDQK}HPQ
z6~nK?+R<1M8%-WGf1vCLzAxKw00eb-u+h$Wg}15zz;2yC&^B=bFdWEw|Ey`#_cn1B
zR6(%ButCyQTsft%=cl%ePoVC~2M}DAb%Ayg;bjSA`N?5KD6;|p5|#onl*8g;@KbnA
zkR)%ro*ErQgl<5Uh&E~YTR{NJf2)N$fp)4R%iNG-83OPVaJL%ZC)8_n=FRimO5>1Q
zxiR2S9#}FfJoozyzzvBT4X!}EdB+j4C<(2|2hg|{{2W6Igv*uN3`Kf`ACl7YUtTLV
z1dCPeffA9k2tyO3Km^7n8`FO1vc^U&7S?G+Of!Q8Wjm^{nYsu8ph@%F?FZNe=m2sR
z0VNElwVD(L&x)SIjTG$F(<ies+f8-^Iz)B~4*MBG@YdT&p-3$VNkH33zTCTKYuHBW
zK*9py48;n!2`&=S^yU=+Z|rF#C?HTnv4ldkx8v@sasn*f2tFI~dRNaMoE+TFI<i(n
zp@ycT&?9#55x)alpW5Aqx9y!`*$K6TeL|sGdl1nP5I>Q?H?5I4kuZ4HAw*^3)pU9w
z93GGj0Lc3`>yVBsa*!5iE#{zeDY-^kUn9G1dK<bo1Z+ix@NVeTa=ViZer^qbSOvj8
zL0B>={InOUOiBm8tOv2o%dXscuMM{r1aFgHWc@wYT*l2Bn=lOP1<(Qne73ge$eJ;b
z(3$_(*T4{vuns~r+nwm$5DVkK;3r^?i1_UVCNDc9q4~n{S*;KChv~0E&{_oMmf#YZ
zK>BR4_IxlQ25Y144+UqZxK{joKu*WC3>)0N1!#|OUkMkoUVaYr{DVIO-VUzibL<R)
z3%1U#hBas|zvcYrRsg>TTnP{k*NR5v3ew7?LAQYmgfFfYOj?1cn>%1_XeHP38nu@3
zpuGIodhD<B;cwE!wLtiQ1i}2l-zGVKt!-}A&i3c~l!(zcNU{m6`@FSm3X{GcMuaYI
zq4RID4S{JA5c}X7V1Lf+CaWa)jDWwtn#S+EW&~(<804&9f9A`G*lFMPK0={w@W_(e
z`lW$CY>2@Hhpxd59dF})00Uhix9ktTkhT=8MxO8>Y-57x($Xup#|<)PCPbis<&@Ja
zXUb(|5247C2+a-1DLgm&p3#7jHvCXz$F1*`28fn|yFzX3IOYnIVr(UKz`XB-(C;ZE
zAZ(otk`nP7cLuPP{{cLTCFuN7Z}Q^;-xCD>Cf+O!K@uFP*UjS3NSkQ%dW-TO$O!t^
zPW|zzK^>JIk@Esq)B;ScKDFgU+|dGoWYy`KJ5AC&%wL|#3$bY)&UWu6s~ti?=Pege
zuX|)sZbwc?q}-X^6sm2_Oga-l_U3^r>7vur6|{piGQ=rdJYu&rp3$FVC73VwBc0ec
zQh^%(6;&%&uTuvdEp1}@RjT2nffeUyU*-_Ufd*$zI)TqYU-PGzIGfpX92<_*i#<{u
zr4jYqV>0*cs&#{n2#w2&a}+JdTSk3(TLW8ghrVQbV;NW`^duaN^LE7bZmy{MakUCB
zFYhaccQfU$vWlun%5UF2z56ZSV#nnQ-nGioJTB^eA)ey(*`!*wXuE{6TE{E3L1h#A
zGY^}F9E;_@f2V2xVq#Z;t!ds@{WP%(bBs|j{Xk@~B&{!jqKB>^`;UZg`69I6P6kw?
zL{z(re-e(UM!8-6y=OG<?U0l7HTgrA#wq3ur@oe)DY)KxK>eT)zFYyl%Y)+*+V>oy
zxSGx?Jr#Hnk9wR!{ik9{z<o&!T$O{OS)M-Q#vkqXRVEXW(p?#<(V3bn%Bf8i@G>ZE
zB(<S>c<r4!kpc;+g9CwWB3FkRTHj}?zC>RO%yi{`h0L;hD7RmSW4M%f4tx9>CJ}Wh
z;fv~jA6@QVkVqWPbRz7C+9Az$*QiO(C9Ix(Ze~)~4wHEtet)N2OpE(+fO?K<PI<5O
zj|@xg2FKrVc@8$!`BKvQ@12^+oyw(e1>n=mRw^BOi>ZB}j`L^Wn^2Zq`%*FT3kFG%
z3|grYN=jXoC~s>|WJ~EiehqL(CpteIJw9NOV0S+EW%|LhFTFY?B*Gc98`aNthbcDr
zi@ei5;#cgRg;y=fan_6R!ZjUUsY!F?L+&Fj{;U`F#weaRlM&&`&BSwidZgaFMiZ9~
zpGn%Oro_{!#-K6<pQ&^*NOzvwe)NRBJ2O_MNMY^VdrG0V???LsT}cSE92*GBEZb?s
z_i%hAFua_FjTPZ#=&$=$=1Sjvff}kbS(E*4<UEX|+BB#`>VgHX^cRUqm&nQrE*d|S
zyMQ-B9XBhSC66Z;jZz%OP&p_wF(X7qhxb^7oHXurP3O$q-l7M4-Ll5N@|jrU+YjTa
zusxttu_1quru=buko8<@Anq0MYD(WHrvqE3P|Q!^i!wK5reo5Ly*b!SK%{+56V;6G
z%13tsjy;jlw@r+cMA937z9xJ=!_)XK`pvAV?b+z4jHmc?!A0gi9vV+k^1g(Q$7!f=
z+P4Na({fY=h2E^5<Oz)_{Bji_c(AEPl+Smco`(CW_iEC;)k@uJ8MwJ>+<XTTm`DSL
zvB_?{?RZXbr-LH*c2|HZ6J2mETO)~c74yB$cLoFpFTLzHoHBkb7t>D9zeG(eE5hNU
zs{G<-6uV>PiNH@iXB+Hg2Q-T37P7PEf7@ZHQ_TQ^J22#Mgaa`O3?vKq;(uT}-xyYL
zshW=-csov*NsvA)T=Gcjvjnprr(ZA5J)5l4Du(sll%Hxl8+=1P4-;@mGoQ!1MS9D&
zE-GwBG2|HWz0&t~zqGtXz4fpk5)DR>T|Fts#B`DG^Yz)e*l%MZ0-b6mvo{J~_8w|t
zXsO35Rxck3Wfqc~j={-P%%2!cp1v6<X>+dKCAFx9#b_i|>wGxoc$LZ&%CYhiy-S_x
z$3CTgKQwnVdc-kg>>lm`kCviqt%k1kh9-d$x-aYca|qf|aW$Ln$ZGMtzuDo(mHLK#
z@^)T`^TKyFi#wLrDlebUJV=~F`Azt)*0Ub@7|qM?Ma=v$1jXM1SOg>#SxH%3b32ZI
zIZmgz=v#4M!1T^VBWFtO*Htu%&i?QH1&0(pdBw?Jhx!J&^S?<OD^4Yp40Io+cy%V@
zN6ha>zP;z~j(k8>uo3CG^3I5gr?eTJie*^%%HT0=UvEtYd32f#aeCdk>mPLZ?WWCr
zY(ignFbIdV{kk8U)iW^kJXYlX*cC2D{cma#xA&pD2{%?~R9TE`4lc3KxjiLY>K{my
zc;;@5=~I30qV~e$sz_>yYwuKj=2at!&IVG`-;=l!W1;Y{233uk+J~78JutnZp^zck
z<guQ~4J!w)aiM|FLaH};JB8!Zqi=b1O@3lXYU$m7`&+#7Sr^gHPvYXAg+l0B%9{<B
zmi&EWO5+RMwchn#pC7n1RaI`XudSel`rONf)^l@c7ZPJr+;Bq=5|{n(Eg985Q8l5U
zJi)NH`0Ry)FFa{k??wzJ2^zk;neG3?w51vQ_vw!Qo0%1Ca|`0vnfg?CK3+aP&2xh7
zz}+W+fc+Kwmc*U7=B^nym$4OEt5u0UJn}pw((14}DlVDXp)1!+siRJrU$9t=Bj!8t
z;Ib8e+ApWZ9+7)a^wMd+ETT+*oaU4ZD7~z2kVnxhka?;_Q{kLOMS$NlWybW<zNb<p
zS@BXLU1b6GNiKGkWSZl$*|Eb0Q|@+^f|)PRE6g2{EY3Yze7dfy>`L+JGdZ)u#RG>m
z#~1X*QG0$})*Sbh%dwQp!6%BDPni_So!_VWCXvV8iNbxUBdx6ZW7mROi_I~=v<3Iv
z?@^lLPk4&OLyHGmi^T`Ke%Z7L9kUDlO4hS*Lvz-gN9-cb`E2z74-8eG;bRiM<jnKp
z;_euyZjU(M9(fec@>|E1dF)(BlurBI>#BkK4i>~3O}9$+jS-IXHIbtkjOy@W2R$v_
z%bz*_djA|NaaL_@x6NFy%1gh5$RRJrHnXy*-pr@n^?oELX$f*7hxEy*7P<Vf75#>8
z3l(7oF_In6dKun1cBYXo4r}_eIZ-uXCF}2zBqF9qJ{_}dJZD%5e;*l8rXQ>%;`V<x
z^yTGZUGh0zM&DT<sl=ZSp86)qqOV4ue>RP9WeV$jjrW<8X6QpLT}c?ZKcMQdu|BGh
zw)sTR@gI97`s>~4a?=Wjqdb+Of0gY`esbb5*QK}@cyB)j-_@o49LSS_qssEcvh}?L
z??{XYL7T-lKDrbpxsn&J-UR-(?hh-}N4FhPWs>*fmU`W$&mR9F>U-}69UQ?bLUX|-
zbVWzC9zxx&I~Z;6V*5-Ay6zCB%=^7cPDu>@sPYNxQ6|69^Y5PpQkZmgpXA4$3OpGh
ztldZR-YeTvA=*l!;-D_2QbAXPwW%PJ`b_B_AG-OyQ^79=-ihsbMxTa%$>*c=AXe3I
zedm#B;cqv-Di060VJx}5(>dzbiZR8&+<Er+a1)B}BKi@5+B{RnF%brzHu9zudXu^-
zuW9O{eA_hbPbOcgl3%(IwD|ML!q)@8M(=l>A~_o4B2jci>5DVb1(hncYH=Iu9@8Hk
zk0wM~7WtD@8k^%)UIg`>bbg?F#zWBR5>M_7Nz39@!}B38)%N#QPg*&RPUPHJc>d@q
zCC|Lz>sN`7e#o^fUNHI$c+fvsNXb1fI8>O(GjAyO_JEA{5reMLl9;SED~HcEX!1Br
zGVF?ht#P;JU5M=7%q7f84W^H#){hjuyWBiq;!nn2i=yiydq!2V&^PoL^IbfWG1K_)
z^00b+ynP)!U(-76AL`!>(vrPuWiXrY0!M|bVPGN|jU`g1!$MKBt5u#wv{C+x=C?VV
zv)7`tsWY9?iEtYT8I(Jj?E=N|-42(sN7d`x*LQHgpp05fA|&j1E8X_a9J5`!Kc)M7
zwi?_R|3t0#R_sPeGKL|qMhra@o$4H`>feko8x<@Jm%36**A!BI#l77sRZl4vq^*85
zNwLrUn-y1RIK?OG)29NN9u*QWj#GVL%v98r)%5hCYRj#W)AOUH_b(8l!Hc=1VMg8E
zVE)?iaNi|`01r1yTkV;>w!w~#O1RP4Py0I<xxNApm-KN5iQUH}l_xrCdw--(PW$z9
zxi_eaZm5fgy5xUXdE~#Dm~2liZ}yZ-vbmFca@MoD+dSzsYe3+XBYlD)193#D$;^#$
z=bN}sg`5<Ac{ZMZLtqygphhQ|#e*T0cegxqZZaXOeB@}KvC@UJ99_oaNk&ToFH{XD
zewA=MT69z&e|vSv$c3r4kdKO8X)pWdvxViBGjBN3CPgMK&L+*gao0H8JT;tp_KIyx
zuk4h8^NaFSlFEJ0N(WVaEG<R#bcpnHDBftFuRMEy+?(y>RR8q3w-o0q1L{~uDXWrv
z#sn8NsHI~$f2yf?cbB8ykk(c(O?VvWIeJZk+th(6Bc{UFxL3&ExJby3bdp1r6orYb
zblzftN`>=FI7S%JFp0%^(RU;k*9@mm9*AIhbJ|Ja<M1rbPqI5Dm#0j}Qx+wo1^3Wj
zCr}^A4dr8^4;QV=_DNr)#*05{WZ@Uc9>v^tkWqzO1?|0=!+=7$KS?6-%QvhUW_)+Y
zXk;&ywZ?^~t0zytv*&1v{7x;;%MsR-9R3nrA@P&U#IqZ2^LL+B;|6k2Ur9^#!A?2s
ztNg*n#o*o#ZX2C|S^;q!fp@3!Ieu~Hi?{#0+Gde55Jswj|MWJh&VhxW&Cl%R?Rvwn
z)9nfAF4qkqwf~S-$Z^&oHsgWRRV@XUwuzV-IVP(*(RW?JM6)mR(1+?%4l_OdYWAq6
zY2g7cYAP|G`=ZKMOlreRWqN8}1c%vGRPjX9G}zxy6a+OYU<(`k{18d5{<&gO{T}rX
z9}PeT*$*0tH}9jAkIM$_PaUZzS6d8K{apO?{m88(mbhk*O!9|plqB-jN@@P~sHaVR
z3;E2$9&kHeQI&fpK^gDLD7!QeI}@a@H>W-|s9Ye#pfMUeSm{9+LtbHD-`Lo3z-idv
zR1+naa@?<cEI(BV9xR*|;!IAGw7kO?lm^eYdD13KNnKPNbS*MfoEW!GnZeT{ZIkx5
zCHB%iGBNhTR-7*h^TQhtX>a=PuS_B>v^4L}W(TL{1y<{);wmZz3*AVw%Ztdvb+aPD
zzh>=zng=cG45nK74U{e!yyQtMK{j>9?#5vT?l~KjhZe6*$AWT)nTkX*DMC-PoaX-S
z!tMF9sg_TU|3#(5{!|zIju$?RXZra=PKL}C2cJxw;~=cg80@*FYJn0fChTmFs@Suq
zS;j74&OP|8%Z%?U<G~WC-#Wo3OXhNjs=EhE<bJ;lek(F#$aRsj&M9rqk*Jz#rl0+y
zVV%?cImi9gpHoXLyZZOH8+zwUI}In9o`12=!?JddO#ab*R#CoUeO?XyY>R|J^D?P(
z*44}`MEDkm6E2bVI{bPO@zArjHhZ>hw9<itzZyT`81ZX1k;(|BGeV!ykJn9QVIAII
zJv4Y$>bGie(Lm8XF9N%Ph#LLJ{DxR+SdTOZdzdcXA-}OO*u$2oeZ2U7`M_bdo_UX|
zfu6zdRbmFh-T8Oh+l}_cp0?1qGx%N8-OIaxEl1msj^BVm+m^`ASVc!lL>TYRH1n|h
z_rucXU$hhKzma1@<fu_|==c>^&%P9l8!gfP^sGm$<kC&-ZO0_fq-gjn)!W;&2Yj1V
z8`Rb3An}S&juv2f$jdD_o)zWug|1jLL4@fU^(|VDqk5$$U#nN%6JjR5m1>bu9#CHt
zm!3kDq3BCXg+?`Tt|6h*8DH}WFDj$IOC;_74-fdvD_Yd{sj(C(W@t|wP@{GVzn>y-
zr;Df@HCp?@(<i~CVbs&1ky4RDjxG7Ly&0|#cx7#<o>4Oy5(#qjJv7y7lQ?)VN4iUp
zQj9$EWBLpRpKW82=G4Rf?>`+rl3iQ~CE(?CZEgS3bd^sTl_58N--qt33WJU}Ge;vG
zY0y6y8likOU_jG9>v|xt#K##;{t|XYP;TY0)(o~kUhh5W?=&ne7>#x`^-G!3pG%Zy
zg3b+=TvpC{T}Crgi@|@(N=hG3Dkxc2`d%z<$pGe3ky|aAr*gJp((xJ2e8SK+vp&Z}
zAB{xY$}6vIH5Upp<8LgHGhDW5cAGGb`_)0<dn~Bv7*0{=KAq6P*-@3fVU`l8)O~~~
zYQKJ{ztkUgZ|MF=U+aAaH<87(Oh}JVqen03Wo{?yKu%_%;w(d4<Oz$CyzZ1Lo#v{S
zGCwT2x`>MW%XNY~n4erQ7}JTcK1BEqkjQeSf`~B}Kjd~GA4zntDON<3%<;j%z0boE
z(sjR7J+@C~mCU)G&hjb0ra+l=NO0bE=JkOK4ZO{#n;x`ZRqlMJFUWk~P0rFuONZ|J
zvzlO=ixIPUofkz(RZHK+U1jnnexJ$m<J{9<Oeg~(Mrknxa*5qPj#2U4qHjuN`b^03
zQ`j(D;gW`7i?+yc{M!zUh{%y^<QA?dRZocSY4odBnF&>eo$8JBOgtLs_~^PMHmy?X
z1X*7#VT{`V%Sd&|DY`a^nB%=1#{$K^i1s_mhw^*9)YZ+iDxbBYYc6E?6!rOO+I_ZO
z(h2LhqOS@(jUO*Z-7IA?a2YXm#$tMhK5OMv#7cN$UP2aEnv%L}Ps)>8!n({)`>fu_
zr@ad2Eb(lqa;AUCx=8i>_^~5er-^GrDTKs726hb-++<4ke5P>x7hOnSrAWD=(XWgC
zN>ep2!v!w0WcUS^KKj-*p=?`N@#YA=z+30H6j@&8u0ISTvG}zM9fNJNMf{xUnlO5e
z&%7)?omnsL@B;5j{T1}GXjfiKi5m`I2|DoVmCuCYY8WNlkW$7?iUTa{%~8(xC#2?#
zwRlCAoKr}APAIC6j65;1=DjM`#DadlG&i5tEm?M|z@N0!HYm>}Po1*GG~YvbTp2a&
zI<G_Tp5V?o?s3|Zn)(99MHDXDE~<EOG746cTU1<theyZW<oQ1E50N-uP#Hm%n@}@M
zDs{yK<(iI1wlAQeP9!uDLlHZg?ggV}vUlNE9+NV&P~T^QM|lQ6UAg**sVqjI?j42W
zbh3b6Xz3BzHddaL_kDM-6!7%2($Ax{+H?iC26rbWvD}xrIh(D=iz4iFnxa|4Udyv6
z`&{bHzCva{_hbTXsw6dkW^0efl>3cCgGinw`|}W9l``LNw_mUA=;cERsgZ{IF(M}f
zI%}i|F*qp{EDMe53PN;3=~F%~(EN&u>rKx&-15lA@>&7ao#bFju8t1k4&mpzBo}j@
zygHb@z{=k8JPsqIbFg`T=Yc8w7v;U;1XCQUB)Rb<?fI69{!Y?ya>tJ?co-k}VDS3M
z!Gs6m;uy5%ZSCV8*9I>CFjTvkJ$;p;REFdY*W(b6(*~`6`-S#cY8%p4;$XzepmyH1
zbjITty_Ryg@Ex6b=3eRm+y<T^a^dpCw`LDN+)Mr07n2mzOwEZIQG3mw?&qz;D9>cR
zT^77OuU)ND>`8WU`n=ryop;TT(bS59mduWi$q)1Wyz)2zqYG^YKQ8((RYrrxYpO%G
z5B;^fWtksbYMKnG(w{hit}XlEsK~RsN+Ly;hviy+r{7gSpvCZ9j;B_S@@r&{IMbr)
zr=u19RBr@D-sT?{G^7wb{03#;ue15dOP!qOY_ShCjn-EhXpk{?G~JQHZ5C7@A3WE6
z?O+BMPZ@@KV+=i?8*Vtm1YXLswg;()6C~fiu1GmMmFAbzQZtHqwktJ;CWeEgXReZu
z|B=k^I7R=OAO4D5zD$`#dwUh|@J%dg*afK!!>?MAvhJ_yE5>&{{;aNE_w_`~7Z)1-
zfe-T3fJ6GdhMCWzVimg|CXU_F?|!L4U0o-Z`^B4w+Ex~w=7gcM%IyLXh1=5?O(fiY
z_%AeN6rOaoS1AuNemW#_QPk<nV`;sUr?3jux|5u!qf{R<MS5jQ7zG<YQs?E<e)+EG
z8@}2VKchFlZ`YLyT2OzCtPBzKVEy<hMDI<A0p=b>BV8RP&tSsywVw0lEa$!s8g+V^
zC+X@vMz;<WN)dgXpKv^p)S)~0qpHe5p?enXl-jp38~{(BtAA<eKcMighkcZ(>$J{T
za9YCeelhOb`_)bpxkmRf#<Lv=Ow_ylM6dji@0f#L(jB{YMGmJEbLG)Rw_;|~+pax(
z@IZqnW8xKYU&fCoiXD;oBBEW9ZCBlfYl$BxGZpIvUbu$#gx`($rk2z}ThB79V!S>@
zSrQaM(vf|}<3)j<q5R>MbB_dZ%DN~=oTled(r8`wu{kb&cy#^2x91<lGVcmMHCZI3
zKc6aC`QUo=zR3^tpFgB)G@mr((nXW$iz;}_QI5-o8P-XiaoV56y62&vOINN~a*(KO
zz6*+kko1@WPQdw(*q4-W=D#GLNpl?eF5)LcI(gx&1w(7a@lctTvz2##9Z_9;(;mZl
zm$S#X^}{cQ>o}D<(fvfVl^EZx#m4pxFjZ&b%KLWDEO<sJXjTV2$9JlhA<yo@mAiN2
zW#mP=sjQa%t7LVRLd3%UX@ZIA^#Mec%*XDtFW>)L(?NkY58Sg~V_XQicaZn<h?>*0
z_xBs`$I#2`^*oM8J82@8>+<%p{`)-_^mY7yIip+7Wvfq;(@I=myMk`oa;eT-guG<I
z5QjdQl>dct(YuRYpKlpti6^6b>v+oxbDRje_?G+K*UNKa%yiauQ#9m_nry`61l13Y
ze96bRi)mk6dPrc>X*R^)8q>-V_^GJ(MmTTA*O8dG1kH1GH#^dnwf`0tF)P(iDqqeU
z<aV1-o$YbWD<mut&11JtY)Q){DEPJ4JxH|lS`df#+loGxUjXSc-nKhIkENe?j&pqS
zbH}XqzmOeoEPA(0kJ3Edsno1kEaUUDn*K{iXGPLmTT(o~%naSTy^m)B=k7&pk7MBs
z)pw)_4!ykk;p))mJtkyb7^hi_k5SlFXZ3SEEjgC?s`^pGk7w@lL)}Hk>`E@Fp{R)o
zxj97)NmgoAE4vUX9U&Ra8<V|l8glfI3ARYI*@syoBF9ND%TSxt$G0xMDviA5e#c9J
zqEGnX!83y6oMx|8Fs@67ma}*T#1LTH>vwsJc;08{K@;%zDXckk?UDF-y^CFz*7Bqk
ztVbjBZ@gS=9l<MU4!>P+w2EkQF1T|hF8EO5RX{FP+;qiA(F_Oatu{N)Do2U1p03J>
z1hkApE<H1ksfRE)NnV&u-Dma{wwoEC;uo{^dm7)0asqELsUY!vDfZ{eW?=`a4ziF(
zrv_}vE;w`WpopKL{K`5ZH~HbGGgm>#bZb2qYLDmHUh!Cy-bX2wOb<1PB}zN?sWRN%
z+i^whym}JuRK^38Tf@!*zwfeIiIVOK@1;HbTO)vp(CGR}4NMbd)JumRJzu=7Js2|W
zQxqVN_NX?l<6Ha?<`gesA6|y-?8R><_r4Yis#7<qY?!|sAJDTXAcytX`hz-pBL3CZ
zCKYU|>g1eg6j7qRKHnK{1TM73a_QUbJ6Xu(Dc~g~ZmH8urongc2zIp7mpxO7SW_G(
zZt>2p_P=h<PGxur)0mH74lC+UW2Ny|lPUg8u6ikMQI(Yb;ofzE#rvXR{r*)_xr^_6
zG!_!>EfSLK|HLh$p;{Kx8qteS?9He3+vr;3Z}s|~MLoWg^E%T?p-PMUnS<GX_1nA-
zr+e1BXU}`hG5#_me}TIM6_b~R-l11J+z6J){Q0c(K<EY3w{!=+$g7WrU(lGHK)?MM
z|1#Zex#!&B7cg>;JLlPSqDog2T?m)Xk&vLFJit2pm34L>>ufr<xB7>R3K`z|{;#w@
zvax>CKJY66J4quY?><2;{#6klt}`~a)B1Q~Bp2ePBlc83PH~lF3uwjseDIv+^Z`6E
zir=gOzkKpsvIOTu16nao4z>H%lBSn-OBnnRI&^ceUAmT3n2+p2lC+YUC0=VI=Ci_H
z+EL5M#a>z^%ScSK5K-EYn?W33ve=^{I8w9Ts*|YQZ7?rvcv2uckZ${NFY!3ZXx!zO
zwkSj51yrN;uiUYO2Dqr-u<3lbsaKmJzjTzx`99i-qIbNtcYIHv-^MY)6DPbNI%g?5
zC3Bj0SRh20lQ8+?GchiW+W}qAYpwY?zq7G39`B&4R+N7=T5w?+{kMou^qldYlXYCQ
zb5Xg?a=NeXPU>b&>fW8~$(m%jH}C!>8jtQ6i_<>w=wmjCT0b!;8A}`bh8}kBk2iid
zajJhTsD<kNM5^QWVao2NTfZ}-#QK6X#a`t<^_6zBzBv&TB@%Cp>VBH<&RcbbF?xC@
zv!ImZ?7f9UG=4^vG%R^3UQOW=LBzvqMEHt2Xz@V}%%S^D+M|e{7`zs&YiGD*kM8na
zTBF7w7(Ku~e{4whNIDHMv4~m+7OnF+vmcLcMAvFqc{~{U$Pr^Ie`Hyy_dsbR>0$Yx
z7R>A_7364xf~S-#t#Ai$KIyfAL|}0smPbT=6B_v>ClxBQ2}VKUAhBI@O0!TLNvYAJ
zU@GpGK6{fYVd;o^i=wQum@ppU#U}Fo4SSgPqS#!0NYXMEDp@;9)jofV;kZT9FxeL=
zQC0S1s`glB>ZiDlF)O{tCFN38PD;3OvkNaISTpU0X%<6WAg0Z!%lXNGqr6AD=jm_C
zHIk084xUTQzW78q?fFPaeLl&v4?TtAAr?Q`yprqp0&I9_bt!5HJI@|Fm@SQpq9}2h
znuMj@sazq1Xi88PZ&KjB&y+ybsmJJ%L<`@7Cqn6*tPWhIVrDur%f);JuwVZkI@kBa
zbh%iq6C<zuubSRNXICpyJ&?mRa<VL1Xq<$}pih&@d>@M%)%EL6m8tLexsR4U(VQ42
zFR6YiY56rpq3?o?PK7S_P+#hEsUixa@P`*}57Q837<)AlaE;&;5Jz9dK<y6$5WU61
zVozi&zW%=KA^xk8r~TT-pY@(n&QN*um8Muv;uYnv)YDwxBMZRSn6MH)Bm6z&+u4jW
zgPbF%K{Oq>t#OymT(+rW;5Q9ZdoZbcO$C(!lZF$^^aUa1^&iB&1UA=<DkixN_l{nR
zb=5<6dhF&C++;<6hvz`HhFG4JZ<|Kh$Xmbby}ecT7~cV*I`JqKBzKL~vt7{p?+~AO
z7stnwT~BmPDnIwOY{$^Eh>;_*FSJ{nby}vck0jx{7AK6JOQfpwecM9$xZ?n&w2Y5R
zf_y%UjDFv>9)mqEl+ldM9*70z2K%bH%nKBsVXu%dIE9LX)8y?X;cW}J@3`<HBY{pF
zQ<LB9sN+~1RbIS)qNX^pO>W)ex{*X9?jL}k_gml4>I>2gF%G}>t5K0J-y1bv-SW++
zP?}dqbC~H)BwaamM|-XS#bWu<llM`3UIgY9e@&V&5SjK7o0j2oV@t<tG7%^bj`VhD
z*OnRcS(vkZV5(&73?Ln&+uK?9%u8g-r}84*3)B>wu-iG>*nru0=w}J2Z>C8z_KpfV
zzrQ)!b2S(p&FazuGut(Oze{)uxRiYM21BEE1%4y6v+Ae#tj^~#N97z+%ZzcKQ43L_
zI=FY3J7d6>wkN<M&BFP1@eMSqg&eBb>bAV^yyy7zGGF4m1sCAr5!#(m(>`#_=xL3^
zpicCFG~**Y{2#R~FFEt+QJeU+*)i~V_m{d9(PJGoC!&zxXPoo;8UF4|(zmW}wFAmI
zVrS9a-}>SBKAuIpX~LyXjMqJ3_4P>E8GFndxR!R9!%Qd)iPY6pUo{_9e3yBmdg@eo
zO+{48T}_1wiI{W?_O3o*;e%#+RQnFSdiFiVTbTtd1IuwyAmo11N8Q;<{n+WC=oH5D
z@gGt--Mui6HU0K=dg8+woz=CVJo${}^MUFlJf4#W_Y9UaE6W=8+>zIE4f7ZK<}Zv}
zITj^!=m}0r{I|RNK6*Ad#~G#`8zDL`5$mZ|O!Fd<*Gtoho9R2oVQx`s0i~9}8MP_=
zoHF}t^hjo0lW^f9_HO;Ggf5q7t{Ei=s5cN|DyQnEGX{D36D?%b6-CPrH!0e4Cv)6r
zQV>ZjVk}Cd>PmFu&}T!}RMxHNdNgZ`(XL<lJkHb1A&Z~%W~@-p6C%2!l%Kk+)hq-(
z4fd(fC+$~w6ZrkU4~40Ctngu%?yrFv?-FpRv~T)9Bes68qJGm~X8IB9w9GWUeXVVz
z3g@?xcN_=Lv64k4xYeTI8Dn7|q|iwrJV2qHl8PO6w_WxCg>FjFyFCH7bW)U9`R+<x
z*S1mgS7hbGP01lRXU{FI_43F9Z!?a@uYgArk22C*-^S`CRhQ^={XBpF{@1eyqVwLr
zwZ`-^4FK$w%zS>@s-zvyvg?CndP&>|;qL;B&!|334Bc1=O{^5p6LO+G|Fj`D++f~A
zHs_81zDq?YMo*YzS~6dfNV46jI27xO(=+fDH;Fv!TpH&Ka>=3$gIk8p`PrnF1ybiQ
zZr{2|#$tDb;)a*AA-4YAK)bdAkJ^HO(O_4J{PW`kEK;#Ij-)YX4f)@F(MZcCt#aao
z$ycj=yrk&4-W0r6y@X}b_ap;8E<O3g&o!5_P?qnVcG_*AxKF9_fTZ;O(TrzaWrCvn
zyU)c%EV5UVG?JWrT>o?bmqS7LDupKTU-nacI`Qk%MY+br;gGoS7sMLQ>26ko><<|^
zlk!^GeC1UXZEulGwGDnIZyY*jtwo6PCc&mG=2Cd|z$+nMg^&BNL%Qlo?ncXwnTK>W
z)8ZD$QpDKUKY7j>(=ae$>6{}$bTp_LJ*65jOyDqup(5Xwf~orSx)Otqdeg~;hkU8>
zj9A{yW`lQP>SfNc&sDwV&ZnvzBfO5C@VrNZ)kaeOu&Zc#yR}+gp2<P#;NN_Gx-M*t
zoU?%!P=lCoP_<CMjmj>TddX_rt1DmJ>)ZMJv0>^_rsfX{)DF0QS5c;oUollmF<P8R
z=+fTD$rAmszx5}lIKX(X^L%)Mzqx34&1Ih-=4hyb8H<|i0}NLSLSMJ}RAW0xQgsl<
zEe2)B#c3v2;Q2C^D&MPUxA7K!g(mt+>-J;c7Z30QJ+vmAB&h35aoDtTB=1;`+4Viw
zZ6>KO@Hl>wBjQ^C*YzbWv{<K`s*@qrMvuRL`%ZMmSX8gV<Cu1ZRt4jUFGNS=6*ch-
z2Q24OYb%atip`K3oSCG2!(6W|K+JJKPWS;II^j$kon|xvU|HqvGy8eLR;NYzX)?|<
zxso;ZgL{~12Zp3@j4w$`6DpX7e4HDvWd1oRov)a$Z+FioR^zuJbA+<8#Dow=)6jnN
z2Y}+BBe6+I@qWy<#i&b4I1;L@()lffZj4I0t%3ZvhHZybjQ5^=lumL=18w}Yd3q7X
zF)=ypxsc@1pH^Su7FfiI(Y%G8zk5#~)gs(r;$2nyvyn-g&Yrev-k|CZtC4^47;B90
zHQJExdOEj?P5bi(9`(i>T*vCM(cn+`OmVpT^r>N)+t!7rl_nYthTj>QhZK#xxo*{O
z+K?Jb!n)7kn@XWpSn(UG`{|1h<*f&E0xTLWJsK@~s{;@AOZBRJM(tHOJ`r;?_K36t
zAwyf|0mF195`98L3xD>)BM%!CrDgdqd^q;Jy!_~e4`&1Nerxv*j){K??ezK?e=dhp
zBVWV#0l&=kM#Zug*N-IUweuPE?xU!lcR%D1V_KP5acWw}m()RKhRW66>G8K)4z5B;
zpENRikNm7Od|yZ}J@o4LF;627yndO47Xzpt(v4ZQcu0KTP(-zw&?tx-7P%PT?@Z6G
z<hUo$^ND@}D>Q7sM@(cdA$ILPE&aPEh|GD+j-M9%=FX8_>R|R<UE7<ULQl0FZ>F5t
zk%iM%>8-;xj@Md5Jnu*O9=MX*+kL4kbTJeEXp3<aOW`^7tLw6Sy!*p`5YCw2aX}Az
zVSK9cUS3_rqlc8N$t0cwKPYNkeN;|mL^3Cuwx_dRe##MUT6UyupxfiY!b8&snPRtw
zE5s_MJkc6Oi=3*AyBu%|Z(wi{sXr348L=^ll@%?0Xea8G_c(f%+9*QcGD??Upe&g<
zhe^^K&J6kXX)LTSm)X*oD3ce%m=+?1D6^;^6RUTBvFXxfH|C7e<$OZRy1@TI)1g1>
z;q(15-H(smbnY&{$MHt_!37ezJg<8!M3V_TloXuLTjMy-|Be`E3UwTG)>^bzb|8Cl
zS&^+EG5>2}?{U8?mT98IdubZ&BCApyrf^@8Qy478%Ne~S;!Mjoq9sz;L(aigPmKB?
zOxV9d!!Ntjrdg>;FM{MOB?ar%&~6R#_;9M;^oA79JvWM&EJ?!fWZ6$vn9-BHd{W=^
z<j0d^1`Q_~rKHOE7R2YX_*`XB1OhDdU+^D|Ka%~RpMWfgTj~;_30i%@V5puNhrc`x
z?^KaMRGZ|pS8dl0jMjIwGx&}PjmeMF(hbIIk#*;yv0wL`Hcg{RN<<Gwuk#{)iRm!u
z_~cMvfqGb%&?rqx&Lz^LB>JPW79j$^$6h7-k{Z5B2&pRRAhhTRRbYIM`XVwkIV9}H
zjYNQMn=RKTr4tdt3eQoV5?OYc$r%f!i930{?I0g^DP*}RxkzpJm^>#lQGwSy=u=#0
zi_No8ODhao!b5S#TR+H&KS>KQ$qw5e<bF!J8e{n?)Qu_6$Da8hTh4Y_a&S1$!oiRE
zI_rZ(nJ_mii7M9xYKL<#4r+LCPdp~!PxRrRJNwx*E85+Qh1y)#Frw6k>Oe*`VDF^H
z5Y5laZtZkeyQG`me=>a#=nxmlL0c#*_b|9YhrExGw%@{{Jka4f;gxFiqZSr-0w-c3
zjcE&&<UB&Kdan}r_N4{HoFcF!*%SE*S20-nGj53V=lu-Ewf8HBCv1;>PQaPG2SCOA
zO)VsW*0N_dut7`)t6|T)7F|cluw>AHwU2bu$1&2<0N;kh#Ye1TrB7Zp9=sTxdSNR0
zP<6!BSS-AdB<~xuEOal9JJ?f3?PHQ~Z8?(QM%>(_7%*q+Vid99_wwhR`|_<*^yeQD
zTY5ZkQOIxjQ2(m(+<{x_{1J*FsPXR>2__;&B5-cR9=vxhufT|gyn7z=%p2AC@vCnp
z(nUT|Q6DoEv`G8l7JKX2e1yNQd4Q;$S}C_sP77e7J~sJ!{gC2QNwLwMvb2lNYJ1Bs
zAH00{W}~moiRo(-wk4l(e&g)rm~f}CYE(`~z4;=k`+-phIlEn%aN8a)^al6IYj};N
zxbMc%^k%&aU-hxx6LZkse|b_+IUl#<3&wtvhZ74*R9}Vr=VQoz*-pLGAyQ~qv}_`v
zZzn>}Yi(=89963gMBkU4sb(`N)bDrMLN7DzV%+slgyP})Jh`W8xC25n>eZ%VoxUG$
zxJ(il3Q$(76sYg4!`v^)bU^gpsbfmC?X_u~eZhEdo&`F@Vh`*Q#E3I;It7UN@hIsk
z|1GRrbyr=yR6Ti_0LB^)T4jslgl*RtBK&f{H~6?~wU>>k%)Vs<+?or&poGKUD&$|D
zUXp$1=J>VffSV!LqPc{w?`I;tdH;0E9ovpC3}V?-S?ABRcg(yTkU!b+?z+u+E|##G
zC*Qgm)TW*;MPH<OnaHO#qjg|`+J6@Pk&2qW-wDcGVu#^H7uzDh#q`Xkk95-1`R`n@
zCz4Z}nSXMnyv(Fz`JB*HpkYTL$}eh<8!LPGRke<O+4MUBb|yVn%MS;dDZ^bA7$^gk
zZVg%cdR`n4%yGuhsG%F<XHcmdn~nXPuy27^KS``pkeBD2m6@Wb+*5b8jKWb)Cc8&V
zw4>_i9#R4<9hh~d>d_;=l?yx-8O}^LHfqH4JGzN8C?=)x)<3?%dW|bAsx?OME1|l>
z=}a5<c6$cOjGN)-l5m{L_{0QrE(e=brl;|I!48;g#7eGl4ZhHZdz7<5`Hn4<()9o(
zCPm%K->*Lm;*iO3s-7UV#=&<;ZyLEGMJkM2z*nF=YMnb?6ukIUD(;cAi9&1Ic*&<y
zeVi2R_vU6aO1i^Dp1Ryk^|-TVJ_<M#aT{JfRNMEADTMdkJjEhWm)dvyrQ|2}Gcgrd
zI+somTU89vnR%w6dJIdq_7^KLd41>@u48t}YYKnLe4&c(dCGnn4kAi#53_XcKHVEX
z+QVLZDzHD)+s9LO_r>Fu_{YT^H`4{hbl6SCIE>7(_c{QuI~vaYJat0kY<^vq=QCQS
zC-0h{CmvV|`Fe-@DDRo?q6ylZDBa@;XX`0v>w>6n{Tk$x{9Y*@7+5cnBj%iL_33+x
zqS@Zg`eSsiykxP87sJ1{lLg-*)QZVtKAAen_%IOl^nJqkWBdJl(oQ`uvD=I8C*-6`
zjMiAKwPzu{hN(uq2Ow)#$W<|q9#KERpBK&$G2R;@c_ho4@UcaE4XvME+Ka3!r79l<
zLg}9O6^q<qn18$f-usuyVbRx<^EkuVpDzylu8xcRF>$+PsWdxZ`TN_*g~i!wu4cD{
z$PdiU&m(gu-hT4R#?o<dIs2nZthlh{-oz~$?Nh}KeYAA;o)miLb9^3`6|v`w9~BT_
zq@!$UcshZ9aT<-h&u@Y?_sxEXk@h%Kwt$D|{lZ1QxYG2##<iz&tC-F!wb^jZ`mmMZ
z3wB>5P3jLgI$R?h62VEjNagB?XLZu+!-0L`a^(T{90d!1REFI1KIz<h&)Y)XRfJif
z=5Vv{q30&08c~tvebvA2S4Tw-^-WzE#kUyt(;v0?@#FLL3Y75=fi76$geEo7Nzc^2
z%Hqon-yj!0EvI@TGWwwUVOK8Ij~9a`g1LSWS7^x}RJCIw<o<OJ6=Nn%!|uwA*Qp#u
zjDfPfxo@tQ00vGv9)3N6rt=w-RC``|`kMC9r7}Bwc9&u6oLBf<g%2wmF-i63Z)(r~
zPJLN?bpE;1MTOk^`}~fR;7j3f?4>Gx<>e5$|6J$g%1_)b-1CbO6({AW+BoYw?e~gb
zs-IHu{2u()FuAFs`!sW%qo}`Z&J{ckY!A$z^G_S(sP4ab<u6<Oklv84?Q4usDK?tR
zm5-C$uMU~~E_B8(w!#k>I!~rQOogrD?G~w-*NN8Ik99Q*M`d8hi+`Yls;zn~BiAdQ
z&E(u`rB=^ALM~=y)d<oGotei!;*2b0y6ok?<*_>_7&e)G)jKvmLWA;=)|8V&nV!O0
zOe0j;ChWPzG@p!JuLFJJx!fxkvLrYz|4MmLD^O%d*+Be~w&@BUwfdJ6Mwr@~pE%y&
zb7QCHTBQ=ZdzBc7eG9M~CzY(Uii&(58n!T+HrPRRzdZa`dTPARgD20_ghq&NoaiDh
zy=tJB$Wl$i%u`!|H>{Ysz}GP{Mm?Kz(SD@scBR|5_GaJPIcP2<TF1N&b*Xk=Hsry6
zr%%-K?LlLePCK^457&zVHzec93mhzo)%C0_TVKWBR|6bNJW>(7SI9CWtLY$%Nr{nl
z7~Qc?OuV;$f4e09>+|{Bl=sm-KRFkB;q#lfN6W^m7l#EHdkQ*>+zxXZa5SE?Rvubx
z!{Ia<2{z6&xvtI=uWQ{sdv{SgtxBC&pE8!!Am84{ZfHDS_+e7EnfP~akEF6k!tK4h
z^e1yhaM{VMUx(#+y*8^T*0|Dj@Qn9uv6p34YSrWdJTI7}Q@jEryDQ=%&z!gWPD^d@
zc60*wzN(Gm2P4Zv!grd^XLX3XSEn(5y<{@YUO6K^qVIV(NW2Pnsp`;D)f1j#gCNXL
zrYTc=`R!&5QQ32bGA4VXVk2+-e*IWXoGqwvsxXgCf$E~Ti|Wmvr>)aN(hgN0e-S?W
zo-9JZ;oD`83a(oo*>7fB1>FQC>M0YWW_1{;#znM6Zt%7Qkei7ycWaP&pUV}!Zx}<w
zo!fcpNTWsc6|2ic!+N$F#B>VvJO`ScvDl}@HD$_8*li;^1o3K_WZFA(6Eh5LzDeQm
zMnuI_D~qQ$n>d|0=V5d%rfN?Y?-Tl0Gx{w8-hv@0>IU&>&jL<)(paMT^5w~dlMU`!
zvLDcv#!w*qAwA3zZyuS{RdI=t`Gmdwcb-$0Y|+Q99sI9YC>|mFMBm7oHc5WrJO(kU
zRovZFCUtM}(8cT_?O{8WP8Ih|y8iYT_l&Oyyf%98WgDX<TW@#ewiUJsiIHc>=b;5|
z6^h2N!5+Vx%3oCmMK1D-hFu%$dz%?}wjcXgy=?`V<)MstbtB{KxaWYP+PtzR$CM@|
z`PuA*CMBuZ>%Trql`jAFyeXOPdf$W5i110mrEW<rngG)PTmIKQFDOPrtvTstZqSdv
z?TPZj#(t<F`0W|<RIfgj!&%AOS$N;nvbpyBLT4-SXSHwV((_WtD#TduiM^f>O9~J}
z<G*_)Ax1)$#XKXpRl@r-HO|z4>}BqX^Q0(`rzef~VA*4uEIr+iyVSNfrwyBk>1w`6
zznw&^#vbvw;3E%Z+@~6@$6WM2*@5~b@W%UJ?Ks6mj-TBHxQZFgp3<Dx40%(ScmAQG
z@DuL71<nEHW(8(c{8_m;|E8#uX(f8HIt_vk9hrUWu*PxUN*79%=qQJ0*POVb-SoBh
zMAWZvK3PnK<L5ajwLi^h1P1NZ8j*}kGzdU{X<r|xwQszR4qZGkZsI0q=~GI*@5~?Z
zGP1cf>TWJdmEw_dh&z0=aHvxieE*iJV!pGGG0ggbhf^%hL*~#^hs+4Z7lvybbL7wo
zN@Tppq(~GVmi=-z#5}=vhqG)@Kp3CD=W|NwY5eEzN7;{~zw5a#`wK%P<rPhRO}c#Y
zRdum*0ca$z-5nR+>ZNEMCCgEu9Xq9JeVwE&Rir%3@1WB(@y8<?Kd8Kqu@MT!Qol`~
zu%x20G8Uyo`CUAd$bOjB=rDfF1yPMV_l}d}y>;R%Z1HlV(wloxswggEeEoCR|6%V<
z0BY#o$MI=VmO_eFNwi4XH(Ar7v}jWbrF~y?OJygaBoZQI%NmkoO^A}BLLy7q_sII%
z``?+l)17<o%)K*nZ}Iv5{%>!oxpSU#&U2pgZ09-8V-lh~y)@8u)q)wyu7x$f&E#Ia
zn0M~e>2>e(S{u)VlsyXA>intlO!jisyqxQ+)ebfKC5^s)TCq_?>#?I+%j6gKwQiFt
zon$oZJxhzy_Fo@u8#vl+<Hn^La<`SYDJnj(^%_&{G~IH2#-owf`xs}=)~VUOsmYDz
zra3-;P;7C<N9|Ihm4<aP6A$@?-;y4A$NufY8Ke8!XBYcdx4D*1?<bkD>saRZxMLB$
zSDnwFoW57Ls$~1%m-gD5^i5k=O^_G0UwXIK%kF-IHq6PG*Sw)nW>4}Dm7YV?EeH18
zzQ3*E{<BAqub#j2;Z)Nsp_H_m3d7WhBWtSTjl7~Q+(rOu`z^+f2u}I&x_S3JyWW<H
zONUv%d9dhOSP$oz&^_))-4j1AkXKMJHofuSYwUdAsRJjc75q_*963VGrDB>vFIl~<
z+QD&){Cn?sx@Ft=G<%Ixm6NwupUj^AMx%aTdbY%$#c#^5d|5CdZ&q-e$Y_I$SK78m
zUhQ+KN0d?4S>5_~nn`JXZBrv#Vy?aW-8ecatM#D1`dm@r^E#u-2Oe7^XEr)*mPpbW
zFJR=n^Cize#2v5>>d~jPyWQCy(FLu~)s0k2o9x4A&0|gGMxWMm{k-;u{);|iqSlHx
z4D+kJ{@?kvzwXrB7!&CJ$MtHRNb?^*o2})kcRy8aOD`UDG-KGd+fB<Rk3GI4v%+}Y
zGQUSx=XJ}k-Mm?Cje|%{d+2$Y`@{6Q^*=A_aokjRWB8oXEzR~`qWzjR7B9V?Y%?<_
zLZ~%(^-IGV$ty!{1Md=AS9zTERuEJBsu({br_rNWN_uKmPS0PeN7tqw$Qk%SMB>A5
z<Mam`ZFIxsKRaJLUjO=Jox;NnJ4OH-dmNC^zTDO%6uA27P-(yZ5&e(+H#O*#yh1mr
ztl-xwhvc=sq!dYq)hTZ1{%fZ3E3@xq(^DS?ub$qGR{Uq)!1IT{OrA9`&U9MSkWGaa
z?O)cMGmk8oRsV41uy=~jjP*+A&l{_F#6l!wSia)Wj1O9GJgZ}WnCC7XG_J>YVIN1`
znfu#|f2=ufU*zDl>|~GMZqJ&^*O`4=*015Kx5vk6HMJ9WCrqZD9(#ZG+DmF7N+PS)
z6)V>E?fIm!uVlGc*5nDxjieIq9IEqu>N)@EmC~{2#z%?X4G;X3_~^MyuOp4ydwrhs
zNb+p@fDy+tclnppn#gV#zpbgZ=dZb6H_o`$GjLV^eY;o3T<BlrUM#$6<(zH?;foFR
zkL%c8(ce<0Ust)zQ8DhgamM9=igCk^4%YCDI3)BYulw}j8n2uVPHVE9D7-PxI)^52
zqHS9~pv=75>U7b|;X>N$WyeUDywpz!y>9r(y70`Y{<R<927hn5K6j|`fk8o=uBXZ0
zc-2-msCese%W0b)8$RD!rqgP<cijVt-K$>=%Gz$HC8KendcKwOy@Ll0!sU#l4!0e#
zQuz~~7rVSoV}e@Ai*8!`9d6xjxv#PP>8)NFr$<lhvrj?VOkTt+LBVXGpU8$OfW~se
zt1~9fpGk8I){3r{h^me}^TXhYNzew<Af02wXr;p{f~HJ-*fOYSo5h~Ts)HWQ+tE18
zZ*Xb)o5;aSu3eUi4zGJO^$TtL@7(o26M98I_T9ExEHL|(T+kbpd*^)94Cff^s0bM5
zTrg&*qG;fjN3;KXcR!l0VY_)h-gC})(7pPF5*M@PWJWhTIJ$WCQ#~B?yLD`2g52Vr
z!@li(CT%|aOX*J;m9=fFS}KQq53T?Gc+-HW_pbM|#nKG*4oqEO{j}uWZ8NvYbt}h>
z=^<=1KdVMMQz_24?ZF3yM?Z~qdj=2w_HN&RvXZ@Zea-Ghbq@#`D7Gjf3h)#^B=RXe
z<-X+PFL$r`tg^Y&uQKf8wqJT~mJJz4eQsw>6xlPwCo*m8Qmgw;OGj$x>HYW^dQJG~
z>hSr8BKm!dki4_ApH@m+a!{`8gVZ6fHtcav{BPTiC&EugZr3Py|Kr}*@@Fp>rCr#z
zy<9iBp(=dmx5(A|wq;)(GWOor-qp0<J>qNzpK^$H?6y+0{PFCUFV|h$YdKLP?$Mvt
zf~AtjlY2H@de>KOspH<sHBYpMJ8sk3(70N9*6_=^8{f};H08VGd&#NmH3po~(vO|A
z?BP=BF$RT?@`Kw?_}qW{y`pX5uU&b+o9o|B{GyXq@nf=mpQiqUBnyRVs;uTcRM=gm
zuSdJPYOQaN-EGO0o9gF;80Bpi&6qJ{p8S`^nxhM{-aZV<A6VM*p*+dTTiIp7C5giY
z@}Vu0Pj5bO!t%!5-uFhQzOY>WdtNuAB~y<tS#&95&F!Qf*DrsT`l@z6ck8y8b(yKR
zLws*#Nj6=2zr;z{#w2)~y=MDG`=i#Atv3W;j?W+RbGi9Z)t~8^$3oiIXTH6<;Bvs=
zpP`LYhu`0MVXSx2?~U_kuJH=^@6wUV+9`oi@~YY5{oURGCPOxPi$C7ztqJVg<lXMs
zr=j$NuEC&!OASZ0<PU0lmal0&SY+PTbn2toT<=v*!!P%*%y=9Wn`{0-dw-JR_noVk
z_w=kd`(T{0cj<wXV~PzdMAw~YTsbr3?dyYDqdjs@X)hlc6nvE~2!}ju`h36SW8{aU
zTeM|ItiCE^9ig&j#m)^cM>h6Nju*ALa_(i{Va^$w&MR({TeW8CmSJPvWY);O8j$a&
zn)<5glzdQd>(DtO1E+Z0KD?;E&igIyzfT-=93IxVq-w6%o@HP6jTHW);T3yJu~v3v
zL$RsLf_+94n++CEHXiP=(I7wd)%Bg>wfer223z7(+{NFTufAH_Up?ra2+dGtX_>WO
zdIqpR;N!Qafx2IWju+PT51FDUBd5D-?a9mSp#$eUT=v@I{WgW&-BPQ1^gX;gv`KEO
z$pJ^VBa1R?cJFr5ovSAF?27$N$?*-NdMUhGMw{7RVdLfz7w>M^Gbf~{thK|kJd2cv
z)dxhxz0&dyy;;99byL=?sd<Ctz9#p3o%+f#JH$h2r0N070BOT#UPofKk4by%^iKDp
z&0f9W0JpZ}6%VX?xcP6Y5Y3ZX1w5=Dd!b(D^v=`?<4r1G%bj1KC)zq5Fxzxw$X=T(
z$66d-9sN;z#5vD#?&jSM!Upqp3>c*AKjDVix7fn9j=?uuM3?(bGRzc?N}NBTVYG2d
zbe3hvioxmg){ZwezN@H}pL$@Tx`vI;NcC%vHZG3wbKe@%m~mMnxK1|f+3;$moEA}u
zpR*1wyI|_l*X*;Ibih~3-NSzG54#?z_x5mNYsJpydP~ou;j@m`pPSw;b?<xktrB9F
znrOvF&OPQTYl|=Wo-v^*%k#*|r+(3MGYTIbSw8cc>VZ&2mCB(O-)!^_rFrlD`k+#_
zy(+h_PSRfO<Jl7?Hm=*&dxFQ=xMdf0F6!LtdnM3MD9CE+&n0V*=R}BGKEL-y#l2wO
ze)Xb^-;I5ai65Nv+UVYs-S*9iGcH(IcURqF7Uj2Yo12`PRM5=@mHEF-RGe&^eV@xs
zjx>tBe9K(2s#?}7a^+2<oYd09BU>*VGO;LI;5_8f{iW*tcO~9f-nYfUPR?{xUgPN!
zwPeQu1-B!myb6t*k9ilzHQ#%F=fDD^Nky6!_k+KkiLYPed1k<d-AjXPmUzS%s14gc
z>Xr4^D@!eH->lmlFtSEjeTmM8X^W$(SG}z{xc>3&)|V2rMy-_JwwL7BX-#X@IGE&i
zH#6Ww6%gqcCK(yE>anY8-^R5{GgYU`Iu%NkISos_y>pECQu{+WyG^#w3*0p-XVu11
zyV=c#p?9}7XIzVN(Q8Sf^*;j4OzU>(?2V_IUPX>h{R^G<rEN-__Q=r4H}>9^L;so7
zy$m_?R{YN1w3*^Yi}DAQ^u1H*^yKHMoKbiC`*~ysmyIekez;`J-SfYFjJM7=Quob#
zwYzQO*Lwj6w(pyzQm*%8jKdTo`R(G@6QdRTw68HgIeXc_-wz6G<~R?^6h8ALz`x|f
zTlWFBk}FexpWY%oZCPqe!{7?V#^|MnYBL_M{N$b{P8*aaC3I(!Pk7JB@|1+Kd>N<8
z38Oyd4t6YvSDYAF*A^>U-+lb>DUOqcY?r)V1N2`VwAxZGDfP^_rPChT-pP0(R&f6M
zuY{Xk+Cv8hR4)sdE&VAoJMPJIofMx~)yeI74bdN87QY&J%)EL3C>vVJD<Q)LR$giO
z-}GB@+)7)%$C)HenfG;XL*vNk*V?Ndx~i>p)gIlp_Ib_%C3&HVCsUr}HZ?v<b?T<2
zc)Cw!LFW5MV|u;wDs8`IXfj1uD0}AlUs{Q`Ln3c#47u@RMfKiy8B6bNybyd`>)gRr
ziRn@cGn2d3JUbiy{N9*-kJ7_Ko)-n>-4nX8)!N@P_O6Q6;LzTEn#CjT4BGPU_31wS
zew+!cxLB)p>O!jTXMNRzaj~><wvo60OS*6@XVds~H*VJ*zW?%4hNr2Q){NZEU&Grh
ztd{I+KlXKibm2`gS}%v*Q_ZfKMhtbbJXm<XQ1Xe9#kt3eW@@Fkq<FcFN-kLcYq^2f
zlHU?HLJwJaeGS_5YkT0=&7vm_UDEnkt3BV<Pkd*;IvcgIkwY7+E?qeMN$=9a&AVTY
z96P@5nemVp1%+$()Q@x+v}VQIWSc-!_5H7h*nB!45pXWSq~wFt(vyXX<9;4cSU%&U
zOOFX&aTg0#ESm7?tPSn>=cNu6cB7YRTpp6V{PA~n5uw(~_xY8j7nFBxRxY%8b>!Eq
zUDdLs;XfAajBC+bDO5OPed>nV`r`9>cjZSv-nHkR%#!`d7Go~FD7@u-_O{c2-YV;>
zSAV?ldFbjBH@4&*dw$HS_qMf;`yS7^k~P|H-Q!!4%fDZnnxb2FVqZ<$EE|*7i4_a~
zyEf6<Cby;{dYkIG!55r;2CbYn^8JWpnzin}l^*|j&YY(cQrIWa>gwbH4~K^WnO8>2
z+OE~mjgVS-O4t9x-M3mcPRo1wdMzp2Av<Kaw|&6VS(e9)>{}yCj6zma4Jwk&sc^b_
z-@Ti6_3tX>Yb91odT)9YC2_i!)b=wEKgZ7TtDiBoZ@lbIi^LtmFLm6-9;8~Q=osls
z$IHr$HBwq)w|2OnvWZJKhh?%$uf!TTEE|44@T39#uO8Ve(l+VId+5pU2ePFOdsk?f
z9940!+39ECDx^MSy`RCyT)&;_!R3KgTkkn0EsIjkDl%N!khMv+@9t}hx5_MbDN29-
za{JoI@qd2BsH^HJec3;$pM%5_k^RLzKIO^wXg_n*SGlt9*tXjy%NBKOKDheX+S7qA
zx9$kilaQ?#l|O#3Os?^6Y41A=XIc8VE?F?>db4&w_b){!RwiG}U9@0}Pwe~I&Fh}u
zs?>EA^IyB{du%te(iam=lzeKc2mY42mS1Hk)N54zCDS7<fY`3Xmvd(62#re`{7fXT
z+q~jWN-66tQi@w1r|Pdcs2y!-e`7)IlMO0IB<>%Oj<{r4zT?@t8*Llsn67$ozjx)3
zxG{OYYt0sTKlvu~@SB&&iG?m&$wSvKos|Azz?Y-%odYlA3;Ry$HUIm^qL`O!j$3;O
zS<dw;dLz6&F@4IF`j>;8cMaNoJ!EdF`;|{&pY6uXS=0B+jmnp!#)KMd6_Y<VbdCN+
zM;{~KBO0SWwVt%>xm>Z}plIc%U%eYvpKLjyJnKp3pbNS`k0nXJvKl%|BPv-<{c&b~
z*`A-0LSo~le|xNQGkm-I!=i?BYyT`9xqnR1^Jk3<gxqcnSY~>tXylhUFV}>;ajRU_
z^VYWu7RtFPbh)+Yz~b-#XKxL^FN0NQUd%K8HMHN9x34V5mPrmSqs<lne8PWTx3JMy
zT$Pd>#L^AgmP(X*i7gA7X(iUvAa-zt<F@5lMX`G3zoc8HOv?C?RobmMN6lrRtElZ8
z?SA8Wn7`>$|10yC%=vf9b>(5xuBK{f{+N1JBPMFo(aXhs%?p}SozF^r%4*eVNz>Y(
z`%1@mZBCyLb;Y%L`{O3Nhc=k0H%~T|Y#ILF9r1kQ_ZkyEEpXWV+5AOY%@Oyc6}vxV
zA1Pbozi)@>awlE8?&a6w(vl|RZjYOOT6B|9<*>`nA^A}*bOc8Xkd_#+(ZT*rWp=zp
z#;B-=lGnA))tQ%xNak(0HD~-Gjr{iB@5a-LCCX$AuLdnQ`}S_lc)8@N+_+bN)U0x9
zn?@`AIK4MZ$o+kh^wohnX<Bl}2FONP+c@8DdA;Ve$FBD`Hf_(K>Cew;d^A2}%C(Vt
zhFQX2)@GdiarnZRligaJ%d8KDyZG<*8k<`DeEBism}-5It<{yU6*l&sc{pp;UcK+-
z<t_@3@}&~DeNOo(;aZ^P?Vjb|t=s0X&wYPM74+M_GW@~Nji>ViZjJvs;nt<b+4rRG
zy&qQ=-W=n(<!7tXIfKM!Bi1V=%=z@ivfby|!otC8{WGs_m=vfJ^QW{a|NEga5gQ-2
zNxL>o-O%70IahR>jijDk{yas^trDMiC08tU?Du`_1LYt0)tY>&wfi+SuU5NP<K%HP
zVa=`u%f@{fvLM~^@+GxPGv_K6uT__8^!+qcN2;RKJKV51?Nr;>BZkdwCn918)%U8m
z%lY~%)8cEN`0{JXFI0Br-@a78t%mmWz=~4)<h%vVBb_`x^e8bd9QSp&%b=fU9M70o
z`)rioa_RJfPeTt?mE2i2I`x2@($94ta{tq#{Rn$MSO3Nl-TGziAudfj7t5+nT`{(L
z{L$GS{S1B9ZE3jmLwR5y<L^Gd=8hTa|I_E~>p6i<%l*_Zylw-YCMJrgul$(%zSq3o
zXIqBVUK!MVY?bB>-B_3G<t95OsHN_1eb^V6ke=Fntn8idrE`PU-We}BNb;%FN41ev
zefmt=E49vXtm3$x#RZ?`ez~X(p3~>}>|+*hZHi93OUv$C(oN-s;vdyT2Tbo~|L5LM
zsw5&z-eui7C4*<H@2rgOHt6(Fqo8VowGlUW6kMKh<;oh(XZ6lzuU^kwnp~rqonvX~
zvj6Z@_3Aa=u3Iy0^QYXE`E)d}Y<zs*sHC-THCJYaCmvol#51n%TpyLfkW!2HSCikD
zew$maIQr4B>+WrXb_GtA`WQL5VL*8CGcQRgbGJ5W^{K&UG^XEJcmDLfrH7q@CR}!0
zdT#x(u+u|6eNgx&*5<sxTx$N+Ajtvs`}Y}y8XJB*SX|cxWcRprFfCq6x8}Bg+>8o?
zFa4`mNEusQ&DXziAY1dk-2R)gZYM|XjJ2QsXoIcAH=&?SR#_^Q=gaK^rR{(9eK2!a
z@QH#m;Z2u|>uWde^*EIhbN|}BC+}7o*IS$!eBig!tv_+$hrWh2YZY!EY3jXLr*XS`
zkKqobVL?7&i9=JOXPXzKAHLBqY~;9U!&l9_HT+fD`MRn54<1oG_%3AL<qZcd)n1hJ
z&?>G>dSEfiU|hxbh+X%_D_q&8zk{~*x>$zu^LE`W=X}P_eK5<)xH{(U%#_bH@&}%N
z{%GcTM|1c_!?f3a(w=u33Z=YeT!<Vq$MkckOyG=$Wm4j<tA8I`9bprhd(Fx|?OKcQ
zb4{(MiHqM{?fHE;kdS%z#59*X62GKBWb5^OuxrEYeIv@UGpiFT>}8ME+C5zya54JY
zgjL$BW30@})@_hHJ2PkT-hjsFXVSFQ?*iW!2}w^DerA6@`>Rx*XupstkL|=|^5WNg
z$d6i~F)-s|_V_IekLrz)EPHgJb>O$cdAo%Uv{b2|@F-tjZY;Sq_rv3=-3w;vj*?qH
zYl^f_H|zUn#w`8eVB50p+0L(S@{4V(hm5_xLOR#LbJZrfRcV$dZ@gY%w4=`PtGunP
zn4+88X)V_SKKp+SZ>XMdQpu|4#XgJuGY6!b%1oIq+B@o$_4e>*udbv??T?W587iGt
zGT?>IalHjcqCcF>qNSF}nM+9-3Lmq%@BDDOxYvqNS<35sg=;B|^|Ff|;$e5v>-zk@
zO}D(#%p0WiYh?FXN)3JFnjL9jKRUmy@9DmV_vg%a8kni2D(1WTz)q<I!`uVcW0MwL
z9kMtpXN|=Ot>%4BxA(M#`X03z^>oA?h46U_8|Dtt9cDbS$JY%Pfu{+#jC95CP3q<Q
z$w+rzjKNOXS;xgpgw#rxMn&pg>9;03W0hKl#P|4F!-i^&K05o?8Hd7qqb#SI^?$2!
z%yDy;jngaP)I!DQ`zK6IeQKFC`pTe7i_WCj=BclbAL%-~Ib~+u(P^q#_frF}+10h3
zIon*~UgYn5bZ?VpW7N<vkuO(tmIZj1%uG<a=au$5YMaJbTbYgP)i!SlEV7oFCSP_Y
zX#RwRsB4j5jSrdJ4u4WnV%{_FYvp6_hz#%lDwX7-URBMPYigb}!fKRQRrLKbxBQC#
zDsl$z`6b^kd&OeMr?nF2>?Fo7YaS|ERgzUNJ|pm9-kni9rX7}@JZFTXd2!RH%cUz_
z29+4T%Ki{!l(ujd?N5xpZ@{RVIoIU#hu1d!S-RfIrF^F8-Ill|#tm-Y9=tsqul=n@
z-r#k=lyWmwJY0PDZOuv#5q@xKl6tO>e*c=`Herts1{SvaSG~^ki3`kpV3T=MaZE<b
z{Dcqodre!+KkZ*wy>9O6X}7;@sC9U1aVaWh`|<g|a@&vJxLUq>_YLLmcgx2Ijoi_c
znkk-eSpCT!ku#+hA9cE4Ua|R-&6V<^#=VJo7mCvK&YWAlBjih8n{Rvd^AF~AcOB4r
z!XdxMl8xmFQmJnq_cWa{apBJLL)VAyepx>F^}>EvmtB_ek#<RPoc?INRH|oXe;-Ac
zq^RkS=x^Vy=-=EoEG=-+w(2qIUyd~GKeOgq{CB11op~3Rw+$J2_ef33>ee-%l*APK
z-dpJzazb&oio}fO@5_3Hg+8v7?N^|hcPZ3jNyDOD;cr5Uvdl6bxqRq;Q{i*9=%W2k
z3M0GUDcgTgW803T!wE<1-TF8=9GxY6v(!3OeBS-dMGm#^E-XGBKg-%${KcNy$<uYx
zCGMTJIrisxFXfH%kF6YDtUqL=(a|&CuFZK->i@fCuvPG^KX<anH2YrOvgfIfir!(5
z-S1>Qm6cD-t9mXmd*-Uw1=mWI(`215mMLHDnP56?sOKr8E3-#AwG|vy7JoV{#oR=v
zY0=m93ZI51Mc9=aS;sdhUBCWgUuJHk*t~s*>Rnpa-agy5IA%cfiV+g7+x!#)hCeTP
z)S{M^TW0^IB%^oG<GV8>E%aB2SktEaq#YTy)i~~uPROq<rRA^Evpvm=r*64<DLTQq
zrAGYAoYDK<Cu~)JY<KLz=(OjGf6Al|JTTjKU;dea{=C_*MC2nsJ1hKIe_2-P$`-v5
zPKj-;rY^Oz9|O}Ytz04#LXUoPm=(9zbjkBb_pN`11<eT9nX!An_(hk8D<V_ojm!ho
z!n%JRoYQZDh+)0D;zTJ~p<8adw)$CWZ;=Qy8>*20u0d|4iLvGSJ(G&118yIYX?mhx
zt#w<vdS|cM`mS>FvY+HWsqe`f=CIRGMj<nPp6yKeM;6x{9A-3(m8y|2zj$V;k@zLx
z-8Kc?T8FFY-uj*yPZV5#Zdz24s&#hf1L4!N^9&B(TC=xe#pA>e)<<`ajUV8tzCeA6
z#7PB*IVEF!ddl_=4tV(_aj$cgh-SD;(xy@=?P<+*1~jePb*f8#7(3JC)@DvwpwbYY
zru)uJJ7-h2!Uv0ijfFY7-L^_apA<@SZP)r>BhfwN{tCPK`nvDbPX}nZ0Gq%4Dpd}O
zzN>ws+RFOLltkAXU&gP||CzY3eO%TBla{)`g)x78Yi!qy`2AtD&B64r*)AKd{kb^q
zm$+81eyIx$+Fuy-3q1GT^X--g|7GXi+q}nCa?)A44I%FKtZHELs?F0=Y=*~KY+ffi
zZ9=ei_>$ehJ#C$qyb3yb`RRwrZ_Y~Cy{`M@^hTwpW6JG6Hri3YG|k0J25<B@K4j)R
zn}rWs&nh1UqVM(pl@YMd%x@at>(nP!sdk!|*5O_^r?!8-w&i5`w?7`Qjr1$mFTcBL
z-!}8W&1+j{JJdAxIeMa4r$u~c&BYr#-x|bKta<a{#<LIpvj+5OYgkcsOgJI*my3U)
zU1Y7z)t|SOn(i$fF*l<2=Zqe-X8GJFYPY>>wA|O&?s}Q{(5|BUex+6GX8NlgQ!nou
z@p*dR@A;WaecbHI9wyg>FYDK0=y$>+BEITo%(#Hnr31d1hS<m5{XX`a$Vc(2A*X_T
zzxS96*bE75&7EF)_<hc@F;U-+j5~M4zS~{lRVw4we7xzZoxG`8O#Y6ThR>8>nn_V)
z!lW1x-}m1SmYK)O=0_>oe%1Mw79cXr@7{QW#0!ZBAJn}zI9HL@TB^R`>+CbbEL-y3
z<Q*z){KP6!dd;^li<xi#<L2G*gVw(vZ?y7<t;BUF$?HbrKNr%~`+CXy_1SvoH@eQe
z`aOKP*{(@<c1@DoRsQ6vxW$t#N*-_Ln{6`Ear{)Dadu+FrcXQPULSAt&hp%kpGSfp
z{nR_rHh-$(={|-@g9Cpl%pVl|YfD)l!v#^F=Wnb?_i}N0u$=ir{)4g4#3!G}hM%y=
zFMFUjd$O!=di9E@b4*Vu$DBJ|KYwaW%X00pky|F^ln8I$`D9zj*3#QF;oV}>3x}WB
zJzVsbSJjF#-Ia+$(qw;)$j|?#GviK>a_)S;mRDzA^xl2L^vJCGlS6)OAE@|aqkG!W
zh-Y_qtk!nkzWzz7v;C$rN!m`s!4;Q}`Tr3M%o!1N>aCQnXxlew?f&OX8f@I2?@$85
z2cLE9xA#R-pHW}$zn$O9x6jbS+dK}gs+#yEVfL1pLD5;d?<6J-QN6BM;+d~FGDAD%
z*}5zzId7k28?o7@V`YxNw#e_BWna|tR46_4a{S$x=f@|>ELXORxbsfpl(+Ev-qxlk
zSHBW_U~77^Znxs}+>Kf><6Ls(t;5=k?e@h!vGk$IQ~=d;rkez6Z0xneDk)=_U6fhe
z@z|_;o8)%?_ealWxz6e%fgc}yy(>|^uH3ZY>kzwF@kfu?RK>Y(51l%4_tS?8^F!9B
zdTTE7`1D%hdT)n)eH32q3mxszS{d%D_(m`0V9Cj%-V>t_S`?`@JpbXKp!ML}EdRN0
zpBq%ak*w^YeZThj##`q$YK}0h0p3ke`94=utxvFLQP%SGVngX6L4`&p9y$}g`wdS%
zYG(50TF;C?v1#(^rn~PipCP00V)3w^wGl_QPg)hOnkDt($esfES%ss0<VMW6o@}Gk
zTIy6T8h?E2Q^{SArtAtDnE1+X-TV5gNau}rMI;t_Z#mPd=(B###WKI@s~cNlO#;su
zS4GIuqJ36X7tDBhuh6*Ep-CZh$IdSYLQ{6Ne6x6W!sVPrzePTi!VZ=+AL{MUGq=LA
zQFXzg$G4wrT$gOL8~=KB@__-GeKk{t%f!rje8{Qv+KNFgg(*{S?w71Sc+b@`+&1iG
zqpoP$?w<Wxr}Pg>Y5y46y25<g+3ki?YxhRxxT;K(I{4H%@kqL5L5i`Gx8lJk^*?5c
zEH@F`EEbudcO&R+*30_fiPN-~H%)td)NX8eLG9s>ku7^_zYdvqJp0VzAz2}#);u|p
z-QxvK)k3N5{rg3^rVG~G88G*}rCQy-{K?5rUTP=__m2KA$ut@;TQqrP<MzCSNUiGA
z7pAURI`?9OSx@u10jXEwW<}@zv3}7YCp>mS4~f%mKdd%=t0^|5Im`XIaI~+pwf>Y1
zPj~oaFD@`^wlJG8>%3v=^&UdX%j077u3FA6UZt`qu5atSy6My8Zl{l~UnMf`lGwh`
zTR)>m-F&Y!>ia1BfV@71&oa07vCkMHJ>SjB`^USC3!k<O57;|xU*#988KXj{E<Rjb
zxN>Oj=2MT=E}tD2okH8`Q>Ls~byLE7?C~4(=8v&eu({hmFj9VKUA*lFVTB4gyND;d
z4oRxk{gCkz&T{lh*G{cUq{)OWuNqgdqsm}~L!(>1i0W2HnO94zGCgLAl$1QOl<|0<
zxb}ocvgV_$XXpP^J1(=%C^bU*LY%DAjP852tvy!AA8b3?XTsHmtG=8$J9D?zn)#xC
zuGZDfZ5lK8YyF%pKrj85wrlSz+*%^zpPn-NNli)Ehu9NZ6F+ae`Ma>>$HdTi@8`DM
zT>nLGh4XUDNBZB20&FWY2g~a(^XPVQ)cxf`FLsX}DXL@Vw`<tYck0sj9JP*bc2AA|
z^E~E{O+xmeJ&FtUA1rd3{<!gL`Wer{nQx;n-W~Vn!|Jnd&;3j+bT7K+9oFmmw&@if
z=l(mpuuf!JZ2K`+`5yttyl<tKxSshOQuL;Nl3T*?UN8UTRF0ZuVs-wR#<=fSCcnQo
z;M2X<M~Ml`f9gF?GTk!hu|)IJvzdn9_Qsp6cow?LuPjUa;=3QC;t#bh7^AZ4&W~{`
zZ!27EdvV*l<V@mmn;8);-)m14oNavCw&2^vK_1C-t=<2;OKi7XpW{BgZe?lyrFh?~
z@`K*AZfh|dcP`}J!^`O#A1Hn=`creYF7ZA6|8bMF_t&<M+_3b>^AR7~-ybS`@tx*y
z@UHGt@#ebT>XmC%A2{ee*kaZ%=u~k3euh`N|5W&O#-r!JLzZGwa*riD`-^NE^Crb;
z`Obz<H<Bx^+0jDX>MxcnZ+_5xanhg%u1^E(p8~RbO^!~P6_@E>xHg++l$RY)^twHH
zctdHC&X<`%PEJG5DL0v3%CeZ2Sp6bIdr<SUCBp|e`5iTL8?m|hX;pUg%9`NSL7}6<
ze&<|Je&il@K<;tz#I{DutMRW3^aehz-E5a>lyc>{YOPGc%I?mxA$Iy=V}6ut|CjM`
zv^}kOO@!WQ)l&||kK5&Arv4f?tmnEtSGv8wBoj|NWoCT&(5iJheR4kT-v4u=-|zE|
zt^3oi*oF7=9`3ZtzdRzq``W%k6Ap(J`1z-*X+%CWUnH3}QchS}{c?@W2F)CG4OMr)
z1vbeu3yuEBB+m?+=3V~P`Lxd!hZUA1svZ?R&n>Ugs`Ze()jO~?hSusmqW*~EG)2<~
zC$zH0xNJOaX;Hbjs$B22Qct%;`QYjY{Uq<SD8Fx<V;don`_ds=-KAhaddZDL*5xv;
zGEY_*UQoF0`*yAJfO+4tm3sK-_<cHR|LLGj_Qzimjwf%qS+CXJvN28hm`4>bGEQT;
z(*D5xjvuGyURaWRs1698w<TQ2qu2fLnvdE;yoV2{IZ%Hoz1P;E!|zsqJ(08AJNo<v
z#rqp_0%{~jZ$Io@GRIBM%kxcjF;Kj&*X#qgHtoE2`fhsZfF(|gREpdV4Jf#E`j*FY
zuXx3RgyjcrZB(#2?VXtSta9u8+zmgEnUqhOtU9&g%sr<W*R*GhN?0|1L4CxfyA6xH
zSL8JPceN!@Gi+=8(q&Jk4qx!5qWgvwQa>dZoJ~q>_+D~D?TXl?Q45zxL}wIw>Ar5<
zk#TCur*4OvRKEDve>&XbppBLE1uL(w`}gMgZ`q(6Q=(G3u6$<qqShUIb8W6<sJE^D
z?Vc@pS57xB*P+&{&zQ^%57~K2-_>;-U&fwsyAwIX)kLA7FzTw=uk9ZkBc~5;Fx$Is
zhP;f~Ja5T<#S7JDMXVM&KC@T3=AB9Ha%->M`?9DlKc)8Fot|IDUmlzAR(IzUEsvw4
zO4pwIeeax5%-(TF=4b?N-o1Cg>-jDPXD?6Hz3#Hse3Hkl>#B_jLFtVN;)maCn|orz
z+zYjDeOLPI|5@N!IH$?eCs|GS`5c+&i@N6-$u(SX&>!e`D(|3j{I8{M>wnaHhIBvL
zL-(EIB<bc2`90p3_gJX%W9okYPsZ|lHKbHkO*g#1dh}*!ZKO)L*lD4kXYOqJJ*x1=
z_Z$AlryKto_4I>lLQsJF*2>45ZW_$?uU<L#{mt@u>t^(6ZM<FkX<ume`hsHdy?u72
z%VkUsI^V~}BmDfOm>#>1&6j+q7<t>%eeQzss``3+{FIz#_P%`9>yc~iDVfbv%$w@I
zpGx2QX?~f|yvre_xyrhxM{9c7%%0nnHO416urNot>BaXUKhJ);@>+N9$2D7M59J(x
z>x<=FG>{nk>7cjVQk^ZY<*p@PJLI+byuwrut<kq9Sx)O^vSHS;4Mxj7evj3kv7vRx
z{2Yn*XAY|8P8l_JTtj%nhcy`ryQi7IN-aCx?Zh_Ox1RaM6J%b!1<EwvT{tKH;r(Dc
z^Nau4#>Pm@msojU)^WzDgZm;TKHeYU6KiBv*-*0n!Ys9r`Th?ZQ~G+x{78Cr>%z~3
zwspOgZ(FniVucPLhMpPZyUk*+&drH^PA0_niV0j<bTG!cXvXKd=q2&vM-1-PcC6PW
zz2DL2@`0}t%adoxoEKjtd?(gIbX4iIg3)y*&-<%3#6R$EwU&yFRbAV5TW!zdYbw`l
zTxW^x$ho=GcCW^}fwxw=iofZ%?X*Ylf&(SRJF6zuk8O(-R`b?W$j_}AJ$Yh5_?J@6
z8?9+8s|^p$n^t-1^d;kv&2J7Ic&6_XxL#w;!Wh4luo)*Bll2?x54;|(n|@GCV~tpT
zNw;F1jd`1#jRPBPt1{N@2@aW*{jBwcy3XXu1MFP4sRZnHzxDC=&MNQs9>qm#9m3x(
z85Vo;z#cK{tS@nEuKy69aU>`s>DIKwl*EE-d8N5u`!)H0sVTmi@*r&W(VUkpK|hq-
z4<0aS_jL)}nz-wBjc|{#`RW>BA9EM=%s#hpt#-|ouYvc~gw#vyUNt;gaWy~QY02f>
zO;^NwKVIOYts!*#(h5)gCjmRpw~Id(RXhOD{}TbLFd+Z2`~m(h+=KB{6f9BzCiNE=
z0)zm7<s~5i{Q~ec#pZKWdznMF%-bEbT8ZNbOb|>rxQ;AX1Dz9)*aWDQQal6(0*ZPa
z=w*Gze_FQyoApZ8=ci9Rn}G(~oB5t|N0Ahyq^!6oAWDBvh}n^7Bvf}Mp3w=jIz05Z
zNIX<Y0Qz0bABbTLDGGkVwJYG+`kn6EpY^uecB#eZ`4g-C=s|X;L9O7531E#5adCDG
zbPI-x8-XuEopCe)-s#qjdn4jKY1N0+lzBhihM+qTi-*c0g+MKM17~?12syXAwXfGk
ztFqTcSGOFMS3(08hpU&s^?$L(EeaNxNI(Fyy$(nXKAm&^kn6;g#%^YBU;9UaW0~Ah
z=}QRdgtdS;&rVoh2duOl0*a@)TkaY9W42<^PBH9GdPG6Bn9y}P#KqV<64Haaz<3$B
zDD2$-;F**5`_dA|uUEer4vq_{5rlNo9d5@g5r^Le$E(2LUZ&ZW1_gHO&XoR8iPYW9
z-T?zZ`|n|+fpI_*RFX!8t+3%3Ko!sjbO1g2zbX)E20&$}kkW79=ip8Y21Wp8^xww;
zV*yE^Comd%FA6F{6U`uL_ELy&k6>9B5K1VtIbs2GK$rfN2z}{5r85Gcf*j03u{sRc
zx~M{cx={JK07k(nq^y@NU`mIKKOz+fSzzyIegV!jfB_jETNHh)It->14~+&SejSch
zVT^)W%x%mpR>j^6T$VeS(GG@<6!_tM7cS%mz8epf)QN=P#$t}0Mjv4S;c@Fg^9+Mp
zMlsel7%F=b$XI<nsKB%y9hYDU8Z-LuOq{|+Z@{-F0L()4@Y;qkW)0I$610{{&=Uhj
z30d%YGRK?As5g!1U+`01MxQE-uhCE|aGesMGHB?vL`DKrDfo91{W)<6Zm5-H#V)x~
z#6i#ENVRii@Mx;-(c^Wa@3t_UaR;Fa6k0$c4D5*s$Cv)ax?^e3ek8IJbWwW_*+)#s
zM0XSGh~ZJA3kku+pukc@`ViazM#;GdOnQOayF+t9ij;A}U>^fE6g#&4${h}R_p-tp
z%_v}q6dOur!9Tciu*?Z#$ZTJLU5djTAsK>zP+bi4h94I!PGFP~L?kQTJT0Np=+V&X
zQ^ovf`rqucWc?gm2~c2xyoWh|geT(7fjI_dn@DJ02)(L8Z{n?BG^4~>0K}ycJOl#h
zGJ+nEBuQZ47JF{!(G!^$Q|Ti&Gk-=4^lBqTzp$x`pSg112mH;OQ`sehiP_LN1&axA
z6baC1(B&oJQN!xJHo#QvwE<YI*9Ooky($lkGTRfyC-{`fKdEq3d^z@axGT5uuww+9
zim>=!9Q0-aR4CD%3ojJZ-e4L(g4r2p<LQ56K2#_ZoRtnRg+4;0Y#>t)r$Udx^!5St
zInbav<I^ND7?UAtqy{B|{z-C2Iaz*SOrbv~rzNo3$JDd|Dl~%_&>&3MVgz|1jq#~I
z!-j&(mWDv9pA3D%w4=#r3jERAWct{U646vB4K8m9+s)Kg7by)&t#u&uS0csMpe5|b
zpbhe^K|2Z`0v<=>^mcILYfg~t^=D9ppeR(2G;O-!t}zv^&hC!+e-8t!ZneK5**c3$
z5tWGWUqJw?rwQ9T!Oi<(1bJW#0TZY=u_~%hW)Ix@#Fo0&^nT%j*oe1}#$z0y_eY;T
z8WZRXd!6|8E5Lj^2pSunzJNV)UD9~5>5%`3*M<B1jR8~0BL!k%B+mT#^-A%NMH<8F
z13n35_(F9s=gJSp9HG4m_Z>$NZ>A9D$l;CKxQRjF)ByyK^C%W<&{*)zjw$k3XP*J}
zooh<}%b?44F7Gju$AuLOzvne?W5{c5N}sbS?v54wUgI1i|7%WkeGN(PF#OR{+h5#Q
zx-)1Fe~0rcBZ==SJ(5@_%9VKYMLhmOd>mvYY-g<@7XHbvB%YTEv99sf(}d0?z%OHn
zN8;%>`0_mtveYKfKZ_u}3P@`khG&#&dp9~43WRJ$YVB>I6Ai>>6Vx1tuO0R{xa~oZ
zvxEB&JfSqBpc}KV8?nCh>3o)aUwD*>c(903CRt7+7|Ij`W$;U#f}kuW3~no}PhV#f
z`Zs8M>GMHV%o%f+BO@WX4N@4D-tg!O?UN)zTU4x?zrV8FP8B-GCLw3bk&QB7u9{%r
z*$EI9EJFpMVRV)@LG%QS3I{<)Wbocmpr61L*V_7<)+*X+!HzQ_juq^96=K*iL&awi
z-+A~^F@nVm)1KoVlS77ruwrwF;c6sG<LK=9a*rV*K3}3eTSEI4wgdt@dbDPVq{E7A
zBMXB_teXiW3(cUPCX}>1sx~Wj<R13h{LF;+E+e{b_$x&`UX6QS;2B^f<C!JBKQ}1S
z1Ab-&;Ubc8VueI)bXM=oemOm#owqZn?FB(mzmb5cA8S3`0oY^chWZS9e#F}To3kWB
zwM1sj3l2ZC@9NzmC<#WKrUboDiO!h&%Hp;B`;<&1Zil<f;%p-r$<<kYV?omhxtKiO
zk^6Y9iD6YAvhu-m<dGOQZ)baQJ0G{5e-nZghn$|cuCreS%}2X(R|IuL9D&c6@kdqw
z7%>tH$+G}d1P1#$l4<|<b$-^-g4pGE#=K$teJ)FOjRnsesGLW0lV@Zg{TucfQM>wI
zv(`GFj|tv;LI%5Ct?zcmjwZ&(I?poZ7Hz@ZI>vAL_pB!}+SC8yKKZve16i5S6;zBJ
zi%5))Iotj{O6H7&1J^ee0OMsl+ZWLFyXfyo0HRz_uyjjqW!Wj0c<aBXJ9VWEL?&XC
z2sZIr6UC+}6!T;RMYjkJoBUX_e}nr7rcXDzWTQcQI_m!*&-+*8C|SJo-b489{}rA@
zbbYDx^mi?G&efRAxU&OlhOyAipFrq76&QB|M#x}m`c&ZjudS|NZz>SuR-NgWA$~WB
zn0JO4yuazA!Lo;fSS<Me3zCAIj?>wF6XPeHc}9r8(!|bwS=;^pXT4<o2!glY*`waL
z+3V<c|Gs~|D{UP#7VzQ)xnT~gjbNz1bD}7_#$$vRO-RgVgw^_AqDrc^h2Yl~k7B!G
zjj8Mw?ydh7sqw$-1^!nkOc&tHXvys}){($(0*rLFV&aYfl3!DWP6J><Q7}tfJfug(
zLeHQyqdl=Q+ns1AvJ^ul#zmll&-*g|7DsaYBHw^8>H)eH^dkK~<_97|2G9p0-E4t=
z^e^zg-i%kle}#mEfh3_Ypmpu_9^(ghx4!qP^{G>$Mxs`s$~PCk`IXW`?Z<3tx_j@2
z^-~*~=V;%OLA|txE#6|;-6eeNMi;LN;k{c##NK<)I*?#>Kiw_aUhmJGuM6vx>wZX_
zue<2$HO?Y$P-egXOmi#S>}Y_?wxJbp*P`s1hU>-Q4^9f<yugV-I0<NvH=g6bHp2lV
zeKC^|MA;wU0eNZZJPyI15Tp0*?8J@N80$Y|aS&h%RHPx54pHB|u<zQ4;(vtKVd9N@
zV}<ZL6lc9AC(8K<53rx`d2WEav)^$N#d?Sb{L9fJ+<^DQx}GPB_W@of(+SQ1x#cB_
z^$-uZg^2Pv?la(2L`3mE!0Y5UiuTd;KSVHU6`w@ho&9h|6zd^gC+DnN$70QGF#m@{
ze9lV(&zu+K_90%Uk^#(l3Nz-|gY#&U%9sVt3c1o1akmGb_{YEwNu(K~aE{E4Bwr<h
zE>%IChx3W7o>*FzDBcHno&AR)WC=-UzNw11iqG$^#yh4H<@O<wUENLa6b6Fp%j+gB
zRlvQuU8xl~Q1EUoRiM4FUAmn{jKt4&`6Nc3Ys(h_%(Y_fW<=x=R&02!31J<N8z45c
zaHUAfBs&j<22lnY2r9q4kU&ZgC5+Mksigt;HRX-J1hq5>`xMa92m}cNU6#%v76Gm?
z4x6RGf!~@db*!rhAV6cClIqP1V1MGLs{Du?Wqyt?`4luHrYIncRHH}${13r`c4r-+
z^NAr2@+3vGy+$c<idsR~qadJuM0~jXP^KcaqclD-PH0+u&;K0`9S#$`8=X&l45WS?
zP?W#sxO;elH4E+#%KnSWbJvq=KY|!+pVcdj!KT0y6BVB083mnD;I$!!LhdlQ2^6>`
z_&p634W|jP*1{MD%%DSr-(szQ0lvu^<%)iny@n9`+svv#%vNEHIfpSeRRDmlRECcm
zG+Y(Nh7AIcT3uu@3XWth>Le_d{+T}mBPw)i0S$X_^}-naq1$TGXEO@7?QH1uPX#(R
z3xUqMz~7KcK<0E@vBD+`iCKe2kgz!G*-(X!9v`}*4cXRMBO(hg06^{z;=j$g)(D0W
z>ed82=>LM}p~EPQ0a<wm0A1G!*<bkZrg2obngKn<u4je4qw&YYyDFDCTSj|w7^Jab
zkhQ86h(`pcym9CcFx`Tl^p@yK14LTK(|evwA7wCOR74?g&MN?NSq5~}7|;abp&7A4
z)CS-x0m1a=Xh}eB)&Y!_1tD58_!_bgh^`D17Q$b7(;YqpuvVipfYjCqVvLQ(HcN8&
zjDzL?LIUX;lp=x9GxlA_8*iM@k(wjK_%*YF5F9JctVn}UF<G49Lqv|`_<;yJ1qCrS
z7!v<uLSj?-9}@zJ|1p7XDgMU;LLoaAPI`o;$^;I6#7gN@c@qrXp+kOBky^Z=a!O@>
zq+=)~e=HbWz?Tj)fDXeEK<cqtGPn*J65be9IwY+o*O5%asluWOaIc#POH|I@X&k+?
z%Q`an23v-4V3oMkK-wcTPquHkGGQ2`b%0!%8QZ1_tqmHhcq5~RVJs^HAKQ^AI*02@
zvX6}z&7k3sr(d+T3gRo2i!8*)ieM@?60O@v9J5$^9i|U{ag7C;8}?}cQiU3geHddQ
zkVHi|1-5=dU6TcWx-v9lKL|(s>m@LznR!j%orUK6{6V$`(Dn3S`a=F@#|3{q*|P9&
zO}ZYzsR@U2%#D0M4lKJJ+rH#)Cfp?)Hr4afAEHg*TM(>L1Y2*{MsfTYi0^P(9NeWT
zvC(=!?LkdC2G@?Fjt|6^;<c}^xd08SweAnmG;iyMH;l=UHcZU6L~64M%3{ESM^z7I
z!sE|cV28u+c=)vx*x~Ry9)7F@Gz{M3z^1?13`rG6Y6P5nX*Oe@GPw)f1NOe)+-LI{
z{|e6e-v#FgHEhQhLcrfUh?S!-sdnK3f6KFvpUZ-Oe?1;-ZoYeN^Cj!C$LpWC_dW<}
z9}4(&$S5*iQEW)?&KC?6rfo*mtH*j8fIVM+&louU%KSn^*Ba*^+UyQXi7G6Fr*mr8
z#M-mYhb#m?h_+)OD<u|yy{Y7(fVvN7Fe@>SjG+DQObDDokhai#0->43ky<e#-h6&7
zy8zVL4D;-R9}Qm+BN2?PLH6`QFeeV66cg;43+}`L8EGIy-F^@(vNRqD-CHI09*xj@
zc$NsUGa5WNOwE=o9CpitT6?nnb2|;9y2|kcS1O)urSLssSP~cZgyHjVe9s*=G{kqo
z?)Twsm0-c+b=R3URQyvhvU{g1PwWtg)|fidzjQ8$4Uycqd9NJ2EBRS5L7!iC)(Q#g
zbd(*EU{?h3giv1*!JpoC&WZ@`Y?vLAU{?h62T@-Q!JS)o&MHtj5$6s?Fyjj(B%^~N
z&jXS7;t0ZvBM2{nAiM;w@VfT&-;K?J=cS<#g^F0stYhUDt~<(_rUsdLmJaV6rUgSz
zcLn=J+LBvMK}7+C0q|-59LCyH!2uG32J4YzW)VSem)s%uG&wLx)wYG<g1mz&Oy>DL
zZ1*}q_Fo7P&v9Bw_N>?n(uPCmV@jZ~e!O79@=7pJ?E%nUjYQp1*91UcYa;52VAc!#
z=?vM}G^iIrjGhV43gS+Fbczr(WVA<3Ft7z3Nx%scraKx0NpL;HK$Id#nr6bJM$^a+
zMl=TU{-s#PItNkmm%{PA)VMp`7VbS%0Qii9EcF-&lZduQBY4gc$5@9L4(*?utYe46
z+h2q4$6!A(Am+oM5_QJZMDe1cLU6~#pRR%(se?C9ej-f-=ZB{1dE<=X>5O<9Dm3$d
zF;)kySL2^d@r!K)t_QULJFh2JZC-F|iWku&sIiAaS}&GOt0_<%Q9HR}#y!E5P1V9-
zt~wD(h;9Y@kPRWvYBbOD!LE+{B8vx@FMw$Zh@6bZ6ZBHVb9gE6WoA6-ebTw|l65>(
ztnYY&zL$6o-wXCi<HgpI_0e@z%%33rcAXbj*m<W7>@kPb*GaIkkDaqFf{Cl_j57xI
zSWBwwAn2IS&R7RQ#glf%$pSjgl<FD?D$cbtaL><)0u~IxjE$JTJ|5uiuSecXV8K5*
z9V3ASKjf`yW}F)_{QzIKqaksZ>|GP>%(QUHMLU!0g;-2A+RB@ZW98w-T=NyN+-V`t
zLrzV>jIZw6{4COhC(-^#Oi&qGcvr@R+k)ThQP{x%;zbAbY}QC@yf<MFE4O!9&s2E7
z335bg(cIjyOe}^QjbpIyxg>TScE7}Ynw^uY0FH=bR*+-bMd*wifh?=Q<dkG%&EQxy
z^hpf2s7ETc93nHdJ2*0E1=FC<^r5E#0BqZbK&zSz-6Wk1#CKHB<CbFtedmzBTq3NH
zSaGch;ggdCgFOYJX3O3`_zry5h5rtJ{@q|`G=ZoUw1Ir&Q7rTadY?Gu162y;>=UF4
z&L~&veKO+{kRGflt}`bj)+CSAV$PY+kZSTa5QIo*Y*g_I>pkdmQhrv69UAMr$-qWt
z9Rg7ns2}q7g5hg*;I2k)iEHweiGmruKvm}gIW5e+5l)Ilvt;$o2nJSy7#y6ezp<<C
zn|JNWyc-8~!`zd<z7U+n0C4UBbZU2I3^8$e%ncrshm(f~Y8SB#o0|HnA!o@n4lY6U
zJePT*F9?Xd^8#@4ZvOfb+^9VuZV=X?(InwW^B9!oCHV7|f8|a(m6Hj7zNIt_#SYRg
zf}j;3$2o~w{P@x-5yE^t6fc1-n^1N%Ma#4kj9RqqjAY0jM6^H#w#7*`ovNmw%i2*L
z2#=CKM5?m#kp;akfu(G}*dN;)KxAy(yb0uy+&R7pSX#lnjhhbvi7Mju4q~fvdk2gQ
z@}s}W?HzFEW4%YkV}V{zPG1G5WkJO|!D`2mi$P%CKxW!0;P|5eIMy&80CPuTeFn-p
zf4~CL5BafJ(f5y;ccG&oEZd?i0sik-!!SKN__rW#l*2c7gMg_5h2|vyXtP<g6{_$;
zSylkw4g+_^Y=)PH6$04T6x5EQI+8@xx{*6`qMm)1-#fZ^Sb;f!9m6{1?;bJt{fizW
z)*Hme%jw%9)(-3=iES5?ry&@MC!zJnhr!8Ds6ydyB(Q}R47G@Zv|xTm#R-wW5#sZF
zB6|(a2?)w-8ixJD8v@89(7tO2h>yWillQHAe7zl=qmYbO2^kld0|MUvpnen!Vb>k-
zqrhLW^FM%3Kx-S8sNlJZ17mIC0P=Sgm?scSFEumIA5+)E^2<`;(CB^;%ITb5&@e1f
z{F#b1`EO*SX2L?&ho8LQaLhe?rUHJ#svT0LA|{?K=zj$Ou#XAUF2bO<!Iie_$Z~|}
z{Y>kD+G=A-Ukm!*%pLge<=|k2iO^S9j34QXb;Yr0oV`ytRsie#DiAeN_E>XXG33Nf
zyUEWKj;8@Bj&-KwX29PFu~r-H^%K;pqVFn1WAZ3os}#@R#;h73au!8(T&$QUe(ONc
zG{)aO1@w%#->ncdJqJP@6wXq|n~uqz*|Ww62#PKPS#%Oj%r()5TC#gqsn<<F_h`j7
zFTvbErJ9WgAChawN+tpN7&M)X`7{YIz<iheDLGmQVzh%#(Lfp?b1KL@&4$nOof!PX
z0{SEji0sgRsYx{SX?Zlnm;4|bE0R8M@);Lk7)TB^@)<9X_K4O>bp)O)_8fm1513M&
zmw%R(e);wDk{P2Tz;0U$vW^4{ooUeu5;nr~?dZ5*W+TPp|NQ2zVAd~Su8T7y0b)7$
zB|q?)GvTKm1~bzgQTZYGhz?{ltobX<p*-&(%_b9S8v;Z#WH#~LL_Mm8YQ_wFNJzXE
zw@43u^K&3{2ttd8^eJAEendtOM;$V2cu@D5VnMTkR*g(95n`i6?^Isn#ix0&eJ}xf
z$DS{&QKNk})L{_w24Yc16!dQh1jm6fAAVrC0=)g4tmpQe_+`dEao-Oykp2`)=`0F{
z1m2ttWbyG~^BpQNuX-e-T@kGYziJ9XcbuMX?i7fBPXh}QmK80i$~&En6SNM&4@S^%
z*z1f?<@Lz<wkAhR3v2~&J`+To5kl|LkZ(MUKCWaG_d`cG^XtLIjxA%_UhqkBBDA+S
zEfjLIL1!Tm{5e7#<$cA>;K4jKrb>ydFxY8^ytG1}J@Y>%5C%KV3bIBKwoK%&2P`Xw
zD7PciLuYUgBo_t}BS@tBQD?>~c22GmyjyHk;`5o=Ll9e^A71t^#fMVOzrk+>2POoN
z3&8$4d@Jhzm1tGOUls|#b}0F~)-VJn|3l;$@!nwzH-^o=C42uEhJ{4lM)R-)uq_fW
zvH%%BnVZAtTpqEMJP7PIo)ZuQammiQG5k00!Ew7U&B~#u=67d@!^!E$YaqPis(C?3
zqTDi>NG!KDv4CuNpWxkBweE-jMQDfyg(7zva3b;GLX3ED74m`EtWuOpG&B;7-sMHI
zcoqbU0?^Ua;B&mYa-9+h&)Gea%mZ|L#X_tF4)ux#;NlectIcg7U?99e=&apbh`;h-
zWCN_pkCHvSnwPT)3kJ1R6L_QpADjhsh}8f#=MpwF-jqNME;c3w35$u*Kxovw;rQdU
zL9ymx<hdtW`M_h!odA{yI~HbeM0KLqbC}8@YwD~2JC}8UE>HCF7w<=@l0`XZz$G<F
zz?0~LI_y>&1I<iJ7Arb~qBv6KbBDG6Bp`^0=3V(4H>I%JlEuAX#40ara~G%x3&$r@
za-yX(1vK`0P#1mNSBE-W^oj@u3UQIliGMg+e<HnI4CB-+4zi};I|S^JVPFJ3u{->f
zRe_<z`4{&U5)~vcq8Y6ij8L9Z5ADLj#J4*c*u*xuFMU4T;h0nCn+!4f5<L3R1ZF{w
z7C6}sJCQO+$LWejhs98L*YmpKqS*ywzz-5d_f9Nv9JL-@I@SQa9#}oHt_qnk@uC>y
zXn|RtCa5E@6^1OBxf7*Je%2ku1O=+Zb(vO(m)@__xiAlPRFU#D+xv+MN)aW`GpWh~
z-ZR5Xy2p=9A#zc@>-i?@MP~Tu--53Tiumwp9q{0b(##%sD@IghFHtjsj525sfaxBs
zQT<?F6`;zq;a)hgM7E!<myrBOBYxE82#ysYdoUY`fo&=<5}`0c5Jn_HSj5tlv6goe
zOi?msX*WT@L+Dj7(9j7Ls2=&pkUkv$J9-VVy@MV}XLBHQU;OYPl*UH#Ac}e2hV?Xo
z!kHExC^83!UFer({4PgfI_)vyRJ1YTdKB@|kkx+h;IOCr!P5?Wfj}Gx=A_3?M4Mq=
z)CbQd5&)!hC;8MZu>dpqCbdv6>M1EW*MWNy2v$x^<dO=}E9tD4#))6JWv)8&vIO20
zTS0`^5xt_0KQp4&)dev#!CwEyzJSl&8sH^qc*7@xKXzXV6L)UV{t5utuS<44_Bsb=
z+%QFc5AlO7{&o?W3%GE=Z5$)G34Jk_eay_6VPA5A-wA{8$s7&m)oyY;opW6Lgx<14
zn?N5o!VxqHaS2{n;5I{Sc^eAAA>{BCf4mjIhl3YB84AD&kzq;7oucq8K~VM~X^_ay
zD}vrr0;C;qzmSI4+6n5LRTh(l;m(lV@z9K^wWr>W>bPOsmnuClujw$~o=o2h7Le{7
z%Ft)SApYe5(JYdHh#Y*R3~?M}%LEb{DY4LaCL{|es1?5IgyvIlxNJOtB*Ma?Z~iVM
zpm{_PV@3Yn7(jaB&7b%w`<VcM<wRL!0}Z--p1>k&Ip+wcjp<q$Ld6cJF({v1erVEL
z;myk*cU8$rF&cDPEtUnh{OK+64E}(o3QlUkvR$bA5%8iCyC62U#~V+Mgw$NSgj1Wr
zDRUwLID`ha=Rs_syXc~5V6vVQUfpv&=i=<%4Z11`QcaWq27m+|{*^H7E)2BfHWY4t
zB`)OM{#rs%r+j2q86OJqox&Z4AfvX4W0Y7)FU}E>^{H_ye8W!=6_W;eg=gWP1+rce
za)w43%Cd6i6xW(p&&&kUM8?3~a>Gk78w}|KAYMU>AQ0eQ?wdChESsAs4A?svNZ?u;
zJ`|YN`I`*_gZf+$2<|A&jUPBklv;zk5wsngp}jhrhqsj*6!^L!t;6TRA0&R(27$qQ
zZFt2nfd4u|G)Du1NS#=6PyRfculXS`sM8(|T9Y`)?+>58QMVZV7=I!CP{$5CBq~>U
z{pqX3Sptzf6eq^M;0Frzbj8>SD5+o?JK-cKDFiR2@GorgmQ9*$K59YqP9xEK5{2H0
zloaLNH}OmBye!fn6eMhI2?>*@URo=NWwifhQB8D$M=%vWdH=Kp^eh1y4Qqir!4=))
zEDnj@&7D&uvhz!cB1s^@5)iP5iCO#$?unRnAc#bih};gufX__Q$DT%<XhJ8!V-3-q
zIPoUP6q;~}K;|ccEl&!M-4cLfgwUx3V{m<ZVE}e{IBkG;iBhJ&5{s)aZ4Tx-3o3;R
z_xa+}*Z(y<V5c6{<j`%&B}pZomJ{3F$BND5ubgxk0GC;h<0%oy$|=Nx!z-Lh90I(%
z`G*5jHUDs?qPQ?wk39mzivkSngncj!3({INzFv!1nw%V)A5Ps_F|tfN3NB6-s|YY>
z1PgnD-oF(~iya#p35}kbO@$4S2I=;3KoG8eNA*lHnsLs{%cfxRVL|lDeTDxQO5EZl
zxI(0NETr$p0obR=Wbg&Uv_(lpB4rQwOJBunOo@;b1fwG2Aistt6jRaFT1X`HBm!zL
zI4uQrnkw-8JYAaf2P;y$%a8Yvj{oZ6CjEOLU-)g;6zSaKy3Rdn<2^_A!!x`b33#*P
zH;)6+>wQ?xAWrol660u!YLJO9iEHJ5V|<)W++b3HOT@0*;UAU;lXAgO83BA15#$?o
z3;{@1{1J733l?)|*Cy{Bi0?ubltIdCyi^aT$ia04knlgj!X;*ckh$8`IW$i+R|y%}
z(j@{GD@EB~i5B{+`2ZNd%TvN@`zp+Q0OarX^QT6z7rYN+uvK)id-iu=E0ne10zWDV
zKAwoFB19AhGVz#bxPmAkfDau^lMh=>+{z3QyAj~aw-{hTO5!uK0X|&UPQxd=2&V=^
zaI^mV>Ju|ofL&>#f*UL~i5eVgB`L9?A?L8v?!X|e@e7IJDO`b!lW?Ti5b+xpopT-m
z->HRDo0Glk5eCsByRz5y>LN260hW?Tg*rIZLjHCz_|p|7{ix1R@KWV(sISDvfi5e9
z$U3~!V3b0vKs4d%1ZdoW9m+4IhGg?lbzznR`gb3mgKrO|l;)JU)`r(Nu?TH+&tzk>
z(Y>+9W8+2GF<XEx7-}V4sYlqMr3Behm4cTJ|5hQD5SI1iQD#A)S+Bb+jW$jqPesbT
zw67MTwo!?|=e`}$X*>{E<U&iSRn%s^AdcR|{9F*{x56j(<^U@JCNXesPH`1@V*&~1
zgcUue;wgw~Rjd`&h+RA7eIb(-G8)gZ7=G{oj5m2*4MnjEuHGl~Y9JNa+0_QV0N}BL
zp*ZS;Ky?%z%7ZlFDYRE$o^0Wb2jBff1E^+7r^e^7=7Xo0;LV1tT7uOlG4%vod$fw;
z2m~?a8vu|Ghw^7o5psME&X&3BsH!gL@sWXsum0oDm`rFWcNLHNY?-@?f7}W7Y6dm=
zi4TdDUipOzukHjcYfB{X9G`0Vtrm}@Uy1C1LVbPtQO)sWI+&ILmX!Ra)j-Q|s&ya1
za9j8cQjl2U*IDv63>f}GrueCBhtg^ItU1$(Woy{=8ivXtLjrF5Zi+??HbhQw&*={)
zE8>w%%<vs(_CklOfAd$S8qMbTi$f+}IGmqj@ely<RK~HbgC-D-xka^c1S8SVm(D1A
zOm2<fY*plojdG(B-tCzTg9o$Vny>`De?lPxI0jOGnL8WVRXlT_5C=unKY|1h{3Dq^
zI?Wj5VW-Jaz;F9PVO|y+)(D9N4v;}JH%pLMl`CqZfIEJOSb$jAA@88(?E7yg4k2b0
zl8d}!CTxXA2G=MK=+Ml`h8b{!NbQ0?r+}eiA=xsh3Zae85GF`pt{tm`^v1u3GYsJ8
z5;jv?|ChCNl;9goURtqUa)Cqf1ptPKwk!nvrD!=MuUZ$^&HOiNhW<O+1^s&fNt$Xu
zfhpvv<P;OUc<)+AFFu}#MG6ud;lEjsk$;r{w%fp4`QZI0tcwR^piG2t76@6`aMlAN
zQ2#wOgNRxI-rfT(YcNwQe*zj`@Pk%6Y^Q5Ob|0){fIs6H)-(7Mr2klGAHbi0S(K66
zbLiE8KSgMoM(AJyrYL@>1J0vP9#71p)EI(zCU*Sj4tZ9h7&{%!FR;`blv2T??lKlf
zV#Zh@D@ve%GciD96pO!@xD-(_{>n{&zf_>R6V*l@YJ@Cl8fvc<m?A-JX87&NmY5NA
z1#Lm!vn09-M0^s&;&iZu9s3GksR~#zD!kT^m~i8qFL6Hz=NfPuJF)fSb%G2FVAwhZ
z)rutgUXB6+NCuPt3rY+>$!C~n%tVtfbgfT=coLwlJ33&hWqz2Sz$1b^ZoK?N{5kRQ
z;+X^lij3;<PuTkZ|7im6(*(TuuNchuug*LZ_&4LpxMQlT&J~D6n037q0UZ|x-d`sd
zDS~}<5e?N7Kn^^KmzDkZB{259nK7?KQjQao;)e9!SScm|(8rKb0e}JKQ$x(BMwm~H
zF`t@HIvMGlh_%kvO#~DF*4c4ptdU)0ckRD$-osy17D~fXA+Mvb-arr)1Q0S>6%P*s
zx-(`6{5y00DW#77-JcY8+x>Au*@>X*Z!03aXV{ge9lS3DQIA+d;_J|tLzwe-hWy*H
z7?EV`8NI2Bm;h9cajdH<c0e>nmR%a;Rfe-F<Hx%3y3W#B^KfUVr@Uvu9naKLH2q7e
z7q8Kx6EnF&pSlBZ^+b605Dlb2-^ItjV#c4c5e>vZe+AQ_F=3+f<Wr~D&f9fNVb2<-
zE{Kb3UBfq+GvN242@^s9BvC^F>?$op^G;HcM_nq^|3QU@$B7*0+&LL4<ujXsd||j<
zt;>`etT_utk>Nf|GKvk>7|AI!*dhN&@_iV(4FIQz@q@%yJd`j4>od5Zs09EYo%3H{
z#FtB7|GVNCFTjGVD#;94fZv7FD#2;fs1<X8Ls&qz4hqj?(ySeUft(|doe8r&)r1uY
z1Wy2cnS|=CE%uxDL=;9M0UqGLZ~&150G>1wzwm+u!xbQVZANgyJf5*LEdcm-A@L;I
z>=0mH7{kH|slu}B;C<LQAs*yHOe%D`NX5BpCQBN6Jb$7K3o3VUg_i*i3les11Ai8M
znMAg70q9trtg7KG>j09l+e?J0E-M~XVmb(xTxLQ<I3)2i40gDzqhrsQK}1Tkdw9u@
z1<Q%S&#6oZn+b@FOcP_YoX!ZcN$sK;X;R^om>?9v%p#1T`B0eybw>qjuh??Av--8;
zip$O(0sDnhD!6BL$uS)OopU9Y`Z@`scR{QcwqWVTFrj;ai^&;0MKwM`0<Q=rRe)mr
z22g-NdI~BULzKM{uM4u=fC({{U?8vX7S=MO{9={<-H#yb_F26Id0nOJir2HJxej3H
z*b!{Wu-zeiGkK3H%Sc$?wPVZy4yxyTTZcXta08J~qs@ICxTR$zhEcN7D(nS!iFi2B
zCFa8zW216yfE5ymDUhF2yTX76%NhDT0ANPsQiYBlA2}P3_lU^Cqn6bV!4N{-tZ@ls
z$AGN71JnlLX1uNPX>^(kgXkMMz?lI(MIVUp+R^x9Ld#IlzXTsuMlyI7zcIJS!6y@g
zku0+(cQC;kKSkCP;!ht(G@T<0A{S8rq*(=^qG{ozpV%?7!F<IV2QXF^(YT@+{4QP~
zH^-@D{Q~2}odMXR9R*<$j!dB*`2(j+hK~_B5B3C=6O0(Y4u;kiPVfzCo6J((2o;m}
zSmHrMR3v^N!b!*lF*X<y|6@Wb|L{L11QP#a0+XWiKOPVY*|Fe9)3Ng-K^CcY=#ZaO
zq!w?eoKl$|=@<&h9}5N-Aa*+iKl>OWX*IcyWEx~a(x7v+03g0&S875MhIu!LX+@8r
z%Tq+6;vLnaduNw*T^S3Bv`1*3Y~S4S2L}+e=&4~C%gVsVb|i|<BO&<QPHXUK1`UTi
z{i3y15MQBOWFbCQz<rbe?I-jJ35b(O06s&~hQ<V+1Ze|ssxECvFM=@^MSqtYZkesg
zU>0kyBPBTa!!;IUZrI26fx;LIfg~!zDX{eu>Y6P0)0Lqa`$0GoR9RpuS*eLZ2J>h$
zbq$!lkiP|0x*qPymW6*4%_Ky=9|xA*j%{D^Hxup>4x8%vyN`!t(!#SKSfvQQ-xuNd
zF%aM3v^e-H$qbLy18NW7p~SPJ_|M4nujNlAaw;7M@mN7w40!OU>cLES{8<a^aQGb$
zzm@_!9Dc{ckClLi!FwFo^e3od<+B<4l*wJ-9>|`Ah_iUfg@JBR@(bW<U-&^)Pw;1`
z5dGmQp->_4SLU~n5cr`G>|dw<cmDkOb^wr||0Qw^0@nVgT?!=Y5QxntGaO@}su>GC
zfd@x_OGppOx{Dk(yLH6*ngd|98F=DwJ{54Q(BBo+2lN0lz!>U&C-_9(gTV^n7z41K
z8(>IB73<-GN{0eRLk<K6J9i)(j4+-EfRV|_Sb`uYJcw)>1l1W55J8YS#$?tENGhz5
zT<M>C0`|DDU=<PE_6GEsn9$$sz=bL+BwKpBC`e>sLvn+N4SePdDTXu%Y6mnmR%qy>
zemsbwj2;n(KWe7ZGzOMojQT>SXYfVS5a`k=+!8!$VPBIe(8!!1{3Sw9BbcLP!=4L$
zwedy=3h`v<>0}_bV_RUa0yj8d$P=7}2m_8PaX5|uQU#DHghAFG1<g(${He%}3ouv;
zOxPd72muR$Xfp^}nJ@-@q1I5Dbu{ouf*GrWH?C;rs)@5E!~jP`j>a4ybuyMYqk-h9
zDja%-+VlN6u>z;wKvXiz4u>XVRTPM?3iApsy`6{wpikdr^xuZEW73Jf=kZ`5bP>f+
zUYN=}jfn|$s{7uJvGVZk7B~9rotU^G4V4MYm0{Fd&>;juRNVnpmL22BrRq3{S|TAT
zjO^H746Lh>qZRNSP=SDt7(F501XeJlG1eZ!ni4sfQyA(mjX4)1vJem)vF-&6=qG{!
z@Hd3(q4p0vW;u53xk0Y&Fo;S(E}Q_#8Y{@a0C7lfBg~*XB{Fix4TysF8-se`-qpxa
zL=;40AaAyWK2Juu2k6kcgXZWk`g$ACWhwYYe>Q|%55bJx844X?#dpvhETIh$r~}xs
zh8$nR6_{DG+;_~DgE#P$<m%)(5_1L^lCB?jNe71;(BIP_-){)C`mA*5#7=D#<aR9d
zJRF5NM+j>jdxm2zU_A-s0!YXKvnW@`NI1BL9ppkp=Y&^5N#%}qs$^*13ZkJ<Jh?uY
z9Bl@nX5>c4f*pN)9pj>`sTtC>P9rXw8kteCa%X5<ec15~Qe_+fS3XU`)dqNRJ{S7i
zu)8-N=1D?E(48!DP&_)Gz{jJ^fN@mzId~pJsZcJ+naS_MSj38;ppT$*Rm|1ot{cE(
zjmM)`4XWJQ3VOzrD=bhsb|PXL$3fZ-xDVX`B&rQ1D+iNXYj6y+p_LBmxRTNVYXlX3
zhg1XhV~m{#?^7bK=h;9!9M+hlnGiTMW^QW<%P(f~KG1eGpzrh%bO_)la0LtS6BU%z
zz&TFty<kdp$~@8y(nZ5q*Le^bXm$V+c!0P<JK(VC*^?NWJN~$w>Ciws!w4{?Yucb~
zK9a5hVDU5#ZX}|QXbK$f!u`bq9myXl*~hS(Eta8^IRfxOOvegnk%MLnjSjR2;C;b^
z7aCCEvWSZaq)24;@Dn@wdRjp4o-l@sJQBTbec3Sx2I5CC<{poJQ%exLn3~oUk0E`C
z^bcz2i46Uk3-6!+8L>>saV6rKUI*5tvGp%@JF}xl1v2}Y!$wym)0&vQOk9rH(|=25
z_;~^WJbxQ;c<vC#U{E^-uOs7cGh^s*`WRLZkyV`q#8aSsI4?9=J%fi{JcP^|v-&Uj
zg+{>dMUr}$Yh=Zc5*&UJk`Un|%Sh;G3)GKd&{nFLKEw89$RA~LQjbHD37cWUA!mu=
z(Is~(A-l5Np^;x%UbrFvQHhtukG4`(u<X>q>~kdIC1pL7q3WMvY5@G`$(;5($d#ih
z@EXw445H|rh{f=damYeF!FeZm^u%$Fz)A;hbQy#4aIn!iH_HL>bXqfLAeoJ($lHWG
z^>bBny9Rz90wA6;_#BL>r4u_<fIaAlBxdjfj<%B-ClBD|%{YcVpwe;v2B%2)|Jpkb
zIH{^DjGyHwA_gleis)EC#Ih^{0*VD!QLHG~8w<M+P@1sl+Oeh?Lt-pX(=`bpQBzDc
zF+@{L^3qL05;eUyHNEKMJGZ?#GjDcxW@i)i_pZM`?%A0+Z{BzByX}258;(4t-Z^vn
zVSYQ~mz|XQud*6*lm>Rn{EV;uD@$H!b{zH_NH1Tz&1dh^+k0nrwwQhtc4gVRtu1r@
zZ(kuhuJ)UH!ZY`%r(O55QmkuVyJkBWUEg)#jrq0b)#W=F>5fQve$`5Io;i*;K7{A(
zTVMOETy15vu8vk$monzGBDejEC$g?u<199d@O!yiZXc6=sTK9O(&V+fZ>bevE?%`V
z^oH_0`GQQz)9Q9cR-0XmcGC`8Nmg*J?t=!Asf#sKZbxjzInG1Bd?J3*ZB*Uct#d!g
zj$-z!J7xUuEU&vdSID*Q<LD1h)Vzn&lu_A^TlM!H9j2}tTcdjQ`xq@7*a!9N>RQ)y
z|K|)LLyh|kvga+oEC1T0vX(Hq|6_N}o@8u2{n}~fdbNM8r}8gBHM*-NZKJ31PBDwe
zV@gJk(t9pD5-)c>{VMm)GG_O6y+glG(C+%h?g6i;Q~!!-gIibDzUb`xsG#cp^<DSY
zu-C7<wHa4ff9CJ~$~&&UynXgc8MDI1_Tp--kb7?n{c<?ed6%mr+}SEWliFji-t&~_
zO_hH~R?qwW#~=&YnX6_^)&|#Q)Gk!rcMeAyUBCX9lplAy?B33s@YLRQ)hahVD?2Zk
zhMst?dB^tS%w_u(ZtmUNS@ttWUH2{eJ8SDbOaJEXy|>nW_SX&H-<?9@TPVA~JEp#Q
zX>FydTS&UDDtD1oUkj5m$J6p_p=P_Tb9FV>-PtW`Crw%9+u2|9?)drftHMD#q5m1|
zRU*$w*9Mg;rZtdt2eqEvxC)<WU750H0O4JY8~AKO-OuDUvpZg@+QaNU^GxH;TIPD0
zvUOISBS*U1Z)b{&{m7OvqWAx*ZZ}z0lK*PDF0`PT1M=Egf1AB)>~kLNX8DbdnqA6+
zQ?(nsTYWuIjo!A(Ri#JB%u%(@yREthn{C#aD|{U`;0&>M(CS}ng*$Hz_`+m#@1wt}
z!yjDk%AQHxWq$3T@!0-n^E1j-W~R23GVTjyu3Gxu@$Y5TazLYN^uA{8wG^ml-CDm(
zeKpxHNNw!6wMMvsoJ(hBYYTH4DP`ZCMD!p0j%Z72Z(p%=#j2ybqRr%U82+Oio3HIF
zEJ`?s{zRip82NCb31c4~XTrpX^G#UtVUL7Gm)WH%n#|)vXfn_6nTsZKyU$!SnP>UT
zMU(kBpE(Md&1)l*d1MG9e;^y0%u{^kDDlTNnIn_=NT0bvjbgFr!ikyE$)j%%TA3&J
zq|!;)nMx<&`Kfdgo|8%^;aRD45<Z?vr`|@<WS)cntX8oNdz@B@4cEC;rJ}2pbyhkF
zpG>8*nO&;LWF8+vlX-^E9GT4RK67L;&+?fo#EGKFh4V9|i=1>;oT7xcgwVXUCzVdZ
zi&N<$C#;iB!uhFm5<V2#RnZ>EYvnQr>1?VXU1aJgNEf*}a?(YvQk--)4AQCdjZEe_
zc&gPZiCi7oRHevO%K8j(;y89;mas&zlg_G9l<>9?MiSl>LX)Z|l}^ItsdN%9PNkFZ
z{%{Qz?SZ^FCi5*JbeV&6v8kgVUF_<}NhjgM;TklV9}4X%vIp{7xy(Vj*wvAfE_T;Z
zmUKyyxNu{pbcvJBo_<lnJ3<&Gt`XWWmhk!zn#?_^bP}#irIT<&=&y?QKwb@#`L+<6
z%r}M5We(CMu8y2^iEGbRE0g*Da1BO@t0Vj5IB|7kLzg*7m$>UFOF9`zZ17B`bR{R9
z?I(*8-W9?~!gV2xC45x~6A9Ob&>W~Il}^I-AuRd>t+UdVTpiiaWWFVYCiC?n44IvD
z5`G|z8Yc6G@Mz=@wBAZra@Ua!P3D_I7&2!{7sjKkK_m{3n#LcS(P~5p&1f|`gs~sI
zY-mQSNxt@DGg?ja2TDR_^Jro+4-aAFheaEj%)5s$@dvV@$vn|#t~jHT$viBCCiAu-
zG?_<*&}1%zu;dSvB~Hbhp-MU#Vt$rNXGbg7Z^UM_8X3aa4qiSqqtz6DrNkvWmbuzb
zOy*yv(%H=J$%)B4B7`RM=ny9MKt42?C;7}Jllj-FbVaA6ebi(g9>Tcj>d1yB^X?%m
z6`ge11A)FIE2Wbm<~yl$5<ZzqXGbg7$Hr!~8XrP4TFvnNMr=l_cHj6DvZ;b}k*T8~
zUF7P>>TEKP3}F(vI<le3JjG`&nan><rHfo0Iq4#&q<yl<JR*c9^XL$kA}3vTU)Nik
zjLm5Ecq*L@gLF0w(y75ZHlvly&DLA#V%NMkTInSGRw`X=>L^GTyE<~x*~~6gVls~p
zp~*bMXD*q{n^NgwS4U2|*j-0Xy4WdcUu!at3}GpD;$)7Yy7#V<PKKCALVsmOtB1oi
z7}>GRx2xC=US2CVS_SDO>`bLgT%|baY#5|VTpc;-Y#5|dvx3BAmP*-VrIYX*sdR~}
zBPU(rt|KR1;)He5B~D43%48nz!>VDT<W3=5I(hWt{?XWsRuB2N5u4HKe*ZS&*kAh_
zt#p1^v|*?tC!K^F!>D00KN5OEllkFrb;tg=_O*#W&?YOL&%7z)j7mixI_Z4qr1PPZ
z&WBFAn$r*3!v99Tf1riZlKwm-{8Vz8N@X1-m9`(;SK7X~fmc$g;a5`DyREIz(Dawl
z^QHN6u2;xEYh?zqK?dzoS_ge*OTQsP&V7P(sOQVMTq|id$a{ODL^hwVN2cu3QkJ;#
z|MF9Pdun#?e!2M+wcTg8`%SCyZdx#BX+L$|%r%`$R?O|{?q0Hd(Q0=zyxErYsIr|>
z{>B!!_)V5tCotS$Yp(n>{1#11$eSKR#ig<e*b@8^uQ;0Kc3j%kSy*s+VP@xw1zm+%
zOFLFCE}Yb{urPahch}Ow^n)fA7OYvaw6idI`s70Ql4V^BSFBmyT{x`JHmPmu#I|W|
zZ3o-@dHug6>t9|r#HlBBB41KJ)K$PR_e?qPR%E|qWdzt7Y(p|bC)&=vsU1j$c%mJ_
zPGDz}DLc_FU{{iv6VYy949NtPXb(^TdxE{d-e4av7K{V?k_>c2`+*5ye{cXe5F7+r
zNoJQsZ6tGJq9S+!r#A)vmlipdWFeEDc3!fJXf~`Do%*W(qgra${|o=a^T<nH@{*TE
zOS_DQ;21Cq91D&Ev%&G;1aKla37ia00dv5q;50B7%mb%`Gr*bPEO0hB2b>Ge1LuPa
zz=dEw=l~1ALeL4iKm-=KuRB`;E&>;WrC=FY4pxAb;1aM3tOng+4Y(9s2718d;0kah
zxC&eit^wDAwct8%J-7kf2yOy5gI9uAfmegqfY*XsTI37ah;9Y12kXEaz#GAB;7#Cm
za0j>(+y!EAH@FA98N3C&6}%0+9lQg)6Wj~#1MdRw2JZpu!F$05@ILT<a6fneJP1Aj
zJ_tSpJ`5fL9|0c)9|Io;p8%f(4}(vEPlHFmXTV1AS@0-$415lJ9()0O5j+mQ1ilQu
z0uu05@HOyt@D1=y@GbCd@C5h{_%8S!*aW^0egJ+5o&-;Ur@@cFkHJsCPr=W?&%rOi
zFTt<CufcD?Z^7@t@4+8h?9A;?;2H2Ncn<s-{000K{0;ma`~&<G{0saW{0BS_UI3Vm
znu%Wv7y=k<1~vyn!4_Z`*b)o}TY*=A5nyYu4cHcJ2et=0fRSKFuoKuBi~_rWUBPIu
z8yEw22YY}5*c0pp_6GZav0xn77mNq{feB!LZ~!<E90XdyM9>B%fg+d;rhtRNR4@%p
z2Zw+|!3=O1I2;@Sjs!EoQJ@_h4UPe`z_H*sFdG~XP5>u@lfcQ~6fg&z3Qhxa!8~v}
zI0Kvs&H`tHbHKUaJa9g^09**>gAT9&ECijP3q)WMSPYhci@?QTDOd)UgB3&U{7QH}
zgZ`Gm_R}@s{cFr~I8di!vmBSr^MDS9L$w*s+2(k7o8l%Ou%~%&JX-$`w^=jYa*eq4
zn&T5}u6J>8{FQ^}2W_TnwK+c8!Snex(~aCbkM!Vrxd-kwZ@$CtMdL(limP(){i4lu
zw+@E;wweCmQYm+T=I+l@?*2@r%iW*3`!jccTIq84XYT&Y-Je#v-2IumKSN)ayFV#+
zf9CGb&2#r>?*7c(e=lP9-+<kp2j}k3mv;TvajW<xQ7ZkP)4?I&P?Gr!(P7|la0JQ5
z9MMd06v+fs^dLHhWY>x4SduM4qS@ehZ~{0HoCHn=r;rTtgcd<`8kh^_fz!bm;7pPo
zH=?siHhGB71?Q3MEf8G*E+pB@A?g4Nz(SJg2%%Ns3IdCyVSpvzB9evm;P@$h&Mg1$
zsIrFBTdC#$6z^|=YWsiX*n3j*{J)b)ru#47`d<o`k!;@(dMDW+BDw^u0@BrVgEin%
za2d%=is*811-KGi1+E6yfNM!MO^B`|+2SC&0o+KkDM55IcqPdm3(>2=Yrtzsrhr7R
z1Gj?LldMUI-T>Z6vbRC>CU85+h6>T0Bs(}nF}NGt1KteY0^SPVMl$gudI!m0(j>YU
z+y~wT-VNSEvTZ~3UXooEqW6LKlT1>H9sm!LY`zeE5PS%Hm}Fi_^bzn;@G+9<F3~5z
zCrPHDM4tkmCYhZQeTHPxO7vOqD0mEf4tySb0eq2U`bhL8@MZ87kbtj(uYs?V%<750
zNiv-$`ZjoiWG+wiUGP1U1ryQt!4JR>NhbD0Pl2bwk4V;{L_YyPC0RZZ{T%#)WKl}=
zE0SeC(Qm+S!SBHD!5_dMN!A21mnC`@JO};^{sR6A{s#UI{sI08{ssO`a`%SldGG?c
zakIt#In^P6!De7{FcfS7hJh`?aIh741sDOg2HSvb!FFJKumczgb_6?toxv!u3)mHm
z2D^bVV0W+wD1be|USMyq4;Tx^fqlVvupgKJ_6G-m1HnO{6-)$eU=k>T$zTdN7)%Az
zz;tj3I26nPhk?Vv5#UHL6I?nZ|C~Tx@{*UAPq_?zS`WA!Tmh~GSAna+HQ-vX7F-9e
z2RDEl`|y<3<15X}OQZZB*Qj}UF%<7@VC`*S?QLM~ZD8$fVC`*S?QLM~ZD8$fVC`*S
z?QLM~ZD8$fkVR|RE;sAjC6$kAZv$&@18Z*sYi|Q<Zv$&@18Z*sYi|Q<Zv$&@18Z*s
zYi|Q<Zv$&@18Z*sYi|Q<Zv$&@L!~(SE=IL<<=zI?-Uim*2G-sN*4_rz-Uim*2G-sN
z*4_rz-Uim*2G-sN*4_rz-Uim*2G-sN*4_rz-iAtXq<gc$Gnvwr-$-TcZD8$fVC`*S
z?QLLvcZ{{Sfwi}RwYPz_w}G{{fwi}RwYPz_w}G{{fwi}RwYPz_x1mZp<pij@oRznM
zwYPz_w}G{{fwi}RwYPz_w}G{{fwi}RwYPz_w}G{{q4JEhw}G{{fwi}RwYP!wedMZk
zrMwN*(v^D~SbG~-dmC7L8(4cASbG~-dmC7L8(4cASbG~-dmC7L8(4cASbG~-dmC7L
z8(4cASbH1#x+E*5EB7|A_BOEgHn8?Ku=X~v_BOEgHn8?Ku=X~v_BOEgHn8?Ku=X~v
z_BOEgHn8?Ku=X~v_BK@ab-lGo?QLM~ZD8$fs2r@dw}G{{fwi}RwYPz_w}G{{fwi}R
zwYPz_w}G{{fwi}RwYPz_w}G{{q56VVy?2##<=zI?-Uim*2G-sN*4_rz-Uim*2G-sN
z*4_rz-iFFqf%Z1A_BOEgHn8?Ku=X~v_BOEgHdGH2<xYTV>B_wgti27ay$!6r4XnKl
zti27ay$!6r4XnKlti27ay$!6r4V7o4y$!6r4XnKlti27rO+Spc!ThE-Z$rstD3x`P
zy}JY&ctxd$q0d)Tc^CSAMWtt<k24?IzkAhvWZ5FWM@{+qKQDR7OJ4Glm%QX9FL}vJ
TUh<NcyyPV>dC5y&UUcQZ*Z$a(
diff --git a/js/dojo/dojox/string/Builder.js b/js/dojo/dojox/string/Builder.js
--- a/js/dojo/dojox/string/Builder.js
+++ b/js/dojo/dojox/string/Builder.js
@@ -1,101 +1,91 @@
-if(!dojo._hasResource["dojox.string.Builder"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.string.Builder"] = true;
-dojo.provide("dojox.string.Builder");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
-(function(){
- dojox.string.Builder = function(/*String?*/str){
- // summary:
- // A fast buffer for creating large strings
- // str: The initial string to seed the buffer with
- this.b = dojo.isIE ? [] : "";
- if(str){ this.append(str); }
- };
-
- var m = {
- append: function(/*String*/s){
- // summary: Append all arguments to the end of the buffer
- return this.appendArray(dojo._toArray(arguments)); // dojox.string.Builder
- },
- concat: function(/*String*/s){
- return this.append(s);
- },
- appendArray: function(/*Array*/strings) {
- this.b = String.prototype.concat.apply(this.b, strings);
- return this;
- },
- clear: function(){
- // summary: Remove all characters from the buffer
- this._clear();
- this.length = 0;
- return this;
- },
- replace: function(oldStr,newStr){
- // summary: Replace instances of one string with another in the buffer
- var s = this.toString();
- s = s.replace(oldStr,newStr);
- this._reset(s);
- this.length = s.length;
- return this;
- },
- remove: function(start, len){
- // summary: Remove len characters starting at index start
- if(len == 0){ return this; }
- var s = this.toString();
- this.clear();
- if(start > 0){
- this.append(s.substring(0, start));
- }
- if(start+len < s.length){
- this.append(s.substring(start+len));
- }
- return this;
- },
- insert: function(index, str){
- // summary: Insert string str starting at index
- var s = this.toString();
- this.clear();
- if(index == 0){
- this.append(str);
- this.append(s);
- return this;
- }else{
- this.append(s.substring(0, index));
- this.append(str);
- this.append(s.substring(index));
- }
- return this;
- },
- toString: function(){
- return this.b;
- },
- _clear: function(){
- this.b = "";
- },
- _reset: function(s){
- this.b = s;
- }
- }; // will hold methods for Builder
-
- if(dojo.isIE){
- dojo.mixin(m, {
- toString: function(){
- // Summary: Get the buffer as a string
- return this.b.join("");
- },
- appendArray: function(strings){
- this.b = this.b.concat(strings);
- return this;
- },
- _clear: function(){
- this.b = [];
- },
- _reset: function(s){
- this.b = [ s ];
- }
- });
- }
-
- dojo.extend(dojox.string.Builder, m);
-})();
-
+if(!dojo._hasResource["dojox.string.Builder"]){
+dojo._hasResource["dojox.string.Builder"]=true;
+dojo.provide("dojox.string.Builder");
+dojox.string.Builder=function(_1){
+var b="";
+this.length=0;
+this.append=function(s){
+if(arguments.length>1){
+var _2="",l=arguments.length;
+switch(l){
+case 9:
+_2=""+arguments[8]+_2;
+case 8:
+_2=""+arguments[7]+_2;
+case 7:
+_2=""+arguments[6]+_2;
+case 6:
+_2=""+arguments[5]+_2;
+case 5:
+_2=""+arguments[4]+_2;
+case 4:
+_2=""+arguments[3]+_2;
+case 3:
+_2=""+arguments[2]+_2;
+case 2:
+b+=""+arguments[0]+arguments[1]+_2;
+break;
+default:
+var i=0;
+while(i<arguments.length){
+_2+=arguments[i++];
+}
+b+=_2;
+}
+}else{
+b+=s;
}
+this.length=b.length;
+return this;
+};
+this.concat=function(s){
+return this.append.apply(this,arguments);
+};
+this.appendArray=function(_3){
+return this.append.apply(this,_3);
+};
+this.clear=function(){
+b="";
+this.length=0;
+return this;
+};
+this.replace=function(_4,_5){
+b=b.replace(_4,_5);
+this.length=b.length;
+return this;
+};
+this.remove=function(_6,_7){
+if(_7===undefined){
+_7=b.length;
+}
+if(_7==0){
+return this;
+}
+b=b.substr(0,_6)+b.substr(_6+_7);
+this.length=b.length;
+return this;
+};
+this.insert=function(_8,_9){
+if(_8==0){
+b=_9+b;
+}else{
+b=b.slice(0,_8)+_9+b.slice(_8);
+}
+this.length=b.length;
+return this;
+};
+this.toString=function(){
+return b;
+};
+if(_1){
+this.append(_1);
+}
+};
+}
diff --git a/js/dojo/dojox/string/README b/js/dojo/dojox/string/README
--- a/js/dojo/dojox/string/README
+++ b/js/dojo/dojox/string/README
@@ -1,39 +1,39 @@
-------------------------------------------------------------------------------
DojoX String Utilities
-------------------------------------------------------------------------------
Version 0.9
Release date: 05/08/2007
-------------------------------------------------------------------------------
Project state:
-dojox.string.Builder: stable
+dojox.string.Builder: production
dojox.string.sprintf: beta
dojox.string.tokenize: beta
-------------------------------------------------------------------------------
Project authors
Ben Lowery
Tom Trenka (ttrenka@gmail.com)
Neil Roberts
-------------------------------------------------------------------------------
Project description
The DojoX String utilties project is a placeholder for miscellaneous string
utility functions. At the time of writing, only the Builder object has been
added; but we anticipate other string utilities may end up living here as well.
-------------------------------------------------------------------------------
Dependencies:
Dojo Core (package loader).
-------------------------------------------------------------------------------
Documentation
See the Dojo Toolkit API docs (http://dojotookit.org/api), dojo.string.Builder.
-------------------------------------------------------------------------------
Installation instructions
Grab the following from the Dojo SVN Repository:
http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/string/*
Install into the following directory structure:
/dojox/string/
...which should be at the same level as your Dojo checkout.
diff --git a/js/dojo/dojox/string/sprintf.js b/js/dojo/dojox/string/sprintf.js
--- a/js/dojo/dojox/string/sprintf.js
+++ b/js/dojo/dojox/string/sprintf.js
@@ -1,406 +1,280 @@
-if(!dojo._hasResource["dojox.string.sprintf"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.string.sprintf"] = true;
-dojo.provide("dojox.string.sprintf");
-
-dojo.require("dojox.string.tokenize");
-
-dojox.string.sprintf = function(/*String*/ format, /*mixed...*/ filler){
- for(var args = [], i = 1; i < arguments.length; i++){
- args.push(arguments[i]);
- }
- var formatter = new dojox.string.sprintf.Formatter(format);
- return formatter.format.apply(formatter, args);
-}
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojox.string.sprintf.Formatter = function(/*String*/ format){
- var tokens = [];
- this._mapped = false;
- this._format = format;
- this._tokens = dojox.string.tokenize(format, this._re, this._parseDelim, this);
-}
-dojo.extend(dojox.string.sprintf.Formatter, {
- _re: /\%(?:\(([\w_]+)\)|([1-9]\d*)\$)?([0 +\-\#]*)(\*|\d+)?(\.)?(\*|\d+)?[hlL]?([\%scdeEfFgGiouxX])/g,
- _parseDelim: function(mapping, intmapping, flags, minWidth, period, precision, specifier){
- if(mapping){
- this._mapped = true;
- }
- return {
- mapping: mapping,
- intmapping: intmapping,
- flags: flags,
- _minWidth: minWidth, // May be dependent on parameters
- period: period,
- _precision: precision, // May be dependent on parameters
- specifier: specifier
- };
- },
- _specifiers: {
- b: {
- base: 2,
- isInt: true
- },
- o: {
- base: 8,
- isInt: true
- },
- x: {
- base: 16,
- isInt: true
- },
- X: {
- extend: ["x"],
- toUpper: true
- },
- d: {
- base: 10,
- isInt: true
- },
- i: {
- extend: ["d"]
- },
- u: {
- extend: ["d"],
- isUnsigned: true
- },
- c: {
- setArg: function(token){
- if(!isNaN(token.arg)){
- var num = parseInt(token.arg);
- if(num < 0 || num > 127){
- throw new Error("invalid character code passed to %c in sprintf");
- }
- token.arg = isNaN(num) ? "" + num : String.fromCharCode(num);
- }
- }
- },
- s: {
- setMaxWidth: function(token){
- token.maxWidth = (token.period == ".") ? token.precision : -1;
- }
- },
- e: {
- isDouble: true,
- doubleNotation: "e"
- },
- E: {
- extend: ["e"],
- toUpper: true
- },
- f: {
- isDouble: true,
- doubleNotation: "f"
- },
- F: {
- extend: ["f"]
- },
- g: {
- isDouble: true,
- doubleNotation: "g"
- },
- G: {
- extend: ["g"],
- toUpper: true
- }
- },
- format: function(/*mixed...*/ filler){
- if(this._mapped && typeof filler != "object"){
- throw new Error("format requires a mapping");
- }
-
- var str = "";
- var position = 0;
- for(var i = 0, token; i < this._tokens.length; i++){
- token = this._tokens[i];
- if(typeof token == "string"){
- str += token;
- }else{
- if(this._mapped){
- if(typeof filler[token.mapping] == "undefined"){
- throw new Error("missing key " + token.mapping);
- }
- token.arg = filler[token.mapping];
- }else{
- if(token.intmapping){
- var position = parseInt(token.intmapping) - 1;
- }
- if(position >= arguments.length){
- throw new Error("got " + arguments.length + " printf arguments, insufficient for '" + this._format + "'");
- }
- token.arg = arguments[position++];
- }
-
- if(!token.compiled){
- token.compiled = true;
- token.sign = "";
- token.zeroPad = false;
- token.rightJustify = false;
- token.alternative = false;
-
- var flags = {};
- for(var fi = token.flags.length; fi--;){
- var flag = token.flags.charAt(fi);
- flags[flag] = true;
- switch(flag){
- case " ":
- token.sign = " ";
- break;
- case "+":
- token.sign = "+";
- break;
- case "0":
- token.zeroPad = (flags["-"]) ? false : true;
- break;
- case "-":
- token.rightJustify = true;
- token.zeroPad = false;
- break;
- case "\#":
- token.alternative = true;
- break;
- default:
- throw Error("bad formatting flag '" + token.flags.charAt(fi) + "'");
- }
- }
-
- token.minWidth = (token._minWidth) ? parseInt(token._minWidth) : 0;
- token.maxWidth = -1;
- token.toUpper = false;
- token.isUnsigned = false;
- token.isInt = false;
- token.isDouble = false;
- token.precision = 1;
- if(token.period == '.'){
- if(token._precision){
- token.precision = parseInt(token._precision);
- }else{
- token.precision = 0;
- }
- }
-
- var mixins = this._specifiers[token.specifier];
- if(typeof mixins == "undefined"){
- throw new Error("unexpected specifier '" + token.specifier + "'");
- }
- if(mixins.extend){
- dojo.mixin(mixins, this._specifiers[mixins.extend]);
- delete mixins.extend;
- }
- dojo.mixin(token, mixins);
- }
-
- if(typeof token.setArg == "function"){
- token.setArg(token);
- }
-
- if(typeof token.setMaxWidth == "function"){
- token.setMaxWidth(token);
- }
- if(token._minWidth == "*"){
- if(this._mapped){
- throw new Error("* width not supported in mapped formats");
- }
- token.minWidth = parseInt(arguments[position++]);
- if(isNaN(token.minWidth)){
- throw new Error("the argument for * width at position " + position + " is not a number in " + this._format);
- }
- // negative width means rightJustify
- if (token.minWidth < 0) {
- token.rightJustify = true;
- token.minWidth = -token.minWidth;
- }
- }
-
- if(token._precision == "*" && token.period == "."){
- if(this._mapped){
- throw new Error("* precision not supported in mapped formats");
- }
- token.precision = parseInt(arguments[position++]);
- if(isNaN(token.precision)){
- throw Error("the argument for * precision at position " + position + " is not a number in " + this._format);
- }
- // negative precision means unspecified
- if (token.precision < 0) {
- token.precision = 1;
- token.period = '';
- }
- }
-
- if(token.isInt){
- // a specified precision means no zero padding
- if(token.period == '.'){
- token.zeroPad = false;
- }
- this.formatInt(token);
- }else if(token.isDouble){
- if(token.period != '.'){
- token.precision = 6;
- }
- this.formatDouble(token);
- }
- this.fitField(token);
-
- str += "" + token.arg;
- }
- }
-
- return str;
- },
- _zeros10: '0000000000',
- _spaces10: ' ',
- formatInt: function(token) {
- var i = parseInt(token.arg);
- if(!isFinite(i)){ // isNaN(f) || f == Number.POSITIVE_INFINITY || f == Number.NEGATIVE_INFINITY)
- // allow this only if arg is number
- if(typeof token.arg != "number"){
- throw new Error("format argument '" + token.arg + "' not an integer; parseInt returned " + i);
- }
- //return '' + i;
- i = 0;
- }
-
- // if not base 10, make negatives be positive
- // otherwise, (-10).toString(16) is '-a' instead of 'fffffff6'
- if(i < 0 && (token.isUnsigned || token.base != 10)){
- i = 0xffffffff + i + 1;
- }
-
- if(i < 0){
- token.arg = (- i).toString(token.base);
- this.zeroPad(token);
- token.arg = "-" + token.arg;
- }else{
- token.arg = i.toString(token.base);
- // need to make sure that argument 0 with precision==0 is formatted as ''
- if(!i && !token.precision){
- token.arg = "";
- }else{
- this.zeroPad(token);
- }
- if(token.sign){
- token.arg = token.sign + token.arg;
- }
- }
- if(token.base == 16){
- if(token.alternative){
- token.arg = '0x' + token.arg;
- }
- toke.art = token.toUpper ? token.arg.toUpperCase() : token.arg.toLowerCase();
- }
- if(token.base == 8){
- if(token.alternative && token.arg.charAt(0) != '0'){
- token.arg = '0' + token.arg;
- }
- }
- },
- formatDouble: function(token) {
- var f = parseFloat(token.arg);
- if(!isFinite(f)){ // isNaN(f) || f == Number.POSITIVE_INFINITY || f == Number.NEGATIVE_INFINITY)
- // allow this only if arg is number
- if(typeof token.arg != "number"){
- throw new Error("format argument '" + token.arg + "' not a float; parseFloat returned " + f);
- }
- // C99 says that for 'f':
- // infinity -> '[-]inf' or '[-]infinity' ('[-]INF' or '[-]INFINITY' for 'F')
- // NaN -> a string starting with 'nan' ('NAN' for 'F')
- // this is not commonly implemented though.
- //return '' + f;
- f = 0;
- }
-
- switch(token.doubleNotation) {
- case 'e': {
- token.arg = f.toExponential(token.precision);
- break;
- }
- case 'f': {
- token.arg = f.toFixed(token.precision);
- break;
- }
- case 'g': {
- // C says use 'e' notation if exponent is < -4 or is >= prec
- // ECMAScript for toPrecision says use exponential notation if exponent is >= prec,
- // though step 17 of toPrecision indicates a test for < -6 to force exponential.
- if(Math.abs(f) < 0.0001){
- //print("forcing exponential notation for f=" + f);
- token.arg = f.toExponential(token.precision > 0 ? token.precision - 1 : token.precision);
- }else{
- token.arg = f.toPrecision(token.precision);
- }
-
- // In C, unlike 'f', 'gG' removes trailing 0s from fractional part, unless alternative format flag ("#").
- // But ECMAScript formats toPrecision as 0.00100000. So remove trailing 0s.
- if(!token.alternative){
- //print("replacing trailing 0 in '" + s + "'");
- token.arg = token.arg.replace(/(\..*[^0])0*/, "$1");
- // if fractional part is entirely 0, remove it and decimal point
- token.arg = token.arg.replace(/\.0*e/, 'e').replace(/\.0$/,'');
- }
- break;
- }
- default: throw new Error("unexpected double notation '" + token.doubleNotation + "'");
- }
-
- // C says that exponent must have at least two digits.
- // But ECMAScript does not; toExponential results in things like "1.000000e-8" and "1.000000e+8".
- // Note that s.replace(/e([\+\-])(\d)/, "e$10$2") won't work because of the "$10" instead of "$1".
- // And replace(re, func) isn't supported on IE50 or Safari1.
- token.arg = token.arg.replace(/e\+(\d)$/, "e+0$1").replace(/e\-(\d)$/, "e-0$1");
-
- // Ensure a '0' before the period.
- // Opera implements (0.001).toString() as '0.001', but (0.001).toFixed(1) is '.001'
- if(dojo.isOpera){
- token.arg = token.arg.replace(/^\./, '0.');
- }
-
- // if alt, ensure a decimal point
- if(token.alternative){
- token.arg = token.arg.replace(/^(\d+)$/,"$1.");
- token.arg = token.arg.replace(/^(\d+)e/,"$1.e");
- }
-
- if(f >= 0 && token.sign){
- token.arg = token.sign + token.arg;
- }
-
- token.arg = token.toUpper ? token.arg.toUpperCase() : token.arg.toLowerCase();
- },
- zeroPad: function(token, /*Int*/ length) {
- length = (arguments.length == 2) ? length : token.precision;
- if(typeof token.arg != "string"){
- token.arg = "" + token.arg;
- }
-
- var tenless = length - 10;
- while(token.arg.length < tenless){
- token.arg = (token.rightJustify) ? token.arg + this._zeros10 : this._zeros10 + token.arg;
- }
- var pad = length - token.arg.length;
- token.arg = (token.rightJustify) ? token.arg + this._zeros10.substring(0, pad) : this._zeros10.substring(0, pad) + token.arg;
- },
- fitField: function(token) {
- if(token.maxWidth >= 0 && token.arg.length > token.maxWidth){
- return token.arg.substring(0, token.maxWidth);
- }
- if(token.zeroPad){
- this.zeroPad(token, token.minWidth);
- return;
- }
- this.spacePad(token);
- },
- spacePad: function(token, /*Int*/ length) {
- length = (arguments.length == 2) ? length : token.minWidth;
- if(typeof token.arg != 'string'){
- token.arg = '' + token.arg;
- }
-
- var tenless = length - 10;
- while(token.arg.length < tenless){
- token.arg = (token.rightJustify) ? token.arg + this._spaces10 : this._spaces10 + token.arg;
- }
- var pad = length - token.arg.length;
- token.arg = (token.rightJustify) ? token.arg + this._spaces10.substring(0, pad) : this._spaces10.substring(0, pad) + token.arg;
- }
-});
-
+if(!dojo._hasResource["dojox.string.sprintf"]){
+dojo._hasResource["dojox.string.sprintf"]=true;
+dojo.provide("dojox.string.sprintf");
+dojo.require("dojox.string.tokenize");
+dojox.string.sprintf=function(_1,_2){
+for(var _3=[],i=1;i<arguments.length;i++){
+_3.push(arguments[i]);
+}
+var _4=new dojox.string.sprintf.Formatter(_1);
+return _4.format.apply(_4,_3);
+};
+dojox.string.sprintf.Formatter=function(_5){
+var _6=[];
+this._mapped=false;
+this._format=_5;
+this._tokens=dojox.string.tokenize(_5,this._re,this._parseDelim,this);
+};
+dojo.extend(dojox.string.sprintf.Formatter,{_re:/\%(?:\(([\w_]+)\)|([1-9]\d*)\$)?([0 +\-\#]*)(\*|\d+)?(\.)?(\*|\d+)?[hlL]?([\%scdeEfFgGiouxX])/g,_parseDelim:function(_7,_8,_9,_a,_b,_c,_d){
+if(_7){
+this._mapped=true;
+}
+return {mapping:_7,intmapping:_8,flags:_9,_minWidth:_a,period:_b,_precision:_c,specifier:_d};
+},_specifiers:{b:{base:2,isInt:true},o:{base:8,isInt:true},x:{base:16,isInt:true},X:{extend:["x"],toUpper:true},d:{base:10,isInt:true},i:{extend:["d"]},u:{extend:["d"],isUnsigned:true},c:{setArg:function(_e){
+if(!isNaN(_e.arg)){
+var _f=parseInt(_e.arg);
+if(_f<0||_f>127){
+throw new Error("invalid character code passed to %c in sprintf");
+}
+_e.arg=isNaN(_f)?""+_f:String.fromCharCode(_f);
+}
+}},s:{setMaxWidth:function(_10){
+_10.maxWidth=(_10.period==".")?_10.precision:-1;
+}},e:{isDouble:true,doubleNotation:"e"},E:{extend:["e"],toUpper:true},f:{isDouble:true,doubleNotation:"f"},F:{extend:["f"]},g:{isDouble:true,doubleNotation:"g"},G:{extend:["g"],toUpper:true}},format:function(_11){
+if(this._mapped&&typeof _11!="object"){
+throw new Error("format requires a mapping");
+}
+var str="";
+var _12=0;
+for(var i=0,_13;i<this._tokens.length;i++){
+_13=this._tokens[i];
+if(typeof _13=="string"){
+str+=_13;
+}else{
+if(this._mapped){
+if(typeof _11[_13.mapping]=="undefined"){
+throw new Error("missing key "+_13.mapping);
+}
+_13.arg=_11[_13.mapping];
+}else{
+if(_13.intmapping){
+var _12=parseInt(_13.intmapping)-1;
+}
+if(_12>=arguments.length){
+throw new Error("got "+arguments.length+" printf arguments, insufficient for '"+this._format+"'");
+}
+_13.arg=arguments[_12++];
+}
+if(!_13.compiled){
+_13.compiled=true;
+_13.sign="";
+_13.zeroPad=false;
+_13.rightJustify=false;
+_13.alternative=false;
+var _14={};
+for(var fi=_13.flags.length;fi--;){
+var _15=_13.flags.charAt(fi);
+_14[_15]=true;
+switch(_15){
+case " ":
+_13.sign=" ";
+break;
+case "+":
+_13.sign="+";
+break;
+case "0":
+_13.zeroPad=(_14["-"])?false:true;
+break;
+case "-":
+_13.rightJustify=true;
+_13.zeroPad=false;
+break;
+case "#":
+_13.alternative=true;
+break;
+default:
+throw Error("bad formatting flag '"+_13.flags.charAt(fi)+"'");
+}
+}
+_13.minWidth=(_13._minWidth)?parseInt(_13._minWidth):0;
+_13.maxWidth=-1;
+_13.toUpper=false;
+_13.isUnsigned=false;
+_13.isInt=false;
+_13.isDouble=false;
+_13.precision=1;
+if(_13.period=="."){
+if(_13._precision){
+_13.precision=parseInt(_13._precision);
+}else{
+_13.precision=0;
+}
+}
+var _16=this._specifiers[_13.specifier];
+if(typeof _16=="undefined"){
+throw new Error("unexpected specifier '"+_13.specifier+"'");
+}
+if(_16.extend){
+dojo.mixin(_16,this._specifiers[_16.extend]);
+delete _16.extend;
+}
+dojo.mixin(_13,_16);
+}
+if(typeof _13.setArg=="function"){
+_13.setArg(_13);
+}
+if(typeof _13.setMaxWidth=="function"){
+_13.setMaxWidth(_13);
+}
+if(_13._minWidth=="*"){
+if(this._mapped){
+throw new Error("* width not supported in mapped formats");
+}
+_13.minWidth=parseInt(arguments[_12++]);
+if(isNaN(_13.minWidth)){
+throw new Error("the argument for * width at position "+_12+" is not a number in "+this._format);
+}
+if(_13.minWidth<0){
+_13.rightJustify=true;
+_13.minWidth=-_13.minWidth;
+}
+}
+if(_13._precision=="*"&&_13.period=="."){
+if(this._mapped){
+throw new Error("* precision not supported in mapped formats");
}
+_13.precision=parseInt(arguments[_12++]);
+if(isNaN(_13.precision)){
+throw Error("the argument for * precision at position "+_12+" is not a number in "+this._format);
+}
+if(_13.precision<0){
+_13.precision=1;
+_13.period="";
+}
+}
+if(_13.isInt){
+if(_13.period=="."){
+_13.zeroPad=false;
+}
+this.formatInt(_13);
+}else{
+if(_13.isDouble){
+if(_13.period!="."){
+_13.precision=6;
+}
+this.formatDouble(_13);
+}
+}
+this.fitField(_13);
+str+=""+_13.arg;
+}
+}
+return str;
+},_zeros10:"0000000000",_spaces10:" ",formatInt:function(_17){
+var i=parseInt(_17.arg);
+if(!isFinite(i)){
+if(typeof _17.arg!="number"){
+throw new Error("format argument '"+_17.arg+"' not an integer; parseInt returned "+i);
+}
+i=0;
+}
+if(i<0&&(_17.isUnsigned||_17.base!=10)){
+i=4294967295+i+1;
+}
+if(i<0){
+_17.arg=(-i).toString(_17.base);
+this.zeroPad(_17);
+_17.arg="-"+_17.arg;
+}else{
+_17.arg=i.toString(_17.base);
+if(!i&&!_17.precision){
+_17.arg="";
+}else{
+this.zeroPad(_17);
+}
+if(_17.sign){
+_17.arg=_17.sign+_17.arg;
+}
+}
+if(_17.base==16){
+if(_17.alternative){
+_17.arg="0x"+_17.arg;
+}
+_17.arg=_17.toUpper?_17.arg.toUpperCase():_17.arg.toLowerCase();
+}
+if(_17.base==8){
+if(_17.alternative&&_17.arg.charAt(0)!="0"){
+_17.arg="0"+_17.arg;
+}
+}
+},formatDouble:function(_18){
+var f=parseFloat(_18.arg);
+if(!isFinite(f)){
+if(typeof _18.arg!="number"){
+throw new Error("format argument '"+_18.arg+"' not a float; parseFloat returned "+f);
+}
+f=0;
+}
+switch(_18.doubleNotation){
+case "e":
+_18.arg=f.toExponential(_18.precision);
+break;
+case "f":
+_18.arg=f.toFixed(_18.precision);
+break;
+case "g":
+if(Math.abs(f)<0.0001){
+_18.arg=f.toExponential(_18.precision>0?_18.precision-1:_18.precision);
+}else{
+_18.arg=f.toPrecision(_18.precision);
+}
+if(!_18.alternative){
+_18.arg=_18.arg.replace(/(\..*[^0])0*/,"$1");
+_18.arg=_18.arg.replace(/\.0*e/,"e").replace(/\.0$/,"");
+}
+break;
+default:
+throw new Error("unexpected double notation '"+_18.doubleNotation+"'");
+}
+_18.arg=_18.arg.replace(/e\+(\d)$/,"e+0$1").replace(/e\-(\d)$/,"e-0$1");
+if(dojo.isOpera){
+_18.arg=_18.arg.replace(/^\./,"0.");
+}
+if(_18.alternative){
+_18.arg=_18.arg.replace(/^(\d+)$/,"$1.");
+_18.arg=_18.arg.replace(/^(\d+)e/,"$1.e");
+}
+if(f>=0&&_18.sign){
+_18.arg=_18.sign+_18.arg;
+}
+_18.arg=_18.toUpper?_18.arg.toUpperCase():_18.arg.toLowerCase();
+},zeroPad:function(_19,_1a){
+_1a=(arguments.length==2)?_1a:_19.precision;
+if(typeof _19.arg!="string"){
+_19.arg=""+_19.arg;
+}
+var _1b=_1a-10;
+while(_19.arg.length<_1b){
+_19.arg=(_19.rightJustify)?_19.arg+this._zeros10:this._zeros10+_19.arg;
+}
+var pad=_1a-_19.arg.length;
+_19.arg=(_19.rightJustify)?_19.arg+this._zeros10.substring(0,pad):this._zeros10.substring(0,pad)+_19.arg;
+},fitField:function(_1c){
+if(_1c.maxWidth>=0&&_1c.arg.length>_1c.maxWidth){
+return _1c.arg.substring(0,_1c.maxWidth);
+}
+if(_1c.zeroPad){
+this.zeroPad(_1c,_1c.minWidth);
+return;
+}
+this.spacePad(_1c);
+},spacePad:function(_1d,_1e){
+_1e=(arguments.length==2)?_1e:_1d.minWidth;
+if(typeof _1d.arg!="string"){
+_1d.arg=""+_1d.arg;
+}
+var _1f=_1e-10;
+while(_1d.arg.length<_1f){
+_1d.arg=(_1d.rightJustify)?_1d.arg+this._spaces10:this._spaces10+_1d.arg;
+}
+var pad=_1e-_1d.arg.length;
+_1d.arg=(_1d.rightJustify)?_1d.arg+this._spaces10.substring(0,pad):this._spaces10.substring(0,pad)+_1d.arg;
+}});
+}
diff --git a/js/dojo/dojox/string/tokenize.js b/js/dojo/dojox/string/tokenize.js
--- a/js/dojo/dojox/string/tokenize.js
+++ b/js/dojo/dojox/string/tokenize.js
@@ -1,35 +1,40 @@
-if(!dojo._hasResource["dojox.string.tokenize"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.string.tokenize"] = true;
-dojo.provide("dojox.string.tokenize");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
-dojox.string.tokenize = function(/*String*/ str, /*RegExp*/ re, /*Function?*/ parseDelim, /*Object?*/ instance){
- // summary:
- // Split a string by a regular expression with the ability to capture the delimeters
- // parseDelim:
- // Each group (excluding the 0 group) is passed as a parameter. If the function returns
- // a value, it's added to the list of tokens.
- // instance:
- // Used as the "this" instance when calling parseDelim
- var tokens = [];
- var match, content, lastIndex = 0;
- while(match = re.exec(str)){
- content = str.substring(lastIndex, re.lastIndex - match[0].length);
- if(content.length){
- tokens.push(content);
- }
- if(parseDelim){
- var parsed = parseDelim.apply(instance, match.slice(1));
- if(typeof parsed != "undefined"){
- tokens.push(parsed);
- }
- }
- lastIndex = re.lastIndex;
- }
- content = str.substr(lastIndex);
- if(content.length){
- tokens.push(content);
- }
- return tokens;
+if(!dojo._hasResource["dojox.string.tokenize"]){
+dojo._hasResource["dojox.string.tokenize"]=true;
+dojo.provide("dojox.string.tokenize");
+dojox.string.tokenize=function(_1,re,_2,_3){
+var _4=[];
+var _5,_6,_7=0;
+while(_5=re.exec(_1)){
+_6=_1.slice(_7,re.lastIndex-_5[0].length);
+if(_6.length){
+_4.push(_6);
+}
+if(_2){
+if(dojo.isOpera){
+var _8=_5.slice(0);
+while(_8.length<_5.length){
+_8.push(null);
}
-
+_5=_8;
+}
+var _9=_2.apply(_3,_5.slice(1).concat(_4.length));
+if(typeof _9!="undefined"){
+_4.push(_9);
+}
}
+_7=re.lastIndex;
+}
+_6=_1.slice(_7);
+if(_6.length){
+_4.push(_6);
+}
+return _4;
+};
+}
diff --git a/js/dojo/dojox/timing.js b/js/dojo/dojox/timing.js
--- a/js/dojo/dojox/timing.js
+++ b/js/dojo/dojox/timing.js
@@ -1,6 +1,12 @@
-if(!dojo._hasResource["dojox.timing"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.timing"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.timing"]){
+dojo._hasResource["dojox.timing"]=true;
dojo.provide("dojox.timing");
-dojo.require("dojox.timing._base");
-
+dojo.require("dojox.timing._base");
}
diff --git a/js/dojo/dojox/timing/README b/js/dojo/dojox/timing/README
--- a/js/dojo/dojox/timing/README
+++ b/js/dojo/dojox/timing/README
@@ -1,58 +1,63 @@
-------------------------------------------------------------------------------
DojoX Timing
-------------------------------------------------------------------------------
Version 0.1.0
Release date: 08/08/2007
-------------------------------------------------------------------------------
Project state:
-expermental
+experimental
-------------------------------------------------------------------------------
Credits
Tom Trenka (ttrenka AT gmail.com): original Timer, Streamer, Thread and ThreadPool
Wolfram Kriesing (http://wolfram.kriesing.de/blog/): Sequence
Jonathan Bond-Caron (jbondc AT gmail.com): port of Timer and Streamer
Pete Higgins (phiggins AT gmail.com): port of Sequence
+ Mike Wilcox (anm8tr AT yahoo.com): dojo.doLater
-------------------------------------------------------------------------------
Project description
DojoX Timing is a project that deals with any kind of advanced use of timing
constructs. The central object, dojox.timing.Timer (included by default), is
a simple object that fires a callback on each tick of the timer, as well as
when starting or stopping it. The interval of each tick is settable, but the
default is 1 second--useful for driving something such as a clock.
dojox.timing.Streamer is an object designed to facilitate streaming/buffer-type
scenarios; it takes an input and an output function, will execute the output
function onTick, and run the input function when the internal buffer gets
beneath a certain threshold of items. This can be useful for something timed--
such as updating a data plot at every N interval, and getting new data from
a source when there's less than X data points in the internal buffer (think
real-time data updating).
dojox.timing.Sequencer is an object, similar to Streamer, that will allow you
to set up a set of functions to be executed in a specific order, at specific
intervals.
The DojoX Timing ThreadPool is a port from the original implementation in the
f(m) library. It allows a user to feed a set of callback functions (wrapped
in a Thread constructor) to a pool for background processing.
+
+dojo.doLater() provides a simple mechanism that checks a conditional before allowing
+your function to continue. If the conditional is false, the function is blocked and continually
+re-called, with arguments, until the conditional passes.
-------------------------------------------------------------------------------
Dependencies:
DojoX Timing only relies on the Dojo Base.
-------------------------------------------------------------------------------
Documentation
TBD.
-------------------------------------------------------------------------------
Installation instructions
Grab the following from the Dojo SVN Repository:
http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/timing.js
http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/timing/*
Install into the following directory structure:
/dojox/timing.js
/dojox/timing/
...which should be at the same level as your Dojo checkout.
diff --git a/js/dojo/dojox/timing/Sequence.js b/js/dojo/dojox/timing/Sequence.js
--- a/js/dojo/dojox/timing/Sequence.js
+++ b/js/dojo/dojox/timing/Sequence.js
@@ -1,145 +1,87 @@
-if(!dojo._hasResource["dojox.timing.Sequence"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.timing.Sequence"] = true;
-dojo.provide("dojox.timing.Sequence");
-dojo.experimental("dojox.timing.Sequence"); // in case it gets moved/renamed somewhere soon
-
-dojo.declare("dojox.timing.Sequence",null,{
- // summary:
- // This class provides functionality to really sequentialize
- // function calls. You need to provide a list of functions and
- // some parameters for each (like: pauseBefore) and they will
- // be run one after another. This can be very useful for slideshows
- // or alike things.
- //
- // description:
- // This array will contain the sequence defines resolved, so that
- // ie. repeat:10 will result in 10 elements in the sequence, so
- // the repeat handling is easier and we don't need to handle that
- // many extra cases. Also the doneFunction, if given is added at the
- // end of the resolved-sequences.
-
- // _defsResolved: Array
- // The resolved sequence, for easier handling.
- _defsResolved: [],
-
- // This is the time to wait before goOn() calls _go(), which
- // mostly results from a pauseAfter for a function that returned
- // false and is later continued by the external goOn() call.
- // The time to wait needs to be waited in goOn() where the
- // sequence is continued.
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // _goOnPause: Integer
- // The pause to wait before really going on.
- _goOnPause: 0,
-
- _running: false,
-
- go: function(/* Array */defs, /* function|Array? */doneFunction){
- // summary:
- //
- // defs: Array
- // the sequence of actions
- // doneFunction: Function|Array?
- // The function to call when done
- this._running = true;
- var self = this;
- dojo.forEach(defs, function(cur){
- if(cur.repeat > 1){
- var repeat = cur.repeat;
- for(var j=0; j<repeat ;j++){
- cur.repeat = 1;
- self._defsResolved.push(cur);
- }
- }else{
- self._defsResolved.push(cur);
- }
- });
- var last = defs[defs.length-1];
- if (doneFunction) {
- self._defsResolved.push({func: doneFunction});
- }
- // stop the sequence, this actually just sets this._running to false
- self._defsResolved.push({func: [this.stop, this]});
- this._curId = 0;
- this._go();
- },
- _go: function(){
- // summary: Execute one task of this._defsResolved.
- //
- // if _running was set to false stop the sequence, this is the
- // case when i.e. stop() was called.
- if(!this._running){
- return;
- }
- var cur = this._defsResolved[this._curId];
- this._curId += 1;
- // create the function to call, the func property might be an array, which means
- // [function, context, parameter1, parameter2, ...]
- function resolveAndCallFunc(func) {
- var ret = null;
- if(dojo.isArray(func)){
- // Two elements might only be given when the function+context
- // is given, this is nice for using this, ie: [this.func, this]
- if(func.length>2){
- ret = func[0].apply(func[1], func.slice(2));
- }else{
- ret = func[0].apply(func[1]);
- }
- }else{
- ret = func();
- }
- return ret;
- }
-
- if(this._curId >= this._defsResolved.length){
- resolveAndCallFunc(cur.func); // call the last function, since it is the doneFunction we dont need to handle pause stuff
- // don't go on and call this._go() again, we are done
- return;
- }
- var self = this;
- if(cur.pauseAfter){
- if(resolveAndCallFunc(cur.func)!==false){
- window.setTimeout(function() {self._go()}, cur.pauseAfter);
- }else{
- this._goOnPause = cur.pauseAfter;
- }
- }else if(cur.pauseBefore){
- var x = function(){
- if(resolveAndCallFunc(cur.func)!==false){
- self._go()
- }
- };
- window.setTimeout(x, cur.pauseBefore);
- }else{
- if(resolveAndCallFunc(cur.func)!==false){
- this._go();
- }
- }
- },
-
- goOn: function(){
- // summary: This method just provides a hook from the outside, so that
- // an interrupted sequence can be continued.
- if(this._goOnPause){
- var self = this;
- setTimeout(function(){ self._go() }, this._goOnPause);
- this._goOnPause = 0; // reset it, so if the next one doesnt set it we dont use the old pause
- }else{ this._go(); }
- },
-
- stop: function(){
- // summary: Stop the currently running sequence.
- // description:
- // This can only interrupt the sequence not the last function that
- // had been started. If the last function was i.e. a slideshow
- // that is handled inside a function that you have given as
- // one sequence item it cant be stopped, since it is not controlled
- // by this object here. In this case it would be smarter to
- // run the slideshow using a sequence object so you can also stop
- // it using this method.
- this._running = false;
- }
-});
-
+if(!dojo._hasResource["dojox.timing.Sequence"]){
+dojo._hasResource["dojox.timing.Sequence"]=true;
+dojo.provide("dojox.timing.Sequence");
+dojo.experimental("dojox.timing.Sequence");
+dojo.declare("dojox.timing.Sequence",null,{_goOnPause:0,_running:false,constructor:function(){
+this._defsResolved=[];
+},go:function(_1,_2){
+this._running=true;
+dojo.forEach(_1,function(_3){
+if(_3.repeat>1){
+var _4=_3.repeat;
+for(var j=0;j<_4;j++){
+_3.repeat=1;
+this._defsResolved.push(_3);
+}
+}else{
+this._defsResolved.push(_3);
+}
+},this);
+var _5=_1[_1.length-1];
+if(_2){
+this._defsResolved.push({func:_2});
+}
+this._defsResolved.push({func:[this.stop,this]});
+this._curId=0;
+this._go();
+},_go:function(){
+if(!this._running){
+return;
+}
+var _6=this._defsResolved[this._curId];
+this._curId+=1;
+function _7(_8){
+var _9=null;
+if(dojo.isArray(_8)){
+if(_8.length>2){
+_9=_8[0].apply(_8[1],_8.slice(2));
+}else{
+_9=_8[0].apply(_8[1]);
}
+}else{
+_9=_8();
+}
+return _9;
+};
+if(this._curId>=this._defsResolved.length){
+_7(_6.func);
+return;
+}
+if(_6.pauseAfter){
+if(_7(_6.func)!==false){
+setTimeout(dojo.hitch(this,"_go"),_6.pauseAfter);
+}else{
+this._goOnPause=_6.pauseAfter;
+}
+}else{
+if(_6.pauseBefore){
+var x=dojo.hitch(this,function(){
+if(_7(_6.func)!==false){
+this._go();
+}
+});
+setTimeout(x,_6.pauseBefore);
+}else{
+if(_7(_6.func)!==false){
+this._go();
+}
+}
+}
+},goOn:function(){
+if(this._goOnPause){
+setTimeout(dojo.hitch(this,"_go"),this._goOnPause);
+this._goOnPause=0;
+}else{
+this._go();
+}
+},stop:function(){
+this._running=false;
+}});
+}
diff --git a/js/dojo/dojox/timing/Streamer.js b/js/dojo/dojox/timing/Streamer.js
--- a/js/dojo/dojox/timing/Streamer.js
+++ b/js/dojo/dojox/timing/Streamer.js
@@ -1,94 +1,64 @@
-if(!dojo._hasResource["dojox.timing.Streamer"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.timing.Streamer"] = true;
-dojo.provide("dojox.timing.Streamer");
-
-dojo.require("dojox.timing._base");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojox.timing.Streamer = function(
- /* function */input,
- /* function */output,
- /* int */interval,
- /* int */minimum,
- /* array */initialData
-){
- // summary
- // Streamer will take an input function that pushes N datapoints into a
- // queue, and will pass the next point in that queue out to an
- // output function at the passed interval; this way you can emulate
- // a constant buffered stream of data.
- // input: the function executed when the internal queue reaches minimumSize
- // output: the function executed on internal tick
- // interval: the interval in ms at which the output function is fired.
- // minimum: the minimum number of elements in the internal queue.
-
- var self = this;
- var queue = [];
-
- // public properties
- this.interval = interval || 1000;
- this.minimumSize = minimum || 10; // latency usually == interval * minimumSize
- this.inputFunction = input || function(q){ };
- this.outputFunction = output || function(point){ };
-
- // more setup
- var timer = new dojox.timing.Timer(this.interval);
- var tick = function(){
- self.onTick(self);
-
- if(queue.length < self.minimumSize){
- self.inputFunction(queue);
- }
- var obj = queue.shift();
- while(typeof(obj) == "undefined" && queue.length > 0){
- obj = queue.shift();
- }
-
- // check to see if the input function needs to be fired
- // stop before firing the output function
- // TODO: relegate this to the output function?
- if(typeof(obj) == "undefined"){
- self.stop();
- return;
- }
-
- // call the output function.
- self.outputFunction(obj);
- };
-
- this.setInterval = function(/* int */ms){
- // summary
- // sets the interval in milliseconds of the internal timer
- this.interval = ms;
- timer.setInterval(ms);
- };
-
- this.onTick = function(/* dojox.timing.Streamer */obj){ };
- // wrap the timer functions so that we can connect to them if needed.
- this.start = function(){
- // summary
- // starts the Streamer
- if(typeof(this.inputFunction) == "function" && typeof(this.outputFunction) == "function"){
- timer.start();
- return;
- }
- throw new Error("You cannot start a Streamer without an input and an output function.");
- };
- this.onStart = function(){ };
- this.stop = function(){
- // summary
- // stops the Streamer
- timer.stop();
- };
- this.onStop = function(){ };
-
- // finish initialization
- timer.onTick = this.tick;
- timer.onStart = this.onStart;
- timer.onStop = this.onStop;
- if(initialData){
- queue.concat(initialData);
- }
+if(!dojo._hasResource["dojox.timing.Streamer"]){
+dojo._hasResource["dojox.timing.Streamer"]=true;
+dojo.provide("dojox.timing.Streamer");
+dojo.require("dojox.timing._base");
+dojox.timing.Streamer=function(_1,_2,_3,_4,_5){
+var _6=this;
+var _7=[];
+this.interval=_3||1000;
+this.minimumSize=_4||10;
+this.inputFunction=_1||function(q){
+};
+this.outputFunction=_2||function(_8){
+};
+var _9=new dojox.timing.Timer(this.interval);
+var _a=function(){
+_6.onTick(_6);
+if(_7.length<_6.minimumSize){
+_6.inputFunction(_7);
+}
+var _b=_7.shift();
+while(typeof (_b)=="undefined"&&_7.length>0){
+_b=_7.shift();
+}
+if(typeof (_b)=="undefined"){
+_6.stop();
+return;
+}
+_6.outputFunction(_b);
};
-
+this.setInterval=function(ms){
+this.interval=ms;
+_9.setInterval(ms);
+};
+this.onTick=function(_c){
+};
+this.start=function(){
+if(typeof (this.inputFunction)=="function"&&typeof (this.outputFunction)=="function"){
+_9.start();
+return;
}
+throw new Error("You cannot start a Streamer without an input and an output function.");
+};
+this.onStart=function(){
+};
+this.stop=function(){
+_9.stop();
+};
+this.onStop=function(){
+};
+_9.onTick=this.tick;
+_9.onStart=this.onStart;
+_9.onStop=this.onStop;
+if(_5){
+_7.concat(_5);
+}
+};
+}
diff --git a/js/dojo/dojox/timing/ThreadPool.js b/js/dojo/dojox/timing/ThreadPool.js
--- a/js/dojo/dojox/timing/ThreadPool.js
+++ b/js/dojo/dojox/timing/ThreadPool.js
@@ -1,157 +1,142 @@
-if(!dojo._hasResource["dojox.timing.ThreadPool"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.timing.ThreadPool"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.timing.ThreadPool"]){
+dojo._hasResource["dojox.timing.ThreadPool"]=true;
dojo.provide("dojox.timing.ThreadPool");
dojo.require("dojox.timing");
-
dojo.experimental("dojox.timing.ThreadPool");
-
-// dojox.timing.Timer is included as part of _base
-/********************************************************************
- This is a port of the original System.Threading.ThreadPool from
- the f(m) class library.
-
- Donated to the Dojo toolkit by the author :)
-*********************************************************************/
(function(){
- var t=dojox.timing;
- t.threadStates={
- UNSTARTED:"unstarted",
- STOPPED:"stopped",
- PENDING:"pending",
- RUNNING:"running",
- SUSPENDED:"suspended",
- WAITING:"waiting",
- COMPLETE:"complete",
- ERROR:"error"
- };
-
- // Before rar says a word, we actually *use* these numbers for a purpose :)
- t.threadPriorities={
- LOWEST:1,
- BELOWNORMAL:2,
- NORMAL:3,
- ABOVENORMAL:4,
- HIGHEST:5
- };
-
- t.Thread=function(/* Function */fn, /* dojox.timing.threadPriorities? */priority){
- var self=this;
- this.state=t.threadStates.UNSTARTED;
- this.priority=priority||t.threadPriorities.NORMAL;
- this.lastError=null;
- this.func=fn; // for lookup purposes.
- this.invoke=function(){
- self.state=t.threadStates.RUNNING;
- try{
- fn(this);
- self.state=t.threadStates.COMPLETE;
- }catch(e){
- self.lastError=e;
- self.state=t.threadStates.ERROR;
- }
- };
- };
-
- // TODO: allow for changing of maxThreads and tick interval
- t.ThreadPool=new (function(/* Number */mxthrs, /* Number */intvl){
- var self=this;
- var maxThreads=mxthrs;
- var availableThreads=maxThreads;
- var interval=intvl;
- var fireInterval=Math.floor((interval/2)/maxThreads);
- var queue=[];
- var timers=new Array(maxThreads+1);
- var timer=new dojox.timing.Timer();
- var invoke=function(){
- var tracker=timers[0]={};
- for(var i=0; i<timers.length; i++){
- window.clearTimeout(timers[i]);
- var thread=queue.shift();
- if(typeof(thread)=="undefined"){ break; }
- tracker["thread-"+i]=thread;
- timers[i]=window.setTimeout(thread.invoke,(fireInterval*i));
- }
- availableThreads=maxThreads-(i-1);
- };
-
- // public methods
- this.getMaxThreads=function(){ return maxThreads; };
- this.getAvailableThreads=function(){ return availableThreads; };
- this.getTickInterval=function(){ return interval; };
- this.queueUserWorkItem=function(/* Function || dojox.timing.Thread */fn){
- var item=fn;
- if(item instanceof Function){
- item=new t.Thread(item);
- }
- var idx=queue.length;
- for(var i=0; i<queue.length; i++){
- if(queue[i].priority<item.priority){
- idx=i;
- break;
- }
- }
- if(idx<queue.length){
- queue.splice(idx, 0, item);
- } else {
- queue.push(item);
- }
- return true;
- };
- this.removeQueuedUserWorkItem=function(/* Function || dojox.timing.Thread */item){
- if(item instanceof Function){
- var idx=-1;
- for(var i=0; i<queue.length; i++){
- if(queue[i].func==item){
- idx=i;
- break;
- }
- }
- if(idx>-1){
- queue.splice(idx,1);
- return true;
- }
- return false;
- }
-
- var idx=-1;
- for(var i=0; i<queue.length; i++){
- if(queue[i]==item){
- idx=i;
- break;
- }
- }
- if(idx>-1){
- queue.splice(idx,1);
- return true;
- }
- return false;
- };
- this.start=function(){ timer.start(); };
- this.stop=function(){ timer.stop(); };
- this.abort=function(){
- this.stop();
- for(var i=1; i<timers.length; i++){
- if(timers[i]){
- window.clearTimeout(timers[i]);
- }
- }
- for(var thread in timers[0]){
- this.queueUserWorkItem(thread);
- }
- timers[0]={};
- };
- this.reset=function(){
- this.abort();
- queue=[];
- };
- this.sleep=function(/* Number */nSleep){
- timer.stop();
- window.setTimeout(timer.start, nSleep);
- };
-
- // dedicate the timer to us.
- timer.onTick=self.invoke;
- })(16, 5000);
+var t=dojox.timing;
+t.threadStates={UNSTARTED:"unstarted",STOPPED:"stopped",PENDING:"pending",RUNNING:"running",SUSPENDED:"suspended",WAITING:"waiting",COMPLETE:"complete",ERROR:"error"};
+t.threadPriorities={LOWEST:1,BELOWNORMAL:2,NORMAL:3,ABOVENORMAL:4,HIGHEST:5};
+t.Thread=function(fn,_1){
+var _2=this;
+this.state=t.threadStates.UNSTARTED;
+this.priority=_1||t.threadPriorities.NORMAL;
+this.lastError=null;
+this.func=fn;
+this.invoke=function(){
+_2.state=t.threadStates.RUNNING;
+try{
+fn(this);
+_2.state=t.threadStates.COMPLETE;
+}
+catch(e){
+_2.lastError=e;
+_2.state=t.threadStates.ERROR;
+}
+};
+};
+t.ThreadPool=new (function(_3,_4){
+var _5=this;
+var _6=_3;
+var _7=_6;
+var _8=_4;
+var _9=Math.floor((_8/2)/_6);
+var _a=[];
+var _b=new Array(_6+1);
+var _c=new dojox.timing.Timer();
+var _d=function(){
+var _e=_b[0]={};
+for(var i=0;i<_b.length;i++){
+window.clearTimeout(_b[i]);
+var _f=_a.shift();
+if(typeof (_f)=="undefined"){
+break;
+}
+_e["thread-"+i]=_f;
+_b[i]=window.setTimeout(_f.invoke,(_9*i));
+}
+_7=_6-(i-1);
+};
+this.getMaxThreads=function(){
+return _6;
+};
+this.getAvailableThreads=function(){
+return _7;
+};
+this.getTickInterval=function(){
+return _8;
+};
+this.queueUserWorkItem=function(fn){
+var _10=fn;
+if(_10 instanceof Function){
+_10=new t.Thread(_10);
+}
+var idx=_a.length;
+for(var i=0;i<_a.length;i++){
+if(_a[i].priority<_10.priority){
+idx=i;
+break;
+}
+}
+if(idx<_a.length){
+_a.splice(idx,0,_10);
+}else{
+_a.push(_10);
+}
+return true;
+};
+this.removeQueuedUserWorkItem=function(_11){
+if(_11 instanceof Function){
+var idx=-1;
+for(var i=0;i<_a.length;i++){
+if(_a[i].func==_11){
+idx=i;
+break;
+}
+}
+if(idx>-1){
+_a.splice(idx,1);
+return true;
+}
+return false;
+}
+var idx=-1;
+for(var i=0;i<_a.length;i++){
+if(_a[i]==_11){
+idx=i;
+break;
+}
+}
+if(idx>-1){
+_a.splice(idx,1);
+return true;
+}
+return false;
+};
+this.start=function(){
+_c.start();
+};
+this.stop=function(){
+_c.stop();
+};
+this.abort=function(){
+this.stop();
+for(var i=1;i<_b.length;i++){
+if(_b[i]){
+window.clearTimeout(_b[i]);
+}
+}
+for(var _12 in _b[0]){
+this.queueUserWorkItem(_12);
+}
+_b[0]={};
+};
+this.reset=function(){
+this.abort();
+_a=[];
+};
+this.sleep=function(_13){
+_c.stop();
+window.setTimeout(_c.start,_13);
+};
+_c.onTick=_5.invoke;
+})(16,5000);
})();
-
}
diff --git a/js/dojo/dojox/timing/_base.js b/js/dojo/dojox/timing/_base.js
--- a/js/dojo/dojox/timing/_base.js
+++ b/js/dojo/dojox/timing/_base.js
@@ -1,58 +1,41 @@
-if(!dojo._hasResource["dojox.timing._base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.timing._base"] = true;
-dojo.provide("dojox.timing._base");
-dojo.experimental("dojox.timing");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojox.timing.Timer = function(/*int*/ interval){
- // summary: Timer object executes an "onTick()" method repeatedly at a specified interval.
- // repeatedly at a given interval.
- // interval: Interval between function calls, in milliseconds.
- this.timer = null;
- this.isRunning = false;
- this.interval = interval;
-
- this.onStart = null;
- this.onStop = null;
-};
-dojo.extend(dojox.timing.Timer, {
- onTick : function(){
- // summary: Method called every time the interval passes. Override to do something useful.
- },
-
- setInterval : function(interval){
- // summary: Reset the interval of a timer, whether running or not.
- // interval: New interval, in milliseconds.
- if (this.isRunning){
- window.clearInterval(this.timer);
- }
- this.interval = interval;
- if (this.isRunning){
- this.timer = window.setInterval(dojo.hitch(this, "onTick"), this.interval);
- }
- },
-
- start : function(){
- // summary: Start the timer ticking.
- // description: Calls the "onStart()" handler, if defined.
- // Note that the onTick() function is not called right away,
- // only after first interval passes.
- if (typeof this.onStart == "function"){
- this.onStart();
- }
- this.isRunning = true;
- this.timer = window.setInterval(dojo.hitch(this, "onTick"), this.interval);
- },
-
- stop : function(){
- // summary: Stop the timer.
- // description: Calls the "onStop()" handler, if defined.
- if (typeof this.onStop == "function"){
- this.onStop();
- }
- this.isRunning = false;
- window.clearInterval(this.timer);
- }
-});
-
+if(!dojo._hasResource["dojox.timing._base"]){
+dojo._hasResource["dojox.timing._base"]=true;
+dojo.provide("dojox.timing._base");
+dojo.experimental("dojox.timing");
+dojox.timing.Timer=function(_1){
+this.timer=null;
+this.isRunning=false;
+this.interval=_1;
+this.onStart=null;
+this.onStop=null;
+};
+dojo.extend(dojox.timing.Timer,{onTick:function(){
+},setInterval:function(_2){
+if(this.isRunning){
+window.clearInterval(this.timer);
}
+this.interval=_2;
+if(this.isRunning){
+this.timer=window.setInterval(dojo.hitch(this,"onTick"),this.interval);
+}
+},start:function(){
+if(typeof this.onStart=="function"){
+this.onStart();
+}
+this.isRunning=true;
+this.timer=window.setInterval(dojo.hitch(this,"onTick"),this.interval);
+},stop:function(){
+if(typeof this.onStop=="function"){
+this.onStop();
+}
+this.isRunning=false;
+window.clearInterval(this.timer);
+}});
+}
diff --git a/js/dojo/dojox/uuid.js b/js/dojo/dojox/uuid.js
--- a/js/dojo/dojox/uuid.js
+++ b/js/dojo/dojox/uuid.js
@@ -1,6 +1,12 @@
-if(!dojo._hasResource["dojox.uuid"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.uuid"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.uuid"]){
+dojo._hasResource["dojox.uuid"]=true;
dojo.provide("dojox.uuid");
dojo.require("dojox.uuid._base");
-
}
diff --git a/js/dojo/dojox/uuid/README b/js/dojo/dojox/uuid/README
--- a/js/dojo/dojox/uuid/README
+++ b/js/dojo/dojox/uuid/README
@@ -1,43 +1,43 @@
-------------------------------------------------------------------------------
DojoX UUID
-------------------------------------------------------------------------------
Version 0.9
Release date: 06/21/2007
-------------------------------------------------------------------------------
-Project state: stable
+Project state: production
-------------------------------------------------------------------------------
Project authors
Brian Douglas Skinner (skinner@dojotoolkit.org)
-------------------------------------------------------------------------------
Project description
DojoX UUID is the port of the original Dojo 0.4.x UUID classes. The UUID
classes can be used to represent Universally Unique IDentifiers (UUIDs), as
described in the IETF's RFC 4122:
http://tools.ietf.org/html/rfc4122
The DojoX UUID classes provide support for generating both "time-based" UUIDs
and lightweight "random" UUIDs. DojoX UUID does not yet have support for
generating new "name-based" UUIDs, but the dojo.uuid.Uuid class can represent
existing name-based UUIDs, such as UUIDs read from a file or from a server.
-------------------------------------------------------------------------------
Dependencies:
DojoX UUID has no dependencies, outside of Dojo Core.
-------------------------------------------------------------------------------
Documentation
See the API documentation for Dojo (http://dojotoolkit.org/api).
-------------------------------------------------------------------------------
Installation instructions
Grab the following from the Dojo SVN Repository:
http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/uuid.js
http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/uuid/*
Install into the following directory structure:
/dojox/uuid/
...which should be at the same level as your Dojo checkout.
-------------------------------------------------------------------------------
diff --git a/js/dojo/dojox/uuid/Uuid.js b/js/dojo/dojox/uuid/Uuid.js
--- a/js/dojo/dojox/uuid/Uuid.js
+++ b/js/dojo/dojox/uuid/Uuid.js
@@ -1,200 +1,99 @@
-if(!dojo._hasResource["dojox.uuid.Uuid"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.uuid.Uuid"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.uuid.Uuid"]){
+dojo._hasResource["dojox.uuid.Uuid"]=true;
dojo.provide("dojox.uuid.Uuid");
dojo.require("dojox.uuid");
-
-dojox.uuid.Uuid = function(/*String?*/ input){
- // summary:
- // This is the constructor for the Uuid class. The Uuid class offers
- // methods for inspecting existing UUIDs.
- // input: A 36-character string that conforms to the UUID spec.
- // examples:
- // var uuid;
- // uuid = new dojox.uuid.Uuid("3b12f1df-5232-4804-897e-917bf397618a");
- // uuid = new dojox.uuid.Uuid(); // "00000000-0000-0000-0000-000000000000"
- // uuid = new dojox.uuid.Uuid(dojox.uuid.generateRandomUuid());
- // uuid = new dojox.uuid.Uuid(dojox.uuid.generateTimeBasedUuid());
- // dojox.uuid.Uuid.setGenerator(dojox.uuid.generateRandomUuid);
- // uuid = new dojox.uuid.Uuid();
- // dojox.uuid.assert(!uuid.isEqual(dojox.uuid.NIL_UUID));
- this._uuidString = dojox.uuid.NIL_UUID;
- if(input){
- dojox.uuid.assert(dojo.isString(input));
- this._uuidString = input.toLowerCase();
- dojox.uuid.assert(this.isValid());
- }else{
- var ourGenerator = dojox.uuid.Uuid.getGenerator();
- if(ourGenerator){
- this._uuidString = ourGenerator();
- dojox.uuid.assert(this.isValid());
- }
- }
+dojox.uuid.Uuid=function(_1){
+this._uuidString=dojox.uuid.NIL_UUID;
+if(_1){
+dojox.uuid.assert(dojo.isString(_1));
+this._uuidString=_1.toLowerCase();
+dojox.uuid.assert(this.isValid());
+}else{
+var _2=dojox.uuid.Uuid.getGenerator();
+if(_2){
+this._uuidString=_2();
+dojox.uuid.assert(this.isValid());
+}
+}
};
-
-dojox.uuid.Uuid.compare = function(/*dojox.uuid.Uuid*/ uuidOne, /*dojox.uuid.Uuid*/ uuidTwo){
- // summary:
- // Given two UUIDs to compare, this method returns 0, 1, or -1.
- // description:
- // This method is designed to be used by sorting routines, like the
- // JavaScript built-in Array sort() method. This implementation is
- // intended to match the sample implementation in IETF RFC 4122:
- // http://www.ietf.org/rfc/rfc4122.txt
- // uuidOne: Any object that has toString() method that returns a 36-character string that conforms to the UUID spec.
- // uuidTwo: Any object that has toString() method that returns a 36-character string that conforms to the UUID spec.
-
- // examples:
- // var uuid;
- // var generator = dojox.uuid.TimeBasedGenerator;
- // var a = new dojox.uuid.Uuid(generator);
- // var b = new dojox.uuid.Uuid(generator);
- // var c = new dojox.uuid.Uuid(generator);
- // var array = new Array(a, b, c);
- // array.sort(dojox.uuid.Uuid.compare);
- var uuidStringOne = uuidOne.toString();
- var uuidStringTwo = uuidTwo.toString();
- if (uuidStringOne > uuidStringTwo) return 1; // integer
- if (uuidStringOne < uuidStringTwo) return -1; // integer
- return 0; // integer (either 0, 1, or -1)
+dojox.uuid.Uuid.compare=function(_3,_4){
+var _5=_3.toString();
+var _6=_4.toString();
+if(_5>_6){
+return 1;
+}
+if(_5<_6){
+return -1;
+}
+return 0;
+};
+dojox.uuid.Uuid.setGenerator=function(_7){
+dojox.uuid.assert(!_7||dojo.isFunction(_7));
+dojox.uuid.Uuid._ourGenerator=_7;
};
-
-dojox.uuid.Uuid.setGenerator = function(/*Function?*/ generator){
- // summary:
- // Sets the default generator, which will be used by the
- // "new dojox.uuid.Uuid()" constructor if no parameters
- // are passed in.
- // generator: A UUID generator function, such as dojox.uuid.generateTimeBasedUuid.
- dojox.uuid.assert(!generator || dojo.isFunction(generator));
- dojox.uuid.Uuid._ourGenerator = generator;
+dojox.uuid.Uuid.getGenerator=function(){
+return dojox.uuid.Uuid._ourGenerator;
};
-
-dojox.uuid.Uuid.getGenerator = function(){
- // summary:
- // Returns the default generator. See setGenerator().
- return dojox.uuid.Uuid._ourGenerator; // generator (A UUID generator, such as dojox.uuid.TimeBasedGenerator).
+dojox.uuid.Uuid.prototype.toString=function(){
+return this._uuidString;
};
-
-dojox.uuid.Uuid.prototype.toString = function(){
- // summary:
- // This method returns a standard 36-character string representing
- // the UUID, such as "3b12f1df-5232-4804-897e-917bf397618a".
- return this._uuidString; // string
+dojox.uuid.Uuid.prototype.compare=function(_8){
+return dojox.uuid.Uuid.compare(this,_8);
};
-
-dojox.uuid.Uuid.prototype.compare = function(/*dojox.uuid.Uuid*/ otherUuid){
- // summary:
- // Compares this UUID to another UUID, and returns 0, 1, or -1.
- // description:
- // This implementation is intended to match the sample implementation
- // in IETF RFC 4122: http://www.ietf.org/rfc/rfc4122.txt
- // otherUuid: Any object that has toString() method that returns a 36-character string that conforms to the UUID spec.
- return dojox.uuid.Uuid.compare(this, otherUuid); // integer (either 0, 1, or -1)
+dojox.uuid.Uuid.prototype.isEqual=function(_9){
+return (this.compare(_9)==0);
};
-
-dojox.uuid.Uuid.prototype.isEqual = function(/*dojox.uuid.Uuid*/ otherUuid){
- // summary:
- // Returns true if this UUID is equal to the otherUuid, or false otherwise.
- // otherUuid: Any object that has toString() method that returns a 36-character string that conforms to the UUID spec.
- return (this.compare(otherUuid) == 0); // boolean
+dojox.uuid.Uuid.prototype.isValid=function(){
+return dojox.uuid.isValid(this);
};
-
-dojox.uuid.Uuid.prototype.isValid = function(){
- // summary:
- // Returns true if the UUID was initialized with a valid value.
- return dojox.uuid.isValid(this);
+dojox.uuid.Uuid.prototype.getVariant=function(){
+return dojox.uuid.getVariant(this);
};
-
-dojox.uuid.Uuid.prototype.getVariant = function(){
- // summary:
- // Returns a variant code that indicates what type of UUID this is.
- // Returns one of the enumerated dojox.uuid.variant values.
-
- // example:
- // var uuid = new dojox.uuid.Uuid("3b12f1df-5232-4804-897e-917bf397618a");
- // var variant = uuid.getVariant();
- // dojox.uuid.assert(variant == dojox.uuid.variant.DCE);
- // example:
- // "3b12f1df-5232-4804-897e-917bf397618a"
- // ^
- // |
- // (variant "10__" == DCE)
- return dojox.uuid.getVariant(this);
+dojox.uuid.Uuid.prototype.getVersion=function(){
+if(!this._versionNumber){
+this._versionNumber=dojox.uuid.getVersion(this);
+}
+return this._versionNumber;
};
-
-dojox.uuid.Uuid.prototype.getVersion = function(){
- // summary:
- // Returns a version number that indicates what type of UUID this is.
- // Returns one of the enumerated dojox.uuid.version values.
- // example:
- // var uuid = new dojox.uuid.Uuid("b4308fb0-86cd-11da-a72b-0800200c9a66");
- // var version = uuid.getVersion();
- // dojox.uuid.assert(version == dojox.uuid.version.TIME_BASED);
- // exceptions:
- // Throws an Error if this is not a DCE Variant UUID.
- if(!this._versionNumber){
- this._versionNumber = dojox.uuid.getVersion(this);
- }
- return this._versionNumber; // dojox.uuid.version
+dojox.uuid.Uuid.prototype.getNode=function(){
+if(!this._nodeString){
+this._nodeString=dojox.uuid.getNode(this);
+}
+return this._nodeString;
};
-
-dojox.uuid.Uuid.prototype.getNode = function(){
- // summary:
- // If this is a version 1 UUID (a time-based UUID), getNode() returns a
- // 12-character string with the "node" or "pseudonode" portion of the UUID,
- // which is the rightmost 12 characters.
- // exceptions:
- // Throws an Error if this is not a version 1 UUID.
- if (!this._nodeString) {
- this._nodeString = dojox.uuid.getNode(this);
- }
- return this._nodeString; // String (a 12-character string, which will look something like "917bf397618a")
+dojox.uuid.Uuid.prototype.getTimestamp=function(_a){
+if(!_a){
+_a=null;
+}
+switch(_a){
+case "string":
+case String:
+return this.getTimestamp(Date).toUTCString();
+break;
+case "hex":
+if(!this._timestampAsHexString){
+this._timestampAsHexString=dojox.uuid.getTimestamp(this,"hex");
+}
+return this._timestampAsHexString;
+break;
+case null:
+case "date":
+case Date:
+if(!this._timestampAsDate){
+this._timestampAsDate=dojox.uuid.getTimestamp(this,Date);
+}
+return this._timestampAsDate;
+break;
+default:
+dojox.uuid.assert(false,"The getTimestamp() method dojox.uuid.Uuid was passed a bogus returnType: "+_a);
+break;
+}
};
-
-dojox.uuid.Uuid.prototype.getTimestamp = function(/*String?*/ returnType){
- // summary:
- // If this is a version 1 UUID (a time-based UUID), this method returns
- // the timestamp value encoded in the UUID. The caller can ask for the
- // timestamp to be returned either as a JavaScript Date object or as a
- // 15-character string of hex digits.
- // returnType: Any of these five values: "string", String, "hex", "date", Date
- // returns:
- // Returns the timestamp value as a JavaScript Date object or a 15-character string of hex digits.
- // examples:
- // var uuid = new dojox.uuid.Uuid("b4308fb0-86cd-11da-a72b-0800200c9a66");
- // var date, string, hexString;
- // date = uuid.getTimestamp(); // returns a JavaScript Date
- // date = uuid.getTimestamp(Date); //
- // string = uuid.getTimestamp(String); // "Mon, 16 Jan 2006 20:21:41 GMT"
- // hexString = uuid.getTimestamp("hex"); // "1da86cdb4308fb0"
- // exceptions:
- // Throws an Error if this is not a version 1 UUID.
- if(!returnType){returnType = null};
- switch(returnType){
- case "string":
- case String:
- return this.getTimestamp(Date).toUTCString(); // String (e.g. "Mon, 16 Jan 2006 20:21:41 GMT")
- break;
- case "hex":
- // Return a 15-character string of hex digits containing the
- // timestamp for this UUID, with the high-order bits first.
- if (!this._timestampAsHexString) {
- this._timestampAsHexString = dojox.uuid.getTimestamp(this, "hex");
- }
- return this._timestampAsHexString; // String (e.g. "1da86cdb4308fb0")
- break;
- case null: // no returnType was specified, so default to Date
- case "date":
- case Date:
- // Return a JavaScript Date object.
- if (!this._timestampAsDate) {
- this._timestampAsDate = dojox.uuid.getTimestamp(this, Date);
- }
- return this._timestampAsDate; // Date
- break;
- default:
- // we got passed something other than a valid returnType
- dojox.uuid.assert(false, "The getTimestamp() method dojox.uuid.Uuid was passed a bogus returnType: " + returnType);
- break;
- }
-};
-
}
diff --git a/js/dojo/dojox/uuid/_base.js b/js/dojo/dojox/uuid/_base.js
--- a/js/dojo/dojox/uuid/_base.js
+++ b/js/dojo/dojox/uuid/_base.js
@@ -1,245 +1,136 @@
-if(!dojo._hasResource["dojox.uuid._base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.uuid._base"] = true;
-dojo.provide("dojox.uuid._base");
-
-// Public constants:
-dojox.uuid.NIL_UUID = "00000000-0000-0000-0000-000000000000";
-dojox.uuid.version = {
- // Enumeration for the different UUID versions.
- UNKNOWN: 0,
- TIME_BASED: 1,
- DCE_SECURITY: 2,
- NAME_BASED_MD5: 3,
- RANDOM: 4,
- NAME_BASED_SHA1: 5 };
-dojox.uuid.variant = {
- // Enumeration for the different UUID variants.
- NCS: "0",
- DCE: "10",
- MICROSOFT: "110",
- UNKNOWN: "111" };
-
-dojox.uuid.assert = function(/*Boolean*/ booleanValue, /*String?*/ message){
- // summary:
- // Throws an exception if the assertion fails.
- // description:
- // If the asserted condition is true, this method does nothing. If the
- // condition is false, we throw an error with a error message.
- // booleanValue: Must be true for the assertion to succeed.
- // message: A string describing the assertion.
- // throws: Throws an Error if 'booleanValue' is false.
- if(!booleanValue){
- if(!message){
- message = "An assert statement failed.\n" +
- "The method dojox.uuid.assert() was called with a 'false' value.\n";
- }
- throw new Error(message);
- }
-};
-
-dojox.uuid.generateNilUuid = function(){
- // summary:
- // This function returns the Nil UUID: "00000000-0000-0000-0000-000000000000".
- // description:
- // The Nil UUID is described in section 4.1.7 of
- // RFC 4122: http://tools.ietf.org/html/rfc4122#section-4.1.7
- // examples:
- // var string = dojox.uuid.generateNilUuid();
- return dojox.uuid.NIL_UUID;; // String
-};
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojox.uuid.isValid = function(/*String*/ uuidString){
- // summary:
- // Returns true if the UUID was initialized with a valid value.
- uuidString = uuidString.toString();
- var valid = (dojo.isString(uuidString) &&
- (uuidString.length == 36) &&
- (uuidString == uuidString.toLowerCase()));
- if(valid){
- var arrayOfParts = uuidString.split("-");
- valid = ((arrayOfParts.length == 5) &&
- (arrayOfParts[0].length == 8) &&
- (arrayOfParts[1].length == 4) &&
- (arrayOfParts[2].length == 4) &&
- (arrayOfParts[3].length == 4) &&
- (arrayOfParts[4].length == 12));
- var HEX_RADIX = 16;
- for (var i in arrayOfParts) {
- var part = arrayOfParts[i];
- var integer = parseInt(part, HEX_RADIX);
- valid = valid && isFinite(integer);
- }
- }
- return valid; // boolean
-};
-
-dojox.uuid.getVariant = function(/*String*/ uuidString){
- // summary:
- // Returns a variant code that indicates what type of UUID this is.
- // Returns one of the enumerated dojox.uuid.variant values.
- // example:
- // var variant = dojox.uuid.getVariant("3b12f1df-5232-4804-897e-917bf397618a");
- // dojox.uuid.assert(variant == dojox.uuid.variant.DCE);
- // example:
- // "3b12f1df-5232-4804-897e-917bf397618a"
- // ^
- // |
- // (variant "10__" == DCE)
- if(!dojox.uuid._ourVariantLookupTable){
- var variant = dojox.uuid.variant;
- var lookupTable = [];
-
- lookupTable[0x0] = variant.NCS; // 0000
- lookupTable[0x1] = variant.NCS; // 0001
- lookupTable[0x2] = variant.NCS; // 0010
- lookupTable[0x3] = variant.NCS; // 0011
-
- lookupTable[0x4] = variant.NCS; // 0100
- lookupTable[0x5] = variant.NCS; // 0101
- lookupTable[0x6] = variant.NCS; // 0110
- lookupTable[0x7] = variant.NCS; // 0111
-
- lookupTable[0x8] = variant.DCE; // 1000
- lookupTable[0x9] = variant.DCE; // 1001
- lookupTable[0xA] = variant.DCE; // 1010
- lookupTable[0xB] = variant.DCE; // 1011
-
- lookupTable[0xC] = variant.MICROSOFT; // 1100
- lookupTable[0xD] = variant.MICROSOFT; // 1101
- lookupTable[0xE] = variant.UNKNOWN; // 1110
- lookupTable[0xF] = variant.UNKNOWN; // 1111
-
- dojox.uuid._ourVariantLookupTable = lookupTable;
- }
-
- uuidString = uuidString.toString();
- var variantCharacter = uuidString.charAt(19);
- var HEX_RADIX = 16;
- var variantNumber = parseInt(variantCharacter, HEX_RADIX);
- dojox.uuid.assert((variantNumber >= 0) && (variantNumber <= 16));
- return dojox.uuid._ourVariantLookupTable[variantNumber]; // dojox.uuid.variant
-};
-dojox.uuid.getVersion = function(/*String*/ uuidString){
- // summary:
- // Returns a version number that indicates what type of UUID this is.
- // Returns one of the enumerated dojox.uuid.version values.
- // example:
- // var version = dojox.uuid.getVersion("b4308fb0-86cd-11da-a72b-0800200c9a66");
- // dojox.uuid.assert(version == dojox.uuid.version.TIME_BASED);
- // exceptions:
- // Throws an Error if this is not a DCE Variant UUID.
- var errorMessage = "dojox.uuid.getVersion() was not passed a DCE Variant UUID.";
- dojox.uuid.assert(dojox.uuid.getVariant(uuidString) == dojox.uuid.variant.DCE, errorMessage);
- uuidString = uuidString.toString();
-
- // "b4308fb0-86cd-11da-a72b-0800200c9a66"
- // ^
- // |
- // (version 1 == TIME_BASED)
- var versionCharacter = uuidString.charAt(14);
- var HEX_RADIX = 16;
- var versionNumber = parseInt(versionCharacter, HEX_RADIX);
- return versionNumber; // dojox.uuid.version
+if(!dojo._hasResource["dojox.uuid._base"]){
+dojo._hasResource["dojox.uuid._base"]=true;
+dojo.provide("dojox.uuid._base");
+dojox.uuid.NIL_UUID="00000000-0000-0000-0000-000000000000";
+dojox.uuid.version={UNKNOWN:0,TIME_BASED:1,DCE_SECURITY:2,NAME_BASED_MD5:3,RANDOM:4,NAME_BASED_SHA1:5};
+dojox.uuid.variant={NCS:"0",DCE:"10",MICROSOFT:"110",UNKNOWN:"111"};
+dojox.uuid.assert=function(_1,_2){
+if(!_1){
+if(!_2){
+_2="An assert statement failed.\n"+"The method dojox.uuid.assert() was called with a 'false' value.\n";
+}
+throw new Error(_2);
+}
+};
+dojox.uuid.generateNilUuid=function(){
+return dojox.uuid.NIL_UUID;
};
-
-dojox.uuid.getNode = function(/*String*/ uuidString){
- // summary:
- // If this is a version 1 UUID (a time-based UUID), getNode() returns a
- // 12-character string with the "node" or "pseudonode" portion of the UUID,
- // which is the rightmost 12 characters.
- // exceptions:
- // Throws an Error if this is not a version 1 UUID.
- var errorMessage = "dojox.uuid.getNode() was not passed a TIME_BASED UUID.";
- dojox.uuid.assert(dojox.uuid.getVersion(uuidString) == dojox.uuid.version.TIME_BASED, errorMessage);
-
- uuidString = uuidString.toString();
- var arrayOfStrings = uuidString.split('-');
- var nodeString = arrayOfStrings[4];
- return nodeString; // String (a 12-character string, which will look something like "917bf397618a")
+dojox.uuid.isValid=function(_3){
+_3=_3.toString();
+var _4=(dojo.isString(_3)&&(_3.length==36)&&(_3==_3.toLowerCase()));
+if(_4){
+var _5=_3.split("-");
+_4=((_5.length==5)&&(_5[0].length==8)&&(_5[1].length==4)&&(_5[2].length==4)&&(_5[3].length==4)&&(_5[4].length==12));
+var _6=16;
+for(var i in _5){
+var _7=_5[i];
+var _8=parseInt(_7,_6);
+_4=_4&&isFinite(_8);
+}
+}
+return _4;
+};
+dojox.uuid.getVariant=function(_9){
+if(!dojox.uuid._ourVariantLookupTable){
+var _a=dojox.uuid.variant;
+var _b=[];
+_b[0]=_a.NCS;
+_b[1]=_a.NCS;
+_b[2]=_a.NCS;
+_b[3]=_a.NCS;
+_b[4]=_a.NCS;
+_b[5]=_a.NCS;
+_b[6]=_a.NCS;
+_b[7]=_a.NCS;
+_b[8]=_a.DCE;
+_b[9]=_a.DCE;
+_b[10]=_a.DCE;
+_b[11]=_a.DCE;
+_b[12]=_a.MICROSOFT;
+_b[13]=_a.MICROSOFT;
+_b[14]=_a.UNKNOWN;
+_b[15]=_a.UNKNOWN;
+dojox.uuid._ourVariantLookupTable=_b;
+}
+_9=_9.toString();
+var _c=_9.charAt(19);
+var _d=16;
+var _e=parseInt(_c,_d);
+dojox.uuid.assert((_e>=0)&&(_e<=16));
+return dojox.uuid._ourVariantLookupTable[_e];
};
-
-dojox.uuid.getTimestamp = function(/*String*/ uuidString, /*String?*/ returnType){
- // summary:
- // If this is a version 1 UUID (a time-based UUID), this method returns
- // the timestamp value encoded in the UUID. The caller can ask for the
- // timestamp to be returned either as a JavaScript Date object or as a
- // 15-character string of hex digits.
- // returnType: Any of these five values: "string", String, "hex", "date", Date
- // returns:
- // Returns the timestamp value as a JavaScript Date object or a 15-character string of hex digits.
- // examples:
- // var uuidString = "b4308fb0-86cd-11da-a72b-0800200c9a66";
- // var date, string, hexString;
- // date = dojox.uuid.getTimestamp(uuidString); // returns a JavaScript Date
- // date = dojox.uuid.getTimestamp(uuidString, Date); //
- // string = dojox.uuid.getTimestamp(uuidString, String); // "Mon, 16 Jan 2006 20:21:41 GMT"
- // hexString = dojox.uuid.getTimestamp(uuidString, "hex"); // "1da86cdb4308fb0"
- // exceptions:
- // Throws an Error if this is not a version 1 UUID.
- var errorMessage = "dojox.uuid.getTimestamp() was not passed a TIME_BASED UUID.";
- dojox.uuid.assert(dojox.uuid.getVersion(uuidString) == dojox.uuid.version.TIME_BASED, errorMessage);
-
- uuidString = uuidString.toString();
- if(!returnType){returnType = null};
- switch(returnType){
- case "string":
- case String:
- return dojox.uuid.getTimestamp(uuidString, Date).toUTCString(); // String (e.g. "Mon, 16 Jan 2006 20:21:41 GMT")
- break;
- case "hex":
- // Return a 15-character string of hex digits containing the
- // timestamp for this UUID, with the high-order bits first.
- var arrayOfStrings = uuidString.split('-');
- var hexTimeLow = arrayOfStrings[0];
- var hexTimeMid = arrayOfStrings[1];
- var hexTimeHigh = arrayOfStrings[2];
-
- // Chop off the leading "1" character, which is the UUID
- // version number for time-based UUIDs.
- hexTimeHigh = hexTimeHigh.slice(1);
-
- var timestampAsHexString = hexTimeHigh + hexTimeMid + hexTimeLow;
- dojox.uuid.assert(timestampAsHexString.length == 15);
- return timestampAsHexString; // String (e.g. "1da86cdb4308fb0")
- break;
- case null: // no returnType was specified, so default to Date
- case "date":
- case Date:
- // Return a JavaScript Date object.
- var GREGORIAN_CHANGE_OFFSET_IN_HOURS = 3394248;
- var HEX_RADIX = 16;
-
- var arrayOfParts = uuidString.split('-');
- var timeLow = parseInt(arrayOfParts[0], HEX_RADIX);
- var timeMid = parseInt(arrayOfParts[1], HEX_RADIX);
- var timeHigh = parseInt(arrayOfParts[2], HEX_RADIX);
- var hundredNanosecondIntervalsSince1582 = timeHigh & 0x0FFF;
- hundredNanosecondIntervalsSince1582 <<= 16;
- hundredNanosecondIntervalsSince1582 += timeMid;
- // What we really want to do next is shift left 32 bits, but the
- // result will be too big to fit in an int, so we'll multiply by 2^32,
- // and the result will be a floating point approximation.
- hundredNanosecondIntervalsSince1582 *= 0x100000000;
- hundredNanosecondIntervalsSince1582 += timeLow;
- var millisecondsSince1582 = hundredNanosecondIntervalsSince1582 / 10000;
-
- // Again, this will be a floating point approximation.
- // We can make things exact later if we need to.
- var secondsPerHour = 60 * 60;
- var hoursBetween1582and1970 = GREGORIAN_CHANGE_OFFSET_IN_HOURS;
- var secondsBetween1582and1970 = hoursBetween1582and1970 * secondsPerHour;
- var millisecondsBetween1582and1970 = secondsBetween1582and1970 * 1000;
- var millisecondsSince1970 = millisecondsSince1582 - millisecondsBetween1582and1970;
-
- var timestampAsDate = new Date(millisecondsSince1970);
- return timestampAsDate; // Date
- break;
- default:
- // we got passed something other than a valid returnType
- dojox.uuid.assert(false, "dojox.uuid.getTimestamp was not passed a valid returnType: " + returnType);
- break;
- }
+dojox.uuid.getVersion=function(_f){
+var _10="dojox.uuid.getVersion() was not passed a DCE Variant UUID.";
+dojox.uuid.assert(dojox.uuid.getVariant(_f)==dojox.uuid.variant.DCE,_10);
+_f=_f.toString();
+var _11=_f.charAt(14);
+var _12=16;
+var _13=parseInt(_11,_12);
+return _13;
+};
+dojox.uuid.getNode=function(_14){
+var _15="dojox.uuid.getNode() was not passed a TIME_BASED UUID.";
+dojox.uuid.assert(dojox.uuid.getVersion(_14)==dojox.uuid.version.TIME_BASED,_15);
+_14=_14.toString();
+var _16=_14.split("-");
+var _17=_16[4];
+return _17;
};
-
+dojox.uuid.getTimestamp=function(_18,_19){
+var _1a="dojox.uuid.getTimestamp() was not passed a TIME_BASED UUID.";
+dojox.uuid.assert(dojox.uuid.getVersion(_18)==dojox.uuid.version.TIME_BASED,_1a);
+_18=_18.toString();
+if(!_19){
+_19=null;
}
+switch(_19){
+case "string":
+case String:
+return dojox.uuid.getTimestamp(_18,Date).toUTCString();
+break;
+case "hex":
+var _1b=_18.split("-");
+var _1c=_1b[0];
+var _1d=_1b[1];
+var _1e=_1b[2];
+_1e=_1e.slice(1);
+var _1f=_1e+_1d+_1c;
+dojox.uuid.assert(_1f.length==15);
+return _1f;
+break;
+case null:
+case "date":
+case Date:
+var _20=3394248;
+var _21=16;
+var _22=_18.split("-");
+var _23=parseInt(_22[0],_21);
+var _24=parseInt(_22[1],_21);
+var _25=parseInt(_22[2],_21);
+var _26=_25&4095;
+_26<<=16;
+_26+=_24;
+_26*=4294967296;
+_26+=_23;
+var _27=_26/10000;
+var _28=60*60;
+var _29=_20;
+var _2a=_29*_28;
+var _2b=_2a*1000;
+var _2c=_27-_2b;
+var _2d=new Date(_2c);
+return _2d;
+break;
+default:
+dojox.uuid.assert(false,"dojox.uuid.getTimestamp was not passed a valid returnType: "+_19);
+break;
+}
+};
+}
diff --git a/js/dojo/dojox/uuid/generateRandomUuid.js b/js/dojo/dojox/uuid/generateRandomUuid.js
--- a/js/dojo/dojox/uuid/generateRandomUuid.js
+++ b/js/dojo/dojox/uuid/generateRandomUuid.js
@@ -1,56 +1,34 @@
-if(!dojo._hasResource["dojox.uuid.generateRandomUuid"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.uuid.generateRandomUuid"] = true;
-dojo.provide("dojox.uuid.generateRandomUuid");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
-dojox.uuid.generateRandomUuid = function(){
- // summary:
- // This function generates random UUIDs, meaning "version 4" UUIDs.
- // description:
- // A typical generated value would be something like this:
- // "3b12f1df-5232-4804-897e-917bf397618a"
- //
- // For more information about random UUIDs, see sections 4.4 and
- // 4.5 of RFC 4122: http://tools.ietf.org/html/rfc4122#section-4.4
- //
- // This generator function is designed to be small and fast,
- // but not necessarily good.
- //
- // Small: This generator has a small footprint. Once comments are
- // stripped, it's only about 25 lines of code, and it doesn't
- // dojo.require() any other modules.
- //
- // Fast: This generator can generate lots of new UUIDs fairly quickly
- // (at least, more quickly than the other dojo UUID generators).
- //
- // Not necessarily good: We use Math.random() as our source
- // of randomness, which may or may not provide much randomness.
- // examples:
- // var string = dojox.uuid.generateRandomUuid();
- var HEX_RADIX = 16;
-
- function _generateRandomEightCharacterHexString(){
- // Make random32bitNumber be a randomly generated floating point number
- // between 0 and (4,294,967,296 - 1), inclusive.
- var random32bitNumber = Math.floor( (Math.random() % 1) * Math.pow(2, 32) );
- var eightCharacterHexString = random32bitNumber.toString(HEX_RADIX);
- while(eightCharacterHexString.length < 8){
- eightCharacterHexString = "0" + eightCharacterHexString;
- }
- return eightCharacterHexString; // for example: "3B12F1DF"
- }
-
- var hyphen = "-";
- var versionCodeForRandomlyGeneratedUuids = "4"; // 8 == binary2hex("0100")
- var variantCodeForDCEUuids = "8"; // 8 == binary2hex("1000")
- var a = _generateRandomEightCharacterHexString();
- var b = _generateRandomEightCharacterHexString();
- b = b.substring(0, 4) + hyphen + versionCodeForRandomlyGeneratedUuids + b.substring(5, 8);
- var c = _generateRandomEightCharacterHexString();
- c = variantCodeForDCEUuids + c.substring(1, 4) + hyphen + c.substring(4, 8);
- var d = _generateRandomEightCharacterHexString();
- var returnValue = a + hyphen + b + hyphen + c + d;
- returnValue = returnValue.toLowerCase();
- return returnValue; // String
+if(!dojo._hasResource["dojox.uuid.generateRandomUuid"]){
+dojo._hasResource["dojox.uuid.generateRandomUuid"]=true;
+dojo.provide("dojox.uuid.generateRandomUuid");
+dojox.uuid.generateRandomUuid=function(){
+var _1=16;
+function _2(){
+var _3=Math.floor((Math.random()%1)*Math.pow(2,32));
+var _4=_3.toString(_1);
+while(_4.length<8){
+_4="0"+_4;
+}
+return _4;
};
-
+var _5="-";
+var _6="4";
+var _7="8";
+var a=_2();
+var b=_2();
+b=b.substring(0,4)+_5+_6+b.substring(5,8);
+var c=_2();
+c=_7+c.substring(1,4)+_5+c.substring(4,8);
+var d=_2();
+var _8=a+_5+b+_5+c+d;
+_8=_8.toLowerCase();
+return _8;
+};
}
diff --git a/js/dojo/dojox/uuid/generateTimeBasedUuid.js b/js/dojo/dojox/uuid/generateTimeBasedUuid.js
--- a/js/dojo/dojox/uuid/generateTimeBasedUuid.js
+++ b/js/dojo/dojox/uuid/generateTimeBasedUuid.js
@@ -1,290 +1,197 @@
-if(!dojo._hasResource["dojox.uuid.generateTimeBasedUuid"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.uuid.generateTimeBasedUuid"] = true;
-dojo.provide("dojox.uuid.generateTimeBasedUuid");
-
-dojox.uuid.generateTimeBasedUuid = function(/*String?*/ node){
- // summary:
- // This function generates time-based UUIDs, meaning "version 1" UUIDs.
- // description:
- // For more info, see
- // http://www.webdav.org/specs/draft-leach-uuids-guids-01.txt
- // http://www.infonuovo.com/dma/csdocs/sketch/instidid.htm
- // http://kruithof.xs4all.nl/uuid/uuidgen
- // http://www.opengroup.org/onlinepubs/009629399/apdxa.htm#tagcjh_20
- // http://jakarta.apache.org/commons/sandbox/id/apidocs/org/apache/commons/id/uuid/clock/Clock.html
- // node:
- // A 12-character hex string representing either a pseudo-node or
- // hardware-node (an IEEE 802.3 network node). A hardware-node
- // will be something like "017bf397618a", always with the first bit
- // being 0. A pseudo-node will be something like "f17bf397618a",
- // always with the first bit being 1.
- // examples:
- // string = dojox.uuid.generateTimeBasedUuid();
- // string = dojox.uuid.generateTimeBasedUuid("017bf397618a");
- // dojox.uuid.generateTimeBasedUuid.setNode("017bf397618a");
- // string = dojox.uuid.generateTimeBasedUuid(); // the generated UUID has node == "017bf397618a"
- var uuidString = dojox.uuid.generateTimeBasedUuid._generator.generateUuidString(node);
- return uuidString; // String
-};
-
-dojox.uuid.generateTimeBasedUuid.isValidNode = function(/*String?*/ node){
- var HEX_RADIX = 16;
- var integer = parseInt(node, HEX_RADIX);
- var valid = dojo.isString(node) && node.length == 12 && isFinite(integer);
- return valid; // Boolean
-};
-
-dojox.uuid.generateTimeBasedUuid.setNode = function(/*String?*/ node){
- // summary:
- // Sets the 'node' value that will be included in generated UUIDs.
- // node: A 12-character hex string representing a pseudoNode or hardwareNode.
- dojox.uuid.assert((node === null) || this.isValidNode(node));
- this._uniformNode = node;
-};
-
-dojox.uuid.generateTimeBasedUuid.getNode = function(){
- // summary:
- // Returns the 'node' value that will be included in generated UUIDs.
- return this._uniformNode; // String (a 12-character hex string representing a pseudoNode or hardwareNode)
-};
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-
-dojox.uuid.generateTimeBasedUuid._generator = new function(){
- // Number of hours between October 15, 1582 and January 1, 1970:
- this.GREGORIAN_CHANGE_OFFSET_IN_HOURS = 3394248;
-
- // Number of seconds between October 15, 1582 and January 1, 1970:
- // dojox.uuid.generateTimeBasedUuid.GREGORIAN_CHANGE_OFFSET_IN_SECONDS = 12219292800;
-
- // --------------------------------------------------
- // Private variables:
- var _uuidPseudoNodeString = null;
- var _uuidClockSeqString = null;
- var _dateValueOfPreviousUuid = null;
- var _nextIntraMillisecondIncrement = 0;
- var _cachedMillisecondsBetween1582and1970 = null;
- var _cachedHundredNanosecondIntervalsPerMillisecond = null;
-
- // --------------------------------------------------
- // Private constants:
- var HEX_RADIX = 16;
-
- function _carry(/* array */ arrayA){
- // summary:
- // Given an array which holds a 64-bit number broken into 4 16-bit
- // elements, this method carries any excess bits (greater than 16-bits)
- // from each array element into the next.
- // arrayA: An array with 4 elements, each of which is a 16-bit number.
- arrayA[2] += arrayA[3] >>> 16;
- arrayA[3] &= 0xFFFF;
- arrayA[1] += arrayA[2] >>> 16;
- arrayA[2] &= 0xFFFF;
- arrayA[0] += arrayA[1] >>> 16;
- arrayA[1] &= 0xFFFF;
- dojox.uuid.assert((arrayA[0] >>> 16) === 0);
- }
-
- function _get64bitArrayFromFloat(/* float */ x){
- // summary:
- // Given a floating point number, this method returns an array which
- // holds a 64-bit number broken into 4 16-bit elements.
- var result = new Array(0, 0, 0, 0);
- result[3] = x % 0x10000;
- x -= result[3];
- x /= 0x10000;
- result[2] = x % 0x10000;
- x -= result[2];
- x /= 0x10000;
- result[1] = x % 0x10000;
- x -= result[1];
- x /= 0x10000;
- result[0] = x;
- return result; // Array with 4 elements, each of which is a 16-bit number.
- }
-
- function _addTwo64bitArrays(/* array */ arrayA, /* array */ arrayB){
- // summary:
- // Takes two arrays, each of which holds a 64-bit number broken into 4
- // 16-bit elements, and returns a new array that holds a 64-bit number
- // that is the sum of the two original numbers.
- // arrayA: An array with 4 elements, each of which is a 16-bit number.
- // arrayB: An array with 4 elements, each of which is a 16-bit number.
- dojox.uuid.assert(dojo.isArray(arrayA));
- dojox.uuid.assert(dojo.isArray(arrayB));
- dojox.uuid.assert(arrayA.length == 4);
- dojox.uuid.assert(arrayB.length == 4);
-
- var result = new Array(0, 0, 0, 0);
- result[3] = arrayA[3] + arrayB[3];
- result[2] = arrayA[2] + arrayB[2];
- result[1] = arrayA[1] + arrayB[1];
- result[0] = arrayA[0] + arrayB[0];
- _carry(result);
- return result; // Array with 4 elements, each of which is a 16-bit number.
- }
- function _multiplyTwo64bitArrays(/* array */ arrayA, /* array */ arrayB){
- // summary:
- // Takes two arrays, each of which holds a 64-bit number broken into 4
- // 16-bit elements, and returns a new array that holds a 64-bit number
- // that is the product of the two original numbers.
- // arrayA: An array with 4 elements, each of which is a 16-bit number.
- // arrayB: An array with 4 elements, each of which is a 16-bit number.
- dojox.uuid.assert(dojo.isArray(arrayA));
- dojox.uuid.assert(dojo.isArray(arrayB));
- dojox.uuid.assert(arrayA.length == 4);
- dojox.uuid.assert(arrayB.length == 4);
-
- var overflow = false;
- if(arrayA[0] * arrayB[0] !== 0){ overflow = true; }
- if(arrayA[0] * arrayB[1] !== 0){ overflow = true; }
- if(arrayA[0] * arrayB[2] !== 0){ overflow = true; }
- if(arrayA[1] * arrayB[0] !== 0){ overflow = true; }
- if(arrayA[1] * arrayB[1] !== 0){ overflow = true; }
- if(arrayA[2] * arrayB[0] !== 0){ overflow = true; }
- dojox.uuid.assert(!overflow);
-
- var result = new Array(0, 0, 0, 0);
- result[0] += arrayA[0] * arrayB[3];
- _carry(result);
- result[0] += arrayA[1] * arrayB[2];
- _carry(result);
- result[0] += arrayA[2] * arrayB[1];
- _carry(result);
- result[0] += arrayA[3] * arrayB[0];
- _carry(result);
- result[1] += arrayA[1] * arrayB[3];
- _carry(result);
- result[1] += arrayA[2] * arrayB[2];
- _carry(result);
- result[1] += arrayA[3] * arrayB[1];
- _carry(result);
- result[2] += arrayA[2] * arrayB[3];
- _carry(result);
- result[2] += arrayA[3] * arrayB[2];
- _carry(result);
- result[3] += arrayA[3] * arrayB[3];
- _carry(result);
- return result; // Array with 4 elements, each of which is a 16-bit number.
- }
-
- function _padWithLeadingZeros(/* string */ string, /* int */ desiredLength){
- // summary:
- // Pads a string with leading zeros and returns the result.
- // string: A string to add padding to.
- // desiredLength: The number of characters the return string should have.
-
- // examples:
- // result = _padWithLeadingZeros("abc", 6);
- // dojox.uuid.assert(result == "000abc");
- while(string.length < desiredLength){
- string = "0" + string;
- }
- return string; // string
- }
-
- function _generateRandomEightCharacterHexString() {
- // summary:
- // Returns a randomly generated 8-character string of hex digits.
-
- // FIXME: This probably isn't a very high quality random number.
-
- // Make random32bitNumber be a randomly generated floating point number
- // between 0 and (4,294,967,296 - 1), inclusive.
- var random32bitNumber = Math.floor( (Math.random() % 1) * Math.pow(2, 32) );
-
- var eightCharacterString = random32bitNumber.toString(HEX_RADIX);
- while(eightCharacterString.length < 8){
- eightCharacterString = "0" + eightCharacterString;
- }
- return eightCharacterString; // String (an 8-character hex string)
- }
-
- this.generateUuidString = function(/*String?*/ node){
- // summary:
- // Generates a time-based UUID, meaning a version 1 UUID.
- // description:
- // JavaScript code running in a browser doesn't have access to the
- // IEEE 802.3 address of the computer, so if a node value isn't
- // supplied, we generate a random pseudonode value instead.
- // node: An optional 12-character string to use as the node in the new UUID.
- if(node){
- dojox.uuid.assert(dojox.uuid.generateTimeBasedUuid.isValidNode(node));
- }else{
- if(dojox.uuid.generateTimeBasedUuid._uniformNode){
- node = dojox.uuid.generateTimeBasedUuid._uniformNode;
- }else{
- if(!_uuidPseudoNodeString){
- var pseudoNodeIndicatorBit = 0x8000;
- var random15bitNumber = Math.floor( (Math.random() % 1) * Math.pow(2, 15) );
- var leftmost4HexCharacters = (pseudoNodeIndicatorBit | random15bitNumber).toString(HEX_RADIX);
- _uuidPseudoNodeString = leftmost4HexCharacters + _generateRandomEightCharacterHexString();
- }
- node = _uuidPseudoNodeString;
- }
- }
- if(!_uuidClockSeqString){
- var variantCodeForDCEUuids = 0x8000; // 10--------------, i.e. uses only first two of 16 bits.
- var random14bitNumber = Math.floor( (Math.random() % 1) * Math.pow(2, 14) );
- _uuidClockSeqString = (variantCodeForDCEUuids | random14bitNumber).toString(HEX_RADIX);
- }
-
- // Maybe we should think about trying to make the code more readable to
- // newcomers by creating a class called "WholeNumber" that encapsulates
- // the methods and data structures for working with these arrays that
- // hold 4 16-bit numbers? And then these variables below have names
- // like "wholeSecondsPerHour" rather than "arraySecondsPerHour"?
- var now = new Date();
- var millisecondsSince1970 = now.valueOf(); // milliseconds since midnight 01 January, 1970 UTC.
- var nowArray = _get64bitArrayFromFloat(millisecondsSince1970);
- if(!_cachedMillisecondsBetween1582and1970){
- var arraySecondsPerHour = _get64bitArrayFromFloat(60 * 60);
- var arrayHoursBetween1582and1970 = _get64bitArrayFromFloat(dojox.uuid.generateTimeBasedUuid._generator.GREGORIAN_CHANGE_OFFSET_IN_HOURS);
- var arraySecondsBetween1582and1970 = _multiplyTwo64bitArrays(arrayHoursBetween1582and1970, arraySecondsPerHour);
- var arrayMillisecondsPerSecond = _get64bitArrayFromFloat(1000);
- _cachedMillisecondsBetween1582and1970 = _multiplyTwo64bitArrays(arraySecondsBetween1582and1970, arrayMillisecondsPerSecond);
- _cachedHundredNanosecondIntervalsPerMillisecond = _get64bitArrayFromFloat(10000);
- }
- var arrayMillisecondsSince1970 = nowArray;
- var arrayMillisecondsSince1582 = _addTwo64bitArrays(_cachedMillisecondsBetween1582and1970, arrayMillisecondsSince1970);
- var arrayHundredNanosecondIntervalsSince1582 = _multiplyTwo64bitArrays(arrayMillisecondsSince1582, _cachedHundredNanosecondIntervalsPerMillisecond);
-
- if(now.valueOf() == _dateValueOfPreviousUuid){
- arrayHundredNanosecondIntervalsSince1582[3] += _nextIntraMillisecondIncrement;
- _carry(arrayHundredNanosecondIntervalsSince1582);
- _nextIntraMillisecondIncrement += 1;
- if (_nextIntraMillisecondIncrement == 10000) {
- // If we've gotten to here, it means we've already generated 10,000
- // UUIDs in this single millisecond, which is the most that the UUID
- // timestamp field allows for. So now we'll just sit here and wait
- // for a fraction of a millisecond, so as to ensure that the next
- // time this method is called there will be a different millisecond
- // value in the timestamp field.
- while (now.valueOf() == _dateValueOfPreviousUuid) {
- now = new Date();
- }
- }
- }else{
- _dateValueOfPreviousUuid = now.valueOf();
- _nextIntraMillisecondIncrement = 1;
- }
-
- var hexTimeLowLeftHalf = arrayHundredNanosecondIntervalsSince1582[2].toString(HEX_RADIX);
- var hexTimeLowRightHalf = arrayHundredNanosecondIntervalsSince1582[3].toString(HEX_RADIX);
- var hexTimeLow = _padWithLeadingZeros(hexTimeLowLeftHalf, 4) + _padWithLeadingZeros(hexTimeLowRightHalf, 4);
- var hexTimeMid = arrayHundredNanosecondIntervalsSince1582[1].toString(HEX_RADIX);
- hexTimeMid = _padWithLeadingZeros(hexTimeMid, 4);
- var hexTimeHigh = arrayHundredNanosecondIntervalsSince1582[0].toString(HEX_RADIX);
- hexTimeHigh = _padWithLeadingZeros(hexTimeHigh, 3);
- var hyphen = "-";
- var versionCodeForTimeBasedUuids = "1"; // binary2hex("0001")
- var resultUuid = hexTimeLow + hyphen + hexTimeMid + hyphen +
- versionCodeForTimeBasedUuids + hexTimeHigh + hyphen +
- _uuidClockSeqString + hyphen + node;
- resultUuid = resultUuid.toLowerCase();
- return resultUuid; // String (a 36 character string, which will look something like "b4308fb0-86cd-11da-a72b-0800200c9a66")
- }
-
+if(!dojo._hasResource["dojox.uuid.generateTimeBasedUuid"]){
+dojo._hasResource["dojox.uuid.generateTimeBasedUuid"]=true;
+dojo.provide("dojox.uuid.generateTimeBasedUuid");
+dojox.uuid.generateTimeBasedUuid=function(_1){
+var _2=dojox.uuid.generateTimeBasedUuid._generator.generateUuidString(_1);
+return _2;
+};
+dojox.uuid.generateTimeBasedUuid.isValidNode=function(_3){
+var _4=16;
+var _5=parseInt(_3,_4);
+var _6=dojo.isString(_3)&&_3.length==12&&isFinite(_5);
+return _6;
+};
+dojox.uuid.generateTimeBasedUuid.setNode=function(_7){
+dojox.uuid.assert((_7===null)||this.isValidNode(_7));
+this._uniformNode=_7;
+};
+dojox.uuid.generateTimeBasedUuid.getNode=function(){
+return this._uniformNode;
+};
+dojox.uuid.generateTimeBasedUuid._generator=new function(){
+this.GREGORIAN_CHANGE_OFFSET_IN_HOURS=3394248;
+var _8=null;
+var _9=null;
+var _a=null;
+var _b=0;
+var _c=null;
+var _d=null;
+var _e=16;
+function _f(_10){
+_10[2]+=_10[3]>>>16;
+_10[3]&=65535;
+_10[1]+=_10[2]>>>16;
+_10[2]&=65535;
+_10[0]+=_10[1]>>>16;
+_10[1]&=65535;
+dojox.uuid.assert((_10[0]>>>16)===0);
+};
+function _11(x){
+var _12=new Array(0,0,0,0);
+_12[3]=x%65536;
+x-=_12[3];
+x/=65536;
+_12[2]=x%65536;
+x-=_12[2];
+x/=65536;
+_12[1]=x%65536;
+x-=_12[1];
+x/=65536;
+_12[0]=x;
+return _12;
+};
+function _13(_14,_15){
+dojox.uuid.assert(dojo.isArray(_14));
+dojox.uuid.assert(dojo.isArray(_15));
+dojox.uuid.assert(_14.length==4);
+dojox.uuid.assert(_15.length==4);
+var _16=new Array(0,0,0,0);
+_16[3]=_14[3]+_15[3];
+_16[2]=_14[2]+_15[2];
+_16[1]=_14[1]+_15[1];
+_16[0]=_14[0]+_15[0];
+_f(_16);
+return _16;
+};
+function _17(_18,_19){
+dojox.uuid.assert(dojo.isArray(_18));
+dojox.uuid.assert(dojo.isArray(_19));
+dojox.uuid.assert(_18.length==4);
+dojox.uuid.assert(_19.length==4);
+var _1a=false;
+if(_18[0]*_19[0]!==0){
+_1a=true;
+}
+if(_18[0]*_19[1]!==0){
+_1a=true;
+}
+if(_18[0]*_19[2]!==0){
+_1a=true;
+}
+if(_18[1]*_19[0]!==0){
+_1a=true;
+}
+if(_18[1]*_19[1]!==0){
+_1a=true;
+}
+if(_18[2]*_19[0]!==0){
+_1a=true;
+}
+dojox.uuid.assert(!_1a);
+var _1b=new Array(0,0,0,0);
+_1b[0]+=_18[0]*_19[3];
+_f(_1b);
+_1b[0]+=_18[1]*_19[2];
+_f(_1b);
+_1b[0]+=_18[2]*_19[1];
+_f(_1b);
+_1b[0]+=_18[3]*_19[0];
+_f(_1b);
+_1b[1]+=_18[1]*_19[3];
+_f(_1b);
+_1b[1]+=_18[2]*_19[2];
+_f(_1b);
+_1b[1]+=_18[3]*_19[1];
+_f(_1b);
+_1b[2]+=_18[2]*_19[3];
+_f(_1b);
+_1b[2]+=_18[3]*_19[2];
+_f(_1b);
+_1b[3]+=_18[3]*_19[3];
+_f(_1b);
+return _1b;
+};
+function _1c(_1d,_1e){
+while(_1d.length<_1e){
+_1d="0"+_1d;
+}
+return _1d;
+};
+function _1f(){
+var _20=Math.floor((Math.random()%1)*Math.pow(2,32));
+var _21=_20.toString(_e);
+while(_21.length<8){
+_21="0"+_21;
+}
+return _21;
+};
+this.generateUuidString=function(_22){
+if(_22){
+dojox.uuid.assert(dojox.uuid.generateTimeBasedUuid.isValidNode(_22));
+}else{
+if(dojox.uuid.generateTimeBasedUuid._uniformNode){
+_22=dojox.uuid.generateTimeBasedUuid._uniformNode;
+}else{
+if(!_8){
+var _23=32768;
+var _24=Math.floor((Math.random()%1)*Math.pow(2,15));
+var _25=(_23|_24).toString(_e);
+_8=_25+_1f();
+}
+_22=_8;
+}
+}
+if(!_9){
+var _26=32768;
+var _27=Math.floor((Math.random()%1)*Math.pow(2,14));
+_9=(_26|_27).toString(_e);
+}
+var now=new Date();
+var _28=now.valueOf();
+var _29=_11(_28);
+if(!_c){
+var _2a=_11(60*60);
+var _2b=_11(dojox.uuid.generateTimeBasedUuid._generator.GREGORIAN_CHANGE_OFFSET_IN_HOURS);
+var _2c=_17(_2b,_2a);
+var _2d=_11(1000);
+_c=_17(_2c,_2d);
+_d=_11(10000);
+}
+var _2e=_29;
+var _2f=_13(_c,_2e);
+var _30=_17(_2f,_d);
+if(now.valueOf()==_a){
+_30[3]+=_b;
+_f(_30);
+_b+=1;
+if(_b==10000){
+while(now.valueOf()==_a){
+now=new Date();
+}
+}
+}else{
+_a=now.valueOf();
+_b=1;
+}
+var _31=_30[2].toString(_e);
+var _32=_30[3].toString(_e);
+var _33=_1c(_31,4)+_1c(_32,4);
+var _34=_30[1].toString(_e);
+_34=_1c(_34,4);
+var _35=_30[0].toString(_e);
+_35=_1c(_35,3);
+var _36="-";
+var _37="1";
+var _38=_33+_36+_34+_36+_37+_35+_36+_9+_36+_22;
+_38=_38.toLowerCase();
+return _38;
+};
}();
-
}
diff --git a/js/dojo/dojox/validate.js b/js/dojo/dojox/validate.js
--- a/js/dojo/dojox/validate.js
+++ b/js/dojo/dojox/validate.js
@@ -1,6 +1,12 @@
-if(!dojo._hasResource["dojox.validate"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.validate"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.validate"]){
+dojo._hasResource["dojox.validate"]=true;
dojo.provide("dojox.validate");
-dojo.require("dojox.validate._base");
-
+dojo.require("dojox.validate._base");
}
diff --git a/js/dojo/dojox/validate/README b/js/dojo/dojox/validate/README
--- a/js/dojo/dojox/validate/README
+++ b/js/dojo/dojox/validate/README
@@ -1,37 +1,62 @@
-------------------------------------------------------------------------------
dojox.validate
-------------------------------------------------------------------------------
-Version 0.01
+Version 0.02
Release date: 07/12/2007
-------------------------------------------------------------------------------
Project state: experimental / beta
-------------------------------------------------------------------------------
Credits
port: Peter Higgins (dante)
- contributions: Kun Xi (bookstack@gmail.com)
+ contributions: Kun Xi (bookstack at gmail com), Jared Jurkiewicz
-------------------------------------------------------------------------------
Project description
Provides a set of validation functions to match
values against known constants for use in form
validation, such as email address, TLD, ipAddress,
country-specific phone numbers and SSN, among
others..
+ It is broken into many parts. dojox.validate._base
+ is required by most named modules in this project.
+
+ ca.js provides Canadian specific functionality
+
+ check.js provides an experimental form-management utility,
+ which will likely be deprecated in favor
+
+ creditCard.js provides validation functions for most standard
+ credit card types.
+
+ isbn.js validates ISBN numbers
+
+ regexp.js provides a strange place to put regular expressions
+ related to validation. It was formerly polluting namespaces
+ and created in `dojox.regexp`. This is now `dojox.validate.regexp`
+ to confine values to the dojox.validate project.
+
+ us.js provides US-Specific validation. Zip, Social, etc.
+
+ web.js provides url and email address validation, as well as a number
+ of web/network related validation functions.
+
+ br.js provides Brazil specific validators for CNPJ and CPF numbers.
+
-------------------------------------------------------------------------------
Dependencies:
- Requires dojo base and dojo.regexp.
+ Requires Base Dojo and dojo.regexp.
-------------------------------------------------------------------------------
Installation instructions
Grab the following from the Dojo SVN Repository:
-http://svn.dojotoolkit.org/dojo/dojox/trunk/validate.js
-http://svn.dojotoolkit.org/dojo/dojox/trunk/validate
+http://svn.dojotoolkit.org/src/dojox/trunk/validate.js
+http://svn.dojotoolkit.org/src/dojox/trunk/validate
Install into the following directory structure:
/dojox/validate/
...which should be at the same level as your Dojo checkout.
diff --git a/js/dojo/dojox/validate/_base.js b/js/dojo/dojox/validate/_base.js
--- a/js/dojo/dojox/validate/_base.js
+++ b/js/dojo/dojox/validate/_base.js
@@ -1,183 +1,68 @@
-if(!dojo._hasResource["dojox.validate._base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.validate._base"] = true;
-dojo.provide("dojox.validate._base");
-
-dojo.require("dojo.regexp"); // dojo core expressions
-dojo.require("dojo.number"); // dojo number expressions
-dojo.require("dojox.validate.regexp"); // additional expressions
-
-dojox.validate.isText = function(/*String*/value, /*Object?*/flags){
- // summary:
- // Checks if a string has non whitespace characters.
- // Parameters allow you to constrain the length.
- //
- // value: A string
- // flags: {length: Number, minlength: Number, maxlength: Number}
- // flags.length If set, checks if there are exactly flags.length number of characters.
- // flags.minlength If set, checks if there are at least flags.minlength number of characters.
- // flags.maxlength If set, checks if there are at most flags.maxlength number of characters.
-
- flags = (typeof flags == "object") ? flags : {};
-
- // test for text
- if(/^\s*$/.test(value)){ return false; } // Boolean
-
- // length tests
- if(typeof flags.length == "number" && flags.length != value.length){ return false; } // Boolean
- if(typeof flags.minlength == "number" && flags.minlength > value.length){ return false; } // Boolean
- if(typeof flags.maxlength == "number" && flags.maxlength < value.length){ return false; } // Boolean
-
- return true; // Boolean
-
-}
-
-dojox.validate._isInRangeCache = {};
-dojox.validate.isInRange = function(/*String*/value, /*Object?*/flags){
- // summary:
- // Validates whether a string denoting an integer,
- // real number, or monetary value is between a max and min.
- //
- // value: A string
- // flags: {max:Number, min:Number, decimal:String}
- // flags.max A number, which the value must be less than or equal to for the validation to be true.
- // flags.min A number, which the value must be greater than or equal to for the validation to be true.
- // flags.decimal The character used for the decimal point. Default is ".".
-
- // fixes ticket #2908
- value = dojo.number.parse(value, flags);
- if(isNaN(value)){
- return false; // Boolean
- }
-
- // assign default values to missing paramters
- flags = (typeof flags == "object") ? flags : {};
- var max = (typeof flags.max == "number") ? flags.max : Infinity;
- var min = (typeof flags.min == "number") ? flags.min : -Infinity;
- var dec = (typeof flags.decimal == "string") ? flags.decimal : ".";
-
- var cache = dojox.validate._isInRangeCache;
- var cacheIdx = value+"max"+max+"min"+min+"dec"+dec;
- if(typeof cache[cacheIdx] != "undefined"){
- return cache[cacheIdx];
- }
-
- if ( value < min || value > max ) { cache[cacheIdx] = false; return false; } // Boolean
-
- cache[cacheIdx] = true; return true; // Boolean
-}
-
-dojox.validate.isNumberFormat = function(/*String*/value, /*Object?*/flags){
- // summary:
- // Validates any sort of number based format
- //
- // description:
- // Use it for phone numbers, social security numbers, zip-codes, etc.
- // The value can be validated against one format or one of multiple formats.
- //
- // Format
- // # Stands for a digit, 0-9.
- // ? Stands for an optional digit, 0-9 or nothing.
- // All other characters must appear literally in the expression.
- //
- // Example
- // "(###) ###-####" -> (510) 542-9742
- // "(###) ###-#### x#???" -> (510) 542-9742 x153
- // "###-##-####" -> 506-82-1089 i.e. social security number
- // "#####-####" -> 98225-1649 i.e. zip code
- //
- // value: A string
- // flags: {format:String}
- // flags.format A string or an Array of strings for multiple formats.
-
- var re = new RegExp("^" + dojox.regexp.numberFormat(flags) + "$", "i");
- return re.test(value); // Boolean
-}
-
-dojox.validate.isValidLuhn = function(/*String*/value){
- //summary: Compares value against the Luhn algorithm to verify its integrity
- var sum, parity, curDigit;
- if(typeof value!='string'){
- value = String(value);
- }
- value = value.replace(/[- ]/g,''); //ignore dashes and whitespaces
- parity = value.length%2;
- sum=0;
- for(var i=0;i<value.length;i++){
- curDigit = parseInt(value.charAt(i));
- if(i%2==parity){
- curDigit*=2;
- }
- if(curDigit>9){
- curDigit-=9;
- }
- sum+=curDigit;
- }
- return !(sum%10); //Boolean
-}
-
-/**
- Procedural API Description
-
- The main aim is to make input validation expressible in a simple format.
- You define profiles which declare the required and optional fields and any constraints they might have.
- The results are provided as an object that makes it easy to handle missing and invalid input.
-
- Usage
-
- var results = dojo.validate.check(form, profile);
-
- Profile Object
-
- var profile = {
- // filters change the field value and are applied before validation.
- trim: ["tx1", "tx2"],
- uppercase: ["tx9"],
- lowercase: ["tx5", "tx6", "tx7"],
- ucfirst: ["tx10"],
- digit: ["tx11"],
-
- // required input fields that are blank will be reported missing.
- // required radio button groups and drop-down lists with no selection will be reported missing.
- // checkbox groups and selectboxes can be required to have more than one value selected.
- // List required fields by name and use this notation to require more than one value: {checkboxgroup: 2}, {selectboxname: 3}.
- required: ["tx7", "tx8", "pw1", "ta1", "rb1", "rb2", "cb3", "s1", {"doubledip":2}, {"tripledip":3}],
-
- // dependant/conditional fields are required if the target field is present and not blank.
- // At present only textbox, password, and textarea fields are supported.
- dependencies: {
- cc_exp: "cc_no",
- cc_type: "cc_no",
- },
-
- // Fields can be validated using any boolean valued function.
- // Use arrays to specify parameters in addition to the field value.
- constraints: {
- field_name1: myValidationFunction,
- field_name2: dojo.validate.isInteger,
- field_name3: [myValidationFunction, additional parameters],
- field_name4: [dojo.validate.isValidDate, "YYYY.MM.DD"],
- field_name5: [dojo.validate.isEmailAddress, false, true],
- },
-
- // Confirm is a sort of conditional validation.
- // It associates each field in its property list with another field whose value should be equal.
- // If the values are not equal, the field in the property list is reported as Invalid. Unless the target field is blank.
- confirm: {
- email_confirm: "email",
- pw2: "pw1",
- }
- };
-
- Results Object
-
- isSuccessful(): Returns true if there were no invalid or missing fields, else it returns false.
- hasMissing(): Returns true if the results contain any missing fields.
- getMissing(): Returns a list of required fields that have values missing.
- isMissing(field): Returns true if the field is required and the value is missing.
- hasInvalid(): Returns true if the results contain fields with invalid data.
- getInvalid(): Returns a list of fields that have invalid values.
- isInvalid(field): Returns true if the field has an invalid value.
-
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
*/
+
+if(!dojo._hasResource["dojox.validate._base"]){
+dojo._hasResource["dojox.validate._base"]=true;
+dojo.provide("dojox.validate._base");
+dojo.experimental("dojox.validate");
+dojo.require("dojo.regexp");
+dojo.require("dojo.number");
+dojo.require("dojox.validate.regexp");
+dojox.validate.isText=function(_1,_2){
+_2=(typeof _2=="object")?_2:{};
+if(/^\s*$/.test(_1)){
+return false;
}
+if(typeof _2.length=="number"&&_2.length!=_1.length){
+return false;
+}
+if(typeof _2.minlength=="number"&&_2.minlength>_1.length){
+return false;
+}
+if(typeof _2.maxlength=="number"&&_2.maxlength<_1.length){
+return false;
+}
+return true;
+};
+dojox.validate._isInRangeCache={};
+dojox.validate.isInRange=function(_3,_4){
+_3=dojo.number.parse(_3,_4);
+if(isNaN(_3)){
+return false;
+}
+_4=(typeof _4=="object")?_4:{};
+var _5=(typeof _4.max=="number")?_4.max:Infinity,_6=(typeof _4.min=="number")?_4.min:-Infinity,_7=(typeof _4.decimal=="string")?_4.decimal:".",_8=dojox.validate._isInRangeCache,_9=_3+"max"+_5+"min"+_6+"dec"+_7;
+if(typeof _8[_9]!="undefined"){
+return _8[_9];
+}
+_8[_9]=!(_3<_6||_3>_5);
+return _8[_9];
+};
+dojox.validate.isNumberFormat=function(_a,_b){
+var re=new RegExp("^"+dojox.validate.regexp.numberFormat(_b)+"$","i");
+return re.test(_a);
+};
+dojox.validate.isValidLuhn=function(_c){
+var _d=0,_e,_f;
+if(!dojo.isString(_c)){
+_c=String(_c);
+}
+_c=_c.replace(/[- ]/g,"");
+_e=_c.length%2;
+for(var i=0;i<_c.length;i++){
+_f=parseInt(_c.charAt(i));
+if(i%2==_e){
+_f*=2;
+}
+if(_f>9){
+_f-=9;
+}
+_d+=_f;
+}
+return !(_d%10);
+};
+}
diff --git a/js/dojo/dojox/validate/ca.js b/js/dojo/dojox/validate/ca.js
--- a/js/dojo/dojox/validate/ca.js
+++ b/js/dojo/dojox/validate/ca.js
@@ -1,44 +1,24 @@
-if(!dojo._hasResource["dojox.validate.ca"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.validate.ca"] = true;
-dojo.provide("dojox.validate.ca");
-
-dojo.require("dojox.validate._base");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojox.validate.ca.isPhoneNumber = function(/* String */value) {
- // summary: Validates 10 Canadian digit phone number for several common formats
- // returns: Boolean
- return dojox.validate.us.isPhoneNumber(value); // same as US
-};
-dojox.validate.ca.isProvince = function(/* String[2] */value) {
- // summary: Validates Canadian province abbreviations (2 chars)
- // returns: Boolean
- var re = new RegExp("^" + dojox.regexp.ca.province() + "$", "i");
- return re.test(value);
-};
-
-dojox.validate.ca.isSocialInsuranceNumber = function(/* String */value) {
- // summary: Validates Canadian 9 digit social insurance number for several common formats
- // This routine only pattern matches and does not use the Luhn Algorithm to validate number.
- // returns: Boolean
- var flags = {
- format: [
- "###-###-###",
- "### ### ###",
- "#########"
- ]
- };
- return dojox.validate.isNumberFormat(value, flags);
-};
-
-dojox.validate.ca.isPostalCode = function(value) {
- // summary: Validates Canadian 6 digit postal code:
- // Canadian postal codes are in the format ANA NAN,
- // where A is a letter and N is a digit, with a space
- // separating the third and fourth characters.
- // returns: Boolean
- var re = new RegExp("^" + dojox.regexp.ca.postalCode() + "$", "i");
- return re.test(value);
-};
-
+if(!dojo._hasResource["dojox.validate.ca"]){
+dojo._hasResource["dojox.validate.ca"]=true;
+dojo.provide("dojox.validate.ca");
+dojo.require("dojox.validate._base");
+dojo.mixin(dojox.validate.ca,{isPhoneNumber:function(_1){
+return dojox.validate.us.isPhoneNumber(_1);
+},isProvince:function(_2){
+var re=new RegExp("^"+dojox.validate.regexp.ca.province()+"$","i");
+return re.test(_2);
+},isSocialInsuranceNumber:function(_3){
+var _4={format:["###-###-###","### ### ###","#########"]};
+return dojox.validate.isNumberFormat(_3,_4);
+},isPostalCode:function(_5){
+var re=new RegExp("^"+dojox.validate.regexp.ca.postalCode()+"$","i");
+return re.test(_5);
+}});
}
diff --git a/js/dojo/dojox/validate/check.js b/js/dojo/dojox/validate/check.js
--- a/js/dojo/dojox/validate/check.js
+++ b/js/dojo/dojox/validate/check.js
@@ -1,261 +1,230 @@
-if(!dojo._hasResource["dojox.validate.check"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.validate.check"] = true;
-dojo.provide("dojox.validate.check");
-
-dojo.require("dojox.validate._base");
-
-dojox.validate.check = function(/*HTMLFormElement*/form, /*Object*/profile){
- // summary: validates user input of an HTML form based on input profile
- //
- // description:
- // returns an object that contains several methods summarizing the results of the validation
- //
- // form: form to be validated
- // profile: specifies how the form fields are to be validated
- // {trim:Array, uppercase:Array, lowercase:Array, ucfirst:Array, digit:Array,
- // required:Array, dependencies:Object, constraints:Object, confirm:Object}
-
- // Essentially private properties of results object
- var missing = [];
- var invalid = [];
-
- // results object summarizes the validation
- var results = {
- isSuccessful: function() {return ( !this.hasInvalid() && !this.hasMissing() );},
- hasMissing: function() {return ( missing.length > 0 );},
- getMissing: function() {return missing;},
- isMissing: function(elemname) {
- for(var i = 0; i < missing.length; i++){
- if(elemname == missing[i]){ return true; }
- }
- return false;
- },
- hasInvalid: function() {return ( invalid.length > 0 );},
- getInvalid: function() {return invalid;},
- isInvalid: function(elemname){
- for(var i = 0; i < invalid.length; i++){
- if(elemname == invalid[i]){ return true; }
- }
- return false;
- }
- };
-
- var _undef = function(name,object){
- return (typeof object[name] == "undefined");
- };
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // Filters are applied before fields are validated.
- // Trim removes white space at the front and end of the fields.
- if(profile.trim instanceof Array){
- for(var i = 0; i < profile.trim.length; i++){
- var elem = form[profile.trim[i]];
- if(_undef("type", elem) || elem.type != "text" && elem.type != "textarea" && elem.type != "password"){ continue; }
- elem.value = elem.value.replace(/(^\s*|\s*$)/g, "");
- }
- }
- // Convert to uppercase
- if(profile.uppercase instanceof Array){
- for(var i = 0; i < profile.uppercase.length; i++){
- var elem = form[profile.uppercase[i]];
- if(_undef("type", elem) || elem.type != "text" && elem.type != "textarea" && elem.type != "password"){ continue; }
- elem.value = elem.value.toUpperCase();
- }
- }
- // Convert to lowercase
- if(profile.lowercase instanceof Array){
- for (var i = 0; i < profile.lowercase.length; i++){
- var elem = form[profile.lowercase[i]];
- if(_undef("type", elem) || elem.type != "text" && elem.type != "textarea" && elem.type != "password"){ continue; }
- elem.value = elem.value.toLowerCase();
- }
- }
- // Uppercase first letter
- if(profile.ucfirst instanceof Array){
- for(var i = 0; i < profile.ucfirst.length; i++){
- var elem = form[profile.ucfirst[i]];
- if(_undef("type", elem) || elem.type != "text" && elem.type != "textarea" && elem.type != "password"){ continue; }
- elem.value = elem.value.replace(/\b\w+\b/g, function(word) { return word.substring(0,1).toUpperCase() + word.substring(1).toLowerCase(); });
- }
- }
- // Remove non digits characters from the input.
- if(profile.digit instanceof Array){
- for(var i = 0; i < profile.digit.length; i++){
- var elem = form[profile.digit[i]];
- if(_undef("type", elem) || elem.type != "text" && elem.type != "textarea" && elem.type != "password"){ continue; }
- elem.value = elem.value.replace(/\D/g, "");
- }
- }
-
- // See if required input fields have values missing.
- if(profile.required instanceof Array){
- for(var i = 0; i < profile.required.length; i++){
- if(!dojo.isString(profile.required[i])){ continue; }
- var elem = form[profile.required[i]];
- // Are textbox, textarea, or password fields blank.
- if(!_undef("type", elem)
- && (elem.type == "text" || elem.type == "textarea" || elem.type == "password" || elem.type == "file")
- && /^\s*$/.test(elem.value)){
- missing[missing.length] = elem.name;
- }
- // Does drop-down box have option selected.
- else if(!_undef("type", elem) && (elem.type == "select-one" || elem.type == "select-multiple")
- && (elem.selectedIndex == -1
- || /^\s*$/.test(elem.options[elem.selectedIndex].value))){
- missing[missing.length] = elem.name;
- }
- // Does radio button group (or check box group) have option checked.
- else if(elem instanceof Array){
- var checked = false;
- for(var j = 0; j < elem.length; j++){
- if (elem[j].checked) { checked = true; }
- }
- if(!checked){
- missing[missing.length] = elem[0].name;
- }
- }
- }
- }
- // See if checkbox groups and select boxes have x number of required values.
- if(profile.required instanceof Array){
- for (var i = 0; i < profile.required.length; i++){
- if(!dojo.isObject(profile.required[i])){ continue; }
- var elem, numRequired;
- for(var name in profile.required[i]){
- elem = form[name];
- numRequired = profile.required[i][name];
- }
- // case 1: elem is a check box group
- if(elem instanceof Array){
- var checked = 0;
- for(var j = 0; j < elem.length; j++){
- if(elem[j].checked){ checked++; }
- }
- if(checked < numRequired){
- missing[missing.length] = elem[0].name;
- }
- }
- // case 2: elem is a select box
- else if(!_undef("type", elem) && elem.type == "select-multiple" ){
- var selected = 0;
- for(var j = 0; j < elem.options.length; j++){
- if (elem.options[j].selected && !/^\s*$/.test(elem.options[j].value)) { selected++; }
- }
- if(selected < numRequired){
- missing[missing.length] = elem.name;
- }
- }
- }
- }
-
- // Dependent fields are required when the target field is present (not blank).
- // Todo: Support dependent and target fields that are radio button groups, or select drop-down lists.
- // Todo: Make the dependency based on a specific value of the target field.
- // Todo: allow dependent fields to have several required values, like {checkboxgroup: 3}.
- if(dojo.isObject(profile.dependencies)){
- // properties of dependencies object are the names of dependent fields to be checked
- for(name in profile.dependencies){
- var elem = form[name]; // the dependent element
- if(_undef("type", elem)){continue;}
- if(elem.type != "text" && elem.type != "textarea" && elem.type != "password"){ continue; } // limited support
- if(/\S+/.test(elem.value)){ continue; } // has a value already
- if(results.isMissing(elem.name)){ continue; } // already listed as missing
- var target = form[profile.dependencies[name]];
- if(target.type != "text" && target.type != "textarea" && target.type != "password"){ continue; } // limited support
- if(/^\s*$/.test(target.value)){ continue; } // skip if blank
- missing[missing.length] = elem.name; // ok the dependent field is missing
- }
- }
-
- // Find invalid input fields.
- if(dojo.isObject(profile.constraints)){
- // constraint properties are the names of fields to bevalidated
- for(name in profile.constraints){
- var elem = form[name];
- if(!elem) {continue;}
-
- // skip if blank - its optional unless required, in which case it
- // is already listed as missing.
- if(!_undef("tagName",elem)
- && (elem.tagName.toLowerCase().indexOf("input") >= 0
- || elem.tagName.toLowerCase().indexOf("textarea") >= 0)
- && /^\s*$/.test(elem.value)){
- continue;
- }
-
- var isValid = true;
- // case 1: constraint value is validation function
- if(dojo.isFunction(profile.constraints[name])){
- isValid = profile.constraints[name](elem.value);
- }else if(dojo.isArray(profile.constraints[name])){
-
- // handle nested arrays for multiple constraints
- if(dojo.isArray(profile.constraints[name][0])){
- for (var i=0; i<profile.constraints[name].length; i++){
- isValid = dojox.validate.evaluateConstraint(profile, profile.constraints[name][i], name, elem);
- if(!isValid){ break; }
- }
- }else{
- // case 2: constraint value is array, first elem is function,
- // tail is parameters
- isValid = dojox.validate.evaluateConstraint(profile, profile.constraints[name], name, elem);
- }
- }
-
- if(!isValid){
- invalid[invalid.length] = elem.name;
- }
- }
- }
-
- // Find unequal confirm fields and report them as Invalid.
- if(dojo.isObject(profile.confirm)){
- for(name in profile.confirm){
- var elem = form[name]; // the confirm element
- var target = form[profile.confirm[name]];
- if (_undef("type", elem) || _undef("type", target) || (elem.type != "text" && elem.type != "textarea" && elem.type != "password")
- ||(target.type != elem.type)
- ||(target.value == elem.value) // it's valid
- ||(results.isInvalid(elem.name))// already listed as invalid
- ||(/^\s*$/.test(target.value))) // skip if blank - only confirm if target has a value
- {
- continue;
- }
- invalid[invalid.length] = elem.name;
- }
- }
- return results; // Object
+if(!dojo._hasResource["dojox.validate.check"]){
+dojo._hasResource["dojox.validate.check"]=true;
+dojo.provide("dojox.validate.check");
+dojo.experimental;
+dojo.require("dojox.validate._base");
+dojox.validate.check=function(_1,_2){
+var _3=[];
+var _4=[];
+var _5={isSuccessful:function(){
+return (!this.hasInvalid()&&!this.hasMissing());
+},hasMissing:function(){
+return (_3.length>0);
+},getMissing:function(){
+return _3;
+},isMissing:function(_6){
+for(var i=0;i<_3.length;i++){
+if(_6==_3[i]){
+return true;
+}
+}
+return false;
+},hasInvalid:function(){
+return (_4.length>0);
+},getInvalid:function(){
+return _4;
+},isInvalid:function(_7){
+for(var i=0;i<_4.length;i++){
+if(_7==_4[i]){
+return true;
+}
+}
+return false;
+}};
+var _8=function(_9,_a){
+return (typeof _a[_9]=="undefined");
};
-
-//TODO: evaluateConstraint doesn't use profile or fieldName args?
-dojox.validate.evaluateConstraint=function(profile, /*Array*/constraint, fieldName, elem){
- // summary:
- // Evaluates dojo.validate.check() constraints that are specified as array
- // arguments
- //
- // description: The arrays are expected to be in the format of:
- // constraints:{
- // fieldName: [functionToCall, param1, param2, etc.],
- // fieldName: [[functionToCallFirst, param1],[functionToCallSecond,param2]]
- // }
- //
- // This function evaluates a single array function in the format of:
- // [functionName, argument1, argument2, etc]
- //
- // The function will be parsed out and evaluated against the incoming parameters.
- //
- // profile: The dojo.validate.check() profile that this evaluation is against.
- // constraint: The single [] array of function and arguments for the function.
- // fieldName: The form dom name of the field being validated.
- // elem: The form element field.
-
- var isValidSomething = constraint[0];
- var params = constraint.slice(1);
- params.unshift(elem.value);
- if(typeof isValidSomething != "undefined"){
- return isValidSomething.apply(null, params);
- }
- return false; // Boolean
+if(_2.trim instanceof Array){
+for(var i=0;i<_2.trim.length;i++){
+var _b=_1[_2.trim[i]];
+if(_8("type",_b)||_b.type!="text"&&_b.type!="textarea"&&_b.type!="password"){
+continue;
+}
+_b.value=_b.value.replace(/(^\s*|\s*$)/g,"");
+}
+}
+if(_2.uppercase instanceof Array){
+for(var i=0;i<_2.uppercase.length;i++){
+var _b=_1[_2.uppercase[i]];
+if(_8("type",_b)||_b.type!="text"&&_b.type!="textarea"&&_b.type!="password"){
+continue;
+}
+_b.value=_b.value.toUpperCase();
+}
+}
+if(_2.lowercase instanceof Array){
+for(var i=0;i<_2.lowercase.length;i++){
+var _b=_1[_2.lowercase[i]];
+if(_8("type",_b)||_b.type!="text"&&_b.type!="textarea"&&_b.type!="password"){
+continue;
+}
+_b.value=_b.value.toLowerCase();
+}
+}
+if(_2.ucfirst instanceof Array){
+for(var i=0;i<_2.ucfirst.length;i++){
+var _b=_1[_2.ucfirst[i]];
+if(_8("type",_b)||_b.type!="text"&&_b.type!="textarea"&&_b.type!="password"){
+continue;
+}
+_b.value=_b.value.replace(/\b\w+\b/g,function(_c){
+return _c.substring(0,1).toUpperCase()+_c.substring(1).toLowerCase();
+});
+}
+}
+if(_2.digit instanceof Array){
+for(var i=0;i<_2.digit.length;i++){
+var _b=_1[_2.digit[i]];
+if(_8("type",_b)||_b.type!="text"&&_b.type!="textarea"&&_b.type!="password"){
+continue;
+}
+_b.value=_b.value.replace(/\D/g,"");
+}
+}
+if(_2.required instanceof Array){
+for(var i=0;i<_2.required.length;i++){
+if(!dojo.isString(_2.required[i])){
+continue;
+}
+var _b=_1[_2.required[i]];
+if(!_8("type",_b)&&(_b.type=="text"||_b.type=="textarea"||_b.type=="password"||_b.type=="file")&&/^\s*$/.test(_b.value)){
+_3[_3.length]=_b.name;
+}else{
+if(!_8("type",_b)&&(_b.type=="select-one"||_b.type=="select-multiple")&&(_b.selectedIndex==-1||/^\s*$/.test(_b.options[_b.selectedIndex].value))){
+_3[_3.length]=_b.name;
+}else{
+if(_b instanceof Array){
+var _d=false;
+for(var j=0;j<_b.length;j++){
+if(_b[j].checked){
+_d=true;
+}
+}
+if(!_d){
+_3[_3.length]=_b[0].name;
+}
+}
+}
+}
+}
+}
+if(_2.required instanceof Array){
+for(var i=0;i<_2.required.length;i++){
+if(!dojo.isObject(_2.required[i])){
+continue;
+}
+var _b,_e;
+for(var _f in _2.required[i]){
+_b=_1[_f];
+_e=_2.required[i][_f];
+}
+if(_b instanceof Array){
+var _d=0;
+for(var j=0;j<_b.length;j++){
+if(_b[j].checked){
+_d++;
+}
+}
+if(_d<_e){
+_3[_3.length]=_b[0].name;
}
-
+}else{
+if(!_8("type",_b)&&_b.type=="select-multiple"){
+var _10=0;
+for(var j=0;j<_b.options.length;j++){
+if(_b.options[j].selected&&!/^\s*$/.test(_b.options[j].value)){
+_10++;
+}
+}
+if(_10<_e){
+_3[_3.length]=_b.name;
+}
+}
+}
+}
+}
+if(dojo.isObject(_2.dependencies)){
+for(_f in _2.dependencies){
+var _b=_1[_f];
+if(_8("type",_b)){
+continue;
+}
+if(_b.type!="text"&&_b.type!="textarea"&&_b.type!="password"){
+continue;
+}
+if(/\S+/.test(_b.value)){
+continue;
+}
+if(_5.isMissing(_b.name)){
+continue;
+}
+var _11=_1[_2.dependencies[_f]];
+if(_11.type!="text"&&_11.type!="textarea"&&_11.type!="password"){
+continue;
+}
+if(/^\s*$/.test(_11.value)){
+continue;
+}
+_3[_3.length]=_b.name;
+}
+}
+if(dojo.isObject(_2.constraints)){
+for(_f in _2.constraints){
+var _b=_1[_f];
+if(!_b){
+continue;
}
+if(!_8("tagName",_b)&&(_b.tagName.toLowerCase().indexOf("input")>=0||_b.tagName.toLowerCase().indexOf("textarea")>=0)&&/^\s*$/.test(_b.value)){
+continue;
+}
+var _12=true;
+if(dojo.isFunction(_2.constraints[_f])){
+_12=_2.constraints[_f](_b.value);
+}else{
+if(dojo.isArray(_2.constraints[_f])){
+if(dojo.isArray(_2.constraints[_f][0])){
+for(var i=0;i<_2.constraints[_f].length;i++){
+_12=dojox.validate.evaluateConstraint(_2,_2.constraints[_f][i],_f,_b);
+if(!_12){
+break;
+}
+}
+}else{
+_12=dojox.validate.evaluateConstraint(_2,_2.constraints[_f],_f,_b);
+}
+}
+}
+if(!_12){
+_4[_4.length]=_b.name;
+}
+}
+}
+if(dojo.isObject(_2.confirm)){
+for(_f in _2.confirm){
+var _b=_1[_f];
+var _11=_1[_2.confirm[_f]];
+if(_8("type",_b)||_8("type",_11)||(_b.type!="text"&&_b.type!="textarea"&&_b.type!="password")||(_11.type!=_b.type)||(_11.value==_b.value)||(_5.isInvalid(_b.name))||(/^\s*$/.test(_11.value))){
+continue;
+}
+_4[_4.length]=_b.name;
+}
+}
+return _5;
+};
+dojox.validate.evaluateConstraint=function(_13,_14,_15,_16){
+var _17=_14[0];
+var _18=_14.slice(1);
+_18.unshift(_16.value);
+if(typeof _17!="undefined"){
+return _17.apply(null,_18);
+}
+return false;
+};
+}
diff --git a/js/dojo/dojox/validate/creditCard.js b/js/dojo/dojox/validate/creditCard.js
--- a/js/dojo/dojox/validate/creditCard.js
+++ b/js/dojo/dojox/validate/creditCard.js
@@ -1,95 +1,48 @@
-if(!dojo._hasResource["dojox.validate.creditCard"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.validate.creditCard"] = true;
-dojo.provide("dojox.validate.creditCard");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.require("dojox.validate._base");
-/*
- Validates Credit Cards using account number rules in conjunction with the Luhn algorigthm
-
- */
-
-dojox.validate.isValidCreditCard = function(/*String|Int*/value, /*String*/ccType){
- //Summary:
- // checks if type matches the # scheme, and if Luhn checksum is accurate (unless its an Enroute card, the checkSum is skipped)
-
- //Value: Boolean
- if(value&&ccType&&((ccType.toLowerCase()=='er'||dojox.validate.isValidLuhn(value))&&(dojox.validate.isValidCreditCardNumber(value,ccType.toLowerCase())))){
- return true; //Boolean
- }
- return false; //Boolean
+if(!dojo._hasResource["dojox.validate.creditCard"]){
+dojo._hasResource["dojox.validate.creditCard"]=true;
+dojo.provide("dojox.validate.creditCard");
+dojo.require("dojox.validate._base");
+dojox.validate._cardInfo={"mc":"5[1-5][0-9]{14}","ec":"5[1-5][0-9]{14}","vi":"4(?:[0-9]{12}|[0-9]{15})","ax":"3[47][0-9]{13}","dc":"3(?:0[0-5][0-9]{11}|[68][0-9]{12})","bl":"3(?:0[0-5][0-9]{11}|[68][0-9]{12})","di":"6011[0-9]{12}","jcb":"(?:3[0-9]{15}|(2131|1800)[0-9]{11})","er":"2(?:014|149)[0-9]{11}"};
+dojox.validate.isValidCreditCard=function(_1,_2){
+return ((_2.toLowerCase()=="er"||dojox.validate.isValidLuhn(_1))&&dojox.validate.isValidCreditCardNumber(_1,_2.toLowerCase()));
+};
+dojox.validate.isValidCreditCardNumber=function(_3,_4){
+_3=String(_3).replace(/[- ]/g,"");
+var _5=dojox.validate._cardInfo,_6=[];
+if(_4){
+var _7=_5[_4.toLowerCase()];
+return _7?!!_3.match(_7):false;
}
-dojox.validate.isValidCreditCardNumber = function(/*String|Int*/value,/*String?*/ccType) {
- //Summary:
- // checks if the # matches the pattern for that card or any card types if none is specified
- // value == CC #, white spaces and dashes are ignored
- // ccType is of the values in cardinfo -- if Omitted it it returns a | delimited string of matching card types, or false if no matches found
-
- //Value: Boolean
-
- if(typeof value!='string'){
- value = String(value);
- }
- value = value.replace(/[- ]/g,''); //ignore dashes and whitespaces
- /* FIXME: not sure on all the abbreviations for credit cards,below is what each stands for atleast to my knowledge
- mc: Mastercard
- ec: Eurocard
- vi: Visa
- ax: American Express
- dc: Diners Club
- bl: Carte Blanch
- di: Discover
- jcb: JCB
- er: Enroute
- */
- var results=[];
- var cardinfo = {
- 'mc':'5[1-5][0-9]{14}','ec':'5[1-5][0-9]{14}','vi':'4([0-9]{12}|[0-9]{15})',
- 'ax':'3[47][0-9]{13}', 'dc':'3(0[0-5][0-9]{11}|[68][0-9]{12})',
- 'bl':'3(0[0-5][0-9]{11}|[68][0-9]{12})','di':'6011[0-9]{12}',
- 'jcb':'(3[0-9]{15}|(2131|1800)[0-9]{11})','er':'2(014|149)[0-9]{11}'
- };
- if(ccType&&dojo.indexOf(cardinfo,ccType.toLowerCase())){
- return Boolean(value.match(cardinfo[ccType.toLowerCase()])); // boolean
- }else{
- for(var p in cardinfo){
- if(value.match('^'+cardinfo[p]+'$')!=null){
- results.push(p);
- }
- }
- return (results.length)?results.join('|'):false; // string | boolean
- }
+for(var p in _5){
+if(_3.match("^"+_5[p]+"$")){
+_6.push(p);
+}
+}
+return _6.length?_6.join("|"):false;
+};
+dojox.validate.isValidCvv=function(_8,_9){
+if(!dojo.isString(_8)){
+_8=String(_8);
}
-
-dojox.validate.isValidCvv = function(/*String|Int*/value, /*String*/ccType) {
- //Summary:
- // returns true if the security code (CCV) matches the correct format for supplied ccType
-
- //Value: Boolean
-
- if(typeof value!='string'){
- value=String(value);
- }
- var format;
- switch (ccType.toLowerCase()){
- case 'mc':
- case 'ec':
- case 'vi':
- case 'di':
- format = '###';
- break;
- case 'ax':
- format = '####';
- break;
- default:
- return false; //Boolean
- }
- var flags = {format:format};
- //FIXME? Why does isNumberFormat take an object for flags when its only parameter is either a string or an array inside the object?
- if ((value.length == format.length)&&(dojox.validate.isNumberFormat(value, flags))){
- return true; //Boolean
- }
- return false; //Boolean
+var _a;
+switch(_9.toLowerCase()){
+case "mc":
+case "ec":
+case "vi":
+case "di":
+_a="###";
+break;
+case "ax":
+_a="####";
+break;
}
-
+return !!_a&&_8.length&&dojox.validate.isNumberFormat(_8,{format:_a});
+};
}
diff --git a/js/dojo/dojox/validate/isbn.js b/js/dojo/dojox/validate/isbn.js
--- a/js/dojo/dojox/validate/isbn.js
+++ b/js/dojo/dojox/validate/isbn.js
@@ -1,37 +1,40 @@
-if(!dojo._hasResource["dojox.validate.isbn"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.validate.isbn"] = true;
-dojo.provide("dojox.validate.isbn");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
-dojox.validate.isValidIsbn = function(/* String */value) {
- // summary: Vadlidate ISBN-10 or ISBN-13 based on the length of value
- // returns: Boolean
- var len, sum, weight;
- if(typeof value!='string'){
- value = String(value);
- }
- value = value.replace(/[- ]/g,''); //ignore dashes and whitespaces
- len = value.length;
- sum = 0;
- if(len == 10){
- weight = 10;
- // ISBN-10 validation algorithm
- for(var i = 0; i< 9; i++){
- sum += parseInt(value.charAt(i)) * weight;
- weight --;
- }
- var t = value.charAt(9).toUpperCase();
- sum += t == 'X' ? 10 : parseInt(t);
- return sum % 11 == 0;
- }else if(len == 13) {
- weight = -1;
- for(var i=0; i< len; i++){
- sum += parseInt(value.charAt(i)) * (2 + weight);
- weight *= -1;
- }
- return sum % 10 == 0;
- }else{
- return false;
- }
+if(!dojo._hasResource["dojox.validate.isbn"]){
+dojo._hasResource["dojox.validate.isbn"]=true;
+dojo.provide("dojox.validate.isbn");
+dojox.validate.isValidIsbn=function(_1){
+var _2,_3=0,_4;
+if(!dojo.isString(_1)){
+_1=String(_1);
+}
+_1=_1.replace(/[- ]/g,"");
+_2=_1.length;
+switch(_2){
+case 10:
+_4=_2;
+for(var i=0;i<9;i++){
+_3+=parseInt(_1.charAt(i))*_4;
+_4--;
}
-
+var t=_1.charAt(9).toUpperCase();
+_3+=t=="X"?10:parseInt(t);
+return _3%11==0;
+break;
+case 13:
+_4=-1;
+for(var i=0;i<_2;i++){
+_3+=parseInt(_1.charAt(i))*(2+_4);
+_4*=-1;
}
+return _3%10==0;
+break;
+}
+return false;
+};
+}
diff --git a/js/dojo/dojox/validate/regexp.js b/js/dojo/dojox/validate/regexp.js
--- a/js/dojo/dojox/validate/regexp.js
+++ b/js/dojo/dojox/validate/regexp.js
@@ -1,329 +1,164 @@
-if(!dojo._hasResource["dojox.validate.regexp"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.validate.regexp"] = true;
-dojo.provide("dojox.validate.regexp");
-
-dojo.require("dojo.regexp");
-
-// *** Regular Expression Generator does not entirely live here ***
-// FIXME: is this useful enough to be in /dojox/regexp/_base.js, or
-// should it respect namespace and be dojox.validate.regexp?
-// some say a generic regexp to match zipcodes and urls would be useful
-// others would say it's a spare tire.
-dojox.regexp = { ca: {}, us: {} };
-
-dojox.regexp.tld = function(/*Object?*/flags){
- // summary: Builds a RE that matches a top-level domain
- //
- // flags:
- // flags.allowCC Include 2 letter country code domains. Default is true.
- // flags.allowGeneric Include the generic domains. Default is true.
- // flags.allowInfra Include infrastructure domains. Default is true.
-
- // assign default values to missing paramters
- flags = (typeof flags == "object") ? flags : {};
- if(typeof flags.allowCC != "boolean"){ flags.allowCC = true; }
- if(typeof flags.allowInfra != "boolean"){ flags.allowInfra = true; }
- if(typeof flags.allowGeneric != "boolean"){ flags.allowGeneric = true; }
-
- // Infrastructure top-level domain - only one at present
- var infraRE = "arpa";
-
- // Generic top-level domains RE.
- var genericRE =
- "aero|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|xxx|jobs|mobi|post";
-
- // Country Code top-level domains RE
- var ccRE =
- "ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|" +
- "bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|" +
- "ec|ee|eg|er|eu|es|et|fi|fj|fk|fm|fo|fr|ga|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|"
- +
- "gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kr|kw|ky|kz|" +
- "la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|" +
- "my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|" +
- "re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sk|sl|sm|sn|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|" +
- "tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw";
-
- // Build top-level domain RE
- var a = [];
- if(flags.allowInfra){ a.push(infraRE); }
- if(flags.allowGeneric){ a.push(genericRE); }
- if(flags.allowCC){ a.push(ccRE); }
-
- var tldRE = "";
- if (a.length > 0) {
- tldRE = "(" + a.join("|") + ")";
- }
-
- return tldRE; // String
-}
-
-dojox.regexp.ipAddress = function(/*Object?*/flags){
- // summary: Builds a RE that matches an IP Address
- //
- // description:
- // Supports 5 formats for IPv4: dotted decimal, dotted hex, dotted octal, decimal and hexadecimal.
- // Supports 2 formats for Ipv6.
- //
- // flags An object. All flags are boolean with default = true.
- // flags.allowDottedDecimal Example, 207.142.131.235. No zero padding.
- // flags.allowDottedHex Example, 0x18.0x11.0x9b.0x28. Case insensitive. Zero padding allowed.
- // flags.allowDottedOctal Example, 0030.0021.0233.0050. Zero padding allowed.
- // flags.allowDecimal Example, 3482223595. A decimal number between 0-4294967295.
- // flags.allowHex Example, 0xCF8E83EB. Hexadecimal number between 0x0-0xFFFFFFFF.
- // Case insensitive. Zero padding allowed.
- // flags.allowIPv6 IPv6 address written as eight groups of four hexadecimal digits.
- // FIXME: ipv6 can be written multiple ways IIRC
- // flags.allowHybrid IPv6 address written as six groups of four hexadecimal digits
- // followed by the usual 4 dotted decimal digit notation of IPv4. x:x:x:x:x:x:d.d.d.d
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // assign default values to missing paramters
- flags = (typeof flags == "object") ? flags : {};
- if(typeof flags.allowDottedDecimal != "boolean"){ flags.allowDottedDecimal = true; }
- if(typeof flags.allowDottedHex != "boolean"){ flags.allowDottedHex = true; }
- if(typeof flags.allowDottedOctal != "boolean"){ flags.allowDottedOctal = true; }
- if(typeof flags.allowDecimal != "boolean"){ flags.allowDecimal = true; }
- if(typeof flags.allowHex != "boolean"){ flags.allowHex = true; }
- if(typeof flags.allowIPv6 != "boolean"){ flags.allowIPv6 = true; }
- if(typeof flags.allowHybrid != "boolean"){ flags.allowHybrid = true; }
-
- // decimal-dotted IP address RE.
- var dottedDecimalRE =
- // Each number is between 0-255. Zero padding is not allowed.
- "((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";
-
- // dotted hex IP address RE. Each number is between 0x0-0xff. Zero padding is allowed, e.g. 0x00.
- var dottedHexRE = "(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]";
-
- // dotted octal IP address RE. Each number is between 0000-0377.
- // Zero padding is allowed, but each number must have at least 4 characters.
- var dottedOctalRE = "(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]";
-
- // decimal IP address RE. A decimal number between 0-4294967295.
- var decimalRE = "(0|[1-9]\\d{0,8}|[1-3]\\d{9}|4[01]\\d{8}|42[0-8]\\d{7}|429[0-3]\\d{6}|" +
- "4294[0-8]\\d{5}|42949[0-5]\\d{4}|429496[0-6]\\d{3}|4294967[01]\\d{2}|42949672[0-8]\\d|429496729[0-5])";
-
- // hexadecimal IP address RE.
- // A hexadecimal number between 0x0-0xFFFFFFFF. Case insensitive. Zero padding is allowed.
- var hexRE = "0[xX]0*[\\da-fA-F]{1,8}";
-
- // IPv6 address RE.
- // The format is written as eight groups of four hexadecimal digits, x:x:x:x:x:x:x:x,
- // where x is between 0000-ffff. Zero padding is optional. Case insensitive.
- var ipv6RE = "([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}";
-
- // IPv6/IPv4 Hybrid address RE.
- // The format is written as six groups of four hexadecimal digits,
- // followed by the 4 dotted decimal IPv4 format. x:x:x:x:x:x:d.d.d.d
- var hybridRE = "([\\da-fA-F]{1,4}\\:){6}" +
- "((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";
-
- // Build IP Address RE
- var a = [];
- if(flags.allowDottedDecimal){ a.push(dottedDecimalRE); }
- if(flags.allowDottedHex){ a.push(dottedHexRE); }
- if(flags.allowDottedOctal){ a.push(dottedOctalRE); }
- if(flags.allowDecimal){ a.push(decimalRE); }
- if(flags.allowHex){ a.push(hexRE); }
- if(flags.allowIPv6){ a.push(ipv6RE); }
- if(flags.allowHybrid){ a.push(hybridRE); }
-
- var ipAddressRE = "";
- if(a.length > 0){
- ipAddressRE = "(" + a.join("|") + ")";
- }
- return ipAddressRE; // String
-}
-
-dojox.regexp.host = function(/*Object?*/flags){
- // summary: Builds a RE that matches a host
- // description: A host is a domain name or an IP address, possibly followed by a port number.
- // flags: An object.
- // flags.allowIP Allow an IP address for hostname. Default is true.
- // flags.allowLocal Allow the host to be "localhost". Default is false.
- // flags.allowPort Allow a port number to be present. Default is true.
- // flags in regexp.ipAddress can be applied.
- // flags in regexp.tld can be applied.
-
- // assign default values to missing paramters
- flags = (typeof flags == "object") ? flags : {};
- if(typeof flags.allowIP != "boolean"){ flags.allowIP = true; }
- if(typeof flags.allowLocal != "boolean"){ flags.allowLocal = false; }
- if(typeof flags.allowPort != "boolean"){ flags.allowPort = true; }
-
- // Domain names can not end with a dash.
- var domainNameRE = "([0-9a-zA-Z]([-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?\\.)+" + dojox.regexp.tld(flags);
-
- // port number RE
- var portRE = ( flags.allowPort ) ? "(\\:" + dojox.regexp.integer({signed: false}) + ")?" : "";
-
- // build host RE
- var hostNameRE = domainNameRE;
- if(flags.allowIP){ hostNameRE += "|" + dojox.regexp.ipAddress(flags); }
- if(flags.allowLocal){ hostNameRE += "|localhost"; }
- return "(" + hostNameRE + ")" + portRE; // String
+if(!dojo._hasResource["dojox.validate.regexp"]){
+dojo._hasResource["dojox.validate.regexp"]=true;
+dojo.provide("dojox.validate.regexp");
+dojo.require("dojo.regexp");
+dojo.mixin(dojox.validate.regexp,{ipAddress:function(_1){
+_1=(typeof _1=="object")?_1:{};
+if(typeof _1.allowDottedDecimal!="boolean"){
+_1.allowDottedDecimal=true;
+}
+if(typeof _1.allowDottedHex!="boolean"){
+_1.allowDottedHex=true;
}
-
-dojox.regexp.url = function(/*Object?*/flags){
- // summary: Builds a regular expression that matches a URL
- //
- // flags: An object
- // flags.scheme Can be true, false, or [true, false].
- // This means: required, not allowed, or match either one.
- // flags in regexp.host can be applied.
- // flags in regexp.ipAddress can be applied.
- // flags in regexp.tld can be applied.
-
- // assign default values to missing paramters
- flags = (typeof flags == "object") ? flags : {};
- if(typeof flags.scheme == "undefined"){ flags.scheme = [true, false]; }
-
- // Scheme RE
- var protocolRE = dojo.regexp.buildGroupRE(flags.scheme,
- function(q){ if(q){ return "(https?|ftps?)\\://"; } return ""; }
- );
-
- // Path and query and anchor RE
- var pathRE = "(/([^?#\\s/]+/)*)?([^?#\\s/]+(\\?[^?#\\s/]*)?(#[A-Za-z][\\w.:-]*)?)?";
-
- return protocolRE + dojox.regexp.host(flags) + pathRE;
+if(typeof _1.allowDottedOctal!="boolean"){
+_1.allowDottedOctal=true;
+}
+if(typeof _1.allowDecimal!="boolean"){
+_1.allowDecimal=true;
+}
+if(typeof _1.allowHex!="boolean"){
+_1.allowHex=true;
+}
+if(typeof _1.allowIPv6!="boolean"){
+_1.allowIPv6=true;
+}
+if(typeof _1.allowHybrid!="boolean"){
+_1.allowHybrid=true;
}
-
-dojox.regexp.emailAddress = function(/*Object?*/flags){
-
- // summary: Builds a regular expression that matches an email address
- //
- //flags: An object
- // flags.allowCruft Allow address like <mailto:foo@yahoo.com>. Default is false.
- // flags in regexp.host can be applied.
- // flags in regexp.ipAddress can be applied.
- // flags in regexp.tld can be applied.
-
- // assign default values to missing paramters
- flags = (typeof flags == "object") ? flags : {};
- if (typeof flags.allowCruft != "boolean") { flags.allowCruft = false; }
- flags.allowPort = false; // invalid in email addresses
-
- // user name RE - apostrophes are valid if there's not 2 in a row
- var usernameRE = "([\\da-zA-Z]+[-._+&'])*[\\da-zA-Z]+";
-
- // build emailAddress RE
- var emailAddressRE = usernameRE + "@" + dojox.regexp.host(flags);
-
- // Allow email addresses with cruft
- if ( flags.allowCruft ) {
- emailAddressRE = "<?(mailto\\:)?" + emailAddressRE + ">?";
- }
-
- return emailAddressRE; // String
+var _2="((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";
+var _3="(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]";
+var _4="(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]";
+var _5="(0|[1-9]\\d{0,8}|[1-3]\\d{9}|4[01]\\d{8}|42[0-8]\\d{7}|429[0-3]\\d{6}|"+"4294[0-8]\\d{5}|42949[0-5]\\d{4}|429496[0-6]\\d{3}|4294967[01]\\d{2}|42949672[0-8]\\d|429496729[0-5])";
+var _6="0[xX]0*[\\da-fA-F]{1,8}";
+var _7="([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}";
+var _8="([\\da-fA-F]{1,4}\\:){6}"+"((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";
+var a=[];
+if(_1.allowDottedDecimal){
+a.push(_2);
+}
+if(_1.allowDottedHex){
+a.push(_3);
+}
+if(_1.allowDottedOctal){
+a.push(_4);
+}
+if(_1.allowDecimal){
+a.push(_5);
+}
+if(_1.allowHex){
+a.push(_6);
}
-
-dojox.regexp.emailAddressList = function(/*Object?*/flags){
- // summary: Builds a regular expression that matches a list of email addresses.
- //
- // flags: An object.
- // flags.listSeparator The character used to separate email addresses. Default is ";", ",", "\n" or " ".
- // flags in regexp.emailAddress can be applied.
- // flags in regexp.host can be applied.
- // flags in regexp.ipAddress can be applied.
- // flags in regexp.tld can be applied.
-
- // assign default values to missing paramters
- flags = (typeof flags == "object") ? flags : {};
- if(typeof flags.listSeparator != "string"){ flags.listSeparator = "\\s;,"; }
-
- // build a RE for an Email Address List
- var emailAddressRE = dojox.regexp.emailAddress(flags);
- var emailAddressListRE = "(" + emailAddressRE + "\\s*[" + flags.listSeparator + "]\\s*)*" +
- emailAddressRE + "\\s*[" + flags.listSeparator + "]?\\s*";
-
- return emailAddressListRE; // String
+if(_1.allowIPv6){
+a.push(_7);
+}
+if(_1.allowHybrid){
+a.push(_8);
+}
+var _9="";
+if(a.length>0){
+_9="("+a.join("|")+")";
+}
+return _9;
+},host:function(_a){
+_a=(typeof _a=="object")?_a:{};
+if(typeof _a.allowIP!="boolean"){
+_a.allowIP=true;
+}
+if(typeof _a.allowLocal!="boolean"){
+_a.allowLocal=false;
+}
+if(typeof _a.allowPort!="boolean"){
+_a.allowPort=true;
+}
+if(typeof _a.allowNamed!="boolean"){
+_a.allowNamed=false;
}
-
-dojox.regexp.us.state = function(/*Object?*/flags){
- // summary: A regular expression to match US state and territory abbreviations
- //
- // flags An object.
- // flags.allowTerritories Allow Guam, Puerto Rico, etc. Default is true.
- // flags.allowMilitary Allow military 'states', e.g. Armed Forces Europe (AE). Default is true.
-
- // assign default values to missing paramters
- flags = (typeof flags == "object") ? flags : {};
- if(typeof flags.allowTerritories != "boolean"){ flags.allowTerritories = true; }
- if(typeof flags.allowMilitary != "boolean"){ flags.allowMilitary = true; }
-
- // state RE
- var statesRE =
- "AL|AK|AZ|AR|CA|CO|CT|DE|DC|FL|GA|HI|ID|IL|IN|IA|KS|KY|LA|ME|MD|MA|MI|MN|MS|MO|MT|" +
- "NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VT|VA|WA|WV|WI|WY";
-
- // territories RE
- var territoriesRE = "AS|FM|GU|MH|MP|PW|PR|VI";
-
- // military states RE
- var militaryRE = "AA|AE|AP";
-
- // Build states and territories RE
- if(flags.allowTerritories){ statesRE += "|" + territoriesRE; }
- if(flags.allowMilitary){ statesRE += "|" + militaryRE; }
-
- return "(" + statesRE + ")"; // String
+var _b="(?:[\\da-zA-Z](?:[-\\da-zA-Z]{0,61}[\\da-zA-Z])?)";
+var _c="(?:[a-zA-Z](?:[-\\da-zA-Z]{0,6}[\\da-zA-Z])?)";
+var _d=_a.allowPort?"(\\:\\d+)?":"";
+var _e="((?:"+_b+"\\.)+"+_c+"\\.?)";
+if(_a.allowIP){
+_e+="|"+dojox.validate.regexp.ipAddress(_a);
+}
+if(_a.allowLocal){
+_e+="|localhost";
+}
+if(_a.allowNamed){
+_e+="|^[^-][a-zA-Z0-9_-]*";
+}
+return "("+_e+")"+_d;
+},url:function(_f){
+_f=(typeof _f=="object")?_f:{};
+if(!("scheme" in _f)){
+_f.scheme=[true,false];
}
-
-dojox.regexp.ca.postalCode = function(){
- var postalRE =
- "[A-Z][0-9][A-Z] [0-9][A-Z][0-9]";
- return "(" + postalRE + ")";
+var _10=dojo.regexp.buildGroupRE(_f.scheme,function(q){
+if(q){
+return "(https?|ftps?)\\://";
}
-
-dojox.regexp.ca.province = function(){
- // summary: a regular expression to match Canadian Province Abbreviations
- var stateRE =
- "AB|BC|MB|NB|NL|NS|NT|NU|ON|PE|QC|SK|YT";
- return "(" + statesRE + ")";
+return "";
+});
+var _11="(/(?:[^?#\\s/]+/)*(?:[^?#\\s/]+(?:\\?[^?#\\s/]*)?(?:#[A-Za-z][\\w.:-]*)?)?)?";
+return _10+dojox.validate.regexp.host(_f)+_11;
+},emailAddress:function(_12){
+_12=(typeof _12=="object")?_12:{};
+if(typeof _12.allowCruft!="boolean"){
+_12.allowCruft=false;
+}
+_12.allowPort=false;
+var _13="([!#-'*+\\-\\/-9=?A-Z^-~]+[.])*[!#-'*+\\-\\/-9=?A-Z^-~]+";
+var _14=_13+"@"+dojox.validate.regexp.host(_12);
+if(_12.allowCruft){
+_14="<?(mailto\\:)?"+_14+">?";
}
-
-dojox.regexp.numberFormat = function(/*Object?*/flags){
- // summary: Builds a regular expression to match any sort of number based format
- // description:
- // Use this method for phone numbers, social security numbers, zip-codes, etc.
- // The RE can match one format or one of multiple formats.
- //
- // Format
- // # Stands for a digit, 0-9.
- // ? Stands for an optional digit, 0-9 or nothing.
- // All other characters must appear literally in the expression.
- //
- // Example
- // "(###) ###-####" -> (510) 542-9742
- // "(###) ###-#### x#???" -> (510) 542-9742 x153
- // "###-##-####" -> 506-82-1089 i.e. social security number
- // "#####-####" -> 98225-1649 i.e. zip code
- //
- // flags: An object
- // flags.format A string or an Array of strings for multiple formats.
-
- // assign default values to missing paramters
- flags = (typeof flags == "object") ? flags : {};
- if(typeof flags.format == "undefined"){ flags.format = "###-###-####"; }
-
- // Converts a number format to RE.
- var digitRE = function(format){
- // escape all special characters, except '?'
- format = dojo.regexp.escapeString(format, "?");
-
- // Now replace '?' with Regular Expression
- format = format.replace(/\?/g, "\\d?");
-
- // replace # with Regular Expression
- format = format.replace(/#/g, "\\d");
-
- return format; // String
- };
-
- // build RE for multiple number formats
- return dojo.regexp.buildGroupRE(flags.format, digitRE); //String
+return _14;
+},emailAddressList:function(_15){
+_15=(typeof _15=="object")?_15:{};
+if(typeof _15.listSeparator!="string"){
+_15.listSeparator="\\s;,";
+}
+var _16=dojox.validate.regexp.emailAddress(_15);
+var _17="("+_16+"\\s*["+_15.listSeparator+"]\\s*)*"+_16+"\\s*["+_15.listSeparator+"]?\\s*";
+return _17;
+},numberFormat:function(_18){
+_18=(typeof _18=="object")?_18:{};
+if(typeof _18.format=="undefined"){
+_18.format="###-###-####";
}
-
+var _19=function(_1a){
+return dojo.regexp.escapeString(_1a,"?").replace(/\?/g,"\\d?").replace(/#/g,"\\d");
+};
+return dojo.regexp.buildGroupRE(_18.format,_19);
+}});
+dojox.validate.regexp.ca={postalCode:function(){
+return "([A-Z][0-9][A-Z] [0-9][A-Z][0-9])";
+},province:function(){
+return "(AB|BC|MB|NB|NL|NS|NT|NU|ON|PE|QC|SK|YT)";
+}};
+dojox.validate.regexp.us={state:function(_1b){
+_1b=(typeof _1b=="object")?_1b:{};
+if(typeof _1b.allowTerritories!="boolean"){
+_1b.allowTerritories=true;
}
+if(typeof _1b.allowMilitary!="boolean"){
+_1b.allowMilitary=true;
+}
+var _1c="AL|AK|AZ|AR|CA|CO|CT|DE|DC|FL|GA|HI|ID|IL|IN|IA|KS|KY|LA|ME|MD|MA|MI|MN|MS|MO|MT|"+"NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VT|VA|WA|WV|WI|WY";
+var _1d="AS|FM|GU|MH|MP|PW|PR|VI";
+var _1e="AA|AE|AP";
+if(_1b.allowTerritories){
+_1c+="|"+_1d;
+}
+if(_1b.allowMilitary){
+_1c+="|"+_1e;
+}
+return "("+_1c+")";
+}};
+}
diff --git a/js/dojo/dojox/validate/us.js b/js/dojo/dojox/validate/us.js
--- a/js/dojo/dojox/validate/us.js
+++ b/js/dojo/dojox/validate/us.js
@@ -1,67 +1,28 @@
-if(!dojo._hasResource["dojox.validate.us"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.validate.us"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.validate.us"]){
+dojo._hasResource["dojox.validate.us"]=true;
dojo.provide("dojox.validate.us");
dojo.require("dojox.validate._base");
-
-dojox.validate.us.isState = function(/*String*/value, /*Object?*/flags){
- // summary: Validates US state and territory abbreviations.
- //
- // value: A two character string
- // flags: An object
- // flags.allowTerritories Allow Guam, Puerto Rico, etc. Default is true.
- // flags.allowMilitary Allow military 'states', e.g. Armed Forces Europe (AE). Default is true.
-
- var re = new RegExp("^" + dojox.regexp.us.state(flags) + "$", "i");
- return re.test(value); // Boolean
+dojox.validate.us.isState=function(_1,_2){
+var re=new RegExp("^"+dojox.validate.regexp.us.state(_2)+"$","i");
+return re.test(_1);
+};
+dojox.validate.us.isPhoneNumber=function(_3){
+var _4={format:["###-###-####","(###) ###-####","(###) ### ####","###.###.####","###/###-####","### ### ####","###-###-#### x#???","(###) ###-#### x#???","(###) ### #### x#???","###.###.#### x#???","###/###-#### x#???","### ### #### x#???","##########"]};
+return dojox.validate.isNumberFormat(_3,_4);
+};
+dojox.validate.us.isSocialSecurityNumber=function(_5){
+var _6={format:["###-##-####","### ## ####","#########"]};
+return dojox.validate.isNumberFormat(_5,_6);
+};
+dojox.validate.us.isZipCode=function(_7){
+var _8={format:["#####-####","##### ####","#########","#####"]};
+return dojox.validate.isNumberFormat(_7,_8);
+};
}
-
-dojox.validate.us.isPhoneNumber = function(/*String*/value){
- // summary: Validates 10 US digit phone number for several common formats
- // value: The telephone number string
-
- var flags = {
- format: [
- "###-###-####",
- "(###) ###-####",
- "(###) ### ####",
- "###.###.####",
- "###/###-####",
- "### ### ####",
- "###-###-#### x#???",
- "(###) ###-#### x#???",
- "(###) ### #### x#???",
- "###.###.#### x#???",
- "###/###-#### x#???",
- "### ### #### x#???",
- "##########"
- ]
- };
- return dojox.validate.isNumberFormat(value, flags); // Boolean
-}
-
-dojox.validate.us.isSocialSecurityNumber = function(/*String*/value){
- // summary: Validates social security number
- var flags = {
- format: [
- "###-##-####",
- "### ## ####",
- "#########"
- ]
- };
- return dojox.validate.isNumberFormat(value, flags); // Boolean
-}
-
-dojox.validate.us.isZipCode = function(/*String*/value){
- // summary: Validates U.S. zip-code
- var flags = {
- format: [
- "#####-####",
- "##### ####",
- "#########",
- "#####"
- ]
- };
- return dojox.validate.isNumberFormat(value, flags); // Boolean
-}
-
-}
diff --git a/js/dojo/dojox/validate/web.js b/js/dojo/dojox/validate/web.js
--- a/js/dojo/dojox/validate/web.js
+++ b/js/dojo/dojox/validate/web.js
@@ -1,89 +1,40 @@
-if(!dojo._hasResource["dojox.validate.web"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.validate.web"] = true;
-dojo.provide("dojox.validate.web");
-dojo.require("dojox.validate._base");
-
-dojox.validate.isIpAddress = function(/*String*/value, /*Object?*/flags) {
- // summary: Validates an IP address
- //
- // description:
- // Supports 5 formats for IPv4: dotted decimal, dotted hex, dotted octal, decimal and hexadecimal.
- // Supports 2 formats for Ipv6.
- //
- // value A string.
- // flags An object. All flags are boolean with default = true.
- // flags.allowDottedDecimal Example, 207.142.131.235. No zero padding.
- // flags.allowDottedHex Example, 0x18.0x11.0x9b.0x28. Case insensitive. Zero padding allowed.
- // flags.allowDottedOctal Example, 0030.0021.0233.0050. Zero padding allowed.
- // flags.allowDecimal Example, 3482223595. A decimal number between 0-4294967295.
- // flags.allowHex Example, 0xCF8E83EB. Hexadecimal number between 0x0-0xFFFFFFFF.
- // Case insensitive. Zero padding allowed.
- // flags.allowIPv6 IPv6 address written as eight groups of four hexadecimal digits.
- // flags.allowHybrid IPv6 address written as six groups of four hexadecimal digits
- // followed by the usual 4 dotted decimal digit notation of IPv4. x:x:x:x:x:x:d.d.d.d
-
- var re = new RegExp("^" + dojox.regexp.ipAddress(flags) + "$", "i");
- return re.test(value); // Boolean
-}
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojox.validate.isUrl = function(/*String*/value, /*Object?*/flags) {
- // summary: Checks if a string could be a valid URL
- // value: A string
- // flags: An object
- // flags.scheme Can be true, false, or [true, false].
- // This means: required, not allowed, or either.
- // flags in regexp.host can be applied.
- // flags in regexp.ipAddress can be applied.
- // flags in regexp.tld can be applied.
-
- var re = new RegExp("^" + dojox.regexp.url(flags) + "$", "i");
- return re.test(value); // Boolean
-}
-
-dojox.validate.isEmailAddress = function(/*String*/value, /*Object?*/flags) {
- // summary: Checks if a string could be a valid email address
- //
- // value: A string
- // flags: An object
- // flags.allowCruft Allow address like <mailto:foo@yahoo.com>. Default is false.
- // flags in regexp.host can be applied.
- // flags in regexp.ipAddress can be applied.
- // flags in regexp.tld can be applied.
-
- var re = new RegExp("^" + dojox.regexp.emailAddress(flags) + "$", "i");
- return re.test(value); // Boolean
+if(!dojo._hasResource["dojox.validate.web"]){
+dojo._hasResource["dojox.validate.web"]=true;
+dojo.provide("dojox.validate.web");
+dojo.require("dojox.validate._base");
+dojox.validate.isIpAddress=function(_1,_2){
+var re=new RegExp("^"+dojox.validate.regexp.ipAddress(_2)+"$","i");
+return re.test(_1);
+};
+dojox.validate.isUrl=function(_3,_4){
+var re=new RegExp("^"+dojox.validate.regexp.url(_4)+"$","i");
+return re.test(_3);
+};
+dojox.validate.isEmailAddress=function(_5,_6){
+var re=new RegExp("^"+dojox.validate.regexp.emailAddress(_6)+"$","i");
+return re.test(_5);
+};
+dojox.validate.isEmailAddressList=function(_7,_8){
+var re=new RegExp("^"+dojox.validate.regexp.emailAddressList(_8)+"$","i");
+return re.test(_7);
+};
+dojox.validate.getEmailAddressList=function(_9,_a){
+if(!_a){
+_a={};
}
-
-dojox.validate.isEmailAddressList = function(/*String*/value, /*Object?*/flags) {
- // summary: Checks if a string could be a valid email address list.
- //
- // value A string.
- // flags An object.
- // flags.listSeparator The character used to separate email addresses. Default is ";", ",", "\n" or " ".
- // flags in regexp.emailAddress can be applied.
- // flags in regexp.host can be applied.
- // flags in regexp.ipAddress can be applied.
- // flags in regexp.tld can be applied.
-
- var re = new RegExp("^" + dojox.regexp.emailAddressList(flags) + "$", "i");
- return re.test(value); // Boolean
+if(!_a.listSeparator){
+_a.listSeparator="\\s;,";
}
-
-dojox.validate.getEmailAddressList = function(/*String*/value, /*Object?*/flags) {
- // summary: Check if value is an email address list. If an empty list
- // is returned, the value didn't pass the test or it was empty.
- //
- // value: A string
- // flags: An object (same as dojo.validate.isEmailAddressList)
-
- if(!flags) { flags = {}; }
- if(!flags.listSeparator) { flags.listSeparator = "\\s;,"; }
-
- if ( dojox.validate.isEmailAddressList(value, flags) ) {
- return value.split(new RegExp("\\s*[" + flags.listSeparator + "]\\s*")); // Array
- }
- return []; // Array
+if(dojox.validate.isEmailAddressList(_9,_a)){
+return _9.split(new RegExp("\\s*["+_a.listSeparator+"]\\s*"));
}
-
+return [];
+};
}
diff --git a/js/dojo/dojox/widget/ColorPicker.js b/js/dojo/dojox/widget/ColorPicker.js
--- a/js/dojo/dojox/widget/ColorPicker.js
+++ b/js/dojo/dojox/widget/ColorPicker.js
@@ -1,284 +1,175 @@
-if(!dojo._hasResource["dojox.widget.ColorPicker"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.widget.ColorPicker"] = true;
-dojo.provide("dojox.widget.ColorPicker");
-dojo.experimental("dojox.widget.ColorPicker"); // level: prototype
-
-dojo.require("dijit.form._FormWidget");
-dojo.require("dojo.dnd.move");
-dojo.require("dojo.fx");
-
-dojo.declare("dojox.widget.ColorPicker",
- dijit.form._FormWidget,
- {
- // summary: a HSV color picker - like PhotoShop
- //
- // description:
- // provides an interactive HSV ColorPicker similar to
- // PhotoShop's color selction tool. Will eventually
- // mixin FormWidget and be used as a suplement or a
- // 'more interactive' replacement for ColorPalette
- //
- // example:
- //
- // code:
- // var picker = new dojox.widget.ColorPicker({
- // // a couple of example toggles:
- // animatePoint:false,
- // showHsv: false,
- // webSafe: false,
- // showRgb: false
- // });
- //
- // markup:
- // <div dojoType="dojox.widget.ColorPicker"></div>
- //
-
- // showRgb: Boolean
- // show/update RGB input nodes
- showRgb: true,
-
- // showHsv: Boolean
- // show/update HSV input nodes
- showHsv: true,
-
- // showHex: Boolean
- // show/update Hex value field
- showHex: true,
-
- // webSafe: Boolean
- // deprecated? or just use a toggle to show/hide that node, too?
- webSafe: true,
-
- // animatePoint: Boolean
- // toggle to use slideTo (true) or just place the cursor (false) on click
- animatePoint: true,
-
- // slideDuration: Integer
- // time in ms picker node will slide to next location (non-dragging) when animatePoint=true
- slideDuration: 250,
-
- _underlay: dojo.moduleUrl("dojox.widget","ColorPicker/images/underlay.png"),
- templateString:"<div class=\"dojoxColorPicker\">\n\t<div class=\"dojoxColorPickerBox\">\n\t\t<div dojoAttachPoint=\"cursorNode\" class=\"dojoxColorPickerPoint\"></div>\n\t\t<img dojoAttachPoint=\"colorUnderlay\" dojoAttachEvent=\"onclick: _setPoint\" class=\"dojoxColorPickerUnderlay\" src=\"${_underlay}\">\n\t</div>\n\t<div class=\"dojoxHuePicker\">\n\t\t<div dojoAttachPoint=\"hueCursorNode\" class=\"dojoxHuePickerPoint\"></div>\n\t\t<div dojoAttachPoint=\"hueNode\" class=\"dojoxHuePickerUnderlay\" dojoAttachEvent=\"onclick: _setHuePoint\"></div>\n\t</div>\n\t<div dojoAttachPoint=\"previewNode\" class=\"dojoxColorPickerPreview\"></div>\n\t<div dojoAttachPoint=\"safePreviewNode\" class=\"dojoxColorPickerWebSafePreview\"></div>\n\t<div class=\"dojoxColorPickerOptional\">\n\t\t<div class=\"dijitInline dojoxColorPickerRgb\" dojoAttachPoint=\"rgbNode\">\n\t\t\t<table>\n\t\t\t<tr><td>r</td><td><input dojoAttachPoint=\"Rval\" size=\"1\"></td></tr>\n\t\t\t<tr><td>g</td><td><input dojoAttachPoint=\"Gval\" size=\"1\"></td></tr>\n\t\t\t<tr><td>b</td><td><input dojoAttachPoint=\"Bval\" size=\"1\"></td></tr>\n\t\t\t</table>\n\t\t</div>\n\t\t<div class=\"dijitInline dojoxColorPickerHsv\" dojoAttachPoint=\"hsvNode\">\n\t\t\t<table>\n\t\t\t<tr><td>h</td><td><input dojoAttachPoint=\"Hval\"size=\"1\"> &deg;</td></tr>\n\t\t\t<tr><td>s</td><td><input dojoAttachPoint=\"Sval\" size=\"1\"> %</td></tr>\n\t\t\t<tr><td>v</td><td><input dojoAttachPoint=\"Vval\" size=\"1\"> %</td></tr>\n\t\t\t</table>\n\t\t</div>\n\t\t<div class=\"dojoxColorPickerHex\" dojoAttachPoint=\"hexNode\">\t\n\t\t\thex: <input dojoAttachPoint=\"hexCode, focusNode\" size=\"6\" class=\"dojoxColorPickerHexCode\">\n\t\t</div>\n\t</div>\n</div>\n",
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- postCreate: function(){
- // summary: As quickly as we can, set up ie6 alpha-filter support for our
- // underlay. we don't do image handles (done in css), just the 'core'
- // of this widget: the underlay.
- if(dojo.isIE && dojo.isIE<7){
- this.colorUnderlay.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this._underlay+"', sizingMethod='scale')";
- this.colorUnderlay.src = dojo.moduleUrl("dojox.widget","FisheyeList/blank.gif").toString();
- }
- // hide toggle-able nodes:
- if (!this.showRgb){ this.rgbNode.style.display = "none"; }
- if (!this.showHsv){ this.hsvNode.style.display = "none"; }
- if (!this.showHex){ this.hexNode.style.display = "none"; }
- if (!this.webSafe){ this.safePreviewNode.style.display = "none"; }
- },
-
- startup: function(){
- // summary: defer all additional calls until we're started, and our
- // embeded sliders are loaded? (not implemented yet)
-
- // this._offset = ((dojo.marginBox(this.cursorNode).w)/2);
- this._offset = 0;
-
- this._mover = new dojo.dnd.Moveable(this.cursorNode, {
- mover: dojo.dnd.boxConstrainedMover({ t:0, l:0, w:150, h:150 })
- });
- this._hueMover = new dojo.dnd.Moveable(this.hueCursorNode, {
- mover: dojo.dnd.boxConstrainedMover({ t:0, l:0, w:0, h:150 })
- });
-
- // no dnd/move/move published ... use a timer:
- dojo.subscribe("/dnd/move/stop",dojo.hitch(this,"_clearTimer"));
- dojo.subscribe("/dnd/move/start",dojo.hitch(this,"_setTimer"));
-
- // ugly scaling calculator. need a XYslider badly
- this._sc = (1/dojo.coords(this.colorUnderlay).w);
- this._hueSc = (255/(dojo.coords(this.hueNode).h+this._offset));
-
- // initial color
- this._updateColor();
-
- },
-
- _setTimer: function(/* dojo.dnd.Mover */mover){
- this._timer = setInterval(dojo.hitch(this,"_updateColor"),45);
- },
- _clearTimer: function(/* dojo.dnd.Mover */mover){
- clearInterval(this._timer);
- this.onChange(this.value);
- },
-
- _setHue: function(/* Decimal */h){
- // summary: sets a natural color background for the
- // underlay image against closest hue value (full saturation)
- // h: 0..255
-
- // this is not a pretty conversion:
- var hue = dojo.colorFromArray(this._hsv2rgb(h,1,1,{ inputRange: 1 })).toHex();
- dojo.style(this.colorUnderlay,"backgroundColor",hue);
- },
-
- _updateColor: function(){
- // summary: update the previewNode color, and input values [optional]
- var h = Math.round((255+(this._offset))-((dojo.style(this.hueCursorNode,"top")+this._offset)*this._hueSc));
- var s = Math.round((dojo.style(this.cursorNode,"left")*this._sc)*100);
- var v = Math.round(100-(dojo.style(this.cursorNode,"top")*this._sc)*100);
-
- // limit hue calculations to only when it changes
- if(h != this._hue){ this._setHue(h); }
-
- var rgb = this._hsv2rgb(h,s/100,v/100,{ inputRange: 1 });
- var hex = (dojo.colorFromArray(rgb).toHex());
- this.previewNode.style.backgroundColor = hex;
- if(this.webSafe){ this.safePreviewNode.style.backgroundColor = hex; }
- if(this.showHex){ this.hexCode.value = hex; }
- if(this.showRgb){
- this.Rval.value = rgb[0];
- this.Gval.value = rgb[1];
- this.Bval.value = rgb[2];
- }
- if(this.showHsv){
- this.Hval.value = Math.round((h*360)/255); // convert to 0..360
- this.Sval.value = s;
- this.Vval.value = v;
- }
- this.value=hex;
-
- // anytime we muck with the color, fire onChange?
- if (!this._timer && !(arguments[1])){
- this.setValue(this.value);
- this.onChange(this.value);
- }
- },
-
- _setHuePoint: function(/* Event */evt){
- // summary: set the hue picker handle on relative y coordinates
- if(this.animatePoint){
- dojo.fx.slideTo({
- node: this.hueCursorNode,
- duration:this.slideDuration,
- top: evt.layerY,
- left: 0,
- onEnd: dojo.hitch(this,"_updateColor")
- }).play();
- }else{
- dojo.style(this.hueCursorNode,"top",(evt.layerY)+"px");
- this._updateColor(false);
- }
- },
-
- _setPoint: function(/* Event */evt){
- // summary: set our picker point based on relative x/y coordinates
- if(this.animatePoint){
- dojo.fx.slideTo({
- node: this.cursorNode,
- duration:this.slideDuration,
- top: evt.layerY-this._offset,
- left: evt.layerX-this._offset,
- onEnd: dojo.hitch(this,"_updateColor")
- }).play();
- }else{
- dojo.style(this.cursorNode,"left",(evt.layerX-this._offset)+"px");
- dojo.style(this.cursorNode,"top",(evt.layerY-this._offset)+"px");
- this._updateColor(false);
- }
- },
-
- // this ported directly from 0.4 dojo.gfx.colors.hsv, with bugs :)
- // FIXME: use ttrenka's HSB ?
- _hsv2rgb: function(/* int || Array */h, /* int */s, /* int */v, /* Object? */options){
- // summary
- // converts an HSV value set to RGB, ranges depending on optional options object.
- // patch for options by Matthew Eernisse
- if (dojo.isArray(h)) {
- if(s){
- options = s;
- }
- v = h[2] || 0;
- s = h[1] || 0;
- h = h[0] || 0;
- }
-
- var opt = {
- inputRange: (options && options.inputRange) ? options.inputRange : [255, 255, 255],
- outputRange: (options && options.outputRange) ? options.outputRange : 255
- };
-
- switch(opt.inputRange[0]) {
- // 0.0-1.0
- case 1: h = h * 360; break;
- // 0-100
- case 100: h = (h / 100) * 360; break;
- // 0-360
- case 360: h = h; break;
- // 0-255
- default: h = (h / 255) * 360;
- }
- if (h == 360){ h = 0;}
-
- // no need to alter if inputRange[1] = 1
- switch(opt.inputRange[1]){
- case 100: s /= 100; break;
- case 255: s /= 255;
- }
-
- // no need to alter if inputRange[1] = 1
- switch(opt.inputRange[2]){
- case 100: v /= 100; break;
- case 255: v /= 255;
- }
-
- var r = null;
- var g = null;
- var b = null;
-
- if (s == 0){
- // color is on black-and-white center line
- // achromatic: shades of gray
- r = v;
- g = v;
- b = v;
- }else{
- // chromatic color
- var hTemp = h / 60; // h is now IN [0,6]
- var i = Math.floor(hTemp); // largest integer <= h
- var f = hTemp - i; // fractional part of h
-
- var p = v * (1 - s);
- var q = v * (1 - (s * f));
- var t = v * (1 - (s * (1 - f)));
-
- switch(i){
- case 0: r = v; g = t; b = p; break;
- case 1: r = q; g = v; b = p; break;
- case 2: r = p; g = v; b = t; break;
- case 3: r = p; g = q; b = v; break;
- case 4: r = t; g = p; b = v; break;
- case 5: r = v; g = p; b = q; break;
- }
- }
-
- switch(opt.outputRange){
- case 1:
- r = dojo.math.round(r, 2);
- g = dojo.math.round(g, 2);
- b = dojo.math.round(b, 2);
- break;
- case 100:
- r = Math.round(r * 100);
- g = Math.round(g * 100);
- b = Math.round(b * 100);
- break;
- default:
- r = Math.round(r * 255);
- g = Math.round(g * 255);
- b = Math.round(b * 255);
- }
- return [r, g, b];
- }
-});
-
+if(!dojo._hasResource["dojox.widget.ColorPicker"]){
+dojo._hasResource["dojox.widget.ColorPicker"]=true;
+dojo.provide("dojox.widget.ColorPicker");
+dojo.experimental("dojox.widget.ColorPicker");
+dojo.requireLocalization("dojox.widget","ColorPicker",null,"ROOT,cs,de,es,fr,hu,it,ja,ko,pl,pt,ru,th,zh,zh-tw");
+dojo.requireLocalization("dojo.cldr","number",null,"ROOT,ar,ca,cs,da,de,de-de,el,en,en-au,en-gb,en-us,es,es-es,fi,fr,he,hu,it,ja,ja-jp,ko,ko-kr,nb,nl,pl,pt,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-cn,zh-tw");
+dojo.require("dijit.form._FormWidget");
+dojo.require("dojo.dnd.move");
+dojo.require("dojo.fx");
+dojo.require("dojox.color");
+dojo.require("dojo.i18n");
+(function(d){
+var _1=function(_2){
+return _2;
+};
+dojo.declare("dojox.widget.ColorPicker",dijit.form._FormWidget,{showRgb:true,showHsv:true,showHex:true,webSafe:true,animatePoint:true,slideDuration:250,liveUpdate:false,PICKER_HUE_H:150,PICKER_SAT_VAL_H:150,PICKER_SAT_VAL_W:150,value:"#ffffff",_underlay:d.moduleUrl("dojox.widget","ColorPicker/images/underlay.png"),templateString:dojo.cache("dojox.widget","ColorPicker/ColorPicker.html","<div class=\"dojoxColorPicker\" dojoAttachEvent=\"onkeypress: _handleKey\">\n\t<div class=\"dojoxColorPickerBox\">\n\t\t<div dojoAttachPoint=\"cursorNode\" tabIndex=\"0\" class=\"dojoxColorPickerPoint\"></div>\n\t\t<img dojoAttachPoint=\"colorUnderlay\" dojoAttachEvent=\"onclick: _setPoint\" class=\"dojoxColorPickerUnderlay\" src=\"${_underlay}\">\n\t</div>\n\t<div class=\"dojoxHuePicker\">\n\t\t<div dojoAttachPoint=\"hueCursorNode\" tabIndex=\"0\" class=\"dojoxHuePickerPoint\"></div>\n\t\t<div dojoAttachPoint=\"hueNode\" class=\"dojoxHuePickerUnderlay\" dojoAttachEvent=\"onclick: _setHuePoint\"></div>\n\t</div>\n\t<div dojoAttachPoint=\"previewNode\" class=\"dojoxColorPickerPreview\"></div>\n\t<div dojoAttachPoint=\"safePreviewNode\" class=\"dojoxColorPickerWebSafePreview\"></div>\n\t<div class=\"dojoxColorPickerOptional\" dojoAttachEvent=\"onchange: _colorInputChange\">\n\t\t<div class=\"dijitInline dojoxColorPickerRgb\" dojoAttachPoint=\"rgbNode\">\n\t\t\t<table>\n\t\t\t<tr><td>${redLabel}</td><td><input dojoAttachPoint=\"Rval\" size=\"1\"></td></tr>\n\t\t\t<tr><td>${greenLabel}</td><td><input dojoAttachPoint=\"Gval\" size=\"1\"></td></tr>\n\t\t\t<tr><td>${blueLabel}</td><td><input dojoAttachPoint=\"Bval\" size=\"1\"></td></tr>\n\t\t\t</table>\n\t\t</div>\n\t\t<div class=\"dijitInline dojoxColorPickerHsv\" dojoAttachPoint=\"hsvNode\">\n\t\t\t<table>\n\t\t\t<tr><td>${hueLabel}</td><td><input dojoAttachPoint=\"Hval\"size=\"1\"> ${degLabel}</td></tr>\n\t\t\t<tr><td>${saturationLabel}</td><td><input dojoAttachPoint=\"Sval\" size=\"1\"> ${percentSign}</td></tr>\n\t\t\t<tr><td>${valueLabel}</td><td><input dojoAttachPoint=\"Vval\" size=\"1\"> ${percentSign}</td></tr>\n\t\t\t</table>\n\t\t</div>\n\t\t<div class=\"dojoxColorPickerHex\" dojoAttachPoint=\"hexNode\">\t\n\t\t\t${hexLabel}: <input dojoAttachPoint=\"hexCode, focusNode, valueNode\" size=\"6\" class=\"dojoxColorPickerHexCode\">\n\t\t</div>\n\t</div>\n</div>\n"),postMixInProperties:function(){
+dojo.mixin(this,dojo.i18n.getLocalization("dojox.widget","ColorPicker"));
+dojo.mixin(this,dojo.i18n.getLocalization("dojo.cldr","number"));
+this.inherited(arguments);
+},postCreate:function(){
+this.inherited(arguments);
+if(d.isIE<7){
+this.colorUnderlay.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this._underlay+"', sizingMethod='scale')";
+this.colorUnderlay.src=this._blankGif.toString();
+}
+if(!this.showRgb){
+this.rgbNode.style.display="none";
+}
+if(!this.showHsv){
+this.hsvNode.style.display="none";
+}
+if(!this.showHex){
+this.hexNode.style.display="none";
+}
+if(!this.webSafe){
+this.safePreviewNode.style.visibility="hidden";
+}
+this._offset=0;
+var _3=d.marginBox(this.cursorNode);
+var _4=d.marginBox(this.hueCursorNode);
+this._shift={hue:{x:Math.round(_4.w/2)-1,y:Math.round(_4.h/2)-1},picker:{x:Math.floor(_3.w/2),y:Math.floor(_3.h/2)}};
+this.PICKER_HUE_H=d.coords(this.hueNode).h;
+var cu=d.coords(this.colorUnderlay);
+this.PICKER_SAT_VAL_H=cu.h;
+this.PICKER_SAT_VAL_W=cu.w;
+var ox=this._shift.picker.x;
+var oy=this._shift.picker.y;
+this._mover=new d.dnd.move.boxConstrainedMoveable(this.cursorNode,{box:{t:0-oy,l:0-ox,w:this.PICKER_SAT_VAL_W,h:this.PICKER_SAT_VAL_H}});
+this._hueMover=new d.dnd.move.boxConstrainedMoveable(this.hueCursorNode,{box:{t:0-this._shift.hue.y,l:0,w:0,h:this.PICKER_HUE_H}});
+d.subscribe("/dnd/move/stop",d.hitch(this,"_clearTimer"));
+d.subscribe("/dnd/move/start",d.hitch(this,"_setTimer"));
+},startup:function(){
+this._started=true;
+this.attr("value",this.value);
+},_setValueAttr:function(_5){
+if(!this._started){
+return;
+}
+this.setColor(_5,true);
+},setColor:function(_6,_7){
+var _8=dojox.color.fromString(_6);
+this._updatePickerLocations(_8);
+this._updateColorInputs(_8);
+this._updateValue(_8,_7);
+},_setTimer:function(_9){
+dijit.focus(_9.node);
+d.setSelectable(this.domNode,false);
+this._timer=setInterval(d.hitch(this,"_updateColor"),45);
+},_clearTimer:function(_a){
+clearInterval(this._timer);
+this._timer=null;
+this.onChange(this.value);
+d.setSelectable(this.domNode,true);
+},_setHue:function(h){
+d.style(this.colorUnderlay,"backgroundColor",dojox.color.fromHsv(h,100,100).toHex());
+},_updateColor:function(){
+var _b=d.style(this.hueCursorNode,"top")+this._shift.hue.y,_c=d.style(this.cursorNode,"top")+this._shift.picker.y,_d=d.style(this.cursorNode,"left")+this._shift.picker.x,h=Math.round(360-(_b/this.PICKER_HUE_H*360)),_e=dojox.color.fromHsv(h,_d/this.PICKER_SAT_VAL_W*100,100-(_c/this.PICKER_SAT_VAL_H*100));
+this._updateColorInputs(_e);
+this._updateValue(_e,true);
+if(h!=this._hue){
+this._setHue(h);
}
+},_colorInputChange:function(e){
+var _f,_10=false;
+switch(e.target){
+case this.hexCode:
+_f=dojox.color.fromString(e.target.value);
+_10=true;
+break;
+case this.Rval:
+case this.Gval:
+case this.Bval:
+_f=dojox.color.fromArray([this.Rval.value,this.Gval.value,this.Bval.value]);
+_10=true;
+break;
+case this.Hval:
+case this.Sval:
+case this.Vval:
+_f=dojox.color.fromHsv(this.Hval.value,this.Sval.value,this.Vval.value);
+_10=true;
+break;
+}
+if(_10){
+this._updatePickerLocations(_f);
+this._updateColorInputs(_f);
+this._updateValue(_f,true);
+}
+},_updateValue:function(col,_11){
+var hex=col.toHex();
+this.value=this.valueNode.value=hex;
+if(_11&&(!this._timer||this.liveUpdate)){
+this.onChange(hex);
+}
+},_updatePickerLocations:function(col){
+var hsv=col.toHsv(),_12=Math.round(this.PICKER_HUE_H-hsv.h/360*this.PICKER_HUE_H-this._shift.hue.y),_13=Math.round(hsv.s/100*this.PICKER_SAT_VAL_W-this._shift.picker.x),_14=Math.round(this.PICKER_SAT_VAL_H-hsv.v/100*this.PICKER_SAT_VAL_H-this._shift.picker.y);
+if(this.animatePoint){
+d.fx.slideTo({node:this.hueCursorNode,duration:this.slideDuration,top:_12,left:0}).play();
+d.fx.slideTo({node:this.cursorNode,duration:this.slideDuration,top:_14,left:_13}).play();
+}else{
+d.style(this.hueCursorNode,"top",_12+"px");
+d.style(this.cursorNode,{left:_13+"px",top:_14+"px"});
+}
+if(hsv.h!=this._hue){
+this._setHue(hsv.h);
+}
+},_updateColorInputs:function(col){
+var hex=col.toHex();
+if(this.showRgb){
+this.Rval.value=col.r;
+this.Gval.value=col.g;
+this.Bval.value=col.b;
+}
+if(this.showHsv){
+var hsv=col.toHsv();
+this.Hval.value=Math.round((hsv.h));
+this.Sval.value=Math.round(hsv.s);
+this.Vval.value=Math.round(hsv.v);
+}
+if(this.showHex){
+this.hexCode.value=hex;
+}
+this.previewNode.style.backgroundColor=hex;
+if(this.webSafe){
+this.safePreviewNode.style.backgroundColor=_1(hex);
+}
+},_setHuePoint:function(evt){
+var _15=evt.layerY-this._shift.hue.y;
+if(this.animatePoint){
+d.fx.slideTo({node:this.hueCursorNode,duration:this.slideDuration,top:_15,left:0,onEnd:d.hitch(this,"_updateColor",true)}).play();
+}else{
+d.style(this.hueCursorNode,"top",_15+"px");
+this._updateColor(false);
+}
+},_setPoint:function(evt){
+var _16=evt.layerY-this._shift.picker.y,_17=evt.layerX-this._shift.picker.x;
+if(evt){
+dijit.focus(evt.target);
+}
+if(this.animatePoint){
+d.fx.slideTo({node:this.cursorNode,duration:this.slideDuration,top:_16,left:_17,onEnd:d.hitch(this,"_updateColor",true)}).play();
+}else{
+d.style(this.cursorNode,{left:_17+"px",top:_16+"px"});
+this._updateColor(false);
+}
+},_handleKey:function(e){
+}});
+})(dojo);
+}
diff --git a/js/dojo/dojox/widget/ColorPicker/ColorPicker.css b/js/dojo/dojox/widget/ColorPicker/ColorPicker.css
--- a/js/dojo/dojox/widget/ColorPicker/ColorPicker.css
+++ b/js/dojo/dojox/widget/ColorPicker/ColorPicker.css
@@ -1,89 +1,93 @@
.dojoxColorPicker {
padding:8px;
- border:1px solid #a0a0a0;
- background:#ededed;
width:300px;
height:150px;
-moz-border-radius:4pt;
-webkit-border-radius:5pt;
+ -webkit-drop-shadow:3pt;
}
-
-
+.tundra .dojoxColorPicker {
+ background:#ededed;
+ border:1px solid #ccc;
+}
.dojoxColorPickerBox {
position:relative;
width:150px;
height:150px;
- margin:0; padding:0;
+ margin:0;
+ padding:0;
}
-
.dojoxColorPickerUnderlay {
position:absolute;
top:0; left:0;
width:150px;
height:150px;
z-index:1;
+}
+.tundra .dojoxColorPickerUnderlay {
border:1px solid #a0a0a0;
}
-
.dojoxHuePickerUnderlay {
background:url(images/hue.png) no-repeat top center;
position:absolute;
top:0; left:0;
height:150px;
width:20px;
z-index:1;
}
-
.dojoxHuePicker { position:relative; top:-150px; left:157px; }
-
.dojoxHuePickerPoint {
position:absolute;
top:0; left:0;
width:20px;
height:8px;
z-index:3;
background-color:#666;
- cursor:pointer;
+ cursor:move;
background:url(images/hueHandle.png) no-repeat center center;
}
-
-
.dojoxColorPickerPoint {
position:absolute;
width:10px;
height:10px;
background: url(images/pickerPointer.png) no-repeat center center;
border:0;
z-index:3;
- cursor:pointer;
+ cursor:move;
}
-
.dojoxColorPickerPreview {
display:block;
width:45px;
height:45px;
border:1px solid #333;
background-color:#fff;
position:relative;
top:-150px;
left: 185px;
}
.dojoxColorPickerWebSafePreview {
display:block;
width:25px;
height:25px;
position:relative;
top:-197px;
left:240px;
border:1px solid #333;
}
-
.dojoxColorPickerOptional {
position:relative;
top:-170px;
left:185px;
}
-
+.dojoxColorPickerOptional input {
+ border:1px solid #a7a7a7;
+ width:25px;
+ padding:1px 3px 1px 3px;
+ line-height:1.1em;
+}
.dojoxColorPickerRgb { position:absolute; top:0; left:0; }
.dojoxColorPickerHsv { position:absolute; top:0; left:50px; }
.dojoxColorPickerHex { position:absolute; top:73px; left:2px; }
+.dojoxColorPickerHex input {
+ width:55px;
+}
diff --git a/js/dojo/dojox/widget/ColorPicker/ColorPicker.html b/js/dojo/dojox/widget/ColorPicker/ColorPicker.html
--- a/js/dojo/dojox/widget/ColorPicker/ColorPicker.html
+++ b/js/dojo/dojox/widget/ColorPicker/ColorPicker.html
@@ -1,31 +1,31 @@
-<div class="dojoxColorPicker">
+<div class="dojoxColorPicker" dojoAttachEvent="onkeypress: _handleKey">
<div class="dojoxColorPickerBox">
- <div dojoAttachPoint="cursorNode" class="dojoxColorPickerPoint"></div>
+ <div dojoAttachPoint="cursorNode" tabIndex="0" class="dojoxColorPickerPoint"></div>
<img dojoAttachPoint="colorUnderlay" dojoAttachEvent="onclick: _setPoint" class="dojoxColorPickerUnderlay" src="${_underlay}">
</div>
<div class="dojoxHuePicker">
- <div dojoAttachPoint="hueCursorNode" class="dojoxHuePickerPoint"></div>
+ <div dojoAttachPoint="hueCursorNode" tabIndex="0" class="dojoxHuePickerPoint"></div>
<div dojoAttachPoint="hueNode" class="dojoxHuePickerUnderlay" dojoAttachEvent="onclick: _setHuePoint"></div>
</div>
<div dojoAttachPoint="previewNode" class="dojoxColorPickerPreview"></div>
<div dojoAttachPoint="safePreviewNode" class="dojoxColorPickerWebSafePreview"></div>
- <div class="dojoxColorPickerOptional">
+ <div class="dojoxColorPickerOptional" dojoAttachEvent="onchange: _colorInputChange">
<div class="dijitInline dojoxColorPickerRgb" dojoAttachPoint="rgbNode">
<table>
- <tr><td>r</td><td><input dojoAttachPoint="Rval" size="1"></td></tr>
- <tr><td>g</td><td><input dojoAttachPoint="Gval" size="1"></td></tr>
- <tr><td>b</td><td><input dojoAttachPoint="Bval" size="1"></td></tr>
+ <tr><td>${redLabel}</td><td><input dojoAttachPoint="Rval" size="1"></td></tr>
+ <tr><td>${greenLabel}</td><td><input dojoAttachPoint="Gval" size="1"></td></tr>
+ <tr><td>${blueLabel}</td><td><input dojoAttachPoint="Bval" size="1"></td></tr>
</table>
</div>
<div class="dijitInline dojoxColorPickerHsv" dojoAttachPoint="hsvNode">
<table>
- <tr><td>h</td><td><input dojoAttachPoint="Hval"size="1"> &deg;</td></tr>
- <tr><td>s</td><td><input dojoAttachPoint="Sval" size="1"> %</td></tr>
- <tr><td>v</td><td><input dojoAttachPoint="Vval" size="1"> %</td></tr>
+ <tr><td>${hueLabel}</td><td><input dojoAttachPoint="Hval"size="1"> ${degLabel}</td></tr>
+ <tr><td>${saturationLabel}</td><td><input dojoAttachPoint="Sval" size="1"> ${percentSign}</td></tr>
+ <tr><td>${valueLabel}</td><td><input dojoAttachPoint="Vval" size="1"> ${percentSign}</td></tr>
</table>
</div>
<div class="dojoxColorPickerHex" dojoAttachPoint="hexNode">
- hex: <input dojoAttachPoint="hexCode, focusNode" size="6" class="dojoxColorPickerHexCode">
+ ${hexLabel}: <input dojoAttachPoint="hexCode, focusNode, valueNode" size="6" class="dojoxColorPickerHexCode">
</div>
</div>
</div>
diff --git a/js/dojo/dojox/widget/FisheyeList.js b/js/dojo/dojox/widget/FisheyeList.js
--- a/js/dojo/dojox/widget/FisheyeList.js
+++ b/js/dojo/dojox/widget/FisheyeList.js
@@ -1,708 +1,428 @@
-if(!dojo._hasResource["dojox.widget.FisheyeList"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.widget.FisheyeList"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.widget.FisheyeList"]){
+dojo._hasResource["dojox.widget.FisheyeList"]=true;
dojo.provide("dojox.widget.FisheyeList");
-
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit._Container");
-
-dojo.declare("dojox.widget.FisheyeList", [dijit._Widget, dijit._Templated, dijit._Container], {
- // summary:
- // Menu similar to the fish eye menu on the Mac OS
- // example:
- // | <div dojoType="FisheyeList"
- // | itemWidth="40" itemHeight="40"
- // | itemMaxWidth="150" itemMaxHeight="150"
- // | orientation="horizontal"
- // | effectUnits="2"
- // | itemPadding="10"
- // | attachEdge="center"
- // | labelEdge="bottom">
- // |
- // | <div dojoType="FisheyeListItem"
- // | id="item1"
- // | onclick="alert('click on' + this.label + '(from widget id ' + this.widgetId + ')!');"
- // | label="Item 1"
- // | iconSrc="images/fisheye_1.png">
- // | </div>
- // | ...
- // | </div>
- //
- constructor: function(){
- //
- // TODO
- // fix really long labels in vertical mode
- //
-
- this.pos = {'x': -1, 'y': -1}; // current cursor position, relative to the grid
-
- // for conservative trigger mode, when triggered, timerScale is gradually increased from 0 to 1
- this.timerScale = 1.0;
-
- },
-
- EDGE: {
- CENTER: 0,
- LEFT: 1,
- RIGHT: 2,
- TOP: 3,
- BOTTOM: 4
- },
-
- templateString: '<div class="dojoxFisheyeListBar" dojoAttachPoint="containerNode"></div>',
-
- snarfChildDomOutput: true,
-
- // itemWidth: Integer
- // width of menu item (in pixels) in it's dormant state (when the mouse is far away)
- itemWidth: 40,
-
- // itemHeight: Integer
- // height of menu item (in pixels) in it's dormant state (when the mouse is far away)
- itemHeight: 40,
-
- // itemMaxWidth: Integer
- // width of menu item (in pixels) in it's fully enlarged state (when the mouse is directly over it)
- itemMaxWidth: 150,
-
- // itemMaxHeight: Integer
- // height of menu item (in pixels) in it's fully enlarged state (when the mouse is directly over it)
- itemMaxHeight: 150,
-
- imgNode: null,
-
- // orientation: String
- // orientation of the menu, either "horizontal" or "vertical"
- orientation: 'horizontal',
-
- // isFixed: Boolean
- // toggle to enable additional listener (window scroll) if FisheyeList is in a fixed postion
- isFixed: false,
-
- // conservativeTrigger: Boolean
- // if true, don't start enlarging menu items until mouse is over an image;
- // if false, start enlarging menu items as the mouse moves near them.
- conservativeTrigger: false,
-
- // effectUnits: Number
- // controls how much reaction the menu makes, relative to the distance of the mouse from the menu
- effectUnits: 2,
-
- // itemPadding: Integer
- // padding (in pixels) betweeen each menu item
- itemPadding: 10,
-
- // attachEdge: String
- // controls the border that the menu items don't expand past;
- // for example, if set to "top", then the menu items will drop downwards as they expand.
- // values
- // "center", "left", "right", "top", "bottom".
- attachEdge: 'center',
-
- // labelEdge: String
- // controls were the labels show up in relation to the menu item icons
- // values
- // "center", "left", "right", "top", "bottom".
- labelEdge: 'bottom',
-
- postCreate: function(){
- var e = this.EDGE;
- dojo.setSelectable(this.domNode, false);
-
- var isHorizontal = this.isHorizontal = (this.orientation == 'horizontal');
- this.selectedNode = -1;
-
- this.isOver = false;
- this.hitX1 = -1;
- this.hitY1 = -1;
- this.hitX2 = -1;
- this.hitY2 = -1;
-
- //
- // only some edges make sense...
- //
- this.anchorEdge = this._toEdge(this.attachEdge, e.CENTER);
- this.labelEdge = this._toEdge(this.labelEdge, e.TOP);
-
- if(this.labelEdge == e.CENTER){ this.labelEdge = e.TOP; }
-
- if(isHorizontal){
- if(this.anchorEdge == e.LEFT){ this.anchorEdge = e.CENTER; }
- if(this.anchorEdge == e.RIGHT){ this.anchorEdge = e.CENTER; }
- if(this.labelEdge == e.LEFT){ this.labelEdge = e.TOP; }
- if(this.labelEdge == e.RIGHT){ this.labelEdge = e.TOP; }
- }else{
- if(this.anchorEdge == e.TOP){ this.anchorEdge = e.CENTER; }
- if(this.anchorEdge == e.BOTTOM){ this.anchorEdge = e.CENTER; }
- if(this.labelEdge == e.TOP){ this.labelEdge = e.LEFT; }
- if(this.labelEdge == e.BOTTOM){ this.labelEdge = e.LEFT; }
- }
-
- //
- // figure out the proximity size
- //
- var effectUnits = this.effectUnits;
- this.proximityLeft = this.itemWidth * (effectUnits - 0.5);
- this.proximityRight = this.itemWidth * (effectUnits - 0.5);
- this.proximityTop = this.itemHeight * (effectUnits - 0.5);
- this.proximityBottom = this.itemHeight * (effectUnits - 0.5);
-
- if(this.anchorEdge == e.LEFT){
- this.proximityLeft = 0;
- }
- if(this.anchorEdge == e.RIGHT){
- this.proximityRight = 0;
- }
- if(this.anchorEdge == e.TOP){
- this.proximityTop = 0;
- }
- if(this.anchorEdge == e.BOTTOM){
- this.proximityBottom = 0;
- }
- if(this.anchorEdge == e.CENTER){
- this.proximityLeft /= 2;
- this.proximityRight /= 2;
- this.proximityTop /= 2;
- this.proximityBottom /= 2;
- }
- },
-
- startup: function(){
- // summary: create our connections and setup our FisheyeList
- this.children = this.getChildren();
- //original postCreate() --tk
- this._initializePositioning();
-
- //
- // in liberal trigger mode, activate menu whenever mouse is close
- //
- if(!this.conservativeTrigger){
- this._onMouseMoveHandle = dojo.connect(document.documentElement, "onmousemove", this, "_onMouseMove");
- }
- if (this.isFixed){
- this._onScrollHandle = dojo.connect(document,"onscroll",this,"_onScroll");
- }
-
- // Deactivate the menu if mouse is moved off screen (doesn't work for FF?)
- this._onMouseOutHandle = dojo.connect(document.documentElement, "onmouseout", this, "_onBodyOut");
- this._addChildHandle = dojo.connect(this, "addChild", this, "_initializePositioning");
- this._onResizeHandle = dojo.connect(window,"onresize", this, "_initializePositioning");
- },
-
- _initializePositioning: function(){
- this.itemCount = this.children.length;
-
- this.barWidth = (this.isHorizontal ? this.itemCount : 1) * this.itemWidth;
- this.barHeight = (this.isHorizontal ? 1 : this.itemCount) * this.itemHeight;
-
- this.totalWidth = this.proximityLeft + this.proximityRight + this.barWidth;
- this.totalHeight = this.proximityTop + this.proximityBottom + this.barHeight;
-
- //
- // calculate effect ranges for each item
- //
-
- for(var i=0; i<this.children.length; i++){
-
- this.children[i].posX = this.itemWidth * (this.isHorizontal ? i : 0);
- this.children[i].posY = this.itemHeight * (this.isHorizontal ? 0 : i);
-
- this.children[i].cenX = this.children[i].posX + (this.itemWidth / 2);
- this.children[i].cenY = this.children[i].posY + (this.itemHeight / 2);
-
- var isz = this.isHorizontal ? this.itemWidth : this.itemHeight;
- var r = this.effectUnits * isz;
- var c = this.isHorizontal ? this.children[i].cenX : this.children[i].cenY;
- var lhs = this.isHorizontal ? this.proximityLeft : this.proximityTop;
- var rhs = this.isHorizontal ? this.proximityRight : this.proximityBottom;
- var siz = this.isHorizontal ? this.barWidth : this.barHeight;
-
- var range_lhs = r;
- var range_rhs = r;
-
- if(range_lhs > c+lhs){ range_lhs = c+lhs; }
- if(range_rhs > (siz-c+rhs)){ range_rhs = siz-c+rhs; }
-
- this.children[i].effectRangeLeft = range_lhs / isz;
- this.children[i].effectRangeRght = range_rhs / isz;
-
- //dojo.debug('effect range for '+i+' is '+range_lhs+'/'+range_rhs);
- }
-
- //
- // create the bar
- //
- this.domNode.style.width = this.barWidth + 'px';
- this.domNode.style.height = this.barHeight + 'px';
-
- //
- // position the items
- //
- for(var i=0; i<this.children.length; i++){
- var itm = this.children[i];
- var elm = itm.domNode;
- elm.style.left = itm.posX + 'px';
- elm.style.top = itm.posY + 'px';
- elm.style.width = this.itemWidth + 'px';
- elm.style.height = this.itemHeight + 'px';
-
- itm.imgNode.style.left = this.itemPadding+'%';
- itm.imgNode.style.top = this.itemPadding+'%';
- itm.imgNode.style.width = (100 - 2 * this.itemPadding) + '%';
- itm.imgNode.style.height = (100 - 2 * this.itemPadding) + '%';
- }
-
- //
- // calc the grid
- //
- this._calcHitGrid();
- },
-
- _overElement: function(/* DomNode|String */node, /* Event */e){
- // summary:
- // Returns whether the mouse is over the passed element.
- // Node: Must must be display:block (ie, not a <span>)
- node = dojo.byId(node);
- var mouse = {x: e.pageX, y: e.pageY};
- var bb = dojo._getBorderBox(node);
- var absolute = dojo.coords(node, true);
- var top = absolute.y;
- var bottom = top + bb.h;
- var left = absolute.x;
- var right = left + bb.w;
-
- return (mouse.x >= left
- && mouse.x <= right
- && mouse.y >= top
- && mouse.y <= bottom
- ); // boolean
- },
-
- _onBodyOut: function(/*Event*/ e){
- // clicking over an object inside of body causes this event to fire; ignore that case
- if( this._overElement(dojo.body(), e) ){
- return;
- }
- this._setDormant(e);
- },
-
- _setDormant: function(/*Event*/ e){
- // summary: called when mouse moves out of menu's range
-
- if(!this.isOver){ return; } // already dormant?
- this.isOver = false;
-
- if(this.conservativeTrigger){
- // user can't re-trigger the menu expansion
- // until he mouses over a icon again
- dojo.disconnect(this._onMouseMoveHandle);
- }
- this._onGridMouseMove(-1, -1);
- },
-
- _setActive: function(/*Event*/ e){
- // summary: called when mouse is moved into menu's range
-
- if(this.isOver){ return; } // already activated?
- this.isOver = true;
-
- if(this.conservativeTrigger){
- // switch event handlers so that we handle mouse events from anywhere near
- // the menu
- this._onMouseMoveHandle = dojo.connect(document.documentElement, "onmousemove", this, "_onMouseMove");
-
- this.timerScale=0.0;
-
- // call mouse handler to do some initial necessary calculations/positioning
- this._onMouseMove(e);
-
- // slowly expand the icon size so it isn't jumpy
- this._expandSlowly();
- }
- },
-
- _onMouseMove: function(/*Event*/ e){
- // summary: called when mouse is moved
- if( (e.pageX >= this.hitX1) && (e.pageX <= this.hitX2) &&
- (e.pageY >= this.hitY1) && (e.pageY <= this.hitY2) ){
- if(!this.isOver){
- this._setActive(e);
- }
- this._onGridMouseMove(e.pageX-this.hitX1, e.pageY-this.hitY1);
- }else{
- if(this.isOver){
- this._setDormant(e);
- }
- }
- },
-
- _onScroll: function(){
- this._calcHitGrid();
- },
-
- onResized: function(){
- this._calcHitGrid();
- },
-
- _onGridMouseMove: function(x, y){
- // summary: called when mouse is moved in the vicinity of the menu
- this.pos = {x:x, y:y};
- this._paint();
- },
-
- _paint: function(){
- var x=this.pos.x;
- var y=this.pos.y;
-
- if(this.itemCount <= 0){ return; }
-
- //
- // figure out our main index
- //
- var pos = this.isHorizontal ? x : y;
- var prx = this.isHorizontal ? this.proximityLeft : this.proximityTop;
- var siz = this.isHorizontal ? this.itemWidth : this.itemHeight;
- var sim = this.isHorizontal ?
- (1.0-this.timerScale)*this.itemWidth + this.timerScale*this.itemMaxWidth :
- (1.0-this.timerScale)*this.itemHeight + this.timerScale*this.itemMaxHeight ;
-
- var cen = ((pos - prx) / siz) - 0.5;
- var max_off_cen = (sim / siz) - 0.5;
-
- if(max_off_cen > this.effectUnits){ max_off_cen = this.effectUnits; }
-
- //
- // figure out our off-axis weighting
- //
- var off_weight = 0;
-
- if(this.anchorEdge == this.EDGE.BOTTOM){
- var cen2 = (y - this.proximityTop) / this.itemHeight;
- off_weight = (cen2 > 0.5) ? 1 : y / (this.proximityTop + (this.itemHeight / 2));
- }
- if(this.anchorEdge == this.EDGE.TOP){
- var cen2 = (y - this.proximityTop) / this.itemHeight;
- off_weight = (cen2 < 0.5) ? 1 : (this.totalHeight - y) / (this.proximityBottom + (this.itemHeight / 2));
- }
- if(this.anchorEdge == this.EDGE.RIGHT){
- var cen2 = (x - this.proximityLeft) / this.itemWidth;
- off_weight = (cen2 > 0.5) ? 1 : x / (this.proximityLeft + (this.itemWidth / 2));
- }
- if(this.anchorEdge == this.EDGE.LEFT){
- var cen2 = (x - this.proximityLeft) / this.itemWidth;
- off_weight = (cen2 < 0.5) ? 1 : (this.totalWidth - x) / (this.proximityRight + (this.itemWidth / 2));
- }
- if(this.anchorEdge == this.EDGE.CENTER){
- if(this.isHorizontal){
- off_weight = y / (this.totalHeight);
- }else{
- off_weight = x / (this.totalWidth);
- }
-
- if(off_weight > 0.5){
- off_weight = 1 - off_weight;
- }
-
- off_weight *= 2;
- }
-
- //
- // set the sizes
- //
- for(var i=0; i<this.itemCount; i++){
- var weight = this._weighAt(cen, i);
- if(weight < 0){weight = 0;}
- this._setItemSize(i, weight * off_weight);
- }
-
- //
- // set the positions
- //
-
- var main_p = Math.round(cen);
- var offset = 0;
-
- if(cen < 0){
-
- main_p = 0;
-
- }else if(cen > this.itemCount - 1){
-
- main_p = this.itemCount -1;
-
- }else{
-
- offset = (cen - main_p) * ((this.isHorizontal ? this.itemWidth : this.itemHeight) - this.children[main_p].sizeMain);
- }
-
- this._positionElementsFrom(main_p, offset);
- },
-
- _weighAt: function(/*Integer*/ cen, /*Integer*/ i){
- var dist = Math.abs(cen - i);
- var limit = ((cen - i) > 0) ? this.children[i].effectRangeRght : this.children[i].effectRangeLeft;
- return (dist > limit) ? 0 : (1 - dist / limit); // Integer
- },
-
- _setItemSize: function(p, scale){
- scale *= this.timerScale;
- var w = Math.round(this.itemWidth + ((this.itemMaxWidth - this.itemWidth ) * scale));
- var h = Math.round(this.itemHeight + ((this.itemMaxHeight - this.itemHeight) * scale));
-
- if(this.isHorizontal){
-
- this.children[p].sizeW = w;
- this.children[p].sizeH = h;
-
- this.children[p].sizeMain = w;
- this.children[p].sizeOff = h;
-
- var y = 0;
- if(this.anchorEdge == this.EDGE.TOP){
- y = (this.children[p].cenY - (this.itemHeight / 2));
- }else if(this.anchorEdge == this.EDGE.BOTTOM){
- y = (this.children[p].cenY - (h - (this.itemHeight / 2)));
- }else{
- y = (this.children[p].cenY - (h / 2));
- }
-
- this.children[p].usualX = Math.round(this.children[p].cenX - (w / 2));
- this.children[p].domNode.style.top = y + 'px';
- this.children[p].domNode.style.left = this.children[p].usualX + 'px';
-
- }else{
-
- this.children[p].sizeW = w;
- this.children[p].sizeH = h;
-
- this.children[p].sizeOff = w;
- this.children[p].sizeMain = h;
-
- var x = 0;
- if(this.anchorEdge == this.EDGE.LEFT){
- x = this.children[p].cenX - (this.itemWidth / 2);
- }else if (this.anchorEdge == this.EDGE.RIGHT){
- x = this.children[p].cenX - (w - (this.itemWidth / 2));
- }else{
- x = this.children[p].cenX - (w / 2);
- }
-
- this.children[p].domNode.style.left = x + 'px';
- this.children[p].usualY = Math.round(this.children[p].cenY - (h / 2));
-
- this.children[p].domNode.style.top = this.children[p].usualY + 'px';
- }
-
- this.children[p].domNode.style.width = w + 'px';
- this.children[p].domNode.style.height = h + 'px';
-
- if(this.children[p].svgNode){
- this.children[p].svgNode.setSize(w, h);
- }
- },
-
- _positionElementsFrom: function(p, offset){
- var pos = 0;
-
- if(this.isHorizontal){
- pos = Math.round(this.children[p].usualX + offset);
- this.children[p].domNode.style.left = pos + 'px';
- }else{
- pos = Math.round(this.children[p].usualY + offset);
- this.children[p].domNode.style.top = pos + 'px';
- }
- this._positionLabel(this.children[p]);
-
- // position before
- var bpos = pos;
- for(var i=p-1; i>=0; i--){
- bpos -= this.children[i].sizeMain;
-
- if (this.isHorizontal){
- this.children[i].domNode.style.left = bpos + 'px';
- }else{
- this.children[i].domNode.style.top = bpos + 'px';
- }
- this._positionLabel(this.children[i]);
- }
-
- // position after
- var apos = pos;
- for(var i=p+1; i<this.itemCount; i++){
- apos += this.children[i-1].sizeMain;
- if(this.isHorizontal){
- this.children[i].domNode.style.left = apos + 'px';
- }else{
- this.children[i].domNode.style.top = apos + 'px';
- }
- this._positionLabel(this.children[i]);
- }
-
- },
-
- _positionLabel: function(itm){
- var x = 0;
- var y = 0;
-
- var mb = dojo.marginBox(itm.lblNode);
-
- if(this.labelEdge == this.EDGE.TOP){
- x = Math.round((itm.sizeW / 2) - (mb.w / 2));
- y = -mb.h;
- }
-
- if(this.labelEdge == this.EDGE.BOTTOM){
- x = Math.round((itm.sizeW / 2) - (mb.w / 2));
- y = itm.sizeH;
- }
-
- if(this.labelEdge == this.EDGE.LEFT){
- x = -mb.w;
- y = Math.round((itm.sizeH / 2) - (mb.h / 2));
- }
-
- if(this.labelEdge == this.EDGE.RIGHT){
- x = itm.sizeW;
- y = Math.round((itm.sizeH / 2) - (mb.h / 2));
- }
-
- itm.lblNode.style.left = x + 'px';
- itm.lblNode.style.top = y + 'px';
- },
-
- _calcHitGrid: function(){
-
- var pos = dojo.coords(this.domNode, true);
-
- this.hitX1 = pos.x - this.proximityLeft;
- this.hitY1 = pos.y - this.proximityTop;
- this.hitX2 = this.hitX1 + this.totalWidth;
- this.hitY2 = this.hitY1 + this.totalHeight;
-
- },
-
- _toEdge: function(inp, def){
- return this.EDGE[inp.toUpperCase()] || def;
- },
-
- _expandSlowly: function(){
- // summary: slowly expand the image to user specified max size
- if(!this.isOver){ return; }
- this.timerScale += 0.2;
- this._paint();
- if(this.timerScale<1.0){
- setTimeout(dojo.hitch(this, "_expandSlowly"), 10);
- }
- },
-
- destroyRecursive: function(){
- // need to disconnect when we destroy
- dojo.disconnect(this._onMouseOutHandle);
- dojo.disconnect(this._onMouseMoveHandle);
- dojo.disconnect(this._addChildHandle);
- if (this.isFixed) { dojo.disconnect(this._onScrollHandle); }
- dojo.disconnect(this._onResizeHandle);
- this.inherited("destroyRecursive",arguments);
- }
-});
-
-dojo.declare("dojox.widget.FisheyeListItem", [dijit._Widget, dijit._Templated, dijit._Contained], {
- /*
- * summary
- * Menu item inside of a FisheyeList.
- * See FisheyeList documentation for details on usage.
- */
-
- // iconSrc: String
- // pathname to image file (jpg, gif, png, etc.) of icon for this menu item
- iconSrc: "",
-
- // label: String
- // label to print next to the icon, when it is moused-over
- label: "",
-
- // id: String
- // will be set to the id of the orginal div element
- id: "",
-
- _blankImgPath: dojo.moduleUrl("dojox.widget", "FisheyeList/blank.gif"),
-
- templateString:
- '<div class="dojoxFisheyeListItem">' +
- ' <img class="dojoxFisheyeListItemImage" dojoAttachPoint="imgNode" dojoAttachEvent="onmouseover:onMouseOver,onmouseout:onMouseOut,onclick:onClick">' +
- ' <div class="dojoxFisheyeListItemLabel" dojoAttachPoint="lblNode"></div>' +
- '</div>',
-
- _isNode: function(/* object */wh){
- // summary:
- // checks to see if wh is actually a node.
- if(typeof Element == "function") {
- try{
- return wh instanceof Element; // boolean
- }catch(e){}
- }else{
- // best-guess
- return wh && !isNaN(wh.nodeType); // boolean
- }
- },
-
- _hasParent: function(/*Node*/node){
- // summary:
- // returns whether or not node is a child of another node.
- return Boolean(node && node.parentNode && this._isNode(node.parentNode)); // boolean
- },
-
- postCreate: function() {
-
- // set image
- if((this.iconSrc.toLowerCase().substring(this.iconSrc.length-4)==".png")&&(dojo.isIE)&&(dojo.isIE<7)){
- /* we set the id of the new fisheyeListItem to the id of the div defined in the HTML */
- if(this._hasParent(this.imgNode) && this.id != ""){
- var parent = this.imgNode.parentNode;
- parent.setAttribute("id", this.id);
- }
- this.imgNode.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.iconSrc+"', sizingMethod='scale')";
- this.imgNode.src = this._blankImgPath.toString();
- }else{
- if(this._hasParent(this.imgNode) && this.id != ""){
- var parent = this.imgNode.parentNode;
- parent.setAttribute("id", this.id);
- }
- this.imgNode.src = this.iconSrc;
- }
-
- // Label
- if(this.lblNode){
- this.lblNode.appendChild(document.createTextNode(this.label));
- }
- dojo.setSelectable(this.domNode, false);
- this.startup();
- },
-
- startup: function(){
- this.parent = this.getParent();
- },
-
- onMouseOver: function(/*Event*/ e){
- // summary: callback when user moves mouse over this menu item
- // in conservative mode, don't activate the menu until user mouses over an icon
- if(!this.parent.isOver){
- this.parent._setActive(e);
- }
- if(this.label != "" ){
- dojo.addClass(this.lblNode, "dojoxFishSelected");
- this.parent._positionLabel(this);
- }
- },
-
- onMouseOut: function(/*Event*/ e){
- // summary: callback when user moves mouse off of this menu item
- dojo.removeClass(this.lblNode, "dojoxFishSelected");
- },
-
- onClick: function(/*Event*/ e){
- // summary: user overridable callback when user clicks this menu item
- }
-});
-
+dojo.require("dijit._Contained");
+dojo.declare("dojox.widget.FisheyeList",[dijit._Widget,dijit._Templated,dijit._Container],{constructor:function(){
+this.pos={"x":-1,"y":-1};
+this.timerScale=1;
+},EDGE:{CENTER:0,LEFT:1,RIGHT:2,TOP:3,BOTTOM:4},templateString:"<div class=\"dojoxFisheyeListBar\" dojoAttachPoint=\"containerNode\"></div>",snarfChildDomOutput:true,itemWidth:40,itemHeight:40,itemMaxWidth:150,itemMaxHeight:150,imgNode:null,orientation:"horizontal",isFixed:false,conservativeTrigger:false,effectUnits:2,itemPadding:10,attachEdge:"center",labelEdge:"bottom",postCreate:function(){
+var e=this.EDGE;
+dojo.setSelectable(this.domNode,false);
+var _1=this.isHorizontal=(this.orientation=="horizontal");
+this.selectedNode=-1;
+this.isOver=false;
+this.hitX1=-1;
+this.hitY1=-1;
+this.hitX2=-1;
+this.hitY2=-1;
+this.anchorEdge=this._toEdge(this.attachEdge,e.CENTER);
+this.labelEdge=this._toEdge(this.labelEdge,e.TOP);
+if(this.labelEdge==e.CENTER){
+this.labelEdge=e.TOP;
+}
+if(_1){
+if(this.anchorEdge==e.LEFT){
+this.anchorEdge=e.CENTER;
+}
+if(this.anchorEdge==e.RIGHT){
+this.anchorEdge=e.CENTER;
+}
+if(this.labelEdge==e.LEFT){
+this.labelEdge=e.TOP;
+}
+if(this.labelEdge==e.RIGHT){
+this.labelEdge=e.TOP;
+}
+}else{
+if(this.anchorEdge==e.TOP){
+this.anchorEdge=e.CENTER;
+}
+if(this.anchorEdge==e.BOTTOM){
+this.anchorEdge=e.CENTER;
+}
+if(this.labelEdge==e.TOP){
+this.labelEdge=e.LEFT;
+}
+if(this.labelEdge==e.BOTTOM){
+this.labelEdge=e.LEFT;
+}
+}
+var _2=this.effectUnits;
+this.proximityLeft=this.itemWidth*(_2-0.5);
+this.proximityRight=this.itemWidth*(_2-0.5);
+this.proximityTop=this.itemHeight*(_2-0.5);
+this.proximityBottom=this.itemHeight*(_2-0.5);
+if(this.anchorEdge==e.LEFT){
+this.proximityLeft=0;
+}
+if(this.anchorEdge==e.RIGHT){
+this.proximityRight=0;
+}
+if(this.anchorEdge==e.TOP){
+this.proximityTop=0;
+}
+if(this.anchorEdge==e.BOTTOM){
+this.proximityBottom=0;
+}
+if(this.anchorEdge==e.CENTER){
+this.proximityLeft/=2;
+this.proximityRight/=2;
+this.proximityTop/=2;
+this.proximityBottom/=2;
+}
+},startup:function(){
+this.children=this.getChildren();
+this._initializePositioning();
+if(!this.conservativeTrigger){
+this._onMouseMoveHandle=dojo.connect(document.documentElement,"onmousemove",this,"_onMouseMove");
+}
+if(this.isFixed){
+this._onScrollHandle=dojo.connect(document,"onscroll",this,"_onScroll");
+}
+this._onMouseOutHandle=dojo.connect(document.documentElement,"onmouseout",this,"_onBodyOut");
+this._addChildHandle=dojo.connect(this,"addChild",this,"_initializePositioning");
+this._onResizeHandle=dojo.connect(window,"onresize",this,"_initializePositioning");
+},_initializePositioning:function(){
+this.itemCount=this.children.length;
+this.barWidth=(this.isHorizontal?this.itemCount:1)*this.itemWidth;
+this.barHeight=(this.isHorizontal?1:this.itemCount)*this.itemHeight;
+this.totalWidth=this.proximityLeft+this.proximityRight+this.barWidth;
+this.totalHeight=this.proximityTop+this.proximityBottom+this.barHeight;
+for(var i=0;i<this.children.length;i++){
+this.children[i].posX=this.itemWidth*(this.isHorizontal?i:0);
+this.children[i].posY=this.itemHeight*(this.isHorizontal?0:i);
+this.children[i].cenX=this.children[i].posX+(this.itemWidth/2);
+this.children[i].cenY=this.children[i].posY+(this.itemHeight/2);
+var _3=this.isHorizontal?this.itemWidth:this.itemHeight;
+var r=this.effectUnits*_3;
+var c=this.isHorizontal?this.children[i].cenX:this.children[i].cenY;
+var _4=this.isHorizontal?this.proximityLeft:this.proximityTop;
+var _5=this.isHorizontal?this.proximityRight:this.proximityBottom;
+var _6=this.isHorizontal?this.barWidth:this.barHeight;
+var _7=r;
+var _8=r;
+if(_7>c+_4){
+_7=c+_4;
+}
+if(_8>(_6-c+_5)){
+_8=_6-c+_5;
+}
+this.children[i].effectRangeLeft=_7/_3;
+this.children[i].effectRangeRght=_8/_3;
+}
+this.domNode.style.width=this.barWidth+"px";
+this.domNode.style.height=this.barHeight+"px";
+for(var i=0;i<this.children.length;i++){
+var _9=this.children[i];
+var _a=_9.domNode;
+_a.style.left=_9.posX+"px";
+_a.style.top=_9.posY+"px";
+_a.style.width=this.itemWidth+"px";
+_a.style.height=this.itemHeight+"px";
+_9.imgNode.style.left=this.itemPadding+"%";
+_9.imgNode.style.top=this.itemPadding+"%";
+_9.imgNode.style.width=(100-2*this.itemPadding)+"%";
+_9.imgNode.style.height=(100-2*this.itemPadding)+"%";
+}
+this._calcHitGrid();
+},_overElement:function(_b,e){
+_b=dojo.byId(_b);
+var _c={x:e.pageX,y:e.pageY};
+var bb=dojo._getBorderBox(_b);
+var _d=dojo.coords(_b,true);
+var _e=_d.y;
+var _f=_e+bb.h;
+var _10=_d.x;
+var _11=_10+bb.w;
+return (_c.x>=_10&&_c.x<=_11&&_c.y>=_e&&_c.y<=_f);
+},_onBodyOut:function(e){
+if(this._overElement(dojo.body(),e)){
+return;
+}
+this._setDormant(e);
+},_setDormant:function(e){
+if(!this.isOver){
+return;
+}
+this.isOver=false;
+if(this.conservativeTrigger){
+dojo.disconnect(this._onMouseMoveHandle);
+}
+this._onGridMouseMove(-1,-1);
+},_setActive:function(e){
+if(this.isOver){
+return;
+}
+this.isOver=true;
+if(this.conservativeTrigger){
+this._onMouseMoveHandle=dojo.connect(document.documentElement,"onmousemove",this,"_onMouseMove");
+this.timerScale=0;
+this._onMouseMove(e);
+this._expandSlowly();
+}
+},_onMouseMove:function(e){
+if((e.pageX>=this.hitX1)&&(e.pageX<=this.hitX2)&&(e.pageY>=this.hitY1)&&(e.pageY<=this.hitY2)){
+if(!this.isOver){
+this._setActive(e);
+}
+this._onGridMouseMove(e.pageX-this.hitX1,e.pageY-this.hitY1);
+}else{
+if(this.isOver){
+this._setDormant(e);
+}
+}
+},_onScroll:function(){
+this._calcHitGrid();
+},onResized:function(){
+this._calcHitGrid();
+},_onGridMouseMove:function(x,y){
+this.pos={x:x,y:y};
+this._paint();
+},_paint:function(){
+var x=this.pos.x;
+var y=this.pos.y;
+if(this.itemCount<=0){
+return;
+}
+var pos=this.isHorizontal?x:y;
+var prx=this.isHorizontal?this.proximityLeft:this.proximityTop;
+var siz=this.isHorizontal?this.itemWidth:this.itemHeight;
+var sim=this.isHorizontal?(1-this.timerScale)*this.itemWidth+this.timerScale*this.itemMaxWidth:(1-this.timerScale)*this.itemHeight+this.timerScale*this.itemMaxHeight;
+var cen=((pos-prx)/siz)-0.5;
+var _12=(sim/siz)-0.5;
+if(_12>this.effectUnits){
+_12=this.effectUnits;
+}
+var _13=0;
+if(this.anchorEdge==this.EDGE.BOTTOM){
+var _14=(y-this.proximityTop)/this.itemHeight;
+_13=(_14>0.5)?1:y/(this.proximityTop+(this.itemHeight/2));
+}
+if(this.anchorEdge==this.EDGE.TOP){
+var _14=(y-this.proximityTop)/this.itemHeight;
+_13=(_14<0.5)?1:(this.totalHeight-y)/(this.proximityBottom+(this.itemHeight/2));
+}
+if(this.anchorEdge==this.EDGE.RIGHT){
+var _14=(x-this.proximityLeft)/this.itemWidth;
+_13=(_14>0.5)?1:x/(this.proximityLeft+(this.itemWidth/2));
}
+if(this.anchorEdge==this.EDGE.LEFT){
+var _14=(x-this.proximityLeft)/this.itemWidth;
+_13=(_14<0.5)?1:(this.totalWidth-x)/(this.proximityRight+(this.itemWidth/2));
+}
+if(this.anchorEdge==this.EDGE.CENTER){
+if(this.isHorizontal){
+_13=y/(this.totalHeight);
+}else{
+_13=x/(this.totalWidth);
+}
+if(_13>0.5){
+_13=1-_13;
+}
+_13*=2;
+}
+for(var i=0;i<this.itemCount;i++){
+var _15=this._weighAt(cen,i);
+if(_15<0){
+_15=0;
+}
+this._setItemSize(i,_15*_13);
+}
+var _16=Math.round(cen);
+var _17=0;
+if(cen<0){
+_16=0;
+}else{
+if(cen>this.itemCount-1){
+_16=this.itemCount-1;
+}else{
+_17=(cen-_16)*((this.isHorizontal?this.itemWidth:this.itemHeight)-this.children[_16].sizeMain);
+}
+}
+this._positionElementsFrom(_16,_17);
+},_weighAt:function(cen,i){
+var _18=Math.abs(cen-i);
+var _19=((cen-i)>0)?this.children[i].effectRangeRght:this.children[i].effectRangeLeft;
+return (_18>_19)?0:(1-_18/_19);
+},_setItemSize:function(p,_1a){
+_1a*=this.timerScale;
+var w=Math.round(this.itemWidth+((this.itemMaxWidth-this.itemWidth)*_1a));
+var h=Math.round(this.itemHeight+((this.itemMaxHeight-this.itemHeight)*_1a));
+if(this.isHorizontal){
+this.children[p].sizeW=w;
+this.children[p].sizeH=h;
+this.children[p].sizeMain=w;
+this.children[p].sizeOff=h;
+var y=0;
+if(this.anchorEdge==this.EDGE.TOP){
+y=(this.children[p].cenY-(this.itemHeight/2));
+}else{
+if(this.anchorEdge==this.EDGE.BOTTOM){
+y=(this.children[p].cenY-(h-(this.itemHeight/2)));
+}else{
+y=(this.children[p].cenY-(h/2));
+}
+}
+this.children[p].usualX=Math.round(this.children[p].cenX-(w/2));
+this.children[p].domNode.style.top=y+"px";
+this.children[p].domNode.style.left=this.children[p].usualX+"px";
+}else{
+this.children[p].sizeW=w;
+this.children[p].sizeH=h;
+this.children[p].sizeOff=w;
+this.children[p].sizeMain=h;
+var x=0;
+if(this.anchorEdge==this.EDGE.LEFT){
+x=this.children[p].cenX-(this.itemWidth/2);
+}else{
+if(this.anchorEdge==this.EDGE.RIGHT){
+x=this.children[p].cenX-(w-(this.itemWidth/2));
+}else{
+x=this.children[p].cenX-(w/2);
+}
+}
+this.children[p].domNode.style.left=x+"px";
+this.children[p].usualY=Math.round(this.children[p].cenY-(h/2));
+this.children[p].domNode.style.top=this.children[p].usualY+"px";
+}
+this.children[p].domNode.style.width=w+"px";
+this.children[p].domNode.style.height=h+"px";
+if(this.children[p].svgNode){
+this.children[p].svgNode.setSize(w,h);
+}
+},_positionElementsFrom:function(p,_1b){
+var pos=0;
+if(this.isHorizontal){
+pos=Math.round(this.children[p].usualX+_1b);
+this.children[p].domNode.style.left=pos+"px";
+}else{
+pos=Math.round(this.children[p].usualY+_1b);
+this.children[p].domNode.style.top=pos+"px";
+}
+this._positionLabel(this.children[p]);
+var _1c=pos;
+for(var i=p-1;i>=0;i--){
+_1c-=this.children[i].sizeMain;
+if(this.isHorizontal){
+this.children[i].domNode.style.left=_1c+"px";
+}else{
+this.children[i].domNode.style.top=_1c+"px";
+}
+this._positionLabel(this.children[i]);
+}
+var _1d=pos;
+for(var i=p+1;i<this.itemCount;i++){
+_1d+=this.children[i-1].sizeMain;
+if(this.isHorizontal){
+this.children[i].domNode.style.left=_1d+"px";
+}else{
+this.children[i].domNode.style.top=_1d+"px";
+}
+this._positionLabel(this.children[i]);
+}
+},_positionLabel:function(itm){
+var x=0;
+var y=0;
+var mb=dojo.marginBox(itm.lblNode);
+if(this.labelEdge==this.EDGE.TOP){
+x=Math.round((itm.sizeW/2)-(mb.w/2));
+y=-mb.h;
+}
+if(this.labelEdge==this.EDGE.BOTTOM){
+x=Math.round((itm.sizeW/2)-(mb.w/2));
+y=itm.sizeH;
+}
+if(this.labelEdge==this.EDGE.LEFT){
+x=-mb.w;
+y=Math.round((itm.sizeH/2)-(mb.h/2));
+}
+if(this.labelEdge==this.EDGE.RIGHT){
+x=itm.sizeW;
+y=Math.round((itm.sizeH/2)-(mb.h/2));
+}
+itm.lblNode.style.left=x+"px";
+itm.lblNode.style.top=y+"px";
+},_calcHitGrid:function(){
+var pos=dojo.coords(this.domNode,true);
+this.hitX1=pos.x-this.proximityLeft;
+this.hitY1=pos.y-this.proximityTop;
+this.hitX2=this.hitX1+this.totalWidth;
+this.hitY2=this.hitY1+this.totalHeight;
+},_toEdge:function(inp,def){
+return this.EDGE[inp.toUpperCase()]||def;
+},_expandSlowly:function(){
+if(!this.isOver){
+return;
+}
+this.timerScale+=0.2;
+this._paint();
+if(this.timerScale<1){
+setTimeout(dojo.hitch(this,"_expandSlowly"),10);
+}
+},destroyRecursive:function(){
+dojo.disconnect(this._onMouseOutHandle);
+dojo.disconnect(this._onMouseMoveHandle);
+dojo.disconnect(this._addChildHandle);
+if(this.isFixed){
+dojo.disconnect(this._onScrollHandle);
+}
+dojo.disconnect(this._onResizeHandle);
+this.inherited("destroyRecursive",arguments);
+}});
+dojo.declare("dojox.widget.FisheyeListItem",[dijit._Widget,dijit._Templated,dijit._Contained],{iconSrc:"",label:"",id:"",templateString:"<div class=\"dojoxFisheyeListItem\">"+" <img class=\"dojoxFisheyeListItemImage\" dojoAttachPoint=\"imgNode\" dojoAttachEvent=\"onmouseover:onMouseOver,onmouseout:onMouseOut,onclick:onClick\">"+" <div class=\"dojoxFisheyeListItemLabel\" dojoAttachPoint=\"lblNode\"></div>"+"</div>",_isNode:function(wh){
+if(typeof Element=="function"){
+try{
+return wh instanceof Element;
+}
+catch(e){
+}
+}else{
+return wh&&!isNaN(wh.nodeType);
+}
+},_hasParent:function(_1e){
+return Boolean(_1e&&_1e.parentNode&&this._isNode(_1e.parentNode));
+},postCreate:function(){
+if((this.iconSrc.toLowerCase().substring(this.iconSrc.length-4)==".png")&&dojo.isIE<7){
+if(this._hasParent(this.imgNode)&&this.id!=""){
+var _1f=this.imgNode.parentNode;
+_1f.setAttribute("id",this.id);
+}
+this.imgNode.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.iconSrc+"', sizingMethod='scale')";
+this.imgNode.src=this._blankGif.toString();
+}else{
+if(this._hasParent(this.imgNode)&&this.id!=""){
+var _1f=this.imgNode.parentNode;
+_1f.setAttribute("id",this.id);
+}
+this.imgNode.src=this.iconSrc;
+}
+if(this.lblNode){
+this.lblNode.appendChild(document.createTextNode(this.label));
+}
+dojo.setSelectable(this.domNode,false);
+this.startup();
+},startup:function(){
+this.parent=this.getParent();
+},onMouseOver:function(e){
+if(!this.parent.isOver){
+this.parent._setActive(e);
+}
+if(this.label!=""){
+dojo.addClass(this.lblNode,"dojoxFishSelected");
+this.parent._positionLabel(this);
+}
+},onMouseOut:function(e){
+dojo.removeClass(this.lblNode,"dojoxFishSelected");
+},onClick:function(e){
+}});
+}
diff --git a/js/dojo/dojox/widget/FisheyeList/FisheyeList.css b/js/dojo/dojox/widget/FisheyeList/FisheyeList.css
--- a/js/dojo/dojox/widget/FisheyeList/FisheyeList.css
+++ b/js/dojo/dojox/widget/FisheyeList/FisheyeList.css
@@ -1,28 +1,24 @@
.dojoxFisheyeListItemLabel {
font-family: Arial, Helvetica, sans-serif;
background-color: #eee;
border: 2px solid #666;
padding: 2px;
text-align: center;
position: absolute;
display: none;
white-space:pre;
}
-
.dojoxFisheyeListItemLabel.dojoxFishSelected {
display: block;
}
-
.dojoxFisheyeListItemImage {
border: 0px;
position: absolute;
}
-
.dojoxFisheyeListItem {
position: absolute;
z-index: 2;
}
-
.dojoxFisheyeListBar {
position: relative;
}
diff --git a/js/dojo/dojox/widget/Iterator.js b/js/dojo/dojox/widget/Iterator.js
--- a/js/dojo/dojox/widget/Iterator.js
+++ b/js/dojo/dojox/widget/Iterator.js
@@ -1,177 +1,83 @@
-if(!dojo._hasResource["dojox.widget.Iterator"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.widget.Iterator"] = true;
-dojo.provide("dojox.widget.Iterator");
-dojo.require("dijit.Declaration");
-
-dojo.experimental("dojox.widget.Iterator"); // level: prototype, designed for dijit.chat.demo
-
/*
- example:
- from markup:
- | <span dojoType="dojo.data.ItemFileReadStore"
- | jsId="cstore" url="countries.json"></span>
- |
- | <div>
- | <div dojoType="dojox.widget.Iterator" store="cstore"
- | query="{ name: 'A*'}">
- | ${name} is a ${type}
- | </div>
- | </div>
-
- example:
- programmatic:
- | var store = new dojo.data.ItemFileReadStore({ url: "countries.json" });
- |
- | var iter = new dojox.widget.Iterator({
- | store: store,
- | template: ""
- | });
- |
-
- example:
- programmatic from an array of objects:
- | var dataArr = [
- | { name: "foo", valueAttr: "bar" },
- | { name: "thinger", valueAttr: "blah" }
- | ];
- |
- | var iter = new dojox.widget.Iterator({
- | data: dataArr,
- | template: ""
- | });
-
- example:
- programmatic from an array of strings:
- | var dataArr = [
- | { name: "foo", valueAttr: "bar" },
- | { name: "thinger", valueAttr: "blah" }
- | ];
- |
- | var iter = new dojox.widget.Iterator({
- | data: dataArr,
- | template: ""
- | });
-
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
*/
-dojo.declare("dojox.widget.Iterator",
- [ dijit.Declaration ],
- {
-
- constructor: (function(){
- var ctr = 0;
- return function(){
- this.attrs = [];
- this.children = [];
- this.widgetClass = "dojox.widget.Iterator._classes._"+(ctr++);
- }
- })(),
-
- start: 0,
- fetchMax: 1000,
- query: { name: "*" },
- attrs: [],
- defaultValue: "",
- widgetCtor: null,
- dataValues: [], // an array of strings
- data: null, // should be a reference to an Array
- store: null,
- _srcIndex: 0,
- _srcParent: null,
-
- _setSrcIndex: function(s){
- this._srcIndex = 0;
- this._srcParent = s.parentNode;
- var ts = s;
- while(ts.previousSibling){
- this._srcIndex++;
- ts = ts.previousSibling;
- };
- },
-
- postscript: function(p, s){
- // figure out the position of the source node in it's parent
- this._setSrcIndex(s);
- // this._srcIndex = dojo.query(">", this._srcParent).indexOf(s);
-
- this.inherited("postscript", arguments);
- var wc = this.widgetCtor = dojo.getObject(this.widgetClass);
-
- this.attrs = dojo.map(
- wc.prototype.templateString.match(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g),
- function(s){ return s.slice(2, -1); }
- );
- dojo.forEach(
- this.attrs,
- function(m){ wc.prototype[m] = ""; }
- );
- this.update();
- },
-
- clear: function(){
- if(this.children.length){
- this._setSrcIndex(this.children[0].domNode);
- }
- dojo.forEach(this.children, "item.destroy();");
- this.children = [];
- },
-
- update: function(){
- if(this.store){
- // we're executing a query
- this.fetch();
- }else{
- // we came from an array of objects. Easier!
- this.onDataAvailable(this.data||this.dataValues);
- }
- },
-
- _addItem: function(/*Object*/config, idx){
- if(dojo.isString(config)){
- config = { value: config };
- }
- var widget = new this.widgetCtor(config);
- this.children.push(widget);
- dojo.place(widget.domNode, this._srcParent, this._srcIndex+idx);
- },
-
- getAttrValuesObj: function(item){
- var obj = {};
- if(dojo.isString(item)){
- dojo.forEach(this.attrs, function(attr){
- obj[attr] = (attr == "value") ? item : this.defaultValue;
- }, this);
- }else{
- dojo.forEach(this.attrs, function(attr){
- if(this.store){
- obj[attr] = this.store.getValue(item, attr)||this.defaultValue;
- }else{
- obj[attr] = item[attr]||this.defaultValue;
- }
- }, this);
- }
- return obj;
- },
-
- onDataAvailable: function(data){
- this.clear();
- // console.debug(data);
- dojo.forEach(data, function(item, idx){
- this._addItem(this.getAttrValuesObj(item), idx);
- }, this);
- },
-
- fetch: function(query, start, end){
- this.store.fetch({
- query: query||this.query,
- start: start||this.start,
- count: end||this.fetchMax,
- onComplete: dojo.hitch(this,"onDataAvailable"),
- });
- }
+if(!dojo._hasResource["dojox.widget.Iterator"]){
+dojo._hasResource["dojox.widget.Iterator"]=true;
+dojo.provide("dojox.widget.Iterator");
+dojo.require("dijit.Declaration");
+dojo.experimental("dojox.widget.Iterator");
+dojo.declare("dojox.widget.Iterator",[dijit.Declaration],{constructor:(function(){
+var _1=0;
+return function(){
+this.attrs=[];
+this.children=[];
+this.widgetClass="dojox.widget.Iterator._classes._"+(_1++);
+};
+})(),start:0,fetchMax:1000,query:{name:"*"},attrs:[],defaultValue:"",widgetCtor:null,dataValues:[],data:null,store:null,_srcIndex:0,_srcParent:null,_setSrcIndex:function(s){
+this._srcIndex=0;
+this._srcParent=s.parentNode;
+var ts=s;
+while(ts.previousSibling){
+this._srcIndex++;
+ts=ts.previousSibling;
+}
+},postscript:function(p,s){
+this._setSrcIndex(s);
+this.inherited("postscript",arguments);
+var wc=this.widgetCtor=dojo.getObject(this.widgetClass);
+this.attrs=dojo.map(wc.prototype.templateString.match(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g),function(s){
+return s.slice(2,-1);
+});
+dojo.forEach(this.attrs,function(m){
+wc.prototype[m]="";
});
-
-dojox.widget.Iterator._classes = {};
-
+this.update();
+},clear:function(){
+if(this.children.length){
+this._setSrcIndex(this.children[0].domNode);
+}
+dojo.forEach(this.children,"item.destroy();");
+this.children=[];
+},update:function(){
+if(this.store){
+this.fetch();
+}else{
+this.onDataAvailable(this.data||this.dataValues);
+}
+},_addItem:function(_2,_3){
+if(dojo.isString(_2)){
+_2={value:_2};
}
+var _4=new this.widgetCtor(_2);
+this.children.push(_4);
+dojo.place(_4.domNode,this._srcParent,this._srcIndex+_3);
+},getAttrValuesObj:function(_5){
+var _6={};
+if(dojo.isString(_5)){
+dojo.forEach(this.attrs,function(_7){
+_6[_7]=(_7=="value")?_5:this.defaultValue;
+},this);
+}else{
+dojo.forEach(this.attrs,function(_8){
+if(this.store){
+_6[_8]=this.store.getValue(_5,_8)||this.defaultValue;
+}else{
+_6[_8]=_5[_8]||this.defaultValue;
+}
+},this);
+}
+return _6;
+},onDataAvailable:function(_9){
+this.clear();
+dojo.forEach(_9,function(_a,_b){
+this._addItem(this.getAttrValuesObj(_a),_b);
+},this);
+},fetch:function(_c,_d,_e){
+this.store.fetch({query:_c||this.query,start:_d||this.start,count:_e||this.fetchMax,onComplete:dojo.hitch(this,"onDataAvailable")});
+}});
+dojox.widget.Iterator._classes={};
+}
diff --git a/js/dojo/dojox/widget/Loader.js b/js/dojo/dojox/widget/Loader.js
--- a/js/dojo/dojox/widget/Loader.js
+++ b/js/dojo/dojox/widget/Loader.js
@@ -1,103 +1,49 @@
-if(!dojo._hasResource["dojox.widget.Loader"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.widget.Loader"] = true;
-dojo.provide("dojox.widget.Loader");
-dojo.experimental("dojox.widget.Loader");
-
-dojo.require("dijit._Widget");
-dojo.require("dijit._Templated");
-
-dojo.declare("dojox.widget.Loader", [dijit._Widget,dijit._Templated], {
- // summary: a configurable global xhr-listener to display
- // a loading message during running xhr's or to simply provide
- // base-level topic to subscribe to for custom loading messages
-
- // loadIcon: String
- // location to the icon used.
- loadIcon: dojo.moduleUrl("dojox.widget.Loader","icons/loading.gif"),
-
- // loadMessage: String
- // string to use for progress loading
- loadMessage: 'Loading ...',
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // hasVisuals: Boolean
- // true to display a fixed loading message in TR cornder, false to unly provide
- // "Loader" topic to subscribe to for your own custom loading message.
- hasVisuals: true,
-
- // attachToPointer
- // true to use visual indicator where cursor is
- attachToPointer: true,
-
- // duration: Integer
- // time in ms to toggle in/out the visual load indicator
- duration: 125,
-
- // _offset: Integer
- // distance in px from the mouse pointer to show attachToPointer avatar
- _offset: 16,
-
- // holder for mousemove connection
- _pointerConnect: null,
- _xhrStart: null,
- _xhrEnd: null,
-
- templateString: '<div dojoAttachPoint="loadNode" class="dojoxLoader">'
- +'<img src="${loadIcon}" class="dojoxLoaderIcon"> <span dojoAttachPoint="loadMessageNode" class="dojoxLoaderMessage"></span>'
- +'</div>',
-
- postCreate: function(){
- // summary: setup the loader
- if(!this.hasVisuals){
- this.loadNode.style.display = "none"; // _destroy()?
- }else{
- if(this.attachToPointer){
- dojo.removeClass(this.loadNode,"dojoxLoader");
- dojo.addClass(this.loadNode,"dojoxLoaderPointer");
- }
- this._hide();
- }
- this._setMessage(this.loadMessage);
-
- // FIXME: create our connections. would be easier, and this might be redundant
- // if Deferred published something
- this._xhrStart = dojo.connect(dojo,"_ioSetArgs",this,"_show");
- this._xhrEnd = dojo.connect(dojo.Deferred.prototype,"_fire",this,"_hide");
-
- },
-
- _setMessage: function(/* String */ message){
- // summary: set's the message in the loader
- this.loadMessageNode.innerHTML = message;
- },
-
- _putLoader: function(/* Event */ e){
- // summary: place the floating loading element based on mousemove connection position
- dijit.placeOnScreen(this.loadNode,{ x: e.clientX+this._offset, y:e.clientY+this._offset }, ["TL","BR"]);
- },
-
- _show: function(){
- // summary: publish and show progress indicator
- dojo.publish("Loader",[{ message: 'started' }]);
- if(this.hasVisuals){
- if(this.attachToPointer){
- this._pointerConnect = dojo.connect(document,"onmousemove",this,"_putLoader");
- }
- dojo.fadeIn({ node: this.loadNode, duration:this.duration }).play();
- }
- },
-
- _hide: function(){
- // summary: publish "xhr ended" and hide progress indicator
- dojo.publish("Loader",[{ message: 'ended' }]);
- if(this.hasVisuals){
- if(this.attachPointer){
- dojo.disconnect(this._pointerConnect);
- }
- dojo.fadeOut({ node: this.loadNode, duration:this.duration }).play();
- }
- }
-
-});
-
+if(!dojo._hasResource["dojox.widget.Loader"]){
+dojo._hasResource["dojox.widget.Loader"]=true;
+dojo.provide("dojox.widget.Loader");
+dojo.deprecated("dojox.widget.Loader","","2.0");
+dojo.require("dijit._Widget");
+dojo.require("dijit._Templated");
+dojo.declare("dojox.widget.Loader",[dijit._Widget,dijit._Templated],{loadIcon:dojo.moduleUrl("dojox.widget.Loader","icons/loading.gif"),loadMessage:"Loading ...",hasVisuals:true,attachToPointer:true,duration:125,_offset:16,_pointerConnect:null,_xhrStart:null,_xhrEnd:null,templateString:"<div dojoAttachPoint=\"loadNode\" class=\"dojoxLoader\">"+"<img src=\"${loadIcon}\" class=\"dojoxLoaderIcon\"> <span dojoAttachPoint=\"loadMessageNode\" class=\"dojoxLoaderMessage\"></span>"+"</div>",postCreate:function(){
+if(!this.hasVisuals){
+this.loadNode.style.display="none";
+}else{
+if(this.attachToPointer){
+dojo.removeClass(this.loadNode,"dojoxLoader");
+dojo.addClass(this.loadNode,"dojoxLoaderPointer");
+}
+this._hide();
}
+this._setMessage(this.loadMessage);
+this._xhrStart=this.connect(dojo,"_ioSetArgs","_show");
+this._xhrEnd=this.connect(dojo.Deferred.prototype,"_fire","_hide");
+},_setMessage:function(_1){
+this.loadMessageNode.innerHTML=_1;
+},_putLoader:function(e){
+dijit.placeOnScreen(this.loadNode,{x:e.clientX+this._offset,y:e.clientY+this._offset},["TL","BR"]);
+},_show:function(){
+dojo.publish("Loader",[{message:"started"}]);
+if(this.hasVisuals){
+if(this.attachToPointer){
+this._pointerConnect=this.connect(document,"onmousemove","_putLoader");
+}
+dojo.style(this.loadNode,{opacity:0,display:""});
+dojo.fadeIn({node:this.loadNode,duration:this.duration}).play();
+}
+},_hide:function(){
+dojo.publish("Loader",[{message:"ended"}]);
+if(this.hasVisuals){
+if(this.attachToPointer){
+this.disconnect(this._pointerConnect);
+}
+dojo.fadeOut({node:this.loadNode,duration:this.duration,onEnd:dojo.partial(dojo.style,this.loadNode,"display","none")}).play();
+}
+}});
+}
diff --git a/js/dojo/dojox/widget/Loader/Loader.css b/js/dojo/dojox/widget/Loader/Loader.css
--- a/js/dojo/dojox/widget/Loader/Loader.css
+++ b/js/dojo/dojox/widget/Loader/Loader.css
@@ -1,27 +1,24 @@
.dojoxLoaderPointer {
position:absolute;
z-index:999;
}
-
.dojoxLoader {
float:right;
position:fixed;
height:25px;
width:100px;
top:0;
right:0;
padding:3px;
border:1px solid #ccc;
background:#fff;
min-width:42px;
}
-
.dojoxLoaderIcon {
height:22px; width:22px;
vertical-align:middle;
}
-
.dojoxLoaderMessage {
font:8pt Arial,san-serif;
color:#666;
}
diff --git a/js/dojo/dojox/widget/README b/js/dojo/dojox/widget/README
--- a/js/dojo/dojox/widget/README
+++ b/js/dojo/dojox/widget/README
@@ -1,65 +1,176 @@
-------------------------------------------------------------------------------
dojox.widget Collection
-------------------------------------------------------------------------------
Version 1.0
Release date: 10/31/2007
-------------------------------------------------------------------------------
Project state:
-expermental | beta
+
+[Calendar] experimental
+[CalendarFx] experimental
+[ColorPicker] beta
+[Dialog] experimental
+[FeedPortlet] experimental
+[FilePicker] experimental
+[FisheyeList] experimental
+[FisheyeLite] beta
+[Iterator] experimental
+[Loader] experimental
+[Pager] experimental
+[Portlet] experimental
+[PlaceholderMenuItem] experimental
+[Roller] experimental
+[RollingList] experimental
+[SortList] experimental
+[Toaster] experimental
+[Wizard] experimental
+[AnalogGauge] experimental
+[BarGauge] experimental
+[Standby] experimental
-------------------------------------------------------------------------------
-Credits
- Peter Higgins (dante)
- Karl Tiedt (ktiedt@gmail.com)
+Credits:
+
+[Calendar] Shane O'Sullivan
+[CalendarFx] Shane O'Sullivan
+[ColorPicker] Peter Higgins (dante)
+[Dialog] Peter Higgins (dante)
+[FeedPortlet] Shane O'Sullivan
+[FilePicker] Nathan Toone (toonetown)
+[FisheyeList] Karl Tiedt (kteidt)
+[FisheyeLite] Peter Higgins (dante)
+[Iterator] Alex Russell (slightlyoff)
+[Loader] Peter Higgins (dante)
+[Pager] Nikolai Onken (nonken), Peter Higgins (dante);
+[PlaceholderMenuItem] Nathan Toone (toonetown)
+[Portlet] Shane O'Sullivan
+[Roller] Peter Higgins (dante)
+[RollingList] Nathan Toone (toonetown)
+[SortList] Peter Higgins (dante)
+[Toaster] Adam Peller (peller)
+[Wizard] Peter Higgins (dante)
+[AnalogGauge] Benjamin Schell (bmschell) CCLA
+[BarGauge] Benjamin Schell (bmschell) CCLA
+[Standby] Jared Jurkiewicz (jaredj) CCLA
+[UpgradeBar] Mike Wilcox (mwilcox), Revin Guillen
+
-------------------------------------------------------------------------------
Project description
This is a collection of standalone widgets for use in
- your website. Each individual widget is independant
+ your website. Each individual widget is independent
of the others.
+
-------------------------------------------------------------------------------
Dependencies:
Each widget has it's own requirements and dependencies.
Most inherit from dijit base-classes such as dijit._Widget,
dijit._Templated, etc ... So we will assume the availablility
of dojo (core), and dijit packages.
+
+ Each individual component stores resources in a folder that shares
+ a name with the Widget. For instance:
+
+ the Dialog lives in
+ dojox/widget/Dialog.js ...
+
+ and the folder:
+ dojox/widget/Dialog/ contains a 'Dialog.css', the required
+ styles for that particular widget. All required templates and
+ images reside in the folder.
+
+ This differs slightly from the rest of DojoX in that each other
+ project uses a shared resources/ folder in the project folder,
+ though uses the same naming convention for stylesheets and templates.
+
+ eg:
+ dojox/layout/resources/ExpandoPane.css
+ dojox.layout.ExpandoPane
+
-------------------------------------------------------------------------------
Documentation
- Please refer to the API-tool, or in-line documentation.
+ Please refer to the API-tool, or in-line documentation. All of these
+ widgets are of varying use, quality, and documentation completion.
+
-------------------------------------------------------------------------------
Installation instructions
These are standalone Widgets, so putting the [widget].js file
in your dojox/widget folder, and copying any files in the
/dojox/widget/[widget]/ folder as supplements/templates/etc
should be all you need to do.
eg: FisheyeList:
/dojox/widget/FisheyeList.js
- /dojox/widget/FisheyeList/blank.gif
/dojox/widget/FisheyeList/FisheyeList.css
should be all you need to use the Fisheye widget.
you can safely import the whole widget project into your
dojox/ root directory from the following SVN url:
- http://svn.dojotoolkit.org/dojo/dojox/widget
+ http://svn.dojotoolkit.org/src/dojox/trunk/widget
-------------------------------------------------------------------------------
Other Notes (Brief widget list):
- * ColorPicker - Photoshop-like color picker
- * FileInput - experimental dijit-like input type="file"
- * FileInputAuto/Blind - extension to FileInput for
- added flair/automation
- * FisheyeList - the classic FishEye Picker
- * Iterator - Basic array and datastore iterator class
+ * ColorPicker - An HSV ColorPicker intended to be a drop down
+
+ * Calendar - An extension on the dijit._Calendar providing a different UI
+ * CalendarFx - additional mixable FX for transitions in dojox.widget.Calendar
+
+ * Dialog - An extended version of dijit.Dialog with man options and transition.
+
+ * FilePicker - a widget for browsing server-side file systems (can use
+ dojox.data.FileStore as backend store)
+
+ * FisheyeList - the classic FishEye Picker (abandoned)
+
+ * FisheyeLite - A partial replacement for the FisheyeList - serious performance
+ gains, and entirely more extensible in that it simply animates defined
+ properties, relying on the natural styling as a foundation.
+
+ * Iterator - Basic array and data store iterator class
+
+ * Loader - an experimental Class that listens to XHR
+ connections in the background, and displays
+ a loading indicator. Loader will be removed in 1.3, and is (abandoned).
+
+ * PlaceholderMenuItem - a menu item that can be used to inject other menu
+ items at a given location. Extends dijit.Menu directly.
+
+ * Roller - A component to show many lines of text in a single area, rotating
+ through the options available. Also provides RollerSlide, an extension
+ to the stock fading roller to add a slide animation to the transition.
+
+ * RollingList - A component of the FilePicker widget
+
* SortList - a degradable UL with a fixed header, scrolling,
- and sorting. Can be the direct descendat of a
+ and sorting. Can be the direct descendant of a
LayoutContainer and will size to fit.
- * TimeSpinner - a number spinner that revolves through
- time constrainsts
- * Toaster - a messaging system to display non-obstrusive
+
+ * Toaster - a messaging system to display unobtrusive
alerts on screen.
+
+ * Wizard - a StackContainer with built-in navigation to
+ ease in the creation of 'step-based' content.
+ Requires dojo >= 1.1
+
+ * AnalogGauge - an analog style customizable gauge for displaying values in an
+ animated fashion and with multiple indicators. Supports easings for
+ indicator animations, transparent overlays, etc. Very flexible.
+ Requires dojo >= 1.3
+
+ * BarGauge - a bar style gauge for displaying values in an animated fashion
+ and with multiple indicators. Supports easings for indicator animations,
+ etc. Very flexible.
+ Requires dojo >= 1.3
+
+ * Standby - a 'blocker' style widget to overlay a translucent div + image over a DOM node/widget to indicate busy.
+ Overlay color, image, and alt text can all be customized.
+ Requires dojo >= 1.3
+
+ * UpgradeBar - Displays the "yellow bar" at the top of a page to indicate the user
+ needs to upgrade their browser or a plugin
+ Requires dojo >= 1.3
diff --git a/js/dojo/dojox/widget/SortList.js b/js/dojo/dojox/widget/SortList.js
--- a/js/dojo/dojox/widget/SortList.js
+++ b/js/dojo/dojox/widget/SortList.js
@@ -1,153 +1,86 @@
-if(!dojo._hasResource["dojox.widget.SortList"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.widget.SortList"] = true;
-dojo.provide("dojox.widget.SortList");
-dojo.experimental("dojox.widget.SortList"); // level: prototype, designed for dijit.chat.demo
-
-dojo.require("dijit.layout._LayoutWidget");
-dojo.require("dijit._Templated");
-
-dojo.declare("dojox.widget.SortList",
- [dijit.layout._LayoutWidget, dijit._Templated],
- {
- // summary: a sortable <ul> with a fixed header for use in dijit.demos.chat
- // for demonstration purposes only for now. feel free to make API suggestions
- // or fixes.
- //
- // title: String
- // the title in the header
- title: "",
-
- // heading: String
- // in the event a parent container is expecting a title="" attribute, set it for the parent
- // via title, and the title of this widget via heading="" ... assuming you want different
- // titles for each. eg: TabContainer, AccordionContainer, etc.
- heading: "",
-
- // descending: Boolean
- // toggle sort order based on this value.
- descending: true,
-
- // selected: Array
- // a list of the selected <li> nodes at any given time.
- selected: null,
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // sortable: Boolean
- // toggle to enable/disable sorting
- sortable: true,
-
- // FIXME: this is really simple store support
- store: "",
- key: "name",
-
- templateString:"<div class=\"sortList\" id=\"${id}\">\n\t\t<div class=\"sortListTitle\" dojoAttachPoint=\"titleNode\">\n\t\t<div class=\"sortListIcon\"></div>\n\t\t<span dojoAttachPoint=\"focusNode\">${title}</span>\n\t\t</div>\n\t\t<div class=\"sortListBodyWrapper\" dojoAttachEvent=\"onmouseover: _set, onmouseout: _unset, onclick:_handleClick\" dojoAttachPoint=\"bodyWrapper\">\n\t\t<ul dojoAttachPoint=\"containerNode\" class=\"sortListBody\"></ul>\n\t</div>\n</div>\n",
-
- _addItem: function(item){
- var node = document.createElement("li");
- var text = this.store.getValue(item,this.key);
- node.innerHTML = text;
- this.containerNode.appendChild(node);
- },
-
- postCreate: function(){
- if (this.store){
- // FIXME: is this right?
- this.store = eval(this.store);
- var props = {
- onItem: dojo.hitch(this,"_addItem"),
- onComplete: dojo.hitch(this,"onSort")
- };
- this.store.fetch(props);
- }else{ this.onSort(); }
- this.inherited("postCreate",arguments);
- },
-
- startup: function(){
- this.inherited("startup",arguments);
- if(this.heading){
- this.setTitle(this.heading); this.title=this.heading;
- }
- // we cheat, and give the browser just enough time so we know our height
- setTimeout(dojo.hitch(this,"resize"),5);
- if (this.sortable){ this.connect(this.titleNode,"onclick", "onSort"); }
- },
-
- resize: function(){
- // summary: do our additional calculations when resize() is called by or in a parent
- this.inherited("resize",arguments);
- // FIXME:
- // the 10 comes from the difference between the contentBox and calculated height
- // because of badding and border extents. this shouldn't be done this way, a theme change will
- // break it: but we also don't want to run getComputedStyle or dojo.coords() every time resize()
- // is fired.
- var offset = ((this._contentBox.h) - (dojo.style(this.titleNode,"height")))-10;
- this.bodyWrapper.style.height = Math.abs(offset) + "px";
- },
-
- onSort: function(/* Event */e){
- // summary: sort the data, and style the nodes.
-
- var arr = dojo.query("li",this.domNode);
- if (this.sortable){
- this.descending = !this.descending;
- dojo.addClass(this.titleNode,((this.descending)?"sortListDesc":"sortListAsc"));
- dojo.removeClass(this.titleNode,((this.descending)?"sortListAsc":"sortListDesc"));
- arr.sort(this._sorter);
- if(this.descending){ arr.reverse(); }
- }
- var i=0;
- dojo.forEach(arr,function(item){
- dojo[(((i++)%2)===0)?"addClass":"removeClass"](item,"sortListItemOdd");
- this.containerNode.appendChild(item);
- },this);
- },
-
- _set: function(/* Event */e){
- // summary: set hover state
- if (e.target != this.bodyWrapper){
- dojo.addClass(e.target,"sortListItemHover");
- }
- },
-
- _unset: function(/* Event */e){
- // summary: remove hover state (FIXME: combine with _set?)
- dojo.removeClass(e.target,"sortListItemHover");
- },
-
- _handleClick: function(/* Event */e){
- // summary: click listener for data portion of widget. toggle selected state
- // of node, and update this.selected array accordingly
- dojo.toggleClass(e.target,"sortListItemSelected");
- e.target.focus();
- this._updateValues(e.target.innerHTML);
- },
-
- _updateValues: function(){
- this._selected = dojo.query("li.sortListItemSelected",this.containerNode);
- this.selected = [];
- dojo.forEach(this._selected,function(node){
- this.selected.push(node.innerHTML);
- },this);
- this.onChanged(arguments);
- },
-
- _sorter: function(a,b){
- // summary: a basic sort function, use query sort, or keep this?
- var aStr = a.innerHTML;
- var bStr = b.innerHTML;
- if(aStr>bStr){ return 1; }
- if(aStr<bStr){ return -1; }
- return 0;
- },
-
- setTitle: function(/* String */title){
- // summary: Sets the widget title to a String
- this.focusNode.innerHTML = title;
- },
-
- onChanged: function(){
- // summary: stub function, passes the last changed item, and is fired after current state
- }
-});
-
+if(!dojo._hasResource["dojox.widget.SortList"]){
+dojo._hasResource["dojox.widget.SortList"]=true;
+dojo.provide("dojox.widget.SortList");
+dojo.experimental("dojox.widget.SortList");
+dojo.require("dijit.layout._LayoutWidget");
+dojo.require("dijit._Templated");
+dojo.declare("dojox.widget.SortList",[dijit.layout._LayoutWidget,dijit._Templated],{title:"",heading:"",descending:true,selected:null,sortable:true,store:"",key:"name",baseClass:"dojoxSortList",templateString:dojo.cache("dojox.widget","SortList/SortList.html","<div class=\"sortList\" id=\"${id}\">\n\t\t<div class=\"sortListTitle\" dojoAttachPoint=\"titleNode\">\n\t\t<div class=\"dijitInline sortListIcon\">&thinsp;</div>\n\t\t<span dojoAttachPoint=\"focusNode\">${title}</span>\n\t\t</div>\n\t\t<div class=\"sortListBodyWrapper\" dojoAttachEvent=\"onmouseover: _set, onmouseout: _unset, onclick:_handleClick\" dojoAttachPoint=\"bodyWrapper\">\n\t\t<ul dojoAttachPoint=\"containerNode\" class=\"sortListBody\"></ul>\n\t</div>\n</div>\n"),_addItem:function(_1){
+dojo.create("li",{innerHTML:this.store.getValue(_1,this.key).replace(/</g,"&lt;")},this.containerNode);
+},postCreate:function(){
+if(this.store){
+this.store=dojo.getObject(this.store);
+var _2={onItem:dojo.hitch(this,"_addItem"),onComplete:dojo.hitch(this,"onSort")};
+this.store.fetch(_2);
+}else{
+this.onSort();
+}
+this.inherited(arguments);
+},startup:function(){
+this.inherited(arguments);
+if(this.heading){
+this.setTitle(this.heading);
+this.title=this.heading;
+}
+setTimeout(dojo.hitch(this,"resize"),5);
+if(this.sortable){
+this.connect(this.titleNode,"onclick","onSort");
}
+},resize:function(){
+this.inherited(arguments);
+var _3=((this._contentBox.h)-(dojo.style(this.titleNode,"height")))-10;
+this.bodyWrapper.style.height=Math.abs(_3)+"px";
+},onSort:function(e){
+var _4=dojo.query("li",this.domNode);
+if(this.sortable){
+this.descending=!this.descending;
+dojo.addClass(this.titleNode,((this.descending)?"sortListDesc":"sortListAsc"));
+dojo.removeClass(this.titleNode,((this.descending)?"sortListAsc":"sortListDesc"));
+_4.sort(this._sorter);
+if(this.descending){
+_4.reverse();
+}
+}
+var i=0;
+dojo.forEach(_4,function(_5){
+dojo[(i++)%2===0?"addClass":"removeClass"](_5,"sortListItemOdd");
+this.containerNode.appendChild(_5);
+},this);
+},_set:function(e){
+if(e.target!==this.bodyWrapper){
+dojo.addClass(e.target,"sortListItemHover");
+}
+},_unset:function(e){
+dojo.removeClass(e.target,"sortListItemHover");
+},_handleClick:function(e){
+dojo.toggleClass(e.target,"sortListItemSelected");
+e.target.focus();
+this._updateValues(e.target.innerHTML);
+},_updateValues:function(){
+this._selected=dojo.query("li.sortListItemSelected",this.containerNode);
+this.selected=[];
+dojo.forEach(this._selected,function(_6){
+this.selected.push(_6.innerHTML);
+},this);
+this.onChanged(arguments);
+},_sorter:function(a,b){
+var _7=a.innerHTML;
+var _8=b.innerHTML;
+if(_7>_8){
+return 1;
+}
+if(_7<_8){
+return -1;
+}
+return 0;
+},setTitle:function(_9){
+this.focusNode.innerHTML=this.title=_9;
+},onChanged:function(){
+}});
+}
diff --git a/js/dojo/dojox/widget/SortList/SortList.css b/js/dojo/dojox/widget/SortList/SortList.css
--- a/js/dojo/dojox/widget/SortList/SortList.css
+++ b/js/dojo/dojox/widget/SortList/SortList.css
@@ -1,64 +1,57 @@
.sortListBody { margin:0; padding:0; background:#fff; }
-
.soria .sortListBody li,
.tundra .sortListBody li {
border-bottom:1px solid #b7b7b7;
padding:2px 2px 2px 5px;
}
.sortListTitle {
cursor:pointer;
padding:4px 4px 3px 4px;
}
.sortList { height:100%; width:100%; }
+.dijitBorderContainer .dojoxSortList { width: auto; height: auto;}
.sortListBodyWrapper {
border:1px solid #b7b7b7;
overflow:auto;
height:100%;
cursor:pointer;
}
-
.soria .sortListBodyWrapper {
border:1px solid #333;
}
-
.soria .sortListItemOdd,
.tundra .sortListItemOdd { background:#f2f5f9; }
.tundra .sortListTitle {
background:#fafafa url('../../../dijit/themes/tundra/images/titleBarBg.gif') repeat-x top left;
border:1px solid #bfbfbf;
border-bottom:0;
}
.soria .sortListTitle {
- background:#4f8ce5 url('../../../dijit/themes/soria/images/gradientTopBg.png') repeat-x top left;
+ background:#4f8ce5 url('../../../dijit/themes/soria/images/titleBar.png') repeat-x top left;
background-position:0px -1px;
border:1px solid #333;
border-bottom:0;
font-weight:bold;
color:#fff;
}
-
.sortListItemSelected { background:#b7cdee !important; }
.sortListItemHover { background:#ff6 !important; }
-
.soria .sortListIcon,
.tundra .sortListIcon {
float:right;
- height:16px;
- width:16px;
+ background:url('../../../dijit/themes/tundra/images/spriteArrows.png') no-repeat;
+ width: 7px;
}
.tundra .sortListDesc .sortListIcon {
- background:url('../../../dijit/themes/tundra/images/arrowDown.png') no-repeat center center;
+ background-position: 0px center;
}
.tundra .sortListAsc .sortListIcon {
- background:url('../../../dijit/themes/tundra/images/arrowUp.png') no-repeat center center;
+ background-position: -21px center;
}
-
.soria .sortListDesc .sortListIcon,
.soria .sortListAsc .sortListIcon {
- background:url('../../../dijit/themes/soria/images/arrows.png') no-repeat center center;
- background-position:0px 0px;
+ background:url('../../../dijit/themes/soria/images/spriteRoundedIconsSmall.png') no-repeat -15px top;
}
-
.soria .sortListDesc .sortListIcon {
- background-position:-32px 0px;
+ background-position:-45px 0px;
}
diff --git a/js/dojo/dojox/widget/SortList/SortList.html b/js/dojo/dojox/widget/SortList/SortList.html
--- a/js/dojo/dojox/widget/SortList/SortList.html
+++ b/js/dojo/dojox/widget/SortList/SortList.html
@@ -1,9 +1,9 @@
<div class="sortList" id="${id}">
<div class="sortListTitle" dojoAttachPoint="titleNode">
- <div class="sortListIcon"></div>
+ <div class="dijitInline sortListIcon">&thinsp;</div>
<span dojoAttachPoint="focusNode">${title}</span>
</div>
<div class="sortListBodyWrapper" dojoAttachEvent="onmouseover: _set, onmouseout: _unset, onclick:_handleClick" dojoAttachPoint="bodyWrapper">
<ul dojoAttachPoint="containerNode" class="sortListBody"></ul>
</div>
</div>
\ No newline at end of file
diff --git a/js/dojo/dojox/widget/Toaster.js b/js/dojo/dojox/widget/Toaster.js
--- a/js/dojo/dojox/widget/Toaster.js
+++ b/js/dojo/dojox/widget/Toaster.js
@@ -1,252 +1,173 @@
-if(!dojo._hasResource["dojox.widget.Toaster"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.widget.Toaster"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.widget.Toaster"]){
+dojo._hasResource["dojox.widget.Toaster"]=true;
dojo.provide("dojox.widget.Toaster");
-
dojo.require("dojo.fx");
-
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
-
-// This is mostly taken from Jesse Kuhnert's MessageNotifier.
-// Modified by Bryan Forbes to support topics and a variable delay.
-// Modified by Karl Tiedt to support 0 duration messages that require user interaction and message stacking
-
-dojo.declare("dojox.widget.Toaster", [dijit._Widget, dijit._Templated], {
- // summary
- // Message that slides in from the corner of the screen, used for notifications
- // like "new email".
- templateString: '<div dojoAttachPoint="clipNode"><div dojoAttachPoint="containerNode" dojoAttachEvent="onclick:onSelect"><div dojoAttachPoint="contentNode"></div></div></div>',
-
- // messageTopic: String
- // Name of topic; anything published to this topic will be displayed as a message.
- // Message format is either String or an object like
- // {message: "hello word", type: "error", duration: 500}
- messageTopic: "",
-
- _uniqueId: 0,
-
- // messageTypes: Enumeration
- // Possible message types.
- messageTypes: {
- MESSAGE: "message",
- WARNING: "warning",
- ERROR: "error",
- FATAL: "fatal"
- },
-
- // defaultType: String
- // If message type isn't specified (see "messageTopic" parameter),
- // then display message as this type.
- // Possible values in messageTypes enumeration ("message", "warning", "error", "fatal")
- defaultType: "message",
-
- // positionDirection: String
- // Position from which message slides into screen, one of
- // ["br-up", "br-left", "bl-up", "bl-right", "tr-down", "tr-left", "tl-down", "tl-right"]
- positionDirection: "br-up",
-
- // positionDirectionTypes: Array
- // Possible values for positionDirection parameter
- positionDirectionTypes: ["br-up", "br-left", "bl-up", "bl-right", "tr-down", "tr-left", "tl-down", "tl-right"],
-
- // duration: Integer
- // Number of milliseconds to show message
- duration: "2000",
-
- //separator: String
- // String used to separate messages if consecutive calls are made to setContent before previous messages go away
- separator: "<hr></hr>",
-
- postCreate: function(){
- dojox.widget.Toaster.superclass.postCreate.apply(this);
- this.hide();
-
- this.clipNode.className = "dijitToasterClip";
- this.containerNode.className += " dijitToasterContainer";
- this.contentNode.className = "dijitToasterContent";
- if(this.messageTopic){
- dojo.subscribe(this.messageTopic, this, "_handleMessage");
- }
- },
-
- _handleMessage: function(/*String|Object*/message){
- if(dojo.isString(message)){
- this.setContent(message);
- }else{
- this.setContent(message.message, message.type, message.duration);
- }
- },
-
- setContent: function(/*String*/message, /*String*/messageType, /*int?*/duration){
- // summary
- // sets and displays the given message and show duration
- // message:
- // the message
- // messageType:
- // type of message; possible values in messageTypes enumeration ("message", "warning", "error", "fatal")
- // duration:
- // duration in milliseconds to display message before removing it. Widget has default value.
- duration = duration||this.duration;
- // sync animations so there are no ghosted fades and such
- if(this.slideAnim){
- if(this.slideAnim.status() != "playing"){
- this.slideAnim.stop();
- }
- if(this.slideAnim.status() == "playing" || (this.fadeAnim && this.fadeAnim.status() == "playing")){
- setTimeout(dojo.hitch(this, function(){
- this.setContent(message, messageType);
- }), 50);
- return;
- }
- }
-
- var capitalize = function(word){
- return word.substring(0,1).toUpperCase() + word.substring(1);
- };
-
- // determine type of content and apply appropriately
- for(var type in this.messageTypes){
- dojo.removeClass(this.containerNode, "dijitToaster" + capitalize(this.messageTypes[type]));
- }
-
- dojo.style(this.containerNode, "opacity", 1);
-
- if(message && this.isVisible){
- message = this.contentNode.innerHTML + this.separator + message;
- }
- this.contentNode.innerHTML = message;
-
- dojo.addClass(this.containerNode, "dijitToaster" + capitalize(messageType || this.defaultType));
-
- // now do funky animation of widget appearing from
- // bottom right of page and up
- this.show();
- var nodeSize = dojo.marginBox(this.containerNode);
-
- if(this.isVisible){
- this._placeClip();
- }else{
- var style = this.containerNode.style;
- var pd = this.positionDirection;
- // sets up initial position of container node and slide-out direction
- if(pd.indexOf("-up") >= 0){
- style.left=0+"px";
- style.top=nodeSize.h + 10 + "px";
- }else if(pd.indexOf("-left") >= 0){
- style.left=nodeSize.w + 10 +"px";
- style.top=0+"px";
- }else if(pd.indexOf("-right") >= 0){
- style.left = 0 - nodeSize.w - 10 + "px";
- style.top = 0+"px";
- }else if(pd.indexOf("-down") >= 0){
- style.left = 0+"px";
- style.top = 0 - nodeSize.h - 10 + "px";
- }else{
- throw new Error(this.id + ".positionDirection is invalid: " + pd);
- }
-
- this.slideAnim = dojo.fx.slideTo({
- node: this.containerNode,
- top: 0, left: 0,
- duration: 450});
- dojo.connect(this.slideAnim, "onEnd", this, function(nodes, anim){
- //we build the fadeAnim here so we dont have to duplicate it later
- // can't do a fadeHide because we're fading the
- // inner node rather than the clipping node
- this.fadeAnim = dojo.fadeOut({
- node: this.containerNode,
- duration: 1000});
- dojo.connect(this.fadeAnim, "onEnd", this, function(evt){
- this.isVisible = false;
- this.hide();
- });
- //if duration == 0 we keep the message displayed until clicked
- //TODO: fix so that if a duration > 0 is displayed when a duration==0 is appended to it, the fadeOut is canceled
- if(duration>0){
- setTimeout(dojo.hitch(this, function(evt){
- // we must hide the iframe in order to fade
- // TODO: figure out how to fade with a BackgroundIframe
- if(this.bgIframe && this.bgIframe.iframe){
- this.bgIframe.iframe.style.display="none";
- }
- this.fadeAnim.play();
- }), duration);
- }else{
- dojo.connect(this, 'onSelect', this, function(evt){
- this.fadeAnim.play();
- });
- }
- this.isVisible = true;
- });
- this.slideAnim.play();
- }
- },
-
- _placeClip: function(){
- var view = dijit.getViewport();
-
- var nodeSize = dojo.marginBox(this.containerNode);
-
- var style = this.clipNode.style;
- // sets up the size of the clipping node
- style.height = nodeSize.h+"px";
- style.width = nodeSize.w+"px";
-
- // sets up the position of the clipping node
- var pd = this.positionDirection;
- if(pd.match(/^t/)){
- style.top = view.t+"px";
- }else if(pd.match(/^b/)){
- style.top = (view.h - nodeSize.h - 2 + view.t)+"px";
- }
- if(pd.match(/^[tb]r-/)){
- style.left = (view.w - nodeSize.w - 1 - view.l)+"px";
- }else if(pd.match(/^[tb]l-/)){
- style.left = 0 + "px";
- }
-
- style.clip = "rect(0px, " + nodeSize.w + "px, " + nodeSize.h + "px, 0px)";
- if(dojo.isIE){
- if(!this.bgIframe){
- this.clipNode.id = "__dojoXToaster_"+this._uniqueId++;
- this.bgIframe = new dijit.BackgroundIframe(this.clipNode);
-//TODO this.bgIframe.setZIndex(this.clipNode);
- }
-//TODO this.bgIframe.onResized();
- var iframe = this.bgIframe.iframe;
- iframe && (iframe.style.display="block");
- }
- },
-
- onSelect: function(/*Event*/e){
- // summary: callback for when user clicks the message
- },
-
- show: function(){
- // summary: show the Toaster
- dojo.style(this.containerNode, 'display', '');
-
- this._placeClip();
-
- if(!this._scrollConnected){
- this._scrollConnected = dojo.connect(window, "onscroll", this, this._placeClip);
- }
- },
-
- hide: function(){
- // summary: hide the Toaster
-
- //Q: ALP: I didn't port all the toggler stuff from d.w.HtmlWidget. Is it needed? Ditto for show.
- dojo.style(this.containerNode, 'display', 'none');
-
- if(this._scrollConnected){
- dojo.disconnect(this._scrollConnected);
- this._scrollConnected = false;
- }
-
- dojo.style(this.containerNode, "opacity", 1);
- }
- }
-);
-
+dojo.declare("dojox.widget.Toaster",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"dijitToasterClip\" dojoAttachPoint=\"clipNode\"><div class=\"dijitToasterContainer\" dojoAttachPoint=\"containerNode\" dojoAttachEvent=\"onclick:onSelect\"><div class=\"dijitToasterContent\" dojoAttachPoint=\"contentNode\"></div></div></div>",messageTopic:"",messageTypes:{MESSAGE:"message",WARNING:"warning",ERROR:"error",FATAL:"fatal"},defaultType:"message",positionDirection:"br-up",positionDirectionTypes:["br-up","br-left","bl-up","bl-right","tr-down","tr-left","tl-down","tl-right"],duration:2000,slideDuration:500,separator:"<hr></hr>",postCreate:function(){
+this.inherited(arguments);
+this.hide();
+dojo.body().appendChild(this.domNode);
+if(this.messageTopic){
+dojo.subscribe(this.messageTopic,this,"_handleMessage");
+}
+},_handleMessage:function(_1){
+if(dojo.isString(_1)){
+this.setContent(_1);
+}else{
+this.setContent(_1.message,_1.type,_1.duration);
+}
+},_capitalize:function(w){
+return w.substring(0,1).toUpperCase()+w.substring(1);
+},setContent:function(_2,_3,_4){
+_4=_4||this.duration;
+if(this.slideAnim){
+if(this.slideAnim.status()!="playing"){
+this.slideAnim.stop();
+}
+if(this.slideAnim.status()=="playing"||(this.fadeAnim&&this.fadeAnim.status()=="playing")){
+setTimeout(dojo.hitch(this,function(){
+this.setContent(_2,_3,_4);
+}),50);
+return;
+}
+}
+for(var _5 in this.messageTypes){
+dojo.removeClass(this.containerNode,"dijitToaster"+this._capitalize(this.messageTypes[_5]));
+}
+dojo.style(this.containerNode,"opacity",1);
+this._setContent(_2);
+dojo.addClass(this.containerNode,"dijitToaster"+this._capitalize(_3||this.defaultType));
+this.show();
+var _6=dojo.marginBox(this.containerNode);
+this._cancelHideTimer();
+if(this.isVisible){
+this._placeClip();
+if(!this._stickyMessage){
+this._setHideTimer(_4);
+}
+}else{
+var _7=this.containerNode.style;
+var pd=this.positionDirection;
+if(pd.indexOf("-up")>=0){
+_7.left=0+"px";
+_7.top=_6.h+10+"px";
+}else{
+if(pd.indexOf("-left")>=0){
+_7.left=_6.w+10+"px";
+_7.top=0+"px";
+}else{
+if(pd.indexOf("-right")>=0){
+_7.left=0-_6.w-10+"px";
+_7.top=0+"px";
+}else{
+if(pd.indexOf("-down")>=0){
+_7.left=0+"px";
+_7.top=0-_6.h-10+"px";
+}else{
+throw new Error(this.id+".positionDirection is invalid: "+pd);
+}
+}
+}
}
+this.slideAnim=dojo.fx.slideTo({node:this.containerNode,top:0,left:0,duration:this.slideDuration});
+this.connect(this.slideAnim,"onEnd",function(_8,_9){
+this.fadeAnim=dojo.fadeOut({node:this.containerNode,duration:1000});
+this.connect(this.fadeAnim,"onEnd",function(_a){
+this.isVisible=false;
+this.hide();
+});
+this._setHideTimer(_4);
+this.connect(this,"onSelect",function(_b){
+this._cancelHideTimer();
+this._stickyMessage=false;
+this.fadeAnim.play();
+});
+this.isVisible=true;
+});
+this.slideAnim.play();
+}
+},_setContent:function(_c){
+if(dojo.isFunction(_c)){
+_c(this);
+return;
+}
+if(_c&&this.isVisible){
+_c=this.contentNode.innerHTML+this.separator+_c;
+}
+this.contentNode.innerHTML=_c;
+},_cancelHideTimer:function(){
+if(this._hideTimer){
+clearTimeout(this._hideTimer);
+this._hideTimer=null;
+}
+},_setHideTimer:function(_d){
+this._cancelHideTimer();
+if(_d>0){
+this._cancelHideTimer();
+this._hideTimer=setTimeout(dojo.hitch(this,function(_e){
+if(this.bgIframe&&this.bgIframe.iframe){
+this.bgIframe.iframe.style.display="none";
+}
+this._hideTimer=null;
+this._stickyMessage=false;
+this.fadeAnim.play();
+}),_d);
+}else{
+this._stickyMessage=true;
+}
+},_placeClip:function(){
+var _f=dijit.getViewport();
+var _10=dojo.marginBox(this.containerNode);
+var _11=this.clipNode.style;
+_11.height=_10.h+"px";
+_11.width=_10.w+"px";
+var pd=this.positionDirection;
+if(pd.match(/^t/)){
+_11.top=_f.t+"px";
+}else{
+if(pd.match(/^b/)){
+_11.top=(_f.h-_10.h-2+_f.t)+"px";
+}
+}
+if(pd.match(/^[tb]r-/)){
+_11.left=(_f.w-_10.w-1-_f.l)+"px";
+}else{
+if(pd.match(/^[tb]l-/)){
+_11.left=0+"px";
+}
+}
+_11.clip="rect(0px, "+_10.w+"px, "+_10.h+"px, 0px)";
+if(dojo.isIE){
+if(!this.bgIframe){
+this.clipNode.id=dijit.getUniqueId("dojox_widget_Toaster_clipNode");
+this.bgIframe=new dijit.BackgroundIframe(this.clipNode);
+}
+var _12=this.bgIframe.iframe;
+if(_12){
+_12.style.display="block";
+}
+}
+},onSelect:function(e){
+},show:function(){
+dojo.style(this.domNode,"display","block");
+this._placeClip();
+if(!this._scrollConnected){
+this._scrollConnected=dojo.connect(window,"onscroll",this,this._placeClip);
+}
+},hide:function(){
+dojo.style(this.domNode,"display","none");
+if(this._scrollConnected){
+dojo.disconnect(this._scrollConnected);
+this._scrollConnected=false;
+}
+dojo.style(this.containerNode,"opacity",1);
+}});
+}
diff --git a/js/dojo/dojox/widget/Toaster/Toaster.css b/js/dojo/dojox/widget/Toaster/Toaster.css
--- a/js/dojo/dojox/widget/Toaster/Toaster.css
+++ b/js/dojo/dojox/widget/Toaster/Toaster.css
@@ -1,47 +1,39 @@
-/* main classes for dojox.widget.Toaster */
-.tundra .dijitToasterContent{
+.dijitToasterContent {
padding:1em;
padding-top:0.25em;
background:#73c74a;
}
-
-.tundra .dijitToasterMessage{
+.dijitToasterMessage{
color:#fff;
}
-.tundra .dijitToasterWarning{ }
-.tundra .dijitToasterError,
-.tundra .dijitToasterFatal{
+.dijitToasterWarning{ }
+.dijitToasterError,
+.dijitToasterFatal{
font-weight:bold;
color:#fff;
}
-
-.tundra .dijitToasterWarning .dijitToasterContent{
+.dijitToasterWarning .dijitToasterContent{
padding:1em;
padding-top:0.25em;
background:#d4d943;
}
-
-.tundra .dijitToasterError .dijitToasterContent{
+.dijitToasterError .dijitToasterContent{
padding:1em;
padding-top:0.25em;
background:#c46600;
}
-
-
-/* imported from dijit.css */
.dijitToasterClip {
position: absolute;
+ z-index: 5000;
overflow: hidden;
}
-
.dijitToasterContainer {
display: block;
position: absolute;
width: 17.5em;
- z-index: 5000;
margin: 0px;
font:0.75em Tahoma, Helvetica, Verdana, Arial;
}
-
\ No newline at end of file
+
diff --git a/js/dojo/dojox/wire.js b/js/dojo/dojox/wire.js
--- a/js/dojo/dojox/wire.js
+++ b/js/dojo/dojox/wire.js
@@ -1,7 +1,12 @@
-if(!dojo._hasResource["dojox.wire"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.wire"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.wire"]){
+dojo._hasResource["dojox.wire"]=true;
dojo.provide("dojox.wire");
dojo.require("dojox.wire._base");
-
-
}
diff --git a/js/dojo/dojox/wire/CompositeWire.js b/js/dojo/dojox/wire/CompositeWire.js
--- a/js/dojo/dojox/wire/CompositeWire.js
+++ b/js/dojo/dojox/wire/CompositeWire.js
@@ -1,103 +1,44 @@
-if(!dojo._hasResource["dojox.wire.CompositeWire"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.wire.CompositeWire"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.wire.CompositeWire"]){
+dojo._hasResource["dojox.wire.CompositeWire"]=true;
dojo.provide("dojox.wire.CompositeWire");
-
dojo.require("dojox.wire._base");
dojo.require("dojox.wire.Wire");
-
-dojo.declare("dojox.wire.CompositeWire", dojox.wire.Wire, {
- // summary:
- // A Wire for composite values in object or array
- // description:
- // This class has multiple child Wires for object properties or array
- // elements.
- // When an object with Wires is specified to 'children' property, they
- // are used to get or set an object with property values.
- // When an array of Wiares is specified to 'children' property, they
- // are used to get or set an array with element values.
-
- _wireClass: "dojox.wire.CompositeWire",
-
- constructor: function(/*Object*/args){
- // summary:
- // Initialize properties
- // description:
- // If object properties or array elements specified in 'children'
- // property are not Wires, Wires are created from them as
- // arguments, with 'parent' property set to this Wire instance.
- // args:
- // Arguments to initialize properties
- // children:
- // An object or array containing child Wires
- this._initializeChildren(this.children);
- },
- _getValue: function(/*Object||Array*/object){
- // summary:
- // Return an object with property values or an array with element
- // values
- // description:
- // This method calls getValue() method of the child Wires with
- // 'object' argument and returns an object with the values as
- // properties or an arary of the values as elements.
- // object:
- // A root object
- // returns:
- // An object or array with values
- if(!object || !this.children){
- return object; //Object||Array
- }
-
- var value = (dojo.isArray(this.children) ? [] : {}); // array or object
- for(var c in this.children){
- value[c] = this.children[c].getValue(object);
- }
- return value;//Object||Array
- },
-
- _setValue: function(/*Object||Array*/object, /*Object||Array*/value){
- // summary:
- // Set an object properties or an array elements to an object
- // desription:
- // This method calls setValues() method of the child Wires with
- // a corresponding property or element in 'value' argument and
- // 'object' argument.
- // object:
- // A root object
- // value:
- // An object or array with values to set
- // returns:
- // 'object'
- if(!object || !this.children){
- return object; //Object||Array
- }
-
- for(var c in this.children){
- this.children[c].setValue(value[c], object);
- }
- return object; //Object||Array
- },
-
- _initializeChildren: function(/*Object||Array*/children){
- // summary:
- // Initialize child Wires
- // description:
- // If object properties or array elements specified in 'children'
- // argument are not Wires, Wires are created from them as
- // arguments, with 'parent' property set to this Wire instance.
- // children:
- // An object or array containing child Wires
- if(!children){
- return; //undefined
- }
-
- for(var c in children){
- var child = children[c];
- child.parent = this;
- if(!dojox.wire.isWire(child)){
- children[c] = dojox.wire.create(child);
- }
- }
- }
-});
-
+dojo.declare("dojox.wire.CompositeWire",dojox.wire.Wire,{_wireClass:"dojox.wire.CompositeWire",constructor:function(_1){
+this._initializeChildren(this.children);
+},_getValue:function(_2){
+if(!_2||!this.children){
+return _2;
+}
+var _3=(dojo.isArray(this.children)?[]:{});
+for(var c in this.children){
+_3[c]=this.children[c].getValue(_2);
+}
+return _3;
+},_setValue:function(_4,_5){
+if(!_4||!this.children){
+return _4;
}
+for(var c in this.children){
+this.children[c].setValue(_5[c],_4);
+}
+return _4;
+},_initializeChildren:function(_6){
+if(!_6){
+return;
+}
+for(var c in _6){
+var _7=_6[c];
+_7.parent=this;
+if(!dojox.wire.isWire(_7)){
+_6[c]=dojox.wire.create(_7);
+}
+}
+}});
+}
diff --git a/js/dojo/dojox/wire/DataWire.js b/js/dojo/dojox/wire/DataWire.js
--- a/js/dojo/dojox/wire/DataWire.js
+++ b/js/dojo/dojox/wire/DataWire.js
@@ -1,179 +1,84 @@
-if(!dojo._hasResource["dojox.wire.DataWire"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.wire.DataWire"] = true;
-dojo.provide("dojox.wire.DataWire");
-
-dojo.require("dojox.wire.Wire");
-
-dojo.declare("dojox.wire.DataWire", dojox.wire.Wire, {
- // summary:
- // A Wire for item attributes of data stores
- // description:
- // This class accesses item attributes of data stores with a dotted
- // notation of attribute names specified to 'attribute' property,
- // using data APIs of a data store specified to 'dataStore' property.
- // The root object for this class must be an item of the data store.
- // Intermediate attribute names in the dotted notation specify
- // attributes for child items, which are used for repeated calls to
- // data APIs until reached to a descendant attribute.
- // Attribute names may have an array index, such as "a[0]", to
- // identify an array element of the attribute value.
-
- _wireClass: "dojox.wire.DataWire",
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- constructor: function(/*Object*/args){
- // summary:
- // Initialize properties
- // description:
- // If 'dataStore' property is not specified, but 'parent' property
- // is specified, 'dataStore' property is copied from the parent.
- // args:
- // Arguments to initialize properties
- // dataStore:
- // A data store
- // attribute:
- // A dotted notation to a descendant attribute
- if(!this.dataStore && this.parent){
- this.dataStore = this.parent.dataStore;
- }
- },
- _getValue: function(/*Object*/object){
- // summary:
- // Return an attribute value of an item
- // description:
- // This method uses a root item passed in 'object' argument and
- // 'attribute' property to call getValue() method of
- // 'dataStore'.
- // If an attribute name have an array suffix ("[]"), getValues()
- // method is called, instead.
- // If an index is specified in the array suffix, an array element
- // for the index is returned, instead of the array itself.
- // object:
- // A root item
- // returns:
- // A value found, otherwise 'undefined'
- if(!object || !this.attribute || !this.dataStore){
- return object; //Object
- }
-
- var value = object;
- var list = this.attribute.split('.');
- for(var i in list){
- value = this._getAttributeValue(value, list[i]);
- if(!value){
- return undefined; //undefined
- }
- }
- return value; //anything
- },
-
- _setValue: function(/*Object*/object, /*anything*/value){
- // summary:
- // Set an attribute value to an item
- // description:
- // This method uses a root item passed in 'object' argument and
- // 'attribute' property to identify an item.
- // Then, setValue() method of 'dataStore' is called with a leaf
- // attribute name and 'value' argument.
- // If an attribute name have an array suffix ("[]"), setValues()
- // method is called, instead.
- // If an index is specified in the array suffix, an array element
- // for the index is set to 'value', instead of the array itself.
- // object:
- // A root item
- // value:
- // A value to set
- // returns:
- // 'object', or 'undefined' for invalid attribute
- if(!object || !this.attribute || !this.dataStore){
- return object; //Object
- }
- var item = object;
- var list = this.attribute.split('.');
- var last = list.length - 1;
- for(var i = 0; i < last; i++){
- item = this._getAttributeValue(item, list[i]);
- if(!item){
- return undefined; //undefined
- }
- }
- this._setAttributeValue(item, list[last], value);
- return object; //Object
- },
-
- _getAttributeValue: function(/*Object*/item, /*String*/attribute){
- // summary:
- // Return an attribute value of an item
- // description:
- // This method uses an item passed in 'item' argument and
- // 'attribute' argument to call getValue() method of 'dataStore'.
- // If an attribute name have an array suffix ("[]"), getValues()
- // method is called, instead.
- // If an index is specified in the array suffix, an array element
- // for the index is returned, instead of the array itself.
- // item:
- // An item
- // attribute
- // An attribute name
- // returns:
- // A value found, otherwise 'undefined'
- var value = undefined;
- var i1 = attribute.indexOf('[');
- if(i1 >= 0){
- var i2 = attribute.indexOf(']');
- var index = attribute.substring(i1 + 1, i2);
- attribute = attribute.substring(0, i1);
- var array = this.dataStore.getValues(item, attribute);
- if(array){
- if(!index){ // return array for "attribute[]"
- value = array;
- }else{
- value = array[index];
- }
- }
- }else{
- value = this.dataStore.getValue(item, attribute);
- }
- return value; //anything
- },
-
- _setAttributeValue: function(/*Object*/item, /*String*/attribute, /*anything*/value){
- // summary:
- // Set an attribute value to an item
- // description:
- // This method uses an item passed in 'item' argument and
- // 'attribute' argument to call setValue() method of 'dataStore'
- // with 'value' argument.
- // If an attribute name have an array suffix ("[]"), setValues()
- // method is called, instead.
- // If an index is specified in the array suffix, an array element
- // for the index is set to 'value', instead of the array itself.
- // item:
- // An item
- // attribute:
- // An attribute name
- // value:
- // A value to set
- var i1 = attribute.indexOf('[');
- if(i1 >= 0){
- var i2 = attribute.indexOf(']');
- var index = attribute.substring(i1 + 1, i2);
- attribute = attribute.substring(0, i1);
- var array = null;
- if(!index){ // replace whole array for "attribute[]"
- array = value;
- }else{
- array = this.dataStore.getValues(item, attribute);
- if(!array){
- array = [];
- }
- array[index] = value;
- }
- this.dataStore.setValues(item, attribute, array);
- }else{
- this.dataStore.setValue(item, attribute, value);
- }
- }
-});
-
+if(!dojo._hasResource["dojox.wire.DataWire"]){
+dojo._hasResource["dojox.wire.DataWire"]=true;
+dojo.provide("dojox.wire.DataWire");
+dojo.require("dojox.wire.Wire");
+dojo.declare("dojox.wire.DataWire",dojox.wire.Wire,{_wireClass:"dojox.wire.DataWire",constructor:function(_1){
+if(!this.dataStore&&this.parent){
+this.dataStore=this.parent.dataStore;
+}
+},_getValue:function(_2){
+if(!_2||!this.attribute||!this.dataStore){
+return _2;
+}
+var _3=_2;
+var _4=this.attribute.split(".");
+for(var i in _4){
+_3=this._getAttributeValue(_3,_4[i]);
+if(!_3){
+return undefined;
+}
+}
+return _3;
+},_setValue:function(_5,_6){
+if(!_5||!this.attribute||!this.dataStore){
+return _5;
+}
+var _7=_5;
+var _8=this.attribute.split(".");
+var _9=_8.length-1;
+for(var i=0;i<_9;i++){
+_7=this._getAttributeValue(_7,_8[i]);
+if(!_7){
+return undefined;
+}
}
+this._setAttributeValue(_7,_8[_9],_6);
+return _5;
+},_getAttributeValue:function(_a,_b){
+var _c=undefined;
+var i1=_b.indexOf("[");
+if(i1>=0){
+var i2=_b.indexOf("]");
+var _d=_b.substring(i1+1,i2);
+_b=_b.substring(0,i1);
+var _e=this.dataStore.getValues(_a,_b);
+if(_e){
+if(!_d){
+_c=_e;
+}else{
+_c=_e[_d];
+}
+}
+}else{
+_c=this.dataStore.getValue(_a,_b);
+}
+return _c;
+},_setAttributeValue:function(_f,_10,_11){
+var i1=_10.indexOf("[");
+if(i1>=0){
+var i2=_10.indexOf("]");
+var _12=_10.substring(i1+1,i2);
+_10=_10.substring(0,i1);
+var _13=null;
+if(!_12){
+_13=_11;
+}else{
+_13=this.dataStore.getValues(_f,_10);
+if(!_13){
+_13=[];
+}
+_13[_12]=_11;
+}
+this.dataStore.setValues(_f,_10,_13);
+}else{
+this.dataStore.setValue(_f,_10,_11);
+}
+}});
+}
diff --git a/js/dojo/dojox/wire/README b/js/dojo/dojox/wire/README
--- a/js/dojo/dojox/wire/README
+++ b/js/dojo/dojox/wire/README
@@ -1,53 +1,54 @@
-------------------------------------------------------------------------------
DojoX Wire
-------------------------------------------------------------------------------
Version 1.0
Release date: 05/29/2007
-------------------------------------------------------------------------------
-Project state: stable
+Project state: production
-------------------------------------------------------------------------------
Project authors
Jared Jurkiewicz (jared.jurkiewicz@gmail.com)
-------------------------------------------------------------------------------
Project description
The DojoX Wire project is a set of functions that build a generic data binding
and service invocation library to simplify how data values across a wide
variety of widget and non-widget JavaScript constructs are accessed, updated,
and passed to and from services. It also provides a set of widgets
within the dojox.wire.ml package to allow for declarative data binding
definitions in addition to the programmatic APIs.
In essense, this project is an API to provide a simplified way of doing MVC
patterns in the client.
-------------------------------------------------------------------------------
Dependencies:
DojoX Wire has dependencies on core dojo, the dijit widget system (for classes
-in the dojox.wire.ml package), dojox.data, and the D.O.H. unit test framework.
+in the dojox.wire.ml package), dojox.data, dojox.xml, and the D.O.H. unit test
+framework.
-------------------------------------------------------------------------------
Documentation:
See the Dojo API tool (http://dojotoolkit.org/api)
-------------------------------------------------------------------------------
Installation instructions
Grab the following from the Dojo SVN Repository:
http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/wire.js
http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/wire/*
Install into the following directory structure:
/dojox/wire/
...which should be at the same level as your Dojo checkout.
It should look like:
/dojox/wire.js
/dojox/wire/*
Require in dojox.wire for all baseline functions (dojox.wire.connect,
dojox.wire.register, etc). For specific Wire classes,
require in the appropriate dojox.wire.<Class>.
-------------------------------------------------------------------------------
diff --git a/js/dojo/dojox/wire/TableAdapter.js b/js/dojo/dojox/wire/TableAdapter.js
--- a/js/dojo/dojox/wire/TableAdapter.js
+++ b/js/dojo/dojox/wire/TableAdapter.js
@@ -1,88 +1,37 @@
-if(!dojo._hasResource["dojox.wire.TableAdapter"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.wire.TableAdapter"] = true;
-dojo.provide("dojox.wire.TableAdapter");
-
-dojo.require("dojox.wire.CompositeWire");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.declare("dojox.wire.TableAdapter", dojox.wire.CompositeWire, {
- // summary:
- // A composite Wire for table rows
- // description:
- // This class has multiple child Wires for object properties or array
- // elements of a table row.
- // The root object for this class must be an array.
- // When an object with Wires is specified to 'columns' property, they
- // are used to get a row object with property values.
- // When an array of Wires is specified to 'columns' property, they
- // are used to get a row array with element values.
- // The row values are returned in an array.
- // This class only supports getValue(), but not setValue().
-
- _wireClass: "dojox.wire.TableAdapter",
-
- constructor: function(/*Object*/args){
- // summary:
- // Initialize properties
- // description:
- // If object properties or array elements specified in 'columns'
- // property are not Wires, Wires are created from them as
- // arguments, with 'parent' property set to this Wire instance.
- // args:
- // Arguments to initialize properties
- // columns:
- // An object or array containing child Wires for column values
- this._initializeChildren(this.columns);
- },
- _getValue: function(/*Array*/object){
- // summary:
- // Return an array of table row value (object or array)
- // description:
- // This method iterates over an array specified to 'object'
- // argument and calls getValue() method of the child Wires with
- // each element of the array to get a row object or array.
- // Finally, an array with the row objects or arrays are retuned.
- // object:
- // A root array
- // returns:
- // An array of table row value
- if(!object || !this.columns){
- return object; //Array
- }
-
- var array = object;
- if(!dojo.isArray(array)){
- array = [array];
- }
-
- var rows = [];
- for(var i in array){
- var row = this._getRow(array[i]);
- rows.push(row);
- }
- return rows; //Array
- },
-
- _setValue: function(/*Array*/object, /*Array*/value){
- // summary:
- // Not supported
- throw new Error("Unsupported API: " + this._wireClass + "._setValue");
- },
-
- _getRow: function(/*Object||Array*/object){
- // summary:
- // Return an array or object for a table row
- // description:
- // This method calls getValue() method of the child Wires to
- // create a row object or array.
- // returns:
- // An array or object for a table row
- var row = (dojo.isArray(this.columns) ? [] : {}); // array or object
- for(var c in this.columns){
- row[c] = this.columns[c].getValue(object);
- }
- return row; //Array||Object
- }
-});
-
+if(!dojo._hasResource["dojox.wire.TableAdapter"]){
+dojo._hasResource["dojox.wire.TableAdapter"]=true;
+dojo.provide("dojox.wire.TableAdapter");
+dojo.require("dojox.wire.CompositeWire");
+dojo.declare("dojox.wire.TableAdapter",dojox.wire.CompositeWire,{_wireClass:"dojox.wire.TableAdapter",constructor:function(_1){
+this._initializeChildren(this.columns);
+},_getValue:function(_2){
+if(!_2||!this.columns){
+return _2;
+}
+var _3=_2;
+if(!dojo.isArray(_3)){
+_3=[_3];
}
+var _4=[];
+for(var i in _3){
+var _5=this._getRow(_3[i]);
+_4.push(_5);
+}
+return _4;
+},_setValue:function(_6,_7){
+throw new Error("Unsupported API: "+this._wireClass+"._setValue");
+},_getRow:function(_8){
+var _9=(dojo.isArray(this.columns)?[]:{});
+for(var c in this.columns){
+_9[c]=this.columns[c].getValue(_8);
+}
+return _9;
+}});
+}
diff --git a/js/dojo/dojox/wire/TextAdapter.js b/js/dojo/dojox/wire/TextAdapter.js
--- a/js/dojo/dojox/wire/TextAdapter.js
+++ b/js/dojo/dojox/wire/TextAdapter.js
@@ -1,88 +1,40 @@
-if(!dojo._hasResource["dojox.wire.TextAdapter"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.wire.TextAdapter"] = true;
-dojo.provide("dojox.wire.TextAdapter");
-
-dojo.require("dojox.wire.CompositeWire");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.declare("dojox.wire.TextAdapter", dojox.wire.CompositeWire, {
- // summary:
- // A composite Wire for a concatenated text
- // description:
- // This class has multiple child Wires for text segment values.
- // Wires in 'segments' property are used to get text segments and
- // values are concatenated with an optional delimiter string specified
- // to 'delimiter' property.
-
- _wireClass: "dojox.wire.TextAdapter",
-
- constructor: function(/*Object*/args){
- // summary:
- // Initialize properties
- // description:
- // If array elements specified in 'segments' are not Wires, Wires
- // are created from them as arguments, with 'parent' property set
- // to this Wire instance.
- // args:
- // Arguments to initialize properties
- // segments:
- // An array containing child Wires for text segment values
- // delimiter:
- // A delimiter string
- this._initializeChildren(this.segments);
- if(!this.delimiter){
- this.delimiter = "";
- }
- },
- _getValue: function(/*Object||Array*/object){
- // summary:
- // Return a concatenated text
- // description:
- // This method calls getValue() method of the child Wires wuth
- // 'object' argument and concatenate the values with 'delimiter'
- // property to return.
- // arg:
- // A root object
- // returns:
- // A concatinated text
- if(!object || !this.segments){
- return object; //Object||Array
- }
-
- var text = "";
- for(var i in this.segments){
- var segment = this.segments[i].getValue(object);
- text = this._addSegment(text, segment);
- }
- return text; //String
- },
-
- _setValue: function(/*Object||Array*/object, /*String*/value){
- // summary:
- // Not supported
- throw new Error("Unsupported API: " + this._wireClass + "._setValue");
- },
-
- _addSegment: function(/*String*/text, /*String*/segment){
- // summary:
- // Return a concatenated text
- // description:
- // This method add a text segment specified to 'segment' argument
- // to a base text specified to 'text', with 'delimiter' property.
- // text:
- // A base text
- // segment:
- // A text segment to add
- // returns:
- // A concatinated text
- if(!segment){
- return text; //String
- }else if(!text){
- return segment; //String
- }else{
- return text + this.delimiter + segment; //String
- }
- }
-});
-
+if(!dojo._hasResource["dojox.wire.TextAdapter"]){
+dojo._hasResource["dojox.wire.TextAdapter"]=true;
+dojo.provide("dojox.wire.TextAdapter");
+dojo.require("dojox.wire.CompositeWire");
+dojo.declare("dojox.wire.TextAdapter",dojox.wire.CompositeWire,{_wireClass:"dojox.wire.TextAdapter",constructor:function(_1){
+this._initializeChildren(this.segments);
+if(!this.delimiter){
+this.delimiter="";
+}
+},_getValue:function(_2){
+if(!_2||!this.segments){
+return _2;
}
+var _3="";
+for(var i in this.segments){
+var _4=this.segments[i].getValue(_2);
+_3=this._addSegment(_3,_4);
+}
+return _3;
+},_setValue:function(_5,_6){
+throw new Error("Unsupported API: "+this._wireClass+"._setValue");
+},_addSegment:function(_7,_8){
+if(!_8){
+return _7;
+}else{
+if(!_7){
+return _8;
+}else{
+return _7+this.delimiter+_8;
+}
+}
+}});
+}
diff --git a/js/dojo/dojox/wire/TreeAdapter.js b/js/dojo/dojox/wire/TreeAdapter.js
--- a/js/dojo/dojox/wire/TreeAdapter.js
+++ b/js/dojo/dojox/wire/TreeAdapter.js
@@ -1,188 +1,88 @@
-if(!dojo._hasResource["dojox.wire.TreeAdapter"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.wire.TreeAdapter"] = true;
-dojo.provide("dojox.wire.TreeAdapter");
-
-dojo.require("dojox.wire.CompositeWire");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.declare("dojox.wire.TreeAdapter", dojox.wire.CompositeWire, {
- // summary:
- // A composite Wire for tree nodes
- // description:
- // This class has multiple child Wires for tree nodes, their title and
- // child nodes.
- // The root object for this class must be an array.
- // 'node' Wires in 'nodes' property is used to identify an object
- // representing a node.
- // 'title' Wires in 'nodes' property is used to get the title string
- // of a node.
- // 'children' Wires in 'nodes' property is used to iterate over child
- // node objects.
- // The node values are returned in an array as follows:
- // [
- // {title: title1,
- // children: [
- // {title: title2,
- // child: ...},
- // {title: title3,
- // child: ...},
- // ...
- // ]},
- // ...
- // ]
- // This class only supports getValue(), but not setValue().
-
- _wireClass: "dojox.wire.TreeAdapter",
-
- constructor: function(/*Object*/args){
- // summary:
- // Initialize properties
- // description:
- // If object properties ('node', 'title' and 'children') of array
- // elements specified in 'nodes' property are not Wires, Wires are
- // created from them as arguments, with 'parent' property set to
- // this Wire instance.
- // args:
- // Arguments to initialize properties
- // nodes:
- // An array containing objects for child Wires for node values
- this._initializeChildren(this.nodes);
- },
- _getValue: function(/*Array*/object){
- // summary:
- // Return an array of tree node values
- // description:
- // This method iterates over an array specified to 'object'
- // argument and calls getValue() method of 'node' Wires with each
- // element of the array to get object(s) that represetns nodes.
- // (If 'node' Wires are omitted, the array element is used for
- // further processing.)
- // Then, getValue() method of 'title' Wires are called to get
- // title strings for nodes.
- // (If 'title' Wires are omitted, the objects representing nodes
- // are used as title strings.)
- // And if an array of objects with 'node' and 'title' Wires is
- // specified to 'children', it is used to gather child nodes and
- // their title strings in the same way recursively.
- // Finally, an array of the top-level node objects are retuned.
- // object:
- // A root array
- // returns:
- // An array of tree node values
- if(!object || !this.nodes){
- return object; //Array
- }
-
- var array = object;
- if(!dojo.isArray(array)){
- array = [array];
- }
-
- var nodes = [];
- for(var i in array){
- for(var i2 in this.nodes){
- nodes = nodes.concat(this._getNodes(array[i], this.nodes[i2]));
- }
- }
- return nodes; //Array
- },
-
- _setValue: function(/*Array*/object, /*Array*/value){
- // summary:
- // Not supported
- throw new Error("Unsupported API: " + this._wireClass + "._setValue");
- },
- _initializeChildren: function(/*Array*/children){
- // summary:
- // Initialize child Wires
- // description:
- // If 'node' or 'title' properties of array elements specified in
- // 'children' argument are not Wires, Wires are created from them
- // as arguments, with 'parent' property set to this Wire instance.
- // If an array element has 'children' property, this method is
- // called recursively with it.
- // children:
- // An array of objects containing child Wires
- if(!children){
- return; //undefined
- }
-
- for(var i in children){
- var child = children[i];
- if(child.node){
- child.node.parent = this;
- if(!dojox.wire.isWire(child.node)){
- child.node = dojox.wire.create(child.node);
- }
- }
- if(child.title){
- child.title.parent = this;
- if(!dojox.wire.isWire(child.title)){
- child.title = dojox.wire.create(child.title);
- }
- }
- if(child.children){
- this._initializeChildren(child.children);
- }
- }
- },
-
- _getNodes: function(/*Object*/object, /*Object*/child){
- // summary:
- // Return an array of tree node values
- // description:
- // This method calls getValue() method of 'node' Wires with
- // 'object' argument to get object(s) that represents nodes.
- // (If 'node' Wires are omitted, 'object' is used for further
- // processing.)
- // Then, getValue() method of 'title' Wires are called to get
- // title strings for nodes.
- // (If 'title' Wires are omitted, the objects representing nodes
- // are used as title strings.)
- // And if an array of objects with 'node' and 'title' Wires is
- // specified to 'children', it is used to gather child nodes and
- // their title strings in the same way recursively.
- // Finally, an array of node objects are returned.
- // object:
- // An object
- // child:
- // An object with child Wires
- // returns:
- var array = null;
- if(child.node){
- array = child.node.getValue(object);
- if(!array){
- return [];
- }
- if(!dojo.isArray(array)){
- array = [array];
- }
- }else{
- array = [object];
- }
-
- var nodes = [];
- for(var i in array){
- object = array[i];
- var node = {};
- if(child.title){
- node.title = child.title.getValue(object);
- }else{
- node.title = object;
- }
- if(child.children){
- var children = [];
- for(var i2 in child.children){
- children = children.concat(this._getNodes(object, child.children[i2]));
- }
- if(children.length > 0){
- node.children = children;
- }
- }
- nodes.push(node);
- }
- return nodes; //Array
- }
-});
-
+if(!dojo._hasResource["dojox.wire.TreeAdapter"]){
+dojo._hasResource["dojox.wire.TreeAdapter"]=true;
+dojo.provide("dojox.wire.TreeAdapter");
+dojo.require("dojox.wire.CompositeWire");
+dojo.declare("dojox.wire.TreeAdapter",dojox.wire.CompositeWire,{_wireClass:"dojox.wire.TreeAdapter",constructor:function(_1){
+this._initializeChildren(this.nodes);
+},_getValue:function(_2){
+if(!_2||!this.nodes){
+return _2;
+}
+var _3=_2;
+if(!dojo.isArray(_3)){
+_3=[_3];
+}
+var _4=[];
+for(var i in _3){
+for(var i2 in this.nodes){
+_4=_4.concat(this._getNodes(_3[i],this.nodes[i2]));
+}
+}
+return _4;
+},_setValue:function(_5,_6){
+throw new Error("Unsupported API: "+this._wireClass+"._setValue");
+},_initializeChildren:function(_7){
+if(!_7){
+return;
+}
+for(var i in _7){
+var _8=_7[i];
+if(_8.node){
+_8.node.parent=this;
+if(!dojox.wire.isWire(_8.node)){
+_8.node=dojox.wire.create(_8.node);
+}
+}
+if(_8.title){
+_8.title.parent=this;
+if(!dojox.wire.isWire(_8.title)){
+_8.title=dojox.wire.create(_8.title);
+}
}
+if(_8.children){
+this._initializeChildren(_8.children);
+}
+}
+},_getNodes:function(_9,_a){
+var _b=null;
+if(_a.node){
+_b=_a.node.getValue(_9);
+if(!_b){
+return [];
+}
+if(!dojo.isArray(_b)){
+_b=[_b];
+}
+}else{
+_b=[_9];
+}
+var _c=[];
+for(var i in _b){
+_9=_b[i];
+var _d={};
+if(_a.title){
+_d.title=_a.title.getValue(_9);
+}else{
+_d.title=_9;
+}
+if(_a.children){
+var _e=[];
+for(var i2 in _a.children){
+_e=_e.concat(this._getNodes(_9,_a.children[i2]));
+}
+if(_e.length>0){
+_d.children=_e;
+}
+}
+_c.push(_d);
+}
+return _c;
+}});
+}
diff --git a/js/dojo/dojox/wire/Wire.js b/js/dojo/dojox/wire/Wire.js
--- a/js/dojo/dojox/wire/Wire.js
+++ b/js/dojo/dojox/wire/Wire.js
@@ -1,336 +1,231 @@
-if(!dojo._hasResource["dojox.wire.Wire"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.wire.Wire"] = true;
-dojo.provide("dojox.wire.Wire");
-
-dojo.require("dojox.wire._base");
-
-dojo.declare("dojox.wire.Wire", null, {
- // summary:
- // A default and base Wire to access an object property
- // description:
- // This class accesses a property of an object with a dotted notation
- // specified to 'property' property, such as "a.b.c", which identifies
- // a descendant property, "object.a.b.c".
- // Property names in the dotted notation may have an array index, such
- // as "a[0]", to identify an array element, literally, "object.a[0]".
- // When a notation start with an array index, such as "[0].a", it
- // specifies an array element of the root object (array),
- // "object[0].a".
- // This class also serves as a base class for other Wire classes,
- // preparing a root object and converting a return value, so that
- // sub-classes just can implement _getValue() and _setValue() called
- // from getValue() and setValue() implemented by this calss.
-
- _wireClass: "dojox.wire.Wire",
-
- constructor: function(/*Object*/args){
- // summary:
- // Initialize properties
- // description:
- // If 'converter' property is specified and is a string for
- // a converter class, an instanceof the converter class is
- // created.
- // args:
- // Arguments to initialize properties
- // object:
- // A root object (or another Wire to access a root object)
- // property:
- // A dotted notation to a descendant property
- // type:
- // A type of the return value (for the source Wire)
- // converter:
- // A converter object (or class name) to convert the return
- // value (for the source Wire)
- dojo.mixin(this, args);
-
- if(this.converter){
- if(dojo.isString(this.converter)){
- //First check the object tree for it. Might be defined variable
- //name/global function (like a jsId, or just a function name).
- var convertObject = dojo.getObject(this.converter);
- if (dojo.isFunction(convertObject)){
- //We need to see if this is a pure function or an object constructor...
- try{
- var testObj = new convertObject();
- if(testObj && !dojo.isFunction(testObj["convert"])){
- //Looks like a 'pure' function...
- this.converter = {convert: convertObject};
- }else{
- this.converter = testObj;
- }
- }catch(e){
- //Do if this fails.
- }
- }else if(dojo.isObject(convertObject)){
- //It's an object, like a jsId ... see if it has a convert function
- if(dojo.isFunction(convertObject["convert"])){
- this.converter = convertObject;
- }
- }
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- //No object with that name (Converter is still a string),
- //then look for a class that needs to be dynamically loaded...
- if (dojo.isString(this.converter)) {
- var converterClass = dojox.wire._getClass(this.converter);
- if(converterClass){
- this.converter = new converterClass();
- }else{
- this.converter = undefined;
- }
- }
- }else if(dojo.isFunction(this.converter)){
- this.converter = {convert: this.converter};
- }
- }
- },
-
- getValue: function(/*Object||Array*/defaultObject){
- // summary:
- // Return a value of an object
- // description:
- // This method first determins a root object as follows:
- // 1. If 'object' property specified,
- // 1.1 If 'object' is a Wire, its getValue() method is called to
- // obtain a root object.
- // 1.2 Otherwise, use 'object' as a root object.
- // 2. Otherwise, use 'defaultObject' argument.
- // 3. If 'property' is specified, it is used to get a property
- // value.
- // Then, if a sub-class implements _getValue() method, it is
- // called with the root object to get the return value.
- // Otherwise, the root object (typically, a property valye) is
- // used for the return value.
- // Finally, if 'type' property is specified, the return value is
- // converted to the specified primitive type ("string", "number",
- // "boolean" and "array").
- // If 'converter' property is specified, its convert() method is
- // called to convert the value.
- // defaultObject:
- // A default root object
- // returns:
- // A value found
- var object = undefined;
- if(dojox.wire.isWire(this.object)){
- object = this.object.getValue(defaultObject);
- }else{
- object = (this.object || defaultObject);
- }
-
- if(this.property){
- var list = this.property.split('.');
- for(var i in list){
- if(!object){
- return object; //anything (null, undefined, etc)
- }
- object = this._getPropertyValue(object, list[i]);
- }
- }
-
- var value = undefined;
- if(this._getValue){
- value = this._getValue(object);
- }else{
- value = object;
- }
-
- if(value){
- if(this.type){
- if(this.type == "string"){
- value = value.toString();
- }else if(this.type == "number"){
- value = parseInt(value);
- }else if(this.type == "boolean"){
- value = (value != "false");
- }else if(this.type == "array"){
- if(!dojo.isArray(value)){
- value = [value];
- }
- }
- }
- if(this.converter && this.converter.convert){
- value = this.converter.convert(value, this); // optional "this" context
- }
- }
- return value; //anything
- },
- setValue: function(/*anything*/value, /*Object||Array*/defaultObject){
- // summary:
- // Set a value to an object
- // description:
- // This method first determins a root object as follows:
- // 1. If 'object' property specified,
- // 1.1 If 'object' is a Wire, its getValue() method is called to
- // obtain a root object.
- // 1.2 Otherwise, use 'object' as a root object.
- // 2. Otherwise, use 'defaultObject' argument.
- // 3. If 'property' is specified, it is used to get a property
- // value.
- // Then, if a sub-class implements _setValue() method, it is
- // called with the root object and 'value' argument to set
- // the value.
- // Otherwise, 'value' is set to a property specified with
- // 'property' property.
- // If the root object is undefined and 'object' property is a Wire
- // and a new object is created and returned by _setValue() it is
- // set through 'object' (setValue() method).
- // value:
- // A value to set
- // defaultObject:
- // A default root object
- var object = undefined;
- if(dojox.wire.isWire(this.object)){
- object = this.object.getValue(defaultObject);
- }else{
- object = (this.object || defaultObject);
- }
-
- var property = undefined;
- if(this.property){
- if(!object){
- if(dojox.wire.isWire(this.object)){
- object = {};
- this.object.setValue(object, defaultObject);
- }else{
- throw new Error(this._wireClass + ".setValue(): invalid object");
- }
- }
- var list = this.property.split('.');
- var last = list.length - 1;
- for(var i = 0; i < last; i++){
- var p = list[i];
- var o = this._getPropertyValue(object, p);
- if(!o){
- o = {};
- this._setPropertyValue(object, p, o);
- }
- object = o;
- }
- property = list[last];
- }
-
- if(this._setValue){
- if(property){
- var o = this._getPropertyValue(object, property);
- if(!o){
- o = {};
- this._setPropertyValue(object, property, o);
- }
- object = o;
- }
- var newObject = this._setValue(object, value);
- if(!object && newObject){
- if(dojox.wire.isWire(this.object)){
- this.object.setValue(newObject, defaultObject);
- }else{
- throw new Error(this._wireClass + ".setValue(): invalid object");
- }
- }
- }else{
- if(property){
- this._setPropertyValue(object, property, value);
- }else{
- if(dojox.wire.isWire(this.object)){
- this.object.setValue(value, defaultObject);
- }else{
- throw new Error(this._wireClass + ".setValue(): invalid property");
- }
- }
- }
- },
-
- _getPropertyValue: function(/*Object||Array*/object, /*String*/property){
- // summary:
- // Return a property value of an object
- // description:
- // A value for 'property' of 'object' is returned.
- // If 'property' ends with an array index, it is used to indentify
- // an element of an array property.
- // If 'object' implements getPropertyValue(), it is called with
- // 'property' to obtain the property value.
- // If 'object' implements a getter for the property, it is called
- // to obtain the property value.
- // object:
- // A default root object
- // property:
- // A property name
- // returns:
- // A value found, otherwise 'undefined'
- var value = undefined;
- var i1 = property.indexOf('[');
- if(i1 >= 0){
- var i2 = property.indexOf(']');
- var index = property.substring(i1 + 1, i2);
- var array = null;
- if(i1 === 0){ // object is array
- array = object;
- }else{
- property = property.substring(0, i1);
- array = this._getPropertyValue(object, property);
- if(array && !dojo.isArray(array)){
- array = [array];
- }
- }
- if(array){
- value = array[index];
- }
- }else if(object.getPropertyValue){
- value = object.getPropertyValue(property);
- }else{
- var getter = "get" + property.charAt(0).toUpperCase() + property.substring(1);
- if(object[getter]){
- value = object[getter]();
- }else{
- value = object[property];
- }
- }
- return value; //anything
- },
-
- _setPropertyValue: function(/*Object||Array*/object, /*String*/property, /*anything*/value){
- // summary:
- // Set a property value to an object
- // description:
- // 'value' is set to 'property' of 'object'.
- // If 'property' ends with an array index, it is used to indentify
- // an element of an array property to set the value.
- // If 'object' implements setPropertyValue(), it is called with
- // 'property' and 'value' to set the property value.
- // If 'object' implements a setter for the property, it is called
- // with 'value' to set the property value.
- // object:
- // An object
- // property:
- // A property name
- // value:
- // A value to set
- var i1 = property.indexOf('[');
- if(i1 >= 0){
- var i2 = property.indexOf(']');
- var index = property.substring(i1 + 1, i2);
- var array = null;
- if(i1 === 0){ // object is array
- array = object;
- }else{
- property = property.substring(0, i1);
- array = this._getPropertyValue(object, property);
- if(!array){
- array = [];
- this._setPropertyValue(object, property, array);
- }
- }
- array[index] = value;
- }else if(object.setPropertyValue){
- object.setPropertyValue(property, value);
- }else{
- var setter = "set" + property.charAt(0).toUpperCase() + property.substring(1);
- if(object[setter]){
- object[setter](value);
- }else{
- object[property] = value;
- }
- }
- }
-});
-
+if(!dojo._hasResource["dojox.wire.Wire"]){
+dojo._hasResource["dojox.wire.Wire"]=true;
+dojo.provide("dojox.wire.Wire");
+dojo.require("dojox.wire._base");
+dojo.declare("dojox.wire.Wire",null,{_wireClass:"dojox.wire.Wire",constructor:function(_1){
+dojo.mixin(this,_1);
+if(this.converter){
+if(dojo.isString(this.converter)){
+var _2=dojo.getObject(this.converter);
+if(dojo.isFunction(_2)){
+try{
+var _3=new _2();
+if(_3&&!dojo.isFunction(_3["convert"])){
+this.converter={convert:_2};
+}else{
+this.converter=_3;
+}
+}
+catch(e){
+}
+}else{
+if(dojo.isObject(_2)){
+if(dojo.isFunction(_2["convert"])){
+this.converter=_2;
+}
+}
+}
+if(dojo.isString(this.converter)){
+var _4=dojox.wire._getClass(this.converter);
+if(_4){
+this.converter=new _4();
+}else{
+this.converter=undefined;
+}
+}
+}else{
+if(dojo.isFunction(this.converter)){
+this.converter={convert:this.converter};
+}
+}
+}
+},getValue:function(_5){
+var _6=undefined;
+if(dojox.wire.isWire(this.object)){
+_6=this.object.getValue(_5);
+}else{
+_6=(this.object||_5);
+}
+if(this.property){
+var _7=this.property.split(".");
+for(var i in _7){
+if(!_6){
+return _6;
+}
+_6=this._getPropertyValue(_6,_7[i]);
+}
+}
+var _8=undefined;
+if(this._getValue){
+_8=this._getValue(_6);
+}else{
+_8=_6;
+}
+if(_8){
+if(this.type){
+if(this.type=="string"){
+_8=_8.toString();
+}else{
+if(this.type=="number"){
+_8=parseInt(_8,10);
+}else{
+if(this.type=="boolean"){
+_8=(_8!="false");
+}else{
+if(this.type=="array"){
+if(!dojo.isArray(_8)){
+_8=[_8];
+}
+}
+}
+}
+}
+}
+if(this.converter&&this.converter.convert){
+_8=this.converter.convert(_8,this);
+}
+}
+return _8;
+},setValue:function(_9,_a){
+var _b=undefined;
+if(dojox.wire.isWire(this.object)){
+_b=this.object.getValue(_a);
+}else{
+_b=(this.object||_a);
+}
+var _c=undefined;
+var o;
+if(this.property){
+if(!_b){
+if(dojox.wire.isWire(this.object)){
+_b={};
+this.object.setValue(_b,_a);
+}else{
+throw new Error(this._wireClass+".setValue(): invalid object");
+}
}
+var _d=this.property.split(".");
+var _e=_d.length-1;
+for(var i=0;i<_e;i++){
+var p=_d[i];
+o=this._getPropertyValue(_b,p);
+if(!o){
+o={};
+this._setPropertyValue(_b,p,o);
+}
+_b=o;
+}
+_c=_d[_e];
+}
+if(this._setValue){
+if(_c){
+o=this._getPropertyValue(_b,_c);
+if(!o){
+o={};
+this._setPropertyValue(_b,_c,o);
+}
+_b=o;
+}
+var _f=this._setValue(_b,_9);
+if(!_b&&_f){
+if(dojox.wire.isWire(this.object)){
+this.object.setValue(_f,_a);
+}else{
+throw new Error(this._wireClass+".setValue(): invalid object");
+}
+}
+}else{
+if(_c){
+this._setPropertyValue(_b,_c,_9);
+}else{
+if(dojox.wire.isWire(this.object)){
+this.object.setValue(_9,_a);
+}else{
+throw new Error(this._wireClass+".setValue(): invalid property");
+}
+}
+}
+},_getPropertyValue:function(_10,_11){
+var _12=undefined;
+var i1=_11.indexOf("[");
+if(i1>=0){
+var i2=_11.indexOf("]");
+var _13=_11.substring(i1+1,i2);
+var _14=null;
+if(i1===0){
+_14=_10;
+}else{
+_11=_11.substring(0,i1);
+_14=this._getPropertyValue(_10,_11);
+if(_14&&!dojo.isArray(_14)){
+_14=[_14];
+}
+}
+if(_14){
+_12=_14[_13];
+}
+}else{
+if(_10.getPropertyValue){
+_12=_10.getPropertyValue(_11);
+}else{
+var _15="get"+_11.charAt(0).toUpperCase()+_11.substring(1);
+if(this._useAttr(_10)){
+_12=_10.attr(_11);
+}else{
+if(_10[_15]){
+_12=_10[_15]();
+}else{
+_12=_10[_11];
+}
+}
+}
+}
+return _12;
+},_setPropertyValue:function(_16,_17,_18){
+var i1=_17.indexOf("[");
+if(i1>=0){
+var i2=_17.indexOf("]");
+var _19=_17.substring(i1+1,i2);
+var _1a=null;
+if(i1===0){
+_1a=_16;
+}else{
+_17=_17.substring(0,i1);
+_1a=this._getPropertyValue(_16,_17);
+if(!_1a){
+_1a=[];
+this._setPropertyValue(_16,_17,_1a);
+}
+}
+_1a[_19]=_18;
+}else{
+if(_16.setPropertyValue){
+_16.setPropertyValue(_17,_18);
+}else{
+var _1b="set"+_17.charAt(0).toUpperCase()+_17.substring(1);
+if(this._useAttr(_16)){
+_16.attr(_17,_18);
+}else{
+if(_16[_1b]){
+_16[_1b](_18);
+}else{
+_16[_17]=_18;
+}
+}
+}
+}
+},_useAttr:function(_1c){
+var _1d=false;
+if(dojo.isFunction(_1c.attr)){
+_1d=true;
+}
+return _1d;
+}});
+}
diff --git a/js/dojo/dojox/wire/XmlWire.js b/js/dojo/dojox/wire/XmlWire.js
--- a/js/dojo/dojox/wire/XmlWire.js
+++ b/js/dojo/dojox/wire/XmlWire.js
@@ -1,244 +1,135 @@
-if(!dojo._hasResource["dojox.wire.XmlWire"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.wire.XmlWire"] = true;
-dojo.provide("dojox.wire.XmlWire");
-
-dojo.require("dojox.data.dom");
-dojo.require("dojox.wire.Wire");
-
-dojo.declare("dojox.wire.XmlWire", dojox.wire.Wire, {
- // summary:
- // A Wire for XML nodes or values (element, attribute and text)
- // description:
- // This class accesses XML nodes or value with a simplified XPath
- // specified to 'path' property.
- // The root object for this class must be an DOM document or element
- // node.
- // "@name" accesses to an attribute value of an element and "text()"
- // accesses to a text value of an element.
- // The hierarchy of the elements from the root node can be specified
- // with slash-separated list, such as "a/b/@c", which specifies
- // the value of an attribute named "c" of an element named "b" as
- // a child of another element named "a" of a child of the root node.
-
- _wireClass: "dojox.wire.XmlWire",
-
- constructor: function(/*Object*/args){
- // summary:
- // Initialize properties
- // description:
- // 'args' is just mixed in with no further processing.
- // args:
- // Arguments to initialize properties
- // path:
- // A simplified XPath to an attribute, a text or elements
- },
- _getValue: function(/*Node*/object){
- // summary:
- // Return an attribute value, a text value or an array of elements
- // description:
- // This method first uses a root node passed in 'object' argument
- // and 'path' property to identify an attribute, a text or
- // elements.
- // If 'path' starts with a slash (absolute), the first path
- // segment is ignored assuming it point to the root node.
- // (That is, "/a/b/@c" and "b/@c" against a root node access
- // the same attribute value, assuming the root node is an element
- // with a tag name, "a".)
- // object:
- // A root node
- // returns:
- // A value found, otherwise 'undefined'
- if(!object || !this.path){
- return object; //Node
- }
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- var node = object;
- var path = this.path;
- if(path.charAt(0) == '/'){ // absolute
- // skip the first expression (supposed to select the top node)
- var i = path.indexOf('/', 1);
- path = path.substring(i + 1);
- }
- var list = path.split('/');
- var last = list.length - 1;
- for(var i = 0; i < last; i++){
- node = this._getChildNode(node, list[i]);
- if(!node){
- return undefined; //undefined
- }
- }
- var value = this._getNodeValue(node, list[last]);
- return value; //String||Array
- },
-
- _setValue: function(/*Node*/object, /*String*/value){
- // summary:
- // Set an attribute value or a child text value to an element
- // description:
- // This method first uses a root node passed in 'object' argument
- // and 'path' property to identify an attribute, a text or
- // elements.
- // If an intermediate element does not exist, it creates
- // an element of the tag name in the 'path' segment as a child
- // node of the current node.
- // Finally, 'value' argument is set to an attribute or a text
- // (a child node) of the leaf element.
- // object:
- // A root node
- // value:
- // A value to set
- if(!this.path){
- return object; //Node
- }
-
- var node = object;
- var doc = this._getDocument(node);
- var path = this.path;
- if(path.charAt(0) == '/'){ // absolute
- var i = path.indexOf('/', 1);
- if(!node){
- var name = path.substring(1, i);
- node = doc.createElement(name);
- object = node; // to be returned as a new object
- }
- // skip the first expression (supposed to select the top node)
- path = path.substring(i + 1);
- }else{
- if(!node){
- return undefined; //undefined
- }
- }
- var list = path.split('/');
- var last = list.length - 1;
- for(var i = 0; i < last; i++){
- var child = this._getChildNode(node, list[i]);
- if(!child){
- child = doc.createElement(list[i]);
- node.appendChild(child);
- }
- node = child;
- }
- this._setNodeValue(node, list[last], value);
- return object; //Node
- },
-
- _getNodeValue: function(/*Node*/node, /*String*/exp){
- // summary:
- // Return an attribute value, a text value or an array of elements
- // description:
- // If 'exp' starts with '@', an attribute value of the specified
- // attribute is returned.
- // If 'exp' is "text()", a child text value is returned.
- // Otherwise, an array of child elements, the tag name of which
- // match 'exp', is returned.
- // node:
- // A node
- // exp:
- // An expression for attribute, text or elements
- // returns:
- // A value found, otherwise 'undefined'
- var value = undefined;
- if(exp.charAt(0) == '@'){
- var attribute = exp.substring(1);
- value = node.getAttribute(attribute);
- }else if(exp == "text()"){
- var text = node.firstChild;
- if(text){
- value = text.nodeValue;
- }
- }else{ // assume elements
- value = [];
- for(var i = 0; i < node.childNodes.length; i++){
- var child = node.childNodes[i];
- if(child.nodeType === 1 /* ELEMENT_NODE */ && child.nodeName == exp){
- value.push(child);
- }
- }
- }
- return value; //String||Array
- },
-
- _setNodeValue: function(/*Node*/node, /*String*/exp, /*String*/value){
- // summary:
- // Set an attribute value or a child text value to an element
- // description:
- // If 'exp' starts with '@', 'value' is set to the specified
- // attribute.
- // If 'exp' is "text()", 'value' is set to a child text.
- // node:
- // A node
- // exp:
- // An expression for attribute or text
- // value:
- // A value to set
- if(exp.charAt(0) == '@'){
- var attribute = exp.substring(1);
- if(value){
- node.setAttribute(attribute, value);
- }else{
- node.removeAttribute(attribute);
- }
- }else if(exp == "text()"){
- while(node.firstChild){
- node.removeChild(node.firstChild);
- }
- if(value){
- var text = this._getDocument(node).createTextNode(value);
- node.appendChild(text);
- }
- }
- // else not supported
- },
-
- _getChildNode: function(/*Node*/node, /*String*/name){
- // summary:
- // Return a child node
- // description:
- // A child element of the tag name specified with 'name' is
- // returned.
- // If 'name' ends with an array index, it is used to pick up
- // the corresponding element from multiple child elements.
- // node:
- // A parent node
- // name:
- // A tag name
- // returns:
- // A child node
- var index = 1;
- var i1 = name.indexOf('[');
- if(i1 >= 0){
- var i2 = name.indexOf(']');
- index = name.substring(i1 + 1, i2);
- name = name.substring(0, i1);
- }
- var count = 1;
- for(var i = 0; i < node.childNodes.length; i++){
- var child = node.childNodes[i];
- if(child.nodeType === 1 /* ELEMENT_NODE */ && child.nodeName == name){
- if(count == index){
- return child; //Node
- }
- count++;
- }
- }
- return null; //null
- },
-
- _getDocument: function(/*Node*/node){
- // summary:
- // Return a DOM document
- // description:
- // If 'node' is specified, a DOM document of the node is returned.
- // Otherwise, a DOM document is created.
- // returns:
- // A DOM document
- if(node){
- return (node.nodeType == 9 /* DOCUMENT_NODE */ ? node : node.ownerDocument); //Document
- }else{
- return dojox.data.dom.createDocument(); //Document
- }
- }
-});
-
+if(!dojo._hasResource["dojox.wire.XmlWire"]){
+dojo._hasResource["dojox.wire.XmlWire"]=true;
+dojo.provide("dojox.wire.XmlWire");
+dojo.require("dojox.xml.parser");
+dojo.require("dojox.wire.Wire");
+dojo.declare("dojox.wire.XmlWire",dojox.wire.Wire,{_wireClass:"dojox.wire.XmlWire",constructor:function(_1){
+},_getValue:function(_2){
+if(!_2||!this.path){
+return _2;
+}
+var _3=_2;
+var _4=this.path;
+var i;
+if(_4.charAt(0)=="/"){
+i=_4.indexOf("/",1);
+_4=_4.substring(i+1);
+}
+var _5=_4.split("/");
+var _6=_5.length-1;
+for(i=0;i<_6;i++){
+_3=this._getChildNode(_3,_5[i]);
+if(!_3){
+return undefined;
+}
+}
+var _7=this._getNodeValue(_3,_5[_6]);
+return _7;
+},_setValue:function(_8,_9){
+if(!this.path){
+return _8;
+}
+var _a=_8;
+var _b=this._getDocument(_a);
+var _c=this.path;
+var i;
+if(_c.charAt(0)=="/"){
+i=_c.indexOf("/",1);
+if(!_a){
+var _d=_c.substring(1,i);
+_a=_b.createElement(_d);
+_8=_a;
+}
+_c=_c.substring(i+1);
+}else{
+if(!_a){
+return undefined;
+}
+}
+var _e=_c.split("/");
+var _f=_e.length-1;
+for(i=0;i<_f;i++){
+var _10=this._getChildNode(_a,_e[i]);
+if(!_10){
+_10=_b.createElement(_e[i]);
+_a.appendChild(_10);
+}
+_a=_10;
}
+this._setNodeValue(_a,_e[_f],_9);
+return _8;
+},_getNodeValue:function(_11,exp){
+var _12=undefined;
+if(exp.charAt(0)=="@"){
+var _13=exp.substring(1);
+_12=_11.getAttribute(_13);
+}else{
+if(exp=="text()"){
+var _14=_11.firstChild;
+if(_14){
+_12=_14.nodeValue;
+}
+}else{
+_12=[];
+for(var i=0;i<_11.childNodes.length;i++){
+var _15=_11.childNodes[i];
+if(_15.nodeType===1&&_15.nodeName==exp){
+_12.push(_15);
+}
+}
+}
+}
+return _12;
+},_setNodeValue:function(_16,exp,_17){
+if(exp.charAt(0)=="@"){
+var _18=exp.substring(1);
+if(_17){
+_16.setAttribute(_18,_17);
+}else{
+_16.removeAttribute(_18);
+}
+}else{
+if(exp=="text()"){
+while(_16.firstChild){
+_16.removeChild(_16.firstChild);
+}
+if(_17){
+var _19=this._getDocument(_16).createTextNode(_17);
+_16.appendChild(_19);
+}
+}
+}
+},_getChildNode:function(_1a,_1b){
+var _1c=1;
+var i1=_1b.indexOf("[");
+if(i1>=0){
+var i2=_1b.indexOf("]");
+_1c=_1b.substring(i1+1,i2);
+_1b=_1b.substring(0,i1);
+}
+var _1d=1;
+for(var i=0;i<_1a.childNodes.length;i++){
+var _1e=_1a.childNodes[i];
+if(_1e.nodeType===1&&_1e.nodeName==_1b){
+if(_1d==_1c){
+return _1e;
+}
+_1d++;
+}
+}
+return null;
+},_getDocument:function(_1f){
+if(_1f){
+return (_1f.nodeType==9?_1f:_1f.ownerDocument);
+}else{
+return dojox.xml.parser.parse();
+}
+}});
+}
diff --git a/js/dojo/dojox/wire/_base.js b/js/dojo/dojox/wire/_base.js
--- a/js/dojo/dojox/wire/_base.js
+++ b/js/dojo/dojox/wire/_base.js
@@ -1,195 +1,102 @@
-if(!dojo._hasResource["dojox.wire._base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.wire._base"] = true;
-dojo.provide("dojox.wire._base");
-
-dojox.wire._defaultWireClass = "dojox.wire.Wire";
-
-dojox.wire._wireClasses = {
- "attribute": "dojox.wire.DataWire",
- "path": "dojox.wire.XmlWire",
- "children": "dojox.wire.CompositeWire",
- "columns": "dojox.wire.TableAdapter",
- "nodes": "dojox.wire.TreeAdapter",
- "segments": "dojox.wire.TextAdapter"
-};
-
-dojox.wire.register = function(/*Function||String*/wireClass, /*String*/key){
- // summary:
- // Register a Wire class
- // desription:
- // The specified Wire class or a class name is registered with
- // a key property of arguments to create a Wire
- // wireClass:
- // A class or full qualified class name
- // key:
- // A key property of arguments to create a Wire
- if(!wireClass || !key){
- return; //undefined
- }
- if(dojox.wire._wireClasses[key]){ // key already in use
- return; //undefined
- }
- dojox.wire._wireClasses[key] = wireClass;
-};
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojox.wire._getClass = function(/*String*/name){
- // summary:
- // Returns a class
- // description:
- // The class is loaded by dojo.require() and returned
- // by dojo.getObject().
- // name:
- // A class name
- // returns:
- // A class
- dojo["require"](name); // use dojo["require"] instead of dojo.require to avoid a build problem
- return dojo.getObject(name); //Function
-};
-
-dojox.wire.create = function(/*Object*/args){
- // summary:
- // Create a Wire from arguments
- // description:
- // If 'args' specifies 'wireClass', it is used as a class or full
- // qualified class name to create a Wire with 'args' as arguments.
- // Otherwise, a Wire class is determined by other proeprties of 'args'
- // checking if 'args' specifies a key property for a Wire class.
- // If no key property found, the default Wire class is used.
- // args:
- // Arguments to create a Wire
- // returns:
- // A Wire
- if(!args){
- args = {};
- }
- var wireClass = args.wireClass;
- if(wireClass){
- if(dojo.isString(wireClass)){
- wireClass = dojox.wire._getClass(wireClass);
- }
- }else{
- for(var key in args){
- if(!args[key]){
- continue;
- }
- wireClass = dojox.wire._wireClasses[key];
- if(wireClass){
- if(dojo.isString(wireClass)){
- wireClass = dojox.wire._getClass(wireClass);
- dojox.wire._wireClasses[key] = wireClass;
- }
- break;
- }
- }
- }
- if(!wireClass){
- if(dojo.isString(dojox.wire._defaultWireClass)){
- dojox.wire._defaultWireClass = dojox.wire._getClass(dojox.wire._defaultWireClass);
- }
- wireClass = dojox.wire._defaultWireClass;
- }
- return new wireClass(args); //Object
-};
-dojox.wire.isWire = function(/*Object*/wire){
- // summary:
- // Check if an object is a Wire
- // description:
- // If the specified object is a Wire, true is returned.
- // Otherwise, false is returned.
- // wire:
- // An object to check
- // returns:
- // True if the object is a Wire, otherwise false
- return (wire && wire._wireClass); //Boolean
+if(!dojo._hasResource["dojox.wire._base"]){
+dojo._hasResource["dojox.wire._base"]=true;
+dojo.provide("dojox.wire._base");
+dojox.wire._defaultWireClass="dojox.wire.Wire";
+dojox.wire._wireClasses={"attribute":"dojox.wire.DataWire","path":"dojox.wire.XmlWire","children":"dojox.wire.CompositeWire","columns":"dojox.wire.TableAdapter","nodes":"dojox.wire.TreeAdapter","segments":"dojox.wire.TextAdapter"};
+dojox.wire.register=function(_1,_2){
+if(!_1||!_2){
+return;
+}
+if(dojox.wire._wireClasses[_2]){
+return;
+}
+dojox.wire._wireClasses[_2]=_1;
};
-
-dojox.wire.transfer = function(/*Wire||Object*/source, /*Wire||Object*/target, /*Object?*/defaultObject, /*Object?*/defaultTargetObject){
- // summary:
- // Transfer a source value to a target value
- // description:
- // If 'source' and/or 'target' are not Wires, Wires are created with
- // them as arguments.
- // A value is got through the source Wire and set through the target
- // Wire.
- // 'defaultObject' is passed to Wires as a default root object.
- // If 'defaultTargetObject' is specified, it is passed to the target
- // Wire as a default root object, instead of 'defaultObject'.
- // source:
- // A Wire or arguments to create a Wire for a source value
- // target:
- // A Wire or arguments to create a Wire for a target value
- // defaultObject:
- // defaultTargetObject;
- // Optional default root objects passed to Wires
- if(!source || !target){
- return; //undefined
- }
- if(!dojox.wire.isWire(source)){
- source = dojox.wire.create(source);
- }
- if(!dojox.wire.isWire(target)){
- target = dojox.wire.create(target);
- }
-
- var value = source.getValue(defaultObject);
- target.setValue(value, (defaultTargetObject || defaultObject));
+dojox.wire._getClass=function(_3){
+dojo["require"](_3);
+return dojo.getObject(_3);
};
-
-dojox.wire.connect = function(/*Object*/trigger, /*Wire||Object*/source, /*Wire||Object*/target){
- // summary:
- // Transfer a source value to a target value on a trigger event or
- // topic
- // description:
- // If 'trigger' specifies 'topic', the topic is subscribed to transer
- // a value on the topic.
- // Otherwise, the event specified to 'event' of 'trigger' is listened
- // to transfer a value.
- // On the specified event or topic, transfer() is called with
- // 'source', 'target' and the arguments of the event or topic (as
- // default root objects).
- // trigger:
- // An event or topic to trigger a transfer
- // source:
- // A Wire or arguments to create a Wire for a source value
- // target:
- // A Wire or arguments to create a Wire for a target value
- // returns:
- // A connection handle for disconnect()
- if(!trigger || !source || !target){
- return; //undefined
- }
-
- var connection = {topic: trigger.topic};
- if(trigger.topic){
- connection.handle = dojo.subscribe(trigger.topic, function(){
- dojox.wire.transfer(source, target, arguments);
- });
- }else if(trigger.event){
- connection.handle = dojo.connect(trigger.scope, trigger.event, function(){
- dojox.wire.transfer(source, target, arguments);
- });
- }
- return connection; //Object
+dojox.wire.create=function(_4){
+if(!_4){
+_4={};
+}
+var _5=_4.wireClass;
+if(_5){
+if(dojo.isString(_5)){
+_5=dojox.wire._getClass(_5);
+}
+}else{
+for(var _6 in _4){
+if(!_4[_6]){
+continue;
+}
+_5=dojox.wire._wireClasses[_6];
+if(_5){
+if(dojo.isString(_5)){
+_5=dojox.wire._getClass(_5);
+dojox.wire._wireClasses[_6]=_5;
+}
+break;
+}
+}
+}
+if(!_5){
+if(dojo.isString(dojox.wire._defaultWireClass)){
+dojox.wire._defaultWireClass=dojox.wire._getClass(dojox.wire._defaultWireClass);
+}
+_5=dojox.wire._defaultWireClass;
+}
+return new _5(_4);
+};
+dojox.wire.isWire=function(_7){
+return (_7&&_7._wireClass);
};
-
-dojox.wire.disconnect = function(/*Object*/connection){
- // summary:
- // Remove a connection or subscription for transfer
- // description:
- // If 'handle' has 'topic', the topic is unsubscribed.
- // Otherwise, the listener to an event is removed.
- // connection:
- // A connection handle returned by connect()
- if(!connection || !connection.handle){
- return; //undefined
- }
-
- if(connection.topic){
- dojo.unsubscribe(connection.handle);
- }else{
- dojo.disconnect(connection.handle);
- }
+dojox.wire.transfer=function(_8,_9,_a,_b){
+if(!_8||!_9){
+return;
+}
+if(!dojox.wire.isWire(_8)){
+_8=dojox.wire.create(_8);
+}
+if(!dojox.wire.isWire(_9)){
+_9=dojox.wire.create(_9);
+}
+var _c=_8.getValue(_a);
+_9.setValue(_c,(_b||_a));
};
-
+dojox.wire.connect=function(_d,_e,_f){
+if(!_d||!_e||!_f){
+return;
+}
+var _10={topic:_d.topic};
+if(_d.topic){
+_10.handle=dojo.subscribe(_d.topic,function(){
+dojox.wire.transfer(_e,_f,arguments);
+});
+}else{
+if(_d.event){
+_10.handle=dojo.connect(_d.scope,_d.event,function(){
+dojox.wire.transfer(_e,_f,arguments);
+});
}
+}
+return _10;
+};
+dojox.wire.disconnect=function(_11){
+if(!_11||!_11.handle){
+return;
+}
+if(_11.topic){
+dojo.unsubscribe(_11.handle);
+}else{
+dojo.disconnect(_11.handle);
+}
+};
+}
diff --git a/js/dojo/dojox/wire/ml/Action.js b/js/dojo/dojox/wire/ml/Action.js
--- a/js/dojo/dojox/wire/ml/Action.js
+++ b/js/dojo/dojox/wire/ml/Action.js
@@ -1,225 +1,113 @@
-if(!dojo._hasResource["dojox.wire.ml.Action"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.wire.ml.Action"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.wire.ml.Action"]){
+dojo._hasResource["dojox.wire.ml.Action"]=true;
dojo.provide("dojox.wire.ml.Action");
dojo.provide("dojox.wire.ml.ActionFilter");
-
dojo.require("dijit._Widget");
dojo.require("dijit._Container");
dojo.require("dojox.wire.Wire");
dojo.require("dojox.wire.ml.util");
-
-dojo.declare("dojox.wire.ml.Action", [dijit._Widget, dijit._Container], {
- // summary:
- // A base widget to "run" a task on an event or a topic
- // description:
- // This widget represents a controller task to be run when an event
- // (a function) or a topic is issued.
- // Sub-classes must implement _run() method to implement their tasks.
- // 'trigger' specifies an event scope, an ID of a widget or an DOM
- // element, or its property with the optional dotted notation.
- // If this widget has child ActionFilter widgets, their filter()
- // methods are called with the arguments to the event or the topic.
- // If one of filter() methods returns false, run() won't be invoked.
- // This widget also can serve as a composite task to run child
- // Actions on an event or a topic specified to this widget.
- // trigger:
- // An event scope
- // triggerEvent:
- // An event (function) name
- // triggerTopic:
- // A topic name
- trigger: "",
- triggerEvent: "",
- triggerTopic: "",
-
- postCreate: function(){
- // summary:
- // Call _connect()
- // description:
- // See _connect().
- this._connect();
- },
-
- _connect: function(){
- // summary:
- // Connect run() method to an event or a topic
- // description:
- // If 'triggerEvent' and 'trigger' are specified, connect() is
- // used to set up run() to be called on the event.
- // If 'triggerTopic' is specified, subscribe() is used to set up
- // run() to be called on the topic.
- if(this.triggerEvent){
- if(this.trigger){
- var scope = dojox.wire.ml._getValue(this.trigger);
- if(scope){
- if(!scope[this.triggerEvent]){
- // set a dummy function for an anonymous object
- scope[this.triggerEvent] = function(){};
- }
- this._triggerHandle = dojo.connect(scope, this.triggerEvent, this, "run");
- }
- }else{
- var event = this.triggerEvent.toLowerCase();
- if(event == "onload"){
- var self = this;
- dojo.addOnLoad(function(){
- self._run.apply(self, arguments);
- });
- }
- }
- }else if(this.triggerTopic){
- this._triggerHandle = dojo.subscribe(this.triggerTopic, this, "run");
- }
- },
-
- _disconnect: function(){
- // summary:
- // Disconnect run() method from an event or a topic
- // description:
- // If 'triggerEvent' and 'trigger' are specified, disconnect() is
- // used to set up run() not to be called on the event.
- // If 'triggerTopic' is specified, unsubscribe() is used to set up
- // run() not to be called on the topic.
- if(this._triggerHandle){
- if(this.triggerTopic){
- dojo.unsubscribe(this.triggerTopic, this._triggerHandle);
- }else{
- dojo.disconnect(this._triggerHandle);
- }
- }
- },
-
- run: function(){
- // summary:
- // Run a task
- // description:
- // This method calls filter() method of child ActionFilter
- // widgets.
- // If one of them returns false, this method returns.
- // Otherwise, _run() method is called.
- var children = this.getChildren();
- for(var i in children){
- var child = children[i];
- if(child instanceof dojox.wire.ml.ActionFilter){
- if(!child.filter.apply(child, arguments)){
- return;
- }
- }
- }
- this._run.apply(this, arguments);
- },
-
- _run: function(){
- // summary:
- // Call run() methods of child Action widgets
- // description:
- // If this widget has child Action widgets, their run() methods
- // are called.
- var children = this.getChildren();
- for(var i in children){
- var child = children[i];
- if(child instanceof dojox.wire.ml.Action){
- child.run.apply(child, arguments);
- }
- }
- },
-
- uninitialize: function(){
- // summary:
- // Over-ride of base widget unitialize function to do some connection cleanup.
- this._disconnect();
- return true;
- }
+dojo.declare("dojox.wire.ml.Action",[dijit._Widget,dijit._Container],{trigger:"",triggerEvent:"",triggerTopic:"",postCreate:function(){
+this._connect();
+},_connect:function(){
+if(this.triggerEvent){
+if(this.trigger){
+var _1=dojox.wire.ml._getValue(this.trigger);
+if(_1){
+if(!_1[this.triggerEvent]){
+_1[this.triggerEvent]=function(){
+};
+}
+this._triggerHandle=dojo.connect(_1,this.triggerEvent,this,"run");
+}
+}else{
+var _2=this.triggerEvent.toLowerCase();
+if(_2=="onload"){
+var _3=this;
+dojo.addOnLoad(function(){
+_3._run.apply(_3,arguments);
});
-
-dojo.declare("dojox.wire.ml.ActionFilter", dijit._Widget, {
- // summary:
- // A widget to define a filter for the parent Action to run
- // description:
- // This base class checks a required property specified with
- // 'required' attribute.
- // If 'message' is specified, the message is set to a property
- // specified with 'error'.
- // Subclasses may implement their own filter() method.
- // required:
- // A property required
- // requiredValue:
- // Optional. A specific value the property is required to have. If this isn't provided
- // than any non-false/non-null value of the required propery will cause this filter
- // to pass.
- // type:
- // Optional. A specific type to compare the values as (if requiredValue is set)
- // Valid values for type are boolean, int, string. Default is string.
- // message:
- // An error message to emit if the filter doesn't execute due to property mismatch.
- // error:
- // A property to store an error due to property mismatch.
- required: "",
- requiredValue: "",
- type: "",
- message: "",
- error: "",
-
-
- filter: function(){
- // summary:
- // Check if a required property is specified. Also, if provided, check to see
- // if the required property contains a specific value.
- // description:
- // If a value is undefined for a property, specified with
- // 'required', this method returns false.
- // If the value for a property is defined, but there isn't a requiredValue for it
- // then any non-false value will cause the method to return true.
- // if requiredValue is set, then filter compares that value with the value from
- // the required property and returns true if and only if they match.
- // The type option just allows for a way to convert the required property values
- // into a proper form for comparison (boolean, number, etc).
- // If 'message' is specified, it is set to a proeprty specified
- // with 'error' or shown with alert().
- // If 'required' starts with "arguments", a property of
- // the method arguments are checked.
- // returns:
- // True if a required property is specified (and if requiredValue is specified,
- // that they match), otherwise false
- if(this.required === ""){
- return true; //Boolean
- }else{
- var value = dojox.wire.ml._getValue(this.required, arguments);
- if(this.requiredValue === ""){
- //Just see if there's a value, nothing to compare it to.
- if(value){
- return true; //Boolean
- }
- }else{
- //See if we need to type convert.
- var reqValue = this.requiredValue;
- if(this.type !== ""){
- var lType = this.type.toLowerCase();
- if(lType === "boolean"){
- if(reqValue.toLowerCase() === "false"){
- reqValue = false;
- }else{
- reqValue = true;
- }
- }else if(lType === "number"){
- reqValue = parseInt(reqValue, 10);
- }
- }
- if(value === reqValue){
- return true; //boolean
- }
- }
- }
-
- if(this.message){
- if(this.error){
- dojox.wire.ml._setValue(this.error, this.message);
- }else{
- alert(this.message);
- }
- }
- return false; //Boolean
- }
-});
-
+}
+}
+}else{
+if(this.triggerTopic){
+this._triggerHandle=dojo.subscribe(this.triggerTopic,this,"run");
+}
+}
+},_disconnect:function(){
+if(this._triggerHandle){
+if(this.triggerTopic){
+dojo.unsubscribe(this.triggerTopic,this._triggerHandle);
+}else{
+dojo.disconnect(this._triggerHandle);
+}
+}
+},run:function(){
+var _4=this.getChildren();
+for(var i in _4){
+var _5=_4[i];
+if(_5 instanceof dojox.wire.ml.ActionFilter){
+if(!_5.filter.apply(_5,arguments)){
+return;
+}
+}
+}
+this._run.apply(this,arguments);
+},_run:function(){
+var _6=this.getChildren();
+for(var i in _6){
+var _7=_6[i];
+if(_7 instanceof dojox.wire.ml.Action){
+_7.run.apply(_7,arguments);
+}
}
+},uninitialize:function(){
+this._disconnect();
+return true;
+}});
+dojo.declare("dojox.wire.ml.ActionFilter",dijit._Widget,{required:"",requiredValue:"",type:"",message:"",error:"",filter:function(){
+if(this.required===""){
+return true;
+}else{
+var _8=dojox.wire.ml._getValue(this.required,arguments);
+if(this.requiredValue===""){
+if(_8){
+return true;
+}
+}else{
+var _9=this.requiredValue;
+if(this.type!==""){
+var _a=this.type.toLowerCase();
+if(_a==="boolean"){
+if(_9.toLowerCase()==="false"){
+_9=false;
+}else{
+_9=true;
+}
+}else{
+if(_a==="number"){
+_9=parseInt(_9,10);
+}
+}
+}
+if(_8===_9){
+return true;
+}
+}
+}
+if(this.message){
+if(this.error){
+dojox.wire.ml._setValue(this.error,this.message);
+}else{
+alert(this.message);
+}
+}
+return false;
+}});
+}
diff --git a/js/dojo/dojox/wire/ml/Data.js b/js/dojo/dojox/wire/ml/Data.js
--- a/js/dojo/dojox/wire/ml/Data.js
+++ b/js/dojo/dojox/wire/ml/Data.js
@@ -1,143 +1,81 @@
-if(!dojo._hasResource["dojox.wire.ml.Data"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.wire.ml.Data"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.wire.ml.Data"]){
+dojo._hasResource["dojox.wire.ml.Data"]=true;
dojo.provide("dojox.wire.ml.Data");
dojo.provide("dojox.wire.ml.DataProperty");
-
dojo.require("dijit._Widget");
dojo.require("dijit._Container");
dojo.require("dojox.wire.ml.util");
-
-dojo.declare("dojox.wire.ml.Data", [dijit._Widget, dijit._Container], {
- // summary:
- // A widget for a data object
- // description:
- // This widget represents an object with '_properties' property.
- // If child 'DataProperty' widgets exist, they are used to initialize
- // propertiy values of '_properties' object.
-
- startup: function(){
- // summary:
- // Call _initializeProperties()
- // description:
- // See _initializeProperties().
- this._initializeProperties();
- },
-
- _initializeProperties: function(/*Boolean*/reset){
- // summary:
- // Initialize a data object
- // description:
- // If this widget has child DataProperty widgets, their getValue()
- // methods are called and set the return value to a property
- // specified by 'name' attribute of the child widgets.
- // reset:
- // A boolean to reset current properties
- if(!this._properties || reset){
- this._properties = {};
- }
- var children = this.getChildren();
- for(var i in children){
- var child = children[i];
- if((child instanceof dojox.wire.ml.DataProperty) && child.name){
- this.setPropertyValue(child.name, child.getValue());
- }
- }
- },
-
- getPropertyValue: function(/*String*/property){
- // summary:
- // Return a property value
- // description:
- // This method returns the value of a property, specified with
- // 'property' argument, in '_properties' object.
- // property:
- // A property name
- // returns:
- // A property value
- return this._properties[property]; //anything
- },
-
- setPropertyValue: function(/*String*/property, /*anything*/value){
- // summary:
- // Store a property value
- // description:
- // This method stores 'value' as a property, specified with
- // 'property' argument, in '_properties' object.
- // property:
- // A property name
- // value:
- // A property value
- this._properties[property] = value;
- }
-});
-
-dojo.declare("dojox.wire.ml.DataProperty", [dijit._Widget, dijit._Container], {
- // summary:
- // A widget to define a data property
- // description:
- // Attributes of this widget are used to add a property to the parent
- // Data widget.
- // 'type' attribute specifies one of "string", "number", "boolean",
- // "array", "object" and "element" (DOM Element)
- // (default to "string").
- // If 'type' is "array" or "object", child DataProperty widgets are
- // used to initialize the array elements or the object properties.
- // name:
- // A property name
- // type:
- // A property type name
- // value:
- // A property value
- name: "",
- type: "",
- value: "",
-
- getValue: function(){
- // summary:
- // Returns a property value
- // description:
- // If 'type' is specified, 'value' attribute is converted to
- // the specified type and returned.
- // Otherwise, 'value' attribute is returned as is.
- // returns:
- // A property value
- var value = this.value;
- if(this.type){
- if(this.type == "number"){
- value = parseInt(value);
- }else if(this.type == "boolean"){
- value = (value == "true");
- }else if(this.type == "array"){
- value = [];
- var children = this.getChildren();
- for(var i in children){
- var child = children[i];
- if(child instanceof dojox.wire.ml.DataProperty){
- value.push(child.getValue());
- }
- }
- }else if(this.type == "object"){
- value = {};
- var children = this.getChildren();
- for(var i in children){
- var child = children[i];
- if((child instanceof dojox.wire.ml.DataProperty) && child.name){
- value[child.name] = child.getValue();
- }
- }
- }else if(this.type == "element"){
- value = new dojox.wire.ml.XmlElement(value);
- var children = this.getChildren();
- for(var i in children){
- var child = children[i];
- if((child instanceof dojox.wire.ml.DataProperty) && child.name){
- value.setPropertyValue(child.name, child.getValue());
- }
- }
- }
- }
- return value; //anything
- }
-});
-
+dojo.declare("dojox.wire.ml.Data",[dijit._Widget,dijit._Container],{startup:function(){
+this._initializeProperties();
+},_initializeProperties:function(_1){
+if(!this._properties||_1){
+this._properties={};
+}
+var _2=this.getChildren();
+for(var i in _2){
+var _3=_2[i];
+if((_3 instanceof dojox.wire.ml.DataProperty)&&_3.name){
+this.setPropertyValue(_3.name,_3.getValue());
+}
}
+},getPropertyValue:function(_4){
+return this._properties[_4];
+},setPropertyValue:function(_5,_6){
+this._properties[_5]=_6;
+}});
+dojo.declare("dojox.wire.ml.DataProperty",[dijit._Widget,dijit._Container],{name:"",type:"",value:"",_getValueAttr:function(){
+return this.getValue();
+},getValue:function(){
+var _7=this.value;
+if(this.type){
+if(this.type=="number"){
+_7=parseInt(_7);
+}else{
+if(this.type=="boolean"){
+_7=(_7=="true");
+}else{
+if(this.type=="array"){
+_7=[];
+var _8=this.getChildren();
+for(var i in _8){
+var _9=_8[i];
+if(_9 instanceof dojox.wire.ml.DataProperty){
+_7.push(_9.getValue());
+}
+}
+}else{
+if(this.type=="object"){
+_7={};
+var _8=this.getChildren();
+for(var i in _8){
+var _9=_8[i];
+if((_9 instanceof dojox.wire.ml.DataProperty)&&_9.name){
+_7[_9.name]=_9.getValue();
+}
+}
+}else{
+if(this.type=="element"){
+_7=new dojox.wire.ml.XmlElement(_7);
+var _8=this.getChildren();
+for(var i in _8){
+var _9=_8[i];
+if((_9 instanceof dojox.wire.ml.DataProperty)&&_9.name){
+_7.setPropertyValue(_9.name,_9.getValue());
+}
+}
+}
+}
+}
+}
+}
+}
+return _7;
+}});
+}
diff --git a/js/dojo/dojox/wire/ml/DataStore.js b/js/dojo/dojox/wire/ml/DataStore.js
--- a/js/dojo/dojox/wire/ml/DataStore.js
+++ b/js/dojo/dojox/wire/ml/DataStore.js
@@ -1,116 +1,45 @@
-if(!dojo._hasResource["dojox.wire.ml.DataStore"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.wire.ml.DataStore"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.wire.ml.DataStore"]){
+dojo._hasResource["dojox.wire.ml.DataStore"]=true;
dojo.provide("dojox.wire.ml.DataStore");
-
dojo.require("dijit._Widget");
dojo.require("dojox.wire._base");
-
-dojo.declare("dojox.wire.ml.DataStore", dijit._Widget, {
- // summary:
- // A widget for a data store
- // description:
- // This widget represents a data store of 'storeClass' attribute.
- // storeClass:
- // A class name of a data store
- storeClass: "",
-
- postCreate: function(){
- // summary:
- // Call _createStore()
- // description:
- // See _createStore().
- this.store = this._createStore();
- },
-
- _createStore: function(){
- // summary:
- // Create a data store
- // desription:
- // A data store of 'storeClass' is created with arguments
- // specified with attributes.
- // returns:
- // A data store
- if(!this.storeClass){
- return null; //null
- }
- var storeClass = dojox.wire._getClass(this.storeClass);
- if(!storeClass){
- return null; //null
- }
- var args = {};
- var attributes = this.domNode.attributes;
- for(var i = 0; i < attributes.length; i++){
- var a = attributes.item(i);
- if(a.specified && !this[a.nodeName]){
- args[a.nodeName] = a.nodeValue;
- }
- }
- return new storeClass(args); //Object
- },
-
- getFeatures: function(){
- // summary:
- // Call getFeatures() method of a data store
- // description:
- // See dojo.data.api.Read.getFeatures().
- // returns:
- // A features object
- return this.store.getFeatures(); //Object
- },
-
- fetch: function(/*Object*/request){
- // summary:
- // Call fetch() method of a data store
- // description:
- // See dojo.data.api.Read.fetch().
- // request:
- // A request object
- // returns:
- // A request object
- return this.store.fetch(request); //Object
- },
-
- save: function(/*Object*/args){
- // summary:
- // Call save() method of a data store
- // description:
- // See dojo.data.api.Write.save().
- // args:
- // A save arguments object
- this.store.save(args);
- },
-
- newItem: function(/*Object*/args){
- // summary:
- // Call newItem() method of a data store
- // description:
- // See dojo.data.api.Write.newItem().
- // args:
- // A new item arguments object
- // returns:
- // A new item
- return this.store.newItem(args); //Object
- },
-
- deleteItem: function(/*Object*/item){
- // summary:
- // Call deleteItem() method of a data store
- // description:
- // See dojo.data.api.Write.deleteItem().
- // returns:
- // A boolean
- return this.store.deleteItem(item); //Boolean
- },
-
- revert: function(){
- // summary:
- // Call revert() method of a data store
- // description:
- // See dojo.data.api.Write.revert().
- // returns:
- // A boolean
- return this.store.revert(); //Boolean
- }
-});
-
+dojo.declare("dojox.wire.ml.DataStore",dijit._Widget,{storeClass:"",postCreate:function(){
+this.store=this._createStore();
+},_createStore:function(){
+if(!this.storeClass){
+return null;
+}
+var _1=dojox.wire._getClass(this.storeClass);
+if(!_1){
+return null;
+}
+var _2={};
+var _3=this.domNode.attributes;
+for(var i=0;i<_3.length;i++){
+var a=_3.item(i);
+if(a.specified&&!this[a.nodeName]){
+_2[a.nodeName]=a.nodeValue;
}
+}
+return new _1(_2);
+},getFeatures:function(){
+return this.store.getFeatures();
+},fetch:function(_4){
+return this.store.fetch(_4);
+},save:function(_5){
+this.store.save(_5);
+},newItem:function(_6){
+return this.store.newItem(_6);
+},deleteItem:function(_7){
+return this.store.deleteItem(_7);
+},revert:function(){
+return this.store.revert();
+}});
+}
diff --git a/js/dojo/dojox/wire/ml/Invocation.js b/js/dojo/dojox/wire/ml/Invocation.js
--- a/js/dojo/dojox/wire/ml/Invocation.js
+++ b/js/dojo/dojox/wire/ml/Invocation.js
@@ -1,171 +1,109 @@
-if(!dojo._hasResource["dojox.wire.ml.Invocation"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.wire.ml.Invocation"] = true;
-dojo.provide("dojox.wire.ml.Invocation");
-
-dojo.require("dojox.wire.ml.Action");
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojo.declare("dojox.wire.ml.Invocation", dojox.wire.ml.Action, {
- // summary:
- // A widget to invoke a method or publish a topic
- // description:
- // This widget represents a controller task to invoke a method or
- // publish a topic when an event (a function) or a topic is issued.
- // object:
- // A scope of a method to invoke
- // method:
- // A name of a method to invoke
- // topic:
- // A name of a topic to publish
- // parameters:
- // Arguments for the method or the topic
- // result:
- // A property to store a return value of the method call
- // error:
- // A property to store an error on the method call
- object: "",
- method: "",
- topic: "",
- parameters: "",
- result: "",
- error: "",
- _run: function(){
- // summary:
- // Invoke a method or publish a topic
- // description:
- // If 'topic' is specified, the topic is published with arguments
- // specified to 'parameters'.
- // If 'method' and 'object' are specified, the method is invoked
- // with arguments specified to 'parameters' and set the return
- // value to a property specified to 'result'.
- // 'object', 'parameters' and 'result' can specify properties of
- // a widget or an DOM element with the dotted notation.
- // If 'parameters' are omitted, the arguments to this method are
- // passed as is.
- if(this.topic){
- var args = this._getParameters(arguments);
- try{
- dojo.publish(this.topic, args);
- this.onComplete();
- }catch(e){
- this.onError(e);
- }
- }else if(this.method){
- var scope = (this.object ? dojox.wire.ml._getValue(this.object) : dojo.global);
- if(!scope){
- return; //undefined
- }
- var args = this._getParameters(arguments);
- var func = scope[this.method];
- if(!func){
- func = scope.callMethod;
- if(!func){
- return; //undefined
- }
- args = [this.method, args];
- }
- try{
- var connected = false;
- if(scope.getFeatures){
- var features = scope.getFeatures();
- if((this.method == "fetch" && features["dojo.data.api.Read"]) ||
- (this.method == "save" && features["dojo.data.api.Write"])){
- var arg = args[0];
- if(!arg.onComplete){
- arg.onComplete = function(){};
- }
- //dojo.connect(arg, "onComplete", this, "onComplete");
- this.connect(arg, "onComplete", "onComplete");
- if(!arg.onError){
- arg.onError = function(){};
- }
- //dojo.connect(arg, "onError", this, "onError");
- this.connect(arg, "onError", "onError");
- connected = true;
- }
- }
- var r = func.apply(scope, args);
- if(!connected){
- if(r && (r instanceof dojo.Deferred)){
- var self = this;
- r.addCallbacks(
- function(result){self.onComplete(result);},
- function(error){self.onError(error);}
- );
- }else{
- this.onComplete(r);
- }
- }
- }catch(e){
- this.onError(e);
- }
- }
- },
-
- onComplete: function(/*anything*/result){
- // summary:
- // A function called when the method or the topic publish
- // completed
- // description:
- // If 'result' attribute is specified, the result object also set
- // to the specified property.
- // result:
- // The return value of a method or undefined for a topic
- if(this.result){
- dojox.wire.ml._setValue(this.result, result);
- }
- if(this.error){ // clear error
- dojox.wire.ml._setValue(this.error, "");
- }
- },
-
- onError: function(/*anything*/error){
- // summary:
- // A function called on an error occurs
- // description:
- // If 'error' attribute is specified, the error object also set to
- // the specified property.
- // error:
- // The exception or error occurred
- if(this.error){
- if(error && error.message){
- error = error.message;
- }
- dojox.wire.ml._setValue(this.error, error);
- }
- },
-
- _getParameters: function(/*Array*/args){
- // summary:
- // Returns arguments to a method or topic to invoke
- // description:
- // This method retunrs an array of arguments specified by
- // 'parameters' attribute, a comma-separated list of IDs and
- // their properties in a dotted notation.
- // If 'parameters' are omitted, the original arguments are
- // used.
- // args:
- // Arguments to a trigger event or topic
- if(!this.parameters){
- // use arguments as is
- return args; //Array
- }
- var parameters = [];
- var list = this.parameters.split(",");
- if(list.length == 1){
- var parameter = dojox.wire.ml._getValue(list[0], args);
- if(dojo.isArray(parameter)){
- parameters = parameter;
- }else{
- parameters.push(parameter);
- }
- }else{
- for(var i in list){
- parameters.push(dojox.wire.ml._getValue(list[i], args));
- }
- }
- return parameters; //Array
- }
+if(!dojo._hasResource["dojox.wire.ml.Invocation"]){
+dojo._hasResource["dojox.wire.ml.Invocation"]=true;
+dojo.provide("dojox.wire.ml.Invocation");
+dojo.require("dojox.wire.ml.Action");
+dojo.declare("dojox.wire.ml.Invocation",dojox.wire.ml.Action,{object:"",method:"",topic:"",parameters:"",result:"",error:"",_run:function(){
+if(this.topic){
+var _1=this._getParameters(arguments);
+try{
+dojo.publish(this.topic,_1);
+this.onComplete();
+}
+catch(e){
+this.onError(e);
+}
+}else{
+if(this.method){
+var _2=(this.object?dojox.wire.ml._getValue(this.object):dojo.global);
+if(!_2){
+return;
+}
+var _1=this._getParameters(arguments);
+var _3=_2[this.method];
+if(!_3){
+_3=_2.callMethod;
+if(!_3){
+return;
+}
+_1=[this.method,_1];
+}
+try{
+var _4=false;
+if(_2.getFeatures){
+var _5=_2.getFeatures();
+if((this.method=="fetch"&&_5["dojo.data.api.Read"])||(this.method=="save"&&_5["dojo.data.api.Write"])){
+var _6=_1[0];
+if(!_6.onComplete){
+_6.onComplete=function(){
+};
+}
+this.connect(_6,"onComplete","onComplete");
+if(!_6.onError){
+_6.onError=function(){
+};
+}
+this.connect(_6,"onError","onError");
+_4=true;
+}
+}
+var r=_3.apply(_2,_1);
+if(!_4){
+if(r&&(r instanceof dojo.Deferred)){
+var _7=this;
+r.addCallbacks(function(_8){
+_7.onComplete(_8);
+},function(_9){
+_7.onError(_9);
});
-
+}else{
+this.onComplete(r);
+}
+}
+}
+catch(e){
+this.onError(e);
+}
+}
+}
+},onComplete:function(_a){
+if(this.result){
+dojox.wire.ml._setValue(this.result,_a);
+}
+if(this.error){
+dojox.wire.ml._setValue(this.error,"");
+}
+},onError:function(_b){
+if(this.error){
+if(_b&&_b.message){
+_b=_b.message;
}
+dojox.wire.ml._setValue(this.error,_b);
+}
+},_getParameters:function(_c){
+if(!this.parameters){
+return _c;
+}
+var _d=[];
+var _e=this.parameters.split(",");
+if(_e.length==1){
+var _f=dojox.wire.ml._getValue(dojo.trim(_e[0]),_c);
+if(dojo.isArray(_f)){
+_d=_f;
+}else{
+_d.push(_f);
+}
+}else{
+for(var i in _e){
+_d.push(dojox.wire.ml._getValue(dojo.trim(_e[i]),_c));
+}
+}
+return _d;
+}});
+}
diff --git a/js/dojo/dojox/wire/ml/Service.js b/js/dojo/dojox/wire/ml/Service.js
--- a/js/dojo/dojox/wire/ml/Service.js
+++ b/js/dojo/dojox/wire/ml/Service.js
@@ -1,331 +1,170 @@
-if(!dojo._hasResource["dojox.wire.ml.Service"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.wire.ml.Service"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.wire.ml.Service"]){
+dojo._hasResource["dojox.wire.ml.Service"]=true;
dojo.provide("dojox.wire.ml.Service");
dojo.provide("dojox.wire.ml.RestHandler");
dojo.provide("dojox.wire.ml.XmlHandler");
dojo.provide("dojox.wire.ml.JsonHandler");
-
dojo.require("dijit._Widget");
-dojo.require("dojox.data.dom");
+dojo.require("dojox.xml.parser");
dojo.require("dojox.wire._base");
dojo.require("dojox.wire.ml.util");
-
-dojo.declare("dojox.wire.ml.Service", dijit._Widget, {
- // summary:
- // A widget for a service
- // description:
- // This widget represents a service defined by a service description
- // specified with 'url' attribute.
- // If 'serviceType' and 'serviceUrl' attributes are specified, 'url'
- // attribute can be omitted.
- // url:
- // A URL to a service description
- // serviceUrl:
- // A URL to a service
- // serviceType:
- // A service type
- // handlerClass:
- // A service handler class name
- url: "",
- serviceUrl: "",
- serviceType: "",
- handlerClass: "",
- preventCache: true,
-
- postCreate: function(){
- // summary:
- // Call _createHandler()
- // description:
- // See _createHandler().
- this.handler = this._createHandler();
- },
-
- _handlerClasses: {
- "TEXT": "dojox.wire.ml.RestHandler",
- "XML": "dojox.wire.ml.XmlHandler",
- "JSON": "dojox.wire.ml.JsonHandler",
- "JSON-RPC": "dojo.rpc.JsonService"
- },
-
- _createHandler: function(){
- // summary:
- // Create a service handler
- // desription:
- // A service handler class is determined by:
- // 1. 'handlerClass' attribute
- // 2. 'serviceType' attribute
- // 3. 'serviceType' property in a service description
- // returns:
- // A service handler
- if(this.url){
- var self = this;
- var d = dojo.xhrGet({
- url: this.url,
- handleAs: "json",
- sync: true
- });
- d.addCallback(function(result){
- self.smd = result;
- });
- if(this.smd && !this.serviceUrl){
- this.serviceUrl = (this.smd.serviceUrl || this.smd.serviceURL);
- }
- }
- var handlerClass = undefined;
- if(this.handlerClass){
- handlerClass = dojox.wire._getClass(this.handlerClass);
- }else if(this.serviceType){
- handlerClass = this._handlerClasses[this.serviceType];
- if(handlerClass && dojo.isString(handlerClass)){
- handlerClass = dojox.wire._getClass(handlerClass);
- this._handlerClasses[this.serviceType] = handlerClass;
- }
- }else if(this.smd && this.smd.serviceType){
- handlerClass = this._handlerClasses[this.smd.serviceType];
- if(handlerClass && dojo.isString(handlerClass)){
- handlerClass = dojox.wire._getClass(handlerClass);
- this._handlerClasses[this.smd.serviceType] = handlerClass;
- }
- }
- if(!handlerClass){
- return null; //null
- }
- return new handlerClass(); //Object
- },
-
- callMethod: function(method, parameters){
- // summary:
- // Call a service method with parameters
- // method:
- // A method name
- // parameters:
- // An array parameters
- var deferred = new dojo.Deferred();
- this.handler.bind(method, parameters, deferred, this.serviceUrl);
- return deferred;
- }
+dojo.declare("dojox.wire.ml.Service",dijit._Widget,{url:"",serviceUrl:"",serviceType:"",handlerClass:"",preventCache:true,postCreate:function(){
+this.handler=this._createHandler();
+},_handlerClasses:{"TEXT":"dojox.wire.ml.RestHandler","XML":"dojox.wire.ml.XmlHandler","JSON":"dojox.wire.ml.JsonHandler","JSON-RPC":"dojo.rpc.JsonService"},_createHandler:function(){
+if(this.url){
+var _1=this;
+var d=dojo.xhrGet({url:this.url,handleAs:"json",sync:true});
+d.addCallback(function(_2){
+_1.smd=_2;
+});
+if(this.smd&&!this.serviceUrl){
+this.serviceUrl=(this.smd.serviceUrl||this.smd.serviceURL);
+}
+}
+var _3=undefined;
+if(this.handlerClass){
+_3=dojox.wire._getClass(this.handlerClass);
+}else{
+if(this.serviceType){
+_3=this._handlerClasses[this.serviceType];
+if(_3&&dojo.isString(_3)){
+_3=dojox.wire._getClass(_3);
+this._handlerClasses[this.serviceType]=_3;
+}
+}else{
+if(this.smd&&this.smd.serviceType){
+_3=this._handlerClasses[this.smd.serviceType];
+if(_3&&dojo.isString(_3)){
+_3=dojox.wire._getClass(_3);
+this._handlerClasses[this.smd.serviceType]=_3;
+}
+}
+}
+}
+if(!_3){
+return null;
+}
+return new _3();
+},callMethod:function(_4,_5){
+var _6=new dojo.Deferred();
+this.handler.bind(_4,_5,_6,this.serviceUrl);
+return _6;
+}});
+dojo.declare("dojox.wire.ml.RestHandler",null,{contentType:"text/plain",handleAs:"text",bind:function(_7,_8,_9,_a){
+_7=_7.toUpperCase();
+var _b=this;
+var _c={url:this._getUrl(_7,_8,_a),contentType:this.contentType,handleAs:this.handleAs,headers:this.headers,preventCache:this.preventCache};
+var d=null;
+if(_7=="POST"){
+_c.postData=this._getContent(_7,_8);
+d=dojo.rawXhrPost(_c);
+}else{
+if(_7=="PUT"){
+_c.putData=this._getContent(_7,_8);
+d=dojo.rawXhrPut(_c);
+}else{
+if(_7=="DELETE"){
+d=dojo.xhrDelete(_c);
+}else{
+d=dojo.xhrGet(_c);
+}
+}
+}
+d.addCallbacks(function(_d){
+_9.callback(_b._getResult(_d));
+},function(_e){
+_9.errback(_e);
});
-
-dojo.declare("dojox.wire.ml.RestHandler", null, {
- // summary:
- // A REST service handler
- // description:
- // This class serves as a base REST service.
- // Sub-classes may override _getContent() and _getResult() to handle
- // specific content types.
- contentType: "text/plain",
- handleAs: "text",
-
- bind: function(method, parameters, deferred, url){
- // summary:
- // Call a service method with parameters.
- // description:
- // A service is called with a URL generated by _getUrl() and
- // an HTTP method specified with 'method'.
- // For "POST" and "PUT", a content is generated by _getContent().
- // When data is loaded, _getResult() is used to pass the result to
- // Deferred.callback().
- // method:
- // A method name
- // parameters:
- // An array of parameters
- // deferred:
- // 'Deferred'
- // url:
- // A URL for the method
- method = method.toUpperCase();
- var self = this;
- var args = {
- url: this._getUrl(method, parameters, url),
- contentType: this.contentType,
- handleAs: this.handleAs,
- headers: this.headers,
- preventCache: this.preventCache
- };
- var d = null;
- if(method == "POST"){
- args.postData = this._getContent(method, parameters);
- d = dojo.rawXhrPost(args);
- }else if(method == "PUT"){
- args.putData = this._getContent(method, parameters);
- d = dojo.rawXhrPut(args);
- }else if(method == "DELETE"){
- d = dojo.xhrDelete(args);
- }else{ // "GET"
- d = dojo.xhrGet(args);
- }
- d.addCallbacks(function(result){
- deferred.callback(self._getResult(result));
- }, function(error){
- deferred.errback(error);
- });
- },
-
- _getUrl: function(/*String*/method, /*Array*/parameters, /*String*/url){
- // summary:
- // Generate a URL
- // description:
- // If 'method' is "GET" or "DELETE", a query string is generated
- // from a query object specified to the first parameter in
- // 'parameters' and appended to 'url'.
- // If 'url' contains variable seguments ("{parameter_name}"),
- // they are replaced with corresponding parameter values, instead.
- // method:
- // A method name
- // parameters:
- // An array of parameters
- // url:
- // A base URL
- // returns:
- // A URL
- if(method == "GET" || method == "DELETE"){
- var query = parameters[0];
- var queryString = "";
- for(var name in query){
- var value = query[name];
- if(value){
- value = encodeURIComponent(value);
- var variable = "{" + name + "}";
- var index = url.indexOf(variable);
- if(index >= 0){ // encode in path
- url = url.substring(0, index) + value + url.substring(index + variable.length);
- }else{ // encode as query string
- if(queryString){
- queryString += "&";
- }
- queryString += (name + "=" + value);
- }
- }
- }
- if(queryString){
- url += "?" + queryString;
- }
- }
- return url; //String
- },
-
- _getContent: function(/*String*/method, /*Array*/parameters){
- // summary:
- // Generate a request content
- // description:
- // If 'method' is "POST" or "PUT", the first parameter in
- // 'parameters' is returned.
- // method:
- // A method name
- // parameters:
- // An array of parameters
- // returns:
- // A request content
- if(method == "POST" || method == "PUT"){
- return (parameters ? parameters[0] : null); //anything
- }else{
- return null; //null
- }
- },
-
- _getResult: function(/*anything*/data){
- // summary:
- // Extract a result
- // description:
- // A response data is returned as is.
- // data:
- // A response data returned by a service
- // returns:
- // A result object
- return data; //anything
- }
-});
-
-dojo.declare("dojox.wire.ml.XmlHandler", dojox.wire.ml.RestHandler, {
- // summary:
- // A REST service handler for XML
- // description:
- // This class provides XML handling for a REST service.
- contentType: "text/xml",
- handleAs: "xml",
-
- _getContent: function(/*String*/method, /*Array*/parameters){
- // description:
- // If 'method' is "POST" or "PUT", the first parameter in
- // 'parameters' is used to generate an XML content.
- // method:
- // A method name
- // parameters:
- // An array of parameters
- // returns:
- // A request content
- var content = null;
- if(method == "POST" || method == "PUT"){
- var p = parameters[0];
- if(p){
- if(dojo.isString(p)){
- content = p;
- }else{
- var element = p;
- if(element instanceof dojox.wire.ml.XmlElement){
- element = element.element;
- }else if(element.nodeType === 9 /* DOCUMENT_NODE */){
- element = element.documentElement;
- }
- var declaration = "<?xml version=\"1.0\"?>"; // TODO: encoding?
- content = declaration + dojox.data.dom.innerXML(element);
- }
- }
- }
- return content;
- },
-
- _getResult: function(/*Document*/data){
- // summary:
- // Extract a result
- // description:
- // A response data (XML Document) is returned wrapped with
- // XmlElement.
- // data:
- // A response data returned by a service
- // returns:
- // A result object
- if(data){
- data = new dojox.wire.ml.XmlElement(data);
- }
- return data;
- }
-});
-
-dojo.declare("dojox.wire.ml.JsonHandler", dojox.wire.ml.RestHandler, {
- // summary:
- // A REST service handler for JSON
- // description:
- // This class provides JSON handling for a REST service.
- contentType: "text/json",
- handleAs: "json",
- headers: {"Accept": "*/json"},
-
- _getContent: function(/*String*/method, /*Array*/parameters){
- // summary:
- // Generate a request content
- // description:
- // If 'method' is "POST" or "PUT", the first parameter in
- // 'parameter' is used to generate a JSON content.
- // method:
- // A method name
- // parameters:
- // An array of parameters
- // returns:
- // A request content
- var content = null;
- if(method == "POST" || method == "PUT"){
- var p = (parameters ? parameters[0] : undefined);
- if(p){
- if(dojo.isString(p)){
- content = p;
- }else{
- content = dojo.toJson(p);
- }
- }
- }
- return content; //String
- }
-});
-
+},_getUrl:function(_f,_10,url){
+var _11;
+if(_f=="GET"||_f=="DELETE"){
+if(_10.length>0){
+_11=_10[0];
+}
+}else{
+if(_10.length>1){
+_11=_10[1];
+}
+}
+if(_11){
+var _12="";
+for(var _13 in _11){
+var _14=_11[_13];
+if(_14){
+_14=encodeURIComponent(_14);
+var _15="{"+_13+"}";
+var _16=url.indexOf(_15);
+if(_16>=0){
+url=url.substring(0,_16)+_14+url.substring(_16+_15.length);
+}else{
+if(_12){
+_12+="&";
+}
+_12+=(_13+"="+_14);
+}
+}
+}
+if(_12){
+url+="?"+_12;
+}
+}
+return url;
+},_getContent:function(_17,_18){
+if(_17=="POST"||_17=="PUT"){
+return (_18?_18[0]:null);
+}else{
+return null;
}
+},_getResult:function(_19){
+return _19;
+}});
+dojo.declare("dojox.wire.ml.XmlHandler",dojox.wire.ml.RestHandler,{contentType:"text/xml",handleAs:"xml",_getContent:function(_1a,_1b){
+var _1c=null;
+if(_1a=="POST"||_1a=="PUT"){
+var p=_1b[0];
+if(p){
+if(dojo.isString(p)){
+_1c=p;
+}else{
+var _1d=p;
+if(_1d instanceof dojox.wire.ml.XmlElement){
+_1d=_1d.element;
+}else{
+if(_1d.nodeType===9){
+_1d=_1d.documentElement;
+}
+}
+var _1e="<?xml version=\"1.0\"?>";
+_1c=_1e+dojox.xml.parser.innerXML(_1d);
+}
+}
+}
+return _1c;
+},_getResult:function(_1f){
+if(_1f){
+_1f=new dojox.wire.ml.XmlElement(_1f);
+}
+return _1f;
+}});
+dojo.declare("dojox.wire.ml.JsonHandler",dojox.wire.ml.RestHandler,{contentType:"text/json",handleAs:"json",headers:{"Accept":"*/json"},_getContent:function(_20,_21){
+var _22=null;
+if(_20=="POST"||_20=="PUT"){
+var p=(_21?_21[0]:undefined);
+if(p){
+if(dojo.isString(p)){
+_22=p;
+}else{
+_22=dojo.toJson(p);
+}
+}
+}
+return _22;
+}});
+}
diff --git a/js/dojo/dojox/wire/ml/Transfer.js b/js/dojo/dojox/wire/ml/Transfer.js
--- a/js/dojo/dojox/wire/ml/Transfer.js
+++ b/js/dojo/dojox/wire/ml/Transfer.js
@@ -1,359 +1,122 @@
-if(!dojo._hasResource["dojox.wire.ml.Transfer"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.wire.ml.Transfer"] = true;
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.wire.ml.Transfer"]){
+dojo._hasResource["dojox.wire.ml.Transfer"]=true;
dojo.provide("dojox.wire.ml.Transfer");
dojo.provide("dojox.wire.ml.ChildWire");
dojo.provide("dojox.wire.ml.ColumnWire");
dojo.provide("dojox.wire.ml.NodeWire");
dojo.provide("dojox.wire.ml.SegmentWire");
-
dojo.require("dijit._Widget");
dojo.require("dijit._Container");
dojo.require("dojox.wire._base");
dojo.require("dojox.wire.ml.Action");
-
-dojo.declare("dojox.wire.ml.Transfer", dojox.wire.ml.Action, {
- // summary:
- // A widget to transfer values through source and target Wires
- // description:
- // This widget represents a controller task to transfer a value from
- // a source to a target, through a source and a target Wires, when
- // an event (a function) or a topic is issued.
- // If this widget has child ChildWire widgets, their _addWire()
- // methods are called to add Wire arguments to a source or a target
- // Wire.
- // source:
- // A source object and/or property
- // sourceStore:
- // A data store for a source data item
- // sourceAttribute:
- // An attribute of a source data item
- // sourcePath:
- // A simplified XPath to a source property of an XML element
- // type:
- // A type of the value to be transferred
- // converter:
- // A class name of a converter for the value to be transferred
- // target:
- // A target object and/or property
- // targetStore:
- // A data store for a target data item
- // targetAttribute:
- // An attribute of a target data item
- // targetPath:
- // A simplified XPath to a target property of an XML element
- source: "",
- sourceStore: "",
- sourceAttribute: "",
- sourcePath: "",
- type: "",
- converter: "",
- delimiter: "",
- target: "",
- targetStore: "",
- targetAttribute: "",
- targetPath: "",
-
- _run: function(){
- // summary:
- // Transfer a value from a source to a target
- // description:
- // First, Wires for a source and a target are created from attributes.
- // Then, a value is obtained by getValue() of the source Wire is set
- // by setValue() of the target Wire.
- // The arguments to this method is passed to getValue() and setValue()
- // of Wires, so that they can be used to identify the root objects off
- // the arguments.
- var sourceWire = this._getWire("source");
- var targetWire = this._getWire("target");
- dojox.wire.transfer(sourceWire, targetWire, arguments);
- },
-
- _getWire: function(/*String*/which){
- // summary:
- // Build Wire arguments from attributes
- // description:
- // Arguments object for a source or a target Wire, specified by
- // 'which' argument, are build from corresponding attributes,
- // including '*Store' (for 'dataStore'), '*Attribute'
- // (for 'attribute), '*Path' (for 'path'), 'type' and 'converter'.
- // 'source' or 'target' attribute is parsed as:
- // "object_id.property_name[.sub_property_name...]"
- // If 'source' or 'target' starts with "arguments", 'object'
- // argument for a Wire is set to null, so that the root object is
- // given as an event or topic arguments.
- // If this widget has child ChildWire widgets with a corresponding
- // 'which' attribute, their _addWire() methods are called to add
- // additional Wire arguments and nested Wire is created,
- // specifying the Wire defined by this widget to 'object' argument.
- // which:
- // Which Wire arguments to build, "source" or "target"
- // returns:
- // Wire arguments object
- var args = undefined;
- if(which == "source"){
- args = {
- object: this.source,
- dataStore: this.sourceStore,
- attribute: this.sourceAttribute,
- path: this.sourcePath,
- type: this.type,
- converter: this.converter
- };
- }else{ // "target"
- args = {
- object: this.target,
- dataStore: this.targetStore,
- attribute: this.targetAttribute,
- path: this.targetPath
- };
- }
- if(args.object){
- if(args.object.length >= 9 && args.object.substring(0, 9) == "arguments"){
- args.property = args.object.substring(9);
- args.object = null;
- }else{
- var i = args.object.indexOf('.');
- if(i < 0){
- args.object = dojox.wire.ml._getValue(args.object);
- }else{
- args.property = args.object.substring(i + 1);
- args.object = dojox.wire.ml._getValue(args.object.substring(0, i));
- }
- }
- }
- if(args.dataStore){
- args.dataStore = dojox.wire.ml._getValue(args.dataStore);
- }
- var childArgs = undefined;
- var children = this.getChildren();
- for(var i in children){
- var child = children[i];
- if(child instanceof dojox.wire.ml.ChildWire && child.which == which){
- if(!childArgs){
- childArgs = {};
- }
- child._addWire(this, childArgs);
- }
- }
- if(childArgs){ // make nested Wires
- childArgs.object = dojox.wire.create(args);
- childArgs.dataStore = args.dataStore;
- args = childArgs;
- }
- return args; //Object
- }
-});
-
-dojo.declare("dojox.wire.ml.ChildWire", dijit._Widget, {
- // summary:
- // A widget to add a child wire
- // description:
- // Attributes of this widget are used to add a child Wire to
- // a composite Wire of the parent Transfer widget.
- // which:
- // Which Wire to add a child Wire, "source" or "target", default to
- // "source"
- // object:
- // A root object for the value
- // property:
- // A property for the value
- // type:
- // A type of the value
- // converter:
- // A class name of a converter for the value
- // attribute:
- // A data item attribute for the value
- // path:
- // A simplified XPath for the value
- // name:
- // A composite property name
- which: "source",
- object: "",
- property: "",
- type: "",
- converter: "",
- attribute: "",
- path: "",
- name: "",
-
- _addWire: function(/*Transfer*/parent, /*Object*/args){
- // summary:
- // Add a child Wire to Wire arguments
- // description:
- // If 'name' attribute is specified, a child Wire is added as
- // the named property of 'children' object of 'args'.
- // Otherwise, a child Wire is added to 'children' array of 'args'.
- // parent:
- // A parent Transfer widget
- // args:
- // Wire arguments
- if(this.name){ // object
- if(!args.children){
- args.children = {};
- }
- args.children[this.name] = this._getWire(parent);
- }else{ // array
- if(!args.children){
- args.children = [];
- }
- args.children.push(this._getWire(parent));
- }
- },
-
- _getWire: function(/*Transfer*/parent){
- // summary:
- // Build child Wire arguments from attributes
- // description:
- // Arguments object for a child Wire are build from attributes,
- // including 'object', 'property', 'type', 'converter',
- // 'attribute' and 'path'.
- // parent:
- // A parent Transfer widget
- // returns:
- // Wire arguments object
- return {
- object: (this.object ? dojox.wire.ml._getValue(this.object) : undefined),
- property: this.property,
- type: this.type,
- converter: this.converter,
- attribute: this.attribute,
- path: this.path
- }; //Object
- }
-});
-
-dojo.declare("dojox.wire.ml.ColumnWire", dojox.wire.ml.ChildWire, {
- // summary:
- // A widget to add a column wire
- // description:
- // Attributes of this widget are used to add a column Wire to
- // a TableAdapter of the parent Transfer widget.
- // column:
- // A column name
- column: "",
-
- _addWire: function(/*Transfer*/parent, /*Object*/args){
- // summary:
- // Add a column Wire to Wire arguments
- // description:
- // If 'column' attribute is specified, a column Wire is added as
- // the named property of 'columns' object of 'args'.
- // Otherwise, a column Wire is added to 'columns' array of 'args'.
- // parent:
- // A parent Transfer widget
- // args:
- // Wire arguments
- if(this.column){ // object
- if(!args.columns){
- args.columns = {};
- }
- args.columns[this.column] = this._getWire(parent);
- }else{ // array
- if(!args.columns){
- args.columns = [];
- }
- args.columns.push(this._getWire(parent));
- }
- }
-});
-
-dojo.declare("dojox.wire.ml.NodeWire", [dojox.wire.ml.ChildWire, dijit._Container], {
- // summary:
- // A widget to add node wires
- // description:
- // Attributes of this widget are used to add node Wires to
- // a TreeAdapter of the parent Transfer widget.
- // titleProperty:
- // A property for the node title
- // titleAttribute:
- // A data item attribute for the node title
- // titlePath:
- // A simplified XPath for the node title
- titleProperty: "",
- titleAttribute: "",
- titlePath: "",
-
- _addWire: function(/*Transfer*/parent, /*Object*/args){
- // summary:
- // Add node Wires to Wire arguments
- // description:
- // Node Wires are added to 'nodes' array of 'args'.
- // parent:
- // A parent Transfer widget
- // args:
- // Wire arguments
- if(!args.nodes){
- args.nodes = [];
- }
- args.nodes.push(this._getWires(parent));
- },
-
- _getWires: function(/*Transfer*/parent){
- // summary:
- // Build node Wires arguments from attributes
- // description:
- // Arguments object for 'node' Wire are build from attributes,
- // including 'object', 'property', 'type', 'converter',
- // 'attribute' and 'path'.
- // Arguments object for 'title' Wire are build from another set of
- // attributes, 'titleProperty', 'titleAttribute' and 'titlePath'.
- // If this widget has child NodeWire widgets, their _getWires()
- // methods are called recursively to build 'children' array of
- // 'args'.
- // parent:
- // A parent Transfer widget
- // returns:
- // Wire arguments object
- var args = {
- node: this._getWire(parent),
- title: {
- type: "string",
- property: this.titleProperty,
- attribute: this.titleAttribute,
- path: this.titlePath
- }
- };
- var childArgs = [];
- var children = this.getChildren();
- for(var i in children){
- var child = children[i];
- if(child instanceof dojox.wire.ml.NodeWire){
- childArgs.push(child._getWires(parent));
- }
- }
- if(childArgs.length > 0){
- args.children = childArgs;
- }
- return args; //Object
- }
-});
-
-dojo.declare("dojox.wire.ml.SegmentWire", dojox.wire.ml.ChildWire, {
- // summary:
- // A widget to add a segment wire
- // description:
- // Attributes of this widget are used to add a segment Wire to
- // a TextAdapter of the parent Transfer widget.
-
- _addWire: function(/*Transfer*/parent, /*Object*/args){
- // summary:
- // Add a segument Wire to Wire arguments
- // description:
- // A segment Wire is added to 'segments' array of 'args'.
- // If 'parent' has 'delimiter' attribute, it is used for
- // 'delimiter' property of 'args'.
- // parent:
- // A parent Transfer widget
- // args:
- // Wire arguments
- if(!args.segments){
- args.segments = [];
- }
- args.segments.push(this._getWire(parent));
- if(parent.delimiter && !args.delimiter){
- args.delimiter = parent.delimiter;
- }
- }
-});
-
+dojo.declare("dojox.wire.ml.Transfer",dojox.wire.ml.Action,{source:"",sourceStore:"",sourceAttribute:"",sourcePath:"",type:"",converter:"",delimiter:"",target:"",targetStore:"",targetAttribute:"",targetPath:"",_run:function(){
+var _1=this._getWire("source");
+var _2=this._getWire("target");
+dojox.wire.transfer(_1,_2,arguments);
+},_getWire:function(_3){
+var _4=undefined;
+if(_3=="source"){
+_4={object:this.source,dataStore:this.sourceStore,attribute:this.sourceAttribute,path:this.sourcePath,type:this.type,converter:this.converter};
+}else{
+_4={object:this.target,dataStore:this.targetStore,attribute:this.targetAttribute,path:this.targetPath};
+}
+if(_4.object){
+if(_4.object.length>=9&&_4.object.substring(0,9)=="arguments"){
+_4.property=_4.object.substring(9);
+_4.object=null;
+}else{
+var i=_4.object.indexOf(".");
+if(i<0){
+_4.object=dojox.wire.ml._getValue(_4.object);
+}else{
+_4.property=_4.object.substring(i+1);
+_4.object=dojox.wire.ml._getValue(_4.object.substring(0,i));
+}
+}
+}
+if(_4.dataStore){
+_4.dataStore=dojox.wire.ml._getValue(_4.dataStore);
+}
+var _5=undefined;
+var _6=this.getChildren();
+for(var i in _6){
+var _7=_6[i];
+if(_7 instanceof dojox.wire.ml.ChildWire&&_7.which==_3){
+if(!_5){
+_5={};
+}
+_7._addWire(this,_5);
+}
+}
+if(_5){
+_5.object=dojox.wire.create(_4);
+_5.dataStore=_4.dataStore;
+_4=_5;
+}
+return _4;
+}});
+dojo.declare("dojox.wire.ml.ChildWire",dijit._Widget,{which:"source",object:"",property:"",type:"",converter:"",attribute:"",path:"",name:"",_addWire:function(_8,_9){
+if(this.name){
+if(!_9.children){
+_9.children={};
}
+_9.children[this.name]=this._getWire(_8);
+}else{
+if(!_9.children){
+_9.children=[];
+}
+_9.children.push(this._getWire(_8));
+}
+},_getWire:function(_a){
+return {object:(this.object?dojox.wire.ml._getValue(this.object):undefined),property:this.property,type:this.type,converter:this.converter,attribute:this.attribute,path:this.path};
+}});
+dojo.declare("dojox.wire.ml.ColumnWire",dojox.wire.ml.ChildWire,{column:"",_addWire:function(_b,_c){
+if(this.column){
+if(!_c.columns){
+_c.columns={};
+}
+_c.columns[this.column]=this._getWire(_b);
+}else{
+if(!_c.columns){
+_c.columns=[];
+}
+_c.columns.push(this._getWire(_b));
+}
+}});
+dojo.declare("dojox.wire.ml.NodeWire",[dojox.wire.ml.ChildWire,dijit._Container],{titleProperty:"",titleAttribute:"",titlePath:"",_addWire:function(_d,_e){
+if(!_e.nodes){
+_e.nodes=[];
+}
+_e.nodes.push(this._getWires(_d));
+},_getWires:function(_f){
+var _10={node:this._getWire(_f),title:{type:"string",property:this.titleProperty,attribute:this.titleAttribute,path:this.titlePath}};
+var _11=[];
+var _12=this.getChildren();
+for(var i in _12){
+var _13=_12[i];
+if(_13 instanceof dojox.wire.ml.NodeWire){
+_11.push(_13._getWires(_f));
+}
+}
+if(_11.length>0){
+_10.children=_11;
+}
+return _10;
+}});
+dojo.declare("dojox.wire.ml.SegmentWire",dojox.wire.ml.ChildWire,{_addWire:function(_14,_15){
+if(!_15.segments){
+_15.segments=[];
+}
+_15.segments.push(this._getWire(_14));
+if(_14.delimiter&&!_15.delimiter){
+_15.delimiter=_14.delimiter;
+}
+}});
+}
diff --git a/js/dojo/dojox/wire/ml/util.js b/js/dojo/dojox/wire/ml/util.js
--- a/js/dojo/dojox/wire/ml/util.js
+++ b/js/dojo/dojox/wire/ml/util.js
@@ -1,295 +1,213 @@
-if(!dojo._hasResource["dojox.wire.ml.util"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.wire.ml.util"] = true;
-dojo.provide("dojox.wire.ml.util");
-
-dojo.require("dojox.data.dom");
-dojo.require("dojox.wire.Wire");
-
-dojox.wire.ml._getValue = function(/*String*/source, /*Array*/args){
- // summary:
- // Return a value
- // description:
- // This method obtains an object by an ID of a widget or an DOM
- // element.
- // If 'source' specifies a dotted notation to its property, a Wire is
- // used to get the object property.
- // If 'source' starts with "arguments", 'args' is used as a root
- // object for the Wire.
- // source:
- // A string to specify an object and its property
- // args:
- // An optional arguments array
- // returns:
- // A value
- if(!source){
- return undefined; //undefined
- }
- var property = undefined;
- if(args && source.length >= 9 && source.substring(0, 9) == "arguments"){
- property = source.substring(9);
- return new dojox.wire.Wire({property: property}).getValue(args);
- }
- var i = source.indexOf('.');
- if(i >= 0){
- property = source.substring(i + 1);
- source = source.substring(0, i);
- }
- var object = (dijit.byId(source) || dojo.byId(source) || dojo.getObject(source));
- if(!object){
- return undefined; //undefined
- }
- if(!property){
- return object; //Object
- }else{
- return new dojox.wire.Wire({object: object, property: property}).getValue(); //anything
- }
-};
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
-dojox.wire.ml._setValue = function(/*String*/target, /*anything*/value){
- // summary:
- // Store a value
- // description:
- // This method stores a value by an ID of a widget or an DOM
- // element with a dotted notation to its property, using a Wire.
- // target:
- // A string to specify an object and its property
- // value:
- // A value
- if(!target){
- return; //undefined
- }
- var i = target.indexOf('.');
- if(i < 0){
- return; //undefined
- }
- var object = this._getValue(target.substring(0, i));
- if(!object){
- return; //undefined
- }
- var property = target.substring(i + 1);
- new dojox.wire.Wire({object: object, property: property}).setValue(value);
-};
-
-dojo.declare("dojox.wire.ml.XmlElement", null, {
- // summary:
- // An object wrapping an XML element
- // description:
- // This class represents an XML element.
-
- constructor: function(/*Element||String*/element){
- // summary:
- // Initialize with an XML element or a tag name
- // element:
- // An XML element or a tag name
- if(dojo.isString(element)){
- element = this._getDocument().createElement(element);
- }
- this.element = element;
- },
- getPropertyValue: function(/*String*/property){
- // summary:
- // Return a property value
- // description:
- // If 'property' starts with '@', the attribute value is returned.
- // If 'property' specifies "text()", the value of the first child
- // text is returned.
- // Otherwise, child elements of the tag name specified with
- // 'property' are returned.
- // property:
- // A property name
- // returns:
- // A property value
- var value = undefined;
- if(!this.element){
- return value; //undefined
- }
- if(!property){
- return value; //undefined
- }
-
- if(property.charAt(0) == '@'){
- var attribute = property.substring(1);
- value = this.element.getAttribute(attribute);
- }else if(property == "text()"){
- var text = this.element.firstChild;
- if(text){
- value = text.nodeValue;
- }
- }else{ // child elements
- var elements = [];
- for(var i = 0; i < this.element.childNodes.length; i++){
- var child = this.element.childNodes[i];
- if(child.nodeType === 1 /* ELEMENT_NODE */ && child.nodeName == property){
- elements.push(new dojox.wire.ml.XmlElement(child));
- }
- }
- if(elements.length > 0){
- if(elements.length === 1){
- value = elements[0];
- }else{
- value = elements;
- }
- }
- }
- return value; //String||Array||XmlElement
- },
- setPropertyValue: function(/*String*/property, /*String||Array||XmlElement*/value){
- // summary:
- // Store a property value
- // description:
- // If 'property' starts with '@', 'value' is set to the attribute.
- // If 'property' specifies "text()", 'value' is set as the first
- // child text.
- // If 'value' is a string, a child element of the tag name
- // specified with 'property' is created and 'value' is set as
- // the first child text of the child element.
- // Otherwise, 'value' is set to as child elements.
- // property:
- // A property name
- // value:
- // A property value
- if(!this.element){
- return; //undefined
- }
- if(!property){
- return; //undefined
- }
-
- if(property.charAt(0) == '@'){
- var attribute = property.substring(1);
- if(value){
- this.element.setAttribute(attribute, value);
- }else{
- this.element.removeAttribute(attribute);
- }
- }else if(property == "text()"){
- while(this.element.firstChild){
- this.element.removeChild(this.element.firstChild);
- }
- if(value){
- var text = this._getDocument().createTextNode(value);
- this.element.appendChild(text);
- }
- }else{ // child elements
- var nextChild = null;
- for(var i = this.element.childNodes.length - 1; i >= 0; i--){
- var child = this.element.childNodes[i];
- if(child.nodeType === 1 /* ELEMENT_NODE */ && child.nodeName == property){
- if(!nextChild){
- nextChild = child.nextSibling;
- }
- this.element.removeChild(child);
- }
- }
- if(value){
- if(dojo.isArray(value)){
- for(var i in value){
- var e = value[i];
- if(e.element){
- this.element.insertBefore(e.element, nextChild);
- }
- }
- }else if(value instanceof dojox.wire.ml.XmlElement){
- if(value.element){
- this.element.insertBefore(value.element, nextChild);
- }
- }else{ // assume string
- var child = this._getDocument().createElement(property);
- var text = this._getDocument().createTextNode(value);
- child.appendChild(text);
- this.element.insertBefore(child, nextChild);
- }
- }
- }
- },
-
- toString: function(){
- // summary:
- // Return a value of the first text child of the element
- // description:
- // A value of the first text child of the element is returned.
- // returns:
- // A value of the first text child of the element
- var s = "";
- if(this.element){
- var text = this.element.firstChild;
- if(text){
- s = text.nodeValue;
- }
- }
- return s; //String
- },
-
- toObject: function(){
- // summary:
- // Return an object representation of the element
- // description:
- // An object with properties for child elements, attributes and
- // text is returned.
- // returns:
- // An object representation of the element
- if(!this.element){
- return null; //null
- }
- var text = "";
- var obj = {};
- var elements = 0;
- for(var i = 0; i < this.element.childNodes.length; i++){
- var child = this.element.childNodes[i];
- if(child.nodeType === 1 /* ELEMENT_NODE */){
- elements++;
- var o = new dojox.wire.ml.XmlElement(child).toObject();
- var name = child.nodeName;
- var p = obj[name];
- if(!p){
- obj[name] = o;
- }else if(dojo.isArray(p)){
- p.push(o);
- }else{
- obj[name] = [p, o]; // make them array
- }
- }else if(child.nodeType === 3 /* TEXT_NODE */ ||
- child.nodeType === 4 /* CDATA_SECTION_NODE */){
- text += child.nodeValue;
- }
- }
- var attributes = 0;
- if(this.element.nodeType === 1 /* ELEMENT_NODE */){
- attributes = this.element.attributes.length;
- for(var i = 0; i < attributes; i++){
- var attr = this.element.attributes[i];
- obj["@" + attr.nodeName] = attr.nodeValue;
- }
- }
- if(elements === 0){
- if(attributes === 0){
- // text only
- return text; //String
- }
- // text with attributes
- obj["text()"] = text;
- }
- // else ignore text
- return obj; //Object
- },
-
- _getDocument: function(){
- // summary:
- // Return a DOM document
- // description:
- // If 'element' is specified, a DOM document of the element is
- // returned.
- // Otherwise, a DOM document is created.
- // returns:
- // A DOM document
- if(this.element){
- return (this.element.nodeType == 9 /* DOCUMENT_NODE */ ?
- this.element : this.element.ownerDocument); //Document
- }else{
- return dojox.data.dom.createDocument(); //Document
- }
- }
-});
-
+if(!dojo._hasResource["dojox.wire.ml.util"]){
+dojo._hasResource["dojox.wire.ml.util"]=true;
+dojo.provide("dojox.wire.ml.util");
+dojo.require("dojox.xml.parser");
+dojo.require("dojox.wire.Wire");
+dojox.wire.ml._getValue=function(_1,_2){
+if(!_1){
+return undefined;
+}
+var _3=undefined;
+if(_2&&_1.length>=9&&_1.substring(0,9)=="arguments"){
+_3=_1.substring(9);
+return new dojox.wire.Wire({property:_3}).getValue(_2);
+}
+var i=_1.indexOf(".");
+if(i>=0){
+_3=_1.substring(i+1);
+_1=_1.substring(0,i);
+}
+var _4=(dijit.byId(_1)||dojo.byId(_1)||dojo.getObject(_1));
+if(!_4){
+return undefined;
+}
+if(!_3){
+return _4;
+}else{
+return new dojox.wire.Wire({object:_4,property:_3}).getValue();
+}
+};
+dojox.wire.ml._setValue=function(_5,_6){
+if(!_5){
+return;
+}
+var i=_5.indexOf(".");
+if(i<0){
+return;
+}
+var _7=this._getValue(_5.substring(0,i));
+if(!_7){
+return;
+}
+var _8=_5.substring(i+1);
+var _9=new dojox.wire.Wire({object:_7,property:_8}).setValue(_6);
+};
+dojo.declare("dojox.wire.ml.XmlElement",null,{constructor:function(_a){
+if(dojo.isString(_a)){
+_a=this._getDocument().createElement(_a);
+}
+this.element=_a;
+},getPropertyValue:function(_b){
+var _c=undefined;
+if(!this.element){
+return _c;
+}
+if(!_b){
+return _c;
+}
+if(_b.charAt(0)=="@"){
+var _d=_b.substring(1);
+_c=this.element.getAttribute(_d);
+}else{
+if(_b=="text()"){
+var _e=this.element.firstChild;
+if(_e){
+_c=_e.nodeValue;
+}
+}else{
+var _f=[];
+for(var i=0;i<this.element.childNodes.length;i++){
+var _10=this.element.childNodes[i];
+if(_10.nodeType===1&&_10.nodeName==_b){
+_f.push(new dojox.wire.ml.XmlElement(_10));
+}
+}
+if(_f.length>0){
+if(_f.length===1){
+_c=_f[0];
+}else{
+_c=_f;
+}
+}
+}
+}
+return _c;
+},setPropertyValue:function(_11,_12){
+var i;
+var _13;
+if(!this.element){
+return;
+}
+if(!_11){
+return;
+}
+if(_11.charAt(0)=="@"){
+var _14=_11.substring(1);
+if(_12){
+this.element.setAttribute(_14,_12);
+}else{
+this.element.removeAttribute(_14);
}
+}else{
+if(_11=="text()"){
+while(this.element.firstChild){
+this.element.removeChild(this.element.firstChild);
+}
+if(_12){
+_13=this._getDocument().createTextNode(_12);
+this.element.appendChild(_13);
+}
+}else{
+var _15=null;
+var _16;
+for(i=this.element.childNodes.length-1;i>=0;i--){
+_16=this.element.childNodes[i];
+if(_16.nodeType===1&&_16.nodeName==_11){
+if(!_15){
+_15=_16.nextSibling;
+}
+this.element.removeChild(_16);
+}
+}
+if(_12){
+if(dojo.isArray(_12)){
+for(i in _12){
+var e=_12[i];
+if(e.element){
+this.element.insertBefore(e.element,_15);
+}
+}
+}else{
+if(_12 instanceof dojox.wire.ml.XmlElement){
+if(_12.element){
+this.element.insertBefore(_12.element,_15);
+}
+}else{
+_16=this._getDocument().createElement(_11);
+_13=this._getDocument().createTextNode(_12);
+_16.appendChild(_13);
+this.element.insertBefore(_16,_15);
+}
+}
+}
+}
+}
+},toString:function(){
+var s="";
+if(this.element){
+var _17=this.element.firstChild;
+if(_17){
+s=_17.nodeValue;
+}
+}
+return s;
+},toObject:function(){
+if(!this.element){
+return null;
+}
+var _18="";
+var obj={};
+var _19=0;
+var i;
+for(i=0;i<this.element.childNodes.length;i++){
+var _1a=this.element.childNodes[i];
+if(_1a.nodeType===1){
+_19++;
+var o=new dojox.wire.ml.XmlElement(_1a).toObject();
+var _1b=_1a.nodeName;
+var p=obj[_1b];
+if(!p){
+obj[_1b]=o;
+}else{
+if(dojo.isArray(p)){
+p.push(o);
+}else{
+obj[_1b]=[p,o];
+}
+}
+}else{
+if(_1a.nodeType===3||_1a.nodeType===4){
+_18+=_1a.nodeValue;
+}
+}
+}
+var _1c=0;
+if(this.element.nodeType===1){
+_1c=this.element.attributes.length;
+for(i=0;i<_1c;i++){
+var _1d=this.element.attributes[i];
+obj["@"+_1d.nodeName]=_1d.nodeValue;
+}
+}
+if(_19===0){
+if(_1c===0){
+return _18;
+}
+obj["text()"]=_18;
+}
+return obj;
+},_getDocument:function(){
+if(this.element){
+return (this.element.nodeType==9?this.element:this.element.ownerDocument);
+}else{
+return dojox.xml.parser.parse();
+}
+}});
+}
diff --git a/js/dojo/dojox/xml/DomParser.js b/js/dojo/dojox/xml/DomParser.js
--- a/js/dojo/dojox/xml/DomParser.js
+++ b/js/dojo/dojox/xml/DomParser.js
@@ -1,373 +1,325 @@
-if(!dojo._hasResource["dojox.xml.DomParser"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.xml.DomParser"] = true;
-dojo.provide("dojox.xml.DomParser");
-
-dojox.xml.DomParser=new (function(){
- /**********************************************************
- * The DomParser is a close-to (but not entirely)
- * conforming XML parser based on regular
- * expressions. It will take any XML fragment
- * and return a lightweight JS structure that is
- * similar to (but not exactly) the DOM specification.
- *
- * Getter and setter methods are NOT available; the goal
- * was to keep the resulting object model entirely JS-like.
- *
- * All node types but document fragments are supported;
- * all nodes support getElementsByTagName and
- * getElementsByTagNameNS (with short names byName and
- * byNameNS). The document node supports getElementById
- * (byId), and all nodes support a supplimental
- * childrenByName/childrenByNameNS method as well.
- *
- * The object model is intended to be a READONLY format;
- * mutation events are NOT supported, and though you
- * can change properties on a node-by-node basis, certain
- * operations are not supported (such as changing the ID
- * of an element).
- **********************************************************/
-
- // internal use only.
- var nodeTypes={ ELEMENT:1, ATTRIBUTE:2, TEXT:3, CDATA_SECTION:4, PROCESSING_INSTRUCTION:7, COMMENT:8, DOCUMENT:9 };
-
- // compile the regular expressions once.
- var reTags=/<([^>\/\s+]*)([^>]*)>([^<]*)/g;
- var reAttr=/([^=]*)="([^"]*)"/g;
- var reEntity=/<!ENTITY\s+([^"]*)\s+"([^"]*)">/g;
- var reCData=/<!\[CDATA\[([\u0001-\uFFFF]*?)\]\]>/g;
- var reComments=/<!--([\u0001-\uFFFF]*?)-->/g;
- var trim=/^\s+|\s+$/g;
- var normalize=/\s+/g;
- var egt=/\&gt;/g;
- var elt=/\&lt;/g;
- var equot=/\&quot;/g;
- var eapos=/\&apos;/g;
- var eamp=/\&amp;/g;
- var dNs="_def_";
-
- // create a root node.
- function _doc(){
- return new (function(){
- var all={};
- this.nodeType=nodeTypes.DOCUMENT;
- this.nodeName="#document";
- this.namespaces={};
- this._nsPaths={};
- this.childNodes=[];
- this.documentElement=null;
-
- // any element with an ID attribute will be added to the internal hashtable.
- this._add=function(obj){
- if(typeof(obj.id)!="undefined"){ all[obj.id]=obj; }
- };
- this._remove=function(id){
- if(all[id]){ delete all[id]; }
- };
-
- this.byId=this.getElementById=function(id){ return keys[id]; };
- this.byName=this.getElementsByTagName=byName;
- this.byNameNS=this.getElementsByTagNameNS=byNameNS;
- this.childrenByName=childrenByName;
- })();
- }
+/*
+ Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
- // functions attached to element nodes
- function byName(name){
- // return all descendants with name. Fully qualified (i.e. svg:svg)
- function __(node, name, arr){
- dojo.forEach(node.childNodes, function(c){
- if(c.nodeType==nodeTypes.ELEMENT){
- if(name=="*"){ arr.push(c); }
- else if(c.nodeName==name){ arr.push(c); }
- __(c, name, arr);
- }
- });
- }
- var a=[];
- __(this, name, a);
- return a;
- }
- function byNameNS(name, ns){
- // return all descendants with name by namespace. If no namespace passed, the default is used.
- function __(node, name, ns, arr){
- dojo.forEach(node.childNodes, function(c){
- if(c.nodeType==nodeTypes.ELEMENT){
- if(name=="*"&&c.ownerDocument._nsPaths[ns]==c.namespace){ arr.push(c); }
- else if(c.localName==name&&c.ownerDocument._nsPaths[ns]==c.namespace){ arr.push(c); }
- __(c, name, ns, arr);
- }
- });
- }
- if(!ns){ ns=dNs; }
- var a=[];
- __(this, name, ns, a);
- return a;
- }
- // Only child nodes with name.
- function childrenByName(name){
- var a=[];
- dojo.forEach(this.childNodes, function(c){
- if(c.nodeType==nodeTypes.ELEMENT){
- if(name=="*"){ a.push(c); }
- else if(c.nodeName==name){ a.push(c); }
- }
- });
- return a;
- }
-
- // attribute functions
- function getAttr(name){
- for(var i=0; i<this.attributes.length; i++){
- if(this.attributes[i].nodeName==name){
- return this.attributes[i].nodeValue;
- }
- }
- return null;
- }
- function getAttrNS(name, ns){
- for(var i=0; i<this.attributes.length; i++){
- if(this.ownerDocument._nsPaths[ns]==this.attributes[i].namespace
- &&this.attributes[i].localName==name
- ){
- return this.attributes[i].nodeValue;
- }
- }
- return null;
- }
- // note that you can only swap IDs using setAttribute, NOT with setAttributeNS.
- function setAttr(name, val){
- var old=null;
- for(var i=0; i<this.attributes.length; i++){
- if(this.attributes[i].nodeName==name){
- old=this.attributes[i].nodeValue;
- this.attributes[i].nodeValue=val;
- break;
- }
- }
- if(name=="id"){
- if(old!=null){ this.ownerDocument._remove(old); }
- this.ownerDocument._add(this);
- }
- }
- function setAttrNS(name, val, ns){
- for(var i=0; i<this.attributes.length; i++){
- if(this.ownerDocument._nsPaths[ns]==this.attributes[i].namespace
- &&this.attributes[i].localName==name
- ){
- this.attributes[i].nodeValue=val;
- return;
- }
- }
- }
-
- // navigation
- function prev(){
- var p=this.parentNode;
- if(p){
- for(var i=0;i<p.childNodes.length;i++){
- if(p.childNodes[i]==this&&i>0){
- return p.childNodes[i-1];
- }
- }
- }
- return null;
- }
- function next(){
- var p=this.parentNode;
- if(p){
- for(var i=0;i<p.childNodes.length;i++){
- if(p.childNodes[i]==this&&(i+1)<p.childNodes.length){
- return p.childNodes[i+1];
- }
- }
- }
- return null;
- }
- // the main method.
- this.parse=function(/* String */str){
- var root=_doc();
- if(str==null){ return root; }
- if(str.length==0){ return root; }
-
- // preprocess custom entities
- if(str.indexOf("<!ENTITY")>0){
- var entity, eRe=[];
- if(reEntity.test(str)){
- reEntity.lastIndex=0;
- // match entities
- while((entity=reEntity.exec(str))!=null){
- eRe.push({
- entity:"&"+entity[1].replace(trim,"")+";",
- expression:entity[2]
- });
- }
- // replace instances in the document.
- for(var i=0; i<eRe.length; i++){
- str=str.replace(new RegExp(eRe[i].entity, "g"), eRe[i].expression);
- }
- }
- }
-
- // pre-parse for CData, and tokenize.
- var cdSections=[], cdata;
- while((cdata=reCData.exec(str))!=null){ cdSections.push(cdata[1]); }
- for(var i=0; i<cdSections.length; i++){ str=str.replace(cdSections[i], i); }
-
- // pre-parse for comments, and tokenize.
- var comments=[], comment;
- while((comment=reComments.exec(str))!=null){ comments.push(comment[1]); }
- for(i=0; i<comments.length; i++){ str=str.replace(comments[i], i); }
-
- // parse the document
- var res, obj=root;
- while((res=reTags.exec(str))!=null){
- // closing tags.
- if(res[2].charAt(0)=="/"){
- if(obj.parentNode){
- obj=obj.parentNode;
- }
- continue;
- }
-
- // open tags.
- if(res[1].length>0){
- // figure out the type of node.
- if(res[1].charAt(0)=="?"){
- // processing instruction
- var name=res[1].substr(1);
- var target=res[2].substr(0,res[2].length-2);
- obj.childNodes.push({
- nodeType:nodeTypes.PROCESSING_INSTRUCTION,
- nodeName:name,
- nodeValue:target
- });
- }
- else if(res[1].charAt(0)=="!"){
- // CDATA; skip over any declaration elements.
- if(res[1].indexOf("![CDATA[")==0){
- var val=parseInt(res[1].replace("![CDATA[","").replace("]]",""));
- obj.childNodes.push({
- nodeType:nodeTypes.CDATA_SECTION,
- nodeName:"#cdata-section",
- nodeValue:cdSections[val]
- });
- }
- // Comments.
- else if(res[1].substr(0,3)=="!--"){
- var val=parseInt(res[1].replace("!--","").replace("--",""));
- obj.childNodes.push({
- nodeType:nodeTypes.COMMENT,
- nodeName:"#comment",
- nodeValue:comments[val]
- });
- }
- }
- else {
- // Elements (with attribute and text)
- var name=res[1].replace(trim,"");
- var o={
- nodeType:nodeTypes.ELEMENT,
- nodeName:name,
- localName:name,
- namespace:dNs,
- ownerDocument:root,
- attributes:[],
- parentNode:null,
- childNodes:[]
- };
-
- // check to see if it's namespaced.
- if(name.indexOf(":")>-1){
- var t=name.split(":");
- o.namespace=t[0];
- o.localName=t[1];
- }
-
- // set the function references.
- o.byName=o.getElementsByTagName=byName;
- o.byNameNS=o.getElementsByTagNameNS=byNameNS;
- o.childrenByName=childrenByName;
- o.getAttribute=getAttr;
- o.getAttributeNS=getAttrNS;
- o.setAttribute=setAttr;
- o.setAttributeNS=setAttrNS;
- o.previous=o.previousSibling=prev;
- o.next=o.nextSibling=next;
-
- // parse the attribute string.
- var attr;
- while((attr=reAttr.exec(res[2]))!=null){
- if(attr.length>0){
- var name=attr[1].replace(trim,"");
- var val=attr[2].replace(normalize," ")
- .replace(egt,">")
- .replace(elt,"<")
- .replace(eapos,"'")
- .replace(equot,'"')
- .replace(eamp,"&");
- if(name.indexOf("xmlns")==0){
- if(name.indexOf(":")>0){
- var ns=name.split(":");
- root.namespaces[ns[1]]=val;
- root._nsPaths[val]=ns[1];
- } else {
- root.namespaces[dNs]=val;
- root._nsPaths[val]=dNs;
- }
- } else {
- var ln=name;
- var ns=dNs;
- if(name.indexOf(":")>0){
- var t=name.split(":");
- ln=t[1];
- ns=t[0];
- }
- o.attributes.push({
- nodeType:nodeTypes.ATTRIBUTE,
- nodeName:name,
- localName:ln,
- namespace:ns,
- nodeValue:val
- });
-
- // only add id as a property.
- if(ln=="id"){ o.id=val; }
- }
- }
- }
- root._add(o);
-
- var text=res[3].replace(trim,"");
- if(text.length>0)
- o.childNodes.push({
- nodeType:nodeTypes.TEXT,
- nodeName:"#text",
- nodeValue:text.replace(normalize," ").replace(egt,">").replace(elt,"<").replace(eapos,"'").replace(equot,'"').replace(eamp,"&")
- });
-
- if(obj){
- obj.childNodes.push(o);
- o.parentNode=obj;
- // if it's not a self-closing node.
- if(res[2].charAt(res[2].length-1)!="/"){
- obj=o;
- }
- }
- }
- }
- }
-
- // set the document element
- for(var i=0; i<root.childNodes.length; i++){
- var e=root.childNodes[i];
- if(e.nodeType==nodeTypes.ELEMENT){
- root.documentElement=e;
- break;
- }
- }
- return root;
- };
+if(!dojo._hasResource["dojox.xml.DomParser"]){
+dojo._hasResource["dojox.xml.DomParser"]=true;
+dojo.provide("dojox.xml.DomParser");
+dojox.xml.DomParser=new (function(){
+var _1={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9};
+var _2=/<([^>\/\s+]*)([^>]*)>([^<]*)/g;
+var _3=/([^=]*)=(("([^"]*)")|('([^']*)'))/g;
+var _4=/<!ENTITY\s+([^"]*)\s+"([^"]*)">/g;
+var _5=/<!\[CDATA\[([\u0001-\uFFFF]*?)\]\]>/g;
+var _6=/<!--([\u0001-\uFFFF]*?)-->/g;
+var _7=/^\s+|\s+$/g;
+var _8=/\s+/g;
+var _9=/\&gt;/g;
+var _a=/\&lt;/g;
+var _b=/\&quot;/g;
+var _c=/\&apos;/g;
+var _d=/\&amp;/g;
+var _e="_def_";
+function _f(){
+return new (function(){
+var all={};
+this.nodeType=_1.DOCUMENT;
+this.nodeName="#document";
+this.namespaces={};
+this._nsPaths={};
+this.childNodes=[];
+this.documentElement=null;
+this._add=function(obj){
+if(typeof (obj.id)!="undefined"){
+all[obj.id]=obj;
+}
+};
+this._remove=function(id){
+if(all[id]){
+delete all[id];
+}
+};
+this.byId=this.getElementById=function(id){
+return all[id];
+};
+this.byName=this.getElementsByTagName=_10;
+this.byNameNS=this.getElementsByTagNameNS=_11;
+this.childrenByName=_12;
+this.childrenByNameNS=_13;
})();
-
+};
+function _10(_14){
+function _15(_16,_17,arr){
+dojo.forEach(_16.childNodes,function(c){
+if(c.nodeType==_1.ELEMENT){
+if(_17=="*"){
+arr.push(c);
+}else{
+if(c.nodeName==_17){
+arr.push(c);
+}
+}
+_15(c,_17,arr);
+}
+});
+};
+var a=[];
+_15(this,_14,a);
+return a;
+};
+function _11(_18,ns){
+function _19(_1a,_1b,ns,arr){
+dojo.forEach(_1a.childNodes,function(c){
+if(c.nodeType==_1.ELEMENT){
+if(_1b=="*"&&c.ownerDocument._nsPaths[ns]==c.namespace){
+arr.push(c);
+}else{
+if(c.localName==_1b&&c.ownerDocument._nsPaths[ns]==c.namespace){
+arr.push(c);
+}
+}
+_19(c,_1b,ns,arr);
+}
+});
+};
+if(!ns){
+ns=_e;
+}
+var a=[];
+_19(this,_18,ns,a);
+return a;
+};
+function _12(_1c){
+var a=[];
+dojo.forEach(this.childNodes,function(c){
+if(c.nodeType==_1.ELEMENT){
+if(_1c=="*"){
+a.push(c);
+}else{
+if(c.nodeName==_1c){
+a.push(c);
+}
+}
+}
+});
+return a;
+};
+function _13(_1d,ns){
+var a=[];
+dojo.forEach(this.childNodes,function(c){
+if(c.nodeType==_1.ELEMENT){
+if(_1d=="*"&&c.ownerDocument._nsPaths[ns]==c.namespace){
+a.push(c);
+}else{
+if(c.localName==_1d&&c.ownerDocument._nsPaths[ns]==c.namespace){
+a.push(c);
+}
+}
+}
+});
+return a;
+};
+function _1e(v){
+return {nodeType:_1.TEXT,nodeName:"#text",nodeValue:v.replace(_8," ").replace(_9,">").replace(_a,"<").replace(_c,"'").replace(_b,"\"").replace(_d,"&")};
+};
+function _1f(_20){
+for(var i=0;i<this.attributes.length;i++){
+if(this.attributes[i].nodeName==_20){
+return this.attributes[i].nodeValue;
+}
+}
+return null;
+};
+function _21(_22,ns){
+for(var i=0;i<this.attributes.length;i++){
+if(this.ownerDocument._nsPaths[ns]==this.attributes[i].namespace&&this.attributes[i].localName==_22){
+return this.attributes[i].nodeValue;
+}
+}
+return null;
+};
+function _23(_24,val){
+var old=null;
+for(var i=0;i<this.attributes.length;i++){
+if(this.attributes[i].nodeName==_24){
+old=this.attributes[i].nodeValue;
+this.attributes[i].nodeValue=val;
+break;
+}
+}
+if(_24=="id"){
+if(old!=null){
+this.ownerDocument._remove(old);
+}
+this.ownerDocument._add(this);
+}
+};
+function _25(_26,val,ns){
+for(var i=0;i<this.attributes.length;i++){
+if(this.ownerDocument._nsPaths[ns]==this.attributes[i].namespace&&this.attributes[i].localName==_26){
+this.attributes[i].nodeValue=val;
+return;
+}
+}
+};
+function _27(){
+var p=this.parentNode;
+if(p){
+for(var i=0;i<p.childNodes.length;i++){
+if(p.childNodes[i]==this&&i>0){
+return p.childNodes[i-1];
+}
+}
+}
+return null;
+};
+function _28(){
+var p=this.parentNode;
+if(p){
+for(var i=0;i<p.childNodes.length;i++){
+if(p.childNodes[i]==this&&(i+1)<p.childNodes.length){
+return p.childNodes[i+1];
+}
+}
}
+return null;
+};
+this.parse=function(str){
+var _29=_f();
+if(str==null){
+return _29;
+}
+if(str.length==0){
+return _29;
+}
+if(str.indexOf("<!ENTITY")>0){
+var _2a,eRe=[];
+if(_4.test(str)){
+_4.lastIndex=0;
+while((_2a=_4.exec(str))!=null){
+eRe.push({entity:"&"+_2a[1].replace(_7,"")+";",expression:_2a[2]});
+}
+for(var i=0;i<eRe.length;i++){
+str=str.replace(new RegExp(eRe[i].entity,"g"),eRe[i].expression);
+}
+}
+}
+var _2b=[],_2c;
+while((_2c=_5.exec(str))!=null){
+_2b.push(_2c[1]);
+}
+for(var i=0;i<_2b.length;i++){
+str=str.replace(_2b[i],i);
+}
+var _2d=[],_2e;
+while((_2e=_6.exec(str))!=null){
+_2d.push(_2e[1]);
+}
+for(i=0;i<_2d.length;i++){
+str=str.replace(_2d[i],i);
+}
+var res,obj=_29;
+while((res=_2.exec(str))!=null){
+if(res[2].charAt(0)=="/"&&res[2].replace(_7,"").length>1){
+if(obj.parentNode){
+obj=obj.parentNode;
+}
+var _2f=(res[3]||"").replace(_7,"");
+if(_2f.length>0){
+obj.childNodes.push(_1e(_2f));
+}
+}else{
+if(res[1].length>0){
+if(res[1].charAt(0)=="?"){
+var _30=res[1].substr(1);
+var _31=res[2].substr(0,res[2].length-2);
+obj.childNodes.push({nodeType:_1.PROCESSING_INSTRUCTION,nodeName:_30,nodeValue:_31});
+}else{
+if(res[1].charAt(0)=="!"){
+if(res[1].indexOf("![CDATA[")==0){
+var val=parseInt(res[1].replace("![CDATA[","").replace("]]",""));
+obj.childNodes.push({nodeType:_1.CDATA_SECTION,nodeName:"#cdata-section",nodeValue:_2b[val]});
+}else{
+if(res[1].substr(0,3)=="!--"){
+var val=parseInt(res[1].replace("!--","").replace("--",""));
+obj.childNodes.push({nodeType:_1.COMMENT,nodeName:"#comment",nodeValue:_2d[val]});
+}
+}
+}else{
+var _30=res[1].replace(_7,"");
+var o={nodeType:_1.ELEMENT,nodeName:_30,localName:_30,namespace:_e,ownerDocument:_29,attributes:[],parentNode:null,childNodes:[]};
+if(_30.indexOf(":")>-1){
+var t=_30.split(":");
+o.namespace=t[0];
+o.localName=t[1];
+}
+o.byName=o.getElementsByTagName=_10;
+o.byNameNS=o.getElementsByTagNameNS=_11;
+o.childrenByName=_12;
+o.childrenByNameNS=_13;
+o.getAttribute=_1f;
+o.getAttributeNS=_21;
+o.setAttribute=_23;
+o.setAttributeNS=_25;
+o.previous=o.previousSibling=_27;
+o.next=o.nextSibling=_28;
+var _32;
+while((_32=_3.exec(res[2]))!=null){
+if(_32.length>0){
+var _30=_32[1].replace(_7,"");
+var val=(_32[4]||_32[6]||"").replace(_8," ").replace(_9,">").replace(_a,"<").replace(_c,"'").replace(_b,"\"").replace(_d,"&");
+if(_30.indexOf("xmlns")==0){
+if(_30.indexOf(":")>0){
+var ns=_30.split(":");
+_29.namespaces[ns[1]]=val;
+_29._nsPaths[val]=ns[1];
+}else{
+_29.namespaces[_e]=val;
+_29._nsPaths[val]=_e;
+}
+}else{
+var ln=_30;
+var ns=_e;
+if(_30.indexOf(":")>0){
+var t=_30.split(":");
+ln=t[1];
+ns=t[0];
+}
+o.attributes.push({nodeType:_1.ATTRIBUTE,nodeName:_30,localName:ln,namespace:ns,nodeValue:val});
+if(ln=="id"){
+o.id=val;
+}
+}
+}
+}
+_29._add(o);
+if(obj){
+obj.childNodes.push(o);
+o.parentNode=obj;
+if(res[2].charAt(res[2].length-1)!="/"){
+obj=o;
+}
+}
+var _2f=res[3];
+if(_2f.length>0){
+obj.childNodes.push(_1e(_2f));
+}
+}
+}
+}
+}
+}
+for(var i=0;i<_29.childNodes.length;i++){
+var e=_29.childNodes[i];
+if(e.nodeType==_1.ELEMENT){
+_29.documentElement=e;
+break;
+}
+}
+return _29;
+};
+})();
+}
diff --git a/js/dojo/dojox/xml/README b/js/dojo/dojox/xml/README
--- a/js/dojo/dojox/xml/README
+++ b/js/dojo/dojox/xml/README
@@ -1,40 +1,40 @@
--------------------------------------------------------------------------------
-DojoX XML Utilities
--------------------------------------------------------------------------------
-Version 0.1
-Release date: 05/30/2007
--------------------------------------------------------------------------------
-Project state:
-expermental
--------------------------------------------------------------------------------
-Credits
- Tom Trenka (ttrenka@gmail.com): DomParser
-
--------------------------------------------------------------------------------
-Project description
-
-The goal of DojoX XML Utilities is provide differing XML utilities for use
-in various places. Currently this includes a native JS DomParser, but will
-most likely be expanded to include things as dealing with x-browser forks
-(like the Sarissa project), various DOM utilites, and more.
--------------------------------------------------------------------------------
-Dependencies:
-
-DojoX XML relies only on the Dojo Base package system.
--------------------------------------------------------------------------------
-Documentation
-
-None at the time of writing. The only object is dojox.xml.DomParser (a singleton),
-which has one method: parse:
-
-dojox.xml.DomParser.parse(xmlString)
--------------------------------------------------------------------------------
-Installation instructions
-
-Grab the following from the Dojo SVN Repository:
-http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/xml/*
-
-Install into the following directory structure:
-/dojox/xml/
-
-...which should be at the same level as your Dojo checkout.
+-------------------------------------------------------------------------------
+DojoX XML Utilities
+-------------------------------------------------------------------------------
+Version 0.1
+Release date: 05/30/2007
+-------------------------------------------------------------------------------
+Project state:
+experimental
+-------------------------------------------------------------------------------
+Credits
+ Tom Trenka (ttrenka@gmail.com): DomParser
+
+-------------------------------------------------------------------------------
+Project description
+
+The goal of DojoX XML Utilities is provide differing XML utilities for use
+in various places. Currently this includes a native JS DomParser, but will
+most likely be expanded to include things as dealing with x-browser forks
+(like the Sarissa project), various DOM utilites, and more.
+-------------------------------------------------------------------------------
+Dependencies:
+
+DojoX XML relies only on the Dojo Base package system.
+-------------------------------------------------------------------------------
+Documentation
+
+None at the time of writing. The only object is dojox.xml.DomParser (a singleton),
+which has one method: parse:
+
+dojox.xml.DomParser.parse(xmlString)
+-------------------------------------------------------------------------------
+Installation instructions
+
+Grab the following from the Dojo SVN Repository:
+http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/xml/*
+
+Install into the following directory structure:
+/dojox/xml/
+
+...which should be at the same level as your Dojo checkout.

File Metadata

Mime Type
application/octet-stream
Expires
Wed, Jun 25, 17:53 (5 d, 16 h ago)
Storage Engine
chunks
Storage Format
Chunks
Storage Handle
12Y.cwtXgKnc
Default Alt Text
(7 MB)

Event Timeline